[pgrouting] 02/10: New upstream version 2.6.0

Bas Couwenberg sebastic at debian.org
Tue Mar 20 17:47:39 UTC 2018


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository pgrouting.

commit c6b303114c1a0edd7206f94242677fb2911239e2
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Tue Mar 20 17:06:58 2018 +0100

    New upstream version 2.6.0
---
 .gitignore                                         |     2 +
 .travis.yml                                        |    24 +-
 CMakeLists.txt                                     |    11 +-
 NEWS                                               |    35 +
 README.md                                          |     8 +-
 VERSION                                            |     2 +-
 appveyor.yml                                       |     9 +-
 ci/appveyor/install-CGAL.bat                       |     2 +-
 ci/appveyor/install-boost.bat                      |     2 +-
 cmake/FindGAUL.cmake                               |     2 +-
 cmake/FindPostGIS.cmake                            |     2 +-
 cmake/FindPostgreSQL.cmake                         |     8 +-
 doc/CMakeLists.txt                                 |    32 +-
 doc/bdAstar/bdAstar-family.rst                     |     2 +-
 doc/bdAstar/pgr_bdAstar.rst                        |     8 +-
 doc/bdAstar/pgr_bdAstarCost.rst                    |    10 +-
 doc/bdDijkstra/bdDijkstra-family.rst               |     2 +-
 doc/common/pgr_version.rst                         |    14 +-
 doc/components/components-family.rst               |    14 +-
 doc/components/pgr_articulationPoints.rst          |     8 +-
 doc/components/pgr_biconnectedComponents.rst       |     6 +-
 doc/components/pgr_bridges.rst                     |     2 +-
 doc/components/pgr_connectedComponents.rst         |     2 +-
 doc/components/pgr_strongComponents.rst            |     2 +-
 doc/conf.py.in                                     |     2 +-
 doc/costMatrix/pgr_bdAstarCostMatrix.rst           |     4 +-
 doc/costMatrix/pgr_bdDijkstraCostMatrix.rst        |     2 +-
 doc/lineGraph/CMakeLists.txt                       |     2 +
 doc/lineGraph/images/CMakeLists.txt                |     2 +
 doc/lineGraph/images/original.png                  |   Bin 0 -> 37315 bytes
 doc/lineGraph/images/transformation.png            |   Bin 0 -> 137458 bytes
 doc/lineGraph/pgr_lineGraphFull.rst                |   198 +
 doc/lineGraph/transformation-family.rst            |    44 +
 doc/max_flow/pgr_boykovKolmogorov.rst              |     4 +-
 doc/max_flow/pgr_edmondsKarp.rst                   |     2 +-
 doc/max_flow/pgr_maxFlow.rst                       |     2 +-
 doc/max_flow/pgr_pushRelabel.rst                   |     4 +-
 doc/pickDeliver/VRP-category.rst                   |    48 +-
 doc/pickDeliver/pgr_pickDeliver.rst                |     2 +-
 doc/pickDeliver/pgr_pickDeliverEuclidean.rst       |     2 +-
 doc/queries/CMakeLists.txt                         |     4 +-
 doc/queries/doc-aStarCost.queries                  |    10 +-
 doc/queries/doc-astar.queries                      |    10 +-
 doc/queries/doc-contractGraph.queries              |     8 +-
 doc/queries/doc-contraction.queries                |    30 +-
 doc/queries/doc-floydWarshall.queries              |     4 +-
 doc/queries/doc-gsoc_vrppdtw.queries               |     6 +-
 doc/queries/doc-johnson.queries                    |     4 +-
 doc/queries/doc-ksp.queries                        |    28 +-
 doc/queries/doc-pgr_TSP.queries                    |     6 +-
 doc/queries/doc-pgr_alphashape.queries             |     4 +-
 doc/queries/doc-pgr_analyzeGraph.queries           |    56 +-
 doc/queries/doc-pgr_articulationPoints.queries     |     4 +-
 doc/queries/doc-pgr_bdAstar.queries                |    10 +-
 doc/queries/doc-pgr_bdAstarCost.queries            |    10 +-
 doc/queries/doc-pgr_bdDijkstra.queries             |    16 +-
 doc/queries/doc-pgr_bdDijkstraCost.queries         |    10 +-
 doc/queries/doc-pgr_biconnectedComponents.queries  |     4 +-
 doc/queries/doc-pgr_boykovKolmogorov.queries       |     8 +-
 doc/queries/doc-pgr_bridges.queries                |     4 +-
 doc/queries/doc-pgr_connectedComponents.queries    |     4 +-
 doc/queries/doc-pgr_createTopology.queries         |    42 +-
 doc/queries/doc-pgr_dijkstra.queries               |    96 +-
 doc/queries/doc-pgr_dijkstraCost.queries           |    14 +-
 doc/queries/doc-pgr_dijkstraVia.queries            |    24 +-
 doc/queries/doc-pgr_drivingDistance.queries        |    32 +-
 doc/queries/doc-pgr_edgeDisjointPaths.queries      |    10 +-
 doc/queries/doc-pgr_edmondsKarp.queries            |     8 +-
 doc/queries/doc-pgr_eucledianTSP.queries           |     6 +-
 doc/queries/doc-pgr_fooDmatrix.queries             |    30 +-
 doc/queries/doc-pgr_labelGraph.queries             |     4 +-
 doc/queries/doc-pgr_lineGraph.queries              |   251 +-
 doc/queries/doc-pgr_lineGraphFull.queries          |   208 +
 doc/queries/doc-pgr_maxCardinalityMatch.queries    |     4 +-
 doc/queries/doc-pgr_maxFlow.queries                |     8 +-
 doc/queries/doc-pgr_pointsAsPolygon.queries        |     2 +-
 doc/queries/doc-pgr_pushRelabel.queries            |     8 +-
 doc/queries/doc-pgr_strongComponents.queries       |     4 +-
 doc/queries/doc-pgr_version.queries                |     4 +-
 doc/queries/doc-pgr_vrpOneDepot.queries            |     2 +-
 doc/queries/doc-pgr_withPoints.queries             |    16 +-
 doc/queries/doc-pgr_withPointsCost.queries         |    16 +-
 doc/queries/doc-pgr_withPointsDD.queries           |    12 +-
 doc/queries/doc-pgr_withPointsKSP.queries          |     8 +-
 doc/queries/doc-pickDeliver.queries                |     8 +-
 doc/queries/doc-pickDeliverEuclidean.queries       |     2 +-
 doc/queries/doc-trsp.queries                       |    10 +-
 doc/queries/issue704.queries                       |    82 -
 doc/queries/oneDepotWrapper.queries                |   256 -
 doc/queries/proof_of_concept.queries               |    14 +-
 doc/queries/trsp_notes_v2.5.0.queries              |  1112 -
 doc/src/index.rst                                  |     4 +-
 doc/src/pgRouting-concepts.rst                     |     2 +-
 doc/src/pgRouting-installation.rst                 |    42 +-
 doc/src/pgRouting-introduction.rst                 |     6 +-
 doc/src/proposed.rst                               |    10 +-
 doc/src/release_notes.rst                          |    37 +
 doc/topology/pgr_analyzeGraph.rst                  |     4 +-
 doc/topology/pgr_createVerticesTable.rst           |     4 +-
 doc/trsp/README.md                                 |   417 +-
 doxygen/Doxyfile.in                                |    14 +-
 doxygen/DoxygenLayout.xml                          |     4 +-
 doxygen/contraction.dox                            |     2 +-
 doxygen/mainpage.dox                               |    28 +-
 include/allpairs/pgr_allpairs.hpp                  |   302 +-
 include/c_common/arrays_input.h                    |     3 +-
 include/c_common/check_parameters.h                |    37 +
 include/c_common/e_report.h                        |     8 +-
 include/c_common/get_check_data.h                  |   151 +-
 include/c_common/postgres_connection.h             |     8 +-
 include/c_common/restrict_input.h                  |    38 -
 include/c_common/restrictions_input.h              |     6 +-
 include/c_types/line_graph_full_rt.h               |    71 +
 include/c_types/line_graph_rt.h                    |     4 +-
 include/c_types/pgr_components_rt.h                |     8 +-
 include/c_types/restrict_t.h                       |    69 -
 include/c_types/restriction_t.h                    |    69 +
 include/c_types/trsp/trsp.h                        |    90 +
 include/c_types/trsp_types.h                       |    78 +
 include/contraction/pgr_contract.hpp               |     6 +-
 include/contraction/pgr_contractionGraph.hpp       |    12 +-
 include/contraction/pgr_deadEndContraction.hpp     |     6 +-
 include/contraction/pgr_linearContraction.hpp      |     6 +-
 include/cpp_common/basePath_SSEC.hpp               |     4 +-
 include/cpp_common/ch_edge.h                       |    72 +
 include/cpp_common/ch_vertex.h                     |    75 +
 include/cpp_common/line_vertex.h                   |     2 +-
 include/cpp_common/linear_directed_graph.h         |    59 +
 include/cpp_common/pgr_alloc.hpp                   |    24 +-
 include/cpp_common/pgr_base_graph.hpp              |    64 +-
 include/cpp_common/signalhandler.h                 |   154 +
 include/dijkstra/pgr_dijkstraVia.hpp               |   124 +
 include/dijkstraTRSP/pgr_dijkstraTRSP.hpp          |    23 +-
 include/dijkstraTRSP/restriction.h                 |    21 +-
 include/drivers/allpairs/johnson_driver.h          |     1 +
 include/drivers/alpha_shape/alpha_driver.h         |    49 +
 include/drivers/astar/astar_driver.h               |     5 -
 include/drivers/contraction/contractGraph_driver.h |     6 +-
 include/drivers/lineGraph/lineGraphFull_driver.h   |    56 +
 .../drivers/max_flow/edge_disjoint_paths_driver.h  |    62 +
 include/drivers/max_flow/max_flow_driver.h         |    62 +
 .../max_flow/maximum_cardinality_matching_driver.h |    58 +
 include/drivers/trsp/trsp_driver.h                 |    67 +
 include/lineGraph/pgr_lineGraph.hpp                |   607 +-
 include/lineGraph/pgr_lineGraphFull.hpp            |   303 +
 include/max_flow/pgr_flowgraph.hpp                 |    54 +
 include/max_flow/pgr_maxflow.hpp                   |   199 +
 .../max_flow/pgr_maximumcardinalitymatching.hpp    |   171 +
 include/trsp/GraphDefinition.h                     |   165 +
 include/trsp/edgeInfo.h                            |    99 +
 include/trsp/pgr_trspHandler.h                     |   219 +
 include/trsp/rule.h                                |    68 +
 include/vrp/dnode.h                                |     6 +-
 include/withPoints/pgr_withPoints.hpp              |   102 +
 pgtap/alpha_shape/issue-544.sql                    |     2 +-
 .../astar_oneToOne-compare-dijkstra1.test.sql      |    26 +-
 pgtap/astar/astar_oneToOne-types-check.sql         |    28 +-
 pgtap/bdAstar/bdAstar-return-types-check.sql       |     4 +-
 pgtap/bdDijkstra/bdDijkstra-types-check.sql        |     4 +-
 pgtap/common/getColumnName.test.sql                |    48 +-
 pgtap/common/getColumnType.test.sql                |    22 +-
 pgtap/contraction/contraction-types-check.sql      |     4 +-
 pgtap/contraction/contraction_cycle_directed.sql   |     2 +-
 pgtap/contraction/contraction_cycle_undirected.sql |     2 +-
 pgtap/contraction/directed_dead_end.sql            |    24 +-
 pgtap/contraction/directed_linear.sql              |     2 +-
 pgtap/contraction/undirected_dead_end.sql          |     4 +-
 pgtap/contraction/undirected_linear.sql            |     2 +-
 .../apspJohnson-v2-v3-equivalence.test.sql         |     6 +-
 ...pspWarshall-v2-v3-equivalence-directed.test.sql |     4 +-
 ...pWarshall-v2-v3-equivalence-undirected.test.sql |     4 +-
 pgtap/deprecated/astarV2.0-types-check2.sql        |    22 +-
 .../convenience-textToPoints-types-check.sql       |     2 +-
 ...dijkstra-v2-equi-v3-directed-N-reverse.test.sql |    30 +-
 ...dijkstra-v2-equi-v3-directed-W-reverse.test.sql |    40 +-
 ...jkstra-v2-equi-v3-undirected-N-reverse.test.sql |    30 +-
 ...jkstra-v2-equi-v3-undirected-W-reverse.test.sql |    32 +-
 pgtap/deprecated/dijkstraV2-types-check.sql        |     4 +-
 pgtap/deprecated/kdijkstra-issue229.test.sql       |     4 +-
 pgtap/deprecated/kdijkstra-issue333.test.sql       |     8 +-
 .../kdijkstraCost-dijkstraCost-compare.test.sql    |     2 +-
 .../kdijkstraCost-errors-exceptions-cost.test.sql  |     2 +-
 .../kdijkstraPath-dijkstra-compare.test.sql        |     2 +-
 .../kdijkstraPath-errors-exceptions-path.test.sql  |     2 +-
 .../maxflowboykovkolmogorov-types-check.sql        |     2 +-
 .../deprecated/maxflowedmondskarp-types-check.sql  |     2 +-
 .../deprecated/maxflowpushrelabel-types-check.sql  |     2 +-
 pgtap/deprecated/no_underscored-2x.test.sql        |     4 +-
 pgtap/dijkstra/dijkstra-issue-353.test.sql         |     6 +-
 pgtap/dijkstra/dijkstra-types-check.sql            |    14 +-
 pgtap/dijkstra/dijkstraCost-types-check.sql        |    32 +-
 pgtap/dijkstra/dijkstraVia-types-check.sql         |     2 +-
 pgtap/dijkstra/oneToOne_equiv_manyToMany.test.sql  |     8 +-
 pgtap/dijkstra/oneToOne_equiv_manyToOne.test.sql   |    10 +-
 pgtap/dijkstra/oneToOne_equiv_oneToMany.test.sql   |    10 +-
 .../lineGraph}/lineGraph-innerQuery.sql            |     0
 .../lineGraph}/lineGraph-typesCheck.sql            |     0
 pgtap/lineGraph/lineGraphFull-innerQuery.sql       |    11 +
 .../lineGraphFull-reverse_cost_equivalence.sql     |     9 +
 pgtap/lineGraph/lineGraphFull-typesCheck.sql       |    12 +
 .../lineGraphFull_dijkstra_equivalence.sql         |   140 +
 .../lineGraphFull_original_edge_check.sql          |    54 +
 .../lineGraphFull_original_vertex_mapping.sql      |    95 +
 pgtap/max_flow/boykovKolmogorov-types-check.sql    |     2 +-
 pgtap/max_flow/edgedisjointpaths-types-check.sql   |     2 +-
 pgtap/max_flow/edmondsKarp-types-check.sql         |     2 +-
 pgtap/max_flow/internet_example.sql                |     4 +-
 pgtap/max_flow/maxflow-types-check.sql             |     2 +-
 pgtap/max_flow/pushRelabel-types-check.sql         |     2 +-
 .../pickDeliverEuclidean-innerquery.sql            |    44 +-
 .../wrong_data_pickDeliverEuclidean.sql            |     8 +-
 pgtap/topology/analyzeOneWay.test.sql              |     2 +-
 pgtap/topology/incrementalCreateTopology.test.sql  |    12 +-
 pgtap/trsp/from1to3.test.sql                       |     7 +-
 pgtap/trsp/from3to4-directed.test.sql              |     2 +-
 pgtap/trsp/trsp-any-00.test.sql                    |     2 +-
 pgtap/trsp/trsp-any-01.test.sql                    |     4 +-
 ...restrictions-compare-dijkstra-directed.test.sql |     4 +-
 ...strictions-compare-dijkstra-undirected.test.sql |     4 +-
 pgtap/tsp/pgr_TSP_types_check.sql                  |     4 +-
 pgtap/tsp/pgr_eucledianTSP_types_check.sql         |     4 +-
 pgtap/withPoints/issue979DD.sql                    |   186 +
 .../many_to_many_eq_one_to_one_withPoint.test.sql  |    14 +-
 .../many_to_one_eq_one_to_one_withPoint.test.sql   |     8 +-
 .../one_to_many_eq_one_to_one_withPoint.test.sql   |     8 +-
 pgtap/withPoints/one_to_many_withPoint.test.sql    |    12 +-
 pgtap/withPoints/one_to_one_withPoint.test.sql     |     8 +-
 pgtap/withPoints/undirected_equalityDD.sql         |    51 +
 pgtap/withPoints/undirected_equalityWPDijkstra.sql |   271 +
 sql/CMakeLists.txt                                 |     4 +-
 sql/components/articulationPoints.sql              |     2 +-
 sql/components/biconnectedComponents.sql           |     2 +-
 sql/components/bridges.sql                         |     4 +-
 sql/components/connectedComponents.sql             |     2 +-
 sql/components/strongComponents.sql                |     2 +-
 sql/lineGraph/CMakeLists.txt                       |     1 +
 sql/lineGraph/lineGraphFull.sql                    |    40 +
 sql/scripts/build-extension-file.pl                |     2 +-
 sql/scripts/build-extension-update-files1.pl       |    17 +-
 sql/sigs/CMakeLists.txt                            |    26 +-
 sql/sigs/pgrouting--2.6.0.sig                      |   191 +
 sql/trsp/CMakeLists.txt                            |     2 +
 sql/trsp/_trsp.sql                                 |    42 +
 sql/trsp/trsp.sql                                  |   154 +
 sql/trsp/trsp_V2.2.sql                             |   133 +-
 sql/trsp/vias_trsp_V2.2.sql                        |    21 +-
 src/allpairs/{src => }/CMakeLists.txt              |     0
 src/allpairs/floydWarshall.c                       |   187 +
 src/allpairs/floydWarshall_driver.cpp              |   106 +
 src/allpairs/johnson.c                             |   189 +
 src/allpairs/johnson_driver.cpp                    |   107 +
 src/allpairs/src/floydWarshall.c                   |   183 -
 src/allpairs/src/floydWarshall_driver.cpp          |   104 -
 src/allpairs/src/johnson.c                         |   175 -
 src/allpairs/src/johnson_driver.cpp                |    91 -
 src/allpairs/test/doc-floydWarshall.result         |    33 -
 src/allpairs/test/doc-johnson.result               |    35 -
 src/allpairs/test/test.conf                        |    25 -
 src/alpha_shape/{src => }/CMakeLists.txt           |     0
 src/alpha_shape/alpha.c                            |   350 +
 src/alpha_shape/alpha_driver.cpp                   |   291 +
 src/alpha_shape/src/alpha.c                        |   316 -
 src/alpha_shape/src/alpha_driver.cpp               |   270 -
 src/alpha_shape/src/alpha_driver.h                 |    49 -
 src/alpha_shape/test/doc-pgr_alphashape.result     |    39 -
 .../test/doc-pgr_pointsAsPolygon.result            |    15 -
 src/astar/{src => }/CMakeLists.txt                 |     0
 src/astar/astar.c                                  |   270 +
 src/astar/astar_driver.cpp                         |   182 +
 src/astar/src/astar.c                              |   246 -
 src/astar/src/astar_driver.cpp                     |   203 -
 src/astar/test/doc-aStarCost.result                |    58 -
 src/astar/test/doc-astar.result                    |   104 -
 src/bdAstar/{src => }/CMakeLists.txt               |     0
 src/bdAstar/bdAstar.c                              |   240 +
 src/bdAstar/{src => }/bdAstar_driver.cpp           |     0
 src/bdAstar/src/bdAstar.c                          |   238 -
 src/bdAstar/test/doc-pgr_bdAstar.result            |   112 -
 src/bdAstar/test/doc-pgr_bdAstarCost.result        |    71 -
 src/bdDijkstra/{src => }/CMakeLists.txt            |     0
 src/bdDijkstra/bdDijkstra.c                        |   234 +
 src/bdDijkstra/bdDijkstra_driver.cpp               |   191 +
 src/bdDijkstra/src/bdDijkstra.c                    |   227 -
 src/bdDijkstra/src/bdDijkstra_driver.cpp           |   206 -
 src/bdDijkstra/test/bdDijkstra-large.result        |   396 -
 src/bdDijkstra/test/doc-pgr_bdDijkstra.result      |   119 -
 src/bdDijkstra/test/doc-pgr_bdDijkstraCost.result  |    60 -
 src/common/CMakeLists.txt                          |    31 +
 src/common/arrays_input.c                          |   132 +
 src/common/basePath_SSEC.cpp                       |   342 +
 src/common/{src => }/basic_edge.cpp                |     0
 src/common/{src => }/basic_vertex.cpp              |     0
 src/common/ch_edge.cpp                             |    77 +
 src/common/ch_vertex.cpp                           |    64 +
 src/common/check_parameters.c                      |    54 +
 src/common/coordinates_input.c                     |   146 +
 src/common/{src => }/e_report.c                    |     0
 src/common/edges_input.c                           |   606 +
 src/common/get_check_data.c                        |   288 +
 src/common/{src => }/identifier.cpp                |     0
 src/common/matrixRows_input.c                      |   135 +
 src/common/orders_input.c                          |   219 +
 src/common/pgr_alloc.cpp                           |    37 +
 src/common/{src => }/pgr_assert.cpp                |     0
 src/common/points_input.c                          |   153 +
 src/common/postgres_connection.c                   |   118 +
 src/common/restrictions_input.c                    |   155 +
 src/common/signalhandler.cpp                       |    83 +
 src/common/src/CMakeLists.txt                      |    28 -
 src/common/src/arrays_input.c                      |   132 -
 src/common/src/basePath_SSEC.cpp                   |   321 -
 src/common/src/ch_edge.cpp                         |    77 -
 src/common/src/ch_edge.h                           |    72 -
 src/common/src/ch_vertex.cpp                       |    64 -
 src/common/src/ch_vertex.h                         |    75 -
 src/common/src/coordinates_input.c                 |   146 -
 src/common/src/edges_input.c                       |   601 -
 src/common/src/get_check_data.c                    |   246 -
 src/common/src/matrixRows_input.c                  |   135 -
 src/common/src/orders_input.c                      |   219 -
 src/common/src/pgr_alloc.cpp                       |    36 -
 src/common/src/pgr_logger.h                        |    74 -
 src/common/src/points_input.c                      |   153 -
 src/common/src/postgres_connection.c               |   118 -
 src/common/src/restrict_input.c                    |   173 -
 src/common/src/restrictions_input.c                |   157 -
 src/common/src/signalhandler.cpp                   |    83 -
 src/common/src/signalhandler.h                     |   154 -
 src/common/src/time_msg.c                          |    39 -
 src/common/src/vehicles_input.c                    |   275 -
 src/common/test/doc-pgr_version.result             |    14 -
 src/common/test/doc-pgr_version.test.sql           |     7 -
 src/common/test/test.conf                          |    25 -
 src/common/test/versionless-any-01.result          |   395 -
 src/common/tester/Makefile                         |    21 -
 src/common/tester/test1.c                          |    38 -
 src/common/tester/test2.cpp                        |    38 -
 src/common/time_msg.c                              |    40 +
 src/common/vehicles_input.c                        |   274 +
 src/common/{src => }/xy_vertex.cpp                 |     0
 src/components/{src => }/CMakeLists.txt            |     0
 src/components/{src => }/articulationPoints.c      |     0
 .../{src => }/articulationPoints_driver.cpp        |     0
 src/components/{src => }/biconnectedComponents.c   |     0
 .../{src => }/biconnectedComponents_driver.cpp     |     0
 src/components/{src => }/bridges.c                 |     0
 src/components/{src => }/bridges_driver.cpp        |     0
 src/components/{src => }/connectedComponents.c     |     0
 .../{src => }/connectedComponents_driver.cpp       |     0
 src/components/{src => }/strongComponents.c        |     0
 .../{src => }/strongComponents_driver.cpp          |     0
 .../test/doc-pgr_articulationPoints.result         |    30 -
 .../test/doc-pgr_biconnectedComponents.result      |    58 -
 src/components/test/doc-pgr_bridges.result         |    34 -
 .../test/doc-pgr_connectedComponents.result        |    56 -
 .../test/doc-pgr_strongComponents.result           |    56 -
 src/contraction/{src => }/CMakeLists.txt           |     0
 src/contraction/{src => }/contractGraph.c          |     0
 src/contraction/{src => }/contractGraph_driver.cpp |     0
 src/contraction/demo/dead_end_demo.sql             |    56 -
 src/contraction/demo/linear_demo.sql               |    44 -
 src/contraction/test/directed-deadend.result       |    61 -
 src/contraction/test/directed-deadend.test.sql     |    44 -
 src/contraction/test/directed-development.result   |   165 -
 src/contraction/test/directed-development.test.sql |   149 -
 src/contraction/test/directed-linear.result        |    70 -
 src/contraction/test/directed-linear.test.sql      |    45 -
 src/contraction/test/doc-contractGraph.result      |    62 -
 src/contraction/test/doc-contraction.result        |   339 -
 src/contraction/test/doc-contraction.test.sql      |   212 -
 src/contraction/test/expand_graph.result           |   242 -
 src/contraction/test/expand_graph.test.sql         |   169 -
 .../test/expand_graph_without_function.result      |   152 -
 src/contraction/test/proof_of_concept.result       |   137 -
 src/contraction/test/proof_of_concept_1.result     |   135 -
 src/contraction/test/proof_of_concept_1.test.sql   |    68 -
 src/contraction/test/return_types.result           |   121 -
 src/contraction/test/sampleData.result             |    19 -
 .../test/doc-pgr_fooDmatrix-windows.result         |   324 -
 src/costMatrix/test/doc-pgr_fooDmatrix.result      |   324 -
 src/dijkstra/{src => }/CMakeLists.txt              |     0
 src/dijkstra/demo/boost_demo.sql                   |    80 -
 src/dijkstra/demo/hanoslav_demo.sql                |    97 -
 src/dijkstra/demo/wiki_demo.sql                    |    49 -
 src/dijkstra/{src => }/dijkstra.c                  |     0
 src/dijkstra/{src => }/dijkstraVia.c               |     0
 src/dijkstra/dijkstraVia_driver.cpp                |   185 +
 src/dijkstra/{src => }/dijkstra_driver.cpp         |     0
 src/dijkstra/src/dijkstraVia_driver.cpp            |   263 -
 src/dijkstra/test/doc-pgr_dijkstra.result          |   590 -
 src/dijkstra/test/doc-pgr_dijkstra.test.sql        |   252 -
 src/dijkstra/test/doc-pgr_dijkstraCost.result      |    85 -
 src/dijkstra/test/doc-pgr_dijkstraVia.result       |   134 -
 src/dijkstra/test/doc-pgr_dijkstraVia.test.sql     |    61 -
 src/dijkstraTRSP/{src => }/CMakeLists.txt          |     0
 src/dijkstraTRSP/dijkstraTRSP.c                    |   285 +
 src/dijkstraTRSP/dijkstraTRSP_driver.cpp           |   186 +
 src/dijkstraTRSP/restriction.cpp                   |    52 +
 src/dijkstraTRSP/src/dijkstraTRSP.c                |   285 -
 src/dijkstraTRSP/src/dijkstraTRSP_driver.cpp       |   186 -
 src/dijkstraTRSP/src/restriction.cpp               |    52 -
 src/dijkstraTRSP/test/pgtap/custom.sql             |   163 -
 src/driving_distance/{src => }/CMakeLists.txt      |     0
 src/driving_distance/drivedist_driver.cpp          |   220 +
 .../{src => }/many_to_dist_driving_distance.c      |     0
 src/driving_distance/many_to_dist_withPointsDD.c   |   247 +
 src/driving_distance/src/drivedist_driver.cpp      |   214 -
 .../src/many_to_dist_withPointsDD.c                |   247 -
 src/driving_distance/src/withPoints_dd_driver.cpp  |   194 -
 .../test/doc-pgr_drivingDistance.result            |   312 -
 src/driving_distance/withPoints_dd_driver.cpp      |   190 +
 src/internalQueryTests/sql/CMakeLists.txt          |     9 -
 src/internalQueryTests/sql/testXYedges.sql         |    36 -
 src/internalQueryTests/sql/test_ch_edges.sql       |    36 -
 src/internalQueryTests/sql/test_matrixRows.sql     |    36 -
 src/internalQueryTests/src/CMakeLists.txt          |    11 -
 src/internalQueryTests/src/testXYedges.c           |   104 -
 src/internalQueryTests/src/testXYedges_driver.cpp  |   194 -
 src/internalQueryTests/src/testXYedges_driver.h    |    52 -
 src/internalQueryTests/src/test_c_edges.c          |   105 -
 src/internalQueryTests/src/test_c_edges_driver.cpp |   219 -
 src/internalQueryTests/src/test_c_edges_driver.h   |    52 -
 src/internalQueryTests/src/test_matrixRows.c       |   107 -
 .../src/test_matrixRows_driver.cpp                 |    76 -
 .../src/test_matrixRows_driver.h                   |    50 -
 .../test/pgtap/matrixRows_types_check.sql          |    94 -
 .../test/pgtap/testXYedges_types_check.sql         |   133 -
 src/ksp/{src => }/CMakeLists.txt                   |     0
 src/ksp/devdata/issue285.data                      |     7 -
 src/ksp/devdata/sampledata.data                    |    20 -
 src/ksp/ksp.c                                      |   200 +
 src/ksp/ksp_driver.cpp                             |   124 +
 src/ksp/src/ksp.c                                  |   193 -
 src/ksp/src/ksp_driver.cpp                         |   126 -
 src/ksp/src/withPoints_ksp.c                       |   267 -
 src/ksp/src/withPoints_ksp_driver.cpp              |   207 -
 src/ksp/test/doc-ksp.result                        |   274 -
 src/ksp/test/doc-ksp.test.sql                      |    87 -
 src/ksp/withPoints_ksp.c                           |   261 +
 src/ksp/withPoints_ksp_driver.cpp                  |   202 +
 src/label_graph/test/doc-pgr_labelGraph.result     |    24 -
 src/label_graph/test/pgrouting_labelgraph.test.sql |    72 -
 src/label_graph/test/test.conf                     |    21 -
 src/lineGraph/CMakeLists.txt                       |     6 +
 src/lineGraph/lineGraph.c                          |   227 +
 src/lineGraph/lineGraphFull.c                      |   169 +
 src/lineGraph/lineGraphFull_driver.cpp             |   147 +
 src/lineGraph/lineGraph_driver.cpp                 |   138 +
 src/lineGraph/src/CMakeLists.txt                   |     4 -
 src/lineGraph/src/lineGraph.c                      |   223 -
 src/lineGraph/src/lineGraph_driver.cpp             |   157 -
 src/lineGraph/test/doc-pgr_lineGraph.result        |   210 -
 src/lineGraph/test/test.conf                       |    17 -
 src/linecommand/src/Makefile                       |    34 -
 src/linecommand/src/dijkstra.hpp                   |   115 -
 src/linecommand/src/driving.cpp                    |   107 -
 src/linecommand/src/ksp.cpp                        |   124 -
 src/linecommand/src/performance/dijkstra/Makefile  |    31 -
 .../src/performance/dijkstra/dijkstra.hpp          |   139 -
 .../src/performance/dijkstra/pgRouting.cpp         |   374 -
 src/linecommand/src/pgRouting.cpp                  |   387 -
 src/linecommand/src/warshall.hpp                   |    58 -
 src/max_flow/{src => }/CMakeLists.txt              |     0
 src/max_flow/demo/slide_demo.sql                   |    45 -
 src/max_flow/edge_disjoint_paths.c                 |   195 +
 src/max_flow/edge_disjoint_paths_driver.cpp        |   186 +
 src/max_flow/max_flow.c                            |   224 +
 src/max_flow/max_flow_driver.cpp                   |   147 +
 src/max_flow/maximum_cardinality_matching.c        |   178 +
 .../maximum_cardinality_matching_driver.cpp        |   108 +
 src/max_flow/pgr_flowgraph.cpp                     |    27 +
 src/max_flow/pgr_maxflow.cpp                       |   310 +
 src/max_flow/src/edge_disjoint_paths.c             |   201 -
 src/max_flow/src/edge_disjoint_paths_driver.cpp    |   187 -
 src/max_flow/src/edge_disjoint_paths_driver.h      |    61 -
 src/max_flow/src/max_flow.c                        |   224 -
 src/max_flow/src/max_flow_driver.cpp               |   147 -
 src/max_flow/src/max_flow_driver.h                 |    61 -
 src/max_flow/src/maximum_cardinality_matching.c    |   178 -
 .../src/maximum_cardinality_matching_driver.cpp    |   108 -
 .../src/maximum_cardinality_matching_driver.h      |    57 -
 src/max_flow/src/pgr_flowgraph.cpp                 |    27 -
 src/max_flow/src/pgr_flowgraph.hpp                 |    54 -
 src/max_flow/src/pgr_maxflow.cpp                   |   310 -
 src/max_flow/src/pgr_maxflow.hpp                   |   199 -
 .../src/pgr_maximumcardinalitymatching.hpp         |   171 -
 src/max_flow/test/doc-pgr_boykovKolmogorov.result  |    90 -
 src/max_flow/test/doc-pgr_edgeDisjointPaths.result |   128 -
 src/max_flow/test/doc-pgr_edmondsKarp.result       |    90 -
 .../test/doc-pgr_maxCardinalityMatch.result        |    40 -
 src/max_flow/test/doc-pgr_maxFlow.result           |    67 -
 src/max_flow/test/doc-pgr_pushRelabel.result       |    96 -
 src/pickDeliver/{src => }/CMakeLists.txt           |     0
 src/pickDeliver/{src => }/base_node.cpp            |     0
 src/pickDeliver/{src => }/book_keeping.cpp         |     0
 src/pickDeliver/{src => }/dnode.cpp                |     0
 src/pickDeliver/fleet.cpp                          |   391 +
 src/pickDeliver/{src => }/initial_solution.cpp     |     0
 src/pickDeliver/{src => }/node.cpp                 |     0
 src/pickDeliver/optimize.cpp                       |   649 +
 src/pickDeliver/{src => }/order.cpp                |     0
 src/pickDeliver/{src => }/pd_orders.cpp            |     0
 src/pickDeliver/{src => }/pd_problem.cpp           |     0
 src/pickDeliver/{src => }/pgr_messages.cpp         |     0
 src/pickDeliver/{src => }/pgr_pickDeliver.cpp      |     0
 src/pickDeliver/{src => }/pickDeliver.c            |     0
 src/pickDeliver/{src => }/pickDeliverEuclidean.c   |     0
 .../{src => }/pickDeliverEuclidean_driver.cpp      |     0
 src/pickDeliver/{src => }/pickDeliver_driver.cpp   |     0
 src/pickDeliver/solution.cpp                       |   245 +
 src/pickDeliver/src/fleet.cpp                      |   365 -
 src/pickDeliver/src/optimize.cpp                   |   650 -
 src/pickDeliver/src/solution.cpp                   |   246 -
 src/pickDeliver/src/tw_node.cpp                    |   293 -
 src/pickDeliver/src/vehicle.cpp                    |   577 -
 src/pickDeliver/test/book_from_query.result        |   186 -
 src/pickDeliver/test/book_from_query.test.sql      |   115 -
 src/pickDeliver/test/book_vrp.test.sql             |   664 -
 src/pickDeliver/test/design_pgtap.result           |    20 -
 .../test/differentVechiles-cygwin.test.sql         |    37 -
 src/pickDeliver/test/differentVechiles.result      |   230 -
 src/pickDeliver/test/differentVechiles.test.sql    |    34 -
 src/pickDeliver/test/doc-pickDeliver.result        |    61 -
 src/pickDeliver/test/doc-pickDeliver.test.sql      |    28 -
 .../test/doc-pickDeliverEuclidean.result           |    27 -
 src/pickDeliver/test/jet_customers.result          |   122 -
 src/pickDeliver/test/jet_customers1.result         |   291 -
 src/pickDeliver/test/jet_customers1.test.sql       |   120 -
 .../test/notTestingYet/pickDeliver-innerquery.sql  |   391 -
 src/pickDeliver/test/past_example.result           |   266 -
 src/pickDeliver/tw_node.cpp                        |   287 +
 src/pickDeliver/vehicle.cpp                        |   577 +
 src/pickDeliver/{src => }/vehicle_node.cpp         |     0
 src/pickDeliver/{src => }/vehicle_pickDeliver.cpp  |     0
 src/topology/test/analyzeOneway-any.result         |    25 -
 src/topology/test/createVertTab-any.result         |   306 -
 src/topology/test/createVertTab-any.test.sql       |    38 -
 src/topology/test/doc-pgr_analyzeGraph.result      |   536 -
 src/topology/test/doc-pgr_createTopology.result    |   262 -
 src/topology/test/issue900.result                  |    25 -
 src/topology/test/nodeNetwork-any.result           |   204 -
 src/topology/test/nodeNetwork-any.test.sql         |    24 -
 src/topology/test/test.conf                        |    30 -
 src/trsp/CMakeLists.txt                            |    14 +
 src/trsp/GraphDefinition.cpp                       |   801 +
 src/trsp/edgeInfo.cpp                              |    44 +
 src/trsp/new_trsp.c                                |   207 +
 src/trsp/pgr_trspHandler.cpp                       |   578 +
 src/trsp/rule.cpp                                  |    61 +
 src/trsp/src/CMakeLists.txt                        |     1 -
 src/trsp/src/GraphDefinition.cpp                   |   802 -
 src/trsp/src/GraphDefinition.h                     |   165 -
 src/trsp/src/trsp.c                                |   881 -
 src/trsp/src/trsp.h                                |    91 -
 src/trsp/src/trsp_core.cpp                         |   133 -
 src/trsp/src/trsp_driver.cpp                       |   141 -
 src/trsp/src/trsp_driver.h                         |    64 -
 src/trsp/src/utils.h                               |   105 -
 src/trsp/test/doc-trsp.result                      |   115 -
 src/trsp/test/doc-trsp.test.sql                    |    54 -
 src/trsp/test/issue693.result                      |    28 -
 src/trsp/test/issue693.test.sql                    |    14 -
 src/trsp/test/issue704.result                      |    82 -
 src/trsp/test/issue704.test.sql                    |    61 -
 src/trsp/test/issue717.result                      |   359 -
 src/trsp/test/test.conf                            |    28 -
 src/trsp/test/trsp-any-02.result                   |    42 -
 src/trsp/test/trsp_notes_v2.5.0.result             |  1112 -
 src/trsp/test/trsp_notes_v2.5.0.test.sql           |   814 -
 src/trsp/test/trsp_vias-any-04.result              |   141 -
 src/trsp/tester/Makefile                           |     7 -
 src/trsp/tester/issue191-bad-m1.h                  | 22599 ------------------
 src/trsp/tester/issue191-bad.h                     | 22599 ------------------
 src/trsp/tester/issue191-good.h                    | 22601 -------------------
 src/trsp/tester/postgres.h                         |    23 -
 src/trsp/tester/testit.cpp                         |    60 -
 src/trsp/trsp.c                                    |   884 +
 src/trsp/trsp_core.cpp                             |   132 +
 src/trsp/trsp_driver.cpp                           |   145 +
 src/tsp/{src => }/CMakeLists.txt                   |     0
 src/tsp/Dmatrix.cpp                                |   222 +
 src/tsp/{src => }/eucledianDmatrix.cpp             |     0
 src/tsp/{src => }/eucledianTSP.c                   |     0
 src/tsp/{src => }/eucledianTSP_driver.cpp          |     0
 src/tsp/{src => }/newTSP.c                         |     0
 src/tsp/{src => }/newTSP_driver.cpp                |     0
 src/tsp/src/Dmatrix.cpp                            |   218 -
 src/tsp/test/development/qa194-tsp.test.sql        |   272 -
 src/tsp/test/development/wi29-tsp.result           |   226 -
 src/tsp/test/doc-pgr_TSP-windows.result            |    77 -
 src/tsp/test/doc-pgr_TSP.result                    |    77 -
 src/tsp/test/doc-pgr_eucledianTSP.result           |    94 -
 src/tsp/{src => }/tour.cpp                         |     0
 src/vrp_basic/test/doc-pgr_vrpOneDepot.result      |   256 -
 src/vrp_basic/test/oneDepotWrapper.result          |   256 -
 src/vrp_basic/test/test.conf                       |    17 -
 src/vrppdtw/test/doc-gsoc_vrppdtw.result           |    79 -
 src/vrppdtw/test/test.conf                         |    20 -
 src/withPoints/{src => }/CMakeLists.txt            |     0
 src/withPoints/get_new_queries.cpp                 |    68 +
 src/withPoints/pgr_withPoints.cpp                  |   552 +
 src/withPoints/src/get_new_queries.cpp             |    67 -
 src/withPoints/src/pgr_withPoints.cpp              |   467 -
 src/withPoints/src/pgr_withPoints.hpp              |    72 -
 src/withPoints/src/withPoints.c                    |   281 -
 src/withPoints/src/withPoints_driver.cpp           |   251 -
 src/withPoints/test/doc-pgr_withPoints.result      |   208 -
 src/withPoints/test/doc-pgr_withPointsCost.result  |   105 -
 src/withPoints/test/doc-pgr_withPointsDD.result    |    96 -
 src/withPoints/test/doc-pgr_withPointsKSP.result   |   119 -
 src/withPoints/withPoints.c                        |   290 +
 src/withPoints/withPoints_driver.cpp               |   229 +
 test/allpairs/doc-floydWarshall.result             |    33 +
 .../allpairs}/doc-floydWarshall.test.sql           |     0
 test/allpairs/doc-johnson.result                   |    35 +
 .../test => test/allpairs}/doc-johnson.test.sql    |     0
 test/allpairs/test.conf                            |    25 +
 test/alpha_shape/doc-pgr_alphashape.result         |    39 +
 .../alpha_shape}/doc-pgr_alphashape.test.sql       |     0
 test/alpha_shape/doc-pgr_pointsAsPolygon.result    |    15 +
 .../alpha_shape}/doc-pgr_pointsAsPolygon.test.sql  |     0
 .../test => test/alpha_shape}/test.conf            |     0
 test/astar/doc-aStarCost.result                    |    58 +
 .../test => test/astar}/doc-aStarCost.test.sql     |     0
 test/astar/doc-astar.result                        |   104 +
 {src/astar/test => test/astar}/doc-astar.test.sql  |     0
 {src/astar/test => test/astar}/test.conf           |     0
 test/bdAstar/doc-pgr_bdAstar.result                |   112 +
 .../test => test/bdAstar}/doc-pgr_bdAstar.test.sql |     0
 test/bdAstar/doc-pgr_bdAstarCost.result            |    71 +
 .../bdAstar}/doc-pgr_bdAstarCost.test.sql          |     0
 {src/bdAstar/test => test/bdAstar}/test.conf       |     0
 test/bdDijkstra/bdDijkstra-large.result            |   396 +
 .../bdDijkstra}/bdDijkstra-large.test.sql          |     0
 test/bdDijkstra/doc-pgr_bdDijkstra.result          |   119 +
 .../bdDijkstra}/doc-pgr_bdDijkstra.test.sql        |     0
 test/bdDijkstra/doc-pgr_bdDijkstraCost.result      |    60 +
 .../bdDijkstra}/doc-pgr_bdDijkstraCost.test.sql    |     0
 .../bdDijkstra/test => test/bdDijkstra}/large.data |     0
 {src/bdDijkstra/test => test/bdDijkstra}/test.conf |     0
 test/common/doc-pgr_version.result                 |    14 +
 test/common/doc-pgr_version.test.sql               |     7 +
 test/common/test.conf                              |    25 +
 test/common/versionless-any-01.result              |   395 +
 .../common}/versionless-any-01.test.sql            |     0
 test/components/doc-pgr_articulationPoints.result  |    30 +
 .../doc-pgr_articulationPoints.test.sql            |     0
 .../doc-pgr_biconnectedComponents.result           |    58 +
 .../doc-pgr_biconnectedComponents.test.sql         |     0
 test/components/doc-pgr_bridges.result             |    34 +
 .../components}/doc-pgr_bridges.test.sql           |     0
 test/components/doc-pgr_connectedComponents.result |    56 +
 .../doc-pgr_connectedComponents.test.sql           |     0
 test/components/doc-pgr_strongComponents.result    |    56 +
 .../components}/doc-pgr_strongComponents.test.sql  |     0
 .../connectedComponentsV-compare-dijkstra.sql      |     0
 .../pgtap/connectedComponentsV-innerQuery.sql      |     0
 .../pgtap/connectedComponentsV-typesCheck.sql      |     0
 {src/components/test => test/components}/test.conf |     0
 test/contraction/directed-deadend.result           |    61 +
 test/contraction/directed-deadend.test.sql         |    44 +
 test/contraction/directed-development.result       |   165 +
 test/contraction/directed-development.test.sql     |   149 +
 test/contraction/directed-linear.result            |    70 +
 test/contraction/directed-linear.test.sql          |    45 +
 test/contraction/doc-contractGraph.result          |    62 +
 .../contraction}/doc-contractGraph.test.sql        |     0
 test/contraction/doc-contraction.result            |   339 +
 test/contraction/doc-contraction.test.sql          |   212 +
 test/contraction/expand_graph.result               |   242 +
 test/contraction/expand_graph.test.sql             |   169 +
 .../expand_graph_without_function.result           |   152 +
 .../expand_graph_without_function.test.sql         |     0
 test/contraction/proof_of_concept.result           |   137 +
 .../contraction}/proof_of_concept.test.sql         |     0
 test/contraction/proof_of_concept_1.result         |   135 +
 test/contraction/proof_of_concept_1.test.sql       |    68 +
 test/contraction/return_types.result               |   121 +
 .../contraction}/return_types.test.sql             |     0
 test/contraction/sampleData.result                 |    19 +
 .../test => test/contraction}/sampleData.test.sql  |     0
 .../test => test/contraction}/test.conf            |     0
 .../costMatrix}/doc-pgr_fooDmatrix-mac.result      |     0
 .../costMatrix}/doc-pgr_fooDmatrix-mac.test.sql    |     0
 test/costMatrix/doc-pgr_fooDmatrix-windows.result  |   324 +
 .../doc-pgr_fooDmatrix-windows.test.sql            |     0
 test/costMatrix/doc-pgr_fooDmatrix.result          |   324 +
 .../costMatrix}/doc-pgr_fooDmatrix.test.sql        |     0
 {src/costMatrix/test => test/costMatrix}/test.conf |     0
 test/dijkstra/doc-pgr_dijkstra.result              |   590 +
 test/dijkstra/doc-pgr_dijkstra.test.sql            |   252 +
 test/dijkstra/doc-pgr_dijkstraCost.result          |    85 +
 .../dijkstra}/doc-pgr_dijkstraCost.test.sql        |     0
 test/dijkstra/doc-pgr_dijkstraVia.result           |   134 +
 test/dijkstra/doc-pgr_dijkstraVia.test.sql         |    61 +
 {src/dijkstra/test => test/dijkstra}/test.conf     |     0
 .../test => test/dijkstraTRSP}/custom.result       |     0
 .../test => test/dijkstraTRSP}/custom.test.sql     |     0
 .../dijkstraTRSP}/doc-dijkstraTRSP.result          |     0
 .../dijkstraTRSP}/doc-dijkstraTRSP.test.sql        |     0
 test/dijkstraTRSP/pgtap/custom.sql                 |   163 +
 .../pgtap/dijkstraTRSP-compare-dijkstra.sql        |     0
 .../pgtap/dijkstraTRSP-innerQuery.sql              |     0
 .../pgtap/dijkstraTRSP-typesCheck.sql              |     0
 .../pgtap/empty_set_NO_default_strict.sql          |     0
 .../pgtap/empty_set_default_strict.sql             |     0
 .../test => test/dijkstraTRSP}/pgtap_design.result |     0
 .../dijkstraTRSP}/pgtap_design.test.sql            |     0
 .../test => test/dijkstraTRSP}/test.conf           |     0
 .../driving_distance}/dijksraDD-issue729.result    |     0
 .../driving_distance}/dijksraDD-issue729.test.sql  |     0
 .../doc-pgr_drivingDistance.result                 |   312 +
 .../doc-pgr_drivingDistance.test.sql               |     0
 .../test => test/driving_distance}/test.conf       |     0
 .../test => test/internalQueryTests}/XYedge.result |     0
 .../internalQueryTests}/XYedge.test.sql            |     0
 .../pgtap/matrixRows_types_check.sql               |    94 +
 .../pgtap/testXYedges_types_check.sql              |   133 +
 .../test => test/internalQueryTests}/test.conf     |     0
 .../internalQueryTests}/testCHedges.result         |     0
 .../internalQueryTests}/testCHedges.test.sql       |     0
 test/ksp/doc-ksp.result                            |   274 +
 test/ksp/doc-ksp.test.sql                          |    87 +
 {src/ksp/test => test/ksp}/test.conf               |     0
 test/label_graph/doc-pgr_labelGraph.result         |    24 +
 .../label_graph}/doc-pgr_labelGraph.test.sql       |     0
 .../label_graph}/pgrouting_labelgraph.data         |     0
 .../label_graph}/pgrouting_labelgraph.result       |     0
 test/label_graph/pgrouting_labelgraph.test.sql     |    72 +
 test/label_graph/test.conf                         |    21 +
 test/lineGraph/doc-pgr_lineGraph.result            |    83 +
 .../lineGraph}/doc-pgr_lineGraph.test.sql          |     0
 test/lineGraph/doc-pgr_lineGraphFull.result        |   208 +
 test/lineGraph/doc-pgr_lineGraphFull.test.sql      |   146 +
 test/lineGraph/pgtap_design.result                 |    58 +
 test/lineGraph/pgtap_design.test.sql               |    26 +
 test/lineGraph/pgtap_design_lineGraphFull.result   |   174 +
 test/lineGraph/pgtap_design_lineGraphFull.test.sql |    61 +
 test/lineGraph/proofOfConcept1.result              |   597 +
 test/lineGraph/proofOfConcept1.test.sql            |   115 +
 test/lineGraph/proofOfConcept2.result              |   147 +
 test/lineGraph/proofOfConcept2.test.sql            |   383 +
 test/lineGraph/test.conf                           |    23 +
 test/max_flow/doc-pgr_boykovKolmogorov.result      |    90 +
 .../max_flow}/doc-pgr_boykovKolmogorov.test.sql    |     0
 test/max_flow/doc-pgr_edgeDisjointPaths.result     |   128 +
 .../max_flow}/doc-pgr_edgeDisjointPaths.test.sql   |     0
 test/max_flow/doc-pgr_edmondsKarp.result           |    90 +
 .../max_flow}/doc-pgr_edmondsKarp.test.sql         |     0
 test/max_flow/doc-pgr_maxCardinalityMatch.result   |    40 +
 .../max_flow}/doc-pgr_maxCardinalityMatch.test.sql |     0
 test/max_flow/doc-pgr_maxFlow.result               |    67 +
 .../max_flow}/doc-pgr_maxFlow.test.sql             |     0
 test/max_flow/doc-pgr_pushRelabel.result           |    96 +
 .../max_flow}/doc-pgr_pushRelabel.test.sql         |     0
 {src/max_flow/test => test/max_flow}/test.conf     |     0
 .../bencharkTest/README.vrpdptw-testdata           |     0
 .../pickDeliver}/bencharkTest/lc101_test.sql       |     0
 .../bencharkTest/vrpdptw-testdata.sql.gz           |   Bin
 test/pickDeliver/book_from_query.result            |   186 +
 test/pickDeliver/book_from_query.test.sql          |   115 +
 .../test => test/pickDeliver}/book_vrp.result      |     0
 test/pickDeliver/book_vrp.test.sql                 |   664 +
 test/pickDeliver/design_pgtap.result               |    23 +
 .../pickDeliver}/design_pgtap.test.sql             |     0
 .../pickDeliver}/differentVechiles-cygwin.result   |     0
 test/pickDeliver/differentVechiles-cygwin.test.sql |    37 +
 test/pickDeliver/differentVechiles.result          |   230 +
 test/pickDeliver/differentVechiles.test.sql        |    34 +
 test/pickDeliver/doc-pickDeliver.result            |    61 +
 test/pickDeliver/doc-pickDeliver.test.sql          |    28 +
 test/pickDeliver/doc-pickDeliverEuclidean.result   |    27 +
 .../pickDeliver}/doc-pickDeliverEuclidean.test.sql |     0
 .../pickDeliver}/jet_customers-cygwin.result       |     0
 .../pickDeliver}/jet_customers-cygwin.test.sql     |     0
 test/pickDeliver/jet_customers.result              |   122 +
 .../pickDeliver}/jet_customers.test.sql            |     0
 test/pickDeliver/jet_customers1.result             |   291 +
 test/pickDeliver/jet_customers1.test.sql           |   120 +
 .../notTestingYet/pickDeliver-innerquery.sql       |   391 +
 .../notTestingYet/pickDeliver-types_check.sql      |     0
 .../notTestingYet/pickDeliver_types_check.sql      |     0
 test/pickDeliver/past_example.result               |   266 +
 .../pickDeliver}/past_example.test.sql             |     0
 .../test => test/pickDeliver}/pickDeliver.result   |     0
 .../test => test/pickDeliver}/pickDeliver.test.sql |     0
 .../test => test/pickDeliver}/test.conf            |     0
 test/topology/analyzeOneway-any.result             |    25 +
 .../topology}/analyzeOneway-any.test.sql           |     0
 test/topology/createVertTab-any.result             |   306 +
 test/topology/createVertTab-any.test.sql           |    38 +
 test/topology/doc-pgr_analyzeGraph.result          |   536 +
 .../topology}/doc-pgr_analyzeGraph.test.sql        |     0
 test/topology/doc-pgr_createTopology.result        |   262 +
 .../topology}/doc-pgr_createTopology.test.sql      |     0
 test/topology/issue900.result                      |    25 +
 .../test => test/topology}/issue900.test.sql       |     0
 test/topology/nodeNetwork-any.result               |   204 +
 test/topology/nodeNetwork-any.test.sql             |    24 +
 test/topology/test.conf                            |    30 +
 test/trsp/doc-trsp.result                          |   115 +
 test/trsp/doc-trsp.test.sql                        |    54 +
 test/trsp/four_edges.result                        |   224 +
 test/trsp/four_edges.test.sql                      |   146 +
 test/trsp/four_edges_v2-0.result                   |   103 +
 test/trsp/four_edges_v2-0.test.sql                 |    69 +
 test/trsp/issue693.result                          |    28 +
 test/trsp/issue693.test.sql                        |    14 +
 test/trsp/issue704.result                          |    95 +
 test/trsp/issue704.test.sql                        |    67 +
 test/trsp/issue717.result                          |   359 +
 {src/trsp/test => test/trsp}/issue717.test.sql     |     0
 test/trsp/test.conf                                |    29 +
 test/trsp/trsp-any-02.result                       |    42 +
 {src/trsp/test => test/trsp}/trsp-any-02.test.sql  |     0
 test/trsp/trsp-renumber.result                     |    86 +
 test/trsp/trsp-renumber.test.sql                   |    46 +
 test/trsp/trsp_notes_v2.6.0.result                 |  1005 +
 test/trsp/trsp_notes_v2.6.0.test.sql               |   762 +
 test/trsp/trsp_vias-any-04.result                  |   141 +
 .../test => test/trsp}/trsp_vias-any-04.test.sql   |     0
 .../tsp}/development/gr9882-tsp.test.sql           |     0
 .../test => test/tsp}/development/qa194-tsp.result |     0
 test/tsp/development/qa194-tsp.test.sql            |   272 +
 test/tsp/development/wi29-tsp.result               |   226 +
 .../tsp}/development/wi29-tsp.test.sql             |     0
 {src/tsp/test => test/tsp}/doc-pgr_TSP-mac.result  |     0
 .../tsp/test => test/tsp}/doc-pgr_TSP-mac.test.sql |     0
 test/tsp/doc-pgr_TSP-windows.result                |    77 +
 .../test => test/tsp}/doc-pgr_TSP-windows.test.sql |     0
 test/tsp/doc-pgr_TSP.result                        |    77 +
 {src/tsp/test => test/tsp}/doc-pgr_TSP.test.sql    |     0
 test/tsp/doc-pgr_eucledianTSP.result               |    94 +
 .../tsp}/doc-pgr_eucledianTSP.test.sql             |     0
 {src/tsp/test => test/tsp}/doc-tsp-mac.result      |     0
 {src/tsp/test => test/tsp}/doc-tsp-mac.test.sql    |     0
 {src/tsp/test => test/tsp}/doc-tsp-windows.result  |     0
 .../tsp/test => test/tsp}/doc-tsp-windows.test.sql |     0
 {src/tsp/test => test/tsp}/performance/dj38.sql    |     0
 {src/tsp/test => test/tsp}/performance/qa194.sql   |     0
 {src/tsp/test => test/tsp}/performance/wi29.sql    |     0
 {src/tsp/test => test/tsp}/test.conf               |     0
 test/vrp_basic/doc-pgr_vrpOneDepot.result          |   256 +
 .../vrp_basic}/doc-pgr_vrpOneDepot.test.sql        |     0
 test/vrp_basic/oneDepotWrapper.result              |   256 +
 .../vrp_basic}/oneDepotWrapper.test.sql            |     0
 .../test => test/vrp_basic}/solomon100-optimal.png |   Bin
 test/vrp_basic/test.conf                           |    19 +
 test/vrppdtw/doc-gsoc_vrppdtw.result               |    79 +
 .../vrppdtw}/doc-gsoc_vrppdtw.test.sql             |     0
 test/vrppdtw/test.conf                             |    20 +
 test/withPoints/doc-pgr_withPoints.result          |   208 +
 .../withPoints}/doc-pgr_withPoints.test.sql        |     0
 test/withPoints/doc-pgr_withPointsCost.result      |   105 +
 .../withPoints}/doc-pgr_withPointsCost.test.sql    |     0
 test/withPoints/doc-pgr_withPointsDD.result        |    96 +
 .../withPoints}/doc-pgr_withPointsDD.test.sql      |     0
 .../doc-pgr_withPointsKSP-cygwin.result            |     0
 .../doc-pgr_withPointsKSP-cygwin.test.sql          |     0
 test/withPoints/doc-pgr_withPointsKSP.result       |   119 +
 .../withPoints}/doc-pgr_withPointsKSP.test.sql     |     0
 .../withPoints}/doc-pgr_withPointsVia.result       |     0
 .../withPoints}/doc-pgr_withPointsVia.test.sql     |     0
 {src/withPoints/test => test/withPoints}/test.conf |     0
 tools/NOTES.txt                                    |     4 +-
 tools/clean/clean.sh                               |    66 -
 tools/developer/run.sh                             |   179 +-
 tools/developer/taptest.sh                         |    27 +
 tools/developer/translate.sh                       |     2 +-
 tools/git-tools/pre-commit                         |     9 +-
 tools/licences/add-licenses                        |     8 +-
 tools/performanceQueries/allPairs-performance.sql  |    22 +-
 tools/publish-doc.sh                               |     4 +-
 tools/release-scripts/check-release.sh             |    59 +-
 tools/release-scripts/compile-release.sh           |    34 +-
 tools/scripts/code_checker.sh                      |    15 +-
 tools/scripts/fix_typos.sh                         |     4 +-
 tools/scripts/typos_whitelist.txt                  |     4 +-
 .../sql-update-scripts/pgrouting--2.0.0--2.5.2.sql |  6575 ------
 .../sql-update-scripts/pgrouting--2.0.1--2.5.2.sql |  6575 ------
 .../sql-update-scripts/pgrouting--2.1.0--2.5.2.sql |  6673 ------
 .../sql-update-scripts/pgrouting--2.2.0--2.5.2.sql |  6527 ------
 .../sql-update-scripts/pgrouting--2.2.1--2.5.2.sql |  6527 ------
 .../sql-update-scripts/pgrouting--2.2.2--2.5.2.sql |  6527 ------
 .../sql-update-scripts/pgrouting--2.2.3--2.5.2.sql |  6527 ------
 .../sql-update-scripts/pgrouting--2.2.4--2.5.2.sql |  6527 ------
 .../sql-update-scripts/pgrouting--2.3.0--2.5.2.sql |  6561 ------
 .../sql-update-scripts/pgrouting--2.3.1--2.5.2.sql |  6561 ------
 .../sql-update-scripts/pgrouting--2.3.2--2.5.2.sql |  6561 ------
 .../sql-update-scripts/pgrouting--2.4.0--2.5.2.sql |  6522 ------
 .../sql-update-scripts/pgrouting--2.4.1--2.5.2.sql |  6522 ------
 .../sql-update-scripts/pgrouting--2.4.2--2.5.2.sql |  6522 ------
 .../sql-update-scripts/pgrouting--2.5.0--2.5.2.sql |  6423 ------
 tools/sql-update-scripts/pgrouting--2.5.2.sql      |  6423 ------
 tools/template/create.sh                           |    24 +-
 tools/template/doc/doc-pgr_function1.queries       |     4 +-
 tools/template/sql/function1.sql                   |     2 +-
 tools/template/src/function1.c                     |     2 +-
 tools/template/src/function1_driver.cpp            |     2 +-
 tools/template/src/function1_driver.h              |     2 +-
 tools/template/test/doc-function1.result           |     4 +-
 tools/testers/algorithm-tester.pl                  |    67 +-
 tools/testers/contraction_data.sql                 |    30 +-
 tools/testers/innerQuery.sql                       |    24 +-
 tools/testers/innerQuery_old.sql                   |    12 +-
 tools/testers/pg_prove_tests.sh                    |     3 +-
 tools/testers/pickDeliver_pgtap_data.sql           |   146 +-
 tools/testers/update-tester.sh                     |    24 +-
 tools/testers/vrpOneDepot.data                     |     4 +-
 tools/testers/vrppdtw_data.sql                     |     2 +-
 tools/transifex/build_translations.sh              |     4 +-
 tools/transifex/create_translations.sh             |     4 +-
 tools/transifex/download_translation.sh            |     2 +-
 tools/transifex/update_transifex.sh                |     6 +-
 tools/travis/check-extensions.sh                   |    14 +-
 tools/travis/install-doxygen.sh                    |    20 +-
 tools/travis/install-postgres.sh                   |    38 +-
 tools/travis/pgrouting_build.sh                    |    15 +-
 tools/travis/pgrouting_test.sh                     |    24 +-
 tools/travis/test-documentation.sh                 |     2 +-
 tools/windows/boost-w32.patch                      |     4 +-
 tools/windows/gaul.patch                           |     8 +-
 tools/winnie/build_pgrouting.sh                    |     4 +-
 tools/winnie/package_pgrouting.sh                  |     8 +-
 924 files changed, 41177 insertions(+), 212052 deletions(-)

diff --git a/.gitignore b/.gitignore
index 8135659..6b1847f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,7 +2,9 @@
 build
 fix_typos
 code_linter
+
 .DS_Store
 .vagrant
 .directory
 notUsed
+*.swp
diff --git a/.travis.yml b/.travis.yml
index 9228691..e81bed5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -21,13 +21,22 @@ env: POSTGRESQL_VERSION=9.6   PG_USER=postgres
 matrix:
   include:
     - os: linux
-      env: POSTGRESQL_VERSION=9.6   PG_USER=postgres
+      env: POSTGRESQL_VERSION=10   PG_USER=postgres DOCUMENTATION=OFF
 
+    - os: linux
+      env: POSTGRESQL_VERSION=9.6   PG_USER=postgres DOCUMENTATION=OFF
+
+    - os: linux
+      env: POSTGRESQL_VERSION=9.5   PG_USER=postgres DOCUMENTATION=OFF
 
     - os: linux
-      env: POSTGRESQL_VERSION=9.5   PG_USER=postgres
+      env: POSTGRESQL_VERSION=9.4   PG_USER=postgres DOCUMENTATION=OFF
 
+    - os: linux
+      env: POSTGRESQL_VERSION=9.3   PG_USER=postgres DOCUMENTATION=OFF
 
+    - os: linux
+      env: POSTGRESQL_VERSION=9.6   PG_USER=postgres DOCUMENTATION=ON
 
 
 # executed. So things have to be tested oe by one.
@@ -55,15 +64,14 @@ addons:
 
 install:
   - pip install sphinx
+  - sudo ./tools/travis/install-doxygen.sh
   - sudo ./tools/travis/install-postgres.sh $POSTGRESQL_VERSION $PG_USER
-  - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ./tools/travis/install-doxygen.sh ; fi
 
 before_script:
 
-  # Add our chosen PG version to the path
   - psql -U postgres -c "create extension postgis"
-  - export PATH=/usr/lib/postgresql/$POSTGRESQL_VERSION/bin:$PATH
-
+  -  export PATH=/usr/lib/postgresql/$POSTGRESQL_VERSION/bin:$PATH
+    
   # initialize databases
   - createdb  -U $PG_USER ___pgr___test___
   - createdb  -U $PG_USER pgr_test__db__test
@@ -73,10 +81,10 @@ before_script:
 script:
   - ./tools/travis/pgrouting_build.sh $POSTGRESQL_VERSION $POSTGIS_VERSION
   # tests as part of script so if a test fails the build fails
-  - ./tools/testers/pg_prove_tests.sh $PG_USER 5432 DEBUG
+  - if [ "$DOCUMENTATION" == "OFF" ]; then ./tools/testers/pg_prove_tests.sh $PG_USER 5432 DEBUG ; fi
 
 #after_script:
-  - ./tools/travis/pgrouting_test.sh $POSTGRESQL_VERSION $PG_USER -ignorenotice
+  - ./tools/travis/pgrouting_test.sh $POSTGRESQL_VERSION $PG_USER
 
 #after_success:
   # blank
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5d1a9f9..b606496 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -113,7 +113,7 @@ endif()
 set(DOXYGEN_MINIMUM_VERSION "1.7")
 set(SPHINX_MINIMUM_VERSION "1.1")
 set(POSTGRESQL_MINIMUM_VERSION "9.2.0")
-set(BOOST_MINIMUM_VERSION "1.46")
+set(BOOST_MINIMUM_VERSION "1.53")
 set(CGAL_CXX_MINIMUM_VERSION "4.4")
 set(POSTGIS_MINIMUM_VERSION "2.0.0")
 set(GNU_CXX_MINIMUM_VERSION "4.6")
@@ -181,8 +181,8 @@ endif()
 #-----------------------------------------------------------------------------
 
 set(PGROUTING_VERSION_MAJOR "2")
-set(PGROUTING_VERSION_MINOR "5")
-set(PGROUTING_VERSION_PATCH "3")
+set(PGROUTING_VERSION_MINOR "6")
+set(PGROUTING_VERSION_PATCH "0")
 set(PGROUTING_VERSION_DEV "")
 
 set(PGROUTING_SHORT_VERSION "${PGROUTING_VERSION_MAJOR}.${PGROUTING_VERSION_MINOR}")
@@ -361,8 +361,6 @@ include_directories(${CGAL_INCLUDE_DIR})
 #---------------------------------------------
 
 set(PGROUTING_INCLUDE_DIRECTORIES
-    ${PGROUTING_SOURCE_DIR}/src/common/src
-    ${PGROUTING_SOURCE_DIR}/src/dijkstra/src
     ${PGROUTING_SOURCE_DIR}/include
     )
 
@@ -522,7 +520,7 @@ endif()
 #-------------------
 
 foreach (subdir ${PgRouting_SOURCE_NAMES})
-    add_subdirectory("${PGROUTING_SOURCE_DIR}/src/${subdir}/src")
+    add_subdirectory("${PGROUTING_SOURCE_DIR}/src/${subdir}")
 endforeach()
 
 
@@ -555,7 +553,6 @@ endforeach()
 # PGROUTING Library names
 #-----------------------------------------------------------------------------
 
-message("Building the library names")
 
 #----------------------
 # PGROUTING installation files names have the following name
diff --git a/NEWS b/NEWS
index 13d7c86..2f98adb 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,38 @@
 
+pgRouting 2.6.0 Release Notes
+-------------------------------------------------------------------------------
+
+To see the issues closed by this release see the [Git closed milestone for 2.6.0 ](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%202.6.0%22%20) on Github.
+
+
+*New fexperimental functions*
+
+*  pgr_lineGraphFull
+
+*Bug fixes*
+
+* Fix pgr_trsp(text,integer,double precision,integer,double precision,boolean,boolean[,text])
+
+  * without restrictions
+
+    * calls pgr_dijkstra when both end points have a fraction IN (0,1)
+    * calls pgr_withPoints when at least one fraction NOT IN (0,1)
+
+  * with restrictions
+
+    * calls original trsp code
+
+*Internal code*
+
+* Cleaned the internal code of trsp(text,integer,integer,boolean,boolean [, text])
+
+  * Removed the use of pointers
+  * Internal code can accept BIGINT
+
+* Cleaned the internal code of withPoints
+
+
+
 pgRouting 2.5.3 Release Notes
 -------------------------------------------------------------------------------
 
@@ -72,6 +106,7 @@ To see the issues closed by this release see the [Git closed issues for 2.5.0 ](
 * pgr_bdDijkstraCost(many to many)
 * pgr_bdDijkstraCostMatrix
 * pgr_lineGraph
+* pgr_lineGraphFull
 * pgr_connectedComponents
 * pgr_strongComponents
 * pgr_biconnectedComponents
diff --git a/README.md b/README.md
index 8b9dc22..dd2cdd8 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@ https://github.com/pgRouting/pgrouting/releases
 
 ## LINKS
 
-* http://pgrouting.org/ 
+* http://pgrouting.org/
 * http://docs.pgrouting.org/
 * https://github.com/pgRouting/pgrouting
 
@@ -100,12 +100,12 @@ Family of functions include:
 
 Building reqirements
 --------------------
-* Perl 
+* Perl
 * C and C++ compilers
   * GNU >= 4.6
   * MSVC >= 18.0
 * Postgresql >= 9.2
-* The Boost Graph Library (BGL) >= 1.46
+* The Boost Graph Library (BGL) >= 1.53
 * CMake >= 3.2
 * CGAL >= 4.4
 * Sphinx >= 1.2
@@ -133,7 +133,7 @@ For MinGW on Windows
 Also pre-built Windows binaries can be downloaded from https://postgis.net/windows_downloads
 
 For Linux
-	
+
 	mkdir build
 	cd build
 	cmake  ..
diff --git a/VERSION b/VERSION
index ce6657a..cb15f72 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-6286-9a0d404 master
+6756-a6226c4 release/2.6
diff --git a/appveyor.yml b/appveyor.yml
index db2c59f..d38daf9 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -5,7 +5,7 @@
 # Main configuration
 # ------------------------------------------------------------------------------
 
-version: 2.5.{build}
+version: 2.6.{build}
 
 image: Visual Studio 2013
 configuration: Release
@@ -19,14 +19,15 @@ cache:
   - c:\build\local\msvc120\x64 -> appveyor
 
 services:
-  - postgresql94
+  - postgresql96
 
 environment:
   CONFIGURATION: Release
   MSVC_VER: 12.0
   BUILD_ROOT_DIR: c:\build
-  PGIS_VERSION: 2.3.3
-  PG_VER: 9.4
+  PGIS_VERSION: 2.4
+  PG_VER: 9.6
+
 
 init:
   - git config --global core.autocrlf false
diff --git a/ci/appveyor/install-CGAL.bat b/ci/appveyor/install-CGAL.bat
index b3e45a0..ae6d918 100644
--- a/ci/appveyor/install-CGAL.bat
+++ b/ci/appveyor/install-CGAL.bat
@@ -167,7 +167,7 @@ if defined CGAL_LOCAL_DEBUG (
 
     echo GMP_SRC_DIR %GMP_SRC_DIR%
     dir %GMP_SRC_DIR%
-    
+
     dir C:/build/local/msvc120/x64/include/CGAL
 )
 :_ExitCGAL
diff --git a/ci/appveyor/install-boost.bat b/ci/appveyor/install-boost.bat
index cdfae85..7522cd3 100644
--- a/ci/appveyor/install-boost.bat
+++ b/ci/appveyor/install-boost.bat
@@ -10,7 +10,7 @@ if not defined MSVC_VER goto _error
 if not defined ARCH goto _error
 if not defined BUILD_ROOT_DIR goto _error
 if not defined CONFIGURATION goto _error
-    
+
 if defined BOOST_LOCAL_DEBUG (
     echo "install-boost.bat"
     echo received environment
diff --git a/cmake/FindGAUL.cmake b/cmake/FindGAUL.cmake
index d3ef423..1f92598 100644
--- a/cmake/FindGAUL.cmake
+++ b/cmake/FindGAUL.cmake
@@ -49,7 +49,7 @@ message(STATUS "GAUL_LIBRARIES=${GAUL_LIBRARIES}")
      )
 
 message(STATUS "GAUL_UTIL_LIBRARIES=${GAUL_UTIL_LIBRARIES}")
-      
+
   if(GAUL_INCLUDE_DIR AND GAUL_LIBRARIES AND GAUL_UTIL_LIBRARIES)
     set(GAUL_FOUND TRUE)
     message(STATUS "Found GAUL: ${GAUL_LIBRARIES}, ${GAUL_UTIL_LIBRARIES}")
diff --git a/cmake/FindPostGIS.cmake b/cmake/FindPostGIS.cmake
index c5ab85c..2973d7a 100644
--- a/cmake/FindPostGIS.cmake
+++ b/cmake/FindPostGIS.cmake
@@ -1,5 +1,5 @@
 # (c) 2015  pgRouting colaborators
-# 
+#
 # Finds the most recent postGIS for a particular postgreSQL
 # We need this for the tests
 #
diff --git a/cmake/FindPostgreSQL.cmake b/cmake/FindPostgreSQL.cmake
index 4180559..7c7d543 100644
--- a/cmake/FindPostgreSQL.cmake
+++ b/cmake/FindPostgreSQL.cmake
@@ -16,21 +16,21 @@
 
 # A check condition to see if those variables are set
 
-SET(POSTGRESQL_BIN "" CACHE STRING "non-standard path to the postgresql program executables")    
+SET(POSTGRESQL_BIN "" CACHE STRING "non-standard path to the postgresql program executables")
 
 if(POSTGRESQL_INCLUDE_DIR AND POSTGRESQL_LIBRARIES AND POSTGRESQL_EXECUTABLE AND POSTGRESQL_VERSION_STRING)
     set(POSTGRESQL_FOUND TRUE)
 else(POSTGRESQL_INCLUDE_DIR AND POSTGRESQL_LIBRARIES AND POSTGRESQL_EXECUTABLE)
 
     if(NOT "${POSTGRESQL_BIN}" STREQUAL "")
-        # Checking POSTGRESQL_PG_CONFIG 
+        # Checking POSTGRESQL_PG_CONFIG
         find_program(POSTGRESQL_PG_CONFIG NAMES pg_config
             PATHS
             ${POSTGRESQL_BIN}
             NO_DEFAULT_PATH
             )
     else(NOT "${POSTGRESQL_BIN}" STREQUAL "")
-        # Checking POSTGRESQL_PG_CONFIG 
+        # Checking POSTGRESQL_PG_CONFIG
         find_program(POSTGRESQL_PG_CONFIG NAMES pg_config
             PATHS
             /usr/lib/postgresql/*/bin/
@@ -47,7 +47,7 @@ else(POSTGRESQL_INCLUDE_DIR AND POSTGRESQL_LIBRARIES AND POSTGRESQL_EXECUTABLE)
     endif(POSTGRESQL_PG_CONFIG)
 
 
-    # Checking POSTGRESQL_EXECUTABLE in all the dir (*) - implies that 
+    # Checking POSTGRESQL_EXECUTABLE in all the dir (*) - implies that
     find_program(POSTGRESQL_EXECUTABLE NAMES postgres
         PATHS
         ${T_POSTGRESQL_BIN}
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 569dd0b..a71b9cc 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -1,8 +1,8 @@
-# 
+#
 # Find Sphinx
 # Find Sphinx executable to build documentation
 # Source: http://ericscottbarr.com/blog/2012/03/sphinx-and-cmake-beautiful-documentation-for-c-projects/
-# 
+#
 # Daniel Kastl 03/2013
 #
 
@@ -40,7 +40,7 @@ option(EPUB
 option(DUMMY
     "Set ON|OFF (default=OFF) for debugging purposes" OFF)
 
-if (LOCALE) 
+if (LOCALE)
     set(WITH_DOC ON)
 endif()
 
@@ -82,11 +82,11 @@ set(PgRouting_ENGLISH "en")
 # Language options
 #---------------------------------------------
 option(WITH_ALL_LANG
-    "Set ON|OFF (default=OFF) to build all the supported languages: 
+    "Set ON|OFF (default=OFF) to build all the supported languages:
     Main Language will always be built:
     ${PgRouting_ENGLISH}
     Optional languages:
-    ${PgRouting_SUPPORTED_LANGUAGES} 
+    ${PgRouting_SUPPORTED_LANGUAGES}
 
     When OFF and want to build specific optional language, use the language code in capital letters:
     -D ES=ON
@@ -224,11 +224,11 @@ set(ENV{SPHINXINTL_LANGUAGE} ${SPHINXINTL_LANGUAGE})
 
 if (LOCALE)
     add_custom_target(locale
-        COMMAND ${SPHINX_EXECUTABLE} 
+        COMMAND ${SPHINX_EXECUTABLE}
         -b gettext
-        -c "${PGR_DOCUMENTATION_SOURCE_DIR}" 
-        "${PGR_DOCUMENTATION_SOURCE_DIR}" 
-        "${CMAKE_SOURCE_DIR}/locale/pot" 
+        -c "${PGR_DOCUMENTATION_SOURCE_DIR}"
+        "${PGR_DOCUMENTATION_SOURCE_DIR}"
+        "${CMAKE_SOURCE_DIR}/locale/pot"
 
     COMMAND sphinx-intl update -p ${CMAKE_SOURCE_DIR}/locale/pot -d ${CMAKE_SOURCE_DIR}/locale --language=${SPHINXINTL_LANGUAGE}
 
@@ -239,7 +239,7 @@ endif()
 
 
 # The doc target will build all documentation targets.
-add_custom_target(doc 
+add_custom_target(doc
     COMMENT "Building documentation with Sphinx")
 
 
@@ -254,21 +254,21 @@ foreach (target ${PgRouting_DOC_TARGETS})
     foreach (lang ${PgRouting_BUILD_LANGUAGES})
         add_custom_target(
             "${target}-${lang}"
-            COMMAND ${SPHINX_EXECUTABLE} 
-            #-q  # Enable for quiet mode 
+            COMMAND ${SPHINX_EXECUTABLE}
+            #-q  # Enable for quiet mode
             #-Q  # Enable for even more quiet mode
             -v   # increase verbosity
             #-E  # don't use a saved environment, always read all file
             #-a  # write all files; default is to only write new and changed files
             -b ${target}
             -D language='${lang}'
-            -c "${PGR_DOCUMENTATION_SOURCE_DIR}" 
-            "${PGR_DOCUMENTATION_SOURCE_DIR}" 
+            -c "${PGR_DOCUMENTATION_SOURCE_DIR}"
+            "${PGR_DOCUMENTATION_SOURCE_DIR}"
             "${PGR_DOCUMENTATION_BUILD_DIR}/${target}/${lang}"
 
             COMMENT "Generating ${target}/${lang} documentation ..."
-            SOURCES ${PgRouting_DOC_FILES}  ${PgRouting_IMG_FILES} 
-            DEPENDS ${PgRouting_DOC_FILES}  ${PgRouting_IMG_FILES} 
+            SOURCES ${PgRouting_DOC_FILES}  ${PgRouting_IMG_FILES}
+            DEPENDS ${PgRouting_DOC_FILES}  ${PgRouting_IMG_FILES}
             )
         add_dependencies(${target} "${target}-${lang}")
 
diff --git a/doc/bdAstar/bdAstar-family.rst b/doc/bdAstar/bdAstar-family.rst
index feae1b6..55ac0a3 100644
--- a/doc/bdAstar/bdAstar-family.rst
+++ b/doc/bdAstar/bdAstar-family.rst
@@ -57,7 +57,7 @@ The main Characteristics are:
 - Running time (worse case scenario): :math:`O((E + V) * \log V)`
 - For large graphs where there is a path bewtween the starting vertex and ending vertex:
 
-  - It is expected to terminate faster than pgr_astar 
+  - It is expected to terminate faster than pgr_astar
 
 Description of the Signatures
 --------------------------------
diff --git a/doc/bdAstar/pgr_bdAstar.rst b/doc/bdAstar/pgr_bdAstar.rst
index 6ba3121..f4400c5 100644
--- a/doc/bdAstar/pgr_bdAstar.rst
+++ b/doc/bdAstar/pgr_bdAstar.rst
@@ -1,4 +1,4 @@
-.. 
+..
    ****************************************************************************
     pgRouting Manual
     Copyright(c) pgRouting Contributors
@@ -131,7 +131,7 @@ pgr_bdAstar One to many
     pgr_bdAstar(edges_sql, start_vid, end_vids [, directed, heuristic, factor, epsilon])
     RETURNS SET OF (seq, path_seq, end_vid, node, edge, cost, agg_cost) or EMPTY SET
 
-This usage finds the shortest path from the ``start_vid`` to each ``end_vid`` in ``end_vids`` allowing the user to choose 
+This usage finds the shortest path from the ``start_vid`` to each ``end_vid`` in ``end_vids`` allowing the user to choose
     * if the graph is **directed** or **undirected**
     * and/or **heuristic**,
     * and/or **factor**
@@ -156,7 +156,7 @@ pgr_bdAstar Many to One
     pgr_bdAstar(edges_sql, start_vids, end_vid [, directed, heuristic, factor, epsilon])
     RETURNS SET OF (seq, path_seq, start_vid, node, edge, cost, agg_cost) or EMPTY SET
 
-This usage finds the shortest path from each ``start_vid`` in ``start_vids`` to the ``end_vid`` allowing the user to choose 
+This usage finds the shortest path from each ``start_vid`` in ``start_vids`` to the ``end_vid`` allowing the user to choose
     * if the graph is **directed** or **undirected**
     * and/or **heuristic**,
     * and/or **factor**
@@ -180,7 +180,7 @@ pgr_bdAstar Many to Many
     pgr_bdAstar(edges_sql, start_vids, end_vids [, directed, heuristic, factor, epsilon])
     RETURNS SET OF (seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost) or EMPTY SET
 
-This usage finds the shortest path from each ``start_vid`` in ``start_vids`` to each ``end_vid`` in ``end_vids`` allowing the user to choose 
+This usage finds the shortest path from each ``start_vid`` in ``start_vids`` to each ``end_vid`` in ``end_vids`` allowing the user to choose
     * if the graph is **directed** or **undirected**
     * and/or **heuristic**,
     * and/or **factor**
diff --git a/doc/bdAstar/pgr_bdAstarCost.rst b/doc/bdAstar/pgr_bdAstarCost.rst
index 4011d5e..4a69e6a 100644
--- a/doc/bdAstar/pgr_bdAstarCost.rst
+++ b/doc/bdAstar/pgr_bdAstarCost.rst
@@ -1,4 +1,4 @@
-.. 
+..
    ****************************************************************************
     pgRouting Manual
     Copyright(c) pgRouting Contributors
@@ -93,7 +93,7 @@ pgr_bdAstarCost One to One
     pgr_bdAstarCost(edges_sql, start_vid, end_vid [, directed, heuristic, factor, epsilon])
     RETURNS SET OF (start_vid, end_vid, agg_cost)
 
-This usage finds the shortest path from the ``start_vid`` to each ``end_vid`` in ``end_vids`` allowing the user to choose 
+This usage finds the shortest path from the ``start_vid`` to each ``end_vid`` in ``end_vids`` allowing the user to choose
     * if the graph is **directed** or **undirected**
     * **heuristic**,
     * and/or **factor**
@@ -120,7 +120,7 @@ pgr_bdAstarCost One to many
     pgr_bdAstarCost(edges_sql, start_vid, end_vids [, directed, heuristic, factor, epsilon])
     RETURNS SET OF (start_vid, end_vid, agg_cost)
 
-This usage finds the shortest path from the ``start_vid`` to each ``end_vid`` in ``end_vids`` allowing the user to choose 
+This usage finds the shortest path from the ``start_vid`` to each ``end_vid`` in ``end_vids`` allowing the user to choose
     * if the graph is **directed** or **undirected**
     * and/or **heuristic**,
     * and/or **factor**
@@ -145,7 +145,7 @@ pgr_bdAstarCost Many to One
     pgr_bdAstarCost(edges_sql, start_vids, end_vid [, directed, heuristic, factor, epsilon])
     RETURNS SET OF (start_vid, end_vid, agg_cost)
 
-This usage finds the shortest path from each ``start_vid`` in ``start_vids`` to the ``end_vid`` allowing the user to choose 
+This usage finds the shortest path from each ``start_vid`` in ``start_vids`` to the ``end_vid`` allowing the user to choose
     * if the graph is **directed** or **undirected**
     * and/or **heuristic**,
     * and/or **factor**
@@ -169,7 +169,7 @@ pgr_bdAstarCost Many to Many
     pgr_bdAstarCost(edges_sql, start_vids, end_vids [, directed, heuristic, factor, epsilon])
     RETURNS SET OF (start_vid, end_vid, agg_cost)
 
-This usage finds the shortest path from each ``start_vid`` in ``start_vids`` to each ``end_vid`` in ``end_vids`` allowing the user to choose 
+This usage finds the shortest path from each ``start_vid`` in ``start_vids`` to each ``end_vid`` in ``end_vids`` allowing the user to choose
     * if the graph is **directed** or **undirected**
     * and/or **heuristic**,
     * and/or **factor**
diff --git a/doc/bdDijkstra/bdDijkstra-family.rst b/doc/bdDijkstra/bdDijkstra-family.rst
index 0c83420..148c8c9 100644
--- a/doc/bdDijkstra/bdDijkstra-family.rst
+++ b/doc/bdDijkstra/bdDijkstra-family.rst
@@ -57,7 +57,7 @@ The main Characteristics are:
 - Running time (worse case scenario): :math:`O((V \log V + E))`
 - For large graphs where there is a path bewtween the starting vertex and ending vertex:
 
-  - It is expected to terminate faster than pgr_dijkstra 
+  - It is expected to terminate faster than pgr_dijkstra
 
 See Also
 -------------------------------------------------------------------------------
diff --git a/doc/common/pgr_version.rst b/doc/common/pgr_version.rst
index c0e9c7a..79b0e8d 100644
--- a/doc/common/pgr_version.rst
+++ b/doc/common/pgr_version.rst
@@ -55,25 +55,13 @@ Column        Type       Description
 Examples
 -------------------------------------------------------------------------------
 
-* Query for full version string
+* Query for the version string
 
 .. literalinclude:: doc-pgr_version.queries
    :start-after: -- q1
    :end-before: -- q2
 
 
-
-* Query for ``version`` and ``boost`` attribute
-
-.. code-block:: sql
-
-    SELECT version, boost FROM pgr_version();
-
-      version  | boost
-    -----------+--------
-     2.2.0-dev | 1.49.0
-    (1 row)
-
 See Also
 -------------------------------------------------------------------------------
 
diff --git a/doc/components/components-family.rst b/doc/components/components-family.rst
index b544681..c5e9f6d 100644
--- a/doc/components/components-family.rst
+++ b/doc/components/components-family.rst
@@ -188,7 +188,7 @@ Example:
 
 .. rubric:: Biconnected components
 
-The biconnected components of an undirected graph are the maximal subsets of vertices such that the removal of a vertex from 
+The biconnected components of an undirected graph are the maximal subsets of vertices such that the removal of a vertex from
 particular component will not disconnect the component. Unlike connected components, vertices may belong to multiple biconnected
 components. Vertices can be present in multiple biconnected components, but each edge can only be contained in a single biconnected
 component. So, the output only has edge version.
@@ -265,9 +265,9 @@ Example:
 
 .. rubric:: Articulation Points
 
-Those vertices that belong to more than one biconnected component are called 
-articulation points or, equivalently, cut vertices. Articulation points are 
-vertices whose removal would increase the number of connected components in 
+Those vertices that belong to more than one biconnected component are called
+articulation points or, equivalently, cut vertices. Articulation points are
+vertices whose removal would increase the number of connected components in
 the graph.
 
 **Notice**: This problem defines on an undirected graph.
@@ -333,7 +333,7 @@ Example:
    :width: 210px
    :height: 325px
 
-.. rubric:: Bridges 
+.. rubric:: Bridges
 
 A bridge is an edge of an undirected graph whose deletion increases its number
 of connected components.
@@ -459,7 +459,7 @@ Column         Type       Description
 ============== ========== =================================================
 **seq**        ``INT``    Sequential value starting from **1**.
 **component**  ``BIGINT`` Component identifier. It is equal to the minimum node identifier in the component.
-**n_seq**      ``INT``    It is a sequential value starting from **1** in a component. 
+**n_seq**      ``INT``    It is a sequential value starting from **1** in a component.
 **node**       ``BIGINT`` Identifier of the vertex.
 ============== ========== =================================================
 
@@ -478,7 +478,7 @@ Column         Type       Description
 ============== ========== =================================================
 **seq**        ``INT``    Sequential value starting from **1**.
 **component**  ``BIGINT`` Component identifier. It is equal to the minimum edge identifier in the component.
-**n_seq**      ``INT``    It is a sequential value starting from **1** in a component. 
+**n_seq**      ``INT``    It is a sequential value starting from **1** in a component.
 **edge**       ``BIGINT`` Identifier of the edge.
 ============== ========== =================================================
 
diff --git a/doc/components/pgr_articulationPoints.rst b/doc/components/pgr_articulationPoints.rst
index 599d943..10ed042 100644
--- a/doc/components/pgr_articulationPoints.rst
+++ b/doc/components/pgr_articulationPoints.rst
@@ -29,9 +29,9 @@ In particular, the algorithm implemented by Boost.Graph.
 Synopsis
 -------------------------------------------------------------------------------
 
-Those vertices that belong to more than one biconnected component are called 
-articulation points or, equivalently, cut vertices. Articulation points are 
-vertices whose removal would increase the number of connected components in 
+Those vertices that belong to more than one biconnected component are called
+articulation points or, equivalently, cut vertices. Articulation points are
+vertices whose removal would increase the number of connected components in
 the graph.
 This implementation can only be used with an undirected graph.
 
@@ -59,7 +59,7 @@ Signatures
     RETURNS SET OF (seq, node)
         OR EMPTY SET
 
-The signature is for a **undirected** graph. 
+The signature is for a **undirected** graph.
 
 :Example:
 
diff --git a/doc/components/pgr_biconnectedComponents.rst b/doc/components/pgr_biconnectedComponents.rst
index fd765e8..c75f2f0 100644
--- a/doc/components/pgr_biconnectedComponents.rst
+++ b/doc/components/pgr_biconnectedComponents.rst
@@ -28,7 +28,7 @@ In particular, the algorithm implemented by Boost.Graph.
 Synopsis
 -------------------------------------------------------------------------------
 
-The biconnected components of an undirected graph are the maximal subsets of vertices such that the removal of a vertex from 
+The biconnected components of an undirected graph are the maximal subsets of vertices such that the removal of a vertex from
 particular component will not disconnect the component. Unlike connected components, vertices may belong to multiple biconnected
 components. Vertices can be present in multiple biconnected components, but each edge can only be contained in a single biconnected
 component. So, the output only has edge version.
@@ -40,7 +40,7 @@ Characteristics
 
 The main Characteristics are:
 
-  - Components are described by edges 
+  - Components are described by edges
 
   - The returned values are ordered:
 
@@ -62,7 +62,7 @@ Signatures
     RETURNS SET OF (seq, component, n_seq, edge)
         OR EMPTY SET
 
-The signature is for a **undirected** graph. 
+The signature is for a **undirected** graph.
 
 :Example:
 
diff --git a/doc/components/pgr_bridges.rst b/doc/components/pgr_bridges.rst
index 078e2ee..48ceb31 100644
--- a/doc/components/pgr_bridges.rst
+++ b/doc/components/pgr_bridges.rst
@@ -56,7 +56,7 @@ Signatures
     RETURNS SET OF (seq, node)
         OR EMPTY SET
 
-The signature is for a **undirected** graph. 
+The signature is for a **undirected** graph.
 
 :Example:
 
diff --git a/doc/components/pgr_connectedComponents.rst b/doc/components/pgr_connectedComponents.rst
index 30e892d..c6aa212 100644
--- a/doc/components/pgr_connectedComponents.rst
+++ b/doc/components/pgr_connectedComponents.rst
@@ -60,7 +60,7 @@ Signatures
     RETURNS SET OF (seq, component, n_seq, node)
         OR EMPTY SET
 
-The signature is for a **undirected** graph. 
+The signature is for a **undirected** graph.
 
 :Example:
 
diff --git a/doc/components/pgr_strongComponents.rst b/doc/components/pgr_strongComponents.rst
index 2d272d8..32489f3 100644
--- a/doc/components/pgr_strongComponents.rst
+++ b/doc/components/pgr_strongComponents.rst
@@ -59,7 +59,7 @@ Signatures
     RETURNS SET OF (seq, component, n_seq, node)
         OR EMPTY SET
 
-The signature is for a **directed** graph. 
+The signature is for a **directed** graph.
 
 :Example:
 
diff --git a/doc/conf.py.in b/doc/conf.py.in
index f51e043..02c5302 100644
--- a/doc/conf.py.in
+++ b/doc/conf.py.in
@@ -282,7 +282,7 @@ texinfo_documents = [
 # would mean that specific document would be compressed
 # regardless of the global pdf_compressed setting.
 pdf_documents = [(
-        'index', 
+        'index',
         u'pgr_Documentation',
         'pgRouting Manual',
         u'pgRouting Contributors')]
diff --git a/doc/costMatrix/pgr_bdAstarCostMatrix.rst b/doc/costMatrix/pgr_bdAstarCostMatrix.rst
index eca35a9..17a9709 100644
--- a/doc/costMatrix/pgr_bdAstarCostMatrix.rst
+++ b/doc/costMatrix/pgr_bdAstarCostMatrix.rst
@@ -1,4 +1,4 @@
-.. 
+..
    ****************************************************************************
     pgRouting Manual
     Copyright(c) pgRouting Contributors
@@ -24,7 +24,7 @@ Name
    Boost Graph Inside
 
 .. rubric:: Availability: 2.5.0
-   
+
 .. include:: proposed.rst
    :start-after: begin-warn-expr
    :end-before: end-warn-expr
diff --git a/doc/costMatrix/pgr_bdDijkstraCostMatrix.rst b/doc/costMatrix/pgr_bdDijkstraCostMatrix.rst
index c1629cb..6d226f6 100644
--- a/doc/costMatrix/pgr_bdDijkstraCostMatrix.rst
+++ b/doc/costMatrix/pgr_bdDijkstraCostMatrix.rst
@@ -1,4 +1,4 @@
-.. 
+..
    ****************************************************************************
     pgRouting Manual
     Copyright(c) pgRouting Contributors
diff --git a/doc/lineGraph/CMakeLists.txt b/doc/lineGraph/CMakeLists.txt
index 570fc38..5709f74 100644
--- a/doc/lineGraph/CMakeLists.txt
+++ b/doc/lineGraph/CMakeLists.txt
@@ -1,5 +1,7 @@
 
 SET(LOCAL_FILES
+     transformation-family.rst
+     pgr_lineGraphFull.rst
      pgr_lineGraph.rst
     )
 
diff --git a/doc/lineGraph/images/CMakeLists.txt b/doc/lineGraph/images/CMakeLists.txt
index 89adbb1..93dac86 100644
--- a/doc/lineGraph/images/CMakeLists.txt
+++ b/doc/lineGraph/images/CMakeLists.txt
@@ -1,5 +1,7 @@
 SET(LOCAL_FILES
     lineGraph.png
+    transformation.png
+    original.png
     )
 
 foreach (f ${LOCAL_FILES})
diff --git a/doc/lineGraph/images/original.png b/doc/lineGraph/images/original.png
new file mode 100644
index 0000000..c335cc0
Binary files /dev/null and b/doc/lineGraph/images/original.png differ
diff --git a/doc/lineGraph/images/transformation.png b/doc/lineGraph/images/transformation.png
new file mode 100644
index 0000000..bea9f4d
Binary files /dev/null and b/doc/lineGraph/images/transformation.png differ
diff --git a/doc/lineGraph/pgr_lineGraphFull.rst b/doc/lineGraph/pgr_lineGraphFull.rst
new file mode 100644
index 0000000..7c6d7a4
--- /dev/null
+++ b/doc/lineGraph/pgr_lineGraphFull.rst
@@ -0,0 +1,198 @@
+..
+   ****************************************************************************
+    pgRouting Manual
+    Copyright(c) pgRouting Contributors
+
+    This documentation is licensed under a Creative Commons Attribution-Share
+    Alike 3.0 License: http://creativecommons.org/licenses/by-sa/3.0/
+   ****************************************************************************
+
+.. _pgr_linegraphfull:
+
+pgr_lineGraphFull - Experimental
+===============================================================================
+
+``pgr_lineGraphFull`` — Transforms a given graph into a new graph where all of the vertices from the original graph are converted to line graphs.
+
+.. include:: proposed.rst
+   :start-after: begin-warn-expr
+   :end-before: end-warn-expr
+
+
+Synopsis
+-------------------------------------------------------------------------------
+pgr_lineGraphFull, converts original directed graph to a directed line graph by converting each vertex to a complete graph and keeping all the original edges. The new connecting edges have a cost 0 and go between the adjacent original edges, respecting the directionality.
+
+A possible application of the resulting graph is "routing with two edge restrictions":
+  - Setting a cost of using the vertex when routing between edges on the connecting edge
+  - Forbid the routing between two edges by removing the connecting edge
+
+This is possible because each of the intersections (vertices) in the original graph are now complete graphs that have a new edge for each possible turn across that intersection.
+
+Characteristics
+-------------------------------------------------------------------------------
+
+The main characteristics are:
+  - This function is for directed graphs.
+  - Results are undefined when a negative vertex id is used in the input graph.
+  - Results are undefined when a duplicated edge id is used in the input graph.
+  - Running time: TBD
+
+Signature Summary
+-----------------
+
+.. code-block:: none
+
+    pgr_lineGraphFull(edges_sql)
+    RETURNS SET OF (seq, source, target, cost, edge) 
+        OR EMPTY SET
+
+Signatures
+------------------------------------------------------------------------------
+
+.. index::
+    single: lineGraphFull(Only signature)
+
+Minimal signature
+-----------------------------------------------
+
+.. code-block:: none
+
+    pgr_lineGraphFull(TEXT edges_sql)
+    RETURNS SET OF (seq, source, target, cost, edge) OR EMPTY SET
+
+:Example:
+
+.. literalinclude:: doc-pgr_lineGraphFull.queries
+   :start-after: -- q1
+   :end-before: -- q2
+
+Description of the Signatures
+-------------------------------------------------------------------------------
+
+.. include:: pgRouting-concepts.rst
+    :start-after: basic_edges_sql_start
+    :end-before: basic_edges_sql_end
+
+.. pgr_lineGraphFull_parameters_start
+
+Description of the parameters of the signatures
+...............................................................................
+
+============== ================== ======== =================================================
+Column         Type               Default     Description
+============== ================== ======== =================================================
+**sql**        ``TEXT``                    SQL query as described above.
+============== ================== ======== =================================================
+
+.. pgr_lineGraphFull_parameters_end
+
+
+Additional Examples
+-------------------------------------------------------------------------------
+
+The examples of this section are based on the :doc:`sampledata` network.
+
+The examples include the subgraph including edges 4, 7, 8, and 10 with reverse_cost.
+
+Example for generating the LineGraphFull
+-------------------------------------------------------------------------------
+
+This example displays how this graph transformation works to create additional edges for each possible turn in a graph.
+
+.. code-block:: none
+
+    SELECT id, source, target, cost, reverse_cost
+      FROM edge_table
+      WHERE id IN (4,7,8,10);
+
+| |first|
+
+.. |first| image:: images/original.png
+   :align: middle
+
+.. code-block:: none
+
+    SELECT * FROM pgr_lineGraphFull('SELECT id, 
+                                            source, 
+                                            target, 
+                                            cost, 
+                                            reverse_cost 
+                                       FROM edge_table 
+                                         WHERE id IN (4,7,8,10)');
+
+| |second|
+
+.. |second| image:: images/transformation.png
+   :align: middle
+
+In the transformed graph, all of the edges from the original graph are still present (yellow), but we now have additional edges for every turn that could be made across vertex 6 (orange).
+
+Example for creating table that identifies transformed vertices
+-----------------------------------------------------------------------------
+ 
+The vertices in the transformed graph are each created by splitting up the vertices in the original graph. Unless a vertex in the original graph is a leaf vertex, it will generate more than one vertex in the transformed graph. One of the newly created vertices in the transformed graph will be given the same vertex-id as the vertex that it was created from in the original graph, but the rest of the newly created vertices will have negative vertex ids. Following is an example of how to gen [...]
+
+The first step is to store your results graph into a table and then create the vertex mapping table with one row for each distinct vertex id in the results graph.
+
+.. literalinclude:: doc-pgr_lineGraphFull.queries
+   :start-after: -- q2
+   :end-before: -- q3
+
+Next, we set the original_id of all of the vertices in the results graph that were given the same vertex id as the vertex that it was created from in the original graph.
+
+.. literalinclude:: doc-pgr_lineGraphFull.queries
+   :start-after: -- q3
+   :end-before: -- q4
+
+Then, we cross reference all of the other newly created vertices that do not have the same original_id and set thier original_id values. 
+
+.. literalinclude:: doc-pgr_lineGraphFull.queries
+   :start-after: -- q4
+   :end-before: -- q5
+
+The only vertices left that have not been mapped are a few of the leaf vertices from the original graph. The following sql completes the mapping for these leaf vertices (in the case of this example graph there are no leaf vertices but this is nessessary for larger graphs).
+
+.. literalinclude:: doc-pgr_lineGraphFull.queries
+   :start-after: -- q5
+   :end-before: -- q6
+
+Now our vertex mapping table is complete:
+
+.. literalinclude:: doc-pgr_lineGraphFull.queries
+   :start-after: -- q6
+   :end-before: -- q7
+
+Example for running a dijkstra's shortest path with turn penalties
+-----------------------------------------------------------------------------
+
+One use case for this graph transformation is to be able to run a shortest path search that takes into account the cost or limitation of turning. Below is an example of running a dijkstra's shortest path from vertex 2 to vertex 8 in the original graph, while adding a turn penalty cost of 100 to the turn from edge 4 to edge -7.
+
+First we must increase set the cost of making the turn to 100:
+
+.. literalinclude:: doc-pgr_lineGraphFull.queries
+   :start-after: -- q7
+   :end-before: -- q8
+
+Then we must run a dijkstra's shortest path search using all of the vertices in the new graph that were created from vertex 2 as the starting point, and all of the vertices in the new graph that were created from vertex 8 as the ending point.
+
+.. literalinclude:: doc-pgr_lineGraphFull.queries
+   :start-after: -- q8
+   :end-before: -- q9
+
+Normally the shortest path from vertex 2 to vertex 8 would have an aggregate cost of 2, but since there is a large penalty for making the turn needed to get this cost, the route goes through vertex 6 to avoid this turn.
+
+If you cross reference the node column in the dijkstra results with the vertex id mapping table, this will show you that the path goes from v2 -> v5 -> v6 -> v5 -> v8 in the original graph.
+
+
+See Also
+-----------------------------------------------------------------------------
+
+* http://en.wikipedia.org/wiki/Line_graph
+* http://en.wikipedia.org/wiki/Complete_graph
+
+.. rubric:: Indices and tables
+
+* :ref:`genindex`
+* :ref:`search`
+
diff --git a/doc/lineGraph/transformation-family.rst b/doc/lineGraph/transformation-family.rst
new file mode 100644
index 0000000..e56bf4a
--- /dev/null
+++ b/doc/lineGraph/transformation-family.rst
@@ -0,0 +1,44 @@
+..
+   ****************************************************************************
+    pgRouting Manual
+    Copyright(c) pgRouting Contributors
+
+    This documentation is licensed under a Creative Commons Attribution-Share
+    Alike 3.0 License: http://creativecommons.org/licenses/by-sa/3.0/
+   ****************************************************************************
+
+.. _transformation:
+
+Transformation - Family of functions
+===============================================================================
+
+.. index from here
+
+* :ref:`pgr_lineGraph` - Transformation algorithm for generating a Line Graph.
+* :ref:`pgr_lineGraphFull` - Transformation algorithm for generating a Line Graph out of each vertex in the input graph.
+
+.. index to here
+
+
+.. toctree::
+    :hidden:
+
+    pgr_lineGraph
+    pgr_lineGraphFull
+
+
+Introduction
+------------------------
+
+This family of functions is used for transforming a given input graph :math:`G(V,E)` into a new graph :math:`G'(V',E')`.
+
+See Also
+-------------------------------------------------------------------------------
+
+.. rubric:: Indices and tables
+
+* :ref:`genindex`
+* :ref:`search`
+
+
+
diff --git a/doc/max_flow/pgr_boykovKolmogorov.rst b/doc/max_flow/pgr_boykovKolmogorov.rst
index 4d3ef98..b52003f 100644
--- a/doc/max_flow/pgr_boykovKolmogorov.rst
+++ b/doc/max_flow/pgr_boykovKolmogorov.rst
@@ -21,7 +21,7 @@ Synopsis
 
 
 .. figure:: images/boost-inside.jpeg
-   :target: http://www.boost.org/libs/graph/doc/boykov_kolmogorov_max_flow.html 
+   :target: http://www.boost.org/libs/graph/doc/boykov_kolmogorov_max_flow.html
 
    Boost Graph Inside
 
@@ -159,7 +159,7 @@ See Also
 --------
 
 * :ref:`maxFlow`, :ref:`pgr_pushRelabel <pgr_pushRelabel>`, :ref:`pgr_EdmondsKarp <pgr_edmondsKarp>`
-* http://www.boost.org/libs/graph/doc/boykov_kolmogorov_max_flow.html 
+* http://www.boost.org/libs/graph/doc/boykov_kolmogorov_max_flow.html
 
 .. rubric:: Indices and tables
 
diff --git a/doc/max_flow/pgr_edmondsKarp.rst b/doc/max_flow/pgr_edmondsKarp.rst
index 00272a2..8de1a23 100644
--- a/doc/max_flow/pgr_edmondsKarp.rst
+++ b/doc/max_flow/pgr_edmondsKarp.rst
@@ -21,7 +21,7 @@ Synopsis
 
 
 .. figure:: images/boost-inside.jpeg
-   :target: http://www.boost.org/libs/graph/doc/push_relabel_max_flow.html 
+   :target: http://www.boost.org/libs/graph/doc/push_relabel_max_flow.html
 
    Boost Graph Inside
 
diff --git a/doc/max_flow/pgr_maxFlow.rst b/doc/max_flow/pgr_maxFlow.rst
index 09307a2..28e38c5 100644
--- a/doc/max_flow/pgr_maxFlow.rst
+++ b/doc/max_flow/pgr_maxFlow.rst
@@ -37,7 +37,7 @@ Synopsis
 - When the maximum flow is 0 then there is no flow and **0** is returned.
 
   - There is no flow when a **source** is the same as a **target**.
-      
+
 - Any duplicated value in the source(s) or target(s) are ignored.
 - Uses the :ref:`pgr_pushRelabel <pgr_pushRelabel>` algorithm.
 
diff --git a/doc/max_flow/pgr_pushRelabel.rst b/doc/max_flow/pgr_pushRelabel.rst
index 4d0ced5..1cf191c 100644
--- a/doc/max_flow/pgr_pushRelabel.rst
+++ b/doc/max_flow/pgr_pushRelabel.rst
@@ -21,7 +21,7 @@ Synopsis
 
 
 .. figure:: images/boost-inside.jpeg
-   :target: http://www.boost.org/libs/graph/doc/push_relabel_max_flow.html 
+   :target: http://www.boost.org/libs/graph/doc/push_relabel_max_flow.html
 
    Boost Graph Inside
 
@@ -158,7 +158,7 @@ See Also
 --------
 
 * :ref:`maxFlow`, :ref:`pgr_boykovKolmogorov <pgr_boykovKolmogorov>`, :ref:`pgr_edmondsKarp <pgr_edmondsKarp>`
-* http://www.boost.org/libs/graph/doc/push_relabel_max_flow.html 
+* http://www.boost.org/libs/graph/doc/push_relabel_max_flow.html
 * https://en.wikipedia.org/wiki/Push%E2%80%93relabel_maximum_flow_algorithm
 
 .. rubric:: Indices and tables
diff --git a/doc/pickDeliver/VRP-category.rst b/doc/pickDeliver/VRP-category.rst
index 1ec91f5..f827969 100644
--- a/doc/pickDeliver/VRP-category.rst
+++ b/doc/pickDeliver/VRP-category.rst
@@ -101,7 +101,7 @@ Parameters
 Pick & deliver
 ...............................................................................
 
-Both implementations use the following same parameters: 
+Both implementations use the following same parameters:
 
 .. pd_parameters_start
 
@@ -147,20 +147,7 @@ Inner Queries
 
 
 ..
-    info[0].name = strdup("id");
-    info[1].name = strdup("demand");
-    info[2].name = strdup("p_x");
-    info[3].name = strdup("p_y");
-    info[4].name = strdup("p_open");
-    info[5].name = strdup("p_close");
-    info[6].name = strdup("p_service");
-    info[7].name = strdup("d_x");
-    info[8].name = strdup("d_y");
-    info[9].name = strdup("d_open");
-    info[10].name = strdup("d_close");
-    info[11].name = strdup("d_service");
-    info[12].name = strdup("p_node_id");
-    info[13].name = strdup("d_node_id")
+    see include/c_types/pickDeliver/pickDeliveryOrders_t.h documentation
 
 Pick & Deliver Orders SQL
 .........................................................................................
@@ -219,22 +206,7 @@ Column            Type                       Description
 
 
 ..
-   info[0].name = strdup("id");
-   info[1].name = strdup("capacity");
-   info[2].name = strdup("start_x");
-   info[3].name = strdup("start_y");
-   info[4].name = strdup("number");
-   info[5].name = strdup("start_open");
-   info[6].name = strdup("start_close");
-   info[7].name = strdup("start_service");
-   info[8].name = strdup("end_x");
-   info[9].name = strdup("end_y");
-   info[10].name = strdup("end_open");
-   info[11].name = strdup("end_close");
-   info[12].name = strdup("end_service");
-   info[13].name = strdup("speed");
-   info[14].name = strdup("start_node_id");
-   info[15].name = strdup("end_node_id");
+    see include/c_types/pickDeliver/vehicle_t.h documentation
 
 
 .. _pd_vehicle_sql:
@@ -345,14 +317,14 @@ Column              Type           Description
 **stop_seq**         INTEGER      Sequential value starting from **1** for the stops made by the current vehicle. The :math:`m_{th}` stop of the current vehicle.
 **stop_type**        INTEGER      Kind of stop location the vehicle is at:
 
-                                  - ``1``: Starting location 
-                                  - ``2``: Pickup location 
-                                  - ``3``: Delivery location 
-                                  - ``6``: Ending location 
+                                  - ``1``: Starting location
+                                  - ``2``: Pickup location
+                                  - ``3``: Delivery location
+                                  - ``6``: Ending location
 
 **order_id**         BIGINT       Pickup-Delivery order pair identifier.
 
-                                  - ``-1``: When no order is involved on the current stop location. 
+                                  - ``-1``: When no order is involved on the current stop location.
 
 **cargo**            FLOAT        Cargo units of the vehicle when leaving the stop.
 
@@ -412,7 +384,7 @@ Handling Parameters
 -------------------------------------------------------------------------------
 
 To define a problem, several considerations have to be done, to get consistent results.
-This section gives an insight of how parameters are to be considered. 
+This section gives an insight of how parameters are to be considered.
 
 - `Capacity and Demand Units Handling`_
 - `Locations`_
@@ -483,7 +455,7 @@ Meaning of 0   time units       9:00 am              4:30 pm               10 mi
 ============ ================= ==================== ===================== =========
 0:00 am         hours            9                  16.5                   :math:`10.5 / 60  = 0.175`
 9:00 am         hours            0                  7.5                    :math:`10.5 / 60  = 0.175`
-0:00 am         minutes          :math:`9*60 = 54`  :math:`16.5*60 = 990`  10.5 
+0:00 am         minutes          :math:`9*60 = 54`  :math:`16.5*60 = 990`  10.5
 9:00 am         minutes          0                  :math:`7.5*60 = 540`   10.5
 ============ ================= ==================== ===================== =========
 
diff --git a/doc/pickDeliver/pgr_pickDeliver.rst b/doc/pickDeliver/pgr_pickDeliver.rst
index 35009e9..2bf2e04 100644
--- a/doc/pickDeliver/pgr_pickDeliver.rst
+++ b/doc/pickDeliver/pgr_pickDeliver.rst
@@ -107,7 +107,7 @@ Signature
 
 Parameters
 ...............................................................................
-                                                                                                                                                                                                                                 
+
 The parameters are:
 
 .. code-block:: none
diff --git a/doc/pickDeliver/pgr_pickDeliverEuclidean.rst b/doc/pickDeliver/pgr_pickDeliverEuclidean.rst
index be50528..12d62b5 100644
--- a/doc/pickDeliver/pgr_pickDeliverEuclidean.rst
+++ b/doc/pickDeliver/pgr_pickDeliverEuclidean.rst
@@ -76,7 +76,7 @@ Characteristics
 Signature
 -------------------------------------------------------------------------------
 
-..  
+..
     TEXT, -- orders_sql
     TEXT, -- vehicles_sql
     factor FLOAT DEFAULT 1,
diff --git a/doc/queries/CMakeLists.txt b/doc/queries/CMakeLists.txt
index 2617f8d..cec864e 100644
--- a/doc/queries/CMakeLists.txt
+++ b/doc/queries/CMakeLists.txt
@@ -44,11 +44,9 @@ SET(LOCAL_FILES
 	doc-pgr_articulationPoints.queries
 	doc-pgr_bridges.queries
     doc-pgr_vrpOneDepot.queries
-    proof_of_concept.queries
-    trsp_notes_v2.5.0.queries
-    oneDepotWrapper.queries
     doc-gsoc_vrppdtw.queries
     doc-pgr_lineGraph.queries
+    doc-pgr_lineGraphFull.queries
     )
 
 foreach (f ${LOCAL_FILES})
diff --git a/doc/queries/doc-aStarCost.queries b/doc/queries/doc-aStarCost.queries
index 0b95a8e..bc1a339 100644
--- a/doc/queries/doc-aStarCost.queries
+++ b/doc/queries/doc-aStarCost.queries
@@ -6,7 +6,7 @@ SET
 SELECT * FROM pgr_aStarCost(
     'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
     2, 12);
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          2 |      12 |        4
 (1 row)
@@ -16,7 +16,7 @@ SELECT * FROM pgr_aStarCost(
     'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
     2, 12,
     directed := false, heuristic := 2);
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          2 |      12 |        4
 (1 row)
@@ -25,7 +25,7 @@ SELECT * FROM pgr_aStarCost(
 SELECT * FROM pgr_aStarCost(
     'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
     2, ARRAY[3, 12], heuristic := 2);
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          2 |       3 |        5
          2 |      12 |        4
@@ -35,7 +35,7 @@ SELECT * FROM pgr_aStarCost(
 SELECT * FROM pgr_aStarCost(
     'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
     ARRAY[7, 2], 12, heuristic := 0);
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          2 |      12 |        4
          7 |      12 |        5
@@ -45,7 +45,7 @@ SELECT * FROM pgr_aStarCost(
 SELECT * FROM pgr_aStarCost(
     'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
     ARRAY[7, 2], ARRAY[3, 12], heuristic := 2);
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          2 |       3 |        5
          2 |      12 |        4
diff --git a/doc/queries/doc-astar.queries b/doc/queries/doc-astar.queries
index ef7b622..fb733e3 100644
--- a/doc/queries/doc-astar.queries
+++ b/doc/queries/doc-astar.queries
@@ -6,7 +6,7 @@ SET
 SELECT * FROM pgr_astar(
     'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
     2, 12);
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    2 |    4 |    1 |        0
    2 |        2 |    5 |   10 |    1 |        1
@@ -20,7 +20,7 @@ SELECT * FROM pgr_astar(
     'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
     2, 12,
     directed := false, heuristic := 2);
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    2 |    2 |    1 |        0
    2 |        2 |    3 |    3 |    1 |        1
@@ -33,7 +33,7 @@ SELECT * FROM pgr_astar(
 SELECT * FROM pgr_astar(
     'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
     2, ARRAY[3, 12], heuristic := 2);
- seq | path_seq | end_vid | node | edge | cost | agg_cost 
+ seq | path_seq | end_vid | node | edge | cost | agg_cost
 -----+----------+---------+------+------+------+----------
    1 |        1 |       3 |    2 |    4 |    1 |        0
    2 |        2 |       3 |    5 |    8 |    1 |        1
@@ -52,7 +52,7 @@ SELECT * FROM pgr_astar(
 SELECT * FROM pgr_astar(
     'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
     ARRAY[7, 2], 12, heuristic := 0);
- seq | path_seq | start_vid | node | edge | cost | agg_cost 
+ seq | path_seq | start_vid | node | edge | cost | agg_cost
 -----+----------+-----------+------+------+------+----------
    1 |        1 |         2 |    2 |    4 |    1 |        0
    2 |        2 |         2 |    5 |   10 |    1 |        1
@@ -71,7 +71,7 @@ SELECT * FROM pgr_astar(
 SELECT * FROM pgr_astar(
     'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
     ARRAY[7, 2], ARRAY[3, 12], heuristic := 2);
- seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost 
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
 -----+----------+-----------+---------+------+------+------+----------
    1 |        1 |         2 |       3 |    2 |    4 |    1 |        0
    2 |        2 |         2 |       3 |    5 |    8 |    1 |        1
diff --git a/doc/queries/doc-contractGraph.queries b/doc/queries/doc-contractGraph.queries
index 7b3757f..530acfd 100644
--- a/doc/queries/doc-contractGraph.queries
+++ b/doc/queries/doc-contractGraph.queries
@@ -6,7 +6,7 @@ SET
 SELECT * FROM pgr_contractGraph(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     ARRAY[1, 2]);
- seq | type | id | contracted_vertices | source | target | cost 
+ seq | type | id | contracted_vertices | source | target | cost
 -----+------+----+---------------------+--------+--------+------
    1 | v    |  5 | {7,8}               |     -1 |     -1 |   -1
    2 | v    | 15 | {14}                |     -1 |     -1 |   -1
@@ -21,7 +21,7 @@ SELECT * FROM pgr_contractGraph(
 SELECT * FROM pgr_contractGraph(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
 ARRAY[1, 2], forbidden_vertices:=ARRAY[2]);
- seq | type | id | contracted_vertices | source | target | cost 
+ seq | type | id | contracted_vertices | source | target | cost
 -----+------+----+---------------------+--------+--------+------
    1 | v    |  2 | {1}                 |     -1 |     -1 |   -1
    2 | v    |  5 | {7,8}               |     -1 |     -1 |   -1
@@ -36,7 +36,7 @@ ARRAY[1, 2], forbidden_vertices:=ARRAY[2]);
 SELECT * FROM pgr_contractGraph(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
 ARRAY[1]);
- seq | type | id | contracted_vertices | source | target | cost 
+ seq | type | id | contracted_vertices | source | target | cost
 -----+------+----+---------------------+--------+--------+------
    1 | v    |  2 | {1}                 |     -1 |     -1 |   -1
    2 | v    |  5 | {7,8}               |     -1 |     -1 |   -1
@@ -49,7 +49,7 @@ ARRAY[1]);
 SELECT * FROM pgr_contractGraph(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
 ARRAY[2]);
- seq | type | id | contracted_vertices | source | target | cost 
+ seq | type | id | contracted_vertices | source | target | cost
 -----+------+----+---------------------+--------+--------+------
    1 | e    | -1 | {4}                 |      9 |      3 |    2
    2 | e    | -2 | {8}                 |      5 |      7 |    2
diff --git a/doc/queries/doc-contraction.queries b/doc/queries/doc-contraction.queries
index 7e015f5..9c8cd27 100644
--- a/doc/queries/doc-contraction.queries
+++ b/doc/queries/doc-contraction.queries
@@ -21,7 +21,7 @@ SET
 SELECT * FROM pgr_contractGraph(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     array[1,2], directed:=true);
- seq | type | id | contracted_vertices | source | target | cost 
+ seq | type | id | contracted_vertices | source | target | cost
 -----+------+----+---------------------+--------+--------+------
    1 | v    |  5 | {7,8}               |     -1 |     -1 |   -1
    2 | v    | 15 | {14}                |     -1 |     -1 |   -1
@@ -47,7 +47,7 @@ UPDATE 10
 SELECT id, is_contracted
 FROM edge_table_vertices_pgr
 ORDER BY id;
- id | is_contracted 
+ id | is_contracted
 ----+---------------
   1 | t
   2 | t
@@ -75,10 +75,10 @@ FROM contraction_results
 WHERE type = 'v' AND edge_table_vertices_pgr.id = contraction_results.id;
 UPDATE 3
 -- q7
-SELECT id, contracted_vertices, is_contracted 
+SELECT id, contracted_vertices, is_contracted
 FROM edge_table_vertices_pgr
 ORDER BY id;
- id | contracted_vertices | is_contracted 
+ id | contracted_vertices | is_contracted
 ----+---------------------+---------------
   1 |                     | t
   2 |                     | t
@@ -106,10 +106,10 @@ FROM contraction_results
 WHERE type = 'e';
 INSERT 0 4
 -- q9
-SELECT id, source, target, cost, reverse_cost, contracted_vertices, is_contracted 
+SELECT id, source, target, cost, reverse_cost, contracted_vertices, is_contracted
 FROM edge_table
 ORDER BY id;
- id | source | target | cost | reverse_cost | contracted_vertices | is_contracted 
+ id | source | target | cost | reverse_cost | contracted_vertices | is_contracted
 ----+--------+--------+------+--------------+---------------------+---------------
   1 |      1 |      2 |    1 |            1 |                     | f
   2 |      2 |      3 |   -1 |            1 |                     | f
@@ -139,7 +139,7 @@ ORDER BY id;
 SELECT id  FROM edge_table_vertices_pgr
 WHERE is_contracted = false
 ORDER BY id;
- id 
+ id
 ----
   3
   5
@@ -156,13 +156,13 @@ SELECT * FROM pgr_dijkstra(
     WITH
     vertices_in_graph AS (
         SELECT id  FROM edge_table_vertices_pgr WHERE is_contracted = false)
-    SELECT id, source, target, cost, reverse_cost 
-    FROM edge_table 
+    SELECT id, source, target, cost, reverse_cost
+    FROM edge_table
     WHERE source IN (SELECT * FROM vertices_in_graph)
     AND target IN (SELECT * FROM vertices_in_graph)
     $$,
     3, 11, false);
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    3 |    5 |    1 |        0
    2 |        2 |    6 |   11 |    1 |        1
@@ -186,7 +186,7 @@ SELECT * FROM pgr_dijkstra(
     AND target IN (SELECT * FROM vertices_in_graph)
     $$,
     3, 1, false);
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    3 |    2 |    1 |        0
    2 |        2 |    2 |    1 |    1 |        1
@@ -219,7 +219,7 @@ SELECT * FROM pgr_dijkstra(
     AND target IN (SELECT * FROM vertices_in_graph)
     $$,
     7, 13, false);
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    7 |    6 |    1 |        0
    2 |        2 |    8 |    7 |    1 |        1
@@ -245,7 +245,7 @@ SELECT * FROM  pgr_dijkstra(
     AND target IN (SELECT * FROM vertices_in_graph)
     $$,
     3, 7, false);
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    3 |   19 |    2 |        0
    2 |        2 |    5 |    7 |    1 |        2
@@ -276,7 +276,7 @@ SELECT edge, contracted_vertices
     FROM first_dijkstra JOIN edge_table
     ON (edge = id)
     WHERE is_contracted = true;
- edge | contracted_vertices 
+ edge | contracted_vertices
 ------+---------------------
    19 | {1,2}
 (1 row)
@@ -325,7 +325,7 @@ SELECT * FROM pgr_dijkstra($$
     AND id NOT IN (SELECT edge FROM edges_to_expand)
     $$,
     3, 7, false);
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    3 |    2 |    1 |        0
    2 |        2 |    2 |    4 |    1 |        1
diff --git a/doc/queries/doc-floydWarshall.queries b/doc/queries/doc-floydWarshall.queries
index 4d2f2b8..19dba63 100644
--- a/doc/queries/doc-floydWarshall.queries
+++ b/doc/queries/doc-floydWarshall.queries
@@ -6,7 +6,7 @@ SET
 SELECT * FROM pgr_floydWarshall(
     'SELECT id, source, target, cost FROM edge_table where id < 5'
 );
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          1 |       2 |        1
          1 |       5 |        2
@@ -18,7 +18,7 @@ SELECT * FROM pgr_floydWarshall(
     'SELECT id, source, target, cost FROM edge_table where id < 5',
     false
 );
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          1 |       2 |        1
          1 |       5 |        2
diff --git a/doc/queries/doc-gsoc_vrppdtw.queries b/doc/queries/doc-gsoc_vrppdtw.queries
index eed8a37..c5b6e65 100644
--- a/doc/queries/doc-gsoc_vrppdtw.queries
+++ b/doc/queries/doc-gsoc_vrppdtw.queries
@@ -6,7 +6,7 @@ SET
 SELECT DISTINCT(id1) FROM pgr_gsoc_vrppdtw(
     'SELECT * FROM customer ORDER BY id', 25, 200)
 ORDER BY id1;
- id1 
+ id1
 -----
    1
    2
@@ -23,7 +23,7 @@ ORDER BY id1;
 --q2
 SELECT count(*) FROM pgr_gsoc_vrppdtw(
     'SELECT * FROM customer ORDER BY id', 25, 200);
- count 
+ count
 -------
    126
 (1 row)
@@ -32,7 +32,7 @@ SELECT count(*) FROM pgr_gsoc_vrppdtw(
 SELECT * FROM pgr_gsoc_vrppdtw(
     'SELECT * FROM customer ORDER BY id', 25, 200)
     WHERE id1 in (1, 5, 9);
- seq | id1 | id2 |       cost       
+ seq | id1 | id2 |       cost
 -----+-----+-----+------------------
    1 |   1 |   0 |                0
    2 |   1 |  13 | 120.805843601499
diff --git a/doc/queries/doc-johnson.queries b/doc/queries/doc-johnson.queries
index 5c9f684..6bcbafc 100644
--- a/doc/queries/doc-johnson.queries
+++ b/doc/queries/doc-johnson.queries
@@ -7,7 +7,7 @@ SELECT * FROM pgr_johnson(
     'SELECT source, target, cost FROM edge_table WHERE id < 5
          ORDER BY id'
 );
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          1 |       2 |        1
          1 |       5 |        2
@@ -20,7 +20,7 @@ SELECT * FROM pgr_johnson(
          ORDER BY id',
     false
 );
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          1 |       2 |        1
          1 |       5 |        2
diff --git a/doc/queries/doc-ksp.queries b/doc/queries/doc-ksp.queries
index 3488172..1e78392 100644
--- a/doc/queries/doc-ksp.queries
+++ b/doc/queries/doc-ksp.queries
@@ -6,9 +6,9 @@ SET
 SELECT * FROM pgr_KSP(
      'SELECT id, source, target, cost, reverse_cost FROM edge_table',
       2, 12, 2,
-      directed:=true   
+      directed:=true
    );
- seq | path_id | path_seq | node | edge | cost | agg_cost 
+ seq | path_id | path_seq | node | edge | cost | agg_cost
 -----+---------+----------+------+------+------+----------
    1 |       1 |        1 |    2 |    4 |    1 |        0
    2 |       1 |        2 |    5 |    8 |    1 |        1
@@ -26,7 +26,7 @@ SELECT * FROM pgr_KSP(
      'SELECT id, source, target, cost, reverse_cost FROM edge_table',
       2, 12, 2
    );
- seq | path_id | path_seq | node | edge | cost | agg_cost 
+ seq | path_id | path_seq | node | edge | cost | agg_cost
 -----+---------+----------+------+------+------+----------
    1 |       1 |        1 |    2 |    4 |    1 |        0
    2 |       1 |        2 |    5 |    8 |    1 |        1
@@ -45,7 +45,7 @@ SELECT * FROM pgr_KSP(
      'SELECT id, source, target, cost, reverse_cost FROM edge_table',
       2, 12, 2
    );
- seq | path_id | path_seq | node | edge | cost | agg_cost 
+ seq | path_id | path_seq | node | edge | cost | agg_cost
 -----+---------+----------+------+------+------+----------
    1 |       1 |        1 |    2 |    4 |    1 |        0
    2 |       1 |        2 |    5 |    8 |    1 |        1
@@ -63,7 +63,7 @@ SELECT * FROM pgr_KSP(
      'SELECT id, source, target, cost, reverse_cost FROM edge_table',
       2, 12, 2, heap_paths:=true
    );
- seq | path_id | path_seq | node | edge | cost | agg_cost 
+ seq | path_id | path_seq | node | edge | cost | agg_cost
 -----+---------+----------+------+------+------+----------
    1 |       1 |        1 |    2 |    4 |    1 |        0
    2 |       1 |        2 |    5 |    8 |    1 |        1
@@ -86,7 +86,7 @@ SELECT * FROM pgr_KSP(
      'SELECT id, source, target, cost, reverse_cost FROM edge_table',
       2, 12, 2, true, true
    );
- seq | path_id | path_seq | node | edge | cost | agg_cost 
+ seq | path_id | path_seq | node | edge | cost | agg_cost
 -----+---------+----------+------+------+------+----------
    1 |       1 |        1 |    2 |    4 |    1 |        0
    2 |       1 |        2 |    5 |    8 |    1 |        1
@@ -110,7 +110,7 @@ SELECT * FROM pgr_KSP(
      'SELECT id, source, target, cost, reverse_cost FROM edge_table',
       2, 12, 2, directed:=false
    );
- seq | path_id | path_seq | node | edge | cost | agg_cost 
+ seq | path_id | path_seq | node | edge | cost | agg_cost
 -----+---------+----------+------+------+------+----------
    1 |       1 |        1 |    2 |    2 |    1 |        0
    2 |       1 |        2 |    3 |    3 |    1 |        1
@@ -128,7 +128,7 @@ SELECT * FROM pgr_KSP(
      'SELECT id, source, target, cost, reverse_cost FROM edge_table',
       2, 12, 2, false, true
    );
- seq | path_id | path_seq | node | edge | cost | agg_cost 
+ seq | path_id | path_seq | node | edge | cost | agg_cost
 -----+---------+----------+------+------+------+----------
    1 |       1 |        1 |    2 |    2 |    1 |        0
    2 |       1 |        2 |    3 |    3 |    1 |        1
@@ -159,7 +159,7 @@ SELECT  * FROM pgr_KSP(
      'SELECT id, source, target, cost FROM edge_table',
       2, 3, 2
    );
- seq | path_id | path_seq | node | edge | cost | agg_cost 
+ seq | path_id | path_seq | node | edge | cost | agg_cost
 -----+---------+----------+------+------+------+----------
 (0 rows)
 
@@ -167,7 +167,7 @@ SELECT  * FROM pgr_KSP(
      'SELECT id, source, target, cost FROM edge_table',
       2, 12, 2
    );
- seq | path_id | path_seq | node | edge | cost | agg_cost 
+ seq | path_id | path_seq | node | edge | cost | agg_cost
 -----+---------+----------+------+------+------+----------
    1 |       1 |        1 |    2 |    4 |    1 |        0
    2 |       1 |        2 |    5 |    8 |    1 |        1
@@ -185,7 +185,7 @@ SELECT   * FROM pgr_KSP(
      'SELECT id, source, target, cost FROM edge_table',
       2, 12, 2, heap_paths:=true
    );
- seq | path_id | path_seq | node | edge | cost | agg_cost 
+ seq | path_id | path_seq | node | edge | cost | agg_cost
 -----+---------+----------+------+------+------+----------
    1 |       1 |        1 |    2 |    4 |    1 |        0
    2 |       1 |        2 |    5 |    8 |    1 |        1
@@ -208,7 +208,7 @@ SELECT  * FROM pgr_KSP(
      'SELECT id, source, target, cost FROM edge_table',
       2, 12, 2, true, true
    );
- seq | path_id | path_seq | node | edge | cost | agg_cost 
+ seq | path_id | path_seq | node | edge | cost | agg_cost
 -----+---------+----------+------+------+------+----------
    1 |       1 |        1 |    2 |    4 |    1 |        0
    2 |       1 |        2 |    5 |    8 |    1 |        1
@@ -232,7 +232,7 @@ SELECT  * FROM pgr_KSP(
      'SELECT id, source, target, cost FROM edge_table',
       2, 12, 2, directed:=false
    );
- seq | path_id | path_seq | node | edge | cost | agg_cost 
+ seq | path_id | path_seq | node | edge | cost | agg_cost
 -----+---------+----------+------+------+------+----------
    1 |       1 |        1 |    2 |    4 |    1 |        0
    2 |       1 |        2 |    5 |    8 |    1 |        1
@@ -250,7 +250,7 @@ SELECT  * FROM pgr_KSP(
      'SELECT id, source, target, cost FROM edge_table',
       2, 12, 2, directed:=false, heap_paths:=true
    );
- seq | path_id | path_seq | node | edge | cost | agg_cost 
+ seq | path_id | path_seq | node | edge | cost | agg_cost
 -----+---------+----------+------+------+------+----------
    1 |       1 |        1 |    2 |    4 |    1 |        0
    2 |       1 |        2 |    5 |    8 |    1 |        1
diff --git a/doc/queries/doc-pgr_TSP.queries b/doc/queries/doc-pgr_TSP.queries
index 374dd6b..35bed9e 100644
--- a/doc/queries/doc-pgr_TSP.queries
+++ b/doc/queries/doc-pgr_TSP.queries
@@ -16,7 +16,7 @@ query AS (
     )
 )
 SELECT agg_cost < 20 AS under_20 FROM query WHERE seq = 14;
- under_20 
+ under_20
 ----------
  t
 (1 row)
@@ -33,7 +33,7 @@ SELECT * FROM pgr_TSP(
     start_id := 7,
     randomize := false
 );
- seq | node | cost | agg_cost 
+ seq | node | cost | agg_cost
 -----+------+------+----------
    1 |    7 |    1 |        0
    2 |    8 |    1 |        1
@@ -62,7 +62,7 @@ SELECT * FROM pgr_TSP(
     start_id := 5,
     randomize := false
 );
- seq | node | cost | agg_cost 
+ seq | node | cost | agg_cost
 -----+------+------+----------
    1 |    5 |    1 |        0
    2 |    6 |    1 |        1
diff --git a/doc/queries/doc-pgr_alphashape.queries b/doc/queries/doc-pgr_alphashape.queries
index 0b4282a..61484a1 100644
--- a/doc/queries/doc-pgr_alphashape.queries
+++ b/doc/queries/doc-pgr_alphashape.queries
@@ -6,7 +6,7 @@ SET
 SELECT * FROM pgr_alphaShape(
     'SELECT id::integer, ST_X(the_geom)::float AS x, ST_Y(the_geom)::float AS y
     FROM edge_table_vertices_pgr') ORDER BY x, y;
-  x  |  y  
+  x  |  y
 -----+-----
    0 |   2
  0.5 | 3.5
@@ -29,7 +29,7 @@ FROM (
             FROM edge_table_vertices_pgr')
         ) AS a
    ) AS foo;
- st_area 
+ st_area
 ---------
    11.75
 (1 row)
diff --git a/doc/queries/doc-pgr_analyzeGraph.queries b/doc/queries/doc-pgr_analyzeGraph.queries
index b98fe3c..16c762f 100644
--- a/doc/queries/doc-pgr_analyzeGraph.queries
+++ b/doc/queries/doc-pgr_analyzeGraph.queries
@@ -11,7 +11,7 @@ NOTICE:  -------------> TOPOLOGY CREATED FOR  18 edges
 NOTICE:  Rows with NULL geometry or NULL id: 0
 NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
 NOTICE:  ----------------------------------------------
- pgr_createtopology 
+ pgr_createtopology
 --------------------
  OK
 (1 row)
@@ -31,7 +31,7 @@ NOTICE:                            Dead ends: 7
 NOTICE:  Potential gaps found near dead ends: 1
 NOTICE:               Intersections detected: 1
 NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
+ pgr_analyzegraph
 ------------------
  OK
 (1 row)
@@ -51,7 +51,7 @@ NOTICE:                            Dead ends: 7
 NOTICE:  Potential gaps found near dead ends: 1
 NOTICE:               Intersections detected: 1
 NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
+ pgr_analyzegraph
 ------------------
  OK
 (1 row)
@@ -62,7 +62,7 @@ NOTICE:  pgr_analyzeGraph('edge_table',0.001,'id','the_geom','source','target','
 NOTICE:  Performing checks, please wait ...
 NOTICE:  Got function st_srid(bigint) does not exist
 NOTICE:  ERROR: something went wrong when checking for SRID of id in table public.edge_table
- pgr_analyzegraph 
+ pgr_analyzegraph
 ------------------
  FAIL
 (1 row)
@@ -82,7 +82,7 @@ NOTICE:                            Dead ends: 7
 NOTICE:  Potential gaps found near dead ends: 1
 NOTICE:               Intersections detected: 1
 NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
+ pgr_analyzegraph
 ------------------
  OK
 (1 row)
@@ -102,7 +102,7 @@ NOTICE:                            Dead ends: 7
 NOTICE:  Potential gaps found near dead ends: 1
 NOTICE:               Intersections detected: 1
 NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
+ pgr_analyzegraph
 ------------------
  OK
 (1 row)
@@ -122,7 +122,7 @@ NOTICE:                            Dead ends: 7
 NOTICE:  Potential gaps found near dead ends: 1
 NOTICE:               Intersections detected: 1
 NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
+ pgr_analyzegraph
 ------------------
  OK
 (1 row)
@@ -142,7 +142,7 @@ NOTICE:                            Dead ends: 4
 NOTICE:  Potential gaps found near dead ends: 0
 NOTICE:               Intersections detected: 0
 NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
+ pgr_analyzegraph
 ------------------
  OK
 (1 row)
@@ -162,7 +162,7 @@ NOTICE:                            Dead ends: 5
 NOTICE:  Potential gaps found near dead ends: 0
 NOTICE:               Intersections detected: 0
 NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
+ pgr_analyzegraph
 ------------------
  OK
 (1 row)
@@ -184,7 +184,7 @@ NOTICE:                            Dead ends: 10
 NOTICE:  Potential gaps found near dead ends: 1
 NOTICE:               Intersections detected: 1
 NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
+ pgr_analyzegraph
 ------------------
  OK
 (1 row)
@@ -200,7 +200,7 @@ NOTICE:  -------------> TOPOLOGY CREATED FOR  18 edges
 NOTICE:  Rows with NULL geometry or NULL id: 0
 NOTICE:  Vertices table for table public.mytable is: public.mytable_vertices_pgr
 NOTICE:  ----------------------------------------------
- pgr_createtopology 
+ pgr_createtopology
 --------------------
  OK
 (1 row)
@@ -220,7 +220,7 @@ NOTICE:                            Dead ends: 7
 NOTICE:  Potential gaps found near dead ends: 1
 NOTICE:               Intersections detected: 1
 NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
+ pgr_analyzegraph
 ------------------
  OK
 (1 row)
@@ -231,7 +231,7 @@ NOTICE:  pgr_analyzeGraph('mytable',0.0001,'gid','mygeom','src','tgt','true')
 NOTICE:  Performing checks, please wait ...
 NOTICE:  Got function st_srid(bigint) does not exist
 NOTICE:  ERROR: something went wrong when checking for SRID of gid in table public.mytable
- pgr_analyzegraph 
+ pgr_analyzegraph
 ------------------
  FAIL
 (1 row)
@@ -251,7 +251,7 @@ NOTICE:                            Dead ends: 7
 NOTICE:  Potential gaps found near dead ends: 1
 NOTICE:               Intersections detected: 1
 NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
+ pgr_analyzegraph
 ------------------
  OK
 (1 row)
@@ -271,7 +271,7 @@ NOTICE:                            Dead ends: 7
 NOTICE:  Potential gaps found near dead ends: 1
 NOTICE:               Intersections detected: 1
 NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
+ pgr_analyzegraph
 ------------------
  OK
 (1 row)
@@ -291,7 +291,7 @@ NOTICE:                            Dead ends: 4
 NOTICE:  Potential gaps found near dead ends: 0
 NOTICE:               Intersections detected: 0
 NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
+ pgr_analyzegraph
 ------------------
  OK
 (1 row)
@@ -311,7 +311,7 @@ NOTICE:                            Dead ends: 4
 NOTICE:  Potential gaps found near dead ends: 0
 NOTICE:               Intersections detected: 0
 NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
+ pgr_analyzegraph
 ------------------
  OK
 (1 row)
@@ -332,7 +332,7 @@ NOTICE:                            Dead ends: 5
 NOTICE:  Potential gaps found near dead ends: 0
 NOTICE:               Intersections detected: 1
 NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
+ pgr_analyzegraph
 ------------------
  OK
 (1 row)
@@ -353,7 +353,7 @@ NOTICE:                            Dead ends: 5
 NOTICE:  Potential gaps found near dead ends: 0
 NOTICE:               Intersections detected: 1
 NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
+ pgr_analyzegraph
 ------------------
  OK
 (1 row)
@@ -378,7 +378,7 @@ NOTICE:                            Dead ends: 10
 NOTICE:  Potential gaps found near dead ends: 1
 NOTICE:               Intersections detected: 1
 NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
+ pgr_analyzegraph
 ------------------
  OK
 (1 row)
@@ -399,7 +399,7 @@ NOTICE:                            Dead ends: 10
 NOTICE:  Potential gaps found near dead ends: 1
 NOTICE:               Intersections detected: 1
 NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
+ pgr_analyzegraph
 ------------------
  OK
 (1 row)
@@ -413,7 +413,7 @@ NOTICE:  -------------> TOPOLOGY CREATED FOR  18 edges
 NOTICE:  Rows with NULL geometry or NULL id: 0
 NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
 NOTICE:  ----------------------------------------------
- pgr_createtopology 
+ pgr_createtopology
 --------------------
  OK
 (1 row)
@@ -433,7 +433,7 @@ NOTICE:                            Dead ends: 7
 NOTICE:  Potential gaps found near dead ends: 1
 NOTICE:               Intersections detected: 1
 NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
+ pgr_analyzegraph
 ------------------
  OK
 (1 row)
@@ -453,7 +453,7 @@ NOTICE:                            Dead ends: 4
 NOTICE:  Potential gaps found near dead ends: 0
 NOTICE:               Intersections detected: 0
 NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
+ pgr_analyzegraph
 ------------------
  OK
 (1 row)
@@ -473,7 +473,7 @@ NOTICE:                            Dead ends: 8
 NOTICE:  Potential gaps found near dead ends: 1
 NOTICE:               Intersections detected: 1
 NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
+ pgr_analyzegraph
 ------------------
  OK
 (1 row)
@@ -493,7 +493,7 @@ NOTICE:                            Dead ends: 3
 NOTICE:  Potential gaps found near dead ends: 0
 NOTICE:               Intersections detected: 0
 NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
+ pgr_analyzegraph
 ------------------
  OK
 (1 row)
@@ -507,7 +507,7 @@ NOTICE:  -------------> TOPOLOGY CREATED FOR  16 edges
 NOTICE:  Rows with NULL geometry or NULL id: 0
 NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
 NOTICE:  ----------------------------------------------
- pgr_createtopology 
+ pgr_createtopology
 --------------------
  OK
 (1 row)
@@ -527,7 +527,7 @@ NOTICE:                            Dead ends: 3
 NOTICE:  Potential gaps found near dead ends: 0
 NOTICE:               Intersections detected: 0
 NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
+ pgr_analyzegraph
 ------------------
  OK
 (1 row)
diff --git a/doc/queries/doc-pgr_articulationPoints.queries b/doc/queries/doc-pgr_articulationPoints.queries
index 4bbe0b6..1e8a60f 100644
--- a/doc/queries/doc-pgr_articulationPoints.queries
+++ b/doc/queries/doc-pgr_articulationPoints.queries
@@ -6,7 +6,7 @@ SET
 SELECT * FROM pgr_articulationPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table'
 );
- seq | node 
+ seq | node
 -----+------
    1 |    2
    2 |    5
@@ -18,7 +18,7 @@ SELECT * FROM pgr_articulationPoints(
 SELECT * FROM pgr_articulationPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table'
 );
- seq | node 
+ seq | node
 -----+------
    1 |    2
    2 |    5
diff --git a/doc/queries/doc-pgr_bdAstar.queries b/doc/queries/doc-pgr_bdAstar.queries
index 3940236..c547f6d 100644
--- a/doc/queries/doc-pgr_bdAstar.queries
+++ b/doc/queries/doc-pgr_bdAstar.queries
@@ -8,7 +8,7 @@ SELECT * FROM pgr_bdAstar(
     FROM edge_table',
     2, 3
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    2 |    4 |    1 |        0
    2 |        2 |    5 |    8 |    1 |        1
@@ -25,7 +25,7 @@ SELECT * FROM pgr_bdAstar(
     2, 3,
     true, heuristic := 2
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    2 |    4 |    1 |        0
    2 |        2 |    5 |    8 |    1 |        1
@@ -42,7 +42,7 @@ SELECT * FROM pgr_bdAstar(
     2, ARRAY[3, 11],
     heuristic := 3, factor := 3.5
 );
- seq | path_seq | end_vid | node | edge | cost | agg_cost 
+ seq | path_seq | end_vid | node | edge | cost | agg_cost
 -----+----------+---------+------+------+------+----------
    1 |        1 |       3 |    2 |    4 |    1 |        0
    2 |        2 |       3 |    5 |    8 |    1 |        1
@@ -63,7 +63,7 @@ SELECT * FROM pgr_bdAstar(
     ARRAY[2, 7], 3,
     false, heuristic := 4
 );
- seq | path_seq | start_vid | node | edge | cost | agg_cost 
+ seq | path_seq | start_vid | node | edge | cost | agg_cost
 -----+----------+-----------+------+------+------+----------
    1 |        1 |         2 |    2 |    2 |    1 |        0
    2 |        2 |         2 |    3 |   -1 |    0 |        1
@@ -81,7 +81,7 @@ SELECT * FROM pgr_bdAstar(
     ARRAY[2, 7], ARRAY[3, 11],
     factor := 0.5
 );
- seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost 
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
 -----+----------+-----------+---------+------+------+------+----------
    1 |        1 |         2 |       3 |    2 |    4 |    1 |        0
    2 |        2 |         2 |       3 |    5 |    8 |    1 |        1
diff --git a/doc/queries/doc-pgr_bdAstarCost.queries b/doc/queries/doc-pgr_bdAstarCost.queries
index f22ab6d..eeaa0fc 100644
--- a/doc/queries/doc-pgr_bdAstarCost.queries
+++ b/doc/queries/doc-pgr_bdAstarCost.queries
@@ -8,7 +8,7 @@ SELECT * FROM pgr_bdAstarCost(
     FROM edge_table',
     2, 3
 );
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          2 |       3 |        5
 (1 row)
@@ -20,7 +20,7 @@ SELECT * FROM pgr_bdAstarCost(
     2, 3,
     true, heuristic := 2
 );
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          2 |       3 |        5
 (1 row)
@@ -32,7 +32,7 @@ SELECT * FROM pgr_bdAstarCost(
     2, ARRAY[3, 11],
     heuristic := 3, factor := 3.5
 );
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          2 |       3 |        5
          2 |      11 |        3
@@ -45,7 +45,7 @@ SELECT * FROM pgr_bdAstarCost(
     ARRAY[2, 7], 3,
     false, heuristic := 4
 );
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          2 |       3 |        1
          7 |       3 |        4
@@ -58,7 +58,7 @@ SELECT * FROM pgr_bdAstarCost(
     ARRAY[2, 7], ARRAY[3, 11],
     factor := 0.5
 );
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          2 |       3 |        5
          2 |      11 |        3
diff --git a/doc/queries/doc-pgr_bdDijkstra.queries b/doc/queries/doc-pgr_bdDijkstra.queries
index 203ae8b..9df672f 100644
--- a/doc/queries/doc-pgr_bdDijkstra.queries
+++ b/doc/queries/doc-pgr_bdDijkstra.queries
@@ -7,7 +7,7 @@ SELECT * FROM pgr_bdDijkstra(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     2, 3
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    2 |    4 |    1 |        0
    2 |        2 |    5 |    8 |    1 |        1
@@ -23,7 +23,7 @@ SELECT * FROM pgr_bdDijkstra(
     2, 3,
     false
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    2 |    2 |    1 |        0
    2 |        2 |    3 |   -1 |    0 |        1
@@ -33,7 +33,7 @@ SELECT * FROM pgr_bdDijkstra(
 SELECT * FROM pgr_bdDijkstra(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     2, ARRAY[3, 11]);
- seq | path_seq | end_vid | node | edge | cost | agg_cost 
+ seq | path_seq | end_vid | node | edge | cost | agg_cost
 -----+----------+---------+------+------+------+----------
    1 |        1 |       3 |    2 |    4 |    1 |        0
    2 |        2 |       3 |    5 |    8 |    1 |        1
@@ -51,7 +51,7 @@ SELECT * FROM pgr_bdDijkstra(
 SELECT * FROM pgr_bdDijkstra(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     ARRAY[2, 7], 3);
- seq | path_seq | start_vid | node | edge | cost | agg_cost 
+ seq | path_seq | start_vid | node | edge | cost | agg_cost
 -----+----------+-----------+------+------+------+----------
    1 |        1 |         2 |    2 |    4 |    1 |        0
    2 |        2 |         2 |    5 |    8 |    1 |        1
@@ -72,7 +72,7 @@ SELECT * FROM pgr_bdDijkstra(
 SELECT * FROM pgr_bdDijkstra(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     ARRAY[2, 7], ARRAY[3, 11]);
- seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost 
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
 -----+----------+-----------+---------+------+------+------+----------
    1 |        1 |         2 |       3 |    2 |    4 |    1 |        0
    2 |        2 |         2 |       3 |    5 |    8 |    1 |        1
@@ -102,11 +102,11 @@ SELECT * FROM pgr_bdDijkstra(
 SELECT * FROM pgr_bdDijkstra(
     'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT FROM edge_table',
     2, 3,
-    false, 
-    false  
+    false,
+    false
 );
 NOTICE:  Deprecated Signature of pgr_bdDijkstra
- seq | id1 | id2 | cost 
+ seq | id1 | id2 | cost
 -----+-----+-----+------
    0 |   2 |   4 |    1
    1 |   5 |   8 |    1
diff --git a/doc/queries/doc-pgr_bdDijkstraCost.queries b/doc/queries/doc-pgr_bdDijkstraCost.queries
index fa75c07..abc3a6e 100644
--- a/doc/queries/doc-pgr_bdDijkstraCost.queries
+++ b/doc/queries/doc-pgr_bdDijkstraCost.queries
@@ -7,7 +7,7 @@ SELECT * FROM pgr_bdDijkstraCost(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     2, 3
 );
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          2 |       3 |        5
 (1 row)
@@ -18,7 +18,7 @@ SELECT * FROM pgr_bdDijkstraCost(
     2, 3,
     false
 );
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          2 |       3 |        1
 (1 row)
@@ -27,7 +27,7 @@ SELECT * FROM pgr_bdDijkstraCost(
 SELECT * FROM pgr_bdDijkstraCost(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     2, ARRAY[3, 11]);
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          2 |       3 |        5
          2 |      11 |        3
@@ -37,7 +37,7 @@ SELECT * FROM pgr_bdDijkstraCost(
 SELECT * FROM pgr_bdDijkstraCost(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     ARRAY[2, 7], 3);
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          2 |       3 |        5
          7 |       3 |        6
@@ -47,7 +47,7 @@ SELECT * FROM pgr_bdDijkstraCost(
 SELECT * FROM pgr_bdDijkstraCost(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     ARRAY[2, 7], ARRAY[3, 11]);
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          2 |       3 |        5
          2 |      11 |        3
diff --git a/doc/queries/doc-pgr_biconnectedComponents.queries b/doc/queries/doc-pgr_biconnectedComponents.queries
index afaa41c..183b2e7 100644
--- a/doc/queries/doc-pgr_biconnectedComponents.queries
+++ b/doc/queries/doc-pgr_biconnectedComponents.queries
@@ -6,7 +6,7 @@ SET
 SELECT * FROM pgr_biconnectedComponents(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table'
 );
- seq | component | n_seq | edge 
+ seq | component | n_seq | edge
 -----+-----------+-------+------
    1 |         1 |     1 |    1
    2 |         2 |     1 |    2
@@ -32,7 +32,7 @@ SELECT * FROM pgr_biconnectedComponents(
 SELECT * FROM pgr_biconnectedComponents(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table'
 );
- seq | component | n_seq | edge 
+ seq | component | n_seq | edge
 -----+-----------+-------+------
    1 |         1 |     1 |    1
    2 |         2 |     1 |    2
diff --git a/doc/queries/doc-pgr_boykovKolmogorov.queries b/doc/queries/doc-pgr_boykovKolmogorov.queries
index 3058de9..c9475f2 100644
--- a/doc/queries/doc-pgr_boykovKolmogorov.queries
+++ b/doc/queries/doc-pgr_boykovKolmogorov.queries
@@ -12,7 +12,7 @@ SELECT * FROM pgr_boykovKolmogorov(
     FROM edge_table'
     , 6, 11
 );
- seq | edge | start_vid | end_vid | flow | residual_capacity 
+ seq | edge | start_vid | end_vid | flow | residual_capacity
 -----+------+-----------+---------+------+-------------------
    1 |   10 |         5 |      10 |  100 |                30
    2 |    8 |         6 |       5 |  100 |                30
@@ -30,7 +30,7 @@ SELECT * FROM pgr_boykovKolmogorov(
     FROM edge_table'
     , 6, ARRAY[1, 3, 11]
 );
- seq | edge | start_vid | end_vid | flow | residual_capacity 
+ seq | edge | start_vid | end_vid | flow | residual_capacity
 -----+------+-----------+---------+------+-------------------
    1 |    1 |         2 |       1 |   50 |                80
    2 |    3 |         4 |       3 |   80 |                50
@@ -53,7 +53,7 @@ SELECT * FROM pgr_boykovKolmogorov(
     FROM edge_table'
     , ARRAY[6, 8, 12], 11
 );
- seq | edge | start_vid | end_vid | flow | residual_capacity 
+ seq | edge | start_vid | end_vid | flow | residual_capacity
 -----+------+-----------+---------+------+-------------------
    1 |   10 |         5 |      10 |  100 |                30
    2 |    8 |         6 |       5 |  100 |                30
@@ -71,7 +71,7 @@ SELECT * FROM pgr_boykovKolmogorov(
     FROM edge_table'
     , ARRAY[6, 8, 12], ARRAY[1, 3, 11]
 );
- seq | edge | start_vid | end_vid | flow | residual_capacity 
+ seq | edge | start_vid | end_vid | flow | residual_capacity
 -----+------+-----------+---------+------+-------------------
    1 |    1 |         2 |       1 |   50 |                80
    2 |    3 |         4 |       3 |   80 |                50
diff --git a/doc/queries/doc-pgr_bridges.queries b/doc/queries/doc-pgr_bridges.queries
index 649046d..fd7b907 100644
--- a/doc/queries/doc-pgr_bridges.queries
+++ b/doc/queries/doc-pgr_bridges.queries
@@ -6,7 +6,7 @@ SET
 SELECT * FROM pgr_bridges(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table'
 );
- seq | edge 
+ seq | edge
 -----+------
    1 |    1
    2 |    6
@@ -20,7 +20,7 @@ SELECT * FROM pgr_bridges(
 SELECT * FROM pgr_bridges(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table'
 );
- seq | edge 
+ seq | edge
 -----+------
    1 |    1
    2 |    6
diff --git a/doc/queries/doc-pgr_connectedComponents.queries b/doc/queries/doc-pgr_connectedComponents.queries
index da041b1..3636e0a 100644
--- a/doc/queries/doc-pgr_connectedComponents.queries
+++ b/doc/queries/doc-pgr_connectedComponents.queries
@@ -6,7 +6,7 @@ SET
 SELECT * FROM pgr_connectedComponents(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table'
 );
- seq | component | n_seq | node 
+ seq | component | n_seq | node
 -----+-----------+-------+------
    1 |         1 |     1 |    1
    2 |         1 |     2 |    2
@@ -31,7 +31,7 @@ SELECT * FROM pgr_connectedComponents(
 SELECT * FROM pgr_connectedComponents(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table'
 );
- seq | component | n_seq | node 
+ seq | component | n_seq | node
 -----+-----------+-------+------
    1 |         1 |     1 |    1
    2 |         1 |     2 |    2
diff --git a/doc/queries/doc-pgr_createTopology.queries b/doc/queries/doc-pgr_createTopology.queries
index 3b3e195..4f42f8f 100644
--- a/doc/queries/doc-pgr_createTopology.queries
+++ b/doc/queries/doc-pgr_createTopology.queries
@@ -16,7 +16,7 @@ NOTICE:  -------------> TOPOLOGY CREATED FOR  18 edges
 NOTICE:  Rows with NULL geometry or NULL id: 0
 NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
 NOTICE:  ----------------------------------------------
- pgr_createtopology 
+ pgr_createtopology
 --------------------
  OK
 (1 row)
@@ -37,7 +37,7 @@ NOTICE:  -------------> TOPOLOGY CREATED FOR  18 edges
 NOTICE:  Rows with NULL geometry or NULL id: 0
 NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
 NOTICE:  ----------------------------------------------
- pgr_createtopology 
+ pgr_createtopology
 --------------------
  OK
 (1 row)
@@ -53,7 +53,7 @@ NOTICE:  pgr_createTopology('edge_table', 0.001, 'id', 'the_geom', 'source', 'ta
 NOTICE:  Performing checks, please wait .....
 NOTICE:  ----> PGR ERROR in pgr_createTopology: Wrong type of Column id:the_geom
 NOTICE:  Unexpected error raise_exception
- pgr_createtopology 
+ pgr_createtopology
 --------------------
  FAIL
 (1 row)
@@ -68,7 +68,7 @@ UPDATE 18
 --q4
 SELECT  pgr_createTopology('edge_table', 0.001,
     the_geom:='the_geom', id:='id', source:='source', target:='target');
- pgr_createtopology 
+ pgr_createtopology
 --------------------
  OK
 (1 row)
@@ -81,7 +81,7 @@ UPDATE 18
 --q5
 SELECT  pgr_createTopology('edge_table', 0.001,
     source:='source', id:='id', target:='target', the_geom:='the_geom');
- pgr_createtopology 
+ pgr_createtopology
 --------------------
  OK
 (1 row)
@@ -93,7 +93,7 @@ UPDATE edge_table SET source = NULL,  target = NULL;
 UPDATE 18
 --q6
 SELECT  pgr_createTopology('edge_table', 0.001, source:='source');
- pgr_createtopology 
+ pgr_createtopology
 --------------------
  OK
 (1 row)
@@ -101,7 +101,7 @@ SELECT  pgr_createTopology('edge_table', 0.001, source:='source');
 --q6.1
 --q7
 SELECT  pgr_createTopology('edge_table', 0.001, rows_where:='id < 10');
- pgr_createtopology 
+ pgr_createtopology
 --------------------
  OK
 (1 row)
@@ -110,7 +110,7 @@ SELECT  pgr_createTopology('edge_table', 0.001, rows_where:='id < 10');
 --q8
 SELECT  pgr_createTopology('edge_table', 0.001,
     rows_where:='the_geom && (SELECT st_buffer(the_geom, 0.05) FROM edge_table WHERE id=5)');
- pgr_createtopology 
+ pgr_createtopology
 --------------------
  OK
 (1 row)
@@ -121,7 +121,7 @@ CREATE TABLE otherTable AS  (SELECT 100 AS gid,  st_point(2.5, 2.5) AS other_geo
 SELECT 1
 SELECT  pgr_createTopology('edge_table', 0.001,
     rows_where:='the_geom && (SELECT st_buffer(other_geom, 1) FROM otherTable WHERE gid=100)');
- pgr_createtopology 
+ pgr_createtopology
 --------------------
  OK
 (1 row)
@@ -133,7 +133,7 @@ SELECT 18
 --q10.1
 --q11
 SELECT  pgr_createTopology('mytable', 0.001, 'mygeom', 'gid', 'src', 'tgt', clean := TRUE);
- pgr_createtopology 
+ pgr_createtopology
 --------------------
  OK
 (1 row)
@@ -152,7 +152,7 @@ NOTICE:  pgr_createTopology('mytable', 0.001, 'gid', 'mygeom', 'src', 'tgt', row
 NOTICE:  Performing checks, please wait .....
 NOTICE:  ----> PGR ERROR in pgr_createTopology: Wrong type of Column id:mygeom
 NOTICE:  Unexpected error raise_exception
- pgr_createtopology 
+ pgr_createtopology
 --------------------
  FAIL
 (1 row)
@@ -162,7 +162,7 @@ SET client_min_messages TO WARNING;
 SET
 --q13
 SELECT  pgr_createTopology('mytable', 0.001, the_geom:='mygeom', id:='gid', source:='src', target:='tgt');
- pgr_createtopology 
+ pgr_createtopology
 --------------------
  OK
 (1 row)
@@ -174,7 +174,7 @@ UPDATE mytable SET src = NULL,  tgt = NULL;
 UPDATE 18
 --q14
 SELECT  pgr_createTopology('mytable', 0.001, source:='src', id:='gid', target:='tgt', the_geom:='mygeom');
- pgr_createtopology 
+ pgr_createtopology
 --------------------
  OK
 (1 row)
@@ -182,27 +182,27 @@ SELECT  pgr_createTopology('mytable', 0.001, source:='src', id:='gid', target:='
 --q14.1
 --q15
 SELECT  pgr_createTopology('mytable', 0.001, 'mygeom', 'gid', 'src', 'tgt', rows_where:='gid < 10');
- pgr_createtopology 
+ pgr_createtopology
 --------------------
  OK
 (1 row)
 
 SELECT  pgr_createTopology('mytable', 0.001, source:='src', id:='gid', target:='tgt', the_geom:='mygeom', rows_where:='gid < 10');
- pgr_createtopology 
+ pgr_createtopology
 --------------------
  OK
 (1 row)
 
 SELECT  pgr_createTopology('mytable', 0.001, 'mygeom', 'gid', 'src', 'tgt',
     rows_where:='mygeom && (SELECT st_buffer(mygeom, 1) FROM mytable WHERE gid=5)');
- pgr_createtopology 
+ pgr_createtopology
 --------------------
  OK
 (1 row)
 
 SELECT  pgr_createTopology('mytable', 0.001, source:='src', id:='gid', target:='tgt', the_geom:='mygeom',
     rows_where:='mygeom && (SELECT st_buffer(mygeom, 1) FROM mytable WHERE gid=5)');
- pgr_createtopology 
+ pgr_createtopology
 --------------------
  OK
 (1 row)
@@ -211,14 +211,14 @@ SELECT  pgr_createTopology('mytable', 0.001, source:='src', id:='gid', target:='
 --q16
 SELECT  pgr_createTopology('mytable', 0.001, 'mygeom', 'gid', 'src', 'tgt',
     rows_where:='mygeom && (SELECT st_buffer(other_geom, 1) FROM otherTable WHERE gid=100)');
- pgr_createtopology 
+ pgr_createtopology
 --------------------
  OK
 (1 row)
 
 SELECT  pgr_createTopology('mytable', 0.001, source:='src', id:='gid', target:='tgt', the_geom:='mygeom',
     rows_where:='mygeom && (SELECT st_buffer(other_geom, 1) FROM otherTable WHERE gid=100)');
- pgr_createtopology 
+ pgr_createtopology
 --------------------
  OK
 (1 row)
@@ -236,7 +236,7 @@ NOTICE:  -------------> TOPOLOGY CREATED FOR  5 edges
 NOTICE:  Rows with NULL geometry or NULL id: 0
 NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
 NOTICE:  ----------------------------------------------
- pgr_createtopology 
+ pgr_createtopology
 --------------------
  OK
 (1 row)
@@ -250,7 +250,7 @@ NOTICE:  -------------> TOPOLOGY CREATED FOR  13 edges
 NOTICE:  Rows with NULL geometry or NULL id: 0
 NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
 NOTICE:  ----------------------------------------------
- pgr_createtopology 
+ pgr_createtopology
 --------------------
  OK
 (1 row)
diff --git a/doc/queries/doc-pgr_dijkstra.queries b/doc/queries/doc-pgr_dijkstra.queries
index 285e4ab..4a3741d 100644
--- a/doc/queries/doc-pgr_dijkstra.queries
+++ b/doc/queries/doc-pgr_dijkstra.queries
@@ -7,7 +7,7 @@ SELECT * FROM pgr_dijkstra(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     2, 3
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    2 |    4 |    1 |        0
    2 |        2 |    5 |    8 |    1 |        1
@@ -23,7 +23,7 @@ SELECT * FROM pgr_dijkstra(
     2, 3,
     FALSE
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    2 |    2 |    1 |        0
    2 |        2 |    3 |   -1 |    0 |        1
@@ -35,7 +35,7 @@ SELECT * FROM pgr_dijkstra(
     2, ARRAY[3,5],
     FALSE
 );
- seq | path_seq | end_vid | node | edge | cost | agg_cost 
+ seq | path_seq | end_vid | node | edge | cost | agg_cost
 -----+----------+---------+------+------+------+----------
    1 |        1 |       3 |    2 |    4 |    1 |        0
    2 |        2 |       3 |    5 |    8 |    1 |        1
@@ -50,7 +50,7 @@ SELECT * FROM pgr_dijkstra(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     ARRAY[2,11], 5
 );
- seq | path_seq | start_vid | node | edge | cost | agg_cost 
+ seq | path_seq | start_vid | node | edge | cost | agg_cost
 -----+----------+-----------+------+------+------+----------
    1 |        1 |         2 |    2 |    4 |    1 |        0
    2 |        2 |         2 |    5 |   -1 |    0 |        1
@@ -67,7 +67,7 @@ SELECT * FROM pgr_dijkstra(
     ARRAY[2,11], ARRAY[3,5],
     FALSE
 );
- seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost 
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
 -----+----------+-----------+---------+------+------+------+----------
    1 |        1 |         2 |       3 |    2 |    2 |    1 |        0
    2 |        2 |         2 |       3 |    3 |   -1 |    0 |        1
@@ -87,7 +87,7 @@ SELECT * FROM pgr_dijkstra(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     2, 3
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    2 |    4 |    1 |        0
    2 |        2 |    5 |    8 |    1 |        1
@@ -101,7 +101,7 @@ SELECT * FROM pgr_dijkstra(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     2, 5
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    2 |    4 |    1 |        0
    2 |        2 |    5 |   -1 |    0 |        1
@@ -111,7 +111,7 @@ SELECT * FROM pgr_dijkstra(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     2, ARRAY[3,5]
 );
- seq | path_seq | end_vid | node | edge | cost | agg_cost 
+ seq | path_seq | end_vid | node | edge | cost | agg_cost
 -----+----------+---------+------+------+------+----------
    1 |        1 |       3 |    2 |    4 |    1 |        0
    2 |        2 |       3 |    5 |    8 |    1 |        1
@@ -127,7 +127,7 @@ SELECT * FROM pgr_dijkstra(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     11, 3
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |   11 |   13 |    1 |        0
    2 |        2 |   12 |   15 |    1 |        1
@@ -140,7 +140,7 @@ SELECT * FROM pgr_dijkstra(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     11, 5
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |   11 |   13 |    1 |        0
    2 |        2 |   12 |   15 |    1 |        1
@@ -153,7 +153,7 @@ SELECT * FROM pgr_dijkstra(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     ARRAY[2,11], 5
 );
- seq | path_seq | start_vid | node | edge | cost | agg_cost 
+ seq | path_seq | start_vid | node | edge | cost | agg_cost
 -----+----------+-----------+------+------+------+----------
    1 |        1 |         2 |    2 |    4 |    1 |        0
    2 |        2 |         2 |    5 |   -1 |    0 |        1
@@ -168,7 +168,7 @@ SELECT * FROM pgr_dijkstra(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     ARRAY[2, 11], ARRAY[3,5]
 );
- seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost 
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
 -----+----------+-----------+---------+------+------+------+----------
    1 |        1 |         2 |       3 |    2 |    4 |    1 |        0
    2 |        2 |         2 |       3 |    5 |    8 |    1 |        1
@@ -197,7 +197,7 @@ SELECT * FROM pgr_dijkstra(
     2, 3,
     FALSE
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    2 |    2 |    1 |        0
    2 |        2 |    3 |   -1 |    0 |        1
@@ -208,7 +208,7 @@ SELECT * FROM pgr_dijkstra(
     2, 5,
     FALSE
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    2 |    4 |    1 |        0
    2 |        2 |    5 |   -1 |    0 |        1
@@ -219,7 +219,7 @@ SELECT * FROM pgr_dijkstra(
     11, 3,
     FALSE
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |   11 |   11 |    1 |        0
    2 |        2 |    6 |    5 |    1 |        1
@@ -231,7 +231,7 @@ SELECT * FROM pgr_dijkstra(
     11, 5,
     FALSE
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |   11 |   11 |    1 |        0
    2 |        2 |    6 |    8 |    1 |        1
@@ -243,7 +243,7 @@ SELECT * FROM pgr_dijkstra(
     ARRAY[2,11], 5,
     FALSE
 );
- seq | path_seq | start_vid | node | edge | cost | agg_cost 
+ seq | path_seq | start_vid | node | edge | cost | agg_cost
 -----+----------+-----------+------+------+------+----------
    1 |        1 |         2 |    2 |    4 |    1 |        0
    2 |        2 |         2 |    5 |   -1 |    0 |        1
@@ -257,7 +257,7 @@ SELECT * FROM pgr_dijkstra(
     2, ARRAY[3,5],
     FALSE
 );
- seq | path_seq | end_vid | node | edge | cost | agg_cost 
+ seq | path_seq | end_vid | node | edge | cost | agg_cost
 -----+----------+---------+------+------+------+----------
    1 |        1 |       3 |    2 |    2 |    1 |        0
    2 |        2 |       3 |    3 |   -1 |    0 |        1
@@ -270,7 +270,7 @@ SELECT * FROM pgr_dijkstra(
     ARRAY[2, 11], ARRAY[3,5],
     FALSE
 );
- seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost 
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
 -----+----------+-----------+---------+------+------+------+----------
    1 |        1 |         2 |       3 |    2 |    2 |    1 |        0
    2 |        2 |         2 |       3 |    3 |   -1 |    0 |        1
@@ -290,7 +290,7 @@ SELECT * FROM pgr_dijkstra(
     'SELECT id, source, target, cost FROM edge_table',
     2, 3
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
 (0 rows)
 
@@ -298,7 +298,7 @@ SELECT * FROM pgr_dijkstra(
     'SELECT id, source, target, cost FROM edge_table',
     2, 5
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    2 |    4 |    1 |        0
    2 |        2 |    5 |   -1 |    0 |        1
@@ -308,7 +308,7 @@ SELECT * FROM pgr_dijkstra(
     'SELECT id, source, target, cost FROM edge_table',
     11, 3
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
 (0 rows)
 
@@ -316,7 +316,7 @@ SELECT * FROM pgr_dijkstra(
     'SELECT id, source, target, cost FROM edge_table',
     11, 5
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
 (0 rows)
 
@@ -324,7 +324,7 @@ SELECT * FROM pgr_dijkstra(
     'SELECT id, source, target, cost FROM edge_table',
     ARRAY[2,11], 5
 );
- seq | path_seq | start_vid | node | edge | cost | agg_cost 
+ seq | path_seq | start_vid | node | edge | cost | agg_cost
 -----+----------+-----------+------+------+------+----------
    1 |        1 |         2 |    2 |    4 |    1 |        0
    2 |        2 |         2 |    5 |   -1 |    0 |        1
@@ -334,7 +334,7 @@ SELECT * FROM pgr_dijkstra(
     'SELECT id, source, target, cost FROM edge_table',
     2, ARRAY[3,5]
 );
- seq | path_seq | end_vid | node | edge | cost | agg_cost 
+ seq | path_seq | end_vid | node | edge | cost | agg_cost
 -----+----------+---------+------+------+------+----------
    1 |        1 |       5 |    2 |    4 |    1 |        0
    2 |        2 |       5 |    5 |   -1 |    0 |        1
@@ -344,7 +344,7 @@ SELECT * FROM pgr_dijkstra(
     'SELECT id, source, target, cost FROM edge_table',
     ARRAY[2, 11], ARRAY[3,5]
 );
- seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost 
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
 -----+----------+-----------+---------+------+------+------+----------
    1 |        1 |         2 |       5 |    2 |    4 |    1 |        0
    2 |        2 |         2 |       5 |    5 |   -1 |    0 |        1
@@ -357,7 +357,7 @@ SELECT * FROM pgr_dijkstra(
     2, 3,
     FALSE
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    2 |    4 |    1 |        0
    2 |        2 |    5 |    8 |    1 |        1
@@ -370,7 +370,7 @@ SELECT * FROM pgr_dijkstra(
     2, 5,
     FALSE
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    2 |    4 |    1 |        0
    2 |        2 |    5 |   -1 |    0 |        1
@@ -381,7 +381,7 @@ SELECT * FROM pgr_dijkstra(
     11, 3,
     FALSE
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |   11 |   11 |    1 |        0
    2 |        2 |    6 |    5 |    1 |        1
@@ -393,7 +393,7 @@ SELECT * FROM pgr_dijkstra(
     11, 5,
     FALSE
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |   11 |   11 |    1 |        0
    2 |        2 |    6 |    8 |    1 |        1
@@ -405,7 +405,7 @@ SELECT * FROM pgr_dijkstra(
     ARRAY[2,11], 5,
     FALSE
 );
- seq | path_seq | start_vid | node | edge | cost | agg_cost 
+ seq | path_seq | start_vid | node | edge | cost | agg_cost
 -----+----------+-----------+------+------+------+----------
    1 |        1 |         2 |    2 |    4 |    1 |        0
    2 |        2 |         2 |    5 |   -1 |    0 |        1
@@ -419,7 +419,7 @@ SELECT * FROM pgr_dijkstra(
     2, ARRAY[3,5],
     FALSE
 );
- seq | path_seq | end_vid | node | edge | cost | agg_cost 
+ seq | path_seq | end_vid | node | edge | cost | agg_cost
 -----+----------+---------+------+------+------+----------
    1 |        1 |       3 |    2 |    4 |    1 |        0
    2 |        2 |       3 |    5 |    8 |    1 |        1
@@ -434,7 +434,7 @@ SELECT * FROM pgr_dijkstra(
     ARRAY[2, 11], ARRAY[3,5],
     FALSE
 );
- seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost 
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
 -----+----------+-----------+---------+------+------+------+----------
    1 |        1 |         2 |       3 |    2 |    4 |    1 |        0
    2 |        2 |         2 |       3 |    5 |    8 |    1 |        1
@@ -455,9 +455,9 @@ SELECT * FROM pgr_dijkstra(
 SELECT * FROM pgr_dijkstra(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     2, 3,
-    TRUE     
+    TRUE
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    2 |    4 |    1 |        0
    2 |        2 |    5 |    8 |    1 |        1
@@ -469,9 +469,9 @@ SELECT * FROM pgr_dijkstra(
 
 SELECT * FROM pgr_dijkstra(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2,3 
+    2,3
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    2 |    4 |    1 |        0
    2 |        2 |    5 |    8 |    1 |        1
@@ -484,9 +484,9 @@ SELECT * FROM pgr_dijkstra(
 SELECT * FROM pgr_dijkstra(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     2, ARRAY[3],
-    TRUE     
+    TRUE
 );
- seq | path_seq | end_vid | node | edge | cost | agg_cost 
+ seq | path_seq | end_vid | node | edge | cost | agg_cost
 -----+----------+---------+------+------+------+----------
    1 |        1 |       3 |    2 |    4 |    1 |        0
    2 |        2 |       3 |    5 |    8 |    1 |        1
@@ -500,7 +500,7 @@ SELECT * FROM pgr_dijkstra(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     2, ARRAY[3]
 );
- seq | path_seq | end_vid | node | edge | cost | agg_cost 
+ seq | path_seq | end_vid | node | edge | cost | agg_cost
 -----+----------+---------+------+------+------+----------
    1 |        1 |       3 |    2 |    4 |    1 |        0
    2 |        2 |       3 |    5 |    8 |    1 |        1
@@ -515,7 +515,7 @@ SELECT * FROM pgr_dijkstra(
     ARRAY[2], ARRAY[3],
     TRUE
 );
- seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost 
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
 -----+----------+-----------+---------+------+------+------+----------
    1 |        1 |         2 |       3 |    2 |    4 |    1 |        0
    2 |        2 |         2 |       3 |    5 |    8 |    1 |        1
@@ -529,7 +529,7 @@ SELECT * FROM pgr_dijkstra(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     ARRAY[2], ARRAY[3]
 );
- seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost 
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
 -----+----------+-----------+---------+------+------+------+----------
    1 |        1 |         2 |       3 |    2 |    4 |    1 |        0
    2 |        2 |         2 |       3 |    5 |    8 |    1 |        1
@@ -544,9 +544,9 @@ SELECT * FROM pgr_dijkstra(
 SELECT * FROM pgr_dijkstra(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     2, 3,
-    FALSE     
+    FALSE
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    2 |    2 |    1 |        0
    2 |        2 |    3 |   -1 |    0 |        1
@@ -555,9 +555,9 @@ SELECT * FROM pgr_dijkstra(
 SELECT * FROM pgr_dijkstra(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     2, ARRAY[3],
-    FALSE     
+    FALSE
 );
- seq | path_seq | end_vid | node | edge | cost | agg_cost 
+ seq | path_seq | end_vid | node | edge | cost | agg_cost
 -----+----------+---------+------+------+------+----------
    1 |        1 |       3 |    2 |    2 |    1 |        0
    2 |        2 |       3 |    3 |   -1 |    0 |        1
@@ -568,7 +568,7 @@ SELECT * FROM pgr_dijkstra(
     ARRAY[2], 3,
     FALSE
 );
- seq | path_seq | start_vid | node | edge | cost | agg_cost 
+ seq | path_seq | start_vid | node | edge | cost | agg_cost
 -----+----------+-----------+------+------+------+----------
    1 |        1 |         2 |    2 |    2 |    1 |        0
    2 |        2 |         2 |    3 |   -1 |    0 |        1
@@ -579,7 +579,7 @@ SELECT * FROM pgr_dijkstra(
     ARRAY[2], ARRAY[3],
     FALSE
 );
- seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost 
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
 -----+----------+-----------+---------+------+------+------+----------
    1 |        1 |         2 |       3 |    2 |    2 |    1 |        0
    2 |        2 |         2 |       3 |    3 |   -1 |    0 |        1
diff --git a/doc/queries/doc-pgr_dijkstraCost.queries b/doc/queries/doc-pgr_dijkstraCost.queries
index ddb9a9b..d7b9d77 100644
--- a/doc/queries/doc-pgr_dijkstraCost.queries
+++ b/doc/queries/doc-pgr_dijkstraCost.queries
@@ -6,7 +6,7 @@ SET
 SELECT * FROM pgr_dijkstraCost(
     'select id, source, target, cost, reverse_cost from edge_table',
     2, 3);
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          2 |       3 |        5
 (1 row)
@@ -15,7 +15,7 @@ SELECT * FROM pgr_dijkstraCost(
 SELECT * FROM pgr_dijkstraCost(
     'select id, source, target, cost, reverse_cost from edge_table',
     2, 3, false);
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          2 |       3 |        1
 (1 row)
@@ -24,7 +24,7 @@ SELECT * FROM pgr_dijkstraCost(
 SELECT * FROM pgr_dijkstraCost(
     'select id, source, target, cost, reverse_cost from edge_table',
     ARRAY[2, 7], 3);
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          2 |       3 |        5
          7 |       3 |        6
@@ -34,7 +34,7 @@ SELECT * FROM pgr_dijkstraCost(
 SELECT * FROM pgr_dijkstraCost(
     'select id, source, target, cost, reverse_cost from edge_table',
     2, ARRAY[3, 11]);
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          2 |       3 |        5
          2 |      11 |        3
@@ -44,7 +44,7 @@ SELECT * FROM pgr_dijkstraCost(
 SELECT * FROM pgr_dijkstraCost(
     'select id, source, target, cost, reverse_cost from edge_table',
     ARRAY[2, 7], ARRAY[3, 11]);
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          2 |       3 |        5
          2 |      11 |        3
@@ -56,7 +56,7 @@ SELECT * FROM pgr_dijkstraCost(
 SELECT * FROM pgr_dijkstraCost(
         'select id, source, target, cost, reverse_cost from edge_table',
             ARRAY[5, 3, 4, 3, 3, 4], ARRAY[3, 5, 3, 4]);
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          3 |       4 |        3
          3 |       5 |        2
@@ -70,7 +70,7 @@ SELECT * FROM pgr_dijkstraCost(
 SELECT * FROM pgr_dijkstraCost(
         'select id, source, target, cost, reverse_cost from edge_table',
             ARRAY[5, 3, 4], ARRAY[5, 3, 4]);
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          3 |       4 |        3
          3 |       5 |        2
diff --git a/doc/queries/doc-pgr_dijkstraVia.queries b/doc/queries/doc-pgr_dijkstraVia.queries
index 241fd80..8b8add1 100644
--- a/doc/queries/doc-pgr_dijkstraVia.queries
+++ b/doc/queries/doc-pgr_dijkstraVia.queries
@@ -7,7 +7,7 @@ SELECT * FROM pgr_dijkstraVia(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
     ARRAY[1, 3, 9]
 );
- seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost 
+ seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost
 -----+---------+----------+-----------+---------+------+------+------+----------+----------------
    1 |       1 |        1 |         1 |       3 |    1 |    1 |    1 |        0 |              0
    2 |       1 |        2 |         1 |       3 |    2 |    4 |    1 |        1 |              1
@@ -26,7 +26,7 @@ SELECT * FROM pgr_dijkstraVia(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
     ARRAY[1, 3, 9], false, strict:=true, U_turn_on_edge:=false
 );
- seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost 
+ seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost
 -----+---------+----------+-----------+---------+------+------+------+----------+----------------
    1 |       1 |        1 |         1 |       3 |    1 |    1 |    1 |        0 |              0
    2 |       1 |        2 |         1 |       3 |    2 |    2 |    1 |        1 |              1
@@ -41,7 +41,7 @@ SELECT * FROM pgr_dijkstraVia(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
     ARRAY[1, 5, 3, 9, 4]
 );
- seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost 
+ seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost
 -----+---------+----------+-----------+---------+------+------+------+----------+----------------
    1 |       1 |        1 |         1 |       5 |    1 |    1 |    1 |        0 |              0
    2 |       1 |        2 |         1 |       5 |    2 |    4 |    1 |        1 |              1
@@ -62,9 +62,9 @@ SELECT * FROM pgr_dijkstraVia(
 SELECT agg_cost FROM  pgr_dijkstraVia(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
     ARRAY[1, 5, 3, 9, 4]
-) 
+)
 WHERE path_id = 3 AND edge <0;
- agg_cost 
+ agg_cost
 ----------
         2
 (1 row)
@@ -75,19 +75,19 @@ SELECT route_agg_cost FROM  pgr_dijkstraVia(
     ARRAY[1, 5, 3, 9, 4]
 )
 WHERE path_id = 3 AND edge < 0;
- route_agg_cost 
+ route_agg_cost
 ----------------
               8
 (1 row)
 
 -- q4
-SELECT row_number() over () as node_seq, node 
+SELECT row_number() over () as node_seq, node
 FROM  pgr_dijkstraVia(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
     ARRAY[1, 5, 3, 9, 4]
-) 
+)
 WHERE edge <> -1 ORDER BY seq;
- node_seq | node 
+ node_seq | node
 ----------+------
         1 |    1
         2 |    2
@@ -105,9 +105,9 @@ WHERE edge <> -1 ORDER BY seq;
 SELECT path_id, route_agg_cost FROM  pgr_dijkstraVia(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
     ARRAY[1, 5, 3, 9, 4]
-) 
+)
 WHERE edge < 0;
- path_id | route_agg_cost 
+ path_id | route_agg_cost
 ---------+----------------
        1 |              2
        2 |              6
@@ -124,7 +124,7 @@ FROM  pgr_dijkstraVia(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
     ARRAY[1, 5, 3, 9, 4])
 WHERE node = 9 and (agg_cost  <> 0 or seq = 1);
- seq | route_agg_cost | node | agg_cost |     status      
+ seq | route_agg_cost | node | agg_cost |     status
 -----+----------------+------+----------+-----------------
    6 |              4 |    9 |        2 | passes in front
   11 |              8 |    9 |        2 | visits
diff --git a/doc/queries/doc-pgr_drivingDistance.queries b/doc/queries/doc-pgr_drivingDistance.queries
index 83759bf..8758273 100644
--- a/doc/queries/doc-pgr_drivingDistance.queries
+++ b/doc/queries/doc-pgr_drivingDistance.queries
@@ -7,7 +7,7 @@ SELECT * FROM pgr_drivingDistance(
         'SELECT id, source, target, cost, reverse_cost FROM edge_table',
         2, 3
       );
- seq | node | edge | cost | agg_cost 
+ seq | node | edge | cost | agg_cost
 -----+------+------+------+----------
    1 |    2 |   -1 |    0 |        0
    2 |    1 |    1 |    1 |        1
@@ -25,7 +25,7 @@ SELECT * FROM pgr_drivingDistance(
         'SELECT id, source, target, cost, reverse_cost FROM edge_table',
         13, 3
       );
- seq | node | edge | cost | agg_cost 
+ seq | node | edge | cost | agg_cost
 -----+------+------+------+----------
    1 |   13 |   -1 |    0 |        0
    2 |   10 |   14 |    1 |        1
@@ -41,7 +41,7 @@ SELECT * FROM pgr_drivingDistance(
         'SELECT id, source, target, cost, reverse_cost FROM edge_table',
         array[2,13], 3
       );
- seq | from_v | node | edge | cost | agg_cost 
+ seq | from_v | node | edge | cost | agg_cost
 -----+--------+------+------+------+----------
    1 |      2 |    2 |   -1 |    0 |        0
    2 |      2 |    1 |    1 |    1 |        1
@@ -67,7 +67,7 @@ SELECT * FROM pgr_drivingDistance(
         'SELECT id, source, target, cost, reverse_cost FROM edge_table',
         array[2,13], 3, equicost:=true
       );
- seq | from_v | node | edge | cost | agg_cost 
+ seq | from_v | node | edge | cost | agg_cost
 -----+--------+------+------+------+----------
    1 |      2 |    2 |   -1 |    0 |        0
    2 |      2 |    1 |    1 |    1 |        1
@@ -87,7 +87,7 @@ SELECT * FROM pgr_drivingDistance(
         'SELECT id, source, target, cost, reverse_cost FROM edge_table',
         2, 3, false
       );
- seq | node | edge | cost | agg_cost 
+ seq | node | edge | cost | agg_cost
 -----+------+------+------+----------
    1 |    2 |   -1 |    0 |        0
    2 |    1 |    1 |    1 |        1
@@ -107,7 +107,7 @@ SELECT * FROM pgr_drivingDistance(
         'SELECT id, source, target, cost, reverse_cost FROM edge_table',
         13, 3, false
       );
- seq | node | edge | cost | agg_cost 
+ seq | node | edge | cost | agg_cost
 -----+------+------+------+----------
    1 |   13 |   -1 |    0 |        0
    2 |   10 |   14 |    1 |        1
@@ -123,7 +123,7 @@ SELECT * FROM pgr_drivingDistance(
         'SELECT id, source, target, cost, reverse_cost FROM edge_table',
         array[2,13], 3, false
       );
- seq | from_v | node | edge | cost | agg_cost 
+ seq | from_v | node | edge | cost | agg_cost
 -----+--------+------+------+------+----------
    1 |      2 |    2 |   -1 |    0 |        0
    2 |      2 |    1 |    1 |    1 |        1
@@ -151,7 +151,7 @@ SELECT * FROM pgr_drivingDistance(
         'SELECT id, source, target, cost, reverse_cost FROM edge_table',
         array[2,13], 3, false, equicost:=true
       );
- seq | from_v | node | edge | cost | agg_cost 
+ seq | from_v | node | edge | cost | agg_cost
 -----+--------+------+------+------+----------
    1 |      2 |    2 |   -1 |    0 |        0
    2 |      2 |    1 |    1 |    1 |        1
@@ -173,7 +173,7 @@ SELECT * FROM pgr_drivingDistance(
         'SELECT id, source, target, cost FROM edge_table',
         2, 3
       );
- seq | node | edge | cost | agg_cost 
+ seq | node | edge | cost | agg_cost
 -----+------+------+------+----------
    1 |    2 |   -1 |    0 |        0
    2 |    5 |    4 |    1 |        1
@@ -188,7 +188,7 @@ SELECT * FROM pgr_drivingDistance(
         'SELECT id, source, target, cost FROM edge_table',
         13, 3
       );
- seq | node | edge | cost | agg_cost 
+ seq | node | edge | cost | agg_cost
 -----+------+------+------+----------
    1 |   13 |   -1 |    0 |        0
 (1 row)
@@ -197,7 +197,7 @@ SELECT * FROM pgr_drivingDistance(
         'SELECT id, source, target, cost FROM edge_table',
         array[2,13], 3
       );
- seq | from_v | node | edge | cost | agg_cost 
+ seq | from_v | node | edge | cost | agg_cost
 -----+--------+------+------+------+----------
    1 |      2 |    2 |   -1 |    0 |        0
    2 |      2 |    5 |    4 |    1 |        1
@@ -213,7 +213,7 @@ SELECT * FROM pgr_drivingDistance(
         'SELECT id, source, target, cost FROM edge_table',
         array[2,13], 3, equicost:=true
       );
- seq | from_v | node | edge | cost | agg_cost 
+ seq | from_v | node | edge | cost | agg_cost
 -----+--------+------+------+------+----------
    1 |      2 |    2 |   -1 |    0 |        0
    2 |      2 |    5 |    4 |    1 |        1
@@ -229,7 +229,7 @@ SELECT * FROM pgr_drivingDistance(
         'SELECT id, source, target, cost FROM edge_table',
         2, 3, false
       );
- seq | node | edge | cost | agg_cost 
+ seq | node | edge | cost | agg_cost
 -----+------+------+------+----------
    1 |    2 |   -1 |    0 |        0
    2 |    1 |    1 |    1 |        1
@@ -248,7 +248,7 @@ SELECT * FROM pgr_drivingDistance(
         'SELECT id, source, target, cost FROM edge_table',
         13, 3, false
       );
- seq | node | edge | cost | agg_cost 
+ seq | node | edge | cost | agg_cost
 -----+------+------+------+----------
    1 |   13 |   -1 |    0 |        0
    2 |   10 |   14 |    1 |        1
@@ -264,7 +264,7 @@ SELECT * FROM pgr_drivingDistance(
         'SELECT id, source, target, cost FROM edge_table',
         array[2,13], 3, false
       );
- seq | from_v | node | edge | cost | agg_cost 
+ seq | from_v | node | edge | cost | agg_cost
 -----+--------+------+------+------+----------
    1 |      2 |    2 |   -1 |    0 |        0
    2 |      2 |    1 |    1 |    1 |        1
@@ -291,7 +291,7 @@ SELECT * FROM pgr_drivingDistance(
         'SELECT id, source, target, cost FROM edge_table',
         array[2,13], 3, false, equicost:=true
       );
- seq | from_v | node | edge | cost | agg_cost 
+ seq | from_v | node | edge | cost | agg_cost
 -----+--------+------+------+------+----------
    1 |      2 |    2 |   -1 |    0 |        0
    2 |      2 |    1 |    1 |    1 |        1
diff --git a/doc/queries/doc-pgr_edgeDisjointPaths.queries b/doc/queries/doc-pgr_edgeDisjointPaths.queries
index be2f812..3f9b3a6 100644
--- a/doc/queries/doc-pgr_edgeDisjointPaths.queries
+++ b/doc/queries/doc-pgr_edgeDisjointPaths.queries
@@ -7,7 +7,7 @@ SELECT * FROM pgr_edgeDisjointPaths(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     3, 5
 );
- seq | path_id | path_seq | node | edge | cost | agg_cost 
+ seq | path_id | path_seq | node | edge | cost | agg_cost
 -----+---------+----------+------+------+------+----------
    1 |       1 |        1 |    3 |    2 |    1 |        0
    2 |       1 |        2 |    2 |    4 |    1 |        1
@@ -23,7 +23,7 @@ SELECT * FROM pgr_edgeDisjointPaths(
     3, 5,
     directed := false
 );
- seq | path_id | path_seq | node | edge | cost | agg_cost 
+ seq | path_id | path_seq | node | edge | cost | agg_cost
 -----+---------+----------+------+------+------+----------
    1 |       1 |        1 |    3 |    2 |    1 |        0
    2 |       1 |        2 |    2 |    4 |    1 |        1
@@ -45,7 +45,7 @@ SELECT * FROM pgr_edgeDisjointPaths(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     3, ARRAY[4, 5, 10]
 );
- seq | path_id | path_seq | end_vid | node | edge | cost | agg_cost 
+ seq | path_id | path_seq | end_vid | node | edge | cost | agg_cost
 -----+---------+----------+---------+------+------+------+----------
    1 |       1 |        1 |       4 |    3 |    5 |    1 |        0
    2 |       1 |        2 |       4 |    6 |    9 |    1 |        1
@@ -68,7 +68,7 @@ SELECT * FROM pgr_edgeDisjointPaths(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     ARRAY[3, 6], 5
 );
- seq | path_id | path_seq | start_vid | node | edge | cost | agg_cost 
+ seq | path_id | path_seq | start_vid | node | edge | cost | agg_cost
 -----+---------+----------+-----------+------+------+------+----------
    1 |       1 |        1 |         0 |    3 |    2 |    1 |        0
    2 |       1 |        2 |         0 |    2 |    4 |    1 |        1
@@ -91,7 +91,7 @@ SELECT * FROM pgr_edgeDisjointPaths(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     ARRAY[3, 6], ARRAY[4, 5, 10]
 );
- seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost 
+ seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
 -----+---------+----------+-----------+---------+------+------+------+----------
    1 |       1 |        1 |         0 |       4 |    3 |    5 |    1 |        0
    2 |       1 |        2 |         0 |       4 |    6 |    9 |    1 |        1
diff --git a/doc/queries/doc-pgr_edmondsKarp.queries b/doc/queries/doc-pgr_edmondsKarp.queries
index c24d3bf..4a5aff5 100644
--- a/doc/queries/doc-pgr_edmondsKarp.queries
+++ b/doc/queries/doc-pgr_edmondsKarp.queries
@@ -12,7 +12,7 @@ SELECT * FROM pgr_edmondsKarp(
     FROM edge_table'
     , 6, 11
 );
- seq | edge | start_vid | end_vid | flow | residual_capacity 
+ seq | edge | start_vid | end_vid | flow | residual_capacity
 -----+------+-----------+---------+------+-------------------
    1 |   10 |         5 |      10 |  100 |                30
    2 |    8 |         6 |       5 |  100 |                30
@@ -30,7 +30,7 @@ SELECT * FROM pgr_edmondsKarp(
     FROM edge_table'
    , 6, ARRAY[1, 3, 11]
 );
- seq | edge | start_vid | end_vid | flow | residual_capacity 
+ seq | edge | start_vid | end_vid | flow | residual_capacity
 -----+------+-----------+---------+------+-------------------
    1 |    1 |         2 |       1 |   50 |                80
    2 |    3 |         4 |       3 |   80 |                50
@@ -53,7 +53,7 @@ SELECT * FROM pgr_edmondsKarp(
     FROM edge_table'
    , ARRAY[6, 8, 12], 11
 );
- seq | edge | start_vid | end_vid | flow | residual_capacity 
+ seq | edge | start_vid | end_vid | flow | residual_capacity
 -----+------+-----------+---------+------+-------------------
    1 |   10 |         5 |      10 |  100 |                30
    2 |    8 |         6 |       5 |  100 |                30
@@ -71,7 +71,7 @@ SELECT * FROM pgr_edmondsKarp(
     FROM edge_table'
    , ARRAY[6, 8, 12], ARRAY[1, 3, 11]
 );
- seq | edge | start_vid | end_vid | flow | residual_capacity 
+ seq | edge | start_vid | end_vid | flow | residual_capacity
 -----+------+-----------+---------+------+-------------------
    1 |    1 |         2 |       1 |   50 |                80
    2 |    3 |         4 |       3 |   80 |                50
diff --git a/doc/queries/doc-pgr_eucledianTSP.queries b/doc/queries/doc-pgr_eucledianTSP.queries
index 8067930..3e8d3c6 100644
--- a/doc/queries/doc-pgr_eucledianTSP.queries
+++ b/doc/queries/doc-pgr_eucledianTSP.queries
@@ -12,7 +12,7 @@ query AS (
     )
 )
 SELECT agg_cost < 20 AS under_20 FROM query WHERE seq = 18;
- under_20 
+ under_20
 ----------
  t
 (1 row)
@@ -26,7 +26,7 @@ SELECT* from pgr_eucledianTSP(
     cooling_factor := 0.5,
     randomize := false
 );
- seq | node |       cost       |     agg_cost     
+ seq | node |       cost       |     agg_cost
 -----+------+------------------+------------------
    1 |    1 |  1.4142135623731 |                0
    2 |    3 |                1 |  1.4142135623731
@@ -67,7 +67,7 @@ Total slides: 0
 Total reverses: 0
 Times best tour changed: 4
 Best cost reached = 18.7796
- seq | node |       cost       |     agg_cost     
+ seq | node |       cost       |     agg_cost
 -----+------+------------------+------------------
    1 |    1 |  1.4142135623731 |                0
    2 |    3 |                1 |  1.4142135623731
diff --git a/doc/queries/doc-pgr_fooDmatrix.queries b/doc/queries/doc-pgr_fooDmatrix.queries
index 7c96952..de343a1 100644
--- a/doc/queries/doc-pgr_fooDmatrix.queries
+++ b/doc/queries/doc-pgr_fooDmatrix.queries
@@ -7,7 +7,7 @@ SELECT * FROM pgr_dijkstraCostMatrix(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5)
 );
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          1 |       2 |        1
          1 |       3 |        6
@@ -29,7 +29,7 @@ SELECT * FROM pgr_dijkstraCostMatrix(
     (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
     false
 );
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          1 |       2 |        1
          1 |       3 |        2
@@ -56,7 +56,7 @@ SELECT * FROM pgr_TSP(
     $$,
     randomize := false
 );
- seq | node | cost | agg_cost 
+ seq | node | cost | agg_cost
 -----+------+------+----------
    1 |    1 |    1 |        0
    2 |    2 |    1 |        1
@@ -71,7 +71,7 @@ SELECT * FROM pgr_withPointsCostMatrix(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction from pointsOfInterest',
     array[-1, 3, 6, -6]);
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
         -6 |      -1 |      1.3
         -6 |       3 |      4.3
@@ -92,7 +92,7 @@ SELECT * FROM pgr_withPointsCostMatrix(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction from pointsOfInterest',
     array[-1, 3, 6, -6], directed := false);
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
         -6 |      -1 |      1.3
         -6 |       3 |      1.7
@@ -118,7 +118,7 @@ SELECT * FROM pgr_TSP(
     $$,
     randomize := false
 );
- seq | node | cost | agg_cost 
+ seq | node | cost | agg_cost
 -----+------+------+----------
    1 |   -6 |  1.3 |        0
    2 |   -1 |  1.6 |      1.3
@@ -133,7 +133,7 @@ SELECT * FROM pgr_aStarCostMatrix(
     'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
     (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5)
 );
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          2 |       1 |        1
          3 |       1 |        2
@@ -155,7 +155,7 @@ SELECT * FROM pgr_aStarCostMatrix(
     (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
     directed := false, heuristic := 2
 );
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          2 |       1 |        1
          3 |       1 |        2
@@ -182,7 +182,7 @@ SELECT * FROM pgr_TSP(
     $$,
     randomize := false
 );
- seq | node | cost | agg_cost 
+ seq | node | cost | agg_cost
 -----+------+------+----------
    1 |    1 |    1 |        0
    2 |    2 |    1 |        1
@@ -197,7 +197,7 @@ SELECT * FROM pgr_bdDijkstraCostMatrix(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5)
 );
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          1 |       2 |        1
          1 |       3 |        6
@@ -219,7 +219,7 @@ SELECT * FROM pgr_bdDijkstraCostMatrix(
     (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
     false
 );
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          1 |       2 |        1
          1 |       3 |        2
@@ -246,7 +246,7 @@ SELECT * FROM pgr_TSP(
     $$,
     randomize := false
 );
- seq | node | cost | agg_cost 
+ seq | node | cost | agg_cost
 -----+------+------+----------
    1 |    1 |    1 |        0
    2 |    2 |    1 |        1
@@ -261,7 +261,7 @@ SELECT * FROM pgr_bdAstarCostMatrix(
     'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
     (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5)
 );
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          1 |       2 |        1
          1 |       3 |        6
@@ -283,7 +283,7 @@ SELECT * FROM pgr_bdAstarCostMatrix(
     (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
     false
 );
- start_vid | end_vid | agg_cost 
+ start_vid | end_vid | agg_cost
 -----------+---------+----------
          1 |       2 |        1
          1 |       3 |        2
@@ -310,7 +310,7 @@ SELECT * FROM pgr_TSP(
     $$,
     randomize := false
 );
- seq | node | cost | agg_cost 
+ seq | node | cost | agg_cost
 -----+------+------+----------
    1 |    1 |    1 |        0
    2 |    2 |    1 |        1
diff --git a/doc/queries/doc-pgr_labelGraph.queries b/doc/queries/doc-pgr_labelGraph.queries
index 34f18d2..6ddccba 100644
--- a/doc/queries/doc-pgr_labelGraph.queries
+++ b/doc/queries/doc-pgr_labelGraph.queries
@@ -6,13 +6,13 @@ SET
 SET client_min_messages TO WARNING;
 SET
 SELECT pgr_labelGraph('edge_table', 'id', 'source', 'target', 'subgraph');
- pgr_labelgraph 
+ pgr_labelgraph
 ----------------
  OK
 (1 row)
 
 SELECT DISTINCT subgraph FROM edge_table ORDER BY subgraph;
- subgraph 
+ subgraph
 ----------
         1
         2
diff --git a/doc/queries/doc-pgr_lineGraph.queries b/doc/queries/doc-pgr_lineGraph.queries
index d6744bd..7f5831d 100644
--- a/doc/queries/doc-pgr_lineGraph.queries
+++ b/doc/queries/doc-pgr_lineGraph.queries
@@ -6,204 +6,77 @@ SET
 SELECT * FROM pgr_lineGraph(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table'
 );
- seq | source | target | cost | reverse_cost 
+ seq | source | target | cost | reverse_cost
 -----+--------+--------+------+--------------
-   1 |    -16 |     -3 |    1 |           -1
-   2 |    -15 |     -9 |    1 |            1
-   3 |    -14 |    -10 |    1 |            1
-   4 |    -14 |     12 |    1 |           -1
-   5 |    -10 |     -7 |    1 |            1
-   6 |    -10 |     -4 |    1 |            1
-   7 |    -10 |      8 |    1 |            1
-   8 |     -9 |     -8 |    1 |            1
-   9 |     -9 |     11 |    1 |           -1
-  10 |     -8 |     -7 |    1 |            1
-  11 |     -8 |     -4 |    1 |            1
-  12 |     -7 |     -6 |    1 |            1
-  13 |     -4 |     -1 |    1 |            1
-  14 |     -3 |     -2 |    1 |           -1
-  15 |     -3 |      5 |    1 |           -1
-  16 |     -2 |     -1 |    1 |           -1
-  17 |     -2 |      4 |    1 |           -1
-  18 |      5 |     -8 |    1 |           -1
-  19 |      5 |      9 |    1 |           -1
-  20 |      5 |     11 |    1 |           -1
-  21 |      7 |     -4 |    1 |            1
-  22 |      8 |     11 |    1 |           -1
-  23 |     10 |     12 |    1 |           -1
-  24 |     11 |     13 |    1 |           -1
-  25 |     12 |     13 |    1 |           -1
-  26 |     13 |    -15 |    1 |           -1
-  27 |     16 |     -9 |    1 |            1
-  28 |     16 |     15 |    1 |            1
-(28 rows)
+   1 |    -18 |     18 |    1 |            1
+   2 |    -17 |     17 |    1 |            1
+   3 |    -16 |     -3 |    1 |           -1
+   4 |    -16 |     16 |    1 |            1
+   5 |    -15 |     -9 |    1 |            1
+   6 |    -15 |     15 |    1 |            1
+   7 |    -14 |    -10 |    1 |            1
+   8 |    -14 |     12 |    1 |           -1
+   9 |    -14 |     14 |    1 |            1
+  10 |    -10 |     -7 |    1 |            1
+  11 |    -10 |     -4 |    1 |            1
+  12 |    -10 |      8 |    1 |            1
+  13 |    -10 |     10 |    1 |            1
+  14 |     -9 |     -8 |    1 |            1
+  15 |     -9 |      9 |    1 |            1
+  16 |     -9 |     11 |    1 |           -1
+  17 |     -8 |     -7 |    1 |            1
+  18 |     -8 |     -4 |    1 |            1
+  19 |     -8 |      8 |    1 |            1
+  20 |     -7 |     -6 |    1 |            1
+  21 |     -6 |      6 |    1 |            1
+  22 |     -4 |     -1 |    1 |            1
+  23 |     -4 |      4 |    1 |            1
+  24 |     -3 |     -2 |    1 |           -1
+  25 |     -3 |      5 |    1 |           -1
+  26 |     -2 |     -1 |    1 |           -1
+  27 |     -2 |      4 |    1 |           -1
+  28 |     -1 |      1 |    1 |            1
+  29 |      5 |     -8 |    1 |           -1
+  30 |      5 |      9 |    1 |           -1
+  31 |      5 |     11 |    1 |           -1
+  32 |      7 |     -7 |    1 |            1
+  33 |      7 |     -4 |    1 |            1
+  34 |      8 |     11 |    1 |           -1
+  35 |     10 |     12 |    1 |           -1
+  36 |     11 |     13 |    1 |           -1
+  37 |     12 |     13 |    1 |           -1
+  38 |     13 |    -15 |    1 |           -1
+  39 |     16 |     -9 |    1 |            1
+  40 |     16 |     15 |    1 |            1
+(40 rows)
 
 -- q2
 SELECT * FROM pgr_lineGraph(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     FALSE
 );
- seq | source | target | cost | reverse_cost 
+ seq | source | target | cost | reverse_cost
 -----+--------+--------+------+--------------
-   1 |     -2 |     -1 |    1 |           -1
-   2 |     -4 |     -1 |    1 |           -1
-   3 |      4 |     -1 |    1 |           -1
+   1 |     -3 |     -2 |    1 |           -1
+   2 |     -3 |      5 |    1 |           -1
+   3 |     -2 |      4 |    1 |           -1
    4 |      1 |      4 |    1 |           -1
-   5 |     -2 |      4 |    1 |           -1
-   6 |     -1 |      4 |    1 |           -1
-   7 |     -2 |      1 |    1 |           -1
-   8 |     -4 |      1 |    1 |           -1
-   9 |      4 |      1 |    1 |           -1
-  10 |      1 |     -2 |    1 |           -1
-  11 |     -4 |     -2 |    1 |           -1
-  12 |     -1 |     -2 |    1 |           -1
-  13 |      4 |     -2 |    1 |           -1
-  14 |      1 |     -4 |    1 |           -1
-  15 |     -2 |     -4 |    1 |           -1
-  16 |     -1 |     -4 |    1 |           -1
-  17 |     -3 |     -2 |    1 |           -1
-  18 |      5 |     -2 |    1 |           -1
-  19 |     -3 |      5 |    1 |           -1
-  20 |     -2 |      5 |    1 |           -1
-  21 |     -2 |     -3 |    1 |           -1
-  22 |      5 |     -3 |    1 |           -1
-  23 |    -16 |     -3 |    1 |           -1
-  24 |     16 |     -3 |    1 |           -1
-  25 |     -3 |     16 |    1 |           -1
-  26 |     -3 |    -16 |    1 |           -1
-  27 |      7 |     -4 |    1 |           -1
-  28 |     -8 |     -4 |    1 |           -1
-  29 |    -10 |     -4 |    1 |           -1
-  30 |     -7 |     -4 |    1 |           -1
-  31 |      8 |     -4 |    1 |           -1
-  32 |     10 |     -4 |    1 |           -1
-  33 |      4 |     -7 |    1 |           -1
-  34 |     -8 |     -7 |    1 |           -1
-  35 |    -10 |     -7 |    1 |           -1
-  36 |     -4 |     -7 |    1 |           -1
-  37 |      8 |     -7 |    1 |           -1
-  38 |     10 |     -7 |    1 |           -1
-  39 |      4 |      8 |    1 |           -1
-  40 |      7 |      8 |    1 |           -1
-  41 |    -10 |      8 |    1 |           -1
-  42 |     -4 |      8 |    1 |           -1
-  43 |     -7 |      8 |    1 |           -1
-  44 |     10 |      8 |    1 |           -1
-  45 |      4 |     10 |    1 |           -1
-  46 |      7 |     10 |    1 |           -1
-  47 |     -8 |     10 |    1 |           -1
-  48 |     -4 |     10 |    1 |           -1
-  49 |     -7 |     10 |    1 |           -1
-  50 |      8 |     10 |    1 |           -1
-  51 |      7 |      4 |    1 |           -1
-  52 |     -8 |      4 |    1 |           -1
-  53 |    -10 |      4 |    1 |           -1
-  54 |     -7 |      4 |    1 |           -1
-  55 |      8 |      4 |    1 |           -1
-  56 |     10 |      4 |    1 |           -1
-  57 |      4 |      7 |    1 |           -1
-  58 |     -8 |      7 |    1 |           -1
-  59 |    -10 |      7 |    1 |           -1
-  60 |     -4 |      7 |    1 |           -1
-  61 |      8 |      7 |    1 |           -1
-  62 |     10 |      7 |    1 |           -1
-  63 |      4 |     -8 |    1 |           -1
-  64 |      7 |     -8 |    1 |           -1
-  65 |    -10 |     -8 |    1 |           -1
-  66 |     -4 |     -8 |    1 |           -1
-  67 |     -7 |     -8 |    1 |           -1
-  68 |     10 |     -8 |    1 |           -1
-  69 |      4 |    -10 |    1 |           -1
-  70 |      7 |    -10 |    1 |           -1
-  71 |     -8 |    -10 |    1 |           -1
-  72 |     -4 |    -10 |    1 |           -1
-  73 |     -7 |    -10 |    1 |           -1
-  74 |      8 |    -10 |    1 |           -1
-  75 |      5 |     -8 |    1 |           -1
-  76 |     -9 |     -8 |    1 |           -1
-  77 |      9 |     -8 |    1 |           -1
-  78 |     11 |     -8 |    1 |           -1
-  79 |      5 |      9 |    1 |           -1
-  80 |      8 |      9 |    1 |           -1
-  81 |     -8 |      9 |    1 |           -1
-  82 |     11 |      9 |    1 |           -1
-  83 |      5 |     11 |    1 |           -1
-  84 |      8 |     11 |    1 |           -1
-  85 |     -9 |     11 |    1 |           -1
-  86 |     -8 |     11 |    1 |           -1
-  87 |      9 |     11 |    1 |           -1
-  88 |      8 |      5 |    1 |           -1
-  89 |     -9 |      5 |    1 |           -1
-  90 |     -8 |      5 |    1 |           -1
-  91 |      9 |      5 |    1 |           -1
-  92 |     11 |      5 |    1 |           -1
-  93 |      5 |      8 |    1 |           -1
-  94 |     -9 |      8 |    1 |           -1
-  95 |      9 |      8 |    1 |           -1
-  96 |     11 |      8 |    1 |           -1
-  97 |      5 |     -9 |    1 |           -1
-  98 |      8 |     -9 |    1 |           -1
-  99 |     -8 |     -9 |    1 |           -1
- 100 |     11 |     -9 |    1 |           -1
- 101 |     -7 |     -6 |    1 |           -1
- 102 |      7 |     -6 |    1 |           -1
- 103 |      6 |      7 |    1 |           -1
- 104 |     -6 |      7 |    1 |           -1
- 105 |     -7 |      6 |    1 |           -1
- 106 |      7 |      6 |    1 |           -1
- 107 |      6 |     -7 |    1 |           -1
- 108 |     -6 |     -7 |    1 |           -1
- 109 |    -15 |     -9 |    1 |           -1
- 110 |     16 |     -9 |    1 |           -1
- 111 |     15 |     -9 |    1 |           -1
- 112 |    -16 |     -9 |    1 |           -1
- 113 |      9 |     15 |    1 |           -1
- 114 |     16 |     15 |    1 |           -1
- 115 |     -9 |     15 |    1 |           -1
- 116 |    -16 |     15 |    1 |           -1
- 117 |      9 |    -16 |    1 |           -1
- 118 |    -15 |    -16 |    1 |           -1
- 119 |     -9 |    -16 |    1 |           -1
- 120 |     15 |    -16 |    1 |           -1
- 121 |    -15 |      9 |    1 |           -1
- 122 |     16 |      9 |    1 |           -1
- 123 |     15 |      9 |    1 |           -1
- 124 |    -16 |      9 |    1 |           -1
- 125 |      9 |    -15 |    1 |           -1
- 126 |     16 |    -15 |    1 |           -1
- 127 |     -9 |    -15 |    1 |           -1
- 128 |    -16 |    -15 |    1 |           -1
- 129 |      9 |     16 |    1 |           -1
- 130 |    -15 |     16 |    1 |           -1
- 131 |     -9 |     16 |    1 |           -1
- 132 |     15 |     16 |    1 |           -1
- 133 |    -14 |    -10 |    1 |           -1
- 134 |     12 |    -10 |    1 |           -1
- 135 |     14 |    -10 |    1 |           -1
- 136 |     10 |     12 |    1 |           -1
- 137 |    -14 |     12 |    1 |           -1
- 138 |    -10 |     12 |    1 |           -1
- 139 |     14 |     12 |    1 |           -1
- 140 |     10 |     14 |    1 |           -1
- 141 |    -10 |     14 |    1 |           -1
- 142 |     12 |     14 |    1 |           -1
- 143 |    -14 |     10 |    1 |           -1
- 144 |     12 |     10 |    1 |           -1
- 145 |     14 |     10 |    1 |           -1
- 146 |     10 |    -14 |    1 |           -1
- 147 |    -10 |    -14 |    1 |           -1
- 148 |     12 |    -14 |    1 |           -1
- 149 |     11 |     13 |    1 |           -1
- 150 |     12 |     13 |    1 |           -1
- 151 |     12 |     11 |    1 |           -1
- 152 |     13 |     11 |    1 |           -1
- 153 |     11 |     12 |    1 |           -1
- 154 |     13 |     12 |    1 |           -1
- 155 |     13 |    -15 |    1 |           -1
- 156 |     15 |     13 |    1 |           -1
- 157 |    -15 |     13 |    1 |           -1
- 158 |     13 |     15 |    1 |           -1
-(158 rows)
+   5 |      4 |      8 |    1 |           -1
+   6 |      4 |     10 |    1 |           -1
+   7 |      5 |      9 |    1 |           -1
+   8 |      5 |     11 |    1 |           -1
+   9 |      6 |      7 |    1 |           -1
+  10 |      7 |      8 |    1 |           -1
+  11 |      7 |     10 |    1 |           -1
+  12 |      8 |      9 |    1 |           -1
+  13 |      8 |     11 |    1 |           -1
+  14 |      9 |     15 |    1 |           -1
+  15 |     10 |     12 |    1 |           -1
+  16 |     10 |     14 |    1 |           -1
+  17 |     11 |     13 |    1 |           -1
+  18 |     12 |     13 |    1 |           -1
+  19 |     16 |     15 |    1 |           -1
+(19 rows)
 
 -- q3
 ROLLBACK;
diff --git a/doc/queries/doc-pgr_lineGraphFull.queries b/doc/queries/doc-pgr_lineGraphFull.queries
new file mode 100644
index 0000000..c6734c6
--- /dev/null
+++ b/doc/queries/doc-pgr_lineGraphFull.queries
@@ -0,0 +1,208 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- q1
+SELECT * FROM pgr_lineGraphFull(
+    'SELECT id, source, target, cost, reverse_cost
+      FROM edge_table
+      WHERE id IN (4,7,8,10)'
+);
+ seq | source | target | cost | edge
+-----+--------+--------+------+------
+   1 |     -1 |      5 |    1 |    4
+   2 |      2 |     -1 |    0 |    0
+   3 |     -2 |      2 |    1 |   -4
+   4 |     -3 |      8 |    1 |   -7
+   5 |     -4 |      6 |    1 |    8
+   6 |     -5 |     10 |    1 |   10
+   7 |      5 |     -2 |    0 |    0
+   8 |      5 |     -3 |    0 |    0
+   9 |      5 |     -4 |    0 |    0
+  10 |      5 |     -5 |    0 |    0
+  11 |     -6 |     -2 |    0 |    0
+  12 |     -6 |     -3 |    0 |    0
+  13 |     -6 |     -4 |    0 |    0
+  14 |     -6 |     -5 |    0 |    0
+  15 |     -7 |     -2 |    0 |    0
+  16 |     -7 |     -3 |    0 |    0
+  17 |     -7 |     -4 |    0 |    0
+  18 |     -7 |     -5 |    0 |    0
+  19 |     -8 |     -2 |    0 |    0
+  20 |     -8 |     -3 |    0 |    0
+  21 |     -8 |     -4 |    0 |    0
+  22 |     -8 |     -5 |    0 |    0
+  23 |     -9 |     -6 |    1 |    7
+  24 |      8 |     -9 |    0 |    0
+  25 |    -10 |     -7 |    1 |   -8
+  26 |      6 |    -10 |    0 |    0
+  27 |    -11 |     -8 |    1 |  -10
+  28 |     10 |    -11 |    0 |    0
+(28 rows)
+
+-- q2
+CREATE TABLE lineGraph_edges AS SELECT * FROM pgr_lineGraphFull(
+    $$SELECT id, source, target, cost, reverse_cost
+    FROM edge_table WHERE id IN (4,7,8,10)$$
+);
+SELECT 28
+CREATE TABLE lineGraph_vertices AS
+SELECT *, NULL::BIGINT AS original_id
+FROM (SELECT source AS id FROM lineGraph_edges
+    UNION
+    SELECT target FROM lineGraph_edges) as foo
+ORDER BY id;
+SELECT 16
+-- q3
+UPDATE lineGraph_vertices AS r
+  SET original_id = v.id
+  FROM edge_table_vertices_pgr AS v
+  WHERE v.id = r.id;
+UPDATE 5
+-- q4
+WITH
+unassignedVertices
+  AS (SELECT e.id, e.original_id
+       FROM lineGraph_vertices AS e
+       WHERE original_id IS NOT NULL),
+edgesWithUnassignedSource
+  AS (SELECT *
+        FROM lineGraph_edges
+        WHERE cost = 0 and source IN (SELECT id FROM unassignedVertices)),
+edgesWithUnassignedSourcePlusVertices
+  AS (SELECT *
+        FROM edgesWithUnassignedSource
+        JOIN lineGraph_vertices
+        ON(source = id)),
+verticesFromEdgesWithUnassignedSource
+  AS (SELECT DISTINCT edgesWithUnassignedSourcePlusVertices.target,
+                      edgesWithUnassignedSourcePlusVertices.original_id
+        FROM edgesWithUnassignedSourcePlusVertices
+        JOIN lineGraph_vertices AS r
+        ON(target = r.id AND r.original_id IS NULL))
+UPDATE lineGraph_vertices
+  SET original_id = verticesFromEdgesWithUnassignedSource.original_id
+  FROM verticesFromEdgesWithUnassignedSource
+  WHERE verticesFromEdgesWithUnassignedSource.target = id;
+UPDATE 8
+WITH
+unassignedVertices
+  AS (SELECT e.id, e.original_id
+        FROM lineGraph_vertices AS e
+        WHERE original_id IS NOT NULL),
+edgesWithUnassignedTarget
+  AS (SELECT *
+        FROM lineGraph_edges
+        WHERE cost = 0 and target IN (SELECT id FROM unassignedVertices)),
+edgesWithUnassignedTargetPlusVertices
+  AS (SELECT *
+        FROM edgesWithUnassignedTarget
+        JOIN lineGraph_vertices
+        ON(target = id)),
+verticesFromEdgesWithUnassignedTarget
+  AS (SELECT DISTINCT edgesWithUnassignedTargetPlusVertices.source,
+                     edgesWithUnassignedTargetPlusVertices.original_id
+        FROM edgesWithUnassignedTargetPlusVertices
+        JOIN lineGraph_vertices AS r
+        ON(source = r.id AND r.original_id IS NULL))
+UPDATE lineGraph_vertices
+  SET original_id = verticesFromEdgesWithUnassignedTarget.original_id
+  FROM verticesFromEdgesWithUnassignedTarget
+  WHERE verticesFromEdgesWithUnassignedTarget.source = id;
+UPDATE 3
+-- q5
+WITH
+unassignedVertexIds
+  AS (SELECT id
+        FROM lineGraph_vertices
+        WHERE original_id IS NULL),
+edgesWithUnassignedSource
+  AS (SELECT source,edge
+        FROM lineGraph_edges
+        WHERE source IN (SELECT id FROM unassignedVertexIds)),
+originalEdgesWithUnassignedSource
+  AS (SELECT id,source
+        FROM edge_table
+        WHERE id IN (SELECT edge FROM edgesWithUnassignedSource))
+UPDATE lineGraph_vertices AS d
+  SET original_id = (SELECT source
+                       FROM originalEdgesWithUnassignedSource
+                       WHERE originalEdgesWithUnassignedSource.id =
+                         (SELECT edge
+                            FROM edgesWithUnassignedSource
+                            WHERE edgesWithUnassignedSource.source = d.id))
+  WHERE id IN (SELECT id FROM unassignedVertexIds);
+UPDATE 0
+WITH
+unassignedVertexIds
+  AS (SELECT id
+        FROM lineGraph_vertices
+        WHERE original_id IS NULL),
+edgesWithUnassignedTarget
+  AS (SELECT target,edge
+        FROM lineGraph_edges
+        WHERE target IN (SELECT id FROM unassignedVertexIds)),
+originalEdgesWithUnassignedTarget
+  AS (SELECT id,target
+        FROM edge_table
+        WHERE id IN (SELECT edge FROM edgesWithUnassignedTarget))
+UPDATE lineGraph_vertices AS d
+  SET original_id = (SELECT target
+                       FROM originalEdgesWithUnassignedTarget
+                       WHERE originalEdgesWithUnassignedTarget.id =
+                         (SELECT edge
+                            FROM edgesWithUnassignedTarget
+                            WHERE edgesWithUnassignedTarget.target = d.id))
+  WHERE id IN (SELECT id FROM unassignedVertexIds);
+UPDATE 0
+-- q6
+SELECT * FROM lineGraph_vertices;
+ id  | original_id
+-----+-------------
+   2 |           2
+   5 |           5
+   6 |           6
+   8 |           8
+  10 |          10
+ -11 |          10
+ -10 |           6
+  -9 |           8
+  -5 |           5
+  -4 |           5
+  -3 |           5
+  -2 |           5
+  -1 |           2
+  -8 |           5
+  -7 |           5
+  -6 |           5
+(16 rows)
+
+-- q7
+UPDATE lineGraph_edges
+  SET cost = 100
+  WHERE source IN (SELECT target
+                     FROM lineGraph_edges
+                     WHERE edge = 4) AND target IN (SELECT source
+                                                      FROM lineGraph_edges
+                                                      WHERE edge = -7);
+UPDATE 1
+-- q8
+SELECT * FROM
+  (SELECT * FROM
+    (SELECT * FROM pgr_dijkstra($$SELECT seq AS id, * FROM lineGraph_edges$$,
+      (SELECT array_agg(id) FROM lineGraph_vertices where original_id = 2),
+      (SELECT array_agg(id) FROM lineGraph_vertices where original_id = 8)
+    )) as shortestPaths
+  WHERE start_vid = 2 AND end_vid = 8 AND (cost != 0 OR edge = -1)) as b;
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
+-----+----------+-----------+---------+------+------+------+----------
+  29 |        2 |         2 |       8 |   -1 |    1 |    1 |        0
+  31 |        4 |         2 |       8 |   -4 |    5 |    1 |        1
+  33 |        6 |         2 |       8 |  -10 |   25 |    1 |        2
+  35 |        8 |         2 |       8 |   -3 |    4 |    1 |        3
+  36 |        9 |         2 |       8 |    8 |   -1 |    0 |        4
+(5 rows)
+
+-- q9
+ROLLBACK;
+ROLLBACK
diff --git a/doc/queries/doc-pgr_maxCardinalityMatch.queries b/doc/queries/doc-pgr_maxCardinalityMatch.queries
index feb0660..cafd899 100644
--- a/doc/queries/doc-pgr_maxCardinalityMatch.queries
+++ b/doc/queries/doc-pgr_maxCardinalityMatch.queries
@@ -6,7 +6,7 @@ SET
 SELECT * FROM pgr_maxCardinalityMatch(
     'SELECT id, source, target, cost AS going, reverse_cost AS coming FROM edge_table'
 );
- seq | edge | source | target 
+ seq | edge | source | target
 -----+------+--------+--------
    1 |    1 |      1 |      2
    2 |    3 |      4 |      3
@@ -23,7 +23,7 @@ SELECT * FROM pgr_maxCardinalityMatch(
     'SELECT id, source, target, cost AS going, reverse_cost AS coming FROM edge_table',
     directed := false
 );
- seq | edge | source | target 
+ seq | edge | source | target
 -----+------+--------+--------
    1 |    1 |      1 |      2
    2 |    3 |      3 |      4
diff --git a/doc/queries/doc-pgr_maxFlow.queries b/doc/queries/doc-pgr_maxFlow.queries
index aadd1fb..24d2798 100644
--- a/doc/queries/doc-pgr_maxFlow.queries
+++ b/doc/queries/doc-pgr_maxFlow.queries
@@ -12,7 +12,7 @@ SELECT * FROM pgr_maxFlow(
     FROM edge_table'
     , 6, 11
 );
- pgr_maxflow 
+ pgr_maxflow
 -------------
          230
 (1 row)
@@ -27,7 +27,7 @@ SELECT * FROM pgr_maxFlow(
     FROM edge_table'
     , 6, ARRAY[11, 1, 13]
 );
- pgr_maxflow 
+ pgr_maxflow
 -------------
          340
 (1 row)
@@ -42,7 +42,7 @@ SELECT * FROM pgr_maxFlow(
     FROM edge_table'
     , ARRAY[6, 8, 12], 11
 );
- pgr_maxflow 
+ pgr_maxflow
 -------------
          230
 (1 row)
@@ -57,7 +57,7 @@ SELECT * FROM pgr_maxFlow(
     FROM edge_table'
     , ARRAY[6, 8, 12], ARRAY[1, 3, 11]
 );
- pgr_maxflow 
+ pgr_maxflow
 -------------
          360
 (1 row)
diff --git a/doc/queries/doc-pgr_pointsAsPolygon.queries b/doc/queries/doc-pgr_pointsAsPolygon.queries
index c6c0a7b..35a5974 100644
--- a/doc/queries/doc-pgr_pointsAsPolygon.queries
+++ b/doc/queries/doc-pgr_pointsAsPolygon.queries
@@ -5,7 +5,7 @@ SET
 --q1
 SELECT ST_AsText(pgr_pointsAsPolygon('SELECT id::integer, ST_X(the_geom)::float AS x, ST_Y(the_geom)::float AS y
         FROM edge_table_vertices_pgr'));
-                      st_astext                       
+                      st_astext
 ------------------------------------------------------
  POLYGON((2 4,3.5 4,4 3,4 2,4 1,2 0,0 2,0.5 3.5,2 4))
 (1 row)
diff --git a/doc/queries/doc-pgr_pushRelabel.queries b/doc/queries/doc-pgr_pushRelabel.queries
index 65969cb..bc9a77a 100644
--- a/doc/queries/doc-pgr_pushRelabel.queries
+++ b/doc/queries/doc-pgr_pushRelabel.queries
@@ -12,7 +12,7 @@ SELECT * FROM pgr_pushRelabel(
     FROM edge_table'
     , 6, 11
 );
- seq | edge | start_vid | end_vid | flow | residual_capacity 
+ seq | edge | start_vid | end_vid | flow | residual_capacity
 -----+------+-----------+---------+------+-------------------
    1 |   10 |         5 |      10 |  100 |                30
    2 |    8 |         6 |       5 |  100 |                30
@@ -30,7 +30,7 @@ SELECT * FROM pgr_pushRelabel(
     FROM edge_table'
     , 6, ARRAY[11, 1, 13]
 );
- seq | edge | start_vid | end_vid | flow | residual_capacity 
+ seq | edge | start_vid | end_vid | flow | residual_capacity
 -----+------+-----------+---------+------+-------------------
    1 |    1 |         2 |       1 |  130 |                 0
    2 |    2 |         3 |       2 |   80 |                20
@@ -58,7 +58,7 @@ SELECT * FROM pgr_pushRelabel(
     FROM edge_table'
     , ARRAY[6, 8, 12], 11
 );
- seq | edge | start_vid | end_vid | flow | residual_capacity 
+ seq | edge | start_vid | end_vid | flow | residual_capacity
 -----+------+-----------+---------+------+-------------------
    1 |   10 |         5 |      10 |  100 |                30
    2 |    8 |         6 |       5 |  100 |                30
@@ -76,7 +76,7 @@ SELECT * FROM pgr_pushRelabel(
     FROM edge_table'
     , ARRAY[6, 8, 12], ARRAY[1, 3, 11]
 );
- seq | edge | start_vid | end_vid | flow | residual_capacity 
+ seq | edge | start_vid | end_vid | flow | residual_capacity
 -----+------+-----------+---------+------+-------------------
    1 |    1 |         2 |       1 |   50 |                80
    2 |    3 |         4 |       3 |   80 |                50
diff --git a/doc/queries/doc-pgr_strongComponents.queries b/doc/queries/doc-pgr_strongComponents.queries
index ad97903..a78b576 100644
--- a/doc/queries/doc-pgr_strongComponents.queries
+++ b/doc/queries/doc-pgr_strongComponents.queries
@@ -6,7 +6,7 @@ SET
 SELECT * FROM pgr_strongComponents(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table'
 );
- seq | component | n_seq | node 
+ seq | component | n_seq | node
 -----+-----------+-------+------
    1 |         1 |     1 |    1
    2 |         1 |     2 |    2
@@ -31,7 +31,7 @@ SELECT * FROM pgr_strongComponents(
 SELECT * FROM pgr_strongComponents(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table'
 );
- seq | component | n_seq | node 
+ seq | component | n_seq | node
 -----+-----------+-------+------
    1 |         1 |     1 |    1
    2 |         1 |     2 |    2
diff --git a/doc/queries/doc-pgr_version.queries b/doc/queries/doc-pgr_version.queries
index ccd7e97..75427ec 100644
--- a/doc/queries/doc-pgr_version.queries
+++ b/doc/queries/doc-pgr_version.queries
@@ -4,9 +4,9 @@ SET client_min_messages TO NOTICE;
 SET
 -- q1
 SELECT version FROM pgr_version();
- version 
+ version
 ---------
- 2.5.2
+ 2.6.0
 (1 row)
 
 -- q2
diff --git a/doc/queries/doc-pgr_vrpOneDepot.queries b/doc/queries/doc-pgr_vrpOneDepot.queries
index 2631800..d53f929 100644
--- a/doc/queries/doc-pgr_vrpOneDepot.queries
+++ b/doc/queries/doc-pgr_vrpOneDepot.queries
@@ -7,7 +7,7 @@ SELECT * FROM pgr_vrpOneDepot(
     'SELECT * FROM vrp_vehicles',
     'SELECT * FROM vrp_distance',
     1);
- oid | opos | vid | tarrival | tdepart 
+ oid | opos | vid | tarrival | tdepart
 -----+------+-----+----------+---------
   -1 |    1 |   5 |        0 |       0
   66 |    2 |   5 |        0 |       0
diff --git a/doc/queries/doc-pgr_withPoints.queries b/doc/queries/doc-pgr_withPoints.queries
index 9ae373b..09a4218 100644
--- a/doc/queries/doc-pgr_withPoints.queries
+++ b/doc/queries/doc-pgr_withPoints.queries
@@ -7,7 +7,7 @@ SELECT * FROM pgr_withPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
     -1, -3);
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |   -1 |    1 |  0.6 |        0
    2 |        2 |    2 |    4 |    1 |      0.6
@@ -22,7 +22,7 @@ SELECT * FROM pgr_withPoints(
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
     -1, 3,
     details := true);
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |   -1 |    1 |  0.6 |        0
    2 |        2 |    2 |    4 |  0.7 |      0.6
@@ -39,7 +39,7 @@ SELECT * FROM pgr_withPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
     -1, ARRAY[-3,5]);
- seq | path_seq | end_pid | node | edge | cost | agg_cost 
+ seq | path_seq | end_pid | node | edge | cost | agg_cost
 -----+----------+---------+------+------+------+----------
    1 |        1 |      -3 |   -1 |    1 |  0.6 |        0
    2 |        2 |      -3 |    2 |    4 |    1 |      0.6
@@ -56,7 +56,7 @@ SELECT * FROM pgr_withPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
     ARRAY[-1,2], -3);
- seq | path_seq | start_pid | node | edge | cost | agg_cost 
+ seq | path_seq | start_pid | node | edge | cost | agg_cost
 -----+----------+-----------+------+------+------+----------
    1 |        1 |        -1 |   -1 |    1 |  0.6 |        0
    2 |        2 |        -1 |    2 |    4 |    1 |      0.6
@@ -74,7 +74,7 @@ SELECT * FROM pgr_withPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
     ARRAY[-1,2], ARRAY[-3,7]);
- seq | path_seq | start_pid | end_pid | node | edge | cost | agg_cost 
+ seq | path_seq | start_pid | end_pid | node | edge | cost | agg_cost
 -----+----------+-----------+---------+------+------+------+----------
    1 |        1 |        -1 |      -3 |   -1 |    1 |  0.6 |        0
    2 |        2 |        -1 |      -3 |    2 |    4 |    1 |      0.6
@@ -112,7 +112,7 @@ SELECT ('(' || start_pid || ' => ' || end_pid ||') at ' || path_seq || 'th step:
         driving_side := 'r',
         details := true)
     WHERE node IN (-6,6);
-         path_at         |       status        |  is_a  | id 
+         path_at         |       status        |  is_a  | id
 -------------------------+---------------------+--------+----
  (-1 => -6) at 4th step: |  visits             | Point  |  6
  (-1 => -3) at 4th step: |  passes in front of | Point  |  6
@@ -148,7 +148,7 @@ SELECT ('(' || start_pid || ' => ' || end_pid ||') at ' || path_seq || 'th step:
         driving_side := 'l',
         details := true)
     WHERE node IN (-6,6);
-         path_at         |       status        |  is_a  | id 
+         path_at         |       status        |  is_a  | id
 -------------------------+---------------------+--------+----
  (-1 => -6) at 3th step: |  visits             | Point  |  6
  (-1 => -3) at 3th step: |  passes in front of | Point  |  6
@@ -175,7 +175,7 @@ SELECT * FROM pgr_withPoints(
     ARRAY[-1,2], ARRAY[-3,7],
     directed := false,
     details := true);
- seq | path_seq | start_pid | end_pid | node | edge | cost | agg_cost 
+ seq | path_seq | start_pid | end_pid | node | edge | cost | agg_cost
 -----+----------+-----------+---------+------+------+------+----------
    1 |        1 |        -1 |      -3 |   -1 |    1 |  0.6 |        0
    2 |        2 |        -1 |      -3 |    2 |    4 |  0.7 |      0.6
diff --git a/doc/queries/doc-pgr_withPointsCost.queries b/doc/queries/doc-pgr_withPointsCost.queries
index 7930644..966aea0 100644
--- a/doc/queries/doc-pgr_withPointsCost.queries
+++ b/doc/queries/doc-pgr_withPointsCost.queries
@@ -7,7 +7,7 @@ SELECT * FROM pgr_withPointsCost(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
     -1, -3);
- start_pid | end_pid | agg_cost 
+ start_pid | end_pid | agg_cost
 -----------+---------+----------
         -1 |      -3 |      3.2
 (1 row)
@@ -18,7 +18,7 @@ SELECT * FROM pgr_withPointsCost(
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
     -1, 3,
     directed := false);
- start_pid | end_pid | agg_cost 
+ start_pid | end_pid | agg_cost
 -----------+---------+----------
         -1 |       3 |      1.6
 (1 row)
@@ -28,7 +28,7 @@ SELECT * FROM pgr_withPointsCost(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
     -1, ARRAY[-3,5]);
- start_pid | end_pid | agg_cost 
+ start_pid | end_pid | agg_cost
 -----------+---------+----------
         -1 |      -3 |      3.2
         -1 |       5 |      1.6
@@ -39,7 +39,7 @@ SELECT * FROM pgr_withPointsCost(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
     ARRAY[-1,2], -3);
- start_pid | end_pid | agg_cost 
+ start_pid | end_pid | agg_cost
 -----------+---------+----------
         -1 |      -3 |      3.2
          2 |      -3 |      2.6
@@ -50,7 +50,7 @@ SELECT * FROM pgr_withPointsCost(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
     ARRAY[-1,2], ARRAY[-3,7]);
- start_pid | end_pid | agg_cost 
+ start_pid | end_pid | agg_cost
 -----------+---------+----------
         -1 |      -3 |      3.2
         -1 |       7 |      3.6
@@ -64,7 +64,7 @@ SELECT * FROM pgr_withPointsCost(
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
     ARRAY[-1,2], ARRAY[-3,7],
     driving_side := 'l');
- start_pid | end_pid | agg_cost 
+ start_pid | end_pid | agg_cost
 -----------+---------+----------
         -1 |      -3 |      3.2
         -1 |       7 |      3.6
@@ -78,7 +78,7 @@ SELECT * FROM pgr_withPointsCost(
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
     ARRAY[-1,2], ARRAY[-3,7],
     driving_side := 'r');
- start_pid | end_pid | agg_cost 
+ start_pid | end_pid | agg_cost
 -----------+---------+----------
         -1 |      -3 |        4
         -1 |       7 |      4.4
@@ -92,7 +92,7 @@ SELECT * FROM pgr_withPointsCost(
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
     ARRAY[-1,2], ARRAY[-3,7],
     driving_side := 'b');
- start_pid | end_pid | agg_cost 
+ start_pid | end_pid | agg_cost
 -----------+---------+----------
         -1 |      -3 |      3.2
         -1 |       7 |      3.6
diff --git a/doc/queries/doc-pgr_withPointsDD.queries b/doc/queries/doc-pgr_withPointsDD.queries
index 6435a0f..3dc93e0 100644
--- a/doc/queries/doc-pgr_withPointsDD.queries
+++ b/doc/queries/doc-pgr_withPointsDD.queries
@@ -7,16 +7,16 @@ SELECT * FROM pgr_withPointsDD(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
     -1, 3.8);
- seq | node | edge | cost | agg_cost 
+ seq | node | edge | cost | agg_cost
 -----+------+------+------+----------
    1 |   -1 |   -1 |    0 |        0
    2 |    1 |    1 |  0.4 |      0.4
    3 |    2 |    1 |  0.6 |      0.6
-   4 |    5 |    4 |  0.3 |      1.6
+   4 |    5 |    4 |    1 |      1.6
    5 |    6 |    8 |    1 |      2.6
    6 |    8 |    7 |    1 |      2.6
    7 |   10 |   10 |    1 |      2.6
-   8 |    7 |    6 |  0.3 |      3.6
+   8 |    7 |    6 |    1 |      3.6
    9 |    9 |    9 |    1 |      3.6
   10 |   11 |   11 |    1 |      3.6
   11 |   13 |   14 |    1 |      3.6
@@ -29,7 +29,7 @@ SELECT * FROM pgr_withPointsDD(
     -1, 3.8,
     driving_side := 'r',
     details := true);
- seq | node | edge | cost | agg_cost 
+ seq | node | edge | cost | agg_cost
 -----+------+------+------+----------
    1 |   -1 |   -1 |    0 |        0
    2 |    1 |    1 |  0.4 |      0.4
@@ -48,7 +48,7 @@ SELECT * FROM pgr_withPointsDD(
     -1, 3.8,
     driving_side := 'l',
     details := true);
- seq | node | edge | cost | agg_cost 
+ seq | node | edge | cost | agg_cost
 -----+------+------+------+----------
    1 |   -1 |   -1 |    0 |        0
    2 |    2 |    1 |  0.6 |      0.6
@@ -73,7 +73,7 @@ SELECT * FROM pgr_withPointsDD(
     -1, 3.8,
     driving_side := 'b',
     details := true);
- seq | node | edge | cost | agg_cost 
+ seq | node | edge | cost | agg_cost
 -----+------+------+------+----------
    1 |   -1 |   -1 |    0 |        0
    2 |    1 |    1 |  0.4 |      0.4
diff --git a/doc/queries/doc-pgr_withPointsKSP.queries b/doc/queries/doc-pgr_withPointsKSP.queries
index 965c8dc..095d4c9 100644
--- a/doc/queries/doc-pgr_withPointsKSP.queries
+++ b/doc/queries/doc-pgr_withPointsKSP.queries
@@ -7,7 +7,7 @@ SELECT * FROM pgr_withPointsKSP(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
     -1, -2, 2);
- seq | path_id | path_seq | node | edge | cost | agg_cost 
+ seq | path_id | path_seq | node | edge | cost | agg_cost
 -----+---------+----------+------+------+------+----------
    1 |       1 |        1 |   -1 |    1 |  0.6 |        0
    2 |       1 |        2 |    2 |    4 |    1 |      0.6
@@ -29,7 +29,7 @@ SELECT * FROM pgr_withPointsKSP(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
     -1, 6, 2, details := true);
- seq | path_id | path_seq | node | edge | cost | agg_cost 
+ seq | path_id | path_seq | node | edge | cost | agg_cost
 -----+---------+----------+------+------+------+----------
    1 |       1 |        1 |   -1 |    1 |  0.6 |        0
    2 |       1 |        2 |    2 |    4 |  0.7 |      0.6
@@ -55,7 +55,7 @@ SELECT * FROM pgr_withPointsKSP(
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
     -1, -2, 2,
     driving_side := 'l', details := true);
- seq | path_id | path_seq | node | edge | cost | agg_cost 
+ seq | path_id | path_seq | node | edge | cost | agg_cost
 -----+---------+----------+------+------+------+----------
    1 |       1 |        1 |   -1 |    1 |  0.6 |        0
    2 |       1 |        2 |    2 |    4 |  0.7 |      0.6
@@ -81,7 +81,7 @@ SELECT * FROM pgr_withPointsKSP(
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
     -1, -2, 2,
     heap_paths := true, driving_side := 'r', details := true);
- seq | path_id | path_seq | node | edge | cost | agg_cost 
+ seq | path_id | path_seq | node | edge | cost | agg_cost
 -----+---------+----------+------+------+------+----------
    1 |       1 |        1 |   -1 |    1 |  0.4 |        0
    2 |       1 |        2 |    1 |    1 |    1 |      0.4
diff --git a/doc/queries/doc-pickDeliver.queries b/doc/queries/doc-pickDeliver.queries
index b5b2096..8c469b2 100644
--- a/doc/queries/doc-pickDeliver.queries
+++ b/doc/queries/doc-pickDeliver.queries
@@ -6,7 +6,7 @@ SET
 SELECT * FROM _pgr_pickDeliver(
     'SELECT * FROM orders ORDER BY id',
     'SELECT * from vehicles',
-    
+
     'WITH
     A AS (
         SELECT p_node_id AS id, p_x AS x, p_y AS y FROM orders
@@ -18,7 +18,7 @@ SELECT * FROM _pgr_pickDeliver(
     SELECT A.id AS start_vid, B.id AS end_vid, sqrt( (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y)) AS agg_cost
     FROM A, A AS B WHERE A.id != B.id'
     );
- seq | vehicle_seq | vehicle_id | stop_seq | stop_type | stop_id | order_id | cargo |   travel_time    |   arrival_time   | wait_time | service_time |  departure_time  
+ seq | vehicle_seq | vehicle_id | stop_seq | stop_type | stop_id | order_id | cargo |   travel_time    |   arrival_time   | wait_time | service_time |  departure_time
 -----+-------------+------------+----------+-----------+---------+----------+-------+------------------+------------------+-----------+--------------+------------------
    1 |           1 |          1 |        1 |         1 |       6 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
    2 |           1 |          1 |        2 |         2 |       5 |        3 |    30 |                1 |                1 |         1 |            3 |                5
@@ -38,10 +38,10 @@ SELECT * FROM _pgr_pickDeliver(
     $$ SELECT * FROM orders ORDER BY id $$,
     $$ SELECT * FROM vehicles $$,
     $$ SELECT * from pgr_dijkstraCostMatrix(
-        ' SELECT * FROM edge_table ', ARRAY[3, 4, 5, 8, 9, 11]) 
+        ' SELECT * FROM edge_table ', ARRAY[3, 4, 5, 8, 9, 11])
     $$
 );
- seq | vehicle_seq | vehicle_id | stop_seq | stop_type | stop_id | order_id | cargo | travel_time | arrival_time | wait_time | service_time | departure_time 
+ seq | vehicle_seq | vehicle_id | stop_seq | stop_type | stop_id | order_id | cargo | travel_time | arrival_time | wait_time | service_time | departure_time
 -----+-------------+------------+----------+-----------+---------+----------+-------+-------------+--------------+-----------+--------------+----------------
    1 |           1 |          1 |        1 |         1 |       6 |       -1 |     0 |           0 |            0 |         0 |            0 |              0
    2 |           1 |          1 |        2 |         2 |       5 |        3 |    30 |           1 |            1 |         1 |            3 |              5
diff --git a/doc/queries/doc-pickDeliverEuclidean.queries b/doc/queries/doc-pickDeliverEuclidean.queries
index 1971291..df109a2 100644
--- a/doc/queries/doc-pickDeliverEuclidean.queries
+++ b/doc/queries/doc-pickDeliverEuclidean.queries
@@ -7,7 +7,7 @@ SELECT * FROM _pgr_pickDeliverEuclidean(
     'SELECT * FROM orders ORDER BY id',
     'SELECT * from vehicles'
 );
- seq | vehicle_seq | vehicle_id | stop_seq | stop_type | order_id | cargo |   travel_time    |   arrival_time   | wait_time | service_time |  departure_time  
+ seq | vehicle_seq | vehicle_id | stop_seq | stop_type | order_id | cargo |   travel_time    |   arrival_time   | wait_time | service_time |  departure_time
 -----+-------------+------------+----------+-----------+----------+-------+------------------+------------------+-----------+--------------+------------------
    1 |           1 |          1 |        1 |         1 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
    2 |           1 |          1 |        2 |         2 |        3 |    30 |                1 |                1 |         1 |            3 |                5
diff --git a/doc/queries/doc-trsp.queries b/doc/queries/doc-trsp.queries
index df8cb9e..4e0a774 100644
--- a/doc/queries/doc-trsp.queries
+++ b/doc/queries/doc-trsp.queries
@@ -7,7 +7,7 @@ SELECT * FROM pgr_trsp(
         'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edge_table',
         7, 12, false, false
     );
- seq | id1 | id2 | cost 
+ seq | id1 | id2 | cost
 -----+-----+-----+------
    0 |   7 |   6 |    1
    1 |   8 |   7 |    1
@@ -26,7 +26,7 @@ SELECT * FROM pgr_trsp(
         from_edge || coalesce('','' || via_path, '''') AS via_path
         FROM restrictions'
     );
- seq | id1 | id2 | cost 
+ seq | id1 | id2 | cost
 -----+-----+-----+------
    0 |   2 |   4 |    1
    1 |   5 |  10 |    1
@@ -45,7 +45,7 @@ SELECT * FROM pgr_trsp(
         from_edge || coalesce('','' || via_path, '''') AS via_path
         FROM restrictions'
     );
- seq | id1 | id2 | cost 
+ seq | id1 | id2 | cost
 -----+-----+-----+------
    0 |   7 |   6 |    1
    1 |   8 |   7 |    1
@@ -63,7 +63,7 @@ SELECT * FROM pgr_trspViaVertices(
         false,  false,
         'SELECT to_cost, target_id::int4, from_edge ||
         coalesce('',''||via_path,'''') AS via_path FROM restrictions');
- seq | id1 | id2 | id3 | cost 
+ seq | id1 | id2 | id3 | cost
 -----+-----+-----+-----+------
    1 |   1 |   2 |   4 |    1
    2 |   1 |   5 |  10 |    1
@@ -91,7 +91,7 @@ SELECT * FROM pgr_trspViaEdges(
         true,
         'SELECT to_cost, target_id::int4, FROM_edge ||
         coalesce('',''||via_path,'''') AS via_path FROM restrictions');
- seq | id1 | id2 | id3 | cost 
+ seq | id1 | id2 | id3 | cost
 -----+-----+-----+-----+------
    1 |   1 |  -1 |   2 |  0.5
    2 |   1 |   2 |   4 |    1
diff --git a/doc/queries/issue704.queries b/doc/queries/issue704.queries
deleted file mode 100644
index 364fa92..0000000
--- a/doc/queries/issue704.queries
+++ /dev/null
@@ -1,82 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
-CREATE TABLE maptest as 
-SELECT  671222::integer as id, 318255::integer as  source, 222698::integer as target, 14.02::float8 as cost, 14.02::float8 as reverse_cost UNION ALL
-SELECT  671223, 222698, 36655, 197.16, 197.16 UNION ALL
-SELECT  582877, 408918, 5556, 458.09, 458.09 UNION ALL
-SELECT  582876, 318255, 408918, 3.89, 3.89 UNION ALL
-SELECT  585280, 5556, 454424, 54.84, 54.84;
-SELECT 5
-q1
-SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4)
-FROM pgr_trsp(
-    'select * from maptest',
-    582877,     
-    0,          
-    582877,     
-    0.5,        
-    true,        
-    true,      
-    null 
-) PG ;
- seq | node | edge | cost 
------+------+------+------
-(0 rows)
-
-q2
-SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4)
-FROM pgr_trsp(
-    'select * from maptest',
-    582877,     
-    0.0000000001,          
-    582877,     
-    0.5,        
-    true,        
-    true,      
-    null 
-) PG ;
- seq | node |  edge  |   cost   
------+------+--------+----------
-   0 |   -1 | 582877 | 229.0450
-   1 |   -2 |     -1 |   0.0000
-(2 rows)
-
-q3
-SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4)
-FROM pgr_trsp(
-    'select * from maptest',
-    582877,     
-    0,         
-    582877,     
-    0.5,        
-    true,        
-    true,      
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-) PG ;
- seq | node |  edge  |   cost   
------+------+--------+----------
-   0 |   -1 | 582877 | 229.0450
-(1 row)
-
-q4
-SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4)
-FROM pgr_trsp(
-    'select * from maptest',
-    582877,     
-    0.0000000001,          
-    582877,     
-    0.5,        
-    true,        
-    true,      
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-) PG ;
- seq | node |  edge  |   cost   
------+------+--------+----------
-   0 |   -1 | 582877 | 229.0450
-(1 row)
-
-q5
-ROLLBACK;
-ROLLBACK
diff --git a/doc/queries/oneDepotWrapper.queries b/doc/queries/oneDepotWrapper.queries
deleted file mode 100644
index 8c24c83..0000000
--- a/doc/queries/oneDepotWrapper.queries
+++ /dev/null
@@ -1,256 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
-SELECT * FROM _pgr_vrpOneDepot(
-    'SELECT * FROM vrp_orders',
-    'SELECT * FROM vrp_vehicles',
-    'SELECT src_id AS start_vid, dest_id AS end_vid, traveltime AS agg_cost FROM vrp_distance',
-    1);
- seq | vehicle_seq | vehicle_id | stop_seq | stop_type | stop_id | order_id | cargo | travel_time | arrival_time |     wait_time     | service_time | departure_time 
------+-------------+------------+----------+-----------+---------+----------+-------+-------------+--------------+-------------------+--------------+----------------
-   1 |           1 |          5 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
-   2 |           1 |          5 |        2 |         2 |       1 |       66 |    16 |           0 |            0 |                 0 |            0 |              0
-   3 |           1 |          5 |        3 |         2 |       1 |       25 |    26 |           0 |            0 |                 0 |            0 |              0
-   4 |           1 |          5 |        4 |         2 |       1 |       21 |    36 |           0 |            0 |                 0 |            0 |              0
-   5 |           1 |          5 |        5 |         2 |       1 |       84 |    50 |           0 |            0 |                 0 |            0 |              0
-   6 |           1 |          5 |        6 |         2 |       1 |       50 |    60 |           0 |            0 |                 0 |            0 |              0
-   7 |           1 |          5 |        7 |         2 |       1 |       49 |    70 |           0 |            0 |                 0 |            0 |              0
-   8 |           1 |          5 |        8 |         2 |       1 |       24 |   100 |           0 |            0 |                 0 |            0 |              0
-   9 |           1 |          5 |        9 |         2 |       1 |       22 |   110 |           0 |            0 |                 0 |            0 |              0
-  10 |           1 |          5 |       10 |         2 |       1 |       20 |   150 |           0 |            0 |                 0 |            0 |              0
-  11 |           1 |          5 |       11 |         2 |       1 |       19 |   170 |           0 |            0 |                 0 |            0 |              0
-  12 |           1 |          5 |       12 |         3 |      66 |       66 |   154 |    11.18034 |     11.18034 |                 0 |           10 |       21.18034
-  13 |           1 |          5 |       13 |         3 |      84 |       84 |   140 |    9.219544 |    30.399884 |          4.600116 |           10 |             45
-  14 |           1 |          5 |       14 |         3 |      24 |       24 |   110 |   26.019224 |    71.019224 |                 0 |           10 |      81.019224
-  15 |           1 |          5 |       15 |         3 |      22 |       22 |   100 |           2 |    83.019224 |                 0 |           10 |      93.019224
-  16 |           1 |          5 |       16 |         3 |      20 |       20 |    60 |    5.385165 |    98.404389 |                 0 |           10 |     108.404389
-  17 |           1 |          5 |       17 |         3 |      19 |       19 |    40 |    5.385165 |   113.789554 |                 0 |           10 |     123.789554
-  18 |           1 |          5 |       18 |         3 |      50 |       50 |    30 |     7.28011 |   131.069664 |                 0 |           10 |     141.069664
-  19 |           1 |          5 |       19 |         3 |      21 |       21 |    20 |           3 |   144.069664 |                 0 |           10 |     154.069664
-  20 |           1 |          5 |       20 |         3 |      25 |       25 |    10 |           4 |   158.069664 |                 0 |           10 |     168.069664
-  21 |           1 |          5 |       21 |         3 |      49 |       49 |     0 |    10.77033 |   178.839994 |                 0 |           10 |     188.839994
-  22 |           1 |          5 |       22 |         6 |       1 |       -1 |     0 |   45.044423 |   233.884417 |                 0 |            0 |     233.884417
-  23 |           2 |          6 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
-  24 |           2 |          6 |        2 |         2 |       1 |       31 |    10 |           0 |            0 |                 0 |            0 |              0
-  25 |           2 |          6 |        3 |         2 |       1 |       32 |    30 |           0 |            0 |                 0 |            0 |              0
-  26 |           2 |          6 |        4 |         2 |       1 |       81 |    43 |           0 |            0 |                 0 |            0 |              0
-  27 |           2 |          6 |        5 |         2 |       1 |       94 |    46 |           0 |            0 |                 0 |            0 |              0
-  28 |           2 |          6 |        6 |         2 |       1 |       93 |    60 |           0 |            0 |                 0 |            0 |              0
-  29 |           2 |          6 |        7 |         2 |       1 |       35 |    90 |           0 |            0 |                 0 |            0 |              0
-  30 |           2 |          6 |        8 |         2 |       1 |       33 |   100 |           0 |            0 |                 0 |            0 |              0
-  31 |           2 |          6 |        9 |         2 |       1 |       28 |   120 |           0 |            0 |                 0 |            0 |              0
-  32 |           2 |          6 |       10 |         2 |       1 |       27 |   150 |           0 |            0 |                 0 |            0 |              0
-  33 |           2 |          6 |       11 |         3 |      93 |       93 |   136 |   14.764823 |    14.764823 |                 0 |           10 |      24.764823
-  34 |           2 |          6 |       12 |         3 |      32 |       32 |   116 |   35.902646 |    60.667469 | 0.332531000000003 |           10 |             71
-  35 |           2 |          6 |       13 |         3 |      28 |       28 |    96 |           7 |           78 |                 0 |           10 |             88
-  36 |           2 |          6 |       14 |         3 |      31 |       31 |    86 |    8.602325 |    96.602325 |                 0 |           10 |     106.602325
-  37 |           2 |          6 |       15 |         3 |      35 |       35 |    56 |    5.830952 |   112.433277 |                 0 |           10 |     122.433277
-  38 |           2 |          6 |       16 |         3 |      27 |       27 |    26 |    11.18034 |   133.613617 |                 0 |           10 |     143.613617
-  39 |           2 |          6 |       17 |         3 |      33 |       33 |    16 |           8 |   151.613617 |                 0 |           10 |     161.613617
-  40 |           2 |          6 |       18 |         3 |      94 |       94 |    13 |   34.058773 |    195.67239 |                 0 |           10 |      205.67239
-  41 |           2 |          6 |       19 |         3 |      81 |       81 |     0 |   14.866069 |   220.538459 |                 0 |           10 |     230.538459
-  42 |           2 |          6 |       20 |         6 |       1 |       -1 |     0 |    7.615773 |   238.154232 |                 0 |            0 |     238.154232
-  43 |           3 |          3 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
-  44 |           3 |          3 |        2 |         2 |       1 |       16 |    20 |           0 |            0 |                 0 |            0 |              0
-  45 |           3 |          3 |        3 |         2 |       1 |       14 |    30 |           0 |            0 |                 0 |            0 |              0
-  46 |           3 |          3 |        4 |         2 |       1 |       48 |    40 |           0 |            0 |                 0 |            0 |              0
-  47 |           3 |          3 |        5 |         2 |       1 |       18 |    60 |           0 |            0 |                 0 |            0 |              0
-  48 |           3 |          3 |        6 |         2 |       1 |       17 |    80 |           0 |            0 |                 0 |            0 |              0
-  49 |           3 |          3 |        7 |         2 |       1 |       15 |    90 |           0 |            0 |                 0 |            0 |              0
-  50 |           3 |          3 |        8 |         2 |       1 |       13 |   110 |           0 |            0 |                 0 |            0 |              0
-  51 |           3 |          3 |        9 |         2 |       1 |       11 |   140 |           0 |            0 |                 0 |            0 |              0
-  52 |           3 |          3 |       10 |         2 |       1 |       10 |   160 |           0 |            0 |                 0 |            0 |              0
-  53 |           3 |          3 |       11 |         3 |      15 |       15 |   150 |   35.355339 |    35.355339 |                 0 |           10 |      45.355339
-  54 |           3 |          3 |       12 |         3 |      48 |       48 |   140 |           3 |    48.355339 |                 0 |           10 |      58.355339
-  55 |           3 |          3 |       13 |         3 |      13 |       13 |   120 |           6 |    64.355339 |                 0 |           10 |      74.355339
-  56 |           3 |          3 |       14 |         3 |      16 |       16 |   100 |     7.81025 |    82.165589 |                 0 |           10 |      92.165589
-  57 |           3 |          3 |       15 |         3 |      17 |       17 |    80 |           2 |    94.165589 |                 0 |           10 |     104.165589
-  58 |           3 |          3 |       16 |         3 |      10 |       10 |    60 |    11.18034 |   115.345929 |                 0 |           10 |     125.345929
-  59 |           3 |          3 |       17 |         3 |      11 |       11 |    30 |           5 |   130.345929 |                 0 |           10 |     140.345929
-  60 |           3 |          3 |       18 |         3 |      14 |       14 |    20 |    7.071068 |   147.416997 |                 0 |           10 |     157.416997
-  61 |           3 |          3 |       19 |         3 |      18 |       18 |     0 |    11.18034 |   168.597337 |                 0 |           10 |     178.597337
-  62 |           3 |          3 |       20 |         6 |       1 |       -1 |     0 |   40.311289 |   218.908626 |                 0 |            0 |     218.908626
-  63 |           4 |          8 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
-  64 |           4 |          8 |        2 |         2 |       1 |       71 |    23 |           0 |            0 |                 0 |            0 |              0
-  65 |           4 |          8 |        3 |         2 |       1 |       55 |    39 |           0 |            0 |                 0 |            0 |              0
-  66 |           4 |          8 |        4 |         2 |       1 |       44 |    59 |           0 |            0 |                 0 |            0 |              0
-  67 |           4 |          8 |        5 |         2 |       1 |       43 |    69 |           0 |            0 |                 0 |            0 |              0
-  68 |           4 |          8 |        6 |         2 |       1 |       42 |    89 |           0 |            0 |                 0 |            0 |              0
-  69 |           4 |          8 |        7 |         2 |       1 |       41 |   119 |           0 |            0 |                 0 |            0 |              0
-  70 |           4 |          8 |        8 |         2 |       1 |       40 |   129 |           0 |            0 |                 0 |            0 |              0
-  71 |           4 |          8 |        9 |         2 |       1 |       39 |   159 |           0 |            0 |                 0 |            0 |              0
-  72 |           4 |          8 |       10 |         3 |      43 |       43 |   149 |    33.54102 |     33.54102 |                 0 |           10 |       43.54102
-  73 |           4 |          8 |       11 |         3 |      40 |       40 |   139 |           5 |     48.54102 |                 0 |           10 |       58.54102
-  74 |           4 |          8 |       12 |         3 |      39 |       39 |   109 |           2 |     60.54102 |          14.45898 |           10 |             85
-  75 |           4 |          8 |       13 |         3 |      41 |       41 |    79 |    5.385165 |    90.385165 |                 0 |           10 |     100.385165
-  76 |           4 |          8 |       14 |         3 |      42 |       42 |    59 |   10.198039 |   110.583204 |                 0 |           10 |     120.583204
-  77 |           4 |          8 |       15 |         3 |      44 |       44 |    39 |   10.440307 |   131.023511 |                 0 |           10 |     141.023511
-  78 |           4 |          8 |       16 |         3 |      55 |       55 |    23 |          25 |   166.023511 |                 0 |           10 |     176.023511
-  79 |           4 |          8 |       17 |         3 |      71 |       71 |     0 |   21.931712 |   197.955223 |                 0 |           10 |     207.955223
-  80 |           4 |          8 |       18 |         6 |       1 |       -1 |     0 |   19.646883 |   227.602106 |                 0 |            0 |     227.602106
-  81 |           5 |          1 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
-  82 |           5 |          1 |        2 |         2 |       1 |        4 |    10 |           0 |            0 |                 0 |            0 |              0
-  83 |           5 |          1 |        3 |         2 |       1 |      101 |    13 |           0 |            0 |                 0 |            0 |              0
-  84 |           5 |          1 |        4 |         2 |       1 |       46 |    23 |           0 |            0 |                 0 |            0 |              0
-  85 |           5 |          1 |        5 |         2 |       1 |        5 |    63 |           0 |            0 |                 0 |            0 |              0
-  86 |           5 |          1 |        6 |         2 |       1 |        3 |    93 |           0 |            0 |                 0 |            0 |              0
-  87 |           5 |          1 |        7 |         3 |      46 |       46 |    83 |   37.735925 |    37.735925 |                 0 |           10 |      47.735925
-  88 |           5 |          1 |        8 |         3 |       3 |        3 |    53 |     7.28011 |    55.016035 |                 0 |           10 |      65.016035
-  89 |           5 |          1 |        9 |         2 |       1 |        2 |    73 |   30.805844 |    95.821879 |                 0 |            0 |      95.821879
-  90 |           5 |          1 |       10 |         3 |       4 |        4 |    63 |   39.357337 |   135.179216 |                 0 |           10 |     145.179216
-  91 |           5 |          1 |       11 |         3 |       2 |        2 |    43 |           3 |   148.179216 |                 0 |           10 |     158.179216
-  92 |           5 |          1 |       12 |         3 |       5 |        5 |     3 |    7.071068 |   165.250284 |                 0 |           10 |     175.250284
-  93 |           5 |          1 |       13 |         3 |     101 |      101 |     0 |   17.029386 |    192.27967 |                 0 |           10 |      202.27967
-  94 |           5 |          1 |       14 |         6 |       1 |       -1 |     0 |   19.235384 |   221.515054 |                 0 |            0 |     221.515054
-  95 |           6 |         13 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
-  96 |           6 |         13 |        2 |         2 |       1 |       92 |    13 |           0 |            0 |                 0 |            0 |              0
-  97 |           6 |         13 |        3 |         2 |       1 |       52 |    32 |           0 |            0 |                 0 |            0 |              0
-  98 |           6 |         13 |        4 |         2 |       1 |       57 |    51 |           0 |            0 |                 0 |            0 |              0
-  99 |           6 |         13 |        5 |         2 |       1 |       85 |    69 |           0 |            0 |                 0 |            0 |              0
- 100 |           6 |         13 |        6 |         2 |       1 |       68 |    78 |           0 |            0 |                 0 |            0 |              0
- 101 |           6 |         13 |        7 |         2 |       1 |       63 |    81 |           0 |            0 |                 0 |            0 |              0
- 102 |           6 |         13 |        8 |         3 |      63 |       63 |    78 |   29.154759 |    29.154759 |         22.845241 |           10 |             62
- 103 |           6 |         13 |        9 |         3 |      68 |       68 |    69 |    7.071068 |    69.071068 | 0.928932000000003 |           10 |             80
- 104 |           6 |         13 |       10 |         3 |      52 |       52 |    50 |   23.769729 |   103.769729 |                 0 |           10 |     113.769729
- 105 |           6 |         13 |       11 |         3 |      85 |       85 |    32 |    9.219544 |   122.989273 |                 0 |           10 |     132.989273
- 106 |           6 |         13 |       12 |         3 |      57 |       57 |    13 |    9.219544 |   142.208817 |                 0 |           10 |     152.208817
- 107 |           6 |         13 |       13 |         3 |      92 |       92 |     0 |    7.071068 |   159.279885 |  7.72011499999999 |           10 |            177
- 108 |           6 |         13 |       14 |         6 |       1 |       -1 |     0 |   12.041595 |   189.041595 |                 0 |            0 |     189.041595
- 109 |           7 |          7 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
- 110 |           7 |          7 |        2 |         2 |       1 |       30 |    10 |           0 |            0 |                 0 |            0 |              0
- 111 |           7 |          7 |        3 |         2 |       1 |       29 |    20 |           0 |            0 |                 0 |            0 |              0
- 112 |           7 |          7 |        4 |         2 |       1 |       38 |    30 |           0 |            0 |                 0 |            0 |              0
- 113 |           7 |          7 |        5 |         2 |       1 |       36 |    50 |           0 |            0 |                 0 |            0 |              0
- 114 |           7 |          7 |        6 |         2 |       1 |       34 |    60 |           0 |            0 |                 0 |            0 |              0
- 115 |           7 |          7 |        7 |         3 |      34 |       34 |    50 |   51.478151 |    51.478151 |                 0 |           10 |      61.478151
- 116 |           7 |          7 |        8 |         3 |      29 |       29 |    40 |    8.602325 |    70.080476 |                 0 |           10 |      80.080476
- 117 |           7 |          7 |        9 |         3 |      30 |       30 |    30 |    5.385165 |    85.465641 |                 0 |           10 |      95.465641
- 118 |           7 |          7 |       10 |         3 |      38 |       38 |    20 |   53.235327 |   148.700968 |                 0 |           10 |     158.700968
- 119 |           7 |          7 |       11 |         3 |      36 |       36 |     0 |    3.605551 |   162.306519 |                 0 |           10 |     172.306519
- 120 |           7 |          7 |       12 |         6 |       1 |       -1 |     0 |   44.204072 |   216.510591 |                 0 |            0 |     216.510591
- 121 |           8 |          2 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
- 122 |           8 |          2 |        2 |         2 |       1 |       89 |    19 |           0 |            0 |                 0 |            0 |              0
- 123 |           8 |          2 |        3 |         2 |       1 |       47 |    29 |           0 |            0 |                 0 |            0 |              0
- 124 |           8 |          2 |        4 |         2 |       1 |       61 |    46 |           0 |            0 |                 0 |            0 |              0
- 125 |           8 |          2 |        5 |         2 |       1 |        9 |    56 |           0 |            0 |                 0 |            0 |              0
- 126 |           8 |          2 |        6 |         2 |       1 |        8 |    76 |           0 |            0 |                 0 |            0 |              0
- 127 |           8 |          2 |        7 |         3 |      89 |       89 |    57 |   17.888544 |    17.888544 |         49.111456 |           10 |             77
- 128 |           8 |          2 |        8 |         3 |       8 |        8 |    37 |   19.235384 |    96.235384 |                 0 |           10 |     106.235384
- 129 |           8 |          2 |        9 |         3 |       9 |        9 |    27 |           5 |   111.235384 |                 0 |           10 |     121.235384
- 130 |           8 |          2 |       10 |         3 |      47 |       47 |    17 |           3 |   124.235384 |                 0 |           10 |     134.235384
- 131 |           8 |          2 |       11 |         3 |      61 |       61 |     0 |   20.223748 |   154.459132 | 0.540867999999989 |           10 |            165
- 132 |           8 |          2 |       12 |         6 |       1 |       -1 |     0 |   26.925824 |   191.925824 |                 0 |            0 |     191.925824
- 133 |           9 |         14 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
- 134 |           9 |         14 |        2 |         2 |       1 |       97 |    26 |           0 |            0 |                 0 |            0 |              0
- 135 |           9 |         14 |        3 |         2 |       1 |       64 |    32 |           0 |            0 |                 0 |            0 |              0
- 136 |           9 |         14 |        4 |         2 |       1 |       51 |    62 |           0 |            0 |                 0 |            0 |              0
- 137 |           9 |         14 |        5 |         2 |       1 |       96 |    68 |           0 |            0 |                 0 |            0 |              0
- 138 |           9 |         14 |        6 |         2 |       1 |       77 |    99 |           0 |            0 |                 0 |            0 |              0
- 139 |           9 |         14 |        7 |         3 |      96 |       96 |    93 |   20.615528 |    20.615528 |         13.384472 |           10 |             44
- 140 |           9 |         14 |        8 |         3 |      64 |       64 |    87 |   19.235384 |    63.235384 |                 0 |           10 |      73.235384
- 141 |           9 |         14 |        9 |         3 |      77 |       77 |    56 |    9.433981 |    82.669365 |                 0 |           10 |      92.669365
- 142 |           9 |         14 |       10 |         3 |      51 |       51 |    26 |   25.942244 |   118.611609 |                 0 |           10 |     128.611609
- 143 |           9 |         14 |       11 |         3 |      97 |       97 |     0 |   25.495098 |   154.106707 |                 0 |           10 |     164.106707
- 144 |           9 |         14 |       12 |         6 |       1 |       -1 |     0 |   15.524175 |   179.630882 |                 0 |            0 |     179.630882
- 145 |          10 |         15 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
- 146 |          10 |         15 |        2 |         2 |       1 |       67 |    16 |           0 |            0 |                 0 |            0 |              0
- 147 |          10 |         15 |        3 |         2 |       1 |       73 |    24 |           0 |            0 |                 0 |            0 |              0
- 148 |          10 |         15 |        4 |         2 |       1 |       95 |    47 |           0 |            0 |                 0 |            0 |              0
- 149 |          10 |         15 |        5 |         2 |       1 |       82 |    57 |           0 |            0 |                 0 |            0 |              0
- 150 |          10 |         15 |        6 |         2 |       1 |       72 |    71 |           0 |            0 |                 0 |            0 |              0
- 151 |          10 |         15 |        7 |         3 |      73 |       73 |    63 |    27.45906 |     27.45906 |           2.54094 |           10 |             40
- 152 |          10 |         15 |        8 |         3 |      72 |       72 |    49 |   10.198039 |    50.198039 |         14.801961 |           10 |             75
- 153 |          10 |         15 |        9 |         3 |      82 |       82 |    39 |   16.278821 |    91.278821 |                 0 |           10 |     101.278821
- 154 |          10 |         15 |       10 |         3 |      95 |       95 |    16 |   12.806248 |   114.085069 |                 0 |           10 |     124.085069
- 155 |          10 |         15 |       11 |         3 |      67 |       67 |     0 |   19.416488 |   143.501557 |                 0 |           10 |     153.501557
- 156 |          10 |         15 |       12 |         6 |       1 |       -1 |     0 |   13.038405 |   166.539962 |                 0 |            0 |     166.539962
- 157 |          11 |         11 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
- 158 |          11 |         11 |        2 |         2 |       1 |       78 |     7 |           0 |            0 |                 0 |            0 |              0
- 159 |          11 |         11 |        3 |         2 |       1 |       26 |    27 |           0 |            0 |                 0 |            0 |              0
- 160 |          11 |         11 |        4 |         2 |       1 |       87 |    55 |           0 |            0 |                 0 |            0 |              0
- 161 |          11 |         11 |        5 |         2 |       1 |       23 |    95 |           0 |            0 |                 0 |            0 |              0
- 162 |          11 |         11 |        6 |         3 |      87 |       87 |    67 |   32.202484 |    32.202484 |         54.797516 |           10 |             97
- 163 |          11 |         11 |        7 |         3 |      23 |       23 |    27 |   21.023796 |   118.023796 |                 0 |           10 |     128.023796
- 164 |          11 |         11 |        8 |         3 |      78 |       78 |    20 |   20.808652 |   148.832448 |          1.167552 |           10 |            160
- 165 |          11 |         11 |        9 |         3 |      26 |       26 |     0 |   12.165525 |   172.165525 |                 0 |           10 |     182.165525
- 166 |          11 |         11 |       10 |         6 |       1 |       -1 |     0 |   45.276926 |   227.442451 |                 0 |            0 |     227.442451
- 167 |          12 |          4 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
- 168 |          12 |          4 |        2 |         2 |       1 |       60 |    19 |           0 |            0 |                 0 |            0 |              0
- 169 |          12 |          4 |        3 |         2 |       1 |       59 |    39 |           0 |            0 |                 0 |            0 |              0
- 170 |          12 |          4 |        4 |         2 |       1 |      100 |    54 |           0 |            0 |                 0 |            0 |              0
- 171 |          12 |          4 |        5 |         2 |       1 |       54 |    59 |           0 |            0 |                 0 |            0 |              0
- 172 |          12 |          4 |        6 |         3 |      60 |       60 |    40 |   42.426407 |    42.426407 |                 0 |           10 |      52.426407
- 173 |          12 |          4 |        7 |         3 |     100 |      100 |    25 |   21.931712 |    74.358119 |          2.641881 |           10 |             87
- 174 |          12 |          4 |        8 |         3 |      54 |       54 |    20 |   16.155494 |   103.155494 |                 0 |           10 |     113.155494
- 175 |          12 |          4 |        9 |         3 |      59 |       59 |     0 |   40.311289 |   153.466783 |                 0 |           10 |     163.466783
- 176 |          12 |          4 |       10 |         6 |       1 |       -1 |     0 |   47.169906 |   210.636689 |                 0 |            0 |     210.636689
- 177 |          13 |         10 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
- 178 |          13 |         10 |        2 |         2 |       1 |       86 |     2 |           0 |            0 |                 0 |            0 |              0
- 179 |          13 |         10 |        3 |         2 |       1 |       90 |    27 |           0 |            0 |                 0 |            0 |              0
- 180 |          13 |         10 |        4 |         2 |       1 |       65 |    44 |           0 |            0 |                 0 |            0 |              0
- 181 |          13 |         10 |        5 |         2 |       1 |       53 |    47 |           0 |            0 |                 0 |            0 |              0
- 182 |          13 |         10 |        6 |         3 |      53 |       53 |    44 |          25 |           25 |                27 |           10 |             62
- 183 |          13 |         10 |        7 |         3 |      65 |       65 |    27 |          20 |           82 |                 0 |           10 |             92
- 184 |          13 |         10 |        8 |         3 |      86 |       86 |    25 |   19.313208 |   111.313208 |                 0 |           10 |     121.313208
- 185 |          13 |         10 |        9 |         3 |      90 |       90 |     0 |   18.439089 |   139.752297 |          4.247703 |           10 |            154
- 186 |          13 |         10 |       10 |         6 |       1 |       -1 |     0 |   52.478567 |   206.478567 |                 0 |            0 |     206.478567
- 187 |          14 |         12 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
- 188 |          14 |         12 |        2 |         2 |       1 |        6 |    20 |           0 |            0 |                 0 |            0 |              0
- 189 |          14 |         12 |        3 |         2 |       1 |       80 |    50 |           0 |            0 |                 0 |            0 |              0
- 190 |          14 |         12 |        4 |         2 |       1 |        7 |    70 |           0 |            0 |                 0 |            0 |              0
- 191 |          14 |         12 |        5 |         2 |       1 |       56 |    86 |           0 |            0 |                 0 |            0 |              0
- 192 |          14 |         12 |        6 |         3 |       6 |        6 |    66 |   40.311289 |    40.311289 | 0.688710999999998 |           10 |             51
- 193 |          14 |         12 |        7 |         3 |      80 |       80 |    36 |   22.022716 |    73.022716 |         15.977284 |           10 |             99
- 194 |          14 |         12 |        8 |         3 |       7 |        7 |    16 |   13.892444 |   112.892444 |                 0 |           10 |     122.892444
- 195 |          14 |         12 |        9 |         3 |      56 |       56 |     0 |   19.209373 |   142.101817 |                 0 |           10 |     152.101817
- 196 |          14 |         12 |       10 |         6 |       1 |       -1 |     0 |   14.142136 |   166.243953 |                 0 |            0 |     166.243953
- 197 |          15 |         19 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
- 198 |          15 |         19 |        2 |         2 |       1 |       88 |    13 |           0 |            0 |                 0 |            0 |              0
- 199 |          15 |         19 |        3 |         2 |       1 |       70 |    40 |           0 |            0 |                 0 |            0 |              0
- 200 |          15 |         19 |        4 |         2 |       1 |       58 |    63 |           0 |            0 |                 0 |            0 |              0
- 201 |          15 |         19 |        5 |         2 |       1 |       99 |    72 |           0 |            0 |                 0 |            0 |              0
- 202 |          15 |         19 |        6 |         3 |      70 |       70 |    45 |    9.219544 |     9.219544 |         31.780456 |           10 |             51
- 203 |          15 |         19 |        7 |         3 |      99 |       99 |    36 |           5 |           56 |                 0 |           10 |             66
- 204 |          15 |         19 |        8 |         3 |      88 |       88 |    23 |   31.304952 |    97.304952 |                 0 |           10 |     107.304952
- 205 |          15 |         19 |        9 |         3 |      58 |       58 |     0 |   18.027756 |   125.332708 |                 0 |           10 |     135.332708
- 206 |          15 |         19 |       10 |         6 |       1 |       -1 |     0 |   26.925824 |   162.258532 |                 0 |            0 |     162.258532
- 207 |          16 |         17 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
- 208 |          16 |         17 |        2 |         2 |       1 |       75 |     8 |           0 |            0 |                 0 |            0 |              0
- 209 |          16 |         17 |        3 |         2 |       1 |       98 |    43 |           0 |            0 |                 0 |            0 |              0
- 210 |          16 |         17 |        4 |         2 |       1 |       76 |    59 |           0 |            0 |                 0 |            0 |              0
- 211 |          16 |         17 |        5 |         3 |      76 |       76 |    43 |   57.008771 |    57.008771 |         16.991229 |           10 |             84
- 212 |          16 |         17 |        6 |         3 |      98 |       98 |     8 |   13.038405 |    97.038405 |         22.961595 |           10 |            130
- 213 |          16 |         17 |        7 |         3 |      75 |       75 |     0 |   16.124515 |   146.124515 |                 0 |           10 |     156.124515
- 214 |          16 |         17 |        8 |         6 |       1 |       -1 |     0 |   36.055513 |   192.180028 |                 0 |            0 |     192.180028
- 215 |          17 |         16 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
- 216 |          17 |         16 |        2 |         2 |       1 |       69 |    21 |           0 |            0 |                 0 |            0 |              0
- 217 |          17 |         16 |        3 |         2 |       1 |       79 |    48 |           0 |            0 |                 0 |            0 |              0
- 218 |          17 |         16 |        4 |         2 |       1 |       74 |    53 |           0 |            0 |                 0 |            0 |              0
- 219 |          17 |         16 |        5 |         3 |      74 |       74 |    48 |   39.293765 |    39.293765 |         37.706235 |           10 |             87
- 220 |          17 |         16 |        6 |         3 |      79 |       79 |    21 |    7.211103 |    94.211103 |                 0 |           10 |     104.211103
- 221 |          17 |         16 |        7 |         3 |      69 |       69 |     0 |   32.249031 |   136.460134 |  7.53986600000002 |           10 |            154
- 222 |          17 |         16 |        8 |         6 |       1 |       -1 |     0 |          10 |          164 |                 0 |            0 |            164
- 223 |          18 |          9 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
- 224 |          18 |          9 |        2 |         2 |       1 |       62 |     9 |           0 |            0 |                 0 |            0 |              0
- 225 |          18 |          9 |        3 |         2 |       1 |       37 |    49 |           0 |            0 |                 0 |            0 |              0
- 226 |          18 |          9 |        4 |         2 |       1 |       45 |    59 |           0 |            0 |                 0 |            0 |              0
- 227 |          18 |          9 |        5 |         3 |      37 |       37 |    19 |   43.011626 |    43.011626 |                 0 |           10 |      53.011626
- 228 |          18 |          9 |        6 |         3 |      45 |       45 |     9 |   10.440307 |    63.451933 | 0.548067000000003 |           10 |             74
- 229 |          18 |          9 |        7 |         3 |      62 |       62 |     0 |   19.723083 |    93.723083 |                 0 |           10 |     103.723083
- 230 |          18 |          9 |        8 |         6 |       1 |       -1 |     0 |   15.811388 |   119.534471 |                 0 |            0 |     119.534471
- 231 |          19 |         18 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
- 232 |          19 |         18 |        2 |         2 |       1 |       91 |     6 |           0 |            0 |                 0 |            0 |              0
- 233 |          19 |         18 |        3 |         2 |       1 |       12 |    46 |           0 |            0 |                 0 |            0 |              0
- 234 |          19 |         18 |        4 |         3 |      12 |       12 |     6 |   33.526109 |    33.526109 |         25.473891 |           10 |             69
- 235 |          19 |         18 |        5 |         3 |      91 |       91 |     0 |   29.832868 |    98.832868 |                 0 |           10 |     108.832868
- 236 |          19 |         18 |        6 |         6 |       1 |       -1 |     0 |    4.242641 |   113.075509 |                 0 |            0 |     113.075509
- 237 |          20 |         20 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
- 238 |          20 |         20 |        2 |         2 |       1 |       83 |     9 |           0 |            0 |                 0 |            0 |              0
- 239 |          20 |         20 |        3 |         3 |      83 |       83 |     0 |   14.764823 |    14.764823 |         27.235177 |           10 |             52
- 240 |          20 |         20 |        4 |         6 |       1 |       -1 |     0 |   14.764823 |    66.764823 |                 0 |            0 |      66.764823
- 241 |          -2 |          0 |        0 |        -1 |      -1 |       -1 |    -1 | 2304.305537 |           -1 |        408.022775 |         1000 |    3712.328312
-(241 rows)
-
-ROLLBACK;
-ROLLBACK
diff --git a/doc/queries/proof_of_concept.queries b/doc/queries/proof_of_concept.queries
index 1e9f91c..51709dd 100644
--- a/doc/queries/proof_of_concept.queries
+++ b/doc/queries/proof_of_concept.queries
@@ -31,7 +31,7 @@ pgr_dijkstra($$
     WHERE source IN (3, 5, 6, 9, 11, 15, 17)
         AND target IN (3, 5, 6, 9, 11, 15, 17)$$,
     3, 11, false);
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    3 |    5 |    1 |        0
    2 |        2 |    6 |   11 |    1 |        1
@@ -47,7 +47,7 @@ SELECT * FROM pgr_dijkstra($$
     WHERE source IN (3, 5, 6, 9, 11, 15, 17,   7, 8)
         AND target IN (3, 5, 6, 9, 11, 15, 17,   7, 8)$$,
     3, 7, false);
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    3 |   19 |    2 |        0
    2 |        2 |    5 |    7 |    1 |        2
@@ -64,7 +64,7 @@ SELECT * FROM pgr_dijkstra($$
     WHERE source IN (3, 5, 6, 9, 11, 15, 17,    10, 13)
         AND target IN (3, 5, 6, 9, 11, 15, 17,    10, 13)$$,
     3, 13, false);
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    3 |    5 |    1 |        0
    2 |        2 |    6 |   11 |    1 |        1
@@ -82,7 +82,7 @@ SELECT * FROM pgr_dijkstra($$
     WHERE source IN (3, 5, 6, 9, 11, 15, 17,    7, 8,   10, 13)
         AND target IN (3, 5, 6, 9, 11, 15, 17,   7, 8,   10, 13)$$,
     7, 13, false);
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    7 |    6 |    1 |        0
    2 |        2 |    8 |    7 |    1 |        1
@@ -100,7 +100,7 @@ SELECT * FROM pgr_dijkstra($$
     WHERE source IN (3, 5, 6, 7, 8, 9, 11, 15, 17)
         AND target IN (3, 5, 6, 7, 8, 9, 11, 15, 17)$$,
     3, 9, false);
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    3 |   20 |    2 |        0
    2 |        2 |    9 |   -1 |    0 |        2
@@ -110,7 +110,7 @@ SELECT id, source, target, cost, reverse_cost, is_contracted
 FROM edge_table
 WHERE is_contracted = true
 ORDER BY id;
- id | source | target | cost | reverse_cost | is_contracted 
+ id | source | target | cost | reverse_cost | is_contracted
 ----+--------+--------+------+--------------+---------------
  19 |      3 |      5 |    2 |            2 | t
  20 |      3 |      9 |    2 |            2 | t
@@ -126,7 +126,7 @@ SELECT * FROM pgr_dijkstra($$
         AND target IN (3, 5, 6, 7, 8, 9, 11, 15, 17)
         AND is_contracted=false$$,
     3, 9, false);
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    3 |    5 |    1 |        0
    2 |        2 |    6 |    9 |    1 |        1
diff --git a/doc/queries/trsp_notes_v2.5.0.queries b/doc/queries/trsp_notes_v2.5.0.queries
deleted file mode 100644
index fec6b64..0000000
--- a/doc/queries/trsp_notes_v2.5.0.queries
+++ /dev/null
@@ -1,1112 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
-ROLLBACK;
-ROLLBACK
-# Notes on pgr_trsp for version 2.5.0
-Table of contents
-* [Introduction](#introduction)
-  * [The restriction](#the-restriction)
-* [The Vertices Signature Version](#the-vertices-signature-version)
-  * [No path representation differences](#vertices-no-path-representation-differences)
-  * [Routing from/to same location](#routing-fromto-same-location)
-  * [Undirected graph](#vertices-undirected-graph)
-* [The Edges Signature Version](#the-edges-signature-version)
-  * [No path representation differences](#edges-no-path-representation-differences)
-  * [Definition of a path](#definition-of-a-path)
-  * [Points on the same edge](#points-on-the-same-edge)
-  * [Undirected graph](#edges-undirected-graph)
-  * [Using a points of interest table](#using-a-points-of-interest-table)
-  * [Routing from/to the same point](#routing-fromto-the-same-point)
-  * [Passing in front of other points](#passing-in-front-of-other-points)
-  * [Routing from a vertex to a point](#edges-routing-from-a-vertex-to-a-point)
-* [pgr_trspViaVertices](#pgr_trspviavertices)
-  * [pgr_trspViaVertices No path representation differences](#pgr_trspviavertices-no-path-representation-differences)
-  * [when a path does not exist on the route](#when-a-path-does-not-exist-on-the-route)
-  * [from 2 to 3 to 2](#from-2-to-3-to-2)
-* [pgr_trspViaEdges](#pgr_trspviaedges)
-  * [pgr_trspViaEdges No path representation differences](#pgr_trspviaedges-no-path-representation-differences)
-  * [Using a points of interest table](#pgr_trspviaedges-using-the-pointsofinterest-table)
-
-# Introduction
-pgr_trsp code has issues that are not being fixed yet, but as time passes and new functionality is added to pgRouting with wrappers to **hide** the issues, not to fix them.
-
-For clarity on the queries:
-* _pgr_trsp (with underscore) is the original code
-* pgr_trsp (lower case) represents the wrapper calling the original code
-* pgr_TRSP (upper case) represents the wrapper calling the replacement function, depending on the function, it can be:
-  * pgr_dijkstra
-  * pgr_dijkstraVia
-  * pgr_withPoints
-  * _pgr_withPointsVia
-
-This page intentions is to compare the original code with the wrapped version of the trsp group of functions.
-## The restriction
-The restriction used in the examples does not have to do anything with the graph:
-* No vertex has id: 25, 32 or 33
-* No edge has id: 25, 32 or 33
-```
-$$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, 32, 33::TEXT AS via_path$$
-```
-therefore the shortest path expected are as if there was no restriction involved
-# The Vertices signature version
-## (Vertices) No path representation differences
-Original function code
-* Sometimes it crasses the server when no path was found
-* Sometimes represents with Error a no path found
-* Forcing the user to use the wrapper or the replacement function
-
-Calls to the original function of is no longer allowed without restrictions
-```
-SELECT * FROM _pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 15, true, true
-);
-ERROR:  Error computing path: Path Not Found
-```
-dijkstra returns EMPTY SET to represent no path found
-```
-SELECT * FROM pgr_dijkstra(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 15
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-(0 rows)
-
-```
-pgr_trsp use the pgr_dijkstra when there are no restrictions
-therefore returns EMPTY SET to represent no path found
-```
-SELECT * FROM pgr_TRSP(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 15, true, true
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-(0 rows)
-
-```
-pgr_trsp use the original code when there are restrictions
-therefore throws Error to represent no path found
-```
-SELECT * FROM pgr_trsp(
-     $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-     1, 15, true, true,
-     $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
-ERROR:  Error computing path: Path Not Found
-CONTEXT:  PL/pgSQL function pgr_trsp(text,integer,integer,boolean,boolean,text) line 29 at RETURN QUERY
-```
-## routing from/to same location
-using dijkstra to verify (1 to 1)
-```
-SELECT * FROM pgr_dijkstra(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 1
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-(0 rows)
-
-```
-This call uses the replacement function because there are no restrictions (1 to 1)
-therefore is expected to return EMPTY SET to represent no path found
-```
-SELECT * FROM pgr_TRSP(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    1, 1,  true, true
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-(0 rows)
-
-```
-call forcing the use of the original code (1 to 1)
-* not longer allowed without restrictions
-
-```
-SELECT * FROM _pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    1, 1,  true, true
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |   1 |   1 |    1
-   1 |   2 |   4 |    1
-   2 |   5 |   8 |    1
-   3 |   6 |   9 |    1
-   4 |   9 |  16 |    1
-   5 |   4 |   3 |    1
-   6 |   3 |   2 |    1
-   7 |   2 |   1 |    1
-   8 |   1 |  -1 |    0
-(9 rows)
-
-```
-trsp with restrictions (1 to 1) use the original code
-is expected to return Error to represent no path found
-```
-SELECT * FROM pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    1, 1,  
-    true, 
-    true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |   1 |   1 |    1
-   1 |   2 |   4 |    1
-   2 |   5 |   8 |    1
-   3 |   6 |   9 |    1
-   4 |   9 |  16 |    1
-   5 |   4 |   3 |    1
-   6 |   3 |   2 |    1
-   7 |   2 |   1 |    1
-   8 |   1 |  -1 |    0
-(9 rows)
-
-```
-trsp calling the original code with restrictions (1 to 1)
-is expected to return Error to represent no path found
-but "finds" a path when there should be no path.
-```
-SELECT * FROM _pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    1, 1,  
-    true, 
-    true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |   1 |   1 |    1
-   1 |   2 |   4 |    1
-   2 |   5 |   8 |    1
-   3 |   6 |   9 |    1
-   4 |   9 |  16 |    1
-   5 |   4 |   3 |    1
-   6 |   3 |   2 |    1
-   7 |   2 |   1 |    1
-   8 |   1 |  -1 |    0
-(9 rows)
-
-```
-## (vertices) Undirected graph
-using Dijkstra to verify the shortest path from (2 to 3) on undirected graph
-```
-SELECT * FROM pgr_dijkstra(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    2, 3, false
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    2 |    2 |    1 |        0
-   2 |        2 |    3 |   -1 |    0 |        1
-(2 rows)
-
-```
-using the replacement function because there are no restrictions (2 to 3)
-```
-SELECT * FROM pgr_TRSP(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    2, 3,
-    false, 
-    true
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |   2 |   2 |    1
-   1 |   3 |  -1 |    0
-(2 rows)
-
-```
-call forcing the use of the original code
-* not longer allowed without restrictions
-
-```
-SELECT * FROM _pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    2, 3,
-    false, true
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |   2 |   4 |    1
-   1 |   5 |   8 |    1
-   2 |   6 |   9 |    1
-   3 |   9 |  16 |    1
-   4 |   4 |   3 |    1
-   5 |   3 |  -1 |    0
-(6 rows)
-
-```
-trsp with restrictions (2 to 3)
-does not find the shortest path
-```
-SELECT * FROM pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    2, 3,
-    false, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |   2 |   4 |    1
-   1 |   5 |   8 |    1
-   2 |   6 |   9 |    1
-   3 |   9 |  16 |    1
-   4 |   4 |   3 |    1
-   5 |   3 |  -1 |    0
-(6 rows)
-
-```
-calling the original code with restrictions (2 to 3)
-does not find the shortest path
-```
-SELECT * FROM _pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    2, 3,
-    false, 
-    true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |   2 |   4 |    1
-   1 |   5 |   8 |    1
-   2 |   6 |   9 |    1
-   3 |   9 |  16 |    1
-   4 |   4 |   3 |    1
-   5 |   3 |  -1 |    0
-(6 rows)
-
-```
-# The Edges signature version
-## (Edges) No path representation differences
-Original function code
-* Sometimes it crasses the server when no path was found
-* Sometimes represents with Error a no path found
-* Forcing the user to use the wrapper or the replacement function
-
-Calls to the original function of is no longer allowed without restrictions
-```
-SELECT * FROM _pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 0.5, 17, 0.5, true, true
-);
-ERROR:  Error computing path: Path Not Found
-```
-pgr_withPoints returns EMPTY SET to represent no path found
-```
-SELECT * FROM pgr_withPoints(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    $$(SELECT 1 as pid, 1 as edge_id, 0.5::float as fraction)
-    UNION
-    (SELECT 2, 17, 0.5)$$,
-    -1, -2
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-(0 rows)
-
-```
-## Definition of a path
-Remember that one characteristic of a path is that for a path of N edges it has N+1 vertices.
-
-For this example, suppose points, where the pid are different even if the edge and fraction are different.
-One point might be on the left side other on the right side, pgr_trsp does not take into account
-the side of the point
-calls forcing the use of the original code
-* not longer allowed without restrictions
-
-```
-SELECT * FROM _pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 0.5, 1, 0.5, true, true
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |  -1 |   1 |    0
-(1 row)
-
-```
-* with restrictions
-```
-SELECT * FROM _pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 0.5, 1, 0.5, true, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |  -1 |   1 |    0
-(1 row)
-
-```
-Using the *pgr_withPoints* it returns a path of N edge and N+1 vertices
-```
-SELECT * FROM pgr_withPoints(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    $$(SELECT 1 as pid, 1 as edge_id, 0.5::float as fraction)
-    UNION
-    (SELECT 2, 1, 0.5)$$,
-    -1, -2
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |   -1 |    1 |    0 |        0
-   2 |        2 |   -2 |   -1 |    0 |        0
-(2 rows)
-
-```
-The *pgr_withPoints* is used when there are no restrictions
-```
-SELECT * FROM pgr_TRSP(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 0.5, 1, 0.5, true, true
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |  -1 |   1 |    0
-   1 |  -2 |  -1 |    0
-(2 rows)
-
-```
-The original *_pgr_trsp* code is used when there are restrictions
-```
-SELECT * FROM pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 0.5, 1, 0.5, true, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |  -1 |   1 |    0
-(1 row)
-
-```
-note that pgr_withPoints returns an EMPTY SET when the point is the same
-```
-SELECT * FROM pgr_withPoints(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    $$(SELECT 1 as pid, 1 as edge_id, 0.5::float as fraction)
-    UNION
-    (SELECT 2, 1, 0.5)$$,
-    -1, -1
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-(0 rows)
-
-```
-## Points on the same edge
-The *pgr_withPoints* is used when there are no restrictions
-* it returns a path of N edges and N+1 vertices
-```
-SELECT * FROM pgr_TRSP(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 0.5, 1, 0.8, true, true
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |  -1 |   1 |  0.3
-   1 |  -2 |  -1 |    0
-(2 rows)
-
-```
-The original *_pgr_trsp* is used when there are restrictions
-* it returns a path of N edges and N vertex instead of N edge and N+1 vertices
-```
-SELECT * FROM pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 0.5, 1, 0.8, true, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |  -1 |   1 |  0.3
-(1 row)
-
-```
-## (Edges) Undirected graph
-the shortest path obtained with *pgr_withPoints*
-```
-SELECT * FROM pgr_withPoints(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    $$(SELECT 1 as pid, 4 as edge_id, 0.5::float as fraction)
-    UNION
-    (SELECT 2, 2, 0.8)$$,
-    -1, -2, directed:=false
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |   -1 |    4 |  0.5 |        0
-   2 |        2 |    2 |    2 |  0.8 |      0.5
-   3 |        3 |   -2 |   -1 |    0 |      1.3
-(3 rows)
-
-```
-The original *_pgr_trsp* is used when there are restrictions
-
-```
-SELECT * FROM pgr_TRSP(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    4, 0.5, 2, 0.8, false, true
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |  -1 |   4 |  0.5
-   1 |   2 |   2 |  0.8
-   2 |  -2 |  -1 |    0
-(3 rows)
-
-```
-when using restrictions the original *_pgr_trsp* is used internally
-* it returns a path of N edges and N vertex instead of N edge and N+1 vertices
-* it does not return the shortest path.
-
-```
-SELECT * FROM pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    4, 0.5, 2, 0.8, false, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |  -1 |   4 |  0.5
-   1 |   5 |   8 |    1
-   2 |   6 |   9 |    1
-   3 |   9 |  16 |    1
-   4 |   4 |   3 |    1
-   5 |   3 |   2 |  0.2
-(6 rows)
-
-```
-## Using a points of interest table
-The points of interest
-```
-SELECT * FROM pointsOfInterest;
- pid |  x  |  y  | edge_id | side | fraction |                  the_geom                  |                  newpoint                  
------+-----+-----+---------+------+----------+--------------------------------------------+--------------------------------------------
-   1 | 1.8 | 0.4 |       1 | l    |      0.4 | 0101000000CDCCCCCCCCCCFC3F9A9999999999D93F | 010100000000000000000000409A9999999999D93F
-   2 | 4.2 | 2.4 |      15 | r    |      0.4 | 0101000000CDCCCCCCCCCC10403333333333330340 | 010100000000000000000010403333333333330340
-   3 | 2.6 | 3.2 |      12 | l    |      0.6 | 0101000000CDCCCCCCCCCC04409A99999999990940 | 0101000000CDCCCCCCCCCC04400000000000000840
-   4 | 0.3 | 1.8 |       6 | r    |      0.3 | 0101000000333333333333D33FCDCCCCCCCCCCFC3F | 0101000000333333333333D33F0000000000000040
-   5 | 2.9 | 1.8 |       5 | l    |      0.8 | 01010000003333333333330740CDCCCCCCCCCCFC3F | 01010000000000000000000840CDCCCCCCCCCCFC3F
-   6 | 2.2 | 1.7 |       4 | b    |      0.7 | 01010000009A99999999990140333333333333FB3F | 01010000000000000000000040333333333333FB3F
-(6 rows)
-
-```
-On *pgr_trsp*, to be able to use the table information:
-* Each parameter has to be extracted explicitly from the table
-* Regardles of the point pid original value
-  * will always be -1 for the first point
-  * will always be -2 for the second point
-```
-SELECT * FROM pgr_TRSP(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 6),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 6),
-    true, true
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |  -1 |   1 |  0.6
-   1 |   2 |   4 |  0.7
-   2 |  -2 |  -1 |    0
-(3 rows)
-
-```
-On *pgr_withPoints*, to be able to use the table information:
-* select statement on the *pointsOfInterest* table
-* *Negative* the id to represent the id is a pid
-* The points pids in the result are not renumbered
-* The points pids in the result are represented with negative sign
-```
-SELECT * FROM pgr_withPoints(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
-    -1, -6
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |   -1 |    1 |  0.6 |        0
-   2 |        2 |    2 |    4 |  0.7 |      0.6
-   3 |        3 |   -6 |   -1 |    0 |      1.3
-(3 rows)
-
-```
-## routing from/to the same point
-using pgr_withPoints to check results
-expecting EMPTY SET to represent no path found
-```
-SELECT * FROM pgr_withPoints(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
-    -1, -1
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-(0 rows)
-
-```
-This call uses the replacement function because there are no restrictions
-* Because the pid is not involved the points are considered different
-* it returns a path
-
-```
-SELECT * FROM pgr_TRSP(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-    true, true
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |  -1 |   1 |    0
-   1 |  -2 |  -1 |    0
-(2 rows)
-
-```
-pgr_trsp with restrictions use the original code
-* it returns a path of N edges and N vertex instead of N edge and N+1 vertices
-
-```
-SELECT * FROM pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-    true, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |  -1 |   1 |    0
-(1 row)
-
-```
-## passing in front of other points
-using pgr_withPoints to verify the shortest path from pids (1 to 3)
-```
-SELECT * FROM pgr_withPoints(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
-    -1, -3
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |   -1 |    1 |  0.6 |        0
-   2 |        2 |    2 |    4 |    1 |      0.6
-   3 |        3 |    5 |   10 |    1 |      1.6
-   4 |        4 |   10 |   12 |  0.6 |      2.6
-   5 |        5 |   -3 |   -1 |    0 |      3.2
-(5 rows)
-
-```
-**pgr_withPoints** can be used to see when the route passes in front of other points
-In this example point pid=6 is passed in front of
-```
-SELECT * FROM pgr_withPoints(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
-    -1, -3, details:=true
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |   -1 |    1 |  0.6 |        0
-   2 |        2 |    2 |    4 |  0.7 |      0.6
-   3 |        3 |   -6 |    4 |  0.3 |      1.3
-   4 |        4 |    5 |   10 |    1 |      1.6
-   5 |        5 |   10 |   12 |  0.6 |      2.6
-   6 |        6 |   -3 |   -1 |    0 |      3.2
-(6 rows)
-
-```
-Can not be used to see if other points are passed in front of.
-The pointsOfInterest table is not part of the parameter
-```
-SELECT * FROM pgr_TRSP(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 3),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 3),
-    true, true
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |  -1 |   1 |  0.6
-   1 |   2 |   4 |    1
-   2 |   5 |  10 |    1
-   3 |  10 |  12 |  0.6
-   4 |  -2 |  -1 |    0
-(5 rows)
-
-```
-## (edges) Routing from a vertex to a point
-Showing *pgr_withPoints* results of the shortest path from vid 6 to pid 1
-```
-SELECT * FROM pgr_withPoints(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
-    6, -1
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    6 |    8 |    1 |        0
-   2 |        2 |    5 |    4 |    1 |        1
-   3 |        3 |    2 |    1 |  0.6 |        2
-   4 |        4 |   -1 |   -1 |    0 |      2.6
-(4 rows)
-
-```
-* Vertex 6 is on edge 8 at 1 fraction
-* Vertex 6 is also edge 11 at 0 fraction
-* Undefined behaviour when at least one of the "points" is an actual vertex
-
-```
-SELECT * FROM pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    8, 1,
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-    true, true
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-(0 rows)
-
-SELECT * FROM pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    11, 0,
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-    true, true
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-(0 rows)
-
-```
-# pgr_trspViaVertices
-## pgr_trspViaVertices No path representation differences
-pgr_trspViaVertices uses _pgr_trsp which as mentioned before
-* Sometimes it crasses the server when no path was found
-* Sometimes represents with Error a no path found
-* Forcing the user to use the wrapper or the replacement function
-
-Calls to the original function of is no longer allowed without restrictions
-```
-SELECT * FROM _pgr_trspViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 15, 2],
-    false, true
-);
-ERROR:  Error computing path: Path Not Found
-CONTEXT:  PL/pgSQL function _pgr_trspviavertices(text,integer[],boolean,boolean,text) line 16 at FOR over SELECT rows
-SELECT * FROM _pgr_trspViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 15, 2, 1],
-    false, true
-);
-ERROR:  Error computing path: Path Not Found
-CONTEXT:  PL/pgSQL function _pgr_trspviavertices(text,integer[],boolean,boolean,text) line 16 at FOR over SELECT rows
-```
-**pgr_dijkstraVia** returning what paths of the route it finds or EMPTY SET when non is found
-this case none is found
-```
-SELECT * FROM pgr_dijkstraVia(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 15, 2],
-    false
-);
- seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost 
------+---------+----------+-----------+---------+------+------+------+----------+----------------
-(0 rows)
-
-```
-this case only from 2 to 1 is found
-```
-SELECT * FROM pgr_dijkstraVia(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 15, 2, 1],
-    false
-);
- seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost 
------+---------+----------+-----------+---------+------+------+------+----------+----------------
-   1 |       3 |        1 |         2 |       1 |    2 |    1 |    1 |        0 |              0
-   2 |       3 |        2 |         2 |       1 |    1 |   -2 |    0 |        1 |              1
-(2 rows)
-
-```
-the **pgr_dijkstraVia** used are for complete routes so its marked as **strict:=true**
-therefore the expected result is EMPTY SET to represent no route was found
-```
-SELECT * FROM pgr_dijkstraVia(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 1, 2],
-    false,
-    strict := true
-);
- seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost 
------+---------+----------+-----------+---------+------+------+------+----------+----------------
-(0 rows)
-
-```
-## when a path does not exist on the route
-pgr_TRSPViaVertices using the *pgr_dijkstraVia* when there are no restrictions.
-Because there is no path from 1 to 1 then there is no complete route 1 to 1 to 2
-therefore the expected result is EMPTY SET to represent no route was found
-```
-SELECT * FROM pgr_TRSPViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 1, 2],
-    false, true
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-(0 rows)
-
-```
-Calls to the original function of is no longer allowed without restrictions
-```
-SELECT * FROM _pgr_trspViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 1, 2],
-    false, true
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |   1 |   1 |    1
-   2 |   1 |   2 |   4 |    1
-   3 |   1 |   5 |   8 |    1
-   4 |   1 |   6 |   9 |    1
-   5 |   1 |   9 |  16 |    1
-   6 |   1 |   4 |   3 |    1
-   7 |   1 |   3 |   2 |    1
-   8 |   1 |   2 |   1 |    1
-   9 |   2 |   1 |   1 |    1
-  10 |   2 |   2 |  -1 |    0
-(10 rows)
-
-```
-with restrictions the original code is used
-```
-SELECT * FROM pgr_trspViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 1, 2],
-    false, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |   1 |   1 |    1
-   2 |   1 |   2 |   4 |    1
-   3 |   1 |   5 |   8 |    1
-   4 |   1 |   6 |   9 |    1
-   5 |   1 |   9 |  16 |    1
-   6 |   1 |   4 |   3 |    1
-   7 |   1 |   3 |   2 |    1
-   8 |   1 |   2 |   1 |    1
-   9 |   2 |   1 |   1 |    1
-  10 |   2 |   2 |  -1 |    0
-(10 rows)
-
-```
-Using explicitly the original code
-```
-SELECT * FROM _pgr_trspViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 1, 2],
-    false, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |   1 |   1 |    1
-   2 |   1 |   2 |   4 |    1
-   3 |   1 |   5 |   8 |    1
-   4 |   1 |   6 |   9 |    1
-   5 |   1 |   9 |  16 |    1
-   6 |   1 |   4 |   3 |    1
-   7 |   1 |   3 |   2 |    1
-   8 |   1 |   2 |   1 |    1
-   9 |   2 |   1 |   1 |    1
-  10 |   2 |   2 |  -1 |    0
-(10 rows)
-
-```
-## from 2 to 3 to 2
-dijkstra via shows the shortest route on the two paths
-```
-SELECT * FROM pgr_dijkstraVia(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[2, 3, 2],
-    false 
-);
- seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost 
------+---------+----------+-----------+---------+------+------+------+----------+----------------
-   1 |       1 |        1 |         2 |       3 |    2 |    2 |    1 |        0 |              0
-   2 |       1 |        2 |         2 |       3 |    3 |   -1 |    0 |        1 |              1
-   3 |       2 |        1 |         3 |       2 |    3 |    2 |    1 |        0 |              1
-   4 |       2 |        2 |         3 |       2 |    2 |   -2 |    0 |        1 |              2
-(4 rows)
-
-```
-the replacement function **pgr_dijkstraVia** is used because there are no restrictions
-```
-SELECT * FROM pgr_TRSPViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[2, 3, 2],
-    false, 
-    true
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |   2 |   2 |    1
-   2 |   2 |   3 |   2 |    1
-   3 |   2 |   2 |  -1 |    0
-(3 rows)
-
-```
-Calls to the original function of is no longer allowed without restrictions
-```
-SELECT * FROM _pgr_trspViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[2, 3, 2],
-    false, 
-    true
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |   2 |   4 |    1
-   2 |   1 |   5 |   8 |    1
-   3 |   1 |   6 |   9 |    1
-   4 |   1 |   9 |  16 |    1
-   5 |   1 |   4 |   3 |    1
-   6 |   2 |   3 |   2 |    1
-   7 |   2 |   2 |  -1 |    0
-(7 rows)
-
-```
-# pgr_trspViaEdges
-*pgr_trspViaEdges* will use the original code when
-* There are restrictions
-* A point is a vertex in disguise (with pcts value of 0)
-
-What it returns
-* Error to represent no route
-* the points are renumbered to -1, -2 .. -N
-* if a point is part of a path it will **not** show on the path
-
-Exaple execution
-```
-SELECT * FROM pgr_trspViaEdges(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 2, 1], ARRAY[0.1,0.5,0.5],
-    false, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |  -1 |   1 |  0.9
-   2 |   1 |   2 |   4 |    1
-   3 |   1 |   5 |   8 |    1
-   4 |   1 |   6 |   9 |    1
-   5 |   1 |   9 |  16 |    1
-   6 |   1 |   4 |   3 |    1
-   7 |   1 |   3 |   2 |    1
-   8 |   2 |   2 |   1 |  0.5
-(8 rows)
-
-```
-A temporay wraper function is used when:
-* There are no restrictions
-* Before: No point is a vertex in disguise (with pcts value of 0)
-* Now: c$Undefined behaviour when a point is a vertex in disguise (with pcts value of 0)
-
-Internaly:
-* builds a new graph and calls pgr_dijkstraVia
-
-What it returns
-* returns EMPTY SET to represent no route
-* edge = -1 in the result to represent the end of a intermediate path
-* edge = -2 in the result to represent the end of the last path & route
-* the points are renumbered to -1, -2 .. -N
-* if a point is part of a path it will show on the path
-
-Note: I do not mention the wrapper name due to the fact that this is not official documentation
-Note: I will use *_pgr_withPointsVia* as the wrapper name just for sake of this notes
-Example excution
-```
-SELECT * FROM _pgr_withPointsVia(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 2, 1], ARRAY[0.1,0.5,0.5],
-    directed := false
-);
- seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost 
------+---------+----------+-----------+---------+------+------+------+----------+----------------
-   1 |       1 |        1 |        -1 |      -2 |   -1 |    1 |  0.1 |        0 |              0
-   2 |       1 |        2 |        -1 |      -2 |    2 |    2 |  0.5 |      0.1 |            0.1
-   3 |       1 |        3 |        -1 |      -2 |   -2 |   -1 |    0 |      0.6 |            0.6
-   4 |       2 |        1 |        -2 |      -3 |   -2 |    2 |  0.5 |        0 |            0.6
-   5 |       2 |        2 |        -2 |      -3 |    2 |    1 |  0.5 |      0.5 |            1.1
-   6 |       2 |        3 |        -2 |      -3 |   -3 |   -2 |    0 |        1 |            1.6
-(6 rows)
-
-```
-## pgr_trspViaEdges No path representation differences
-This example no path is found (edge 17 is disconnected) from the big graph.
-* There is a vertex in disguise (fraction 0 or 1)
-* Undefined behaviour
-
-```
-SELECT * FROM pgr_trspViaEdges(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 17, 1], ARRAY[0,0.5,0.5],
-    false, true
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |     |     |     |     
-(1 row)
-
-```
-This example no path is found (edge 17 is disconnected) from the big graph.
-* Has a restriction
-* *pgr_trspViaEdges* original code is used
-* throws error to represent no route was not found
-
-```
-SELECT * FROM pgr_trspViaEdges(
-$$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-ARRAY[1, 17, 1], ARRAY[0.5,0.5,0.5],
-false, true,
-$$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, 32, 33::TEXT AS via_path$$
-);
-server closed the connection unexpectedly
-This probably means the server terminated abnormally
-before or while processing the request.
-The connection to the server was lost. Attempting reset: Failed.
-```
-This example no path is found (edge 17 is disconnected) from the big graph.
-* *_pgr_withPointsVia* is used
-* returns EMPTY SET to represent no route
-
-```
-SELECT * FROM pgr_trspViaEdges(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 17, 1], ARRAY[0.1,0.5,0.5],
-    false, 
-    true
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-(0 rows)
-
-```
-## (pgr_trspViaEdges) Using the pointsOfInterest table
-Only routing points
-when *_pgr_withPointsVia* is used
-* the renumbering still takes place
-
-```
-SELECT * FROM pgr_trspViaEdges(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[
-        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 3),
-        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 6)],
-    ARRAY[
-        (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-        (SELECT fraction  FROM pointsOfInterest WHERE pid = 3),
-        (SELECT fraction  FROM pointsOfInterest WHERE pid = 6)],
-    false, 
-    true
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |  -1 |   1 |  0.4
-   2 |   1 |   2 |   4 |  0.3
-   3 |   1 |  -3 |   4 |  0.3
-   4 |   1 |   5 |  10 |    1
-   5 |   1 |  10 |  12 |  0.6
-   6 |   1 |  -2 |  -1 |    0
-   7 |   2 |  -2 |  12 |  0.6
-   8 |   2 |  10 |  10 |    1
-   9 |   2 |   5 |   4 |  0.3
-  10 |   2 |  -3 |  -2 |    0
-(10 rows)
-
-```
-Only routing points
-when originalcode is used (because there is a restriction)
-
-```
-SELECT * FROM pgr_trspViaEdges(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[
-        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 3),
-        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 6)],
-    ARRAY[
-        (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-        (SELECT fraction  FROM pointsOfInterest WHERE pid = 3),
-        (SELECT fraction  FROM pointsOfInterest WHERE pid = 6)],
-    false, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |  -1 |   1 |  0.6
-   2 |   1 |   2 |   4 |    1
-   3 |   1 |   5 |  10 |    1
-   4 |   1 |  10 |  12 |    1
-   5 |   2 |  11 |  13 |    1
-   6 |   2 |  12 |  15 |    1
-   7 |   2 |   9 |   9 |    1
-   8 |   2 |   6 |   8 |    1
-   9 |   2 |   5 |   4 |  0.3
-(9 rows)
-
-```
-Routing points & vertices
-* vertex 6 is on edge 11 with fraction 0
-* Undefined behavior
-```
-SELECT * FROM pgr_trspViaEdges(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[
-        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 3),
-        11],
-    ARRAY[
-        (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-        (SELECT fraction  FROM pointsOfInterest WHERE pid = 3),
-        0],
-    false, 
-    true
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |  -1 |   1 |  0.6
-   2 |   1 |   2 |   4 |    1
-   3 |   1 |   5 |  10 |    1
-   4 |   1 |  10 |  12 |  0.6
-   5 |   1 |  -2 |  -1 |    0
-(5 rows)
-
-```
-BEGIN;
-BEGIN
-ROLLBACK;
-ROLLBACK
diff --git a/doc/src/index.rst b/doc/src/index.rst
index b4be075..5b9f07e 100644
--- a/doc/src/index.rst
+++ b/doc/src/index.rst
@@ -48,7 +48,7 @@ Pgrouting Concepts
    :maxdepth: 2
 
    pgRouting-concepts
-   
+
 
 .. rubric:: Reference
 
@@ -101,7 +101,7 @@ Pgrouting Concepts
 .. include:: routingFunctions.rst
    :start-after: from-here
    :end-before: to-here
-    
+
 
 
 Available Functions but not official pgRouting functions
diff --git a/doc/src/pgRouting-concepts.rst b/doc/src/pgRouting-concepts.rst
index 529d11d..a2cdf17 100644
--- a/doc/src/pgRouting-concepts.rst
+++ b/doc/src/pgRouting-concepts.rst
@@ -45,7 +45,7 @@ For Postgresql 9.2 and later versions
 	psql mydatabase -c "create extension postgis"
 	psql mydatabase -c "create extension pgrouting"
 
-.. _load_data:    
+.. _load_data:
 
 Load Data
 ...............................................................................
diff --git a/doc/src/pgRouting-installation.rst b/doc/src/pgRouting-installation.rst
index f500718..5cb19e5 100644
--- a/doc/src/pgRouting-installation.rst
+++ b/doc/src/pgRouting-installation.rst
@@ -32,14 +32,12 @@ Short Version
 -------------------------------------------------------------------------------
 
 
-.. TODO: pumpup release must change this value
-
 Extracting the tar ball
 
 .. code-block:: bash
 
-    tar xvfz pgrouting-2.4.0.tar.gz
-    cd pgrouting-2.4.0
+    tar xvfz pgrouting-${PGROUTING_VERSION}.tar.gz
+    cd pgrouting-${PGROUTING_VERSION}
 
 To compile assuming you have all the dependencies in your search path:
 
@@ -72,11 +70,9 @@ The pgRouting latest release can be found in https://github.com/pgRouting/pgrout
 
 To download this release:
 
-.. TODO: pumpup release must change this value
-
 .. code-block:: bash
 
-    wget -O pgrouting-v2.4.0.tar.gz https://github.com/pgRouting/pgrouting/archive/v2.4.0.tar.gz
+    wget -O pgrouting-${PGROUTING_VERSION}.tar.gz https://github.com/pgRouting/pgrouting/archive/v${PGROUTING_VERSION}.tar.gz
 
 Goto :ref:`install-short` to the extract and compile instructions.
 
@@ -88,7 +84,7 @@ To download the repository
 
     git clone git://github.com/pgRouting/pgrouting.git
     cd pgrouting
-    git checkout |release|
+    git checkout v${PGROUTING_VERSION}
 
 Goto :ref:`install-short` to the compile instructions (there is no tar ball).
 
@@ -111,13 +107,13 @@ pgRouting is an extension and depends on postGIS. Enabling postGIS before enabli
 
 .. rubric:: Upgrading the database
 
-To upgrade pgRouting in the database to version 2.4.0 use the following command:
+To upgrade pgRouting in the database to version ${PGROUTING_VERSION} use the following command:
 
 .. TODO: pumpup release must change this value
 
 .. code-block:: sql
 
-   ALTER EXTENSION pgrouting UPDATE TO "2.4.0";
+   ALTER EXTENSION pgrouting UPDATE TO "${PGROUTING_VERSION}";
 
 More information can be found in https://www.postgresql.org/docs/current/static/sql-createextension.html
 
@@ -133,9 +129,9 @@ To be able to compile pgRouting, make sure that the following dependencies are m
 
 * C and C++0x compilers
   * g++ version >= 4.8
-* Postgresql version >= 9.2
-* PostGIS version >= 2.0
-* The Boost Graph Library (BGL). Version >= 1.46
+* Postgresql version >= 9.3
+* PostGIS version >= 2.2
+* The Boost Graph Library (BGL). Version >= 1.53
 * CMake >= 3.2
 * CGAL >=  4.2
 
@@ -161,17 +157,29 @@ For testing
 
 Installing the compilation dependencies
 
+.. rubric:: Database dependencies
+
+.. code-block:: none
+
+    sudo apt-get install
+        postgresql-10 \
+        postgresql-server-dev-10 \
+        postgresql-10-postgis
+
+
+.. rubric:: Build dependencies
+
 .. code-block:: none
 
     sudo apt-get install
         cmake \
         g++ \
-        postgresql-9.3 \
-        postgresql-server-dev-9.3 \
         libboost-graph-dev \
         libcgal-dev
 
-Installing the optional dependencies
+.. rubric:: Optional dependencies
+
+For documentation and testing
 
 .. code-block:: none
 
@@ -179,7 +187,7 @@ Installing the optional dependencies
         texlive \
         doxygen \
         libtap-parser-sourcehandler-pgtap-perl \
-        postgresql-9.3-pgtap
+        postgresql-10-pgtap
 
 
 .. _install_configuring:
diff --git a/doc/src/pgRouting-introduction.rst b/doc/src/pgRouting-introduction.rst
index 1360d66..59f6424 100644
--- a/doc/src/pgRouting-introduction.rst
+++ b/doc/src/pgRouting-introduction.rst
@@ -50,7 +50,7 @@ This Release Contributors
 Individuals (in alphabetical order)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-Maoguang Wang, Vidhan Jain, Virginia Vergara
+Anthony Tasca, Virginia Vergara
 
 And all the people that give us a little of their time making comments, finding issues, making pull requests etc.
 
@@ -63,6 +63,7 @@ These are corporate entities that have contributed developer time, hosting, or d
 - `Google Summer of Code <https://developers.google.com/open-source/gsoc/>`_
 - `iMaptools <http://imaptools.com>`__
 - `Paragon Corporation <http://www.paragoncorporation.com/>`_
+- `Versaterm Inc. <http://www.versaterm.com/>`__
 
 Contributors Past & Present:
 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -70,7 +71,7 @@ Contributors Past & Present:
 Individuals (in alphabetical order)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-Akio Takubo, Andrea Nardelli, Anton Patrushev, Ashraf Hossain, Christian Gonzalez, Daniel Kastl, Dave Potts, David Techer, Denis Rykov, Ema Miyawaki, Florian Thurkow, Frederic Junod, Gerald Fenoy, Jay Mahadeokar, Jinfu Leng, Kai Behncke, Kishore Kumar, Ko Nagase, Manikata Kondeti, Mario Basa, Martin Wiesenhaan,  Maxim Dubinin, Maoguang Wang, Mohamed Zia, Mukul Priya, Razequl Islam, Regina Obe, Rohith Reddy, Sarthak Agarwal, Stephen Woodbridge, Sylvain Housseman, Sylvain Pasche, Vidhan Ja [...]
+Akio Takubo, Andrea Nardelli, Anthony Tasca, Anton Patrushev, Ashraf Hossain, Christian Gonzalez, Daniel Kastl, Dave Potts, David Techer, Denis Rykov, Ema Miyawaki, Florian Thurkow, Frederic Junod, Gerald Fenoy, Jay Mahadeokar, Jinfu Leng, Kai Behncke, Kishore Kumar, Ko Nagase, Manikata Kondeti, Mario Basa, Martin Wiesenhaan,  Maxim Dubinin, Maoguang Wang, Mohamed Zia, Mukul Priya, Razequl Islam, Regina Obe, Rohith Reddy, Sarthak Agarwal, Stephen Woodbridge, Sylvain Housseman, Sylvain Pa [...]
 
 Corporate Sponsors (in alphabetical order)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -84,6 +85,7 @@ These are corporate entities that have contributed developer time, hosting, or d
 - iMaptools
 - Orkney
 - Paragon Corporation
+- Versaterm Inc.
 
 
 More Information
diff --git a/doc/src/proposed.rst b/doc/src/proposed.rst
index 8d1ee4b..d6e52ec 100644
--- a/doc/src/proposed.rst
+++ b/doc/src/proposed.rst
@@ -162,14 +162,20 @@ Experimental Functions
   pgr_gsoc_vrppdtw
   pgr_vrpOneDepot
 
-.. rubric:: Graph Transformation
+.. rubric:: Graph Operations
 
-:doc:`pgr_lineGraph`
+:ref:`transformation` - Maps a given graph to a new form
+
+.. include:: transformation-family.rst
+   :start-after: index from here
+   :end-before: index to here
 
 .. toctree::
   :hidden:
 
   pgr_lineGraph
+  pgr_lineGraphFull
+  transformation-family
 
 See Also
 -------------------------------------------------------------------------------
diff --git a/doc/src/release_notes.rst b/doc/src/release_notes.rst
index 24bc012..d6061c6 100644
--- a/doc/src/release_notes.rst
+++ b/doc/src/release_notes.rst
@@ -18,6 +18,7 @@ To see the full list of changes check the list of `Git commits <https://github.c
 
 .. changelog start
 
+* :ref:`changelog_2_6_0`
 * :ref:`changelog_2_5_3`
 * :ref:`changelog_2_5_2`
 * :ref:`changelog_2_5_1`
@@ -40,6 +41,41 @@ To see the full list of changes check the list of `Git commits <https://github.c
 
 .. changelog end
 
+.. _changelog_2_6_0:
+
+pgRouting 2.6.0 Release Notes
+-------------------------------------------------------------------------------
+
+To see the issues closed by this release see the `Git closed milestone for 2.6.0 <https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%202.6.0%22%20>`_ on Github.
+
+
+.. rubric:: New fexperimental functions
+
+*  pgr_lineGraphFull
+
+.. rubric:: Bug fixes
+
+* Fix pgr_trsp(text,integer,double precision,integer,double precision,boolean,boolean[,text])
+
+  * without restrictions
+
+    * calls pgr_dijkstra when both end points have a fraction IN (0,1)
+    * calls pgr_withPoints when at least one fraction NOT IN (0,1)
+
+  * with restrictions
+
+    * calls original trsp code
+
+.. rubric:: Internal code
+
+* Cleaned the internal code of trsp(text,integer,integer,boolean,boolean [, text])
+
+  * Removed the use of pointers
+  * Internal code can accept BIGINT
+
+* Cleaned the internal code of withPoints
+
+
 .. _changelog_2_5_3:
 
 pgRouting 2.5.3 Release Notes
@@ -118,6 +154,7 @@ To see the issues closed by this release see the `Git closed issues for 2.5.0 <h
 * pgr_bdDijkstraCost(many to many)
 * pgr_bdDijkstraCostMatrix
 * pgr_lineGraph
+* pgr_lineGraphFull
 * pgr_connectedComponents
 * pgr_strongComponents
 * pgr_biconnectedComponents
diff --git a/doc/topology/pgr_analyzeGraph.rst b/doc/topology/pgr_analyzeGraph.rst
index d882b9c..84a1ae9 100644
--- a/doc/topology/pgr_analyzeGraph.rst
+++ b/doc/topology/pgr_analyzeGraph.rst
@@ -120,7 +120,7 @@ We get the same result as the simplest way to use the function.
     NOTICE:  Performing checks, please wait ...
     NOTICE:  Got function st_srid(bigint) does not exist
     NOTICE:  ERROR: something went wrong when checking for SRID of id in table public.edge_table
-    pgr_analyzegraph 
+    pgr_analyzegraph
     ------------------
       FAIL
     (1 row)
@@ -197,7 +197,7 @@ The arguments need to be given in the order described in the parameters:
     NOTICE:  Performing checks, please wait ...
     NOTICE:  Got function st_srid(bigint) does not exist
     NOTICE:  ERROR: something went wrong when checking for SRID of gid in table public.mytable
-    pgr_analyzegraph 
+    pgr_analyzegraph
     ------------------
       FAIL
     (1 row)
diff --git a/doc/topology/pgr_createVerticesTable.rst b/doc/topology/pgr_createVerticesTable.rst
index e5202f7..0d22794 100644
--- a/doc/topology/pgr_createVerticesTable.rst
+++ b/doc/topology/pgr_createVerticesTable.rst
@@ -118,7 +118,7 @@ We get the same result as the simplest way to use the function.
        NOTICE:  ----> PGR ERROR in pgr_createVerticesTable: Wrong type of Column source: the_geom
        HINT:    ----> Expected type of the_geom is integer,smallint or bigint but USER-DEFINED was found
        NOTICE:  Unexpected error raise_exception
-       pgr_createverticestable 
+       pgr_createverticestable
        -------------------------
          FAIL
       (1 row)
@@ -195,7 +195,7 @@ The arguments need to be given in the order described in the parameters:
         NOTICE:  ----> PGR ERROR in pgr_createVerticesTable: Table mytable not found
         HINT:    ----> Check your table name
         NOTICE:  Unexpected error raise_exception
-        pgr_createverticestable 
+        pgr_createverticestable
         -------------------------
           FAIL
         (1 row)
diff --git a/doc/trsp/README.md b/doc/trsp/README.md
index 3f6e052..87a7d68 100644
--- a/doc/trsp/README.md
+++ b/doc/trsp/README.md
@@ -4,7 +4,7 @@ SET client_min_messages TO NOTICE;
 SET
 ROLLBACK;
 ROLLBACK
-# Notes on pgr_trsp for version 2.5.0
+# Notes on pgr_trsp for version 2.6.0
 Table of contents
 * [Introduction](#introduction)
   * [The restriction](#the-restriction)
@@ -47,7 +47,21 @@ The restriction used in the examples does not have to do anything with the graph
 * No vertex has id: 25, 32 or 33
 * No edge has id: 25, 32 or 33
 ```
-$$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, 32, 33::TEXT AS via_path$$
+SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path;
+ to_cost | target_id | via_path
+---------+-----------+----------
+     100 |        25 | 32, 33
+(1 row)
+
+```
+The new back end code has the restrictions as follows
+```
+SELECT 1 AS id, 100::float AS cost, 25::INTEGER AS target_id, ARRAY[33, 32, 25] AS path;
+ id | cost | target_id |    path
+----+------+-----------+------------
+  1 |  100 |        25 | {33,32,25}
+(1 row)
+
 ```
 therefore the shortest path expected are as if there was no restriction involved
 # The Vertices signature version
@@ -63,7 +77,10 @@ SELECT * FROM _pgr_trsp(
     $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
     1, 15, true, true
 );
-ERROR:  Error computing path: Path Not Found
+ERROR:  function _pgr_trsp(unknown, integer, integer, boolean, boolean) does not exist
+LINE 1: SELECT * FROM _pgr_trsp(
+                      ^
+HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
 ```
 dijkstra returns EMPTY SET to represent no path found
 ```
@@ -71,7 +88,7 @@ SELECT * FROM pgr_dijkstra(
     $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
     1, 15
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
 (0 rows)
 
@@ -83,7 +100,7 @@ SELECT * FROM pgr_TRSP(
     $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
     1, 15, true, true
 );
- seq | id1 | id2 | cost 
+ seq | id1 | id2 | cost
 -----+-----+-----+------
 (0 rows)
 
@@ -97,7 +114,6 @@ SELECT * FROM pgr_trsp(
      $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
 );
 ERROR:  Error computing path: Path Not Found
-CONTEXT:  PL/pgSQL function pgr_trsp(text,integer,integer,boolean,boolean,text) line 29 at RETURN QUERY
 ```
 ## routing from/to same location
 using dijkstra to verify (1 to 1)
@@ -106,7 +122,7 @@ SELECT * FROM pgr_dijkstra(
     $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
     1, 1
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
 (0 rows)
 
@@ -118,7 +134,7 @@ SELECT * FROM pgr_TRSP(
     $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
     1, 1,  true, true
 );
- seq | id1 | id2 | cost 
+ seq | id1 | id2 | cost
 -----+-----+-----+------
 (0 rows)
 
@@ -131,31 +147,22 @@ SELECT * FROM _pgr_trsp(
     $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
     1, 1,  true, true
 );
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |   1 |   1 |    1
-   1 |   2 |   4 |    1
-   2 |   5 |   8 |    1
-   3 |   6 |   9 |    1
-   4 |   9 |  16 |    1
-   5 |   4 |   3 |    1
-   6 |   3 |   2 |    1
-   7 |   2 |   1 |    1
-   8 |   1 |  -1 |    0
-(9 rows)
-
+ERROR:  function _pgr_trsp(unknown, integer, integer, boolean, boolean) does not exist
+LINE 1: SELECT * FROM _pgr_trsp(
+                      ^
+HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
 ```
 trsp with restrictions (1 to 1) use the original code
 is expected to return Error to represent no path found
 ```
 SELECT * FROM pgr_trsp(
     $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    1, 1,  
-    true, 
+    1, 1,
+    true,
     true,
     $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
 );
- seq | id1 | id2 | cost 
+ seq | id1 | id2 | cost
 -----+-----+-----+------
    0 |   1 |   1 |    1
    1 |   2 |   4 |    1
@@ -175,22 +182,21 @@ but "finds" a path when there should be no path.
 ```
 SELECT * FROM _pgr_trsp(
     $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    1, 1,  
-    true, 
-    true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+    $$SELECT 1 AS id, 100::float AS cost, 25::INTEGER AS target_id, ARRAY[33, 32, 25] AS path$$,
+    1, 1,
+    true
 );
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |   1 |   1 |    1
-   1 |   2 |   4 |    1
-   2 |   5 |   8 |    1
-   3 |   6 |   9 |    1
-   4 |   9 |  16 |    1
-   5 |   4 |   3 |    1
-   6 |   3 |   2 |    1
-   7 |   2 |   1 |    1
-   8 |   1 |  -1 |    0
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    1 |    1 |    1 |        0
+   2 |        2 |    2 |    4 |    1 |        1
+   3 |        3 |    5 |    8 |    1 |        2
+   4 |        4 |    6 |    9 |    1 |        3
+   5 |        5 |    9 |   16 |    1 |        4
+   6 |        6 |    4 |    3 |    1 |        5
+   7 |        7 |    3 |    2 |    1 |        6
+   8 |        8 |    2 |    1 |    1 |        7
+   9 |        9 |    1 |   -1 |    0 |        8
 (9 rows)
 
 ```
@@ -201,7 +207,7 @@ SELECT * FROM pgr_dijkstra(
     $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
     2, 3, false
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    2 |    2 |    1 |        0
    2 |        2 |    3 |   -1 |    0 |        1
@@ -213,10 +219,10 @@ using the replacement function because there are no restrictions (2 to 3)
 SELECT * FROM pgr_TRSP(
     $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
     2, 3,
-    false, 
+    false,
     true
 );
- seq | id1 | id2 | cost 
+ seq | id1 | id2 | cost
 -----+-----+-----+------
    0 |   2 |   2 |    1
    1 |   3 |  -1 |    0
@@ -232,16 +238,10 @@ SELECT * FROM _pgr_trsp(
     2, 3,
     false, true
 );
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |   2 |   4 |    1
-   1 |   5 |   8 |    1
-   2 |   6 |   9 |    1
-   3 |   9 |  16 |    1
-   4 |   4 |   3 |    1
-   5 |   3 |  -1 |    0
-(6 rows)
-
+ERROR:  function _pgr_trsp(unknown, integer, integer, boolean, boolean) does not exist
+LINE 1: SELECT * FROM _pgr_trsp(
+                      ^
+HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
 ```
 trsp with restrictions (2 to 3)
 does not find the shortest path
@@ -252,15 +252,11 @@ SELECT * FROM pgr_trsp(
     false, true,
     $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
 );
- seq | id1 | id2 | cost 
+ seq | id1 | id2 | cost
 -----+-----+-----+------
-   0 |   2 |   4 |    1
-   1 |   5 |   8 |    1
-   2 |   6 |   9 |    1
-   3 |   9 |  16 |    1
-   4 |   4 |   3 |    1
-   5 |   3 |  -1 |    0
-(6 rows)
+   0 |   2 |   2 |    1
+   1 |   3 |  -1 |    0
+(2 rows)
 
 ```
 calling the original code with restrictions (2 to 3)
@@ -268,20 +264,15 @@ does not find the shortest path
 ```
 SELECT * FROM _pgr_trsp(
     $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    $$SELECT 1 AS id, 100::float AS cost, 25::INTEGER AS target_id, ARRAY[33, 32, 25] AS path$$,
     2, 3,
-    false, 
-    true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+    false
 );
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |   2 |   4 |    1
-   1 |   5 |   8 |    1
-   2 |   6 |   9 |    1
-   3 |   9 |  16 |    1
-   4 |   4 |   3 |    1
-   5 |   3 |  -1 |    0
-(6 rows)
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    2 |    2 |    1 |        0
+   2 |        2 |    3 |   -1 |    0 |        1
+(2 rows)
 
 ```
 # The Edges signature version
@@ -308,7 +299,7 @@ SELECT * FROM pgr_withPoints(
     (SELECT 2, 17, 0.5)$$,
     -1, -2
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
 (0 rows)
 
@@ -327,7 +318,7 @@ SELECT * FROM _pgr_trsp(
     $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
     1, 0.5, 1, 0.5, true, true
 );
- seq | id1 | id2 | cost 
+ seq | id1 | id2 | cost
 -----+-----+-----+------
    0 |  -1 |   1 |    0
 (1 row)
@@ -340,7 +331,7 @@ SELECT * FROM _pgr_trsp(
     1, 0.5, 1, 0.5, true, true,
     $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
 );
- seq | id1 | id2 | cost 
+ seq | id1 | id2 | cost
 -----+-----+-----+------
    0 |  -1 |   1 |    0
 (1 row)
@@ -355,7 +346,7 @@ SELECT * FROM pgr_withPoints(
     (SELECT 2, 1, 0.5)$$,
     -1, -2
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |   -1 |    1 |    0 |        0
    2 |        2 |   -2 |   -1 |    0 |        0
@@ -368,7 +359,7 @@ SELECT * FROM pgr_TRSP(
     $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
     1, 0.5, 1, 0.5, true, true
 );
- seq | id1 | id2 | cost 
+ seq | id1 | id2 | cost
 -----+-----+-----+------
    0 |  -1 |   1 |    0
    1 |  -2 |  -1 |    0
@@ -382,7 +373,7 @@ SELECT * FROM pgr_trsp(
     1, 0.5, 1, 0.5, true, true,
     $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
 );
- seq | id1 | id2 | cost 
+ seq | id1 | id2 | cost
 -----+-----+-----+------
    0 |  -1 |   1 |    0
 (1 row)
@@ -397,7 +388,7 @@ SELECT * FROM pgr_withPoints(
     (SELECT 2, 1, 0.5)$$,
     -1, -1
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
 (0 rows)
 
@@ -410,7 +401,7 @@ SELECT * FROM pgr_TRSP(
     $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
     1, 0.5, 1, 0.8, true, true
 );
- seq | id1 | id2 | cost 
+ seq | id1 | id2 | cost
 -----+-----+-----+------
    0 |  -1 |   1 |  0.3
    1 |  -2 |  -1 |    0
@@ -425,7 +416,7 @@ SELECT * FROM pgr_trsp(
     1, 0.5, 1, 0.8, true, true,
     $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
 );
- seq | id1 | id2 | cost 
+ seq | id1 | id2 | cost
 -----+-----+-----+------
    0 |  -1 |   1 |  0.3
 (1 row)
@@ -441,7 +432,7 @@ SELECT * FROM pgr_withPoints(
     (SELECT 2, 2, 0.8)$$,
     -1, -2, directed:=false
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |   -1 |    4 |  0.5 |        0
    2 |        2 |    2 |    2 |  0.8 |      0.5
@@ -456,7 +447,7 @@ SELECT * FROM pgr_TRSP(
     $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
     4, 0.5, 2, 0.8, false, true
 );
- seq | id1 | id2 | cost 
+ seq | id1 | id2 | cost
 -----+-----+-----+------
    0 |  -1 |   4 |  0.5
    1 |   2 |   2 |  0.8
@@ -474,7 +465,7 @@ SELECT * FROM pgr_trsp(
     4, 0.5, 2, 0.8, false, true,
     $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
 );
- seq | id1 | id2 | cost 
+ seq | id1 | id2 | cost
 -----+-----+-----+------
    0 |  -1 |   4 |  0.5
    1 |   5 |   8 |    1
@@ -489,7 +480,7 @@ SELECT * FROM pgr_trsp(
 The points of interest
 ```
 SELECT * FROM pointsOfInterest;
- pid |  x  |  y  | edge_id | side | fraction |                  the_geom                  |                  newpoint                  
+ pid |  x  |  y  | edge_id | side | fraction |                  the_geom                  |                  newpoint
 -----+-----+-----+---------+------+----------+--------------------------------------------+--------------------------------------------
    1 | 1.8 | 0.4 |       1 | l    |      0.4 | 0101000000CDCCCCCCCCCCFC3F9A9999999999D93F | 010100000000000000000000409A9999999999D93F
    2 | 4.2 | 2.4 |      15 | r    |      0.4 | 0101000000CDCCCCCCCCCC10403333333333330340 | 010100000000000000000010403333333333330340
@@ -514,7 +505,7 @@ SELECT * FROM pgr_TRSP(
     (SELECT fraction  FROM pointsOfInterest WHERE pid = 6),
     true, true
 );
- seq | id1 | id2 | cost 
+ seq | id1 | id2 | cost
 -----+-----+-----+------
    0 |  -1 |   1 |  0.6
    1 |   2 |   4 |  0.7
@@ -533,7 +524,7 @@ SELECT * FROM pgr_withPoints(
     $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
     -1, -6
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |   -1 |    1 |  0.6 |        0
    2 |        2 |    2 |    4 |  0.7 |      0.6
@@ -550,7 +541,7 @@ SELECT * FROM pgr_withPoints(
     $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
     -1, -1
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
 (0 rows)
 
@@ -568,7 +559,7 @@ SELECT * FROM pgr_TRSP(
     (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
     true, true
 );
- seq | id1 | id2 | cost 
+ seq | id1 | id2 | cost
 -----+-----+-----+------
    0 |  -1 |   1 |    0
    1 |  -2 |  -1 |    0
@@ -588,7 +579,7 @@ SELECT * FROM pgr_trsp(
     true, true,
     $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
 );
- seq | id1 | id2 | cost 
+ seq | id1 | id2 | cost
 -----+-----+-----+------
    0 |  -1 |   1 |    0
 (1 row)
@@ -602,7 +593,7 @@ SELECT * FROM pgr_withPoints(
     $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
     -1, -3
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |   -1 |    1 |  0.6 |        0
    2 |        2 |    2 |    4 |    1 |      0.6
@@ -620,7 +611,7 @@ SELECT * FROM pgr_withPoints(
     $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
     -1, -3, details:=true
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |   -1 |    1 |  0.6 |        0
    2 |        2 |    2 |    4 |  0.7 |      0.6
@@ -642,7 +633,7 @@ SELECT * FROM pgr_TRSP(
     (SELECT fraction  FROM pointsOfInterest WHERE pid = 3),
     true, true
 );
- seq | id1 | id2 | cost 
+ seq | id1 | id2 | cost
 -----+-----+-----+------
    0 |  -1 |   1 |  0.6
    1 |   2 |   4 |    1
@@ -660,7 +651,7 @@ SELECT * FROM pgr_withPoints(
     $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
     6, -1
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    6 |    8 |    1 |        0
    2 |        2 |    5 |    4 |    1 |        1
@@ -681,9 +672,13 @@ SELECT * FROM pgr_trsp(
     (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
     true, true
 );
- seq | id1 | id2 | cost 
+ seq | id1 | id2 | cost
 -----+-----+-----+------
-(0 rows)
+   0 |  -1 |   8 |    1
+   1 |   5 |   4 |    1
+   2 |   2 |   1 |  0.6
+   3 |  -2 |  -1 |    0
+(4 rows)
 
 SELECT * FROM pgr_trsp(
     $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
@@ -692,17 +687,27 @@ SELECT * FROM pgr_trsp(
     (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
     true, true
 );
- seq | id1 | id2 | cost 
+ seq | id1 | id2 | cost
 -----+-----+-----+------
-(0 rows)
+   0 |   6 |   8 |    1
+   1 |   5 |   4 |    1
+   2 |   2 |   1 |  0.6
+   3 |  -2 |  -1 |    0
+(4 rows)
 
 ```
 # pgr_trspViaVertices
 ## pgr_trspViaVertices No path representation differences
-pgr_trspViaVertices uses _pgr_trsp which as mentioned before
-* Sometimes it crasses the server when no path was found
-* Sometimes represents with Error a no path found
-* Forcing the user to use the wrapper or the replacement function
+pgr_trspViaVertices uses:
+"* When there are restrictions: `_pgr_trsp(one to one)`"
+"* When there are no restrictions: `pgr_dijkstraVia`"
+
+**PLEASE: Use pgr_dijstraVia when there are no restrictions**
+
+Representation of **no path found**:
+"* Sometimes represents with Error a no path found"
+"* Sometimes represents with EMPTY SET when no path found"
+"* Forcing the user to use the wrapper or the replacement function"
 
 Calls to the original function of is no longer allowed without restrictions
 ```
@@ -711,95 +716,59 @@ SELECT * FROM _pgr_trspViaVertices(
     ARRAY[1, 15, 2],
     false, true
 );
-ERROR:  Error computing path: Path Not Found
-CONTEXT:  PL/pgSQL function _pgr_trspviavertices(text,integer[],boolean,boolean,text) line 23 at FOR over SELECT rows
-SELECT * FROM _pgr_trspViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 15, 2, 1],
-    false, true
-);
-ERROR:  Error computing path: Path Not Found
-CONTEXT:  PL/pgSQL function _pgr_trspviavertices(text,integer[],boolean,boolean,text) line 23 at FOR over SELECT rows
+ERROR:  Restrictions Missing
 ```
-**pgr_dijkstraVia** returning what paths of the route it finds or EMPTY SET when non is found
-this case none is found
+Calls to the wrapper function allowed without restrictions
 ```
-SELECT * FROM pgr_dijkstraVia(
+SELECT * FROM pgr_trspViaVertices(
     $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 15, 2],
-    false
+    ARRAY[2, 3, 2],
+    false, true
 );
- seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost 
------+---------+----------+-----------+---------+------+------+------+----------+----------------
-(0 rows)
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |   1 |   2 |   2 |    1
+   2 |   2 |   3 |   2 |    1
+   3 |   2 |   2 |  -1 |    0
+(3 rows)
 
 ```
-this case only from 2 to 1 is found
+But it uses pgr_dijkstraVia that gives more information on the result
 ```
 SELECT * FROM pgr_dijkstraVia(
     $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 15, 2, 1],
+    ARRAY[2, 3, 2],
     false
 );
- seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost 
+ seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost
 -----+---------+----------+-----------+---------+------+------+------+----------+----------------
-   1 |       3 |        1 |         2 |       1 |    2 |    1 |    1 |        0 |              0
-   2 |       3 |        2 |         2 |       1 |    1 |   -2 |    0 |        1 |              1
-(2 rows)
-
-```
-the **pgr_dijkstraVia** used are for complete routes so its marked as **strict:=true**
-therefore the expected result is EMPTY SET to represent no route was found
-```
-SELECT * FROM pgr_dijkstraVia(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 1, 2],
-    false,
-    strict := true
-);
- seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost 
------+---------+----------+-----------+---------+------+------+------+----------+----------------
-(0 rows)
+   1 |       1 |        1 |         2 |       3 |    2 |    2 |    1 |        0 |              0
+   2 |       1 |        2 |         2 |       3 |    3 |   -1 |    0 |        1 |              1
+   3 |       2 |        1 |         3 |       2 |    3 |    2 |    1 |        0 |              1
+   4 |       2 |        2 |         3 |       2 |    2 |   -2 |    0 |        1 |              2
+(4 rows)
 
 ```
 ## when a path does not exist on the route
-pgr_TRSPViaVertices using the *pgr_dijkstraVia* when there are no restrictions.
+pgr_TRSPViaVertices gives different results even if restrictions are nt involved on the
+shortest path(s) when restrictions are used VS when restrictions are not used:
+
 Because there is no path from 1 to 1 then there is no complete route 1 to 1 to 2
 therefore the expected result is EMPTY SET to represent no route was found
+"* without restrictions"
 ```
 SELECT * FROM pgr_TRSPViaVertices(
     $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
     ARRAY[1, 1, 2],
     false, true
 );
- seq | id1 | id2 | id3 | cost 
+ seq | id1 | id2 | id3 | cost
 -----+-----+-----+-----+------
 (0 rows)
 
 ```
-Calls to the original function of is no longer allowed without restrictions
-```
-SELECT * FROM _pgr_trspViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 1, 2],
-    false, true
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |   1 |   1 |    1
-   2 |   1 |   2 |   4 |    1
-   3 |   1 |   5 |   8 |    1
-   4 |   1 |   6 |   9 |    1
-   5 |   1 |   9 |  16 |    1
-   6 |   1 |   4 |   3 |    1
-   7 |   1 |   3 |   2 |    1
-   8 |   1 |   2 |   1 |    1
-   9 |   2 |   1 |   1 |    1
-  10 |   2 |   2 |  -1 |    0
-(10 rows)
-
-```
-with restrictions the original code is used
+"* with restrictions"
+Restrictions on the wrapper function, is the last parameter and its the old style:
 ```
 SELECT * FROM pgr_trspViaVertices(
     $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
@@ -807,95 +776,17 @@ SELECT * FROM pgr_trspViaVertices(
     false, true,
     $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
 );
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |   1 |   1 |    1
-   2 |   1 |   2 |   4 |    1
-   3 |   1 |   5 |   8 |    1
-   4 |   1 |   6 |   9 |    1
-   5 |   1 |   9 |  16 |    1
-   6 |   1 |   4 |   3 |    1
-   7 |   1 |   3 |   2 |    1
-   8 |   1 |   2 |   1 |    1
-   9 |   2 |   1 |   1 |    1
-  10 |   2 |   2 |  -1 |    0
-(10 rows)
-
-```
-Using explicitly the original code
-```
-SELECT * FROM _pgr_trspViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 1, 2],
-    false, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
- seq | id1 | id2 | id3 | cost 
+ seq | id1 | id2 | id3 | cost
 -----+-----+-----+-----+------
    1 |   1 |   1 |   1 |    1
    2 |   1 |   2 |   4 |    1
    3 |   1 |   5 |   8 |    1
-   4 |   1 |   6 |   9 |    1
-   5 |   1 |   9 |  16 |    1
-   6 |   1 |   4 |   3 |    1
-   7 |   1 |   3 |   2 |    1
-   8 |   1 |   2 |   1 |    1
-   9 |   2 |   1 |   1 |    1
-  10 |   2 |   2 |  -1 |    0
-(10 rows)
-
-```
-## from 2 to 3 to 2
-dijkstra via shows the shortest route on the two paths
-```
-SELECT * FROM pgr_dijkstraVia(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[2, 3, 2],
-    false 
-);
- seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost 
------+---------+----------+-----------+---------+------+------+------+----------+----------------
-   1 |       1 |        1 |         2 |       3 |    2 |    2 |    1 |        0 |              0
-   2 |       1 |        2 |         2 |       3 |    3 |   -1 |    0 |        1 |              1
-   3 |       2 |        1 |         3 |       2 |    3 |    2 |    1 |        0 |              1
-   4 |       2 |        2 |         3 |       2 |    2 |   -2 |    0 |        1 |              2
-(4 rows)
-
-```
-the replacement function **pgr_dijkstraVia** is used because there are no restrictions
-```
-SELECT * FROM pgr_TRSPViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[2, 3, 2],
-    false, 
-    true
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |   2 |   2 |    1
-   2 |   2 |   3 |   2 |    1
-   3 |   2 |   2 |  -1 |    0
-(3 rows)
-
-```
-Calls to the original function of is no longer allowed without restrictions
-```
-SELECT * FROM _pgr_trspViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[2, 3, 2],
-    false, 
-    true
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |   2 |   4 |    1
-   2 |   1 |   5 |   8 |    1
-   3 |   1 |   6 |   9 |    1
-   4 |   1 |   9 |  16 |    1
-   5 |   1 |   4 |   3 |    1
-   6 |   2 |   3 |   2 |    1
-   7 |   2 |   2 |  -1 |    0
-(7 rows)
+   4 |   1 |   6 |   5 |    1
+   5 |   1 |   3 |   2 |    1
+   6 |   1 |   2 |   1 |    1
+   7 |   2 |   1 |   1 |    1
+   8 |   2 |   2 |  -1 |    0
+(8 rows)
 
 ```
 # pgr_trspViaEdges
@@ -916,7 +807,7 @@ SELECT * FROM pgr_trspViaEdges(
     false, true,
     $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
 );
- seq | id1 | id2 | id3 | cost 
+ seq | id1 | id2 | id3 | cost
 -----+-----+-----+-----+------
    1 |   1 |  -1 |   1 |  0.9
    2 |   1 |   2 |   4 |    1
@@ -953,7 +844,7 @@ SELECT * FROM _pgr_withPointsVia(
     ARRAY[1, 2, 1], ARRAY[0.1,0.5,0.5],
     directed := false
 );
- seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost 
+ seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost
 -----+---------+----------+-----------+---------+------+------+------+----------+----------------
    1 |       1 |        1 |        -1 |      -2 |   -1 |    1 |  0.1 |        0 |              0
    2 |       1 |        2 |        -1 |      -2 |    2 |    2 |  0.5 |      0.1 |            0.1
@@ -975,9 +866,9 @@ SELECT * FROM pgr_trspViaEdges(
     ARRAY[1, 17, 1], ARRAY[0,0.5,0.5],
     false, true
 );
- seq | id1 | id2 | id3 | cost 
+ seq | id1 | id2 | id3 | cost
 -----+-----+-----+-----+------
-   1 |     |     |     |     
+   1 |     |     |     |
 (1 row)
 
 ```
@@ -1006,10 +897,10 @@ This example no path is found (edge 17 is disconnected) from the big graph.
 SELECT * FROM pgr_trspViaEdges(
     $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
     ARRAY[1, 17, 1], ARRAY[0.1,0.5,0.5],
-    false, 
+    false,
     true
 );
- seq | id1 | id2 | id3 | cost 
+ seq | id1 | id2 | id3 | cost
 -----+-----+-----+-----+------
 (0 rows)
 
@@ -1030,10 +921,10 @@ SELECT * FROM pgr_trspViaEdges(
         (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
         (SELECT fraction  FROM pointsOfInterest WHERE pid = 3),
         (SELECT fraction  FROM pointsOfInterest WHERE pid = 6)],
-    false, 
+    false,
     true
 );
- seq | id1 | id2 | id3 | cost 
+ seq | id1 | id2 | id3 | cost
 -----+-----+-----+-----+------
    1 |   1 |  -1 |   1 |  0.4
    2 |   1 |   2 |   4 |  0.3
@@ -1065,7 +956,7 @@ SELECT * FROM pgr_trspViaEdges(
     false, true,
     $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
 );
- seq | id1 | id2 | id3 | cost 
+ seq | id1 | id2 | id3 | cost
 -----+-----+-----+-----+------
    1 |   1 |  -1 |   1 |  0.6
    2 |   1 |   2 |   4 |    1
@@ -1093,17 +984,19 @@ SELECT * FROM pgr_trspViaEdges(
         (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
         (SELECT fraction  FROM pointsOfInterest WHERE pid = 3),
         0],
-    false, 
+    false,
     true
 );
- seq | id1 | id2 | id3 | cost 
+ seq | id1 | id2 | id3 | cost
 -----+-----+-----+-----+------
    1 |   1 |  -1 |   1 |  0.6
    2 |   1 |   2 |   4 |    1
    3 |   1 |   5 |  10 |    1
    4 |   1 |  10 |  12 |  0.6
-   5 |   1 |  -2 |  -1 |    0
-(5 rows)
+   5 |   2 |  -1 |  12 |  0.4
+   6 |   2 |  11 |  11 |    1
+   7 |   2 |   6 |  -1 |    0
+(7 rows)
 
 ```
 BEGIN;
diff --git a/doxygen/Doxyfile.in b/doxygen/Doxyfile.in
index 7ad601d..6ada17e 100644
--- a/doxygen/Doxyfile.in
+++ b/doxygen/Doxyfile.in
@@ -584,7 +584,7 @@ SORT_BY_SCOPE_NAME     = YES
 # accept a match between prototype and implementation in such cases.
 # The default value is: NO.
 
-STRICT_PROTO_MATCHING  = YES 
+STRICT_PROTO_MATCHING  = YES
 
 # The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the
 # todo list. This list is created by putting \todo commands in the
@@ -774,7 +774,7 @@ INPUT_ENCODING         = UTF-8
 # *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
 # *.qsf, *.as and *.js.
 
-FILE_PATTERNS          = 
+FILE_PATTERNS          =
 
 # The RECURSIVE tag can be used to specify whether or not subdirectories should
 # be searched for input files as well.
@@ -790,7 +790,7 @@ RECURSIVE              = YES
 # run.
 
 EXCLUDE                =
-# ../../tools ../../doc ../../build ../../cmake ../../.tx 
+# ../../tools ../../doc ../../build ../../cmake ../../.tx
 
 # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
 # directories that are symbolic links (a Unix file system feature) are excluded
@@ -806,7 +806,7 @@ EXCLUDE_SYMLINKS       = NO
 # Note that the wildcards are matched against the file with absolute path, so to
 # exclude all test directories for example use the pattern */test/*
 
-EXCLUDE_PATTERNS       = */notUsed/* */test/* */src/trsp/doc/README.md 
+EXCLUDE_PATTERNS       = */notUsed/* */test/* */src/trsp/doc/README.md
 
 # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
 # (namespaces, classes, functions, etc.) that should be excluded from the
@@ -845,7 +845,7 @@ EXAMPLE_RECURSIVE      = NO
 
 IMAGE_PATH             = @CMAKE_CURRENT_SOURCE_DIR@/../doc/_static/images/developers \
                          @CMAKE_CURRENT_SOURCE_DIR@/../doc/contraction/images
-                        
+
 
 # The INPUT_FILTER tag can be used to specify a program that doxygen should
 # invoke to filter for each input file. Doxygen will invoke the filter program
@@ -1945,7 +1945,7 @@ INCLUDE_FILE_PATTERNS  =
 # recursively expanded use the := operator instead of the = operator.
 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
 
-PREDEFINED             = 
+PREDEFINED             =
 
 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
 # tag can be used to specify a list of macro names that should be expanded. The
@@ -2240,7 +2240,7 @@ DOT_PATH               =
 # command).
 # This tag requires that the tag HAVE_DOT is set to YES.
 
-DOTFILE_DIRS           = 
+DOTFILE_DIRS           =
 
 # The MSCFILE_DIRS tag can be used to specify one or more directories that
 # contain msc files that are included in the documentation (see the \mscfile
diff --git a/doxygen/DoxygenLayout.xml b/doxygen/DoxygenLayout.xml
index b7c9586..e727c10 100644
--- a/doxygen/DoxygenLayout.xml
+++ b/doxygen/DoxygenLayout.xml
@@ -11,7 +11,7 @@
     </tab>
     <tab type="classes" visible="yes" title="">
       <tab type="classlist" visible="yes" title="" intro=""/>
-      <tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/> 
+      <tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
       <tab type="hierarchy" visible="yes" title="" intro=""/>
       <tab type="classmembers" visible="yes" title="" intro=""/>
     </tab>
@@ -19,7 +19,7 @@
       <tab type="filelist" visible="yes" title="" intro=""/>
       <tab type="globals" visible="yes" title="" intro=""/>
     </tab>
-    <tab type="examples" visible="yes" title="" intro=""/>  
+    <tab type="examples" visible="yes" title="" intro=""/>
   </navindex>
 
   <!-- Layout definition for a class page -->
diff --git a/doxygen/contraction.dox b/doxygen/contraction.dox
index 3ae0672..55ca377 100644
--- a/doxygen/contraction.dox
+++ b/doxygen/contraction.dox
@@ -159,7 +159,7 @@ Visually the graph is
 @image html  twoNodesoneEdge_a.png
 
 @dot
-digraph G { 
+digraph G {
     1 -> 2 [label="id = 1"];
     2 [color = lightblue,style=filled];
 }
diff --git a/doxygen/mainpage.dox b/doxygen/mainpage.dox
index da1324e..b09a526 100644
--- a/doxygen/mainpage.dox
+++ b/doxygen/mainpage.dox
@@ -1,7 +1,7 @@
 /*! \mainpage Developer's Documentation
- 
+
 @section intro_sec Introduction
- 
+
 This documentation is focused on the developer of [pgRouting](http://pgrouting.org).
 
 A developer might want to:
@@ -12,7 +12,7 @@ A developer might want to:
   - Add tests
     - regression
     - benchmark
- 
+
 The following steps are based on:
   - [My Experience with GitHub](https://github.com/pgRouting/pgrouting/wiki/My-Experience-with-GitHub)
 wirtten by Mohamed Zia
@@ -31,7 +31,7 @@ Step by Step processing
    - Additional information can be found in [fork-a-repo](https://help.github.com/articles/fork-a-repo)
 
 2. Now create a local clone of your above created fork
-   - [set up Git](https://help.github.com/articles/set-up-git) in your computer. 
+   - [set up Git](https://help.github.com/articles/set-up-git) in your computer.
    - clone your repo
 ~~~~{.c}
      git clone https://github.com/acountName/pgrouting pgrouting
@@ -43,12 +43,12 @@ Step by Step processing
 ~~~~
 
 4. Setting the remote fetching connections
-   - [More on remotes](https://help.github.com/categories/managing-remotes/) . 
+   - [More on remotes](https://help.github.com/categories/managing-remotes/) .
    - check the remote connection
 ~~~~{.c}
     git remote -v
 ~~~~
-   -  Add upstream remote (usually the main repository) 
+   -  Add upstream remote (usually the main repository)
 ~~~~{.c}
     git remote add upstream https://github.com/pgRouting/pgrouting
 ~~~~
@@ -79,7 +79,7 @@ So here are some basic rules about Master and develop:
      - It has to pass the tests on travis and Jenkins (linux & Windows)
      - Documentation must be "up to date"
      - Say that 99.9% is complete
-     
+
 
 The way we want to work:
    - If you want to work on a particular issue
@@ -92,20 +92,20 @@ The way we want to work:
      - Once is stable we will start making tests on Jenkins
    - When the work is that 99.9% complete we can:
      - Merge into develop
-     
+
 For the rest of the document the following branch has being created in the main repository:
 
   dev-myFeature
-   
+
 
 1. To get a list of all the branches
-  - 
+  -
 ~~~~{.c}
    git branch -a
 ~~~~
 
 2. To make sure you are in the correct branch
-  - 
+  -
 ~~~~{.c}
    git status
 ~~~~
@@ -153,7 +153,7 @@ For the rest of the document the following branch has being created in the main
     <fix conflicts if any>
 ~~~~
 
-  
+
 @section up_to_date Keep Fork Up to Date
 
 1. To keep your local repository up-to-date
@@ -226,8 +226,8 @@ sudo make install
 cd ..
 
 # before testing everything
-tools/test-runner.pl -alg common 
-tools/test-runner.pl -alg dijkstra 
+tools/test-runner.pl -alg common
+tools/test-runner.pl -alg dijkstra
 tools/test-runner.pl -alg myfeature
 
 # test everything
diff --git a/include/allpairs/pgr_allpairs.hpp b/include/allpairs/pgr_allpairs.hpp
index 5522e77..b73e083 100644
--- a/include/allpairs/pgr_allpairs.hpp
+++ b/include/allpairs/pgr_allpairs.hpp
@@ -91,226 +91,156 @@ pgr_floydWarshall(
 // template class
 template < class G >
 class Pgr_allpairs {
-    // default constructors and destructors
-    /*
-       Matrix_cell_t description:
-       int64_t from_vid;
-       int64_t to_vid;
-       float8 cost;
-       */
  public:
      void floydWarshall(
              G &graph,
              size_t &result_tuple_count,
-             Matrix_cell_t **postgres_rows);
-
+             Matrix_cell_t **postgres_rows) {
+         std::vector< std::vector<double>> matrix;
+         make_matrix(graph.num_vertices(), matrix);
+         inf_plus<double> combine;
+         boost::floyd_warshall_all_pairs_shortest_paths(
+                 graph.graph,
+                 matrix,
+                 weight_map(get(&pgrouting::Basic_edge::cost, graph.graph)).
+                 distance_combine(combine).
+                 distance_inf((std::numeric_limits<double>::max)()).
+                 distance_zero(0));
+
+         make_result(graph, matrix, result_tuple_count, postgres_rows);
+     }
 
      void floydWarshall(
              G &graph,
-             std::vector< Matrix_cell_t> &rows);
+             std::vector< Matrix_cell_t> &rows) {
+         std::vector< std::vector<double>> matrix;
+         make_matrix(graph.num_vertices(), matrix);
+         inf_plus<double> combine;
+         boost::floyd_warshall_all_pairs_shortest_paths(
+                 graph.graph,
+                 matrix,
+                 weight_map(get(&pgrouting::Basic_edge::cost, graph.graph)).
+                 distance_combine(combine).
+                 distance_inf((std::numeric_limits<double>::max)()).
+                 distance_zero(0));
+
+         make_result(graph, matrix, rows);
+     }
 
      void johnson(
              G &graph,
              size_t &result_tuple_count,
-             Matrix_cell_t **postgres_rows);
+             Matrix_cell_t **postgres_rows) {
+         std::vector< std::vector<double>> matrix;
+         make_matrix(graph.num_vertices(), matrix);
+         inf_plus<double> combine;
+         boost::johnson_all_pairs_shortest_paths(
+                 graph.graph,
+                 matrix,
+                 weight_map(get(&pgrouting::Basic_edge::cost, graph.graph)).
+                 distance_combine(combine).
+                 distance_inf((std::numeric_limits<double>::max)()).
+                 distance_zero(0));
+
+         make_result(graph, matrix, result_tuple_count, postgres_rows);
+     }
 
 
      void johnson(
              G &graph,
-             std::vector< Matrix_cell_t> &rows);
+             std::vector< Matrix_cell_t> &rows) {
+         std::vector< std::vector<double>> matrix;
+         make_matrix(graph.num_vertices(), matrix);
+         inf_plus<double> combine;
+         boost::johnson_all_pairs_shortest_paths(
+                 graph.graph,
+                 matrix,
+                 weight_map(get(&pgrouting::Basic_edge::cost, graph.graph)).
+                 distance_combine(combine).
+                 distance_inf((std::numeric_limits<double>::max)()).
+                 distance_zero(0));
+
+         make_result(graph, matrix, rows);
+     }
 
  private:
      void make_matrix(
              size_t v_size,
-             std::vector< std::vector<double>> &matrix) const;
+             std::vector< std::vector<double>> &matrix) const {
+         // TODO(vicky) in one step
+         matrix.resize(v_size);
+         for (size_t i=0; i < v_size; i++)
+             matrix[i].resize(v_size);
+     }
 
      void make_result(
              const G &graph,
              const std::vector< std::vector<double> > &matrix,
              size_t &result_tuple_count,
-             Matrix_cell_t **postgres_rows) const;
+             Matrix_cell_t **postgres_rows) const {
+         result_tuple_count = count_rows(graph, matrix);
+         *postgres_rows = pgr_alloc(result_tuple_count, (*postgres_rows));
+
+
+         size_t seq = 0;
+         for (typename G::V v_i = 0; v_i < graph.num_vertices(); v_i++) {
+             for (typename G::V v_j = 0; v_j < graph.num_vertices(); v_j++) {
+                 if (v_i == v_j) continue;
+                 if (matrix[v_i][v_j] != (std::numeric_limits<double>::max)()) {
+                     (*postgres_rows)[seq].from_vid = graph[v_i].id;
+                     (*postgres_rows)[seq].to_vid = graph[v_j].id;
+                     (*postgres_rows)[seq].cost =  matrix[v_i][v_j];
+                     seq++;
+                 }  // if
+             }  // for j
+         }  // for i
+     }
+
 
      size_t count_rows(
              const G &graph,
-             const std::vector< std::vector<double> > &matrix) const;
+             const std::vector< std::vector<double> > &matrix) const {
+         size_t result_tuple_count = 0;
+         for (size_t i = 0; i < graph.num_vertices(); i++) {
+             for (size_t j = 0; j < graph.num_vertices(); j++) {
+                 if (i == j) continue;
+                 if (matrix[i][j] != (std::numeric_limits<double>::max)()) {
+                     result_tuple_count++;
+                 }  // if
+             }  // for j
+         }  // for i
+         return result_tuple_count;
+     }
 
      void make_result(
              G &graph,
              std::vector< std::vector<double> > &matrix,
-             std::vector< Matrix_cell_t> &rows);
+             std::vector< Matrix_cell_t> &rows) {
+         size_t count = count_rows(graph, matrix);
+         rows.resize(count);
+         size_t seq = 0;
+
+         for (typename G::V v_i = 0; v_i < graph.num_vertices(); v_i++) {
+             for (typename G::V v_j = 0; v_j < graph.num_vertices(); v_j++) {
+                 if (matrix[v_i][v_j] != (std::numeric_limits<double>::max)()) {
+                     rows[seq] =
+                     {graph[v_i].id, graph[v_j].id, matrix[v_i][v_j]};
+                     seq++;
+                 }  // if
+             }  // for j
+         }  // for i
+     }
 
      template <typename T>
-         struct inf_plus {
-             T operator()(const T& a, const T& b) const {
-                 T inf = (std::numeric_limits<T>::max)();
-                 if (a == inf || b == inf)
-                     return inf;
-                 return a + b;
-             }
-         };
+     struct inf_plus {
+         T operator()(const T& a, const T& b) const {
+             T inf = (std::numeric_limits<T>::max)();
+             if (a == inf || b == inf)
+                 return inf;
+             return a + b;
+         }
+     };
 };
 
-/*
- * PUBLIC FUNCTIONS
- */
-
-template < class G >
-void Pgr_allpairs< G >::floydWarshall(
-        G &graph,
-        size_t &result_tuple_count,
-        Matrix_cell_t **postgres_rows) {
-    std::vector< std::vector<double>> matrix;
-    make_matrix(graph.num_vertices(), matrix);
-    inf_plus<double> combine;
-    boost::floyd_warshall_all_pairs_shortest_paths(
-            graph.graph,
-            matrix,
-            weight_map(get(&pgrouting::Basic_edge::cost, graph.graph)).
-            distance_combine(combine).
-            distance_inf((std::numeric_limits<double>::max)()).
-            distance_zero(0));
-
-    make_result(graph, matrix, result_tuple_count, postgres_rows);
-}
-
-
-template < class G >
-void Pgr_allpairs< G >::floydWarshall(
-        G &graph,
-        std::vector< Matrix_cell_t> &rows) {
-    std::vector< std::vector<double>> matrix;
-    make_matrix(graph.num_vertices(), matrix);
-    inf_plus<double> combine;
-    boost::floyd_warshall_all_pairs_shortest_paths(
-            graph.graph,
-            matrix,
-            weight_map(get(&pgrouting::Basic_edge::cost, graph.graph)).
-            distance_combine(combine).
-            distance_inf((std::numeric_limits<double>::max)()).
-            distance_zero(0));
-
-    make_result(graph, matrix, rows);
-}
-
-template < class G >
-void Pgr_allpairs< G >::johnson(
-        G &graph,
-        size_t &result_tuple_count,
-        Matrix_cell_t **postgres_rows) {
-    std::vector< std::vector<double>> matrix;
-    make_matrix(graph.num_vertices(), matrix);
-    inf_plus<double> combine;
-    boost::johnson_all_pairs_shortest_paths(
-            graph.graph,
-            matrix,
-            weight_map(get(&pgrouting::Basic_edge::cost, graph.graph)).
-            distance_combine(combine).
-            distance_inf((std::numeric_limits<double>::max)()).
-            distance_zero(0));
-
-    make_result(graph, matrix, result_tuple_count, postgres_rows);
-}
-
-
-template < class G >
-void Pgr_allpairs< G >::johnson(
-        G &graph,
-        std::vector< Matrix_cell_t> &rows) {
-    std::vector< std::vector<double>> matrix;
-    make_matrix(graph.num_vertices(), matrix);
-    inf_plus<double> combine;
-    boost::johnson_all_pairs_shortest_paths(
-            graph.graph,
-            matrix,
-            weight_map(get(&pgrouting::Basic_edge::cost, graph.graph)).
-            distance_combine(combine).
-            distance_inf((std::numeric_limits<double>::max)()).
-            distance_zero(0));
-
-    make_result(graph, matrix, rows);
-}
-
-
-
-
-/*
- * PRIVATE FUNCTIONS
- */
-
-template < class G >
-void
-Pgr_allpairs< G >::make_matrix(
-        size_t v_size,
-        std::vector< std::vector<double>> &matrix) const {
-    // TODO(vicky) in one step
-    matrix.resize(v_size);
-    for (size_t i=0; i < v_size; i++)
-        matrix[i].resize(v_size);
-}
-
-template < class G >
-size_t
-Pgr_allpairs< G >::count_rows(
-        const G &graph,
-        const std::vector< std::vector<double> > &matrix) const {
-    size_t result_tuple_count = 0;
-    for (size_t i = 0; i < graph.num_vertices(); i++) {
-        for (size_t j = 0; j < graph.num_vertices(); j++) {
-            if (i == j) continue;
-            if (matrix[i][j] != (std::numeric_limits<double>::max)()) {
-                result_tuple_count++;
-            }  // if
-        }  // for j
-    }  // for i
-    return result_tuple_count;
-}
-
-// TODO(vicky) don't keep it here for postgres
-template < class G >
-void
-Pgr_allpairs< G >::make_result(
-        const G &graph,
-        const std::vector< std::vector<double> > &matrix,
-        size_t &result_tuple_count,
-        Matrix_cell_t **postgres_rows) const {
-    result_tuple_count = count_rows(graph, matrix);
-    *postgres_rows = pgr_alloc(result_tuple_count, (*postgres_rows));
-
-
-    size_t seq = 0;
-    for (typename G::V v_i = 0; v_i < graph.num_vertices(); v_i++) {
-        for (typename G::V v_j = 0; v_j < graph.num_vertices(); v_j++) {
-            if (v_i == v_j) continue;
-            if (matrix[v_i][v_j] != (std::numeric_limits<double>::max)()) {
-                (*postgres_rows)[seq].from_vid = graph[v_i].id;
-                (*postgres_rows)[seq].to_vid = graph[v_j].id;
-                (*postgres_rows)[seq].cost =  matrix[v_i][v_j];
-                seq++;
-            }  // if
-        }  // for j
-    }  // for i
-}
-
-
-template < class G >
-void
-Pgr_allpairs< G >::make_result(
-        G &graph,
-        std::vector< std::vector<double> > &matrix,
-        std::vector< Matrix_cell_t> &rows) {
-    size_t count = count_rows(graph, matrix);
-    rows.resize(count);
-    size_t seq = 0;
-
-    for (typename G::V v_i = 0; v_i < graph.num_vertices(); v_i++) {
-        for (typename G::V v_j = 0; v_j < graph.num_vertices(); v_j++) {
-            if (matrix[v_i][v_j] != (std::numeric_limits<double>::max)()) {
-                rows[seq] =
-                    {graph[v_i].id, graph[v_j].id, matrix[v_i][v_j]};
-                seq++;
-            }  // if
-        }  // for j
-    }  // for i
-}
 
 #endif  // INCLUDE_ALLPAIRS_PGR_ALLPAIRS_HPP_
diff --git a/include/c_common/arrays_input.h b/include/c_common/arrays_input.h
index d58ba1e..a1a8375 100644
--- a/include/c_common/arrays_input.h
+++ b/include/c_common/arrays_input.h
@@ -27,6 +27,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #pragma once
 
 
+#include <stdint.h>
+
 // first file to include
 #ifdef __GNUC__
 #pragma GCC diagnostic ignored "-pedantic"
@@ -40,7 +42,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 // for ArrayType
 #include "utils/array.h"
-#include <stdint.h>
 
 
 /** @brief enforces the input array to be @b NOT empty */
diff --git a/include/c_common/check_parameters.h b/include/c_common/check_parameters.h
new file mode 100644
index 0000000..9090271
--- /dev/null
+++ b/include/c_common/check_parameters.h
@@ -0,0 +1,37 @@
+/*PGR-GNU*****************************************************************
+File: check_parameters.h
+
+Copyright (c) 2017 Celia Virginia Vergara Castillo
+vicky_vergara at hotmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#ifndef INCLUDE_C_COMMON_CHECK_PARAMETERS_H_
+#define INCLUDE_C_COMMON_CHECK_PARAMETERS_H_
+#pragma once
+
+#include "c_common/postgres_connection.h"
+
+void
+check_parameters(
+        int heuristic,
+        double factor,
+        double epsilon);
+
+#endif  // INCLUDE_C_COMMON_CHECK_PARAMETERS_H_
diff --git a/include/c_common/e_report.h b/include/c_common/e_report.h
index 74a6186..b558aa1 100644
--- a/include/c_common/e_report.h
+++ b/include/c_common/e_report.h
@@ -40,19 +40,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  * on C++ side, the message to be returned;
  * ~~~~{.c}
  * std::ostringstream log;
- * log << "the messaage";
- * log_msg = strdup(log.str().c_str());
+ * log << "the message";
+ * *log_msg = pgr_msg(log.str().c_str());
  * ~~~~
  *
  *
- *  The char* messages are cleared.
- *  New messages are made with palloc
  *
  *  when there is ERROR then postgreSQL takes over control
+ *    The char* messages are cleared automaticalyy with pfree.
  *
  *  @warning When error: Free all data not created with palloc before calling
  *
  */
+
 ///@{
 /*! @brief notice & error
  *
diff --git a/include/c_common/get_check_data.h b/include/c_common/get_check_data.h
index 5aead0d..97dc359 100644
--- a/include/c_common/get_check_data.h
+++ b/include/c_common/get_check_data.h
@@ -29,20 +29,109 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #include "c_common/postgres_connection.h"
 #include "c_types/column_info_t.h"
 
+/*!
+ at brief  Function will check whether the colNumber represent any specific column or NULL (SPI_ERROR_NOATTRIBUTE).
+
+ at param[in] colNumber Column number (count starts at 1).
+
+ at return @b TRUE when colNumber exist. 
+        @b FALSE when colNumber was not found.
+ 
+ */
 bool column_found(int colNumber);
 
+/*!
+ at brief Function tells expected type of each column and then check the correspondence type of each column.
+
+ at param[in] info[]     contain one or more column information.
+ at param[in] info_size  number of columns.
+
+ at throw ERROR Unknown type of column.
+  
+ at return NULL is always returned.
+ 
+ */
 void pgr_fetch_column_info(
         Column_info_t info[],
         int info_size);
 
+/*!
+ at brief The function check whether column type is ANY-INTEGER or not.
+       Where ANY-INTEGER is SQL type:
+            SMALLINT, INTEGER, BIGINT
+
+ at param[in] info contain column information.
+
+ at throw ERROR Unexpected Column type. Expected column type is ANY-INTEGER.
+
+ */
 void pgr_check_any_integer_type(Column_info_t info);
+
+/*!
+ at brief The function check whether column type is ANY-NUMERICAL.
+       Where ANY-NUMERICAL is SQL type:
+            SMALLINT, INTEGER, BIGINT, REAL, FLOAT
+
+ at param[in] info contain column information.
+
+ at throw ERROR Unexpected Column type. Expected column type is ANY-NUMERICAL.
+
+ */
 void pgr_check_any_numerical_type(Column_info_t info);
+
+/*!
+ at brief The function check whether column type is CHAR or not.
+       Where CHAR is SQL type:
+            CHARACTER
+
+ at param[in] info contain column information.
+
+ at throw ERROR Unexpected Column type. Expected column type is CHAR.
+
+ */
 void pgr_check_char_type(Column_info_t info);
+
+/*!
+ at brief The function check whether column type is TEXT or not.
+       Where TEXT is SQL type:
+            TEXT 
+
+ at param[in] info contain column information.
+
+ at throw ERROR Unexpected Column type. Expected column type is TEXT.
+
+ */
 void pgr_check_text_type(Column_info_t info);
 void pgr_check_boolean_type(Column_info_t info);
+
+/*!
+ at brief The function check whether column type is ANY-INTEGER-ARRAY or not.
+       Where ANY-INTEGER-ARRAY is SQL type:
+            SMALLINT[], INTEGER[], BIGINT[]
+
+ at param[in] info contain column information.
+
+ at throw ERROR Unexpected Column type. Expected column type is ANY-INTEGER-ARRAY.
+  
+ */
+
 void pgr_check_any_integerarray_type(Column_info_t info);
 
+/*!
+ at brief Function return the value of specified column in char type.
+
+ at param[in]  tuple         input row to be examined.
+ at param[in]  tupdesc       input row description.
+ at param[in]  info          contain column information.
+ at param[in]  strict        boolean value of strict.
+ at param[in]  default_value returned when column contain NULL value.
+  
+ at throw ERROR Unexpected Column type. Expected column type is CHAR.
+ at throw ERROR When value of column is NULL.
+
+ at return Char type of column value is returned.
 
+ */
 char pgr_SPI_getChar(
         HeapTuple *tuple,
         TupleDesc *tupdesc,
@@ -50,21 +139,81 @@ char pgr_SPI_getChar(
         bool strict,
         char default_value);
 
+/*!
+ at brief Function returns the values of specified columns in array.
+
+ at param[in]  tuple    input row to be examined.
+ at param[in]  tupdesc  input row description.
+ at param[in]  info     contain column information.
+ at param[out] the_size number of element in array.
+
+ at throw ERROR No elements found in ARRAY.
+ at throw ERROR Unexpected Column type. Expected column type is ANY-INTEGER-ARRAY.
+ at throw ERROR NULL value found in Array.
+  
+ at return Array of columns value is returned.
+
+ */
+
+int64_t*
+pgr_SPI_getBigIntArr(
+        HeapTuple *tuple,
+        TupleDesc *tupdesc,
+        Column_info_t info,
+        uint64_t *the_size);
+
+/*!
+ at brief Function returns the value of specified column in integer type.
+
+ at param[in]  tuple   input row to be examined.
+ at param[in]  tupdesc input row description.
+ at param[in]  info    contain column information.
+
+ at throw ERROR Unexpected Column type. Expected column type is ANY-INTEGER.
+ at throw ERROR When value of column is NULL.
+  
+ at return Integer type of column value is returned.
+
+ */
+
 int64_t pgr_SPI_getBigInt(
         HeapTuple *tuple,
         TupleDesc *tupdesc,
         Column_info_t info);
 
+/*!
+ at brief Function returns the value of specified column in double type.
+
+ at param[in] tuple   input row to be examined.
+ at param[in] tupdesc input row description.
+ at param[in] info    contain column information.
+
+ at throw ERROR Unexpected Column type. Expected column type is ANY-NUMERICAL.
+ at throw ERROR When value of column is NULL.
+
+ at return Double type of column value is returned.
+
+ */
+
 double  pgr_SPI_getFloat8(
         HeapTuple *tuple,
         TupleDesc *tupdesc,
         Column_info_t info);
+/*!
+ at brief Function returns the string representation of the value of specified column.
+ 
+ at param[in]  tuple   input row to be examined.
+ at param[in]  tupdesc input row description.
+ at param[in]  info    contain column information.
+  
+ at return Pointer of string is returned.
+
+ */
 
 char* pgr_SPI_getText(
         HeapTuple *tuple,
         TupleDesc *tupdesc,
         Column_info_t info);
 
-char* pgr_stradd(const char *a, const char *b);
 
 #endif  // INCLUDE_C_COMMON_GET_CHECK_DATA_H_
diff --git a/include/c_common/postgres_connection.h b/include/c_common/postgres_connection.h
index dae6484..8399429 100644
--- a/include/c_common/postgres_connection.h
+++ b/include/c_common/postgres_connection.h
@@ -36,6 +36,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #pragma clang diagnostic ignored "-pedantic"
 #endif
 
+#ifdef __MSVC__
+#pragma warning(disable : 4200)
+#endif
+
 #include <postgres.h>
 
 
@@ -52,7 +56,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #pragma clang diagnostic ignored "-Wunused-parameter"
 #endif
 
-#include "executor/spi.h"
+#include <executor/spi.h>
+#include <funcapi.h>
 
 #ifdef __GNUC__
 #pragma GCC diagnostic pop
@@ -81,7 +86,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #pragma GCC diagnostic ignored "-Wunused-parameter"
 #endif
 
-#include <funcapi.h>
 #include <fmgr.h>
 
 #ifdef __GNUC__
diff --git a/include/c_common/restrict_input.h b/include/c_common/restrict_input.h
deleted file mode 100644
index fc76a0f..0000000
--- a/include/c_common/restrict_input.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: restrict_input.h
-
-Copyright (c) 2017 Celia Virginia Vergara Castillo
-Mail: vicky_vergara at hotmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-/*! @file */
-
-
-#ifndef INCLUDE_C_COMMON_RESTRICT_INPUT_H_
-#define INCLUDE_C_COMMON_RESTRICT_INPUT_H_
-#pragma once
-
-#include "c_types/restrict_t.h"
-
-void pgr_get_restriction_data(
-        char *restrictions_sql,
-        Restrict_t **restrictions,
-        size_t *total_restrictions);
-
-#endif  // INCLUDE_C_COMMON_RESTRICT_INPUT_H_
diff --git a/include/c_common/restrictions_input.h b/include/c_common/restrictions_input.h
index 8e69bfe..803ceb9 100644
--- a/include/c_common/restrictions_input.h
+++ b/include/c_common/restrictions_input.h
@@ -26,11 +26,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #define INCLUDE_C_COMMON_RESTRICTIONS_INPUT_H_
 #pragma once
 
-#include "c_types/restrict_t.h"
+#include "c_types/restriction_t.h"
 
-void pgr_get_restriction_data(
+void pgr_get_restrictions(
         char *restrictions_sql,
-        Restrict_t **restructions,
+        Restriction_t **restrictions,
         size_t *total_restrictions);
 
 #endif  // INCLUDE_C_COMMON_RESTRICTIONS_INPUT_H_
diff --git a/include/c_types/line_graph_full_rt.h b/include/c_types/line_graph_full_rt.h
new file mode 100644
index 0000000..a73d85c
--- /dev/null
+++ b/include/c_types/line_graph_full_rt.h
@@ -0,0 +1,71 @@
+/*PGR-GNU*****************************************************************
+File: line_graph_full_rt.h
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer:
+Copyright (c) 2018 Anthony Tasca
+Mail: atasca10 at gmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+/*! @file */
+
+#ifndef INCLUDE_C_TYPES_LINE_GRAPH_FULL_RT_H_
+#define INCLUDE_C_TYPES_LINE_GRAPH_FULL_RT_H_
+#pragma once
+
+
+#ifdef __cplusplus
+
+#include <cstddef>
+
+#else  // __cplusplus
+
+// for bool
+#ifdef __GNUC__
+#pragma GCC diagnostic ignored "-pedantic"
+#endif
+
+#include <postgres.h>
+
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
+
+// For NULL & size_t
+#include <stdlib.h>
+
+
+#endif  // __cplusplus
+
+// For int64_t etc
+#include <stdint.h>
+
+
+typedef struct {
+    int64_t id;
+    int64_t source;
+    int64_t target;
+    double cost;
+    int64_t edge;
+} Line_graph_full_rt;
+
+#endif  // INCLUDE_C_TYPES_LINE_GRAPH_FULL_RT_H_
diff --git a/include/c_types/line_graph_rt.h b/include/c_types/line_graph_rt.h
index a570fd8..3d389f3 100644
--- a/include/c_types/line_graph_rt.h
+++ b/include/c_types/line_graph_rt.h
@@ -64,8 +64,8 @@ typedef struct {
     int64_t id;
     int64_t source;
     int64_t target;
-    float cost;
-    float reverse_cost;
+    double cost;
+    double reverse_cost;
 } Line_graph_rt;
 
 #endif  // INCLUDE_C_TYPES_LINE_GRAPH_RT_H_
diff --git a/include/c_types/pgr_components_rt.h b/include/c_types/pgr_components_rt.h
index 56c1146..79a066e 100644
--- a/include/c_types/pgr_components_rt.h
+++ b/include/c_types/pgr_components_rt.h
@@ -56,9 +56,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 
 typedef struct {
-	int64_t component;
-	int n_seq;
-	int64_t identifier;
+    int64_t component;
+    int n_seq;
+    int64_t identifier;
 } pgr_components_rt;
 
-#endif // INCLUDE_C_TYPES_PGR_COMPONENTS_RT_H_
+#endif  // INCLUDE_C_TYPES_PGR_COMPONENTS_RT_H_
diff --git a/include/c_types/restrict_t.h b/include/c_types/restrict_t.h
deleted file mode 100644
index de2df5b..0000000
--- a/include/c_types/restrict_t.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: restrict_t.h
-
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-Mail: vicky_vergara at hotmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-/*! @file */
-
-#ifndef INCLUDE_C_TYPES_RESTRICT_T_H_
-#define INCLUDE_C_TYPES_RESTRICT_T_H_
-#pragma once
-
-
-#ifdef __cplusplus
-
-#include <cstddef>
-
-#else  // __cplusplus
-
-// for bool
-#ifdef __GNUC__
-#pragma GCC diagnostic ignored "-pedantic"
-#endif
-
-#include <postgres.h>
-
-#ifdef __GNUC__
-#pragma GCC diagnostic pop
-#endif
-
-// For NULL & size_t
-#include <stdlib.h>
-
-
-#endif  // __cplusplus
-
-// For int64_t etc
-#include <stdint.h>
-
-
-#define  MAX_RULE_LENGTH 5
-
-typedef struct {
-    int64_t id;
-    double cost;
-    int64_t restricted_edges[MAX_RULE_LENGTH];
-}
-Restrict_t;
-
-
-
-#endif  // INCLUDE_C_TYPES_RESTRICT_T_H_
diff --git a/include/c_types/restriction_t.h b/include/c_types/restriction_t.h
new file mode 100644
index 0000000..09ac081
--- /dev/null
+++ b/include/c_types/restriction_t.h
@@ -0,0 +1,69 @@
+/*PGR-GNU*****************************************************************
+File: restrict_t.h
+
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+Mail: vicky_vergara at hotmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+/*! @file */
+
+#ifndef INCLUDE_C_TYPES_RESTRICTION_T_H_
+#define INCLUDE_C_TYPES_RESTRICTION_T_H_
+#pragma once
+
+
+#ifdef __cplusplus
+
+#include <cstddef>
+
+#else  // __cplusplus
+
+// for bool
+#ifdef __GNUC__
+#pragma GCC diagnostic ignored "-pedantic"
+#endif
+
+#include <postgres.h>
+
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
+
+// For NULL & size_t
+#include <stdlib.h>
+
+
+#endif  // __cplusplus
+
+// For int64_t etc
+#include <stdint.h>
+
+
+
+typedef struct {
+    int64_t id;
+    double cost;
+    int64_t * via;
+    uint64_t via_size;
+}
+Restriction_t;
+
+
+
+#endif  // INCLUDE_C_TYPES_RESTRICTION_T_H_
diff --git a/include/c_types/trsp/trsp.h b/include/c_types/trsp/trsp.h
new file mode 100644
index 0000000..503a0b4
--- /dev/null
+++ b/include/c_types/trsp/trsp.h
@@ -0,0 +1,90 @@
+/*
+ * Shortest path with turn restrictions algorithm for PostgreSQL
+ *
+ * Copyright (c) 2011 Stephen Woodbridge
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#ifndef INCLUDE_C_TYPES_TRSP_TRSP_H_
+#define INCLUDE_C_TYPES_TRSP_TRSP_H_
+
+#define MAX_RULE_LENGTH 5
+
+#include "postgres.h"
+#include <stdint.h>
+
+
+typedef struct edge {
+    long id;
+    long source;
+    long target;
+    float8 cost;
+    float8 reverse_cost;
+} edge_t;
+
+typedef struct restrict_struct {
+    int target_id;
+    float8 to_cost;
+    int via[MAX_RULE_LENGTH];
+}
+restrict_t;
+
+typedef struct path_element {
+    long vertex_id;
+    long edge_id;
+    float8 cost;
+} path_element_tt;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int trsp_node_wrapper(
+    edge_t *edges,
+    size_t edge_count,
+    restrict_t *restricts,
+    size_t restrict_count,
+    int64_t start_vertex,
+    int64_t end_vertex,
+    bool directed,
+    bool has_reverse_cost,
+    path_element_tt **path,
+    size_t *path_count,
+    char **err_msg
+);
+
+int trsp_edge_wrapper(
+    edge_t *edges,
+    size_t edge_count,
+    restrict_t *restricts,
+    size_t restrict_count,
+    int64_t start_edge,
+    double start_pos,
+    int64_t end_edge,
+    double end_pos,
+    bool directed,
+    bool has_reverse_cost,
+    path_element_tt **path,
+    size_t *path_count,
+    char **err_msg
+);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  // INCLUDE_C_TYPES_TRSP_TRSP_H_
diff --git a/include/c_types/trsp_types.h b/include/c_types/trsp_types.h
new file mode 100644
index 0000000..b825ccc
--- /dev/null
+++ b/include/c_types/trsp_types.h
@@ -0,0 +1,78 @@
+/*
+ * Shortest path with turn restrictions algorithm for PostgreSQL
+ *
+ * Copyright (c) 2017 pgRouting developers
+ * Mail: project at pgrouting.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#ifndef INCLUDE_C_TYPES_TRSP_TYPES_H_
+#define INCLUDE_C_TYPES_TRSP_TYPES_H_
+
+
+#ifdef __cplusplus
+
+#include <cstddef>
+
+#else  // __cplusplus
+
+// for bool
+#ifdef __GNUC__
+#pragma GCC diagnostic ignored "-pedantic"
+#endif
+
+#include <postgres.h>
+
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
+
+// For NULL & size_t
+#include <stdlib.h>
+
+
+#endif  // __cplusplus
+
+// For int64_t etc
+#include <stdint.h>
+
+
+
+typedef struct  {
+    int64_t id;
+    int64_t source;
+    int64_t target;
+    double cost;
+    double reverse_cost;
+} edge_t;
+
+typedef struct restrict_struct {
+    int target_id;
+    double to_cost;
+    int via[5];
+}
+restrict_t;
+
+typedef struct path_element {
+    int64_t vertex_id;
+    int64_t edge_id;
+    double cost;
+} path_element_tt;
+
+
+
+#endif  // INCLUDE_C_TYPES_TRSP_TYPES_H_
diff --git a/include/contraction/pgr_contract.hpp b/include/contraction/pgr_contract.hpp
index cd38136..e5964ff 100644
--- a/include/contraction/pgr_contract.hpp
+++ b/include/contraction/pgr_contract.hpp
@@ -27,8 +27,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 ********************************************************************PGR-GNU*/
 
-#ifndef SRC_CONTRACTION_SRC_PGR_CONTRACT_HPP_
-#define SRC_CONTRACTION_SRC_PGR_CONTRACT_HPP_
+#ifndef INCLUDE_CONTRACTION_PGR_CONTRACT_HPP_
+#define INCLUDE_CONTRACTION_PGR_CONTRACT_HPP_
 #pragma once
 
 #include <deque>
@@ -180,4 +180,4 @@ class Pgr_contract {
 }  // namespace contraction
 }  // namespace pgrouting
 
-#endif  // SRC_CONTRACTION_SRC_PGR_CONTRACT_HPP_
+#endif  // INCLUDE_CONTRACTION_PGR_CONTRACT_HPP_
diff --git a/include/contraction/pgr_contractionGraph.hpp b/include/contraction/pgr_contractionGraph.hpp
index 6999680..aee94cf 100644
--- a/include/contraction/pgr_contractionGraph.hpp
+++ b/include/contraction/pgr_contractionGraph.hpp
@@ -27,8 +27,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
  ********************************************************************PGR-GNU*/
 
-#ifndef SRC_CONTRACTION_SRC_PGR_CONTRACTIONGRAPH_HPP_
-#define SRC_CONTRACTION_SRC_PGR_CONTRACTIONGRAPH_HPP_
+#ifndef INCLUDE_CONTRACTION_PGR_CONTRACTIONGRAPH_HPP_
+#define INCLUDE_CONTRACTION_PGR_CONTRACTIONGRAPH_HPP_
 #pragma once
 
 
@@ -37,8 +37,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #include <vector>
 
 #include "cpp_common/pgr_base_graph.hpp"
-#include "../../common/src/ch_vertex.h"
-#include "../../common/src/ch_edge.h"
+#include "cpp_common/ch_vertex.h"
+#include "cpp_common/ch_edge.h"
 
 
 namespace pgrouting {
@@ -207,7 +207,7 @@ class Pgr_contractionGraph : public Pgr_base_graph<G, T_V, T_E> {
          for (auto vi = vertices(this->graph).first;
                  vi != vertices(this->graph).second;
                  ++vi) {
-             if ((*vi) >= this->m_num_vertices) break;
+             if ((*vi) >= this->num_vertices()) break;
              log << this->graph[*vi].id << "(" << (*vi) << ")"
                  << this->graph[*vi].contracted_vertices() << std::endl;
              log << " out_edges_of(" << this->graph[*vi].id << "):";
@@ -299,4 +299,4 @@ class Pgr_contractionGraph : public Pgr_base_graph<G, T_V, T_E> {
 }  // namespace graph
 }  // namespace pgrouting
 
-#endif  // SRC_CONTRACTION_SRC_PGR_CONTRACTIONGRAPH_HPP_
+#endif  // INCLUDE_CONTRACTION_PGR_CONTRACTIONGRAPH_HPP_
diff --git a/include/contraction/pgr_deadEndContraction.hpp b/include/contraction/pgr_deadEndContraction.hpp
index 9e5a89c..3e48567 100644
--- a/include/contraction/pgr_deadEndContraction.hpp
+++ b/include/contraction/pgr_deadEndContraction.hpp
@@ -27,8 +27,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
  ********************************************************************PGR-GNU*/
 
-#ifndef SRC_CONTRACTION_SRC_PGR_DEADENDCONTRACTION_HPP_
-#define SRC_CONTRACTION_SRC_PGR_DEADENDCONTRACTION_HPP_
+#ifndef INCLUDE_CONTRACTION_PGR_DEADENDCONTRACTION_HPP_
+#define INCLUDE_CONTRACTION_PGR_DEADENDCONTRACTION_HPP_
 #pragma once
 
 
@@ -405,4 +405,4 @@ Pgr_deadend<G>::doContraction(G &graph) {
 }  // namespace contraction
 }  // namespace pgrouting
 
-#endif  // SRC_CONTRACTION_SRC_PGR_DEADENDCONTRACTION_HPP_
+#endif  // INCLUDE_CONTRACTION_PGR_DEADENDCONTRACTION_HPP_
diff --git a/include/contraction/pgr_linearContraction.hpp b/include/contraction/pgr_linearContraction.hpp
index 4eb74a7..f2ad5e1 100644
--- a/include/contraction/pgr_linearContraction.hpp
+++ b/include/contraction/pgr_linearContraction.hpp
@@ -27,8 +27,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
  ********************************************************************PGR-GNU*/
 
-#ifndef SRC_CONTRACTION_SRC_PGR_LINEARCONTRACTION_HPP_
-#define SRC_CONTRACTION_SRC_PGR_LINEARCONTRACTION_HPP_
+#ifndef INCLUDE_CONTRACTION_PGR_LINEARCONTRACTION_HPP_
+#define INCLUDE_CONTRACTION_PGR_LINEARCONTRACTION_HPP_
 #pragma once
 
 
@@ -279,4 +279,4 @@ void Pgr_linear<G>::add_shortcut(G &graph,
 }  // namespace contraction
 }  // namespace pgrouting
 
-#endif  // SRC_CONTRACTION_SRC_PGR_LINEARCONTRACTION_HPP_
+#endif  // INCLUDE_CONTRACTION_PGR_LINEARCONTRACTION_HPP_
diff --git a/include/cpp_common/basePath_SSEC.hpp b/include/cpp_common/basePath_SSEC.hpp
index 2570be1..1d512f6 100644
--- a/include/cpp_common/basePath_SSEC.hpp
+++ b/include/cpp_common/basePath_SSEC.hpp
@@ -39,7 +39,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #include <algorithm>
 
 #include "c_types/general_path_element_t.h"
-
 #include "cpp_common/path_t.h"
 #include "cpp_common/pgr_base_graph.hpp"
 
@@ -74,6 +73,7 @@ class Path {
     void push_back(Path_t data);
     const Path_t& operator[](size_t i) const {return path[i];}
     Path_t& operator[](size_t i) {return path[i];}
+    Path& renumber_vertices(int64_t value);
 
     pthIt begin() {return path.begin();}
     pthIt end() {return path.end();}
@@ -88,6 +88,8 @@ class Path {
     Path_t& front() {return path.front();}
     void sort_by_node_agg_cost();
 
+    void recalculate_agg_cost();
+
 
     Path_t set_data(
             int64_t d_from,
diff --git a/include/cpp_common/ch_edge.h b/include/cpp_common/ch_edge.h
new file mode 100644
index 0000000..b14dd69
--- /dev/null
+++ b/include/cpp_common/ch_edge.h
@@ -0,0 +1,72 @@
+/*PGR-GNU*****************************************************************
+File: ch_edge.h
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer: 
+Copyright (c) 2016 Rohith Reddy
+Mail: 
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ ********************************************************************PGR-GNU*/
+
+#ifndef INCLUDE_CPP_COMMON_CH_EDGE_H_
+#define INCLUDE_CPP_COMMON_CH_EDGE_H_
+#pragma once
+
+#include <iostream>
+#include <sstream>
+#include "./ch_vertex.h"
+// #include "./basic_edge.h"
+
+namespace pgrouting {
+
+class CH_edge {
+ public:
+     CH_edge() = default;
+
+     CH_edge(int64_t eid, int64_t source, int64_t target, double cost) :
+         id(eid), source(source),
+         target(target), cost(cost) {}
+
+     void cp_members(const CH_edge &other);
+
+     void add_contracted_vertex(CH_vertex& v, int64_t vid);
+     void add_contracted_edge_vertices(CH_edge& e);
+
+     bool has_contracted_vertices() const;
+
+     void clear_contracted_vertices() {m_contracted_vertices.clear();}
+     const Identifiers<int64_t>& contracted_vertices() const;
+     friend std::ostream& operator <<(std::ostream& os, const CH_edge& e);
+
+ public:
+     int64_t id;
+     int64_t source;
+     int64_t target;
+     double cost;
+
+ private:
+     Identifiers<int64_t> m_contracted_vertices;
+};
+
+}  // namespace pgrouting
+
+#endif  // INCLUDE_CPP_COMMON_CH_EDGE_H_
diff --git a/include/cpp_common/ch_vertex.h b/include/cpp_common/ch_vertex.h
new file mode 100644
index 0000000..70bf096
--- /dev/null
+++ b/include/cpp_common/ch_vertex.h
@@ -0,0 +1,75 @@
+/*PGR-GNU*****************************************************************
+File: ch_vertex.h
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer: 
+Copyright (c) 2016 Rohith Reddy
+Mail: 
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ ********************************************************************PGR-GNU*/
+#ifndef INCLUDE_CPP_COMMON_CH_VERTEX_H_
+#define INCLUDE_CPP_COMMON_CH_VERTEX_H_
+#include <iostream>
+#include <sstream>
+#include <vector>
+
+#include "c_types/pgr_edge_t.h"
+#include "cpp_common/identifiers.hpp"
+
+namespace pgrouting {
+
+class CH_vertex {
+ public:
+    int64_t id;
+    CH_vertex() = default;
+    CH_vertex(const CH_vertex &) = default;
+    CH_vertex(const pgr_edge_t &other, bool is_source) :
+      id(is_source? other.source : other.target)
+      {}
+    void cp_members(const CH_vertex &other) {
+        this->id = other.id;
+    }
+    void add_contracted_vertex(CH_vertex& v, int64_t vid);
+    void add_vertex_id(int64_t vid) {m_contracted_vertices += vid;}
+    const Identifiers<int64_t>& contracted_vertices() const;
+    bool has_contracted_vertices() const;
+    void clear_contracted_vertices() {m_contracted_vertices.clear();}
+    friend std::ostream& operator <<(std::ostream& os, const CH_vertex& v);
+ private:
+    Identifiers<int64_t> m_contracted_vertices;
+};
+
+size_t
+check_vertices(std::vector < CH_vertex > vertices);
+
+#if 0
+std::vector < CH_vertex >
+extract_vertices(
+    const pgr_edge_t *data_edges, int64_t count);
+
+std::vector < CH_vertex >
+extract_vertices(
+    const std::vector < pgr_edge_t > &data_edges);
+#endif
+}  // namespace pgrouting
+
+#endif  // INCLUDE_CPP_COMMON_CH_VERTEX_H_
diff --git a/include/cpp_common/line_vertex.h b/include/cpp_common/line_vertex.h
index fc50d0b..52b68e1 100644
--- a/include/cpp_common/line_vertex.h
+++ b/include/cpp_common/line_vertex.h
@@ -47,7 +47,7 @@ class Line_vertex {
      Line_vertex() :
          id(0) {}
 
-     Line_vertex(const pgr_edge_t& edge) :
+     explicit Line_vertex(const pgr_edge_t& edge) :
          id(edge.id),
          vertex_id(edge.id),
          source(edge.source),
diff --git a/include/cpp_common/linear_directed_graph.h b/include/cpp_common/linear_directed_graph.h
new file mode 100644
index 0000000..b9835aa
--- /dev/null
+++ b/include/cpp_common/linear_directed_graph.h
@@ -0,0 +1,59 @@
+/*PGR-GNU*****************************************************************
+ *
+
+Copyright (c) 2017 Anthony Nicola Tasca
+atasca10 at gmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+/*! @file */
+
+#ifndef INCLUDE_CPP_COMMON_LINEAR_DIRECTED_GRAPH_H_
+#define INCLUDE_CPP_COMMON_LINEAR_DIRECTED_GRAPH_H_
+#pragma once
+
+#include <boost/config.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include "cpp_common/basic_edge.h"
+#include "cpp_common/line_vertex.h"
+
+namespace pgrouting {
+
+/** @brief Data type to handle graph -> lineGaph transformation
+ *
+ * @details
+ * Usage:
+ * ~~~~{.c}
+ * pgrouting::graph::Pgr_lineGraphFull<
+ *      pgrouting::LinearDirectedGraph,  // using here
+ *      pgrouting::Line_vertex,
+ *      pgrouting::Basic_edge > line(graphType::DIRECTED);
+ *
+ * pgrouting::graph::Pgr_lineGraph<
+ *      pgrouting::LinearDirectedGraph,  // using here
+ *      pgrouting::Line_vertex,
+ *      pgrouting::Basic_edge > line(graphType::DIRECTED);
+ * ~~~~
+ */    
+typedef boost::adjacency_list < boost::vecS, boost::vecS,
+    boost::bidirectionalS,
+    Line_vertex, Basic_edge > LinearDirectedGraph;
+
+}  // namespace pgrouting
+
+#endif  // INCLUDE_CPP_COMMON_LINEAR_DIRECTED_GRAPH_H_
diff --git a/include/cpp_common/pgr_alloc.hpp b/include/cpp_common/pgr_alloc.hpp
index 8833382..d10a3b7 100644
--- a/include/cpp_common/pgr_alloc.hpp
+++ b/include/cpp_common/pgr_alloc.hpp
@@ -29,19 +29,21 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #pragma once
 
 
+#include <string>
+
 extern "C" {
-#if PGSQL_VERSION < 94
-#ifdef __MINGW32__
-#include <winsock2.h>
-#include <windows.h>
-#endif
-#endif
-
-#include "c_common/postgres_connection.h"
-#include "utils/palloc.h"
+
+extern
+void* SPI_palloc(size_t size);
+
+extern void *
+SPI_repalloc(void *pointer, size_t size);
+
+extern void
+SPI_pfree(void *pointer);
+
 }
 
-#include <string>
 
 /*! \fn pgr_alloc(std::size_t size, T *ptr)
 
@@ -74,7 +76,7 @@ template <typename T>
 T*
 pgr_free(T* ptr) {
     if (ptr) {
-        pfree(ptr);
+        SPI_pfree(ptr);
     }
     return nullptr;
 }
diff --git a/include/cpp_common/pgr_base_graph.hpp b/include/cpp_common/pgr_base_graph.hpp
index fcfc689..f2acf6a 100644
--- a/include/cpp_common/pgr_base_graph.hpp
+++ b/include/cpp_common/pgr_base_graph.hpp
@@ -305,7 +305,6 @@ class Pgr_base_graph {
      //! @name The Graph
      //@{
      G graph;                //!< The graph
-     size_t m_num_vertices;  //!< local count.
      graphType m_gType;      //!< type (DIRECTED or UNDIRECTED)
      //@}
 
@@ -343,11 +342,13 @@ class Pgr_base_graph {
      Pgr_base_graph< G , T_V, T_E >(
              const std::vector< T_V > &vertices, graphType gtype)
          : graph(vertices.size()),
+#if 0
          m_num_vertices(vertices.size()),
+#endif
          m_gType(gtype),
          vertIndex(boost::get(boost::vertex_index, graph)),
          propmapIndex(mapIndex) {
-             //add_vertices(vertices);
+             // add_vertices(vertices);
              // This code does not work with contraction
 #if 0
              pgassert(pgrouting::check_vertices(vertices) == 0);
@@ -357,19 +358,22 @@ class Pgr_base_graph {
                      vi != boost::vertices(graph).second; ++vi) {
                  vertices_map[vertices[i].id] = (*vi);
                  graph[(*vi)].cp_members(vertices[i]);
-                 //put(propmapIndex, *vi, num_vertices());
+                 // put(propmapIndex, *vi, num_vertices());
                  pgassert(vertIndex[*vi] == i);
                  ++i;
              }
 
              std::ostringstream log;
-             for (auto iter = vertices_map.begin(); iter != vertices_map.end(); iter++) {
-                 log << "Key: " << iter->first <<"\tValue:" << iter->second << "\n";
+             for (auto iter = vertices_map.begin();
+                     iter != vertices_map.end();
+                     iter++) {
+                 log << "Key: "
+                     << iter->first <<"\tValue:" << iter->second << "\n";
              }
              for (const auto vertex : vertices) {
                  pgassert(has_vertex(vertex.id));
              }
-             //pgassert(mapIndex.size() == vertices.size());
+             // pgassert(mapIndex.size() == vertices.size());
          }
 
      /*!
@@ -377,7 +381,9 @@ class Pgr_base_graph {
        */
      explicit Pgr_base_graph< G , T_V, T_E >(graphType gtype)
          : graph(0),
+#if 0
          m_num_vertices(0),
+#endif
          m_gType(gtype),
          vertIndex(boost::get(boost::vertex_index, graph)),
          propmapIndex(mapIndex) {
@@ -399,6 +405,11 @@ class Pgr_base_graph {
              insert_edges(std::vector < T >(edges, edges + count));
          }
 
+     template < typename T >
+         void insert_edges_neg(const T *edges, int64_t count) {
+             insert_edges(std::vector < T >(edges, edges + count), false);
+         }
+
      template < typename T>
          void insert_edges(T *edges, int64_t count, bool) {
              for (int64_t i = 0; i < count; ++i) {
@@ -428,7 +439,7 @@ class Pgr_base_graph {
         @param edges
       */
      template < typename T >
-         void insert_edges(const std::vector < T > &edges) {
+         void insert_edges(const std::vector<T> &edges, bool normal = true) {
 #if 0
              // This code does not work with contraction
              if (num_vertices() == 0) {
@@ -438,7 +449,7 @@ class Pgr_base_graph {
              }
 #endif
              for (const auto edge : edges) {
-                 graph_add_edge(edge);
+                 graph_add_edge(edge, normal);
              }
          }
      //@}
@@ -475,18 +486,18 @@ class Pgr_base_graph {
       */
      void add_vertices(
              std::vector< T_V > vertices) {
-         pgassert(m_num_vertices == 0);
+         pgassert(num_vertices() == 0);
          for (const auto vertex : vertices) {
              pgassert(!has_vertex(vertex.id));
 
              auto v =  add_vertex(graph);
              vertices_map[vertex.id] =  v;
              graph[v].cp_members(vertex);
-             //put(propmapIndex, v, num_vertices());
+             // put(propmapIndex, v, num_vertices());
 
              pgassert(has_vertex(vertex.id));
          }
-         //pgassert(mapIndex.size() == vertices.size());
+         // pgassert(mapIndex.size() == vertices.size());
          pgassert(num_vertices() == vertices.size());
      }
 
@@ -530,7 +541,7 @@ class Pgr_base_graph {
              auto v =  add_vertex(graph);
              graph[v].cp_members(vertex);
              vertices_map[vertex.id] =  v;
-             put(propmapIndex, v, m_num_vertices++);
+             put(propmapIndex, v, num_vertices());
              return v;
          }
          return vm_s->second;
@@ -673,7 +684,7 @@ class Pgr_base_graph {
 
          for (auto vi = vertices(g.graph).first;
                  vi != vertices(g.graph).second; ++vi) {
-             if ((*vi) >= g.m_num_vertices) break;
+             if ((*vi) >= g.num_vertices()) break;
              log << (*vi) << ": " << " out_edges_of(" << g.graph[(*vi)] << "):";
              for (boost::tie(out, out_end) = out_edges(*vi, g.graph);
                      out != out_end; ++out) {
@@ -694,15 +705,18 @@ class Pgr_base_graph {
      int64_t get_edge_id(V from, V to, double &distance) const;
 
      size_t num_vertices() const { return boost::num_vertices(graph);}
+     size_t num_edges() const { return boost::num_edges(graph);}
 
 
      void graph_add_edge(const T_E &edge);
 
      template < typename T >
-         void graph_add_edge(const T &edge);
+         void graph_add_edge(const T &edge, bool normal = true);
 
 
-     /** Use this function when the vertices are already inserted in the graph */
+     /**
+      *  Use this function when the vertices are already inserted in the graph
+      */
      template < typename T>
      void graph_add_edge_no_create_vertex(const T &edge) {
          bool inserted;
@@ -712,7 +726,9 @@ class Pgr_base_graph {
 
 #if 0
          std::ostringstream log;
-         for (auto iter = vertices_map.begin(); iter != vertices_map.end(); iter++) {
+         for (auto iter = vertices_map.begin();
+                 iter != vertices_map.end();
+                 iter++) {
              log << "Key: " << iter->first <<"\tValue:" << iter->second << "\n";
          }
          pgassertwm(has_vertex(edge.source), log.str().c_str());
@@ -730,8 +746,8 @@ class Pgr_base_graph {
              graph[e].id = edge.id;
          }
 
-         if (edge.reverse_cost >= 0
-                 && (is_directed() || (is_undirected() && edge.cost != edge.reverse_cost))) {
+         if (edge.reverse_cost >= 0 && (is_directed()
+                     || (is_undirected() && edge.cost != edge.reverse_cost))) {
              boost::tie(e, inserted) =
                  boost::add_edge(vm_t, vm_s, graph);
              graph[e].cost = edge.reverse_cost;
@@ -893,13 +909,13 @@ Pgr_base_graph< G, T_V, T_E >::graph_add_edge(const T_E &edge ) {
 
     vm_s = vertices_map.find(edge.source);
     if (vm_s == vertices_map.end()) {
-        vertices_map[edge.source]=  m_num_vertices;
+        vertices_map[edge.source]=  num_vertices();
         vm_s = vertices_map.find(edge.source);
     }
 
     vm_t = vertices_map.find(edge.target);
     if (vm_t == vertices_map.end()) {
-        vertices_map[edge.target]=  m_num_vertices;
+        vertices_map[edge.target]=  num_vertices();
         vm_t = vertices_map.find(edge.target);
     }
 
@@ -914,7 +930,7 @@ Pgr_base_graph< G, T_V, T_E >::graph_add_edge(const T_E &edge ) {
 template < class G, typename T_V, typename T_E >
 template < typename T>
 void
-Pgr_base_graph< G, T_V, T_E >::graph_add_edge(const T &edge) {
+Pgr_base_graph< G, T_V, T_E >::graph_add_edge(const T &edge, bool normal) {
     bool inserted;
     typename Pgr_base_graph< G, T_V, T_E >::E e;
     if ((edge.cost < 0) && (edge.reverse_cost < 0))
@@ -936,12 +952,14 @@ Pgr_base_graph< G, T_V, T_E >::graph_add_edge(const T &edge) {
         graph[e].id = edge.id;
     }
 
-    if (edge.reverse_cost >= 0) {
+    if (edge.reverse_cost >= 0
+            && (m_gType == DIRECTED
+              || (m_gType == UNDIRECTED && edge.cost != edge.reverse_cost))) {
         boost::tie(e, inserted) =
             boost::add_edge(vm_t, vm_s, graph);
 
         graph[e].cost = edge.reverse_cost;
-        graph[e].id = edge.id;
+        graph[e].id = normal? edge.id : -edge.id;
     }
 }
 
diff --git a/include/cpp_common/signalhandler.h b/include/cpp_common/signalhandler.h
new file mode 100644
index 0000000..f53d8a9
--- /dev/null
+++ b/include/cpp_common/signalhandler.h
@@ -0,0 +1,154 @@
+/*PGR-GNU*****************************************************************
+
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+/*PGR-MIT******************************************************************
+ *
+ * file signalhandler.h
+ *
+ * Copyright 2014 Stephen Woodbridge <woodbri at imaptools.com>
+ * Copyright 2014 Vicky Vergara <vicky_vergara at hotmail.com>
+ *
+ * This is free software; you can redistribute and/or modify it under
+ * the terms of the MIT License. Please file MIT-LICENSE for details.
+ *
+ *****************************************************************PGR-MIT*/
+
+#ifndef INCLUDE_CPP_COMMON_SIGNALHANDLER_H_
+#define INCLUDE_CPP_COMMON_SIGNALHANDLER_H_
+#pragma once
+
+// defines NULL
+#include <stddef.h>
+#include <csignal>
+#include <exception>
+
+// #include "./pgr_assert.h"
+
+class UserQuitException: public std::exception {
+ private:
+  const char *str;    ///< str Holds the what() string for the exception.
+
+ public:
+  virtual const char *what() const throw() {
+    return str;
+  }
+
+  explicit UserQuitException(const char *_str): str(_str) {}
+};
+
+
+class EventHandler {
+ public:
+  // Hook method for the signal hook method.
+  virtual void handleSignal(int signum) = 0;
+
+  // ... other hook methods for other types of
+  // events such as timers, I/O, and
+  // synchronization objects.
+};
+
+
+class SignalHandler {
+ public:
+  // Entry point.
+  static SignalHandler *instance(void);
+
+  // Register an event handler <eh> for <signum>
+  // and return a pointer to any existing <EventHandler>
+  // that was previously registered to handle <signum>.
+  EventHandler *registerHandler(int signum, EventHandler *eh);
+
+  // Remove the <EventHandler> for <signum>
+  // by setting the slot in the <signalHandlers_>
+  // table to NULL.
+  void removeHandler(int signum);
+
+ private:
+  // Ensure we're a Singleton.
+  SignalHandler(void) {}
+
+  // Singleton pointer.
+  static SignalHandler *instance_;
+
+  // Entry point adapter installed into <sigaction>
+  // (must be a static method or a stand-alone
+  // extern "C" function).
+  static void dispatcher(int signum);
+
+  // Table of pointers to concrete <EventHandler>s
+  // registered by applications.  NSIG is the number of
+  // signals defined in </usr/include/sys/signal.h>.
+  static EventHandler *signalHandlers_[NSIG];
+};
+
+
+// ---------------------------------------------------------
+// -- some concrete signal handlers
+// ---------------------------------------------------------
+
+class SIGINT_Handler: public EventHandler {
+ public:
+  SIGINT_Handler(void): graceful_quit_(0) {}
+
+  // Hook method.
+  virtual void handleSignal(int signum) {
+    if (signum == SIGINT) this->graceful_quit_ =  1;
+  }
+
+  // Accessor.
+  sig_atomic_t gracefulQuit(void) { return this->graceful_quit_;}
+
+ private:
+  sig_atomic_t graceful_quit_;
+};
+
+
+class SIGQUIT_Handler: public EventHandler {
+ public:
+  SIGQUIT_Handler(void): abortive_quit_(0) {}
+
+  // Hook method.
+  virtual void handleSignal(int signum) {
+    if (signum == SIGQUIT) this->abortive_quit_ =  1;
+  }
+
+  // Accessor.
+  sig_atomic_t abortiveQuit(void) { return this->abortive_quit_;}
+
+ private:
+  sig_atomic_t abortive_quit_;
+};
+
+
+#define REG_SIGINT SIGINT_Handler sigint_handler; \
+    SignalHandler::instance()->registerHandler(SIGINT, &sigint_handler);
+
+#define REG_SIGQUIT SIGQUIT_Handler sigquit_handler; \
+    SignalHandler::instance()->registerHandler(SIGQUIT, &sigquit_handler);
+
+#define THROW_ON_SIGINT do { \
+    if ( sigint_handler.gracefulQuit() == 1 ) \
+        throw(UserQuitException("Abort on User Request!")); \
+    } while (0);
+
+#endif  // INCLUDE_CPP_COMMON_SIGNALHANDLER_H_
+
diff --git a/include/dijkstra/pgr_dijkstraVia.hpp b/include/dijkstra/pgr_dijkstraVia.hpp
new file mode 100644
index 0000000..131f815
--- /dev/null
+++ b/include/dijkstra/pgr_dijkstraVia.hpp
@@ -0,0 +1,124 @@
+/*PGR-GNU*****************************************************************
+File: pgr_dijkstraVia.hpp
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+
+Function's developer: 
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#ifndef INCLUDE_DIJKSTRA_PGR_DIJKSTRAVIA_HPP_
+#define INCLUDE_DIJKSTRA_PGR_DIJKSTRAVIA_HPP_
+#pragma once
+
+#include <sstream>
+#include <deque>
+#include <vector>
+
+#include "dijkstra/pgr_dijkstra.hpp"
+
+#include "cpp_common/pgr_assert.h"
+
+
+namespace pgRouting {
+
+template <class G>
+void
+pgr_dijkstraVia(
+        G &graph,
+        const std::vector< int64_t > via_vertices,
+        std::deque< Path > &paths,
+        bool strict,
+        bool U_turn_on_edge,
+        std::ostringstream &log) {
+    if (via_vertices.size() == 0) {
+        return;
+    }
+
+    paths.clear();
+    int64_t prev_vertex = via_vertices[0];
+    Path path;
+
+    int64_t i = 0;
+    for (const auto &vertex : via_vertices) {
+        if (i == 0) {
+            prev_vertex = vertex; ++i;
+            continue;
+        }
+
+        // Delete U Turn edges only valid for paths that are not the first path
+        if (!U_turn_on_edge && i > 1) {
+            /*
+             * Can only delete if there was a path,
+             * that is at least one edge size
+             */
+            if (path.size() > 1) {
+                /*
+                 * Delete from the graph the last edge if its outgoing also
+                 * edge to be removed = second to last edge path[i].edge;
+                 */
+                int64_t edge_to_be_removed = path[path.size() - 2].edge;
+                int64_t last_vertex_of_path = prev_vertex;
+
+                // and the current vertex is not a dead end
+                if (graph.out_degree(last_vertex_of_path) > 1) {
+                    log << "\ndeparting from " << last_vertex_of_path
+                        << " deleting edge " << edge_to_be_removed << "\n";
+                    graph.disconnect_out_going_edge(
+                            last_vertex_of_path,
+                            edge_to_be_removed);
+                }
+            }
+        }
+
+        log << "\nfrom " << prev_vertex << " to " << vertex;
+        path = pgr_dijkstra(graph, prev_vertex, vertex);
+
+        if (!U_turn_on_edge && i > 1) {
+            graph.restore_graph();
+            if (path.empty()) {
+                /*
+                 *  no path was found with the deleted edge
+                 *  try with the edge back in the graph
+                 */
+                log << "\nEmpty so again from "
+                    << prev_vertex << " to " << vertex;
+                path = pgr_dijkstra(graph, prev_vertex, vertex);
+            }
+        }
+
+        if (strict && path.empty()) {
+            paths.clear();
+            return;
+        }
+        paths.push_back(path);
+
+        /*
+         * got to the next
+         */
+        prev_vertex = vertex; ++i;
+    }
+}
+
+
+}  // namespace pgRouting
+
+#endif  // INCLUDE_DIJKSTRA_PGR_DIJKSTRAVIA_HPP_
diff --git a/include/dijkstraTRSP/pgr_dijkstraTRSP.hpp b/include/dijkstraTRSP/pgr_dijkstraTRSP.hpp
index d857f01..1f12e08 100644
--- a/include/dijkstraTRSP/pgr_dijkstraTRSP.hpp
+++ b/include/dijkstraTRSP/pgr_dijkstraTRSP.hpp
@@ -27,9 +27,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #pragma once
 
 #include "dijkstra/pgr_dijkstra.hpp"
-#include "c_types/line_graph_rt.h"
-
-#include "lineGraph/pgr_lineGraph.hpp"
 
 #include <sstream>
 #include <deque>
@@ -37,6 +34,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #include <set>
 #include <limits>
 
+#include "c_types/line_graph_rt.h"
+#include "lineGraph/pgr_lineGraph.hpp"
 #include "cpp_common/pgr_assert.h"
 #include "cpp_common/basePath_SSEC.hpp"
 
@@ -53,11 +52,13 @@ class Pgr_dijkstraTRSP {
              bool only_cost,
              bool strict);
      void clear();
+
  private:
      void executeDijkstraTRSP(G& graph);
      void getDijkstraSolution(G& graph);
      bool has_restriction();
      bool has_a_restriction(int64_t edge, int64_t index);
+
  private:
      typedef typename G::V V;
      V v_source;
@@ -102,7 +103,7 @@ Pgr_dijkstraTRSP< G >::dijkstraTRSP(
     m_restrictions = restrictions;
     m_strict = strict;
     executeDijkstraTRSP(graph);
-    if (curr_result_path.size() or graph.m_gType == UNDIRECTED)
+    if (curr_result_path.size() || graph.m_gType == UNDIRECTED)
         return curr_result_path;
 
 #if 0
@@ -148,8 +149,8 @@ bool Pgr_dijkstraTRSP< G >::has_a_restriction(int64_t edge, int64_t index) {
         bool okay = true;
         size_t temp_edge_index = index;
 
-        for (auto &edge_id: r_edges) {
-            if (temp_edge_index >= m_edges_in_path.size() or
+        for (auto &edge_id : r_edges) {
+            if (temp_edge_index >= m_edges_in_path.size() ||
                 m_edges_in_path[temp_edge_index] != edge_id) {
                 okay = false;
                 break;
@@ -173,10 +174,10 @@ bool Pgr_dijkstraTRSP< G >::has_restriction() {
     std::stable_sort(m_restrictions.begin(), m_restrictions.end(),
         sort_cmp);
     log << "\nRestriction array after sorting.\n";
-    for (auto &it: m_restrictions) log << it << "\n";
+    for (auto &it : m_restrictions) log << it << "\n";
     log << "\nEnd\n";
     size_t index = 0;
-    for (auto &edge: m_edges_in_path) {
+    for (auto &edge : m_edges_in_path) {
         if (has_a_restriction(edge, index))
             return true;
         index++;
@@ -190,15 +191,15 @@ void Pgr_dijkstraTRSP< G >::executeDijkstraTRSP(G& graph) {
     getDijkstraSolution(graph);
     log << curr_result_path;
 
-    for (auto &path: curr_result_path) {
+    for (auto &path : curr_result_path) {
         m_edges_in_path.push_back(path.edge);
     }
-    while (m_edges_in_path.size() and m_edges_in_path.back() == -1) {
+    while (m_edges_in_path.size() && m_edges_in_path.back() == -1) {
         m_edges_in_path.pop_back();
     }
 
     log << "Edges in m_edges_in_path:-------------------\n";
-    for(auto &it: m_edges_in_path) log << it << "\n";
+    for (auto &it : m_edges_in_path) log << it << "\n";
     log << "---------------------------------------------\n";
     bool sol = has_restriction();
     log << "Result of valid solution: " << sol << "\n";
diff --git a/include/dijkstraTRSP/restriction.h b/include/dijkstraTRSP/restriction.h
index 1842a99..b6447d9 100644
--- a/include/dijkstraTRSP/restriction.h
+++ b/include/dijkstraTRSP/restriction.h
@@ -23,8 +23,8 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 ********************************************************************PGR-GNU*/
 
-#ifndef INCLUDE_DIJKSTRATRSP_RESTRICTION_H
-#define INCLUDE_DIJKSTRATRSP_RESTRICTION_H
+#ifndef INCLUDE_DIJKSTRATRSP_RESTRICTION_H_
+#define INCLUDE_DIJKSTRATRSP_RESTRICTION_H_
 #pragma once
 
 #include <sstream>
@@ -36,14 +36,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #include "c_types/restrict_t.h"
 
 class Restriction {
-    private:
+ private:
         int64_t m_id;
         std::vector< int64_t > m_restrict_edges;
         double m_cost;
 
-    public:
+ public:
         Restriction() = default;
-        Restriction(const Restrict_t &r);
+        explicit Restriction(const Restrict_t &r);
 
         int64_t id() const {return m_id;}
         void id(const int64_t& value) {m_id = value;}
@@ -52,14 +52,19 @@ class Restriction {
         void cost(const double& value) {m_cost = value;}
 
         std::vector< int64_t > restrict_edges() const {return m_restrict_edges;}
-        void restrict_edges(const int64_t& value) {m_restrict_edges.push_back(value);}
+
+        void restrict_edges(const int64_t& value) {
+            m_restrict_edges.push_back(value);
+        }
+
         void clear() {
             m_restrict_edges.clear();
         }
 
         int64_t restriction_size() const {return m_restrict_edges.size();}
 
-        friend std::ostream& operator << (std::ostream &log, const Restriction &r);
+        friend std::ostream& operator << (std::ostream &log,
+             const Restriction &r);
 };
 
-#endif // INCLUDE_DIJKSTRATRSP_RESTRICTION_H
+#endif  // INCLUDE_DIJKSTRATRSP_RESTRICTION_H_
diff --git a/include/drivers/allpairs/johnson_driver.h b/include/drivers/allpairs/johnson_driver.h
index 01f7ee0..a859423 100644
--- a/include/drivers/allpairs/johnson_driver.h
+++ b/include/drivers/allpairs/johnson_driver.h
@@ -46,6 +46,7 @@ do_pgr_johnson(
         bool directed,
         Matrix_cell_t **return_tuples,
         size_t *return_count,
+        char ** log_msg,
         char ** err_msg);
 
 
diff --git a/include/drivers/alpha_shape/alpha_driver.h b/include/drivers/alpha_shape/alpha_driver.h
new file mode 100644
index 0000000..f676699
--- /dev/null
+++ b/include/drivers/alpha_shape/alpha_driver.h
@@ -0,0 +1,49 @@
+/*PGR-GNU*****************************************************************
+FILE: alpha.h
+
+Copyright (c) 2006 Anton A. Patrushev, Orkney, Inc.
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#ifndef INCLUDE_DRIVERS_ALPHA_SHAPE_ALPHA_DRIVER_H_
+#define INCLUDE_DRIVERS_ALPHA_SHAPE_ALPHA_DRIVER_H_
+#pragma once
+
+#include <stddef.h>
+
+typedef struct vertex {
+  double x;
+  double y;
+} vertex_t;
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+  int alpha_shape(vertex_t *vertices, size_t count, double alpha,
+                  vertex_t **res, size_t *res_count, char **err_msg);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif  // INCLUDE_DRIVERS_ALPHA_SHAPE_ALPHA_DRIVER_H_
diff --git a/include/drivers/astar/astar_driver.h b/include/drivers/astar/astar_driver.h
index 731fee0..120c4ea 100644
--- a/include/drivers/astar/astar_driver.h
+++ b/include/drivers/astar/astar_driver.h
@@ -38,11 +38,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 extern "C" {
 #endif
 
-    void check_parameters(
-            int heuristic,
-            double factor,
-            double epsilon);
-
     /*********************************************************
       edges_sql TEXT,
       vertex_table TEXT,
diff --git a/include/drivers/contraction/contractGraph_driver.h b/include/drivers/contraction/contractGraph_driver.h
index bd85cce..5fc4fac 100644
--- a/include/drivers/contraction/contractGraph_driver.h
+++ b/include/drivers/contraction/contractGraph_driver.h
@@ -26,8 +26,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 ********************************************************************PGR-GNU*/
 
-#ifndef SRC_CONTRACTION_SRC_CONTRACTGRAPH_DRIVER_H_
-#define SRC_CONTRACTION_SRC_CONTRACTGRAPH_DRIVER_H_
+#ifndef INCLUDE_DRIVERS_CONTRACTION_CONTRACTGRAPH_DRIVER_H_
+#define INCLUDE_DRIVERS_CONTRACTION_CONTRACTGRAPH_DRIVER_H_
 #pragma once
 
 #include "c_types/contracted_rt.h"
@@ -65,4 +65,4 @@ extern "C" {
 }
 #endif
 
-#endif  // SRC_CONTRACTION_SRC_CONTRACTGRAPH_DRIVER_H_
+#endif  // INCLUDE_DRIVERS_CONTRACTION_CONTRACTGRAPH_DRIVER_H_
diff --git a/include/drivers/lineGraph/lineGraphFull_driver.h b/include/drivers/lineGraph/lineGraphFull_driver.h
new file mode 100644
index 0000000..6175e7a
--- /dev/null
+++ b/include/drivers/lineGraph/lineGraphFull_driver.h
@@ -0,0 +1,56 @@
+/*PGR-GNU*****************************************************************
+File: lineGraphFull_driver.h
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer:
+Copyright (c) 2017 Anthony Nicola Tasca
+Mail: atasca10 at gmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#ifndef INCLUDE_DRIVERS_LINEGRAPH_LINEGRAPHFULL_DRIVER_H_
+#define INCLUDE_DRIVERS_LINEGRAPH_LINEGRAPHFULL_DRIVER_H_
+#pragma once
+
+#include "c_types/pgr_edge_t.h"
+#include "c_types/line_graph_full_rt.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    void
+        do_pgr_lineGraphFull(
+                pgr_edge_t  *data_edges,
+                size_t total_edges,
+                Line_graph_full_rt **return_tuples,
+                size_t *return_count,
+                char ** log_msg,
+                char ** notice_msg,
+                char ** err_msg);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  // INCLUDE_DRIVERS_LINEGRAPH_LINEGRAPHFULL_DRIVER_H_
diff --git a/include/drivers/max_flow/edge_disjoint_paths_driver.h b/include/drivers/max_flow/edge_disjoint_paths_driver.h
new file mode 100644
index 0000000..797a82d
--- /dev/null
+++ b/include/drivers/max_flow/edge_disjoint_paths_driver.h
@@ -0,0 +1,62 @@
+/*PGR-GNU*****************************************************************
+File: edge_disjoint_paths_many_to_one_driver.h
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer:
+Copyright (c) 2016 Andrea Nardelli
+Mail: nrd.nardelli at gmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#ifndef INCLUDE_DRIVERS_MAX_FLOW_EDGE_DISJOINT_PATHS_DRIVER_H_
+#define INCLUDE_DRIVERS_MAX_FLOW_EDGE_DISJOINT_PATHS_DRIVER_H_
+#pragma once
+
+#include "c_types/pgr_edge_t.h"
+#include "c_types/general_path_element_t.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    void
+        do_pgr_edge_disjoint_paths(
+            pgr_edge_t *data_edges,
+            size_t total_tuples,
+            int64_t *source_vertices,
+            size_t size_source_verticesArr,
+            int64_t *sink_vertices,
+            size_t size_sink_verticesArr,
+            bool directed,
+            General_path_element_t **return_tuples,
+            size_t *return_count,
+            char** log_msg,
+            char** notice_msg,
+            char** err_msg);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  // INCLUDE_DRIVERS_MAX_FLOW_EDGE_DISJOINT_PATHS_DRIVER_H_
diff --git a/include/drivers/max_flow/max_flow_driver.h b/include/drivers/max_flow/max_flow_driver.h
new file mode 100644
index 0000000..263a8cf
--- /dev/null
+++ b/include/drivers/max_flow/max_flow_driver.h
@@ -0,0 +1,62 @@
+/*PGR-GNU*****************************************************************
+File: max_flow_many_to_many_driver.h
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer:
+Copyright (c) 2016 Andrea Nardelli
+Mail: nrd.nardelli at gmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#ifndef INCLUDE_DRIVERS_MAX_FLOW_MAX_FLOW_DRIVER_H_
+#define INCLUDE_DRIVERS_MAX_FLOW_MAX_FLOW_DRIVER_H_
+#pragma once
+
+#include "c_types/pgr_flow_t.h"
+#include "c_types/pgr_edge_t.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    void
+        do_pgr_max_flow(
+            pgr_edge_t *data_edges,
+            size_t total_tuples,
+            int64_t* source_vertices,
+            size_t size_source_verticesArr,
+            int64_t* sink_vertices,
+            size_t size_sink_verticesArr,
+            int algorithm,
+            bool only_flow,
+            pgr_flow_t **return_tuples,
+            size_t *return_count,
+            char** log_msg,
+            char** notice_msg,
+            char** err_msg);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  // INCLUDE_DRIVERS_MAX_FLOW_MAX_FLOW_DRIVER_H_
diff --git a/include/drivers/max_flow/maximum_cardinality_matching_driver.h b/include/drivers/max_flow/maximum_cardinality_matching_driver.h
new file mode 100644
index 0000000..696aa8e
--- /dev/null
+++ b/include/drivers/max_flow/maximum_cardinality_matching_driver.h
@@ -0,0 +1,58 @@
+/*PGR-GNU*****************************************************************
+File: maximum_cardinality_matching_driver.h
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer:
+Copyright (c) 2016 Andrea Nardelli
+Mail: nrd.nardelli at gmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#ifndef INCLUDE_DRIVERS_MAX_FLOW_MAXIMUM_CARDINALITY_MATCHING_DRIVER_H_
+#define INCLUDE_DRIVERS_MAX_FLOW_MAXIMUM_CARDINALITY_MATCHING_DRIVER_H_
+#pragma once
+
+#include "c_types/pgr_basic_edge_t.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    void
+        do_pgr_maximum_cardinality_matching(
+            pgr_basic_edge_t *data_edges,
+            size_t total_edges,
+            bool directed,
+
+            pgr_basic_edge_t **return_tuples,
+            size_t *return_count,
+
+            char** log_msg,
+            char** notice_msg,
+            char **err_msg);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  // INCLUDE_DRIVERS_MAX_FLOW_MAXIMUM_CARDINALITY_MATCHING_DRIVER_H_
diff --git a/include/drivers/trsp/trsp_driver.h b/include/drivers/trsp/trsp_driver.h
new file mode 100644
index 0000000..560c4a7
--- /dev/null
+++ b/include/drivers/trsp/trsp_driver.h
@@ -0,0 +1,67 @@
+/*PGR-GNU*****************************************************************
+File: trsp_driver.h
+
+Shortest path with turn restrictions algorithm for PostgreSQL
+
+Copyright (c) 2017 pgRouting developers
+Copyright (c) 2011 Stephen Woodbridge
+
+-------------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#ifndef INCLUDE_DRIVERS_TRSP_TRSP_DRIVER_H_
+#define INCLUDE_DRIVERS_TRSP_TRSP_DRIVER_H_
+
+
+#include "c_types/trsp_types.h"
+#include "c_types/pgr_edge_t.h"
+#include "c_types/restriction_t.h"
+#include "c_types/general_path_element_t.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    void do_trsp(
+            pgr_edge_t *edges,
+            size_t edge_count,
+
+            Restriction_t *restrictions,
+            size_t restrictions_size,
+
+            int64_t  *start_vidsArr,
+            size_t size_start_vidsArr,
+
+            int64_t  *end_vidsArr,
+            size_t size_end_vidsArr,
+
+            bool directed,
+
+            General_path_element_t **return_tuples,
+            size_t *return_count,
+
+            char **log_msg,
+            char **notice_msg,
+            char **err_msg);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  // INCLUDE_DRIVERS_TRSP_TRSP_DRIVER_H_
diff --git a/include/lineGraph/pgr_lineGraph.hpp b/include/lineGraph/pgr_lineGraph.hpp
index 0835c0a..32a628d 100644
--- a/include/lineGraph/pgr_lineGraph.hpp
+++ b/include/lineGraph/pgr_lineGraph.hpp
@@ -23,8 +23,8 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  ********************************************************************PGR-GNU*/
 
-#ifndef INCLUDE_COMPONENTS_PGR_LINEGRAPH_HPP_
-#define INCLUDE_COMPONENTS_PGR_LINEGRAPH_HPP_
+#ifndef INCLUDE_LINEGRAPH_PGR_LINEGRAPH_HPP_
+#define INCLUDE_LINEGRAPH_PGR_LINEGRAPH_HPP_
 #pragma once
 
 
@@ -32,56 +32,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 #include <set>
 #include <utility>
 #include <map>
+#include <algorithm>
 
 #include "cpp_common/pgr_base_graph.hpp"
 #include "cpp_common/line_vertex.h"
-#include "dijkstraTRSP/restriction.h"
 
 namespace pgrouting {
 
 namespace graph {
-template <class G, typename T_V, typename T_E>
-class Pgr_lineGraph;
-}  // namespace graph
-
-typedef graph::Pgr_lineGraph <
-boost::adjacency_list < boost::vecS, boost::vecS,
-    boost::bidirectionalS,
-    Line_vertex, Basic_edge >,
-    Line_vertex, Basic_edge > LinearDirectedGraph;
-
-namespace graph {
 
 template <class G, typename T_V, typename T_E>
 class Pgr_lineGraph : public Pgr_base_graph<G, T_V, T_E> {
- private:
-    int64_t m_num_edges;
-    std::map < int64_t, pgr_edge_t > m_edges;
-    std::map < std::pair< int64_t, int64_t >, int64_t > m_vertex_map;
-
-    void add_vertices(std::vector< T_V > vertices);
-
-    void create_edges(const pgrouting::DirectedGraph& digraph);
-
-    template < typename T >
-        void graph_add_edge(int64_t, const T &source, const T&target, int64_t, int64_t);
-
-#if 0
-    template < typename T >
-    void disconnect_edge(const T& from, const T& to);
-
-    template < typename T >
-    void get_ids(std::vector< T >& restrictions);
-
-    void create_virtual_vertex(int64_t id);
-    void create_virtual_edge(
-            int64_t source_id,
-            int64_t source_vertex,
-            int64_t target_id,
-            int64_t target_vertex
-        );
-#endif
-
  public:
     typedef typename boost::graph_traits < G >::vertex_descriptor V;
     typedef typename boost::graph_traits < G >::edge_descriptor E;
@@ -89,65 +50,17 @@ class Pgr_lineGraph : public Pgr_base_graph<G, T_V, T_E> {
     typedef typename boost::graph_traits < G >::out_edge_iterator EO_i;
     typedef typename boost::graph_traits < G >::in_edge_iterator EI_i;
 
-    std::ostringstream log;
 
     explicit Pgr_lineGraph< G, T_V, T_E >(graphType gtype)
-         : Pgr_base_graph< G, T_V, T_E >(gtype),
-           m_num_edges(0) {
-         }
-
-    template < typename T >
-        void insert_vertices(const T* edges, int64_t count) {
-            insert_vertices(std::vector < T >(edges, edges + count));
-        }
-
-    template < typename T >
-        void insert_vertices(const std::vector < T > &edges) {
-
-            for (auto &it: edges)
-                m_edges[it.id] = it;
-            std::vector < Line_vertex > vertices = extract_vertices();
-
-#if 1
-            log << "\nVertices of line graph: \n";
-            for (auto vertex: vertices) {
-                log << vertex.id << "(" << vertex.source << " - > ";
-                log << vertex.target << ")" << vertex.cost << "\n";
-            }
-#endif
-
-            add_vertices(vertices);
+        : Pgr_base_graph< G, T_V, T_E >(gtype) {
         }
 
-#if 0
-    template < typename T >
-        std::vector< Restriction > remove_restricted_edges(std::vector< T >& restrictions) {
-            get_ids(restrictions);
-            std::vector< T > remaining;
-            for (const auto &r: restrictions) {
-                if (r.restriction_size() > 2) {
-                    remaining.push_back(r);
-                    continue;
-                }
-                disconnect_edge(r.restrict_edges()[0], r.restrict_edges()[1]);
-            }
-            return remaining;
+    Pgr_lineGraph< G, T_V, T_E >(const pgrouting::DirectedGraph &digraph)
+        : Pgr_base_graph< G, T_V, T_E >(graphType::DIRECTED) {
+            insert_vertices(digraph);
+            create_edges(digraph);
         }
-#endif
 
-    std::vector < Line_vertex > extract_vertices();
-
-    void transform(pgrouting::DirectedGraph& digraph) {
-        create_edges(digraph);
-    }
-
-#if 0
-    void create_virtual_vertices();
-#endif
-
-    int64_t num_edges() const { return m_num_edges; }
-    std::vector< Line_graph_rt > get_postgres_results_undirected();
-    std::vector< Line_graph_rt > get_postgres_results_directed();
 
     friend std::ostream& operator<<(
             std::ostream &log, const Pgr_lineGraph< G, T_V, T_E > &g) {
@@ -155,7 +68,7 @@ class Pgr_lineGraph : public Pgr_base_graph<G, T_V, T_E> {
 
         for (auto vi = vertices(g.graph).first;
                 vi != vertices(g.graph).second; ++vi) {
-            if ((*vi) >= g.m_num_vertices) break;
+            if ((*vi) >= g.num_vertices()) break;
             log << (*vi) << ": " << " out_edges_of(" << g.graph[(*vi)] << "):";
             for (boost::tie(out, out_end) = out_edges(*vi, g.graph);
                     out != out_end; ++out) {
@@ -168,425 +81,137 @@ class Pgr_lineGraph : public Pgr_base_graph<G, T_V, T_E> {
         }
         return log;
     }
-};
-
-template < class G, typename T_V, typename T_E >
-std::vector< Line_graph_rt >
-Pgr_lineGraph< G, T_V, T_E >::get_postgres_results_undirected() {
-    std::vector< Line_graph_rt > results;
-
-    typename boost::graph_traits < G >::edge_iterator edgeIt, edgeEnd;
-    int64_t count = 0;
-
-    log << "\nPostgres results\n";
-    for (boost::tie(edgeIt, edgeEnd) = boost::edges(this->graph);
-            edgeIt != edgeEnd; edgeIt++) {
-        E e = *edgeIt;
-        auto e_source = this->graph[this->source(e)].vertex_id;
-        auto e_target = this->graph[this->target(e)].vertex_id;
-
-        log << "e_source = " << e_source << " | e_target = " << e_target << "\n";
-
-        Line_graph_rt edge = {
-            ++count,
-            e_source,
-            e_target,
-            1.0,
-            -1.0
-        };
-        results.push_back(edge);
-    }
-
-    return results;
-}
-
-template < class G, typename T_V, typename T_E >
-std::vector< Line_graph_rt >
-Pgr_lineGraph< G, T_V, T_E >::get_postgres_results_directed() {
-    std::vector< Line_graph_rt > results;
 
-    typename boost::graph_traits < G >::edge_iterator edgeIt, edgeEnd;
-    std::map < std::pair<int64_t,int64_t >, Line_graph_rt > unique;
-    int64_t count = 0;
 
-    log << "\nPostgres results\n";
-    for (boost::tie(edgeIt, edgeEnd) = boost::edges(this->graph);
-            edgeIt != edgeEnd; edgeIt++) {
-        E e = *edgeIt;
-        auto e_source = this->graph[this->source(e)].vertex_id;
-        auto e_target = this->graph[this->target(e)].vertex_id;
+    std::vector< Line_graph_rt >
+        get_postgres_results_directed() {
+            std::vector< Line_graph_rt > results;
 
-        log << "e_source = " << e_source << " | e_target = " << e_target << "\n";
+            typename boost::graph_traits < G >::edge_iterator edgeIt, edgeEnd;
+            std::map < std::pair<int64_t, int64_t >, Line_graph_rt > unique;
+            int64_t count = 0;
 
-        if(unique.find( {e_target, e_source} ) != unique.end()) {
-            unique[ std::pair<int64_t,int64_t>(e_target, e_source) ].reverse_cost = 1.0;
-            continue;
-        }
-        e_source *= -1;
-        e_target *= -1;
-        if(unique.find( {e_target, e_source} ) != unique.end()) {
-            unique[ std::pair<int64_t,int64_t>(e_target, e_source) ].reverse_cost = 1.0;
-            continue;
-        }
-        e_source *= -1;
-        e_target *= -1;
-
-        Line_graph_rt edge = {
-            ++count,
-            e_source,
-            e_target,
-            1.0,
-            -1.0
-        };
-        unique[ std::pair<int64_t,int64_t>(e_source, e_target)] = edge;
-    }
-    for (const auto &edge: unique) {
-        results.push_back(edge.second);
-    }
-    return results;
-}
-
-#if 0
-template < class G, typename T_V, typename T_E >
-template < typename T >
-void
-Pgr_lineGraph< G, T_V, T_E >::get_ids(std::vector< T >& restrictions) {
-    for (auto &r: restrictions) {
-        auto restrict_edges = r.restrict_edges();
-        std::vector < int64_t > temp;
-
-        pgassert(m_edges.find(restrict_edges[0]) != m_edges.end());
-        auto prev = m_edges[restrict_edges[0]];
-
-        for (auto i = 1; i < (int64_t)restrict_edges.size(); i++) {
-            pgassert(m_edges.find(restrict_edges[i]) != m_edges.end());
-            auto cur = m_edges[restrict_edges[i]];
-
-            if (prev.target == cur.target) {
-                std::swap(cur.source, cur.target);
-                std::swap(cur.cost, cur.reverse_cost);
-            }
+            for (boost::tie(edgeIt, edgeEnd) = boost::edges(this->graph);
+                    edgeIt != edgeEnd; edgeIt++) {
+                E e = *edgeIt;
+                auto e_source = this->graph[this->source(e)].vertex_id;
+                auto e_target = this->graph[this->target(e)].vertex_id;
 
-            if(prev.source == cur.source) {
-                std::swap(prev.source, prev.target);
-                std::swap(prev.cost, prev.reverse_cost);
-            }
-
-            if(prev.source == cur.target) {
-                std::swap(prev.source, prev.target);
-                std::swap(prev.cost, prev.reverse_cost);
-                std::swap(cur.source, cur.target);
-                std::swap(cur.cost, cur.reverse_cost);
+                if (unique.find({e_target, e_source}) != unique.end()) {
+                    unique[std::pair<int64_t, int64_t>(e_target,
+                            e_source)].reverse_cost = 1.0;
+                    continue;
+                }
+                e_source *= -1;
+                e_target *= -1;
+                if (unique.find({e_target, e_source}) != unique.end()) {
+                    unique[std::pair<int64_t, int64_t>(e_target,
+                            e_source)].reverse_cost = 1.0;
+                    continue;
+                }
+                e_source *= -1;
+                e_target *= -1;
+
+                Line_graph_rt edge = {
+                    ++count,
+                    e_source,
+                    e_target,
+                    1.0,
+                    -1.0
+                };
+                unique[std::pair<int64_t, int64_t>(e_source, e_target)] = edge;
             }
-
-            pgassert(m_vertex_map.find( {prev.id, prev.source} ) != m_vertex_map.end());
-            pgassert(m_vertex_map.find( {cur.id, cur.source} ) != m_vertex_map.end());
-
-            if (temp.empty()) {
-                temp.push_back( m_vertex_map[ {prev.id, prev.source} ] );
+            for (const auto &edge : unique) {
+                results.push_back(edge.second);
             }
+            return results;
+        }
 
-            temp.push_back( m_vertex_map[ {cur.id, cur.source} ] );
-            prev = cur;
+    void insert_vertices(
+            const pgrouting::DirectedGraph& digraph) {
+        auto es = boost::edges(digraph.graph);
+        for (auto eit = es.first; eit != es.second; ++eit) {
+            auto edge = *eit;
+            Line_vertex vertex({
+                    digraph[edge].id,
+                    digraph[boost::source(edge, digraph.graph)].id,
+                    digraph[boost::target(edge, digraph.graph)].id,
+                    digraph[edge].cost,
+                    -1});
+            add_one_vertex(vertex);
         }
-        r.clear();
-        for (const auto &it: temp) r.restrict_edges(it);
     }
-}
-
-template < class G, typename T_V, typename T_E >
-template < typename T >
-void
-Pgr_lineGraph< G, T_V, T_E >::disconnect_edge(const T& from, const T& to) {
-
-    pgassert(this->vertices_map.find(from) != this->vertices_map.end());
-    pgassert(this->vertices_map.find(to) != this->vertices_map.end());
-
-    auto vm_s = this->get_V(from);
-    auto vm_t = this->get_V(to);
-
-    boost::remove_edge(vm_s, vm_t, this->graph);
-}
-
-template < class G, typename T_V, typename T_E >
-void
-Pgr_lineGraph< G, T_V, T_E >::create_virtual_vertex(int64_t id) {
-    ++(this->m_num_vertices);
-    auto v = add_vertex(this->graph);
-    this->vertices_map[this->m_num_vertices] = v;
-    this->graph[v].cp_members(this->m_num_vertices, id);
-    m_vertex_map[ {id, -1} ] = this->m_num_vertices;
-    pgassert(boost::num_vertices(this->graph) == this->num_vertices());
-}
-
-template < class G, typename T_V, typename T_E >
-void
-Pgr_lineGraph< G, T_V, T_E >::create_virtual_edge(
-        int64_t source_id,
-        int64_t source_vertex,
-        int64_t target_id,
-        int64_t target_vertex) {
-    bool inserted;
-    typename Pgr_base_graph< G, T_V, T_E >::E e;
-
-    if (source_id < 0) source_id *= -1;
-    if (target_id < 0) target_id *= -1;
-
-    pgassert(m_vertex_map.find( {source_id, source_vertex} ) !=
-        m_vertex_map.end());
-    pgassert(m_vertex_map.find( {target_id, target_vertex} ) !=
-            m_vertex_map.end());
-
-    auto index_source_edge = m_vertex_map[ {source_id, source_vertex} ];
-    auto index_target_edge = m_vertex_map[ {target_id, target_vertex} ];
-
-    auto vm_s = this->get_V(index_source_edge);
-    auto vm_t = this->get_V(index_target_edge);
-
-    boost::tie(e, inserted) =
-        boost::add_edge(vm_s, vm_t, this->graph);
-
-    ++m_num_edges;
-    this->graph[e].id = m_num_edges;
-}
-
-template < class G, typename T_V, typename T_E >
-void
-Pgr_lineGraph< G, T_V, T_E >::create_virtual_vertices() {
-    V_i vertexIt, vertexEnd;
-    boost::tie(vertexIt, vertexEnd) = boost::vertices(this->graph);
-    for (;vertexIt != vertexEnd; vertexIt++) {
-        auto vertex = this->graph[*vertexIt];
-        if (!m_vertex_map.count( {vertex.source, -1} )) {
-            create_virtual_vertex(vertex.source);
-        }
-        if(!m_vertex_map.count( {vertex.target, -1} )) {
-            create_virtual_vertex(vertex.target);
-        }
 
-        pgassert(m_vertex_map.find( {vertex.source, -1} ) !=
-            m_vertex_map.end());
-        pgassert(m_vertex_map.find( {vertex.target, -1} ) !=
-                m_vertex_map.end());
 
-        create_virtual_edge(vertex.source, -1, vertex.vertex_id, vertex.source);
-        create_virtual_edge(vertex.vertex_id, vertex.source, vertex.target, -1);
-    }
-}
-#endif
-
-template < class G, typename T_V, typename T_E >
-std::vector < Line_vertex >
-Pgr_lineGraph< G, T_V, T_E >::extract_vertices() {
-    /*
-        m_vertex_map stores a unique id assigned to each vertex of Line Graph.
-
-        In case of a directed edge, either 1 or 2 vertices are to be created in
-        the Line Graph for each of the edges.
-        Consider the following edge in directed graph:-
-            ID = 1 | source = 2 | target = 3 | cost = 10 | reverse_cost = 20
-        This creates 2 vertices in Line Graph:-
-            1. ID = 1 | source = 2 | target = 3 | cost = 10
-            2. ID = 1 | source = 3 | target = 2 | cost = 25
-        So, the values stored in m_vertex_map would be:-
-            1. {1, 2} = 1(Denoting the edge from 2 - > 3 of cost 10).
-            2. {1, 3} = 2(Denoting the edge from 3 - > 2 of cost 25).
-            where {key} = value in m_vertex_map.
-
-        In case of undirected edge, either 2 or 4 vertices are to be created in
-        the Line Graph for each of the edges.
-        Consider the following edge in an undirected graph:-
-            ID = 1 | source = 2 | target = 3 | cost = 10 | reverse_cost = 25
-        This creates the following 4 vertices in Line Graph:-
-            1. ID = 1 | source = 2 | target = 3 | cost = 10
-            2. ID = 1 | source = 3 | target = 2 | cost = 10
-            3. ID = 1 | source = 3 | target = 2 | cost = 25
-            4. ID = 1 | source = 2 | target = 3 | cost = 25
-        so, the values stored in m_vertex_map would be:-
-            1. {1, 2} = 1(Denoting the edge from 2 - > 3 of cost 10).
-            2. {-1, 3} = 2(Denoting the edge from 3 - > 2 of cost 10).
-            3. {1, 3} = 3(Deonting the edge from 3 - > 2 of cost 25).
-            4. {-1, 2} = 4(Denoting the edge from 2 - > 3 of cost 25).
-            where {key} = value in m_vertex_map.
-    */
-    if (m_edges.empty()) return std::vector< Line_vertex >();
-
-    std::vector< Line_vertex > vertices;
-
-#if 0
-    log << "\nEdges of original graph\n";
-#endif
-
-    for (const auto &it : m_edges) {
-        auto edge = it.second;
-        Line_vertex vertex(edge);
-
-#if 1
-        log << "ID: " << edge.id;
-        log << "| source: " << edge.source;
-        log << "| target: " << edge.target;
-        log << "| cost: " << edge.cost;
-        log << "| reverse_cost: " << edge.reverse_cost << "\n\n";
-#endif
-
-        if (edge.cost > 0) {
-            vertex.id = (++(this->m_num_vertices));
-            vertices.push_back(vertex);
-            m_vertex_map[ std::pair<int64_t,int64_t>(edge.id, edge.source) ] = this->m_num_vertices;
-
-            if (this->m_gType == UNDIRECTED) {
-                vertex.id = (++(this->m_num_vertices));
-                std::swap(vertex.source, vertex.target);
-                vertices.push_back(vertex);
-                m_vertex_map[std::pair<int64_t,int64_t>(-1*edge.id, edge.target)] = this->m_num_vertices;
-                std::swap(vertex.source, vertex.target);
-            }
-        }
 
-        if (edge.reverse_cost > 0) {
-            vertex.id = (++(this->m_num_vertices));
-            vertex.cost = edge.reverse_cost;
-            vertex.vertex_id *= -1;
-            std::swap(vertex.source, vertex.target);
-            vertices.push_back(vertex);
-            m_vertex_map[ std::pair<int64_t,int64_t>(edge.id, edge.target) ] = this->m_num_vertices;
-
-            if (this->m_gType == UNDIRECTED) {
-                vertex.id = (++(this->m_num_vertices));
-                std::swap(vertex.source, vertex.target);
-                vertices.push_back(vertex);
-                m_vertex_map[std::pair<int64_t,int64_t>(-1*edge.id, edge.source)] = this->m_num_vertices;
-            }
-        }
-    }
-#if 0
-    for (auto it: m_vertex_map) {
-        log << it.first.first << " | " << it.first.second << " | " << it.second << "\n";
-    }
-#endif
-    return vertices;
-}
-
-template < class G, typename T_V, typename T_E >
-template < typename T>
-void
-Pgr_lineGraph< G, T_V, T_E >::graph_add_edge(
-        int64_t _id,
-        const T &source,
-        const T &target,
-        int64_t source_in_edge,
-        int64_t source_out_edge) {
-
-    bool inserted;
-    typename Pgr_base_graph< G, T_V, T_E >::E e;
-
-    pgassert(m_vertex_map.find( {source, source_in_edge} ) !=
-        m_vertex_map.end());
-    pgassert(m_vertex_map.find( {target, source_out_edge} ) !=
-            m_vertex_map.end());
-
-    auto index_source_edge = m_vertex_map[ std::pair<int64_t,int64_t>(source, source_in_edge) ];
-    auto index_target_edge = m_vertex_map[ std::pair<int64_t,int64_t>(target, source_out_edge) ];
-
-#if 0
-    log << "\nsource_in_edge = " << source_in_edge << " | "
-        << "source_out_edge = " << source_out_edge << " | "
-        << "index_source_edge = " << index_source_edge << " | "
-        << "index_target_edge = " << index_target_edge << " | "
-        << "edge.source = " << source << " | "
-        << "edge.target = " << target << "\n";
-#endif
-
-    auto vm_s = this->get_V(index_source_edge);
-    auto vm_t = this->get_V(index_target_edge);
-
-    pgassert(this->vertices_map.find(index_source_edge) != this->vertices_map.end());
-    pgassert(this->vertices_map.find(index_target_edge) != this->vertices_map.end());
-
-    boost::tie(e, inserted) =
-        boost::add_edge(vm_s, vm_t, this->graph);
-
-    this->graph[e].id = _id;
-}
-
-template < class G, typename T_V, typename T_E >
-void
-Pgr_lineGraph< G, T_V, T_E >::create_edges(
-        const pgrouting::DirectedGraph& digraph) {
-
-    V_i vertexIt, vertexEnd;
-    EO_i e_outIt, e_outEnd;
-    EI_i e_inIt, e_inEnd;
-
-    /*
-    for (each vertex v in original graph) {
-       for( all incoming edges inn to vertex v) {
-              for( all outgoing edges outt from vertex v) {
-                     create an edge in the line graph(inn, outt);
-             }
-       }
-   }
-    */
-
-    for(boost::tie(vertexIt, vertexEnd) = boost::vertices(digraph.graph);
-            vertexIt != vertexEnd; vertexIt++) {
-        V vertex = *vertexIt;
-
-        for (boost::tie(e_outIt, e_outEnd) = boost::out_edges(vertex, digraph.graph);
-                e_outIt != e_outEnd; e_outIt++) {
-            for (boost::tie(e_inIt, e_inEnd) = boost::in_edges(vertex, digraph.graph);
-                    e_inIt != e_inEnd; e_inIt++) {
-
-#if 0
-                log << "\n";
-                log << digraph.graph[*inIt].id << " | " << digraph[digraph.source(*inIt)].id << " | " << digraph[digraph.target(*inIt)].id << " | " << digraph.graph[*inIt].cost << "\n";
-                log << digraph.graph[*outIt].id << " | " << digraph[digraph.source(*outIt)].id << " | " << digraph[digraph.target(*outIt)].id << " | " << digraph.graph[*outIt].cost << "\n\n";
-#endif
-
-                /*
-                Prevent self-edges from being created in the Line Graph
-                */
-                if (labs(digraph.graph[*e_inIt].id) == labs(digraph.graph[*e_outIt].id))
-                    continue;
+ private:
+    template < typename T>
+        void
+        graph_add_edge(
+                const T &source,
+                const T &target) {
+            bool inserted;
+            E e;
 
-                auto source_in_edge = digraph.source(*e_inIt);
+            auto vm_s = this->get_V(source);
+            auto vm_t = this->get_V(target);
 
-#if 0
-                log << "source = " << digraph[source_in_edge] << " | mid = " << digraph[vertex] << "\n\n\n";
-#endif
+            boost::tie(e, inserted) =
+                boost::add_edge(vm_s, vm_t, this->graph);
 
-                ++m_num_edges;
+            this->graph[e].id = this->num_edges();
+        }
 
-                graph_add_edge(
-                    m_num_edges,
-                    (digraph.graph[*e_inIt]).id,
-                    (digraph.graph[*e_outIt]).id,
-                    digraph[source_in_edge].id,
-                    digraph[vertex].id
-                );
+    void create_edges(
+            const pgrouting::DirectedGraph& digraph) {
+        V_i vertexIt, vertexEnd;
+        EO_i e_outIt, e_outEnd;
+        EI_i e_inIt, e_inEnd;
+
+
+        /* for (each vertex v in original graph) */
+        for (boost::tie(vertexIt, vertexEnd) = boost::vertices(digraph.graph);
+                vertexIt != vertexEnd; vertexIt++) {
+            auto vertex = *vertexIt;
+
+           /* for( all incoming edges in to vertex v) */
+            for (boost::tie(e_outIt, e_outEnd) =
+                    boost::out_edges(vertex, digraph.graph);
+                    e_outIt != e_outEnd;
+                    e_outIt++) {
+                /* for( all outgoing edges out from vertex v) */
+                for (boost::tie(e_inIt, e_inEnd) =
+                        boost::in_edges(vertex, digraph.graph);
+                        e_inIt != e_inEnd; e_inIt++) {
+                    /*
+                       Prevent self-edges from being created in the Line Graph
+                       */
+
+                    graph_add_edge(
+                            (digraph.graph[*e_inIt]).id,
+                            (digraph.graph[*e_outIt]).id);
+                }
             }
         }
     }
-}
-
-template < class G, typename T_V, typename T_E >
- void
- Pgr_lineGraph< G, T_V, T_E >::add_vertices(
-         std::vector< T_V > vertices) {
 
-     for (const auto vertex : vertices) {
-         pgassert(this->vertices_map.find(vertex.id) == this->vertices_map.end());
+    V add_one_vertex(
+            T_V vertex) {
+        auto v =  add_vertex(this->graph);
+        this->vertices_map[vertex.id] = v;
+        this->graph[v].cp_members(vertex);
 
-         auto v =  add_vertex(this->graph);
-         this->vertices_map[vertex.id] = v;
-         this->graph[v].cp_members(vertex);
+        pgassert(boost::num_vertices(this->graph) == this->num_vertices());
+        return v;
+    }
 
-         pgassert(boost::num_vertices(this->graph) == this->num_vertices());
-     }
-     return;
- }
+ private:
+    std::map < int64_t, pgr_edge_t > m_edges;
 
+ public:
+    std::ostringstream log;
+};
 }  // namespace graph
 }  // namespace pgrouting
 
-#endif  // INCLUDE_COMPONENTS_PGR_LINEGRAPH_HPP_
+#endif  // INCLUDE_LINEGRAPH_PGR_LINEGRAPH_HPP_
diff --git a/include/lineGraph/pgr_lineGraphFull.hpp b/include/lineGraph/pgr_lineGraphFull.hpp
new file mode 100644
index 0000000..24e2a9f
--- /dev/null
+++ b/include/lineGraph/pgr_lineGraphFull.hpp
@@ -0,0 +1,303 @@
+/*PGR-GNU*****************************************************************
+File: pgr_lineGraphFull.hpp
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer:
+Copyright (c) 2017 Anthony Nicola Tasca
+Mail: atasca10 at gmail.com
+
+------
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ ********************************************************************PGR-GNU*/
+
+#ifndef INCLUDE_LINEGRAPH_PGR_LINEGRAPHFULL_HPP_
+#define INCLUDE_LINEGRAPH_PGR_LINEGRAPHFULL_HPP_
+#pragma once
+
+
+#include <vector>
+#include <set>
+#include <utility>
+#include <map>
+
+#include "cpp_common/pgr_base_graph.hpp"
+#include "cpp_common/line_vertex.h"
+
+namespace pgrouting {
+namespace graph {
+
+template <class G, typename T_V, typename T_E>
+class Pgr_lineGraphFull : public Pgr_base_graph<G, T_V, T_E> {
+ public:
+    typedef typename boost::graph_traits < G >::vertex_descriptor V;
+    typedef typename boost::graph_traits < G >::edge_descriptor E;
+    typedef typename boost::graph_traits < G >::vertex_iterator V_i;
+    typedef typename boost::graph_traits < G >::edge_iterator E_i;
+    typedef typename boost::graph_traits < G >::out_edge_iterator EO_i;
+    typedef typename boost::graph_traits < G >::in_edge_iterator EI_i;
+
+
+    explicit Pgr_lineGraphFull< G, T_V, T_E >(graphType gtype)
+        : Pgr_base_graph< G, T_V, T_E >(gtype) {
+        }
+
+    Pgr_lineGraphFull< G, T_V, T_E >(const pgrouting::DirectedGraph &digraph)
+        : Pgr_base_graph< G, T_V, T_E >(graphType::DIRECTED) {
+            apply_transformation(digraph);
+            store_edge_costs(digraph);
+        }
+
+    friend std::ostream& operator<<(
+            std::ostream &log, const Pgr_lineGraphFull< G, T_V, T_E > &g) {
+        typename Pgr_base_graph< G, T_V, T_E >::EO_i out, out_end;
+
+        for (auto vi = vertices(g.graph).first;
+                vi != vertices(g.graph).second; ++vi) {
+            if ((*vi) >= g.num_vertices()) break;
+            log << (*vi) << ": " << " out_edges_of(" << g.graph[(*vi)] << "):";
+            for (boost::tie(out, out_end) = out_edges(*vi, g.graph);
+                    out != out_end; ++out) {
+                log << ' '
+                    << g.graph[*out].id << "=("
+                    << g[g.source(*out)].id << ", "
+                    << g[g.target(*out)].id << ")\t";
+            }
+            log << std::endl;
+        }
+        return log;
+    }
+
+    std::vector< Line_graph_full_rt >
+        get_postgres_results_directed() {
+            std::vector< Line_graph_full_rt > results;
+
+            typename boost::graph_traits < G >::edge_iterator edgeIt, edgeEnd;
+            std::map <
+                std::pair<int64_t, int64_t >,
+                Line_graph_full_rt > unique;
+            auto count = 0;
+            auto vertex_count = 0;
+            std::map < int64_t, int64_t > vertex_id_map;
+            std::map < int64_t, int64_t > vertex_id_reverse_map;
+
+            log << "\nPostgres results\n";
+            for (boost::tie(edgeIt, edgeEnd) = boost::edges(this->graph);
+                    edgeIt != edgeEnd; edgeIt++) {
+                E e = *edgeIt;
+                auto e_source = this->graph[this->source(e)].vertex_id;
+                auto e_target = this->graph[this->target(e)].vertex_id;
+
+                auto target_vertex_edge_pair = m_transformation_map[e_target];
+                auto target_vertex_id = target_vertex_edge_pair.first;
+                auto target_edge_id = target_vertex_edge_pair.second;
+                auto source_vertex_edge_pair = m_transformation_map[e_source];
+                auto source_vertex_id = source_vertex_edge_pair.first;
+                auto source_edge_id = source_vertex_edge_pair.second;
+
+                int64_t edge_id = 0;
+                auto e_cost = 0.0;
+                if (source_edge_id == target_edge_id) {
+                    e_cost = m_edge_costs[source_edge_id];
+                    edge_id = source_edge_id;
+                }
+
+                if (vertex_id_map.find(e_source) == vertex_id_map.end()) {
+                    if (vertex_id_reverse_map.find(source_vertex_id) ==
+                      vertex_id_reverse_map.end()) {
+                        vertex_id_map[e_source] = source_vertex_id;
+                        vertex_id_reverse_map[source_vertex_id] = e_source;
+                    } else {
+                        --vertex_count;
+                        vertex_id_map[e_source] = vertex_count;
+                        vertex_id_reverse_map[vertex_count] = e_source;
+                    }
+                }
+
+                if (vertex_id_map.find(e_target) == vertex_id_map.end()) {
+                    if (vertex_id_reverse_map.find(target_vertex_id) ==
+                      vertex_id_reverse_map.end()) {
+                        vertex_id_map[e_target] = target_vertex_id;
+                        vertex_id_reverse_map[target_vertex_id] = e_target;
+                    } else {
+                        --vertex_count;
+                        vertex_id_map[e_target] = vertex_count;
+                        vertex_id_reverse_map[vertex_count] = e_target;
+                    }
+                }
+
+#if 0
+                log << "e_source = " << e_source
+                    << " e_target = " << e_target
+                    << "\n";
+#endif
+                Line_graph_full_rt edge = {
+                    ++count,
+                    vertex_id_map[e_source],
+                    vertex_id_map[e_target],
+                    e_cost,
+                    edge_id
+                };
+
+                unique[ std::pair<int64_t, int64_t>(e_source, e_target) ] =
+                    edge;
+            }
+            for (const auto &edge : unique) {
+                results.push_back(edge.second);
+            }
+            return results;
+        }
+
+ private:
+    void insert_vertex(
+            int64_t original_vertex_id,
+            int64_t original_edge_id) {
+        m_transformation_map[this->num_vertices() + 1] =
+            std::pair<int64_t, int64_t>(original_vertex_id, original_edge_id);
+        m_vertex_map[std::pair<int64_t, int64_t>(original_vertex_id,
+                                                 original_edge_id)] =
+            this->num_vertices() + 1;
+        auto v =  add_vertex(this->graph);
+        this->graph[v].cp_members(original_vertex_id, original_edge_id);
+        this->graph[v].vertex_id = this->num_vertices();
+        this->vertices_map[this->num_vertices()] = v;
+    }
+
+    void store_edge_costs(
+            const pgrouting::DirectedGraph &digraph) {
+        E_i e_It, e_End;
+        for (boost::tie(e_It, e_End) = boost::edges(digraph.graph);
+            e_It != e_End; e_It++) {
+            m_edge_costs[digraph.graph[*e_It].id] = digraph.graph[*e_It].cost;
+        }
+    }
+
+    template < typename T>
+    void graph_add_edge(
+                int64_t _id,
+                const T &source,
+                const T &target,
+                int64_t source_in_edge,
+                int64_t source_out_edge) {
+            bool inserted;
+            E e;
+
+            pgassert(m_vertex_map.find({source, source_in_edge}) !=
+                    m_vertex_map.end());
+            pgassert(m_vertex_map.find({target, source_out_edge}) !=
+                    m_vertex_map.end());
+
+            auto index_source_edge =
+                m_vertex_map[ std::pair<int64_t, int64_t>(source,
+                                                          source_in_edge) ];
+            auto index_target_edge =
+                m_vertex_map[ std::pair<int64_t, int64_t>(target,
+                                                          source_out_edge) ];
+
+            auto vm_s = this->get_V(index_source_edge);
+            auto vm_t = this->get_V(index_target_edge);
+
+            pgassert(this->vertices_map.find(index_source_edge) !=
+                    this->vertices_map.end());
+            pgassert(this->vertices_map.find(index_target_edge) !=
+                    this->vertices_map.end());
+
+            boost::tie(e, inserted) =
+                boost::add_edge(vm_s, vm_t, this->graph);
+
+            this->graph[e].id = _id;
+        }
+
+    void apply_transformation(
+            const pgrouting::DirectedGraph& digraph) {
+        V_i vertexIt, vertexEnd;
+        EO_i e_outIt, e_outEnd;
+        EI_i e_inIt, e_inEnd;
+
+        // For every vertex in the original graph, create a line graph
+        // using the edges connected to that vertex
+        for (boost::tie(vertexIt, vertexEnd) = boost::vertices(digraph.graph);
+                vertexIt != vertexEnd; vertexIt++) {
+            V vertex = *vertexIt;
+            auto vertex_id = digraph[vertex].id;
+            for (boost::tie(e_outIt, e_outEnd) =
+                    boost::out_edges(vertex, digraph.graph);
+                    e_outIt != e_outEnd; e_outIt++) {
+                auto out_edge_id = digraph.graph[*e_outIt].id;
+                insert_vertex(vertex_id, out_edge_id);
+            }
+
+            for (boost::tie(e_inIt, e_inEnd) =
+                    boost::in_edges(vertex, digraph.graph);
+                    e_inIt != e_inEnd; e_inIt++) {
+                auto in_edge_id = digraph.graph[*e_inIt].id;
+                insert_vertex(vertex_id, in_edge_id);
+
+                for (boost::tie(e_outIt, e_outEnd) =
+                        boost::out_edges(vertex, digraph.graph);
+                        e_outIt != e_outEnd; e_outIt++) {
+                    auto out_edge_id = digraph.graph[*e_outIt].id;
+
+                    ++m_num_edges;
+
+                    graph_add_edge(
+                            m_num_edges,
+                            vertex_id,
+                            vertex_id,
+                            in_edge_id,
+                            out_edge_id);
+                }
+            }
+        }
+
+        // Connect all of the line graphs that were just created using the
+        // edges from the original graph
+        for (boost::tie(vertexIt, vertexEnd) =
+                boost::vertices(digraph.graph);
+                vertexIt != vertexEnd; vertexIt++) {
+            V vertex = *vertexIt;
+            auto vertex_id = digraph[vertex].id;
+
+            for (boost::tie(e_inIt, e_inEnd) =
+                    boost::in_edges(vertex, digraph.graph);
+                    e_inIt != e_inEnd; e_inIt++) {
+                auto source_vertex_id = digraph[digraph.source(*e_inIt)].id;
+                auto in_edge_id = digraph.graph[*e_inIt].id;
+
+                ++m_num_edges;
+
+                graph_add_edge(
+                        m_num_edges,
+                        source_vertex_id,
+                        vertex_id,
+                        in_edge_id,
+                        in_edge_id);
+            }
+        }
+    }
+
+ private:
+    int64_t m_num_edges;
+    std::map < int64_t, double > m_edge_costs;
+    std::map < int64_t, std::pair< int64_t, int64_t > > m_transformation_map;
+    std::map < std::pair< int64_t, int64_t >, int64_t > m_vertex_map;
+
+ public:
+    std::ostringstream log;
+};
+}  // namespace graph
+}  // namespace pgrouting
+
+#endif  // INCLUDE_LINEGRAPH_PGR_LINEGRAPHFULL_HPP_
diff --git a/include/max_flow/pgr_flowgraph.hpp b/include/max_flow/pgr_flowgraph.hpp
new file mode 100644
index 0000000..8634af7
--- /dev/null
+++ b/include/max_flow/pgr_flowgraph.hpp
@@ -0,0 +1,54 @@
+/*PGR-GNU*****************************************************************
+
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Copyright (c) 2016 Andrea Nardelli
+Mail: nrd.nardelli at gmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#ifndef INCLUDE_MAX_FLOW_PGR_FLOWGRAPH_HPP_
+#define INCLUDE_MAX_FLOW_PGR_FLOWGRAPH_HPP_
+#pragma once
+
+#include <boost/config.hpp>
+#include <boost/graph/adjacency_list.hpp>
+
+
+namespace pgrouting {
+
+typedef boost::adjacency_list_traits<boost::vecS, boost::vecS, boost::directedS>
+    Traits;
+typedef boost::adjacency_list<boost::listS, boost::vecS, boost::directedS,
+        // Vertex properties
+        boost::property<boost::vertex_index_t, int64_t,
+        boost::property<boost::vertex_color_t, boost::default_color_type,
+        boost::property<boost::vertex_distance_t, int64_t,
+        boost::property<boost::vertex_predecessor_t, Traits::edge_descriptor>
+        > > >,
+        // Edge properties
+        boost::property<boost::edge_capacity_t, int64_t,
+        boost::property<boost::edge_residual_capacity_t, int64_t,
+        boost::property<boost::edge_reverse_t, Traits::edge_descriptor> > > >
+    FlowGraph;
+
+}  // namespace pgrouting
+
+#endif  // INCLUDE_MAX_FLOW_PGR_FLOWGRAPH_HPP_
diff --git a/include/max_flow/pgr_maxflow.hpp b/include/max_flow/pgr_maxflow.hpp
new file mode 100644
index 0000000..8a11427
--- /dev/null
+++ b/include/max_flow/pgr_maxflow.hpp
@@ -0,0 +1,199 @@
+/*PGR-GNU*****************************************************************
+
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Copyright (c) 2016 Andrea Nardelli
+Mail: nrd.nardelli at gmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#ifndef INCLUDE_MAX_FLOW_PGR_MAXFLOW_HPP_
+#define INCLUDE_MAX_FLOW_PGR_MAXFLOW_HPP_
+#pragma once
+
+
+#include "pgr_flowgraph.hpp"
+#include <boost/graph/push_relabel_max_flow.hpp>
+#include <boost/graph/edmonds_karp_max_flow.hpp>
+#include <boost/graph/boykov_kolmogorov_max_flow.hpp>
+
+
+#include <map>
+#include <string>
+#include <utility>
+#include <vector>
+#include <set>
+#include <limits>
+
+#include "c_types/pgr_flow_t.h"
+#include "c_types/pgr_edge_t.h"
+#include "c_types/general_path_element_t.h"
+
+
+
+namespace pgrouting {
+namespace graph {
+
+
+class PgrFlowGraph {
+     typedef boost::graph_traits<FlowGraph>::vertex_descriptor V;
+     typedef boost::graph_traits<FlowGraph>::edge_descriptor E;
+     typedef boost::graph_traits<FlowGraph>::vertex_iterator V_it;
+     typedef boost::graph_traits<FlowGraph>::edge_iterator E_it;
+     typedef boost::graph_traits<FlowGraph>::out_edge_iterator Eout_it;
+
+
+     boost::property_map
+         <FlowGraph, boost::edge_capacity_t>::type capacity;
+     boost::property_map
+         <FlowGraph, boost::edge_reverse_t>::type rev;
+     boost::property_map
+         <FlowGraph, boost::edge_residual_capacity_t>::type residual_capacity;
+
+
+ public:
+     int64_t push_relabel() {
+         return boost::push_relabel_max_flow(
+                 graph,
+                 supersource,
+                 supersink);
+     }
+
+     int64_t edmonds_karp() {
+         return boost::edmonds_karp_max_flow(
+                 graph,
+                 supersource,
+                 supersink);
+     }
+
+     int64_t boykov_kolmogorov() {
+         size_t num_v = boost::num_vertices(graph);
+         std::vector<boost::default_color_type> color(num_v);
+         std::vector<int64_t> distance(num_v);
+         return boost::boykov_kolmogorov_max_flow(
+                 graph,
+                 supersource,
+                 supersink);
+     }
+     std::vector<General_path_element_t> edge_disjoint_paths() {
+         size_t num_v = boost::num_vertices(graph);
+         std::vector<boost::default_color_type> color(num_v);
+         std::vector<int64_t> distance(num_v);
+         auto flow = boost::boykov_kolmogorov_max_flow(
+                 graph,
+                 supersource,
+                 supersink);
+         return get_edge_disjoint_paths(flow);
+     }
+
+     PgrFlowGraph(
+             const std::vector<pgr_edge_t> &edges,
+             const std::set<int64_t> &source_vertices,
+             const std::set<int64_t> &sink_vertices,
+             int algorithm);
+
+     PgrFlowGraph(
+             const std::vector<pgr_edge_t> &edges,
+             const std::set<int64_t> &source_vertices,
+             const std::set<int64_t> &sink_vertices,
+             bool directed);
+
+
+     std::vector<pgr_flow_t> get_flow_edges() const;
+
+     std::vector<General_path_element_t> get_edge_disjoint_paths(
+             int64_t flow);
+
+ private:
+     V get_boost_vertex(int64_t id) const {
+         return id_to_V.at(id);
+     }
+
+     int64_t get_vertex_id(V v) const {
+         return V_to_id.at(v);
+     }
+
+     int64_t get_edge_id(E e) const {
+         return E_to_id.at(e);
+     }
+
+     void set_supersource(
+             const std::set<int64_t> &source_vertices);
+     void set_supersink(
+             const std::set<int64_t> &sink_vertices);
+
+     void insert_edges_push_relabel(
+             const std::vector<pgr_edge_t> &edges);
+     void insert_edges(
+             const std::vector<pgr_edge_t> &edges);
+     void insert_edges_edge_disjoint(
+             const std::vector<pgr_edge_t> &edges,
+             bool directed);
+
+     void flow_dfs(
+             V vertex,
+             int64_t path_id,
+             std::vector<std::vector<int64_t> > &paths);
+
+     /*
+      * vertices = {sources} U {sink} U {edges.source} U {edge.target}
+      */
+     template <typename T>
+     void add_vertices(
+             const T &edges,
+             const std::set<int64_t> &source_vertices,
+             const std::set<int64_t> &sink_vertices) {
+         std::set<int64_t> vertices(source_vertices);
+         vertices.insert(sink_vertices.begin(), sink_vertices.end());
+
+         for (const auto e : edges) {
+             vertices.insert(e.source);
+             vertices.insert(e.target);
+         }
+
+         for (const auto id : vertices) {
+             V v = add_vertex(graph);
+             id_to_V.insert(std::pair<int64_t, V>(id, v));
+             V_to_id.insert(std::pair<V, int64_t>(v, id));
+         }
+
+         set_supersource(source_vertices);
+         set_supersink(sink_vertices);
+     }
+
+ private:
+     FlowGraph graph;
+     std::map<int64_t, V> id_to_V;
+     std::map<V, int64_t> V_to_id;
+     std::map<E, int64_t> E_to_id;
+
+
+    /* In multi source flow graphs, a super source is created connected to all sources with "infinite" capacity
+     * The same applies for sinks.
+     * To avoid code repetition, a supersource/sink is used even in the one to one signature.
+     */
+     V supersource;
+     V supersink;
+};
+
+}  // namespace graph
+}  // namespace pgrouting
+
+#endif  // INCLUDE_MAX_FLOW_PGR_MAXFLOW_HPP_
diff --git a/include/max_flow/pgr_maximumcardinalitymatching.hpp b/include/max_flow/pgr_maximumcardinalitymatching.hpp
new file mode 100644
index 0000000..bc1ba73
--- /dev/null
+++ b/include/max_flow/pgr_maximumcardinalitymatching.hpp
@@ -0,0 +1,171 @@
+/*PGR-GNU*****************************************************************
+
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Copyright (c) 2016 Andrea Nardelli
+Mail: nrd.nardelli at gmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#ifndef INCLUDE_MAX_FLOW_PGR_MAXIMUMCARDINALITYMATCHING_HPP_
+#define INCLUDE_MAX_FLOW_PGR_MAXIMUMCARDINALITYMATCHING_HPP_
+#pragma once
+
+
+#include <boost/config.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/max_cardinality_matching.hpp>
+
+
+#include <map>
+#include <vector>
+#include <utility>
+#include <set>
+
+
+
+
+namespace pgrouting {
+
+typedef boost::adjacency_list<boost::listS, boost::vecS, boost::undirectedS>
+    BasicUndirectedGraph;
+typedef boost::adjacency_list<boost::listS, boost::vecS, boost::directedS>
+    BasicDirectedGraph;
+
+namespace flow {
+
+template<class G>
+class PgrCardinalityGraph {
+ public:
+  G boost_graph;
+
+  typedef typename boost::graph_traits<G>::vertex_descriptor V;
+  typedef typename boost::graph_traits<G>::edge_descriptor E;
+  typedef typename boost::graph_traits<G>::vertex_iterator V_it;
+  typedef typename boost::graph_traits<G>::edge_iterator E_it;
+
+  std::map<int64_t, V> id_to_V;
+  std::map<V, int64_t> V_to_id;
+  std::map<E, int64_t> E_to_id;
+
+  V get_boost_vertex(int64_t id) {
+      return id_to_V[id];
+  }
+
+  int64_t get_vertex_id(V v) {
+      return V_to_id[v];
+  }
+
+  int64_t get_edge_id(E e) {
+      return E_to_id[e];
+  }
+
+  void create_max_cardinality_graph(pgr_basic_edge_t *data_edges,
+                                    size_t total_tuples) {
+      std::set<int64_t> vertices;
+      for (size_t i = 0; i < total_tuples; ++i) {
+          vertices.insert(data_edges[i].source);
+          vertices.insert(data_edges[i].target);
+      }
+      for (int64_t id : vertices) {
+          V v = add_vertex(boost_graph);
+          id_to_V.insert(std::pair<int64_t, V>(id, v));
+          V_to_id.insert(std::pair<V, int64_t>(v, id));
+      }
+      bool added;
+
+      for (size_t i = 0; i < total_tuples; ++i) {
+          V v1 = get_boost_vertex(data_edges[i].source);
+          V v2 = get_boost_vertex(data_edges[i].target);
+          E e1;
+          E e2;
+          if (data_edges[i].going) {
+              boost::tie(e1, added) = boost::add_edge(v1, v2, boost_graph);
+              E_to_id.insert(std::pair<E, int64_t>(e1, data_edges[i].id));
+          }
+          if (data_edges[i].coming) {
+              boost::tie(e2, added) = boost::add_edge(v2, v1, boost_graph);
+              E_to_id.insert(std::pair<E, int64_t>(e2, data_edges[i].id));
+          }
+      }
+  }
+
+  void get_matched_vertices(std::vector<pgr_basic_edge_t> &matched_vertices,
+                            const std::vector<int64_t> &mate_map) {
+      V_it vi, vi_end;
+      E e;
+      bool exists;
+      if (boost::is_directed(boost_graph)) {
+          std::vector<bool> already_matched(num_vertices(boost_graph), false);
+          for (boost::tie(vi, vi_end) = boost::vertices(boost_graph);
+               vi != vi_end;
+               ++vi) {
+              /*
+               * For each vertex I check:
+               * 1) It is matched with a non-null vertex
+               * 2) An edge exists from this vertex to his mate
+               * 3) The vertices have not been matched already
+               * (this last point prevents having double output with reversed
+               * source and target)
+               */
+              boost::tie(e, exists) =
+                  boost::edge(*vi, mate_map[*vi], boost_graph);
+              if (((uint64_t)mate_map[*vi]
+                          != boost::graph_traits<G>::null_vertex())
+                  && exists && !already_matched[*vi]
+                  && !already_matched[mate_map[*vi]]) {
+                  already_matched[*vi] = true;
+                  already_matched[mate_map[*vi]] = true;
+                  pgr_basic_edge_t matched_couple;
+                  matched_couple.source = get_vertex_id(*vi);
+                  matched_couple.target = get_vertex_id(mate_map[*vi]);
+                  matched_couple.edge_id = get_edge_id(e);
+                  matched_vertices.push_back(matched_couple);
+              }
+          }
+      } else {
+          for (boost::tie(vi, vi_end) = boost::vertices(boost_graph);
+               vi != vi_end;
+               ++vi) {
+              boost::tie(e, exists) =
+                  boost::edge(*vi, mate_map[*vi], boost_graph);
+              if (((uint64_t)mate_map[*vi]
+                          != boost::graph_traits<G>::null_vertex())
+                  && (*vi < (uint64_t)mate_map[*vi])) {
+                  pgr_basic_edge_t matched_couple;
+                  matched_couple.source = get_vertex_id(*vi);
+                  matched_couple.target = get_vertex_id(mate_map[*vi]);
+                  matched_couple.edge_id = get_edge_id(e);
+                  matched_vertices.push_back(matched_couple);
+              }
+          }
+      }
+  }
+
+  void maximum_cardinality_matching(std::vector<int64_t> &mate_map) {
+      edmonds_maximum_cardinality_matching(boost_graph,
+                                           &mate_map[0]);
+  }
+};
+
+}  // namespace flow
+}  // namespace pgrouting
+
+#endif  // INCLUDE_MAX_FLOW_PGR_MAXIMUMCARDINALITYMATCHING_HPP_
diff --git a/include/trsp/GraphDefinition.h b/include/trsp/GraphDefinition.h
new file mode 100644
index 0000000..914e432
--- /dev/null
+++ b/include/trsp/GraphDefinition.h
@@ -0,0 +1,165 @@
+#ifndef INCLUDE_TRSP_GRAPHDEFINITION_H_
+#define INCLUDE_TRSP_GRAPHDEFINITION_H_
+
+#include <stdlib.h>
+
+#include <vector>
+#include <map>
+#include <queue>
+#include <string>
+#include <iostream>
+#include <utility>
+#include <functional>
+
+
+#include "c_types/trsp/trsp.h"
+
+// using namespace std;
+
+typedef std::vector<long> LongVector;
+typedef std::vector<LongVector> VectorOfLongVector;
+typedef std::pair<long, bool> PIB;
+typedef std::pair<double, PIB> PDP;
+typedef std::pair<double, std::vector<long> > PDVI;
+
+/*
+typedef struct edge 
+{
+    int id;
+    int source;
+    int target;
+    double cost;
+    double reverse_cost;
+} edge_t;
+
+typedef struct path_element 
+{
+    int vertex_id;
+    int edge_id;
+    double cost;
+}path_element_tt;
+*/
+
+typedef struct {
+    long ed_ind[2];
+    long v_pos[2];
+} PARENT_PATH;
+
+typedef struct Rule {
+    double cost;
+    std::vector<long> precedencelist;
+    Rule(double c, std::vector<long> p) : cost(c), precedencelist(p) { }
+}Rule;
+
+typedef struct {
+    double startCost, endCost;
+} CostHolder;
+
+typedef std::map<long, std::vector<Rule> > RuleTable;
+
+
+
+class GraphEdgeInfo {
+ public:
+    long m_lEdgeID;
+    long m_lEdgeIndex;
+    short m_sDirection;
+    double m_dCost;
+    double m_dReverseCost;
+    LongVector m_vecStartConnectedEdge;
+    LongVector m_vecEndConnedtedEdge;
+    // LongVector m_vecConnectedNode;
+    bool m_bIsLeadingRestrictedEdge;
+    VectorOfLongVector m_vecRestrictedEdge;
+
+    long m_lStartNode;
+    long m_lEndNode;
+};
+
+
+
+
+typedef std::vector<GraphEdgeInfo*> GraphEdgeVector;
+typedef std::map<long, LongVector> Long2LongVectorMap;
+typedef std::map<long, long> Long2LongMap;
+
+
+
+
+class GraphDefinition {
+ public:
+    GraphDefinition(void);
+    ~GraphDefinition(void);
+
+    int my_dijkstra(long start_vertex, long end_vertex,
+                    size_t edge_count, char** err_msg);
+
+    int my_dijkstra(edge_t *edges, size_t edge_count,
+                    long start_vertex, long end_vertex,
+                    bool directed, bool has_reverse_cost,
+                    path_element_tt **path, size_t *path_count,
+                    char **err_msg);
+
+    int my_dijkstra(edge_t *edges, size_t edge_count,
+                    long start_vertex, long end_vertex,
+                    bool directed, bool has_reverse_cost,
+                    path_element_tt **path, size_t *path_count,
+                    char **err_msg,
+                    std::vector<PDVI> &ruleList);
+
+    int my_dijkstra(edge_t *edges, size_t edge_count,
+                    long start_edge, double start_part,
+                    long end_edge, double end_part,
+                    bool directed, bool has_reverse_cost,
+                    path_element_tt **path, size_t *path_count,
+                    char **err_msg,
+                    std::vector<PDVI> &ruleList);
+
+    int multi_dijkstra(edge_t *edges, size_t edge_count,
+                       std::vector<int> vertices,
+                       bool directed, bool has_reverse_cost,
+                       path_element_tt **path, size_t *path_count,
+                       char **err_msg,
+                       std::vector<PDVI> &ruleList);
+
+    bool construct_graph(edge_t *edges, size_t edge_count,
+                         bool has_reverse_cost, bool directed);
+
+
+ private:
+    double construct_path(long ed_id, long v_pos);
+    void explore(long cur_node, GraphEdgeInfo& cur_edge, bool isStart,
+                 LongVector &vecIndex, std::priority_queue<PDP,
+                 std::vector<PDP>, std::greater<PDP> > &que);
+    double getRestrictionCost(long cur_node, GraphEdgeInfo& new_edge,
+                              bool isStart);
+    bool addEdge(edge edgeIn);
+    bool connectEdge(GraphEdgeInfo& firstEdge, GraphEdgeInfo& secondEdge,
+                     bool bIsStartNodeSame);
+    bool get_single_cost(double total_cost, path_element_tt **path,
+                         size_t *path_count);
+    void init();
+    void deleteall();
+
+ private:
+    GraphEdgeVector m_vecEdgeVector;
+    Long2LongMap m_mapEdgeId2Index;
+    Long2LongVectorMap m_mapNodeId2Edge;
+    long max_node_id;
+    long max_edge_id;
+    long m_lStartEdgeId;
+    long m_lEndEdgeId;
+    double m_dStartpart;
+    double m_dEndPart;
+    bool isStartVirtual;
+    bool isEndVirtual;
+
+    std::vector <path_element_tt> m_vecPath;
+    PARENT_PATH *parent;
+    CostHolder *m_dCost;
+    RuleTable m_ruleTable;
+    bool m_bIsturnRestrictOn;
+    bool m_bIsGraphConstructed;
+};
+
+#endif  // INCLUDE_TRSP_GRAPHDEFINITION_H_
diff --git a/include/trsp/edgeInfo.h b/include/trsp/edgeInfo.h
new file mode 100644
index 0000000..a76fa44
--- /dev/null
+++ b/include/trsp/edgeInfo.h
@@ -0,0 +1,99 @@
+/*PGR-GNU*****************************************************************
+
+FILE: edgeInfo.h
+
+Copyright (c) 2017 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+aint64_t with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ ********************************************************************PGR-GNU*/
+
+#ifndef INCLUDE_TRSP_EDGEINFO_H_
+#define INCLUDE_TRSP_EDGEINFO_H_
+
+#include <vector>
+
+
+#include "c_types/pgr_edge_t.h"
+#include "cpp_common/pgr_assert.h"
+
+namespace pgrouting {
+namespace trsp {
+
+
+class EdgeInfo {
+ public:
+     EdgeInfo() = default;
+
+     EdgeInfo(
+             pgr_edge_t edgeIn,
+             size_t edgeIndex);
+
+     inline size_t idx() const {return m_edgeIndex;}
+
+     inline int64_t startNode() const {
+         pgassert(m_edge.source >= 0);
+         return m_edge.source;
+     }
+     inline int64_t endNode() const {
+         pgassert(m_edge.target >= 0);
+         return m_edge.target;}
+
+     inline int64_t edgeID() const {return m_edge.id;}
+     inline double cost() const {return m_edge.cost;}
+     inline double r_cost() const {return m_edge.reverse_cost;}
+     inline double get_cost(int64_t node) const {
+         pgassert(node == startNode() || node == endNode());
+         return node == startNode() ?
+             cost() :
+             r_cost();
+     }
+
+     void connect_endEdge(size_t edge_idx) {
+         m_endConnectedEdge.push_back(edge_idx);
+     }
+     void connect_startEdge(size_t edge_idx) {
+         m_startConnectedEdge.push_back(edge_idx);
+     }
+
+     std::vector<size_t> endConnectedEdge() const {
+         return m_endConnectedEdge;
+     }
+
+     std::vector<size_t> startConnectedEdge() const {
+         return m_startConnectedEdge;
+     }
+
+     std::vector<size_t> get_idx(bool isStart) const {
+         return isStart ?
+             startConnectedEdge() :
+             endConnectedEdge();
+     }
+
+
+ private:
+     pgr_edge_t m_edge;
+     size_t m_edgeIndex;
+     std::vector<size_t> m_startConnectedEdge;
+     std::vector<size_t> m_endConnectedEdge;
+};
+
+}  // namespace trsp
+}  // namespace pgrouting
+
+#endif  // INCLUDE_TRSP_EDGEINFO_H_
diff --git a/include/trsp/pgr_trspHandler.h b/include/trsp/pgr_trspHandler.h
new file mode 100644
index 0000000..dd7163d
--- /dev/null
+++ b/include/trsp/pgr_trspHandler.h
@@ -0,0 +1,219 @@
+/*PGR-GNU*****************************************************************
+
+FILE: pgr_trspHandler.h
+
+Copyright (c) 2017 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+aint64_t with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ ********************************************************************PGR-GNU*/
+
+#ifndef INCLUDE_TRSP_PGR_TRSPHANDLER_H_
+#define INCLUDE_TRSP_PGR_TRSPHANDLER_H_
+
+#include <stdlib.h>
+
+#include <vector>
+#include <deque>
+#include <map>
+#include <queue>
+#include <string>
+#include <iostream>
+#include <utility>
+#include <functional>
+#include <limits>
+
+
+#include "cpp_common/basePath_SSEC.hpp"
+#include "trsp/edgeInfo.h"
+#include "trsp/rule.h"
+
+namespace pgrouting {
+namespace trsp {
+
+
+
+
+class Pgr_trspHandler {
+    /**
+     * Used in the priority queue
+     */
+    typedef std::pair<double, std::pair<int64_t, bool>> PDP;
+
+    /** @brief predecesor edge
+     *
+     * because each row represents 2 edges, this enumeration
+     * is needed for the predecessors
+     * - C_EDGE: If the predecessor comes from the "cost" edge
+     * - RC_EDGE: If the predecessor comes from the "reverse_cost" edge
+     * - ILLEGAL: Its not a predecessor of anything
+     *
+     * The "legal" values are indices to vectors
+     */
+    enum Position {ILLEGAL = -1, RC_EDGE = 0, C_EDGE = 1};
+
+
+    class Predecessor {
+     public:
+         Predecessor() :
+             e_idx(2),
+             v_pos(2) {
+             for (auto &p : v_pos) p = ILLEGAL;
+         }
+
+         bool isIllegal(size_t i) {return v_pos[i] == ILLEGAL;}
+         bool isIllegal(Position i) {
+             pgassert(i != ILLEGAL);
+             return v_pos[i] == ILLEGAL;}
+
+         std::vector<size_t> e_idx;
+         std::vector<Position> v_pos;
+    };
+
+
+    class CostHolder {
+     public:
+         CostHolder() {
+             endCost =  startCost = (std::numeric_limits<double>::max)();
+         }
+
+     public:
+         double startCost;
+         double endCost;
+    };
+
+
+ public:
+    Pgr_trspHandler(
+            pgr_edge_t *edges,
+            const size_t edge_count,
+            const bool directed,
+            const std::vector<Rule> &ruleList);
+
+    Pgr_trspHandler(void) = delete;
+    ~Pgr_trspHandler(void) = default;
+
+
+    Path process(
+            const int64_t start_vertex,
+            const int64_t end_vertex);
+
+    std::deque<Path> process(
+            const std::vector<int64_t> sources,
+            const std::vector<int64_t> targets);
+
+
+    void clear();
+
+ private:
+    void construct_graph(
+            pgr_edge_t *edges,
+            const size_t edge_count,
+            const bool directed);
+
+    int initialize_restrictions(
+            const std::vector<Rule> &ruleList);
+
+    void initialize_que();
+
+    Path process_trsp(
+            size_t edge_count);
+
+    EdgeInfo dijkstra_exploration();
+
+
+
+    void explore(
+            int64_t cur_node,
+            const EdgeInfo cur_edge,
+            bool isStart);
+
+    double getRestrictionCost(
+            int64_t cur_node,
+            const EdgeInfo &new_edge,
+            bool isStart);
+    bool addEdge(const pgr_edge_t edgeIn);
+
+    void connectStartEdge(
+            size_t firstEdge_idx,
+            size_t secondEdge_idx);
+
+    void connectEndEdge(
+            size_t firstEdge_idx,
+            size_t secondEdge_idx);
+
+    double construct_path(int64_t ed_id, Position pos);
+
+
+    int64_t renumber_edges(
+            pgr_edge_t *edges,
+            const size_t edge_count) const;
+
+    void  add_to_que(
+            double cost,
+            size_t e_idx,
+            bool isStart);
+
+    double get_tot_cost(
+            double cost,
+            size_t edge_idx,
+            bool isStart);
+
+ private:
+    std::vector<EdgeInfo> m_edges;
+
+    /**
+     * Used only to veryfy that there are no reppetitions inserted
+     * the way it orks, repeating edges id is not allowed
+     */
+    std::map<int64_t, int64_t> m_mapEdgeId2Index;
+
+    /**
+     * m_adjacency[vertex] = {edges}
+     */
+    std::map<int64_t, std::vector<size_t>> m_adjacency;
+
+
+    int64_t m_start_vertex;
+    int64_t m_end_vertex;
+
+    /*
+     * Used in dijkstra_exploration
+     */
+    int64_t current_node;
+
+    int64_t m_min_id;
+
+    Path m_path;
+
+    std::vector<Predecessor> m_parent;
+    std::vector<CostHolder> m_dCost;
+
+    std::map<int64_t, std::vector<Rule>> m_ruleTable;
+
+    /*
+     * priority queue
+     */
+    std::priority_queue<PDP, std::vector<PDP>, std::greater<PDP> > que;
+};
+
+
+}  // namespace trsp
+}  // namespace pgrouting
+
+#endif  // INCLUDE_TRSP_PGR_TRSPHANDLER_H_
diff --git a/include/trsp/rule.h b/include/trsp/rule.h
new file mode 100644
index 0000000..c0d7e61
--- /dev/null
+++ b/include/trsp/rule.h
@@ -0,0 +1,68 @@
+/*PGR-GNU*****************************************************************
+
+FILE: rule.h
+
+Copyright (c) 2017 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+aint64_t with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ ********************************************************************PGR-GNU*/
+
+#ifndef INCLUDE_TRSP_RULE_H_
+#define INCLUDE_TRSP_RULE_H_
+
+
+#include <vector>
+#include <sstream>
+#include "c_types/restriction_t.h"
+
+namespace pgrouting {
+namespace trsp {
+
+
+
+class Rule {
+ public:
+    explicit Rule(Restriction_t r);
+
+    inline double cost() const {
+        return m_cost;
+    }
+
+    const std::vector<int64_t> precedencelist() const;
+
+    inline int64_t dest_id() const {
+        return m_dest_id;
+    }
+
+
+    friend std::ostream& operator<<(std::ostream& log, const Rule &r);
+
+ private:
+    int64_t m_dest_id;
+    double m_cost;
+    std::vector<int64_t> m_precedencelist;
+};
+
+
+
+
+}  // namespace trsp
+}  // namespace pgrouting
+
+#endif  // INCLUDE_TRSP_RULE_H_
diff --git a/include/vrp/dnode.h b/include/vrp/dnode.h
index 208cf62..ab3a572 100644
--- a/include/vrp/dnode.h
+++ b/include/vrp/dnode.h
@@ -25,8 +25,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 /*! @file dnode.h */
 
-#ifndef INCLUDE_PICKDELIVER_DNODE_H_
-#define INCLUDE_PICKDELIVER_DNODE_H_
+#ifndef INCLUDE_VRP_DNODE_H_
+#define INCLUDE_VRP_DNODE_H_
 #pragma once
 
 #include <string>
@@ -63,4 +63,4 @@ class Dnode : public Base_node, public PD_problem {
 }  // namespace vrp
 }  // namespace pgrouting
 
-#endif  // INCLUDE_PICKDELIVER_DNODE_H_
+#endif  // INCLUDE_VRP_DNODE_H_
diff --git a/include/withPoints/pgr_withPoints.hpp b/include/withPoints/pgr_withPoints.hpp
new file mode 100644
index 0000000..6d6a284
--- /dev/null
+++ b/include/withPoints/pgr_withPoints.hpp
@@ -0,0 +1,102 @@
+/*PGR-GNU*****************************************************************
+File: withPoints.hpp
+
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer:
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+Mail:
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#ifndef INCLUDE_WITHPOINTS_PGR_WITHPOINTS_HPP_
+#define INCLUDE_WITHPOINTS_PGR_WITHPOINTS_HPP_
+#pragma once
+#include <vector>
+
+#include "c_types/point_on_edge_t.h"
+#include "cpp_common/pgr_messages.h"
+#include "cpp_common/basePath_SSEC.hpp"
+
+namespace pgrouting {
+
+class Pg_points_graph : public Pgr_messages {
+    struct pointCompare {
+        bool operator() (
+                const Point_on_edge_t& lhs,
+                const Point_on_edge_t& rhs) const
+        {return lhs.fraction < rhs.fraction? true : lhs.pid < rhs.pid;}
+    };
+
+ public:
+     Pg_points_graph() = delete;
+     Pg_points_graph(const Pg_points_graph &) = delete;
+     Pg_points_graph(
+             std::vector<Point_on_edge_t> p_points,
+             std::vector<pgr_edge_t>      p_edges_to_modify,
+             bool p_normal,
+             char p_driving_side,
+             bool p_directed);
+
+     std::vector<Point_on_edge_t> points() const;
+     std::vector<pgr_edge_t> edges_of_points() const;
+     std::vector<pgr_edge_t> new_edges() const;
+     inline char driving_side() const {return m_driving_side;}
+
+
+     Path eliminate_details(
+             Path path) const;
+
+     void eliminate_details_dd(
+             Path &path) const;
+
+     void adjust_pids(
+             const std::vector< Point_on_edge_t > &points,
+             Path &path);
+
+     friend std::ostream& operator<<(
+             std::ostream &os, const Pg_points_graph &g);
+
+ private:
+     void adjust_pids(
+             const std::vector< Point_on_edge_t > &points,
+             const int64_t &start_pid,
+             const int64_t &end_pid,
+             Path &path);
+
+     void create_new_edges();
+     void check_points();
+     void reverse_sides();
+     int64_t get_edge_id(int64_t pid) const;
+     const pgr_edge_t*  get_edge_data(int64_t eid) const;
+
+ private:
+     std::vector<Point_on_edge_t> m_points;
+     std::vector<Point_on_edge_t> m_o_points;
+     std::vector<pgr_edge_t>      m_edges_of_points;
+     std::vector<pgr_edge_t>      m_new_edges;
+     bool m_normal;
+     char m_driving_side;
+     bool m_directed;
+};
+
+}  // namespace pgrouting
+
+#endif  // INCLUDE_WITHPOINTS_PGR_WITHPOINTS_HPP_
diff --git a/pgtap/alpha_shape/issue-544.sql b/pgtap/alpha_shape/issue-544.sql
index 4691600..745d1ef 100644
--- a/pgtap/alpha_shape/issue-544.sql
+++ b/pgtap/alpha_shape/issue-544.sql
@@ -50,7 +50,7 @@ SELECT throws_ok('q1',
  'SHOULD THROW, because there is only one point');
 
 SELECT throws_ok('q2',
- '38001','After eliminating duplicated points, less than 3 points remain!!. Alpha shape calculation needs at least 3 vertices.',
+ 'XX000','After eliminating duplicated points, less than 3 points remain!!. Alpha shape calculation needs at least 3 vertices.',
  'SHOULD THROW, because there are less than 3 distinc points');
 
 SELECT lives_ok('q3', 'SHOULD LIVE because ater eliminating duplicates there are enough points to work with');
diff --git a/pgtap/astar/astar_oneToOne-compare-dijkstra1.test.sql b/pgtap/astar/astar_oneToOne-compare-dijkstra1.test.sql
index b6010d3..01d9d7e 100644
--- a/pgtap/astar/astar_oneToOne-compare-dijkstra1.test.sql
+++ b/pgtap/astar/astar_oneToOne-compare-dijkstra1.test.sql
@@ -61,10 +61,10 @@ BEGIN
                       || ' count_q AS (SELECT dc.count = ac.count AS result FROM dc, ac)';
             value_query := ' vc AS (SELECT a.agg_cost/d.agg_cost <= ' || epsilon || '  AS result'
                 || ' from (SELECT agg_cost from astar WHERE edge = -1) AS a, (SELECT agg_cost from dijkstra WHERE edge = -1) AS d) ';
-                    
-            t_query := 'WITH ' 
-                || dijkstra_sql || ', ' 
-                || astar_sql || ', ' 
+
+            t_query := 'WITH '
+                || dijkstra_sql || ', '
+                || astar_sql || ', '
                 || count_query  || ', '
                 || value_query
                 || ' (SELECT * FROM count_q) UNION (SELECT * FROM vc)';
@@ -78,9 +78,9 @@ BEGIN
                 || ', true)) ';
             astar_sql := 'astar AS (SELECT * FROM pgr_astar($$' || inner_sql || '$$, ' || i || ', ' || j
                 || ', true, ' || heuristic || ', ' || factor || ', ' || epsilon || ')) ';
-            t_query := 'WITH ' 
-                || dijkstra_sql || ', ' 
-                || astar_sql || ', ' 
+            t_query := 'WITH '
+                || dijkstra_sql || ', '
+                || astar_sql || ', '
                 || count_query  || ', '
                 || value_query
                 || ' (SELECT * FROM count_q) UNION (SELECT * FROM vc)';
@@ -95,9 +95,9 @@ BEGIN
                 || ', false)) ';
             astar_sql := 'astar AS (SELECT * FROM pgr_astar($$' || inner_sql || '$$, ' || i || ', ' || j
                 || ', false, ' || heuristic || ', ' || factor || ', ' || epsilon || ')) ';
-            t_query := 'WITH ' 
-                || dijkstra_sql || ', ' 
-                || astar_sql || ', ' 
+            t_query := 'WITH '
+                || dijkstra_sql || ', '
+                || astar_sql || ', '
                 || count_query  || ', '
                 || value_query
                 || ' (SELECT * FROM count_q) UNION (SELECT * FROM vc)';
@@ -110,9 +110,9 @@ BEGIN
                 || ', false)) ';
             astar_sql := 'astar AS (SELECT * FROM pgr_astar($$' || inner_sql || '$$, ' || i || ', ' || j
                 || ', false, ' || heuristic || ', ' || factor || ', ' || epsilon || ')) ';
-            t_query := 'WITH ' 
-                || dijkstra_sql || ', ' 
-                || astar_sql || ', ' 
+            t_query := 'WITH '
+                || dijkstra_sql || ', '
+                || astar_sql || ', '
                 || count_query  || ', '
                 || value_query
                 || ' (SELECT * FROM count_q) UNION (SELECT * FROM vc)';
diff --git a/pgtap/astar/astar_oneToOne-types-check.sql b/pgtap/astar/astar_oneToOne-types-check.sql
index 04329b5..4ff3bb3 100644
--- a/pgtap/astar/astar_oneToOne-types-check.sql
+++ b/pgtap/astar/astar_oneToOne-types-check.sql
@@ -59,7 +59,7 @@ SELECT function_returns('pgr_astar',
         'integer', 'double precision', 'double precision'],
     'setof record');
 
-CREATE OR REPLACE FUNCTION test_anyInteger(fn TEXT, params TEXT[], parameter TEXT) 
+CREATE OR REPLACE FUNCTION test_anyInteger(fn TEXT, params TEXT[], parameter TEXT)
 RETURNS SETOF TEXT AS
 $BODY$
 DECLARE
@@ -75,13 +75,13 @@ BEGIN
         start_sql = start_sql || p || ', ';
     END LOOP;
     end_sql = ' FROM edge_table $$, 2, 3, true)';
-    
+
     query := start_sql || parameter || '::SMALLINT ' || end_sql;
     RETURN query SELECT lives_ok(query);
-    
+
     query := start_sql || parameter || '::INTEGER ' || end_sql;
     RETURN query SELECT lives_ok(query);
-    
+
     query := start_sql || parameter || '::BIGINT ' || end_sql;
     RETURN query SELECT lives_ok(query);
 
@@ -93,7 +93,7 @@ BEGIN
 END;
 $BODY$ LANGUAGE plpgsql;
 
-CREATE OR REPLACE FUNCTION test_anyNumerical(fn TEXT, params TEXT[], parameter TEXT) 
+CREATE OR REPLACE FUNCTION test_anyNumerical(fn TEXT, params TEXT[], parameter TEXT)
 RETURNS SETOF TEXT AS
 $BODY$
 DECLARE
@@ -109,13 +109,13 @@ BEGIN
         start_sql = start_sql || p || ', ';
     END LOOP;
     end_sql = ' FROM edge_table $$, 2, 3, true)';
-    
+
     query := start_sql || parameter || '::SMALLINT ' || end_sql;
     RETURN query SELECT lives_ok(query);
-    
+
     query := start_sql || parameter || '::INTEGER ' || end_sql;
     RETURN query SELECT lives_ok(query);
-    
+
     query := start_sql || parameter || '::BIGINT ' || end_sql;
     RETURN query SELECT lives_ok(query);
 
@@ -184,7 +184,7 @@ SELECT test_anyNumerical('pgr_astar',
     'y2');
 
 SELECT throws_ok(
-    $$SELECT * FROM pgr_astar('SELECT * FROM edge_table', 
+    $$SELECT * FROM pgr_astar('SELECT * FROM edge_table',
         2, 3,
         true, 6, 1, 1)$$,
     'XX000',
@@ -193,7 +193,7 @@ SELECT throws_ok(
 );
 
 SELECT throws_ok(
-    $$SELECT * FROM pgr_astar('SELECT * FROM edge_table', 
+    $$SELECT * FROM pgr_astar('SELECT * FROM edge_table',
         2, 3,
         true, -1, 1, 1)$$,
     'XX000',
@@ -202,7 +202,7 @@ SELECT throws_ok(
 );
 
 SELECT throws_ok(
-    $$SELECT * FROM pgr_astar('SELECT * FROM edge_table', 
+    $$SELECT * FROM pgr_astar('SELECT * FROM edge_table',
         2, 3,
         true, 0, 0, 1)$$,
     'XX000',
@@ -211,7 +211,7 @@ SELECT throws_ok(
 );
 
 SELECT throws_ok(
-    $$SELECT * FROM pgr_astar('SELECT * FROM edge_table', 
+    $$SELECT * FROM pgr_astar('SELECT * FROM edge_table',
         2, 3,
         true, 0, -1.4, 1)$$,
     'XX000',
@@ -220,7 +220,7 @@ SELECT throws_ok(
 );
 
 SELECT throws_ok(
-    $$SELECT * FROM pgr_astar('SELECT * FROM edge_table', 
+    $$SELECT * FROM pgr_astar('SELECT * FROM edge_table',
         2, 3,
         true, 0, 1, -3)$$,
     'XX000',
@@ -228,7 +228,7 @@ SELECT throws_ok(
     'SHOULD THROW because epsilon < 0'
 );
 SELECT throws_ok(
-    $$SELECT * FROM pgr_astar('SELECT * FROM edge_table', 
+    $$SELECT * FROM pgr_astar('SELECT * FROM edge_table',
         2, 3,
         true, 0, 1, 0.9)$$,
     'XX000',
diff --git a/pgtap/bdAstar/bdAstar-return-types-check.sql b/pgtap/bdAstar/bdAstar-return-types-check.sql
index 9e43de8..fa734e1 100644
--- a/pgtap/bdAstar/bdAstar-return-types-check.sql
+++ b/pgtap/bdAstar/bdAstar-return-types-check.sql
@@ -18,8 +18,8 @@ SELECT function_returns('pgr_bdastar',
 PREPARE v21q00 AS
 SELECT pg_typeof(seq)::text AS t1, pg_typeof(path_seq)::text AS t2,
     pg_typeof(node)::text AS t5, pg_typeof(edge)::text AS t6,
-    pg_typeof(cost)::text AS t7, pg_typeof(agg_cost)::TEXT AS t8 
-    FROM ( 
+    pg_typeof(cost)::text AS t7, pg_typeof(agg_cost)::TEXT AS t8
+    FROM (
         SELECT * FROM pgr_bdastar(
             'SELECT id, source, target, cost, reverse_cost, x1,y1,x2,y2 FROM edge_table',
             2, 3, true) ) AS a
diff --git a/pgtap/bdDijkstra/bdDijkstra-types-check.sql b/pgtap/bdDijkstra/bdDijkstra-types-check.sql
index 9cb9836..d8bc624 100644
--- a/pgtap/bdDijkstra/bdDijkstra-types-check.sql
+++ b/pgtap/bdDijkstra/bdDijkstra-types-check.sql
@@ -18,8 +18,8 @@ SELECT function_returns('pgr_bddijkstra',
 PREPARE v21q00 AS
 SELECT pg_typeof(seq)::text AS t1, pg_typeof(path_seq)::text AS t2,
     pg_typeof(node)::text AS t5, pg_typeof(edge)::text AS t6,
-    pg_typeof(cost)::text AS t7, pg_typeof(agg_cost)::TEXT AS t8 
-    FROM ( 
+    pg_typeof(cost)::text AS t7, pg_typeof(agg_cost)::TEXT AS t8
+    FROM (
         SELECT * FROM pgr_bddijkstra(
             'SELECT id, source, target, cost, reverse_cost FROM edge_table',
             2, 3, true) ) AS a
diff --git a/pgtap/common/getColumnName.test.sql b/pgtap/common/getColumnName.test.sql
index 2d96f1f..1a262ef 100644
--- a/pgtap/common/getColumnName.test.sql
+++ b/pgtap/common/getColumnName.test.sql
@@ -12,43 +12,43 @@ CREATE TABLE "Streets" (GID SERIAL PRIMARY KEY,SOURCE INTEGER,TARGET INTEGER);
 CREATE TABLE s1.streets ("ID" SERIAL PRIMARY KEY,sour INTEGER,targ INTEGER);
 CREATE TABLE s1."Streets" ("ID" SERIAL PRIMARY KEY,"SOURCE" INTEGER,"Target" INTEGER);
 
-SELECT  results_eq('SELECT _pgr_getColumnName (''streets'',''id''), 1', 'SELECT ''id''::TEXT, 1');  
-SELECT  results_eq('SELECT _pgr_getColumnName (''streets'',''ID''), 2', 'SELECT ''id''::TEXT,2');  
-SELECT  results_eq('SELECT _pgr_getColumnName (''Streets'',''gid''), 3', 'SELECT ''gid''::TEXT,3');  
-SELECT  results_eq('SELECT _pgr_getColumnName (''Streets'',''GID''), 4', 'SELECT ''gid''::TEXT,4');  
-SELECT  results_eq('SELECT _pgr_getColumnName (''Streets'',''ID''), 5', 'SELECT NULL::TEXT,5');  
-SELECT  results_eq('SELECT _pgr_getColumnName (''s1.streets'',''ID''), 6', 'SELECT ''ID''::TEXT,6');  
-SELECT  results_eq('SELECT _pgr_getColumnName (''s1.streets'',''id''), 7', 'SELECT NULL::TEXT,7');  
-SELECT  results_eq('SELECT _pgr_getColumnName (''s1.Streets'',''id''), 8', 'SELECT NULL::TEXT,8'); 
-SELECT  results_eq('SELECT _pgr_getColumnName (''s1.Streets'',''ID''), 9', 'SELECT ''ID''::TEXT,9');  
+SELECT  results_eq('SELECT _pgr_getColumnName (''streets'',''id''), 1', 'SELECT ''id''::TEXT, 1');
+SELECT  results_eq('SELECT _pgr_getColumnName (''streets'',''ID''), 2', 'SELECT ''id''::TEXT,2');
+SELECT  results_eq('SELECT _pgr_getColumnName (''Streets'',''gid''), 3', 'SELECT ''gid''::TEXT,3');
+SELECT  results_eq('SELECT _pgr_getColumnName (''Streets'',''GID''), 4', 'SELECT ''gid''::TEXT,4');
+SELECT  results_eq('SELECT _pgr_getColumnName (''Streets'',''ID''), 5', 'SELECT NULL::TEXT,5');
+SELECT  results_eq('SELECT _pgr_getColumnName (''s1.streets'',''ID''), 6', 'SELECT ''ID''::TEXT,6');
+SELECT  results_eq('SELECT _pgr_getColumnName (''s1.streets'',''id''), 7', 'SELECT NULL::TEXT,7');
+SELECT  results_eq('SELECT _pgr_getColumnName (''s1.Streets'',''id''), 8', 'SELECT NULL::TEXT,8');
+SELECT  results_eq('SELECT _pgr_getColumnName (''s1.Streets'',''ID''), 9', 'SELECT ''ID''::TEXT,9');
 
 SET search_path TO  s1,public;
 SELECT  results_eq('SELECT _pgr_getColumnName (''public.streets'',''ID''), 10', 'SELECT ''id''::TEXT,10');
 SELECT  results_eq('SELECT _pgr_getColumnName (''public.Streets'',''GID''), 11', 'SELECT ''gid''::TEXT,11');
 
-SELECT  results_eq('SELECT _pgr_getColumnName (''streets'',''ID''), 12', 'SELECT ''ID''::TEXT,12');  
-SELECT  results_eq('SELECT _pgr_getColumnName (''streets'',''id''), 13', 'SELECT NULL::TEXT,13');  
-SELECT  results_eq('SELECT _pgr_getColumnName (''Streets'',''id''), 14', 'SELECT NULL::TEXT,14'); 
+SELECT  results_eq('SELECT _pgr_getColumnName (''streets'',''ID''), 12', 'SELECT ''ID''::TEXT,12');
+SELECT  results_eq('SELECT _pgr_getColumnName (''streets'',''id''), 13', 'SELECT NULL::TEXT,13');
+SELECT  results_eq('SELECT _pgr_getColumnName (''Streets'',''id''), 14', 'SELECT NULL::TEXT,14');
 SELECT  results_eq('SELECT _pgr_getColumnName (''Streets'',''ID''), 15', 'SELECT ''ID''::TEXT,15');
 
 SET search_path TO "$user", public;
-SELECT  results_eq('SELECT _pgr_getColumnName (''public'',''streets'',''id''), 16', 'SELECT ''id''::TEXT,16');  
-SELECT  results_eq('SELECT _pgr_getColumnName (''public'',''streets'',''ID''), 17', 'SELECT ''id''::TEXT,17');  
-SELECT  results_eq('SELECT _pgr_getColumnName (''public'',''Streets'',''gid''), 18', 'SELECT ''gid''::TEXT,18');  
-SELECT  results_eq('SELECT _pgr_getColumnName (''public'',''Streets'',''GID''), 19', 'SELECT ''gid''::TEXT,19');  
-SELECT  results_eq('SELECT _pgr_getColumnName (''public'',''Streets'',''ID''), 20', 'SELECT NULL::TEXT,20');  
-SELECT  results_eq('SELECT _pgr_getColumnName (''s1'',''streets'',''ID''), 21', 'SELECT ''ID''::TEXT,21');  
-SELECT  results_eq('SELECT _pgr_getColumnName (''s1'',''streets'',''id''), 22', 'SELECT NULL::TEXT,22');  
-SELECT  results_eq('SELECT _pgr_getColumnName (''s1'',''Streets'',''id''), 23', 'SELECT NULL::TEXT,23'); 
-SELECT  results_eq('SELECT _pgr_getColumnName (''s1'',''Streets'',''ID''), 24', 'SELECT ''ID''::TEXT,24');  
+SELECT  results_eq('SELECT _pgr_getColumnName (''public'',''streets'',''id''), 16', 'SELECT ''id''::TEXT,16');
+SELECT  results_eq('SELECT _pgr_getColumnName (''public'',''streets'',''ID''), 17', 'SELECT ''id''::TEXT,17');
+SELECT  results_eq('SELECT _pgr_getColumnName (''public'',''Streets'',''gid''), 18', 'SELECT ''gid''::TEXT,18');
+SELECT  results_eq('SELECT _pgr_getColumnName (''public'',''Streets'',''GID''), 19', 'SELECT ''gid''::TEXT,19');
+SELECT  results_eq('SELECT _pgr_getColumnName (''public'',''Streets'',''ID''), 20', 'SELECT NULL::TEXT,20');
+SELECT  results_eq('SELECT _pgr_getColumnName (''s1'',''streets'',''ID''), 21', 'SELECT ''ID''::TEXT,21');
+SELECT  results_eq('SELECT _pgr_getColumnName (''s1'',''streets'',''id''), 22', 'SELECT NULL::TEXT,22');
+SELECT  results_eq('SELECT _pgr_getColumnName (''s1'',''Streets'',''id''), 23', 'SELECT NULL::TEXT,23');
+SELECT  results_eq('SELECT _pgr_getColumnName (''s1'',''Streets'',''ID''), 24', 'SELECT ''ID''::TEXT,24');
 
 SET search_path TO  s1,public;
 SELECT  results_eq('SELECT _pgr_getColumnName (''public'',''streets'',''ID''), 25', 'SELECT ''id''::TEXT,25');
 SELECT  results_eq('SELECT _pgr_getColumnName (''public'',''Streets'',''GID''), 26', 'SELECT ''gid''::TEXT,26');
 
-SELECT  results_eq('SELECT _pgr_getColumnName (''s1'',''streets'',''ID''), 27', 'SELECT ''ID''::TEXT,27');  
-SELECT  results_eq('SELECT _pgr_getColumnName (''s1'',''streets'',''id''), 28', 'SELECT NULL::TEXT,28');  
-SELECT  results_eq('SELECT _pgr_getColumnName (''s1'',''Streets'',''id''), 29', 'SELECT NULL::TEXT,29'); 
+SELECT  results_eq('SELECT _pgr_getColumnName (''s1'',''streets'',''ID''), 27', 'SELECT ''ID''::TEXT,27');
+SELECT  results_eq('SELECT _pgr_getColumnName (''s1'',''streets'',''id''), 28', 'SELECT NULL::TEXT,28');
+SELECT  results_eq('SELECT _pgr_getColumnName (''s1'',''Streets'',''id''), 29', 'SELECT NULL::TEXT,29');
 SELECT  results_eq('SELECT _pgr_getColumnName (''s1'',''Streets'',''ID''), 30', 'SELECT ''ID''::TEXT,30');
 
 -- becuase this dont test for schema or TABLE names the expected results are NULL
diff --git a/pgtap/common/getColumnType.test.sql b/pgtap/common/getColumnType.test.sql
index 50e4126..cdab9f5 100644
--- a/pgtap/common/getColumnType.test.sql
+++ b/pgtap/common/getColumnType.test.sql
@@ -14,24 +14,24 @@ CREATE TABLE s1."Streets" ("ID" SERIAL PRIMARY KEY, "SOURCE" INTEGER, "Target" I
 
 set client_min_messages  to notice;
 SELECT  results_eq('SELECT _pgr_getColumnType (''streets'', ''id''),  1', 'SELECT ''integer''::TEXT,  1');
-SELECT  results_eq('SELECT _pgr_getColumnType (''streets'', ''source''),  2', 'SELECT ''double precision''::TEXT,  2');  
-SELECT  results_eq('SELECT _pgr_getColumnType (''streets'', ''target''),  3', 'SELECT ''real''::TEXT,  3');  
-SELECT  results_eq('SELECT _pgr_getColumnType (''Streets'', ''GID''),  4', 'SELECT ''bigint''::TEXT,  4');  
-SELECT  results_eq('SELECT _pgr_getColumnType (''Streets'', ''SOURCE''),  5', 'SELECT ''text''::TEXT,  5');  
-SELECT  results_eq('SELECT _pgr_getColumnType (''Streets'', ''TARGET''),  6', 'SELECT ''integer''::TEXT,  6');  
+SELECT  results_eq('SELECT _pgr_getColumnType (''streets'', ''source''),  2', 'SELECT ''double precision''::TEXT,  2');
+SELECT  results_eq('SELECT _pgr_getColumnType (''streets'', ''target''),  3', 'SELECT ''real''::TEXT,  3');
+SELECT  results_eq('SELECT _pgr_getColumnType (''Streets'', ''GID''),  4', 'SELECT ''bigint''::TEXT,  4');
+SELECT  results_eq('SELECT _pgr_getColumnType (''Streets'', ''SOURCE''),  5', 'SELECT ''text''::TEXT,  5');
+SELECT  results_eq('SELECT _pgr_getColumnType (''Streets'', ''TARGET''),  6', 'SELECT ''integer''::TEXT,  6');
 
 SELECT  results_eq('SELECT _pgr_getColumnType (''s1.streets'', ''ID''),  7', 'SELECT ''integer''::TEXT, 7');
-SELECT  results_eq('SELECT _pgr_getColumnType (''s1.streets'', ''sour''),  8',  'SELECT ''double precision''::TEXT,  8');  
-SELECT  results_eq('SELECT _pgr_getColumnType (''s1.streets'', ''targ''),  9',  'SELECT ''real''::TEXT,  9');  
-SELECT  results_eq('SELECT _pgr_getColumnType (''s1.Streets'', ''ID''),  10', 'SELECT ''integer''::TEXT,  10');  
-SELECT  results_eq('SELECT _pgr_getColumnType (''s1.Streets'', ''SOURCE''),  11', 'SELECT ''integer''::TEXT,  11');  
-SELECT  results_eq('SELECT _pgr_getColumnType (''s1.Streets'', ''Target''),  12', 'SELECT ''integer''::TEXT,  12');  
+SELECT  results_eq('SELECT _pgr_getColumnType (''s1.streets'', ''sour''),  8',  'SELECT ''double precision''::TEXT,  8');
+SELECT  results_eq('SELECT _pgr_getColumnType (''s1.streets'', ''targ''),  9',  'SELECT ''real''::TEXT,  9');
+SELECT  results_eq('SELECT _pgr_getColumnType (''s1.Streets'', ''ID''),  10', 'SELECT ''integer''::TEXT,  10');
+SELECT  results_eq('SELECT _pgr_getColumnType (''s1.Streets'', ''SOURCE''),  11', 'SELECT ''integer''::TEXT,  11');
+SELECT  results_eq('SELECT _pgr_getColumnType (''s1.Streets'', ''Target''),  12', 'SELECT ''integer''::TEXT,  12');
 
 SET search_path TO  s1, public;
 SELECT  results_eq('SELECT _pgr_getColumnType (''public.streets'', ''ID''),  13', 'SELECT ''integer''::TEXT, 13');
 SELECT  results_eq('SELECT _pgr_getColumnType (''public.Streets'', ''GID''),  14', 'SELECT ''bigint''::TEXT, 14');
 
-SELECT  results_eq('SELECT _pgr_getColumnType (''streets'', ''ID''),  15',  'SELECT ''integer''::TEXT, 15');  
+SELECT  results_eq('SELECT _pgr_getColumnType (''streets'', ''ID''),  15',  'SELECT ''integer''::TEXT, 15');
 SELECT  results_eq('SELECT _pgr_getColumnType (''Streets'', ''ID''),  16',  'SELECT ''integer''::TEXT, 16');
 
 SET search_path TO "$user",  public;
diff --git a/pgtap/contraction/contraction-types-check.sql b/pgtap/contraction/contraction-types-check.sql
index bead151..9c3b4af 100644
--- a/pgtap/contraction/contraction-types-check.sql
+++ b/pgtap/contraction/contraction-types-check.sql
@@ -35,7 +35,7 @@ SELECT set_has(
     'parameters');
 
 
-CREATE OR REPLACE FUNCTION test_anyInteger(fn TEXT, params TEXT[], parameter TEXT) 
+CREATE OR REPLACE FUNCTION test_anyInteger(fn TEXT, params TEXT[], parameter TEXT)
 RETURNS SETOF TEXT AS
 $BODY$
 DECLARE
@@ -72,7 +72,7 @@ end_sql = ' FROM edge_table $$, ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true)
 END;
 $BODY$ LANGUAGE plpgsql;
 
-CREATE OR REPLACE FUNCTION test_anyNumerical(fn TEXT, params TEXT[], parameter TEXT) 
+CREATE OR REPLACE FUNCTION test_anyNumerical(fn TEXT, params TEXT[], parameter TEXT)
 RETURNS SETOF TEXT AS
 $BODY$
 DECLARE
diff --git a/pgtap/contraction/contraction_cycle_directed.sql b/pgtap/contraction/contraction_cycle_directed.sql
index 283b6fd..a632cf4 100644
--- a/pgtap/contraction/contraction_cycle_directed.sql
+++ b/pgtap/contraction/contraction_cycle_directed.sql
@@ -2,7 +2,7 @@
 
 SELECT plan(30);
 
-SET client_min_messages TO WARNING; 
+SET client_min_messages TO WARNING;
 
 PREPARE qempty AS
 SELECT * FROM ( VALUES (-1, 'v', -1, '{}', -1, -1, -1) ) AS t(seq, type, id, contracted_vertices, source, target, cost) WHERE 1 != 1 ;
diff --git a/pgtap/contraction/contraction_cycle_undirected.sql b/pgtap/contraction/contraction_cycle_undirected.sql
index 730a4a3..4b1133f 100644
--- a/pgtap/contraction/contraction_cycle_undirected.sql
+++ b/pgtap/contraction/contraction_cycle_undirected.sql
@@ -2,7 +2,7 @@
 
 SELECT plan(36);
 
-SET client_min_messages TO WARNING; 
+SET client_min_messages TO WARNING;
 
 PREPARE qempty AS
 SELECT * FROM ( VALUES (-1, 'v', -1, '{}', -1, -1, -1) ) AS t(seq, type, id, contracted_vertices, source, target, cost) WHERE 1 != 1 ;
diff --git a/pgtap/contraction/directed_dead_end.sql b/pgtap/contraction/directed_dead_end.sql
index 8c752bd..ad51f6f 100644
--- a/pgtap/contraction/directed_dead_end.sql
+++ b/pgtap/contraction/directed_dead_end.sql
@@ -3,23 +3,23 @@
 SELECT plan(39);
 
 SET client_min_messages TO WARNING;
--- TESTING ONE CYCLE OF DEAD END CONTRACTION FOR A DIRECTED GRAPH 
+-- TESTING ONE CYCLE OF DEAD END CONTRACTION FOR A DIRECTED GRAPH
 
 PREPARE qempty AS
-SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source, target, cost  
+SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source, target, cost
 FROM ( VALUES (-1, 'v', -1, ARRAY[]::bigint[], -1, -1, -1) ) AS t(seq, type, id, contracted_vertices, source, target, cost )
 WHERE 1 != 1;
 
 -- SINGLE EDGE
 -- no forbidden vertices
 PREPARE v2e1q10 AS
-SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source, target, cost 
+SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source, target, cost
 FROM pgr_contractgraph(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1',
     ARRAY[1]::integer[], 1, ARRAY[]::integer[], true);
 
 PREPARE v2e1q11 AS
-SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source, target, cost  
+SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source, target, cost
 FROM ( VALUES (1, 'v', 2, ARRAY[1]::bigint[], -1, -1, -1) ) AS t(seq, type, id, contracted_vertices, source, target, cost ) ;
 
 SELECT set_eq('v2e1q10', 'v2e1q11', 'SINGLE EDGE 1: Directed graph with single edge and no forbidden vertices');
@@ -27,13 +27,13 @@ SELECT set_eq('v2e1q10', 'v2e1q11', 'SINGLE EDGE 1: Directed graph with single e
 -- 1 is forbidden vertex
 
 PREPARE v2e1q20 AS
-SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source, target, cost 
+SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source, target, cost
 FROM pgr_contractgraph(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1',
     ARRAY[1]::integer[], 1, ARRAY[1]::INTEGER[], true);
 
 PREPARE v2e1q21 AS
-SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source, target, cost  
+SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source, target, cost
 FROM ( VALUES (1, 'v', 1, ARRAY[2]::bigint[], -1, -1, -1) ) AS t(seq, type, id, contracted_vertices, source, target, cost ) ;
 
 
@@ -43,13 +43,13 @@ SELECT set_eq('v2e1q20', 'v2e1q21', 'SINGLE EDGE 2: Directed graph with single e
 -- TWO EDGES
 -- no forbidden vertices
 PREPARE v3e2q10 AS
-SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source, target, cost 
+SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source, target, cost
 FROM pgr_contractgraph(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 2 OR id = 3',
     ARRAY[1]::integer[], 1, ARRAY[]::integer[], true);
 
 PREPARE v3e2q11 AS
-SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source, target, cost  
+SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source, target, cost
 FROM ( VALUES (1, 'v', 4, ARRAY[2, 3]::bigint[], -1, -1, -1) ) AS t(seq, type, id, contracted_vertices, source, target, cost ) ;
 
 SELECT set_eq('v3e2q10', 'v3e2q11', 'TWO EDGES 1: Directed graph two edges and no forbidden vertices');
@@ -61,7 +61,7 @@ SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source
     ARRAY[1]::INTEGER[], 1, ARRAY[3]::integer[], true);
 
 PREPARE v3e2q21 AS
-SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source, target, cost  
+SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source, target, cost
 FROM ( VALUES (1, 'v', 3, ARRAY[2,4]::bigint[], -1, -1, -1) ) AS t(seq, type, id, contracted_vertices, source, target, cost ) ;
 
 SELECT set_eq('v3e2q20', 'v3e2q21', 'TWO EDGES 2: Directed graph with two edges and vertex 3 as forbidden vertex');
@@ -73,7 +73,7 @@ SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source
     ARRAY[1]::INTEGER[], 1, ARRAY[2]::integer[], true);
 
 PREPARE v3e2q31 AS
-SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source, target, cost  
+SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source, target, cost
 FROM ( VALUES (1, 'v', 2, ARRAY[3,4]::bigint[], -1, -1, -1) ) AS t(seq, type, id, contracted_vertices, source, target, cost ) ;
 
 SELECT set_eq('v3e2q30', 'v3e2q31', 'TWO EDGES 3: Directed graph with two edges and vertex 2 as forbidden vertex');
@@ -85,7 +85,7 @@ SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source
     ARRAY[1]::integer[], 1, ARRAY[]::integer[], true);
 
 PREPARE v3e2q41 AS
-SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source, target, cost  
+SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source, target, cost
 FROM (VALUES (1, 'v', 10, ARRAY[6,11]::bigint[], -1, -1, -1) ) AS t(seq, type, id, contracted_vertices, source, target, cost ) ;
 
 SELECT set_eq('v3e2q40', 'v3e2q41', 'TWO EDGES 4: Directed graph with two edges and no forbidden vertices');
@@ -98,7 +98,7 @@ SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source
     ARRAY[1]::INTEGER[], 1, ARRAY[11]::integer[], true);
 
 PREPARE v3e2q51 AS
-SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source, target, cost  
+SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source, target, cost
 FROM (VALUES (1, 'v', 11, ARRAY[6,10]::bigint[], -1, -1, -1) ) AS t(seq, type, id, contracted_vertices, source, target, cost ) ;
 
 SELECT set_eq('v3e2q50', 'v3e2q51', 'TWO EDGES 5: Directed graph with two edges and no forbidden vertices');
diff --git a/pgtap/contraction/directed_linear.sql b/pgtap/contraction/directed_linear.sql
index 2d7c9c8..ea340e6 100644
--- a/pgtap/contraction/directed_linear.sql
+++ b/pgtap/contraction/directed_linear.sql
@@ -3,7 +3,7 @@
 SELECT plan(15);
 
 SET client_min_messages TO WARNING;
--- TESTING ONE CYCLE OF DEAD END CONTRACTION FOR AN UNDIRECTED GRAPH 
+-- TESTING ONE CYCLE OF DEAD END CONTRACTION FOR AN UNDIRECTED GRAPH
 
 PREPARE qempty AS
 SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source, target, cost  FROM ( VALUES (-1, 'e', -1, ARRAY[]::bigint[], -1, -1, -1) ) AS t(seq, type, id, contracted_vertices, source, target, cost) WHERE 1 != 1 ;
diff --git a/pgtap/contraction/undirected_dead_end.sql b/pgtap/contraction/undirected_dead_end.sql
index 1d869dc..780c1ea 100644
--- a/pgtap/contraction/undirected_dead_end.sql
+++ b/pgtap/contraction/undirected_dead_end.sql
@@ -3,10 +3,10 @@
 SELECT plan(26);
 
 SET client_min_messages TO WARNING;
--- TESTING ONE CYCLE OF DEAD END CONTRACTION FOR AN UNDIRECTED GRAPH 
+-- TESTING ONE CYCLE OF DEAD END CONTRACTION FOR AN UNDIRECTED GRAPH
 
 PREPARE qempty AS
-SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source, target, cost 
+SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source, target, cost
 FROM ( VALUES (-1, 'v', -1, ARRAY[]::bigint[], -1, -1, -1) ) AS t(seq, type, id, contracted_vertices, source, target, cost)
 WHERE 1 != 1;
 
diff --git a/pgtap/contraction/undirected_linear.sql b/pgtap/contraction/undirected_linear.sql
index 65f709b..15550ca 100644
--- a/pgtap/contraction/undirected_linear.sql
+++ b/pgtap/contraction/undirected_linear.sql
@@ -3,7 +3,7 @@
 SELECT plan(16);
 
 SET client_min_messages TO WARNING;
--- TESTING ONE CYCLE OF DEAD END CONTRACTION FOR AN UNDIRECTED GRAPH 
+-- TESTING ONE CYCLE OF DEAD END CONTRACTION FOR AN UNDIRECTED GRAPH
 
 PREPARE qempty AS
 SELECT seq, type, id, unnest(contracted_vertices) AS contracted_vertices, source, target, cost FROM ( VALUES (-1, 'e', -1, ARRAY[]::bigint[], -1, -1, -1) ) AS t(seq, type, id, contracted_vertices, source, target, cost) WHERE 1 != 1 ;
diff --git a/pgtap/deprecated/apspJohnson-v2-v3-equivalence.test.sql b/pgtap/deprecated/apspJohnson-v2-v3-equivalence.test.sql
index 25f38c7..aa5e592 100644
--- a/pgtap/deprecated/apspJohnson-v2-v3-equivalence.test.sql
+++ b/pgtap/deprecated/apspJohnson-v2-v3-equivalence.test.sql
@@ -34,16 +34,16 @@ FROM pgr_apspjohnson(
 SELECT is_empty('q1', '1: All values are positive');
 SELECT is_empty('q2', '2: All values are positive');
 SELECT is_empty('q3', '3: All values are positive');
-SELECT is_empty('q4', '4: All values are positiv: All values are positivee');
+SELECT is_empty('q4', '4: All values are positive: All values are positive');
 
 PREPARE q10 AS
-SELECT id1, id2, cost 
+SELECT id1, id2, cost
 FROM pgr_apspjohnson(
     'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edge_table ORDER BY id'
 );
 
 PREPARE q11 AS
-SELECT id1, id2, cost 
+SELECT id1, id2, cost
 FROM pgr_apspjohnson(
     'SELECT id, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table ORDER BY id'
 );
diff --git a/pgtap/deprecated/apspWarshall-v2-v3-equivalence-directed.test.sql b/pgtap/deprecated/apspWarshall-v2-v3-equivalence-directed.test.sql
index 17ef3e6..4778ff2 100644
--- a/pgtap/deprecated/apspWarshall-v2-v3-equivalence-directed.test.sql
+++ b/pgtap/deprecated/apspWarshall-v2-v3-equivalence-directed.test.sql
@@ -42,14 +42,14 @@ SELECT is_empty('q3', '3: No cost can be negative');
 SELECT is_empty('q4', '4: No cost can be negative');
 
 PREPARE q10 AS
-SELECT id1, id2, cost 
+SELECT id1, id2, cost
 FROM pgr_apspWarshall(
     'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edge_table ORDER BY id',
     TRUE, FALSE
 );
 
 PREPARE q11 AS
-SELECT id1, id2, cost 
+SELECT id1, id2, cost
 FROM pgr_apspWarshall(
     'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table ORDER BY id',
     TRUE, TRUE
diff --git a/pgtap/deprecated/apspWarshall-v2-v3-equivalence-undirected.test.sql b/pgtap/deprecated/apspWarshall-v2-v3-equivalence-undirected.test.sql
index 39baf32..c48b235 100644
--- a/pgtap/deprecated/apspWarshall-v2-v3-equivalence-undirected.test.sql
+++ b/pgtap/deprecated/apspWarshall-v2-v3-equivalence-undirected.test.sql
@@ -42,14 +42,14 @@ SELECT is_empty('q3', '3: No cost can be negative');
 SELECT is_empty('q4', '4: No cost can be negative');
 
 PREPARE q10 AS
-SELECT id1, id2, cost 
+SELECT id1, id2, cost
 FROM pgr_apspWarshall(
     'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edge_table ORDER BY id',
     FALSE, FALSE
 );
 
 PREPARE q11 AS
-SELECT id1, id2, cost 
+SELECT id1, id2, cost
 FROM pgr_apspWarshall(
     'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table ORDER BY id',
     FALSE, TRUE
diff --git a/pgtap/deprecated/astarV2.0-types-check2.sql b/pgtap/deprecated/astarV2.0-types-check2.sql
index 5508ba8..336d726 100644
--- a/pgtap/deprecated/astarV2.0-types-check2.sql
+++ b/pgtap/deprecated/astarV2.0-types-check2.sql
@@ -30,7 +30,7 @@ SET client_min_messages TO ERROR;
 SELECT has_function('pgr_astar', ARRAY['text', 'integer', 'integer', 'boolean', 'boolean']);
 SELECT function_returns('pgr_astar', ARRAY['text', 'integer', 'integer', 'boolean', 'boolean'],'setof pgr_costresult');
 
-CREATE OR REPLACE FUNCTION test_Integer(fn TEXT, params TEXT[], parameter TEXT) 
+CREATE OR REPLACE FUNCTION test_Integer(fn TEXT, params TEXT[], parameter TEXT)
 RETURNS SETOF TEXT AS
 $BODY$
 DECLARE
@@ -46,41 +46,41 @@ BEGIN
         start_sql = start_sql || p || ', ';
     END LOOP;
     end_sql = ' FROM edge_table $$, 2, 3, true, false)';
-    
+
     query := start_sql || '('|| parameter || ')::SMALLINT ' || end_sql;
     RETURN query SELECT throws_ok(query,
-        'XX000', 
+        'XX000',
         'Error, columns ''source'', ''target'' must be of type int4, ''cost'' must be of type float8',
         'SHOULD throw BECAUSE ' || parameter || ' is SMALLINT'
     );
-    
+
     query := start_sql || parameter || '::INTEGER ' || end_sql;
     RETURN query SELECT lives_ok(query);
 
     query := start_sql || parameter || '::BIGINT ' || end_sql;
     RETURN query SELECT throws_ok(query,
-        'XX000', 
+        'XX000',
         'Error, columns ''source'', ''target'' must be of type int4, ''cost'' must be of type float8',
         'SHOULD throw BECAUSE ' || parameter || ' is BIGINT'
     );
 
     query := start_sql || parameter || '::REAL ' || end_sql;
     RETURN query SELECT throws_ok(query,
-        'XX000', 
+        'XX000',
         'Error, columns ''source'', ''target'' must be of type int4, ''cost'' must be of type float8',
         'SHOULD throw BECAUSE ' || parameter || ' is REAL'
     );
 
     query := start_sql || parameter || '::FLOAT8 ' || end_sql;
     RETURN query SELECT throws_ok(query,
-        'XX000', 
+        'XX000',
         'Error, columns ''source'', ''target'' must be of type int4, ''cost'' must be of type float8',
         'SHOULD throw BECAUSE ' || parameter || ' is FLOAT8'
     );
 END;
 $BODY$ LANGUAGE plpgsql;
 
-CREATE OR REPLACE FUNCTION test_float8(fn TEXT, params TEXT[], parameter TEXT) 
+CREATE OR REPLACE FUNCTION test_float8(fn TEXT, params TEXT[], parameter TEXT)
 RETURNS SETOF TEXT AS
 $BODY$
 DECLARE
@@ -96,19 +96,19 @@ BEGIN
         start_sql = start_sql || p || ', ';
     END LOOP;
     end_sql = ' FROM edge_table $$, 2, 3, true, false)';
-    
+
     query := start_sql || parameter || '::SMALLINT ' || end_sql;
     RETURN query SELECT throws_like(query,
         '%must be of type float8',
         'SHOULD throw BECAUSE ' || parameter || ' is SMALLINT'
     );
-    
+
     query := start_sql || parameter || '::INTEGER ' || end_sql;
     RETURN query SELECT throws_like(query,
         '%must be of type float8',
         'SHOULD throw BECAUSE ' || parameter || ' is INTEGER'
     );
-    
+
     query := start_sql || parameter || '::BIGINT ' || end_sql;
     RETURN query SELECT throws_like(query,
         '%must be of type float8',
diff --git a/pgtap/deprecated/convenience-textToPoints-types-check.sql b/pgtap/deprecated/convenience-textToPoints-types-check.sql
index 12f25d6..1547db0 100644
--- a/pgtap/deprecated/convenience-textToPoints-types-check.sql
+++ b/pgtap/deprecated/convenience-textToPoints-types-check.sql
@@ -8,7 +8,7 @@ SELECT plan(2);
 
 SELECT has_function('pgr_texttopoints',ARRAY['text', 'integer']);
 
-SELECT todo('Documentation''s signature says it returns an integer',1); 
+SELECT todo('Documentation''s signature says it returns an integer',1);
 SELECT function_returns('pgr_texttopoints', ARRAY['text', 'integer'], 'integer');
 
 SELECT finish();
diff --git a/pgtap/deprecated/dijkstra-v2-equi-v3-directed-N-reverse.test.sql b/pgtap/deprecated/dijkstra-v2-equi-v3-directed-N-reverse.test.sql
index 38a3bc6..c612b90 100644
--- a/pgtap/deprecated/dijkstra-v2-equi-v3-directed-N-reverse.test.sql
+++ b/pgtap/deprecated/dijkstra-v2-equi-v3-directed-N-reverse.test.sql
@@ -28,23 +28,23 @@ SELECT seq, id1, id2, cost FROM pgr_dijkstra(
 
 PREPARE q2 AS
 SELECT seq - 1, node::INTEGER, edge::INTEGER, cost FROM pgr_dijkstra(
-    'SELECT  id::INTEGER, source::INTEGER, target::INTEGER, 
-    CASE WHEN cost<=0 THEN 999 ELSE cost END AS cost 
-    FROM edge_table ORDER BY id', 
+    'SELECT  id::INTEGER, source::INTEGER, target::INTEGER,
+    CASE WHEN cost<=0 THEN 999 ELSE cost END AS cost
+    FROM edge_table ORDER BY id',
     7, 11, true);
 
 
 PREPARE q3 AS
 SELECT seq - 1, node::INTEGER, edge::INTEGER, cost FROM pgr_dijkstra(
-    'SELECT  id, source, target, 
-    CASE WHEN cost<=0 THEN 999 ELSE cost END AS cost 
-    FROM edge_table ORDER BY id', 
+    'SELECT  id, source, target,
+    CASE WHEN cost<=0 THEN 999 ELSE cost END AS cost
+    FROM edge_table ORDER BY id',
     7, 11);
 
 PREPARE q4 AS
 SELECT seq - 1, node::INTEGER, edge::INTEGER, cost FROM pgr_dijkstra(
-        'SELECT id, source, target, cost 
-        FROM edge_table ORDER BY id', 
+        'SELECT id, source, target, cost
+        FROM edge_table ORDER BY id',
         7, 11);
 
 
@@ -52,25 +52,25 @@ PREPARE q5 AS
 SELECT seq - 1, node::INTEGER, edge::INTEGER, cost FROM pgr_dijkstra(
         'SELECT id, source, target, cost,
         -1 as reverse_cost
-        FROM edge_table ORDER BY id', 
+        FROM edge_table ORDER BY id',
         7, 11);
 
 PREPARE q6 AS
 SELECT seq - 1, node::INTEGER, edge::INTEGER, cost FROM pgr_dijkstra(
-        'SELECT id, source, target, cost 
-        FROM edge_table ORDER BY id', 
+        'SELECT id, source, target, cost
+        FROM edge_table ORDER BY id',
         ARRAY[7], 11);
 
 PREPARE q7 AS
 SELECT seq - 1, node::INTEGER, edge::INTEGER, cost FROM pgr_dijkstra(
-        'SELECT id, source, target, cost 
-        FROM edge_table ORDER BY id', 
+        'SELECT id, source, target, cost
+        FROM edge_table ORDER BY id',
         7, ARRAY[11]);
 
 PREPARE q8 AS
 SELECT seq - 1, node::INTEGER, edge::INTEGER, cost FROM pgr_dijkstra(
-        'SELECT id, source, target, cost 
-        FROM edge_table ORDER BY id', 
+        'SELECT id, source, target, cost
+        FROM edge_table ORDER BY id',
         ARRAY[7], ARRAY[11]);
 
 PREPARE q9 AS
diff --git a/pgtap/deprecated/dijkstra-v2-equi-v3-directed-W-reverse.test.sql b/pgtap/deprecated/dijkstra-v2-equi-v3-directed-W-reverse.test.sql
index af881e5..8ca1611 100644
--- a/pgtap/deprecated/dijkstra-v2-equi-v3-directed-W-reverse.test.sql
+++ b/pgtap/deprecated/dijkstra-v2-equi-v3-directed-W-reverse.test.sql
@@ -31,52 +31,52 @@ SELECT seq, id1, id2, cost FROM pgr_dijkstra(
 
 PREPARE q2 AS
 SELECT seq - 1, node::INTEGER, edge::INTEGER, cost FROM pgr_dijkstra(
-    'SELECT  id, source, target, 
-    CASE WHEN cost<=0 THEN 999 ELSE cost END AS cost, 
-    CASE WHEN reverse_cost<=0 THEN 999 ELSE reverse_cost END AS reverse_cost 
-    FROM edge_table ORDER BY id', 
+    'SELECT  id, source, target,
+    CASE WHEN cost<=0 THEN 999 ELSE cost END AS cost,
+    CASE WHEN reverse_cost<=0 THEN 999 ELSE reverse_cost END AS reverse_cost
+    FROM edge_table ORDER BY id',
     11, 5, true);
 
 
 PREPARE q3 AS
 SELECT seq - 1, node::INTEGER, edge::INTEGER, cost FROM pgr_dijkstra(
-    'SELECT  id, source, target, 
-    CASE WHEN cost<=0 THEN 999 ELSE cost END AS cost, 
-    CASE WHEN reverse_cost<=0 THEN 999 ELSE reverse_cost END AS reverse_cost 
-    FROM edge_table ORDER BY id', 
+    'SELECT  id, source, target,
+    CASE WHEN cost<=0 THEN 999 ELSE cost END AS cost,
+    CASE WHEN reverse_cost<=0 THEN 999 ELSE reverse_cost END AS reverse_cost
+    FROM edge_table ORDER BY id',
     11, 5);
 
 PREPARE q4 AS
 SELECT seq - 1, node::INTEGER, edge::INTEGER, cost FROM pgr_dijkstra(
-        'SELECT id, source, target, 
-        cost, 
-        reverse_cost 
-        FROM edge_table ORDER BY id', 
+        'SELECT id, source, target,
+        cost,
+        reverse_cost
+        FROM edge_table ORDER BY id',
         11, 5);
 
 
 PREPARE q5 AS
 SELECT seq - 1, node::INTEGER, edge::INTEGER, cost FROM pgr_dijkstra(
-        'SELECT * 
-        FROM edge_table ORDER BY id', 
+        'SELECT *
+        FROM edge_table ORDER BY id',
         11, 5);
 
 PREPARE q6 AS
 SELECT seq - 1, node::INTEGER, edge::INTEGER, cost FROM pgr_dijkstra(
-        'SELECT * 
-        FROM edge_table ORDER BY id', 
+        'SELECT *
+        FROM edge_table ORDER BY id',
         ARRAY[11], 5);
 
 PREPARE q7 AS
 SELECT seq - 1, node::INTEGER, edge::INTEGER, cost FROM pgr_dijkstra(
-        'SELECT * 
-        FROM edge_table ORDER BY id', 
+        'SELECT *
+        FROM edge_table ORDER BY id',
         11, ARRAY[5]);
 
 PREPARE q8 AS
 SELECT seq - 1, node::INTEGER, edge::INTEGER, cost FROM pgr_dijkstra(
-        'SELECT * 
-        FROM edge_table ORDER BY id', 
+        'SELECT *
+        FROM edge_table ORDER BY id',
         ARRAY[11], ARRAY[5]);
 
 PREPARE q9 AS
diff --git a/pgtap/deprecated/dijkstra-v2-equi-v3-undirected-N-reverse.test.sql b/pgtap/deprecated/dijkstra-v2-equi-v3-undirected-N-reverse.test.sql
index 7301825..5d6f620 100644
--- a/pgtap/deprecated/dijkstra-v2-equi-v3-undirected-N-reverse.test.sql
+++ b/pgtap/deprecated/dijkstra-v2-equi-v3-undirected-N-reverse.test.sql
@@ -31,23 +31,23 @@ SELECT seq, id1, id2, cost FROM pgr_dijkstra(
 
 PREPARE q2 AS
 SELECT seq - 1, node::INTEGER, edge::INTEGER, cost FROM pgr_dijkstra(
-    'SELECT  id, source, target, 
-    CASE WHEN cost<=0 THEN 999 ELSE cost END AS cost 
-    FROM edge_table ORDER BY id', 
+    'SELECT  id, source, target,
+    CASE WHEN cost<=0 THEN 999 ELSE cost END AS cost
+    FROM edge_table ORDER BY id',
     7, 11, false);
 
 
 PREPARE q3 AS
 SELECT seq - 1, node::INTEGER, edge::INTEGER, cost FROM pgr_dijkstra(
-    'SELECT id, source, target, 
-    CASE WHEN cost<=0 THEN 999 ELSE cost END AS cost 
-    FROM edge_table ORDER BY id', 
+    'SELECT id, source, target,
+    CASE WHEN cost<=0 THEN 999 ELSE cost END AS cost
+    FROM edge_table ORDER BY id',
     7, 11, false);
 
 PREPARE q4 AS
 SELECT seq - 1, node::INTEGER, edge::INTEGER, cost FROM pgr_dijkstra(
-        'SELECT id, source, target, cost 
-        FROM edge_table ORDER BY id', 
+        'SELECT id, source, target, cost
+        FROM edge_table ORDER BY id',
         7, 11, false);
 
 
@@ -55,25 +55,25 @@ PREPARE q5 AS
 SELECT seq - 1, node::INTEGER, edge::INTEGER, cost FROM pgr_dijkstra(
         'SELECT id, source, target, cost,
         -1 as reverse_cost
-        FROM edge_table ORDER BY id', 
+        FROM edge_table ORDER BY id',
         7, 11, false);
 
 PREPARE q6 AS
 SELECT seq - 1, node::INTEGER, edge::INTEGER, cost FROM pgr_dijkstra(
-        'SELECT id, source, target, cost 
-        FROM edge_table ORDER BY id', 
+        'SELECT id, source, target, cost
+        FROM edge_table ORDER BY id',
         ARRAY[7], 11, false);
 
 PREPARE q7 AS
 SELECT seq - 1, node::INTEGER, edge::INTEGER, cost FROM pgr_dijkstra(
-        'SELECT id, source, target, cost 
-        FROM edge_table ORDER BY id', 
+        'SELECT id, source, target, cost
+        FROM edge_table ORDER BY id',
         7, ARRAY[11], false);
 
 PREPARE q8 AS
 SELECT seq - 1, node::INTEGER, edge::INTEGER, cost FROM pgr_dijkstra(
-        'SELECT id, source, target, cost 
-        FROM edge_table ORDER BY id', 
+        'SELECT id, source, target, cost
+        FROM edge_table ORDER BY id',
         ARRAY[7], ARRAY[11], false);
 
 PREPARE q9 AS
diff --git a/pgtap/deprecated/dijkstra-v2-equi-v3-undirected-W-reverse.test.sql b/pgtap/deprecated/dijkstra-v2-equi-v3-undirected-W-reverse.test.sql
index 0ab0c50..2b48209 100644
--- a/pgtap/deprecated/dijkstra-v2-equi-v3-undirected-W-reverse.test.sql
+++ b/pgtap/deprecated/dijkstra-v2-equi-v3-undirected-W-reverse.test.sql
@@ -34,44 +34,44 @@ SELECT seq, id1, id2, cost FROM pgr_dijkstra(
 
 PREPARE q2 AS
 SELECT seq - 1, node::INTEGER, edge::INTEGER, cost FROM pgr_dijkstra(
-    'SELECT id, source, target, 
-    CASE WHEN cost<=0 THEN 999 ELSE cost END AS cost, 
-    CASE WHEN reverse_cost<=0 THEN 999 ELSE reverse_cost END AS reverse_cost 
-    FROM edge_table ORDER BY id', 
+    'SELECT id, source, target,
+    CASE WHEN cost<=0 THEN 999 ELSE cost END AS cost,
+    CASE WHEN reverse_cost<=0 THEN 999 ELSE reverse_cost END AS reverse_cost
+    FROM edge_table ORDER BY id',
     11, 5, false);
 
 
 PREPARE q4 AS
 SELECT seq - 1, node::INTEGER, edge::INTEGER, cost FROM pgr_dijkstra(
-        'SELECT id, source, target, 
-        cost, 
-        reverse_cost 
-        FROM edge_table ORDER BY id', 
+        'SELECT id, source, target,
+        cost,
+        reverse_cost
+        FROM edge_table ORDER BY id',
         11, 5, false);
 
 
 PREPARE q5 AS
 SELECT seq - 1, node::INTEGER, edge::INTEGER, cost FROM pgr_dijkstra(
-        'SELECT * 
-        FROM edge_table ORDER BY id', 
+        'SELECT *
+        FROM edge_table ORDER BY id',
         11, 5, false);
 
 PREPARE q6 AS
 SELECT seq - 1, node::INTEGER, edge::INTEGER, cost FROM pgr_dijkstra(
-        'SELECT * 
-        FROM edge_table ORDER BY id', 
+        'SELECT *
+        FROM edge_table ORDER BY id',
         ARRAY[11], 5, false);
 
 PREPARE q7 AS
 SELECT seq - 1, node::INTEGER, edge::INTEGER, cost FROM pgr_dijkstra(
-        'SELECT * 
-        FROM edge_table ORDER BY id', 
+        'SELECT *
+        FROM edge_table ORDER BY id',
         11, ARRAY[5], false);
 
 PREPARE q8 AS
 SELECT seq - 1, node::INTEGER, edge::INTEGER, cost FROM pgr_dijkstra(
-        'SELECT * 
-        FROM edge_table ORDER BY id', 
+        'SELECT *
+        FROM edge_table ORDER BY id',
         ARRAY[11], ARRAY[5], false);
 
 PREPARE q9 AS
diff --git a/pgtap/deprecated/dijkstraV2-types-check.sql b/pgtap/deprecated/dijkstraV2-types-check.sql
index 3d83836..d465fb9 100644
--- a/pgtap/deprecated/dijkstraV2-types-check.sql
+++ b/pgtap/deprecated/dijkstraV2-types-check.sql
@@ -11,8 +11,8 @@ SELECT can(ARRAY['pgr_dijkstra']);
 SELECT has_function('pgr_dijkstra', ARRAY['text','integer','integer','boolean','boolean']);
 SELECT function_returns('pgr_dijkstra', ARRAY['text','integer','integer','boolean','boolean'],'setof pgr_costresult');
 PREPARE v20q00 AS
-SELECT pg_typeof(seq)::text AS seq_t, pg_typeof(id1)::text AS id1_t, pg_typeof(id2)::text AS id2_1, pg_typeof(cost)::text AS cost_t 
-    FROM ( 
+SELECT pg_typeof(seq)::text AS seq_t, pg_typeof(id1)::text AS id1_t, pg_typeof(id2)::text AS id2_1, pg_typeof(cost)::text AS cost_t
+    FROM (
         SELECT * FROM pgr_dijkstra(
             'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table',
             2, 3, true, true) ) AS a
diff --git a/pgtap/deprecated/kdijkstra-issue229.test.sql b/pgtap/deprecated/kdijkstra-issue229.test.sql
index 18e41d6..9f9ab2c 100644
--- a/pgtap/deprecated/kdijkstra-issue229.test.sql
+++ b/pgtap/deprecated/kdijkstra-issue229.test.sql
@@ -3,14 +3,14 @@ SET client_min_messages=WARNING;
 
 SELECT plan(1);
 
-        
+
 SELECT set_eq(
 'SELECT *
 FROM pgr_kdijkstraPath(
     ''SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edge_table'',
     10, array[4,12], false, false)',
 
-'SELECT seq-1, end_vid::integer, node::integer, edge::integer, cost 
+'SELECT seq-1, end_vid::integer, node::integer, edge::integer, cost
 FROM pgr_dijkstra(
     ''SELECT id, source, target, cost FROM edge_table'',
     10, array[4,12], false)'
diff --git a/pgtap/deprecated/kdijkstra-issue333.test.sql b/pgtap/deprecated/kdijkstra-issue333.test.sql
index 8e8a553..51c72a5 100644
--- a/pgtap/deprecated/kdijkstra-issue333.test.sql
+++ b/pgtap/deprecated/kdijkstra-issue333.test.sql
@@ -3,7 +3,7 @@ SET client_min_messages= WARNING;
 
 SELECT plan(3);
 
-CREATE TABLE issue333 ( 
+CREATE TABLE issue333 (
     id serial,
     source integer,
     target integer,
@@ -19,17 +19,17 @@ SELECT seq-1, end_vid::integer, node::INTEGER, edge::INTEGER, cost FROM pgr_dijk
     'SELECT id, source, target, cost, reverse_cost FROM issue333',
     1, array[2], false);
 
-SELECT set_eq('q1', 
+SELECT set_eq('q1',
 'SELECT * FROM pgr_kDijkstraPath(
     ''SELECT id, source, target, cost, reverse_cost FROM issue333'',
     1, array[2], false, true)', '1');
 
-SELECT set_eq('q1', 
+SELECT set_eq('q1',
 'SELECT * FROM pgr_kDijkstraPath(
     ''SELECT id, source, target, cost, reverse_cost FROM issue333'',
     1, array[2], false, false)', '2');
 
-SELECT set_eq('q1', 
+SELECT set_eq('q1',
 'SELECT * FROM pgr_kDijkstraPath(
     ''SELECT id, source, target, cost, reverse_cost FROM issue333'',
     1, array[2], true, true)', '3');
diff --git a/pgtap/deprecated/kdijkstraCost-dijkstraCost-compare.test.sql b/pgtap/deprecated/kdijkstraCost-dijkstraCost-compare.test.sql
index f5b51ca..0ed79f3 100644
--- a/pgtap/deprecated/kdijkstraCost-dijkstraCost-compare.test.sql
+++ b/pgtap/deprecated/kdijkstraCost-dijkstraCost-compare.test.sql
@@ -1,6 +1,6 @@
 
 /*
-This test is for the equivalence of 
+This test is for the equivalence of
 pgr_ kdijstraCost with pgr_dijkstraCost one to many
 with
 one to many dijkstra
diff --git a/pgtap/deprecated/kdijkstraCost-errors-exceptions-cost.test.sql b/pgtap/deprecated/kdijkstraCost-errors-exceptions-cost.test.sql
index 54fbb0e..8cbf44a 100644
--- a/pgtap/deprecated/kdijkstraCost-errors-exceptions-cost.test.sql
+++ b/pgtap/deprecated/kdijkstraCost-errors-exceptions-cost.test.sql
@@ -1,6 +1,6 @@
 
 /*
-This test is for the equivalence of 
+This test is for the equivalence of
 pgr_ kdijstra with pgr_dijkstra one to many
 with
 one to many dijkstra
diff --git a/pgtap/deprecated/kdijkstraPath-dijkstra-compare.test.sql b/pgtap/deprecated/kdijkstraPath-dijkstra-compare.test.sql
index cc9b8a2..00b49c7 100644
--- a/pgtap/deprecated/kdijkstraPath-dijkstra-compare.test.sql
+++ b/pgtap/deprecated/kdijkstraPath-dijkstra-compare.test.sql
@@ -1,6 +1,6 @@
 
 /*
-This test is for the equivalence of 
+This test is for the equivalence of
 pgr_ kdijstraPath with pgr_dijkstra one to many
 with
 one to many dijkstra
diff --git a/pgtap/deprecated/kdijkstraPath-errors-exceptions-path.test.sql b/pgtap/deprecated/kdijkstraPath-errors-exceptions-path.test.sql
index 9a6bb64..4dd59ac 100644
--- a/pgtap/deprecated/kdijkstraPath-errors-exceptions-path.test.sql
+++ b/pgtap/deprecated/kdijkstraPath-errors-exceptions-path.test.sql
@@ -1,6 +1,6 @@
 
 /*
-This test is for the equivalence of 
+This test is for the equivalence of
 pgr_ kdijstraPath with pgr_dijkstra one to many
 with
 one to many dijkstra
diff --git a/pgtap/deprecated/maxflowboykovkolmogorov-types-check.sql b/pgtap/deprecated/maxflowboykovkolmogorov-types-check.sql
index 045cbdc..e4f87cd 100644
--- a/pgtap/deprecated/maxflowboykovkolmogorov-types-check.sql
+++ b/pgtap/deprecated/maxflowboykovkolmogorov-types-check.sql
@@ -59,7 +59,7 @@ SELECT lives_ok('t4','pgr_maxFlowBoykovKolmogorov(Many to Many)');
 
 -- preparing for testing return types
 PREPARE all_return AS
-SELECT  
+SELECT
     'integer'::text AS t1,
     'bigint'::text AS t2,
     'bigint'::text AS t3,
diff --git a/pgtap/deprecated/maxflowedmondskarp-types-check.sql b/pgtap/deprecated/maxflowedmondskarp-types-check.sql
index 48b98c8..369180a 100644
--- a/pgtap/deprecated/maxflowedmondskarp-types-check.sql
+++ b/pgtap/deprecated/maxflowedmondskarp-types-check.sql
@@ -63,7 +63,7 @@ SELECT lives_ok('t4','pgr_pgr_maxflowedmondskarp(many to many)');
 
 -- preparing for testing return types
 PREPARE all_return AS
-SELECT  
+SELECT
     'integer'::text AS t1,
     'bigint'::text AS t2,
     'bigint'::text AS t3,
diff --git a/pgtap/deprecated/maxflowpushrelabel-types-check.sql b/pgtap/deprecated/maxflowpushrelabel-types-check.sql
index 07f3d79..9c68fc8 100644
--- a/pgtap/deprecated/maxflowpushrelabel-types-check.sql
+++ b/pgtap/deprecated/maxflowpushrelabel-types-check.sql
@@ -63,7 +63,7 @@ SELECT lives_ok('t4','pgr_pgr_maxflowpushrelabel(many to many)');
 
 -- preparing for testing return types
 PREPARE all_return AS
-SELECT  
+SELECT
     'integer'::text AS t1,
     'bigint'::text AS t2,
     'bigint'::text AS t3,
diff --git a/pgtap/deprecated/no_underscored-2x.test.sql b/pgtap/deprecated/no_underscored-2x.test.sql
index 0eb73f4..96c1d3f 100644
--- a/pgtap/deprecated/no_underscored-2x.test.sql
+++ b/pgtap/deprecated/no_underscored-2x.test.sql
@@ -5,7 +5,7 @@
 SELECT plan(18);
 
 set client_min_messages to WARNING;
-SELECT  results_eq('SELECT  1, sname, tname  FROM pgr_getTableName(''EDGe_table'')', 
+SELECT  results_eq('SELECT  1, sname, tname  FROM pgr_getTableName(''EDGe_table'')',
     'SELECT 1, ''public''::TEXT, ''edge_table''::TEXT ');
 SELECT  results_eq('SELECT  2, sname, tname FROM pgr_getTableName(''EDes2'')',
     'SELECT 2, ''public''::TEXT, NULL::TEXT ');
@@ -54,7 +54,7 @@ SELECT  results_eq('SELECT  16, pgr_quote_ident(''idname.text'') ',
 SELECT  results_eq('SELECT  17, pgr_startPoint(the_geom)::TEXT  FROM edge_table where id = 1 ',
     'SELECT 17, ''010100000000000000000000400000000000000000''::TEXT ');
 
-SELECT  results_eq('SELECT  18, pgr_endPoint(the_geom)::TEXT  FROM edge_table where id = 1 ', 
+SELECT  results_eq('SELECT  18, pgr_endPoint(the_geom)::TEXT  FROM edge_table where id = 1 ',
     'SELECT 18, ''01010000000000000000000040000000000000F03F''::TEXT ');
 
 -- Finish the tests and clean up.
diff --git a/pgtap/dijkstra/dijkstra-issue-353.test.sql b/pgtap/dijkstra/dijkstra-issue-353.test.sql
index 0ceaf51..d1123b9 100644
--- a/pgtap/dijkstra/dijkstra-issue-353.test.sql
+++ b/pgtap/dijkstra/dijkstra-issue-353.test.sql
@@ -7,18 +7,18 @@ SELECT * FROM pgr_dijkstra( 'select id, source, target, cost from edge_table',
     array[2,7], array[5,6]);
 
 PREPARE q2 AS
-SELECT * FROM pgr_dijkstra( 'select id, source, target, cost from edge_table', 
+SELECT * FROM pgr_dijkstra( 'select id, source, target, cost from edge_table',
     array[2,7], array[17,18]);
 
 Prepare q3 AS
 (SELECT * FROM pgr_dijkstra( 'select id, source, target, cost from edge_table',
         array[2,7], array[5,6]))
 UNION
-(SELECT * FROM pgr_dijkstra( 'select id, source, target, cost from edge_table', 
+(SELECT * FROM pgr_dijkstra( 'select id, source, target, cost from edge_table',
         array[2,7], array[17,18]));
 
 PREPARE q4 AS
-SELECT * FROM pgr_dijkstra( 'select id, source, target, cost from edge_table', 
+SELECT * FROM pgr_dijkstra( 'select id, source, target, cost from edge_table',
     array[2,7], array[5,6,17,18]);
 
 SELECT is_empty( 'q2', '1');
diff --git a/pgtap/dijkstra/dijkstra-types-check.sql b/pgtap/dijkstra/dijkstra-types-check.sql
index d10f945..3df96d5 100644
--- a/pgtap/dijkstra/dijkstra-types-check.sql
+++ b/pgtap/dijkstra/dijkstra-types-check.sql
@@ -36,8 +36,8 @@ SELECT function_returns('pgr_dijkstra', ARRAY['text','anyarray','anyarray','bool
 PREPARE v21q00 AS
 SELECT pg_typeof(seq)::text AS t1, pg_typeof(path_seq)::text AS t2,
     pg_typeof(node)::text AS t5, pg_typeof(edge)::text AS t6,
-    pg_typeof(cost)::text AS t7, pg_typeof(agg_cost)::TEXT AS t8 
-    FROM ( 
+    pg_typeof(cost)::text AS t7, pg_typeof(agg_cost)::TEXT AS t8
+    FROM (
         SELECT * FROM pgr_dijkstra(
             'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table',
             2, 3, true) ) AS a
@@ -52,8 +52,8 @@ PREPARE v21q10 AS
 SELECT pg_typeof(seq)::text AS t1, pg_typeof(path_seq)::text AS t2,
     pg_typeof(end_vid)::text AS t4,
     pg_typeof(node)::text AS t5, pg_typeof(edge)::text AS t6,
-    pg_typeof(cost)::text AS t7, pg_typeof(agg_cost)::TEXT AS t8 
-    FROM ( 
+    pg_typeof(cost)::text AS t7, pg_typeof(agg_cost)::TEXT AS t8
+    FROM (
         SELECT * FROM pgr_dijkstra(
             'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table',
             2, ARRAY[3], true) ) AS a
@@ -70,8 +70,8 @@ PREPARE v21q20 AS
 SELECT pg_typeof(seq)::text AS t1, pg_typeof(path_seq)::text AS t2,
     pg_typeof(start_vid)::text AS t3,
     pg_typeof(node)::text AS t5, pg_typeof(edge)::text AS t6,
-    pg_typeof(cost)::text AS t7, pg_typeof(agg_cost)::TEXT AS t8 
-    FROM ( 
+    pg_typeof(cost)::text AS t7, pg_typeof(agg_cost)::TEXT AS t8
+    FROM (
         SELECT * FROM pgr_dijkstra(
             'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table',
             ARRAY[2], 3, true) ) AS a
@@ -88,7 +88,7 @@ SELECT pg_typeof(seq)::text AS t1, pg_typeof(path_seq)::text AS t2,
     pg_typeof(start_vid)::text AS t3, pg_typeof(end_vid)::text AS t4,
     pg_typeof(node)::text AS t5, pg_typeof(edge)::text AS t6,
     pg_typeof(cost)::text AS t7, pg_typeof(agg_cost)::TEXT AS t8
-    FROM ( 
+    FROM (
         SELECT * FROM pgr_dijkstra(
             'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table',
             ARRAY[2], ARRAY[3], true) ) AS a
diff --git a/pgtap/dijkstra/dijkstraCost-types-check.sql b/pgtap/dijkstra/dijkstraCost-types-check.sql
index 6ff2bb7..be9738b 100644
--- a/pgtap/dijkstra/dijkstraCost-types-check.sql
+++ b/pgtap/dijkstra/dijkstraCost-types-check.sql
@@ -20,63 +20,63 @@ SELECT function_returns('pgr_dijkstracost', ARRAY['text','anyarray','anyarray','
 -- testing for the 4 signatures that they return the correct names & columns
 -- Preparing
 PREPARE v21q00 AS
-SELECT 
+SELECT
     pg_typeof(start_vid)::text AS t3, pg_typeof(end_vid)::text AS t4,
-    pg_typeof(agg_cost)::TEXT AS t8 
-    FROM ( 
+    pg_typeof(agg_cost)::TEXT AS t8
+    FROM (
         SELECT * FROM pgr_dijkstracost(
             'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table',
             2, 3, true) ) AS a
     limit 1
 ;
 PREPARE v21q01 AS
-SELECT  
+SELECT
     'bigint'::text AS t3, 'bigint'::text AS t4,
     'double precision'::text AS t8;
 
 PREPARE v21q10 AS
-SELECT 
+SELECT
     pg_typeof(start_vid)::text AS t3, pg_typeof(end_vid)::text AS t4,
-    pg_typeof(agg_cost)::TEXT AS t8 
-    FROM ( 
+    pg_typeof(agg_cost)::TEXT AS t8
+    FROM (
         SELECT * FROM pgr_dijkstracost(
             'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table',
             2, ARRAY[3], true) ) AS a
     limit 1
 ;
 PREPARE v21q11 AS
-SELECT  
+SELECT
     'bigint'::text AS t3, 'bigint'::text AS t4,
     'double precision'::text AS t8;
 
 
 PREPARE v21q20 AS
-SELECT 
+SELECT
     pg_typeof(start_vid)::text AS t3, pg_typeof(end_vid)::text AS t4,
-    pg_typeof(agg_cost)::TEXT AS t8 
-    FROM ( 
+    pg_typeof(agg_cost)::TEXT AS t8
+    FROM (
         SELECT * FROM pgr_dijkstracost(
             'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table',
             ARRAY[2], 3, true) ) AS a
     limit 1
 ;
 PREPARE v21q21 AS
-SELECT  
+SELECT
     'bigint'::text AS t3, 'bigint'::text AS t4,
     'double precision'::text AS t8;
 
 PREPARE v21q30 AS
-SELECT 
+SELECT
     pg_typeof(start_vid)::text AS t3, pg_typeof(end_vid)::text AS t4,
-    pg_typeof(agg_cost)::TEXT AS t8 
-    FROM ( 
+    pg_typeof(agg_cost)::TEXT AS t8
+    FROM (
         SELECT * FROM pgr_dijkstracost(
             'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table',
             ARRAY[2], ARRAY[3], true) ) AS a
     limit 1
 ;
 PREPARE v21q31 AS
-SELECT  
+SELECT
     'bigint'::text AS t3, 'bigint'::text AS t4,
     'double precision'::text AS t8;
 
diff --git a/pgtap/dijkstra/dijkstraVia-types-check.sql b/pgtap/dijkstra/dijkstraVia-types-check.sql
index 92f5c31..f57811b 100644
--- a/pgtap/dijkstra/dijkstraVia-types-check.sql
+++ b/pgtap/dijkstra/dijkstraVia-types-check.sql
@@ -17,7 +17,7 @@ SELECT pg_typeof(seq)::text AS t1, pg_typeof(path_id)::text AS path_id, pg_typeo
     pg_typeof(node)::text AS t5, pg_typeof(edge)::text AS t6,
     pg_typeof(cost)::text AS t7, pg_typeof(agg_cost)::TEXT AS t8,
     pg_typeof(route_agg_cost)::TEXT AS t9
-    FROM ( 
+    FROM (
         SELECT * FROM pgr_dijkstravia(
             'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT, reverse_cost::FLOAT FROM edge_table',
             ARRAY[2,3,11]) ) AS a
diff --git a/pgtap/dijkstra/oneToOne_equiv_manyToMany.test.sql b/pgtap/dijkstra/oneToOne_equiv_manyToMany.test.sql
index ba2b354..131becc 100644
--- a/pgtap/dijkstra/oneToOne_equiv_manyToMany.test.sql
+++ b/pgtap/dijkstra/oneToOne_equiv_manyToMany.test.sql
@@ -18,23 +18,23 @@ BEGIN
     sql_Many := '';
     FOR i IN 1.. cant LOOP
         IF (i > 1) THEN sql_Many := sql_Many ||', '; END IF;
-            sql_Many := sql_Many || i ; 
+            sql_Many := sql_Many || i ;
     END LOOP;
 
     FOR i IN 1.. cant LOOP
         FOR j IN 1..cant LOOP
 
             IF NOT (i = 1 AND j = 1) THEN
-                sql_OneToOne := sql_OneToOne ||' UNION ALL'; 
+                sql_OneToOne := sql_OneToOne ||' UNION ALL';
             END IF;
-            sql_OneToOne := sql_OneToOne || 
+            sql_OneToOne := sql_OneToOne ||
             '( SELECT seq, ' || i || 'as start_vid, ' || j || 'as end_vid, node, edge, cost, agg_cost  FROM pgr_dijkstra(
                     ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', '
                     || i || ', ' || j ||
                     ') )';
         END LOOP;
     END LOOP;
-    sql_Many := 
+    sql_Many :=
     ' SELECT path_seq,  start_vid,  end_vid, node, edge, cost, agg_cost FROM pgr_dijkstra(
         ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', '
         || ' ARRAY[' || sql_Many  ||'], ARRAY[' || sql_Many ||
diff --git a/pgtap/dijkstra/oneToOne_equiv_manyToOne.test.sql b/pgtap/dijkstra/oneToOne_equiv_manyToOne.test.sql
index 0c76ded..296aded 100644
--- a/pgtap/dijkstra/oneToOne_equiv_manyToOne.test.sql
+++ b/pgtap/dijkstra/oneToOne_equiv_manyToOne.test.sql
@@ -21,17 +21,17 @@ BEGIN
 
             IF j > 1 THEN
                 sql_OneToOne := sql_OneToOne
-                ||' UNION ALL'; 
-                sql_Many := sql_Many ||', '; 
+                ||' UNION ALL';
+                sql_Many := sql_Many ||', ';
     END IF;
-    sql_OneToOne := sql_OneToOne || 
+    sql_OneToOne := sql_OneToOne ||
     '( SELECT seq, ' || j || 'as start_vid, ' || i || 'as end_vid, node, edge, cost::text, agg_cost::text  FROM pgr_dijkstra(
             ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', '
             || j || ', ' || i ||
             ') )';
-    sql_Many := sql_Many || j ; 
+    sql_Many := sql_Many || j ;
 END LOOP;
-sql_Many := 
+sql_Many :=
 ' SELECT path_seq, start_vid, ' || i || ' as end_vid, node, edge, cost::text, agg_cost::text FROM pgr_dijkstra(
     ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', '
     ' ARRAY[' || sql_Many || '], ' || i ||
diff --git a/pgtap/dijkstra/oneToOne_equiv_oneToMany.test.sql b/pgtap/dijkstra/oneToOne_equiv_oneToMany.test.sql
index 5a69ef7..05ed03c 100644
--- a/pgtap/dijkstra/oneToOne_equiv_oneToMany.test.sql
+++ b/pgtap/dijkstra/oneToOne_equiv_oneToMany.test.sql
@@ -21,17 +21,17 @@ BEGIN
 
             IF j > 1 THEN
                 sql_OneToOne := sql_OneToOne
-                ||' UNION ALL'; 
-                sql_OneToMany := sql_OneToMany ||', '; 
+                ||' UNION ALL';
+                sql_OneToMany := sql_OneToMany ||', ';
     END IF;
-    sql_OneToOne := sql_OneToOne || 
+    sql_OneToOne := sql_OneToOne ||
     '( SELECT seq, ' || i || 'as start_vid, ' || j || 'as end_vid, node, edge, cost, agg_cost  FROM pgr_dijkstra(
             ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', '
             || i || ', ' || j ||
             ', ' || flag || ' ) )';
-    sql_OneToMany := sql_OneToMany || j ; 
+    sql_OneToMany := sql_OneToMany || j ;
 END LOOP;
-sql_OneToMany := 
+sql_OneToMany :=
 ' SELECT path_seq, ' || i || ' as start_vid,  end_vid, node, edge, cost, agg_cost FROM pgr_dijkstra(
     ''SELECT id, source, target, cost, reverse_cost FROM edge_table'', '
     || i || ', ARRAY[' || sql_OneToMany ||
diff --git a/src/lineGraph/test/pgtap/lineGraph-innerQuery.sql b/pgtap/lineGraph/lineGraph-innerQuery.sql
similarity index 100%
rename from src/lineGraph/test/pgtap/lineGraph-innerQuery.sql
rename to pgtap/lineGraph/lineGraph-innerQuery.sql
diff --git a/src/lineGraph/test/pgtap/lineGraph-typesCheck.sql b/pgtap/lineGraph/lineGraph-typesCheck.sql
similarity index 100%
rename from src/lineGraph/test/pgtap/lineGraph-typesCheck.sql
rename to pgtap/lineGraph/lineGraph-typesCheck.sql
diff --git a/pgtap/lineGraph/lineGraphFull-innerQuery.sql b/pgtap/lineGraph/lineGraphFull-innerQuery.sql
new file mode 100644
index 0000000..ba7c740
--- /dev/null
+++ b/pgtap/lineGraph/lineGraphFull-innerQuery.sql
@@ -0,0 +1,11 @@
+SELECT plan(2);
+
+SET client_min_messages TO ERROR;
+
+SELECT has_function('pgr_linegraphfull',
+    'text');
+
+SELECT function_returns('pgr_linegraphfull', 'setof record');
+
+SELECT finish();
+ROLLBACK;
diff --git a/pgtap/lineGraph/lineGraphFull-reverse_cost_equivalence.sql b/pgtap/lineGraph/lineGraphFull-reverse_cost_equivalence.sql
new file mode 100644
index 0000000..967ed3e
--- /dev/null
+++ b/pgtap/lineGraph/lineGraphFull-reverse_cost_equivalence.sql
@@ -0,0 +1,9 @@
+SELECT plan(1);
+
+SELECT bag_has(
+  $$SELECT * FROM pgr_lineGraphFull('select id, source, target, cost, reverse_cost from edge_table where id =1')$$,
+  $$SELECT * FROM pgr_lineGraphFull(
+    'select id, source, target, cost from edge_table where id = 1
+     UNION ALL
+     select -1*id, target AS source, source AS target, reverse_cost AS cost from edge_table where id = 1')$$
+);
diff --git a/pgtap/lineGraph/lineGraphFull-typesCheck.sql b/pgtap/lineGraph/lineGraphFull-typesCheck.sql
new file mode 100644
index 0000000..808761a
--- /dev/null
+++ b/pgtap/lineGraph/lineGraphFull-typesCheck.sql
@@ -0,0 +1,12 @@
+
+SELECT plan(3);
+
+SELECT has_function('pgr_linegraphfull');
+
+SELECT function_returns('pgr_linegraphfull','setof record');
+
+-- testing column names
+SELECT bag_has(
+    $$SELECT  proargnames from pg_proc where proname = 'pgr_linegraphfull'$$,
+    $$SELECT  '{"","seq","source","target","cost","edge"}'::TEXT[] $$
+);
diff --git a/pgtap/lineGraph/lineGraphFull_dijkstra_equivalence.sql b/pgtap/lineGraph/lineGraphFull_dijkstra_equivalence.sql
new file mode 100644
index 0000000..00d63ac
--- /dev/null
+++ b/pgtap/lineGraph/lineGraphFull_dijkstra_equivalence.sql
@@ -0,0 +1,140 @@
+/*PGR-GNU*****************************************************************
+
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+\i setup.sql
+
+SELECT plan(1);
+
+DROP TABLE IF EXISTS result2;
+CREATE TABLE result2(
+  seq integer,
+  source bigint,
+  target bigint,
+  cost float,
+  edge bigint);
+
+DROP TABLE IF EXISTS result2_vertices_pgr;
+CREATE TABLE result2_vertices_pgr(
+  id bigint, 
+  original_id bigint);
+
+CREATE or REPLACE FUNCTION lineGraphFullDijkstraEquivalence(cant INTEGER default 17)
+RETURNS SETOF TEXT AS
+$BODY$
+DECLARE
+turnpenalty_sql TEXT;
+original_sql TEXT;
+BEGIN
+
+  INSERT INTO result2 SELECT * FROM pgr_lineGraphFull(
+      $$SELECT id, source, target, cost, reverse_cost
+      FROM edge_table$$
+  );
+
+  WITH foo AS (SELECT source AS id FROM result2
+      UNION
+      SELECT target FROM result2) 
+  INSERT INTO result2_vertices_pgr SELECT *, NULL::BIGINT AS original_id
+  FROM foo
+  ORDER BY id;
+ 
+  UPDATE result2_vertices_pgr AS r SET original_id = v.id
+  FROM edge_table_vertices_pgr AS v WHERE v.id = r.id;
+ 
+  WITH a AS (SELECT e.id, e.original_id FROM result2_vertices_pgr AS e WHERE original_id IS NOT NULL),
+  b AS (SELECT * FROM result2 WHERE cost = 0 and source IN (SELECT id FROM a)),
+  c AS (SELECT * FROM b JOIN result2_vertices_pgr ON(source = id)),
+  d AS (SELECT c.source, v.original_id FROM c JOIN result2_vertices_pgr as v ON (target=v.id)),
+  e AS (SELECT DISTINCT c.target, c.original_id FROM c JOIN result2_vertices_pgr AS r ON(target = r.id AND r.original_id IS NULL))
+  UPDATE result2_vertices_pgr SET original_id = e.original_id FROM e WHERE e.target = id;
+
+  WITH a AS (SELECT e.id, e.original_id FROM result2_vertices_pgr AS e WHERE original_id IS NOT NULL),
+  b AS (SELECT * FROM result2 WHERE cost = 0 and target IN (SELECT id FROM a)),
+  c AS (SELECT * FROM b JOIN result2_vertices_pgr ON(target = id)),
+  d AS (SELECT c.target, v.original_id FROM c JOIN result2_vertices_pgr as v ON (source=v.id)),
+  e AS (SELECT DISTINCT c.source, c.original_id FROM c JOIN result2_vertices_pgr AS r ON(source = r.id AND r.original_id IS NULL))
+  UPDATE result2_vertices_pgr SET original_id = e.original_id FROM e WHERE e.source = id;
+
+  WITH a AS (SELECT id FROM result2_vertices_pgr WHERE original_id IS NULL),
+  b AS (SELECT source,edge FROM result2 WHERE source IN (SELECT id FROM a)),
+  c AS (SELECT id,source FROM edge_table WHERE id IN (SELECT edge FROM b))
+  UPDATE result2_vertices_pgr AS d SET original_id = (SELECT source FROM c WHERE c.id = (SELECT edge FROM b WHERE b.source = d.id)) WHERE id IN (SELECT id FROM a);
+
+  WITH a AS (SELECT id FROM result2_vertices_pgr WHERE original_id IS NULL),
+  b AS (SELECT target,edge FROM result2 WHERE target IN (SELECT id FROM a)),
+  c AS (SELECT id,target FROM edge_table WHERE id IN (SELECT edge FROM b))
+  UPDATE result2_vertices_pgr AS d SET original_id = (SELECT target FROM c WHERE c.id = (SELECT edge FROM b WHERE b.target = d.id)) WHERE id IN (SELECT id FROM a);
+
+  ALTER TABLE result2 ADD COLUMN original_source_vertex BIGINT;
+  ALTER TABLE result2 ADD COLUMN original_target_vertex BIGINT;
+  ALTER TABLE result2 ADD COLUMN original_source_edge BIGINT;
+  ALTER TABLE result2 ADD COLUMN original_target_edge BIGINT;
+
+  UPDATE result2 AS edges SET original_source_vertex = vertices.original_id
+  FROM result2_vertices_pgr AS vertices WHERE edges.source = vertices.id;
+
+  UPDATE result2 AS edges SET original_target_vertex = vertices.original_id
+  FROM result2_vertices_pgr AS vertices WHERE edges.target = vertices.id;
+
+  UPDATE result2
+  SET original_source_edge = edge,
+      original_target_edge = edge
+  WHERE edge != 0;
+
+  UPDATE  result2 AS a
+  SET original_source_edge = b.edge
+  FROM result2 AS b
+  WHERE 
+      a.original_source_edge IS NULL AND
+      b.original_source_edge IS NOT NULL AND
+      a.source = b.target;
+
+  UPDATE  result2 AS a
+  SET original_target_edge = b.edge
+  FROM result2 AS b
+  WHERE 
+      a.original_target_edge IS NULL AND
+      b.original_target_edge IS NOT NULL AND
+      a.target = b.source;
+
+  turnpenalty_sql :=
+  'WITH q_result_1 AS (SELECT * FROM pgr_dijkstra($$SELECT seq AS id, * FROM result2$$,
+      (SELECT array_agg(id) FROM result2_vertices_pgr where original_id = 2),
+      (SELECT array_agg(id) FROM result2_vertices_pgr where original_id = 3)
+  )),
+  a AS (
+      SELECT * FROM q_result_1
+      WHERE start_vid = -3 AND end_vid = 3 AND (cost != 0 OR edge = -1))
+  SELECT agg_cost FROM a';
+
+  original_sql :=
+  'SELECT agg_cost from pgr_dijkstra($$SELECT id, * FROM edge_table$$, ARRAY[2], ARRAY[3])';
+
+  RETURN query SELECT set_eq(original_sql, turnpenalty_sql, original_sql);
+
+END
+$BODY$
+language plpgsql;
+
+SELECT * from lineGraphFullDijkstraEquivalence();
+
diff --git a/pgtap/lineGraph/lineGraphFull_original_edge_check.sql b/pgtap/lineGraph/lineGraphFull_original_edge_check.sql
new file mode 100644
index 0000000..e2a04a3
--- /dev/null
+++ b/pgtap/lineGraph/lineGraphFull_original_edge_check.sql
@@ -0,0 +1,54 @@
+/*PGR-GNU*****************************************************************
+
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+\i setup.sql
+
+SELECT plan(1);
+
+CREATE or REPLACE FUNCTION lineGraphFullOriginalEdgeCheck(cant INTEGER default 17)
+RETURNS SETOF TEXT AS
+$BODY$
+DECLARE
+turnpenalty_sql TEXT;
+original_sql TEXT;
+inner_sql TEXT;
+BEGIN
+
+  original_sql := 'WITH going_edges AS (SELECT count(*) FROM edge_table WHERE cost > 0), coming_edges AS (SELECT count(*) FROM edge_table WHERE reverse_cost > 0) SELECT a.count + b.count FROM going_edges AS a, coming_edges AS b';
+
+  inner_sql := 'SELECT id AS id, source AS source, target AS target, cost, reverse_cost FROM edge_table';
+
+  turnpenalty_sql := 'SELECT count(*) FROM pgr_lineGraphFull($$'||inner_sql||'$$) where cost = 1';
+
+  RETURN query SELECT set_eq(original_sql, turnpenalty_sql, turnpenalty_sql);
+
+END
+$BODY$
+language plpgsql;
+
+SELECT * from lineGraphFullOriginalEdgeCheck();
+
+
+SELECT * FROM finish();
+ROLLBACK;
+
diff --git a/pgtap/lineGraph/lineGraphFull_original_vertex_mapping.sql b/pgtap/lineGraph/lineGraphFull_original_vertex_mapping.sql
new file mode 100644
index 0000000..948cc5c
--- /dev/null
+++ b/pgtap/lineGraph/lineGraphFull_original_vertex_mapping.sql
@@ -0,0 +1,95 @@
+/*PGR-GNU*****************************************************************
+
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+\i setup.sql
+
+SELECT plan(1);
+
+DROP TABLE IF EXISTS result2;
+CREATE TABLE result2(
+  seq integer,
+  source bigint,
+  target bigint,
+  cost float,
+  edge bigint);
+
+DROP TABLE IF EXISTS result2_vertices_pgr;
+CREATE TABLE result2_vertices_pgr(
+  id bigint,
+  original_id bigint);
+
+CREATE or REPLACE FUNCTION lineGraphFullOriginalVertexMapping(cant INTEGER default 17)
+RETURNS SETOF TEXT AS
+$BODY$
+DECLARE
+original_sql TEXT;
+BEGIN
+
+  INSERT INTO result2 SELECT * FROM pgr_lineGraphFull(
+      $$SELECT id, source, target, cost
+      FROM edge_table$$
+  );
+
+  WITH foo AS (SELECT source AS id FROM result2
+      UNION
+      SELECT target FROM result2)
+  INSERT INTO result2_vertices_pgr SELECT *, NULL::BIGINT AS original_id
+  FROM foo
+  ORDER BY id;
+
+  UPDATE result2_vertices_pgr AS r SET original_id = v.id
+  FROM edge_table_vertices_pgr AS v WHERE v.id = r.id;
+
+  WITH a AS (SELECT e.id, e.original_id FROM result2_vertices_pgr AS e WHERE original_id IS NOT NULL),
+  b AS (SELECT * FROM result2 WHERE cost = 0 and source IN (SELECT id FROM a)),
+  c AS (SELECT * FROM b JOIN result2_vertices_pgr ON(source = id)),
+  d AS (SELECT c.source, v.original_id FROM c JOIN result2_vertices_pgr as v ON (target=v.id)),
+  e AS (SELECT DISTINCT c.target, c.original_id FROM c JOIN result2_vertices_pgr AS r ON(target = r.id AND r.original_id IS NULL))
+  UPDATE result2_vertices_pgr SET original_id = e.original_id FROM e WHERE e.target = id;
+
+  WITH a AS (SELECT e.id, e.original_id FROM result2_vertices_pgr AS e WHERE original_id IS NOT NULL),
+  b AS (SELECT * FROM result2 WHERE cost = 0 and target IN (SELECT id FROM a)),
+  c AS (SELECT * FROM b JOIN result2_vertices_pgr ON(target = id)),
+  d AS (SELECT c.target, v.original_id FROM c JOIN result2_vertices_pgr as v ON (source=v.id)),
+  e AS (SELECT DISTINCT c.source, c.original_id FROM c JOIN result2_vertices_pgr AS r ON(source = r.id AND r.original_id IS NULL))
+  UPDATE result2_vertices_pgr SET original_id = e.original_id FROM e WHERE e.source = id;
+
+  WITH a AS (SELECT id FROM result2_vertices_pgr WHERE original_id IS NULL),
+  b AS (SELECT source,edge FROM result2 WHERE source IN (SELECT id FROM a)),
+  c AS (SELECT id,source FROM edge_table WHERE id IN (SELECT edge FROM b))
+  UPDATE result2_vertices_pgr AS d SET original_id = (SELECT source FROM c WHERE c.id = (SELECT edge FROM b WHERE b.source = d.id)) WHERE id IN (SELECT id FROM a);
+  
+  WITH a AS (SELECT id FROM result2_vertices_pgr WHERE original_id IS NULL),
+  b AS (SELECT target,edge FROM result2 WHERE target IN (SELECT id FROM a)),
+  c AS (SELECT id,target FROM edge_table WHERE id IN (SELECT edge FROM b))
+  UPDATE result2_vertices_pgr AS d SET original_id = (SELECT target FROM c WHERE c.id = (SELECT edge FROM b WHERE b.target = d.id)) WHERE id IN (SELECT id FROM a);
+
+  original_sql := 'SELECT count(*) FROM result2_vertices_pgr WHERE original_id IS NULL';
+
+  RETURN query SELECT set_eq(original_sql,'SELECT 0',original_sql);
+
+END
+$BODY$
+language plpgsql;
+
+SELECT * from lineGraphFullOriginalVertexMapping();
diff --git a/pgtap/max_flow/boykovKolmogorov-types-check.sql b/pgtap/max_flow/boykovKolmogorov-types-check.sql
index 7f485eb..d9476bd 100644
--- a/pgtap/max_flow/boykovKolmogorov-types-check.sql
+++ b/pgtap/max_flow/boykovKolmogorov-types-check.sql
@@ -59,7 +59,7 @@ SELECT lives_ok('t4','pgr_boykovKolmogorov(Many to Many)');
 
 -- preparing for testing return types
 PREPARE all_return AS
-SELECT  
+SELECT
     'integer'::text AS t1,
     'bigint'::text AS t2,
     'bigint'::text AS t3,
diff --git a/pgtap/max_flow/edgedisjointpaths-types-check.sql b/pgtap/max_flow/edgedisjointpaths-types-check.sql
index 975b9cf..2c009d5 100644
--- a/pgtap/max_flow/edgedisjointpaths-types-check.sql
+++ b/pgtap/max_flow/edgedisjointpaths-types-check.sql
@@ -52,7 +52,7 @@ SELECT pg_typeof(seq)::text AS t1,
 --    pgr_edgeDisjointPaths(One to Many)
 --    pgr_edgeDisjointPaths(Many to One)
 PREPARE edp_v_o2m AS
-SELECT  
+SELECT
     'integer'::text AS t1,
     'integer'::text AS t2,
     'bigint'::text AS t3,
diff --git a/pgtap/max_flow/edmondsKarp-types-check.sql b/pgtap/max_flow/edmondsKarp-types-check.sql
index 03eb5c0..8d5964e 100644
--- a/pgtap/max_flow/edmondsKarp-types-check.sql
+++ b/pgtap/max_flow/edmondsKarp-types-check.sql
@@ -63,7 +63,7 @@ SELECT lives_ok('t4','pgr_pgr_edmondskarp(many to many)');
 
 -- preparing for testing return types
 PREPARE all_return AS
-SELECT  
+SELECT
     'integer'::text AS t1,
     'bigint'::text AS t2,
     'bigint'::text AS t3,
diff --git a/pgtap/max_flow/internet_example.sql b/pgtap/max_flow/internet_example.sql
index 0fef4aa..5bbcf3c 100644
--- a/pgtap/max_flow/internet_example.sql
+++ b/pgtap/max_flow/internet_example.sql
@@ -13,7 +13,7 @@ CREATE TABLE boost_example(
 );
 
 INSERT INTO boost_example (source, target, capacity)
-VALUES 
+VALUES
 (1, 7,3),
 (1, 2, 20),
 (1, 3, 20),
@@ -95,7 +95,7 @@ CREATE TABLE wiki_example(
 S = 1, O = 2, P = 3, Q = 4, R = 5, T = 6
 */
 INSERT INTO wiki_example(source, target, capacity)
-VALUES 
+VALUES
 (1, 2, 3),
 (1, 3, 3),
 (2, 3, 2),
diff --git a/pgtap/max_flow/maxflow-types-check.sql b/pgtap/max_flow/maxflow-types-check.sql
index 52cfbf3..6511395 100644
--- a/pgtap/max_flow/maxflow-types-check.sql
+++ b/pgtap/max_flow/maxflow-types-check.sql
@@ -63,7 +63,7 @@ SELECT lives_ok('t4','pgr_pgr_maxflow(many to many)');
 
 -- preparing for testing return types
 PREPARE all_return AS
-SELECT  
+SELECT
     'bigint'::text AS t1;
 
 
diff --git a/pgtap/max_flow/pushRelabel-types-check.sql b/pgtap/max_flow/pushRelabel-types-check.sql
index 106aa5b..1d79fb7 100644
--- a/pgtap/max_flow/pushRelabel-types-check.sql
+++ b/pgtap/max_flow/pushRelabel-types-check.sql
@@ -63,7 +63,7 @@ SELECT lives_ok('t4','pgr_pgr_pushrelabel(many to many)');
 
 -- preparing for testing return types
 PREPARE all_return AS
-SELECT  
+SELECT
     'integer'::text AS t1,
     'bigint'::text AS t2,
     'bigint'::text AS t3,
diff --git a/pgtap/pickDeliver/pickDeliverEuclidean-innerquery.sql b/pgtap/pickDeliver/pickDeliverEuclidean-innerquery.sql
index 63743f7..22c4d9c 100644
--- a/pgtap/pickDeliver/pickDeliverEuclidean-innerquery.sql
+++ b/pgtap/pickDeliver/pickDeliverEuclidean-innerquery.sql
@@ -19,7 +19,7 @@ SELECT function_returns('_pgr_pickdelivereuclidean',
     'setof record');
 
 /* testing the pick/deliver orders*/
-CREATE OR REPLACE FUNCTION test_anyInteger_orders(fn TEXT, params TEXT[], parameter TEXT) 
+CREATE OR REPLACE FUNCTION test_anyInteger_orders(fn TEXT, params TEXT[], parameter TEXT)
 RETURNS SETOF TEXT AS
 $BODY$
 DECLARE
@@ -35,13 +35,13 @@ BEGIN
         start_sql = start_sql || p || ', ';
     END LOOP;
     end_sql = ' FROM orders $$,  $$SELECT * FROM vehicles $$, max_cycles := 30)';
-    
+
     query := start_sql || parameter || '::SMALLINT ' || end_sql;
     RETURN query SELECT lives_ok(query);
-    
+
     query := start_sql || parameter || '::INTEGER ' || end_sql;
     RETURN query SELECT lives_ok(query);
-    
+
     query := start_sql || parameter || '::BIGINT ' || end_sql;
     RETURN query SELECT lives_ok(query);
 
@@ -54,7 +54,7 @@ END;
 $BODY$ LANGUAGE plpgsql;
 
 /* testing the pick/deliver orders*/
-CREATE OR REPLACE FUNCTION test_anyNumerical_orders(fn TEXT, params TEXT[], parameter TEXT) 
+CREATE OR REPLACE FUNCTION test_anyNumerical_orders(fn TEXT, params TEXT[], parameter TEXT)
 RETURNS SETOF TEXT AS
 $BODY$
 DECLARE
@@ -70,13 +70,13 @@ BEGIN
         start_sql = start_sql || p || ', ';
     END LOOP;
     end_sql = ' FROM orders $$,  $$SELECT * FROM vehicles $$, max_cycles := 30)';
-    
+
     query := start_sql || parameter || '::SMALLINT ' || end_sql;
     RETURN query SELECT lives_ok(query);
-    
+
     query := start_sql || parameter || '::INTEGER ' || end_sql;
     RETURN query SELECT lives_ok(query);
-    
+
     query := start_sql || parameter || '::BIGINT ' || end_sql;
     RETURN query SELECT lives_ok(query);
 
@@ -91,7 +91,7 @@ $BODY$ LANGUAGE plpgsql;
 /*
 testing the pick/deliver vehicles
 */
-CREATE OR REPLACE FUNCTION test_anyInteger_vehicles(fn TEXT, params TEXT[], parameter TEXT) 
+CREATE OR REPLACE FUNCTION test_anyInteger_vehicles(fn TEXT, params TEXT[], parameter TEXT)
 RETURNS SETOF TEXT AS
 $BODY$
 DECLARE
@@ -108,13 +108,13 @@ BEGIN
         start_sql = start_sql || p || ', ';
     END LOOP;
     end_sql = ' FROM  vehicles $$, max_cycles := 30)';
-    
+
     query := start_sql || parameter || '::SMALLINT ' || end_sql;
     RETURN query SELECT lives_ok(query);
-    
+
     query := start_sql || parameter || '::INTEGER ' || end_sql;
     RETURN query SELECT lives_ok(query);
-    
+
     query := start_sql || parameter || '::BIGINT ' || end_sql;
     RETURN query SELECT lives_ok(query);
 
@@ -129,7 +129,7 @@ $BODY$ LANGUAGE plpgsql;
 /*
 testing the pick/deliver vehicles
  */
-CREATE OR REPLACE FUNCTION test_anyNumerical_vehicles(fn TEXT, params TEXT[], parameter TEXT) 
+CREATE OR REPLACE FUNCTION test_anyNumerical_vehicles(fn TEXT, params TEXT[], parameter TEXT)
 RETURNS SETOF TEXT AS
 $BODY$
 DECLARE
@@ -145,13 +145,13 @@ BEGIN
         start_sql = start_sql || p || ', ';
     END LOOP;
     end_sql = ' FROM vehicles $$, max_cycles := 30)';
-    
+
     query := start_sql || parameter || '::SMALLINT ' || end_sql;
     RETURN query SELECT lives_ok(query);
-    
+
     query := start_sql || parameter || '::INTEGER ' || end_sql;
     RETURN query SELECT lives_ok(query);
-    
+
     query := start_sql || parameter || '::BIGINT ' || end_sql;
     RETURN query SELECT lives_ok(query);
 
@@ -233,27 +233,27 @@ SELECT test_anynumerical_orders('_pgr_pickdelivereuclidean',
     'start_service' is optional defaults to 0
 */
 SELECT test_anyInteger_vehicles('_pgr_pickdelivereuclidean',
-    ARRAY['id', 'capacity', 
+    ARRAY['id', 'capacity',
     'start_x', 'start_y', 'start_open', 'start_close'],
     'id');
 SELECT test_anyNumerical_vehicles('_pgr_pickdelivereuclidean',
-    ARRAY['id', 'capacity', 
+    ARRAY['id', 'capacity',
     'start_x', 'start_y', 'start_open', 'start_close'],
     'capacity');
 SELECT test_anyNumerical_vehicles('_pgr_pickdelivereuclidean',
-    ARRAY['id', 'capacity', 
+    ARRAY['id', 'capacity',
     'start_x', 'start_y', 'start_open', 'start_close'],
     'start_x');
 SELECT test_anyNumerical_vehicles('_pgr_pickdelivereuclidean',
-    ARRAY['id', 'capacity', 
+    ARRAY['id', 'capacity',
     'start_x', 'start_y', 'start_open', 'start_close'],
     'start_y');
 SELECT test_anyNumerical_vehicles('_pgr_pickdelivereuclidean',
-    ARRAY['id', 'capacity', 
+    ARRAY['id', 'capacity',
     'start_x', 'start_y', 'start_open', 'start_close'],
     'start_open');
 SELECT test_anyNumerical_vehicles('_pgr_pickdelivereuclidean',
-    ARRAY['id', 'capacity', 
+    ARRAY['id', 'capacity',
     'start_x', 'start_y', 'start_open', 'start_close'],
     'start_close');
 
diff --git a/pgtap/pickDeliver/wrong_data_pickDeliverEuclidean.sql b/pgtap/pickDeliver/wrong_data_pickDeliverEuclidean.sql
index b5ba7a0..c22f3cf 100644
--- a/pgtap/pickDeliver/wrong_data_pickDeliverEuclidean.sql
+++ b/pgtap/pickDeliver/wrong_data_pickDeliverEuclidean.sql
@@ -13,7 +13,7 @@ SELECT * FROM _pgr_pickDeliverEuclidean(
 SELECT lives_ok('q1', 'Original query should not fail');
 
 --------------------------------------
--- testing wrong data on max_cycles 
+-- testing wrong data on max_cycles
 --------------------------------------
 PREPARE q6 AS
 SELECT * FROM _pgr_pickDeliverEuclidean(
@@ -37,7 +37,7 @@ SELECT lives_ok('q61',
 
 
 --------------------------------------
--- testing wrong data on initial_sol 
+-- testing wrong data on initial_sol
 --------------------------------------
 PREPARE initsol1 AS
 SELECT * FROM _pgr_pickDeliverEuclidean(
@@ -75,7 +75,7 @@ SELECT throws_ok('initsol3',
     'Should throw: initial_sol = 0');
 
 --------------------------------------
--- testing wrong data on factor 
+-- testing wrong data on factor
 --------------------------------------
 PREPARE factor1 AS
 SELECT * FROM _pgr_pickDeliverEuclidean(
@@ -235,7 +235,7 @@ SELECT throws_ok('vehicles10',
     'vehicles10, Should throw: end_open > end_close');
 
 --------------------------------------
--- testing wrong data on orders 
+-- testing wrong data on orders
 --------------------------------------
 
 ---------------------
diff --git a/pgtap/topology/analyzeOneWay.test.sql b/pgtap/topology/analyzeOneWay.test.sql
index fdc5176..0e66ca4 100644
--- a/pgtap/topology/analyzeOneWay.test.sql
+++ b/pgtap/topology/analyzeOneWay.test.sql
@@ -5,7 +5,7 @@ SET client_min_messages TO WARNING;
 
 SELECT plan(2);
 
-SELECT pgr_analyzeOneway('edge_table', 
+SELECT pgr_analyzeOneway('edge_table',
     ARRAY['', 'B', 'TF'],
     ARRAY['', 'B', 'FT'],
     ARRAY['', 'B', 'FT'],
diff --git a/pgtap/topology/incrementalCreateTopology.test.sql b/pgtap/topology/incrementalCreateTopology.test.sql
index a4d9131..d702e6a 100644
--- a/pgtap/topology/incrementalCreateTopology.test.sql
+++ b/pgtap/topology/incrementalCreateTopology.test.sql
@@ -44,35 +44,35 @@ SELECT is((SELECT count(*)::INTEGER FROM incr_table_vertices_pgr WHERE chk is NU
 SELECT is((SELECT count(*)::INTEGER FROM incr_table_vertices_pgr WHERE ein is NULL), 8, '8 vertices are missing ein');
 SELECT is((SELECT count(*)::INTEGER FROM incr_table_vertices_pgr WHERE eout is NULL), 8, '8 vertices are missing eout');
 
-INSERT INTO incr_table(id, dir, cost, reverse_cost, x1, y1, x2, y2, the_geom) 
+INSERT INTO incr_table(id, dir, cost, reverse_cost, x1, y1, x2, y2, the_geom)
 SELECT  id, dir, cost, reverse_cost, x1, y1, x2, y2, the_geom FROM edge_table WHERE id >= 9;
 SELECT is((SELECT count(*)::INTEGER FROM incr_table), 18, 'After inserting table has 18 edges');
 
 SELECT is((SELECT count(*)::INTEGER FROM incr_table WHERE source is NULL), 10, '10 edges are missing source');
 SELECT is((SELECT count(*)::INTEGER FROM incr_table WHERE target is NULL), 10, '10 edges are missing target');
 -- 10 edges must be updated the rest is untouched
-SELECT is((SELECT pgr_createTopology('incr_table',0.0001,clean:=false)), 'OK', 'OK Creating the topology'); 
+SELECT is((SELECT pgr_createTopology('incr_table',0.0001,clean:=false)), 'OK', 'OK Creating the topology');
 SELECT is((SELECT count(*)::INTEGER FROM incr_table WHERE source is NULL), 0, '0 edges are missing source');
 SELECT is((SELECT count(*)::INTEGER FROM incr_table WHERE target is NULL), 0, '0 edges are missing target');
 
 
 -- 12 edges have 'B' the rest is wiped
-SELECT is((SELECT pgr_createTopology('incr_table',0.0001,rows_where:='dir=''B''',clean:=true)), 'OK', 'OK Creating the topology'); 
+SELECT is((SELECT pgr_createTopology('incr_table',0.0001,rows_where:='dir=''B''',clean:=true)), 'OK', 'OK Creating the topology');
 SELECT is((SELECT count(*)::INTEGER FROM incr_table WHERE source is NULL), 6, '6 edges are missing source');
 SELECT is((SELECT count(*)::INTEGER FROM incr_table WHERE target is NULL), 6, '6 edges are missing target');
 
 -- 6 edges must be processed, the rest is untouched
-SELECT is((SELECT pgr_createTopology('incr_table',0.0001,clean:=false)), 'OK', 'OK Creating the topology'); 
+SELECT is((SELECT pgr_createTopology('incr_table',0.0001,clean:=false)), 'OK', 'OK Creating the topology');
 SELECT is((SELECT count(*)::INTEGER FROM incr_table WHERE source is NULL), 0, '0 edges are missing source');
 SELECT is((SELECT count(*)::INTEGER FROM incr_table WHERE target is NULL), 0, '0 edges are missing target');
 
 --12 edgedds have 'B' the rest is untouched
-SELECT is((SELECT pgr_createTopology('incr_table',0.0001,rows_where:='dir=''B''',clean:=false)), 'OK', 'OK Creating the topology'); 
+SELECT is((SELECT pgr_createTopology('incr_table',0.0001,rows_where:='dir=''B''',clean:=false)), 'OK', 'OK Creating the topology');
 SELECT is((SELECT count(*)::INTEGER FROM incr_table WHERE source is NULL), 0, '0 edges are missing source');
 SELECT is((SELECT count(*)::INTEGER FROM incr_table WHERE target is NULL), 0, '0 edges are missing target');
 
 
-SELECT is((SELECT pgr_createTopology('incr_table',0.0001,rows_where:='dir=''B''')), 'OK', 'OK Creating the topology'); 
+SELECT is((SELECT pgr_createTopology('incr_table',0.0001,rows_where:='dir=''B''')), 'OK', 'OK Creating the topology');
 SELECT is((SELECT count(*)::INTEGER FROM incr_table WHERE source is NULL), 0, '0 edges are missing source');
 SELECT is((SELECT count(*)::INTEGER FROM incr_table WHERE target is NULL), 0, '0 edges are missing target');
 
diff --git a/pgtap/trsp/from1to3.test.sql b/pgtap/trsp/from1to3.test.sql
index 9082a1e..a4dcf2f 100644
--- a/pgtap/trsp/from1to3.test.sql
+++ b/pgtap/trsp/from1to3.test.sql
@@ -36,7 +36,7 @@ SELECT seq, id1, id2, cost::text from pgr_trsp(
     'select 8::INTEGER as target_id, ''4''::TEXT as via_path,  100.2::FLOAT to_cost');
 
 PREPARE q32 AS
-SELECT (row_number() over() -1)::INTEGER, node::INTEGER, 
+SELECT (row_number() over() -1)::INTEGER, node::INTEGER,
 (CASE WHEN edge = -2 THEN -1 ELSE edge END)::INTEGER, cost::text
 FROM pgr_dijkstraVia(
     'select  id, source, target, cost, reverse_cost from edge_table',
@@ -79,7 +79,7 @@ SELECT seq, id1, id2, cost::text from pgr_trsp(
     'select 8::INTEGER as target_id, ''4''::TEXT as via_path,  100.2::FLOAT to_cost');
 
 PREPARE q62 AS
-SELECT (row_number() over() -1)::INTEGER, node::INTEGER, 
+SELECT (row_number() over() -1)::INTEGER, node::INTEGER,
 (CASE WHEN edge = -2 THEN -1 ELSE edge END)::INTEGER, cost::text
 FROM pgr_dijkstraVia(
     'select  id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost from edge_table',
@@ -90,10 +90,9 @@ FROM pgr_dijkstraVia(
 SELECT is_empty('q41', '5: Undirected: No path from 1 to 1');
 SELECT set_eq('q51','q52','6: Undirected: without retrictions returns the same as pgr_dijkstra');
 
-SELECT todo_start();
+SELECT todo_start('dont know why its failing');
 SELECT set_eq('q61','q62','7: Undirected: with retrictions returns expected path');
 SELECT todo_end();
-
 -- Finish the tests and clean up.
 SELECT * FROM finish();
 ROLLBACK
diff --git a/pgtap/trsp/from3to4-directed.test.sql b/pgtap/trsp/from3to4-directed.test.sql
index ebb5a94..f2c9a92 100644
--- a/pgtap/trsp/from3to4-directed.test.sql
+++ b/pgtap/trsp/from3to4-directed.test.sql
@@ -30,7 +30,7 @@ SELECT seq, id1, id2, cost::text from pgr_trsp(
     'select 9::INTEGER as target_id, ''5''::TEXT as via_path,  100.2::FLOAT to_cost');
 
 PREPARE q32 AS
-SELECT (row_number() over() -1)::INTEGER, node::INTEGER, 
+SELECT (row_number() over() -1)::INTEGER, node::INTEGER,
 (CASE WHEN edge = -2 THEN -1 ELSE edge END)::INTEGER, cost::text
 FROM pgr_dijkstraVia(
     'select id, source, target, cost, reverse_cost from edge_table',
diff --git a/pgtap/trsp/trsp-any-00.test.sql b/pgtap/trsp/trsp-any-00.test.sql
index d129f7e..4e44115 100644
--- a/pgtap/trsp/trsp-any-00.test.sql
+++ b/pgtap/trsp/trsp-any-00.test.sql
@@ -19,7 +19,7 @@ PREPARE q2 AS
 SELECT seq-1, node::INTEGER, edge::INTEGER, cost::TEXT FROM pgr_withPoints(
     $$SELECT id, source, target, cost, reverse_cost from edge_table$$,
     $$(SELECT 1 AS pid, 1 AS edge_id, 0.5::float  AS fraction)
-    UNION 
+    UNION
     (SELECT 2, 6, 0.5)$$,
     -1, -2);
 
diff --git a/pgtap/trsp/trsp-any-01.test.sql b/pgtap/trsp/trsp-any-01.test.sql
index 7c40d13..8687f89 100644
--- a/pgtap/trsp/trsp-any-01.test.sql
+++ b/pgtap/trsp/trsp-any-01.test.sql
@@ -1,4 +1,4 @@
-\i setup.sql 
+\i setup.sql
     SELECT plan(1);
 
     UPDATE edge_table SET cost = cost + 0.001 * id * id, reverse_cost = reverse_cost + 0.001 * id * id;
@@ -12,7 +12,7 @@
         true,  -- has_reverse_cost?
         null); -- no turn restrictions
 
-    prepare q2 AS 
+    prepare q2 AS
     SELECT seq-1, node::INTEGER, edge::INTEGER, cost::TEXT FROM pgr_dijkstra(
         'select id, source, target, cost, reverse_cost from edge_table',
         1, 5);
diff --git a/pgtap/trsp/viaV-no-restrictions-compare-dijkstra-directed.test.sql b/pgtap/trsp/viaV-no-restrictions-compare-dijkstra-directed.test.sql
index 27d09c9..bcef23b 100644
--- a/pgtap/trsp/viaV-no-restrictions-compare-dijkstra-directed.test.sql
+++ b/pgtap/trsp/viaV-no-restrictions-compare-dijkstra-directed.test.sql
@@ -30,7 +30,7 @@ BEGIN
 
                 -- test when there is reverse cost and its marked as being used
                 -- VS dijkstraVia autodetected has reverse cost
-                dijkstraVia_sql := 'SELECT (row_number() over())::INTEGER, path_id::INTEGER, node::INTEGER, 
+                dijkstraVia_sql := 'SELECT (row_number() over())::INTEGER, path_id::INTEGER, node::INTEGER,
                 (CASE WHEN edge = -2 THEN -1 ELSE edge END)::INTEGER, cost::text
                 FROM pgr_dijkstraVia( ' || inner_sql1 || ', ARRAY[1, ' || i || ', ' || j || '], ' || flag || ', TRUE) WHERE edge != -1';
                 trsp_sql := 'SELECT seq, id1, id2, id3, cost::text from pgr_trspViaVertices( ' || inner_sql1 || ', ARRAY[1, ' || i || ', ' || j || '], ' || flag || ', TRUE)';
@@ -47,7 +47,7 @@ BEGIN
 
             -- test when there is reverse cost and its marked NOT being used
             -- VS dijkstraVia autodetected DOES NOT have reverse cost
-            dijkstraVia_sql := 'SELECT (row_number() over())::INTEGER, path_id::INTEGER, node::INTEGER, 
+            dijkstraVia_sql := 'SELECT (row_number() over())::INTEGER, path_id::INTEGER, node::INTEGER,
             (CASE WHEN edge = -2 THEN -1 ELSE edge END)::INTEGER, cost::text
             FROM pgr_dijkstraVia( ' || inner_sql2 || ', ARRAY[1, ' || i || ', ' || j || '], ' || flag || ', TRUE) WHERE edge != -1';
             trsp_sql := 'SELECT seq, id1, id2, id3, cost::text from pgr_trspViaVertices( ' || inner_sql1 || ', ARRAY[1, ' || i || ', ' || j || '], ' || flag || ', FALSE)';
diff --git a/pgtap/trsp/viaV-no-restrictions-compare-dijkstra-undirected.test.sql b/pgtap/trsp/viaV-no-restrictions-compare-dijkstra-undirected.test.sql
index 2191cd5..3777cfc 100644
--- a/pgtap/trsp/viaV-no-restrictions-compare-dijkstra-undirected.test.sql
+++ b/pgtap/trsp/viaV-no-restrictions-compare-dijkstra-undirected.test.sql
@@ -29,7 +29,7 @@ BEGIN
 
                 -- test when there is reverse cost and its marked as being used
                 -- VS dijkstraVia autodetected has reverse cost
-                dijkstraVia_sql := 'SELECT (row_number() over())::INTEGER, path_id::INTEGER, node::INTEGER, 
+                dijkstraVia_sql := 'SELECT (row_number() over())::INTEGER, path_id::INTEGER, node::INTEGER,
                 (CASE WHEN edge = -2 THEN -1 ELSE edge END)::INTEGER, cost::text
                 FROM pgr_dijkstraVia( ' || inner_sql1 || ', ARRAY[1, ' || i || ', ' || j || '], ' || flag || ', strict:=TRUE) WHERE edge != -1';
                 trsp_sql := 'SELECT seq, id1, id2, id3, cost::text from pgr_trspViaVertices( ' || inner_sql1 || ', ARRAY[1, ' || i || ', ' || j || '], ' || flag || ', TRUE)';
@@ -46,7 +46,7 @@ BEGIN
 
             -- test when there is reverse cost and its marked NOT being used
             -- VS dijkstraVia autodetected DOES NOT have reverse cost
-            dijkstraVia_sql := 'SELECT (row_number() over())::INTEGER, path_id::INTEGER, node::INTEGER, 
+            dijkstraVia_sql := 'SELECT (row_number() over())::INTEGER, path_id::INTEGER, node::INTEGER,
             (CASE WHEN edge = -2 THEN -1 ELSE edge END)::INTEGER, cost::text
             FROM pgr_dijkstraVia( ' || inner_sql2 || ', ARRAY[1, ' || i || ', ' || j || '], ' || flag || ', strict:=TRUE) WHERE edge != -1';
             trsp_sql := 'SELECT seq, id1, id2, id3, cost::text from pgr_trspViaVertices( ' || inner_sql1 || ', ARRAY[1, ' || i || ', ' || j || '], ' || flag || ', FALSE)';
diff --git a/pgtap/tsp/pgr_TSP_types_check.sql b/pgtap/tsp/pgr_TSP_types_check.sql
index 0b19163..e30a335 100644
--- a/pgtap/tsp/pgr_TSP_types_check.sql
+++ b/pgtap/tsp/pgr_TSP_types_check.sql
@@ -53,7 +53,7 @@ SELECT * FROM pgr_dijkstraCostMatrix(
     directed:= false
 );
 
-CREATE OR REPLACE FUNCTION test_anyInteger(fn TEXT, params TEXT[], parameter TEXT) 
+CREATE OR REPLACE FUNCTION test_anyInteger(fn TEXT, params TEXT[], parameter TEXT)
 RETURNS SETOF TEXT AS
 $BODY$
 DECLARE
@@ -87,7 +87,7 @@ end_sql = ' FROM matrixrows $$, randomize := false)';
 END;
 $BODY$ LANGUAGE plpgsql;
 
-CREATE OR REPLACE FUNCTION test_anyNumerical(fn TEXT, params TEXT[], parameter TEXT) 
+CREATE OR REPLACE FUNCTION test_anyNumerical(fn TEXT, params TEXT[], parameter TEXT)
 RETURNS SETOF TEXT AS
 $BODY$
 DECLARE
diff --git a/pgtap/tsp/pgr_eucledianTSP_types_check.sql b/pgtap/tsp/pgr_eucledianTSP_types_check.sql
index 5194d75..80df532 100644
--- a/pgtap/tsp/pgr_eucledianTSP_types_check.sql
+++ b/pgtap/tsp/pgr_eucledianTSP_types_check.sql
@@ -50,7 +50,7 @@ CREATE TEMP TABLE coords AS
 SELECT id, ST_X(the_geom) AS x, ST_Y(the_geom) AS y
 FROM edge_table_vertices_pgr;
 
-CREATE OR REPLACE FUNCTION test_anyInteger(fn TEXT, params TEXT[], parameter TEXT) 
+CREATE OR REPLACE FUNCTION test_anyInteger(fn TEXT, params TEXT[], parameter TEXT)
 RETURNS SETOF TEXT AS
 $BODY$
 DECLARE
@@ -84,7 +84,7 @@ end_sql = ' FROM coords $$, randomize := false)';
 END;
 $BODY$ LANGUAGE plpgsql;
 
-CREATE OR REPLACE FUNCTION test_anyNumerical(fn TEXT, params TEXT[], parameter TEXT) 
+CREATE OR REPLACE FUNCTION test_anyNumerical(fn TEXT, params TEXT[], parameter TEXT)
 RETURNS SETOF TEXT AS
 $BODY$
 DECLARE
diff --git a/pgtap/withPoints/issue979DD.sql b/pgtap/withPoints/issue979DD.sql
new file mode 100644
index 0000000..5bfa05c
--- /dev/null
+++ b/pgtap/withPoints/issue979DD.sql
@@ -0,0 +1,186 @@
+
+\i setup.sql
+
+SELECT PLAN(6);
+
+
+---
+--- DIRECTED GRAPH
+---
+-------- both driving sides
+
+PREPARE q1 AS
+SELECT node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    -1, 6.8, driving_side := 'b', details := false)
+ORDER BY seq;
+
+
+SELECT
+    node::BIGINT, edge::BIGINT, cost::FLOAT, agg_cost::FLOAT
+INTO test1
+FROM
+(VALUES
+    (  -1 ,   -1 ,    0 ,        0),
+    (   1 ,    1 ,  0.4 ,      0.4),
+    (   2 ,    1 ,  0.6 ,      0.6),
+    (   5 ,    4 ,    1 ,      1.6),
+    (   6 ,    8 ,    1 ,      2.6),
+    (   8 ,    7 ,    1 ,      2.6),
+    (  10 ,   10 ,    1 ,      2.6),
+    (   7 ,    6 ,    1 ,      3.6),
+    (   9 ,    9 ,    1 ,      3.6),
+    (  11 ,   11 ,    1 ,      3.6),
+    (  13 ,   14 ,    1 ,      3.6),
+    (   4 ,   16 ,    1 ,      4.6),
+    (  12 ,   13 ,    1 ,      4.6),
+    (   3 ,    3 ,    1 ,      5.6)
+) AS t (node, edge, cost, agg_cost);
+
+
+SELECT set_eq('q1',
+    $$SELECT node, edge, cost::TEXT, agg_cost::TEXT FROM test1$$,
+    'Should be aggregating individual costs: both driving sides, DIR');
+
+
+
+-------- right driving side
+
+PREPARE q2 AS
+SELECT node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    -1, 6.8, driving_side := 'r', details := false);
+
+
+SELECT
+    node::BIGINT, edge::BIGINT, cost::FLOAT, agg_cost::FLOAT
+INTO test2
+FROM
+(VALUES
+    (  -1 ,   -1 ,    0 ,        0),
+    (   1 ,    1 ,  0.4 ,      0.4),
+    (   2 ,    1 ,    1 ,      1.4),
+    (   5 ,    4 ,    1 ,      2.4),
+    (   6 ,    8 ,    1 ,      3.4),
+    (   8 ,    7 ,    1 ,      3.4),
+    (  10 ,   10 ,    1 ,      3.4),
+    (   7 ,    6 ,    1 ,      4.4),
+    (   9 ,    9 ,    1 ,      4.4),
+    (  11 ,   11 ,    1 ,      4.4),
+    (  13 ,   14 ,    1 ,      4.4),
+    (   4 ,   16 ,    1 ,      5.4),
+    (  12 ,   13 ,    1 ,      5.4),
+    (   3 ,    3 ,    1 ,      6.4)
+) AS t (node, edge, cost, agg_cost);
+
+
+SELECT set_eq('q2',
+    $$SELECT node, edge, cost::TEXT, agg_cost::TEXT FROM test2$$,
+    'Should be aggregating individual costs: right driving side, DIR');
+
+-------- left driving side
+
+PREPARE q3 AS
+SELECT node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    -1, 6.8, driving_side := 'l', details := false)
+ORDER BY seq;
+
+
+SELECT
+    node::BIGINT, edge::BIGINT, cost::FLOAT, agg_cost::FLOAT
+INTO test3
+FROM
+(VALUES
+   (-1 ,   -1 ,    0 ,        0),
+   ( 2 ,    1 ,  0.6 ,      0.6),
+   ( 5 ,    4 ,    1 ,      1.6),
+   ( 1 ,    1 ,    1 ,      1.6),
+   ( 6 ,    8 ,    1 ,      2.6),
+   ( 8 ,    7 ,    1 ,      2.6),
+   (10 ,   10 ,    1 ,      2.6),
+   ( 7 ,    6 ,    1 ,      3.6),
+   ( 9 ,    9 ,    1 ,      3.6),
+  ( 11 ,   11 ,    1 ,      3.6),
+  ( 13 ,   14 ,    1 ,      3.6),
+  (  4 ,   16 ,    1 ,      4.6),
+  ( 12 ,   15 ,    1 ,      4.6),
+  (  3 ,    3 ,    1 ,      5.6)
+) AS t (node, edge, cost, agg_cost);
+
+
+SELECT set_eq('q3',
+    $$SELECT node, edge, cost::TEXT, agg_cost::TEXT FROM test3$$,
+    'Should be aggregating individual costs: left driving side, DIR');
+
+---
+--- UNDIRECTED GRAPH
+---
+
+-- all results on udirected graph are "allegedly" equal
+SELECT
+    node::BIGINT, cost::FLOAT, agg_cost::FLOAT
+INTO test4
+FROM
+(VALUES
+    (  -1 ,    0 ,        0),
+    (   1 ,  0.4 ,      0.4),
+    (   2 ,  0.6 ,      0.6),
+    (   5 ,    1 ,      1.6),
+    (   3 ,    1 ,      1.6),
+    (   6 ,    1 ,      2.6),
+    (   8 ,    1 ,      2.6),
+    (  10 ,    1 ,      2.6),
+    (   4 ,    1 ,      2.6),
+    (   7 ,    1 ,      3.6),
+    (   9 ,    1 ,      3.6),
+    (  11 ,    1 ,      3.6),
+    (  13 ,    1 ,      3.6),
+    (  12 ,    1 ,      4.6)
+) AS t (node, cost, agg_cost);
+
+-------- both driving sides
+
+PREPARE q4 AS
+SELECT node, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    -1, 6.8, driving_side := 'b', details := false, directed:=false);
+
+SELECT set_eq('q4',
+    $$SELECT node, cost::TEXT, agg_cost::TEXT FROM test4$$,
+    'Should be aggregating individual costs: both driving sides, UNDI');
+
+
+
+-------- right driving side
+
+PREPARE q5 AS
+SELECT node, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    -1, 6.8, driving_side := 'r', details := false, directed:=false);
+
+
+SELECT set_eq('q5',
+    $$SELECT node, cost::TEXT, agg_cost::TEXT FROM test4$$,
+    'Should be aggregating individual costs: right driving side, UNDI');
+
+-------- left driving side
+
+PREPARE q6 AS
+SELECT node, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    -1, 6.8, driving_side := 'l', details := false, directed:=false);
+
+
+SELECT set_eq('q6',
+    $$SELECT node, cost::TEXT, agg_cost::TEXT FROM test4$$,
+    'Should be aggregating individual costs: left driving side, UNDI');
+
+SELECT * FROM finish();
+ROLLBACK;
diff --git a/pgtap/withPoints/many_to_many_eq_one_to_one_withPoint.test.sql b/pgtap/withPoints/many_to_many_eq_one_to_one_withPoint.test.sql
index 64020dc..2b1c5c5 100644
--- a/pgtap/withPoints/many_to_many_eq_one_to_one_withPoint.test.sql
+++ b/pgtap/withPoints/many_to_many_eq_one_to_one_withPoint.test.sql
@@ -7,7 +7,7 @@ PREPARE q1 AS
 SELECT  path_seq, node, agg_cost FROM pgr_withPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    ARRAY[-1], ARRAY[-5], 
+    ARRAY[-1], ARRAY[-5],
     driving_side := 'r',
     directed := true,
     details := true);
@@ -16,7 +16,7 @@ PREPARE q11 AS
 SELECT  path_seq, node, agg_cost FROM pgr_withPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    ARRAY[-1], ARRAY[-3], 
+    ARRAY[-1], ARRAY[-3],
     driving_side := 'r',
     directed := true,
     details := true);
@@ -25,7 +25,7 @@ PREPARE q2 AS
 SELECT path_seq, node, agg_cost FROM pgr_withPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -1, -5, 
+    -1, -5,
     driving_side := 'r',
     directed := true,
     details := true);
@@ -34,7 +34,7 @@ PREPARE q21 AS
 SELECT path_seq, node, agg_cost FROM pgr_withPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -1, -3, 
+    -1, -3,
     driving_side := 'r',
     directed := true,
     details := true);
@@ -46,7 +46,7 @@ PREPARE q3 AS
 SELECT path_seq, node, agg_cost FROM pgr_withPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    ARRAY[-4], ARRAY[-5], 
+    ARRAY[-4], ARRAY[-5],
     driving_side := 'r',
     directed := true,
     details := true);
@@ -55,7 +55,7 @@ PREPARE q31 AS
 SELECT path_seq, node, agg_cost FROM pgr_withPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    ARRAY[-4], ARRAY[-3], 
+    ARRAY[-4], ARRAY[-3],
     driving_side := 'r',
     directed := true,
     details := true);
@@ -73,7 +73,7 @@ PREPARE q41 AS
 SELECT path_seq, node, agg_cost FROM pgr_withPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -4, -3, 
+    -4, -3,
     driving_side := 'r',
     directed := true,
     details := true);
diff --git a/pgtap/withPoints/many_to_one_eq_one_to_one_withPoint.test.sql b/pgtap/withPoints/many_to_one_eq_one_to_one_withPoint.test.sql
index 1078de3..a4d2eb4 100644
--- a/pgtap/withPoints/many_to_one_eq_one_to_one_withPoint.test.sql
+++ b/pgtap/withPoints/many_to_one_eq_one_to_one_withPoint.test.sql
@@ -9,7 +9,7 @@ PREPARE q1 AS
 SELECT  path_seq, node, agg_cost::text FROM pgr_withPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    ARRAY[-1], -5, 
+    ARRAY[-1], -5,
     driving_side := 'r',
     directed := true,
     details := true);
@@ -18,7 +18,7 @@ PREPARE q2 AS
 SELECT path_seq, node, agg_cost::text FROM pgr_withPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -1, -5, 
+    -1, -5,
     driving_side := 'r',
     directed := true,
     details := true);
@@ -29,7 +29,7 @@ PREPARE q3 AS
 SELECT path_seq, node, agg_cost::text FROM pgr_withPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    ARRAY[-4], -5, 
+    ARRAY[-4], -5,
     driving_side := 'r',
     directed := true,
     details := true);
@@ -38,7 +38,7 @@ PREPARE q4 AS
 SELECT path_seq, node, agg_cost::text FROM pgr_withPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -4, -5, 
+    -4, -5,
     driving_side := 'r',
     directed := true,
     details := true);
diff --git a/pgtap/withPoints/one_to_many_eq_one_to_one_withPoint.test.sql b/pgtap/withPoints/one_to_many_eq_one_to_one_withPoint.test.sql
index ba1eefb..7dc8872 100644
--- a/pgtap/withPoints/one_to_many_eq_one_to_one_withPoint.test.sql
+++ b/pgtap/withPoints/one_to_many_eq_one_to_one_withPoint.test.sql
@@ -9,7 +9,7 @@ PREPARE q1 AS
 SELECT  path_seq, node, agg_cost FROM pgr_withPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -1, ARRAY[-5], 
+    -1, ARRAY[-5],
     driving_side := 'r',
     directed := true,
     details := true);
@@ -18,7 +18,7 @@ PREPARE q2 AS
 SELECT path_seq, node, agg_cost FROM pgr_withPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -1, -5, 
+    -1, -5,
     driving_side := 'r',
     directed := true,
     details := true);
@@ -29,7 +29,7 @@ PREPARE q3 AS
 SELECT path_seq, node, agg_cost FROM pgr_withPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -1, ARRAY[-4], 
+    -1, ARRAY[-4],
     driving_side := 'r',
     directed := true,
     details := true);
@@ -38,7 +38,7 @@ PREPARE q4 AS
 SELECT path_seq, node, agg_cost FROM pgr_withPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -1, -4, 
+    -1, -4,
     driving_side := 'r',
     directed := true,
     details := true);
diff --git a/pgtap/withPoints/one_to_many_withPoint.test.sql b/pgtap/withPoints/one_to_many_withPoint.test.sql
index d8d8bd2..1721ecf 100644
--- a/pgtap/withPoints/one_to_many_withPoint.test.sql
+++ b/pgtap/withPoints/one_to_many_withPoint.test.sql
@@ -9,7 +9,7 @@ WITH the_union AS (
     (SELECT path_seq, -2 AS end_pid, node, agg_cost FROM pgr_withPoints(
             'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
             'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-            -1, ARRAY[-2], 
+            -1, ARRAY[-2],
             driving_side := 'r',
             directed := true,
             details := true))
@@ -17,7 +17,7 @@ WITH the_union AS (
     (SELECT path_seq, -5 AS end_pid, node, agg_cost FROM pgr_withPoints(
             'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
             'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-            -1, ARRAY[-5], 
+            -1, ARRAY[-5],
             driving_side := 'r',
             directed := true,
             details := true))
@@ -29,7 +29,7 @@ PREPARE q2 AS
 SELECT seq, path_seq, end_pid AS end_pid, node, agg_cost FROM pgr_withPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -1, ARRAY[-2, -5], 
+    -1, ARRAY[-2, -5],
     driving_side := 'r',
     directed := true,
     details := true);
@@ -38,7 +38,7 @@ PREPARE q3 AS
 SELECT seq, path_seq, end_pid AS end_pid, node, agg_cost FROM pgr_withPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -1, ARRAY[-5, -2], 
+    -1, ARRAY[-5, -2],
     driving_side := 'r',
     directed := true,
     details := true);
@@ -102,7 +102,7 @@ PREPARE q3 AS
 SELECT seq, path_seq, node, agg_cost FROM pgr_withPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    3, ARRAY[4], 
+    3, ARRAY[4],
     driving_side := 'r',
     directed := true,
     details := true);
@@ -134,7 +134,7 @@ PREPARE q6 AS
 SELECT seq, path_seq, node, agg_cost FROM pgr_withPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    3, ARRAY[1], 
+    3, ARRAY[1],
     driving_side := 'l',
     directed := true,
     details := true);
diff --git a/pgtap/withPoints/one_to_one_withPoint.test.sql b/pgtap/withPoints/one_to_one_withPoint.test.sql
index 7ab7516..efb662f 100644
--- a/pgtap/withPoints/one_to_one_withPoint.test.sql
+++ b/pgtap/withPoints/one_to_one_withPoint.test.sql
@@ -7,7 +7,7 @@ PREPARE q1 AS
 SELECT node, edge, agg_cost::TEXT FROM pgr_withPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -1, -5, 
+    -1, -5,
     driving_side := 'r',
     directed := true,
     details := true);
@@ -16,7 +16,7 @@ PREPARE q2 AS
 SELECT node, edge, agg_cost::TEXT FROM pgr_withPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -1, -5, 
+    -1, -5,
     driving_side := 'r',
     directed := true,
     details := false);
@@ -31,7 +31,7 @@ PREPARE q3 AS
 SELECT seq, path_seq, node, edge, cost::text, agg_cost::text FROM pgr_withPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -1, -5, 
+    -1, -5,
     driving_side := 'l',
     directed := true,
     details := true);
@@ -41,7 +41,7 @@ PREPARE q4 AS
 SELECT  seq, path_seq, node, edge, cost::text, agg_cost::text FROM pgr_withPoints(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
     'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -1, -5, 
+    -1, -5,
     driving_side := 'l',
     directed := true,
     details := false);
diff --git a/pgtap/withPoints/undirected_equalityDD.sql b/pgtap/withPoints/undirected_equalityDD.sql
new file mode 100644
index 0000000..d546ff5
--- /dev/null
+++ b/pgtap/withPoints/undirected_equalityDD.sql
@@ -0,0 +1,51 @@
+
+\i setup.sql
+
+SELECT PLAN(3);
+
+
+-- because the graph is undirected, It will not matter the side of the point
+
+--- UNDIRECTED GRAPH
+---
+
+
+-------- both driving sides
+PREPARE q1 AS
+SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    -1, 4.8, driving_side := 'b', details := true, directed:=false)
+ORDER BY seq;
+
+-------- right driving side
+
+PREPARE q2 AS
+SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    -1, 4.8, driving_side := 'r', details := true, directed:=false)
+ORDER BY seq;
+
+
+-------- left driving side
+
+PREPARE q3 AS
+SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    -1, 4.8, driving_side := 'l', details := true, directed:=false)
+ORDER BY seq;
+
+
+SELECT set_eq('q1', 'q2',
+    'Should be equal: both driving sides with right driving side');
+
+SELECT set_eq('q1', 'q3',
+    'Should be equal: both driving sides with left driving side');
+
+SELECT set_eq('q2', 'q3',
+    'Should be equal: right driving sides with left driving side');
+
+SELECT * FROM finish();
+ROLLBACK;
diff --git a/pgtap/withPoints/undirected_equalityWPDijkstra.sql b/pgtap/withPoints/undirected_equalityWPDijkstra.sql
new file mode 100644
index 0000000..3f52927
--- /dev/null
+++ b/pgtap/withPoints/undirected_equalityWPDijkstra.sql
@@ -0,0 +1,271 @@
+
+\i setup.sql
+
+SELECT PLAN(12);
+
+
+
+
+---
+-- UNDIRECTED GRAPH
+--  Because the graph is undirected no matter the driving side
+-- the results should be the same
+
+---------------------------
+-- No Details
+---------------------------
+
+------------------
+---- FROM -1 to 7
+------------------
+SELECT
+    seq::BIGINT, node::BIGINT, edge::BIGINT, cost::FLOAT, agg_cost::FLOAT
+INTO test1
+FROM
+(VALUES
+    (   1 ,   -1 ,    1 ,  0.6 ,        0),
+    (   2 ,    2 ,    4 ,    1 ,      0.6),
+    (   3 ,    5 ,    7 ,    1 ,      1.6),
+    (   4 ,    8 ,    6 ,    1 ,      2.6),
+    (   5 ,    7 ,   -1 ,    0 ,      3.6)
+) AS t (seq, node, edge, cost, agg_cost)
+ORDER BY seq;
+
+-------- both driving sides
+
+PREPARE q1 AS
+SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPoints(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    -1, 7, driving_side := 'b', details := false, directed:=false)
+ORDER BY seq;
+
+SELECT set_eq('q1',
+    $$SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM test1$$,
+    'Should be aggregating individual costs: both driving sides');
+
+
+
+-------- right driving side
+
+PREPARE q2 AS
+SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPoints(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    -1, 7, driving_side := 'r', details := false, directed:=false)
+ORDER BY seq;
+
+
+SELECT set_eq('q2',
+    $$SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM test1$$,
+    'Should be aggregating individual costs: right driving side');
+
+-------- left driving side
+
+PREPARE q3 AS
+SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPoints(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    -1, 7, driving_side := 'l', details := false, directed:=false)
+ORDER BY seq;
+
+
+SELECT set_eq('q3',
+    $$SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM test1$$,
+    'Should be aggregating individual costs: left driving side');
+
+
+
+------------------
+---- FROM 12 to -1
+------------------
+
+-- all results on udirected graph are "allegedly" equal
+SELECT
+    seq::BIGINT, node::BIGINT, edge::BIGINT, cost::FLOAT, agg_cost::FLOAT
+INTO test2
+FROM
+(VALUES
+    (   1 ,   12 ,   15 , 1    , 0),
+    (   2 ,    9 ,   16 , 1    , 1),
+    (   3 ,    4 ,    3 , 1    , 2),
+    (   4 ,    3 ,    2 , 1    , 3),
+    (   5 ,    2 ,    1 , 0.6  , 4),
+    (   6 ,   -1 ,   -1 , 0    , 4.6)
+) AS t (seq, node, edge, cost, agg_cost)
+ORDER BY seq;
+
+-------- both driving sides
+
+PREPARE q4 AS
+SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPoints(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    12, -1, driving_side := 'b', details := false, directed:=false)
+ORDER BY seq;
+
+SELECT set_eq('q4',
+    $$SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM test2$$,
+    'Should be aggregating individual costs: both driving sides');
+
+
+
+-------- right driving side
+
+PREPARE q5 AS
+SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPoints(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    12, -1, driving_side := 'r', details := false, directed:=false)
+ORDER BY seq;
+
+
+SELECT set_eq('q5',
+    $$SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM test2$$,
+    'Should be aggregating individual costs: right driving side');
+
+-------- left driving side
+
+PREPARE q6 AS
+SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPoints(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    12, -1, driving_side := 'l', details := false, directed:=false)
+ORDER BY seq;
+
+
+SELECT set_eq('q6',
+    $$SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM test2$$,
+    'Should be aggregating individual costs: left driving side');
+
+
+
+---------------------------
+-- With Details
+---------------------------
+
+------------------
+---- FROM 1 to 7
+------------------
+SELECT
+    node::BIGINT, edge::BIGINT, cost::FLOAT, agg_cost::FLOAT
+INTO test3
+FROM
+(VALUES
+   (     1 ,    1 , 0.4  , 0),
+   (    -1 ,    1 , 0.6  , 0.4),
+   (     2 ,    4 , 0.7  , 1),
+   (    -6 ,    4 , 0.3  , 1.7),
+   (     5 ,    7 , 1    , 2),
+   (     8 ,    6 , 0.7  , 3),
+   (    -4 ,    6 , 0.3  , 3.7),
+   (     7 ,   -1 , 0    , 4)
+) AS t (node, edge, cost, agg_cost);
+
+-------- both driving sides
+
+PREPARE q7 AS
+SELECT node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPoints(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    1, 7, driving_side := 'b', details := true, directed:=false);
+
+SELECT set_eq('q7',
+    $$SELECT node, edge, cost::TEXT, agg_cost::TEXT FROM test3$$,
+    '1, 7, driving_side := b, details := true, directed:=false');
+
+
+
+
+-------- right driving side
+
+PREPARE q8 AS
+SELECT node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPoints(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    1, 7, driving_side := 'r', details := true, directed:=false)
+ORDER BY seq;
+
+
+SELECT set_eq('q8',
+    $$SELECT node, edge, cost::TEXT, agg_cost::TEXT FROM test3$$,
+    '1, 7, driving_side := r, details := true, directed:=false');
+
+-------- left driving side
+
+PREPARE q9 AS
+SELECT node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPoints(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    1, 7, driving_side := 'l', details := true, directed:=false)
+ORDER BY seq;
+
+
+SELECT set_eq('q9',
+    $$SELECT node, edge, cost::TEXT, agg_cost::TEXT FROM test3$$,
+    '1, 7, driving_side := l, details := true, directed:=false');
+
+
+------------------
+---- FROM 12 to -1
+------------------
+
+-- all results on udirected graph are "allegedly" equal
+SELECT
+    node::BIGINT, edge::BIGINT, cost::FLOAT, agg_cost::FLOAT
+INTO test4
+FROM
+(VALUES
+    (  12 ,   15 , 0.6  , 0),
+    (  -2 ,   15 , 0.4  , 0.6),
+    (   9 ,   16 , 1    , 1),
+    (   4 ,    3 , 1    , 2),
+    (   3 ,    2 , 1    , 3),
+    (   2 ,    1 , 0.6  , 4),
+    (  -1 ,   -1 , 0    , 4.6)
+) AS t (node, edge, cost, agg_cost);
+
+-------- both driving sides
+
+PREPARE q10 AS
+SELECT node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPoints(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    12, -1, driving_side := 'b', details := true, directed:=false);
+
+SELECT set_eq('q10',
+    $$SELECT node, edge, cost::TEXT, agg_cost::TEXT FROM test4$$,
+    '12, -1, driving_side := b, details := true, directed:=false');
+
+
+
+-------- right driving side
+
+PREPARE q11 AS
+SELECT  node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPoints(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    12, -1, driving_side := 'r', details := true, directed:=false);
+
+
+SELECT set_eq('q11',
+    $$SELECT  node, edge, cost::TEXT, agg_cost::TEXT FROM test4$$,
+    '12, -1, driving_side := r, details := true, directed:=false');
+
+-------- left driving side
+
+PREPARE q12 AS
+SELECT  node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPoints(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    12, -1, driving_side := 'l', details := true, directed:=false);
+
+
+SELECT set_eq('q12',
+    $$SELECT  node, edge, cost::TEXT, agg_cost::TEXT FROM test4$$,
+    '12, -1, driving_side := l, details := true, directed:=false');
+
+
+
+SELECT * FROM finish();
+ROLLBACK;
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
index 3d9ac57..eb4a3ec 100644
--- a/sql/CMakeLists.txt
+++ b/sql/CMakeLists.txt
@@ -41,7 +41,7 @@ endif()
 # TARGET: PgRouting_SQL_FILE
 #
 # Builds:  pgrouting--${PGROUTING_VERSION}.sql
-# 
+#
 # add the scripts subdirectory
 # the variable ${PgRouting_SQL_FILES} should already be set at this point
 #
@@ -86,7 +86,7 @@ foreach (old_s ${OLD_SIGNATURES})
     add_custom_command(
         OUTPUT pgrouting--${old_s}--${PGROUTING_VERSION}.sql
         COMMAND ${PERL_EXECUTABLE} ./scripts/build-extension-update-files1.pl ${old_s} ${PgRouting_DEBUG}
-        DEPENDS 
+        DEPENDS
         ./scripts/build-extension-update-files1.pl
         ${PgRouting_CURRENT_SQL_FILE}
         PgRouting_SQL_FILE
diff --git a/sql/components/articulationPoints.sql b/sql/components/articulationPoints.sql
index ebf58df..4b376cd 100644
--- a/sql/components/articulationPoints.sql
+++ b/sql/components/articulationPoints.sql
@@ -5,7 +5,7 @@ Generated with Template by:
 Copyright (c) 2016 pgRouting developers
 Mail: project at pgrouting.org
 
-Function's developer: 
+Function's developer:
 Copyright (c) 2017 Celia Virginia Vergara Castillo
 Mail: vicky_vergara at hotmail.com
 
diff --git a/sql/components/biconnectedComponents.sql b/sql/components/biconnectedComponents.sql
index 3734bff..4edb966 100644
--- a/sql/components/biconnectedComponents.sql
+++ b/sql/components/biconnectedComponents.sql
@@ -5,7 +5,7 @@ Generated with Template by:
 Copyright (c) 2016 pgRouting developers
 Mail: project at pgrouting.org
 
-Function's developer: 
+Function's developer:
 Copyright (c) 2017 Celia Virginia Vergara Castillo
 Mail: vicky_vergara at hotmail.com
 
diff --git a/sql/components/bridges.sql b/sql/components/bridges.sql
index 59c9398..42993cd 100644
--- a/sql/components/bridges.sql
+++ b/sql/components/bridges.sql
@@ -5,7 +5,7 @@ Generated with Template by:
 Copyright (c) 2016 pgRouting developers
 Mail: project at pgrouting.org
 
-Function's developer: 
+Function's developer:
 Copyright (c) 2017 Celia Virginia Vergara Castillo
 Mail: vicky_vergara at hotmail.com
 
@@ -30,7 +30,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 CREATE OR REPLACE FUNCTION pgr_bridges(
     TEXT,                       -- edges_sql
         OUT seq INTEGER,        -- seq
-    OUT edge BIGINT)            -- the number of the edge 
+    OUT edge BIGINT)            -- the number of the edge
 
 RETURNS SETOF RECORD AS
 '$libdir/${PGROUTING_LIBRARY_NAME}', 'bridges'
diff --git a/sql/components/connectedComponents.sql b/sql/components/connectedComponents.sql
index db36ff2..adf6886 100644
--- a/sql/components/connectedComponents.sql
+++ b/sql/components/connectedComponents.sql
@@ -5,7 +5,7 @@ Generated with Template by:
 Copyright (c) 2016 pgRouting developers
 Mail: project at pgrouting.org
 
-Function's developer: 
+Function's developer:
 Copyright (c) 2017 Celia Virginia Vergara Castillo
 Mail: vicky_vergara at hotmail.com
 
diff --git a/sql/components/strongComponents.sql b/sql/components/strongComponents.sql
index 79e00c1..96d2d18 100644
--- a/sql/components/strongComponents.sql
+++ b/sql/components/strongComponents.sql
@@ -5,7 +5,7 @@ Generated with Template by:
 Copyright (c) 2016 pgRouting developers
 Mail: project at pgrouting.org
 
-Function's developer: 
+Function's developer:
 Copyright (c) 2017 Celia Virginia Vergara Castillo
 Mail: vicky_vergara at hotmail.com
 
diff --git a/sql/lineGraph/CMakeLists.txt b/sql/lineGraph/CMakeLists.txt
index 80b58e5..912eb23 100644
--- a/sql/lineGraph/CMakeLists.txt
+++ b/sql/lineGraph/CMakeLists.txt
@@ -1,5 +1,6 @@
 
 SET(LOCAL_FILES
+    lineGraphFull.sql
     lineGraph.sql
     )
 
diff --git a/sql/lineGraph/lineGraphFull.sql b/sql/lineGraph/lineGraphFull.sql
new file mode 100644
index 0000000..599eb67
--- /dev/null
+++ b/sql/lineGraph/lineGraphFull.sql
@@ -0,0 +1,40 @@
+/*PGR-GNU*****************************************************************
+File: lineGraphFull.sql
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer:
+Copyright (c) 2017 Anthony Nicola Tasca
+Mail: atasca10 at gmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+CREATE OR REPLACE FUNCTION pgr_lineGraphFull(
+    TEXT, -- edges_sql
+    OUT seq INTEGER,
+    OUT source BIGINT,
+    OUT target BIGINT,
+    OUT cost FLOAT,
+    OUT edge BIGINT)
+
+RETURNS SETOF RECORD AS
+'$libdir/${PGROUTING_LIBRARY_NAME}', 'lineGraphFull'
+LANGUAGE c IMMUTABLE STRICT;
diff --git a/sql/scripts/build-extension-file.pl b/sql/scripts/build-extension-file.pl
index f368131..5fbbde5 100755
--- a/sql/scripts/build-extension-file.pl
+++ b/sql/scripts/build-extension-file.pl
@@ -34,7 +34,7 @@ my $out_file_name = "$working_directory/@PgRouting_CURRENT_SQL_FILE@";
 
 print "Working_directory $working_directory\n"      if $DEBUG;
 print "out_file_name $out_file_name\n"      if $DEBUG;
- 
+
 open(OUT, ">", "$out_file_name")
     || die "@PgRouting_CURRENT_SQL_FILE@ ERROR: failed to create: '$out_file_name' : $!\n";
 
diff --git a/sql/scripts/build-extension-update-files1.pl b/sql/scripts/build-extension-update-files1.pl
index 80b628e..4b79a93 100755
--- a/sql/scripts/build-extension-update-files1.pl
+++ b/sql/scripts/build-extension-update-files1.pl
@@ -19,8 +19,11 @@ my $version_2_2 = qr/(2.2.[\d+])/;
 my $version_2_3 = qr/(2.3.[\d+])/;
 my $version_2_4 = qr/(2.4.[\d+])/;
 my $version_2_5 = qr/(2.5.[\d+])/;
+my $version_2_6 = qr/(2.6.[\d+])/;
 my $version_2 = qr/(2.[\d+].[\d+])/;
 
+my $current = $version_2_6;
+
 
 sub Usage {
     die "Usage:\nFrom the cmake:
@@ -44,10 +47,10 @@ my $curr_sql_file_name = "$output_directory/pgrouting--$version.sql";
 
 # Verify Currently accepted old and new versions
 die "ERROR: 'build-extension-update-files1.pl' expected old version: 2.0.x ~~ 2.5.x\nHINT: Please check:\n  file: sql/CMakeLists.txt\n  Section: 'TARGET: update_files'"
-    unless $old_version =~ /$version_2_0|$version_2_1|$version_2_2|$version_2_3|$version_2_4|$version_2_5/;
+    unless $old_version =~ /$version_2_0|$version_2_1|$version_2_2|$version_2_3|$version_2_4|$version_2_5|$version_2_6/;
 
 die "ERROR: 'build-extension-update-files1.pl' expected version: 2.5.x\nHINT: ERROR on PGROUTING_VERSION variable\nor File sql/scripts/build-extension-update-files1.pl needs to be reviewed"
-    unless $version =~ /$version_2_5/;
+    unless $version =~ /$current/;
 
 die "ERROR: 'build-extension-update-files1.pl' can not upgrade from $old_version to $version\nHINT: Please check:\n  file: sql/CMakeLists.txt\n  Section: 'TARGET: update_files'" unless $version !~ $old_version;
 
@@ -63,7 +66,7 @@ die "ERROR: Failed to find: current signature file: '$curr_signature_file_name'\
 die "ERROR: Failed to find: current sql file: '$curr_sql_file_name'\n" unless -f $curr_sql_file_name;
 
 ######################################################
-# process section 
+# process section
 ######################################################
 #
 print "Building the updating files\n" if $DEBUG;
@@ -399,7 +402,7 @@ WHERE proname = 'pgr_trsp'
 
         push @commands, "-- pgr_trspviaedges\n";
         push @commands, "-- $old_version:  {sql, eids, pcts, directed, has_reverse_cost,turn_restrict_sql} \n";
-        push @commands, "-- $new_version:  {sql, eids, pcts, directed, has_rcost,       turn_restrict_sql}\n"; 
+        push @commands, "-- $new_version:  {sql, eids, pcts, directed, has_rcost,       turn_restrict_sql}\n";
         push @commands, drop_special_case_function("pgr_trspviaedges(text,integer[],double precision[],boolean,boolean,text)", $old_version, $new_version);
     }
 
@@ -424,7 +427,7 @@ sub pgr_bddijkstra {
 
         push @commands, "-- pgr_bddijkstra\n";
         push @commands, "-- $old_version: {      sql, source_vid, target_vid, directed, has_reverse_cost}   \n";
-        push @commands, "-- $new_version: {edges_sql,  start_vid,    end_vid, directed, has_rcost}\n"; 
+        push @commands, "-- $new_version: {edges_sql,  start_vid,    end_vid, directed, has_rcost}\n";
         my $update_command = "
 UPDATE pg_proc SET
 proargnames = '{\"edges_sql\",\"start_vid\",\"end_vid\",\"directed\",\"has_rcost\"}'
@@ -453,7 +456,7 @@ sub pgr_ksp {
 
         push @commands, "-- pgr_ksp\n";
         push @commands, "-- $old_version:  {      sql, start_vid, end_vid, k, directed, heap_paths, seq, path_id, path_seq, node,edge, cost, agg_cost}\n";
-        push @commands, "-- $new_version:  {edges_sql, start_vid, end_vid, k, directed, heap_paths, seq, path_id, path_seq, node,edge, cost, agg_cost}\n"; 
+        push @commands, "-- $new_version:  {edges_sql, start_vid, end_vid, k, directed, heap_paths, seq, path_id, path_seq, node,edge, cost, agg_cost}\n";
         push @commands, drop_special_case_function("pgr_ksp(text,bigint,bigint,integer,boolean,boolean)",  $old_version, $new_version);
     }
 
@@ -705,7 +708,7 @@ sub get_current_sql {
 
 
     $contents =~ s/\\echo Use "CREATE EXTENSION pgrouting" to load this file. \\quit//;
-        
+
     return $contents
 }
 
diff --git a/sql/sigs/CMakeLists.txt b/sql/sigs/CMakeLists.txt
index 8ea5912..efbca34 100644
--- a/sql/sigs/CMakeLists.txt
+++ b/sql/sigs/CMakeLists.txt
@@ -1,21 +1,27 @@
 SET(OLD_SIGNATURES
+    2.5.3
+    2.5.2
     2.5.1
     2.5.0
+
     2.4.2
     2.4.1
     2.4.0
 
-    2.0.0
-    2.0.1
-    2.1.0
-    2.2.0
-    2.2.1
-    2.2.2
-    2.2.3
-    2.2.4
-    2.3.0
-    2.3.1
     2.3.2
+    2.3.1
+    2.3.0
+
+    2.2.4
+    2.2.3
+    2.2.2
+    2.2.1
+
+    2.2.0
+    2.1.0
+
+    2.0.1
+    2.0.0
     )
 
 foreach (f ${OLD_SIGNATURES})
diff --git a/sql/sigs/pgrouting--2.6.0.sig b/sql/sigs/pgrouting--2.6.0.sig
new file mode 100644
index 0000000..ef75f6c
--- /dev/null
+++ b/sql/sigs/pgrouting--2.6.0.sig
@@ -0,0 +1,191 @@
+#VERSION pgrouting 2.6.0
+#TYPES
+pgr_costresult
+pgr_costresult3
+pgr_geomresult
+#FUNCTIONS
+pgr_alphashape(text,double precision)
+pgr_analyzegraph(text,double precision,text,text,text,text,text)
+pgr_analyzeoneway(text,text[],text[],text[],text[],boolean,text,text,text)
+pgr_apspjohnson(text)
+pgr_apspwarshall(text,boolean,boolean)
+_pgr_array_reverse(anyarray)
+pgr_articulationpoints(text)
+pgr_astarcostmatrix(text,anyarray,boolean,integer,double precision,double precision)
+pgr_astarcost(text,anyarray,anyarray,boolean,integer,double precision,double precision)
+pgr_astarcost(text,anyarray,bigint,boolean,integer,double precision,double precision)
+pgr_astarcost(text,bigint,anyarray,boolean,integer,double precision,double precision)
+pgr_astarcost(text,bigint,bigint,boolean,integer,double precision,double precision)
+pgr_astar(text,anyarray,anyarray,boolean,integer,double precision,double precision)
+_pgr_astar(text,anyarray,anyarray,boolean,integer,double precision,double precision,boolean,boolean)
+pgr_astar(text,anyarray,bigint,boolean,integer,double precision,double precision)
+pgr_astar(text,bigint,anyarray,boolean,integer,double precision,double precision)
+pgr_astar(text,bigint,bigint,boolean,integer,double precision,double precision)
+pgr_astar(text,integer,integer,boolean,boolean)
+pgr_bdastarcostmatrix(text,anyarray,boolean,integer,numeric,numeric)
+pgr_bdastarcost(text,anyarray,anyarray,boolean,integer,numeric,numeric)
+pgr_bdastarcost(text,anyarray,bigint,boolean,integer,numeric,numeric)
+pgr_bdastarcost(text,bigint,anyarray,boolean,integer,numeric,numeric)
+pgr_bdastarcost(text,bigint,bigint,boolean,integer,numeric,numeric)
+_pgr_bdastar(text,anyarray,anyarray,boolean,integer,double precision,double precision,boolean)
+pgr_bdastar(text,anyarray,anyarray,boolean,integer,numeric,numeric)
+pgr_bdastar(text,anyarray,bigint,boolean,integer,numeric,numeric)
+pgr_bdastar(text,bigint,anyarray,boolean,integer,numeric,numeric)
+pgr_bdastar(text,bigint,bigint)
+pgr_bdastar(text,bigint,bigint,boolean,integer,numeric,numeric)
+pgr_bdastar(text,integer,integer,boolean,boolean)
+pgr_bddijkstracostmatrix(text,anyarray,boolean)
+pgr_bddijkstracost(text,anyarray,anyarray,boolean)
+pgr_bddijkstracost(text,anyarray,bigint,boolean)
+pgr_bddijkstracost(text,bigint,anyarray,boolean)
+pgr_bddijkstracost(text,bigint,bigint,boolean)
+pgr_bddijkstra(text,anyarray,anyarray,boolean)
+_pgr_bddijkstra(text,anyarray,anyarray,boolean,boolean)
+pgr_bddijkstra(text,anyarray,bigint,boolean)
+pgr_bddijkstra(text,bigint,anyarray,boolean)
+pgr_bddijkstra(text,bigint,bigint)
+pgr_bddijkstra(text,bigint,bigint,boolean)
+pgr_bddijkstra(text,integer,integer,boolean,boolean)
+pgr_biconnectedcomponents(text)
+pgr_boykovkolmogorov(text,anyarray,anyarray)
+pgr_boykovkolmogorov(text,anyarray,bigint)
+pgr_boykovkolmogorov(text,bigint,anyarray)
+pgr_boykovkolmogorov(text,bigint,bigint)
+pgr_bridges(text)
+_pgr_checkverttab(text,text[],integer,text)
+pgr_connectedcomponents(text)
+pgr_contractgraph(text,bigint[],integer,bigint[],boolean)
+_pgr_createindex(text,text,text,integer,text)
+_pgr_createindex(text,text,text,text,integer,text)
+pgr_createtopology(text,double precision,text,text,text,text,text,boolean)
+pgr_createverticestable(text,text,text,text,text)
+pgr_dijkstracostmatrix(text,anyarray,boolean)
+pgr_dijkstracost(text,anyarray,anyarray,boolean)
+pgr_dijkstracost(text,anyarray,bigint,boolean)
+pgr_dijkstracost(text,bigint,anyarray,boolean)
+pgr_dijkstracost(text,bigint,bigint,boolean)
+pgr_dijkstra(text,anyarray,anyarray,boolean)
+_pgr_dijkstra(text,anyarray,anyarray,boolean,boolean,boolean)
+pgr_dijkstra(text,anyarray,bigint,boolean)
+pgr_dijkstra(text,bigint,anyarray,boolean)
+pgr_dijkstra(text,bigint,bigint)
+pgr_dijkstra(text,bigint,bigint,boolean)
+pgr_dijkstra(text,integer,integer,boolean,boolean)
+pgr_dijkstravia(text,anyarray,boolean,boolean,boolean)
+pgr_drivingdistance(text,anyarray,double precision,boolean,boolean)
+pgr_drivingdistance(text,bigint,double precision,boolean)
+pgr_drivingdistance(text,bigint,double precision,boolean,boolean)
+pgr_edgedisjointpaths(text,anyarray,anyarray,boolean)
+pgr_edgedisjointpaths(text,anyarray,bigint,boolean)
+pgr_edgedisjointpaths(text,bigint,anyarray,boolean)
+pgr_edgedisjointpaths(text,bigint,bigint,boolean)
+pgr_edmondskarp(text,anyarray,anyarray)
+pgr_edmondskarp(text,anyarray,bigint)
+pgr_edmondskarp(text,bigint,anyarray)
+pgr_edmondskarp(text,bigint,bigint)
+_pgr_endpoint(geometry)
+pgr_endpoint(geometry)
+pgr_euclediantsp(text,bigint,bigint,double precision,integer,integer,integer,double precision,double precision,double precision,boolean)
+pgr_flipedges(geometry[])
+pgr_floydwarshall(text,boolean)
+pgr_getcolumnname(text,text)
+_pgr_getcolumnname(text,text,integer,text)
+_pgr_getcolumnname(text,text,text,integer,text)
+_pgr_getcolumntype(text,text,integer,text)
+_pgr_getcolumntype(text,text,text,integer,text)
+_pgr_get_statement(text)
+pgr_gettablename(text)
+_pgr_gettablename(text,integer,text)
+_pgr_gsoc_vrppdtw(text,integer,double precision,double precision,integer)
+pgr_gsoc_vrppdtw(text,integer,integer)
+pgr_iscolumnindexed(text,text)
+_pgr_iscolumnindexed(text,text,integer,text)
+_pgr_iscolumnindexed(text,text,text,integer,text)
+_pgr_iscolumnintable(text,text)
+pgr_iscolumnintable(text,text)
+pgr_johnson(text,boolean)
+pgr_kdijkstracost(text,integer,integer[],boolean,boolean)
+pgr_kdijkstrapath(text,integer,integer[],boolean,boolean)
+_pgr_ksp(text,bigint,bigint,integer,boolean,boolean)
+pgr_ksp(text,bigint,bigint,integer,boolean,boolean)
+pgr_ksp(text,integer,integer,integer,boolean)
+pgr_labelgraph(text,text,text,text,text,text)
+pgr_linegraphfull(text)
+pgr_linegraph(text,boolean)
+_pgr_makedistancematrix(text)
+pgr_maxcardinalitymatch(text,boolean)
+pgr_maxflowboykovkolmogorov(text,anyarray,anyarray)
+pgr_maxflowboykovkolmogorov(text,anyarray,bigint)
+pgr_maxflowboykovkolmogorov(text,bigint,anyarray)
+pgr_maxflowboykovkolmogorov(text,bigint,bigint)
+pgr_maxflowedmondskarp(text,anyarray,anyarray)
+pgr_maxflowedmondskarp(text,anyarray,bigint)
+pgr_maxflowedmondskarp(text,bigint,anyarray)
+pgr_maxflowedmondskarp(text,bigint,bigint)
+pgr_maxflowpushrelabel(text,anyarray,anyarray)
+pgr_maxflowpushrelabel(text,anyarray,bigint)
+pgr_maxflowpushrelabel(text,bigint,anyarray)
+pgr_maxflowpushrelabel(text,bigint,bigint)
+pgr_maxflow(text,anyarray,anyarray)
+_pgr_maxflow(text,anyarray,anyarray,integer,boolean)
+pgr_maxflow(text,anyarray,bigint)
+pgr_maxflow(text,bigint,anyarray)
+pgr_maxflow(text,bigint,bigint)
+pgr_maximumcardinalitymatching(text,boolean)
+_pgr_msg(integer,text,text)
+pgr_nodenetwork(text,double precision,text,text,text,text,boolean)
+_pgr_onerror(boolean,integer,text,text,text,text)
+_pgr_parameter_check(text,text,boolean)
+_pgr_pickdelivereuclidean(text,text,double precision,integer,integer)
+_pgr_pickdeliver(text,text,text,double precision,integer,integer)
+pgr_pointsaspolygon(character varying,double precision)
+pgr_pointstodmatrix(geometry[],integer)
+pgr_pointstovids(geometry[],text,double precision)
+pgr_pointtoedgenode(text,geometry,double precision)
+_pgr_pointtoid(geometry,double precision,text,integer)
+pgr_pushrelabel(text,anyarray,anyarray)
+pgr_pushrelabel(text,anyarray,bigint)
+pgr_pushrelabel(text,bigint,anyarray)
+pgr_pushrelabel(text,bigint,bigint)
+_pgr_quote_ident(text)
+pgr_quote_ident(text)
+_pgr_startpoint(geometry)
+pgr_startpoint(geometry)
+pgr_strongcomponents(text)
+pgr_texttopoints(text,integer)
+_pgr_trsp(text,integer,double precision,integer,double precision,boolean,boolean,text)
+pgr_trsp(text,integer,double precision,integer,double precision,boolean,boolean,text)
+pgr_trsp(text,integer,integer,boolean,boolean,text)
+_pgr_trsp(text,text,anyarray,anyarray,boolean)
+_pgr_trsp(text,text,anyarray,bigint,boolean)
+_pgr_trsp(text,text,bigint,anyarray,boolean)
+_pgr_trsp(text,text,bigint,bigint,boolean)
+pgr_trspviaedges(text,integer[],double precision[],boolean,boolean,text)
+pgr_trspviavertices(text,anyarray,boolean,boolean,text)
+_pgr_trspviavertices(text,integer[],boolean,boolean,text)
+pgr_tsp(double precision[],integer,integer)
+pgr_tsp(text,bigint,bigint,double precision,integer,integer,integer,double precision,double precision,double precision,boolean)
+pgr_tsp(text,integer,integer)
+_pgr_unnest_matrix(double precision[])
+pgr_version()
+_pgr_versionless(text,text)
+pgr_versionless(text,text)
+pgr_vidstodmatrix(integer[],geometry[],text,double precision)
+pgr_vidstodmatrix(text,integer[],boolean,boolean,boolean)
+_pgr_vrponedepot(text,text,text,integer)
+pgr_vrponedepot(text,text,text,integer)
+pgr_withpointscostmatrix(text,text,anyarray,boolean,character)
+pgr_withpointscost(text,text,anyarray,anyarray,boolean,character)
+pgr_withpointscost(text,text,anyarray,bigint,boolean,character)
+pgr_withpointscost(text,text,bigint,anyarray,boolean,character)
+pgr_withpointscost(text,text,bigint,bigint,boolean,character)
+pgr_withpointsdd(text,text,anyarray,double precision,boolean,character,boolean,boolean)
+pgr_withpointsdd(text,text,bigint,double precision,boolean,character,boolean)
+pgr_withpointsksp(text,text,bigint,bigint,integer,boolean,boolean,character,boolean)
+pgr_withpoints(text,text,anyarray,anyarray,boolean,character,boolean)
+_pgr_withpoints(text,text,anyarray,anyarray,boolean,character,boolean,boolean,boolean)
+pgr_withpoints(text,text,anyarray,bigint,boolean,character,boolean)
+pgr_withpoints(text,text,bigint,anyarray,boolean,character,boolean)
+pgr_withpoints(text,text,bigint,bigint,boolean,character,boolean)
+_pgr_withpointsvia(text,bigint[],double precision[],boolean)
+_trsp(text,text,anyarray,anyarray,boolean)
diff --git a/sql/trsp/CMakeLists.txt b/sql/trsp/CMakeLists.txt
index 9d31e56..1f96e13 100644
--- a/sql/trsp/CMakeLists.txt
+++ b/sql/trsp/CMakeLists.txt
@@ -1,5 +1,7 @@
 
 SET(LOCAL_FILES
+    _trsp.sql
+    trsp.sql
     trsp_V2.2.sql
     vias_trsp_V2.2.sql
     )
diff --git a/sql/trsp/_trsp.sql b/sql/trsp/_trsp.sql
new file mode 100644
index 0000000..05aca4d
--- /dev/null
+++ b/sql/trsp/_trsp.sql
@@ -0,0 +1,42 @@
+/*PGR-GNU*****************************************************************
+
+Copyright (c) 2017 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+CREATE OR REPLACE FUNCTION _trsp(
+    TEXT, -- edges_sql
+    TEXT, -- restrictions_sql
+    ANYARRAY,
+    ANYARRAY,
+    directed BOOLEAN DEFAULT true,
+
+    OUT seq INTEGER,
+    OUT path_seq INTEGER,
+    OUT start_vid BIGINT,
+    OUT end_vid BIGINT,
+    OUT node BIGINT,
+    OUT edge BIGINT,
+    OUT cost FLOAT,
+    OUT agg_cost FLOAT)
+RETURNS SETOF RECORD AS
+'${MODULE_PATHNAME}', 'turn_restriction'
+LANGUAGE 'c' VOLATILE;
+
diff --git a/sql/trsp/trsp.sql b/sql/trsp/trsp.sql
new file mode 100644
index 0000000..7ba6dc2
--- /dev/null
+++ b/sql/trsp/trsp.sql
@@ -0,0 +1,154 @@
+/*PGR-GNU*****************************************************************
+File: trsp.sql
+
+Copyright (c) 2017 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+-------------------------------
+-- trsp: one to one
+-------------------------------
+CREATE OR REPLACE FUNCTION _pgr_trsp(
+    TEXT, -- edges_sql
+    TEXT, -- restrictions_sql
+    BIGINT, -- start_vid
+    BIGINT, -- end_vid
+    directed BOOLEAN DEFAULT true,
+
+    OUT seq INTEGER,
+    OUT path_seq INTEGER,
+    OUT node BIGINT,
+    OUT edge BIGINT,
+    OUT cost FLOAT,
+    OUT agg_cost FLOAT)
+
+RETURNS SETOF RECORD AS
+$BODY$
+    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
+        FROM _trsp(
+            _pgr_get_statement($1),
+            _pgr_get_statement($2),
+            ARRAY[$3]::BIGINT[],
+            ARRAY[$4]::BIGINT[],
+            directed) AS a;
+$BODY$
+LANGUAGE sql VOLATILE
+COST 100
+ROWS 1000;
+
+
+-------------------------------
+-- trsp: one to many
+-------------------------------
+CREATE OR REPLACE FUNCTION _pgr_trsp(
+    TEXT, -- edges_sql
+    TEXT, -- restrictions_sql
+    BIGINT, -- start_vid
+    ANYARRAY, -- end_vids
+    directed BOOLEAN DEFAULT true,
+
+    OUT seq INTEGER,
+    OUT path_seq INTEGER,
+    OUT end_vid BIGINT,
+    OUT node BIGINT,
+    OUT edge BIGINT,
+    OUT cost FLOAT,
+    OUT agg_cost FLOAT)
+
+RETURNS SETOF RECORD AS
+$BODY$
+    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
+        FROM _trsp(
+            _pgr_get_statement($1),
+            _pgr_get_statement($2),
+            ARRAY[$3]::BIGINT[],
+            $4::bigint[],
+            directed) AS a;
+$BODY$
+LANGUAGE sql VOLATILE
+COST 100
+ROWS 1000;
+
+
+-------------------------------
+-- trsp: many to one
+-------------------------------
+CREATE OR REPLACE FUNCTION _pgr_trsp(
+    TEXT, -- edges_sql
+    TEXT, -- restrictions_sql
+    ANYARRAY, -- start_vids
+    BIGINT, -- end_vid
+    directed BOOLEAN DEFAULT true,
+
+    OUT seq INTEGER,
+    OUT path_seq INTEGER,
+    OUT start_vid BIGINT,
+    OUT node BIGINT,
+    OUT edge BIGINT,
+    OUT cost FLOAT,
+    OUT agg_cost FLOAT)
+
+RETURNS SETOF RECORD AS
+$BODY$
+    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
+        FROM _trsp(
+            _pgr_get_statement($1),
+            _pgr_get_statement($2),
+            $3::bigint[],
+            ARRAY[$4]::BIGINT[],
+            $5) AS a;
+$BODY$
+LANGUAGE sql VOLATILE
+COST 100
+ROWS 1000;
+
+-------------------------------
+-- trsp: many to many
+-------------------------------
+CREATE OR REPLACE FUNCTION _pgr_trsp(
+    TEXT, -- edges_sql
+    TEXT, -- restrictions_sql
+    ANYARRAY, -- start_vids
+    ANYARRAY, -- end_vids
+    directed BOOLEAN DEFAULT true,
+
+    OUT seq INTEGER,
+    OUT path_seq INTEGER,
+    OUT start_vid BIGINT,
+    OUT end_vid BIGINT,
+    OUT node BIGINT,
+    OUT edge BIGINT,
+    OUT cost FLOAT,
+    OUT agg_cost FLOAT)
+
+RETURNS SETOF RECORD AS
+$BODY$
+    SELECT a.seq, a.path_seq, a.start_vid, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
+        FROM _trsp(
+            _pgr_get_statement($1),
+            _pgr_get_statement($2),
+            $3::bigint[],
+            $4::bigint[],
+            $5) AS a;
+$BODY$
+LANGUAGE sql VOLATILE
+COST 100
+ROWS 1000;
+
diff --git a/sql/trsp/trsp_V2.2.sql b/sql/trsp/trsp_V2.2.sql
index 406bbcf..1740b86 100644
--- a/sql/trsp/trsp_V2.2.sql
+++ b/sql/trsp/trsp_V2.2.sql
@@ -29,16 +29,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 --     - For now just checking with static data, so the query is similar to shortest_paths.
 */
 
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_vid integer,
-    target_vid integer,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '${MODULE_PATHNAME}', 'turn_restrict_shortest_path_vertex'
-LANGUAGE 'c' IMMUTABLE;
 
 CREATE OR REPLACE FUNCTION _pgr_trsp(
     sql text,
@@ -54,6 +44,13 @@ AS '${MODULE_PATHNAME}', 'turn_restrict_shortest_path_edge'
 LANGUAGE 'c' IMMUTABLE;
 
 
+CREATE OR REPLACE FUNCTION _pgr_array_reverse(anyarray) RETURNS anyarray AS $$
+SELECT ARRAY(
+    SELECT $1[i]
+    FROM generate_subscripts($1,1) AS s(i)
+    ORDER BY i DESC
+);
+$$ LANGUAGE 'sql' STRICT IMMUTABLE;
 
 
 /*  pgr_trsp    VERTEX
@@ -77,6 +74,7 @@ $BODY$
 DECLARE
 has_reverse BOOLEAN;
 new_sql TEXT;
+restrictions_query TEXT;
 trsp_sql TEXT;
 BEGIN
     has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
@@ -101,8 +99,26 @@ BEGIN
         RETURN;
     END IF;
 
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, start_vid, end_vid, directed, has_rcost, restrictions_sql);
-    RETURN;
+
+    restrictions_query = $$
+        WITH old_restrictions AS ( $$ ||
+            $6 || $$
+        )
+        SELECT ROW_NUMBER() OVER() AS id,
+            _pgr_array_reverse(array_prepend(target_id, string_to_array(via_path, ',')::INTEGER[])) AS path,
+            to_cost AS cost
+        FROM old_restrictions;
+    $$;
+
+
+
+    RETURN query
+        SELECT (seq - 1)::INTEGER, a.node::INTEGER, a.edge::INTEGER, a.cost
+        FROM _pgr_trsp(new_sql, restrictions_query, start_vid, end_vid, directed) AS a;
+    IF NOT FOUND THEN
+        RAISE EXCEPTION 'Error computing path: Path Not Found';
+    END IF;
+
 END
 $BODY$
 LANGUAGE plpgsql VOLATILE
@@ -155,13 +171,24 @@ BEGIN
 
     -- make the call without contradiction from part of the user
     RETURN query SELECT * FROM _pgr_trspViaVertices(new_sql, via_vids::INTEGER[], directed, has_rcost, restrictions_sql);
+    IF NOT FOUND THEN
+        RAISE EXCEPTION 'Error computing path: Path Not Found';
+    END IF;
 END
 $BODY$
 LANGUAGE plpgsql VOLATILE
 COST 100
 ROWS 1000;
 
+/*
+    Wrapper change on v2.6
+    - without restrictions
+        - call pgr_dijkstra when both end points have a fraction IN (0,1)
+        - call pgr_withPoints when at least one fraction NOT IN (0,1)
 
+    - with restrictions
+      - calls original trsp code
+*/
 CREATE OR REPLACE FUNCTION pgr_trsp(
     sql text,
     source_eid integer,
@@ -177,6 +204,13 @@ DECLARE
 has_reverse BOOLEAN;
 new_sql TEXT;
 trsp_sql TEXT;
+source_sql TEXT;
+target_sql TEXT;
+union_sql TEXT;
+union_sql1 TEXT;
+union_sql2 TEXT;
+final_sql TEXT;
+
 BEGIN
     has_reverse =_pgr_parameter_check('dijkstra', sql, false);
 
@@ -195,17 +229,76 @@ BEGIN
     END IF;
 
     IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) THEN
-        -- no restrictions then its a with points
-        RETURN query SELECT a.seq-1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_withpoints(new_sql,
-            '(SELECT 1 as pid, ' || source_eid || 'as edge_id, ' || source_pos || '::float8 as fraction)'
-            || ' UNION '
-            || '(SELECT 2, ' || target_eid || ', ' || target_pos || ')' ::TEXT,
-            -1, -2, directed) a;
-        -- WHERE node != -2;
+        -- no restrictions then its a withPoints or dijkstra
+        IF source_pos = 0 THEN
+            source_sql = '(SELECT source FROM (' || sql || ') b WHERE id = ' ||  source_eid || ')';
+        ELSE IF source_pos = 1 THEN
+            source_sql = '(SELECT target FROM (' || sql || ') b WHERE id = ' || source_eid || ')';
+        ELSE
+            source_sql = '-1';
+            union_sql1 =  '(SELECT 1 as pid, ' || source_eid || ' as edge_id, ' || source_pos || '::float8 as fraction)';
+        END IF;
+        END IF;
+        -- raise notice 'source_sql %', source_sql;
+        -- raise notice 'union_sql1 %', union_sql1;
+
+
+        IF target_pos = 0 THEN
+            target_sql = '(SELECT source FROM (' || sql || ') c WHERE id = ' ||  target_eid || ')';
+        ELSE IF target_pos = 1 THEN
+            target_sql = '(SELECT target FROM (' || sql || ') c WHERE id = ' ||  target_eid || ')';
+        ELSE
+            target_sql = '-2';
+            union_sql2 =  ' (SELECT 2 as pid, ' || target_eid || ' as edge_id, ' || target_pos || '::float8 as fraction)';
+        END IF;
+        END IF;
+
+        -- raise notice 'target_sql %', target_sql;
+        -- raise notice 'union_sql2 %', union_sql2;
+
+        IF union_sql1 IS NOT NULL AND union_sql2 IS NOT NULL THEN
+            union_sql = union_sql1 || ' UNION ' || union_sql2;
+        ELSE IF union_sql1 IS NOT NULL AND union_sql2 IS NULL THEN
+            union_sql = union_sql1;
+        ELSE IF union_sql1 IS NULL AND union_sql2 IS NOT NULL THEN
+            union_sql = union_sql2;
+        END IF;
+        END IF;
+        END IF;
+
+        IF union_sql IS NULL THEN
+            -- no points then its a dijkstra
+            final_sql = 'WITH final_sql AS (
+                 SELECT  a.seq-1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost FROM pgr_dijkstra($$' || new_sql || '$$
+                ,' || source_sql || '
+                ,' || target_sql || '
+                , directed := ' || directed || '
+            ) a )
+            SELECT seq, id1, id2, cost  FROM final_sql ORDER BY seq';
+        ELSE
+            -- points then its a withPoints
+            final_sql = 'WITH final_sql AS (
+                SELECT  a.seq-1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost FROM pgr_withpoints($$' || new_sql || '$$
+                , $$' || union_sql || '$$
+                ,' || source_sql || '
+                ,' || target_sql || '
+                , directed := ' || directed || '
+            ) a )
+            SELECT seq, CASE WHEN seq = 0 AND ' || source_pos || '=0 THEN id1
+                             WHEN seq = 0 AND ' || source_pos || '!=0 THEN -1
+                             WHEN id2 = -1 AND ' || target_pos || '=0 THEN id1
+                             WHEN id2 = -1 AND ' || target_pos || '!=0 THEN id1
+                             ELSE id1 END AS id1, id2, cost  FROM final_sql ORDER BY seq';
+        END IF;
+
+
+        -- raise notice 'final_sql %', final_sql;
+        RETURN QUERY EXECUTE final_sql;
         RETURN;
+
     END IF;
 
+    -- with restrictions calls the original code
     RETURN query SELECT * FROM _pgr_trsp(new_sql, source_eid, source_pos, target_eid, target_pos, directed, has_reverse_cost, turn_restrict_sql);
     RETURN;
 
diff --git a/sql/trsp/vias_trsp_V2.2.sql b/sql/trsp/vias_trsp_V2.2.sql
index 7b9eb44..747080f 100644
--- a/sql/trsp/vias_trsp_V2.2.sql
+++ b/sql/trsp/vias_trsp_V2.2.sql
@@ -20,7 +20,7 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 ********************************************************************PGR-GNU*/
-create or replace function _pgr_trspViaVertices(sql text, vids integer[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
+create or replace function _pgr_trspViaVertices(sql text, vids integer[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL)
     RETURNS SETOF pgr_costresult3 AS
 $body$
 /*
@@ -38,14 +38,29 @@ declare
     lrra boolean := false;
     seq integer := 0;
     seq2 integer := 0;
+    restrictions_query TEXT;
 
 begin
+    IF (turn_restrict_sql IS NULL) THEN
+        RAISE EXCEPTION 'Restrictions Missing';
+    END IF;
+
+    restrictions_query = $$
+    WITH old_restrictions AS ( $$ ||
+        $5 || $$
+    )
+    SELECT ROW_NUMBER() OVER() AS id,
+    _pgr_array_reverse(array_prepend(target_id, string_to_array(via_path, ',')::INTEGER[])) AS path,
+    to_cost AS cost
+    FROM old_restrictions;
+    $$;
+
 
     -- loop through each pair of vids and compute the path
     for i in 1 .. array_length(vids, 1)-1 loop
         seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from _pgr_trsp(sql, vids[i], vids[i+1], directed, has_rcost, turn_restrict_sql) as a loop
+        for rr in select a.seq, seq2 as id1, a.node::INTEGER as id2, a.edge::INTEGER as id3, a.cost
+                    from _pgr_trsp(sql, restrictions_query, vids[i], vids[i+1], directed) as a loop
             -- filter out the individual path ends except the last one
             -- we might not want to do this so we can know where the via points are in the path result
             -- but this needs more thought
diff --git a/src/allpairs/src/CMakeLists.txt b/src/allpairs/CMakeLists.txt
similarity index 100%
rename from src/allpairs/src/CMakeLists.txt
rename to src/allpairs/CMakeLists.txt
diff --git a/src/allpairs/floydWarshall.c b/src/allpairs/floydWarshall.c
new file mode 100644
index 0000000..d570205
--- /dev/null
+++ b/src/allpairs/floydWarshall.c
@@ -0,0 +1,187 @@
+/*PGR-GNU*****************************************************************
+File: floydWarshall.c
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer: 
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+Mail: vicky_vergara at hotmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "c_common/postgres_connection.h"
+
+
+#include "c_common/debug_macro.h"
+#include "c_common/e_report.h"
+#include "c_common/time_msg.h"
+
+#include "c_common/edges_input.h"
+
+#include "drivers/allpairs/floydWarshall_driver.h"
+
+PGDLLEXPORT Datum floydWarshall(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(floydWarshall);
+
+static
+void
+process(
+        char* edges_sql,
+        bool directed,
+        Matrix_cell_t **result_tuples,
+        size_t *result_count) {
+    pgr_SPI_connect();
+
+    PGR_DBG("Load data");
+    pgr_edge_t *edges = NULL;
+    size_t total_tuples = 0;
+    pgr_get_edges_no_id(edges_sql, &edges, &total_tuples);
+
+    if (total_tuples == 0) {
+        PGR_DBG("No edges found");
+        (*result_count) = 0;
+        (*result_tuples) = NULL;
+        pgr_SPI_finish();
+        return;
+    }
+    PGR_DBG("Total %ld tuples in query:", total_tuples);
+
+    clock_t start_t = clock();
+    PGR_DBG("Starting processing");
+    char *err_msg = NULL;
+    char *notice_msg = NULL;
+    char *log_msg = NULL;
+    do_pgr_floydWarshall(
+            edges,
+            total_tuples,
+            directed,
+            result_tuples,
+            result_count,
+            &log_msg,
+            &err_msg);
+    time_msg(" processing FloydWarshall", start_t, clock());
+
+    if (err_msg && (*result_tuples)) {
+        free(*result_tuples);
+        (*result_tuples) = NULL;
+        (*result_count) = 0;
+    }
+
+    pgr_global_report(log_msg, notice_msg, err_msg);
+
+
+    if (log_msg) pfree(log_msg);
+    if (notice_msg) pfree(notice_msg);
+    if (err_msg) pfree(err_msg);
+
+    pfree(edges);
+    pgr_SPI_finish();
+}
+
+
+PGDLLEXPORT Datum
+floydWarshall(PG_FUNCTION_ARGS) {
+    FuncCallContext     *funcctx;
+    TupleDesc            tuple_desc;
+
+    /**************************************************************************/
+    /*                                                                        */
+    Matrix_cell_t  *result_tuples = NULL;
+    size_t result_count = 0;
+    /*                                                                        */
+    /**************************************************************************/
+
+    if (SRF_IS_FIRSTCALL()) {
+        MemoryContext   oldcontext;
+        funcctx = SRF_FIRSTCALL_INIT();
+        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
+
+
+        /*********************************************************************/
+        /*                                                                   */
+        // QUERY
+        // CREATE OR REPLACE FUNCTION pgr_floydWarshalll(
+        // edges_sql TEXT,
+        // directed BOOLEAN,
+        // OUT seq INTEGER,
+        // OUT from_vid bigint,
+        // OUT to_vid bigint,
+        // OUT cost float)
+
+
+        PGR_DBG("Calling process");
+        process(
+                text_to_cstring(PG_GETARG_TEXT_P(0)),
+                PG_GETARG_BOOL(1),
+                &result_tuples,
+                &result_count);
+
+        /*                                                                   */
+        /*********************************************************************/
+
+#if PGSQL_VERSION > 95
+        funcctx->max_calls = result_count;
+#else
+        funcctx->max_calls = (uint32_t)result_count;
+#endif
+        funcctx->user_fctx = result_tuples;
+        if (get_call_result_type(fcinfo, NULL, &tuple_desc)
+                != TYPEFUNC_COMPOSITE)
+            ereport(ERROR,
+                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+                     errmsg("function returning record called in context "
+                         "that cannot accept type record")));
+
+        funcctx->tuple_desc = tuple_desc;
+        MemoryContextSwitchTo(oldcontext);
+    }
+
+    funcctx = SRF_PERCALL_SETUP();
+    tuple_desc = funcctx->tuple_desc;
+    result_tuples = (Matrix_cell_t*) funcctx->user_fctx;
+
+    if (funcctx->call_cntr < funcctx->max_calls) {
+        HeapTuple    tuple;
+        Datum        result;
+        Datum        *values;
+        bool*        nulls;
+
+        /*********************************************************************/
+        values = palloc(3 * sizeof(Datum));
+        nulls = palloc(3 * sizeof(bool));
+
+        // postgres starts counting from 1
+        values[0] = Int64GetDatum(result_tuples[funcctx->call_cntr].from_vid);
+        nulls[0] = false;
+        values[1] = Int64GetDatum(result_tuples[funcctx->call_cntr].to_vid);
+        nulls[1] = false;
+        values[2] = Float8GetDatum(result_tuples[funcctx->call_cntr].cost);
+        nulls[2] = false;
+        /*********************************************************************/
+
+        tuple = heap_form_tuple(tuple_desc, values, nulls);
+        result = HeapTupleGetDatum(tuple);
+        SRF_RETURN_NEXT(funcctx, result);
+    } else {
+        SRF_RETURN_DONE(funcctx);
+    }
+}
+
diff --git a/src/allpairs/floydWarshall_driver.cpp b/src/allpairs/floydWarshall_driver.cpp
new file mode 100644
index 0000000..db4af75
--- /dev/null
+++ b/src/allpairs/floydWarshall_driver.cpp
@@ -0,0 +1,106 @@
+/*PGR-GNU*****************************************************************
+File: floydWarshall_driver.cpp
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer: 
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+Mail: vicky_vergara at hotmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "drivers/allpairs/floydWarshall_driver.h"
+
+#include <sstream>
+#include <deque>
+#include <vector>
+
+#include "allpairs/pgr_allpairs.hpp"
+
+#include "cpp_common/pgr_assert.h"
+
+
+void
+do_pgr_floydWarshall(
+        pgr_edge_t  *data_edges,
+        size_t total_tuples,
+        bool directedFlag,
+
+        Matrix_cell_t **return_tuples,
+        size_t *return_count,
+        char ** log_msg,
+        char ** err_msg) {
+    std::ostringstream log;
+    std::ostringstream err;
+
+    try {
+        pgassert(!(*log_msg));
+        pgassert(!(*err_msg));
+        pgassert(!(*return_tuples));
+        pgassert(*return_count == 0);
+
+        graphType gType = directedFlag? DIRECTED: UNDIRECTED;
+
+
+        if (directedFlag) {
+            log << "Processing Directed graph\n";
+            pgrouting::DirectedGraph digraph(gType);
+            digraph.insert_edges(data_edges, total_tuples);
+            pgr_floydWarshall(digraph, *return_count, return_tuples);
+        } else {
+            log << "Processing Undirected graph\n";
+            pgrouting::UndirectedGraph undigraph(gType);
+            undigraph.insert_edges(data_edges, total_tuples);
+            pgr_floydWarshall(undigraph, *return_count, return_tuples);
+        }
+
+
+        if (*return_count == 0) {
+            err <<  "No result generated, report this error\n";
+            *err_msg = pgr_msg(err.str().c_str());
+            *return_tuples = NULL;
+            *return_count = 0;
+            return;
+        }
+
+        *log_msg = log.str().empty()?
+            *log_msg :
+            pgr_msg(log.str().c_str());
+    } catch (AssertFailedException &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch (std::exception &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch(...) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << "Caught unknown exception!";
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    }
+}
diff --git a/src/allpairs/johnson.c b/src/allpairs/johnson.c
new file mode 100644
index 0000000..06dd6ec
--- /dev/null
+++ b/src/allpairs/johnson.c
@@ -0,0 +1,189 @@
+/*PGR-GNU*****************************************************************
+File: johnson.c
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer:
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+Mail: vicky_vergara at hotmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "c_common/postgres_connection.h"
+
+#include "c_common/debug_macro.h"
+#include "c_common/e_report.h"
+#include "c_common/time_msg.h"
+#include "c_common/edges_input.h"
+
+#include "drivers/allpairs/johnson_driver.h"
+
+PGDLLEXPORT Datum johnson(PG_FUNCTION_ARGS);
+
+/******************************************************************************/
+/*                          MODIFY AS NEEDED                                  */
+static
+void process(
+        char* edges_sql,
+        bool directed,
+        Matrix_cell_t **result_tuples,
+        size_t *result_count) {
+    pgr_SPI_connect();
+
+    PGR_DBG("Load data");
+    pgr_edge_t *edges = NULL;
+    size_t total_tuples = 0;
+    pgr_get_edges_no_id(edges_sql, &edges, &total_tuples);
+
+    if (total_tuples == 0) {
+        PGR_DBG("No edges found");
+        (*result_count) = 0;
+        (*result_tuples) = NULL;
+        pgr_SPI_finish();
+        return;
+    }
+    PGR_DBG("Total %ld tuples in query:", total_tuples);
+
+    PGR_DBG("Starting processing");
+    char *log_msg = NULL;
+    char *notice_msg = NULL;
+    char *err_msg = NULL;
+    clock_t start_t = clock();
+    do_pgr_johnson(
+            edges,
+            total_tuples,
+            directed,
+            result_tuples,
+            result_count,
+            &log_msg,
+            &err_msg);
+    time_msg(" processing Johnson", start_t, clock());
+
+    if (err_msg && (*result_tuples)) {
+        free(*result_tuples);
+        (*result_tuples) = NULL;
+        (*result_count) = 0;
+    }
+
+    pgr_global_report(log_msg, notice_msg, err_msg);
+
+
+    if (log_msg) pfree(log_msg);
+    if (notice_msg) pfree(notice_msg);
+    if (err_msg) pfree(err_msg);
+
+    pfree(edges);
+    pgr_SPI_finish();
+}
+/*                                                                            */
+/******************************************************************************/
+
+PG_FUNCTION_INFO_V1(johnson);
+PGDLLEXPORT Datum
+johnson(PG_FUNCTION_ARGS) {
+    FuncCallContext     *funcctx;
+    TupleDesc            tuple_desc;
+
+    /**************************************************************************/
+    /*                          MODIFY AS NEEDED                              */
+    /*                                                                        */
+    Matrix_cell_t *result_tuples = NULL;
+    size_t result_count = 0;
+    /*                                                                        */
+    /**************************************************************************/
+
+    if (SRF_IS_FIRSTCALL()) {
+        MemoryContext   oldcontext;
+        funcctx = SRF_FIRSTCALL_INIT();
+        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
+
+
+        /*********************************************************************/
+        /*                          MODIFY AS NEEDED                         */
+        // CREATE OR REPLACE FUNCTION pgr_johnson(
+        // edges_sql TEXT,
+        // directed BOOLEAN,
+
+        PGR_DBG("Calling process");
+        process(
+                text_to_cstring(PG_GETARG_TEXT_P(0)),
+                PG_GETARG_BOOL(1),
+                &result_tuples,
+                &result_count);
+
+        /*                                                                   */
+        /*********************************************************************/
+
+#if PGSQL_VERSION > 95
+        funcctx->max_calls = result_count;
+#else
+        funcctx->max_calls = (uint32_t)result_count;
+#endif
+        funcctx->user_fctx = result_tuples;
+        if (get_call_result_type(fcinfo, NULL, &tuple_desc)
+                != TYPEFUNC_COMPOSITE)
+            ereport(ERROR,
+                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+                     errmsg("function returning record called in context "
+                         "that cannot accept type record")));
+
+        funcctx->tuple_desc = tuple_desc;
+        MemoryContextSwitchTo(oldcontext);
+    }
+
+    funcctx = SRF_PERCALL_SETUP();
+    tuple_desc = funcctx->tuple_desc;
+    result_tuples = (Matrix_cell_t*) funcctx->user_fctx;
+
+    if (funcctx->call_cntr < funcctx->max_calls) {
+        HeapTuple    tuple;
+        Datum        result;
+        Datum        *values;
+        bool         *nulls;
+
+        /*********************************************************************/
+        /*                          MODIFY AS NEEDED                         */
+        // OUT seq BIGINT,
+        // OUT from_vid BIGINT,
+        // OUT to_vid BIGINT,
+        // OUT cost float)
+
+        values = palloc(3 * sizeof(Datum));
+        nulls = palloc(3 * sizeof(bool));
+
+        // postgres starts counting from 1
+        values[0] = Int64GetDatum(result_tuples[funcctx->call_cntr].from_vid);
+        nulls[0] = false;
+        values[1] = Int64GetDatum(result_tuples[funcctx->call_cntr].to_vid);
+        nulls[1] = false;
+        values[2] = Float8GetDatum(result_tuples[funcctx->call_cntr].cost);
+        nulls[2] = false;
+
+        /*********************************************************************/
+
+        tuple = heap_form_tuple(tuple_desc, values, nulls);
+        result = HeapTupleGetDatum(tuple);
+        SRF_RETURN_NEXT(funcctx, result);
+    } else {
+        SRF_RETURN_DONE(funcctx);
+    }
+}
+
diff --git a/src/allpairs/johnson_driver.cpp b/src/allpairs/johnson_driver.cpp
new file mode 100644
index 0000000..cda4a09
--- /dev/null
+++ b/src/allpairs/johnson_driver.cpp
@@ -0,0 +1,107 @@
+/*PGR-GNU*****************************************************************
+File: johnson_driver.cpp
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer: 
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+Mail: vicky_vergara at hotmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "drivers/allpairs/johnson_driver.h"
+
+#include <sstream>
+#include <deque>
+#include <vector>
+
+#include "allpairs/pgr_allpairs.hpp"
+
+#include "cpp_common/pgr_assert.h"
+
+
+void
+do_pgr_johnson(
+        pgr_edge_t  *data_edges,
+        size_t total_tuples,
+        bool directed,
+        Matrix_cell_t **return_tuples,
+        size_t *return_count,
+        char ** log_msg,
+        char ** err_msg) {
+    std::ostringstream log;
+    std::ostringstream err;
+
+    try {
+        pgassert(!(*log_msg));
+        pgassert(!(*err_msg));
+        pgassert(!(*return_tuples));
+        pgassert(*return_count == 0);
+
+        graphType gType = directed? DIRECTED: UNDIRECTED;
+
+        std::deque< Path >paths;
+
+        if (directed) {
+            log << "Processing Directed graph\n";
+            pgrouting::DirectedGraph digraph(gType);
+            digraph.insert_edges(data_edges, total_tuples);
+            pgr_johnson(digraph, *return_count, return_tuples);
+        } else {
+            log << "Processing Undirected graph\n";
+            pgrouting::UndirectedGraph undigraph(gType);
+            undigraph.insert_edges(data_edges, total_tuples);
+            pgr_johnson(undigraph, *return_count, return_tuples);
+        }
+
+
+        if (*return_count == 0) {
+            log <<  "No result generated, report this error\n";
+            *log_msg = pgr_msg(err.str().c_str());
+            *return_tuples = NULL;
+            *return_count = 0;
+            return;
+        }
+
+
+        *log_msg = log.str().empty()?
+            *log_msg :
+            pgr_msg(log.str().c_str());
+    } catch (AssertFailedException &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch (std::exception &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch(...) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << "Caught unknown exception!";
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    }
+}
diff --git a/src/allpairs/src/floydWarshall.c b/src/allpairs/src/floydWarshall.c
deleted file mode 100644
index 0267a7f..0000000
--- a/src/allpairs/src/floydWarshall.c
+++ /dev/null
@@ -1,183 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: floydWarshall.c
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer: 
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-Mail: vicky_vergara at hotmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "c_common/postgres_connection.h"
-
-
-#include "c_common/debug_macro.h"
-#include "c_common/time_msg.h"
-#include "c_common/edges_input.h"
-
-#include "drivers/allpairs/floydWarshall_driver.h"
-
-PGDLLEXPORT Datum floydWarshall(PG_FUNCTION_ARGS);
-PG_FUNCTION_INFO_V1(floydWarshall);
-
-static
-void
-process(
-        char* edges_sql,
-        bool directed,
-        Matrix_cell_t **result_tuples,
-        size_t *result_count) {
-    pgr_SPI_connect();
-
-    PGR_DBG("Load data");
-    pgr_edge_t *edges = NULL;
-    size_t total_tuples = 0;
-    pgr_get_edges_no_id(edges_sql, &edges, &total_tuples);
-
-    if (total_tuples == 0) {
-        PGR_DBG("No edges found");
-        (*result_count) = 0;
-        (*result_tuples) = NULL;
-        pgr_SPI_finish();
-        return;
-    }
-    PGR_DBG("Total %ld tuples in query:", total_tuples);
-
-    clock_t start_t = clock();
-    PGR_DBG("Starting processing");
-    char *err_msg = NULL;
-    char *log_msg = NULL;
-    do_pgr_floydWarshall(
-            edges,
-            total_tuples,
-            directed,
-            result_tuples,
-            result_count,
-            &log_msg,
-            &err_msg);
-    time_msg(" processing FloydWarshall", start_t, clock());
-
-    PGR_DBG("Returning %ld tuples\n", *result_count);
-
-    if (log_msg) {
-        PGR_DBG("LOG = %s\n", log_msg);
-        free(log_msg);
-    }
-
-    if (err_msg) {
-       if (*result_tuples) free(*result_tuples);
-       elog(ERROR, " %s\n", err_msg);
-    }
-
-    pfree(edges);
-    pgr_SPI_finish();
-}
-
-
-PGDLLEXPORT Datum
-floydWarshall(PG_FUNCTION_ARGS) {
-    FuncCallContext     *funcctx;
-    TupleDesc            tuple_desc;
-
-    /**************************************************************************/
-    /*                                                                        */
-    Matrix_cell_t  *result_tuples = NULL;
-    size_t result_count = 0;
-    /*                                                                        */
-    /**************************************************************************/
-
-    if (SRF_IS_FIRSTCALL()) {
-        MemoryContext   oldcontext;
-        funcctx = SRF_FIRSTCALL_INIT();
-        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
-
-
-        /*********************************************************************/
-        /*                                                                   */
-        // QUERY
-        // CREATE OR REPLACE FUNCTION pgr_floydWarshalll(
-        // edges_sql TEXT,
-        // directed BOOLEAN,
-        // OUT seq INTEGER,
-        // OUT from_vid bigint,
-        // OUT to_vid bigint,
-        // OUT cost float)
-
-
-        PGR_DBG("Calling process");
-        process(
-                text_to_cstring(PG_GETARG_TEXT_P(0)),
-                PG_GETARG_BOOL(1),
-                &result_tuples,
-                &result_count);
-
-        /*                                                                   */
-        /*********************************************************************/
-
-#if PGSQL_VERSION > 95
-        funcctx->max_calls = result_count;
-#else
-        funcctx->max_calls = (uint32_t)result_count;
-#endif
-        funcctx->user_fctx = result_tuples;
-        if (get_call_result_type(fcinfo, NULL, &tuple_desc)
-                != TYPEFUNC_COMPOSITE)
-            ereport(ERROR,
-                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                     errmsg("function returning record called in context "
-                         "that cannot accept type record")));
-
-        funcctx->tuple_desc = tuple_desc;
-        MemoryContextSwitchTo(oldcontext);
-    }
-
-    funcctx = SRF_PERCALL_SETUP();
-    tuple_desc = funcctx->tuple_desc;
-    result_tuples = (Matrix_cell_t*) funcctx->user_fctx;
-
-    if (funcctx->call_cntr < funcctx->max_calls) {
-        HeapTuple    tuple;
-        Datum        result;
-        Datum        *values;
-        bool*        nulls;
-
-        /*********************************************************************/
-        values = palloc(3 * sizeof(Datum));
-        nulls = palloc(3 * sizeof(bool));
-
-        // postgres starts counting from 1
-        values[0] = Int64GetDatum(result_tuples[funcctx->call_cntr].from_vid);
-        nulls[0] = false;
-        values[1] = Int64GetDatum(result_tuples[funcctx->call_cntr].to_vid);
-        nulls[1] = false;
-        values[2] = Float8GetDatum(result_tuples[funcctx->call_cntr].cost);
-        nulls[2] = false;
-        /*********************************************************************/
-
-        tuple = heap_form_tuple(tuple_desc, values, nulls);
-        result = HeapTupleGetDatum(tuple);
-        SRF_RETURN_NEXT(funcctx, result);
-    } else {
-        SRF_RETURN_DONE(funcctx);
-    }
-}
-
diff --git a/src/allpairs/src/floydWarshall_driver.cpp b/src/allpairs/src/floydWarshall_driver.cpp
deleted file mode 100644
index d498c4b..0000000
--- a/src/allpairs/src/floydWarshall_driver.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: floydWarshall_driver.cpp
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer: 
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-Mail: vicky_vergara at hotmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "drivers/allpairs/floydWarshall_driver.h"
-
-#include <sstream>
-#include <deque>
-#include <vector>
-
-#include "allpairs/pgr_allpairs.hpp"
-
-#include "cpp_common/pgr_assert.h"
-
-
-void
-do_pgr_floydWarshall(
-        pgr_edge_t  *data_edges,
-        size_t total_tuples,
-        bool directedFlag,
-
-        // return values
-        Matrix_cell_t **return_tuples,
-        size_t *return_count,
-        char ** log_msg,
-        char ** err_msg) {
-    // function starts
-    std::ostringstream log;
-    try {
-        pgassert(!(*log_msg));
-        pgassert(!(*err_msg));
-        pgassert(!(*return_tuples));
-        pgassert(*return_count == 0);
-
-        graphType gType = directedFlag? DIRECTED: UNDIRECTED;
-
-
-        if (directedFlag) {
-            log << "Processing Directed graph\n";
-            pgrouting::DirectedGraph digraph(gType);
-            digraph.insert_edges(data_edges, total_tuples);
-            log << digraph;
-            pgr_floydWarshall(digraph, *return_count, return_tuples);
-        } else {
-            log << "Processing Undirected graph\n";
-            pgrouting::UndirectedGraph undigraph(gType);
-            undigraph.insert_edges(data_edges, total_tuples);
-            log << undigraph;
-            pgr_floydWarshall(undigraph, *return_count, return_tuples);
-        }
-
-
-        if (*return_count == 0) {
-            log <<  "NOTICE: No Vertices found??? wiered error\n";
-            *err_msg = strdup(log.str().c_str());
-            *return_tuples = NULL;
-            *return_count = 0;
-            return;
-        }
-
-        *log_msg = strdup(log.str().c_str());
-        return;
-    } catch (AssertFailedException &except) {
-        if (*return_tuples) free(*return_tuples);
-        (*return_count) = 0;
-        log << except.what() << "\n";
-        *err_msg = strdup(log.str().c_str());
-    } catch (std::exception& except) {
-        if (*return_tuples) free(*return_tuples);
-        (*return_count) = 0;
-        log << except.what() << "\n";
-        *err_msg = strdup(log.str().c_str());
-    } catch(...) {
-        if (*return_tuples) free(*return_tuples);
-        (*return_count) = 0;
-        log << "Caught unknown exception!\n";
-        *err_msg = strdup(log.str().c_str());
-    }
-}
diff --git a/src/allpairs/src/johnson.c b/src/allpairs/src/johnson.c
deleted file mode 100644
index f7dfae2..0000000
--- a/src/allpairs/src/johnson.c
+++ /dev/null
@@ -1,175 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: johnson.c
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer:
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-Mail: vicky_vergara at hotmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "c_common/postgres_connection.h"
-
-#include "c_common/debug_macro.h"
-#include "c_common/time_msg.h"
-#include "c_common/edges_input.h"
-
-#include "drivers/allpairs/johnson_driver.h"
-
-PGDLLEXPORT Datum johnson(PG_FUNCTION_ARGS);
-
-/******************************************************************************/
-/*                          MODIFY AS NEEDED                                  */
-static
-void process(
-        char* edges_sql,
-        bool directed,
-        Matrix_cell_t **result_tuples,
-        size_t *result_count) {
-    pgr_SPI_connect();
-
-    PGR_DBG("Load data");
-    pgr_edge_t *edges = NULL;
-    size_t total_tuples = 0;
-    pgr_get_edges_no_id(edges_sql, &edges, &total_tuples);
-
-    if (total_tuples == 0) {
-        PGR_DBG("No edges found");
-        (*result_count) = 0;
-        (*result_tuples) = NULL;
-        pgr_SPI_finish();
-        return;
-    }
-    PGR_DBG("Total %ld tuples in query:", total_tuples);
-
-    PGR_DBG("Starting processing");
-    char *err_msg = (char *)"";
-    clock_t start_t = clock();
-    do_pgr_johnson(
-            edges,
-            total_tuples,
-            directed,
-            result_tuples,
-            result_count,
-            &err_msg);
-    time_msg(" processing Johnson", start_t, clock());
-    PGR_DBG("Returning %ld tuples\n", *result_count);
-    PGR_DBG("Returned message = %s\n", err_msg);
-
-    free(err_msg);
-    pfree(edges);
-    pgr_SPI_finish();
-}
-/*                                                                            */
-/******************************************************************************/
-
-PG_FUNCTION_INFO_V1(johnson);
-PGDLLEXPORT Datum
-johnson(PG_FUNCTION_ARGS) {
-    FuncCallContext     *funcctx;
-    TupleDesc            tuple_desc;
-
-    /**************************************************************************/
-    /*                          MODIFY AS NEEDED                              */
-    /*                                                                        */
-    Matrix_cell_t *result_tuples = NULL;
-    size_t result_count = 0;
-    /*                                                                        */
-    /**************************************************************************/
-
-    if (SRF_IS_FIRSTCALL()) {
-        MemoryContext   oldcontext;
-        funcctx = SRF_FIRSTCALL_INIT();
-        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
-
-
-        /*********************************************************************/
-        /*                          MODIFY AS NEEDED                         */
-        // CREATE OR REPLACE FUNCTION pgr_johnson(
-        // edges_sql TEXT,
-        // directed BOOLEAN,
-
-        PGR_DBG("Calling process");
-        process(
-                text_to_cstring(PG_GETARG_TEXT_P(0)),
-                PG_GETARG_BOOL(1),
-                &result_tuples,
-                &result_count);
-
-        /*                                                                   */
-        /*********************************************************************/
-
-#if PGSQL_VERSION > 95
-        funcctx->max_calls = result_count;
-#else
-        funcctx->max_calls = (uint32_t)result_count;
-#endif
-        funcctx->user_fctx = result_tuples;
-        if (get_call_result_type(fcinfo, NULL, &tuple_desc)
-                != TYPEFUNC_COMPOSITE)
-            ereport(ERROR,
-                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                     errmsg("function returning record called in context "
-                         "that cannot accept type record")));
-
-        funcctx->tuple_desc = tuple_desc;
-        MemoryContextSwitchTo(oldcontext);
-    }
-
-    funcctx = SRF_PERCALL_SETUP();
-    tuple_desc = funcctx->tuple_desc;
-    result_tuples = (Matrix_cell_t*) funcctx->user_fctx;
-
-    if (funcctx->call_cntr < funcctx->max_calls) {
-        HeapTuple    tuple;
-        Datum        result;
-        Datum        *values;
-        bool         *nulls;
-
-        /*********************************************************************/
-        /*                          MODIFY AS NEEDED                         */
-        // OUT seq BIGINT,
-        // OUT from_vid BIGINT,
-        // OUT to_vid BIGINT,
-        // OUT cost float)
-
-        values = palloc(3 * sizeof(Datum));
-        nulls = palloc(3 * sizeof(bool));
-
-        // postgres starts counting from 1
-        values[0] = Int64GetDatum(result_tuples[funcctx->call_cntr].from_vid);
-        nulls[0] = false;
-        values[1] = Int64GetDatum(result_tuples[funcctx->call_cntr].to_vid);
-        nulls[1] = false;
-        values[2] = Float8GetDatum(result_tuples[funcctx->call_cntr].cost);
-        nulls[2] = false;
-
-        /*********************************************************************/
-
-        tuple = heap_form_tuple(tuple_desc, values, nulls);
-        result = HeapTupleGetDatum(tuple);
-        SRF_RETURN_NEXT(funcctx, result);
-    } else {
-        SRF_RETURN_DONE(funcctx);
-    }
-}
-
diff --git a/src/allpairs/src/johnson_driver.cpp b/src/allpairs/src/johnson_driver.cpp
deleted file mode 100644
index 15d3352..0000000
--- a/src/allpairs/src/johnson_driver.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: johnson_driver.cpp
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer: 
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-Mail: vicky_vergara at hotmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "drivers/allpairs/johnson_driver.h"
-
-#include <sstream>
-#include <deque>
-#include <vector>
-
-#include "allpairs/pgr_allpairs.hpp"
-
-
-// CREATE OR REPLACE FUNCTION pgr_johnson(edges_sql TEXT, directed BOOLEAN,
-void
-do_pgr_johnson(
-        pgr_edge_t  *data_edges,
-        size_t total_tuples,
-        bool directed,
-        Matrix_cell_t **return_tuples,
-        size_t *return_count,
-        char **err_msg) {
-    std::ostringstream log;
-    try {
-        if (total_tuples == 1) {
-            log << "Required: more than one tuple\n";
-            (*return_tuples) = NULL;
-            (*return_count) = 0;
-            *err_msg = strdup(log.str().c_str());
-            return;
-        }
-
-        graphType gType = directed? DIRECTED: UNDIRECTED;
-
-        std::deque< Path >paths;
-
-        if (directed) {
-            log << "Working with directed Graph\n";
-            pgrouting::DirectedGraph digraph(gType);
-            digraph.insert_edges(data_edges, total_tuples);
-            pgr_johnson(digraph, *return_count, return_tuples);
-        } else {
-            log << "Working with Undirected Graph\n";
-            pgrouting::UndirectedGraph undigraph(gType);
-            undigraph.insert_edges(data_edges, total_tuples);
-            pgr_johnson(undigraph, *return_count, return_tuples);
-        }
-
-        if (*return_count == 0) {
-            log <<  "NOTICE: No Vertices found??? wiered error\n";
-            *err_msg = strdup(log.str().c_str());
-            (*return_tuples) = NULL;
-            (*return_count) = 0;
-            return;
-        }
-
-#ifndef DEBUG
-        *err_msg = strdup("OK");
-#else
-        *err_msg = strdup(log.str().c_str());
-#endif
-    } catch ( ... ) {
-        log << "Caught unknown exception!\n";
-        *err_msg = strdup(log.str().c_str());
-    }
-}
diff --git a/src/allpairs/test/doc-floydWarshall.result b/src/allpairs/test/doc-floydWarshall.result
deleted file mode 100644
index 4d2f2b8..0000000
--- a/src/allpairs/test/doc-floydWarshall.result
+++ /dev/null
@@ -1,33 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- q1
-SELECT * FROM pgr_floydWarshall(
-    'SELECT id, source, target, cost FROM edge_table where id < 5'
-);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         1 |       2 |        1
-         1 |       5 |        2
-         2 |       5 |        1
-(3 rows)
-
--- q2
-SELECT * FROM pgr_floydWarshall(
-    'SELECT id, source, target, cost FROM edge_table where id < 5',
-    false
-);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         1 |       2 |        1
-         1 |       5 |        2
-         2 |       1 |        1
-         2 |       5 |        1
-         5 |       1 |        2
-         5 |       2 |        1
-(6 rows)
-
--- q3
-ROLLBACK;
-ROLLBACK
diff --git a/src/allpairs/test/doc-johnson.result b/src/allpairs/test/doc-johnson.result
deleted file mode 100644
index 5c9f684..0000000
--- a/src/allpairs/test/doc-johnson.result
+++ /dev/null
@@ -1,35 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- q1
-SELECT * FROM pgr_johnson(
-    'SELECT source, target, cost FROM edge_table WHERE id < 5
-         ORDER BY id'
-);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         1 |       2 |        1
-         1 |       5 |        2
-         2 |       5 |        1
-(3 rows)
-
--- q2
-SELECT * FROM pgr_johnson(
-    'SELECT source, target, cost FROM edge_table WHERE id < 5
-         ORDER BY id',
-    false
-);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         1 |       2 |        1
-         1 |       5 |        2
-         2 |       1 |        1
-         2 |       5 |        1
-         5 |       1 |        2
-         5 |       2 |        1
-(6 rows)
-
--- q3
-ROLLBACK;
-ROLLBACK
diff --git a/src/allpairs/test/test.conf b/src/allpairs/test/test.conf
deleted file mode 100644
index e004209..0000000
--- a/src/allpairs/test/test.conf
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/perl -w
-
-%main::tests = (
-    'any' => {
-        'comment' => 'All pairs tests.',
-        'data' => [''],
-        'tests' => [qw(
-            doc-johnson
-            doc-floydWarshall
-            )],
-
-        'documentation' => [qw(
-            doc-johnson
-            doc-floydWarshall
-            )]
-    },
-# I don't know what this are for or how to use them.
-#  TODO ask Steve 
-#    'vpg-vpgis' => {}, # for version specific tests
-#    '8-1' => {},       # for pg 8.x and postgis 1.x
-#    '9.2-2.1' => {},   # for pg 9.2 and postgis 2.1
-
-);
-
-1;
diff --git a/src/alpha_shape/src/CMakeLists.txt b/src/alpha_shape/CMakeLists.txt
similarity index 100%
rename from src/alpha_shape/src/CMakeLists.txt
rename to src/alpha_shape/CMakeLists.txt
diff --git a/src/alpha_shape/alpha.c b/src/alpha_shape/alpha.c
new file mode 100644
index 0000000..2eabbab
--- /dev/null
+++ b/src/alpha_shape/alpha.c
@@ -0,0 +1,350 @@
+/*PGR-GNU*****************************************************************
+FILE: alpha.c
+
+Copyright (c) 2006 Anton A. Patrushev, Orkney, Inc.
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include <float.h>
+#include <stdint.h>
+
+#include "c_common/postgres_connection.h"
+
+
+#include "catalog/pg_type.h"
+#include "c_common/e_report.h"
+
+#include "drivers/alpha_shape/alpha_driver.h"
+
+
+
+/*
+ * Define this to have profiling enabled
+ */
+// #define PROFILE
+
+
+PGDLLEXPORT Datum alphashape(PG_FUNCTION_ARGS);
+
+#undef DEBUG
+#include "c_common/debug_macro.h"
+
+// The number of tuples to fetch from the SPI cursor at each iteration
+#define TUPLIMIT 1000
+
+
+#if 0
+static int
+finish(int code, int ret) {
+  code = SPI_finish();
+  if (code  != SPI_OK_FINISH) {
+    elog(ERROR, "couldn't disconnect from SPI");
+    return -1;
+  }
+  return ret;
+}
+#endif
+
+typedef struct vertex_columns {
+  int id;
+  int x;
+  int y;
+} vertex_columns_t;
+
+
+
+static int
+fetch_vertices_columns(SPITupleTable *tuptable,
+                       vertex_columns_t *vertex_columns) {
+    if (tuptable) {}  // TODO(vicky) this is unused parameter
+  vertex_columns->id = SPI_fnumber(SPI_tuptable->tupdesc, "id");
+  vertex_columns->x = SPI_fnumber(SPI_tuptable->tupdesc, "x");
+  vertex_columns->y = SPI_fnumber(SPI_tuptable->tupdesc, "y");
+
+  if (vertex_columns->id == SPI_ERROR_NOATTRIBUTE ||
+      vertex_columns->x == SPI_ERROR_NOATTRIBUTE ||
+      vertex_columns->y == SPI_ERROR_NOATTRIBUTE) {
+      elog(ERROR, "Error, query must return columns "
+           "'id', 'x' and 'y'");
+      return -1;
+    }
+
+  if (SPI_gettypeid(SPI_tuptable->tupdesc, vertex_columns->id) != INT4OID ||
+      SPI_gettypeid(SPI_tuptable->tupdesc, vertex_columns->x) != FLOAT8OID ||
+      SPI_gettypeid(SPI_tuptable->tupdesc, vertex_columns->y) != FLOAT8OID) {
+      elog(ERROR,
+           "Error, column 'id' must be of type int4,"
+           "'x' and 'y' must be of type float8");
+      return -1;
+    }
+
+  return 0;
+}
+
+static void
+fetch_vertex(HeapTuple *tuple, TupleDesc *tupdesc,
+             vertex_columns_t *vertex_columns, vertex_t *target_vertex) {
+  Datum binval;
+  bool isnull;
+
+  binval = SPI_getbinval(*tuple, *tupdesc, vertex_columns->x, &isnull);
+  if (isnull)
+    elog(ERROR, "x contains a null value");
+  target_vertex->x = DatumGetFloat8(binval);
+
+  binval = SPI_getbinval(*tuple, *tupdesc, vertex_columns->y, &isnull);
+  if (isnull)
+    elog(ERROR, "y contains a null value");
+  target_vertex->y = DatumGetFloat8(binval);
+}
+
+static void compute_alpha_shape(
+        char* sql, float8 alpha,
+        vertex_t **res,
+        size_t *res_count) {
+  int SPIcode;
+  void *SPIplan;
+  Portal SPIportal;
+  bool moredata = true;
+  size_t ntuples;
+  vertex_t *vertices = NULL;
+  size_t total_tuples = 0;
+#ifndef _MSC_VER
+  vertex_columns_t vertex_columns = {.id = -1, .x = -1, .y = -1};
+#else   // _MSC_VER
+  vertex_columns_t vertex_columns = {-1, -1, -1};
+#endif  // _MSC_VER
+#if 0
+  int ret = -1;
+#endif
+  PGR_DBG("start alpha_shape\n");
+
+  SPIcode = SPI_connect();
+  if (SPIcode  != SPI_OK_CONNECT) {
+      elog(ERROR, "alpha_shape: couldn't open a connection to SPI");
+      return;
+    }
+
+  SPIplan = SPI_prepare(sql, 0, NULL);
+  if (SPIplan  == NULL) {
+      elog(ERROR, "alpha_shape: couldn't create query plan via SPI");
+      return;
+    }
+
+  if ((SPIportal = SPI_cursor_open(NULL, SPIplan, NULL, NULL, true)) == NULL) {
+      elog(ERROR, "alpha_shape: SPI_cursor_open('%s') returns NULL", sql);
+      return;
+    }
+
+  while (moredata == true) {
+      SPI_cursor_fetch(SPIportal, true, TUPLIMIT);
+
+      if (vertex_columns.id == -1) {
+          if (fetch_vertices_columns(SPI_tuptable, &vertex_columns) == -1)
+        return;
+        }
+
+      ntuples = SPI_processed;
+      total_tuples += ntuples;
+      if (!vertices)
+        vertices = palloc(total_tuples * sizeof(vertex_t));
+      else
+        vertices = repalloc(vertices, total_tuples * sizeof(vertex_t));
+
+      if (vertices == NULL) {
+          elog(ERROR, "Out of memory");
+          return;
+        }
+
+      if (ntuples > 0) {
+          uint32_t t;
+          SPITupleTable *tuptable = SPI_tuptable;
+          TupleDesc tupdesc = SPI_tuptable->tupdesc;
+
+          for (t = 0; t < ntuples; t++) {
+              HeapTuple tuple = tuptable->vals[t];
+              fetch_vertex(&tuple, &tupdesc, &vertex_columns,
+                           &vertices[total_tuples - ntuples + t]);
+            }
+          SPI_freetuptable(tuptable);
+        } else {
+          moredata = false;
+        }
+    }
+
+
+  // if (total_tuples < 2) //this was the buggy code of the pgrouting project.
+  // TODO(someone): report this as a bug to the pgrouting project
+  // the CGAL alpha-shape function crashes
+  //    if called with less than three points!!!
+
+  if (total_tuples < 3) {
+      if (vertices) pfree(vertices);
+      pgr_SPI_finish();
+      elog(ERROR, "Less than 3 vertices."
+              " Alpha shape calculation needs at least 3 vertices.");
+      return;
+  }
+  if (total_tuples == 1) {
+      if (vertices) pfree(vertices);
+      pgr_SPI_finish();
+      elog(ERROR, "Distance is too short."
+              " only 1 vertex for alpha shape calculation."
+              " alpha shape calculation needs at least 3 vertices.");
+      return;
+  }
+  if (total_tuples == 2) {
+      if (vertices) pfree(vertices);
+      pgr_SPI_finish();
+      elog(ERROR, "Distance is too short."
+              " only 2 vertices for alpha shape calculation."
+              " alpha shape calculation needs at least 3 vertices.");
+      return;
+  }
+  if (total_tuples < 3) {
+      // elog(ERROR, "Distance is too short ....");
+      if (vertices) pfree(vertices);
+      pgr_SPI_finish();
+      return;
+  }
+
+  PGR_DBG("Calling CGAL alpha-shape\n");
+
+  char *err_msg = NULL;
+  char* log_msg = NULL;
+  char* notice_msg = NULL;
+
+  alpha_shape(vertices, total_tuples, alpha, res, res_count, &err_msg);
+
+  if (err_msg && (*res)) {
+      pfree(*res);
+      (*res) = NULL;
+      (*res_count) = 0;
+  }
+
+  pgr_global_report(log_msg, notice_msg, err_msg);
+
+  if (log_msg) pfree(log_msg);
+  if (notice_msg) pfree(notice_msg);
+  if (err_msg) pfree(err_msg);
+  if (vertices) pfree(vertices);
+  pgr_SPI_finish();
+}
+
+PG_FUNCTION_INFO_V1(alphashape);
+
+PGDLLEXPORT
+Datum alphashape(PG_FUNCTION_ARGS) {
+  FuncCallContext      *funcctx;
+  TupleDesc            tuple_desc;
+  vertex_t     *res = NULL;
+
+  /* stuff done only on the first call of the function */
+  if (SRF_IS_FIRSTCALL()) {
+      MemoryContext   oldcontext;
+      size_t res_count;
+
+
+      /* create a function context for cross-call persistence */
+      funcctx = SRF_FIRSTCALL_INIT();
+
+      /* switch to memory context appropriate for multiple function calls */
+      oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
+
+      compute_alpha_shape(text_to_cstring(PG_GETARG_TEXT_P(0)),
+                                PG_GETARG_FLOAT8(1), &res, &res_count);
+
+      /* total number of tuples to be returned */
+      PGR_DBG("Conting tuples number\n");
+#if PGSQL_VERSION > 95
+      funcctx->max_calls = res_count;
+#else
+      funcctx->max_calls = (uint32_t)res_count;
+#endif
+      funcctx->user_fctx = res;
+
+      PGR_DBG("Total count %lu", res_count);
+
+      if (get_call_result_type(fcinfo, NULL, &tuple_desc) != TYPEFUNC_COMPOSITE)
+        ereport(ERROR,
+            (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+            errmsg("function returning record called in context "
+                   "that cannot accept type record")));
+
+      funcctx->tuple_desc = BlessTupleDesc(tuple_desc);
+
+      MemoryContextSwitchTo(oldcontext);
+    }
+
+  /* stuff done on every call of the function */
+  PGR_DBG("Strange stuff doing\n");
+  funcctx = SRF_PERCALL_SETUP();
+
+  tuple_desc = funcctx->tuple_desc;
+  res = (vertex_t*)funcctx->user_fctx;
+
+  PGR_DBG("Trying to allocate some memory\n");
+
+  if (funcctx->call_cntr < funcctx->max_calls) {
+      /* do when there is more left to send */
+      HeapTuple    tuple;
+      Datum        result;
+      Datum *values;
+      bool* nulls;
+      double x;
+      double y;
+
+      values = palloc(2 * sizeof(Datum));
+      nulls = palloc(2 * sizeof(bool));
+
+      x = res[funcctx->call_cntr].x;
+      y = res[funcctx->call_cntr].y;
+      if (x == DBL_MAX && y == DBL_MAX) {
+        values[0] = 0;
+        values[1] = 0;
+        nulls[0] = true;
+        nulls[1] = true;
+      } else {
+        values[0] = Float8GetDatum(x);
+        values[1] = Float8GetDatum(y);
+        nulls[0] = false;
+        nulls[1] = false;
+      }
+
+      PGR_DBG("Heap making\n");
+
+      tuple = heap_form_tuple(tuple_desc, values, nulls);
+
+      PGR_DBG("Datum making\n");
+
+      /* make the tuple into a datum */
+      result = HeapTupleGetDatum(tuple);
+
+      PGR_DBG("Trying to free some memory\n");
+
+      /* clean up (this is not really necessary) */
+      pfree(values);
+      pfree(nulls);
+
+      SRF_RETURN_NEXT(funcctx, result);
+    } else  {
+      SRF_RETURN_DONE(funcctx);
+    }
+}
diff --git a/src/alpha_shape/alpha_driver.cpp b/src/alpha_shape/alpha_driver.cpp
new file mode 100644
index 0000000..db7b84d
--- /dev/null
+++ b/src/alpha_shape/alpha_driver.cpp
@@ -0,0 +1,291 @@
+/*PGR-GNU*****************************************************************
+File: alpha_drivedist.cpp
+
+Copyright (c) 2006 Anton A. Patrushev, Orkney, Inc.
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+/*
+ * As a special exception, you have permission to link this program
+ * with the CGAL library and distribute executables, as long as you
+ * follow the requirements of the GNU GPL in regard to all of the
+ * software in the executable aside from CGAL.
+ *
+ */
+
+
+/***********************************************************************
+Takes a list of points and returns a list of segments
+corresponding to the Alpha shape.
+************************************************************************/
+
+#include "drivers/alpha_shape/alpha_driver.h"
+
+#include <vector>
+#include <list>
+#include <cmath>
+#include <utility>
+#include <algorithm>
+#include <set>
+
+#include "cpp_common/pgr_assert.h"
+
+#include "CGAL/Simple_cartesian.h"
+#include "CGAL/Filtered_kernel.h"
+#include "CGAL/algorithm.h"
+
+#include "CGAL/Polygon_2.h"
+#include "CGAL/Delaunay_triangulation_2.h"
+#include "CGAL/Triangulation_2.h"
+#include "CGAL/Triangulation_hierarchy_vertex_base_2.h"
+#include "CGAL/Triangulation_hierarchy_2.h"
+#include "CGAL/Triangulation_face_base_2.h"
+#include "CGAL/Triangulation_euclidean_traits_2.h"
+#include "CGAL/Alpha_shape_2.h"
+#include "CGAL/Alpha_shape_face_base_2.h"
+#include "CGAL/Alpha_shape_vertex_base_2.h"
+
+
+#include "cpp_common/pgr_alloc.hpp"
+
+typedef double coord_type;
+
+typedef CGAL::Simple_cartesian<coord_type>  SC;
+typedef CGAL::Filtered_kernel<SC> K;
+typedef K::Point_2  Point;
+typedef K::Segment_2  Segment;
+typedef K::Vector_2 Vector;
+typedef CGAL::Polygon_2<K> Polygon_2;
+
+typedef CGAL::Alpha_shape_vertex_base_2<K> Avb;
+typedef CGAL::Triangulation_hierarchy_vertex_base_2<Avb> Av;
+
+typedef CGAL::Triangulation_face_base_2<K> Tf;
+typedef CGAL::Alpha_shape_face_base_2<K, Tf> Af;
+
+typedef CGAL::Triangulation_default_data_structure_2<K, Av, Af> Tds;
+typedef CGAL::Delaunay_triangulation_2<K, Tds> Dt;
+typedef CGAL::Triangulation_hierarchy_2<Dt> Ht;
+typedef CGAL::Alpha_shape_2<Ht> Alpha_shape_2;
+
+typedef Alpha_shape_2::Face_circulator  Face_circulator;
+typedef Alpha_shape_2::Vertex_circulator  Vertex_circulator;
+
+typedef Alpha_shape_2::Alpha_iterator Alpha_iterator;
+typedef Alpha_shape_2::Alpha_shape_edges_iterator Alpha_shape_edges_iterator;
+
+// ---------------------------------------------------------------------
+
+double get_angle(Point p, Point q, Point r) {
+    double m_pi(3.14159265358979323846);
+    Vector v1(q, p);
+    Vector v2(q, r);
+    double cross = v1.x() * v2.y() - v1.y() * v2.x();
+    double dot = v1.x() * v2.x() + v1.y() * v2.y();
+    double angle = atan2(cross, dot);
+    if (angle < 0.0) {
+        angle += 2 * m_pi;
+    }
+    return angle;
+}
+
+size_t prev_size = 0;
+void find_next_edge(Segment s, std::vector<Segment>& segments,
+        std::set<int>& unusedIndexes, std::vector<Polygon_2>& rings) {
+    if (unusedIndexes.empty()
+            || prev_size == unusedIndexes.size()) {
+        return;
+    }
+
+    prev_size = unusedIndexes.size();
+
+    Point start = s.source();
+    Point end = s.target();
+    rings.back().push_back(end);
+
+    std::vector<int> nextIndexes;
+    for (unsigned int i = 0; i < segments.size(); i++) {
+        if (unusedIndexes.find(i) != unusedIndexes.end()) {
+            Point source = segments.at(i).source();
+            if (source == end) {
+                nextIndexes.push_back(i);
+            }
+        }
+    }
+    if (nextIndexes.size() == 1) {
+        int i = nextIndexes.at(0);
+        unusedIndexes.erase(i);
+        find_next_edge(segments.at(i), segments, unusedIndexes, rings);
+    } else if (nextIndexes.size() > 1) {
+        std::vector< std::pair<double, int> > nextAngles;
+        for (unsigned int i = 0; i < nextIndexes.size(); i++) {
+            int j = nextIndexes.at(i);
+            Point target = segments.at(j).target();
+            double angle = get_angle(start, end, target);
+            nextAngles.push_back(std::pair<double, int>(angle, j));
+        }
+        std::sort(nextAngles.begin(), nextAngles.end());
+        int i = nextAngles.begin()->second;
+        unusedIndexes.erase(i);
+        find_next_edge(segments.at(i), segments, unusedIndexes, rings);
+    }
+
+    if (!unusedIndexes.empty()) {
+        for (unsigned int i = 0; i < segments.size(); i++) {
+            if (unusedIndexes.find(i) != unusedIndexes.end()) {
+                Polygon_2 ring;
+                ring.push_back(segments.at(i).source());
+                rings.push_back(ring);
+                unusedIndexes.erase(i);
+                find_next_edge(segments.at(i), segments, unusedIndexes, rings);
+            }
+        }
+    }
+}
+
+template <class OutputIterator>
+void
+alpha_edges(const Alpha_shape_2& A,
+        OutputIterator out) {
+    for (Alpha_shape_edges_iterator it =  A.alpha_shape_edges_begin();
+            it != A.alpha_shape_edges_end();
+            ++it) {
+        *out++ = A.segment(*it);
+    }
+}
+
+
+int alpha_shape(vertex_t *vertices, size_t count, double alpha,
+        vertex_t **return_tuples, size_t *res_count, char **err_msg) {
+    std::ostringstream err;
+
+    try {
+        std::list<Point> points;
+        {
+            std::vector<Point> pv;
+
+            for (std::size_t j = 0; j < count; ++j) {
+                Point p(vertices[j].x, vertices[j].y);
+                pv.push_back(p);
+            }
+
+            std::sort(pv.begin(), pv.end(),
+                    [](const Point &e1, const Point &e2)->bool {
+                    return e2.y() < e1.y();
+                    });
+            std::stable_sort(pv.begin(), pv.end(),
+                    [](const Point &e1, const Point &e2)->bool {
+                    return e2.x() < e1.x();
+                    });
+            pv.erase(std::unique(pv.begin(), pv.end()), pv.end());
+            if (pv.size() != count &&  pv.size() < 3) {
+                err << "After eliminating duplicated points,"
+                   " less than 3 points remain!!."
+                   " Alpha shape calculation needs at least 3 vertices.";
+                *err_msg = pgr_msg(err.str().c_str());
+                return -1;
+            }
+            points.insert(points.begin(), pv.begin(), pv.end());
+        }
+
+        Alpha_shape_2 A(points.begin(), points.end(),
+                coord_type(10000),
+                Alpha_shape_2::REGULARIZED);
+
+        std::vector<Segment> segments;
+        //  std::vector<Segment> result;
+
+        //  Alpha_shape_2::Alpha_shape_vertices_iterator vit;
+        //  Alpha_shape_2::Vertex_handle vertex;
+        //  Alpha_shape_2::Alpha_shape_edges_iterator eit;
+        //  Alpha_shape_2::Edge edge;
+        //  Alpha_shape_2::Face_iterator fit;
+        //  Alpha_shape_2::Face_handle face;
+
+        if (alpha <= 0.0) {
+            alpha = *A.find_optimal_alpha(1);
+        }
+        A.set_alpha(alpha);
+
+        alpha_edges(A, std::back_inserter(segments));
+
+        //  Segment s = segments.at(0);
+        //  find_next_edge(s, segments, result);
+        if (segments.empty()) {
+            *return_tuples = NULL;
+            *res_count = 0;
+        } else {
+            std::set<int> unusedIndexes;
+            for (unsigned int i = 0; i < segments.size(); i++) {
+                unusedIndexes.insert(i);
+            }
+
+            std::vector<Polygon_2> rings;
+            Polygon_2 ring;
+            ring.push_back(segments.at(0).source());
+            rings.push_back(ring);
+            unusedIndexes.erase(0);
+            find_next_edge(segments.at(0), segments, unusedIndexes, rings);
+
+            size_t result_count = 0;
+            for (unsigned int i = 0; i < rings.size(); i++) {
+                Polygon_2 ring = rings.at(i);
+                result_count += ring.size();
+            }
+            result_count += rings.size() - 1;
+            *return_tuples = pgr_alloc(result_count, (*return_tuples));
+            *res_count = result_count;
+
+            int idx = 0;
+            for (unsigned int i = 0; i < rings.size(); i++) {
+                if (i > 0) {
+                    (*return_tuples)[idx].x = DBL_MAX;
+                    (*return_tuples)[idx].y = DBL_MAX;
+                    idx++;
+                }
+                Polygon_2 ring = rings.at(i);
+                for (unsigned int j = 0; j < ring.size(); j++) {
+                    Point point = ring.vertex(j);
+                    (*return_tuples)[idx].x = point.x();
+                    (*return_tuples)[idx].y = point.y();
+                    idx++;
+                }
+            }
+        }
+        *err_msg = NULL;
+
+        return EXIT_SUCCESS;
+    } catch (AssertFailedException &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*res_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+    } catch (std::exception &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*res_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+    } catch(...) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*res_count) = 0;
+        err << "Caught unknown exception!";
+        *err_msg = pgr_msg(err.str().c_str());
+    }
+    return -1;
+}
diff --git a/src/alpha_shape/src/alpha.c b/src/alpha_shape/src/alpha.c
deleted file mode 100644
index f239f01..0000000
--- a/src/alpha_shape/src/alpha.c
+++ /dev/null
@@ -1,316 +0,0 @@
-/*PGR-GNU*****************************************************************
-FILE: alpha.c
-
-Copyright (c) 2006 Anton A. Patrushev, Orkney, Inc.
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "c_common/postgres_connection.h"
-#include <float.h>
-
-
-#include "catalog/pg_type.h"
-
-#include <stdint.h>
-#include "alpha_driver.h"
-
-
-
-/*
- * Define this to have profiling enabled
- */
-// #define PROFILE
-
-
-PGDLLEXPORT Datum alphashape(PG_FUNCTION_ARGS);
-
-#undef DEBUG
-#include "c_common/debug_macro.h"
-
-// The number of tuples to fetch from the SPI cursor at each iteration
-#define TUPLIMIT 1000
-
-
-static int
-finish(int code, int ret) {
-  code = SPI_finish();
-  if (code  != SPI_OK_FINISH) {
-    elog(ERROR, "couldn't disconnect from SPI");
-    return -1;
-  }
-  return ret;
-}
-
-
-typedef struct vertex_columns {
-  int id;
-  int x;
-  int y;
-} vertex_columns_t;
-
-
-
-static int
-fetch_vertices_columns(SPITupleTable *tuptable,
-                       vertex_columns_t *vertex_columns) {
-    if (tuptable) {}; // TODO this is unused parameter
-  vertex_columns->id = SPI_fnumber(SPI_tuptable->tupdesc, "id");
-  vertex_columns->x = SPI_fnumber(SPI_tuptable->tupdesc, "x");
-  vertex_columns->y = SPI_fnumber(SPI_tuptable->tupdesc, "y");
-
-  if (vertex_columns->id == SPI_ERROR_NOATTRIBUTE ||
-      vertex_columns->x == SPI_ERROR_NOATTRIBUTE ||
-      vertex_columns->y == SPI_ERROR_NOATTRIBUTE) {
-      elog(ERROR, "Error, query must return columns "
-           "'id', 'x' and 'y'");
-      return -1;
-    }
-
-  if (SPI_gettypeid(SPI_tuptable->tupdesc, vertex_columns->id) != INT4OID ||
-      SPI_gettypeid(SPI_tuptable->tupdesc, vertex_columns->x) != FLOAT8OID ||
-      SPI_gettypeid(SPI_tuptable->tupdesc, vertex_columns->y) != FLOAT8OID) {
-      elog(ERROR,
-           "Error, column 'id' must be of type int4, 'x' and 'y' must be of type float8");
-      return -1;
-    }
-
-  return 0;
-}
-
-static void
-fetch_vertex(HeapTuple *tuple, TupleDesc *tupdesc,
-             vertex_columns_t *vertex_columns, vertex_t *target_vertex) {
-  Datum binval;
-  bool isnull;
-
-  binval = SPI_getbinval(*tuple, *tupdesc, vertex_columns->x, &isnull);
-  if (isnull)
-    elog(ERROR, "x contains a null value");
-  target_vertex->x = DatumGetFloat8(binval);
-
-  binval = SPI_getbinval(*tuple, *tupdesc, vertex_columns->y, &isnull);
-  if (isnull)
-    elog(ERROR, "y contains a null value");
-  target_vertex->y = DatumGetFloat8(binval);
-}
-
-static int compute_alpha_shape(char* sql, float8 alpha, vertex_t **res, size_t *res_count) {
-  int SPIcode;
-  void *SPIplan;
-  Portal SPIportal;
-  bool moredata = true;
-  size_t ntuples;
-  vertex_t *vertices = NULL;
-  size_t total_tuples = 0;
-#ifndef _MSC_VER
-  vertex_columns_t vertex_columns = {.id = -1, .x = -1, .y = -1};
-#else   // _MSC_VER
-  vertex_columns_t vertex_columns = {-1, -1, -1};
-#endif  // _MSC_VER
-  char *err_msg;
-  int ret = -1;
-
-  PGR_DBG("start alpha_shape\n");
-
-  SPIcode = SPI_connect();
-  if (SPIcode  != SPI_OK_CONNECT) {
-      elog(ERROR, "alpha_shape: couldn't open a connection to SPI");
-      return -1;
-    }
-
-  SPIplan = SPI_prepare(sql, 0, NULL);
-  if (SPIplan  == NULL) {
-      elog(ERROR, "alpha_shape: couldn't create query plan via SPI");
-      return -1;
-    }
-
-  if ((SPIportal = SPI_cursor_open(NULL, SPIplan, NULL, NULL, true)) == NULL) {
-      elog(ERROR, "alpha_shape: SPI_cursor_open('%s') returns NULL", sql);
-      return -1;
-    }
-
-  while (moredata == true) {
-      SPI_cursor_fetch(SPIportal, true, TUPLIMIT);
-
-      if (vertex_columns.id == -1) {
-          if (fetch_vertices_columns(SPI_tuptable, &vertex_columns) == -1)
-        return finish(SPIcode, ret);
-        }
-
-      ntuples = SPI_processed;
-      total_tuples += ntuples;
-      if (!vertices)
-        vertices = palloc(total_tuples * sizeof(vertex_t));
-      else
-        vertices = repalloc(vertices, total_tuples * sizeof(vertex_t));
-
-      if (vertices == NULL) {
-          elog(ERROR, "Out of memory");
-          return finish(SPIcode, ret);
-        }
-
-      if (ntuples > 0) {
-          uint32_t t;
-          SPITupleTable *tuptable = SPI_tuptable;
-          TupleDesc tupdesc = SPI_tuptable->tupdesc;
-
-          for (t = 0; t < ntuples; t++) {
-              HeapTuple tuple = tuptable->vals[t];
-              fetch_vertex(&tuple, &tupdesc, &vertex_columns,
-                           &vertices[total_tuples - ntuples + t]);
-            }
-          SPI_freetuptable(tuptable);
-        } else {
-          moredata = false;
-        }
-    }
-
-
-  // if (total_tuples < 2) //this was the buggy code of the pgrouting project.
-  // TODO(someone): report this as a bug to the pgrouting project
-  // the CGAL alpha-shape function crashes if called with less than three points!!!
-
-  if (total_tuples < 3) {
-      elog(ERROR, "Less than 3 vertices. Alpha shape calculation needs at least 3 vertices.");
-      return finish(SPIcode, ret);
-  }
-  if (total_tuples == 1) {
-      elog(ERROR, "Distance is too short. only 1 vertex for alpha shape calculation. alpha shape calculation needs at least 3 vertices.");
-  }
-  if (total_tuples == 2) {
-      elog(ERROR, "Distance is too short. only 2 vertices for alpha shape calculation. alpha shape calculation needs at least 3 vertices.");
-  }
-  if (total_tuples < 3) {
-    // elog(ERROR, "Distance is too short ....");
-    return finish(SPIcode, ret);
-  }
-
-  PGR_DBG("Calling CGAL alpha-shape\n");
-
-  ret = alpha_shape(vertices, total_tuples, alpha, res, res_count, &err_msg);
-
-  if (ret < 0) {
-      // elog(ERROR, "Error computing shape: %s", err_msg);
-      ereport(ERROR, (errcode(ERRCODE_E_R_E_CONTAINING_SQL_NOT_PERMITTED), errmsg("%s", err_msg)));
-    }
-
-  return finish(SPIcode, ret);
-}
-
-PG_FUNCTION_INFO_V1(alphashape);
-
-PGDLLEXPORT
-Datum alphashape(PG_FUNCTION_ARGS) {
-  FuncCallContext      *funcctx;
-  TupleDesc            tuple_desc;
-  vertex_t     *res = NULL;
-
-  /* stuff done only on the first call of the function */
-  if (SRF_IS_FIRSTCALL()) {
-      MemoryContext   oldcontext;
-      size_t res_count;
-
-
-      /* create a function context for cross-call persistence */
-      funcctx = SRF_FIRSTCALL_INIT();
-
-      /* switch to memory context appropriate for multiple function calls */
-      oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
-
-      compute_alpha_shape(text_to_cstring(PG_GETARG_TEXT_P(0)),
-                                PG_GETARG_FLOAT8(1), &res, &res_count);
-
-      /* total number of tuples to be returned */
-      PGR_DBG("Conting tuples number\n");
-#if PGSQL_VERSION > 95
-      funcctx->max_calls = res_count;
-#else
-      funcctx->max_calls = (uint32_t)res_count;
-#endif
-      funcctx->user_fctx = res;
-
-      PGR_DBG("Total count %lu", res_count);
-
-      if (get_call_result_type(fcinfo, NULL, &tuple_desc) != TYPEFUNC_COMPOSITE)
-        ereport(ERROR,
-            (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-            errmsg("function returning record called in context "
-                   "that cannot accept type record")));
-
-      funcctx->tuple_desc = BlessTupleDesc(tuple_desc);
-
-      MemoryContextSwitchTo(oldcontext);
-    }
-
-  /* stuff done on every call of the function */
-  PGR_DBG("Strange stuff doing\n");
-  funcctx = SRF_PERCALL_SETUP();
-
-  tuple_desc = funcctx->tuple_desc;
-  res = (vertex_t*)funcctx->user_fctx;
-
-  PGR_DBG("Trying to allocate some memory\n");
-
-  if (funcctx->call_cntr < funcctx->max_calls) {
-      /* do when there is more left to send */
-      HeapTuple    tuple;
-      Datum        result;
-      Datum *values;
-      bool* nulls;
-      double x;
-      double y;
-
-      values = palloc(2 * sizeof(Datum));
-      nulls = palloc(2 * sizeof(bool));
-
-      x = res[funcctx->call_cntr].x;
-      y = res[funcctx->call_cntr].y;
-      if (x == DBL_MAX && y == DBL_MAX) {
-        values[0] = 0;
-        values[1] = 0;
-        nulls[0] = true;
-        nulls[1] = true;
-      } else {
-        values[0] = Float8GetDatum(x);
-        values[1] = Float8GetDatum(y);
-        nulls[0] = false;
-        nulls[1] = false;
-      }
-
-      PGR_DBG("Heap making\n");
-
-      tuple = heap_form_tuple(tuple_desc, values, nulls);
-
-      PGR_DBG("Datum making\n");
-
-      /* make the tuple into a datum */
-      result = HeapTupleGetDatum(tuple);
-
-      PGR_DBG("Trying to free some memory\n");
-
-      /* clean up (this is not really necessary) */
-      pfree(values);
-      pfree(nulls);
-
-      SRF_RETURN_NEXT(funcctx, result);
-    } else  {
-      SRF_RETURN_DONE(funcctx);
-    }
-}
diff --git a/src/alpha_shape/src/alpha_driver.cpp b/src/alpha_shape/src/alpha_driver.cpp
deleted file mode 100644
index 0043d0c..0000000
--- a/src/alpha_shape/src/alpha_driver.cpp
+++ /dev/null
@@ -1,270 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: alpha_drivedist.cpp
-
-Copyright (c) 2006 Anton A. Patrushev, Orkney, Inc.
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-/*
- * As a special exception, you have permission to link this program
- * with the CGAL library and distribute executables, as long as you
- * follow the requirements of the GNU GPL in regard to all of the
- * software in the executable aside from CGAL.
- *
- */
-
-
-/***********************************************************************
-Takes a list of points and returns a list of segments
-corresponding to the Alpha shape.
-************************************************************************/
-
-#include "./alpha_driver.h"
-
-#include <CGAL/Simple_cartesian.h>
-#include <CGAL/Filtered_kernel.h>
-#include <CGAL/algorithm.h>
-
-#include <CGAL/Polygon_2.h>
-#include <CGAL/Delaunay_triangulation_2.h>
-#include <CGAL/Triangulation_2.h>
-#include <CGAL/Triangulation_hierarchy_vertex_base_2.h>
-#include <CGAL/Triangulation_hierarchy_2.h>
-#include <CGAL/Triangulation_face_base_2.h>
-#include <CGAL/Triangulation_euclidean_traits_2.h>
-#include <CGAL/Alpha_shape_2.h>
-#include <CGAL/Alpha_shape_face_base_2.h>
-#include <CGAL/Alpha_shape_vertex_base_2.h>
-
-#include <vector>
-#include <list>
-#include <cmath>
-#include <utility>
-#include <algorithm>
-#include <set>
-
-#include "cpp_common/pgr_alloc.hpp"
-
-typedef double coord_type;
-
-typedef CGAL::Simple_cartesian<coord_type>  SC;
-typedef CGAL::Filtered_kernel<SC> K;
-typedef K::Point_2  Point;
-typedef K::Segment_2  Segment;
-typedef K::Vector_2 Vector;
-typedef CGAL::Polygon_2<K> Polygon_2;
-
-typedef CGAL::Alpha_shape_vertex_base_2<K> Avb;
-typedef CGAL::Triangulation_hierarchy_vertex_base_2<Avb> Av;
-
-typedef CGAL::Triangulation_face_base_2<K> Tf;
-typedef CGAL::Alpha_shape_face_base_2<K, Tf> Af;
-
-typedef CGAL::Triangulation_default_data_structure_2<K, Av, Af> Tds;
-typedef CGAL::Delaunay_triangulation_2<K, Tds> Dt;
-typedef CGAL::Triangulation_hierarchy_2<Dt> Ht;
-typedef CGAL::Alpha_shape_2<Ht> Alpha_shape_2;
-
-typedef Alpha_shape_2::Face_circulator  Face_circulator;
-typedef Alpha_shape_2::Vertex_circulator  Vertex_circulator;
-
-typedef Alpha_shape_2::Alpha_iterator Alpha_iterator;
-typedef Alpha_shape_2::Alpha_shape_edges_iterator Alpha_shape_edges_iterator;
-
-// ---------------------------------------------------------------------
-
-double get_angle(Point p, Point q, Point r) {
-    double m_pi(3.14159265358979323846);
-    Vector v1(q, p);
-    Vector v2(q, r);
-    double cross = v1.x() * v2.y() - v1.y() * v2.x();
-    double dot = v1.x() * v2.x() + v1.y() * v2.y();
-    double angle = atan2(cross, dot);
-    if (angle < 0.0) {
-        angle += 2 * m_pi;
-    }
-    return angle;
-}
-
-size_t prev_size = 0;
-void find_next_edge(Segment s, std::vector<Segment>& segments,
-        std::set<int>& unusedIndexes, std::vector<Polygon_2>& rings) {
-    if (unusedIndexes.empty()
-            || prev_size == unusedIndexes.size()) {
-        return;
-    }
-
-    prev_size = unusedIndexes.size();
-
-    Point start = s.source();
-    Point end = s.target();
-    rings.back().push_back(end);
-
-    std::vector<int> nextIndexes;
-    for (unsigned int i = 0; i < segments.size(); i++) {
-        if (unusedIndexes.find(i) != unusedIndexes.end()) {
-            Point source = segments.at(i).source();
-            if (source == end) {
-                nextIndexes.push_back(i);
-            }
-        }
-    }
-    if (nextIndexes.size() == 1) {
-        int i = nextIndexes.at(0);
-        unusedIndexes.erase(i);
-        find_next_edge(segments.at(i), segments, unusedIndexes, rings);
-    } else if (nextIndexes.size() > 1) {
-        std::vector< std::pair<double, int> > nextAngles;
-        for (unsigned int i = 0; i < nextIndexes.size(); i++) {
-            int j = nextIndexes.at(i);
-            Point target = segments.at(j).target();
-            double angle = get_angle(start, end, target);
-            nextAngles.push_back(std::pair<double, int>(angle, j));
-        }
-        std::sort(nextAngles.begin(), nextAngles.end());
-        int i = nextAngles.begin()->second;
-        unusedIndexes.erase(i);
-        find_next_edge(segments.at(i), segments, unusedIndexes, rings);
-    }
-
-    if (!unusedIndexes.empty()) {
-        for (unsigned int i = 0; i < segments.size(); i++) {
-            if (unusedIndexes.find(i) != unusedIndexes.end()) {
-                Polygon_2 ring;
-                ring.push_back(segments.at(i).source());
-                rings.push_back(ring);
-                unusedIndexes.erase(i);
-                find_next_edge(segments.at(i), segments, unusedIndexes, rings);
-            }
-        }
-    }
-}
-
-template <class OutputIterator>
-void
-alpha_edges(const Alpha_shape_2& A,
-        OutputIterator out) {
-    for (Alpha_shape_edges_iterator it =  A.alpha_shape_edges_begin();
-            it != A.alpha_shape_edges_end();
-            ++it) {
-        *out++ = A.segment(*it);
-    }
-}
-
-
-int alpha_shape(vertex_t *vertices, size_t count, double alpha,
-        vertex_t **res, size_t *res_count, char **err_msg) {
-    try {
-        std::list<Point> points;
-        {
-            std::vector<Point> pv;
-
-            for (std::size_t j = 0; j < count; ++j) {
-                Point p(vertices[j].x, vertices[j].y);
-                pv.push_back(p);
-            }
-
-            std::sort(pv.begin(), pv.end(),
-                    [](const Point &e1, const Point &e2)->bool {
-                    return e2.y() < e1.y();
-                    });
-            std::stable_sort(pv.begin(), pv.end(),
-                    [](const Point &e1, const Point &e2)->bool {
-                    return e2.x() < e1.x();
-                    });
-            pv.erase(std::unique(pv.begin(), pv.end()), pv.end());
-            if (pv.size() != count &&  pv.size() < 3) {
-                *err_msg = strdup("After eliminating duplicated points, less than 3 points remain!!. Alpha shape calculation needs at least 3 vertices.");
-                return -1;
-            }
-            points.insert(points.begin(), pv.begin(), pv.end());
-        }
-
-        Alpha_shape_2 A(points.begin(), points.end(),
-                coord_type(10000),
-                Alpha_shape_2::REGULARIZED);
-
-        std::vector<Segment> segments;
-        //  std::vector<Segment> result;
-
-        //  Alpha_shape_2::Alpha_shape_vertices_iterator vit;
-        //  Alpha_shape_2::Vertex_handle vertex;
-        //  Alpha_shape_2::Alpha_shape_edges_iterator eit;
-        //  Alpha_shape_2::Edge edge;
-        //  Alpha_shape_2::Face_iterator fit;
-        //  Alpha_shape_2::Face_handle face;
-
-        if (alpha <= 0.0) {
-            alpha = *A.find_optimal_alpha(1);
-        }
-        A.set_alpha(alpha);
-
-        alpha_edges(A, std::back_inserter(segments));
-
-        //  Segment s = segments.at(0);
-        //  find_next_edge(s, segments, result);
-        if (segments.empty()) {
-            *res = NULL;
-            *res_count = 0;
-        } else {
-            std::set<int> unusedIndexes;
-            for (unsigned int i = 0; i < segments.size(); i++) {
-                unusedIndexes.insert(i);
-            }
-
-            std::vector<Polygon_2> rings;
-            Polygon_2 ring;
-            ring.push_back(segments.at(0).source());
-            rings.push_back(ring);
-            unusedIndexes.erase(0);
-            find_next_edge(segments.at(0), segments, unusedIndexes, rings);
-
-            size_t result_count = 0;
-            for (unsigned int i = 0; i < rings.size(); i++) {
-                Polygon_2 ring = rings.at(i);
-                result_count += ring.size();
-            }
-            result_count += rings.size() - 1;
-            *res = pgr_alloc(result_count, (*res));
-            *res_count = result_count;
-
-            int idx = 0;
-            for (unsigned int i = 0; i < rings.size(); i++) {
-                if (i > 0) {
-                    (*res)[idx].x = DBL_MAX;
-                    (*res)[idx].y = DBL_MAX;
-                    idx++;
-                }
-                Polygon_2 ring = rings.at(i);
-                for (unsigned int j = 0; j < ring.size(); j++) {
-                    Point point = ring.vertex(j);
-                    (*res)[idx].x = point.x();
-                    (*res)[idx].y = point.y();
-                    idx++;
-                }
-            }
-        }
-        *err_msg = NULL;
-
-        return EXIT_SUCCESS;
-    } catch ( ... ) {
-        *err_msg = strdup("Caught unknown exception!");
-    }
-    return -1;
-}
diff --git a/src/alpha_shape/src/alpha_driver.h b/src/alpha_shape/src/alpha_driver.h
deleted file mode 100644
index 30b06c3..0000000
--- a/src/alpha_shape/src/alpha_driver.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*PGR-GNU*****************************************************************
-FILE: alpha.h
-
-Copyright (c) 2006 Anton A. Patrushev, Orkney, Inc.
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#ifndef SRC_ALPHA_SHAPE_SRC_ALPHA_DRIVER_H_
-#define SRC_ALPHA_SHAPE_SRC_ALPHA_DRIVER_H_
-#pragma once
-
-#include <stddef.h>
-
-typedef struct vertex {
-  double x;
-  double y;
-} vertex_t;
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-  int alpha_shape(vertex_t *vertices, size_t count, double alpha,
-                  vertex_t **res, size_t *res_count, char **err_msg);
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif  // SRC_ALPHA_SHAPE_SRC_ALPHA_DRIVER_H_
diff --git a/src/alpha_shape/test/doc-pgr_alphashape.result b/src/alpha_shape/test/doc-pgr_alphashape.result
deleted file mode 100644
index 0b4282a..0000000
--- a/src/alpha_shape/test/doc-pgr_alphashape.result
+++ /dev/null
@@ -1,39 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- q1
-SELECT * FROM pgr_alphaShape(
-    'SELECT id::integer, ST_X(the_geom)::float AS x, ST_Y(the_geom)::float AS y
-    FROM edge_table_vertices_pgr') ORDER BY x, y;
-  x  |  y  
------+-----
-   0 |   2
- 0.5 | 3.5
-   2 |   0
-   2 |   4
- 3.5 |   4
-   4 |   1
-   4 |   2
-   4 |   3
-(8 rows)
-
--- q2
-SELECT round(ST_Area(ST_MakePolygon(ST_AddPoint(foo.openline, ST_StartPoint(foo.openline))))::numeric, 2) AS st_area
-FROM (
-    SELECT ST_MakeLine(points ORDER BY id) AS openline
-    FROM (
-        SELECT ST_MakePoint(x, y) AS points, row_number() over() AS id
-        FROM pgr_alphaShape(
-            'SELECT id::integer, ST_X(the_geom)::float AS x, ST_Y(the_geom)::float AS y
-            FROM edge_table_vertices_pgr')
-        ) AS a
-   ) AS foo;
- st_area 
----------
-   11.75
-(1 row)
-
--- q3
-ROLLBACK;
-ROLLBACK
diff --git a/src/alpha_shape/test/doc-pgr_pointsAsPolygon.result b/src/alpha_shape/test/doc-pgr_pointsAsPolygon.result
deleted file mode 100644
index c6c0a7b..0000000
--- a/src/alpha_shape/test/doc-pgr_pointsAsPolygon.result
+++ /dev/null
@@ -1,15 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
---q1
-SELECT ST_AsText(pgr_pointsAsPolygon('SELECT id::integer, ST_X(the_geom)::float AS x, ST_Y(the_geom)::float AS y
-        FROM edge_table_vertices_pgr'));
-                      st_astext                       
-------------------------------------------------------
- POLYGON((2 4,3.5 4,4 3,4 2,4 1,2 0,0 2,0.5 3.5,2 4))
-(1 row)
-
---q2
-ROLLBACK;
-ROLLBACK
diff --git a/src/astar/src/CMakeLists.txt b/src/astar/CMakeLists.txt
similarity index 100%
rename from src/astar/src/CMakeLists.txt
rename to src/astar/CMakeLists.txt
diff --git a/src/astar/astar.c b/src/astar/astar.c
new file mode 100644
index 0000000..a91c0f9
--- /dev/null
+++ b/src/astar/astar.c
@@ -0,0 +1,270 @@
+/*PGR-GNU*****************************************************************
+File: astarOneToOne.c
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer: 
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+Mail: 
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "c_common/postgres_connection.h"
+#include "utils/array.h"
+
+#include "c_common/debug_macro.h"
+#include "c_common/e_report.h"
+#include "c_common/time_msg.h"
+#include "c_common/edges_input.h"
+#include "c_common/arrays_input.h"
+#include "c_common/check_parameters.h"
+
+#include "drivers/astar/astar_driver.h"
+
+PGDLLEXPORT Datum astarManyToMany(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(astarManyToMany);
+
+#if 0
+void
+check_parameters(
+        int heuristic,
+        double factor,
+        double epsilon) {
+    if (heuristic > 5 || heuristic < 0) {
+        ereport(ERROR,
+                (errmsg("Unknown heuristic"),
+                 errhint("Valid values: 0~5")));
+    }
+    if (factor <= 0) {
+        ereport(ERROR,
+                (errmsg("Factor value out of range"),
+                 errhint("Valid values: positive non zero")));
+    }
+    if (epsilon < 1) {
+        ereport(ERROR,
+                (errmsg("Epsilon value out of range"),
+                 errhint("Valid values: 1 or greater than 1")));
+    }
+}
+#endif
+
+static
+void
+process(char* edges_sql,
+        ArrayType *starts,
+        ArrayType *ends,
+        bool directed,
+        int heuristic,
+        double factor,
+        double epsilon,
+        bool only_cost,
+        bool normal,
+        General_path_element_t **result_tuples,
+        size_t *result_count) {
+    check_parameters(heuristic, factor, epsilon);
+
+    pgr_SPI_connect();
+
+    int64_t* start_vidsArr = NULL;
+    size_t size_start_vidsArr = 0;
+
+    int64_t* end_vidsArr = NULL;
+    size_t size_end_vidsArr = 0;
+
+    Pgr_edge_xy_t *edges = NULL;
+    size_t total_edges = 0;
+
+    if (normal) {
+        pgr_get_edges_xy(edges_sql, &edges, &total_edges);
+        start_vidsArr = (int64_t*)
+            pgr_get_bigIntArray(&size_start_vidsArr, starts);
+        end_vidsArr = (int64_t*)
+            pgr_get_bigIntArray(&size_end_vidsArr, ends);
+    } else {
+        pgr_get_edges_xy_reversed(edges_sql, &edges, &total_edges);
+        end_vidsArr = (int64_t*)
+            pgr_get_bigIntArray(&size_end_vidsArr, starts);
+        start_vidsArr = (int64_t*)
+            pgr_get_bigIntArray(&size_start_vidsArr, ends);
+    }
+
+    if (total_edges == 0) {
+        PGR_DBG("No edges found");
+        (*result_count) = 0;
+        (*result_tuples) = NULL;
+        pgr_SPI_finish();
+        return;
+    }
+
+    PGR_DBG("Starting processing");
+    char *log_msg = NULL;
+    char *notice_msg = NULL;
+    char *err_msg = NULL;
+    clock_t start_t = clock();
+    do_pgr_astarManyToMany(
+            edges, total_edges,
+            start_vidsArr, size_start_vidsArr,
+            end_vidsArr, size_end_vidsArr,
+            directed,
+            heuristic,
+            factor,
+            epsilon,
+            only_cost,
+            normal,
+            result_tuples, result_count,
+            &log_msg,
+            &notice_msg,
+            &err_msg);
+
+    if (only_cost) {
+        time_msg("processing pgr_astarCost(many to many)", start_t, clock());
+    } else {
+        time_msg("processing pgr_astar(many to many)", start_t, clock());
+    }
+
+
+    if (err_msg && (*result_tuples)) {
+        pfree(*result_tuples);
+        (*result_tuples) = NULL;
+        (*result_count) = 0;
+    }
+
+    pgr_global_report(log_msg, notice_msg, err_msg);
+
+    if (log_msg) pfree(log_msg);
+    if (notice_msg) pfree(notice_msg);
+    if (err_msg) pfree(err_msg);
+    if (edges) pfree(edges);
+    if (start_vidsArr) pfree(start_vidsArr);
+    if (end_vidsArr) pfree(end_vidsArr);
+
+    pgr_SPI_finish();
+}
+
+PGDLLEXPORT Datum
+astarManyToMany(PG_FUNCTION_ARGS) {
+    FuncCallContext     *funcctx;
+    TupleDesc           tuple_desc;
+
+    /**********************************************************************/
+    General_path_element_t  *result_tuples = NULL;
+    size_t result_count = 0;
+    /**********************************************************************/
+
+    if (SRF_IS_FIRSTCALL()) {
+        MemoryContext   oldcontext;
+        funcctx = SRF_FIRSTCALL_INIT();
+        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
+
+
+        /**********************************************************************/
+        /*
+           edges_sql TEXT,
+           start_vids ARRAY[ANY_INTEGER], -- anyarray
+           end_vids ARRAY[ANY_INTEGER], -- anyarray
+           directed BOOLEAN DEFAULT true,
+           heuristic INTEGER DEFAULT 0,
+           factor FLOAT DEFAULT 1.0,
+           epsilon FLOAT DEFAULT 1.0,
+
+         **********************************************************************/
+
+        process(
+                text_to_cstring(PG_GETARG_TEXT_P(0)),
+                PG_GETARG_ARRAYTYPE_P(1),
+                PG_GETARG_ARRAYTYPE_P(2),
+                PG_GETARG_BOOL(3),
+                PG_GETARG_INT32(4),
+                PG_GETARG_FLOAT8(5),
+                PG_GETARG_FLOAT8(6),
+                PG_GETARG_BOOL(7),
+                PG_GETARG_BOOL(8),
+                &result_tuples,
+                &result_count);
+
+
+#if PGSQL_VERSION > 95
+        funcctx->max_calls = result_count;
+#else
+        funcctx->max_calls = (uint32_t)result_count;
+#endif
+        funcctx->max_calls = (uint32_t) result_count;
+        funcctx->user_fctx = result_tuples;
+        if (get_call_result_type(fcinfo, NULL, &tuple_desc)
+                != TYPEFUNC_COMPOSITE)
+            ereport(ERROR,
+                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+                     errmsg("function returning record called in context "
+                         "that cannot accept type record")));
+
+        funcctx->tuple_desc = tuple_desc;
+        MemoryContextSwitchTo(oldcontext);
+    }
+
+    funcctx = SRF_PERCALL_SETUP();
+    tuple_desc = funcctx->tuple_desc;
+    result_tuples = (General_path_element_t*) funcctx->user_fctx;
+
+    if (funcctx->call_cntr < funcctx->max_calls) {
+        HeapTuple    tuple;
+        Datum        result;
+        Datum        *values;
+        bool*        nulls;
+
+        /*********************************************************************
+          OUT seq INTEGER,
+          OUT path_seq INTEGER,
+          OUT start_vid BIGINT,
+          OUT end_vid BIGINT,
+          OUT node BIGINT,
+          OUT edge BIGINT,
+          OUT cost FLOAT,
+          OUT agg_cost FLOAT
+         **********************************************************************/
+
+
+        size_t numb = 8;
+        values = palloc(numb * sizeof(Datum));
+        nulls = palloc(numb * sizeof(bool));
+
+        size_t i;
+        for (i = 0; i < numb; ++i) {
+            nulls[i] = false;
+        }
+
+
+        values[0] = Int32GetDatum(funcctx->call_cntr + 1);
+        values[1] = Int32GetDatum(result_tuples[funcctx->call_cntr].seq);
+        values[2] = Int64GetDatum(result_tuples[funcctx->call_cntr].start_id);
+        values[3] = Int64GetDatum(result_tuples[funcctx->call_cntr].end_id);
+        values[4] = Int64GetDatum(result_tuples[funcctx->call_cntr].node);
+        values[5] = Int64GetDatum(result_tuples[funcctx->call_cntr].edge);
+        values[6] = Float8GetDatum(result_tuples[funcctx->call_cntr].cost);
+        values[7] = Float8GetDatum(result_tuples[funcctx->call_cntr].agg_cost);
+
+
+        tuple = heap_form_tuple(tuple_desc, values, nulls);
+        result = HeapTupleGetDatum(tuple);
+        SRF_RETURN_NEXT(funcctx, result);
+    } else {
+        SRF_RETURN_DONE(funcctx);
+    }
+}
diff --git a/src/astar/astar_driver.cpp b/src/astar/astar_driver.cpp
new file mode 100644
index 0000000..5c60a33
--- /dev/null
+++ b/src/astar/astar_driver.cpp
@@ -0,0 +1,182 @@
+/*PGR-GNU*****************************************************************
+File: astarOneToOne_driver.cpp
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer: 
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+Mail: 
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "drivers/astar/astar_driver.h"
+
+#include <sstream>
+#include <deque>
+#include <algorithm>
+#include <vector>
+
+#include "astar/pgr_astar.hpp"
+
+#include "cpp_common/pgr_alloc.hpp"
+#include "cpp_common/pgr_assert.h"
+
+
+
+template < class G >
+std::deque<Path>
+pgr_astar(
+        G &graph,
+        std::vector<int64_t> sources,
+        std::vector<int64_t> targets,
+        int heuristic,
+        double factor,
+        double epsilon,
+        bool only_cost,
+        bool normal) {
+    std::sort(sources.begin(), sources.end());
+    sources.erase(
+            std::unique(sources.begin(), sources.end()),
+            sources.end());
+
+    std::sort(targets.begin(), targets.end());
+    targets.erase(
+            std::unique(targets.begin(), targets.end()),
+            targets.end());
+
+    pgrouting::algorithms::Pgr_astar< G > fn_astar;
+    auto paths = fn_astar.astar(graph, sources, targets,
+            heuristic, factor, epsilon, only_cost);
+
+    if (!normal) {
+        for (auto &path : paths) {
+            path.reverse();
+        }
+    }
+    return paths;
+}
+
+
+/************************************************************
+  edges_sql TEXT,
+  vertex_table TEXT,
+  start_vid BIGINT,
+  end_vid BIGINT  directed BOOLEAN DEFAULT true,
+ ***********************************************************/
+void do_pgr_astarManyToMany(
+        Pgr_edge_xy_t *edges, size_t total_edges,
+        int64_t  *start_vidsArr, size_t size_start_vidsArr,
+        int64_t  *end_vidsArr, size_t size_end_vidsArr,
+        bool directed,
+        int heuristic,
+        double factor,
+        double epsilon,
+        bool only_cost,
+        bool normal,
+        General_path_element_t **return_tuples,
+        size_t *return_count,
+        char** log_msg,
+        char** notice_msg,
+        char** err_msg) {
+    std::ostringstream log;
+    std::ostringstream notice;
+    std::ostringstream err;
+    try {
+        pgassert(!(*log_msg));
+        pgassert(!(*err_msg));
+        pgassert(!(*return_tuples));
+        pgassert(*return_count == 0);
+        pgassert(total_edges != 0);
+
+
+        log << "Inserting target vertices into a c++ vector structure\n";
+        std::vector< int64_t > end_vids(
+                end_vidsArr,
+                end_vidsArr + size_end_vidsArr);
+        std::vector< int64_t > start_vids(
+                start_vidsArr,
+                start_vidsArr + size_start_vidsArr);
+
+        graphType gType = directed? DIRECTED: UNDIRECTED;
+
+        std::deque< Path >paths;
+        if (directed) {
+            log << "Working with directed Graph\n";
+            pgrouting::xyDirectedGraph digraph(
+                    pgrouting::extract_vertices(edges, total_edges),
+                    gType);
+            digraph.insert_edges(edges, total_edges);
+            paths = pgr_astar(digraph, start_vids, end_vids,
+                    heuristic, factor, epsilon, only_cost, normal);
+        } else {
+            log << "Working with Undirected Graph\n";
+            pgrouting::xyUndirectedGraph undigraph(
+                    pgrouting::extract_vertices(edges, total_edges),
+                    gType);
+            undigraph.insert_edges(edges, total_edges);
+            paths = pgr_astar(undigraph, start_vids, end_vids,
+                    heuristic, factor, epsilon, only_cost, normal);
+        }
+
+        size_t count(0);
+        count = count_tuples(paths);
+
+
+        if (count == 0) {
+            (*return_tuples) = NULL;
+            (*return_count) = 0;
+            notice <<
+                "No paths found\n";
+            *log_msg = pgr_msg(notice.str().c_str());
+            return;
+        }
+
+        (*return_tuples) = pgr_alloc(count, (*return_tuples));
+        log << "Converting a set of paths into the tuples\n";
+        (*return_count) = (collapse_paths(return_tuples, paths));
+
+        *log_msg = log.str().empty()?
+            *log_msg :
+            pgr_msg(log.str().c_str());
+        *notice_msg = notice.str().empty()?
+            *notice_msg :
+            pgr_msg(notice.str().c_str());
+    } catch (AssertFailedException &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch (std::exception &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch(...) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << "Caught unknown exception!";
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    }
+}
+
diff --git a/src/astar/src/astar.c b/src/astar/src/astar.c
deleted file mode 100644
index 26814a0..0000000
--- a/src/astar/src/astar.c
+++ /dev/null
@@ -1,246 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: astarOneToOne.c
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer: 
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-Mail: 
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "c_common/postgres_connection.h"
-#include "utils/array.h"
-
-#include "c_common/debug_macro.h"
-#include "c_common/e_report.h"
-#include "c_common/time_msg.h"
-#include "c_common/edges_input.h"
-#include "c_common/arrays_input.h"
-
-#include "drivers/astar/astar_driver.h"
-
-PGDLLEXPORT Datum astarManyToMany(PG_FUNCTION_ARGS);
-PG_FUNCTION_INFO_V1(astarManyToMany);
-
-
-static
-void
-process(char* edges_sql,
-        ArrayType *starts,
-        ArrayType *ends,
-        bool directed,
-        int heuristic,
-        double factor,
-        double epsilon,
-        bool only_cost,
-        bool normal,
-        General_path_element_t **result_tuples,
-        size_t *result_count) {
-    check_parameters(heuristic, factor, epsilon);
-
-    pgr_SPI_connect();
-
-    int64_t* start_vidsArr = NULL;
-    size_t size_start_vidsArr = 0;
-
-    int64_t* end_vidsArr = NULL;
-    size_t size_end_vidsArr = 0;
-
-    Pgr_edge_xy_t *edges = NULL;
-    size_t total_edges = 0;
-
-    if (normal) {
-        pgr_get_edges_xy(edges_sql, &edges, &total_edges);
-        start_vidsArr = (int64_t*)
-            pgr_get_bigIntArray(&size_start_vidsArr, starts);
-        end_vidsArr = (int64_t*)
-            pgr_get_bigIntArray(&size_end_vidsArr, ends);
-    } else {
-        pgr_get_edges_xy_reversed(edges_sql, &edges, &total_edges);
-        end_vidsArr = (int64_t*)
-            pgr_get_bigIntArray(&size_end_vidsArr, starts);
-        start_vidsArr = (int64_t*)
-            pgr_get_bigIntArray(&size_start_vidsArr, ends);
-    }
-
-    if (total_edges == 0) {
-        PGR_DBG("No edges found");
-        (*result_count) = 0;
-        (*result_tuples) = NULL;
-        pgr_SPI_finish();
-        return;
-    }
-
-    PGR_DBG("Starting processing");
-    char *log_msg = NULL;
-    char *notice_msg = NULL;
-    char *err_msg = NULL;
-    clock_t start_t = clock();
-    do_pgr_astarManyToMany(
-            edges, total_edges,
-            start_vidsArr, size_start_vidsArr,
-            end_vidsArr, size_end_vidsArr,
-            directed,
-            heuristic,
-            factor,
-            epsilon,
-            only_cost,
-            normal,
-            result_tuples, result_count,
-            &log_msg,
-            &notice_msg,
-            &err_msg);
-
-    if (only_cost) {
-        time_msg("processing pgr_astarCost(many to many)", start_t, clock());
-    } else {
-        time_msg("processing pgr_astar(many to many)", start_t, clock());
-    }
-
-
-    if (err_msg && (*result_tuples)) {
-        pfree(*result_tuples);
-        (*result_tuples) = NULL;
-        (*result_count) = 0;
-    }
-
-    pgr_global_report(log_msg, notice_msg, err_msg);
-
-    if (log_msg) pfree(log_msg);
-    if (notice_msg) pfree(notice_msg);
-    if (err_msg) pfree(err_msg);
-    if (edges) pfree(edges);
-    if (start_vidsArr) pfree(start_vidsArr);
-    if (end_vidsArr) pfree(end_vidsArr);
-
-    pgr_SPI_finish();
-}
-
-PGDLLEXPORT Datum
-astarManyToMany(PG_FUNCTION_ARGS) {
-    FuncCallContext     *funcctx;
-    TupleDesc           tuple_desc;
-
-    /**********************************************************************/
-    General_path_element_t  *result_tuples = NULL;
-    size_t result_count = 0;
-    /**********************************************************************/
-
-    if (SRF_IS_FIRSTCALL()) {
-        MemoryContext   oldcontext;
-        funcctx = SRF_FIRSTCALL_INIT();
-        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
-
-
-        /**********************************************************************/
-        /*
-           edges_sql TEXT,
-           start_vids ARRAY[ANY_INTEGER], -- anyarray
-           end_vids ARRAY[ANY_INTEGER], -- anyarray
-           directed BOOLEAN DEFAULT true,
-           heuristic INTEGER DEFAULT 0,
-           factor FLOAT DEFAULT 1.0,
-           epsilon FLOAT DEFAULT 1.0,
-
-         **********************************************************************/
-
-        process(
-                text_to_cstring(PG_GETARG_TEXT_P(0)),
-                PG_GETARG_ARRAYTYPE_P(1),
-                PG_GETARG_ARRAYTYPE_P(2),
-                PG_GETARG_BOOL(3),
-                PG_GETARG_INT32(4),
-                PG_GETARG_FLOAT8(5),
-                PG_GETARG_FLOAT8(6),
-                PG_GETARG_BOOL(7),
-                PG_GETARG_BOOL(8),
-                &result_tuples,
-                &result_count);
-
-
-#if PGSQL_VERSION > 95
-        funcctx->max_calls = result_count;
-#else
-        funcctx->max_calls = (uint32_t)result_count;
-#endif
-        funcctx->max_calls = (uint32_t) result_count;
-        funcctx->user_fctx = result_tuples;
-        if (get_call_result_type(fcinfo, NULL, &tuple_desc)
-                != TYPEFUNC_COMPOSITE)
-            ereport(ERROR,
-                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                     errmsg("function returning record called in context "
-                         "that cannot accept type record")));
-
-        funcctx->tuple_desc = tuple_desc;
-        MemoryContextSwitchTo(oldcontext);
-    }
-
-    funcctx = SRF_PERCALL_SETUP();
-    tuple_desc = funcctx->tuple_desc;
-    result_tuples = (General_path_element_t*) funcctx->user_fctx;
-
-    if (funcctx->call_cntr < funcctx->max_calls) {
-        HeapTuple    tuple;
-        Datum        result;
-        Datum        *values;
-        bool*        nulls;
-
-        /*********************************************************************
-          OUT seq INTEGER,
-          OUT path_seq INTEGER,
-          OUT start_vid BIGINT,
-          OUT end_vid BIGINT,
-          OUT node BIGINT,
-          OUT edge BIGINT,
-          OUT cost FLOAT,
-          OUT agg_cost FLOAT
-         **********************************************************************/
-
-
-        size_t numb = 8;
-        values = palloc(numb * sizeof(Datum));
-        nulls = palloc(numb * sizeof(bool));
-
-        size_t i;
-        for (i = 0; i < numb; ++i) {
-            nulls[i] = false;
-        }
-
-
-        values[0] = Int32GetDatum(funcctx->call_cntr + 1);
-        values[1] = Int32GetDatum(result_tuples[funcctx->call_cntr].seq);
-        values[2] = Int64GetDatum(result_tuples[funcctx->call_cntr].start_id);
-        values[3] = Int64GetDatum(result_tuples[funcctx->call_cntr].end_id);
-        values[4] = Int64GetDatum(result_tuples[funcctx->call_cntr].node);
-        values[5] = Int64GetDatum(result_tuples[funcctx->call_cntr].edge);
-        values[6] = Float8GetDatum(result_tuples[funcctx->call_cntr].cost);
-        values[7] = Float8GetDatum(result_tuples[funcctx->call_cntr].agg_cost);
-
-
-        tuple = heap_form_tuple(tuple_desc, values, nulls);
-        result = HeapTupleGetDatum(tuple);
-        SRF_RETURN_NEXT(funcctx, result);
-    } else {
-        SRF_RETURN_DONE(funcctx);
-    }
-}
diff --git a/src/astar/src/astar_driver.cpp b/src/astar/src/astar_driver.cpp
deleted file mode 100644
index 2bee248..0000000
--- a/src/astar/src/astar_driver.cpp
+++ /dev/null
@@ -1,203 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: astarOneToOne_driver.cpp
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer: 
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-Mail: 
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "drivers/astar/astar_driver.h"
-
-#include <sstream>
-#include <deque>
-#include <algorithm>
-#include <vector>
-
-#include "astar/pgr_astar.hpp"
-
-#include "cpp_common/pgr_alloc.hpp"
-#include "cpp_common/pgr_assert.h"
-
-
-void
-check_parameters(
-        int heuristic,
-        double factor,
-        double epsilon) {
-    if (heuristic > 5 || heuristic < 0) {
-        ereport(ERROR,
-                (errmsg("Unknown heuristic"),
-                 errhint("Valid values: 0~5")));
-    }
-    if (factor <= 0) {
-        ereport(ERROR,
-                (errmsg("Factor value out of range"),
-                 errhint("Valid values: positive non zero")));
-    }
-    if (epsilon < 1) {
-        ereport(ERROR,
-                (errmsg("Epsilon value out of range"),
-                 errhint("Valid values: 1 or greater than 1")));
-    }
-}
-
-template < class G >
-std::deque<Path>
-pgr_astar(
-        G &graph,
-        std::vector<int64_t> sources,
-        std::vector<int64_t> targets,
-        int heuristic,
-        double factor,
-        double epsilon,
-        bool only_cost,
-        bool normal) {
-    std::sort(sources.begin(), sources.end());
-    sources.erase(
-            std::unique(sources.begin(), sources.end()),
-            sources.end());
-
-    std::sort(targets.begin(), targets.end());
-    targets.erase(
-            std::unique(targets.begin(), targets.end()),
-            targets.end());
-
-    pgrouting::algorithms::Pgr_astar< G > fn_astar;
-    auto paths = fn_astar.astar(graph, sources, targets,
-            heuristic, factor, epsilon, only_cost);
-
-    if (!normal) {
-        for (auto &path : paths) {
-            path.reverse();
-        }
-    }
-    return paths;
-}
-
-
-/************************************************************
-  edges_sql TEXT,
-  vertex_table TEXT,
-  start_vid BIGINT,
-  end_vid BIGINT  directed BOOLEAN DEFAULT true,
- ***********************************************************/
-void do_pgr_astarManyToMany(
-        Pgr_edge_xy_t *edges, size_t total_edges,
-        int64_t  *start_vidsArr, size_t size_start_vidsArr,
-        int64_t  *end_vidsArr, size_t size_end_vidsArr,
-        bool directed,
-        int heuristic,
-        double factor,
-        double epsilon,
-        bool only_cost,
-        bool normal,
-        General_path_element_t **return_tuples,
-        size_t *return_count,
-        char** log_msg,
-        char** notice_msg,
-        char** err_msg) {
-    std::ostringstream log;
-    std::ostringstream notice;
-    std::ostringstream err;
-    try {
-        pgassert(!(*log_msg));
-        pgassert(!(*err_msg));
-        pgassert(!(*return_tuples));
-        pgassert(*return_count == 0);
-        pgassert(total_edges != 0);
-
-
-        log << "Inserting target vertices into a c++ vector structure\n";
-        std::vector< int64_t > end_vids(
-                end_vidsArr,
-                end_vidsArr + size_end_vidsArr);
-        std::vector< int64_t > start_vids(
-                start_vidsArr,
-                start_vidsArr + size_start_vidsArr);
-
-        graphType gType = directed? DIRECTED: UNDIRECTED;
-
-        std::deque< Path >paths;
-        if (directed) {
-            log << "Working with directed Graph\n";
-            pgrouting::xyDirectedGraph digraph(
-                    pgrouting::extract_vertices(edges, total_edges),
-                    gType);
-            digraph.insert_edges(edges, total_edges);
-            paths = pgr_astar(digraph, start_vids, end_vids,
-                    heuristic, factor, epsilon, only_cost, normal);
-        } else {
-            log << "Working with Undirected Graph\n";
-            pgrouting::xyUndirectedGraph undigraph(
-                    pgrouting::extract_vertices(edges, total_edges),
-                    gType);
-            undigraph.insert_edges(edges, total_edges);
-            paths = pgr_astar(undigraph, start_vids, end_vids,
-                    heuristic, factor, epsilon, only_cost, normal);
-        }
-
-        size_t count(0);
-        count = count_tuples(paths);
-
-
-        if (count == 0) {
-            (*return_tuples) = NULL;
-            (*return_count) = 0;
-            notice <<
-                "No paths found\n";
-            *log_msg = pgr_msg(notice.str().c_str());
-            return;
-        }
-
-        (*return_tuples) = pgr_alloc(count, (*return_tuples));
-        log << "Converting a set of paths into the tuples\n";
-        (*return_count) = (collapse_paths(return_tuples, paths));
-
-        *log_msg = log.str().empty()?
-            *log_msg :
-            pgr_msg(log.str().c_str());
-        *notice_msg = notice.str().empty()?
-            *notice_msg :
-            pgr_msg(notice.str().c_str());
-    } catch (AssertFailedException &except) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << except.what();
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    } catch (std::exception &except) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << except.what();
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    } catch(...) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << "Caught unknown exception!";
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    }
-}
-
diff --git a/src/astar/test/doc-aStarCost.result b/src/astar/test/doc-aStarCost.result
deleted file mode 100644
index 0b95a8e..0000000
--- a/src/astar/test/doc-aStarCost.result
+++ /dev/null
@@ -1,58 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
---q1
-SELECT * FROM pgr_aStarCost(
-    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
-    2, 12);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         2 |      12 |        4
-(1 row)
-
---q2
-SELECT * FROM pgr_aStarCost(
-    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
-    2, 12,
-    directed := false, heuristic := 2);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         2 |      12 |        4
-(1 row)
-
---q3
-SELECT * FROM pgr_aStarCost(
-    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
-    2, ARRAY[3, 12], heuristic := 2);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         2 |       3 |        5
-         2 |      12 |        4
-(2 rows)
-
---q4
-SELECT * FROM pgr_aStarCost(
-    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
-    ARRAY[7, 2], 12, heuristic := 0);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         2 |      12 |        4
-         7 |      12 |        5
-(2 rows)
-
---q5
-SELECT * FROM pgr_aStarCost(
-    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
-    ARRAY[7, 2], ARRAY[3, 12], heuristic := 2);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         2 |       3 |        5
-         2 |      12 |        4
-         7 |       3 |        6
-         7 |      12 |        5
-(4 rows)
-
---q6
-ROLLBACK;
-ROLLBACK
diff --git a/src/astar/test/doc-astar.result b/src/astar/test/doc-astar.result
deleted file mode 100644
index ef7b622..0000000
--- a/src/astar/test/doc-astar.result
+++ /dev/null
@@ -1,104 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
---q1
-SELECT * FROM pgr_astar(
-    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
-    2, 12);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    2 |    4 |    1 |        0
-   2 |        2 |    5 |   10 |    1 |        1
-   3 |        3 |   10 |   12 |    1 |        2
-   4 |        4 |   11 |   13 |    1 |        3
-   5 |        5 |   12 |   -1 |    0 |        4
-(5 rows)
-
---q2
-SELECT * FROM pgr_astar(
-    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
-    2, 12,
-    directed := false, heuristic := 2);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    2 |    2 |    1 |        0
-   2 |        2 |    3 |    3 |    1 |        1
-   3 |        3 |    4 |   16 |    1 |        2
-   4 |        4 |    9 |   15 |    1 |        3
-   5 |        5 |   12 |   -1 |    0 |        4
-(5 rows)
-
---q3
-SELECT * FROM pgr_astar(
-    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
-    2, ARRAY[3, 12], heuristic := 2);
- seq | path_seq | end_vid | node | edge | cost | agg_cost 
------+----------+---------+------+------+------+----------
-   1 |        1 |       3 |    2 |    4 |    1 |        0
-   2 |        2 |       3 |    5 |    8 |    1 |        1
-   3 |        3 |       3 |    6 |    9 |    1 |        2
-   4 |        4 |       3 |    9 |   16 |    1 |        3
-   5 |        5 |       3 |    4 |    3 |    1 |        4
-   6 |        6 |       3 |    3 |   -1 |    0 |        5
-   7 |        1 |      12 |    2 |    4 |    1 |        0
-   8 |        2 |      12 |    5 |   10 |    1 |        1
-   9 |        3 |      12 |   10 |   12 |    1 |        2
-  10 |        4 |      12 |   11 |   13 |    1 |        3
-  11 |        5 |      12 |   12 |   -1 |    0 |        4
-(11 rows)
-
---q4
-SELECT * FROM pgr_astar(
-    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
-    ARRAY[7, 2], 12, heuristic := 0);
- seq | path_seq | start_vid | node | edge | cost | agg_cost 
------+----------+-----------+------+------+------+----------
-   1 |        1 |         2 |    2 |    4 |    1 |        0
-   2 |        2 |         2 |    5 |   10 |    1 |        1
-   3 |        3 |         2 |   10 |   12 |    1 |        2
-   4 |        4 |         2 |   11 |   13 |    1 |        3
-   5 |        5 |         2 |   12 |   -1 |    0 |        4
-   6 |        1 |         7 |    7 |    6 |    1 |        0
-   7 |        2 |         7 |    8 |    7 |    1 |        1
-   8 |        3 |         7 |    5 |   10 |    1 |        2
-   9 |        4 |         7 |   10 |   12 |    1 |        3
-  10 |        5 |         7 |   11 |   13 |    1 |        4
-  11 |        6 |         7 |   12 |   -1 |    0 |        5
-(11 rows)
-
---q5
-SELECT * FROM pgr_astar(
-    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
-    ARRAY[7, 2], ARRAY[3, 12], heuristic := 2);
- seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost 
------+----------+-----------+---------+------+------+------+----------
-   1 |        1 |         2 |       3 |    2 |    4 |    1 |        0
-   2 |        2 |         2 |       3 |    5 |    8 |    1 |        1
-   3 |        3 |         2 |       3 |    6 |    9 |    1 |        2
-   4 |        4 |         2 |       3 |    9 |   16 |    1 |        3
-   5 |        5 |         2 |       3 |    4 |    3 |    1 |        4
-   6 |        6 |         2 |       3 |    3 |   -1 |    0 |        5
-   7 |        1 |         7 |       3 |    7 |    6 |    1 |        0
-   8 |        2 |         7 |       3 |    8 |    7 |    1 |        1
-   9 |        3 |         7 |       3 |    5 |    8 |    1 |        2
-  10 |        4 |         7 |       3 |    6 |    9 |    1 |        3
-  11 |        5 |         7 |       3 |    9 |   16 |    1 |        4
-  12 |        6 |         7 |       3 |    4 |    3 |    1 |        5
-  13 |        7 |         7 |       3 |    3 |   -1 |    0 |        6
-  14 |        1 |         2 |      12 |    2 |    4 |    1 |        0
-  15 |        2 |         2 |      12 |    5 |   10 |    1 |        1
-  16 |        3 |         2 |      12 |   10 |   12 |    1 |        2
-  17 |        4 |         2 |      12 |   11 |   13 |    1 |        3
-  18 |        5 |         2 |      12 |   12 |   -1 |    0 |        4
-  19 |        1 |         7 |      12 |    7 |    6 |    1 |        0
-  20 |        2 |         7 |      12 |    8 |    7 |    1 |        1
-  21 |        3 |         7 |      12 |    5 |   10 |    1 |        2
-  22 |        4 |         7 |      12 |   10 |   12 |    1 |        3
-  23 |        5 |         7 |      12 |   11 |   13 |    1 |        4
-  24 |        6 |         7 |      12 |   12 |   -1 |    0 |        5
-(24 rows)
-
---q6
-ROLLBACK;
-ROLLBACK
diff --git a/src/bdAstar/src/CMakeLists.txt b/src/bdAstar/CMakeLists.txt
similarity index 100%
rename from src/bdAstar/src/CMakeLists.txt
rename to src/bdAstar/CMakeLists.txt
diff --git a/src/bdAstar/bdAstar.c b/src/bdAstar/bdAstar.c
new file mode 100644
index 0000000..4fb141a
--- /dev/null
+++ b/src/bdAstar/bdAstar.c
@@ -0,0 +1,240 @@
+/*PGR-GNU*****************************************************************
+File: bdAstar.c
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer:
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+Mail:
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "c_common/postgres_connection.h"
+#include "utils/array.h"
+
+#include "c_common/debug_macro.h"
+#include "c_common/e_report.h"
+#include "c_common/time_msg.h"
+
+#include "c_common/edges_input.h"
+#include "c_common/arrays_input.h"
+#include "c_common/check_parameters.h"
+
+
+
+#include "drivers/astar/astar_driver.h"
+#include "drivers/bdAstar/bdAstar_driver.h"
+
+PGDLLEXPORT Datum bd_astar(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(bd_astar);
+
+
+static
+void
+process(char* edges_sql,
+        ArrayType *starts,
+        ArrayType *ends,
+        bool directed,
+        int heuristic,
+        double factor,
+        double epsilon,
+        bool only_cost,
+        General_path_element_t **result_tuples,
+        size_t *result_count) {
+    check_parameters(heuristic, factor, epsilon);
+
+    pgr_SPI_connect();
+
+    int64_t* start_vidsArr = NULL;
+    size_t size_start_vidsArr = 0;
+    start_vidsArr = (int64_t*)
+        pgr_get_bigIntArray(&size_start_vidsArr, starts);
+
+    int64_t* end_vidsArr = NULL;
+    size_t size_end_vidsArr = 0;
+    end_vidsArr = (int64_t*)
+        pgr_get_bigIntArray(&size_end_vidsArr, ends);
+
+    PGR_DBG("Load data");
+    Pgr_edge_xy_t *edges = NULL;
+    size_t total_edges = 0;
+
+    pgr_get_edges_xy(edges_sql, &edges, &total_edges);
+    PGR_DBG("Total %ld edges in query:", total_edges);
+
+    if (total_edges == 0) {
+        PGR_DBG("No edges found");
+        (*result_count) = 0;
+        (*result_tuples) = NULL;
+        pgr_SPI_finish();
+        return;
+    }
+
+    PGR_DBG("Starting processing");
+    char* log_msg = NULL;
+    char* notice_msg = NULL;
+    char* err_msg = NULL;
+    clock_t start_t = clock();
+    do_pgr_bdAstar(
+            edges, total_edges,
+            start_vidsArr, size_start_vidsArr,
+            end_vidsArr, size_end_vidsArr,
+
+            directed,
+            heuristic,
+            factor,
+            epsilon,
+            only_cost,
+
+            result_tuples,
+            result_count,
+            &log_msg,
+            &notice_msg,
+            &err_msg);
+
+    if (only_cost) {
+        time_msg("pgr_bdAstarCost()", start_t, clock());
+    } else {
+        time_msg("pgr_bdAstar()", start_t, clock());
+    }
+
+    if (err_msg && (*result_tuples)) {
+        pfree(*result_tuples);
+        (*result_count) = 0;
+        (*result_tuples) = NULL;
+    }
+
+    pgr_global_report(log_msg, notice_msg, err_msg);
+
+    if (log_msg) pfree(log_msg);
+    if (notice_msg) pfree(notice_msg);
+    if (err_msg) pfree(err_msg);
+    if (edges) pfree(edges);
+
+    pgr_SPI_finish();
+}
+
+PGDLLEXPORT Datum
+bd_astar(PG_FUNCTION_ARGS) {
+    FuncCallContext     *funcctx;
+    TupleDesc           tuple_desc;
+
+    General_path_element_t  *result_tuples = 0;
+    size_t result_count = 0;
+
+    if (SRF_IS_FIRSTCALL()) {
+        MemoryContext   oldcontext;
+        funcctx = SRF_FIRSTCALL_INIT();
+        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
+
+
+        /**********************************************************************
+          edges_sql TEXT,
+          start_vid BIGINT,
+          end_vid BIGINT,
+          directed BOOLEAN DEFAULT true,
+          heuristic INTEGER DEFAULT 0,
+          factor FLOAT DEFAULT 1.0,
+          epsilon FLOAT DEFAULT 1.0,
+
+         **********************************************************************/
+
+        PGR_DBG("Calling process");
+        process(
+                text_to_cstring(PG_GETARG_TEXT_P(0)),
+                PG_GETARG_ARRAYTYPE_P(1),
+                PG_GETARG_ARRAYTYPE_P(2),
+
+                PG_GETARG_BOOL(3),
+                PG_GETARG_INT32(4),
+                PG_GETARG_FLOAT8(5),
+                PG_GETARG_FLOAT8(6),
+                PG_GETARG_BOOL(7),
+                &result_tuples,
+                &result_count);
+
+
+#if PGSQL_VERSION > 95
+        funcctx->max_calls = result_count;
+#else
+        funcctx->max_calls = (uint32_t)result_count;
+#endif
+        funcctx->user_fctx = result_tuples;
+        if (get_call_result_type(fcinfo, NULL, &tuple_desc)
+                != TYPEFUNC_COMPOSITE)
+            ereport(ERROR,
+                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+                     errmsg("function returning record called in context "
+                         "that cannot accept type record")));
+
+        funcctx->tuple_desc = tuple_desc;
+        MemoryContextSwitchTo(oldcontext);
+    }
+
+    funcctx = SRF_PERCALL_SETUP();
+    tuple_desc = funcctx->tuple_desc;
+    result_tuples = (General_path_element_t*) funcctx->user_fctx;
+
+    if (funcctx->call_cntr < funcctx->max_calls) {
+        HeapTuple    tuple;
+        Datum        result;
+        Datum        *values;
+        bool*        nulls;
+        size_t       call_cntr = funcctx->call_cntr;
+
+
+        /**********************************************************************
+          OUT seq INTEGER,
+          OUT path_seq INTEGER,
+          OUT node BIGINT,
+          OUT edge BIGINT,
+          OUT cost FLOAT,
+          OUT agg_cost FLOAT
+         *********************************************************************/
+
+        size_t numb = 8;
+        values = palloc(numb * sizeof(Datum));
+        nulls = palloc(numb * sizeof(bool));
+
+
+        size_t i;
+        for (i = 0; i < numb; ++i) {
+            nulls[i] = false;
+        }
+
+        values[0] = Int32GetDatum(call_cntr + 1);
+        values[1] = Int32GetDatum(result_tuples[call_cntr].seq);
+        values[2] = Int64GetDatum(result_tuples[call_cntr].start_id);
+        values[3] = Int64GetDatum(result_tuples[call_cntr].end_id);
+        values[4] = Int64GetDatum(result_tuples[call_cntr].node);
+        values[5] = Int64GetDatum(result_tuples[call_cntr].edge);
+        values[6] = Float8GetDatum(result_tuples[call_cntr].cost);
+        values[7] = Float8GetDatum(result_tuples[call_cntr].agg_cost);
+
+
+        tuple = heap_form_tuple(tuple_desc, values, nulls);
+        result = HeapTupleGetDatum(tuple);
+        SRF_RETURN_NEXT(funcctx, result);
+    } else {
+        SRF_RETURN_DONE(funcctx);
+    }
+}
+
diff --git a/src/bdAstar/src/bdAstar_driver.cpp b/src/bdAstar/bdAstar_driver.cpp
similarity index 100%
rename from src/bdAstar/src/bdAstar_driver.cpp
rename to src/bdAstar/bdAstar_driver.cpp
diff --git a/src/bdAstar/src/bdAstar.c b/src/bdAstar/src/bdAstar.c
deleted file mode 100644
index 74330a6..0000000
--- a/src/bdAstar/src/bdAstar.c
+++ /dev/null
@@ -1,238 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: bdAstar.c
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer:
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-Mail:
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "c_common/postgres_connection.h"
-#include "utils/array.h"
-
-#include "c_common/debug_macro.h"
-#include "c_common/e_report.h"
-#include "c_common/time_msg.h"
-
-#include "c_common/edges_input.h"
-#include "c_common/arrays_input.h"
-
-
-#include "drivers/astar/astar_driver.h" // for check_parameters
-#include "drivers/bdAstar/bdAstar_driver.h"
-
-PGDLLEXPORT Datum bd_astar(PG_FUNCTION_ARGS);
-PG_FUNCTION_INFO_V1(bd_astar);
-
-
-static
-void
-process(char* edges_sql,
-        ArrayType *starts,
-        ArrayType *ends,
-        bool directed,
-        int heuristic,
-        double factor,
-        double epsilon,
-        bool only_cost,
-        General_path_element_t **result_tuples,
-        size_t *result_count) {
-    check_parameters(heuristic, factor, epsilon);
-
-    pgr_SPI_connect();
-
-    int64_t* start_vidsArr = NULL;
-    size_t size_start_vidsArr = 0;
-    start_vidsArr = (int64_t*)
-        pgr_get_bigIntArray(&size_start_vidsArr, starts);
-
-    int64_t* end_vidsArr = NULL;
-    size_t size_end_vidsArr = 0;
-    end_vidsArr = (int64_t*)
-        pgr_get_bigIntArray(&size_end_vidsArr, ends);
-
-    PGR_DBG("Load data");
-    Pgr_edge_xy_t *edges = NULL;
-    size_t total_edges = 0;
-
-    pgr_get_edges_xy(edges_sql, &edges, &total_edges);
-    PGR_DBG("Total %ld edges in query:", total_edges);
-
-    if (total_edges == 0) {
-        PGR_DBG("No edges found");
-        (*result_count) = 0;
-        (*result_tuples) = NULL;
-        pgr_SPI_finish();
-        return;
-    }
-
-    PGR_DBG("Starting processing");
-    char* log_msg = NULL;
-    char* notice_msg = NULL;
-    char* err_msg = NULL;
-    clock_t start_t = clock();
-    do_pgr_bdAstar(
-            edges, total_edges,
-            start_vidsArr, size_start_vidsArr,
-            end_vidsArr, size_end_vidsArr,
-
-            directed,
-            heuristic,
-            factor,
-            epsilon,
-            only_cost,
-
-            result_tuples,
-            result_count,
-            &log_msg,
-            &notice_msg,
-            &err_msg);
-
-    if (only_cost) {
-        time_msg("pgr_bdAstarCost()", start_t, clock());
-    } else {
-        time_msg("pgr_bdAstar()", start_t, clock());
-    }
-
-    if (err_msg && (*result_tuples)) {
-        pfree(*result_tuples);
-        (*result_count) = 0;
-        (*result_tuples) = NULL;
-    }
-
-    pgr_global_report(log_msg, notice_msg, err_msg);
-
-    if (log_msg) pfree(log_msg);
-    if (notice_msg) pfree(notice_msg);
-    if (err_msg) pfree(err_msg);
-    if (edges) pfree(edges);
-
-    pgr_SPI_finish();
-}
-
-PGDLLEXPORT Datum
-bd_astar(PG_FUNCTION_ARGS) {
-    FuncCallContext     *funcctx;
-    TupleDesc           tuple_desc;
-
-    General_path_element_t  *result_tuples = 0;
-    size_t result_count = 0;
-
-    if (SRF_IS_FIRSTCALL()) {
-        MemoryContext   oldcontext;
-        funcctx = SRF_FIRSTCALL_INIT();
-        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
-
-
-        /**********************************************************************
-          edges_sql TEXT,
-          start_vid BIGINT,
-          end_vid BIGINT,
-          directed BOOLEAN DEFAULT true,
-          heuristic INTEGER DEFAULT 0,
-          factor FLOAT DEFAULT 1.0,
-          epsilon FLOAT DEFAULT 1.0,
-
-         **********************************************************************/
-
-        PGR_DBG("Calling process");
-        process(
-                text_to_cstring(PG_GETARG_TEXT_P(0)),
-                PG_GETARG_ARRAYTYPE_P(1),
-                PG_GETARG_ARRAYTYPE_P(2),
-
-                PG_GETARG_BOOL(3),
-                PG_GETARG_INT32(4),
-                PG_GETARG_FLOAT8(5),
-                PG_GETARG_FLOAT8(6),
-                PG_GETARG_BOOL(7),
-                &result_tuples,
-                &result_count);
-
-
-#if PGSQL_VERSION > 95
-        funcctx->max_calls = result_count;
-#else
-        funcctx->max_calls = (uint32_t)result_count;
-#endif
-        funcctx->user_fctx = result_tuples;
-        if (get_call_result_type(fcinfo, NULL, &tuple_desc)
-                != TYPEFUNC_COMPOSITE)
-            ereport(ERROR,
-                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                     errmsg("function returning record called in context "
-                         "that cannot accept type record")));
-
-        funcctx->tuple_desc = tuple_desc;
-        MemoryContextSwitchTo(oldcontext);
-    }
-
-    funcctx = SRF_PERCALL_SETUP();
-    tuple_desc = funcctx->tuple_desc;
-    result_tuples = (General_path_element_t*) funcctx->user_fctx;
-
-    if (funcctx->call_cntr < funcctx->max_calls) {
-        HeapTuple    tuple;
-        Datum        result;
-        Datum        *values;
-        bool*        nulls;
-        size_t       call_cntr = funcctx->call_cntr;
-
-
-        /**********************************************************************
-          OUT seq INTEGER,
-          OUT path_seq INTEGER,
-          OUT node BIGINT,
-          OUT edge BIGINT,
-          OUT cost FLOAT,
-          OUT agg_cost FLOAT
-         *********************************************************************/
-
-        size_t numb = 8;
-        values = palloc(numb * sizeof(Datum));
-        nulls = palloc(numb * sizeof(bool));
-
-
-        size_t i;
-        for (i = 0; i < numb; ++i) {
-            nulls[i] = false;
-        }
-
-        values[0] = Int32GetDatum(call_cntr + 1);
-        values[1] = Int32GetDatum(result_tuples[call_cntr].seq);
-        values[2] = Int64GetDatum(result_tuples[call_cntr].start_id);
-        values[3] = Int64GetDatum(result_tuples[call_cntr].end_id);
-        values[4] = Int64GetDatum(result_tuples[call_cntr].node);
-        values[5] = Int64GetDatum(result_tuples[call_cntr].edge);
-        values[6] = Float8GetDatum(result_tuples[call_cntr].cost);
-        values[7] = Float8GetDatum(result_tuples[call_cntr].agg_cost);
-
-
-        tuple = heap_form_tuple(tuple_desc, values, nulls);
-        result = HeapTupleGetDatum(tuple);
-        SRF_RETURN_NEXT(funcctx, result);
-    } else {
-        SRF_RETURN_DONE(funcctx);
-    }
-}
-
diff --git a/src/bdAstar/test/doc-pgr_bdAstar.result b/src/bdAstar/test/doc-pgr_bdAstar.result
deleted file mode 100644
index 3940236..0000000
--- a/src/bdAstar/test/doc-pgr_bdAstar.result
+++ /dev/null
@@ -1,112 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- q1
-SELECT * FROM pgr_bdAstar(
-    'SELECT id, source, target, cost, reverse_cost, x1,y1,x2,y2
-    FROM edge_table',
-    2, 3
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    2 |    4 |    1 |        0
-   2 |        2 |    5 |    8 |    1 |        1
-   3 |        3 |    6 |    9 |    1 |        2
-   4 |        4 |    9 |   16 |    1 |        3
-   5 |        5 |    4 |    3 |    1 |        4
-   6 |        6 |    3 |   -1 |    0 |        5
-(6 rows)
-
--- q2
-SELECT * FROM pgr_bdAstar(
-    'SELECT id, source, target, cost, reverse_cost, x1,y1,x2,y2
-    FROM edge_table',
-    2, 3,
-    true, heuristic := 2
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    2 |    4 |    1 |        0
-   2 |        2 |    5 |    8 |    1 |        1
-   3 |        3 |    6 |    9 |    1 |        2
-   4 |        4 |    9 |   16 |    1 |        3
-   5 |        5 |    4 |    3 |    1 |        4
-   6 |        6 |    3 |   -1 |    0 |        5
-(6 rows)
-
--- q3
-SELECT * FROM pgr_bdAstar(
-    'SELECT id, source, target, cost, reverse_cost, x1,y1,x2,y2
-    FROM edge_table',
-    2, ARRAY[3, 11],
-    heuristic := 3, factor := 3.5
-);
- seq | path_seq | end_vid | node | edge | cost | agg_cost 
------+----------+---------+------+------+------+----------
-   1 |        1 |       3 |    2 |    4 |    1 |        0
-   2 |        2 |       3 |    5 |    8 |    1 |        1
-   3 |        3 |       3 |    6 |    9 |    1 |        2
-   4 |        4 |       3 |    9 |   16 |    1 |        3
-   5 |        5 |       3 |    4 |    3 |    1 |        4
-   6 |        6 |       3 |    3 |   -1 |    0 |        5
-   7 |        1 |      11 |    2 |    4 |    1 |        0
-   8 |        2 |      11 |    5 |    8 |    1 |        1
-   9 |        3 |      11 |    6 |   11 |    1 |        2
-  10 |        4 |      11 |   11 |   -1 |    0 |        3
-(10 rows)
-
--- q4
-SELECT * FROM pgr_bdAstar(
-    'SELECT id, source, target, cost, reverse_cost, x1,y1,x2,y2
-    FROM edge_table',
-    ARRAY[2, 7], 3,
-    false, heuristic := 4
-);
- seq | path_seq | start_vid | node | edge | cost | agg_cost 
------+----------+-----------+------+------+------+----------
-   1 |        1 |         2 |    2 |    2 |    1 |        0
-   2 |        2 |         2 |    3 |   -1 |    0 |        1
-   3 |        1 |         7 |    7 |    6 |    1 |        0
-   4 |        2 |         7 |    8 |    7 |    1 |        1
-   5 |        3 |         7 |    5 |    4 |    1 |        2
-   6 |        4 |         7 |    2 |    2 |    1 |        3
-   7 |        5 |         7 |    3 |   -1 |    0 |        4
-(7 rows)
-
--- q5
-SELECT * FROM pgr_bdAstar(
-    'SELECT id, source, target, cost, reverse_cost, x1,y1,x2,y2
-    FROM edge_table',
-    ARRAY[2, 7], ARRAY[3, 11],
-    factor := 0.5
-);
- seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost 
------+----------+-----------+---------+------+------+------+----------
-   1 |        1 |         2 |       3 |    2 |    4 |    1 |        0
-   2 |        2 |         2 |       3 |    5 |    8 |    1 |        1
-   3 |        3 |         2 |       3 |    6 |    9 |    1 |        2
-   4 |        4 |         2 |       3 |    9 |   16 |    1 |        3
-   5 |        5 |         2 |       3 |    4 |    3 |    1 |        4
-   6 |        6 |         2 |       3 |    3 |   -1 |    0 |        5
-   7 |        1 |         2 |      11 |    2 |    4 |    1 |        0
-   8 |        2 |         2 |      11 |    5 |    8 |    1 |        1
-   9 |        3 |         2 |      11 |    6 |   11 |    1 |        2
-  10 |        4 |         2 |      11 |   11 |   -1 |    0 |        3
-  11 |        1 |         7 |       3 |    7 |    6 |    1 |        0
-  12 |        2 |         7 |       3 |    8 |    7 |    1 |        1
-  13 |        3 |         7 |       3 |    5 |    8 |    1 |        2
-  14 |        4 |         7 |       3 |    6 |    9 |    1 |        3
-  15 |        5 |         7 |       3 |    9 |   16 |    1 |        4
-  16 |        6 |         7 |       3 |    4 |    3 |    1 |        5
-  17 |        7 |         7 |       3 |    3 |   -1 |    0 |        6
-  18 |        1 |         7 |      11 |    7 |    6 |    1 |        0
-  19 |        2 |         7 |      11 |    8 |    7 |    1 |        1
-  20 |        3 |         7 |      11 |    5 |   10 |    1 |        2
-  21 |        4 |         7 |      11 |   10 |   12 |    1 |        3
-  22 |        5 |         7 |      11 |   11 |   -1 |    0 |        4
-(22 rows)
-
--- q6
-ROLLBACK;
-ROLLBACK
diff --git a/src/bdAstar/test/doc-pgr_bdAstarCost.result b/src/bdAstar/test/doc-pgr_bdAstarCost.result
deleted file mode 100644
index f22ab6d..0000000
--- a/src/bdAstar/test/doc-pgr_bdAstarCost.result
+++ /dev/null
@@ -1,71 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- q1
-SELECT * FROM pgr_bdAstarCost(
-    'SELECT id, source, target, cost, reverse_cost, x1,y1,x2,y2
-    FROM edge_table',
-    2, 3
-);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         2 |       3 |        5
-(1 row)
-
--- q2
-SELECT * FROM pgr_bdAstarCost(
-    'SELECT id, source, target, cost, reverse_cost, x1,y1,x2,y2
-    FROM edge_table',
-    2, 3,
-    true, heuristic := 2
-);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         2 |       3 |        5
-(1 row)
-
--- q3
-SELECT * FROM pgr_bdAstarCost(
-    'SELECT id, source, target, cost, reverse_cost, x1,y1,x2,y2
-    FROM edge_table',
-    2, ARRAY[3, 11],
-    heuristic := 3, factor := 3.5
-);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         2 |       3 |        5
-         2 |      11 |        3
-(2 rows)
-
--- q4
-SELECT * FROM pgr_bdAstarCost(
-    'SELECT id, source, target, cost, reverse_cost, x1,y1,x2,y2
-    FROM edge_table',
-    ARRAY[2, 7], 3,
-    false, heuristic := 4
-);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         2 |       3 |        1
-         7 |       3 |        4
-(2 rows)
-
--- q5
-SELECT * FROM pgr_bdAstarCost(
-    'SELECT id, source, target, cost, reverse_cost, x1,y1,x2,y2
-    FROM edge_table',
-    ARRAY[2, 7], ARRAY[3, 11],
-    factor := 0.5
-);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         2 |       3 |        5
-         2 |      11 |        3
-         7 |       3 |        6
-         7 |      11 |        4
-(4 rows)
-
--- q6
-ROLLBACK;
-ROLLBACK
diff --git a/src/bdDijkstra/src/CMakeLists.txt b/src/bdDijkstra/CMakeLists.txt
similarity index 100%
rename from src/bdDijkstra/src/CMakeLists.txt
rename to src/bdDijkstra/CMakeLists.txt
diff --git a/src/bdDijkstra/bdDijkstra.c b/src/bdDijkstra/bdDijkstra.c
new file mode 100644
index 0000000..e0be85f
--- /dev/null
+++ b/src/bdDijkstra/bdDijkstra.c
@@ -0,0 +1,234 @@
+/*PGR-GNU*****************************************************************
+File: bdDijkstra.c
+
+Generated with Template by:
+Copyright (c) 2016 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer:
+Copyright (c) 2016 Celia Virginia Vergara Castillo
+Mail: vicky_vergara at hotmail.com
+
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "c_common/postgres_connection.h"
+#include "utils/array.h"
+
+
+#include "c_common/debug_macro.h"
+#include "c_common/e_report.h"
+#include "c_common/time_msg.h"
+
+#include "c_common/edges_input.h"
+#include "c_common/arrays_input.h"
+
+#include "drivers/bdDijkstra/bdDijkstra_driver.h"
+
+PGDLLEXPORT Datum bdDijkstra(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(bdDijkstra);
+
+
+/******************************************************************************/
+/*                          MODIFY AS NEEDED                                  */
+static
+void
+process(
+        char* edges_sql,
+        ArrayType *starts,
+        ArrayType *ends,
+        bool directed,
+        bool only_cost,
+        General_path_element_t **result_tuples,
+        size_t *result_count) {
+    pgr_SPI_connect();
+
+    int64_t* start_vidsArr = NULL;
+    size_t size_start_vidsArr = 0;
+    start_vidsArr = (int64_t*)
+        pgr_get_bigIntArray(&size_start_vidsArr, starts);
+
+    int64_t* end_vidsArr = NULL;
+    size_t size_end_vidsArr = 0;
+    end_vidsArr = (int64_t*)
+        pgr_get_bigIntArray(&size_end_vidsArr, ends);
+
+    pgr_edge_t *edges = NULL;
+    size_t total_edges = 0;
+
+    pgr_get_edges(edges_sql, &edges, &total_edges);
+    PGR_DBG("Total %ld edges in query:", total_edges);
+
+    if (total_edges == 0) {
+        PGR_DBG("No edges found");
+        pgr_SPI_finish();
+        return;
+    }
+
+    PGR_DBG("Starting processing");
+    clock_t start_t = clock();
+    char *log_msg = NULL;
+    char *notice_msg = NULL;
+    char *err_msg = NULL;
+    do_pgr_bdDijkstra(
+            edges, total_edges,
+            start_vidsArr, size_start_vidsArr,
+            end_vidsArr, size_end_vidsArr,
+
+            directed,
+            only_cost,
+
+            result_tuples,
+            result_count,
+            &log_msg,
+            &notice_msg,
+            &err_msg);
+
+    time_msg(" processing pgr_bdDijkstra", start_t, clock());
+
+
+    if (err_msg && (*result_tuples)) {
+        pfree(*result_tuples);
+        (*result_tuples) = NULL;
+        (*result_count) = 0;
+    }
+
+    pgr_global_report(log_msg, notice_msg, err_msg);
+
+    if (log_msg) pfree(log_msg);
+    if (notice_msg) pfree(notice_msg);
+    if (err_msg) pfree(err_msg);
+    if (edges) pfree(edges);
+
+    pgr_SPI_finish();
+}
+/*                                                                            */
+/******************************************************************************/
+
+PGDLLEXPORT Datum bdDijkstra(PG_FUNCTION_ARGS) {
+    FuncCallContext     *funcctx;
+    TupleDesc           tuple_desc;
+
+    /**************************************************************************/
+    /*                          MODIFY AS NEEDED                              */
+    /*                                                                        */
+    General_path_element_t  *result_tuples = NULL;
+    size_t result_count = 0;
+    /*                                                                        */
+    /**************************************************************************/
+
+    if (SRF_IS_FIRSTCALL()) {
+        MemoryContext   oldcontext;
+        funcctx = SRF_FIRSTCALL_INIT();
+        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
+
+
+        /**********************************************************************/
+        /*                          MODIFY AS NEEDED                          */
+        /*
+           edges_sql TEXT,
+           start_vid BIGINT,
+           end_vid BIGINT,
+           directed BOOLEAN DEFAULT true,
+           only_cost BOOLEAN DEFAULT false,
+         **********************************************************************/
+
+
+        process(
+                text_to_cstring(PG_GETARG_TEXT_P(0)),
+                PG_GETARG_ARRAYTYPE_P(1),
+                PG_GETARG_ARRAYTYPE_P(2),
+                PG_GETARG_BOOL(3),
+                PG_GETARG_BOOL(4),
+                &result_tuples,
+                &result_count);
+
+        /*                                                                    */
+        /**********************************************************************/
+
+#if PGSQL_VERSION > 95
+        funcctx->max_calls = result_count;
+#else
+        funcctx->max_calls = (uint32_t)result_count;
+#endif
+        funcctx->user_fctx = result_tuples;
+        if (get_call_result_type(fcinfo, NULL, &tuple_desc)
+                != TYPEFUNC_COMPOSITE) {
+            ereport(ERROR,
+                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+                     errmsg("function returning record called in context "
+                         "that cannot accept type record")));
+        }
+
+        funcctx->tuple_desc = tuple_desc;
+        MemoryContextSwitchTo(oldcontext);
+    }
+
+    funcctx = SRF_PERCALL_SETUP();
+    tuple_desc = funcctx->tuple_desc;
+
+    result_tuples = (General_path_element_t*) funcctx->user_fctx;
+
+    if (funcctx->call_cntr < funcctx->max_calls) {
+        HeapTuple    tuple;
+        Datum        result;
+        Datum        *values;
+        bool*        nulls;
+        size_t       call_cntr = funcctx->call_cntr;
+
+
+        /**********************************************************************/
+        /*                          MODIFY AS NEEDED                          */
+        /*
+           OUT seq INTEGER,
+           OUT path_seq INTEGER,
+           OUT node BIGINT,
+           OUT edge BIGINT,
+           OUT cost FLOAT,
+           OUT agg_cost FLOAT
+         ***********************************************************************/
+
+        size_t numb = 8;
+        values = palloc(numb * sizeof(Datum));
+        nulls = palloc(numb * sizeof(bool));
+
+
+        size_t i;
+        for (i = 0; i < numb; ++i) {
+            nulls[i] = false;
+        }
+
+        values[0] = Int32GetDatum(call_cntr + 1);
+        values[1] = Int32GetDatum(result_tuples[call_cntr].seq);
+        values[2] = Int64GetDatum(result_tuples[call_cntr].start_id);
+        values[3] = Int64GetDatum(result_tuples[call_cntr].end_id);
+        values[4] = Int64GetDatum(result_tuples[call_cntr].node);
+        values[5] = Int64GetDatum(result_tuples[call_cntr].edge);
+        values[6] = Float8GetDatum(result_tuples[call_cntr].cost);
+        values[7] = Float8GetDatum(result_tuples[call_cntr].agg_cost);
+
+        /**********************************************************************/
+
+        tuple = heap_form_tuple(tuple_desc, values, nulls);
+        result = HeapTupleGetDatum(tuple);
+        SRF_RETURN_NEXT(funcctx, result);
+    } else {
+        SRF_RETURN_DONE(funcctx);
+    }
+}
diff --git a/src/bdDijkstra/bdDijkstra_driver.cpp b/src/bdDijkstra/bdDijkstra_driver.cpp
new file mode 100644
index 0000000..c04642d
--- /dev/null
+++ b/src/bdDijkstra/bdDijkstra_driver.cpp
@@ -0,0 +1,191 @@
+/*PGR-GNU*****************************************************************
+File: bdDijkstra_driver.cpp
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer: 
+Copyright (c) 2016 Celia Virginia Vergara Castillo
+Mail: vicky_vergara at hotmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "drivers/bdDijkstra/bdDijkstra_driver.h"
+
+#include <sstream>
+#include <deque>
+#include <vector>
+#include <algorithm>
+
+#include "bdDijkstra/pgr_bdDijkstra.hpp"
+
+
+#include "cpp_common/pgr_alloc.hpp"
+#include "cpp_common/pgr_assert.h"
+
+#include "cpp_common/pgr_base_graph.hpp"
+
+
+
+
+template < class G >
+static
+std::deque<Path>
+pgr_bdDijkstra(
+        G &graph,
+        std::vector < int64_t > sources,
+        std::vector < int64_t > targets,
+
+        std::ostream &log,
+        bool only_cost) {
+    log << "entering static function\n";
+    std::sort(sources.begin(), sources.end());
+    sources.erase(
+            std::unique(sources.begin(), sources.end()),
+            sources.end());
+
+    std::sort(targets.begin(), targets.end());
+    targets.erase(
+            std::unique(targets.begin(), targets.end()),
+            targets.end());
+
+    pgrouting::bidirectional::Pgr_bdDijkstra<G> fn_bdDijkstra(graph);
+
+    std::deque<Path> paths;
+    for (const auto source : sources) {
+        for (const auto target : targets) {
+            fn_bdDijkstra.clear();
+            paths.push_back(fn_bdDijkstra.pgr_bdDijkstra(
+                        graph.get_V(source), graph.get_V(target), only_cost));
+        }
+    }
+
+    log << fn_bdDijkstra.log();
+
+    return paths;
+}
+
+
+void
+do_pgr_bdDijkstra(
+        pgr_edge_t  *data_edges,
+        size_t total_edges,
+        int64_t  *start_vidsArr,
+        size_t size_start_vidsArr,
+        int64_t  *end_vidsArr,
+        size_t size_end_vidsArr,
+
+        bool directed,
+        bool only_cost,
+
+        General_path_element_t **return_tuples,
+        size_t *return_count,
+        char **log_msg,
+        char **notice_msg,
+        char **err_msg) {
+    std::ostringstream log;
+    std::ostringstream err;
+    std::ostringstream notice;
+    try {
+        pgassert(total_edges != 0);
+        pgassert(size_start_vidsArr != 0);
+        pgassert(size_end_vidsArr != 0);
+
+        pgassert(!(*log_msg));
+        pgassert(!(*notice_msg));
+        pgassert(!(*err_msg));
+        pgassert(!(*return_tuples));
+        pgassert(*return_count == 0);
+
+        log << "Inserting vertices into a c++ vector structure";
+        std::vector<int64_t>
+            start_vertices(start_vidsArr, start_vidsArr + size_start_vidsArr);
+        std::vector< int64_t >
+            end_vertices(end_vidsArr, end_vidsArr + size_end_vidsArr);
+
+        graphType gType = directed? DIRECTED: UNDIRECTED;
+
+        std::deque<Path> paths;
+
+        log << "starting process\n";
+        if (directed) {
+            log << "Working with directed Graph\n";
+            pgrouting::DirectedGraph digraph(gType);
+            digraph.insert_edges(data_edges, total_edges);
+            paths = pgr_bdDijkstra(digraph,
+                    start_vertices,
+                    end_vertices,
+                    log,
+                    only_cost);
+        } else {
+            log << "Working with Undirected Graph\n";
+            pgrouting::UndirectedGraph undigraph(gType);
+            undigraph.insert_edges(data_edges, total_edges);
+            paths = pgr_bdDijkstra(
+                    undigraph,
+                    start_vertices,
+                    end_vertices,
+                    log,
+                    only_cost);
+        }
+
+        size_t count(0);
+        count = count_tuples(paths);
+
+        if (count == 0) {
+            (*return_tuples) = NULL;
+            (*return_count) = 0;
+            notice <<
+                "No paths found";
+            *log_msg = pgr_msg(notice.str().c_str());
+            return;
+        }
+
+        (*return_tuples) = pgr_alloc(count, (*return_tuples));
+        log << "\nConverting a set of paths into the tuples";
+        (*return_count) = (collapse_paths(return_tuples, paths));
+
+        pgassert(*err_msg == NULL);
+        *log_msg = log.str().empty()?
+            *log_msg :
+            pgr_msg(log.str().c_str());
+        *notice_msg = notice.str().empty()?
+            *notice_msg :
+            pgr_msg(notice.str().c_str());
+    } catch (AssertFailedException &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch (std::exception &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch(...) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << "Caught unknown exception!";
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    }
+}
diff --git a/src/bdDijkstra/src/bdDijkstra.c b/src/bdDijkstra/src/bdDijkstra.c
deleted file mode 100644
index cad4ec3..0000000
--- a/src/bdDijkstra/src/bdDijkstra.c
+++ /dev/null
@@ -1,227 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: bdDijkstra.c
-
-Generated with Template by:
-Copyright (c) 2016 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer:
-Copyright (c) 2016 Celia Virginia Vergara Castillo
-Mail: vicky_vergara at hotmail.com
-
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "c_common/postgres_connection.h"
-#include "utils/array.h"
-
-
-#include "c_common/debug_macro.h"
-#include "c_common/e_report.h"
-#include "c_common/time_msg.h"
-
-#include "c_common/edges_input.h"
-#include "c_common/arrays_input.h"
-
-#include "drivers/bdDijkstra/bdDijkstra_driver.h"
-
-PGDLLEXPORT Datum bdDijkstra(PG_FUNCTION_ARGS);
-PG_FUNCTION_INFO_V1(bdDijkstra);
-
-
-/******************************************************************************/
-/*                          MODIFY AS NEEDED                                  */
-static
-void
-process(
-        char* edges_sql,
-        ArrayType *starts,
-        ArrayType *ends,
-        bool directed,
-        bool only_cost,
-        General_path_element_t **result_tuples,
-        size_t *result_count) {
-    pgr_SPI_connect();
-
-    int64_t* start_vidsArr = NULL;
-    size_t size_start_vidsArr = 0;
-    start_vidsArr = (int64_t*)
-        pgr_get_bigIntArray(&size_start_vidsArr, starts);
-
-    int64_t* end_vidsArr = NULL;
-    size_t size_end_vidsArr = 0;
-    end_vidsArr = (int64_t*)
-        pgr_get_bigIntArray(&size_end_vidsArr, ends);
-
-    pgr_edge_t *edges = NULL;
-    size_t total_edges = 0;
-
-    pgr_get_edges(edges_sql, &edges, &total_edges);
-    PGR_DBG("Total %ld edges in query:", total_edges);
-
-    if (total_edges == 0) {
-        PGR_DBG("No edges found");
-        pgr_SPI_finish();
-        return;
-    }
-
-    PGR_DBG("Starting processing");
-    clock_t start_t = clock();
-    char *log_msg = NULL;
-    char *notice_msg = NULL;
-    char *err_msg = NULL;
-    do_pgr_bdDijkstra(
-            edges, total_edges,
-            start_vidsArr, size_start_vidsArr,
-            end_vidsArr, size_end_vidsArr,
-
-            directed,
-            only_cost,
-
-            result_tuples,
-            result_count,
-            &log_msg,
-            &notice_msg,
-            &err_msg);
-
-    time_msg(" processing pgr_bdDijkstra", start_t, clock());
-    PGR_DBG("Returning %ld tuples", *result_count);
-
-    if (err_msg) {
-        if (*result_tuples) free(*result_tuples);
-    }
-    pgr_global_report(log_msg, notice_msg, err_msg);
-
-    pfree(edges);
-    pgr_SPI_finish();
-}
-/*                                                                            */
-/******************************************************************************/
-
-PGDLLEXPORT Datum bdDijkstra(PG_FUNCTION_ARGS) {
-    FuncCallContext     *funcctx;
-    TupleDesc           tuple_desc;
-
-    /**************************************************************************/
-    /*                          MODIFY AS NEEDED                              */
-    /*                                                                        */
-    General_path_element_t  *result_tuples = NULL;
-    size_t result_count = 0;
-    /*                                                                        */
-    /**************************************************************************/
-
-    if (SRF_IS_FIRSTCALL()) {
-        MemoryContext   oldcontext;
-        funcctx = SRF_FIRSTCALL_INIT();
-        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
-
-
-        /**********************************************************************/
-        /*                          MODIFY AS NEEDED                          */
-        /*
-           edges_sql TEXT,
-           start_vid BIGINT,
-           end_vid BIGINT,
-           directed BOOLEAN DEFAULT true,
-           only_cost BOOLEAN DEFAULT false,
-         **********************************************************************/
-
-
-        process(
-                text_to_cstring(PG_GETARG_TEXT_P(0)),
-                PG_GETARG_ARRAYTYPE_P(1),
-                PG_GETARG_ARRAYTYPE_P(2),
-                PG_GETARG_BOOL(3),
-                PG_GETARG_BOOL(4),
-                &result_tuples,
-                &result_count);
-
-        /*                                                                    */
-        /**********************************************************************/
-
-#if PGSQL_VERSION > 95
-        funcctx->max_calls = result_count;
-#else
-        funcctx->max_calls = (uint32_t)result_count;
-#endif
-        funcctx->user_fctx = result_tuples;
-        if (get_call_result_type(fcinfo, NULL, &tuple_desc)
-                != TYPEFUNC_COMPOSITE) {
-            ereport(ERROR,
-                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                     errmsg("function returning record called in context "
-                         "that cannot accept type record")));
-        }
-
-        funcctx->tuple_desc = tuple_desc;
-        MemoryContextSwitchTo(oldcontext);
-    }
-
-    funcctx = SRF_PERCALL_SETUP();
-    tuple_desc = funcctx->tuple_desc;
-
-    result_tuples = (General_path_element_t*) funcctx->user_fctx;
-
-    if (funcctx->call_cntr < funcctx->max_calls) {
-        HeapTuple    tuple;
-        Datum        result;
-        Datum        *values;
-        bool*        nulls;
-        size_t       call_cntr = funcctx->call_cntr;
-
-
-        /**********************************************************************/
-        /*                          MODIFY AS NEEDED                          */
-        /*
-           OUT seq INTEGER,
-           OUT path_seq INTEGER,
-           OUT node BIGINT,
-           OUT edge BIGINT,
-           OUT cost FLOAT,
-           OUT agg_cost FLOAT
-         ***********************************************************************/
-
-        size_t numb = 8;
-        values = palloc(numb * sizeof(Datum));
-        nulls = palloc(numb * sizeof(bool));
-
-
-        size_t i;
-        for (i = 0; i < numb; ++i) {
-            nulls[i] = false;
-        }
-
-        values[0] = Int32GetDatum(call_cntr + 1);
-        values[1] = Int32GetDatum(result_tuples[call_cntr].seq);
-        values[2] = Int64GetDatum(result_tuples[call_cntr].start_id);
-        values[3] = Int64GetDatum(result_tuples[call_cntr].end_id);
-        values[4] = Int64GetDatum(result_tuples[call_cntr].node);
-        values[5] = Int64GetDatum(result_tuples[call_cntr].edge);
-        values[6] = Float8GetDatum(result_tuples[call_cntr].cost);
-        values[7] = Float8GetDatum(result_tuples[call_cntr].agg_cost);
-
-        /**********************************************************************/
-
-        tuple = heap_form_tuple(tuple_desc, values, nulls);
-        result = HeapTupleGetDatum(tuple);
-        SRF_RETURN_NEXT(funcctx, result);
-    } else {
-        SRF_RETURN_DONE(funcctx);
-    }
-}
diff --git a/src/bdDijkstra/src/bdDijkstra_driver.cpp b/src/bdDijkstra/src/bdDijkstra_driver.cpp
deleted file mode 100644
index 9864840..0000000
--- a/src/bdDijkstra/src/bdDijkstra_driver.cpp
+++ /dev/null
@@ -1,206 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: bdDijkstra_driver.cpp
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer: 
-Copyright (c) 2016 Celia Virginia Vergara Castillo
-Mail: vicky_vergara at hotmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "drivers/bdDijkstra/bdDijkstra_driver.h"
-
-#include <sstream>
-#include <deque>
-#include <vector>
-#include <algorithm>
-
-#include "bdDijkstra/pgr_bdDijkstra.hpp"
-
-
-#include "cpp_common/pgr_alloc.hpp"
-#include "cpp_common/pgr_assert.h"
-
-#include "cpp_common/pgr_base_graph.hpp"
-
-
-
-
-template < class G >
-static
-std::deque<Path>
-pgr_bdDijkstra(
-        G &graph,
-        std::vector < int64_t > sources,
-        std::vector < int64_t > targets,
-
-        std::ostream &log,
-        bool only_cost) {
-    log << "entering static function\n";
-    std::sort(sources.begin(), sources.end());
-    sources.erase(
-            std::unique(sources.begin(), sources.end()),
-            sources.end());
-
-    std::sort(targets.begin(), targets.end());
-    targets.erase(
-            std::unique(targets.begin(), targets.end()),
-            targets.end());
-
-    pgrouting::bidirectional::Pgr_bdDijkstra<G> fn_bdDijkstra(graph);
-
-    std::deque<Path> paths;
-    for (const auto source : sources) {
-        for (const auto target : targets) {
-            fn_bdDijkstra.clear();
-            paths.push_back(fn_bdDijkstra.pgr_bdDijkstra(
-                        graph.get_V(source), graph.get_V(target), only_cost));
-        }
-    }
-
-    log << fn_bdDijkstra.log();
-
-    return paths;
-}
-
-
-void
-do_pgr_bdDijkstra(
-        pgr_edge_t  *data_edges,
-        size_t total_edges,
-        int64_t  *start_vidsArr,
-        size_t size_start_vidsArr,
-        int64_t  *end_vidsArr,
-        size_t size_end_vidsArr,
-
-        bool directed,
-        bool only_cost,
-
-        General_path_element_t **return_tuples,
-        size_t *return_count,
-        char **log_msg,
-        char **notice_msg,
-        char **err_msg) {
-    std::ostringstream log;
-    std::ostringstream err;
-    std::ostringstream notice;
-    try {
-        pgassert(total_edges != 0);
-        pgassert(size_start_vidsArr != 0);
-        pgassert(size_end_vidsArr != 0);
-
-        pgassert(!(*log_msg));
-        pgassert(!(*notice_msg));
-        pgassert(!(*err_msg));
-        pgassert(!(*return_tuples));
-        pgassert(*return_count == 0);
-
-        log << "Inserting vertices into a c++ vector structure";
-        std::vector<int64_t>
-            start_vertices(start_vidsArr, start_vidsArr + size_start_vidsArr);
-        std::vector< int64_t >
-            end_vertices(end_vidsArr, end_vidsArr + size_end_vidsArr);
-
-        graphType gType = directed? DIRECTED: UNDIRECTED;
-
-        std::deque<Path> paths;
-
-        log << "starting process\n";
-        if (directed) {
-            log << "Working with directed Graph\n";
-            pgrouting::DirectedGraph digraph(gType);
-            digraph.insert_edges(data_edges, total_edges);
-            paths = pgr_bdDijkstra(digraph,
-                    start_vertices,
-                    end_vertices,
-                    log,
-                    only_cost);
-        } else {
-            log << "Working with Undirected Graph\n";
-            pgrouting::UndirectedGraph undigraph(gType);
-            undigraph.insert_edges(data_edges, total_edges);
-            paths = pgr_bdDijkstra(
-                    undigraph,
-                    start_vertices,
-                    end_vertices,
-                    log,
-                    only_cost);
-        }
-
-        size_t count(0);
-        count = count_tuples(paths);
-
-        if (count == 0) {
-            (*return_tuples) = NULL;
-            (*return_count) = 0;
-            notice <<
-                "No paths found";
-            *log_msg = pgr_msg(notice.str().c_str());
-            return;
-        }
-
-        (*return_tuples) = pgr_alloc(count, (*return_tuples));
-        log << "\nConverting a set of paths into the tuples";
-        (*return_count) = (collapse_paths(return_tuples, paths));
-
-#if 0
-        auto count = path.size();
-
-        if (count == 0) {
-            (*return_tuples) = NULL;
-            (*return_count) = 0;
-            notice <<
-                "No paths found between start_vid and end_vid vertices";
-        } else {
-            (*return_tuples) = pgr_alloc(count, (*return_tuples));
-            size_t sequence = 0;
-            path.generate_postgres_data(return_tuples, sequence);
-            (*return_count) = sequence;
-        }
-#endif
-        pgassert(*err_msg == NULL);
-        *log_msg = log.str().empty()?
-            nullptr :
-            strdup(log.str().c_str());
-        *notice_msg = notice.str().empty()?
-            nullptr :
-            strdup(notice.str().c_str());
-    } catch (AssertFailedException &except) {
-        if (*return_tuples) free(*return_tuples);
-        (*return_count) = 0;
-        err << except.what();
-        *err_msg = strdup(err.str().c_str());
-        *log_msg = strdup(log.str().c_str());
-    } catch (std::exception& except) {
-        if (*return_tuples) free(*return_tuples);
-        (*return_count) = 0;
-        err << except.what();
-        *err_msg = strdup(err.str().c_str());
-        *log_msg = strdup(log.str().c_str());
-    } catch(...) {
-        if (*return_tuples) free(*return_tuples);
-        (*return_count) = 0;
-        err << "Caught unknown exception!";
-        *err_msg = strdup(err.str().c_str());
-        *log_msg = strdup(log.str().c_str());
-    }
-}
diff --git a/src/bdDijkstra/test/bdDijkstra-large.result b/src/bdDijkstra/test/bdDijkstra-large.result
deleted file mode 100644
index 54c6ddd..0000000
--- a/src/bdDijkstra/test/bdDijkstra-large.result
+++ /dev/null
@@ -1,396 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
---q1
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2016 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-SELECT seq, node, edge, round(cost::numeric, 6)  FROM
-  pgr_bdDijkstra('SELECT * FROM bdd_ways', 5700, 6733, true);
- seq | node  | edge  |  round   
------+-------+-------+----------
-   1 |  5700 | 20787 | 0.006774
-   2 | 10932 | 20756 | 0.040876
-   3 | 10931 | 20797 | 0.002564
-   4 |  7661 | 20796 | 0.002581
-   5 | 10943 | 20776 | 0.040800
-   6 | 10941 | 20772 | 0.005720
-   7 |  3415 | 20771 | 0.007463
-   8 | 10940 | 20841 | 0.187594
-   9 | 10952 | 20812 | 0.005045
-  10 |  7034 | 20811 | 0.004532
-  11 | 10951 | 20833 | 0.177477
-  12 | 10944 | 20779 | 0.008539
-  13 |  8910 | 20778 | 0.006447
-  14 | 10929 | 20835 | 0.071114
-  15 | 10948 | 20794 | 0.013276
-  16 |  8908 | 12990 | 0.013157
-  17 |  8325 | 13831 | 0.009169
-  18 |  3753 | 13830 | 0.196045
-  19 |  6774 | 13829 | 0.032840
-  20 |  8304 | 13828 | 0.117213
-  21 |  9205 | 13827 | 0.010639
-  22 |  8994 | 13165 | 0.012931
-  23 |  8977 | 13164 | 0.008029
-  24 |  8976 | 13163 | 0.069895
-  25 |  8993 | 13162 | 0.009638
-  26 |  8351 | 13161 | 0.099016
-  27 |  8992 | 13160 | 0.187353
-  28 |  8991 | 13159 | 0.018649
-  29 |  2962 | 13158 | 0.071931
-  30 |  1285 | 13157 | 0.118340
-  31 |  8989 | 13156 | 0.006317
-  32 |  8988 | 13155 | 0.079185
-  33 |    21 | 13154 | 0.057101
-  34 |  6436 | 13153 | 0.083288
-  35 |   637 | 13152 | 0.099744
-  36 |  8987 | 13151 | 0.057786
-  37 |   398 | 13150 | 0.120005
-  38 |  8496 | 13149 | 0.069498
-  39 |  8986 | 13148 | 0.014323
-  40 |  8985 | 13167 | 0.070884
-  41 |  8451 | 11869 | 0.006925
-  42 |   476 | 11868 | 0.196533
-  43 |   529 | 11867 | 0.005677
-  44 |  8450 | 11871 | 0.118857
-  45 |  8452 | 11878 | 0.083250
-  46 |  8455 | 11880 | 0.048821
-  47 |  8456 | 11883 | 0.064572
-  48 |  1807 | 11882 | 0.101185
-  49 |  8457 | 11894 | 0.046805
-  50 |  8465 | 15481 | 0.180992
-  51 |  8522 | 15480 | 0.016198
-  52 |  9621 | 15479 | 0.209882
-  53 |  2808 | 15478 | 0.019312
-  54 |  8311 | 15477 | 0.113487
-  55 |  8583 | 16981 | 0.045667
-  56 | 10046 | 16982 | 0.022635
-  57 |  8467 | 16983 | 0.022924
-  58 |  9624 | 15487 | 0.034042
-  59 |  8468 | 11899 | 0.018103
-  60 |  3170 | 19357 | 0.047698
-  61 |  9949 | 19358 | 0.059093
-  62 | 10479 | 19359 | 0.051651
-  63 |  9948 | 19360 | 0.051709
-  64 |  8509 | 19374 | 0.106794
-  65 |  9595 | 19375 | 0.102428
-  66 |  8634 | 19376 | 0.107643
-  67 | 10174 | 19377 | 0.096140
-  68 | 10482 | 19378 | 0.009782
-  69 |  9194 | 19379 | 0.102702
-  70 |  4397 | 19380 | 0.108243
-  71 |  3002 | 19381 | 0.098919
-  72 | 10484 | 19382 | 0.006171
-  73 |  5962 | 19383 | 0.005429
-  74 | 10485 | 19384 | 0.047276
-  75 | 10459 | 19385 | 0.052864
-  76 |  7579 | 19386 | 0.052378
-  77 | 10455 | 19387 | 0.052414
-  78 |  5805 | 19388 | 0.081956
-  79 | 10462 | 19389 | 0.016974
-  80 |  8768 | 12598 | 0.059630
-  81 |  8767 | 19290 | 0.117748
-  82 | 10470 | 19289 | 0.065769
-  83 | 10469 | 19288 | 0.066230
-  84 | 10468 | 19287 | 0.111281
-  85 |  9967 | 16642 | 0.029056
-  86 |  9956 | 16621 | 0.014614
-  87 |  9938 | 16626 | 0.007036
-  88 |  9960 | 16649 | 0.081206
-  89 |  9968 | 16650 | 0.012230
-  90 |  9969 | 16647 | 0.012368
-  91 |  5457 |  6266 | 0.055134
-  92 |  5458 |  6267 | 0.053860
-  93 |  5459 |  6268 | 0.109859
-  94 |  5460 |  6269 | 0.104952
-  95 |  5461 |  6270 | 0.053766
-  96 |  5462 |  6271 | 0.046800
-  97 |  5463 | 12897 | 0.170300
-  98 |  8880 | 15060 | 0.049014
-  99 |  7101 | 15059 | 0.047811
- 100 |  9313 | 15058 | 0.044674
- 101 |  6733 |    -1 | 0.000000
-(101 rows)
-
---q2
-SELECT seq, node, edge, round(cost::numeric, 6)  FROM
-  pgr_bdDijkstra('SELECT * FROM bdd_ways', 6585, 8247, true);
- seq | node  | edge  |  round   
------+-------+-------+----------
-   1 |  6585 | 17975 | 0.200230
-   2 |  5367 | 17976 | 0.155428
-   3 |  7125 | 17977 | 0.178581
-   4 |   613 | 17978 | 0.175712
-   5 | 10025 | 17979 | 0.173776
-   6 |  5802 |  6758 | 0.013489
-   7 |  5803 |  6759 | 0.065176
-   8 |  5804 |  6760 | 0.008679
-   9 |  5805 |  6761 | 0.145097
-  10 |  5806 |  6762 | 0.146807
-  11 |  5807 |  6763 | 0.097186
-  12 |  5808 |  6764 | 0.050569
-  13 |  5809 | 20663 | 0.169650
-  14 |  4620 | 20662 | 0.023243
-  15 |  5774 | 20661 | 0.120390
-  16 |  6482 | 20660 | 0.002769
-  17 |  5957 | 20659 | 0.087952
-  18 |  8289 | 20658 | 0.048701
-  19 | 10884 | 20657 | 0.009212
-  20 | 10883 | 20656 | 0.080500
-  21 |  9954 | 20655 | 0.075280
-  22 |  4390 | 16876 | 0.147691
-  23 |  9203 | 17805 | 0.063931
-  24 |  7892 | 17804 | 0.015429
-  25 |  8417 | 17803 | 0.069119
-  26 | 10171 | 17802 | 0.075825
-  27 |  9953 | 17801 | 0.045079
-  28 |  8859 | 17800 | 0.029389
-  29 |  8536 | 17799 | 0.072658
-  30 | 10180 | 17798 | 0.076558
-  31 |  9592 | 17797 | 0.027637
-  32 |  9318 | 17796 | 0.114755
-  33 | 10179 | 17795 | 0.007150
-  34 | 10178 | 17794 | 0.087467
-  35 |  8402 | 17793 | 0.062258
-  36 |  6179 | 17792 | 0.109483
-  37 |  8508 | 17791 | 0.036248
-  38 |  3305 | 17790 | 0.069816
-  39 |  8512 | 17789 | 0.064158
-  40 |   998 | 17807 | 0.471312
-  41 |  2698 |  2743 | 0.102019
-  42 |  2563 |  9039 | 0.341756
-  43 |  2043 |  9040 | 0.587619
-  44 |  4280 |  9041 | 0.145996
-  45 |  2317 |  9042 | 0.268754
-  46 |  7135 |  9043 | 0.121251
-  47 |  4276 |  9044 | 0.145396
-  48 |  6167 |  9045 | 0.583394
-  49 |  7136 |  9046 | 0.043099
-  50 |  7137 | 19345 | 0.053510
-  51 | 10475 | 19344 | 0.015153
-  52 | 10142 | 19343 | 0.064475
-  53 | 10140 | 17566 | 0.135370
-  54 |  8539 | 17565 | 0.057338
-  55 | 10138 | 17558 | 0.064893
-  56 |  6943 | 17559 | 0.201703
-  57 |  8140 | 17560 | 0.469613
-  58 | 10139 | 20189 | 0.060217
-  59 | 10705 | 20185 | 0.055053
-  60 |  8247 |    -1 | 0.000000
-(60 rows)
-
---q3
-SELECT seq, node, edge, round(cost::numeric, 6)  FROM
-  pgr_bdDijkstra('SELECT * FROM bdd_ways', 9426, 3606, true);
- seq | node | edge  |  round   
------+------+-------+----------
-   1 | 9426 | 14822 | 0.060319
-   2 | 3606 |    -1 | 0.000000
-(2 rows)
-
---q4
-SELECT seq, node, edge, round(cost::numeric, 6)  FROM
-  pgr_bdDijkstra('SELECT * FROM bdd_ways', 3606, 9426, true);
- seq | node | edge  |  round   
------+------+-------+----------
-   1 | 3606 | 14822 | 0.060319
-   2 | 9426 |    -1 | 0.000000
-(2 rows)
-
---q5
-SELECT seq, node, edge, round(cost::numeric, 6)  FROM
-  pgr_bdDijkstra('SELECT * FROM bdd_ways', 6733, 5700, true);
- seq | node  | edge  |  round   
------+-------+-------+----------
-   1 |  6733 | 15058 | 0.044674
-   2 |  9313 | 15059 | 0.047811
-   3 |  7101 | 15060 | 0.049014
-   4 |  8880 | 12897 | 0.170300
-   5 |  5463 |  6271 | 0.046800
-   6 |  5462 |  6270 | 0.053766
-   7 |  5461 |  6269 | 0.104952
-   8 |  5460 |  6268 | 0.109859
-   9 |  5459 |  6267 | 0.053860
-  10 |  5458 |  6266 | 0.055134
-  11 |  5457 | 16647 | 0.012368
-  12 |  9969 | 16650 | 0.012230
-  13 |  9968 | 16649 | 0.081206
-  14 |  9960 | 16626 | 0.007036
-  15 |  9938 | 16621 | 0.014614
-  16 |  9956 | 16642 | 0.029056
-  17 |  9967 | 19287 | 0.111281
-  18 | 10468 | 19288 | 0.066230
-  19 | 10469 | 19289 | 0.065769
-  20 | 10470 | 19290 | 0.117748
-  21 |  8767 | 12598 | 0.059630
-  22 |  8768 | 19389 | 0.016974
-  23 | 10462 | 19388 | 0.081956
-  24 |  5805 | 19387 | 0.052414
-  25 | 10455 | 19386 | 0.052378
-  26 |  7579 | 19385 | 0.052864
-  27 | 10459 | 19384 | 0.047276
-  28 | 10485 | 19383 | 0.005429
-  29 |  5962 | 19382 | 0.006171
-  30 | 10484 | 19381 | 0.098919
-  31 |  3002 | 19380 | 0.108243
-  32 |  4397 | 19379 | 0.102702
-  33 |  9194 | 19378 | 0.009782
-  34 | 10482 | 19377 | 0.096140
-  35 | 10174 | 19376 | 0.107643
-  36 |  8634 | 19375 | 0.102428
-  37 |  9595 | 19374 | 0.106794
-  38 |  8509 | 19360 | 0.051709
-  39 |  9948 | 19359 | 0.051651
-  40 | 10479 | 19358 | 0.059093
-  41 |  9949 | 19357 | 0.047698
-  42 |  3170 | 11899 | 0.018103
-  43 |  8468 | 15487 | 0.034042
-  44 |  9624 | 16983 | 0.022924
-  45 |  8467 | 16982 | 0.022635
-  46 | 10046 | 16981 | 0.045667
-  47 |  8583 | 15477 | 0.113487
-  48 |  8311 | 15478 | 0.019312
-  49 |  2808 | 15479 | 0.209882
-  50 |  9621 | 15480 | 0.016198
-  51 |  8522 | 15481 | 0.180992
-  52 |  8465 | 11894 | 0.046805
-  53 |  8457 | 11882 | 0.101185
-  54 |  1807 | 11883 | 0.064572
-  55 |  8456 | 11880 | 0.048821
-  56 |  8455 | 11878 | 0.083250
-  57 |  8452 | 11871 | 0.118857
-  58 |  8450 | 11867 | 0.005677
-  59 |   529 | 11868 | 0.196533
-  60 |   476 | 11869 | 0.006925
-  61 |  8451 | 13167 | 0.070884
-  62 |  8985 | 13148 | 0.014323
-  63 |  8986 | 13149 | 0.069498
-  64 |  8496 | 13150 | 0.120005
-  65 |   398 | 13151 | 0.057786
-  66 |  8987 | 13152 | 0.099744
-  67 |   637 | 13153 | 0.083288
-  68 |  6436 | 13154 | 0.057101
-  69 |    21 | 13155 | 0.079185
-  70 |  8988 | 13156 | 0.006317
-  71 |  8989 | 13157 | 0.118340
-  72 |  1285 | 13158 | 0.071931
-  73 |  2962 | 13159 | 0.018649
-  74 |  8991 | 13160 | 0.187353
-  75 |  8992 | 13161 | 0.099016
-  76 |  8351 | 13162 | 0.009638
-  77 |  8993 | 13163 | 0.069895
-  78 |  8976 | 13164 | 0.008029
-  79 |  8977 | 13165 | 0.012931
-  80 |  8994 | 13827 | 0.010639
-  81 |  9205 | 13828 | 0.117213
-  82 |  8304 | 13829 | 0.032840
-  83 |  6774 | 13830 | 0.196045
-  84 |  3753 | 13831 | 0.009169
-  85 |  8325 | 12990 | 0.013157
-  86 |  8908 | 20794 | 0.013276
-  87 | 10948 | 20835 | 0.071114
-  88 | 10929 | 20778 | 0.006447
-  89 |  8910 | 20779 | 0.008539
-  90 | 10944 | 20833 | 0.177477
-  91 | 10951 | 20811 | 0.004532
-  92 |  7034 | 20812 | 0.005045
-  93 | 10952 | 20841 | 0.187594
-  94 | 10940 | 20771 | 0.007463
-  95 |  3415 | 20772 | 0.005720
-  96 | 10941 | 20776 | 0.040800
-  97 | 10943 | 20796 | 0.002581
-  98 |  7661 | 20797 | 0.002564
-  99 | 10931 | 20756 | 0.040876
- 100 | 10932 | 20787 | 0.006774
- 101 |  5700 |    -1 | 0.000000
-(101 rows)
-
---q6
-SELECT seq, node, edge, round(cost::numeric, 6)  FROM
-  pgr_bdDijkstra('SELECT * FROM bdd_ways', 8247, 6585, true);
- seq | node  | edge  |  round   
------+-------+-------+----------
-   1 |  8247 | 20185 | 0.055053
-   2 | 10705 | 20189 | 0.060217
-   3 | 10139 | 17560 | 0.469613
-   4 |  8140 | 17559 | 0.201703
-   5 |  6943 | 17558 | 0.064893
-   6 | 10138 | 17565 | 0.057338
-   7 |  8539 | 17566 | 0.135370
-   8 | 10140 | 19343 | 0.064475
-   9 | 10142 | 19344 | 0.015153
-  10 | 10475 | 19345 | 0.053510
-  11 |  7137 |  9046 | 0.043099
-  12 |  7136 |  9045 | 0.583394
-  13 |  6167 |  9044 | 0.145396
-  14 |  4276 |  9043 | 0.121251
-  15 |  7135 |  9042 | 0.268754
-  16 |  2317 |  9041 | 0.145996
-  17 |  4280 |  9040 | 0.587619
-  18 |  2043 |  9039 | 0.341756
-  19 |  2563 |  2743 | 0.102019
-  20 |  2698 | 17807 | 0.471312
-  21 |   998 | 17789 | 0.064158
-  22 |  8512 | 17790 | 0.069816
-  23 |  3305 | 17791 | 0.036248
-  24 |  8508 | 17792 | 0.109483
-  25 |  6179 | 17793 | 0.062258
-  26 |  8402 | 17794 | 0.087467
-  27 | 10178 | 17795 | 0.007150
-  28 | 10179 | 17796 | 0.114755
-  29 |  9318 | 17797 | 0.027637
-  30 |  9592 | 17798 | 0.076558
-  31 | 10180 | 17799 | 0.072658
-  32 |  8536 | 17800 | 0.029389
-  33 |  8859 | 17801 | 0.045079
-  34 |  9953 | 17802 | 0.075825
-  35 | 10171 | 17803 | 0.069119
-  36 |  8417 | 17804 | 0.015429
-  37 |  7892 | 17805 | 0.063931
-  38 |  9203 | 16876 | 0.147691
-  39 |  4390 | 20655 | 0.075280
-  40 |  9954 | 20656 | 0.080500
-  41 | 10883 | 20657 | 0.009212
-  42 | 10884 | 20658 | 0.048701
-  43 |  8289 | 20659 | 0.087952
-  44 |  5957 | 20660 | 0.002769
-  45 |  6482 | 20661 | 0.120390
-  46 |  5774 | 20662 | 0.023243
-  47 |  4620 | 20663 | 0.169650
-  48 |  5809 |  6764 | 0.050569
-  49 |  5808 |  6763 | 0.097186
-  50 |  5807 |  6762 | 0.146807
-  51 |  5806 |  6761 | 0.145097
-  52 |  5805 |  6760 | 0.008679
-  53 |  5804 |  6759 | 0.065176
-  54 |  5803 |  6758 | 0.013489
-  55 |  5802 | 17979 | 0.173776
-  56 | 10025 | 17978 | 0.175712
-  57 |   613 | 17977 | 0.178581
-  58 |  7125 | 17976 | 0.155428
-  59 |  5367 | 17975 | 0.200230
-  60 |  6585 |    -1 | 0.000000
-(60 rows)
-
-ROLLBACK;
-ROLLBACK
diff --git a/src/bdDijkstra/test/doc-pgr_bdDijkstra.result b/src/bdDijkstra/test/doc-pgr_bdDijkstra.result
deleted file mode 100644
index 203ae8b..0000000
--- a/src/bdDijkstra/test/doc-pgr_bdDijkstra.result
+++ /dev/null
@@ -1,119 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- q1
-SELECT * FROM pgr_bdDijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, 3
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    2 |    4 |    1 |        0
-   2 |        2 |    5 |    8 |    1 |        1
-   3 |        3 |    6 |    9 |    1 |        2
-   4 |        4 |    9 |   16 |    1 |        3
-   5 |        5 |    4 |    3 |    1 |        4
-   6 |        6 |    3 |   -1 |    0 |        5
-(6 rows)
-
--- q2
-SELECT * FROM pgr_bdDijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, 3,
-    false
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    2 |    2 |    1 |        0
-   2 |        2 |    3 |   -1 |    0 |        1
-(2 rows)
-
--- q3
-SELECT * FROM pgr_bdDijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, ARRAY[3, 11]);
- seq | path_seq | end_vid | node | edge | cost | agg_cost 
------+----------+---------+------+------+------+----------
-   1 |        1 |       3 |    2 |    4 |    1 |        0
-   2 |        2 |       3 |    5 |    8 |    1 |        1
-   3 |        3 |       3 |    6 |    9 |    1 |        2
-   4 |        4 |       3 |    9 |   16 |    1 |        3
-   5 |        5 |       3 |    4 |    3 |    1 |        4
-   6 |        6 |       3 |    3 |   -1 |    0 |        5
-   7 |        1 |      11 |    2 |    4 |    1 |        0
-   8 |        2 |      11 |    5 |    8 |    1 |        1
-   9 |        3 |      11 |    6 |   11 |    1 |        2
-  10 |        4 |      11 |   11 |   -1 |    0 |        3
-(10 rows)
-
--- q4
-SELECT * FROM pgr_bdDijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[2, 7], 3);
- seq | path_seq | start_vid | node | edge | cost | agg_cost 
------+----------+-----------+------+------+------+----------
-   1 |        1 |         2 |    2 |    4 |    1 |        0
-   2 |        2 |         2 |    5 |    8 |    1 |        1
-   3 |        3 |         2 |    6 |    9 |    1 |        2
-   4 |        4 |         2 |    9 |   16 |    1 |        3
-   5 |        5 |         2 |    4 |    3 |    1 |        4
-   6 |        6 |         2 |    3 |   -1 |    0 |        5
-   7 |        1 |         7 |    7 |    6 |    1 |        0
-   8 |        2 |         7 |    8 |    7 |    1 |        1
-   9 |        3 |         7 |    5 |    8 |    1 |        2
-  10 |        4 |         7 |    6 |    9 |    1 |        3
-  11 |        5 |         7 |    9 |   16 |    1 |        4
-  12 |        6 |         7 |    4 |    3 |    1 |        5
-  13 |        7 |         7 |    3 |   -1 |    0 |        6
-(13 rows)
-
--- q5
-SELECT * FROM pgr_bdDijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[2, 7], ARRAY[3, 11]);
- seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost 
------+----------+-----------+---------+------+------+------+----------
-   1 |        1 |         2 |       3 |    2 |    4 |    1 |        0
-   2 |        2 |         2 |       3 |    5 |    8 |    1 |        1
-   3 |        3 |         2 |       3 |    6 |    9 |    1 |        2
-   4 |        4 |         2 |       3 |    9 |   16 |    1 |        3
-   5 |        5 |         2 |       3 |    4 |    3 |    1 |        4
-   6 |        6 |         2 |       3 |    3 |   -1 |    0 |        5
-   7 |        1 |         2 |      11 |    2 |    4 |    1 |        0
-   8 |        2 |         2 |      11 |    5 |    8 |    1 |        1
-   9 |        3 |         2 |      11 |    6 |   11 |    1 |        2
-  10 |        4 |         2 |      11 |   11 |   -1 |    0 |        3
-  11 |        1 |         7 |       3 |    7 |    6 |    1 |        0
-  12 |        2 |         7 |       3 |    8 |    7 |    1 |        1
-  13 |        3 |         7 |       3 |    5 |    8 |    1 |        2
-  14 |        4 |         7 |       3 |    6 |    9 |    1 |        3
-  15 |        5 |         7 |       3 |    9 |   16 |    1 |        4
-  16 |        6 |         7 |       3 |    4 |    3 |    1 |        5
-  17 |        7 |         7 |       3 |    3 |   -1 |    0 |        6
-  18 |        1 |         7 |      11 |    7 |    6 |    1 |        0
-  19 |        2 |         7 |      11 |    8 |    7 |    1 |        1
-  20 |        3 |         7 |      11 |    5 |   10 |    1 |        2
-  21 |        4 |         7 |      11 |   10 |   12 |    1 |        3
-  22 |        5 |         7 |      11 |   11 |   -1 |    0 |        4
-(22 rows)
-
--- q6
-SELECT * FROM pgr_bdDijkstra(
-    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT FROM edge_table',
-    2, 3,
-    false, 
-    false  
-);
-NOTICE:  Deprecated Signature of pgr_bdDijkstra
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |   2 |   4 |    1
-   1 |   5 |   8 |    1
-   2 |   6 |   5 |    1
-   3 |   3 |  -1 |    0
-(4 rows)
-
--- q7
-ROLLBACK;
-ROLLBACK
diff --git a/src/bdDijkstra/test/doc-pgr_bdDijkstraCost.result b/src/bdDijkstra/test/doc-pgr_bdDijkstraCost.result
deleted file mode 100644
index fa75c07..0000000
--- a/src/bdDijkstra/test/doc-pgr_bdDijkstraCost.result
+++ /dev/null
@@ -1,60 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- q1
-SELECT * FROM pgr_bdDijkstraCost(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, 3
-);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         2 |       3 |        5
-(1 row)
-
--- q2
-SELECT * FROM pgr_bdDijkstraCost(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, 3,
-    false
-);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         2 |       3 |        1
-(1 row)
-
--- q3
-SELECT * FROM pgr_bdDijkstraCost(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, ARRAY[3, 11]);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         2 |       3 |        5
-         2 |      11 |        3
-(2 rows)
-
--- q4
-SELECT * FROM pgr_bdDijkstraCost(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[2, 7], 3);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         2 |       3 |        5
-         7 |       3 |        6
-(2 rows)
-
--- q5
-SELECT * FROM pgr_bdDijkstraCost(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[2, 7], ARRAY[3, 11]);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         2 |       3 |        5
-         2 |      11 |        3
-         7 |       3 |        6
-         7 |      11 |        4
-(4 rows)
-
--- q6
-ROLLBACK;
-ROLLBACK
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
new file mode 100644
index 0000000..b90b34e
--- /dev/null
+++ b/src/common/CMakeLists.txt
@@ -0,0 +1,31 @@
+ADD_LIBRARY(common OBJECT
+    postgres_connection.c
+    e_report.c
+    #restrict_input.c
+    basePath_SSEC.cpp
+
+    points_input.c
+    matrixRows_input.c
+    get_check_data.c
+    edges_input.c
+    orders_input.c
+    orders_input.c
+    vehicles_input.c
+
+    restrictions_input.c
+
+    coordinates_input.c
+    arrays_input.c
+    check_parameters.c
+
+    time_msg.c
+    pgr_assert.cpp
+    identifier.cpp
+
+    basic_vertex.cpp
+    xy_vertex.cpp
+    ch_vertex.cpp
+    ch_edge.cpp
+    basic_edge.cpp
+    pgr_alloc.cpp
+    )
diff --git a/src/common/arrays_input.c b/src/common/arrays_input.c
new file mode 100644
index 0000000..d4f5e76
--- /dev/null
+++ b/src/common/arrays_input.c
@@ -0,0 +1,132 @@
+/*PGR-GNU*****************************************************************
+File: arrays_input.c
+
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+vicky_vergara at hotmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "c_common/arrays_input.h"
+
+#include <assert.h>
+#include "utils/lsyscache.h"
+#include "catalog/pg_type.h"
+
+
+#include "c_common/time_msg.h"
+#include "c_common/debug_macro.h"
+
+static
+int64_t*
+pgr_get_bigIntArr(ArrayType *v, size_t *arrlen, bool allow_empty) {
+    clock_t start_t = clock();
+    int64_t *c_array = NULL;;
+
+    Oid     element_type = ARR_ELEMTYPE(v);
+    int    *dim = ARR_DIMS(v);
+    int     ndim = ARR_NDIM(v);
+    int     nitems = ArrayGetNItems(ndim, dim);
+    Datum  *elements;
+    bool   *nulls;
+    int16   typlen;
+    bool    typbyval;
+    char    typalign;
+
+    assert((*arrlen) == 0);
+
+
+    if (allow_empty && (ndim == 0 || nitems <= 0)) {
+        PGR_DBG("ndim %i nitems % i", ndim, nitems);
+        return (int64_t*) NULL;
+    }
+    /* the array is not empty*/
+
+    if (ndim != 1) {
+        elog(ERROR, "One dimension expected");
+        return (int64_t*)NULL;
+    }
+
+    if (nitems <= 0) {
+        elog(ERROR, "No elements found");
+        return (int64_t*)NULL;
+    }
+
+    get_typlenbyvalalign(element_type,
+            &typlen, &typbyval, &typalign);
+
+    /* validate input data type */
+    switch (element_type) {
+        case INT2OID:
+        case INT4OID:
+        case INT8OID:
+            break;
+        default:
+            elog(ERROR, "Expected array of ANY-INTEGER");
+            return (int64_t*)NULL;
+            break;
+    }
+
+    deconstruct_array(v, element_type, typlen, typbyval,
+            typalign, &elements, &nulls,
+            &nitems);
+
+    c_array = (int64_t *) palloc(sizeof(int64_t) * (size_t)nitems);
+    if (!c_array) {
+        elog(ERROR, "Out of memory!");
+    }
+
+
+    int i;
+    for (i = 0; i < nitems; i++) {
+        if (nulls[i]) {
+            pfree(c_array);
+            elog(ERROR, "NULL value found in Array!");
+        } else {
+            switch (element_type) {
+                case INT2OID:
+                    c_array[i] = (int64_t) DatumGetInt16(elements[i]);
+                    break;
+                case INT4OID:
+                    c_array[i] = (int64_t) DatumGetInt32(elements[i]);
+                    break;
+                case INT8OID:
+                    c_array[i] = DatumGetInt64(elements[i]);
+                    break;
+            }
+        }
+    }
+    (*arrlen) = (size_t)nitems;
+
+    pfree(elements);
+    pfree(nulls);
+    PGR_DBG("Array size %ld", (*arrlen));
+    time_msg("reading Array", start_t, clock());
+    return c_array;
+}
+
+
+int64_t* pgr_get_bigIntArray(size_t *arrlen, ArrayType *input) {
+    return pgr_get_bigIntArr(input, arrlen, false);
+}
+
+
+
+int64_t* pgr_get_bigIntArray_allowEmpty(size_t *arrlen, ArrayType *input) {
+    return pgr_get_bigIntArr(input, arrlen, true);
+}
diff --git a/src/common/basePath_SSEC.cpp b/src/common/basePath_SSEC.cpp
new file mode 100644
index 0000000..4d82217
--- /dev/null
+++ b/src/common/basePath_SSEC.cpp
@@ -0,0 +1,342 @@
+/*PGR-GNU*****************************************************************
+File: basePath_SSEC.cpp
+
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+vicky_vergara at hotmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+
+********************************************************************PGR-GNU*/
+
+#include "cpp_common/basePath_SSEC.hpp"
+
+#include <deque>
+#include <iostream>
+#include <algorithm>
+#include <utility>
+
+#include "c_types/general_path_element_t.h"
+#include "cpp_common/pgr_assert.h"
+
+
+Path& Path::renumber_vertices(int64_t value) {
+    for (auto &r : path) {
+        r.node += value;
+    }
+    m_start_id += value;
+    m_end_id += value;
+    return *this;
+}
+
+void Path::push_front(Path_t data) {
+    path.push_front(data);
+    m_tot_cost += data.cost;
+}
+
+void Path::push_back(Path_t data) {
+    path.push_back(data);
+    m_tot_cost += data.cost;
+}
+
+void Path::reverse() {
+    std::swap(m_start_id, m_end_id);
+    if (path.size() <= 1) return;
+    std::deque< Path_t > newpath;
+    for (size_t i = 0; i < path.size(); ++i) {
+        newpath.push_front({
+                path[i].node,
+                (i == 0? -1 : path[i - 1].edge),
+                (i == 0? 0 : path[i - 1].cost),
+                0
+                });
+    }
+    for (size_t i = 0; i < newpath.size(); ++i) {
+        newpath[i].agg_cost = (i == 0)?
+            0 :
+            newpath[i - 1].agg_cost +  newpath[i - 1].cost;
+    }
+    path = newpath;
+}
+
+void Path::recalculate_agg_cost() {
+    m_tot_cost = 0;
+    for (auto &p : path) {
+        p.agg_cost = m_tot_cost;
+        m_tot_cost += p.cost;
+    }
+}
+
+
+
+void Path::clear() {
+    path.clear();
+    m_tot_cost = 0;
+    m_start_id = 0;
+    m_end_id = 0;
+}
+
+std::ostream& operator<<(std::ostream &log, const Path &path) {
+    log << "Path: " << path.start_id() << " -> " << path.end_id() << "\n"
+        << "seq\tnode\tedge\tcost\tagg_cost\n";
+    int64_t i = 0;
+    for (const auto &e : path) {
+        log << i << "\t"
+            << e.node << "\t"
+            << e.edge << "\t"
+            << e.cost << "\t"
+            << e.agg_cost << "\n";
+        ++i;
+    }
+    return log;
+}
+
+
+
+Path Path::getSubpath(unsigned int j) const {
+    Path result(start_id(), end_id());
+    if (j == 0)  return result;
+    for (auto i = path.begin(); i != path.begin() + j; ++i) {
+        result.push_back((*i));
+    }
+    pgassert(result.tot_cost() != 0);
+    pgassert(this->tot_cost() != 0);
+    return result;
+}
+
+
+bool Path::isEqual(const Path &subpath) const {
+    if (subpath.empty()) return true;
+    if (subpath.size() >= path.size()) return false;
+    std::deque< Path_t >::const_iterator i, j;
+    for (i = path.begin(),  j = subpath.begin();
+            j != subpath.end();
+            ++i, ++j)
+        if ((*i).node != (*j).node) return false;
+    return true;
+}
+
+void Path::appendPath(const Path &o_path) {
+    path.insert(path.end(), o_path.path.begin(), o_path.path.end());
+    m_tot_cost +=  o_path.m_tot_cost;
+}
+
+
+/*!
+ 
+    Path: 2 -> 9
+    seq   node    edge    cost    agg_cost
+    0     2       4       1       0
+    1     5       8       1       1
+    2     6       9       1       2
+    3     9       -1      0       3
+    Path: 9 -> 3
+    seq   node    edge    cost    agg_cost
+    0     9       16      1       0
+    1     4       3       1       1
+    2     3       -1      0       2
+    Path: 2 -> 3
+    seq   node    edge    cost    agg_cost
+    0     2       4       1       0
+    1     5       8       1       1
+    2     6       9       1       2
+    3     9       16      1       3
+    4     4       3       1       4
+    5     3       -1      0       5
+
+ */
+void Path::append(const Path &other) {
+    pgassert(m_end_id == other.m_start_id);
+    if (other.m_start_id == other.m_end_id) {
+        pgassert(other.path.empty());
+        return;
+    }
+    if (m_start_id == m_end_id) {
+        pgassert(path.empty());
+        *this = other;
+        return;
+    }
+#if 0
+    pgassert(path.back().cost == 0);
+#endif
+    pgassert(path.back().edge == -1);
+    m_end_id = other.m_end_id;
+
+    auto last = path.back();
+    auto agg_cost = last.agg_cost;
+
+    path.pop_back();
+
+    for (auto item : other.path) {
+        item.agg_cost += agg_cost;
+        push_back(item);
+    }
+}
+
+
+void Path::generate_postgres_data(
+        General_path_element_t **postgres_data,
+        size_t &sequence) const {
+    int i = 1;
+    double total_cost = 0;
+    for (const auto e : path) {
+        (*postgres_data)[sequence] =
+        {i, start_id(), end_id(), e.node, e.edge, e.cost, e.agg_cost};
+        total_cost += e.cost;
+        ++i;
+        ++sequence;
+    }
+}
+
+/* used by driving distance */
+void Path::get_pg_dd_path(
+        General_path_element_t **ret_path,
+        size_t &sequence) const {
+    for (unsigned int i = 0; i < path.size(); i++) {
+        (*ret_path)[sequence].seq = i;
+        (*ret_path)[sequence].start_id = start_id();
+        (*ret_path)[sequence].end_id = start_id();
+        (*ret_path)[sequence].node = path[i].node;
+        (*ret_path)[sequence].edge = path[i].edge;
+        (*ret_path)[sequence].cost = path[i].cost;
+        (*ret_path)[sequence].agg_cost = path[i].agg_cost;
+        sequence++;
+    }
+}
+
+/* used by ksp */
+void Path::get_pg_ksp_path(
+        General_path_element_t **ret_path,
+        size_t &sequence, int routeId) const {
+    for (unsigned int i = 0; i < path.size(); i++) {
+        (*ret_path)[sequence].seq = i + 1;
+        (*ret_path)[sequence].start_id = routeId;
+        (*ret_path)[sequence].end_id = end_id();
+        (*ret_path)[sequence].node = path[i].node;
+        (*ret_path)[sequence].edge = path[i].edge;
+        (*ret_path)[sequence].cost = path[i].cost;
+        (*ret_path)[sequence].agg_cost = (i == 0)?
+            0 :
+            (*ret_path)[sequence-1].agg_cost +  path[i-1].cost;
+        sequence++;
+    }
+}
+
+
+/** @brief Sorts a path by node, aggcost ascending
+ *
+ * nodes ASC
+ * agg_cost ASC
+ */
+void
+Path::sort_by_node_agg_cost() {
+    std::sort(path.begin(), path.end(),
+            [](const Path_t &l, const  Path_t &r)
+            {return l.node < r.node;});
+    std::stable_sort(path.begin(), path.end(),
+            [](const Path_t &l, const  Path_t &r)
+            {return l.agg_cost < r.agg_cost;});
+}
+
+/*
+ * FRIENDS
+ */
+
+
+size_t
+collapse_paths(
+        General_path_element_t **ret_path,
+        const std::deque< Path > &paths) {
+    size_t sequence = 0;
+    for (const Path &path : paths) {
+        if (path.path.size() > 0)
+            path.generate_postgres_data(ret_path, sequence);
+    }
+    return sequence;
+}
+
+/*
+ * sort the paths by size from greater to smaller
+ *        and sort each path by node
+ * all the nodes on p2 are going to be compared
+ * with the nodes of p1
+ *
+ * When both paths reach the node and p1.agg_cost > p2.agg_cost
+ *    erase the node of p1
+ *    (can't erase from p2 because we loose the iterators
+ *     so in a future cycle it will be deleted)
+ *
+ * sort the paths by start_id,
+ */
+
+void
+equi_cost(std::deque< Path > &paths) {
+    /* sort paths by size: largest first */
+    std::sort(paths.begin(), paths.end(),
+            [](const Path &e1, const Path &e2)->bool {
+            return e2.size() < e1.size();
+            });
+
+    /* sort each path by node: smaller id first */
+    for (auto &p : paths) {
+        if (p.size() < 2) continue;
+        std::sort(p.begin(), p.end(),
+                [](const Path_t &e1, const Path_t &e2)->bool {
+                return e1.node < e2.node;
+                });
+    }
+
+    for (auto &p1 : paths) {
+        for (const auto &p2 : paths) {
+            if (p1.start_id() == p2.start_id()) continue;
+            for (const auto &stop : p2.path) {
+                /* find the node of p2 in p1 */
+                auto pos = lower_bound(p1.begin(), p1.end(), stop,
+                        [](const Path_t &l, const Path_t &r)->bool {
+                        return l.node < r.node;
+                        });
+
+                if (pos != p1.end()
+                        && (stop.node == pos->node)
+                        && (stop.agg_cost < pos->agg_cost)) {
+                    /* both share the same node &
+                     * the second path has the smallest
+                     *  So erasing from the first path */
+                    p1.erase(pos);
+                }
+            }
+        }
+    }
+    /* sort paths by start_id */
+    std::sort(paths.begin(), paths.end(),
+            [](const Path &e1, const Path &e2)->bool {
+            return e1.start_id() < e2.start_id();
+            });
+
+    /* sort each path by agg_cost, node */
+    for (auto &path : paths) {
+        path.sort_by_node_agg_cost();
+    }
+}
+
+
+size_t
+count_tuples(const std::deque< Path > &paths) {
+    size_t count(0);
+    for (const Path &e : paths) {
+        count += e.path.size();
+    }
+    return count;
+}
diff --git a/src/common/src/basic_edge.cpp b/src/common/basic_edge.cpp
similarity index 100%
rename from src/common/src/basic_edge.cpp
rename to src/common/basic_edge.cpp
diff --git a/src/common/src/basic_vertex.cpp b/src/common/basic_vertex.cpp
similarity index 100%
rename from src/common/src/basic_vertex.cpp
rename to src/common/basic_vertex.cpp
diff --git a/src/common/ch_edge.cpp b/src/common/ch_edge.cpp
new file mode 100644
index 0000000..37fd5fb
--- /dev/null
+++ b/src/common/ch_edge.cpp
@@ -0,0 +1,77 @@
+/*PGR-GNU*****************************************************************
+File: ch_edge.cpp
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer: 
+Copyright (c) 2016 Rohith Reddy
+Mail: 
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ ********************************************************************PGR-GNU*/
+
+#include "cpp_common/ch_edge.h"
+
+namespace pgrouting {
+
+void
+CH_edge::cp_members(const CH_edge &other) {
+    this->cost = other.cost;
+    this->id = other.id;
+    this->m_contracted_vertices += other.contracted_vertices();
+}
+
+
+bool
+CH_edge::has_contracted_vertices() const {
+    return !m_contracted_vertices.empty();
+}
+
+const Identifiers<int64_t>&
+CH_edge::contracted_vertices() const {
+    return m_contracted_vertices;
+}
+
+
+void
+CH_edge::add_contracted_vertex(CH_vertex& v, int64_t vid) {
+    m_contracted_vertices += vid;
+    m_contracted_vertices += v.contracted_vertices();
+    v.clear_contracted_vertices();
+}
+
+void
+CH_edge::add_contracted_edge_vertices(CH_edge &e) {
+    m_contracted_vertices += e.contracted_vertices();
+    e.clear_contracted_vertices();
+}
+
+std::ostream& operator <<(std::ostream& os, const CH_edge& e) {
+    os << "{id: " << e.id << ",\t"
+        << "source: " << e.source << ",\t"
+        << "target: " << e.target << ",\t"
+        << "cost: " << e.cost << ",\t"
+        << "contracted vertices: "
+        << e.contracted_vertices()
+        << "}";
+    return os;
+}
+
+}  // namespace pgrouting
diff --git a/src/common/ch_vertex.cpp b/src/common/ch_vertex.cpp
new file mode 100644
index 0000000..105caea
--- /dev/null
+++ b/src/common/ch_vertex.cpp
@@ -0,0 +1,64 @@
+/*PGR-GNU*****************************************************************
+File: ch_vertex.cpp
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer: 
+Copyright (c) 2016 Rohith Reddy
+Mail: 
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ ********************************************************************PGR-GNU*/
+
+#include "cpp_common/ch_vertex.h"
+
+#include <algorithm>
+#include <vector>
+
+namespace pgrouting {
+
+
+const Identifiers<int64_t>&
+    CH_vertex::contracted_vertices() const {
+    return m_contracted_vertices;
+}
+
+
+bool CH_vertex::has_contracted_vertices() const {
+    if (m_contracted_vertices.size() == 0)
+        return false;
+    return true;
+}
+
+void CH_vertex::add_contracted_vertex(CH_vertex& v, int64_t vid) {
+    m_contracted_vertices += vid;
+    m_contracted_vertices += v.contracted_vertices();
+    v.clear_contracted_vertices();
+}
+
+std::ostream& operator <<(std::ostream& os, const CH_vertex& v) {
+    os << "{id: " << v.id << ",\t"
+     << "contracted vertices: "
+     << v.contracted_vertices()
+     << "}";
+    return os;
+}
+
+}  // namespace pgrouting
diff --git a/src/common/check_parameters.c b/src/common/check_parameters.c
new file mode 100644
index 0000000..43a585c
--- /dev/null
+++ b/src/common/check_parameters.c
@@ -0,0 +1,54 @@
+/*PGR-GNU*****************************************************************
+File: astarOneToOne.c
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer: 
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+Mail: 
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "c_common/check_parameters.h"
+
+
+void
+check_parameters(
+        int heuristic,
+        double factor,
+        double epsilon) {
+    if (heuristic > 5 || heuristic < 0) {
+        ereport(ERROR,
+                (errmsg("Unknown heuristic"),
+                 errhint("Valid values: 0~5")));
+    }
+    if (factor <= 0) {
+        ereport(ERROR,
+                (errmsg("Factor value out of range"),
+                 errhint("Valid values: positive non zero")));
+    }
+    if (epsilon < 1) {
+        ereport(ERROR,
+                (errmsg("Epsilon value out of range"),
+                 errhint("Valid values: 1 or greater than 1")));
+    }
+}
+
diff --git a/src/common/coordinates_input.c b/src/common/coordinates_input.c
new file mode 100644
index 0000000..199b0a1
--- /dev/null
+++ b/src/common/coordinates_input.c
@@ -0,0 +1,146 @@
+/*PGR-GNU*****************************************************************
+File: matrixRows_input.c
+
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+vicky_vergara at hotmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "c_common/coordinates_input.h"
+
+#include "c_types/column_info_t.h"
+
+#include "c_common/debug_macro.h"
+#include "c_common/get_check_data.h"
+#include "c_common/time_msg.h"
+
+
+
+static
+void pgr_fetch_row(
+        HeapTuple *tuple,
+        TupleDesc *tupdesc,
+        Column_info_t info[3],
+        int64_t *default_id,
+        Coordinate_t *distance) {
+    if (column_found(info[0].colNumber)) {
+        distance->id = pgr_SPI_getBigInt(tuple, tupdesc, info[0]);
+    } else {
+        distance->id = *default_id;
+        ++(*default_id);
+    }
+    distance->x = pgr_SPI_getFloat8(tuple, tupdesc,  info[1]);
+    distance->y = pgr_SPI_getFloat8(tuple, tupdesc, info[2]);
+}
+
+/*!
+ * bigint id,
+ * float x,
+ * float y,
+ */
+void pgr_get_coordinates(
+        char *sql,
+        Coordinate_t **coordinates,
+        size_t *total_coordinates) {
+    clock_t start_t = clock();
+
+    const int tuple_limit = 1000000;
+
+    size_t ntuples;
+    size_t total_tuples = 0;
+
+    Column_info_t info[3];
+
+    int i;
+    for (i = 0; i < 3; ++i) {
+        info[i].colNumber = -1;
+        info[i].type = 0;
+        info[i].strict = true;
+        info[i].eType = ANY_NUMERICAL;
+    }
+    info[0].name = "id";
+    info[1].name = "x";
+    info[2].name = "y";
+
+    info[0].eType = ANY_INTEGER;
+    info[0].strict = false;
+
+
+    void *SPIplan;
+    SPIplan = pgr_SPI_prepare(sql);
+
+    Portal SPIportal;
+    SPIportal = pgr_SPI_cursor_open(SPIplan);
+
+
+    bool moredata = true;
+    (*total_coordinates) = total_tuples;
+
+    int64_t default_id = 1;
+
+    while (moredata == true) {
+        SPI_cursor_fetch(SPIportal, true, tuple_limit);
+        if (total_tuples == 0)
+            pgr_fetch_column_info(info, 3);
+
+        ntuples = SPI_processed;
+        total_tuples += ntuples;
+
+        if (ntuples > 0) {
+            if ((*coordinates) == NULL)
+                (*coordinates) = (Coordinate_t *)
+                    palloc0(total_tuples * sizeof(Coordinate_t));
+            else
+                (*coordinates) = (Coordinate_t *)
+                    repalloc((*coordinates),
+                            total_tuples * sizeof(Coordinate_t));
+
+            if ((*coordinates) == NULL) {
+                elog(ERROR, "Out of memory");
+            }
+
+            SPITupleTable *tuptable = SPI_tuptable;
+            TupleDesc tupdesc = SPI_tuptable->tupdesc;
+            PGR_DBG("Processing %ld coordinates tupĺes", ntuples);
+
+            size_t t;
+            for (t = 0; t < ntuples; t++) {
+                HeapTuple tuple = tuptable->vals[t];
+                pgr_fetch_row(&tuple, &tupdesc, info,
+                        &default_id,
+                        &(*coordinates)[total_tuples - ntuples + t]);
+            }
+            SPI_freetuptable(tuptable);
+        } else {
+            moredata = false;
+        }
+    }
+
+    SPI_cursor_close(SPIportal);
+
+
+    if (total_tuples == 0) {
+        (*total_coordinates) = 0;
+        PGR_DBG("NO coordinates");
+        return;
+    }
+
+    (*total_coordinates) = total_tuples;
+    time_msg(" reading coordinates:", start_t, clock());
+}
diff --git a/src/common/src/e_report.c b/src/common/e_report.c
similarity index 100%
rename from src/common/src/e_report.c
rename to src/common/e_report.c
diff --git a/src/common/edges_input.c b/src/common/edges_input.c
new file mode 100644
index 0000000..4b87e00
--- /dev/null
+++ b/src/common/edges_input.c
@@ -0,0 +1,606 @@
+/*PGR-GNU*****************************************************************
+File: edges_input.c
+
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+vicky_vergara at hotmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "c_common/edges_input.h"
+
+#include "c_types/column_info_t.h"
+
+#include "c_common/debug_macro.h"
+#include "c_common/get_check_data.h"
+#include "c_common/time_msg.h"
+
+static
+void fetch_basic_edge(
+    HeapTuple *tuple,
+    TupleDesc *tupdesc,
+    Column_info_t info[5],
+    int64_t *default_id,
+    pgr_basic_edge_t *edge,
+    size_t *valid_edges) {
+    if (column_found(info[0].colNumber)) {
+        edge->id = pgr_SPI_getBigInt(tuple, tupdesc, info[0]);
+    } else {
+        edge->id = *default_id;
+        ++(*default_id);
+    }
+
+    edge->source = pgr_SPI_getBigInt(tuple, tupdesc, info[1]);
+    edge->target = pgr_SPI_getBigInt(tuple, tupdesc, info[2]);
+    edge->going = pgr_SPI_getFloat8(tuple, tupdesc, info[3]) > 0 ?
+        true : false;
+    edge->coming = (column_found(info[4].colNumber)
+            && pgr_SPI_getFloat8(tuple, tupdesc, info[4]) > 0) ?
+        true : false;
+
+    (*valid_edges)++;
+}
+
+static
+void fetch_edge(
+        HeapTuple *tuple,
+        TupleDesc *tupdesc,
+        Column_info_t info[5],
+        int64_t *default_id,
+        float8 default_rcost,
+        pgr_edge_t *edge,
+        size_t *valid_edges,
+        bool normal) {
+    if (column_found(info[0].colNumber)) {
+        edge->id = pgr_SPI_getBigInt(tuple, tupdesc, info[0]);
+    } else {
+        edge->id = *default_id;
+        ++(*default_id);
+    }
+
+    if (normal) {
+        edge->source = pgr_SPI_getBigInt(tuple, tupdesc,  info[1]);
+        edge->target = pgr_SPI_getBigInt(tuple, tupdesc, info[2]);
+    } else {
+        edge->target = pgr_SPI_getBigInt(tuple, tupdesc,  info[1]);
+        edge->source = pgr_SPI_getBigInt(tuple, tupdesc, info[2]);
+    }
+
+    edge->cost = pgr_SPI_getFloat8(tuple, tupdesc, info[3]);
+
+    if (column_found(info[4].colNumber)) {
+        edge->reverse_cost = pgr_SPI_getFloat8(tuple, tupdesc, info[4]);
+    } else {
+        edge->reverse_cost = default_rcost;
+    }
+
+    *valid_edges = edge->cost < 0? *valid_edges: *valid_edges + 1;
+    *valid_edges = edge->reverse_cost < 0? *valid_edges: *valid_edges + 1;
+}
+
+static
+void fetch_edge_with_xy(
+        HeapTuple *tuple,
+        TupleDesc *tupdesc,
+        Column_info_t info[9],
+        int64_t *default_id,
+        float8 default_rcost,
+        Pgr_edge_xy_t *edge,
+        size_t *valid_edges,
+        bool normal) {
+    if (column_found(info[0].colNumber)) {
+        edge->id = pgr_SPI_getBigInt(tuple, tupdesc, info[0]);
+    } else {
+        edge->id = *default_id;
+        ++(*default_id);
+    }
+
+    if (normal) {
+        edge->source = pgr_SPI_getBigInt(tuple, tupdesc,  info[1]);
+        edge->target = pgr_SPI_getBigInt(tuple, tupdesc, info[2]);
+    } else {
+        edge->target = pgr_SPI_getBigInt(tuple, tupdesc,  info[1]);
+        edge->source = pgr_SPI_getBigInt(tuple, tupdesc, info[2]);
+    }
+    edge->cost = pgr_SPI_getFloat8(tuple, tupdesc, info[3]);
+
+    if (column_found(info[4].colNumber)) {
+        edge->reverse_cost = pgr_SPI_getFloat8(tuple, tupdesc, info[4]);
+    } else {
+        edge->reverse_cost = default_rcost;
+    }
+
+    edge->x1 = pgr_SPI_getFloat8(tuple, tupdesc, info[5]);
+    edge->y1 = pgr_SPI_getFloat8(tuple, tupdesc, info[6]);
+    edge->x2 = pgr_SPI_getFloat8(tuple, tupdesc, info[7]);
+    edge->y2 = pgr_SPI_getFloat8(tuple, tupdesc, info[8]);
+
+    *valid_edges = edge->cost < 0? *valid_edges: *valid_edges + 1;
+    *valid_edges = edge->reverse_cost < 0? *valid_edges: *valid_edges + 1;
+}
+
+static
+void
+get_edges_9_columns(
+        char *sql,
+        Pgr_edge_xy_t **edges,
+        size_t *total_edges,
+        bool normal) {
+    clock_t start_t = clock();
+
+    const int tuple_limit = 1000000;
+
+    size_t ntuples;
+    size_t total_tuples;
+    size_t valid_edges;
+
+    Column_info_t info[9];
+
+    info[0].name = "id";
+    info[1].name = "source";
+    info[2].name = "target";
+    info[3].name = "cost";
+    info[4].name = "reverse_cost";
+    info[5].name = "x1";
+    info[6].name = "y1";
+    info[7].name = "x2";
+    info[8].name = "y2";
+
+    int i;
+    for (i = 0; i < 3; ++i) {
+        info[i].colNumber = -1;
+        info[i].type = 0;
+        info[i].strict = true;
+        info[i].eType = ANY_INTEGER;
+    }
+    for (i = 3; i < 9; ++i) {
+        info[i].colNumber = -1;
+        info[i].type = 0;
+        info[i].strict = true;
+        info[i].eType = ANY_NUMERICAL;
+    }
+    /*
+     * reverse_cost is optional
+     */
+    info[4].strict = false;
+
+
+    void *SPIplan;
+    SPIplan = pgr_SPI_prepare(sql);
+
+    Portal SPIportal;
+    SPIportal = pgr_SPI_cursor_open(SPIplan);
+
+
+    bool moredata = true;
+    (*total_edges) = total_tuples = valid_edges = 0;
+
+
+    int64_t default_id = 0;
+    while (moredata == true) {
+        SPI_cursor_fetch(SPIportal, true, tuple_limit);
+        if (total_tuples == 0)
+            pgr_fetch_column_info(info, 9);
+
+        ntuples = SPI_processed;
+        total_tuples += ntuples;
+
+        if (ntuples > 0) {
+            if ((*edges) == NULL)
+                (*edges) = (Pgr_edge_xy_t *)
+                    palloc0(total_tuples * sizeof(Pgr_edge_xy_t));
+            else
+                (*edges) = (Pgr_edge_xy_t *)
+                    repalloc((*edges), total_tuples * sizeof(Pgr_edge_xy_t));
+
+            if ((*edges) == NULL) {
+                elog(ERROR, "Out of memory");
+            }
+
+            size_t t;
+            SPITupleTable *tuptable = SPI_tuptable;
+            TupleDesc tupdesc = SPI_tuptable->tupdesc;
+            for (t = 0; t < ntuples; t++) {
+                HeapTuple tuple = tuptable->vals[t];
+                fetch_edge_with_xy(&tuple, &tupdesc, info,
+                        &default_id, -1,
+                        &(*edges)[total_tuples - ntuples + t],
+                        &valid_edges, normal);
+            }
+            SPI_freetuptable(tuptable);
+        } else {
+            moredata = false;
+        }
+    }
+
+    SPI_cursor_close(SPIportal);
+
+    if (total_tuples == 0 || valid_edges == 0) {
+        PGR_DBG("No edges found");
+    }
+
+    (*total_edges) = total_tuples;
+    PGR_DBG("Finish reading %ld edges", total_tuples);
+    time_msg("reading edges", start_t, clock());
+}
+
+
+
+static
+void
+get_edges_5_columns(
+        char *sql,
+        pgr_edge_t **edges,
+        size_t *totalTuples,
+        bool ignore_id,
+        bool normal) {
+    clock_t start_t = clock();
+
+    const int tuple_limit = 1000000;
+
+    size_t ntuples;
+    size_t total_tuples;
+    size_t valid_edges;
+
+    Column_info_t info[5];
+
+    int i;
+    for (i = 0; i < 5; ++i) {
+        info[i].colNumber = -1;
+        info[i].type = 0;
+        info[i].strict = true;
+        info[i].eType = ANY_INTEGER;
+    }
+    info[0].name = "id";
+    info[1].name = "source";
+    info[2].name = "target";
+    info[3].name = "cost";
+    info[4].name = "reverse_cost";
+
+    info[0].strict = !ignore_id;
+    info[4].strict = false;
+
+    info[3].eType = ANY_NUMERICAL;
+    info[4].eType = ANY_NUMERICAL;
+
+
+    void *SPIplan;
+    SPIplan = pgr_SPI_prepare(sql);
+
+    Portal SPIportal;
+    SPIportal = pgr_SPI_cursor_open(SPIplan);
+
+
+    bool moredata = true;
+    (*totalTuples) = total_tuples = valid_edges = 0;
+
+
+    int64_t default_id = 0;
+    while (moredata == true) {
+        SPI_cursor_fetch(SPIportal, true, tuple_limit);
+        if (total_tuples == 0)
+            pgr_fetch_column_info(info, 5);
+
+        ntuples = SPI_processed;
+        total_tuples += ntuples;
+
+        if (ntuples > 0) {
+            if ((*edges) == NULL)
+                (*edges) = (pgr_edge_t *)
+                    palloc0(total_tuples * sizeof(pgr_edge_t));
+            else
+                (*edges) = (pgr_edge_t *)
+                    repalloc((*edges), total_tuples * sizeof(pgr_edge_t));
+
+            if ((*edges) == NULL) {
+                elog(ERROR, "Out of memory");
+            }
+
+            size_t t;
+            SPITupleTable *tuptable = SPI_tuptable;
+            TupleDesc tupdesc = SPI_tuptable->tupdesc;
+            for (t = 0; t < ntuples; t++) {
+                HeapTuple tuple = tuptable->vals[t];
+                fetch_edge(&tuple, &tupdesc, info,
+                        &default_id, -1,
+                        &(*edges)[total_tuples - ntuples + t],
+                        &valid_edges,
+                        normal);
+            }
+            SPI_freetuptable(tuptable);
+        } else {
+            moredata = false;
+        }
+    }
+
+    SPI_cursor_close(SPIportal);
+
+    if (total_tuples == 0 || valid_edges == 0) {
+        PGR_DBG("No edges found");
+    }
+
+    (*totalTuples) = total_tuples;
+    PGR_DBG("Reading %ld edges", total_tuples);
+    time_msg("reading edges", start_t, clock());
+}
+
+static
+void
+get_edges_flow(
+    char *sql,
+    pgr_edge_t **edges,
+    size_t *totalTuples,
+    bool ignore_id) {
+    clock_t start_t = clock();
+
+    const int tuple_limit = 1000000;
+
+    size_t ntuples;
+    size_t total_tuples;
+    size_t valid_edges;
+
+    Column_info_t info[5];
+
+    int i;
+    for (i = 0; i < 5; ++i) {
+        info[i].colNumber = -1;
+        info[i].type = 0;
+        info[i].strict = true;
+        info[i].eType = ANY_INTEGER;
+    }
+    info[0].name = "id";
+    info[1].name = "source";
+    info[2].name = "target";
+    info[3].name = "capacity";
+    info[4].name = "reverse_capacity";
+
+    info[0].strict = !ignore_id;
+    info[4].strict = false;
+
+    void *SPIplan;
+    SPIplan = pgr_SPI_prepare(sql);
+
+    Portal SPIportal;
+    SPIportal = pgr_SPI_cursor_open(SPIplan);
+
+
+    bool moredata = true;
+    (*totalTuples) = total_tuples = valid_edges = 0;
+
+
+    int64_t default_id = 0;
+    while (moredata == true) {
+        SPI_cursor_fetch(SPIportal, true, tuple_limit);
+        if (total_tuples == 0)
+            pgr_fetch_column_info(info, 5);
+
+        ntuples = SPI_processed;
+        total_tuples += ntuples;
+
+        if (ntuples > 0) {
+            if ((*edges) == NULL)
+                (*edges) = (pgr_edge_t *)
+                    palloc0(total_tuples * sizeof(pgr_flow_t));
+            else
+                (*edges) = (pgr_edge_t *)
+                    repalloc((*edges), total_tuples * sizeof(pgr_flow_t));
+
+            if ((*edges) == NULL) {
+                elog(ERROR, "Out of memory");
+            }
+
+            size_t t;
+            SPITupleTable *tuptable = SPI_tuptable;
+            TupleDesc tupdesc = SPI_tuptable->tupdesc;
+
+            for (t = 0; t < ntuples; t++) {
+                HeapTuple tuple = tuptable->vals[t];
+                fetch_edge(&tuple, &tupdesc, info,
+                           &default_id, -1,
+                           &(*edges)[total_tuples - ntuples + t],
+                           &valid_edges,
+                           true);
+            }
+            SPI_freetuptable(tuptable);
+        } else {
+            moredata = false;
+        }
+    }
+
+    SPI_cursor_close(SPIportal);
+
+    if (total_tuples == 0 || valid_edges == 0) {
+        PGR_DBG("No edges found");
+    }
+
+    (*totalTuples) = total_tuples;
+    PGR_DBG("Reading %ld edges", total_tuples);
+    time_msg("reading edges", start_t, clock());
+}
+
+static
+void
+get_edges_basic(
+    char *sql,
+    pgr_basic_edge_t **edges,
+    size_t *totalTuples,
+    bool ignore_id) {
+    clock_t start_t = clock();
+
+    const int tuple_limit = 1000000;
+
+    size_t ntuples;
+    size_t total_tuples;
+    size_t valid_edges;
+
+    Column_info_t info[5];
+
+    int i;
+    for (i = 0; i < 5; ++i) {
+        info[i].colNumber = -1;
+        info[i].type = 0;
+        info[i].strict = true;
+        info[i].eType = ANY_INTEGER;
+    }
+    info[0].name = "id";
+    info[1].name = "source";
+    info[2].name = "target";
+    info[3].name = "going";
+    info[4].name = "coming";
+
+    info[0].strict = !ignore_id;
+    info[4].strict = false;
+
+    info[3].eType = ANY_NUMERICAL;
+    info[4].eType = ANY_NUMERICAL;
+
+
+    void *SPIplan;
+    SPIplan = pgr_SPI_prepare(sql);
+
+    Portal SPIportal;
+    SPIportal = pgr_SPI_cursor_open(SPIplan);
+
+
+    bool moredata = true;
+    (*totalTuples) = total_tuples = valid_edges = 0;
+
+
+    int64_t default_id = 0;
+    while (moredata == true) {
+        SPI_cursor_fetch(SPIportal, true, tuple_limit);
+        if (total_tuples == 0)
+            pgr_fetch_column_info(info, 5);
+
+        ntuples = SPI_processed;
+        total_tuples += ntuples;
+
+        if (ntuples > 0) {
+            if ((*edges) == NULL)
+                (*edges) = (pgr_basic_edge_t *)palloc0(
+                        total_tuples * sizeof(pgr_basic_edge_t));
+            else
+                (*edges) = (pgr_basic_edge_t *)repalloc(
+                        (*edges), total_tuples * sizeof(pgr_basic_edge_t));
+
+            if ((*edges) == NULL) {
+                elog(ERROR, "Out of memory");
+            }
+
+            size_t t;
+            SPITupleTable *tuptable = SPI_tuptable;
+            TupleDesc tupdesc = SPI_tuptable->tupdesc;
+
+            for (t = 0; t < ntuples; t++) {
+                HeapTuple tuple = tuptable->vals[t];
+                fetch_basic_edge(&tuple, &tupdesc, info,
+                           &default_id,
+                           &(*edges)[total_tuples - ntuples + t],
+                           &valid_edges);
+            }
+            SPI_freetuptable(tuptable);
+        } else {
+            moredata = false;
+        }
+    }
+
+    SPI_cursor_close(SPIportal);
+
+    if (total_tuples == 0 || valid_edges == 0) {
+        PGR_DBG("No edges found");
+    }
+
+    (*totalTuples) = total_tuples;
+    PGR_DBG("Reading %ld edges", total_tuples);
+    time_msg("reading edges", start_t, clock());
+}
+
+/* select id, source, target, capacity, reverse_capacity */
+void
+pgr_get_flow_edges(
+    char *sql,
+    pgr_edge_t **edges,
+    size_t *total_edges) {
+    bool ignore_id = false;
+    get_edges_flow(sql, edges, total_edges, ignore_id);
+}
+
+/* select id, source, target, cost, reverse_cost */
+void
+pgr_get_edges(
+        char *edges_sql,
+        pgr_edge_t **edges,
+        size_t *total_edges) {
+    bool ignore_id = false;
+    bool normal = true;
+    get_edges_5_columns(edges_sql, edges, total_edges, ignore_id, normal);
+}
+
+/* select id, source AS target, target AS source, cost, reverse_cost */
+void
+pgr_get_edges_reversed(
+        char *edges_sql,
+        pgr_edge_t **edges,
+        size_t *total_edges) {
+    bool ignore_id = false;
+    bool normal = false;
+    get_edges_5_columns(edges_sql, edges, total_edges, ignore_id, normal);
+}
+
+/* select source, target, cost, reverse_cost */
+void
+pgr_get_edges_no_id(
+        char *edges_sql,
+        pgr_edge_t **edges,
+        size_t *total_edges) {
+    bool ignore_id = true;
+    bool normal = true;
+    get_edges_5_columns(edges_sql, edges, total_edges, ignore_id, normal);
+}
+
+/* select id, source, target, cost, reverse_cost, x1, y1, x2, y2 */
+void
+pgr_get_edges_xy(
+        char *edges_sql,
+        Pgr_edge_xy_t **edges,
+        size_t *total_edges) {
+    get_edges_9_columns(edges_sql, edges, total_edges, true);
+}
+
+/* select id,
+ * source AS target,
+ * target AS source,
+ * cost, reverse_cost,
+ * x1, y1, x2, y2 */
+void
+pgr_get_edges_xy_reversed(
+        char *edges_sql,
+        Pgr_edge_xy_t **edges,
+        size_t *total_edges) {
+    get_edges_9_columns(edges_sql, edges, total_edges, false);
+}
+
+/* used in flow algorithms */
+void
+pgr_get_basic_edges(
+        char *sql,
+        pgr_basic_edge_t **edges,
+        size_t *total_edges) {
+    bool ignore_id = false;
+    get_edges_basic(sql, edges, total_edges, ignore_id);
+}
diff --git a/src/common/get_check_data.c b/src/common/get_check_data.c
new file mode 100644
index 0000000..227a655
--- /dev/null
+++ b/src/common/get_check_data.c
@@ -0,0 +1,288 @@
+/*PGR-GNU*****************************************************************
+File: get_check_data.c
+
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+vicky_vergara at hotmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "c_common/get_check_data.h"
+#include "c_common/arrays_input.h"
+
+#include "catalog/pg_type.h"
+
+#include "c_common/debug_macro.h"
+
+
+bool
+column_found(int colNumber) {
+    /*
+     * [SPI_ERROR_NOATTRIBUTE](https://doxygen.postgresql.org/spi_8h.html#ac1512d8aaa23c2d57bb0d1eb8f453ee2)
+     */
+    return !(colNumber == SPI_ERROR_NOATTRIBUTE);
+}
+
+static
+bool
+fetch_column_info(
+        Column_info_t *info) {
+/* TODO(vicky) Remove unused code */
+#if 0
+    PGR_DBG("Fetching column info of %s", info->name);
+#endif
+    /*
+     * [SPI_fnumber](https://www.postgresql.org/docs/8.2/static/spi-spi-fnumber.html)
+     */
+    info->colNumber =  SPI_fnumber(SPI_tuptable->tupdesc, info->name);
+    if (info->strict && !column_found(info->colNumber)) {
+        elog(ERROR, "Column '%s' not Found", info->name);
+    }
+
+    if (column_found(info->colNumber)) {
+        /*
+         * [SPI_gettypeid](https://www.postgresql.org/docs/9.1/static/spi-spi-gettypeid.html)
+         */
+        (info->type) = SPI_gettypeid(SPI_tuptable->tupdesc, (info->colNumber));
+        if (SPI_result == SPI_ERROR_NOATTRIBUTE) {
+            elog(ERROR, "Type of column '%s' not Found", info->name);
+        }
+/* TODO(vicky) Remove unused code */
+#if 0
+        PGR_DBG("Column %s found: %lu", info->name, info->type);
+#endif
+        return true;
+    }
+    PGR_DBG("Column %s not found", info->name);
+    return false;
+}
+
+
+void pgr_fetch_column_info(
+        Column_info_t info[],
+        int info_size) {
+    int i;
+    for (i = 0; i < info_size; ++i) {
+        if (fetch_column_info(&info[i])) {
+            switch (info[i].eType) {
+                case ANY_INTEGER:
+                    pgr_check_any_integer_type(info[i]);
+                    break;
+                case ANY_NUMERICAL:
+                    pgr_check_any_numerical_type(info[i]);
+                    break;
+                case TEXT:
+                    pgr_check_text_type(info[i]);
+                    break;
+                case CHAR1:
+                    pgr_check_char_type(info[i]);
+                    break;
+                case ANY_INTEGER_ARRAY:
+                    pgr_check_any_integerarray_type(info[i]);
+                    break;
+                default:
+                    elog(ERROR, "Unknown type of column %s", info[i].name);
+            }
+        }
+    }
+}
+
+/*
+ * [BPCHAROID](https://doxygen.postgresql.org/include_2catalog_2pg__type_8h.html#afa7749dbe36d31874205189d9d6b21d7)  
+ * [INT2ARRAYOID](https://doxygen.postgresql.org/include_2catalog_2pg__type_8h.html#ac265fe7b0bb75fead13b16bf072722e9)
+ */
+
+void
+pgr_check_char_type(Column_info_t info) {
+    if (!(info.type == BPCHAROID)) {
+        elog(ERROR, "Unexpected Column '%s' type. Expected CHAR", info.name);
+    }
+}
+
+void
+pgr_check_text_type(Column_info_t info) {
+    if (!(info.type == TEXTOID)) {
+        elog(ERROR, "Unexpected Column '%s' type. Expected TEXT", info.name);
+    }
+}
+
+void
+pgr_check_any_integer_type(Column_info_t info) {
+    if (!(info.type == INT2OID
+                || info.type == INT4OID
+                || info.type == INT8OID)) {
+        elog(ERROR,
+                "Unexpected Column '%s' type. Expected ANY-INTEGER",
+                info.name);
+    }
+}
+
+void
+pgr_check_any_integerarray_type(Column_info_t info) {
+    if (!(info.type == INT2ARRAYOID
+                || info.type == INT4ARRAYOID
+                || info.type == 1016)) {
+        elog(ERROR,
+                "Unexpected Column '%s' type. Expected ANY-INTEGER-ARRAY",
+                info.name);
+    }
+}
+
+void pgr_check_any_numerical_type(Column_info_t info) {
+    if (!(info.type == INT2OID
+                || info.type == INT4OID
+                || info.type == INT8OID
+                || info.type == FLOAT4OID
+                || info.type == FLOAT8OID)) {
+        elog(ERROR,
+                "Unexpected Column '%s' type. Expected ANY-NUMERICAL",
+                info.name);
+    }
+}
+
+
+/*
+ * http://doxygen.postgresql.org/include_2catalog_2pg__type_8h.html;
+ * [SPI_getbinval](https://www.postgresql.org/docs/8.1/static/spi-spi-getbinval.html)
+ * [Datum](https://doxygen.postgresql.org/datum_8h.html)
+ * [DatumGetInt16](https://doxygen.postgresql.org/postgres_8h.html#aec991e04209850f29a8a63df0c78ba2d)
+ */
+
+char
+pgr_SPI_getChar(
+        HeapTuple *tuple, TupleDesc *tupdesc, Column_info_t info,
+        bool strict, char default_value) {
+    Datum binval;
+    bool isNull;
+    char value = default_value;
+
+    binval = SPI_getbinval(*tuple, *tupdesc, info.colNumber, &isNull);
+    if (!(info.type == BPCHAROID)) {
+        elog(ERROR, "Unexpected Column type of %s. Expected CHAR", info.name);
+    }
+    if (!isNull) {
+        value =  ((char*)binval)[1];
+    } else {
+        if (strict) {
+            elog(ERROR, "Unexpected Null value in column %s", info.name);
+        }
+        value = default_value;
+    }
+    return value;
+}
+
+
+
+
+int64_t*
+pgr_SPI_getBigIntArr(
+        HeapTuple *tuple,
+        TupleDesc *tupdesc,
+        Column_info_t info,
+        uint64_t *the_size) {
+    bool is_null = false;
+
+    Datum raw_array = SPI_getbinval(*tuple, *tupdesc, info.colNumber, &is_null);
+    /*
+    * [DatumGetArrayTypeP](https://doxygen.postgresql.org/array_8h.html#aa1b8e77c103863862e06a7b7c07ec532)
+    * [pgr_get_bigIntArray](http://docs.pgrouting.org/doxy/2.2/arrays__input_8c_source.html)
+    */
+    ArrayType *pg_array = DatumGetArrayTypeP(raw_array);
+
+    return (int64_t*) pgr_get_bigIntArray(the_size, pg_array);
+}
+
+
+
+int64_t
+pgr_SPI_getBigInt(HeapTuple *tuple, TupleDesc *tupdesc, Column_info_t info) {
+    Datum binval;
+    bool isnull;
+    int64_t value = 0;
+    binval = SPI_getbinval(*tuple, *tupdesc, info.colNumber, &isnull);
+    if (isnull)
+        elog(ERROR, "Unexpected Null value in column %s", info.name);
+    switch (info.type) {
+        case INT2OID:
+            value = (int64_t) DatumGetInt16(binval);
+            break;
+        case INT4OID:
+            value = (int64_t) DatumGetInt32(binval);
+            break;
+        case INT8OID:
+            value = DatumGetInt64(binval);
+            break;
+        default:
+            elog(ERROR,
+                    "Unexpected Column type of %s. Expected ANY-INTEGER",
+                    info.name);
+    }
+/* TODO(vicky) Remove unused code */
+#if 0
+    PGR_DBG("Variable: %s Value: %ld", info.name, value);
+#endif
+    return value;
+}
+
+double
+pgr_SPI_getFloat8(HeapTuple *tuple, TupleDesc *tupdesc, Column_info_t info) {
+    Datum binval;
+    bool isnull = false;
+    double value = 0.0;
+    binval = SPI_getbinval(*tuple, *tupdesc, info.colNumber, &isnull);
+    if (isnull)
+        elog(ERROR, "Unexpected Null value in column %s", info.name);
+
+    switch (info.type) {
+        case INT2OID:
+            value = (double) DatumGetInt16(binval);
+            break;
+        case INT4OID:
+            value = (double) DatumGetInt32(binval);
+            break;
+        case INT8OID:
+            value = (double) DatumGetInt64(binval);
+            break;
+        case FLOAT4OID:
+            value = (double) DatumGetFloat4(binval);
+            break;
+        case FLOAT8OID:
+            value = DatumGetFloat8(binval);
+            break;
+        default:
+            elog(ERROR,
+                    "Unexpected Column type of %s. Expected ANY-NUMERICAL",
+                    info.name);
+    }
+/* TODO(vicky) Remove unused code */
+#if 0
+    PGR_DBG("Variable: %s Value: %lf", info.name, value);
+#endif
+    return value;
+}
+
+/**
+ * under development
+ */
+/*
+ * [DatumGetCString](https://doxygen.postgresql.org/postgres_8h.html#ae401c8476d1a12b420e3061823a206a7)
+ */
+char*
+pgr_SPI_getText(HeapTuple *tuple, TupleDesc *tupdesc,  Column_info_t info) {
+    return DatumGetCString(SPI_getvalue(*tuple, *tupdesc, info.colNumber));
+}
diff --git a/src/common/src/identifier.cpp b/src/common/identifier.cpp
similarity index 100%
rename from src/common/src/identifier.cpp
rename to src/common/identifier.cpp
diff --git a/src/common/matrixRows_input.c b/src/common/matrixRows_input.c
new file mode 100644
index 0000000..25096ac
--- /dev/null
+++ b/src/common/matrixRows_input.c
@@ -0,0 +1,135 @@
+/*PGR-GNU*****************************************************************
+File: matrixRows_input.c
+
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+vicky_vergara at hotmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "c_common/matrixRows_input.h"
+
+#include "c_types/column_info_t.h"
+
+#include "c_common/debug_macro.h"
+#include "c_common/get_check_data.h"
+#include "c_common/time_msg.h"
+
+
+
+static
+void pgr_fetch_row(
+        HeapTuple *tuple,
+        TupleDesc *tupdesc,
+        Column_info_t info[3],
+        Matrix_cell_t *distance) {
+    distance->from_vid = pgr_SPI_getBigInt(tuple, tupdesc,  info[0]);
+    distance->to_vid = pgr_SPI_getBigInt(tuple, tupdesc,  info[1]);
+    distance->cost = pgr_SPI_getFloat8(tuple, tupdesc, info[2]);
+}
+
+/*!
+ * bigint start_vid,
+ * bigint end_vid,
+ * float agg_cost,
+ */
+void pgr_get_matrixRows(
+        char *sql,
+        Matrix_cell_t **rows,
+        size_t *total_rows) {
+    clock_t start_t = clock();
+
+    const int tuple_limit = 1000000;
+
+    size_t ntuples;
+    size_t total_tuples = 0;
+
+    Column_info_t info[3];
+
+    int i;
+    for (i = 0; i < 3; ++i) {
+        info[i].colNumber = -1;
+        info[i].type = 0;
+        info[i].strict = true;
+        info[i].eType = ANY_INTEGER;
+    }
+    info[0].name = "start_vid";
+    info[1].name = "end_vid";
+    info[2].name = "agg_cost";
+
+    info[2].eType = ANY_NUMERICAL;
+
+
+    void *SPIplan;
+    SPIplan = pgr_SPI_prepare(sql);
+
+    Portal SPIportal;
+    SPIportal = pgr_SPI_cursor_open(SPIplan);
+
+
+    bool moredata = true;
+    (*total_rows) = total_tuples;
+
+    while (moredata == true) {
+        SPI_cursor_fetch(SPIportal, true, tuple_limit);
+        if (total_tuples == 0)
+            pgr_fetch_column_info(info, 3);
+
+        ntuples = SPI_processed;
+        total_tuples += ntuples;
+
+        if (ntuples > 0) {
+            if ((*rows) == NULL)
+                (*rows) = (Matrix_cell_t *)palloc0(
+                        total_tuples * sizeof(Matrix_cell_t));
+            else
+                (*rows) = (Matrix_cell_t *)repalloc(
+                        (*rows), total_tuples * sizeof(Matrix_cell_t));
+
+            if ((*rows) == NULL) {
+                elog(ERROR, "Out of memory");
+            }
+
+            SPITupleTable *tuptable = SPI_tuptable;
+            TupleDesc tupdesc = SPI_tuptable->tupdesc;
+            PGR_DBG("processing %ld matrix cell tupĺes", ntuples);
+
+            size_t t;
+            for (t = 0; t < ntuples; t++) {
+                HeapTuple tuple = tuptable->vals[t];
+                pgr_fetch_row(&tuple, &tupdesc, info,
+                        &(*rows)[total_tuples - ntuples + t]);
+            }
+            SPI_freetuptable(tuptable);
+        } else {
+            moredata = false;
+        }
+    }
+
+    SPI_cursor_close(SPIportal);
+
+
+    if (total_tuples == 0) {
+        (*total_rows) = 0;
+        PGR_DBG("NO rows");
+        return;
+    }
+
+    (*total_rows) = total_tuples;
+    time_msg(" reading matrix cells", start_t, clock());
+}
diff --git a/src/common/orders_input.c b/src/common/orders_input.c
new file mode 100644
index 0000000..bc852fa
--- /dev/null
+++ b/src/common/orders_input.c
@@ -0,0 +1,219 @@
+/*PGR-GNU*****************************************************************
+File: pd_orders_input.c
+
+Copyright (c) 2016 Celia Virginia Vergara Castillo
+vicky_vergara at hotmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ ********************************************************************PGR-GNU*/
+
+#include "c_common/orders_input.h"
+
+#include "c_types/column_info_t.h"
+
+#include "c_common/debug_macro.h"
+#include "c_common/get_check_data.h"
+#include "c_common/time_msg.h"
+
+
+static
+void fetch_pd_orders(
+        HeapTuple *tuple,
+        TupleDesc *tupdesc,
+        Column_info_t info[14],
+        bool matrix_version,
+        PickDeliveryOrders_t *pd_order) {
+    pd_order->id = pgr_SPI_getBigInt(tuple, tupdesc, info[0]);
+    pd_order->demand = pgr_SPI_getFloat8(tuple, tupdesc, info[1]);
+
+    /*
+     * the pickups
+     */
+    pd_order->pick_x = matrix_version ?
+        0 : pgr_SPI_getFloat8(tuple, tupdesc, info[2]);
+    pd_order->pick_y =  matrix_version ?
+        0 : pgr_SPI_getFloat8(tuple, tupdesc, info[3]);
+    pd_order->pick_open_t = pgr_SPI_getFloat8(tuple, tupdesc, info[4]);
+    pd_order->pick_close_t = pgr_SPI_getFloat8(tuple, tupdesc, info[5]);
+    pd_order->pick_service_t = column_found(info[6].colNumber) ?
+        pgr_SPI_getFloat8(tuple, tupdesc, info[6]) : 0;
+
+    /*
+     * the deliveries
+     */
+    pd_order->deliver_x =  matrix_version ?
+        0 : pgr_SPI_getFloat8(tuple, tupdesc, info[7]);
+    pd_order->deliver_y =  matrix_version ?
+        0 : pgr_SPI_getFloat8(tuple, tupdesc, info[8]);
+    pd_order->deliver_open_t = pgr_SPI_getFloat8(tuple, tupdesc, info[9]);
+    pd_order->deliver_close_t = pgr_SPI_getFloat8(tuple, tupdesc, info[10]);
+    pd_order->deliver_service_t = column_found(info[11].colNumber) ?
+        pgr_SPI_getFloat8(tuple, tupdesc, info[11]) : 0;
+
+    pd_order->pick_node_id = matrix_version ?
+        pgr_SPI_getBigInt(tuple, tupdesc, info[12]) : 0;
+    pd_order->deliver_node_id = matrix_version ?
+        pgr_SPI_getBigInt(tuple, tupdesc, info[13]) : 0;
+}
+
+
+
+static
+void
+pgr_get_pd_orders_general(
+        char *pd_orders_sql,
+        PickDeliveryOrders_t **pd_orders,
+        size_t *total_pd_orders,
+        bool with_id) {
+    clock_t start_t = clock();
+
+    const int tuple_limit = 1000000;
+
+    PGR_DBG("pgr_get_pd_orders_data");
+    PGR_DBG("%s", pd_orders_sql);
+
+    Column_info_t info[14];
+
+    int i;
+    for (i = 0; i < 14; ++i) {
+        info[i].colNumber = -1;
+        info[i].type = 0;
+        info[i].strict = true;
+        info[i].eType = ANY_NUMERICAL;
+    }
+
+    info[0].name = "id";
+    info[1].name = "demand";
+    info[2].name = "p_x";
+    info[3].name = "p_y";
+    info[4].name = "p_open";
+    info[5].name = "p_close";
+    info[6].name = "p_service";
+    info[7].name = "d_x";
+    info[8].name = "d_y";
+    info[9].name = "d_open";
+    info[10].name = "d_close";
+    info[11].name = "d_service";
+    info[12].name = "p_node_id";
+    info[13].name = "d_node_id";
+
+    info[0].eType = ANY_INTEGER;
+    info[12].eType = ANY_INTEGER;
+    info[13].eType = ANY_INTEGER;
+
+    /* service is optional*/
+    info[6].strict = false;
+    info[11].strict = false;
+    /* nodes are going to be ignored*/
+    info[12].strict = false;
+    info[13].strict = false;
+
+    if (with_id) {
+        /* (x,y) values are ignored*/
+        info[2].strict = false;
+        info[3].strict = false;
+        info[7].strict = false;
+        info[8].strict = false;
+        /* nodes are compulsory*/
+        info[12].strict = true;
+        info[13].strict = true;
+    }
+
+
+
+    size_t ntuples;
+    size_t total_tuples;
+
+    void *SPIplan;
+    SPIplan = pgr_SPI_prepare(pd_orders_sql);
+    Portal SPIportal;
+    SPIportal = pgr_SPI_cursor_open(SPIplan);
+
+    bool moredata = true;
+    (*total_pd_orders) = total_tuples = 0;
+
+    /* on the first tuple get the column numbers */
+
+    while (moredata == true) {
+        SPI_cursor_fetch(SPIportal, true, tuple_limit);
+        if (total_tuples == 0) {
+            pgr_fetch_column_info(info, 14);
+        }
+        ntuples = SPI_processed;
+        total_tuples += ntuples;
+        PGR_DBG("SPI_processed %ld", ntuples);
+        if (ntuples > 0) {
+            if ((*pd_orders) == NULL)
+                (*pd_orders) = (PickDeliveryOrders_t *)palloc0(
+                        total_tuples * sizeof(PickDeliveryOrders_t));
+            else
+                (*pd_orders) = (PickDeliveryOrders_t *)repalloc(
+                        (*pd_orders),
+                        total_tuples * sizeof(PickDeliveryOrders_t));
+
+            if ((*pd_orders) == NULL) {
+                elog(ERROR, "Out of memory");
+            }
+
+            size_t t;
+            SPITupleTable *tuptable = SPI_tuptable;
+            TupleDesc tupdesc = SPI_tuptable->tupdesc;
+            PGR_DBG("processing %ld", ntuples);
+            for (t = 0; t < ntuples; t++) {
+                HeapTuple tuple = tuptable->vals[t];
+                fetch_pd_orders(&tuple, &tupdesc, info, with_id,
+                        &(*pd_orders)[total_tuples - ntuples + t]);
+            }
+            SPI_freetuptable(tuptable);
+        } else {
+            moredata = false;
+        }
+    }
+
+    SPI_cursor_close(SPIportal);
+
+    if (total_tuples == 0) {
+        (*total_pd_orders) = 0;
+        PGR_DBG("NO orders");
+        return;
+    }
+
+    (*total_pd_orders) = total_tuples;
+    if (with_id) {
+        PGR_DBG("Finish reading %ld orders for matrix", (*total_pd_orders));
+    } else {
+        PGR_DBG("Finish reading %ld orders for eucledian", (*total_pd_orders));
+    }
+    time_msg("reading edges", start_t, clock());
+}
+
+void
+pgr_get_pd_orders(
+        char *pd_orders_sql,
+        PickDeliveryOrders_t **pd_orders,
+        size_t *total_pd_orders) {
+    pgr_get_pd_orders_general(pd_orders_sql, pd_orders, total_pd_orders, false);
+}
+
+void
+pgr_get_pd_orders_with_id(
+        char *pd_orders_sql,
+        PickDeliveryOrders_t **pd_orders,
+        size_t *total_pd_orders) {
+    pgr_get_pd_orders_general(pd_orders_sql, pd_orders, total_pd_orders, true);
+}
diff --git a/src/common/pgr_alloc.cpp b/src/common/pgr_alloc.cpp
new file mode 100644
index 0000000..83a4b1d
--- /dev/null
+++ b/src/common/pgr_alloc.cpp
@@ -0,0 +1,37 @@
+/*PGR-GNU*****************************************************************
+File: pgr_palloc.cpp
+
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+Mail: vicky_vergara at hotmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "cpp_common/pgr_alloc.hpp"
+#include <cstring>
+#include <string>
+
+char *
+pgr_msg(const std::string &msg) {
+    char* duplicate = NULL;
+    duplicate = pgr_alloc(msg.size() + 1, duplicate);
+    memcpy(duplicate, msg.c_str(), msg.size());
+    duplicate[msg.size()] = '\0';
+    return duplicate;
+}
+
diff --git a/src/common/src/pgr_assert.cpp b/src/common/pgr_assert.cpp
similarity index 100%
rename from src/common/src/pgr_assert.cpp
rename to src/common/pgr_assert.cpp
diff --git a/src/common/points_input.c b/src/common/points_input.c
new file mode 100644
index 0000000..c42e2f4
--- /dev/null
+++ b/src/common/points_input.c
@@ -0,0 +1,153 @@
+/*PGR-GNU*****************************************************************
+File: points_input.c
+
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+vicky_vergara at hotmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "c_common/points_input.h"
+
+#include "c_types/column_info_t.h"
+
+#include "c_common/debug_macro.h"
+#include "c_common/get_check_data.h"
+
+
+
+static
+void fetch_point(
+        HeapTuple *tuple,
+        TupleDesc *tupdesc,
+        Column_info_t info[4],
+        int64_t *default_pid,
+        char default_side,
+        Point_on_edge_t *point) {
+    if (column_found(info[0].colNumber)) {
+        point->pid = pgr_SPI_getBigInt(tuple, tupdesc, info[0]);
+    } else {
+        point->pid = *default_pid;
+        ++(*default_pid);
+    }
+
+    point->edge_id = pgr_SPI_getBigInt(tuple, tupdesc, info[1]);
+    point->fraction = pgr_SPI_getFloat8(tuple, tupdesc, info[2]);
+
+    if (column_found(info[3].colNumber)) {
+        point->side =
+            (char)pgr_SPI_getChar(tuple, tupdesc, info[3], false, default_side);
+    } else {
+        point->side = default_side;
+    }
+}
+
+
+// pid, edge_id, fraction, [side]
+void
+pgr_get_points(
+        char *points_sql,
+        Point_on_edge_t **points,
+        size_t *total_points) {
+    const int tuple_limit = 1000;
+
+    size_t ntuples;
+    size_t total_tuples;
+    Column_info_t info[4];
+
+    int i;
+    for (i = 0; i < 4; ++i) {
+        info[i].colNumber = -1;
+        info[i].type = 0;
+        info[i].strict = true;
+        info[i].eType = ANY_INTEGER;
+    }
+
+    info[0].name = "pid";
+    info[1].name = "edge_id";
+    info[2].name = "fraction";
+    info[3].name = "side";
+
+    info[0].strict = false;
+    info[3].strict = false;
+    info[2].eType = ANY_NUMERICAL;
+    info[3].eType = CHAR1;
+
+
+    void *SPIplan;
+    SPIplan = pgr_SPI_prepare(points_sql);
+
+    Portal SPIportal;
+    SPIportal = pgr_SPI_cursor_open(SPIplan);
+
+    bool moredata = true;
+    (*total_points) = total_tuples = 0;
+
+    int64_t default_pid = 1;
+    char default_side = 'b';
+
+    while (moredata == true) {
+        SPI_cursor_fetch(SPIportal, true, tuple_limit);
+        if (total_tuples == 0) {
+            /* on the first tuple get the column information */
+            pgr_fetch_column_info(info, 4);
+        }
+
+        ntuples = SPI_processed;
+        total_tuples += ntuples;
+
+        if (ntuples > 0) {
+            if ((*points) == NULL)
+                (*points) = (Point_on_edge_t *)
+                    palloc0(total_tuples * sizeof(Point_on_edge_t));
+            else
+                (*points) = (Point_on_edge_t *)
+                    repalloc((*points), total_tuples * sizeof(Point_on_edge_t));
+
+            if ((*points) == NULL) {
+                elog(ERROR, "Out of memory");
+            }
+
+            SPITupleTable *tuptable = SPI_tuptable;
+            TupleDesc tupdesc = SPI_tuptable->tupdesc;
+            size_t t;
+
+            PGR_DBG("processing %ld points tuples", ntuples);
+            for (t = 0; t < ntuples; t++) {
+                HeapTuple tuple = tuptable->vals[t];
+                fetch_point(&tuple, &tupdesc, info,
+                        &default_pid, default_side,
+                        &(*points)[total_tuples - ntuples + t]);
+            }
+            SPI_freetuptable(tuptable);
+        } else {
+            moredata = false;
+        }
+    }
+    SPI_cursor_close(SPIportal);
+
+
+    if (total_tuples == 0) {
+        (*total_points) = 0;
+        PGR_DBG("NO points");
+        return;
+    }
+
+    (*total_points) = total_tuples;
+    PGR_DBG("Finish reading %ld points, %ld", total_tuples, (*total_points));
+}
diff --git a/src/common/postgres_connection.c b/src/common/postgres_connection.c
new file mode 100644
index 0000000..547ff85
--- /dev/null
+++ b/src/common/postgres_connection.c
@@ -0,0 +1,118 @@
+/*PGR-GNU*****************************************************************
+File: postgres_connection.c
+
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+vicky_vergara at hotmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "c_common/postgres_connection.h"
+
+#include <string.h>
+#include "utils/builtins.h"
+
+#include "catalog/pg_type.h"
+
+
+#include "c_common/debug_macro.h"
+
+void
+pgr_send_error(int errcode) {
+    switch (errcode) {
+        case 1:
+            elog(ERROR, "Unexpected point(s) with same pid but different"
+                   " edge/fraction/side combination found.");
+            break;
+        case 2:
+            elog(ERROR, "Internal: Unexpected mismatch "
+                   "count and sequence number on results");
+            break;
+        default:
+            elog(ERROR, "Unknown exception");
+    }
+}
+
+
+char*
+pgr_cstring2char(const char *inStr) {
+    if (!inStr) return NULL;
+
+    char *outStr;
+    outStr = palloc(strlen(inStr));
+    if (!outStr) return NULL;
+
+    memcpy(outStr, inStr, strlen(inStr));
+
+    outStr[strlen(inStr)] = '\0';
+
+    return outStr;
+}
+
+
+
+// http://www.postgresql.org/docs/9.4/static/spi-spi-finish.html
+void
+pgr_SPI_finish(void) {
+#if 0
+    PGR_DBG("Disconnecting SPI");
+#endif
+    int code = SPI_OK_FINISH;
+    code = SPI_finish();
+    if (code != SPI_OK_FINISH) {  // SPI_ERROR_UNCONNECTED
+        elog(ERROR, "There was no connection to SPI");
+    }
+}
+
+void
+pgr_SPI_connect(void) {
+#if 0
+    PGR_DBG("Connecting to SPI");
+#endif
+    int SPIcode;
+    SPIcode = SPI_connect();
+    if (SPIcode  != SPI_OK_CONNECT) {
+        elog(ERROR, "Couldn't open a connection to SPI");
+    }
+}
+
+SPIPlanPtr
+pgr_SPI_prepare(char* sql) {
+#if 0
+    PGR_DBG("Preparing Plan");
+#endif
+    SPIPlanPtr SPIplan;
+    SPIplan = SPI_prepare(sql, 0, NULL);
+    if (SPIplan  == NULL) {
+        elog(ERROR, "Couldn't create query plan via SPI: %s", sql);
+    }
+    return SPIplan;
+}
+
+Portal
+pgr_SPI_cursor_open(SPIPlanPtr SPIplan) {
+#if 0
+    PGR_DBG("Opening Portal");
+#endif
+    Portal SPIportal;
+    SPIportal = SPI_cursor_open(NULL, SPIplan, NULL, NULL, true);
+    if (SPIportal == NULL) {
+        elog(ERROR, "SPI_cursor_open returns NULL");
+    }
+    return SPIportal;
+}
diff --git a/src/common/restrictions_input.c b/src/common/restrictions_input.c
new file mode 100644
index 0000000..0252f7e
--- /dev/null
+++ b/src/common/restrictions_input.c
@@ -0,0 +1,155 @@
+/*PGR-GNU*****************************************************************
+File: restrictions_input.c
+
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+vicky_vergara at hotmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "c_common/restrictions_input.h"
+
+#include "c_types/column_info_t.h"
+
+#include "c_common/debug_macro.h"
+#include "c_common/time_msg.h"
+#include "c_common/get_check_data.h"
+
+
+static
+void fetch_restriction(
+        HeapTuple *tuple,
+        TupleDesc *tupdesc,
+        Column_info_t info[3],
+        Restriction_t *restriction) {
+    /*
+     * reading the restriction id
+     */
+    restriction->id = pgr_SPI_getBigInt(tuple, tupdesc, info[0]);
+
+    /*
+     * reading the cost
+     */
+    restriction->cost = pgr_SPI_getFloat8(tuple, tupdesc,  info[1]);
+
+    restriction->via = NULL;
+    restriction->via_size = 0;
+
+    restriction->via = pgr_SPI_getBigIntArr(
+            tuple, tupdesc, info[2], &restriction->via_size);
+}
+
+
+void
+pgr_get_restrictions(
+        char *restrictions_sql,
+        Restriction_t **restrictions,
+        size_t *total_restrictions) {
+    const int tuple_limit = 1000000;
+    clock_t start_t = clock();
+
+    PGR_DBG("pgr_get_restrictions");
+    PGR_DBG("%s", restrictions_sql);
+
+    Column_info_t info[3];
+
+    int i;
+    for (i = 0; i < 3; ++i) {
+        info[i].colNumber = -1;
+        info[i].type = 0;
+        info[i].strict = true;
+    }
+
+    /* restriction id */
+    info[0].name = "id";
+    info[1].name = "cost";
+    /* array of edges */
+    info[2].name = "path";
+
+    info[0].eType = ANY_INTEGER;
+    info[1].eType = ANY_NUMERICAL;
+    info[2].eType = ANY_INTEGER_ARRAY;
+
+
+    size_t ntuples;
+    size_t total_tuples;
+
+    void *SPIplan;
+    SPIplan = pgr_SPI_prepare(restrictions_sql);
+    Portal SPIportal;
+    SPIportal = pgr_SPI_cursor_open(SPIplan);
+
+    bool moredata = true;
+    (*total_restrictions) = total_tuples = 0;
+
+
+    /*  on the first tuple get the column numbers */
+
+    while (moredata == true) {
+        SPI_cursor_fetch(SPIportal, true, tuple_limit);
+        if (total_tuples == 0) {
+            pgr_fetch_column_info(info, 3);
+        }
+        ntuples = SPI_processed;
+        total_tuples += ntuples;
+        PGR_DBG("Restrictions to be processed %ld", ntuples);
+        PGR_DBG("size of structure %ld",  sizeof(Restriction_t));
+        if (ntuples > 0) {
+            if ((*restrictions) == NULL) {
+                (*restrictions) = (Restriction_t *)palloc(
+                        total_tuples * sizeof(Restriction_t));
+            } else {
+                (*restrictions) = (Restriction_t *)repalloc(
+                        (*restrictions),
+                        total_tuples * sizeof(Restriction_t));
+            }
+
+            if ((*restrictions) == NULL) {
+                elog(ERROR, "Out of memory");
+            }
+
+            size_t t;
+            SPITupleTable *tuptable = SPI_tuptable;
+            TupleDesc tupdesc = SPI_tuptable->tupdesc;
+            PGR_DBG("processing %ld", ntuples);
+            for (t = 0; t < ntuples; t++) {
+                HeapTuple tuple = tuptable->vals[t];
+                fetch_restriction(&tuple, &tupdesc, info,
+                        &(*restrictions)[total_tuples - ntuples + t]);
+            }
+            SPI_freetuptable(tuptable);
+        } else {
+            moredata = false;
+        }
+    }
+
+    SPI_cursor_close(SPIportal);
+
+    if (total_tuples == 0) {
+        (*total_restrictions) = 0;
+        PGR_DBG("NO restrictions");
+        return;
+    }
+
+    (*total_restrictions) = total_tuples;
+    PGR_DBG("Finish reading %ld restrictions, %ld",
+            total_tuples,
+            (*total_restrictions));
+    clock_t end_t = clock();
+    time_msg(" reading Restrictions", start_t, end_t);
+}
diff --git a/src/common/signalhandler.cpp b/src/common/signalhandler.cpp
new file mode 100644
index 0000000..3dad988
--- /dev/null
+++ b/src/common/signalhandler.cpp
@@ -0,0 +1,83 @@
+/*PGR-GNU*****************************************************************
+
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+/*PGR-MIT******************************************************************
+ *
+ * file signalhandler.cpp
+ *
+ * Copyright 2014 Stephen Woodbridge <woodbri at imaptools.com>
+ * Copyright 2014 Vicky Vergara <vicky_vergara at hotmail.com>
+ *
+ * This is free software; you can redistribute and/or modify it under
+ * the terms of the MIT License. Please file MIT-LICENSE for details.
+ *
+ *****************************************************************PGR-MIT*/
+
+#include "cpp_common/signalhandler.h"
+
+SignalHandler *
+SignalHandler::instance() {
+  if (!instance_) instance_ = new SignalHandler;
+
+  // assert(instance_ != NULL);
+  return instance_;
+}
+
+
+EventHandler *
+SignalHandler::registerHandler(int signum, EventHandler *eh) {
+  // Copy the <old_eh> from the <signum> slot in
+  // the <signalHandlers_> table.
+  EventHandler *old_eh = signalHandlers_[signum];
+
+  // Store <eh> into the <signum> slot in the
+  // <signalHandlers_> table.
+  SignalHandler::signalHandlers_[signum] = eh;
+
+  // Register the <dispatcher> to handle this
+  // <signum>.
+  struct sigaction sa;
+  sa.sa_handler = SignalHandler::dispatcher;
+  sigemptyset(&sa.sa_mask);
+  sa.sa_flags = 0;
+  sigaction(signum, &sa, 0);
+
+  return old_eh;
+}
+
+void SignalHandler::removeHandler(int signum) {
+  // EventHandler *old_eh = signalHandlers_[signum];
+  signalHandlers_[signum] = static_cast<EventHandler *>(0);
+}
+
+
+void SignalHandler::dispatcher(int signum) {
+  // Perform a sanity check...
+  if (SignalHandler::signalHandlers_[signum] != 0)
+    // Dispatch the handler's hook method.
+    SignalHandler::signalHandlers_[signum]->handleSignal(signum);
+}
+
+// these allocate actual storage
+SignalHandler *SignalHandler::instance_ = NULL;
+EventHandler *SignalHandler::signalHandlers_[NSIG];
+
diff --git a/src/common/src/CMakeLists.txt b/src/common/src/CMakeLists.txt
deleted file mode 100644
index a4f2d1c..0000000
--- a/src/common/src/CMakeLists.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-ADD_LIBRARY(common OBJECT
-    postgres_connection.c
-    e_report.c
-    restrict_input.c
-    basePath_SSEC.cpp
-
-    points_input.c
-    matrixRows_input.c
-    get_check_data.c
-    edges_input.c
-    orders_input.c
-    orders_input.c
-    vehicles_input.c
-
-    coordinates_input.c
-    arrays_input.c
-
-    time_msg.c
-    pgr_assert.cpp
-    identifier.cpp
-
-    basic_vertex.cpp
-    xy_vertex.cpp
-    ch_vertex.cpp
-    ch_edge.cpp
-    basic_edge.cpp
-    pgr_alloc.cpp
-    )
diff --git a/src/common/src/arrays_input.c b/src/common/src/arrays_input.c
deleted file mode 100644
index 211310a..0000000
--- a/src/common/src/arrays_input.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: arrays_input.c
-
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-vicky_vergara at hotmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "c_common/arrays_input.h"
-
-#include "utils/lsyscache.h"
-#include "catalog/pg_type.h"
-
-
-#include "c_common/time_msg.h"
-#include "c_common/debug_macro.h"
-#include <assert.h>
-
-static
-int64_t*
-pgr_get_bigIntArr(ArrayType *v, size_t *arrlen, bool allow_empty) {
-    clock_t start_t = clock();
-    int64_t *c_array = NULL;;
-
-    Oid     element_type = ARR_ELEMTYPE(v);
-    int    *dim = ARR_DIMS(v);
-    int     ndim = ARR_NDIM(v);
-    int     nitems = ArrayGetNItems(ndim, dim);
-    Datum  *elements;
-    bool   *nulls;
-    int16   typlen;
-    bool    typbyval;
-    char    typalign;
-
-    assert((*arrlen) == 0);
-
-
-    if (allow_empty && (ndim == 0 || nitems <= 0)) {
-        PGR_DBG("ndim %i nitems % i", ndim, nitems);
-        return (int64_t*) NULL;
-    }
-    /* the array is not empty*/
-
-    if (ndim != 1) {
-        elog(ERROR, "One dimension expected");
-        return (int64_t*)NULL;
-    }
-
-    if (nitems <= 0) {
-        elog(ERROR, "No elements found");
-        return (int64_t*)NULL;
-    }
-
-    get_typlenbyvalalign(element_type,
-            &typlen, &typbyval, &typalign);
-
-    /* validate input data type */
-    switch (element_type) {
-        case INT2OID:
-        case INT4OID:
-        case INT8OID:
-            break;
-        default:
-            elog(ERROR, "Expected array of ANY-INTEGER");
-            return (int64_t*)NULL;
-            break;
-    }
-
-    deconstruct_array(v, element_type, typlen, typbyval,
-            typalign, &elements, &nulls,
-            &nitems);
-
-    c_array = (int64_t *) palloc(sizeof(int64_t) * (size_t)nitems);
-    if (!c_array) {
-        elog(ERROR, "Out of memory!");
-    }
-
-
-    int i;
-    for (i = 0; i < nitems; i++) {
-        if (nulls[i]) {
-            pfree(c_array);
-            elog(ERROR, "NULL value found in Array!");
-        } else {
-            switch (element_type) {
-                case INT2OID:
-                    c_array[i] = (int64_t) DatumGetInt16(elements[i]);
-                    break;
-                case INT4OID:
-                    c_array[i] = (int64_t) DatumGetInt32(elements[i]);
-                    break;
-                case INT8OID:
-                    c_array[i] = DatumGetInt64(elements[i]);
-                    break;
-            }
-        }
-    }
-    (*arrlen) = (size_t)nitems;
-
-    pfree(elements);
-    pfree(nulls);
-    PGR_DBG("Array size %ld", (*arrlen));
-    time_msg("reading Array", start_t, clock());
-    return c_array;
-}
-
-
-int64_t* pgr_get_bigIntArray(size_t *arrlen, ArrayType *input) {
-    return pgr_get_bigIntArr(input, arrlen, false);
-}
-
-
-
-int64_t* pgr_get_bigIntArray_allowEmpty(size_t *arrlen, ArrayType *input) {
-    return pgr_get_bigIntArr(input, arrlen, true);
-}
diff --git a/src/common/src/basePath_SSEC.cpp b/src/common/src/basePath_SSEC.cpp
deleted file mode 100644
index 98b670b..0000000
--- a/src/common/src/basePath_SSEC.cpp
+++ /dev/null
@@ -1,321 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: basePath_SSEC.cpp
-
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-vicky_vergara at hotmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-
-********************************************************************PGR-GNU*/
-
-#include "cpp_common/basePath_SSEC.hpp"
-
-#include <deque>
-#include <iostream>
-#include <algorithm>
-#include <utility>
-
-#include "c_types/general_path_element_t.h"
-#include "cpp_common/pgr_assert.h"
-
-void Path::push_front(Path_t data) {
-    path.push_front(data);
-    m_tot_cost += data.cost;
-}
-
-void Path::push_back(Path_t data) {
-    path.push_back(data);
-    m_tot_cost += data.cost;
-}
-
-void Path::reverse() {
-    std::swap(m_start_id, m_end_id);
-    if (path.size() <= 1) return;
-    std::deque< Path_t > newpath;
-    for (size_t i = 0; i < path.size(); ++i) {
-        newpath.push_front({
-                path[i].node,
-                (i == 0? -1 : path[i - 1].edge),
-                (i == 0? 0 : path[i - 1].cost),
-                0
-                });
-    }
-    for (size_t i = 0; i < newpath.size(); ++i) {
-        newpath[i].agg_cost = (i == 0)?
-            0 :
-            newpath[i - 1].agg_cost +  newpath[i - 1].cost;
-    }
-    path = newpath;
-}
-
-
-void Path::clear() {
-    path.clear();
-    m_tot_cost = 0;
-    m_start_id = 0;
-    m_end_id = 0;
-}
-
-std::ostream& operator<<(std::ostream &log, const Path &path) {
-    log << "Path: " << path.start_id() << " -> " << path.end_id() << "\n"
-        << "seq\tnode\tedge\tcost\tagg_cost\n";
-    int64_t i = 0;
-    for (const auto &e : path) {
-        log << i << "\t"
-            << e.node << "\t"
-            << e.edge << "\t"
-            << e.cost << "\t"
-            << e.agg_cost << "\n";
-        ++i;
-    }
-    return log;
-}
-
-
-
-Path Path::getSubpath(unsigned int j) const {
-    Path result(start_id(), end_id());
-    if (j == 0)  return result;
-    for (auto i = path.begin(); i != path.begin() + j; ++i) {
-        result.push_back((*i));
-    }
-    pgassert(result.tot_cost() != 0);
-    pgassert(this->tot_cost() != 0);
-    return result;
-}
-
-
-bool Path::isEqual(const Path &subpath) const {
-    if (subpath.empty()) return true;
-    if (subpath.size() >= path.size()) return false;
-    std::deque< Path_t >::const_iterator i, j;
-    for (i = path.begin(),  j = subpath.begin();
-            j != subpath.end();
-            ++i, ++j)
-        if ((*i).node != (*j).node) return false;
-    return true;
-}
-
-void Path::appendPath(const Path &o_path) {
-    path.insert(path.end(), o_path.path.begin(), o_path.path.end());
-    m_tot_cost +=  o_path.m_tot_cost;
-}
-
-
-/*!
- 
-    Path: 2 -> 9
-    seq   node    edge    cost    agg_cost
-    0     2       4       1       0
-    1     5       8       1       1
-    2     6       9       1       2
-    3     9       -1      0       3
-    Path: 9 -> 3
-    seq   node    edge    cost    agg_cost
-    0     9       16      1       0
-    1     4       3       1       1
-    2     3       -1      0       2
-    Path: 2 -> 3
-    seq   node    edge    cost    agg_cost
-    0     2       4       1       0
-    1     5       8       1       1
-    2     6       9       1       2
-    3     9       16      1       3
-    4     4       3       1       4
-    5     3       -1      0       5
-
- */
-void Path::append(const Path &other) {
-    pgassert(m_end_id == other.m_start_id);
-    if (other.m_start_id == other.m_end_id) {
-        pgassert(other.path.empty());
-        return;
-    }
-    if (m_start_id == m_end_id) {
-        pgassert(path.empty());
-        *this = other;
-        return;
-    }
-#if 0
-    pgassert(path.back().cost == 0);
-#endif
-    pgassert(path.back().edge == -1);
-    m_end_id = other.m_end_id;
-
-    auto last = path.back();
-    auto agg_cost = last.agg_cost;
-
-    path.pop_back();
-
-    for (auto item : other.path) {
-        item.agg_cost += agg_cost;
-        push_back(item);
-    }
-}
-
-
-void Path::generate_postgres_data(
-        General_path_element_t **postgres_data,
-        size_t &sequence) const {
-    int i = 1;
-    for (const auto e : path) {
-        (*postgres_data)[sequence] =
-        {i, start_id(), end_id(), e.node, e.edge, e.cost, e.agg_cost};
-        ++i;
-        ++sequence;
-    }
-}
-
-/* used by driving distance */
-void Path::get_pg_dd_path(
-        General_path_element_t **ret_path,
-        size_t &sequence) const {
-    for (unsigned int i = 0; i < path.size(); i++) {
-        (*ret_path)[sequence].seq = i;
-        (*ret_path)[sequence].start_id = start_id();
-        (*ret_path)[sequence].end_id = start_id();
-        (*ret_path)[sequence].node = path[i].node;
-        (*ret_path)[sequence].edge = path[i].edge;
-        (*ret_path)[sequence].cost = path[i].cost;
-        (*ret_path)[sequence].agg_cost = path[i].agg_cost;
-        sequence++;
-    }
-}
-
-/* used by ksp */
-void Path::get_pg_ksp_path(
-        General_path_element_t **ret_path,
-        size_t &sequence, int routeId) const {
-    for (unsigned int i = 0; i < path.size(); i++) {
-        (*ret_path)[sequence].seq = i + 1;
-        (*ret_path)[sequence].start_id = routeId;
-        (*ret_path)[sequence].end_id = end_id();
-        (*ret_path)[sequence].node = path[i].node;
-        (*ret_path)[sequence].edge = path[i].edge;
-        (*ret_path)[sequence].cost = path[i].cost;
-        (*ret_path)[sequence].agg_cost = (i == 0)?
-            0 :
-            (*ret_path)[sequence-1].agg_cost +  path[i-1].cost;
-        sequence++;
-    }
-}
-
-
-/** @brief Sorts a path by node, aggcost ascending
- *
- * nodes ASC
- * agg_cost ASC
- */
-void
-Path::sort_by_node_agg_cost() {
-    std::sort(path.begin(), path.end(),
-            [](const Path_t &l, const  Path_t &r)
-            {return l.node < r.node;});
-    std::stable_sort(path.begin(), path.end(),
-            [](const Path_t &l, const  Path_t &r)
-            {return l.agg_cost < r.agg_cost;});
-}
-
-/*
- * FRIENDS
- */
-
-
-size_t
-collapse_paths(
-        General_path_element_t **ret_path,
-        const std::deque< Path > &paths) {
-    size_t sequence = 0;
-    for (const Path &path : paths) {
-        if (path.path.size() > 0)
-            path.generate_postgres_data(ret_path, sequence);
-    }
-    return sequence;
-}
-
-/*
- * sort the paths by size from greater to smaller
- *        and sort each path by node
- * all the nodes on p2 are going to be compared
- * with the nodes of p1
- *
- * When both paths reach the node and p1.agg_cost > p2.agg_cost
- *    erase the node of p1
- *    (can't erase from p2 because we loose the iterators
- *     so in a future cycle it will be deleted)
- *
- * sort the paths by start_id,
- */
-
-void
-equi_cost(std::deque< Path > &paths) {
-    /* sort paths by size: largest first */
-    std::sort(paths.begin(), paths.end(),
-            [](const Path &e1, const Path &e2)->bool {
-            return e2.size() < e1.size();
-            });
-
-    /* sort each path by node: smaller id first */
-    for (auto &p : paths) {
-        if (p.size() < 2) continue;
-        std::sort(p.begin(), p.end(),
-                [](const Path_t &e1, const Path_t &e2)->bool {
-                return e1.node < e2.node;
-                });
-    }
-
-    for (auto &p1 : paths) {
-        for (const auto &p2 : paths) {
-            if (p1.start_id() == p2.start_id()) continue;
-            for (const auto &stop : p2.path) {
-                /* find the node of p2 in p1 */
-                auto pos = lower_bound(p1.begin(), p1.end(), stop,
-                        [](const Path_t &l, const Path_t &r)->bool {
-                        return l.node < r.node;
-                        });
-
-                if (pos != p1.end()
-                        && (stop.node == pos->node)
-                        && (stop.agg_cost < pos->agg_cost)) {
-                    /* both share the same node &
-                     * the second path has the smallest
-                     *  So erasing from the first path */
-                    p1.erase(pos);
-                }
-            }
-        }
-    }
-    /* sort paths by start_id */
-    std::sort(paths.begin(), paths.end(),
-            [](const Path &e1, const Path &e2)->bool {
-            return e1.start_id() < e2.start_id();
-            });
-
-    /* sort each path by agg_cost, node */
-    for (auto &path : paths) {
-        path.sort_by_node_agg_cost();
-    }
-}
-
-
-size_t
-count_tuples(const std::deque< Path > &paths) {
-    size_t count(0);
-    for (const Path &e : paths) {
-        count += e.path.size();
-    }
-    return count;
-}
diff --git a/src/common/src/ch_edge.cpp b/src/common/src/ch_edge.cpp
deleted file mode 100644
index 3c87ce5..0000000
--- a/src/common/src/ch_edge.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: ch_edge.cpp
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer: 
-Copyright (c) 2016 Rohith Reddy
-Mail: 
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
- ********************************************************************PGR-GNU*/
-
-#include "./ch_edge.h"
-
-namespace pgrouting {
-
-void
-CH_edge::cp_members(const CH_edge &other) {
-    this->cost = other.cost;
-    this->id = other.id;
-    this->m_contracted_vertices += other.contracted_vertices();
-}
-
-
-bool
-CH_edge::has_contracted_vertices() const {
-    return !m_contracted_vertices.empty();
-}
-
-const Identifiers<int64_t>&
-CH_edge::contracted_vertices() const {
-    return m_contracted_vertices;
-}
-
-
-void
-CH_edge::add_contracted_vertex(CH_vertex& v, int64_t vid) {
-    m_contracted_vertices += vid;
-    m_contracted_vertices += v.contracted_vertices();
-    v.clear_contracted_vertices();
-}
-
-void
-CH_edge::add_contracted_edge_vertices(CH_edge &e) {
-    m_contracted_vertices += e.contracted_vertices();
-    e.clear_contracted_vertices();
-}
-
-std::ostream& operator <<(std::ostream& os, const CH_edge& e) {
-    os << "{id: " << e.id << ",\t"
-        << "source: " << e.source << ",\t"
-        << "target: " << e.target << ",\t"
-        << "cost: " << e.cost << ",\t"
-        << "contracted vertices: "
-        << e.contracted_vertices()
-        << "}";
-    return os;
-}
-
-}  // namespace pgrouting
diff --git a/src/common/src/ch_edge.h b/src/common/src/ch_edge.h
deleted file mode 100644
index c0c75fb..0000000
--- a/src/common/src/ch_edge.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: ch_edge.h
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer: 
-Copyright (c) 2016 Rohith Reddy
-Mail: 
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
- ********************************************************************PGR-GNU*/
-
-#ifndef SRC_COMMON_SRC_CH_EDGE_H_
-#define SRC_COMMON_SRC_CH_EDGE_H_
-#pragma once
-
-#include <iostream>
-#include <sstream>
-#include "./ch_vertex.h"
-// #include "./basic_edge.h"
-
-namespace pgrouting {
-
-class CH_edge {
- public:
-     CH_edge() = default;
-
-     CH_edge(int64_t eid, int64_t source, int64_t target, double cost) :
-         id(eid), source(source),
-         target(target), cost(cost) {}
-
-     void cp_members(const CH_edge &other);
-
-     void add_contracted_vertex(CH_vertex& v, int64_t vid);
-     void add_contracted_edge_vertices(CH_edge& e);
-
-     bool has_contracted_vertices() const;
-
-     void clear_contracted_vertices() {m_contracted_vertices.clear();}
-     const Identifiers<int64_t>& contracted_vertices() const;
-     friend std::ostream& operator <<(std::ostream& os, const CH_edge& e);
-
- public:
-     int64_t id;
-     int64_t source;
-     int64_t target;
-     double cost;
-
- private:
-     Identifiers<int64_t> m_contracted_vertices;
-};
-
-}  // namespace pgrouting
-
-#endif  // SRC_COMMON_SRC_CH_EDGE_H_
diff --git a/src/common/src/ch_vertex.cpp b/src/common/src/ch_vertex.cpp
deleted file mode 100644
index c057748..0000000
--- a/src/common/src/ch_vertex.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: ch_vertex.cpp
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer: 
-Copyright (c) 2016 Rohith Reddy
-Mail: 
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
- ********************************************************************PGR-GNU*/
-
-#include "./ch_vertex.h"
-
-#include <algorithm>
-#include <vector>
-
-namespace pgrouting {
-
-
-const Identifiers<int64_t>&
-    CH_vertex::contracted_vertices() const {
-    return m_contracted_vertices;
-}
-
-
-bool CH_vertex::has_contracted_vertices() const {
-    if (m_contracted_vertices.size() == 0)
-        return false;
-    return true;
-}
-
-void CH_vertex::add_contracted_vertex(CH_vertex& v, int64_t vid) {
-    m_contracted_vertices += vid;
-    m_contracted_vertices += v.contracted_vertices();
-    v.clear_contracted_vertices();
-}
-
-std::ostream& operator <<(std::ostream& os, const CH_vertex& v) {
-    os << "{id: " << v.id << ",\t"
-     << "contracted vertices: "
-     << v.contracted_vertices()
-     << "}";
-    return os;
-}
-
-}  // namespace pgrouting
diff --git a/src/common/src/ch_vertex.h b/src/common/src/ch_vertex.h
deleted file mode 100644
index 4d80f13..0000000
--- a/src/common/src/ch_vertex.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: ch_vertex.h
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer: 
-Copyright (c) 2016 Rohith Reddy
-Mail: 
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
- ********************************************************************PGR-GNU*/
-#ifndef SRC_COMMON_SRC_CH_VERTEX_H_
-#define SRC_COMMON_SRC_CH_VERTEX_H_
-#include <iostream>
-#include <sstream>
-#include <vector>
-
-#include "c_types/pgr_edge_t.h"
-#include "cpp_common/identifiers.hpp"
-
-namespace pgrouting {
-
-class CH_vertex {
- public:
-    int64_t id;
-    CH_vertex() = default;
-    CH_vertex(const CH_vertex &) = default;
-    CH_vertex(const pgr_edge_t &other, bool is_source) :
-      id(is_source? other.source : other.target)
-      {}
-    void cp_members(const CH_vertex &other) {
-        this->id = other.id;
-    }
-    void add_contracted_vertex(CH_vertex& v, int64_t vid);
-    void add_vertex_id(int64_t vid) {m_contracted_vertices += vid;}
-    const Identifiers<int64_t>& contracted_vertices() const;
-    bool has_contracted_vertices() const;
-    void clear_contracted_vertices() {m_contracted_vertices.clear();}
-    friend std::ostream& operator <<(std::ostream& os, const CH_vertex& v);
- private:
-    Identifiers<int64_t> m_contracted_vertices;
-};
-
-size_t
-check_vertices(std::vector < CH_vertex > vertices);
-
-#if 0
-std::vector < CH_vertex >
-extract_vertices(
-    const pgr_edge_t *data_edges, int64_t count);
-
-std::vector < CH_vertex >
-extract_vertices(
-    const std::vector < pgr_edge_t > &data_edges);
-#endif
-}  // namespace pgrouting
-
-#endif  // SRC_COMMON_SRC_CH_VERTEX_H_
diff --git a/src/common/src/coordinates_input.c b/src/common/src/coordinates_input.c
deleted file mode 100644
index d8d1441..0000000
--- a/src/common/src/coordinates_input.c
+++ /dev/null
@@ -1,146 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: matrixRows_input.c
-
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-vicky_vergara at hotmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "c_common/coordinates_input.h"
-
-#include "c_types/column_info_t.h"
-
-#include "c_common/debug_macro.h"
-#include "c_common/get_check_data.h"
-#include "c_common/time_msg.h"
-
-
-
-static
-void pgr_fetch_row(
-        HeapTuple *tuple,
-        TupleDesc *tupdesc,
-        Column_info_t info[3],
-        int64_t *default_id,
-        Coordinate_t *distance) {
-    if (column_found(info[0].colNumber)) {
-        distance->id = pgr_SPI_getBigInt(tuple, tupdesc, info[0]);
-    } else {
-        distance->id = *default_id;
-        ++(*default_id);
-    }
-    distance->x = pgr_SPI_getFloat8(tuple, tupdesc,  info[1]);
-    distance->y = pgr_SPI_getFloat8(tuple, tupdesc, info[2]);
-}
-
-/*!
- * bigint id,
- * float x,
- * float y,
- */
-void pgr_get_coordinates(
-        char *sql,
-        Coordinate_t **coordinates,
-        size_t *total_coordinates) {
-    clock_t start_t = clock();
-
-    const int tuple_limit = 1000000;
-
-    size_t ntuples;
-    size_t total_tuples = 0;
-
-    Column_info_t info[3];
-
-    int i;
-    for (i = 0; i < 3; ++i) {
-        info[i].colNumber = -1;
-        info[i].type = 0;
-        info[i].strict = true;
-        info[i].eType = ANY_NUMERICAL;
-    }
-    info[0].name = strdup("id");
-    info[1].name = strdup("x");
-    info[2].name = strdup("y");
-
-    info[0].eType = ANY_INTEGER;
-    info[0].strict = false;
-
-
-    void *SPIplan;
-    SPIplan = pgr_SPI_prepare(sql);
-
-    Portal SPIportal;
-    SPIportal = pgr_SPI_cursor_open(SPIplan);
-
-
-    bool moredata = true;
-    (*total_coordinates) = total_tuples;
-
-    int64_t default_id = 1;
-
-    while (moredata == true) {
-        SPI_cursor_fetch(SPIportal, true, tuple_limit);
-        if (total_tuples == 0)
-            pgr_fetch_column_info(info, 3);
-
-        ntuples = SPI_processed;
-        total_tuples += ntuples;
-
-        if (ntuples > 0) {
-            if ((*coordinates) == NULL)
-                (*coordinates) = (Coordinate_t *)
-                    palloc0(total_tuples * sizeof(Coordinate_t));
-            else
-                (*coordinates) = (Coordinate_t *)
-                    repalloc((*coordinates),
-                            total_tuples * sizeof(Coordinate_t));
-
-            if ((*coordinates) == NULL) {
-                elog(ERROR, "Out of memory");
-            }
-
-            SPITupleTable *tuptable = SPI_tuptable;
-            TupleDesc tupdesc = SPI_tuptable->tupdesc;
-            PGR_DBG("Processing %ld coordinates tupĺes", ntuples);
-
-            size_t t;
-            for (t = 0; t < ntuples; t++) {
-                HeapTuple tuple = tuptable->vals[t];
-                pgr_fetch_row(&tuple, &tupdesc, info,
-                        &default_id,
-                        &(*coordinates)[total_tuples - ntuples + t]);
-            }
-            SPI_freetuptable(tuptable);
-        } else {
-            moredata = false;
-        }
-    }
-
-    SPI_cursor_close(SPIportal);
-
-
-    if (total_tuples == 0) {
-        (*total_coordinates) = 0;
-        PGR_DBG("NO coordinates");
-        return;
-    }
-
-    (*total_coordinates) = total_tuples;
-    time_msg(" reading coordinates:", start_t, clock());
-}
diff --git a/src/common/src/edges_input.c b/src/common/src/edges_input.c
deleted file mode 100644
index e58308b..0000000
--- a/src/common/src/edges_input.c
+++ /dev/null
@@ -1,601 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: edges_input.c
-
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-vicky_vergara at hotmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "c_common/edges_input.h"
-
-#include "c_types/column_info_t.h"
-
-#include "c_common/debug_macro.h"
-#include "c_common/get_check_data.h"
-#include "c_common/time_msg.h"
-
-static
-void fetch_basic_edge(
-    HeapTuple *tuple,
-    TupleDesc *tupdesc,
-    Column_info_t info[5],
-    int64_t *default_id,
-    pgr_basic_edge_t *edge,
-    size_t *valid_edges) {
-    if (column_found(info[0].colNumber)) {
-        edge->id = pgr_SPI_getBigInt(tuple, tupdesc, info[0]);
-    } else {
-        edge->id = *default_id;
-        ++(*default_id);
-    }
-
-    edge->source = pgr_SPI_getBigInt(tuple, tupdesc, info[1]);
-    edge->target = pgr_SPI_getBigInt(tuple, tupdesc, info[2]);
-    edge->going = pgr_SPI_getFloat8(tuple, tupdesc, info[3]) > 0 ? true : false;
-    edge->coming = (column_found(info[4].colNumber) && pgr_SPI_getFloat8(tuple, tupdesc, info[4]) > 0) ? true : false;
-
-    (*valid_edges)++;
-}
-
-static
-void fetch_edge(
-        HeapTuple *tuple,
-        TupleDesc *tupdesc,
-        Column_info_t info[5],
-        int64_t *default_id,
-        float8 default_rcost,
-        pgr_edge_t *edge,
-        size_t *valid_edges,
-        bool normal) {
-    if (column_found(info[0].colNumber)) {
-        edge->id = pgr_SPI_getBigInt(tuple, tupdesc, info[0]);
-    } else {
-        edge->id = *default_id;
-        ++(*default_id);
-    }
-
-    if (normal) {
-        edge->source = pgr_SPI_getBigInt(tuple, tupdesc,  info[1]);
-        edge->target = pgr_SPI_getBigInt(tuple, tupdesc, info[2]);
-    } else {
-        edge->target = pgr_SPI_getBigInt(tuple, tupdesc,  info[1]);
-        edge->source = pgr_SPI_getBigInt(tuple, tupdesc, info[2]);
-    }
-
-    edge->cost = pgr_SPI_getFloat8(tuple, tupdesc, info[3]);
-
-    if (column_found(info[4].colNumber)) {
-        edge->reverse_cost = pgr_SPI_getFloat8(tuple, tupdesc, info[4]);
-    } else {
-        edge->reverse_cost = default_rcost;
-    }
-
-    *valid_edges = edge->cost < 0? *valid_edges: *valid_edges + 1;
-    *valid_edges = edge->reverse_cost < 0? *valid_edges: *valid_edges + 1;
-}
-
-static
-void fetch_edge_with_xy(
-        HeapTuple *tuple,
-        TupleDesc *tupdesc,
-        Column_info_t info[9],
-        int64_t *default_id,
-        float8 default_rcost,
-        Pgr_edge_xy_t *edge,
-        size_t *valid_edges,
-        bool normal) {
-    if (column_found(info[0].colNumber)) {
-        edge->id = pgr_SPI_getBigInt(tuple, tupdesc, info[0]);
-    } else {
-        edge->id = *default_id;
-        ++(*default_id);
-    }
-
-    if (normal) {
-        edge->source = pgr_SPI_getBigInt(tuple, tupdesc,  info[1]);
-        edge->target = pgr_SPI_getBigInt(tuple, tupdesc, info[2]);
-    } else {
-        edge->target = pgr_SPI_getBigInt(tuple, tupdesc,  info[1]);
-        edge->source = pgr_SPI_getBigInt(tuple, tupdesc, info[2]);
-    }
-    edge->cost = pgr_SPI_getFloat8(tuple, tupdesc, info[3]);
-
-    if (column_found(info[4].colNumber)) {
-        edge->reverse_cost = pgr_SPI_getFloat8(tuple, tupdesc, info[4]);
-    } else {
-        edge->reverse_cost = default_rcost;
-    }
-
-    edge->x1 = pgr_SPI_getFloat8(tuple, tupdesc, info[5]);
-    edge->y1 = pgr_SPI_getFloat8(tuple, tupdesc, info[6]);
-    edge->x2 = pgr_SPI_getFloat8(tuple, tupdesc, info[7]);
-    edge->y2 = pgr_SPI_getFloat8(tuple, tupdesc, info[8]);
-
-    *valid_edges = edge->cost < 0? *valid_edges: *valid_edges + 1;
-    *valid_edges = edge->reverse_cost < 0? *valid_edges: *valid_edges + 1;
-}
-
-static
-void
-get_edges_9_columns(
-        char *sql,
-        Pgr_edge_xy_t **edges,
-        size_t *total_edges,
-        bool normal) {
-    clock_t start_t = clock();
-
-    const int tuple_limit = 1000000;
-
-    size_t ntuples;
-    size_t total_tuples;
-    size_t valid_edges;
-
-    Column_info_t info[9];
-
-    info[0].name = strdup("id");
-    info[1].name = strdup("source");
-    info[2].name = strdup("target");
-    info[3].name = strdup("cost");
-    info[4].name = strdup("reverse_cost");
-    info[5].name = strdup("x1");
-    info[6].name = strdup("y1");
-    info[7].name = strdup("x2");
-    info[8].name = strdup("y2");
-
-    int i;
-    for (i = 0; i < 3; ++i) {
-        info[i].colNumber = -1;
-        info[i].type = 0;
-        info[i].strict = true;
-        info[i].eType = ANY_INTEGER;
-    }
-    for (i = 3; i < 9; ++i) {
-        info[i].colNumber = -1;
-        info[i].type = 0;
-        info[i].strict = true;
-        info[i].eType = ANY_NUMERICAL;
-    }
-    /*
-     * reverse_cost is optional
-     */
-    info[4].strict = false;
-
-
-    void *SPIplan;
-    SPIplan = pgr_SPI_prepare(sql);
-
-    Portal SPIportal;
-    SPIportal = pgr_SPI_cursor_open(SPIplan);
-
-
-    bool moredata = true;
-    (*total_edges) = total_tuples = valid_edges = 0;
-
-
-    int64_t default_id = 0;
-    while (moredata == true) {
-        SPI_cursor_fetch(SPIportal, true, tuple_limit);
-        if (total_tuples == 0)
-            pgr_fetch_column_info(info, 9);
-
-        ntuples = SPI_processed;
-        total_tuples += ntuples;
-
-        if (ntuples > 0) {
-            if ((*edges) == NULL)
-                (*edges) = (Pgr_edge_xy_t *)
-                    palloc0(total_tuples * sizeof(Pgr_edge_xy_t));
-            else
-                (*edges) = (Pgr_edge_xy_t *)
-                    repalloc((*edges), total_tuples * sizeof(Pgr_edge_xy_t));
-
-            if ((*edges) == NULL) {
-                elog(ERROR, "Out of memory");
-            }
-
-            size_t t;
-            SPITupleTable *tuptable = SPI_tuptable;
-            TupleDesc tupdesc = SPI_tuptable->tupdesc;
-            for (t = 0; t < ntuples; t++) {
-                HeapTuple tuple = tuptable->vals[t];
-                fetch_edge_with_xy(&tuple, &tupdesc, info,
-                        &default_id, -1,
-                        &(*edges)[total_tuples - ntuples + t],
-                        &valid_edges, normal);
-            }
-            SPI_freetuptable(tuptable);
-        } else {
-            moredata = false;
-        }
-    }
-
-    SPI_cursor_close(SPIportal);
-
-    if (total_tuples == 0 || valid_edges == 0) {
-        PGR_DBG("No edges found");
-    }
-
-    (*total_edges) = total_tuples;
-    PGR_DBG("Finish reading %ld edges", total_tuples);
-    time_msg("reading edges", start_t, clock());
-}
-
-
-
-static
-void
-get_edges_5_columns(
-        char *sql,
-        pgr_edge_t **edges,
-        size_t *totalTuples,
-        bool ignore_id,
-        bool normal) {
-    clock_t start_t = clock();
-
-    const int tuple_limit = 1000000;
-
-    size_t ntuples;
-    size_t total_tuples;
-    size_t valid_edges;
-
-    Column_info_t info[5];
-
-    int i;
-    for (i = 0; i < 5; ++i) {
-        info[i].colNumber = -1;
-        info[i].type = 0;
-        info[i].strict = true;
-        info[i].eType = ANY_INTEGER;
-    }
-    info[0].name = strdup("id");
-    info[1].name = strdup("source");
-    info[2].name = strdup("target");
-    info[3].name = strdup("cost");
-    info[4].name = strdup("reverse_cost");
-
-    info[0].strict = !ignore_id;
-    info[4].strict = false;
-
-    info[3].eType = ANY_NUMERICAL;
-    info[4].eType = ANY_NUMERICAL;
-
-
-    void *SPIplan;
-    SPIplan = pgr_SPI_prepare(sql);
-
-    Portal SPIportal;
-    SPIportal = pgr_SPI_cursor_open(SPIplan);
-
-
-    bool moredata = true;
-    (*totalTuples) = total_tuples = valid_edges = 0;
-
-
-    int64_t default_id = 0;
-    while (moredata == true) {
-        SPI_cursor_fetch(SPIportal, true, tuple_limit);
-        if (total_tuples == 0)
-            pgr_fetch_column_info(info, 5);
-
-        ntuples = SPI_processed;
-        total_tuples += ntuples;
-
-        if (ntuples > 0) {
-            if ((*edges) == NULL)
-                (*edges) = (pgr_edge_t *)
-                    palloc0(total_tuples * sizeof(pgr_edge_t));
-            else
-                (*edges) = (pgr_edge_t *)
-                    repalloc((*edges), total_tuples * sizeof(pgr_edge_t));
-
-            if ((*edges) == NULL) {
-                elog(ERROR, "Out of memory");
-            }
-
-            size_t t;
-            SPITupleTable *tuptable = SPI_tuptable;
-            TupleDesc tupdesc = SPI_tuptable->tupdesc;
-            for (t = 0; t < ntuples; t++) {
-                HeapTuple tuple = tuptable->vals[t];
-                fetch_edge(&tuple, &tupdesc, info,
-                        &default_id, -1,
-                        &(*edges)[total_tuples - ntuples + t],
-                        &valid_edges,
-                        normal);
-            }
-            SPI_freetuptable(tuptable);
-        } else {
-            moredata = false;
-        }
-    }
-
-    SPI_cursor_close(SPIportal);
-
-    if (total_tuples == 0 || valid_edges == 0) {
-        PGR_DBG("No edges found");
-    }
-
-    (*totalTuples) = total_tuples;
-    PGR_DBG("Reading %ld edges", total_tuples);
-    time_msg("reading edges", start_t, clock());
-}
-
-static
-void
-get_edges_flow(
-    char *sql,
-    pgr_edge_t **edges,
-    size_t *totalTuples,
-    bool ignore_id) {
-    clock_t start_t = clock();
-
-    const int tuple_limit = 1000000;
-
-    size_t ntuples;
-    size_t total_tuples;
-    size_t valid_edges;
-
-    Column_info_t info[5];
-
-    int i;
-    for (i = 0; i < 5; ++i) {
-        info[i].colNumber = -1;
-        info[i].type = 0;
-        info[i].strict = true;
-        info[i].eType = ANY_INTEGER;
-    }
-    info[0].name = strdup("id");
-    info[1].name = strdup("source");
-    info[2].name = strdup("target");
-    info[3].name = strdup("capacity");
-    info[4].name = strdup("reverse_capacity");
-
-    info[0].strict = !ignore_id;
-    info[4].strict = false;
-
-    void *SPIplan;
-    SPIplan = pgr_SPI_prepare(sql);
-
-    Portal SPIportal;
-    SPIportal = pgr_SPI_cursor_open(SPIplan);
-
-
-    bool moredata = true;
-    (*totalTuples) = total_tuples = valid_edges = 0;
-
-
-    int64_t default_id = 0;
-    while (moredata == true) {
-        SPI_cursor_fetch(SPIportal, true, tuple_limit);
-        if (total_tuples == 0)
-            pgr_fetch_column_info(info, 5);
-
-        ntuples = SPI_processed;
-        total_tuples += ntuples;
-
-        if (ntuples > 0) {
-            if ((*edges) == NULL)
-                (*edges) = (pgr_edge_t *)palloc0(total_tuples * sizeof(pgr_flow_t));
-            else
-                (*edges) = (pgr_edge_t *)repalloc((*edges), total_tuples * sizeof(pgr_flow_t));
-
-            if ((*edges) == NULL) {
-                elog(ERROR, "Out of memory");
-            }
-
-            size_t t;
-            SPITupleTable *tuptable = SPI_tuptable;
-            TupleDesc tupdesc = SPI_tuptable->tupdesc;
-
-            for (t = 0; t < ntuples; t++) {
-                HeapTuple tuple = tuptable->vals[t];
-                fetch_edge(&tuple, &tupdesc, info,
-                           &default_id, -1,
-                           &(*edges)[total_tuples - ntuples + t],
-                           &valid_edges,
-                           true);
-            }
-            SPI_freetuptable(tuptable);
-        } else {
-            moredata = false;
-        }
-    }
-
-    SPI_cursor_close(SPIportal);
-
-    if (total_tuples == 0 || valid_edges == 0) {
-        PGR_DBG("No edges found");
-    }
-
-    (*totalTuples) = total_tuples;
-    PGR_DBG("Reading %ld edges", total_tuples);
-    time_msg("reading edges", start_t, clock());
-}
-
-static
-void
-get_edges_basic(
-    char *sql,
-    pgr_basic_edge_t **edges,
-    size_t *totalTuples,
-    bool ignore_id) {
-    clock_t start_t = clock();
-
-    const int tuple_limit = 1000000;
-
-    size_t ntuples;
-    size_t total_tuples;
-    size_t valid_edges;
-
-    Column_info_t info[5];
-
-    int i;
-    for (i = 0; i < 5; ++i) {
-        info[i].colNumber = -1;
-        info[i].type = 0;
-        info[i].strict = true;
-        info[i].eType = ANY_INTEGER;
-    }
-    info[0].name = strdup("id");
-    info[1].name = strdup("source");
-    info[2].name = strdup("target");
-    info[3].name = strdup("going");
-    info[4].name = strdup("coming");
-
-    info[0].strict = !ignore_id;
-    info[4].strict = false;
-
-    info[3].eType = ANY_NUMERICAL;
-    info[4].eType = ANY_NUMERICAL;
-
-
-    void *SPIplan;
-    SPIplan = pgr_SPI_prepare(sql);
-
-    Portal SPIportal;
-    SPIportal = pgr_SPI_cursor_open(SPIplan);
-
-
-    bool moredata = true;
-    (*totalTuples) = total_tuples = valid_edges = 0;
-
-
-    int64_t default_id = 0;
-    while (moredata == true) {
-        SPI_cursor_fetch(SPIportal, true, tuple_limit);
-        if (total_tuples == 0)
-            pgr_fetch_column_info(info, 5);
-
-        ntuples = SPI_processed;
-        total_tuples += ntuples;
-
-        if (ntuples > 0) {
-            if ((*edges) == NULL)
-                (*edges) = (pgr_basic_edge_t *)palloc0(
-                        total_tuples * sizeof(pgr_basic_edge_t));
-            else
-                (*edges) = (pgr_basic_edge_t *)repalloc(
-                        (*edges), total_tuples * sizeof(pgr_basic_edge_t));
-
-            if ((*edges) == NULL) {
-                elog(ERROR, "Out of memory");
-            }
-
-            size_t t;
-            SPITupleTable *tuptable = SPI_tuptable;
-            TupleDesc tupdesc = SPI_tuptable->tupdesc;
-
-            for (t = 0; t < ntuples; t++) {
-                HeapTuple tuple = tuptable->vals[t];
-                fetch_basic_edge(&tuple, &tupdesc, info,
-                           &default_id,
-                           &(*edges)[total_tuples - ntuples + t],
-                           &valid_edges);
-            }
-            SPI_freetuptable(tuptable);
-        } else {
-            moredata = false;
-        }
-    }
-
-    SPI_cursor_close(SPIportal);
-
-    if (total_tuples == 0 || valid_edges == 0) {
-        PGR_DBG("No edges found");
-    }
-
-    (*totalTuples) = total_tuples;
-    PGR_DBG("Reading %ld edges", total_tuples);
-    time_msg("reading edges", start_t, clock());
-}
-
-/* select id, source, target, capacity, reverse_capacity */
-void
-pgr_get_flow_edges(
-    char *sql,
-    pgr_edge_t **edges,
-    size_t *total_edges) {
-    bool ignore_id = false;
-    get_edges_flow(sql, edges, total_edges, ignore_id);
-}
-
-/* select id, source, target, cost, reverse_cost */
-void
-pgr_get_edges(
-        char *edges_sql,
-        pgr_edge_t **edges,
-        size_t *total_edges) {
-    bool ignore_id = false;
-    bool normal = true;
-    get_edges_5_columns(edges_sql, edges, total_edges, ignore_id, normal);
-}
-
-/* select id, source AS target, target AS source, cost, reverse_cost */
-void
-pgr_get_edges_reversed(
-        char *edges_sql,
-        pgr_edge_t **edges,
-        size_t *total_edges) {
-    bool ignore_id = false;
-    bool normal = false;
-    get_edges_5_columns(edges_sql, edges, total_edges, ignore_id, normal);
-}
-
-/* select source, target, cost, reverse_cost */
-void
-pgr_get_edges_no_id(
-        char *edges_sql,
-        pgr_edge_t **edges,
-        size_t *total_edges) {
-    bool ignore_id = true;
-    bool normal = true;
-    get_edges_5_columns(edges_sql, edges, total_edges, ignore_id, normal);
-}
-
-/* select id, source, target, cost, reverse_cost, x1, y1, x2, y2 */
-void
-pgr_get_edges_xy(
-        char *edges_sql,
-        Pgr_edge_xy_t **edges,
-        size_t *total_edges) {
-    get_edges_9_columns(edges_sql, edges, total_edges, true);
-}
-
-/* select id,
- * source AS target,
- * target AS source,
- * cost, reverse_cost,
- * x1, y1, x2, y2 */
-void
-pgr_get_edges_xy_reversed(
-        char *edges_sql,
-        Pgr_edge_xy_t **edges,
-        size_t *total_edges) {
-    get_edges_9_columns(edges_sql, edges, total_edges, false);
-}
-
-/* used in flow algorithms */
-void
-pgr_get_basic_edges(
-        char *sql,
-        pgr_basic_edge_t **edges,
-        size_t *total_edges) {
-    bool ignore_id = false;
-    get_edges_basic(sql, edges, total_edges, ignore_id);
-}
diff --git a/src/common/src/get_check_data.c b/src/common/src/get_check_data.c
deleted file mode 100644
index d49d6a0..0000000
--- a/src/common/src/get_check_data.c
+++ /dev/null
@@ -1,246 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: get_check_data.c
-
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-vicky_vergara at hotmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "c_common/get_check_data.h"
-
-#include "catalog/pg_type.h"
-
-#include "c_common/debug_macro.h"
-
-char*
-pgr_stradd(const char* a, const char* b) {
-    size_t len = strlen(a) + strlen(b);
-    char *ret = (char*)malloc(len * sizeof(char) + 1);
-    *ret = '\0';
-    return strcat(strcat(ret, a), b);
-}
-
-bool
-column_found(int colNumber) {
-    return !(colNumber == SPI_ERROR_NOATTRIBUTE);
-}
-
-static
-bool
-fetch_column_info(
-        Column_info_t *info) {
-#if 0
-    PGR_DBG("Fetching column info of %s", info->name);
-#endif
-    info->colNumber =  SPI_fnumber(SPI_tuptable->tupdesc, info->name);
-    if (info->strict && !column_found(info->colNumber)) {
-        elog(ERROR, "Column '%s' not Found", info->name);
-    }
-    if (column_found(info->colNumber)) {
-        (info->type) = SPI_gettypeid(SPI_tuptable->tupdesc, (info->colNumber));
-        if (SPI_result == SPI_ERROR_NOATTRIBUTE) {
-            elog(ERROR, "Type of column '%s' not Found", info->name);
-        }
-#if 0
-        PGR_DBG("Column %s found: %lu", info->name, info->type);
-#endif
-        return true;
-    }
-    PGR_DBG("Column %s not found", info->name);
-    return false;
-}
-
-
-void pgr_fetch_column_info(
-        Column_info_t info[],
-        int info_size) {
-    int i;
-    for (i = 0; i < info_size; ++i) {
-        if (fetch_column_info(&info[i])) {
-            switch (info[i].eType) {
-                case ANY_INTEGER:
-                    pgr_check_any_integer_type(info[i]);
-                    break;
-                case ANY_NUMERICAL:
-                    pgr_check_any_numerical_type(info[i]);
-                    break;
-                case TEXT:
-                    pgr_check_text_type(info[i]);
-                    break;
-                case CHAR1:
-                    pgr_check_char_type(info[i]);
-                    break;
-                case ANY_INTEGER_ARRAY:
-                    pgr_check_any_integerarray_type(info[i]);
-                    break;
-                default:
-                    elog(ERROR, "Unknown type of column %s", info[i].name);
-            }
-        }
-    }
-}
-
-
-void
-pgr_check_char_type(Column_info_t info) {
-    if (!(info.type == BPCHAROID)) {
-        elog(ERROR, "Unexpected Column '%s' type. Expected CHAR", info.name);
-    }
-}
-
-void
-pgr_check_text_type(Column_info_t info) {
-    if (!(info.type == TEXTOID)) {
-        elog(ERROR, "Unexpected Column '%s' type. Expected TEXT", info.name);
-    }
-}
-
-void
-pgr_check_any_integer_type(Column_info_t info) {
-    if (!(info.type == INT2OID
-                || info.type == INT4OID
-                || info.type == INT8OID)) {
-        elog(ERROR,
-                "Unexpected Column '%s' type. Expected ANY-INTEGER",
-                info.name);
-    }
-}
-
-void
-pgr_check_any_integerarray_type(Column_info_t info) {
-    if (!(info.type == INT2ARRAYOID
-                || info.type == INT4ARRAYOID
-                || info.type == 1016)) {
-        elog(ERROR,
-                "Unexpected Column '%s' type. Expected ANY-INTEGER-ARRAY",
-                info.name);
-    }
-}
-
-void pgr_check_any_numerical_type(Column_info_t info) {
-    if (!(info.type == INT2OID
-                || info.type == INT4OID
-                || info.type == INT8OID
-                || info.type == FLOAT4OID
-                || info.type == FLOAT8OID)) {
-        elog(ERROR,
-                "Unexpected Column '%s' type. Expected ANY-NUMERICAL",
-                info.name);
-    }
-}
-
-
-/*
- * http://doxygen.postgresql.org/include_2catalog_2pg__type_8h.html;
- */
-char
-pgr_SPI_getChar(
-        HeapTuple *tuple, TupleDesc *tupdesc, Column_info_t info,
-        bool strict, char default_value) {
-    Datum binval;
-    bool isNull;
-    char value = default_value;
-
-    binval = SPI_getbinval(*tuple, *tupdesc, info.colNumber, &isNull);
-    if (!(info.type == BPCHAROID)) {
-        elog(ERROR, "Unexpected Column type of %s. Expected CHAR", info.name);
-    }
-    if (!isNull) {
-        value =  ((char*)binval)[1];
-    } else {
-        if (strict) {
-            elog(ERROR, "Unexpected Null value in column %s", info.name);
-        }
-        value = default_value;
-    }
-    return value;
-}
-
-int64_t
-pgr_SPI_getBigInt(HeapTuple *tuple, TupleDesc *tupdesc, Column_info_t info) {
-    Datum binval;
-    bool isnull;
-    int64_t value = 0;
-    binval = SPI_getbinval(*tuple, *tupdesc, info.colNumber, &isnull);
-    if (isnull)
-        elog(ERROR, "Unexpected Null value in column %s", info.name);
-    switch (info.type) {
-        case INT2OID:
-            value = (int64_t) DatumGetInt16(binval);
-            break;
-        case INT4OID:
-            value = (int64_t) DatumGetInt32(binval);
-            break;
-        case INT8OID:
-            value = DatumGetInt64(binval);
-            break;
-        default:
-            elog(ERROR,
-                    "Unexpected Column type of %s. Expected ANY-INTEGER",
-                    info.name);
-    }
-#if 0
-    PGR_DBG("Variable: %s Value: %ld", info.name, value);
-#endif
-    return value;
-}
-
-double
-pgr_SPI_getFloat8(HeapTuple *tuple, TupleDesc *tupdesc, Column_info_t info) {
-    Datum binval;
-    bool isnull = false;
-    double value = 0.0;
-    binval = SPI_getbinval(*tuple, *tupdesc, info.colNumber, &isnull);
-    if (isnull)
-        elog(ERROR, "Unexpected Null value in column %s", info.name);
-
-    switch (info.type) {
-        case INT2OID:
-            value = (double) DatumGetInt16(binval);
-            break;
-        case INT4OID:
-            value = (double) DatumGetInt32(binval);
-            break;
-        case INT8OID:
-            value = (double) DatumGetInt64(binval);
-            break;
-        case FLOAT4OID:
-            value = (double) DatumGetFloat4(binval);
-            break;
-        case FLOAT8OID:
-            value = DatumGetFloat8(binval);
-            break;
-        default:
-            elog(ERROR,
-                    "Unexpected Column type of %s. Expected ANY-NUMERICAL",
-                    info.name);
-    }
-#if 0
-    PGR_DBG("Variable: %s Value: %lf", info.name, value);
-#endif
-    return value;
-}
-
-/**
- * under development
- */
-char*
-pgr_SPI_getText(HeapTuple *tuple, TupleDesc *tupdesc,  Column_info_t info) {
-    return DatumGetCString(SPI_getvalue(*tuple, *tupdesc, info.colNumber));
-}
diff --git a/src/common/src/matrixRows_input.c b/src/common/src/matrixRows_input.c
deleted file mode 100644
index 9c82796..0000000
--- a/src/common/src/matrixRows_input.c
+++ /dev/null
@@ -1,135 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: matrixRows_input.c
-
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-vicky_vergara at hotmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "c_common/matrixRows_input.h"
-
-#include "c_types/column_info_t.h"
-
-#include "c_common/debug_macro.h"
-#include "c_common/get_check_data.h"
-#include "c_common/time_msg.h"
-
-
-
-static
-void pgr_fetch_row(
-        HeapTuple *tuple,
-        TupleDesc *tupdesc,
-        Column_info_t info[3],
-        Matrix_cell_t *distance) {
-    distance->from_vid = pgr_SPI_getBigInt(tuple, tupdesc,  info[0]);
-    distance->to_vid = pgr_SPI_getBigInt(tuple, tupdesc,  info[1]);
-    distance->cost = pgr_SPI_getFloat8(tuple, tupdesc, info[2]);
-}
-
-/*!
- * bigint start_vid,
- * bigint end_vid,
- * float agg_cost,
- */
-void pgr_get_matrixRows(
-        char *sql,
-        Matrix_cell_t **rows,
-        size_t *total_rows) {
-    clock_t start_t = clock();
-
-    const int tuple_limit = 1000000;
-
-    size_t ntuples;
-    size_t total_tuples = 0;
-
-    Column_info_t info[3];
-
-    int i;
-    for (i = 0; i < 3; ++i) {
-        info[i].colNumber = -1;
-        info[i].type = 0;
-        info[i].strict = true;
-        info[i].eType = ANY_INTEGER;
-    }
-    info[0].name = strdup("start_vid");
-    info[1].name = strdup("end_vid");
-    info[2].name = strdup("agg_cost");
-
-    info[2].eType = ANY_NUMERICAL;
-
-
-    void *SPIplan;
-    SPIplan = pgr_SPI_prepare(sql);
-
-    Portal SPIportal;
-    SPIportal = pgr_SPI_cursor_open(SPIplan);
-
-
-    bool moredata = true;
-    (*total_rows) = total_tuples;
-
-    while (moredata == true) {
-        SPI_cursor_fetch(SPIportal, true, tuple_limit);
-        if (total_tuples == 0)
-            pgr_fetch_column_info(info, 3);
-
-        ntuples = SPI_processed;
-        total_tuples += ntuples;
-
-        if (ntuples > 0) {
-            if ((*rows) == NULL)
-                (*rows) = (Matrix_cell_t *)palloc0(
-                        total_tuples * sizeof(Matrix_cell_t));
-            else
-                (*rows) = (Matrix_cell_t *)repalloc(
-                        (*rows), total_tuples * sizeof(Matrix_cell_t));
-
-            if ((*rows) == NULL) {
-                elog(ERROR, "Out of memory");
-            }
-
-            SPITupleTable *tuptable = SPI_tuptable;
-            TupleDesc tupdesc = SPI_tuptable->tupdesc;
-            PGR_DBG("processing %ld matrix cell tupĺes", ntuples);
-
-            size_t t;
-            for (t = 0; t < ntuples; t++) {
-                HeapTuple tuple = tuptable->vals[t];
-                pgr_fetch_row(&tuple, &tupdesc, info,
-                        &(*rows)[total_tuples - ntuples + t]);
-            }
-            SPI_freetuptable(tuptable);
-        } else {
-            moredata = false;
-        }
-    }
-
-    SPI_cursor_close(SPIportal);
-
-
-    if (total_tuples == 0) {
-        (*total_rows) = 0;
-        PGR_DBG("NO rows");
-        return;
-    }
-
-    (*total_rows) = total_tuples;
-    time_msg(" reading matrix cells", start_t, clock());
-}
diff --git a/src/common/src/orders_input.c b/src/common/src/orders_input.c
deleted file mode 100644
index 54ac7bf..0000000
--- a/src/common/src/orders_input.c
+++ /dev/null
@@ -1,219 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: pd_orders_input.c
-
-Copyright (c) 2016 Celia Virginia Vergara Castillo
-vicky_vergara at hotmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
- ********************************************************************PGR-GNU*/
-
-#include "c_common/orders_input.h"
-
-#include "c_types/column_info_t.h"
-
-#include "c_common/debug_macro.h"
-#include "c_common/get_check_data.h"
-#include "c_common/time_msg.h"
-
-
-static
-void fetch_pd_orders(
-        HeapTuple *tuple,
-        TupleDesc *tupdesc,
-        Column_info_t info[14],
-        bool matrix_version,
-        PickDeliveryOrders_t *pd_order) {
-    pd_order->id = pgr_SPI_getBigInt(tuple, tupdesc, info[0]);
-    pd_order->demand = pgr_SPI_getFloat8(tuple, tupdesc, info[1]);
-
-    /*
-     * the pickups
-     */
-    pd_order->pick_x = matrix_version ? 
-        0 : pgr_SPI_getFloat8(tuple, tupdesc, info[2]);
-    pd_order->pick_y =  matrix_version ? 
-        0 : pgr_SPI_getFloat8(tuple, tupdesc, info[3]);
-    pd_order->pick_open_t = pgr_SPI_getFloat8(tuple, tupdesc, info[4]);
-    pd_order->pick_close_t = pgr_SPI_getFloat8(tuple, tupdesc, info[5]);
-    pd_order->pick_service_t = column_found(info[6].colNumber) ?
-        pgr_SPI_getFloat8(tuple, tupdesc, info[6]) : 0;
-
-    /*
-     * the deliveries
-     */
-    pd_order->deliver_x =  matrix_version ?
-        0 : pgr_SPI_getFloat8(tuple, tupdesc, info[7]);
-    pd_order->deliver_y =  matrix_version ?
-        0 : pgr_SPI_getFloat8(tuple, tupdesc, info[8]);
-    pd_order->deliver_open_t = pgr_SPI_getFloat8(tuple, tupdesc, info[9]);
-    pd_order->deliver_close_t = pgr_SPI_getFloat8(tuple, tupdesc, info[10]);
-    pd_order->deliver_service_t = column_found(info[11].colNumber) ?
-        pgr_SPI_getFloat8(tuple, tupdesc, info[11]) : 0;
-
-    pd_order->pick_node_id = matrix_version ? 
-        pgr_SPI_getBigInt(tuple, tupdesc, info[12]) : 0;
-    pd_order->deliver_node_id = matrix_version ? 
-        pgr_SPI_getBigInt(tuple, tupdesc, info[13]) : 0;
-}
-
-
-
-static
-void
-pgr_get_pd_orders_general(
-        char *pd_orders_sql,
-        PickDeliveryOrders_t **pd_orders,
-        size_t *total_pd_orders,
-        bool with_id) {
-    clock_t start_t = clock();
-
-    const int tuple_limit = 1000000;
-
-    PGR_DBG("pgr_get_pd_orders_data");
-    PGR_DBG("%s", pd_orders_sql);
-
-    Column_info_t info[14];
-
-    int i;
-    for (i = 0; i < 14; ++i) {
-        info[i].colNumber = -1;
-        info[i].type = 0;
-        info[i].strict = true;
-        info[i].eType = ANY_NUMERICAL;
-    }
-
-    info[0].name = strdup("id");
-    info[1].name = strdup("demand");
-    info[2].name = strdup("p_x");
-    info[3].name = strdup("p_y");
-    info[4].name = strdup("p_open");
-    info[5].name = strdup("p_close");
-    info[6].name = strdup("p_service");
-    info[7].name = strdup("d_x");
-    info[8].name = strdup("d_y");
-    info[9].name = strdup("d_open");
-    info[10].name = strdup("d_close");
-    info[11].name = strdup("d_service");
-    info[12].name = strdup("p_node_id");
-    info[13].name = strdup("d_node_id");
-
-    info[0].eType = ANY_INTEGER;
-    info[12].eType = ANY_INTEGER;
-    info[13].eType = ANY_INTEGER;
-
-    /* service is optional*/
-    info[6].strict = false;
-    info[11].strict = false;
-    /* nodes are going to be ignored*/
-    info[12].strict = false;
-    info[13].strict = false;
-
-    if (with_id) {
-        /* (x,y) values are ignored*/
-        info[2].strict = false;
-        info[3].strict = false;
-        info[7].strict = false;
-        info[8].strict = false;
-        /* nodes are compulsory*/
-        info[12].strict = true;
-        info[13].strict = true;
-    }
-
-
-
-    size_t ntuples;
-    size_t total_tuples;
-
-    void *SPIplan;
-    SPIplan = pgr_SPI_prepare(pd_orders_sql);
-    Portal SPIportal;
-    SPIportal = pgr_SPI_cursor_open(SPIplan);
-
-    bool moredata = true;
-    (*total_pd_orders) = total_tuples = 0;
-
-    /* on the first tuple get the column numbers */
-
-    while (moredata == true) {
-        SPI_cursor_fetch(SPIportal, true, tuple_limit);
-        if (total_tuples == 0) {
-            pgr_fetch_column_info(info, 14);
-        }
-        ntuples = SPI_processed;
-        total_tuples += ntuples;
-        PGR_DBG("SPI_processed %ld", ntuples);
-        if (ntuples > 0) {
-            if ((*pd_orders) == NULL)
-                (*pd_orders) = (PickDeliveryOrders_t *)palloc0(
-                        total_tuples * sizeof(PickDeliveryOrders_t));
-            else
-                (*pd_orders) = (PickDeliveryOrders_t *)repalloc(
-                        (*pd_orders),
-                        total_tuples * sizeof(PickDeliveryOrders_t));
-
-            if ((*pd_orders) == NULL) {
-                elog(ERROR, "Out of memory");
-            }
-
-            size_t t;
-            SPITupleTable *tuptable = SPI_tuptable;
-            TupleDesc tupdesc = SPI_tuptable->tupdesc;
-            PGR_DBG("processing %ld", ntuples);
-            for (t = 0; t < ntuples; t++) {
-                HeapTuple tuple = tuptable->vals[t];
-                fetch_pd_orders(&tuple, &tupdesc, info, with_id,
-                        &(*pd_orders)[total_tuples - ntuples + t]);
-            }
-            SPI_freetuptable(tuptable);
-        } else {
-            moredata = false;
-        }
-    }
-
-    SPI_cursor_close(SPIportal);
-
-    if (total_tuples == 0) {
-        (*total_pd_orders) = 0;
-        PGR_DBG("NO orders");
-        return;
-    }
-
-    (*total_pd_orders) = total_tuples;
-    if (with_id) {
-        PGR_DBG("Finish reading %ld orders for matrix", (*total_pd_orders));
-    } else {
-        PGR_DBG("Finish reading %ld orders for eucledian", (*total_pd_orders));
-    }
-    time_msg("reading edges", start_t, clock());
-}
-
-void
-pgr_get_pd_orders(
-        char *pd_orders_sql,
-        PickDeliveryOrders_t **pd_orders,
-        size_t *total_pd_orders) {
-    pgr_get_pd_orders_general(pd_orders_sql, pd_orders, total_pd_orders, false);
-}
-
-void
-pgr_get_pd_orders_with_id(
-        char *pd_orders_sql,
-        PickDeliveryOrders_t **pd_orders,
-        size_t *total_pd_orders) {
-    pgr_get_pd_orders_general(pd_orders_sql, pd_orders, total_pd_orders, true);
-}
diff --git a/src/common/src/pgr_alloc.cpp b/src/common/src/pgr_alloc.cpp
deleted file mode 100644
index 85d2353..0000000
--- a/src/common/src/pgr_alloc.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: pgr_palloc.cpp
-
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-Mail: vicky_vergara at hotmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "cpp_common/pgr_alloc.hpp"
-#include <string>
-
-char *
-pgr_msg(const std::string &msg) {
-    char* duplicate = NULL;
-    duplicate = pgr_alloc(msg.size() + 1, duplicate);
-    memcpy(duplicate, msg.c_str(), msg.size());
-    duplicate[msg.size()] = '\0';
-    return duplicate;
-}
-
diff --git a/src/common/src/pgr_logger.h b/src/common/src/pgr_logger.h
deleted file mode 100644
index 089ca25..0000000
--- a/src/common/src/pgr_logger.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*PGR-MIT******************************************************************
- *
- * file pgr_logger.h
- *
-    Author: Stephen Woodbridge
-    Date: 2014-05-04
-    License: MIT-X
- *      
- * This is free software; you can redistribute and/or modify it under
- * the terms of the MIT License. Please file MIT-LICENSE for details.
- *  
- *****************************************************************PGR-MIT*/
-
-/*
-    pgr_logger.h
-
-    A simple logging mechanism the can be disabled for production
-    and should work in C or C++ code.
-
-    USAGE:
-
-    #define PGR_LOGGERR_ON
-    #undef PGR_LOGGER_ON  // turn off logging for production
-
-    // override the default log file "/tmp/pgr_logger.log"
-    #define PGR_LOGGER_FILE "mylogger.log"
-
-    #undef PGR_LOGGER_LOC  // don't log filename and line number
-    #define PGR_LOGGER_LOC  // log filename and line number with log message
-
-    // include the logger macros and configure based on defines above
-    #include pgr_logger.h
-    
-    // log a message to the log file
-    PGR_LOGF(format, args);
-    PGR_LOGF("%s at %d\n", "this is a message", time());
-    PGR_LOG("just print a string to the log");
-
-    This will log something like:
-
-    myfile.cpp:123: this is a message at 1399216875
-    myfile.cpp:124: just print a string to the log
-
-*/
-#ifndef PGR_LOGGER_H
-#define PGR_LOGGER_H
-
-#include <stdio.h>
-
-#if defined(PGR_LOGGER_LOC)
-#  undef PGR_LOGGER_LOC_
-#  define PGR_LOGGER_LOC_ 1
-#else
-#  undef PGR_LOGGER_LOC_
-#  define PGR_LOGGER_LOC_ 0
-#endif
-
-#ifndef PGR_LOGGER_FILE
-#  define PGR_LOGGER_FILE "/tmp/pgr_logger.log"
-#endif
-
-#ifdef PGR_LOGGER_ON
-#  define PGR_LOGF(format, ...) { \
-     FILE *fp = fopen(PGR_LOGGER_FILE, "a+"); \
-     if (PGR_LOGGER_LOC_) fprintf(fp, "%s:%d: ", __FILE__, __LINE__); \
-     fprintf(fp, format, __VA_ARGS__); \
-     fclose(fp); }
-#else  // ifndef LOGGER_ON
-#  define PGR_LOGF(format, ...)
-#endif  // ifndef LOGGER_ON
-
-#define PGR_LOG(str) PGR_LOGF("%s\n", str)
-
-#endif  // ifndef PGR_LOGGER_H
diff --git a/src/common/src/points_input.c b/src/common/src/points_input.c
deleted file mode 100644
index 249e863..0000000
--- a/src/common/src/points_input.c
+++ /dev/null
@@ -1,153 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: points_input.c
-
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-vicky_vergara at hotmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "c_common/points_input.h"
-
-#include "c_types/column_info_t.h"
-
-#include "c_common/debug_macro.h"
-#include "c_common/get_check_data.h"
-
-
-
-static
-void fetch_point(
-        HeapTuple *tuple,
-        TupleDesc *tupdesc,
-        Column_info_t info[4],
-        int64_t *default_pid,
-        char default_side,
-        Point_on_edge_t *point) {
-    if (column_found(info[0].colNumber)) {
-        point->pid = pgr_SPI_getBigInt(tuple, tupdesc, info[0]);
-    } else {
-        point->pid = *default_pid;
-        ++(*default_pid);
-    }
-
-    point->edge_id = pgr_SPI_getBigInt(tuple, tupdesc, info[1]);
-    point->fraction = pgr_SPI_getFloat8(tuple, tupdesc, info[2]);
-
-    if (column_found(info[3].colNumber)) {
-        point->side =
-            (char)pgr_SPI_getChar(tuple, tupdesc, info[3], false, default_side);
-    } else {
-        point->side = default_side;
-    }
-}
-
-
-// pid, edge_id, fraction, [side]
-void
-pgr_get_points(
-        char *points_sql,
-        Point_on_edge_t **points,
-        size_t *total_points) {
-    const int tuple_limit = 1000;
-
-    size_t ntuples;
-    size_t total_tuples;
-    Column_info_t info[4];
-
-    int i;
-    for (i = 0; i < 4; ++i) {
-        info[i].colNumber = -1;
-        info[i].type = 0;
-        info[i].strict = true;
-        info[i].eType = ANY_INTEGER;
-    }
-
-    info[0].name = strdup("pid");
-    info[1].name = strdup("edge_id");
-    info[2].name = strdup("fraction");
-    info[3].name = strdup("side");
-
-    info[0].strict = false;
-    info[3].strict = false;
-    info[2].eType = ANY_NUMERICAL;
-    info[3].eType = CHAR1;
-
-
-    void *SPIplan;
-    SPIplan = pgr_SPI_prepare(points_sql);
-
-    Portal SPIportal;
-    SPIportal = pgr_SPI_cursor_open(SPIplan);
-
-    bool moredata = true;
-    (*total_points) = total_tuples = 0;
-
-    int64_t default_pid = 0;
-    char default_side = 'b';
-
-    while (moredata == true) {
-        SPI_cursor_fetch(SPIportal, true, tuple_limit);
-        if (total_tuples == 0) {
-            /* on the first tuple get the column information */
-            pgr_fetch_column_info(info, 4);
-        }
-
-        ntuples = SPI_processed;
-        total_tuples += ntuples;
-
-        if (ntuples > 0) {
-            if ((*points) == NULL)
-                (*points) = (Point_on_edge_t *)
-                    palloc0(total_tuples * sizeof(Point_on_edge_t));
-            else
-                (*points) = (Point_on_edge_t *)
-                    repalloc((*points), total_tuples * sizeof(Point_on_edge_t));
-
-            if ((*points) == NULL) {
-                elog(ERROR, "Out of memory");
-            }
-
-            SPITupleTable *tuptable = SPI_tuptable;
-            TupleDesc tupdesc = SPI_tuptable->tupdesc;
-            size_t t;
-
-            PGR_DBG("processing %ld points tuples", ntuples);
-            for (t = 0; t < ntuples; t++) {
-                HeapTuple tuple = tuptable->vals[t];
-                fetch_point(&tuple, &tupdesc, info,
-                        &default_pid, default_side,
-                        &(*points)[total_tuples - ntuples + t]);
-            }
-            SPI_freetuptable(tuptable);
-        } else {
-            moredata = false;
-        }
-    }
-    SPI_cursor_close(SPIportal);
-
-
-    if (total_tuples == 0) {
-        (*total_points) = 0;
-        PGR_DBG("NO points");
-        return;
-    }
-
-    (*total_points) = total_tuples;
-    PGR_DBG("Finish reading %ld points, %ld", total_tuples, (*total_points));
-}
diff --git a/src/common/src/postgres_connection.c b/src/common/src/postgres_connection.c
deleted file mode 100644
index 6765894..0000000
--- a/src/common/src/postgres_connection.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: postgres_connection.c
-
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-vicky_vergara at hotmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "c_common/postgres_connection.h"
-#include "utils/builtins.h"
-
-#include "catalog/pg_type.h"
-
-#include <string.h>
-
-#include "c_common/debug_macro.h"
-
-void
-pgr_send_error(int errcode) {
-    switch (errcode) {
-        case 1:
-            elog(ERROR, "Unexpected point(s) with same pid but different"
-                   " edge/fraction/side combination found.");
-            break;
-        case 2:
-            elog(ERROR, "Internal: Unexpected mismatch "
-                   "count and sequence number on results");
-            break;
-        default:
-            elog(ERROR, "Unknown exception");
-    }
-}
-
-
-char*
-pgr_cstring2char(const char *inStr) {
-
-    if(!inStr) return NULL;
-
-    char *outStr;
-    outStr = palloc(strlen(inStr));
-    if (!outStr) return NULL;
-
-    memcpy(outStr, inStr, strlen(inStr));
-
-    outStr[strlen(inStr)] = '\0';
-
-    return outStr;
-}
-
-
-
-// http://www.postgresql.org/docs/9.4/static/spi-spi-finish.html
-void
-pgr_SPI_finish(void) {
-#if 0
-    PGR_DBG("Disconnecting SPI");
-#endif
-    int code = SPI_OK_FINISH;
-    code = SPI_finish();
-    if (code != SPI_OK_FINISH) {  // SPI_ERROR_UNCONNECTED
-        elog(ERROR, "There was no connection to SPI");
-    }
-}
-
-void
-pgr_SPI_connect(void) {
-#if 0
-    PGR_DBG("Connecting to SPI");
-#endif
-    int SPIcode;
-    SPIcode = SPI_connect();
-    if (SPIcode  != SPI_OK_CONNECT) {
-        elog(ERROR, "Couldn't open a connection to SPI");
-    }
-}
-
-SPIPlanPtr
-pgr_SPI_prepare(char* sql) {
-#if 0
-    PGR_DBG("Preparing Plan");
-#endif
-    SPIPlanPtr SPIplan;
-    SPIplan = SPI_prepare(sql, 0, NULL);
-    if (SPIplan  == NULL) {
-        elog(ERROR, "Couldn't create query plan via SPI: %s", sql);
-    }
-    return SPIplan;
-}
-
-Portal
-pgr_SPI_cursor_open(SPIPlanPtr SPIplan) {
-#if 0
-    PGR_DBG("Opening Portal");
-#endif
-    Portal SPIportal;
-    SPIportal = SPI_cursor_open(NULL, SPIplan, NULL, NULL, true);
-    if (SPIportal == NULL) {
-        elog(ERROR, "SPI_cursor_open returns NULL");
-    }
-    return SPIportal;
-}
diff --git a/src/common/src/restrict_input.c b/src/common/src/restrict_input.c
deleted file mode 100644
index 825e0b4..0000000
--- a/src/common/src/restrict_input.c
+++ /dev/null
@@ -1,173 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: restrict_input.c
-
-Copyright (c) 2017 Celia Virginia Vergara Castillo
-vicky_vergara at hotmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "c_common/restrict_input.h"
-
-#include "c_types/column_info_t.h"
-
-#include "c_common/debug_macro.h"
-#include "c_common/time_msg.h"
-#include "c_common/get_check_data.h"
-
-#if 1
-
-static
-void fetch_restriction(
-        HeapTuple *tuple,
-        TupleDesc *tupdesc,
-        Column_info_t info[4],
-        Restrict_t *restriction) {
-    restriction->id = pgr_SPI_getBigInt(tuple, tupdesc, info[0]);
-    restriction->cost = pgr_SPI_getFloat8(tuple, tupdesc,  info[1]);
-    char *str = DatumGetCString(
-            SPI_getvalue(*tuple, *tupdesc, info[2].colNumber));
-
-// TODO(someone) because its text, no guarantee the text read is correct
-// move this code to c++ to tokenize the integers.
-    int i = 0;
-    for (i = 0; i < MAX_RULE_LENGTH; ++i) restriction->restricted_edges[i] = -1;
-    str[0] = ',';
-    if (str != NULL) {
-        char *token = NULL;
-        int i = 0;
-
-        token = (char *)strtok(str, " ,");
-
-        while (token != NULL && i < MAX_RULE_LENGTH) {
-            restriction->restricted_edges[i] = atoi(token);
-            i++;
-            token = (char *)strtok(NULL, " ,");
-        }
-    }
-}
-
-#endif
-
-
-void
-pgr_get_restriction_data(
-        char *restrictions_sql,
-        Restrict_t **restrictions,
-        size_t *total_restrictions) {
-    const int tuple_limit = 1000000;
-    clock_t start_t = clock();
-
-    PGR_DBG("pgr_get_restriction_data");
-    PGR_DBG("%s", restrictions_sql);
-    Column_info_t info[3];
-
-    int i;
-    for (i = 0; i < 3; ++i) {
-        info[i].colNumber = -1;
-        info[i].type = 0;
-        info[i].strict = true;
-        info[i].eType = ANY_INTEGER;
-    }
-    info[0].name = strdup("id");
-    info[1].name = strdup("cost");
-    info[2].name = strdup("restricted_edges");
-
-    info[1].eType = ANY_NUMERICAL;
-    info[2].eType = ANY_INTEGER_ARRAY;
-
-#if 0
-    // experiment starts
-
-    size_t total_tuples = (*total_restrictions) ;
-
-    (*restrictions) = (Restrict_t *)palloc0(sizeof(Restrict_t));
-
-    (*restrictions)[0].id = 1;
-    (*restrictions)[0].cost = -1;
-    (*restrictions)[0].restricted_edges[0] = 4;
-    (*restrictions)[0].restricted_edges[1] = 7;
-
-    // experiment ends
-#endif
-
-#if 1
-    size_t ntuples;
-    size_t total_tuples;
-
-    void *SPIplan;
-    SPIplan = pgr_SPI_prepare(restrictions_sql);
-    Portal SPIportal;
-    SPIportal = pgr_SPI_cursor_open(SPIplan);
-
-    bool moredata = true;
-    (*total_restrictions) = total_tuples = 0;
-
-
-    while (moredata == true) {
-        SPI_cursor_fetch(SPIportal, true, tuple_limit);
-        if (total_tuples == 0) {
-            pgr_fetch_column_info(info, 3);
-        }
-        ntuples = SPI_processed;
-        total_tuples += ntuples;
-        PGR_DBG("SPI_processed %ld", ntuples);
-        if (ntuples > 0) {
-            if ((*restrictions) == NULL)
-                (*restrictions) = (Restrict_t *)palloc0(
-                        total_tuples * sizeof(Restrict_t));
-            else
-                (*restrictions) = (Restrict_t *)repalloc(
-                        (*restrictions),
-                        total_tuples * sizeof(Restrict_t));
-
-            if ((*restrictions) == NULL) {
-                elog(ERROR, "Out of memory");
-            }
-
-            size_t t;
-            SPITupleTable *tuptable = SPI_tuptable;
-            TupleDesc tupdesc = SPI_tuptable->tupdesc;
-            PGR_DBG("processing %ld", ntuples);
-            for (t = 0; t < ntuples; t++) {
-                HeapTuple tuple = tuptable->vals[t];
-                fetch_restriction(&tuple, &tupdesc, info,
-                        &(*restrictions)[total_tuples - ntuples + t]);
-            }
-            SPI_freetuptable(tuptable);
-        } else {
-            moredata = false;
-        }
-    }
-
-    SPI_cursor_close(SPIportal);
-
-    if (total_tuples == 0) {
-        (*total_restrictions) = 0;
-        PGR_DBG("NO restrictions");
-        return;
-    }
-
-    (*total_restrictions) = total_tuples;
-#endif
-    PGR_DBG("Finish reading %ld data, %ld",
-            total_tuples,
-            (*total_restrictions));
-    clock_t end_t = clock();
-    time_msg(" reading Restrictions", start_t, end_t);
-}
diff --git a/src/common/src/restrictions_input.c b/src/common/src/restrictions_input.c
deleted file mode 100644
index a955267..0000000
--- a/src/common/src/restrictions_input.c
+++ /dev/null
@@ -1,157 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: restrictions_input.c
-
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-vicky_vergara at hotmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "c_common/restrictions_input.h"
-
-#include "c_types/column_info_t.h"
-
-#include "c_common/debug_macro.h"
-#include "c_common/time_msg.h"
-#include "c_common/get_check_data.h"
-
-
-static
-void fetch_restriction(
-        HeapTuple *tuple,
-        TupleDesc *tupdesc,
-        Column_info_t info[4],
-        Restrict_t *restriction) {
-    restriction->target_id = pgr_SPI_getBigInt(tuple, tupdesc, info[0]);
-    restriction->to_cost = pgr_SPI_getFloat8(tuple, tupdesc,  info[1]);
-    char *str = DatumGetCString(
-            SPI_getvalue(*tuple, *tupdesc, info[2].colNumber));
-
-// TODO(someone) because its text, no guarantee the text read is correct
-// move this code to c++ to tokenize the integers.
-
-    int i = 0;
-    for (i = 0; i < MAX_RULE_LENGTH; ++i) restriction->via[i] = -1;
-
-    if (str != NULL) {
-        char *token = NULL;
-        int i = 0;
-
-        token = (char *)strtok(str, " ,");
-
-        while (token != NULL && i < MAX_RULE_LENGTH) {
-            restriction->via[i] = atoi(token);
-            i++;
-            token = (char *)strtok(NULL, " ,");
-        }
-    }
-}
-
-
-void
-pgr_get_restriction_data(
-        char *restrictions_sql,
-        Restrict_t **restrictions,
-        size_t *total_restrictions) {
-    const int tuple_limit = 1000000;
-    clock_t start_t = clock();
-
-    PGR_DBG("pgr_get_restriction_data");
-    PGR_DBG("%s", restrictions_sql);
-
-    Column_info_t info[3];
-
-    int i;
-    for (i = 0; i < 3; ++i) {
-        info[i].colNumber = -1;
-        info[i].type = 0;
-        info[i].strict = true;
-        info[i].eType = ANY_INTEGER;
-    }
-    info[0].name = strdup("target_id");
-    info[1].name = strdup("to_cost");
-    info[2].name = strdup("via_path");
-
-    info[1].eType = ANY_NUMERICAL;
-    info[2].eType = TEXT;
-
-
-    size_t ntuples;
-    size_t total_tuples;
-
-    void *SPIplan;
-    SPIplan = pgr_SPI_prepare(restrictions_sql);
-    Portal SPIportal;
-    SPIportal = pgr_SPI_cursor_open(SPIplan);
-
-    bool moredata = true;
-    (*total_restrictions) = total_tuples = 0;
-
-    /*  on the first tuple get the column numbers */
-
-    while (moredata == true) {
-        SPI_cursor_fetch(SPIportal, true, tuple_limit);
-        if (total_tuples == 0) {
-            pgr_fetch_column_info(info, 3);
-        }
-        ntuples = SPI_processed;
-        total_tuples += ntuples;
-        PGR_DBG("SPI_processed %ld", ntuples);
-        if (ntuples > 0) {
-            if ((*restrictions) == NULL)
-                (*restrictions) = (Restrict_t *)palloc0(
-                        total_tuples * sizeof(Restrict_t));
-            else
-                (*restrictions) = (Restrict_t *)repalloc(
-                        (*restrictions),
-                        total_tuples * sizeof(Restrict_t));
-
-            if ((*restrictions) == NULL) {
-                elog(ERROR, "Out of memory");
-            }
-
-            size_t t;
-            SPITupleTable *tuptable = SPI_tuptable;
-            TupleDesc tupdesc = SPI_tuptable->tupdesc;
-            PGR_DBG("processing %ld", ntuples);
-            for (t = 0; t < ntuples; t++) {
-                HeapTuple tuple = tuptable->vals[t];
-                fetch_restriction(&tuple, &tupdesc, info,
-                        &(*restrictions)[total_tuples - ntuples + t]);
-            }
-            SPI_freetuptable(tuptable);
-        } else {
-            moredata = false;
-        }
-    }
-
-    SPI_cursor_close(SPIportal);
-
-    if (total_tuples == 0) {
-        (*total_restrictions) = 0;
-        PGR_DBG("NO restrictions");
-        return;
-    }
-
-    (*total_restrictions) = total_tuples;
-    PGR_DBG("Finish reading %ld data, %ld",
-            total_tuples,
-            (*total_restrictions));
-    clock_t end_t = clock();
-    time_msg(" reading Restrictions", start_t, end_t);
-}
diff --git a/src/common/src/signalhandler.cpp b/src/common/src/signalhandler.cpp
deleted file mode 100644
index da95634..0000000
--- a/src/common/src/signalhandler.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-/*PGR-MIT******************************************************************
- *
- * file signalhandler.cpp
- *
- * Copyright 2014 Stephen Woodbridge <woodbri at imaptools.com>
- * Copyright 2014 Vicky Vergara <vicky_vergara at hotmail.com>
- *
- * This is free software; you can redistribute and/or modify it under
- * the terms of the MIT License. Please file MIT-LICENSE for details.
- *
- *****************************************************************PGR-MIT*/
-
-#include "./signalhandler.h"
-
-SignalHandler *
-SignalHandler::instance() {
-  if (!instance_) instance_ = new SignalHandler;
-
-  // assert(instance_ != NULL);
-  return instance_;
-}
-
-
-EventHandler *
-SignalHandler::registerHandler(int signum, EventHandler *eh) {
-  // Copy the <old_eh> from the <signum> slot in
-  // the <signalHandlers_> table.
-  EventHandler *old_eh = signalHandlers_[signum];
-
-  // Store <eh> into the <signum> slot in the
-  // <signalHandlers_> table.
-  SignalHandler::signalHandlers_[signum] = eh;
-
-  // Register the <dispatcher> to handle this
-  // <signum>.
-  struct sigaction sa;
-  sa.sa_handler = SignalHandler::dispatcher;
-  sigemptyset(&sa.sa_mask);
-  sa.sa_flags = 0;
-  sigaction(signum, &sa, 0);
-
-  return old_eh;
-}
-
-void SignalHandler::removeHandler(int signum) {
-  // EventHandler *old_eh = signalHandlers_[signum];
-  signalHandlers_[signum] = static_cast<EventHandler *>(0);
-}
-
-
-void SignalHandler::dispatcher(int signum) {
-  // Perform a sanity check...
-  if (SignalHandler::signalHandlers_[signum] != 0)
-    // Dispatch the handler's hook method.
-    SignalHandler::signalHandlers_[signum]->handleSignal(signum);
-}
-
-// these allocate actual storage
-SignalHandler *SignalHandler::instance_ = NULL;
-EventHandler *SignalHandler::signalHandlers_[NSIG];
-
diff --git a/src/common/src/signalhandler.h b/src/common/src/signalhandler.h
deleted file mode 100644
index 5ea9bde..0000000
--- a/src/common/src/signalhandler.h
+++ /dev/null
@@ -1,154 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-/*PGR-MIT******************************************************************
- *
- * file signalhandler.h
- *
- * Copyright 2014 Stephen Woodbridge <woodbri at imaptools.com>
- * Copyright 2014 Vicky Vergara <vicky_vergara at hotmail.com>
- *
- * This is free software; you can redistribute and/or modify it under
- * the terms of the MIT License. Please file MIT-LICENSE for details.
- *
- *****************************************************************PGR-MIT*/
-
-#ifndef SRC_COMMON_SRC_SIGNALHANDLER_H_
-#define SRC_COMMON_SRC_SIGNALHANDLER_H_
-#pragma once
-
-// defines NULL
-#include <stddef.h>
-#include <csignal>
-#include <exception>
-
-// #include "./pgr_assert.h"
-
-class UserQuitException: public std::exception {
- private:
-  const char *str;    ///< str Holds the what() string for the exception.
-
- public:
-  virtual const char *what() const throw() {
-    return str;
-  }
-
-  explicit UserQuitException(const char *_str): str(_str) {}
-};
-
-
-class EventHandler {
- public:
-  // Hook method for the signal hook method.
-  virtual void handleSignal(int signum) = 0;
-
-  // ... other hook methods for other types of
-  // events such as timers, I/O, and
-  // synchronization objects.
-};
-
-
-class SignalHandler {
- public:
-  // Entry point.
-  static SignalHandler *instance(void);
-
-  // Register an event handler <eh> for <signum>
-  // and return a pointer to any existing <EventHandler>
-  // that was previously registered to handle <signum>.
-  EventHandler *registerHandler(int signum, EventHandler *eh);
-
-  // Remove the <EventHandler> for <signum>
-  // by setting the slot in the <signalHandlers_>
-  // table to NULL.
-  void removeHandler(int signum);
-
- private:
-  // Ensure we're a Singleton.
-  SignalHandler(void) {}
-
-  // Singleton pointer.
-  static SignalHandler *instance_;
-
-  // Entry point adapter installed into <sigaction>
-  // (must be a static method or a stand-alone
-  // extern "C" function).
-  static void dispatcher(int signum);
-
-  // Table of pointers to concrete <EventHandler>s
-  // registered by applications.  NSIG is the number of
-  // signals defined in </usr/include/sys/signal.h>.
-  static EventHandler *signalHandlers_[NSIG];
-};
-
-
-// ---------------------------------------------------------
-// -- some concrete signal handlers
-// ---------------------------------------------------------
-
-class SIGINT_Handler: public EventHandler {
- public:
-  SIGINT_Handler(void): graceful_quit_(0) {}
-
-  // Hook method.
-  virtual void handleSignal(int signum) {
-    if (signum == SIGINT) this->graceful_quit_ =  1;
-  }
-
-  // Accessor.
-  sig_atomic_t gracefulQuit(void) { return this->graceful_quit_;}
-
- private:
-  sig_atomic_t graceful_quit_;
-};
-
-
-class SIGQUIT_Handler: public EventHandler {
- public:
-  SIGQUIT_Handler(void): abortive_quit_(0) {}
-
-  // Hook method.
-  virtual void handleSignal(int signum) {
-    if (signum == SIGQUIT) this->abortive_quit_ =  1;
-  }
-
-  // Accessor.
-  sig_atomic_t abortiveQuit(void) { return this->abortive_quit_;}
-
- private:
-  sig_atomic_t abortive_quit_;
-};
-
-
-#define REG_SIGINT SIGINT_Handler sigint_handler; \
-    SignalHandler::instance()->registerHandler(SIGINT, &sigint_handler);
-
-#define REG_SIGQUIT SIGQUIT_Handler sigquit_handler; \
-    SignalHandler::instance()->registerHandler(SIGQUIT, &sigquit_handler);
-
-#define THROW_ON_SIGINT do { \
-    if ( sigint_handler.gracefulQuit() == 1 ) \
-        throw(UserQuitException("Abort on User Request!")); \
-    } while (0);
-
-#endif  // SRC_COMMON_SRC_SIGNALHANDLER_H_
-
diff --git a/src/common/src/time_msg.c b/src/common/src/time_msg.c
deleted file mode 100644
index e4e7096..0000000
--- a/src/common/src/time_msg.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-FILE: time_msg.c
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
- ********************************************************************PGR-GNU*/
-
-#include <time.h>
-#include "c_common/postgres_connection.h"
-
-#include "c_common/time_msg.h"
-
-
-void time_msg(char *msg, clock_t start_t, clock_t end_t) {
-    double elapsed_t = (double)(end_t - start_t) / CLOCKS_PER_SEC;
-    elog(DEBUG2, "Elapsed time for %s:\n %lf sec = (%lf - %f) / CLOCKS_PER_SEC ",
-            msg,
-            elapsed_t,
-            (double) end_t,
-            (double) start_t);
-}
diff --git a/src/common/src/vehicles_input.c b/src/common/src/vehicles_input.c
deleted file mode 100644
index 0ff70bc..0000000
--- a/src/common/src/vehicles_input.c
+++ /dev/null
@@ -1,275 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: vehicles_input.c
-
-Copyright (c) 2016 Celia Virginia Vergara Castillo
-vicky_vergara at hotmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
- ********************************************************************PGR-GNU*/
-
-#include "c_common/vehicles_input.h"
-
-#include <limits.h>
-#if PGSQL_VERSION > 96
-#include <float.h>
-#endif
-
-#if PGSQL_VERSION == 100
-#include <float.h>
-#endif
-
-
-#include "c_types/column_info_t.h"
-
-#include "c_common/debug_macro.h"
-#include "c_common/get_check_data.h"
-#include "c_common/time_msg.h"
-
-
-static
-void fetch_vehicles(
-        HeapTuple *tuple,
-        TupleDesc *tupdesc,
-        Column_info_t info[16],
-        Vehicle_t *vehicle,
-        bool with_id) {
-
-    vehicle->id = pgr_SPI_getBigInt(tuple, tupdesc, info[0]);
-    vehicle->capacity = pgr_SPI_getFloat8(tuple, tupdesc, info[1]);
-
-    vehicle->start_x = with_id ?
-        0 :
-        pgr_SPI_getFloat8(tuple, tupdesc, info[2]);
-    vehicle->start_y = with_id ?
-        0 :
-        pgr_SPI_getFloat8(tuple, tupdesc, info[3]);
-
-    vehicle->speed = column_found(info[13].colNumber) ?
-        pgr_SPI_getFloat8(tuple, tupdesc, info[13]) :
-        1;
-    vehicle->cant_v =  column_found(info[4].colNumber) ?
-        pgr_SPI_getBigInt(tuple, tupdesc, info[4]) :
-        1;
-    vehicle->start_open_t = column_found(info[5].colNumber) ?
-        pgr_SPI_getFloat8(tuple, tupdesc, info[5]) :
-        0;
-    vehicle->start_close_t = column_found(info[6].colNumber) ?
-        pgr_SPI_getFloat8(tuple, tupdesc, info[6]) :
-        DBL_MAX;
-    vehicle->start_service_t = column_found(info[7].colNumber) ?
-        pgr_SPI_getFloat8(tuple, tupdesc, info[7]) :
-        0;
-
-
-    if (!(column_found(info[8].colNumber)) && column_found(info[9].colNumber)) {
-        ereport(ERROR,
-                (errmsg("Column \'%s\' not Found", info[8].name),
-                 errhint("%s was found, also column is expected %s ", info[9].name, info[8].name)));
-    }
-    if (column_found(info[8].colNumber) && !(column_found(info[9].colNumber))) {
-        ereport(ERROR,
-                (errmsg("Column \'%s\' not Found", info[9].name),
-                 errhint("%s was found, also column is expected %s ", info[8].name, info[9].name)));
-    }
-
-    vehicle->end_x = column_found(info[8].colNumber) ?
-        pgr_SPI_getFloat8(tuple, tupdesc, info[8]) :
-        vehicle->start_x;
-    vehicle->end_y = column_found(info[9].colNumber) ?
-        pgr_SPI_getFloat8(tuple, tupdesc, info[9]) :
-        vehicle->start_y;
-
-    if (!(column_found(info[10].colNumber)) && column_found(info[11].colNumber)) {
-        ereport(ERROR,
-                (errmsg("Column \'%s\' not Found", info[10].name),
-                 errhint("%s was found, also column is expected %s ", info[10].name, info[11].name)));
-    }
-
-    if (column_found(info[10].colNumber) && !(column_found(info[11].colNumber))) {
-        ereport(ERROR,
-                (errmsg("Column \'%s\' not Found", info[11].name),
-                 errhint("%s was found, also column is expected %s ", info[11].name, info[10].name)));
-    }
-    vehicle->end_open_t = column_found(info[10].colNumber) ?
-        pgr_SPI_getFloat8(tuple, tupdesc, info[10]) :
-        vehicle->start_open_t;
-    vehicle->end_close_t = column_found(info[11].colNumber) ?
-        pgr_SPI_getFloat8(tuple, tupdesc, info[11]) :
-        vehicle->start_close_t;
-    vehicle->end_service_t = column_found(info[12].colNumber) ?
-        pgr_SPI_getFloat8(tuple, tupdesc, info[12]) :
-        vehicle->start_service_t;
-
-    vehicle->speed = column_found(info[13].colNumber) ?
-        pgr_SPI_getFloat8(tuple, tupdesc, info[13]) :
-        1;
-    vehicle->start_node_id = with_id ?
-        pgr_SPI_getBigInt(tuple, tupdesc, info[14]) :
-        0;
-    vehicle->end_node_id = with_id ?
-        (column_found(info[12].colNumber) ?
-            pgr_SPI_getBigInt(tuple, tupdesc, info[15]) :
-            vehicle->start_node_id) :
-        0;
-}
-
-
-
-static
-void pgr_get_vehicles_general(
-        char *vehicles_sql,
-        Vehicle_t **vehicles,
-        size_t *total_vehicles,
-        bool with_id) {
-    clock_t start_t = clock();
-
-    const int tuple_limit = 1000000;
-
-    PGR_DBG("pgr_get_vehicles");
-    PGR_DBG("%s", vehicles_sql);
-
-    Column_info_t info[16];
-
-    int i;
-    for (i = 0; i < 16; ++i) {
-        info[i].colNumber = -1;
-        info[i].type = 0;
-        info[i].strict = true;
-        info[i].eType = ANY_NUMERICAL;
-    }
-
-    info[0].name = strdup("id");
-    info[1].name = strdup("capacity");
-    info[2].name = strdup("start_x");
-    info[3].name = strdup("start_y");
-    info[4].name = strdup("number");
-    info[5].name = strdup("start_open");
-    info[6].name = strdup("start_close");
-    info[7].name = strdup("start_service");
-    info[8].name = strdup("end_x");
-    info[9].name = strdup("end_y");
-    info[10].name = strdup("end_open");
-    info[11].name = strdup("end_close");
-    info[12].name = strdup("end_service");
-    info[13].name = strdup("speed");
-    info[14].name = strdup("start_node_id");
-    info[15].name = strdup("end_node_id");
-
-    info[0].eType = ANY_INTEGER;
-    info[4].eType = ANY_INTEGER;
-    info[14].eType = ANY_INTEGER;
-    info[15].eType = ANY_INTEGER;
-
-    for (i = 4; i < 16; ++i) {
-        info[i].strict = false;
-    }
-
-    if (with_id) {
-        /*
-         *  with id, then start_x and start_y are optional
-         *  start_node_id is compulsory
-         */
-        info[2].strict = false;
-        info[3].strict = false;
-        info[14].strict = true;
-
-    }
-
-    size_t ntuples;
-    size_t total_tuples;
-
-    void *SPIplan;
-    SPIplan = pgr_SPI_prepare(vehicles_sql);
-    Portal SPIportal;
-    SPIportal = pgr_SPI_cursor_open(SPIplan);
-
-    bool moredata = true;
-    (*total_vehicles) = total_tuples = 0;
-
-    /* on the first tuple get the column numbers */
-
-    while (moredata == true) {
-        SPI_cursor_fetch(SPIportal, true, tuple_limit);
-        if (total_tuples == 0) {
-            pgr_fetch_column_info(info, 16);
-        }
-        ntuples = SPI_processed;
-        total_tuples += ntuples;
-        PGR_DBG("SPI_processed %ld", ntuples);
-        if (ntuples > 0) {
-            if ((*vehicles) == NULL)
-                (*vehicles) = (Vehicle_t *)palloc0(
-                        total_tuples * sizeof(Vehicle_t));
-            else
-                (*vehicles) = (Vehicle_t *)repalloc(
-                        (*vehicles),
-                        total_tuples * sizeof(Vehicle_t));
-
-            if ((*vehicles) == NULL) {
-                elog(ERROR, "Out of memory");
-            }
-
-            size_t t;
-            SPITupleTable *tuptable = SPI_tuptable;
-            TupleDesc tupdesc = SPI_tuptable->tupdesc;
-            PGR_DBG("processing %ld", ntuples);
-            for (t = 0; t < ntuples; t++) {
-                HeapTuple tuple = tuptable->vals[t];
-                fetch_vehicles(&tuple, &tupdesc, info,
-                        &(*vehicles)[total_tuples - ntuples + t], with_id);
-            }
-            SPI_freetuptable(tuptable);
-        } else {
-            moredata = false;
-        }
-    }
-
-    SPI_cursor_close(SPIportal);
-
-    if (total_tuples == 0) {
-        (*total_vehicles) = 0;
-        PGR_DBG("NO orders");
-        return;
-    }
-
-    (*total_vehicles) = total_tuples;
-    if (with_id) {
-        PGR_DBG("Finish reading %ld vehicles for matrix", (*total_vehicles));
-    } else {
-        PGR_DBG("Finish reading %ld vehicles for eucledian", (*total_vehicles));
-    }
-    time_msg("reading edges", start_t, clock());
-
-}
-
-void
-pgr_get_vehicles(
-        char *vehicles_sql,
-        Vehicle_t **vehicles,
-        size_t *total_vehicles) {
-    pgr_get_vehicles_general( vehicles_sql, vehicles, total_vehicles, false);
-}
-
-void
-pgr_get_vehicles_with_id(
-        char *vehicles_sql,
-        Vehicle_t **vehicles,
-        size_t *total_vehicles) {
-    pgr_get_vehicles_general(vehicles_sql, vehicles, total_vehicles, true);
-}
-
diff --git a/src/common/test/doc-pgr_version.result b/src/common/test/doc-pgr_version.result
deleted file mode 100644
index af2deba..0000000
--- a/src/common/test/doc-pgr_version.result
+++ /dev/null
@@ -1,14 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- q1
-SELECT version FROM pgr_version();
- version 
----------
- 2.5.3
-(1 row)
-
--- q2
-ROLLBACK;
-ROLLBACK
diff --git a/src/common/test/doc-pgr_version.test.sql b/src/common/test/doc-pgr_version.test.sql
deleted file mode 100644
index 2db6c2d..0000000
--- a/src/common/test/doc-pgr_version.test.sql
+++ /dev/null
@@ -1,7 +0,0 @@
-
---------------------------------------------------------------------------------
---                pgr_version
---------------------------------------------------------------------------------
-\echo -- q1
-SELECT version FROM pgr_version(); 
-\echo -- q2
diff --git a/src/common/test/test.conf b/src/common/test/test.conf
deleted file mode 100644
index ce466a7..0000000
--- a/src/common/test/test.conf
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/perl -w
-
-%main::tests = (
-    'any' => {
-        'comment' => 'pgr_createTopology, pgr_analyzegraph, and pgr_analyzeOneway tests for any versions.',
-        'data' => ['sampledata.data'],
-        'tests' => [qw( 
-            versionless-any-01
-            doc-pgr_version
-            )],
-
-        'documentation' => [qw(
-            doc-pgr_version
-            )],
-
-        'dummyStorage' => [qw(
-            )]
-
-    },
-# 'vpg-vpgis' => {}, # for version specific tests
-# '8-1' => {}, # for pg 8.x and postgis 1.x
-# '9.2-2.1' => {}, # for pg 9.2 and postgis 2.1
-);
-
-1;
diff --git a/src/common/test/versionless-any-01.result b/src/common/test/versionless-any-01.result
deleted file mode 100644
index 92e0b66..0000000
--- a/src/common/test/versionless-any-01.result
+++ /dev/null
@@ -1,395 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-select _pgr_versionless('2.1.0foobar23', '2.1');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('2.1.0foobar23', '2.1-rc1');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('2.1.0foobar23', '2.1-beta');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('2.1.0foobar23', '2.1-alpha');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('2.1.0foobar23', '2.1-dev');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('2.1.0foobar23', '2.1rc1');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('2.1.0foobar23', '2.1beta');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('2.1.0foobar23', '2.1alpha');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('2.1.0foobar23', '2.1dev');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('2.1.0-dev', '2.1');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('2.1.0-dev', '2.1-rc1');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('2.1.0-dev', '2.1-beta');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('2.1.0-dev', '2.1-alpha');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('2.1.0-dev', '2.1rc1');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('2.1.0-dev', '2.1beta');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('2.1.0-dev', '2.1alpha');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('2.1.0-alpha', '2.1');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('2.1.0-alpha', '2.1-rc1');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('2.1.0-alpha', '2.1-beta');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('2.1.0-alpha', '2.1rc1');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('2.1.0-alpha', '2.1beta');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('2.1.0-beta', '2.1');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('2.1.0-beta', '2.1-rc1');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('2.1.0-beta', '2.1rc1');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('2.0.0', '2.1');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('2.1', '2.1.3');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('1.05', '2.0.0');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('1.05', '2.0');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('1.05', '2');
- _pgr_versionless 
-------------------
- t
-(1 row)
-
-select _pgr_versionless('2.1', '2.1.0foobar23');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.1-rc1', '2.1.0foobar23');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.1-beta', '2.1.0foobar23');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.1-alpha', '2.1.0foobar23');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.1-dev', '2.1.0foobar23');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.1rc1', '2.1.0foobar23');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.1beta', '2.1.0foobar23');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.1alpha', '2.1.0foobar23');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.1dev', '2.1.0foobar23');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.1', '2.1.0-dev');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.1-rc1', '2.1.0-dev');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.1-beta', '2.1.0-dev');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.1-alpha', '2.1.0-dev');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.1rc1', '2.1.0-dev');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.1beta', '2.1.0-dev');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.1alpha', '2.1.0-dev');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.1', '2.1.0-alpha');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.1-rc1', '2.1.0-alpha');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.1-beta', '2.1.0-alpha');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.1rc1', '2.1.0-alpha');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.1beta', '2.1.0-alpha');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.1', '2.1.0-beta');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.1-rc1', '2.1.0-beta');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.1rc1', '2.1.0-beta');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.1', '2.0.0');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.1.3', '2.1');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.0.0', '1.05');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.0', '1.05');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2', '1.05');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2', '2.0.0foobar');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.1', '2.1.0');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-select _pgr_versionless('2.1.0beta3dev', '2.1.0beta1dev');
- _pgr_versionless 
-------------------
- f
-(1 row)
-
-ROLLBACK;
-ROLLBACK
diff --git a/src/common/tester/Makefile b/src/common/tester/Makefile
deleted file mode 100644
index 81cf807..0000000
--- a/src/common/tester/Makefile
+++ /dev/null
@@ -1,21 +0,0 @@
-CC=cc
-CPP=c++
-
-all: clean test1 test2 test clean2
-
-test1: test1.c ../src/pgr_logger.h
-	$(CC) -o test1 test1.c
-
-test2: test2.cpp ../src/pgr_logger.h
-	$(CPP) -o test2 test2.cpp
-
-test: clean
-	+./test1
-	+./test2
-	+cat test-log.log
-
-clean:
-	+rm -f test1 test2 test-log.log
-
-clean2:
-	+rm -f test1 test2 test-log.log
diff --git a/src/common/tester/test1.c b/src/common/tester/test1.c
deleted file mode 100644
index 3e2a9d9..0000000
--- a/src/common/tester/test1.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#define PGR_LOGGER_ON
-#define PGR_LOGGER_LOC
-#define PGR_LOGGER_FILE "test-log.log"
-
-#include "../src/pgr_logger.h"
-
-#include <time.h>
-
-int main () {
-    PGR_LOG("message 1");
-    PGR_LOGF("%s at epoch %d\n", "message 2", (int)time(NULL));
-    PGR_LOG("message 3");
-
-    return 0;
-}
diff --git a/src/common/tester/test2.cpp b/src/common/tester/test2.cpp
deleted file mode 100644
index 3e2a9d9..0000000
--- a/src/common/tester/test2.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#define PGR_LOGGER_ON
-#define PGR_LOGGER_LOC
-#define PGR_LOGGER_FILE "test-log.log"
-
-#include "../src/pgr_logger.h"
-
-#include <time.h>
-
-int main () {
-    PGR_LOG("message 1");
-    PGR_LOGF("%s at epoch %d\n", "message 2", (int)time(NULL));
-    PGR_LOG("message 3");
-
-    return 0;
-}
diff --git a/src/common/time_msg.c b/src/common/time_msg.c
new file mode 100644
index 0000000..bb7c087
--- /dev/null
+++ b/src/common/time_msg.c
@@ -0,0 +1,40 @@
+/*PGR-GNU*****************************************************************
+
+FILE: time_msg.c
+
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ ********************************************************************PGR-GNU*/
+
+#include <time.h>
+#include "c_common/postgres_connection.h"
+
+#include "c_common/time_msg.h"
+
+
+void time_msg(char *msg, clock_t start_t, clock_t end_t) {
+    double elapsed_t = (double)(end_t - start_t) / CLOCKS_PER_SEC;
+    elog(DEBUG2,
+            "Elapsed time for %s:\n %lf sec = (%lf - %f) / CLOCKS_PER_SEC ",
+            msg,
+            elapsed_t,
+            (double) end_t,
+            (double) start_t);
+}
diff --git a/src/common/vehicles_input.c b/src/common/vehicles_input.c
new file mode 100644
index 0000000..95f4571
--- /dev/null
+++ b/src/common/vehicles_input.c
@@ -0,0 +1,274 @@
+/*PGR-GNU*****************************************************************
+File: vehicles_input.c
+
+Copyright (c) 2016 Celia Virginia Vergara Castillo
+vicky_vergara at hotmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ ********************************************************************PGR-GNU*/
+
+#include "c_common/vehicles_input.h"
+
+#include <limits.h>
+#include <float.h>
+
+
+#include "c_types/column_info_t.h"
+
+#include "c_common/debug_macro.h"
+#include "c_common/get_check_data.h"
+#include "c_common/time_msg.h"
+
+
+static
+void fetch_vehicles(
+        HeapTuple *tuple,
+        TupleDesc *tupdesc,
+        Column_info_t info[16],
+        Vehicle_t *vehicle,
+        bool with_id) {
+    vehicle->id = pgr_SPI_getBigInt(tuple, tupdesc, info[0]);
+    vehicle->capacity = pgr_SPI_getFloat8(tuple, tupdesc, info[1]);
+
+    vehicle->start_x = with_id ?
+        0 :
+        pgr_SPI_getFloat8(tuple, tupdesc, info[2]);
+    vehicle->start_y = with_id ?
+        0 :
+        pgr_SPI_getFloat8(tuple, tupdesc, info[3]);
+
+    vehicle->speed = column_found(info[13].colNumber) ?
+        pgr_SPI_getFloat8(tuple, tupdesc, info[13]) :
+        1;
+    vehicle->cant_v =  column_found(info[4].colNumber) ?
+        pgr_SPI_getBigInt(tuple, tupdesc, info[4]) :
+        1;
+    vehicle->start_open_t = column_found(info[5].colNumber) ?
+        pgr_SPI_getFloat8(tuple, tupdesc, info[5]) :
+        0;
+    vehicle->start_close_t = column_found(info[6].colNumber) ?
+        pgr_SPI_getFloat8(tuple, tupdesc, info[6]) :
+        DBL_MAX;
+    vehicle->start_service_t = column_found(info[7].colNumber) ?
+        pgr_SPI_getFloat8(tuple, tupdesc, info[7]) :
+        0;
+
+
+    if (!(column_found(info[8].colNumber))
+            && column_found(info[9].colNumber)) {
+        ereport(ERROR,
+                (errmsg("Column \'%s\' not Found", info[8].name),
+                 errhint("%s was found, also column is expected %s ",
+                     info[9].name, info[8].name)));
+    }
+    if (column_found(info[8].colNumber)
+            && !(column_found(info[9].colNumber))) {
+        ereport(ERROR,
+                (errmsg("Column \'%s\' not Found", info[9].name),
+                 errhint("%s was found, also column is expected %s ",
+                     info[8].name, info[9].name)));
+    }
+
+    vehicle->end_x = column_found(info[8].colNumber) ?
+        pgr_SPI_getFloat8(tuple, tupdesc, info[8]) :
+        vehicle->start_x;
+    vehicle->end_y = column_found(info[9].colNumber) ?
+        pgr_SPI_getFloat8(tuple, tupdesc, info[9]) :
+        vehicle->start_y;
+
+    if (!(column_found(info[10].colNumber))
+            && column_found(info[11].colNumber)) {
+        ereport(ERROR,
+                (errmsg("Column \'%s\' not Found", info[10].name),
+                 errhint("%s was found, also column is expected %s ",
+                     info[10].name, info[11].name)));
+    }
+
+    if (column_found(info[10].colNumber)
+            && !(column_found(info[11].colNumber))) {
+        ereport(ERROR,
+                (errmsg("Column \'%s\' not Found", info[11].name),
+                 errhint("%s was found, also column is expected %s ",
+                     info[11].name, info[10].name)));
+    }
+    vehicle->end_open_t = column_found(info[10].colNumber) ?
+        pgr_SPI_getFloat8(tuple, tupdesc, info[10]) :
+        vehicle->start_open_t;
+    vehicle->end_close_t = column_found(info[11].colNumber) ?
+        pgr_SPI_getFloat8(tuple, tupdesc, info[11]) :
+        vehicle->start_close_t;
+    vehicle->end_service_t = column_found(info[12].colNumber) ?
+        pgr_SPI_getFloat8(tuple, tupdesc, info[12]) :
+        vehicle->start_service_t;
+
+    vehicle->speed = column_found(info[13].colNumber) ?
+        pgr_SPI_getFloat8(tuple, tupdesc, info[13]) :
+        1;
+    vehicle->start_node_id = with_id ?
+        pgr_SPI_getBigInt(tuple, tupdesc, info[14]) :
+        0;
+    vehicle->end_node_id = with_id ?
+        (column_found(info[12].colNumber) ?
+            pgr_SPI_getBigInt(tuple, tupdesc, info[15]) :
+            vehicle->start_node_id) :
+        0;
+}
+
+
+
+static
+void pgr_get_vehicles_general(
+        char *vehicles_sql,
+        Vehicle_t **vehicles,
+        size_t *total_vehicles,
+        bool with_id) {
+    clock_t start_t = clock();
+
+    const int tuple_limit = 1000000;
+
+    PGR_DBG("pgr_get_vehicles");
+    PGR_DBG("%s", vehicles_sql);
+
+    Column_info_t info[16];
+
+    int i;
+    for (i = 0; i < 16; ++i) {
+        info[i].colNumber = -1;
+        info[i].type = 0;
+        info[i].strict = true;
+        info[i].eType = ANY_NUMERICAL;
+    }
+
+    info[0].name = "id";
+    info[1].name = "capacity";
+    info[2].name = "start_x";
+    info[3].name = "start_y";
+    info[4].name = "number";
+    info[5].name = "start_open";
+    info[6].name = "start_close";
+    info[7].name = "start_service";
+    info[8].name = "end_x";
+    info[9].name = "end_y";
+    info[10].name = "end_open";
+    info[11].name = "end_close";
+    info[12].name = "end_service";
+    info[13].name = "speed";
+    info[14].name = "start_node_id";
+    info[15].name = "end_node_id";
+
+    info[0].eType = ANY_INTEGER;
+    info[4].eType = ANY_INTEGER;
+    info[14].eType = ANY_INTEGER;
+    info[15].eType = ANY_INTEGER;
+
+    for (i = 4; i < 16; ++i) {
+        info[i].strict = false;
+    }
+
+    if (with_id) {
+        /*
+         *  with id, then start_x and start_y are optional
+         *  start_node_id is compulsory
+         */
+        info[2].strict = false;
+        info[3].strict = false;
+        info[14].strict = true;
+    }
+
+    size_t ntuples;
+    size_t total_tuples;
+
+    void *SPIplan;
+    SPIplan = pgr_SPI_prepare(vehicles_sql);
+    Portal SPIportal;
+    SPIportal = pgr_SPI_cursor_open(SPIplan);
+
+    bool moredata = true;
+    (*total_vehicles) = total_tuples = 0;
+
+    /* on the first tuple get the column numbers */
+
+    while (moredata == true) {
+        SPI_cursor_fetch(SPIportal, true, tuple_limit);
+        if (total_tuples == 0) {
+            pgr_fetch_column_info(info, 16);
+        }
+        ntuples = SPI_processed;
+        total_tuples += ntuples;
+        PGR_DBG("SPI_processed %ld", ntuples);
+        if (ntuples > 0) {
+            if ((*vehicles) == NULL)
+                (*vehicles) = (Vehicle_t *)palloc0(
+                        total_tuples * sizeof(Vehicle_t));
+            else
+                (*vehicles) = (Vehicle_t *)repalloc(
+                        (*vehicles),
+                        total_tuples * sizeof(Vehicle_t));
+
+            if ((*vehicles) == NULL) {
+                elog(ERROR, "Out of memory");
+            }
+
+            size_t t;
+            SPITupleTable *tuptable = SPI_tuptable;
+            TupleDesc tupdesc = SPI_tuptable->tupdesc;
+            PGR_DBG("processing %ld", ntuples);
+            for (t = 0; t < ntuples; t++) {
+                HeapTuple tuple = tuptable->vals[t];
+                fetch_vehicles(&tuple, &tupdesc, info,
+                        &(*vehicles)[total_tuples - ntuples + t], with_id);
+            }
+            SPI_freetuptable(tuptable);
+        } else {
+            moredata = false;
+        }
+    }
+
+    SPI_cursor_close(SPIportal);
+
+    if (total_tuples == 0) {
+        (*total_vehicles) = 0;
+        PGR_DBG("NO orders");
+        return;
+    }
+
+    (*total_vehicles) = total_tuples;
+    if (with_id) {
+        PGR_DBG("Finish reading %ld vehicles for matrix", (*total_vehicles));
+    } else {
+        PGR_DBG("Finish reading %ld vehicles for eucledian", (*total_vehicles));
+    }
+    time_msg("reading edges", start_t, clock());
+}
+
+void
+pgr_get_vehicles(
+        char *vehicles_sql,
+        Vehicle_t **vehicles,
+        size_t *total_vehicles) {
+    pgr_get_vehicles_general(vehicles_sql, vehicles, total_vehicles, false);
+}
+
+void
+pgr_get_vehicles_with_id(
+        char *vehicles_sql,
+        Vehicle_t **vehicles,
+        size_t *total_vehicles) {
+    pgr_get_vehicles_general(vehicles_sql, vehicles, total_vehicles, true);
+}
+
diff --git a/src/common/src/xy_vertex.cpp b/src/common/xy_vertex.cpp
similarity index 100%
rename from src/common/src/xy_vertex.cpp
rename to src/common/xy_vertex.cpp
diff --git a/src/components/src/CMakeLists.txt b/src/components/CMakeLists.txt
similarity index 100%
rename from src/components/src/CMakeLists.txt
rename to src/components/CMakeLists.txt
diff --git a/src/components/src/articulationPoints.c b/src/components/articulationPoints.c
similarity index 100%
rename from src/components/src/articulationPoints.c
rename to src/components/articulationPoints.c
diff --git a/src/components/src/articulationPoints_driver.cpp b/src/components/articulationPoints_driver.cpp
similarity index 100%
rename from src/components/src/articulationPoints_driver.cpp
rename to src/components/articulationPoints_driver.cpp
diff --git a/src/components/src/biconnectedComponents.c b/src/components/biconnectedComponents.c
similarity index 100%
rename from src/components/src/biconnectedComponents.c
rename to src/components/biconnectedComponents.c
diff --git a/src/components/src/biconnectedComponents_driver.cpp b/src/components/biconnectedComponents_driver.cpp
similarity index 100%
rename from src/components/src/biconnectedComponents_driver.cpp
rename to src/components/biconnectedComponents_driver.cpp
diff --git a/src/components/src/bridges.c b/src/components/bridges.c
similarity index 100%
rename from src/components/src/bridges.c
rename to src/components/bridges.c
diff --git a/src/components/src/bridges_driver.cpp b/src/components/bridges_driver.cpp
similarity index 100%
rename from src/components/src/bridges_driver.cpp
rename to src/components/bridges_driver.cpp
diff --git a/src/components/src/connectedComponents.c b/src/components/connectedComponents.c
similarity index 100%
rename from src/components/src/connectedComponents.c
rename to src/components/connectedComponents.c
diff --git a/src/components/src/connectedComponents_driver.cpp b/src/components/connectedComponents_driver.cpp
similarity index 100%
rename from src/components/src/connectedComponents_driver.cpp
rename to src/components/connectedComponents_driver.cpp
diff --git a/src/components/src/strongComponents.c b/src/components/strongComponents.c
similarity index 100%
rename from src/components/src/strongComponents.c
rename to src/components/strongComponents.c
diff --git a/src/components/src/strongComponents_driver.cpp b/src/components/strongComponents_driver.cpp
similarity index 100%
rename from src/components/src/strongComponents_driver.cpp
rename to src/components/strongComponents_driver.cpp
diff --git a/src/components/test/doc-pgr_articulationPoints.result b/src/components/test/doc-pgr_articulationPoints.result
deleted file mode 100644
index 4bbe0b6..0000000
--- a/src/components/test/doc-pgr_articulationPoints.result
+++ /dev/null
@@ -1,30 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- q1
-SELECT * FROM pgr_articulationPoints(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table'
-);
- seq | node 
------+------
-   1 |    2
-   2 |    5
-   3 |    8
-   4 |   10
-(4 rows)
-
--- q2
-SELECT * FROM pgr_articulationPoints(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table'
-);
- seq | node 
------+------
-   1 |    2
-   2 |    5
-   3 |    8
-   4 |   10
-(4 rows)
-
-ROLLBACK;
-ROLLBACK
diff --git a/src/components/test/doc-pgr_biconnectedComponents.result b/src/components/test/doc-pgr_biconnectedComponents.result
deleted file mode 100644
index afaa41c..0000000
--- a/src/components/test/doc-pgr_biconnectedComponents.result
+++ /dev/null
@@ -1,58 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- q1
-SELECT * FROM pgr_biconnectedComponents(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table'
-);
- seq | component | n_seq | edge 
------+-----------+-------+------
-   1 |         1 |     1 |    1
-   2 |         2 |     1 |    2
-   3 |         2 |     2 |    3
-   4 |         2 |     3 |    4
-   5 |         2 |     4 |    5
-   6 |         2 |     5 |    8
-   7 |         2 |     6 |    9
-   8 |         2 |     7 |   10
-   9 |         2 |     8 |   11
-  10 |         2 |     9 |   12
-  11 |         2 |    10 |   13
-  12 |         2 |    11 |   15
-  13 |         2 |    12 |   16
-  14 |         6 |     1 |    6
-  15 |         7 |     1 |    7
-  16 |        14 |     1 |   14
-  17 |        17 |     1 |   17
-  18 |        18 |     1 |   18
-(18 rows)
-
--- q2
-SELECT * FROM pgr_biconnectedComponents(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table'
-);
- seq | component | n_seq | edge 
------+-----------+-------+------
-   1 |         1 |     1 |    1
-   2 |         2 |     1 |    2
-   3 |         2 |     2 |    3
-   4 |         2 |     3 |    4
-   5 |         2 |     4 |    5
-   6 |         2 |     5 |    8
-   7 |         2 |     6 |    9
-   8 |         2 |     7 |   10
-   9 |         2 |     8 |   11
-  10 |         2 |     9 |   12
-  11 |         2 |    10 |   13
-  12 |         2 |    11 |   15
-  13 |         2 |    12 |   16
-  14 |         6 |     1 |    6
-  15 |         7 |     1 |    7
-  16 |        14 |     1 |   14
-  17 |        17 |     1 |   17
-  18 |        18 |     1 |   18
-(18 rows)
-
-ROLLBACK;
-ROLLBACK
diff --git a/src/components/test/doc-pgr_bridges.result b/src/components/test/doc-pgr_bridges.result
deleted file mode 100644
index 649046d..0000000
--- a/src/components/test/doc-pgr_bridges.result
+++ /dev/null
@@ -1,34 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- q1
-SELECT * FROM pgr_bridges(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table'
-);
- seq | edge 
------+------
-   1 |    1
-   2 |    6
-   3 |    7
-   4 |   14
-   5 |   17
-   6 |   18
-(6 rows)
-
--- q2
-SELECT * FROM pgr_bridges(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table'
-);
- seq | edge 
------+------
-   1 |    1
-   2 |    6
-   3 |    7
-   4 |   14
-   5 |   17
-   6 |   18
-(6 rows)
-
-ROLLBACK;
-ROLLBACK
diff --git a/src/components/test/doc-pgr_connectedComponents.result b/src/components/test/doc-pgr_connectedComponents.result
deleted file mode 100644
index da041b1..0000000
--- a/src/components/test/doc-pgr_connectedComponents.result
+++ /dev/null
@@ -1,56 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- q1
-SELECT * FROM pgr_connectedComponents(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table'
-);
- seq | component | n_seq | node 
------+-----------+-------+------
-   1 |         1 |     1 |    1
-   2 |         1 |     2 |    2
-   3 |         1 |     3 |    3
-   4 |         1 |     4 |    4
-   5 |         1 |     5 |    5
-   6 |         1 |     6 |    6
-   7 |         1 |     7 |    7
-   8 |         1 |     8 |    8
-   9 |         1 |     9 |    9
-  10 |         1 |    10 |   10
-  11 |         1 |    11 |   11
-  12 |         1 |    12 |   12
-  13 |         1 |    13 |   13
-  14 |        14 |     1 |   14
-  15 |        14 |     2 |   15
-  16 |        16 |     1 |   16
-  17 |        16 |     2 |   17
-(17 rows)
-
--- q2
-SELECT * FROM pgr_connectedComponents(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table'
-);
- seq | component | n_seq | node 
------+-----------+-------+------
-   1 |         1 |     1 |    1
-   2 |         1 |     2 |    2
-   3 |         1 |     3 |    3
-   4 |         1 |     4 |    4
-   5 |         1 |     5 |    5
-   6 |         1 |     6 |    6
-   7 |         1 |     7 |    7
-   8 |         1 |     8 |    8
-   9 |         1 |     9 |    9
-  10 |         1 |    10 |   10
-  11 |         1 |    11 |   11
-  12 |         1 |    12 |   12
-  13 |         1 |    13 |   13
-  14 |        14 |     1 |   14
-  15 |        14 |     2 |   15
-  16 |        16 |     1 |   16
-  17 |        16 |     2 |   17
-(17 rows)
-
-ROLLBACK;
-ROLLBACK
diff --git a/src/components/test/doc-pgr_strongComponents.result b/src/components/test/doc-pgr_strongComponents.result
deleted file mode 100644
index ad97903..0000000
--- a/src/components/test/doc-pgr_strongComponents.result
+++ /dev/null
@@ -1,56 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- q1
-SELECT * FROM pgr_strongComponents(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table'
-);
- seq | component | n_seq | node 
------+-----------+-------+------
-   1 |         1 |     1 |    1
-   2 |         1 |     2 |    2
-   3 |         1 |     3 |    3
-   4 |         1 |     4 |    4
-   5 |         1 |     5 |    5
-   6 |         1 |     6 |    6
-   7 |         1 |     7 |    7
-   8 |         1 |     8 |    8
-   9 |         1 |     9 |    9
-  10 |         1 |    10 |   10
-  11 |         1 |    11 |   11
-  12 |         1 |    12 |   12
-  13 |         1 |    13 |   13
-  14 |        14 |     1 |   14
-  15 |        14 |     2 |   15
-  16 |        16 |     1 |   16
-  17 |        16 |     2 |   17
-(17 rows)
-
--- q2
-SELECT * FROM pgr_strongComponents(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table'
-);
- seq | component | n_seq | node 
------+-----------+-------+------
-   1 |         1 |     1 |    1
-   2 |         1 |     2 |    2
-   3 |         1 |     3 |    3
-   4 |         1 |     4 |    4
-   5 |         1 |     5 |    5
-   6 |         1 |     6 |    6
-   7 |         1 |     7 |    7
-   8 |         1 |     8 |    8
-   9 |         1 |     9 |    9
-  10 |         1 |    10 |   10
-  11 |         1 |    11 |   11
-  12 |         1 |    12 |   12
-  13 |         1 |    13 |   13
-  14 |        14 |     1 |   14
-  15 |        14 |     2 |   15
-  16 |        16 |     1 |   16
-  17 |        16 |     2 |   17
-(17 rows)
-
-ROLLBACK;
-ROLLBACK
diff --git a/src/contraction/src/CMakeLists.txt b/src/contraction/CMakeLists.txt
similarity index 100%
rename from src/contraction/src/CMakeLists.txt
rename to src/contraction/CMakeLists.txt
diff --git a/src/contraction/src/contractGraph.c b/src/contraction/contractGraph.c
similarity index 100%
rename from src/contraction/src/contractGraph.c
rename to src/contraction/contractGraph.c
diff --git a/src/contraction/src/contractGraph_driver.cpp b/src/contraction/contractGraph_driver.cpp
similarity index 100%
rename from src/contraction/src/contractGraph_driver.cpp
rename to src/contraction/contractGraph_driver.cpp
diff --git a/src/contraction/demo/dead_end_demo.sql b/src/contraction/demo/dead_end_demo.sql
deleted file mode 100644
index 09f2250..0000000
--- a/src/contraction/demo/dead_end_demo.sql
+++ /dev/null
@@ -1,56 +0,0 @@
-DROP TABLE IF EXISTS edge_table;
-CREATE TABLE edge_table (
-    id SERIAL,
-    source INTEGER,
-    target INTEGER,
-    cost FLOAT
-);
-
-\echo 'Examples of dead end contraction for directed graphs'
-
-INSERT INTO edge_table (source, target, cost) VALUES (2, 1, 7);
-
-SELECT * FROM edge_table;
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost FROM edge_table ',
-    ARRAY[]::BIGINT[], ARRAY[0]::integer[], 1, true);
-
-DELETE FROM edge_table;
-
-INSERT INTO edge_table (source, target, cost) VALUES (2, 1, 7);
-INSERT INTO edge_table (source, target, cost) VALUES (3, 1, 7);
-INSERT INTO edge_table (source, target, cost) VALUES (4, 1, 7);
-
-SELECT * FROM edge_table;
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost FROM edge_table ',
-    ARRAY[]::BIGINT[], ARRAY[0]::integer[], 1, true);
-
-DELETE FROM edge_table;
-
-INSERT INTO edge_table (source, target, cost) VALUES (2, 1, 7);
-INSERT INTO edge_table (source, target, cost) VALUES (2, 1, 3);
-INSERT INTO edge_table (source, target, cost) VALUES (2, 1, 4);
-
-SELECT * FROM edge_table;
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost FROM edge_table ',
-    ARRAY[]::BIGINT[], ARRAY[0]::integer[], 1, false);
-
-DELETE FROM edge_table;
-
-\echo 'Examples of dead end contraction for undirected graphs'
-
-INSERT INTO edge_table (source, target, cost) VALUES (2, 1, 7);
-INSERT INTO edge_table (source, target, cost) VALUES (2, 1, 3);
-INSERT INTO edge_table (source, target, cost) VALUES (2, 1, 4);
-INSERT INTO edge_table (source, target, cost) VALUES (2, 3, 1);
-INSERT INTO edge_table (source, target, cost) VALUES (2, 4, 2);
-
-SELECT * FROM edge_table;
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost FROM edge_table ',
-    ARRAY[]::BIGINT[], ARRAY[0]::integer[], 1, false);
-
-DELETE FROM edge_table;
-
diff --git a/src/contraction/demo/linear_demo.sql b/src/contraction/demo/linear_demo.sql
deleted file mode 100644
index 7cf5635..0000000
--- a/src/contraction/demo/linear_demo.sql
+++ /dev/null
@@ -1,44 +0,0 @@
-DROP TABLE IF EXISTS edge_table;
-CREATE TABLE edge_table (
-    id SERIAL,
-    source INTEGER,
-    target INTEGER,
-    cost FLOAT
-);
-
-\echo 'Examples of linear contraction for directed graphs'
-
-INSERT INTO edge_table (source, target, cost) VALUES (1, 2, 7);
-INSERT INTO edge_table (source, target, cost) VALUES (2, 3, 4);
-
-SELECT * FROM edge_table;
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost FROM edge_table ',
-    ARRAY[]::BIGINT[], ARRAY[1]::integer[], 1, true);
-
-DELETE FROM edge_table;
-
-INSERT INTO edge_table (source, target, cost) VALUES (1, 2, 7);
-INSERT INTO edge_table (source, target, cost) VALUES (2, 3, 4);
-INSERT INTO edge_table (source, target, cost) VALUES (2, 1, 7);
-INSERT INTO edge_table (source, target, cost) VALUES (3, 2, 4);
-
-SELECT * FROM edge_table;
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost FROM edge_table ',
-    ARRAY[]::BIGINT[], ARRAY[1]::integer[], 1, true);
-
-DELETE FROM edge_table;
-
-INSERT INTO edge_table (source, target, cost) VALUES (1, 2, 7);
-INSERT INTO edge_table (source, target, cost) VALUES (1, 2, 3);
-INSERT INTO edge_table (source, target, cost) VALUES (2, 3, 4);
-INSERT INTO edge_table (source, target, cost) VALUES (2, 1, 7);
-INSERT INTO edge_table (source, target, cost) VALUES (3, 2, 4);
-
-SELECT * FROM edge_table;
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost FROM edge_table ',
-    ARRAY[]::BIGINT[], ARRAY[1]::integer[], 1, true);
-
-DELETE FROM edge_table;
\ No newline at end of file
diff --git a/src/contraction/test/directed-deadend.result b/src/contraction/test/directed-deadend.result
deleted file mode 100644
index 0a416aa..0000000
--- a/src/contraction/test/directed-deadend.result
+++ /dev/null
@@ -1,61 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
---q1 Checking dead end contraction for single edge
-/*
-\echo --q0 Checking for valid contraction
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1',
-    ARRAY[-1]::integer[], 1, ARRAY[]::BIGINT[], true);
-*/
-
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1',
-    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-   1 | v    |  2 | {1}                 |     -1 |     -1 |   -1
-(1 row)
-
---q2 Checking dead end contraction for two edges
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id < 3',
-    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-   1 | v    |  3 | {1,2}               |     -1 |     -1 |   -1
-(1 row)
-
---q3 Checking dead end contraction for sample data
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-   1 | v    |  2 | {1}                 |     -1 |     -1 |   -1
-   2 | v    |  5 | {7,8}               |     -1 |     -1 |   -1
-   3 | v    | 10 | {13}                |     -1 |     -1 |   -1
-   4 | v    | 15 | {14}                |     -1 |     -1 |   -1
-   5 | v    | 17 | {16}                |     -1 |     -1 |   -1
-(5 rows)
-
---q5 Checking dead end contraction for a graph with no dead end vertex
-/*
--- this test fails becuse parameter is wrong
-\echo --q4 Checking that forbidden vertices can only be one dimensional or empty
-SELECT * FROM pgr_contractGraph(
-	'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1',
-	ARRAY[ [2,3,4,5], [4,5,6,7] ]::BIGINT[][], ARRAY[0]::integer[], 1, true);
--- \echo --q4 -------------------------------------------
-*/
-SELECT * FROM pgr_contractGraph(
-	'SELECT id, source, target, cost, reverse_cost FROM edge_table 
-	WHERE id = 2 OR id = 4 OR id = 5 OR id = 8',
-	ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-(0 rows)
-
-ROLLBACK;
-ROLLBACK
diff --git a/src/contraction/test/directed-deadend.test.sql b/src/contraction/test/directed-deadend.test.sql
deleted file mode 100644
index 117ad16..0000000
--- a/src/contraction/test/directed-deadend.test.sql
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-/*
-\echo --q0 Checking for valid contraction
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1',
-    ARRAY[-1]::integer[], 1, ARRAY[]::BIGINT[], true);
-*/
--- \echo --q0 -------------------------------------------
-
-\echo --q1 Checking dead end contraction for single edge
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1',
-    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
--- \echo --q1 -------------------------------------------
-
-\echo --q2 Checking dead end contraction for two edges
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id < 3',
-    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
--- \echo --q2 -------------------------------------------
-
-\echo --q3 Checking dead end contraction for sample data
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
--- \echo --q3 -------------------------------------------
-
-/*
--- this test fails becuse parameter is wrong
-\echo --q4 Checking that forbidden vertices can only be one dimensional or empty
-SELECT * FROM pgr_contractGraph(
-	'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1',
-	ARRAY[ [2,3,4,5], [4,5,6,7] ]::BIGINT[][], ARRAY[0]::integer[], 1, true);
--- \echo --q4 -------------------------------------------
-*/
-
-\echo --q5 Checking dead end contraction for a graph with no dead end vertex
-SELECT * FROM pgr_contractGraph(
-	'SELECT id, source, target, cost, reverse_cost FROM edge_table 
-	WHERE id = 2 OR id = 4 OR id = 5 OR id = 8',
-	ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
--- \echo --q5 -------------------------------------------
-
diff --git a/src/contraction/test/directed-development.result b/src/contraction/test/directed-development.result
deleted file mode 100644
index fbde94d..0000000
--- a/src/contraction/test/directed-development.result
+++ /dev/null
@@ -1,165 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
---q1 Checking dead end contraction for single edge
-/*
--- this test fails becuse parameter is wrong
-\echo --q0 Checking for valid contraction
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1',
-    ARRAY[-1]::integer[], 1, ARRAY[]::BIGINT[], true);
-*/
-
-
-
-
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1',
-    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-   1 | v    |  2 | {1}                 |     -1 |     -1 |   -1
-(1 row)
-
---q2 Checking dead end contraction for two edges
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id < 3',
-    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-   1 | v    |  3 | {1,2}               |     -1 |     -1 |   -1
-(1 row)
-
---q3 Checking dead end contraction for sample data
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-   1 | v    |  2 | {1}                 |     -1 |     -1 |   -1
-   2 | v    |  5 | {7,8}               |     -1 |     -1 |   -1
-   3 | v    | 10 | {13}                |     -1 |     -1 |   -1
-   4 | v    | 15 | {14}                |     -1 |     -1 |   -1
-   5 | v    | 17 | {16}                |     -1 |     -1 |   -1
-(5 rows)
-
---q5 Checking dead end contraction for a graph with no dead end vertex
-SELECT * FROM pgr_contractGraph(
-	'SELECT id, source, target, cost, reverse_cost FROM edge_table 
-	WHERE id = 2 OR id = 4 OR id = 5 OR id = 8',
-	ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-(0 rows)
-
---q6 Checking for linear vertices case 1
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table 
-    WHERE id = 3 OR id = 5',
-    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-   1 | e    | -1 | {3}                 |      4 |      6 |    2
-(1 row)
-
---q7 Checking for linear vertices case 2
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table 
-    WHERE id = 8 OR id = 10',
-    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-   1 | e    | -1 | {5}                 |      6 |     10 |    2
-   2 | e    | -2 | {5}                 |     10 |      6 |    2
-(2 rows)
-
---q8 Checking for linear vertices case 3
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table 
-    WHERE id = 2 OR id = 4',
-    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-   1 | e    | -1 | {2}                 |      3 |      5 |    2
-(1 row)
-
---q9 Checking for linear vertices case 4
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table 
-    WHERE id = 5 OR id = 9',
-    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-   1 | e    | -1 | {6}                 |      3 |      9 |    2
-(1 row)
-
---q10 Checking linear contraction for sample data
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table' ,
-    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-   1 | e    | -1 | {4}                 |      9 |      3 |    2
-   2 | e    | -2 | {8}                 |      5 |      7 |    2
-   3 | e    | -3 | {8}                 |      7 |      5 |    2
-   4 | e    | -4 | {12}                |     11 |      9 |    2
-(4 rows)
-
---q11 Checking dead end, linear contraction for sample data
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table' ,
-    ARRAY[1, 2]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-   1 | v    |  5 | {7,8}               |     -1 |     -1 |   -1
-   2 | v    | 15 | {14}                |     -1 |     -1 |   -1
-   3 | v    | 17 | {16}                |     -1 |     -1 |   -1
-   4 | e    | -1 | {1,2}               |      3 |      5 |    2
-   5 | e    | -2 | {4}                 |      9 |      3 |    2
-   6 | e    | -3 | {10,13}             |      5 |     11 |    2
-   7 | e    | -4 | {12}                |     11 |      9 |    2
-(7 rows)
-
---q12 Checking linear contraction, dead end for sample data
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table' ,
-     ARRAY[2, 1]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-   1 | v    |  2 | {1}                 |     -1 |     -1 |   -1
-   2 | v    |  5 | {7,8}               |     -1 |     -1 |   -1
-   3 | v    | 10 | {13}                |     -1 |     -1 |   -1
-   4 | v    | 15 | {14}                |     -1 |     -1 |   -1
-   5 | v    | 17 | {16}                |     -1 |     -1 |   -1
-   6 | e    | -1 | {4}                 |      9 |      3 |    2
-   7 | e    | -2 | {8}                 |      5 |      7 |    2
-   8 | e    | -3 | {8}                 |      7 |      5 |    2
-   9 | e    | -4 | {12}                |     11 |      9 |    2
-(9 rows)
-
---q13 Checking linear contraction for a square like graph
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table 
-    WHERE id = 2 OR id = 4 OR id = 5 OR id = 8',
-    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-   1 | e    | -1 | {2}                 |      3 |      5 |    2
-   2 | e    | -2 | {2,5}               |      3 |      6 |    3
-(2 rows)
-
---q14 Checking linear contraction, dead end for a square like graph
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table 
-    WHERE id = 2 OR id = 4 OR id = 5 OR id = 8',
-    ARRAY[2, 1]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-   1 | v    |  3 | {2,5,6}             |     -1 |     -1 |   -1
-   2 | e    | -1 | {2}                 |      3 |      5 |    2
-   3 | e    | -2 | {2,5}               |      3 |      6 |    3
-(3 rows)
-
-ROLLBACK;
-ROLLBACK
diff --git a/src/contraction/test/directed-development.test.sql b/src/contraction/test/directed-development.test.sql
deleted file mode 100644
index 11de63a..0000000
--- a/src/contraction/test/directed-development.test.sql
+++ /dev/null
@@ -1,149 +0,0 @@
-
-/*
--- this test fails becuse parameter is wrong
-\echo --q0 Checking for valid contraction
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1',
-    ARRAY[-1]::integer[], 1, ARRAY[]::BIGINT[], true);
-*/
--- \echo --q0 -------------------------------------------
-
-\echo --q1 Checking dead end contraction for single edge
--- GRAPH: 1 <=> 2
--- EXPECTED
---    1 | v    |  2 | {1}                 |     -1 |     -1 |   -1
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1',
-    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
-
-
--- \echo --q1 -------------------------------------------
-
-\echo --q2 Checking dead end contraction for two edges
---GRAPH: 1 <=> 2 <- 3 
--- EXPECTED
---   1 | v    |  3 | {1,2}               |     -1 |     -1 |   -1
-
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id < 3',
-    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
-
-
--- \echo --q2 -------------------------------------------
-
-\echo --q3 Checking dead end contraction for sample data
-
--- EXPECTED
---   1 | v    |  2 | {1}                 |     -1 |     -1 |   -1
---   2 | v    |  5 | {7,8}               |     -1 |     -1 |   -1
---   3 | v    | 10 | {13}                |     -1 |     -1 |   -1
---   4 | v    | 15 | {14}                |     -1 |     -1 |   -1
---   5 | v    | 17 | {16}                |     -1 |     -1 |   -1
-
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
-
-
--- \echo --q3 -------------------------------------------
-
-\echo --q5 Checking dead end contraction for a graph with no dead end vertex
--- 5 <- 6 
--- "    ^
--- 2 <- 3 
-
--- EXPECTED
--- (empty)
-
-SELECT * FROM pgr_contractGraph(
-	'SELECT id, source, target, cost, reverse_cost FROM edge_table 
-	WHERE id = 2 OR id = 4 OR id = 5 OR id = 8',
-	ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
-
--- \echo --q5 -------------------------------------------
-
-\echo --q6 Checking for linear vertices case 1
--- GRPAH 1 <=> 2 
--- EXPECTED
---   1 | e    | -1 | {3}                 |      4 |      6 |    2
-
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table 
-    WHERE id = 3 OR id = 5',
-    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
-
--- \echo --q6 -------------------------------------------
-
-
-\echo --q7 Checking for linear vertices case 2
--- GRAPH 10 <=> 5 <=> 6 
--- EXPECTED
---   1 | e    | -1 | {5}                 |      6 |     10 |    2
---   2 | e    | -2 | {5}                 |     10 |      6 |    2
--- New edges:  6 <=> 10
-
-
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table 
-    WHERE id = 8 OR id = 10',
-    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
-
--- \echo --q7 -------------------------------------------
-
-
-\echo --q8 Checking for linear vertices case 3
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table 
-    WHERE id = 2 OR id = 4',
-    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
--- \echo --q8 -------------------------------------------
-
-\echo --q9 Checking for linear vertices case 4
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table 
-    WHERE id = 5 OR id = 9',
-    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
--- \echo --q9 -------------------------------------------
-
-\echo --q10 Checking linear contraction for sample data
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table' ,
-    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
--- \echo --q10 -------------------------------------------
-
-\echo --q11 Checking dead end, linear contraction for sample data
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table' ,
-    ARRAY[1, 2]::integer[], 1, ARRAY[]::BIGINT[], true);
--- \echo --q11 -------------------------------------------
-
-\echo --q12 Checking linear contraction, dead end for sample data
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table' ,
-     ARRAY[2, 1]::integer[], 1, ARRAY[]::BIGINT[], true);
--- \echo --q12 -------------------------------------------
-\echo --q13 Checking linear contraction for a square like graph
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table 
-    WHERE id = 2 OR id = 4 OR id = 5 OR id = 8',
-    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
--- \echo --q13 -------------------------------------------
-
-\echo --q14 Checking linear contraction, dead end for a square like graph
--- GRAPH
--- 5 <- 6 
--- "    ^
--- 2 <- 3 
--- 1|v|3|{2,5,6}|-1|-1|-1
--- 2|e|-1|{2}|3|5|2
--- 3|e|-2|{2,5}|3|6|3
-
--- 3 -> 5 
-
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table 
-    WHERE id = 2 OR id = 4 OR id = 5 OR id = 8',
-    ARRAY[2, 1]::integer[], 1, ARRAY[]::BIGINT[], true);
-
-
-
diff --git a/src/contraction/test/directed-linear.result b/src/contraction/test/directed-linear.result
deleted file mode 100644
index d196eb3..0000000
--- a/src/contraction/test/directed-linear.result
+++ /dev/null
@@ -1,70 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
---q6 Checking for linear vertices case 1
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table 
-    WHERE id = 3 OR id = 5',
-    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-   1 | e    | -1 | {3}                 |      4 |      6 |    2
-(1 row)
-
---q7 Checking for linear vertices case 2
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table 
-    WHERE id = 8 OR id = 10',
-    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-   1 | e    | -1 | {5}                 |      6 |     10 |    2
-   2 | e    | -2 | {5}                 |     10 |      6 |    2
-(2 rows)
-
---q8 Checking for linear vertices case 3
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table 
-    WHERE id = 2 OR id = 4',
-    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-   1 | e    | -1 | {2}                 |      3 |      5 |    2
-(1 row)
-
---q9 Checking for linear vertices case 4
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table 
-    WHERE id = 5 OR id = 9',
-    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-   1 | e    | -1 | {6}                 |      3 |      9 |    2
-(1 row)
-
---q10 Checking linear contraction for sample data
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table' ,
-    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-   1 | e    | -1 | {4}                 |      9 |      3 |    2
-   2 | e    | -2 | {8}                 |      5 |      7 |    2
-   3 | e    | -3 | {8}                 |      7 |      5 |    2
-   4 | e    | -4 | {12}                |     11 |      9 |    2
-(4 rows)
-
---q13 Checking linear contraction for a square like graph
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table 
-    WHERE id = 2 OR id = 4 OR id = 5 OR id = 8',
-    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-   1 | e    | -1 | {2}                 |      3 |      5 |    2
-   2 | e    | -2 | {2,5}               |      3 |      6 |    3
-(2 rows)
-
-ROLLBACK;
-ROLLBACK
diff --git a/src/contraction/test/directed-linear.test.sql b/src/contraction/test/directed-linear.test.sql
deleted file mode 100644
index 9eb7af6..0000000
--- a/src/contraction/test/directed-linear.test.sql
+++ /dev/null
@@ -1,45 +0,0 @@
-
-\echo --q6 Checking for linear vertices case 1
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table 
-    WHERE id = 3 OR id = 5',
-    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
--- \echo --q6 -------------------------------------------
-
-
-\echo --q7 Checking for linear vertices case 2
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table 
-    WHERE id = 8 OR id = 10',
-    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
--- \echo --q7 -------------------------------------------
-
-
-\echo --q8 Checking for linear vertices case 3
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table 
-    WHERE id = 2 OR id = 4',
-    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
--- \echo --q8 -------------------------------------------
-
-\echo --q9 Checking for linear vertices case 4
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table 
-    WHERE id = 5 OR id = 9',
-    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
--- \echo --q9 -------------------------------------------
-
-\echo --q10 Checking linear contraction for sample data
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table' ,
-    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
--- \echo --q10 -------------------------------------------
-
-
-\echo --q13 Checking linear contraction for a square like graph
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table 
-    WHERE id = 2 OR id = 4 OR id = 5 OR id = 8',
-    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
--- \echo --q13 -------------------------------------------
-
diff --git a/src/contraction/test/doc-contractGraph.result b/src/contraction/test/doc-contractGraph.result
deleted file mode 100644
index 7b3757f..0000000
--- a/src/contraction/test/doc-contractGraph.result
+++ /dev/null
@@ -1,62 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- q1
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[1, 2]);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-   1 | v    |  5 | {7,8}               |     -1 |     -1 |   -1
-   2 | v    | 15 | {14}                |     -1 |     -1 |   -1
-   3 | v    | 17 | {16}                |     -1 |     -1 |   -1
-   4 | e    | -1 | {1,2}               |      3 |      5 |    2
-   5 | e    | -2 | {4}                 |      9 |      3 |    2
-   6 | e    | -3 | {10,13}             |      5 |     11 |    2
-   7 | e    | -4 | {12}                |     11 |      9 |    2
-(7 rows)
-
--- q2
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-ARRAY[1, 2], forbidden_vertices:=ARRAY[2]);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-   1 | v    |  2 | {1}                 |     -1 |     -1 |   -1
-   2 | v    |  5 | {7,8}               |     -1 |     -1 |   -1
-   3 | v    | 15 | {14}                |     -1 |     -1 |   -1
-   4 | v    | 17 | {16}                |     -1 |     -1 |   -1
-   5 | e    | -1 | {4}                 |      9 |      3 |    2
-   6 | e    | -2 | {10,13}             |      5 |     11 |    2
-   7 | e    | -3 | {12}                |     11 |      9 |    2
-(7 rows)
-
--- q3
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-ARRAY[1]);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-   1 | v    |  2 | {1}                 |     -1 |     -1 |   -1
-   2 | v    |  5 | {7,8}               |     -1 |     -1 |   -1
-   3 | v    | 10 | {13}                |     -1 |     -1 |   -1
-   4 | v    | 15 | {14}                |     -1 |     -1 |   -1
-   5 | v    | 17 | {16}                |     -1 |     -1 |   -1
-(5 rows)
-
--- q4
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-ARRAY[2]);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-   1 | e    | -1 | {4}                 |      9 |      3 |    2
-   2 | e    | -2 | {8}                 |      5 |      7 |    2
-   3 | e    | -3 | {8}                 |      7 |      5 |    2
-   4 | e    | -4 | {12}                |     11 |      9 |    2
-(4 rows)
-
--- q5
-ROLLBACK;
-ROLLBACK
diff --git a/src/contraction/test/doc-contraction.result b/src/contraction/test/doc-contraction.result
deleted file mode 100644
index 7e015f5..0000000
--- a/src/contraction/test/doc-contraction.result
+++ /dev/null
@@ -1,339 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- q00
--- q01
-SET client_min_messages TO ERROR;
-SET
--- q1
-ALTER TABLE edge_table ADD contracted_vertices BIGINT[];
-ALTER TABLE
-ALTER TABLE edge_table_vertices_pgr ADD contracted_vertices BIGINT[];
-ALTER TABLE
-ALTER TABLE edge_table ADD is_contracted BOOLEAN DEFAULT false;
-ALTER TABLE
-ALTER TABLE edge_table_vertices_pgr ADD is_contracted BOOLEAN DEFAULT false;
-ALTER TABLE
-SET client_min_messages TO NOTICE;
-SET
--- q2
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    array[1,2], directed:=true);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-   1 | v    |  5 | {7,8}               |     -1 |     -1 |   -1
-   2 | v    | 15 | {14}                |     -1 |     -1 |   -1
-   3 | v    | 17 | {16}                |     -1 |     -1 |   -1
-   4 | e    | -1 | {1,2}               |      3 |      5 |    2
-   5 | e    | -2 | {4}                 |      9 |      3 |    2
-   6 | e    | -3 | {10,13}             |      5 |     11 |    2
-   7 | e    | -4 | {12}                |     11 |      9 |    2
-(7 rows)
-
--- q3
-SELECT * INTO contraction_results
-FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    array[1,2], directed:=true);
-SELECT 7
--- q4
-UPDATE edge_table_vertices_pgr
-SET is_contracted = true
-WHERE id IN (SELECT  unnest(contracted_vertices) FROM  contraction_results);
-UPDATE 10
--- q5
-SELECT id, is_contracted
-FROM edge_table_vertices_pgr
-ORDER BY id;
- id | is_contracted 
-----+---------------
-  1 | t
-  2 | t
-  3 | f
-  4 | t
-  5 | f
-  6 | f
-  7 | t
-  8 | t
-  9 | f
- 10 | t
- 11 | f
- 12 | t
- 13 | t
- 14 | t
- 15 | f
- 16 | t
- 17 | f
-(17 rows)
-
--- q6
-UPDATE edge_table_vertices_pgr
-SET contracted_vertices = contraction_results.contracted_vertices
-FROM contraction_results
-WHERE type = 'v' AND edge_table_vertices_pgr.id = contraction_results.id;
-UPDATE 3
--- q7
-SELECT id, contracted_vertices, is_contracted 
-FROM edge_table_vertices_pgr
-ORDER BY id;
- id | contracted_vertices | is_contracted 
-----+---------------------+---------------
-  1 |                     | t
-  2 |                     | t
-  3 |                     | f
-  4 |                     | t
-  5 | {7,8}               | f
-  6 |                     | f
-  7 |                     | t
-  8 |                     | t
-  9 |                     | f
- 10 |                     | t
- 11 |                     | f
- 12 |                     | t
- 13 |                     | t
- 14 |                     | t
- 15 | {14}                | f
- 16 |                     | t
- 17 | {16}                | f
-(17 rows)
-
--- q8
-INSERT INTO edge_table(source, target, cost, reverse_cost, contracted_vertices, is_contracted)
-SELECT source, target, cost, -1, contracted_vertices, true
-FROM contraction_results
-WHERE type = 'e';
-INSERT 0 4
--- q9
-SELECT id, source, target, cost, reverse_cost, contracted_vertices, is_contracted 
-FROM edge_table
-ORDER BY id;
- id | source | target | cost | reverse_cost | contracted_vertices | is_contracted 
-----+--------+--------+------+--------------+---------------------+---------------
-  1 |      1 |      2 |    1 |            1 |                     | f
-  2 |      2 |      3 |   -1 |            1 |                     | f
-  3 |      3 |      4 |   -1 |            1 |                     | f
-  4 |      2 |      5 |    1 |            1 |                     | f
-  5 |      3 |      6 |    1 |           -1 |                     | f
-  6 |      7 |      8 |    1 |            1 |                     | f
-  7 |      8 |      5 |    1 |            1 |                     | f
-  8 |      5 |      6 |    1 |            1 |                     | f
-  9 |      6 |      9 |    1 |            1 |                     | f
- 10 |      5 |     10 |    1 |            1 |                     | f
- 11 |      6 |     11 |    1 |           -1 |                     | f
- 12 |     10 |     11 |    1 |           -1 |                     | f
- 13 |     11 |     12 |    1 |           -1 |                     | f
- 14 |     10 |     13 |    1 |            1 |                     | f
- 15 |      9 |     12 |    1 |            1 |                     | f
- 16 |      4 |      9 |    1 |            1 |                     | f
- 17 |     14 |     15 |    1 |            1 |                     | f
- 18 |     16 |     17 |    1 |            1 |                     | f
- 19 |      3 |      5 |    2 |           -1 | {1,2}               | t
- 20 |      9 |      3 |    2 |           -1 | {4}                 | t
- 21 |      5 |     11 |    2 |           -1 | {10,13}             | t
- 22 |     11 |      9 |    2 |           -1 | {12}                | t
-(22 rows)
-
--- q10
-SELECT id  FROM edge_table_vertices_pgr
-WHERE is_contracted = false
-ORDER BY id;
- id 
-----
-  3
-  5
-  6
-  9
- 11
- 15
- 17
-(7 rows)
-
--- case1
-SELECT * FROM pgr_dijkstra(
-    $$
-    WITH
-    vertices_in_graph AS (
-        SELECT id  FROM edge_table_vertices_pgr WHERE is_contracted = false)
-    SELECT id, source, target, cost, reverse_cost 
-    FROM edge_table 
-    WHERE source IN (SELECT * FROM vertices_in_graph)
-    AND target IN (SELECT * FROM vertices_in_graph)
-    $$,
-    3, 11, false);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    3 |    5 |    1 |        0
-   2 |        2 |    6 |   11 |    1 |        1
-   3 |        3 |   11 |   -1 |    0 |        2
-(3 rows)
-
--- case2
-SELECT * FROM pgr_dijkstra(
-    $$
-    WITH
-    expand_edges AS (SELECT id, unnest(contracted_vertices) AS vertex FROM edge_table),
-    expand1 AS (SELECT contracted_vertices FROM edge_table
-        WHERE id IN (SELECT id FROM expand_edges WHERE vertex = 1)),
-    vertices_in_graph AS (
-        SELECT id  FROM edge_table_vertices_pgr WHERE is_contracted = false
-        UNION
-        SELECT unnest(contracted_vertices) FROM expand1)
-    SELECT id, source, target, cost, reverse_cost
-    FROM edge_table
-    WHERE source IN (SELECT * FROM vertices_in_graph)
-    AND target IN (SELECT * FROM vertices_in_graph)
-    $$,
-    3, 1, false);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    3 |    2 |    1 |        0
-   2 |        2 |    2 |    1 |    1 |        1
-   3 |        3 |    1 |   -1 |    0 |        2
-(3 rows)
-
--- case3
-SELECT * FROM pgr_dijkstra(
-    $$
-    WITH
-
-    expand_vertices AS (SELECT id, unnest(contracted_vertices) AS vertex FROM edge_table_vertices_pgr),
-    expand7 AS (SELECT contracted_vertices FROM edge_table_vertices_pgr
-        WHERE id IN (SELECT id FROM expand_vertices WHERE vertex = 7)),
-
-    expand_edges AS (SELECT id, unnest(contracted_vertices) AS vertex FROM edge_table),
-    expand13 AS (SELECT contracted_vertices FROM edge_table
-        WHERE id IN (SELECT id FROM expand_edges WHERE vertex = 13)),
-
-    vertices_in_graph AS (
-        SELECT id  FROM edge_table_vertices_pgr WHERE is_contracted = false
-        UNION
-        SELECT unnest(contracted_vertices) FROM expand13
-        UNION
-        SELECT unnest(contracted_vertices) FROM expand7)
-
-    SELECT id, source, target, cost, reverse_cost
-    FROM edge_table
-    WHERE source IN (SELECT * FROM vertices_in_graph)
-    AND target IN (SELECT * FROM vertices_in_graph)
-    $$,
-    7, 13, false);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    7 |    6 |    1 |        0
-   2 |        2 |    8 |    7 |    1 |        1
-   3 |        3 |    5 |   10 |    1 |        2
-   4 |        4 |   10 |   14 |    1 |        3
-   5 |        5 |   13 |   -1 |    0 |        4
-(5 rows)
-
--- case4
-SELECT * FROM  pgr_dijkstra(
-    $$
-    WITH
-    expand_vertices AS (SELECT id, unnest(contracted_vertices) AS vertex FROM edge_table_vertices_pgr),
-    expand7 AS (SELECT contracted_vertices FROM edge_table_vertices_pgr
-        WHERE id IN (SELECT id FROM expand_vertices WHERE vertex = 7)),
-    vertices_in_graph AS (
-        SELECT id  FROM edge_table_vertices_pgr WHERE is_contracted = false
-        UNION
-        SELECT unnest(contracted_vertices) FROM expand7)
-    SELECT id, source, target, cost, reverse_cost
-    FROM edge_table
-    WHERE source IN (SELECT * FROM vertices_in_graph)
-    AND target IN (SELECT * FROM vertices_in_graph)
-    $$,
-    3, 7, false);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    3 |   19 |    2 |        0
-   2 |        2 |    5 |    7 |    1 |        2
-   3 |        3 |    8 |    6 |    1 |        3
-   4 |        4 |    7 |   -1 |    0 |        4
-(4 rows)
-
--- case5q1
-WITH
-first_dijkstra AS (
-    SELECT * FROM  pgr_dijkstra(
-        $$
-        WITH
-        expand_vertices AS (SELECT id, unnest(contracted_vertices) AS vertex FROM edge_table_vertices_pgr),
-        expand7 AS (SELECT contracted_vertices FROM edge_table_vertices_pgr
-            WHERE id IN (SELECT id FROM expand_vertices WHERE vertex = 7)),
-        vertices_in_graph AS (
-            SELECT id  FROM edge_table_vertices_pgr WHERE is_contracted = false
-            UNION
-            SELECT unnest(contracted_vertices) FROM expand7)
-        SELECT id, source, target, cost, reverse_cost
-        FROM edge_table
-        WHERE source IN (SELECT * FROM vertices_in_graph)
-        AND target IN (SELECT * FROM vertices_in_graph)
-        $$,
-        3, 7, false))
-SELECT edge, contracted_vertices
-    FROM first_dijkstra JOIN edge_table
-    ON (edge = id)
-    WHERE is_contracted = true;
- edge | contracted_vertices 
-------+---------------------
-   19 | {1,2}
-(1 row)
-
--- case5q2
-SELECT * FROM pgr_dijkstra($$
-    WITH
-    -- This returns the results from case 2
-    first_dijkstra AS (
-        SELECT * FROM  pgr_dijkstra(
-            '
-            WITH
-            expand_vertices AS (SELECT id, unnest(contracted_vertices) AS vertex FROM edge_table_vertices_pgr),
-            expand7 AS (SELECT contracted_vertices FROM edge_table_vertices_pgr
-                WHERE id IN (SELECT id FROM expand_vertices WHERE vertex = 7)),
-            vertices_in_graph AS (
-                SELECT id  FROM edge_table_vertices_pgr WHERE is_contracted = false
-                UNION
-                SELECT unnest(contracted_vertices) FROM expand7)
-            SELECT id, source, target, cost, reverse_cost
-            FROM edge_table
-            WHERE source IN (SELECT * FROM vertices_in_graph)
-            AND target IN (SELECT * FROM vertices_in_graph)
-            ',
-            3, 7, false)),
-
-    -- edges that need expansion and the vertices to be expanded.
-    edges_to_expand AS (
-        SELECT edge, contracted_vertices
-        FROM first_dijkstra JOIN edge_table
-        ON (edge = id)
-        WHERE is_contracted = true),
-
-    vertices_in_graph AS (
-        -- the nodes of the contracted solution
-        SELECT node FROM first_dijkstra
-        UNION
-        -- the nodes of the expanding sections
-        SELECT unnest(contracted_vertices) FROM edges_to_expand)
-
-    SELECT id, source, target, cost, reverse_cost
-    FROM edge_table
-    WHERE source IN (SELECT * FROM vertices_in_graph)
-    AND target IN (SELECT * FROM vertices_in_graph)
-    -- not including the expanded edges
-    AND id NOT IN (SELECT edge FROM edges_to_expand)
-    $$,
-    3, 7, false);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    3 |    2 |    1 |        0
-   2 |        2 |    2 |    4 |    1 |        1
-   3 |        3 |    5 |    7 |    1 |        2
-   4 |        4 |    8 |    6 |    1 |        3
-   5 |        5 |    7 |   -1 |    0 |        4
-(5 rows)
-
--- end
-ROLLBACK;
-ROLLBACK
diff --git a/src/contraction/test/doc-contraction.test.sql b/src/contraction/test/doc-contraction.test.sql
deleted file mode 100644
index 21046c7..0000000
--- a/src/contraction/test/doc-contraction.test.sql
+++ /dev/null
@@ -1,212 +0,0 @@
-\echo -- q00
-\echo -- q01
-
-SET client_min_messages TO ERROR;
-\echo -- q1
-ALTER TABLE edge_table ADD contracted_vertices BIGINT[];
-ALTER TABLE edge_table_vertices_pgr ADD contracted_vertices BIGINT[];
-ALTER TABLE edge_table ADD is_contracted BOOLEAN DEFAULT false;
-ALTER TABLE edge_table_vertices_pgr ADD is_contracted BOOLEAN DEFAULT false;
-
-SET client_min_messages TO NOTICE;
-\echo -- q2
--- showing original results
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    array[1,2], directed:=true);
-
-\echo -- q3
-SELECT * INTO contraction_results
-FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    array[1,2], directed:=true);
-
-\echo -- q4
-UPDATE edge_table_vertices_pgr
-SET is_contracted = true
-WHERE id IN (SELECT  unnest(contracted_vertices) FROM  contraction_results);
-
-\echo -- q5
-SELECT id, is_contracted
-FROM edge_table_vertices_pgr
-ORDER BY id;
-
-\echo -- q6
-UPDATE edge_table_vertices_pgr
-SET contracted_vertices = contraction_results.contracted_vertices
-FROM contraction_results
-WHERE type = 'v' AND edge_table_vertices_pgr.id = contraction_results.id;
-
-\echo -- q7
-SELECT id, contracted_vertices, is_contracted 
-FROM edge_table_vertices_pgr
-ORDER BY id;
-
-\echo -- q8
-INSERT INTO edge_table(source, target, cost, reverse_cost, contracted_vertices, is_contracted)
-SELECT source, target, cost, -1, contracted_vertices, true
-FROM contraction_results
-WHERE type = 'e';
-
-\echo -- q9
-SELECT id, source, target, cost, reverse_cost, contracted_vertices, is_contracted 
-FROM edge_table
-ORDER BY id;
-
-\echo -- q10
-SELECT id  FROM edge_table_vertices_pgr
-WHERE is_contracted = false
-ORDER BY id;
-
-\echo -- case1
-SELECT * FROM pgr_dijkstra(
-    $$
-    WITH
-    vertices_in_graph AS (
-        SELECT id  FROM edge_table_vertices_pgr WHERE is_contracted = false)
-    SELECT id, source, target, cost, reverse_cost 
-    FROM edge_table 
-    WHERE source IN (SELECT * FROM vertices_in_graph)
-    AND target IN (SELECT * FROM vertices_in_graph)
-    $$,
-    3, 11, false);
-
-
-\echo -- case2
-SELECT * FROM pgr_dijkstra(
-    $$
-    WITH
-    expand_edges AS (SELECT id, unnest(contracted_vertices) AS vertex FROM edge_table),
-    expand1 AS (SELECT contracted_vertices FROM edge_table
-        WHERE id IN (SELECT id FROM expand_edges WHERE vertex = 1)),
-    vertices_in_graph AS (
-        SELECT id  FROM edge_table_vertices_pgr WHERE is_contracted = false
-        UNION
-        SELECT unnest(contracted_vertices) FROM expand1)
-    SELECT id, source, target, cost, reverse_cost
-    FROM edge_table
-    WHERE source IN (SELECT * FROM vertices_in_graph)
-    AND target IN (SELECT * FROM vertices_in_graph)
-    $$,
-    3, 1, false);
-
-\echo -- case3
-SELECT * FROM pgr_dijkstra(
-    $$
-    WITH
-
-    expand_vertices AS (SELECT id, unnest(contracted_vertices) AS vertex FROM edge_table_vertices_pgr),
-    expand7 AS (SELECT contracted_vertices FROM edge_table_vertices_pgr
-        WHERE id IN (SELECT id FROM expand_vertices WHERE vertex = 7)),
-
-    expand_edges AS (SELECT id, unnest(contracted_vertices) AS vertex FROM edge_table),
-    expand13 AS (SELECT contracted_vertices FROM edge_table
-        WHERE id IN (SELECT id FROM expand_edges WHERE vertex = 13)),
-
-    vertices_in_graph AS (
-        SELECT id  FROM edge_table_vertices_pgr WHERE is_contracted = false
-        UNION
-        SELECT unnest(contracted_vertices) FROM expand13
-        UNION
-        SELECT unnest(contracted_vertices) FROM expand7)
-
-    SELECT id, source, target, cost, reverse_cost
-    FROM edge_table
-    WHERE source IN (SELECT * FROM vertices_in_graph)
-    AND target IN (SELECT * FROM vertices_in_graph)
-    $$,
-    7, 13, false);
-
-\echo -- case4
-
-SELECT * FROM  pgr_dijkstra(
-    $$
-    WITH
-    expand_vertices AS (SELECT id, unnest(contracted_vertices) AS vertex FROM edge_table_vertices_pgr),
-    expand7 AS (SELECT contracted_vertices FROM edge_table_vertices_pgr
-        WHERE id IN (SELECT id FROM expand_vertices WHERE vertex = 7)),
-    vertices_in_graph AS (
-        SELECT id  FROM edge_table_vertices_pgr WHERE is_contracted = false
-        UNION
-        SELECT unnest(contracted_vertices) FROM expand7)
-    SELECT id, source, target, cost, reverse_cost
-    FROM edge_table
-    WHERE source IN (SELECT * FROM vertices_in_graph)
-    AND target IN (SELECT * FROM vertices_in_graph)
-    $$,
-    3, 7, false);
-
-
-\echo -- case5q1
--- Edges that need expansion and the vertices to be expanded.
-WITH
-first_dijkstra AS (
-    SELECT * FROM  pgr_dijkstra(
-        $$
-        WITH
-        expand_vertices AS (SELECT id, unnest(contracted_vertices) AS vertex FROM edge_table_vertices_pgr),
-        expand7 AS (SELECT contracted_vertices FROM edge_table_vertices_pgr
-            WHERE id IN (SELECT id FROM expand_vertices WHERE vertex = 7)),
-        vertices_in_graph AS (
-            SELECT id  FROM edge_table_vertices_pgr WHERE is_contracted = false
-            UNION
-            SELECT unnest(contracted_vertices) FROM expand7)
-        SELECT id, source, target, cost, reverse_cost
-        FROM edge_table
-        WHERE source IN (SELECT * FROM vertices_in_graph)
-        AND target IN (SELECT * FROM vertices_in_graph)
-        $$,
-        3, 7, false))
-
-SELECT edge, contracted_vertices
-    FROM first_dijkstra JOIN edge_table
-    ON (edge = id)
-    WHERE is_contracted = true;
-
-\echo -- case5q2 
-
-SELECT * FROM pgr_dijkstra($$
-    WITH
-    -- This returns the results from case 2
-    first_dijkstra AS (
-        SELECT * FROM  pgr_dijkstra(
-            '
-            WITH
-            expand_vertices AS (SELECT id, unnest(contracted_vertices) AS vertex FROM edge_table_vertices_pgr),
-            expand7 AS (SELECT contracted_vertices FROM edge_table_vertices_pgr
-                WHERE id IN (SELECT id FROM expand_vertices WHERE vertex = 7)),
-            vertices_in_graph AS (
-                SELECT id  FROM edge_table_vertices_pgr WHERE is_contracted = false
-                UNION
-                SELECT unnest(contracted_vertices) FROM expand7)
-            SELECT id, source, target, cost, reverse_cost
-            FROM edge_table
-            WHERE source IN (SELECT * FROM vertices_in_graph)
-            AND target IN (SELECT * FROM vertices_in_graph)
-            ',
-            3, 7, false)),
-
-    -- edges that need expansion and the vertices to be expanded.
-    edges_to_expand AS (
-        SELECT edge, contracted_vertices
-        FROM first_dijkstra JOIN edge_table
-        ON (edge = id)
-        WHERE is_contracted = true),
-
-    vertices_in_graph AS (
-        -- the nodes of the contracted solution
-        SELECT node FROM first_dijkstra
-        UNION
-        -- the nodes of the expanding sections
-        SELECT unnest(contracted_vertices) FROM edges_to_expand)
-
-    SELECT id, source, target, cost, reverse_cost
-    FROM edge_table
-    WHERE source IN (SELECT * FROM vertices_in_graph)
-    AND target IN (SELECT * FROM vertices_in_graph)
-    -- not including the expanded edges
-    AND id NOT IN (SELECT edge FROM edges_to_expand)
-    $$,
-    3, 7, false);
-
-\echo -- end
diff --git a/src/contraction/test/expand_graph.result b/src/contraction/test/expand_graph.result
deleted file mode 100644
index 070247e..0000000
--- a/src/contraction/test/expand_graph.result
+++ /dev/null
@@ -1,242 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
-step 1: Initial edge table
-SELECT id, source, target, cost, reverse_cost FROM edge_table;
- id | source | target | cost | reverse_cost 
-----+--------+--------+------+--------------
-  1 |      1 |      2 |    1 |            1
-  2 |      2 |      3 |   -1 |            1
-  3 |      3 |      4 |   -1 |            1
-  4 |      2 |      5 |    1 |            1
-  5 |      3 |      6 |    1 |           -1
-  6 |      7 |      8 |    1 |            1
-  7 |      8 |      5 |    1 |            1
-  8 |      5 |      6 |    1 |            1
-  9 |      6 |      9 |    1 |            1
- 10 |      5 |     10 |    1 |            1
- 11 |      6 |     11 |    1 |           -1
- 12 |     10 |     11 |    1 |           -1
- 13 |     11 |     12 |    1 |           -1
- 14 |     10 |     13 |    1 |            1
- 15 |      9 |     12 |    1 |            1
- 16 |      4 |      9 |    1 |            1
- 17 |     14 |     15 |    1 |            1
- 18 |     16 |     17 |    1 |            1
-(18 rows)
-
-step 2: Initial vertex table
-SELECT id FROM edge_table_vertices_pgr;
- id 
-----
-  1
-  2
-  3
-  4
-  5
-  6
-  7
-  8
-  9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
-(17 rows)
-
-step 3: Adding is_contracted column to edge_table......
-ALTER TABLE edge_table ADD is_contracted BOOLEAN DEFAULT false;
-ALTER TABLE
-step 4: Adding contracted_vertices column to edge_table.....
-ALTER TABLE edge_table ADD contracted_vertices integer[];
-ALTER TABLE
-step 5: Adding is_contracted column to edge_table......
-ALTER TABLE edge_table_vertices_pgr ADD is_contracted BOOLEAN DEFAULT false;
-ALTER TABLE
-step 6: Adding contracted_vertices column to edge_table.....
-ALTER TABLE edge_table_vertices_pgr ADD contracted_vertices integer[];
-ALTER TABLE
-step 7: Edge table after adding columns
-SELECT id, source, target, cost, reverse_cost, is_contracted, contracted_vertices FROM edge_table;
- id | source | target | cost | reverse_cost | is_contracted | contracted_vertices 
-----+--------+--------+------+--------------+---------------+---------------------
-  1 |      1 |      2 |    1 |            1 | f             | 
-  2 |      2 |      3 |   -1 |            1 | f             | 
-  3 |      3 |      4 |   -1 |            1 | f             | 
-  4 |      2 |      5 |    1 |            1 | f             | 
-  5 |      3 |      6 |    1 |           -1 | f             | 
-  6 |      7 |      8 |    1 |            1 | f             | 
-  7 |      8 |      5 |    1 |            1 | f             | 
-  8 |      5 |      6 |    1 |            1 | f             | 
-  9 |      6 |      9 |    1 |            1 | f             | 
- 10 |      5 |     10 |    1 |            1 | f             | 
- 11 |      6 |     11 |    1 |           -1 | f             | 
- 12 |     10 |     11 |    1 |           -1 | f             | 
- 13 |     11 |     12 |    1 |           -1 | f             | 
- 14 |     10 |     13 |    1 |            1 | f             | 
- 15 |      9 |     12 |    1 |            1 | f             | 
- 16 |      4 |      9 |    1 |            1 | f             | 
- 17 |     14 |     15 |    1 |            1 | f             | 
- 18 |     16 |     17 |    1 |            1 | f             | 
-(18 rows)
-
-step 8: Vertex table after adding columns
-SELECT id, is_contracted, contracted_vertices FROM edge_table_vertices_pgr;
- id | is_contracted | contracted_vertices 
-----+---------------+---------------------
-  1 | f             | 
-  2 | f             | 
-  3 | f             | 
-  4 | f             | 
-  5 | f             | 
-  6 | f             | 
-  7 | f             | 
-  8 | f             | 
-  9 | f             | 
- 10 | f             | 
- 11 | f             | 
- 12 | f             | 
- 13 | f             | 
- 14 | f             | 
- 15 | f             | 
- 16 | f             | 
- 17 | f             | 
-(17 rows)
-
-CREATE OR REPLACE FUNCTION pgr_update_contraction_columns(
-	edge_table text,
-	forbidden_vertices BIGINT[],
-	contraction_order integer[],
-	max_cycles integer,
-	directed BOOLEAN
-)
-RETURNS integer AS $total$
-declare
-total integer;
-contracted_vertex integer;
-query text;
-update_query text;
-split_query text;
-insert_query text;
-row record;
-split_row record;
-BEGIN
-total := 0;
-query := 'SELECT * FROM pgr_contractGraph('|| quote_literal(edge_table)||', ' || quote_literal(forbidden_vertices)||', ' || quote_literal(contraction_order)||', ' || quote_literal(max_cycles)||', ' || quote_literal(directed) || ')';
-    FOR row IN EXECUTE(query)
-    LOOP
-        
-        -- contracted_vertices_array := row.contracted_vertices;
-        -- If it is a vertex we update the two columns of the vertex table 
-        IF row.type = 'v' THEN
-            total := total + 1;
-            -- raise notice 'vertex';
-            update_query := 'UPDATE edge_table_vertices_pgr SET contracted_vertices = array_append(contracted_vertices, ';  
-            FOREACH contracted_vertex IN ARRAY row.contracted_vertices
-            LOOP
-                EXECUTE update_query || quote_literal(contracted_vertex) 
-                || ') WHERE id = ' || quote_literal(row.id);
-                EXECUTE 'UPDATE edge_table_vertices_pgr SET is_contracted = true WHERE id = '
-                || quote_literal(contracted_vertex);
-                -- raise notice 'cv: %', contracted_vertex;
-            END LOOP;
-        -- If it is an edge we insert a new entry to the edge table 
-        ELSEIF row.type = 'e' THEN
-            total := total + 1;
-            -- raise notice 'edge';
-            insert_query := 'INSERT INTO edge_table(id, source, target, cost, reverse_cost, is_contracted, contracted_vertices) VALUES ('
-            || quote_literal(row.id)|| ', '
-            || quote_literal(row.source)|| ', '
-            || quote_literal(row.target)|| ', '
-            || quote_literal(row.cost)|| ', '
-            || quote_literal(-1)|| ', '
-            || quote_literal(true)|| ', '
-            || quote_literal(row.contracted_vertices)
-            || ')';
-            EXECUTE insert_query;
-            FOREACH contracted_vertex IN ARRAY row.contracted_vertices
-            LOOP
-            EXECUTE 'UPDATE edge_table_vertices_pgr SET is_contracted = true WHERE id = '
-                || quote_literal(contracted_vertex);
-            END LOOP;
-        END IF;
-        -- raise notice 'id: %, type: %, cv: %',row.id, row.type, row.contracted_vertices;
-    END LOOP;
-
-   RETURN total;
-   END;
-   $total$ LANGUAGE plpgsql;
-CREATE FUNCTION
-CREATE OR REPLACE FUNCTION pgr_expand_contracted_graph(
-    original_edge_table text,
-    original_vertex_table text,
-    contracted_edge_table text,
-    contracted_vertex_table text
-)
-RETURNS integer AS $total$
-declare
-total integer;
-contracted_vertex integer;
-query text;
-row record;
-BEGIN
-    total := 0;
-    query := 'SELECT * FROM '
-    || quote_ident(contracted_edge_table)
-    ||' WHERE id < 0 ';
-    FOR row IN EXECUTE(query)
-    LOOP
-        -- Inserting the contracted vertices into the vertex table
-        FOREACH contracted_vertex IN ARRAY row.contracted_vertices
-        LOOP
-            EXECUTE 'INSERT INTO ' || quote_ident(contracted_vertex_table) || '(id, is_contracted)' ||' VALUES ('
-            || quote_literal(contracted_vertex) || ', false);';   
-        END LOOP;
-        -- Adding the edges(id < 0) between these vertices to the edge table
-        EXECUTE 'INSERT INTO ' 
-        || quote_ident(contracted_edge_table) 
-        || ' SELECT * FROM ' || quote_ident(original_edge_table)
-        || ' WHERE source = ANY(' || quote_literal(row.contracted_vertices) || ')'
-        || ' OR target = ANY(' || quote_literal(row.contracted_vertices) || ')'
-        || ' AND id > 0';
-
-    END LOOP;
-
-    -- Removing all those edges with id < 0
-    EXECUTE 'DELETE FROM ' 
-    || quote_ident(contracted_edge_table)
-    || ' WHERE id < 0';
-
-    query := 'SELECT * FROM '|| quote_ident(contracted_vertex_table)||' WHERE array_length(contracted_vertices, 1) > 0';
-    FOR row IN EXECUTE(query)
-    LOOP
-        -- Inserting the contracted vertices into the vertex table
-        FOREACH contracted_vertex IN ARRAY row.contracted_vertices
-        LOOP
-            EXECUTE 'INSERT INTO ' || quote_ident(contracted_vertex_table) || '(id, is_contracted)' ||' VALUES ('
-            || quote_literal(contracted_vertex) || ', false);';    
-        END LOOP;
-        -- Adding the edges(id < 0) between these vertices to the edge table
-        EXECUTE 'INSERT INTO ' 
-        || quote_ident(contracted_edge_table) 
-        || ' SELECT * FROM ' || quote_ident(original_edge_table)
-        || ' WHERE source = ANY(' || quote_literal(row.contracted_vertices) || ')'
-        || ' OR target = ANY(' || quote_literal(row.contracted_vertices) || ')'
-        || ' AND id > 0';
-    EXECUTE 'UPDATE '
-    || quote_ident(contracted_vertex_table)
-    || ' SET contracted_vertices = NULL' 
-    || ' WHERE array_length(contracted_vertices, 1) > 0 ';
-    END LOOP;
-
-RETURN total;
-END;
-   $total$ LANGUAGE plpgsql;
-CREATE FUNCTION
-ROLLBACK;
-ROLLBACK
diff --git a/src/contraction/test/expand_graph.test.sql b/src/contraction/test/expand_graph.test.sql
deleted file mode 100644
index 3df993e..0000000
--- a/src/contraction/test/expand_graph.test.sql
+++ /dev/null
@@ -1,169 +0,0 @@
-
-\echo 'step 1: Initial edge table'
-
-SELECT id, source, target, cost, reverse_cost FROM edge_table;
-
-\echo 'step 2: Initial vertex table'
-
-SELECT id FROM edge_table_vertices_pgr;
-
-
--- add extra columns to the edges and vertices table
-\echo 'step 3: Adding is_contracted column to edge_table......'
-
-ALTER TABLE edge_table ADD is_contracted BOOLEAN DEFAULT false;
-
-\echo 'step 4: Adding contracted_vertices column to edge_table.....'
-
-ALTER TABLE edge_table ADD contracted_vertices integer[];
-
-\echo 'step 5: Adding is_contracted column to edge_table......'
-
-ALTER TABLE edge_table_vertices_pgr ADD is_contracted BOOLEAN DEFAULT false;
-
-\echo 'step 6: Adding contracted_vertices column to edge_table.....'
-
-ALTER TABLE edge_table_vertices_pgr ADD contracted_vertices integer[];
-
-\echo 'step 7: Edge table after adding columns'
-
-SELECT id, source, target, cost, reverse_cost, is_contracted, contracted_vertices FROM edge_table;
-
-\echo 'step 8: Vertex table after adding columns'
-
-SELECT id, is_contracted, contracted_vertices FROM edge_table_vertices_pgr;
-
-
--- update the added columns to the above tables 
--- based on the results of contraction query
-CREATE OR REPLACE FUNCTION pgr_update_contraction_columns(
-	edge_table text,
-	forbidden_vertices BIGINT[],
-	contraction_order integer[],
-	max_cycles integer,
-	directed BOOLEAN
-)
-RETURNS integer AS $total$
-declare
-total integer;
-contracted_vertex integer;
-query text;
-update_query text;
-split_query text;
-insert_query text;
-row record;
-split_row record;
-BEGIN
-total := 0;
-query := 'SELECT * FROM pgr_contractGraph('|| quote_literal(edge_table)||', ' || quote_literal(forbidden_vertices)||', ' || quote_literal(contraction_order)||', ' || quote_literal(max_cycles)||', ' || quote_literal(directed) || ')';
-    FOR row IN EXECUTE(query)
-    LOOP
-        
-        -- contracted_vertices_array := row.contracted_vertices;
-        -- If it is a vertex we update the two columns of the vertex table 
-        IF row.type = 'v' THEN
-            total := total + 1;
-            -- raise notice 'vertex';
-            update_query := 'UPDATE edge_table_vertices_pgr SET contracted_vertices = array_append(contracted_vertices, ';  
-            FOREACH contracted_vertex IN ARRAY row.contracted_vertices
-            LOOP
-                EXECUTE update_query || quote_literal(contracted_vertex) 
-                || ') WHERE id = ' || quote_literal(row.id);
-                EXECUTE 'UPDATE edge_table_vertices_pgr SET is_contracted = true WHERE id = '
-                || quote_literal(contracted_vertex);
-                -- raise notice 'cv: %', contracted_vertex;
-            END LOOP;
-        -- If it is an edge we insert a new entry to the edge table 
-        ELSEIF row.type = 'e' THEN
-            total := total + 1;
-            -- raise notice 'edge';
-            insert_query := 'INSERT INTO edge_table(id, source, target, cost, reverse_cost, is_contracted, contracted_vertices) VALUES ('
-            || quote_literal(row.id)|| ', '
-            || quote_literal(row.source)|| ', '
-            || quote_literal(row.target)|| ', '
-            || quote_literal(row.cost)|| ', '
-            || quote_literal(-1)|| ', '
-            || quote_literal(true)|| ', '
-            || quote_literal(row.contracted_vertices)
-            || ')';
-            EXECUTE insert_query;
-            FOREACH contracted_vertex IN ARRAY row.contracted_vertices
-            LOOP
-            EXECUTE 'UPDATE edge_table_vertices_pgr SET is_contracted = true WHERE id = '
-                || quote_literal(contracted_vertex);
-            END LOOP;
-        END IF;
-        -- raise notice 'id: %, type: %, cv: %',row.id, row.type, row.contracted_vertices;
-    END LOOP;
-
-   RETURN total;
-   END;
-   $total$ LANGUAGE plpgsql;
-
-CREATE OR REPLACE FUNCTION pgr_expand_contracted_graph(
-    original_edge_table text,
-    original_vertex_table text,
-    contracted_edge_table text,
-    contracted_vertex_table text
-)
-RETURNS integer AS $total$
-declare
-total integer;
-contracted_vertex integer;
-query text;
-row record;
-BEGIN
-    total := 0;
-    query := 'SELECT * FROM '
-    || quote_ident(contracted_edge_table)
-    ||' WHERE id < 0 ';
-    FOR row IN EXECUTE(query)
-    LOOP
-        -- Inserting the contracted vertices into the vertex table
-        FOREACH contracted_vertex IN ARRAY row.contracted_vertices
-        LOOP
-            EXECUTE 'INSERT INTO ' || quote_ident(contracted_vertex_table) || '(id, is_contracted)' ||' VALUES ('
-            || quote_literal(contracted_vertex) || ', false);';   
-        END LOOP;
-        -- Adding the edges(id < 0) between these vertices to the edge table
-        EXECUTE 'INSERT INTO ' 
-        || quote_ident(contracted_edge_table) 
-        || ' SELECT * FROM ' || quote_ident(original_edge_table)
-        || ' WHERE source = ANY(' || quote_literal(row.contracted_vertices) || ')'
-        || ' OR target = ANY(' || quote_literal(row.contracted_vertices) || ')'
-        || ' AND id > 0';
-
-    END LOOP;
-
-    -- Removing all those edges with id < 0
-    EXECUTE 'DELETE FROM ' 
-    || quote_ident(contracted_edge_table)
-    || ' WHERE id < 0';
-
-    query := 'SELECT * FROM '|| quote_ident(contracted_vertex_table)||' WHERE array_length(contracted_vertices, 1) > 0';
-    FOR row IN EXECUTE(query)
-    LOOP
-        -- Inserting the contracted vertices into the vertex table
-        FOREACH contracted_vertex IN ARRAY row.contracted_vertices
-        LOOP
-            EXECUTE 'INSERT INTO ' || quote_ident(contracted_vertex_table) || '(id, is_contracted)' ||' VALUES ('
-            || quote_literal(contracted_vertex) || ', false);';    
-        END LOOP;
-        -- Adding the edges(id < 0) between these vertices to the edge table
-        EXECUTE 'INSERT INTO ' 
-        || quote_ident(contracted_edge_table) 
-        || ' SELECT * FROM ' || quote_ident(original_edge_table)
-        || ' WHERE source = ANY(' || quote_literal(row.contracted_vertices) || ')'
-        || ' OR target = ANY(' || quote_literal(row.contracted_vertices) || ')'
-        || ' AND id > 0';
-    EXECUTE 'UPDATE '
-    || quote_ident(contracted_vertex_table)
-    || ' SET contracted_vertices = NULL' 
-    || ' WHERE array_length(contracted_vertices, 1) > 0 ';
-    END LOOP;
-
-RETURN total;
-END;
-   $total$ LANGUAGE plpgsql;
-
-
diff --git a/src/contraction/test/expand_graph_without_function.result b/src/contraction/test/expand_graph_without_function.result
deleted file mode 100644
index a28103e..0000000
--- a/src/contraction/test/expand_graph_without_function.result
+++ /dev/null
@@ -1,152 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
-SELECT 'step 1: Initial edge table';
-          ?column?          
-----------------------------
- step 1: Initial edge table
-(1 row)
-
-SELECT id, source, target, cost, reverse_cost FROM edge_table;
- id | source | target | cost | reverse_cost 
-----+--------+--------+------+--------------
-  1 |      1 |      2 |    1 |            1
-  2 |      2 |      3 |   -1 |            1
-  3 |      3 |      4 |   -1 |            1
-  4 |      2 |      5 |    1 |            1
-  5 |      3 |      6 |    1 |           -1
-  6 |      7 |      8 |    1 |            1
-  7 |      8 |      5 |    1 |            1
-  8 |      5 |      6 |    1 |            1
-  9 |      6 |      9 |    1 |            1
- 10 |      5 |     10 |    1 |            1
- 11 |      6 |     11 |    1 |           -1
- 12 |     10 |     11 |    1 |           -1
- 13 |     11 |     12 |    1 |           -1
- 14 |     10 |     13 |    1 |            1
- 15 |      9 |     12 |    1 |            1
- 16 |      4 |      9 |    1 |            1
- 17 |     14 |     15 |    1 |            1
- 18 |     16 |     17 |    1 |            1
-(18 rows)
-
-SELECT 'step 2: Initial vertex table';
-           ?column?           
-------------------------------
- step 2: Initial vertex table
-(1 row)
-
-SELECT id FROM edge_table_vertices_pgr;
- id 
-----
-  1
-  2
-  3
-  4
-  5
-  6
-  7
-  8
-  9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
-(17 rows)
-
-SELECT 'step 3: Adding is_contracted column to edge_table......';
-                        ?column?                         
----------------------------------------------------------
- step 3: Adding is_contracted column to edge_table......
-(1 row)
-
-ALTER TABLE edge_table ADD is_contracted BOOLEAN DEFAULT false;
-ALTER TABLE
-SELECT 'step 4: Adding contracted_vertices column to edge_table.....';
-                           ?column?                           
---------------------------------------------------------------
- step 4: Adding contracted_vertices column to edge_table.....
-(1 row)
-
-ALTER TABLE edge_table ADD contracted_vertices integer[];
-ALTER TABLE
-SELECT 'step 5: Adding is_contracted column to edge_table......';
-                        ?column?                         
----------------------------------------------------------
- step 5: Adding is_contracted column to edge_table......
-(1 row)
-
-ALTER TABLE edge_table_vertices_pgr ADD is_contracted BOOLEAN DEFAULT false;
-ALTER TABLE
-SELECT 'step 6: Adding contracted_vertices column to edge_table.....';
-                           ?column?                           
---------------------------------------------------------------
- step 6: Adding contracted_vertices column to edge_table.....
-(1 row)
-
-ALTER TABLE edge_table_vertices_pgr ADD contracted_vertices integer[];
-ALTER TABLE
-SELECT 'step 7: Edge table after adding columns';
-                ?column?                 
------------------------------------------
- step 7: Edge table after adding columns
-(1 row)
-
-SELECT id, source, target, cost, reverse_cost, is_contracted, contracted_vertices FROM edge_table;
- id | source | target | cost | reverse_cost | is_contracted | contracted_vertices 
-----+--------+--------+------+--------------+---------------+---------------------
-  1 |      1 |      2 |    1 |            1 | f             | 
-  2 |      2 |      3 |   -1 |            1 | f             | 
-  3 |      3 |      4 |   -1 |            1 | f             | 
-  4 |      2 |      5 |    1 |            1 | f             | 
-  5 |      3 |      6 |    1 |           -1 | f             | 
-  6 |      7 |      8 |    1 |            1 | f             | 
-  7 |      8 |      5 |    1 |            1 | f             | 
-  8 |      5 |      6 |    1 |            1 | f             | 
-  9 |      6 |      9 |    1 |            1 | f             | 
- 10 |      5 |     10 |    1 |            1 | f             | 
- 11 |      6 |     11 |    1 |           -1 | f             | 
- 12 |     10 |     11 |    1 |           -1 | f             | 
- 13 |     11 |     12 |    1 |           -1 | f             | 
- 14 |     10 |     13 |    1 |            1 | f             | 
- 15 |      9 |     12 |    1 |            1 | f             | 
- 16 |      4 |      9 |    1 |            1 | f             | 
- 17 |     14 |     15 |    1 |            1 | f             | 
- 18 |     16 |     17 |    1 |            1 | f             | 
-(18 rows)
-
-SELECT 'step 8: Vertex table after adding columns';
-                 ?column?                  
--------------------------------------------
- step 8: Vertex table after adding columns
-(1 row)
-
-SELECT id, is_contracted, contracted_vertices FROM edge_table_vertices_pgr;
- id | is_contracted | contracted_vertices 
-----+---------------+---------------------
-  1 | f             | 
-  2 | f             | 
-  3 | f             | 
-  4 | f             | 
-  5 | f             | 
-  6 | f             | 
-  7 | f             | 
-  8 | f             | 
-  9 | f             | 
- 10 | f             | 
- 11 | f             | 
- 12 | f             | 
- 13 | f             | 
- 14 | f             | 
- 15 | f             | 
- 16 | f             | 
- 17 | f             | 
-(17 rows)
-
-ROLLBACK;
-ROLLBACK
diff --git a/src/contraction/test/proof_of_concept.result b/src/contraction/test/proof_of_concept.result
deleted file mode 100644
index 1e9f91c..0000000
--- a/src/contraction/test/proof_of_concept.result
+++ /dev/null
@@ -1,137 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
-Adding an additional column to store if its part of the contracted graph
-ALTER TABLE edge_table ADD is_contracted BOOLEAN DEFAULT false;
-ALTER TABLE
-Adding a new edge joining vertices 3 and 5 with cost=2 to the edge table
-INSERT INTO edge_table(id, source, target, cost, reverse_cost, is_contracted)
-VALUES (19, 3, 5, 2, 2, true);
-INSERT 0 1
-Adding a new edge joining vertices 3 and 9 with cost=2 to the edge table
-INSERT INTO edge_table(id, source, target, cost, reverse_cost, is_contracted)
-VALUES (20, 3, 9, 2, 2, true);
-INSERT 0 1
-Adding a new edge joining vertices 5 and 11 with cost=2 to the edge table
-INSERT INTO edge_table(id, source, target, cost, reverse_cost, is_contracted)
-VALUES (21, 5, 11, 2, 2, true);
-INSERT 0 1
-Adding a new edge joining vertices 9 and 11 with cost=2 to the edge table
-INSERT INTO edge_table(id, source, target, cost, reverse_cost, is_contracted)
-VALUES (22, 9, 11, 2, 2, true);
-INSERT 0 1
-Case 1: Both source and target belong to the contracted graph.
-We are going to route from 3 to 11
-Since 3 and 11 both are in the contracted graph we need not add any vertices.
-SELECT * FROM
-pgr_dijkstra($$
-    SELECT id, source, target, cost, reverse_cost
-    FROM edge_table
-    WHERE source IN (3, 5, 6, 9, 11, 15, 17)
-        AND target IN (3, 5, 6, 9, 11, 15, 17)$$,
-    3, 11, false);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    3 |    5 |    1 |        0
-   2 |        2 |    6 |   11 |    1 |        1
-   3 |        3 |   11 |   -1 |    0 |        2
-(3 rows)
-
-Case 2: source belongs to a contracted graph, while target belongs to a vertex subgraph.
-We are going to route from 3 to 7
-Since 7 is in the contracted subgraph of vertex 5 we add {7, 8} to the vertex set, so the vertex set becomes (3, 5, 6, 7, 8, 9, 11, 15, 17)
-SELECT * FROM pgr_dijkstra($$
-    SELECT id, source, target, cost, reverse_cost
-    FROM edge_table
-    WHERE source IN (3, 5, 6, 9, 11, 15, 17,   7, 8)
-        AND target IN (3, 5, 6, 9, 11, 15, 17,   7, 8)$$,
-    3, 7, false);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    3 |   19 |    2 |        0
-   2 |        2 |    5 |    7 |    1 |        2
-   3 |        3 |    8 |    6 |    1 |        3
-   4 |        4 |    7 |   -1 |    0 |        4
-(4 rows)
-
-Case 3: source belongs to a contracted graph, while target belongs to a edge subgraph.
-We are going to route from 3 to 13
-Since 13 is in the contracted subgraph of edge (5, 11) we add {10, 13} to the vertex set, so the vertex set becomes (3, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17)
-SELECT * FROM pgr_dijkstra($$
-    SELECT id, source, target, cost, reverse_cost
-    FROM edge_table
-    WHERE source IN (3, 5, 6, 9, 11, 15, 17,    10, 13)
-        AND target IN (3, 5, 6, 9, 11, 15, 17,    10, 13)$$,
-    3, 13, false);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    3 |    5 |    1 |        0
-   2 |        2 |    6 |   11 |    1 |        1
-   3 |        3 |   11 |   12 |    1 |        2
-   4 |        4 |   10 |   14 |    1 |        3
-   5 |        5 |   13 |   -1 |    0 |        4
-(5 rows)
-
-Case 4: source belongs to a vertex subgraph, while target belongs to a edge subgraph.
-We are going to route from 7 to 13
-Since 13 is in the contracted subgraph of edge (5, 11) we add {10, 13} to the vertex set, and since 7 is in the contracted subgraph of vertex 5 we add {7, 8} to the vertex sets (3, 5, 6, 7, 8, 9, 11, 15, 17)
-SELECT * FROM pgr_dijkstra($$
-    SELECT id, source, target, cost, reverse_cost
-    FROM edge_table
-    WHERE source IN (3, 5, 6, 9, 11, 15, 17,    7, 8,   10, 13)
-        AND target IN (3, 5, 6, 9, 11, 15, 17,   7, 8,   10, 13)$$,
-    7, 13, false);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    7 |    6 |    1 |        0
-   2 |        2 |    8 |    7 |    1 |        1
-   3 |        3 |    5 |   10 |    1 |        2
-   4 |        4 |   10 |   14 |    1 |        3
-   5 |        5 |   13 |   -1 |    0 |        4
-(5 rows)
-
-Case 5: The path contains a shortcut.
-We are going to route from 3 to 9
-Since 3 and 9 both are in the contracted graph we need not add any vertices.
-SELECT * FROM pgr_dijkstra($$
-    SELECT id, source, target, cost, reverse_cost
-    FROM edge_table
-    WHERE source IN (3, 5, 6, 7, 8, 9, 11, 15, 17)
-        AND target IN (3, 5, 6, 7, 8, 9, 11, 15, 17)$$,
-    3, 9, false);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    3 |   20 |    2 |        0
-   2 |        2 |    9 |   -1 |    0 |        2
-(2 rows)
-
-SELECT id, source, target, cost, reverse_cost, is_contracted
-FROM edge_table
-WHERE is_contracted = true
-ORDER BY id;
- id | source | target | cost | reverse_cost | is_contracted 
-----+--------+--------+------+--------------+---------------
- 19 |      3 |      5 |    2 |            2 | t
- 20 |      3 |      9 |    2 |            2 | t
- 21 |      5 |     11 |    2 |            2 | t
- 22 |      9 |     11 |    2 |            2 | t
-(4 rows)
-
-This implies that it is a shortcut and should be expanded
-SELECT * FROM pgr_dijkstra($$
-    SELECT id, source, target, cost, reverse_cost
-    FROM edge_table
-    WHERE source IN (3, 5, 6, 7, 8, 9, 11, 15, 17)
-        AND target IN (3, 5, 6, 7, 8, 9, 11, 15, 17)
-        AND is_contracted=false$$,
-    3, 9, false);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    3 |    5 |    1 |        0
-   2 |        2 |    6 |    9 |    1 |        1
-   3 |        3 |    9 |   -1 |    0 |        2
-(3 rows)
-
-ROLLBACK;
-ROLLBACK
diff --git a/src/contraction/test/proof_of_concept_1.result b/src/contraction/test/proof_of_concept_1.result
deleted file mode 100644
index 8bf02ff..0000000
--- a/src/contraction/test/proof_of_concept_1.result
+++ /dev/null
@@ -1,135 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
-Adding an additional column to store if its part of the contracted graph
-ALTER TABLE edge_table ADD is_contracted BOOLEAN DEFAULT false;
-ALTER TABLE
-Adding a new edges joining vertices 3 and 5 with cost=2 to the edge table
-INSERT INTO edge_table(source, target, cost, reverse_cost, is_contracted) 
-VALUES (3, 5, 2, 2, true);
-INSERT 0 1
-Adding a new edges joining vertices 3 and 9 with cost=2 to the edge table
-INSERT INTO edge_table(source, target, cost, reverse_cost, is_contracted) 
-VALUES (3, 9, 2, 2, true);
-INSERT 0 1
-Adding a new edges joining vertices 5 and 11 with cost=2 to the edge table
-INSERT INTO edge_table(source, target, cost, reverse_cost, is_contracted) 
-VALUES (5, 11, 2, 2, true);
-INSERT 0 1
-Adding a new edges joining vertices 9 and 11 with cost=2 to the edge table
-INSERT INTO edge_table(source, target, cost, reverse_cost, is_contracted) 
-VALUES (9, 11, 2, 2, true);
-INSERT 0 1
-Case 1: Both source and target belong to the contracted graph.
-We are going to route from 3 to 11
-Since 3 and 11 both are in the contracted graph we need not add any vertices.
-SELECT * FROM 
-pgr_dijkstra('SELECT id, source, target, cost, reverse_cost FROM edge_table where source IN (3, 5, 6, 9, 11, 15, 17) AND target IN (3, 5, 6, 9, 11, 15, 17) AND is_contracted=false',
-3, 11, false);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    3 |    5 |    1 |        0
-   2 |        2 |    6 |   11 |    1 |        1
-   3 |        3 |   11 |   -1 |    0 |        2
-(3 rows)
-
-Case 2: source belongs to a contracted graph, while target belongs to a vertex subgraph.
-We are going to route from 3 to 7
-Since 7 is in the contracted subgraph of vertex 5 we add {7, 8} to the vertex set, so the vertex set becomes (3, 5, 6, 7, 8, 9, 11, 15, 17)
-SELECT * FROM 
-pgr_dijkstra('SELECT id, source, target, cost, reverse_cost FROM edge_table where source IN (3, 5, 6, 9, 11, 15, 17,   7, 8)	 AND target IN (3, 5, 6, 9, 11, 15, 17,   7, 8) AND is_contracted=false',
-3, 7, false);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    3 |    5 |    1 |        0
-   2 |        2 |    6 |    8 |    1 |        1
-   3 |        3 |    5 |    7 |    1 |        2
-   4 |        4 |    8 |    6 |    1 |        3
-   5 |        5 |    7 |   -1 |    0 |        4
-(5 rows)
-
-Case 3: source belongs to a contracted graph, while target belongs to a edge subgraph.
-We are going to route from 3 to 13
-Since 13 is in the contracted subgraph of edge (5, 11) we add {10, 13} to the vertex set, so the vertex set becomes (3, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17)
-SELECT * FROM 
-pgr_dijkstra('SELECT id, source, target, cost, reverse_cost FROM edge_table where source IN (3, 5, 6, 9, 11, 15, 17,    10, 13) AND target IN (3, 5, 6, 9, 11, 15, 17,    10, 13) AND is_contracted=false',
-3, 13, false);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    3 |    5 |    1 |        0
-   2 |        2 |    6 |    8 |    1 |        1
-   3 |        3 |    5 |   10 |    1 |        2
-   4 |        4 |   10 |   14 |    1 |        3
-   5 |        5 |   13 |   -1 |    0 |        4
-(5 rows)
-
-Case 4: source belongs to a vertex subgraph, while target belongs to a edge subgraph.
-We are going to route from 7 to 13
-Since 13 is in the contracted subgraph of edge (5, 11) we add {10, 13} to the vertex set, and since 7 is in the contracted subgraph of vertex 5 we add {7, 8} to the vertex sets (3, 5, 6, 7, 8, 9, 11, 15, 17)
-SELECT * FROM 
-pgr_dijkstra('SELECT id, source, target, cost, reverse_cost FROM edge_table where source IN (3, 5, 6, 9, 11, 15, 17,    7, 8,   10, 13) AND target IN (3, 5, 6, 9, 11, 15, 17,    7, 8,   10, 13) AND is_contracted=false',
-7, 13, false);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    7 |    6 |    1 |        0
-   2 |        2 |    8 |    7 |    1 |        1
-   3 |        3 |    5 |   10 |    1 |        2
-   4 |        4 |   10 |   14 |    1 |        3
-   5 |        5 |   13 |   -1 |    0 |        4
-(5 rows)
-
-Case 5: The path contains a shortcut.
-
-We are going to route from 3 to 9
-Since 3 and 9 both are in the contracted graph we need not add any vertices.
-SELECT * FROM 
-pgr_dijkstra('SELECT id, source, target, cost, reverse_cost FROM edge_table where source IN (3, 5, 6, 7, 8, 9, 11, 15, 17) AND target IN (3, 5, 6, 7, 8, 9, 11, 15, 17) AND is_contracted=false',
-3, 9, false);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    3 |    5 |    1 |        0
-   2 |        2 |    6 |    9 |    1 |        1
-   3 |        3 |    9 |   -1 |    0 |        2
-(3 rows)
-
-SELECT id, source, target, cost, reverse_cost, is_contracted FROM edge_table ORDER BY id;
- id | source | target | cost | reverse_cost | is_contracted 
-----+--------+--------+------+--------------+---------------
-  1 |      1 |      2 |    1 |            1 | f
-  2 |      2 |      3 |   -1 |            1 | f
-  3 |      3 |      4 |   -1 |            1 | f
-  4 |      2 |      5 |    1 |            1 | f
-  5 |      3 |      6 |    1 |           -1 | f
-  6 |      7 |      8 |    1 |            1 | f
-  7 |      8 |      5 |    1 |            1 | f
-  8 |      5 |      6 |    1 |            1 | f
-  9 |      6 |      9 |    1 |            1 | f
- 10 |      5 |     10 |    1 |            1 | f
- 11 |      6 |     11 |    1 |           -1 | f
- 12 |     10 |     11 |    1 |           -1 | f
- 13 |     11 |     12 |    1 |           -1 | f
- 14 |     10 |     13 |    1 |            1 | f
- 15 |      9 |     12 |    1 |            1 | f
- 16 |      4 |      9 |    1 |            1 | f
- 17 |     14 |     15 |    1 |            1 | f
- 18 |     16 |     17 |    1 |            1 | f
- 23 |      3 |      5 |    2 |            2 | t
- 24 |      3 |      9 |    2 |            2 | t
- 25 |      5 |     11 |    2 |            2 | t
- 26 |      9 |     11 |    2 |            2 | t
-(22 rows)
-
-This implies that it is a shortcut and should be expanded
-SELECT * FROM 
-pgr_dijkstra('SELECT id, source, target, cost, reverse_cost FROM edge_table where source IN (3, 5, 6, 7, 8, 9, 11, 15, 17) AND target IN (3, 5, 6, 7, 8, 9, 11, 15, 17) AND is_contracted=false',
-3, 9, false);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    3 |    5 |    1 |        0
-   2 |        2 |    6 |    9 |    1 |        1
-   3 |        3 |    9 |   -1 |    0 |        2
-(3 rows)
-
-ROLLBACK;
-ROLLBACK
diff --git a/src/contraction/test/proof_of_concept_1.test.sql b/src/contraction/test/proof_of_concept_1.test.sql
deleted file mode 100644
index 7ac86c3..0000000
--- a/src/contraction/test/proof_of_concept_1.test.sql
+++ /dev/null
@@ -1,68 +0,0 @@
-
-\echo Adding an additional column to store if its part of the contracted graph
-ALTER TABLE edge_table ADD is_contracted BOOLEAN DEFAULT false;
-
-\echo Adding a new edges joining vertices 3 and 5 with cost=2 to the edge table
-INSERT INTO edge_table(source, target, cost, reverse_cost, is_contracted) 
-VALUES (3, 5, 2, 2, true);
-
-\echo Adding a new edges joining vertices 3 and 9 with cost=2 to the edge table
-INSERT INTO edge_table(source, target, cost, reverse_cost, is_contracted) 
-VALUES (3, 9, 2, 2, true);
-
-\echo Adding a new edges joining vertices 5 and 11 with cost=2 to the edge table
-INSERT INTO edge_table(source, target, cost, reverse_cost, is_contracted) 
-VALUES (5, 11, 2, 2, true);
-
-\echo Adding a new edges joining vertices 9 and 11 with cost=2 to the edge table
-INSERT INTO edge_table(source, target, cost, reverse_cost, is_contracted) 
-VALUES (9, 11, 2, 2, true);
-
---\echo --q1
---SELECT id, source, target, cost, reverse_cost, is_contracted FROM edge_table;
---select id, source, target, cost, reverse_cost  from edge_table where source in (3,5,6,9,11,15,17) and target in (3,5,6,9,11,15,17);
-
-
-\echo Case 1: Both source and target belong to the contracted graph.
-\echo We are going to route from 3 to 11
-\echo  Since 3 and 11 both are in the contracted graph we need not add any vertices. 
-SELECT * FROM 
-pgr_dijkstra('SELECT id, source, target, cost, reverse_cost FROM edge_table where source IN (3, 5, 6, 9, 11, 15, 17) AND target IN (3, 5, 6, 9, 11, 15, 17) AND is_contracted=false',
-3, 11, false);
-
-
-\echo Case 2: source belongs to a contracted graph, while target belongs to a vertex subgraph.
-\echo We are going to route from 3 to 7
-\echo  Since 7 is in the contracted subgraph of vertex 5 we add {7, 8} to the vertex set, so the vertex set becomes (3, 5, 6, 7, 8, 9, 11, 15, 17)
-SELECT * FROM 
-pgr_dijkstra('SELECT id, source, target, cost, reverse_cost FROM edge_table where source IN (3, 5, 6, 9, 11, 15, 17,   7, 8)	 AND target IN (3, 5, 6, 9, 11, 15, 17,   7, 8) AND is_contracted=false',
-3, 7, false);
-
-\echo Case 3: source belongs to a contracted graph, while target belongs to a edge subgraph. 
-\echo We are going to route from 3 to 13
-\echo  Since 13 is in the contracted subgraph of edge (5, 11) we add {10, 13} to the vertex set, so the vertex set becomes (3, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17)
-SELECT * FROM 
-pgr_dijkstra('SELECT id, source, target, cost, reverse_cost FROM edge_table where source IN (3, 5, 6, 9, 11, 15, 17,    10, 13) AND target IN (3, 5, 6, 9, 11, 15, 17,    10, 13) AND is_contracted=false',
-3, 13, false);
-
-\echo Case 4: source belongs to a vertex subgraph, while target belongs to a edge subgraph. 
-\echo We are going to route from 7 to 13
-\echo Since 13 is in the contracted subgraph of edge (5, 11) we add {10, 13} to the vertex set, and since 7 is in the contracted subgraph of vertex 5 we add {7, 8} to the vertex sets (3, 5, 6, 7, 8, 9, 11, 15, 17)
-SELECT * FROM 
-pgr_dijkstra('SELECT id, source, target, cost, reverse_cost FROM edge_table where source IN (3, 5, 6, 9, 11, 15, 17,    7, 8,   10, 13) AND target IN (3, 5, 6, 9, 11, 15, 17,    7, 8,   10, 13) AND is_contracted=false',
-7, 13, false);
-
-\echo Case 5: The path contains a shortcut.
-\echo \echo We are going to route from 3 to 9
-\echo Since 3 and 9 both are in the contracted graph we need not add any vertices. 
-SELECT * FROM 
-pgr_dijkstra('SELECT id, source, target, cost, reverse_cost FROM edge_table where source IN (3, 5, 6, 7, 8, 9, 11, 15, 17) AND target IN (3, 5, 6, 7, 8, 9, 11, 15, 17) AND is_contracted=false',
-3, 9, false);
-
-SELECT id, source, target, cost, reverse_cost, is_contracted FROM edge_table ORDER BY id;
-
-\echo This implies that it is a shortcut and should be expanded
-SELECT * FROM 
-pgr_dijkstra('SELECT id, source, target, cost, reverse_cost FROM edge_table where source IN (3, 5, 6, 7, 8, 9, 11, 15, 17) AND target IN (3, 5, 6, 7, 8, 9, 11, 15, 17) AND is_contracted=false',
-3, 9, false);
-
diff --git a/src/contraction/test/return_types.result b/src/contraction/test/return_types.result
deleted file mode 100644
index 824b201..0000000
--- a/src/contraction/test/return_types.result
+++ /dev/null
@@ -1,121 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
---q1
-/*
-bigint (-9,223,372,036,854,775,808) to (9,223,372,036,854,775,807)
-int	(-2,147,483,648) to (2,147,483,647)
-*/
-/*
-Testing for ids > 10^8
-*/
-UPDATE edge_table
-SET id = id + POWER(10, 8),
-	source = source + POWER(10, 8),
-	target = target + POWER(10, 8);
-UPDATE 18
---q2
-UPDATE edge_table_vertices_pgr
-SET id = id + POWER(10, 8);
-UPDATE 17
---q3
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type |    id     |  contracted_vertices  | source | target | cost 
------+------+-----------+-----------------------+--------+--------+------
-   1 | v    | 100000002 | {100000001}           |     -1 |     -1 |   -1
-   2 | v    | 100000005 | {100000007,100000008} |     -1 |     -1 |   -1
-   3 | v    | 100000010 | {100000013}           |     -1 |     -1 |   -1
-   4 | v    | 100000015 | {100000014}           |     -1 |     -1 |   -1
-   5 | v    | 100000017 | {100000016}           |     -1 |     -1 |   -1
-(5 rows)
-
---q4
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type | id | contracted_vertices |  source   |  target   | cost 
------+------+----+---------------------+-----------+-----------+------
-   1 | e    | -1 | {100000004}         | 100000009 | 100000003 |    2
-   2 | e    | -2 | {100000008}         | 100000005 | 100000007 |    2
-   3 | e    | -3 | {100000008}         | 100000007 | 100000005 |    2
-   4 | e    | -4 | {100000012}         | 100000011 | 100000009 |    2
-(4 rows)
-
---q5
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[1, 2]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type |    id     |  contracted_vertices  |  source   |  target   | cost 
------+------+-----------+-----------------------+-----------+-----------+------
-   1 | v    | 100000005 | {100000007,100000008} |        -1 |        -1 |   -1
-   2 | v    | 100000015 | {100000014}           |        -1 |        -1 |   -1
-   3 | v    | 100000017 | {100000016}           |        -1 |        -1 |   -1
-   4 | e    |        -1 | {100000001,100000002} | 100000003 | 100000005 |    2
-   5 | e    |        -2 | {100000004}           | 100000009 | 100000003 |    2
-   6 | e    |        -3 | {100000010,100000013} | 100000005 | 100000011 |    2
-   7 | e    |        -4 | {100000012}           | 100000011 | 100000009 |    2
-(7 rows)
-
-ROLLBACK;
-ROLLBACK
-/*
-Testing for ids > 10^12
-*/
-BEGIN;
-BEGIN
---q6
-UPDATE edge_table
-SET id = id + POWER(10, 12),
-	source = source + POWER(10, 12),
-	target = target + POWER(10, 12);
-UPDATE 18
---q7
-UPDATE edge_table_vertices_pgr
-SET id = id + POWER(10, 12);
-UPDATE 17
---q8
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type |      id       |      contracted_vertices      | source | target | cost 
------+------+---------------+-------------------------------+--------+--------+------
-   1 | v    | 1000000000002 | {1000000000001}               |     -1 |     -1 |   -1
-   2 | v    | 1000000000005 | {1000000000007,1000000000008} |     -1 |     -1 |   -1
-   3 | v    | 1000000000010 | {1000000000013}               |     -1 |     -1 |   -1
-   4 | v    | 1000000000015 | {1000000000014}               |     -1 |     -1 |   -1
-   5 | v    | 1000000000017 | {1000000000016}               |     -1 |     -1 |   -1
-(5 rows)
-
---q9
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type | id | contracted_vertices |    source     |    target     | cost 
------+------+----+---------------------+---------------+---------------+------
-   1 | e    | -1 | {1000000000004}     | 1000000000009 | 1000000000003 |    2
-   2 | e    | -2 | {1000000000008}     | 1000000000005 | 1000000000007 |    2
-   3 | e    | -3 | {1000000000008}     | 1000000000007 | 1000000000005 |    2
-   4 | e    | -4 | {1000000000012}     | 1000000000011 | 1000000000009 |    2
-(4 rows)
-
---q10
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[1, 2]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type |      id       |      contracted_vertices      |    source     |    target     | cost 
------+------+---------------+-------------------------------+---------------+---------------+------
-   1 | v    | 1000000000005 | {1000000000007,1000000000008} |            -1 |            -1 |   -1
-   2 | v    | 1000000000015 | {1000000000014}               |            -1 |            -1 |   -1
-   3 | v    | 1000000000017 | {1000000000016}               |            -1 |            -1 |   -1
-   4 | e    |            -1 | {1000000000001,1000000000002} | 1000000000003 | 1000000000005 |    2
-   5 | e    |            -2 | {1000000000004}               | 1000000000009 | 1000000000003 |    2
-   6 | e    |            -3 | {1000000000010,1000000000013} | 1000000000005 | 1000000000011 |    2
-   7 | e    |            -4 | {1000000000012}               | 1000000000011 | 1000000000009 |    2
-(7 rows)
-
---q11
-ROLLBACK;
-ROLLBACK
diff --git a/src/contraction/test/sampleData.result b/src/contraction/test/sampleData.result
deleted file mode 100644
index 00be4ca..0000000
--- a/src/contraction/test/sampleData.result
+++ /dev/null
@@ -1,19 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
---q0 Checking dead end contraction for workshop data
-SELECT * FROM pgr_contractGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
- seq | type | id | contracted_vertices | source | target | cost 
------+------+----+---------------------+--------+--------+------
-   1 | v    |  2 | {1}                 |     -1 |     -1 |   -1
-   2 | v    |  5 | {7,8}               |     -1 |     -1 |   -1
-   3 | v    | 10 | {13}                |     -1 |     -1 |   -1
-   4 | v    | 15 | {14}                |     -1 |     -1 |   -1
-   5 | v    | 17 | {16}                |     -1 |     -1 |   -1
-(5 rows)
-
-ROLLBACK;
-ROLLBACK
diff --git a/src/costMatrix/test/doc-pgr_fooDmatrix-windows.result b/src/costMatrix/test/doc-pgr_fooDmatrix-windows.result
deleted file mode 100644
index d760348..0000000
--- a/src/costMatrix/test/doc-pgr_fooDmatrix-windows.result
+++ /dev/null
@@ -1,324 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- dijkstra q1
-SELECT * FROM pgr_dijkstraCostMatrix(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5)
-);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         1 |       2 |        1
-         1 |       3 |        6
-         1 |       4 |        5
-         2 |       1 |        1
-         2 |       3 |        5
-         2 |       4 |        4
-         3 |       1 |        2
-         3 |       2 |        1
-         3 |       4 |        3
-         4 |       1 |        3
-         4 |       2 |        2
-         4 |       3 |        1
-(12 rows)
-
--- dijkstra q2
-SELECT * FROM pgr_dijkstraCostMatrix(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
-    false
-);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         1 |       2 |        1
-         1 |       3 |        2
-         1 |       4 |        3
-         2 |       1 |        1
-         2 |       3 |        1
-         2 |       4 |        2
-         3 |       1 |        2
-         3 |       2 |        1
-         3 |       4 |        1
-         4 |       1 |        3
-         4 |       2 |        2
-         4 |       3 |        1
-(12 rows)
-
--- dijkstra q3
-SELECT * FROM pgr_TSP(
-    $$
-    SELECT * FROM pgr_dijkstraCostMatrix(
-        'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-        (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
-        false
-    )
-    $$,
-    randomize := false
-);
- seq | node | cost | agg_cost 
------+------+------+----------
-   1 |    1 |    1 |        0
-   2 |    2 |    1 |        1
-   3 |    3 |    1 |        2
-   4 |    4 |    3 |        3
-   5 |    1 |    0 |        6
-(5 rows)
-
--- dijkstra q4
--- withPoints q1
-SELECT * FROM pgr_withPointsCostMatrix(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-    'SELECT pid, edge_id, fraction from pointsOfInterest',
-    array[-1, 3, 6, -6]);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-        -6 |      -1 |      1.3
-        -6 |       3 |      4.3
-        -6 |       6 |      1.3
-        -1 |      -6 |      1.3
-        -1 |       3 |      5.6
-        -1 |       6 |      2.6
-         3 |      -6 |      1.7
-         3 |      -1 |      1.6
-         3 |       6 |        1
-         6 |      -6 |      1.3
-         6 |      -1 |      2.6
-         6 |       3 |        3
-(12 rows)
-
--- withPoints q2
-SELECT * FROM pgr_withPointsCostMatrix(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-    'SELECT pid, edge_id, fraction from pointsOfInterest',
-    array[-1, 3, 6, -6], directed := false);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-        -6 |      -1 |      1.3
-        -6 |       3 |      1.7
-        -6 |       6 |      1.3
-        -1 |      -6 |      1.3
-        -1 |       3 |      1.6
-        -1 |       6 |      2.6
-         3 |      -6 |      1.7
-         3 |      -1 |      1.6
-         3 |       6 |        1
-         6 |      -6 |      1.3
-         6 |      -1 |      2.6
-         6 |       3 |        1
-(12 rows)
-
--- withPoints q3
-SELECT * FROM pgr_TSP(
-    $$
-    SELECT * FROM pgr_withPointsCostMatrix(
-        'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-        'SELECT pid, edge_id, fraction from pointsOfInterest',
-        array[-1, 3, 6, -6], directed := false);
-    $$,
-    randomize := false
-);
- seq | node | cost | agg_cost 
------+------+------+----------
-   1 |   -6 |  1.3 |        0
-   2 |    6 |    1 |      1.3
-   3 |    3 |  1.6 |      2.3
-   4 |   -1 |  1.3 |      3.9
-   5 |   -6 |    0 |      5.2
-(5 rows)
-
--- withPoints q4
--- astar q1
-SELECT * FROM pgr_aStarCostMatrix(
-    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
-    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5)
-);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         2 |       1 |        1
-         3 |       1 |        2
-         4 |       1 |        3
-         1 |       2 |        1
-         3 |       2 |        1
-         4 |       2 |        2
-         1 |       3 |        6
-         2 |       3 |        5
-         4 |       3 |        1
-         1 |       4 |        5
-         2 |       4 |        4
-         3 |       4 |        3
-(12 rows)
-
--- astar q2
-SELECT * FROM pgr_aStarCostMatrix(
-    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
-    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
-    directed := false, heuristic := 2
-);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         2 |       1 |        1
-         3 |       1 |        2
-         4 |       1 |        3
-         1 |       2 |        1
-         3 |       2 |        1
-         4 |       2 |        2
-         1 |       3 |        2
-         2 |       3 |        1
-         4 |       3 |        1
-         1 |       4 |        3
-         2 |       4 |        2
-         3 |       4 |        1
-(12 rows)
-
--- astar q3
-SELECT * FROM pgr_TSP(
-    $$
-    SELECT * FROM pgr_aStarCostMatrix(
-        'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
-        (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
-        directed:= false, heuristic := 2
-    )
-    $$,
-    randomize := false
-);
- seq | node | cost | agg_cost 
------+------+------+----------
-   1 |    1 |    1 |        0
-   2 |    2 |    1 |        1
-   3 |    3 |    1 |        2
-   4 |    4 |    3 |        3
-   5 |    1 |    0 |        6
-(5 rows)
-
--- astar q4
--- bdDijkstra q1
-SELECT * FROM pgr_bdDijkstraCostMatrix(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5)
-);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         1 |       2 |        1
-         1 |       3 |        6
-         1 |       4 |        5
-         2 |       1 |        1
-         2 |       3 |        5
-         2 |       4 |        4
-         3 |       1 |        2
-         3 |       2 |        1
-         3 |       4 |        3
-         4 |       1 |        3
-         4 |       2 |        2
-         4 |       3 |        1
-(12 rows)
-
--- bdDijkstra q2
-SELECT * FROM pgr_bdDijkstraCostMatrix(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
-    false
-);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         1 |       2 |        1
-         1 |       3 |        2
-         1 |       4 |        3
-         2 |       1 |        1
-         2 |       3 |        1
-         2 |       4 |        2
-         3 |       1 |        2
-         3 |       2 |        1
-         3 |       4 |        1
-         4 |       1 |        3
-         4 |       2 |        2
-         4 |       3 |        1
-(12 rows)
-
--- bdDijkstra q3
-SELECT * FROM pgr_TSP(
-    $$
-    SELECT * FROM pgr_bdDijkstraCostMatrix(
-        'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-        (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
-        false
-    )
-    $$,
-    randomize := false
-);
- seq | node | cost | agg_cost 
------+------+------+----------
-   1 |    1 |    1 |        0
-   2 |    2 |    1 |        1
-   3 |    3 |    1 |        2
-   4 |    4 |    3 |        3
-   5 |    1 |    0 |        6
-(5 rows)
-
--- bdDijkstra q4
--- bdAstar q1
-SELECT * FROM pgr_bdAstarCostMatrix(
-    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
-    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5)
-);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         1 |       2 |        1
-         1 |       3 |        6
-         1 |       4 |        5
-         2 |       1 |        1
-         2 |       3 |        5
-         2 |       4 |        4
-         3 |       1 |        2
-         3 |       2 |        1
-         3 |       4 |        3
-         4 |       1 |        3
-         4 |       2 |        2
-         4 |       3 |        1
-(12 rows)
-
--- bdAstar q2
-SELECT * FROM pgr_bdAstarCostMatrix(
-    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
-    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
-    false
-);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         1 |       2 |        1
-         1 |       3 |        2
-         1 |       4 |        3
-         2 |       1 |        1
-         2 |       3 |        1
-         2 |       4 |        2
-         3 |       1 |        2
-         3 |       2 |        1
-         3 |       4 |        1
-         4 |       1 |        3
-         4 |       2 |        2
-         4 |       3 |        1
-(12 rows)
-
--- bdAstar q3
-SELECT * FROM pgr_TSP(
-    $$
-    SELECT * FROM pgr_bdAstarCostMatrix(
-        'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
-        (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
-        false
-    )
-    $$,
-    randomize := false
-);
- seq | node | cost | agg_cost 
------+------+------+----------
-   1 |    1 |    1 |        0
-   2 |    2 |    1 |        1
-   3 |    3 |    1 |        2
-   4 |    4 |    3 |        3
-   5 |    1 |    0 |        6
-(5 rows)
-
--- bdAstar q4
-ROLLBACK;
-ROLLBACK
diff --git a/src/costMatrix/test/doc-pgr_fooDmatrix.result b/src/costMatrix/test/doc-pgr_fooDmatrix.result
deleted file mode 100644
index 7c96952..0000000
--- a/src/costMatrix/test/doc-pgr_fooDmatrix.result
+++ /dev/null
@@ -1,324 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- dijkstra q1
-SELECT * FROM pgr_dijkstraCostMatrix(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5)
-);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         1 |       2 |        1
-         1 |       3 |        6
-         1 |       4 |        5
-         2 |       1 |        1
-         2 |       3 |        5
-         2 |       4 |        4
-         3 |       1 |        2
-         3 |       2 |        1
-         3 |       4 |        3
-         4 |       1 |        3
-         4 |       2 |        2
-         4 |       3 |        1
-(12 rows)
-
--- dijkstra q2
-SELECT * FROM pgr_dijkstraCostMatrix(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
-    false
-);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         1 |       2 |        1
-         1 |       3 |        2
-         1 |       4 |        3
-         2 |       1 |        1
-         2 |       3 |        1
-         2 |       4 |        2
-         3 |       1 |        2
-         3 |       2 |        1
-         3 |       4 |        1
-         4 |       1 |        3
-         4 |       2 |        2
-         4 |       3 |        1
-(12 rows)
-
--- dijkstra q3
-SELECT * FROM pgr_TSP(
-    $$
-    SELECT * FROM pgr_dijkstraCostMatrix(
-        'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-        (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
-        false
-    )
-    $$,
-    randomize := false
-);
- seq | node | cost | agg_cost 
------+------+------+----------
-   1 |    1 |    1 |        0
-   2 |    2 |    1 |        1
-   3 |    3 |    1 |        2
-   4 |    4 |    3 |        3
-   5 |    1 |    0 |        6
-(5 rows)
-
--- dijkstra q4
--- withPoints q1
-SELECT * FROM pgr_withPointsCostMatrix(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-    'SELECT pid, edge_id, fraction from pointsOfInterest',
-    array[-1, 3, 6, -6]);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-        -6 |      -1 |      1.3
-        -6 |       3 |      4.3
-        -6 |       6 |      1.3
-        -1 |      -6 |      1.3
-        -1 |       3 |      5.6
-        -1 |       6 |      2.6
-         3 |      -6 |      1.7
-         3 |      -1 |      1.6
-         3 |       6 |        1
-         6 |      -6 |      1.3
-         6 |      -1 |      2.6
-         6 |       3 |        3
-(12 rows)
-
--- withPoints q2
-SELECT * FROM pgr_withPointsCostMatrix(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-    'SELECT pid, edge_id, fraction from pointsOfInterest',
-    array[-1, 3, 6, -6], directed := false);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-        -6 |      -1 |      1.3
-        -6 |       3 |      1.7
-        -6 |       6 |      1.3
-        -1 |      -6 |      1.3
-        -1 |       3 |      1.6
-        -1 |       6 |      2.6
-         3 |      -6 |      1.7
-         3 |      -1 |      1.6
-         3 |       6 |        1
-         6 |      -6 |      1.3
-         6 |      -1 |      2.6
-         6 |       3 |        1
-(12 rows)
-
--- withPoints q3
-SELECT * FROM pgr_TSP(
-    $$
-    SELECT * FROM pgr_withPointsCostMatrix(
-        'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-        'SELECT pid, edge_id, fraction from pointsOfInterest',
-        array[-1, 3, 6, -6], directed := false);
-    $$,
-    randomize := false
-);
- seq | node | cost | agg_cost 
------+------+------+----------
-   1 |   -6 |  1.3 |        0
-   2 |   -1 |  1.6 |      1.3
-   3 |    3 |    1 |      2.9
-   4 |    6 |  1.3 |      3.9
-   5 |   -6 |    0 |      5.2
-(5 rows)
-
--- withPoints q4
--- astar q1
-SELECT * FROM pgr_aStarCostMatrix(
-    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
-    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5)
-);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         2 |       1 |        1
-         3 |       1 |        2
-         4 |       1 |        3
-         1 |       2 |        1
-         3 |       2 |        1
-         4 |       2 |        2
-         1 |       3 |        6
-         2 |       3 |        5
-         4 |       3 |        1
-         1 |       4 |        5
-         2 |       4 |        4
-         3 |       4 |        3
-(12 rows)
-
--- astar q2
-SELECT * FROM pgr_aStarCostMatrix(
-    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
-    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
-    directed := false, heuristic := 2
-);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         2 |       1 |        1
-         3 |       1 |        2
-         4 |       1 |        3
-         1 |       2 |        1
-         3 |       2 |        1
-         4 |       2 |        2
-         1 |       3 |        2
-         2 |       3 |        1
-         4 |       3 |        1
-         1 |       4 |        3
-         2 |       4 |        2
-         3 |       4 |        1
-(12 rows)
-
--- astar q3
-SELECT * FROM pgr_TSP(
-    $$
-    SELECT * FROM pgr_aStarCostMatrix(
-        'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
-        (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
-        directed:= false, heuristic := 2
-    )
-    $$,
-    randomize := false
-);
- seq | node | cost | agg_cost 
------+------+------+----------
-   1 |    1 |    1 |        0
-   2 |    2 |    1 |        1
-   3 |    3 |    1 |        2
-   4 |    4 |    3 |        3
-   5 |    1 |    0 |        6
-(5 rows)
-
--- astar q4
--- bdDijkstra q1
-SELECT * FROM pgr_bdDijkstraCostMatrix(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5)
-);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         1 |       2 |        1
-         1 |       3 |        6
-         1 |       4 |        5
-         2 |       1 |        1
-         2 |       3 |        5
-         2 |       4 |        4
-         3 |       1 |        2
-         3 |       2 |        1
-         3 |       4 |        3
-         4 |       1 |        3
-         4 |       2 |        2
-         4 |       3 |        1
-(12 rows)
-
--- bdDijkstra q2
-SELECT * FROM pgr_bdDijkstraCostMatrix(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
-    false
-);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         1 |       2 |        1
-         1 |       3 |        2
-         1 |       4 |        3
-         2 |       1 |        1
-         2 |       3 |        1
-         2 |       4 |        2
-         3 |       1 |        2
-         3 |       2 |        1
-         3 |       4 |        1
-         4 |       1 |        3
-         4 |       2 |        2
-         4 |       3 |        1
-(12 rows)
-
--- bdDijkstra q3
-SELECT * FROM pgr_TSP(
-    $$
-    SELECT * FROM pgr_bdDijkstraCostMatrix(
-        'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-        (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
-        false
-    )
-    $$,
-    randomize := false
-);
- seq | node | cost | agg_cost 
------+------+------+----------
-   1 |    1 |    1 |        0
-   2 |    2 |    1 |        1
-   3 |    3 |    1 |        2
-   4 |    4 |    3 |        3
-   5 |    1 |    0 |        6
-(5 rows)
-
--- bdDijkstra q4
--- bdAstar q1
-SELECT * FROM pgr_bdAstarCostMatrix(
-    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
-    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5)
-);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         1 |       2 |        1
-         1 |       3 |        6
-         1 |       4 |        5
-         2 |       1 |        1
-         2 |       3 |        5
-         2 |       4 |        4
-         3 |       1 |        2
-         3 |       2 |        1
-         3 |       4 |        3
-         4 |       1 |        3
-         4 |       2 |        2
-         4 |       3 |        1
-(12 rows)
-
--- bdAstar q2
-SELECT * FROM pgr_bdAstarCostMatrix(
-    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
-    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
-    false
-);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         1 |       2 |        1
-         1 |       3 |        2
-         1 |       4 |        3
-         2 |       1 |        1
-         2 |       3 |        1
-         2 |       4 |        2
-         3 |       1 |        2
-         3 |       2 |        1
-         3 |       4 |        1
-         4 |       1 |        3
-         4 |       2 |        2
-         4 |       3 |        1
-(12 rows)
-
--- bdAstar q3
-SELECT * FROM pgr_TSP(
-    $$
-    SELECT * FROM pgr_bdAstarCostMatrix(
-        'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
-        (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
-        false
-    )
-    $$,
-    randomize := false
-);
- seq | node | cost | agg_cost 
------+------+------+----------
-   1 |    1 |    1 |        0
-   2 |    2 |    1 |        1
-   3 |    3 |    1 |        2
-   4 |    4 |    3 |        3
-   5 |    1 |    0 |        6
-(5 rows)
-
--- bdAstar q4
-ROLLBACK;
-ROLLBACK
diff --git a/src/dijkstra/src/CMakeLists.txt b/src/dijkstra/CMakeLists.txt
similarity index 100%
rename from src/dijkstra/src/CMakeLists.txt
rename to src/dijkstra/CMakeLists.txt
diff --git a/src/dijkstra/demo/boost_demo.sql b/src/dijkstra/demo/boost_demo.sql
deleted file mode 100644
index c3f2321..0000000
--- a/src/dijkstra/demo/boost_demo.sql
+++ /dev/null
@@ -1,80 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-/*
-DEMO from:
- http://www.boost.org/doc/libs/1_59_0/libs/graph/example/dijkstra-example.cpp
- const int num_nodes = 5;
-  enum nodes { A, B, C, D, E }; = 1
-  char name[] = "ABCDE";
-  Edge edge_array[] = { Edge(A, C), Edge(B, B), Edge(B, D), Edge(B, E),
-    Edge(C, B), Edge(C, D), Edge(D, E), Edge(E, A), Edge(E, B)
-  };
-  int weights[] = { 1, 2, 1, 2, 7, 3, 1, 1, 1 };
-*/
-
-DROP TABLE IF EXISTS table1;
-CREATE TABLE table1 (
-    id SERIAL,
-    source INTEGER,
-    target INTEGER,
-    source_name TEXT,
-    target_name TEXT,
-    cost FLOAT
-);
-DROP TABLE IF EXISTS table1_vertices;
-CREATE TABLE table1_vertices (
-    vid SERIAL,
-    name TEXT
-);
-
-INSERT INTO table1_vertices (name) VALUES ('A');
-INSERT INTO table1_vertices (name) VALUES ('B');
-INSERT INTO table1_vertices (name) VALUES ('C');
-INSERT INTO table1_vertices (name) VALUES ('D');
-INSERT INTO table1_vertices (name) VALUES ('E');
-
-INSERT INTO table1 (source_name, target_name, cost) VALUES ('A', 'C', 1);
-INSERT INTO table1 (source_name, target_name, cost) VALUES ('B', 'B', 2);
-INSERT INTO table1 (source_name, target_name, cost) VALUES ('B', 'D', 1);
-INSERT INTO table1 (source_name, target_name, cost) VALUES ('B', 'E', 2);
-INSERT INTO table1 (source_name, target_name, cost) VALUES ('C', 'B', 7);
-INSERT INTO table1 (source_name, target_name, cost) VALUES ('C', 'D', 3);
-INSERT INTO table1 (source_name, target_name, cost) VALUES ('D', 'E', 1);
-INSERT INTO table1 (source_name, target_name, cost) VALUES ('E', 'A', 1);
-INSERT INTO table1 (source_name, target_name, cost) VALUES ('E', 'B', 1);
-
-UPDATE table1 
-  SET source = table1_vertices.vid
-FROM table1_vertices
-WHERE source_name = name;
-
-UPDATE table1 SET target = table1_vertices.vid
-FROM table1_vertices
-WHERE target_name = name;
-
--- Their output starts with 0 so we subtract 1 to the vid
--- pgrouting: no paths or 0 length (aka I am there, so no path) are not included
-SELECT end_vid-1, agg_cost FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM table1',
-    1, ARRAY[1, 2, 3, 4, 5], true) where edge < 0 order by end_vid;
-
diff --git a/src/dijkstra/demo/hanoslav_demo.sql b/src/dijkstra/demo/hanoslav_demo.sql
deleted file mode 100644
index 34b332a..0000000
--- a/src/dijkstra/demo/hanoslav_demo.sql
+++ /dev/null
@@ -1,97 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-/*
-DEMO from:
-http://hansolav.net/sql/graphs.html
-*/
-
-SET client_min_messages TO WARNING;
-
-DROP TABLE IF EXISTS table1_vertices;
-CREATE TABLE table1_vertices (
-    vid SERIAL PRIMARY KEY,
-    name TEXT
-);
-
-DROP TABLE IF EXISTS table1;
-CREATE TABLE table1 (
-    id SERIAL,
-    source INTEGER REFERENCES table1_vertices(vid),
-    target INTEGER REFERENCES table1_vertices(vid),
-    cost FLOAT
-);
-
-INSERT INTO table1_vertices (name) VALUES ('Seatle');
-INSERT INTO table1_vertices (name) VALUES ('San Francisco');
-INSERT INTO table1_vertices (name) VALUES ('Las Vegas');
-INSERT INTO table1_vertices (name) VALUES ('Los Angeles');
-INSERT INTO table1_vertices (name) VALUES ('Denver');
-INSERT INTO table1_vertices (name) VALUES ('Minneapolis');
-INSERT INTO table1_vertices (name) VALUES ('Dallas');
-INSERT INTO table1_vertices (name) VALUES ('Chicago');
-INSERT INTO table1_vertices (name) VALUES ('Washington D.C.');
-INSERT INTO table1_vertices (name) VALUES ('Boston');
-INSERT INTO table1_vertices (name) VALUES ('Nueva York');
-INSERT INTO table1_vertices (name) VALUES ('Miami');
-
-INSERT INTO table1 (source, target, cost) VALUES ( 1,  2, 1306);
-INSERT INTO table1 (source, target, cost) VALUES ( 1,  5, 2161);
-INSERT INTO table1 (source, target, cost) VALUES ( 1,  6, 2661);
-INSERT INTO table1 (source, target, cost) VALUES ( 2,  3,  919);
-INSERT INTO table1 (source, target, cost) VALUES ( 2,  4,  629);
-INSERT INTO table1 (source, target, cost) VALUES ( 3,  4,  435);
-INSERT INTO table1 (source, target, cost) VALUES ( 3,  5, 1225);
-INSERT INTO table1 (source, target, cost) VALUES ( 3,  7, 1983);
-INSERT INTO table1 (source, target, cost) VALUES ( 5,  6, 1483);
-INSERT INTO table1 (source, target, cost) VALUES ( 5,  7, 1258);
-INSERT INTO table1 (source, target, cost) VALUES ( 6,  7, 1532);
-INSERT INTO table1 (source, target, cost) VALUES ( 6,  8,  661);
-INSERT INTO table1 (source, target, cost) VALUES ( 7,  9, 2113);
-INSERT INTO table1 (source, target, cost) VALUES ( 7, 12, 2161);
-INSERT INTO table1 (source, target, cost) VALUES ( 8,  9, 1145);
-INSERT INTO table1 (source, target, cost) VALUES ( 8, 10, 1613);
-INSERT INTO table1 (source, target, cost) VALUES ( 9, 10,  725);
-INSERT INTO table1 (source, target, cost) VALUES ( 9, 11,  383);
-INSERT INTO table1 (source, target, cost) VALUES ( 9, 12, 1709);
-INSERT INTO table1 (source, target, cost) VALUES (10, 11,  338);
-INSERT INTO table1 (source, target, cost) VALUES (11, 12, 2145);
-
-SET client_min_messages TO NOTICE;
-
--- Their output starts with 0 so we subtract 1 to the vid
--- pgrouting: no paths or 0 length (aka I am there, so no path) are not included
-SELECT  name, cost, agg_cost  FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM table1',
-    1,  6, true)
-    JOIN table1_vertices ON (node = vid) ORDER BY seq;
-
-SELECT  name, cost, agg_cost  FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM table1',
-    1,  11, true)
-    JOIN table1_vertices ON (node = vid) ORDER BY seq;
-
-select end_vid, array_to_string( array_agg(name ORDER BY seq),','), array_agg(node ORDER BY seq) 
-FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM table1',
-    1,  ARRAY[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], true)
-JOIN table1_vertices ON (node = vid) GROUP BY end_vid; 
diff --git a/src/dijkstra/demo/wiki_demo.sql b/src/dijkstra/demo/wiki_demo.sql
deleted file mode 100644
index 0010e82..0000000
--- a/src/dijkstra/demo/wiki_demo.sql
+++ /dev/null
@@ -1,49 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-/*
-DEMO from:
-https://en.wikipedia.org/wiki/Dijkstra's_algorithm
-*/
-
-DROP TABLE IF EXISTS table1;
-CREATE TABLE table1 (
-    id SERIAL,
-    source INTEGER,
-    target INTEGER,
-    cost FLOAT
-);
-
-INSERT INTO table1 (source, target, cost) VALUES (1, 2, 7);
-INSERT INTO table1 (source, target, cost) VALUES (1, 3, 9);
-INSERT INTO table1 (source, target, cost) VALUES (1, 6, 14);
-INSERT INTO table1 (source, target, cost) VALUES (2, 3, 10);
-INSERT INTO table1 (source, target, cost) VALUES (2, 4, 15);
-INSERT INTO table1 (source, target, cost) VALUES (3, 6, 2);
-INSERT INTO table1 (source, target, cost) VALUES (3, 4, 11);
-INSERT INTO table1 (source, target, cost) VALUES (4, 5, 6);
-INSERT INTO table1 (source, target, cost) VALUES (5, 6, 9);
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM table1',
-    1, 5, false);
-
diff --git a/src/dijkstra/src/dijkstra.c b/src/dijkstra/dijkstra.c
similarity index 100%
rename from src/dijkstra/src/dijkstra.c
rename to src/dijkstra/dijkstra.c
diff --git a/src/dijkstra/src/dijkstraVia.c b/src/dijkstra/dijkstraVia.c
similarity index 100%
rename from src/dijkstra/src/dijkstraVia.c
rename to src/dijkstra/dijkstraVia.c
diff --git a/src/dijkstra/dijkstraVia_driver.cpp b/src/dijkstra/dijkstraVia_driver.cpp
new file mode 100644
index 0000000..ccd8ce0
--- /dev/null
+++ b/src/dijkstra/dijkstraVia_driver.cpp
@@ -0,0 +1,185 @@
+/*PGR-GNU*****************************************************************
+File: dijkstraViaVertex_driver.cpp
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+
+Function's developer: 
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "drivers/dijkstra/dijkstraVia_driver.h"
+
+#include <sstream>
+#include <deque>
+#include <vector>
+
+#include "dijkstra/pgr_dijkstraVia.hpp"
+
+#include "cpp_common/pgr_alloc.hpp"
+#include "cpp_common/pgr_assert.h"
+
+
+static
+void
+get_path(
+        int route_id,
+        int path_id,
+        const Path &path,
+        Routes_t **postgres_data,
+        double &route_cost,
+        size_t &sequence) {
+    int i = 0;
+    for (const auto e : path) {
+        (*postgres_data)[sequence] = {
+            route_id,
+            path_id,
+            i,
+            path.start_id(),
+            path.end_id(),
+            e.node,
+            e.edge,
+            e.cost,
+            e.agg_cost,
+            route_cost};
+        route_cost += path[i].cost;
+        ++i;
+        ++sequence;
+    }
+}
+
+
+static
+size_t
+get_route(
+        Routes_t **ret_path,
+        const std::deque< Path > &paths) {
+    size_t sequence = 0;
+    int path_id = 1;
+    int route_id = 1;
+    double route_cost = 0;  // routes_agg_cost
+    for (const Path &path : paths) {
+        if (path.size() > 0)
+            get_path(route_id, path_id, path, ret_path, route_cost, sequence);
+        ++path_id;
+    }
+    return sequence;
+}
+
+void
+do_pgr_dijkstraVia(
+        pgr_edge_t* data_edges,    size_t total_edges,
+        int64_t* via_vidsArr,     size_t size_via_vidsArr,
+        bool directed,
+        bool strict,
+        bool U_turn_on_edge,
+        Routes_t** return_tuples,   size_t* return_count,
+
+        char** log_msg,
+        char** notice_msg,
+        char** err_msg) {
+    std::ostringstream log;
+    std::ostringstream err;
+    std::ostringstream notice;
+
+    try {
+        pgassert(total_edges != 0);
+        pgassert(!(*log_msg));
+        pgassert(!(*notice_msg));
+        pgassert(!(*err_msg));
+        pgassert(!(*return_tuples));
+        pgassert(*return_count == 0);
+
+        graphType gType = directed? DIRECTED: UNDIRECTED;
+
+        std::deque< Path >paths;
+        log << "\nInserting vertices into a c++ vector structure";
+        std::vector< int64_t > via_vertices(
+                via_vidsArr, via_vidsArr + size_via_vidsArr);
+
+        if (directed) {
+            log << "\nWorking with directed Graph";
+            pgrouting::DirectedGraph digraph(gType);
+            digraph.insert_edges(data_edges, total_edges);
+            pgRouting::pgr_dijkstraVia(
+                    digraph,
+                    via_vertices,
+                    paths,
+                    strict,
+                    U_turn_on_edge,
+                    log);
+        } else {
+            log << "\nWorking with Undirected Graph";
+            pgrouting::UndirectedGraph undigraph(gType);
+            undigraph.insert_edges(data_edges, total_edges);
+            pgRouting::pgr_dijkstraVia(
+                    undigraph,
+                    via_vertices,
+                    paths,
+                    strict,
+                    U_turn_on_edge,
+                    log);
+        }
+
+        size_t count(count_tuples(paths));
+
+        if (count == 0) {
+            (*return_tuples) = NULL;
+            (*return_count) = 0;
+            notice <<
+                "No paths found";
+            *log_msg = pgr_msg(notice.str().c_str());
+            return;
+        }
+
+        // get the space required to store all the paths
+        (*return_tuples) = pgr_alloc(count, (*return_tuples));
+        log << "\nConverting a set of paths into the tuples";
+        (*return_count) = (get_route(return_tuples, paths));
+        (*return_tuples)[count - 1].edge = -2;
+
+        *log_msg = log.str().empty()?
+            *log_msg :
+            pgr_msg(log.str().c_str());
+        *notice_msg = notice.str().empty()?
+            *notice_msg :
+            pgr_msg(notice.str().c_str());
+    } catch (AssertFailedException &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch (std::exception &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch(...) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << "Caught unknown exception!";
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    }
+}
+
+
diff --git a/src/dijkstra/src/dijkstra_driver.cpp b/src/dijkstra/dijkstra_driver.cpp
similarity index 100%
rename from src/dijkstra/src/dijkstra_driver.cpp
rename to src/dijkstra/dijkstra_driver.cpp
diff --git a/src/dijkstra/src/dijkstraVia_driver.cpp b/src/dijkstra/src/dijkstraVia_driver.cpp
deleted file mode 100644
index 2af7965..0000000
--- a/src/dijkstra/src/dijkstraVia_driver.cpp
+++ /dev/null
@@ -1,263 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: dijkstraViaVertex_driver.cpp
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-
-Function's developer: 
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "drivers/dijkstra/dijkstraVia_driver.h"
-
-#include <sstream>
-#include <deque>
-#include <vector>
-
-#include "dijkstra/pgr_dijkstra.hpp"
-
-#include "cpp_common/pgr_alloc.hpp"
-#include "cpp_common/pgr_assert.h"
-
-
-template <class G>
-void
-pgr_dijkstraViaVertex(
-        G &graph,
-        const std::vector< int64_t > via_vertices,
-        std::deque< Path > &paths,
-        bool strict,
-        bool U_turn_on_edge,
-        std::ostringstream &log) {
-    if (via_vertices.size() == 0) {
-        return;
-    }
-
-    paths.clear();
-    int64_t prev_vertex = via_vertices[0];
-    Path path;
-
-    int64_t i = 0;
-    for (const auto &vertex : via_vertices) {
-        if (i == 0) {
-            prev_vertex = vertex; ++i;
-            continue;
-        }
-
-        // Delete U Turn edges only valid for paths that are not the first path
-        if (!U_turn_on_edge && i > 1) {
-            /*
-             * Can only delete if there was a path,
-             * that is at least one edge size
-             */
-            if (path.size() > 1) {
-                /*
-                 * Delete from the graph the last edge if its outgoing also
-                 * edge to be removed = second to last edge path[i].edge;
-                 */
-                int64_t edge_to_be_removed = path[path.size() - 2].edge;
-                int64_t last_vertex_of_path = prev_vertex;
-
-                // and the current vertex is not a dead end
-                if (graph.out_degree(last_vertex_of_path) > 1) {
-                    log << "\ndeparting from " << last_vertex_of_path
-                        << " deleting edge " << edge_to_be_removed << "\n";
-                    graph.disconnect_out_going_edge(
-                            last_vertex_of_path,
-                            edge_to_be_removed);
-                }
-            }
-        }
-
-        log << "\nfrom " << prev_vertex << " to " << vertex;
-        path = pgr_dijkstra(graph, prev_vertex, vertex);
-
-        if (!U_turn_on_edge && i > 1) {
-            graph.restore_graph();
-            if (path.empty()) {
-                /*
-                 *  no path was found with the deleted edge
-                 *  try with the edge back in the graph
-                 */
-                log << "\nEmpty so again from "
-                    << prev_vertex << " to " << vertex;
-                path = pgr_dijkstra(graph, prev_vertex, vertex);
-            }
-        }
-
-        if (strict && path.empty()) {
-            paths.clear();
-            return;
-        }
-        paths.push_back(path);
-
-        /*
-         * got to the next
-         */
-        prev_vertex = vertex; ++i;
-    }
-}
-
-static
-void
-get_path(
-        int route_id,
-        int path_id,
-        const Path &path,
-        Routes_t **postgres_data,
-        double &route_cost,
-        size_t &sequence) {
-    int i = 0;
-    for (const auto e : path) {
-        (*postgres_data)[sequence] = {
-            route_id,
-            path_id,
-            i,
-            path.start_id(),
-            path.end_id(),
-            e.node,
-            e.edge,
-            e.cost,
-            e.agg_cost,
-            route_cost};
-        route_cost += path[i].cost;
-        ++i;
-        ++sequence;
-    }
-}
-
-
-static
-size_t
-get_route(
-        Routes_t **ret_path,
-        const std::deque< Path > &paths) {
-    size_t sequence = 0;
-    int path_id = 1;
-    int route_id = 1;
-    double route_cost = 0;  // routes_agg_cost
-    for (const Path &path : paths) {
-        if (path.size() > 0)
-            get_path(route_id, path_id, path, ret_path, route_cost, sequence);
-        ++path_id;
-    }
-    return sequence;
-}
-
-void
-do_pgr_dijkstraVia(
-        pgr_edge_t* data_edges,    size_t total_edges,
-        int64_t* via_vidsArr,     size_t size_via_vidsArr,
-        bool directed,
-        bool strict,
-        bool U_turn_on_edge,
-        Routes_t** return_tuples,   size_t* return_count,
-
-        char** log_msg,
-        char** notice_msg,
-        char** err_msg) {
-    std::ostringstream log;
-    std::ostringstream err;
-    std::ostringstream notice;
-
-    try {
-        pgassert(total_edges != 0);
-        pgassert(!(*log_msg));
-        pgassert(!(*notice_msg));
-        pgassert(!(*err_msg));
-        pgassert(!(*return_tuples));
-        pgassert(*return_count == 0);
-
-        graphType gType = directed? DIRECTED: UNDIRECTED;
-
-        std::deque< Path >paths;
-        log << "\nInserting vertices into a c++ vector structure";
-        std::vector< int64_t > via_vertices(
-                via_vidsArr, via_vidsArr + size_via_vidsArr);
-
-        if (directed) {
-            log << "\nWorking with directed Graph";
-            pgrouting::DirectedGraph digraph(gType);
-            digraph.insert_edges(data_edges, total_edges);
-            pgr_dijkstraViaVertex(
-                    digraph,
-                    via_vertices,
-                    paths,
-                    strict,
-                    U_turn_on_edge,
-                    log);
-        } else {
-            log << "\nWorking with Undirected Graph";
-            pgrouting::UndirectedGraph undigraph(gType);
-            undigraph.insert_edges(data_edges, total_edges);
-            pgr_dijkstraViaVertex(
-                    undigraph,
-                    via_vertices,
-                    paths,
-                    strict,
-                    U_turn_on_edge,
-                    log);
-        }
-
-        size_t count(count_tuples(paths));
-
-        if (count == 0) {
-            (*return_tuples) = NULL;
-            (*return_count) = 0;
-            notice <<
-                "No paths found";
-            *log_msg = pgr_msg(notice.str().c_str());
-            return;
-        }
-
-        // get the space required to store all the paths
-        (*return_tuples) = pgr_alloc(count, (*return_tuples));
-        log << "\nConverting a set of paths into the tuples";
-        (*return_count) = (get_route(return_tuples, paths));
-        (*return_tuples)[count - 1].edge = -2;
-
-        *log_msg = log.str().empty()?
-            *log_msg :
-            pgr_msg(log.str().c_str());
-        *notice_msg = notice.str().empty()?
-            *notice_msg :
-            pgr_msg(notice.str().c_str());
-    } catch (AssertFailedException &except) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << except.what();
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    } catch (std::exception &except) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << except.what();
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    } catch(...) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << "Caught unknown exception!";
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    }
-}
-
-
diff --git a/src/dijkstra/test/doc-pgr_dijkstra.result b/src/dijkstra/test/doc-pgr_dijkstra.result
deleted file mode 100644
index 285e4ab..0000000
--- a/src/dijkstra/test/doc-pgr_dijkstra.result
+++ /dev/null
@@ -1,590 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- q1
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, 3
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    2 |    4 |    1 |        0
-   2 |        2 |    5 |    8 |    1 |        1
-   3 |        3 |    6 |    9 |    1 |        2
-   4 |        4 |    9 |   16 |    1 |        3
-   5 |        5 |    4 |    3 |    1 |        4
-   6 |        6 |    3 |   -1 |    0 |        5
-(6 rows)
-
--- q2
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, 3,
-    FALSE
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    2 |    2 |    1 |        0
-   2 |        2 |    3 |   -1 |    0 |        1
-(2 rows)
-
--- q3
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    2, ARRAY[3,5],
-    FALSE
-);
- seq | path_seq | end_vid | node | edge | cost | agg_cost 
------+----------+---------+------+------+------+----------
-   1 |        1 |       3 |    2 |    4 |    1 |        0
-   2 |        2 |       3 |    5 |    8 |    1 |        1
-   3 |        3 |       3 |    6 |    5 |    1 |        2
-   4 |        4 |       3 |    3 |   -1 |    0 |        3
-   5 |        1 |       5 |    2 |    4 |    1 |        0
-   6 |        2 |       5 |    5 |   -1 |    0 |        1
-(6 rows)
-
--- q4
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[2,11], 5
-);
- seq | path_seq | start_vid | node | edge | cost | agg_cost 
------+----------+-----------+------+------+------+----------
-   1 |        1 |         2 |    2 |    4 |    1 |        0
-   2 |        2 |         2 |    5 |   -1 |    0 |        1
-   3 |        1 |        11 |   11 |   13 |    1 |        0
-   4 |        2 |        11 |   12 |   15 |    1 |        1
-   5 |        3 |        11 |    9 |    9 |    1 |        2
-   6 |        4 |        11 |    6 |    8 |    1 |        3
-   7 |        5 |        11 |    5 |   -1 |    0 |        4
-(7 rows)
-
--- q5
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[2,11], ARRAY[3,5],
-    FALSE
-);
- seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost 
------+----------+-----------+---------+------+------+------+----------
-   1 |        1 |         2 |       3 |    2 |    2 |    1 |        0
-   2 |        2 |         2 |       3 |    3 |   -1 |    0 |        1
-   3 |        1 |         2 |       5 |    2 |    4 |    1 |        0
-   4 |        2 |         2 |       5 |    5 |   -1 |    0 |        1
-   5 |        1 |        11 |       3 |   11 |   11 |    1 |        0
-   6 |        2 |        11 |       3 |    6 |    5 |    1 |        1
-   7 |        3 |        11 |       3 |    3 |   -1 |    0 |        2
-   8 |        1 |        11 |       5 |   11 |   11 |    1 |        0
-   9 |        2 |        11 |       5 |    6 |    8 |    1 |        1
-  10 |        3 |        11 |       5 |    5 |   -1 |    0 |        2
-(10 rows)
-
--- q6
--- q7
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, 3
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    2 |    4 |    1 |        0
-   2 |        2 |    5 |    8 |    1 |        1
-   3 |        3 |    6 |    9 |    1 |        2
-   4 |        4 |    9 |   16 |    1 |        3
-   5 |        5 |    4 |    3 |    1 |        4
-   6 |        6 |    3 |   -1 |    0 |        5
-(6 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, 5
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    2 |    4 |    1 |        0
-   2 |        2 |    5 |   -1 |    0 |        1
-(2 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, ARRAY[3,5]
-);
- seq | path_seq | end_vid | node | edge | cost | agg_cost 
------+----------+---------+------+------+------+----------
-   1 |        1 |       3 |    2 |    4 |    1 |        0
-   2 |        2 |       3 |    5 |    8 |    1 |        1
-   3 |        3 |       3 |    6 |    9 |    1 |        2
-   4 |        4 |       3 |    9 |   16 |    1 |        3
-   5 |        5 |       3 |    4 |    3 |    1 |        4
-   6 |        6 |       3 |    3 |   -1 |    0 |        5
-   7 |        1 |       5 |    2 |    4 |    1 |        0
-   8 |        2 |       5 |    5 |   -1 |    0 |        1
-(8 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    11, 3
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |   11 |   13 |    1 |        0
-   2 |        2 |   12 |   15 |    1 |        1
-   3 |        3 |    9 |   16 |    1 |        2
-   4 |        4 |    4 |    3 |    1 |        3
-   5 |        5 |    3 |   -1 |    0 |        4
-(5 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    11, 5
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |   11 |   13 |    1 |        0
-   2 |        2 |   12 |   15 |    1 |        1
-   3 |        3 |    9 |    9 |    1 |        2
-   4 |        4 |    6 |    8 |    1 |        3
-   5 |        5 |    5 |   -1 |    0 |        4
-(5 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[2,11], 5
-);
- seq | path_seq | start_vid | node | edge | cost | agg_cost 
------+----------+-----------+------+------+------+----------
-   1 |        1 |         2 |    2 |    4 |    1 |        0
-   2 |        2 |         2 |    5 |   -1 |    0 |        1
-   3 |        1 |        11 |   11 |   13 |    1 |        0
-   4 |        2 |        11 |   12 |   15 |    1 |        1
-   5 |        3 |        11 |    9 |    9 |    1 |        2
-   6 |        4 |        11 |    6 |    8 |    1 |        3
-   7 |        5 |        11 |    5 |   -1 |    0 |        4
-(7 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[2, 11], ARRAY[3,5]
-);
- seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost 
------+----------+-----------+---------+------+------+------+----------
-   1 |        1 |         2 |       3 |    2 |    4 |    1 |        0
-   2 |        2 |         2 |       3 |    5 |    8 |    1 |        1
-   3 |        3 |         2 |       3 |    6 |    9 |    1 |        2
-   4 |        4 |         2 |       3 |    9 |   16 |    1 |        3
-   5 |        5 |         2 |       3 |    4 |    3 |    1 |        4
-   6 |        6 |         2 |       3 |    3 |   -1 |    0 |        5
-   7 |        1 |         2 |       5 |    2 |    4 |    1 |        0
-   8 |        2 |         2 |       5 |    5 |   -1 |    0 |        1
-   9 |        1 |        11 |       3 |   11 |   13 |    1 |        0
-  10 |        2 |        11 |       3 |   12 |   15 |    1 |        1
-  11 |        3 |        11 |       3 |    9 |   16 |    1 |        2
-  12 |        4 |        11 |       3 |    4 |    3 |    1 |        3
-  13 |        5 |        11 |       3 |    3 |   -1 |    0 |        4
-  14 |        1 |        11 |       5 |   11 |   13 |    1 |        0
-  15 |        2 |        11 |       5 |   12 |   15 |    1 |        1
-  16 |        3 |        11 |       5 |    9 |    9 |    1 |        2
-  17 |        4 |        11 |       5 |    6 |    8 |    1 |        3
-  18 |        5 |        11 |       5 |    5 |   -1 |    0 |        4
-(18 rows)
-
--- q8
--- q9
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, 3,
-    FALSE
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    2 |    2 |    1 |        0
-   2 |        2 |    3 |   -1 |    0 |        1
-(2 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, 5,
-    FALSE
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    2 |    4 |    1 |        0
-   2 |        2 |    5 |   -1 |    0 |        1
-(2 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    11, 3,
-    FALSE
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |   11 |   11 |    1 |        0
-   2 |        2 |    6 |    5 |    1 |        1
-   3 |        3 |    3 |   -1 |    0 |        2
-(3 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    11, 5,
-    FALSE
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |   11 |   11 |    1 |        0
-   2 |        2 |    6 |    8 |    1 |        1
-   3 |        3 |    5 |   -1 |    0 |        2
-(3 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[2,11], 5,
-    FALSE
-);
- seq | path_seq | start_vid | node | edge | cost | agg_cost 
------+----------+-----------+------+------+------+----------
-   1 |        1 |         2 |    2 |    4 |    1 |        0
-   2 |        2 |         2 |    5 |   -1 |    0 |        1
-   3 |        1 |        11 |   11 |   12 |    1 |        0
-   4 |        2 |        11 |   10 |   10 |    1 |        1
-   5 |        3 |        11 |    5 |   -1 |    0 |        2
-(5 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, ARRAY[3,5],
-    FALSE
-);
- seq | path_seq | end_vid | node | edge | cost | agg_cost 
------+----------+---------+------+------+------+----------
-   1 |        1 |       3 |    2 |    2 |    1 |        0
-   2 |        2 |       3 |    3 |   -1 |    0 |        1
-   3 |        1 |       5 |    2 |    4 |    1 |        0
-   4 |        2 |       5 |    5 |   -1 |    0 |        1
-(4 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[2, 11], ARRAY[3,5],
-    FALSE
-);
- seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost 
------+----------+-----------+---------+------+------+------+----------
-   1 |        1 |         2 |       3 |    2 |    2 |    1 |        0
-   2 |        2 |         2 |       3 |    3 |   -1 |    0 |        1
-   3 |        1 |         2 |       5 |    2 |    4 |    1 |        0
-   4 |        2 |         2 |       5 |    5 |   -1 |    0 |        1
-   5 |        1 |        11 |       3 |   11 |   11 |    1 |        0
-   6 |        2 |        11 |       3 |    6 |    5 |    1 |        1
-   7 |        3 |        11 |       3 |    3 |   -1 |    0 |        2
-   8 |        1 |        11 |       5 |   11 |   11 |    1 |        0
-   9 |        2 |        11 |       5 |    6 |    8 |    1 |        1
-  10 |        3 |        11 |       5 |    5 |   -1 |    0 |        2
-(10 rows)
-
--- q10
--- q11
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    2, 3
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-(0 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    2, 5
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    2 |    4 |    1 |        0
-   2 |        2 |    5 |   -1 |    0 |        1
-(2 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    11, 3
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-(0 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    11, 5
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-(0 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    ARRAY[2,11], 5
-);
- seq | path_seq | start_vid | node | edge | cost | agg_cost 
------+----------+-----------+------+------+------+----------
-   1 |        1 |         2 |    2 |    4 |    1 |        0
-   2 |        2 |         2 |    5 |   -1 |    0 |        1
-(2 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    2, ARRAY[3,5]
-);
- seq | path_seq | end_vid | node | edge | cost | agg_cost 
------+----------+---------+------+------+------+----------
-   1 |        1 |       5 |    2 |    4 |    1 |        0
-   2 |        2 |       5 |    5 |   -1 |    0 |        1
-(2 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    ARRAY[2, 11], ARRAY[3,5]
-);
- seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost 
------+----------+-----------+---------+------+------+------+----------
-   1 |        1 |         2 |       5 |    2 |    4 |    1 |        0
-   2 |        2 |         2 |       5 |    5 |   -1 |    0 |        1
-(2 rows)
-
--- q12
--- q13
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    2, 3,
-    FALSE
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    2 |    4 |    1 |        0
-   2 |        2 |    5 |    8 |    1 |        1
-   3 |        3 |    6 |    5 |    1 |        2
-   4 |        4 |    3 |   -1 |    0 |        3
-(4 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    2, 5,
-    FALSE
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    2 |    4 |    1 |        0
-   2 |        2 |    5 |   -1 |    0 |        1
-(2 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    11, 3,
-    FALSE
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |   11 |   11 |    1 |        0
-   2 |        2 |    6 |    5 |    1 |        1
-   3 |        3 |    3 |   -1 |    0 |        2
-(3 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    11, 5,
-    FALSE
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |   11 |   11 |    1 |        0
-   2 |        2 |    6 |    8 |    1 |        1
-   3 |        3 |    5 |   -1 |    0 |        2
-(3 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    ARRAY[2,11], 5,
-    FALSE
-);
- seq | path_seq | start_vid | node | edge | cost | agg_cost 
------+----------+-----------+------+------+------+----------
-   1 |        1 |         2 |    2 |    4 |    1 |        0
-   2 |        2 |         2 |    5 |   -1 |    0 |        1
-   3 |        1 |        11 |   11 |   12 |    1 |        0
-   4 |        2 |        11 |   10 |   10 |    1 |        1
-   5 |        3 |        11 |    5 |   -1 |    0 |        2
-(5 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    2, ARRAY[3,5],
-    FALSE
-);
- seq | path_seq | end_vid | node | edge | cost | agg_cost 
------+----------+---------+------+------+------+----------
-   1 |        1 |       3 |    2 |    4 |    1 |        0
-   2 |        2 |       3 |    5 |    8 |    1 |        1
-   3 |        3 |       3 |    6 |    5 |    1 |        2
-   4 |        4 |       3 |    3 |   -1 |    0 |        3
-   5 |        1 |       5 |    2 |    4 |    1 |        0
-   6 |        2 |       5 |    5 |   -1 |    0 |        1
-(6 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    ARRAY[2, 11], ARRAY[3,5],
-    FALSE
-);
- seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost 
------+----------+-----------+---------+------+------+------+----------
-   1 |        1 |         2 |       3 |    2 |    4 |    1 |        0
-   2 |        2 |         2 |       3 |    5 |    8 |    1 |        1
-   3 |        3 |         2 |       3 |    6 |    5 |    1 |        2
-   4 |        4 |         2 |       3 |    3 |   -1 |    0 |        3
-   5 |        1 |         2 |       5 |    2 |    4 |    1 |        0
-   6 |        2 |         2 |       5 |    5 |   -1 |    0 |        1
-   7 |        1 |        11 |       3 |   11 |   11 |    1 |        0
-   8 |        2 |        11 |       3 |    6 |    5 |    1 |        1
-   9 |        3 |        11 |       3 |    3 |   -1 |    0 |        2
-  10 |        1 |        11 |       5 |   11 |   11 |    1 |        0
-  11 |        2 |        11 |       5 |    6 |    8 |    1 |        1
-  12 |        3 |        11 |       5 |    5 |   -1 |    0 |        2
-(12 rows)
-
--- q14
--- q15
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, 3,
-    TRUE     
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    2 |    4 |    1 |        0
-   2 |        2 |    5 |    8 |    1 |        1
-   3 |        3 |    6 |    9 |    1 |        2
-   4 |        4 |    9 |   16 |    1 |        3
-   5 |        5 |    4 |    3 |    1 |        4
-   6 |        6 |    3 |   -1 |    0 |        5
-(6 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2,3 
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    2 |    4 |    1 |        0
-   2 |        2 |    5 |    8 |    1 |        1
-   3 |        3 |    6 |    9 |    1 |        2
-   4 |        4 |    9 |   16 |    1 |        3
-   5 |        5 |    4 |    3 |    1 |        4
-   6 |        6 |    3 |   -1 |    0 |        5
-(6 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, ARRAY[3],
-    TRUE     
-);
- seq | path_seq | end_vid | node | edge | cost | agg_cost 
------+----------+---------+------+------+------+----------
-   1 |        1 |       3 |    2 |    4 |    1 |        0
-   2 |        2 |       3 |    5 |    8 |    1 |        1
-   3 |        3 |       3 |    6 |    9 |    1 |        2
-   4 |        4 |       3 |    9 |   16 |    1 |        3
-   5 |        5 |       3 |    4 |    3 |    1 |        4
-   6 |        6 |       3 |    3 |   -1 |    0 |        5
-(6 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, ARRAY[3]
-);
- seq | path_seq | end_vid | node | edge | cost | agg_cost 
------+----------+---------+------+------+------+----------
-   1 |        1 |       3 |    2 |    4 |    1 |        0
-   2 |        2 |       3 |    5 |    8 |    1 |        1
-   3 |        3 |       3 |    6 |    9 |    1 |        2
-   4 |        4 |       3 |    9 |   16 |    1 |        3
-   5 |        5 |       3 |    4 |    3 |    1 |        4
-   6 |        6 |       3 |    3 |   -1 |    0 |        5
-(6 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[2], ARRAY[3],
-    TRUE
-);
- seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost 
------+----------+-----------+---------+------+------+------+----------
-   1 |        1 |         2 |       3 |    2 |    4 |    1 |        0
-   2 |        2 |         2 |       3 |    5 |    8 |    1 |        1
-   3 |        3 |         2 |       3 |    6 |    9 |    1 |        2
-   4 |        4 |         2 |       3 |    9 |   16 |    1 |        3
-   5 |        5 |         2 |       3 |    4 |    3 |    1 |        4
-   6 |        6 |         2 |       3 |    3 |   -1 |    0 |        5
-(6 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[2], ARRAY[3]
-);
- seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost 
------+----------+-----------+---------+------+------+------+----------
-   1 |        1 |         2 |       3 |    2 |    4 |    1 |        0
-   2 |        2 |         2 |       3 |    5 |    8 |    1 |        1
-   3 |        3 |         2 |       3 |    6 |    9 |    1 |        2
-   4 |        4 |         2 |       3 |    9 |   16 |    1 |        3
-   5 |        5 |         2 |       3 |    4 |    3 |    1 |        4
-   6 |        6 |         2 |       3 |    3 |   -1 |    0 |        5
-(6 rows)
-
--- q16
--- q17
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, 3,
-    FALSE     
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    2 |    2 |    1 |        0
-   2 |        2 |    3 |   -1 |    0 |        1
-(2 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, ARRAY[3],
-    FALSE     
-);
- seq | path_seq | end_vid | node | edge | cost | agg_cost 
------+----------+---------+------+------+------+----------
-   1 |        1 |       3 |    2 |    2 |    1 |        0
-   2 |        2 |       3 |    3 |   -1 |    0 |        1
-(2 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[2], 3,
-    FALSE
-);
- seq | path_seq | start_vid | node | edge | cost | agg_cost 
------+----------+-----------+------+------+------+----------
-   1 |        1 |         2 |    2 |    2 |    1 |        0
-   2 |        2 |         2 |    3 |   -1 |    0 |        1
-(2 rows)
-
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[2], ARRAY[3],
-    FALSE
-);
- seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost 
------+----------+-----------+---------+------+------+------+----------
-   1 |        1 |         2 |       3 |    2 |    2 |    1 |        0
-   2 |        2 |         2 |       3 |    3 |   -1 |    0 |        1
-(2 rows)
-
--- q18
-ROLLBACK;
-ROLLBACK
diff --git a/src/dijkstra/test/doc-pgr_dijkstra.test.sql b/src/dijkstra/test/doc-pgr_dijkstra.test.sql
deleted file mode 100644
index d41bcd7..0000000
--- a/src/dijkstra/test/doc-pgr_dijkstra.test.sql
+++ /dev/null
@@ -1,252 +0,0 @@
-
-\echo -- q1
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, 3
-);
-\echo -- q2
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, 3,
-    FALSE
-);
-\echo -- q3
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    2, ARRAY[3,5],
-    FALSE
-);
-\echo -- q4
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[2,11], 5
-);
-\echo -- q5
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[2,11], ARRAY[3,5],
-    FALSE
-);
-\echo -- q6
-
-
--- Examples for :ref:`fig1-direct-Cost-Reverse` 
--------------------------------------------------------------------------------
-
-\echo -- q7
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, 3
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, 5
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, ARRAY[3,5]
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    11, 3
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    11, 5
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[2,11], 5
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[2, 11], ARRAY[3,5]
-);
-\echo -- q8
-
-
--- Examples for :ref:`fig2-undirect-Cost-Reverse` 
--------------------------------------------------------------------------------
-
-
-\echo -- q9
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, 3,
-    FALSE
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, 5,
-    FALSE
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    11, 3,
-    FALSE
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    11, 5,
-    FALSE
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[2,11], 5,
-    FALSE
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, ARRAY[3,5],
-    FALSE
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[2, 11], ARRAY[3,5],
-    FALSE
-);
-\echo -- q10
-
-
--- Examples for :ref:`fig3-direct-Cost` 
--------------------------------------------------------------------------------
-
-
-\echo -- q11
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    2, 3
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    2, 5
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    11, 3
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    11, 5
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    ARRAY[2,11], 5
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    2, ARRAY[3,5]
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    ARRAY[2, 11], ARRAY[3,5]
-);
-\echo -- q12
-
-
--- Examples for :ref:`fig4-undirect-Cost` 
--------------------------------------------------------------------------------
-
-\echo -- q13
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    2, 3,
-    FALSE
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    2, 5,
-    FALSE
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    11, 3,
-    FALSE
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    11, 5,
-    FALSE
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    ARRAY[2,11], 5,
-    FALSE
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    2, ARRAY[3,5],
-    FALSE
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost FROM edge_table',
-    ARRAY[2, 11], ARRAY[3,5],
-    FALSE
-);
-\echo -- q14
-
-
-
-
--- Equivalences for :ref:`fig1-direct-Cost-Reverse` 
--------------------------------------------------------------------------------
-
-\echo -- q15
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, 3,
-    TRUE     -- directed flag
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2,3 
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, ARRAY[3],
-    TRUE     
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, ARRAY[3]
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[2], ARRAY[3],
-    TRUE
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[2], ARRAY[3]
-);
-
-\echo -- q16
-
-
--- Equivalences for :ref:`fig2-undirect-Cost-Reverse` 
--------------------------------------------------------------------------------
-
-
-\echo -- q17
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, 3,
-    FALSE     -- directed flag
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    2, ARRAY[3],
-    FALSE     
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[2], 3,
-    FALSE
-);
-SELECT * FROM pgr_dijkstra(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[2], ARRAY[3],
-    FALSE
-);
-
-\echo -- q18
diff --git a/src/dijkstra/test/doc-pgr_dijkstraCost.result b/src/dijkstra/test/doc-pgr_dijkstraCost.result
deleted file mode 100644
index ddb9a9b..0000000
--- a/src/dijkstra/test/doc-pgr_dijkstraCost.result
+++ /dev/null
@@ -1,85 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
---q1
-SELECT * FROM pgr_dijkstraCost(
-    'select id, source, target, cost, reverse_cost from edge_table',
-    2, 3);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         2 |       3 |        5
-(1 row)
-
---q2
-SELECT * FROM pgr_dijkstraCost(
-    'select id, source, target, cost, reverse_cost from edge_table',
-    2, 3, false);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         2 |       3 |        1
-(1 row)
-
---q3
-SELECT * FROM pgr_dijkstraCost(
-    'select id, source, target, cost, reverse_cost from edge_table',
-    ARRAY[2, 7], 3);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         2 |       3 |        5
-         7 |       3 |        6
-(2 rows)
-
---q4
-SELECT * FROM pgr_dijkstraCost(
-    'select id, source, target, cost, reverse_cost from edge_table',
-    2, ARRAY[3, 11]);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         2 |       3 |        5
-         2 |      11 |        3
-(2 rows)
-
---q5
-SELECT * FROM pgr_dijkstraCost(
-    'select id, source, target, cost, reverse_cost from edge_table',
-    ARRAY[2, 7], ARRAY[3, 11]);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         2 |       3 |        5
-         2 |      11 |        3
-         7 |       3 |        6
-         7 |      11 |        4
-(4 rows)
-
---q6
-SELECT * FROM pgr_dijkstraCost(
-        'select id, source, target, cost, reverse_cost from edge_table',
-            ARRAY[5, 3, 4, 3, 3, 4], ARRAY[3, 5, 3, 4]);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         3 |       4 |        3
-         3 |       5 |        2
-         4 |       3 |        1
-         4 |       5 |        3
-         5 |       3 |        4
-         5 |       4 |        3
-(6 rows)
-
---q7
-SELECT * FROM pgr_dijkstraCost(
-        'select id, source, target, cost, reverse_cost from edge_table',
-            ARRAY[5, 3, 4], ARRAY[5, 3, 4]);
- start_vid | end_vid | agg_cost 
------------+---------+----------
-         3 |       4 |        3
-         3 |       5 |        2
-         4 |       3 |        1
-         4 |       5 |        3
-         5 |       3 |        4
-         5 |       4 |        3
-(6 rows)
-
---q8
-ROLLBACK;
-ROLLBACK
diff --git a/src/dijkstra/test/doc-pgr_dijkstraVia.result b/src/dijkstra/test/doc-pgr_dijkstraVia.result
deleted file mode 100644
index 241fd80..0000000
--- a/src/dijkstra/test/doc-pgr_dijkstraVia.result
+++ /dev/null
@@ -1,134 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
---q00
-SELECT * FROM pgr_dijkstraVia(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
-    ARRAY[1, 3, 9]
-);
- seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost 
------+---------+----------+-----------+---------+------+------+------+----------+----------------
-   1 |       1 |        1 |         1 |       3 |    1 |    1 |    1 |        0 |              0
-   2 |       1 |        2 |         1 |       3 |    2 |    4 |    1 |        1 |              1
-   3 |       1 |        3 |         1 |       3 |    5 |    8 |    1 |        2 |              2
-   4 |       1 |        4 |         1 |       3 |    6 |    9 |    1 |        3 |              3
-   5 |       1 |        5 |         1 |       3 |    9 |   16 |    1 |        4 |              4
-   6 |       1 |        6 |         1 |       3 |    4 |    3 |    1 |        5 |              5
-   7 |       1 |        7 |         1 |       3 |    3 |   -1 |    0 |        6 |              6
-   8 |       2 |        1 |         3 |       9 |    3 |    5 |    1 |        0 |              6
-   9 |       2 |        2 |         3 |       9 |    6 |    9 |    1 |        1 |              7
-  10 |       2 |        3 |         3 |       9 |    9 |   -2 |    0 |        2 |              8
-(10 rows)
-
--- q0
-SELECT * FROM pgr_dijkstraVia(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
-    ARRAY[1, 3, 9], false, strict:=true, U_turn_on_edge:=false
-);
- seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost 
------+---------+----------+-----------+---------+------+------+------+----------+----------------
-   1 |       1 |        1 |         1 |       3 |    1 |    1 |    1 |        0 |              0
-   2 |       1 |        2 |         1 |       3 |    2 |    2 |    1 |        1 |              1
-   3 |       1 |        3 |         1 |       3 |    3 |   -1 |    0 |        2 |              2
-   4 |       2 |        1 |         3 |       9 |    3 |    5 |    1 |        0 |              2
-   5 |       2 |        2 |         3 |       9 |    6 |    9 |    1 |        1 |              3
-   6 |       2 |        3 |         3 |       9 |    9 |   -2 |    0 |        2 |              4
-(6 rows)
-
--- q1
-SELECT * FROM pgr_dijkstraVia(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
-    ARRAY[1, 5, 3, 9, 4]
-);
- seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost 
------+---------+----------+-----------+---------+------+------+------+----------+----------------
-   1 |       1 |        1 |         1 |       5 |    1 |    1 |    1 |        0 |              0
-   2 |       1 |        2 |         1 |       5 |    2 |    4 |    1 |        1 |              1
-   3 |       1 |        3 |         1 |       5 |    5 |   -1 |    0 |        2 |              2
-   4 |       2 |        1 |         5 |       3 |    5 |    8 |    1 |        0 |              2
-   5 |       2 |        2 |         5 |       3 |    6 |    9 |    1 |        1 |              3
-   6 |       2 |        3 |         5 |       3 |    9 |   16 |    1 |        2 |              4
-   7 |       2 |        4 |         5 |       3 |    4 |    3 |    1 |        3 |              5
-   8 |       2 |        5 |         5 |       3 |    3 |   -1 |    0 |        4 |              6
-   9 |       3 |        1 |         3 |       9 |    3 |    5 |    1 |        0 |              6
-  10 |       3 |        2 |         3 |       9 |    6 |    9 |    1 |        1 |              7
-  11 |       3 |        3 |         3 |       9 |    9 |   -1 |    0 |        2 |              8
-  12 |       4 |        1 |         9 |       4 |    9 |   16 |    1 |        0 |              8
-  13 |       4 |        2 |         9 |       4 |    4 |   -2 |    0 |        1 |              9
-(13 rows)
-
--- q2
-SELECT agg_cost FROM  pgr_dijkstraVia(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
-    ARRAY[1, 5, 3, 9, 4]
-) 
-WHERE path_id = 3 AND edge <0;
- agg_cost 
-----------
-        2
-(1 row)
-
--- q3
-SELECT route_agg_cost FROM  pgr_dijkstraVia(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
-    ARRAY[1, 5, 3, 9, 4]
-)
-WHERE path_id = 3 AND edge < 0;
- route_agg_cost 
-----------------
-              8
-(1 row)
-
--- q4
-SELECT row_number() over () as node_seq, node 
-FROM  pgr_dijkstraVia(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
-    ARRAY[1, 5, 3, 9, 4]
-) 
-WHERE edge <> -1 ORDER BY seq;
- node_seq | node 
-----------+------
-        1 |    1
-        2 |    2
-        3 |    5
-        4 |    6
-        5 |    9
-        6 |    4
-        7 |    3
-        8 |    6
-        9 |    9
-       10 |    4
-(10 rows)
-
--- q5
-SELECT path_id, route_agg_cost FROM  pgr_dijkstraVia(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
-    ARRAY[1, 5, 3, 9, 4]
-) 
-WHERE edge < 0;
- path_id | route_agg_cost 
----------+----------------
-       1 |              2
-       2 |              6
-       3 |              8
-       4 |              9
-(4 rows)
-
--- q6
-SELECT seq, route_agg_cost, node, agg_cost ,
-CASE WHEN edge = -1 THEN 'visits'
-ELSE 'passes in front'
-END as status
-FROM  pgr_dijkstraVia(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
-    ARRAY[1, 5, 3, 9, 4])
-WHERE node = 9 and (agg_cost  <> 0 or seq = 1);
- seq | route_agg_cost | node | agg_cost |     status      
------+----------------+------+----------+-----------------
-   6 |              4 |    9 |        2 | passes in front
-  11 |              8 |    9 |        2 | visits
-(2 rows)
-
-ROLLBACK;
-ROLLBACK
diff --git a/src/dijkstra/test/doc-pgr_dijkstraVia.test.sql b/src/dijkstra/test/doc-pgr_dijkstraVia.test.sql
deleted file mode 100644
index 15eb97b..0000000
--- a/src/dijkstra/test/doc-pgr_dijkstraVia.test.sql
+++ /dev/null
@@ -1,61 +0,0 @@
--- documentation queries
-\echo --q00
-SELECT * FROM pgr_dijkstraVia(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
-    ARRAY[1, 3, 9]
-);
-\echo -- q0
-SELECT * FROM pgr_dijkstraVia(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
-    ARRAY[1, 3, 9], false, strict:=true, U_turn_on_edge:=false
-);
-
-\echo -- q1
-SELECT * FROM pgr_dijkstraVia(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
-    ARRAY[1, 5, 3, 9, 4]
-);
-
-\echo -- q2
-SELECT agg_cost FROM  pgr_dijkstraVia(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
-    ARRAY[1, 5, 3, 9, 4]
-) 
-WHERE path_id = 3 AND edge <0;
-
-
-\echo -- q3
-SELECT route_agg_cost FROM  pgr_dijkstraVia(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
-    ARRAY[1, 5, 3, 9, 4]
-)
-WHERE path_id = 3 AND edge < 0;
-
-
-\echo -- q4
-SELECT row_number() over () as node_seq, node 
-FROM  pgr_dijkstraVia(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
-    ARRAY[1, 5, 3, 9, 4]
-) 
-WHERE edge <> -1 ORDER BY seq;
-
-
-\echo -- q5
-SELECT path_id, route_agg_cost FROM  pgr_dijkstraVia(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
-    ARRAY[1, 5, 3, 9, 4]
-) 
-WHERE edge < 0;
-
-
-\echo -- q6
-SELECT seq, route_agg_cost, node, agg_cost ,
-CASE WHEN edge = -1 THEN 'visits'
-ELSE 'passes in front'
-END as status
-FROM  pgr_dijkstraVia(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
-    ARRAY[1, 5, 3, 9, 4])
-WHERE node = 9 and (agg_cost  <> 0 or seq = 1);
-
diff --git a/src/dijkstraTRSP/src/CMakeLists.txt b/src/dijkstraTRSP/CMakeLists.txt
similarity index 100%
rename from src/dijkstraTRSP/src/CMakeLists.txt
rename to src/dijkstraTRSP/CMakeLists.txt
diff --git a/src/dijkstraTRSP/dijkstraTRSP.c b/src/dijkstraTRSP/dijkstraTRSP.c
new file mode 100644
index 0000000..a0e69e4
--- /dev/null
+++ b/src/dijkstraTRSP/dijkstraTRSP.c
@@ -0,0 +1,285 @@
+/*PGR-GNU*****************************************************************
+File: dijkstraTRSP.c
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer:
+Copyright (c) 2017 Vidhan Jain
+Mail: vidhanj1307 at gmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+/** @file dijkstraTRSP.c
+ * @brief Connecting code with postgres.
+ *
+ * This file is fully documented for understanding
+ *  how the postgres connectinon works
+ *
+ * TODO Remove unnecessary comments before submiting the function.
+ * some comments are in form of PGR_DBG message
+ */
+
+/**
+ *  postgres_connection.h
+ *
+ *  - should always be first in the C code
+ */
+#include "c_common/postgres_connection.h"
+
+
+/* for macro PGR_DBG */
+#include "c_common/debug_macro.h"
+/* for pgr_global_report */
+#include "c_common/e_report.h"
+/* for time_msg & clock */
+#include "c_common/time_msg.h"
+/* for functions to get edges information */
+#include "c_common/edges_input.h"
+#include "c_common/restrict_input.h"
+
+#include "drivers/dijkstraTRSP/dijkstraTRSP_driver.h"  // the link to the C++ code of the function
+
+PGDLLEXPORT Datum dijkstraTRSP(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(dijkstraTRSP);
+
+
+/******************************************************************************/
+/*                          MODIFY AS NEEDED                                  */
+static
+void
+process(
+        char* edges_sql,
+        char *restrictions_sql,
+        int64_t start_vid,
+        int64_t end_vid,
+        bool directed,
+        bool only_cost,
+        bool strict,
+        General_path_element_t **result_tuples,
+        size_t *result_count) {
+    pgr_SPI_connect();
+    /*
+     *  https://www.postgresql.org/docs/current/static/spi-spi-connect.html
+     */
+    (*result_tuples) = NULL;
+    (*result_count) = 0;
+    PGR_DBG("\n\n\n\n\n\nEdge query: %s\n", edges_sql);
+    PGR_DBG("Restrictions query: %s\n", restrictions_sql);
+    PGR_DBG("source: %lu | destination: %lu\n\n", start_vid, end_vid);
+
+    PGR_DBG("Load data");
+    pgr_edge_t *edges = NULL;
+    size_t total_edges = 0;
+
+    if (start_vid == end_vid) {
+        /*
+         * https://www.postgresql.org/docs/current/static/spi-spi-finish.html
+         */
+        pgr_SPI_finish();
+        return;
+    }
+
+    pgr_get_edges(edges_sql, &edges, &total_edges);
+    PGR_DBG("Total %ld edges in query:", total_edges);
+
+    PGR_DBG("Load restrictions");
+    Restrict_t *restrictions = NULL;
+    size_t total_restrictions = 0;
+
+    pgr_get_restriction_data(restrictions_sql, &restrictions,
+        &total_restrictions);
+
+#if 1
+    size_t i = 0;
+    while (i < total_restrictions) {
+        PGR_DBG("id: %ld cost: %lf", restrictions[i].id, restrictions[i].cost);
+        int j = 0;
+        while (restrictions[i].restricted_edges[j] != -1) {
+            PGR_DBG("%ld ", restrictions[i].restricted_edges[j]);
+            j++;
+        }
+        PGR_DBG("\n");
+        i++;
+    }
+#endif
+
+    if (total_edges == 0) {
+        PGR_DBG("No edges found");
+        pgr_SPI_finish();
+        return;
+    }
+
+    PGR_DBG("Starting processing");
+    clock_t start_t = clock();
+    char *log_msg = NULL;
+    char *notice_msg = NULL;
+    char *err_msg = NULL;
+    do_pgr_dijkstraTRSP(
+            edges,
+            total_edges,
+            restrictions,
+            total_restrictions,
+            start_vid,
+            end_vid,
+            directed,
+            only_cost,
+            strict,
+            result_tuples,
+            result_count,
+            &log_msg,
+            &notice_msg,
+            &err_msg);
+
+    time_msg(" processing pgr_dijkstraTRSP", start_t, clock());
+    PGR_DBG("Returning %ld tuples", *result_count);
+
+    if (err_msg) {
+        if (*result_tuples) pfree(*result_tuples);
+    }
+    pgr_global_report(log_msg, notice_msg, err_msg);
+    if (edges) pfree(edges);
+    if (log_msg) pfree(log_msg);
+    if (notice_msg) pfree(notice_msg);
+    if (err_msg) pfree(err_msg);
+    if (restrictions) pfree(restrictions);
+    pgr_SPI_finish();
+}
+/*                                                                            */
+/******************************************************************************/
+
+PGDLLEXPORT Datum dijkstraTRSP(PG_FUNCTION_ARGS) {
+    FuncCallContext     *funcctx;
+    TupleDesc           tuple_desc;
+
+    /**************************************************************************/
+    /*                          MODIFY AS NEEDED                              */
+    /*                                                                        */
+    General_path_element_t  *result_tuples = NULL;
+    size_t result_count = 0;
+    /*                                                                        */
+    /**************************************************************************/
+
+    if (SRF_IS_FIRSTCALL()) {
+        MemoryContext   oldcontext;
+        funcctx = SRF_FIRSTCALL_INIT();
+        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
+
+
+        /**********************************************************************/
+        /*                          MODIFY AS NEEDED                          */
+        /*
+           TEXT,
+    TEXT,
+    BIGINT,
+    BIGINT,
+    directed BOOLEAN DEFAULT true,
+    only_cost BOOLEAN DEFAULT false,
+    strict BOOLEAN DEFAULT false
+         **********************************************************************/
+
+
+        PGR_DBG("Calling process");
+        process(
+                text_to_cstring(PG_GETARG_TEXT_P(0)),
+                text_to_cstring(PG_GETARG_TEXT_P(1)),
+                PG_GETARG_INT64(2),
+                PG_GETARG_INT64(3),
+                PG_GETARG_BOOL(4),
+                PG_GETARG_BOOL(5),
+                PG_GETARG_BOOL(6),
+                &result_tuples,
+                &result_count);
+
+
+        /*                                                                    */
+        /**********************************************************************/
+
+#if PGSQL_VERSION > 94
+        funcctx->max_calls = result_count;
+#else
+        funcctx->max_calls = (uint32_t)result_count;
+#endif
+        funcctx->user_fctx = result_tuples;
+        if (get_call_result_type(fcinfo, NULL, &tuple_desc)
+                != TYPEFUNC_COMPOSITE) {
+            ereport(ERROR,
+                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+                     errmsg("function returning record called in context "
+                         "that cannot accept type record")));
+        }
+
+        funcctx->tuple_desc = tuple_desc;
+        MemoryContextSwitchTo(oldcontext);
+    }
+
+    funcctx = SRF_PERCALL_SETUP();
+    tuple_desc = funcctx->tuple_desc;
+    result_tuples = (General_path_element_t*) funcctx->user_fctx;
+
+    if (funcctx->call_cntr < funcctx->max_calls) {
+        HeapTuple    tuple;
+        Datum        result;
+        Datum        *values;
+        bool*        nulls;
+
+        /**********************************************************************/
+        /*                          MODIFY AS NEEDED                          */
+        /*
+               OUT seq INTEGER,
+    OUT path_seq INTEGER,
+    OUT node BIGINT,
+    OUT edge BIGINT,
+    OUT cost FLOAT,
+    OUT agg_cost FLOAT
+         ***********************************************************************/
+
+        values = palloc(6 * sizeof(Datum));
+        nulls = palloc(6 * sizeof(bool));
+
+
+        size_t i;
+        for (i = 0; i < 6; ++i) {
+            nulls[i] = false;
+        }
+
+        // postgres starts counting from 1
+        values[0] = Int32GetDatum(funcctx->call_cntr + 1);
+        values[1] = Int32GetDatum(result_tuples[funcctx->call_cntr].seq);
+        values[2] = Int64GetDatum(result_tuples[funcctx->call_cntr].node);
+        values[3] = Int64GetDatum(result_tuples[funcctx->call_cntr].edge);
+        values[4] = Float8GetDatum(result_tuples[funcctx->call_cntr].cost);
+        values[5] = Float8GetDatum(result_tuples[funcctx->call_cntr].agg_cost);
+        /**********************************************************************/
+
+        tuple = heap_form_tuple(tuple_desc, values, nulls);
+        result = HeapTupleGetDatum(tuple);
+        SRF_RETURN_NEXT(funcctx, result);
+    } else {
+        /**********************************************************************/
+        /*                          MODIFY AS NEEDED                          */
+
+        PGR_DBG("Clean up code");
+
+        /**********************************************************************/
+
+        SRF_RETURN_DONE(funcctx);
+    }
+}
diff --git a/src/dijkstraTRSP/dijkstraTRSP_driver.cpp b/src/dijkstraTRSP/dijkstraTRSP_driver.cpp
new file mode 100644
index 0000000..a2f65c2
--- /dev/null
+++ b/src/dijkstraTRSP/dijkstraTRSP_driver.cpp
@@ -0,0 +1,186 @@
+/*PGR-GNU*****************************************************************
+File: dijkstraTRSP_driver.cpp
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer:
+Copyright (c) 2017 Vidhan Jain
+Mail: vidhanj1307 at gmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "drivers/dijkstraTRSP/dijkstraTRSP_driver.h"
+
+#include <sstream>
+#include <deque>
+#include <vector>
+#include <string>
+
+#include "dijkstraTRSP/pgr_dijkstraTRSP.hpp"
+
+#include "cpp_common/pgr_alloc.hpp"
+#include "cpp_common/pgr_assert.h"
+
+#if 1
+template < class G >
+static
+Path
+pgr_dijkstraTRSP(
+        G &graph,
+        const std::vector< Restriction >& restrictions_array,
+        const std::vector< pgr_edge_t > edges,
+        int64_t source,
+        int64_t target,
+        std::string& log,
+        bool only_cost = false,
+        bool strict = false) {
+    Pgr_dijkstraTRSP< G > fn_TRSP;
+    Path path = fn_TRSP.dijkstraTRSP(graph,
+                    restrictions_array,
+                    edges,
+                    source,
+                    target,
+                    only_cost,
+                    strict);
+    log += fn_TRSP.log.str().c_str();
+    return path;
+}
+#endif
+
+void
+do_pgr_dijkstraTRSP(
+        pgr_edge_t *data_edges,
+        size_t total_edges,
+        Restrict_t *restrictions,
+        size_t total_restrictions,
+        int64_t start_vid,
+        int64_t end_vid,
+        bool directed,
+        bool only_cost,
+        bool strict,
+        General_path_element_t **return_tuples,
+        size_t *return_count,
+        char ** log_msg,
+        char ** notice_msg,
+        char ** err_msg) {
+    std::ostringstream log;
+    std::ostringstream err;
+    std::ostringstream notice;
+    try {
+        pgassert(!(*log_msg));
+        pgassert(!(*notice_msg));
+        pgassert(!(*err_msg));
+        pgassert(!(*return_tuples));
+        pgassert(*return_count == 0);
+        pgassert(total_edges != 0);
+
+        log << "\n---------------------------------------\nRestrictions data\n";
+        std::vector< Restriction > restrict_array;
+        for (size_t i = 0; i < total_restrictions; i++) {
+            restrict_array.push_back(Restriction(restrictions[i]));
+        }
+        log << "\n-----------------------------------------\nStart from here\n";
+        for (const auto &it : restrict_array) {
+            log << it << "\n";
+        }
+        log <<"------------------------------------------------------------\n";
+
+        graphType gType = directed? DIRECTED: UNDIRECTED;
+
+        std::vector < pgr_edge_t > edges(data_edges, data_edges + total_edges);
+
+        Path path;
+        std::string logstr;
+        if (directed) {
+            log << "Working with directed Graph\n";
+            pgrouting::DirectedGraph digraph(gType);
+            Pgr_dijkstraTRSP < pgrouting::DirectedGraph > fn_TRSP;
+            digraph.insert_edges(edges);
+            path = pgr_dijkstraTRSP(digraph,
+                    restrict_array,
+                    edges,
+                    start_vid,
+                    end_vid,
+                    logstr,
+                    only_cost,
+                    strict);
+        } else {
+            log << "Working with Undirected Graph\n";
+            pgrouting::UndirectedGraph undigraph(gType);
+            Pgr_dijkstraTRSP < pgrouting::UndirectedGraph > fn_TRSP;
+            undigraph.insert_edges(data_edges, total_edges);
+        #if 0
+            path = pgr_dijkstraTRSP(undigraph,
+                    restrict_array,
+                    edges,
+                    start_vid,
+                    end_vid,
+                    logstr,
+                    only_cost,
+                    strict);
+        #endif
+        }
+        log << logstr;
+        auto count = path.size();
+        log << "\nCount = " << count;
+
+        if (count == 0) {
+            (*return_tuples) = NULL;
+            (*return_count) = 0;
+            notice <<
+                "No paths found between start_vid and end_vid vertices";
+        } else {
+            (*return_tuples) = pgr_alloc(count, (*return_tuples));
+            size_t sequence = 0;
+            path.generate_postgres_data(return_tuples, sequence);
+            (*return_count) = sequence;
+        }
+
+        pgassert(*err_msg == NULL);
+        *log_msg = log.str().empty()?
+            *log_msg :
+            pgr_msg(log.str().c_str());
+        #if 0
+        *notice_msg = notice.str().empty()?
+            *notice_msg :
+            pgr_msg(notice.str().c_str());
+        #endif
+        pgassert(!log.str().empty());
+    } catch (AssertFailedException &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch (std::exception &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch(...) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << "Caught unknown exception!";
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    }
+}
diff --git a/src/dijkstraTRSP/restriction.cpp b/src/dijkstraTRSP/restriction.cpp
new file mode 100644
index 0000000..ee150b0
--- /dev/null
+++ b/src/dijkstraTRSP/restriction.cpp
@@ -0,0 +1,52 @@
+/*PGR-GNU*****************************************************************
+File: restriction.cpp
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer:
+Copyright (c) 2017 Vidhan Jain
+Mail: vidhanj1307 at gmail.com
+
+------
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+********************************************************************PGR-GNU*/
+
+#include "dijkstraTRSP/restriction.h"
+
+#include <vector>
+#include <memory>
+#include <utility>
+#include <limits>
+
+Restriction::Restriction(const Restrict_t &r) :
+    m_id(r.id),
+    m_cost(r.cost) {
+        for (auto &it : r.restricted_edges) {
+            if (it == -1) break;
+            restrict_edges(it);
+        }
+    }
+
+std::ostream&
+operator << (std::ostream &log, const Restriction& r) {
+    log << "\n--------------------------------\nRestriction\n";
+    log << "ID: " << r.id() << "\nRestricion edge sequence: ";
+    for (const auto &v : r.restrict_edges()) {
+        log << v <<" ";
+    }
+    log << "\n";
+    log << "Cost: " << r.cost() << "\n";
+    return log;
+}
diff --git a/src/dijkstraTRSP/src/dijkstraTRSP.c b/src/dijkstraTRSP/src/dijkstraTRSP.c
deleted file mode 100644
index 70c550b..0000000
--- a/src/dijkstraTRSP/src/dijkstraTRSP.c
+++ /dev/null
@@ -1,285 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: dijkstraTRSP.c
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer:
-Copyright (c) 2017 Vidhan Jain
-Mail: vidhanj1307 at gmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-/** @file dijkstraTRSP.c
- * @brief Connecting code with postgres.
- *
- * This file is fully documented for understanding
- *  how the postgres connectinon works
- *
- * TODO Remove unnecessary comments before submiting the function.
- * some comments are in form of PGR_DBG message
- */
-
-/**
- *  postgres_connection.h
- *
- *  - should always be first in the C code
- */
-#include "c_common/postgres_connection.h"
-
-
-/* for macro PGR_DBG */
-#include "c_common/debug_macro.h"
-/* for pgr_global_report */
-#include "c_common/e_report.h"
-/* for time_msg & clock */
-#include "c_common/time_msg.h"
-/* for functions to get edges information */
-#include "c_common/edges_input.h"
-#include "c_common/restrict_input.h"
-
-#include "drivers/dijkstraTRSP/dijkstraTRSP_driver.h"  // the link to the C++ code of the function
-
-PGDLLEXPORT Datum dijkstraTRSP(PG_FUNCTION_ARGS);
-PG_FUNCTION_INFO_V1(dijkstraTRSP);
-
-
-/******************************************************************************/
-/*                          MODIFY AS NEEDED                                  */
-static
-void
-process(
-        char* edges_sql,
-        char *restrictions_sql,
-        int64_t start_vid,
-        int64_t end_vid,
-        bool directed,
-        bool only_cost,
-        bool strict,
-        General_path_element_t **result_tuples,
-        size_t *result_count) {
-    pgr_SPI_connect();
-    /*
-     *  https://www.postgresql.org/docs/current/static/spi-spi-connect.html
-     */
-    (*result_tuples) = NULL;
-    (*result_count) = 0;
-    PGR_DBG("\n\n\n\n\n\nEdge query: %s\n", edges_sql);
-    PGR_DBG("Restrictions query: %s\n", restrictions_sql);
-    PGR_DBG("source: %lu | destination: %lu\n\n", start_vid, end_vid);
-
-    PGR_DBG("Load data");
-    pgr_edge_t *edges = NULL;
-    size_t total_edges = 0;
-
-    if (start_vid == end_vid) {
-        /*
-         * https://www.postgresql.org/docs/current/static/spi-spi-finish.html
-         */
-        pgr_SPI_finish();
-        return;
-    }
-
-    pgr_get_edges(edges_sql, &edges, &total_edges);
-    PGR_DBG("Total %ld edges in query:", total_edges);
-
-    PGR_DBG("Load restrictions");
-    Restrict_t *restrictions = NULL;
-    size_t total_restrictions = 0;
-
-    pgr_get_restriction_data(restrictions_sql, &restrictions,
-        &total_restrictions);
-
-#if 1
-    size_t i = 0;
-    while(i < total_restrictions) {
-        PGR_DBG("id: %ld cost: %lf", restrictions[i].id, restrictions[i].cost);
-        int j = 0;
-        while(restrictions[i].restricted_edges[j] != -1) {
-            PGR_DBG("%ld ", restrictions[i].restricted_edges[j]);
-            j++;
-        }
-        PGR_DBG("\n");
-        i++;
-    }
-#endif
-
-    if (total_edges == 0) {
-        PGR_DBG("No edges found");
-        pgr_SPI_finish();
-        return;
-    }
-
-    PGR_DBG("Starting processing");
-    clock_t start_t = clock();
-    char *log_msg = NULL;
-    char *notice_msg = NULL;
-    char *err_msg = NULL;
-    do_pgr_dijkstraTRSP(
-            edges,
-            total_edges,
-            restrictions,
-            total_restrictions,
-            start_vid,
-            end_vid,
-            directed,
-            only_cost,
-            strict,
-            result_tuples,
-            result_count,
-            &log_msg,
-            &notice_msg,
-            &err_msg);
-
-    time_msg(" processing pgr_dijkstraTRSP", start_t, clock());
-    PGR_DBG("Returning %ld tuples", *result_count);
-
-    if (err_msg) {
-        if (*result_tuples) pfree(*result_tuples);
-    }
-    pgr_global_report(log_msg, notice_msg, err_msg);
-    if (edges) pfree(edges);
-    if (log_msg) pfree(log_msg);
-    if (notice_msg) pfree(notice_msg);
-    if (err_msg) pfree(err_msg);
-    if (restrictions) pfree(restrictions);
-    pgr_SPI_finish();
-}
-/*                                                                            */
-/******************************************************************************/
-
-PGDLLEXPORT Datum dijkstraTRSP(PG_FUNCTION_ARGS) {
-    FuncCallContext     *funcctx;
-    TupleDesc           tuple_desc;
-
-    /**************************************************************************/
-    /*                          MODIFY AS NEEDED                              */
-    /*                                                                        */
-    General_path_element_t  *result_tuples = NULL;
-    size_t result_count = 0;
-    /*                                                                        */
-    /**************************************************************************/
-
-    if (SRF_IS_FIRSTCALL()) {
-        MemoryContext   oldcontext;
-        funcctx = SRF_FIRSTCALL_INIT();
-        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
-
-
-        /**********************************************************************/
-        /*                          MODIFY AS NEEDED                          */
-        /*
-           TEXT,
-    TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    strict BOOLEAN DEFAULT false
-         **********************************************************************/
-
-
-        PGR_DBG("Calling process");
-        process(
-                text_to_cstring(PG_GETARG_TEXT_P(0)),
-                text_to_cstring(PG_GETARG_TEXT_P(1)),
-                PG_GETARG_INT64(2),
-                PG_GETARG_INT64(3),
-                PG_GETARG_BOOL(4),
-                PG_GETARG_BOOL(5),
-                PG_GETARG_BOOL(6),
-                &result_tuples,
-                &result_count);
-
-
-        /*                                                                    */
-        /**********************************************************************/
-
-#if PGSQL_VERSION > 94
-        funcctx->max_calls = result_count;
-#else
-        funcctx->max_calls = (uint32_t)result_count;
-#endif
-        funcctx->user_fctx = result_tuples;
-        if (get_call_result_type(fcinfo, NULL, &tuple_desc)
-                != TYPEFUNC_COMPOSITE) {
-            ereport(ERROR,
-                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                     errmsg("function returning record called in context "
-                         "that cannot accept type record")));
-        }
-
-        funcctx->tuple_desc = tuple_desc;
-        MemoryContextSwitchTo(oldcontext);
-    }
-
-    funcctx = SRF_PERCALL_SETUP();
-    tuple_desc = funcctx->tuple_desc;
-    result_tuples = (General_path_element_t*) funcctx->user_fctx;
-
-    if (funcctx->call_cntr < funcctx->max_calls) {
-        HeapTuple    tuple;
-        Datum        result;
-        Datum        *values;
-        bool*        nulls;
-
-        /**********************************************************************/
-        /*                          MODIFY AS NEEDED                          */
-        /*
-               OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-         ***********************************************************************/
-
-        values = palloc(6 * sizeof(Datum));
-        nulls = palloc(6 * sizeof(bool));
-
-
-        size_t i;
-        for (i = 0; i < 6; ++i) {
-            nulls[i] = false;
-        }
-
-        // postgres starts counting from 1
-        values[0] = Int32GetDatum(funcctx->call_cntr + 1);
-        values[1] = Int32GetDatum(result_tuples[funcctx->call_cntr].seq);
-        values[2] = Int64GetDatum(result_tuples[funcctx->call_cntr].node);
-        values[3] = Int64GetDatum(result_tuples[funcctx->call_cntr].edge);
-        values[4] = Float8GetDatum(result_tuples[funcctx->call_cntr].cost);
-        values[5] = Float8GetDatum(result_tuples[funcctx->call_cntr].agg_cost);
-        /**********************************************************************/
-
-        tuple = heap_form_tuple(tuple_desc, values, nulls);
-        result = HeapTupleGetDatum(tuple);
-        SRF_RETURN_NEXT(funcctx, result);
-    } else {
-        /**********************************************************************/
-        /*                          MODIFY AS NEEDED                          */
-
-        PGR_DBG("Clean up code");
-
-        /**********************************************************************/
-
-        SRF_RETURN_DONE(funcctx);
-    }
-}
diff --git a/src/dijkstraTRSP/src/dijkstraTRSP_driver.cpp b/src/dijkstraTRSP/src/dijkstraTRSP_driver.cpp
deleted file mode 100644
index a82f625..0000000
--- a/src/dijkstraTRSP/src/dijkstraTRSP_driver.cpp
+++ /dev/null
@@ -1,186 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: dijkstraTRSP_driver.cpp
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer:
-Copyright (c) 2017 Vidhan Jain
-Mail: vidhanj1307 at gmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "drivers/dijkstraTRSP/dijkstraTRSP_driver.h"
-
-#include <sstream>
-#include <deque>
-#include <vector>
-
-#include "dijkstraTRSP/pgr_dijkstraTRSP.hpp"
-
-#include "cpp_common/pgr_alloc.hpp"
-#include "cpp_common/pgr_assert.h"
-
-#if 1
-template < class G >
-static
-Path
-pgr_dijkstraTRSP(
-        G &graph,
-        const std::vector< Restriction >& restrictions_array,
-        const std::vector< pgr_edge_t > edges,
-        int64_t source,
-        int64_t target,
-        std::string& log,
-        bool only_cost = false,
-        bool strict = false) {
-
-    Pgr_dijkstraTRSP< G > fn_TRSP;
-    Path path = fn_TRSP.dijkstraTRSP(graph,
-                    restrictions_array,
-                    edges,
-                    source,
-                    target,
-                    only_cost,
-                    strict);
-    log += fn_TRSP.log.str().c_str();
-    return path;
-}
-#endif
-
-void
-do_pgr_dijkstraTRSP(
-        pgr_edge_t *data_edges,
-        size_t total_edges,
-        Restrict_t *restrictions,
-        size_t total_restrictions,
-        int64_t start_vid,
-        int64_t end_vid,
-        bool directed,
-        bool only_cost,
-        bool strict,
-        General_path_element_t **return_tuples,
-        size_t *return_count,
-        char ** log_msg,
-        char ** notice_msg,
-        char ** err_msg) {
-    std::ostringstream log;
-    std::ostringstream err;
-    std::ostringstream notice;
-    try {
-        pgassert(!(*log_msg));
-        pgassert(!(*notice_msg));
-        pgassert(!(*err_msg));
-        pgassert(!(*return_tuples));
-        pgassert(*return_count == 0);
-        pgassert(total_edges != 0);
-
-        log << "\n----------------------------------------\nRestrictions data\n";
-        std::vector< Restriction > restrict_array;
-        for(size_t i = 0;i < total_restrictions;i++) {
-            restrict_array.push_back( Restriction(restrictions[i]) );
-        }
-        log << "\n-------------------------------------------------------------\nStart from here\n";
-        for (const auto &it: restrict_array) {
-            log << it << "\n";
-        }
-        log <<"-----------------------------------------------------------------\n";
-
-        graphType gType = directed? DIRECTED: UNDIRECTED;
-
-        std::vector < pgr_edge_t > edges(data_edges, data_edges + total_edges);
-
-        Path path;
-        std::string logstr;
-        if (directed) {
-            log << "Working with directed Graph\n";
-            pgrouting::DirectedGraph digraph(gType);
-            Pgr_dijkstraTRSP < pgrouting::DirectedGraph > fn_TRSP;
-            digraph.insert_edges(edges);
-            path = pgr_dijkstraTRSP(digraph,
-                    restrict_array,
-                    edges,
-                    start_vid,
-                    end_vid,
-                    logstr,
-                    only_cost,
-                    strict);
-        } else {
-            log << "Working with Undirected Graph\n";
-            pgrouting::UndirectedGraph undigraph(gType);
-            Pgr_dijkstraTRSP < pgrouting::UndirectedGraph > fn_TRSP;
-            undigraph.insert_edges(data_edges, total_edges);
-        #if 0
-            path = pgr_dijkstraTRSP(undigraph,
-                    restrict_array,
-                    edges,
-                    start_vid,
-                    end_vid,
-                    logstr,
-                    only_cost,
-                    strict);
-        #endif
-        }
-        log << logstr;
-        auto count = path.size();
-        log << "\nCount = " << count;
-
-        if (count == 0) {
-            (*return_tuples) = NULL;
-            (*return_count) = 0;
-            notice <<
-                "No paths found between start_vid and end_vid vertices";
-        } else {
-            (*return_tuples) = pgr_alloc(count, (*return_tuples));
-            size_t sequence = 0;
-            path.generate_postgres_data(return_tuples, sequence);
-            (*return_count) = sequence;
-        }
-
-        pgassert(*err_msg == NULL);
-        *log_msg = log.str().empty()?
-            *log_msg :
-            pgr_msg(log.str().c_str());
-        #if 0
-        *notice_msg = notice.str().empty()?
-            *notice_msg :
-            pgr_msg(notice.str().c_str());
-        #endif
-        pgassert(!log.str().empty());
-    } catch (AssertFailedException &except) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << except.what();
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    } catch (std::exception &except) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << except.what();
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    } catch(...) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << "Caught unknown exception!";
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    }
-}
diff --git a/src/dijkstraTRSP/src/restriction.cpp b/src/dijkstraTRSP/src/restriction.cpp
deleted file mode 100644
index ecb41a4..0000000
--- a/src/dijkstraTRSP/src/restriction.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: restriction.cpp
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer:
-Copyright (c) 2017 Vidhan Jain
-Mail: vidhanj1307 at gmail.com
-
-------
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-********************************************************************PGR-GNU*/
-
-#include "dijkstraTRSP/restriction.h"
-
-#include <vector>
-#include <memory>
-#include <utility>
-#include <limits>
-
-Restriction::Restriction(const Restrict_t &r) :
-    m_id(r.id),
-    m_cost(r.cost) {
-        for(auto &it: r.restricted_edges) {
-            if (it == -1) break;
-            restrict_edges(it);
-        }
-    }
-
-std::ostream&
-operator << (std::ostream &log, const Restriction& r) {
-    log << "\n--------------------------------\nRestriction\n";
-    log << "ID: " << r.id() << "\nRestricion edge sequence: ";
-    for (const auto &v : r.restrict_edges()) {
-        log << v <<" ";
-    }
-    log << "\n";
-    log << "Cost: " << r.cost() << "\n";
-    return log;
-}
diff --git a/src/dijkstraTRSP/test/pgtap/custom.sql b/src/dijkstraTRSP/test/pgtap/custom.sql
deleted file mode 100644
index 50c824b..0000000
--- a/src/dijkstraTRSP/test/pgtap/custom.sql
+++ /dev/null
@@ -1,163 +0,0 @@
-\i setup.sql
-
-SELECT plan(7);
-
-SET client_min_messages TO WARNING;
-
-UPDATE edge_table SET cost = cost + 0.001 * id * id, reverse_cost = reverse_cost + 0.001 * id * id;
-
-SELECT todo_start();
-
-
-PREPARE q1 AS
-SELECT seq,
-       edge
-FROM pgr_dijkstraTRSP('SELECT id, source, target, cost, reverse_cost
-FROM edge_table', 'SELECT * FROM restrict WHERE id in (1)', 2, 8);
-
-PREPARE q2 AS
-SELECT seq, edge FROM ( VALUES
-	(1, 4),
-	(2, 8),
-	(3, 11),
-	(4, 12),
-	(5, 10),
-	(6, 7),
-	(7, -1) )
-AS t(seq, edge);
-
-SELECT set_eq('q1', 'q2', 'Testing from source 2 to target 8 with restriction on edges as follows 4 -> 7');
-
-
-
-PREPARE q3 AS
-SELECT seq,
-       edge
-FROM pgr_dijkstraTRSP('SELECT id, source, target, cost, reverse_cost
-FROM edge_table', 'SELECT * FROM restrict WHERE id in (2)', 8, 11);
-
-PREPARE q4 AS
-SELECT seq, edge FROM ( VALUES
-	(1, 7),
-	(2, 10),
-	(3, 12),
-	(4, -1) )
-AS t(seq, edge);
-
-SELECT set_eq('q3', 'q4', 'Testing from source 8 to target 11 with restriction on edges as follows 7 -> 8 -> 11');
-
-
-
-PREPARE q5 AS
-SELECT seq,
-       edge
-FROM pgr_dijkstraTRSP('SELECT id, source, target, cost, reverse_cost
-FROM edge_table', 'SELECT * FROM restrict WHERE id in (2, 3)', 7, 3);
-
-PREPARE q6 AS
-SELECT seq, edge FROM ( VALUES
-	(1, 6),
-	(2, 7),
-	(3, 8),
-	(4, 9),
-	(5, 16),
-	(6, 3),
-	(7, -1) )
-AS t(seq, edge);
-
-SELECT set_eq('q5', 'q6', 'Testing from source 7 to target 3 with restriction on edges as follows 7 -> 8 -> 11 and 7 -> 8 -> 5');
-
-
-
-PREPARE q7 AS
-SELECT seq,
-       edge
-FROM pgr_dijkstraTRSP('SELECT id, source, target, cost, reverse_cost
-FROM edge_table', 'SELECT * FROM restrict WHERE id in (4)', 7, 1);
-
-PREPARE q8 AS
-SELECT seq, edge FROM ( VALUES
-	(1, 6),
-	(2, 7),
-	(3, 8),
-	(4, 5),
-	(5, 2),
-	(6, 1),
-	(7, -1) )
-AS t(seq, edge);
-
-SELECT set_eq('q7', 'q8', 'Testing from source 7 to target 1 with restriction on edges as follows 7 -> 4');
-
-
-
-PREPARE q9 AS
-SELECT seq,
-       edge
-FROM pgr_dijkstraTRSP('SELECT id, source, target, cost, reverse_cost
-FROM edge_table', 'SELECT * FROM restrict WHERE id in (4, 5)', 8, 4);
-
-PREPARE q10 AS
-SELECT seq, edge FROM ( VALUES
-	(1, 7),
-	(2, 10),
-	(3, 12),
-	(4, 13),
-	(5, 15),
-	(6, 16),
-	(7, -1) )
-AS t(seq, edge);
-
-SELECT set_eq('q9', 'q10', 'Testing from source 8 to target 4 with restriction on edges as follows 7 -> 8 and 7 -> 4');
-
-
-
-PREPARE q11 AS
-SELECT seq,
-       edge
-FROM pgr_dijkstraTRSP('SELECT id, source, target, cost, reverse_cost
-FROM edge_table', 'SELECT * FROM restrict WHERE id in (4, 5)', 7, 1);
-
-PREPARE q12 AS
-SELECT seq, edge FROM ( VALUES
-	(1, 6),
-	(2, 7),
-	(3, 10),
-	(4, 12),
-	(5, 13),
-	(6, 15),
-	(7, 9),
-	(8, 5),
-	(9, 2),
-	(10, 1),
-	(11, -1) )
-AS t(seq, edge);
-
-SELECT set_eq('q11', 'q12', 'Testing from source 7 to target 1 with restriction on edges as follows 7 -> 8 and 7 -> 4'); 
-
-
-
-PREPARE q13 AS
-SELECT seq,
-       edge
-FROM pgr_dijkstraTRSP('SELECT id, source, target, cost, reverse_cost
-FROM edge_table', 'SELECT * FROM restrict WHERE id in (6, 7)', 12, 7);
-
-PREPARE q14 AS
-SELECT seq, edge FROM ( VALUES
-	(1, 15),
-	(2, 9),
-	(3, 5),
-	(4, 2),
-	(5, 4),
-	(6, 7),
-	(7, 6),
-	(8, -1) )
-AS t(seq, edge);
-
-SELECT set_eq('q13', 'q14', 'Testing from source 12 to target 7 with restriction on edges as follows 9 -> 11 and 9 -> 8'); 
-
-
-SELECT todo_end();
-
-SELECT finish();
-ROLLBACK;
diff --git a/src/driving_distance/src/CMakeLists.txt b/src/driving_distance/CMakeLists.txt
similarity index 100%
rename from src/driving_distance/src/CMakeLists.txt
rename to src/driving_distance/CMakeLists.txt
diff --git a/src/driving_distance/drivedist_driver.cpp b/src/driving_distance/drivedist_driver.cpp
new file mode 100644
index 0000000..8429406
--- /dev/null
+++ b/src/driving_distance/drivedist_driver.cpp
@@ -0,0 +1,220 @@
+/*PGR-GNU*****************************************************************
+File: boost_interface_drivedist.cpp
+
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+vicky_vergara at hotmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ ********************************************************************PGR-GNU*/
+
+#include "drivers/driving_distance/drivedist_driver.h"
+
+#include <sstream>
+#include <deque>
+#include <vector>
+
+#include "dijkstra/pgr_dijkstra.hpp"
+
+#include "cpp_common/pgr_alloc.hpp"
+#include "cpp_common/pgr_assert.h"
+
+#undef WITH_TIME
+#ifdef WITH_TIME
+#include <ctime>
+#include <chrono>
+
+static
+void
+start_timing(
+        std::time_t &start_t,
+        std::chrono::steady_clock::time_point &begin_elapsed,
+        clock_t &begin) {
+    begin = clock();
+    start_t = std::time(NULL);
+    begin_elapsed = std::chrono::steady_clock::now();
+}
+
+static
+void
+end_timing(
+        const std::time_t start_t,
+        std::chrono::steady_clock::time_point& begin_elapsed,
+        clock_t &begin,
+        std::ostringstream &log) {
+    clock_t end = clock();
+    double elapsed_secs =
+        static_cast<double>(end - begin)
+        / static_cast<double>(CLOCKS_PER_SEC);
+
+    std::time_t end_t = std::time(NULL);
+    std::chrono::steady_clock::time_point end_elapsed =
+        std::chrono::steady_clock::now();
+
+    typedef std::chrono::duration<int, std::milli> millisecs_t;
+    millisecs_t duration = std::chrono::duration_cast<millisecs_t>(
+            end_elapsed - begin_elapsed);
+
+    log << "Execution started at: " << std::ctime(&start_t);
+    log << "Execution ended at:   " << std::ctime(&end_t);
+    log << "Elapsed time: "
+        << static_cast<double>(duration.count())/static_cast<double>(1000)
+        << " Seconds.\n";
+    log << "User CPU time: -> " << elapsed_secs << " seconds\n";
+}
+#endif
+
+void
+do_pgr_driving_many_to_dist(
+        pgr_edge_t  *data_edges, size_t total_edges,
+        int64_t *start_vertex, size_t s_len,
+        double distance,
+        bool directedFlag,
+        bool equiCostFlag,
+        General_path_element_t **return_tuples, size_t *return_count,
+        char **log_msg,
+        char **notice_msg,
+        char **err_msg) {
+    std::ostringstream log;
+    std::ostringstream err;
+    std::ostringstream notice;
+
+    try {
+        pgassert(total_edges != 0);
+        pgassert(!(*log_msg));
+        pgassert(!(*notice_msg));
+        pgassert(!(*err_msg));
+        pgassert(!(*return_tuples));
+        pgassert(*return_count == 0);
+        pgassert((*return_tuples) == NULL);
+
+        graphType gType = directedFlag? DIRECTED: UNDIRECTED;
+
+        std::deque<Path> paths;
+        std::vector<int64_t> start_vertices(start_vertex, start_vertex + s_len);
+
+        auto vertices(pgrouting::extract_vertices(data_edges, total_edges));
+
+#ifdef WITH_TIME
+        clock_t begin;
+        std::time_t start_t;
+        std::chrono::steady_clock::time_point begin_elapsed;
+#endif
+
+        if (directedFlag) {
+#ifdef WITH_TIME
+            start_timing(start_t, begin_elapsed, begin);
+            log << "*********Creating graph at time: " << std::ctime(&start_t)
+                << "\n";
+#endif
+            pgrouting::DirectedGraph digraph(vertices, gType);
+#ifdef WITH_TIME
+            end_timing(start_t, begin_elapsed, begin, log);
+#endif
+
+#ifdef WITH_TIME
+            start_timing(start_t, begin_elapsed, begin);
+            log << "********Inserting edges at time: " << std::ctime(&start_t)
+                << "\n";
+#endif
+            digraph.insert_edges(data_edges, total_edges, true);
+#ifdef WITH_TIME
+            end_timing(start_t, begin_elapsed, begin, log);
+#endif
+
+#ifdef WITH_TIME
+            start_timing(start_t, begin_elapsed, begin);
+            log << "*******Calling the C++ call to pgr_drivingDistance: "
+                << std::ctime(&start_t) << "\n";
+#endif
+            paths = pgr_drivingDistance(
+                    digraph, start_vertices, distance, equiCostFlag, log);
+#ifdef WITH_TIME
+            end_timing(start_t, begin_elapsed, begin, log);
+#endif
+        } else {
+#ifdef WITH_TIME
+            start_timing(start_t, begin_elapsed, begin);
+            log << "******Creating graph at time: " << std::ctime(&start_t)
+                << "\n";
+#endif
+            pgrouting::UndirectedGraph undigraph(vertices, gType);
+#ifdef WITH_TIME
+            end_timing(start_t, begin_elapsed, begin, log);
+#endif
+
+#ifdef WITH_TIME
+            start_timing(start_t, begin_elapsed, begin);
+            log << "*******Inserting edges at time: " << std::ctime(&start_t)
+                << "\n";
+#endif
+            undigraph.insert_edges(data_edges, total_edges, true);
+#ifdef WITH_TIME
+            end_timing(start_t, begin_elapsed, begin, log);
+#endif
+
+#ifdef WITH_TIME
+            start_timing(start_t, begin_elapsed, begin);
+            log << "*******Calling the C++ call to pgr_drivingDistance: "
+                << std::ctime(&start_t) << "\n";
+#endif
+            paths = pgr_drivingDistance(
+                    undigraph, start_vertices, distance, equiCostFlag, log);
+#ifdef WITH_TIME
+            end_timing(start_t, begin_elapsed, begin, log);
+#endif
+        }
+
+        size_t count(count_tuples(paths));
+
+
+        if (count == 0) {
+            log << "\nNo return values were found";
+            *notice_msg = pgr_msg(log.str().c_str());
+            return;
+        }
+        *return_tuples = pgr_alloc(count, (*return_tuples));
+        auto trueCount(collapse_paths(return_tuples, paths));
+        *return_count = trueCount;
+
+
+        *log_msg = log.str().empty()?
+            *log_msg :
+            pgr_msg(log.str().c_str());
+        *notice_msg = notice.str().empty()?
+            *notice_msg :
+            pgr_msg(notice.str().c_str());
+    } catch (AssertFailedException &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch (std::exception &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch( ... ) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << "Caught unknown exception!";
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    }
+}
diff --git a/src/driving_distance/src/many_to_dist_driving_distance.c b/src/driving_distance/many_to_dist_driving_distance.c
similarity index 100%
rename from src/driving_distance/src/many_to_dist_driving_distance.c
rename to src/driving_distance/many_to_dist_driving_distance.c
diff --git a/src/driving_distance/many_to_dist_withPointsDD.c b/src/driving_distance/many_to_dist_withPointsDD.c
new file mode 100644
index 0000000..943ede2
--- /dev/null
+++ b/src/driving_distance/many_to_dist_withPointsDD.c
@@ -0,0 +1,247 @@
+/*PGR-GNU*****************************************************************
+File: many_to_dist_driving_distance.c
+
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+Mail: vicky_Vergara at hotmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "c_common/postgres_connection.h"
+#include "utils/array.h"
+
+#include "c_common/debug_macro.h"
+#include "c_common/e_report.h"
+#include "c_common/time_msg.h"
+
+#include "c_common/edges_input.h"
+#include "c_common/arrays_input.h"
+#include "c_common/points_input.h"
+
+#include "drivers/withPoints/get_new_queries.h"
+#include "drivers/driving_distance/withPoints_dd_driver.h"
+
+
+PGDLLEXPORT Datum many_withPointsDD(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(many_withPointsDD);
+
+static
+void process(
+        char* edges_sql,
+        char* points_sql,
+        ArrayType* starts,
+        double distance,
+
+        bool directed,
+        char *driving_side,
+        bool details,
+        bool equicost,
+
+        General_path_element_t **result_tuples,
+        size_t *result_count) {
+    driving_side[0] = estimate_drivingSide(driving_side[0]);
+    PGR_DBG("estimated driving side:%c", driving_side[0]);
+
+    pgr_SPI_connect();
+
+    size_t total_starts = 0;
+    int64_t* start_pidsArr = pgr_get_bigIntArray(&total_starts, starts);
+    PGR_DBG("sourcesArr size %ld ", total_starts);
+
+    Point_on_edge_t *points = NULL;
+    size_t total_points = 0;
+    pgr_get_points(points_sql, &points, &total_points);
+
+    char *edges_of_points_query = NULL;
+    char *edges_no_points_query = NULL;
+    get_new_queries(
+            edges_sql, points_sql,
+            &edges_of_points_query,
+            &edges_no_points_query);
+
+
+    pgr_edge_t *edges_of_points = NULL;
+    size_t total_edges_of_points = 0;
+    pgr_get_edges(
+            edges_of_points_query, &edges_of_points, &total_edges_of_points);
+
+    pgr_edge_t *edges = NULL;
+    size_t total_edges = 0;
+    pgr_get_edges(edges_no_points_query, &edges, &total_edges);
+
+    PGR_DBG("freeing allocated memory not used anymore");
+    pfree(edges_of_points_query);
+    pfree(edges_no_points_query);
+
+    if ((total_edges + total_edges_of_points) == 0) {
+        if (edges) pfree(edges);
+        if (edges_of_points) pfree(edges_of_points);
+        if (points) pfree(points);
+        pgr_SPI_finish();
+        return;
+    }
+
+    PGR_DBG("Starting timer");
+    clock_t start_t = clock();
+    char* log_msg = NULL;
+    char* notice_msg = NULL;
+    char* err_msg = NULL;
+    do_pgr_many_withPointsDD(
+            edges,              total_edges,
+            points,             total_points,
+            edges_of_points,    total_edges_of_points,
+            start_pidsArr,      total_starts,
+            distance,
+
+            directed,
+            driving_side[0],
+            details,
+            equicost,
+
+            result_tuples,
+            result_count,
+            &log_msg,
+            &notice_msg,
+            &err_msg);
+    time_msg(" processing withPointsDD many starts", start_t, clock());
+
+    if (err_msg && (*result_tuples)) {
+        pfree(*result_tuples);
+        (*result_count) = 0;
+        (*result_tuples) = NULL;
+    }
+
+    pgr_global_report(log_msg, notice_msg, err_msg);
+
+    if (log_msg) pfree(log_msg);
+    if (notice_msg) pfree(notice_msg);
+    if (err_msg) pfree(err_msg);
+    if (edges) pfree(edges);
+    if (edges_of_points) pfree(edges_of_points);
+    if (points) pfree(points);
+    if (start_pidsArr) pfree(start_pidsArr);
+    pgr_SPI_finish();
+}
+
+
+
+PGDLLEXPORT Datum
+many_withPointsDD(PG_FUNCTION_ARGS) {
+    FuncCallContext     *funcctx;
+    TupleDesc               tuple_desc;
+
+    /**********************************************************************/
+    General_path_element_t  *result_tuples = 0;
+    size_t result_count = 0;
+    /**********************************************************************/
+
+
+    if (SRF_IS_FIRSTCALL()) {
+        MemoryContext   oldcontext;
+        funcctx = SRF_FIRSTCALL_INIT();
+        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
+
+
+        /**********************************************************************/
+        // CREATE OR REPLACE FUNCTION pgr_withPointsDD(
+        // edges_sql TEXT,
+        // points_sql TEXT,
+        // start_pids anyarray,
+        // distance FLOAT,
+        //
+        // directed BOOLEAN -- DEFAULT true,
+        // driving_side CHAR -- DEFAULT 'b',
+        // details BOOLEAN -- DEFAULT false,
+        // equicost BOOLEAN -- DEFAULT false,
+
+
+        PGR_DBG("Calling driving_many_to_dist_driver");
+        process(
+                text_to_cstring(PG_GETARG_TEXT_P(0)),
+                text_to_cstring(PG_GETARG_TEXT_P(1)),
+                PG_GETARG_ARRAYTYPE_P(2),
+                PG_GETARG_FLOAT8(3),
+
+                PG_GETARG_BOOL(4),
+                text_to_cstring(PG_GETARG_TEXT_P(5)),
+                PG_GETARG_BOOL(6),
+                PG_GETARG_BOOL(7),
+                &result_tuples, &result_count);
+
+        /**********************************************************************/
+
+#if PGSQL_VERSION > 95
+        funcctx->max_calls = result_count;
+#else
+        funcctx->max_calls = (uint32_t)result_count;
+#endif
+        funcctx->user_fctx = result_tuples;
+        if (get_call_result_type(fcinfo, NULL, &tuple_desc)
+                != TYPEFUNC_COMPOSITE)
+            ereport(ERROR,
+                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+                     errmsg("function returning record called in context "
+                         "that cannot accept type record")));
+
+        funcctx->tuple_desc = tuple_desc;
+
+        MemoryContextSwitchTo(oldcontext);
+    }
+
+    funcctx = SRF_PERCALL_SETUP();
+
+    tuple_desc = funcctx->tuple_desc;
+    result_tuples = (General_path_element_t*) funcctx->user_fctx;
+
+    if (funcctx->call_cntr < funcctx->max_calls) {
+        HeapTuple    tuple;
+        Datum        result;
+        Datum *values;
+        bool* nulls;
+
+        /**********************************************************************/
+        size_t numb = 6;
+        values = palloc(numb * sizeof(Datum));
+        nulls = palloc(numb * sizeof(bool));
+
+        size_t i;
+        for (i = 0; i < numb; ++i) {
+            nulls[i] = false;
+        }
+
+        values[0] = Int32GetDatum(funcctx->call_cntr + 1);
+        values[1] = Int64GetDatum(result_tuples[funcctx->call_cntr].start_id);
+        values[2] = Int64GetDatum(result_tuples[funcctx->call_cntr].node);
+        values[3] = Int64GetDatum(result_tuples[funcctx->call_cntr].edge);
+        values[4] = Float8GetDatum(result_tuples[funcctx->call_cntr].cost);
+        values[5] = Float8GetDatum(result_tuples[funcctx->call_cntr].agg_cost);
+
+        /**********************************************************************/
+
+        tuple = heap_form_tuple(tuple_desc, values, nulls);
+        result = HeapTupleGetDatum(tuple);
+
+        pfree(values);
+        pfree(nulls);
+
+        SRF_RETURN_NEXT(funcctx, result);
+    } else {
+        SRF_RETURN_DONE(funcctx);
+    }
+}
+
diff --git a/src/driving_distance/src/drivedist_driver.cpp b/src/driving_distance/src/drivedist_driver.cpp
deleted file mode 100644
index e38ceb9..0000000
--- a/src/driving_distance/src/drivedist_driver.cpp
+++ /dev/null
@@ -1,214 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: boost_interface_drivedist.cpp
-
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-vicky_vergara at hotmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
- ********************************************************************PGR-GNU*/
-
-#include "drivers/driving_distance/drivedist_driver.h"
-
-#include <sstream>
-#include <deque>
-#include <vector>
-
-#include "dijkstra/pgr_dijkstra.hpp"
-
-#include "cpp_common/pgr_alloc.hpp"
-#include "cpp_common/pgr_assert.h"
-
-#undef WITH_TIME
-#ifdef WITH_TIME
-#include <ctime>
-#include <chrono>
-
-static
-void
-start_timing(
-        std::time_t &start_t,
-        std::chrono::steady_clock::time_point &begin_elapsed,
-        clock_t &begin) {
-    begin = clock();
-    start_t = std::time(NULL);
-    begin_elapsed = std::chrono::steady_clock::now();
-}
-
-static
-void
-end_timing(
-        const std::time_t start_t,
-        std::chrono::steady_clock::time_point& begin_elapsed,
-        clock_t &begin,
-        std::ostringstream &log) {
-    clock_t end = clock();
-    double elapsed_secs =
-        static_cast<double>(end - begin)
-        / static_cast<double>(CLOCKS_PER_SEC);
-
-    std::time_t end_t = std::time(NULL);
-    std::chrono::steady_clock::time_point end_elapsed =
-        std::chrono::steady_clock::now();
-
-    typedef std::chrono::duration<int, std::milli> millisecs_t;
-    millisecs_t duration = std::chrono::duration_cast<millisecs_t>(
-            end_elapsed - begin_elapsed);
-
-    log << "Execution started at: " << std::ctime(&start_t);
-    log << "Execution ended at:   " << std::ctime(&end_t);
-    log << "Elapsed time: "
-        << static_cast<double>(duration.count())/static_cast<double>(1000)
-        << " Seconds.\n";
-    log << "User CPU time: -> " << elapsed_secs << " seconds\n";
-}
-#endif
-
-void
-do_pgr_driving_many_to_dist(
-        pgr_edge_t  *data_edges, size_t total_edges,
-        int64_t *start_vertex, size_t s_len,
-        double distance,
-        bool directedFlag,
-        bool equiCostFlag,
-        General_path_element_t **return_tuples, size_t *return_count,
-        char **log_msg,
-        char **notice_msg,
-        char **err_msg) {
-    std::ostringstream log;
-    std::ostringstream err;
-    std::ostringstream notice;
-
-    try {
-        pgassert(total_edges != 0);
-        pgassert(!(*log_msg));
-        pgassert(!(*notice_msg));
-        pgassert(!(*err_msg));
-        pgassert(!(*return_tuples));
-        pgassert(*return_count == 0);
-        pgassert((*return_tuples) == NULL);
-
-        graphType gType = directedFlag? DIRECTED: UNDIRECTED;
-
-        std::deque<Path> paths;
-        std::vector<int64_t> start_vertices(start_vertex, start_vertex + s_len);
-
-        auto vertices(pgrouting::extract_vertices(data_edges, total_edges));
-
-#ifdef WITH_TIME
-        clock_t begin;
-        std::time_t start_t;
-        std::chrono::steady_clock::time_point begin_elapsed;
-#endif
-
-        if (directedFlag) {
-#ifdef WITH_TIME
-            start_timing(start_t, begin_elapsed, begin);
-            log << "*********Creating graph at time: " << std::ctime(&start_t) << "\n";
-#endif
-            pgrouting::DirectedGraph digraph(vertices, gType);
-#ifdef WITH_TIME
-            end_timing(start_t, begin_elapsed, begin, log);
-#endif
-
-#ifdef WITH_TIME
-            start_timing(start_t, begin_elapsed, begin);
-            log << "********Inserting edges at time: " << std::ctime(&start_t) << "\n";
-#endif
-            digraph.insert_edges(data_edges, total_edges, true);
-#ifdef WITH_TIME
-            end_timing(start_t, begin_elapsed, begin, log);
-#endif
-
-#ifdef WITH_TIME
-            start_timing(start_t, begin_elapsed, begin);
-            log << "*******Calling the C++ call to pgr_drivingDistance: " << std::ctime(&start_t) << "\n";
-#endif
-            paths = pgr_drivingDistance(
-                    digraph, start_vertices, distance, equiCostFlag, log);
-#ifdef WITH_TIME
-            end_timing(start_t, begin_elapsed, begin, log);
-#endif
-        } else {
-#ifdef WITH_TIME
-            start_timing(start_t, begin_elapsed, begin);
-            log << "******Creating graph at time: " << std::ctime(&start_t) << "\n";
-#endif
-            pgrouting::UndirectedGraph undigraph(vertices, gType);
-#ifdef WITH_TIME
-            end_timing(start_t, begin_elapsed, begin, log);
-#endif
-
-#ifdef WITH_TIME
-            start_timing(start_t, begin_elapsed, begin);
-            log << "*******Inserting edges at time: " << std::ctime(&start_t) << "\n";
-#endif
-            undigraph.insert_edges(data_edges, total_edges, true);
-#ifdef WITH_TIME
-            end_timing(start_t, begin_elapsed, begin, log);
-#endif
-
-#ifdef WITH_TIME
-            start_timing(start_t, begin_elapsed, begin);
-            log << "*******Calling the C++ call to pgr_drivingDistance: " << std::ctime(&start_t) << "\n";
-#endif
-            paths = pgr_drivingDistance(
-                    undigraph, start_vertices, distance, equiCostFlag, log);
-#ifdef WITH_TIME
-            end_timing(start_t, begin_elapsed, begin, log);
-#endif
-        }
-
-        size_t count(count_tuples(paths));
-
-
-        if (count == 0) {
-            log << "\nNo return values were found";
-            *notice_msg = pgr_msg(log.str().c_str());
-            return;
-        }
-        *return_tuples = pgr_alloc(count, (*return_tuples));
-        auto trueCount(collapse_paths(return_tuples, paths));
-        *return_count = trueCount;
-
-
-        *log_msg = log.str().empty()?
-            *log_msg :
-            pgr_msg(log.str().c_str());
-        *notice_msg = notice.str().empty()?
-            *notice_msg :
-            pgr_msg(notice.str().c_str());
-    } catch (AssertFailedException &except) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << except.what();
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    } catch (std::exception &except) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << except.what();
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    } catch( ... ) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << "Caught unknown exception!";
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    }
-}
diff --git a/src/driving_distance/src/many_to_dist_withPointsDD.c b/src/driving_distance/src/many_to_dist_withPointsDD.c
deleted file mode 100644
index c67727f..0000000
--- a/src/driving_distance/src/many_to_dist_withPointsDD.c
+++ /dev/null
@@ -1,247 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: many_to_dist_driving_distance.c
-
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-Mail: vicky_Vergara at hotmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "c_common/postgres_connection.h"
-#include "utils/array.h"
-
-#include "c_common/debug_macro.h"
-#include "c_common/e_report.h"
-#include "c_common/time_msg.h"
-
-#include "c_common/edges_input.h"
-#include "c_common/arrays_input.h"
-#include "c_common/points_input.h"
-
-#include "drivers/withPoints/get_new_queries.h"
-#include "drivers/driving_distance/withPoints_dd_driver.h"
-
-
-PGDLLEXPORT Datum many_withPointsDD(PG_FUNCTION_ARGS);
-PG_FUNCTION_INFO_V1(many_withPointsDD);
-
-static
-void process(
-        char* edges_sql,
-        char* points_sql,
-        ArrayType* starts,
-        double distance,
-
-        bool directed,
-        char *driving_side,
-        bool details,
-        bool equicost,
-
-        General_path_element_t **result_tuples,
-        size_t *result_count) {
-    driving_side[0] = estimate_drivingSide(driving_side[0]);
-    PGR_DBG("estimated driving side:%c", driving_side[0]);
-
-    pgr_SPI_connect();
-
-    size_t total_starts = 0;
-    int64_t* start_pidsArr = pgr_get_bigIntArray(&total_starts, starts);
-    PGR_DBG("sourcesArr size %ld ", total_starts);
-
-    Point_on_edge_t *points = NULL;
-    size_t total_points = 0;
-    pgr_get_points(points_sql, &points, &total_points);
-
-    char *edges_of_points_query = NULL;
-    char *edges_no_points_query = NULL;
-    get_new_queries(
-            edges_sql, points_sql,
-            &edges_of_points_query,
-            &edges_no_points_query);
-
-
-    pgr_edge_t *edges_of_points = NULL;
-    size_t total_edges_of_points = 0;
-    pgr_get_edges(
-            edges_of_points_query, &edges_of_points, &total_edges_of_points);
-
-    pgr_edge_t *edges = NULL;
-    size_t total_edges = 0;
-    pgr_get_edges(edges_no_points_query, &edges, &total_edges);
-
-    PGR_DBG("freeing allocated memory not used anymore");
-    free(edges_of_points_query);
-    free(edges_no_points_query);
-
-    if ((total_edges + total_edges_of_points) == 0) {
-        if (edges) pfree(edges);
-        if (edges_of_points) pfree(edges_of_points);
-        if (points) pfree(points);
-        pgr_SPI_finish();
-        return;
-    }
-
-    PGR_DBG("Starting timer");
-    clock_t start_t = clock();
-    char* log_msg = NULL;
-    char* notice_msg = NULL;
-    char* err_msg = NULL;
-    do_pgr_many_withPointsDD(
-            edges,              total_edges,
-            points,             total_points,
-            edges_of_points,    total_edges_of_points,
-            start_pidsArr,      total_starts,
-            distance,
-
-            directed,
-            driving_side[0],
-            details,
-            equicost,
-
-            result_tuples,
-            result_count,
-            &log_msg,
-            &notice_msg,
-            &err_msg);
-    time_msg(" processing withPointsDD many starts", start_t, clock());
-
-    if (err_msg && (*result_tuples)) {
-        pfree(*result_tuples);
-        (*result_count) = 0;
-        (*result_tuples) = NULL;
-    }
-
-    pgr_global_report(log_msg, notice_msg, err_msg);
-
-    if (log_msg) pfree(log_msg);
-    if (notice_msg) pfree(notice_msg);
-    if (err_msg) pfree(err_msg);
-    if (edges) pfree(edges);
-    if (edges_of_points) pfree(edges_of_points);
-    if (points) pfree(points);
-    if (start_pidsArr) pfree(start_pidsArr);
-    pgr_SPI_finish();
-}
-
-
-
-PGDLLEXPORT Datum
-many_withPointsDD(PG_FUNCTION_ARGS) {
-    FuncCallContext     *funcctx;
-    TupleDesc               tuple_desc;
-
-    /**********************************************************************/
-    General_path_element_t  *result_tuples = 0;
-    size_t result_count = 0;
-    /**********************************************************************/
-
-
-    if (SRF_IS_FIRSTCALL()) {
-        MemoryContext   oldcontext;
-        funcctx = SRF_FIRSTCALL_INIT();
-        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
-
-
-        /**********************************************************************/
-        // CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-        // edges_sql TEXT,
-        // points_sql TEXT,
-        // start_pids anyarray,
-        // distance FLOAT,
-        //
-        // directed BOOLEAN -- DEFAULT true,
-        // driving_side CHAR -- DEFAULT 'b',
-        // details BOOLEAN -- DEFAULT false,
-        // equicost BOOLEAN -- DEFAULT false,
-
-
-        PGR_DBG("Calling driving_many_to_dist_driver");
-        process(
-                text_to_cstring(PG_GETARG_TEXT_P(0)),
-                text_to_cstring(PG_GETARG_TEXT_P(1)),
-                PG_GETARG_ARRAYTYPE_P(2),
-                PG_GETARG_FLOAT8(3),
-
-                PG_GETARG_BOOL(4),
-                text_to_cstring(PG_GETARG_TEXT_P(5)),
-                PG_GETARG_BOOL(6),
-                PG_GETARG_BOOL(7),
-                &result_tuples, &result_count);
-
-        /**********************************************************************/
-
-#if PGSQL_VERSION > 95
-        funcctx->max_calls = result_count;
-#else
-        funcctx->max_calls = (uint32_t)result_count;
-#endif
-        funcctx->user_fctx = result_tuples;
-        if (get_call_result_type(fcinfo, NULL, &tuple_desc)
-                != TYPEFUNC_COMPOSITE)
-            ereport(ERROR,
-                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                     errmsg("function returning record called in context "
-                         "that cannot accept type record")));
-
-        funcctx->tuple_desc = tuple_desc;
-
-        MemoryContextSwitchTo(oldcontext);
-    }
-
-    funcctx = SRF_PERCALL_SETUP();
-
-    tuple_desc = funcctx->tuple_desc;
-    result_tuples = (General_path_element_t*) funcctx->user_fctx;
-
-    if (funcctx->call_cntr < funcctx->max_calls) {
-        HeapTuple    tuple;
-        Datum        result;
-        Datum *values;
-        bool* nulls;
-
-        /**********************************************************************/
-        size_t numb = 6;
-        values = palloc(numb * sizeof(Datum));
-        nulls = palloc(numb * sizeof(bool));
-
-        size_t i;
-        for (i = 0; i < numb; ++i) {
-            nulls[i] = false;
-        }
-
-        values[0] = Int32GetDatum(funcctx->call_cntr + 1);
-        values[1] = Int64GetDatum(result_tuples[funcctx->call_cntr].start_id);
-        values[2] = Int64GetDatum(result_tuples[funcctx->call_cntr].node);
-        values[3] = Int64GetDatum(result_tuples[funcctx->call_cntr].edge);
-        values[4] = Float8GetDatum(result_tuples[funcctx->call_cntr].cost);
-        values[5] = Float8GetDatum(result_tuples[funcctx->call_cntr].agg_cost);
-
-        /**********************************************************************/
-
-        tuple = heap_form_tuple(tuple_desc, values, nulls);
-        result = HeapTupleGetDatum(tuple);
-
-        pfree(values);
-        pfree(nulls);
-
-        SRF_RETURN_NEXT(funcctx, result);
-    } else {
-        SRF_RETURN_DONE(funcctx);
-    }
-}
-
diff --git a/src/driving_distance/src/withPoints_dd_driver.cpp b/src/driving_distance/src/withPoints_dd_driver.cpp
deleted file mode 100644
index f6aabe4..0000000
--- a/src/driving_distance/src/withPoints_dd_driver.cpp
+++ /dev/null
@@ -1,194 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: withPoints_driver.cpp
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer: 
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-Mail: 
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-
-#include "drivers/driving_distance/withPoints_dd_driver.h"
-
-#include <sstream>
-#include <deque>
-#include <vector>
-#include <algorithm>
-
-#include "dijkstra/pgr_dijkstra.hpp"
-#include "./../../withPoints/src/pgr_withPoints.hpp"
-
-
-#include "cpp_common/pgr_alloc.hpp"
-
-
-/**********************************************************************/
-// CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-// edges_sql TEXT,
-// points_sql TEXT,
-// start_pids anyarray,
-// distance FLOAT,
-//
-// driving_side CHAR -- DEFAULT 'b',
-// details BOOLEAN -- DEFAULT false,
-// directed BOOLEAN -- DEFAULT true,
-// equicost BOOLEAN -- DEFAULT false,
-
-
-void
-do_pgr_many_withPointsDD(
-        pgr_edge_t      *edges,             size_t total_edges,
-        Point_on_edge_t *points_p,          size_t total_points,
-        pgr_edge_t      *edges_of_points,   size_t total_edges_of_points,
-
-        int64_t  *start_pidsArr,    size_t s_len,
-        double distance,
-
-        bool directed,
-        char driving_side,
-        bool details,
-        bool equiCost,
-
-        General_path_element_t **return_tuples, size_t *return_count,
-        char** log_msg,
-        char** notice_msg,
-        char** err_msg) {
-    std::ostringstream log;
-    std::ostringstream notice;
-    std::ostringstream err;
-    try {
-        pgassert(!(*log_msg));
-        pgassert(!(*notice_msg));
-        pgassert(!(*err_msg));
-        pgassert(!(*return_tuples));
-        pgassert((*return_count) == 0);
-        pgassert(edges);
-        pgassert(points_p);
-        pgassert(edges_of_points);
-        pgassert(start_pidsArr);
-
-        /*
-         * storing on C++ containers
-         */
-        std::vector<int64_t> start_vids(
-                start_pidsArr, start_pidsArr + s_len);
-
-        std::vector<Point_on_edge_t>
-            points(points_p, points_p + total_points);
-
-        std::vector<pgr_edge_t> edges_to_modify(
-                edges_of_points, edges_of_points + total_edges_of_points);
-
-        log << "start_vids :";
-        for (const auto v : start_vids) log << v << ", ";
-        /*
-         * checking here is easier than on the C code
-         */
-        int errcode = check_points(points, log);
-        if (errcode) {
-            *log_msg = strdup(log.str().c_str());
-            err << "Unexpected point(s) with same pid"
-                << " but different edge/fraction/side combination found.";
-            *err_msg = pgr_msg(err.str().c_str());
-            return;
-        }
-
-        std::vector< pgr_edge_t > new_edges;
-        create_new_edges(
-                points,
-                edges_to_modify,
-                driving_side,
-                new_edges,
-                log);
-
-        graphType gType = directed? DIRECTED: UNDIRECTED;
-
-        std::deque< Path >paths;
-
-        if (directed) {
-            pgrouting::DirectedGraph digraph(gType);
-            digraph.insert_edges(edges, total_edges);
-            digraph.insert_edges(new_edges);
-            paths = pgr_drivingDistance(
-                    digraph, start_vids, distance, equiCost, log);
-        } else {
-            pgrouting::UndirectedGraph undigraph(gType);
-            undigraph.insert_edges(edges, total_edges);
-            undigraph.insert_edges(new_edges);
-            paths = pgr_drivingDistance(
-                    undigraph, start_vids, distance, equiCost, log);
-        }
-
-        for (auto &path : paths) {
-            log << path;
-
-            if (!details) {
-                eliminate_details_dd(path);
-            }
-            log << path;
-            std::sort(path.begin(), path.end(),
-                    [](const Path_t &l, const  Path_t &r)
-                    {return l.node < r.node;});
-            std::stable_sort(path.begin(), path.end(),
-                    [](const Path_t &l, const  Path_t &r)
-                    {return l.agg_cost < r.agg_cost;});
-            log << path;
-        }
-
-        size_t count(count_tuples(paths));
-
-
-        if (count == 0) {
-            *notice_msg = pgr_msg("No return values was found");
-            return;
-        }
-        *return_tuples = pgr_alloc(count, (*return_tuples));
-        *return_count = collapse_paths(return_tuples, paths);
-        *log_msg = log.str().empty()?
-            *log_msg :
-            pgr_msg(log.str().c_str());
-        *notice_msg = notice.str().empty()?
-            *notice_msg :
-            pgr_msg(notice.str().c_str());
-    } catch (AssertFailedException &except) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << except.what();
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    } catch (std::exception &except) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << except.what();
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    } catch(...) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << "Caught unknown exception!";
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    }
-}
-
-
diff --git a/src/driving_distance/test/doc-pgr_drivingDistance.result b/src/driving_distance/test/doc-pgr_drivingDistance.result
deleted file mode 100644
index 83759bf..0000000
--- a/src/driving_distance/test/doc-pgr_drivingDistance.result
+++ /dev/null
@@ -1,312 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
---q1
-SELECT * FROM pgr_drivingDistance(
-        'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-        2, 3
-      );
- seq | node | edge | cost | agg_cost 
------+------+------+------+----------
-   1 |    2 |   -1 |    0 |        0
-   2 |    1 |    1 |    1 |        1
-   3 |    5 |    4 |    1 |        1
-   4 |    6 |    8 |    1 |        2
-   5 |    8 |    7 |    1 |        2
-   6 |   10 |   10 |    1 |        2
-   7 |    7 |    6 |    1 |        3
-   8 |    9 |    9 |    1 |        3
-   9 |   11 |   12 |    1 |        3
-  10 |   13 |   14 |    1 |        3
-(10 rows)
-
-SELECT * FROM pgr_drivingDistance(
-        'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-        13, 3
-      );
- seq | node | edge | cost | agg_cost 
------+------+------+------+----------
-   1 |   13 |   -1 |    0 |        0
-   2 |   10 |   14 |    1 |        1
-   3 |    5 |   10 |    1 |        2
-   4 |   11 |   12 |    1 |        2
-   5 |    2 |    4 |    1 |        3
-   6 |    6 |    8 |    1 |        3
-   7 |    8 |    7 |    1 |        3
-   8 |   12 |   13 |    1 |        3
-(8 rows)
-
-SELECT * FROM pgr_drivingDistance(
-        'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-        array[2,13], 3
-      );
- seq | from_v | node | edge | cost | agg_cost 
------+--------+------+------+------+----------
-   1 |      2 |    2 |   -1 |    0 |        0
-   2 |      2 |    1 |    1 |    1 |        1
-   3 |      2 |    5 |    4 |    1 |        1
-   4 |      2 |    6 |    8 |    1 |        2
-   5 |      2 |    8 |    7 |    1 |        2
-   6 |      2 |   10 |   10 |    1 |        2
-   7 |      2 |    7 |    6 |    1 |        3
-   8 |      2 |    9 |    9 |    1 |        3
-   9 |      2 |   11 |   12 |    1 |        3
-  10 |      2 |   13 |   14 |    1 |        3
-  11 |     13 |   13 |   -1 |    0 |        0
-  12 |     13 |   10 |   14 |    1 |        1
-  13 |     13 |    5 |   10 |    1 |        2
-  14 |     13 |   11 |   12 |    1 |        2
-  15 |     13 |    2 |    4 |    1 |        3
-  16 |     13 |    6 |    8 |    1 |        3
-  17 |     13 |    8 |    7 |    1 |        3
-  18 |     13 |   12 |   13 |    1 |        3
-(18 rows)
-
-SELECT * FROM pgr_drivingDistance(
-        'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-        array[2,13], 3, equicost:=true
-      );
- seq | from_v | node | edge | cost | agg_cost 
------+--------+------+------+------+----------
-   1 |      2 |    2 |   -1 |    0 |        0
-   2 |      2 |    1 |    1 |    1 |        1
-   3 |      2 |    5 |    4 |    1 |        1
-   4 |      2 |    6 |    8 |    1 |        2
-   5 |      2 |    8 |    7 |    1 |        2
-   6 |      2 |    7 |    6 |    1 |        3
-   7 |      2 |    9 |    9 |    1 |        3
-   8 |     13 |   13 |   -1 |    0 |        0
-   9 |     13 |   10 |   14 |    1 |        1
-  10 |     13 |   11 |   12 |    1 |        2
-  11 |     13 |   12 |   13 |    1 |        3
-(11 rows)
-
---q2
-SELECT * FROM pgr_drivingDistance(
-        'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-        2, 3, false
-      );
- seq | node | edge | cost | agg_cost 
------+------+------+------+----------
-   1 |    2 |   -1 |    0 |        0
-   2 |    1 |    1 |    1 |        1
-   3 |    3 |    2 |    1 |        1
-   4 |    5 |    4 |    1 |        1
-   5 |    4 |    3 |    1 |        2
-   6 |    6 |    8 |    1 |        2
-   7 |    8 |    7 |    1 |        2
-   8 |   10 |   10 |    1 |        2
-   9 |    7 |    6 |    1 |        3
-  10 |    9 |   16 |    1 |        3
-  11 |   11 |   12 |    1 |        3
-  12 |   13 |   14 |    1 |        3
-(12 rows)
-
-SELECT * FROM pgr_drivingDistance(
-        'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-        13, 3, false
-      );
- seq | node | edge | cost | agg_cost 
------+------+------+------+----------
-   1 |   13 |   -1 |    0 |        0
-   2 |   10 |   14 |    1 |        1
-   3 |    5 |   10 |    1 |        2
-   4 |   11 |   12 |    1 |        2
-   5 |    2 |    4 |    1 |        3
-   6 |    6 |    8 |    1 |        3
-   7 |    8 |    7 |    1 |        3
-   8 |   12 |   13 |    1 |        3
-(8 rows)
-
-SELECT * FROM pgr_drivingDistance(
-        'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-        array[2,13], 3, false
-      );
- seq | from_v | node | edge | cost | agg_cost 
------+--------+------+------+------+----------
-   1 |      2 |    2 |   -1 |    0 |        0
-   2 |      2 |    1 |    1 |    1 |        1
-   3 |      2 |    3 |    2 |    1 |        1
-   4 |      2 |    5 |    4 |    1 |        1
-   5 |      2 |    4 |    3 |    1 |        2
-   6 |      2 |    6 |    8 |    1 |        2
-   7 |      2 |    8 |    7 |    1 |        2
-   8 |      2 |   10 |   10 |    1 |        2
-   9 |      2 |    7 |    6 |    1 |        3
-  10 |      2 |    9 |   16 |    1 |        3
-  11 |      2 |   11 |   12 |    1 |        3
-  12 |      2 |   13 |   14 |    1 |        3
-  13 |     13 |   13 |   -1 |    0 |        0
-  14 |     13 |   10 |   14 |    1 |        1
-  15 |     13 |    5 |   10 |    1 |        2
-  16 |     13 |   11 |   12 |    1 |        2
-  17 |     13 |    2 |    4 |    1 |        3
-  18 |     13 |    6 |    8 |    1 |        3
-  19 |     13 |    8 |    7 |    1 |        3
-  20 |     13 |   12 |   13 |    1 |        3
-(20 rows)
-
-SELECT * FROM pgr_drivingDistance(
-        'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-        array[2,13], 3, false, equicost:=true
-      );
- seq | from_v | node | edge | cost | agg_cost 
------+--------+------+------+------+----------
-   1 |      2 |    2 |   -1 |    0 |        0
-   2 |      2 |    1 |    1 |    1 |        1
-   3 |      2 |    3 |    2 |    1 |        1
-   4 |      2 |    5 |    4 |    1 |        1
-   5 |      2 |    4 |    3 |    1 |        2
-   6 |      2 |    6 |    8 |    1 |        2
-   7 |      2 |    8 |    7 |    1 |        2
-   8 |      2 |    7 |    6 |    1 |        3
-   9 |      2 |    9 |   16 |    1 |        3
-  10 |     13 |   13 |   -1 |    0 |        0
-  11 |     13 |   10 |   14 |    1 |        1
-  12 |     13 |   11 |   12 |    1 |        2
-  13 |     13 |   12 |   13 |    1 |        3
-(13 rows)
-
---q3
-SELECT * FROM pgr_drivingDistance(
-        'SELECT id, source, target, cost FROM edge_table',
-        2, 3
-      );
- seq | node | edge | cost | agg_cost 
------+------+------+------+----------
-   1 |    2 |   -1 |    0 |        0
-   2 |    5 |    4 |    1 |        1
-   3 |    6 |    8 |    1 |        2
-   4 |   10 |   10 |    1 |        2
-   5 |    9 |    9 |    1 |        3
-   6 |   11 |   11 |    1 |        3
-   7 |   13 |   14 |    1 |        3
-(7 rows)
-
-SELECT * FROM pgr_drivingDistance(
-        'SELECT id, source, target, cost FROM edge_table',
-        13, 3
-      );
- seq | node | edge | cost | agg_cost 
------+------+------+------+----------
-   1 |   13 |   -1 |    0 |        0
-(1 row)
-
-SELECT * FROM pgr_drivingDistance(
-        'SELECT id, source, target, cost FROM edge_table',
-        array[2,13], 3
-      );
- seq | from_v | node | edge | cost | agg_cost 
------+--------+------+------+------+----------
-   1 |      2 |    2 |   -1 |    0 |        0
-   2 |      2 |    5 |    4 |    1 |        1
-   3 |      2 |    6 |    8 |    1 |        2
-   4 |      2 |   10 |   10 |    1 |        2
-   5 |      2 |    9 |    9 |    1 |        3
-   6 |      2 |   11 |   11 |    1 |        3
-   7 |      2 |   13 |   14 |    1 |        3
-   8 |     13 |   13 |   -1 |    0 |        0
-(8 rows)
-
-SELECT * FROM pgr_drivingDistance(
-        'SELECT id, source, target, cost FROM edge_table',
-        array[2,13], 3, equicost:=true
-      );
- seq | from_v | node | edge | cost | agg_cost 
------+--------+------+------+------+----------
-   1 |      2 |    2 |   -1 |    0 |        0
-   2 |      2 |    5 |    4 |    1 |        1
-   3 |      2 |    6 |    8 |    1 |        2
-   4 |      2 |   10 |   10 |    1 |        2
-   5 |      2 |    9 |    9 |    1 |        3
-   6 |      2 |   11 |   11 |    1 |        3
-   7 |     13 |   13 |   -1 |    0 |        0
-(7 rows)
-
---q4
-SELECT * FROM pgr_drivingDistance(
-        'SELECT id, source, target, cost FROM edge_table',
-        2, 3, false
-      );
- seq | node | edge | cost | agg_cost 
------+------+------+------+----------
-   1 |    2 |   -1 |    0 |        0
-   2 |    1 |    1 |    1 |        1
-   3 |    5 |    4 |    1 |        1
-   4 |    6 |    8 |    1 |        2
-   5 |    8 |    7 |    1 |        2
-   6 |   10 |   10 |    1 |        2
-   7 |    3 |    5 |    1 |        3
-   8 |    7 |    6 |    1 |        3
-   9 |    9 |    9 |    1 |        3
-  10 |   11 |   12 |    1 |        3
-  11 |   13 |   14 |    1 |        3
-(11 rows)
-
-SELECT * FROM pgr_drivingDistance(
-        'SELECT id, source, target, cost FROM edge_table',
-        13, 3, false
-      );
- seq | node | edge | cost | agg_cost 
------+------+------+------+----------
-   1 |   13 |   -1 |    0 |        0
-   2 |   10 |   14 |    1 |        1
-   3 |    5 |   10 |    1 |        2
-   4 |   11 |   12 |    1 |        2
-   5 |    2 |    4 |    1 |        3
-   6 |    6 |    8 |    1 |        3
-   7 |    8 |    7 |    1 |        3
-   8 |   12 |   13 |    1 |        3
-(8 rows)
-
-SELECT * FROM pgr_drivingDistance(
-        'SELECT id, source, target, cost FROM edge_table',
-        array[2,13], 3, false
-      );
- seq | from_v | node | edge | cost | agg_cost 
------+--------+------+------+------+----------
-   1 |      2 |    2 |   -1 |    0 |        0
-   2 |      2 |    1 |    1 |    1 |        1
-   3 |      2 |    5 |    4 |    1 |        1
-   4 |      2 |    6 |    8 |    1 |        2
-   5 |      2 |    8 |    7 |    1 |        2
-   6 |      2 |   10 |   10 |    1 |        2
-   7 |      2 |    3 |    5 |    1 |        3
-   8 |      2 |    7 |    6 |    1 |        3
-   9 |      2 |    9 |    9 |    1 |        3
-  10 |      2 |   11 |   12 |    1 |        3
-  11 |      2 |   13 |   14 |    1 |        3
-  12 |     13 |   13 |   -1 |    0 |        0
-  13 |     13 |   10 |   14 |    1 |        1
-  14 |     13 |    5 |   10 |    1 |        2
-  15 |     13 |   11 |   12 |    1 |        2
-  16 |     13 |    2 |    4 |    1 |        3
-  17 |     13 |    6 |    8 |    1 |        3
-  18 |     13 |    8 |    7 |    1 |        3
-  19 |     13 |   12 |   13 |    1 |        3
-(19 rows)
-
-SELECT * FROM pgr_drivingDistance(
-        'SELECT id, source, target, cost FROM edge_table',
-        array[2,13], 3, false, equicost:=true
-      );
- seq | from_v | node | edge | cost | agg_cost 
------+--------+------+------+------+----------
-   1 |      2 |    2 |   -1 |    0 |        0
-   2 |      2 |    1 |    1 |    1 |        1
-   3 |      2 |    5 |    4 |    1 |        1
-   4 |      2 |    6 |    8 |    1 |        2
-   5 |      2 |    8 |    7 |    1 |        2
-   6 |      2 |    3 |    5 |    1 |        3
-   7 |      2 |    7 |    6 |    1 |        3
-   8 |      2 |    9 |    9 |    1 |        3
-   9 |     13 |   13 |   -1 |    0 |        0
-  10 |     13 |   10 |   14 |    1 |        1
-  11 |     13 |   11 |   12 |    1 |        2
-  12 |     13 |   12 |   13 |    1 |        3
-(12 rows)
-
---q5
-ROLLBACK;
-ROLLBACK
diff --git a/src/driving_distance/withPoints_dd_driver.cpp b/src/driving_distance/withPoints_dd_driver.cpp
new file mode 100644
index 0000000..02a6cec
--- /dev/null
+++ b/src/driving_distance/withPoints_dd_driver.cpp
@@ -0,0 +1,190 @@
+/*PGR-GNU*****************************************************************
+File: withPoints_driver.cpp
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer: 
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+Mail: 
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+
+#include "drivers/driving_distance/withPoints_dd_driver.h"
+
+#include <sstream>
+#include <deque>
+#include <vector>
+#include <algorithm>
+
+#include "dijkstra/pgr_dijkstra.hpp"
+#include "withPoints/pgr_withPoints.hpp"
+
+
+#include "cpp_common/pgr_alloc.hpp"
+
+
+/**********************************************************************/
+// CREATE OR REPLACE FUNCTION pgr_withPointsDD(
+// edges_sql TEXT,
+// points_sql TEXT,
+// start_pids anyarray,
+// distance FLOAT,
+//
+// driving_side CHAR -- DEFAULT 'b',
+// details BOOLEAN -- DEFAULT false,
+// directed BOOLEAN -- DEFAULT true,
+// equicost BOOLEAN -- DEFAULT false,
+
+
+void
+do_pgr_many_withPointsDD(
+        pgr_edge_t      *edges,             size_t total_edges,
+        Point_on_edge_t *points_p,          size_t total_points,
+        pgr_edge_t      *edges_of_points,   size_t total_edges_of_points,
+
+        int64_t  *start_pidsArr,    size_t s_len,
+        double distance,
+
+        bool directed,
+        char driving_side,
+        bool details,
+        bool equiCost,
+
+        General_path_element_t **return_tuples, size_t *return_count,
+        char** log_msg,
+        char** notice_msg,
+        char** err_msg) {
+    std::ostringstream log;
+    std::ostringstream notice;
+    std::ostringstream err;
+    try {
+        pgassert(!(*log_msg));
+        pgassert(!(*notice_msg));
+        pgassert(!(*err_msg));
+        pgassert(!(*return_tuples));
+        pgassert((*return_count) == 0);
+        pgassert(edges);
+        pgassert(points_p);
+        pgassert(edges_of_points);
+        pgassert(start_pidsArr);
+
+
+        pgrouting::Pg_points_graph pg_graph(
+                std::vector<Point_on_edge_t>(
+                    points_p,
+                    points_p + total_points),
+                std::vector< pgr_edge_t >(
+                    edges_of_points,
+                    edges_of_points + total_edges_of_points),
+                true,
+                driving_side,
+                directed);
+
+        if (pg_graph.has_error()) {
+            log << pg_graph.get_log();
+            err << pg_graph.get_error();
+            *log_msg = pgr_msg(log.str().c_str());
+            *err_msg = pgr_msg(err.str().c_str());
+            return;
+        }
+
+
+
+        /*
+         * storing on C++ containers
+         */
+        std::vector<int64_t> start_vids(
+                start_pidsArr, start_pidsArr + s_len);
+
+
+        graphType gType = directed? DIRECTED: UNDIRECTED;
+
+        std::deque< Path >paths;
+
+        if (directed) {
+            pgrouting::DirectedGraph digraph(gType);
+            digraph.insert_edges(edges, total_edges);
+            digraph.insert_edges(pg_graph.new_edges());
+            paths = pgr_drivingDistance(
+                    digraph, start_vids, distance, equiCost, log);
+        } else {
+            pgrouting::UndirectedGraph undigraph(gType);
+            undigraph.insert_edges(edges, total_edges);
+            undigraph.insert_edges(pg_graph.new_edges());
+
+            paths = pgr_drivingDistance(
+                    undigraph, start_vids, distance, equiCost, log);
+        }
+
+        for (auto &path : paths) {
+            log << path;
+
+            if (!details) {
+                pg_graph.eliminate_details_dd(path);
+            }
+            log << path;
+            std::sort(path.begin(), path.end(),
+                    [](const Path_t &l, const  Path_t &r)
+                    {return l.node < r.node;});
+            std::stable_sort(path.begin(), path.end(),
+                    [](const Path_t &l, const  Path_t &r)
+                    {return l.agg_cost < r.agg_cost;});
+            log << path;
+        }
+
+        size_t count(count_tuples(paths));
+
+
+        if (count == 0) {
+            *notice_msg = pgr_msg("No return values was found");
+            return;
+        }
+        *return_tuples = pgr_alloc(count, (*return_tuples));
+        *return_count = collapse_paths(return_tuples, paths);
+        *log_msg = log.str().empty()?
+            *log_msg :
+            pgr_msg(log.str().c_str());
+        *notice_msg = notice.str().empty()?
+            *notice_msg :
+            pgr_msg(notice.str().c_str());
+    } catch (AssertFailedException &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch (std::exception &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch(...) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << "Caught unknown exception!";
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    }
+}
+
+
diff --git a/src/internalQueryTests/sql/CMakeLists.txt b/src/internalQueryTests/sql/CMakeLists.txt
deleted file mode 100644
index 555bde1..0000000
--- a/src/internalQueryTests/sql/CMakeLists.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-# Append in local scope
-LIST(APPEND PACKAGE_SQL_FILES
-    ${CMAKE_CURRENT_SOURCE_DIR}/test_ch_edges.sql
-    ${CMAKE_CURRENT_SOURCE_DIR}/testXYedges.sql
-    ${CMAKE_CURRENT_SOURCE_DIR}/test_matrixRows.sql
-)
-
-# set in parent scope
-SET(PACKAGE_SQL_FILES "${PACKAGE_SQL_FILES}" PARENT_SCOPE)
diff --git a/src/internalQueryTests/sql/testXYedges.sql b/src/internalQueryTests/sql/testXYedges.sql
deleted file mode 100644
index 00c7ff0..0000000
--- a/src/internalQueryTests/sql/testXYedges.sql
+++ /dev/null
@@ -1,36 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: testXYedges.sql
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer: 
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-Mail: 
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-CREATE OR REPLACE FUNCTION _pgr_testXYedges(
-    edges_sql TEXT) 
-
-  RETURNS BOOLEAN AS
- '$libdir/${PGROUTING_LIBRARY_NAME}', 'testXYedges'
-    LANGUAGE c IMMUTABLE STRICT;
-
diff --git a/src/internalQueryTests/sql/test_ch_edges.sql b/src/internalQueryTests/sql/test_ch_edges.sql
deleted file mode 100644
index 7e094be..0000000
--- a/src/internalQueryTests/sql/test_ch_edges.sql
+++ /dev/null
@@ -1,36 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: testXYedges.sql
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer: 
-Copyright (c) 2015 Rohith Reddy
-Mail: 
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-CREATE OR REPLACE FUNCTION _pgr_test_c_edges(
-    edges_sql TEXT) 
-
-  RETURNS BOOLEAN AS
- '$libdir/${PGROUTING_LIBRARY_NAME}', 'test_c_edges'
-    LANGUAGE c IMMUTABLE STRICT;
-
diff --git a/src/internalQueryTests/sql/test_matrixRows.sql b/src/internalQueryTests/sql/test_matrixRows.sql
deleted file mode 100644
index f8419db..0000000
--- a/src/internalQueryTests/sql/test_matrixRows.sql
+++ /dev/null
@@ -1,36 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: testXYedges.sql
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer: 
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-Mail: 
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-CREATE OR REPLACE FUNCTION _pgr_test_matrixRows(
-    matrix_rows_sql TEXT) 
-
-  RETURNS BOOLEAN AS
- '$libdir/${PGROUTING_LIBRARY_NAME}', 'test_matrixRows'
-    LANGUAGE c IMMUTABLE STRICT;
-
diff --git a/src/internalQueryTests/src/CMakeLists.txt b/src/internalQueryTests/src/CMakeLists.txt
deleted file mode 100644
index 2a459a1..0000000
--- a/src/internalQueryTests/src/CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-ADD_LIBRARY(internalQueryTests OBJECT 
-    testXYedges.c 
-    testXYedges_driver.cpp
-    
-    test_matrixRows.c
-    test_matrixRows_driver.cpp
-
-
-    test_c_edges.c 
-    test_c_edges_driver.cpp
-    )
diff --git a/src/internalQueryTests/src/testXYedges.c b/src/internalQueryTests/src/testXYedges.c
deleted file mode 100644
index 955e7b3..0000000
--- a/src/internalQueryTests/src/testXYedges.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: testXYedges.c
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer: 
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-Mail: 
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "c_common/postgres_connection.h"
-
-#include "./testXYedges_driver.h"
-#include "c_common/edges_input.h"
-#include "c_common/debug_macro.h"
-
-
-PGDLLEXPORT Datum testXYedges(PG_FUNCTION_ARGS);
-
-
-static
-void
-process(char* edges_sql,
-        bool *result_bool) {
-    pgr_SPI_connect();
-
-    PGR_DBG("Load data");
-    Pgr_edge_xy_t *edges = NULL;
-    size_t total_edges = 0;
-    pgr_get_edges_xy(edges_sql, &edges, &total_edges);
-
-    if (total_edges == 0) {
-        PGR_DBG("No edges found");
-        (*result_bool) = true;
-        pfree(edges);
-        pgr_SPI_finish();
-        return;
-    }
-    PGR_DBG("Total %ld tuples in query:", total_edges);
-    size_t i;
-    for (i = 0; i < total_edges; ++i) {
-        PGR_DBG("id = %li \t source = %li \t target = %ld  cost = %lf reverse_cost = %lf",
-               edges[i].id, edges[i].source, edges[i].target, edges[i].cost, edges[i].reverse_cost);
-        PGR_DBG("    (x1,y1) = (%.32lf ,%.32lf) (x2,y2) = (%.32lf,.%.32lf)",
-               edges[i].x1, edges[i].y1, edges[i].x2, edges[i].y2);
-    }
-
-
-    PGR_DBG("Starting processing");
-    char *err_msg = NULL;
-    char *log_msg = NULL;
-    (*result_bool) = do_pgr_testXYedges(
-            edges,
-            total_edges,
-            &log_msg,
-            &err_msg);
-
-    pfree(edges);
-    PGR_DBG("Returned log message = %s\n", log_msg);
-    if (log_msg) {
-        elog(DEBUG1, "%s", log_msg);
-        free(log_msg);
-    }
-    PGR_DBG("Returned error message = %s\n", err_msg);
-
-    if (err_msg) {
-        pgr_SPI_finish();
-        elog(ERROR, "%s", err_msg);
-        free(err_msg);
-    }
-
-    pgr_SPI_finish();
-}
-
-PG_FUNCTION_INFO_V1(testXYedges);
-PGDLLEXPORT Datum
-testXYedges(PG_FUNCTION_ARGS) {
-    bool  result_bool = false;
-    process(
-            text_to_cstring(PG_GETARG_TEXT_P(0)),
-            &result_bool);
-
-    PG_RETURN_BOOL(result_bool);
-}
-
diff --git a/src/internalQueryTests/src/testXYedges_driver.cpp b/src/internalQueryTests/src/testXYedges_driver.cpp
deleted file mode 100644
index 4082821..0000000
--- a/src/internalQueryTests/src/testXYedges_driver.cpp
+++ /dev/null
@@ -1,194 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: testXYedges_driver.cpp
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer: 
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-Mail: 
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "./testXYedges_driver.h"
-
-#include <sstream>
-#include <iomanip>
-#include <vector>
-
-#include "./../../common/src/pgr_base_graph.hpp"
-#include "./../../dijkstra/src/pgr_dijkstra.hpp"
-
-#include "./../../common/src/pgr_assert.h"
-
-/************************************************************
-  edges_sql TEXT
- ***********************************************************/
-bool
-do_pgr_testXYedges(
-        Pgr_edge_xy_t *data_edges,
-        size_t total_edges,
-        char ** log_msg,
-        char ** err_msg) {
-    std::ostringstream log;
-    std::ostringstream err;
-    try {
-        pgassert(!(*log_msg));
-        pgassert(!(*err_msg));
-
-        std::vector< Pgr_edge_xy_t > edges(data_edges, data_edges + total_edges);
-        auto vertices(pgrouting::extract_vertices(edges));
-
-
-        log << "Original: \n" <<
-            std::setprecision(32);
-        for (const auto edge : edges) {
-            log << "id = " << edge.id
-                << "\tsource = " << edge.source
-                << "\ttarget = " << edge.target
-                << "\tcost = " << edge.cost
-                << "\treverse_cost = " << edge.reverse_cost
-                << "\n\t(x1,y1) = (" << edge.x1 << "," << edge.y1 << ")"
-                << "\t(x2,y2) = (" << edge.x2 << "," << edge.y2 << ")\n";
-        }
-
-        {
-            log << "Testing Directed ,  insertion using vector\n";
-            pgrouting::xyDirectedGraph graph(DIRECTED);
-            log << "  - Created graph:\n";
-            log << graph;
-
-            log << "  - Inserting Edges:\n";
-            graph.insert_edges(edges);
-            log << graph;
-
-            log << "  - Can do a dijKstra:\n";
-            pgr_dijkstra(graph, 2, 3, true);
-        }
-        {
-            log << "Testing Directed ,  insertion using C array\n";
-            pgrouting::xyDirectedGraph graph(DIRECTED);
-            log << "  - Created graph:\n";
-            log << graph;
-
-            log << "  - Inserting Edges:\n";
-            graph.insert_edges(data_edges, total_edges);
-            log << graph;
-
-            log << "  - Can do a dijKstra:\n";
-            pgr_dijkstra(graph, 2, 3, true);
-        }
-        {
-            log << "Testing Directed ,  creating with vertices, insertion using vector\n";
-            pgrouting::xyDirectedGraph graph(vertices, DIRECTED);
-            log << "  - Created graph:\n";
-            log << graph;
-
-            log << "  - Inserting Edges:\n";
-            graph.insert_edges(edges);
-            log << graph;
-
-            log << "  - Can do a dijKstra:\n";
-            pgr_dijkstra(graph, 2, 3, true);
-        }
-        {
-            log << "Testing Directed ,  creating with vertices, insertion using C array\n";
-            pgrouting::xyDirectedGraph graph(vertices, DIRECTED);
-            log << "  - Created graph:\n";
-            log << graph;
-
-            log << "  - Inserting Edges:\n";
-            graph.insert_edges(data_edges, total_edges);
-            log << graph;
-
-            log << "  - Can do a dijKstra:\n";
-            pgr_dijkstra(graph, 2, 3, true);
-        }
-
-        {
-            log << "Testing Undirected ,  insertion using vector\n";
-            pgrouting::xyUndirectedGraph graph(UNDIRECTED);
-            log << "  - Created graph:\n";
-            log << graph;
-
-            log << "  - Inserting Edges:\n";
-            graph.insert_edges(edges);
-            log << graph;
-
-            log << "  - Can do a dijKstra:\n";
-            pgr_dijkstra(graph, 2, 3, true);
-        }
-        {
-            log << "Testing Directed ,  insertion using C array\n";
-            pgrouting::xyUndirectedGraph graph(UNDIRECTED);
-            log << "  - Created graph:\n";
-            log << graph;
-
-            log << "  - Inserting Edges:\n";
-            graph.insert_edges(data_edges, total_edges);
-            log << graph;
-
-            log << "  - Can do a dijKstra:\n";
-            pgr_dijkstra(graph, 2, 3, true);
-        }
-        {
-            log << "Testing Undirected ,  insertion using C array\n";
-            pgrouting::xyUndirectedGraph graph(UNDIRECTED);
-            log << "  - Created graph:\n";
-            log << graph;
-
-            log << "  - Inserting Edges:\n";
-            graph.insert_edges(data_edges, total_edges);
-            log << graph;
-
-            log << "  - Can do a dijKstra:\n";
-            pgr_dijkstra(graph, 2, 3, true);
-        }
-        {
-            log << "Testing Undirected ,  creating with vertices, insertion using vector\n";
-            pgrouting::xyUndirectedGraph graph(vertices, UNDIRECTED);
-            log << "  - Created graph:\n";
-            log << graph;
-
-            log << "  - Inserting Edges:\n";
-            graph.insert_edges(edges);
-            log << graph;
-
-            log << "  - Can do a dijKstra:\n";
-            pgr_dijkstra(graph, 2, 3, true);
-        }
-
-        *err_msg = NULL;
-        *log_msg = strdup(log.str().c_str());
-        return true;
-    } catch (AssertFailedException &except) {
-        log << except.what() << "\n";
-        *err_msg = strdup(log.str().c_str());
-        return false;
-    } catch (std::exception& except) {
-        log << except.what() << "\n";
-        *err_msg = strdup(log.str().c_str());
-        return false;
-    } catch(...) {
-        log << "Caught unknown exception!\n";
-        *err_msg = strdup(log.str().c_str());
-        return false;
-    }
-}
diff --git a/src/internalQueryTests/src/testXYedges_driver.h b/src/internalQueryTests/src/testXYedges_driver.h
deleted file mode 100644
index 64a7199..0000000
--- a/src/internalQueryTests/src/testXYedges_driver.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: testXYedges_driver.h
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer: 
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-Mail: 
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#ifndef SRC_INTERNALQUERYTESTS_SRC_TESTXYEDGES_DRIVER_H_
-#define SRC_INTERNALQUERYTESTS_SRC_TESTXYEDGES_DRIVER_H_
-
-#include "c_types/pgr_edge_xy_t.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-    /*********************************************************
-      edges_sql TEXT
-     ********************************************************/
-    bool do_pgr_testXYedges(
-            Pgr_edge_xy_t *edges,
-            size_t total_edges,
-            char ** log_msg,
-            char ** err_msg);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif  // SRC_INTERNALQUERYTESTS_SRC_TESTXYEDGES_DRIVER_H_
diff --git a/src/internalQueryTests/src/test_c_edges.c b/src/internalQueryTests/src/test_c_edges.c
deleted file mode 100644
index c243bf8..0000000
--- a/src/internalQueryTests/src/test_c_edges.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: testXYedges.c
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer: 
-Copyright (c) 2015 Rohith Reddy
-Mail: 
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "c_common/postgres_connection.h"
-
-#include "c_common/debug_macro.h"
-
-#include "c_common/edges_input.h"
-
-#include "./test_c_edges_driver.h"
-
-PGDLLEXPORT Datum test_c_edges(PG_FUNCTION_ARGS);
-
-
-static
-void
-process(char *edges_sql,
-        bool *result_bool) {
-    pgr_SPI_connect();
-
-    PGR_DBG("Load data");
-    pgr_edge_t *edges = NULL;
-    size_t total_edges = 0;
-    pgr_get_edges(edges_sql, &edges, &total_edges);
-
-    if (total_edges == 0) {
-        PGR_DBG("No edges found");
-        (*result_bool) = true;
-        pfree(edges);
-        pgr_SPI_finish();
-        return;
-    }
-    PGR_DBG("Total %ld tuples in query:", total_edges);
-    size_t i;
-    for (i = 0; i < total_edges; ++i) {
-        PGR_DBG("id = %li \t source = %li \t target = %ld  cost = %lf reverse_cost = %lf",
-               edges[i].id, edges[i].source, edges[i].target, edges[i].cost, edges[i].reverse_cost);
-        /*PGR_DBG("    (x1,y1) = (%.32lf ,%.32lf) (x2,y2) = (%.32lf,.%.32lf)",
-               edges[i].x1, edges[i].y1, edges[i].x2, edges[i].y2);*/
-    }
-
-
-    PGR_DBG("Starting processing");
-    char *err_msg = NULL;
-    char *log_msg = NULL;
-    (*result_bool) = do_pgr_test_c_edges(
-            edges,
-            total_edges,
-            &log_msg,
-            &err_msg);
-
-    pfree(edges);
-    PGR_DBG("Returned log message = %s\n", log_msg);
-    if (log_msg) {
-        elog(DEBUG1, "%s", log_msg);
-        free(log_msg);
-    }
-    PGR_DBG("Returned error message = %s\n", err_msg);
-
-    if (err_msg) {
-        pgr_SPI_finish();
-        elog(ERROR, "%s", err_msg);
-        free(err_msg);
-    }
-
-    pgr_SPI_finish();
-}
-
-PG_FUNCTION_INFO_V1(test_c_edges);
-PGDLLEXPORT Datum
-test_c_edges(PG_FUNCTION_ARGS) {
-    bool  result_bool = false;
-    process(
-            text_to_cstring(PG_GETARG_TEXT_P(0)),
-            &result_bool);
-
-    PG_RETURN_BOOL(result_bool);
-}
-
diff --git a/src/internalQueryTests/src/test_c_edges_driver.cpp b/src/internalQueryTests/src/test_c_edges_driver.cpp
deleted file mode 100644
index ac36cc8..0000000
--- a/src/internalQueryTests/src/test_c_edges_driver.cpp
+++ /dev/null
@@ -1,219 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: testXYedges_driver.cpp
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer: 
-Copyright (c) 2015 Rohith Reddy
-Mail: 
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "./test_c_edges_driver.h"
-
-#include <sstream>
-#include <iomanip>
-#include <vector>
-
-#include "./../../contraction/src/pgr_contractionGraph.hpp"
-#include "./../../dijkstra/src/pgr_dijkstra.hpp"
-
-#include "./../../common/src/pgr_assert.h"
-
-/************************************************************
-  edges_sql TEXT
- ***********************************************************/
-bool
-do_pgr_test_c_edges(
-        pgr_edge_t *data_edges,
-        size_t total_edges,
-        char ** log_msg,
-        char ** err_msg){
-    std::ostringstream log;
-    std::ostringstream err;
-    try {
-        pgassert(!(*log_msg));
-        pgassert(!(*err_msg));
-
-        std::vector<pgr_edge_t> edges(data_edges, data_edges + total_edges);
-        auto vertices(pgrouting::extract_vertices(edges));
-
-        log << "Original: \n" <<
-            std::setprecision(9);
-        for (const auto edge: edges) {
-            log << "id = " << edge.id
-                << "\tsource = " << edge.source
-                << "\ttarget = " << edge.target
-                << "\tcost = " << edge.cost
-                << "\treverse_cost = " << edge.reverse_cost
-                << ")\n";
-        }
-
-        {
-            log << "Testing Directed ,  insertion using vector\n";
-            pgrouting::CHDirectedGraph graph(DIRECTED);
-            log << "  - Created graph:\n";
-            log << graph;
-
-            log << "  - Inserting Edges:\n";
-            graph.insert_edges(edges);
-            log << graph;
-
-            log << "  - Can do a dijKstra:\n";
-            pgr_dijkstra(graph, 2, 3, true);
-
-        }
-        
-        {
-            log << "Testing Directed ,  insertion using C array\n";
-            pgrouting::CHDirectedGraph graph(DIRECTED);
-            log << "  - Created graph:\n";
-            log << graph;
-
-            log << "  - Inserting Edges:\n";
-            graph.insert_edges(data_edges, total_edges);
-            log << graph;
-
-            log << "  - Can do a dijKstra:\n";
-            pgr_dijkstra(graph, 2, 3, true);
-
-        }
-
-        {
-            log << "Testing Undirected ,  insertion using vector\n";
-            pgrouting::CHUndirectedGraph graph(UNDIRECTED);
-            log << "  - Created graph:\n";
-            log << graph;
-
-            log << "  - Inserting Edges:\n";
-            graph.insert_edges(edges);
-            log << graph;
-
-            log << "  - Can do a dijKstra:\n";
-            pgr_dijkstra(graph, 2, 3, true);
-        }
-
-        {
-            log << "Testing Undirected ,  insertion using C array\n";
-            pgrouting::CHUndirectedGraph graph(UNDIRECTED);
-            log << "  - Created graph:\n";
-            log << graph;
-
-            log << "  - Inserting Edges:\n";
-            graph.insert_edges(data_edges, total_edges);
-            log << graph;
-
-            log << "  - Can do a dijKstra:\n";
-            pgr_dijkstra(graph, 2, 3, true);
-        }
-
-        {
-            log << "Testing Identifiers\n";
-            pgrouting::CHUndirectedGraph graph(UNDIRECTED);
-            graph.insert_edges(edges);
-
-            Identifiers<int64_t> all_vertices, contracted_vertices, remaining_vertices;
-
-            for (const auto vertex: vertices) {
-                all_vertices.insert(graph.get_V(vertex.id));
-            }
-            /*
-               Contracted vertices:
-               1, 7, 8, 13, 14, 16
-               */
-            contracted_vertices.insert(graph.get_V(1));
-            contracted_vertices.insert(graph.get_V(7));
-            contracted_vertices.insert(graph.get_V(8));
-            contracted_vertices.insert(graph.get_V(13));
-            contracted_vertices.insert(graph.get_V(14));
-            contracted_vertices.insert(graph.get_V(16));
-
-            remaining_vertices = all_vertices - contracted_vertices;
-
-            log << "  - All vertices: "
-                << all_vertices
-                << "\n   - Contracted vertices: "
-                << contracted_vertices
-                << "\n  - Remaining vertices: "
-                << remaining_vertices
-                << "\n";
-        }
-
-        {
-            log << "Testing CH_vertex class\n";
-
-            pgrouting::CHUndirectedGraph graph(DIRECTED);
-            graph.insert_edges(edges);
-
-            log << "id ----- V\n";
-            for (int64_t i = 1; i < 18; ++i) {
-            log << "  " << i << " ----- " <<  graph.get_V(i) << "\n";
-            }
-            auto vid1 = graph.get_V(1);
-            auto vid2 = graph.get_V(2);
-
-            auto v1 = graph[vid1];
-            auto v2 = graph[vid2];
-
-
-            log << "  - Dead end contraction:\n";
-            // vertex 1 is contracted to vertex 2
-            v2.add_contracted_vertex(v1, vid1);
-            log << "Vertex 1 is contracted to Vertex 2:\n";
-            log << vid1 << v1 << "\n";
-            log << vid2 << v2 << "\n";
-
-            log << "  - Linear contraction:\n";
-            pgrouting::CH_edge e1;
-            pgrouting::CH_edge e2;
-            pgrouting::CH_edge e3;
-            pgrouting::CH_edge e4;
-
-            // vertex 2 is contracted to edge -1
-            log << "Vertex 1 is contracted to edge -1:\n";
-            e1.id = -1;
-            e1.cost = 0;
-            e1.source = 3;
-            e1.target = 5;
-            e1.add_contracted_vertex(v2, vid2);
-            log << vid2 << v2 << "\n";
-            log << e1 << "\n";
-            log << vid2 << v2 << "\n";
-        }
-
-        *err_msg = NULL;
-        *log_msg = strdup(log.str().c_str());
-        return true;
-
-    } catch (AssertFailedException &except) {
-        log << except.what() << "\n";
-        *err_msg = strdup(log.str().c_str());
-        return false;
-    } catch (std::exception& except) {
-        log << except.what() << "\n";
-        *err_msg = strdup(log.str().c_str());
-        return false;
-    } catch(...) {
-        log << "Caught unknown exception!\n";
-        *err_msg = strdup(log.str().c_str());
-        return false;
-    }
-}
diff --git a/src/internalQueryTests/src/test_c_edges_driver.h b/src/internalQueryTests/src/test_c_edges_driver.h
deleted file mode 100644
index 0c5e711..0000000
--- a/src/internalQueryTests/src/test_c_edges_driver.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: test_c_edges_driver.h
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer: 
-Copyright (c) 2015 Rohith Reddy
-Mail: 
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#ifndef SRC_TESTCEDGES_SRC_TEST_C_EDGES_DRIVER_H_
-#define SRC_TESTCEDGES_SRC_TEST_C_EDGES_DRIVER_H_
-
-#include "c_types/pgr_edge_t.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-    /*********************************************************
-      edges_sql TEXT
-     ********************************************************/
-    bool do_pgr_test_c_edges(
-            pgr_edge_t *edges,
-            size_t total_edges,
-            char ** log_msg,
-            char ** err_msg);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif  // SRC_TESTCEDGES_SRC_TEST_C_EDGES_DRIVER_H_
diff --git a/src/internalQueryTests/src/test_matrixRows.c b/src/internalQueryTests/src/test_matrixRows.c
deleted file mode 100644
index d753e9c..0000000
--- a/src/internalQueryTests/src/test_matrixRows.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: testXYedges.c
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer: 
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-Mail: 
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "c_common/postgres_connection.h"
-
-
-#include "c_common/matrixRows_input.h"
-
-#include "c_common/debug_macro.h"
-#include "./test_matrixRows_driver.h"
-
-PGDLLEXPORT Datum test_matrixRows(PG_FUNCTION_ARGS);
-
-
-/*******************************************************************************/
-/*                          MODIFY AS NEEDED                                   */
-static
-void
-process(char* matrix_rows_sql,
-        bool *result_bool) {
-    pgr_SPI_connect();
-
-    PGR_DBG("Load data");
-    Matrix_cell_t *matrix_rows = NULL;
-    size_t total_rows = 0;
-    pgr_get_matrixRows(matrix_rows_sql, &matrix_rows, &total_rows);
-
-    if (total_rows == 0) {
-        PGR_DBG("No rows found");
-        (*result_bool) = true;
-        pfree(matrix_rows);
-        pgr_SPI_finish();
-        return;
-    }
-
-    PGR_DBG("Total %ld rows in query:", total_rows);
-    size_t i;
-    for (i = 0; i < total_rows; ++i) {
-        PGR_DBG("start_vid = %li \t end_vid = %li agg_cost = %lf",
-               matrix_rows[i].from_vid, matrix_rows[i].to_vid, matrix_rows[i].cost);
-    }
-
-
-    PGR_DBG("Starting processing");
-    char *err_msg = NULL;
-    char *log_msg = NULL;
-    (*result_bool) = do_pgr_test_matrixRows(
-            matrix_rows,
-            total_rows,
-            &log_msg,
-            &err_msg);
-
-    pfree(matrix_rows);
-    PGR_DBG("Returned log message = %s\n", log_msg);
-    if (log_msg) {
-        elog(DEBUG1, "%s", log_msg);
-        free(log_msg);
-    }
-    PGR_DBG("Returned error message = %s\n", err_msg);
-
-    if (err_msg) {
-        pgr_SPI_finish();
-        elog(ERROR, "%s", err_msg);
-        free(err_msg);
-    }
-
-    pgr_SPI_finish();
-}
-
-
-PG_FUNCTION_INFO_V1(test_matrixRows);
-PGDLLEXPORT Datum
-test_matrixRows(PG_FUNCTION_ARGS) {
-    bool  result_bool = false;
-
-    process(
-            text_to_cstring(PG_GETARG_TEXT_P(0)),
-            &result_bool);
-
-    PG_RETURN_BOOL(result_bool);
-}
diff --git a/src/internalQueryTests/src/test_matrixRows_driver.cpp b/src/internalQueryTests/src/test_matrixRows_driver.cpp
deleted file mode 100644
index b0b1bc4..0000000
--- a/src/internalQueryTests/src/test_matrixRows_driver.cpp
+++ /dev/null
@@ -1,76 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: testXYedges_driver.cpp
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer: 
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-Mail: 
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "./test_matrixRows_driver.h"
-
-#include <sstream>
-#include <iomanip>
-#include <vector>
-#include <cstring>
-
-#include "./../../common/src/pgr_assert.h"
-
-bool do_pgr_test_matrixRows(
-        Matrix_cell_t *matrix_rows,
-        size_t total_rows,
-        char ** log_msg,
-        char ** err_msg) {
-    std::ostringstream log;
-    std::ostringstream err;
-    try {
-        pgassert(!(*log_msg));
-        pgassert(!(*err_msg));
-
-        std::vector< Matrix_cell_t > matrix(matrix_rows, matrix_rows + total_rows);
-
-        log << "Original: \n" <<
-            std::setprecision(32);
-        for (const auto row : matrix) {
-            log << "start_vid = " << row.from_vid
-                << "\tend_vid = " << row.to_vid
-                << "\tagg_cost = " << row.cost;
-        }
-
-        *err_msg = NULL;
-        *log_msg = strdup(log.str().c_str());
-        return true;
-    } catch (AssertFailedException &except) {
-        log << except.what() << "\n";
-        *err_msg = strdup(log.str().c_str());
-        return false;
-    } catch (std::exception& except) {
-        log << except.what() << "\n";
-        *err_msg = strdup(log.str().c_str());
-        return false;
-    } catch(...) {
-        log << "Caught unknown exception!\n";
-        *err_msg = strdup(log.str().c_str());
-        return false;
-    }
-}
diff --git a/src/internalQueryTests/src/test_matrixRows_driver.h b/src/internalQueryTests/src/test_matrixRows_driver.h
deleted file mode 100644
index beac198..0000000
--- a/src/internalQueryTests/src/test_matrixRows_driver.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: testXYedges_driver.h
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer: 
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-Mail: 
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#ifndef SRC_INTERNALQUERYTESTS_SRC_TEST_MATRIXROWS_DRIVER_H_
-#define SRC_INTERNALQUERYTESTS_SRC_TEST_MATRIXROWS_DRIVER_H_
-#pragma once
-
-#include "c_types/matrix_cell_t.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-    bool do_pgr_test_matrixRows(
-            Matrix_cell_t *matrix_rows,
-            size_t total_rows,
-            char ** log_msg,
-            char ** err_msg);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif  // SRC_INTERNALQUERYTESTS_SRC_TEST_MATRIXROWS_DRIVER_H_
diff --git a/src/internalQueryTests/test/pgtap/matrixRows_types_check.sql b/src/internalQueryTests/test/pgtap/matrixRows_types_check.sql
deleted file mode 100644
index 2053413..0000000
--- a/src/internalQueryTests/test/pgtap/matrixRows_types_check.sql
+++ /dev/null
@@ -1,94 +0,0 @@
-
-\i setup.sql
-
-SELECT plan(17);
-
-SELECT has_function('_pgr_test_matrixrows', ARRAY['text']);
-SELECT function_returns('_pgr_test_matrixrows', ARRAY['text'],'boolean');
-
-CREATE TEMP TABLE matrix AS
-SELECT * FROM pgr_dijkstracostMatrix('
-    SELECT id, source, target, cost, reverse_cost
-    FROM edge_table',
-    (SELECT array_agg(id) FROM edge_table_vertices_pgr));
-
-CREATE OR REPLACE FUNCTION test_anyInteger(fn TEXT, params TEXT[], parameter TEXT) 
-RETURNS SETOF TEXT AS
-$BODY$
-DECLARE
-start_sql TEXT;
-end_sql TEXT;
-query TEXT;
-p TEXT;
-BEGIN
-    start_sql = 'select * from ' || fn || '($$ SELECT ';
-    FOREACH  p IN ARRAY params LOOP
-        IF p = parameter THEN CONTINUE;
-        END IF;
-        start_sql = start_sql || p || ', ';
-    END LOOP;
-    end_sql = ' FROM matrix $$ )';
-    
-    query := start_sql || parameter || '::SMALLINT ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-    
-    query := start_sql || parameter || '::INTEGER ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-    
-    query := start_sql || parameter || '::BIGINT ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-
-    query := start_sql || parameter || '::REAL ' || end_sql;
-    RETURN query SELECT throws_ok(query);
-
-    query := start_sql || parameter || '::FLOAT8 ' || end_sql;
-    RETURN query SELECT throws_ok(query);
-END;
-$BODY$ LANGUAGE plpgsql;
-
-CREATE OR REPLACE FUNCTION test_anyNumerical(fn TEXT, params TEXT[], parameter TEXT) 
-RETURNS SETOF TEXT AS
-$BODY$
-DECLARE
-start_sql TEXT;
-end_sql TEXT;
-query TEXT;
-p TEXT;
-BEGIN
-    start_sql = 'select * from ' || fn || '($$ SELECT ';
-    FOREACH  p IN ARRAY params LOOP
-        IF p = parameter THEN CONTINUE;
-        END IF;
-        start_sql = start_sql || p || ', ';
-    END LOOP;
-    end_sql = ' FROM matrix $$ )';
-    
-    query := start_sql || parameter || '::SMALLINT ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-    
-    query := start_sql || parameter || '::INTEGER ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-    
-    query := start_sql || parameter || '::BIGINT ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-
-    query := start_sql || parameter || '::REAL ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-
-    query := start_sql || parameter || '::FLOAT8 ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-END;
-$BODY$ LANGUAGE plpgsql;
-
-SELECT test_anyInteger('_pgr_test_matrixrows',
-    ARRAY['start_vid', 'end_vid', 'agg_cost'],
-    'start_vid');
-SELECT test_anyInteger('_pgr_test_matrixrows',
-    ARRAY['start_vid', 'end_vid', 'agg_cost'],
-    'end_vid');
-SELECT test_anyNumerical('_pgr_test_matrixrows',
-    ARRAY['start_vid', 'end_vid', 'agg_cost'],
-    'agg_cost');
-
-SELECT finish();
-ROLLBACK;
diff --git a/src/internalQueryTests/test/pgtap/testXYedges_types_check.sql b/src/internalQueryTests/test/pgtap/testXYedges_types_check.sql
deleted file mode 100644
index c93b5f8..0000000
--- a/src/internalQueryTests/test/pgtap/testXYedges_types_check.sql
+++ /dev/null
@@ -1,133 +0,0 @@
-
-\i setup.sql
-
-SELECT plan(87);
-
-SELECT has_function('_pgr_testxyedges', ARRAY['text']);
-SELECT function_returns('_pgr_testxyedges', ARRAY['text'],'boolean');
-
-CREATE OR REPLACE FUNCTION test_anyInteger(fn TEXT, params TEXT[], parameter TEXT) 
-RETURNS SETOF TEXT AS
-$BODY$
-DECLARE
-start_sql TEXT;
-end_sql TEXT;
-query TEXT;
-p TEXT;
-BEGIN
-    start_sql = 'select * from ' || fn || '($$ SELECT ';
-    FOREACH  p IN ARRAY params LOOP
-        IF p = parameter THEN CONTINUE;
-        END IF;
-        start_sql = start_sql || p || ', ';
-    END LOOP;
-    end_sql = ' FROM edge_table $$ )';
-    
-    query := start_sql || parameter || '::SMALLINT ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-    
-    query := start_sql || parameter || '::INTEGER ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-    
-    query := start_sql || parameter || '::BIGINT ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-
-    query := start_sql || parameter || '::REAL ' || end_sql;
-    RETURN query SELECT throws_ok(query);
-
-    query := start_sql || parameter || '::FLOAT8 ' || end_sql;
-    RETURN query SELECT throws_ok(query);
-END;
-$BODY$ LANGUAGE plpgsql;
-
-CREATE OR REPLACE FUNCTION test_anyNumerical(fn TEXT, params TEXT[], parameter TEXT) 
-RETURNS SETOF TEXT AS
-$BODY$
-DECLARE
-start_sql TEXT;
-end_sql TEXT;
-query TEXT;
-p TEXT;
-BEGIN
-    start_sql = 'select * from ' || fn || '($$ SELECT ';
-    FOREACH  p IN ARRAY params LOOP
-        IF p = parameter THEN CONTINUE;
-        END IF;
-        start_sql = start_sql || p || ', ';
-    END LOOP;
-    end_sql = ' FROM edge_table $$ )';
-    
-    query := start_sql || parameter || '::SMALLINT ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-    
-    query := start_sql || parameter || '::INTEGER ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-    
-    query := start_sql || parameter || '::BIGINT ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-
-    query := start_sql || parameter || '::REAL ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-
-    query := start_sql || parameter || '::FLOAT8 ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-END;
-$BODY$ LANGUAGE plpgsql;
-
-SELECT test_anyInteger('_pgr_testxyedges',
-    ARRAY['id', 'source', 'target', 'cost', 'reverse_cost', 'x1', 'y1', 'x2', 'y2'],
-    'id');
-SELECT test_anyInteger('_pgr_testxyedges',
-    ARRAY['id', 'source', 'target', 'cost', 'reverse_cost', 'x1', 'y1', 'x2', 'y2'],
-    'source');
-SELECT test_anyInteger('_pgr_testxyedges',
-    ARRAY['id', 'source', 'target', 'cost', 'reverse_cost', 'x1', 'y1', 'x2', 'y2'],
-    'target');
-SELECT test_anyNumerical('_pgr_testxyedges',
-    ARRAY['id', 'source', 'target', 'cost', 'reverse_cost', 'x1', 'y1', 'x2', 'y2'],
-    'cost');
-SELECT test_anyNumerical('_pgr_testxyedges',
-    ARRAY['id', 'source', 'target', 'cost', 'reverse_cost', 'x1', 'y1', 'x2', 'y2'],
-    'reverse_cost');
-SELECT test_anyNumerical('_pgr_testxyedges',
-    ARRAY['id', 'source', 'target', 'cost', 'reverse_cost', 'x1', 'y1', 'x2', 'y2'],
-    'x1');
-SELECT test_anyNumerical('_pgr_testxyedges',
-    ARRAY['id', 'source', 'target', 'cost', 'reverse_cost', 'x1', 'y1', 'x2', 'y2'],
-    'y1');
-SELECT test_anyNumerical('_pgr_testxyedges',
-    ARRAY['id', 'source', 'target', 'cost', 'reverse_cost', 'x1', 'y1', 'x2', 'y2'],
-    'x2');
-SELECT test_anyNumerical('_pgr_testxyedges',
-    ARRAY['id', 'source', 'target', 'cost', 'reverse_cost', 'x1', 'y1', 'x2', 'y2'],
-    'y2');
-
-
-SELECT test_anyInteger('_pgr_testxyedges',
-    ARRAY['id', 'source', 'target', 'cost', 'x1', 'y1', 'x2', 'y2'],
-    'id');
-SELECT test_anyInteger('_pgr_testxyedges',
-    ARRAY['id', 'source', 'target', 'cost', 'x1', 'y1', 'x2', 'y2'],
-    'source');
-SELECT test_anyInteger('_pgr_testxyedges',
-    ARRAY['id', 'source', 'target', 'cost', 'x1', 'y1', 'x2', 'y2'],
-    'target');
-SELECT test_anyNumerical('_pgr_testxyedges',
-    ARRAY['id', 'source', 'target', 'cost', 'x1', 'y1', 'x2', 'y2'],
-    'cost');
-SELECT test_anyNumerical('_pgr_testxyedges',
-    ARRAY['id', 'source', 'target', 'cost', 'x1', 'y1', 'x2', 'y2'],
-    'x1');
-SELECT test_anyNumerical('_pgr_testxyedges',
-    ARRAY['id', 'source', 'target', 'cost', 'x1', 'y1', 'x2', 'y2'],
-    'y1');
-SELECT test_anyNumerical('_pgr_testxyedges',
-    ARRAY['id', 'source', 'target', 'cost', 'x1', 'y1', 'x2', 'y2'],
-    'x2');
-SELECT test_anyNumerical('_pgr_testxyedges',
-    ARRAY['id', 'source', 'target', 'cost', 'x1', 'y1', 'x2', 'y2'],
-    'y2');
-
-
-SELECT finish();
-ROLLBACK;
diff --git a/src/ksp/src/CMakeLists.txt b/src/ksp/CMakeLists.txt
similarity index 100%
rename from src/ksp/src/CMakeLists.txt
rename to src/ksp/CMakeLists.txt
diff --git a/src/ksp/devdata/issue285.data b/src/ksp/devdata/issue285.data
deleted file mode 100644
index b56abae..0000000
--- a/src/ksp/devdata/issue285.data
+++ /dev/null
@@ -1,7 +0,0 @@
-1
-1 1 2 1 1
-2 2 3 2 2
-3 2 3 3 3
-4 2 3 4 4
-5 3 4 1 1
--1
diff --git a/src/ksp/devdata/sampledata.data b/src/ksp/devdata/sampledata.data
deleted file mode 100644
index 912aeea..0000000
--- a/src/ksp/devdata/sampledata.data
+++ /dev/null
@@ -1,20 +0,0 @@
-18
-1 1 2 1 1
-2 2 3 -1 1
-3 3 4 -1 1
-4 2 5 1 1
-5 3 6 1 -1
-6 7 8 1 1
-7 8 5 1 1
-8 5 6 1 1
-9 6 9 1 1
-10 5 10 1 1
-11 6 11 1 -1
-12 10 11 1 -1
-13 11 12 1 -1
-14 10 13 1 1
-15 9 12 1 1
-16 4 9 1 1
-17 14 15 1 1
-18 16 17 1 1
--1
diff --git a/src/ksp/ksp.c b/src/ksp/ksp.c
new file mode 100644
index 0000000..3a5bd84
--- /dev/null
+++ b/src/ksp/ksp.c
@@ -0,0 +1,200 @@
+/*PGR-GNU*****************************************************************
+File: ksp.c
+
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+vicky_vergara at hotmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "c_common/postgres_connection.h"
+
+#include "c_common/debug_macro.h"
+#include "c_common/e_report.h"
+#include "c_common/time_msg.h"
+
+#include "c_common/edges_input.h"
+
+#include "drivers/yen/ksp_driver.h"
+
+PGDLLEXPORT Datum kshortest_path(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(kshortest_path);
+
+static
+void compute(
+        char* edges_sql,
+        int64_t start_vertex,
+        int64_t end_vertex,
+        int k,
+        bool directed,
+        bool heap_paths,
+        General_path_element_t **result_tuples, size_t *result_count) {
+    pgr_SPI_connect();
+
+    PGR_DBG("Load data");
+    pgr_edge_t *edges = NULL;
+    size_t total_edges = 0;
+
+
+    if (start_vertex == end_vertex) {
+        pgr_SPI_finish();
+        return;
+    }
+
+    pgr_get_edges(edges_sql, &edges, &total_edges);
+    PGR_DBG("Total %ld edges in query:", total_edges);
+
+    if (total_edges == 0) {
+        PGR_DBG("No edges found");
+        pgr_SPI_finish();
+        return;
+    }
+
+
+    PGR_DBG("Calling do_pgr_ksp\n");
+    PGR_DBG("heap_paths = %i\n", heap_paths);
+
+    clock_t start_t = clock();
+    char *log_msg = NULL;
+    char *notice_msg = NULL;
+    char *err_msg = NULL;
+
+    do_pgr_ksp(
+            edges,
+            total_edges,
+            start_vertex,
+            end_vertex,
+            k,
+            directed,
+            heap_paths,
+            result_tuples,
+            result_count,
+            &log_msg,
+            &notice_msg,
+            &err_msg);
+    time_msg(" processing KSP", start_t, clock());
+
+    if (err_msg && (*result_tuples)) {
+        pfree(*result_tuples);
+        (*result_tuples) = NULL;
+        (*result_count) = 0;
+    }
+
+    pgr_global_report(log_msg, notice_msg, err_msg);
+
+    if (log_msg) pfree(log_msg);
+    if (notice_msg) pfree(notice_msg);
+    if (err_msg) pfree(err_msg);
+
+
+    pgr_global_report(log_msg, notice_msg, err_msg);
+
+    pfree(edges);
+    pgr_SPI_finish();
+}
+
+
+PGDLLEXPORT Datum
+kshortest_path(PG_FUNCTION_ARGS) {
+    FuncCallContext     *funcctx;
+    TupleDesc            tuple_desc;
+    General_path_element_t      *path = NULL;
+    size_t result_count = 0;
+
+    if (SRF_IS_FIRSTCALL()) {
+        MemoryContext   oldcontext;
+        funcctx = SRF_FIRSTCALL_INIT();
+        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
+
+
+        /*
+           CREATE OR REPLACE FUNCTION _pgr_ksp(
+           sql text,
+           start_vid bigint,
+           end_vid bigint,
+           k integer,
+           directed boolean,
+           heap_paths boolean
+           */
+        PGR_DBG("Calling process");
+        compute(
+                text_to_cstring(PG_GETARG_TEXT_P(0)),
+                PG_GETARG_INT64(1),
+                PG_GETARG_INT64(2),
+                PG_GETARG_INT32(3),
+                PG_GETARG_BOOL(4),
+                PG_GETARG_BOOL(5),
+                &path,
+                &result_count);
+        PGR_DBG("Total number of tuples to be returned %ld \n", result_count);
+
+
+#if PGSQL_VERSION > 95
+        funcctx->max_calls = result_count;
+#else
+        funcctx->max_calls = (uint32_t)result_count;
+#endif
+        funcctx->user_fctx = path;
+        if (get_call_result_type(fcinfo, NULL, &tuple_desc)
+                != TYPEFUNC_COMPOSITE)
+            ereport(ERROR,
+                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+                     errmsg("function returning record called in context "
+                         "that cannot accept type record\n")));
+
+        funcctx->tuple_desc = tuple_desc;
+        MemoryContextSwitchTo(oldcontext);
+    }
+
+
+    funcctx = SRF_PERCALL_SETUP();
+
+
+    tuple_desc = funcctx->tuple_desc;
+    path = (General_path_element_t*) funcctx->user_fctx;
+
+    if (funcctx->call_cntr < funcctx->max_calls) {
+        HeapTuple    tuple;
+        Datum        result;
+        Datum *values;
+        bool* nulls;
+
+        values = palloc(7 * sizeof(Datum));
+        nulls = palloc(7 * sizeof(bool));
+
+
+        size_t i;
+        for (i = 0; i < 7; ++i) {
+            nulls[i] = false;
+        }
+
+        values[0] = Int32GetDatum(funcctx->call_cntr + 1);
+        values[1] = Int32GetDatum(path[funcctx->call_cntr].start_id + 1);
+        values[2] = Int32GetDatum(path[funcctx->call_cntr].seq);
+        values[3] = Int64GetDatum(path[funcctx->call_cntr].node);
+        values[4] = Int64GetDatum(path[funcctx->call_cntr].edge);
+        values[5] = Float8GetDatum(path[funcctx->call_cntr].cost);
+        values[6] = Float8GetDatum(path[funcctx->call_cntr].agg_cost);
+
+        tuple = heap_form_tuple(tuple_desc, values, nulls);
+        result = HeapTupleGetDatum(tuple);
+        SRF_RETURN_NEXT(funcctx, result);
+    } else {   /* do when there is no more left */
+        SRF_RETURN_DONE(funcctx);
+    }
+}
diff --git a/src/ksp/ksp_driver.cpp b/src/ksp/ksp_driver.cpp
new file mode 100644
index 0000000..ddff5fa
--- /dev/null
+++ b/src/ksp/ksp_driver.cpp
@@ -0,0 +1,124 @@
+/*PGR-GNU*****************************************************************
+File: ksp_driver.cpp
+
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+vicky_vergara at hotmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+
+#include "drivers/yen/ksp_driver.h"
+
+#include <sstream>
+#include <deque>
+#include <vector>
+
+#include "yen/pgr_ksp.hpp"
+
+#include "cpp_common/pgr_alloc.hpp"
+#include "cpp_common/pgr_assert.h"
+
+#include "cpp_common/pgr_base_graph.hpp"
+
+
+
+void  do_pgr_ksp(
+        pgr_edge_t *data_edges,
+        size_t total_edges,
+        int64_t  start_vid,
+        int64_t  end_vid,
+        int k,
+        bool directed,
+        bool heap_paths,
+        General_path_element_t **return_tuples,
+        size_t *return_count,
+        char ** log_msg,
+        char ** notice_msg,
+        char ** err_msg) {
+    std::ostringstream err;
+    std::ostringstream log;
+    std::ostringstream notice;
+    try {
+        pgassert(!(*log_msg));
+        pgassert(!(*notice_msg));
+        pgassert(!(*err_msg));
+        pgassert(!(*return_tuples));
+        pgassert(*return_count == 0);
+        pgassert(total_edges != 0);
+
+        graphType gType = directed? DIRECTED: UNDIRECTED;
+
+        std::deque< Path > paths;
+
+        if (directed) {
+            pgrouting::DirectedGraph digraph(gType);
+            Pgr_ksp< pgrouting::DirectedGraph > fn_yen;
+            digraph.insert_edges(data_edges, total_edges);
+            paths = fn_yen.Yen(digraph, start_vid, end_vid, k, heap_paths);
+        } else {
+            pgrouting::UndirectedGraph undigraph(gType);
+            Pgr_ksp< pgrouting::UndirectedGraph > fn_yen;
+            undigraph.insert_edges(data_edges, total_edges);
+            paths = fn_yen.Yen(undigraph, start_vid, end_vid, k, heap_paths);
+        }
+
+
+        auto count(count_tuples(paths));
+
+        if (!(count == 0)) {
+            *return_tuples = NULL;
+            *return_tuples = pgr_alloc(count, (*return_tuples));
+
+            size_t sequence = 0;
+            int route_id = 0;
+            for (const auto &path : paths) {
+                if (path.size() > 0)
+                    path.get_pg_ksp_path(return_tuples, sequence, route_id);
+                ++route_id;
+            }
+        }
+        *return_count = count;
+
+        pgassert(*err_msg == NULL);
+        *log_msg = log.str().empty()?
+            *log_msg :
+            pgr_msg(log.str().c_str());
+        *notice_msg = notice.str().empty()?
+            *notice_msg :
+            pgr_msg(notice.str().c_str());
+    } catch (AssertFailedException &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch (std::exception &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch(...) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << "Caught unknown exception!";
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    }
+}
diff --git a/src/ksp/src/ksp.c b/src/ksp/src/ksp.c
deleted file mode 100644
index 7e14334..0000000
--- a/src/ksp/src/ksp.c
+++ /dev/null
@@ -1,193 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: ksp.c
-
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-vicky_vergara at hotmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "c_common/postgres_connection.h"
-
-#include "c_common/debug_macro.h"
-#include "c_common/e_report.h"
-#include "c_common/time_msg.h"
-
-#include "c_common/edges_input.h"
-
-#include "drivers/yen/ksp_driver.h"
-
-PGDLLEXPORT Datum kshortest_path(PG_FUNCTION_ARGS);
-PG_FUNCTION_INFO_V1(kshortest_path);
-
-static
-void compute(
-        char* edges_sql,
-        int64_t start_vertex,
-        int64_t end_vertex,
-        int k,
-        bool directed,
-        bool heap_paths,
-        General_path_element_t **ksp_path, size_t *path_count) {
-    pgr_SPI_connect();
-
-    PGR_DBG("Load data");
-    pgr_edge_t *edges = NULL;
-    size_t total_edges = 0;
-
-
-    if (start_vertex == end_vertex) {
-        pgr_SPI_finish();
-        return;
-    }
-
-    pgr_get_edges(edges_sql, &edges, &total_edges);
-    PGR_DBG("Total %ld edges in query:", total_edges);
-
-    if (total_edges == 0) {
-        PGR_DBG("No edges found");
-        pgr_SPI_finish();
-        return;
-    }
-
-
-    PGR_DBG("Calling do_pgr_ksp\n");
-    PGR_DBG("heap_paths = %i\n", heap_paths);
-
-    clock_t start_t = clock();
-    char *log_msg = NULL;
-    char *notice_msg = NULL;
-    char *err_msg = NULL;
-
-    do_pgr_ksp(
-            edges,
-            total_edges,
-            start_vertex,
-            end_vertex,
-            k,
-            directed,
-            heap_paths,
-            ksp_path,
-            path_count,
-            &log_msg,
-            &notice_msg,
-            &err_msg);
-    time_msg(" processing KSP", start_t, clock());
-    PGR_DBG("total tuples found %ld\n", *path_count);
-
-    if (err_msg) {
-        if (*ksp_path) free(*ksp_path);
-    }
-    pgr_global_report(log_msg, notice_msg, err_msg);
-
-    pfree(edges);
-    pgr_SPI_finish();
-}
-
-
-PGDLLEXPORT Datum
-kshortest_path(PG_FUNCTION_ARGS) {
-    FuncCallContext     *funcctx;
-    TupleDesc            tuple_desc;
-    General_path_element_t      *path = NULL;
-    size_t result_count = 0;
-
-    /* stuff done only on the first call of the function */
-    if (SRF_IS_FIRSTCALL()) {
-        MemoryContext   oldcontext;
-        funcctx = SRF_FIRSTCALL_INIT();
-        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
-
-
-        /*
-           CREATE OR REPLACE FUNCTION _pgr_ksp(
-           sql text,
-           start_vid bigint,
-           end_vid bigint,
-           k integer,
-           directed boolean,
-           heap_paths boolean
-           */
-        PGR_DBG("Calling process");
-        compute(
-                text_to_cstring(PG_GETARG_TEXT_P(0)), /* SQL  */
-                PG_GETARG_INT64(1),   /* start_vid */
-                PG_GETARG_INT64(2),   /* end_vid */
-                PG_GETARG_INT32(3),   /* k */
-                PG_GETARG_BOOL(4),    /* directed */
-                PG_GETARG_BOOL(5),    /* heap_paths */
-                &path,
-                &result_count);
-        PGR_DBG("Total number of tuples to be returned %ld \n", result_count);
-
-        /*                                                                    */
-        /**********************************************************************/
-
-#if PGSQL_VERSION > 95
-        funcctx->max_calls = result_count;
-#else
-        funcctx->max_calls = (uint32_t)result_count;
-#endif
-        funcctx->user_fctx = path;
-        if (get_call_result_type(fcinfo, NULL, &tuple_desc) != TYPEFUNC_COMPOSITE)
-            ereport(ERROR,
-                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                     errmsg("function returning record called in context "
-                         "that cannot accept type record\n")));
-
-        funcctx->tuple_desc = tuple_desc;
-        MemoryContextSwitchTo(oldcontext);
-    }
-
-
-    funcctx = SRF_PERCALL_SETUP();
-
-
-    tuple_desc = funcctx->tuple_desc;
-    path = (General_path_element_t*) funcctx->user_fctx;
-
-    if (funcctx->call_cntr < funcctx->max_calls) {   /* do when there is more left to send */
-        HeapTuple    tuple;
-        Datum        result;
-        Datum *values;
-        bool* nulls;
-
-        values = palloc(7 * sizeof(Datum));
-        nulls = palloc(7 * sizeof(bool));
-
-
-        size_t i;
-        for (i = 0; i < 7; ++i) {
-            nulls[i] = false;
-        }
-
-        values[0] = Int32GetDatum(funcctx->call_cntr + 1);
-        values[1] = Int32GetDatum(path[funcctx->call_cntr].start_id + 1);
-        values[2] = Int32GetDatum(path[funcctx->call_cntr].seq);
-        values[3] = Int64GetDatum(path[funcctx->call_cntr].node);
-        values[4] = Int64GetDatum(path[funcctx->call_cntr].edge);
-        values[5] = Float8GetDatum(path[funcctx->call_cntr].cost);
-        values[6] = Float8GetDatum(path[funcctx->call_cntr].agg_cost);
-
-        tuple = heap_form_tuple(tuple_desc, values, nulls);
-        result = HeapTupleGetDatum(tuple);
-        SRF_RETURN_NEXT(funcctx, result);
-    } else {   /* do when there is no more left */
-        SRF_RETURN_DONE(funcctx);
-    }
-}
diff --git a/src/ksp/src/ksp_driver.cpp b/src/ksp/src/ksp_driver.cpp
deleted file mode 100644
index 38c146d..0000000
--- a/src/ksp/src/ksp_driver.cpp
+++ /dev/null
@@ -1,126 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: ksp_driver.cpp
-
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-vicky_vergara at hotmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-
-#include "drivers/yen/ksp_driver.h"
-
-#include <sstream>
-#include <deque>
-#include <vector>
-
-#include "yen/pgr_ksp.hpp"
-
-#include "cpp_common/pgr_alloc.hpp"
-#include "cpp_common/pgr_assert.h"
-
-#include "cpp_common/pgr_base_graph.hpp"
-
-
-
-void  do_pgr_ksp(
-        pgr_edge_t *data_edges,
-        size_t total_edges,
-        int64_t  start_vid,
-        int64_t  end_vid,
-        int k,
-        bool directed,
-        bool heap_paths,
-        General_path_element_t **return_tuples,
-        size_t *return_count,
-        char ** log_msg,
-        char ** notice_msg,
-        char ** err_msg) {
-    std::ostringstream err;
-    std::ostringstream log;
-    std::ostringstream notice;
-    try {
-        pgassert(!(*log_msg));
-        pgassert(!(*notice_msg));
-        pgassert(!(*err_msg));
-        pgassert(!(*return_tuples));
-        pgassert(*return_count == 0);
-        pgassert(total_edges != 0);
-        log << "buuu";
-
-        graphType gType = directed? DIRECTED: UNDIRECTED;
-
-        std::deque< Path > paths;
-
-        if (directed) {
-            pgrouting::DirectedGraph digraph(gType);
-            Pgr_ksp< pgrouting::DirectedGraph > fn_yen;
-            digraph.insert_edges(data_edges, total_edges);
-            paths = fn_yen.Yen(digraph, start_vid, end_vid, k, heap_paths);
-        } else {
-            pgrouting::UndirectedGraph undigraph(gType);
-            Pgr_ksp< pgrouting::UndirectedGraph > fn_yen;
-            undigraph.insert_edges(data_edges, total_edges);
-            paths = fn_yen.Yen(undigraph, start_vid, end_vid, k, heap_paths);
-        }
-
-
-        auto count(count_tuples(paths));
-
-        if (!(count == 0)) {
-            // get the space required to store all the paths
-            *return_tuples = NULL;
-            *return_tuples = pgr_alloc(count, (*return_tuples));
-
-            size_t sequence = 0;
-            int route_id = 0;
-            for (const auto &path : paths) {
-                if (path.size() > 0)
-                    path.get_pg_ksp_path(return_tuples, sequence, route_id);
-                ++route_id;
-            }
-        }
-        *return_count = count;
-
-        pgassert(*err_msg == NULL);
-        *log_msg = log.str().empty()?
-            nullptr :
-            strdup(log.str().c_str());
-        *notice_msg = notice.str().empty()?
-            nullptr :
-            strdup(notice.str().c_str());
-    } catch (AssertFailedException &except) {
-        if (*return_tuples) free(*return_tuples);
-        (*return_count) = 0;
-        err << except.what();
-        *err_msg = strdup(err.str().c_str());
-        *log_msg = strdup(log.str().c_str());
-    } catch (std::exception& except) {
-        if (*return_tuples) free(*return_tuples);
-        (*return_count) = 0;
-        err << except.what();
-        *err_msg = strdup(err.str().c_str());
-        *log_msg = strdup(log.str().c_str());
-    } catch(...) {
-        if (*return_tuples) free(*return_tuples);
-        (*return_count) = 0;
-        err << "Caught unknown exception!";
-        *err_msg = strdup(err.str().c_str());
-        *log_msg = strdup(log.str().c_str());
-    }
-}
diff --git a/src/ksp/src/withPoints_ksp.c b/src/ksp/src/withPoints_ksp.c
deleted file mode 100644
index f5579ff..0000000
--- a/src/ksp/src/withPoints_ksp.c
+++ /dev/null
@@ -1,267 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: withPoints_ksp.c
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer: 
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-Mail: 
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "c_common/postgres_connection.h"
-#include "utils/array.h"
-
-#include "c_common/time_msg.h"
-#include "c_common/e_report.h"
-
-#include "c_common/edges_input.h"
-#include "c_common/points_input.h"
-
-#include "drivers/withPoints/get_new_queries.h"
-#include "drivers/yen/withPoints_ksp_driver.h"
-#include "c_common/debug_macro.h"
-
-PGDLLEXPORT Datum withPoints_ksp(PG_FUNCTION_ARGS);
-PG_FUNCTION_INFO_V1(withPoints_ksp);
-
-
-/*******************************************************************************/
-/*                          MODIFY AS NEEDED                                   */
-static
-void
-process(
-        char* edges_sql,
-        char* points_sql,
-        int64_t start_pid,
-        int64_t end_pid,
-        int k,
-
-        bool directed,
-        bool heap_paths,
-        char *driving_side,
-        bool details,
-
-        General_path_element_t **result_tuples,
-        size_t *result_count) {
-
-    driving_side[0] = (char) tolower(driving_side[0]);
-    PGR_DBG("driving side:%c",driving_side[0]);
-    if (! ((driving_side[0] == 'r')
-                || (driving_side[0] == 'l'))) {
-        driving_side[0] = 'b'; 
-    }
-
-    pgr_SPI_connect();
-
-    Point_on_edge_t *points = NULL;
-    size_t total_points = 0;
-    pgr_get_points(points_sql, &points, &total_points);
-
-    char *edges_of_points_query = NULL;
-    char *edges_no_points_query = NULL;
-    get_new_queries(
-            edges_sql, points_sql,
-            &edges_of_points_query,
-            &edges_no_points_query);
-
-
-    pgr_edge_t *edges_of_points = NULL;
-    size_t total_edges_of_points = 0;
-    pgr_get_edges(edges_of_points_query, &edges_of_points, &total_edges_of_points);
-
-    pgr_edge_t *edges = NULL;
-    size_t total_edges = 0;
-    pgr_get_edges(edges_no_points_query, &edges, &total_edges);
-
-    PGR_DBG("freeing allocated memory not used anymore");
-    free(edges_of_points_query);
-    free(edges_no_points_query);
-
-    if ((total_edges + total_edges_of_points) == 0) {
-        PGR_DBG("No edges found");
-        (*result_count) = 0;
-        (*result_tuples) = NULL;
-        pgr_SPI_finish();
-        return;
-    }
-
-    PGR_DBG("Starting processing");
-    clock_t start_t = clock();
-
-    char *log_msg = NULL;
-    char *notice_msg = NULL;
-    char *err_msg = NULL;
-    do_pgr_withPointsKsp(
-            edges,
-            total_edges,
-            points,
-            total_points,
-            edges_of_points,
-            total_edges_of_points,
-            start_pid,
-            end_pid,
-            k,
-
-            directed,
-            heap_paths,
-            driving_side[0],
-            details,
-
-            result_tuples,
-            result_count,
-
-            &log_msg,
-            &notice_msg,
-            &err_msg);
-    time_msg(" processing withPointsKSP", start_t, clock());
-
-    PGR_DBG("Returned message = %s\n", err_msg);
-
-    if (err_msg) {
-        if (*result_tuples) free(*result_tuples);
-    }
-    pgr_global_report(log_msg, notice_msg, err_msg);
-
-    pfree(edges);
-    pfree(edges_of_points);
-    pfree(points);
-
-    pgr_SPI_finish();
-
-}
-
-/*                                                                             */
-/*******************************************************************************/
-
-
-
-PGDLLEXPORT Datum withPoints_ksp(PG_FUNCTION_ARGS) {
-    FuncCallContext     *funcctx;
-    TupleDesc            tuple_desc;
-
-    /*******************************************************************************/
-    /*                          MODIFY AS NEEDED                                   */
-    /*                                                                             */
-    General_path_element_t  *result_tuples = 0;
-    size_t result_count = 0;
-    /*                                                                             */
-    /*******************************************************************************/
-
-    if (SRF_IS_FIRSTCALL()) {
-        MemoryContext   oldcontext;
-        funcctx = SRF_FIRSTCALL_INIT();
-        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
-
-
-        /*******************************************************************************/
-        /*                          MODIFY AS NEEDED                                   */
-        // CREATE OR REPLACE FUNCTION pgr_withPoint(
-        // edges_sql TEXT,
-        // points_sql TEXT,
-        // start_pid INTEGER,
-        // end_pid BIGINT,
-        // k BIGINT,
-        //
-        // directed BOOLEAN -- DEFAULT true,
-        // heap_paths BOOLEAN -- DEFAULT false,
-        // driving_side CHAR -- DEFAULT 'b',
-        // details BOOLEAN -- DEFAULT false,
-
-        PGR_DBG("Calling process");
-        PGR_DBG("initial driving side:%s", text_to_cstring(PG_GETARG_TEXT_P(7)));
-        process(
-                text_to_cstring(PG_GETARG_TEXT_P(0)),
-                text_to_cstring(PG_GETARG_TEXT_P(1)),
-                PG_GETARG_INT64(2),
-                PG_GETARG_INT64(3),
-                PG_GETARG_INT32(4),
-                PG_GETARG_BOOL(5),
-                PG_GETARG_BOOL(6),
-                text_to_cstring(PG_GETARG_TEXT_P(7)),
-                PG_GETARG_BOOL(8),
-                &result_tuples,
-                &result_count);
-
-        /*                                                                             */
-        /*******************************************************************************/
-
-#if PGSQL_VERSION > 95
-        funcctx->max_calls = result_count;
-#else
-        funcctx->max_calls = (uint32_t)result_count;
-#endif
-        funcctx->user_fctx = result_tuples;
-        if (get_call_result_type(fcinfo, NULL, &tuple_desc) != TYPEFUNC_COMPOSITE)
-            ereport(ERROR,
-                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                     errmsg("function returning record called in context "
-                         "that cannot accept type record")));
-
-        funcctx->tuple_desc = tuple_desc;
-        MemoryContextSwitchTo(oldcontext);
-    }
-
-    funcctx = SRF_PERCALL_SETUP();
-    tuple_desc = funcctx->tuple_desc;
-    result_tuples = (General_path_element_t*) funcctx->user_fctx;
-
-    if (funcctx->call_cntr < funcctx->max_calls) {
-        HeapTuple    tuple;
-        Datum        result;
-        Datum        *values;
-        bool*        nulls;
-
-        /*******************************************************************************/
-        /*                          MODIFY AS NEEDED                                   */
-        values = palloc(7 * sizeof(Datum));
-        nulls = palloc(7 * sizeof(bool));
-
-        size_t i;
-        for(i = 0; i < 7; ++i) {
-            nulls[i] = false;
-        }
-
-        /*
-           OUT seq INTEGER, OUT path_id INTEGER, OUT path_seq INTEGER,
-           OUT node BIGINT, OUT edge BIGINT,
-           OUT cost FLOAT, OUT agg_cost FLOAT)
-           */
-
-
-        // postgres starts counting from 1
-        values[0] = Int32GetDatum(funcctx->call_cntr + 1);
-        values[1] = Int32GetDatum((int)(result_tuples[funcctx->call_cntr].start_id + 1));
-        values[2] = Int32GetDatum(result_tuples[funcctx->call_cntr].seq);
-        values[3] = Int64GetDatum(result_tuples[funcctx->call_cntr].node);
-        values[4] = Int64GetDatum(result_tuples[funcctx->call_cntr].edge);
-        values[5] = Float8GetDatum(result_tuples[funcctx->call_cntr].cost);
-        values[6] = Float8GetDatum(result_tuples[funcctx->call_cntr].agg_cost);
-        /*******************************************************************************/
-
-        tuple =heap_form_tuple(tuple_desc, values, nulls);
-        result = HeapTupleGetDatum(tuple);
-        SRF_RETURN_NEXT(funcctx, result);
-    } else {
-        SRF_RETURN_DONE(funcctx);
-    }
-}
-
diff --git a/src/ksp/src/withPoints_ksp_driver.cpp b/src/ksp/src/withPoints_ksp_driver.cpp
deleted file mode 100644
index a5acb9a..0000000
--- a/src/ksp/src/withPoints_ksp_driver.cpp
+++ /dev/null
@@ -1,207 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: withPoints_driver.cpp
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer: 
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-Mail: 
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "drivers/yen/withPoints_ksp_driver.h"
-
-
-#include <sstream>
-#include <deque>
-#include <vector>
-
-#include "yen/pgr_ksp.hpp"
-
-#include "./../../withPoints/src/pgr_withPoints.hpp"
-#include "cpp_common/pgr_alloc.hpp"
-#include "cpp_common/pgr_assert.h"
-
-
-// CREATE OR REPLACE FUNCTION pgr_withPointsKSP(
-// edges_sql TEXT,
-// points_sql TEXT,
-// start_pid BIGINT,
-// end_pid BIGINT,
-// directed BOOLEAN DEFAULT true
-
-
-int
-do_pgr_withPointsKsp(
-        pgr_edge_t  *edges,           size_t total_edges,
-        Point_on_edge_t  *points_p,   size_t total_points,
-        pgr_edge_t  *edges_of_points, size_t total_edges_of_points,
-        int64_t start_pid,
-        int64_t end_pid,
-        int k,
-        bool directed,
-        bool heap_paths,
-        char driving_side,
-        bool details,
-        General_path_element_t **return_tuples,
-        size_t *return_count,
-        char ** log_msg,
-        char ** notice_msg,
-        char ** err_msg) {
-
-    std::ostringstream log;
-    std::ostringstream err;
-    std::ostringstream notice;
-    try {
-        pgassert(!(*log_msg));
-        pgassert(!(*notice_msg));
-        pgassert(!(*err_msg));
-        pgassert(!(*return_tuples));
-        pgassert(*return_count == 0);
-        pgassert(total_edges != 0);
-
-        log << "entering do_pgr_withPointsKsp\n";
-
-        std::vector< Point_on_edge_t >
-            points(points_p, points_p + total_points);
-
-        log << "total points" << points.size() << "\n";
-
-        auto errcode = check_points(points, log);
-        if (errcode) {
-            *log_msg = strdup(log.str().c_str());
-            err << "Unexpected point(s) with same pid but different edge/fraction/side combination found.";
-            *err_msg = strdup(err.str().c_str());
-            return -1;
-        }
-
-        std::vector< pgr_edge_t >
-            edges_to_modify(edges_of_points, edges_of_points + total_edges_of_points);
-
-        std::vector< pgr_edge_t > new_edges;
-
-        create_new_edges(
-                points,
-                edges_to_modify,
-                driving_side,
-                new_edges,
-                log);
-
-
-
-        int64_t start_vid(start_pid);
-        int64_t end_vid(end_pid);
-
-        log << "start_pid" << start_pid << "\n";
-        log << "end_pid" << end_pid << "\n";
-        log << "driving_side" << driving_side << "\n";
-        log << "start_vid" << start_vid << "\n";
-        log << "end_vid" << end_vid << "\n";
-        graphType gType = directed? DIRECTED: UNDIRECTED;
-
-        std::deque< Path > paths;
-
-        auto vertices(pgrouting::extract_vertices(edges, total_edges));
-        vertices = pgrouting::extract_vertices(vertices, new_edges);
-
-        log << "extracted vertices: ";
-        for (const auto v : vertices) {
-            log << v.id << ", ";
-        }
-        log << "\n";
-
-        if (directed) {
-            log << "Working with directed Graph\n";
-            pgrouting::DirectedGraph digraph(vertices, gType);
-            digraph.insert_edges(edges, total_edges);
-            log << "graph after inserting edges\n";
-            log << digraph << "\n";
-
-            digraph.insert_edges(new_edges);
-            log << "graph after inserting new edges\n";
-            log << digraph << "\n";
-
-            Pgr_ksp< pgrouting::DirectedGraph  > fn_yen;
-            paths = fn_yen.Yen(digraph, start_vid, end_vid, k, heap_paths);
-            // pgassert(true==false);
-        } else {
-            log << "Working with undirected Graph\n";
-            pgrouting::UndirectedGraph undigraph(gType);
-            undigraph.insert_edges(edges, total_edges);
-            undigraph.insert_edges(new_edges);
-            Pgr_ksp< pgrouting::UndirectedGraph > fn_yen;
-            paths = fn_yen.Yen(undigraph, start_vid, end_vid, k, heap_paths);
-        }
-
-
-        if (!details) {
-            for (auto &path : paths) {
-                eliminate_details(path, edges_to_modify);
-            }
-        }
-
-        auto count(count_tuples(paths));
-
-        if (count == 0) {
-            return 0;
-        }
-
-
-        *return_tuples = NULL;
-        *return_tuples = pgr_alloc(count, (*return_tuples));
-
-        size_t sequence = 0;
-        int route_id = 0;
-        for (const auto &path : paths) {
-            if (path.size() > 0)
-                path.get_pg_ksp_path(return_tuples, sequence, route_id);
-            ++route_id;
-        }
-
-        if (count != sequence) {
-            return 2;
-        }
-        (*return_count) = sequence;
-
-
-        *log_msg = strdup(log.str().c_str());
-        return 0;
-    } catch (AssertFailedException &except) {
-        if (*return_tuples) free(*return_tuples);
-        (*return_count) = 0;
-        err << except.what();
-        *err_msg = strdup(err.str().c_str());
-        *log_msg = strdup(log.str().c_str());
-    } catch (std::exception &except) {
-        if (*return_tuples) free(*return_tuples);
-        (*return_count) = 0;
-        err << except.what();
-        *err_msg = strdup(err.str().c_str());
-        *log_msg = strdup(log.str().c_str());
-    } catch(...) {
-        if (*return_tuples) free(*return_tuples);
-        (*return_count) = 0;
-        err << "Caught unknown exception!";
-        *err_msg = strdup(err.str().c_str());
-        *log_msg = strdup(log.str().c_str());
-    }
-    return 1000;
-}
diff --git a/src/ksp/test/doc-ksp.result b/src/ksp/test/doc-ksp.result
deleted file mode 100644
index 3488172..0000000
--- a/src/ksp/test/doc-ksp.result
+++ /dev/null
@@ -1,274 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
---q1
-SELECT * FROM pgr_KSP(
-     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-      2, 12, 2,
-      directed:=true   
-   );
- seq | path_id | path_seq | node | edge | cost | agg_cost 
------+---------+----------+------+------+------+----------
-   1 |       1 |        1 |    2 |    4 |    1 |        0
-   2 |       1 |        2 |    5 |    8 |    1 |        1
-   3 |       1 |        3 |    6 |    9 |    1 |        2
-   4 |       1 |        4 |    9 |   15 |    1 |        3
-   5 |       1 |        5 |   12 |   -1 |    0 |        4
-   6 |       2 |        1 |    2 |    4 |    1 |        0
-   7 |       2 |        2 |    5 |    8 |    1 |        1
-   8 |       2 |        3 |    6 |   11 |    1 |        2
-   9 |       2 |        4 |   11 |   13 |    1 |        3
-  10 |       2 |        5 |   12 |   -1 |    0 |        4
-(10 rows)
-
-SELECT * FROM pgr_KSP(
-     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-      2, 12, 2
-   );
- seq | path_id | path_seq | node | edge | cost | agg_cost 
------+---------+----------+------+------+------+----------
-   1 |       1 |        1 |    2 |    4 |    1 |        0
-   2 |       1 |        2 |    5 |    8 |    1 |        1
-   3 |       1 |        3 |    6 |    9 |    1 |        2
-   4 |       1 |        4 |    9 |   15 |    1 |        3
-   5 |       1 |        5 |   12 |   -1 |    0 |        4
-   6 |       2 |        1 |    2 |    4 |    1 |        0
-   7 |       2 |        2 |    5 |    8 |    1 |        1
-   8 |       2 |        3 |    6 |   11 |    1 |        2
-   9 |       2 |        4 |   11 |   13 |    1 |        3
-  10 |       2 |        5 |   12 |   -1 |    0 |        4
-(10 rows)
-
---q2
-SELECT * FROM pgr_KSP(
-     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-      2, 12, 2
-   );
- seq | path_id | path_seq | node | edge | cost | agg_cost 
------+---------+----------+------+------+------+----------
-   1 |       1 |        1 |    2 |    4 |    1 |        0
-   2 |       1 |        2 |    5 |    8 |    1 |        1
-   3 |       1 |        3 |    6 |    9 |    1 |        2
-   4 |       1 |        4 |    9 |   15 |    1 |        3
-   5 |       1 |        5 |   12 |   -1 |    0 |        4
-   6 |       2 |        1 |    2 |    4 |    1 |        0
-   7 |       2 |        2 |    5 |    8 |    1 |        1
-   8 |       2 |        3 |    6 |   11 |    1 |        2
-   9 |       2 |        4 |   11 |   13 |    1 |        3
-  10 |       2 |        5 |   12 |   -1 |    0 |        4
-(10 rows)
-
-SELECT * FROM pgr_KSP(
-     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-      2, 12, 2, heap_paths:=true
-   );
- seq | path_id | path_seq | node | edge | cost | agg_cost 
------+---------+----------+------+------+------+----------
-   1 |       1 |        1 |    2 |    4 |    1 |        0
-   2 |       1 |        2 |    5 |    8 |    1 |        1
-   3 |       1 |        3 |    6 |    9 |    1 |        2
-   4 |       1 |        4 |    9 |   15 |    1 |        3
-   5 |       1 |        5 |   12 |   -1 |    0 |        4
-   6 |       2 |        1 |    2 |    4 |    1 |        0
-   7 |       2 |        2 |    5 |    8 |    1 |        1
-   8 |       2 |        3 |    6 |   11 |    1 |        2
-   9 |       2 |        4 |   11 |   13 |    1 |        3
-  10 |       2 |        5 |   12 |   -1 |    0 |        4
-  11 |       3 |        1 |    2 |    4 |    1 |        0
-  12 |       3 |        2 |    5 |   10 |    1 |        1
-  13 |       3 |        3 |   10 |   12 |    1 |        2
-  14 |       3 |        4 |   11 |   13 |    1 |        3
-  15 |       3 |        5 |   12 |   -1 |    0 |        4
-(15 rows)
-
-SELECT * FROM pgr_KSP(
-     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-      2, 12, 2, true, true
-   );
- seq | path_id | path_seq | node | edge | cost | agg_cost 
------+---------+----------+------+------+------+----------
-   1 |       1 |        1 |    2 |    4 |    1 |        0
-   2 |       1 |        2 |    5 |    8 |    1 |        1
-   3 |       1 |        3 |    6 |    9 |    1 |        2
-   4 |       1 |        4 |    9 |   15 |    1 |        3
-   5 |       1 |        5 |   12 |   -1 |    0 |        4
-   6 |       2 |        1 |    2 |    4 |    1 |        0
-   7 |       2 |        2 |    5 |    8 |    1 |        1
-   8 |       2 |        3 |    6 |   11 |    1 |        2
-   9 |       2 |        4 |   11 |   13 |    1 |        3
-  10 |       2 |        5 |   12 |   -1 |    0 |        4
-  11 |       3 |        1 |    2 |    4 |    1 |        0
-  12 |       3 |        2 |    5 |   10 |    1 |        1
-  13 |       3 |        3 |   10 |   12 |    1 |        2
-  14 |       3 |        4 |   11 |   13 |    1 |        3
-  15 |       3 |        5 |   12 |   -1 |    0 |        4
-(15 rows)
-
---q3
-SELECT * FROM pgr_KSP(
-     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-      2, 12, 2, directed:=false
-   );
- seq | path_id | path_seq | node | edge | cost | agg_cost 
------+---------+----------+------+------+------+----------
-   1 |       1 |        1 |    2 |    2 |    1 |        0
-   2 |       1 |        2 |    3 |    3 |    1 |        1
-   3 |       1 |        3 |    4 |   16 |    1 |        2
-   4 |       1 |        4 |    9 |   15 |    1 |        3
-   5 |       1 |        5 |   12 |   -1 |    0 |        4
-   6 |       2 |        1 |    2 |    4 |    1 |        0
-   7 |       2 |        2 |    5 |    8 |    1 |        1
-   8 |       2 |        3 |    6 |   11 |    1 |        2
-   9 |       2 |        4 |   11 |   13 |    1 |        3
-  10 |       2 |        5 |   12 |   -1 |    0 |        4
-(10 rows)
-
-SELECT * FROM pgr_KSP(
-     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-      2, 12, 2, false, true
-   );
- seq | path_id | path_seq | node | edge | cost | agg_cost 
------+---------+----------+------+------+------+----------
-   1 |       1 |        1 |    2 |    2 |    1 |        0
-   2 |       1 |        2 |    3 |    3 |    1 |        1
-   3 |       1 |        3 |    4 |   16 |    1 |        2
-   4 |       1 |        4 |    9 |   15 |    1 |        3
-   5 |       1 |        5 |   12 |   -1 |    0 |        4
-   6 |       2 |        1 |    2 |    4 |    1 |        0
-   7 |       2 |        2 |    5 |    8 |    1 |        1
-   8 |       2 |        3 |    6 |   11 |    1 |        2
-   9 |       2 |        4 |   11 |   13 |    1 |        3
-  10 |       2 |        5 |   12 |   -1 |    0 |        4
-  11 |       3 |        1 |    2 |    4 |    1 |        0
-  12 |       3 |        2 |    5 |   10 |    1 |        1
-  13 |       3 |        3 |   10 |   12 |    1 |        2
-  14 |       3 |        4 |   11 |   13 |    1 |        3
-  15 |       3 |        5 |   12 |   -1 |    0 |        4
-  16 |       4 |        1 |    2 |    4 |    1 |        0
-  17 |       4 |        2 |    5 |   10 |    1 |        1
-  18 |       4 |        3 |   10 |   12 |    1 |        2
-  19 |       4 |        4 |   11 |   11 |    1 |        3
-  20 |       4 |        5 |    6 |    9 |    1 |        4
-  21 |       4 |        6 |    9 |   15 |    1 |        5
-  22 |       4 |        7 |   12 |   -1 |    0 |        6
-(22 rows)
-
---q4
-SELECT  * FROM pgr_KSP(
-     'SELECT id, source, target, cost FROM edge_table',
-      2, 3, 2
-   );
- seq | path_id | path_seq | node | edge | cost | agg_cost 
------+---------+----------+------+------+------+----------
-(0 rows)
-
-SELECT  * FROM pgr_KSP(
-     'SELECT id, source, target, cost FROM edge_table',
-      2, 12, 2
-   );
- seq | path_id | path_seq | node | edge | cost | agg_cost 
------+---------+----------+------+------+------+----------
-   1 |       1 |        1 |    2 |    4 |    1 |        0
-   2 |       1 |        2 |    5 |    8 |    1 |        1
-   3 |       1 |        3 |    6 |    9 |    1 |        2
-   4 |       1 |        4 |    9 |   15 |    1 |        3
-   5 |       1 |        5 |   12 |   -1 |    0 |        4
-   6 |       2 |        1 |    2 |    4 |    1 |        0
-   7 |       2 |        2 |    5 |    8 |    1 |        1
-   8 |       2 |        3 |    6 |   11 |    1 |        2
-   9 |       2 |        4 |   11 |   13 |    1 |        3
-  10 |       2 |        5 |   12 |   -1 |    0 |        4
-(10 rows)
-
-SELECT   * FROM pgr_KSP(
-     'SELECT id, source, target, cost FROM edge_table',
-      2, 12, 2, heap_paths:=true
-   );
- seq | path_id | path_seq | node | edge | cost | agg_cost 
------+---------+----------+------+------+------+----------
-   1 |       1 |        1 |    2 |    4 |    1 |        0
-   2 |       1 |        2 |    5 |    8 |    1 |        1
-   3 |       1 |        3 |    6 |    9 |    1 |        2
-   4 |       1 |        4 |    9 |   15 |    1 |        3
-   5 |       1 |        5 |   12 |   -1 |    0 |        4
-   6 |       2 |        1 |    2 |    4 |    1 |        0
-   7 |       2 |        2 |    5 |    8 |    1 |        1
-   8 |       2 |        3 |    6 |   11 |    1 |        2
-   9 |       2 |        4 |   11 |   13 |    1 |        3
-  10 |       2 |        5 |   12 |   -1 |    0 |        4
-  11 |       3 |        1 |    2 |    4 |    1 |        0
-  12 |       3 |        2 |    5 |   10 |    1 |        1
-  13 |       3 |        3 |   10 |   12 |    1 |        2
-  14 |       3 |        4 |   11 |   13 |    1 |        3
-  15 |       3 |        5 |   12 |   -1 |    0 |        4
-(15 rows)
-
-SELECT  * FROM pgr_KSP(
-     'SELECT id, source, target, cost FROM edge_table',
-      2, 12, 2, true, true
-   );
- seq | path_id | path_seq | node | edge | cost | agg_cost 
------+---------+----------+------+------+------+----------
-   1 |       1 |        1 |    2 |    4 |    1 |        0
-   2 |       1 |        2 |    5 |    8 |    1 |        1
-   3 |       1 |        3 |    6 |    9 |    1 |        2
-   4 |       1 |        4 |    9 |   15 |    1 |        3
-   5 |       1 |        5 |   12 |   -1 |    0 |        4
-   6 |       2 |        1 |    2 |    4 |    1 |        0
-   7 |       2 |        2 |    5 |    8 |    1 |        1
-   8 |       2 |        3 |    6 |   11 |    1 |        2
-   9 |       2 |        4 |   11 |   13 |    1 |        3
-  10 |       2 |        5 |   12 |   -1 |    0 |        4
-  11 |       3 |        1 |    2 |    4 |    1 |        0
-  12 |       3 |        2 |    5 |   10 |    1 |        1
-  13 |       3 |        3 |   10 |   12 |    1 |        2
-  14 |       3 |        4 |   11 |   13 |    1 |        3
-  15 |       3 |        5 |   12 |   -1 |    0 |        4
-(15 rows)
-
---q5
-SELECT  * FROM pgr_KSP(
-     'SELECT id, source, target, cost FROM edge_table',
-      2, 12, 2, directed:=false
-   );
- seq | path_id | path_seq | node | edge | cost | agg_cost 
------+---------+----------+------+------+------+----------
-   1 |       1 |        1 |    2 |    4 |    1 |        0
-   2 |       1 |        2 |    5 |    8 |    1 |        1
-   3 |       1 |        3 |    6 |    9 |    1 |        2
-   4 |       1 |        4 |    9 |   15 |    1 |        3
-   5 |       1 |        5 |   12 |   -1 |    0 |        4
-   6 |       2 |        1 |    2 |    4 |    1 |        0
-   7 |       2 |        2 |    5 |    8 |    1 |        1
-   8 |       2 |        3 |    6 |   11 |    1 |        2
-   9 |       2 |        4 |   11 |   13 |    1 |        3
-  10 |       2 |        5 |   12 |   -1 |    0 |        4
-(10 rows)
-
-SELECT  * FROM pgr_KSP(
-     'SELECT id, source, target, cost FROM edge_table',
-      2, 12, 2, directed:=false, heap_paths:=true
-   );
- seq | path_id | path_seq | node | edge | cost | agg_cost 
------+---------+----------+------+------+------+----------
-   1 |       1 |        1 |    2 |    4 |    1 |        0
-   2 |       1 |        2 |    5 |    8 |    1 |        1
-   3 |       1 |        3 |    6 |    9 |    1 |        2
-   4 |       1 |        4 |    9 |   15 |    1 |        3
-   5 |       1 |        5 |   12 |   -1 |    0 |        4
-   6 |       2 |        1 |    2 |    4 |    1 |        0
-   7 |       2 |        2 |    5 |    8 |    1 |        1
-   8 |       2 |        3 |    6 |   11 |    1 |        2
-   9 |       2 |        4 |   11 |   13 |    1 |        3
-  10 |       2 |        5 |   12 |   -1 |    0 |        4
-  11 |       3 |        1 |    2 |    4 |    1 |        0
-  12 |       3 |        2 |    5 |   10 |    1 |        1
-  13 |       3 |        3 |   10 |   12 |    1 |        2
-  14 |       3 |        4 |   11 |   13 |    1 |        3
-  15 |       3 |        5 |   12 |   -1 |    0 |        4
-(15 rows)
-
---q6
-ROLLBACK;
-ROLLBACK
diff --git a/src/ksp/test/doc-ksp.test.sql b/src/ksp/test/doc-ksp.test.sql
deleted file mode 100644
index 220db22..0000000
--- a/src/ksp/test/doc-ksp.test.sql
+++ /dev/null
@@ -1,87 +0,0 @@
---------------------------------------------------------------------------------
---              PGR_KSP V3
---------------------------------------------------------------------------------
-
-\echo --q1
-
-   SELECT * FROM pgr_KSP(
-     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-      2, 12, 2,
-      directed:=true   -- takes the new signature
-   );
-
-   SELECT * FROM pgr_KSP(
-     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-      2, 12, 2
-   );
-
-\echo --q2
-
-   SELECT * FROM pgr_KSP(
-     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-      2, 12, 2
-   );
-  
-
-   SELECT * FROM pgr_KSP(
-     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-      2, 12, 2, heap_paths:=true
-   );
-
-   SELECT * FROM pgr_KSP(
-     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-      2, 12, 2, true, true
-   );
-
-
-\echo --q3
-
-  SELECT * FROM pgr_KSP(
-     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-      2, 12, 2, directed:=false
-   );
-
-  SELECT * FROM pgr_KSP(
-     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-      2, 12, 2, false, true
-   );
-
-
-\echo --q4
-
-  SELECT  * FROM pgr_KSP(
-     'SELECT id, source, target, cost FROM edge_table',
-      2, 3, 2
-   );
-
-
-  SELECT  * FROM pgr_KSP(
-     'SELECT id, source, target, cost FROM edge_table',
-      2, 12, 2
-   );
-
-  SELECT   * FROM pgr_KSP(
-     'SELECT id, source, target, cost FROM edge_table',
-      2, 12, 2, heap_paths:=true
-   );
-
-  SELECT  * FROM pgr_KSP(
-     'SELECT id, source, target, cost FROM edge_table',
-      2, 12, 2, true, true
-   );
-
-
-\echo --q5
-
-  SELECT  * FROM pgr_KSP(
-     'SELECT id, source, target, cost FROM edge_table',
-      2, 12, 2, directed:=false
-   );
-  
-  SELECT  * FROM pgr_KSP(
-     'SELECT id, source, target, cost FROM edge_table',
-      2, 12, 2, directed:=false, heap_paths:=true
-   );
-
-
-\echo --q6
diff --git a/src/ksp/withPoints_ksp.c b/src/ksp/withPoints_ksp.c
new file mode 100644
index 0000000..4eb08dd
--- /dev/null
+++ b/src/ksp/withPoints_ksp.c
@@ -0,0 +1,261 @@
+/*PGR-GNU*****************************************************************
+File: withPoints_ksp.c
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer: 
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+Mail: 
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "c_common/postgres_connection.h"
+#include "utils/array.h"
+
+#include "c_common/time_msg.h"
+#include "c_common/e_report.h"
+
+#include "c_common/edges_input.h"
+#include "c_common/points_input.h"
+
+#include "drivers/withPoints/get_new_queries.h"
+#include "drivers/yen/withPoints_ksp_driver.h"
+#include "c_common/debug_macro.h"
+
+PGDLLEXPORT Datum withPoints_ksp(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(withPoints_ksp);
+
+
+static
+void
+process(
+        char* edges_sql,
+        char* points_sql,
+        int64_t start_pid,
+        int64_t end_pid,
+        int k,
+
+        bool directed,
+        bool heap_paths,
+        char *driving_side,
+        bool details,
+
+        General_path_element_t **result_tuples,
+        size_t *result_count) {
+    driving_side[0] = (char) tolower(driving_side[0]);
+    PGR_DBG("driving side:%c", driving_side[0]);
+    if (!((driving_side[0] == 'r')
+                || (driving_side[0] == 'l'))) {
+        driving_side[0] = 'b';
+    }
+
+    pgr_SPI_connect();
+
+    Point_on_edge_t *points = NULL;
+    size_t total_points = 0;
+    pgr_get_points(points_sql, &points, &total_points);
+
+    char *edges_of_points_query = NULL;
+    char *edges_no_points_query = NULL;
+    get_new_queries(
+            edges_sql, points_sql,
+            &edges_of_points_query,
+            &edges_no_points_query);
+
+
+    pgr_edge_t *edges_of_points = NULL;
+    size_t total_edges_of_points = 0;
+    pgr_get_edges(edges_of_points_query,
+            &edges_of_points,
+            &total_edges_of_points);
+
+    pgr_edge_t *edges = NULL;
+    size_t total_edges = 0;
+    pgr_get_edges(edges_no_points_query, &edges, &total_edges);
+
+    PGR_DBG("freeing allocated memory not used anymore");
+    pfree(edges_of_points_query);
+    pfree(edges_no_points_query);
+
+    if ((total_edges + total_edges_of_points) == 0) {
+        PGR_DBG("No edges found");
+        (*result_count) = 0;
+        (*result_tuples) = NULL;
+        pgr_SPI_finish();
+        return;
+    }
+
+    PGR_DBG("Starting processing");
+    clock_t start_t = clock();
+
+    char *log_msg = NULL;
+    char *notice_msg = NULL;
+    char *err_msg = NULL;
+    do_pgr_withPointsKsp(
+            edges,
+            total_edges,
+            points,
+            total_points,
+            edges_of_points,
+            total_edges_of_points,
+            start_pid,
+            end_pid,
+            k,
+
+            directed,
+            heap_paths,
+            driving_side[0],
+            details,
+
+            result_tuples,
+            result_count,
+
+            &log_msg,
+            &notice_msg,
+            &err_msg);
+    time_msg(" processing withPointsKSP", start_t, clock());
+
+    if (err_msg && (*result_tuples)) {
+        pfree(*result_tuples);
+        (*result_tuples) = NULL;
+        (*result_count) = 0;
+    }
+
+    pgr_global_report(log_msg, notice_msg, err_msg);
+
+    if (log_msg) pfree(log_msg);
+    if (notice_msg) pfree(notice_msg);
+    if (err_msg) pfree(err_msg);
+
+    pfree(edges);
+    pfree(edges_of_points);
+    pfree(points);
+
+    pgr_SPI_finish();
+}
+
+
+
+
+PGDLLEXPORT Datum withPoints_ksp(PG_FUNCTION_ARGS) {
+    FuncCallContext     *funcctx;
+    TupleDesc            tuple_desc;
+
+    General_path_element_t  *result_tuples = 0;
+    size_t result_count = 0;
+
+    if (SRF_IS_FIRSTCALL()) {
+        MemoryContext   oldcontext;
+        funcctx = SRF_FIRSTCALL_INIT();
+        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
+
+
+        /*
+           CREATE OR REPLACE FUNCTION pgr_withPoint(
+           edges_sql TEXT,
+           points_sql TEXT,
+           start_pid INTEGER,
+           end_pid BIGINT,
+           k BIGINT,
+
+           directed BOOLEAN -- DEFAULT true,
+           heap_paths BOOLEAN -- DEFAULT false,
+           driving_side CHAR -- DEFAULT 'b',
+           details BOOLEAN -- DEFAULT false
+        */
+
+        PGR_DBG("Calling process");
+        PGR_DBG("initial driving side:%s",
+                text_to_cstring(PG_GETARG_TEXT_P(7)));
+        process(
+                text_to_cstring(PG_GETARG_TEXT_P(0)),
+                text_to_cstring(PG_GETARG_TEXT_P(1)),
+                PG_GETARG_INT64(2),
+                PG_GETARG_INT64(3),
+                PG_GETARG_INT32(4),
+                PG_GETARG_BOOL(5),
+                PG_GETARG_BOOL(6),
+                text_to_cstring(PG_GETARG_TEXT_P(7)),
+                PG_GETARG_BOOL(8),
+                &result_tuples,
+                &result_count);
+
+
+#if PGSQL_VERSION > 95
+        funcctx->max_calls = result_count;
+#else
+        funcctx->max_calls = (uint32_t)result_count;
+#endif
+        funcctx->user_fctx = result_tuples;
+        if (get_call_result_type(fcinfo, NULL, &tuple_desc)
+                != TYPEFUNC_COMPOSITE)
+            ereport(ERROR,
+                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+                     errmsg("function returning record called in context "
+                         "that cannot accept type record")));
+
+        funcctx->tuple_desc = tuple_desc;
+        MemoryContextSwitchTo(oldcontext);
+    }
+
+    funcctx = SRF_PERCALL_SETUP();
+    tuple_desc = funcctx->tuple_desc;
+    result_tuples = (General_path_element_t*) funcctx->user_fctx;
+
+    if (funcctx->call_cntr < funcctx->max_calls) {
+        HeapTuple    tuple;
+        Datum        result;
+        Datum        *values;
+        bool*        nulls;
+
+        values = palloc(7 * sizeof(Datum));
+        nulls = palloc(7 * sizeof(bool));
+
+        size_t i;
+        for (i = 0; i < 7; ++i) {
+            nulls[i] = false;
+        }
+
+        /*
+           OUT seq INTEGER, OUT path_id INTEGER, OUT path_seq INTEGER,
+           OUT node BIGINT, OUT edge BIGINT,
+           OUT cost FLOAT, OUT agg_cost FLOAT)
+           */
+
+
+        // postgres starts counting from 1
+        values[0] = Int32GetDatum(funcctx->call_cntr + 1);
+        values[1] = Int32GetDatum((int)
+                (result_tuples[funcctx->call_cntr].start_id + 1));
+        values[2] = Int32GetDatum(result_tuples[funcctx->call_cntr].seq);
+        values[3] = Int64GetDatum(result_tuples[funcctx->call_cntr].node);
+        values[4] = Int64GetDatum(result_tuples[funcctx->call_cntr].edge);
+        values[5] = Float8GetDatum(result_tuples[funcctx->call_cntr].cost);
+        values[6] = Float8GetDatum(result_tuples[funcctx->call_cntr].agg_cost);
+
+        tuple = heap_form_tuple(tuple_desc, values, nulls);
+        result = HeapTupleGetDatum(tuple);
+        SRF_RETURN_NEXT(funcctx, result);
+    } else {
+        SRF_RETURN_DONE(funcctx);
+    }
+}
+
diff --git a/src/ksp/withPoints_ksp_driver.cpp b/src/ksp/withPoints_ksp_driver.cpp
new file mode 100644
index 0000000..4ccec52
--- /dev/null
+++ b/src/ksp/withPoints_ksp_driver.cpp
@@ -0,0 +1,202 @@
+/*PGR-GNU*****************************************************************
+File: withPoints_driver.cpp
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer: 
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+Mail: 
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "drivers/yen/withPoints_ksp_driver.h"
+
+
+#include <sstream>
+#include <deque>
+#include <vector>
+
+#include "yen/pgr_ksp.hpp"
+
+#include "withPoints/pgr_withPoints.hpp"
+#include "cpp_common/pgr_alloc.hpp"
+#include "cpp_common/pgr_assert.h"
+
+
+// CREATE OR REPLACE FUNCTION pgr_withPointsKSP(
+// edges_sql TEXT,
+// points_sql TEXT,
+// start_pid BIGINT,
+// end_pid BIGINT,
+// directed BOOLEAN DEFAULT true
+
+
+int
+do_pgr_withPointsKsp(
+        pgr_edge_t  *edges,           size_t total_edges,
+        Point_on_edge_t  *points_p,   size_t total_points,
+        pgr_edge_t  *edges_of_points, size_t total_edges_of_points,
+        int64_t start_pid,
+        int64_t end_pid,
+        int k,
+        bool directed,
+        bool heap_paths,
+        char driving_side,
+        bool details,
+        General_path_element_t **return_tuples,
+        size_t *return_count,
+        char ** log_msg,
+        char ** notice_msg,
+        char ** err_msg) {
+    std::ostringstream log;
+    std::ostringstream err;
+    std::ostringstream notice;
+    try {
+        pgassert(!(*log_msg));
+        pgassert(!(*notice_msg));
+        pgassert(!(*err_msg));
+        pgassert(!(*return_tuples));
+        pgassert(*return_count == 0);
+        pgassert(total_edges != 0);
+
+        pgrouting::Pg_points_graph pg_graph(
+                std::vector<Point_on_edge_t>(
+                    points_p,
+                    points_p + total_points),
+                std::vector< pgr_edge_t >(
+                    edges_of_points,
+                    edges_of_points + total_edges_of_points),
+                true,
+                driving_side,
+                directed);
+
+        if (pg_graph.has_error()) {
+            log << pg_graph.get_log();
+            err << pg_graph.get_error();
+            *log_msg = pgr_msg(log.str().c_str());
+            *err_msg = pgr_msg(err.str().c_str());
+            return -1;
+        }
+
+
+        int64_t start_vid(start_pid);
+        int64_t end_vid(end_pid);
+
+        log << "start_pid" << start_pid << "\n";
+        log << "end_pid" << end_pid << "\n";
+        log << "driving_side" << driving_side << "\n";
+        log << "start_vid" << start_vid << "\n";
+        log << "end_vid" << end_vid << "\n";
+        graphType gType = directed? DIRECTED: UNDIRECTED;
+
+        std::deque< Path > paths;
+
+        auto vertices(pgrouting::extract_vertices(edges, total_edges));
+        vertices = pgrouting::extract_vertices(vertices, pg_graph.new_edges());
+
+        log << "extracted vertices: ";
+        for (const auto v : vertices) {
+            log << v.id << ", ";
+        }
+        log << "\n";
+
+        if (directed) {
+            log << "Working with directed Graph\n";
+            pgrouting::DirectedGraph digraph(vertices, gType);
+            digraph.insert_edges(edges, total_edges);
+            log << "graph after inserting edges\n";
+            log << digraph << "\n";
+
+            digraph.insert_edges(pg_graph.new_edges());
+            log << "graph after inserting new edges\n";
+            log << digraph << "\n";
+
+            Pgr_ksp< pgrouting::DirectedGraph  > fn_yen;
+            paths = fn_yen.Yen(digraph, start_vid, end_vid, k, heap_paths);
+            // pgassert(true==false);
+        } else {
+            log << "Working with undirected Graph\n";
+            pgrouting::UndirectedGraph undigraph(gType);
+            undigraph.insert_edges(edges, total_edges);
+            undigraph.insert_edges(pg_graph.new_edges());
+
+            Pgr_ksp< pgrouting::UndirectedGraph > fn_yen;
+            paths = fn_yen.Yen(undigraph, start_vid, end_vid, k, heap_paths);
+        }
+
+
+        if (!details) {
+            for (auto &path : paths) {
+                path = pg_graph.eliminate_details(path);
+            }
+        }
+
+        auto count(count_tuples(paths));
+
+        if (count == 0) {
+            return 0;
+        }
+
+
+        *return_tuples = NULL;
+        *return_tuples = pgr_alloc(count, (*return_tuples));
+
+        size_t sequence = 0;
+        int route_id = 0;
+        for (const auto &path : paths) {
+            if (path.size() > 0)
+                path.get_pg_ksp_path(return_tuples, sequence, route_id);
+            ++route_id;
+        }
+
+        if (count != sequence) {
+            return 2;
+        }
+        (*return_count) = sequence;
+
+        *log_msg = log.str().empty()?
+            *log_msg :
+            pgr_msg(log.str().c_str());
+        *notice_msg = notice.str().empty()?
+            *notice_msg :
+            pgr_msg(notice.str().c_str());
+        return 0;
+    } catch (AssertFailedException &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch (std::exception &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch(...) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << "Caught unknown exception!";
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    }
+    return 1000;
+}
diff --git a/src/label_graph/test/doc-pgr_labelGraph.result b/src/label_graph/test/doc-pgr_labelGraph.result
deleted file mode 100644
index 34f18d2..0000000
--- a/src/label_graph/test/doc-pgr_labelGraph.result
+++ /dev/null
@@ -1,24 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
---q1
-SET client_min_messages TO WARNING;
-SET
-SELECT pgr_labelGraph('edge_table', 'id', 'source', 'target', 'subgraph');
- pgr_labelgraph 
-----------------
- OK
-(1 row)
-
-SELECT DISTINCT subgraph FROM edge_table ORDER BY subgraph;
- subgraph 
-----------
-        1
-        2
-        3
-(3 rows)
-
---q2
-ROLLBACK;
-ROLLBACK
diff --git a/src/label_graph/test/pgrouting_labelgraph.test.sql b/src/label_graph/test/pgrouting_labelgraph.test.sql
deleted file mode 100644
index 76b810d..0000000
--- a/src/label_graph/test/pgrouting_labelgraph.test.sql
+++ /dev/null
@@ -1,72 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-drop table if exists "ways";
-
--- The following should be OK
-
-	select pgr_labelGraph('ways');
-	select pgr_labelGraph('Ways');
-	select pgr_labelGraph('ways', 'id');
-	select pgr_labelGraph('ways', 'id', 'source');
-	select pgr_labelGraph('ways', 'id', 'source', 'target');
-	select pgr_labelGraph('ways', 'id', 'source', 'target', 'subgraph');
-	select pgr_labelGraph('ways', 'id', 'source', 'target', 'subgraph', 'id<100');
-
-	-- When table located in another schema e03
-	select pgr_labelGraph('e03.ways');
-	select pgr_labelGraph('e03.Ways');
-	select pgr_labelGraph('e03.ways', 'id');
-	select pgr_labelGraph('e03.ways', 'id', 'source');
-	select pgr_labelGraph('e03.ways', 'id', 'source', 'target');
-	select pgr_labelGraph('e03.ways', 'id', 'source', 'target', 'subgraph');
-	select pgr_labelGraph('e03.ways', 'id', 'source', 'target', 'subgraph', 'id<100');
-
-	-- When using the named notation
-	select pgr_labelGraph('e03.calles', target:='destino', subgraph:='subgraph', id:='gido', source:='salida');
-	select pgr_labelGraph('e03.calles', rows_where:='gido<100', id:='gido', source:='salida', target:='destino', subgraph:='subgraph');
-
--- The following should FAIL
-	
-	select pgr_labelGraph('id', 'ways');
-	select pgr_labelGraph('ways', 'id', 'sourc', 'target');
-	select pgr_labelGraph('ways', 'id', 'source', 'Target');
-	select pgr_labelGraph('ways', 'id', 'source', 'target', 'subgraph', 'id<');
-
-	-- When table located in another schema e03
-	select pgr_labelGraph('e03.calles');
-	select pgr_labelGraph('e03.Calles');
-	select pgr_labelGraph('id', 'e03.calles');
-	select pgr_labelGraph('e03.calles', 'id', 'sourc', 'target');
-	select pgr_labelGraph('e03.calles', 'gido', 'source', 'target', 'subgraph', 'id<');
-	select pgr_labelGraph('e03.calles', 'gid', 'salida', 'target', 'subgraph', 'id<10');
-	select pgr_labelGraph('e03.calles', 'gid', 'salida', 'destino', 'subgraph', 'id<10 AND id>100');
-
-	-- When using the named notation
-	select pgr_labelGraph('e03.calles', target:='destino', subgraph:='subgraph', id:='gido');
-	select pgr_labelGraph('e03.calles', target:='destino', subgraph:='subgraph', id:='gido', source:='salido');
-	select pgr_labelGraph(rows_where:='gido<100', id:='gido', source:='salida', 'e03.calles', target:='destino', subgraph:='subgraph');
-
--- The following should return "rows_where condition generated 0 rows"
-
-	select pgr_labelGraph('ways', 'id', 'source', 'target', 'subgraph', 'id<10 AND id>100');
-	select pgr_labelGraph('e03.calles', id:='gido', rows_where:='gido<100 AND gido>200', source:='salida', target:='destino', subgraph:='subgraph');
diff --git a/src/label_graph/test/test.conf b/src/label_graph/test/test.conf
deleted file mode 100644
index d3820d2..0000000
--- a/src/label_graph/test/test.conf
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/perl -w
-
-%main::tests = (
-    'any' => {
-        'comment' => 'pgr_labelGraph tests for any versions.',
-        'data' => [' '],
-        'tests' => [qw( 
-            doc-pgr_labelGraph
-)],
-        'documentation' => [qw( 
-            doc-pgr_labelGraph
-)],
-
-
-        },
-# 'vpg-vpgis' => {}, # for version specific tests
-# '8-1' => {}, # for pg 8.x and postgis 1.x
-# '9.2-2.1' => {}, # for pg 9.2 and postgis 2.1
-);
-
-1;
diff --git a/src/lineGraph/CMakeLists.txt b/src/lineGraph/CMakeLists.txt
new file mode 100644
index 0000000..d57ad8d
--- /dev/null
+++ b/src/lineGraph/CMakeLists.txt
@@ -0,0 +1,6 @@
+ADD_LIBRARY(lineGraph OBJECT
+    lineGraphFull.c
+    lineGraphFull_driver.cpp
+    lineGraph.c
+    lineGraph_driver.cpp
+    )
diff --git a/src/lineGraph/lineGraph.c b/src/lineGraph/lineGraph.c
new file mode 100644
index 0000000..717b9bf
--- /dev/null
+++ b/src/lineGraph/lineGraph.c
@@ -0,0 +1,227 @@
+/*PGR-GNU*****************************************************************
+File: lineGraph.c
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer:
+Copyright (c) 2017 Vidhan Jain
+Mail: vidhanj1307 at gmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+/** @file lineGraph.c
+ * @brief Connecting code with postgres.
+ *
+ * This file is fully documented for understanding
+ *  how the postgres connectinon works
+ *
+ * TODO Remove unnecessary comments before submiting the function.
+ * some comments are in form of PGR_DBG message
+ */
+
+/**
+ *  postgres_connection.h
+ *
+ *  - should always be first in the C code
+ */
+#include "c_common/postgres_connection.h"
+
+
+/* for macro PGR_DBG */
+#include "c_common/debug_macro.h"
+/* for pgr_global_report */
+#include "c_common/e_report.h"
+/* for time_msg & clock */
+#include "c_common/time_msg.h"
+/* for functions to get edges information */
+#include "c_common/edges_input.h"
+
+#include "drivers/lineGraph/lineGraph_driver.h"  // the link to the C++ code of the function
+
+PGDLLEXPORT Datum lineGraph(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(lineGraph);
+
+
+/******************************************************************************/
+/*                          MODIFY AS NEEDED                                  */
+static
+void
+process(
+        char* edges_sql,
+        bool directed,
+        Line_graph_rt **result_tuples,
+        size_t *result_count) {
+    /*
+     *  https://www.postgresql.org/docs/current/static/spi-spi-connect.html
+     */
+    PGR_DBG("\nSQL QUERY: %s\n", edges_sql);
+    if (directed) {
+        PGR_DBG("\nDirectedGraph\n");
+    } else {
+      PGR_DBG("\nUndirectedGraph\n");
+    }
+    pgr_SPI_connect();
+
+    (*result_tuples) = NULL;
+    (*result_count) = 0;
+
+    PGR_DBG("Load data");
+    pgr_edge_t *edges = NULL;
+    size_t total_edges = 0;
+
+    pgr_get_edges(edges_sql, &edges, &total_edges);
+    PGR_DBG("Total %ld edges in query:", total_edges);
+
+    if (total_edges == 0) {
+        PGR_DBG("No edges found");
+        pgr_SPI_finish();
+        return;
+    }
+
+    PGR_DBG("Starting processing");
+    clock_t start_t = clock();
+    char *log_msg = NULL;
+    char *notice_msg = NULL;
+    char *err_msg = NULL;
+    do_pgr_lineGraph(
+            edges,
+            total_edges,
+            directed,
+            result_tuples,
+            result_count,
+            &log_msg,
+            &notice_msg,
+            &err_msg);
+
+    time_msg(" processing pgr_lineGraph", start_t, clock());
+    PGR_DBG("Returning %ld tuples", *result_count);
+
+    if (err_msg) {
+        if (*result_tuples) pfree(*result_tuples);
+    }
+    pgr_global_report(log_msg, notice_msg, err_msg);
+
+    if (edges) pfree(edges);
+    if (log_msg) pfree(log_msg);
+    if (notice_msg) pfree(notice_msg);
+    if (err_msg) pfree(err_msg);
+
+    pgr_SPI_finish();
+}
+/*                                                                            */
+/******************************************************************************/
+
+PGDLLEXPORT Datum lineGraph(PG_FUNCTION_ARGS) {
+    FuncCallContext     *funcctx;
+    TupleDesc           tuple_desc;
+
+    /**************************************************************************/
+    /*                          MODIFY AS NEEDED                              */
+    /*                                                                        */
+    Line_graph_rt  *result_tuples = NULL;
+    size_t result_count = 0;
+    /*                                                                        */
+    /**************************************************************************/
+
+    if (SRF_IS_FIRSTCALL()) {
+        MemoryContext   oldcontext;
+        funcctx = SRF_FIRSTCALL_INIT();
+        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
+
+
+        /**********************************************************************/
+        /*                          MODIFY AS NEEDED                          */
+        /*
+           TEXT,
+    directed BOOLEAN DEFAULT true,
+         **********************************************************************/
+
+
+        PGR_DBG("Calling process");
+        process(
+                text_to_cstring(PG_GETARG_TEXT_P(0)),
+                PG_GETARG_BOOL(1),
+                &result_tuples,
+                &result_count);
+
+
+        /*                                                                    */
+        /**********************************************************************/
+
+#if PGSQL_VERSION > 95
+        funcctx->max_calls = result_count;
+#else
+        funcctx->max_calls = (uint32_t)result_count;
+#endif
+        funcctx->user_fctx = result_tuples;
+        if (get_call_result_type(fcinfo, NULL, &tuple_desc)
+                != TYPEFUNC_COMPOSITE) {
+            ereport(ERROR,
+                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+                     errmsg("function returning record called in context "
+                         "that cannot accept type record")));
+        }
+
+        funcctx->tuple_desc = tuple_desc;
+        MemoryContextSwitchTo(oldcontext);
+    }
+
+    funcctx = SRF_PERCALL_SETUP();
+    tuple_desc = funcctx->tuple_desc;
+    result_tuples = (Line_graph_rt*) funcctx->user_fctx;
+
+    if (funcctx->call_cntr < funcctx->max_calls) {
+        HeapTuple    tuple;
+        Datum        result;
+        Datum        *values;
+        bool*        nulls;
+
+        values = palloc(5 * sizeof(Datum));
+        nulls = palloc(5 * sizeof(bool));
+
+
+        size_t i;
+        for (i = 0; i < 5; ++i) {
+            nulls[i] = false;
+        }
+
+        // postgres starts counting from 1
+        values[0] = Int32GetDatum(funcctx->call_cntr + 1);
+        values[1] = Int64GetDatum(result_tuples[funcctx->call_cntr].source);
+        values[2] = Int64GetDatum(result_tuples[funcctx->call_cntr].target);
+        values[3] = Float8GetDatum(result_tuples[funcctx->call_cntr].cost);
+        values[4] = Float8GetDatum(result_tuples[
+            funcctx->call_cntr].reverse_cost);
+
+        tuple = heap_form_tuple(tuple_desc, values, nulls);
+        result = HeapTupleGetDatum(tuple);
+        SRF_RETURN_NEXT(funcctx, result);
+    } else {
+        /**********************************************************************/
+        /*                          MODIFY AS NEEDED                          */
+
+        PGR_DBG("Clean up code");
+
+        /**********************************************************************/
+
+        SRF_RETURN_DONE(funcctx);
+    }
+}
diff --git a/src/lineGraph/lineGraphFull.c b/src/lineGraph/lineGraphFull.c
new file mode 100644
index 0000000..070cf00
--- /dev/null
+++ b/src/lineGraph/lineGraphFull.c
@@ -0,0 +1,169 @@
+/*PGR-GNU*****************************************************************
+File: lineGraphFull.c
+
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer:
+Copyright (c) 2017 Anthony Nicola Tasca
+Mail: atasca10 at gmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "c_common/postgres_connection.h"
+#include "c_common/debug_macro.h"
+#include "c_common/e_report.h"
+#include "c_common/time_msg.h"
+#include "c_common/edges_input.h"
+#include "drivers/lineGraph/lineGraphFull_driver.h"
+
+PGDLLEXPORT Datum lineGraphFull(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(lineGraphFull);
+
+static
+void
+process(
+        char* edges_sql,
+        Line_graph_full_rt **result_tuples,
+        size_t *result_count) {
+    PGR_DBG("\nSQL QUERY: %s\n", edges_sql);
+    PGR_DBG("\nDirectedGraph\n");
+    pgr_SPI_connect();
+
+    (*result_tuples) = NULL;
+    (*result_count) = 0;
+
+    PGR_DBG("Load data");
+    pgr_edge_t *edges = NULL;
+    size_t total_edges = 0;
+
+    pgr_get_edges(edges_sql, &edges, &total_edges);
+    PGR_DBG("Total %ld edges in query:", total_edges);
+
+    if (total_edges == 0) {
+        PGR_DBG("No edges found");
+        pgr_SPI_finish();
+        return;
+    }
+
+    PGR_DBG("Starting processing");
+    clock_t start_t = clock();
+    char *log_msg = NULL;
+    char *notice_msg = NULL;
+    char *err_msg = NULL;
+    do_pgr_lineGraphFull(
+            edges,
+            total_edges,
+            result_tuples,
+            result_count,
+            &log_msg,
+            &notice_msg,
+            &err_msg);
+
+    time_msg(" processing pgr_lineGraphFull", start_t, clock());
+    PGR_DBG("Returning %ld tuples", *result_count);
+
+    if (err_msg) {
+        if (*result_tuples) pfree(*result_tuples);
+    }
+
+    pgr_global_report(log_msg, notice_msg, err_msg);
+
+    if (edges) pfree(edges);
+    if (log_msg) pfree(log_msg);
+    if (notice_msg) pfree(notice_msg);
+    if (err_msg) pfree(err_msg);
+
+    pgr_SPI_finish();
+}
+/*                                                                            */
+/******************************************************************************/
+
+PGDLLEXPORT Datum lineGraphFull(PG_FUNCTION_ARGS) {
+    FuncCallContext     *funcctx;
+    TupleDesc           tuple_desc;
+
+    Line_graph_full_rt  *result_tuples = NULL;
+    size_t result_count = 0;
+
+    if (SRF_IS_FIRSTCALL()) {
+        MemoryContext   oldcontext;
+        funcctx = SRF_FIRSTCALL_INIT();
+        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
+
+        PGR_DBG("Calling process");
+        process(text_to_cstring(PG_GETARG_TEXT_P(0)),
+                &result_tuples,
+                &result_count);
+
+#if PGSQL_VERSION > 95
+        funcctx->max_calls = result_count;
+#else
+        funcctx->max_calls = (uint32_t)result_count;
+#endif
+        funcctx->user_fctx = result_tuples;
+        if (get_call_result_type(fcinfo, NULL, &tuple_desc)
+                != TYPEFUNC_COMPOSITE) {
+            ereport(ERROR,
+                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+                     errmsg("function returning record called in context "
+                         "that cannot accept type record")));
+        }
+
+        funcctx->tuple_desc = tuple_desc;
+        MemoryContextSwitchTo(oldcontext);
+    }
+
+    funcctx = SRF_PERCALL_SETUP();
+    tuple_desc = funcctx->tuple_desc;
+    result_tuples = (Line_graph_full_rt*) funcctx->user_fctx;
+
+    if (funcctx->call_cntr < funcctx->max_calls) {
+        HeapTuple    tuple;
+        Datum        result;
+        Datum        *values;
+        bool*        nulls;
+
+        values = palloc(5 * sizeof(Datum));
+        nulls = palloc(5 * sizeof(bool));
+
+
+        size_t i;
+        for (i = 0; i < 5; ++i) {
+            nulls[i] = false;
+        }
+
+        size_t c_cntr = funcctx->call_cntr;
+
+        values[0] = Int32GetDatum(c_cntr + 1);
+        values[1] = Int64GetDatum(result_tuples[c_cntr].source);
+        values[2] = Int64GetDatum(result_tuples[c_cntr].target);
+        values[3] = Float8GetDatum(result_tuples[c_cntr].cost);
+        values[4] = Int64GetDatum(result_tuples[c_cntr].edge);
+
+        tuple = heap_form_tuple(tuple_desc, values, nulls);
+        result = HeapTupleGetDatum(tuple);
+        SRF_RETURN_NEXT(funcctx, result);
+    } else {
+        PGR_DBG("Clean up code");
+        SRF_RETURN_DONE(funcctx);
+    }
+}
diff --git a/src/lineGraph/lineGraphFull_driver.cpp b/src/lineGraph/lineGraphFull_driver.cpp
new file mode 100644
index 0000000..9bba696
--- /dev/null
+++ b/src/lineGraph/lineGraphFull_driver.cpp
@@ -0,0 +1,147 @@
+/*PGR-GNU*****************************************************************
+File: lineGraphFull_driver.cpp
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer:
+Copyright (c) 2017 Anthony Nicola Tasca
+Mail: atasca10 at gmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "drivers/lineGraph/lineGraphFull_driver.h"
+
+#include <sstream>
+#include <deque>
+#include <vector>
+
+#include "dijkstra/pgr_dijkstra.hpp"
+
+#include "cpp_common/pgr_alloc.hpp"
+#include "cpp_common/pgr_assert.h"
+
+#include "lineGraph/pgr_lineGraphFull.hpp"
+#include "cpp_common/linear_directed_graph.h"
+
+void get_turn_penalty_postgres_result(
+        std::vector< Line_graph_full_rt > edge_result,
+        Line_graph_full_rt **return_tuples,
+        size_t &sequence) {
+    (*return_tuples) = pgr_alloc(
+            static_cast<int>(edge_result.size()),
+            (*return_tuples));
+
+    for (const auto &edge : edge_result) {
+        (*return_tuples)[sequence] =
+            {edge.id,
+             edge.source,
+             edge.target,
+             edge.cost,
+             edge.edge};
+        sequence++;
+    }
+}
+
+void
+do_pgr_lineGraphFull(
+        pgr_edge_t  *data_edges,
+        size_t total_edges,
+        Line_graph_full_rt **return_tuples,
+        size_t *return_count,
+        char ** log_msg,
+        char ** notice_msg,
+        char ** err_msg) {
+    std::ostringstream log;
+    std::ostringstream err;
+    std::ostringstream notice;
+    try {
+        pgassert(!(*log_msg));
+        pgassert(!(*notice_msg));
+        pgassert(!(*err_msg));
+        pgassert(!(*return_tuples));
+        pgassert(*return_count == 0);
+        pgassert(total_edges != 0);
+
+        std::vector< Line_graph_full_rt > results;
+        graphType gType = DIRECTED;
+
+        pgrouting::DirectedGraph digraph(gType);
+        digraph.insert_edges_neg(data_edges, total_edges);
+
+#if 0
+        log << digraph << "\n";
+#endif
+        pgrouting::graph::Pgr_lineGraphFull<
+            pgrouting::LinearDirectedGraph,
+            pgrouting::Line_vertex,
+            pgrouting::Basic_edge > line(digraph);
+
+        std::vector< Line_graph_full_rt > line_graph_edges;
+        line_graph_edges = line.get_postgres_results_directed();
+
+        auto count = line_graph_edges.size();
+
+        if (count == 0) {
+            (*return_tuples) = NULL;
+            (*return_count) = 0;
+            /* TODO change the notice message */
+            notice <<
+                "No paths found between start_vid and end_vid vertices";
+        } else {
+            size_t sequence = 0;
+
+            get_turn_penalty_postgres_result(
+                line_graph_edges,
+                return_tuples,
+                sequence);
+            (*return_count) = sequence;
+        }
+#if 1
+        log << line.log.str().c_str() << "\n\n\n";
+        log << line << "\n";
+#endif
+        pgassert(*err_msg == NULL);
+        *log_msg = log.str().empty()?
+            *log_msg :
+            pgr_msg(log.str().c_str());
+        *notice_msg = notice.str().empty()?
+            *notice_msg :
+            pgr_msg(notice.str().c_str());
+    } catch (AssertFailedException &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch (std::exception &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch(...) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << "Caught unknown exception!";
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    }
+}
diff --git a/src/lineGraph/lineGraph_driver.cpp b/src/lineGraph/lineGraph_driver.cpp
new file mode 100644
index 0000000..2945212
--- /dev/null
+++ b/src/lineGraph/lineGraph_driver.cpp
@@ -0,0 +1,138 @@
+/*PGR-GNU*****************************************************************
+File: lineGraph_driver.cpp
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer:
+Copyright (c) 2017 Vidhan Jain
+Mail: vidhanj1307 at gmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "drivers/lineGraph/lineGraph_driver.h"
+
+#include <sstream>
+#include <deque>
+#include <vector>
+#include <utility>
+
+#include "dijkstra/pgr_dijkstra.hpp"
+
+#include "cpp_common/pgr_alloc.hpp"
+#include "cpp_common/pgr_assert.h"
+
+#include "lineGraph/pgr_lineGraph.hpp"
+#include "cpp_common/linear_directed_graph.h"
+
+
+void get_postgres_result(
+        std::vector< Line_graph_rt > edge_result,
+        Line_graph_rt **return_tuples,
+        size_t &sequence) {
+    (*return_tuples) = pgr_alloc(
+            static_cast<int>(edge_result.size()),
+            (*return_tuples));
+
+    for (const auto &edge : edge_result) {
+        (*return_tuples)[sequence] = {edge.id, edge.source, edge.target,
+             edge.cost, edge.reverse_cost};
+        sequence++;
+    }
+}
+
+void
+do_pgr_lineGraph(
+        pgr_edge_t  *data_edges,
+        size_t total_edges,
+        bool directed,
+        Line_graph_rt **return_tuples,
+        size_t *return_count,
+        char ** log_msg,
+        char ** notice_msg,
+        char ** err_msg) {
+    std::ostringstream log;
+    std::ostringstream err;
+    std::ostringstream notice;
+    try {
+        pgassert(!(*log_msg));
+        pgassert(!(*notice_msg));
+        pgassert(!(*err_msg));
+        pgassert(!(*return_tuples));
+        pgassert(*return_count == 0);
+        pgassert(total_edges != 0);
+
+        std::vector< Line_graph_rt > results;
+        graphType gType = directed? DIRECTED: UNDIRECTED;
+
+        pgrouting::DirectedGraph digraph(gType);
+        digraph.insert_edges_neg(data_edges, total_edges);
+
+        log << digraph << "\n";
+        pgrouting::graph::Pgr_lineGraph<
+            pgrouting::LinearDirectedGraph,
+            pgrouting::Line_vertex,
+            pgrouting::Basic_edge> line(digraph);
+        std::vector< Line_graph_rt > line_graph_edges;
+        line_graph_edges = line.get_postgres_results_directed();
+        auto count = line_graph_edges.size();
+
+        if (count == 0) {
+            (*return_tuples) = NULL;
+            (*return_count) = 0;
+            notice <<
+                "Only vertices graph";
+        } else {
+            size_t sequence = 0;
+
+            get_postgres_result(
+                line_graph_edges,
+                return_tuples,
+                sequence);
+            (*return_count) = sequence;
+        }
+
+        pgassert(*err_msg == NULL);
+        *log_msg = log.str().empty()?
+            *log_msg :
+            pgr_msg(log.str().c_str());
+        *notice_msg = notice.str().empty()?
+            *notice_msg :
+            pgr_msg(notice.str().c_str());
+    } catch (AssertFailedException &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch (std::exception &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch(...) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << "Caught unknown exception!";
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    }
+}
diff --git a/src/lineGraph/src/CMakeLists.txt b/src/lineGraph/src/CMakeLists.txt
deleted file mode 100644
index 86869a9..0000000
--- a/src/lineGraph/src/CMakeLists.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-ADD_LIBRARY(lineGraph OBJECT
-    lineGraph.c
-    lineGraph_driver.cpp
-    )
diff --git a/src/lineGraph/src/lineGraph.c b/src/lineGraph/src/lineGraph.c
deleted file mode 100644
index 2cb5ed2..0000000
--- a/src/lineGraph/src/lineGraph.c
+++ /dev/null
@@ -1,223 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: lineGraph.c
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer:
-Copyright (c) 2017 Vidhan Jain
-Mail: vidhanj1307 at gmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-/** @file lineGraph.c
- * @brief Connecting code with postgres.
- *
- * This file is fully documented for understanding
- *  how the postgres connectinon works
- *
- * TODO Remove unnecessary comments before submiting the function.
- * some comments are in form of PGR_DBG message
- */
-
-/**
- *  postgres_connection.h
- *
- *  - should always be first in the C code
- */
-#include "c_common/postgres_connection.h"
-
-
-/* for macro PGR_DBG */
-#include "c_common/debug_macro.h"
-/* for pgr_global_report */
-#include "c_common/e_report.h"
-/* for time_msg & clock */
-#include "c_common/time_msg.h"
-/* for functions to get edges information */
-#include "c_common/edges_input.h"
-
-#include "drivers/lineGraph/lineGraph_driver.h"  // the link to the C++ code of the function
-
-PGDLLEXPORT Datum lineGraph(PG_FUNCTION_ARGS);
-PG_FUNCTION_INFO_V1(lineGraph);
-
-
-/******************************************************************************/
-/*                          MODIFY AS NEEDED                                  */
-static
-void
-process(
-        char* edges_sql,
-        bool directed,
-        Line_graph_rt **result_tuples,
-        size_t *result_count) {
-    /*
-     *  https://www.postgresql.org/docs/current/static/spi-spi-connect.html
-     */
-    PGR_DBG("\nSQL QUERY: %s\n", edges_sql);
-    if (directed) PGR_DBG("\nDirectedGraph\n");
-    else PGR_DBG("\nUndirectedGraph\n");
-    pgr_SPI_connect();
-
-    (*result_tuples) = NULL;
-    (*result_count) = 0;
-
-    PGR_DBG("Load data");
-    pgr_edge_t *edges = NULL;
-    size_t total_edges = 0;
-
-    pgr_get_edges(edges_sql, &edges, &total_edges);
-    PGR_DBG("Total %ld edges in query:", total_edges);
-
-    if (total_edges == 0) {
-        PGR_DBG("No edges found");
-        pgr_SPI_finish();
-        return;
-    }
-
-    PGR_DBG("Starting processing");
-    clock_t start_t = clock();
-    char *log_msg = NULL;
-    char *notice_msg = NULL;
-    char *err_msg = NULL;
-    do_pgr_lineGraph(
-            edges,
-            total_edges,
-            directed,
-            result_tuples,
-            result_count,
-            &log_msg,
-            &notice_msg,
-            &err_msg);
-
-    time_msg(" processing pgr_lineGraph", start_t, clock());
-    PGR_DBG("Returning %ld tuples", *result_count);
-
-    if (err_msg) {
-        if (*result_tuples) pfree(*result_tuples);
-    }
-    pgr_global_report(log_msg, notice_msg, err_msg);
-
-    if (edges) pfree(edges);
-    if (log_msg) pfree(log_msg);
-    if (notice_msg) pfree(notice_msg);
-    if (err_msg) pfree(err_msg);
-
-    pgr_SPI_finish();
-}
-/*                                                                            */
-/******************************************************************************/
-
-PGDLLEXPORT Datum lineGraph(PG_FUNCTION_ARGS) {
-    FuncCallContext     *funcctx;
-    TupleDesc           tuple_desc;
-
-    /**************************************************************************/
-    /*                          MODIFY AS NEEDED                              */
-    /*                                                                        */
-    Line_graph_rt  *result_tuples = NULL;
-    size_t result_count = 0;
-    /*                                                                        */
-    /**************************************************************************/
-
-    if (SRF_IS_FIRSTCALL()) {
-        MemoryContext   oldcontext;
-        funcctx = SRF_FIRSTCALL_INIT();
-        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
-
-
-        /**********************************************************************/
-        /*                          MODIFY AS NEEDED                          */
-        /*
-           TEXT,
-    directed BOOLEAN DEFAULT true,
-         **********************************************************************/
-
-
-        PGR_DBG("Calling process");
-        process(
-                text_to_cstring(PG_GETARG_TEXT_P(0)),
-                PG_GETARG_BOOL(1),
-                &result_tuples,
-                &result_count);
-
-
-        /*                                                                    */
-        /**********************************************************************/
-
-#if PGSQL_VERSION > 94
-        funcctx->max_calls = result_count;
-#else
-        funcctx->max_calls = (uint32_t)result_count;
-#endif
-        funcctx->user_fctx = result_tuples;
-        if (get_call_result_type(fcinfo, NULL, &tuple_desc)
-                != TYPEFUNC_COMPOSITE) {
-            ereport(ERROR,
-                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                     errmsg("function returning record called in context "
-                         "that cannot accept type record")));
-        }
-
-        funcctx->tuple_desc = tuple_desc;
-        MemoryContextSwitchTo(oldcontext);
-    }
-
-    funcctx = SRF_PERCALL_SETUP();
-    tuple_desc = funcctx->tuple_desc;
-    result_tuples = (Line_graph_rt*) funcctx->user_fctx;
-
-    if (funcctx->call_cntr < funcctx->max_calls) {
-        HeapTuple    tuple;
-        Datum        result;
-        Datum        *values;
-        bool*        nulls;
-
-        values = palloc(5 * sizeof(Datum));
-        nulls = palloc(5 * sizeof(bool));
-
-
-        size_t i;
-        for (i = 0; i < 5; ++i) {
-            nulls[i] = false;
-        }
-
-        // postgres starts counting from 1
-        values[0] = Int32GetDatum(funcctx->call_cntr + 1);
-        values[1] = Int64GetDatum(result_tuples[funcctx->call_cntr].source);
-        values[2] = Int64GetDatum(result_tuples[funcctx->call_cntr].target);
-        values[3] = Float8GetDatum(result_tuples[funcctx->call_cntr].cost);
-        values[4] = Float8GetDatum(result_tuples[funcctx->call_cntr].reverse_cost);
-
-        tuple = heap_form_tuple(tuple_desc, values, nulls);
-        result = HeapTupleGetDatum(tuple);
-        SRF_RETURN_NEXT(funcctx, result);
-    } else {
-        /**********************************************************************/
-        /*                          MODIFY AS NEEDED                          */
-
-        PGR_DBG("Clean up code");
-
-        /**********************************************************************/
-
-        SRF_RETURN_DONE(funcctx);
-    }
-}
diff --git a/src/lineGraph/src/lineGraph_driver.cpp b/src/lineGraph/src/lineGraph_driver.cpp
deleted file mode 100644
index f67ed49..0000000
--- a/src/lineGraph/src/lineGraph_driver.cpp
+++ /dev/null
@@ -1,157 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: lineGraph_driver.cpp
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer:
-Copyright (c) 2017 Vidhan Jain
-Mail: vidhanj1307 at gmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "drivers/lineGraph/lineGraph_driver.h"
-
-#include <sstream>
-#include <deque>
-#include <vector>
-
-#include "dijkstra/pgr_dijkstra.hpp"
-
-#include "cpp_common/pgr_alloc.hpp"
-#include "cpp_common/pgr_assert.h"
-
-#include "lineGraph/pgr_lineGraph.hpp"
-
-void get_postgres_result(
-        std::vector< Line_graph_rt > edge_result,
-        Line_graph_rt **return_tuples,
-        size_t &sequence) {
-    (*return_tuples) = pgr_alloc(
-            (int)edge_result.size(),
-            (*return_tuples));
-
-    for (const auto &edge: edge_result) {
-        (*return_tuples)[sequence] = {edge.id, edge.source, edge.target, edge.cost, edge.reverse_cost};
-        sequence++;
-    }
-}
-
-void
-do_pgr_lineGraph(
-        pgr_edge_t  *data_edges,
-        size_t total_edges,
-        bool directed,
-        Line_graph_rt **return_tuples,
-        size_t *return_count,
-        char ** log_msg,
-        char ** notice_msg,
-        char ** err_msg) {
-    std::ostringstream log;
-    std::ostringstream err;
-    std::ostringstream notice;
-    try {
-        pgassert(!(*log_msg));
-        pgassert(!(*notice_msg));
-        pgassert(!(*err_msg));
-        pgassert(!(*return_tuples));
-        pgassert(*return_count == 0);
-        pgassert(total_edges != 0);
-
-        std::vector< Line_graph_rt > results;
-        graphType gType = directed?DIRECTED:UNDIRECTED;
-
-        pgrouting::DirectedGraph digraph(gType);
-        digraph.insert_edges(data_edges, total_edges);
-        if (!directed) {
-            for (size_t ind = 0; ind < total_edges; ind++) {
-                std::swap(data_edges[ind].source, data_edges[ind].target);
-                data_edges[ind].id *= -1;
-            }
-
-            digraph.insert_edges(data_edges, total_edges);
-
-            for (size_t ind = 0;ind < total_edges; ind++) {
-                std::swap(data_edges[ind].source, data_edges[ind].target);
-                data_edges[ind].id *= -1;
-            }
-        }
-
-        digraph.m_num_vertices = 1000;
-        log << digraph << "\n";
-
-        pgrouting::LinearDirectedGraph line(gType);
-        line.insert_vertices(data_edges, total_edges);
-        line.transform(digraph);
-
-        std::vector< Line_graph_rt > line_graph_edges;
-        if (directed) {
-            line_graph_edges = line.get_postgres_results_directed();
-        } else {
-            line_graph_edges = line.get_postgres_results_undirected();
-        }
-
-        auto count = line_graph_edges.size();
-
-        if (count == 0) {
-            (*return_tuples) = NULL;
-            (*return_count) = 0;
-            notice <<
-                "No paths found between start_vid and end_vid vertices";
-        } else {
-            size_t sequence = 0;
-
-            get_postgres_result(
-                line_graph_edges,
-                return_tuples,
-                sequence
-            );
-            (*return_count) = sequence;
-        }
-        log << line.log.str().c_str() << "\n\n\n";
-        log << line << "\n";
-
-        pgassert(*err_msg == NULL);
-        *log_msg = log.str().empty()?
-            *log_msg :
-            pgr_msg(log.str().c_str());
-        *notice_msg = notice.str().empty()?
-            *notice_msg :
-            pgr_msg(notice.str().c_str());
-    } catch (AssertFailedException &except) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << except.what();
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    } catch (std::exception &except) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << except.what();
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    } catch(...) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << "Caught unknown exception!";
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    }
-}
diff --git a/src/lineGraph/test/doc-pgr_lineGraph.result b/src/lineGraph/test/doc-pgr_lineGraph.result
deleted file mode 100644
index d6744bd..0000000
--- a/src/lineGraph/test/doc-pgr_lineGraph.result
+++ /dev/null
@@ -1,210 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- q1
-SELECT * FROM pgr_lineGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table'
-);
- seq | source | target | cost | reverse_cost 
------+--------+--------+------+--------------
-   1 |    -16 |     -3 |    1 |           -1
-   2 |    -15 |     -9 |    1 |            1
-   3 |    -14 |    -10 |    1 |            1
-   4 |    -14 |     12 |    1 |           -1
-   5 |    -10 |     -7 |    1 |            1
-   6 |    -10 |     -4 |    1 |            1
-   7 |    -10 |      8 |    1 |            1
-   8 |     -9 |     -8 |    1 |            1
-   9 |     -9 |     11 |    1 |           -1
-  10 |     -8 |     -7 |    1 |            1
-  11 |     -8 |     -4 |    1 |            1
-  12 |     -7 |     -6 |    1 |            1
-  13 |     -4 |     -1 |    1 |            1
-  14 |     -3 |     -2 |    1 |           -1
-  15 |     -3 |      5 |    1 |           -1
-  16 |     -2 |     -1 |    1 |           -1
-  17 |     -2 |      4 |    1 |           -1
-  18 |      5 |     -8 |    1 |           -1
-  19 |      5 |      9 |    1 |           -1
-  20 |      5 |     11 |    1 |           -1
-  21 |      7 |     -4 |    1 |            1
-  22 |      8 |     11 |    1 |           -1
-  23 |     10 |     12 |    1 |           -1
-  24 |     11 |     13 |    1 |           -1
-  25 |     12 |     13 |    1 |           -1
-  26 |     13 |    -15 |    1 |           -1
-  27 |     16 |     -9 |    1 |            1
-  28 |     16 |     15 |    1 |            1
-(28 rows)
-
--- q2
-SELECT * FROM pgr_lineGraph(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    FALSE
-);
- seq | source | target | cost | reverse_cost 
------+--------+--------+------+--------------
-   1 |     -2 |     -1 |    1 |           -1
-   2 |     -4 |     -1 |    1 |           -1
-   3 |      4 |     -1 |    1 |           -1
-   4 |      1 |      4 |    1 |           -1
-   5 |     -2 |      4 |    1 |           -1
-   6 |     -1 |      4 |    1 |           -1
-   7 |     -2 |      1 |    1 |           -1
-   8 |     -4 |      1 |    1 |           -1
-   9 |      4 |      1 |    1 |           -1
-  10 |      1 |     -2 |    1 |           -1
-  11 |     -4 |     -2 |    1 |           -1
-  12 |     -1 |     -2 |    1 |           -1
-  13 |      4 |     -2 |    1 |           -1
-  14 |      1 |     -4 |    1 |           -1
-  15 |     -2 |     -4 |    1 |           -1
-  16 |     -1 |     -4 |    1 |           -1
-  17 |     -3 |     -2 |    1 |           -1
-  18 |      5 |     -2 |    1 |           -1
-  19 |     -3 |      5 |    1 |           -1
-  20 |     -2 |      5 |    1 |           -1
-  21 |     -2 |     -3 |    1 |           -1
-  22 |      5 |     -3 |    1 |           -1
-  23 |    -16 |     -3 |    1 |           -1
-  24 |     16 |     -3 |    1 |           -1
-  25 |     -3 |     16 |    1 |           -1
-  26 |     -3 |    -16 |    1 |           -1
-  27 |      7 |     -4 |    1 |           -1
-  28 |     -8 |     -4 |    1 |           -1
-  29 |    -10 |     -4 |    1 |           -1
-  30 |     -7 |     -4 |    1 |           -1
-  31 |      8 |     -4 |    1 |           -1
-  32 |     10 |     -4 |    1 |           -1
-  33 |      4 |     -7 |    1 |           -1
-  34 |     -8 |     -7 |    1 |           -1
-  35 |    -10 |     -7 |    1 |           -1
-  36 |     -4 |     -7 |    1 |           -1
-  37 |      8 |     -7 |    1 |           -1
-  38 |     10 |     -7 |    1 |           -1
-  39 |      4 |      8 |    1 |           -1
-  40 |      7 |      8 |    1 |           -1
-  41 |    -10 |      8 |    1 |           -1
-  42 |     -4 |      8 |    1 |           -1
-  43 |     -7 |      8 |    1 |           -1
-  44 |     10 |      8 |    1 |           -1
-  45 |      4 |     10 |    1 |           -1
-  46 |      7 |     10 |    1 |           -1
-  47 |     -8 |     10 |    1 |           -1
-  48 |     -4 |     10 |    1 |           -1
-  49 |     -7 |     10 |    1 |           -1
-  50 |      8 |     10 |    1 |           -1
-  51 |      7 |      4 |    1 |           -1
-  52 |     -8 |      4 |    1 |           -1
-  53 |    -10 |      4 |    1 |           -1
-  54 |     -7 |      4 |    1 |           -1
-  55 |      8 |      4 |    1 |           -1
-  56 |     10 |      4 |    1 |           -1
-  57 |      4 |      7 |    1 |           -1
-  58 |     -8 |      7 |    1 |           -1
-  59 |    -10 |      7 |    1 |           -1
-  60 |     -4 |      7 |    1 |           -1
-  61 |      8 |      7 |    1 |           -1
-  62 |     10 |      7 |    1 |           -1
-  63 |      4 |     -8 |    1 |           -1
-  64 |      7 |     -8 |    1 |           -1
-  65 |    -10 |     -8 |    1 |           -1
-  66 |     -4 |     -8 |    1 |           -1
-  67 |     -7 |     -8 |    1 |           -1
-  68 |     10 |     -8 |    1 |           -1
-  69 |      4 |    -10 |    1 |           -1
-  70 |      7 |    -10 |    1 |           -1
-  71 |     -8 |    -10 |    1 |           -1
-  72 |     -4 |    -10 |    1 |           -1
-  73 |     -7 |    -10 |    1 |           -1
-  74 |      8 |    -10 |    1 |           -1
-  75 |      5 |     -8 |    1 |           -1
-  76 |     -9 |     -8 |    1 |           -1
-  77 |      9 |     -8 |    1 |           -1
-  78 |     11 |     -8 |    1 |           -1
-  79 |      5 |      9 |    1 |           -1
-  80 |      8 |      9 |    1 |           -1
-  81 |     -8 |      9 |    1 |           -1
-  82 |     11 |      9 |    1 |           -1
-  83 |      5 |     11 |    1 |           -1
-  84 |      8 |     11 |    1 |           -1
-  85 |     -9 |     11 |    1 |           -1
-  86 |     -8 |     11 |    1 |           -1
-  87 |      9 |     11 |    1 |           -1
-  88 |      8 |      5 |    1 |           -1
-  89 |     -9 |      5 |    1 |           -1
-  90 |     -8 |      5 |    1 |           -1
-  91 |      9 |      5 |    1 |           -1
-  92 |     11 |      5 |    1 |           -1
-  93 |      5 |      8 |    1 |           -1
-  94 |     -9 |      8 |    1 |           -1
-  95 |      9 |      8 |    1 |           -1
-  96 |     11 |      8 |    1 |           -1
-  97 |      5 |     -9 |    1 |           -1
-  98 |      8 |     -9 |    1 |           -1
-  99 |     -8 |     -9 |    1 |           -1
- 100 |     11 |     -9 |    1 |           -1
- 101 |     -7 |     -6 |    1 |           -1
- 102 |      7 |     -6 |    1 |           -1
- 103 |      6 |      7 |    1 |           -1
- 104 |     -6 |      7 |    1 |           -1
- 105 |     -7 |      6 |    1 |           -1
- 106 |      7 |      6 |    1 |           -1
- 107 |      6 |     -7 |    1 |           -1
- 108 |     -6 |     -7 |    1 |           -1
- 109 |    -15 |     -9 |    1 |           -1
- 110 |     16 |     -9 |    1 |           -1
- 111 |     15 |     -9 |    1 |           -1
- 112 |    -16 |     -9 |    1 |           -1
- 113 |      9 |     15 |    1 |           -1
- 114 |     16 |     15 |    1 |           -1
- 115 |     -9 |     15 |    1 |           -1
- 116 |    -16 |     15 |    1 |           -1
- 117 |      9 |    -16 |    1 |           -1
- 118 |    -15 |    -16 |    1 |           -1
- 119 |     -9 |    -16 |    1 |           -1
- 120 |     15 |    -16 |    1 |           -1
- 121 |    -15 |      9 |    1 |           -1
- 122 |     16 |      9 |    1 |           -1
- 123 |     15 |      9 |    1 |           -1
- 124 |    -16 |      9 |    1 |           -1
- 125 |      9 |    -15 |    1 |           -1
- 126 |     16 |    -15 |    1 |           -1
- 127 |     -9 |    -15 |    1 |           -1
- 128 |    -16 |    -15 |    1 |           -1
- 129 |      9 |     16 |    1 |           -1
- 130 |    -15 |     16 |    1 |           -1
- 131 |     -9 |     16 |    1 |           -1
- 132 |     15 |     16 |    1 |           -1
- 133 |    -14 |    -10 |    1 |           -1
- 134 |     12 |    -10 |    1 |           -1
- 135 |     14 |    -10 |    1 |           -1
- 136 |     10 |     12 |    1 |           -1
- 137 |    -14 |     12 |    1 |           -1
- 138 |    -10 |     12 |    1 |           -1
- 139 |     14 |     12 |    1 |           -1
- 140 |     10 |     14 |    1 |           -1
- 141 |    -10 |     14 |    1 |           -1
- 142 |     12 |     14 |    1 |           -1
- 143 |    -14 |     10 |    1 |           -1
- 144 |     12 |     10 |    1 |           -1
- 145 |     14 |     10 |    1 |           -1
- 146 |     10 |    -14 |    1 |           -1
- 147 |    -10 |    -14 |    1 |           -1
- 148 |     12 |    -14 |    1 |           -1
- 149 |     11 |     13 |    1 |           -1
- 150 |     12 |     13 |    1 |           -1
- 151 |     12 |     11 |    1 |           -1
- 152 |     13 |     11 |    1 |           -1
- 153 |     11 |     12 |    1 |           -1
- 154 |     13 |     12 |    1 |           -1
- 155 |     13 |    -15 |    1 |           -1
- 156 |     15 |     13 |    1 |           -1
- 157 |    -15 |     13 |    1 |           -1
- 158 |     13 |     15 |    1 |           -1
-(158 rows)
-
--- q3
-ROLLBACK;
-ROLLBACK
diff --git a/src/lineGraph/test/test.conf b/src/lineGraph/test/test.conf
deleted file mode 100644
index 318f990..0000000
--- a/src/lineGraph/test/test.conf
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/perl -w
-
-%main::tests = (
-    'any' => {
-        'comment' => 'LineGrpah test for any versions.',
-        'data' => [ ],
-        'tests' => [qw(
-            doc-pgr_lineGraph
-            )],
-        'documentation' => [qw(
-            doc-pgr_lineGraph
-            )]
-    },
-
-);
-
-1;
diff --git a/src/linecommand/src/Makefile b/src/linecommand/src/Makefile
deleted file mode 100644
index 871d66a..0000000
--- a/src/linecommand/src/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-CC= g++
-CCFLAGS=  -g -O3 -std=c++11 -Wall -pedantic  
-LDFLAGS= -lboost_program_options -lpq 
-INCFLAGS= -I /usr/include/postgresql/9.3/server/ -I /usr/include/postgresql/ 
-SOURCES= pgRouting.cpp ./../../common/src/signalhandler.cpp ./../../common/src/pgr_assert.cpp  ./../../common/src/basePath_SSEC.cpp
-
-OBJECTS= $(SOURCES:.cpp=.o)
-TARGET= pgRouting
- 
-all: $(OBJECTS) $(TARGET) 
-
-$(TARGET): pgRouting.o basePath_SSEC.o 
-	$(CC)  -o $@ $^ $(LDFLAGS)
- 
-$(TARGET).o: $(TARGET).cpp ./../../common/src/baseGraph.hpp \
-         ./../../common/src/pgr_types.h \
-         ./../../common/src/basePath_SSEC.hpp \
-         ./../../dijkstra/src/pgr_dijkstra.hpp \
-         ./../../ksp/src/pgr_ksp.hpp \
-         ./../../warshall/src/pgr_warshall.hpp \
-         ./warshall.hpp
-	$(CC)  $(CCFLAGS) $(INCFLAGS) -c $<
- 
-#%.o: ./../../common/src/%.c ./../../common/src/%.h 
-#	g++  -c  $(INCFLAGS) $<
-
-%.o: %.cpp %.hpp 
-	$(CC)  $(CCFLAGS) $(INCFLAGS) -c $<
-
-valgrind: pgRouting
-	valgrind -v --track-origins=yes --undef-value-errors=yes --leak-check=full --show-leak-kinds=all ./mainP &> ./valgrindlog.txt
-clean:
-	rm -f *.o $(TARGET) 
-
diff --git a/src/linecommand/src/dijkstra.hpp b/src/linecommand/src/dijkstra.hpp
deleted file mode 100644
index 40d2837..0000000
--- a/src/linecommand/src/dijkstra.hpp
+++ /dev/null
@@ -1,115 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include <deque>
-#include <string>
-#include <vector>
-
-template <typename G>
-void process_dijkstra(G &graph, const std::vector<std::string> &tokens) {
-    std::string::size_type sz;
-    if (tokens[1].compare("from") != 0) {
-        std::cout << "missing 'from' kewyword\n";
-        return;
-    }
-
-    std::vector< int64_t > sources;
-    unsigned int i_ptr = 2;
-
-    for ( ; i_ptr < tokens.size(); ++i_ptr) {
-        if (tokens[i_ptr].compare("to") == 0) break;
-        try {
-            uint64_t start_vertex(stol(tokens[i_ptr], &sz));
-            sources.push_back(start_vertex);
-        } catch(...) {
-            break;
-        }
-    }
-
-    if (i_ptr == tokens.size() || tokens[i_ptr].compare("to") != 0) {
-        std::cout << "dijkstra: 'dist' kewyword not found\n";
-        return;
-    }
-
-    if (sources.size() == 0) {
-        std::cout << "dijkstra: No start value found\n";
-        return;
-    }
-
-    ++i_ptr;
-    if (i_ptr == tokens.size()) {
-        std::cout << "dijkstra: No 'to' values found\n";
-        return;
-    }
-
-    std::vector< int64_t > targets;
-    for ( ; i_ptr < tokens.size(); ++i_ptr) {
-        auto end_vertex(stol(tokens[i_ptr], &sz));
-        targets.push_back(end_vertex);
-    }
-
-
-    if (sources.size() == 1 && targets.size() == 1) {
-        // one to one
-        Path path;
-        pgr_dijkstra(graph, path, sources[0], targets[0]);
-        std::cout << "THE OPUTPUT ---->  total cost: " << path.cost << "\n";
-        path.print_path();
-        path.clear();
-
-
-    } else if (sources.size() == 1 && targets.size() > 1) {
-        // one to many
-        pgr_dijkstra(graph, paths, sources[0], targets);
-
-        std::cout << "THE OPUTPUTS ---->  total outputs: " << paths.size() << "\n";
-        for (unsigned int i = 0; i < paths.size(); ++i) {
-            if (sizeof(paths[i]) == 0) continue;  // no solution found
-            std::cout << "Path #" << i << " cost: " << paths[i].cost << "\n";
-            paths[i].print_path();
-        }
-    } else if (sources.size() > 1 && targets.size() == 1) {
-        // many to 1
-        std::deque<Path> paths;
-        pgr_dijkstra(graph, paths, sources, targets[0]);
-
-
-        std::cout << "THE OPUTPUTS ---->  total outputs: " << paths.size() << "\n";
-        for (unsigned int i = 0; i < paths.size(); ++i) {
-            if (sizeof(paths[i]) == 0) continue;  // no solution found
-            std::cout << "Path #" << i << " cost: " << paths[i].cost << "\n";
-            paths[i].print_path();
-        }
-    } else {
-        // many to many
-        std::deque<Path> paths;
-        pgr_dijkstra(graph, paths, sources, targets);
-
-        std::cout << "THE OPUTPUTS ---->  total outputs: " << paths.size() << "\n";
-        for (unsigned int i = 0; i < paths.size(); ++i) {
-            if (sizeof(paths[i]) == 0) continue;  // no solution found
-            std::cout << "Path #" << i << " cost: " << paths[i].cost << "\n";
-            paths[i].print_path();
-        }
-    }
-}
diff --git a/src/linecommand/src/driving.cpp b/src/linecommand/src/driving.cpp
deleted file mode 100644
index 8294ff6..0000000
--- a/src/linecommand/src/driving.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include <deque>
-#include <string>
-#include <vector>
-
-void process_drivingDistance(G &graph, const std::vector<std::string> &tokens) {
-      std::string::size_type sz;
-      if (tokens[1].compare("from") != 0) {
-        std::cout << "missing 'from' kewyword\n";
-        return;
-      }
-
-      std::vector< int64_t > sources;
-      unsigned int i_ptr = 2;
-
-      for ( ; i_ptr < tokens.size(); ++i_ptr) {
-          if (tokens[i_ptr].compare("dist") == 0) break;
-          try {
-            uint64_t start_vertex(stol(tokens[i_ptr], &sz));
-            sources.push_back(start_vertex);
-          } catch(...) {
-            break;
-          }
-      }
-
-      if (i_ptr == tokens.size() || tokens[i_ptr].compare("dist") != 0) {
-        std::cout << "drivDist: 'dist' kewyword not found\n";
-        return;
-      }
-
-      if (sources.size() == 0) {
-        std::cout << "drivDist: No start value found\n";
-        return;
-      }
-
-      ++i_ptr;
-      if (i_ptr == tokens.size()) {
-        std::cout << " 'distance' value not found\n";
-        return;
-      }
-
-      double distance = stod(tokens[i_ptr], &sz);
-
-      ++i_ptr;
-      bool equiCost(false);
-      if (i_ptr != tokens.size()) {
-        if (tokens[i_ptr].compare("equi") != 0) {
-          std::cout << " Unknown keyword '" << tokens[i_ptr] << "' found\n";
-          return;
-        } else {
-          equiCost = true;
-        }
-      }
-
-      std::cout << "found " << sources.size() << "starting locations\n";
-      Pgr_dijkstra< G > fn_dijkstra;
-
-      if (sources.size() == 1) {
-        std::cout << "Performing pgr_DrivingDistance for single source\n";
-        Path path;
-        pgr_drivingDistance(graph, path, sources[0], distance);
-        std::cout << "\t\t\tTHE OPUTPUT\n";
-        std::cout << "seq\tfrom\tnode\tedge\tcost\n";
-        path.print_path();
-      } else {
-        std::deque< Path >  paths;
-        pgr_drivingDistance(graph, paths, sources, distance);
-        if (equiCost == false) {
-          std::cout << "Performing pgr_DrivingDistance for multiple sources\n";
-          std::cout << "\t\t\tTHE OPUTPUT\n";
-          std::cout << "seq\tfrom\tnode\tedge\tcost\n";
-          for (const auto &path :  paths) {
-            if (sizeof(path) == 0) return;  // no solution found
-            path.print_path();
-          }
-        } else {
-          std::cout << "Performing pgr_DrivingDistance for multiple sources with equi-cost\n";
-          Path path = equi_cost(paths);
-          std::cout << "\t\t\tTHE EquiCost OPUTPUT\n";
-          std::cout << "seq\tfrom\tnode\tedge\tcost\n";
-          path.print_path();
-        }
-      }
-}
-
diff --git a/src/linecommand/src/ksp.cpp b/src/linecommand/src/ksp.cpp
deleted file mode 100644
index f4fc385..0000000
--- a/src/linecommand/src/ksp.cpp
+++ /dev/null
@@ -1,124 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-
-#include <deque>
-#include <string>
-#include <vector>
-
-template <typename G>
-void process_ksp(G &graph, const std::vector<std::string> &tokens) {
-      std::string::size_type sz;
-      if (tokens[1].compare("from") != 0) {
-        std::cout << "ksp: missing 'from' kewyword\n";
-        return;
-      }
-
-      std::vector< int64_t > sources;
-      unsigned int i_ptr = 2;
-
-      for ( ; i_ptr < tokens.size(); ++i_ptr) {
-          if (tokens[i_ptr].compare("to") == 0) break;
-          try {
-            uint64_t start_vertex(stol(tokens[i_ptr], &sz));
-            sources.push_back(start_vertex);
-          } catch(...) {
-            break;
-          }
-      }
-
-      if (i_ptr == tokens.size() || tokens[i_ptr].compare("to") != 0) {
-        std::cout << "ksp: 'to' kewyword not found\n";
-        return;
-      }
-
-      if (sources.size() == 0) {
-        std::cout << "ksp: No start value found\n";
-        return;
-      }
-
-      ++i_ptr;
-      if (i_ptr == tokens.size()) {
-        std::cout << "ksp: No 'to' values found\n";
-        return;
-      }
-
-      std::vector< int64_t > targets;
-      for ( ; i_ptr < tokens.size(); ++i_ptr) {
-        auto end_vertex(stol(tokens[i_ptr], &sz));
-        targets.push_back(end_vertex);
-      }
-
-      Pgr_ksp< G > ksp;
-
-      if (sources.size() == 1 && targets.size() == 1) {
-        // one to one
-        std::deque< Path > paths;
-        paths = ksp.Yen(graph, sources[0], targets[0], 3);  // TODO(someone) make variable
-        std::cout << "THE OPUTPUT ----" << "\n";
-        for (unsigned int i = 0; i < paths.size(); ++i) {
-           if (sizeof(paths[i]) == 0) continue;  // no solution found
-           std::cout << "Path #" << i << " cost: " << paths[i].cost << "\n";
-           paths[i].print_path();
-        }
-      } else {
-    std::cout << "ksp: unknown number of arguments\n";
-      }
-#if 0
-    // ksp is only one to 1
-    } else if (sources.size() == 1 && targets.size() > 1) {
-        // one to many
-        std::deque<Path> paths;
-        dijkstra.dijkstra(graph, paths, sources[0], targets);
-
-        std::cout << "THE OPUTPUTS ---->  total outputs: " << paths.size() << "\n";
-        for (unsigned int i = 0; i < paths.size(); ++i) {
-           if (sizeof(paths[i]) == 0) continue;  // no solution found
-           std::cout << "Path #" << i << " cost: " << paths[i].cost << "\n";
-           paths[i].print_path();
-        }
-      } else if (sources.size() > 1 && targets.size() == 1) {
-        // many to 1
-        std::deque<Path> paths;
-        dijkstra.dijkstra(graph, paths, sources, targets[0]);
-
-
-        std::cout << "THE OPUTPUTS ---->  total outputs: " << paths.size() << "\n";
-        for (unsigned int i = 0; i < paths.size(); ++i) {
-           if (sizeof(paths[i]) == 0) continue;  // no solution found
-           std::cout << "Path #" << i << " cost: " << paths[i].cost << "\n";
-           paths[i].print_path();
-        }
-      } else {
-        // many to many
-        std::deque<Path> paths;
-        dijkstra.dijkstra(graph, paths, sources, targets);
-        std::cout << "THE OPUTPUTS ---->  total outputs: " << paths.size() << "\n";
-        for (unsigned int i = 0; i < paths.size(); ++i) {
-          if (sizeof(paths[i]) == 0) continue;  // no solution found
-          std::cout << "Path #" << i << " cost: " << paths[i].cost << "\n";
-          paths[i].print_path();
-        }
-      }
-#endif
-}
diff --git a/src/linecommand/src/performance/dijkstra/Makefile b/src/linecommand/src/performance/dijkstra/Makefile
deleted file mode 100644
index 848852b..0000000
--- a/src/linecommand/src/performance/dijkstra/Makefile
+++ /dev/null
@@ -1,31 +0,0 @@
-CC= g++
-CCFLAGS=  -g -O3 -std=c++0x -Wall -pedantic  
-LDFLAGS= -lboost_program_options -lpq 
-INCFLAGS= -I /usr/include/postgresql/9.3/server/ -I /usr/include/postgresql/ 
-SOURCES= pgRouting.cpp  ./../../../../common/src/basePath_SSEC.cpp
-
-OBJECTS= $(SOURCES:.cpp=.o)
-TARGET= pgRouting
- 
-all: $(OBJECTS) $(TARGET) 
-
-$(TARGET): pgRouting.o basePath_SSEC.o 
-	$(CC)  -o $@ $^ $(LDFLAGS)
- 
-$(TARGET).o: $(TARGET).cpp ./../../../../common/src/baseGraph.hpp \
-         ./../../../../common/src/pgr_types.h \
-         ./../../../../common/src/basePath_SSEC.hpp \
-         ./../../../../dijkstra/src/pgr_dijkstra.hpp 
-	$(CC)  $(CCFLAGS) $(INCFLAGS) -c $<
- 
-#%.o: ./../../common/src/%.c ./../../common/src/%.h 
-#	g++  -c  $(INCFLAGS) $<
-
-%.o: %.cpp %.hpp 
-	$(CC)  $(CCFLAGS) $(INCFLAGS) -c $<
-
-valgrind: pgRouting
-	valgrind -v --track-origins=yes --undef-value-errors=yes --leak-check=full --show-leak-kinds=all ./mainP &> ./valgrindlog.txt
-clean:
-	rm -f *.o $(TARGET) 
-
diff --git a/src/linecommand/src/performance/dijkstra/dijkstra.hpp b/src/linecommand/src/performance/dijkstra/dijkstra.hpp
deleted file mode 100644
index a74f013..0000000
--- a/src/linecommand/src/performance/dijkstra/dijkstra.hpp
+++ /dev/null
@@ -1,139 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include <ctime>
-#include <chrono>
-
-
-template <typename G> 
-void process_dijkstra(G &graph, const std::vector<std::string> &tokens) {
-
-    std::string::size_type sz;
-    if (tokens[1].compare("from") != 0) {
-        std::cout << "missing 'from' kewyword\n";
-        return;
-    }
-
-    std::vector< int64_t > sources; 
-    unsigned int i_ptr = 2;
-
-    for ( ; i_ptr < tokens.size(); ++i_ptr) {
-        if (tokens[i_ptr].compare("to") == 0) break;
-        try {
-            uint64_t start_vertex(stol(tokens[i_ptr], &sz));
-            sources.push_back(start_vertex);
-        } catch(...) {
-            break;
-        }
-    }
-
-    if (i_ptr == tokens.size() || tokens[i_ptr].compare("to") != 0) {
-        std::cout << "dijkstra: 'dist' kewyword not found\n";
-        return;
-    }
-
-    if (sources.size() == 0) {
-        std::cout << "dijkstra: No start value found\n";
-        return;
-    }
-
-    ++i_ptr;
-    if (i_ptr == tokens.size()) {
-        std::cout << "dijkstra: No 'to' values found\n";
-        return;
-    }
-
-    std::vector< int64_t > targets; 
-    for ( ; i_ptr < tokens.size(); ++i_ptr) {
-        auto end_vertex(stol(tokens[i_ptr], &sz));
-        targets.push_back(end_vertex);
-    }
-
-
-    if (sources.size() == 1 && targets.size() == 1) {
-        // one to one
-        Path path;
-
-        // TIMING DIJKSTRA
-        std::cout << "**************\n\n";
-        clock_t begin = clock();
-        std::time_t start_t = std::time(NULL);
-        std::cout << "Execution starts at: " << std::ctime(&start_t) << "\n";
-        std::chrono::steady_clock::time_point begin_elapsed = std::chrono::steady_clock::now();
-
-
-        pgr_dijkstra(graph, path, sources[0], targets[0]);
-        clock_t end = clock();
-        double elapsed_secs = double(end - begin) / static_cast<double>(CLOCKS_PER_SEC);
-
-        std::time_t end_t = std::time(NULL);
-        std::chrono::steady_clock::time_point end_elapsed = std::chrono::steady_clock::now();
-
-        typedef std::chrono::duration<int,std::milli> millisecs_t ;
-        millisecs_t duration = std::chrono::duration_cast<millisecs_t>(end_elapsed - begin_elapsed);
-
-        std::cout << "Execution started at: " << std::ctime(&start_t);
-        std::cout << "Execution ended at:   " << std::ctime(&end_t);
-        std::cout << "Elapsed time: " << (double)duration.count()/(double)1000 << " Seconds.\n" ;
-        std::cout << "User CPU time: -> " << elapsed_secs << " seconds\n";
-        std::cout << "**************\n\n";
-        // END TIMING DIJKSTRA
-
-        std::cout << "THE OPUTPUT ---->  total cost: " << path.tot_cost() << "\n"
-            << path;
-    } else if (sources.size() == 1 && targets.size() > 1){
-        std::deque<Path> paths;
-        // one to many
-        pgr_dijkstra(graph, paths, sources[0], targets);
-
-        std::cout << "THE OPUTPUTS ---->  total outputs: " << paths.size() << "\n";
-        for (unsigned int i = 0; i < paths.size(); ++i) {
-            if (sizeof(paths[i]) == 0) continue; //no solution found
-            std::cout << "Path #" << i << " cost: " << paths[i].tot_cost() << "\n"
-                << paths[i];
-        }
-    } else if (sources.size() > 1 && targets.size() == 1){
-        // many to 1
-        std::deque<Path> paths;
-        pgr_dijkstra(graph, paths, sources, targets[0]);
-
-
-        std::cout << "THE OPUTPUTS ---->  total outputs: " << paths.size() << "\n";
-        for (unsigned int i = 0; i < paths.size(); ++i) {
-            if (sizeof(paths[i]) == 0) continue; //no solution found
-            std::cout << "Path #" << i << " cost: " << paths[i].tot_cost() << "\n"
-                << paths[i];
-        }
-    } else {
-        //many to many
-        std::deque<Path> paths;
-        pgr_dijkstra(graph, paths, sources, targets);
-
-        std::cout << "THE OPUTPUTS ---->  total outputs: " << paths.size() << "\n";
-        for (unsigned int i = 0; i < paths.size(); ++i) {
-            if (sizeof(paths[i]) == 0) continue; //no solution found
-            std::cout << "Path #" << i << " cost: " << paths[i].tot_cost() << "\n"
-                << paths[i];
-        }
-    }
-}
diff --git a/src/linecommand/src/performance/dijkstra/pgRouting.cpp b/src/linecommand/src/performance/dijkstra/pgRouting.cpp
deleted file mode 100644
index 1356b1a..0000000
--- a/src/linecommand/src/performance/dijkstra/pgRouting.cpp
+++ /dev/null
@@ -1,374 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include <boost/config.hpp>
-#include <string>
-#include <boost/program_options.hpp>
-namespace po = boost::program_options;
-
-#include <boost/graph/adjacency_list.hpp>
-
-#include <iostream>
-#include <sstream>
-#include <fstream>
-#include <deque>
-#include <unistd.h>
-#include <libpq-fe.h>
-
-
-#include "postgres.h"
-#include "./../../../../common/src/pgr_types.h"
-#include "./../../../../common/src/basePath_SSEC.hpp"
-#include "./../../../../common/src/baseGraph.hpp"
-#include "./../../../../dijkstra/src/pgr_dijkstra.hpp"
-#include "./dijkstra.hpp"
-
-
-
-/****************************************
-  SIMULATES  THE C CODE THAT LOADS THE DATA
- ****************************************/
-void import_from_file(const std::string &input_file_name, pgr_edge_t *edges, unsigned int *count, int64_t start_vertex, int64_t end_vertex, bool &found) {
-    const char* file_name = input_file_name.c_str();
-
-    std::ifstream ifs(file_name);
-    if (!ifs) {
-        std::cerr << "The file " << file_name << " can not be opened!" << std::endl;
-        exit(1);
-    }
-
-    ifs >> (*count);
-
-    long edge_id; // , start_id, end_id;
-    //double edge_weight, reverse_weight;
-    bool s_found = false;
-    bool t_found = false;
-
-    unsigned int i = 0;
-    while (i < (*count) && ifs >> edge_id) {
-        if (edge_id == -1)  break;
-        edges[i].id = edge_id;
-        ifs >> edges[i].source;
-        ifs >> edges[i].target;
-        ifs >> edges[i].cost;
-        ifs >> edges[i].reverse_cost;
-        // when loading checking if start and end are found
-        if (!s_found)
-            s_found = ((edges[i].source == start_vertex) || (edges[i].target == end_vertex));
-        if (!t_found)
-            t_found = ((edges[i].source == end_vertex) || (edges[i].target == end_vertex));
-        i++;
-    }
-    ifs.close();
-    found = s_found && t_found;
-}
-
-void get_options_description(po::options_description &od_desc) {
-    od_desc.add_options()
-        ("help", "Produce this help message.")
-        ("test,t",  po::value<bool>()->default_value(true),
-         "For testing purposes.")
-        ("dbname,d", po::value<std::string>()->required(), 
-         "Specifies the name of the database to connect to.")
-        ("host,h",  po::value<std::string>()->default_value("localhost"),
-         "Specifies the host name of the machine on which the server is running.")
-        ("port,p",  po::value<std::string>()->default_value("5432"),
-         "Port number to connect to at the server host.")
-        ("username,U",  po::value<std::string>()->default_value(getlogin()),
-         "Connect to the database as the user username instead of the default.\n (You must have permission to do so, of course.)")
-        ("password,W",  po::value<std::string>()->default_value(""),
-         "User's the password.\n")
-        ;
-}
-
-
-int process_command_line(
-        po::variables_map &vm, 
-        po::options_description &od_desc) {
-
-    if (vm.count("help")) {
-        std::cout << od_desc << "\n";
-        return 0;
-    }
-
-    if (vm.count("dbname")) 
-        std::cout << "dbname = " << vm["dbname"].as<std::string>() << "\n";
-    else
-        std::cout << "Parameter: dbname missing\n";
-
-    if (vm.count("host")) 
-        std::cout << "host = " << vm["host"].as<std::string>() << "\n";
-    else
-        std::cout << "Parameter: host missing\n";
-
-    if (vm.count("port")) 
-        std::cout << "port = " << vm["port"].as<std::string>() << "\n";
-    else
-        std::cout << "Parameter: port missing\n";
-
-    if (vm.count("username")) 
-        std::cout << "username = " << vm["username"].as<std::string>() << "\n";
-    else
-        std::cout << "Parameter: username missing\n";
-
-    if (vm.count("password")) 
-        std::cout << "password = " << vm["password"].as<std::string>() << "\n";
-    else
-        std::cout << "Parameter: password missing\n";
-
-    if (vm.count("dbname") & vm.count("username") & vm.count("host") & vm.count("password")) {
-        std::cout << "Parameters: \n"
-            << vm["dbname"].as<std::string>() << "\n"
-            << vm["username"].as<std::string>() << "\n"
-            << vm["password"].as<std::string>() << "\n"
-            << vm["host"].as<std::string>() << ".\n";
-        return 2;
-    } else {
-        std::cout << "Missing parameter.\n";
-        std::cout << od_desc << "\n";
-        return 1;
-    }
-}
-
-
-    static void
-exit_nicely(PGconn *conn)
-{
-    PQfinish(conn);
-    exit(1);
-}
-
-
-
-template <typename G> 
-void process(G graph, pgr_edge_t *data_edges, int row_count) {
-    graph.graph_insert_data(data_edges, row_count);
-    std::vector<int64_t> targets;
-    std::string::size_type sz;
-
-
-    // read the command and break into tokens
-    std::string cmd;
-    std::string buf;
-    std::vector<std::string> tokens;
-    while (true) {
-        std::cout << "\n\n\n\n\t\t COMMANDS\n\n "
-
-            << "\n\tDIJKSTRA\n"
-            << "(Input the command separating with spaces)\n"
-            << "\tdijkstra from  to \n"
-            << "\tdijkstra from  to1 to2 to3\n\n"
-
-            << "\n\tFINISH\n"
-            << "\tend\n\n"
-            << ">>>";
-        tokens.clear();
-        targets.clear();
-        cmd = "";
-        std::getline(std::cin, cmd);
-        std::stringstream ss(cmd);
-        while (ss >> buf) {
-            tokens.push_back(buf);
-        }
-
-        if (tokens.size() == 0) {
-            std::cout << "No command received\n";
-            continue;
-        }
-
-        if (tokens[0].compare("end")==0) return;
-
-        if (tokens[0].compare("dijkstra") != 0) {
-            std::cout << "Command: " << cmd << " not found\n";
-            continue;
-        }
-
-
-        if (tokens[0].compare("dijkstra") == 0) {
-            process_dijkstra(graph, tokens);
-        }
-    }
-}
-
-
-
-int main(int ac, char* av[]) {
-    po::options_description od_desc("Allowed options");
-    get_options_description(od_desc);
-
-    po::variables_map vm;
-    po::store(po::parse_command_line(ac, av, od_desc), vm);
-    if (vm.count("help")) {
-        std::cout << od_desc << "\n"; 
-        return 0;
-    }
-
-    try{
-        po::notify(vm);
-    }
-    catch(...){
-        std::cout << od_desc << "\n"; 
-        return 0;	
-    } 
-
-    auto ret_val = process_command_line(vm, od_desc);
-    if (ret_val != 2) return ret_val;
-
-
-    auto db_dbase(vm["dbname"].as<std::string>());
-    auto db_host(vm["host"].as<std::string>());
-    auto db_port(vm["port"].as<std::string>());
-    auto db_username(vm["username"].as<std::string>());
-    auto db_pwd(vm["password"].as<std::string>());
-    auto test(vm["test"].as<bool>());
-    auto db_conn = "host=" + db_host
-            + " user=" +  db_username
-            + " dbname=" + db_dbase
-            + " port=" + db_port
-            + " password=" + db_pwd;
-
-    std::cout << "connection: " << db_conn <<"\n";
-
-    const char *conninfo = db_conn.c_str();
-    PGconn     *conn;
-    PGresult   *res;
-    int rec_count, col_count;
-
-
-    conn = PQconnectdb(conninfo);
-    /* Check to see that the backend connection was successfully made */
-    if (PQstatus(conn) != CONNECTION_OK)
-    {
-        fprintf(stderr, "Connection to database failed: %s",
-                PQerrorMessage(conn));
-        exit_nicely(conn);
-        exit(0);
-    }
-
-    std::string data_sql;
-    if (test) {
-        data_sql = "select id, source, target, cost, reverse_cost from edge_table order by id";
-    } else {
-        std::cout << "Input data query: ";
-        std::getline (std::cin,data_sql);
-    }
-    std::cout << "\nThe data is from:" << data_sql <<"\n";
-
-    res = PQexec(conn, data_sql.c_str());
-
-    if (PQresultStatus(res) != PGRES_TUPLES_OK) {
-        std::cout << "We did not get any data!\n";
-        exit_nicely(conn);
-        exit(1);
-    }
-
-    rec_count = PQntuples(res);
-    col_count = PQnfields(res);
-    if (col_count > 5 || col_count < 4) {
-        std::cout << "Max number of columns 5\n";
-        std::cout << "Min number of columns 4\n";
-        exit_nicely(conn);
-        exit(1);
-    }
-
-    auto id_fnum = PQfnumber(res, "id");
-    auto source_fnum = PQfnumber(res, "source");
-    auto target_fnum = PQfnumber(res, "target");
-    auto cost_fnum = PQfnumber(res, "cost");
-    auto reverse_fnum = PQfnumber(res, "reverse_cost");
-
-
-
-    pgr_edge_t *data_edges;
-    data_edges = (pgr_edge_t *) malloc(rec_count * sizeof(pgr_edge_t));
-
-
-    printf("We received %d records.\n", rec_count);
-    puts("==========================");
-
-
-
-    std::string::size_type sz;
-    std::string str;
-
-    for (int row = 0; row < rec_count; ++row) {
-        str = std::string(PQgetvalue(res, row, id_fnum));
-        data_edges[row].id = stol(str, &sz);
-
-        str = std::string(PQgetvalue(res, row, source_fnum));
-        data_edges[row].source = stol(str, &sz);
-
-        str = std::string(PQgetvalue(res, row, target_fnum));
-        data_edges[row].target = stol(str, &sz);
-
-        str = std::string(PQgetvalue(res, row, cost_fnum));
-        data_edges[row].cost = stod(str, &sz);
-
-        if (reverse_fnum != -1) {
-            str = std::string(PQgetvalue(res, row, reverse_fnum));
-            data_edges[row].reverse_cost = stod(str, &sz);
-        } 
-#if 0
-        std::cout << "\tid: " << data_edges[row].id << "\t";
-        std::cout << "\tsource: " << data_edges[row].source << "\t";
-        std::cout << "\ttarget: " << data_edges[row].target << "\t";
-        std::cout << "\tcost: " << data_edges[row].cost << "\t";
-        if (reverse_fnum != -1) {
-            std::cout << "\treverse: " << data_edges[row].reverse_cost << "\t";
-        }
-        std::cout << "\n";
-#endif
-    }
-
-
-    puts("==========================");
-
-    PQclear(res);
-
-    PQfinish(conn);
-
-
-    //////////////////////  END READING DATA FROM DATABASE ///////////////////
-
-    std::string directed;
-    std::cout << "Is the graph directed [N,n]? default[Y]";
-    std::getline(std::cin,directed);
-    graphType gType =  (directed.compare("N")==0 || directed.compare("n")==0)? UNDIRECTED: DIRECTED;
-    bool directedFlag =  (directed.compare("N")==0 || directed.compare("n")==0)? false: true;
-
-
-    const int initial_size = rec_count;
-
-
-    Pgr_base_graph< DirectedGraph > digraph(gType, initial_size);
-    Pgr_base_graph< UndirectedGraph > undigraph(gType, initial_size);
-
-    if (directedFlag) {
-        process(digraph, data_edges, rec_count);
-    } else {
-        process(undigraph, data_edges, rec_count);
-    }
-
-}
-
-
diff --git a/src/linecommand/src/pgRouting.cpp b/src/linecommand/src/pgRouting.cpp
deleted file mode 100644
index e768141..0000000
--- a/src/linecommand/src/pgRouting.cpp
+++ /dev/null
@@ -1,387 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-#include <boost/config.hpp>
-#include <string>
-#include <vector>
-namespace po = boost::program_options;
-
-
-#include <iostream>
-#include <sstream>
-#include <fstream>
-#include <deque>
-#include <unistd.h>
-#include <libpq-fe.h>
-
-#include <boost/program_options.hpp>
-#include <boost/graph/adjacency_list.hpp>
-
-#include "postgres.h"
-#include "./../../common/src/pgr_types.h"
-#include "./../../common/src/basePath_SSEC.hpp"
-#include "./../../dijkstra/src/pgr_dijkstra.hpp"
-#include "./../../warshall/src/pgr_warshall.hpp"
-#include "./../../ksp/src/pgr_ksp.hpp"
-#include "./driving.cpp"
-#include "./dijkstra.hpp"
-#include "./ksp.cpp"
-#include "./warshall.hpp"
-
-
-
-/****************************************
-  SIMULATES  THE C CODE THAT LOADS THE DATA
- ****************************************/
-void import_from_file(const std::string &input_file_name, pgr_edge_t *edges, unsigned int *count, int64_t start_vertex, int64_t end_vertex, bool &found) {
-    const char* file_name = input_file_name.c_str();
-
-    std::ifstream ifs(file_name);
-    if (!ifs) {
-        std::cerr << "The file " << file_name << " can not be opened!" << std::endl;
-        exit(1);
-    }
-
-    ifs >> (*count);
-
-    int64_t edge_id;  // , start_id, end_id;
-    // double edge_weight, reverse_weight;
-    bool s_found = false;
-    bool t_found = false;
-
-    unsigned int i = 0;
-    while (i < (*count) && ifs >> edge_id) {
-        if (edge_id  ==  -1)  break;
-        edges[i].id = edge_id;
-        ifs >> edges[i].source;
-        ifs >> edges[i].target;
-        ifs >> edges[i].cost;
-        ifs >> edges[i].reverse_cost;
-        // when loading checking if start and end are found
-        if (!s_found)
-            s_found = ((edges[i].source  ==  start_vertex) || (edges[i].target  ==  end_vertex));
-        if (!t_found)
-            t_found = ((edges[i].source  ==  end_vertex) || (edges[i].target  ==  end_vertex));
-        i++;
-    }
-    ifs.close();
-    found = s_found && t_found;
-}
-
-void get_options_description(po::options_description &od_desc) {
-    od_desc.add_options()
-        ("help", "Produce this help message.")
-        ("test,t",  po::value<bool>()->default_value(true),
-         "For testing purposes.")
-        ("dbname,d", po::value<std::string>()->required(),
-         "Specifies the name of the database to connect to.")
-        ("host,h",  po::value<std::string>()->default_value("localhost"),
-         "Specifies the host name of the machine on which the server is running.")
-        ("port,p",  po::value<std::string>()->default_value("5432"),
-         "Port number to connect to at the server host.")
-        ("username,U",  po::value<std::string>()->default_value(getlogin()),
-         "Connect to the database as the user username instead of the default.\n (You must have permission to do so, of course.)")
-        ("password,W",  po::value<std::string>()->default_value(""),
-         "User's the password.\n");
-#if 0
-    ("no-password,w",  po::value<bool>()->implicit_value(false),
-     "Never issue a password prompt.\n"
-     "If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail.\n"
-     "This option can be useful in batch jobs and scripts where no user is present to enter a password.")
-#endif
-}
-
-
-int process_command_line(
-        po::variables_map &vm,
-        po::options_description &od_desc) {
-    if (vm.count("help")) {
-        std::cout << od_desc << "\n";
-        return 0;
-    }
-
-    if (vm.count("dbname"))
-        std::cout << "dbname = " << vm["dbname"].as<std::string>() << "\n";
-    else
-        std::cout << "Parameter: dbname missing\n";
-
-    if (vm.count("host"))
-        std::cout << "host = " << vm["host"].as<std::string>() << "\n";
-    else
-        std::cout << "Parameter: host missing\n";
-
-    if (vm.count("port"))
-        std::cout << "port = " << vm["port"].as<std::string>() << "\n";
-    else
-        std::cout << "Parameter: port missing\n";
-
-    if (vm.count("username"))
-        std::cout << "username = " << vm["username"].as<std::string>() << "\n";
-    else
-        std::cout << "Parameter: username missing\n";
-
-    if (vm.count("dbname") & vm.count("username") & vm.count("host")) {
-        std::cout << "Parameters: \n"
-            << vm["dbname"].as<std::string>() << "\n"
-            << vm["username"].as<std::string>() << "\n"
-            << vm["host"].as<std::string>() << ".\n";
-        return 2;
-    } else {
-        std::cout << "Missing parameter.\n";
-        std::cout << od_desc << "\n";
-        return 1;
-    }
-}
-
-
-static void
-exit_nicely(PGconn *conn) {
-    PQfinish(conn);
-    exit(1);
-}
-
-
-
-template <typename G>
-void process(G graph, pgr_edge_t *data_edges, int row_count) {
-    graph.graph_insert_data(data_edges, row_count);
-    std::vector<int64_t> targets;
-    std::string::size_type sz;
-
-
-    // read the command and break into tokens
-    std::string cmd;
-    std::string buf;
-    std::vector<std::string> tokens;
-    while (true) {
-        std::cout << "\n\n\n\n\t\t COMMANDS\n\n "
-            << "\tWARSHALL\n"
-            << "\twarshall\n"
-
-            << "\n\tKSP\n"
-            << "(Input the command separating with spaces)\n"
-            << "\tksp from  to \n"
-
-            << "\n\tDIJKSTRA\n"
-            << "(Input the command separating with spaces)\n"
-            << "\tdijkstra from  to \n"
-            << "\tdijkstra from  to1 to2 to3\n\n"
-
-            << "\n\tDRIVING DISTANCE\n"
-            << "(Use kewywords)\n"
-            << "\tdrivDist from <id> [<id> ...] dist <distance> [equi]\n"
-
-            << "\n\tFINISH\n"
-            << "\tend\n\n"
-            << ">>>";
-        tokens.clear();
-        targets.clear();
-        cmd = "";
-        std::getline(std::cin, cmd);
-        std::stringstream ss(cmd);
-        while (ss >> buf) {
-            tokens.push_back(buf);
-        }
-
-        if (tokens.size()  ==  0) {
-            std::cout << "No command received\n";
-            continue;
-        }
-
-        if (tokens[0].compare("end") == 0) return;
-
-        if (tokens[0].compare("dijkstra") != 0
-                && tokens[0].compare("warshall") != 0
-                && tokens[0].compare("ksp") != 0
-                && tokens[0].compare("drivDist") != 0 ) {
-            std::cout << "Command: " << cmd << " not found\n";
-            continue;
-        }
-
-
-        if (tokens[0].compare("dijkstra")  ==  0) {
-            process_dijkstra(graph, tokens);
-        } else if (tokens[0].compare("ksp")  ==  0) {
-            process_ksp(graph, tokens);
-        } else if (tokens[0].compare("warshall")  ==  0) {
-            process_warshall(graph, tokens);
-        } else {
-            process_drivingDistance(graph, tokens);
-        }
-    }
-}
-
-
-
-int main(int ac, char* av[]) {
-    po::options_description od_desc("Allowed options");
-    get_options_description(od_desc);
-
-    po::variables_map vm;
-    po::store(po::parse_command_line(ac, av, od_desc), vm);
-    if (vm.count("help")) {
-        std::cout << od_desc << "\n";
-        return 0;
-    }
-
-    try {
-        po::notify(vm);
-    } catch(...) {
-        std::cout << od_desc << "\n";
-        return 0;
-    }
-
-    auto ret_val = process_command_line(vm, od_desc);
-    if (ret_val != 2) return ret_val;
-
-
-    auto db_dbase(vm["dbname"].as<std::string>());
-    db_dbase = "dbname = " + db_dbase;
-    auto db_host(vm["host"].as<std::string>());
-    auto db_port(vm["port"].as<std::string>());
-    auto db_username(vm["username"].as<std::string>());
-    auto db_pwd(vm["password"].as<std::string>());
-    auto test(vm["test"].as<bool>());
-    // auto db_no_pwd(vm["no-password"].as<std::string>());
-
-    const char *conninfo = db_dbase.c_str();
-    PGconn     *conn;
-    PGresult   *res;
-    int rec_count, col_count;
-
-
-    conn = PQconnectdb(conninfo);
-    /* Check to see that the backend connection was successfully made */
-    if (PQstatus(conn) != CONNECTION_OK) {
-        fprintf(stderr, "Connection to database failed: %s",
-                PQerrorMessage(conn));
-        exit_nicely(conn);
-        exit(0);
-    }
-
-    std::string data_sql;
-    if (test) {
-        data_sql = "select id, source, target, cost, -1 as reverse_cost  from table1 order by id";
-        // data_sql = "select id, source, target, cost, reverse_cost from edge_table order by id";
-    } else {
-        std::cout << "Input data query: ";
-        std::getline(std::cin, data_sql);
-    }
-    std::cout << "\nThe data is from:" << data_sql <<"\n";
-
-    res = PQexec(conn, data_sql.c_str());
-
-    if (PQresultStatus(res) != PGRES_TUPLES_OK) {
-        std::cout << "We did not get any data!\n";
-        exit_nicely(conn);
-        exit(1);
-    }
-
-    rec_count = PQntuples(res);
-    col_count = PQnfields(res);
-    if (col_count > 5 || col_count < 4) {
-        std::cout << "Max number of columns 5\n";
-        std::cout << "Min number of columns 4\n";
-        exit_nicely(conn);
-        exit(1);
-    }
-
-    auto id_fnum = PQfnumber(res, "id");
-    auto source_fnum = PQfnumber(res, "source");
-    auto target_fnum = PQfnumber(res, "target");
-    auto cost_fnum = PQfnumber(res, "cost");
-    auto reverse_fnum = PQfnumber(res, "reverse_cost");
-
-
-
-    pgr_edge_t *data_edges;
-    data_edges = (pgr_edge_t *) malloc(rec_count * sizeof(pgr_edge_t));
-
-
-    printf("We received %d records.\n", rec_count);
-    puts(" ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  == ");
-
-
-
-    std::string::size_type sz;
-    std::string str;
-
-    for (int row = 0; row < rec_count; ++row) {
-        str = std::string(PQgetvalue(res, row, id_fnum));
-        data_edges[row].id = stol(str, &sz);
-
-        str = std::string(PQgetvalue(res, row, source_fnum));
-        data_edges[row].source = stol(str, &sz);
-
-        str = std::string(PQgetvalue(res, row, target_fnum));
-        data_edges[row].target = stol(str, &sz);
-
-        str = std::string(PQgetvalue(res, row, cost_fnum));
-        data_edges[row].cost = stod(str, &sz);
-
-        if (reverse_fnum != -1) {
-            str = std::string(PQgetvalue(res, row, reverse_fnum));
-            data_edges[row].reverse_cost = stod(str, &sz);
-        }
-#if 0
-        std::cout << "\tid: " << data_edges[row].id << "\t";
-        std::cout << "\tsource: " << data_edges[row].source << "\t";
-        std::cout << "\ttarget: " << data_edges[row].target << "\t";
-        std::cout << "\tcost: " << data_edges[row].cost << "\t";
-        if (reverse_fnum != -1) {
-            std::cout << "\treverse: " << data_edges[row].reverse_cost << "\t";
-        }
-        std::cout << "\n";
-#endif
-    }
-
-
-    puts(" ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  ==  == ");
-
-    PQclear(res);
-
-    PQfinish(conn);
-
-
-    //////////////////////  END READING DATA FROM DATABASE ///////////////////
-
-    std::string directed;
-    std::cout << "Is the graph directed [N,n]? default[Y]";
-    std::getline(std::cin, directed);
-    graphType gType =  (directed.compare("N") == 0 || directed.compare("n") == 0)? UNDIRECTED: DIRECTED;
-    bool directedFlag =  (directed.compare("N") == 0 || directed.compare("n") == 0)? false: true;
-
-
-    const int initial_size = rec_count;
-
-
-    Pgr_base_graph< DirectedGraph > digraph(gType, initial_size);
-    Pgr_base_graph< UndirectedGraph > undigraph(gType, initial_size);
-
-    if (directedFlag) {
-        process(digraph, data_edges, rec_count);
-    } else {
-        process(undigraph, data_edges, rec_count);
-    }
-}
-
-
diff --git a/src/linecommand/src/warshall.hpp b/src/linecommand/src/warshall.hpp
deleted file mode 100644
index cbf0115..0000000
--- a/src/linecommand/src/warshall.hpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/*PGR
-
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-vicky_vergara at hotmail.com
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-*/
-
-#include <string>
-#include <vector>
-#include "./../../warshall/src/pgr_warshall.hpp"
-
-template <typename G>
-void process_warshall(G &graph, const std::vector<std::string> &tokens) {
-      std::string::size_type sz;
-
-
-      if (tokens.size() == 1) {
-        std::cout << "Performing warshall\n";
-        std::vector< Matrix_cell_t> matrix_rows;
-
-        pgr_warshall(graph, matrix_rows);
-
-        std::cout << "\t\t\tTHE OPUTPUT\n";
-        std::cout << "seq\tfrom\tto\tcost\n";
-        size_t seq = 0;
-        for (size_t i = 0; i < matrix_rows.size(); i++) {
-            std::cout << seq++ << "\t" << matrix_rows[i].from_vid << "\t" <<  matrix_rows[i].to_vid << "\t" << matrix_rows[i].cost << "\n";
-        }
-#ifdef TEST_POSTGRES
-        size_t result_tuple_count;
-        Matrix_cell_t *postgres_rows = NULL;
-        pgr_warshall(graph, result_tuple_count, &postgres_rows);
-        std::cout << "\t\t\tTHE POSTGRESQL OPUTPUT\n";
-        std::cout << "seq\tfrom\tto\tcost\n";
-        seq = 0;
-        for (size_t i = 0; i < result_tuple_count; i++) {
-            std::cout << seq++ << "\t" << postgres_rows[i].from_vid << "\t" <<  postgres_rows[i].to_vid << "\t" << postgres_rows[i].cost << "\n";
-        }
-#endif  // TEST_POSTGRES
-      } else {
-        std::cout << "unknown number of parameters\n";
-      }
-}
-
diff --git a/src/max_flow/src/CMakeLists.txt b/src/max_flow/CMakeLists.txt
similarity index 100%
rename from src/max_flow/src/CMakeLists.txt
rename to src/max_flow/CMakeLists.txt
diff --git a/src/max_flow/demo/slide_demo.sql b/src/max_flow/demo/slide_demo.sql
deleted file mode 100644
index 9b2f0df..0000000
--- a/src/max_flow/demo/slide_demo.sql
+++ /dev/null
@@ -1,45 +0,0 @@
-/*PGR-GNU*****************************************************************
-Copyright (c) 2016 Andrea Nardelli
-Mail: nrd.nardelli at gmail.com
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-DROP TABLE IF EXISTS flow_example;
-CREATE TABLE flow_example (
-	id SERIAL,
-	source INTEGER,
-	target INTEGER,
-	capacity INTEGER
-	);
-
-INSERT INTO flow_example (source, target, capacity) VALUES (1,2,10);
-INSERT INTO flow_example (source, target, capacity) VALUES (1,3,10);
-INSERT INTO flow_example (source, target, capacity) VALUES (2,3,2);
-INSERT INTO flow_example (source, target, capacity) VALUES (2,4,4);
-INSERT INTO flow_example (source, target, capacity) VALUES (2,5,8);
-INSERT INTO flow_example (source, target, capacity) VALUES (3,5,9);
-INSERT INTO flow_example (source, target, capacity) VALUES (4,6,10);
-INSERT INTO flow_example (source, target, capacity) VALUES (5,4,6);
-INSERT INTO flow_example (source, target, capacity) VALUES (5,6,10);
-
-
-SELECT * FROM pgr_maxflowedmondskarp(
-    'SELECT id, source, target, capacity FROM flow_example',
-     source_vertex := 1,
-     sink_vertex := 6
-);
\ No newline at end of file
diff --git a/src/max_flow/edge_disjoint_paths.c b/src/max_flow/edge_disjoint_paths.c
new file mode 100644
index 0000000..adf78e0
--- /dev/null
+++ b/src/max_flow/edge_disjoint_paths.c
@@ -0,0 +1,195 @@
+/*PGR-GNU*****************************************************************
+File: edge_disjoint_paths_many_to_many.c
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer:
+Copyright (c) 2016 Andrea Nardelli
+Mail: nrd.nardelli at gmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "c_common/postgres_connection.h"
+#include "utils/array.h"
+
+#include "c_common/debug_macro.h"
+#include "c_common/e_report.h"
+#include "c_common/time_msg.h"
+#include "c_common/edges_input.h"
+#include "c_common/arrays_input.h"
+#include "drivers/max_flow/edge_disjoint_paths_driver.h"
+
+PGDLLEXPORT Datum
+edge_disjoint_paths_many_to_many(PG_FUNCTION_ARGS);
+
+static
+void
+process(
+    char *edges_sql,
+    ArrayType *starts,
+    ArrayType *ends,
+
+    bool directed,
+    General_path_element_t **result_tuples,
+    size_t *result_count) {
+    pgr_SPI_connect();
+
+    size_t size_source_verticesArr = 0;
+    int64_t* source_vertices =
+        pgr_get_bigIntArray(&size_source_verticesArr, starts);
+
+    size_t size_sink_verticesArr = 0;
+    int64_t* sink_vertices =
+        pgr_get_bigIntArray(&size_sink_verticesArr, ends);
+
+
+    pgr_edge_t *edges = NULL;
+    size_t total_edges = 0;
+
+    pgr_get_edges(edges_sql, &edges, &total_edges);
+
+    if (total_edges == 0) {
+        if (source_vertices) pfree(source_vertices);
+        if (sink_vertices) pfree(sink_vertices);
+        pgr_SPI_finish();
+        return;
+    }
+
+
+    PGR_DBG("Starting timer");
+    clock_t start_t = clock();
+    char* log_msg = NULL;
+    char* notice_msg = NULL;
+    char* err_msg = NULL;
+
+    do_pgr_edge_disjoint_paths(
+        edges, total_edges,
+        source_vertices, size_source_verticesArr,
+        sink_vertices, size_sink_verticesArr,
+        directed,
+
+        result_tuples, result_count,
+
+        &log_msg,
+        &notice_msg,
+        &err_msg);
+
+    time_msg("pgr_edgeDisjointPaths(many to many)", start_t, clock());
+
+    if (edges) pfree(edges);
+    if (source_vertices) pfree(source_vertices);
+    if (sink_vertices) pfree(sink_vertices);
+
+    if (err_msg && (*result_tuples)) {
+        pfree(*result_tuples);
+        (*result_tuples) = NULL;
+        (*result_count) = 0;
+    }
+
+    pgr_global_report(log_msg, notice_msg, err_msg);
+
+    if (log_msg) pfree(log_msg);
+    if (notice_msg) pfree(notice_msg);
+    if (err_msg) pfree(err_msg);
+    pgr_SPI_finish();
+}
+
+PG_FUNCTION_INFO_V1(edge_disjoint_paths_many_to_many);
+PGDLLEXPORT Datum
+edge_disjoint_paths_many_to_many(PG_FUNCTION_ARGS) {
+    FuncCallContext *funcctx;
+    TupleDesc tuple_desc;
+
+    General_path_element_t *result_tuples = NULL;
+    size_t result_count = 0;
+
+    if (SRF_IS_FIRSTCALL()) {
+        MemoryContext oldcontext;
+        funcctx = SRF_FIRSTCALL_INIT();
+        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
+
+
+
+        process(
+                text_to_cstring(PG_GETARG_TEXT_P(0)),
+                PG_GETARG_ARRAYTYPE_P(1),
+                PG_GETARG_ARRAYTYPE_P(2),
+                PG_GETARG_BOOL(3),
+                &result_tuples,
+                &result_count);
+
+
+#if PGSQL_VERSION > 95
+        funcctx->max_calls = result_count;
+#else
+        funcctx->max_calls = (uint32_t)result_count;
+#endif
+        funcctx->user_fctx = result_tuples;
+        if (get_call_result_type(fcinfo, NULL, &tuple_desc)
+                != TYPEFUNC_COMPOSITE) {
+            ereport(ERROR,
+                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+                     errmsg("function returning record called in context "
+                         "that cannot accept type record")));
+        }
+
+        funcctx->tuple_desc = tuple_desc;
+        MemoryContextSwitchTo(oldcontext);
+    }
+
+    funcctx = SRF_PERCALL_SETUP();
+    tuple_desc = funcctx->tuple_desc;
+    result_tuples = (General_path_element_t *) funcctx->user_fctx;
+
+    if (funcctx->call_cntr < funcctx->max_calls) {
+        HeapTuple tuple;
+        Datum result;
+        Datum *values;
+        bool *nulls;
+
+
+        values = palloc(9 * sizeof(Datum));
+        nulls = palloc(9 * sizeof(bool));
+
+        size_t i;
+        for (i = 0; i < 9; ++i) {
+            nulls[i] = false;
+        }
+
+        values[0] = Int32GetDatum(funcctx->call_cntr + 1);
+        values[1] = Int32GetDatum(
+                result_tuples[funcctx->call_cntr].start_id + 1);
+        values[2] = Int32GetDatum(result_tuples[funcctx->call_cntr].seq);
+        values[3] = Int64GetDatum(result_tuples[funcctx->call_cntr].start_id);
+        values[4] = Int64GetDatum(result_tuples[funcctx->call_cntr].end_id);
+        values[5] = Int64GetDatum(result_tuples[funcctx->call_cntr].node);
+        values[6] = Int64GetDatum(result_tuples[funcctx->call_cntr].edge);
+        values[7] = Float8GetDatum(result_tuples[funcctx->call_cntr].cost);
+        values[8] = Float8GetDatum(result_tuples[funcctx->call_cntr].agg_cost);
+
+        tuple = heap_form_tuple(tuple_desc, values, nulls);
+        result = HeapTupleGetDatum(tuple);
+        SRF_RETURN_NEXT(funcctx, result);
+    } else {
+        SRF_RETURN_DONE(funcctx);
+    }
+}
+
diff --git a/src/max_flow/edge_disjoint_paths_driver.cpp b/src/max_flow/edge_disjoint_paths_driver.cpp
new file mode 100644
index 0000000..ac2274a
--- /dev/null
+++ b/src/max_flow/edge_disjoint_paths_driver.cpp
@@ -0,0 +1,186 @@
+/*PGR-GNU*****************************************************************
+File: edge_disjoint_paths_many_to_many_driver.cpp
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer:
+Copyright (c) 2016 Andrea Nardelli
+Mail: nrd.nardelli at gmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "drivers/max_flow/edge_disjoint_paths_driver.h"
+
+#include <sstream>
+#include <vector>
+#include <set>
+
+#include "max_flow/pgr_maxflow.hpp"
+
+#include "cpp_common/identifiers.hpp"
+#include "cpp_common/pgr_alloc.hpp"
+#include "cpp_common/pgr_assert.h"
+
+
+static
+std::vector<General_path_element_t>
+single_execution(
+        std::vector<pgr_edge_t> edges,
+        int64_t source,
+        int64_t target,
+        bool directed) {
+    std::set<int64_t> set_source_vertices;
+    std::set<int64_t> set_sink_vertices;
+    set_source_vertices.insert(source);
+    set_sink_vertices.insert(target);
+    pgrouting::graph::PgrFlowGraph G(
+            edges,
+            set_source_vertices,
+            set_sink_vertices, directed);
+
+    /*
+     * boykov_kolmogorov is only for directed graphs
+     */
+    return G.edge_disjoint_paths();
+}
+
+void
+do_pgr_edge_disjoint_paths(
+    pgr_edge_t *data_edges,
+    size_t total_edges,
+    int64_t *sources,
+    size_t size_source_verticesArr,
+    int64_t *sinks,
+    size_t size_sink_verticesArr,
+    bool directed,
+    General_path_element_t **return_tuples,
+    size_t *return_count,
+    char** log_msg,
+    char** notice_msg,
+    char **err_msg) {
+    std::ostringstream log;
+    std::ostringstream notice;
+    std::ostringstream err;
+    try {
+        std::set<int64_t> set_source_vertices(
+                sources, sources + size_source_verticesArr);
+        std::set<int64_t> set_sink_vertices(
+                sinks, sinks + size_sink_verticesArr);
+        std::vector<pgr_edge_t> edges(
+                data_edges, data_edges + total_edges);
+
+
+        std::vector<General_path_element_t> paths;
+        for (const auto &s : set_source_vertices) {
+            for (const auto &t : set_sink_vertices) {
+                auto path = single_execution(
+                        edges,
+                        s,
+                        t,
+                        directed);
+                paths.insert(paths.end(), path.begin(), path.end());
+            }
+        }
+
+        if (paths.empty()) {
+            *return_tuples = nullptr;
+            *return_count = 0;
+            return;
+        }
+
+        /*
+         * Initializing the cost
+         */
+        for (auto &r : paths) {
+            r.agg_cost = r.cost = 0;
+        }
+
+        /*
+         * Calculating the cost
+         */
+        auto found = paths.size();
+        for (const auto &e : edges) {
+            for (auto &r : paths) {
+                if (r.edge == e.id) {
+                    r.cost = (r.node == e.source) ?
+                        e.cost : e.reverse_cost;
+                    --found;
+                }
+            }
+            if (found == 0) break;
+        }
+
+        /*
+         * Calculating the agg_cost
+         */
+        auto prev = paths[0];
+        for (auto &r : paths) {
+            if (r.seq == 1) {
+                r.agg_cost = 0;
+            } else {
+                r.agg_cost = prev.agg_cost + prev.cost;
+            }
+            prev = r;
+        }
+
+        /*
+         * Numbering the paths
+         */
+        int path_id(0);
+        for (auto &r : paths) {
+            r.start_id = path_id;
+            if (r.edge == -1) ++path_id;
+        }
+
+
+        (*return_tuples) = pgr_alloc(paths.size(), (*return_tuples));
+        for (size_t i = 0; i < paths.size(); ++i) {
+            (*return_tuples)[i] = paths[i];
+        }
+        *return_count = paths.size();
+
+
+        *log_msg = log.str().empty()?
+            *log_msg :
+            pgr_msg(log.str().c_str());
+        *notice_msg = notice.str().empty()?
+            *notice_msg :
+            pgr_msg(notice.str().c_str());
+    } catch (AssertFailedException &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch (std::exception &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch(...) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << "Caught unknown exception!";
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    }
+}
diff --git a/src/max_flow/max_flow.c b/src/max_flow/max_flow.c
new file mode 100644
index 0000000..23d6906
--- /dev/null
+++ b/src/max_flow/max_flow.c
@@ -0,0 +1,224 @@
+/*PGR-GNU*****************************************************************
+File: max_flow_many_to_many.c
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer:
+Copyright (c) 2016 Andrea Nardelli
+Mail: nrd.nardelli at gmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "c_common/postgres_connection.h"
+#include "utils/array.h"
+
+
+#include "c_common/debug_macro.h"
+#include "c_common/e_report.h"
+#include "c_common/time_msg.h"
+#include "c_common/edges_input.h"
+#include "c_common/arrays_input.h"
+#include "drivers/max_flow/max_flow_driver.h"
+
+PGDLLEXPORT Datum
+max_flow_many_to_many(PG_FUNCTION_ARGS);
+
+static
+void
+process(
+        char *edges_sql,
+        ArrayType *starts,
+        ArrayType *ends,
+        int algorithm,
+        bool only_flow,
+        pgr_flow_t **result_tuples,
+        size_t *result_count) {
+    if (algorithm < 1 || algorithm > 3) {
+        elog(ERROR, "Unknown algorithm");
+    }
+
+    pgr_SPI_connect();
+
+    size_t size_source_verticesArr = 0;
+    int64_t* source_vertices =
+        pgr_get_bigIntArray(&size_source_verticesArr, starts);
+
+    size_t size_sink_verticesArr = 0;
+    int64_t* sink_vertices =
+        pgr_get_bigIntArray(&size_sink_verticesArr, ends);
+
+    pgr_edge_t *edges = NULL;
+
+    size_t total_edges = 0;
+
+    /* NOTE:
+     * For flow, cost and reverse_cost are really capacity and reverse_capacity
+     */
+    pgr_get_flow_edges(edges_sql, &edges, &total_edges);
+
+    if (total_edges == 0) {
+        if (source_vertices) pfree(source_vertices);
+        if (sink_vertices) pfree(sink_vertices);
+        pgr_SPI_finish();
+        return;
+    }
+
+
+    PGR_DBG("Starting timer");
+    clock_t start_t = clock();
+    char* log_msg = NULL;
+    char* notice_msg = NULL;
+    char *err_msg = NULL;
+
+    do_pgr_max_flow(
+            edges, total_edges,
+            source_vertices, size_source_verticesArr,
+            sink_vertices, size_sink_verticesArr,
+            algorithm,
+            only_flow,
+
+            result_tuples, result_count,
+
+            &log_msg,
+            &notice_msg,
+            &err_msg);
+
+    if (only_flow) {
+        time_msg("pgr_maxFlow(many to many)",
+                start_t, clock());
+    } else if (algorithm == 1) {
+        time_msg("pgr_maxFlowPushRelabel(many to many)",
+                start_t, clock());
+    } else if (algorithm == 3) {
+        time_msg("pgr_maxFlowEdmondsKarp(many to many)",
+                start_t, clock());
+    } else {
+        time_msg("pgr_maxFlowBoykovKolmogorov(many to many)",
+                start_t, clock());
+    }
+
+
+    if (edges) pfree(edges);
+    if (source_vertices) pfree(source_vertices);
+    if (sink_vertices) pfree(sink_vertices);
+
+    if (err_msg && (*result_tuples)) {
+        pfree(*result_tuples);
+        (*result_tuples) = NULL;
+        (*result_count) = 0;
+    }
+
+    pgr_global_report(log_msg, notice_msg, err_msg);
+
+    if (log_msg) pfree(log_msg);
+    if (notice_msg) pfree(notice_msg);
+    if (err_msg) pfree(err_msg);
+
+    pgr_SPI_finish();
+}
+
+
+PG_FUNCTION_INFO_V1(max_flow_many_to_many);
+PGDLLEXPORT Datum
+max_flow_many_to_many(PG_FUNCTION_ARGS) {
+    FuncCallContext *funcctx;
+    TupleDesc tuple_desc;
+
+    /**************************************************************************/
+    pgr_flow_t *result_tuples = 0;
+    size_t result_count = 0;
+    /**************************************************************************/
+
+    if (SRF_IS_FIRSTCALL()) {
+        MemoryContext oldcontext;
+        funcctx = SRF_FIRSTCALL_INIT();
+        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
+
+
+        /**********************************************************************/
+
+        process(
+                text_to_cstring(PG_GETARG_TEXT_P(0)),
+                PG_GETARG_ARRAYTYPE_P(1),
+                PG_GETARG_ARRAYTYPE_P(2),
+                PG_GETARG_INT32(3),
+                PG_GETARG_BOOL(4),
+                &result_tuples,
+                &result_count);
+
+        /*                                                                    */
+        /**********************************************************************/
+
+#if PGSQL_VERSION > 95
+        funcctx->max_calls = result_count;
+#else
+        funcctx->max_calls = (uint32_t)result_count;
+#endif
+        funcctx->user_fctx = result_tuples;
+        if (get_call_result_type(fcinfo, NULL, &tuple_desc)
+                != TYPEFUNC_COMPOSITE) {
+            ereport(ERROR,
+                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+                     errmsg("function returning record called in context "
+                         "that cannot accept type record")));
+        }
+
+        funcctx->tuple_desc = tuple_desc;
+        MemoryContextSwitchTo(oldcontext);
+    }
+
+    funcctx = SRF_PERCALL_SETUP();
+    tuple_desc = funcctx->tuple_desc;
+    result_tuples = (pgr_flow_t *) funcctx->user_fctx;
+
+    if (funcctx->call_cntr < funcctx->max_calls) {
+        HeapTuple tuple;
+        Datum result;
+        Datum *values;
+        bool *nulls;
+        size_t call_cntr = funcctx->call_cntr;
+
+        /**********************************************************************/
+        /*                          MODIFY AS NEEDED                          */
+        values = palloc(6 * sizeof(Datum));
+        nulls = palloc(6 * sizeof(bool));
+
+        size_t i;
+        for (i = 0; i < 6; ++i) {
+            nulls[i] = false;
+        }
+
+        values[0] = Int32GetDatum(call_cntr + 1);
+        values[1] = Int64GetDatum(result_tuples[call_cntr].edge);
+        values[2] = Int64GetDatum(result_tuples[call_cntr].source);
+        values[3] = Int64GetDatum(result_tuples[call_cntr].target);
+        values[4] = Int64GetDatum(result_tuples[call_cntr].flow);
+        values[5] = Int64GetDatum(result_tuples[call_cntr].residual_capacity);
+        /**********************************************************************/
+
+        tuple = heap_form_tuple(tuple_desc, values, nulls);
+        result = HeapTupleGetDatum(tuple);
+        SRF_RETURN_NEXT(funcctx, result);
+    } else {
+        SRF_RETURN_DONE(funcctx);
+    }
+}
+
diff --git a/src/max_flow/max_flow_driver.cpp b/src/max_flow/max_flow_driver.cpp
new file mode 100644
index 0000000..c34997e
--- /dev/null
+++ b/src/max_flow/max_flow_driver.cpp
@@ -0,0 +1,147 @@
+/*PGR-GNU*****************************************************************
+File: max_flow_many_to_many_driver.cpp
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer:
+Copyright (c) 2016 Andrea Nardelli
+Mail: nrd.nardelli at gmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "drivers/max_flow/max_flow_driver.h"
+
+#include <sstream>
+#include <vector>
+#include <set>
+
+#include "max_flow/pgr_maxflow.hpp"
+
+#include "cpp_common/pgr_assert.h"
+#include "cpp_common/pgr_alloc.hpp"
+
+
+void
+do_pgr_max_flow(
+        pgr_edge_t *data_edges, size_t total_edges,
+        int64_t *source_vertices, size_t size_source_verticesArr,
+        int64_t *sink_vertices, size_t size_sink_verticesArr,
+        int algorithm,
+        bool only_flow,
+
+        pgr_flow_t **return_tuples, size_t *return_count,
+        char** log_msg,
+        char** notice_msg,
+        char **err_msg) {
+    std::ostringstream log;
+    std::ostringstream notice;
+    std::ostringstream err;
+
+    try {
+        pgassert(data_edges);
+        pgassert(source_vertices);
+        pgassert(sink_vertices);
+
+        std::vector<pgr_edge_t> edges(data_edges, data_edges + total_edges);
+        std::set<int64_t> sources(
+                source_vertices, source_vertices + size_source_verticesArr);
+        std::set<int64_t> targets(
+                sink_vertices, sink_vertices + size_sink_verticesArr);
+
+        std::set<int64_t> vertices(sources);
+        vertices.insert(targets.begin(), targets.end());
+
+        if (vertices.size()
+                != (sources.size() + targets.size())) {
+            *err_msg = pgr_msg("A source found as sink");
+            // TODO(vicky) return as hint the sources that are also sinks
+            return;
+        }
+
+
+
+        pgrouting::graph::PgrFlowGraph digraph(
+                edges, sources, targets, algorithm);
+        // digraph.create_flow_graph(edges, sources, targets, algorithm);
+
+        int64_t max_flow;
+        if (algorithm == 1) {
+            max_flow = digraph.push_relabel();
+        } else if (algorithm == 3) {
+            max_flow = digraph.edmonds_karp();
+        } else if (algorithm == 2) {
+            max_flow = digraph.boykov_kolmogorov();
+        } else {
+            log << "Unspecified algorithm!\n";
+            *err_msg = pgr_msg(log.str().c_str());
+            (*return_tuples) = NULL;
+            (*return_count) = 0;
+            return;
+        }
+
+
+        std::vector<pgr_flow_t> flow_edges;
+
+        if (only_flow) {
+            pgr_flow_t edge;
+            edge.edge = -1;
+            edge.source = -1;
+            edge.target = -1;
+            edge.flow = max_flow;
+            edge.residual_capacity = -1;
+            flow_edges.push_back(edge);
+        } else {
+            flow_edges = digraph.get_flow_edges();
+        }
+        (*return_tuples) = pgr_alloc(flow_edges.size(), (*return_tuples));
+        for (size_t i = 0; i < flow_edges.size(); ++i) {
+            (*return_tuples)[i] = flow_edges[i];
+        }
+        *return_count = flow_edges.size();
+
+
+        *log_msg = log.str().empty()?
+            *log_msg :
+            pgr_msg(log.str().c_str());
+        *notice_msg = notice.str().empty()?
+            *notice_msg :
+            pgr_msg(notice.str().c_str());
+    } catch (AssertFailedException &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch (std::exception &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch(...) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << "Caught unknown exception!";
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    }
+}
+
diff --git a/src/max_flow/maximum_cardinality_matching.c b/src/max_flow/maximum_cardinality_matching.c
new file mode 100644
index 0000000..a8ede94
--- /dev/null
+++ b/src/max_flow/maximum_cardinality_matching.c
@@ -0,0 +1,178 @@
+/*PGR-GNU*****************************************************************
+File: maximum_cardinality_matching.c
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer:
+Copyright (c) 2016 Andrea Nardelli
+Mail: nrd.nardelli at gmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "c_common/postgres_connection.h"
+
+#include "c_common/debug_macro.h"
+#include "c_common/e_report.h"
+#include "c_common/time_msg.h"
+#include "c_common/edges_input.h"
+#include "drivers/max_flow/maximum_cardinality_matching_driver.h"
+
+
+PGDLLEXPORT Datum
+maximum_cardinality_matching(PG_FUNCTION_ARGS);
+
+/******************************************************************************/
+/*                          MODIFY AS NEEDED                                  */
+static
+void
+process(
+    char *edges_sql,
+    bool directed,
+    pgr_basic_edge_t **result_tuples,
+    size_t *result_count) {
+    pgr_SPI_connect();
+
+    pgr_basic_edge_t *edges = NULL;
+    size_t total_edges = 0;
+    pgr_get_basic_edges(edges_sql, &edges, &total_edges);
+
+    if (total_edges == 0) {
+        pgr_SPI_finish();
+        return;
+    }
+
+    PGR_DBG("Starting timer");
+    clock_t start_t = clock();
+    char* log_msg = NULL;
+    char* notice_msg = NULL;
+    char *err_msg = NULL;
+
+    do_pgr_maximum_cardinality_matching(
+            edges, total_edges,
+            directed,
+            result_tuples,
+            result_count,
+
+            &log_msg,
+            &notice_msg,
+            &err_msg);
+
+    time_msg("pgr_maximumCardinalityMatching()", start_t, clock());
+
+    if (edges) pfree(edges);
+
+    if (err_msg && (*result_tuples)) {
+        pfree(*result_tuples);
+        (*result_tuples) = NULL;
+        (*result_count) = 0;
+    }
+
+    pgr_global_report(log_msg, notice_msg, err_msg);
+
+    if (log_msg) pfree(log_msg);
+    if (notice_msg) pfree(notice_msg);
+    if (err_msg) pfree(err_msg);
+
+
+    pgr_SPI_finish();
+}
+
+PG_FUNCTION_INFO_V1(maximum_cardinality_matching);
+PGDLLEXPORT Datum
+maximum_cardinality_matching(PG_FUNCTION_ARGS) {
+    FuncCallContext *funcctx;
+    TupleDesc tuple_desc;
+
+    /**************************************************************************/
+    pgr_basic_edge_t *result_tuples = NULL;
+    size_t result_count = 0;
+    /**************************************************************************/
+
+    if (SRF_IS_FIRSTCALL()) {
+        MemoryContext oldcontext;
+        funcctx = SRF_FIRSTCALL_INIT();
+        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
+
+
+        /**********************************************************************/
+        PGR_DBG("Calling process");
+        process(
+                text_to_cstring(PG_GETARG_TEXT_P(0)),
+                PG_GETARG_BOOL(1),
+                &result_tuples,
+                &result_count);
+
+        /**********************************************************************/
+
+#if PGSQL_VERSION > 95
+        funcctx->max_calls = result_count;
+#else
+        funcctx->max_calls = (uint32_t)result_count;
+#endif
+        funcctx->user_fctx = result_tuples;
+        if (get_call_result_type(fcinfo, NULL, &tuple_desc)
+                != TYPEFUNC_COMPOSITE) {
+            ereport(ERROR,
+                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+                     errmsg("function returning record called in context "
+                         "that cannot accept type record")));
+        }
+
+        funcctx->tuple_desc = tuple_desc;
+        MemoryContextSwitchTo(oldcontext);
+    }
+
+    funcctx = SRF_PERCALL_SETUP();
+    tuple_desc = funcctx->tuple_desc;
+    result_tuples = (pgr_basic_edge_t *) funcctx->user_fctx;
+
+    if (funcctx->call_cntr < funcctx->max_calls) {
+        HeapTuple tuple;
+        Datum result;
+        Datum *values;
+        bool *nulls;
+
+        /**********************************************************************/
+
+        values = palloc(4 * sizeof(Datum));
+        nulls = palloc(4 * sizeof(bool));
+
+
+        size_t i;
+        for (i = 0; i < 4; ++i) {
+            nulls[i] = false;
+        }
+
+        values[0] = Int32GetDatum(funcctx->call_cntr + 1);
+        values[1] = Int64GetDatum(result_tuples[funcctx->call_cntr].edge_id);
+        values[2] = Int64GetDatum(result_tuples[funcctx->call_cntr].source);
+        values[3] = Int64GetDatum(result_tuples[funcctx->call_cntr].target);
+
+        /**********************************************************************/
+
+        tuple = heap_form_tuple(tuple_desc, values, nulls);
+        result = HeapTupleGetDatum(tuple);
+        SRF_RETURN_NEXT(funcctx, result);
+    } else {
+        SRF_RETURN_DONE(funcctx);
+    }
+}
+
diff --git a/src/max_flow/maximum_cardinality_matching_driver.cpp b/src/max_flow/maximum_cardinality_matching_driver.cpp
new file mode 100644
index 0000000..eb66068
--- /dev/null
+++ b/src/max_flow/maximum_cardinality_matching_driver.cpp
@@ -0,0 +1,108 @@
+/*PGR-GNU*****************************************************************
+File: maximum_cardinality_matching_driver.cpp
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer:
+Copyright (c) 2016 Andrea Nardelli
+Mail: nrd.nardelli at gmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "drivers/max_flow/maximum_cardinality_matching_driver.h"
+
+#include <sstream>
+#include <vector>
+
+#include "max_flow/pgr_maximumcardinalitymatching.hpp"
+
+#include "cpp_common/pgr_alloc.hpp"
+#include "cpp_common/pgr_assert.h"
+
+
+void
+do_pgr_maximum_cardinality_matching(
+    pgr_basic_edge_t *data_edges,
+    size_t total_tuples,
+    bool directed,
+
+    pgr_basic_edge_t **return_tuples,
+    size_t *return_count,
+
+    char** log_msg,
+    char** notice_msg,
+    char **err_msg) {
+    std::ostringstream log;
+    std::ostringstream notice;
+    std::ostringstream err;
+
+    try {
+        std::vector<pgr_basic_edge_t> matched_vertices;
+
+        if (directed) {
+            pgrouting::flow::PgrCardinalityGraph<
+                pgrouting::BasicDirectedGraph> G;
+            G.create_max_cardinality_graph(data_edges, total_tuples);
+            std::vector<int64_t> mate_map(boost::num_vertices(G.boost_graph));
+            G.maximum_cardinality_matching(mate_map);
+            G.get_matched_vertices(matched_vertices, mate_map);
+        } else {
+            pgrouting::flow::PgrCardinalityGraph<
+                pgrouting::BasicUndirectedGraph> G;
+            G.create_max_cardinality_graph(data_edges, total_tuples);
+            std::vector<int64_t> mate_map(boost::num_vertices(G.boost_graph));
+            G.maximum_cardinality_matching(mate_map);
+            G.get_matched_vertices(matched_vertices, mate_map);
+        }
+
+        (*return_tuples) = pgr_alloc(matched_vertices.size(), (*return_tuples));
+        for (size_t i = 0; i < matched_vertices.size(); ++i) {
+            (*return_tuples)[i] = matched_vertices[i];
+        }
+        *return_count = matched_vertices.size();
+
+        *log_msg = log.str().empty()?
+            *log_msg :
+            pgr_msg(log.str().c_str());
+        *notice_msg = notice.str().empty()?
+            *notice_msg :
+            pgr_msg(notice.str().c_str());
+    } catch (AssertFailedException &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch (std::exception &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch(...) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << "Caught unknown exception!";
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    }
+}
+
diff --git a/src/max_flow/pgr_flowgraph.cpp b/src/max_flow/pgr_flowgraph.cpp
new file mode 100644
index 0000000..768b05f
--- /dev/null
+++ b/src/max_flow/pgr_flowgraph.cpp
@@ -0,0 +1,27 @@
+/*PGR-GNU*****************************************************************
+
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Copyright (c) 2016 Andrea Nardelli
+Mail: nrd.nardelli at gmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "max_flow/pgr_flowgraph.hpp"
diff --git a/src/max_flow/pgr_maxflow.cpp b/src/max_flow/pgr_maxflow.cpp
new file mode 100644
index 0000000..c6605e4
--- /dev/null
+++ b/src/max_flow/pgr_maxflow.cpp
@@ -0,0 +1,310 @@
+/*PGR-GNU*****************************************************************
+
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Copyright (c) 2016 Andrea Nardelli
+Mail: nrd.nardelli at gmail.com
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "max_flow/pgr_maxflow.hpp"
+
+#include <limits>
+#include <utility>
+#include <vector>
+#include <set>
+
+namespace pgrouting {
+namespace graph {
+
+
+PgrFlowGraph::PgrFlowGraph(
+        const std::vector<pgr_edge_t> &edges,
+        const std::set<int64_t> &source_vertices,
+        const std::set<int64_t> &sink_vertices,
+        int algorithm) {
+    add_vertices(edges, source_vertices, sink_vertices);
+
+    capacity = get(boost::edge_capacity, graph);
+    rev = get(boost::edge_reverse, graph);
+    residual_capacity = get(boost::edge_residual_capacity, graph);
+
+    if (algorithm == 1) {
+        insert_edges_push_relabel(edges);
+    } else {
+        insert_edges(edges);
+    }
+}
+
+PgrFlowGraph::PgrFlowGraph(
+        const std::vector<pgr_edge_t> &edges,
+        const std::set<int64_t> &source_vertices,
+        const std::set<int64_t> &sink_vertices,
+        bool directed) {
+    add_vertices(edges, source_vertices, sink_vertices);
+
+    capacity = get(boost::edge_capacity, graph);
+    rev = get(boost::edge_reverse, graph);
+    residual_capacity =
+        get(boost::edge_residual_capacity, graph);
+
+    insert_edges_edge_disjoint(edges, directed);
+}
+
+/* Inserting edges
+ * Push-relabel requires each edge to be mapped to its reverse with capacity 0.
+ */
+void PgrFlowGraph::insert_edges_push_relabel(
+        const std::vector<pgr_edge_t> &edges) {
+    bool added;
+    for (const auto edge : edges) {
+        V v1 = get_boost_vertex(edge.source);
+        V v2 = get_boost_vertex(edge.target);
+        E e1, e1_rev, e2, e2_rev;
+        if (edge.cost > 0) {
+            boost::tie(e1, added) = boost::add_edge(v1, v2, graph);
+            boost::tie(e1_rev, added) =
+                boost::add_edge(v2, v1, graph);
+            E_to_id.insert(std::pair<E, int64_t>(e1, edge.id));
+            E_to_id.insert(std::pair<E, int64_t>(e1_rev, edge.id));
+            capacity[e1] = (int64_t) edge.cost;
+            capacity[e1_rev] = 0;
+            rev[e1] = e1_rev;
+            rev[e1_rev] = e1;
+        }
+        if (edge.reverse_cost > 0) {
+            boost::tie(e2, added) = boost::add_edge(v2, v1, graph);
+            boost::tie(e2_rev, added) =
+                boost::add_edge(v1, v2, graph);
+            E_to_id.insert(std::pair<E, int64_t>(e2, edge.id));
+            E_to_id.insert(std::pair<E, int64_t>(e2_rev, edge.id));
+            capacity[e2] = (int64_t) edge.reverse_cost;
+            capacity[e2_rev] = 0;
+            rev[e2] = e2_rev;
+            rev[e2_rev] = e2;
+        }
+    }
+}
+
+/* Inserting edges
+ * The other pgr_maxflow algorithms have no such requirement. (can have have as many edges)
+ */
+void PgrFlowGraph::insert_edges(
+        const std::vector<pgr_edge_t> &edges) {
+    bool added;
+    for (const auto edge : edges) {
+        V v1 = get_boost_vertex(edge.source);
+        V v2 = get_boost_vertex(edge.target);
+        E e, e_rev;
+        boost::tie(e, added) = boost::add_edge(v1, v2, graph);
+        boost::tie(e_rev, added) =
+            boost::add_edge(v2, v1, graph);
+        E_to_id.insert(std::pair<E, int64_t>(e, edge.id));
+        E_to_id.insert(std::pair<E, int64_t>(e_rev, edge.id));
+        capacity[e] = edge.cost > 0 ? (int64_t) edge.cost : 0;
+        capacity[e_rev] = edge.reverse_cost > 0
+            ? (int64_t) edge.reverse_cost : 0;
+        rev[e] = e_rev;
+        rev[e_rev] = e;
+    }
+}
+
+/* Inserting edges
+ * for the edge_disjoint_paths  algorithms
+ */
+void PgrFlowGraph::insert_edges_edge_disjoint(
+        const std::vector<pgr_edge_t> &edges,
+        bool directed) {
+    bool added;
+    for (const auto edge : edges) {
+        V v1 = get_boost_vertex(edge.source);
+        V v2 = get_boost_vertex(edge.target);
+        E e, e_rev;
+        boost::tie(e, added) =
+            boost::add_edge(v1, v2, graph);
+        boost::tie(e_rev, added) =
+            boost::add_edge(v2, v1, graph);
+        E_to_id.insert(std::pair<E, int64_t>(e, edge.id));
+        E_to_id.insert(std::pair<E, int64_t>(e_rev,
+                    edge.id));
+        if (directed) {
+            capacity[e] = edge.cost >= 0 ? 1 : 0;
+            capacity[e_rev] = edge.reverse_cost >= 0 ? 1 : 0;
+        } else {
+            if (edge.cost >= 0 || edge.reverse_cost >= 0) {
+                capacity[e] = 1;
+                capacity[e_rev] = 1;
+            }
+        }
+        rev[e] = e_rev;
+        rev[e_rev] = e;
+    }
+}
+
+void PgrFlowGraph::set_supersource(
+        const std::set<int64_t> &source_vertices) {
+    bool added;
+    supersource = add_vertex(graph);
+    for (int64_t source_id : source_vertices) {
+        V source = get_boost_vertex(source_id);
+        E e, e_rev;
+        boost::tie(e, added) =
+            boost::add_edge(supersource, source, graph);
+        boost::tie(e_rev, added) =
+            boost::add_edge(source, supersource, graph);
+
+        capacity[e] = (std::numeric_limits<int32_t>::max)();
+        /* From sources to supersource has 0 capacity*/
+        capacity[e_rev] = 0;
+        rev[e] = e_rev;
+        rev[e_rev] = e;
+    }
+}
+
+void PgrFlowGraph::set_supersink(
+        const std::set<int64_t> &sink_vertices) {
+    bool added;
+    supersink = add_vertex(graph);
+    for (int64_t sink_id : sink_vertices) {
+        V sink = get_boost_vertex(sink_id);
+        E e, e_rev;
+        boost::tie(e, added) = boost::add_edge(sink, supersink, graph);
+        boost::tie(e_rev, added) =
+            boost::add_edge(supersink, sink, graph);
+        /*
+         * NOTE: int64_t crashes the server
+         */
+        /* From sinks to supersink has maximum capacity*/
+        capacity[e] = (std::numeric_limits<int32_t>::max)();
+        /* From supersink to sinks has 0 capacity*/
+        capacity[e_rev] = 0;
+        rev[e] = e_rev;
+        rev[e_rev] = e;
+    }
+}
+
+std::vector<pgr_flow_t>
+PgrFlowGraph::get_flow_edges() const {
+    std::vector<pgr_flow_t> flow_edges;
+    E_it e, e_end;
+    for (boost::tie(e, e_end) = boost::edges(graph); e != e_end;
+            ++e) {
+        // A supersource/supersink is used internally
+        if (((capacity[*e] - residual_capacity[*e]) > 0) &&
+                ((*e).m_source != supersource) &&
+                ((*e).m_target != supersink)) {
+            pgr_flow_t edge;
+            edge.edge = get_edge_id(*e);
+            edge.source = get_vertex_id((*e).m_source);
+            edge.target = get_vertex_id((*e).m_target);
+            edge.flow = capacity[*e] - residual_capacity[*e];
+            edge.residual_capacity = residual_capacity[*e];
+            flow_edges.push_back(edge);
+        }
+    }
+    return flow_edges;
+}
+
+
+
+void
+PgrFlowGraph::flow_dfs(V vertex,
+        int64_t path_id,
+        std::vector<std::vector<int64_t> > &paths) {
+    Eout_it ei, e_end;
+    if (boost::edge(vertex, supersink, graph).second) {
+        int64_t v_id = get_vertex_id(vertex);
+        paths[path_id].push_back(v_id);
+    } else {
+        for (boost::tie(ei, e_end) =
+                boost::out_edges(vertex, graph);
+                ei != e_end; ++ei) {
+            if (residual_capacity[*ei] < capacity[*ei]) {
+                // exclude this edge from subsequent visits
+                capacity[*ei] = -1;
+                int64_t v_id = get_vertex_id(vertex);
+                paths[path_id].push_back(v_id);
+                flow_dfs((*ei).m_target,
+                        path_id,
+                        paths);
+                break;
+            }
+        }
+    }
+}
+
+std::vector<General_path_element_t>
+PgrFlowGraph::get_edge_disjoint_paths(
+        int64_t flow) {
+    std::vector<General_path_element_t> path_elements;
+
+    std::vector<std::vector<int64_t> > paths(flow, std::vector<int64_t>());
+    int64_t path_id = 0;
+    Eout_it ei, e_end, ei2, e2_end;
+    for (boost::tie(ei, e_end) =
+            boost::out_edges(supersource, graph);
+            ei != e_end; ++ei) {
+        if (capacity[*ei] - residual_capacity[*ei] > 0) {
+            for (boost::tie(ei2, e2_end) =
+                    boost::out_edges((*ei).m_target, graph);
+                    ei2 != e2_end; ++ei2) {
+                if (capacity[*ei2] - residual_capacity[*ei2]
+                        > 0) {
+                    paths[path_id].push_back(get_vertex_id((*ei2).m_source));
+                    flow_dfs((*ei2).m_target, path_id, paths);
+                    path_id++;
+                }
+            }
+        }
+    }
+    for (int i = 0; i < flow; i++) {
+        size_t size = paths[i].size();
+        E e;
+        bool exists;
+        size_t j;
+        for (j = 0; j < size - 1; j++) {
+            General_path_element_t edge;
+            edge.seq = static_cast<int>(j + 1);
+            edge.start_id = paths[i][0];
+            edge.end_id = paths[i][size - 1];
+            edge.node = paths[i][j];
+            boost::tie(e, exists) = boost::edge(get_boost_vertex(paths[i][j]),
+                    get_boost_vertex(paths[i][j
+                        + 1]),
+                    graph);
+            edge.edge = get_edge_id(e);
+            path_elements.push_back(edge);
+        }
+        General_path_element_t edge;
+        edge.seq = static_cast<int>(j + 1);
+        edge.start_id = paths[i][0];
+        edge.end_id = paths[i][size - 1];
+        edge.node = paths[i][j];
+        edge.edge = -1;
+        path_elements.push_back(edge);
+    }
+    return path_elements;
+}
+
+
+
+}  // namespace graph
+}  // namespace pgrouting
+
diff --git a/src/max_flow/src/edge_disjoint_paths.c b/src/max_flow/src/edge_disjoint_paths.c
deleted file mode 100644
index 862668a..0000000
--- a/src/max_flow/src/edge_disjoint_paths.c
+++ /dev/null
@@ -1,201 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: edge_disjoint_paths_many_to_many.c
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer:
-Copyright (c) 2016 Andrea Nardelli
-Mail: nrd.nardelli at gmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "c_common/postgres_connection.h"
-#include "utils/array.h"
-
-#include "c_common/debug_macro.h"
-#include "c_common/e_report.h"
-#include "c_common/time_msg.h"
-#include "c_common/edges_input.h"
-#include "c_common/arrays_input.h"
-#include "./edge_disjoint_paths_driver.h"
-
-PGDLLEXPORT Datum
-edge_disjoint_paths_many_to_many(PG_FUNCTION_ARGS);
-
-static
-void
-process(
-    char *edges_sql,
-    ArrayType *starts,
-    ArrayType *ends,
-
-    bool directed,
-    General_path_element_t **result_tuples,
-    size_t *result_count) {
-    pgr_SPI_connect();
-
-    size_t size_source_verticesArr = 0;
-    int64_t* source_vertices =
-        pgr_get_bigIntArray(&size_source_verticesArr, starts);
-
-    size_t size_sink_verticesArr = 0;
-    int64_t* sink_vertices =
-        pgr_get_bigIntArray(&size_sink_verticesArr, ends);
-
-
-    pgr_edge_t *edges = NULL;
-    size_t total_edges = 0;
-
-    pgr_get_edges(edges_sql, &edges, &total_edges);
-
-    if (total_edges == 0) {
-        if (source_vertices) pfree(source_vertices);
-        if (sink_vertices) pfree(sink_vertices);
-        pgr_SPI_finish();
-        return;
-    }
-
-
-    PGR_DBG("Starting timer");
-    clock_t start_t = clock();
-    char* log_msg = NULL;
-    char* notice_msg = NULL;
-    char* err_msg = NULL;
-
-    do_pgr_edge_disjoint_paths(
-        edges, total_edges,
-        source_vertices, size_source_verticesArr,
-        sink_vertices, size_sink_verticesArr,
-        directed,
-
-        result_tuples, result_count,
-
-        &log_msg,
-        &notice_msg,
-        &err_msg);
-
-    time_msg("pgr_edgeDisjointPaths(many to many)", start_t, clock());
-
-    if (edges) pfree(edges);
-    if (source_vertices) pfree(source_vertices);
-    if (sink_vertices) pfree(sink_vertices);
-
-    if (err_msg && (*result_tuples)) {
-        pfree(*result_tuples);
-        (*result_tuples) = NULL;
-        (*result_count) = 0;
-    }
-
-    pgr_global_report(log_msg, notice_msg, err_msg);
-
-    if (log_msg) pfree(log_msg);
-    if (notice_msg) pfree(notice_msg);
-    if (err_msg) pfree(err_msg);
-    pgr_SPI_finish();
-}
-
-PG_FUNCTION_INFO_V1(edge_disjoint_paths_many_to_many);
-PGDLLEXPORT Datum
-edge_disjoint_paths_many_to_many(PG_FUNCTION_ARGS) {
-    FuncCallContext *funcctx;
-    TupleDesc tuple_desc;
-
-    /**************************************************************************/
-    General_path_element_t *result_tuples = NULL;
-    size_t result_count = 0;
-    /**************************************************************************/
-
-    if (SRF_IS_FIRSTCALL()) {
-        MemoryContext oldcontext;
-        funcctx = SRF_FIRSTCALL_INIT();
-        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
-
-
-        /**********************************************************************/
-
-        process(
-                text_to_cstring(PG_GETARG_TEXT_P(0)),
-                PG_GETARG_ARRAYTYPE_P(1),
-                PG_GETARG_ARRAYTYPE_P(2),
-                PG_GETARG_BOOL(3),
-                &result_tuples,
-                &result_count);
-
-        /**********************************************************************/
-
-#if PGSQL_VERSION > 95
-        funcctx->max_calls = result_count;
-#else
-        funcctx->max_calls = (uint32_t)result_count;
-#endif
-        funcctx->user_fctx = result_tuples;
-        if (get_call_result_type(fcinfo, NULL, &tuple_desc)
-                != TYPEFUNC_COMPOSITE) {
-            ereport(ERROR,
-                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                     errmsg("function returning record called in context "
-                         "that cannot accept type record")));
-        }
-
-        funcctx->tuple_desc = tuple_desc;
-        MemoryContextSwitchTo(oldcontext);
-    }
-
-    funcctx = SRF_PERCALL_SETUP();
-    tuple_desc = funcctx->tuple_desc;
-    result_tuples = (General_path_element_t *) funcctx->user_fctx;
-
-    if (funcctx->call_cntr < funcctx->max_calls) {
-        HeapTuple tuple;
-        Datum result;
-        Datum *values;
-        bool *nulls;
-
-        /**********************************************************************/
-        /*                          MODIFY AS NEEDED                          */
-
-        values = palloc(9 * sizeof(Datum));
-        nulls = palloc(9 * sizeof(bool));
-
-        size_t i;
-        for (i = 0; i < 9; ++i) {
-            nulls[i] = false;
-        }
-
-        values[0] = Int32GetDatum(funcctx->call_cntr + 1);
-        values[1] = Int32GetDatum(result_tuples[funcctx->call_cntr].start_id + 1);
-        values[2] = Int32GetDatum(result_tuples[funcctx->call_cntr].seq);
-        values[3] = Int64GetDatum(result_tuples[funcctx->call_cntr].start_id);
-        values[4] = Int64GetDatum(result_tuples[funcctx->call_cntr].end_id);
-        values[5] = Int64GetDatum(result_tuples[funcctx->call_cntr].node);
-        values[6] = Int64GetDatum(result_tuples[funcctx->call_cntr].edge);
-        values[7] = Float8GetDatum(result_tuples[funcctx->call_cntr].cost);
-        values[8] = Float8GetDatum(result_tuples[funcctx->call_cntr].agg_cost);
-        /**********************************************************************/
-
-        tuple = heap_form_tuple(tuple_desc, values, nulls);
-        result = HeapTupleGetDatum(tuple);
-        SRF_RETURN_NEXT(funcctx, result);
-    } else {
-        SRF_RETURN_DONE(funcctx);
-    }
-}
-
diff --git a/src/max_flow/src/edge_disjoint_paths_driver.cpp b/src/max_flow/src/edge_disjoint_paths_driver.cpp
deleted file mode 100644
index f72d842..0000000
--- a/src/max_flow/src/edge_disjoint_paths_driver.cpp
+++ /dev/null
@@ -1,187 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: edge_disjoint_paths_many_to_many_driver.cpp
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer:
-Copyright (c) 2016 Andrea Nardelli
-Mail: nrd.nardelli at gmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "./edge_disjoint_paths_driver.h"
-
-#include <sstream>
-#include <vector>
-#include <set>
-
-#include "./pgr_maxflow.hpp"
-
-#include "cpp_common/identifiers.hpp"
-#include "cpp_common/pgr_alloc.hpp"
-#include "cpp_common/pgr_assert.h"
-
-
-static
-std::vector<General_path_element_t>
-single_execution(
-        std::vector<pgr_edge_t> edges,
-        int64_t source,
-        int64_t target,
-        bool directed) {
-
-    std::set<int64_t> set_source_vertices;
-    std::set<int64_t> set_sink_vertices;
-    set_source_vertices.insert(source);
-    set_sink_vertices.insert(target);
-    pgrouting::graph::PgrFlowGraph G(
-            edges,
-            set_source_vertices,
-            set_sink_vertices, directed);
-
-    /*
-     * boykov_kolmogorov is only for directed graphs
-     */
-    return G.edge_disjoint_paths();
-}
-
-void
-do_pgr_edge_disjoint_paths(
-    pgr_edge_t *data_edges,
-    size_t total_edges,
-    int64_t *sources,
-    size_t size_source_verticesArr,
-    int64_t *sinks,
-    size_t size_sink_verticesArr,
-    bool directed,
-    General_path_element_t **return_tuples,
-    size_t *return_count,
-    char** log_msg,
-    char** notice_msg,
-    char **err_msg) {
-    std::ostringstream log;
-    std::ostringstream notice;
-    std::ostringstream err;
-    try {
-        std::set<int64_t> set_source_vertices(
-                sources, sources + size_source_verticesArr);
-        std::set<int64_t> set_sink_vertices(
-                sinks, sinks + size_sink_verticesArr);
-        std::vector<pgr_edge_t> edges(
-                data_edges, data_edges + total_edges);
-
-
-        std::vector<General_path_element_t> paths;
-        for (const auto &s : set_source_vertices) {
-            for (const auto &t : set_sink_vertices) {
-                auto path = single_execution(
-                        edges,
-                        s,
-                        t,
-                        directed);
-                paths.insert(paths.end(), path.begin(), path.end());
-            }
-        }
-
-        if (paths.empty()) {
-            *return_tuples = nullptr;
-            *return_count = 0;
-            return;
-        }
-
-        /*
-         * Initializing the cost
-         */
-        for (auto &r : paths) {
-            r.agg_cost = r.cost = 0;
-        }
-
-        /*
-         * Calculating the cost
-         */
-        auto found = paths.size();
-        for (const auto &e : edges) {
-            for (auto &r : paths) {
-                if (r.edge == e.id) {
-                    r.cost = (r.node == e.source) ?
-                        e.cost : e.reverse_cost;
-                    --found;
-                }
-            }
-            if (found == 0) break;
-        }
-
-        /*
-         * Calculating the agg_cost
-         */
-        auto prev = paths[0];
-        for (auto &r : paths) {
-            if (r.seq == 1) {
-                r.agg_cost = 0;
-            } else {
-                r.agg_cost = prev.agg_cost + prev.cost;
-            }
-            prev = r;
-        }
-
-        /*
-         * Numbering the paths
-         */
-        int path_id(0);
-        for (auto &r : paths) {
-            r.start_id = path_id;
-            if (r.edge == -1) ++path_id;
-        }
-
-
-        (*return_tuples) = pgr_alloc(paths.size(), (*return_tuples));
-        for (size_t i = 0; i < paths.size(); ++i) {
-            (*return_tuples)[i] = paths[i];
-        }
-        *return_count = paths.size();
-
-
-        *log_msg = log.str().empty()?
-            *log_msg :
-            pgr_msg(log.str().c_str());
-        *notice_msg = notice.str().empty()?
-            *notice_msg :
-            pgr_msg(notice.str().c_str());
-    } catch (AssertFailedException &except) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << except.what();
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    } catch (std::exception &except) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << except.what();
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    } catch(...) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << "Caught unknown exception!";
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    }
-}
diff --git a/src/max_flow/src/edge_disjoint_paths_driver.h b/src/max_flow/src/edge_disjoint_paths_driver.h
deleted file mode 100644
index 2677445..0000000
--- a/src/max_flow/src/edge_disjoint_paths_driver.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: edge_disjoint_paths_many_to_one_driver.h
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer:
-Copyright (c) 2016 Andrea Nardelli
-Mail: nrd.nardelli at gmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#ifndef SRC_MAX_FLOW_SRC_EDGE_DISJOINT_PATHS_DRIVER_H_
-#define SRC_MAX_FLOW_SRC_EDGE_DISJOINT_PATHS_DRIVER_H_
-
-#include "c_types/pgr_edge_t.h"
-#include "c_types/general_path_element_t.h"
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-    void
-        do_pgr_edge_disjoint_paths(
-            pgr_edge_t *data_edges,
-            size_t total_tuples,
-            int64_t *source_vertices,
-            size_t size_source_verticesArr,
-            int64_t *sink_vertices,
-            size_t size_sink_verticesArr,
-            bool directed,
-            General_path_element_t **return_tuples,
-            size_t *return_count,
-            char** log_msg,
-            char** notice_msg,
-            char** err_msg);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif  // SRC_MAX_FLOW_SRC_EDGE_DISJOINT_PATHS_DRIVER_H_
diff --git a/src/max_flow/src/max_flow.c b/src/max_flow/src/max_flow.c
deleted file mode 100644
index ef8ed45..0000000
--- a/src/max_flow/src/max_flow.c
+++ /dev/null
@@ -1,224 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: max_flow_many_to_many.c
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer:
-Copyright (c) 2016 Andrea Nardelli
-Mail: nrd.nardelli at gmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "c_common/postgres_connection.h"
-#include "utils/array.h"
-
-
-#include "c_common/debug_macro.h"
-#include "c_common/e_report.h"
-#include "c_common/time_msg.h"
-#include "c_common/edges_input.h"
-#include "c_common/arrays_input.h"
-#include "./max_flow_driver.h"
-
-PGDLLEXPORT Datum
-max_flow_many_to_many(PG_FUNCTION_ARGS);
-
-static
-void
-process(
-        char *edges_sql,
-        ArrayType *starts,
-        ArrayType *ends,
-        int algorithm,
-        bool only_flow,
-        pgr_flow_t **result_tuples,
-        size_t *result_count) {
-    if (algorithm < 1 || algorithm > 3) {
-        elog(ERROR, "Unknown algorithm");
-    }
-
-    pgr_SPI_connect();
-
-    size_t size_source_verticesArr = 0;
-    int64_t* source_vertices =
-        pgr_get_bigIntArray(&size_source_verticesArr, starts);
-
-    size_t size_sink_verticesArr = 0;
-    int64_t* sink_vertices =
-        pgr_get_bigIntArray(&size_sink_verticesArr, ends);
-
-    pgr_edge_t *edges = NULL;
-
-    size_t total_edges = 0;
-
-    /* NOTE:
-     * For flow, cost and reverse_cost are really capacity and reverse_capacity
-     */
-    pgr_get_flow_edges(edges_sql, &edges, &total_edges);
-
-    if (total_edges == 0) {
-        if (source_vertices) pfree(source_vertices);
-        if (sink_vertices) pfree(sink_vertices);
-        pgr_SPI_finish();
-        return;
-    }
-
-
-    PGR_DBG("Starting timer");
-    clock_t start_t = clock();
-    char* log_msg = NULL;
-    char* notice_msg = NULL;
-    char *err_msg = NULL;
-
-    do_pgr_max_flow(
-            edges, total_edges,
-            source_vertices, size_source_verticesArr,
-            sink_vertices, size_sink_verticesArr,
-            algorithm,
-            only_flow,
-
-            result_tuples, result_count,
-
-            &log_msg,
-            &notice_msg,
-            &err_msg);
-
-    if (only_flow) {
-        time_msg("pgr_maxFlow(many to many)",
-                start_t, clock());
-    } else if (algorithm == 1) {
-        time_msg("pgr_maxFlowPushRelabel(many to many)",
-                start_t, clock());
-    } else if (algorithm == 3) {
-        time_msg("pgr_maxFlowEdmondsKarp(many to many)",
-                start_t, clock());
-    } else {
-        time_msg("pgr_maxFlowBoykovKolmogorov(many to many)",
-                start_t, clock());
-    }
-
-
-    if (edges) pfree(edges);
-    if (source_vertices) pfree(source_vertices);
-    if (sink_vertices) pfree(sink_vertices);
-
-    if (err_msg && (*result_tuples)) {
-        pfree(*result_tuples);
-        (*result_tuples) = NULL;
-        (*result_count) = 0;
-    }
-
-    pgr_global_report(log_msg, notice_msg, err_msg);
-
-    if (log_msg) pfree(log_msg);
-    if (notice_msg) pfree(notice_msg);
-    if (err_msg) pfree(err_msg);
-
-    pgr_SPI_finish();
-}
-
-
-PG_FUNCTION_INFO_V1(max_flow_many_to_many);
-PGDLLEXPORT Datum
-max_flow_many_to_many(PG_FUNCTION_ARGS) {
-    FuncCallContext *funcctx;
-    TupleDesc tuple_desc;
-
-    /**************************************************************************/
-    pgr_flow_t *result_tuples = 0;
-    size_t result_count = 0;
-    /**************************************************************************/
-
-    if (SRF_IS_FIRSTCALL()) {
-        MemoryContext oldcontext;
-        funcctx = SRF_FIRSTCALL_INIT();
-        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
-
-
-        /**********************************************************************/
-
-        process(
-                text_to_cstring(PG_GETARG_TEXT_P(0)),
-                PG_GETARG_ARRAYTYPE_P(1),
-                PG_GETARG_ARRAYTYPE_P(2),
-                PG_GETARG_INT32(3),
-                PG_GETARG_BOOL(4),
-                &result_tuples,
-                &result_count);
-
-        /*                                                                    */
-        /**********************************************************************/
-
-#if PGSQL_VERSION > 95
-        funcctx->max_calls = result_count;
-#else
-        funcctx->max_calls = (uint32_t)result_count;
-#endif
-        funcctx->user_fctx = result_tuples;
-        if (get_call_result_type(fcinfo, NULL, &tuple_desc)
-                != TYPEFUNC_COMPOSITE) {
-            ereport(ERROR,
-                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                     errmsg("function returning record called in context "
-                         "that cannot accept type record")));
-        }
-
-        funcctx->tuple_desc = tuple_desc;
-        MemoryContextSwitchTo(oldcontext);
-    }
-
-    funcctx = SRF_PERCALL_SETUP();
-    tuple_desc = funcctx->tuple_desc;
-    result_tuples = (pgr_flow_t *) funcctx->user_fctx;
-
-    if (funcctx->call_cntr < funcctx->max_calls) {
-        HeapTuple tuple;
-        Datum result;
-        Datum *values;
-        bool *nulls;
-        size_t call_cntr = funcctx->call_cntr;
-
-        /**********************************************************************/
-        /*                          MODIFY AS NEEDED                          */
-        values = palloc(6 * sizeof(Datum));
-        nulls = palloc(6 * sizeof(bool));
-
-        size_t i;
-        for (i = 0; i < 6; ++i) {
-            nulls[i] = false;
-        }
-
-        values[0] = Int32GetDatum(call_cntr + 1);
-        values[1] = Int64GetDatum(result_tuples[call_cntr].edge);
-        values[2] = Int64GetDatum(result_tuples[call_cntr].source);
-        values[3] = Int64GetDatum(result_tuples[call_cntr].target);
-        values[4] = Int64GetDatum(result_tuples[call_cntr].flow);
-        values[5] = Int64GetDatum(result_tuples[call_cntr].residual_capacity);
-        /**********************************************************************/
-
-        tuple = heap_form_tuple(tuple_desc, values, nulls);
-        result = HeapTupleGetDatum(tuple);
-        SRF_RETURN_NEXT(funcctx, result);
-    } else {
-        SRF_RETURN_DONE(funcctx);
-    }
-}
-
diff --git a/src/max_flow/src/max_flow_driver.cpp b/src/max_flow/src/max_flow_driver.cpp
deleted file mode 100644
index a53ab4e..0000000
--- a/src/max_flow/src/max_flow_driver.cpp
+++ /dev/null
@@ -1,147 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: max_flow_many_to_many_driver.cpp
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer:
-Copyright (c) 2016 Andrea Nardelli
-Mail: nrd.nardelli at gmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "./max_flow_driver.h"
-
-#include <sstream>
-#include <vector>
-#include <set>
-
-#include "./pgr_maxflow.hpp"
-
-#include "cpp_common/pgr_assert.h"
-#include "cpp_common/pgr_alloc.hpp"
-
-
-void
-do_pgr_max_flow(
-        pgr_edge_t *data_edges, size_t total_edges,
-        int64_t *source_vertices, size_t size_source_verticesArr,
-        int64_t *sink_vertices, size_t size_sink_verticesArr,
-        int algorithm,
-        bool only_flow,
-
-        pgr_flow_t **return_tuples, size_t *return_count,
-        char** log_msg,
-        char** notice_msg,
-        char **err_msg) {
-    std::ostringstream log;
-    std::ostringstream notice;
-    std::ostringstream err;
-
-    try {
-        pgassert(data_edges);
-        pgassert(source_vertices);
-        pgassert(sink_vertices);
-
-        std::vector<pgr_edge_t> edges(data_edges, data_edges + total_edges);
-        std::set<int64_t> sources(
-                source_vertices, source_vertices + size_source_verticesArr);
-        std::set<int64_t> targets(
-                sink_vertices, sink_vertices + size_sink_verticesArr);
-
-        std::set<int64_t> vertices(sources);
-        vertices.insert(targets.begin(), targets.end());
-
-        if (vertices.size()
-                != (sources.size() + targets.size())) {
-            *err_msg = pgr_msg("A source found as sink");
-            // TODO(vicky) return as hint the sources that are also sinks
-            return;
-        }
-
-
-
-        pgrouting::graph::PgrFlowGraph digraph(
-                edges, sources, targets, algorithm);
-        // digraph.create_flow_graph(edges, sources, targets, algorithm);
-
-        int64_t max_flow;
-        if (algorithm == 1) {
-            max_flow = digraph.push_relabel();
-        } else if (algorithm == 3) {
-            max_flow = digraph.edmonds_karp();
-        } else if (algorithm == 2) {
-            max_flow = digraph.boykov_kolmogorov();
-        } else {
-            log << "Unspecified algorithm!\n";
-            *err_msg = pgr_msg(log.str().c_str());
-            (*return_tuples) = NULL;
-            (*return_count) = 0;
-            return;
-        }
-
-
-        std::vector<pgr_flow_t> flow_edges;
-
-        if (only_flow) {
-            pgr_flow_t edge;
-            edge.edge = -1;
-            edge.source = -1;
-            edge.target = -1;
-            edge.flow = max_flow;
-            edge.residual_capacity = -1;
-            flow_edges.push_back(edge);
-        } else {
-            flow_edges = digraph.get_flow_edges();
-        }
-        (*return_tuples) = pgr_alloc(flow_edges.size(), (*return_tuples));
-        for (size_t i = 0; i < flow_edges.size(); ++i) {
-            (*return_tuples)[i] = flow_edges[i];
-        }
-        *return_count = flow_edges.size();
-
-
-        *log_msg = log.str().empty()?
-            *log_msg :
-            pgr_msg(log.str().c_str());
-        *notice_msg = notice.str().empty()?
-            *notice_msg :
-            pgr_msg(notice.str().c_str());
-    } catch (AssertFailedException &except) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << except.what();
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    } catch (std::exception &except) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << except.what();
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    } catch(...) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << "Caught unknown exception!";
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    }
-}
-
diff --git a/src/max_flow/src/max_flow_driver.h b/src/max_flow/src/max_flow_driver.h
deleted file mode 100644
index a8d4463..0000000
--- a/src/max_flow/src/max_flow_driver.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: max_flow_many_to_many_driver.h
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer:
-Copyright (c) 2016 Andrea Nardelli
-Mail: nrd.nardelli at gmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#ifndef SRC_MAX_FLOW_SRC_MAX_FLOW_DRIVER_H_
-#define SRC_MAX_FLOW_SRC_MAX_FLOW_DRIVER_H_
-
-#include "c_types/pgr_flow_t.h"
-#include "c_types/pgr_edge_t.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-    void
-        do_pgr_max_flow(
-            pgr_edge_t *data_edges,
-            size_t total_tuples,
-            int64_t* source_vertices,
-            size_t size_source_verticesArr,
-            int64_t* sink_vertices,
-            size_t size_sink_verticesArr,
-            int algorithm,
-            bool only_flow,
-            pgr_flow_t **return_tuples,
-            size_t *return_count,
-            char** log_msg,
-            char** notice_msg,
-            char** err_msg);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif  // SRC_MAX_FLOW_SRC_MAX_FLOW_DRIVER_H_
diff --git a/src/max_flow/src/maximum_cardinality_matching.c b/src/max_flow/src/maximum_cardinality_matching.c
deleted file mode 100644
index 68203a3..0000000
--- a/src/max_flow/src/maximum_cardinality_matching.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: maximum_cardinality_matching.c
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer:
-Copyright (c) 2016 Andrea Nardelli
-Mail: nrd.nardelli at gmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "c_common/postgres_connection.h"
-
-#include "c_common/debug_macro.h"
-#include "c_common/e_report.h"
-#include "c_common/time_msg.h"
-#include "c_common/edges_input.h"
-#include "./maximum_cardinality_matching_driver.h"
-
-
-PGDLLEXPORT Datum
-maximum_cardinality_matching(PG_FUNCTION_ARGS);
-
-/******************************************************************************/
-/*                          MODIFY AS NEEDED                                  */
-static
-void
-process(
-    char *edges_sql,
-    bool directed,
-    pgr_basic_edge_t **result_tuples,
-    size_t *result_count) {
-    pgr_SPI_connect();
-
-    pgr_basic_edge_t *edges = NULL;
-    size_t total_edges = 0;
-    pgr_get_basic_edges(edges_sql, &edges, &total_edges);
-
-    if (total_edges == 0) {
-        pgr_SPI_finish();
-        return;
-    }
-
-    PGR_DBG("Starting timer");
-    clock_t start_t = clock();
-    char* log_msg = NULL;
-    char* notice_msg = NULL;
-    char *err_msg = NULL;
-
-    do_pgr_maximum_cardinality_matching(
-            edges, total_edges,
-            directed,
-            result_tuples,
-            result_count,
-
-            &log_msg,
-            &notice_msg,
-            &err_msg);
-
-    time_msg("pgr_maximumCardinalityMatching()", start_t, clock());
-
-    if (edges) pfree(edges);
-
-    if (err_msg && (*result_tuples)) {
-        pfree(*result_tuples);
-        (*result_tuples) = NULL;
-        (*result_count) = 0;
-    }
-
-    pgr_global_report(log_msg, notice_msg, err_msg);
-
-    if (log_msg) pfree(log_msg);
-    if (notice_msg) pfree(notice_msg);
-    if (err_msg) pfree(err_msg);
-
-
-    pgr_SPI_finish();
-}
-
-PG_FUNCTION_INFO_V1(maximum_cardinality_matching);
-PGDLLEXPORT Datum
-maximum_cardinality_matching(PG_FUNCTION_ARGS) {
-    FuncCallContext *funcctx;
-    TupleDesc tuple_desc;
-
-    /**************************************************************************/
-    pgr_basic_edge_t *result_tuples = NULL;
-    size_t result_count = 0;
-    /**************************************************************************/
-
-    if (SRF_IS_FIRSTCALL()) {
-        MemoryContext oldcontext;
-        funcctx = SRF_FIRSTCALL_INIT();
-        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
-
-
-        /**********************************************************************/
-        PGR_DBG("Calling process");
-        process(
-                text_to_cstring(PG_GETARG_TEXT_P(0)),
-                PG_GETARG_BOOL(1),
-                &result_tuples,
-                &result_count);
-
-        /**********************************************************************/
-
-#if PGSQL_VERSION > 95
-        funcctx->max_calls = result_count;
-#else
-        funcctx->max_calls = (uint32_t)result_count;
-#endif
-        funcctx->user_fctx = result_tuples;
-        if (get_call_result_type(fcinfo, NULL, &tuple_desc)
-                != TYPEFUNC_COMPOSITE) {
-            ereport(ERROR,
-                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                     errmsg("function returning record called in context "
-                         "that cannot accept type record")));
-        }
-
-        funcctx->tuple_desc = tuple_desc;
-        MemoryContextSwitchTo(oldcontext);
-    }
-
-    funcctx = SRF_PERCALL_SETUP();
-    tuple_desc = funcctx->tuple_desc;
-    result_tuples = (pgr_basic_edge_t *) funcctx->user_fctx;
-
-    if (funcctx->call_cntr < funcctx->max_calls) {
-        HeapTuple tuple;
-        Datum result;
-        Datum *values;
-        bool *nulls;
-
-        /**********************************************************************/
-
-        values = palloc(4 * sizeof(Datum));
-        nulls = palloc(4 * sizeof(bool));
-
-
-        size_t i;
-        for (i = 0; i < 4; ++i) {
-            nulls[i] = false;
-        }
-
-        values[0] = Int32GetDatum(funcctx->call_cntr + 1);
-        values[1] = Int64GetDatum(result_tuples[funcctx->call_cntr].edge_id);
-        values[2] = Int64GetDatum(result_tuples[funcctx->call_cntr].source);
-        values[3] = Int64GetDatum(result_tuples[funcctx->call_cntr].target);
-
-        /**********************************************************************/
-
-        tuple = heap_form_tuple(tuple_desc, values, nulls);
-        result = HeapTupleGetDatum(tuple);
-        SRF_RETURN_NEXT(funcctx, result);
-    } else {
-        SRF_RETURN_DONE(funcctx);
-    }
-}
-
diff --git a/src/max_flow/src/maximum_cardinality_matching_driver.cpp b/src/max_flow/src/maximum_cardinality_matching_driver.cpp
deleted file mode 100644
index 12009a0..0000000
--- a/src/max_flow/src/maximum_cardinality_matching_driver.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: maximum_cardinality_matching_driver.cpp
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer:
-Copyright (c) 2016 Andrea Nardelli
-Mail: nrd.nardelli at gmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "./maximum_cardinality_matching_driver.h"
-
-#include <sstream>
-#include <vector>
-
-#include "./pgr_maximumcardinalitymatching.hpp"
-
-#include "cpp_common/pgr_alloc.hpp"
-#include "cpp_common/pgr_assert.h"
-
-
-void
-do_pgr_maximum_cardinality_matching(
-    pgr_basic_edge_t *data_edges,
-    size_t total_tuples,
-    bool directed,
-
-    pgr_basic_edge_t **return_tuples,
-    size_t *return_count,
-
-    char** log_msg,
-    char** notice_msg,
-    char **err_msg) {
-    std::ostringstream log;
-    std::ostringstream notice;
-    std::ostringstream err;
-
-    try {
-        std::vector<pgr_basic_edge_t> matched_vertices;
-
-        if (directed) {
-            pgrouting::flow::PgrCardinalityGraph<
-                pgrouting::BasicDirectedGraph> G;
-            G.create_max_cardinality_graph(data_edges, total_tuples);
-            std::vector<int64_t> mate_map(boost::num_vertices(G.boost_graph));
-            G.maximum_cardinality_matching(mate_map);
-            G.get_matched_vertices(matched_vertices, mate_map);
-        } else {
-            pgrouting::flow::PgrCardinalityGraph<
-                pgrouting::BasicUndirectedGraph> G;
-            G.create_max_cardinality_graph(data_edges, total_tuples);
-            std::vector<int64_t> mate_map(boost::num_vertices(G.boost_graph));
-            G.maximum_cardinality_matching(mate_map);
-            G.get_matched_vertices(matched_vertices, mate_map);
-        }
-
-        (*return_tuples) = pgr_alloc(matched_vertices.size(), (*return_tuples));
-        for (size_t i = 0; i < matched_vertices.size(); ++i) {
-            (*return_tuples)[i] = matched_vertices[i];
-        }
-        *return_count = matched_vertices.size();
-
-        *log_msg = log.str().empty()?
-            *log_msg :
-            pgr_msg(log.str().c_str());
-        *notice_msg = notice.str().empty()?
-            *notice_msg :
-            pgr_msg(notice.str().c_str());
-    } catch (AssertFailedException &except) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << except.what();
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    } catch (std::exception &except) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << except.what();
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    } catch(...) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << "Caught unknown exception!";
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    }
-}
-
diff --git a/src/max_flow/src/maximum_cardinality_matching_driver.h b/src/max_flow/src/maximum_cardinality_matching_driver.h
deleted file mode 100644
index a2f04b3..0000000
--- a/src/max_flow/src/maximum_cardinality_matching_driver.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: maximum_cardinality_matching_driver.h
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer:
-Copyright (c) 2016 Andrea Nardelli
-Mail: nrd.nardelli at gmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#ifndef SRC_MAX_FLOW_SRC_MAXIMUM_CARDINALITY_MATCHING_DRIVER_H_
-#define SRC_MAX_FLOW_SRC_MAXIMUM_CARDINALITY_MATCHING_DRIVER_H_
-
-#include "c_types/pgr_basic_edge_t.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-    void
-        do_pgr_maximum_cardinality_matching(
-            pgr_basic_edge_t *data_edges,
-            size_t total_edges,
-            bool directed,
-
-            pgr_basic_edge_t **return_tuples,
-            size_t *return_count,
-
-            char** log_msg,
-            char** notice_msg,
-            char **err_msg);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif  // SRC_MAX_FLOW_SRC_MAXIMUM_CARDINALITY_MATCHING_DRIVER_H_
diff --git a/src/max_flow/src/pgr_flowgraph.cpp b/src/max_flow/src/pgr_flowgraph.cpp
deleted file mode 100644
index b143bab..0000000
--- a/src/max_flow/src/pgr_flowgraph.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Copyright (c) 2016 Andrea Nardelli
-Mail: nrd.nardelli at gmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "pgr_flowgraph.hpp"
diff --git a/src/max_flow/src/pgr_flowgraph.hpp b/src/max_flow/src/pgr_flowgraph.hpp
deleted file mode 100644
index a891ba9..0000000
--- a/src/max_flow/src/pgr_flowgraph.hpp
+++ /dev/null
@@ -1,54 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Copyright (c) 2016 Andrea Nardelli
-Mail: nrd.nardelli at gmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#ifndef SRC_MAX_FLOW_SRC_PGR_FLOWGRAPH_HPP_
-#define SRC_MAX_FLOW_SRC_PGR_FLOWGRAPH_HPP_
-#pragma once
-
-#include <boost/config.hpp>
-#include <boost/graph/adjacency_list.hpp>
-
-
-namespace pgrouting {
-
-typedef boost::adjacency_list_traits<boost::vecS, boost::vecS, boost::directedS>
-    Traits;
-typedef boost::adjacency_list<boost::listS, boost::vecS, boost::directedS,
-        // Vertex properties
-        boost::property<boost::vertex_index_t, int64_t,
-        boost::property<boost::vertex_color_t, boost::default_color_type,
-        boost::property<boost::vertex_distance_t, int64_t,
-        boost::property<boost::vertex_predecessor_t, Traits::edge_descriptor>
-        > > >,
-        // Edge properties
-        boost::property<boost::edge_capacity_t, int64_t,
-        boost::property<boost::edge_residual_capacity_t, int64_t,
-        boost::property<boost::edge_reverse_t, Traits::edge_descriptor> > > >
-    FlowGraph;
-
-}  // namespace pgrouting
-
-#endif  // SRC_MAX_FLOW_SRC_PGR_FLOWGRAPH_HPP_
diff --git a/src/max_flow/src/pgr_maxflow.cpp b/src/max_flow/src/pgr_maxflow.cpp
deleted file mode 100644
index 4a50347..0000000
--- a/src/max_flow/src/pgr_maxflow.cpp
+++ /dev/null
@@ -1,310 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Copyright (c) 2016 Andrea Nardelli
-Mail: nrd.nardelli at gmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "pgr_maxflow.hpp"
-
-#include <limits>
-#include <utility>
-#include <vector>
-#include <set>
-
-namespace pgrouting {
-namespace graph {
-
-
-PgrFlowGraph::PgrFlowGraph(
-        const std::vector<pgr_edge_t> &edges,
-        const std::set<int64_t> &source_vertices,
-        const std::set<int64_t> &sink_vertices,
-        int algorithm) {
-    add_vertices(edges, source_vertices, sink_vertices);
-
-    capacity = get(boost::edge_capacity, graph);
-    rev = get(boost::edge_reverse, graph);
-    residual_capacity = get(boost::edge_residual_capacity, graph);
-
-    if (algorithm == 1) {
-        insert_edges_push_relabel(edges);
-    } else {
-        insert_edges(edges);
-    }
-}
-
-PgrFlowGraph::PgrFlowGraph(
-        const std::vector<pgr_edge_t> &edges,
-        const std::set<int64_t> &source_vertices,
-        const std::set<int64_t> &sink_vertices,
-        bool directed) {
-    add_vertices(edges, source_vertices, sink_vertices);
-
-    capacity = get(boost::edge_capacity, graph);
-    rev = get(boost::edge_reverse, graph);
-    residual_capacity =
-        get(boost::edge_residual_capacity, graph);
-
-    insert_edges_edge_disjoint(edges, directed);
-}
-
-/* Inserting edges
- * Push-relabel requires each edge to be mapped to its reverse with capacity 0.
- */
-void PgrFlowGraph::insert_edges_push_relabel(
-        const std::vector<pgr_edge_t> &edges) {
-    bool added;
-    for (const auto edge : edges) {
-        V v1 = get_boost_vertex(edge.source);
-        V v2 = get_boost_vertex(edge.target);
-        E e1, e1_rev, e2, e2_rev;
-        if (edge.cost > 0) {
-            boost::tie(e1, added) = boost::add_edge(v1, v2, graph);
-            boost::tie(e1_rev, added) =
-                boost::add_edge(v2, v1, graph);
-            E_to_id.insert(std::pair<E, int64_t>(e1, edge.id));
-            E_to_id.insert(std::pair<E, int64_t>(e1_rev, edge.id));
-            capacity[e1] = (int64_t) edge.cost;
-            capacity[e1_rev] = 0;
-            rev[e1] = e1_rev;
-            rev[e1_rev] = e1;
-        }
-        if (edge.reverse_cost > 0) {
-            boost::tie(e2, added) = boost::add_edge(v2, v1, graph);
-            boost::tie(e2_rev, added) =
-                boost::add_edge(v1, v2, graph);
-            E_to_id.insert(std::pair<E, int64_t>(e2, edge.id));
-            E_to_id.insert(std::pair<E, int64_t>(e2_rev, edge.id));
-            capacity[e2] = (int64_t) edge.reverse_cost;
-            capacity[e2_rev] = 0;
-            rev[e2] = e2_rev;
-            rev[e2_rev] = e2;
-        }
-    }
-}
-
-/* Inserting edges
- * The other pgr_maxflow algorithms have no such requirement. (can have have as many edges)
- */
-void PgrFlowGraph::insert_edges(
-        const std::vector<pgr_edge_t> &edges) {
-    bool added;
-    for (const auto edge : edges) {
-        V v1 = get_boost_vertex(edge.source);
-        V v2 = get_boost_vertex(edge.target);
-        E e, e_rev;
-        boost::tie(e, added) = boost::add_edge(v1, v2, graph);
-        boost::tie(e_rev, added) =
-            boost::add_edge(v2, v1, graph);
-        E_to_id.insert(std::pair<E, int64_t>(e, edge.id));
-        E_to_id.insert(std::pair<E, int64_t>(e_rev, edge.id));
-        capacity[e] = edge.cost > 0 ? (int64_t) edge.cost : 0;
-        capacity[e_rev] = edge.reverse_cost > 0
-            ? (int64_t) edge.reverse_cost : 0;
-        rev[e] = e_rev;
-        rev[e_rev] = e;
-    }
-}
-
-/* Inserting edges
- * for the edge_disjoint_paths  algorithms
- */
-void PgrFlowGraph::insert_edges_edge_disjoint(
-        const std::vector<pgr_edge_t> &edges,
-        bool directed) {
-    bool added;
-    for (const auto edge : edges) {
-        V v1 = get_boost_vertex(edge.source);
-        V v2 = get_boost_vertex(edge.target);
-        E e, e_rev;
-        boost::tie(e, added) =
-            boost::add_edge(v1, v2, graph);
-        boost::tie(e_rev, added) =
-            boost::add_edge(v2, v1, graph);
-        E_to_id.insert(std::pair<E, int64_t>(e, edge.id));
-        E_to_id.insert(std::pair<E, int64_t>(e_rev,
-                    edge.id));
-        if (directed) {
-            capacity[e] = edge.cost >= 0 ? 1 : 0;
-            capacity[e_rev] = edge.reverse_cost >= 0 ? 1 : 0;
-        } else {
-            if (edge.cost >= 0 || edge.reverse_cost >= 0) {
-                capacity[e] = 1;
-                capacity[e_rev] = 1;
-            }
-        }
-        rev[e] = e_rev;
-        rev[e_rev] = e;
-    }
-}
-
-void PgrFlowGraph::set_supersource(
-        const std::set<int64_t> &source_vertices) {
-    bool added;
-    supersource = add_vertex(graph);
-    for (int64_t source_id : source_vertices) {
-        V source = get_boost_vertex(source_id);
-        E e, e_rev;
-        boost::tie(e, added) =
-            boost::add_edge(supersource, source, graph);
-        boost::tie(e_rev, added) =
-            boost::add_edge(source, supersource, graph);
-
-        capacity[e] = (std::numeric_limits<int32_t>::max)();
-        /* From sources to supersource has 0 capacity*/
-        capacity[e_rev] = 0;
-        rev[e] = e_rev;
-        rev[e_rev] = e;
-    }
-}
-
-void PgrFlowGraph::set_supersink(
-        const std::set<int64_t> &sink_vertices) {
-    bool added;
-    supersink = add_vertex(graph);
-    for (int64_t sink_id : sink_vertices) {
-        V sink = get_boost_vertex(sink_id);
-        E e, e_rev;
-        boost::tie(e, added) = boost::add_edge(sink, supersink, graph);
-        boost::tie(e_rev, added) =
-            boost::add_edge(supersink, sink, graph);
-        /*
-         * NOTE: int64_t crashes the server
-         */
-        /* From sinks to supersink has maximum capacity*/
-        capacity[e] = (std::numeric_limits<int32_t>::max)();
-        /* From supersink to sinks has 0 capacity*/
-        capacity[e_rev] = 0;
-        rev[e] = e_rev;
-        rev[e_rev] = e;
-    }
-}
-
-std::vector<pgr_flow_t>
-PgrFlowGraph::get_flow_edges() const {
-    std::vector<pgr_flow_t> flow_edges;
-    E_it e, e_end;
-    for (boost::tie(e, e_end) = boost::edges(graph); e != e_end;
-            ++e) {
-        // A supersource/supersink is used internally
-        if (((capacity[*e] - residual_capacity[*e]) > 0) &&
-                ((*e).m_source != supersource) &&
-                ((*e).m_target != supersink)) {
-            pgr_flow_t edge;
-            edge.edge = get_edge_id(*e);
-            edge.source = get_vertex_id((*e).m_source);
-            edge.target = get_vertex_id((*e).m_target);
-            edge.flow = capacity[*e] - residual_capacity[*e];
-            edge.residual_capacity = residual_capacity[*e];
-            flow_edges.push_back(edge);
-        }
-    }
-    return flow_edges;
-}
-
-
-
-void
-PgrFlowGraph::flow_dfs(V vertex,
-        int64_t path_id,
-        std::vector<std::vector<int64_t> > &paths) {
-    Eout_it ei, e_end;
-    if (boost::edge(vertex, supersink, graph).second) {
-        int64_t v_id = get_vertex_id(vertex);
-        paths[path_id].push_back(v_id);
-    } else {
-        for (boost::tie(ei, e_end) =
-                boost::out_edges(vertex, graph);
-                ei != e_end; ++ei) {
-            if (residual_capacity[*ei] < capacity[*ei]) {
-                // exclude this edge from subsequent visits
-                capacity[*ei] = -1;
-                int64_t v_id = get_vertex_id(vertex);
-                paths[path_id].push_back(v_id);
-                flow_dfs((*ei).m_target,
-                        path_id,
-                        paths);
-                break;
-            }
-        }
-    }
-}
-
-std::vector<General_path_element_t>
-PgrFlowGraph::get_edge_disjoint_paths(
-        int64_t flow) {
-    std::vector<General_path_element_t> path_elements;
-
-    std::vector<std::vector<int64_t> > paths(flow, std::vector<int64_t>());
-    int64_t path_id = 0;
-    Eout_it ei, e_end, ei2, e2_end;
-    for (boost::tie(ei, e_end) =
-            boost::out_edges(supersource, graph);
-            ei != e_end; ++ei) {
-        if (capacity[*ei] - residual_capacity[*ei] > 0) {
-            for (boost::tie(ei2, e2_end) =
-                    boost::out_edges((*ei).m_target, graph);
-                    ei2 != e2_end; ++ei2) {
-                if (capacity[*ei2] - residual_capacity[*ei2]
-                        > 0) {
-                    paths[path_id].push_back(get_vertex_id((*ei2).m_source));
-                    flow_dfs((*ei2).m_target, path_id, paths);
-                    path_id++;
-                }
-            }
-        }
-    }
-    for (int i = 0; i < flow; i++) {
-        size_t size = paths[i].size();
-        E e;
-        bool exists;
-        size_t j;
-        for (j = 0; j < size - 1; j++) {
-            General_path_element_t edge;
-            edge.seq = static_cast<int>(j + 1);
-            edge.start_id = paths[i][0];
-            edge.end_id = paths[i][size - 1];
-            edge.node = paths[i][j];
-            boost::tie(e, exists) = boost::edge(get_boost_vertex(paths[i][j]),
-                    get_boost_vertex(paths[i][j
-                        + 1]),
-                    graph);
-            edge.edge = get_edge_id(e);
-            path_elements.push_back(edge);
-        }
-        General_path_element_t edge;
-        edge.seq = static_cast<int>(j + 1);
-        edge.start_id = paths[i][0];
-        edge.end_id = paths[i][size - 1];
-        edge.node = paths[i][j];
-        edge.edge = -1;
-        path_elements.push_back(edge);
-    }
-    return path_elements;
-}
-
-
-
-}  // namespace graph
-}  // namespace pgrouting
-
diff --git a/src/max_flow/src/pgr_maxflow.hpp b/src/max_flow/src/pgr_maxflow.hpp
deleted file mode 100644
index 0a8fece..0000000
--- a/src/max_flow/src/pgr_maxflow.hpp
+++ /dev/null
@@ -1,199 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Copyright (c) 2016 Andrea Nardelli
-Mail: nrd.nardelli at gmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#ifndef SRC_MAX_FLOW_SRC_PGR_MAXFLOW_HPP_
-#define SRC_MAX_FLOW_SRC_PGR_MAXFLOW_HPP_
-#pragma once
-
-
-#include "pgr_flowgraph.hpp"
-#include <boost/graph/push_relabel_max_flow.hpp>
-#include <boost/graph/edmonds_karp_max_flow.hpp>
-#include <boost/graph/boykov_kolmogorov_max_flow.hpp>
-
-
-#include <map>
-#include <string>
-#include <utility>
-#include <vector>
-#include <set>
-#include <limits>
-
-#include "c_types/pgr_flow_t.h"
-#include "c_types/pgr_edge_t.h"
-#include "c_types/general_path_element_t.h"
-
-
-
-namespace pgrouting {
-namespace graph {
-
-
-class PgrFlowGraph {
-     typedef boost::graph_traits<FlowGraph>::vertex_descriptor V;
-     typedef boost::graph_traits<FlowGraph>::edge_descriptor E;
-     typedef boost::graph_traits<FlowGraph>::vertex_iterator V_it;
-     typedef boost::graph_traits<FlowGraph>::edge_iterator E_it;
-     typedef boost::graph_traits<FlowGraph>::out_edge_iterator Eout_it;
-
-
-     boost::property_map
-         <FlowGraph, boost::edge_capacity_t>::type capacity;
-     boost::property_map
-         <FlowGraph, boost::edge_reverse_t>::type rev;
-     boost::property_map
-         <FlowGraph, boost::edge_residual_capacity_t>::type residual_capacity;
-
-
- public:
-     int64_t push_relabel() {
-         return boost::push_relabel_max_flow(
-                 graph,
-                 supersource,
-                 supersink);
-     }
-
-     int64_t edmonds_karp() {
-         return boost::edmonds_karp_max_flow(
-                 graph,
-                 supersource,
-                 supersink);
-     }
-
-     int64_t boykov_kolmogorov() {
-         size_t num_v = boost::num_vertices(graph);
-         std::vector<boost::default_color_type> color(num_v);
-         std::vector<int64_t> distance(num_v);
-         return boost::boykov_kolmogorov_max_flow(
-                 graph,
-                 supersource,
-                 supersink);
-     }
-     std::vector<General_path_element_t> edge_disjoint_paths() {
-         size_t num_v = boost::num_vertices(graph);
-         std::vector<boost::default_color_type> color(num_v);
-         std::vector<int64_t> distance(num_v);
-         auto flow = boost::boykov_kolmogorov_max_flow(
-                 graph,
-                 supersource,
-                 supersink);
-         return get_edge_disjoint_paths(flow);
-     }
-
-     PgrFlowGraph(
-             const std::vector<pgr_edge_t> &edges,
-             const std::set<int64_t> &source_vertices,
-             const std::set<int64_t> &sink_vertices,
-             int algorithm);
-
-     PgrFlowGraph(
-             const std::vector<pgr_edge_t> &edges,
-             const std::set<int64_t> &source_vertices,
-             const std::set<int64_t> &sink_vertices,
-             bool directed);
-
-
-     std::vector<pgr_flow_t> get_flow_edges() const;
-
-     std::vector<General_path_element_t> get_edge_disjoint_paths(
-             int64_t flow);
-
- private:
-     V get_boost_vertex(int64_t id) const {
-         return id_to_V.at(id);
-     }
-
-     int64_t get_vertex_id(V v) const {
-         return V_to_id.at(v);
-     }
-
-     int64_t get_edge_id(E e) const {
-         return E_to_id.at(e);
-     }
-
-     void set_supersource(
-             const std::set<int64_t> &source_vertices);
-     void set_supersink(
-             const std::set<int64_t> &sink_vertices);
-
-     void insert_edges_push_relabel(
-             const std::vector<pgr_edge_t> &edges);
-     void insert_edges(
-             const std::vector<pgr_edge_t> &edges);
-     void insert_edges_edge_disjoint(
-             const std::vector<pgr_edge_t> &edges,
-             bool directed);
-
-     void flow_dfs(
-             V vertex,
-             int64_t path_id,
-             std::vector<std::vector<int64_t> > &paths);
-
-     /*
-      * vertices = {sources} U {sink} U {edges.source} U {edge.target}
-      */
-     template <typename T>
-     void add_vertices(
-             const T &edges,
-             const std::set<int64_t> &source_vertices,
-             const std::set<int64_t> &sink_vertices) {
-         std::set<int64_t> vertices(source_vertices);
-         vertices.insert(sink_vertices.begin(), sink_vertices.end());
-
-         for (const auto e : edges) {
-             vertices.insert(e.source);
-             vertices.insert(e.target);
-         }
-
-         for (const auto id : vertices) {
-             V v = add_vertex(graph);
-             id_to_V.insert(std::pair<int64_t, V>(id, v));
-             V_to_id.insert(std::pair<V, int64_t>(v, id));
-         }
-
-         set_supersource(source_vertices);
-         set_supersink(sink_vertices);
-     }
-
- private:
-     FlowGraph graph;
-     std::map<int64_t, V> id_to_V;
-     std::map<V, int64_t> V_to_id;
-     std::map<E, int64_t> E_to_id;
-
-
-    /* In multi source flow graphs, a super source is created connected to all sources with "infinite" capacity
-     * The same applies for sinks.
-     * To avoid code repetition, a supersource/sink is used even in the one to one signature.
-     */
-     V supersource;
-     V supersink;
-};
-
-}  // namespace graph
-}  // namespace pgrouting
-
-#endif  // SRC_MAX_FLOW_SRC_PGR_MAXFLOW_HPP_
diff --git a/src/max_flow/src/pgr_maximumcardinalitymatching.hpp b/src/max_flow/src/pgr_maximumcardinalitymatching.hpp
deleted file mode 100644
index 6dab935..0000000
--- a/src/max_flow/src/pgr_maximumcardinalitymatching.hpp
+++ /dev/null
@@ -1,171 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Copyright (c) 2016 Andrea Nardelli
-Mail: nrd.nardelli at gmail.com
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#ifndef SRC_MAX_FLOW_SRC_PGR_MAXIMUMCARDINALITYMATCHING_HPP_
-#define SRC_MAX_FLOW_SRC_PGR_MAXIMUMCARDINALITYMATCHING_HPP_
-#pragma once
-
-
-#include <boost/config.hpp>
-#include <boost/graph/adjacency_list.hpp>
-#include <boost/graph/max_cardinality_matching.hpp>
-
-
-#include <map>
-#include <vector>
-#include <utility>
-#include <set>
-
-
-
-
-namespace pgrouting {
-
-typedef boost::adjacency_list<boost::listS, boost::vecS, boost::undirectedS>
-    BasicUndirectedGraph;
-typedef boost::adjacency_list<boost::listS, boost::vecS, boost::directedS>
-    BasicDirectedGraph;
-
-namespace flow {
-
-template<class G>
-class PgrCardinalityGraph {
- public:
-  G boost_graph;
-
-  typedef typename boost::graph_traits<G>::vertex_descriptor V;
-  typedef typename boost::graph_traits<G>::edge_descriptor E;
-  typedef typename boost::graph_traits<G>::vertex_iterator V_it;
-  typedef typename boost::graph_traits<G>::edge_iterator E_it;
-
-  std::map<int64_t, V> id_to_V;
-  std::map<V, int64_t> V_to_id;
-  std::map<E, int64_t> E_to_id;
-
-  V get_boost_vertex(int64_t id) {
-      return id_to_V[id];
-  }
-
-  int64_t get_vertex_id(V v) {
-      return V_to_id[v];
-  }
-
-  int64_t get_edge_id(E e) {
-      return E_to_id[e];
-  }
-
-  void create_max_cardinality_graph(pgr_basic_edge_t *data_edges,
-                                    size_t total_tuples) {
-      std::set<int64_t> vertices;
-      for (size_t i = 0; i < total_tuples; ++i) {
-          vertices.insert(data_edges[i].source);
-          vertices.insert(data_edges[i].target);
-      }
-      for (int64_t id : vertices) {
-          V v = add_vertex(boost_graph);
-          id_to_V.insert(std::pair<int64_t, V>(id, v));
-          V_to_id.insert(std::pair<V, int64_t>(v, id));
-      }
-      bool added;
-
-      for (size_t i = 0; i < total_tuples; ++i) {
-          V v1 = get_boost_vertex(data_edges[i].source);
-          V v2 = get_boost_vertex(data_edges[i].target);
-          E e1;
-          E e2;
-          if (data_edges[i].going) {
-              boost::tie(e1, added) = boost::add_edge(v1, v2, boost_graph);
-              E_to_id.insert(std::pair<E, int64_t>(e1, data_edges[i].id));
-          }
-          if (data_edges[i].coming) {
-              boost::tie(e2, added) = boost::add_edge(v2, v1, boost_graph);
-              E_to_id.insert(std::pair<E, int64_t>(e2, data_edges[i].id));
-          }
-      }
-  }
-
-  void get_matched_vertices(std::vector<pgr_basic_edge_t> &matched_vertices,
-                            const std::vector<int64_t> &mate_map) {
-      V_it vi, vi_end;
-      E e;
-      bool exists;
-      if (boost::is_directed(boost_graph)) {
-          std::vector<bool> already_matched(num_vertices(boost_graph), false);
-          for (boost::tie(vi, vi_end) = boost::vertices(boost_graph);
-               vi != vi_end;
-               ++vi) {
-              /*
-               * For each vertex I check:
-               * 1) It is matched with a non-null vertex
-               * 2) An edge exists from this vertex to his mate
-               * 3) The vertices have not been matched already
-               * (this last point prevents having double output with reversed
-               * source and target)
-               */
-              boost::tie(e, exists) =
-                  boost::edge(*vi, mate_map[*vi], boost_graph);
-              if (((uint64_t)mate_map[*vi]
-                          != boost::graph_traits<G>::null_vertex())
-                  && exists && !already_matched[*vi]
-                  && !already_matched[mate_map[*vi]]) {
-                  already_matched[*vi] = true;
-                  already_matched[mate_map[*vi]] = true;
-                  pgr_basic_edge_t matched_couple;
-                  matched_couple.source = get_vertex_id(*vi);
-                  matched_couple.target = get_vertex_id(mate_map[*vi]);
-                  matched_couple.edge_id = get_edge_id(e);
-                  matched_vertices.push_back(matched_couple);
-              }
-          }
-      } else {
-          for (boost::tie(vi, vi_end) = boost::vertices(boost_graph);
-               vi != vi_end;
-               ++vi) {
-              boost::tie(e, exists) =
-                  boost::edge(*vi, mate_map[*vi], boost_graph);
-              if (((uint64_t)mate_map[*vi]
-                          != boost::graph_traits<G>::null_vertex())
-                  && (*vi < (uint64_t)mate_map[*vi])) {
-                  pgr_basic_edge_t matched_couple;
-                  matched_couple.source = get_vertex_id(*vi);
-                  matched_couple.target = get_vertex_id(mate_map[*vi]);
-                  matched_couple.edge_id = get_edge_id(e);
-                  matched_vertices.push_back(matched_couple);
-              }
-          }
-      }
-  }
-
-  void maximum_cardinality_matching(std::vector<int64_t> &mate_map) {
-      edmonds_maximum_cardinality_matching(boost_graph,
-                                           &mate_map[0]);
-  }
-};
-
-}  // namespace flow
-}  // namespace pgrouting
-
-#endif  // SRC_MAX_FLOW_SRC_PGR_MAXIMUMCARDINALITYMATCHING_HPP_
diff --git a/src/max_flow/test/doc-pgr_boykovKolmogorov.result b/src/max_flow/test/doc-pgr_boykovKolmogorov.result
deleted file mode 100644
index 3058de9..0000000
--- a/src/max_flow/test/doc-pgr_boykovKolmogorov.result
+++ /dev/null
@@ -1,90 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- q1
-SELECT * FROM pgr_boykovKolmogorov(
-    'SELECT id,
-            source,
-            target,
-            capacity,
-            reverse_capacity
-    FROM edge_table'
-    , 6, 11
-);
- seq | edge | start_vid | end_vid | flow | residual_capacity 
------+------+-----------+---------+------+-------------------
-   1 |   10 |         5 |      10 |  100 |                30
-   2 |    8 |         6 |       5 |  100 |                30
-   3 |   11 |         6 |      11 |  130 |                 0
-   4 |   12 |        10 |      11 |  100 |                 0
-(4 rows)
-
--- q2
-SELECT * FROM pgr_boykovKolmogorov(
-    'SELECT id,
-            source,
-            target,
-            capacity,
-            reverse_capacity
-    FROM edge_table'
-    , 6, ARRAY[1, 3, 11]
-);
- seq | edge | start_vid | end_vid | flow | residual_capacity 
------+------+-----------+---------+------+-------------------
-   1 |    1 |         2 |       1 |   50 |                80
-   2 |    3 |         4 |       3 |   80 |                50
-   3 |    4 |         5 |       2 |   50 |                 0
-   4 |   10 |         5 |      10 |   80 |                50
-   5 |    8 |         6 |       5 |  130 |                 0
-   6 |    9 |         6 |       9 |   80 |                50
-   7 |   11 |         6 |      11 |  130 |                 0
-   8 |   16 |         9 |       4 |   80 |                 0
-   9 |   12 |        10 |      11 |   80 |                20
-(9 rows)
-
--- q3
-SELECT * FROM pgr_boykovKolmogorov(
-    'SELECT id,
-            source,
-            target,
-            capacity,
-            reverse_capacity
-    FROM edge_table'
-    , ARRAY[6, 8, 12], 11
-);
- seq | edge | start_vid | end_vid | flow | residual_capacity 
------+------+-----------+---------+------+-------------------
-   1 |   10 |         5 |      10 |  100 |                30
-   2 |    8 |         6 |       5 |  100 |                30
-   3 |   11 |         6 |      11 |  130 |                 0
-   4 |   12 |        10 |      11 |  100 |                 0
-(4 rows)
-
--- q4
-SELECT * FROM pgr_boykovKolmogorov(
-    'SELECT id,
-            source,
-            target,
-            capacity,
-            reverse_capacity
-    FROM edge_table'
-    , ARRAY[6, 8, 12], ARRAY[1, 3, 11]
-);
- seq | edge | start_vid | end_vid | flow | residual_capacity 
------+------+-----------+---------+------+-------------------
-   1 |    1 |         2 |       1 |   50 |                80
-   2 |    3 |         4 |       3 |   80 |                50
-   3 |    4 |         5 |       2 |   50 |                 0
-   4 |   10 |         5 |      10 |  100 |                30
-   5 |    8 |         6 |       5 |  130 |                 0
-   6 |    9 |         6 |       9 |   80 |                50
-   7 |   11 |         6 |      11 |  130 |                 0
-   8 |    7 |         8 |       5 |   20 |                30
-   9 |   16 |         9 |       4 |   80 |                 0
-  10 |   12 |        10 |      11 |  100 |                 0
-(10 rows)
-
--- q5
-ROLLBACK;
-ROLLBACK
diff --git a/src/max_flow/test/doc-pgr_edgeDisjointPaths.result b/src/max_flow/test/doc-pgr_edgeDisjointPaths.result
deleted file mode 100644
index be2f812..0000000
--- a/src/max_flow/test/doc-pgr_edgeDisjointPaths.result
+++ /dev/null
@@ -1,128 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- q1
-SELECT * FROM pgr_edgeDisjointPaths(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    3, 5
-);
- seq | path_id | path_seq | node | edge | cost | agg_cost 
------+---------+----------+------+------+------+----------
-   1 |       1 |        1 |    3 |    2 |    1 |        0
-   2 |       1 |        2 |    2 |    4 |    1 |        1
-   3 |       1 |        3 |    5 |   -1 |    0 |        2
-   4 |       2 |        1 |    3 |    5 |    1 |        0
-   5 |       2 |        2 |    6 |    8 |    1 |        1
-   6 |       2 |        3 |    5 |   -1 |    0 |        2
-(6 rows)
-
--- q2
-SELECT * FROM pgr_edgeDisjointPaths(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    3, 5,
-    directed := false
-);
- seq | path_id | path_seq | node | edge | cost | agg_cost 
------+---------+----------+------+------+------+----------
-   1 |       1 |        1 |    3 |    2 |    1 |        0
-   2 |       1 |        2 |    2 |    4 |    1 |        1
-   3 |       1 |        3 |    5 |   -1 |    0 |        2
-   4 |       2 |        1 |    3 |    3 |   -1 |        0
-   5 |       2 |        2 |    4 |   16 |    1 |       -1
-   6 |       2 |        3 |    9 |    9 |    1 |        0
-   7 |       2 |        4 |    6 |    8 |    1 |        1
-   8 |       2 |        5 |    5 |   -1 |    0 |        2
-   9 |       3 |        1 |    3 |    5 |    1 |        0
-  10 |       3 |        2 |    6 |   11 |    1 |        1
-  11 |       3 |        3 |   11 |   12 |   -1 |        2
-  12 |       3 |        4 |   10 |   10 |    1 |        1
-  13 |       3 |        5 |    5 |   -1 |    0 |        2
-(13 rows)
-
--- q3
-SELECT * FROM pgr_edgeDisjointPaths(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    3, ARRAY[4, 5, 10]
-);
- seq | path_id | path_seq | end_vid | node | edge | cost | agg_cost 
------+---------+----------+---------+------+------+------+----------
-   1 |       1 |        1 |       4 |    3 |    5 |    1 |        0
-   2 |       1 |        2 |       4 |    6 |    9 |    1 |        1
-   3 |       1 |        3 |       4 |    9 |   16 |    1 |        2
-   4 |       1 |        4 |       4 |    4 |   -1 |    0 |        3
-   5 |       2 |        1 |       5 |    3 |    2 |    1 |        0
-   6 |       2 |        2 |       5 |    2 |    4 |    1 |        1
-   7 |       2 |        3 |       5 |    5 |   -1 |    0 |        2
-   8 |       3 |        1 |       5 |    3 |    5 |    1 |        0
-   9 |       3 |        2 |       5 |    6 |    8 |    1 |        1
-  10 |       3 |        3 |       5 |    5 |   -1 |    0 |        2
-  11 |       4 |        1 |      10 |    3 |    2 |    1 |        0
-  12 |       4 |        2 |      10 |    2 |    4 |    1 |        1
-  13 |       4 |        3 |      10 |    5 |   10 |    1 |        2
-  14 |       4 |        4 |      10 |   10 |   -1 |    0 |        3
-(14 rows)
-
--- q4
-SELECT * FROM pgr_edgeDisjointPaths(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[3, 6], 5
-);
- seq | path_id | path_seq | start_vid | node | edge | cost | agg_cost 
------+---------+----------+-----------+------+------+------+----------
-   1 |       1 |        1 |         0 |    3 |    2 |    1 |        0
-   2 |       1 |        2 |         0 |    2 |    4 |    1 |        1
-   3 |       1 |        3 |         0 |    5 |   -1 |    0 |        2
-   4 |       2 |        1 |         1 |    3 |    5 |    1 |        0
-   5 |       2 |        2 |         1 |    6 |    8 |    1 |        1
-   6 |       2 |        3 |         1 |    5 |   -1 |    0 |        2
-   7 |       3 |        1 |         2 |    6 |    8 |    1 |        0
-   8 |       3 |        2 |         2 |    5 |   -1 |    0 |        1
-   9 |       4 |        1 |         3 |    6 |    9 |    1 |        0
-  10 |       4 |        2 |         3 |    9 |   16 |    1 |        1
-  11 |       4 |        3 |         3 |    4 |    3 |    1 |        2
-  12 |       4 |        4 |         3 |    3 |    2 |    1 |        3
-  13 |       4 |        5 |         3 |    2 |    4 |    1 |        4
-  14 |       4 |        6 |         3 |    5 |   -1 |    0 |        5
-(14 rows)
-
--- q5
-SELECT * FROM pgr_edgeDisjointPaths(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-    ARRAY[3, 6], ARRAY[4, 5, 10]
-);
- seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost 
------+---------+----------+-----------+---------+------+------+------+----------
-   1 |       1 |        1 |         0 |       4 |    3 |    5 |    1 |        0
-   2 |       1 |        2 |         0 |       4 |    6 |    9 |    1 |        1
-   3 |       1 |        3 |         0 |       4 |    9 |   16 |    1 |        2
-   4 |       1 |        4 |         0 |       4 |    4 |   -1 |    0 |        3
-   5 |       2 |        1 |         1 |       5 |    3 |    2 |    1 |        0
-   6 |       2 |        2 |         1 |       5 |    2 |    4 |    1 |        1
-   7 |       2 |        3 |         1 |       5 |    5 |   -1 |    0 |        2
-   8 |       3 |        1 |         2 |       5 |    3 |    5 |    1 |        0
-   9 |       3 |        2 |         2 |       5 |    6 |    8 |    1 |        1
-  10 |       3 |        3 |         2 |       5 |    5 |   -1 |    0 |        2
-  11 |       4 |        1 |         3 |      10 |    3 |    2 |    1 |        0
-  12 |       4 |        2 |         3 |      10 |    2 |    4 |    1 |        1
-  13 |       4 |        3 |         3 |      10 |    5 |   10 |    1 |        2
-  14 |       4 |        4 |         3 |      10 |   10 |   -1 |    0 |        3
-  15 |       5 |        1 |         4 |       4 |    6 |    9 |    1 |        0
-  16 |       5 |        2 |         4 |       4 |    9 |   16 |    1 |        1
-  17 |       5 |        3 |         4 |       4 |    4 |   -1 |    0 |        2
-  18 |       6 |        1 |         5 |       5 |    6 |    8 |    1 |        0
-  19 |       6 |        2 |         5 |       5 |    5 |   -1 |    0 |        1
-  20 |       7 |        1 |         6 |       5 |    6 |    9 |    1 |        0
-  21 |       7 |        2 |         6 |       5 |    9 |   16 |    1 |        1
-  22 |       7 |        3 |         6 |       5 |    4 |    3 |    1 |        2
-  23 |       7 |        4 |         6 |       5 |    3 |    2 |    1 |        3
-  24 |       7 |        5 |         6 |       5 |    2 |    4 |    1 |        4
-  25 |       7 |        6 |         6 |       5 |    5 |   -1 |    0 |        5
-  26 |       8 |        1 |         7 |      10 |    6 |    8 |    1 |        0
-  27 |       8 |        2 |         7 |      10 |    5 |   10 |    1 |        1
-  28 |       8 |        3 |         7 |      10 |   10 |   -1 |    0 |        2
-(28 rows)
-
--- q6
-ROLLBACK;
-ROLLBACK
diff --git a/src/max_flow/test/doc-pgr_edmondsKarp.result b/src/max_flow/test/doc-pgr_edmondsKarp.result
deleted file mode 100644
index c24d3bf..0000000
--- a/src/max_flow/test/doc-pgr_edmondsKarp.result
+++ /dev/null
@@ -1,90 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- q1
-SELECT * FROM pgr_edmondsKarp(
-    'SELECT id,
-            source,
-            target,
-            capacity,
-            reverse_capacity
-    FROM edge_table'
-    , 6, 11
-);
- seq | edge | start_vid | end_vid | flow | residual_capacity 
------+------+-----------+---------+------+-------------------
-   1 |   10 |         5 |      10 |  100 |                30
-   2 |    8 |         6 |       5 |  100 |                30
-   3 |   11 |         6 |      11 |  130 |                 0
-   4 |   12 |        10 |      11 |  100 |                 0
-(4 rows)
-
--- q2
-SELECT * FROM pgr_edmondsKarp(
-    'SELECT id,
-            source,
-            target,
-            capacity,
-            reverse_capacity
-    FROM edge_table'
-   , 6, ARRAY[1, 3, 11]
-);
- seq | edge | start_vid | end_vid | flow | residual_capacity 
------+------+-----------+---------+------+-------------------
-   1 |    1 |         2 |       1 |   50 |                80
-   2 |    3 |         4 |       3 |   80 |                50
-   3 |    4 |         5 |       2 |   50 |                 0
-   4 |   10 |         5 |      10 |   80 |                50
-   5 |    8 |         6 |       5 |  130 |                 0
-   6 |    9 |         6 |       9 |   80 |                50
-   7 |   11 |         6 |      11 |  130 |                 0
-   8 |   16 |         9 |       4 |   80 |                 0
-   9 |   12 |        10 |      11 |   80 |                20
-(9 rows)
-
--- q3
-SELECT * FROM pgr_edmondsKarp(
-    'SELECT id,
-            source,
-            target,
-            capacity,
-            reverse_capacity
-    FROM edge_table'
-   , ARRAY[6, 8, 12], 11
-);
- seq | edge | start_vid | end_vid | flow | residual_capacity 
------+------+-----------+---------+------+-------------------
-   1 |   10 |         5 |      10 |  100 |                30
-   2 |    8 |         6 |       5 |  100 |                30
-   3 |   11 |         6 |      11 |  130 |                 0
-   4 |   12 |        10 |      11 |  100 |                 0
-(4 rows)
-
--- q4
-SELECT * FROM pgr_edmondsKarp(
-    'SELECT id,
-            source,
-            target,
-            capacity,
-            reverse_capacity
-    FROM edge_table'
-   , ARRAY[6, 8, 12], ARRAY[1, 3, 11]
-);
- seq | edge | start_vid | end_vid | flow | residual_capacity 
------+------+-----------+---------+------+-------------------
-   1 |    1 |         2 |       1 |   50 |                80
-   2 |    3 |         4 |       3 |   80 |                50
-   3 |    4 |         5 |       2 |   50 |                 0
-   4 |   10 |         5 |      10 |  100 |                30
-   5 |    8 |         6 |       5 |  130 |                 0
-   6 |    9 |         6 |       9 |   80 |                50
-   7 |   11 |         6 |      11 |  130 |                 0
-   8 |    7 |         8 |       5 |   20 |                30
-   9 |   16 |         9 |       4 |   80 |                 0
-  10 |   12 |        10 |      11 |  100 |                 0
-(10 rows)
-
--- q5
-ROLLBACK;
-ROLLBACK
diff --git a/src/max_flow/test/doc-pgr_maxCardinalityMatch.result b/src/max_flow/test/doc-pgr_maxCardinalityMatch.result
deleted file mode 100644
index feb0660..0000000
--- a/src/max_flow/test/doc-pgr_maxCardinalityMatch.result
+++ /dev/null
@@ -1,40 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- q1
-SELECT * FROM pgr_maxCardinalityMatch(
-    'SELECT id, source, target, cost AS going, reverse_cost AS coming FROM edge_table'
-);
- seq | edge | source | target 
------+------+--------+--------
-   1 |    1 |      1 |      2
-   2 |    3 |      4 |      3
-   3 |    9 |      6 |      9
-   4 |    6 |      7 |      8
-   5 |   14 |     10 |     13
-   6 |   13 |     11 |     12
-   7 |   17 |     14 |     15
-   8 |   18 |     16 |     17
-(8 rows)
-
--- q2
-SELECT * FROM pgr_maxCardinalityMatch(
-    'SELECT id, source, target, cost AS going, reverse_cost AS coming FROM edge_table',
-    directed := false
-);
- seq | edge | source | target 
------+------+--------+--------
-   1 |    1 |      1 |      2
-   2 |    3 |      3 |      4
-   3 |    9 |      6 |      9
-   4 |    6 |      7 |      8
-   5 |   14 |     10 |     13
-   6 |   13 |     11 |     12
-   7 |   17 |     14 |     15
-   8 |   18 |     16 |     17
-(8 rows)
-
--- q3
-ROLLBACK;
-ROLLBACK
diff --git a/src/max_flow/test/doc-pgr_maxFlow.result b/src/max_flow/test/doc-pgr_maxFlow.result
deleted file mode 100644
index aadd1fb..0000000
--- a/src/max_flow/test/doc-pgr_maxFlow.result
+++ /dev/null
@@ -1,67 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- q1
-SELECT * FROM pgr_maxFlow(
-    'SELECT id,
-            source,
-            target,
-            capacity,
-            reverse_capacity
-    FROM edge_table'
-    , 6, 11
-);
- pgr_maxflow 
--------------
-         230
-(1 row)
-
--- q2
-SELECT * FROM pgr_maxFlow(
-    'SELECT id,
-            source,
-            target,
-            capacity,
-            reverse_capacity
-    FROM edge_table'
-    , 6, ARRAY[11, 1, 13]
-);
- pgr_maxflow 
--------------
-         340
-(1 row)
-
--- q3
-SELECT * FROM pgr_maxFlow(
-    'SELECT id,
-            source,
-            target,
-            capacity,
-            reverse_capacity
-    FROM edge_table'
-    , ARRAY[6, 8, 12], 11
-);
- pgr_maxflow 
--------------
-         230
-(1 row)
-
--- q4
-SELECT * FROM pgr_maxFlow(
-    'SELECT id,
-            source,
-            target,
-            capacity,
-            reverse_capacity
-    FROM edge_table'
-    , ARRAY[6, 8, 12], ARRAY[1, 3, 11]
-);
- pgr_maxflow 
--------------
-         360
-(1 row)
-
--- q5
-ROLLBACK;
-ROLLBACK
diff --git a/src/max_flow/test/doc-pgr_pushRelabel.result b/src/max_flow/test/doc-pgr_pushRelabel.result
deleted file mode 100644
index 65969cb..0000000
--- a/src/max_flow/test/doc-pgr_pushRelabel.result
+++ /dev/null
@@ -1,96 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- q1
-SELECT * FROM pgr_pushRelabel(
-    'SELECT id,
-            source,
-            target,
-            capacity,
-            reverse_capacity
-    FROM edge_table'
-    , 6, 11
-);
- seq | edge | start_vid | end_vid | flow | residual_capacity 
------+------+-----------+---------+------+-------------------
-   1 |   10 |         5 |      10 |  100 |                30
-   2 |    8 |         6 |       5 |  100 |                30
-   3 |   11 |         6 |      11 |  130 |                 0
-   4 |   12 |        10 |      11 |  100 |                 0
-(4 rows)
-
--- q2
-SELECT * FROM pgr_pushRelabel(
-    'SELECT id,
-            source,
-            target,
-            capacity,
-            reverse_capacity
-    FROM edge_table'
-    , 6, ARRAY[11, 1, 13]
-);
- seq | edge | start_vid | end_vid | flow | residual_capacity 
------+------+-----------+---------+------+-------------------
-   1 |    1 |         2 |       1 |  130 |                 0
-   2 |    2 |         3 |       2 |   80 |                20
-   3 |    3 |         4 |       3 |   80 |                50
-   4 |    4 |         5 |       2 |   50 |                 0
-   5 |    7 |         5 |       8 |   50 |                80
-   6 |   10 |         5 |      10 |   80 |                50
-   7 |    8 |         6 |       5 |  130 |                 0
-   8 |    9 |         6 |       9 |   80 |                50
-   9 |   11 |         6 |      11 |  130 |                 0
-  10 |    6 |         7 |       8 |   50 |                 0
-  11 |    6 |         8 |       7 |   50 |                50
-  12 |    7 |         8 |       5 |   50 |                 0
-  13 |   16 |         9 |       4 |   80 |                 0
-  14 |   12 |        10 |      11 |   80 |                20
-(14 rows)
-
--- q3
-SELECT * FROM pgr_pushRelabel(
-    'SELECT id,
-            source,
-            target,
-            capacity,
-            reverse_capacity
-    FROM edge_table'
-    , ARRAY[6, 8, 12], 11
-);
- seq | edge | start_vid | end_vid | flow | residual_capacity 
------+------+-----------+---------+------+-------------------
-   1 |   10 |         5 |      10 |  100 |                30
-   2 |    8 |         6 |       5 |  100 |                30
-   3 |   11 |         6 |      11 |  130 |                 0
-   4 |   12 |        10 |      11 |  100 |                 0
-(4 rows)
-
--- q4
-SELECT * FROM pgr_pushRelabel(
-    'SELECT id,
-            source,
-            target,
-            capacity,
-            reverse_capacity
-    FROM edge_table'
-    , ARRAY[6, 8, 12], ARRAY[1, 3, 11]
-);
- seq | edge | start_vid | end_vid | flow | residual_capacity 
------+------+-----------+---------+------+-------------------
-   1 |    1 |         2 |       1 |   50 |                80
-   2 |    3 |         4 |       3 |   80 |                50
-   3 |    4 |         5 |       2 |   50 |                 0
-   4 |   10 |         5 |      10 |  100 |                30
-   5 |    8 |         6 |       5 |  130 |                 0
-   6 |    9 |         6 |       9 |   30 |               100
-   7 |   11 |         6 |      11 |  130 |                 0
-   8 |    7 |         8 |       5 |   20 |                30
-   9 |   16 |         9 |       4 |   80 |                 0
-  10 |   12 |        10 |      11 |  100 |                 0
-  11 |   15 |        12 |       9 |   50 |                 0
-(11 rows)
-
--- q5
-ROLLBACK;
-ROLLBACK
diff --git a/src/pickDeliver/src/CMakeLists.txt b/src/pickDeliver/CMakeLists.txt
similarity index 100%
rename from src/pickDeliver/src/CMakeLists.txt
rename to src/pickDeliver/CMakeLists.txt
diff --git a/src/pickDeliver/src/base_node.cpp b/src/pickDeliver/base_node.cpp
similarity index 100%
rename from src/pickDeliver/src/base_node.cpp
rename to src/pickDeliver/base_node.cpp
diff --git a/src/pickDeliver/src/book_keeping.cpp b/src/pickDeliver/book_keeping.cpp
similarity index 100%
rename from src/pickDeliver/src/book_keeping.cpp
rename to src/pickDeliver/book_keeping.cpp
diff --git a/src/pickDeliver/src/dnode.cpp b/src/pickDeliver/dnode.cpp
similarity index 100%
rename from src/pickDeliver/src/dnode.cpp
rename to src/pickDeliver/dnode.cpp
diff --git a/src/pickDeliver/fleet.cpp b/src/pickDeliver/fleet.cpp
new file mode 100644
index 0000000..646b41f
--- /dev/null
+++ b/src/pickDeliver/fleet.cpp
@@ -0,0 +1,391 @@
+/*PGR-GNU*****************************************************************
+
+FILE: solution.cpp
+
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ ********************************************************************PGR-GNU*/
+
+#include "vrp/fleet.h"
+
+#include <vector>
+#include <memory>
+#include <utility>
+#include <limits>
+
+#include "vrp/dnode.h"
+#include "vrp/pgr_pickDeliver.h"
+
+namespace pgrouting {
+namespace vrp {
+
+
+Fleet::Fleet(const Fleet &fleet) :
+    PD_problem(),
+    m_trucks(fleet.m_trucks),
+    used(fleet.used),
+    un_used(fleet.un_used)
+    {}
+
+Fleet::Fleet(
+        const std::vector<Vehicle_t> &vehicles, double factor) :
+    PD_problem(),
+    used(),
+    un_used() {
+        build_fleet(vehicles, factor);
+        Identifiers<size_t> unused(m_trucks.size());
+        un_used = unused;
+    }
+
+
+Vehicle_pickDeliver
+Fleet::get_truck() {
+    ENTERING();
+    auto idx = un_used.front();
+    msg.log << "Available vehicles: " << un_used << "\n";
+    msg.log << "NOT Available vehicles: " << used << "\n";
+    msg.log << "getting idx" << idx << "\n";
+    pgassertwm(idx < m_trucks.size(), msg.log.str());
+    used += idx;
+    if (un_used.size() > 1) un_used -= idx;
+    EXITING();
+    return m_trucks[idx];
+}
+
+void
+Fleet::release_truck(size_t id) {
+    used -= id;
+    un_used += id;
+}
+
+Vehicle_pickDeliver
+Fleet::get_truck(size_t order) {
+    msg.log << "Available vehicles: " << un_used << "\n";
+    msg.log << "NOT Available vehicles: " << used << "\n";
+    auto idx = un_used.front();
+
+    for (const auto i : un_used) {
+        if (m_trucks[i].feasable_orders().has(order)) {
+            idx = i;
+            msg.log << "getting idx" << idx << "\n";
+            used += idx;
+            if (un_used.size() > 1) un_used -= idx;
+            return m_trucks[idx];
+        }
+    }
+
+    /*
+     * using phoney truck
+     */
+    pgassert(false);
+    return m_trucks.back();
+
+    for (auto truck : m_trucks) {
+        if (truck.feasable_orders().has(order)) {
+            idx = truck.idx();
+            msg.log << "idx" << idx << "size" << m_trucks.size();
+            pgassertwm(idx < m_trucks.size(), msg.get_log());
+            used += idx;
+            if (un_used.size() > 1) un_used -= idx;
+            break;
+        }
+    }
+    return m_trucks[idx];
+}
+
+
+Vehicle_pickDeliver
+Fleet::get_truck(const Order order) {
+    auto id = m_trucks.front().idx();
+    for (auto truck : m_trucks) {
+        if (truck.feasable_orders().has(order.idx())) {
+            id = truck.idx();
+            msg.log << "id" << id
+                << "size" << m_trucks.size();
+            pgassertwm(id < m_trucks.size(), msg.get_log());
+            used += id;
+            if (un_used.size() > 1) un_used -= id;
+            break;
+        }
+    }
+    return m_trucks[id];
+}
+
+
+void
+Fleet::add_vehicle(
+        Vehicle_t vehicle,
+        double factor,
+        std::unique_ptr<Base_node> b_start,
+        const Vehicle_node &starting_site,
+        std::unique_ptr<Base_node> b_end,
+        const Vehicle_node &ending_site) {
+    pgassert(starting_site.is_start() && ending_site.is_end());
+    pgassert(starting_site.opens() <= starting_site.closes());
+    pgassert(ending_site.opens() <= ending_site.closes());
+
+    problem->add_base_node(std::move(b_start));
+    problem->add_base_node(std::move(b_end));
+    problem->add_node(starting_site);
+    problem->add_node(ending_site);
+
+    for (int i = 0; i < vehicle.cant_v; ++i) {
+        m_trucks.push_back(Vehicle_pickDeliver(
+                    m_trucks.size(),
+                    vehicle.id,
+                    starting_site,
+                    ending_site,
+                    vehicle.capacity,
+                    vehicle.speed,
+                    factor));
+        msg.log << "inserting vehicle: " << m_trucks.back().tau() << "\n";
+        pgassert((m_trucks.back().idx() + 1)  == m_trucks.size());
+        pgassert(m_trucks.back().is_ok());
+    }
+}
+
+/*!
+  builds a fleet from a vector of Vehicle_t 
+
+  - creates a phoney truck with unlimited capacity and unlimited closing times
+  - checks that the number of vehicles is a legal value
+  - creates the requested vehicles
+
+  @param[in] vehicles  the list of vehicles
+  @param[in] factor    the multiplier to speed up or slow down
+  */
+bool
+Fleet::build_fleet(
+        std::vector<Vehicle_t> vehicles,
+        double factor) {
+    /*
+     *  creating a phoney truck with max capacity and max window
+     *  with the start & end points of the first vehicle given
+     */
+    vehicles.push_back({
+            /*
+             * id, capacity
+             */
+            -1,
+            std::numeric_limits<double>::infinity(),
+
+            vehicles[0].speed,
+            vehicles[0].start_x,
+            vehicles[0].start_y,
+            vehicles[0].start_node_id,
+
+            /*
+             * cant_v, start_open_t, start_close_t, start_service_t
+             */
+            1,
+            0,
+            std::numeric_limits<double>::infinity(),
+            0,
+
+            vehicles[0].end_x,
+            vehicles[0].end_y,
+            vehicles[0].end_node_id,
+            /*
+             * end_open_t, end_close_t, end_service_t
+             */
+            0,
+            std::numeric_limits<double>::infinity(),
+            0});
+
+
+    for (auto vehicle : vehicles) {
+        if (vehicle.cant_v < 0) {
+            msg.error << "Illegal number of vehicles found vehicle";
+            msg.log << vehicle.cant_v << "< 0 on vehicle " << vehicle.id;
+            return false;
+        }
+
+        if  (problem->m_cost_matrix.empty()) {
+            /*
+             * Euclidean version
+             */
+            auto b_start = create_b_start<Node>(vehicle, problem->node_id());
+            auto starting_site = Vehicle_node(
+                    {problem->node_id()++, vehicle, Tw_node::NodeType::kStart});
+
+            auto b_end = create_b_end<Node>(vehicle, problem->node_id());
+            auto ending_site = Vehicle_node(
+                    {problem->node_id()++, vehicle, Tw_node::NodeType::kEnd});
+
+            if (!(starting_site.is_start() && ending_site.is_end()
+                    && starting_site.opens() <= starting_site.closes()
+                    && ending_site.opens() <= ending_site.closes())) {
+                msg.clear();
+                msg.error << "Illegal values found on vehicle";
+                msg.log << "On vehicle " << vehicle.id
+                    << " a condition is not met:\n"
+                    << "starting_site.is_start: "
+                    << (starting_site.is_start()? "YES" : "NO") << "\n"
+                    << "ending_site.is_end: "
+                    << (ending_site.is_end()? "YES" : "NO") << "\n"
+                    << "verify that:\n"
+                    << "-  start_open <= start_close: "
+                    << starting_site.opens()
+                    << "<"  << starting_site.closes() << "\n"
+                    << "-  end_open <= end_close: "
+                    << ending_site.opens()
+                    << "<"  << ending_site.closes() << "\n"
+                    << "-  capacity > 0\n";
+                pgassert(!msg.get_error().empty());
+                return false;
+            }
+            pgassert(starting_site.is_start());
+            pgassert(ending_site.is_end());
+
+            pgassert(starting_site.opens() <= starting_site.closes());
+            pgassert(ending_site.opens() <= ending_site.closes());
+            pgassertwm(
+                    starting_site.is_start() && ending_site.is_end(),
+                    msg.get_error().c_str());
+            add_vehicle(vehicle, factor,
+                    std::move(b_start), starting_site,
+                    std::move(b_end), ending_site);
+        } else {
+            /*
+             * Matrix version
+             */
+            auto b_start = create_b_start<Dnode>(vehicle, problem->node_id());
+            auto starting_site = Vehicle_node(
+                    {problem->node_id()++, vehicle, Tw_node::NodeType::kStart});
+
+            auto b_end = create_b_end<Dnode>(vehicle, problem->node_id());
+            auto ending_site = Vehicle_node(
+                    {problem->node_id()++, vehicle, Tw_node::NodeType::kEnd});
+
+            if (!(starting_site.is_start() && ending_site.is_end()
+                    && starting_site.opens() <= starting_site.closes()
+                    && ending_site.opens() <= ending_site.closes())) {
+                msg.clear();
+                msg.error << "Illegal values found on vehicle";
+                msg.log << "On vehicle " << vehicle.id
+                    << " a condition is not met, verify that:\n"
+                    << "starting_site.is_start()"
+                    << starting_site.is_start() << "\n"
+                    << "ending_site.is_start()"
+                    << ending_site.is_end() << "\n"
+                    << "-  start_open <= start_close\n"
+                    << starting_site.opens() << "<"
+                    << starting_site.closes() << "\n"
+                    << "-  end_open <= end_close\n"
+                    << ending_site.opens() << "<"
+                    << ending_site.closes() << "\n"
+                    << "-  capacity > 0\n";
+                pgassert(!msg.get_error().empty());
+                return false;
+            }
+            pgassert(starting_site.is_start());
+            pgassert(ending_site.is_end());
+
+            pgassert(starting_site.opens() <= starting_site.closes());
+            pgassert(ending_site.opens() <= ending_site.closes());
+            pgassert(starting_site.is_start() && ending_site.is_end());
+            add_vehicle(vehicle, factor,
+                    std::move(b_start), starting_site,
+                    std::move(b_end), ending_site);
+        }
+    }
+    Identifiers<size_t> unused(m_trucks.size());
+    un_used = unused;
+    return true;
+}
+
+
+bool
+Fleet::is_fleet_ok() const {
+    ENTERING();
+    if (!msg.get_error().empty()) return false;
+    for (auto truck : m_trucks) {
+        if (!truck.is_ok()) {
+            msg.error << "Illegal values found on vehicle";
+            msg.log << "On vehicle " << truck.id()
+                << " a condition is not met, verify that:\n"
+                << "-  start_open <= start_close\n"
+                << "-  end_open <= end_close\n"
+                << "-  capacity > 0\n";
+            return false;
+        }
+
+        if (!(truck.start_site().is_start()
+                    && truck.end_site().is_end())) {
+            pgassertwm(false, "should never pass through here");
+            msg.error << "Illegal values found on vehicle";
+            return false;
+        }
+        if (!truck.is_feasable()) {
+            msg.error << "Truck is not feasible";
+            return false;
+        }
+    }
+    EXITING();
+    return true;
+}
+
+/**
+ * Given an order,
+ * Cycle trhugh all the trucks to verify if the order can be served by
+ * at least one truck
+ */
+bool
+Fleet::is_order_ok(const Order &order) const {
+    for (const auto truck : m_trucks) {
+        if (!order.is_valid(truck.speed())) continue;
+        if (truck.is_order_feasable(order)) {
+            return true;
+        }
+    }
+    return false;
+}
+
+Vehicle_pickDeliver&
+Fleet::operator[](size_t i) {
+    pgassert(i < m_trucks.size());
+    return m_trucks[i];
+}
+
+void
+Fleet::set_compatibles(const PD_Orders &orders) {
+    for (auto &truck : m_trucks) {
+        truck.set_compatibles(orders);
+    }
+}
+
+/*
+ * FRIENDS
+ */
+
+std::ostream&
+operator << (std::ostream &log, const Fleet &f) {
+    log << "fleet\n";
+    for (const auto v : f.m_trucks) {
+        log << v;
+    }
+    log << "end fleet\n";
+
+    return log;
+}
+
+
+}  //  namespace vrp
+}  //  namespace pgrouting
diff --git a/src/pickDeliver/src/initial_solution.cpp b/src/pickDeliver/initial_solution.cpp
similarity index 100%
rename from src/pickDeliver/src/initial_solution.cpp
rename to src/pickDeliver/initial_solution.cpp
diff --git a/src/pickDeliver/src/node.cpp b/src/pickDeliver/node.cpp
similarity index 100%
rename from src/pickDeliver/src/node.cpp
rename to src/pickDeliver/node.cpp
diff --git a/src/pickDeliver/optimize.cpp b/src/pickDeliver/optimize.cpp
new file mode 100644
index 0000000..f5eec0e
--- /dev/null
+++ b/src/pickDeliver/optimize.cpp
@@ -0,0 +1,649 @@
+/*PGR-GNU*****************************************************************
+
+FILE: optimize.cpp
+
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ ********************************************************************PGR-GNU*/
+
+
+#include <algorithm>
+#include <limits>
+#include <set>
+
+#include "cpp_common/pgr_assert.h"
+
+#include "vrp/solution.h"
+#include "vrp/book_keeping.h"
+#include "vrp/optimize.h"
+#include "vrp/pgr_pickDeliver.h"
+
+namespace pgrouting {
+namespace vrp {
+
+
+Optimize::Optimize(
+        const Solution &old_solution) :
+    Solution(old_solution),
+    best_solution(old_solution)  {
+        pgassert(false);
+        decrease_truck();
+        inter_swap(fleet.size());
+    }
+
+Optimize::Optimize(
+        const Solution &old_solution,
+        size_t times) :
+    Solution(old_solution),
+    best_solution(old_solution)  {
+        inter_swap(times);
+
+        this->fleet = best_solution.fleet;
+        msg.log << tau("bestSol before sort by size");
+        sort_by_size();
+        msg.log << tau("bestSol after sort by size");
+        msg.log <<  tau();
+    }
+
+
+void
+Optimize::inter_swap(size_t times) {
+    msg.log << tau("before sort by size");
+    sort_by_size();
+    msg.log << tau("before decrease");
+    decrease_truck();
+    msg.log << tau("after decrease");
+    sort_by_size();
+    msg.log << tau("after sort by size");
+
+    size_t i = 0;
+    while ((i++ < times) && inter_swap()) {
+        msg.log << tau("after inter swap");
+        msg.log << "\n***************************" << i;
+        std::rotate(fleet.begin(), fleet.begin() + 1, fleet.end());
+        msg.log << tau("before next cycle");
+    }
+}
+
+/*
+ * ordering the trucks by number of orders it has
+ * - the truck with more orders wants to:
+ *   - make less time
+ *   - do more orders
+ * The inter_swap objective is to make the trucks with more orders
+ *  - less time consuming
+ */
+bool
+Optimize::inter_swap() {
+    msg.log
+        << "\n" <<tau("before inter swap");
+    delete_empty_truck();
+    auto swapped_f = false;
+    /*
+     *   .. to ... from ....
+     */
+    for (auto &from : fleet) {
+        for (auto &to : fleet) {
+            if (&from == &to) break;
+
+#if 0
+            msg.log
+                << "\n to " << to.id()
+                << "from " << from.id();
+            auto swapped = false;
+#endif
+            swap_worse(to, from);
+            swapped_f = swap_order() || swapped_f;
+            move_reduce_cost(from, to);
+#if 0
+            msg.log << "++++++++" << p_swaps;
+#endif
+        }
+    }
+    while (!p_swaps.empty()) {
+        swapped_f = swap_order() || swapped_f;
+    }
+
+    msg.log
+        << "\n" <<tau("after");
+    delete_empty_truck();
+
+    return swapped_f;
+}
+
+
+
+/*
+ *   .. to ... from ....
+ */
+bool
+Optimize::swap_worse(Vehicle_pickDeliver &to, Vehicle_pickDeliver &from) {
+#if 0
+    pgassert(from.orders_in_vehicle().size() <= to.orders_in_vehicle().size());
+#endif
+    auto from_truck = from;
+    auto to_truck = to;
+
+    auto swapped = false;
+
+#if 0
+    auto best_from_order = from_truck.orders_in_vehicle().front();
+    auto best_to_order = to_truck.orders_in_vehicle().front();
+#endif
+    for (auto from_orders = from_truck.orders_in_vehicle();
+            !from_orders.empty();
+            from_orders.pop_front()) {
+        auto from_order = from_truck.orders()[from_orders.front()];
+#if 0
+        pgassert(from_truck.has_order(from_order));
+        msg.log << "\n" << from_orders;
+        msg.log << "\n from " << from_order.idx()
+            << "," << from_order.pickup().original_id();
+        pgassert(from_truck.has_order(from_order));
+#endif
+        auto curr_from_duration = from_truck.duration();
+        pgassert(from_truck.has_order(from_order));
+
+        for (auto to_orders = to_truck.orders_in_vehicle();
+                !to_orders.empty();
+                to_orders.pop_front()) {
+            pgassert(from_truck.has_order(from_order));
+
+            auto to_order = to.orders()[to_orders.front()];
+#if 0
+            msg.log << "\n" << to_orders;
+            msg.log << "\n To " << to_order.idx();
+#endif
+            auto curr_to_duration = to_truck.duration();
+
+            /*
+             * delete from_order, and to order from their trucks
+             */
+#if 0
+            pgassert(from_truck.has_order(from_order));
+            msg.log << "\n" << from_truck.tau();
+            msg.log << "\n" << from_order.idx();
+            pgassert(from_truck.has_order(from_order));
+#endif
+            from_truck.erase(from_order);
+            to_truck.erase(to_order);
+
+            /*
+             * insert them in the other truck
+             */
+            from_truck.insert(to_order);
+            to_truck.insert(from_order);
+
+            if (from_truck.is_feasable() && to_truck.is_feasable()) {
+                /*
+                 * Can swap but:
+                 *   - only swap when the total duration is reduced
+                 *   - or from_truck duration is reduced
+                 */
+#if 0
+                msg.log << "\n Can swap";
+                msg.log << "\n Curr_from_duration " << curr_from_duration;
+                msg.log << " Curr_to_duration " << curr_to_duration;
+                msg.log << "\n  new_from_duration "
+                    << from_truck.duration();
+                msg.log << "  new_to_duration " << to_truck.duration();
+#endif
+                auto estimated_delta =
+                    - (curr_from_duration + curr_to_duration)
+                    + (to_truck.duration() + from_truck.duration());
+
+#if 1
+                auto estimated_duration = duration() + estimated_delta;
+
+                if (from_truck.duration() < curr_from_duration ||
+                        estimated_delta < 0 ||
+                        estimated_duration < best_solution.duration()) {
+#endif
+                    msg.log
+                        << "\n Found Swap order "
+                        << from_order.pickup().id()
+                        << " from truck " << from_truck.idx()
+                        << " with order " << to_order.pickup().id()
+                        << " of truck " << to_truck.idx();
+
+                    swapped = true;
+#if 0
+                    best_to_order = to_order.idx();
+                    best_from_order = from_order.idx();
+#endif
+                    p_swaps.push(
+                            Swap_info(
+                                from,
+                                to,
+                                from_order.idx(),
+                                to_order.idx(),
+                                estimated_delta));
+#if 1
+                }
+#endif
+            }
+            to_truck = to;
+            from_truck = from;
+        }
+        from_truck = from;
+    }
+
+    return false && swapped;
+}
+
+
+bool
+Optimize::swap_order() {
+#if 0
+    msg.log << "++++++++" << p_swaps;
+#endif
+    while (!p_swaps.empty()) {
+        auto swap_data = p_swaps.top();
+        p_swaps.pop();
+        size_t from_pos = 0;
+        size_t to_pos = 0;
+
+        for (; from_pos < fleet.size()
+                && fleet[from_pos].idx() != swap_data.from_truck.idx()
+                ; ++from_pos) {
+        }
+        pgassert(from_pos < fleet.size());
+        for (; to_pos < fleet.size()
+                && fleet[to_pos].idx() != swap_data.to_truck.idx()
+                ; ++to_pos) {
+        }
+        pgassert(to_pos < fleet.size());
+
+        if (swap_order(
+                fleet[from_pos].orders()[swap_data.from_order], fleet[from_pos],
+                fleet[to_pos].orders()[swap_data.to_order], fleet[to_pos])) {
+            save_if_best();
+#if 0
+            msg.log
+                << "\n Swapping order "
+                << fleet[from_pos].orders()[
+                    swap_data.from_order].pickup().original_id()
+                << " from truck " << fleet[from_pos].id()
+                << " with order "
+                << fleet[to_pos].orders()[
+                    swap_data.to_order].pickup().original_id()
+                << " of truck " <<  fleet[to_pos].id();
+#endif
+#if 0
+            msg.log << "\nswappping after:";
+            msg.log << "\n" <<  fleet[to_pos].tau();
+            msg.log << "\n" << fleet[from_pos].tau();
+#endif
+            return true;
+        }
+    }
+    return false;
+}
+
+/*
+ * from_truck: position of the truck where the order is
+ * to truck: truck to put the order
+ */
+bool
+Optimize::swap_order(
+        const Order from_order,
+        Vehicle_pickDeliver &from_truck,
+        const Order to_order,
+        Vehicle_pickDeliver &to_truck) {
+    if (!from_truck.has_order(from_order)
+            || !to_truck.has_order(to_order)) {
+        return false;
+    }
+
+    pgassert(from_truck.has_order(from_order));
+    pgassert(to_truck.has_order(to_order));
+
+    from_truck.erase(from_order);
+    to_truck.erase(to_order);
+
+    from_truck.insert(to_order);
+    to_truck.insert(from_order);
+
+
+    pgassert(from_truck.has_order(to_order));
+    pgassert(to_truck.has_order(from_order));
+    return true;
+}
+
+void
+Optimize::sort_by_id() {
+    std::sort(fleet.begin(), fleet.end(), []
+            (const Vehicle_pickDeliver &lhs, const Vehicle_pickDeliver &rhs)
+            -> bool {
+            return lhs.orders_in_vehicle().size()
+            > rhs.orders_in_vehicle().size();
+            });
+}
+
+void
+Optimize::sort_by_size() {
+    sort_by_duration();
+    std::stable_sort(fleet.begin(), fleet.end(), []
+            (const Vehicle_pickDeliver &lhs, const Vehicle_pickDeliver &rhs)
+            -> bool {
+            return lhs.orders_in_vehicle().size()
+            > rhs.orders_in_vehicle().size();
+            });
+}
+
+void
+Optimize::sort_by_duration() {
+    std::sort(fleet.begin(), fleet.end(), []
+            (const Vehicle_pickDeliver &lhs, const Vehicle_pickDeliver &rhs)
+            -> bool {
+            return lhs.duration() > rhs.duration();
+            });
+}
+
+void
+Optimize::delete_empty_truck() {
+    fleet.erase(std::remove_if(
+                fleet.begin(),
+                fleet.end(),
+                [](const Vehicle_pickDeliver &v){
+                return v.orders_in_vehicle().empty();}),
+            fleet.end());
+    save_if_best();
+}
+
+#if 0
+void
+Optimize::move_duration_based() {
+    auto local_limit(fleet.size());
+    size_t i(0);
+
+    sort_by_duration();
+    msg.log << tau("\nmove duration based");
+    while (move_reduce_cost() && (++i < local_limit)) { }
+    delete_empty_truck();
+
+    i = 0;
+    sort_by_duration();
+    std::reverse(fleet.begin(), fleet.end());
+    msg.log << tau("\nmove duration based");
+    while (move_reduce_cost() && (++i < local_limit)) { }
+    sort_by_duration();
+    delete_empty_truck();
+    this->fleet = best_solution.fleet;
+}
+
+
+void
+Optimize::move_wait_time_based() {
+    this->fleet = best_solution.fleet;
+
+    auto local_limit(fleet.size());
+    size_t i(0);
+
+    sort_for_move();
+    msg.log << tau("\nmove wait_time based");
+    while (move_reduce_cost() && (++i < local_limit)) { }
+    delete_empty_truck();
+
+    i = 0;
+    sort_for_move();
+    std::reverse(fleet.begin(), fleet.end());
+    msg.log << tau("\nmove wait_time based");
+    while (move_reduce_cost() && (++i < local_limit)) { }
+    sort_by_duration();
+    delete_empty_truck();
+    this->fleet = best_solution.fleet;
+}
+#endif
+
+#if 0
+/*
+ * On the current order of the fleet
+ * T1 .......Tn-1  Tn Tn+1...... Tsize
+ * Tn tries to move orders to trucks
+ *      T1 .... Tn-1
+ * So that it gets space for the orders given by
+ *      Tn+1 .... Tsize
+ * On the first move possible it returns
+ *
+ * When a truck is emptied, then it removes the truck from the fleet
+ *
+ * Returns true: when a move was possible
+ * Returns false: when a move was not possible
+ */
+
+
+bool
+Optimize::move_reduce_cost() {
+    if (fleet.size() < 2) return false;
+    bool moved = false;
+
+    size_t from_pos(fleet.size() - 1);
+    while (from_pos > 1) {
+        for (size_t to_pos = 0; to_pos < from_pos; ++to_pos) {
+            moved = move_reduce_cost(from_pos, to_pos) || moved;
+        }
+        --from_pos;
+    }
+    return moved;
+}
+#endif
+
+/*
+ * from_truck trying to make from_truck's duration smaller
+ * - maybe all orders can be moved
+ *   - if that is the case, the from_truck could be removed
+ *
+ * Deleting an order on the from_truck
+ * - number of truck remains the same
+ * - from_truk duration() can not get larger
+ * - the overall duration can get larger
+ *
+ */
+bool
+Optimize::move_reduce_cost(
+        Vehicle_pickDeliver &from,
+        Vehicle_pickDeliver &to) {
+    auto from_truck = from;
+    auto to_truck = to;
+
+    /*
+     * don't move from a real truck to a phoney truck
+     */
+    if (!from_truck.is_phony() && to_truck.is_phony()) {
+        return false;
+    }
+#if 0
+    from.id()  > to.id()
+        ?  to : from;
+#endif
+    size_t from_pos = 0;
+    size_t to_pos = 0;
+
+    for (; from_pos < fleet.size()
+            && fleet[from_pos].idx() != from_truck.idx()
+            ; ++from_pos) {
+    }
+    pgassert(from_pos < fleet.size());
+    for (; to_pos < fleet.size()
+            && fleet[to_pos].idx() != to_truck.idx()
+            ; ++to_pos) {
+    }
+    pgassert(to_pos < fleet.size());
+
+    auto moved = false;
+
+    auto from_orders = from_truck.orders_in_vehicle();
+    while (!from_orders.empty()) {
+        /*
+         * removing an order decreases the duration
+         */
+        auto order = from_truck.orders()[from_orders.front()];
+        from_orders -= order.idx();
+
+        /*
+         * insert it in the "to" truck
+         */
+        to_truck.insert(order);
+        if (to_truck.is_feasable()) {
+            msg.log
+                << "\n    Move order " << order.pickup().id()
+                << " from truck " << from_truck.idx()
+                << " to truck " << to_truck.idx();
+#ifndef NDEBUG
+            msg.dbg_log << "\nMove before:";
+            msg.dbg_log << "\n" << fleet[to_pos].tau();
+            msg.dbg_log << "\n" << fleet[from_pos].tau();
+#endif
+
+#if 1
+            from_truck.erase(order);
+#else
+            to_truck.insert(order);
+            move_order(order, fleet[from_pos], fleet[to_pos]);
+#endif
+            moved = true;
+            save_if_best();
+
+#ifndef NDEBUG
+            msg.dbg_log << "\nMove after:";
+            msg.dbg_log << "\n" << fleet[to_pos].tau();
+            msg.dbg_log << "\n" << fleet[from_pos].tau();
+#endif
+        } else {
+            to_truck.erase(order);
+        }
+    }
+    return moved;
+}
+
+
+
+/*
+ * from_truck: position of the truck where the order is
+ * to truck: truck to put the order
+ */
+void
+Optimize::move_order(
+        Order order,
+        Vehicle_pickDeliver &from_truck,
+        Vehicle_pickDeliver &to_truck) {
+    pgassert(from_truck.has_order(order));
+    pgassert(!to_truck.has_order(order));
+
+    from_truck.erase(order);
+    to_truck.insert(order);
+
+    pgassert(!from_truck.has_order(order));
+    pgassert(to_truck.has_order(order));
+}
+
+void
+Optimize::sort_for_move() {
+    std::sort(fleet.begin(), fleet.end(), []
+            (const Vehicle_pickDeliver &lhs, const Vehicle_pickDeliver &rhs)
+            -> bool {
+            return lhs.total_wait_time() > rhs.total_wait_time();
+            });
+
+    std::stable_sort(fleet.begin(), fleet.end(), []
+            (const Vehicle_pickDeliver &lhs, const Vehicle_pickDeliver &rhs)
+            -> bool {
+            return lhs.orders_size() > rhs.orders_size();
+            });
+}
+
+
+/*
+ * Optimize decreasing truck
+ *
+ * - Objective: try to remove truck with less duration
+ * - Secundary objective, acts like a shake operation
+ *
+ */
+void
+Optimize::decrease_truck() {
+    bool decreased(false);
+    for (size_t i = 1; i < fleet.size(); ++i) {
+        decreased = decrease_truck(i) || decreased;
+    }
+    if (decreased) {
+        delete_empty_truck();
+        save_if_best();
+        decrease_truck();
+    }
+    save_if_best();
+}
+
+bool
+Optimize::decrease_truck(size_t cycle) {
+    auto position = cycle;
+    for (auto orders = fleet[position].orders_in_vehicle();
+            !orders.empty();
+            orders.pop_front()) {
+        /* Step 2: grab an order */
+        auto order = fleet[position].orders()[orders.front()];
+        pgassert(order.idx() == orders.front());
+
+
+        /* Step 3:
+         * cycle the fleet
+         * insert in first truck possible
+         */
+
+        for (size_t i = 0; i < position; ++i) {
+            fleet[i].insert(order);
+            if (fleet[i].is_feasable()) {
+                /*
+                 * delete the order from the current truck
+                 */
+                fleet[position].erase(order);
+                break;
+            } else {
+                fleet[i].erase(order);
+            }
+        }
+    }
+    return fleet[position].orders_in_vehicle().empty();
+}
+
+void
+Optimize::save_if_best() {
+    if (duration() < best_solution.duration()) {
+        best_solution = (*this);
+        msg.log << "\n*********** best by duration"
+            << best_solution.cost_str();
+#ifndef NDEBUG
+        msg.dbg_log << best_solution.tau("best by duration");
+#endif
+    }
+    if (fleet.size() < best_solution.fleet.size()) {
+        best_solution = (*this);
+        msg.log << "\n*********** best by fleet size"
+            << best_solution.cost_str();
+#ifndef NDEBUG
+        msg.dbg_log << best_solution.tau("best by fleet size");
+#endif
+    }
+}
+
+
+}  //  namespace vrp
+}  //  namespace pgrouting
diff --git a/src/pickDeliver/src/order.cpp b/src/pickDeliver/order.cpp
similarity index 100%
rename from src/pickDeliver/src/order.cpp
rename to src/pickDeliver/order.cpp
diff --git a/src/pickDeliver/src/pd_orders.cpp b/src/pickDeliver/pd_orders.cpp
similarity index 100%
rename from src/pickDeliver/src/pd_orders.cpp
rename to src/pickDeliver/pd_orders.cpp
diff --git a/src/pickDeliver/src/pd_problem.cpp b/src/pickDeliver/pd_problem.cpp
similarity index 100%
rename from src/pickDeliver/src/pd_problem.cpp
rename to src/pickDeliver/pd_problem.cpp
diff --git a/src/pickDeliver/src/pgr_messages.cpp b/src/pickDeliver/pgr_messages.cpp
similarity index 100%
rename from src/pickDeliver/src/pgr_messages.cpp
rename to src/pickDeliver/pgr_messages.cpp
diff --git a/src/pickDeliver/src/pgr_pickDeliver.cpp b/src/pickDeliver/pgr_pickDeliver.cpp
similarity index 100%
rename from src/pickDeliver/src/pgr_pickDeliver.cpp
rename to src/pickDeliver/pgr_pickDeliver.cpp
diff --git a/src/pickDeliver/src/pickDeliver.c b/src/pickDeliver/pickDeliver.c
similarity index 100%
rename from src/pickDeliver/src/pickDeliver.c
rename to src/pickDeliver/pickDeliver.c
diff --git a/src/pickDeliver/src/pickDeliverEuclidean.c b/src/pickDeliver/pickDeliverEuclidean.c
similarity index 100%
rename from src/pickDeliver/src/pickDeliverEuclidean.c
rename to src/pickDeliver/pickDeliverEuclidean.c
diff --git a/src/pickDeliver/src/pickDeliverEuclidean_driver.cpp b/src/pickDeliver/pickDeliverEuclidean_driver.cpp
similarity index 100%
rename from src/pickDeliver/src/pickDeliverEuclidean_driver.cpp
rename to src/pickDeliver/pickDeliverEuclidean_driver.cpp
diff --git a/src/pickDeliver/src/pickDeliver_driver.cpp b/src/pickDeliver/pickDeliver_driver.cpp
similarity index 100%
rename from src/pickDeliver/src/pickDeliver_driver.cpp
rename to src/pickDeliver/pickDeliver_driver.cpp
diff --git a/src/pickDeliver/solution.cpp b/src/pickDeliver/solution.cpp
new file mode 100644
index 0000000..67d8d28
--- /dev/null
+++ b/src/pickDeliver/solution.cpp
@@ -0,0 +1,245 @@
+/*PGR-GNU*****************************************************************
+
+FILE: solution.cpp
+
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ ********************************************************************PGR-GNU*/
+
+#include "vrp/solution.h"
+
+#include <vector>
+#include <string>
+#include <algorithm>
+
+#include "vrp/pgr_pickDeliver.h"
+#include "c_types/pickDeliver/general_vehicle_orders_t.h"
+
+namespace pgrouting {
+namespace vrp {
+
+std::vector<General_vehicle_orders_t>
+Solution::get_postgres_result() const {
+    std::vector<General_vehicle_orders_t> result;
+    /* postgres numbering starts with 1 */
+    int i(1);
+    for (const auto truck : fleet) {
+        std::vector<General_vehicle_orders_t> data =
+            truck.get_postgres_result(i);
+        result.insert(result.end(), data.begin(), data.end());
+
+        ++i;
+    }
+    return result;
+}
+
+
+
+bool
+Solution::is_feasable() const {
+    for (const auto v : fleet) {
+        if (v.is_feasable()) continue;
+        return false;
+    }
+    return true;
+}
+
+double
+Solution::duration() const {
+    double total(0);
+    for (const auto v : fleet) {
+        total += v.duration();
+    }
+    return total;
+}
+
+int
+Solution::twvTot() const {
+    int total(0);
+    for (const auto v : fleet) {
+        total += v.twvTot();
+    }
+    return total;
+}
+
+double
+Solution::wait_time() const {
+    double total(0);
+    for (const auto v : fleet) {
+        total += v.total_wait_time();
+    }
+    return total;
+}
+
+double
+Solution::total_travel_time() const {
+    double total(0);
+    for (const auto v : fleet) {
+        total += v.total_travel_time();
+    }
+    return total;
+}
+
+double
+Solution::total_service_time() const {
+    double total(0);
+    for (const auto v : fleet) {
+        total += v.total_service_time();
+    }
+    return total;
+}
+
+int
+Solution::cvTot() const {
+    int total(0);
+    for (const auto v : fleet) {
+        total += v.cvTot();
+    }
+    return total;
+}
+
+Vehicle::Cost
+Solution::cost() const {
+    double total_duration(0);
+    double total_wait_time(0);
+    int total_twv(0);
+    int total_cv(0);
+    for (const auto v : fleet) {
+        total_duration += v.duration();
+        total_wait_time += v.total_wait_time();
+        total_twv += v.twvTot();
+        total_cv += v.cvTot();
+    }
+    return std::make_tuple(
+            total_twv, total_cv, fleet.size(),
+            total_wait_time, total_duration);
+}
+
+
+
+std::string
+Solution::cost_str() const {
+    Vehicle::Cost s_cost(cost());
+    std::ostringstream log;
+
+    log << "(twv, cv, fleet, wait, duration) = ("
+        << std::get<0>(s_cost) << ", "
+        << std::get<1>(s_cost) << ", "
+        << std::get<2>(s_cost) << ", "
+        << std::get<3>(s_cost) << ", "
+        << std::get<4>(s_cost) << ")";
+
+    return log.str();
+}
+
+std::string
+Solution::tau(const std::string &title) const {
+    Vehicle::Cost s_cost(cost());
+    std::ostringstream log;
+
+    log << "\n" << title << ": " << std::endl;
+    for (const auto v : fleet) {
+        log << "\n" << v.tau();
+    }
+    log << "\n" << cost_str() << "\n";
+    return log.str();
+}
+
+void
+Solution::sort_by_id() {
+    std::sort(fleet.begin(), fleet.end(), []
+            (const Vehicle_pickDeliver &lhs, const Vehicle_pickDeliver &rhs)
+            -> bool {
+            return lhs.idx() < rhs.idx();
+            });
+}
+
+std::ostream&
+operator << (std::ostream &log, const Solution &solution) {
+    for (const auto vehicle : solution.fleet) {
+        log << vehicle;
+    }
+
+    log << "\n SOLUTION:\n\n "
+        << solution.tau();
+
+    return log;
+}
+
+bool
+Solution::operator<(const Solution &s_rhs) const {
+    Vehicle::Cost lhs(cost());
+    Vehicle::Cost rhs(s_rhs.cost());
+
+    /*
+     * capacity violations
+     */
+    if (std::get<0>(lhs) < std::get<0>(rhs))
+        return true;
+    if (std::get<0>(lhs) > std::get<0>(rhs))
+        return false;
+
+    /*
+     * time window violations
+     */
+    if (std::get<1>(lhs) < std::get<1>(rhs))
+        return true;
+    if (std::get<1>(lhs) > std::get<1>(rhs))
+        return false;
+
+    /*
+     * fleet size
+     */
+    if (std::get<2>(lhs) < std::get<2>(rhs))
+        return true;
+    if (std::get<2>(lhs) > std::get<2>(rhs))
+        return false;
+
+    /*
+     * waiting time
+     */
+    if (std::get<3>(lhs) < std::get<3>(rhs))
+        return true;
+    if (std::get<3>(lhs) > std::get<3>(rhs))
+        return false;
+
+    /*
+     * duration
+     */
+    if (std::get<4>(lhs) < std::get<4>(rhs))
+        return true;
+    if (std::get<4>(lhs) > std::get<4>(rhs))
+        return false;
+
+    return false;
+}
+
+Solution::Solution() :
+    EPSILON(0.0001),
+    trucks(problem->trucks()) {
+    ENTERING();
+    for (const auto &t : trucks) {
+        msg.log << t.tau() << "\n";
+    }
+    EXITING();
+}
+
+}  //  namespace vrp
+}  //  namespace pgrouting
diff --git a/src/pickDeliver/src/fleet.cpp b/src/pickDeliver/src/fleet.cpp
deleted file mode 100644
index 2b9f35f..0000000
--- a/src/pickDeliver/src/fleet.cpp
+++ /dev/null
@@ -1,365 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-FILE: solution.cpp
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
- ********************************************************************PGR-GNU*/
-
-#include "vrp/fleet.h"
-
-#include <vector>
-#include <memory>
-#include <utility>
-#include <limits>
-
-#include "vrp/dnode.h"
-#include "vrp/pgr_pickDeliver.h"
-
-namespace pgrouting {
-namespace vrp {
-
-
-Fleet::Fleet(const Fleet &fleet) :
-    PD_problem(),
-    m_trucks(fleet.m_trucks),
-    used(fleet.used),
-    un_used(fleet.un_used)
-    {}
-
-Fleet::Fleet(
-        const std::vector<Vehicle_t> &vehicles, double factor) :
-    PD_problem(),
-    used(),
-    un_used() {
-        build_fleet(vehicles, factor);
-        Identifiers<size_t> unused(m_trucks.size());
-        un_used = unused;
-    }
-
-
-Vehicle_pickDeliver
-Fleet::get_truck() {
-    ENTERING();
-    auto idx = un_used.front();
-    msg.log << "Available vehicles: " << un_used << "\n";
-    msg.log << "NOT Available vehicles: " << used << "\n";
-    msg.log << "getting idx" << idx << "\n";
-    pgassertwm(idx < m_trucks.size(), msg.log.str());
-    used += idx;
-    if (un_used.size() > 1) un_used -= idx;
-    EXITING();
-    return m_trucks[idx];
-}
-
-void
-Fleet::release_truck(size_t id) {
-    used -= id;
-    un_used += id;
-}
-
-Vehicle_pickDeliver
-Fleet::get_truck(size_t order) {
-    msg.log << "Available vehicles: " << un_used << "\n";
-    msg.log << "NOT Available vehicles: " << used << "\n";
-    auto idx = un_used.front();
-
-    for (const auto i : un_used) {
-        if (m_trucks[i].feasable_orders().has(order)) {
-            idx = i;
-            msg.log << "getting idx" << idx << "\n";
-            used += idx;
-            if (un_used.size() > 1) un_used -= idx;
-            return m_trucks[idx];
-        }
-    }
-
-    /*
-     * using phoney truck
-     */
-    pgassert(false);
-    return m_trucks.back();
-
-    for (auto truck : m_trucks) {
-        if (truck.feasable_orders().has(order)) {
-            idx = truck.idx();
-            msg.log << "idx" << idx << "size" << m_trucks.size();
-            pgassertwm(idx < m_trucks.size(), msg.get_log());
-            used += idx;
-            if (un_used.size() > 1) un_used -= idx;
-            break;
-        }
-    }
-    return m_trucks[idx];
-}
-
-
-Vehicle_pickDeliver
-Fleet::get_truck(const Order order) {
-    auto id = m_trucks.front().idx();
-    for (auto truck : m_trucks) {
-        if (truck.feasable_orders().has(order.idx())) {
-            id = truck.idx();
-            msg.log << "id" << id
-                << "size" << m_trucks.size();
-            pgassertwm(id < m_trucks.size(), msg.get_log());
-            used += id;
-            if (un_used.size() > 1) un_used -= id;
-            break;
-        }
-    }
-    return m_trucks[id];
-}
-
-
-void
-Fleet::add_vehicle(
-        Vehicle_t vehicle,
-        double factor,
-        std::unique_ptr<Base_node> b_start,
-        const Vehicle_node &starting_site,
-        std::unique_ptr<Base_node> b_end,
-        const Vehicle_node &ending_site) {
-    pgassert(starting_site.is_start() && ending_site.is_end());
-    pgassert(starting_site.opens() <= starting_site.closes());
-    pgassert(ending_site.opens() <= ending_site.closes());
-
-    problem->add_base_node(std::move(b_start));
-    problem->add_base_node(std::move(b_end));
-    problem->add_node(starting_site);
-    problem->add_node(ending_site);
-
-    for (int i = 0; i < vehicle.cant_v; ++i) {
-        m_trucks.push_back(Vehicle_pickDeliver(
-                    m_trucks.size(),
-                    vehicle.id,
-                    starting_site,
-                    ending_site,
-                    vehicle.capacity,
-                    vehicle.speed,
-                    factor));
-        msg.log << "inserting vehicle: " << m_trucks.back().tau() << "\n";
-        pgassert((m_trucks.back().idx() + 1)  == m_trucks.size());
-        pgassert(m_trucks.back().is_ok());
-    }
-}
-
-/*!
-  builds a fleet from a vector of Vehicle_t 
-
-  - creates a phoney truck with unlimited capacity and unlimited closing times
-  - checks that the number of vehicles is a legal value
-  - creates the requested vehicles
-
-  @param[in] vehicles  the list of vehicles
-  @param[in] factor    the multiplier to speed up or slow down
-  */
-bool
-Fleet::build_fleet(
-        std::vector<Vehicle_t> vehicles,
-        double factor) {
-    /*
-     *  creating a phoney truck with max capacity and max window
-     *  with the start & end points of the first vehicle given
-     */
-    vehicles.push_back({
-            /*
-             * id, capacity
-             */
-            -1,
-            std::numeric_limits<double>::infinity(),
-
-            vehicles[0].speed,
-            vehicles[0].start_x,
-            vehicles[0].start_y,
-            vehicles[0].start_node_id,
-
-            /*
-             * cant_v, start_open_t, start_close_t, start_service_t
-             */
-            1,
-            0,
-            std::numeric_limits<double>::infinity(),
-            0,
-
-            vehicles[0].end_x,
-            vehicles[0].end_y,
-            vehicles[0].end_node_id,
-            /*
-             * end_open_t, end_close_t, end_service_t
-             */
-            0,
-            std::numeric_limits<double>::infinity(),
-            0});
-
-
-    for (auto vehicle : vehicles) {
-        if (vehicle.cant_v < 0) {
-            msg.error << "Illegal number of vehicles found vehicle";
-            msg.log << vehicle.cant_v << "< 0 on vehicle " << vehicle.id;
-            return false;
-        }
-
-        if  (problem->m_cost_matrix.empty()) {
-            /*
-             * Euclidean version
-             */
-            auto b_start = create_b_start<Node>(vehicle, problem->node_id());
-            auto starting_site = Vehicle_node(
-                    {problem->node_id()++, vehicle, Tw_node::NodeType::kStart});
-
-            auto b_end = create_b_end<Node>(vehicle, problem->node_id());
-            auto ending_site = Vehicle_node(
-                    {problem->node_id()++, vehicle, Tw_node::NodeType::kEnd});
-
-            if (!(starting_site.is_start() && ending_site.is_end()
-                    && starting_site.opens() <= starting_site.closes()
-                    && ending_site.opens() <= ending_site.closes())) {
-                msg.clear();
-                msg.error << "Illegal values found on vehicle";
-                msg.log << "On vehicle " << vehicle.id << " a condition is not met, verify that:\n"
-                    << "-  start_open <= start_close\n"
-                    << "-  end_open <= end_close\n"
-                    << "-  capacity > 0\n";
-                pgassert(!msg.get_error().empty());
-                return false;
-            }
-
-            pgassert(starting_site.opens() <= starting_site.closes());
-            pgassert(ending_site.opens() <= ending_site.closes());
-            pgassertwm(starting_site.is_start() && ending_site.is_end(), msg.get_error().c_str());
-            add_vehicle(vehicle, factor,
-                    std::move(b_start), starting_site,
-                    std::move(b_end), ending_site);
-        } else {
-            /*
-             * Matrix version
-             */
-            auto b_start = create_b_start<Dnode>(vehicle, problem->node_id());
-            auto starting_site = Vehicle_node(
-                    {problem->node_id()++, vehicle, Tw_node::NodeType::kStart});
-
-            auto b_end = create_b_end<Dnode>(vehicle, problem->node_id());
-            auto ending_site = Vehicle_node(
-                    {problem->node_id()++, vehicle, Tw_node::NodeType::kEnd});
-
-            if (!(starting_site.is_start() && ending_site.is_end()
-                    && starting_site.opens() <= starting_site.closes()
-                    && ending_site.opens() <= ending_site.closes())) {
-                msg.clear();
-                msg.error << "Illegal values found on vehicle";
-                msg.log << "On vehicle " << vehicle.id << " a condition is not met, verify that:\n"
-                    << "-  start_open <= start_close\n"
-                    << "-  end_open <= end_close\n"
-                    << "-  capacity > 0\n";
-                pgassert(!msg.get_error().empty());
-                return false;
-            }
-
-            pgassert(starting_site.opens() <= starting_site.closes());
-            pgassert(ending_site.opens() <= ending_site.closes());
-            pgassert(starting_site.is_start() && ending_site.is_end());
-            add_vehicle(vehicle, factor,
-                    std::move(b_start), starting_site,
-                    std::move(b_end), ending_site);
-        }
-    }
-    Identifiers<size_t> unused(m_trucks.size());
-    un_used = unused;
-    return true;
-}
-
-
-bool
-Fleet::is_fleet_ok() const {
-    ENTERING();
-    if (!msg.get_error().empty()) return false;
-    for (auto truck : m_trucks) {
-        if (!truck.is_ok()) {
-            msg.error << "Illegal values found on vehicle";
-            msg.log << "On vehicle " << truck.id() << " a condition is not met, verify that:\n"
-                << "-  start_open <= start_close\n"
-                << "-  end_open <= end_close\n"
-                << "-  capacity > 0\n";
-            return false;
-        }
-
-        if (!(truck.start_site().is_start()
-                    && truck.end_site().is_end())) {
-            pgassertwm(false, "should never pass through here");
-            msg.error << "Illegal values found on vehicle";
-            return false;
-        }
-        if (!truck.is_feasable()) {
-            msg.error << "Truck is not feasible";
-            return false;
-        }
-    }
-    EXITING();
-    return true;
-}
-
-/**
- * Given an order,
- * Cycle trhugh all the trucks to verify if the order can be served by
- * at least one truck
- */
-bool
-Fleet::is_order_ok(const Order &order) const {
-    for (const auto truck : m_trucks) {
-        if (!order.is_valid(truck.speed())) continue;
-        if (truck.is_order_feasable(order)) {
-            return true;
-        }
-    }
-    return false;
-}
-
-Vehicle_pickDeliver&
-Fleet::operator[](size_t i) {
-    pgassert(i < m_trucks.size());
-    return m_trucks[i];
-}
-
-void
-Fleet::set_compatibles(const PD_Orders &orders) {
-    for (auto &truck : m_trucks) {
-        truck.set_compatibles(orders);
-    }
-}
-
-/*
- * FRIENDS
- */
-
-std::ostream&
-operator << (std::ostream &log, const Fleet &f) {
-    log << "fleet\n";
-    for (const auto v : f.m_trucks) {
-        log << v;
-    }
-    log << "end fleet\n";
-
-    return log;
-}
-
-
-}  //  namespace vrp
-}  //  namespace pgrouting
diff --git a/src/pickDeliver/src/optimize.cpp b/src/pickDeliver/src/optimize.cpp
deleted file mode 100644
index 553a087..0000000
--- a/src/pickDeliver/src/optimize.cpp
+++ /dev/null
@@ -1,650 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-FILE: optimize.cpp
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
- ********************************************************************PGR-GNU*/
-
-
-#include <algorithm>
-#include <limits>
-#include <set>
-
-#include "cpp_common/pgr_assert.h"
-
-#include "vrp/solution.h"
-#include "vrp/book_keeping.h"
-#include "vrp/optimize.h"
-#include "vrp/pgr_pickDeliver.h"
-
-namespace pgrouting {
-namespace vrp {
-
-
-Optimize::Optimize(
-        const Solution &old_solution) :
-    Solution(old_solution),
-    best_solution(old_solution)  {
-        pgassert(false);
-        decrease_truck();
-        inter_swap(fleet.size());
-    }
-
-Optimize::Optimize(
-        const Solution &old_solution,
-        size_t times) :
-    Solution(old_solution),
-    best_solution(old_solution)  {
-        inter_swap(times);
-
-        this->fleet = best_solution.fleet;
-        msg.log << tau("bestSol before sort by size");
-        sort_by_size();
-        msg.log << tau("bestSol after sort by size");
-        msg.log <<  tau();
-    }
-
-
-void
-Optimize::inter_swap(size_t times) {
-    msg.log << tau("before sort by size");
-    sort_by_size();
-    msg.log << tau("before decrease");
-    decrease_truck();
-    msg.log << tau("after decrease");
-    sort_by_size();
-    msg.log << tau("after sort by size");
-
-    size_t i = 0;
-    while ((i++ < times) && inter_swap()) {
-        msg.log << tau("after inter swap");
-        msg.log << "\n***************************" << i;
-        std::rotate(fleet.begin(), fleet.begin() + 1, fleet.end());
-        msg.log << tau("before next cycle");
-    }
-}
-
-/*
- * ordering the trucks by number of orders it has
- * - the truck with more orders wants to:
- *   - make less time
- *   - do more orders
- * The inter_swap objective is to make the trucks with more orders
- *  - less time consuming
- */
-bool
-Optimize::inter_swap() {
-    msg.log
-        << "\n" <<tau("before inter swap");
-    delete_empty_truck();
-    auto swapped_f = false;
-    /*
-     *   .. to ... from ....
-     */
-    for (auto &from : fleet) {
-        for (auto &to : fleet) {
-            if (&from == &to) break;
-
-#if 0
-            msg.log
-                << "\n to " << to.id()
-                << "from " << from.id();
-            auto swapped = false;
-#endif
-            swap_worse(to, from);
-            swapped_f = swap_order() || swapped_f;
-            move_reduce_cost(from, to);
-#if 0
-            msg.log << "++++++++" << p_swaps;
-#endif
-        }
-    }
-    while (!p_swaps.empty()) {
-        swapped_f = swap_order() || swapped_f;
-    }
-
-    msg.log
-        << "\n" <<tau("after");
-    delete_empty_truck();
-
-    return swapped_f;
-}
-
-
-
-/*
- *   .. to ... from ....
- */
-bool
-Optimize::swap_worse(Vehicle_pickDeliver &to, Vehicle_pickDeliver &from) {
-#if 0
-    pgassert(from.orders_in_vehicle().size() <= to.orders_in_vehicle().size());
-#endif
-    auto from_truck = from;
-    auto to_truck = to;
-
-    auto swapped = false;
-
-#if 0
-    auto best_from_order = from_truck.orders_in_vehicle().front();
-    auto best_to_order = to_truck.orders_in_vehicle().front();
-#endif
-    for (auto from_orders = from_truck.orders_in_vehicle();
-            !from_orders.empty();
-            from_orders.pop_front()) {
-        auto from_order = from_truck.orders()[from_orders.front()];
-#if 0
-        pgassert(from_truck.has_order(from_order));
-        msg.log << "\n" << from_orders;
-        msg.log << "\n from " << from_order.idx()
-            << "," << from_order.pickup().original_id();
-        pgassert(from_truck.has_order(from_order));
-#endif
-        auto curr_from_duration = from_truck.duration();
-        pgassert(from_truck.has_order(from_order));
-
-        for (auto to_orders = to_truck.orders_in_vehicle();
-                !to_orders.empty();
-                to_orders.pop_front()) {
-            pgassert(from_truck.has_order(from_order));
-
-            auto to_order = to.orders()[to_orders.front()];
-#if 0
-            msg.log << "\n" << to_orders;
-            msg.log << "\n To " << to_order.idx();
-#endif
-            auto curr_to_duration = to_truck.duration();
-
-            /*
-             * delete from_order, and to order from their trucks
-             */
-#if 0
-            pgassert(from_truck.has_order(from_order));
-            msg.log << "\n" << from_truck.tau();
-            msg.log << "\n" << from_order.idx();
-            pgassert(from_truck.has_order(from_order));
-#endif
-            from_truck.erase(from_order);
-            to_truck.erase(to_order);
-
-            /*
-             * insert them in the other truck
-             */
-            from_truck.insert(to_order);
-            to_truck.insert(from_order);
-
-            if (from_truck.is_feasable() && to_truck.is_feasable()) {
-                /*
-                 * Can swap but:
-                 *   - only swap when the total duration is reduced
-                 *   - or from_truck duration is reduced
-                 */
-#if 0
-                msg.log << "\n Can swap";
-                msg.log << "\n Curr_from_duration " << curr_from_duration;
-                msg.log << " Curr_to_duration " << curr_to_duration;
-                msg.log << "\n  new_from_duration "
-                    << from_truck.duration();
-                msg.log << "  new_to_duration " << to_truck.duration();
-#endif
-                auto estimated_delta =
-                    - (curr_from_duration + curr_to_duration)
-                    + (to_truck.duration() + from_truck.duration());
-
-#if 1
-                auto estimated_duration = duration() + estimated_delta;
-
-                if (from_truck.duration() < curr_from_duration ||
-                        estimated_delta < 0 ||
-                        estimated_duration < best_solution.duration()) {
-#endif
-                    msg.log
-                        << "\n Found Swap order "
-                        << from_order.pickup().id()
-                        << " from truck " << from_truck.idx()
-                        << " with order " << to_order.pickup().id()
-                        << " of truck " << to_truck.idx();
-
-                    swapped = true;
-#if 0
-                    best_to_order = to_order.idx();
-                    best_from_order = from_order.idx();
-#endif
-                    p_swaps.push(
-                            Swap_info(
-                                from,
-                                to,
-                                from_order.idx(),
-                                to_order.idx(),
-                                estimated_delta));
-#if 1
-                }
-#endif
-            }
-            to_truck = to;
-            from_truck = from;
-        }
-        from_truck = from;
-    }
-
-    return false && swapped;
-}
-
-
-bool
-Optimize::swap_order() {
-#if 0
-    msg.log << "++++++++" << p_swaps;
-#endif
-    while (!p_swaps.empty()) {
-        auto swap_data = p_swaps.top();
-        p_swaps.pop();
-        size_t from_pos = 0;
-        size_t to_pos = 0;
-
-        for (; from_pos < fleet.size()
-                && fleet[from_pos].idx() != swap_data.from_truck.idx()
-                ; ++from_pos) {
-        }
-        pgassert(from_pos < fleet.size());
-        for (; to_pos < fleet.size()
-                && fleet[to_pos].idx() != swap_data.to_truck.idx()
-                ; ++to_pos) {
-        }
-        pgassert(to_pos < fleet.size());
-
-        if (swap_order(
-                fleet[from_pos].orders()[swap_data.from_order], fleet[from_pos],
-                fleet[to_pos].orders()[swap_data.to_order], fleet[to_pos])) {
-            save_if_best();
-#if 0
-            msg.log
-                << "\n Swapping order "
-                << fleet[from_pos].orders()[
-                    swap_data.from_order].pickup().original_id()
-                << " from truck " << fleet[from_pos].id()
-                << " with order "
-                << fleet[to_pos].orders()[
-                    swap_data.to_order].pickup().original_id()
-                << " of truck " <<  fleet[to_pos].id();
-#endif
-#if 0
-            msg.log << "\nswappping after:";
-            msg.log << "\n" <<  fleet[to_pos].tau();
-            msg.log << "\n" << fleet[from_pos].tau();
-#endif
-            return true;
-        }
-    }
-    return false;
-}
-
-/*
- * from_truck: position of the truck where the order is
- * to truck: truck to put the order
- */
-bool
-Optimize::swap_order(
-        const Order from_order,
-        Vehicle_pickDeliver &from_truck,
-        const Order to_order,
-        Vehicle_pickDeliver &to_truck) {
-    if (!from_truck.has_order(from_order)
-            || !to_truck.has_order(to_order)) {
-        return false;
-    }
-
-    pgassert(from_truck.has_order(from_order));
-    pgassert(to_truck.has_order(to_order));
-
-    from_truck.erase(from_order);
-    to_truck.erase(to_order);
-
-    from_truck.insert(to_order);
-    to_truck.insert(from_order);
-
-
-    pgassert(from_truck.has_order(to_order));
-    pgassert(to_truck.has_order(from_order));
-    return true;
-}
-
-void
-Optimize::sort_by_id() {
-    std::sort(fleet.begin(), fleet.end(), []
-            (const Vehicle_pickDeliver &lhs, const Vehicle_pickDeliver &rhs)
-            -> bool {
-            return lhs.orders_in_vehicle().size()
-            > rhs.orders_in_vehicle().size();
-            });
-}
-
-void
-Optimize::sort_by_size() {
-    sort_by_duration();
-    std::stable_sort(fleet.begin(), fleet.end(), []
-            (const Vehicle_pickDeliver &lhs, const Vehicle_pickDeliver &rhs)
-            -> bool {
-            return lhs.orders_in_vehicle().size()
-            > rhs.orders_in_vehicle().size();
-            });
-}
-
-void
-Optimize::sort_by_duration() {
-    std::sort(fleet.begin(), fleet.end(), []
-            (const Vehicle_pickDeliver &lhs, const Vehicle_pickDeliver &rhs)
-            -> bool {
-            return lhs.duration() > rhs.duration();
-            });
-}
-
-void
-Optimize::delete_empty_truck() {
-    fleet.erase(std::remove_if(
-                fleet.begin(),
-                fleet.end(),
-                [](const Vehicle_pickDeliver &v){
-                return v.orders_in_vehicle().empty();}),
-            fleet.end());
-    save_if_best();
-}
-
-#if 0
-void
-Optimize::move_duration_based() {
-    auto local_limit(fleet.size());
-    size_t i(0);
-
-    sort_by_duration();
-    msg.log << tau("\nmove duration based");
-    while (move_reduce_cost() && (++i < local_limit)) { }
-    delete_empty_truck();
-
-    i = 0;
-    sort_by_duration();
-    std::reverse(fleet.begin(), fleet.end());
-    msg.log << tau("\nmove duration based");
-    while (move_reduce_cost() && (++i < local_limit)) { }
-    sort_by_duration();
-    delete_empty_truck();
-    this->fleet = best_solution.fleet;
-}
-
-
-void
-Optimize::move_wait_time_based() {
-    this->fleet = best_solution.fleet;
-
-    auto local_limit(fleet.size());
-    size_t i(0);
-
-    sort_for_move();
-    msg.log << tau("\nmove wait_time based");
-    while (move_reduce_cost() && (++i < local_limit)) { }
-    delete_empty_truck();
-
-    i = 0;
-    sort_for_move();
-    std::reverse(fleet.begin(), fleet.end());
-    msg.log << tau("\nmove wait_time based");
-    while (move_reduce_cost() && (++i < local_limit)) { }
-    sort_by_duration();
-    delete_empty_truck();
-    this->fleet = best_solution.fleet;
-}
-#endif
-
-#if 0
-/*
- * On the current order of the fleet
- * T1 .......Tn-1  Tn Tn+1...... Tsize
- * Tn tries to move orders to trucks
- *      T1 .... Tn-1
- * So that it gets space for the orders given by
- *      Tn+1 .... Tsize
- * On the first move possible it returns
- *
- * When a truck is emptied, then it removes the truck from the fleet
- *
- * Returns true: when a move was possible
- * Returns false: when a move was not possible
- */
-
-
-bool
-Optimize::move_reduce_cost() {
-    if (fleet.size() < 2) return false;
-    bool moved = false;
-
-    size_t from_pos(fleet.size() - 1);
-    while (from_pos > 1) {
-        for (size_t to_pos = 0; to_pos < from_pos; ++to_pos) {
-            moved = move_reduce_cost(from_pos, to_pos) || moved;
-        }
-        --from_pos;
-    }
-    return moved;
-}
-#endif
-
-/*
- * from_truck trying to make from_truck's duration smaller
- * - maybe all orders can be moved
- *   - if that is the case, the from_truck could be removed
- *
- * Deleting an order on the from_truck
- * - number of truck remains the same
- * - from_truk duration() can not get larger
- * - the overall duration can get larger
- *
- */
-bool
-Optimize::move_reduce_cost(
-        Vehicle_pickDeliver &from,
-        Vehicle_pickDeliver &to) {
-    auto from_truck = from;
-    auto to_truck = to;
-
-    /*
-     * don't move from a real truck to a phoney truck
-     */
-    if (!from_truck.is_phony() && to_truck.is_phony()) {
-        return false;
-    }
-#if 0
-    from.id()  > to.id()
-        ?  to : from;
-#endif
-    size_t from_pos = 0;
-    size_t to_pos = 0;
-
-    for (; from_pos < fleet.size()
-            && fleet[from_pos].idx() != from_truck.idx()
-            ; ++from_pos) {
-    }
-    pgassert(from_pos < fleet.size());
-    for (; to_pos < fleet.size()
-            && fleet[to_pos].idx() != to_truck.idx()
-            ; ++to_pos) {
-    }
-    pgassert(to_pos < fleet.size());
-
-    auto moved = false;
-
-    auto from_orders = from_truck.orders_in_vehicle();
-    while (!from_orders.empty()) {
-        /*
-         * removing an order decreases the duration
-         */
-        auto order = from_truck.orders()[from_orders.front()];
-        from_orders -= order.idx();
-
-        /*
-         * insert it in the "to" truck
-         */
-        to_truck.insert(order);
-        if (to_truck.is_feasable()) {
-            msg.log
-                << "\n    Move order " << order.pickup().id()
-                << " from truck " << from_truck.idx()
-                << " to truck " << to_truck.idx();
-#ifndef NDEBUG
-            msg.dbg_log << "\nMove before:";
-            msg.dbg_log << "\n" << fleet[to_pos].tau();
-            msg.dbg_log << "\n" << fleet[from_pos].tau();
-#endif
-
-#if 1
-            from_truck.erase(order);
-#else
-            to_truck.insert(order);
-            move_order(order, fleet[from_pos], fleet[to_pos]);
-#endif
-            moved = true;
-            save_if_best();
-
-#ifndef NDEBUG
-            msg.dbg_log << "\nMove after:";
-            msg.dbg_log << "\n" << fleet[to_pos].tau();
-            msg.dbg_log << "\n" << fleet[from_pos].tau();
-#endif
-        } else {
-            to_truck.erase(order);
-        }
-    }
-    return moved;
-}
-
-
-
-/*
- * from_truck: position of the truck where the order is
- * to truck: truck to put the order
- */
-void
-Optimize::move_order(
-        Order order,
-        Vehicle_pickDeliver &from_truck,
-        Vehicle_pickDeliver &to_truck) {
-    pgassert(from_truck.has_order(order));
-    pgassert(!to_truck.has_order(order));
-
-    from_truck.erase(order);
-    to_truck.insert(order);
-
-    pgassert(!from_truck.has_order(order));
-    pgassert(to_truck.has_order(order));
-}
-
-void
-Optimize::sort_for_move() {
-    std::sort(fleet.begin(), fleet.end(), []
-            (const Vehicle_pickDeliver &lhs, const Vehicle_pickDeliver &rhs)
-            -> bool {
-            return lhs.total_wait_time() > rhs.total_wait_time();
-            });
-
-    std::stable_sort(fleet.begin(), fleet.end(), []
-            (const Vehicle_pickDeliver &lhs, const Vehicle_pickDeliver &rhs)
-            -> bool {
-            return lhs.orders_size() > rhs.orders_size();
-            });
-}
-
-
-/*
- * Optimize decreasing truck
- *
- * - Objective: try to remove truck with less duration
- * - Secundary objective, acts like a shake operation
- *
- */
-void
-Optimize::decrease_truck() {
-    bool decreased(false);
-    for (size_t i = 1; i < fleet.size(); ++i) {
-        decreased = decrease_truck(i) || decreased;
-    }
-    if (decreased) {
-        delete_empty_truck();
-        save_if_best();
-        decrease_truck();
-    }
-    save_if_best();
-}
-
-bool
-Optimize::decrease_truck(size_t cycle) {
-
-    auto position = cycle;
-    for (auto orders = fleet[position].orders_in_vehicle();
-            !orders.empty();
-            orders.pop_front()) {
-        /* Step 2: grab an order */
-        auto order = fleet[position].orders()[orders.front()];
-        pgassert(order.idx() == orders.front());
-
-
-        /* Step 3:
-         * cycle the fleet
-         * insert in first truck possible
-         */
-
-        for (size_t i = 0; i < position; ++i) {
-            fleet[i].insert(order);
-            if (fleet[i].is_feasable()) {
-                /*
-                 * delete the order from the current truck
-                 */
-                fleet[position].erase(order);
-                break;
-            } else {
-                fleet[i].erase(order);
-            }
-        }
-    }
-    return fleet[position].orders_in_vehicle().empty();
-}
-
-void
-Optimize::save_if_best() {
-    if (duration() < best_solution.duration()) {
-        best_solution = (*this);
-        msg.log << "\n*********** best by duration"
-            << best_solution.cost_str();
-#ifndef NDEBUG
-        msg.dbg_log << best_solution.tau("best by duration");
-#endif
-    }
-    if (fleet.size() < best_solution.fleet.size()) {
-        best_solution = (*this);
-        msg.log << "\n*********** best by fleet size"
-            << best_solution.cost_str();
-#ifndef NDEBUG
-        msg.dbg_log << best_solution.tau("best by fleet size");
-#endif
-    }
-}
-
-
-}  //  namespace vrp
-}  //  namespace pgrouting
diff --git a/src/pickDeliver/src/solution.cpp b/src/pickDeliver/src/solution.cpp
deleted file mode 100644
index aca7dd3..0000000
--- a/src/pickDeliver/src/solution.cpp
+++ /dev/null
@@ -1,246 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-FILE: solution.cpp
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
- ********************************************************************PGR-GNU*/
-
-#include "vrp/solution.h"
-
-#include <vector>
-#include <string>
-#include <algorithm>
-
-#include "vrp/pgr_pickDeliver.h"
-#include "c_types/pickDeliver/general_vehicle_orders_t.h"
-
-namespace pgrouting {
-namespace vrp {
-
-std::vector<General_vehicle_orders_t>
-Solution::get_postgres_result() const {
-    std::vector<General_vehicle_orders_t> result;
-    /* postgres numbering starts with 1 */
-    int i(1);
-    for (const auto truck : fleet) {
-        std::vector<General_vehicle_orders_t> data =
-            truck.get_postgres_result(i);
-        result.insert(result.end(), data.begin(), data.end());
-
-        ++i;
-    }
-    return result;
-}
-
-
-
-bool
-Solution::is_feasable() const {
-    for (const auto v : fleet) {
-        if (v.is_feasable()) continue;
-        return false;
-    }
-    return true;
-}
-
-double
-Solution::duration() const {
-    double total(0);
-    for (const auto v : fleet) {
-        total += v.duration();
-    }
-    return total;
-}
-
-int
-Solution::twvTot() const {
-    int total(0);
-    for (const auto v : fleet) {
-        total += v.twvTot();
-    }
-    return total;
-}
-
-double
-Solution::wait_time() const {
-    double total(0);
-    for (const auto v : fleet) {
-        total += v.total_wait_time();
-    }
-    return total;
-}
-
-double
-Solution::total_travel_time() const {
-    double total(0);
-    for (const auto v : fleet) {
-        total += v.total_travel_time();
-    }
-    return total;
-}
-
-double
-Solution::total_service_time() const {
-    double total(0);
-    for (const auto v : fleet) {
-        total += v.total_service_time();
-    }
-    return total;
-}
-
-int
-Solution::cvTot() const {
-    int total(0);
-    for (const auto v : fleet) {
-        total += v.cvTot();
-    }
-    return total;
-}
-
-Vehicle::Cost
-Solution::cost() const {
-    double total_duration(0);
-    double total_wait_time(0);
-    int total_twv(0);
-    int total_cv(0);
-    for (const auto v : fleet) {
-        total_duration += v.duration();
-        total_wait_time += v.total_wait_time();
-        total_twv += v.twvTot();
-        total_cv += v.cvTot();
-    }
-    return std::make_tuple(
-            total_twv, total_cv, fleet.size(),
-            total_wait_time, total_duration);
-}
-
-
-
-std::string
-Solution::cost_str() const {
-    Vehicle::Cost s_cost(cost());
-    std::ostringstream log;
-
-    log << "(twv, cv, fleet, wait, duration) = ("
-        << std::get<0>(s_cost) << ", "
-        << std::get<1>(s_cost) << ", "
-        << std::get<2>(s_cost) << ", "
-        << std::get<3>(s_cost) << ", "
-        << std::get<4>(s_cost) << ")";
-
-    return log.str();
-}
-
-std::string
-Solution::tau(const std::string &title) const {
-    Vehicle::Cost s_cost(cost());
-    std::ostringstream log;
-
-    log << "\n" << title << ": " << std::endl;
-    for (const auto v : fleet) {
-        log << "\n" << v.tau();
-    }
-    log << "\n" << cost_str() << "\n";
-    return log.str();
-}
-
-void
-Solution::sort_by_id() {
-    std::sort(fleet.begin(), fleet.end(), []
-            (const Vehicle_pickDeliver &lhs, const Vehicle_pickDeliver &rhs)
-            -> bool {
-            return lhs.idx() < rhs.idx();
-            });
-}
-
-std::ostream&
-operator << (std::ostream &log, const Solution &solution) {
-    for (const auto vehicle : solution.fleet) {
-        log << vehicle;
-    }
-
-    log << "\n SOLUTION:\n\n "
-        << solution.tau();
-
-    return log;
-}
-
-bool
-Solution::operator<(const Solution &s_rhs) const {
-    Vehicle::Cost lhs(cost());
-    Vehicle::Cost rhs(s_rhs.cost());
-
-    /*
-     * capacity violations
-     */
-    if (std::get<0>(lhs) < std::get<0>(rhs))
-        return true;
-    if (std::get<0>(lhs) > std::get<0>(rhs))
-        return false;
-
-    /*
-     * time window violations
-     */
-    if (std::get<1>(lhs) < std::get<1>(rhs))
-        return true;
-    if (std::get<1>(lhs) > std::get<1>(rhs))
-        return false;
-
-    /*
-     * fleet size
-     */
-    if (std::get<2>(lhs) < std::get<2>(rhs))
-        return true;
-    if (std::get<2>(lhs) > std::get<2>(rhs))
-        return false;
-
-    /*
-     * waiting time
-     */
-    if (std::get<3>(lhs) < std::get<3>(rhs))
-        return true;
-    if (std::get<3>(lhs) > std::get<3>(rhs))
-        return false;
-
-    /*
-     * duration
-     */
-    if (std::get<4>(lhs) < std::get<4>(rhs))
-        return true;
-    if (std::get<4>(lhs) > std::get<4>(rhs))
-        return false;
-
-    return false;
-}
-
-Solution::Solution() :
-    EPSILON(0.0001),
-    trucks(problem->trucks())
-{
-    ENTERING();
-    for (const auto &t : trucks) {
-        msg.log << t.tau() << "\n";
-    }
-    EXITING();
-}
-
-}  //  namespace vrp
-}  //  namespace pgrouting
diff --git a/src/pickDeliver/src/tw_node.cpp b/src/pickDeliver/src/tw_node.cpp
deleted file mode 100644
index 73dc4b1..0000000
--- a/src/pickDeliver/src/tw_node.cpp
+++ /dev/null
@@ -1,293 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-FILE: tw_node.cpp
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
- ********************************************************************PGR-GNU*/
-
-#include "vrp/tw_node.h"
-
-#include <limits>
-#include <string>
-
-#include "cpp_common/pgr_assert.h"
-#include "vrp/pgr_pickDeliver.h"
-
-
-namespace pgrouting {
-namespace vrp {
-
-
-double
-Tw_node::travel_time_to(const Tw_node &to, double speed) const {
-    /** TODO(vicky)
-     * shall call Node or Dnode
-     * static cast won't work I think
-     *
-     */
-    auto from =  problem->m_base_nodes[idx()].get();
-    auto destination = problem->m_base_nodes[to.idx()].get();
-    pgassert(speed != 0);
-     /*! @todo TODO evaluate with matrix also*/
-    return from->distance(destination) / speed;
-}
-
-
-/*
- * I -> J = (*this)
- */
-double
-Tw_node::arrival_j_opens_i(const Tw_node &I, double speed) const {
-    if (m_type == kStart) return (std::numeric_limits<double>::max)();
-    return I.opens() + I.service_time() + I.travel_time_to(*this, speed);
-}
-
-double
-Tw_node::arrival_j_closes_i(const Tw_node &I, double speed) const {
-    if (m_type == kStart) return  (std::numeric_limits<double>::max)();
-    return I.closes() + I.service_time() + I.travel_time_to(*this, speed);
-}
-
-
-
-
-bool
-Tw_node::is_compatible_IJ(const Tw_node &I, double speed) const {
-    /*
-     * I /->  kStart
-     */
-    if (m_type == kStart) return false;
-    /*
-     * kEnd /-> (*this)
-     */
-    if (I.m_type == kEnd) return false;
-
-    return !is_late_arrival(arrival_j_opens_i(I, speed));
-}
-
-bool
-Tw_node::is_partially_compatible_IJ(const Tw_node &I, double speed) const {
-    return
-        is_compatible_IJ(I, speed)
-        && !is_early_arrival(arrival_j_opens_i(I, speed))
-        && is_late_arrival(arrival_j_closes_i(I, speed));
-}
-
-bool
-Tw_node::is_tight_compatible_IJ(const Tw_node &I, double speed) const {
-    return
-        is_compatible_IJ(I, speed)
-        && !is_early_arrival(arrival_j_opens_i(I, speed))
-        && !is_late_arrival(arrival_j_closes_i(I, speed));
-}
-
-bool
-Tw_node::is_partially_waitTime_compatible_IJ(
-        const Tw_node &I,
-        double speed) const {
-    return
-        is_compatible_IJ(I, speed)
-        && is_early_arrival(arrival_j_opens_i(I, speed));
-}
-
-bool
-Tw_node::is_waitTime_compatible_IJ(const Tw_node &I, double speed) const {
-    return
-        is_compatible_IJ(I, speed)
-        && is_early_arrival(arrival_j_opens_i(I, speed));
-}
-
-
-std::string Tw_node::type_str() const {
-    switch (type()) {
-        case kStart: return "START"; break;
-        case kEnd: return "END"; break;
-        case kDump: return "DUMP"; break;
-        case kLoad: return "LOAD"; break;
-        case kPickup: return "PICKUP"; break;
-        case kDelivery: return "DELIVERY"; break;
-        default: return "UNKNOWN";
-    }
-}
-
-bool
-Tw_node::is_start() const {
-    return
-        m_type == kStart
-        && (0 <= opens())
-        && (opens() < closes())
-        && (service_time() >= 0)
-        && (demand() == 0);
-}
-
-bool
-Tw_node::is_pickup() const {
-    return m_type == kPickup
-        && (0 <= opens())
-        && (opens() < closes())
-        && (service_time() >= 0)
-        && (demand() > 0);
-}
-
-
-bool
-Tw_node::is_delivery() const {
-    return m_type == kDelivery
-        && (0 <= opens())
-        && (opens() < closes())
-        && (service_time() >= 0)
-        && (demand() < 0);
-}
-
-
-bool
-Tw_node::is_dump() const {
-    return m_type == kDump
-        && (0 <= opens())
-        && (opens() < closes())
-        && (service_time() >= 0)
-        && (demand() <= 0);
-}
-
-
-bool
-Tw_node::is_load() const {
-    return m_type == kLoad
-        && (0 <= opens())
-        && (opens() < closes())
-        && (service_time() >= 0)
-        && (demand() >= 0);
-}
-
-
-bool
-Tw_node::is_end() const {
-    return m_type == kEnd
-        && (0 <= opens())
-        && (opens() < closes())
-        && (service_time() >= 0)
-        && (demand() == 0);
-}
-
-
-bool
-Tw_node::operator ==(const Tw_node &other) const {
-    if (&other == this) return true;
-    auto lhs = static_cast<const Node&>(
-            *problem->m_base_nodes[idx()].get());
-    auto rhs = static_cast<const Node&>(
-            *problem->m_base_nodes[other.idx()].get());
-    return lhs == rhs;
-}
-
-
-
-bool Tw_node::is_valid() const {
-    switch (type()) {
-        case kStart:
-            return is_start();
-            break;
-
-        case kEnd:
-            return is_end();
-            break;
-
-        case kDump:
-            return is_dump();
-            break;
-
-        case kDelivery:
-            return is_delivery();
-            break;
-
-        case kPickup:
-            return is_pickup();
-            break;
-
-        case kLoad:
-            return is_load();
-            break;
-
-        default:
-            return false;
-            break;
-    }
-
-    return false;
-}
-
-
-Tw_node::Tw_node(
-        size_t id,
-        PickDeliveryOrders_t data,
-        NodeType type) :
-    Identifier(id, data.pick_node_id),
-    m_order(data.id),
-    m_opens(data.pick_open_t),
-    m_closes(data.pick_close_t),
-    m_service_time(data.pick_service_t),
-    m_demand(data.demand),
-    m_type(type)  {
-        if (m_type == kDelivery) {
-            reset_id(data.deliver_node_id);
-            m_opens = data.deliver_open_t;
-            m_closes = data.deliver_close_t;
-            m_service_time = data.deliver_service_t;
-            m_demand *= -1;
-        }
-    }
-
-Tw_node::Tw_node(
-        size_t id,
-        Vehicle_t data,
-        NodeType type) :
-    Identifier(id, data.start_node_id),
-    m_opens(data.start_open_t),
-    m_closes(data.start_close_t),
-    m_service_time(data.start_service_t),
-    m_demand(0),
-    m_type(type) {
-        if (m_type == kEnd) {
-            reset_id(data.end_node_id);
-            m_opens = data.end_open_t;
-            m_closes = data.end_close_t;
-            m_service_time = data.end_service_t;
-        }
-    }
-
-
-/*! * \brief Print the contents of a Twnode object. */
-std::ostream& operator << (std::ostream &log, const Tw_node &n) {
-    log << static_cast<const Node&>(
-            *n.problem->m_base_nodes[n.idx()].get())
-        << "[opens = " << n.m_opens
-        << "\tcloses = " << n.m_closes
-        << "\tservice = " << n.m_service_time
-        << "\tdemand = " << n.m_demand
-        << "\ttype = " << n.type_str()
-        << "]"
-        << "\n";
-    return log;
-}
-
-}  //  namespace vrp
-}  //  namespace pgrouting
-
diff --git a/src/pickDeliver/src/vehicle.cpp b/src/pickDeliver/src/vehicle.cpp
deleted file mode 100644
index f5aa761..0000000
--- a/src/pickDeliver/src/vehicle.cpp
+++ /dev/null
@@ -1,577 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-FILE: vehicle.cpp
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
- ********************************************************************PGR-GNU*/
-
-#include "vrp/vehicle.h"
-
-#include <deque>
-#include <iostream>
-#include <algorithm>
-#include <tuple>
-#include <limits>
-#include <string>
-#include <utility>
-#include <vector>
-
-#include "cpp_common/pgr_assert.h"
-
-#include "vrp/pgr_pickDeliver.h"
-
-
-namespace pgrouting {
-namespace vrp {
-
-
-void
-Vehicle::invariant() const {
-    pgassert(m_path.size() >= 2);
-    pgassert(m_path.front().is_start());
-    pgassert(m_path.back().is_end());
-}
-
-size_t
-Vehicle::insert(std::pair<POS, POS> position_limits, const Vehicle_node &node) {
-    invariant();
-    pgassert(position_limits.first <= m_path.size());
-    pgassert(position_limits.second <= m_path.size());
-
-    auto low = position_limits.first;
-    auto high = position_limits.second;
-    auto best = low;
-
-
-    insert(low, node);
-
-    Vehicle::Cost best_cost(cost());
-
-
-    while (low < high) {
-        swap(low, low + 1);
-        ++low;
-        if (cost_compare(best_cost, cost())) {
-            best_cost = cost();
-            best = low;
-        }
-    }
-    return best;
-
-    pgassert(best < m_path.size());
-    pgassert(m_path[best].idx() == node.idx());
-    invariant();
-}
-
-
-
-
-bool
-Vehicle::cost_compare(const Cost &lhs, const Cost &rhs) const {
-    /*
-     * capacity violations
-     */
-    if (std::get<1>(lhs) < std::get<1>(rhs))
-        return true;
-    if (std::get<1>(lhs) > std::get<1>(rhs))
-        return false;
-
-    /*
-     * time window violations
-     */
-    if (std::get<0>(lhs) < std::get<0>(rhs))
-        return true;
-    if (std::get<0>(lhs) > std::get<0>(rhs))
-        return false;
-
-    /*
-     * waiting time
-     */
-    if (std::get<3>(lhs) < std::get<3>(rhs))
-        return true;
-    if (std::get<3>(lhs) > std::get<3>(rhs))
-        return false;
-
-    /*
-     * duration
-     */
-    if (std::get<4>(lhs) < std::get<4>(rhs))
-        return true;
-    if (std::get<4>(lhs) > std::get<4>(rhs))
-        return false;
-
-    /*
-     * truck size
-     */
-    if (std::get<2>(lhs) < std::get<2>(rhs))
-        return true;
-    if (std::get<2>(lhs) > std::get<2>(rhs))
-        return false;
-
-    return false;
-}
-
-
-
-std::vector<General_vehicle_orders_t>
-Vehicle::get_postgres_result(
-        int vid) const {
-    std::vector<General_vehicle_orders_t> result;
-    /* postgres numbering starts with 1 */
-    int stop_seq(1);
-    msg.log << "getting solution: " << tau() << "\n";
-    for (const auto p_stop : m_path) {
-        General_vehicle_orders_t data = {
-            vid,
-            id(),
-            stop_seq,
-            /* order_id
-             * The order_id is invalid for stops type 0 and 5
-             */
-            (p_stop.type() == 0 || p_stop.type() == 5)? -1 : p_stop.order(),
-            p_stop.id(),
-            p_stop.type(),
-            p_stop.cargo(),
-            p_stop.travel_time(),
-            p_stop.arrival_time(),
-            p_stop.wait_time(),
-            p_stop.service_time(),
-            p_stop.departure_time()};
-        result.push_back(data);
-        ++stop_seq;
-    }
-    return result;
-}
-
-
-Vehicle::Cost
-Vehicle::cost() const {
-    return std::make_tuple(
-            twvTot(), cvTot(), m_path.size(),
-            total_wait_time(), duration());
-}
-
-
-void
-Vehicle::insert(POS at, Vehicle_node node) {
-    invariant();
-    pgassert(at <= m_path.size());
-
-    m_path.insert(m_path.begin() + at, node);
-    evaluate(at);
-
-    pgassert(at < m_path.size());
-    pgassert(m_path[at].idx() == node.idx());
-    invariant();
-}
-
-
-double
-Vehicle::deltaTime(const Vehicle_node &node, POS pos) const {
-    /*
-     * .... POS POS+1 ....
-     * .... POS node POS+1 ....
-     *
-     */
-    auto prev = m_path[pos-1];
-    auto next = m_path[pos];
-    auto original_time = next.travel_time();
-    auto tt_p_n = prev.travel_time_to(node, speed());
-    tt_p_n = node.is_early_arrival(prev.departure_time() + tt_p_n) ?
-        node.closes() - prev.departure_time()
-        : tt_p_n;
-
-    auto tt_n_x = node.travel_time_to(next, speed());
-    tt_p_n = next.is_early_arrival(
-            prev.departure_time() + tt_p_n + node.service_time() + tt_n_x) ?
-        next.closes() - (prev.departure_time() + tt_p_n + node.service_time())
-        : tt_n_x;
-
-    return (tt_p_n + tt_n_x) - original_time;
-}
-
-
-
-
-size_t
-Vehicle::insert_less_travel_time(const Vehicle_node &node, POS after_pos) {
-    invariant();
-
-    double min_delta = (std::numeric_limits<double>::max)();
-    POS min_pos = after_pos;
-
-    for (POS pos = after_pos; pos < m_path.size(); ++pos) {
-        if (!m_path[pos].is_start()) {
-            auto tt = deltaTime(node, pos);
-
-            if (tt < min_delta) {
-                min_delta = tt;
-                min_pos = pos;
-            }
-        }
-    }
-    insert(min_pos, node);
-
-    invariant();
-    return min_pos;
-}
-
-void
-Vehicle::erase(const Vehicle_node &node) {
-    invariant();
-
-    POS pos = 0;
-    for ( ; pos < m_path.size() ; ++pos) {
-        if (node.idx() == m_path[pos].idx())
-            break;
-    }
-
-    erase(pos);
-    /*! @todo TODO evaluate with matrix also*/
-    evaluate(pos);
-
-    invariant();
-}
-
-
-/*
- * before: S E
- * after: S N E
- *
- * before: S n1 n2 ... n E
- * after: S N n1 n2 ... n E
- */
-void
-Vehicle::push_front(const Vehicle_node &node) {
-    invariant();
-
-    /* insert evaluates */
-    insert(1, node);
-
-    invariant();
-}
-
-/*
- * before: S E
- * after: S N E
- *
- * before: S n1 n2 ... n E
- * after: S n1 n2 ... n N E
- */
-void
-Vehicle::push_back(const Vehicle_node &node) {
-    invariant();
-
-    /* insert evaluates */
-    insert(m_path.size() - 1, node);
-
-    invariant();
-}
-
-void
-Vehicle::pop_back() {
-    invariant();
-    pgassert(m_path.size() > 2);
-
-    /* erase evaluates */
-    erase(m_path.size() - 2);
-
-    invariant();
-}
-
-void
-Vehicle::pop_front() {
-    invariant();
-    pgassert(m_path.size() > 2);
-
-    /* erase evaluates */
-    erase(1);
-
-    invariant();
-}
-
-
-
-void
-Vehicle::erase(POS at) {
-    invariant();
-
-    pgassert(m_path.size() > 2);
-    pgassert(at < m_path.size());
-    pgassert(!m_path[at].is_start());
-    pgassert(!m_path[at].is_end());
-
-    m_path.erase(m_path.begin() + at);
-    evaluate(at);
-
-    invariant();
-}
-
-void
-Vehicle::swap(POS i, POS j) {
-    invariant();
-    pgassert(m_path.size() > 3);
-    pgassert(!m_path[i].is_start());
-    pgassert(!m_path[i].is_end());
-    pgassert(!m_path[j].is_start());
-    pgassert(!m_path[j].is_end());
-
-    std::swap(m_path[i], m_path[j]);
-    i < j ? evaluate(i) : evaluate(j);
-
-    invariant();
-}
-
-
-void
-Vehicle::evaluate() {
-    invariant();
-
-    evaluate(0);
-
-    invariant();
-}
-
-bool
-Vehicle::empty() const {
-    invariant();
-    return m_path.size() <= 2;
-}
-
-void
-Vehicle::evaluate(POS from) {
-    invariant();
-    // preconditions
-    pgassert(from < m_path.size());
-
-
-    auto node = m_path.begin() + from;
-
-    while (node != m_path.end()) {
-        if (node == m_path.begin()) {
-            node->evaluate(m_capacity);
-        } else {
-            node->evaluate(*(node - 1), m_capacity, speed());
-        }
-
-        ++node;
-    }
-    invariant();
-}
-
-std::deque< Vehicle_node >
-Vehicle::path() const {
-    invariant();
-    return m_path;
-}
-
-
-std::pair<size_t, size_t>
-Vehicle::position_limits(const Vehicle_node node) const {
-    POS high = getPosHighLimit(node);
-    POS low = getPosLowLimit(node);
-    return std::make_pair(low, high);
-}
-
-
-/*
- * start searching from postition low = pos(E)
- *
- * S 1 2 3 4 5 6 7 ..... E
- * node -> E
- * node -> ...
- * node -> 7
- * node -> 6
- * node -> 5
- * node /-> 4
- *
- * return low_limit = 5
- *
- */
-size_t
-Vehicle::getPosLowLimit(const Vehicle_node &nodeI) const {
-    invariant();
-
-    POS low = 0;
-    POS high = m_path.size();
-    POS low_limit = high;
-
-    /* J == m_path[low_limit - 1] */
-    while (low_limit > low
-            && m_path[low_limit - 1].is_compatible_IJ(nodeI, speed())) {
-        --low_limit;
-    }
-
-    invariant();
-    return low_limit;
-}
-
-
-/*
- * start searching from postition low = pos(S)
- *
- * S 1 2 3 4 5 6 7 ..... E
- * S -> node
- * 1 -> node
- * 2 -> node
- * ...
- * 6 -> node
- * 7 /-> node
- *
- * returns high_limit = 7
- */
-size_t
-Vehicle::getPosHighLimit(const Vehicle_node &nodeJ) const {
-    invariant();
-
-    POS low = 0;
-    POS high = m_path.size();
-    POS high_limit = low;
-
-    /* I == m_path[high_limit] */
-    while (high_limit < high
-            && nodeJ.is_compatible_IJ(m_path[high_limit], speed())) {
-        ++high_limit;
-    }
-
-    invariant();
-    return high_limit;
-}
-
-bool
-Vehicle::is_ok() const {
-    pgassert((m_path.front().opens() <= m_path.front().closes())
-        && (m_path.back().opens() <= m_path.back().closes())
-        && (m_capacity > 0));
-    return (start_site().opens() <= start_site().closes())
-        && (end_site().opens() <= end_site().closes())
-        && (m_capacity > 0);
-}
-
-Vehicle::Vehicle(
-        size_t p_idx,
-        int64_t p_id,
-        const Vehicle_node &starting_site,
-        const Vehicle_node &ending_site,
-        double p_m_capacity,
-        double p_speed,
-        double p_factor) :
-    Identifier(p_idx, p_id),
-    m_capacity(p_m_capacity),
-    m_factor(p_factor),
-    m_speed(p_speed) {
-        ENTERING();
-        m_path.clear();
-        pgassert(starting_site.opens() <= starting_site.closes());
-        pgassert(ending_site.opens() <= ending_site.closes());
-        pgassert(capacity() > 0);
-        msg.log << "p_idx: " << p_idx << "\t idx(): " << idx() << "\n";
-        msg.log << "p_id: " << p_id << "\tid(): " << id() << "\n" ;
-        
-        m_path.push_back(starting_site);
-        m_path.push_back(ending_site);
-
-        evaluate(0);
-        msg.log << tau() << "\n";
-        invariant();
-        EXITING();
-    }
-
-Vehicle::Vehicle(const Vehicle &v) :
-    Identifier(v.idx(), v.id()),
-    PD_problem(),
-    m_path(v.m_path),
-    m_capacity(v.m_capacity),
-    m_factor(v.m_factor),
-    m_speed(v.m_speed) {
-#if 0
-        ENTERING();
-        msg.log << v.tau() << "\n";
-        msg.log << tau() << "\n";
-        EXITING();
-#endif
-}
-
-
-
-std::string
-Vehicle::tau() const {
-    pgassert(m_path.size() > 1);
-    std::ostringstream log;
-    log << "Truck " << id() << "(" << idx() << ")"
-        << " (";
-    for (const auto p_stop : m_path) {
-        if (!(p_stop == m_path.front()))
-            log << ", ";
-        log << p_stop.id();
-    }
-    log << ")" << " \t(cv, twv, wait_time, duration) = ("
-        << cvTot() << ", "
-        << twvTot() << ", "
-        << total_wait_time() << ", "
-        << duration() << ")";
-
-    return log.str();
-}
-
-double
-Vehicle::speed() const {
-    return m_speed/m_factor;
-}
-
-/****** FRIENDS *******/
-
-std::ostream&
-operator << (std::ostream &log, const Vehicle &v) {
-    v.invariant();
-    int i(0);
-    log << "\n\n****************** " << v.idx() << "th VEHICLE*************\n";
-    log << "id = " << v.id()
-        << "\tcapacity = " << v.m_capacity
-        << "\tfactor = " << v.m_factor << "\n"
-        << "\tspeed = " << v.m_speed << "\n"
-        << "\tnew speed = " << v.speed() << "\n";
-
-    for (const auto &path_stop : v.path()) {
-        log << "Path_stop" << ++i << "\n";
-        log << path_stop << "\n";
-    }
-    return log;
-}
-
-bool
-operator<(const Vehicle &lhs, const Vehicle &rhs) {
-    lhs.invariant();
-    rhs.invariant();
-
-    if (lhs.m_path.size() < rhs.m_path.size()) return true;
-
-    /* here because sizes are equal */
-
-    if (lhs.m_path.back().total_travel_time()
-            < lhs.m_path.back().total_travel_time()) return true;
-
-    return false;
-}
-
-}  //  namespace vrp
-}  //  namespace pgrouting
-
diff --git a/src/pickDeliver/test/book_from_query.result b/src/pickDeliver/test/book_from_query.result
deleted file mode 100644
index 6449137..0000000
--- a/src/pickDeliver/test/book_from_query.result
+++ /dev/null
@@ -1,186 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
-DROP TABLE IF EXISTS jet_stops;
-NOTICE:  table "jet_stops" does not exist, skipping
-DROP TABLE
-DROP TABLE IF EXISTS jet_flyers;
-NOTICE:  table "jet_flyers" does not exist, skipping
-DROP TABLE
-DROP TABLE IF EXISTS jet_orders;
-NOTICE:  table "jet_orders" does not exist, skipping
-DROP TABLE
-DROP TABLE IF EXISTS jet_airplane;
-NOTICE:  table "jet_airplane" does not exist, skipping
-DROP TABLE
-DROP TABLE IF EXISTS jet_trips;
-NOTICE:  table "jet_trips" does not exist, skipping
-DROP TABLE
-DROP TABLE IF EXISTS vrp_solution;
-NOTICE:  table "vrp_solution" does not exist, skipping
-DROP TABLE
-CREATE TABLE jet_stops (
-    id SERIAL,
-    iata_faa TEXT,
-    city TEXT, 
-    x integer,
-    y integer,
-    longitude double precision,
-    latitude double precision
-);
-CREATE TABLE
-INSERT INTO jet_stops (iata_faa, city, longitude, latitude) VALUES
-('BOS',  'Boston', -71.005180999999993, 42.364347000000002),
-('BGR',  'Bangor', -68.828138999999993, 44.807443999999997),
-('MIA',  'Miami',  -80.290555999999995, 25.79325),
-('TEB',  'Teterboro NJ', -74.060837000000006, 40.850102999999997),
-('MVY',  'Martha''s Vineyard', -70.615278000000004, 41.391666999999998),
-('ABE',  'Lehigh Valley', -75.440805999999995, 40.652082999999998),
-('BKW',  'Raleigh County Memorial', -81.124200000000002, 37.787300000000002),
-('BGE',  'Decatur County Industrial', -84.636927799999995, 30.971598100000001);
-INSERT 0 8
-UPDATE jet_stops SET
-x = ST_X(ST_Transform(ST_SetSRID(ST_point(longitude, latitude)::geometry,4326),2163)),
-y = ST_Y(ST_Transform(ST_SetSRID(ST_point(longitude, longitude)::geometry,4326),2163));
-UPDATE 8
-CREATE TABLE jet_flyers AS
-    SELECT
-    row_number() over() AS id,
-    s1.iata_faa  AS from_airport,
-    s2.iata_faa  AS to_airport,
-    (1 + mod(s1.id, 5))::integer AS num_passengers,
-    
-    mod(s1.id,7)*60 AS departureFromTime,
-    
-    (mod(s1.id,7) + 4) * 60 AS arrivalToTime
-    FROM
-    
-    (SELECT * FROM jet_stops WHERE id < 4) AS s1,
-    
-    (SELECT * FROM jet_stops WHERE id >= 4) AS s2
-    WHERE s1.id <> s2.id;
-SELECT 15
-CREATE TABLE jet_orders AS
-    SELECT
-    id,
-    num_passengers AS demand,
-    (SELECT x FROM jet_stops WHERE iata_faa = jet_flyers.from_airport) AS p_x,
-    (SELECT y FROM jet_stops WHERE iata_faa = jet_flyers.from_airport) AS p_y,
-    
-    departureFromTime AS p_open,
-    arrivalToTime AS p_close,
-    (SELECT x FROM jet_stops WHERE iata_faa = jet_flyers.to_airport) AS d_x,
-    (SELECT y FROM jet_stops WHERE iata_faa = jet_flyers.to_airport) AS d_y,
-    departureFromTime AS d_open,
-    arrivalToTime AS d_close,
-    from_airport, to_airport
-    FROM jet_flyers;
-SELECT 15
-CREATE TABLE jet_airplane AS
-SELECT
-    1 AS id,
-    
-    5 AS capacity,
-    
-    10000 AS speed, 
-    20 as "number",
-    x AS start_x, y AS start_y,
-    0 AS start_open,
-    300 AS start_close,
-    0 AS start_service
-    FROM jet_stops
-    WHERE iata_faa = 'TEB';
-SELECT 1
-CREATE TABLE vrp_solution AS
-SELECT * FROM _pgr_pickDeliverEuclidean(
-    $$ SELECT * FROM jet_orders $$,
-    $$ SELECT * FROM jet_airplane $$
-);
-SELECT 47
-CREATE TABLE jet_trips AS
-WITH the_results AS (
-SELECT vrp_solution.*,  from_airport, to_airport,
-CASE WHEN stop_type = 1 THEN ST_POINT(p_x, p_y) 
-        WHEN stop_type = 2 THEN ST_POINT(d_x, d_y)
-        WHEN stop_type = 0 THEN  ST_POINT(start_x, start_y)
-    END AS geom
-FROM vrp_solution LEFT JOIN  jet_orders on (order_id = jet_orders.id)
-LEFT JOIN jet_airplane on (vehicle_id = jet_airplane.id)
-)
-SELECT *, ST_SetSRID(ST_MakeLine(geom, lead(geom) over(order by seq)),2163) AS lines from the_results;
-SELECT 47
-SELECT * FROM jet_orders;
- id | demand |   p_x   |    p_y    | p_open | p_close |   d_x   |    d_y    | d_open | d_close | from_airport | to_airport 
-----+--------+---------+-----------+--------+---------+---------+-----------+--------+---------+--------------+------------
-  1 |      2 | 2320738 | -10738754 |     60 |     300 | 2138410 | -10946747 |     60 |     300 | BOS          | TEB
-  2 |      2 | 2320738 | -10738754 |     60 |     300 | 2387491 | -10710759 |     60 |     300 | BOS          | MVY
-  3 |      2 | 2320738 | -10738754 |     60 |     300 | 2035311 | -11034361 |     60 |     300 | BOS          | ABE
-  4 |      2 | 2320738 | -10738754 |     60 |     300 | 1644577 | -11358423 |     60 |     300 | BOS          | BKW
-  5 |      2 | 2320738 | -10738754 |     60 |     300 | 1466239 | -11533361 |     60 |     300 | BOS          | BGE
-  6 |      3 | 2383186 | -10578021 |    120 |     360 | 2138410 | -10946747 |    120 |     360 | BGR          | TEB
-  7 |      3 | 2383186 | -10578021 |    120 |     360 | 2387491 | -10710759 |    120 |     360 | BGR          | MVY
-  8 |      3 | 2383186 | -10578021 |    120 |     360 | 2035311 | -11034361 |    120 |     360 | BGR          | ABE
-  9 |      3 | 2383186 | -10578021 |    120 |     360 | 1644577 | -11358423 |    120 |     360 | BGR          | BKW
- 10 |      3 | 2383186 | -10578021 |    120 |     360 | 1466239 | -11533361 |    120 |     360 | BGR          | BGE
- 11 |      4 | 1981145 | -11314287 |    180 |     420 | 2138410 | -10946747 |    180 |     420 | MIA          | TEB
- 12 |      4 | 1981145 | -11314287 |    180 |     420 | 2387491 | -10710759 |    180 |     420 | MIA          | MVY
- 13 |      4 | 1981145 | -11314287 |    180 |     420 | 2035311 | -11034361 |    180 |     420 | MIA          | ABE
- 14 |      4 | 1981145 | -11314287 |    180 |     420 | 1644577 | -11358423 |    180 |     420 | MIA          | BKW
- 15 |      4 | 1981145 | -11314287 |    180 |     420 | 1466239 | -11533361 |    180 |     420 | MIA          | BGE
-(15 rows)
-
-SELECT * FROM jet_trips;
- seq | vehicle_number | vehicle_id | vehicle_seq | order_id | stop_type | cargo |   travel_time    |   arrival_time   |    wait_time     | service_time |  departure_time  | from_airport | to_airport |                    geom                    |                                           lines                                            
------+----------------+------------+-------------+----------+-----------+-------+------------------+------------------+------------------+--------------+------------------+--------------+------------+--------------------------------------------+--------------------------------------------------------------------------------------------
-   1 |              1 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |                0 |            0 |                0 |              |            |                                            | 
-   2 |              1 |          1 |           2 |        7 |         2 |     3 | 44.2576720187585 | 44.2576720187585 | 75.7423279812415 |            0 |              120 | BGR          | MVY        | 01010000000000008011374241000000E0DC6D64C1 | 
-   3 |              1 |          1 |           3 |        7 |         3 |     0 | 13.2807792199855 | 133.280779219986 |                0 |            0 | 133.280779219986 | BGR          | MVY        |                                            | 
-   4 |              1 |          1 |           4 |        8 |         2 |     3 | 13.2807792199855 | 146.561558439971 |                0 |            0 | 146.561558439971 | BGR          | ABE        | 0101000000000000006F0E3F4100000020DF0B65C1 | 01020000207308000002000000000000006F0E3F4100000020DF0B65C100000000955040410000006017E164C1
-   5 |              1 |          1 |           5 |        1 |         2 |     5 | 17.2437959837734 | 163.805354423745 |                0 |            0 | 163.805354423745 | BOS          | TEB        | 010100000000000000955040410000006017E164C1 | 
-   6 |              1 |          1 |           6 |       12 |         3 |     1 | 7.23856548910072 | 171.043919912845 | 8.95608008715473 |            0 |              180 | MIA          | MVY        |                                            | 
-   7 |              1 |          1 |           7 |       12 |         2 |     5 | 72.7573445433518 | 252.757344543352 |                0 |            0 | 252.757344543352 | MIA          | MVY        | 01010000000000008011374241000000E0DC6D64C1 | 
-   8 |              1 |          1 |           8 |        8 |         3 |     2 | 28.5118433343058 | 281.269187877658 |                0 |            0 | 281.269187877658 | BGR          | ABE        |                                            | 
-   9 |              1 |          1 |           9 |        1 |         3 |     0 | 13.5298251271035 | 294.799013004761 |                0 |            0 | 294.799013004761 | BOS          | TEB        |                                            | 
-  10 |              1 |          1 |          10 |       -1 |         6 |     0 |                0 | 294.799013004761 |                0 |            0 | 294.799013004761 |              |            |                                            | 
-  11 |              2 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |                0 |            0 |                0 |              |            |                                            | 
-  12 |              2 |          1 |           2 |        4 |         2 |     2 | 27.6594626905513 | 27.6594626905513 | 32.3405373094487 |            0 |               60 | BOS          | BKW        | 01010000000000000021183941000000E01AAA65C1 | 010200002073080000020000000000000021183941000000E01AAA65C10000000021183941000000E01AAA65C1
-  13 |              2 |          1 |           3 |        9 |         2 |     5 | 17.2437959837734 | 77.2437959837734 | 42.7562040162266 |            0 |              120 | BGR          | BKW        | 01010000000000000021183941000000E01AAA65C1 | 
-  14 |              2 |          1 |           4 |        9 |         3 |     2 | 107.450943992363 | 227.450943992363 |                0 |            0 | 227.450943992363 | BGR          | BKW        |                                            | 
-  15 |              2 |          1 |           5 |        4 |         3 |     0 |                0 | 227.450943992363 |                0 |            0 | 227.450943992363 | BOS          | BKW        |                                            | 
-  16 |              2 |          1 |           6 |       -1 |         6 |     0 | 64.2921582205015 | 291.743102212865 |                0 |            0 | 291.743102212865 |              |            |                                            | 
-  17 |              3 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |                0 |            0 |                0 |              |            |                                            | 
-  18 |              3 |          1 |           2 |        3 |         2 |     2 | 27.6594626905513 | 27.6594626905513 | 32.3405373094487 |            0 |               60 | BOS          | ABE        | 0101000000000000006F0E3F4100000020DF0B65C1 | 01020000207308000002000000000000006F0E3F4100000020DF0B65C1000000007F5F36410000002086FF65C1
-  19 |              3 |          1 |           3 |        5 |         2 |     4 |                0 |               60 |                0 |            0 |               60 | BOS          | BGE        | 0101000000000000007F5F36410000002086FF65C1 | 
-  20 |              3 |          1 |           4 |        3 |         3 |     2 | 41.0916135942603 |  101.09161359426 |                0 |            0 |  101.09161359426 | BOS          | ABE        |                                            | 
-  21 |              3 |          1 |           5 |        5 |         3 |     0 |  75.686454612698 | 176.778068206958 |                0 |            0 | 176.778068206958 | BOS          | BGE        |                                            | 
-  22 |              3 |          1 |           6 |       11 |         2 |     4 | 55.9572699755805 | 232.735338182539 |                0 |            0 | 232.735338182539 | MIA          | TEB        | 010100000000000000955040410000006017E164C1 | 
-  23 |              3 |          1 |           7 |       11 |         3 |     0 | 39.9772350000597 | 272.712573182599 |                0 |            0 | 272.712573182599 | MIA          | TEB        |                                            | 
-  24 |              3 |          1 |           8 |       -1 |         6 |     0 |                0 | 272.712573182599 |                0 |            0 | 272.712573182599 |              |            |                                            | 
-  25 |              4 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |                0 |            0 |                0 |              |            |                                            | 
-  26 |              4 |          1 |           2 |       13 |         2 |     4 | 39.9772350000597 | 39.9772350000597 |  140.02276499994 |            0 |              180 | MIA          | ABE        | 0101000000000000006F0E3F4100000020DF0B65C1 | 
-  27 |              4 |          1 |           3 |       13 |         3 |     0 | 28.5118433343058 | 208.511843334306 |                0 |            0 | 208.511843334306 | MIA          | ABE        |                                            | 
-  28 |              4 |          1 |           4 |       -1 |         6 |     0 | 13.5298251271035 | 222.041668461409 |                0 |            0 | 222.041668461409 |              |            |                                            | 
-  29 |              5 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |                0 |            0 |                0 |              |            |                                            | 
-  30 |              5 |          1 |           2 |       14 |         2 |     4 | 39.9772350000597 | 39.9772350000597 |  140.02276499994 |            0 |              180 | MIA          | BKW        | 01010000000000000021183941000000E01AAA65C1 | 
-  31 |              5 |          1 |           3 |       14 |         3 |     0 | 33.9449561967607 | 213.944956196761 |                0 |            0 | 213.944956196761 | MIA          | BKW        |                                            | 
-  32 |              5 |          1 |           4 |       -1 |         6 |     0 | 64.2921582205015 | 278.237114417262 |                0 |            0 | 278.237114417262 |              |            |                                            | 
-  33 |              6 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |                0 |            0 |                0 |              |            |                                            | 
-  34 |              6 |          1 |           2 |        6 |         2 |     3 | 44.2576720187585 | 44.2576720187585 | 75.7423279812415 |            0 |              120 | BGR          | TEB        | 010100000000000000955040410000006017E164C1 | 
-  35 |              6 |          1 |           3 |        6 |         3 |     0 | 44.2576720187585 | 164.257672018759 |                0 |            0 | 164.257672018759 | BGR          | TEB        |                                            | 
-  36 |              6 |          1 |           4 |       -1 |         6 |     0 |                0 | 164.257672018759 |                0 |            0 | 164.257672018759 |              |            |                                            | 
-  37 |              7 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |                0 |            0 |                0 |              |            |                                            | 
-  38 |              7 |          1 |           2 |        2 |         2 |     2 | 27.6594626905513 | 27.6594626905513 | 32.3405373094487 |            0 |               60 | BOS          | MVY        | 01010000000000008011374241000000E0DC6D64C1 | 
-  39 |              7 |          1 |           3 |        2 |         3 |     0 | 7.23856548910072 | 67.2385654891007 |                0 |            0 | 67.2385654891007 | BOS          | MVY        |                                            | 
-  40 |              7 |          1 |           4 |       -1 |         6 |     0 | 34.3120504640862 | 101.550615953187 |                0 |            0 | 101.550615953187 |              |            |                                            | 
-  41 |              8 |         -1 |           1 |       -1 |         1 |     0 |                0 |                0 |                0 |            0 |                0 |              |            |                                            | 
-  42 |              8 |         -1 |           2 |       10 |         2 |     3 | 44.2576720187585 | 44.2576720187585 | 75.7423279812415 |            0 |              120 | BGR          | BGE        | 0101000000000000007F5F36410000002086FF65C1 | 01020000207308000002000000000000007F5F36410000002086FF65C1000000007F5F36410000002086FF65C1
-  43 |              8 |         -1 |           3 |       15 |         2 |     7 | 83.8882940842761 | 203.888294084276 |                0 |            0 | 203.888294084276 | MIA          | BGE        | 0101000000000000007F5F36410000002086FF65C1 | 
-  44 |              8 |         -1 |           4 |       15 |         3 |     3 | 55.9572699755805 | 259.845564059857 |                0 |            0 | 259.845564059857 | MIA          | BGE        |                                            | 
-  45 |              8 |         -1 |           5 |       10 |         3 |     0 |                0 | 259.845564059857 |                0 |            0 | 259.845564059857 | BGR          | BGE        |                                            | 
-  46 |              8 |         -1 |           6 |       -1 |         6 |     0 | 89.2149000020176 | 349.060464061874 |                0 |            0 | 349.060464061874 |              |            |                                            | 
-  47 |             -2 |          0 |           0 |       -1 |        -1 |    -1 | 1318.39581333738 |               -1 | 656.006409975332 |            0 | 1974.40222331272 |              |            |                                            | 
-(47 rows)
-
-ROLLBACK;
-ROLLBACK
diff --git a/src/pickDeliver/test/book_from_query.test.sql b/src/pickDeliver/test/book_from_query.test.sql
deleted file mode 100644
index a3c648e..0000000
--- a/src/pickDeliver/test/book_from_query.test.sql
+++ /dev/null
@@ -1,115 +0,0 @@
-DROP TABLE IF EXISTS jet_stops;
-DROP TABLE IF EXISTS jet_flyers;
-DROP TABLE IF EXISTS jet_orders;
-DROP TABLE IF EXISTS jet_airplane;
-DROP TABLE IF EXISTS jet_trips;
-DROP TABLE IF EXISTS vrp_solution;
-
-CREATE TABLE jet_stops (
-    id SERIAL,
-    iata_faa TEXT,
-    city TEXT, 
-    x integer,
-    y integer,
-    longitude double precision,
-    latitude double precision
-);
-
-
-INSERT INTO jet_stops (iata_faa, city, longitude, latitude) VALUES
-('BOS',  'Boston', -71.005180999999993, 42.364347000000002),
-('BGR',  'Bangor', -68.828138999999993, 44.807443999999997),
-('MIA',  'Miami',  -80.290555999999995, 25.79325),
-('TEB',  'Teterboro NJ', -74.060837000000006, 40.850102999999997),
-('MVY',  'Martha''s Vineyard', -70.615278000000004, 41.391666999999998),
-('ABE',  'Lehigh Valley', -75.440805999999995, 40.652082999999998),
-('BKW',  'Raleigh County Memorial', -81.124200000000002, 37.787300000000002),
-('BGE',  'Decatur County Industrial', -84.636927799999995, 30.971598100000001);
-
-
-UPDATE jet_stops SET
-x = ST_X(ST_Transform(ST_SetSRID(ST_point(longitude, latitude)::geometry,4326),2163)),
-y = ST_Y(ST_Transform(ST_SetSRID(ST_point(longitude, longitude)::geometry,4326),2163));
-
-
-CREATE TABLE jet_flyers AS
-    SELECT
-    row_number() over() AS id,
-    s1.iata_faa  AS from_airport,
-    s2.iata_faa  AS to_airport,
-    (1 + mod(s1.id, 5))::integer AS num_passengers,
-    -- the passengers don't want to depart before this time
-    mod(s1.id,7)*60 AS departureFromTime,
-    -- the passengers don't want to arrive after this time
-    (mod(s1.id,7) + 4) * 60 AS arrivalToTime
-    FROM
-    -- people departing from BOS BGR MIA TEB
-    (SELECT * FROM jet_stops WHERE id < 4) AS s1,
-    -- people want to go to MVY ABE BKW BGE
-    (SELECT * FROM jet_stops WHERE id >= 4) AS s2
-    WHERE s1.id <> s2.id;
-
-
--- Listing Create jet_orders table to be used in pgr_pickDeliverEuclidean
-CREATE TABLE jet_orders AS
-    SELECT
-    id,
-    num_passengers AS demand,
-    (SELECT x FROM jet_stops WHERE iata_faa = jet_flyers.from_airport) AS p_x,
-    (SELECT y FROM jet_stops WHERE iata_faa = jet_flyers.from_airport) AS p_y,
-    
-    departureFromTime AS p_open,
-    arrivalToTime AS p_close,
-
-    (SELECT x FROM jet_stops WHERE iata_faa = jet_flyers.to_airport) AS d_x,
-    (SELECT y FROM jet_stops WHERE iata_faa = jet_flyers.to_airport) AS d_y,
-
-    departureFromTime AS d_open,
-    arrivalToTime AS d_close,
-
-    from_airport, to_airport
-
-    FROM jet_flyers;
-
- 
---
-CREATE TABLE jet_airplane AS
-SELECT
-    1 AS id,
-    -- small plane
-    5 AS capacity,
-    -- not so fast
-    10000 AS speed, -- mts/min
-    20 as "number",
-    x AS start_x, y AS start_y,
-    0 AS start_open,
-    300 AS start_close,
-    0 AS start_service
-    FROM jet_stops
-    WHERE iata_faa = 'TEB';
-
-CREATE TABLE vrp_solution AS
-SELECT * FROM _pgr_pickDeliverEuclidean(
-    $$ SELECT * FROM jet_orders $$,
-    $$ SELECT * FROM jet_airplane $$
-);
-
-
-CREATE TABLE jet_trips AS
-WITH the_results AS (
-SELECT vrp_solution.*,  from_airport, to_airport,
-CASE WHEN stop_type = 1 THEN ST_POINT(p_x, p_y) 
-        WHEN stop_type = 2 THEN ST_POINT(d_x, d_y)
-        WHEN stop_type = 0 THEN  ST_POINT(start_x, start_y)
-    END AS geom
-FROM vrp_solution LEFT JOIN  jet_orders on (order_id = jet_orders.id)
-LEFT JOIN jet_airplane on (vehicle_id = jet_airplane.id)
-)
-SELECT *, ST_SetSRID(ST_MakeLine(geom, lead(geom) over(order by seq)),2163) AS lines from the_results;
-
-
-SELECT * FROM jet_orders;
-
-SELECT * FROM jet_trips;
-
-
diff --git a/src/pickDeliver/test/book_vrp.test.sql b/src/pickDeliver/test/book_vrp.test.sql
deleted file mode 100644
index 4c09696..0000000
--- a/src/pickDeliver/test/book_vrp.test.sql
+++ /dev/null
@@ -1,664 +0,0 @@
-DROP TABLE IF EXISTS jet_customers;
-
-
-/*
-CREATE TABLE trucks(id integer primary key, truck_name varchar(75), capacity integer );
-INSERT INTO trucks(id, truck_name, capacity)
-VALUES (1, 'Hardy Truck', 800),
-    (2, 'Laurel Truck', 400);
-    
-CREATE TABLE restaurants_99(id integer primary key,  loc_name varchar(150), lon float, lat float);
-INSERT INTO restaurants_99(id, loc_name, lon, lat)
-VALUES (1, 'Bristol, CT', -72.8924, 41.66892),
-     (2, 'Cromwell, CT', -72.67615, 41.60165),
-     (3, 'Danbury, CT', -73.41376, 41.41008),
-     (4, 'Enfield, CT', -72.57634, 41.98837),
-     (5, 'Glastonbury, CT', -72.61592, 41.72646),
-     (6, 'Groton, CT', -72.06683, 41.36298),
-     (7, 'Dayville, CT', -71.8824882, 41.8425568),
-     (8, 'Norwich, CT', -72.10508, 41.51431),
-     (9, 'Stratford, CT',  -73.12182, 41.19878),
-     (10, 'Torrington, CT',  -73.12131, 41.79984),
-     (11, 'Vernon, CT', -72.49305, 41.82647),
-     (12, 'Wallingford, CT', -72.8092, 41.4835);
-*/   
-     
-CREATE TABLE jet_customers (
-    airport character varying,
-    id integer,
-    x double precision,
-    y double precision,
-    pindex integer,
-    dindex integer,
-    demand integer,
-    opentime double precision,
-    closetime double precision,
-    servicetime double precision
-);
-
-
-/*
---
--- TOC entry 290 (class 1259 OID 6616043)
--- Name: vrp1_cost; Type: TABLE; Schema: public; Owner: postgres
---
-
-CREATE TABLE vrp1_cost (
-    src_id integer,
-    dest_id integer,
-    cost double precision,
-    distance double precision,
-    traveltime double precision
-);
-
-
-
---
--- TOC entry 291 (class 1259 OID 6616046)
--- Name: vrp1_gdist; Type: TABLE; Schema: public; Owner: postgres
---
-
-CREATE TABLE vrp1_gdist (
-    src_id integer,
-    dest_id integer,
-    cost double precision,
-    distance double precision,
-    traveltime double precision
-);
-
-
---
--- TOC entry 285 (class 1259 OID 6607823)
--- Name: vrp1_orders; Type: TABLE; Schema: public; Owner: postgres
---
-
-CREATE TABLE vrp1_orders (
-    id integer,
-    x numeric,
-    y numeric,
-    order_unit integer,
-    open_time integer,
-    close_time integer,
-    service_time integer
-);
-
-
-
---
--- TOC entry 289 (class 1259 OID 6616034)
--- Name: vrp1_points; Type: TABLE; Schema: public; Owner: postgres
---
-
-CREATE TABLE vrp1_points (
-    id integer,
-    pid integer,
-    geom geometry(Point,4326),
-    edge_id integer,
-    fraction double precision,
-    closest_node integer
-);
-
-
---
--- TOC entry 297 (class 1259 OID 8777648)
--- Name: vrpdtw_beer; Type: TABLE; Schema: public; Owner: postgres
---
-
-CREATE TABLE vrpdtw_beer (
-    rid integer,
-    id integer,
-    x double precision,
-    y double precision,
-    opentime integer,
-    closetime integer,
-    servicetime integer,
-    demand integer,
-    pindex integer,
-    dindex integer
-);
-*/
-
---
-
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 1, 2320738.4688434978, 126348.38967116659, 0, 2, 4, 3448, 2853448, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 3, 2320738.4688434978, 126348.38967116659, 0, 4, 4, 3448, 2853448, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 5, 2320738.4688434978, 126348.38967116659, 0, 6, 4, 3448, 2853448, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 7, 2320738.4688434978, 126348.38967116659, 0, 8, 4, 3448, 2853448, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 9, 2320738.4688434978, 126348.38967116659, 0, 10, 4, 3448, 2853448, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 11, 2320738.4688434978, 126348.38967116659, 0, 12, 4, 3448, 2853448, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 13, 2383186.1525343237, 448251.25888828852, 0, 14, 4, 3463, 2853463, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 15, 2383186.1525343237, 448251.25888828852, 0, 16, 4, 3463, 2853463, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 17, 2383186.1525343237, 448251.25888828852, 0, 18, 4, 3463, 2853463, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 19, 2383186.1525343237, 448251.25888828852, 0, 20, 4, 3463, 2853463, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 21, 2383186.1525343237, 448251.25888828852, 0, 22, 4, 3463, 2853463, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 23, 2383186.1525343237, 448251.25888828852, 0, 24, 4, 3463, 2853463, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 25, 1981144.5525029898, -1903041.2384292425, 0, 26, 2, 3576, 2853576, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 27, 1981144.5525029898, -1903041.2384292425, 0, 28, 2, 3576, 2853576, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 29, 1981144.5525029898, -1903041.2384292425, 0, 30, 2, 3576, 2853576, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 31, 1981144.5525029898, -1903041.2384292425, 0, 32, 2, 3576, 2853576, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 33, 1981144.5525029898, -1903041.2384292425, 0, 34, 2, 3576, 2853576, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 35, 1981144.5525029898, -1903041.2384292425, 0, 36, 2, 3576, 2853576, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 37, 2138409.5568088419, -119451.50568778868, 0, 38, 5, 3624, 2853624, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 39, 2138409.5568088419, -119451.50568778868, 0, 40, 5, 3624, 2853624, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 41, 2138409.5568088419, -119451.50568778868, 0, 42, 5, 3624, 2853624, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 43, 2138409.5568088419, -119451.50568778868, 0, 44, 5, 3624, 2853624, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 45, 2138409.5568088419, -119451.50568778868, 0, 46, 5, 3624, 2853624, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 47, 2138409.5568088419, -119451.50568778868, 0, 48, 5, 3624, 2853624, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 49, 2387491.1007072991, 34459.351848672632, 0, 50, 1, 4265, 2854265, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 51, 2387491.1007072991, 34459.351848672632, 0, 52, 1, 4265, 2854265, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 53, 2387491.1007072991, 34459.351848672632, 0, 54, 1, 4265, 2854265, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 55, 2387491.1007072991, 34459.351848672632, 0, 56, 1, 4265, 2854265, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 57, 2387491.1007072991, 34459.351848672632, 0, 58, 1, 4265, 2854265, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 59, 2387491.1007072991, 34459.351848672632, 0, 60, 1, 4265, 2854265, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 61, 2035310.7411768832, -176076.78362264115, 0, 62, 1, 4355, 2854355, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 63, 2035310.7411768832, -176076.78362264115, 0, 64, 1, 4355, 2854355, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 65, 2035310.7411768832, -176076.78362264115, 0, 66, 1, 4355, 2854355, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 67, 2035310.7411768832, -176076.78362264115, 0, 68, 1, 4355, 2854355, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 69, 2035310.7411768832, -176076.78362264115, 0, 70, 1, 4355, 2854355, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 71, 2035310.7411768832, -176076.78362264115, 0, 72, 1, 4355, 2854355, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 2, 2320738.4688434978, 126348.38967116659, 1, 0, -4, 3448, 6903448, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 4, 2383186.1525343237, 448251.25888828852, 3, 0, -4, 3448, 6903448, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 6, 1981144.5525029898, -1903041.2384292425, 5, 0, -4, 3448, 6903448, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 8, 2138409.5568088419, -119451.50568778868, 7, 0, -4, 3448, 6903448, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 10, 2387491.1007072991, 34459.351848672632, 9, 0, -4, 3448, 6903448, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 12, 2035310.7411768832, -176076.78362264115, 11, 0, -4, 3448, 6903448, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 14, 2320738.4688434978, 126348.38967116659, 13, 0, -4, 3463, 6903463, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 16, 2383186.1525343237, 448251.25888828852, 15, 0, -4, 3463, 6903463, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 18, 1981144.5525029898, -1903041.2384292425, 17, 0, -4, 3463, 6903463, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 20, 2138409.5568088419, -119451.50568778868, 19, 0, -4, 3463, 6903463, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 22, 2387491.1007072991, 34459.351848672632, 21, 0, -4, 3463, 6903463, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 24, 2035310.7411768832, -176076.78362264115, 23, 0, -4, 3463, 6903463, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 26, 2320738.4688434978, 126348.38967116659, 25, 0, -2, 3576, 6903576, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 28, 2383186.1525343237, 448251.25888828852, 27, 0, -2, 3576, 6903576, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 30, 1981144.5525029898, -1903041.2384292425, 29, 0, -2, 3576, 6903576, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 32, 2138409.5568088419, -119451.50568778868, 31, 0, -2, 3576, 6903576, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 34, 2387491.1007072991, 34459.351848672632, 33, 0, -2, 3576, 6903576, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 36, 2035310.7411768832, -176076.78362264115, 35, 0, -2, 3576, 6903576, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 38, 2320738.4688434978, 126348.38967116659, 37, 0, -5, 3624, 6903624, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 40, 2383186.1525343237, 448251.25888828852, 39, 0, -5, 3624, 6903624, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 42, 1981144.5525029898, -1903041.2384292425, 41, 0, -5, 3624, 6903624, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 44, 2138409.5568088419, -119451.50568778868, 43, 0, -5, 3624, 6903624, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 46, 2387491.1007072991, 34459.351848672632, 45, 0, -5, 3624, 6903624, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 48, 2035310.7411768832, -176076.78362264115, 47, 0, -5, 3624, 6903624, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 50, 2320738.4688434978, 126348.38967116659, 49, 0, -1, 4265, 6904265, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 52, 2383186.1525343237, 448251.25888828852, 51, 0, -1, 4265, 6904265, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 54, 1981144.5525029898, -1903041.2384292425, 53, 0, -1, 4265, 6904265, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 56, 2138409.5568088419, -119451.50568778868, 55, 0, -1, 4265, 6904265, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 58, 2387491.1007072991, 34459.351848672632, 57, 0, -1, 4265, 6904265, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 60, 2035310.7411768832, -176076.78362264115, 59, 0, -1, 4265, 6904265, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 62, 2320738.4688434978, 126348.38967116659, 61, 0, -1, 4355, 6904355, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 64, 2383186.1525343237, 448251.25888828852, 63, 0, -1, 4355, 6904355, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 66, 1981144.5525029898, -1903041.2384292425, 65, 0, -1, 4355, 6904355, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 68, 2138409.5568088419, -119451.50568778868, 67, 0, -1, 4355, 6904355, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 70, 2387491.1007072991, 34459.351848672632, 69, 0, -1, 4355, 6904355, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 72, 2035310.7411768832, -176076.78362264115, 71, 0, -1, 4355, 6904355, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 0, 2138409.5568088419, -119451.50568778868, 0, 0, 0, 0, 7200000, 0);
-
-/*
---
--- TOC entry 4292 (class 0 OID 6616043)
--- Dependencies: 290
--- Data for Name: vrp1_cost; Type: TABLE DATA; Schema: public; Owner: postgres
---
-
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (12, 13, 2953.093354567417, 60557.741467469998, 49.218222576123615);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (1, 13, 2951.4358855784913, 46704.633074669997, 49.190598092974852);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (5, 13, 1933.2635307127596, 29674.281907879998, 32.22105884521266);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (6, 13, 4891.243355445933, 78590.388493249993, 81.520722590765544);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (7, 13, 4564.0248344551255, 55146.744125789999, 76.067080574252088);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (4, 13, 358.9916907880604, 4717.2985756400003, 5.983194846467673);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (8, 13, 5126.2324354788034, 62516.944979489999, 85.437207257980063);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (3, 13, 6000.6726547073304, 97970.007298349999, 100.01121091178884);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (9, 13, 4755.4348034907207, 100603.89591172, 79.257246724845345);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (10, 13, 4138.1137957014362, 53942.09578946, 68.968563261690605);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (2, 13, 2224.3765052979202, 44388.04507498, 37.072941754965335);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (11, 13, 1469.4570414749417, 17611.434113070001, 24.490950691249029);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (7, 12, 6552.1443518080496, 86875.647316550007, 109.20240586346749);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (6, 12, 3675.7683635329909, 63485.069269129999, 61.262806058883179);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (1, 12, 1826.0827112688785, 21731.213745190002, 30.434711854481307);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (11, 12, 2681.3122972236029, 46309.024619509997, 44.688538287060048);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (2, 12, 1020.3947307304589, 17188.5257222, 17.006578845507651);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (10, 12, 2827.6100244902282, 43710.459317699999, 47.126833741503802);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (3, 12, 3888.0148463653441, 51173.467957710003, 64.800247439422407);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (9, 12, 2302.9311138070507, 41043.449335719997, 38.382185230117514);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (8, 12, 4463.5497447224634, 58891.64477087, 74.39249574537439);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (4, 12, 2647.2156693505872, 59326.863049970001, 44.120261155843117);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (13, 12, 2983.3734066886564, 60557.741467469998, 49.722890111477604);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (5, 12, 1517.9735472205105, 31428.651624779999, 25.29955912034184);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (1, 11, 2745.3112518799626, 37544.1375137, 45.755187531332709);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (9, 11, 4471.1319444284782, 87264.291763329995, 74.518865740474638);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (10, 11, 4229.3311896072573, 52287.419420220001, 70.488853160120954);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (6, 11, 4506.8776151690954, 62551.773221880001, 75.11462691948492);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (3, 11, 5716.3697956450824, 89593.452941569994, 95.272829927418044);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (5, 11, 1358.6096137713382, 15091.14100876, 22.643493562855635);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (4, 11, 1654.544693329585, 19264.633366329999, 27.575744888826417);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (12, 11, 2668.7904955051708, 46309.024619509997, 44.479841591752844);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (2, 11, 1940.0736462356747, 29252.344344699999, 32.334560770594578);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (13, 11, 1469.4570414749414, 17611.434113070001, 24.490950691249022);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (7, 11, 4064.8414892363171, 50747.73846031, 67.74735815393862);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (8, 11, 3895.6963212041123, 47391.047207520001, 64.928272020068533);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (5, 10, 3368.9527734188123, 42809.778697560003, 56.149212890313535);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (7, 10, 8182.3826173823836, 103032.57156053001, 136.37304362303973);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (11, 10, 4258.7560110340182, 52287.419420220001, 70.979266850566972);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (2, 10, 2839.6114198410569, 43099.30820806, 47.326856997350951);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (1, 10, 1802.3572076471451, 23960.724915679999, 30.039286794119086);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (3, 10, 3599.4301883137537, 49681.572728439998, 59.990503138562559);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (9, 10, 4341.7812292867338, 66755.884535439996, 72.363020488112227);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (4, 10, 3856.5004779654537, 49838.427136099999, 64.275007966090897);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (8, 10, 6294.2596511785378, 90390.880059980002, 104.90432751964229);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (6, 10, 5506.4782699890657, 100431.42119920001, 91.77463783315109);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (12, 10, 2855.7053715208308, 43710.459317699999, 47.595089525347177);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (13, 10, 4192.6582153035215, 53942.09578946, 69.877636921725355);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (10, 9, 4325.4261283707883, 66755.884535439996, 72.090435472846465);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (5, 9, 3398.8938935332781, 72255.826813129999, 56.648231558887964);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (2, 9, 2901.3150770432248, 58231.554459619998, 48.35525128405375);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (4, 9, 4528.1360156633564, 98787.207065139999, 75.46893359438927);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (1, 9, 3788.1003008742573, 55624.35354348, 63.135005014570957);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (11, 9, 4562.232643536373, 87264.291763329995, 76.037210725606215);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (8, 9, 4821.657825336647, 92014.350547320006, 80.360963755610783);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (7, 9, 8117.448634400117, 125749.52752643, 135.29081057333528);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (13, 9, 4864.293753001426, 100603.89591172, 81.071562550023771);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (6, 9, 4033.8764441471735, 90244.940354680002, 67.231274069119564);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (12, 9, 2328.9720943505417, 41043.449335719997, 38.81620157250903);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (3, 9, 2403.8510779993576, 33888.802388440003, 40.064184633322625);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (3, 8, 6769.2775240040783, 109943.3259573, 112.82129206673464);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (1, 8, 5019.7492752187654, 67853.964925620006, 83.662487920312756);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (7, 8, 3295.7908090634696, 40898.252999240001, 54.929846817724496);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (2, 8, 3571.0503376979805, 48617.072219770002, 59.517505628299674);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (9, 8, 4729.9553726845033, 92014.350547320006, 78.832589544741722);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (13, 8, 5123.9825769607578, 62516.944979489999, 85.399709616012629);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (6, 8, 1419.3370493081236, 17108.384354760001, 23.655617488468728);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (12, 8, 4462.5946410243814, 58891.64477087, 74.37657735040635);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (5, 8, 3906.5702317981809, 48659.42172359, 65.109503863303019);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (4, 8, 5406.1709302501031, 65640.18822928, 90.102848837501725);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (10, 8, 6449.5678543462845, 90390.880059980002, 107.49279757243808);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (11, 8, 3903.2468943918611, 47391.047207520001, 65.054114906531012);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (12, 7, 6541.7293294122628, 86875.647316550007, 109.02882215687104);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (3, 7, 9589.308629552168, 136345.04018709, 159.82181049253614);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (10, 7, 8189.9389451185689, 103032.57156053001, 136.49898241864281);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (8, 7, 3295.7035800954918, 40898.252999240001, 54.92839300159153);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (11, 7, 4082.2196582153956, 50747.73846031, 68.036994303589921);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (5, 7, 5106.1634678476485, 62318.437049, 85.102724464127476);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (6, 7, 4426.6022183180712, 55437.00628994, 73.776703638634515);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (2, 7, 5813.0124801427592, 71255.008476129995, 96.88354133571265);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (9, 7, 8025.6589527799933, 125749.52752643, 133.76098254633322);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (13, 7, 4565.7908933697781, 55146.744125789999, 76.096514889496305);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (1, 7, 6646.402085744041, 86176.316629309993, 110.77336809573401);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (4, 7, 4924.7825841578369, 59797.006035819999, 82.079709735963945);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (7, 6, 4433.5593311775692, 55437.00628994, 73.89265551962616);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (13, 6, 4943.220062989687, 78590.388493249993, 82.387001049828115);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (12, 6, 3663.4860364258975, 63485.069269129999, 61.058100607098289);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (11, 6, 4496.7745274249164, 62551.773221880001, 74.946242123748604);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (10, 6, 5650.4592497478006, 100431.42119920001, 94.174320829130011);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (9, 6, 3930.8467680860199, 90244.940354680002, 65.514112801433669);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (8, 6, 1427.2238809627568, 17108.384354760001, 23.787064682712614);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (5, 6, 3477.8202035215431, 61063.323590389999, 57.963670058692387);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (4, 6, 4607.0623256516183, 81392.253960899994, 76.784372094193643);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (3, 6, 5970.1689194055944, 112779.81503285001, 99.502815323426574);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (2, 6, 2771.9417330994952, 57379.320287560004, 46.199028884991584);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (1, 6, 4220.6406706202815, 76835.995936859996, 70.344011177004688);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (1, 5, 1958.2616125989289, 23885.506073140001, 32.637693543315478);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (12, 5, 1532.4187981313769, 31428.651624779999, 25.540313302189613);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (8, 5, 3929.4957334296996, 48659.42172359, 65.491595557161659);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (13, 5, 1958.1139397295849, 29674.281907879998, 32.635232328826412);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (7, 5, 5107.3400430688225, 62318.437049, 85.122334051147035);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (10, 5, 3519.5932763961732, 42809.778697560003, 58.659887939936219);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (9, 5, 3334.7602470546817, 72255.826813129999, 55.57933745091136);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (4, 5, 1621.9562023915164, 29275.540332420002, 27.03260337319194);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (2, 5, 803.70194886187926, 14741.93432463, 13.39503248103132);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (3, 5, 4579.9980982712887, 75253.614561519993, 76.333301637854817);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (11, 5, 1337.554729509015, 15091.14100876, 22.292578825150251);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (6, 5, 3470.5687990098932, 61063.323590389999, 57.842813316831553);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (12, 4, 2616.215006867988, 59326.863049970001, 43.603583447799799);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (11, 4, 1655.8289719890095, 19264.633366329999, 27.597149533150159);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (2, 4, 1887.4981575984907, 43746.497693609999, 31.458302626641512);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (7, 4, 4923.0165252431843, 59797.006035819999, 82.050275420719743);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (8, 4, 5342.146388935982, 65640.18822928, 89.035773148933032);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (9, 4, 4418.556455791293, 98787.207065139999, 73.642607596521557);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (13, 4, 358.9916907880604, 4717.2985756400003, 5.983194846467673);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (10, 4, 3801.2354480020076, 49838.427136099999, 63.353924133366796);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (1, 4, 2614.5575378790622, 44139.442491629998, 43.575958964651036);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (3, 4, 5663.7943070079027, 94785.168599109995, 94.396571783465049);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (6, 4, 4554.3650077465054, 81392.253960899994, 75.906083462441757);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (5, 4, 1596.3851830133301, 29275.540332420002, 26.606419716888833);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (12, 3, 4354.0799478841718, 51173.467957710003, 72.567999131402857);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (13, 3, 6464.3892097938715, 97970.007298349999, 107.73982016323119);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (7, 3, 10033.160154913267, 136345.04018709, 167.21933591522111);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (10, 3, 4016.3136218536224, 49681.572728439998, 66.938560364227044);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (11, 3, 6162.3281003288175, 89593.452941569994, 102.70546833881363);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (9, 3, 2746.7160740841282, 33888.802388440003, 45.778601234735468);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (5, 3, 4998.9893503257272, 75253.614561519993, 83.316489172095459);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (8, 3, 7276.4598265076593, 109943.3259573, 121.27433044179432);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (1, 3, 4325.3148995953306, 52145.170245989997, 72.088581659922184);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (4, 3, 6128.2314724558018, 94785.168599109995, 102.1371912075967);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (6, 3, 6488.6784453181817, 112779.81503285001, 108.14464075530303);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (2, 3, 4501.4105338356794, 65153.684267479999, 75.023508897261323);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (1, 2, 1536.6099447776205, 19506.03254122, 25.610165746293674);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (7, 2, 5827.9602822664219, 71255.008476129995, 97.132671371107037);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (8, 2, 3571.4879476634851, 48617.072219770002, 59.524799127724755);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (5, 2, 793.78947767888133, 14741.93432463, 13.229824627981355);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (9, 2, 2787.0688014921589, 58231.554459619998, 46.451146691535982);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (4, 2, 1923.0315998089593, 43746.497693609999, 32.050526663482657);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (10, 2, 2971.9018308336504, 43099.30820806, 49.53169718056084);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (3, 2, 4032.3066527087663, 65153.684267479999, 67.205110878479431);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (11, 2, 1957.1282276819745, 29252.344344699999, 32.618803794699573);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (12, 2, 984.72735256885392, 17188.5257222, 16.412122542814231);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (13, 2, 2259.1893371470278, 44388.04507498, 37.653155619117129);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (6, 2, 2783.7065664740117, 57379.320287560004, 46.395109441233529);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (3, 1, 3909.9615503187342, 52145.170245989997, 65.166025838645567);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (11, 1, 2796.4128490759304, 37544.1375137, 46.606880817932172);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (13, 1, 3063.0403515469643, 46704.633074669997, 51.050672525782737);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (6, 1, 3770.599595643097, 76835.995936859996, 62.843326594051618);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (10, 1, 1806.0013795626483, 23960.724915679999, 30.100022992710805);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (4, 1, 2726.8826142088951, 44139.442491629998, 45.448043570148251);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (9, 1, 3680.3813452318182, 55624.35354348, 61.339689087196966);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (5, 1, 1633.0740990728355, 23885.506073140001, 27.217901651213925);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (7, 1, 6667.2449036603712, 86176.316629309993, 111.12074839433951);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (8, 1, 4558.3809768325664, 67853.964925620006, 75.97301628054278);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (12, 1, 1833.1811824131848, 21731.213745190002, 30.553019706886413);
-INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (2, 1, 1103.7327454950807, 19506.03254122, 18.395545758251345);
-
-
---
--- TOC entry 4293 (class 0 OID 6616046)
--- Dependencies: 291
--- Data for Name: vrp1_gdist; Type: TABLE DATA; Schema: public; Owner: postgres
---
-
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (1, 2, 19506.03254122, 19506.03254122, 0.0065020108470733333);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (1, 3, 52145.170245989997, 52145.170245989997, 0.017381723415329998);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (1, 4, 44139.442491629998, 44139.442491629998, 0.01471314749721);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (1, 5, 23885.506073140001, 23885.506073140001, 0.0079618353577133334);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (1, 6, 76835.995936859996, 76835.995936859996, 0.025611998645620002);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (1, 7, 86176.316629309993, 86176.316629309993, 0.028725438876436662);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (1, 8, 67853.964925620006, 67853.964925620006, 0.022617988308540001);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (1, 9, 55624.35354348, 55624.35354348, 0.018541451181160001);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (1, 10, 23960.724915679999, 23960.724915679999, 0.0079869083052266678);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (1, 11, 37544.1375137, 37544.1375137, 0.012514712504566667);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (1, 12, 21731.213745190002, 21731.213745190002, 0.0072437379150633334);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (1, 13, 46704.633074669997, 46704.633074669997, 0.01556821102489);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (2, 1, 19506.03254122, 19506.03254122, 0.0065020108470733333);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (2, 3, 65153.684267479999, 65153.684267479999, 0.02171789475582667);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (2, 4, 43746.497693609999, 43746.497693609999, 0.01458216589787);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (2, 5, 14741.93432463, 14741.93432463, 0.0049139781082099994);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (2, 6, 57379.320287560004, 57379.320287560004, 0.019126440095853337);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (2, 7, 71255.008476129995, 71255.008476129995, 0.023751669492043333);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (2, 8, 48617.072219770002, 48617.072219770002, 0.016205690739923333);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (2, 9, 58231.554459619998, 58231.554459619998, 0.019410518153206668);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (2, 10, 43099.30820806, 43099.30820806, 0.014366436069353334);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (2, 11, 29252.344344699999, 29252.344344699999, 0.0097507814482333324);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (2, 12, 17188.5257222, 17188.5257222, 0.0057295085740666669);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (2, 13, 44388.04507498, 44388.04507498, 0.014796015024993333);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (3, 1, 52145.170245989997, 52145.170245989997, 0.017381723415329998);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (3, 2, 65153.684267479999, 65153.684267479999, 0.02171789475582667);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (3, 4, 94785.168599109995, 94785.168599109995, 0.031595056199703334);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (3, 5, 75253.614561519993, 75253.614561519993, 0.025084538187173332);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (3, 6, 112779.81503285001, 112779.81503285001, 0.037593271677616676);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (3, 7, 136345.04018709, 136345.04018709, 0.045448346729030004);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (3, 8, 109943.3259573, 109943.3259573, 0.036647775319099997);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (3, 9, 33888.802388440003, 33888.802388440003, 0.011296267462813335);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (3, 10, 49681.572728439998, 49681.572728439998, 0.016560524242813332);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (3, 11, 89593.452941569994, 89593.452941569994, 0.029864484313856667);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (3, 12, 51173.467957710003, 51173.467957710003, 0.017057822652570002);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (3, 13, 97970.007298349999, 97970.007298349999, 0.032656669099449996);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (4, 1, 44139.442491629998, 44139.442491629998, 0.01471314749721);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (4, 2, 43746.497693609999, 43746.497693609999, 0.01458216589787);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (4, 3, 94785.168599109995, 94785.168599109995, 0.031595056199703334);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (4, 5, 29275.540332420002, 29275.540332420002, 0.0097585134441400007);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (4, 6, 81392.253960899994, 81392.253960899994, 0.0271307513203);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (4, 7, 59797.006035819999, 59797.006035819999, 0.019932335345273333);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (4, 8, 65640.18822928, 65640.18822928, 0.021880062743093332);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (4, 9, 98787.207065139999, 98787.207065139999, 0.032929069021713331);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (4, 10, 49838.427136099999, 49838.427136099999, 0.016612809045366668);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (4, 11, 19264.633366329999, 19264.633366329999, 0.0064215444554433336);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (4, 12, 59326.863049970001, 59326.863049970001, 0.019775621016656666);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (4, 13, 4717.2985756400003, 4717.2985756400003, 0.0015724328585466666);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (5, 1, 23885.506073140001, 23885.506073140001, 0.0079618353577133334);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (5, 2, 14741.93432463, 14741.93432463, 0.0049139781082099994);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (5, 3, 75253.614561519993, 75253.614561519993, 0.025084538187173332);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (5, 4, 29275.540332420002, 29275.540332420002, 0.0097585134441400007);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (5, 6, 61063.323590389999, 61063.323590389999, 0.020354441196796667);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (5, 7, 62318.437049, 62318.437049, 0.020772812349666669);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (5, 8, 48659.42172359, 48659.42172359, 0.016219807241196666);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (5, 9, 72255.826813129999, 72255.826813129999, 0.024085275604376667);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (5, 10, 42809.778697560003, 42809.778697560003, 0.014269926232520002);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (5, 11, 15091.14100876, 15091.14100876, 0.0050303803362533334);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (5, 12, 31428.651624779999, 31428.651624779999, 0.010476217208259999);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (5, 13, 29674.281907879998, 29674.281907879998, 0.0098914273026266646);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (6, 1, 76835.995936859996, 76835.995936859996, 0.025611998645620002);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (6, 2, 57379.320287560004, 57379.320287560004, 0.019126440095853337);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (6, 3, 112779.81503285001, 112779.81503285001, 0.037593271677616676);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (6, 4, 81392.253960899994, 81392.253960899994, 0.0271307513203);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (6, 5, 61063.323590389999, 61063.323590389999, 0.020354441196796667);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (6, 7, 55437.00628994, 55437.00628994, 0.018479002096646668);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (6, 8, 17108.384354760001, 17108.384354760001, 0.0057027947849200003);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (6, 9, 90244.940354680002, 90244.940354680002, 0.030081646784893331);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (6, 10, 100431.42119920001, 100431.42119920001, 0.033477140399733339);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (6, 11, 62551.773221880001, 62551.773221880001, 0.020850591073959999);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (6, 12, 63485.069269129999, 63485.069269129999, 0.021161689756376667);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (6, 13, 78590.388493249993, 78590.388493249993, 0.026196796164416662);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (7, 1, 86176.316629309993, 86176.316629309993, 0.028725438876436662);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (7, 2, 71255.008476129995, 71255.008476129995, 0.023751669492043333);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (7, 3, 136345.04018709, 136345.04018709, 0.045448346729030004);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (7, 4, 59797.006035819999, 59797.006035819999, 0.019932335345273333);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (7, 5, 62318.437049, 62318.437049, 0.020772812349666669);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (7, 6, 55437.00628994, 55437.00628994, 0.018479002096646668);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (7, 8, 40898.252999240001, 40898.252999240001, 0.013632750999746666);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (7, 9, 125749.52752643, 125749.52752643, 0.041916509175476666);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (7, 10, 103032.57156053001, 103032.57156053001, 0.034344190520176669);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (7, 11, 50747.73846031, 50747.73846031, 0.016915912820103334);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (7, 12, 86875.647316550007, 86875.647316550007, 0.028958549105516665);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (7, 13, 55146.744125789999, 55146.744125789999, 0.018382248041930001);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (8, 1, 67853.964925620006, 67853.964925620006, 0.022617988308540001);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (8, 2, 48617.072219770002, 48617.072219770002, 0.016205690739923333);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (8, 3, 109943.3259573, 109943.3259573, 0.036647775319099997);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (8, 4, 65640.18822928, 65640.18822928, 0.021880062743093332);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (8, 5, 48659.42172359, 48659.42172359, 0.016219807241196666);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (8, 6, 17108.384354760001, 17108.384354760001, 0.0057027947849200003);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (8, 7, 40898.252999240001, 40898.252999240001, 0.013632750999746666);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (8, 9, 92014.350547320006, 92014.350547320006, 0.030671450182440003);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (8, 10, 90390.880059980002, 90390.880059980002, 0.030130293353326669);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (8, 11, 47391.047207520001, 47391.047207520001, 0.015797015735840001);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (8, 12, 58891.64477087, 58891.64477087, 0.019630548256956665);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (8, 13, 62516.944979489999, 62516.944979489999, 0.020838981659829999);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (9, 1, 55624.35354348, 55624.35354348, 0.018541451181160001);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (9, 2, 58231.554459619998, 58231.554459619998, 0.019410518153206668);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (9, 3, 33888.802388440003, 33888.802388440003, 0.011296267462813335);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (9, 4, 98787.207065139999, 98787.207065139999, 0.032929069021713331);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (9, 5, 72255.826813129999, 72255.826813129999, 0.024085275604376667);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (9, 6, 90244.940354680002, 90244.940354680002, 0.030081646784893331);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (9, 7, 125749.52752643, 125749.52752643, 0.041916509175476666);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (9, 8, 92014.350547320006, 92014.350547320006, 0.030671450182440003);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (9, 10, 66755.884535439996, 66755.884535439996, 0.022251961511813335);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (9, 11, 87264.291763329995, 87264.291763329995, 0.029088097254443331);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (9, 12, 41043.449335719997, 41043.449335719997, 0.013681149778573333);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (9, 13, 100603.89591172, 100603.89591172, 0.033534631970573339);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (10, 1, 23960.724915679999, 23960.724915679999, 0.0079869083052266678);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (10, 2, 43099.30820806, 43099.30820806, 0.014366436069353334);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (10, 3, 49681.572728439998, 49681.572728439998, 0.016560524242813332);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (10, 4, 49838.427136099999, 49838.427136099999, 0.016612809045366668);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (10, 5, 42809.778697560003, 42809.778697560003, 0.014269926232520002);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (10, 6, 100431.42119920001, 100431.42119920001, 0.033477140399733339);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (10, 7, 103032.57156053001, 103032.57156053001, 0.034344190520176669);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (10, 8, 90390.880059980002, 90390.880059980002, 0.030130293353326669);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (10, 9, 66755.884535439996, 66755.884535439996, 0.022251961511813335);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (10, 11, 52287.419420220001, 52287.419420220001, 0.017429139806740001);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (10, 12, 43710.459317699999, 43710.459317699999, 0.014570153105900001);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (10, 13, 53942.09578946, 53942.09578946, 0.017980698596486665);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (11, 1, 37544.1375137, 37544.1375137, 0.012514712504566667);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (11, 2, 29252.344344699999, 29252.344344699999, 0.0097507814482333324);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (11, 3, 89593.452941569994, 89593.452941569994, 0.029864484313856667);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (11, 4, 19264.633366329999, 19264.633366329999, 0.0064215444554433336);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (11, 5, 15091.14100876, 15091.14100876, 0.0050303803362533334);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (11, 6, 62551.773221880001, 62551.773221880001, 0.020850591073959999);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (11, 7, 50747.73846031, 50747.73846031, 0.016915912820103334);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (11, 8, 47391.047207520001, 47391.047207520001, 0.015797015735840001);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (11, 9, 87264.291763329995, 87264.291763329995, 0.029088097254443331);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (11, 10, 52287.419420220001, 52287.419420220001, 0.017429139806740001);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (11, 12, 46309.024619509997, 46309.024619509997, 0.015436341539836666);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (11, 13, 17611.434113070001, 17611.434113070001, 0.0058704780376900006);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (12, 1, 21731.213745190002, 21731.213745190002, 0.0072437379150633334);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (12, 2, 17188.5257222, 17188.5257222, 0.0057295085740666669);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (12, 3, 51173.467957710003, 51173.467957710003, 0.017057822652570002);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (12, 4, 59326.863049970001, 59326.863049970001, 0.019775621016656666);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (12, 5, 31428.651624779999, 31428.651624779999, 0.010476217208259999);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (12, 6, 63485.069269129999, 63485.069269129999, 0.021161689756376667);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (12, 7, 86875.647316550007, 86875.647316550007, 0.028958549105516665);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (12, 8, 58891.64477087, 58891.64477087, 0.019630548256956665);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (12, 9, 41043.449335719997, 41043.449335719997, 0.013681149778573333);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (12, 10, 43710.459317699999, 43710.459317699999, 0.014570153105900001);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (12, 11, 46309.024619509997, 46309.024619509997, 0.015436341539836666);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (12, 13, 60557.741467469998, 60557.741467469998, 0.020185913822489999);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (13, 1, 46704.633074669997, 46704.633074669997, 0.01556821102489);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (13, 2, 44388.04507498, 44388.04507498, 0.014796015024993333);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (13, 3, 97970.007298349999, 97970.007298349999, 0.032656669099449996);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (13, 4, 4717.2985756400003, 4717.2985756400003, 0.0015724328585466666);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (13, 5, 29674.281907879998, 29674.281907879998, 0.0098914273026266646);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (13, 6, 78590.388493249993, 78590.388493249993, 0.026196796164416662);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (13, 7, 55146.744125789999, 55146.744125789999, 0.018382248041930001);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (13, 8, 62516.944979489999, 62516.944979489999, 0.020838981659829999);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (13, 9, 100603.89591172, 100603.89591172, 0.033534631970573339);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (13, 10, 53942.09578946, 53942.09578946, 0.017980698596486665);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (13, 11, 17611.434113070001, 17611.434113070001, 0.0058704780376900006);
-INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (13, 12, 60557.741467469998, 60557.741467469998, 0.020185913822489999);
-
-
---
--- TOC entry 4290 (class 0 OID 6607823)
--- Dependencies: 285
--- Data for Name: vrp1_orders; Type: TABLE DATA; Schema: public; Owner: postgres
---
-
-INSERT INTO vrp1_orders (id, x, y, order_unit, open_time, close_time, service_time) VALUES (1, -72.892400, 41.668920, 25, 60, 780, 20);
-INSERT INTO vrp1_orders (id, x, y, order_unit, open_time, close_time, service_time) VALUES (2, -72.676150, 41.601650, 25, 60, 780, 20);
-INSERT INTO vrp1_orders (id, x, y, order_unit, open_time, close_time, service_time) VALUES (3, -73.413760, 41.410080, 25, 60, 780, 20);
-INSERT INTO vrp1_orders (id, x, y, order_unit, open_time, close_time, service_time) VALUES (4, -72.576340, 41.988370, 25, 60, 780, 20);
-INSERT INTO vrp1_orders (id, x, y, order_unit, open_time, close_time, service_time) VALUES (5, -72.615920, 41.726460, 25, 60, 780, 20);
-INSERT INTO vrp1_orders (id, x, y, order_unit, open_time, close_time, service_time) VALUES (6, -72.066830, 41.362980, 25, 60, 780, 20);
-INSERT INTO vrp1_orders (id, x, y, order_unit, open_time, close_time, service_time) VALUES (7, -71.882488, 41.842557, 25, 60, 780, 20);
-INSERT INTO vrp1_orders (id, x, y, order_unit, open_time, close_time, service_time) VALUES (8, -72.105080, 41.514310, 25, 60, 780, 20);
-INSERT INTO vrp1_orders (id, x, y, order_unit, open_time, close_time, service_time) VALUES (9, -73.121820, 41.198780, 25, 60, 780, 20);
-INSERT INTO vrp1_orders (id, x, y, order_unit, open_time, close_time, service_time) VALUES (10, -73.121310, 41.799840, 25, 60, 780, 20);
-INSERT INTO vrp1_orders (id, x, y, order_unit, open_time, close_time, service_time) VALUES (11, -72.493050, 41.826470, 250, 60, 780, 20);
-INSERT INTO vrp1_orders (id, x, y, order_unit, open_time, close_time, service_time) VALUES (12, -72.809200, 41.483500, 25, 60, 780, 20);
-INSERT INTO vrp1_orders (id, x, y, order_unit, open_time, close_time, service_time) VALUES (13, -72.51975, 41.98377, 0, 0, 800, 0);
-
-
---
--- TOC entry 4291 (class 0 OID 6616034)
--- Dependencies: 289
--- Data for Name: vrp1_points; Type: TABLE DATA; Schema: public; Owner: postgres
---
-
-INSERT INTO vrp1_points (id, pid, geom, edge_id, fraction, closest_node) VALUES (1, -1, '0101000020E6100000D3BCE3141D3952C0F6D1A92B9FD54440', 134983, 0.38479479629572311, 69021);
-INSERT INTO vrp1_points (id, pid, geom, edge_id, fraction, closest_node) VALUES (2, -2, '0101000020E6100000304CA60A462B52C0B7D100DE02CD4440', 156235, 0.60081527076326913, 174662);
-INSERT INTO vrp1_points (id, pid, geom, edge_id, fraction, closest_node) VALUES (3, -3, '0101000020E61000002619390B7B5A52C0315F5E807DB44440', 155907, 0.60929293991596534, 127670);
-INSERT INTO vrp1_points (id, pid, geom, edge_id, fraction, closest_node) VALUES (4, -4, '0101000020E61000001BD82AC1E22452C07C2C7DE882FE4440', 82159, 0.1088234404534253, 56829);
-INSERT INTO vrp1_points (id, pid, geom, edge_id, fraction, closest_node) VALUES (5, -5, '0101000020E6100000F33CB83B6B2752C014ED2AA4FCDC4440', 226752, 0.87665768706747127, 129246);
-INSERT INTO vrp1_points (id, pid, geom, edge_id, fraction, closest_node) VALUES (6, -6, '0101000020E6100000111956F1460452C0118DEE2076AE4440', 133685, 0.91338793111615413, 28564);
-INSERT INTO vrp1_points (id, pid, geom, edge_id, fraction, closest_node) VALUES (7, -7, '0101000020E610000032C7F2AE7AF851C0080264E8D8EB4440', 263400, 0.83072231921053108, 196779);
-INSERT INTO vrp1_points (id, pid, geom, edge_id, fraction, closest_node) VALUES (8, -8, '0101000020E6100000ADDD76A1B90652C0BD00FBE8D4C14440', 47970, 0.21514413450004088, 25658);
-INSERT INTO vrp1_points (id, pid, geom, edge_id, fraction, closest_node) VALUES (9, -9, '0101000020E6100000EBFF1CE6CB4752C0A88C7F9F71994440', 30632, 0.85391427066903536, 20036);
-INSERT INTO vrp1_points (id, pid, geom, edge_id, fraction, closest_node) VALUES (10, -10, '0101000020E610000060AB048BC34752C02E04392861E64440', 231149, 0.50999310422417587, 153595);
-INSERT INTO vrp1_points (id, pid, geom, edge_id, fraction, closest_node) VALUES (11, -11, '0101000020E6100000BD5296218E1F52C00490DAC4C9E94440', 152917, 0.70955464807036772, 159294);
-INSERT INTO vrp1_points (id, pid, geom, edge_id, fraction, closest_node) VALUES (12, -12, '0101000020E610000016FBCBEEC93352C0D9CEF753E3BD4440', 235710, 0.44298119784627749, 124069);
-INSERT INTO vrp1_points (id, pid, geom, edge_id, fraction, closest_node) VALUES (13, -13, '0101000020E610000025068195432152C09964E42CECFD4440', 220656, 0.77224957554563523, 120633);
-
-
---
--- TOC entry 4295 (class 0 OID 8777648)
--- Dependencies: 297
--- Data for Name: vrpdtw_beer; Type: TABLE DATA; Schema: public; Owner: postgres
---
-
-INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (0, 0, 2219223.0599095495, 43261.330613416343, 0, 780, 0, 0, 0, 0);
-INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (0, 1, 2219223.0599095495, 43261.330613416343, 0, 780, 0, 50, 0, 2);
-INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (0, 3, 2219223.0599095495, 43261.330613416343, 0, 780, 0, 50, 0, 4);
-INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (0, 5, 2219223.0599095495, 43261.330613416343, 0, 780, 0, 50, 0, 6);
-INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (0, 7, 2219223.0599095495, 43261.330613416343, 0, 780, 0, 50, 0, 8);
-INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (0, 9, 2219223.0599095495, 43261.330613416343, 0, 780, 0, 50, 0, 10);
-INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (0, 11, 2219223.0599095495, 43261.330613416343, 0, 780, 0, 50, 0, 12);
-INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (0, 13, 2219223.0599095495, 43261.330613416343, 0, 780, 0, 50, 0, 14);
-INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (0, 15, 2219223.0599095495, 43261.330613416343, 0, 780, 0, 50, 0, 16);
-INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (0, 17, 2219223.0599095495, 43261.330613416343, 0, 780, 0, 50, 0, 18);
-INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (0, 19, 2219223.0599095495, 43261.330613416343, 0, 780, 0, 50, 0, 20);
-INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (0, 21, 2219223.0599095495, 43261.330613416343, 0, 780, 0, 200, 0, 22);
-INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (0, 23, 2219223.0599095495, 43261.330613416343, 0, 780, 0, 50, 0, 24);
-INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (1, 2, 2201674.04542425, -537.96920408041944, 0, 780, 0, -50, 1, 0);
-INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (2, 4, 2220804.1661061305, -1824.0976658091467, 0, 780, 0, -50, 3, 0);
-INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (3, 6, 2170182.7454079189, -42278.887298092624, 0, 780, 0, -50, 5, 0);
-INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (4, 8, 2214706.3217116385, 42201.317464497493, 0, 780, 0, -50, 7, 0);
-INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (5, 10, 2221020.0081376741, 13156.086760460585, 0, 780, 0, -50, 9, 0);
-INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (6, 12, 2276566.54710769, -10390.65374555897, 0, 780, 0, -50, 11, 0);
-INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (7, 14, 2273317.2298506126, 45902.567392510609, 0, 780, 0, -50, 13, 0);
-INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (8, 16, 2268126.8554679737, 4674.1135220944607, 0, 780, 0, -50, 15, 0);
-INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (9, 18, 2200293.6413550111, -57036.325719941706, 0, 780, 0, -50, 17, 0);
-INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (10, 20, 2179348.5807632855, 7268.5531586333609, 0, 780, 0, -50, 19, 0);
-INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (11, 22, 2226924.5635206043, 27207.476487862386, 0, 780, 0, -200, 21, 0);
-INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (12, 24, 2214670.8347013257, -18087.138344661518, 0, 780, 0, -50, 23, 0);
-*/    
-
-/*
-SELECT * FROM pgr_gsoc_vrppdtw(
-    $$ SELECT * FROM jet_customers $$,
-    2, 5);
-
-SELECT * FROM _pgr_pickDeliver(
-    $$ SELECT * FROM jet_customers $$,
-    2, 5);
-
-SELECT * FROM _pgr_pickDeliver(
-    $$ SELECT * FROM jet_customers $$,
-    max_vehicles := 2, capacity :=5, speed := 1);
-*/
-
-/*
--- converting data to use euclidean
-UPDATE jet_customers SET opentime = 9*60 WHERE opentime = 3448;
-UPDATE jet_customers SET opentime = 9.5*60 WHERE opentime = 3463;
-UPDATE jet_customers SET opentime = 10*60 WHERE opentime = 3576;
-UPDATE jet_customers SET opentime = 10.5*60 WHERE opentime = 3624;
-UPDATE jet_customers SET opentime = 11*60 WHERE opentime = 4265;
-UPDATE jet_customers SET opentime = 11.5*60 WHERE opentime = 4355;
-
-UPDATE jet_customers SET closetime = 11*60 WHERE closetime = 2853448;
-UPDATE jet_customers SET closetime = 11.5*60 WHERE closetime = 2853463;
-UPDATE jet_customers SET closetime = 12*60 WHERE closetime = 2853576;
-UPDATE jet_customers SET closetime = 12.5*60 WHERE closetime = 2853624;
-UPDATE jet_customers SET closetime = 13*60 WHERE closetime = 2854265;
-UPDATE jet_customers SET closetime = 13.5*60 WHERE closetime = 2854355;
-UPDATE jet_customers SET closetime = 14*60 WHERE closetime = 6903448;
-UPDATE jet_customers SET closetime = 14.5*60 WHERE closetime = 6903463;
-UPDATE jet_customers SET closetime = 15*60 WHERE closetime = 6903576;
-UPDATE jet_customers SET closetime = 15.5*60 WHERE closetime = 6903624;
-UPDATE jet_customers SET closetime = 16*60 WHERE closetime = 6904265;
-UPDATE jet_customers SET closetime = 16.5*60 WHERE closetime = 6904355;
-
-UPDATE jet_customers SET servicetime = 2 WHERE servicetime != 0;
-
-WITH
-customer_data AS (SELECT * FROM jet_customers),
-pickups AS (
-    SELECT id, demand, x as pick_x, y as pick_y, opentime as pick_open, closetime as pick_close, servicetime as pick_service
-    FROM  customer_data WHERE pindex = 0 AND id != 0
-),
-deliveries AS (
-    SELECT pindex AS id, x as deliver_x, y as deliver_y, opentime as deliver_open, closetime as deliver_close, servicetime as deliver_service
-    FROM  customer_data WHERE dindex = 0 AND id != 0
-)
-SELECT * INTO jet_orders FROM pickups JOIN deliveries USING(id) ORDER BY pickups.id;
-
-WITH
-customer_data AS (select * from jet_customers)
-SELECT id, x AS start_x, y AS start_y,
-opentime AS start_open, closetime AS start_close,
-2 AS capacity,  5  AS number INTO jet_vehicles
-FROM customer_data WHERE id = 0 LIMIT 1;
-
-SELECT *
-FROM _pgr_pickDeliverEuclidean(
-    $$ SELECT * from jet_orders $$,
-    $$ SELECT * FROM jet_vehicles$$
-);
-*/
-
diff --git a/src/pickDeliver/test/design_pgtap.result b/src/pickDeliver/test/design_pgtap.result
deleted file mode 100644
index a16867b..0000000
--- a/src/pickDeliver/test/design_pgtap.result
+++ /dev/null
@@ -1,20 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
-UPDATE vehicles SET start_open = 5, start_close = 4 WHERE id = 1;
-UPDATE 1
-SELECT * FROM _pgr_pickDeliverEuclidean(
-    $$SELECT * FROM orders$$,
-    $$SELECT * FROM vehicles$$);
-ERROR:  Illegal values found on vehicle
-HINT:  Illegal values found on vehicleOn vehicle 1 a condition is not met, verify that:
--  start_open <= start_close
--  end_open <= end_close
--  capacity > 0
---> pgrouting::vrp::Pgr_pickDeliver::Pgr_pickDeliver(const std::vector<PickDeliveryOrders_t>&, const std::vector<Vehicle_t>&, double, size_t, int)
-
-UPDATE vehicles SET start_open = 0, start_close = 50 WHERE id = 1;
-ERROR:  current transaction is aborted, commands ignored until end of transaction block
-ROLLBACK;
-ROLLBACK
diff --git a/src/pickDeliver/test/differentVechiles-cygwin.test.sql b/src/pickDeliver/test/differentVechiles-cygwin.test.sql
deleted file mode 100644
index b39f775..0000000
--- a/src/pickDeliver/test/differentVechiles-cygwin.test.sql
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-INSERT into vehicles(start_x, start_y, start_open, start_close, capacity, number)
-VALUES (40, 50, 0, 400, 200, 1);
-
-UPDATE vehicles SET number = 1;
-
-ALTER TABLE vehicles DROP COLUMN number;
-
-SELECT * INTO results
-FROM _pgr_pickDeliverEuclidean(
-    'SELECT * FROM orders ORDER BY id',
-    'SELECT * FROM vehicles',
-    30);
-
-
-WITH
-orders_id AS (
-    SELECT id FROM orders
-), 
-results_id AS (
-    SELECT DISTINCT order_id AS id
-    FROM results
-    WHERE stop_type NOT IN (1, 6, -1)
-    ORDER BY order_id
-)
-SELECT count(*)=53 FROM orders_id LEFT JOIN results_id USING(ID);
-
-WITH
-the_results AS (
-    SELECT * 
-    FROM results
-)
-SELECT ((SELECT max(vehicle_number) FROM results) * 2 + 53 * 2 + 1) =
-    (SELECT count(*) from the_results) AS correct_value;
-
--- SELECT * FROM results;
diff --git a/src/pickDeliver/test/differentVechiles.result b/src/pickDeliver/test/differentVechiles.result
deleted file mode 100644
index 7ec6dc7..0000000
--- a/src/pickDeliver/test/differentVechiles.result
+++ /dev/null
@@ -1,230 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
-INSERT into vehicles(start_x, start_y, start_open, start_close, capacity, number)
-VALUES (40, 50, 0, 400, 200, 25);
-INSERT 0 1
-SELECT * FROM _pgr_pickDeliverEuclidean(
-    'SELECT * FROM orders ORDER BY id',
-    'SELECT * FROM vehicles',
-    30);
- seq | vehicle_number | vehicle_id | vehicle_seq | order_id | stop_type | cargo |   travel_time    |   arrival_time   | wait_time | service_time |  departure_time  
------+----------------+------------+-------------+----------+-----------+-------+------------------+------------------+-----------+--------------+------------------
-   1 |              1 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
-   2 |              1 |          1 |           2 |        5 |         2 |    10 | 15.1327459504216 | 15.1327459504216 |         0 |           90 | 105.132745950422
-   3 |              1 |          1 |           3 |        3 |         2 |    20 |                1 | 106.132745950422 |         0 |           90 | 196.132745950422
-   4 |              1 |          1 |           4 |        5 |         3 |    10 |                2 | 198.132745950422 |         0 |           90 | 288.132745950422
-   5 |              1 |          1 |           5 |        8 |         2 |    30 | 2.82842712474619 | 290.961173075168 |         0 |           90 | 380.961173075168
-   6 |              1 |          1 |           6 |        8 |         3 |    10 | 3.60555127546399 | 384.566724350632 |         0 |           90 | 474.566724350632
-   7 |              1 |          1 |           7 |       11 |         2 |    20 |                3 | 477.566724350632 |         0 |           90 | 567.566724350632
-   8 |              1 |          1 |           8 |        9 |         2 |    30 | 3.16227766016838 |   570.7290020108 |         0 |           90 |   660.7290020108
-   9 |              1 |          1 |           9 |        6 |         2 |    50 | 2.23606797749979 |   662.9650699883 |         0 |           90 |   752.9650699883
-  10 |              1 |          1 |          10 |        9 |         3 |    40 | 2.23606797749979 |   755.2011379658 |         0 |           90 |   845.2011379658
-  11 |              1 |          1 |          11 |        6 |         3 |    20 | 3.60555127546399 | 848.806689241264 |         0 |           90 | 938.806689241264
-  12 |              1 |          1 |          12 |       11 |         3 |    10 |                2 | 940.806689241264 |         0 |           90 | 1030.80668924126
-  13 |              1 |          1 |          13 |        3 |         3 |     0 |                3 | 1033.80668924126 |         0 |           90 | 1123.80668924126
-  14 |              1 |          1 |          14 |       -1 |         6 |     0 | 15.8113883008419 | 1139.61807754211 |         0 |            0 | 1139.61807754211
-  15 |              2 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
-  16 |              2 |          1 |           2 |       13 |         2 |    30 | 30.8058436014987 | 30.8058436014987 |         0 |           90 | 120.805843601499
-  17 |              2 |          1 |           3 |       13 |         3 |     0 |                4 | 124.805843601499 |         0 |           90 | 214.805843601499
-  18 |              2 |          1 |           4 |       18 |         2 |    20 |                3 | 217.805843601499 |         0 |           90 | 307.805843601499
-  19 |              2 |          1 |           5 |       19 |         2 |    30 |                5 | 312.805843601499 |         0 |           90 | 402.805843601499
-  20 |              2 |          1 |           6 |       19 |         3 |    20 |                5 | 407.805843601499 |         0 |           90 | 497.805843601499
-  21 |              2 |          1 |           7 |       16 |         2 |    60 |                5 | 502.805843601499 |         0 |           90 | 592.805843601499
-  22 |              2 |          1 |           8 |       16 |         3 |    20 |                2 | 594.805843601499 |         0 |           90 | 684.805843601499
-  23 |              2 |          1 |           9 |       18 |         3 |     0 |                3 | 687.805843601499 |         0 |           90 | 777.805843601499
-  24 |              2 |          1 |          10 |       50 |         2 |    10 | 53.0094331227943 | 830.815276724293 |         0 |           90 | 920.815276724293
-  25 |              2 |          1 |          11 |       50 |         3 |     0 | 3.16227766016838 | 923.977554384461 |         0 |           90 | 1013.97755438446
-  26 |              2 |          1 |          12 |       49 |         2 |    10 |                3 | 1016.97755438446 |         0 |           90 | 1106.97755438446
-  27 |              2 |          1 |          13 |       49 |         3 |     0 |                2 | 1108.97755438446 |         0 |           90 | 1198.97755438446
-  28 |              2 |          1 |          14 |       -1 |         6 |     0 | 18.0277563773199 | 1217.00531076178 |         0 |            0 | 1217.00531076178
-  29 |              3 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
-  30 |              3 |          1 |           2 |       20 |         2 |    10 |               10 |               10 |         0 |           90 |              100
-  31 |              3 |          1 |           3 |       20 |         3 |     0 |                5 |              105 |         0 |           90 |              195
-  32 |              3 |          1 |           4 |       25 |         2 |    40 |                2 |              197 |         0 |           90 |              287
-  33 |              3 |          1 |           5 |       25 |         3 |     0 |                2 |              289 |         0 |           90 |              379
-  34 |              3 |          1 |           6 |       29 |         2 |    10 | 3.60555127546399 | 382.605551275464 |         0 |           90 | 472.605551275464
-  35 |              3 |          1 |           7 |       30 |         2 |    20 |                5 | 477.605551275464 |         0 |           90 | 567.605551275464
-  36 |              3 |          1 |           8 |       28 |         2 |    40 |                3 | 570.605551275464 |         0 |           90 | 660.605551275464
-  37 |              3 |          1 |           9 |       29 |         3 |    30 |                2 | 662.605551275464 |         0 |           90 | 752.605551275464
-  38 |              3 |          1 |          10 |       23 |         2 |    40 |                3 | 755.605551275464 |         0 |            0 | 755.605551275464
-  39 |              3 |          1 |          11 |       23 |         3 |    30 |                0 | 755.605551275464 |         0 |           90 | 845.605551275464
-  40 |              3 |          1 |          12 |       28 |         3 |    10 |                3 | 848.605551275464 |         0 |           90 | 938.605551275464
-  41 |              3 |          1 |          13 |       30 |         3 |     0 |                2 | 940.605551275464 |         0 |           90 | 1030.60555127546
-  42 |              3 |          1 |          14 |       -1 |         6 |     0 | 10.1980390271856 | 1040.80359030265 |         0 |            0 | 1040.80359030265
-  43 |              4 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
-  44 |              4 |          1 |           2 |       32 |         2 |    30 | 31.6227766016838 | 31.6227766016838 |         0 |           90 | 121.622776601684
-  45 |              4 |          1 |           3 |       33 |         2 |    70 |                2 | 123.622776601684 |         0 |           90 | 213.622776601684
-  46 |              4 |          1 |           4 |       32 |         3 |    40 |  5.3851648071345 | 219.007941408818 |         0 |           90 | 309.007941408818
-  47 |              4 |          1 |           5 |       35 |         2 |    50 |                5 | 314.007941408818 |         0 |           90 | 404.007941408818
-  48 |              4 |          1 |           6 |       33 |         3 |    10 |  5.8309518948453 | 409.838893303664 |         0 |           90 | 499.838893303664
-  49 |              4 |          1 |           7 |       38 |         2 |    40 |                2 | 501.838893303664 |         0 |           90 | 591.838893303664
-  50 |              4 |          1 |           8 |       35 |         3 |    30 |                5 | 596.838893303664 |         0 |           90 | 686.838893303664
-  51 |              4 |          1 |           9 |       36 |         2 |    40 |                5 | 691.838893303664 |         0 |            0 | 691.838893303664
-  52 |              4 |          1 |          10 |       36 |         3 |    30 |                0 | 691.838893303664 |         0 |           90 | 781.838893303664
-  53 |              4 |          1 |          11 |       38 |         3 |     0 |                3 | 784.838893303664 |         0 |           90 | 874.838893303664
-  54 |              4 |          1 |          12 |       -1 |         6 |     0 | 32.3882694814033 | 907.227162785067 |         0 |            0 | 907.227162785067
-  55 |              5 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
-  56 |              5 |          1 |           2 |       43 |         2 |    10 | 16.5529453572468 | 16.5529453572468 |         0 |           90 | 106.552945357247
-  57 |              5 |          1 |           3 |       42 |         2 |    30 |                3 | 109.552945357247 |         0 |           90 | 199.552945357247
-  58 |              5 |          1 |           4 |       43 |         3 |    20 |                2 | 201.552945357247 |         0 |           90 | 291.552945357247
-  59 |              5 |          1 |           5 |       42 |         3 |     0 |                2 | 293.552945357247 |         0 |           90 | 383.552945357247
-  60 |              5 |          1 |           6 |       44 |         2 |    10 |                3 | 386.552945357247 |         0 |           90 | 476.552945357247
-  61 |              5 |          1 |           7 |       44 |         3 |     0 | 2.82842712474619 | 479.381372481993 |         0 |           90 | 569.381372481993
-  62 |              5 |          1 |           8 |       45 |         2 |    10 |                2 | 571.381372481993 |         0 |           90 | 661.381372481993
-  63 |              5 |          1 |           9 |       45 |         3 |     0 |                2 | 663.381372481993 |         0 |           90 | 753.381372481993
-  64 |              5 |          1 |          10 |       51 |         2 |    10 |                3 | 756.381372481993 |         0 |            0 | 756.381372481993
-  65 |              5 |          1 |          11 |       51 |         3 |     0 |                0 | 756.381372481993 |         0 |           90 | 846.381372481993
-  66 |              5 |          1 |          12 |       66 |         2 |    10 |  22.561028345357 |  868.94240082735 |         0 |           90 |  958.94240082735
-  67 |              5 |          1 |          13 |       66 |         3 |     0 |                2 |  960.94240082735 |         0 |           90 | 1050.94240082735
-  68 |              5 |          1 |          14 |       -1 |         6 |     0 | 15.8113883008419 | 1066.75378912819 |         0 |            0 | 1066.75378912819
-  69 |              6 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
-  70 |              6 |          1 |           2 |       57 |         2 |    40 |               35 |               35 |         0 |           90 |              125
-  71 |              6 |          1 |           3 |       57 |         3 |     0 |                2 |              127 |         0 |           90 |              217
-  72 |              6 |          1 |           4 |       54 |         2 |    40 |                5 |              222 |         0 |           90 |              312
-  73 |              6 |          1 |           5 |       53 |         2 |    60 |  5.3851648071345 | 317.385164807135 |         0 |           90 | 407.385164807135
-  74 |              6 |          1 |           6 |       56 |         2 |    90 |                4 | 411.385164807135 |         0 |           90 | 501.385164807135
-  75 |              6 |          1 |           7 |       53 |         3 |    70 |                2 | 503.385164807135 |         0 |           90 | 593.385164807135
-  76 |              6 |          1 |           8 |       54 |         3 |    30 |                3 | 596.385164807135 |         0 |           90 | 686.385164807135
-  77 |              6 |          1 |           9 |       56 |         3 |     0 | 10.4403065089106 | 696.825471316045 |         0 |           90 | 786.825471316045
-  78 |              6 |          1 |          10 |       -1 |         6 |     0 | 35.0570962859162 | 821.882567601961 |         0 |            0 | 821.882567601961
-  79 |              7 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
-  80 |              7 |          1 |           2 |       67 |         2 |    10 | 12.2065556157337 | 12.2065556157337 |         0 |           90 | 102.206555615734
-  81 |              7 |          1 |           3 |       65 |         2 |    20 |                1 | 103.206555615734 |         0 |           90 | 193.206555615734
-  82 |              7 |          1 |           4 |       63 |         2 |    70 |                2 | 195.206555615734 |         0 |           90 | 285.206555615734
-  83 |              7 |          1 |           5 |       62 |         2 |    90 |                5 | 290.206555615734 |         0 |           90 | 380.206555615734
-  84 |              7 |          1 |           6 |       63 |         3 |    40 |                3 | 383.206555615734 |         0 |           90 | 473.206555615734
-  85 |              7 |          1 |           7 |       65 |         3 |    30 |                5 | 478.206555615734 |         0 |           90 | 568.206555615734
-  86 |              7 |          1 |           8 |       67 |         3 |    20 |                3 | 571.206555615734 |         0 |           90 | 661.206555615734
-  87 |              7 |          1 |           9 |       64 |         2 |    30 |                2 | 663.206555615734 |         0 |            0 | 663.206555615734
-  88 |              7 |          1 |          10 |       64 |         3 |    20 |                0 | 663.206555615734 |         0 |           90 | 753.206555615734
-  89 |              7 |          1 |          11 |       62 |         3 |     0 |                3 | 756.206555615734 |         0 |           90 | 846.206555615734
-  90 |              7 |          1 |          12 |       -1 |         6 |     0 | 20.6155281280883 | 866.822083743822 |         0 |            0 | 866.822083743822
-  91 |              8 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
-  92 |              8 |          1 |           2 |       81 |         2 |    30 | 47.4341649025257 | 47.4341649025257 |         0 |           90 | 137.434164902526
-  93 |              8 |          1 |           3 |       78 |         2 |    50 |                3 | 140.434164902526 |         0 |            0 | 140.434164902526
-  94 |              8 |          1 |           4 |       78 |         3 |    30 |                0 | 140.434164902526 |         0 |           90 | 230.434164902526
-  95 |              8 |          1 |           5 |       76 |         2 |    40 |                2 | 232.434164902526 |         0 |           90 | 322.434164902526
-  96 |              8 |          1 |           6 |       71 |         2 |    60 |                5 | 327.434164902526 |         0 |           90 | 417.434164902526
-  97 |              8 |          1 |           7 |       81 |         3 |    30 |                5 | 422.434164902526 |         0 |           90 | 512.434164902526
-  98 |              8 |          1 |           8 |       76 |         3 |    20 |                3 | 515.434164902526 |         0 |           90 | 605.434164902526
-  99 |              8 |          1 |           9 |       71 |         3 |     0 |                4 | 609.434164902526 |         0 |           90 | 699.434164902526
- 100 |              8 |          1 |          10 |       79 |         2 |    10 |                1 | 700.434164902526 |         0 |           90 | 790.434164902526
- 101 |              8 |          1 |          11 |       79 |         3 |     0 |  5.3851648071345 |  795.81932970966 |         0 |           90 |  885.81932970966
- 102 |              8 |          1 |          12 |       -1 |         6 |     0 |  51.478150704935 | 937.297480414595 |         0 |            0 | 937.297480414595
- 103 |              9 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
- 104 |              9 |          1 |           2 |       90 |         2 |    10 | 20.6155281280883 | 20.6155281280883 |         0 |           90 | 110.615528128088
- 105 |              9 |          1 |           3 |       87 |         2 |    30 |                5 | 115.615528128088 |         0 |           90 | 205.615528128088
- 106 |              9 |          1 |           4 |       86 |         2 |    40 |                1 | 206.615528128088 |         0 |           90 | 296.615528128088
- 107 |              9 |          1 |           5 |       87 |         3 |    20 |                6 | 302.615528128088 |         0 |           90 | 392.615528128088
- 108 |              9 |          1 |           6 |       82 |         2 |    40 |                3 | 395.615528128088 |         0 |           90 | 485.615528128088
- 109 |              9 |          1 |           7 |       84 |         2 |    60 |  5.8309518948453 | 491.446480022934 |         0 |           90 | 581.446480022934
- 110 |              9 |          1 |           8 |       82 |         3 |    40 | 2.82842712474619 |  584.27490714768 |         0 |           90 |  674.27490714768
- 111 |              9 |          1 |           9 |       90 |         3 |    30 |                3 |  677.27490714768 |         0 |           90 |  767.27490714768
- 112 |              9 |          1 |          10 |       84 |         3 |    10 | 2.82842712474619 | 770.103334272426 |         0 |           90 | 860.103334272426
- 113 |              9 |          1 |          11 |       86 |         3 |     0 | 3.60555127546399 |  863.70888554789 |         0 |           90 |  953.70888554789
- 114 |              9 |          1 |          12 |       -1 |         6 |     0 | 22.3606797749979 | 976.069565322888 |         0 |            0 | 976.069565322888
- 115 |             10 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
- 116 |             10 |          1 |           2 |       98 |         2 |    20 | 30.8058436014987 | 30.8058436014987 |         0 |           90 | 120.805843601499
- 117 |             10 |          1 |           3 |       96 |         2 |    30 |  5.3851648071345 | 126.191008408633 |         0 |           90 | 216.191008408633
- 118 |             10 |          1 |           4 |       98 |         3 |    10 |                2 | 218.191008408633 |         0 |           90 | 308.191008408633
- 119 |             10 |          1 |           5 |       96 |         3 |     0 | 3.60555127546399 | 311.796559684097 |         0 |           90 | 401.796559684097
- 120 |             10 |          1 |           6 |       92 |         2 |    20 | 3.60555127546399 | 405.402110959561 |         0 |           90 | 495.402110959561
- 121 |             10 |          1 |           7 |       92 |         3 |     0 |                2 | 497.402110959561 |         0 |           90 | 587.402110959561
- 122 |             10 |          1 |           8 |       97 |         2 |    30 |                5 | 592.402110959561 |         0 |            0 | 592.402110959561
- 123 |             10 |          1 |           9 |       97 |         3 |     0 |                0 | 592.402110959561 |         0 |           90 | 682.402110959561
- 124 |             10 |          1 |          10 |      100 |         2 |    20 |                5 | 687.402110959561 |         0 |           90 | 777.402110959561
- 125 |             10 |          1 |          11 |      100 |         3 |     0 |                5 | 782.402110959561 |         0 |           90 | 872.402110959561
- 126 |             10 |          1 |          12 |       -1 |         6 |     0 | 33.5410196624968 | 905.943130622058 |         0 |            0 | 905.943130622058
- 127 |             -2 |          0 |           0 |       -1 |        -1 |    -1 |  879.42275822512 |               -1 |         0 |         9000 | 9879.42275822512
-(127 rows)
-
-WITH
-orders_id AS (
-    SELECT id FROM orders
-), 
-results_id AS (
-    SELECT DISTINCT order_id AS id
-    FROM _pgr_pickDeliverEuclidean(
-        'SELECT * FROM orders ORDER BY id',
-        'SELECT * FROM vehicles',
-        30)
-    WHERE stop_type NOT IN (0, 5, -1)
-    ORDER BY order_id
-)
-SELECT * FROM orders_id LEFT JOIN results_id USING(ID);
- id  
------
-   3
-   5
-   6
-   8
-   9
-  11
-  13
-  16
-  18
-  19
-  20
-  23
-  25
-  28
-  29
-  30
-  32
-  33
-  35
-  36
-  38
-  42
-  43
-  44
-  45
-  49
-  50
-  51
-  53
-  54
-  56
-  57
-  62
-  63
-  64
-  65
-  66
-  67
-  71
-  76
-  78
-  79
-  81
-  82
-  84
-  86
-  87
-  90
-  92
-  96
-  97
-  98
- 100
-(53 rows)
-
-WITH
-results AS (
-    SELECT * 
-    FROM _pgr_pickDeliverEuclidean(
-        'SELECT * FROM orders ORDER BY id',
-        'SELECT * FROM vehicles',
-        30)
-)
-SELECT ((1 + (SELECT max(vehicle_id) FROM results) * 2 + 53 * 2) = 
-    (SELECT count(*) from results)) AS correct_value;
- correct_value 
----------------
- f
-(1 row)
-
-ROLLBACK;
-ROLLBACK
diff --git a/src/pickDeliver/test/differentVechiles.test.sql b/src/pickDeliver/test/differentVechiles.test.sql
deleted file mode 100644
index 3faf30c..0000000
--- a/src/pickDeliver/test/differentVechiles.test.sql
+++ /dev/null
@@ -1,34 +0,0 @@
-
-INSERT into vehicles(start_x, start_y, start_open, start_close, capacity, number)
-VALUES (40, 50, 0, 400, 200, 25);
-
-SELECT * FROM _pgr_pickDeliverEuclidean(
-    'SELECT * FROM orders ORDER BY id',
-    'SELECT * FROM vehicles',
-    30);
-
-WITH
-orders_id AS (
-    SELECT id FROM orders
-), 
-results_id AS (
-    SELECT DISTINCT order_id AS id
-    FROM _pgr_pickDeliverEuclidean(
-        'SELECT * FROM orders ORDER BY id',
-        'SELECT * FROM vehicles',
-        30)
-    WHERE stop_type NOT IN (0, 5, -1)
-    ORDER BY order_id
-)
-SELECT * FROM orders_id LEFT JOIN results_id USING(ID);
-
-WITH
-results AS (
-    SELECT * 
-    FROM _pgr_pickDeliverEuclidean(
-        'SELECT * FROM orders ORDER BY id',
-        'SELECT * FROM vehicles',
-        30)
-)
-SELECT ((1 + (SELECT max(vehicle_id) FROM results) * 2 + 53 * 2) = 
-    (SELECT count(*) from results)) AS correct_value;
diff --git a/src/pickDeliver/test/doc-pickDeliver.result b/src/pickDeliver/test/doc-pickDeliver.result
deleted file mode 100644
index b5b2096..0000000
--- a/src/pickDeliver/test/doc-pickDeliver.result
+++ /dev/null
@@ -1,61 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
---q1
-SELECT * FROM _pgr_pickDeliver(
-    'SELECT * FROM orders ORDER BY id',
-    'SELECT * from vehicles',
-    
-    'WITH
-    A AS (
-        SELECT p_node_id AS id, p_x AS x, p_y AS y FROM orders
-        UNION
-        SELECT d_node_id AS id, d_x, d_y FROM orders
-        UNION
-        SELECT start_node_id, start_x, start_y FROM vehicles
-    )
-    SELECT A.id AS start_vid, B.id AS end_vid, sqrt( (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y)) AS agg_cost
-    FROM A, A AS B WHERE A.id != B.id'
-    );
- seq | vehicle_seq | vehicle_id | stop_seq | stop_type | stop_id | order_id | cargo |   travel_time    |   arrival_time   | wait_time | service_time |  departure_time  
------+-------------+------------+----------+-----------+---------+----------+-------+------------------+------------------+-----------+--------------+------------------
-   1 |           1 |          1 |        1 |         1 |       6 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
-   2 |           1 |          1 |        2 |         2 |       5 |        3 |    30 |                1 |                1 |         1 |            3 |                5
-   3 |           1 |          1 |        3 |         3 |      11 |        3 |     0 |  1.4142135623731 | 6.41421356237309 |         0 |            3 |  9.4142135623731
-   4 |           1 |          1 |        4 |         2 |       9 |        2 |    20 |  1.4142135623731 | 10.8284271247462 |         0 |            2 | 12.8284271247462
-   5 |           1 |          1 |        5 |         3 |       4 |        2 |     0 |                1 | 13.8284271247462 |         0 |            3 | 16.8284271247462
-   6 |           1 |          1 |        6 |         6 |       6 |       -1 |     0 |  1.4142135623731 | 18.2426406871193 |         0 |            0 | 18.2426406871193
-   7 |           2 |          1 |        1 |         1 |       6 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
-   8 |           2 |          1 |        2 |         2 |       3 |        1 |    10 |                1 |                1 |         1 |            3 |                5
-   9 |           2 |          1 |        3 |         3 |       8 |        1 |     0 | 2.23606797749979 | 7.23606797749979 |         0 |            3 | 10.2360679774998
-  10 |           2 |          1 |        4 |         6 |       6 |       -1 |     0 |                2 | 12.2360679774998 |         0 |            0 | 12.2360679774998
-  11 |          -2 |          0 |        0 |        -1 |      -1 |       -1 |    -1 | 11.4787086646191 |               -1 |         2 |           17 | 30.4787086646191
-(11 rows)
-
---q2
-SELECT * FROM _pgr_pickDeliver(
-    $$ SELECT * FROM orders ORDER BY id $$,
-    $$ SELECT * FROM vehicles $$,
-    $$ SELECT * from pgr_dijkstraCostMatrix(
-        ' SELECT * FROM edge_table ', ARRAY[3, 4, 5, 8, 9, 11]) 
-    $$
-);
- seq | vehicle_seq | vehicle_id | stop_seq | stop_type | stop_id | order_id | cargo | travel_time | arrival_time | wait_time | service_time | departure_time 
------+-------------+------------+----------+-----------+---------+----------+-------+-------------+--------------+-----------+--------------+----------------
-   1 |           1 |          1 |        1 |         1 |       6 |       -1 |     0 |           0 |            0 |         0 |            0 |              0
-   2 |           1 |          1 |        2 |         2 |       5 |        3 |    30 |           1 |            1 |         1 |            3 |              5
-   3 |           1 |          1 |        3 |         3 |      11 |        3 |     0 |           2 |            7 |         0 |            3 |             10
-   4 |           1 |          1 |        4 |         2 |       9 |        2 |    20 |           2 |           12 |         0 |            2 |             14
-   5 |           1 |          1 |        5 |         3 |       4 |        2 |     0 |           1 |           15 |         0 |            3 |             18
-   6 |           1 |          1 |        6 |         6 |       6 |       -1 |     0 |           4 |           22 |         0 |            0 |             22
-   7 |           2 |          1 |        1 |         1 |       6 |       -1 |     0 |           0 |            0 |         0 |            0 |              0
-   8 |           2 |          1 |        2 |         2 |       3 |        1 |    10 |           5 |            5 |         0 |            3 |              8
-   9 |           2 |          1 |        3 |         3 |       8 |        1 |     0 |           3 |           11 |         0 |            3 |             14
-  10 |           2 |          1 |        4 |         6 |       6 |       -1 |     0 |           0 |           14 |         0 |            0 |             14
-  11 |          -2 |          0 |        0 |        -1 |      -1 |       -1 |    -1 |          18 |           -1 |         1 |           17 |             36
-(11 rows)
-
---q3
-ROLLBACK;
-ROLLBACK
diff --git a/src/pickDeliver/test/doc-pickDeliver.test.sql b/src/pickDeliver/test/doc-pickDeliver.test.sql
deleted file mode 100644
index 929591b..0000000
--- a/src/pickDeliver/test/doc-pickDeliver.test.sql
+++ /dev/null
@@ -1,28 +0,0 @@
-\echo --q1
-SELECT * FROM _pgr_pickDeliver(
-    'SELECT * FROM orders ORDER BY id',
-    'SELECT * from vehicles',
-    -- matrix query
-    'WITH
-    A AS (
-        SELECT p_node_id AS id, p_x AS x, p_y AS y FROM orders
-        UNION
-        SELECT d_node_id AS id, d_x, d_y FROM orders
-        UNION
-        SELECT start_node_id, start_x, start_y FROM vehicles
-    )
-    SELECT A.id AS start_vid, B.id AS end_vid, sqrt( (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y)) AS agg_cost
-    FROM A, A AS B WHERE A.id != B.id'
-    );
-
-\echo --q2
-
-SELECT * FROM _pgr_pickDeliver(
-    $$ SELECT * FROM orders ORDER BY id $$,
-    $$ SELECT * FROM vehicles $$,
-    $$ SELECT * from pgr_dijkstraCostMatrix(
-        ' SELECT * FROM edge_table ', ARRAY[3, 4, 5, 8, 9, 11]) 
-    $$
-);
-
-\echo --q3
diff --git a/src/pickDeliver/test/doc-pickDeliverEuclidean.result b/src/pickDeliver/test/doc-pickDeliverEuclidean.result
deleted file mode 100644
index 1971291..0000000
--- a/src/pickDeliver/test/doc-pickDeliverEuclidean.result
+++ /dev/null
@@ -1,27 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
---q1
-SELECT * FROM _pgr_pickDeliverEuclidean(
-    'SELECT * FROM orders ORDER BY id',
-    'SELECT * from vehicles'
-);
- seq | vehicle_seq | vehicle_id | stop_seq | stop_type | order_id | cargo |   travel_time    |   arrival_time   | wait_time | service_time |  departure_time  
------+-------------+------------+----------+-----------+----------+-------+------------------+------------------+-----------+--------------+------------------
-   1 |           1 |          1 |        1 |         1 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
-   2 |           1 |          1 |        2 |         2 |        3 |    30 |                1 |                1 |         1 |            3 |                5
-   3 |           1 |          1 |        3 |         3 |        3 |     0 |  1.4142135623731 | 6.41421356237309 |         0 |            3 |  9.4142135623731
-   4 |           1 |          1 |        4 |         2 |        2 |    20 |  1.4142135623731 | 10.8284271247462 |         0 |            2 | 12.8284271247462
-   5 |           1 |          1 |        5 |         3 |        2 |     0 |                1 | 13.8284271247462 |         0 |            3 | 16.8284271247462
-   6 |           1 |          1 |        6 |         6 |       -1 |     0 |  1.4142135623731 | 18.2426406871193 |         0 |            0 | 18.2426406871193
-   7 |           2 |          1 |        1 |         1 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
-   8 |           2 |          1 |        2 |         2 |        1 |    10 |                1 |                1 |         1 |            3 |                5
-   9 |           2 |          1 |        3 |         3 |        1 |     0 | 2.23606797749979 | 7.23606797749979 |         0 |            3 | 10.2360679774998
-  10 |           2 |          1 |        4 |         6 |       -1 |     0 |                2 | 12.2360679774998 |         0 |            0 | 12.2360679774998
-  11 |          -2 |          0 |        0 |        -1 |       -1 |    -1 | 11.4787086646191 |               -1 |         2 |           17 | 30.4787086646191
-(11 rows)
-
---q2
-ROLLBACK;
-ROLLBACK
diff --git a/src/pickDeliver/test/jet_customers.result b/src/pickDeliver/test/jet_customers.result
deleted file mode 100644
index b941e06..0000000
--- a/src/pickDeliver/test/jet_customers.result
+++ /dev/null
@@ -1,122 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
-CREATE TABLE jet_customers (
-    id integer,
-    x integer,
-    y integer,
-    pindex integer,
-    dindex integer,
-    demand integer,
-    opentime double precision,
-    closetime double precision,
-    servicetime double precision
-);
-CREATE TABLE
-CREATE TABLE stops (
-    iata_faa character varying(20),
-    x integer,
-    y integer,
-    longitude double precision,
-    latitude double precision
-);
-CREATE TABLE
-COPY jet_customers (id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) FROM stdin;
-COPY 29
-COPY stops (iata_faa, x, y, longitude, latitude) FROM stdin;
-COPY 8
-WITH
-pickups AS (
-    SELECT id, demand, x as p_x, y as p_y, opentime as p_open, closetime as p_close, servicetime as p_service
-    FROM  jet_customers WHERE pindex = 0 AND id != 0
-),
-deliveries AS (
-    SELECT pindex AS id, x as d_x, y as d_y, opentime as d_open, closetime as d_close, servicetime as d_service
-    FROM  jet_customers WHERE dindex = 0 AND id != 0
-)
-SELECT * INTO jet_orders
-FROM pickups JOIN deliveries USING(id) ORDER BY pickups.id;
-SELECT 14
-SELECT * FROM _pgr_pickDeliver(
-    'SELECT id, x, y, demand, opentime, closetime, servicetime, pindex, dindex
-     FROM jet_customers ORDER BY id', max_vehicles := 20, capacity:= 100, speed := 1000);
- seq | vehicle_id | vehicle_seq | stop_id |    travel_time    |   arrival_time    | wait_time | service_time |  departure_time  
------+------------+-------------+---------+-------------------+-------------------+-----------+--------------+------------------
-   1 |          1 |           1 |       0 |                 0 |                 0 |         0 |            0 |                0
-   2 |          1 |           2 |      27 | 0.617668195716762 | 0.617668195716762 |         0 |           30 | 30.6176681957168
-   3 |          1 |           3 |      25 |                 0 |  30.6176681957168 |         0 |           30 | 60.6176681957168
-   4 |          1 |           4 |      23 |                 0 |  60.6176681957168 |         0 |           30 | 90.6176681957168
-   5 |          1 |           5 |      26 | 0.714478831037001 |  91.3321470267538 |         0 |           30 | 121.332147026754
-   6 |          1 |           6 |      19 |                 0 |  121.332147026754 |         0 |           30 | 151.332147026754
-   7 |          1 |           7 |       7 | 0.587132864009502 |  151.919279890763 |         0 |           30 | 181.919279890763
-   8 |          1 |           8 |       5 |                 0 |  181.919279890763 |         0 |           30 | 211.919279890763
-   9 |          1 |           9 |       3 |                 0 |  211.919279890763 |         0 |           30 | 241.919279890763
-  10 |          1 |          10 |       1 |                 0 |  241.919279890763 |         0 |           30 | 271.919279890763
-  11 |          1 |          11 |      24 |  1.33232503541741 |  273.251604926181 |         0 |           30 | 303.251604926181
-  12 |          1 |          12 |      20 |                 0 |  303.251604926181 |         0 |           30 | 333.251604926181
-  13 |          1 |          13 |      12 |                 0 |  333.251604926181 |         0 |           30 | 363.251604926181
-  14 |          1 |          14 |       4 |                 0 |  363.251604926181 |         0 |           30 | 393.251604926181
-  15 |          1 |          15 |      21 |   1.7278440323131 |  394.979448958494 |         0 |           30 | 424.979448958494
-  16 |          1 |          16 |      17 |                 0 |  424.979448958494 |         0 |           30 | 454.979448958494
-  17 |          1 |          17 |       6 |                 0 |  454.979448958494 |         0 |           30 | 484.979448958494
-  18 |          1 |          18 |      15 | 0.415245710393256 |  485.394694668887 |         0 |           30 | 515.394694668887
-  19 |          1 |          19 |      13 |                 0 |  515.394694668887 |         0 |           30 | 545.394694668887
-  20 |          1 |          20 |      11 |                 0 |  545.394694668887 |         0 |           30 | 575.394694668887
-  21 |          1 |          21 |       9 |                 0 |  575.394694668887 |         0 |           30 | 605.394694668887
-  22 |          1 |          22 |      18 | 0.328105166067223 |  605.722799834954 |         0 |           30 | 635.722799834954
-  23 |          1 |          23 |      10 |                 0 |  635.722799834954 |         0 |           30 | 665.722799834954
-  24 |          1 |          24 |       2 |                 0 |  665.722799834954 |         0 |           30 | 695.722799834954
-  25 |          1 |          25 |      28 | 0.414019323220547 |  696.136819158175 |         0 |           30 | 726.136819158175
-  26 |          1 |          26 |      22 |                 0 |  726.136819158175 |         0 |           30 | 756.136819158175
-  27 |          1 |          27 |      16 |                 0 |  756.136819158175 |         0 |           30 | 786.136819158175
-  28 |          1 |          28 |       8 |                 0 |  786.136819158175 |         0 |           30 | 816.136819158175
-  29 |          1 |          29 |      14 | 0.409882910109704 |  816.546702068285 |         0 |           30 | 846.546702068285
-  30 |          1 |          30 |       0 | 0.117720006795786 |   846.66442207508 |         0 |            0 |  846.66442207508
-  31 |         -2 |           0 |       0 |  6.66442207508029 |                -1 |         0 |          840 |  846.66442207508
-(31 rows)
-
-SELECT * FROM _pgr_pickDeliverEuclidean(
-    'SELECT * FROM jet_orders ORDER BY id',
-    'SELECT 0 AS id,
-    2138 AS start_x, -119 AS start_y,
-    0 AS start_open, 60000 AS start_close,
-    100 AS capacity, 20 AS number, 1000 as speed',
-    30);
- seq | vehicle_number | vehicle_id | vehicle_seq | order_id | stop_type | cargo |    travel_time    |   arrival_time    | wait_time | service_time |  departure_time  
------+----------------+------------+-------------+----------+-----------+-------+-------------------+-------------------+-----------+--------------+------------------
-   1 |              1 |          0 |           1 |       -1 |         1 |     0 |                 0 |                 0 |         0 |            0 |                0
-   2 |              1 |          0 |           2 |       27 |         2 |     6 | 0.617668195716762 | 0.617668195716762 |         0 |           30 | 30.6176681957168
-   3 |              1 |          0 |           3 |       25 |         2 |    26 |                 0 |  30.6176681957168 |         0 |           30 | 60.6176681957168
-   4 |              1 |          0 |           4 |       23 |         2 |    40 |                 0 |  60.6176681957168 |         0 |           30 | 90.6176681957168
-   5 |              1 |          0 |           5 |       25 |         3 |    20 | 0.714478831037001 |  91.3321470267538 |         0 |           30 | 121.332147026754
-   6 |              1 |          0 |           6 |       19 |         2 |    36 |                 0 |  121.332147026754 |         0 |           30 | 151.332147026754
-   7 |              1 |          0 |           7 |        7 |         2 |    41 | 0.587132864009502 |  151.919279890763 |         0 |           30 | 181.919279890763
-   8 |              1 |          0 |           8 |        5 |         2 |    51 |                 0 |  181.919279890763 |         0 |           30 | 211.919279890763
-   9 |              1 |          0 |           9 |        3 |         2 |    68 |                 0 |  211.919279890763 |         0 |           30 | 241.919279890763
-  10 |              1 |          0 |          10 |        1 |         2 |    75 |                 0 |  241.919279890763 |         0 |           30 | 271.919279890763
-  11 |              1 |          0 |          11 |       23 |         3 |    61 |  1.33232503541741 |  273.251604926181 |         0 |           30 | 303.251604926181
-  12 |              1 |          0 |          12 |       19 |         3 |    45 |                 0 |  303.251604926181 |         0 |           30 | 333.251604926181
-  13 |              1 |          0 |          13 |       11 |         3 |    33 |                 0 |  333.251604926181 |         0 |           30 | 363.251604926181
-  14 |              1 |          0 |          14 |        3 |         3 |    16 |                 0 |  363.251604926181 |         0 |           30 | 393.251604926181
-  15 |              1 |          0 |          15 |       21 |         2 |    22 |   1.7278440323131 |  394.979448958494 |         0 |           30 | 424.979448958494
-  16 |              1 |          0 |          16 |       17 |         2 |    28 |                 0 |  424.979448958494 |         0 |           30 | 454.979448958494
-  17 |              1 |          0 |          17 |        5 |         3 |    18 |                 0 |  454.979448958494 |         0 |           30 | 484.979448958494
-  18 |              1 |          0 |          18 |       15 |         2 |    20 | 0.415245710393256 |  485.394694668887 |         0 |           30 | 515.394694668887
-  19 |              1 |          0 |          19 |       13 |         2 |    29 |                 0 |  515.394694668887 |         0 |           30 | 545.394694668887
-  20 |              1 |          0 |          20 |       11 |         2 |    41 |                 0 |  545.394694668887 |         0 |           30 | 575.394694668887
-  21 |              1 |          0 |          21 |        9 |         2 |    54 |                 0 |  575.394694668887 |         0 |           30 | 605.394694668887
-  22 |              1 |          0 |          22 |       17 |         3 |    48 | 0.328105166067223 |  605.722799834954 |         0 |           30 | 635.722799834954
-  23 |              1 |          0 |          23 |        9 |         3 |    35 |                 0 |  635.722799834954 |         0 |           30 | 665.722799834954
-  24 |              1 |          0 |          24 |        1 |         3 |    28 |                 0 |  665.722799834954 |         0 |           30 | 695.722799834954
-  25 |              1 |          0 |          25 |       27 |         3 |    22 | 0.414019323220547 |  696.136819158175 |         0 |           30 | 726.136819158175
-  26 |              1 |          0 |          26 |       21 |         3 |    16 |                 0 |  726.136819158175 |         0 |           30 | 756.136819158175
-  27 |              1 |          0 |          27 |       15 |         3 |    14 |                 0 |  756.136819158175 |         0 |           30 | 786.136819158175
-  28 |              1 |          0 |          28 |        7 |         3 |     9 |                 0 |  786.136819158175 |         0 |           30 | 816.136819158175
-  29 |              1 |          0 |          29 |       13 |         3 |     0 | 0.409882910109704 |  816.546702068285 |         0 |           30 | 846.546702068285
-  30 |              1 |          0 |          30 |       -1 |         6 |     0 | 0.117720006795786 |   846.66442207508 |         0 |            0 |  846.66442207508
-  31 |             -2 |          0 |           0 |       -1 |        -1 |    -1 |  6.66442207508029 |                -1 |         0 |          840 |  846.66442207508
-(31 rows)
-
-ROLLBACK;
-ROLLBACK
diff --git a/src/pickDeliver/test/jet_customers1.result b/src/pickDeliver/test/jet_customers1.result
deleted file mode 100644
index 7b7862a..0000000
--- a/src/pickDeliver/test/jet_customers1.result
+++ /dev/null
@@ -1,291 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
-CREATE TABLE jet_customers (
-    airport character varying,
-    id integer,
-    x double precision,
-    y double precision,
-    pindex integer,
-    dindex integer,
-    demand integer,
-    opentime double precision,
-    closetime double precision,
-    servicetime double precision
-);
-CREATE TABLE
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 1, 2320738.4688434978, 126348.38967116659, 0, 2, 4, 3448, 2853448, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 3, 2320738.4688434978, 126348.38967116659, 0, 4, 4, 3448, 2853448, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 5, 2320738.4688434978, 126348.38967116659, 0, 6, 4, 3448, 2853448, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 7, 2320738.4688434978, 126348.38967116659, 0, 8, 4, 3448, 2853448, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 9, 2320738.4688434978, 126348.38967116659, 0, 10, 4, 3448, 2853448, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 11, 2320738.4688434978, 126348.38967116659, 0, 12, 4, 3448, 2853448, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 13, 2383186.1525343237, 448251.25888828852, 0, 14, 4, 3463, 2853463, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 15, 2383186.1525343237, 448251.25888828852, 0, 16, 4, 3463, 2853463, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 17, 2383186.1525343237, 448251.25888828852, 0, 18, 4, 3463, 2853463, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 19, 2383186.1525343237, 448251.25888828852, 0, 20, 4, 3463, 2853463, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 21, 2383186.1525343237, 448251.25888828852, 0, 22, 4, 3463, 2853463, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 23, 2383186.1525343237, 448251.25888828852, 0, 24, 4, 3463, 2853463, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 25, 1981144.5525029898, -1903041.2384292425, 0, 26, 2, 3576, 2853576, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 27, 1981144.5525029898, -1903041.2384292425, 0, 28, 2, 3576, 2853576, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 29, 1981144.5525029898, -1903041.2384292425, 0, 30, 2, 3576, 2853576, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 31, 1981144.5525029898, -1903041.2384292425, 0, 32, 2, 3576, 2853576, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 33, 1981144.5525029898, -1903041.2384292425, 0, 34, 2, 3576, 2853576, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 35, 1981144.5525029898, -1903041.2384292425, 0, 36, 2, 3576, 2853576, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 37, 2138409.5568088419, -119451.50568778868, 0, 38, 5, 3624, 2853624, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 39, 2138409.5568088419, -119451.50568778868, 0, 40, 5, 3624, 2853624, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 41, 2138409.5568088419, -119451.50568778868, 0, 42, 5, 3624, 2853624, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 43, 2138409.5568088419, -119451.50568778868, 0, 44, 5, 3624, 2853624, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 45, 2138409.5568088419, -119451.50568778868, 0, 46, 5, 3624, 2853624, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 47, 2138409.5568088419, -119451.50568778868, 0, 48, 5, 3624, 2853624, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 49, 2387491.1007072991, 34459.351848672632, 0, 50, 1, 4265, 2854265, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 51, 2387491.1007072991, 34459.351848672632, 0, 52, 1, 4265, 2854265, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 53, 2387491.1007072991, 34459.351848672632, 0, 54, 1, 4265, 2854265, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 55, 2387491.1007072991, 34459.351848672632, 0, 56, 1, 4265, 2854265, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 57, 2387491.1007072991, 34459.351848672632, 0, 58, 1, 4265, 2854265, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 59, 2387491.1007072991, 34459.351848672632, 0, 60, 1, 4265, 2854265, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 61, 2035310.7411768832, -176076.78362264115, 0, 62, 1, 4355, 2854355, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 63, 2035310.7411768832, -176076.78362264115, 0, 64, 1, 4355, 2854355, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 65, 2035310.7411768832, -176076.78362264115, 0, 66, 1, 4355, 2854355, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 67, 2035310.7411768832, -176076.78362264115, 0, 68, 1, 4355, 2854355, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 69, 2035310.7411768832, -176076.78362264115, 0, 70, 1, 4355, 2854355, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 71, 2035310.7411768832, -176076.78362264115, 0, 72, 1, 4355, 2854355, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 2, 2320738.4688434978, 126348.38967116659, 1, 0, -4, 3448, 6903448, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 4, 2383186.1525343237, 448251.25888828852, 3, 0, -4, 3448, 6903448, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 6, 1981144.5525029898, -1903041.2384292425, 5, 0, -4, 3448, 6903448, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 8, 2138409.5568088419, -119451.50568778868, 7, 0, -4, 3448, 6903448, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 10, 2387491.1007072991, 34459.351848672632, 9, 0, -4, 3448, 6903448, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 12, 2035310.7411768832, -176076.78362264115, 11, 0, -4, 3448, 6903448, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 14, 2320738.4688434978, 126348.38967116659, 13, 0, -4, 3463, 6903463, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 16, 2383186.1525343237, 448251.25888828852, 15, 0, -4, 3463, 6903463, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 18, 1981144.5525029898, -1903041.2384292425, 17, 0, -4, 3463, 6903463, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 20, 2138409.5568088419, -119451.50568778868, 19, 0, -4, 3463, 6903463, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 22, 2387491.1007072991, 34459.351848672632, 21, 0, -4, 3463, 6903463, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 24, 2035310.7411768832, -176076.78362264115, 23, 0, -4, 3463, 6903463, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 26, 2320738.4688434978, 126348.38967116659, 25, 0, -2, 3576, 6903576, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 28, 2383186.1525343237, 448251.25888828852, 27, 0, -2, 3576, 6903576, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 30, 1981144.5525029898, -1903041.2384292425, 29, 0, -2, 3576, 6903576, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 32, 2138409.5568088419, -119451.50568778868, 31, 0, -2, 3576, 6903576, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 34, 2387491.1007072991, 34459.351848672632, 33, 0, -2, 3576, 6903576, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 36, 2035310.7411768832, -176076.78362264115, 35, 0, -2, 3576, 6903576, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 38, 2320738.4688434978, 126348.38967116659, 37, 0, -5, 3624, 6903624, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 40, 2383186.1525343237, 448251.25888828852, 39, 0, -5, 3624, 6903624, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 42, 1981144.5525029898, -1903041.2384292425, 41, 0, -5, 3624, 6903624, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 44, 2138409.5568088419, -119451.50568778868, 43, 0, -5, 3624, 6903624, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 46, 2387491.1007072991, 34459.351848672632, 45, 0, -5, 3624, 6903624, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 48, 2035310.7411768832, -176076.78362264115, 47, 0, -5, 3624, 6903624, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 50, 2320738.4688434978, 126348.38967116659, 49, 0, -1, 4265, 6904265, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 52, 2383186.1525343237, 448251.25888828852, 51, 0, -1, 4265, 6904265, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 54, 1981144.5525029898, -1903041.2384292425, 53, 0, -1, 4265, 6904265, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 56, 2138409.5568088419, -119451.50568778868, 55, 0, -1, 4265, 6904265, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 58, 2387491.1007072991, 34459.351848672632, 57, 0, -1, 4265, 6904265, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 60, 2035310.7411768832, -176076.78362264115, 59, 0, -1, 4265, 6904265, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 62, 2320738.4688434978, 126348.38967116659, 61, 0, -1, 4355, 6904355, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 64, 2383186.1525343237, 448251.25888828852, 63, 0, -1, 4355, 6904355, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 66, 1981144.5525029898, -1903041.2384292425, 65, 0, -1, 4355, 6904355, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 68, 2138409.5568088419, -119451.50568778868, 67, 0, -1, 4355, 6904355, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 70, 2387491.1007072991, 34459.351848672632, 69, 0, -1, 4355, 6904355, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 72, 2035310.7411768832, -176076.78362264115, 71, 0, -1, 4355, 6904355, 450000);
-INSERT 0 1
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 0, 2138409.5568088419, -119451.50568778868, 0, 0, 0, 0, 7200000, 0);
-INSERT 0 1
-WITH                      
-customer_data AS (SELECT * FROM jet_customers),
-pickups AS (
-    SELECT id, demand, x as p_x, y as p_y, opentime as p_open, closetime as p_close, servicetime as p_service
-    FROM  customer_data WHERE pindex = 0 AND id != 0
-),
-deliveries AS (
-    SELECT pindex AS id, x as d_x, y as d_y, opentime as d_open, closetime as d_close, servicetime as d_service
-    FROM  customer_data WHERE dindex = 0 AND id != 0
-)
-SELECT * INTO jet_orders FROM pickups JOIN deliveries USING(id) ORDER BY pickups.id;
-SELECT 36
-WITH
-customer_data AS (select * from jet_customers)
-SELECT id, x AS start_x, y AS start_y,
-    opentime AS start_open, closetime AS start_close, 
-    5 AS capacity,  10  AS number INTO jet_vehicles
-FROM customer_data WHERE id = 0 LIMIT 1;
-SELECT 1
-SELECT *
-FROM _pgr_pickDeliverEuclidean(
-    $$ SELECT * from jet_orders $$,
-    $$ SELECT * FROM jet_vehicles $$
-)
-ROLLBACK;
- seq | vehicle_number | vehicle_id | vehicle_seq | order_id | stop_type | cargo |   travel_time    |   arrival_time   | wait_time | service_time |  departure_time  
------+----------------+------------+-------------+----------+-----------+-------+------------------+------------------+-----------+--------------+------------------
-   1 |              1 |          0 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
-   2 |              1 |          0 |           2 |       43 |         2 |     5 |                0 |                0 |      3624 |       450000 |           453624
-   3 |              1 |          0 |           3 |       43 |         3 |     0 |                0 |           453624 |         0 |       450000 |           903624
-   4 |              1 |          0 |           4 |       47 |         2 |     5 |                0 |           903624 |         0 |       450000 |          1353624
-   5 |              1 |          0 |           5 |       67 |         3 |     4 |                0 |          1353624 |         0 |       450000 |          1803624
-   6 |              1 |          0 |           6 |       67 |         2 |     5 |  117625.62597458 | 1921249.62597458 |         0 |       450000 | 2371249.62597458
-   7 |              1 |          0 |           7 |       47 |         3 |     0 |                0 | 2371249.62597458 |         0 |       450000 | 2821249.62597458
-   8 |              1 |          0 |           8 |       -1 |         6 |     0 |  117625.62597458 | 2938875.25194916 |         0 |            0 | 2938875.25194916
-   9 |              2 |          0 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
-  10 |              2 |          0 |           2 |       21 |         2 |     4 | 618224.886851279 | 618224.886851279 |         0 |       450000 | 1068224.88685128
-  11 |              2 |          0 |           3 |       51 |         3 |     3 |                0 | 1068224.88685128 |         0 |       450000 | 1518224.88685128
-  12 |              2 |          0 |           4 |       55 |         2 |     4 |  413814.30003113 | 1932039.18688241 |         0 |       450000 | 2382039.18688241
-  13 |              2 |          0 |           5 |       51 |         2 |     5 |                0 | 2382039.18688241 |         0 |       450000 | 2832039.18688241
-  14 |              2 |          0 |           6 |       21 |         3 |     1 |                0 | 2832039.18688241 |         0 |       450000 | 3282039.18688241
-  15 |              2 |          0 |           7 |       55 |         3 |     0 | 292797.144074952 | 3574836.33095736 |         0 |       450000 | 4024836.33095736
-  16 |              2 |          0 |           8 |       -1 |         6 |     0 |                0 | 4024836.33095736 |         0 |            0 | 4024836.33095736
-  17 |              3 |          0 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
-  18 |              3 |          0 |           2 |        3 |         2 |     4 | 306041.534309013 | 306041.534309013 |         0 |       450000 | 756041.534309013
-  19 |              3 |          0 |           3 |       13 |         3 |     0 |                0 | 756041.534309013 |         0 |       450000 | 1206041.53430901
-  20 |              3 |          0 |           4 |       13 |         2 |     4 | 327904.209196169 | 1533945.74350518 |         0 |       450000 | 1983945.74350518
-  21 |              3 |          0 |           5 |        3 |         3 |     0 |                0 | 1983945.74350518 |         0 |       450000 | 2433945.74350518
-  22 |              3 |          0 |           6 |        7 |         2 |     4 | 327904.209196169 | 2761849.95270135 |         0 |       450000 | 3211849.95270135
-  23 |              3 |          0 |           7 |        7 |         3 |     0 | 306041.534309013 | 3517891.48701036 |         0 |       450000 | 3967891.48701036
-  24 |              3 |          0 |           8 |       -1 |         6 |     0 |                0 | 3967891.48701036 |         0 |            0 | 3967891.48701036
-  25 |              4 |          0 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
-  26 |              4 |          0 |           2 |       39 |         2 |     5 |                0 |                0 |      3624 |       450000 |           453624
-  27 |              4 |          0 |           3 |       15 |         3 |     1 | 618224.886851279 | 1071848.88685128 |         0 |       450000 | 1521848.88685128
-  28 |              4 |          0 |           4 |       15 |         2 |     5 |                0 | 1521848.88685128 |         0 |       450000 | 1971848.88685128
-  29 |              4 |          0 |           5 |       39 |         3 |     0 |                0 | 1971848.88685128 |         0 |       450000 | 2421848.88685128
-  30 |              4 |          0 |           6 |       -1 |         6 |     0 | 618224.886851279 | 3040073.77370256 |         0 |            0 | 3040073.77370256
-  31 |              5 |          0 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
-  32 |              5 |          0 |           2 |       37 |         2 |     5 |                0 |                0 |      3624 |       450000 |           453624
-  33 |              5 |          0 |           3 |        9 |         3 |     1 | 292797.144074952 | 746421.144074952 |         0 |       450000 | 1196421.14407495
-  34 |              5 |          0 |           4 |        9 |         2 |     5 | 113576.005972599 | 1309997.15004755 |         0 |       450000 | 1759997.15004755
-  35 |              5 |          0 |           5 |        1 |         3 |     1 |                0 | 1759997.15004755 |         0 |       450000 | 2209997.15004755
-  36 |              5 |          0 |           6 |        1 |         2 |     5 |                0 | 2209997.15004755 |         0 |       450000 | 2659997.15004755
-  37 |              5 |          0 |           7 |       37 |         3 |     0 |                0 | 2659997.15004755 |         0 |       450000 | 3109997.15004755
-  38 |              5 |          0 |           8 |       -1 |         6 |     0 | 306041.534309013 | 3416038.68435656 |         0 |            0 | 3416038.68435656
-  39 |              6 |          0 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
-  40 |              6 |          0 |           2 |       45 |         2 |     5 |                0 |                0 |      3624 |       450000 |           453624
-  41 |              6 |          0 |           3 |       57 |         3 |     4 | 292797.144074952 | 746421.144074952 |         0 |       450000 | 1196421.14407495
-  42 |              6 |          0 |           4 |       57 |         2 |     5 |                0 | 1196421.14407495 |         0 |       450000 | 1646421.14407495
-  43 |              6 |          0 |           5 |       45 |         3 |     0 |                0 | 1646421.14407495 |         0 |       450000 | 2096421.14407495
-  44 |              6 |          0 |           6 |       -1 |         6 |     0 | 292797.144074952 |  2389218.2881499 |         0 |            0 |  2389218.2881499
-  45 |              7 |          0 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
-  46 |              7 |          0 |           2 |       31 |         2 |     2 | 1790509.59682434 | 1790509.59682434 |         0 |       450000 | 2240509.59682434
-  47 |              7 |          0 |           3 |       27 |         2 |     4 |                0 | 2240509.59682434 |         0 |       450000 | 2690509.59682434
-  48 |              7 |          0 |           4 |       27 |         3 |     2 | 2385416.91452406 | 5075926.51134839 |         0 |       450000 | 5525926.51134839
-  49 |              7 |          0 |           5 |       31 |         3 |     0 | 618224.886851279 | 6144151.39819967 |         0 |       450000 | 6594151.39819967
-  50 |              7 |          0 |           6 |       -1 |         6 |     0 |                0 | 6594151.39819967 |         0 |            0 | 6594151.39819967
-  51 |              8 |          0 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
-  52 |              8 |          0 |           2 |       65 |         2 |     1 |  117625.62597458 |  117625.62597458 |         0 |       450000 |  567625.62597458
-  53 |              8 |          0 |           3 |       29 |         2 |     3 | 1727813.70643971 | 2295439.33241429 |         0 |       450000 | 2745439.33241429
-  54 |              8 |          0 |           4 |       35 |         2 |     5 |                0 | 2745439.33241429 |         0 |       450000 | 3195439.33241429
-  55 |              8 |          0 |           5 |       29 |         3 |     3 |                0 | 3195439.33241429 |         0 |       450000 | 3645439.33241429
-  56 |              8 |          0 |           6 |       65 |         3 |     2 |                0 | 3645439.33241429 |         0 |       450000 | 4095439.33241429
-  57 |              8 |          0 |           7 |       35 |         3 |     0 | 1727813.70643971 | 5823253.03885399 |         0 |       450000 | 6273253.03885399
-  58 |              8 |          0 |           8 |       -1 |         6 |     0 |  117625.62597458 | 6390878.66482857 |         0 |            0 | 6390878.66482857
-  59 |              9 |          0 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
-  60 |              9 |          0 |           2 |       61 |         2 |     1 |  117625.62597458 |  117625.62597458 |         0 |       450000 |  567625.62597458
-  61 |              9 |          0 |           3 |       33 |         2 |     3 | 1727813.70643971 | 2295439.33241429 |         0 |       450000 | 2745439.33241429
-  62 |              9 |          0 |           4 |       25 |         2 |     5 |                0 | 2745439.33241429 |         0 |       450000 | 3195439.33241429
-  63 |              9 |          0 |           5 |       33 |         3 |     3 | 1979653.01367811 |  5175092.3460924 |         0 |       450000 |  5625092.3460924
-  64 |              9 |          0 |           6 |       25 |         3 |     1 | 113576.005972599 |   5738668.352065 |         0 |       450000 |   6188668.352065
-  65 |              9 |          0 |           7 |       61 |         3 |     0 |                0 |   6188668.352065 |         0 |       450000 |   6638668.352065
-  66 |              9 |          0 |           8 |       -1 |         6 |     0 | 306041.534309013 | 6944709.88637401 |         0 |            0 | 6944709.88637401
-  67 |             10 |          0 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
-  68 |             10 |          0 |           2 |       63 |         2 |     1 |  117625.62597458 |  117625.62597458 |         0 |       450000 |  567625.62597458
-  69 |             10 |          0 |           3 |       59 |         3 |     0 |                0 |  567625.62597458 |         0 |       450000 | 1017625.62597458
-  70 |             10 |          0 |           4 |       59 |         2 |     1 | 410312.649059432 | 1427938.27503401 |         0 |       450000 | 1877938.27503401
-  71 |             10 |          0 |           5 |       19 |         2 |     5 |  413814.30003113 | 2291752.57506514 |         0 |       450000 | 2741752.57506514
-  72 |             10 |          0 |           6 |       63 |         3 |     4 |                0 | 2741752.57506514 |         0 |       450000 | 3191752.57506514
-  73 |             10 |          0 |           7 |       19 |         3 |     0 | 618224.886851279 | 3809977.46191642 |         0 |       450000 | 4259977.46191642
-  74 |             10 |          0 |           8 |       -1 |         6 |     0 |                0 | 4259977.46191642 |         0 |            0 | 4259977.46191642
-  75 |             11 |         -1 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
-  76 |             11 |         -1 |           2 |        5 |         2 |     4 | 306041.534309013 | 306041.534309013 |         0 |       450000 | 756041.534309013
-  77 |             11 |         -1 |           3 |       49 |         3 |     3 |                0 | 756041.534309013 |         0 |       450000 | 1206041.53430901
-  78 |             11 |         -1 |           4 |       49 |         2 |     4 | 113576.005972599 | 1319617.54028161 |         0 |       450000 | 1769617.54028161
-  79 |             11 |         -1 |           5 |       53 |         2 |     5 |                0 | 1769617.54028161 |         0 |       450000 | 2219617.54028161
-  80 |             11 |         -1 |           6 |        5 |         3 |     1 | 1979653.01367811 | 4199270.55395972 |         0 |       450000 | 4649270.55395972
-  81 |             11 |         -1 |           7 |       53 |         3 |     0 |                0 | 4649270.55395972 |         0 |       450000 | 5099270.55395972
-  82 |             11 |         -1 |           8 |       -1 |         6 |     0 | 1790509.59682434 | 6889780.15078406 |         0 |            0 | 6889780.15078406
-  83 |             12 |         -1 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
-  84 |             12 |         -1 |           2 |       71 |         2 |     1 |  117625.62597458 |  117625.62597458 |         0 |       450000 |  567625.62597458
-  85 |             12 |         -1 |           3 |       71 |         3 |     0 |                0 |  567625.62597458 |         0 |       450000 | 1017625.62597458
-  86 |             12 |         -1 |           4 |       69 |         2 |     1 |                0 | 1017625.62597458 |         0 |       450000 | 1467625.62597458
-  87 |             12 |         -1 |           5 |       69 |         3 |     0 | 410312.649059432 | 1877938.27503401 |         0 |       450000 | 2327938.27503401
-  88 |             12 |         -1 |           6 |       -1 |         6 |     0 | 292797.144074952 | 2620735.41910896 |         0 |            0 | 2620735.41910896
-  89 |             13 |         -1 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
-  90 |             13 |         -1 |           2 |       41 |         2 |     5 |                0 |                0 |      3624 |       450000 |           453624
-  91 |             13 |         -1 |           3 |       11 |         2 |     9 | 306041.534309013 | 759665.534309013 |         0 |       450000 | 1209665.53430901
-  92 |             13 |         -1 |           4 |       23 |         2 |    13 | 327904.209196169 | 1537569.74350518 |         0 |       450000 | 1987569.74350518
-  93 |             13 |         -1 |           5 |       17 |         2 |    17 |                0 | 1987569.74350518 |         0 |       450000 | 2437569.74350518
-  94 |             13 |         -1 |           6 |       23 |         3 |    13 | 714704.698804085 | 3152274.44230927 |         0 |       450000 | 3602274.44230927
-  95 |             13 |         -1 |           7 |       11 |         3 |     9 |                0 | 3602274.44230927 |         0 |       450000 | 4052274.44230927
-  96 |             13 |         -1 |           8 |       41 |         3 |     4 | 1727813.70643971 | 5780088.14874897 |         0 |       450000 | 6230088.14874897
-  97 |             13 |         -1 |           9 |       17 |         3 |     0 |                0 | 6230088.14874897 |         0 |       450000 | 6680088.14874897
-  98 |             13 |         -1 |          10 |       -1 |         6 |     0 | 1790509.59682434 | 8470597.74557331 |         0 |            0 | 8470597.74557331
-  99 |             -2 |          0 |           0 |       -1 |        -1 |    -1 | 29529644.5429109 |               -1 |     18120 |     32400000 | 61947764.5429109
-(99 rows)
-
diff --git a/src/pickDeliver/test/jet_customers1.test.sql b/src/pickDeliver/test/jet_customers1.test.sql
deleted file mode 100644
index 771875c..0000000
--- a/src/pickDeliver/test/jet_customers1.test.sql
+++ /dev/null
@@ -1,120 +0,0 @@
-
--- drop table if exists jet_customers;
--- drop table if exists jet_orders;
--- drop table if exists jet_vehicles;
-
-
-CREATE TABLE jet_customers (
-    airport character varying,
-    id integer,
-    x double precision,
-    y double precision,
-    pindex integer,
-    dindex integer,
-    demand integer,
-    opentime double precision,
-    closetime double precision,
-    servicetime double precision
-);
-
-
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 1, 2320738.4688434978, 126348.38967116659, 0, 2, 4, 3448, 2853448, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 3, 2320738.4688434978, 126348.38967116659, 0, 4, 4, 3448, 2853448, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 5, 2320738.4688434978, 126348.38967116659, 0, 6, 4, 3448, 2853448, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 7, 2320738.4688434978, 126348.38967116659, 0, 8, 4, 3448, 2853448, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 9, 2320738.4688434978, 126348.38967116659, 0, 10, 4, 3448, 2853448, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 11, 2320738.4688434978, 126348.38967116659, 0, 12, 4, 3448, 2853448, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 13, 2383186.1525343237, 448251.25888828852, 0, 14, 4, 3463, 2853463, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 15, 2383186.1525343237, 448251.25888828852, 0, 16, 4, 3463, 2853463, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 17, 2383186.1525343237, 448251.25888828852, 0, 18, 4, 3463, 2853463, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 19, 2383186.1525343237, 448251.25888828852, 0, 20, 4, 3463, 2853463, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 21, 2383186.1525343237, 448251.25888828852, 0, 22, 4, 3463, 2853463, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 23, 2383186.1525343237, 448251.25888828852, 0, 24, 4, 3463, 2853463, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 25, 1981144.5525029898, -1903041.2384292425, 0, 26, 2, 3576, 2853576, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 27, 1981144.5525029898, -1903041.2384292425, 0, 28, 2, 3576, 2853576, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 29, 1981144.5525029898, -1903041.2384292425, 0, 30, 2, 3576, 2853576, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 31, 1981144.5525029898, -1903041.2384292425, 0, 32, 2, 3576, 2853576, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 33, 1981144.5525029898, -1903041.2384292425, 0, 34, 2, 3576, 2853576, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 35, 1981144.5525029898, -1903041.2384292425, 0, 36, 2, 3576, 2853576, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 37, 2138409.5568088419, -119451.50568778868, 0, 38, 5, 3624, 2853624, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 39, 2138409.5568088419, -119451.50568778868, 0, 40, 5, 3624, 2853624, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 41, 2138409.5568088419, -119451.50568778868, 0, 42, 5, 3624, 2853624, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 43, 2138409.5568088419, -119451.50568778868, 0, 44, 5, 3624, 2853624, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 45, 2138409.5568088419, -119451.50568778868, 0, 46, 5, 3624, 2853624, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 47, 2138409.5568088419, -119451.50568778868, 0, 48, 5, 3624, 2853624, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 49, 2387491.1007072991, 34459.351848672632, 0, 50, 1, 4265, 2854265, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 51, 2387491.1007072991, 34459.351848672632, 0, 52, 1, 4265, 2854265, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 53, 2387491.1007072991, 34459.351848672632, 0, 54, 1, 4265, 2854265, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 55, 2387491.1007072991, 34459.351848672632, 0, 56, 1, 4265, 2854265, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 57, 2387491.1007072991, 34459.351848672632, 0, 58, 1, 4265, 2854265, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 59, 2387491.1007072991, 34459.351848672632, 0, 60, 1, 4265, 2854265, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 61, 2035310.7411768832, -176076.78362264115, 0, 62, 1, 4355, 2854355, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 63, 2035310.7411768832, -176076.78362264115, 0, 64, 1, 4355, 2854355, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 65, 2035310.7411768832, -176076.78362264115, 0, 66, 1, 4355, 2854355, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 67, 2035310.7411768832, -176076.78362264115, 0, 68, 1, 4355, 2854355, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 69, 2035310.7411768832, -176076.78362264115, 0, 70, 1, 4355, 2854355, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 71, 2035310.7411768832, -176076.78362264115, 0, 72, 1, 4355, 2854355, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 2, 2320738.4688434978, 126348.38967116659, 1, 0, -4, 3448, 6903448, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 4, 2383186.1525343237, 448251.25888828852, 3, 0, -4, 3448, 6903448, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 6, 1981144.5525029898, -1903041.2384292425, 5, 0, -4, 3448, 6903448, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 8, 2138409.5568088419, -119451.50568778868, 7, 0, -4, 3448, 6903448, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 10, 2387491.1007072991, 34459.351848672632, 9, 0, -4, 3448, 6903448, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 12, 2035310.7411768832, -176076.78362264115, 11, 0, -4, 3448, 6903448, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 14, 2320738.4688434978, 126348.38967116659, 13, 0, -4, 3463, 6903463, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 16, 2383186.1525343237, 448251.25888828852, 15, 0, -4, 3463, 6903463, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 18, 1981144.5525029898, -1903041.2384292425, 17, 0, -4, 3463, 6903463, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 20, 2138409.5568088419, -119451.50568778868, 19, 0, -4, 3463, 6903463, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 22, 2387491.1007072991, 34459.351848672632, 21, 0, -4, 3463, 6903463, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 24, 2035310.7411768832, -176076.78362264115, 23, 0, -4, 3463, 6903463, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 26, 2320738.4688434978, 126348.38967116659, 25, 0, -2, 3576, 6903576, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 28, 2383186.1525343237, 448251.25888828852, 27, 0, -2, 3576, 6903576, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 30, 1981144.5525029898, -1903041.2384292425, 29, 0, -2, 3576, 6903576, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 32, 2138409.5568088419, -119451.50568778868, 31, 0, -2, 3576, 6903576, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 34, 2387491.1007072991, 34459.351848672632, 33, 0, -2, 3576, 6903576, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 36, 2035310.7411768832, -176076.78362264115, 35, 0, -2, 3576, 6903576, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 38, 2320738.4688434978, 126348.38967116659, 37, 0, -5, 3624, 6903624, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 40, 2383186.1525343237, 448251.25888828852, 39, 0, -5, 3624, 6903624, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 42, 1981144.5525029898, -1903041.2384292425, 41, 0, -5, 3624, 6903624, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 44, 2138409.5568088419, -119451.50568778868, 43, 0, -5, 3624, 6903624, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 46, 2387491.1007072991, 34459.351848672632, 45, 0, -5, 3624, 6903624, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 48, 2035310.7411768832, -176076.78362264115, 47, 0, -5, 3624, 6903624, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 50, 2320738.4688434978, 126348.38967116659, 49, 0, -1, 4265, 6904265, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 52, 2383186.1525343237, 448251.25888828852, 51, 0, -1, 4265, 6904265, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 54, 1981144.5525029898, -1903041.2384292425, 53, 0, -1, 4265, 6904265, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 56, 2138409.5568088419, -119451.50568778868, 55, 0, -1, 4265, 6904265, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 58, 2387491.1007072991, 34459.351848672632, 57, 0, -1, 4265, 6904265, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 60, 2035310.7411768832, -176076.78362264115, 59, 0, -1, 4265, 6904265, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 62, 2320738.4688434978, 126348.38967116659, 61, 0, -1, 4355, 6904355, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 64, 2383186.1525343237, 448251.25888828852, 63, 0, -1, 4355, 6904355, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 66, 1981144.5525029898, -1903041.2384292425, 65, 0, -1, 4355, 6904355, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 68, 2138409.5568088419, -119451.50568778868, 67, 0, -1, 4355, 6904355, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 70, 2387491.1007072991, 34459.351848672632, 69, 0, -1, 4355, 6904355, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 72, 2035310.7411768832, -176076.78362264115, 71, 0, -1, 4355, 6904355, 450000);
-INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 0, 2138409.5568088419, -119451.50568778868, 0, 0, 0, 0, 7200000, 0);
-
-
--- converting data to use euclidean
-WITH                      
-customer_data AS (SELECT * FROM jet_customers),
-pickups AS (
-    SELECT id, demand, x as p_x, y as p_y, opentime as p_open, closetime as p_close, servicetime as p_service
-    FROM  customer_data WHERE pindex = 0 AND id != 0
-),
-deliveries AS (
-    SELECT pindex AS id, x as d_x, y as d_y, opentime as d_open, closetime as d_close, servicetime as d_service
-    FROM  customer_data WHERE dindex = 0 AND id != 0
-)
-SELECT * INTO jet_orders FROM pickups JOIN deliveries USING(id) ORDER BY pickups.id;
-
-WITH
-customer_data AS (select * from jet_customers)
-SELECT id, x AS start_x, y AS start_y,
-    opentime AS start_open, closetime AS start_close, 
-    5 AS capacity,  10  AS number INTO jet_vehicles
-FROM customer_data WHERE id = 0 LIMIT 1;
-
-SELECT *
-FROM _pgr_pickDeliverEuclidean(
-    $$ SELECT * from jet_orders $$,
-    $$ SELECT * FROM jet_vehicles $$
-)
diff --git a/src/pickDeliver/test/notTestingYet/pickDeliver-innerquery.sql b/src/pickDeliver/test/notTestingYet/pickDeliver-innerquery.sql
deleted file mode 100644
index b7e7d9a..0000000
--- a/src/pickDeliver/test/notTestingYet/pickDeliver-innerquery.sql
+++ /dev/null
@@ -1,391 +0,0 @@
-\i setup.sql
-
-SELECT plan(122);
-
-SELECT todo_start('not ready yet');
-
-/* A call looks like this
-SELECT * INTO pickDeliverResults FROM _pgr_pickdeliver(
-    $$SELECT * FROM orders ORDER BY id$$,
-    $$SELECT * FROM vehicles ORDER BY id$$,
-    $$SELECT * FROM dist_matrix$$,
-    30);
-*/
-
-SELECT has_function('_pgr_pickdeliver',
-    ARRAY['text', 'text', 'text', 'integer']);
-
-SELECT function_returns('_pgr_pickdeliver',
-    ARRAY['text', 'text', 'text', 'integer'],
-    'setof record');
-
-/* testing the pick/deliver orders*/
-CREATE OR REPLACE FUNCTION test_anyInteger_orders(fn TEXT, params TEXT[], parameter TEXT) 
-RETURNS SETOF TEXT AS
-$BODY$
-DECLARE
-start_sql TEXT;
-end_sql TEXT;
-query TEXT;
-p TEXT;
-BEGIN
-    start_sql = 'select * from ' || fn || '($$ SELECT ';
-    FOREACH  p IN ARRAY params LOOP
-        IF p = parameter THEN CONTINUE;
-        END IF;
-        start_sql = start_sql || p || ', ';
-    END LOOP;
-    end_sql = ' FROM orders WHERE id = 11$$,
-        $$SELECT * FROM vehicles ORDER BY id$$,
-        $$SELECT * FROM dist_matrix$$,
-        30)';
-    
-    query := start_sql || parameter || '::SMALLINT ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-    
-    query := start_sql || parameter || '::INTEGER ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-    
-    query := start_sql || parameter || '::BIGINT ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-
-    query := start_sql || parameter || '::REAL ' || end_sql;
-    RETURN query SELECT throws_ok(query);
-
-    query := start_sql || parameter || '::FLOAT8 ' || end_sql;
-    RETURN query SELECT throws_ok(query);
-END;
-$BODY$ LANGUAGE plpgsql;
-
-/* testing the pick/deliver orders*/
-CREATE OR REPLACE FUNCTION test_anyNumerical_orders(fn TEXT, params TEXT[], parameter TEXT) 
-RETURNS SETOF TEXT AS
-$BODY$
-DECLARE
-start_sql TEXT;
-end_sql TEXT;
-query TEXT;
-p TEXT;
-BEGIN
-    start_sql = 'select * from ' || fn || '($$ SELECT ';
-    FOREACH  p IN ARRAY params LOOP
-        IF p = parameter THEN CONTINUE;
-        END IF;
-        start_sql = start_sql || p || ', ';
-    END LOOP;
-    end_sql = ' FROM orders WHERE id = 11$$,
-        $$SELECT * FROM vehicles ORDER BY id$$,
-        $$SELECT * FROM dist_matrix$$,
-        30)';
-    
-    query := start_sql || parameter || '::SMALLINT ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-    
-    query := start_sql || parameter || '::INTEGER ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-    
-    query := start_sql || parameter || '::BIGINT ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-
-    query := start_sql || parameter || '::REAL ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-
-    query := start_sql || parameter || '::FLOAT8 ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-END;
-$BODY$ LANGUAGE plpgsql;
-
-/*
-testing the pick/deliver vehicles
-*/
-CREATE OR REPLACE FUNCTION test_anyInteger_vehicles(fn TEXT, params TEXT[], parameter TEXT)
-RETURNS SETOF TEXT AS
-$BODY$
-DECLARE
-start_sql TEXT;
-end_sql TEXT;
-query TEXT;
-p TEXT;
-BEGIN
-    start_sql = 'SELECT * FROM ' || fn || '($$ SELECT * FROM orders WHERE id = 11$$, $$SELECT ';
-
-    FOREACH  p IN ARRAY params LOOP
-        IF p = parameter THEN CONTINUE;
-        END IF;
-        start_sql = start_sql || p || ', ';
-    END LOOP;
-    end_sql = ' FROM vehicles $$,
-        $$SELECT * FROM dist_matrix$$,
-        30)';
-
-    query := start_sql || parameter || '::SMALLINT ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-
-    query := start_sql || parameter || '::INTEGER ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-
-    query := start_sql || parameter || '::BIGINT ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-
-    query := start_sql || parameter || '::REAL ' || end_sql;
-    RETURN query SELECT throws_ok(query);
-
-    query := start_sql || parameter || '::FLOAT8 ' || end_sql;
-    RETURN query SELECT throws_ok(query);
-END;
-$BODY$ LANGUAGE plpgsql;
-
-/*
-testing the pick/deliver vehicles
- */
-CREATE OR REPLACE FUNCTION test_anyNumerical_vehicles(fn TEXT, params TEXT[], parameter TEXT)
-RETURNS SETOF TEXT AS
-$BODY$
-DECLARE
-start_sql TEXT;
-end_sql TEXT;
-query TEXT;
-p TEXT;
-BEGIN
-    start_sql = 'SELECT * FROM ' || fn || '($$ SELECT * FROM orders WHERE id = 11$$, $$ SELECT ';
-    FOREACH  p IN ARRAY params LOOP
-        IF p = parameter THEN CONTINUE;
-        END IF;
-        start_sql = start_sql || p || ', ';
-    END LOOP;
-    end_sql = ' FROM vehicles $$,
-        $$SELECT * FROM dist_matrix$$,
-        30)';
-
-    query := start_sql || parameter || '::SMALLINT ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-
-    query := start_sql || parameter || '::INTEGER ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-
-    query := start_sql || parameter || '::BIGINT ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-
-    query := start_sql || parameter || '::REAL ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-
-    query := start_sql || parameter || '::FLOAT8 ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-END;
-$BODY$ LANGUAGE plpgsql;
-
-
-/*
-testing the pick/deliver matrix
-*/
-CREATE OR REPLACE FUNCTION test_anyInteger_matrix(fn TEXT, params TEXT[], parameter TEXT)
-RETURNS SETOF TEXT AS
-$BODY$
-DECLARE
-start_sql TEXT;
-end_sql TEXT;
-query TEXT;
-p TEXT;
-BEGIN
-    start_sql = 'SELECT * FROM ' || fn || '(
-        $$ SELECT * FROM orders WHERE id = 11$$,
-        $$ SELECT * FROM vehicles $$,
-        $$ SELECT ';
-
-    FOREACH  p IN ARRAY params LOOP
-        IF p = parameter THEN CONTINUE;
-        END IF;
-        start_sql = start_sql || p || ', ';
-    END LOOP;
-    end_sql = ' FROM dist_matrix $$,
-        30)';
-
-    query := start_sql || parameter || '::SMALLINT ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-
-    query := start_sql || parameter || '::INTEGER ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-
-    query := start_sql || parameter || '::BIGINT ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-
-    query := start_sql || parameter || '::REAL ' || end_sql;
-    RETURN query SELECT throws_ok(query);
-
-    query := start_sql || parameter || '::FLOAT8 ' || end_sql;
-    RETURN query SELECT throws_ok(query);
-END;
-$BODY$ LANGUAGE plpgsql;
-
-/*
-testing the pick/deliver vehicles
- */
-CREATE OR REPLACE FUNCTION test_anyNumerical_matrix(fn TEXT, params TEXT[], parameter TEXT)
-RETURNS SETOF TEXT AS
-$BODY$
-DECLARE
-start_sql TEXT;
-end_sql TEXT;
-query TEXT;
-p TEXT;
-BEGIN
-    start_sql = 'SELECT * FROM ' || fn || '(
-        $$ SELECT * FROM orders WHERE id = 11$$,
-        $$ SELECT * FROM vehicles $$,
-        $$ SELECT ';
-
-    FOREACH  p IN ARRAY params LOOP
-        IF p = parameter THEN CONTINUE;
-        END IF;
-        start_sql = start_sql || p || ', ';
-    END LOOP;
-    end_sql = ' FROM dist_matrix $$,
-        30)';
-
-    query := start_sql || parameter || '::SMALLINT ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-
-    query := start_sql || parameter || '::INTEGER ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-
-    query := start_sql || parameter || '::BIGINT ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-
-    query := start_sql || parameter || '::REAL ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-
-    query := start_sql || parameter || '::FLOAT8 ' || end_sql;
-    RETURN query SELECT lives_ok(query);
-END;
-$BODY$ LANGUAGE plpgsql;
-
-
-SELECT test_anyInteger_orders('_pgr_pickdeliver',
-    ARRAY['id', 'demand',
-    'pick_node_id', 'pick_open', 'pick_close', 'pick_service',
-    'deliver_node_id', 'deliver_open', 'deliver_close', 'deliver_service'],
-    'id');
-SELECT test_anynumerical_orders('_pgr_pickdeliver',
-    ARRAY['id', 'demand',
-    'pick_node_id', 'pick_open', 'pick_close', 'pick_service',
-    'deliver_node_id', 'deliver_open', 'deliver_close', 'deliver_service'],
-    'demand');
-
-SELECT test_anyInteger_orders('_pgr_pickdeliver',
-    ARRAY['id', 'demand',
-    'pick_node_id', 'pick_open', 'pick_close', 'pick_service',
-    'deliver_node_id', 'deliver_open', 'deliver_close', 'deliver_service'],
-    'pick_node_id');
-SELECT test_anynumerical_orders('_pgr_pickdeliver',
-    ARRAY['id', 'demand',
-    'pick_node_id', 'pick_open', 'pick_close', 'pick_service',
-    'deliver_node_id', 'deliver_open', 'deliver_close', 'deliver_service'],
-    'pick_open');
-SELECT test_anynumerical_orders('_pgr_pickdeliver',
-    ARRAY['id', 'demand',
-    'pick_node_id', 'pick_open', 'pick_close', 'pick_service',
-    'deliver_node_id', 'deliver_open', 'deliver_close', 'deliver_service'],
-    'pick_close');
-SELECT test_anynumerical_orders('_pgr_pickdeliver',
-    ARRAY['id', 'demand',
-    'pick_node_id', 'pick_open', 'pick_close', 'pick_service',
-    'deliver_node_id', 'deliver_open', 'deliver_close', 'deliver_service'],
-    'pick_service');
-
-SELECT test_anyInteger_orders('_pgr_pickdeliver',
-    ARRAY['id', 'demand',
-    'pick_node_id', 'pick_open', 'pick_close', 'pick_service',
-    'deliver_node_id', 'deliver_open', 'deliver_close', 'deliver_service'],
-    'deliver_node_id');
-SELECT test_anynumerical_orders('_pgr_pickdeliver',
-    ARRAY['id', 'demand',
-    'pick_node_id', 'pick_open', 'pick_close', 'pick_service',
-    'deliver_node_id', 'deliver_open', 'deliver_close', 'deliver_service'],
-    'deliver_open');
-SELECT test_anynumerical_orders('_pgr_pickdeliver',
-    ARRAY['id', 'demand',
-    'pick_node_id', 'pick_open', 'pick_close', 'pick_service',
-    'deliver_node_id', 'deliver_open', 'deliver_close', 'deliver_service'],
-    'deliver_close');
-SELECT test_anynumerical_orders('_pgr_pickdeliver',
-    ARRAY['id', 'demand',
-    'pick_node_id', 'pick_open', 'pick_close', 'pick_service',
-    'deliver_node_id', 'deliver_open', 'deliver_close', 'deliver_service'],
-    'deliver_service');
-
-/* Currently this are not used TODO add when they are used
-    'end_x', 'end_y', 'end_open', 'end_close', 'end_service'],
-    'speed' is optional defaults to 1
-    'start_service' is optional defaults to 0
-*/
-/*
-without optional: number
-*/
-SELECT test_anyInteger_vehicles('_pgr_pickdeliver',
-    ARRAY['id', 'capacity', 
-    'start_node_id', 'start_open', 'start_close'],
-    'id');
-SELECT test_anyNumerical_vehicles('_pgr_pickdeliver',
-    ARRAY['id', 'capacity', 
-    'start_node_id', 'start_open', 'start_close'],
-    'capacity');
-SELECT test_anyInteger_vehicles('_pgr_pickdeliver',
-    ARRAY['id', 'capacity', 
-    'start_node_id', 'start_open', 'start_close'],
-    'start_node_id');
-SELECT test_anyNumerical_vehicles('_pgr_pickdeliver',
-    ARRAY['id', 'capacity', 
-    'start_node_id', 'start_open', 'start_close'],
-    'start_open');
-SELECT test_anyNumerical_vehicles('_pgr_pickdeliver',
-    ARRAY['id', 'capacity', 
-    'start_node_id', 'start_open', 'start_close'],
-    'start_close');
-
-
-/*
-with optional: number
-*/
-SELECT test_anyInteger_vehicles('_pgr_pickdeliver',
-    ARRAY['id', 'capacity', 'number',
-    'start_node_id', 'start_open', 'start_close'],
-    'id');
-SELECT test_anyNumerical_vehicles('_pgr_pickdeliver',
-    ARRAY['id', 'capacity', 'number',
-    'start_node_id', 'start_open', 'start_close'],
-    'capacity');
-SELECT test_anyInteger_vehicles('_pgr_pickdeliver',
-    ARRAY['id', 'capacity', 'number',
-    'start_node_id', 'start_open', 'start_close'],
-    'number');
-SELECT test_anyInteger_vehicles('_pgr_pickdeliver',
-    ARRAY['id', 'capacity', 'number',
-    'start_node_id', 'start_open', 'start_close'],
-    'start_node_id');
-SELECT test_anyNumerical_vehicles('_pgr_pickdeliver',
-    ARRAY['id', 'capacity', 'number',
-    'start_node_id', 'start_open', 'start_close'],
-    'start_open');
-SELECT test_anyNumerical_vehicles('_pgr_pickdeliver',
-    ARRAY['id', 'capacity', 'number',
-    'start_node_id', 'start_open', 'start_close'],
-    'start_close');
-
-
-/*
-Testing the matrix
-*/
-SELECT test_anyInteger_matrix('_pgr_pickdeliver',
-    ARRAY['start_vid', 'end_vid', 'agg_cost'],
-    'start_vid');
-SELECT test_anyInteger_matrix('_pgr_pickdeliver',
-    ARRAY['start_vid', 'end_vid', 'agg_cost'],
-    'end_vid');
-SELECT test_anyNumerical_matrix('_pgr_pickdeliver',
-    ARRAY['start_vid', 'end_vid', 'agg_cost'],
-    'agg_cost');
-
-SELECT todo_end();
-
-SELECT finish();
-ROLLBACK;
diff --git a/src/pickDeliver/test/past_example.result b/src/pickDeliver/test/past_example.result
deleted file mode 100644
index e6b34ab..0000000
--- a/src/pickDeliver/test/past_example.result
+++ /dev/null
@@ -1,266 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
-DROP TABLE IF EXISTS orders CASCADE;
-DROP TABLE
-DROP TABLE IF EXISTS vehicles CASCADE;
-DROP TABLE
-DROP TABLE IF EXISTS dist_matrix CASCADE;
-psql:tools/testers/pickDeliver_pgtap_data.sql:4: NOTICE:  table "dist_matrix" does not exist, skipping
-DROP TABLE
-CREATE TABLE orders (
-      id BIGINT PRIMARY KEY, 
-      demand FLOAT, 
-      p_node_id BIGINT,
-      p_x FLOAT, 
-      p_y FLOAT, 
-      p_open FLOAT, 
-      p_close FLOAT, 
-      p_service FLOAT, 
-      d_node_id BIGINT,
-      d_x FLOAT, 
-      d_y FLOAT, 
-      d_open FLOAT, 
-      d_close FLOAT, 
-      d_service FLOAT
-);
-CREATE TABLE
-CREATE TABLE vehicles (
-  id BIGSERIAL PRIMARY KEY, 
-  start_node_id BIGINT,
-  start_x FLOAT, 
-  start_y FLOAT, 
-  start_open FLOAT, 
-  start_close FLOAT, 
-  "number" integer, 
-  capacity FLOAT
-);
-CREATE TABLE
-INSERT INTO orders (id,  demand, 
-p_x,  p_y ,  p_open,  p_close,  p_service, 
-d_x,  d_y ,  d_open,  d_close,  d_service)
-VALUES
-(3,  10, 42, 66,   65,  146, 90, 45, 65, 997, 1068, 90), 
-(5,  10, 42, 65,   15,   67, 90, 40, 66, 170,  225, 90), 
-(6,  20, 40, 69,  621,  702, 90, 45, 70, 825,  870, 90), 
-(8,  20, 38, 68,  255,  324, 90, 35, 66, 357,  410, 90), 
-(9,  10, 38, 70,  534,  605, 90, 42, 68, 727,  782, 90), 
-(11, 10, 35, 69,  448,  505, 90, 45, 68, 912,  967, 90), 
-(13, 30, 22, 75,   30,   92, 90, 18, 75,  99,  148, 90), 
-(16, 40, 20, 85,  475,  528, 90, 22, 85, 567,  620, 90), 
-(18, 20, 15, 75,  179,  254, 90, 25, 85, 652,  721, 90), 
-(19, 10, 15, 80,  278,  345, 90, 20, 80, 384,  429, 90), 
-(20, 10, 30, 50,   10,   73, 90, 25, 50,  65,  144, 90), 
-(23, 10, 28, 55,  732,  777,  0, 28, 55, 732,  777, 90), 
-(25, 40, 25, 52,  169,  224, 90, 23, 52, 261,  316, 90), 
-(28, 20, 23, 55,  546,  593, 90, 28, 52, 812,  883, 90), 
-(29, 10, 20, 50,  358,  405, 90, 25, 55, 622,  701, 90), 
-(30, 10, 20, 55,  449,  504, 90, 30, 52, 914,  965, 90), 
-(32, 30, 10, 40,   31,  100, 90, 10, 35, 200,  237, 90), 
-(33, 40,  8, 40,   87,  158, 90,  2, 40, 383,  434, 90), 
-(35, 10,  5, 35,  283,  344, 90,  0, 45, 567,  624, 90), 
-(36, 10,  5, 45,  665,  716,  0,  5, 45, 665,  716, 90), 
-(38, 30,  0, 40,  479,  522, 90,  8, 45, 751,  816, 90), 
-(42, 20, 33, 32,   68,  149, 90, 35, 30, 264,  321, 90), 
-(43, 10, 33, 35,   16,   80, 90, 35, 32, 166,  235, 90), 
-(44, 10, 32, 30,  359,  412, 90, 30, 32, 448,  509, 90), 
-(45, 10, 30, 30,  541,  600, 90, 28, 30, 632,  693, 90), 
-(49, 10, 28, 35, 1001, 1066, 90, 30, 35,1054, 1127, 90), 
-(50, 10, 26, 32,  815,  880, 90, 25, 35, 912,  969, 90), 
-(51, 10, 25, 30,  725,  786,  0, 25, 30, 725,  786, 90), 
-(53, 20, 44,  5,  286,  347, 90, 38,  5, 471,  534, 90), 
-(54, 40, 42, 10,  186,  257, 90, 35,  5, 562,  629, 90), 
-(56, 30, 40,  5,  385,  436, 90, 38, 15, 651,  740, 90), 
-(57, 40, 40, 15,   35,   87, 90, 42, 15,  95,  158, 90), 
-(62, 20, 50, 35,  262,  317, 90, 45, 30, 734,  777, 90), 
-(63, 50, 50, 40,  171,  218, 90, 53, 35, 353,  412, 90), 
-(64, 10, 48, 30,  632,  693,  0, 48, 30, 632,  693, 90), 
-(65, 10, 48, 40,   76,  129, 90, 53, 30, 450,  505, 90), 
-(66, 10, 47, 35,  826,  875, 90, 45, 35, 916,  969, 90), 
-(67, 10, 47, 40,   12,   77, 90, 50, 30, 531,  610, 90), 
-(71, 20, 95, 35,  293,  360, 90, 88, 30, 574,  643, 90), 
-(76, 10, 90, 35,  203,  260, 90, 92, 30, 478,  551, 90), 
-(78, 20, 88, 35,  109,  170,  0, 88, 35, 109,  170, 90), 
-(79, 10, 87, 30,  668,  731, 90, 85, 25, 769,  820, 90), 
-(81, 30, 85, 35,   47,  124, 90, 95, 30, 387,  456, 90), 
-(82, 20, 75, 55,  369,  420, 90, 68, 60, 555,  612, 90), 
-(84, 20, 70, 58,  458,  523, 90, 63, 58, 737,  802, 90), 
-(86, 10, 66, 55,  173,  238, 90, 60, 60, 836,  889, 90), 
-(87, 20, 65, 55,   85,  144, 90, 72, 55, 265,  338, 90), 
-(90, 10, 60, 55,   20,   84, 90, 65, 60, 645,  708, 90), 
-(92, 20, 67, 85,  368,  441, 90, 65, 85, 475,  518, 90), 
-(96, 10, 60, 80,   95,  156, 90, 65, 82, 285,  336, 90), 
-(97, 30, 60, 85,  561,  622,  0, 60, 85, 561,  622, 90), 
-(98, 20, 58, 75,   30,   84, 90, 62, 80, 196,  239, 90), 
-(100,20, 55, 85,  647,  726, 90, 55, 80, 743,  820, 90);
-INSERT 0 53
-INSERT INTO vehicles (start_x,  start_y,  start_open,  start_close,  "number",  capacity)
-VALUES (40,  50,  0,  1236,  25,  200);
-INSERT 0 1
-WITH points AS (
-    SELECT DISTINCT p_x AS x, p_y AS y FROM orders
-    UNION
-    SELECT DISTINCT d_x, d_y FROM orders),
-t_points AS (SELECT row_number() over() AS id, x, y FROM points),
-first  AS (SELECT orders.id AS id , t_points.id AS p_node_id from orders JOIN t_points ON (x = p_x AND y = p_y)),
-second AS (SELECT orders.id AS id , t_points.id AS d_node_id from orders JOIN t_points ON (x = d_x AND y = d_y)),
-third  AS (SELECT id, p_node_id, d_node_id from first JOIN second USING (id))
-UPDATE orders SET p_node_id = third.p_node_id, d_node_id = third.d_node_id 
-FROM third WHERE third.id = orders.id;
-UPDATE 53
-WITH 
-the_ids AS (SELECT p_node_id AS id FROM orders UNION SELECT d_node_id FROM orders),
-the_max AS (SELECT max(id) FROM the_ids)
-UPDATE vehicles SET start_node_id = max+1 FROM the_max;
-UPDATE 1
-/*
-WITH
-A AS (
-    SELECT p_node_id AS id, p_x AS x, p_y AS y FROM orders
-    UNION
-    SELECT d_node_id, d_x, d_y FROM orders
-    UNION
-    SELECT start_node_id, start_x, start_y FROM vehicles
-)
-SELECT A.id AS start_vid, B.id AS end_vid, sqrt( (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y)) AS agg_cost
-INTO dist_matrix
-FROM A, A AS B WHERE A.id != B.id;
-*/
-SELECT * FROM _pgr_pickDeliverEuclidean(
-    'SELECT * FROM orders ORDER BY id',
-    'SELECT * from vehicles'
-);
- seq | vehicle_seq | vehicle_id | stop_seq | stop_type | order_id | cargo |   travel_time    |   arrival_time   | wait_time | service_time |  departure_time  
------+-------------+------------+----------+-----------+----------+-------+------------------+------------------+-----------+--------------+------------------
-   1 |           1 |          1 |        1 |         1 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
-   2 |           1 |          1 |        2 |         2 |       13 |    30 | 30.8058436014987 | 30.8058436014987 |         0 |           90 | 120.805843601499
-   3 |           1 |          1 |        3 |         3 |       13 |     0 |                4 | 124.805843601499 |         0 |           90 | 214.805843601499
-   4 |           1 |          1 |        4 |         2 |       18 |    20 |                3 | 217.805843601499 |         0 |           90 | 307.805843601499
-   5 |           1 |          1 |        5 |         2 |       19 |    30 |                5 | 312.805843601499 |         0 |           90 | 402.805843601499
-   6 |           1 |          1 |        6 |         3 |       19 |    20 |                5 | 407.805843601499 |         0 |           90 | 497.805843601499
-   7 |           1 |          1 |        7 |         2 |       16 |    60 |                5 | 502.805843601499 |         0 |           90 | 592.805843601499
-   8 |           1 |          1 |        8 |         3 |       16 |    20 |                2 | 594.805843601499 |         0 |           90 | 684.805843601499
-   9 |           1 |          1 |        9 |         3 |       18 |     0 |                3 | 687.805843601499 |         0 |           90 | 777.805843601499
-  10 |           1 |          1 |       10 |         2 |       50 |    10 | 53.0094331227943 | 830.815276724293 |         0 |           90 | 920.815276724293
-  11 |           1 |          1 |       11 |         3 |       50 |     0 | 3.16227766016838 | 923.977554384461 |         0 |           90 | 1013.97755438446
-  12 |           1 |          1 |       12 |         2 |       49 |    10 |                3 | 1016.97755438446 |         0 |           90 | 1106.97755438446
-  13 |           1 |          1 |       13 |         3 |       49 |     0 |                2 | 1108.97755438446 |         0 |           90 | 1198.97755438446
-  14 |           1 |          1 |       14 |         6 |       -1 |     0 | 18.0277563773199 | 1217.00531076178 |         0 |            0 | 1217.00531076178
-  15 |           2 |          1 |        1 |         1 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
-  16 |           2 |          1 |        2 |         2 |        5 |    10 | 15.1327459504216 | 15.1327459504216 |         0 |           90 | 105.132745950422
-  17 |           2 |          1 |        3 |         2 |        3 |    20 |                1 | 106.132745950422 |         0 |           90 | 196.132745950422
-  18 |           2 |          1 |        4 |         3 |        5 |    10 |                2 | 198.132745950422 |         0 |           90 | 288.132745950422
-  19 |           2 |          1 |        5 |         2 |        8 |    30 | 2.82842712474619 | 290.961173075168 |         0 |           90 | 380.961173075168
-  20 |           2 |          1 |        6 |         3 |        8 |    10 | 3.60555127546399 | 384.566724350632 |         0 |           90 | 474.566724350632
-  21 |           2 |          1 |        7 |         2 |       11 |    20 |                3 | 477.566724350632 |         0 |           90 | 567.566724350632
-  22 |           2 |          1 |        8 |         2 |        9 |    30 | 3.16227766016838 |   570.7290020108 |         0 |           90 |   660.7290020108
-  23 |           2 |          1 |        9 |         2 |        6 |    50 | 2.23606797749979 |   662.9650699883 |         0 |           90 |   752.9650699883
-  24 |           2 |          1 |       10 |         3 |        9 |    40 | 2.23606797749979 |   755.2011379658 |         0 |           90 |   845.2011379658
-  25 |           2 |          1 |       11 |         3 |        6 |    20 | 3.60555127546399 | 848.806689241264 |         0 |           90 | 938.806689241264
-  26 |           2 |          1 |       12 |         3 |       11 |    10 |                2 | 940.806689241264 |         0 |           90 | 1030.80668924126
-  27 |           2 |          1 |       13 |         3 |        3 |     0 |                3 | 1033.80668924126 |         0 |           90 | 1123.80668924126
-  28 |           2 |          1 |       14 |         6 |       -1 |     0 | 15.8113883008419 | 1139.61807754211 |         0 |            0 | 1139.61807754211
-  29 |           3 |          1 |        1 |         1 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
-  30 |           3 |          1 |        2 |         2 |       43 |    10 | 16.5529453572468 | 16.5529453572468 |         0 |           90 | 106.552945357247
-  31 |           3 |          1 |        3 |         2 |       42 |    30 |                3 | 109.552945357247 |         0 |           90 | 199.552945357247
-  32 |           3 |          1 |        4 |         3 |       43 |    20 |                2 | 201.552945357247 |         0 |           90 | 291.552945357247
-  33 |           3 |          1 |        5 |         3 |       42 |     0 |                2 | 293.552945357247 |         0 |           90 | 383.552945357247
-  34 |           3 |          1 |        6 |         2 |       44 |    10 |                3 | 386.552945357247 |         0 |           90 | 476.552945357247
-  35 |           3 |          1 |        7 |         3 |       44 |     0 | 2.82842712474619 | 479.381372481993 |         0 |           90 | 569.381372481993
-  36 |           3 |          1 |        8 |         2 |       45 |    10 |                2 | 571.381372481993 |         0 |           90 | 661.381372481993
-  37 |           3 |          1 |        9 |         3 |       45 |     0 |                2 | 663.381372481993 |         0 |           90 | 753.381372481993
-  38 |           3 |          1 |       10 |         2 |       51 |    10 |                3 | 756.381372481993 |         0 |            0 | 756.381372481993
-  39 |           3 |          1 |       11 |         3 |       51 |     0 |                0 | 756.381372481993 |         0 |           90 | 846.381372481993
-  40 |           3 |          1 |       12 |         2 |       66 |    10 |  22.561028345357 |  868.94240082735 |         0 |           90 |  958.94240082735
-  41 |           3 |          1 |       13 |         3 |       66 |     0 |                2 |  960.94240082735 |         0 |           90 | 1050.94240082735
-  42 |           3 |          1 |       14 |         6 |       -1 |     0 | 15.8113883008419 | 1066.75378912819 |         0 |            0 | 1066.75378912819
-  43 |           4 |          1 |        1 |         1 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
-  44 |           4 |          1 |        2 |         2 |       20 |    10 |               10 |               10 |         0 |           90 |              100
-  45 |           4 |          1 |        3 |         3 |       20 |     0 |                5 |              105 |         0 |           90 |              195
-  46 |           4 |          1 |        4 |         2 |       25 |    40 |                2 |              197 |         0 |           90 |              287
-  47 |           4 |          1 |        5 |         3 |       25 |     0 |                2 |              289 |         0 |           90 |              379
-  48 |           4 |          1 |        6 |         2 |       29 |    10 | 3.60555127546399 | 382.605551275464 |         0 |           90 | 472.605551275464
-  49 |           4 |          1 |        7 |         2 |       30 |    20 |                5 | 477.605551275464 |         0 |           90 | 567.605551275464
-  50 |           4 |          1 |        8 |         2 |       28 |    40 |                3 | 570.605551275464 |         0 |           90 | 660.605551275464
-  51 |           4 |          1 |        9 |         3 |       29 |    30 |                2 | 662.605551275464 |         0 |           90 | 752.605551275464
-  52 |           4 |          1 |       10 |         2 |       23 |    40 |                3 | 755.605551275464 |         0 |            0 | 755.605551275464
-  53 |           4 |          1 |       11 |         3 |       23 |    30 |                0 | 755.605551275464 |         0 |           90 | 845.605551275464
-  54 |           4 |          1 |       12 |         3 |       28 |    10 |                3 | 848.605551275464 |         0 |           90 | 938.605551275464
-  55 |           4 |          1 |       13 |         3 |       30 |     0 |                2 | 940.605551275464 |         0 |           90 | 1030.60555127546
-  56 |           4 |          1 |       14 |         6 |       -1 |     0 | 10.1980390271856 | 1040.80359030265 |         0 |            0 | 1040.80359030265
-  57 |           5 |          1 |        1 |         1 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
-  58 |           5 |          1 |        2 |         2 |       90 |    10 | 20.6155281280883 | 20.6155281280883 |         0 |           90 | 110.615528128088
-  59 |           5 |          1 |        3 |         2 |       87 |    30 |                5 | 115.615528128088 |         0 |           90 | 205.615528128088
-  60 |           5 |          1 |        4 |         2 |       86 |    40 |                1 | 206.615528128088 |         0 |           90 | 296.615528128088
-  61 |           5 |          1 |        5 |         3 |       87 |    20 |                6 | 302.615528128088 |         0 |           90 | 392.615528128088
-  62 |           5 |          1 |        6 |         2 |       82 |    40 |                3 | 395.615528128088 |         0 |           90 | 485.615528128088
-  63 |           5 |          1 |        7 |         2 |       84 |    60 |  5.8309518948453 | 491.446480022934 |         0 |           90 | 581.446480022934
-  64 |           5 |          1 |        8 |         3 |       82 |    40 | 2.82842712474619 |  584.27490714768 |         0 |           90 |  674.27490714768
-  65 |           5 |          1 |        9 |         3 |       90 |    30 |                3 |  677.27490714768 |         0 |           90 |  767.27490714768
-  66 |           5 |          1 |       10 |         3 |       84 |    10 | 2.82842712474619 | 770.103334272426 |         0 |           90 | 860.103334272426
-  67 |           5 |          1 |       11 |         3 |       86 |     0 | 3.60555127546399 |  863.70888554789 |         0 |           90 |  953.70888554789
-  68 |           5 |          1 |       12 |         6 |       -1 |     0 | 22.3606797749979 | 976.069565322888 |         0 |            0 | 976.069565322888
-  69 |           6 |          1 |        1 |         1 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
-  70 |           6 |          1 |        2 |         2 |       81 |    30 | 47.4341649025257 | 47.4341649025257 |         0 |           90 | 137.434164902526
-  71 |           6 |          1 |        3 |         2 |       78 |    50 |                3 | 140.434164902526 |         0 |            0 | 140.434164902526
-  72 |           6 |          1 |        4 |         3 |       78 |    30 |                0 | 140.434164902526 |         0 |           90 | 230.434164902526
-  73 |           6 |          1 |        5 |         2 |       76 |    40 |                2 | 232.434164902526 |         0 |           90 | 322.434164902526
-  74 |           6 |          1 |        6 |         2 |       71 |    60 |                5 | 327.434164902526 |         0 |           90 | 417.434164902526
-  75 |           6 |          1 |        7 |         3 |       81 |    30 |                5 | 422.434164902526 |         0 |           90 | 512.434164902526
-  76 |           6 |          1 |        8 |         3 |       76 |    20 |                3 | 515.434164902526 |         0 |           90 | 605.434164902526
-  77 |           6 |          1 |        9 |         3 |       71 |     0 |                4 | 609.434164902526 |         0 |           90 | 699.434164902526
-  78 |           6 |          1 |       10 |         2 |       79 |    10 |                1 | 700.434164902526 |         0 |           90 | 790.434164902526
-  79 |           6 |          1 |       11 |         3 |       79 |     0 |  5.3851648071345 |  795.81932970966 |         0 |           90 |  885.81932970966
-  80 |           6 |          1 |       12 |         6 |       -1 |     0 |  51.478150704935 | 937.297480414595 |         0 |            0 | 937.297480414595
-  81 |           7 |          1 |        1 |         1 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
-  82 |           7 |          1 |        2 |         2 |       32 |    30 | 31.6227766016838 | 31.6227766016838 |         0 |           90 | 121.622776601684
-  83 |           7 |          1 |        3 |         2 |       33 |    70 |                2 | 123.622776601684 |         0 |           90 | 213.622776601684
-  84 |           7 |          1 |        4 |         3 |       32 |    40 |  5.3851648071345 | 219.007941408818 |         0 |           90 | 309.007941408818
-  85 |           7 |          1 |        5 |         2 |       35 |    50 |                5 | 314.007941408818 |         0 |           90 | 404.007941408818
-  86 |           7 |          1 |        6 |         3 |       33 |    10 |  5.8309518948453 | 409.838893303664 |         0 |           90 | 499.838893303664
-  87 |           7 |          1 |        7 |         2 |       38 |    40 |                2 | 501.838893303664 |         0 |           90 | 591.838893303664
-  88 |           7 |          1 |        8 |         3 |       35 |    30 |                5 | 596.838893303664 |         0 |           90 | 686.838893303664
-  89 |           7 |          1 |        9 |         2 |       36 |    40 |                5 | 691.838893303664 |         0 |            0 | 691.838893303664
-  90 |           7 |          1 |       10 |         3 |       36 |    30 |                0 | 691.838893303664 |         0 |           90 | 781.838893303664
-  91 |           7 |          1 |       11 |         3 |       38 |     0 |                3 | 784.838893303664 |         0 |           90 | 874.838893303664
-  92 |           7 |          1 |       12 |         6 |       -1 |     0 | 32.3882694814033 | 907.227162785067 |         0 |            0 | 907.227162785067
-  93 |           8 |          1 |        1 |         1 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
-  94 |           8 |          1 |        2 |         2 |       98 |    20 | 30.8058436014987 | 30.8058436014987 |         0 |           90 | 120.805843601499
-  95 |           8 |          1 |        3 |         2 |       96 |    30 |  5.3851648071345 | 126.191008408633 |         0 |           90 | 216.191008408633
-  96 |           8 |          1 |        4 |         3 |       98 |    10 |                2 | 218.191008408633 |         0 |           90 | 308.191008408633
-  97 |           8 |          1 |        5 |         3 |       96 |     0 | 3.60555127546399 | 311.796559684097 |         0 |           90 | 401.796559684097
-  98 |           8 |          1 |        6 |         2 |       92 |    20 | 3.60555127546399 | 405.402110959561 |         0 |           90 | 495.402110959561
-  99 |           8 |          1 |        7 |         3 |       92 |     0 |                2 | 497.402110959561 |         0 |           90 | 587.402110959561
- 100 |           8 |          1 |        8 |         2 |       97 |    30 |                5 | 592.402110959561 |         0 |            0 | 592.402110959561
- 101 |           8 |          1 |        9 |         3 |       97 |     0 |                0 | 592.402110959561 |         0 |           90 | 682.402110959561
- 102 |           8 |          1 |       10 |         2 |      100 |    20 |                5 | 687.402110959561 |         0 |           90 | 777.402110959561
- 103 |           8 |          1 |       11 |         3 |      100 |     0 |                5 | 782.402110959561 |         0 |           90 | 872.402110959561
- 104 |           8 |          1 |       12 |         6 |       -1 |     0 | 33.5410196624968 | 905.943130622058 |         0 |            0 | 905.943130622058
- 105 |           9 |          1 |        1 |         1 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
- 106 |           9 |          1 |        2 |         2 |       67 |    10 | 12.2065556157337 | 12.2065556157337 |         0 |           90 | 102.206555615734
- 107 |           9 |          1 |        3 |         2 |       65 |    20 |                1 | 103.206555615734 |         0 |           90 | 193.206555615734
- 108 |           9 |          1 |        4 |         2 |       63 |    70 |                2 | 195.206555615734 |         0 |           90 | 285.206555615734
- 109 |           9 |          1 |        5 |         2 |       62 |    90 |                5 | 290.206555615734 |         0 |           90 | 380.206555615734
- 110 |           9 |          1 |        6 |         3 |       63 |    40 |                3 | 383.206555615734 |         0 |           90 | 473.206555615734
- 111 |           9 |          1 |        7 |         3 |       65 |    30 |                5 | 478.206555615734 |         0 |           90 | 568.206555615734
- 112 |           9 |          1 |        8 |         3 |       67 |    20 |                3 | 571.206555615734 |         0 |           90 | 661.206555615734
- 113 |           9 |          1 |        9 |         2 |       64 |    30 |                2 | 663.206555615734 |         0 |            0 | 663.206555615734
- 114 |           9 |          1 |       10 |         3 |       64 |    20 |                0 | 663.206555615734 |         0 |           90 | 753.206555615734
- 115 |           9 |          1 |       11 |         3 |       62 |     0 |                3 | 756.206555615734 |         0 |           90 | 846.206555615734
- 116 |           9 |          1 |       12 |         6 |       -1 |     0 | 20.6155281280883 | 866.822083743822 |         0 |            0 | 866.822083743822
- 117 |          10 |          1 |        1 |         1 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
- 118 |          10 |          1 |        2 |         2 |       57 |    40 |               35 |               35 |         0 |           90 |              125
- 119 |          10 |          1 |        3 |         3 |       57 |     0 |                2 |              127 |         0 |           90 |              217
- 120 |          10 |          1 |        4 |         2 |       54 |    40 |                5 |              222 |         0 |           90 |              312
- 121 |          10 |          1 |        5 |         2 |       53 |    60 |  5.3851648071345 | 317.385164807135 |         0 |           90 | 407.385164807135
- 122 |          10 |          1 |        6 |         2 |       56 |    90 |                4 | 411.385164807135 |         0 |           90 | 501.385164807135
- 123 |          10 |          1 |        7 |         3 |       53 |    70 |                2 | 503.385164807135 |         0 |           90 | 593.385164807135
- 124 |          10 |          1 |        8 |         3 |       54 |    30 |                3 | 596.385164807135 |         0 |           90 | 686.385164807135
- 125 |          10 |          1 |        9 |         3 |       56 |     0 | 10.4403065089106 | 696.825471316045 |         0 |           90 | 786.825471316045
- 126 |          10 |          1 |       10 |         6 |       -1 |     0 | 35.0570962859162 | 821.882567601961 |         0 |            0 | 821.882567601961
- 127 |          -2 |          0 |        0 |        -1 |       -1 |    -1 |  879.42275822512 |               -1 |         0 |         9000 | 9879.42275822512
-(127 rows)
-
-ROLLBACK;
-ROLLBACK
diff --git a/src/pickDeliver/tw_node.cpp b/src/pickDeliver/tw_node.cpp
new file mode 100644
index 0000000..3f3c38a
--- /dev/null
+++ b/src/pickDeliver/tw_node.cpp
@@ -0,0 +1,287 @@
+/*PGR-GNU*****************************************************************
+
+FILE: tw_node.cpp
+
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ ********************************************************************PGR-GNU*/
+
+#include "vrp/tw_node.h"
+
+#include <limits>
+#include <string>
+
+#include "cpp_common/pgr_assert.h"
+#include "vrp/pgr_pickDeliver.h"
+
+
+namespace pgrouting {
+namespace vrp {
+
+
+double
+Tw_node::travel_time_to(const Tw_node &to, double speed) const {
+    /** TODO(vicky)
+     * shall call Node or Dnode
+     * static cast won't work I think
+     *
+     */
+    auto from =  problem->m_base_nodes[idx()].get();
+    auto destination = problem->m_base_nodes[to.idx()].get();
+    pgassert(speed != 0);
+     /*! @todo TODO evaluate with matrix also*/
+    return from->distance(destination) / speed;
+}
+
+
+/*
+ * I -> J = (*this)
+ */
+double
+Tw_node::arrival_j_opens_i(const Tw_node &I, double speed) const {
+    if (m_type == kStart) return (std::numeric_limits<double>::max)();
+    return I.opens() + I.service_time() + I.travel_time_to(*this, speed);
+}
+
+double
+Tw_node::arrival_j_closes_i(const Tw_node &I, double speed) const {
+    if (m_type == kStart) return  (std::numeric_limits<double>::max)();
+    return I.closes() + I.service_time() + I.travel_time_to(*this, speed);
+}
+
+
+
+
+bool
+Tw_node::is_compatible_IJ(const Tw_node &I, double speed) const {
+    /*
+     * I /->  kStart
+     */
+    if (m_type == kStart) return false;
+    /*
+     * kEnd /-> (*this)
+     */
+    if (I.m_type == kEnd) return false;
+
+    return !is_late_arrival(arrival_j_opens_i(I, speed));
+}
+
+bool
+Tw_node::is_partially_compatible_IJ(const Tw_node &I, double speed) const {
+    return
+        is_compatible_IJ(I, speed)
+        && !is_early_arrival(arrival_j_opens_i(I, speed))
+        && is_late_arrival(arrival_j_closes_i(I, speed));
+}
+
+bool
+Tw_node::is_tight_compatible_IJ(const Tw_node &I, double speed) const {
+    return
+        is_compatible_IJ(I, speed)
+        && !is_early_arrival(arrival_j_opens_i(I, speed))
+        && !is_late_arrival(arrival_j_closes_i(I, speed));
+}
+
+bool
+Tw_node::is_partially_waitTime_compatible_IJ(
+        const Tw_node &I,
+        double speed) const {
+    return
+        is_compatible_IJ(I, speed)
+        && is_early_arrival(arrival_j_opens_i(I, speed));
+}
+
+bool
+Tw_node::is_waitTime_compatible_IJ(const Tw_node &I, double speed) const {
+    return
+        is_compatible_IJ(I, speed)
+        && is_early_arrival(arrival_j_opens_i(I, speed));
+}
+
+
+std::string Tw_node::type_str() const {
+    switch (type()) {
+        case kStart: return "START"; break;
+        case kEnd: return "END"; break;
+        case kDump: return "DUMP"; break;
+        case kLoad: return "LOAD"; break;
+        case kPickup: return "PICKUP"; break;
+        case kDelivery: return "DELIVERY"; break;
+        default: return "UNKNOWN";
+    }
+}
+
+bool
+Tw_node::is_start() const {
+    return
+        m_type == kStart
+        && (opens() < closes())
+        && (service_time() >= 0)
+        && (demand() == 0);
+}
+
+bool
+Tw_node::is_pickup() const {
+    return m_type == kPickup
+        && (opens() < closes())
+        && (service_time() >= 0)
+        && (demand() > 0);
+}
+
+
+bool
+Tw_node::is_delivery() const {
+    return m_type == kDelivery
+        && (opens() < closes())
+        && (service_time() >= 0)
+        && (demand() < 0);
+}
+
+
+bool
+Tw_node::is_dump() const {
+    return m_type == kDump
+        && (opens() < closes())
+        && (service_time() >= 0)
+        && (demand() <= 0);
+}
+
+
+bool
+Tw_node::is_load() const {
+    return m_type == kLoad
+        && (opens() < closes())
+        && (service_time() >= 0)
+        && (demand() >= 0);
+}
+
+
+bool
+Tw_node::is_end() const {
+    return m_type == kEnd
+        && (opens() < closes())
+        && (service_time() >= 0)
+        && (demand() == 0);
+}
+
+
+bool
+Tw_node::operator ==(const Tw_node &other) const {
+    if (&other == this) return true;
+    auto lhs = static_cast<const Node&>(
+            *problem->m_base_nodes[idx()].get());
+    auto rhs = static_cast<const Node&>(
+            *problem->m_base_nodes[other.idx()].get());
+    return lhs == rhs;
+}
+
+
+
+bool Tw_node::is_valid() const {
+    switch (type()) {
+        case kStart:
+            return is_start();
+            break;
+
+        case kEnd:
+            return is_end();
+            break;
+
+        case kDump:
+            return is_dump();
+            break;
+
+        case kDelivery:
+            return is_delivery();
+            break;
+
+        case kPickup:
+            return is_pickup();
+            break;
+
+        case kLoad:
+            return is_load();
+            break;
+
+        default:
+            return false;
+            break;
+    }
+
+    return false;
+}
+
+
+Tw_node::Tw_node(
+        size_t id,
+        PickDeliveryOrders_t data,
+        NodeType type) :
+    Identifier(id, data.pick_node_id),
+    m_order(data.id),
+    m_opens(data.pick_open_t),
+    m_closes(data.pick_close_t),
+    m_service_time(data.pick_service_t),
+    m_demand(data.demand),
+    m_type(type)  {
+        if (m_type == kDelivery) {
+            reset_id(data.deliver_node_id);
+            m_opens = data.deliver_open_t;
+            m_closes = data.deliver_close_t;
+            m_service_time = data.deliver_service_t;
+            m_demand *= -1;
+        }
+    }
+
+Tw_node::Tw_node(
+        size_t id,
+        Vehicle_t data,
+        NodeType type) :
+    Identifier(id, data.start_node_id),
+    m_opens(data.start_open_t),
+    m_closes(data.start_close_t),
+    m_service_time(data.start_service_t),
+    m_demand(0),
+    m_type(type) {
+        if (m_type == kEnd) {
+            reset_id(data.end_node_id);
+            m_opens = data.end_open_t;
+            m_closes = data.end_close_t;
+            m_service_time = data.end_service_t;
+        }
+    }
+
+
+/*! * \brief Print the contents of a Twnode object. */
+std::ostream& operator << (std::ostream &log, const Tw_node &n) {
+    log << static_cast<const Node&>(
+            *n.problem->m_base_nodes[n.idx()].get())
+        << "[opens = " << n.m_opens
+        << "\tcloses = " << n.m_closes
+        << "\tservice = " << n.m_service_time
+        << "\tdemand = " << n.m_demand
+        << "\ttype = " << n.type_str()
+        << "]"
+        << "\n";
+    return log;
+}
+
+}  //  namespace vrp
+}  //  namespace pgrouting
+
diff --git a/src/pickDeliver/vehicle.cpp b/src/pickDeliver/vehicle.cpp
new file mode 100644
index 0000000..188dd2e
--- /dev/null
+++ b/src/pickDeliver/vehicle.cpp
@@ -0,0 +1,577 @@
+/*PGR-GNU*****************************************************************
+
+FILE: vehicle.cpp
+
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ ********************************************************************PGR-GNU*/
+
+#include "vrp/vehicle.h"
+
+#include <deque>
+#include <iostream>
+#include <algorithm>
+#include <tuple>
+#include <limits>
+#include <string>
+#include <utility>
+#include <vector>
+
+#include "cpp_common/pgr_assert.h"
+
+#include "vrp/pgr_pickDeliver.h"
+
+
+namespace pgrouting {
+namespace vrp {
+
+
+void
+Vehicle::invariant() const {
+    pgassert(m_path.size() >= 2);
+    pgassert(m_path.front().is_start());
+    pgassert(m_path.back().is_end());
+}
+
+size_t
+Vehicle::insert(std::pair<POS, POS> position_limits, const Vehicle_node &node) {
+    invariant();
+    pgassert(position_limits.first <= m_path.size());
+    pgassert(position_limits.second <= m_path.size());
+
+    auto low = position_limits.first;
+    auto high = position_limits.second;
+    auto best = low;
+
+
+    insert(low, node);
+
+    Vehicle::Cost best_cost(cost());
+
+
+    while (low < high) {
+        swap(low, low + 1);
+        ++low;
+        if (cost_compare(best_cost, cost())) {
+            best_cost = cost();
+            best = low;
+        }
+    }
+    return best;
+
+    pgassert(best < m_path.size());
+    pgassert(m_path[best].idx() == node.idx());
+    invariant();
+}
+
+
+
+
+bool
+Vehicle::cost_compare(const Cost &lhs, const Cost &rhs) const {
+    /*
+     * capacity violations
+     */
+    if (std::get<1>(lhs) < std::get<1>(rhs))
+        return true;
+    if (std::get<1>(lhs) > std::get<1>(rhs))
+        return false;
+
+    /*
+     * time window violations
+     */
+    if (std::get<0>(lhs) < std::get<0>(rhs))
+        return true;
+    if (std::get<0>(lhs) > std::get<0>(rhs))
+        return false;
+
+    /*
+     * waiting time
+     */
+    if (std::get<3>(lhs) < std::get<3>(rhs))
+        return true;
+    if (std::get<3>(lhs) > std::get<3>(rhs))
+        return false;
+
+    /*
+     * duration
+     */
+    if (std::get<4>(lhs) < std::get<4>(rhs))
+        return true;
+    if (std::get<4>(lhs) > std::get<4>(rhs))
+        return false;
+
+    /*
+     * truck size
+     */
+    if (std::get<2>(lhs) < std::get<2>(rhs))
+        return true;
+    if (std::get<2>(lhs) > std::get<2>(rhs))
+        return false;
+
+    return false;
+}
+
+
+
+std::vector<General_vehicle_orders_t>
+Vehicle::get_postgres_result(
+        int vid) const {
+    std::vector<General_vehicle_orders_t> result;
+    /* postgres numbering starts with 1 */
+    int stop_seq(1);
+    msg.log << "getting solution: " << tau() << "\n";
+    for (const auto p_stop : m_path) {
+        General_vehicle_orders_t data = {
+            vid,
+            id(),
+            stop_seq,
+            /* order_id
+             * The order_id is invalid for stops type 0 and 5
+             */
+            (p_stop.type() == 0 || p_stop.type() == 5)? -1 : p_stop.order(),
+            p_stop.id(),
+            p_stop.type(),
+            p_stop.cargo(),
+            p_stop.travel_time(),
+            p_stop.arrival_time(),
+            p_stop.wait_time(),
+            p_stop.service_time(),
+            p_stop.departure_time()};
+        result.push_back(data);
+        ++stop_seq;
+    }
+    return result;
+}
+
+
+Vehicle::Cost
+Vehicle::cost() const {
+    return std::make_tuple(
+            twvTot(), cvTot(), m_path.size(),
+            total_wait_time(), duration());
+}
+
+
+void
+Vehicle::insert(POS at, Vehicle_node node) {
+    invariant();
+    pgassert(at <= m_path.size());
+
+    m_path.insert(m_path.begin() + at, node);
+    evaluate(at);
+
+    pgassert(at < m_path.size());
+    pgassert(m_path[at].idx() == node.idx());
+    invariant();
+}
+
+
+double
+Vehicle::deltaTime(const Vehicle_node &node, POS pos) const {
+    /*
+     * .... POS POS+1 ....
+     * .... POS node POS+1 ....
+     *
+     */
+    auto prev = m_path[pos-1];
+    auto next = m_path[pos];
+    auto original_time = next.travel_time();
+    auto tt_p_n = prev.travel_time_to(node, speed());
+    tt_p_n = node.is_early_arrival(prev.departure_time() + tt_p_n) ?
+        node.closes() - prev.departure_time()
+        : tt_p_n;
+
+    auto tt_n_x = node.travel_time_to(next, speed());
+    tt_p_n = next.is_early_arrival(
+            prev.departure_time() + tt_p_n + node.service_time() + tt_n_x) ?
+        next.closes() - (prev.departure_time() + tt_p_n + node.service_time())
+        : tt_n_x;
+
+    return (tt_p_n + tt_n_x) - original_time;
+}
+
+
+
+
+size_t
+Vehicle::insert_less_travel_time(const Vehicle_node &node, POS after_pos) {
+    invariant();
+
+    double min_delta = (std::numeric_limits<double>::max)();
+    POS min_pos = after_pos;
+
+    for (POS pos = after_pos; pos < m_path.size(); ++pos) {
+        if (!m_path[pos].is_start()) {
+            auto tt = deltaTime(node, pos);
+
+            if (tt < min_delta) {
+                min_delta = tt;
+                min_pos = pos;
+            }
+        }
+    }
+    insert(min_pos, node);
+
+    invariant();
+    return min_pos;
+}
+
+void
+Vehicle::erase(const Vehicle_node &node) {
+    invariant();
+
+    POS pos = 0;
+    for ( ; pos < m_path.size() ; ++pos) {
+        if (node.idx() == m_path[pos].idx())
+            break;
+    }
+
+    erase(pos);
+    /*! @todo TODO evaluate with matrix also*/
+    evaluate(pos);
+
+    invariant();
+}
+
+
+/*
+ * before: S E
+ * after: S N E
+ *
+ * before: S n1 n2 ... n E
+ * after: S N n1 n2 ... n E
+ */
+void
+Vehicle::push_front(const Vehicle_node &node) {
+    invariant();
+
+    /* insert evaluates */
+    insert(1, node);
+
+    invariant();
+}
+
+/*
+ * before: S E
+ * after: S N E
+ *
+ * before: S n1 n2 ... n E
+ * after: S n1 n2 ... n N E
+ */
+void
+Vehicle::push_back(const Vehicle_node &node) {
+    invariant();
+
+    /* insert evaluates */
+    insert(m_path.size() - 1, node);
+
+    invariant();
+}
+
+void
+Vehicle::pop_back() {
+    invariant();
+    pgassert(m_path.size() > 2);
+
+    /* erase evaluates */
+    erase(m_path.size() - 2);
+
+    invariant();
+}
+
+void
+Vehicle::pop_front() {
+    invariant();
+    pgassert(m_path.size() > 2);
+
+    /* erase evaluates */
+    erase(1);
+
+    invariant();
+}
+
+
+
+void
+Vehicle::erase(POS at) {
+    invariant();
+
+    pgassert(m_path.size() > 2);
+    pgassert(at < m_path.size());
+    pgassert(!m_path[at].is_start());
+    pgassert(!m_path[at].is_end());
+
+    m_path.erase(m_path.begin() + at);
+    evaluate(at);
+
+    invariant();
+}
+
+void
+Vehicle::swap(POS i, POS j) {
+    invariant();
+    pgassert(m_path.size() > 3);
+    pgassert(!m_path[i].is_start());
+    pgassert(!m_path[i].is_end());
+    pgassert(!m_path[j].is_start());
+    pgassert(!m_path[j].is_end());
+
+    std::swap(m_path[i], m_path[j]);
+    i < j ? evaluate(i) : evaluate(j);
+
+    invariant();
+}
+
+
+void
+Vehicle::evaluate() {
+    invariant();
+
+    evaluate(0);
+
+    invariant();
+}
+
+bool
+Vehicle::empty() const {
+    invariant();
+    return m_path.size() <= 2;
+}
+
+void
+Vehicle::evaluate(POS from) {
+    invariant();
+    // preconditions
+    pgassert(from < m_path.size());
+
+
+    auto node = m_path.begin() + from;
+
+    while (node != m_path.end()) {
+        if (node == m_path.begin()) {
+            node->evaluate(m_capacity);
+        } else {
+            node->evaluate(*(node - 1), m_capacity, speed());
+        }
+
+        ++node;
+    }
+    invariant();
+}
+
+std::deque< Vehicle_node >
+Vehicle::path() const {
+    invariant();
+    return m_path;
+}
+
+
+std::pair<size_t, size_t>
+Vehicle::position_limits(const Vehicle_node node) const {
+    POS high = getPosHighLimit(node);
+    POS low = getPosLowLimit(node);
+    return std::make_pair(low, high);
+}
+
+
+/*
+ * start searching from postition low = pos(E)
+ *
+ * S 1 2 3 4 5 6 7 ..... E
+ * node -> E
+ * node -> ...
+ * node -> 7
+ * node -> 6
+ * node -> 5
+ * node /-> 4
+ *
+ * return low_limit = 5
+ *
+ */
+size_t
+Vehicle::getPosLowLimit(const Vehicle_node &nodeI) const {
+    invariant();
+
+    POS low = 0;
+    POS high = m_path.size();
+    POS low_limit = high;
+
+    /* J == m_path[low_limit - 1] */
+    while (low_limit > low
+            && m_path[low_limit - 1].is_compatible_IJ(nodeI, speed())) {
+        --low_limit;
+    }
+
+    invariant();
+    return low_limit;
+}
+
+
+/*
+ * start searching from postition low = pos(S)
+ *
+ * S 1 2 3 4 5 6 7 ..... E
+ * S -> node
+ * 1 -> node
+ * 2 -> node
+ * ...
+ * 6 -> node
+ * 7 /-> node
+ *
+ * returns high_limit = 7
+ */
+size_t
+Vehicle::getPosHighLimit(const Vehicle_node &nodeJ) const {
+    invariant();
+
+    POS low = 0;
+    POS high = m_path.size();
+    POS high_limit = low;
+
+    /* I == m_path[high_limit] */
+    while (high_limit < high
+            && nodeJ.is_compatible_IJ(m_path[high_limit], speed())) {
+        ++high_limit;
+    }
+
+    invariant();
+    return high_limit;
+}
+
+bool
+Vehicle::is_ok() const {
+    pgassert((m_path.front().opens() <= m_path.front().closes())
+        && (m_path.back().opens() <= m_path.back().closes())
+        && (m_capacity > 0));
+    return (start_site().opens() <= start_site().closes())
+        && (end_site().opens() <= end_site().closes())
+        && (m_capacity > 0);
+}
+
+Vehicle::Vehicle(
+        size_t p_idx,
+        int64_t p_id,
+        const Vehicle_node &starting_site,
+        const Vehicle_node &ending_site,
+        double p_m_capacity,
+        double p_speed,
+        double p_factor) :
+    Identifier(p_idx, p_id),
+    m_capacity(p_m_capacity),
+    m_factor(p_factor),
+    m_speed(p_speed) {
+        ENTERING();
+        m_path.clear();
+        pgassert(starting_site.opens() <= starting_site.closes());
+        pgassert(ending_site.opens() <= ending_site.closes());
+        pgassert(capacity() > 0);
+        msg.log << "p_idx: " << p_idx << "\t idx(): " << idx() << "\n";
+        msg.log << "p_id: " << p_id << "\tid(): " << id() << "\n";
+
+        m_path.push_back(starting_site);
+        m_path.push_back(ending_site);
+
+        evaluate(0);
+        msg.log << tau() << "\n";
+        invariant();
+        EXITING();
+    }
+
+Vehicle::Vehicle(const Vehicle &v) :
+    Identifier(v.idx(), v.id()),
+    PD_problem(),
+    m_path(v.m_path),
+    m_capacity(v.m_capacity),
+    m_factor(v.m_factor),
+    m_speed(v.m_speed) {
+#if 0
+        ENTERING();
+        msg.log << v.tau() << "\n";
+        msg.log << tau() << "\n";
+        EXITING();
+#endif
+}
+
+
+
+std::string
+Vehicle::tau() const {
+    pgassert(m_path.size() > 1);
+    std::ostringstream log;
+    log << "Truck " << id() << "(" << idx() << ")"
+        << " (";
+    for (const auto p_stop : m_path) {
+        if (!(p_stop == m_path.front()))
+            log << ", ";
+        log << p_stop.id();
+    }
+    log << ")" << " \t(cv, twv, wait_time, duration) = ("
+        << cvTot() << ", "
+        << twvTot() << ", "
+        << total_wait_time() << ", "
+        << duration() << ")";
+
+    return log.str();
+}
+
+double
+Vehicle::speed() const {
+    return m_speed/m_factor;
+}
+
+/****** FRIENDS *******/
+
+std::ostream&
+operator << (std::ostream &log, const Vehicle &v) {
+    v.invariant();
+    int i(0);
+    log << "\n\n****************** " << v.idx() << "th VEHICLE*************\n";
+    log << "id = " << v.id()
+        << "\tcapacity = " << v.m_capacity
+        << "\tfactor = " << v.m_factor << "\n"
+        << "\tspeed = " << v.m_speed << "\n"
+        << "\tnew speed = " << v.speed() << "\n";
+
+    for (const auto &path_stop : v.path()) {
+        log << "Path_stop" << ++i << "\n";
+        log << path_stop << "\n";
+    }
+    return log;
+}
+
+bool
+operator<(const Vehicle &lhs, const Vehicle &rhs) {
+    lhs.invariant();
+    rhs.invariant();
+
+    if (lhs.m_path.size() < rhs.m_path.size()) return true;
+
+    /* here because sizes are equal */
+
+    if (lhs.m_path.back().total_travel_time()
+            < lhs.m_path.back().total_travel_time()) return true;
+
+    return false;
+}
+
+}  //  namespace vrp
+}  //  namespace pgrouting
+
diff --git a/src/pickDeliver/src/vehicle_node.cpp b/src/pickDeliver/vehicle_node.cpp
similarity index 100%
rename from src/pickDeliver/src/vehicle_node.cpp
rename to src/pickDeliver/vehicle_node.cpp
diff --git a/src/pickDeliver/src/vehicle_pickDeliver.cpp b/src/pickDeliver/vehicle_pickDeliver.cpp
similarity index 100%
rename from src/pickDeliver/src/vehicle_pickDeliver.cpp
rename to src/pickDeliver/vehicle_pickDeliver.cpp
diff --git a/src/topology/test/analyzeOneway-any.result b/src/topology/test/analyzeOneway-any.result
deleted file mode 100644
index 39e9938..0000000
--- a/src/topology/test/analyzeOneway-any.result
+++ /dev/null
@@ -1,25 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
-SELECT pgr_analyzeOneway('edge_table',
-ARRAY['', 'B', 'TF'],
-ARRAY['', 'B', 'FT'],
-ARRAY['', 'B', 'FT'],
-ARRAY['', 'B', 'TF'],
-oneway:='dir');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeOneway('edge_table','{"",B,TF}','{"",B,FT}','{"",B,FT}','{"",B,TF}','dir','source','target',t)
-NOTICE:  Analyzing graph for one way street errors.
-NOTICE:  Analysis 25% complete ...
-NOTICE:  Analysis 50% complete ...
-NOTICE:  Analysis 75% complete ...
-NOTICE:  Analysis 100% complete ...
-NOTICE:  Found 0 potential problems in directionality
- pgr_analyzeoneway 
--------------------
- OK
-(1 row)
-
-ROLLBACK;
-ROLLBACK
diff --git a/src/topology/test/createVertTab-any.result b/src/topology/test/createVertTab-any.result
deleted file mode 100644
index 184821d..0000000
--- a/src/topology/test/createVertTab-any.result
+++ /dev/null
@@ -1,306 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
-SELECT  pgr_createVerticesTable('edge_table');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createVerticesTable('edge_table','the_geom','source','target','true')
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Populating public.edge_table_vertices_pgr, please wait...
-NOTICE:    ----->   VERTICES TABLE CREATED WITH  17 VERTICES
-NOTICE:                                         FOR   18  EDGES
-NOTICE:    Edges with NULL geometry,source or target: 0
-NOTICE:                              Edges processed: 18
-NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createverticestable 
--------------------------
- OK
-(1 row)
-
-SELECT  pgr_createVerticesTable('edge_table','the_geom','source','target');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createVerticesTable('edge_table','the_geom','source','target','true')
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Populating public.edge_table_vertices_pgr, please wait...
-NOTICE:    ----->   VERTICES TABLE CREATED WITH  17 VERTICES
-NOTICE:                                         FOR   18  EDGES
-NOTICE:    Edges with NULL geometry,source or target: 0
-NOTICE:                              Edges processed: 18
-NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createverticestable 
--------------------------
- OK
-(1 row)
-
-SELECT  pgr_createVerticesTable('edge_table',the_geom:='the_geom',source:='source',target:='target');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createVerticesTable('edge_table','the_geom','source','target','true')
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Populating public.edge_table_vertices_pgr, please wait...
-NOTICE:    ----->   VERTICES TABLE CREATED WITH  17 VERTICES
-NOTICE:                                         FOR   18  EDGES
-NOTICE:    Edges with NULL geometry,source or target: 0
-NOTICE:                              Edges processed: 18
-NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createverticestable 
--------------------------
- OK
-(1 row)
-
-SELECT  pgr_createVerticesTable('edge_table',source:='source',target:='target',the_geom:='the_geom');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createVerticesTable('edge_table','the_geom','source','target','true')
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Populating public.edge_table_vertices_pgr, please wait...
-NOTICE:    ----->   VERTICES TABLE CREATED WITH  17 VERTICES
-NOTICE:                                         FOR   18  EDGES
-NOTICE:    Edges with NULL geometry,source or target: 0
-NOTICE:                              Edges processed: 18
-NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createverticestable 
--------------------------
- OK
-(1 row)
-
-SELECT  pgr_createVerticesTable('edge_table',source:='source');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createVerticesTable('edge_table','the_geom','source','target','true')
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Populating public.edge_table_vertices_pgr, please wait...
-NOTICE:    ----->   VERTICES TABLE CREATED WITH  17 VERTICES
-NOTICE:                                         FOR   18  EDGES
-NOTICE:    Edges with NULL geometry,source or target: 0
-NOTICE:                              Edges processed: 18
-NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createverticestable 
--------------------------
- OK
-(1 row)
-
-SELECT  pgr_createVerticesTable('edge_table',rows_where:='id < 10');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createVerticesTable('edge_table','the_geom','source','target','id < 10')
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Populating public.edge_table_vertices_pgr, please wait...
-NOTICE:    ----->   VERTICES TABLE CREATED WITH  9 VERTICES
-NOTICE:                                         FOR   10  EDGES
-NOTICE:    Edges with NULL geometry,source or target: 0
-NOTICE:                              Edges processed: 10
-NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createverticestable 
--------------------------
- OK
-(1 row)
-
-SELECT  pgr_createVerticesTable('edge_table',rows_where:='the_geom && (select st_buffer(the_geom,0.5) FROM edge_table WHERE id=5)');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createVerticesTable('edge_table','the_geom','source','target','the_geom && (select st_buffer(the_geom,0.5) FROM edge_table WHERE id=5)')
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Populating public.edge_table_vertices_pgr, please wait...
-NOTICE:    ----->   VERTICES TABLE CREATED WITH  9 VERTICES
-NOTICE:                                         FOR   9  EDGES
-NOTICE:    Edges with NULL geometry,source or target: 0
-NOTICE:                              Edges processed: 9
-NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createverticestable 
--------------------------
- OK
-(1 row)
-
-CREATE TABLE otherTable AS  (SELECT 100 AS gid, st_point(2.5,2.5) AS other_geom) ;
-SELECT 1
-SELECT  pgr_createVerticesTable('edge_table',rows_where:='the_geom && (select st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createVerticesTable('edge_table','the_geom','source','target','the_geom && (select st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)')
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Populating public.edge_table_vertices_pgr, please wait...
-NOTICE:    ----->   VERTICES TABLE CREATED WITH  10 VERTICES
-NOTICE:                                         FOR   12  EDGES
-NOTICE:    Edges with NULL geometry,source or target: 0
-NOTICE:                              Edges processed: 12
-NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createverticestable 
--------------------------
- OK
-(1 row)
-
-CREATE TABLE mytable AS (SELECT id AS gid, the_geom AS mygeom,source AS src ,target AS tgt FROM edge_table) ;
-SELECT 18
-SELECT  pgr_createVerticesTable('mytable','mygeom','src','tgt');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createVerticesTable('mytable','mygeom','src','tgt','true')
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Populating public.mytable_vertices_pgr, please wait...
-NOTICE:    ----->   VERTICES TABLE CREATED WITH  17 VERTICES
-NOTICE:                                         FOR   18  EDGES
-NOTICE:    Edges with NULL geometry,source or target: 0
-NOTICE:                              Edges processed: 18
-NOTICE:  Vertices table for table public.mytable is: public.mytable_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createverticestable 
--------------------------
- OK
-(1 row)
-
-SELECT  pgr_createVerticesTable('mytable',the_geom:='mygeom',source:='src',target:='tgt');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createVerticesTable('mytable','mygeom','src','tgt','true')
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Populating public.mytable_vertices_pgr, please wait...
-NOTICE:    ----->   VERTICES TABLE CREATED WITH  17 VERTICES
-NOTICE:                                         FOR   18  EDGES
-NOTICE:    Edges with NULL geometry,source or target: 0
-NOTICE:                              Edges processed: 18
-NOTICE:  Vertices table for table public.mytable is: public.mytable_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createverticestable 
--------------------------
- OK
-(1 row)
-
-SELECT  pgr_createVerticesTable('mytable',source:='src',target:='tgt',the_geom:='mygeom');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createVerticesTable('mytable','mygeom','src','tgt','true')
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Populating public.mytable_vertices_pgr, please wait...
-NOTICE:    ----->   VERTICES TABLE CREATED WITH  17 VERTICES
-NOTICE:                                         FOR   18  EDGES
-NOTICE:    Edges with NULL geometry,source or target: 0
-NOTICE:                              Edges processed: 18
-NOTICE:  Vertices table for table public.mytable is: public.mytable_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createverticestable 
--------------------------
- OK
-(1 row)
-
-SELECT  pgr_createVerticesTable('mytable','mygeom','src','tgt',rows_where:='gid < 10');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createVerticesTable('mytable','mygeom','src','tgt','gid < 10')
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Populating public.mytable_vertices_pgr, please wait...
-NOTICE:    ----->   VERTICES TABLE CREATED WITH  9 VERTICES
-NOTICE:                                         FOR   10  EDGES
-NOTICE:    Edges with NULL geometry,source or target: 0
-NOTICE:                              Edges processed: 10
-NOTICE:  Vertices table for table public.mytable is: public.mytable_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createverticestable 
--------------------------
- OK
-(1 row)
-
-SELECT  pgr_createVerticesTable('mytable',source:='src',target:='tgt',the_geom:='mygeom',rows_where:='gid < 10');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createVerticesTable('mytable','mygeom','src','tgt','gid < 10')
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Populating public.mytable_vertices_pgr, please wait...
-NOTICE:    ----->   VERTICES TABLE CREATED WITH  9 VERTICES
-NOTICE:                                         FOR   10  EDGES
-NOTICE:    Edges with NULL geometry,source or target: 0
-NOTICE:                              Edges processed: 10
-NOTICE:  Vertices table for table public.mytable is: public.mytable_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createverticestable 
--------------------------
- OK
-(1 row)
-
-SELECT  pgr_createVerticesTable('mytable','mygeom','src','tgt',
-	                            rows_where:='mygeom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE gid=5)');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createVerticesTable('mytable','mygeom','src','tgt','mygeom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE gid=5)')
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Populating public.mytable_vertices_pgr, please wait...
-NOTICE:    ----->   VERTICES TABLE CREATED WITH  9 VERTICES
-NOTICE:                                         FOR   9  EDGES
-NOTICE:    Edges with NULL geometry,source or target: 0
-NOTICE:                              Edges processed: 9
-NOTICE:  Vertices table for table public.mytable is: public.mytable_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createverticestable 
--------------------------
- OK
-(1 row)
-
-SELECT  pgr_createVerticesTable('mytable',source:='src',target:='tgt',the_geom:='mygeom',
-	                            rows_where:='mygeom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE gid=5)');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createVerticesTable('mytable','mygeom','src','tgt','mygeom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE gid=5)')
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Populating public.mytable_vertices_pgr, please wait...
-NOTICE:    ----->   VERTICES TABLE CREATED WITH  9 VERTICES
-NOTICE:                                         FOR   9  EDGES
-NOTICE:    Edges with NULL geometry,source or target: 0
-NOTICE:                              Edges processed: 9
-NOTICE:  Vertices table for table public.mytable is: public.mytable_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createverticestable 
--------------------------
- OK
-(1 row)
-
-DROP TABLE IF EXISTS otherTable;
-DROP TABLE
-CREATE TABLE otherTable AS  (SELECT 100 AS gid, st_point(2.5,2.5) AS other_geom) ;
-SELECT 1
-SELECT  pgr_createVerticesTable('mytable','mygeom','src','tgt',
-	                            rows_where:='mygeom && (SELECT st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createVerticesTable('mytable','mygeom','src','tgt','mygeom && (SELECT st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)')
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Populating public.mytable_vertices_pgr, please wait...
-NOTICE:    ----->   VERTICES TABLE CREATED WITH  10 VERTICES
-NOTICE:                                         FOR   12  EDGES
-NOTICE:    Edges with NULL geometry,source or target: 0
-NOTICE:                              Edges processed: 12
-NOTICE:  Vertices table for table public.mytable is: public.mytable_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createverticestable 
--------------------------
- OK
-(1 row)
-
-SELECT  pgr_createVerticesTable('mytable',source:='src',target:='tgt',the_geom:='mygeom',
-	                            rows_where:='mygeom && (SELECT st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createVerticesTable('mytable','mygeom','src','tgt','mygeom && (SELECT st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)')
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Populating public.mytable_vertices_pgr, please wait...
-NOTICE:    ----->   VERTICES TABLE CREATED WITH  10 VERTICES
-NOTICE:                                         FOR   12  EDGES
-NOTICE:    Edges with NULL geometry,source or target: 0
-NOTICE:                              Edges processed: 12
-NOTICE:  Vertices table for table public.mytable is: public.mytable_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createverticestable 
--------------------------
- OK
-(1 row)
-
-SELECT pgr_createVerticesTable('edge_table');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createVerticesTable('edge_table','the_geom','source','target','true')
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Populating public.edge_table_vertices_pgr, please wait...
-NOTICE:    ----->   VERTICES TABLE CREATED WITH  17 VERTICES
-NOTICE:                                         FOR   18  EDGES
-NOTICE:    Edges with NULL geometry,source or target: 0
-NOTICE:                              Edges processed: 18
-NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createverticestable 
--------------------------
- OK
-(1 row)
-
-ROLLBACK;
-ROLLBACK
diff --git a/src/topology/test/createVertTab-any.test.sql b/src/topology/test/createVertTab-any.test.sql
deleted file mode 100644
index 2fbbc3f..0000000
--- a/src/topology/test/createVertTab-any.test.sql
+++ /dev/null
@@ -1,38 +0,0 @@
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
---                  PGR_createVerticesTable
-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
-
---    SELECT pgr_createTopology('edge_table',0.001);
-	 SELECT  pgr_createVerticesTable('edge_table');
-	 SELECT  pgr_createVerticesTable('edge_table','the_geom','source','target');
-	-- SELECT  pgr_createVerticesTable('edge_table','source','the_geom','target');
-	 SELECT  pgr_createVerticesTable('edge_table',the_geom:='the_geom',source:='source',target:='target');
-	 SELECT  pgr_createVerticesTable('edge_table',source:='source',target:='target',the_geom:='the_geom');
-	 SELECT  pgr_createVerticesTable('edge_table',source:='source');
-	 SELECT  pgr_createVerticesTable('edge_table',rows_where:='id < 10');
-	 SELECT  pgr_createVerticesTable('edge_table',rows_where:='the_geom && (select st_buffer(the_geom,0.5) FROM edge_table WHERE id=5)');
-	CREATE TABLE otherTable AS  (SELECT 100 AS gid, st_point(2.5,2.5) AS other_geom) ; 
-	 SELECT  pgr_createVerticesTable('edge_table',rows_where:='the_geom && (select st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)');
-	CREATE TABLE mytable AS (SELECT id AS gid, the_geom AS mygeom,source AS src ,target AS tgt FROM edge_table) ;
-	 SELECT  pgr_createVerticesTable('mytable','mygeom','src','tgt');
-	-- SELECT  pgr_createVerticesTable('mytable','src','mygeom','tgt');
-	 SELECT  pgr_createVerticesTable('mytable',the_geom:='mygeom',source:='src',target:='tgt');
-	 SELECT  pgr_createVerticesTable('mytable',source:='src',target:='tgt',the_geom:='mygeom');
-	 SELECT  pgr_createVerticesTable('mytable','mygeom','src','tgt',rows_where:='gid < 10');
-	 SELECT  pgr_createVerticesTable('mytable',source:='src',target:='tgt',the_geom:='mygeom',rows_where:='gid < 10');
-	 SELECT  pgr_createVerticesTable('mytable','mygeom','src','tgt',
-	                            rows_where:='mygeom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE gid=5)');
-	 SELECT  pgr_createVerticesTable('mytable',source:='src',target:='tgt',the_geom:='mygeom',
-	                            rows_where:='mygeom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE gid=5)');
-	DROP TABLE IF EXISTS otherTable;
-	CREATE TABLE otherTable AS  (SELECT 100 AS gid, st_point(2.5,2.5) AS other_geom) ; 
-	 SELECT  pgr_createVerticesTable('mytable','mygeom','src','tgt',
-	                            rows_where:='mygeom && (SELECT st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)');
-	 SELECT  pgr_createVerticesTable('mytable',source:='src',target:='tgt',the_geom:='mygeom',
-	                            rows_where:='mygeom && (SELECT st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)');
-
--------------------------------------
-	SELECT pgr_createVerticesTable('edge_table');
-
diff --git a/src/topology/test/doc-pgr_analyzeGraph.result b/src/topology/test/doc-pgr_analyzeGraph.result
deleted file mode 100644
index b98fe3c..0000000
--- a/src/topology/test/doc-pgr_analyzeGraph.result
+++ /dev/null
@@ -1,536 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
-SELECT  pgr_createTopology('edge_table',0.001, clean := true);
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createTopology('edge_table', 0.001, 'the_geom', 'id', 'source', 'target', rows_where := 'true', clean := t)
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Creating Topology, Please wait...
-NOTICE:  -------------> TOPOLOGY CREATED FOR  18 edges
-NOTICE:  Rows with NULL geometry or NULL id: 0
-NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createtopology 
---------------------
- OK
-(1 row)
-
-SELECT  pgr_analyzeGraph('edge_table',0.001);
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','true')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Analyzing for dead ends. Please wait...
-NOTICE:  Analyzing for gaps. Please wait...
-NOTICE:  Analyzing for isolated edges. Please wait...
-NOTICE:  Analyzing for ring geometries. Please wait...
-NOTICE:  Analyzing for intersections. Please wait...
-NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
-NOTICE:                    Isolated segments: 2
-NOTICE:                            Dead ends: 7
-NOTICE:  Potential gaps found near dead ends: 1
-NOTICE:               Intersections detected: 1
-NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
-------------------
- OK
-(1 row)
-
-SELECT  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','true')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Analyzing for dead ends. Please wait...
-NOTICE:  Analyzing for gaps. Please wait...
-NOTICE:  Analyzing for isolated edges. Please wait...
-NOTICE:  Analyzing for ring geometries. Please wait...
-NOTICE:  Analyzing for intersections. Please wait...
-NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
-NOTICE:                    Isolated segments: 2
-NOTICE:                            Dead ends: 7
-NOTICE:  Potential gaps found near dead ends: 1
-NOTICE:               Intersections detected: 1
-NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
-------------------
- OK
-(1 row)
-
-SELECT  pgr_analyzeGraph('edge_table',0.001,'id','the_geom','source','target');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('edge_table',0.001,'id','the_geom','source','target','true')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Got function st_srid(bigint) does not exist
-NOTICE:  ERROR: something went wrong when checking for SRID of id in table public.edge_table
- pgr_analyzegraph 
-------------------
- FAIL
-(1 row)
-
-SELECT  pgr_analyzeGraph('edge_table',0.001,the_geom:='the_geom',id:='id',source:='source',target:='target');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','true')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Analyzing for dead ends. Please wait...
-NOTICE:  Analyzing for gaps. Please wait...
-NOTICE:  Analyzing for isolated edges. Please wait...
-NOTICE:  Analyzing for ring geometries. Please wait...
-NOTICE:  Analyzing for intersections. Please wait...
-NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
-NOTICE:                    Isolated segments: 2
-NOTICE:                            Dead ends: 7
-NOTICE:  Potential gaps found near dead ends: 1
-NOTICE:               Intersections detected: 1
-NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
-------------------
- OK
-(1 row)
-
-SELECT  pgr_analyzeGraph('edge_table',0.001,source:='source',id:='id',target:='target',the_geom:='the_geom');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','true')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Analyzing for dead ends. Please wait...
-NOTICE:  Analyzing for gaps. Please wait...
-NOTICE:  Analyzing for isolated edges. Please wait...
-NOTICE:  Analyzing for ring geometries. Please wait...
-NOTICE:  Analyzing for intersections. Please wait...
-NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
-NOTICE:                    Isolated segments: 2
-NOTICE:                            Dead ends: 7
-NOTICE:  Potential gaps found near dead ends: 1
-NOTICE:               Intersections detected: 1
-NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
-------------------
- OK
-(1 row)
-
-SELECT  pgr_analyzeGraph('edge_table',0.001,source:='source');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','true')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Analyzing for dead ends. Please wait...
-NOTICE:  Analyzing for gaps. Please wait...
-NOTICE:  Analyzing for isolated edges. Please wait...
-NOTICE:  Analyzing for ring geometries. Please wait...
-NOTICE:  Analyzing for intersections. Please wait...
-NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
-NOTICE:                    Isolated segments: 2
-NOTICE:                            Dead ends: 7
-NOTICE:  Potential gaps found near dead ends: 1
-NOTICE:               Intersections detected: 1
-NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
-------------------
- OK
-(1 row)
-
-SELECT  pgr_analyzeGraph('edge_table',0.001,rows_where:='id < 10');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','id < 10')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Analyzing for dead ends. Please wait...
-NOTICE:  Analyzing for gaps. Please wait...
-NOTICE:  Analyzing for isolated edges. Please wait...
-NOTICE:  Analyzing for ring geometries. Please wait...
-NOTICE:  Analyzing for intersections. Please wait...
-NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
-NOTICE:                    Isolated segments: 0
-NOTICE:                            Dead ends: 4
-NOTICE:  Potential gaps found near dead ends: 0
-NOTICE:               Intersections detected: 0
-NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
-------------------
- OK
-(1 row)
-
-SELECT  pgr_analyzeGraph('edge_table',0.001,rows_where:='the_geom && (SELECT st_buffer(the_geom,0.05) FROM edge_table WHERE id=5)');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','the_geom && (SELECT st_buffer(the_geom,0.05) FROM edge_table WHERE id=5)')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Analyzing for dead ends. Please wait...
-NOTICE:  Analyzing for gaps. Please wait...
-NOTICE:  Analyzing for isolated edges. Please wait...
-NOTICE:  Analyzing for ring geometries. Please wait...
-NOTICE:  Analyzing for intersections. Please wait...
-NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
-NOTICE:                    Isolated segments: 0
-NOTICE:                            Dead ends: 5
-NOTICE:  Potential gaps found near dead ends: 0
-NOTICE:               Intersections detected: 0
-NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
-------------------
- OK
-(1 row)
-
-CREATE TABLE otherTable AS  (SELECT 100 AS gid, st_point(2.5,2.5) AS other_geom) ;
-SELECT 1
-SELECT  pgr_analyzeGraph('edge_table',0.001,rows_where:='the_geom && (SELECT st_buffer(other_geom,1) FROM otherTable WHERE gid=100)');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','the_geom && (SELECT st_buffer(other_geom,1) FROM otherTable WHERE gid=100)')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Analyzing for dead ends. Please wait...
-NOTICE:  Analyzing for gaps. Please wait...
-NOTICE:  Analyzing for isolated edges. Please wait...
-NOTICE:  Analyzing for ring geometries. Please wait...
-NOTICE:  Analyzing for intersections. Please wait...
-NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
-NOTICE:                    Isolated segments: 2
-NOTICE:                            Dead ends: 10
-NOTICE:  Potential gaps found near dead ends: 1
-NOTICE:               Intersections detected: 1
-NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
-------------------
- OK
-(1 row)
-
-CREATE TABLE mytable AS (SELECT id AS gid, source AS src ,target AS tgt , the_geom AS mygeom FROM edge_table);
-SELECT 18
-SELECT pgr_createTopology('mytable',0.001,'mygeom','gid','src','tgt', clean := true);
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createTopology('mytable', 0.001, 'mygeom', 'gid', 'src', 'tgt', rows_where := 'true', clean := t)
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Creating Topology, Please wait...
-NOTICE:  -------------> TOPOLOGY CREATED FOR  18 edges
-NOTICE:  Rows with NULL geometry or NULL id: 0
-NOTICE:  Vertices table for table public.mytable is: public.mytable_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createtopology 
---------------------
- OK
-(1 row)
-
-SELECT  pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt','true')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Analyzing for dead ends. Please wait...
-NOTICE:  Analyzing for gaps. Please wait...
-NOTICE:  Analyzing for isolated edges. Please wait...
-NOTICE:  Analyzing for ring geometries. Please wait...
-NOTICE:  Analyzing for intersections. Please wait...
-NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
-NOTICE:                    Isolated segments: 2
-NOTICE:                            Dead ends: 7
-NOTICE:  Potential gaps found near dead ends: 1
-NOTICE:               Intersections detected: 1
-NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
-------------------
- OK
-(1 row)
-
-SELECT  pgr_analyzeGraph('mytable',0.0001,'gid','mygeom','src','tgt');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('mytable',0.0001,'gid','mygeom','src','tgt','true')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Got function st_srid(bigint) does not exist
-NOTICE:  ERROR: something went wrong when checking for SRID of gid in table public.mytable
- pgr_analyzegraph 
-------------------
- FAIL
-(1 row)
-
-SELECT  pgr_analyzeGraph('mytable',0.001,the_geom:='mygeom',id:='gid',source:='src',target:='tgt');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt','true')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Analyzing for dead ends. Please wait...
-NOTICE:  Analyzing for gaps. Please wait...
-NOTICE:  Analyzing for isolated edges. Please wait...
-NOTICE:  Analyzing for ring geometries. Please wait...
-NOTICE:  Analyzing for intersections. Please wait...
-NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
-NOTICE:                    Isolated segments: 2
-NOTICE:                            Dead ends: 7
-NOTICE:  Potential gaps found near dead ends: 1
-NOTICE:               Intersections detected: 1
-NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
-------------------
- OK
-(1 row)
-
-SELECT  pgr_analyzeGraph('mytable',0.001,source:='src',id:='gid',target:='tgt',the_geom:='mygeom');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt','true')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Analyzing for dead ends. Please wait...
-NOTICE:  Analyzing for gaps. Please wait...
-NOTICE:  Analyzing for isolated edges. Please wait...
-NOTICE:  Analyzing for ring geometries. Please wait...
-NOTICE:  Analyzing for intersections. Please wait...
-NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
-NOTICE:                    Isolated segments: 2
-NOTICE:                            Dead ends: 7
-NOTICE:  Potential gaps found near dead ends: 1
-NOTICE:               Intersections detected: 1
-NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
-------------------
- OK
-(1 row)
-
-SELECT  pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt',rows_where:='gid < 10');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt','gid < 10')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Analyzing for dead ends. Please wait...
-NOTICE:  Analyzing for gaps. Please wait...
-NOTICE:  Analyzing for isolated edges. Please wait...
-NOTICE:  Analyzing for ring geometries. Please wait...
-NOTICE:  Analyzing for intersections. Please wait...
-NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
-NOTICE:                    Isolated segments: 0
-NOTICE:                            Dead ends: 4
-NOTICE:  Potential gaps found near dead ends: 0
-NOTICE:               Intersections detected: 0
-NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
-------------------
- OK
-(1 row)
-
-SELECT  pgr_analyzeGraph('mytable',0.001,source:='src',id:='gid',target:='tgt',the_geom:='mygeom',rows_where:='gid < 10');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt','gid < 10')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Analyzing for dead ends. Please wait...
-NOTICE:  Analyzing for gaps. Please wait...
-NOTICE:  Analyzing for isolated edges. Please wait...
-NOTICE:  Analyzing for ring geometries. Please wait...
-NOTICE:  Analyzing for intersections. Please wait...
-NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
-NOTICE:                    Isolated segments: 0
-NOTICE:                            Dead ends: 4
-NOTICE:  Potential gaps found near dead ends: 0
-NOTICE:               Intersections detected: 0
-NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
-------------------
- OK
-(1 row)
-
-SELECT  pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt',
-    rows_where:='mygeom && (SELECT st_buffer(mygeom,1) FROM mytable WHERE gid=5)');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt','mygeom && (SELECT st_buffer(mygeom,1) FROM mytable WHERE gid=5)')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Analyzing for dead ends. Please wait...
-NOTICE:  Analyzing for gaps. Please wait...
-NOTICE:  Analyzing for isolated edges. Please wait...
-NOTICE:  Analyzing for ring geometries. Please wait...
-NOTICE:  Analyzing for intersections. Please wait...
-NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
-NOTICE:                    Isolated segments: 1
-NOTICE:                            Dead ends: 5
-NOTICE:  Potential gaps found near dead ends: 0
-NOTICE:               Intersections detected: 1
-NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
-------------------
- OK
-(1 row)
-
-SELECT  pgr_analyzeGraph('mytable',0.001,source:='src',id:='gid',target:='tgt',the_geom:='mygeom',
-    rows_where:='mygeom && (SELECT st_buffer(mygeom,1) FROM mytable WHERE gid=5)');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt','mygeom && (SELECT st_buffer(mygeom,1) FROM mytable WHERE gid=5)')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Analyzing for dead ends. Please wait...
-NOTICE:  Analyzing for gaps. Please wait...
-NOTICE:  Analyzing for isolated edges. Please wait...
-NOTICE:  Analyzing for ring geometries. Please wait...
-NOTICE:  Analyzing for intersections. Please wait...
-NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
-NOTICE:                    Isolated segments: 1
-NOTICE:                            Dead ends: 5
-NOTICE:  Potential gaps found near dead ends: 0
-NOTICE:               Intersections detected: 1
-NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
-------------------
- OK
-(1 row)
-
-DROP TABLE IF EXISTS otherTable;
-DROP TABLE
-CREATE TABLE otherTable AS  (SELECT 'myhouse'::text AS place, st_point(2.5,2.5) AS other_geom) ;
-SELECT 1
-SELECT  pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt',
-    rows_where:='mygeom && (SELECT st_buffer(other_geom,1) FROM otherTable WHERE place='||quote_literal('myhouse')||')');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt','mygeom && (SELECT st_buffer(other_geom,1) FROM otherTable WHERE place='myhouse')')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Analyzing for dead ends. Please wait...
-NOTICE:  Analyzing for gaps. Please wait...
-NOTICE:  Analyzing for isolated edges. Please wait...
-NOTICE:  Analyzing for ring geometries. Please wait...
-NOTICE:  Analyzing for intersections. Please wait...
-NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
-NOTICE:                    Isolated segments: 2
-NOTICE:                            Dead ends: 10
-NOTICE:  Potential gaps found near dead ends: 1
-NOTICE:               Intersections detected: 1
-NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
-------------------
- OK
-(1 row)
-
-SELECT  pgr_analyzeGraph('mytable',0.001,source:='src',id:='gid',target:='tgt',the_geom:='mygeom',
-    rows_where:='mygeom && (SELECT st_buffer(other_geom,1) FROM otherTable WHERE place='||quote_literal('myhouse')||')');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt','mygeom && (SELECT st_buffer(other_geom,1) FROM otherTable WHERE place='myhouse')')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Analyzing for dead ends. Please wait...
-NOTICE:  Analyzing for gaps. Please wait...
-NOTICE:  Analyzing for isolated edges. Please wait...
-NOTICE:  Analyzing for ring geometries. Please wait...
-NOTICE:  Analyzing for intersections. Please wait...
-NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
-NOTICE:                    Isolated segments: 2
-NOTICE:                            Dead ends: 10
-NOTICE:  Potential gaps found near dead ends: 1
-NOTICE:               Intersections detected: 1
-NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
-------------------
- OK
-(1 row)
-
-SELECT  pgr_createTopology('edge_table',0.001, clean := true);
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createTopology('edge_table', 0.001, 'the_geom', 'id', 'source', 'target', rows_where := 'true', clean := t)
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Creating Topology, Please wait...
-NOTICE:  -------------> TOPOLOGY CREATED FOR  18 edges
-NOTICE:  Rows with NULL geometry or NULL id: 0
-NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createtopology 
---------------------
- OK
-(1 row)
-
-SELECT pgr_analyzeGraph('edge_table', 0.001);
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','true')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Analyzing for dead ends. Please wait...
-NOTICE:  Analyzing for gaps. Please wait...
-NOTICE:  Analyzing for isolated edges. Please wait...
-NOTICE:  Analyzing for ring geometries. Please wait...
-NOTICE:  Analyzing for intersections. Please wait...
-NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
-NOTICE:                    Isolated segments: 2
-NOTICE:                            Dead ends: 7
-NOTICE:  Potential gaps found near dead ends: 1
-NOTICE:               Intersections detected: 1
-NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
-------------------
- OK
-(1 row)
-
-SELECT  pgr_analyzeGraph('edge_table',0.001,rows_where:='id < 10');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','id < 10')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Analyzing for dead ends. Please wait...
-NOTICE:  Analyzing for gaps. Please wait...
-NOTICE:  Analyzing for isolated edges. Please wait...
-NOTICE:  Analyzing for ring geometries. Please wait...
-NOTICE:  Analyzing for intersections. Please wait...
-NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
-NOTICE:                    Isolated segments: 0
-NOTICE:                            Dead ends: 4
-NOTICE:  Potential gaps found near dead ends: 0
-NOTICE:               Intersections detected: 0
-NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
-------------------
- OK
-(1 row)
-
-SELECT  pgr_analyzeGraph('edge_table',0.001,rows_where:='id >= 10');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','id >= 10')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Analyzing for dead ends. Please wait...
-NOTICE:  Analyzing for gaps. Please wait...
-NOTICE:  Analyzing for isolated edges. Please wait...
-NOTICE:  Analyzing for ring geometries. Please wait...
-NOTICE:  Analyzing for intersections. Please wait...
-NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
-NOTICE:                    Isolated segments: 2
-NOTICE:                            Dead ends: 8
-NOTICE:  Potential gaps found near dead ends: 1
-NOTICE:               Intersections detected: 1
-NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
-------------------
- OK
-(1 row)
-
-SELECT  pgr_analyzeGraph('edge_table',0.001,rows_where:='id < 17');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','id < 17')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Analyzing for dead ends. Please wait...
-NOTICE:  Analyzing for gaps. Please wait...
-NOTICE:  Analyzing for isolated edges. Please wait...
-NOTICE:  Analyzing for ring geometries. Please wait...
-NOTICE:  Analyzing for intersections. Please wait...
-NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
-NOTICE:                    Isolated segments: 0
-NOTICE:                            Dead ends: 3
-NOTICE:  Potential gaps found near dead ends: 0
-NOTICE:               Intersections detected: 0
-NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
-------------------
- OK
-(1 row)
-
-SELECT pgr_createTopology('edge_table', 0.001,rows_where:='id <17', clean := true);
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createTopology('edge_table', 0.001, 'the_geom', 'id', 'source', 'target', rows_where := 'id <17', clean := t)
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Creating Topology, Please wait...
-NOTICE:  -------------> TOPOLOGY CREATED FOR  16 edges
-NOTICE:  Rows with NULL geometry or NULL id: 0
-NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createtopology 
---------------------
- OK
-(1 row)
-
-SELECT pgr_analyzeGraph('edge_table', 0.001);
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','true')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Analyzing for dead ends. Please wait...
-NOTICE:  Analyzing for gaps. Please wait...
-NOTICE:  Analyzing for isolated edges. Please wait...
-NOTICE:  Analyzing for ring geometries. Please wait...
-NOTICE:  Analyzing for intersections. Please wait...
-NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
-NOTICE:                    Isolated segments: 0
-NOTICE:                            Dead ends: 3
-NOTICE:  Potential gaps found near dead ends: 0
-NOTICE:               Intersections detected: 0
-NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
-------------------
- OK
-(1 row)
-
-ROLLBACK;
-ROLLBACK
diff --git a/src/topology/test/doc-pgr_createTopology.result b/src/topology/test/doc-pgr_createTopology.result
deleted file mode 100644
index 3b3e195..0000000
--- a/src/topology/test/doc-pgr_createTopology.result
+++ /dev/null
@@ -1,262 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
-DROP TABLE edge_table_vertices_pgr;
-DROP TABLE
-UPDATE edge_table SET source = NULL,  target = NULL;
-UPDATE 18
---q1
-SELECT  pgr_createTopology('edge_table', 0.001);
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createTopology('edge_table', 0.001, 'the_geom', 'id', 'source', 'target', rows_where := 'true', clean := f)
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Creating Topology, Please wait...
-NOTICE:  -------------> TOPOLOGY CREATED FOR  18 edges
-NOTICE:  Rows with NULL geometry or NULL id: 0
-NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createtopology 
---------------------
- OK
-(1 row)
-
---q1.1
-DROP TABLE edge_table_vertices_pgr;
-DROP TABLE
-UPDATE edge_table SET source = NULL,  target = NULL;
-UPDATE 18
---q2
-SELECT  pgr_createTopology('edge_table', 0.001,
-    'the_geom', 'id', 'source', 'target');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createTopology('edge_table', 0.001, 'the_geom', 'id', 'source', 'target', rows_where := 'true', clean := f)
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Creating Topology, Please wait...
-NOTICE:  -------------> TOPOLOGY CREATED FOR  18 edges
-NOTICE:  Rows with NULL geometry or NULL id: 0
-NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createtopology 
---------------------
- OK
-(1 row)
-
---q2.1
-SET client_min_messages TO NOTICE;
-SET
---q3
-SELECT  pgr_createTopology('edge_table', 0.001,
-    'id', 'the_geom');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createTopology('edge_table', 0.001, 'id', 'the_geom', 'source', 'target', rows_where := 'true', clean := f)
-NOTICE:  Performing checks, please wait .....
-NOTICE:  ----> PGR ERROR in pgr_createTopology: Wrong type of Column id:the_geom
-NOTICE:  Unexpected error raise_exception
- pgr_createtopology 
---------------------
- FAIL
-(1 row)
-
---q3.1
-SET client_min_messages TO WARNING;
-SET
-DROP TABLE edge_table_vertices_pgr;
-DROP TABLE
-UPDATE edge_table SET source = NULL,  target = NULL;
-UPDATE 18
---q4
-SELECT  pgr_createTopology('edge_table', 0.001,
-    the_geom:='the_geom', id:='id', source:='source', target:='target');
- pgr_createtopology 
---------------------
- OK
-(1 row)
-
---q4.1
-DROP TABLE edge_table_vertices_pgr;
-DROP TABLE
-UPDATE edge_table SET source = NULL,  target = NULL;
-UPDATE 18
---q5
-SELECT  pgr_createTopology('edge_table', 0.001,
-    source:='source', id:='id', target:='target', the_geom:='the_geom');
- pgr_createtopology 
---------------------
- OK
-(1 row)
-
---q5.1
-DROP TABLE edge_table_vertices_pgr;
-DROP TABLE
-UPDATE edge_table SET source = NULL,  target = NULL;
-UPDATE 18
---q6
-SELECT  pgr_createTopology('edge_table', 0.001, source:='source');
- pgr_createtopology 
---------------------
- OK
-(1 row)
-
---q6.1
---q7
-SELECT  pgr_createTopology('edge_table', 0.001, rows_where:='id < 10');
- pgr_createtopology 
---------------------
- OK
-(1 row)
-
---q7.1
---q8
-SELECT  pgr_createTopology('edge_table', 0.001,
-    rows_where:='the_geom && (SELECT st_buffer(the_geom, 0.05) FROM edge_table WHERE id=5)');
- pgr_createtopology 
---------------------
- OK
-(1 row)
-
---q8.1
---q9
-CREATE TABLE otherTable AS  (SELECT 100 AS gid,  st_point(2.5, 2.5) AS other_geom);
-SELECT 1
-SELECT  pgr_createTopology('edge_table', 0.001,
-    rows_where:='the_geom && (SELECT st_buffer(other_geom, 1) FROM otherTable WHERE gid=100)');
- pgr_createtopology 
---------------------
- OK
-(1 row)
-
---q9.1
---q10
-CREATE TABLE mytable AS (SELECT id AS gid,  the_geom AS mygeom, source AS src , target AS tgt FROM edge_table) ;
-SELECT 18
---q10.1
---q11
-SELECT  pgr_createTopology('mytable', 0.001, 'mygeom', 'gid', 'src', 'tgt', clean := TRUE);
- pgr_createtopology 
---------------------
- OK
-(1 row)
-
---q11.1
-DROP TABLE mytable_vertices_pgr;
-DROP TABLE
-UPDATE mytable SET src = NULL,  tgt = NULL;
-UPDATE 18
-SET client_min_messages TO NOTICE;
-SET
---q12
-SELECT  pgr_createTopology('mytable', 0.001, 'gid', 'mygeom', 'src', 'tgt');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createTopology('mytable', 0.001, 'gid', 'mygeom', 'src', 'tgt', rows_where := 'true', clean := f)
-NOTICE:  Performing checks, please wait .....
-NOTICE:  ----> PGR ERROR in pgr_createTopology: Wrong type of Column id:mygeom
-NOTICE:  Unexpected error raise_exception
- pgr_createtopology 
---------------------
- FAIL
-(1 row)
-
---q12.1
-SET client_min_messages TO WARNING;
-SET
---q13
-SELECT  pgr_createTopology('mytable', 0.001, the_geom:='mygeom', id:='gid', source:='src', target:='tgt');
- pgr_createtopology 
---------------------
- OK
-(1 row)
-
---q13.1
-DROP TABLE mytable_vertices_pgr;
-DROP TABLE
-UPDATE mytable SET src = NULL,  tgt = NULL;
-UPDATE 18
---q14
-SELECT  pgr_createTopology('mytable', 0.001, source:='src', id:='gid', target:='tgt', the_geom:='mygeom');
- pgr_createtopology 
---------------------
- OK
-(1 row)
-
---q14.1
---q15
-SELECT  pgr_createTopology('mytable', 0.001, 'mygeom', 'gid', 'src', 'tgt', rows_where:='gid < 10');
- pgr_createtopology 
---------------------
- OK
-(1 row)
-
-SELECT  pgr_createTopology('mytable', 0.001, source:='src', id:='gid', target:='tgt', the_geom:='mygeom', rows_where:='gid < 10');
- pgr_createtopology 
---------------------
- OK
-(1 row)
-
-SELECT  pgr_createTopology('mytable', 0.001, 'mygeom', 'gid', 'src', 'tgt',
-    rows_where:='mygeom && (SELECT st_buffer(mygeom, 1) FROM mytable WHERE gid=5)');
- pgr_createtopology 
---------------------
- OK
-(1 row)
-
-SELECT  pgr_createTopology('mytable', 0.001, source:='src', id:='gid', target:='tgt', the_geom:='mygeom',
-    rows_where:='mygeom && (SELECT st_buffer(mygeom, 1) FROM mytable WHERE gid=5)');
- pgr_createtopology 
---------------------
- OK
-(1 row)
-
---q15.1
---q16
-SELECT  pgr_createTopology('mytable', 0.001, 'mygeom', 'gid', 'src', 'tgt',
-    rows_where:='mygeom && (SELECT st_buffer(other_geom, 1) FROM otherTable WHERE gid=100)');
- pgr_createtopology 
---------------------
- OK
-(1 row)
-
-SELECT  pgr_createTopology('mytable', 0.001, source:='src', id:='gid', target:='tgt', the_geom:='mygeom',
-    rows_where:='mygeom && (SELECT st_buffer(other_geom, 1) FROM otherTable WHERE gid=100)');
- pgr_createtopology 
---------------------
- OK
-(1 row)
-
---q16.1
-SET client_min_messages TO NOTICE;
-SET
---q17
-SELECT pgr_createTopology('edge_table',  0.001, rows_where:='id < 6', clean := true);
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createTopology('edge_table', 0.001, 'the_geom', 'id', 'source', 'target', rows_where := 'id < 6', clean := t)
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Creating Topology, Please wait...
-NOTICE:  -------------> TOPOLOGY CREATED FOR  5 edges
-NOTICE:  Rows with NULL geometry or NULL id: 0
-NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createtopology 
---------------------
- OK
-(1 row)
-
-SELECT pgr_createTopology('edge_table',  0.001);
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createTopology('edge_table', 0.001, 'the_geom', 'id', 'source', 'target', rows_where := 'true', clean := f)
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Creating Topology, Please wait...
-NOTICE:  -------------> TOPOLOGY CREATED FOR  13 edges
-NOTICE:  Rows with NULL geometry or NULL id: 0
-NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createtopology 
---------------------
- OK
-(1 row)
-
---q17.1
-SET client_min_messages TO NOTICE;
-SET
-ROLLBACK;
-ROLLBACK
diff --git a/src/topology/test/issue900.result b/src/topology/test/issue900.result
deleted file mode 100644
index f9550c0..0000000
--- a/src/topology/test/issue900.result
+++ /dev/null
@@ -1,25 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
-ALTER TABLE edge_table RENAME TO mbta_arc;
-ALTER TABLE
-CREATE TABLE edge_table AS SELECT * FROM mbta_arc;
-SELECT 18
-;
-SELECT pgr_CreateTopology('edge_table', 0.001, 'the_geom', 'id', clean := true);
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createTopology('edge_table', 0.001, 'the_geom', 'id', 'source', 'target', rows_where := 'true', clean := t)
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Creating Topology, Please wait...
-NOTICE:  -------------> TOPOLOGY CREATED FOR  18 edges
-NOTICE:  Rows with NULL geometry or NULL id: 0
-NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createtopology 
---------------------
-OK
-(1 row)
-
-ROLLBACK;
-ROLLBACK
diff --git a/src/topology/test/nodeNetwork-any.result b/src/topology/test/nodeNetwork-any.result
deleted file mode 100644
index dc96f0f..0000000
--- a/src/topology/test/nodeNetwork-any.result
+++ /dev/null
@@ -1,204 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
-SELECT pgr_createTopology('edge_table', 0.001, clean := TRUE);
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createTopology('edge_table', 0.001, 'the_geom', 'id', 'source', 'target', rows_where := 'true', clean := t)
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Creating Topology, Please wait...
-NOTICE:  -------------> TOPOLOGY CREATED FOR  18 edges
-NOTICE:  Rows with NULL geometry or NULL id: 0
-NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createtopology 
---------------------
- OK
-(1 row)
-
-SELECT pgr_analyzegraph('edge_table', 0.001);
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','true')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Analyzing for dead ends. Please wait...
-NOTICE:  Analyzing for gaps. Please wait...
-NOTICE:  Analyzing for isolated edges. Please wait...
-NOTICE:  Analyzing for ring geometries. Please wait...
-NOTICE:  Analyzing for intersections. Please wait...
-NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
-NOTICE:                    Isolated segments: 2
-NOTICE:                            Dead ends: 7
-NOTICE:  Potential gaps found near dead ends: 1
-NOTICE:               Intersections detected: 1
-NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
-------------------
- OK
-(1 row)
-
-SELECT pgr_nodeNetwork('edge_table', 0.001);
-NOTICE:  PROCESSING:
-NOTICE:  pgr_nodeNetwork('edge_table', 0.001, 'id', 'the_geom', 'noded', '<NULL>',  f)
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Processing, please wait .....
-NOTICE:    Split Edges: 3
-NOTICE:   Untouched Edges: 15
-NOTICE:       Total original Edges: 18
-NOTICE:   Edges generated: 6
-NOTICE:   Untouched Edges: 15
-NOTICE:         Total New segments: 21
-NOTICE:   New Table: public.edge_table_noded
-NOTICE:  ----------------------------------
- pgr_nodenetwork 
------------------
- OK
-(1 row)
-
-SELECT old_id,sub_id FROM edge_table_noded ORDER BY old_id,sub_id;
- old_id | sub_id 
---------+--------
-      1 |      1
-      2 |      1
-      3 |      1
-      4 |      1
-      5 |      1
-      6 |      1
-      7 |      1
-      8 |      1
-      9 |      1
-     10 |      1
-     11 |      1
-     12 |      1
-     13 |      1
-     13 |      2
-     14 |      1
-     14 |      2
-     15 |      1
-     16 |      1
-     17 |      1
-     18 |      1
-     18 |      2
-(21 rows)
-
-SELECT pgr_createTopology('edge_table_noded', 0.001);
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createTopology('edge_table_noded', 0.001, 'the_geom', 'id', 'source', 'target', rows_where := 'true', clean := f)
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Creating Topology, Please wait...
-NOTICE:  -------------> TOPOLOGY CREATED FOR  21 edges
-NOTICE:  Rows with NULL geometry or NULL id: 0
-NOTICE:  Vertices table for table public.edge_table_noded is: public.edge_table_noded_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createtopology 
---------------------
- OK
-(1 row)
-
-SELECT pgr_analyzegraph('edge_table_noded', 0.001);
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('edge_table_noded',0.001,'the_geom','id','source','target','true')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Analyzing for dead ends. Please wait...
-NOTICE:  Analyzing for gaps. Please wait...
-NOTICE:  Analyzing for isolated edges. Please wait...
-NOTICE:  Analyzing for ring geometries. Please wait...
-NOTICE:  Analyzing for intersections. Please wait...
-NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
-NOTICE:                    Isolated segments: 0
-NOTICE:                            Dead ends: 6
-NOTICE:  Potential gaps found near dead ends: 0
-NOTICE:               Intersections detected: 0
-NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
-------------------
- OK
-(1 row)
-
-alter table edge_table drop column if exists old_id;
-NOTICE:  column "old_id" of relation "edge_table" does not exist, skipping
-ALTER TABLE
-alter table edge_table add column old_id integer;
-ALTER TABLE
-insert into edge_table (old_id,dir,cost,reverse_cost,the_geom)
-   (with
-       segmented as (select old_id,count(*) as i from edge_table_noded group by old_id)
-   select  segments.old_id,dir,cost,reverse_cost,segments.the_geom
-       from edge_table as edges join edge_table_noded as segments on (edges.id = segments.old_id) 
-       where edges.id in (select old_id from segmented where i>1) );
-INSERT 0 6
-SELECT pgr_createTopology('edge_table', 0.001);
-NOTICE:  PROCESSING:
-NOTICE:  pgr_createTopology('edge_table', 0.001, 'the_geom', 'id', 'source', 'target', rows_where := 'true', clean := f)
-NOTICE:  Performing checks, please wait .....
-NOTICE:  Creating Topology, Please wait...
-NOTICE:  -------------> TOPOLOGY CREATED FOR  6 edges
-NOTICE:  Rows with NULL geometry or NULL id: 0
-NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
-NOTICE:  ----------------------------------------------
- pgr_createtopology 
---------------------
- OK
-(1 row)
-
-SELECT pgr_analyzegraph('edge_table', 0.001,rows_where:='id not in (select old_id from edge_table where old_id is not null)');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','id not in (select old_id from edge_table where old_id is not null)')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Analyzing for dead ends. Please wait...
-NOTICE:  Analyzing for gaps. Please wait...
-NOTICE:  Analyzing for isolated edges. Please wait...
-NOTICE:  Analyzing for ring geometries. Please wait...
-NOTICE:  Analyzing for intersections. Please wait...
-NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
-NOTICE:                    Isolated segments: 0
-NOTICE:                            Dead ends: 6
-NOTICE:  Potential gaps found near dead ends: 0
-NOTICE:               Intersections detected: 0
-NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
-------------------
- OK
-(1 row)
-
-SELECT pgr_analyzegraph('edge_table', 0.001,rows_where:='old_id is null');
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','old_id is null')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Analyzing for dead ends. Please wait...
-NOTICE:  Analyzing for gaps. Please wait...
-NOTICE:  Analyzing for isolated edges. Please wait...
-NOTICE:  Analyzing for ring geometries. Please wait...
-NOTICE:  Analyzing for intersections. Please wait...
-NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
-NOTICE:                    Isolated segments: 2
-NOTICE:                            Dead ends: 7
-NOTICE:  Potential gaps found near dead ends: 1
-NOTICE:               Intersections detected: 1
-NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
-------------------
- OK
-(1 row)
-
-SELECT pgr_analyzegraph('edge_table', 0.001);
-NOTICE:  PROCESSING:
-NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','true')
-NOTICE:  Performing checks, please wait ...
-NOTICE:  Analyzing for dead ends. Please wait...
-NOTICE:  Analyzing for gaps. Please wait...
-NOTICE:  Analyzing for isolated edges. Please wait...
-NOTICE:  Analyzing for ring geometries. Please wait...
-NOTICE:  Analyzing for intersections. Please wait...
-NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
-NOTICE:                    Isolated segments: 0
-NOTICE:                            Dead ends: 3
-NOTICE:  Potential gaps found near dead ends: 0
-NOTICE:               Intersections detected: 5
-NOTICE:                      Ring geometries: 0
- pgr_analyzegraph 
-------------------
- OK
-(1 row)
-
-ROLLBACK;
-ROLLBACK
diff --git a/src/topology/test/nodeNetwork-any.test.sql b/src/topology/test/nodeNetwork-any.test.sql
deleted file mode 100644
index 0c272a4..0000000
--- a/src/topology/test/nodeNetwork-any.test.sql
+++ /dev/null
@@ -1,24 +0,0 @@
---                pgr_nodeNetwork
---------------------------------------------------------------------------------
-
-
-SELECT pgr_createTopology('edge_table', 0.001, clean := TRUE);
-SELECT pgr_analyzegraph('edge_table', 0.001);
-SELECT pgr_nodeNetwork('edge_table', 0.001);
-SELECT old_id,sub_id FROM edge_table_noded ORDER BY old_id,sub_id;
-SELECT pgr_createTopology('edge_table_noded', 0.001);
-SELECT pgr_analyzegraph('edge_table_noded', 0.001);
-alter table edge_table drop column if exists old_id;
-alter table edge_table add column old_id integer;
-insert into edge_table (old_id,dir,cost,reverse_cost,the_geom)
-   (with
-       segmented as (select old_id,count(*) as i from edge_table_noded group by old_id)
-   select  segments.old_id,dir,cost,reverse_cost,segments.the_geom
-       from edge_table as edges join edge_table_noded as segments on (edges.id = segments.old_id) 
-       where edges.id in (select old_id from segmented where i>1) );
-
-SELECT pgr_createTopology('edge_table', 0.001);
-SELECT pgr_analyzegraph('edge_table', 0.001,rows_where:='id not in (select old_id from edge_table where old_id is not null)');
-SELECT pgr_analyzegraph('edge_table', 0.001,rows_where:='old_id is null');
-SELECT pgr_analyzegraph('edge_table', 0.001);
-
diff --git a/src/topology/test/test.conf b/src/topology/test/test.conf
deleted file mode 100644
index 9e91da9..0000000
--- a/src/topology/test/test.conf
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/perl -w
-
-%main::tests = (
-    'any' => {
-        'comment' => 'pgr_createTopology, pgr_analyzegraph, and pgr_analyzeOneway tests for any versions.',
-        'data' => [ ],
-        'tests' => [qw( 
-            issue900
-            analyzeOneway-any
-            createVertTab-any
-            doc-pgr_createTopology
-            doc-pgr_analyzeGraph
-            nodeNetwork-any
-            )],
-
-        'documentation' => [qw(
-            doc-pgr_analyzeGraph
-            doc-pgr_createTopology
-            )],
-
-        'dummyStorage' => [qw(
-            )]
-
-    },
-# 'vpg-vpgis' => {}, # for version specific tests
-# '8-1' => {}, # for pg 8.x and postgis 1.x
-# '9.2-2.1' => {}, # for pg 9.2 and postgis 2.1
-);
-
-1;
diff --git a/src/trsp/CMakeLists.txt b/src/trsp/CMakeLists.txt
new file mode 100644
index 0000000..6f8ce3a
--- /dev/null
+++ b/src/trsp/CMakeLists.txt
@@ -0,0 +1,14 @@
+add_library(trsp OBJECT 
+    # keeping these for backwards compatibility
+    trsp.c
+    trsp_core.cpp
+    GraphDefinition.cpp
+    
+    
+    new_trsp.c
+    edgeInfo.cpp
+    pgr_trspHandler.cpp
+    rule.cpp
+    trsp_driver.cpp
+
+    )
diff --git a/src/trsp/GraphDefinition.cpp b/src/trsp/GraphDefinition.cpp
new file mode 100644
index 0000000..9057c41
--- /dev/null
+++ b/src/trsp/GraphDefinition.cpp
@@ -0,0 +1,801 @@
+/*PGR-GNU*****************************************************************
+
+File: GraphDefinition.cpp
+
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#ifdef __MINGW32__
+#include <winsock2.h>
+#include <windows.h>
+#endif
+
+
+#include <functional>
+#include "trsp/GraphDefinition.h"
+
+// -------------------------------------------------------------------------
+GraphDefinition::GraphDefinition(void) {
+    m_lStartEdgeId = -1;
+    m_lEndEdgeId = 0;
+    m_dStartpart = 0.0;
+    m_dEndPart = 0.0;
+    m_dCost = NULL;
+    m_bIsturnRestrictOn = false;
+    m_bIsGraphConstructed = false;
+    parent = NULL;
+    init();
+}
+
+// -------------------------------------------------------------------------
+GraphDefinition::~GraphDefinition(void) {
+}
+
+
+// -------------------------------------------------------------------------
+void GraphDefinition::init() {
+    max_edge_id = 0;
+    max_node_id = 0;
+    isStartVirtual = false;
+    isEndVirtual = false;
+}
+
+
+// -------------------------------------------------------------------------
+void GraphDefinition::deleteall() {
+    std::vector<GraphEdgeInfo*>::iterator it;
+    for (it = m_vecEdgeVector.begin(); it != m_vecEdgeVector.end(); it++) {
+        delete *it;
+    }
+    m_vecEdgeVector.clear();
+
+    delete [] parent;
+    delete [] m_dCost;
+}
+
+
+// -------------------------------------------------------------------------
+double GraphDefinition::construct_path(long ed_id, long v_pos) {
+    if (parent[ed_id].ed_ind[v_pos] == -1) {
+        path_element_tt pelement;
+        GraphEdgeInfo* cur_edge = m_vecEdgeVector[ed_id];
+        if (v_pos == 0) {
+            pelement.vertex_id = cur_edge->m_lStartNode;
+            pelement.cost = cur_edge->m_dCost;
+        } else {
+            pelement.vertex_id = cur_edge->m_lEndNode;
+            pelement.cost = cur_edge->m_dReverseCost;
+        }
+        pelement.edge_id = cur_edge->m_lEdgeID;
+
+        m_vecPath.push_back(pelement);
+        return pelement.cost;
+    }
+    double ret = construct_path(parent[ed_id].ed_ind[v_pos],
+        parent[ed_id].v_pos[v_pos]);
+    path_element_tt pelement;
+    GraphEdgeInfo* cur_edge = m_vecEdgeVector[ed_id];
+    if (v_pos == 0) {
+        pelement.vertex_id = cur_edge->m_lStartNode;
+        pelement.cost = m_dCost[ed_id].endCost - ret;  // cur_edge.m_dCost;
+        ret = m_dCost[ed_id].endCost;
+    } else {
+        pelement.vertex_id = cur_edge->m_lEndNode;
+        pelement.cost = m_dCost[ed_id].startCost - ret;
+        ret = m_dCost[ed_id].startCost;
+    }
+    pelement.edge_id = cur_edge->m_lEdgeID;
+
+    m_vecPath.push_back(pelement);
+
+    return ret;
+}
+
+
+// -------------------------------------------------------------------------
+double GraphDefinition::getRestrictionCost(
+    long edge_ind,
+    GraphEdgeInfo& new_edge,
+    bool isStart) {
+    double cost = 0.0;
+    long edge_id = new_edge.m_lEdgeID;
+    if (m_ruleTable.find(edge_id) == m_ruleTable.end()) {
+        return(0.0);
+    }
+    std::vector<Rule> vecRules = m_ruleTable[edge_id];
+    long st_edge_ind = edge_ind;
+    for (const auto &rule : vecRules) {
+        bool flag = true;
+        long v_pos = (isStart?0:1);
+        edge_ind = st_edge_ind;
+        for (auto const &precedence : rule.precedencelist) {
+            if (edge_ind == -1) {
+                flag = false;
+                break;
+            }
+            if (precedence != m_vecEdgeVector[edge_ind]->m_lEdgeID) {
+                flag = false;
+                break;
+            }
+            auto parent_ind = parent[edge_ind].ed_ind[v_pos];
+            v_pos = parent[edge_ind].v_pos[v_pos];
+            edge_ind = parent_ind;
+        }
+        if (flag)
+            cost += rule.cost;
+    }
+    return cost;
+}
+
+
+// -------------------------------------------------------------------------
+void GraphDefinition::explore(
+    long cur_node,
+    GraphEdgeInfo& cur_edge,
+    bool isStart,
+    LongVector &vecIndex,
+    std::priority_queue<PDP, std::vector<PDP>,
+    std::greater<PDP> > &que) {
+    double extCost = 0.0;
+    GraphEdgeInfo* new_edge;
+    double totalCost;
+    for (const auto &index : vecIndex) {
+        new_edge = m_vecEdgeVector[index];
+        extCost = 0.0;
+        if (m_bIsturnRestrictOn) {
+            extCost = getRestrictionCost(cur_edge.m_lEdgeIndex,
+                 *new_edge, isStart);
+        }
+        if (new_edge->m_lStartNode == cur_node) {
+            if (new_edge->m_dCost >= 0.0) {
+                if (isStart)
+                    totalCost = m_dCost[cur_edge.m_lEdgeIndex].endCost +
+                    new_edge->m_dCost + extCost;
+                else
+                    totalCost = m_dCost[cur_edge.m_lEdgeIndex].startCost +
+                    new_edge->m_dCost + extCost;
+                if (totalCost < m_dCost[index].endCost) {
+                    m_dCost[index].endCost = totalCost;
+                    parent[new_edge->m_lEdgeIndex].v_pos[0] = (isStart?0:1);
+                    parent[new_edge->m_lEdgeIndex].ed_ind[0] =
+                     cur_edge.m_lEdgeIndex;
+                    que.push(std::make_pair(totalCost,
+                        std::make_pair(new_edge->m_lEdgeIndex, true)));
+                }
+            }
+        } else {
+            if (new_edge->m_dReverseCost >= 0.0) {
+                if (isStart)
+                    totalCost = m_dCost[cur_edge.m_lEdgeIndex].endCost +
+                    new_edge->m_dReverseCost + extCost;
+                else
+                    totalCost = m_dCost[cur_edge.m_lEdgeIndex].startCost +
+                    new_edge->m_dReverseCost + extCost;
+                if (totalCost < m_dCost[index].startCost) {
+                    m_dCost[index].startCost = totalCost;
+                    parent[new_edge->m_lEdgeIndex].v_pos[1] = (isStart?0:1);
+                    parent[new_edge->m_lEdgeIndex].ed_ind[1] =
+                    cur_edge.m_lEdgeIndex;
+                    que.push(std::make_pair(totalCost,
+                        std::make_pair(new_edge->m_lEdgeIndex, false)));
+                }
+            }
+        }
+    }
+}
+
+
+// -------------------------------------------------------------------------
+int GraphDefinition::multi_dijkstra(
+    edge_t *edges,
+    size_t edge_count,
+    std::vector<int> vertices,
+    bool directed,
+    bool has_reverse_cost,
+    path_element_tt **path,
+    size_t *path_count,
+    char **err_msg,
+    std::vector<PDVI> &ruleList) {
+    construct_graph(edges, edge_count, has_reverse_cost, directed);
+    if (ruleList.size() > 0) {
+        m_ruleTable.clear();
+        LongVector vecsource;
+        for (const auto &rule : ruleList) {
+            std::vector<long> temp_precedencelist;
+            temp_precedencelist.clear();
+            for (auto const &seq : rule.second) {
+                temp_precedencelist.push_back(seq);
+            }
+            long dest_edge_id = rule.second[0];
+            if (m_ruleTable.find(dest_edge_id) != m_ruleTable.end()) {
+                m_ruleTable[dest_edge_id].push_back(Rule(rule.first,
+                    temp_precedencelist));
+            } else {
+                std::vector<Rule> temprules;
+                temprules.clear();
+                temprules.push_back(Rule(rule.first, temp_precedencelist));
+                m_ruleTable.insert(std::make_pair(dest_edge_id, temprules));
+            }
+        }
+        m_bIsturnRestrictOn = true;
+    }
+    parent = new PARENT_PATH[edge_count + 1];
+    m_dCost = new CostHolder[edge_count + 1];
+    m_vecPath.clear();
+    size_t i;
+    size_t total_vertices = vertices.size();
+    for (i = 0; i < total_vertices - 1; i++) {
+        int ret = my_dijkstra(vertices[i], vertices[i + 1], edge_count,
+                err_msg);
+        if (ret < 0) {
+            deleteall();
+            return -1;
+        }
+    }
+
+    *path = (path_element_tt *) malloc(sizeof(path_element_tt) *
+    (m_vecPath.size() + 1));
+    *path_count = static_cast<int>(m_vecPath.size());
+
+    for (size_t  i = 0; i < *path_count; i++) {
+        (*path)[i].vertex_id = m_vecPath[i].vertex_id;
+        (*path)[i].edge_id = m_vecPath[i].edge_id;
+        (*path)[i].cost = m_vecPath[i].cost;
+    }
+    deleteall();
+    return 0;
+}
+
+
+// -------------------------------------------------------------------------
+int GraphDefinition::my_dijkstra(long start_vertex, long end_vertex,
+    size_t edge_count, char **err_msg) {
+    if (!m_bIsGraphConstructed) {
+        *err_msg = (char *)"Graph not Ready!";
+        return -1;
+    }
+    unsigned int i;
+    for (i = 0; i <= edge_count; i++) {
+        m_dCost[i].startCost = 1e15;
+        m_dCost[i].endCost = 1e15;
+    }
+
+    if (m_mapNodeId2Edge.find(start_vertex) == m_mapNodeId2Edge.end()) {
+        *err_msg = (char *)"Source Not Found";
+        deleteall();
+        return -1;
+    }
+
+    if (m_mapNodeId2Edge.find(end_vertex) == m_mapNodeId2Edge.end()) {
+        *err_msg = (char *)"Destination Not Found";
+        deleteall();
+        return -1;
+    }
+
+    std::priority_queue<PDP, std::vector<PDP>, std::greater<PDP> > que;
+    LongVector vecsource = m_mapNodeId2Edge[start_vertex];
+    GraphEdgeInfo* cur_edge = NULL;
+
+    for (const auto &source : vecsource) {
+        cur_edge = m_vecEdgeVector[source];
+        if (cur_edge->m_lStartNode == start_vertex) {
+            if (cur_edge->m_dCost >= 0.0) {
+                m_dCost[cur_edge->m_lEdgeIndex].endCost = cur_edge->m_dCost;
+                parent[cur_edge->m_lEdgeIndex].v_pos[0] = -1;
+                parent[cur_edge->m_lEdgeIndex].ed_ind[0] = -1;
+                que.push(std::make_pair(cur_edge->m_dCost,
+                    std::make_pair(cur_edge->m_lEdgeIndex, true)));
+                }
+            } else {
+                if (cur_edge->m_dReverseCost >= 0.0) {
+                    m_dCost[cur_edge->m_lEdgeIndex].startCost =
+                    cur_edge->m_dReverseCost;
+                    parent[cur_edge->m_lEdgeIndex].v_pos[1] = -1;
+                    parent[cur_edge->m_lEdgeIndex].ed_ind[1] = -1;
+                    que.push(std::make_pair(cur_edge->m_dReverseCost,
+                        std::make_pair(cur_edge->m_lEdgeIndex, false)));
+                    }
+            }
+        }
+
+        long cur_node = -1;
+
+        while (!que.empty()) {
+            PDP cur_pos = que.top();
+            que.pop();
+            long cured_index = cur_pos.second.first;
+            cur_edge = m_vecEdgeVector[cured_index];
+
+            if (cur_pos.second.second) {  // explore edges connected to end node
+                cur_node = cur_edge->m_lEndNode;
+                if (cur_edge->m_dCost < 0.0)
+                    continue;
+                if (cur_node == end_vertex)
+                    break;
+                explore(cur_node, *cur_edge, true,
+                    cur_edge->m_vecEndConnedtedEdge, que);
+            } else {  // explore edges connected to start node
+                cur_node = cur_edge->m_lStartNode;
+                if (cur_edge->m_dReverseCost < 0.0)
+                    continue;
+                if (cur_node == end_vertex)
+                    break;
+                explore(cur_node, *cur_edge, false,
+                    cur_edge->m_vecStartConnectedEdge, que);
+            }
+        }
+        if (cur_node != end_vertex) {
+            *err_msg = (char *)"Path Not Found";
+            deleteall();
+            return -1;
+        } else {
+            if (cur_node == cur_edge->m_lStartNode) {
+                construct_path(cur_edge->m_lEdgeIndex, 1);
+            } else {
+                construct_path(cur_edge->m_lEdgeIndex, 0);
+            }
+            path_element_tt pelement;
+            pelement.vertex_id = end_vertex;
+            pelement.edge_id = -1;
+            pelement.cost = 0.0;
+            m_vecPath.push_back(pelement);
+        }
+    return 0;
+}
+
+
+// -------------------------------------------------------------------------
+int GraphDefinition::my_dijkstra(edge_t *edges, size_t edge_count,
+    long start_edge_id, double start_part, long end_edge_id, double end_part,
+    bool directed, bool has_reverse_cost, path_element_tt **path,
+    size_t *path_count, char **err_msg, std::vector<PDVI> &ruleList) {
+    if (!m_bIsGraphConstructed) {
+            init();
+            construct_graph(edges, edge_count, has_reverse_cost, directed);
+            m_bIsGraphConstructed = true;
+        }
+        GraphEdgeInfo* start_edge_info =
+        m_vecEdgeVector[m_mapEdgeId2Index[start_edge_id]];
+        edge_t start_edge;
+        long start_vertex, end_vertex;
+        m_dStartpart = start_part;
+        m_dEndPart = end_part;
+        m_lStartEdgeId = start_edge_id;
+        m_lEndEdgeId = end_edge_id;
+
+        if (start_part == 0.0) {
+            start_vertex = start_edge_info->m_lStartNode;
+        } else if (start_part == 1.0) {
+            start_vertex = start_edge_info->m_lEndNode;
+        } else {
+            isStartVirtual = true;
+            m_lStartEdgeId = start_edge_id;
+            start_vertex = max_node_id + 1;
+            max_node_id++;
+            start_edge.id = max_edge_id + 1;
+            max_edge_id++;
+            start_edge.source = start_vertex;
+            start_edge.reverse_cost = -1.0;
+            if (start_edge_info->m_dCost >= 0.0) {
+                start_edge.target = start_edge_info->m_lEndNode;
+                start_edge.cost = (1.0 - start_part) * start_edge_info->m_dCost;
+                addEdge(start_edge);
+                edge_count++;
+            }
+            if (start_edge_info->m_dReverseCost >= 0.0) {
+                start_edge.id = max_edge_id + 1;
+                max_edge_id++;
+                start_edge.target = start_edge_info->m_lStartNode;
+                start_edge.cost = start_part * start_edge_info->m_dReverseCost;
+                addEdge(start_edge);
+                edge_count++;
+            }
+        }
+
+    GraphEdgeInfo* end_edge_info =
+    m_vecEdgeVector[m_mapEdgeId2Index[end_edge_id]];
+    edge_t end_edge;
+
+    if (end_part == 0.0) {
+        end_vertex = end_edge_info->m_lStartNode;
+    } else if (end_part == 1.0) {
+        end_vertex = end_edge_info->m_lEndNode;
+    } else {
+        isEndVirtual = true;
+        m_lEndEdgeId = end_edge_id;
+        end_vertex = max_node_id + 1;
+        max_node_id++;
+        end_edge.id = max_edge_id + 1;
+        max_edge_id++;
+        end_edge.target = end_vertex;
+        end_edge.reverse_cost = -1.0;
+        if (end_edge_info->m_dCost >= 0.0) {
+            end_edge.source = end_edge_info->m_lStartNode;
+            end_edge.cost = end_part * end_edge_info->m_dCost;
+            addEdge(end_edge);
+            edge_count++;
+        }
+        if (end_edge_info->m_dReverseCost >= 0.0) {
+            end_edge.source = end_edge_info->m_lEndNode;
+            end_edge.id = max_edge_id + 1;
+            end_edge.cost = (1.0 - end_part) * end_edge_info->m_dReverseCost;
+            addEdge(end_edge);
+            edge_count++;
+        }
+    }
+
+    return(my_dijkstra(edges, edge_count, start_vertex, end_vertex, directed,
+        has_reverse_cost, path, path_count, err_msg, ruleList));
+}
+
+
+// -------------------------------------------------------------------------
+int GraphDefinition:: my_dijkstra(edge_t *edges, size_t edge_count,
+    long start_vertex, long end_vertex, bool directed, bool has_reverse_cost,
+    path_element_tt **path, size_t *path_count, char **err_msg,
+    std::vector<PDVI> &ruleList) {
+    m_ruleTable.clear();
+    LongVector vecsource;
+    for (const auto &rule : ruleList) {
+        size_t j;
+        size_t seq_cnt = rule.second.size();
+        std::vector<long> temp_precedencelist;
+        temp_precedencelist.clear();
+        for (j = 1; j < seq_cnt; j++) {
+            temp_precedencelist.push_back(rule.second[j]);
+        }
+        long dest_edge_id = rule.second[0];
+        if (m_ruleTable.find(dest_edge_id) != m_ruleTable.end()) {
+            m_ruleTable[dest_edge_id].push_back(Rule(rule.first,
+                temp_precedencelist));
+        } else {
+            std::vector<Rule> temprules;
+            temprules.clear();
+            temprules.push_back(Rule(rule.first, temp_precedencelist));
+            m_ruleTable.insert(std::make_pair(dest_edge_id, temprules));
+        }
+
+        if (isStartVirtual) {
+            if (seq_cnt == 2 && rule.second[1] == m_lStartEdgeId) {
+                vecsource = m_mapNodeId2Edge[start_vertex];
+                for (const auto &source : vecsource) {
+                    temp_precedencelist.clear();
+                    temp_precedencelist.push_back(
+                        m_vecEdgeVector[source]->m_lEdgeID);
+                    m_ruleTable[dest_edge_id].push_back(Rule(rule.first,
+                        temp_precedencelist));
+                }
+            }
+        }
+    }
+    if (isEndVirtual) {
+        if (m_ruleTable.find(m_lEndEdgeId) != m_ruleTable.end()) {
+            std::vector<Rule> tmpRules = m_ruleTable[m_lEndEdgeId];
+            vecsource = m_mapNodeId2Edge[end_vertex];
+            for (const auto &source : vecsource) {
+                m_ruleTable.insert(std::make_pair(
+                    m_vecEdgeVector[source]->m_lEdgeID, tmpRules));
+            }
+        }
+    }
+    m_bIsturnRestrictOn = true;
+    return(my_dijkstra(edges, edge_count, start_vertex, end_vertex, directed,
+        has_reverse_cost, path, path_count, err_msg));
+}
+
+
+// -------------------------------------------------------------------------
+int GraphDefinition:: my_dijkstra(edge_t *edges, size_t edge_count,
+    long start_vertex, long end_vertex, bool directed, bool has_reverse_cost,
+    path_element_tt **path, size_t *path_count, char **err_msg) {
+    if (!m_bIsGraphConstructed) {
+        init();
+        construct_graph(edges, edge_count, has_reverse_cost, directed);
+        m_bIsGraphConstructed = true;
+    }
+
+    std::priority_queue<PDP, std::vector<PDP>, std::greater<PDP> > que;
+    parent = new PARENT_PATH[edge_count + 1];
+    m_dCost = new CostHolder[edge_count + 1];
+    m_vecPath.clear();
+
+    unsigned int i;
+    for (i = 0; i <= edge_count; i++) {
+        m_dCost[i].startCost = 1e15;
+        m_dCost[i].endCost = 1e15;
+    }
+
+    if (m_mapNodeId2Edge.find(start_vertex) == m_mapNodeId2Edge.end()) {
+        *err_msg = (char *)"Source Not Found";
+        deleteall();
+        return -1;
+    }
+
+    if (m_mapNodeId2Edge.find(end_vertex) == m_mapNodeId2Edge.end()) {
+        *err_msg = (char *)"Destination Not Found";
+        deleteall();
+        return -1;
+    }
+
+    LongVector vecsource = m_mapNodeId2Edge[start_vertex];
+    GraphEdgeInfo* cur_edge = NULL;
+
+    for (const auto &source : vecsource) {
+        cur_edge = m_vecEdgeVector[source];
+        if (cur_edge->m_lStartNode == start_vertex) {
+            if (cur_edge->m_dCost >= 0.0) {
+                m_dCost[cur_edge->m_lEdgeIndex].endCost = cur_edge->m_dCost;
+                parent[cur_edge->m_lEdgeIndex].v_pos[0] = -1;
+                parent[cur_edge->m_lEdgeIndex].ed_ind[0] = -1;
+                que.push(std::make_pair(cur_edge->m_dCost,
+                    std::make_pair(cur_edge->m_lEdgeIndex, true)));
+            }
+        } else {
+            if (cur_edge->m_dReverseCost >= 0.0) {
+                m_dCost[cur_edge->m_lEdgeIndex].startCost =
+                cur_edge->m_dReverseCost;
+                parent[cur_edge->m_lEdgeIndex].v_pos[1] = -1;
+                parent[cur_edge->m_lEdgeIndex].ed_ind[1] = -1;
+                que.push(std::make_pair(cur_edge->m_dReverseCost,
+                    std::make_pair(cur_edge->m_lEdgeIndex, false)));
+            }
+        }
+    }
+    long cur_node = -1;
+
+    while (!que.empty()) {
+        PDP cur_pos = que.top();
+        que.pop();
+        long cured_index = cur_pos.second.first;
+        cur_edge = m_vecEdgeVector[cured_index];
+
+        if (cur_pos.second.second) {  // explore edges connected to end node
+            cur_node = cur_edge->m_lEndNode;
+            if (cur_edge->m_dCost < 0.0)
+                continue;
+            if (cur_node == end_vertex)
+                break;
+            explore(cur_node, *cur_edge, true, cur_edge->m_vecEndConnedtedEdge,
+                que);
+        } else {  // explore edges connected to start node
+            cur_node = cur_edge->m_lStartNode;
+            if (cur_edge->m_dReverseCost < 0.0)
+                continue;
+            if (cur_node == end_vertex)
+                break;
+            explore(cur_node, *cur_edge, false,
+                cur_edge->m_vecStartConnectedEdge, que);
+        }
+    }
+    if (cur_node != end_vertex) {
+        if (m_lStartEdgeId == m_lEndEdgeId) {
+            if (get_single_cost(1000.0, path, path_count)) {
+                return 0;
+            }
+        }
+        *err_msg = (char *)"Path Not Found";
+        deleteall();
+        return -1;
+    } else {
+        double total_cost;
+        if (cur_node == cur_edge->m_lStartNode) {
+            total_cost = m_dCost[cur_edge->m_lEdgeIndex].startCost;
+            construct_path(cur_edge->m_lEdgeIndex, 1);
+        } else {
+            total_cost = m_dCost[cur_edge->m_lEdgeIndex].endCost;
+            construct_path(cur_edge->m_lEdgeIndex, 0);
+        }
+        path_element_tt pelement;
+        pelement.vertex_id = end_vertex;
+        pelement.edge_id = -1;
+        pelement.cost = 0.0;
+        m_vecPath.push_back(pelement);
+
+        if (m_lStartEdgeId == m_lEndEdgeId) {
+            if (get_single_cost(total_cost, path, path_count)) {
+                return 0;
+            }
+        }
+
+        *path = (path_element_tt *) malloc(sizeof(path_element_tt) *
+        (m_vecPath.size() + 1));
+        *path_count = static_cast<int>(m_vecPath.size());
+
+        for (size_t i = 0; i < *path_count; i++) {
+            (*path)[i].vertex_id = m_vecPath[i].vertex_id;
+            (*path)[i].edge_id = m_vecPath[i].edge_id;
+            (*path)[i].cost = m_vecPath[i].cost;
+        }
+        if (isStartVirtual) {
+            (*path)[0].vertex_id = -1;
+            (*path)[0].edge_id = m_lStartEdgeId;
+        }
+        if (isEndVirtual) {
+            *path_count = *path_count - 1;
+            (*path)[*path_count - 1].edge_id = m_lEndEdgeId;
+        }
+    }
+    deleteall();
+    return 0;
+}
+
+
+// -------------------------------------------------------------------------
+bool GraphDefinition::get_single_cost(double total_cost, path_element_tt **path,
+     size_t *path_count) {
+    GraphEdgeInfo* start_edge_info =
+    m_vecEdgeVector[m_mapEdgeId2Index[m_lStartEdgeId]];
+    if (m_dEndPart >= m_dStartpart) {
+        if (start_edge_info->m_dCost >= 0.0 && start_edge_info->m_dCost *
+            (m_dEndPart - m_dStartpart) <= total_cost) {
+            *path = (path_element_tt *) malloc(sizeof(path_element_tt) * (1));
+            *path_count = 1;
+            (*path)[0].vertex_id = -1;
+            (*path)[0].edge_id = m_lStartEdgeId;
+            (*path)[0].cost = start_edge_info->m_dCost *
+            (m_dEndPart - m_dStartpart);
+
+            return true;
+        }
+    } else {
+        if (start_edge_info->m_dReverseCost >= 0.0 &&
+            start_edge_info->m_dReverseCost * (m_dStartpart - m_dEndPart) <=
+            total_cost) {
+            *path = (path_element_tt *) malloc(sizeof(path_element_tt) * (1));
+            *path_count = 1;
+            (*path)[0].vertex_id = -1;
+            (*path)[0].edge_id = m_lStartEdgeId;
+            (*path)[0].cost = start_edge_info->m_dReverseCost *
+            (m_dStartpart - m_dEndPart);
+
+            return true;
+        }
+    }
+    return false;
+}
+
+
+// -------------------------------------------------------------------------
+bool GraphDefinition::construct_graph(edge_t* edges, size_t edge_count,
+    bool has_reverse_cost, bool directed) {
+    for (size_t i = 0; i < edge_count; i++) {
+        if (!has_reverse_cost) {
+            if (directed) {
+                edges[i].reverse_cost = -1.0;
+            } else {
+                edges[i].reverse_cost = edges[i].cost;
+            }
+        }
+        addEdge(edges[i]);
+    }
+    m_bIsGraphConstructed = true;
+    return true;
+}
+
+
+// -------------------------------------------------------------------------
+bool GraphDefinition::connectEdge(GraphEdgeInfo& firstEdge,
+    GraphEdgeInfo& secondEdge, bool bIsStartNodeSame) {
+    if (bIsStartNodeSame) {
+        if (firstEdge.m_dReverseCost >= 0.0)
+            firstEdge.m_vecStartConnectedEdge.push_back(
+                secondEdge.m_lEdgeIndex);
+        if (firstEdge.m_lStartNode == secondEdge.m_lStartNode) {
+            if (secondEdge.m_dReverseCost >= 0.0)
+                secondEdge.m_vecStartConnectedEdge.push_back(
+                    firstEdge.m_lEdgeIndex);
+        } else {
+            if (secondEdge.m_dCost >= 0.0)
+                secondEdge.m_vecEndConnedtedEdge.push_back(
+                    firstEdge.m_lEdgeIndex);
+        }
+    } else {
+        if (firstEdge.m_dCost >= 0.0)
+            firstEdge.m_vecEndConnedtedEdge.push_back(secondEdge.m_lEdgeIndex);
+        if (firstEdge.m_lEndNode == secondEdge.m_lStartNode) {
+            if (secondEdge.m_dReverseCost >= 0.0)
+                secondEdge.m_vecStartConnectedEdge.push_back(
+                    firstEdge.m_lEdgeIndex);
+        } else {
+            if (secondEdge.m_dCost >= 0.0)
+                secondEdge.m_vecEndConnedtedEdge.push_back(
+                    firstEdge.m_lEdgeIndex);
+        }
+    }
+    return true;
+}
+
+
+// -------------------------------------------------------------------------
+bool GraphDefinition::addEdge(edge_t edgeIn) {
+    // long lTest;
+    Long2LongMap::iterator itMap = m_mapEdgeId2Index.find(edgeIn.id);
+    if (itMap != m_mapEdgeId2Index.end())
+        return false;
+
+
+    GraphEdgeInfo* newEdge = new GraphEdgeInfo();
+    newEdge->m_vecStartConnectedEdge.clear();
+    newEdge->m_vecEndConnedtedEdge.clear();
+    newEdge->m_vecRestrictedEdge.clear();
+    newEdge->m_lEdgeID = edgeIn.id;
+    newEdge->m_lEdgeIndex = m_vecEdgeVector.size();
+    newEdge->m_lStartNode = edgeIn.source;
+    newEdge->m_lEndNode = edgeIn.target;
+    newEdge->m_dCost = edgeIn.cost;
+    newEdge->m_dReverseCost = edgeIn.reverse_cost;
+
+    if (edgeIn.id > max_edge_id) {
+        max_edge_id = edgeIn.id;
+    }
+
+    if (newEdge->m_lStartNode > max_node_id) {
+        max_node_id = newEdge->m_lStartNode;
+    }
+    if (newEdge->m_lEndNode > max_node_id) {
+        max_node_id = newEdge->m_lEndNode;
+    }
+
+    // Searching the start node for connectivity
+    Long2LongVectorMap::iterator itNodeMap = m_mapNodeId2Edge.find(
+        edgeIn.source);
+    if (itNodeMap != m_mapNodeId2Edge.end()) {
+        // Connect current edge with existing edge with start node
+        // connectEdge(
+        long lEdgeCount = itNodeMap->second.size();
+        long lEdgeIndex;
+        for (lEdgeIndex = 0; lEdgeIndex < lEdgeCount; lEdgeIndex++) {
+            long lEdge = itNodeMap->second.at(lEdgeIndex);
+            connectEdge(*newEdge, *m_vecEdgeVector[lEdge], true);
+        }
+    }
+
+
+    // Searching the end node for connectivity
+    itNodeMap = m_mapNodeId2Edge.find(edgeIn.target);
+    if (itNodeMap != m_mapNodeId2Edge.end()) {
+        // Connect current edge with existing edge with end node
+        // connectEdge(
+        long lEdgeCount = itNodeMap->second.size();
+        long lEdgeIndex;
+        for (lEdgeIndex = 0; lEdgeIndex < lEdgeCount; lEdgeIndex++) {
+            long lEdge = itNodeMap->second.at(lEdgeIndex);
+            connectEdge(*newEdge, *m_vecEdgeVector[lEdge], false);
+        }
+    }
+
+
+
+    // Add this node and edge into the data structure
+    m_mapNodeId2Edge[edgeIn.source].push_back(newEdge->m_lEdgeIndex);
+    m_mapNodeId2Edge[edgeIn.target].push_back(newEdge->m_lEdgeIndex);
+
+
+    // Adding edge to the list
+    m_mapEdgeId2Index.insert(std::make_pair(newEdge->m_lEdgeID,
+        m_vecEdgeVector.size()));
+    m_vecEdgeVector.push_back(newEdge);
+
+    //
+
+
+    return true;
+}
diff --git a/src/trsp/edgeInfo.cpp b/src/trsp/edgeInfo.cpp
new file mode 100644
index 0000000..062c43b
--- /dev/null
+++ b/src/trsp/edgeInfo.cpp
@@ -0,0 +1,44 @@
+/*PGR-GNU*****************************************************************
+
+FILE: edgeInfo.cpp
+
+Copyright (c) 2017 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+aint64_t with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ ********************************************************************PGR-GNU*/
+
+#include "trsp/edgeInfo.h"
+
+
+namespace pgrouting {
+namespace trsp {
+
+EdgeInfo::EdgeInfo(
+            pgr_edge_t edgeIn,
+            size_t edgeIndex) :
+        m_edge(edgeIn),
+        m_edgeIndex(edgeIndex),
+        m_startConnectedEdge(),
+        m_endConnectedEdge()
+
+        {}
+
+}  // namespace trsp
+}  // namespace pgrouting
+
diff --git a/src/trsp/new_trsp.c b/src/trsp/new_trsp.c
new file mode 100644
index 0000000..156c9d6
--- /dev/null
+++ b/src/trsp/new_trsp.c
@@ -0,0 +1,207 @@
+/*PGR-GNU*****************************************************************
+
+File: new_trsp.c
+
+Copyright (c) 2017 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+
+#include "c_common/postgres_connection.h"
+#include "utils/array.h"
+
+
+#include "drivers/trsp/trsp_driver.h"
+
+#include "c_common/debug_macro.h"
+#include "c_common/e_report.h"
+#include "c_common/time_msg.h"
+
+#include "c_types/pgr_edge_t.h"
+#include "c_types/restriction_t.h"
+#include "c_types/general_path_element_t.h"
+
+#include "c_common/edges_input.h"
+#include "c_common/restrictions_input.h"
+#include "c_common/arrays_input.h"
+
+PGDLLEXPORT Datum turn_restriction(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(turn_restriction);
+
+
+static
+void compute_trsp(
+        char* edges_sql,
+        char* restrictions_sql,
+
+        ArrayType *starts,
+        ArrayType *ends,
+
+        bool directed,
+
+        General_path_element_t **result_tuples,
+        size_t *result_count) {
+    pgr_SPI_connect();
+
+    pgr_edge_t *edges = NULL;
+    size_t total_edges = 0;
+    pgr_get_edges(edges_sql, &edges, &total_edges);
+
+    Restriction_t * restrictions = NULL;
+    size_t total_restrictions = 0;
+    pgr_get_restrictions(restrictions_sql, &restrictions, &total_restrictions);
+
+    int64_t* start_vidsArr = NULL;
+    size_t size_start_vidsArr = 0;
+    start_vidsArr = (int64_t*)
+        pgr_get_bigIntArray(&size_start_vidsArr, starts);
+
+    int64_t* end_vidsArr = NULL;
+    size_t size_end_vidsArr = 0;
+    end_vidsArr = (int64_t*)
+        pgr_get_bigIntArray(&size_end_vidsArr, ends);
+
+    PGR_DBG("Starting timer");
+    clock_t start_t = clock();
+    char* log_msg = NULL;
+    char* notice_msg = NULL;
+    char* err_msg = NULL;
+
+    do_trsp(
+            edges,
+            total_edges,
+
+            restrictions,
+            total_restrictions,
+
+            start_vidsArr, size_start_vidsArr,
+            end_vidsArr, size_end_vidsArr,
+
+            directed,
+
+            result_tuples,
+            result_count,
+            &log_msg,
+            &notice_msg,
+            &err_msg);
+    time_msg("processing _pgr_trsp", start_t, clock());
+
+    if (err_msg && (*result_tuples)) {
+        pfree(*result_tuples);
+        (*result_tuples) = NULL;
+        (*result_count) = 0;
+    }
+
+    pgr_global_report(log_msg, notice_msg, err_msg);
+
+    pgr_SPI_finish();
+}
+
+
+
+PGDLLEXPORT Datum
+turn_restriction(PG_FUNCTION_ARGS) {
+    FuncCallContext     *funcctx;
+    TupleDesc            tuple_desc;
+
+    size_t result_count             = 0;
+    General_path_element_t  *result_tuples   = NULL;
+
+    // stuff done only on the first call of the function
+    if (SRF_IS_FIRSTCALL()) {
+        MemoryContext   oldcontext;
+        funcctx = SRF_FIRSTCALL_INIT();
+        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
+
+        PGR_DBG("Calling compute_trsp");
+        compute_trsp(
+                text_to_cstring(PG_GETARG_TEXT_P(0)),
+                text_to_cstring(PG_GETARG_TEXT_P(1)),
+                PG_GETARG_ARRAYTYPE_P(2),
+                PG_GETARG_ARRAYTYPE_P(3),
+                PG_GETARG_BOOL(4),
+                &result_tuples, &result_count);
+
+        //-----------------------------------------------
+
+#if PGSQL_VERSION > 95
+        funcctx->max_calls = result_count;
+#else
+        funcctx->max_calls = (uint32_t)result_count;
+#endif
+
+        funcctx->user_fctx = result_tuples;
+        if (get_call_result_type(fcinfo, NULL, &tuple_desc)
+                != TYPEFUNC_COMPOSITE) {
+            ereport(ERROR,
+                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+                     errmsg("function returning record called in context "
+                         "that cannot accept type record")));
+        }
+
+        funcctx->tuple_desc = tuple_desc;
+        MemoryContextSwitchTo(oldcontext);
+    }
+
+    funcctx = SRF_PERCALL_SETUP();
+
+    tuple_desc = funcctx->tuple_desc;
+    result_tuples = (General_path_element_t *) funcctx->user_fctx;
+
+    if (funcctx->call_cntr < funcctx->max_calls) {
+        // do when there is more left to send
+        HeapTuple    tuple;
+        Datum        result;
+        Datum *values;
+        bool* nulls;
+        size_t call_cntr = funcctx->call_cntr;
+
+
+        size_t numb = 8;
+        values = palloc(numb * sizeof(Datum));
+        nulls = palloc(numb * sizeof(bool));
+
+        size_t i;
+        for (i = 0; i < numb; ++i) {
+            nulls[i] = false;
+        }
+
+        values[0] = Int32GetDatum(call_cntr + 1);
+        values[1] = Int32GetDatum(result_tuples[call_cntr].seq);
+        values[2] = Int64GetDatum(result_tuples[call_cntr].start_id);
+        values[3] = Int64GetDatum(result_tuples[call_cntr].end_id);
+        values[4] = Int64GetDatum(result_tuples[call_cntr].node);
+        values[5] = Int64GetDatum(result_tuples[call_cntr].edge);
+        values[6] = Float8GetDatum(result_tuples[call_cntr].cost);
+        values[7] = Float8GetDatum(result_tuples[call_cntr].agg_cost);
+
+        tuple = heap_form_tuple(tuple_desc, values, nulls);
+
+        result = HeapTupleGetDatum(tuple);
+
+        pfree(values);
+        pfree(nulls);
+
+        SRF_RETURN_NEXT(funcctx, result);
+    } else {
+        SRF_RETURN_DONE(funcctx);
+    }
+}
+
diff --git a/src/trsp/pgr_trspHandler.cpp b/src/trsp/pgr_trspHandler.cpp
new file mode 100644
index 0000000..3122839
--- /dev/null
+++ b/src/trsp/pgr_trspHandler.cpp
@@ -0,0 +1,578 @@
+/*PGR-GNU*****************************************************************
+
+File: pgr_trspHandler.cpp
+
+Copyright (c) 2011 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+aint64_t with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "trsp/pgr_trspHandler.h"
+
+#include <functional>
+#include <utility>
+#include <queue>
+#include <vector>
+#include <limits>
+#include <algorithm>
+#include <deque>
+
+#include "cpp_common/basePath_SSEC.hpp"
+#include "cpp_common/pgr_assert.h"
+
+namespace pgrouting {
+namespace trsp {
+
+// -------------------------------------------------------------------------
+Pgr_trspHandler::Pgr_trspHandler(
+        pgr_edge_t *edges,
+        const size_t edge_count,
+        const bool directed,
+        const std::vector<Rule> &ruleList) :
+    m_ruleTable() {
+
+    initialize_restrictions(ruleList);
+
+    m_min_id = renumber_edges(edges, edge_count);
+
+    construct_graph(
+            edges,
+            edge_count,
+            directed);
+
+}
+
+
+
+// -------------------------------------------------------------------------
+int64_t Pgr_trspHandler::renumber_edges(
+        pgr_edge_t *edges,
+        size_t total_edges) const {
+        int64_t v_min_id = UINT64_MAX;
+        size_t z;
+        for (z = 0; z < total_edges; z++) {
+            if (edges[z].source < v_min_id)
+                v_min_id = edges[z].source;
+
+            if (edges[z].target < v_min_id)
+                v_min_id = edges[z].target;
+        }
+
+        for (z = 0; z < total_edges; z++) {
+            edges[z].source -= v_min_id;
+            edges[z].target -= v_min_id;
+        }
+
+        return v_min_id;
+}
+
+
+
+
+// -------------------------------------------------------------------------
+void Pgr_trspHandler::clear() {
+    m_parent.clear();
+    m_dCost.clear();
+    m_path.clear();
+}
+
+
+// -------------------------------------------------------------------------
+double Pgr_trspHandler::construct_path(int64_t ed_id, Position pos) {
+    pgassert(pos != ILLEGAL);
+
+    if (m_parent[ed_id].isIllegal(pos)) {
+        Path_t pelement;
+        auto cur_edge = &m_edges[ed_id];
+        if (pos == RC_EDGE) {
+            pelement.node = cur_edge->startNode();
+            pelement.cost = cur_edge->cost();
+        } else {
+            pelement.node = cur_edge->endNode();
+            pelement.cost = cur_edge->r_cost();
+        }
+        pelement.edge = cur_edge->edgeID();
+
+        m_path.push_back(pelement);
+        pgassert(m_path.start_id() == m_start_vertex);
+        return pelement.cost;
+    }
+
+    double ret = construct_path(m_parent[ed_id].e_idx[pos],
+        m_parent[ed_id].v_pos[pos]);
+    Path_t pelement;
+    auto cur_edge = &m_edges[ed_id];
+    if (pos == RC_EDGE) {
+        pelement.node = cur_edge->startNode();
+        pelement.cost = m_dCost[ed_id].endCost - ret;
+        ret = m_dCost[ed_id].endCost;
+    } else {
+        pelement.node = cur_edge->endNode();
+        pelement.cost = m_dCost[ed_id].startCost - ret;
+        ret = m_dCost[ed_id].startCost;
+    }
+    pelement.edge = cur_edge->edgeID();
+
+    m_path.push_back(pelement);
+
+    return ret;
+}
+
+
+// -------------------------------------------------------------------------
+double Pgr_trspHandler::getRestrictionCost(
+        int64_t edge_ind,
+        const EdgeInfo &edge,
+        bool isStart) {
+    double cost = 0.0;
+    int64_t edge_id = edge.edgeID();
+    if (m_ruleTable.find(edge_id) == m_ruleTable.end()) {
+        return(0.0);
+    }
+    auto vecRules = m_ruleTable[edge_id];
+    int64_t st_edge_ind = edge_ind;
+    for (const auto &rule : vecRules) {
+        bool flag = true;
+        int64_t v_pos = (isStart? C_EDGE : RC_EDGE);
+        edge_ind = st_edge_ind;
+
+        pgassert(!(edge_ind == -1));
+        for (auto const &precedence : rule.precedencelist()) {
+            if (precedence != m_edges[edge_ind].edgeID()) {
+                flag = false;
+                break;
+            }
+            auto m_parent_ind = m_parent[edge_ind].e_idx[v_pos];
+            v_pos = m_parent[edge_ind].v_pos[v_pos];
+            edge_ind = m_parent_ind;
+        }
+        if (flag)
+            cost += rule.cost();
+    }
+    return cost;
+}
+
+
+double Pgr_trspHandler::get_tot_cost(
+        double cost,
+        size_t edge_idx,
+        bool isStart) {
+    if (isStart) {
+        return m_dCost[edge_idx].startCost +
+            cost;
+    }
+    return m_dCost[edge_idx].endCost +
+        cost;
+}
+
+
+// -------------------------------------------------------------------------
+void Pgr_trspHandler::explore(
+        int64_t cur_node,
+        const EdgeInfo cur_edge,
+        bool isStart) {
+    double extra_cost = 0.0;
+    double totalCost;
+
+    auto vecIndex = cur_edge.get_idx(isStart);
+
+    for (const auto &index : vecIndex) {
+        auto edge = m_edges[index];
+
+        extra_cost = getRestrictionCost(
+                cur_edge.idx(),
+                edge, isStart);
+
+        if ((edge.startNode() == cur_node) && (edge.cost() >= 0.0)) {
+            totalCost = get_tot_cost(
+                    edge.cost() + extra_cost,
+                    cur_edge.idx(),
+                    isStart);
+
+            if (totalCost < m_dCost[index].endCost) {
+                m_dCost[index].endCost = totalCost;
+                m_parent[edge.idx()].v_pos[RC_EDGE] = (isStart? C_EDGE : RC_EDGE);
+                m_parent[edge.idx()].e_idx[RC_EDGE] =
+                    cur_edge.idx();
+
+                add_to_que(totalCost, edge.idx(), true);
+            }
+        }
+
+       if ((edge.endNode() == cur_node) && (edge.r_cost() >= 0.0)) {
+            totalCost = get_tot_cost(
+                    edge.r_cost() + extra_cost,
+                    cur_edge.idx(),
+                    isStart);
+
+            if (totalCost < m_dCost[index].startCost) {
+                m_dCost[index].startCost = totalCost;
+                m_parent[edge.idx()].v_pos[C_EDGE] = (isStart? C_EDGE : RC_EDGE);
+                m_parent[edge.idx()].e_idx[C_EDGE] = cur_edge.idx();
+
+                add_to_que(totalCost, edge.idx(), false);
+            }
+        }
+    }  // for
+}
+
+
+
+// -------------------------------------------------------------------------
+int Pgr_trspHandler::initialize_restrictions(
+        const std::vector<Rule> &ruleList) {
+    for (const auto rule : ruleList) {
+        auto dest_edge_id = rule.dest_id();
+        if (m_ruleTable.find(dest_edge_id) != m_ruleTable.end()) {
+            m_ruleTable[dest_edge_id].push_back(rule);
+        } else {
+            std::vector<Rule> r;
+            r.push_back(rule);
+            m_ruleTable.insert(std::make_pair(dest_edge_id, r));
+        }
+    }
+
+    return true;
+}
+
+/** process
+ *
+ * does the processisng
+ *
+ */
+Path
+Pgr_trspHandler::process(
+        const int64_t start_vertex,
+        const int64_t end_vertex) {
+    clear();
+
+    m_start_vertex = start_vertex - m_min_id;
+    m_end_vertex = end_vertex - m_min_id;
+
+    Path tmp(m_start_vertex, m_end_vertex);
+    m_path = tmp;
+
+    if (m_adjacency.find(m_start_vertex) == m_adjacency.end()) {
+        return Path();
+    }
+
+    if (m_adjacency.find(m_end_vertex) == m_adjacency.end()) {
+        return Path();
+    }
+
+    return process_trsp(m_edges.size());
+}
+
+
+
+
+
+
+/** process
+ *
+ * does many to many processisng
+ *
+ */
+std::deque<Path>
+Pgr_trspHandler::process(
+        const std::vector<int64_t> sources,
+        const std::vector<int64_t> targets) {
+    std::deque<Path> paths;
+    for (const auto &s : sources) {
+        for (const auto &t : targets) {
+            paths.push_back(process(s, t));
+        }
+    }
+
+    std::sort(paths.begin(), paths.end(),
+            [](const Path &e1, const Path &e2)->bool {
+            return e1.end_id() < e2.end_id();
+            });
+    std::stable_sort(paths.begin(), paths.end(),
+            [](const Path &e1, const Path &e2)->bool {
+            return e1.start_id() < e2.start_id();
+            });
+    return paths;
+}
+
+
+
+
+
+void  Pgr_trspHandler::add_to_que(
+        double cost,
+        size_t e_idx,
+        bool isStart) {
+    que.push(std::make_pair(cost,
+                std::make_pair(e_idx, isStart)));
+}
+
+
+
+// -------------------------------------------------------------------------
+
+void  Pgr_trspHandler::initialize_que() {
+    /*
+     * For each adjacent edge to the start_vertex
+     */
+    for (const auto source : m_adjacency[m_start_vertex]) {
+        EdgeInfo &cur_edge = m_edges[source];
+
+        if (cur_edge.startNode() == m_start_vertex
+                && cur_edge.cost() >= 0.0) {
+            m_dCost[cur_edge.idx()].endCost = cur_edge.cost();
+            m_parent[cur_edge.idx()].v_pos[0] = ILLEGAL;
+            add_to_que(cur_edge.cost(), cur_edge.idx(), true);
+        }
+
+        if (cur_edge.endNode() == m_start_vertex
+                && cur_edge.r_cost() >= 0.0) {
+            m_dCost[cur_edge.idx()].startCost =
+                cur_edge.r_cost();
+            m_parent[cur_edge.idx()].v_pos[1] = ILLEGAL;
+            add_to_que(cur_edge.r_cost(), cur_edge.idx(), false);
+        }
+    }
+}
+
+EdgeInfo Pgr_trspHandler::dijkstra_exploration() {
+    EdgeInfo cur_edge;
+    pgassert(current_node == m_start_vertex);
+
+    while (!que.empty()) {
+        auto cur_pos = que.top();
+        que.pop();
+
+        auto cure_idxex = cur_pos.second.first;
+        cur_edge = m_edges[cure_idxex];
+
+        if (cur_pos.second.second) {
+            /*
+             * explore edges connected to end node
+             */
+            current_node = cur_edge.endNode();
+            if (cur_edge.cost() < 0.0) continue;
+            if (current_node == m_end_vertex) break;
+            explore(current_node, cur_edge, false);
+        } else {
+            /*
+             *  explore edges connected to start node
+             */
+            current_node = cur_edge.startNode();
+            if (cur_edge.r_cost() < 0.0) continue;
+            if (current_node == m_end_vertex) break;
+            explore(current_node, cur_edge, true);
+        }
+    }
+    return cur_edge;
+}
+
+
+
+
+Path
+Pgr_trspHandler::process_trsp(
+        size_t edge_count) {
+    pgassert(m_path.start_id() == m_start_vertex);
+    pgassert(m_path.end_id() == m_end_vertex);
+    pgassert(m_parent.empty());
+
+    m_parent.resize(edge_count + 1);
+    m_dCost.resize(edge_count + 1);
+
+    initialize_que();
+
+    current_node = m_start_vertex;
+
+    pgassert(m_path.start_id() == m_start_vertex);
+
+    auto cur_edge = dijkstra_exploration();
+
+    pgassert(m_path.start_id() == m_start_vertex);
+    if (current_node != m_end_vertex) {
+        Path result(m_start_vertex, m_end_vertex);
+        return result.renumber_vertices(m_min_id);;
+    }
+
+    pgassert(m_path.start_id() == m_start_vertex);
+
+    if (current_node == cur_edge.startNode()) {
+        construct_path(cur_edge.idx(), C_EDGE);
+    } else {
+        construct_path(cur_edge.idx(), RC_EDGE);
+    }
+
+    Path_t pelement;
+    pelement.node = m_end_vertex;
+    pelement.edge = -1;
+    pelement.cost = 0.0;
+    m_path.push_back(pelement);
+
+    m_path.Path::recalculate_agg_cost();
+    return m_path.renumber_vertices(m_min_id);
+}
+
+
+
+
+
+// -------------------------------------------------------------------------
+void Pgr_trspHandler::construct_graph(
+        pgr_edge_t* edges,
+        const size_t edge_count,
+        const bool directed) {
+
+    for (size_t i = 0; i < edge_count; i++) {
+        auto current_edge = &edges[i];
+
+        /*
+         * making all costs > 0
+         */
+        if (current_edge->cost < 0 && current_edge->reverse_cost > 0) {
+            std::swap(current_edge->cost, current_edge->reverse_cost);
+            std::swap(current_edge->source, current_edge->target);
+        }
+
+        if (!directed) {
+            if (current_edge->reverse_cost < 0) {
+                current_edge->reverse_cost = current_edge->cost;
+            }
+        }
+        addEdge(*current_edge);
+    }
+    m_mapEdgeId2Index.clear();
+}
+
+
+// -------------------------------------------------------------------------
+void Pgr_trspHandler::connectStartEdge(
+        size_t firstEdge_idx,
+        size_t secondEdge_idx) {
+    EdgeInfo &firstEdge = m_edges[firstEdge_idx];
+    EdgeInfo &secondEdge = m_edges[secondEdge_idx];
+
+    if (firstEdge.r_cost() >= 0.0) {
+        firstEdge.connect_startEdge(secondEdge_idx);
+    }
+
+    if (firstEdge.startNode() == secondEdge.startNode()
+            && secondEdge.r_cost() >= 0.0) {
+            secondEdge.connect_startEdge(firstEdge_idx);
+    }
+
+    if (firstEdge.startNode() == secondEdge.endNode()
+            &&secondEdge.cost() >= 0.0) {
+        secondEdge.connect_endEdge(firstEdge_idx);
+    }
+}
+
+
+// -------------------------------------------------------------------------
+void Pgr_trspHandler::connectEndEdge(
+        size_t firstEdge_idx,
+        size_t secondEdge_idx) {
+    EdgeInfo &firstEdge = m_edges[firstEdge_idx];
+    EdgeInfo &secondEdge = m_edges[secondEdge_idx];
+
+    if (firstEdge.cost() >= 0.0) {
+        firstEdge.connect_endEdge(secondEdge_idx);
+    }
+
+    if (firstEdge.endNode() == secondEdge.startNode()
+            && secondEdge.r_cost() >= 0.0) {
+        secondEdge.connect_startEdge(firstEdge_idx);
+    }
+
+    if (firstEdge.endNode() == secondEdge.endNode()
+            && secondEdge.cost() >= 0.0) {
+        secondEdge.connect_endEdge(firstEdge_idx);
+    }
+}
+
+
+// -------------------------------------------------------------------------
+bool Pgr_trspHandler::addEdge(const pgr_edge_t edgeIn) {
+    /*
+     * The edge was already inserted
+     *
+     * If the user has rows with repeated edge id, the subsequent edges will be ignored
+     *
+     * When changing to boost graph, the additional edges are to be added
+     */
+    if (m_mapEdgeId2Index.find(edgeIn.id) != m_mapEdgeId2Index.end()) {
+        return false;
+    }
+
+
+    /*
+     * the index of this new edge in the edges container is
+     *  m_edges.size()
+     */
+    EdgeInfo edge(edgeIn, m_edges.size());
+
+    // Adding edge to the list
+    m_mapEdgeId2Index.insert(
+            std::make_pair(
+                edge.edgeID(),
+                m_edges.size()));
+
+    m_edges.push_back(edge);
+
+    EdgeInfo &newEdge = m_edges[m_edges.size()-1];
+
+
+
+    /*
+     *  Searching the start node for connectivity
+     */
+    auto itNodeMap = m_adjacency.find(edgeIn.source);
+
+    if (itNodeMap != m_adjacency.end()) {
+        for (const auto e_idx : itNodeMap->second) {
+            connectStartEdge(edge.idx(), e_idx);
+        }
+    }
+
+
+    /*
+     *  Searching the end node for connectivity
+     */
+    itNodeMap = m_adjacency.find(edgeIn.target);
+    if (itNodeMap != m_adjacency.end()) {
+        for (const auto e_idx : itNodeMap->second) {
+            connectEndEdge(edge.idx(), e_idx);
+        }
+    }
+
+
+    /*
+     * Add the edges to the adjacency list
+     */
+    m_adjacency[edgeIn.source].push_back(newEdge.idx());
+    m_adjacency[edgeIn.target].push_back(newEdge.idx());
+
+
+
+    return true;
+}
+
+
+
+}  // namespace trsp
+}  // namespace pgrouting
diff --git a/src/trsp/rule.cpp b/src/trsp/rule.cpp
new file mode 100644
index 0000000..0996f60
--- /dev/null
+++ b/src/trsp/rule.cpp
@@ -0,0 +1,61 @@
+/*PGR-GNU*****************************************************************
+
+FILE: rule.cpp
+
+Copyright (c) 2017 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+aint64_t with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ ********************************************************************PGR-GNU*/
+
+#include "trsp/rule.h"
+
+#include <algorithm>
+
+
+
+namespace pgrouting {
+namespace trsp {
+
+    Rule::Rule(Restriction_t r) :
+        m_cost(r.cost),
+        m_precedencelist(r.via, r.via + r.via_size) {
+            m_dest_id = m_precedencelist.back();
+            m_precedencelist.pop_back();
+            std::reverse(m_precedencelist.begin(), m_precedencelist.end());
+        }
+
+    const std::vector<int64_t>
+    Rule::precedencelist() const {
+        return m_precedencelist;
+    }
+
+
+    std::ostream& operator<<(std::ostream& log, const Rule &r) {
+        log << r.m_cost << ", (";
+        for (const auto e : r.m_precedencelist) {
+            log << e << ",";
+        }
+        log << ")";
+        return log;
+    }
+
+
+}  // namespace trsp
+}  // namespace pgrouting
+
diff --git a/src/trsp/src/CMakeLists.txt b/src/trsp/src/CMakeLists.txt
deleted file mode 100644
index bd61d64..0000000
--- a/src/trsp/src/CMakeLists.txt
+++ /dev/null
@@ -1 +0,0 @@
-add_library(trsp OBJECT trsp.h trsp.c utils.h GraphDefinition.h trsp_core.cpp GraphDefinition.cpp)
diff --git a/src/trsp/src/GraphDefinition.cpp b/src/trsp/src/GraphDefinition.cpp
deleted file mode 100644
index 45f4cda..0000000
--- a/src/trsp/src/GraphDefinition.cpp
+++ /dev/null
@@ -1,802 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-File: GraphDefinition.cpp
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#ifdef __MINGW32__
-#include <winsock2.h>
-#include <windows.h>
-#endif
-
-
-#include <functional>
-#include "GraphDefinition.h"
-
-// -------------------------------------------------------------------------
-GraphDefinition::GraphDefinition(void) {
-    m_lStartEdgeId = -1;
-    m_lEndEdgeId = 0;
-    m_dStartpart = 0.0;
-    m_dEndPart = 0.0;
-    m_dCost = NULL;
-    m_bIsturnRestrictOn = false;
-    m_bIsGraphConstructed = false;
-    parent = NULL;
-    init();
-}
-
-// -------------------------------------------------------------------------
-GraphDefinition::~GraphDefinition(void) {
-}
-
-
-// -------------------------------------------------------------------------
-void GraphDefinition::init() {
-    max_edge_id = 0;
-    max_node_id = 0;
-    isStartVirtual = false;
-    isEndVirtual = false;
-}
-
-
-// -------------------------------------------------------------------------
-void GraphDefinition::deleteall() {
-    std::vector<GraphEdgeInfo*>::iterator it;
-    for (it = m_vecEdgeVector.begin(); it != m_vecEdgeVector.end(); it++) {
-        delete *it;
-    }
-    m_vecEdgeVector.clear();
-
-    delete [] parent;
-    delete [] m_dCost;
-}
-
-
-// -------------------------------------------------------------------------
-double GraphDefinition::construct_path(long ed_id, long v_pos) {
-    if (parent[ed_id].ed_ind[v_pos] == -1) {
-        path_element_tt pelement;
-        GraphEdgeInfo* cur_edge = m_vecEdgeVector[ed_id];
-        if (v_pos == 0) {
-            pelement.vertex_id = cur_edge->m_lStartNode;
-            pelement.cost = cur_edge->m_dCost;
-        } else {
-            pelement.vertex_id = cur_edge->m_lEndNode;
-            pelement.cost = cur_edge->m_dReverseCost;
-        }
-        pelement.edge_id = cur_edge->m_lEdgeID;
-
-        m_vecPath.push_back(pelement);
-        return pelement.cost;
-    }
-    double ret = construct_path(parent[ed_id].ed_ind[v_pos],
-        parent[ed_id].v_pos[v_pos]);
-    path_element_tt pelement;
-    GraphEdgeInfo* cur_edge = m_vecEdgeVector[ed_id];
-    if (v_pos == 0) {
-        pelement.vertex_id = cur_edge->m_lStartNode;
-        pelement.cost = m_dCost[ed_id].endCost - ret;  // cur_edge.m_dCost;
-        ret = m_dCost[ed_id].endCost;
-    } else {
-        pelement.vertex_id = cur_edge->m_lEndNode;
-        pelement.cost = m_dCost[ed_id].startCost - ret;
-        ret = m_dCost[ed_id].startCost;
-    }
-    pelement.edge_id = cur_edge->m_lEdgeID;
-
-    m_vecPath.push_back(pelement);
-
-    return ret;
-}
-
-
-// -------------------------------------------------------------------------
-double GraphDefinition::getRestrictionCost(
-    long edge_ind,
-    GraphEdgeInfo& new_edge,
-    bool isStart) {
-    double cost = 0.0;
-    long edge_id = new_edge.m_lEdgeID;
-    if (m_ruleTable.find(edge_id) == m_ruleTable.end()) {
-        return(0.0);
-    }
-    std::vector<Rule> vecRules = m_ruleTable[edge_id];
-    long st_edge_ind = edge_ind;
-    for (const auto &rule : vecRules) {
-        bool flag = true;
-        long v_pos = (isStart?0:1);
-        edge_ind = st_edge_ind;
-        for (auto const &precedence : rule.precedencelist) {
-            if (edge_ind == -1) {
-                flag = false;
-                break;
-            }
-            if (precedence != m_vecEdgeVector[edge_ind]->m_lEdgeID) {
-                flag = false;
-                break;
-            }
-            auto parent_ind = parent[edge_ind].ed_ind[v_pos];
-            v_pos = parent[edge_ind].v_pos[v_pos];
-            edge_ind = parent_ind;
-        }
-        if (flag)
-            cost += rule.cost;
-    }
-    return cost;
-}
-
-
-// -------------------------------------------------------------------------
-void GraphDefinition::explore(
-    long cur_node,
-    GraphEdgeInfo& cur_edge,
-    bool isStart,
-    LongVector &vecIndex,
-    std::priority_queue<PDP, std::vector<PDP>,
-    std::greater<PDP> > &que) {
-    double extCost = 0.0;
-    GraphEdgeInfo* new_edge;
-    double totalCost;
-    for (const auto &index : vecIndex) {
-        new_edge = m_vecEdgeVector[index];
-        extCost = 0.0;
-        if (m_bIsturnRestrictOn) {
-            extCost = getRestrictionCost(cur_edge.m_lEdgeIndex,
-                 *new_edge, isStart);
-        }
-        if (new_edge->m_lStartNode == cur_node) {
-            if (new_edge->m_dCost >= 0.0) {
-                if (isStart)
-                    totalCost = m_dCost[cur_edge.m_lEdgeIndex].endCost +
-                    new_edge->m_dCost + extCost;
-                else
-                    totalCost = m_dCost[cur_edge.m_lEdgeIndex].startCost +
-                    new_edge->m_dCost + extCost;
-                if (totalCost < m_dCost[index].endCost) {
-                    m_dCost[index].endCost = totalCost;
-                    parent[new_edge->m_lEdgeIndex].v_pos[0] = (isStart?0:1);
-                    parent[new_edge->m_lEdgeIndex].ed_ind[0] =
-                     cur_edge.m_lEdgeIndex;
-                    que.push(std::make_pair(totalCost,
-                        std::make_pair(new_edge->m_lEdgeIndex, true)));
-                }
-            }
-        } else {
-            if (new_edge->m_dReverseCost >= 0.0) {
-                if (isStart)
-                    totalCost = m_dCost[cur_edge.m_lEdgeIndex].endCost +
-                    new_edge->m_dReverseCost + extCost;
-                else
-                    totalCost = m_dCost[cur_edge.m_lEdgeIndex].startCost +
-                    new_edge->m_dReverseCost + extCost;
-                if (totalCost < m_dCost[index].startCost) {
-                    m_dCost[index].startCost = totalCost;
-                    parent[new_edge->m_lEdgeIndex].v_pos[1] = (isStart?0:1);
-                    parent[new_edge->m_lEdgeIndex].ed_ind[1] =
-                    cur_edge.m_lEdgeIndex;
-                    que.push(std::make_pair(totalCost,
-                        std::make_pair(new_edge->m_lEdgeIndex, false)));
-                }
-            }
-        }
-    }
-}
-
-
-// -------------------------------------------------------------------------
-int GraphDefinition::multi_dijkstra(
-    edge_t *edges,
-    size_t edge_count,
-    std::vector<int> vertices,
-    bool directed,
-    bool has_reverse_cost,
-    path_element_tt **path,
-    size_t *path_count,
-    char **err_msg,
-    std::vector<PDVI> &ruleList) {
-    construct_graph(edges, edge_count, has_reverse_cost, directed);
-    if (ruleList.size() > 0) {
-        m_ruleTable.clear();
-        LongVector vecsource;
-        for (const auto &rule : ruleList) {
-            std::vector<long> temp_precedencelist;
-            temp_precedencelist.clear();
-            for (auto const &seq : rule.second) {
-                temp_precedencelist.push_back(seq);
-            }
-            long dest_edge_id = rule.second[0];
-            if (m_ruleTable.find(dest_edge_id) != m_ruleTable.end()) {
-                m_ruleTable[dest_edge_id].push_back(Rule(rule.first,
-                    temp_precedencelist));
-            } else {
-                std::vector<Rule> temprules;
-                temprules.clear();
-                temprules.push_back(Rule(rule.first, temp_precedencelist));
-                m_ruleTable.insert(std::make_pair(dest_edge_id, temprules));
-            }
-        }
-        m_bIsturnRestrictOn = true;
-    }
-    parent = new PARENT_PATH[edge_count + 1];
-    m_dCost = new CostHolder[edge_count + 1];
-    m_vecPath.clear();
-    size_t i;
-    size_t total_vertices = vertices.size();
-    for (i = 0; i < total_vertices - 1; i++) {
-        int ret = my_dijkstra(vertices[i], vertices[i + 1], edge_count,
-                err_msg);
-        if (ret < 0) {
-            deleteall();
-            return -1;
-        }
-    }
-
-    *path = (path_element_tt *) malloc(sizeof(path_element_tt) *
-    (m_vecPath.size() + 1));
-    *path_count = static_cast<int>(m_vecPath.size());
-
-    for (size_t  i = 0; i < *path_count; i++) {
-        (*path)[i].vertex_id = m_vecPath[i].vertex_id;
-        (*path)[i].edge_id = m_vecPath[i].edge_id;
-        (*path)[i].cost = m_vecPath[i].cost;
-    }
-    deleteall();
-    return 0;
-}
-
-
-// -------------------------------------------------------------------------
-int GraphDefinition::my_dijkstra(long start_vertex, long end_vertex,
-    size_t edge_count, char **err_msg) {
-    if (!m_bIsGraphConstructed) {
-        *err_msg = (char *)"Graph not Ready!";
-        return -1;
-    }
-    unsigned int i;
-    for (i = 0; i <= edge_count; i++) {
-        m_dCost[i].startCost = 1e15;
-        m_dCost[i].endCost = 1e15;
-    }
-
-    if (m_mapNodeId2Edge.find(start_vertex) == m_mapNodeId2Edge.end()) {
-        *err_msg = (char *)"Source Not Found";
-        deleteall();
-        return -1;
-    }
-
-    if (m_mapNodeId2Edge.find(end_vertex) == m_mapNodeId2Edge.end()) {
-        *err_msg = (char *)"Destination Not Found";
-        deleteall();
-        return -1;
-    }
-
-    std::priority_queue<PDP, std::vector<PDP>, std::greater<PDP> > que;
-    LongVector vecsource = m_mapNodeId2Edge[start_vertex];
-    GraphEdgeInfo* cur_edge = NULL;
-
-    for (const auto &source : vecsource) {
-        cur_edge = m_vecEdgeVector[source];
-        if (cur_edge->m_lStartNode == start_vertex) {
-            if (cur_edge->m_dCost >= 0.0) {
-                m_dCost[cur_edge->m_lEdgeIndex].endCost = cur_edge->m_dCost;
-                parent[cur_edge->m_lEdgeIndex].v_pos[0] = -1;
-                parent[cur_edge->m_lEdgeIndex].ed_ind[0] = -1;
-                que.push(std::make_pair(cur_edge->m_dCost,
-                    std::make_pair(cur_edge->m_lEdgeIndex, true)));
-                }
-            } else {
-                if (cur_edge->m_dReverseCost >= 0.0) {
-                    m_dCost[cur_edge->m_lEdgeIndex].startCost =
-                    cur_edge->m_dReverseCost;
-                    parent[cur_edge->m_lEdgeIndex].v_pos[1] = -1;
-                    parent[cur_edge->m_lEdgeIndex].ed_ind[1] = -1;
-                    que.push(std::make_pair(cur_edge->m_dReverseCost,
-                        std::make_pair(cur_edge->m_lEdgeIndex, false)));
-                    }
-            }
-        }
-
-        long cur_node = -1;
-
-        while (!que.empty()) {
-            PDP cur_pos = que.top();
-            que.pop();
-            long cured_index = cur_pos.second.first;
-            cur_edge = m_vecEdgeVector[cured_index];
-
-            if (cur_pos.second.second) {  // explore edges connected to end node
-                cur_node = cur_edge->m_lEndNode;
-                if (cur_edge->m_dCost < 0.0)
-                    continue;
-                if (cur_node == end_vertex)
-                    break;
-                explore(cur_node, *cur_edge, true,
-                    cur_edge->m_vecEndConnedtedEdge, que);
-            } else {  // explore edges connected to start node
-                cur_node = cur_edge->m_lStartNode;
-                if (cur_edge->m_dReverseCost < 0.0)
-                    continue;
-                if (cur_node == end_vertex)
-                    break;
-                explore(cur_node, *cur_edge, false,
-                    cur_edge->m_vecStartConnectedEdge, que);
-            }
-        }
-        if (cur_node != end_vertex) {
-            *err_msg = (char *)"Path Not Found";
-            deleteall();
-            return -1;
-        } else {
-            if (cur_node == cur_edge->m_lStartNode) {
-                construct_path(cur_edge->m_lEdgeIndex, 1);
-            } else {
-                construct_path(cur_edge->m_lEdgeIndex, 0);
-            }
-            path_element_tt pelement;
-            pelement.vertex_id = end_vertex;
-            pelement.edge_id = -1;
-            pelement.cost = 0.0;
-            m_vecPath.push_back(pelement);
-        }
-    return 0;
-}
-
-
-// -------------------------------------------------------------------------
-int GraphDefinition::my_dijkstra(edge_t *edges, size_t edge_count,
-    long start_edge_id, double start_part, long end_edge_id, double end_part,
-    bool directed, bool has_reverse_cost, path_element_tt **path,
-    size_t *path_count, char **err_msg, std::vector<PDVI> &ruleList) {
-    if (!m_bIsGraphConstructed) {
-            init();
-            construct_graph(edges, edge_count, has_reverse_cost, directed);
-            m_bIsGraphConstructed = true;
-        }
-        GraphEdgeInfo* start_edge_info =
-        m_vecEdgeVector[m_mapEdgeId2Index[start_edge_id]];
-        edge_t start_edge;
-        long start_vertex, end_vertex;
-        m_dStartpart = start_part;
-        m_dEndPart = end_part;
-        m_lStartEdgeId = start_edge_id;
-        m_lEndEdgeId = end_edge_id;
-
-        if (start_part == 0.0) {
-            start_vertex = start_edge_info->m_lStartNode;
-        } else if (start_part == 1.0) {
-            start_vertex = start_edge_info->m_lEndNode;
-        } else {
-            isStartVirtual = true;
-            m_lStartEdgeId = start_edge_id;
-            start_vertex = max_node_id + 1;
-            max_node_id++;
-            start_edge.id = max_edge_id + 1;
-            max_edge_id++;
-            start_edge.source = start_vertex;
-            start_edge.reverse_cost = -1.0;
-            if (start_edge_info->m_dCost >= 0.0) {
-                start_edge.target = start_edge_info->m_lEndNode;
-                start_edge.cost = (1.0 - start_part) * start_edge_info->m_dCost;
-                addEdge(start_edge);
-                edge_count++;
-            }
-            if (start_edge_info->m_dReverseCost >= 0.0) {
-                start_edge.id = max_edge_id + 1;
-                max_edge_id++;
-                start_edge.target = start_edge_info->m_lStartNode;
-                start_edge.cost = start_part * start_edge_info->m_dReverseCost;
-                addEdge(start_edge);
-                edge_count++;
-            }
-        }
-
-    GraphEdgeInfo* end_edge_info =
-    m_vecEdgeVector[m_mapEdgeId2Index[end_edge_id]];
-    edge_t end_edge;
-
-    if (end_part == 0.0) {
-        end_vertex = end_edge_info->m_lStartNode;
-    } else if (end_part == 1.0) {
-        end_vertex = end_edge_info->m_lEndNode;
-    } else {
-        isEndVirtual = true;
-        m_lEndEdgeId = end_edge_id;
-        end_vertex = max_node_id + 1;
-        max_node_id++;
-        end_edge.id = max_edge_id + 1;
-        max_edge_id++;
-        end_edge.target = end_vertex;
-        end_edge.reverse_cost = -1.0;
-        if (end_edge_info->m_dCost >= 0.0) {
-            end_edge.source = end_edge_info->m_lStartNode;
-            end_edge.cost = end_part * end_edge_info->m_dCost;
-            addEdge(end_edge);
-            edge_count++;
-        }
-        if (end_edge_info->m_dReverseCost >= 0.0) {
-            end_edge.source = end_edge_info->m_lEndNode;
-            end_edge.id = max_edge_id + 1;
-            end_edge.cost = (1.0 - end_part) * end_edge_info->m_dReverseCost;
-            addEdge(end_edge);
-            edge_count++;
-        }
-    }
-
-    return(my_dijkstra(edges, edge_count, start_vertex, end_vertex, directed,
-        has_reverse_cost, path, path_count, err_msg, ruleList));
-}
-
-
-// -------------------------------------------------------------------------
-int GraphDefinition:: my_dijkstra(edge_t *edges, size_t edge_count,
-    long start_vertex, long end_vertex, bool directed, bool has_reverse_cost,
-    path_element_tt **path, size_t *path_count, char **err_msg,
-    std::vector<PDVI> &ruleList) {
-    m_ruleTable.clear();
-    LongVector vecsource;
-    for (const auto &rule : ruleList) {
-        size_t j;
-        size_t seq_cnt = rule.second.size();
-        std::vector<long> temp_precedencelist;
-        temp_precedencelist.clear();
-        for (j = 1; j < seq_cnt; j++) {
-            temp_precedencelist.push_back(rule.second[j]);
-        }
-        long dest_edge_id = rule.second[0];
-        if (m_ruleTable.find(dest_edge_id) != m_ruleTable.end()) {
-            m_ruleTable[dest_edge_id].push_back(Rule(rule.first,
-                temp_precedencelist));
-        } else {
-            std::vector<Rule> temprules;
-            temprules.clear();
-            temprules.push_back(Rule(rule.first, temp_precedencelist));
-            m_ruleTable.insert(std::make_pair(dest_edge_id, temprules));
-        }
-
-        if (isStartVirtual) {
-            if (seq_cnt == 2 && rule.second[1] == m_lStartEdgeId) {
-                vecsource = m_mapNodeId2Edge[start_vertex];
-                for (const auto &source : vecsource) {
-                    temp_precedencelist.clear();
-                    temp_precedencelist.push_back(
-                        m_vecEdgeVector[source]->m_lEdgeID);
-                    m_ruleTable[dest_edge_id].push_back(Rule(rule.first,
-                        temp_precedencelist));
-                }
-            }
-        }
-    }
-    if (isEndVirtual) {
-        if (m_ruleTable.find(m_lEndEdgeId) != m_ruleTable.end()) {
-            std::vector<Rule> tmpRules = m_ruleTable[m_lEndEdgeId];
-            vecsource = m_mapNodeId2Edge[end_vertex];
-            for (const auto &source : vecsource) {
-                m_ruleTable.insert(std::make_pair(
-                    m_vecEdgeVector[source]->m_lEdgeID, tmpRules));
-            }
-        }
-    }
-    m_bIsturnRestrictOn = true;
-    return(my_dijkstra(edges, edge_count, start_vertex, end_vertex, directed,
-        has_reverse_cost, path, path_count, err_msg));
-}
-
-
-// -------------------------------------------------------------------------
-int GraphDefinition:: my_dijkstra(edge_t *edges, size_t edge_count,
-    long start_vertex, long end_vertex, bool directed, bool has_reverse_cost,
-    path_element_tt **path, size_t *path_count, char **err_msg) {
-    if (!m_bIsGraphConstructed) {
-        init();
-        construct_graph(edges, edge_count, has_reverse_cost, directed);
-        m_bIsGraphConstructed = true;
-    }
-
-    std::priority_queue<PDP, std::vector<PDP>, std::greater<PDP> > que;
-    parent = new PARENT_PATH[edge_count + 1];
-    m_dCost = new CostHolder[edge_count + 1];
-    m_vecPath.clear();
-
-    unsigned int i;
-    for (i = 0; i <= edge_count; i++) {
-        m_dCost[i].startCost = 1e15;
-        m_dCost[i].endCost = 1e15;
-    }
-
-    if (m_mapNodeId2Edge.find(start_vertex) == m_mapNodeId2Edge.end()) {
-        *err_msg = (char *)"Source Not Found";
-        deleteall();
-        return -1;
-    }
-
-    if (m_mapNodeId2Edge.find(end_vertex) == m_mapNodeId2Edge.end()) {
-        *err_msg = (char *)"Destination Not Found";
-        deleteall();
-        return -1;
-    }
-
-    LongVector vecsource = m_mapNodeId2Edge[start_vertex];
-    GraphEdgeInfo* cur_edge = NULL;
-
-    for (const auto &source : vecsource) {
-        cur_edge = m_vecEdgeVector[source];
-        if (cur_edge->m_lStartNode == start_vertex) {
-            if (cur_edge->m_dCost >= 0.0) {
-                m_dCost[cur_edge->m_lEdgeIndex].endCost = cur_edge->m_dCost;
-                parent[cur_edge->m_lEdgeIndex].v_pos[0] = -1;
-                parent[cur_edge->m_lEdgeIndex].ed_ind[0] = -1;
-                que.push(std::make_pair(cur_edge->m_dCost,
-                    std::make_pair(cur_edge->m_lEdgeIndex, true)));
-            }
-        } else {
-            if (cur_edge->m_dReverseCost >= 0.0) {
-                m_dCost[cur_edge->m_lEdgeIndex].startCost =
-                cur_edge->m_dReverseCost;
-                parent[cur_edge->m_lEdgeIndex].v_pos[1] = -1;
-                parent[cur_edge->m_lEdgeIndex].ed_ind[1] = -1;
-                que.push(std::make_pair(cur_edge->m_dReverseCost,
-                    std::make_pair(cur_edge->m_lEdgeIndex, false)));
-            }
-        }
-    }
-    long cur_node = -1;
-
-    while (!que.empty()) {
-        PDP cur_pos = que.top();
-        que.pop();
-        long cured_index = cur_pos.second.first;
-        cur_edge = m_vecEdgeVector[cured_index];
-
-        if (cur_pos.second.second) {  // explore edges connected to end node
-            cur_node = cur_edge->m_lEndNode;
-            if (cur_edge->m_dCost < 0.0)
-                continue;
-            if (cur_node == end_vertex)
-                break;
-            explore(cur_node, *cur_edge, true, cur_edge->m_vecEndConnedtedEdge,
-                que);
-        } else {  // explore edges connected to start node
-            cur_node = cur_edge->m_lStartNode;
-            if (cur_edge->m_dReverseCost < 0.0)
-                continue;
-            if (cur_node == end_vertex)
-                break;
-            explore(cur_node, *cur_edge, false,
-                cur_edge->m_vecStartConnectedEdge, que);
-        }
-    }
-    if (cur_node != end_vertex) {
-        if (m_lStartEdgeId == m_lEndEdgeId) {
-            if (get_single_cost(1000.0, path, path_count)) {
-                return 0;
-            }
-        }
-        *err_msg = (char *)"Path Not Found";
-        deleteall();
-        return -1;
-    } else {
-        double total_cost;
-        if (cur_node == cur_edge->m_lStartNode) {
-            total_cost = m_dCost[cur_edge->m_lEdgeIndex].startCost;
-            construct_path(cur_edge->m_lEdgeIndex, 1);
-        } else {
-            total_cost = m_dCost[cur_edge->m_lEdgeIndex].endCost;
-            construct_path(cur_edge->m_lEdgeIndex, 0);
-        }
-        path_element_tt pelement;
-        pelement.vertex_id = end_vertex;
-        pelement.edge_id = -1;
-        pelement.cost = 0.0;
-        m_vecPath.push_back(pelement);
-
-        if (m_lStartEdgeId == m_lEndEdgeId) {
-            if (get_single_cost(total_cost, path, path_count)) {
-                return 0;
-            }
-        }
-
-        *path = (path_element_tt *) malloc(sizeof(path_element_tt) *
-        (m_vecPath.size() + 1));
-        *path_count = static_cast<int>(m_vecPath.size());
-
-        for (size_t i = 0; i < *path_count; i++) {
-            (*path)[i].vertex_id = m_vecPath[i].vertex_id;
-            (*path)[i].edge_id = m_vecPath[i].edge_id;
-            (*path)[i].cost = m_vecPath[i].cost;
-        }
-        if (isStartVirtual) {
-            (*path)[0].vertex_id = -1;
-            (*path)[0].edge_id = m_lStartEdgeId;
-        }
-        if (isEndVirtual) {
-            *path_count = *path_count - 1;
-            (*path)[*path_count - 1].edge_id = m_lEndEdgeId;
-        }
-    }
-    deleteall();
-    return 0;
-}
-
-
-// -------------------------------------------------------------------------
-bool GraphDefinition::get_single_cost(double total_cost, path_element_tt **path,
-     size_t *path_count) {
-    GraphEdgeInfo* start_edge_info =
-    m_vecEdgeVector[m_mapEdgeId2Index[m_lStartEdgeId]];
-    if (m_dEndPart >= m_dStartpart) {
-        if (start_edge_info->m_dCost >= 0.0 && start_edge_info->m_dCost *
-            (m_dEndPart - m_dStartpart) <= total_cost) {
-            *path = (path_element_tt *) malloc(sizeof(path_element_tt) * (1));
-            *path_count = 1;
-            (*path)[0].vertex_id = -1;
-            (*path)[0].edge_id = m_lStartEdgeId;
-            (*path)[0].cost = start_edge_info->m_dCost *
-            (m_dEndPart - m_dStartpart);
-
-            return true;
-        }
-    } else {
-        if (start_edge_info->m_dReverseCost >= 0.0 &&
-            start_edge_info->m_dReverseCost * (m_dStartpart - m_dEndPart) <=
-            total_cost) {
-            *path = (path_element_tt *) malloc(sizeof(path_element_tt) * (1));
-            *path_count = 1;
-            (*path)[0].vertex_id = -1;
-            (*path)[0].edge_id = m_lStartEdgeId;
-            (*path)[0].cost = start_edge_info->m_dReverseCost *
-            (m_dStartpart - m_dEndPart);
-
-            return true;
-        }
-    }
-    return false;
-}
-
-
-// -------------------------------------------------------------------------
-bool GraphDefinition::construct_graph(edge_t* edges, size_t edge_count,
-    bool has_reverse_cost, bool directed) {
-    for (size_t i = 0; i < edge_count; i++) {
-        if (!has_reverse_cost) {
-            if (directed) {
-                edges[i].reverse_cost = -1.0;
-            } else {
-                edges[i].reverse_cost = edges[i].cost;
-            }
-        }
-        addEdge(edges[i]);
-    }
-    m_bIsGraphConstructed = true;
-    return true;
-}
-
-
-// -------------------------------------------------------------------------
-bool GraphDefinition::connectEdge(GraphEdgeInfo& firstEdge,
-    GraphEdgeInfo& secondEdge, bool bIsStartNodeSame) {
-    if (bIsStartNodeSame) {
-        if (firstEdge.m_dReverseCost >= 0.0)
-            firstEdge.m_vecStartConnectedEdge.push_back(
-                secondEdge.m_lEdgeIndex);
-        if (firstEdge.m_lStartNode == secondEdge.m_lStartNode) {
-            if (secondEdge.m_dReverseCost >= 0.0)
-                secondEdge.m_vecStartConnectedEdge.push_back(
-                    firstEdge.m_lEdgeIndex);
-        } else {
-            if (secondEdge.m_dCost >= 0.0)
-                secondEdge.m_vecEndConnedtedEdge.push_back(
-                    firstEdge.m_lEdgeIndex);
-        }
-    } else {
-        if (firstEdge.m_dCost >= 0.0)
-            firstEdge.m_vecEndConnedtedEdge.push_back(secondEdge.m_lEdgeIndex);
-        if (firstEdge.m_lEndNode == secondEdge.m_lStartNode) {
-            if (secondEdge.m_dReverseCost >= 0.0)
-                secondEdge.m_vecStartConnectedEdge.push_back(
-                    firstEdge.m_lEdgeIndex);
-        } else {
-            if (secondEdge.m_dCost >= 0.0)
-                secondEdge.m_vecEndConnedtedEdge.push_back(
-                    firstEdge.m_lEdgeIndex);
-        }
-    }
-    return true;
-}
-
-
-// -------------------------------------------------------------------------
-bool GraphDefinition::addEdge(edge_t edgeIn) {
-    // long lTest;
-    Long2LongMap::iterator itMap = m_mapEdgeId2Index.find(edgeIn.id);
-    if (itMap != m_mapEdgeId2Index.end())
-        return false;
-
-
-    GraphEdgeInfo* newEdge = new GraphEdgeInfo();
-    newEdge->m_vecStartConnectedEdge.clear();
-    newEdge->m_vecEndConnedtedEdge.clear();
-    newEdge->m_vecRestrictedEdge.clear();
-    newEdge->m_lEdgeID = edgeIn.id;
-    newEdge->m_lEdgeIndex = m_vecEdgeVector.size();
-    newEdge->m_lStartNode = edgeIn.source;
-    newEdge->m_lEndNode = edgeIn.target;
-    newEdge->m_dCost = edgeIn.cost;
-    newEdge->m_dReverseCost = edgeIn.reverse_cost;
-
-    if (edgeIn.id > max_edge_id) {
-        max_edge_id = edgeIn.id;
-    }
-
-    if (newEdge->m_lStartNode > max_node_id) {
-        max_node_id = newEdge->m_lStartNode;
-    }
-    if (newEdge->m_lEndNode > max_node_id) {
-        max_node_id = newEdge->m_lEndNode;
-    }
-
-    // Searching the start node for connectivity
-    Long2LongVectorMap::iterator itNodeMap = m_mapNodeId2Edge.find(
-        edgeIn.source);
-    if (itNodeMap != m_mapNodeId2Edge.end()) {
-        // Connect current edge with existing edge with start node
-        // connectEdge(
-        long lEdgeCount = itNodeMap->second.size();
-        long lEdgeIndex;
-        for (lEdgeIndex = 0; lEdgeIndex < lEdgeCount; lEdgeIndex++) {
-            long lEdge = itNodeMap->second.at(lEdgeIndex);
-            connectEdge(*newEdge, *m_vecEdgeVector[lEdge], true);
-        }
-    }
-
-
-    // Searching the end node for connectivity
-    itNodeMap = m_mapNodeId2Edge.find(edgeIn.target);
-    if (itNodeMap != m_mapNodeId2Edge.end()) {
-        // Connect current edge with existing edge with end node
-        // connectEdge(
-        long lEdgeCount = itNodeMap->second.size();
-        long lEdgeIndex;
-        for (lEdgeIndex = 0; lEdgeIndex < lEdgeCount; lEdgeIndex++) {
-            long lEdge = itNodeMap->second.at(lEdgeIndex);
-            connectEdge(*newEdge, *m_vecEdgeVector[lEdge], false);
-        }
-    }
-
-
-
-    // Add this node and edge into the data structure
-    m_mapNodeId2Edge[edgeIn.source].push_back(newEdge->m_lEdgeIndex);
-    m_mapNodeId2Edge[edgeIn.target].push_back(newEdge->m_lEdgeIndex);
-
-
-    // Adding edge to the list
-    m_mapEdgeId2Index.insert(std::make_pair(newEdge->m_lEdgeID,
-        m_vecEdgeVector.size()));
-    m_vecEdgeVector.push_back(newEdge);
-
-    //
-
-
-    return true;
-}
diff --git a/src/trsp/src/GraphDefinition.h b/src/trsp/src/GraphDefinition.h
deleted file mode 100644
index a0578b3..0000000
--- a/src/trsp/src/GraphDefinition.h
+++ /dev/null
@@ -1,165 +0,0 @@
-#ifndef SRC_TRSP_SRC_GRAPHDEFINITION_H_
-#define SRC_TRSP_SRC_GRAPHDEFINITION_H_
-
-#include <stdlib.h>
-
-#include <vector>
-#include <map>
-#include <queue>
-#include <string>
-#include <iostream>
-#include <utility>
-#include <functional>
-
-
-#include "trsp.h"
-
-// using namespace std;
-
-typedef std::vector<long> LongVector;
-typedef std::vector<LongVector> VectorOfLongVector;
-typedef std::pair<long, bool> PIB;
-typedef std::pair<double, PIB> PDP;
-typedef std::pair<double, std::vector<long> > PDVI;
-
-/*
-typedef struct edge 
-{
-    int id;
-    int source;
-    int target;
-    double cost;
-    double reverse_cost;
-} edge_t;
-
-typedef struct path_element 
-{
-    int vertex_id;
-    int edge_id;
-    double cost;
-}path_element_tt;
-*/
-
-typedef struct {
-    long ed_ind[2];
-    long v_pos[2];
-} PARENT_PATH;
-
-typedef struct Rule {
-    double cost;
-    std::vector<long> precedencelist;
-    Rule(double c, std::vector<long> p) : cost(c), precedencelist(p) { }
-}Rule;
-
-typedef struct {
-    double startCost, endCost;
-} CostHolder;
-
-typedef std::map<long, std::vector<Rule> > RuleTable;
-
-
-
-class GraphEdgeInfo {
- public:
-    long m_lEdgeID;
-    long m_lEdgeIndex;
-    short m_sDirection;
-    double m_dCost;
-    double m_dReverseCost;
-    LongVector m_vecStartConnectedEdge;
-    LongVector m_vecEndConnedtedEdge;
-    // LongVector m_vecConnectedNode;
-    bool m_bIsLeadingRestrictedEdge;
-    VectorOfLongVector m_vecRestrictedEdge;
-
-    long m_lStartNode;
-    long m_lEndNode;
-};
-
-
-
-
-typedef std::vector<GraphEdgeInfo*> GraphEdgeVector;
-typedef std::map<long, LongVector> Long2LongVectorMap;
-typedef std::map<long, long> Long2LongMap;
-
-
-
-
-class GraphDefinition {
- public:
-    GraphDefinition(void);
-    ~GraphDefinition(void);
-
-    int my_dijkstra(long start_vertex, long end_vertex,
-                    size_t edge_count, char** err_msg);
-
-    int my_dijkstra(edge_t *edges, size_t edge_count,
-                    long start_vertex, long end_vertex,
-                    bool directed, bool has_reverse_cost,
-                    path_element_tt **path, size_t *path_count,
-                    char **err_msg);
-
-    int my_dijkstra(edge_t *edges, size_t edge_count,
-                    long start_vertex, long end_vertex,
-                    bool directed, bool has_reverse_cost,
-                    path_element_tt **path, size_t *path_count,
-                    char **err_msg,
-                    std::vector<PDVI> &ruleList);
-
-    int my_dijkstra(edge_t *edges, size_t edge_count,
-                    long start_edge, double start_part,
-                    long end_edge, double end_part,
-                    bool directed, bool has_reverse_cost,
-                    path_element_tt **path, size_t *path_count,
-                    char **err_msg,
-                    std::vector<PDVI> &ruleList);
-
-    int multi_dijkstra(edge_t *edges, size_t edge_count,
-                       std::vector<int> vertices,
-                       bool directed, bool has_reverse_cost,
-                       path_element_tt **path, size_t *path_count,
-                       char **err_msg,
-                       std::vector<PDVI> &ruleList);
-
-    bool construct_graph(edge_t *edges, size_t edge_count,
-                         bool has_reverse_cost, bool directed);
-
-
- private:
-    double construct_path(long ed_id, long v_pos);
-    void explore(long cur_node, GraphEdgeInfo& cur_edge, bool isStart,
-                 LongVector &vecIndex, std::priority_queue<PDP,
-                 std::vector<PDP>, std::greater<PDP> > &que);
-    double getRestrictionCost(long cur_node, GraphEdgeInfo& new_edge,
-                              bool isStart);
-    bool addEdge(edge edgeIn);
-    bool connectEdge(GraphEdgeInfo& firstEdge, GraphEdgeInfo& secondEdge,
-                     bool bIsStartNodeSame);
-    bool get_single_cost(double total_cost, path_element_tt **path,
-                         size_t *path_count);
-    void init();
-    void deleteall();
-
- private:
-    GraphEdgeVector m_vecEdgeVector;
-    Long2LongMap m_mapEdgeId2Index;
-    Long2LongVectorMap m_mapNodeId2Edge;
-    long max_node_id;
-    long max_edge_id;
-    long m_lStartEdgeId;
-    long m_lEndEdgeId;
-    double m_dStartpart;
-    double m_dEndPart;
-    bool isStartVirtual;
-    bool isEndVirtual;
-
-    std::vector <path_element_tt> m_vecPath;
-    PARENT_PATH *parent;
-    CostHolder *m_dCost;
-    RuleTable m_ruleTable;
-    bool m_bIsturnRestrictOn;
-    bool m_bIsGraphConstructed;
-};
-
-#endif  // SRC_TRSP_SRC_GRAPHDEFINITION_H_
diff --git a/src/trsp/src/trsp.c b/src/trsp/src/trsp.c
deleted file mode 100644
index 340ce97..0000000
--- a/src/trsp/src/trsp.c
+++ /dev/null
@@ -1,881 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-File: trsp.c
-
-Generated with Template by:
-Copyright (c) 2013 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-
-#include "c_common/postgres_connection.h"
-#include "catalog/pg_type.h"
-#include "c_common/debug_macro.h"
-
-
-#if 0
-#include "utils/array.h"
-#include "postgres.h"
-#include "executor/spi.h"
-#include "funcapi.h"
-#if PGSQL_VERSION > 92
-#include "access/htup_details.h"
-#endif
-
-#include "fmgr.h"
-#endif
-
-#include "trsp.h"
-
-PGDLLEXPORT Datum turn_restrict_shortest_path_vertex(PG_FUNCTION_ARGS);
-PGDLLEXPORT Datum turn_restrict_shortest_path_edge(PG_FUNCTION_ARGS);
-
-#if 0
-#undef DEBUG
-// #define DEBUG 1
-
-#ifdef DEBUG
-#define DBG(format, arg...)                     \
-    elog(NOTICE, format , ## arg)
-#else
-#define DBG(format, ...) do { ; } while (0)
-#endif
-#endif
-
-#if 0
-// The number of tuples to fetch from the SPI cursor at each iteration
-#define TUPLIMIT 1000
-
-// #ifdef PG_MODULE_MAGIC
-// PG_MODULE_MAGIC;
-// #endif
-#endif
-
-typedef struct edge_columns {
-  int id;
-  int source;
-  int target;
-  int cost;
-  int reverse_cost;
-} edge_columns_t;
-
-typedef struct restrict_columns {
-  int target_id;
-  int via_path;
-  int to_cost;
-} restrict_columns_t;
-
-
-
-#if 0
-static char *
-text2char(text *in) {
-  char *out = palloc(VARSIZE(in));
-
-  memcpy(out, VARDATA(in), VARSIZE(in) - VARHDRSZ);
-  out[VARSIZE(in) - VARHDRSZ] = '\0';
-  return out;
-}
-#endif
-
-static int
-finish(int code, int ret) {
-  PGR_DBG("In finish, trying to disconnect from spi %d", ret);
-  code = SPI_finish();
-  if (code != SPI_OK_FINISH) {
-    elog(ERROR, "couldn't disconnect from SPI");
-    return -1;
-  }
-  return ret;
-}
-
-/*
- * This function fetches the resturction columns from an SPITupleTable..
- *
-*/
-static int
-fetch_restrict_columns(SPITupleTable *tuptable,
-                       restrict_columns_t *restrict_columns) {
-  restrict_columns->target_id = SPI_fnumber(tuptable->tupdesc, "target_id");
-  restrict_columns->via_path = SPI_fnumber(tuptable->tupdesc, "via_path");
-  restrict_columns->to_cost =  SPI_fnumber(tuptable->tupdesc, "to_cost");
-  if (restrict_columns->target_id == SPI_ERROR_NOATTRIBUTE ||
-      restrict_columns->via_path == SPI_ERROR_NOATTRIBUTE ||
-      restrict_columns->to_cost == SPI_ERROR_NOATTRIBUTE) {
-    elog(ERROR, "Error, restriction query must return columns "
-        "'target_id', 'via_path' and 'to_cost'");
-    return -1;
-  }
-
-  if (SPI_gettypeid(tuptable->tupdesc,
-       restrict_columns->target_id) != INT4OID ||
-     SPI_gettypeid(tuptable->tupdesc, restrict_columns->via_path) != TEXTOID ||
-     SPI_gettypeid(tuptable->tupdesc, restrict_columns->to_cost) != FLOAT8OID) {
-    elog(ERROR, "Error, restriction columns 'target_id' must be of type int4,"
-     "'via_path' must be of type text, 'to_cost' must be of type float8");
-    return -1;
-  }
-
-  return 0;
-}
-
-/*
- * This function fetches the edge columns from the SPITupleTable.
- *
-*/
-static int
-fetch_edge_columns(SPITupleTable *tuptable, edge_columns_t *edge_columns,
-                   bool has_reverse_cost) {
-  edge_columns->id = SPI_fnumber(tuptable->tupdesc, "id");
-  edge_columns->source = SPI_fnumber(tuptable->tupdesc, "source");
-  edge_columns->target = SPI_fnumber(tuptable->tupdesc, "target");
-  edge_columns->cost = SPI_fnumber(tuptable->tupdesc, "cost");
-  if (edge_columns->id == SPI_ERROR_NOATTRIBUTE ||
-      edge_columns->source == SPI_ERROR_NOATTRIBUTE ||
-      edge_columns->target == SPI_ERROR_NOATTRIBUTE ||
-      edge_columns->cost == SPI_ERROR_NOATTRIBUTE) {
-      elog(ERROR, "Error, query must return columns "
-           "'id', 'source', 'target' and 'cost'");
-      return -1;
-    }
-
-  if (SPI_gettypeid(tuptable->tupdesc, edge_columns->source) != INT4OID ||
-      SPI_gettypeid(tuptable->tupdesc, edge_columns->target) != INT4OID ||
-      SPI_gettypeid(tuptable->tupdesc, edge_columns->cost) != FLOAT8OID) {
-      elog(ERROR, "Error, columns 'source', 'target' must be of type int4, "
-      "'cost' must be of type float8");
-      return -1;
-    }
-
-  PGR_DBG("columns: id %i source %i target %i cost %i",
-      edge_columns->id, edge_columns->source,
-      edge_columns->target, edge_columns->cost);
-
-  if (has_reverse_cost) {
-      edge_columns->reverse_cost = SPI_fnumber(tuptable->tupdesc,
-                                               "reverse_cost");
-
-      if (edge_columns->reverse_cost == SPI_ERROR_NOATTRIBUTE) {
-          elog(ERROR, "Error, reverse_cost is used, but query did't return "
-               "'reverse_cost' column");
-          return -1;
-        }
-
-      if (SPI_gettypeid(tuptable->tupdesc, edge_columns->reverse_cost)
-          != FLOAT8OID) {
-          elog(ERROR, "Error, columns 'reverse_cost' must be of type float8");
-          return -1;
-        }
-
-      PGR_DBG("columns: reverse_cost cost %i", edge_columns->reverse_cost);
-    }
-
-  return 0;
-}
-
-/*
- * To fetch a edge from Tuple.
- *
- */
-
-static void
-fetch_edge(HeapTuple *tuple, TupleDesc *tupdesc,
-           edge_columns_t *edge_columns, edge_t *target_edge) {
-  Datum binval;
-  bool isnull;
-
-  binval = SPI_getbinval(*tuple, *tupdesc, edge_columns->id, &isnull);
-  if (isnull)
-    elog(ERROR, "id contains a null value");
-  target_edge->id = DatumGetInt32(binval);
-
-  binval = SPI_getbinval(*tuple, *tupdesc, edge_columns->source, &isnull);
-  if (isnull)
-    elog(ERROR, "source contains a null value");
-  target_edge->source = DatumGetInt32(binval);
-
-  binval = SPI_getbinval(*tuple, *tupdesc, edge_columns->target, &isnull);
-  if (isnull)
-    elog(ERROR, "target contains a null value");
-  target_edge->target = DatumGetInt32(binval);
-
-  binval = SPI_getbinval(*tuple, *tupdesc, edge_columns->cost, &isnull);
-  if (isnull)
-    elog(ERROR, "cost contains a null value");
-  target_edge->cost = DatumGetFloat8(binval);
-
-  if (edge_columns->reverse_cost != -1) {
-      binval = SPI_getbinval(*tuple, *tupdesc, edge_columns->reverse_cost,
-                             &isnull);
-      if (isnull)
-        elog(ERROR, "reverse_cost contains a null value");
-      target_edge->reverse_cost =  DatumGetFloat8(binval);
-    }
-
-  /*
-  PGR_DBG("edge: %i, %i, %i, %f, %f", target_edge->id, target_edge->source,
-    target_edge->target, target_edge->cost, target_edge->reverse_cost);
-  */
-}
-
-
-/*
- * To fetch a edge from Tuple.
- *
- */
-
-static void
-fetch_restrict(HeapTuple *tuple, TupleDesc *tupdesc,
-           restrict_columns_t *restrict_columns, restrict_t *rest) {
-  Datum binval;
-  bool isnull;
-  int t;
-
-  for (t = 0; t < MAX_RULE_LENGTH; ++t)
-    rest->via[t] = -1;
-
-  binval = SPI_getbinval(*tuple, *tupdesc, restrict_columns->target_id,
-       &isnull);
-  if (isnull)
-    elog(ERROR, "target_id contains a null value");
-  rest->target_id = DatumGetInt32(binval);
-
-  binval = SPI_getbinval(*tuple, *tupdesc, restrict_columns->to_cost, &isnull);
-  if (isnull)
-    elog(ERROR, "to_cost contains a null value");
-  rest->to_cost = DatumGetFloat8(binval);
-  char *str = DatumGetCString(SPI_getvalue(*tuple, *tupdesc,
-       restrict_columns->via_path));
-
-  // PGR_DBG("restriction: %f, %i, %s", rest->to_cost, rest->target_id, str);
-
-  if (str != NULL) {
-    char* pch = NULL;
-    int ci = 0;
-
-    pch = (char *)strtok(str, " ,");
-
-    while (pch != NULL && ci < MAX_RULE_LENGTH) {
-      rest->via[ci] = atoi(pch);
-      // PGR_DBG("    rest->via[%i]=%i", ci, rest->via[ci]);
-      ci++;
-      pch = (char *)strtok(NULL, " ,");
-    }
-  }
-}
-
-
-
-static int compute_trsp(
-    char* sql,
-    int dovertex,
-    int64_t start_id,
-    double start_pos,
-    int64_t end_id,
-    double end_pos,
-    bool directed,
-    bool has_reverse_cost,
-    char* restrict_sql,
-    path_element_tt **path,
-    size_t *path_count) {
-
-  int SPIcode;
-  SPIPlanPtr SPIplan;
-  Portal SPIportal;
-  bool moredata = true;
-  uint32_t TUPLIMIT = 1000;
-  uint32_t ntuples;
-
-  edge_t *edges = NULL;
-  uint32_t total_tuples = 0;
-#ifndef _MSC_VER
-  edge_columns_t edge_columns = {.id = -1, .source = -1, .target = -1,
-                                 .cost = -1, .reverse_cost = -1};
-#else  // _MSC_VER
-  edge_columns_t edge_columns = {-1, -1, -1, -1, -1};
-#endif  // _MSC_VER
-  restrict_t *restricts = NULL;
-  uint32_t total_restrict_tuples = 0;
-  restrict_columns_t restrict_columns = {.target_id = -1, .via_path = -1,
-                                 .to_cost = -1};
-  int64_t v_max_id = 0;
-  int64_t v_min_id = INT_MAX;
-
-  /* track if start and end are both in edge tuples */
-  int s_count = 0;
-  int t_count = 0;
-
-  char *err_msg;
-  int ret = -1;
-  uint32_t z;
-
-  PGR_DBG("start turn_restrict_shortest_path\n");
-
-  SPIcode = SPI_connect();
-  if (SPIcode  != SPI_OK_CONNECT) {
-      elog(ERROR, "turn_restrict_shortest_path: "
-      "couldn't open a connection to SPI");
-      return -1;
-  }
-
-  SPIplan = SPI_prepare(sql, 0, NULL);
-  if (SPIplan  == NULL) {
-      elog(ERROR, "turn_restrict_shortest_path: "
-      "couldn't create query plan via SPI");
-      return -1;
-  }
-
-  if ((SPIportal = SPI_cursor_open(NULL, SPIplan, NULL, NULL, true)) == NULL) {
-      elog(ERROR, "turn_restrict_shortest_path: "
-      "SPI_cursor_open('%s') returns NULL", sql);
-      return -1;
-  }
-
-  while (moredata == true) {
-      // PGR_DBG("calling SPI_cursor_fetch");
-      SPI_cursor_fetch(SPIportal, true, TUPLIMIT);
-
-      if (SPI_tuptable == NULL) {
-          elog(ERROR, "SPI_tuptable is NULL");
-          return finish(SPIcode, -1);
-      }
-
-      if (edge_columns.id == -1) {
-          if (fetch_edge_columns(SPI_tuptable, &edge_columns,
-                                 has_reverse_cost) == -1)
-                return finish(SPIcode, ret);
-      }
-
-      ntuples = SPI_processed;
-
-      // PGR_DBG("Reading edges: %i - %i", total_tuples, total_tuples+ntuples);
-
-      total_tuples += ntuples;
-
-      if (ntuples > 0) {
-          if (!edges)
-            edges = palloc(total_tuples * sizeof(edge_t));
-          else
-            edges = repalloc(edges, total_tuples * sizeof(edge_t));
-
-          if (edges == NULL) {
-              elog(ERROR, "Out of memory");
-              return finish(SPIcode, ret);
-          }
-
-          uint32_t t;
-          SPITupleTable *tuptable = SPI_tuptable;
-          TupleDesc tupdesc = SPI_tuptable->tupdesc;
-
-          for (t = 0; t < ntuples; t++) {
-              // if (t%100 == 0) { PGR_DBG("    t: %i", t); }
-              HeapTuple tuple = tuptable->vals[t];
-              fetch_edge(&tuple, &tupdesc, &edge_columns,
-                         &edges[total_tuples - ntuples + t]);
-          }
-          // PGR_DBG("calling SPI_freetuptable");
-          SPI_freetuptable(tuptable);
-          // PGR_DBG("back from SPI_freetuptable");
-      } else {
-          moredata = false;
-      }
-  }
-  SPI_cursor_close(SPIportal);
-
-  // defining min and max vertex id
-
-  // DBG("Total %i edge tuples", total_tuples);
-
-  for (z = 0; z < total_tuples; z++) {
-    if (edges[z].source < v_min_id)
-      v_min_id = edges[z].source;
-
-    if (edges[z].source > v_max_id)
-      v_max_id = edges[z].source;
-
-    if (edges[z].target < v_min_id)
-      v_min_id = edges[z].target;
-
-    if (edges[z].target > v_max_id)
-      v_max_id = edges[z].target;
-
-    // DBG("%i <-> %i", v_min_id, v_max_id);
-  }
-
-  // ::::::::::::::::::::::::::::::::::::
-  // :: reducing vertex id (renumbering)
-  // ::::::::::::::::::::::::::::::::::::
-  for (z = 0; z < total_tuples; z++) {
-    // check if edges[] contains source and target
-    if (dovertex) {
-        if (edges[z].source == start_id || edges[z].target == start_id)
-          ++s_count;
-        if (edges[z].source == end_id || edges[z].target == end_id)
-          ++t_count;
-    } else {
-        if (edges[z].id == start_id)
-          ++s_count;
-        if (edges[z].id == end_id)
-          ++t_count;
-    }
-
-    edges[z].source -= v_min_id;
-    edges[z].target -= v_min_id;
-    edges[z].cost = edges[z].cost;
-    // PGR_DBG("edgeID: %i SRc:%i - %i, cost: %f",
-    // edges[z].id,edges[z].source, edges[z].target,edges[z].cost);
-  }
-
-  PGR_DBG("Min vertex id: %ld , Max vid: %ld", v_min_id, v_max_id);
-  PGR_DBG("Total %i edge tuples", total_tuples);
-
-  if (s_count == 0) {
-    elog(ERROR, "Start id was not found.");
-    return -1;
-  }
-
-  if (t_count == 0) {
-    elog(ERROR, "Target id was not found.");
-    return -1;
-  }
-
-  if (dovertex) {
-      start_id -= v_min_id;
-      end_id   -= v_min_id;
-  }
-
-  PGR_DBG("Fetching restriction tuples\n");
-
-  if (restrict_sql == NULL) {
-      PGR_DBG("Sql for restrictions is null.");
-  } else {
-      SPIplan = SPI_prepare(restrict_sql, 0, NULL);
-      if (SPIplan  == NULL) {
-          elog(ERROR, "turn_restrict_shortest_path: "
-          "couldn't create query plan via SPI");
-          return -1;
-      }
-
-      if ((SPIportal = SPI_cursor_open(NULL, SPIplan, NULL, NULL, true)) \
-       == NULL) {
-          elog(ERROR, "turn_restrict_shortest_path:"
-          " SPI_cursor_open('%s') returns NULL", restrict_sql);
-          return -1;
-      }
-
-      moredata = true;
-      while (moredata == true) {
-          SPI_cursor_fetch(SPIportal, true, TUPLIMIT);
-
-          if (restrict_columns.target_id == -1) {
-              if (fetch_restrict_columns(SPI_tuptable, &restrict_columns) \
-              == -1) {
-                PGR_DBG("fetch_restrict_columns failed!");
-                return finish(SPIcode, ret);
-              }
-          }
-
-          ntuples = SPI_processed;
-          total_restrict_tuples += ntuples;
-
-          // DBG("Reading Restrictions: %i", total_restrict_tuples);
-
-          if (ntuples > 0) {
-              if (!restricts)
-                restricts = palloc(total_restrict_tuples * sizeof(restrict_t));
-              else
-                restricts = repalloc(restricts,
-                    total_restrict_tuples * sizeof(restrict_t));
-
-              if (restricts == NULL) {
-                  elog(ERROR, "Out of memory");
-                  return finish(SPIcode, ret);
-              }
-
-              uint32_t t;
-              SPITupleTable *tuptable = SPI_tuptable;
-              TupleDesc tupdesc = SPI_tuptable->tupdesc;
-
-              for (t = 0; t < ntuples; t++) {
-                  HeapTuple tuple = tuptable->vals[t];
-                  fetch_restrict(&tuple, &tupdesc, &restrict_columns,
-                             &restricts[total_restrict_tuples - ntuples + t]);
-              }
-              SPI_freetuptable(tuptable);
-          } else {
-              moredata = false;
-          }
-      }
-      SPI_cursor_close(SPIportal);
-  }
-
-#ifdef DEBUG_OFF
-    int t;
-    for (t=0; t < total_restrict_tuples; t++) {
-        PGR_DBG("restricts: %.2f, %i, %i, %i, %i, %i, %i",
-        restricts[t].to_cost, restricts[t].target_id, restricts[t].via[0],
-        restricts[t].via[1], restricts[t].via[2], restricts[t].via[3],
-        restricts[t].via[4]);
-    }
-#endif
-
-  PGR_DBG("Total %i restriction tuples", total_restrict_tuples);
-
-  if (dovertex) {
-      PGR_DBG("Calling trsp_node_wrapper\n");
-      /** hack always returns 0 -1 when
-      installed on EDB VC++ 64-bit without this **/
-      #if defined(__MINGW64__)
-        // elog(NOTICE,"Calling trsp_node_wrapper\n");
-      #endif
-      ret = trsp_node_wrapper(edges, total_tuples,
-                        restricts, total_restrict_tuples,
-                        start_id, end_id,
-                        directed, has_reverse_cost,
-                        path, path_count, &err_msg);
-  } else {
-      PGR_DBG("Calling trsp_edge_wrapper\n");
-      ret = trsp_edge_wrapper(edges, total_tuples,
-                        restricts, total_restrict_tuples,
-                        start_id, start_pos, end_id, end_pos,
-                        directed, has_reverse_cost,
-                        path, path_count, &err_msg);
-  }
-
-  PGR_DBG("Message received from inside:");
-  PGR_DBG("%s", err_msg);
-
-  // DBG("SIZE %i\n",*path_count);
-
-  // ::::::::::::::::::::::::::::::::
-  // :: restoring original vertex id
-  // ::::::::::::::::::::::::::::::::
-  for (z = 0; z < *path_count; z++) {
-    // PGR_DBG("vetex %i\n",(*path)[z].vertex_id);
-    if (z || (*path)[z].vertex_id != -1)
-        (*path)[z].vertex_id += v_min_id;
-  }
-
-  PGR_DBG("ret = %i\n", ret);
-
-  PGR_DBG("*path_count = %ld\n", *path_count);
-
-  if (ret < 0) {
-      // elog(ERROR, "Error computing path: %s", err_msg);
-      ereport(ERROR, (errcode(ERRCODE_E_R_E_CONTAINING_SQL_NOT_PERMITTED),
-        errmsg("Error computing path: %s", err_msg)));
-    }
-
-  return finish(SPIcode, ret);
-}
-
-
-
-PG_FUNCTION_INFO_V1(turn_restrict_shortest_path_vertex);
-PGDLLEXPORT Datum
-turn_restrict_shortest_path_vertex(PG_FUNCTION_ARGS) {
-  FuncCallContext     *funcctx;
-#if 0
-  uint32_t             call_cntr;
-  int                  max_calls;
-#endif
-  TupleDesc            tuple_desc;
-  path_element_tt      *path;
-  char *               sql;
-
-
-  // stuff done only on the first call of the function
-  if (SRF_IS_FIRSTCALL()) {
-      MemoryContext   oldcontext;
-      size_t path_count = 0;
-
-      int ret = -1;
-      if (ret == -1) {}  // to avoid warning set but not used
-
-      int i;
-
-      // create a function context for cross-call persistence
-      funcctx = SRF_FIRSTCALL_INIT();
-
-      // switch to memory context appropriate for multiple function calls
-      oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
-
-      // verify that the first 5 args are not NULL
-      for (i = 0; i < 5; i++)
-        if (PG_ARGISNULL(i)) {
-            elog(ERROR, "turn_restrict_shortest_path(): "
-            "Argument %i may not be NULL", i+1);
-        }
-
-      if (PG_ARGISNULL(5)) {
-        sql = NULL;
-      } else {
-        sql = text_to_cstring(PG_GETARG_TEXT_P(5));
-        if (strlen(sql) == 0)
-            sql = NULL;
-      }
-
-      PGR_DBG("Calling compute_trsp");
-
-
-      ret = compute_trsp(text_to_cstring(PG_GETARG_TEXT_P(0)),
-                                   1,  // do vertex
-                                   PG_GETARG_INT32(1),
-                                   0.5,
-                                   PG_GETARG_INT32(2),
-                                   0.5,
-                                   PG_GETARG_BOOL(3),
-                                   PG_GETARG_BOOL(4),
-                                   sql,
-                                   &path, &path_count);
-#ifdef DEBUG
-      double total_cost = 0;
-      PGR_DBG("Ret is %i", ret);
-      if (ret >= 0) {
-          int i;
-          for (i = 0; i < path_count; i++) {
-         // PGR_DBG("Step %i vertex_id  %i ", i, path[i].vertex_id);
-           // PGR_DBG("        edge_id    %i ", path[i].edge_id);
-             // PGR_DBG("        cost       %f ", path[i].cost);
-              total_cost += path[i].cost;
-            }
-        }
-        PGR_DBG("Total cost is: %f", total_cost);
-#endif
-
-      // total number of tuples to be returned
-#if 1
-#if PGSQL_VERSION > 95
-        funcctx->max_calls = path_count;
-#else
-        funcctx->max_calls = (uint32_t)path_count;
-#endif
-#else
-      funcctx->max_calls = path_count;
-#endif
-      funcctx->user_fctx = path;
-
-      funcctx->tuple_desc =
-        BlessTupleDesc(RelationNameGetTupleDesc("pgr_costResult"));
-
-      MemoryContextSwitchTo(oldcontext);
-    }
-
-  // stuff done on every call of the function
-  funcctx = SRF_PERCALL_SETUP();
-
-#if 0
-  call_cntr = funcctx->call_cntr;
-  max_calls = funcctx->max_calls;
-#endif
-  tuple_desc = funcctx->tuple_desc;
-  path = (path_element_tt*) funcctx->user_fctx;
-
-  if (funcctx->call_cntr < funcctx->max_calls) {
-      // do when there is more left to send
-      HeapTuple    tuple;
-      Datum        result;
-      Datum *values;
-      bool* nulls;
-
-      values = palloc(4 * sizeof(Datum));
-      nulls = palloc(4 * sizeof(char));
-
-      values[0] = Int32GetDatum(funcctx->call_cntr);
-      nulls[0] = false;
-      values[1] = Int32GetDatum(path[funcctx->call_cntr].vertex_id);
-      nulls[1] = false;
-      values[2] = Int32GetDatum(path[funcctx->call_cntr].edge_id);
-      nulls[2] = false;
-      values[3] = Float8GetDatum(path[funcctx->call_cntr].cost);
-      nulls[3] = false;
-
-      tuple = heap_form_tuple(tuple_desc, values, nulls);
-
-      // make the tuple into a datum
-      result = HeapTupleGetDatum(tuple);
-
-      // clean up (this is not really necessary)
-      pfree(values);
-      pfree(nulls);
-
-      SRF_RETURN_NEXT(funcctx, result);
-  } else {  // do when there is no more left
-      PGR_DBG("Going to free path");
-      if (path) free(path);
-      SRF_RETURN_DONE(funcctx);
-    }
-}
-
-PG_FUNCTION_INFO_V1(turn_restrict_shortest_path_edge);
-PGDLLEXPORT Datum
-turn_restrict_shortest_path_edge(PG_FUNCTION_ARGS) {
-  FuncCallContext     *funcctx;
-#if 0
-  uint32_t             call_cntr;
-  uint32_t             max_calls;
-#endif
-  TupleDesc            tuple_desc;
-  path_element_tt      *path;
-  char *               sql;
-
-  // stuff done only on the first call of the function
-  if (SRF_IS_FIRSTCALL()) {
-      MemoryContext   oldcontext;
-      size_t path_count = 0;
-#ifdef DEBUG
-      int ret = -1;
-#endif
-      int i;
-      double s_pos;
-      double e_pos;
-
-      // create a function context for cross-call persistence
-      funcctx = SRF_FIRSTCALL_INIT();
-
-      // switch to memory context appropriate for multiple function calls
-      oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
-
-      // verify that the first 5 args are not NULL
-      for (i = 0; i < 7; i++) {
-        if (i == 2 || i == 4) continue;
-        if (PG_ARGISNULL(i)) {
-            elog(ERROR, "turn_restrict_shortest_path(): "
-            "Argument %i may not be NULL", i+1);
-        }
-      }
-
-      if (PG_ARGISNULL(2)) {
-        s_pos = 0.5;
-      } else {
-        s_pos = PG_GETARG_FLOAT8(2);
-        if (s_pos < 0.0) s_pos = 0.5;
-        if (s_pos > 1.0) s_pos = 0.5;
-      }
-
-      if (PG_ARGISNULL(4)) {
-        e_pos = 0.5;
-      } else {
-        e_pos = PG_GETARG_FLOAT8(4);
-        if (e_pos < 0.0) e_pos = 0.5;
-        if (e_pos > 1.0) e_pos = 0.5;
-      }
-
-      if (PG_ARGISNULL(7)) {
-        sql = NULL;
-      } else {
-        sql = text_to_cstring(PG_GETARG_TEXT_P(7));
-        if (strlen(sql) == 0)
-            sql = NULL;
-      }
-
-      PGR_DBG("Calling compute_trsp");
-
-#ifdef DEBUG
-      ret =
-#endif
-         compute_trsp(text_to_cstring(PG_GETARG_TEXT_P(0)),
-                                   0,  // sdo edge
-                                   PG_GETARG_INT32(1),
-                                   s_pos,
-                                   PG_GETARG_INT32(3),
-                                   e_pos,
-                                   PG_GETARG_BOOL(5),
-                                   PG_GETARG_BOOL(6),
-                                   sql,
-                                   &path, &path_count);
-#ifdef DEBUG
-      double total_cost = 0;
-      PGR_DBG("Ret is %i", ret);
-      if (ret >= 0) {
-          int i;
-          for (i = 0; i < path_count; i++) {
-         //     PGR_DBG("Step %i vertex_id  %i ", i, path[i].vertex_id);
-           //   PGR_DBG("        edge_id    %i ", path[i].edge_id);
-             // PGR_DBG("        cost       %f ", path[i].cost);
-              total_cost+=path[i].cost;
-            }
-        }
-        PGR_DBG("Total cost is: %f", total_cost);
-#endif
-
-      // total number of tuples to be returned
-#if 1
-#if PGSQL_VERSION > 95
-        funcctx->max_calls = path_count;
-#else
-        funcctx->max_calls = (uint32_t)path_count;
-#endif
-#else
-      funcctx->max_calls = path_count;
-#endif
-      funcctx->user_fctx = path;
-
-      funcctx->tuple_desc =
-        BlessTupleDesc(RelationNameGetTupleDesc("pgr_costResult"));
-
-      MemoryContextSwitchTo(oldcontext);
-    }
-
-  // stuff done on every call of the function
-  funcctx = SRF_PERCALL_SETUP();
-
-#if 0
-  call_cntr = funcctx->call_cntr;
-  max_calls = funcctx->max_calls;
-#endif
-  tuple_desc = funcctx->tuple_desc;
-  path = (path_element_tt*) funcctx->user_fctx;
-
-  if (funcctx->call_cntr < funcctx->max_calls) {
-      // do when there is more left to send
-      HeapTuple    tuple;
-      Datum        result;
-      Datum *values;
-      bool* nulls;
-
-      values = palloc(4 * sizeof(Datum));
-      nulls = palloc(4 * sizeof(char));
-
-      values[0] = Int32GetDatum(funcctx->call_cntr);
-      nulls[0] = false;
-      values[1] = Int32GetDatum(path[funcctx->call_cntr].vertex_id);
-      nulls[1] = false;
-      values[2] = Int32GetDatum(path[funcctx->call_cntr].edge_id);
-      nulls[2] = false;
-      values[3] = Float8GetDatum(path[funcctx->call_cntr].cost);
-      nulls[3] = false;
-
-      tuple = heap_form_tuple(tuple_desc, values, nulls);
-
-      // make the tuple into a datum
-      result = HeapTupleGetDatum(tuple);
-
-      // clean up (this is not really necessary)
-      pfree(values);
-      pfree(nulls);
-
-      SRF_RETURN_NEXT(funcctx, result);
-    } else {  // do when there is no more left
-      PGR_DBG("Going to free path");
-      if (path) free(path);
-      SRF_RETURN_DONE(funcctx);
-    }
-}
diff --git a/src/trsp/src/trsp.h b/src/trsp/src/trsp.h
deleted file mode 100644
index 43afd67..0000000
--- a/src/trsp/src/trsp.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Shortest path with turn restrictions algorithm for PostgreSQL
- *
- * Copyright (c) 2011 Stephen Woodbridge
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- */
-
-#ifndef SRC_TRSP_SRC_TRSP_H_
-#define SRC_TRSP_SRC_TRSP_H_
-
-#define MAX_RULE_LENGTH 5
-
-#include "postgres.h"
-#include <stdint.h>
-
-
-typedef struct edge {
-    long id;
-    long source;
-    long target;
-    float8 cost;
-    float8 reverse_cost;
-} edge_t;
-
-typedef struct restrict_struct {
-    int target_id;
-    float8 to_cost;
-    int via[MAX_RULE_LENGTH];
-}
-restrict_t;
-
-typedef struct path_element {
-    long vertex_id;
-    long edge_id;
-    float8 cost;
-} path_element_tt;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int trsp_node_wrapper(
-    edge_t *edges,
-    size_t edge_count,
-    restrict_t *restricts,
-    size_t restrict_count,
-    int64_t start_vertex,
-    int64_t end_vertex,
-    bool directed,
-    bool has_reverse_cost,
-    path_element_tt **path,
-    size_t *path_count,
-    char **err_msg
-);
-
-
-int trsp_edge_wrapper(
-    edge_t *edges,
-    size_t edge_count,
-    restrict_t *restricts,
-    size_t restrict_count,
-    int64_t start_edge,
-    double start_pos,
-    int64_t end_edge,
-    double end_pos,
-    bool directed,
-    bool has_reverse_cost,
-    path_element_tt **path,
-    size_t *path_count,
-    char **err_msg
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif  // SRC_TRSP_SRC_TRSP_H_
diff --git a/src/trsp/src/trsp_core.cpp b/src/trsp/src/trsp_core.cpp
deleted file mode 100644
index 0e8c371..0000000
--- a/src/trsp/src/trsp_core.cpp
+++ /dev/null
@@ -1,133 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-File: trsp_core.cpp
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#ifdef __MINGW32__
-#include <winsock2.h>
-#include <windows.h>
-#endif
-
-#include "GraphDefinition.h"
-#include "utils.h"
-
-
-int trsp_node_wrapper(
-    edge_t *edges,
-    size_t edge_count,
-    restrict_t *restricts,
-    size_t restrict_count,
-    int64_t start_vertex,
-    int64_t end_vertex,
-    bool directed,
-    bool has_reverse_cost,
-    path_element_tt **path,
-    size_t *path_count,
-    char **err_msg
-    ) {
-    try {
-        std::vector<PDVI> ruleTable;
-
-        size_t i, j;
-        ruleTable.clear();
-        for (i = 0; i < restrict_count; i++) {
-            std::vector<long> seq;
-            seq.clear();
-            seq.push_back(restricts[i].target_id);
-            for (j = 0; j < MAX_RULE_LENGTH && restricts[i].via[j] > -1; j++) {
-                seq.push_back(restricts[i].via[j]);
-            }
-            ruleTable.push_back(make_pair(restricts[i].to_cost, seq));
-        }
-
-        GraphDefinition gdef;
-        int res = gdef.my_dijkstra(edges, edge_count, start_vertex, end_vertex,
-            directed, has_reverse_cost, path, path_count, err_msg, ruleTable);
-
-
-        if (res < 0)
-            return res;
-        else
-            return EXIT_SUCCESS;
-    }
-    catch(std::exception& e) {
-        *err_msg = (char *) e.what();
-        return -1;
-    }
-    catch(...) {
-        *err_msg = (char *) "Caught unknown exception!";
-        return -1;
-    }
-}
-
-int trsp_edge_wrapper(
-    edge_t *edges,
-    size_t edge_count,
-    restrict_t *restricts,
-    size_t restrict_count,
-    int64_t start_edge,
-    double start_pos,
-    int64_t end_edge,
-    double end_pos,
-    bool directed,
-    bool has_reverse_cost,
-    path_element_tt **path,
-    size_t *path_count,
-    char **err_msg
-    ) {
-    try {
-        std::vector<PDVI> ruleTable;
-
-        size_t i, j;
-        ruleTable.clear();
-        for (i = 0; i < restrict_count; i++) {
-            std::vector<long> seq;
-            seq.clear();
-            seq.push_back(restricts[i].target_id);
-            for (j = 0; j < MAX_RULE_LENGTH && restricts[i].via[j] >- 1; j++) {
-                seq.push_back(restricts[i].via[j]);
-            }
-            ruleTable.push_back(make_pair(restricts[i].to_cost, seq));
-        }
-
-        GraphDefinition gdef;
-        auto res = gdef.my_dijkstra(edges, edge_count, start_edge, start_pos,
-            end_edge, end_pos, directed, has_reverse_cost, path, path_count,
-            err_msg, ruleTable);
-
-
-        if (res < 0)
-            return res;
-        else
-            return EXIT_SUCCESS;
-    }
-    catch(std::exception& e) {
-        *err_msg = (char *) e.what();
-        return -1;
-    }
-    catch(...) {
-        *err_msg = (char *) "Caught unknown exception!";
-        return -1;
-    }
-}
diff --git a/src/trsp/src/trsp_driver.cpp b/src/trsp/src/trsp_driver.cpp
deleted file mode 100644
index 3c51a23..0000000
--- a/src/trsp/src/trsp_driver.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-#if defined(__MINGW32__) || defined(_MSC_VER)
-#include <winsock2.h>
-#include <windows.h>
-#endif
-
-#include <string.h>
-#include <sstream>
-#include "GraphDefinition.h"
-#include "trsp_driver.h"
-
-
-int trsp_node_wrapper(
-    edge_t *edges,         size_t edge_count,
-    restrict_t *restricts, size_t restrict_count,
-    int64_t start_vertex,
-    int64_t end_vertex,
-    bool directed,
-    bool has_reverse_cost,
-    path_element_t **path, size_t *path_count,
-    char **err_msg) {
-
-    std::ostringstream log;
-    try {
-        std::vector<PDVI> ruleTable;
-
-        int j;
-        ruleTable.clear();
-        for (size_t i = 0; i < restrict_count; i++) {
-            std::vector<int64_t> seq;
-            seq.clear();
-            seq.push_back(restricts[i].target_id);
-            for (j = 0; j < MAX_RULE_LENGTH && restricts[i].via[j] > -1; j++) {
-                seq.push_back(restricts[i].via[j]);
-            }
-            ruleTable.push_back(make_pair(restricts[i].to_cost, seq));
-        }
-
-        GraphDefinition gdef(edges, static_cast<unsigned int>(edge_count),
-        directed, has_reverse_cost);
-        gdef.set_restrictions(start_vertex, end_vertex, ruleTable);
-        int res = gdef.my_dijkstra(start_vertex, end_vertex, path, path_count,
-            log);
-
-
-        if (res < 0)
-            return res;
-        else
-            return EXIT_SUCCESS;
-    }
-    catch(std::exception& e) {
-        log << e.what();
-        *err_msg = strdup(log.str().c_str());
-        return -1;
-    }
-    catch(...) {
-        log << "Caught unknown exception!";
-        *err_msg = strdup(log.str().c_str());
-        return -1;
-    }
-}
-
-int trsp_edge_wrapper(
-    edge_t *edges,          size_t edge_count,
-    restrict_t *restricts,  size_t restrict_count,
-    int64_t start_edge,
-    double start_pos,
-    int64_t end_edge,
-    double end_pos,
-    bool directed,
-    bool has_reverse_cost,
-    path_element_t **path, size_t *path_count,
-    char **err_msg) {
-    std::ostringstream log;
-    try {
-        std::vector<PDVI> ruleTable;
-
-        int j;
-        ruleTable.clear();
-        for (size_t i = 0; i < restrict_count; i++) {
-            std::vector<int64_t> seq;
-            seq.clear();
-            seq.push_back(restricts[i].target_id);
-            for (j = 0; j < MAX_RULE_LENGTH && restricts[i].via[j] >- 1; j++) {
-                seq.push_back(restricts[i].via[j]);
-            }
-            ruleTable.push_back(make_pair(restricts[i].to_cost, seq));
-        }
-
-        GraphDefinition gdef(edges, static_cast<unsigned int>(edge_count),
-        directed, has_reverse_cost);
-
-        int64_t start_vertex = 0;
-        int64_t end_vertex = 0;
-        gdef.add_virtual_vertices(
-                start_edge, start_pos,
-                end_edge, end_pos,
-                start_vertex, end_vertex);
-
-        gdef.set_restrictions(start_vertex, end_vertex, ruleTable);
-        int res = gdef.my_dijkstra(start_vertex, end_vertex, path, path_count,
-            log);
-
-
-        if (res < 0)
-            return res;
-        else
-            return EXIT_SUCCESS;
-    }
-    catch(std::exception& e) {
-        log << e.what();
-        *err_msg = strdup(log.str().c_str());
-        return -1;
-    }
-    catch(...) {
-        log << "Caught unknown exception!";
-        *err_msg = strdup(log.str().c_str());
-        return -1;
-    }
-}
diff --git a/src/trsp/src/trsp_driver.h b/src/trsp/src/trsp_driver.h
deleted file mode 100644
index 1bb38cd..0000000
--- a/src/trsp/src/trsp_driver.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*PGR-GNU*****************************************************************
-
- * Copyright (c) 2011 Stephen Woodbridge
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#ifndef SRC_TRSP_SRC_TRSP_DRIVER_H_
-#define SRC_TRSP_SRC_TRSP_DRIVER_H_
-
-#define MAX_RULE_LENGTH 5
-
-#include "c_types/pgr_types.h"
-
-typedef pgr_edge_t edge_t;
-typedef Restrict_t restrict_t;
-
-#ifdef __cplusplus
-extern "C" {
-  #endif
-  int trsp_node_wrapper (
-    edge_t *edges, size_t edge_count,
-    restrict_t *restricts, size_t restrict_count,
-    int64_t start_vertex,
-    int64_t end_vertex,
-    bool directed,
-    bool has_reverse_cost,
-    path_element_t **path, size_t *path_count,
-    char **err_msg
-  );
-
-  int trsp_edge_wrapper (
-    edge_t *edges, size_t edge_count,
-    restrict_t *restricts, size_t restrict_count,
-    int64_t start_edge,
-    double start_pos,
-    int64_t end_edge,
-    double end_pos,
-    bool directed,
-    bool has_reverse_cost,
-    path_element_t **path, size_t *path_count,
-    char **err_msg
-  );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // SRC_TRSP_SRC_TRSP_DRIVER_H_
diff --git a/src/trsp/src/utils.h b/src/trsp/src/utils.h
deleted file mode 100644
index 3f2e179..0000000
--- a/src/trsp/src/utils.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Shortest path with turn restrictions algorithm for PostgreSQL
- *
- * Copyright (c) 2011 Stephen Woodbridge
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- */
-
-#ifndef SRC_TRSP_SRC_UTILS_H_
-#define SRC_TRSP_SRC_UTILS_H_
-
-#include <string>
-#include <map>
-#include <vector>
-#include <queue>
-#include <iostream>
-
-
-
-
-typedef std::vector<long> LongVector;
-typedef std::vector<int> IntVector;
-typedef std::vector<double> DoubleVector;
-typedef std::vector<std::string> StringVector;
-
-
-class StringOperation {
- public:
-     static std::string TRIMWHITESPACE(std::string strInput) {
-         std::string strOut = strInput;
-         std::string strWht = " \f\n\r\t\v";
-         strOut.erase(0, strOut.find_first_not_of(strWht));
-         strOut.erase(strOut.find_last_not_of(strWht) + 1);
-         return strOut;
-     };
-};
-
-class StringTokenizer {
- public:
-     StringTokenizer() {
-         reset();
-     }
-     void reset() {
-         vecTokens.clear();
-         strInput = "";
-     }
-      bool parse(std::string strInput, std::string chDelim) {
-         size_t iStartPos = 0;
-         while (true) {
-             size_t iPos = strInput.find(chDelim[0], iStartPos);
-             if (iPos != std::string::npos) {
-                 std::string strToken;
-                 strToken = strInput.substr(iStartPos, iPos - iStartPos);
-                 vecTokens.push_back(strToken);
-                 iStartPos = iPos + 1;
-             } else if (iPos == std::string::npos && strInput.length() > 0) {
-                 std::string strToken;
-                 strToken = strInput.substr(iStartPos,
-                     strInput.length() - iStartPos);
-                 if (strToken.length() > 0)
-                     vecTokens.push_back(strToken);
-                 break;
-             } else {
-                 break;
-             }
-         }
-         return true;
-     }
-     size_t getTokenCount() {
-         return vecTokens.size();
-     }
-
-     bool getToken(std::string& strToken, long iTokenIndex) {
-         long lTokenCount = vecTokens.size();
-         if (iTokenIndex < 0 || iTokenIndex < lTokenCount) {
-             strToken = vecTokens[iTokenIndex];
-             return true;
-         }
-         return false;
-     }
-
-     bool getTokens(StringVector& vecTokensRef) {
-         vecTokensRef = vecTokens;
-         return true;
-     }
-
- private:
-     std::string strInput;
-     StringVector vecTokens;
-};
-
-#endif  // SRC_TRSP_SRC_UTILS_H_
diff --git a/src/trsp/test/doc-trsp.result b/src/trsp/test/doc-trsp.result
deleted file mode 100644
index df8cb9e..0000000
--- a/src/trsp/test/doc-trsp.result
+++ /dev/null
@@ -1,115 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
---q1
-SELECT * FROM pgr_trsp(
-        'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edge_table',
-        7, 12, false, false
-    );
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |   7 |   6 |    1
-   1 |   8 |   7 |    1
-   2 |   5 |   8 |    1
-   3 |   6 |   9 |    1
-   4 |   9 |  15 |    1
-   5 |  12 |  -1 |    0
-(6 rows)
-
---q2
---q3
-SELECT * FROM pgr_trsp(
-        'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edge_table',
-        2, 7, false, false,
-        'SELECT to_cost, target_id::int4,
-        from_edge || coalesce('','' || via_path, '''') AS via_path
-        FROM restrictions'
-    );
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |   2 |   4 |    1
-   1 |   5 |  10 |    1
-   2 |  10 |  12 |    1
-   3 |  11 |  11 |    1
-   4 |   6 |   8 |    1
-   5 |   5 |   7 |    1
-   6 |   8 |   6 |    1
-   7 |   7 |  -1 |    0
-(8 rows)
-
-SELECT * FROM pgr_trsp(
-        'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edge_table',
-        7, 11, false, false,
-        'SELECT to_cost, target_id::int4,
-        from_edge || coalesce('','' || via_path, '''') AS via_path
-        FROM restrictions'
-    );
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |   7 |   6 |    1
-   1 |   8 |   7 |    1
-   2 |   5 |   8 |    1
-   3 |   6 |   9 |    1
-   4 |   9 |  15 |    1
-   5 |  12 |  13 |    1
-   6 |  11 |  -1 |    0
-(7 rows)
-
---q4
-SELECT * FROM pgr_trspViaVertices(
-        'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edge_table',
-        ARRAY[2,7,11]::INTEGER[],
-        false,  false,
-        'SELECT to_cost, target_id::int4, from_edge ||
-        coalesce('',''||via_path,'''') AS via_path FROM restrictions');
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |   2 |   4 |    1
-   2 |   1 |   5 |  10 |    1
-   3 |   1 |  10 |  12 |    1
-   4 |   1 |  11 |  11 |    1
-   5 |   1 |   6 |   8 |    1
-   6 |   1 |   5 |   7 |    1
-   7 |   1 |   8 |   6 |    1
-   8 |   2 |   7 |   6 |    1
-   9 |   2 |   8 |   7 |    1
-  10 |   2 |   5 |   8 |    1
-  11 |   2 |   6 |   9 |    1
-  12 |   2 |   9 |  15 |    1
-  13 |   2 |  12 |  13 |    1
-  14 |   2 |  11 |  -1 |    0
-(14 rows)
-
---q5
-SELECT * FROM pgr_trspViaEdges(
-        'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost,
-        reverse_cost FROM edge_table',
-        ARRAY[2,7,11]::INTEGER[],
-        ARRAY[0.5, 0.5, 0.5]::FLOAT[],
-        true,
-        true,
-        'SELECT to_cost, target_id::int4, FROM_edge ||
-        coalesce('',''||via_path,'''') AS via_path FROM restrictions');
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |  -1 |   2 |  0.5
-   2 |   1 |   2 |   4 |    1
-   3 |   1 |   5 |   8 |    1
-   4 |   1 |   6 |   9 |    1
-   5 |   1 |   9 |  16 |    1
-   6 |   1 |   4 |   3 |    1
-   7 |   1 |   3 |   5 |    1
-   8 |   1 |   6 |   8 |    1
-   9 |   1 |   5 |   7 |    1
-  10 |   2 |   5 |   8 |    1
-  11 |   2 |   6 |   9 |    1
-  12 |   2 |   9 |  16 |    1
-  13 |   2 |   4 |   3 |    1
-  14 |   2 |   3 |   5 |    1
-  15 |   2 |   6 |  11 |  0.5
-(15 rows)
-
---q6
-ROLLBACK;
-ROLLBACK
diff --git a/src/trsp/test/doc-trsp.test.sql b/src/trsp/test/doc-trsp.test.sql
deleted file mode 100644
index 183de73..0000000
--- a/src/trsp/test/doc-trsp.test.sql
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-    ------------------------------------------------------------------------------------------------------
-    ------------------------------------------------------------------------------------------------------
-    --              PGR_pgr_trsp
-    ------------------------------------------------------------------------------------------------------
-    ------------------------------------------------------------------------------------------------------
-
-\echo --q1
-    SELECT * FROM pgr_trsp(
-        'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edge_table',
-        7, 12, false, false
-    );
-
-\echo --q2
-
-\echo --q3
-    SELECT * FROM pgr_trsp(
-        'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edge_table',
-        2, 7, false, false,
-        'SELECT to_cost, target_id::int4,
-        from_edge || coalesce('','' || via_path, '''') AS via_path
-        FROM restrictions'
-    );
-    SELECT * FROM pgr_trsp(
-        'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edge_table',
-        7, 11, false, false,
-        'SELECT to_cost, target_id::int4,
-        from_edge || coalesce('','' || via_path, '''') AS via_path
-        FROM restrictions'
-    );
-
-
-\echo --q4
-    SELECT * FROM pgr_trspViaVertices(
-        'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edge_table',
-        ARRAY[2,7,11]::INTEGER[],
-        false,  false,
-        'SELECT to_cost, target_id::int4, from_edge ||
-        coalesce('',''||via_path,'''') AS via_path FROM restrictions');
-
-
-\echo --q5
-    SELECT * FROM pgr_trspViaEdges(
-        'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost,
-        reverse_cost FROM edge_table',
-        ARRAY[2,7,11]::INTEGER[],
-        ARRAY[0.5, 0.5, 0.5]::FLOAT[],
-        true,
-        true,
-        'SELECT to_cost, target_id::int4, FROM_edge ||
-        coalesce('',''||via_path,'''') AS via_path FROM restrictions');
-    
-\echo --q6
diff --git a/src/trsp/test/issue693.result b/src/trsp/test/issue693.result
deleted file mode 100644
index 014ca69..0000000
--- a/src/trsp/test/issue693.result
+++ /dev/null
@@ -1,28 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
-CREATE TABLE routing (gid serial, length integer, source integer, target integer, reverse_cost integer);
-CREATE TABLE
-INSERT INTO routing (length, source, target, reverse_cost) VALUES
-     (10000, 1, 2, 10000),
-     (5, 3, 1, 5),
-     (10, 4, 3, 10),
-     (10, 2, 4, 10);
-INSERT 0 4
-SELECT pgr_trsp(
-          'SELECT gid as id, source::int4, target::int4, length::float8 as cost, length::float8 as reverse_cost FROM routing', 
-          1, 0.1, 1, 0.9, false, true
-    );
-   pgr_trsp    
----------------
- (0,-1,1,1000)
- (1,1,2,5)
- (2,3,3,10)
- (3,4,4,10)
- (4,2,1,1000)
- (5,-2,-1,0)
-(6 rows)
-
-ROLLBACK;
-ROLLBACK
diff --git a/src/trsp/test/issue693.test.sql b/src/trsp/test/issue693.test.sql
deleted file mode 100644
index aae3fa1..0000000
--- a/src/trsp/test/issue693.test.sql
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-    CREATE TABLE routing (gid serial, length integer, source integer, target integer, reverse_cost integer);
-    INSERT INTO routing (length, source, target, reverse_cost) VALUES
-     (10000, 1, 2, 10000),
-     (5, 3, 1, 5),
-     (10, 4, 3, 10),
-     (10, 2, 4, 10);
-
-    SELECT pgr_trsp(
-          'SELECT gid as id, source::int4, target::int4, length::float8 as cost, length::float8 as reverse_cost FROM routing', 
-          1, 0.1, 1, 0.9, false, true
-    );
-
diff --git a/src/trsp/test/issue704.result b/src/trsp/test/issue704.result
deleted file mode 100644
index 364fa92..0000000
--- a/src/trsp/test/issue704.result
+++ /dev/null
@@ -1,82 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
-CREATE TABLE maptest as 
-SELECT  671222::integer as id, 318255::integer as  source, 222698::integer as target, 14.02::float8 as cost, 14.02::float8 as reverse_cost UNION ALL
-SELECT  671223, 222698, 36655, 197.16, 197.16 UNION ALL
-SELECT  582877, 408918, 5556, 458.09, 458.09 UNION ALL
-SELECT  582876, 318255, 408918, 3.89, 3.89 UNION ALL
-SELECT  585280, 5556, 454424, 54.84, 54.84;
-SELECT 5
-q1
-SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4)
-FROM pgr_trsp(
-    'select * from maptest',
-    582877,     
-    0,          
-    582877,     
-    0.5,        
-    true,        
-    true,      
-    null 
-) PG ;
- seq | node | edge | cost 
------+------+------+------
-(0 rows)
-
-q2
-SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4)
-FROM pgr_trsp(
-    'select * from maptest',
-    582877,     
-    0.0000000001,          
-    582877,     
-    0.5,        
-    true,        
-    true,      
-    null 
-) PG ;
- seq | node |  edge  |   cost   
------+------+--------+----------
-   0 |   -1 | 582877 | 229.0450
-   1 |   -2 |     -1 |   0.0000
-(2 rows)
-
-q3
-SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4)
-FROM pgr_trsp(
-    'select * from maptest',
-    582877,     
-    0,         
-    582877,     
-    0.5,        
-    true,        
-    true,      
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-) PG ;
- seq | node |  edge  |   cost   
------+------+--------+----------
-   0 |   -1 | 582877 | 229.0450
-(1 row)
-
-q4
-SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4)
-FROM pgr_trsp(
-    'select * from maptest',
-    582877,     
-    0.0000000001,          
-    582877,     
-    0.5,        
-    true,        
-    true,      
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-) PG ;
- seq | node |  edge  |   cost   
------+------+--------+----------
-   0 |   -1 | 582877 | 229.0450
-(1 row)
-
-q5
-ROLLBACK;
-ROLLBACK
diff --git a/src/trsp/test/issue704.test.sql b/src/trsp/test/issue704.test.sql
deleted file mode 100644
index ffd8e2c..0000000
--- a/src/trsp/test/issue704.test.sql
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-CREATE TABLE maptest as 
-SELECT  671222::integer as id, 318255::integer as  source, 222698::integer as target, 14.02::float8 as cost, 14.02::float8 as reverse_cost UNION ALL
-SELECT  671223, 222698, 36655, 197.16, 197.16 UNION ALL
-SELECT  582877, 408918, 5556, 458.09, 458.09 UNION ALL
-SELECT  582876, 318255, 408918, 3.89, 3.89 UNION ALL
-SELECT  585280, 5556, 454424, 54.84, 54.84;
-\echo q1
-SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4)
-FROM pgr_trsp(
-    'select * from maptest',
-    582877,     -- edge_id for start
-    0,          -- ini_offset
-    582877,     -- edge_id of route end
-    0.5,        -- end_offset
-    true,        -- directed graph?
-    true,      -- has_reverse_cost?
-    null -- include the turn restrictions
-) PG ; 
-\echo q2
-
-SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4)
-FROM pgr_trsp(
-    'select * from maptest',
-    582877,     -- edge_id for start
-    0.0000000001,          -- ini_offset
-    582877,     -- edge_id of route end
-    0.5,        -- end_offset
-    true,        -- directed graph?
-    true,      -- has_reverse_cost?
-    null -- include the turn restrictions
-) PG ;
-\echo q3
-
-SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4)
-FROM pgr_trsp(
-    'select * from maptest',
-    582877,     -- edge_id for start
-    0,         -- ini_offset
-    582877,     -- edge_id of route end
-    0.5,        -- end_offset
-    true,        -- directed graph?
-    true,      -- has_reverse_cost?
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-) PG ;
-\echo q4
-
-SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4)
-FROM pgr_trsp(
-    'select * from maptest',
-    582877,     -- edge_id for start
-    0.0000000001,          -- ini_offset
-    582877,     -- edge_id of route end
-    0.5,        -- end_offset
-    true,        -- directed graph?
-    true,      -- has_reverse_cost?
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-) PG ;
-\echo q5
-
diff --git a/src/trsp/test/issue717.result b/src/trsp/test/issue717.result
deleted file mode 100644
index 9b41630..0000000
--- a/src/trsp/test/issue717.result
+++ /dev/null
@@ -1,359 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- tests to without restrictions
--- directed with reverse_cost
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License AS published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-
-
-
-
-
-SELECT * FROM pgr_trspViaVertices(
-    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
-    ARRAY[2, 7, 11]::INTEGER[],     
-    true,  
-    true  
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |   2 |   4 |    1
-   2 |   1 |   5 |   7 |    1
-   3 |   1 |   8 |   6 |    1
-   4 |   2 |   7 |   6 |    1
-   5 |   2 |   8 |   7 |    1
-   6 |   2 |   5 |  10 |    1
-   7 |   2 |  10 |  12 |    1
-   8 |   2 |  11 |  -1 |    0
-(8 rows)
-
----------------------------
-SELECT * FROM pgr_trspViaEdges(
-    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
-    ARRAY[4,6,11]::INTEGER[],           
-    ARRAY[0.5, 0.5, 0.5]::float8[],     
-    true,  
-    true  
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |  -1 |   4 |  0.5
-   2 |   1 |   5 |   7 |    1
-   3 |   1 |   8 |   6 |  0.5
-   4 |   1 |  -2 |  -1 |    0
-   5 |   2 |  -2 |   6 |  0.5
-   6 |   2 |   8 |   7 |    1
-   7 |   2 |   5 |   8 |    1
-   8 |   2 |   6 |  11 |  0.5
-   9 |   2 |  -3 |  -2 |    0
-(9 rows)
-
----------------------------
-SELECT * FROM pgr_trspViaEdges(
-    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
-    ARRAY[1,11,6]::INTEGER[],           
-    ARRAY[0.5, 0.5, 0.5]::float8[],     
-    true,  
-    true  
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |  -1 |   1 |  0.5
-   2 |   1 |   2 |   4 |    1
-   3 |   1 |   5 |   8 |    1
-   4 |   1 |   6 |  11 |  0.5
-   5 |   1 |  -2 |  -1 |    0
-   6 |   2 |  -2 |  11 |  0.5
-   7 |   2 |  11 |  13 |    1
-   8 |   2 |  12 |  15 |    1
-   9 |   2 |   9 |   9 |    1
-  10 |   2 |   6 |   8 |    1
-  11 |   2 |   5 |   7 |    1
-  12 |   2 |   8 |   6 |  0.5
-  13 |   2 |  -3 |  -2 |    0
-(13 rows)
-
----------------------------
-SELECT * FROM pgr_trspViaEdges(
-    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
-    ARRAY[1,11,6]::INTEGER[],           
-    ARRAY[0.5, 0.5, 0.5]::float8[],     
-    true,  
-    true  
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |  -1 |   1 |  0.5
-   2 |   1 |   2 |   4 |    1
-   3 |   1 |   5 |   8 |    1
-   4 |   1 |   6 |  11 |  0.5
-   5 |   1 |  -2 |  -1 |    0
-   6 |   2 |  -2 |  11 |  0.5
-   7 |   2 |  11 |  13 |    1
-   8 |   2 |  12 |  15 |    1
-   9 |   2 |   9 |   9 |    1
-  10 |   2 |   6 |   8 |    1
-  11 |   2 |   5 |   7 |    1
-  12 |   2 |   8 |   6 |  0.5
-  13 |   2 |  -3 |  -2 |    0
-(13 rows)
-
----------------------------
--- directed without reverse_cost
-SELECT * FROM pgr_trspViaVertices(
-    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
-    ARRAY[2, 7, 11]::INTEGER[],     
-    true,  
-    false  
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-(0 rows)
-
----------------------------
-SELECT * FROM pgr_trspViaEdges(
-    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
-    ARRAY[4,6,11]::INTEGER[],           
-    ARRAY[0.5, 0.5, 0.5]::float8[],     
-    true,  
-    false  
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   2 |  -2 |   6 |  0.5
-   2 |   2 |   8 |   7 |    1
-   3 |   2 |   5 |   8 |    1
-   4 |   2 |   6 |  11 |  0.5
-   5 |   2 |  -3 |  -2 |    0
-(5 rows)
-
----------------------------
-SELECT * FROM pgr_trspViaEdges(
-    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
-    ARRAY[1,11,6]::INTEGER[],           
-    ARRAY[0.5, 0.5, 0.5]::float8[],     
-    true,  
-    false  
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |  -1 |   1 |  0.5
-   2 |   1 |   2 |   4 |    1
-   3 |   1 |   5 |   8 |    1
-   4 |   1 |   6 |  11 |  0.5
-   5 |   1 |  -2 |  -2 |    0
-(5 rows)
-
----------------------------
-SELECT * FROM pgr_trspViaEdges(
-    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
-    ARRAY[1,11,6]::INTEGER[],           
-    ARRAY[0.5, 0.5, 0.5]::float8[],     
-    true,  
-    false  
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |  -1 |   1 |  0.5
-   2 |   1 |   2 |   4 |    1
-   3 |   1 |   5 |   8 |    1
-   4 |   1 |   6 |  11 |  0.5
-   5 |   1 |  -2 |  -2 |    0
-(5 rows)
-
----------------------------
--- undirected with reverse_cost
-SELECT * FROM pgr_trspViaVertices(
-    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
-    ARRAY[2, 7, 11]::INTEGER[],     
-    false,  
-    true  
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |   2 |   4 |    1
-   2 |   1 |   5 |   7 |    1
-   3 |   1 |   8 |   6 |    1
-   4 |   2 |   7 |   6 |    1
-   5 |   2 |   8 |   7 |    1
-   6 |   2 |   5 |  10 |    1
-   7 |   2 |  10 |  12 |    1
-   8 |   2 |  11 |  -1 |    0
-(8 rows)
-
----------------------------
-SELECT * FROM pgr_trspViaEdges(
-    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
-    ARRAY[4,6,11]::INTEGER[],           
-    ARRAY[0.5, 0.5, 0.5]::float8[],     
-    false,  
-    true  
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |  -1 |   4 |  0.5
-   2 |   1 |   5 |   7 |    1
-   3 |   1 |   8 |   6 |  0.5
-   4 |   1 |  -2 |  -1 |    0
-   5 |   2 |  -2 |   6 |  0.5
-   6 |   2 |   8 |   7 |    1
-   7 |   2 |   5 |   8 |    1
-   8 |   2 |   6 |  11 |  0.5
-   9 |   2 |  -3 |  -2 |    0
-(9 rows)
-
----------------------------
-SELECT * FROM pgr_trspViaEdges(
-    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
-    ARRAY[1,11,6]::INTEGER[],           
-    ARRAY[0.5, 0.5, 0.5]::float8[],     
-    false,  
-    true  
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |  -1 |   1 |  0.5
-   2 |   1 |   2 |   2 |    1
-   3 |   1 |   3 |   5 |    1
-   4 |   1 |   6 |  11 |  0.5
-   5 |   1 |  -2 |  -1 |    0
-   6 |   2 |  -2 |  11 |  0.5
-   7 |   2 |   6 |   8 |    1
-   8 |   2 |   5 |   7 |    1
-   9 |   2 |   8 |   6 |  0.5
-  10 |   2 |  -3 |  -2 |    0
-(10 rows)
-
----------------------------
-SELECT * FROM pgr_trspViaEdges(
-    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
-    ARRAY[1,11,6]::INTEGER[],           
-    ARRAY[0.5, 0.5, 0.5]::float8[],     
-    false,  
-    true  
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |  -1 |   1 |  0.5
-   2 |   1 |   2 |   2 |    1
-   3 |   1 |   3 |   5 |    1
-   4 |   1 |   6 |  11 |  0.5
-   5 |   1 |  -2 |  -1 |    0
-   6 |   2 |  -2 |  11 |  0.5
-   7 |   2 |   6 |   8 |    1
-   8 |   2 |   5 |   7 |    1
-   9 |   2 |   8 |   6 |  0.5
-  10 |   2 |  -3 |  -2 |    0
-(10 rows)
-
----------------------------
--- undirected without reverse_cost
-SELECT * FROM pgr_trspViaVertices(
-    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
-    ARRAY[2, 7, 11]::INTEGER[],     
-    false,  
-    false  
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |   2 |   4 |    1
-   2 |   1 |   5 |   7 |    1
-   3 |   1 |   8 |   6 |    1
-   4 |   2 |   7 |   6 |    1
-   5 |   2 |   8 |   7 |    1
-   6 |   2 |   5 |  10 |    1
-   7 |   2 |  10 |  12 |    1
-   8 |   2 |  11 |  -1 |    0
-(8 rows)
-
----------------------------
-SELECT * FROM pgr_trspViaEdges(
-    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
-    ARRAY[4,6,11]::INTEGER[],           
-    ARRAY[0.5, 0.5, 0.5]::float8[],     
-    false,  
-    false  
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |  -1 |   4 |  0.5
-   2 |   1 |   5 |   7 |    1
-   3 |   1 |   8 |   6 |  0.5
-   4 |   1 |  -2 |  -1 |    0
-   5 |   2 |  -2 |   6 |  0.5
-   6 |   2 |   8 |   7 |    1
-   7 |   2 |   5 |   8 |    1
-   8 |   2 |   6 |  11 |  0.5
-   9 |   2 |  -3 |  -2 |    0
-(9 rows)
-
----------------------------
-SELECT * FROM pgr_trspViaEdges(
-    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
-    ARRAY[1,11,6]::INTEGER[],           
-    ARRAY[0.5, 0.5, 0.5]::float8[],     
-    false,  
-    false  
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |  -1 |   1 |  0.5
-   2 |   1 |   2 |   4 |    1
-   3 |   1 |   5 |   8 |    1
-   4 |   1 |   6 |  11 |  0.5
-   5 |   1 |  -2 |  -1 |    0
-   6 |   2 |  -2 |  11 |  0.5
-   7 |   2 |   6 |   8 |    1
-   8 |   2 |   5 |   7 |    1
-   9 |   2 |   8 |   6 |  0.5
-  10 |   2 |  -3 |  -2 |    0
-(10 rows)
-
----------------------------
-SELECT * FROM pgr_trspViaEdges(
-    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
-    ARRAY[1,11,6]::INTEGER[],           
-    ARRAY[0.5, 0.5, 0.5]::float8[],     
-    false,  
-    false  
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |  -1 |   1 |  0.5
-   2 |   1 |   2 |   4 |    1
-   3 |   1 |   5 |   8 |    1
-   4 |   1 |   6 |  11 |  0.5
-   5 |   1 |  -2 |  -1 |    0
-   6 |   2 |  -2 |  11 |  0.5
-   7 |   2 |   6 |   8 |    1
-   8 |   2 |   5 |   7 |    1
-   9 |   2 |   8 |   6 |  0.5
-  10 |   2 |  -3 |  -2 |    0
-(10 rows)
-
----------------------------
-ROLLBACK;
-ROLLBACK
diff --git a/src/trsp/test/test.conf b/src/trsp/test/test.conf
deleted file mode 100644
index 02c446a..0000000
--- a/src/trsp/test/test.conf
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/perl -w
-
-%main::tests = (
-    'any' => {
-        'comment' => 'TRSP test for any versions.',
-        'data' => ['trsp-issue244.data'],
-        'tests' => [qw(
-            doc-trsp
-            trsp-any-02 
-            trsp_vias-any-04 
-            issue693
-            issue704
-            issue717
-            trsp_notes_v2.5.0
-            )],
-        'documentation' => [qw(
-            trsp_notes_v2.5.0
-            issue704
-            doc-trsp
-            )]
-    },
-
-#    'vpg-vpgis' => {}, # for version specific tests
-#    '8-1' => {},       # for pg 8.x and postgis 1.x
-#    '9.2-2.1' => {},   # for pg 9.2 and postgis 2.1
-);
-
-1;
diff --git a/src/trsp/test/trsp-any-02.result b/src/trsp/test/trsp-any-02.result
deleted file mode 100644
index 26b0249..0000000
--- a/src/trsp/test/trsp-any-02.result
+++ /dev/null
@@ -1,42 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
-CREATE TABLE restrictions2 (
-    rid integer NOT NULL,
-    to_cost double precision,
-    teid integer,
-    feid integer,
-    via text
-);
-CREATE TABLE
-COPY restrictions2 (rid, to_cost, teid, feid, via) FROM stdin WITH NULL '__NULL__' DELIMITER ',';
-COPY 3
-UPDATE edge_table SET cost = cost + 0.001 * id * id, reverse_cost = reverse_cost + 0.001 * id * id;
-UPDATE 18
-select * from pgr_trsp(
-    'select id::integer, source::integer, target::integer,cost, reverse_cost from edge_table ORDER BY ID',
-    1,    
-    0.5,  
-    6,    
-    0.5,  
-    true, 
-    true, 
-    
-    'select to_cost, teid as target_id, feid||coalesce('',''||via,'''') as via_path from restrictions2');
- seq | id1 | id2 |       cost        
------+-----+-----+-------------------
-   0 |  -1 |   1 |            0.5005
-   1 |   2 |   4 |             1.016
-   2 |   5 |   8 |             1.064
-   3 |   6 |   9 |             1.081
-   4 |   9 |  16 |             1.256
-   5 |   4 |   3 |             1.009
-   6 |   3 |   5 |             1.025
-   7 |   6 |   8 |             1.064
-   8 |   5 |   7 |             1.049
-   9 |   8 |   6 | 0.518000000000001
-(10 rows)
-
-ROLLBACK;
-ROLLBACK
diff --git a/src/trsp/test/trsp_notes_v2.5.0.result b/src/trsp/test/trsp_notes_v2.5.0.result
deleted file mode 100644
index fec6b64..0000000
--- a/src/trsp/test/trsp_notes_v2.5.0.result
+++ /dev/null
@@ -1,1112 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
-ROLLBACK;
-ROLLBACK
-# Notes on pgr_trsp for version 2.5.0
-Table of contents
-* [Introduction](#introduction)
-  * [The restriction](#the-restriction)
-* [The Vertices Signature Version](#the-vertices-signature-version)
-  * [No path representation differences](#vertices-no-path-representation-differences)
-  * [Routing from/to same location](#routing-fromto-same-location)
-  * [Undirected graph](#vertices-undirected-graph)
-* [The Edges Signature Version](#the-edges-signature-version)
-  * [No path representation differences](#edges-no-path-representation-differences)
-  * [Definition of a path](#definition-of-a-path)
-  * [Points on the same edge](#points-on-the-same-edge)
-  * [Undirected graph](#edges-undirected-graph)
-  * [Using a points of interest table](#using-a-points-of-interest-table)
-  * [Routing from/to the same point](#routing-fromto-the-same-point)
-  * [Passing in front of other points](#passing-in-front-of-other-points)
-  * [Routing from a vertex to a point](#edges-routing-from-a-vertex-to-a-point)
-* [pgr_trspViaVertices](#pgr_trspviavertices)
-  * [pgr_trspViaVertices No path representation differences](#pgr_trspviavertices-no-path-representation-differences)
-  * [when a path does not exist on the route](#when-a-path-does-not-exist-on-the-route)
-  * [from 2 to 3 to 2](#from-2-to-3-to-2)
-* [pgr_trspViaEdges](#pgr_trspviaedges)
-  * [pgr_trspViaEdges No path representation differences](#pgr_trspviaedges-no-path-representation-differences)
-  * [Using a points of interest table](#pgr_trspviaedges-using-the-pointsofinterest-table)
-
-# Introduction
-pgr_trsp code has issues that are not being fixed yet, but as time passes and new functionality is added to pgRouting with wrappers to **hide** the issues, not to fix them.
-
-For clarity on the queries:
-* _pgr_trsp (with underscore) is the original code
-* pgr_trsp (lower case) represents the wrapper calling the original code
-* pgr_TRSP (upper case) represents the wrapper calling the replacement function, depending on the function, it can be:
-  * pgr_dijkstra
-  * pgr_dijkstraVia
-  * pgr_withPoints
-  * _pgr_withPointsVia
-
-This page intentions is to compare the original code with the wrapped version of the trsp group of functions.
-## The restriction
-The restriction used in the examples does not have to do anything with the graph:
-* No vertex has id: 25, 32 or 33
-* No edge has id: 25, 32 or 33
-```
-$$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, 32, 33::TEXT AS via_path$$
-```
-therefore the shortest path expected are as if there was no restriction involved
-# The Vertices signature version
-## (Vertices) No path representation differences
-Original function code
-* Sometimes it crasses the server when no path was found
-* Sometimes represents with Error a no path found
-* Forcing the user to use the wrapper or the replacement function
-
-Calls to the original function of is no longer allowed without restrictions
-```
-SELECT * FROM _pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 15, true, true
-);
-ERROR:  Error computing path: Path Not Found
-```
-dijkstra returns EMPTY SET to represent no path found
-```
-SELECT * FROM pgr_dijkstra(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 15
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-(0 rows)
-
-```
-pgr_trsp use the pgr_dijkstra when there are no restrictions
-therefore returns EMPTY SET to represent no path found
-```
-SELECT * FROM pgr_TRSP(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 15, true, true
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-(0 rows)
-
-```
-pgr_trsp use the original code when there are restrictions
-therefore throws Error to represent no path found
-```
-SELECT * FROM pgr_trsp(
-     $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-     1, 15, true, true,
-     $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
-ERROR:  Error computing path: Path Not Found
-CONTEXT:  PL/pgSQL function pgr_trsp(text,integer,integer,boolean,boolean,text) line 29 at RETURN QUERY
-```
-## routing from/to same location
-using dijkstra to verify (1 to 1)
-```
-SELECT * FROM pgr_dijkstra(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 1
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-(0 rows)
-
-```
-This call uses the replacement function because there are no restrictions (1 to 1)
-therefore is expected to return EMPTY SET to represent no path found
-```
-SELECT * FROM pgr_TRSP(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    1, 1,  true, true
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-(0 rows)
-
-```
-call forcing the use of the original code (1 to 1)
-* not longer allowed without restrictions
-
-```
-SELECT * FROM _pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    1, 1,  true, true
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |   1 |   1 |    1
-   1 |   2 |   4 |    1
-   2 |   5 |   8 |    1
-   3 |   6 |   9 |    1
-   4 |   9 |  16 |    1
-   5 |   4 |   3 |    1
-   6 |   3 |   2 |    1
-   7 |   2 |   1 |    1
-   8 |   1 |  -1 |    0
-(9 rows)
-
-```
-trsp with restrictions (1 to 1) use the original code
-is expected to return Error to represent no path found
-```
-SELECT * FROM pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    1, 1,  
-    true, 
-    true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |   1 |   1 |    1
-   1 |   2 |   4 |    1
-   2 |   5 |   8 |    1
-   3 |   6 |   9 |    1
-   4 |   9 |  16 |    1
-   5 |   4 |   3 |    1
-   6 |   3 |   2 |    1
-   7 |   2 |   1 |    1
-   8 |   1 |  -1 |    0
-(9 rows)
-
-```
-trsp calling the original code with restrictions (1 to 1)
-is expected to return Error to represent no path found
-but "finds" a path when there should be no path.
-```
-SELECT * FROM _pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    1, 1,  
-    true, 
-    true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |   1 |   1 |    1
-   1 |   2 |   4 |    1
-   2 |   5 |   8 |    1
-   3 |   6 |   9 |    1
-   4 |   9 |  16 |    1
-   5 |   4 |   3 |    1
-   6 |   3 |   2 |    1
-   7 |   2 |   1 |    1
-   8 |   1 |  -1 |    0
-(9 rows)
-
-```
-## (vertices) Undirected graph
-using Dijkstra to verify the shortest path from (2 to 3) on undirected graph
-```
-SELECT * FROM pgr_dijkstra(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    2, 3, false
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    2 |    2 |    1 |        0
-   2 |        2 |    3 |   -1 |    0 |        1
-(2 rows)
-
-```
-using the replacement function because there are no restrictions (2 to 3)
-```
-SELECT * FROM pgr_TRSP(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    2, 3,
-    false, 
-    true
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |   2 |   2 |    1
-   1 |   3 |  -1 |    0
-(2 rows)
-
-```
-call forcing the use of the original code
-* not longer allowed without restrictions
-
-```
-SELECT * FROM _pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    2, 3,
-    false, true
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |   2 |   4 |    1
-   1 |   5 |   8 |    1
-   2 |   6 |   9 |    1
-   3 |   9 |  16 |    1
-   4 |   4 |   3 |    1
-   5 |   3 |  -1 |    0
-(6 rows)
-
-```
-trsp with restrictions (2 to 3)
-does not find the shortest path
-```
-SELECT * FROM pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    2, 3,
-    false, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |   2 |   4 |    1
-   1 |   5 |   8 |    1
-   2 |   6 |   9 |    1
-   3 |   9 |  16 |    1
-   4 |   4 |   3 |    1
-   5 |   3 |  -1 |    0
-(6 rows)
-
-```
-calling the original code with restrictions (2 to 3)
-does not find the shortest path
-```
-SELECT * FROM _pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    2, 3,
-    false, 
-    true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |   2 |   4 |    1
-   1 |   5 |   8 |    1
-   2 |   6 |   9 |    1
-   3 |   9 |  16 |    1
-   4 |   4 |   3 |    1
-   5 |   3 |  -1 |    0
-(6 rows)
-
-```
-# The Edges signature version
-## (Edges) No path representation differences
-Original function code
-* Sometimes it crasses the server when no path was found
-* Sometimes represents with Error a no path found
-* Forcing the user to use the wrapper or the replacement function
-
-Calls to the original function of is no longer allowed without restrictions
-```
-SELECT * FROM _pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 0.5, 17, 0.5, true, true
-);
-ERROR:  Error computing path: Path Not Found
-```
-pgr_withPoints returns EMPTY SET to represent no path found
-```
-SELECT * FROM pgr_withPoints(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    $$(SELECT 1 as pid, 1 as edge_id, 0.5::float as fraction)
-    UNION
-    (SELECT 2, 17, 0.5)$$,
-    -1, -2
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-(0 rows)
-
-```
-## Definition of a path
-Remember that one characteristic of a path is that for a path of N edges it has N+1 vertices.
-
-For this example, suppose points, where the pid are different even if the edge and fraction are different.
-One point might be on the left side other on the right side, pgr_trsp does not take into account
-the side of the point
-calls forcing the use of the original code
-* not longer allowed without restrictions
-
-```
-SELECT * FROM _pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 0.5, 1, 0.5, true, true
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |  -1 |   1 |    0
-(1 row)
-
-```
-* with restrictions
-```
-SELECT * FROM _pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 0.5, 1, 0.5, true, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |  -1 |   1 |    0
-(1 row)
-
-```
-Using the *pgr_withPoints* it returns a path of N edge and N+1 vertices
-```
-SELECT * FROM pgr_withPoints(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    $$(SELECT 1 as pid, 1 as edge_id, 0.5::float as fraction)
-    UNION
-    (SELECT 2, 1, 0.5)$$,
-    -1, -2
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |   -1 |    1 |    0 |        0
-   2 |        2 |   -2 |   -1 |    0 |        0
-(2 rows)
-
-```
-The *pgr_withPoints* is used when there are no restrictions
-```
-SELECT * FROM pgr_TRSP(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 0.5, 1, 0.5, true, true
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |  -1 |   1 |    0
-   1 |  -2 |  -1 |    0
-(2 rows)
-
-```
-The original *_pgr_trsp* code is used when there are restrictions
-```
-SELECT * FROM pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 0.5, 1, 0.5, true, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |  -1 |   1 |    0
-(1 row)
-
-```
-note that pgr_withPoints returns an EMPTY SET when the point is the same
-```
-SELECT * FROM pgr_withPoints(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    $$(SELECT 1 as pid, 1 as edge_id, 0.5::float as fraction)
-    UNION
-    (SELECT 2, 1, 0.5)$$,
-    -1, -1
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-(0 rows)
-
-```
-## Points on the same edge
-The *pgr_withPoints* is used when there are no restrictions
-* it returns a path of N edges and N+1 vertices
-```
-SELECT * FROM pgr_TRSP(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 0.5, 1, 0.8, true, true
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |  -1 |   1 |  0.3
-   1 |  -2 |  -1 |    0
-(2 rows)
-
-```
-The original *_pgr_trsp* is used when there are restrictions
-* it returns a path of N edges and N vertex instead of N edge and N+1 vertices
-```
-SELECT * FROM pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 0.5, 1, 0.8, true, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |  -1 |   1 |  0.3
-(1 row)
-
-```
-## (Edges) Undirected graph
-the shortest path obtained with *pgr_withPoints*
-```
-SELECT * FROM pgr_withPoints(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    $$(SELECT 1 as pid, 4 as edge_id, 0.5::float as fraction)
-    UNION
-    (SELECT 2, 2, 0.8)$$,
-    -1, -2, directed:=false
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |   -1 |    4 |  0.5 |        0
-   2 |        2 |    2 |    2 |  0.8 |      0.5
-   3 |        3 |   -2 |   -1 |    0 |      1.3
-(3 rows)
-
-```
-The original *_pgr_trsp* is used when there are restrictions
-
-```
-SELECT * FROM pgr_TRSP(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    4, 0.5, 2, 0.8, false, true
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |  -1 |   4 |  0.5
-   1 |   2 |   2 |  0.8
-   2 |  -2 |  -1 |    0
-(3 rows)
-
-```
-when using restrictions the original *_pgr_trsp* is used internally
-* it returns a path of N edges and N vertex instead of N edge and N+1 vertices
-* it does not return the shortest path.
-
-```
-SELECT * FROM pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    4, 0.5, 2, 0.8, false, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |  -1 |   4 |  0.5
-   1 |   5 |   8 |    1
-   2 |   6 |   9 |    1
-   3 |   9 |  16 |    1
-   4 |   4 |   3 |    1
-   5 |   3 |   2 |  0.2
-(6 rows)
-
-```
-## Using a points of interest table
-The points of interest
-```
-SELECT * FROM pointsOfInterest;
- pid |  x  |  y  | edge_id | side | fraction |                  the_geom                  |                  newpoint                  
------+-----+-----+---------+------+----------+--------------------------------------------+--------------------------------------------
-   1 | 1.8 | 0.4 |       1 | l    |      0.4 | 0101000000CDCCCCCCCCCCFC3F9A9999999999D93F | 010100000000000000000000409A9999999999D93F
-   2 | 4.2 | 2.4 |      15 | r    |      0.4 | 0101000000CDCCCCCCCCCC10403333333333330340 | 010100000000000000000010403333333333330340
-   3 | 2.6 | 3.2 |      12 | l    |      0.6 | 0101000000CDCCCCCCCCCC04409A99999999990940 | 0101000000CDCCCCCCCCCC04400000000000000840
-   4 | 0.3 | 1.8 |       6 | r    |      0.3 | 0101000000333333333333D33FCDCCCCCCCCCCFC3F | 0101000000333333333333D33F0000000000000040
-   5 | 2.9 | 1.8 |       5 | l    |      0.8 | 01010000003333333333330740CDCCCCCCCCCCFC3F | 01010000000000000000000840CDCCCCCCCCCCFC3F
-   6 | 2.2 | 1.7 |       4 | b    |      0.7 | 01010000009A99999999990140333333333333FB3F | 01010000000000000000000040333333333333FB3F
-(6 rows)
-
-```
-On *pgr_trsp*, to be able to use the table information:
-* Each parameter has to be extracted explicitly from the table
-* Regardles of the point pid original value
-  * will always be -1 for the first point
-  * will always be -2 for the second point
-```
-SELECT * FROM pgr_TRSP(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 6),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 6),
-    true, true
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |  -1 |   1 |  0.6
-   1 |   2 |   4 |  0.7
-   2 |  -2 |  -1 |    0
-(3 rows)
-
-```
-On *pgr_withPoints*, to be able to use the table information:
-* select statement on the *pointsOfInterest* table
-* *Negative* the id to represent the id is a pid
-* The points pids in the result are not renumbered
-* The points pids in the result are represented with negative sign
-```
-SELECT * FROM pgr_withPoints(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
-    -1, -6
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |   -1 |    1 |  0.6 |        0
-   2 |        2 |    2 |    4 |  0.7 |      0.6
-   3 |        3 |   -6 |   -1 |    0 |      1.3
-(3 rows)
-
-```
-## routing from/to the same point
-using pgr_withPoints to check results
-expecting EMPTY SET to represent no path found
-```
-SELECT * FROM pgr_withPoints(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
-    -1, -1
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-(0 rows)
-
-```
-This call uses the replacement function because there are no restrictions
-* Because the pid is not involved the points are considered different
-* it returns a path
-
-```
-SELECT * FROM pgr_TRSP(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-    true, true
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |  -1 |   1 |    0
-   1 |  -2 |  -1 |    0
-(2 rows)
-
-```
-pgr_trsp with restrictions use the original code
-* it returns a path of N edges and N vertex instead of N edge and N+1 vertices
-
-```
-SELECT * FROM pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-    true, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |  -1 |   1 |    0
-(1 row)
-
-```
-## passing in front of other points
-using pgr_withPoints to verify the shortest path from pids (1 to 3)
-```
-SELECT * FROM pgr_withPoints(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
-    -1, -3
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |   -1 |    1 |  0.6 |        0
-   2 |        2 |    2 |    4 |    1 |      0.6
-   3 |        3 |    5 |   10 |    1 |      1.6
-   4 |        4 |   10 |   12 |  0.6 |      2.6
-   5 |        5 |   -3 |   -1 |    0 |      3.2
-(5 rows)
-
-```
-**pgr_withPoints** can be used to see when the route passes in front of other points
-In this example point pid=6 is passed in front of
-```
-SELECT * FROM pgr_withPoints(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
-    -1, -3, details:=true
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |   -1 |    1 |  0.6 |        0
-   2 |        2 |    2 |    4 |  0.7 |      0.6
-   3 |        3 |   -6 |    4 |  0.3 |      1.3
-   4 |        4 |    5 |   10 |    1 |      1.6
-   5 |        5 |   10 |   12 |  0.6 |      2.6
-   6 |        6 |   -3 |   -1 |    0 |      3.2
-(6 rows)
-
-```
-Can not be used to see if other points are passed in front of.
-The pointsOfInterest table is not part of the parameter
-```
-SELECT * FROM pgr_TRSP(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 3),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 3),
-    true, true
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-   0 |  -1 |   1 |  0.6
-   1 |   2 |   4 |    1
-   2 |   5 |  10 |    1
-   3 |  10 |  12 |  0.6
-   4 |  -2 |  -1 |    0
-(5 rows)
-
-```
-## (edges) Routing from a vertex to a point
-Showing *pgr_withPoints* results of the shortest path from vid 6 to pid 1
-```
-SELECT * FROM pgr_withPoints(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
-    6, -1
-);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |    6 |    8 |    1 |        0
-   2 |        2 |    5 |    4 |    1 |        1
-   3 |        3 |    2 |    1 |  0.6 |        2
-   4 |        4 |   -1 |   -1 |    0 |      2.6
-(4 rows)
-
-```
-* Vertex 6 is on edge 8 at 1 fraction
-* Vertex 6 is also edge 11 at 0 fraction
-* Undefined behaviour when at least one of the "points" is an actual vertex
-
-```
-SELECT * FROM pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    8, 1,
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-    true, true
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-(0 rows)
-
-SELECT * FROM pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    11, 0,
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-    true, true
-);
- seq | id1 | id2 | cost 
------+-----+-----+------
-(0 rows)
-
-```
-# pgr_trspViaVertices
-## pgr_trspViaVertices No path representation differences
-pgr_trspViaVertices uses _pgr_trsp which as mentioned before
-* Sometimes it crasses the server when no path was found
-* Sometimes represents with Error a no path found
-* Forcing the user to use the wrapper or the replacement function
-
-Calls to the original function of is no longer allowed without restrictions
-```
-SELECT * FROM _pgr_trspViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 15, 2],
-    false, true
-);
-ERROR:  Error computing path: Path Not Found
-CONTEXT:  PL/pgSQL function _pgr_trspviavertices(text,integer[],boolean,boolean,text) line 16 at FOR over SELECT rows
-SELECT * FROM _pgr_trspViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 15, 2, 1],
-    false, true
-);
-ERROR:  Error computing path: Path Not Found
-CONTEXT:  PL/pgSQL function _pgr_trspviavertices(text,integer[],boolean,boolean,text) line 16 at FOR over SELECT rows
-```
-**pgr_dijkstraVia** returning what paths of the route it finds or EMPTY SET when non is found
-this case none is found
-```
-SELECT * FROM pgr_dijkstraVia(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 15, 2],
-    false
-);
- seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost 
------+---------+----------+-----------+---------+------+------+------+----------+----------------
-(0 rows)
-
-```
-this case only from 2 to 1 is found
-```
-SELECT * FROM pgr_dijkstraVia(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 15, 2, 1],
-    false
-);
- seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost 
------+---------+----------+-----------+---------+------+------+------+----------+----------------
-   1 |       3 |        1 |         2 |       1 |    2 |    1 |    1 |        0 |              0
-   2 |       3 |        2 |         2 |       1 |    1 |   -2 |    0 |        1 |              1
-(2 rows)
-
-```
-the **pgr_dijkstraVia** used are for complete routes so its marked as **strict:=true**
-therefore the expected result is EMPTY SET to represent no route was found
-```
-SELECT * FROM pgr_dijkstraVia(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 1, 2],
-    false,
-    strict := true
-);
- seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost 
------+---------+----------+-----------+---------+------+------+------+----------+----------------
-(0 rows)
-
-```
-## when a path does not exist on the route
-pgr_TRSPViaVertices using the *pgr_dijkstraVia* when there are no restrictions.
-Because there is no path from 1 to 1 then there is no complete route 1 to 1 to 2
-therefore the expected result is EMPTY SET to represent no route was found
-```
-SELECT * FROM pgr_TRSPViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 1, 2],
-    false, true
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-(0 rows)
-
-```
-Calls to the original function of is no longer allowed without restrictions
-```
-SELECT * FROM _pgr_trspViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 1, 2],
-    false, true
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |   1 |   1 |    1
-   2 |   1 |   2 |   4 |    1
-   3 |   1 |   5 |   8 |    1
-   4 |   1 |   6 |   9 |    1
-   5 |   1 |   9 |  16 |    1
-   6 |   1 |   4 |   3 |    1
-   7 |   1 |   3 |   2 |    1
-   8 |   1 |   2 |   1 |    1
-   9 |   2 |   1 |   1 |    1
-  10 |   2 |   2 |  -1 |    0
-(10 rows)
-
-```
-with restrictions the original code is used
-```
-SELECT * FROM pgr_trspViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 1, 2],
-    false, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |   1 |   1 |    1
-   2 |   1 |   2 |   4 |    1
-   3 |   1 |   5 |   8 |    1
-   4 |   1 |   6 |   9 |    1
-   5 |   1 |   9 |  16 |    1
-   6 |   1 |   4 |   3 |    1
-   7 |   1 |   3 |   2 |    1
-   8 |   1 |   2 |   1 |    1
-   9 |   2 |   1 |   1 |    1
-  10 |   2 |   2 |  -1 |    0
-(10 rows)
-
-```
-Using explicitly the original code
-```
-SELECT * FROM _pgr_trspViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 1, 2],
-    false, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |   1 |   1 |    1
-   2 |   1 |   2 |   4 |    1
-   3 |   1 |   5 |   8 |    1
-   4 |   1 |   6 |   9 |    1
-   5 |   1 |   9 |  16 |    1
-   6 |   1 |   4 |   3 |    1
-   7 |   1 |   3 |   2 |    1
-   8 |   1 |   2 |   1 |    1
-   9 |   2 |   1 |   1 |    1
-  10 |   2 |   2 |  -1 |    0
-(10 rows)
-
-```
-## from 2 to 3 to 2
-dijkstra via shows the shortest route on the two paths
-```
-SELECT * FROM pgr_dijkstraVia(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[2, 3, 2],
-    false 
-);
- seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost 
------+---------+----------+-----------+---------+------+------+------+----------+----------------
-   1 |       1 |        1 |         2 |       3 |    2 |    2 |    1 |        0 |              0
-   2 |       1 |        2 |         2 |       3 |    3 |   -1 |    0 |        1 |              1
-   3 |       2 |        1 |         3 |       2 |    3 |    2 |    1 |        0 |              1
-   4 |       2 |        2 |         3 |       2 |    2 |   -2 |    0 |        1 |              2
-(4 rows)
-
-```
-the replacement function **pgr_dijkstraVia** is used because there are no restrictions
-```
-SELECT * FROM pgr_TRSPViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[2, 3, 2],
-    false, 
-    true
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |   2 |   2 |    1
-   2 |   2 |   3 |   2 |    1
-   3 |   2 |   2 |  -1 |    0
-(3 rows)
-
-```
-Calls to the original function of is no longer allowed without restrictions
-```
-SELECT * FROM _pgr_trspViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[2, 3, 2],
-    false, 
-    true
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |   2 |   4 |    1
-   2 |   1 |   5 |   8 |    1
-   3 |   1 |   6 |   9 |    1
-   4 |   1 |   9 |  16 |    1
-   5 |   1 |   4 |   3 |    1
-   6 |   2 |   3 |   2 |    1
-   7 |   2 |   2 |  -1 |    0
-(7 rows)
-
-```
-# pgr_trspViaEdges
-*pgr_trspViaEdges* will use the original code when
-* There are restrictions
-* A point is a vertex in disguise (with pcts value of 0)
-
-What it returns
-* Error to represent no route
-* the points are renumbered to -1, -2 .. -N
-* if a point is part of a path it will **not** show on the path
-
-Exaple execution
-```
-SELECT * FROM pgr_trspViaEdges(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 2, 1], ARRAY[0.1,0.5,0.5],
-    false, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |  -1 |   1 |  0.9
-   2 |   1 |   2 |   4 |    1
-   3 |   1 |   5 |   8 |    1
-   4 |   1 |   6 |   9 |    1
-   5 |   1 |   9 |  16 |    1
-   6 |   1 |   4 |   3 |    1
-   7 |   1 |   3 |   2 |    1
-   8 |   2 |   2 |   1 |  0.5
-(8 rows)
-
-```
-A temporay wraper function is used when:
-* There are no restrictions
-* Before: No point is a vertex in disguise (with pcts value of 0)
-* Now: c$Undefined behaviour when a point is a vertex in disguise (with pcts value of 0)
-
-Internaly:
-* builds a new graph and calls pgr_dijkstraVia
-
-What it returns
-* returns EMPTY SET to represent no route
-* edge = -1 in the result to represent the end of a intermediate path
-* edge = -2 in the result to represent the end of the last path & route
-* the points are renumbered to -1, -2 .. -N
-* if a point is part of a path it will show on the path
-
-Note: I do not mention the wrapper name due to the fact that this is not official documentation
-Note: I will use *_pgr_withPointsVia* as the wrapper name just for sake of this notes
-Example excution
-```
-SELECT * FROM _pgr_withPointsVia(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 2, 1], ARRAY[0.1,0.5,0.5],
-    directed := false
-);
- seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost 
------+---------+----------+-----------+---------+------+------+------+----------+----------------
-   1 |       1 |        1 |        -1 |      -2 |   -1 |    1 |  0.1 |        0 |              0
-   2 |       1 |        2 |        -1 |      -2 |    2 |    2 |  0.5 |      0.1 |            0.1
-   3 |       1 |        3 |        -1 |      -2 |   -2 |   -1 |    0 |      0.6 |            0.6
-   4 |       2 |        1 |        -2 |      -3 |   -2 |    2 |  0.5 |        0 |            0.6
-   5 |       2 |        2 |        -2 |      -3 |    2 |    1 |  0.5 |      0.5 |            1.1
-   6 |       2 |        3 |        -2 |      -3 |   -3 |   -2 |    0 |        1 |            1.6
-(6 rows)
-
-```
-## pgr_trspViaEdges No path representation differences
-This example no path is found (edge 17 is disconnected) from the big graph.
-* There is a vertex in disguise (fraction 0 or 1)
-* Undefined behaviour
-
-```
-SELECT * FROM pgr_trspViaEdges(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 17, 1], ARRAY[0,0.5,0.5],
-    false, true
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |     |     |     |     
-(1 row)
-
-```
-This example no path is found (edge 17 is disconnected) from the big graph.
-* Has a restriction
-* *pgr_trspViaEdges* original code is used
-* throws error to represent no route was not found
-
-```
-SELECT * FROM pgr_trspViaEdges(
-$$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-ARRAY[1, 17, 1], ARRAY[0.5,0.5,0.5],
-false, true,
-$$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, 32, 33::TEXT AS via_path$$
-);
-server closed the connection unexpectedly
-This probably means the server terminated abnormally
-before or while processing the request.
-The connection to the server was lost. Attempting reset: Failed.
-```
-This example no path is found (edge 17 is disconnected) from the big graph.
-* *_pgr_withPointsVia* is used
-* returns EMPTY SET to represent no route
-
-```
-SELECT * FROM pgr_trspViaEdges(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 17, 1], ARRAY[0.1,0.5,0.5],
-    false, 
-    true
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-(0 rows)
-
-```
-## (pgr_trspViaEdges) Using the pointsOfInterest table
-Only routing points
-when *_pgr_withPointsVia* is used
-* the renumbering still takes place
-
-```
-SELECT * FROM pgr_trspViaEdges(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[
-        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 3),
-        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 6)],
-    ARRAY[
-        (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-        (SELECT fraction  FROM pointsOfInterest WHERE pid = 3),
-        (SELECT fraction  FROM pointsOfInterest WHERE pid = 6)],
-    false, 
-    true
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |  -1 |   1 |  0.4
-   2 |   1 |   2 |   4 |  0.3
-   3 |   1 |  -3 |   4 |  0.3
-   4 |   1 |   5 |  10 |    1
-   5 |   1 |  10 |  12 |  0.6
-   6 |   1 |  -2 |  -1 |    0
-   7 |   2 |  -2 |  12 |  0.6
-   8 |   2 |  10 |  10 |    1
-   9 |   2 |   5 |   4 |  0.3
-  10 |   2 |  -3 |  -2 |    0
-(10 rows)
-
-```
-Only routing points
-when originalcode is used (because there is a restriction)
-
-```
-SELECT * FROM pgr_trspViaEdges(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[
-        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 3),
-        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 6)],
-    ARRAY[
-        (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-        (SELECT fraction  FROM pointsOfInterest WHERE pid = 3),
-        (SELECT fraction  FROM pointsOfInterest WHERE pid = 6)],
-    false, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |  -1 |   1 |  0.6
-   2 |   1 |   2 |   4 |    1
-   3 |   1 |   5 |  10 |    1
-   4 |   1 |  10 |  12 |    1
-   5 |   2 |  11 |  13 |    1
-   6 |   2 |  12 |  15 |    1
-   7 |   2 |   9 |   9 |    1
-   8 |   2 |   6 |   8 |    1
-   9 |   2 |   5 |   4 |  0.3
-(9 rows)
-
-```
-Routing points & vertices
-* vertex 6 is on edge 11 with fraction 0
-* Undefined behavior
-```
-SELECT * FROM pgr_trspViaEdges(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[
-        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 3),
-        11],
-    ARRAY[
-        (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-        (SELECT fraction  FROM pointsOfInterest WHERE pid = 3),
-        0],
-    false, 
-    true
-);
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |  -1 |   1 |  0.6
-   2 |   1 |   2 |   4 |    1
-   3 |   1 |   5 |  10 |    1
-   4 |   1 |  10 |  12 |  0.6
-   5 |   1 |  -2 |  -1 |    0
-(5 rows)
-
-```
-BEGIN;
-BEGIN
-ROLLBACK;
-ROLLBACK
diff --git a/src/trsp/test/trsp_notes_v2.5.0.test.sql b/src/trsp/test/trsp_notes_v2.5.0.test.sql
deleted file mode 100644
index 9fb967d..0000000
--- a/src/trsp/test/trsp_notes_v2.5.0.test.sql
+++ /dev/null
@@ -1,814 +0,0 @@
-ROLLBACK;
-\echo # Notes on pgr_trsp for version 2.5.0
-
-\echo Table of contents
-
-\echo * [Introduction](#introduction)
-\echo '  * [The restriction](#the-restriction)'
-\echo * [The Vertices Signature Version](#the-vertices-signature-version)
-\echo '  * [No path representation differences](#vertices-no-path-representation-differences)'
-\echo '  * [Routing from/to same location](#routing-fromto-same-location)'
-\echo '  * [Undirected graph](#vertices-undirected-graph)'
-\echo * [The Edges Signature Version](#the-edges-signature-version)
-\echo '  * [No path representation differences](#edges-no-path-representation-differences)'
-\echo '  * [Definition of a path](#definition-of-a-path)'
-\echo '  * [Points on the same edge](#points-on-the-same-edge)'
-\echo '  * [Undirected graph](#edges-undirected-graph)'
-\echo '  * [Using a points of interest table](#using-a-points-of-interest-table)'
-\echo '  * [Routing from/to the same point](#routing-fromto-the-same-point)'
-\echo '  * [Passing in front of other points](#passing-in-front-of-other-points)'
-\echo '  * [Routing from a vertex to a point](#edges-routing-from-a-vertex-to-a-point)'
-\echo * [pgr_trspViaVertices](#pgr_trspviavertices)
-\echo '  * [pgr_trspViaVertices No path representation differences](#pgr_trspviavertices-no-path-representation-differences)'
-\echo '  * [when a path does not exist on the route](#when-a-path-does-not-exist-on-the-route)'
-\echo '  * [from 2 to 3 to 2](#from-2-to-3-to-2)' 
-\echo * [pgr_trspViaEdges](#pgr_trspviaedges)
-\echo '  * [pgr_trspViaEdges No path representation differences](#pgr_trspviaedges-no-path-representation-differences)'
-\echo '  * [Using a points of interest table](#pgr_trspviaedges-using-the-pointsofinterest-table)'
-\echo 
-
-
-
-\echo # Introduction
-\echo pgr_trsp code has issues that are not being fixed yet, but as time passes and new functionality is added to pgRouting with wrappers to **hide** the issues, not to fix them.
-\echo 
-\echo For clarity on the queries:
-\echo * _pgr_trsp (with underscore) is the original code
-\echo * pgr_trsp (lower case) represents the wrapper calling the original code
-\echo * pgr_TRSP (upper case) represents the wrapper calling the replacement function, depending on the function, it can be:
-\echo '  * pgr_dijkstra'
-\echo '  * pgr_dijkstraVia'
-\echo '  * pgr_withPoints'
-\echo '  * _pgr_withPointsVia'
-\echo 
-
-\echo This page intentions is to compare the original code with the wrapped version of the trsp group of functions.
-\echo ## The restriction
-
-\echo The restriction used in the examples does not have to do anything with the graph:
-\echo * No vertex has id: 25, 32 or 33
-\echo * No edge has id: 25, 32 or 33
-\echo '\`\`\`'
-\echo $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-\echo '\`\`\`'
-
-\echo therefore the shortest path expected are as if there was no restriction involved
-
-
--------------------------------------------------------------------------------------------
-\echo # The Vertices signature version
-------------------
-\echo ## (Vertices) No path representation differences
-\echo Original function code
-\echo  * Sometimes it crasses the server when no path was found
-\echo  * Sometimes represents with Error a no path found
-\echo  * Forcing the user to use the wrapper or the replacement function
-\echo 
-\echo Calls to the original function of is no longer allowed without restrictions
-\echo '\`\`\`'
-SELECT * FROM _pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 15, true, true
-);  
-\echo '\`\`\`'
-
-\echo dijkstra returns EMPTY SET to represent no path found
-\echo '\`\`\`'
-SELECT * FROM pgr_dijkstra(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 15
-);  
-\echo '\`\`\`'
-
-\echo pgr_trsp use the pgr_dijkstra when there are no restrictions
-\echo therefore returns EMPTY SET to represent no path found
-\echo '\`\`\`'
-SELECT * FROM pgr_TRSP(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 15, true, true
-);  
-\echo '\`\`\`'
-
-\echo pgr_trsp use the original code  when there are restrictions
-\echo therefore throws Error to represent no path found
-\echo '\`\`\`'
- SELECT * FROM pgr_trsp(
-     $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-     1, 15, true, true,
-     $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);  
-\echo '\`\`\`'
-
-
-------------------
-\echo ## routing from/to same location
-
-\echo using dijkstra to verify (1 to 1)
-\echo '\`\`\`'
-SELECT * FROM pgr_dijkstra(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 1
-);  
-\echo '\`\`\`'
-
-
-\echo This call uses the replacement function because there are no restrictions (1 to 1)
-\echo therefore is expected to return EMPTY SET to represent no path found
-\echo '\`\`\`'
-SELECT * FROM pgr_TRSP(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    1, 1,  true, true
-);
-\echo '\`\`\`'
-
-
-\echo call forcing the use of the original code (1 to 1)
-\echo * not longer allowed without restrictions
-\echo 
-\echo '\`\`\`'
-SELECT * FROM _pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    1, 1,  true, true
-);
-\echo '\`\`\`'
-
-
-\echo trsp with restrictions (1 to 1) use the original code
-\echo is expected to return Error to represent no path found
-\echo '\`\`\`'
-SELECT * FROM pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    1, 1,  
-    true, 
-    true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
-\echo '\`\`\`'
-
-\echo trsp calling the original code with restrictions (1 to 1)
-\echo is expected to return Error to represent no path found
-\echo but "finds" a path when there should be no path.
-\echo '\`\`\`'
-SELECT * FROM _pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    1, 1,  
-    true, 
-    true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
-\echo '\`\`\`'
-
-
-------------------
-\echo ## (vertices) Undirected graph
-
-\echo using Dijkstra to verify the shortest path from (2 to 3) on undirected graph
-\echo '\`\`\`'
-SELECT * FROM pgr_dijkstra(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    2, 3, false
-);  
-\echo '\`\`\`'
-
-\echo using the replacement function because there are no restrictions (2 to 3)
-\echo '\`\`\`'
-SELECT * FROM pgr_TRSP(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    2, 3,
-    false, 
-    true
-);
-\echo '\`\`\`'
-
-\echo call forcing the use of the original code
-\echo * not longer allowed without restrictions
-\echo 
-\echo '\`\`\`'
-SELECT * FROM _pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    2, 3,
-    false, true
-);
-\echo '\`\`\`'
-
-\echo trsp with restrictions (2 to 3)
-\echo does not find the shortest path
-\echo '\`\`\`'
-SELECT * FROM pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    2, 3,
-    false, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
-\echo '\`\`\`'
-
-\echo calling the original code with restrictions (2 to 3)
-\echo does not find the shortest path
-\echo '\`\`\`'
-SELECT * FROM _pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    2, 3,
-    false, 
-    true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
-\echo '\`\`\`'
-
------------------------------------------------------------------------------------------------
-\echo # The Edges signature version
-
-------------------HERE
-\echo ## (Edges) No path representation differences
-\echo Original function code
-\echo  * Sometimes it crasses the server when no path was found
-\echo  * Sometimes represents with Error a no path found
-\echo  * Forcing the user to use the wrapper or the replacement function
-\echo 
-\echo Calls to the original function of is no longer allowed without restrictions
-\echo '\`\`\`'
-SELECT * FROM _pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 0.5, 17, 0.5, true, true
-);  
-\echo '\`\`\`'
-\echo pgr_withPoints returns EMPTY SET to represent no path found
-\echo '\`\`\`'
-SELECT * FROM pgr_withPoints(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    $$(SELECT 1 as pid, 1 as edge_id, 0.5::float as fraction)
-    UNION
-    (SELECT 2, 17, 0.5)$$,
-    -1, -2
-);  
-\echo '\`\`\`'
-
-
-------------------
-\echo ## Definition of a path
-\echo Remember that one characteristic of a path is that for a path of N edges it has N+1 vertices.
-\echo 
-\echo For this example, suppose points, where the pid are different even if the edge and fraction are different.
-\echo One point might be on the left side other on the right side, pgr_trsp does not take into account
-\echo the side of the point
-
-\echo calls forcing the use of the original code
-\echo * not longer allowed without restrictions
-\echo 
-\echo '\`\`\`'
-SELECT * FROM _pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 0.5, 1, 0.5, true, true
-);  
-\echo '\`\`\`'
-\echo * with restrictions
-\echo '\`\`\`'
-SELECT * FROM _pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 0.5, 1, 0.5, true, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);  
-\echo '\`\`\`'
-
-\echo Using the *pgr_withPoints* it returns a path of N edge and N+1 vertices
-\echo '\`\`\`'
-SELECT * FROM pgr_withPoints(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    $$(SELECT 1 as pid, 1 as edge_id, 0.5::float as fraction)
-    UNION
-    (SELECT 2, 1, 0.5)$$,
-    -1, -2
-);  
-\echo '\`\`\`'
-
-\echo The *pgr_withPoints* is used when there are no restrictions
-\echo '\`\`\`'
-SELECT * FROM pgr_TRSP(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 0.5, 1, 0.5, true, true
-);  
-\echo '\`\`\`'
-
-\echo The original *_pgr_trsp* code is used when there are restrictions
-\echo '\`\`\`'
-SELECT * FROM pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 0.5, 1, 0.5, true, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);  
-\echo '\`\`\`'
-
-\echo note that pgr_withPoints returns an EMPTY SET when the point is the same
-\echo '\`\`\`'
-SELECT * FROM pgr_withPoints(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    $$(SELECT 1 as pid, 1 as edge_id, 0.5::float as fraction)
-    UNION
-    (SELECT 2, 1, 0.5)$$,
-    -1, -1
-);
-\echo '\`\`\`'
-
-------------------
-\echo ## Points on the same edge
-
-\echo The *pgr_withPoints* is used when there are no restrictions
-\echo * it returns a path of N edges and N+1 vertices
-\echo '\`\`\`'
-SELECT * FROM pgr_TRSP(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 0.5, 1, 0.8, true, true
-);  
-\echo '\`\`\`'
-
-\echo The original *_pgr_trsp* is used when there are restrictions
-\echo * it returns a path of N edges and N vertex instead of N edge and N+1 vertices
-\echo '\`\`\`'
-SELECT * FROM pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    1, 0.5, 1, 0.8, true, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-
-);  
-\echo '\`\`\`'
-
-------------------
-\echo ## (Edges) Undirected graph
-\echo the shortest path obtained with *pgr_withPoints*
-\echo '\`\`\`'
-SELECT * FROM pgr_withPoints(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    $$(SELECT 1 as pid, 4 as edge_id, 0.5::float as fraction)
-    UNION
-    (SELECT 2, 2, 0.8)$$,
-    -1, -2, directed:=false
-);
-\echo '\`\`\`'
-
-\echo The original *_pgr_trsp* is used when there are restrictions
-\echo 
-\echo '\`\`\`'
-SELECT * FROM pgr_TRSP(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    4, 0.5, 2, 0.8, false, true
-);
-\echo '\`\`\`'
-
-\echo when using restrictions the original *_pgr_trsp* is used internally
-\echo * it returns a path of N edges and N vertex instead of N edge and N+1 vertices
-\echo * it does not return the shortest path.
-\echo 
-\echo '\`\`\`'
-SELECT * FROM pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    4, 0.5, 2, 0.8, false, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
-\echo '\`\`\`'
-
-
-----------------
-\echo ## Using a points of interest table
-\echo The points of interest
-\echo '\`\`\`'
-SELECT * FROM pointsOfInterest;
-\echo '\`\`\`'
-
-\echo On *pgr_trsp*, to be able to use the table information:
-\echo * Each parameter has to be extracted explicitly from the table
-\echo * Regardles of the point pid original value
-\echo '  * will always be -1 for the first point'
-\echo '  * will always be -2 for the second point'
-\echo '\`\`\`'
-SELECT * FROM pgr_TRSP(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 6),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 6),
-    true, true
-);  
-\echo '\`\`\`'
-
-\echo On *pgr_withPoints*, to be able to use the table information:
-\echo * select statement on the *pointsOfInterest* table
-\echo * *Negative* the id to represent the id is a pid
-\echo * The points pids in the result are not renumbered
-\echo * The points pids in the result are represented with negative sign
-\echo '\`\`\`'
-SELECT * FROM pgr_withPoints(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
-    -1, -6
-);  
-\echo '\`\`\`'
-
-
-----------------
-\echo ## routing from/to the same point
-
-\echo using pgr_withPoints to check results
-\echo expecting EMPTY SET to represent no path found
-\echo '\`\`\`'
-SELECT * FROM pgr_withPoints(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
-    -1, -1
-);  
-\echo '\`\`\`'
-
-
-\echo This call uses the replacement function because there are no restrictions
-\echo * Because the pid is not involved the points are considered different
-\echo * it returns a path
-\echo 
-\echo '\`\`\`'
-SELECT * FROM pgr_TRSP(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-    true, true
-);
-\echo '\`\`\`'
-
-
-\echo pgr_trsp with restrictions use the original code
-\echo * it returns a path of N edges and N vertex instead of N edge and N+1 vertices
-\echo 
-\echo '\`\`\`'
-SELECT * FROM pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-    true, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
-\echo '\`\`\`'
-
-
-----------------
-\echo ## passing in front of other points
-
-\echo using pgr_withPoints to verify the shortest path from pids (1 to 3)
-\echo '\`\`\`'
-SELECT * FROM pgr_withPoints(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
-    -1, -3
-);  
-\echo '\`\`\`'
-
-\echo **pgr_withPoints** can be used to see when the route passes in front of other points
-\echo In this example point pid=6 is passed in front of
-\echo '\`\`\`'
-SELECT * FROM pgr_withPoints(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
-    -1, -3, details:=true
-);  
-\echo '\`\`\`'
-
-\echo Can not be used to see if other points are passed in front of.
-\echo The pointsOfInterest table is not part of the parameter
-\echo '\`\`\`'
-SELECT * FROM pgr_TRSP(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 3),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 3),
-    true, true
-);
-\echo '\`\`\`'
-
-----------------
-\echo ## (edges) Routing from a vertex to a point
-
-\echo Showing *pgr_withPoints* results of the shortest path from vid 6 to pid 1
-\echo '\`\`\`'
-SELECT * FROM pgr_withPoints(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
-    $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
-    6, -1
-);  
-\echo '\`\`\`'
-
-\echo * Vertex 6 is on edge 8 at 1 fraction
-\echo * Vertex 6 is also edge 11 at 0 fraction
-\echo * Undefined behaviour when at least one of the "points" is an actual vertex
-\echo
-\echo '\`\`\`'
-SELECT * FROM pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    8, 1,
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-    true, true
-);
-SELECT * FROM pgr_trsp(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    11, 0,
-    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-    true, true
-);
-\echo '\`\`\`'
-
----------------------------------------------------------------
-
-\echo # pgr_trspViaVertices
-------------------
-\echo ## pgr_trspViaVertices No path representation differences
-
-\echo pgr_trspViaVertices uses _pgr_trsp which as mentioned before
-\echo  * Sometimes it crasses the server when no path was found
-\echo  * Sometimes represents with Error a no path found
-\echo  * Forcing the user to use the wrapper or the replacement function
-\echo 
-\echo Calls to the original function of is no longer allowed without restrictions
-\echo '\`\`\`'
-SELECT * FROM _pgr_trspViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 15, 2],
-    false, true
-);
-SELECT * FROM _pgr_trspViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 15, 2, 1],
-    false, true
-);
-\echo '\`\`\`'
-
-\echo **pgr_dijkstraVia** returning what paths of the route it finds or EMPTY SET when non is found
-\echo this case none is found
-\echo '\`\`\`'
-SELECT * FROM pgr_dijkstraVia(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 15, 2],
-    false
-);
-\echo '\`\`\`'
-
-
-\echo this case only from 2 to 1 is found
-\echo '\`\`\`'
-SELECT * FROM pgr_dijkstraVia(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 15, 2, 1],
-    false
-);
-\echo '\`\`\`'
-
-\echo the **pgr_dijkstraVia** used are for complete routes so its marked as **strict:=true** 
-\echo therefore the expected result is EMPTY SET to represent no route was found
-\echo '\`\`\`'
-SELECT * FROM pgr_dijkstraVia(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 1, 2],
-    false,
-    strict := true
-);
-\echo '\`\`\`'
-
-
-\echo ## when a path does not exist on the route
-\echo pgr_TRSPViaVertices using the *pgr_dijkstraVia* when there are no restrictions.
-\echo Because there is no path from 1 to 1 then there is no complete route 1 to 1 to 2
-\echo therefore the expected result is EMPTY SET to represent no route was found
-\echo '\`\`\`'
-SELECT * FROM pgr_TRSPViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 1, 2],
-    false, true
-);
-\echo '\`\`\`'
-
-\echo Calls to the original function of is no longer allowed without restrictions
-\echo '\`\`\`'
-SELECT * FROM _pgr_trspViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 1, 2],
-    false, true
-);
-\echo '\`\`\`'
-
-\echo with restrictions the original code is used
-\echo '\`\`\`'
-SELECT * FROM pgr_trspViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 1, 2],
-    false, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
-\echo '\`\`\`'
-
-
-\echo Using explicitly the original code
-\echo '\`\`\`'
-SELECT * FROM _pgr_trspViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 1, 2],
-    false, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
-\echo '\`\`\`'
-
-
-\echo ## from 2 to 3 to 2
-
-
-\echo dijkstra via shows the shortest route on the two paths
-\echo '\`\`\`'
-SELECT * FROM pgr_dijkstraVia(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[2, 3, 2],
-    false 
-);
-\echo '\`\`\`'
-
-\echo the replacement function **pgr_dijkstraVia** is used because there are no restrictions
-\echo '\`\`\`'
-SELECT * FROM pgr_TRSPViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[2, 3, 2],
-    false, 
-    true
-);
-\echo '\`\`\`'
-
-\echo Calls to the original function of is no longer allowed without restrictions
-\echo '\`\`\`'
-SELECT * FROM _pgr_trspViaVertices(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[2, 3, 2],
-    false, 
-    true
-);
-\echo '\`\`\`'
-
-
-
----------------------------------------------------------------
-
-\echo # pgr_trspViaEdges
-------------------
-
-\echo *pgr_trspViaEdges* will use the original code when
-\echo * There are restrictions
-\echo * A point is a vertex in disguise (with pcts value of 0)
-\echo
-\echo What it returns
-\echo * Error to represent no route
-\echo * the points are renumbered to -1, -2 .. -N 
-\echo * if a point is part of a path it will **not** show on the path
-\echo
-
-\echo Exaple execution
-\echo '\`\`\`'
-SELECT * FROM pgr_trspViaEdges(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 2, 1], ARRAY[0.1,0.5,0.5],
-    false, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
-
-\echo '\`\`\`'
-\echo A temporay wraper function is used when: 
-\echo * There are no restrictions
-\echo * Before: No point is a vertex in disguise (with pcts value of 0)
-\echo * Now: c$Undefined behaviour when a point is a vertex in disguise (with pcts value of 0)
-\echo
-\echo Internaly:
-\echo * builds a new graph and calls pgr_dijkstraVia
-\echo
-\echo What it returns
-\echo * returns EMPTY SET to represent no route
-\echo * edge = -1 in the result to represent the end of a intermediate path
-\echo * edge = -2 in the result to represent the end of the last path & route
-\echo * the points are renumbered to -1, -2 .. -N 
-\echo * if a point is part of a path it will show on the path
-\echo
-\echo Note: I do not mention the wrapper name due to the fact that this is not official documentation
-\echo Note: I will use *_pgr_withPointsVia* as the wrapper name just for sake of this notes
-
-\echo Example excution
-\echo '\`\`\`'
-SELECT * FROM _pgr_withPointsVia(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 2, 1], ARRAY[0.1,0.5,0.5],
-    directed := false
-);
-\echo '\`\`\`'
-
-
-\echo ## pgr_trspViaEdges No path representation differences
-----------------
-
-\echo This example no path is found (edge 17 is disconnected) from the big graph.
-\echo * There is a vertex in disguise (fraction 0 or 1)
-\echo * Undefined behaviour
-\echo
-\echo '\`\`\`'
-SELECT * FROM pgr_trspViaEdges(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 17, 1], ARRAY[0,0.5,0.5],
-    false, true
-);
-\echo '\`\`\`'
-
-
-\echo This example no path is found (edge 17 is disconnected) from the big graph.
-\echo * Has a restriction
-\echo * *pgr_trspViaEdges* original code is used
-\echo * throws error to represent no route was not found
-\echo
-\echo '\`\`\`'
-\echo SELECT * FROM pgr_trspViaEdges(
-\echo     $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-\echo     ARRAY[1, 17, 1], ARRAY[0.5,0.5,0.5],
-\echo     false, true,
-\echo     $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-\echo );
-\echo server closed the connection unexpectedly
-\echo This probably means the server terminated abnormally
-\echo before or while processing the request.
-\echo The connection to the server was lost. Attempting reset: Failed.
-\echo '\`\`\`'
-
-\echo This example no path is found (edge 17 is disconnected) from the big graph.
-\echo * *_pgr_withPointsVia* is used
-\echo * returns EMPTY SET to represent no route
-\echo
-\echo '\`\`\`'
-SELECT * FROM pgr_trspViaEdges(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[1, 17, 1], ARRAY[0.1,0.5,0.5],
-    false, 
-    true
-);
-\echo '\`\`\`'
-
-----------------
-\echo ## (pgr_trspViaEdges) Using the pointsOfInterest table
-
-\echo Only routing points
-\echo when *_pgr_withPointsVia* is used
-\echo * the renumbering still takes place
-\echo
-\echo '\`\`\`'
-SELECT * FROM pgr_trspViaEdges(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[
-        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 3),
-        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 6)],
-    ARRAY[
-        (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-        (SELECT fraction  FROM pointsOfInterest WHERE pid = 3),
-        (SELECT fraction  FROM pointsOfInterest WHERE pid = 6)],
-    false, 
-    true
-);
-\echo '\`\`\`'
-
-\echo Only routing points
-\echo when originalcode is used (because there is a restriction)
-\echo
-\echo '\`\`\`'
-SELECT * FROM pgr_trspViaEdges(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[
-        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 3),
-        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 6)],
-    ARRAY[
-        (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-        (SELECT fraction  FROM pointsOfInterest WHERE pid = 3),
-        (SELECT fraction  FROM pointsOfInterest WHERE pid = 6)],
-    false, true,
-    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
-);
-\echo '\`\`\`'
-
-\echo Routing points & vertices
-\echo * vertex 6 is on edge 11 with fraction 0
-\echo  * Undefined behavior
-\echo '\`\`\`'
-SELECT * FROM pgr_trspViaEdges(
-    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
-    ARRAY[
-        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
-        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 3),
-        11],
-    ARRAY[
-        (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
-        (SELECT fraction  FROM pointsOfInterest WHERE pid = 3),
-        0],
-    false, 
-    true
-);
-\echo '\`\`\`'
-BEGIN;
diff --git a/src/trsp/test/trsp_vias-any-04.result b/src/trsp/test/trsp_vias-any-04.result
deleted file mode 100644
index 61c461c..0000000
--- a/src/trsp/test/trsp_vias-any-04.result
+++ /dev/null
@@ -1,141 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License AS published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-    SELECT * FROM pgr_trspViaVertices(
-        'SELECT id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost FROM edge_table',
-        ARRAY[2, 7, 11]::INTEGER[],     
-        true,  
-        true,  
-        
-        'SELECT to_cost, target_id::INTEGER, from_edge||coalesce('',''||via_path,'''') AS via_path FROM restrictions');
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |   2 |   4 |    1
-   2 |   1 |   5 |   8 |    1
-   3 |   1 |   6 |   9 |    1
-   4 |   1 |   9 |  16 |    1
-   5 |   1 |   4 |   3 |    1
-   6 |   1 |   3 |   5 |    1
-   7 |   1 |   6 |   8 |    1
-   8 |   1 |   5 |   7 |    1
-   9 |   1 |   8 |   6 |    1
-  10 |   2 |   7 |   6 |    1
-  11 |   2 |   8 |   7 |    1
-  12 |   2 |   5 |   8 |    1
-  13 |   2 |   6 |   9 |    1
-  14 |   2 |   9 |  16 |    1
-  15 |   2 |   4 |   3 |    1
-  16 |   2 |   3 |   5 |    1
-  17 |   2 |   6 |  11 |    1
-  18 |   2 |  11 |  -1 |    0
-(18 rows)
-
----------------------------
-SELECT * FROM pgr_trspViaEdges(
-        'SELECT id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost FROM edge_table',
-        ARRAY[4,6,11]::INTEGER[],           
-        ARRAY[0.5, 0.5, 0.5]::float8[],     
-        true,  
-        true,  
-        
-        'SELECT to_cost, target_id::INTEGER, from_edge||coalesce('',''||via_path,'''') AS via_path FROM restrictions');
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |  -1 |   4 |  0.5
-   2 |   1 |   5 |   8 |    1
-   3 |   1 |   6 |   9 |    1
-   4 |   1 |   9 |  16 |    1
-   5 |   1 |   4 |   3 |    1
-   6 |   1 |   3 |   5 |    1
-   7 |   1 |   6 |   8 |    1
-   8 |   1 |   5 |   7 |    1
-   9 |   1 |   8 |   6 |    1
-  10 |   2 |   8 |   7 |    1
-  11 |   2 |   5 |   8 |    1
-  12 |   2 |   6 |   9 |    1
-  13 |   2 |   9 |  16 |    1
-  14 |   2 |   4 |   3 |    1
-  15 |   2 |   3 |   5 |    1
-  16 |   2 |   6 |  11 |  0.5
-(16 rows)
-
----------------------------
-SELECT * FROM pgr_trspViaEdges(
-        'SELECT id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost FROM edge_table',
-        ARRAY[1,11,6]::INTEGER[],           
-        ARRAY[0.5, 0.5, 0.5]::float8[],     
-        true,  
-        true,  
-        
-        'SELECT to_cost, target_id::INTEGER, from_edge||coalesce('',''||via_path,'''') AS via_path FROM restrictions');
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |  -1 |   1 |  0.5
-   2 |   1 |   2 |   4 |    1
-   3 |   1 |   5 |   8 |    1
-   4 |   1 |   6 |   9 |    1
-   5 |   1 |   9 |  16 |    1
-   6 |   1 |   4 |   3 |    1
-   7 |   1 |   3 |   5 |    1
-   8 |   1 |   6 |  11 |    1
-   9 |   2 |  11 |  13 |    1
-  10 |   2 |  12 |  15 |    1
-  11 |   2 |   9 |   9 |    1
-  12 |   2 |   6 |   8 |    1
-  13 |   2 |   5 |   7 |    1
-  14 |   2 |   8 |   6 |  0.5
-(14 rows)
-
----------------------------
-SELECT * FROM pgr_trspViaEdges(
-        'SELECT id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost FROM edge_table',
-        ARRAY[1,11,6]::INTEGER[],           
-        ARRAY[0.5, 0.5, 0.5]::float8[],     
-        true,  
-        true,  
-        
-        'SELECT to_cost, target_id::INTEGER, from_edge||coalesce('',''||via_path,'''') AS via_path FROM restrictions');
- seq | id1 | id2 | id3 | cost 
------+-----+-----+-----+------
-   1 |   1 |  -1 |   1 |  0.5
-   2 |   1 |   2 |   4 |    1
-   3 |   1 |   5 |   8 |    1
-   4 |   1 |   6 |   9 |    1
-   5 |   1 |   9 |  16 |    1
-   6 |   1 |   4 |   3 |    1
-   7 |   1 |   3 |   5 |    1
-   8 |   1 |   6 |  11 |    1
-   9 |   2 |  11 |  13 |    1
-  10 |   2 |  12 |  15 |    1
-  11 |   2 |   9 |   9 |    1
-  12 |   2 |   6 |   8 |    1
-  13 |   2 |   5 |   7 |    1
-  14 |   2 |   8 |   6 |  0.5
-(14 rows)
-
----------------------------
-ROLLBACK;
-ROLLBACK
diff --git a/src/trsp/tester/Makefile b/src/trsp/tester/Makefile
deleted file mode 100644
index f818d40..0000000
--- a/src/trsp/tester/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-all: testit
-
-testit: testit.cpp ../src/GraphDefinition.h ../src/utils.h ../src/GraphDefinition.cpp
-	g++ -g -O0 -I. -I../src testit.cpp ../src/GraphDefinition.cpp -o testit
-
-clean:
-	rm -f testit *.txt
diff --git a/src/trsp/tester/issue191-bad-m1.h b/src/trsp/tester/issue191-bad-m1.h
deleted file mode 100644
index e42b26c..0000000
--- a/src/trsp/tester/issue191-bad-m1.h
+++ /dev/null
@@ -1,22599 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-#define NEDGE 22573
-
-static edge_t edges[NEDGE] = {
-{2950984,3847538,3847326,0.1338,0.14049},
-{2951013,3848117,3848557,0.21634,0.196672727272727},
-{2951139,3847707,3848229,0.281288888888889,0.361657142857143},
-{2951145,3846938,3848653,1.38490588235294,1.38490588235294},
-{2951177,3847689,3847383,0.15845,0.165339130434783},
-{2951237,3847076,3848452,0.749777777777778,0.749777777777778},
-{2951267,3847751,3848117,0.147342857142857,0.156272727272727},
-{2951290,3847383,3847326,0.453022222222222,0.453022222222222},
-{2951291,3846724,3846228,0.190076470588235,0.190076470588235},
-{2951341,3846522,3845953,0.280711111111111,0.261351724137931},
-{2951342,3846323,3847649,1.08084444444444,1.08084444444444},
-{2951510,3847387,3846522,0.392133333333333,0.407215384615385},
-{2951520,3847326,3846724,0.2280375,0.208491428571429},
-{2951553,3846902,3847957,0.503844444444444,0.503844444444444},
-{2951555,3846959,3848550,0.9066,0.9066},
-{2951673,3846882,3848633,0.989,0.989},
-{2951702,3846966,3848419,0.406975,0.424669565217391},
-{2951743,3848471,3846688,0.267018947368421,-1},
-{2962266,3847391,3847542,-1,0.129814285714286},
-{2962477,3852941,3853106,0.161454545454545,0.190285714285714},
-{2962549,3852941,3852856,0.0389538461538462,-1},
-{2962550,3852856,3852882,0.0715071428571429,-1},
-{2962551,3852988,3852941,0.0468,-1},
-{2962552,3852988,3852882,-1,0.0600692307692308},
-{2962553,3853322,3852988,0.152027586206897,0.137775},
-{2962554,3853454,3853322,0.0454714285714286,0.0454714285714286},
-{2962555,3851625,3852882,0.471342857142857,0.611},
-{2962559,3852335,3852224,0.0390666666666667,0.0390666666666667},
-{2962560,3852306,3852367,0.01944,0.0220909090909091},
-{2962561,3853717,3853454,0.0938347826086957,0.0981},
-{2962562,3854088,3853717,0.1192875,0.121825531914894},
-{2962563,3854566,3854088,0.1677125,0.1677125},
-{2962564,3854892,3854566,0.124852173913043,0.122195744680851},
-{2962565,3854995,3854892,0.0395217391304348,0.0386808510638298},
-{2962566,3855301,3854995,0.111717391304348,0.1142},
-{2962567,3855705,3855301,0.143569565217391,0.14676},
-{2962568,3855944,3855705,0.102559090909091,0.10028},
-{2962569,3856228,3855944,0.0917869565217391,0.0981906976744186},
-{2962570,3856377,3856228,0.0465333333333333,0.0465333333333333},
-{2962571,3863773,3862710,0.35272,0.360736363636364},
-{2962572,3864110,3863773,0.215115789473684,0.215115789473684},
-{2962573,3866457,3865801,0.1674,0.17205},
-{2962574,3865801,3865598,0.0696827586206897,0.0594352941176471},
-{2962575,3865598,3864916,-1,0.213658064516129},
-{2962576,3864122,3863836,0.160578260869565,0.167877272727273},
-{2962577,3867378,3866457,0.273418181818182,0.265376470588235},
-{2962578,3867227,3867421,0.18181875,0.19394},
-{2962579,3867069,3867227,0.138723076923077,0.138723076923077},
-{2962580,3867018,3867069,0.0444,0.0411512195121951},
-{2962584,3870943,3871224,0.4197,0.368517073170732},
-{2962585,3872002,3872095,0.0696555555555556,-1},
-{2962589,3878423,3878571,0.18618,0.223416},
-{2962590,3878423,3877865,0.268278260869565,-1},
-{2962591,3877798,3877865,0.0944117647058823,0.0697826086956522},
-{2962592,3877742,3877798,0.07065,0.0605571428571429},
-{2962593,3877557,3877742,0.1438125,0.1438125},
-{2962594,3878781,3878423,0.1689,-1},
-{2962595,3879207,3878781,0.1523625,-1},
-{2962596,3879689,3879207,0.237784615384615,-1},
-{2962603,3881159,3881235,0.0644,0.0709714285714286},
-{2962638,3854912,3854769,0.051446511627907,0.06145},
-{2962639,3855091,3854912,0.0777428571428571,0.0697692307692308},
-{2962640,3855091,3855370,0.107928571428571,0.174346153846154},
-{2962641,3856367,3856069,0.131363636363636,0.0985227272727273},
-{2962642,3856681,3856367,0.130994117647059,0.106042857142857},
-{2962643,3857387,3856681,0.243616666666667,0.1827125},
-{2962644,3856684,3856377,0.0975136363636364,0.0912893617021277},
-{2962645,3857350,3857043,0.150514285714286,0.195111111111111},
-{2962646,3857529,3857350,0.183768,0.14356875},
-{2962647,3857832,3857529,0.102351219512195,0.0975906976744186},
-{2962648,3859655,3859839,0.104884615384615,0.0940344827586207},
-{2962649,3858161,3857832,0.104466666666667,0.109325581395349},
-{2962650,3858404,3858161,0.07568,0.0774},
-{2962651,3858497,3858404,0.0338045454545455,0.0345906976744186},
-{2962652,3864854,3865191,0.163842857142857,0.181089473684211},
-{2962653,3865240,3864854,0.128692307692308,0.132078947368421},
-{2962654,3865521,3865240,0.0996162162162162,0.0898975609756098},
-{2962655,3866809,3867018,0.177173684210526,0.19236},
-{2962656,3866749,3866809,0.075552,0.06296},
-{2962657,3867243,3866749,0.16753125,0.141078947368421},
-{2962658,3867939,3867243,0.167113043478261,0.167113043478261},
-{2962659,3868738,3867939,0.223138461538462,0.212253658536585},
-{2962660,3870348,3869892,0.196466666666667,0.3789},
-{2962661,3867563,3866560,0.268910526315789,0.237641860465116},
-{2962662,3867790,3867563,0.0752,0.0689333333333333},
-{2962663,3871128,3871204,-1,0.0642230769230769},
-{2962664,3871687,3871888,-1,0.0552363636363636},
-{2962665,3872095,3872273,0.18952,-1},
-{2962666,3872273,3872292,0.0428903225806452,-1},
-{2962667,3870734,3870699,0.02552,-1},
-{2962668,3872435,3872452,-1,0.0138346153846154},
-{2962669,3871968,3871888,0.0976636363636364,-1},
-{2962670,3872630,3872621,-1,0.0543789473684211},
-{2962671,3872446,3872166,0.09675,0.159352941176471},
-{2962672,3872711,3872716,-1,0.0217945945945946},
-{2962673,3876266,3875896,-1,0.219495652173913},
-{2962674,3877492,3877557,0.0462,0.04224},
-{2962675,3877428,3877492,0.04242,0.0374294117647059},
-{2962676,3877288,3877428,0.1198,0.0951352941176471},
-{2962677,3877137,3877288,0.129537931034483,0.129537931034483},
-{2962678,3876979,3877137,0.169909090909091,0.178},
-{2962679,3876741,3876979,-1,0.227},
-{2962680,3876509,3876741,-1,0.214968},
-{2962681,3876366,3876509,-1,0.203052631578947},
-{2962682,3876266,3876366,0.0659612903225806,0.13632},
-{2962683,3877557,3878087,0.29004,-1},
-{2962684,3878087,3878194,0.0900461538461539,-1},
-{2962685,3878519,3878194,-1,0.14895},
-{2962686,3878883,3878519,-1,0.199825},
-{2962687,3878883,3879207,-1,0.308575},
-{2962688,3878576,3878883,-1,0.2563875},
-{2962689,3880096,3879689,0.222022222222222,-1},
-{2962690,3878467,3878576,0.0984,0.0984},
-{2962691,3878445,3878467,0.0262125,0.0262125},
-{2962692,3878287,3878445,-1,0.1197375},
-{2962693,3878067,3878287,-1,0.1737},
-{2962694,3879433,3878883,-1,0.237688888888889},
-{2962695,3879844,3879433,-1,0.206834482758621},
-{2962696,3879105,3879433,0.393428571428571,-1},
-{2962697,3878960,3879105,0.106778571428571,-1},
-{2962698,3878931,3878960,0.0285870967741935,-1},
-{2962699,3878798,3878931,0.130531034482759,-1},
-{2962700,3876017,3876891,-1,0.240251162790698},
-{2962701,3877564,3877811,-1,0.210577777777778},
-{2962702,3878384,3878798,0.35678,-1},
-{2962703,3880536,3880096,0.182175,-1},
-{2962704,3880209,3879844,-1,0.169036363636364},
-{2962705,3880766,3880209,-1,0.487725},
-{2962706,3884123,3884820,0.225671428571429,0.225671428571429},
-{2962707,3883627,3884123,0.22654,0.151026666666667},
-{2962708,3883165,3883627,0.2178,0.146778260869565},
-{2962709,3884820,3885663,0.226775510204082,0.226775510204082},
-{2962710,3890112,3889707,0.165123529411765,0.147742105263158},
-{2962713,3894341,3893822,-1,0.208969565217391},
-{2962714,3894941,3894341,-1,0.252926086956522},
-{2962715,3895407,3894373,0.620418181818182,0.499360975609756},
-{2962716,3896232,3895757,0.187486956521739,0.165853846153846},
-{2962717,3895532,3894941,-1,0.231404081632653},
-{2962720,3898398,3898807,0.121689795918367,0.116917647058824},
-{2962721,3898282,3898398,0.0318,0.0311510204081633},
-{2962722,3897752,3898282,0.166271428571429,0.174585},
-{2962723,3897202,3897752,0.235086486486486,0.193293333333333},
-{2962724,3896926,3897202,0.0942130434782609,0.0902875},
-{2962737,3851455,3849926,0.511723076923077,0.525189473684211},
-{2962738,3851907,3851455,0.148381818181818,-1},
-{2962739,3852261,3851907,0.08667,-1},
-{2962740,3852696,3852261,0.145851428571429,-1},
-{2962741,3854086,3853919,0.09462,0.135171428571429},
-{2962742,3854151,3854086,0.0231771428571429,0.0219243243243243},
-{2962743,3854578,3854151,0.130448780487805,0.124381395348837},
-{2962744,3855947,3854578,0.357354545454545,0.357354545454545},
-{2962745,3856149,3855947,0.114884210526316,0.0808444444444444},
-{2962746,3858245,3857387,0.251575,0.227841509433962},
-{2962747,3858675,3858245,0.16076170212766,0.1799},
-{2962748,3859167,3858994,0.0588967741935484,0.1074},
-{2962749,3859781,3859259,0.15255652173913,0.159490909090909},
-{2962750,3859896,3859781,0.0376695652173913,0.0402976744186046},
-{2962751,3861043,3859948,0.323026666666667,0.323026666666667},
-{2962752,3860787,3860524,0.0635875,0.10174},
-{2962753,3867916,3868053,-1,0.0938526315789474},
-{2962754,3868197,3868053,0.08542,0.08542},
-{2962755,3868867,3868197,0.204963636363636,0.270552},
-{2962756,3869451,3869047,-1,0.116076923076923},
-{2962757,3869047,3868665,-1,0.101769230769231},
-{2962758,3868665,3867861,-1,0.231048648648649},
-{2962759,3871981,3871318,-1,0.28737},
-{2962760,3872440,3871963,0.27048,-1},
-{2962761,3871981,3872483,0.167785714285714,-1},
-{2962762,3872483,3872529,0.0848108108108108,-1},
-{2962763,3872459,3872483,0.108333333333333,-1},
-{2962764,3872455,3872459,0.105391304347826,-1},
-{2962765,3872453,3872455,0.18435652173913,-1},
-{2962766,3872458,3872453,0.0647632653061224,-1},
-{2962767,3872010,3871981,-1,0.16605},
-{2962768,3872045,3872010,-1,0.12753},
-{2962769,3872064,3872052,-1,0.163297674418605},
-{2962770,3872044,3872064,-1,0.0792857142857143},
-{2962771,3871930,3872022,-1,0.1277},
-{2962772,3875393,3875481,0.14904,0.156884210526316},
-{2962773,3875266,3875334,0.157268571428571,0.148767567567568},
-{2962774,3876026,3875527,0.218378571428571,0.244584},
-{2962775,3876891,3877289,-1,0.107818604651163},
-{2962776,3877289,3877564,-1,0.329964705882353},
-{2962777,3877289,3877610,-1,0.0784571428571429},
-{2962778,3877610,3877893,-1,0.0752372093023256},
-{2962779,3877893,3878431,-1,0.175266666666667},
-{2962780,3878389,3878789,0.117954545454545,-1},
-{2962781,3876995,3877110,-1,0.169163636363636},
-{2962782,3876876,3876995,-1,0.17660625},
-{2962783,3876735,3876876,-1,0.227871428571429},
-{2962784,3878167,3878384,0.19146,-1},
-{2962785,3877893,3878167,0.221123076923077,-1},
-{2962786,3877616,3877719,0.19965,-1},
-{2962787,3877488,3877616,0.17353125,-1},
-{2962788,3877326,3877488,0.1716,-1},
-{2962789,3876846,3876735,-1,0.385827272727273},
-{2962790,3877274,3877326,0.239777777777778,-1},
-{2962791,3880269,3880471,0.1217,0.125896551724138},
-{2962792,3880204,3880269,0.033576,0.02798},
-{2962793,3882281,3883165,0.611463157894737,0.283360975609756},
-{2962794,3882763,3883165,0.254045454545455,0.109588235294118},
-{2962795,3882468,3882763,0.09996,0.0740444444444444},
-{2962796,3882165,3882468,0.106526086956522,0.0924566037735849},
-{2962797,3881858,3882165,0.137184615384615,0.102888461538462},
-{2962798,3881457,3881858,0.161735294117647,0.112224489795918},
-{2962799,3881101,3881457,0.128846511627907,0.142061538461538},
-{2962800,3880728,3881101,0.147236842105263,0.3496875},
-{2962801,3880471,3880728,0.118994594594595,0.1375875},
-{2962802,3883811,3883165,-1,0.442248},
-{2962803,3884306,3883811,-1,0.25595625},
-{2962804,3884669,3884306,-1,0.2099},
-{2962805,3884867,3884669,-1,0.25445},
-{2962806,3885287,3885208,0.0433304347826087,-1},
-{2962807,3880492,3880269,0.120783333333333,-1},
-{2962808,3880738,3880492,0.113184615384615,-1},
-{2962809,3880991,3880676,-1,0.12576},
-{2962810,3886651,3887278,0.217774468085106,0.204708},
-{2962811,3886073,3886651,0.2529,0.343221428571429},
-{2962812,3885287,3886073,0.417311111111111,0.312983333333333},
-{2962813,3885046,3885287,0.068425,0.0763813953488372},
-{2962814,3884829,3885046,0.0738,0.0690893617021276},
-{2962815,3884772,3884829,0.04638,-1},
-{2962816,3884559,3884829,0.085953488372093,0.0786382978723404},
-{2962817,3884184,3884559,0.130369565217391,0.127595744680851},
-{2962818,3883835,3884184,0.127215,0.118339534883721},
-{2962819,3885258,3885339,0.2779125,-1},
-{2962820,3884829,3884892,0.0462521739130435,-1},
-{2962821,3885393,3885258,-1,0.0578823529411765},
-{2962822,3885695,3885393,-1,0.140876923076923},
-{2962823,3886085,3885695,-1,0.19668},
-{2962824,3893554,3893800,0.127131818181818,0.124306666666667},
-{2962825,3893318,3893554,0.129333333333333,0.108279069767442},
-{2962826,3892117,3893318,0.46528085106383,0.437364},
-{2962827,3893800,3894171,0.150528,0.150528},
-{2962828,3896657,3896232,0.240975,0.265903448275862},
-{2962829,3896657,3896926,0.0924533333333333,0.0924533333333333},
-{2962830,3896217,3896471,0.1482,-1},
-{2962831,3895336,3895663,0.383684210526316,0.158478260869565},
-{2962832,3895085,3895336,0.12028,0.1127625},
-{2962833,3894567,3894798,0.23124,0.121705263157895},
-{2962834,3894798,3893554,0.749825806451613,0.860911111111111},
-{2962835,3896441,3896217,0.11787,-1},
-{2962836,3897856,3897312,0.178221052631579,-1},
-{2962853,3854789,3854740,0.0235363636363636,0.0246571428571429},
-{2962854,3851476,3851083,0.281120930232558,0.2518375},
-{2962855,3857984,3858104,0.0965414634146341,0.08796},
-{2962856,3861802,3861631,0.0632684210526316,0.0572428571428572},
-{2962857,3862517,3861802,0.244871428571429,0.239176744186047},
-{2962858,3864629,3864346,0.144933333333333,0.3261},
-{2962859,3863339,3862517,0.433509677419355,0.407236363636364},
-{2962860,3864346,3864258,0.0437032258064516,0.0483857142857143},
-{2962861,3864258,3863915,0.199176923076923,0.18495},
-{2962862,3863915,3863339,0.495733333333333,0.387965217391304},
-{2962863,3866618,3865566,0.424214285714286,0.387326086956522},
-{2962864,3865109,3865008,0.382828571428571,-1},
-{2962865,3864686,3863915,0.470766666666667,0.546696774193548},
-{2962866,3864784,3863339,-1,0.897434482758621},
-{2962867,3870613,3869940,-1,0.180141176470588},
-{2962868,3871322,3870613,-1,0.168753846153846},
-{2962869,3871930,3871338,0.148165714285714,-1},
-{2962870,3868086,3867239,-1,0.246158823529412},
-{2962871,3868558,3868086,-1,0.127897297297297},
-{2962872,3868976,3868662,-1,0.0827833333333333},
-{2962873,3869270,3868976,-1,0.0783157894736842},
-{2962874,3869931,3869270,-1,0.19754},
-{2962875,3870046,3869931,-1,0.033951724137931},
-{2962876,3870421,3870046,-1,0.0981333333333333},
-{2962877,3870904,3870421,-1,0.120047368421053},
-{2962878,3871347,3870904,-1,0.11185},
-{2962879,3867497,3866913,0.28248,0.252214285714286},
-{2962880,3871935,3871347,-1,0.272021052631579},
-{2962881,3871935,3871914,-1,0.131431578947368},
-{2962882,3871942,3871935,-1,0.05551875},
-{2962883,3871887,3871942,-1,0.159441176470588},
-{2962884,3872467,3872468,0.174882352941176,-1},
-{2962885,3872489,3872467,0.0720166666666667,-1},
-{2962886,3871929,3871877,-1,0.07392},
-{2962887,3872000,3871929,-1,0.0984857142857143},
-{2962888,3872062,3872008,-1,0.0706186046511628},
-{2962889,3872130,3872062,-1,0.138175609756098},
-{2962890,3872265,3872130,-1,0.159465},
-{2962891,3872517,3872489,0.0921681818181818,-1},
-{2962892,3872555,3872517,0.0824936170212766,-1},
-{2962893,3872597,3872555,0.105782608695652,-1},
-{2962894,3872742,3872597,0.257178947368421,-1},
-{2962895,3872375,3872265,-1,0.100976470588235},
-{2962896,3872375,3872742,0.2781,0.256707692307692},
-{2962897,3876041,3876026,0.292296774193548,0.312455172413793},
-{2962898,3876458,3876476,0.0106137931034483,0.00879428571428571},
-{2962899,3876476,3876846,0.15815,0.1186125},
-{2962900,3876055,3876053,0.10315,0.154725},
-{2962901,3874960,3875344,0.314113043478261,0.258021428571429},
-{2962902,3875344,3875800,0.303176470588235,0.20616},
-{2962903,3875315,3875344,0.19524,-1},
-{2962904,3874982,3874960,-1,0.160386206896552},
-{2962905,3875326,3875315,0.157696551724138,-1},
-{2962906,3875054,3874982,-1,0.136248648648649},
-{2962907,3875389,3875326,0.163296774193548,-1},
-{2962908,3875121,3875054,-1,0.123076923076923},
-{2962909,3875448,3875389,0.176111111111111,-1},
-{2962910,3872742,3872911,0.09912,0.1239},
-{2962911,3876846,3877274,0.164422222222222,0.170746153846154},
-{2962912,3877274,3877854,0.146526315789474,0.206222222222222},
-{2962913,3877854,3878444,0.15387,0.15387},
-{2962914,3878444,3879157,0.350504347826087,0.287914285714286},
-{2962915,3876911,3876846,-1,0.24498},
-{2962916,3876981,3876911,-1,0.18195652173913},
-{2962917,3877045,3876981,-1,0.28029},
-{2962918,3876495,3876911,0.158111111111111,0.152464285714286},
-{2962919,3876911,3877340,0.200918181818182,0.122783333333333},
-{2962920,3877340,3877906,0.208707692307692,0.200977777777778},
-{2962921,3877906,3878473,0.20394,0.30591},
-{2962922,3878473,3879147,0.416833333333333,0.267964285714286},
-{2962923,3877340,3877274,0.225463636363636,-1},
-{2962924,3877398,3877340,0.246,-1},
-{2962925,3876537,3876495,-1,0.187663636363636},
-{2962926,3876981,3877398,0.14488,0.135825},
-{2962927,3876537,3876981,0.144483870967742,0.154448275862069},
-{2962928,3876055,3876105,0.08235,0.08235},
-{2962929,3876163,3876137,0.0718137931034483,0.06942},
-{2962930,3876239,3876163,0.15788275862069,0.14308125},
-{2962931,3876319,3876239,0.175137931034483,0.153909090909091},
-{2962932,3876422,3876319,0.1674,0.186715384615385},
-{2962933,3876463,3876422,-1,0.0846521739130435},
-{2962934,3879753,3879502,0.15164,0.162471428571429},
-{2962935,3879985,3879753,0.171333333333333,0.15951724137931},
-{2962936,3880219,3879985,0.1938,0.185725},
-{2962937,3880449,3880219,0.16985,0.185290909090909},
-{2962938,3880716,3880449,0.2175,0.2175},
-{2962939,3881144,3880716,-1,-1},
-{2962940,3881255,3880991,-1,0.0995581395348837},
-{2962941,3881781,3881255,-1,0.2467125},
-{2962942,3882152,3881830,0.170033333333333,-1},
-{2962943,3883413,3883835,0.191135294117647,0.15113023255814},
-{2962944,3883025,3883413,0.162670588235294,0.128623255813954},
-{2962945,3882650,3883025,0.134671428571429,0.145030769230769},
-{2962946,3882379,3882650,0.10383,0.133974193548387},
-{2962947,3882317,3882379,-1,0.0517142857142857},
-{2962948,3882280,3882152,0.06156,-1},
-{2962949,3882118,3882221,0.0496666666666667,0.0447},
-{2962950,3882118,3882107,-1,0.193},
-{2962951,3882379,3882422,-1,0.0546352941176471},
-{2962952,3882221,3882107,-1,0.0690387096774193},
-{2962953,3882358,3882118,-1,0.160533333333333},
-{2962954,3881900,3882118,0.137648275862069,0.105047368421053},
-{2962955,3880637,3881144,0.233823529411765,0.203846153846154},
-{2962956,3880397,3880637,0.112326315789474,0.109446153846154},
-{2962957,3882915,3882396,0.385721739130435,-1},
-{2962958,3883247,3882915,0.158647058823529,-1},
-{2962959,3881384,3881144,0.3554,0.21324},
-{2962960,3881803,3881384,0.274175,0.253084615384615},
-{2962961,3881910,3881803,0.098,0.123789473684211},
-{2962962,3883924,3883247,0.535226086956522,-1},
-{2962963,3887702,3887880,0.079775,0.05983125},
-{2962964,3885903,3886020,0.064025,-1},
-{2962965,3886251,3886020,-1,0.12146},
-{2962966,3886671,3886251,-1,0.23998064516129},
-{2962967,3886843,3886671,-1,0.0906171428571429},
-{2962968,3887617,3887287,0.155369230769231,0.168316666666667},
-{2962969,3887961,3887617,0.14823,0.141171428571429},
-{2962970,3889252,3889594,0.130466666666667,-1},
-{2962971,3889045,3889252,0.0623675675675676,-1},
-{2962972,3888848,3889045,0.0706764705882353,-1},
-{2962973,3887961,3888848,0.35628,-1},
-{2962974,3887455,3887961,0.341011764705882,-1},
-{2962975,3886830,3887287,-1,0.244038461538462},
-{2962976,3886448,3886830,-1,0.252490909090909},
-{2962977,3886256,3886448,-1,0.105765517241379},
-{2962978,3885969,3886256,-1,0.125775},
-{2962979,3890645,3891055,0.171105882352941,-1},
-{2962980,3890291,3890645,0.143725714285714,-1},
-{2962981,3889594,3890291,0.273034285714286,-1},
-{2962982,3893546,3894011,0.217760869565217,0.263605263157895},
-{2962983,3892118,3892439,0.14900625,0.170292857142857},
-{2962984,3891744,3892118,0.165416666666667,0.1985},
-{2962985,3891396,3891744,0.160954838709677,0.1782},
-{2962986,3894286,3894567,0.125316279069767,0.1122625},
-{2962987,3894011,3894286,0.121682608695652,0.109752941176471},
-{2962988,3895457,3895163,0.143808,0.130734545454545},
-{2962989,3895625,3895457,0.0767563636363637,0.0767563636363637},
-{2962990,3896122,3895625,0.162866666666667,0.159905454545455},
-{2962991,3896701,3896601,0.0501833333333333,0.0547454545454545},
-{2962992,3897699,3896799,0.672766666666667,-1},
-{2962993,3898244,3897699,0.19141875,-1},
-{2962994,3898721,3898244,0.231825,-1},
-{2962995,3898961,3898464,0.26235652173913,-1},
-{2962996,3899352,3898961,0.162831578947368,-1},
-{2962997,3899648,3899352,0.159853846153846,-1},
-{2962998,3905225,3905329,0.0337411764705882,0.0351183673469388},
-{2962999,3903475,3903889,0.131559183673469,0.146509090909091},
-{2963000,3903376,3903475,0.0321115384615385,0.0347875},
-{2963001,3903012,3903376,0.0982705882352941,0.111373333333333},
-{2963024,3851477,3851702,0.0801567567567568,0.0780473684210526},
-{2963025,3851702,3851809,0.0604054054054054,0.06984375},
-{2963026,3851765,3851809,0.06228,0.0573631578947368},
-{2963027,3851283,3851765,0.365,0.386470588235294},
-{2963028,3851048,3850940,0.0476516129032258,0.04924},
-{2963029,3850940,3850311,0.183342857142857,0.175009090909091},
-{2963031,3858679,3858104,0.214082608695652,0.21884},
-{2963032,3859021,3858679,0.230853333333333,0.3148},
-{2963033,3859021,3859110,0.115547368421053,0.0593351351351352},
-{2963034,3859110,3859344,0.0888,0.0826758620689655},
-{2963035,3859722,3859344,0.180130434782609,0.111972972972973},
-{2963036,3861049,3859722,0.331704,0.345525},
-{2963037,3861263,3861049,0.0552566037735849,0.058572},
-{2963038,3861568,3861263,0.0825346153846154,0.0841529411764706},
-{2963039,3862264,3861944,0.0795647058823529,0.0765622641509434},
-{2963040,3862342,3862264,0.0164307692307692,0.017088},
-{2963041,3862785,3862342,0.100015384615385,0.10835},
-{2963042,3859110,3859002,0.326194285714286,0.543657142857143},
-{2963043,3859002,3858587,0.260218604651163,0.266414285714286},
-{2963044,3860522,3859825,0.222709090909091,0.21776},
-{2963045,3861191,3860522,0.179660869565217,0.179660869565217},
-{2963046,3861612,3861191,0.1286625,0.13724},
-{2963047,3862001,3861612,0.1146125,0.125031818181818},
-{2963048,3859824,3859825,0.0756,0.0360818181818182},
-{2963049,3859824,3860094,0.230804081632653,0.25132},
-{2963050,3864784,3864645,0.117367741935484,-1},
-{2963051,3864645,3864383,0.19667027027027,-1},
-{2963052,3864383,3864265,0.0938742857142857,-1},
-{2963053,3864265,3864145,0.118816666666667,-1},
-{2963054,3863561,3863137,0.330963636363636,0.404511111111111},
-{2963055,3865031,3865022,0.0824093023255814,-1},
-{2963056,3865022,3865026,0.0728914285714286,-1},
-{2963057,3865026,3865015,0.0722333333333333,-1},
-{2963058,3872135,3871652,0.176903225806452,-1},
-{2963059,3871463,3870953,0.2199,-1},
-{2963060,3870953,3870733,0.274872,-1},
-{2963061,3870650,3870985,0.313447058823529,-1},
-{2963062,3871041,3871209,0.1942,0.1942},
-{2963063,3870995,3871041,0.0489529411764706,0.0489529411764706},
-{2963064,3870604,3869956,0.209372093023256,0.29041935483871},
-{2963065,3869956,3869792,0.087312,0.094904347826087},
-{2963066,3868742,3868408,0.3196,0.2256},
-{2963067,3869824,3869221,0.240436363636364,0.255948387096774},
-{2963068,3866942,3867376,0.112889361702128,-1},
-{2963069,3867376,3867631,0.0805813953488372,-1},
-{2963070,3869461,3869093,0.103459459459459,0.1276},
-{2963071,3869049,3868757,0.07281,0.2427},
-{2963072,3868411,3868578,0.0578666666666667,0.0400615384615385},
-{2963073,3871244,3870619,0.191565957446809,0.2501},
-{2963074,3870619,3870604,0.0048875,0.00651666666666667},
-{2963075,3872906,3872742,0.207672727272727,-1},
-{2963076,3872961,3872906,0.22081935483871,-1},
-{2963077,3872900,3872771,0.0706105263157895,0.0706105263157895},
-{2963078,3872428,3872375,-1,0.0569225806451613},
-{2963079,3872579,3872428,-1,0.1421},
-{2963080,3872771,3872579,-1,0.149205405405405},
-{2963081,3872814,3872771,0.04605,0.04605},
-{2963082,3873025,3872889,0.186490909090909,0.279736363636364},
-{2963083,3872315,3872135,0.12031875,-1},
-{2963084,3872731,3872315,0.302111111111111,-1},
-{2963085,3875229,3875121,-1,0.201890322580645},
-{2963086,3875352,3875229,-1,0.206807142857143},
-{2963087,3875506,3875352,-1,0.217036363636364},
-{2963088,3875981,3876047,0.0370909090909091,-1},
-{2963089,3875552,3875448,0.252,-1},
-{2963090,3875740,3875552,0.226392,-1},
-{2963091,3875886,3876008,-1,0.149030769230769},
-{2963092,3876135,3876008,0.119363636363636,-1},
-{2963093,3876368,3876834,0.3131625,0.172779310344828},
-{2963094,3876515,3876463,-1,0.1794},
-{2963095,3876600,3876515,-1,0.2262},
-{2963096,3876671,3876600,-1,0.240521739130435},
-{2963097,3876763,3876671,-1,0.250963636363636},
-{2963098,3876834,3876763,-1,0.3156375},
-{2963099,3877240,3877165,0.156488888888889,0.156488888888889},
-{2963100,3877425,3877240,0.56298,-1},
-{2963101,3877523,3877425,0.262942857142857,-1},
-{2963102,3877606,3877523,0.25134,-1},
-{2963103,3878778,3879044,0.13186,0.152146153846154},
-{2963104,3878091,3878488,0.144135483870968,0.2031},
-{2963105,3877323,3877606,0.08546,0.0776909090909091},
-{2963106,3880156,3880397,0.112357894736842,0.10674},
-{2963107,3879949,3880156,0.111518918918919,0.1058},
-{2963108,3879728,3879949,0.119666666666667,0.119666666666667},
-{2963109,3879044,3879728,0.289989473684211,1.10196},
-{2963110,3879766,3879408,0.155789189189189,-1},
-{2963111,3885006,3885460,-1,0.183375},
-{2963112,3884532,3885006,-1,0.44976},
-{2963113,3884532,3883924,0.333254545454545,-1},
-{2963114,3884813,3884532,0.192441176470588,-1},
-{2963115,3885127,3884813,0.25431724137931,-1},
-{2963116,3884953,3885253,-1,0.081585},
-{2963117,3885127,3885412,0.159886956521739,-1},
-{2963118,3884918,3884942,0.0166666666666667,-1},
-{2963119,3884490,3884918,0.289390909090909,-1},
-{2963120,3884105,3884490,0.215666666666667,-1},
-{2963121,3883635,3884105,0.203813793103448,-1},
-{2963122,3883329,3883635,0.158634782608696,-1},
-{2963123,3884487,3884532,-1,0.0485647058823529},
-{2963124,3883632,3884097,-1,0.237921428571429},
-{2963125,3883267,3883632,-1,0.194337931034483},
-{2963126,3882955,3883267,-1,0.12724},
-{2963127,3882710,3882955,-1,0.119357142857143},
-{2963128,3882146,3882710,-1,0.280384615384615},
-{2963129,3881716,3882146,-1,0.226577777777778},
-{2963130,3887133,3887455,0.1276,-1},
-{2963131,3886812,3887133,0.135157894736842,-1},
-{2963132,3886778,3886812,0.0152666666666667,-1},
-{2963133,3885992,3886403,0.1659,-1},
-{2963134,3885823,3885992,0.0577411764705882,-1},
-{2963135,3885412,3885823,0.18838125,-1},
-{2963136,3888514,3887961,0.306325714285714,0.243668181818182},
-{2963137,3890169,3890547,0.121832432432432,-1},
-{2963138,3895323,3895328,-1,0.0398333333333333},
-{2963139,3900158,3900003,-1,0.248885714285714},
-{2963143,3857510,3856965,0.163782352941176,0.163782352941176},
-{2963144,3856965,3856809,0.0936,0.0903724137931034},
-{2963145,3856809,3856687,0.131533333333333,0.131533333333333},
-{2963146,3856687,3856564,0.138409756097561,0.153372972972973},
-{2963147,3856564,3856515,0.080209756097561,0.0843230769230769},
-{2963148,3860127,3860094,0.045465306122449,0.045465306122449},
-{2963149,3860412,3860127,0.278611764705882,0.289983673469388},
-{2963150,3860592,3860412,0.204369230769231,0.346539130434783},
-{2963151,3860786,3860592,0.294,0.196},
-{2963152,3860920,3860786,0.102570731707317,0.0978},
-{2963153,3861038,3860920,0.0783891891891892,0.0763263157894737},
-{2963154,3862582,3862001,0.159668181818182,0.2602},
-{2963155,3862659,3861638,0.319936363636364,0.485420689655172},
-{2963156,3861036,3860858,0.0841076923076923,0.082005},
-{2963157,3860858,3860592,0.228282352941176,0.133820689655172},
-{2963158,3860592,3860298,0.1746,0.374142857142857},
-{2963159,3860298,3860203,0.042255,0.04695},
-{2963160,3860203,3860027,0.0922727272727273,0.0780769230769231},
-{2963161,3860027,3859874,0.0560634146341464,0.06385},
-{2963162,3859874,3859671,0.068805,0.1529},
-{2963163,3860920,3860203,0.348088888888889,-1},
-{2963164,3860656,3860027,-1,0.24036},
-{2963165,3861038,3860656,-1,0.15816},
-{2963166,3863137,3862750,0.27216,0.15552},
-{2963167,3863322,3862952,0.20473125,-1},
-{2963168,3863322,3863249,0.068208,0.068208},
-{2963169,3863249,3863050,0.127164705882353,0.227557894736842},
-{2963170,3863050,3862941,0.05985,0.0684},
-{2963171,3862941,3862752,0.0859813953488372,0.0948},
-{2963172,3862752,3862158,0.357507692307692,0.3873},
-{2963173,3864889,3864912,0.0683529411764706,-1},
-{2963174,3864912,3864937,0.0762588235294117,-1},
-{2963175,3864937,3864959,0.0700470588235294,-1},
-{2963176,3865040,3865236,-1,0.278060869565217},
-{2963177,3863475,3863249,-1,0.184142857142857},
-{2963178,3868411,3867816,0.189252631578947,0.211517647058824},
-{2963179,3867816,3867718,0.0347692307692308,0.0410909090909091},
-{2963180,3867718,3867673,0.0173414634146341,0.0229354838709677},
-{2963181,3867673,3867454,0.10035,0.129483870967742},
-{2963182,3867454,3867302,0.07595625,0.0675166666666667},
-{2963183,3872081,3871822,0.177392307692308,0.256233333333333},
-{2963184,3871552,3871317,0.0573733333333333,-1},
-{2963185,3872404,3872154,0.06976,-1},
-{2963186,3872081,3871552,0.3218,-1},
-{2963187,3872154,3872081,0.173275,-1},
-{2963188,3871000,3871203,0.0531782608695652,-1},
-{2963189,3871203,3871277,0.0168244897959184,-1},
-{2963190,3873710,3872404,0.324986666666667,-1},
-{2963191,3873757,3873905,0.0733333333333333,-1},
-{2963192,3873905,3874006,0.0403028571428571,-1},
-{2963193,3874186,3874181,0.0228,-1},
-{2963194,3874186,3874297,-1,0.05589},
-{2963195,3874181,3874253,0.0451578947368421,-1},
-{2963196,3874253,3874184,-1,0.15771724137931},
-{2963197,3874259,3874006,-1,0.27105},
-{2963198,3874014,3873710,0.107368421052632,-1},
-{2963199,3874373,3874485,-1,0.0937135135135135},
-{2963200,3874485,3874833,-1,0.2022},
-{2963201,3878045,3877845,0.3264,-1},
-{2963202,3878771,3878458,0.238513043478261,-1},
-{2963203,3878938,3878771,0.144736363636364,-1},
-{2963204,3880545,3880499,0.0317806451612903,-1},
-{2963205,3880730,3881193,-1,0.388371428571429},
-{2963206,3880506,3880617,0.0476666666666667,0.0476666666666667},
-{2963207,3879992,3880506,0.213163636363636,0.180369230769231},
-{2963208,3879693,3879992,0.1624,0.0953217391304348},
-{2963209,3879473,3879693,0.0838216216216216,0.0659872340425532},
-{2963210,3879564,3879400,0.0847578947368421,-1},
-{2963211,3879400,3879473,0.0266285714285714,0.0237957446808511},
-{2963212,3878530,3878360,0.0461111111111111,0.0452727272727273},
-{2963213,3878583,3878621,0.0451363636363636,-1},
-{2963214,3878583,3878315,0.151075,-1},
-{2963215,3877766,3877668,-1,0.080475},
-{2963216,3879324,3879400,0.0213681818181818,0.0195875},
-{2963217,3879324,3879564,-1,0.0955621621621622},
-{2963218,3879564,3879793,-1,0.17216},
-{2963219,3879724,3879793,0.04848,-1},
-{2963220,3879356,3879724,0.208130769230769,-1},
-{2963221,3878766,3879356,0.275825,-1},
-{2963222,3878463,3878766,0.172254545454545,-1},
-{2963223,3878233,3878463,0.136254545454545,-1},
-{2963224,3878621,3878766,0.2649,-1},
-{2963225,3882584,3883329,0.323955555555556,-1},
-{2963226,3882057,3882584,0.223490322580645,-1},
-{2963227,3880730,3882057,0.635475,-1},
-{2963228,3885248,3885242,0.0688461538461538,-1},
-{2963229,3885456,3885542,-1,0.505323529411765},
-{2963230,3885542,3885566,-1,0.109102702702703},
-{2963231,3885566,3885539,-1,0.113477419354839},
-{2963232,3891124,3891449,0.12216,0.138818181818182},
-{2963233,3892080,3892586,0.237095454545455,0.208644},
-{2963234,3900250,3900258,0.0741,-1},
-{2963239,3856428,3856463,0.0954642857142857,0.0891},
-{2963240,3856761,3856463,0.169816666666667,0.179805882352941},
-{2963241,3857141,3856761,0.1596375,0.1596375},
-{2963242,3857822,3857141,0.208014285714286,0.208014285714286},
-{2963243,3858164,3857822,0.0918,0.101463157894737},
-{2963244,3858470,3858164,0.1896,0.194009302325581},
-{2963245,3858599,3858470,0.0802829268292683,0.0731466666666667},
-{2963246,3859671,3858599,0.397786956521739,0.406626666666667},
-{2963247,3861038,3861562,0.2047,0.179736585365854},
-{2963248,3859874,3859767,0.207436363636364,0.212260465116279},
-{2963249,3859767,3859527,0.151917391304348,0.148685106382979},
-{2963250,3859527,3859353,0.0925953488372093,0.08848},
-{2963251,3864829,3864710,-1,0.0676695652173913},
-{2963252,3868144,3868255,0.19948,0.256474285714286},
-{2963253,3868255,3868525,0.374494736842105,-1},
-{2963254,3870566,3869920,-1,0.132955102040816},
-{2963255,3868650,3868598,-1,0.0133148936170213},
-{2963256,3869269,3868907,-1,0.227594117647059},
-{2963257,3868907,3868688,0.266928,0.175610526315789},
-{2963258,3875471,3875410,-1,0.145745454545455},
-{2963259,3879793,3880088,-1,0.36696},
-{2963260,3880088,3880310,-1,-1},
-{2963261,3880529,3880310,-1,-1},
-{2963262,3880529,3881182,-1,0.492066666666667},
-{2963263,3880497,3881042,-1,0.226233333333333},
-{2963264,3882572,3883564,0.332475,0.506628571428571},
-{2963265,3883564,3884493,0.373133333333333,0.272286486486487},
-{2963266,3884493,3885291,0.286241379310345,0.25940625},
-{2963267,3885502,3885449,-1,0.21221052631579},
-{2963268,3885376,3885319,0.116668421052632,-1},
-{2963269,3885319,3885291,0.0829058823529412,-1},
-{2963270,3885291,3885230,0.192283333333333,-1},
-{2963271,3885230,3885187,0.156308108108108,-1},
-{2963272,3885955,3886380,0.134005714285714,0.123426315789474},
-{2963273,3886380,3886820,0.154491428571429,0.168975},
-{2963274,3886820,3887112,0.0955230769230769,0.149016},
-{2963275,3887112,3887589,0.134022857142857,0.123442105263158},
-{2963276,3887589,3888574,0.235082926829268,0.260497297297297},
-{2963277,3888574,3888789,0.0554461538461538,0.0502883720930233},
-{2963278,3888789,3889082,0.07101,0.0645545454545454},
-{2963279,3889082,3889393,0.08196,0.0745090909090909},
-{2963280,3889393,3889524,0.0377285714285714,0.0360136363636364},
-{2963281,3890026,3890418,0.09975,0.0977142857142857},
-{2963282,3890418,3890864,0.114306666666667,0.109442553191489},
-{2963283,3890864,3891153,0.12428,0.0847363636363636},
-{2963284,3891153,3891867,0.365856,0.217771428571429},
-{2963285,3891867,3892241,0.140845714285714,0.12324},
-{2963286,3892464,3893002,0.12675652173913,0.138828571428571},
-{2963287,3893002,3893119,0.0360418604651163,0.0336913043478261},
-{2963288,3893621,3893901,0.100157142857143,0.2214},
-{2963289,3894065,3894022,0.0915272727272727,-1},
-{2963290,3900213,3900208,-1,0.0371411764705882},
-{2963291,3900208,3900206,-1,0.0237111111111111},
-{2963320,3859155,3858826,0.168153191489362,0.16465},
-{2963321,3861016,3859897,0.266016,0.266016},
-{2963322,3861278,3861016,0.0685102040816327,0.0658235294117647},
-{2963323,3861494,3861278,0.058104,0.0558692307692308},
-{2963324,3862073,3861494,0.162465306122449,0.159216},
-{2963325,3862477,3862073,0.0990260869565217,0.0949},
-{2963326,3869052,3868127,-1,0.23332},
-{2963327,3869689,3869052,-1,0.148460869565217},
-{2963328,3870221,3869689,-1,0.1167625},
-{2963329,3868688,3868713,0.0550829268292683,0.0501866666666667},
-{2963330,3878214,3878179,-1,0.0226666666666667},
-{2963331,3877969,3877623,-1,0.181241860465116},
-{2963332,3880206,3880149,0.0275172413793103,-1},
-{2963333,3881183,3881236,0.0216473684210526,0.0222324324324324},
-{2963334,3881236,3881702,0.186063157894737,0.168342857142857},
-{2963335,3881702,3882008,0.135723076923077,0.117626666666667},
-{2963336,3882008,3882242,0.100595454545455,0.09836},
-{2963337,3882242,3882431,0.0755454545454546,0.0722608695652174},
-{2963338,3885237,3885200,-1,0.149091428571429},
-{2963339,3885200,3885150,-1,0.0972},
-{2963340,3884597,3884871,0.330290322580645,-1},
-{2963341,3884398,3884597,0.255218181818182,-1},
-{2963342,3884398,3884766,-1,0.281178947368421},
-{2963343,3896314,3897419,-1,0.30855},
-{2963344,3894192,3894125,0.246615384615385,-1},
-{2963345,3894259,3894192,0.173211764705882,-1},
-{2963346,3894325,3894259,0.152976,-1},
-{2963347,3894307,3894325,0.171126315789474,-1},
-{2963348,3903508,3904083,0.149086956521739,0.207818181818182},
-{2963363,3855814,3854870,0.5109,0.469475675675676},
-{2963364,3856584,3855814,0.3069875,0.31351914893617},
-{2963365,3856699,3856584,0.0724883720930233,0.0692666666666667},
-{2963366,3856766,3856699,0.0466363636363636,0.0500487804878049},
-{2963367,3856932,3856766,0.222927272727273,0.228111627906977},
-{2963368,3868458,3868577,0.0785739130434783,-1},
-{2963369,3868577,3868904,0.4882,-1},
-{2963370,3868927,3869032,0.0930473684210526,-1},
-{2963371,3869279,3869492,-1,0.26568},
-{2963372,3870181,3869660,-1,0.134033333333333},
-{2963373,3870540,3870481,0.0135906976744186,-1},
-{2963374,3870910,3870384,-1,0.1368},
-{2963375,3871538,3870973,0.1102625,-1},
-{2963376,3872036,3871459,-1,0.1236},
-{2963377,3870481,3870181,0.0620266666666667,-1},
-{2963378,3869216,3868583,-1,0.140946666666667},
-{2963379,3868583,3868254,-1,0.0647538461538461},
-{2963380,3867688,3867520,0.0362490566037736,-1},
-{2963381,3867520,3867170,0.0676075471698113,-1},
-{2963382,3867170,3866748,0.0818888888888889,-1},
-{2963383,3866748,3866416,0.0584222222222222,-1},
-{2963384,3871291,3870978,-1,0.084555},
-{2963385,3873006,3871291,-1,0.422034146341463},
-{2963386,3875443,3874466,0.352563636363636,-1},
-{2963387,3874466,3874444,0.0837,0.0732375},
-{2963388,3875443,3874444,-1,0.56175652173913},
-{2963389,3875784,3875443,0.14725,-1},
-{2963390,3876742,3876097,0.182945454545455,-1},
-{2963391,3876097,3875819,0.087525,-1},
-{2963392,3875784,3875297,0.142257142857143,-1},
-{2963393,3875293,3874873,-1,0.338152941176471},
-{2963394,3874873,3874258,-1,0.175088372093023},
-{2963395,3872729,3872378,-1,0.11174},
-{2963396,3872714,3872085,0.129886956521739,-1},
-{2963397,3873518,3873482,0.159741176470588,-1},
-{2963398,3872653,3872671,0.143433333333333,-1},
-{2963399,3874035,3873518,0.14749756097561,-1},
-{2963400,3875859,3876130,0.1335625,-1},
-{2963401,3875859,3875776,-1,0.143625},
-{2963402,3875746,3875721,0.107675,-1},
-{2963403,3875721,3875594,0.228792,-1},
-{2963404,3875594,3875501,0.288,-1},
-{2963405,3876180,3876535,-1,0.2848875},
-{2963406,3876498,3876720,0.0878444444444444,-1},
-{2963407,3877530,3877377,0.08296875,-1},
-{2963408,3877623,3877371,-1,0.0905285714285714},
-{2963409,3877371,3876771,-1,0.186627906976744},
-{2963410,3878655,3878635,0.2584,0.228},
-{2963411,3878635,3878586,0.273668571428571,0.30898064516129},
-{2963412,3878586,3878553,0.130937142857143,0.1273},
-{2963413,3878553,3878416,0.290592857142857,0.290592857142857},
-{2963414,3876748,3877266,-1,0.196},
-{2963415,3877870,3878393,0.345423529411765,-1},
-{2963416,3878393,3878897,0.230014285714286,-1},
-{2963417,3878897,3879195,0.122155555555556,-1},
-{2963418,3880243,3880902,0.387651428571429,0.357047368421053},
-{2963419,3880704,3880902,-1,0.228830769230769},
-{2963420,3881000,3880713,-1,0.0694},
-{2963421,3883843,3884150,-1,0.0879888888888889},
-{2963422,3883732,3883918,-1,0.0732620689655172},
-{2963423,3883918,3884150,-1,0.0805935483870968},
-{2963424,3883732,3883843,0.120577777777778,-1},
-{2963425,3883504,3883641,0.0355777777777778,-1},
-{2963426,3883641,3883966,0.100782352941176,-1},
-{2963427,3884174,3884285,-1,0.216572727272727},
-{2963428,3884404,3884401,-1,0.0249951219512195},
-{2963429,3884766,3885240,0.28105,0.198388235294118},
-{2963430,3884531,3884812,0.302147368421053,0.2496},
-{2963431,3885240,3885650,0.235944,0.159421621621622},
-{2963432,3885650,3885792,0.07126875,0.06335},
-{2963433,3886048,3886288,0.107541176470588,0.1142625},
-{2963434,3886288,3886707,0.203228571428571,0.182384615384615},
-{2963435,3886707,3886999,0.145694117647059,0.117942857142857},
-{2963436,3886999,3887514,0.217870588235294,0.168354545454545},
-{2963437,3894091,3894469,-1,0.110823529411765},
-{2963438,3897275,3897559,-1,0.12306},
-{2963439,3897026,3897275,-1,0.104141379310345},
-{2963440,3896752,3897026,-1,0.114905454545455},
-{2963441,3896496,3896752,-1,0.132833333333333},
-{2963457,3850581,3850917,0.1085,0.102117647058824},
-{2963458,3850917,3851074,0.0524936170212766,0.0483764705882353},
-{2963459,3851074,3851228,0.04976,0.044784},
-{2963460,3851228,3851556,0.101424489795918,0.099396},
-{2963461,3858650,3856932,0.478146666666667,0.500386046511628},
-{2963462,3859166,3858650,0.184390909090909,0.197882926829268},
-{2963463,3859654,3859166,0.165025531914894,0.168613043478261},
-{2963464,3860084,3859654,0.177485714285714,0.162052173913043},
-{2963465,3860258,3860084,0.066588,0.0708382978723404},
-{2963466,3860475,3860258,0.0739294117647059,0.0769469387755102},
-{2963467,3860769,3860475,0.0946117647058824,0.096504},
-{2963468,3866416,3865804,0.113642307692308,-1},
-{2963469,3864509,3864376,0.0674135593220339,-1},
-{2963470,3867909,3866882,0.2179,0.222536170212766},
-{2963471,3868337,3867909,0.082334693877551,0.080688},
-{2963472,3868649,3868337,0.0640897959183674,0.062808},
-{2963473,3869013,3868649,0.0732,0.0732},
-{2963474,3869749,3869013,0.200152941176471,0.378066666666667},
-{2963475,3871184,3870343,0.21500487804878,-1},
-{2963476,3869169,3868278,-1,0.238911627906977},
-{2963477,3868278,3867644,-1,0.16386976744186},
-{2963478,3869836,3869624,-1,0.179776744186047},
-{2963479,3869624,3869531,-1,0.0936734693877551},
-{2963480,3867146,3866966,-1,0.0628864864864865},
-{2963481,3874533,3874015,-1,0.142513636363636},
-{2963482,3874966,3874533,-1,0.130155},
-{2963483,3875374,3874966,-1,0.151694117647059},
-{2963484,3875453,3875312,-1,0.38403},
-{2963485,3875160,3875078,0.128351351351351,-1},
-{2963486,3875486,3875629,-1,0.0379076923076923},
-{2963487,3876030,3876867,-1,0.240064864864865},
-{2963488,3877686,3876841,-1,0.193772727272727},
-{2963489,3877686,3878107,0.1251,-1},
-{2963490,3879226,3878950,0.071475,-1},
-{2963491,3878107,3878114,0.21107027027027,0.411031578947368},
-{2963492,3878114,3878193,0.101659090909091,0.1278},
-{2963493,3885493,3885920,0.187123404255319,0.162866666666667},
-{2963494,3885920,3886563,0.373846153846154,0.297551020408163},
-{2963495,3888715,3889387,0.418241379310345,0.311},
-{2963497,3904719,3905124,0.138114893617021,0.1352375},
-{2963498,3902125,3902512,-1,0.0808777777777778},
-{2963499,3902512,3902952,-1,0.097},
-{2963500,3902952,3903122,-1,0.0436153846153846},
-{2963501,3905991,3907030,0.341289795918367,0.334464},
-{2963503,3911888,3912006,0.026832,0.0258},
-{2963504,3912006,3913364,0.286621276595745,0.264141176470588},
-{2963505,3913364,3914167,0.165587755102041,0.1690375},
-{2963506,3914167,3914702,0.121176923076923,0.118890566037736},
-{2963507,3914702,3915408,0.192344444444444,0.188847272727273},
-{2963510,3920983,3921520,0.221026666666667,0.198924},
-{2963515,3855579,3856618,0.250592307692308,0.255505882352941},
-{2963516,3857322,3857718,0.12999,0.14856},
-{2963517,3861208,3860769,0.167139622641509,0.177168},
-{2963518,3861564,3861208,0.145729411764706,0.151677551020408},
-{2963519,3861770,3861564,0.0942127659574468,0.0962608695652174},
-{2963520,3861770,3862075,0.235911111111111,0.181988571428571},
-{2963521,3861882,3861729,0.0390115384615385,-1},
-{2963522,3861729,3861136,0.1797,-1},
-{2963523,3861084,3860579,0.124366666666667,-1},
-{2963524,3862723,3862546,-1,0.06506},
-{2963525,3866966,3865818,-1,0.284209090909091},
-{2963526,3865226,3865181,-1,0.0982285714285714},
-{2963527,3865181,3865014,-1,0.44295},
-{2963528,3858737,3859177,0.0875666666666667,-1},
-{2963529,3859445,3859534,0.02442,-1},
-{2963530,3859445,3859890,0.116224137931034,-1},
-{2963531,3860665,3860754,0.1113,-1},
-{2963532,3860754,3860512,-1,0.121276923076923},
-{2963533,3860234,3860128,0.11157,0.0719806451612903},
-{2963534,3860467,3860234,0.194242105263158,0.36906},
-{2963535,3869531,3869707,-1,0.1868},
-{2963536,3869636,3869825,0.289817647058824,-1},
-{2963537,3874734,3874667,0.0802744186046512,-1},
-{2963538,3874667,3874433,0.312174193548387,-1},
-{2963539,3874514,3874337,-1,0.290875862068965},
-{2963540,3874337,3874228,-1,0.0986478260869565},
-{2963541,3874228,3874120,-1,0.0999375},
-{2963542,3874120,3874000,-1,0.158908695652174},
-{2963543,3878375,3878371,-1,0.0312931034482759},
-{2963544,3878297,3878232,0.206067857142857,-1},
-{2963545,3899695,3899623,0.0313173913043478,0.0300125},
-{2963546,3915408,3916164,0.190675471698113,0.187144444444444},
-{2963547,3917135,3917310,-1,0.0872936170212766},
-{2963551,3850165,3849790,0.0891396226415094,0.0858981818181818},
-{2963552,3852017,3851512,0.100811111111111,0.0938586206896552},
-{2963553,3852976,3852017,0.180043636363636,0.170731034482759},
-{2963554,3854648,3852976,0.358264285714286,0.351978947368421},
-{2963555,3861743,3861552,0.0713869565217391,0.065676},
-{2963556,3862116,3861743,0.119604255319149,0.112428},
-{2963557,3869693,3869677,-1,0.233933333333333},
-{2963558,3869604,3869580,0.2174375,-1},
-{2963559,3869580,3869574,0.0913058823529412,-1},
-{2963560,3869635,3869628,-1,0.0638264150943396},
-{2963561,3869628,3869612,-1,0.0807283018867924},
-{2963562,3874000,3873896,-1,0.126885},
-{2963563,3873896,3873861,-1,0.0662727272727273},
-{2963564,3873506,3873314,-1,0.212720930232558},
-{2963565,3872140,3873001,-1,0.1697125},
-{2963566,3907935,3907642,0.1687,0.106547368421053},
-{2963567,3907935,3908085,0.0401181818181818,0.07355},
-{2963568,3908085,3908565,0.128835294117647,0.193252941176471},
-{2963569,3908565,3909060,0.133068,0.144639130434783},
-{2963570,3909060,3909523,0.140387234042553,0.140387234042553},
-{2963571,3909523,3909985,0.146282608695652,0.143170212765957},
-{2963572,3910526,3909985,0.139110638297872,0.1362125},
-{2963573,3909633,3909907,0.0715066666666667,0.0670375},
-{2963574,3909907,3909970,0.0153488372093023,0.0143478260869565},
-{2963575,3910440,3910588,0.0341302325581395,0.0333545454545455},
-{2963576,3910588,3911189,0.21230625,0.178784210526316},
-{2963577,3911189,3911758,0.160744186046512,0.2304},
-{2963578,3911758,3912370,0.1410625,0.144063829787234},
-{2963579,3912370,3912587,0.0410938775510204,0.040272},
-{2963580,3912587,3914199,0.581979310344828,0.375053333333333},
-{2963581,3914199,3914312,0.0409818181818182,0.0397764705882353},
-{2963598,3863454,3862545,0.323614285714286,0.30204},
-{2963599,3863454,3863488,0.210884210526316,0.205476923076923},
-{2963600,3863488,3863299,0.131536363636364,0.134595348837209},
-{2963601,3863299,3863087,0.1287875,0.134386956521739},
-{2963602,3864824,3864770,0.0309913043478261,0.03168},
-{2963603,3869540,3869568,0.0987411764705882,-1},
-{2963604,3869556,3869537,0.150769230769231,0.127826086956522},
-{2963605,3869537,3869530,0.177388235294118,0.0886941176470588},
-{2963606,3869514,3869529,0.0387673469387755,0.0431727272727273},
-{2963607,3869529,3869473,0.2489,0.265493333333333},
-{2963608,3873314,3873151,-1,0.167751219512195},
-{2963609,3873151,3872863,-1,0.34209},
-{2963610,3872746,3872633,0.127036363636364,-1},
-{2963611,3872633,3872550,0.0697142857142857,-1},
-{2963612,3872550,3872227,0.271533333333333,-1},
-{2963613,3877363,3876916,0.251883870967742,-1},
-{2963614,3892016,3893477,0.685266666666667,0.57819375},
-{2963615,3892016,3892740,0.416167741935484,0.548987234042553},
-{2963616,3898228,3901207,0.57779,0.619060714285714},
-{2963617,3901693,3901282,0.353871428571429,0.159812903225806},
-{2963618,3901964,3901693,0.0760153846153846,0.0689441860465116},
-{2963619,3902354,3901964,0.0977384615384615,0.0929707317073171},
-{2963620,3902749,3902354,0.13021875,0.0886595744680851},
-{2963621,3902640,3902828,-1,0.0551423076923077},
-{2963622,3902828,3903195,-1,0.112843636363636},
-{2963623,3902021,3902333,0.123048648648649,-1},
-{2963624,3902333,3902596,0.0765795918367347,-1},
-{2963625,3902596,3902858,0.0783260869565217,-1},
-{2963638,3862229,3862099,0.122440909090909,0.117117391304348},
-{2963639,3863737,3864128,0.480311111111111,0.370525714285714},
-{2963640,3863599,3863737,0.200555555555556,0.1805},
-{2963641,3863599,3863224,0.209712,0.201646153846154},
-{2963642,3863224,3862951,0.116365714285714,0.127275},
-{2963643,3862951,3862229,0.296668965517241,0.296668965517241},
-{2963644,3862099,3861924,0.120470588235294,0.118153846153846},
-{2963645,3861924,3861765,0.1166,0.1166},
-{2963646,3861765,3861683,0.041592,0.041592},
-{2963647,3861683,3861570,0.0888588235294118,0.0888588235294118},
-{2963648,3869473,3869449,0.30462,0.324063829787234},
-{2963649,3869449,3869455,0.207188235294118,0.2201375},
-{2963650,3869455,3869471,0.163672340425532,0.183157142857143},
-{2963651,3872328,3872071,-1,0.215347826086957},
-{2963652,3876858,3875869,-1,0.23495593220339},
-{2963653,3857959,3857731,0.09576,0.0990620689655173},
-{2963654,3861566,3860748,0.36312,0.389057142857143},
-{2963655,3862644,3861566,0.375291891891892,0.420781818181818},
-{2963656,3885834,3885856,0.124735384615385,0.126684375},
-{2963657,3896121,3896577,0.251170588235294,0.502341176470588},
-{2963658,3896577,3896966,0.162446808510638,0.155816326530612},
-{2963659,3896966,3897618,0.264678260869565,0.248473469387755},
-{2963660,3897618,3897834,0.0895733333333333,0.0857617021276596},
-{2963661,3847542,3847424,0.0547909090909091,0.0588},
-{2963662,3860672,3861011,0.5595,0.53712},
-{2963663,3885991,3886005,-1,0.0507152542372881},
-{2963664,3894631,3894706,0.0638076923076923,-1},
-{2963666,3873297,3873650,0.0827727272727273,0.0714117647058824},
-{2963667,3873207,3873297,0.0202772727272727,0.0171576923076923},
-{2963668,3872775,3873207,0.1016,0.0896470588235294},
-{2963669,3872248,3872775,0.110542857142857,0.096725},
-{2963670,3872056,3872248,0.048375,0.0471951219512195},
-{2963671,3869471,3869528,0.131253333333333,0.1284},
-{2963672,3869528,3869582,0.109252173913043,0.114218181818182},
-{2963673,3869582,3869600,0.0354133333333333,0.0370604651162791},
-{2963674,3869822,3869732,0.271389473684211,0.234381818181818},
-{2963675,3869822,3869857,0.12065,0.140109677419355},
-{2963676,3871485,3871451,0.06518,-1},
-{2963677,3885441,3885398,0.3094,0.219836842105263},
-{2963678,3885015,3885398,0.335509090909091,0.141946153846154},
-{2963679,3885398,3886331,0.431373913043478,0.522189473684211},
-{2963680,3884208,3884186,-1,0.136753846153846},
-{2963681,3884186,3884106,-1,0.375013636363636},
-{2963682,3885398,3885369,0.148766666666667,0.232852173913043},
-{2963683,3885369,3885262,0.496018181818182,0.419707692307692},
-{2963684,3888042,3889952,0.410522448979592,0.359207142857143},
-{2963685,3889952,3890881,0.223224,0.199307142857143},
-{2963686,3890481,3891046,0.152142857142857,0.1553125},
-{2963687,3891046,3891569,0.137988235294118,0.140748},
-{2964597,3915382,3915544,0.0760363636363636,0.0643384615384615},
-{2964598,3915544,3915963,0.145042105263158,0.13779},
-{2964599,3910526,3911027,0.1391125,0.133548},
-{2964600,3911027,3911494,0.135991836734694,0.133272},
-{2964601,3911494,3911915,0.133089795918367,0.125411538461538},
-{2964602,3911915,3912397,0.137502127659574,0.124280769230769},
-{2964603,3912397,3912818,0.120474418604651,0.105722448979592},
-{2964604,3912818,3912887,0.0205756097560976,0.0196186046511628},
-{2964605,3912887,3913330,0.14115,0.131302325581395},
-{2964606,3913330,3913751,0.3087,0.150178378378378},
-{2964607,3913751,3914189,0.238773913043478,0.219672},
-{2964608,3914189,3914564,0.212492307692308,0.153466666666667},
-{2964609,3915963,3916346,0.169605882352941,0.155854054054054},
-{2964610,3915544,3915334,0.150161538461538,0.229658823529412},
-{2964611,3915334,3914808,0.238814634146341,0.315851612903226},
-{2964612,3914808,3913751,0.7064,-1},
-{2964613,3913751,3912553,0.398659459459459,0.590016},
-{2964614,3912553,3911598,0.249858823529412,0.260057142857143},
-{2964615,3916928,3917135,-1,0.0900521739130435},
-{2964616,3916698,3916928,-1,0.104269565217391},
-{2964617,3916432,3916698,-1,0.121273170731707},
-{2964618,3916182,3916432,-1,0.227575},
-{2964619,3916124,3916182,-1,0.0351642857142857},
-{2964620,3915963,3916124,-1,0.128},
-{2964621,3917167,3917921,0.289605405405405,0.267885},
-{2964622,3918821,3919209,0.135711627906977,0.135711627906977},
-{2964623,3919209,3919558,0.100630434782609,0.115725},
-{2964624,3919558,3919882,0.1008,0.105381818181818},
-{2964625,3919882,3919957,0.0254666666666667,0.0254666666666667},
-{2964626,3920353,3920482,0.0419268292682927,0.0464594594594595},
-{2964627,3920482,3920730,0.086246511627907,0.092715},
-{2964628,3920730,3921119,0.135135,0.12012},
-{2964635,3903434,3903606,0.0665387755102041,-1},
-{2964636,3903606,3903824,0.069084,-1},
-{2964637,3903824,3904121,0.0828823529411765,-1},
-{2964638,3904121,3904370,0.0794875,-1},
-{2964639,3904370,3904571,0.067716,-1},
-{2964640,3904787,3904571,-1,0.0726510638297872},
-{2964641,3904787,3905082,0.0956625,-1},
-{2964642,3905082,3905334,0.0994933333333334,-1},
-{2964643,3905334,3905668,0.129536842105263,-1},
-{2964644,3905668,3905902,0.0726705882352941,-1},
-{2964645,3905902,3906150,0.0712528301886792,-1},
-{2964646,3903853,3904508,-1,0.161911475409836},
-{2964647,3904508,3905129,-1,0.160337704918033},
-{2964648,3911598,3910629,0.265596,0.282548936170213},
-{2964649,3910629,3909567,0.366762162162162,0.330980487804878},
-{2964650,3906795,3907118,0.0799294117647059,0.0831918367346939},
-{2964651,3906500,3906795,0.0911217391304348,0.0931466666666667},
-{2964652,3906392,3906500,0.0343176470588235,0.0486166666666667},
-{2964653,3906245,3906392,0.0499125,0.0520826086956522},
-{2964654,3905999,3906245,0.078504,0.081775},
-{2964655,3905713,3905999,0.087325,0.0911217391304348},
-{2964656,3914564,3914884,0.1452,0.209733333333333},
-{2964657,3914884,3915189,0.13806,0.145326315789474},
-{2964658,3915189,3915499,0.131471428571429,0.131471428571429},
-{2964659,3915499,3915818,0.12555,0.12276},
-{2964660,3915818,3916145,0.122168181818182,0.11685652173913},
-{2964661,3916145,3916460,0.127660465116279,0.124759090909091},
-{2964662,3916460,3916806,0.12412,0.126940909090909},
-{2964663,3916806,3917112,0.113182978723404,0.113182978723404},
-{2964664,3917112,3917383,0.111078260869565,0.108714893617021},
-{2964665,3917383,3917706,0.14319512195122,0.14319512195122},
-{2964666,3920353,3919475,0.46824375,0.454054545454545},
-{2964667,3919475,3918623,0.323493333333333,0.309727659574468},
-{2964668,3918623,3918315,0.117506666666667,0.128970731707317},
-{2964669,3918315,3917706,0.326586206896552,0.3157},
-{2964670,3921539,3921715,0.0555947368421053,0.0586833333333333},
-{2964671,3921715,3921780,0.0301666666666667,0.0319411764705882},
-{2964672,3921950,3921982,0.0179189189189189,0.0184166666666667},
-{2964673,3921982,3922277,0.10143,0.109654054054054},
-{2964674,3922277,3922350,0.0232,0.0232},
-{2964675,3922350,3922736,0.129093333333333,0.135097674418605},
-{2964679,3921539,3921626,-1,-1},
-{2964680,3921780,3921626,0.109075862068966,0.1318},
-{2964681,3921626,3919787,0.783587234042553,0.783587234042553},
-{2964697,3906150,3906373,0.0714923076923077,-1},
-{2964698,3906373,3906601,0.0784352941176471,-1},
-{2964699,3906601,3906847,0.066612,-1},
-{2964700,3906847,3907130,0.075156,-1},
-{2964701,3908282,3909148,0.280861538461538,-1},
-{2964702,3909148,3909953,0.354232258064516,-1},
-{2964703,3917706,3918048,0.12188,0.130585714285714},
-{2964704,3918048,3918398,0.1120125,0.114395744680851},
-{2964705,3918398,3918702,0.113386956521739,0.1086625},
-{2964706,3918702,3919012,0.120995454545455,0.118306666666667},
-{2964707,3917706,3917016,0.349594285714286,0.421924137931035},
-{2964708,3917016,3916851,0.0540382978723404,0.0577227272727273},
-{2964709,3916851,3916594,0.102573333333333,0.107344186046512},
-{2964710,3919787,3919281,0.285829411764706,0.335110344827586},
-{2964744,3863473,3862644,0.294568421052632,0.329223529411765},
-{2964745,3863665,3863473,0.0803225806451613,0.0922222222222222},
-{2964746,3864767,3863665,0.408917647058824,0.408917647058824},
-{2964747,3865759,3864767,0.385412903225806,0.362054545454545},
-{2964748,3868378,3865759,0.868872727272727,0.796466666666667},
-{2964749,3869035,3868378,0.285504,0.285504},
-{2964750,3897834,3898088,0.0900818181818182,0.084331914893617},
-{2964751,3898088,3898363,0.164577777777778,0.1058},
-{2964752,3898363,3898412,0.0286444444444444,0.0209027027027027},
-{2964753,3898412,3898642,0.115023529411765,0.144844444444444},
-{2964754,3898642,3898046,-1,0.297276923076923},
-{2964755,3898412,3898020,0.26934375,-1},
-{2964756,3898020,3897522,0.157904347826087,-1},
-{2964757,3905425,3905713,0.116605714285714,0.1275375},
-{2964758,3904552,3905425,0.355661538461538,0.315245454545455},
-{2964759,3904483,3904552,0.0204352941176471,0.021269387755102},
-{2964760,3903646,3904483,0.281013333333333,0.468355555555556},
-{2964761,3902805,3903527,0.500269565217391,0.255693333333333},
-{2964762,3902578,3902805,0.0747066666666667,0.0686081632653061},
-{2964763,3901881,3902578,0.223548837209302,0.213613333333333},
-{2964764,3901750,3901881,0.0587368421052632,0.0676363636363636},
-{2964765,3901564,3901750,0.0772285714285714,0.142263157894737},
-{2964766,3911961,3912357,0.17,-1},
-{2964767,3912357,3912704,0.096521052631579,-1},
-{2964768,3915273,3914504,0.406890909090909,-1},
-{2964769,3914504,3914048,0.228107142857143,-1},
-{2964770,3913425,3912954,0.147528571428571,-1},
-{2964771,3912704,3913079,0.0778468085106383,-1},
-{2964772,3913079,3913396,0.08156,-1},
-{2964773,3913935,3914135,0.0381254237288136,-1},
-{2964774,3914135,3914521,0.0835789473684211,-1},
-{2964775,3914521,3914826,0.0786206896551724,-1},
-{2964776,3914826,3915101,0.0853309090909091,-1},
-{2964777,3922325,3921984,0.276469565217391,0.205122580645161},
-{2964793,3862207,3861176,0.362936842105263,0.353630769230769},
-{2964794,3862974,3862207,0.171905882352941,0.190591304347826},
-{2964795,3863053,3862974,0.023575,0.0263162790697674},
-{2964796,3863413,3863053,0.128261538461538,0.131636842105263},
-{2964797,3894477,3894476,0.0198620689655172,0.0198620689655172},
-{2964798,3901205,3901564,0.14191875,0.129754285714286},
-{2964799,3900869,3901205,0.108809302325581,0.108809302325581},
-{2964800,3899688,3899987,0.106389473684211,0.0986048780487805},
-{2964801,3899485,3899688,0.0632,0.0677142857142857},
-{2964802,3899153,3899485,0.113666666666667,0.1705},
-{2964803,3898862,3899153,0.117458823529412,0.1248},
-{2964804,3898349,3898862,0.221241176470588,0.183468292682927},
-{2964805,3897785,3898349,0.216085714285714,0.199026315789474},
-{2964806,3897327,3897785,0.279553846153846,0.173057142857143},
-{2964807,3901564,3902156,0.310737931034483,-1},
-{2964808,3902156,3902781,0.238384615384615,-1},
-{2964809,3902781,3902961,0.0562714285714286,-1},
-{2964810,3902961,3903373,0.134676,0.129496153846154},
-{2964811,3903373,3903895,0.183084,0.179494117647059},
-{2964812,3903895,3904439,0.154892307692308,0.161088},
-{2964813,3904439,3904699,0.0808981132075472,0.085752},
-{2964814,3904699,3904999,0.0889038461538461,0.0906470588235294},
-{2964815,3904999,3905226,0.0744346153846154,0.0758941176470588},
-{2964816,3905226,3905457,0.0765058823529412,0.0796285714285714},
-{2964817,3905457,3905737,0.0876734693877551,0.102285714285714},
-{2964818,3915330,3915569,0.0781245283018868,-1},
-{2964819,3915569,3915811,0.072622641509434,-1},
-{2964820,3915811,3916068,0.089796,-1},
-{2964821,3915727,3915635,0.04665,-1},
-{2964822,3915635,3915657,0.0402387096774194,-1},
-{2964870,3871648,3871485,0.43378125,-1},
-{2964871,3871642,3871648,0.0121894736842105,-1},
-{2964872,3871721,3871777,-1,0.0839692307692308},
-{2964873,3871946,3872283,-1,0.197454545454545},
-{2964874,3884106,3884039,-1,0.33858},
-{2964875,3884039,3884010,-1,0.308232},
-{2964876,3884010,3883975,-1,0.140604255319149},
-{2964877,3885262,3885203,0.33421875,0.305571428571429},
-{2964878,3885203,3885197,0.058245,0.0896076923076923},
-{2964879,3885197,3885167,0.140733333333333,0.191909090909091},
-{2964880,3885167,3885132,0.104910638297872,0.109573333333333},
-{2964881,3897571,3897737,0.10825,0.0984090909090909},
-{2964882,3905737,3906041,0.1098,0.0957829787234043},
-{2964883,3906041,3906276,0.0828367346938775,0.0845625},
-{2964884,3906276,3906508,0.0751411764705882,0.076644},
-{2964885,3906508,3906813,0.0882470588235294,0.0937625},
-{2964886,3906813,3907113,0.0869265306122449,0.0925956521739131},
-{2964887,3907113,3907407,0.0890297872340425,0.0890297872340425},
-{2964888,3907407,3907690,0.0842375,0.0898533333333333},
-{2964889,3907690,3908004,0.0862625,0.0920133333333333},
-{2964890,3908004,3908272,0.078330612244898,0.0872318181818182},
-{2964891,3908272,3908518,0.060134693877551,0.06548},
-{2964892,3908518,3908743,0.0621829787234043,0.0695857142857143},
-{2964928,3865450,3865032,0.0789,0.074433962264151},
-{2964929,3865763,3865450,0.0668375,0.0629058823529412},
-{2964930,3866024,3865763,0.0612,0.0598978723404255},
-{2964931,3867961,3866695,0.26975,0.275489361702128},
-{2964932,3868906,3867961,0.248538461538462,0.230785714285714},
-{2964933,3869027,3868906,0.0438,0.0498413793103448},
-{2964934,3869571,3869027,0.204464516129032,-1},
-{2964935,3869885,3869571,0.10902,-1},
-{2964936,3869027,3868853,0.204233333333333,0.2228},
-{2964937,3871197,3870893,0.0736,0.1104},
-{2964938,3871540,3871197,0.0680790697674419,0.0770368421052632},
-{2964939,3868853,3868749,0.13452,0.161424},
-{2964940,3869284,3868749,0.17564,0.154976470588235},
-{2964941,3869984,3869284,0.19085625,0.174497142857143},
-{2964942,3870511,3870243,0.08019375,0.0777636363636364},
-{2964943,3870243,3869984,0.184414285714286,0.178055172413793},
-{2964944,3871939,3872067,0.17046,-1},
-{2964945,3872067,3872101,0.0266526315789474,-1},
-{2964946,3872101,3872340,0.17157,-1},
-{2964947,3872340,3872662,0.151486363636364,-1},
-{2964948,3872662,3872877,0.0826565217391304,-1},
-{2964949,3872283,3872439,-1,0.11337},
-{2964950,3872439,3872574,-1,0.0939081081081081},
-{2964951,3872574,3872810,-1,0.137430769230769},
-{2964952,3872810,3873175,-1,0.248413043478261},
-{2964953,3873175,3873371,-1,0.107975510204082},
-{2964954,3872353,3871432,0.203914285714286,0.212591489361702},
-{2964955,3873677,3873302,0.859028571428572,0.870331578947369},
-{2964956,3883917,3883845,-1,0.371895},
-{2964957,3883242,3883058,0.11045625,0.088365},
-{2964958,3885073,3885014,0.238409302325581,0.27707027027027},
-{2964959,3885014,3884984,0.100268181818182,0.1026},
-{2964960,3884984,3884920,0.139118918918919,0.131984615384615},
-{2964961,3884920,3884783,0.139333333333333,0.139333333333333},
-{2964962,3884783,3884569,0.150168,0.11731875},
-{2964963,3884569,3884026,0.302209756097561,0.427262068965517},
-{2964964,3884763,3884569,0.134505882352941,0.0994173913043478},
-{2964965,3884958,3884763,0.093225,0.0639257142857143},
-{2964966,3885164,3884958,0.0694216216216216,0.0658615384615385},
-{2964967,3885269,3885164,0.03177,0.0302571428571429},
-{2964968,3885450,3885269,0.0609285714285714,0.0609285714285714},
-{2964969,3885604,3885759,0.0637285714285714,0.05948},
-{2964970,3885759,3885878,0.0408230769230769,0.044225},
-{2964971,3885878,3886509,0.189989189189189,0.260355555555556},
-{2964972,3886509,3887079,0.150652173913043,0.154},
-{2964973,3887079,3887752,0.137387755102041,0.14025},
-{2964974,3887752,3888445,0.132804,0.135514285714286},
-{2964975,3888445,3889133,0.1266,0.131564705882353},
-{2964976,3889133,3889758,0.133,0.133},
-{2964977,3889758,3890321,0.129311538461538,0.137228571428571},
-{2964978,3890321,3890909,0.137877551020408,0.146869565217391},
-{2964979,3890909,3891467,0.175926315789474,0.163053658536585},
-{2964980,3891467,3891985,0.151060465116279,0.144346666666667},
-{2964981,3891985,3892240,0.0881230769230769,0.0781090909090909},
-{2964982,3892240,3892751,0.153765,0.157707692307692},
-{2964983,3892751,3893178,0.233910638297872,0.233910638297872},
-{2964984,3893178,3893320,0.0864679245283019,0.0864679245283019},
-{2964985,3893320,3893445,0.0766301886792453,0.0796352941176471},
-{2964986,3893445,3893513,0.038748,0.0440318181818182},
-{2964987,3900113,3900325,0.0805636363636364,0.08308125},
-{2965004,3882119,3881688,0.227885106382979,0.194738181818182},
-{2965005,3881688,3881441,0.133297297297297,0.10065306122449},
-{2965006,3884726,3884940,0.0804833333333333,0.0689857142857143},
-{2965007,3884940,3885900,0.369272727272727,0.259276595744681},
-{2965008,3885900,3886043,0.0645461538461538,0.067128},
-{2965009,3886043,3886321,0.0899142857142857,0.198757894736842},
-{2965010,3886321,3886973,0.194796226415094,0.219663829787234},
-{2965011,3886973,3888093,0.274449056603774,0.269366666666667},
-{2965012,3885450,3885553,0.0438789473684211,0.0406682926829268},
-{2965013,3886275,3886428,0.0554651162790698,0.059625},
-{2965014,3886428,3886472,0.0200863636363636,0.0210428571428571},
-{2965015,3886472,3886593,0.0392571428571429,0.040075},
-{2965016,3887136,3887818,0.198346153846154,0.194603773584906},
-{2965017,3887818,3888205,0.113065384615385,0.117588},
-{2965018,3888205,3888480,0.0798339622641509,0.0813692307692308},
-{2965019,3893513,3893683,0.102554716981132,0.104526923076923},
-{2965020,3893683,3893837,0.0994666666666667,0.0976581818181818},
-{2965021,3893837,3894032,0.105174545454545,0.105174545454545},
-{2965022,3894335,3894712,0.15145,0.132980487804878},
-{2965023,3894712,3895010,0.0905045454545454,0.0884933333333333},
-{2965024,3895010,3895100,0.0356780487804878,0.0340186046511628},
-{2965025,3895100,3895688,0.469276595744681,0.424153846153846},
-{2965067,3864594,3864309,0.0902448979591837,0.08844},
-{2965068,3864828,3864594,0.084275,0.0793176470588235},
-{2965069,3865062,3864828,0.0903702127659575,0.084948},
-{2965070,3865303,3865062,0.0888,0.0800941176470588},
-{2965071,3865622,3865303,0.243042857142857,0.261738461538462},
-{2965072,3871432,3869969,0.30768,0.295846153846154},
-{2965073,3869969,3869055,0.179175,0.172008},
-{2965074,3869055,3868526,0.107124,0.105023529411765},
-{2965075,3868526,3865831,0.726983333333333,0.513164705882353},
-{2965076,3865622,3865017,0.154153846153846,0.146634146341463},
-{2965077,3881441,3881198,0.124015384615385,0.13435},
-{2965078,3881198,3880881,0.135941176470588,0.141489795918367},
-{2965079,3880076,3879599,0.25545,0.278672727272727},
-{2965080,3879599,3879475,0.0895894736842105,0.0945666666666667},
-{2965081,3879475,3879321,0.0951954545454545,0.182113043478261},
-{2965082,3879321,3879198,0.084384,0.120548571428571},
-{2965083,3879198,3879131,0.048648,0.0552818181818182},
-{2965084,3879131,3879052,0.035688,0.0379659574468085},
-{2965085,3881659,3881753,0.0427555555555556,0.0501913043478261},
-{2965086,3881753,3881874,0.073858064516129,0.0995478260869565},
-{2965087,3881874,3881909,0.0160764705882353,0.0160764705882353},
-{2965088,3881909,3882078,0.0720439024390244,0.073845},
-{2965089,3882078,3882278,0.0760772727272727,0.0743866666666667},
-{2965090,3882278,3882691,0.140042553191489,0.137125},
-{2965091,3882691,3883173,0.138502040816327,0.138502040816327},
-{2965092,3883173,3883468,0.0950375,0.0930979591836735},
-{2965093,3883468,3883984,0.237825,0.205686486486487},
-{2965094,3883984,3884675,0.2494,0.347378571428571},
-{2965095,3884675,3885024,0.115768421052632,0.157114285714286},
-{2965096,3885024,3885959,0.300628571428571,0.300628571428571},
-{2965097,3888480,3889378,0.2578625,0.229211111111111},
-{2965098,3889378,3890675,0.332472,0.325952941176471},
-{2965099,3890675,3890906,0.057732,0.0524836363636364},
-{2965100,3890906,3891392,0.145742307692308,0.140344444444444},
-{2965101,3891392,3891627,0.0779333333333333,0.0779333333333333},
-{2965102,3891627,3892103,0.161258181818182,0.164244444444444},
-{2965103,3892103,3892340,0.0788072727272727,0.0817811320754717},
-{2965104,3892340,3892532,0.0667132075471698,0.070716},
-{2965105,3888093,3888674,0.173742857142857,0.140330769230769},
-{2965106,3888674,3888870,0.0494037735849057,0.0503538461538462},
-{2965107,3888870,3889207,0.094725,0.0967404255319149},
-{2965108,3889207,3889301,0.0331894736842105,0.0331894736842105},
-{2965109,3889301,3889356,0.0511272727272727,0.0511272727272727},
-{2965110,3889356,3889086,0.135870967741935,0.145241379310345},
-{2965111,3895688,3896556,0.644044897959184,0.606888461538462},
-{2965112,3914574,3915020,0.133455555555556,0.133455555555556},
-{2965113,3913440,3914082,0.124657627118644,0.124657627118644},
-{2965114,3912334,3912596,0.0670142857142857,0.0574408163265306},
-{2965115,3910535,3912334,0.364171875,0.369952380952381},
-{2965164,3865039,3864838,0.122256,-1},
-{2965165,3865039,3864644,0.378381818181818,-1},
-{2965166,3864838,3864644,0.0492452830188679,0.054375},
-{2965167,3864400,3861633,0.640134375,0.640134375},
-{2965168,3879052,3878921,0.08244,0.085875},
-{2965169,3878921,3878821,0.085575,0.0838285714285714},
-{2965170,3878732,3878683,0.037175,0.037175},
-{2965171,3878683,3878208,0.410386956521739,0.401655319148936},
-{2965172,3885959,3886489,0.164784,0.17165},
-{2965173,3886489,3886634,0.043908,0.0422192307692308},
-{2965174,3887173,3887446,0.08238,0.0777169811320755},
-{2965175,3887446,3887849,0.0925176470588235,0.0890264150943396},
-{2965176,3888384,3888863,0.139695652173913,0.139695652173913},
-{2965177,3888863,3889113,0.0757,0.0757},
-{2965178,3889113,3889624,0.261703448275862,0.210816666666667},
-{2965179,3889086,3889605,0.24004,0.234821739130435},
-{2965180,3889605,3889658,0.0141777777777778,0.0136714285714286},
-{2965181,3889658,3890083,0.165064285714286,0.162168421052632},
-{2965182,3890083,3890525,0.170978181818182,0.167925},
-{2965183,3890525,3890758,0.0803142857142857,0.0789052631578947},
-{2965184,3890758,3890942,0.07215,0.0708842105263158},
-{2965185,3890942,3890998,0.0186109090909091,0.0179578947368421},
-{2965186,3890998,3891194,0.0809444444444444,0.0766842105263158},
-{2965187,3891194,3891477,0.111505882352941,0.109361538461538},
-{2965188,3889886,3889624,0.08874375,0.101421428571429},
-{2965189,3892532,3892663,0.061176,0.0624244897959184},
-{2965190,3892663,3892712,0.0684375,0.0698936170212766},
-{2965191,3892712,3893418,0.295176,0.307475},
-{2965192,3893418,3893435,0.0857347826086957,0.0857347826086957},
-{2965193,3893435,3893399,0.119294117647059,0.119294117647059},
-{2965194,3893399,3893373,0.115905882352941,0.115905882352941},
-{2965195,3893373,3893368,0.111324,0.118429787234043},
-{2965196,3896682,3896897,0.2052,0.197307692307692},
-{2965197,3896897,3897055,0.142811538461538,0.137522222222222},
-{2965198,3897103,3897225,0.111380769230769,0.109279245283019},
-{2965199,3897225,3897738,0.266919230769231,0.257033333333333},
-{2965200,3901926,3902423,0.465376744186046,0.4169},
-{2965201,3902423,3902809,0.143958620689655,-1},
-{2965202,3902809,3903062,0.0787945945945946,-1},
-{2965203,3903062,3903202,0.04668,-1},
-{2965204,3903202,3903293,0.024315,-1},
-{2965205,3903293,3903615,0.120783333333333,-1},
-{2965206,3903615,3903881,0.121090909090909,-1},
-{2965207,3903881,3903989,0.0362166666666667,0.0501461538461538},
-{2965208,3904420,3904495,0.040488,0.06748},
-{2965209,3904495,3905172,-1,0.307896},
-{2965210,3904495,3905653,0.491224390243902,-1},
-{2965211,3905172,3905477,-1,0.14895},
-{2965212,3905477,3906126,-1,0.265068292682927},
-{2965213,3905653,3906126,0.160446153846154,-1},
-{2965214,3906126,3906643,0.118369811320755,0.142581818181818},
-{2965215,3906643,3907156,0.0898736842105263,0.08538},
-{2965216,3907156,3907404,0.04464,0.04185},
-{2965217,3907404,3909029,0.289303125,0.276349253731343},
-{2965218,3902423,3902932,0.453916981132075,0.511863829787234},
-{2965221,3871845,3871415,0.0859157894736842,0.0859157894736842},
-{2965222,3871415,3871275,0.0284210526315789,0.0284210526315789},
-{2965223,3871275,3870881,0.0809578947368421,0.0809578947368421},
-{2965224,3870881,3870723,0.032925,0.032925},
-{2965225,3870723,3870145,0.114235714285714,0.116312727272727},
-{2965227,3890795,3891236,0.79032,0.79032},
-{2965228,3891236,3891342,0.16604347826087,0.16604347826087},
-{2965229,3891342,3891637,0.340930434782609,0.340930434782609},
-{2965230,3891477,3891835,0.27685,0.246088888888889},
-{2965231,3891835,3891966,0.0688444444444445,0.0640965517241379},
-{2965232,3891966,3892196,0.124677777777778,0.118115789473684},
-{2965233,3891637,3892256,0.82752,0.82752},
-{2965234,3892256,3892588,0.41694,0.41694},
-{2965235,3892588,3893025,0.45795,0.45795},
-{2965236,3892196,3892886,0.300938181818182,0.295564285714286},
-{2965237,3892886,3893104,0.0913309090909091,0.094777358490566},
-{2965238,3893104,3893209,0.0652222222222222,0.0677307692307692},
-{2965239,3893209,3893520,0.168396226415094,0.1785},
-{2965240,3893025,3893429,0.58926,0.58926},
-{2965241,3893429,3893703,0.4215,0.4215},
-{2965242,3893703,3894228,0.76755,0.76755},
-{2965243,3894914,3895361,0.43168,0.4047},
-{2965244,3893520,3893914,0.218211111111111,0.222328301886792},
-{2965245,3893914,3894207,0.161838461538462,0.168312},
-{2965246,3894207,3894578,0.201673469387755,0.224590909090909},
-{2965247,3894578,3894785,0.108894117647059,0.126218181818182},
-{2965248,3894785,3895234,0.237522222222222,0.278830434782609},
-{2965249,3893368,3893639,0.153941176470588,0.167042553191489},
-{2965250,3893639,3893781,0.050988,0.0520285714285714},
-{2965251,3893781,3894096,0.228931914893617,0.233908695652174},
-{2965252,3894096,3894095,0.018153488372093,0.0173466666666667},
-{2965253,3894095,3894164,0.0944933333333333,0.0924391304347826},
-{2965254,3894164,3894188,0.0117574468085106,0.0117574468085106},
-{2965255,3894188,3894634,0.17056,0.163302127659574},
-{2965256,3894634,3895545,0.3909,0.382213333333333},
-{2965257,3895545,3895803,0.123510638297872,0.126195652173913},
-{2965258,3895803,3896056,0.1343875,0.131644897959184},
-{2965259,3896056,3896108,0.037725,0.0385276595744681},
-{2965260,3896108,3896187,0.0465,0.0465},
-{2965261,3896187,3896262,0.0475787234042553,0.0456367346938776},
-{2965262,3896262,3896486,0.145148936170213,0.142125},
-{2965263,3896486,3896554,0.0391276595744681,0.0383125},
-{2965264,3896554,3896859,0.206266666666667,0.206266666666667},
-{2965265,3896859,3896971,0.0348461538461538,0.0308863636363636},
-{2965266,3896971,3897296,0.0930136363636364,0.0951767441860465},
-{2965267,3897296,3897450,0.050093023255814,0.0478666666666667},
-{2965268,3897450,3897526,0.0278454545454545,0.0272266666666667},
-{2965269,3897526,3898208,0.217787234042553,0.232636363636364},
-{2965270,3898208,3898499,0.091575,0.107209756097561},
-{2965271,3898499,3898770,0.0922173913043478,0.108769230769231},
-{2965272,3897738,3898091,0.130705882352941,0.1212},
-{2965273,3899466,3899433,0.1224,0.111471428571429},
-{2965274,3899433,3899346,0.100338461538462,0.100338461538462},
-{2965275,3899346,3899220,0.0853173913043478,0.0835021276595745},
-{2965276,3898726,3898420,0.154069565217391,0.161072727272727},
-{2965277,3898420,3898159,0.107129411764706,0.111502040816327},
-{2965278,3898159,3897830,0.1454,0.159585365853659},
-{2965279,3897830,3897633,0.134136,0.1458},
-{2965280,3897633,3897623,0.0163714285714286,0.0163714285714286},
-{2965281,3895361,3895437,0.06054,0.0526434782608696},
-{2965282,3895437,3896448,0.679142857142857,0.648272727272727},
-{2965283,3896448,3896812,0.237782608695652,0.287842105263158},
-{2965284,3896812,3897633,0.542314285714286,0.56943},
-{2965285,3902445,3902514,0.0725560975609756,0.0929625},
-{2965286,3902932,3903353,0.507177272727273,0.474804255319149},
-{2965287,3903411,3903655,0.346897674418605,0.339013636363636},
-{2965288,3903655,3904145,0.1695,0.200888888888889},
-{2965289,3904145,3904323,0.0534409090909091,0.0534409090909091},
-{2965290,3904323,3905060,0.186661224489796,0.19055},
-{2965291,3905060,3905616,0.129657692307692,0.1404625},
-{2965292,3905616,3906093,0.0998603773584906,0.105852},
-{2965293,3906093,3906302,0.0460117647058824,0.0488875},
-{2965294,3906302,3906498,0.0474117647058823,0.050375},
-{2965295,3906498,3906840,0.0753063829787234,0.0786533333333333},
-{2965296,3910530,3908638,0.266620588235294,0.283284375},
-{2965297,3907998,3908638,0.107956363636364,0.104168421052632},
-{2965298,3907998,3907884,0.0187615384615385,0.0199102040816327},
-{2965299,3907884,3907488,0.0850434782608696,0.0850434782608696},
-{2965347,3902521,3902358,0.0806926829268293,0.0945257142857143},
-{2965348,3903234,3903278,0.0592933333333333,0.0635285714285714},
-{2965355,3904587,3904899,0.116477777777778,0.120957692307692},
-{2965362,3885046,3884867,-1,0.141417391304348},
-{2965363,3885258,3885046,-1,0.106490322580645},
-{2965364,3880032,3879959,-1,0.0321333333333333},
-{2965365,3880075,3880001,0.0335314285714286,-1},
-{2965366,3880545,3880441,-1,0.0855},
-{2965367,3875848,3875948,-1,-1},
-{2965368,3875748,3875848,0.215284615384615,0.233225},
-{2965369,3875622,3875748,0.206022222222222,0.163605882352941},
-{2965370,3875334,3875387,0.0290666666666667,0.0327},
-{2965371,3875266,3875324,0.0536142857142857,0.0536142857142857},
-{2965372,3875622,3876048,0.270066666666667,-1},
-{2965373,3876048,3876876,0.408763636363636,-1},
-{2965374,3876876,3877488,0.281345454545455,-1},
-{2965375,3876026,3876048,0.358344,-1},
-{2965376,3875121,3875448,-1,0.225966666666667},
-{2965377,3875229,3875552,0.220933333333333,-1},
-{2965378,3876515,3877240,-1,0.37992},
-{2965379,3877240,3877739,0.204991304347826,-1},
-{2965380,3877739,3878213,0.2298,-1},
-{2965381,3878526,3879123,0.308863636363636,-1},
-{2965382,3877964,3878526,0.265669565217391,-1},
-{2965383,3877654,3877964,0.1283,0.133878260869565},
-{2965384,3878237,3878714,-1,0.253336363636364},
-{2965385,3875506,3875601,0.0904,-1},
-{2965386,3875886,3875858,0.0408,-1},
-{2965387,3875858,3875740,0.176373913043478,-1},
-{2965388,3875858,3875506,0.185337931034483,-1},
-{2965389,3875601,3875687,0.105636363636364,-1},
-{2965390,3876671,3877425,-1,-1},
-{2965391,3875886,3876671,-1,-1},
-{2965392,3873025,3872930,0.105626086956522,-1},
-{2965393,3873179,3873025,0.090625,-1},
-{2965394,3873179,3873408,0.0759,0.1012},
-{2965395,3873408,3873430,0.00727058823529412,0.00915555555555556},
-{2965396,3872848,3872878,0.146192727272727,0.191442857142857},
-{2965397,3872834,3872911,0.272109090909091,0.390417391304348},
-{2965398,3875481,3875623,0.212008695652174,0.125030769230769},
-{2965399,3875623,3875332,0.296222222222222,0.275793103448276},
-{2965400,3875601,3875539,0.0405483870967742,-1},
-{2965401,3875169,3875313,0.0844227272727273,0.0714346153846154},
-{2965402,3875138,3875010,0.0523241379310345,-1},
-{2965403,3876264,3877244,0.286849180327869,0.29163},
-{2965404,3876494,3876311,-1,0.212904},
-{2965405,3876845,3876692,-1,0.123857142857143},
-{2965406,3877129,3876845,-1,0.351672},
-{2965407,3879726,3879634,0.06105,0.06105},
-{2965408,3879675,3879053,-1,0.245533333333333},
-{2965409,3878408,3878334,-1,0.0709142857142857},
-{2965410,3878635,3878243,0.202252173913043,-1},
-{2965411,3878243,3877697,0.26253,-1},
-{2965412,3877697,3877623,0.0895,-1},
-{2965413,3877697,3877644,0.203466666666667,-1},
-{2965414,3877371,3877644,-1,-1},
-{2965415,3877644,3877434,0.4006,-1},
-{2965416,3877434,3877266,0.49388,-1},
-{2965417,3877092,3877434,0.19992,-1},
-{2965418,3876771,3877092,0.205136842105263,-1},
-{2965419,3877434,3877920,0.21284347826087,-1},
-{2965420,3877920,3878155,0.0912692307692308,-1},
-{2965421,3878155,3878553,0.217390909090909,-1},
-{2965422,3878553,3878967,0.200544,-1},
-{2965423,3878967,3879520,0.230423076923077,-1},
-{2965424,3879520,3879549,0.263863636363636,0.252391304347826},
-{2965425,3879549,3878916,0.5153,0.403278260869565},
-{2965426,3883658,3884107,-1,0.135114893617021},
-{2965427,3882431,3882920,0.274514285714286,0.3603},
-{2965428,3882920,3883732,-1,0.557925},
-{2965429,3882920,3883457,0.287945454545455,0.287945454545455},
-{2965430,3883457,3883543,0.1116,-1},
-{2965431,3883543,3884198,0.375027272727273,-1},
-{2965432,3884597,3884540,-1,0.030048},
-{2965433,3882646,3882920,-1,0.1849},
-{2965434,3882417,3882646,-1,0.1263},
-{2965435,3882157,3882417,-1,0.253142857142857},
-{2965436,3883383,3883457,0.110433333333333,-1},
-{2965437,3881702,3882157,-1,0.4230375},
-{2965438,3883345,3884244,-1,0.456346153846154},
-{2965439,3881281,3881527,-1,0.45009},
-{2965440,3881527,3881738,-1,-1},
-{2965441,3881738,3881845,-1,0.21459},
-{2965442,3881845,3882157,-1,0.329025},
-{2965443,3882464,3882564,0.163757142857143,-1},
-{2965444,3882217,3882464,-1,-1},
-{2965445,3881990,3882217,-1,-1},
-{2965446,3880897,3881292,0.2832,0.3186},
-{2965447,3881292,3881738,-1,0.254685714285714},
-{2965448,3881738,3882464,0.505547368421053,-1},
-{2965449,3883717,3884739,0.667581818181818,-1},
-{2965450,3884002,3884198,0.19116,0.2124},
-{2965451,3883383,3884002,-1,0.52004},
-{2965452,3879080,3879387,-1,-1},
-{2965453,3879755,3879813,-1,-1},
-{2965454,3879813,3879914,-1,-1},
-{2965455,3879914,3880031,-1,-1},
-{2965456,3879640,3879747,0.107123076923077,0.11605},
-{2965457,3879482,3879640,0.26228,-1},
-{2965458,3879356,3879482,0.201692307692308,-1},
-{2965459,3880307,3880366,-1,0.0822333333333333},
-{2965460,3879080,3879640,0.2526,0.2526},
-{2965461,3879640,3880010,0.571136842105263,-1},
-{2965462,3880010,3880265,-1,0.40776},
-{2965463,3880265,3880307,-1,0.0759666666666667},
-{2965464,3879755,3880010,0.211133333333333,0.211133333333333},
-{2965465,3880010,3880263,0.331928571428571,-1},
-{2965466,3880263,3880520,-1,-1},
-{2965467,3880520,3880529,-1,0.110228571428571},
-{2965468,3879276,3878799,-1,0.4965375},
-{2965469,3879524,3879813,0.162911111111111,0.162911111111111},
-{2965470,3877881,3877766,-1,0.12333},
-{2965471,3877881,3878042,0.139542857142857,-1},
-{2965472,3879093,3879387,0.1544,0.1544},
-{2965473,3878698,3879080,0.1886,0.1886},
-{2965474,3878698,3879093,-1,0.2773},
-{2965475,3880923,3881075,0.316623529411765,-1},
-{2965476,3878276,3878339,-1,0.123529411764706},
-{2965477,3878247,3878276,-1,0.0578210526315789},
-{2965478,3877740,3878247,-1,0.291366666666667},
-{2965479,3876845,3877284,0.188511111111111,0.188511111111111},
-{2965480,3877372,3877678,-1,-1},
-{2965481,3877129,3877372,-1,-1},
-{2965482,3875958,3876422,-1,0.207216},
-{2965483,3875448,3875958,-1,0.292042105263158},
-{2965484,3880500,3880451,-1,0.0402260869565217},
-{2965485,3880735,3880500,-1,0.209045454545455},
-{2965486,3880948,3880735,-1,0.161086956521739},
-{2965487,3881226,3880994,-1,0.185427272727273},
-{2965488,3881409,3881226,-1,0.153},
-{2965489,3881490,3881409,-1,0.0921529411764706},
-{2965490,3881900,3881490,-1,0.646254545454546},
-{2965491,3880965,3880728,0.4062,-1},
-{2965492,3881260,3880965,0.272873684210526,-1},
-{2965493,3882201,3881260,0.792685714285714,-1},
-{2965494,3882598,3882201,0.34368,-1},
-{2965495,3881381,3880818,0.516766666666667,-1},
-{2965496,3880818,3880889,0.0466421052631579,-1},
-{2965497,3880889,3880637,0.391145454545455,-1},
-{2965498,3882749,3883348,0.279025,-1},
-{2965499,3883672,3883866,0.20135,-1},
-{2965500,3882394,3882749,0.191607692307692,-1},
-{2965501,3883348,3882737,-1,0.647431578947368},
-{2965502,3884918,3884097,-1,0.633628571428571},
-{2965503,3881644,3882082,0.399327272727273,-1},
-{2965504,3880863,3881237,0.368084210526316,-1},
-{2965505,3881237,3881359,0.137964705882353,-1},
-{2965506,3881359,3881644,0.254336842105263,-1},
-{2965507,3883510,3883329,0.331090909090909,-1},
-{2965508,3883329,3882710,0.595742857142857,-1},
-{2965509,3882710,3882349,0.3622,-1},
-{2965510,3882349,3882082,0.30162,-1},
-{2965511,3882082,3881498,0.541942857142857,-1},
-{2965512,3881971,3882164,-1,0.558247058823529},
-{2965513,3882164,3882332,-1,0.430171428571429},
-{2965514,3883205,3883266,0.0577363636363636,-1},
-{2965515,3883266,3883678,0.25301052631579,-1},
-{2965516,3883634,3883678,-1,0.07731},
-{2965517,3883266,3883420,0.265628571428571,-1},
-{2965518,3883420,3883607,0.338542857142857,-1},
-{2965519,3882332,3883061,0.465733333333333,-1},
-{2965520,3883061,3883760,0.336182608695652,-1},
-{2965521,3883760,3884017,0.1304,-1},
-{2965522,3884017,3884714,0.359657142857143,-1},
-{2965523,3883458,3883564,-1,0.31992},
-{2965524,3883061,3883341,0.705378947368421,-1},
-{2965525,3882889,3883061,0.363927272727273,-1},
-{2965526,3882642,3882889,0.465575,-1},
-{2965527,3883607,3884121,0.251045454545455,-1},
-{2965528,3885488,3885542,0.023424,0.0325333333333333},
-{2965529,3884121,3884759,0.283176,-1},
-{2965530,3884935,3884759,-1,0.1219875},
-{2965531,3884950,3884935,0.1704,0.1704},
-{2965532,3884714,3884950,0.148233333333333,-1},
-{2965533,3883607,3883760,0.280114285714286,-1},
-{2965534,3885038,3885501,0.377953846153846,-1},
-{2965535,3885038,3885487,0.3226125,-1},
-{2965536,3884759,3884714,-1,0.153},
-{2965537,3884714,3884472,0.785660869565217,-1},
-{2965538,3884493,3884402,0.31225,-1},
-{2965539,3883564,3883498,-1,0.580989473684211},
-{2965540,3884402,3884362,0.13728,-1},
-{2965541,3884362,3884244,0.51116,-1},
-{2965542,3884362,3885187,0.5462625,-1},
-{2965543,3875462,3875479,0.00915555555555556,0.00915555555555556},
-{2965544,3875479,3875902,0.197822222222222,0.197822222222222},
-{2965545,3876398,3876537,0.0492193548387097,0.0586846153846154},
-{2965546,3876216,3876055,0.1154625,-1},
-{2965547,3877085,3877045,-1,-1},
-{2965548,3876973,3877085,-1,-1},
-{2965549,3876947,3876973,-1,-1},
-{2965550,3876734,3876947,-1,-1},
-{2965551,3877009,3876947,-1,-1},
-{2965552,3877165,3877136,-1,-1},
-{2965553,3876463,3877165,-1,-1},
-{2965554,3877085,3877203,-1,-1},
-{2965555,3877203,3877273,-1,-1},
-{2965556,3878122,3878237,0.0615789473684211,0.045},
-{2965557,3877645,3878122,-1,0.19164},
-{2965558,3877367,3877645,-1,0.118971428571429},
-{2965559,3879323,3879524,-1,0.2965},
-{2965560,3879093,3879323,-1,0.173018181818182},
-{2965561,3878233,3878698,-1,0.40458},
-{2965562,3880889,3881384,0.33325,0.33325},
-{2965563,3880615,3880818,0.17292,-1},
-{2965564,3880615,3880397,-1,0.2725125},
-{2965565,3880394,3880615,0.192872727272727,-1},
-{2965566,3879946,3880394,0.384927272727273,-1},
-{2965567,3879034,3879946,0.699063157894737,-1},
-{2965568,3882120,3882057,0.0962571428571429,0.16845},
-{2965569,3882686,3883458,-1,0.438126315789474},
-{2965570,3883345,3883717,0.413566666666667,-1},
-{2965571,3878665,3878214,0.35092,-1},
-{2965572,3875293,3875746,0.307828571428571,-1},
-{2965573,3874175,3874123,0.1776,-1},
-{2965574,3874123,3874035,0.44928,-1},
-{2965575,3872729,3872864,0.0790434782608696,-1},
-{2965576,3872864,3873046,0.0807777777777778,-1},
-{2965577,3873046,3873475,0.490745454545454,-1},
-{2965578,3871955,3871539,0.154248648648649,0.135885714285714},
-{2965579,3873412,3871955,0.85311,-1},
-{2965580,3874585,3873412,-1,0.532823076923077},
-{2965581,3874858,3874585,-1,0.0896909090909091},
-{2965582,3876052,3875774,-1,0.142878260869565},
-{2965583,3876473,3876052,0.238142857142857,0.238142857142857},
-{2965584,3876742,3876473,0.3166,0.55405},
-{2965585,3876865,3876473,0.4971,0.437448},
-{2965586,3876837,3876865,0.362446153846154,0.349022222222222},
-{2965587,3878105,3876837,-1,0.7092},
-{2965588,3876934,3876837,0.176290909090909,0.133737931034483},
-{2965589,3877054,3876934,0.2053,0.236884615384615},
-{2965590,3876934,3876267,0.409434782608696,0.448428571428571},
-{2965591,3876267,3876069,0.563377777777778,0.6338},
-{2965592,3876069,3875347,0.352688888888889,0.396775},
-{2965593,3875347,3875122,0.13545,0.1548},
-{2965594,3875122,3874738,0.36705,0.354393103448276},
-{2965595,3874738,3873808,0.400125,0.413032258064516},
-{2965596,3874787,3874060,0.342144827586207,0.320070967741936},
-{2965597,3874060,3873415,0.30766875,0.30766875},
-{2965598,3873415,3872921,0.196725,0.179862857142857},
-{2965599,3872317,3871944,0.149785714285714,0.1398},
-{2965600,3871944,3870393,0.654511111111111,0.58906},
-{2965601,3872938,3871775,0.34514,0.32356875},
-{2965602,3871955,3871563,0.266364705882353,0.22641},
-{2965603,3871563,3870419,0.4185,0.369264705882353},
-{2965604,3870419,3869865,0.215978571428571,0.183254545454545},
-{2965605,3869421,3869795,-1,0.351410526315789},
-{2965606,3869865,3869795,0.0303,0.0225085714285714},
-{2965607,3869783,3870393,0.201774193548387,0.223392857142857},
-{2965608,3869280,3868907,0.38825,0.345111111111111},
-{2965609,3872246,3872912,0.277605882352941,0.286018181818182},
-{2965610,3871812,3872246,-1,0.271288235294118},
-{2965611,3872493,3872085,0.4434,-1},
-{2965612,3872493,3871973,0.292042105263158,0.264228571428571},
-{2965613,3871973,3871395,0.292366666666667,0.2506},
-{2965614,3871395,3870878,0.203688,0.195853846153846},
-{2965615,3870878,3870271,0.335533333333333,0.274527272727273},
-{2965616,3870271,3869475,0.291744,0.291744},
-{2965617,3869475,3869066,0.157755555555556,0.170376},
-{2965618,3870978,3870271,0.583408695652174,-1},
-{2965619,3870271,3869873,0.261022222222222,-1},
-{2965620,3869873,3869716,0.148771428571429,-1},
-{2965621,3870315,3869475,-1,0.554355555555556},
-{2965622,3869475,3869190,-1,0.257269565217391},
-{2965623,3869190,3868994,-1,0.170352},
-{2965624,3869052,3868939,-1,0.24603},
-{2965625,3872125,3871765,0.117755555555556,-1},
-{2965626,3871765,3871216,0.210168,-1},
-{2965627,3871459,3871216,-1,0.4022625},
-{2965628,3871973,3871538,-1,0.474142857142857},
-{2965629,3872388,3872222,0.1014375,0.0737727272727273},
-{2965630,3874015,3873889,0.3231,-1},
-{2965631,3874345,3873889,0.225816,-1},
-{2965632,3874774,3874345,0.2099,-1},
-{2965633,3875257,3874774,0.275918181818182,-1},
-{2965634,3875816,3875974,0.0950285714285714,0.0950285714285714},
-{2965635,3875312,3875816,0.273685714285714,0.302494736842105},
-{2965636,3870994,3871007,-1,0.020125},
-{2965637,3870994,3870831,0.0699692307692308,0.072768},
-{2965638,3870801,3869976,0.290490909090909,0.29956875},
-{2965639,3869976,3869376,0.233167741935484,0.24094},
-{2965640,3869840,3870196,0.112556756756757,0.1262},
-{2965641,3869840,3869483,0.151536,0.145707692307692},
-{2965642,3868735,3869483,0.274072727272727,0.347861538461538},
-{2965643,3868418,3868735,0.313269230769231,0.370227272727273},
-{2965644,3868321,3868418,0.3201,0.3201},
-{2965645,3868373,3868321,0.125688888888889,0.1616},
-{2965646,3868761,3868373,0.257791304347826,-1},
-{2965647,3868411,3868761,0.275571428571429,0.304578947368421},
-{2965648,3869447,3869376,-1,0.103314285714286},
-{2965649,3869360,3869447,-1,0.0947142857142857},
-{2965650,3869800,3869360,-1,0.283885714285714},
-{2965651,3868761,3870019,0.61275,-1},
-{2965652,3870019,3870896,0.4064,-1},
-{2965653,3870896,3871321,0.256838709677419,0.256838709677419},
-{2965654,3871437,3871130,0.194210526315789,0.1845},
-{2965655,3871130,3870801,0.26,0.203478260869565},
-{2965656,3871725,3871235,0.2649,0.222174193548387},
-{2965657,3874161,3874171,0.0103116279069767,0.0105571428571429},
-{2965658,3871916,3872154,0.224142857142857,-1},
-{2965659,3871277,3871552,-1,0.261507692307692},
-{2965660,3870508,3870883,-1,0.1176},
-{2965661,3870883,3871317,-1,0.122554285714286},
-{2965662,3870883,3871000,0.112236363636364,-1},
-{2965663,3869021,3868965,-1,0.1322},
-{2965664,3867376,3866780,-1,0.47235},
-{2965665,3867168,3866780,-1,0.237736363636364},
-{2965666,3867816,3867168,-1,0.603257142857143},
-{2965667,3865472,3865601,0.049275,-1},
-{2965668,3865211,3865472,0.0999096774193548,-1},
-{2965669,3865273,3865211,-1,0.0883846153846154},
-{2965670,3865472,3865273,-1,0.0681512195121951},
-{2965671,3865298,3865273,-1,0.0501488372093023},
-{2965672,3864556,3863120,0.496268571428571,0.57898},
-{2965673,3865149,3864556,0.192967741935484,0.260086956521739},
-{2965674,3865790,3865430,0.3789,0.157875},
-{2965675,3861675,3860858,0.409179310344828,0.423792857142857},
-{2965676,3861909,3861675,0.12138,0.12138},
-{2965677,3862158,3861909,0.137139130434783,0.175233333333333},
-{2965678,3864200,3863348,-1,0.437165217391304},
-{2965679,3864404,3864200,-1,0.09895},
-{2965680,3864507,3864404,-1,0.0413},
-{2965681,3864778,3864507,-1,0.126425},
-{2965682,3865119,3864778,-1,0.27645},
-{2965683,3864279,3863530,-1,0.426311111111111},
-{2965684,3864279,3863845,0.22762,-1},
-{2965685,3868060,3867690,0.221771428571429,0.166328571428571},
-{2965686,3864646,3864596,-1,0.09456},
-{2965687,3864310,3864473,0.122752941176471,0.189709090909091},
-{2965688,3864473,3864596,0.134457142857143,-1},
-{2965689,3864948,3864596,0.24666,0.259642105263158},
-{2965690,3864948,3864629,0.4696,-1},
-{2965691,3868846,3868665,-1,0.522066666666667},
-{2965692,3869200,3868846,-1,0.1722},
-{2965693,3869200,3869047,-1,0.434475},
-{2965694,3870551,3870062,-1,0.14060625},
-{2965695,3870734,3870342,0.114774193548387,-1},
-{2965696,3869892,3869332,0.209690909090909,0.192216666666667},
-{2965697,3870104,3869625,0.246035294117647,0.232366666666667},
-{2965698,3870104,3870108,0.0705230769230769,0.06112},
-{2965699,3870061,3870104,0.129576923076923,0.124777777777778},
-{2965700,3869946,3870061,0.269509090909091,0.3294},
-{2965701,3869931,3869940,0.228913043478261,0.2925},
-{2965702,3872130,3872597,0.253233333333333,-1},
-{2965703,3867584,3867408,-1,0.101778947368421},
-{2965704,3867993,3867584,-1,0.187963636363636},
-{2965705,3868558,3868634,-1,0.1835},
-{2965706,3867740,3867497,0.20235,0.20235},
-{2965707,3868722,3867740,0.355984615384615,0.420709090909091},
-{2965708,3869253,3868722,0.166567741935484,0.1613625},
-{2965709,3869450,3869253,0.08405,0.087704347826087},
-{2965710,3870178,3869450,0.403311111111111,0.418823076923077},
-{2965711,3870733,3870178,0.902457142857143,0.823982608695652},
-{2965712,3871313,3871325,-1,0.135184615384615},
-{2965713,3871325,3871053,-1,0.136489655172414},
-{2965714,3871053,3871036,-1,0.1336},
-{2965715,3871036,3870884,-1,0.223084615384615},
-{2965716,3871522,3871036,-1,0.200127272727273},
-{2965717,3871613,3871522,-1,0.151472727272727},
-{2965718,3871613,3872062,0.211768421052632,-1},
-{2965719,3871386,3870904,0.604242857142857,-1},
-{2965720,3871403,3871386,-1,0.209833333333333},
-{2965721,3871877,3871386,0.29052,0.29052},
-{2965722,3871522,3871403,-1,0.272147368421053},
-{2965723,3871699,3871613,-1,0.131544827586207},
-{2965724,3871784,3871699,-1,0.189782608695652},
-{2965725,3872008,3871522,0.191686956521739,-1},
-{2965726,3872517,3872000,0.32072,-1},
-{2965727,3870884,3870519,0.196042105263158,0.18624},
-{2965728,3869601,3868968,0.49449,-1},
-{2965729,3868968,3867922,0.468711111111111,-1},
-{2965730,3867922,3867160,0.36934,-1},
-{2965731,3867160,3866653,0.307628571428571,-1},
-{2965732,3866653,3866270,0.237622222222222,-1},
-{2965733,3858457,3857523,0.208004347826087,0.195269387755102},
-{2965734,3856553,3855526,0.246386666666667,0.241030434782609},
-{2965735,3855526,3855297,0.07225,0.08128125},
-{2965736,3855297,3853721,-1,-1},
-{2965737,3851487,3851186,-1,-1},
-{2965740,3851124,3850588,0.2608875,0.27828},
-{2965741,3851536,3851124,0.18219375,0.153426315789474},
-{2965742,3851390,3851455,0.2322,0.215614285714286},
-{2965743,3851455,3850824,0.394178571428571,0.4245},
-{2965744,3854623,3854151,-1,0.358542857142857},
-{2965745,3853171,3853602,0.2560875,0.264348387096774},
-{2965746,3853602,3853721,-1,-1},
-{2965747,3855025,3854190,0.257326829268293,0.22935652173913},
-{2965748,3855294,3855025,0.108206896551724,0.101225806451613},
-{2965749,3855297,3855294,0.235864285714286,0.227731034482759},
-{2965750,3856149,3855294,0.40284,0.431614285714286},
-{2965751,3854623,3854007,0.3068,0.287625},
-{2965752,3854007,3853754,0.11828,0.11828},
-{2965753,3853754,3852944,0.422422222222222,0.35641875},
-{2965754,3852944,3852812,0.05144,0.0417081081081081},
-{2965755,3852812,3852375,0.15193125,0.127942105263158},
-{2965756,3851974,3851701,0.201233333333333,0.157486956521739},
-{2965757,3852293,3851857,0.1588125,0.1588125},
-{2965758,3851857,3851703,0.0564947368421053,0.0564947368421053},
-{2965759,3851703,3851517,0.0617526315789474,0.0634216216216216},
-{2965760,3851517,3851091,0.217730769230769,0.22644},
-{2965762,3851701,3851091,0.392736,0.426886956521739},
-{2965763,3852966,3851701,0.388369230769231,0.409362162162162},
-{2965771,3855769,3856329,0.266935714285714,0.287469230769231},
-{2965772,3857114,3857495,0.25488,0.199125},
-{2965773,3865626,3865364,-1,-1},
-{2965774,3865364,3864943,-1,-1},
-{2965775,3864943,3864411,-1,0.446147368421053},
-{2965776,3864411,3863619,-1,0.74136},
-{2965777,3863619,3863636,-1,0.04494},
-{2965778,3864850,3864576,0.157141935483871,0.2118},
-{2965779,3864576,3864380,0.0902108108108108,0.123622222222222},
-{2965780,3864380,3864027,0.2175,0.183157894736842},
-{2965781,3864027,3863615,0.156885,0.179297142857143},
-{2965782,3863615,3863285,0.18346,0.177541935483871},
-{2965783,3862535,3863285,0.9428,-1},
-{2965784,3863285,3863619,0.457928571428571,0.6411},
-{2965785,3863285,3862988,0.148371428571429,0.148371428571429},
-{2965786,3862988,3862258,0.265828571428571,0.265828571428571},
-{2965787,3862535,3862124,0.229527272727273,0.240457142857143},
-{2965788,3862124,3861192,0.521907692307692,0.502577777777778},
-{2965789,3861192,3861050,0.1244,0.11196},
-{2965790,3861050,3860587,0.2461,0.2461},
-{2965791,3861192,3861509,0.330384,0.330384},
-{2965792,3861509,3861704,0.215675,0.235281818181818},
-{2965793,3861704,3861992,0.168744,0.21093},
-{2965794,3861992,3862258,0.196854545454545,0.196854545454545},
-{2965795,3862258,3862135,0.0598829268292683,0.0558},
-{2965796,3862135,3861639,0.277395348837209,0.277395348837209},
-{2965797,3861639,3861527,0.0557590909090909,0.0721588235294118},
-{2965798,3861527,3861273,0.1305875,0.2022},
-{2965799,3861273,3861064,0.0989478260869565,0.0989478260869565},
-{2965800,3861064,3860698,0.197289473684211,0.197289473684211},
-{2965801,3860698,3860080,0.258994285714286,-1},
-{2965802,3860080,3860294,0.298915384615385,-1},
-{2965805,3856270,3855275,0.315308108108108,0.38888},
-{2965806,3856707,3856270,0.13715,0.145217647058824},
-{2965807,3857402,3856707,0.191713636363636,0.241011428571429},
-{2965808,3860294,3859839,0.326968421052632,0.2004},
-{2965809,3861394,3861298,0.0306558139534884,0.0321512195121951},
-{2965810,3862536,3861394,0.317489361702128,0.310875},
-{2965811,3862713,3862536,0.05152,0.0504},
-{2965812,3865521,3865193,-1,0.143238461538462},
-{2965813,3865193,3864023,-1,0.429041379310345},
-{2965814,3867846,3867228,-1,0.3044},
-{2965815,3867228,3866359,-1,0.376852173913043},
-{2965816,3866359,3865959,-1,0.133821428571429},
-{2965817,3865959,3865096,-1,0.35515},
-{2965818,3864549,3864411,0.206571428571429,0.1446},
-{2965819,3865096,3864973,0.07512,0.0662823529411765},
-{2965820,3863636,3863073,0.441816,0.424823076923077},
-{2965821,3863073,3862893,0.123707142857143,0.0989657142857143},
-{2965822,3862893,3862385,0.29062,0.27245625},
-{2965823,3862385,3862060,0.249876923076923,0.240622222222222},
-{2965824,3862060,3861926,0.124266666666667,0.115696551724138},
-{2965825,3861926,3861394,0.460464,0.396951724137931},
-{2965826,3865105,3865131,0.0406857142857143,-1},
-{2965827,3865131,3865626,0.47628,-1},
-{2965828,3867790,3867531,-1,0.340685714285714},
-{2965829,3867531,3866390,0.497678571428571,0.497678571428571},
-{2965830,3866436,3866749,0.313510344827586,0.313510344827586},
-{2965831,3866257,3866321,0.0278086956521739,0.0220551724137931},
-{2965832,3869323,3869392,0.171070588235294,0.200565517241379},
-{2965833,3869392,3869488,0.3429,0.3857625},
-{2965834,3869488,3868809,0.511941176470588,0.561483870967742},
-{2965835,3868809,3867998,0.46455,0.46455},
-{2965836,3868809,3868758,0.0642,0.07704},
-{2965867,3864145,3863679,0.2728875,-1},
-{2965868,3863561,3862785,0.211174468085106,0.283577142857143},
-{2965869,3865022,3864265,0.41217,-1},
-{2965870,3864265,3863408,0.338345454545455,0.465225},
-{2965871,3863408,3863055,0.228851612903226,-1},
-{2965872,3863055,3862851,0.102356756756757,-1},
-{2965873,3863339,3862732,0.392622222222222,0.588933333333333},
-{2965874,3863055,3862732,0.47952,0.508581818181818},
-{2965875,3862851,3862323,0.278305263157895,-1},
-{2965876,3862323,3861818,0.2627,-1},
-{2965877,3861341,3861818,0.29799375,0.307606451612903},
-{2965878,3861553,3861341,0.229968,0.221123076923077},
-{2965879,3861802,3861553,0.303,0.303},
-{2965880,3860688,3861341,0.3669,0.39136},
-{2965881,3860611,3860688,0.0598615384615385,0.0864666666666667},
-{2965882,3861802,3860611,0.53775,-1},
-{2965883,3860611,3859249,0.49629375,0.5882},
-{2965884,3858544,3858221,0.375161538461538,0.424095652173913},
-{2965885,3858673,3858544,-1,-1},
-{2965886,3859249,3858948,0.181622222222222,0.181622222222222},
-{2965887,3858994,3856149,-1,0.910341176470588},
-{2965888,3851171,3851283,0.05124,0.05124},
-{2965955,3852711,3852940,0.156909090909091,0.1726},
-{2965956,3852435,3852711,0.211634482758621,0.20458},
-{2965957,3852435,3852793,0.129214285714286,0.1206},
-{2965958,3852793,3853171,0.130623529411765,0.11103},
-{2965962,3850392,3849584,0.348068571428571,0.320589473684211},
-{2965963,3861818,3861856,0.2786,0.329254545454545},
-{2965964,3861856,3861821,0.159872727272727,0.170187096774194},
-{2965965,3861454,3861263,-1,-1},
-{2965967,3851809,3851909,-1,0.0550857142857143},
-{2965968,3851909,3852898,-1,0.3738},
-{2965969,3852898,3854238,0.566855172413793,0.608844444444444},
-{2965970,3854238,3855304,0.486969230769231,0.42204},
-{2965971,3857125,3857364,-1,0.122228571428571},
-{2965972,3851746,3851989,0.0966,0.101684210526316},
-{2965973,3852842,3853736,0.43128,0.4193},
-{2965974,3859211,3858742,0.241486956521739,0.241486956521739},
-{2965975,3859211,3859085,0.313623529411765,0.26658},
-{2965976,3859647,3859211,0.38571,0.367342857142857},
-{2965977,3859953,3859647,0.313363636363636,0.28725},
-{2965978,3860127,3859953,0.184742857142857,0.228211764705882},
-{2965979,3860522,3860094,-1,0.350016},
-{2965980,3861049,3860522,-1,0.416625},
-{2965981,3860714,3860094,0.299466666666667,0.351547826086957},
-{2965982,3861209,3860714,0.240062068965517,0.21755625},
-{2965983,3861638,3861209,0.271875,0.20390625},
-{2965984,3862001,3861638,-1,0.451223076923077},
-{2965985,3862342,3862001,-1,0.430752},
-{2965986,3862428,3862002,0.269746153846154,0.23378},
-{2965987,3862002,3861821,0.1804,0.1804},
-{2965988,3863408,3862890,-1,0.31252},
-{2965989,3853736,3854135,0.274272727272727,0.3017},
-{2965990,3854135,3854487,0.121533333333333,0.125005714285714},
-{2965991,3854487,3854610,0.060975,0.062941935483871},
-{2965992,3855950,3856454,0.202875,0.202875},
-{2965993,3857120,3857611,0.197568,0.1764},
-{2965995,3852629,3852205,0.116832558139535,0.116832558139535},
-{2965996,3851575,3852134,0.23235,0.23235},
-{2965997,3849832,3850122,0.115722580645161,-1},
-{2966002,3861551,3861412,0.203136,0.230836363636364},
-{2966003,3861412,3861288,0.0985941176470588,0.115593103448276},
-{2966004,3860609,3860549,0.0844363636363636,0.074304},
-{2966005,3857162,3854297,0.831384615384615,0.8106},
-{2966006,3857822,3857162,0.196783333333333,0.196783333333333},
-{2966143,3859671,3858708,0.455686956521739,0.52404},
-{2966144,3856564,3856063,0.239428571428571,0.193384615384615},
-{2966145,3854691,3854717,0.0983357142857143,0.0888193548387097},
-{2966149,3850940,3850417,-1,-1},
-{2966150,3850060,3849752,0.1559,0.173222222222222},
-{2966156,3863120,3862967,-1,-1},
-{2966157,3863281,3863120,0.387571428571429,-1},
-{2966158,3863348,3863281,0.163885714285714,-1},
-{2966159,3862967,3862878,0.216685714285714,0.3792},
-{2966160,3862878,3862712,0.233328,0.24305},
-{2966161,3862712,3861288,0.587717647058823,0.62445},
-{2966162,3863082,3862712,0.15885,0.195507692307692},
-{2966163,3862702,3862070,0.213264705882353,0.2417},
-{2966164,3862070,3861961,0.0584275862068965,0.05295},
-{2966165,3861961,3861604,0.146262857142857,0.146262857142857},
-{2966166,3859761,3860238,0.272238461538462,0.393233333333333},
-{2966167,3857948,3858278,-1,0.359742857142857},
-{2966168,3857611,3857948,-1,0.6328},
-{2966169,3852205,3852381,-1,0.15344347826087},
-{2966170,3852381,3852675,-1,0.254175},
-{2966171,3850717,3851108,0.312970588235294,0.280026315789474},
-{2966172,3850077,3850717,0.337885714285714,0.31536},
-{2966173,3865825,3865923,-1,0.182836363636364},
-{2966174,3865923,3865905,-1,0.157517647058824},
-{2966175,3865779,3865905,0.484384615384615,-1},
-{2966176,3865993,3865903,0.1084,0.2168},
-{2966177,3879461,3879484,0.207,0.22425},
-{2966178,3879484,3879520,0.193103225806452,0.230238461538462},
-{2966179,3875721,3874873,-1,0.557810526315789},
-{2966180,3858786,3859411,0.268407692307692,0.211472727272727},
-{2966181,3859411,3859918,0.243977777777778,0.227151724137931},
-{2966182,3859918,3860471,0.473454545454545,0.385777777777778},
-{2966183,3860471,3860962,0.445881818181818,0.377284615384615},
-{2966184,3860962,3861291,0.327624,0.292521428571429},
-{2966185,3858549,3858805,0.246342857142857,0.255466666666667},
-{2966186,3858805,3858383,0.270707142857143,0.280733333333333},
-{2966187,3858383,3857904,0.321988235294118,0.228075},
-{2966188,3857904,3857341,0.538771428571429,0.342854545454545},
-{2966189,3856768,3856584,0.147214285714286,0.1145},
-{2966190,3856768,3857341,0.255313043478261,0.3670125},
-{2966191,3859033,3859236,0.194208,0.2023},
-{2966192,3859236,3859478,0.20115,0.216623076923077},
-{2966193,3859478,3859615,0.118045161290323,0.110890909090909},
-{2966194,3859615,3859806,0.158496774193548,0.140382857142857},
-{2966195,3860477,3860853,0.208852173913044,0.228742857142857},
-{2966196,3862055,3861677,0.220958823529412,0.23476875},
-{2966197,3862691,3862324,0.266416216216216,0.30804375},
-{2966198,3862814,3862691,0.0768923076923077,0.0937125},
-{2966199,3863015,3862814,0.105892307692308,0.13321935483871},
-{2966200,3863194,3863015,0.09678,0.113858823529412},
-{2966201,3859478,3859150,0.139466666666667,0.150624},
-{2966202,3859150,3858650,0.236664,0.246525},
-{2966203,3858650,3857826,0.41345,0.451036363636364},
-{2966204,3857826,3856976,0.37695652173913,0.3468},
-{2966205,3853849,3853628,0.123194117647059,0.149592857142857},
-{2966206,3855078,3854520,0.281377777777778,0.2374125},
-{2966207,3856181,3855078,0.48695625,0.48695625},
-{2966208,3855870,3855078,0.272925,0.256870588235294},
-{2966209,3856766,3855870,0.338622222222222,0.365712},
-{2966210,3856030,3856181,0.137372727272727,0.1314},
-{2966211,3855889,3856030,0.1372,0.149672727272727},
-{2966212,3856434,3855889,0.204309090909091,0.22474},
-{2966213,3856502,3856172,0.18214,0.18214},
-{2966214,3857416,3856976,0.233979310344828,0.21204375},
-{2966215,3861729,3861201,0.276705882352941,0.303483870967742},
-{2966216,3861201,3860597,0.225775609756098,0.225775609756098},
-{2966217,3860597,3859995,0.232384615384615,0.226575},
-{2966218,3859995,3859581,0.157989473684211,0.139618604651163},
-{2966219,3859581,3858969,0.244835294117647,0.244835294117647},
-{2966220,3858969,3858527,0.219703448275862,0.193072727272727},
-{2966221,3858527,3858101,0.163292307692308,0.15921},
-{2966222,3858038,3857474,0.258421621621622,0.2656},
-{2966223,3849920,3850006,0.297835714285714,0.287565517241379},
-{2966224,3850006,3849788,0.151118181818182,0.138525},
-{2966225,3877859,3878333,0.465054545454545,0.1764},
-{2966226,3875035,3876377,0.48905625,0.601915384615385},
-{2966227,3874514,3875204,0.214005405405405,0.344269565217391},
-{2966228,3874433,3873754,0.262064516129032,0.369272727272727},
-{2966229,3873754,3872986,0.234342857142857,0.241235294117647},
-{2966230,3872986,3872200,0.198372972972973,0.203883333333333},
-{2966231,3872200,3871816,0.0882461538461538,0.0983314285714286},
-{2966232,3871816,3871373,0.131593548387097,0.123618181818182},
-{2966233,3871489,3870122,0.297763636363636,0.344778947368421},
-{2966234,3872207,3871489,0.123701886792453,0.128552941176471},
-{2966235,3872779,3872207,0.0953236363636364,0.0989207547169811},
-{2966236,3873104,3872779,0.0643745454545455,0.0668037735849057},
-{2966237,3873584,3873104,0.0979924528301887,0.105991836734694},
-{2966238,3874265,3873584,0.161364,0.171663829787234},
-{2966239,3862324,3861746,0.410136,0.379755555555556},
-{2966240,3861214,3860899,0.1987,0.176622222222222},
-{2966241,3860899,3860084,0.400248,0.33354},
-{2966242,3860084,3859423,0.39813,0.442366666666667},
-{2966243,3862464,3862099,0.138212903225806,0.153021428571429},
-{2966244,3862746,3862464,0.0824487804878049,0.109045161290323},
-{2966245,3863047,3862746,0.0960146341463415,0.115782352941176},
-{2966246,3863190,3863047,0.0553621621621622,0.0620727272727273},
-{2966247,3863351,3863190,0.0737647058823529,0.076},
-{2966248,3863351,3863599,0.203376,0.175324137931034},
-{2966249,3864456,3864128,0.160536,0.154361538461538},
-{2966250,3864727,3864456,0.129864,0.124869230769231},
-{2966251,3864521,3864727,0.345836363636364,0.345836363636364},
-{2966252,3864408,3864521,0.176018181818182,0.16135},
-{2966253,3864385,3864408,0.0656869565217391,0.060432},
-{2966254,3863246,3863351,0.167930769230769,0.161711111111111},
-{2966255,3863246,3863521,0.150755555555556,0.150755555555556},
-{2966256,3863521,3863993,0.179311764705882,0.164772972972973},
-{2966257,3863993,3864385,0.485085714285714,-1},
-{2966258,3862861,3863246,0.318525,0.308872727272727},
-{2966259,3862753,3862861,0.0849642857142857,0.0881111111111111},
-{2966260,3862670,3862753,0.10124347826087,0.10124347826087},
-{2966261,3864861,3864385,0.216511764705882,0.210325714285714},
-{2966262,3865673,3865404,0.112540909090909,0.107647826086957},
-{2966263,3866710,3866371,0.108586363636364,0.111111627906977},
-{2966264,3867827,3867277,0.198247826086957,0.1899875},
-{2966265,3866838,3866207,0.306208695652174,0.306208695652174},
-{2966266,3867083,3866838,0.104464285714286,0.100862068965517},
-{2966267,3867827,3867932,0.03315,0.03536},
-{2966268,3867932,3868109,0.0543829787234043,0.0568},
-{2966269,3868313,3868109,0.0809318181818182,0.0741875},
-{2966270,3868741,3868313,0.15876,0.152004255319149},
-{2966271,3870128,3869325,0.5291625,0.604757142857143},
-{2966272,3870942,3870490,0.140690322580645,0.174456},
-{2966273,3869739,3868298,0.428671428571429,0.409186363636364},
-{2966274,3868298,3868378,0.143871428571429,0.154938461538462},
-{2966275,3868298,3868056,0.0565227272727273,0.0540652173913043},
-{2966276,3868056,3866954,0.22446,0.220058823529412},
-{2966277,3866954,3866506,0.0874384615384615,0.0842},
-{2966278,3864538,3864151,0.111065217391304,0.111065217391304},
-{2966279,3864151,3863557,0.15389387755102,0.1571},
-{2966280,3866147,3866288,0.15781935483871,0.148254545454545},
-{2966281,3866288,3866380,0.130164705882353,0.134109090909091},
-{2966282,3866502,3867887,0.242042105263158,0.250843636363636},
-{2966283,3870947,3871839,0.17308085106383,0.150644444444444},
-{2966284,3873852,3874063,0.0830727272727273,-1},
-{2966285,3874068,3874508,-1,0.136436842105263},
-{2966286,3874508,3875200,-1,0.164675},
-{2966287,3867722,3867394,0.464238461538461,0.482808},
-{2966288,3867394,3867335,0.111052173913043,0.106425},
-{2966289,3867335,3867244,0.194857142857143,0.157384615384615},
-{2966290,3866345,3866314,0.115333333333333,0.115333333333333},
-{2966291,3866379,3866345,0.126507692307692,0.149509090909091},
-{2966292,3867253,3866644,0.327088888888889,0.327088888888889},
-{2966293,3867645,3867253,0.152833333333333,0.22008},
-{2966294,3869449,3869245,0.0958363636363636,0.131775},
-{2966295,3870922,3870038,-1,0.200882926829268},
-{2966296,3871912,3872329,0.0976923076923077,0.100263157894737},
-{2966297,3872329,3872801,0.103876923076923,0.10128},
-{2966298,3872801,3873190,0.10281,0.105446153846154},
-{2966299,3873190,3873576,0.106484210526316,0.103753846153846},
-{2966300,3870416,3869732,0.27,0.2484},
-{2966301,3870044,3869471,0.222545454545455,0.212869565217391},
-{2966302,3870332,3870044,0.100666666666667,0.10872},
-{2966303,3870648,3870332,0.09061875,0.111530769230769},
-{2966304,3870830,3870648,0.0638769230769231,0.0638769230769231},
-{2966305,3872127,3872073,0.12393,0.1458},
-{2966306,3871883,3871726,0.2392,0.229632},
-{2966307,3871726,3871573,0.246533333333333,0.27735},
-{2966308,3871573,3871419,0.216888,0.225925},
-{2966309,3871419,3871301,0.172222222222222,0.19375},
-{2966310,3870749,3870427,0.500352,0.3909},
-{2966311,3870031,3869473,0.20504347826087,0.168428571428571},
-{2966312,3870427,3870031,0.1086,0.119109677419355},
-{2966313,3872622,3871726,0.324192,0.324192},
-{2966314,3871726,3871109,0.200421428571429,0.200421428571429},
-{2966315,3871109,3870757,0.1105125,0.114077419354839},
-{2966316,3870757,3870242,0.1315,0.127945945945946},
-{2966317,3870242,3869649,0.22345,0.17876},
-{2966318,3869580,3868195,0.526344,0.731033333333333},
-{2966319,3868195,3867715,0.167376923076923,0.167376923076923},
-{2966320,3866481,3867167,0.436125,0.436125},
-{2966321,3879331,3879030,0.150245454545455,-1},
-{2966322,3879030,3878867,0.120533333333333,-1},
-{2966323,3878867,3878384,0.367623529411765,-1},
-{2966324,3878384,3877811,0.4653,-1},
-{2966325,3877811,3877376,0.2919375,-1},
-{2966326,3877376,3877019,0.231635294117647,-1},
-{2966327,3877019,3876509,-1,0.362325},
-{2966328,3876509,3876031,0.38144,-1},
-{2966329,3875896,3876031,0.152478947368421,-1},
-{2966330,3876031,3876420,0.299066666666667,-1},
-{2966331,3876420,3876478,0.0862578947368421,-1},
-{2966332,3876979,3876420,-1,0.329621052631579},
-{2966333,3877494,3876979,-1,0.23088},
-{2966334,3877863,3877494,-1,0.180545454545455},
-{2966335,3878287,3877863,-1,0.2677},
-{2966336,3878798,3878287,-1,0.358566666666667},
-{2966337,3879301,3878798,-1,0.289457142857143},
-{2966338,3879713,3879301,-1,0.28011},
-{2966339,3880187,3879713,-1,0.428188235294118},
-{2966340,3878431,3878630,-1,0.43005},
-{2966341,3878630,3878867,-1,0.3},
-{2966342,3878867,3879301,-1,0.467869565217391},
-{2966343,3879301,3879476,-1,0.225542857142857},
-{2966344,3879476,3879577,-1,0.126652173913043},
-{2966345,3877019,3877249,0.215856,-1},
-{2966346,3877249,3877494,0.26718,-1},
-{2966347,3877494,3877665,0.145776923076923,-1},
-{2966348,3877665,3877824,0.12578,-1},
-{2966349,3877824,3877972,0.10036875,-1},
-{2966350,3877824,3877288,0.334870588235294,-1},
-{2966351,3878206,3877824,0.214547368421053,-1},
-{2966352,3878576,3878206,0.249789473684211,-1},
-{2966353,3879105,3878576,0.32814,-1},
-{2966354,3879577,3879105,0.3323,-1},
-{2966355,3879953,3879577,0.243182608695652,-1},
-{2966356,3880474,3879953,0.31535,-1},
-{2966357,3876533,3876990,-1,-1},
-{2966358,3877288,3876990,-1,-1},
-{2966361,3877865,3878235,0.45325,0.402888888888889},
-{2966363,3878194,3878285,0.0865448275862069,-1},
-{2966364,3878285,3878423,0.139992857142857,-1},
-{2966365,3879207,3879377,-1,0.2466},
-{2966366,3879377,3879512,-1,0.149382857142857},
-{2966369,3879433,3879689,0.321696,-1},
-{2966370,3879689,3879823,0.18518,-1},
-{2966371,3879823,3879934,0.155505882352941,-1},
-{2966374,3879844,3880096,-1,0.398209090909091},
-{2966375,3880224,3880279,-1,0.0697153846153846},
-{2966376,3880279,3880358,-1,0.124735714285714},
-{2966481,3882416,3881858,0.51252,0.410016},
-{2966482,3883407,3882416,0.455029411764706,0.418135135135135},
-{2966483,3883778,3883407,0.177141176470588,0.316989473684211},
-{2966484,3882043,3881457,0.411725,-1},
-{2966485,3882951,3882043,0.614215384615385,-1},
-{2966486,3883356,3882951,0.261875,-1},
-{2966487,3882714,3882650,0.0519333333333333,-1},
-{2966488,3883691,3883362,0.27222,-1},
-{2966489,3883462,3883413,0.0580125,-1},
-{2966490,3884149,3883765,0.2522,-1},
-{2966491,3884480,3884149,0.24,-1},
-{2966492,3884891,3884480,0.33411,-1},
-{2966493,3884842,3884123,0.38878,-1},
-{2966494,3885264,3884842,0.2091375,-1},
-{2966495,3885630,3885264,0.162166666666667,-1},
-{2966496,3885756,3885630,0.0627,-1},
-{2966497,3886017,3885756,0.110163636363636,-1},
-{2966498,3885549,3884820,-1,0.466128},
-{2966499,3885952,3885549,-1,0.234346153846154},
-{2966500,3886270,3885952,-1,0.185933333333333},
-{2966501,3886651,3886598,0.0518,0.0518},
-{2966502,3885549,3886372,0.384642857142857,0.307714285714286},
-{2966503,3884842,3885549,-1,0.350733333333333},
-{2966504,3884286,3884842,-1,0.23488125},
-{2966505,3883811,3884286,-1,0.238155555555556},
-{2966506,3883451,3883811,-1,0.16666},
-{2966507,3883163,3883451,-1,0.137896551724138},
-{2966508,3882806,3883163,-1,0.191053846153846},
-{2966509,3883163,3882468,0.490172727272727,-1},
-{2966510,3883730,3883163,0.415690909090909,-1},
-{2966511,3884119,3883730,0.268909090909091,-1},
-{2966512,3884512,3884119,0.27792,-1},
-{2966513,3882416,3882806,0.203568,0.203568},
-{2966514,3882043,3882416,-1,0.230492307692308},
-{2966515,3881666,3882043,-1,0.198921428571429},
-{2966516,3881260,3881666,-1,0.233},
-{2966517,3880738,3881260,-1,0.446611764705882},
-{2966518,3885141,3885756,0.3466,-1},
-{2966519,3884669,3885141,0.287142857142857,-1},
-{2966520,3884389,3884669,0.248223529411765,-1},
-{2966521,3884119,3884389,0.177730434782609,-1},
-{2966522,3883767,3884119,0.223445454545455,-1},
-{2966523,3883407,3883767,0.236727272727273,-1},
-{2966524,3882951,3883407,0.31593,-1},
-{2966525,3881409,3881781,0.41635,-1},
-{2966526,3882573,3882951,0.246381818181818,-1},
-{2966527,3882201,3882573,0.258381818181818,-1},
-{2966528,3886128,3886073,0.0404347826086957,-1},
-{2966529,3886522,3886376,0.0817058823529412,-1},
-{2966530,3885393,3886522,0.53145,-1},
-{2966531,3886522,3887217,0.3486,-1},
-{2966532,3887217,3887723,0.1879875,-1},
-{2966533,3887723,3888066,0.1275,-1},
-{2966534,3884641,3884559,0.07072,-1},
-{2966535,3885377,3885031,0.226610526315789,-1},
-{2966536,3885755,3885377,0.326766666666667,-1},
-{2966537,3885903,3885755,0.125325,-1},
-{2966538,3883905,3883835,0.049578947368421,0.0348888888888889},
-{2966539,3884966,3884606,0.17266875,0.240234782608696},
-{2966540,3883924,3884381,0.287885714285714,-1},
-{2966541,3884381,3884857,0.256375,-1},
-{2966542,3884857,3885360,0.245746153846154,-1},
-{2966543,3885360,3885947,0.343718181818182,-1},
-{2966544,3885947,3886324,0.214434782608696,-1},
-{2966545,3886324,3886843,0.39441,-1},
-{2966546,3885433,3884966,0.2394,0.216232258064516},
-{2966547,3885947,3885433,0.255193548387097,0.2637},
-{2966548,3885360,3884891,0.3276,-1},
-{2966549,3885969,3885360,0.416452173913043,-1},
-{2966550,3885922,3885969,-1,0.0141771428571429},
-{2966551,3886806,3886705,0.0545351351351351,0.0545351351351351},
-{2966552,3887133,3886806,0.22185,0.230066666666667},
-{2966553,3887733,3887332,0.29515,0.337314285714286},
-{2966554,3887332,3887195,-1,0.116809090909091},
-{2966555,3887195,3886778,-1,0.3648},
-{2966556,3885006,3884381,0.552,-1},
-{2966557,3885436,3885006,0.3714,-1},
-{2966558,3885823,3885436,0.376266666666667,-1},
-{2966559,3886201,3885823,-1,0.29445},
-{2966560,3886592,3886201,-1,0.374942857142857},
-{2966561,3886676,3886403,0.286408695652174,-1},
-{2966562,3886403,3886348,0.290347826086957,-1},
-{2966563,3886348,3886256,0.368307692307692,-1},
-{2966564,3888514,3889572,-1,0.690031578947368},
-{2966565,3887195,3887688,0.255834782608696,0.235368},
-{2966566,3888069,3888514,0.3468,0.226173913043478},
-{2966567,3887455,3888069,0.383815384615385,-1},
-{2966568,3887455,3887142,-1,0.335933333333333},
-{2966569,3887142,3886830,-1,0.300136363636364},
-{2966570,3886830,3886324,-1,0.5148},
-{2966571,3885761,3885343,-1,0.33969},
-{2966572,3885343,3884974,-1,0.322517647058823},
-{2966573,3884974,3884852,-1,0.0967363636363636},
-{2966574,3884852,3884557,-1,0.179475},
-{2966575,3884245,3884184,-1,0.0434181818181818},
-{2966576,3882806,3882165,-1,0.500542857142857},
-{2966577,3883767,3882806,-1,0.8489},
-{2966578,3884144,3883767,-1,0.338364705882353},
-{2966579,3881666,3881101,-1,0.454885714285714},
-{2966580,3882573,3881666,-1,0.741736363636364},
-{2966581,3882971,3882573,-1,0.314285714285714},
-{2966582,3883077,3883025,-1,0.0421826086956522},
-{2966583,3883744,3883373,-1,0.283609090909091},
-{2966584,3884083,3883744,-1,0.289484210526316},
-{2966585,3882705,3882737,0.0458307692307692,0.0458307692307692},
-{2966586,3882915,3883362,0.2712,0.328294736842105},
-{2966587,3883362,3883744,0.252081818181818,-1},
-{2966588,3883744,3884149,0.294157894736842,-1},
-{2966589,3884149,3884606,0.310690909090909,-1},
-{2966590,3884606,3884974,0.25614,-1},
-{2966591,3883373,3883765,-1,0.27918},
-{2966592,3885460,3884857,-1,0.50151},
-{2966593,3884813,3884938,0.0671076923076923,0.158618181818182},
-{2966594,3884938,3885436,-1,0.31881},
-{2966595,3885436,3885812,-1,0.247095652173913},
-{2966596,3888249,3888033,-1,0.57355},
-{2966597,3888033,3887882,0.240366666666667,0.2704125},
-{2966598,3888263,3889060,0.228248780487805,0.233955},
-{2966599,3887287,3888397,-1,0.583281818181818},
-{2966600,3888065,3887702,-1,0.245492307692308},
-{2966601,3888397,3888065,-1,0.25025},
-{2966602,3888733,3888397,-1,0.226755555555556},
-{2966603,3888885,3888733,-1,0.0854709677419355},
-{2966604,3889045,3888885,-1,0.181517647058824},
-{2966605,3889190,3889045,-1,0.100872},
-{2966606,3888848,3889190,-1,-1},
-{2966607,3889572,3889190,-1,0.2746},
-{2966608,3890071,3891018,-1,0.438483870967742},
-{2966609,3889710,3890071,-1,0.147564705882353},
-{2966610,3888978,3889710,-1,0.254789189189189},
-{2966611,3888397,3888978,-1,0.194348571428571},
-{2966612,3888621,3888263,0.3201,-1},
-{2966613,3888978,3888621,0.247875,-1},
-{2966614,3889307,3888978,0.282,-1},
-{2966615,3889594,3889307,0.252286956521739,-1},
-{2966616,3890111,3889594,0.445375,-1},
-{2966617,3889572,3890111,0.4106,0.351942857142857},
-{2966618,3890111,3890814,0.423652173913043,-1},
-{2966619,3889416,3889060,-1,0.290618181818182},
-{2966620,3889710,3889416,-1,0.29703},
-{2966621,3890011,3889710,-1,0.271382608695652},
-{2966622,3890291,3890011,-1,0.323233333333333},
-{2966623,3890814,3890291,-1,0.461086956521739},
-{2966624,3890814,3891129,0.271466666666667,-1},
-{2966625,3891129,3891563,-1,-1},
-{2966626,3891563,3891873,0.185256,-1},
-{2966627,3891093,3890814,-1,0.277695652173913},
-{2966628,3891396,3891093,-1,0.31326},
-{2966629,3889797,3889459,0.292636363636364,-1},
-{2966630,3890071,3889797,0.2457,-1},
-{2966631,3890362,3890071,0.297628571428571,-1},
-{2966632,3890645,3890362,0.263863636363636,-1},
-{2966633,3891129,3890645,0.420912,-1},
-{2966634,3891450,3891129,0.2696,-1},
-{2966635,3891744,3891450,0.329747368421053,-1},
-{2966636,3884953,3884490,0.401166666666667,-1},
-{2966637,3883632,3882749,0.680863636363636,-1},
-{2966638,3882749,3882176,0.52581,-1},
-{2966639,3883267,3882819,-1,0.4118},
-{2966640,3884878,3885320,0.410072727272727,0.196121739130435},
-{2966641,3885456,3886154,-1,0.468675},
-{2966642,3886077,3886154,0.147572727272727,-1},
-{2966643,3885542,3886068,-1,0.35532},
-{2966644,3885704,3886068,0.545488888888889,0.545488888888889},
-{2966645,3886068,3886153,0.197557894736842,0.18768},
-{2966646,3885539,3885760,-1,0.217963636363636},
-{2966647,3885760,3886302,-1,0.1681875},
-{2966648,3886154,3886231,-1,0.0308625},
-{2966649,3886231,3886591,0.1602,0.140781818181818},
-{2966650,3886591,3887040,0.173981818181818,0.173981818181818},
-{2966651,3887040,3887229,0.0733241379310345,0.0607542857142857},
-{2966652,3887229,3887371,0.0943263157894737,0.0484378378378378},
-{2966653,3886653,3886904,0.3202,-1},
-{2966654,3886904,3887157,0.255436363636364,-1},
-{2966655,3887157,3887229,0.1557,0.1557},
-{2966656,3886068,3886444,-1,0.197686956521739},
-{2966657,3886444,3886890,-1,0.225725},
-{2966658,3886890,3887251,-1,0.1866},
-{2966659,3887251,3887568,-1,0.136095652173913},
-{2966660,3887568,3888018,-1,0.191921739130435},
-{2966661,3886904,3887528,0.343285714285714,-1},
-{2966662,3887528,3887833,-1,0.233},
-{2966663,3886302,3886686,-1,0.156225},
-{2966664,3886686,3887116,-1,0.214752},
-{2966665,3887116,3887524,-1,0.178},
-{2966666,3887552,3887872,-1,0.140452173913044},
-{2966667,3887872,3888406,-1,0.240965217391304},
-{2966668,3886302,3886574,-1,0.390696},
-{2966669,3886574,3886820,0.641,-1},
-{2966670,3885449,3886029,0.231422222222222,0.480646153846154},
-{2966671,3884878,3884890,0.248628571428571,0.290066666666667},
-{2966672,3884890,3884935,0.554215384615385,0.576384},
-{2966673,3884950,3884991,0.0291,-1},
-{2966674,3885051,3885171,0.368713043478261,-1},
-{2966675,3885376,3885449,0.0488470588235294,-1},
-{2966676,3884472,3885171,-1,0.432705882352941},
-{2966677,3886029,3886198,0.0763,0.0963789473684211},
-{2966678,3886198,3886574,0.200975,-1},
-{2966679,3886198,3886380,-1,0.376591304347826},
-{2966680,3886574,3886963,0.188192307692308,-1},
-{2966681,3886963,3887213,0.105321428571429,-1},
-{2966682,3887213,3887402,0.0874615384615385,-1},
-{2966683,3887402,3887866,0.1614,-1},
-{2966684,3887866,3887979,0.03525,-1},
-{2966685,3887979,3888178,0.0707806451612903,-1},
-{2966686,3887589,3887545,0.206366666666667,0.37146},
-{2966687,3887577,3888245,-1,0.340363636363636},
-{2966688,3888178,3888849,0.276096,-1},
-{2966689,3888245,3888486,-1,-1},
-{2966690,3888486,3888980,-1,-1},
-{2966691,3888018,3888406,0.226533333333333,0.291257142857143},
-{2966692,3888406,3888569,0.0873230769230769,0.100164705882353},
-{2966693,3888569,3888849,0.150252631578947,0.203914285714286},
-{2966694,3888980,3889101,0.110957142857143,-1},
-{2966695,3889780,3890666,0.425871428571429,0.425871428571429},
-{2966696,3890290,3890666,0.252812903225807,0.290266666666667},
-{2966697,3888038,3888330,0.376017391304348,-1},
-{2966698,3888762,3889092,-1,0.482833333333333},
-{2966699,3889466,3889092,0.402577777777778,0.3882},
-{2966700,3889636,3889895,0.373057142857143,0.3561},
-{2966701,3889895,3890290,-1,0.356075},
-{2966702,3890290,3891401,0.379388571428571,0.379388571428571},
-{2966703,3890666,3891036,-1,0.241942857142857},
-{2966704,3891401,3892093,0.438910344827586,0.438910344827586},
-{2966705,3892093,3892586,0.479676923076923,-1},
-{2966706,3890666,3891238,0.366548571428571,0.32073},
-{2966707,3882562,3882686,-1,0.326466666666667},
-{2966708,3883630,3884137,-1,-1},
-{2966709,3885200,3885935,0.3139,-1},
-{2966710,3885966,3885955,0.1049,-1},
-{2966711,3885966,3885980,0.56991,-1},
-{2966712,3885980,3885935,0.3834,-1},
-{2966713,3885935,3885895,-1,-1},
-{2966714,3885237,3885980,0.3789,-1},
-{2966715,3885980,3886599,0.34,-1},
-{2966716,3886599,3887029,0.273126315789474,-1},
-{2966717,3887029,3887643,0.286963636363636,-1},
-{2966718,3887643,3888230,0.28461,-1},
-{2966719,3885195,3885424,-1,-1},
-{2966720,3885424,3885895,-1,-1},
-{2966721,3885935,3886564,0.308869565217391,-1},
-{2966722,3886564,3886985,0.231681818181818,-1},
-{2966723,3886985,3887624,0.315342857142857,-1},
-{2966724,3887624,3888215,0.3,-1},
-{2966725,3888574,3888243,-1,0.371428571428571},
-{2966726,3888243,3888230,-1,0.17589},
-{2966727,3888215,3888807,0.2389,0.229344},
-{2966728,3888181,3887879,0.635442857142857,-1},
-{2966729,3889418,3889686,-1,0.107828571428571},
-{2966730,3887433,3887336,-1,0.23772},
-{2966731,3888980,3889502,-1,0.444925},
-{2966732,3889502,3889524,-1,0.3069},
-{2966733,3889502,3890332,-1,0.371538461538462},
-{2966734,3890332,3890615,-1,0.18249},
-{2966735,3890615,3891238,-1,0.417714285714286},
-{2966736,3891238,3891614,-1,0.274168421052632},
-{2966737,3891614,3892093,-1,0.35586},
-{2966738,3889292,3888880,-1,-1},
-{2966739,3889292,3889666,-1,-1},
-{2966740,3889666,3890290,-1,0.42993},
-{2966741,3889418,3889426,0.1515,-1},
-{2966742,3889423,3889417,0.32385,-1},
-{2966743,3889417,3888996,0.5326,-1},
-{2966744,3889426,3889424,0.159171428571429,-1},
-{2966745,3889424,3889423,0.150130434782609,-1},
-{2966746,3889640,3890527,-1,-1},
-{2966747,3890527,3891267,0.293969230769231,0.301705263157895},
-{2966748,3891267,3891588,0.142333333333333,0.150705882352941},
-{2966749,3891588,3893035,0.617091891891892,0.585446153846154},
-{2966750,3891535,3891588,0.179733333333333,0.156541935483871},
-{2966751,3891442,3891535,0.236588571428571,0.2238},
-{2966752,3891407,3891442,0.0552,0.0504685714285714},
-{2966753,3891332,3891407,0.15885,0.173290909090909},
-{2966754,3891153,3891208,0.134888888888889,0.191684210526316},
-{2966755,3892295,3892241,0.35204,0.16501875},
-{2966756,3892295,3892616,0.261308571428571,0.261308571428571},
-{2966757,3892616,3892860,0.162127272727273,0.140794736842105},
-{2966758,3891321,3891870,-1,0.248644444444444},
-{2966759,3891870,3892616,-1,0.366715384615385},
-{2966760,3892860,3893035,0.132,0.132},
-{2966761,3893035,3893289,0.200092307692308,0.190331707317073},
-{2966762,3893289,3893801,0.336242553191489,0.336242553191489},
-{2966763,3887433,3888181,0.30284347826087,-1},
-{2966764,3888181,3888798,0.364376470588235,-1},
-{2966765,3888798,3889423,0.352333333333333,-1},
-{2966766,3889423,3889959,0.325073684210526,-1},
-{2966767,3889959,3890689,0.3616,-1},
-{2966768,3890689,3891442,0.336555555555556,0.395086956521739},
-{2966769,3891411,3891410,0.2884,0.34608},
-{2966770,3890400,3891410,0.37093125,0.423921428571429},
-{2966771,3896454,3897499,0.725791304347826,0.758781818181818},
-{2966772,3897499,3898733,0.366259459459459,0.410654545454545},
-{2966773,3899144,3899258,0.257337931034483,0.298512},
-{2966774,3899258,3899393,0.318090909090909,0.32803125},
-{2966775,3899393,3899543,0.277466666666667,0.344441379310345},
-{2966776,3899543,3899696,0.269417142857143,0.336771428571429},
-{2966777,3895550,3896305,0.250026666666667,0.250026666666667},
-{2966778,3896305,3896752,0.4012875,0.188841176470588},
-{2966779,3895987,3896149,0.364571428571429,0.364571428571429},
-{2966780,3895762,3895987,0.2516,0.30192},
-{2966781,3895550,3895762,0.289609090909091,0.374788235294118},
-{2966782,3895299,3895550,0.280944,0.29265},
-{2966783,3895204,3895299,0.0890727272727273,0.122475},
-{2966784,3882217,3882788,-1,0.688242857142857},
-{2966785,3881527,3882217,-1,0.5319375},
-{2966786,3880986,3881527,0.31587,-1},
-{2966787,3884871,3885322,-1,0.288966666666667},
-{2966788,3885322,3885964,-1,0.37065},
-{2966789,3885964,3886374,-1,0.284},
-{2966790,3886374,3886770,-1,0.27189},
-{2966791,3886770,3887153,-1,0.289966666666667},
-{2966792,3887773,3888338,-1,0.268147826086957},
-{2966793,3884597,3885036,0.320775,-1},
-{2966794,3885036,3885626,0.46188,-1},
-{2966795,3885626,3886061,-1,0.368228571428571},
-{2966796,3886061,3886445,0.3339375,-1},
-{2966797,3886763,3887257,0.324142857142857,-1},
-{2966798,3887257,3887735,0.272714285714286,-1},
-{2966799,3884285,3884527,-1,0.179633333333333},
-{2966800,3884527,3884827,-1,0.147844444444444},
-{2966801,3884827,3885240,-1,0.269685714285714},
-{2966802,3885240,3885626,-1,0.664411764705882},
-{2966803,3885626,3885964,-1,0.52071},
-{2966804,3885964,3886246,-1,0.392714285714286},
-{2966805,3886374,3886595,0.640984615384615,-1},
-{2966806,3886061,3886374,0.54141,-1},
-{2966807,3885650,3886061,0.659810526315789,-1},
-{2966808,3884404,3884808,0.189046153846154,0.223418181818182},
-{2966809,3884808,3885140,0.163425,0.13074},
-{2966810,3885140,3885792,-1,0.33045},
-{2966811,3884812,3886025,0.563808,-1},
-{2966812,3886025,3886999,0.527088,-1},
-{2966813,3886025,3886345,0.295025,-1},
-{2966814,3887735,3888676,0.428856,-1},
-{2966815,3888676,3889303,0.3098,-1},
-{2966816,3889303,3889774,0.278154545454545,-1},
-{2966817,3888338,3889368,-1,0.477814285714286},
-{2966818,3889882,3890313,-1,0.3057},
-{2966819,3890313,3890551,-1,0.195726315789474},
-{2966820,3888338,3888712,0.441284210526316,-1},
-{2966821,3888043,3888338,0.265368,-1},
-{2966822,3887735,3888043,0.30537,-1},
-{2966823,3887358,3887735,0.389571428571429,-1},
-{2966824,3889368,3890015,-1,0.451823076923077},
-{2966825,3888676,3889010,-1,0.253371428571429},
-{2966826,3888112,3888676,-1,0.351408},
-{2966827,3886999,3887358,0.359209090909091,-1},
-{2966828,3887514,3888112,-1,0.341544},
-{2966829,3886345,3887514,-1,0.812463157894737},
-{2966830,3889774,3889989,0.184942857142857,-1},
-{2966831,3890551,3890890,-1,0.240085714285714},
-{2966832,3890890,3890957,0.09831,0.0756230769230769},
-{2966833,3886721,3887082,0.255247058823529,0.309942857142857},
-{2966834,3887082,3887774,0.42436875,0.484992857142857},
-{2966835,3887774,3888549,0.180829787234043,0.193159090909091},
-{2966836,3888549,3889387,0.399325,0.281876470588235},
-{2966837,3890879,3891528,0.20786511627907,0.21800487804878},
-{2966838,3891528,3892047,0.159587234042553,0.159587234042553},
-{2966839,3892047,3893439,0.415097872340426,0.433546666666667},
-{2966840,3893439,3894253,0.489507692307692,0.47727},
-{2966841,3890573,3891206,0.293882352941176,0.333066666666667},
-{2966842,3891812,3893008,0.548785714285714,0.548785714285714},
-{2966843,3893008,3893477,0.562727272727273,0.442142857142857},
-{2966844,3893836,3894383,0.392552941176471,0.385003846153846},
-{2966845,3894383,3895130,0.5686625,0.58076170212766},
-{2966846,3897620,3897945,0.228244444444444,0.228244444444444},
-{2966847,3897025,3896417,0.313034482758621,0.313034482758621},
-{2966848,3897620,3897025,0.308441379310345,0.3727},
-{2966849,3896417,3896710,0.21004,0.21004},
-{2966850,3897062,3896710,0.361228571428572,0.270921428571429},
-{2966851,3897660,3897062,0.217786363636364,0.245707692307692},
-{2966852,3897062,3896753,0.162812903225806,0.186933333333333},
-{2966853,3896753,3896692,0.0410516129032258,0.0438827586206897},
-{2966854,3896692,3896473,0.1672,0.191085714285714},
-{2966855,3882008,3882417,0.342966666666667,-1},
-{2966856,3884174,3884766,0.50472,-1},
-{2966857,3890551,3891439,0.819947368421053,-1},
-{2966858,3899992,3900723,0.306165517241379,0.286412903225806},
-{2966859,3900723,3900988,0.129816,0.115907142857143},
-{2966860,3900892,3900988,0.214927272727273,0.22164375},
-{2966861,3900988,3901522,0.257478260869565,0.257478260869565},
-{2966862,3901522,3902287,0.470717647058824,0.40011},
-{2966863,3900988,3901802,0.399852631578947,0.446894117647059},
-{2966864,3901802,3902031,0.08952,-1},
-{2966865,3902287,3902673,0.170856,0.164284615384615},
-{2966866,3900544,3900611,0.0574682926829268,0.047124},
-{2966867,3901167,3900611,-1,0.282391304347826},
-{2966868,3901167,3901653,0.2219,-1},
-{2966869,3901653,3902654,0.430375,0.430375},
-{2966870,3902031,3901957,0.0984,0.0849818181818182},
-{2966871,3901957,3901680,0.39534,0.39534},
-{2966872,3901680,3901653,0.112,0.138352941176471},
-{2966873,3901653,3901616,0.203057142857143,0.218676923076923},
-{2966874,3901616,3901591,0.139179310344828,0.149488888888889},
-{2966875,3901591,3901571,0.0698322580645161,0.0832615384615385},
-{2966876,3901571,3901559,0.0986666666666667,0.111},
-{2966877,3900611,3901435,0.673604651162791,0.629673913043478},
-{2966878,3901435,3901578,0.0590275862068966,0.05349375},
-{2966879,3901578,3902475,0.321475862068966,0.266365714285714},
-{2966880,3903103,3903051,0.243323076923077,0.253056},
-{2966881,3902673,3903051,0.239242105263158,0.206618181818182},
-{2966882,3902654,3902685,0.214690909090909,0.202422857142857},
-{2966883,3902645,3902654,0.145781818181818,0.133633333333333},
-{2966884,3902645,3902641,0.143047058823529,0.143047058823529},
-{2966885,3902654,3903791,0.5428,0.5664},
-{2966886,3902641,3902627,0.13772,0.142468965517241},
-{2966887,3902627,3902545,0.290925,0.31032},
-{2966888,3903048,3903675,0.284723076923077,0.2313375},
-{2966889,3903714,3903675,0.1757,0.18825},
-{2966890,3903714,3903756,0.10760625,0.111077419354839},
-{2966891,3903756,3903774,0.0518896551724138,0.0518896551724138},
-{2966892,3903774,3903791,0.10916,0.112924137931034},
-{2966893,3901351,3901493,0.196594285714286,-1},
-{2966894,3901956,3902229,-1,0.189186206896552},
-{2966895,3904108,3902614,0.62270625,0.603836363636364},
-{2966896,3903774,3904497,0.3564,0.3564},
-{2966897,3904497,3904108,0.34821,0.357138461538462},
-{2966898,3903791,3903848,0.22306,0.202781818181818},
-{2966899,3905008,3904497,0.274475,0.274475},
-{2966900,3905192,3905008,0.104265306122449,0.111065217391304},
-{2966901,3905707,3905679,0.0256258064516129,0.031776},
-{2966902,3903848,3905008,0.517025,0.496344},
-{2966903,3903051,3904004,0.53115652173913,0.469869230769231},
-{2966904,3904004,3904911,0.489742857142857,0.428525},
-{2966905,3904911,3905138,0.224869565217391,0.246285714285714},
-{2966906,3892740,3893836,0.496664516129032,0.733171428571429},
-{2966907,3889406,3890573,0.563577777777778,0.800873684210526},
-{2966908,3888710,3889911,0.8017,0.72153},
-{2966909,3890216,3890527,0.174724137931034,0.3166875},
-{2966910,3895299,3896051,0.495991304347826,0.7129875},
-{2966911,3896051,3896496,0.31623,0.287481818181818},
-{2966912,3888897,3889636,0.252327272727273,0.20817},
-{2966913,3884379,3884105,-1,0.359357142857143},
-{2966914,3891127,3891190,0.0245666666666667,0.0276375},
-{2966915,3879055,3879455,0.28916,-1},
-{2966916,3879455,3879534,0.0724,-1},
-{2966917,3879534,3879788,0.243766666666667,-1},
-{2966918,3879788,3880240,0.42801,-1},
-{2966919,3879082,3879225,-1,0.09808},
-{2966920,3880637,3880207,-1,-1},
-{2966921,3880207,3880056,-1,-1},
-{2966922,3880397,3880240,-1,0.353266666666667},
-{2966923,3879099,3879670,-1,0.711692307692308},
-{2966924,3879225,3879485,-1,0.184966666666667},
-{2966925,3879485,3879969,-1,0.534282352941176},
-{2966926,3879969,3880207,-1,-1},
-{2966927,3879969,3880240,-1,0.35932},
-{2966928,3880056,3879875,-1,-1},
-{2966929,3879875,3879670,-1,-1},
-{2966930,3879670,3879985,-1,0.331136842105263},
-{2966931,3879670,3879116,0.502357894736842,-1},
-{2966932,3880056,3880449,-1,0.4439625},
-{2966933,3880449,3881226,-1,0.65961},
-{2966934,3879985,3880735,-1,0.657371428571429},
-{2966935,3880735,3880991,-1,0.232833333333333},
-{2966936,3879788,3879949,0.3348,-1},
-{2966937,3880676,3880738,0.0486333333333333,0.036475},
-{2966938,3876495,3876476,-1,0.207075},
-{2966939,3878458,3878336,0.0952090909090909,-1},
-{2966940,3878336,3878190,0.129572727272727,-1},
-{2966941,3878190,3878045,0.10293,-1},
-{2966942,3878336,3878484,-1,0.212785714285714},
-{2966943,3878674,3878780,-1,0.1299},
-{2966944,3877892,3877740,-1,-1},
-{2967325,3905414,3905498,-1,0.0223444444444444},
-{2967326,3904638,3904818,-1,0.0483962264150943},
-{2967327,3904232,3904638,-1,0.141436363636364},
-{2967328,3904066,3904232,-1,0.097775},
-{2967329,3899819,3899961,0.0495365853658537,0.119470588235294},
-{2967330,3899961,3900359,0.122660869565217,0.148484210526316},
-{2967331,3900359,3900685,0.120587234042553,0.118075},
-{2967332,3903057,3902542,0.193714285714286,0.198439024390244},
-{2967333,3903356,3903947,0.2035375,0.199383673469388},
-{2967334,3901497,3900925,0.395378571428571,0.299205405405405},
-{2967335,3901249,3900685,0.379241379310345,0.354774193548387},
-{2967336,3901497,3901967,0.267182608695652,0.267182608695652},
-{2967337,3901967,3902566,0.222075,0.273323076923077},
-{2967338,3902566,3903057,0.274460869565217,0.22545},
-{2967340,3903947,3902374,1.0947,-1},
-{2967341,3899816,3900415,0.282278571428571,0.4939875},
-{2967342,3900415,3900519,0.05475,0.0464545454545455},
-{2967343,3900519,3900940,0.213827586206897,0.177171428571429},
-{2967344,3900940,3901249,0.160032,0.129058064516129},
-{2967345,3896864,3897181,0.116085,0.125497297297297},
-{2967346,3897181,3897644,0.195681081081081,0.160893333333333},
-{2967347,3897644,3897881,0.0968833333333333,0.0917842105263158},
-{2967348,3897881,3898324,0.3462,0.136657894736842},
-{2967349,3898464,3899120,0.241994117647059,0.27426},
-{2967350,3899374,3899817,0.1566,0.267525},
-{2967351,3899817,3900684,0.248508,0.248508},
-{2967352,3900684,3901729,0.283505882352941,0.272807547169811},
-{2967353,3900925,3899374,0.779897142857143,0.802835294117647},
-{2967354,3899374,3898987,0.20488,0.341466666666667},
-{2967355,3898987,3898503,0.163775510204082,0.1605},
-{2967356,3898503,3898030,0.1466375,0.163688372093023},
-{2967357,3898030,3897335,0.237416326530612,0.219498113207547},
-{2967358,3897335,3896657,0.327883333333333,0.319021621621622},
-{2967359,3898030,3898285,0.14024347826087,0.16128},
-{2967360,3898285,3898514,0.121176923076923,0.101632258064516},
-{2967361,3899412,3899911,0.272935714285714,0.283044444444444},
-{2967362,3899911,3900269,0.168455172413793,0.157587096774194},
-{2967363,3900269,3900592,0.1573875,0.152618181818182},
-{2967367,3897294,3897644,-1,0.331142857142857},
-{2967368,3897294,3897235,0.0384818181818182,-1},
-{2967369,3897235,3896594,0.562460869565217,-1},
-{2967370,3896594,3895663,0.970389473684211,-1},
-{2967371,3895663,3895103,0.38398064516129,0.495975},
-{2967372,3895103,3894487,0.538028571428571,0.322817142857143},
-{2967373,3893546,3892857,0.495275,-1},
-{2967375,3893307,3893605,0.181671428571429,0.203472},
-{2967376,3893605,3893822,0.232623529411765,0.146466666666667},
-{2967377,3899214,3899412,0.144624,0.144624},
-{2967378,3899214,3898559,0.279696774193548,0.255017647058824},
-{2967379,3898559,3898249,0.149731034482759,0.149731034482759},
-{2967380,3898249,3897752,0.5358,0.3948},
-{2967381,3897991,3897693,-1,0.174456},
-{2967382,3897693,3897202,-1,0.36},
-{2967383,3897202,3896724,0.34325,0.374454545454545},
-{2967384,3896724,3896235,0.330311111111111,0.318514285714286},
-{2967385,3897752,3897251,0.336946153846154,0.4867},
-{2967386,3897251,3896739,0.274875,0.251314285714286},
-{2967387,3897702,3898282,0.385125,0.36972},
-{2967389,3896235,3896739,0.350352,-1},
-{2967392,3895757,3896235,0.339432,-1},
-{2967396,3895407,3895865,-1,0.329515384615385},
-{2967428,3897251,3897702,-1,0.281792307692308},
-{2967429,3896724,3897251,-1,0.346296},
-{2967430,3896232,3896724,-1,0.314866666666667},
-{2967431,3900296,3902059,0.47226976744186,0.67692},
-{2967432,3902059,3903126,0.339018181818182,0.286861538461539},
-{2967433,3902273,3903384,0.332183333333333,0.298965},
-{2967434,3903044,3903258,0.080019512195122,0.102525},
-{2967435,3903258,3903711,0.163069565217391,0.166693333333333},
-{2967436,3902528,3902095,0.112897674418605,0.121365},
-{2967437,3902528,3902891,0.10983,0.10983},
-{2967438,3904530,3904800,0.1096125,0.113148387096774},
-{2967439,3904800,3904916,0.0367235294117647,0.0320153846153846},
-{2967440,3906621,3906139,0.353630769230769,0.372745945945946},
-{2967441,3906621,3907030,0.297038709677419,0.30694},
-{2967442,3907739,3907030,0.600155555555556,0.50638125},
-{2967518,3916464,3917126,0.203625,0.207957446808511},
-{2967519,3916452,3916712,0.13986976744186,0.182254545454545},
-{2967520,3916712,3916961,0.247992,0.258325},
-{2967521,3915648,3915906,0.18350625,0.133459090909091},
-{2967522,3915220,3915715,0.394514285714286,0.251054545454545},
-{2967523,3914702,3915220,0.274733333333333,0.282582857142857},
-{2967524,3915220,3915522,0.129572093023256,0.11370612244898},
-{2967526,3915220,3914679,0.323723076923077,0.323723076923077},
-{2967545,3917126,3917582,0.345222222222222,0.388375},
-{2967583,3922631,3923205,0.239506666666667,0.219955102040816},
-{2967584,3923205,3923732,0.23085,0.20729387755102},
-{2967616,3911189,3911713,0.35475,0.551833333333333},
-{2967617,3918853,3919119,0.167755555555556,0.129411428571429},
-{2967618,3918389,3918853,0.274885714285714,-1},
-{2967619,3917989,3918389,0.1914,-1},
-{2967620,3917203,3917489,0.101032653061224,-1},
-{2967621,3916926,3917203,0.103677551020408,-1},
-{2967622,3919119,3919299,0.145457142857143,0.145457142857143},
-{2967623,3919119,3919450,0.205982608695652,0.128043243243243},
-{2967624,3919794,3919856,0.0202829268292683,0.0189},
-{2967625,3919856,3920073,0.0822714285714286,0.0785318181818182},
-{2967626,3920073,3920149,0.027219512195122,0.0253636363636364},
-{2967627,3920149,3920423,0.087135,0.085009756097561},
-{2967628,3920423,3920505,0.0263526315789474,0.0278166666666667},
-{2967629,3920505,3920749,0.0919384615384615,0.128057142857143},
-{2967630,3920749,3920959,0.0741767441860465,0.0817846153846154},
-{2967631,3920959,3921063,0.0285272727272727,0.0298857142857143},
-{2967632,3921063,3921215,0.04976,0.0508909090909091},
-{2967633,3921215,3921379,0.0520266666666667,0.0520266666666667},
-{2967634,3921379,3921440,0.0187565217391304,0.0196090909090909},
-{2967635,3921440,3921562,0.0322434782608696,0.0337090909090909},
-{2967636,3921562,3921727,0.0475636363636364,0.0475636363636364},
-{2967637,3921727,3921930,0.0722153846153846,0.07041},
-{2967638,3918872,3918476,0.16409387755102,0.1675125},
-{2967639,3918476,3918314,0.0599764705882353,0.0624244897959184},
-{2967640,3918314,3918148,0.0573294117647059,0.0609125},
-{2967641,3918148,3917880,0.0963647058823529,0.1023875},
-{2967642,3917880,3917627,0.0862269230769231,0.089676},
-{2967643,3917268,3917533,0.110693023255814,0.103473913043478},
-{2967644,3914876,3915167,0.1155125,0.113155102040816},
-{2967645,3916587,3916912,0.184277419354839,0.142815},
-{2967646,3916229,3916587,0.18244,0.13683},
-{2967647,3917638,3917880,0.221,0.221},
-{2967648,3913016,3913425,0.215653846153846,0.17521875},
-{2967649,3912557,3913016,0.151251428571429,0.151251428571429},
-{2967650,3912141,3912557,0.182937931034483,0.151577142857143},
-{2967651,3911363,3911735,0.193714285714286,0.200888888888889},
-{2967652,3910992,3911363,0.201177777777778,0.217272},
-{2967653,3910600,3910992,0.210369230769231,0.237808695652174},
-{2967654,3910107,3910600,0.255681818181818,0.208333333333333},
-{2967655,3912873,3911735,0.554469230769231,0.497110344827586},
-{2967656,3911735,3912141,0.1982,0.191121428571429},
-{2967657,3911621,3911998,0.119386956521739,0.12204},
-{2967658,3911998,3912422,0.116208510638298,0.118734782608696},
-{2967659,3912422,3912873,0.129714285714286,0.129714285714286},
-{2967660,3912873,3913321,0.133095,0.126757142857143},
-{2967661,3913321,3913703,0.117081818181818,0.119804651162791},
-{2967662,3913703,3914145,0.118826666666667,0.124353488372093},
-{2967663,3914145,3914504,0.145735135135135,0.149783333333333},
-{2967664,3909706,3910107,0.26943,0.215544},
-{2967665,3909360,3909706,0.285971428571429,0.230976923076923},
-{2967666,3908975,3909360,0.259742857142857,0.218184},
-{2967667,3910387,3910815,0.136728571428571,0.143565},
-{2967668,3909954,3910387,0.124660465116279,0.141063157894737},
-{2967669,3909567,3909954,0.193821428571429,0.3391875},
-{2967670,3908168,3908585,0.26706,-1},
-{2967671,3909182,3909368,0.0877071428571429,0.0846827586206897},
-{2967672,3908789,3909182,0.15227027027027,0.148263157894737},
-{2967673,3908323,3908789,0.146092682926829,0.146092682926829},
-{2967674,3907749,3908168,0.297568421052632,0.297568421052632},
-{2967675,3907337,3907749,0.24895,0.271581818181818},
-{2967676,3906964,3907337,0.21245,0.21245},
-{2967677,3907067,3907012,0.175783333333333,0.180805714285714},
-{2967678,3907101,3907067,0.16239512195122,0.195829411764706},
-{2967679,3906424,3906054,0.173562162162162,0.14595},
-{2967680,3907147,3907101,0.20544375,0.212070967741935},
-{2967681,3907147,3906634,-1,0.1510875},
-{2967682,3907705,3907147,-1,0.17195625},
-{2967683,3907730,3907705,-1,0.182690909090909},
-{2967684,3907715,3907730,-1,0.16431724137931},
-{2967685,3907224,3907715,-1,0.1551},
-{2967686,3906644,3907224,-1,0.182148387096774},
-{2967687,3906633,3906644,-1,0.170558823529412},
-{2967688,3906634,3906633,-1,0.148181818181818},
-{2967689,3906634,3906096,0.3024,0.3248},
-{2967690,3906633,3906079,0.249669230769231,0.309114285714286},
-{2967691,3906079,3905478,0.188170588235294,0.236955555555556},
-{2967692,3905478,3904863,0.243724137931034,0.207882352941176},
-{2967693,3906054,3906464,0.167193103448276,0.193944},
-{2967694,3906464,3907012,0.2586,0.227568},
-{2967695,3907841,3908323,0.156814285714286,0.173321052631579},
-{2967696,3907378,3907841,0.17291052631579,0.182516666666667},
-{2967697,3907067,3907378,0.115533333333333,0.154044444444444},
-{2967698,3907378,3907012,0.231571428571429,0.221045454545455},
-{2967699,3907676,3907378,0.17172,0.165115384615385},
-{2967700,3908368,3907676,0.30808,0.355476923076923},
-{2967701,3909343,3909735,0.19932,0.19932},
-{2967702,3910629,3911029,0.239947826086957,0.250854545454545},
-{2967703,3911029,3911395,0.282978947368421,0.233765217391304},
-{2967704,3911395,3911783,0.218676923076923,0.2472},
-{2967705,3911783,3912199,0.212755555555556,0.24975652173913},
-{2967706,3907558,3907469,0.293335135135135,0.293335135135135},
-{2967707,3908565,3907980,-1,0.302688},
-{2967708,3907980,3907469,-1,0.2162},
-{2967709,3907469,3907908,0.2682,0.2682},
-{2967710,3907908,3908442,0.250371428571429,0.241737931034483},
-{2967711,3911189,3909985,0.628896,0.714654545454545},
-{2967712,3906592,3906959,0.190688888888889,0.190688888888889},
-{2967713,3906959,3907469,0.3414,0.3414},
-{2967714,3908442,3908014,0.13558,0.156438461538462},
-{2967715,3907469,3907428,0.256978378378378,0.264116666666667},
-{2967716,3908014,3907428,0.250336363636364,0.229475},
-{2967717,3907428,3906968,0.247248,0.280963636363636},
-{2967718,3907428,3907367,0.184095,0.23011875},
-{2967719,3907367,3907277,0.167355,0.176163157894737},
-{2967720,3909985,3909287,-1,0.41628},
-{2967721,3909287,3908442,-1,0.302022222222222},
-{2967722,3907277,3907224,0.21116,0.1979625},
-{2967723,3908340,3907715,0.362817391304348,0.298028571428571},
-{2967724,3909808,3909801,0.136432258064516,0.169176},
-{2967725,3909801,3909771,0.217824,0.217824},
-{2967726,3908379,3907730,0.197322580645161,0.174771428571429},
-{2967727,3909091,3908379,0.139353191489362,0.145546666666667},
-{2967728,3909771,3909091,0.153130434782609,0.160090909090909},
-{2967729,3910816,3909771,0.204853333333333,0.204853333333333},
-{2967730,3909808,3910370,0.255311111111111,0.265130769230769},
-{2967731,3910370,3910816,0.307863157894737,0.243725},
-{2967732,3906130,3905466,0.379084615384615,0.428530434782609},
-{2967733,3905466,3905237,0.146261538461538,0.135814285714286},
-{2967734,3905237,3904863,0.19678,0.227053846153846},
-{2967735,3906130,3906644,0.3462,0.321471428571429},
-{2967736,3905693,3906130,0.2496,0.2496},
-{2967737,3905266,3905693,0.218187096774194,0.21136875},
-{2967738,3904920,3905266,0.251625,0.3774375},
-{2967739,3903160,3903539,0.171133333333333,0.246432},
-{2967740,3903539,3903926,0.171836842105263,0.210638709677419},
-{2967741,3904863,3903926,0.359464285714286,0.359464285714286},
-{2967742,3903926,3904382,0.151663636363636,0.175610526315789},
-{2967743,3904382,3904813,0.166437209302326,0.152272340425532},
-{2967744,3907469,3906958,-1,0.251666666666667},
-{2967745,3906958,3906520,0.232644444444444,0.232644444444444},
-{2967746,3906520,3906145,0.307914285714286,0.307914285714286},
-{2967747,3906145,3905693,0.352705263157895,-1},
-{2967748,3905693,3905248,0.286625,0.327571428571429},
-{2967749,3905248,3904810,0.242764285714286,0.261438461538462},
-{2967750,3904810,3904407,0.236228571428571,0.236228571428571},
-{2967751,3904407,3903926,0.325571428571429,0.379833333333333},
-{2967752,3907705,3908368,0.319714285714286,0.331555555555556},
-{2967753,3908839,3908368,0.212111111111111,0.19748275862069},
-{2967754,3909090,3908839,0.0942324324324324,0.0996171428571429},
-{2967755,3880219,3880994,0.610227272727273,-1},
-{2967756,3879875,3880219,0.4218,-1},
-{2967757,3880716,3881386,0.54648,-1},
-{2967758,3881386,3881490,0.12004,-1},
-{2967759,3879049,3879455,0.259881818181818,-1},
-{2967760,3879061,3879485,0.2206,-1},
-{2967761,3881193,3880863,-1,0.238073684210526},
-{2967762,3880863,3880172,-1,0.6117},
-{2967763,3880172,3879884,-1,0.311611764705882},
-{2967764,3882057,3881680,0.678847058823529,-1},
-{2967765,3881644,3880940,-1,0.777075},
-{2967766,3882146,3881644,0.616235294117647,-1},
-{2967767,3882584,3882146,-1,0.6582},
-{2967768,3882723,3882584,-1,0.110337931034483},
-{2967769,3887882,3888069,0.100486956521739,0.0888923076923077},
-{2967770,3887688,3887882,0.0834,0.0744642857142857},
-{2967771,3889190,3889252,0.125755555555556,-1},
-{2967772,3889252,3888885,0.142177777777778,-1},
-{2967773,3888885,3888848,-1,-1},
-{2967905,3909955,3909128,0.319361538461538,0.319361538461538},
-{2967906,3910873,3909955,0.397285714285714,0.5562},
-{2967907,3911027,3910873,0.07845,0.142636363636364},
-{2967908,3910989,3910816,0.0335066666666667,0.0350651162790698},
-{2967909,3911929,3910989,0.207534782608696,0.1988875},
-{2967910,3912818,3911929,0.24376875,0.24376875},
-{2967911,3914075,3914334,0.182685714285714,0.1668},
-{2967912,3912397,3911929,-1,0.231688888888889},
-{2967913,3911929,3911321,0.364825,0.397990909090909},
-{2967914,3910816,3911321,0.247137931034483,0.298625},
-{2967915,3911321,3911711,0.2265,0.23556},
-{2967916,3911711,3912104,0.23425,0.22488},
-{2967917,3912104,3912553,-1,0.28065},
-{2967918,3911321,3910822,0.212961290322581,0.253915384615385},
-{2967919,3910822,3910355,0.197767741935484,0.197767741935484},
-{2967920,3910355,3909815,0.22748275862069,0.22748275862069},
-{2967921,3909815,3909667,0.110033333333333,0.0900272727272727},
-{2967922,3909667,3909343,0.337028571428571,0.337028571428571},
-{2967923,3909343,3909011,0.209127272727273,0.209127272727273},
-{2967924,3909011,3908853,0.05607,0.07476},
-{2967925,3908853,3908323,0.274475,0.227151724137931},
-{2967926,3908323,3907836,0.318228571428571,0.33414},
-{2967927,3907836,3907337,0.325542857142857,0.325542857142857},
-{2967928,3905294,3905214,0.336168,0.323238461538462},
-{2967929,3905214,3905129,0.0971052631578947,0.0838636363636364},
-{2967930,3905588,3905214,0.3028,0.286863157894737},
-{2967931,3906054,3905588,0.345,0.363157894736842},
-{2967932,3909090,3909369,0.104952631578947,0.0949571428571429},
-{2967933,3909369,3909771,0.228207692307692,0.19778},
-{2967934,3909369,3909823,0.272325,0.272325},
-{2967935,3909823,3910355,0.264408,0.254238461538462},
-{2967936,3910355,3910786,0.280285714285714,0.280285714285714},
-{2967937,3911202,3911598,0.206222222222222,0.206222222222222},
-{2967938,3911598,3911942,0.23115652173913,0.26583},
-{2967939,3911942,3912354,0.219048,0.238095652173913},
-{2967940,3912354,3912827,0.235625,0.2175},
-{2967941,3912827,3913308,0.22908,0.249},
-{2967942,3913308,3913729,0.22965,0.22965},
-{2967943,3913729,3914168,0.204533333333333,0.262971428571429},
-{2967944,3914168,3914528,0.191592857142857,0.243845454545455},
-{2967945,3914528,3914856,0.260914285714286,0.288378947368421},
-{2967946,3914856,3915147,0.249828571428571,0.249828571428571},
-{2967947,3913308,3912199,0.488533333333333,0.488533333333333},
-{2967948,3914288,3913308,0.471377777777778,0.471377777777778},
-{2967949,3914892,3914288,-1,-1},
-{2967950,3915189,3914892,-1,-1},
-{2967951,3912553,3912991,0.2224,0.296533333333333},
-{2967952,3912991,3913405,0.227375,0.237260869565217},
-{2967953,3913405,3913875,0.234175,0.255463636363636},
-{2967954,3913875,3914288,0.229008,0.23855},
-{2967955,3914189,3912991,-1,0.879388235294118},
-{2967956,3912991,3911942,0.454842857142857,0.489830769230769},
-{2967957,3911942,3911029,0.4376,0.690947368421053},
-{2967958,3911029,3909954,0.712105263157895,0.588260869565217},
-{2967959,3909954,3908975,0.791223529411765,0.67254},
-{2967960,3912199,3912649,0.202933333333333,0.238226086956522},
-{2967961,3912649,3913120,0.201777777777778,0.201777777777778},
-{2967962,3913120,3913529,0.204177777777778,0.204177777777778},
-{2967963,3913981,3912873,0.409945454545455,0.356005263157895},
-{2967964,3914856,3913981,0.29328,0.269338775510204},
-{2967965,3915147,3915439,0.204288888888889,0.204288888888889},
-{2967966,3915439,3915747,0.272936842105263,0.235718181818182},
-{2967967,3915747,3916078,0.3337125,0.281021052631579},
-{2967968,3915556,3914856,0.287918181818182,0.263925},
-{2967969,3916460,3915556,0.402681081081081,0.438211764705882},
-{2967970,3917334,3916460,0.616625,0.59196},
-{2967971,3914288,3914653,0.210484615384615,0.228025},
-{2967972,3914653,3914957,0.226725,0.217656},
-{2967973,3914957,3915250,0.1992,0.206861538461538},
-{2967974,3915250,3915556,0.27765,0.241434782608696},
-{2967975,3915556,3915887,0.27255,0.27255},
-{2967976,3915887,3916206,0.27285,0.27285},
-{2967977,3916206,3916515,0.302082352941176,0.302082352941176},
-{2967978,3916515,3916851,0.28209,0.313433333333333},
-{2967979,3913981,3914358,0.27066,0.2082},
-{2967980,3914358,3914701,0.225913043478261,0.185571428571429},
-{2967981,3914997,3914701,0.190992857142857,0.222825},
-{2967982,3914997,3915273,0.2987,0.3360375},
-{2967983,3915969,3915616,0.157383333333333,0.17705625},
-{2967984,3915969,3916229,0.156,0.124},
-{2967985,3913321,3912141,0.838658823529412,0.838658823529412},
-{2967986,3913637,3913321,0.2115,0.158625},
-{2967987,3914358,3913637,0.313064516129032,0.359444444444444},
-{2967988,3915147,3914358,0.511038461538462,0.511038461538462},
-{2967989,3915887,3915147,0.502488,0.405232258064516},
-{2967990,3918284,3918623,0.240939130434783,0.191089655172414},
-{2967991,3917963,3918284,0.190355555555556,0.17132},
-{2967992,3917631,3917963,0.192471428571429,0.158505882352941},
-{2967993,3917334,3917631,0.190634482758621,0.167527272727273},
-{2967994,3917047,3917334,0.17444,0.158581818181818},
-{2967995,3916720,3917047,0.193903448275862,0.165388235294118},
-{2967996,3916370,3916720,0.199066666666667,0.185337931034483},
-{2967997,3916048,3916370,0.19928275862069,0.19928275862069},
-{2967998,3915611,3916048,0.249,0.249},
-{2967999,3915396,3915611,0.197936842105263,0.197936842105263},
-{2968000,3915114,3915396,0.246763636363636,0.258514285714286},
-{2968001,3914808,3915114,0.290242105263158,0.2626},
-{2968002,3915114,3914189,0.46723125,-1},
-{2968003,3915963,3915114,0.383769230769231,-1},
-{2968004,3914779,3914564,-1,0.127338461538462},
-{2968005,3914927,3914779,-1,0.068780487804878},
-{2968006,3915396,3914927,-1,0.188439130434783},
-{2968007,3916346,3915396,-1,0.627969230769231},
-{2968008,3914564,3914188,0.24195652173913,0.46375},
-{2968009,3914188,3913405,0.361292307692308,0.347911111111111},
-{2968010,3913405,3912354,0.454157142857143,0.410206451612903},
-{2968011,3911395,3910387,0.539544,0.499577777777778},
-{2968012,3910387,3909360,0.44998,0.499977777777778},
-{2968013,3917710,3917631,0.0689368421052632,0.0569478260869565},
-{2968014,3916398,3916749,0.196007142857143,0.219528},
-{2968015,3916749,3917042,0.1968,0.1968},
-{2968016,3917042,3917348,0.202844444444444,0.202844444444444},
-{2968017,3917348,3917638,0.188185714285714,0.188185714285714},
-{2968018,3917258,3917268,0.241476923076923,0.190254545454545},
-{2968019,3917989,3918428,0.265336363636364,0.243225},
-{2968020,3918428,3918658,0.0959828571428571,0.0959828571428571},
-{2968021,3918658,3918967,0.13861875,0.134418181818182},
-{2968022,3918967,3919262,0.174936,0.190147826086957},
-{2968023,3918967,3919794,0.589173913043478,0.615954545454545},
-{2968024,3919262,3919616,0.184992,0.220228571428571},
-{2968025,3919616,3919927,0.182112,0.206945454545455},
-{2968026,3919927,3920236,0.189875,0.189875},
-{2968027,3920236,3920578,0.1761,0.240978947368421},
-{2968028,3920578,3920884,0.174946153846154,0.2527},
-{2968029,3920884,3921218,0.199747826086957,0.218771428571429},
-{2968030,3921218,3921556,0.1886,0.215542857142857},
-{2968031,3921556,3921879,0.156492857142857,0.182575},
-{2968032,3919882,3920720,-1,1.45182},
-{2968033,3920720,3921556,0.530053846153846,0.530053846153846},
-{2968034,3920420,3920720,0.202718181818182,0.14866},
-{2968035,3920091,3920420,0.182,0.150620689655172},
-{2968036,3920091,3920884,0.563025,0.614209090909091},
-{2968037,3919786,3920091,0.184128,0.177046153846154},
-{2968038,3918806,3919117,0.167442857142857,0.180323076923077},
-{2968039,3918473,3918806,0.1396125,0.14892},
-{2968047,3922404,3922677,0.135972413793103,0.101107692307692},
-{2968048,3922060,3922404,0.12429,0.12429},
-{2968049,3918213,3918967,0.3864,0.490430769230769},
-{2968050,3916928,3917489,0.366365217391304,-1},
-{2968051,3916551,3916928,0.3233625,-1},
-{2968052,3911713,3913245,0.628008,0.461770588235294},
-{2968053,3913245,3913861,0.2589,0.177142105263158},
-{2968054,3913861,3914699,0.391632,0.279737142857143},
-{2968055,3912587,3913245,0.379130769230769,0.547633333333333},
-{2968120,3922277,3921967,0.20874,0.231933333333333},
-{2968121,3921967,3921644,0.143308695652174,0.140259574468085},
-{2968122,3921644,3921330,0.1363,0.116828571428571},
-{2968123,3921019,3920722,0.115765384615385,0.12808085106383},
-{2968124,3920722,3920382,0.127276363636364,0.15556},
-{2968125,3920382,3919754,0.284972727272727,0.338886486486487},
-{2968126,3921984,3922265,0.11975,0.148655172413793},
-{2968162,3918452,3918721,0.102384615384615,0.105078947368421},
-{2968163,3918721,3918997,0.0877826086956522,0.0897333333333333},
-{2968164,3918997,3919248,0.0812739130434783,0.0869441860465116},
-{2968165,3919248,3919541,0.10872972972973,0.1341},
-{2968166,3920060,3919541,0.370433333333333,0.360421621621622},
-{2968167,3920661,3920060,0.336541463414634,0.328528571428571},
-{2968168,3920060,3920379,0.13688,0.157938461538462},
-{2968169,3920379,3920648,0.0953121951219512,0.0831446808510638},
-{2968170,3920648,3920907,0.0845347826086957,0.0720111111111111},
-{2968171,3920907,3921207,0.0877659574468085,0.0763888888888889},
-{2968172,3921207,3921508,0.0897521739130435,0.0750654545454545},
-{2968173,3921508,3921819,0.086,0.0764444444444445},
-{2968424,3900265,3900502,0.13284,0.159408},
-{2968425,3900502,3900663,0.0735073170731707,0.0700883720930233},
-{2968426,3900663,3900727,0.0257857142857143,0.0230425531914894},
-{2968427,3900727,3900851,0.0517857142857143,0.0453125},
-{2968428,3901059,3901187,0.0417882352941176,0.0417882352941176},
-{2968429,3901187,3901242,0.0180588235294118,0.0180588235294118},
-{2968430,3901242,3901440,0.0600692307692308,0.0612470588235294},
-{2968431,3901440,3901675,0.07134,0.07134},
-{2968432,3901675,3901857,0.0739304347826087,0.068016},
-{2968433,3901857,3902176,0.0882255319148936,0.0863875},
-{2968434,3902176,3902219,0.0153551020408163,0.015675},
-{2968435,3902219,3902434,0.064925,0.064925},
-{2968436,3902434,3902667,0.0730565217391304,0.0685836734693877},
-{2968437,3902667,3902887,0.0791333333333333,0.0726734693877551},
-{2968438,3902887,3903175,0.110326829268293,0.102804545454545},
-{2968439,3903175,3903455,0.2712,0.149627586206897},
-{2968440,3903455,3903661,0.162175,0.25948},
-{2968441,3903661,3903726,0.0243142857142857,0.0291771428571429},
-{2968442,3903726,3903864,0.0506727272727273,0.0530857142857143},
-{2968443,3903864,3903972,0.0331125,0.0345521739130435},
-{2968444,3903972,3904101,0.03462,0.0353265306122449},
-{2968445,3904101,3904365,0.0767411764705883,0.0767411764705883},
-{2968446,3904365,3904581,0.0716235294117647,0.0702461538461538},
-{2968447,3904581,3904654,0.0255,0.0255},
-{2968448,3904654,3904925,0.0788117647058823,0.0788117647058823},
-{2968449,3904925,3905149,0.0798765957446809,0.0798765957446809},
-{2968450,3905149,3905425,0.246284210526316,0.150948387096774},
-{2968451,3905425,3905622,0.107078571428571,0.1578},
-{2968452,3905622,3905814,0.0708139534883721,0.087},
-{2968453,3905814,3906155,0.10122,0.10768085106383},
-{2968454,3906155,3906193,0.0151038461538462,0.0160285714285714},
-{2968455,3906193,3906439,0.0858117647058823,0.0893142857142857},
-{2968456,3906439,3906779,0.102129411764706,0.106297959183673},
-{2968457,3906779,3906830,0.0127132075471698,0.014336170212766},
-{2968458,3906830,3907136,0.0836588235294118,0.085332},
-{2968459,3907136,3907273,0.0409269230769231,0.042564},
-{2968460,3907273,3907596,0.0828905660377358,0.0861411764705882},
-{2968461,3907596,3908381,0.202673076923077,0.224234042553191},
-{2968462,3908381,3908523,0.0340909090909091,0.0294117647058824},
-{2968463,3908523,3908725,0.0640468085106383,0.060204},
-{2968464,3908725,3909222,0.134258823529412,0.131676923076923},
-{2968465,3909222,3909420,0.0581307692307692,0.060456},
-{2968466,3909420,3909532,0.025692,0.0262163265306122},
-{2968467,3909532,3910139,0.240566666666667,0.262436363636364},
-{2968468,3910139,3910675,0.14553488372093,0.15645},
-{2968469,3910675,3911011,0.105413333333333,0.128205405405405},
-{2968470,3911282,3911597,0.121136842105263,0.127866666666667},
-{2968471,3911597,3911776,0.07272,0.0786162162162162},
-{2968472,3911776,3911897,0.040515,0.0450166666666667},
-{2968473,3911897,3912221,0.180936,0.173976923076923},
-{2968474,3912221,3912542,0.237423529411765,0.212431578947368},
-{2968475,3912542,3912605,0.0275769230769231,0.0256071428571429},
-{2968479,3901769,3902101,0.678912,0.628622222222222},
-{2968480,3901769,3902514,-1,0.3519},
-{2968481,3901724,3901769,0.171063157894737,0.154771428571429},
-{2968482,3901724,3902445,0.4710375,-1},
-{2968483,3903353,3903693,0.159664285714286,0.178824},
-{2968484,3903693,3903992,0.0866769230769231,0.0913621621621622},
-{2968485,3903992,3904660,0.185776744186046,0.1902},
-{2968486,3904660,3905107,0.12212,0.130842857142857},
-{2968487,3905107,3905347,0.0826105263157895,0.0872},
-{2968488,3905347,3906093,0.57054375,0.536982352941176},
-{2968489,3905347,3905529,0.08036,0.0777677419354839},
-{2968490,3905240,3905529,0.239314285714286,0.231062068965517},
-{2968491,3905066,3905240,0.132193548387097,0.120529411764706},
-{2968492,3904850,3905066,0.12834375,0.12834375},
-{2968493,3904528,3904850,0.229007142857143,0.246623076923077},
-{2968494,3903785,3904528,0.837573913043478,0.66428275862069},
-{2968495,3903615,3903785,0.189547826086957,0.161466666666667},
-{2968496,3901926,3902378,-1,0.147948387096774},
-{2968497,3902378,3902515,-1,0.0347384615384615},
-{2968498,3902515,3902804,-1,0.0778682926829268},
-{2968499,3902804,3903047,-1,0.06855},
-{2968500,3903047,3903390,-1,0.105113513513513},
-{2968501,3903390,3903588,-1,0.083625},
-{2968502,3903588,3903881,-1,0.25036},
-{2968503,3904348,3904420,0.15038,0.145529032258065},
-{2968504,3904297,3904348,0.0736186046511628,0.077209756097561},
-{2968505,3904257,3904297,0.0653869565217391,0.0699488372093023},
-{2968506,3904181,3904257,0.0848875,0.0905466666666667},
-{2968507,3904135,3904181,0.07345,0.0750127659574468},
-{2968508,3904068,3904135,0.0726,0.0726},
-{2968509,3904037,3904068,0.0543,0.0532352941176471},
-{2968510,3903999,3904037,0.056808,0.0556941176470588},
-{2968511,3903986,3903999,0.0944042553191489,0.0944042553191489},
-{2968512,3904048,3903986,0.116692682926829,0.11961},
-{2968513,3904603,3904871,0.149177142857143,0.145033333333333},
-{2968514,3904971,3905017,0.03121875,0.0262894736842105},
-{2968515,3905017,3905624,0.283637837837838,0.299845714285714},
-{2968516,3905624,3905878,0.127288888888889,0.122742857142857},
-{2968517,3905878,3906091,0.0882162162162162,0.075906976744186},
-{2968518,3904871,3905738,0.360216666666667,0.381405882352941},
-{2968519,3905738,3906662,0.345138461538462,0.345138461538462},
-{2968520,3906091,3906495,0.128795744680851,0.114215094339623},
-{2968521,3906495,3907449,0.2832,0.289636363636364},
-{2968522,3906735,3906774,0.0151714285714286,0.0148186046511628},
-{2968523,3906774,3906885,0.0444976744186047,0.0455571428571429},
-{2968524,3906885,3907082,0.078,0.0817142857142857},
-{2968525,3907082,3907449,0.199264285714286,0.199264285714286},
-{2968526,3907449,3907808,0.20168275862069,0.224953846153846},
-{2968527,3907808,3908265,0.1437125,0.140779591836735},
-{2968528,3908265,3908767,0.13755,0.143052},
-{2968529,3908767,3909516,0.24945652173913,0.255},
-{2968530,3909982,3910308,0.088725,0.088725},
-{2968531,3910653,3910955,0.102808695652174,0.098525},
-{2968532,3910955,3911799,0.271016326530612,0.2766625},
-{2968533,3908599,3909163,0.163857142857143,0.160046511627907},
-{2968534,3908017,3908599,0.175695,0.156173333333333},
-{2968535,3907449,3908017,0.174945,0.170678048780488},
-{2968536,3905017,3905255,0.134335714285714,0.163539130434783},
-{2968537,3905255,3905453,0.146228571428571,0.122832},
-{2968538,3905453,3905553,0.09968,0.0786947368421053},
-{2968539,3905553,3905774,0.17478,0.17478},
-{2968540,3905774,3906091,0.305333333333333,0.2748},
-{2968541,3910187,3910562,0.12009375,0.19215},
-{2968542,3910562,3910907,0.15012,0.204709090909091},
-{2968543,3910907,3911427,0.259088888888889,0.23318},
-{2968544,3912638,3913258,0.21129375,0.204890909090909},
-{2968545,3912055,3912771,0.332711111111111,0.499066666666667},
-{2968546,3912771,3913158,0.117015,0.15602},
-{2968547,3901568,3901781,0.0813428571428571,0.0830375},
-{2968548,3901350,3901568,0.09495,0.0930122448979592},
-{2968549,3900687,3901103,0.16465,0.168153191489362},
-{2968550,3900499,3900687,0.0807918367346939,0.079176},
-{2968551,3900339,3900499,0.0686705882352941,0.0745148936170213},
-{2968552,3900281,3900339,0.0204734693877551,0.0228},
-{2968553,3900148,3900281,0.0512875,0.0631230769230769},
-{2968554,3900102,3900148,0.0174837209302326,0.0179},
-{2968555,3899900,3900102,0.0842181818181818,0.0861767441860465},
-{2968556,3899692,3899900,0.0840734693877551,0.0915466666666667},
-{2968557,3899490,3899692,0.0783529411764706,0.0815510204081633},
-{2968558,3899211,3899490,0.1054625,0.103310204081633},
-{2968559,3899043,3899211,0.0765285714285714,0.0698739130434783},
-{2968560,3898789,3899043,0.136216666666667,0.129047368421053},
-{2968561,3898650,3898871,0.10986,0.118767567567568},
-{2968562,3898460,3898650,0.071025,0.0811714285714286},
-{2968563,3898276,3898460,0.06768,0.0752},
-{2968564,3897785,3898276,0.238337142857143,0.397228571428571},
-{2968565,3898970,3899215,0.103445454545455,0.101146666666667},
-{2968566,3899215,3900148,0.464708108108108,0.39986511627907},
-{2968567,3897066,3897785,0.434981818181818,0.368061538461538},
-{2968568,3896514,3897066,0.242910638297872,0.253706666666667},
-{2968569,3898642,3898848,0.1134,0.1782},
-{2968570,3898848,3899008,0.0734368421052631,0.069765},
-{2968571,3899008,3899132,0.0434045454545455,0.04244},
-{2968572,3899132,3899399,0.10772,0.1009875},
-{2968573,3898862,3899312,0.25869375,0.4599},
-{2968574,3899312,3899645,0.154772727272727,0.144893617021277},
-{2968575,3899645,3899887,0.102381818181818,0.0979304347826087},
-{2968576,3899887,3900143,0.106540909090909,0.0997404255319149},
-{2968577,3900143,3900231,0.045153488372093,0.0422086956521739},
-{2968578,3900231,3900393,0.065504347826087,0.0614938775510204},
-{2968579,3900393,3900620,0.1033375,0.099204},
-{2968580,3900620,3900834,0.0901021276595745,0.0830352941176471},
-{2968581,3900834,3901052,0.0869617021276596,0.0801411764705882},
-{2968582,3901052,3901235,0.0770170212765958,0.0738734693877551},
-{2968583,3901235,3901319,0.0254125,0.0259531914893617},
-{2968584,3901319,3901413,0.042475,0.042475},
-{2968585,3901413,3901660,0.0922285714285714,0.0922285714285714},
-{2968586,3901660,3901866,0.08235,0.08235},
-{2968587,3901866,3902104,0.0830170212765958,0.0812875},
-{2968588,3902104,3902351,0.0881617021276596,0.0881617021276596},
-{2968589,3902351,3902594,0.0878297872340426,0.0917333333333333},
-{2968590,3902594,3902837,0.0969260869565217,0.0928875},
-{2968591,3902837,3903064,0.0891391304347826,0.082008},
-{2968592,3903064,3903269,0.0889695652173913,0.0835224489795918},
-{2968593,3903269,3903489,0.09608,0.0919914893617021},
-{2968594,3903489,3903682,0.0930933333333333,0.089131914893617},
-{2968595,3903682,3903905,0.089895652173913,0.0879829787234043},
-{2968596,3903905,3904174,0.0941608695652174,0.0962533333333333},
-{2968597,3904174,3904385,0.0959441860465116,0.09168},
-{2968598,3904385,3904603,0.104473170731707,0.101985714285714},
-{2968599,3906403,3906662,0.125413636363636,0.122626666666667},
-{2968600,3906199,3906403,0.0908086956521739,0.083544},
-{2968601,3905986,3906199,0.083448,0.0802384615384615},
-{2968602,3905766,3905986,0.08292,0.0767777777777778},
-{2968603,3905551,3905766,0.083376,0.0772},
-{2968604,3905343,3905551,0.0822705882352941,0.0777},
-{2968605,3904507,3904650,0.060276,0.0627875},
-{2968606,3904290,3904507,0.100295454545455,0.0848653846153846},
-{2968607,3904129,3904290,0.0703411764705882,0.0689884615384615},
-{2968608,3903892,3904129,0.0767769230769231,0.0767769230769231},
-{2968609,3903698,3903892,0.0729807692307692,0.0729807692307692},
-{2968610,3903519,3903698,0.077,0.077},
-{2968611,3903270,3903519,0.0988775510204082,0.0988775510204082},
-{2968612,3903054,3903270,0.075725,0.0741795918367347},
-{2968613,3902453,3903054,0.187640816326531,0.180282352941176},
-{2968614,3901819,3902453,0.183624,0.183624},
-{2968615,3901252,3901819,0.177917647058824,0.174496153846154},
-{2968616,3897409,3897667,0.211254545454545,0.2582},
-{2968617,3897667,3897870,0.142,0.13632},
-{2968618,3897870,3898129,0.160539130434783,0.167836363636364},
-{2968619,3898129,3898386,0.14448,0.138923076923077},
-{2968620,3898386,3898655,0.211457142857143,0.22203},
-{2968621,3898655,3899006,0.231875,0.2226},
-{2968622,3899006,3899301,0.181128,0.22641},
-{2968623,3899301,3899388,0.0860210526315789,0.0908},
-{2968624,3899676,3899747,0.0509142857142857,0.042768},
-{2968625,3899747,3899997,0.18115,0.207028571428571},
-{2968626,3899997,3900311,0.211581818181818,0.221657142857143},
-{2968627,3900311,3900353,0.0292444444444444,0.03948},
-{2968628,3900353,3900548,0.207317647058824,0.207317647058824},
-{2968629,3900548,3900750,0.184714285714286,-1},
-{2968630,3900750,3900996,0.13938,-1},
-{2968631,3900996,3901111,0.0625555555555556,-1},
-{2968632,3901111,3901254,0.0838384615384615,-1},
-{2968633,3901254,3901482,0.139688888888889,-1},
-{2968634,3901482,3901701,0.106527272727273,-1},
-{2968635,3901701,3901992,0.131509090909091,-1},
-{2968636,3901992,3902338,0.126868421052632,-1},
-{2968637,3902338,3902578,0.15944347826087,-1},
-{2968638,3901244,3901564,0.373661538461538,0.194304},
-{2968639,3901021,3901244,0.0863318181818182,0.0844133333333333},
-{2968640,3900793,3901021,0.0840857142857143,0.087663829787234},
-{2968641,3900541,3900793,0.0766961538461538,0.0813918367346939},
-{2968642,3900374,3900541,0.067128,0.069925},
-{2968643,3900303,3900374,0.02094,0.0213673469387755},
-{2968644,3900122,3900303,0.055572,0.0591191489361702},
-{2968645,3899965,3900122,0.0485375,0.0506478260869565},
-{2968646,3899866,3899965,0.0386181818181818,0.0395162790697674},
-{2968647,3899769,3899866,0.037185,0.0391421052631579},
-{2968648,3899600,3899769,0.07011,0.127472727272727},
-{2968649,3899148,3899382,-1,0.139044444444444},
-{2968650,3898412,3899148,-1,0.4273},
-{2968651,3899600,3900548,0.382815384615385,0.392889473684211},
-{2968652,3899083,3899148,0.0586666666666667,0.0459130434782609},
-{2968653,3898816,3899083,0.184281818181818,0.144792857142857},
-{2968654,3898741,3898816,0.06085,0.0540888888888889},
-{2968655,3898569,3898741,0.12843,0.0917357142857143},
-{2968656,3898444,3898569,0.0913826086956522,0.0724758620689655},
-{2968657,3898234,3898444,0.150028571428571,0.136982608695652},
-{2968658,3897884,3898234,0.220172727272727,0.24219},
-{2968659,3897618,3897884,0.197454545454545,0.255529411764706},
-{2968660,3898357,3898718,0.241075,0.321433333333333},
-{2968661,3898718,3898866,0.0576139534883721,0.0563045454545455},
-{2968662,3898866,3898925,0.0207681818181818,0.0198652173913043},
-{2968663,3898925,3899190,0.0886666666666667,0.0848936170212766},
-{2968664,3899190,3899315,0.0469787234042553,0.04416},
-{2968665,3899315,3899434,0.0418565217391304,0.038508},
-{2968666,3899434,3899605,0.0648260869565217,0.0608571428571429},
-{2968667,3899605,3899820,0.0709914893617021,0.066732},
-{2968668,3899820,3899923,0.042375,0.04068},
-{2968669,3899923,3900134,0.062675,0.060168},
-{2968670,3900134,3900230,0.0338553191489362,0.031824},
-{2968671,3900230,3900340,0.0338170212765957,0.0324367346938776},
-{2968672,3900340,3900436,0.0395125,0.0387061224489796},
-{2968673,3900436,3900525,0.0301404255319149,0.0295125},
-{2968674,3900525,3900638,0.0461617021276596,0.0461617021276596},
-{2968675,3900638,3900714,0.0250304347826087,0.0239875},
-{2968676,3900714,3900895,0.066525,0.0694173913043478},
-{2968677,3900895,3901177,0.110762790697674,0.108245454545455},
-{2968678,3901177,3901450,0.185504347826087,0.125488235294118},
-{2968679,3901450,3902456,0.333381818181818,0.444509090909091},
-{2968680,3901450,3901709,0.12968,0.1621},
-{2968681,3901709,3901920,0.0837,0.0904864864864865},
-{2968682,3901920,3902067,0.0562428571428571,0.0549348837209302},
-{2968683,3902067,3902154,0.0211363636363636,0.0221428571428571},
-{2968684,3902154,3902234,0.0300681818181818,0.0300681818181818},
-{2968685,3902234,3902410,0.0544046511627907,0.0519866666666667},
-{2968686,3902410,3902738,0.10905652173913,0.10905652173913},
-{2968687,3902738,3902996,0.0905347826086957,0.09465},
-{2968688,3902996,3903257,0.0950571428571429,0.0973756097560976},
-{2968689,3903257,3903307,0.0234166666666667,0.0227837837837838},
-{2968690,3903307,3903527,0.37092,0.132471428571429},
-{2968691,3904043,3904244,0.078375,0.07125},
-{2968692,3904244,3904415,0.0593302325581395,0.05315},
-{2968693,3904415,3904703,0.101569565217391,0.0916117647058824},
-{2968694,3904703,3904806,0.0392553191489362,0.0361764705882353},
-{2968695,3904806,3905030,0.071595652173913,0.071595652173913},
-{2968696,3905030,3905204,0.062525,0.0652434782608696},
-{2968697,3905204,3905353,0.0562085106382979,0.0518},
-{2968698,3905353,3905434,0.0291066666666667,0.0272875},
-{2968699,3905434,3905910,0.156357446808511,0.146976},
-{2968700,3905910,3906356,0.16035,0.172082926829268},
-{2968701,3906356,3906606,0.102981818181818,0.0964085106382979},
-{2968702,3906606,3907328,0.202212244897959,0.198168},
-{2968703,3907328,3907684,0.112573333333333,0.123556097560976},
-{2968704,3907684,3908072,0.176357142857143,0.176357142857143},
-{2968705,3908072,3908095,0.0276,-1},
-{2968706,3908072,3908799,-1,0.271344},
-{2968707,3908799,3910166,-1,0.302018181818182},
-{2968708,3910166,3910837,0.213471428571429,0.145785365853659},
-{2968709,3910837,3912221,0.373621621621622,0.3456},
-{2968710,3908004,3908908,0.397585714285714,-1},
-{2968711,3904507,3905737,0.618931034482759,-1},
-{2968712,3903924,3904507,0.314169230769231,0.314169230769231},
-{2968713,3903574,3903924,0.183641379310345,0.204830769230769},
-{2968714,3902594,3903574,0.467516129032258,0.536777777777778},
-{2968715,3901350,3902594,0.53334375,0.656423076923077},
-{2968716,3905737,3906348,0.27571875,0.2941},
-{2968717,3906348,3906600,0.142722580645161,0.134072727272727},
-{2968718,3906600,3906860,0.0993333333333333,0.0941052631578947},
-{2968719,3906860,3907133,0.0968052631578947,0.102183333333333},
-{2968720,3907133,3907484,0.151309090909091,0.20805},
-{2968721,3907484,3907786,0.185582608695652,0.194018181818182},
-{2968722,3907113,3907786,-1,0.368775},
-{2968723,3906348,3906534,0.0712133333333333,0.0681829787234043},
-{2968724,3906534,3906889,0.0994695652173913,0.095325},
-{2968725,3906889,3907170,0.134485714285714,0.144830769230769},
-{2968726,3907170,3907716,0.204816666666667,0.189061538461538},
-{2968727,3907716,3908138,0.118633333333333,0.125611764705882},
-{2968728,3908138,3908616,0.1436,0.1436},
-{2968729,3907786,3908027,0.1650375,0.1650375},
-{2968730,3908027,3908824,-1,-1},
-{2968731,3908908,3909348,0.192931034482759,-1},
-{2968732,3909348,3909703,0.289664516129032,-1},
-{2968733,3908863,3909703,0.341822222222222,0.341822222222222},
-{2968734,3908027,3908291,0.178909090909091,0.178909090909091},
-{2968735,3908291,3908603,0.148377777777778,0.148377777777778},
-{2968736,3908603,3908908,0.194372727272727,0.194372727272727},
-{2968737,3906889,3907203,0.0889466666666666,0.0833875},
-{2968738,3907203,3907689,0.136378723404255,0.1335375},
-{2968739,3908072,3907689,0.115905,0.113078048780488},
-{2968740,3902846,3902961,0.0499469387755102,0.0499469387755102},
-{2968741,3902565,3902846,0.105855319148936,0.105855319148936},
-{2968742,3902289,3902565,0.0923478260869565,0.0923478260869565},
-{2968743,3901750,3902289,0.30178,0.30178},
-{2968744,3908072,3908507,0.129823255813954,0.118774468085106},
-{2968745,3908507,3908816,0.0834367346938776,0.0786230769230769},
-{2968746,3908816,3909135,0.0827755102040816,0.0765283018867925},
-{2968747,3909135,3909433,0.0830884615384615,0.0815207547169811},
-{2968748,3909433,3909712,0.083808,0.0873},
-{2968749,3909712,3910139,0.175924137931034,0.141716666666667},
-{2968750,3912221,3913428,0.389691891891892,0.360465},
-{2968751,3913428,3913759,0.10026,0.108389189189189},
-{2968752,3913759,3914090,0.117882352941176,0.167},
-{2968753,3913728,3914090,0.166511111111111,0.172915384615385},
-{2968754,3913037,3913361,0.139727272727273,0.112463414634146},
-{2968755,3912682,3913037,0.12015,0.08544},
-{2968756,3912353,3912682,0.111994285714286,0.0852130434782609},
-{2968757,3912103,3912353,0.096972972972973,0.0797333333333333},
-{2968758,3911844,3912103,0.0936162162162162,0.0769733333333333},
-{2968759,3910824,3911220,0.136355555555556,0.111563636363636},
-{2968760,3909532,3910824,0.52085625,0.505072727272727},
-{2968761,3911535,3911220,0.0993483870967742,0.1062},
-{2968762,3903905,3904862,0.588991304347826,0.521030769230769},
-{2968763,3904603,3905496,0.381705882352941,0.418645161290323},
-{2968764,3905496,3906403,0.464896551724138,0.408545454545455},
-{2968765,3904862,3905766,0.533544,0.635171428571429},
-{2968766,3905766,3907407,0.986765217391304,1.19450526315789},
-{2968767,3907407,3908291,0.453528,0.453528},
-{2968768,3899497,3899862,0.276704347826087,0.276704347826087},
-{2968769,3899862,3900687,0.615,0.615},
-{2968770,3906508,3907133,0.44145,0.44145},
-{2968771,3905144,3906508,0.777969230769231,0.777969230769231},
-{2968772,3903269,3904252,0.5424,0.5424},
-{2968773,3899591,3899862,0.223933333333333,0.223933333333333},
-{2968774,3899344,3899591,0.174715384615385,0.146535483870968},
-{2968775,3899591,3900499,0.4862625,0.51868},
-{2968776,3900499,3901660,0.57944,0.599420689655172},
-{2968777,3899900,3901052,0.72185,0.618728571428571},
-{2968778,3901660,3902786,0.53955,0.604296},
-{2968779,3902786,3903187,0.259173913043478,0.248375},
-{2968780,3903187,3903698,0.353809090909091,0.353809090909091},
-{2968781,3902144,3902418,0.122648275862069,0.11856},
-{2968782,3902418,3902607,0.110112,0.105876923076923},
-{2968783,3902607,3903054,0.311672727272727,0.298121739130435},
-{2968784,3903054,3903346,0.21951,0.209057142857143},
-{2968785,3903346,3903593,0.132527272727273,0.141077419354839},
-{2968786,3903593,3903895,0.23,0.20125},
-{2968787,3903895,3904243,0.203875,0.188192307692308},
-{2968788,3904243,3904564,0.140627027027027,0.148662857142857},
-{2968789,3904564,3904817,0.1464,0.152030769230769},
-{2968790,3904817,3905076,0.13186,0.179809090909091},
-{2968791,3905076,3905910,0.516576923076923,0.516576923076923},
-{2968792,3903105,3903770,0.392957142857143,0.407511111111111},
-{2968793,3902846,3903105,0.188781818181818,0.230733333333333},
-{2968794,3902846,3902781,0.0438,0.0707538461538462},
-{2968795,3902460,3902781,0.245084210526316,0.194025},
-{2968796,3902151,3902460,0.208228571428571,0.14576},
-{2968797,3901819,3902151,0.21711,0.160822222222222},
-{2968798,3901362,3901819,0.342571428571429,0.342571428571429},
-{2968799,3900886,3901362,0.2502,0.278},
-{2968800,3900421,3900886,0.234658064516129,0.202066666666667},
-{2968801,3900143,3900421,0.156577777777778,0.192163636363636},
-{2968802,3898871,3899392,0.304464,-1},
-{2968803,3899392,3899887,0.258868965517241,-1},
-{2968804,3897576,3897832,-1,-1},
-{2968805,3897832,3898318,-1,-1},
-{2968806,3898318,3898848,-1,0.441035294117647},
-{2968807,3899008,3899769,0.424776923076923,-1},
-{2968808,3902456,3903455,0.574592307692308,0.439394117647059},
-{2968809,3903455,3904410,0.386368421052632,0.815666666666667},
-{2968810,3904410,3905334,0.349171428571429,0.4582875},
-{2968811,3907847,3908282,-1,0.199907142857143},
-{2968812,3907549,3907847,-1,0.133838709677419},
-{2968813,3907265,3907549,-1,0.142644444444444},
-{2968814,3907265,3907424,0.12006,0.0923538461538462},
-{2968815,3907424,3908048,0.41838,0.298842857142857},
-{2968816,3908048,3908862,0.403133333333333,0.403133333333333},
-{2968817,3908862,3909635,0.436536,0.436536},
-{2968818,3909098,3910063,0.263916666666667,0.231731707317073},
-{2968819,3910063,3910706,0.168225,0.141663157894737},
-{2968820,3910706,3910824,0.0459677419354839,0.0407142857142857},
-{2968821,3908750,3909051,0.118235294117647,0.129677419354839},
-{2968822,3909051,3909347,0.11175,0.129774193548387},
-{2968823,3909347,3909635,0.133741935483871,0.148071428571429},
-{2968824,3909635,3909952,0.140275862068966,0.150666666666667},
-{2968825,3909952,3910284,0.13501935483871,0.13952},
-{2968826,3910284,3910681,0.1366,0.155441379310345},
-{2968827,3913037,3914135,0.511777777777778,0.511777777777778},
-{2968828,3912671,3913037,0.20517,0.170975},
-{2968829,3912671,3912329,0.132558620689655,0.142377777777778},
-{2968830,3912035,3912329,0.134442857142857,0.12548},
-{2968831,3911730,3912035,0.120476470588235,0.120476470588235},
-{2968832,3911282,3911730,0.313828571428571,0.313828571428571},
-{2968833,3907970,3908381,0.223275,0.243572727272727},
-{2968834,3907647,3907970,0.13528,0.156092307692308},
-{2968835,3907365,3907647,0.147857142857143,0.147857142857143},
-{2968836,3907032,3907365,0.143441379310345,0.143441379310345},
-{2968837,3906727,3907032,0.13508,0.150088888888889},
-{2968838,3906356,3906727,0.223753846153846,0.252939130434783},
-{2968839,3896306,3896690,0.19886,0.180781818181818},
-{2968840,3897796,3898020,0.215933333333333,0.19434},
-{2968841,3896012,3896306,0.1839,0.169753846153846},
-{2968842,3897301,3897796,0.385736842105263,0.333136363636364},
-{2968843,3896690,3897301,0.417707142857143,0.417707142857143},
-{2968844,3896588,3896764,0.148827272727273,0.148827272727273},
-{2968845,3893671,3893620,0.101853658536585,0.1044},
-{2968846,3893620,3893574,0.0974634146341463,0.0999},
-{2968847,3893675,3893941,0.152711111111111,0.152711111111111},
-{2968848,3893941,3894240,0.187852173913043,0.187852173913043},
-{2968849,3894240,3894826,0.280778571428571,0.357354545454545},
-{2968850,3894564,3894826,-1,0.291438461538462},
-{2968851,3894261,3894564,0.394766666666667,0.322990909090909},
-{2968852,3894261,3894120,0.19415,0.15532},
-{2968853,3903984,3904528,0.26088,0.2038125},
-{2968854,3903386,3903984,0.259862068965517,0.215314285714286},
-{2968855,3902932,3903386,0.205944,0.234027272727273},
-{2969718,3879276,3879251,-1,0.0742434782608696},
-{2969866,3880338,3880408,-1,-1},
-{2969867,3883377,3883596,0.0812896551724138,0.0714363636363636},
-{2969868,3882411,3882066,0.336494117647059,0.346690909090909},
-{2969869,3881523,3881869,0.154777777777778,0.144103448275862},
-{2969870,3881094,3881523,0.217178571428571,0.196161290322581},
-{2969871,3880864,3881094,0.1077,0.111688888888889},
-{2969872,3880424,3880864,0.240771428571429,0.232468965517241},
-{2969873,3880099,3880424,0.1874,0.14055},
-{2969874,3879648,3880099,0.4149,0.393063157894737},
-{2969875,3879281,3879648,0.260894117647059,0.3168},
-{2969876,3878359,3878770,-1,-1},
-{2969877,3878359,3877929,-1,-1},
-{2969878,3879716,3878777,0.471052173913043,0.471052173913043},
-{2969879,3880144,3879716,0.1882875,0.215185714285714},
-{2969880,3880576,3880144,0.27549,0.289989473684211},
-{2969881,3881862,3881483,0.158136,0.146422222222222},
-{2969882,3882097,3881862,0.0971032258064516,0.0885352941176471},
-{2969883,3882458,3882097,0.152420689655172,0.130005882352941},
-{2969884,3882959,3882458,0.198711111111111,0.173070967741935},
-{2969885,3883124,3882959,0.072675,0.069768},
-{2969886,3883542,3883480,0.388407692307692,0.360664285714286},
-{2969887,3883642,3883542,1.1031,1.00281818181818},
-{2969888,3879599,3878491,0.45703125,0.504310344827586},
-{2969889,3878491,3878082,0.1347,0.149666666666667},
-{2969890,3878082,3877685,0.1344375,0.1344375},
-{2969891,3883058,3882382,-1,0.38661},
-{2969892,3881570,3881418,0.0834857142857143,0.070128},
-{2969893,3881577,3881418,0.191423076923077,0.216391304347826},
-{2969894,3882066,3881577,0.430905,0.465843243243243},
-{2969895,3881577,3881229,0.187915384615385,0.212426086956522},
-{2969896,3881229,3880868,0.14295,0.155945454545455},
-{2969897,3880868,3880326,0.29412,0.29412},
-{2969898,3880135,3880326,0.1649,0.1649},
-{2969899,3880135,3879933,0.156463636363636,0.149660869565217},
-{2969900,3879792,3879933,0.115546153846154,0.107292857142857},
-{2969901,3879792,3879636,0.111381818181818,0.116685714285714},
-{2969902,3880099,3879864,0.240023076923077,0.189109090909091},
-{2969903,3879636,3879864,0.21762,0.225124137931035},
-{2969904,3879636,3879413,0.185222222222222,0.151545454545455},
-{2969905,3881198,3879079,0.918145454545455,0.891141176470588},
-{2969906,3879858,3880122,0.191090322580645,0.211564285714286},
-{2969907,3879496,3880122,0.434422222222222,0.404462068965517},
-{2969908,3879221,3879496,0.183736363636364,0.155469230769231},
-{2969909,3878885,3879221,0.203171428571429,0.147124137931034},
-{2969910,3877880,3877929,-1,-1},
-{2969911,3878357,3878148,0.2532,0.2321},
-{2969912,3878357,3878885,0.603923076923077,0.560785714285714},
-{2969913,3882537,3881996,0.21855652173913,0.21855652173913},
-{2969914,3884598,3885203,-1,0.19340625},
-{2969915,3884655,3885262,0.41244,-1},
-{2969916,3885203,3885724,-1,0.270542857142857},
-{2969917,3885724,3886178,0.535725,0.13393125},
-{2969918,3886178,3886327,0.074625,0.1791},
-{2969919,3886327,3887318,0.420235714285714,0.405744827586207},
-{2969920,3886220,3886178,0.204276923076923,0.189685714285714},
-{2969921,3886228,3886220,0.0952411764705882,0.0981272727272727},
-{2969922,3885262,3885789,0.219853846153846,-1},
-{2969923,3885789,3886228,0.1941,-1},
-{2969924,3886248,3886228,0.194089655172414,0.160817142857143},
-{2969925,3886299,3886248,0.195446511627907,0.191004545454545},
-{2969926,3886300,3886299,0.0471627906976744,0.0460909090909091},
-{2969927,3886315,3886300,0.0618923076923077,0.0652378378378378},
-{2969928,3886331,3886315,0.115114285714286,0.16116},
-{2969929,3891023,3891004,0.27788,0.252618181818182},
-{2969930,3890236,3890739,0.244157142857143,0.244157142857143},
-{2969931,3889299,3889862,0.209116981132075,0.213138461538462},
-{2969932,3888751,3889299,0.221826666666667,0.221826666666667},
-{2969933,3890129,3890134,0.117566666666667,0.0920086956521739},
-{2969934,3889204,3890129,0.299707692307692,0.307594736842105},
-{2969935,3887418,3887360,0.29511724137931,0.28528},
-{2969936,3887418,3887443,0.68358,0.68358},
-{2969937,3887360,3887318,0.264716129032258,0.264716129032258},
-{2969938,3887318,3889862,0.751447058823529,0.774218181818182},
-{2969939,3887318,3887281,0.2486625,0.274386206896552},
-{2969940,3887281,3887250,0.224935714285714,0.217179310344828},
-{2969941,3886178,3886134,0.176413043478261,0.197926829268293},
-{2969942,3887250,3887222,0.329464285714286,0.318103448275862},
-{2969943,3888592,3889274,0.152468181818182,0.159728571428571},
-{2969944,3889274,3889874,0.154618604651163,0.141459574468085},
-{2969945,3889874,3890438,0.169275,0.15746511627907},
-{2969946,3890438,3891004,0.264096,0.16506},
-{2969947,3891004,3890945,0.247072340425532,0.297753846153846},
-{2969948,3890945,3890909,0.389982352941177,0.348931578947368},
-{2969949,3888531,3888445,0.44108,0.44108},
-{2969950,3888564,3888531,0.135276923076923,0.140688},
-{2969951,3888568,3888564,0.123514285714286,0.13509375},
-{2969952,3888592,3888568,0.164425,0.171573913043478},
-{2969953,3887222,3887202,0.151355555555556,0.157176923076923},
-{2969954,3887202,3887171,0.1158,0.1158},
-{2969955,3887171,3887155,0.125355555555556,0.116710344827586},
-{2969956,3887155,3887079,0.453972413793103,0.424683870967742},
-{2969957,3885978,3885918,0.177951219512195,0.169674418604651},
-{2969958,3885918,3885878,0.2786,0.18283125},
-{2969959,3886472,3886649,0.0727714285714286,0.10188},
-{2969960,3886649,3886998,0.148613793103448,0.165761538461538},
-{2969961,3887079,3886998,0.539781818181818,0.55665},
-{2969962,3886998,3887522,0.189765517241379,0.220128},
-{2969963,3887522,3887661,0.0571363636363636,0.052375},
-{2969964,3887661,3888345,0.244444444444444,0.275},
-{2969965,3888445,3888345,0.574412903225806,0.5396},
-{2969966,3888345,3889018,0.237385714285714,0.27695},
-{2969967,3889018,3889650,0.239121428571429,0.247977777777778},
-{2969968,3890909,3890805,0.541254545454546,0.576174193548387},
-{2969969,3889650,3890225,0.22442,0.24045},
-{2969970,3890225,3890805,0.267456,0.290713043478261},
-{2969971,3890805,3891358,0.192891428571429,0.198564705882353},
-{2969972,3891358,3891891,0.156385714285714,0.164205},
-{2969973,3891891,3892403,0.1479,0.158721951219512},
-{2969974,3892403,3892807,0.0961404255319149,0.107585714285714},
-{2969975,3892807,3893007,0.0481953488372093,0.0481953488372093},
-{2969976,3893007,3893445,0.172697142857143,0.163362162162162},
-{2969977,3891891,3891830,0.654533333333333,0.654533333333333},
-{2969978,3890805,3890757,0.413109677419355,0.42688},
-{2969979,3885978,3886582,0.258222222222222,0.27888},
-{2969980,3886582,3887155,0.236875862068966,0.208163636363636},
-{2969981,3888531,3889228,0.234041379310345,0.22624},
-{2969982,3889228,3889842,0.231537931034483,0.22382},
-{2969983,3889842,3890375,0.2714,0.191576470588235},
-{2969984,3890375,3890945,0.268296,0.23955},
-{2969985,3888345,3888305,0.391581818181818,0.410228571428571},
-{2969986,3888305,3888290,0.1692,0.16215},
-{2969987,3888290,3888205,0.275424,0.222116129032258},
-{2969988,3888290,3888912,0.22995,0.22995},
-{2969989,3888912,3889527,0.209246511627907,0.22494},
-{2969990,3889527,3889639,0.05738,0.0555290322580645},
-{2969991,3889639,3890157,0.232323529411765,0.24684375},
-{2969992,3890157,3890757,0.265062857142857,0.250735135135135},
-{2969993,3890757,3890989,0.126144827586207,0.1407},
-{2969994,3890989,3891304,0.156951724137931,0.15172},
-{2969995,3891304,3891830,0.2376,0.245264516129032},
-{2969996,3891830,3892344,0.22455,0.1996},
-{2969997,3892344,3892928,0.198383333333333,0.193021621621622},
-{2969998,3892928,3893376,0.180113513513513,0.185116666666667},
-{2969999,3890757,3890925,0.171066666666667,0.19245},
-{2970000,3890925,3891204,0.160781818181818,0.151594285714286},
-{2970001,3891204,3891638,0.1503,0.154594285714286},
-{2970002,3891638,3891782,0.0669375,0.0738620689655173},
-{2970003,3891782,3892178,0.254509090909091,0.239965714285714},
-{2970004,3893376,3894211,0.386763636363636,0.344951351351351},
-{2970005,3893376,3893198,0.177730434782609,0.177730434782609},
-{2970006,3893198,3893334,0.1119,0.122072727272727},
-{2970007,3892684,3893476,0.324270967741935,0.3141375},
-{2970008,3893334,3893476,0.122723076923077,0.113957142857143},
-{2970009,3893476,3893604,0.0961862068965517,0.0774833333333333},
-{2970010,3893604,3894214,0.246980487804878,0.235493023255814},
-{2970011,3894214,3894879,0.345531818181818,0.353567441860465},
-{2970012,3894879,3895046,0.11335,0.160023529411765},
-{2970013,3895046,3895688,0.445617391304348,0.465872727272727},
-{2970014,3894879,3895069,0.190542857142857,0.20840625},
-{2970015,3895069,3895171,0.0711,0.0690685714285714},
-{2970016,3895171,3895444,0.245455813953488,0.277752631578947},
-{2970017,3895444,3895490,0.02922,0.0324666666666667},
-{2970018,3895490,3895786,0.16992,0.196061538461538},
-{2970019,3895786,3895888,0.0928,0.0954514285714286},
-{2970020,3895888,3896205,0.206106976744186,0.260664705882353},
-{2970021,3896205,3896238,0.0365513513513513,0.0466344827586207},
-{2970022,3896238,3896505,0.421634482758621,0.509475},
-{2970023,3896505,3896733,0.28276875,0.323164285714286},
-{2970024,3896733,3896850,0.112781818181818,0.11630625},
-{2970025,3896850,3896728,0.15770625,0.174020689655172},
-{2970026,3896728,3897374,0.355752,0.355752},
-{2970027,3897374,3897738,0.20225,0.21104347826087},
-{2970028,3896728,3896645,0.06826875,0.0809111111111111},
-{2970029,3896645,3896537,0.106128,0.0914896551724138},
-{2970030,3896537,3896870,0.3196,0.308185714285714},
-{2970031,3896870,3897077,0.152727272727273,0.186666666666667},
-{2970032,3897077,3897130,0.0360333333333333,0.0498923076923077},
-{2970033,3897130,3897586,0.31995,0.31995},
-{2970034,3898505,3898941,0.17265,0.156954545454545},
-{2970035,3897941,3898505,0.268447058823529,0.260777142857143},
-{2970036,3897849,3897941,0.0461823529411765,0.0461823529411765},
-{2970037,3897586,3897849,0.334933333333333,0.334933333333333},
-{2970038,3895545,3895898,0.26555,0.26555},
-{2970039,3896106,3895898,0.277278260869565,0.2362},
-{2970040,3896163,3896106,0.11781,0.094248},
-{2970041,3895968,3896505,0.377972727272727,0.41577},
-{2970042,3895261,3895968,0.77736,0.728775},
-{2970043,3894727,3895261,0.551152941176471,0.5856},
-{2970044,3894379,3894727,0.162581818181818,0.173070967741935},
-{2970045,3894085,3894379,0.120405405405405,0.120405405405405},
-{2970046,3893772,3894085,0.137866666666667,0.127261538461538},
-{2970047,3893418,3893772,0.20385,0.2114},
-{2970048,3892532,3892803,0.0915405405405405,0.0915405405405405},
-{2970049,3892803,3893166,0.146777142857143,0.12529756097561},
-{2970050,3893166,3893662,0.195536842105263,0.190523076923077},
-{2970051,3893662,3893867,0.0966727272727273,0.102909677419355},
-{2970052,3894406,3894754,0.262988571428571,0.296922580645161},
-{2970053,3894754,3894970,0.15934,0.199175},
-{2970054,3894970,3895572,0.4611,0.4611},
-{2970055,3895572,3896205,0.50634,0.50634},
-{2970056,3895171,3895698,0.341911111111111,0.341911111111111},
-{2970057,3895698,3896556,0.721088888888889,0.721088888888889},
-{2970058,3885950,3885481,0.192109090909091,0.18784},
-{2970059,3885481,3885196,0.113642553191489,0.106824},
-{2970060,3885196,3885004,0.0714666666666667,0.0684255319148936},
-{2970061,3885004,3884726,0.212577777777778,0.163988571428571},
-{2970062,3887136,3886570,0.271375609756098,0.337163636363636},
-{2970063,3886570,3886326,0.0948941176470588,0.0948941176470588},
-{2970064,3886326,3885900,0.35796,0.193491891891892},
-{2970065,3885619,3885348,0.0922212765957447,0.09632},
-{2970066,3885348,3885082,0.0888893617021276,0.0888893617021276},
-{2970067,3885082,3884847,0.0873652173913043,0.0855063829787234},
-{2970068,3884847,3884767,0.0228367346938776,0.0228367346938776},
-{2970069,3884767,3884576,0.062475,0.062475},
-{2970070,3884576,3884431,0.0520212765957447,0.0531521739130435},
-{2970071,3884431,3884324,0.04112,0.0420545454545455},
-{2970072,3884324,3884167,0.062,0.062},
-{2970073,3884167,3883984,0.129626086956522,0.124225},
-{2970074,3881308,3881467,0.120052173913044,0.102266666666667},
-{2970075,3881467,3881755,0.162664285714286,0.182184},
-{2970076,3881755,3881946,0.134048275862069,0.1254},
-{2970077,3881946,3882037,0.0496457142857143,0.0526545454545455},
-{2970078,3882037,3882269,0.1376,0.1376},
-{2970079,3882269,3882504,0.123216666666667,0.13861875},
-{2970080,3883984,3883663,0.136852941176471,0.23265},
-{2970081,3883663,3883298,0.0945,0.0966},
-{2970082,3883298,3882780,0.142995918367347,0.14908085106383},
-{2970083,3882504,3882780,0.2013,0.210052173913043},
-{2970084,3882780,3882474,0.0794235294117647,0.082665306122449},
-{2970085,3882474,3882194,0.087075,0.0908608695652174},
-{2970086,3882194,3881933,0.146586206896552,0.128818181818182},
-{2970087,3882780,3883306,0.48258947368421,1.0188},
-{2970088,3883306,3883555,0.14296,0.134025},
-{2970089,3883555,3883794,0.2356,0.163107692307692},
-{2970090,3881346,3881258,-1,0.119792307692308},
-{2970091,3881708,3881346,0.303135483870968,0.268491428571429},
-{2970092,3881755,3881708,0.0981,0.102771428571429},
-{2970093,3880751,3880916,0.0939352941176471,0.118288888888889},
-{2970094,3880916,3881174,0.1746,0.161169230769231},
-{2970095,3881174,3881258,0.0822,0.06028},
-{2970096,3881258,3880910,-1,0.406176923076923},
-{2970097,3880910,3880718,-1,0.203142857142857},
-{2970098,3881258,3881406,0.0940285714285714,0.0731333333333333},
-{2970099,3881406,3881537,0.0679333333333333,0.06114},
-{2970100,3881537,3881675,0.05163,0.0529538461538462},
-{2970101,3881675,3881933,0.128708108108108,0.15361935483871},
-{2970102,3880910,3881138,-1,0.0929142857142857},
-{2970103,3881138,3881740,-1,0.35124},
-{2970104,3881740,3882277,0.249062068965517,0.249062068965517},
-{2970105,3881933,3882419,0.287664705882353,0.250784615384615},
-{2970106,3882419,3882277,0.178928571428571,-1},
-{2970107,3879861,3880159,0.13775625,0.163266666666667},
-{2970108,3880159,3880396,0.135325,0.147627272727273},
-{2970109,3880396,3880718,0.164511111111111,0.164511111111111},
-{2970110,3885082,3886104,0.532984615384615,0.43305},
-{2970111,3887027,3886104,0.345171428571429,0.439309090909091},
-{2970112,3886308,3885959,0.188353846153846,0.1530375},
-{2970113,3886547,3886308,0.0928909090909091,0.0908266666666667},
-{2970114,3886804,3886547,0.105468292682927,0.102957142857143},
-{2970115,3887027,3886804,0.154292307692308,0.154292307692308},
-{2970116,3887262,3887027,0.147346153846154,0.15324},
-{2970117,3887488,3887262,0.0894545454545454,0.0915348837209302},
-{2970118,3887761,3887488,0.08484,0.0829956521739131},
-{2970119,3888093,3887761,0.14728,0.152358620689655},
-{2970120,3888367,3888093,0.154272,-1},
-{2970121,3888567,3888367,0.0663209302325582,-1},
-{2970122,3888607,3888567,0.0150510638297872,-1},
-{2970123,3888888,3888607,0.0824869565217391,-1},
-{2970124,3889065,3888888,0.05564,-1},
-{2970125,3889128,3889065,0.0187142857142857,-1},
-{2970126,3889378,3889128,0.123522580645161,-1},
-{2970127,3887027,3887505,0.217432258064516,0.177378947368421},
-{2970128,3887505,3887662,0.0426666666666667,0.0417391304347826},
-{2970129,3887662,3888167,0.16032,0.142506666666667},
-{2970130,3889086,3888635,-1,0.198235714285714},
-{2970131,3888635,3888273,0.162642857142857,0.162642857142857},
-{2970132,3888273,3888167,0.0475111111111111,0.0475111111111111},
-{2970133,3888167,3888493,0.187155,0.197005263157895},
-{2970134,3887501,3887173,0.25794,0.25794},
-{2970135,3887843,3887501,0.20277,0.20277},
-{2970136,3888144,3887843,0.1591,0.14319},
-{2970137,3888493,3888144,0.198733333333333,0.23848},
-{2970138,3888493,3889130,0.3253,0.285629268292683},
-{2970139,3889130,3889467,0.14835,0.184158620689655},
-{2970140,3888911,3889467,0.232968,0.232968},
-{2970141,3888911,3888519,0.161292857142857,0.155731034482759},
-{2970142,3888519,3888384,0.0795545454545455,0.0648222222222222},
-{2970143,3880396,3880212,0.240688888888889,0.240688888888889},
-{2970144,3880212,3880301,0.06924,0.06924},
-{2970145,3880301,3880476,0.12036,0.1062},
-{2970146,3880476,3880701,0.160671428571429,0.1405875},
-{2970147,3880701,3880929,0.143088888888889,0.143088888888889},
-{2970148,3881740,3881464,0.228664285714286,0.266775},
-{2970149,3881464,3881343,0.1296,0.145152},
-{2970150,3881343,3881162,0.312947368421053,0.258521739130435},
-{2970151,3880929,3881162,0.11635,0.135116129032258},
-{2970152,3881162,3881511,0.24015,0.280175},
-{2970153,3881102,3881387,0.0904,0.0853777777777778},
-{2970154,3878208,3879752,0.707066666666667,0.707066666666667},
-{2970155,3881031,3881102,0.0262415094339623,0.0252872727272727},
-{2970156,3880421,3881031,0.206434615384615,0.198788888888889},
-{2970157,3880222,3880421,0.0714857142857143,0.070056},
-{2970158,3880222,3879963,0.211382142857143,0.219211111111111},
-{2970159,3883839,3884819,0.38787,0.44328},
-{2970160,3884108,3884886,0.288012765957447,0.300813333333333},
-{2970161,3886260,3885815,-1,0.403088888888889},
-{2970162,3884886,3885540,0.24134693877551,0.24134693877551},
-{2970163,3885815,3885540,-1,0.8443875},
-{2970164,3885540,3886197,0.230244,0.250265217391304},
-{2970165,3886197,3886465,0.1509,0.1509},
-{2970166,3889624,3889174,0.135243243243243,0.119142857142857},
-{2970167,3890191,3889850,0.164424,0.12845625},
-{2970168,3889850,3889886,0.159,0.159},
-{2970169,3889356,3889746,0.167723076923077,0.1817},
-{2970170,3889746,3889902,0.097551724137931,0.08840625},
-{2970171,3890490,3889902,0.245883333333333,0.226969230769231},
-{2970172,3890745,3890490,0.073305,0.0751846153846154},
-{2970173,3891243,3891525,0.25269375,0.25269375},
-{2970174,3891525,3891558,0.165286956521739,0.12672},
-{2970175,3891558,3891584,0.0835,0.0607272727272727},
-{2970176,3891584,3891632,0.107574193548387,0.0980823529411765},
-{2970177,3891632,3891647,0.093096,0.0705272727272727},
-{2970178,3891647,3891888,0.169444444444444,0.157758620689655},
-{2970179,3891888,3891945,0.124130769230769,0.119533333333333},
-{2970180,3891945,3891997,0.1756,0.15365},
-{2970181,3891779,3891477,0.193885714285714,0.20358},
-{2970182,3891997,3891779,0.123075,0.123075},
-{2970183,3891997,3892204,0.214539130434783,0.214539130434783},
-{2970184,3893368,3893126,0.185136,0.185136},
-{2970185,3893126,3892822,0.174312,-1},
-{2970186,3892822,3892651,0.0597375,-1},
-{2970187,3892651,3892462,0.0874457142857143,-1},
-{2970188,3892462,3892204,0.15384,-1},
-{2970189,3892204,3892657,0.292916129032258,0.2837625},
-{2970190,3892657,3892414,0.1542,0.140791304347826},
-{2970191,3892414,3892133,0.152975,0.131121428571429},
-{2970192,3892133,3891835,0.188914285714286,0.1653},
-{2970193,3891835,3891542,0.145022222222222,0.145022222222222},
-{2970194,3891542,3891236,0.146044444444444,0.146044444444444},
-{2970195,3892657,3893075,0.34746,0.32574375},
-{2970196,3893075,3893303,0.146035714285714,0.1363},
-{2970197,3893303,3893868,0.338708571428571,0.39516},
-{2970198,3892546,3892256,0.147844444444444,0.147844444444444},
-{2970199,3892886,3892546,0.151888888888889,0.151888888888889},
-{2970200,3893186,3892886,-1,0.156555555555556},
-{2970201,3893523,3893186,-1,0.202915384615385},
-{2970202,3893868,3893523,-1,0.240048},
-{2970203,3893868,3893985,0.130928571428571,0.14664},
-{2970204,3893985,3894017,0.0851,0.07659},
-{2970205,3894237,3893868,-1,0.248973913043478},
-{2970206,3894237,3894316,0.07089,0.07089},
-{2970207,3894634,3894316,0.248652631578947,0.23622},
-{2970208,3894017,3894274,0.319311111111111,0.319311111111111},
-{2970209,3894274,3894493,0.196911111111111,0.196911111111111},
-{2970210,3894493,3894860,0.384044444444444,0.384044444444444},
-{2970211,3894860,3895160,0.223556756756757,0.223556756756757},
-{2970212,3895160,3895570,0.301381818181818,0.292517647058823},
-{2970213,3895570,3895859,0.2198625,0.23452},
-{2970214,3895859,3896118,0.1306,0.144347368421053},
-{2970215,3896118,3896399,0.148843902439024,0.160594736842105},
-{2970216,3896399,3896635,0.110780487804878,0.137636363636364},
-{2970217,3896635,3897400,0.252223255813953,0.28541052631579},
-{2970218,3897400,3897707,0.0919826086956522,0.117533333333333},
-{2970219,3897707,3898044,0.110289473684211,0.155222222222222},
-{2970220,3898044,3898420,0.197236363636364,0.1808},
-{2970221,3893674,3893429,0.19743,0.19743},
-{2970222,3893914,3893674,0.228966666666667,0.228966666666667},
-{2970223,3894139,3893914,0.1652,0.1652},
-{2970224,3894377,3894139,0.158209090909091,0.145025},
-{2970225,3894627,3894377,0.155425,0.155425},
-{2970226,3894860,3894627,0.1298,0.1298},
-{2970227,3895113,3894860,0.18276,0.18276},
-{2970228,3895252,3895113,0.12954,0.12954},
-{2970229,3895438,3895252,0.13449,0.13449},
-{2970230,3895438,3895562,0.12336,0.12336},
-{2970231,3896033,3895562,0.231511111111111,0.231511111111111},
-{2970232,3896262,3896033,0.103933333333333,0.103933333333333},
-{2970233,3896056,3896227,0.23418947368421,0.23418947368421},
-{2970234,3896301,3896801,0.40284,0.40284},
-{2970235,3896801,3897289,0.28695,0.28695},
-{2970236,3897289,3897551,0.17223,0.17223},
-{2970237,3897551,3897849,0.18447,0.18447},
-{2970238,3886098,3886307,0.108828571428571,0.11427},
-{2970239,3886307,3886648,0.1415,0.146379310344828},
-{2970240,3886648,3887250,0.35385,0.28308},
-{2970241,3887250,3888650,0.525346153846154,0.4553},
-{2970242,3888650,3888592,0.3888,0.3888},
-{2970243,3888650,3889927,0.67341,0.612190909090909},
-{2970244,3889927,3890085,0.0824608695652174,0.0654},
-{2970245,3890085,3890476,0.138441176470588,0.134485714285714},
-{2970246,3890476,3890739,0.120264,0.0969870967741936},
-{2970247,3891004,3891553,0.22016,0.287165217391304},
-{2970248,3892477,3893275,0.886028571428571,0.918844444444445},
-{2970249,3894869,3895010,0.178753846153846,0.105627272727273},
-{2970250,3894495,3894869,0.319046153846154,0.270495652173913},
-{2970251,3894302,3894495,0.149483333333333,0.116986956521739},
-{2970252,3894124,3894302,0.142538461538462,0.132357142857143},
-{2970253,3893624,3894124,0.409923076923077,0.340148936170213},
-{2970254,3893275,3893624,0.4107,0.381364285714286},
-{2970255,3861059,3861176,0.208168421052632,0.183962790697674},
-{2970256,3861059,3860095,0.304305,0.347777142857143},
-{2970257,3859599,3860095,0.346454545454545,0.300868421052632},
-{2970258,3863969,3863413,0.607251428571429,0.625111764705882},
-{2970259,3860324,3860500,0.131323076923077,0.134778947368421},
-{2970260,3860324,3860325,0.0367741935483871,0.0316666666666667},
-{2970261,3860325,3860799,0.370524324324324,0.370524324324324},
-{2970279,3865839,3865258,0.157263157894737,0.153230769230769},
-{2970280,3866032,3865839,0.0514923076923077,0.0528473684210526},
-{2970281,3866155,3866032,0.0325833333333333,0.0308684210526316},
-{2970282,3866526,3866155,0.0819846153846154,0.0841421052631579},
-{2970283,3866949,3866526,0.102415384615385,0.11095},
-{2970284,3867546,3866949,0.162291891891892,0.171565714285714},
-{2970285,3867806,3867546,0.0826363636363636,0.0879677419354839},
-{2970286,3868503,3867806,0.191382857142857,0.186066666666667},
-{2970287,3868647,3868503,0.0478058823529412,0.0478058823529412},
-{2970288,3868879,3868647,0.0541297297297297,0.0589058823529412},
-{2970289,3869091,3868879,0.0587189189189189,0.06035},
-{2970290,3869577,3869091,0.131485714285714,0.127833333333333},
-{2970291,3869700,3869577,0.0339272727272727,0.0329294117647059},
-{2970292,3869832,3869700,0.0354514285714286,0.0376},
-{2970293,3870074,3869832,0.0651081081081081,0.0688285714285714},
-{2970294,3870227,3870074,0.0402514285714286,0.0414352941176471},
-{2970295,3870358,3870227,0.0388545454545455,0.04006875},
-{2970296,3870487,3870358,0.03898125,0.0366882352941176},
-{2970297,3871164,3870487,0.270792,0.270792},
-{2970298,3871164,3870999,0.229008,0.23855},
-{2970299,3870999,3870956,0.0756692307692308,0.06558},
-{2970300,3870956,3870977,0.0575357142857143,0.0519677419354839},
-{2970301,3870977,3870929,0.12984,0.12984},
-{2970302,3870929,3870893,0.136033333333333,0.12243},
-{2970303,3871269,3871164,0.116685714285714,0.12252},
-{2970304,3871337,3871269,0.0441103448275862,0.051168},
-{2970305,3871259,3871337,0.06556,0.0678206896551724},
-{2970306,3871106,3871259,0.125109677419355,0.117527272727273},
-{2970307,3871035,3871106,0.11472,0.106222222222222},
-{2970308,3871080,3871035,0.0751862068965517,0.0751862068965517},
-{2970309,3870909,3871080,0.32675625,0.34854},
-{2970310,3870909,3870894,0.0588260869565217,0.056375},
-{2970311,3870886,3870860,0.0772875,0.0562090909090909},
-{2970312,3870828,3870797,-1,0.104353846153846},
-{2970313,3870797,3870915,-1,0.251806451612903},
-{2970314,3870747,3870372,0.17346,0.192733333333333},
-{2970315,3870828,3870158,0.236330769230769,0.21945},
-{2970316,3870158,3869870,0.0704842105263158,0.0744},
-{2970317,3869870,3869018,0.2307,0.250474285714286},
-{2970318,3869018,3868901,0.203276470588235,0.246835714285714},
-{2970319,3868901,3868338,0.229765714285714,0.259412903225806},
-{2970320,3868338,3868131,0.0789666666666667,0.0861454545454546},
-{2970321,3868131,3867656,0.164929411764706,0.1752375},
-{2970322,3867656,3867443,0.103316129032258,0.0889666666666667},
-{2970323,3867008,3866642,0.111247058823529,0.1182},
-{2970324,3867443,3868516,0.487488888888889,0.487488888888889},
-{2970325,3870055,3869739,0.143830434782609,0.161370731707317},
-{2970326,3870228,3870055,0.0473632653061224,0.0504521739130435},
-{2970327,3869980,3869326,0.20262,0.217092857142857},
-{2970328,3870520,3870228,0.111234782608696,0.116290909090909},
-{2970329,3870597,3870520,0.0396648648648649,0.0407666666666667},
-{2970330,3871051,3870597,0.384394285714286,0.384394285714286},
-{2970331,3870984,3871051,0.258790909090909,0.237225},
-{2970332,3870915,3870984,0.49251,0.469057142857143},
-{2970333,3867807,3867566,0.0682054054054054,0.08412},
-{2970334,3866114,3864983,0.372116129032258,0.461424},
-{2970339,3861212,3860325,0.497225,0.426192857142857},
-{2970340,3864767,3864589,0.289338461538461,0.208966666666667},
-{2970341,3864538,3864139,0.326328,0.339925},
-{2970342,3864139,3863918,0.255311111111111,0.287225},
-{2970343,3863918,3863937,0.239635714285714,0.22366},
-{2970344,3863937,3864188,0.141309090909091,0.137152941176471},
-{2970345,3864188,3864540,0.170110344827586,0.182711111111111},
-{2970346,3864541,3864540,0.0411333333333333,0.0321913043478261},
-{2970347,3865724,3865619,0.0507642857142857,0.04738},
-{2970349,3859969,3858344,0.493066666666667,0.479740540540541},
-{2970352,3865495,3864314,0.569590909090909,0.50124},
-{2970353,3864996,3864314,0.389888888888889,0.42108},
-{2970355,3866155,3865763,0.648422222222222,0.648422222222222},
-{2970360,3872607,3871838,0.279878571428571,0.24489375},
-{2970361,3871179,3870637,0.193451612903226,0.206793103448276},
-{2970362,3870637,3869752,0.353825,0.303278571428571},
-{2970363,3869782,3869752,0.02175,0.024},
-{2970364,3869984,3869782,0.139585714285714,0.156336},
-{2970365,3868749,3868607,0.162675,-1},
-{2970366,3869782,3869185,0.202244444444444,0.188296551724138},
-{2970367,3869185,3868607,0.22692,0.195620689655172},
-{2970368,3867753,3867961,0.356266666666667,0.3006},
-{2970369,3867571,3867753,0.127625806451613,0.104115789473684},
-{2970370,3867215,3867571,0.17825625,0.167770588235294},
-{2970371,3868607,3867460,0.467856,0.48735},
-{2970372,3867460,3867215,0.131929411764706,0.140175},
-{2970373,3866851,3867215,0.284927272727273,0.261183333333333},
-{2970374,3866786,3866851,0.19261935483871,0.180945454545455},
-{2970375,3869752,3869539,0.110902702702703,0.113983333333333},
-{2970376,3869539,3869168,0.198347368421053,0.221682352941176},
-{2970377,3869168,3869015,0.099075,0.117422222222222},
-{2970378,3869015,3868807,0.145711111111111,0.145711111111111},
-{2970379,3868479,3868199,0.087225,0.09304},
-{2970380,3866830,3866786,0.1441,0.123514285714286},
-{2970381,3866889,3866830,0.124761290322581,0.1172},
-{2970382,3868199,3867868,0.105662068965517,0.117853846153846},
-{2970383,3867868,3866889,0.517452631578947,0.517452631578947},
-{2970384,3867023,3866889,0.121928571428571,0.103454545454545},
-{2970385,3867194,3867023,0.16594,0.150854545454545},
-{2970386,3867591,3867194,0.2826375,0.251233333333333},
-{2970387,3868526,3867591,0.532148571428572,0.517366666666667},
-{2970388,3866545,3866889,0.1768,0.1326},
-{2970389,3866545,3866397,0.0429942857142857,0.0396},
-{2970390,3866397,3865893,0.1690875,0.1690875},
-{2970391,3865893,3865452,0.1395,0.1395},
-{2970392,3865452,3865057,0.107468571428571,0.113981818181818},
-{2970393,3865057,3864716,0.109890909090909,0.113325},
-{2970394,3864716,3864446,0.101047058823529,0.104109090909091},
-{2970399,3865099,3864494,0.1825,0.1825},
-{2970400,3865640,3865099,0.131414634146341,0.138153846153846},
-{2970401,3865814,3865640,0.05295,0.0498352941176471},
-{2970402,3866198,3865814,0.125322580645161,0.114264705882353},
-{2970403,3866786,3866198,0.1787,0.191464285714286},
-{2970404,3868374,3866786,0.52592,0.478109090909091},
-{2970405,3868808,3868374,0.144022222222222,0.117836363636364},
-{2970406,3869168,3868808,0.126724137931034,0.136111111111111},
-{2970407,3867194,3866684,0.188844444444444,0.175820689655172},
-{2970408,3866684,3866431,0.07160625,0.0587538461538461},
-{2970409,3866431,3865893,0.181510344827586,0.146216666666667},
-{2970416,3873010,3872699,0.215689655172414,0.164605263157895},
-{2970417,3872699,3868568,1.22346486486486,0.905364},
-{2970418,3868434,3868568,0.157118181818182,0.2469},
-{2970419,3868568,3869193,0.395769230769231,0.42875},
-{2970440,3865099,3865224,0.162955555555556,0.162955555555556},
-{2970441,3865224,3865452,0.2396,0.2396},
-{2970533,3863803,3864448,0.409666666666667,0.409666666666667},
-{2970534,3865134,3864727,0.157361538461538,0.13638},
-{2970535,3866435,3866404,0.133475,0.145609090909091},
-{2970536,3866403,3866435,0.0683076923076923,0.0986666666666667},
-{2970537,3866322,3866403,0.186848275862069,0.193521428571429},
-{2970538,3866263,3866322,0.13982,0.135309677419355},
-{2970539,3866241,3866237,0.0258666666666667,0.0273882352941176},
-{2970540,3866874,3866241,0.674424,0.674424},
-{2970541,3865999,3865673,0.1222,0.1222},
-{2970542,3867462,3866874,0.435806896551724,0.435806896551724},
-{2970543,3867810,3868242,0.371528571428571,0.371528571428571},
-{2970544,3869307,3868993,0.151172727272727,0.184766666666667},
-{2970545,3869732,3869307,0.164781818181818,0.213247058823529},
-{2970546,3851828,3850176,1.1109,1.05243157894737},
-{2970547,3867305,3865081,0.68859375,0.595540540540541},
-{2970548,3867323,3867546,0.3144,0.249351724137931},
-{2970549,3867305,3867323,0.215918181818182,0.1827},
-{2970553,3871432,3870793,0.452068965517241,0.452068965517241},
-{2970554,3870793,3869596,0.408415384615385,0.424752},
-{2970555,3869596,3869420,0.0550846153846154,0.0682},
-{2970556,3869420,3868737,0.321771428571429,0.28155},
-{2970557,3868204,3867743,0.234833333333333,0.183782608695652},
-{2970558,3867868,3867799,0.097632,0.0938769230769231},
-{2970571,3900532,3900869,0.116,0.12227027027027},
-{2970572,3900532,3901252,0.304905,0.530269565217391},
-{2970598,3919267,3919298,0.0243666666666667,0.01370625},
-{2970599,3915715,3916446,0.36958,0.36958},
-{2970600,3916164,3916446,0.19358,0.19358},
-{2970601,3916446,3917126,0.36084,0.341335135135135},
-{2970622,3922257,3921642,0.246454054054054,0.260537142857143},
-{2970623,3923320,3923398,0.0508411764705882,0.0454894736842105},
-{2970624,3923213,3923320,0.0656432432432432,0.0622769230769231},
-{2970625,3923123,3923213,0.0507076923076923,0.0482341463414634},
-{2970628,3915876,3916456,0.166214285714286,0.151760869565217},
-{2970629,3917627,3917411,0.0838333333333333,0.088764705882353},
-{2970630,3917009,3917268,0.0976428571428571,0.0932045454545454},
-{2970631,3915449,3915607,0.054612,0.0557265306122449},
-{2970632,3915307,3915449,0.047616,0.047616},
-{2970633,3915167,3915307,0.051132,0.051132},
-{2970634,3914787,3914876,0.0381,0.0398318181818182},
-{2970635,3911257,3911621,0.11714347826087,0.119746666666667},
-{2970636,3910815,3911257,0.135195348837209,0.138414285714286},
-{2970637,3909735,3910178,0.237125,0.237125},
-{2970638,3910178,3910629,0.277768421052632,-1},
-{2970639,3906680,3906130,0.336066666666667,0.394513043478261},
-{2970640,3906968,3906680,0.125925,0.154984615384615},
-{2970641,3878213,3878768,0.27415,-1},
-{2970642,3878768,3879090,0.278169230769231,-1},
-{2970706,3858373,3858549,0.118220689655172,0.137136},
-{2970707,3857632,3857672,0.209541176470588,0.187484210526316},
-{2970708,3857561,3857672,0.0558315789473684,0.0624},
-{2970709,3900974,3900892,0.178851428571429,0.160507692307692},
-{2970803,3854095,3855301,0.624909090909091,0.542684210526316},
-{2970804,3855125,3854995,0.194494736842105,0.12318},
-{2970805,3855125,3855769,0.236632258064516,0.252951724137931},
-{2970806,3856756,3857311,0.20818,0.249816},
-{2970807,3856329,3856756,0.182129032258065,0.209111111111111},
-{2970808,3858235,3858217,0.06216,0.06216},
-{2970809,3859839,3858235,0.612582352941176,0.671864516129032},
-{2970810,3860987,3860294,0.197679069767442,0.207321951219512},
-{2970811,3861298,3860987,0.102673170731707,0.107938461538462},
-{2970813,3867378,3867848,0.4066,0.420620689655172},
-{2970815,3871853,3871954,0.154845283018868,-1},
-{2970817,3852375,3851974,0.175311111111111,0.175311111111111},
-{2970819,3850298,3851212,0.40648,-1},
-{2970820,3857906,3857994,0.0249571428571429,0.0283297297297297},
-{2970821,3857350,3857906,0.25089375,0.382314285714286},
-{2970822,3880183,3880224,-1,0.0671111111111111},
-{2970823,3880096,3880183,-1,0.173971428571429},
-{2970824,3877972,3878087,0.0854903225806452,-1},
-{2970825,3853919,3853622,-1,0.1932375},
-{2970826,3853919,3853476,0.155416666666667,-1},
-{2970827,3854097,3853602,0.2019,0.179466666666667},
-{2970828,3854190,3854097,0.0302153846153846,0.0261866666666667},
-{2970829,3860587,3859896,0.339288,0.302935714285714},
-{2970833,3857131,3856553,0.130876595744681,0.133721739130435},
-{2970834,3857523,3857131,0.0859695652173913,0.0841404255319149},
-{2970835,3866886,3865845,0.282617647058824,0.266916666666667},
-{2970836,3870046,3870078,0.0372,-1},
-{2970837,3870884,3870163,-1,0.37753125},
-{2970838,3870163,3870421,0.0785636363636364,-1},
-{2970841,3851809,3853104,-1,0.6687},
-{2970842,3853104,3853345,0.186227586206897,0.186227586206897},
-{2970843,3856253,3856513,0.063855,0.05805},
-{2970844,3857106,3856513,0.152914285714286,0.149358139534884},
-{2970845,3856530,3856513,-1,0.1720875},
-{2970846,3857364,3856639,0.604015384615385,0.604015384615385},
-{2970847,3857604,3857364,0.316275,0.316275},
-{2970848,3857806,3857604,0.4803,-1},
-{2970849,3855023,3854777,0.1135875,0.1135875},
-{2970850,3855427,3855023,0.263502857142857,0.279472727272727},
-{2970851,3855427,3855274,0.283366666666667,0.25503},
-{2970852,3861821,3861618,0.2947,0.342232258064516},
-{2970853,3861618,3861454,0.171492857142857,0.200075},
-{2970854,3860056,3859722,0.287557894736842,0.27318},
-{2970855,3860780,3860056,0.324266666666667,0.324266666666667},
-{2970856,3861315,3860780,0.267792857142857,0.277711111111111},
-{2970857,3866780,3866320,-1,0.2245},
-{2970858,3900071,3900312,0.099525,0.0925813953488372},
-{2970859,3913158,3913478,0.104342857142857,0.13695},
-{2970860,3910653,3911650,0.5986,-1},
-{2970861,3900483,3901350,0.520392857142857,0.58284},
-{2970862,3898970,3899344,0.297366666666667,-1},
-{2970863,3896260,3896348,0.0550421052631579,0.0581},
-{2970864,3896348,3896514,0.07494,0.0768615384615385},
-{2970865,3896348,3896824,-1,0.449082352941176},
-{2970866,3905184,3905343,0.0727294117647059,0.0686888888888889},
-{2970867,3905144,3905184,0.0171576923076923,0.0162218181818182},
-{2970868,3904727,3905144,0.158270588235294,0.149477777777778},
-{2970869,3904650,3904727,0.0284117647058823,0.02898},
-{2970870,3899388,3899516,0.102694736842105,0.1084},
-{2970871,3899516,3899676,0.130342857142857,0.124418181818182},
-{2970872,3858073,3857806,0.141371428571429,0.134945454545455},
-{2970873,3857510,3858073,0.4346,0.451315384615385},
-{2970874,3857611,3857938,0.26145,0.20916},
-{2970875,3858708,3857938,0.46266,0.402313043478261},
-{2970876,3855460,3855274,0.166153846153846,0.166153846153846},
-{2970877,3855614,3855460,0.115933333333333,0.115933333333333},
-{2970878,3856063,3855946,0.183208695652174,0.183208695652174},
-{2970879,3853178,3853855,0.4847,0.440636363636364},
-{2970880,3853855,3853736,0.208773913043478,0.208773913043478},
-{2970881,3853140,3853178,0.769521428571429,0.695051612903226},
-{2970882,3852633,3852842,0.0951333333333333,0.0951333333333333},
-{2970883,3854610,3855084,0.222444444444444,0.222444444444444},
-{2970884,3855084,3855296,0.137525,0.132024},
-{2970885,3855660,3855950,0.151007142857143,0.151007142857143},
-{2970886,3850122,3850325,0.1374,-1},
-{2970887,3850325,3851289,0.718335483870968,0.6748},
-{2970888,3851289,3851280,0.168854545454545,0.168854545454545},
-{2970889,3859155,3859226,0.1227,0.115482352941176},
-{2970890,3859761,3859226,0.310552941176471,0.391066666666667},
-{2970891,3861115,3860900,0.114726315789474,0.140632258064516},
-{2970892,3860609,3860367,0.168672727272727,0.206155555555556},
-{2970893,3860367,3860238,0.0692526315789474,0.0848903225806452},
-{2970894,3871260,3870393,0.243741176470588,0.236777142857143},
-{2970895,3871260,3871775,0.117569230769231,0.120663157894737},
-{2970896,3872938,3872982,0.0886846153846154,0.096075},
-{2970897,3854390,3853527,0.300324324324324,0.336727272727273},
-{2970922,3876026,3876145,-1,0.057925},
-{2970923,3876475,3876735,-1,0.105216},
-{2970924,3875559,3875622,0.179928,0.145103225806452},
-{2970925,3875527,3875559,0.16865,0.155676923076923},
-{2970926,3875552,3876024,-1,0.227791304347826},
-{2970927,3876024,3876515,-1,0.244690909090909},
-{2970928,3880268,3880021,-1,0.2427},
-{2970929,3880451,3880268,-1,0.159104347826087},
-{2970930,3881144,3881842,0.54024,0.284336842105263},
-{2970931,3881842,3881900,0.050825,0.0321},
-{2970932,3884456,3884083,-1,0.2711},
-{2970933,3884857,3884456,-1,0.309627272727273},
-{2970934,3885865,3885761,-1,0.0668857142857143},
-{2970935,3886324,3885865,-1,0.312218181818182},
-{2970936,3876834,3877112,0.108346153846154,0.0853636363636364},
-{2970937,3877112,3877323,0.0717483870967742,0.0654176470588235},
-{2970938,3888116,3888018,0.05244375,0.0987176470588235},
-{2970939,3888137,3888040,0.08742,0.0672461538461538},
-{2970940,3888137,3888897,0.255096774193548,0.292888888888889},
-{2970941,3887833,3888137,-1,0.232058823529412},
-{2970942,3889486,3890290,0.3233,0.293909090909091},
-{2970943,3889189,3889486,0.0972857142857143,0.0896052631578947},
-{2970944,3888116,3889189,0.356729032258065,0.480808695652174},
-{2970945,3876426,3875891,-1,0.323325},
-{2970946,3875487,3876341,0.252173333333333,0.263902325581395},
-{2970947,3876341,3876426,-1,0.0668},
-{2970948,3873905,3874014,-1,0.296014285714286},
-{2970949,3874184,3874239,-1,0.093},
-{2970950,3874886,3875010,-1,0.146544827586207},
-{2970951,3874833,3874886,-1,0.0364909090909091},
-{2970952,3874300,3874259,0.015015,-1},
-{2970953,3867302,3867598,0.244766666666667,0.259164705882353},
-{2970954,3868125,3868144,0.0576734693877551,0.0657209302325582},
-{2970955,3867408,3866862,0.428366666666667,-1},
-{2970956,3866208,3866361,-1,0.0604971428571429},
-{2970957,3866913,3866450,0.285275,0.273864},
-{2970958,3866405,3866450,0.02352,0.0267272727272727},
-{2970959,3866405,3866734,0.2676,-1},
-{2970960,3867780,3867497,0.123868965517241,0.156182608695652},
-{2970961,3868140,3867995,0.1014,0.11492},
-{2970962,3871159,3871171,0.175957894736842,0.196658823529412},
-{2970963,3871171,3871313,-1,0.274085714285714},
-{2971009,3857591,3857632,-1,0.0629478260869565},
-{2971010,3857591,3858373,0.4932,-1},
-{2971015,3872084,3871968,-1,0.04160625},
-{2971016,3872346,3872084,-1,0.197175},
-{2971017,3864481,3864854,0.244517647058824,0.159876923076923},
-{2971018,3864025,3864481,-1,0.28262},
-{2971019,3864775,3864936,0.0626275862068966,-1},
-{2971020,3864775,3864646,-1,0.0512357142857143},
-{2971021,3864753,3864771,-1,0.0250615384615385},
-{2971022,3864771,3864775,-1,0.122030769230769},
-{2971023,3865105,3864817,-1,0.26305},
-{2971024,3864817,3864850,-1,0.02961},
-{2971025,3864817,3864013,0.371016,-1},
-{2971026,3850325,3850060,0.165622222222222,0.178872},
-{2971030,3857491,3856530,0.5216,0.5216},
-{2971031,3859021,3858891,-1,0.0971571428571429},
-{2971032,3857364,3858891,0.6971,-1},
-{2971033,3858891,3857491,0.725328,0.725328},
-{2971034,3888225,3888215,0.13458,0.149533333333333},
-{2971035,3888807,3889047,0.1,0.0774193548387097},
-{2971036,3889047,3889418,0.169909090909091,0.128896551724138},
-{2971040,3900003,3899888,-1,0.153416326530612},
-{2971041,3897605,3897504,0.0887625,-1},
-{2971042,3897939,3899016,0.281517073170732,-1},
-{2971043,3891401,3891728,0.140228571428571,0.13088},
-{2971044,3891728,3892080,0.334114285714286,-1},
-{2971045,3891238,3891819,0.65649,0.354859459459459},
-{2971046,3891819,3891867,0.061,0.05124},
-{2971047,3893724,3893621,0.0877555555555556,0.057790243902439},
-{2971048,3900073,3900047,0.192829787234043,-1},
-{2971049,3900234,3900232,-1,0.0316875},
-{2971050,3894794,3895172,0.120829787234043,0.149447368421053},
-{2971051,3895172,3895550,0.13516,0.132221739130435},
-{2971052,3890417,3890879,0.135381818181818,0.141828571428571},
-{2971053,3900248,3899695,0.2502,0.255523404255319},
-{2971054,3899992,3900196,0.145453333333333,0.139263829787234},
-{2971055,3900196,3900277,0.0556851063829787,0.0534122448979592},
-{2971056,3900277,3900357,0.0564510638297872,0.0541469387755102},
-{2971057,3900357,3900423,0.0617739130434783,0.0579918367346939},
-{2971058,3900423,3900492,0.054404347826087,0.0510734693877551},
-{2971059,3900492,3900544,0.0572181818181818,0.05245},
-{2971060,3903308,3903688,0.170729032258065,0.182503448275862},
-{2971061,3903688,3904150,0.141972972972973,0.138236842105263},
-{2971062,3904150,3904530,0.138771428571429,0.142852941176471},
-{2971063,3901689,3902125,-1,0.0930654545454545},
-{2971064,3902031,3902438,0.143886486486486,-1},
-{2971065,3902438,3902551,-1,0.065425},
-{2971066,3902438,3902685,0.11758125,-1},
-{2971067,3902551,3902763,-1,0.0764903225806452},
-{2971068,3902763,3902758,0.0532181818181818,0.05488125},
-{2971069,3902758,3902685,0.0476294117647059,0.0490727272727273},
-{2971070,3903051,3902763,0.435229411764706,0.422794285714286},
-{2971071,3904916,3905276,0.126923076923077,0.120731707317073},
-{2971072,3905276,3905700,0.125648780487805,0.12879},
-{2971073,3905700,3906139,0.184986206896552,0.173051612903226},
-{2971074,3912081,3912355,0.2341875,0.208166666666667},
-{2971075,3911283,3911027,0.187933333333333,0.22552},
-{2971076,3914181,3913602,0.37884,0.398778947368421},
-{2971077,3914312,3914181,0.0977,-1},
-{2971078,3913591,3912686,0.498,0.842769230769231},
-{2971079,3912686,3912514,0.118235294117647,0.1005},
-{2971080,3914334,3914475,0.074328,0.0807913043478261},
-{2971081,3914475,3914695,0.18852,0.198442105263158},
-{2971082,3914695,3914808,0.103941176470588,0.0981666666666667},
-{2971083,3867780,3866886,0.2703,0.235646153846154},
-{2971084,3916456,3917117,0.226235294117647,0.187609756097561},
-{2971085,3916421,3916551,0.11648,0.069888},
-{2971086,3916115,3916421,0.164666666666667,0.164666666666667},
-{2971087,3916115,3916411,-1,-1},
-{2971088,3916411,3916456,0.0727578947368421,0.06912},
-{2971089,3915700,3916124,-1,0.3643125},
-{2971090,3915544,3915700,-1,0.3576},
-{2971091,3904863,3904814,0.214,0.24075},
-{2971092,3904814,3904813,0.210782608695652,0.167172413793103},
-{2971093,3918213,3918473,0.164378571428571,0.148470967741935},
-{2971094,3917899,3917989,0.0382829268292683,-1},
-{2971095,3917724,3917899,0.0585906976744186,-1},
-{2971096,3917536,3917724,0.0768558139534884,-1},
-{2971097,3917489,3917536,0.0207409090909091,-1},
-{2971098,3919117,3919288,0.0765483870967742,0.0697941176470588},
-{2971099,3919288,3919453,0.0678,0.06215},
-{2971100,3919453,3919625,0.0624166666666667,0.0624166666666667},
-{2971101,3919625,3919786,0.0660857142857143,0.0680294117647059},
-{2971102,3919396,3920091,0.59097,-1},
-{2971103,3919209,3919396,0.204085714285714,0.28572},
-{2971104,3916140,3916048,0.0746,0.0610363636363636},
-{2971105,3916480,3916140,0.282763636363636,0.296228571428571},
-{2971106,3917101,3916480,0.482171428571429,0.50628},
-{2971107,3917167,3917101,0.1077,0.0942375},
-{2971108,3916786,3916720,0.0697875,0.0587684210526316},
-{2971109,3917004,3916786,0.182542857142857,0.182542857142857},
-{2971110,3917121,3917004,0.0703655172413793,0.0703655172413793},
-{2971111,3917690,3917121,0.474054545454545,0.386266666666667},
-{2971112,3917875,3917690,0.162423529411765,0.2124},
-{2971113,3917921,3917875,0.0904235294117647,0.15372},
-{2971114,3915486,3915189,0.26466,0.27858947368421},
-{2971115,3915596,3915486,0.0942,0.0994333333333333},
-{2971116,3916048,3915596,0.335345454545455,0.36888},
-{2971117,3918490,3917710,0.688866666666667,0.61998},
-{2971118,3918950,3918490,0.285507692307692,0.239458064516129},
-{2971119,3917398,3917334,0.0712235294117647,0.0712235294117647},
-{2971120,3917770,3917398,0.27335,0.3124},
-{2971121,3917994,3917770,0.11624,0.11624},
-{2971122,3918153,3917994,0.0734516129032258,0.0669705882352941},
-{2971123,3918237,3918153,0.0464769230769231,0.0377625},
-{2971124,3918722,3918237,0.257806451612903,0.242181818181818},
-{2971125,3918821,3918722,0.0732521739130435,0.0936},
-{2971126,3900851,3900941,0.0318933333333333,0.0299},
-{2971127,3900941,3901059,0.0397021276595745,0.03732},
-{2971128,3904813,3905290,0.179079069767442,0.183342857142857},
-{2971129,3905290,3905394,0.0447219512195122,0.0509333333333333},
-{2971130,3905394,3905508,0.0422142857142857,0.0422142857142857},
-{2971131,3905508,3906054,0.189,0.213230769230769},
-{2971132,3905394,3905294,0.273392307692308,0.296175},
-{2971133,3905394,3905497,0.0752608695652174,0.0961666666666667},
-{2971134,3906096,3905497,0.318771428571429,0.307779310344828},
-{2971135,3907012,3906970,0.259954285714286,0.233292307692308},
-{2971136,3906424,3906854,0.155385714285714,0.181283333333333},
-{2971137,3906854,3906964,0.0482727272727273,0.0455142857142857},
-{2971138,3906970,3906964,0.108022222222222,0.09114375},
-{2971139,3916615,3915887,0.456530769230769,0.349111764705882},
-{2971140,3916806,3916615,0.145971428571429,0.180317647058824},
-{2971141,3916970,3916806,0.237461538461538,0.162473684210526},
-{2971142,3917631,3916970,0.404834482758621,0.434822222222222},
-{2971143,3917112,3916931,0.138228571428571,0.170752941176471},
-{2971144,3917279,3917112,0.198,0.166736842105263},
-{2971145,3917963,3917279,0.429555555555556,0.414214285714286},
-{2971146,3916931,3916206,0.476712,0.476712},
-{2971147,3897476,3897618,0.123070588235294,0.10461},
-{2971148,3897432,3897476,0.0345214285714286,0.0345214285714286},
-{2971149,3897166,3897432,0.147910344827586,0.153192857142857},
-{2971150,3896959,3897166,0.0931935483870968,0.103178571428571},
-{2971151,3896810,3896959,0.0675636363636364,0.0675636363636364},
-{2971152,3896690,3896810,0.0622166666666667,0.0658764705882353},
-{2971153,3895300,3895484,0.17636,0.195955555555556},
-{2971154,3895484,3895661,0.152085,0.144842857142857},
-{2971155,3895661,3895735,0.0478975609756098,0.0467571428571428},
-{2971156,3895735,3896027,0.1776,0.169527272727273},
-{2971157,3896027,3896088,0.039409756097561,0.039409756097561},
-{2971158,3896088,3896306,0.175761290322581,0.18162},
-{2971159,3906500,3907095,-1,0.324133333333333},
-{2971160,3907095,3907265,-1,0.091368},
-{2971161,3895833,3896012,0.0709,0.0709},
-{2971162,3895722,3895833,0.0500129032258064,0.062016},
-{2971163,3895259,3895420,0.0973714285714286,0.081792},
-{2971164,3894993,3895259,0.140292857142857,0.119036363636364},
-{2971165,3894782,3895084,0.209546341463415,0.204557142857143},
-{2971166,3895288,3895420,0.116693617021277,0.119230434782609},
-{2971167,3895518,3895756,0.139281818181818,0.139281818181818},
-{2971168,3895756,3895809,0.0533090909090909,0.0451076923076923},
-{2971169,3895809,3895978,0.1473,0.124638461538462},
-{2971170,3895941,3896588,-1,0.459884210526316},
-{2971171,3895756,3895941,-1,0.114714285714286},
-{2971172,3899382,3899513,0.075075,0.0828413793103448},
-{2971173,3899513,3899600,0.0445125,0.0647454545454545},
-{2971174,3897166,3897379,-1,0.169878260869565},
-{2971175,3897379,3897796,-1,0.285964285714286},
-{2971176,3898084,3898363,-1,0.129111111111111},
-{2971177,3897796,3898084,0.187457142857143,0.187457142857143},
-{2971178,3901084,3901450,0.225672,0.201492857142857},
-{2971179,3900898,3901084,0.074895,0.0809675675675676},
-{2971180,3900548,3900898,0.132125581395349,0.142035},
-{2971181,3899399,3899469,0.0322340425531915,0.0309183673469388},
-{2971182,3899469,3899846,0.1374875,0.134681632653061},
-{2971183,3897301,3897418,0.0936,0.0980571428571429},
-{2971184,3897418,3897522,0.115633333333333,0.0946090909090909},
-{2971231,3896723,3896471,0.167014285714286,0.23382},
-{2971232,3897786,3896723,0.3948,0.567525},
-{2971239,3905502,3905217,0.103677272727273,0.091236},
-{2971240,3906269,3905502,0.23715652173913,0.330581818181818},
-{2971241,3903947,3904397,0.141655813953488,0.138436363636364},
-{2971248,3898854,3897991,-1,0.413668965517241},
-{2971249,3898854,3899412,0.311261538461538,0.289028571428571},
-{2971250,3898514,3898854,0.183422222222222,0.176871428571429},
-{2971251,3898423,3897786,0.259594736842105,0.365355555555556},
-{2971252,3899120,3898423,-1,-1},
-{2971253,3903568,3902864,0.281019512195122,-1},
-{2971254,3905320,3905414,-1,0.0283358490566038},
-{2971255,3904818,3905320,-1,0.141755555555556},
-{2971256,3905799,3905663,0.0876444444444444,0.0986},
-{2971272,3903889,3904282,0.100476923076923,0.137494736842105},
-{2971273,3904565,3904858,0.0749142857142857,0.083904},
-{2971288,3916912,3917207,0.230139130434783,0.1654125},
-{2971289,3917411,3917207,0.0852923076923077,0.0869647058823529},
-{2971290,3917207,3917258,0.250096551724138,0.259028571428571},
-{2971291,3916093,3916494,0.318790909090909,0.21916875},
-{2971292,3915768,3916093,0.109628571428571,0.1119125},
-{2971293,3915607,3915768,0.0552941176470588,0.0564},
-{2971294,3889895,3890996,0.601147826086956,0.5761},
-{2971295,3890996,3891124,0.128828571428571,-1},
-{2971296,3892294,3892315,-1,0.050775},
-{2971297,3891614,3892294,-1,0.507677419354839},
-{2971298,3891036,3891614,-1,0.435558620689655},
-{2971299,3889699,3889292,-1,-1},
-{2971300,3887518,3887589,-1,-1},
-{2971301,3887518,3887444,-1,-1},
-{2971302,3887444,3887847,0.287775,-1},
-{2971303,3887643,3887847,0.10244347826087,-1},
-{2971304,3886820,3886868,0.20025,-1},
-{2971305,3886868,3886871,0.0278454545454545,-1},
-{2971306,3886871,3887029,0.4295,-1},
-{2971307,3887029,3886985,0.276954545454545,-1},
-{2971308,3888803,3888401,0.48885,0.48885},
-{2971309,3888798,3888803,-1,0.190533333333333},
-{2971310,3894873,3895080,-1,0.0513310344827586},
-{2971311,3894689,3894802,0.0246454545454545,-1},
-{2971312,3897646,3897968,0.0642882352941176,-1},
-{2971313,3899518,3899144,0.167653846153846,-1},
-{2971314,3879387,3879588,-1,-1},
-{2971315,3879588,3879755,-1,-1},
-{2971316,3879524,3879729,0.42232,-1},
-{2971317,3879139,3879356,0.412690909090909,0.324257142857143},
-{2971318,3877789,3877453,0.271866666666667,-1},
-{2971319,3877453,3877502,-1,-1},
-{2971320,3877324,3877283,-1,0.14556},
-{2971321,3877502,3877324,-1,-1},
-{2971322,3877324,3877344,0.09685,-1},
-{2971323,3877344,3877453,-1,0.059424},
-{2971324,3877344,3877216,0.0677142857142857,0.05925},
-{2971325,3878042,3877690,0.13073023255814,0.15192972972973},
-{2971326,3879251,3878478,0.336555,0.354268421052632},
-{2971327,3878478,3878042,0.189268421052632,0.179805},
-{2971328,3885480,3885383,0.0430071428571429,0.0415241379310345},
-{2971329,3885955,3885480,0.16212,0.156890322580645},
-{2971330,3891244,3891272,0.0656052631578947,0.0673783783783784},
-{2971331,3891208,3891244,0.0688105263157895,0.0769058823529412},
-{2971332,3880841,3880809,0.221769230769231,0.11532},
-{2971333,3880761,3880882,0.2274,0.10233},
-{2971334,3880892,3880986,0.0494181818181818,0.0639529411764706},
-{2971335,3880882,3880841,0.1689,0.14075},
-{2971336,3880707,3880809,0.090744,-1},
-{2971337,3880883,3881281,-1,0.4617},
-{2971338,3880882,3880892,0.0648782608695652,0.0710571428571429},
-{2971339,3882564,3882744,0.238666666666667,-1},
-{2971340,3882744,3882872,0.215785714285714,-1},
-{2971341,3882872,3883264,-1,0.241371428571429},
-{2971346,3903384,3903987,0.151110638297872,0.139258823529412},
-{2971347,3903987,3904973,0.302382857142857,0.264585},
-{2971399,3903044,3903145,0.0674222222222222,0.130028571428571},
-{2971400,3903668,3903457,0.104084210526316,0.09888},
-{2971401,3903852,3903668,0.0849090909090909,0.0849090909090909},
-{2971422,3907739,3907801,0.0714,0.0634666666666667},
-{2971423,3907914,3908020,0.0977571428571429,0.109488},
-{2971433,3923096,3923243,0.0916363636363637,0.103384615384615},
-{2971434,3923243,3923307,0.0307565217391304,0.03537},
-{2971435,3923307,3923677,0.214677272727273,0.255291891891892},
-{2971436,3923520,3923677,0.136145454545455,0.119808},
-{2971437,3923398,3923520,0.0885375,0.0809485714285714},
-{2971438,3920983,3921559,0.31258064516129,0.31258064516129},
-{2971439,3921559,3921787,0.12369375,0.0899590909090909},
-{2971440,3921787,3921908,0.08745,0.061215},
-{2971441,3921908,3922244,0.1643,0.144263414634146},
-{2971442,3922257,3922345,0.0426,0.0404153846153846},
-{2971443,3919879,3920057,0.124175,0.212871428571429},
-{2971445,3865232,3865403,0.182841176470588,0.230244444444444},
-{2971446,3865403,3865825,-1,0.54572},
-{2971447,3865779,3865300,0.254057142857143,0.254057142857143},
-{2971448,3868713,3868681,0.102560869565217,0.102560869565217},
-{2971449,3875145,3874787,0.177876923076923,0.177876923076923},
-{2971450,3875122,3875145,0.0871363636363636,0.09585},
-{2971451,3857632,3858444,-1,0.431085714285714},
-{2971452,3858444,3858786,0.21561,0.172488},
-{2971453,3868939,3868655,-1,0.415153846153846},
-{2971454,3868549,3868655,-1,0.07816},
-{2971455,3869066,3868754,0.16338,0.192211764705882},
-{2971456,3868641,3868754,0.0865333333333333,-1},
-{2971457,3858131,3858171,0.0711833333333333,0.0595953488372093},
-{2971458,3856618,3856746,0.0366807692307692,0.0405829787234043},
-{2971459,3856976,3856434,0.26570625,0.223752631578947},
-{2971460,3857816,3857416,0.214844444444444,0.207171428571429},
-{2971461,3858101,3857816,0.112310526315789,0.115345945945946},
-{2971462,3859806,3860477,0.350078571428571,0.377007692307692},
-{2971463,3861746,3861214,0.5835,0.507391304347826},
-{2971464,3859423,3859273,0.0803333333333333,0.0774642857142857},
-{2971465,3859273,3858969,0.198218181818182,0.1896},
-{2971466,3870087,3869839,0.1938,0.0750193548387097},
-{2971467,3870168,3870087,0.0342571428571429,0.0189315789473684},
-{2971468,3870035,3869867,-1,0.07963125},
-{2971469,3872974,3872781,0.0725357142857143,0.0923181818181818},
-{2971470,3873889,3872974,0.432825,-1},
-{2971471,3875974,3876325,0.139692857142857,0.156456},
-{2971472,3876325,3876630,0.1779,0.169428571428571},
-{2971473,3876630,3876919,0.15111,0.143914285714286},
-{2971474,3876919,3877581,0.33849,0.294339130434783},
-{2971475,3848563,3848433,0.359976923076923,0.359976923076923},
-{2971476,3865628,3865267,0.155594117647059,-1},
-{2971477,3865311,3865226,-1,0.213765517241379},
-{2971478,3868156,3867722,0.157015384615385,0.1458},
-{2971479,3868653,3868156,0.1713,0.1713},
-{2971480,3869409,3868653,0.218682352941176,0.225309090909091},
-{2971481,3869825,3869409,0.132533333333333,0.275261538461538},
-{2971482,3869896,3869900,-1,0.049425},
-{2971483,3875204,3875862,0.196610526315789,0.201924324324324},
-{2971484,3872127,3870674,-1,0.271395918367347},
-{2971485,3880746,3882522,-1,0.409176},
-{2971486,3860964,3861281,0.114153846153846,0.1113},
-{2971487,3861701,3861281,0.168908571428571,0.168908571428571},
-{2971488,3861964,3861701,0.125815384615385,0.0962117647058824},
-{2971489,3862322,3861964,0.148386206896552,0.153685714285714},
-{2971490,3862322,3862469,0.199834285714286,0.189032432432432},
-{2971491,3861274,3860758,0.195990697674419,0.183208695652174},
-{2971492,3861552,3861274,0.091284,0.091284},
-{2971493,3867446,3867167,0.176905263157895,0.176905263157895},
-{2971494,3867715,3867446,0.119524137931034,0.119524137931034},
-{2971495,3872073,3872020,0.0685363636363636,0.0655565217391304},
-{2971496,3872020,3871883,0.1917,0.200034782608696},
-{2971497,3873233,3872622,0.228511111111111,0.228511111111111},
-{2971498,3873445,3873233,0.086976,0.103542857142857},
-{2971499,3866435,3866644,0.0831,0.0870571428571429},
-{2971500,3871301,3871139,0.263836363636364,0.341435294117647},
-{2971501,3871139,3871021,0.186530769230769,0.202075},
-{2971502,3871021,3870947,0.146514285714286,0.161936842105263},
-{2971503,3870875,3870749,0.227139130434783,0.26121},
-{2971504,3871456,3870922,-1,0.149127272727273},
-{2971505,3865124,3864861,0.0990571428571429,0.0924533333333333},
-{2971506,3865404,3865124,0.110316279069767,0.105413333333333},
-{2971507,3869245,3868444,0.3765,0.340064516129032},
-{2971508,3868273,3867645,0.316977777777778,0.316977777777778},
-{2971509,3866234,3866263,0.0852,0.0781},
-{2971510,3871368,3870830,0.15890625,0.211875},
-{2971511,3871636,3871368,0.0863777777777778,0.11661},
-{2971512,3866371,3865999,0.101045454545455,0.101045454545455},
-{2971513,3867205,3866710,0.179553488372093,0.16784347826087},
-{2971514,3867205,3867277,0.0285652173913043,0.0305581395348837},
-{2971515,3867410,3867083,0.124316129032258,0.137635714285714},
-{2971516,3867827,3867410,0.180878571428571,0.230209090909091},
-{2971517,3870675,3870416,0.101791304347826,0.09755},
-{2971518,3871054,3870675,0.12052,0.1572},
-{2971519,3871296,3871054,0.11358,0.22716},
-{2971520,3871296,3871689,0.143925,0.246728571428571},
-{2971521,3871689,3871912,0.0594529411764706,0.06316875},
-{2971522,3862828,3861460,0.337096153846154,0.35058},
-{2971523,3863361,3862828,0.14556,0.14556},
-{2971524,3863557,3863361,0.0483183673469388,0.047352},
-{2971525,3866137,3865914,0.0507622641509434,0.0517384615384615},
-{2971526,3866506,3866137,0.0699346153846154,0.0713058823529412},
-{2971527,3886558,3887572,0.334455319148936,0.308223529411765},
-{2971528,3887762,3887572,0.04075,0.0501538461538462},
-{2971529,3888042,3887762,0.0511224489795918,0.0596428571428571},
-{2971530,3893721,3893671,0.103358823529412,0.10981875},
-{2971531,3866642,3866484,0.0435096774193548,0.04496},
-{2971532,3867143,3867008,0.0504529411764706,0.0553354838709677},
-{2971533,3867352,3867143,0.0825111111111111,0.0675090909090909},
-{2971534,3867443,3867352,0.0410571428571429,0.0328457142857143},
-{2971535,3870201,3869739,0.18145,0.189339130434783},
-{2971536,3870490,3870201,0.0773657142857143,0.104146153846154},
-{2971537,3870248,3869980,0.0915333333333333,0.112336363636364},
-{2971538,3870520,3870248,0.10375,0.138333333333333},
-{2971539,3883412,3882817,0.374964705882353,0.374964705882353},
-{2971540,3887571,3887572,0.141144,0.130688888888889},
-{2971541,3887512,3887571,0.215825,0.235445454545455},
-{2971542,3896824,3896965,-1,-1},
-{2971543,3899846,3899982,0.055531914893617,0.055531914893617},
-{2971544,3899982,3900071,0.0369272727272727,0.0361066666666667},
-{2971545,3903770,3904417,0.372192,0.372192},
-{2971546,3904417,3904806,0.360811764705882,0.245352},
-{2971547,3913361,3913448,0.0416322580645161,0.032265},
-{2971548,3913448,3913728,0.0913459459459459,0.0866615384615385},
-{2971549,3886134,3886102,0.0574625,0.0574625},
-{2971550,3886102,3886098,0.0614375,0.0614375},
-{2971551,3883264,3883345,-1,0.0448222222222222},
-{2971552,3885140,3885459,0.3066,-1},
-{2971553,3884827,3885140,0.33435,-1},
-{2971554,3900383,3900506,-1,0.0516},
-{2971555,3902160,3903110,-1,0.211137313432836},
-{2971556,3903110,3903195,-1,0.0168461538461538},
-{2971557,3905370,3905707,0.06906,-1},
-{2971558,3908257,3908130,-1,0.0819},
-{2971559,3908794,3907732,0.243380487804878,-1},
-{2971561,3907789,3907765,0.0259826086956522,0.0259826086956522},
-{2971562,3907765,3907732,0.0383727272727273,0.036704347826087},
-{2971563,3907789,3908794,0.257194736842105,-1},
-{2971569,3876840,3876366,-1,0.37848},
-{2971570,3876840,3877019,0.183136363636364,-1},
-{2971576,3884380,3883643,0.454155555555556,0.471623076923077},
-{2971588,3898703,3898871,-1,0.119828571428571},
-{2971589,3898703,3898789,0.114461538461538,0.0875294117647059},
-{2971590,3901052,3901811,0.393085714285714,0.393085714285714},
-{2971591,3901811,3902144,0.14538,0.13629375},
-{2971595,3870524,3870073,0.119969230769231,-1},
-{2971596,3870893,3870524,0.087790243902439,-1},
-{2971597,3872059,3871540,0.114572727272727,0.120028571428571},
-{2971598,3879782,3879858,0.0505034482758621,0.0563307692307692},
-{2971599,3879782,3879591,0.130741935483871,0.12665625},
-{2971600,3879384,3879591,0.12312,0.12312},
-{2971601,3887222,3887603,0.0966615384615385,0.0819521739130435},
-{2971602,3887603,3887922,0.0648266666666667,0.0634173913043478},
-{2971603,3887922,3888075,0.0364636363636364,0.0327428571428571},
-{2971604,3888075,3888592,0.12519512195122,0.122214285714286},
-{2971605,3887155,3887523,0.11630625,0.12406},
-{2971606,3887523,3887841,0.0850114285714286,0.0804162162162162},
-{2971607,3887841,3888159,0.09549375,0.0873085714285714},
-{2971608,3888159,3888531,0.14508,0.134333333333333},
-{2971609,3885878,3885816,0.271054545454545,0.331288888888889},
-{2971610,3901103,3901158,0.0257333333333333,0.0236326530612245},
-{2971611,3901158,3901350,0.0716590909090909,0.0656875},
-{2971612,3868684,3868479,0.083325,0.0784235294117647},
-{2971613,3868807,3868684,0.0446,0.0408833333333333},
-{2971614,3904010,3904871,0.354822857142857,0.344966666666667},
-{2971615,3909516,3909790,0.144822222222222,0.19551},
-{2971616,3909790,3910187,0.135970588235294,0.18492},
-{2971619,3867898,3867743,0.114830769230769,0.129808695652174},
-{2971620,3868049,3867898,0.104121428571429,0.100531034482759},
-{2971621,3868257,3868049,0.106234285714286,0.119941935483871},
-{2971622,3868580,3868257,0.18165,0.198163636363636},
-{2971623,3868852,3868580,0.153123529411765,0.157763636363636},
-{2971624,3869055,3868852,0.186026086956522,0.225189473684211},
-{2971625,3886043,3885791,0.123103448275862,0.274615384615385},
-{2971626,3885791,3885619,0.0719285714285714,0.0839166666666667},
-{2971627,3892178,3892352,0.0777818181818182,0.0754941176470588},
-{2971628,3892352,3892684,0.136581818181818,0.128777142857143},
-{2971635,3884819,3884949,0.08655,0.0814588235294118},
-{2971636,3884949,3885024,0.0722842105263158,0.057225},
-{2971637,3886433,3886260,0.1888875,0.20148},
-{2971638,3886489,3886433,0.0622333333333333,0.07468},
-{2971639,3887849,3888252,0.107436734693878,0.105288},
-{2971640,3888252,3888384,0.0353739130434783,0.0353739130434783},
-{2971641,3890745,3891085,0.119505,0.125794736842105},
-{2971642,3891085,3891243,0.150917647058824,0.150917647058824},
-{2971643,3901368,3901926,0.1956,0.41728},
-{2971644,3901657,3902423,0.40467,0.367881818181818},
-{2971645,3896163,3896224,0.040625,0.0464285714285714},
-{2971646,3896224,3896870,0.5214,0.603726315789474},
-{2971647,3902958,3903655,0.362325,0.362325},
-{2971700,3877167,3877134,0.0698647058823529,0.0819103448275862},
-{2971701,3875859,3876276,-1,-1},
-{2971702,3876498,3876276,-1,0.4071375},
-{2971703,3878393,3878205,0.3527,0.52905},
-{2971704,3878205,3878139,0.135456,0.0967542857142857},
-{2971705,3891563,3891055,-1,0.455791304347826},
-{2971706,3890416,3890111,0.278634782608696,-1},
-{2971707,3890731,3890416,0.237511111111111,-1},
-{2971708,3891885,3891744,0.2146125,0.163514285714286},
-{2971709,3891993,3891885,0.130857142857143,0.152666666666667},
-{2971752,3905120,3905222,0.0639545454545455,0.0639545454545455},
-{2971753,3905222,3904828,0.123795918367347,-1},
-{2971754,3904739,3905120,0.117482352941176,-1},
-{2971755,3904828,3904469,0.127353191489362,-1},
-{2971756,3904739,3904389,-1,0.113447058823529},
-{2971757,3904066,3903856,0.0754333333333333,-1},
-{2971758,3903856,3903568,0.10965,-1},
-{2971759,3903956,3904066,-1,0.0421714285714286},
-{2971760,3903263,3903956,-1,0.2246},
-{2971761,3904389,3904469,0.0584,0.0737684210526316},
-{2971762,3901127,3901734,0.282690909090909,0.32168275862069},
-{2971763,3901044,3901127,0.0834,0.0834},
-{2971764,3900592,3901044,0.286325,0.286325},
-{2971765,3901469,3901044,-1,0.139714285714286},
-{2971766,3901553,3901127,0.158609302325581,-1},
-{2971767,3901884,3901553,0.113934782608696,-1},
-{2971768,3901803,3901469,-1,0.102864},
-{2971769,3902609,3902705,0.0452068965517241,0.0422903225806452},
-{2971770,3902705,3903356,0.224822727272727,0.32974},
-{2971771,3902864,3902705,0.16568,-1},
-{2971772,3901729,3902609,0.357793548387097,0.264085714285714},
-{2971773,3903126,3902309,0.367870588235294,0.360796153846154},
-{2971774,3902983,3903131,0.0738612244897959,0.0861714285714286},
-{2971775,3902838,3902883,-1,0.0945391304347826},
-{2971776,3902759,3902779,-1,0.045},
-{2971777,3902759,3903007,-1,0.0728166666666667},
-{2971778,3902934,3903554,0.128475,-1},
-{2971779,3902779,3902789,-1,0.0387},
-{2971780,3902618,3902789,0.0375294117647059,-1},
-{2971781,3902377,3902275,-1,0.0555391304347826},
-{2971782,3902538,3902709,0.0769135135135135,-1},
-{2971783,3902259,3902495,-1,0.25872},
-{2971784,3902693,3902759,-1,0.0215351351351351},
-{2971785,3902200,3902375,-1,0.0454307692307692},
-{2971786,3902036,3902011,0.0202636363636364,0.018575},
-{2971787,3902155,3901497,0.307032558139535,0.322009756097561},
-{2971788,3902709,3903012,0.0917217391304348,0.10548},
-{2971789,3902259,3902155,0.0730137931034483,0.151242857142857},
-{2971843,3916715,3916494,0.205666666666667,0.1156875},
-{2971844,3917207,3916715,0.231558139534884,0.211851063829787},
-{2971845,3916715,3917009,0.14895,0.226971428571429},
-{2971925,3915237,3915513,0.0878533333333333,-1},
-{2971952,3908476,3908282,-1,0.0339396226415094},
-{2971953,3907555,3907523,0.00996734693877551,0.00996734693877551},
-{2971954,3907130,3907355,0.10038,-1},
-{2971955,3907280,3907355,0.0259161290322581,-1},
-{2971956,3907523,3907480,0.0134204081632653,0.0134204081632653},
-{2971957,3907355,3907480,0.0398478260869565,-1},
-{2971958,3907480,3908282,0.2286,-1},
-{2971959,3906104,3907130,0.621575,-1},
-{2971960,3906104,3906392,-1,0.206972727272727},
-{2971961,3908168,3907186,0.515007692307692,0.535608},
-{2971962,3908585,3908975,0.201066666666667,0.201066666666667},
-{2971963,3903382,3903567,0.04815,-1},
-{2971970,3907573,3907555,0.006564,0.00669795918367347},
-{2971993,3860753,3860659,0.0585,0.0615789473684211},
-{2971994,3860672,3860753,0.1704375,0.165272727272727},
-{2971995,3861460,3860753,0.223614285714286,0.240815384615385},
-{2971998,3862763,3862481,0.154535294117647,0.1946},
-{2971999,3862481,3862004,0.218268292682927,0.213071428571429},
-{2972000,3862004,3861925,0.0350634146341463,0.0350634146341463},
-{2972001,3861925,3861658,0.132409090909091,0.135488372093023},
-{2972002,3861658,3861452,0.0976695652173913,0.109580487804878},
-{2972003,3861452,3861214,0.1335,0.140526315789474},
-{2972004,3860238,3859753,0.361885714285714,0.4222},
-{2972005,3859897,3859753,-1,-1},
-{2972006,3861437,3861596,0.14424,0.200333333333333},
-{2972007,3860367,3861016,0.598581818181818,0.65844},
-{2972008,3864709,3864660,0.0733714285714286,0.0642},
-{2972009,3864709,3864570,0.0718285714285714,0.0655826086956522},
-{2972010,3864845,3864709,0.245311111111111,0.245311111111111},
-{2972011,3865078,3864840,0.165884210526316,0.143263636363636},
-{2972012,3865779,3865078,0.312,0.300444444444444},
-{2972013,3864840,3864453,0.198457142857143,0.198457142857143},
-{2972014,3864453,3863618,0.369921428571429,0.414312},
-{2972015,3863923,3863490,0.36672,0.293376},
-{2972016,3864018,3863923,0.0621230769230769,0.0769142857142857},
-{2972017,3866247,3866068,-1,0.1356},
-{2972018,3867564,3866247,-1,0.324404651162791},
-{2972019,3865571,3865403,0.110147368421053,0.0721655172413793},
-{2972020,3873006,3873042,0.0838714285714286,0.0690705882352941},
-{2972021,3871357,3871291,0.0524454545454545,0.104890909090909},
-{2972022,3873042,3871357,0.374347826086956,-1},
-{2972023,3871049,3870978,0.09465,0.059778947368421},
-{2972024,3871539,3871049,0.26028,0.209903225806452},
-{2972025,3871357,3871049,0.0795073170731707,-1},
-{2972026,3871049,3870377,0.157787234042553,-1},
-{2972027,3869094,3869052,0.06246,0.0543130434782609},
-{2972028,3869094,3869421,-1,0.3552},
-{2972029,3869740,3869094,0.14129387755102,-1},
-{2972030,3868258,3867890,0.355666666666667,0.177833333333333},
-{2972031,3867604,3867564,0.0715125,0.05721},
-{2972032,3869094,3867890,0.498444444444444,-1},
-{2972033,3868098,3868549,-1,0.298968},
-{2972034,3866077,3866283,0.0842072727272727,-1},
-{2972035,3866077,3866009,-1,0.0485052631578947},
-{2972036,3866140,3866037,0.0349531914893617,-1},
-{2972037,3865571,3866077,0.241934693877551,-1},
-{2972038,3864879,3864710,0.0905225806451613,-1},
-{2972039,3864901,3864879,0.00946285714285714,-1},
-{2972040,3864362,3863590,0.277185714285714,0.258706666666667},
-{2972041,3863590,3862967,0.247214285714286,0.225717391304348},
-{2972042,3865213,3865275,0.0923,-1},
-{2972043,3865430,3865458,-1,0.121728571428571},
-{2972044,3865790,3865458,-1,0.219230769230769},
-{2972045,3865283,3865430,0.0632086956521739,0.0765157894736842},
-{2972046,3866766,3866646,-1,0.0235411764705882},
-{2972047,3867195,3866766,-1,0.087684},
-{2972048,3865766,3865536,0.12,-1},
-{2972049,3865488,3865489,-1,0.0196266666666667},
-{2972050,3865489,3865441,0.0233785714285714,-1},
-{2972051,3865441,3865488,0.0326926829268293,-1},
-{2972052,3865441,3865355,0.0334181818181818,-1},
-{2972053,3865392,3865441,0.0291538461538461,-1},
-{2972054,3865392,3865355,-1,0.024192},
-{2972055,3865251,3865260,-1,0.02145},
-{2972056,3865458,3865471,-1,0.122413043478261},
-{2972057,3865038,3865000,-1,0.020825},
-{2972058,3865370,3865848,0.336906382978723,-1},
-{2972059,3866068,3866017,0.117808695652174,-1},
-{2972060,3866017,3866037,0.0583235294117647,-1},
-{2972061,3866017,3865848,-1,0.0970457142857143},
-{2972062,3865233,3865571,0.20525,-1},
-{2972063,3865496,3865500,0.0739411764705882,-1},
-{2972064,3866009,3866161,-1,0.0577854545454545},
-{2972065,3872036,3871765,0.366533333333333,-1},
-{2972066,3870472,3870087,0.3682,-1},
-{2972067,3870670,3870472,0.191875,-1},
-{2972068,3871216,3870670,0.209353846153846,-1},
-{2972069,3870910,3870670,0.263825,-1},
-{2972075,3865598,3865599,0.258707142857143,-1},
-{2972077,3865250,3864958,0.11442,-1},
-{2972078,3864958,3864916,0.202181818181818,-1},
-{2972081,3879946,3879728,-1,0.30852},
-{2972082,3880394,3880156,-1,0.287475},
-{2972083,3882112,3881773,0.385552941176471,-1},
-{2972084,3882276,3882112,0.168494117647059,-1},
-{2972085,3881384,3881773,0.279663157894737,-1},
-{2972086,3879502,3880268,-1,0.687714285714286},
-{2972087,3879753,3880500,0.589775,-1},
-{2972088,3880948,3881255,0.210857142857143,-1},
-{2972089,3883672,3882939,0.586114285714286,-1},
-{2972090,3879924,3880172,0.3645,0.3402},
-{2972091,3883824,3883635,-1,0.12458},
-{2972092,3882955,3882570,0.393126315789474,-1},
-{2972093,3884737,3884451,0.195066666666667,-1},
-{2972094,3884737,3884878,0.07278,0.0661636363636364},
-{2972095,3884451,3884573,0.28269,-1},
-{2972096,3884573,3884890,0.197576470588235,0.152672727272727},
-{2972097,3883842,3884573,-1,0.359217391304348},
-{2972098,3883420,3883842,-1,0.2676},
-{2972099,3883678,3883842,-1,-1},
-{2972100,3883842,3884121,-1,0.539533333333333},
-{2972101,3882164,3882889,-1,0.384428571428571},
-{2972102,3884017,3884137,-1,1.01656666666667},
-{2972103,3885051,3885457,-1,0.210094736842105},
-{2972104,3885171,3885319,0.297317647058824,-1},
-{2972105,3881236,3881845,0.468866666666667,-1},
-{2972106,3880520,3880732,0.420225,-1},
-{2972107,3880732,3880815,0.2064,-1},
-{2972108,3880815,3881276,-1,-1},
-{2972109,3880603,3880815,0.287169230769231,-1},
-{2972110,3880088,3880923,-1,0.73584705882353},
-{2972111,3880790,3880923,-1,0.25836},
-{2972112,3880617,3880790,0.335233333333333,-1},
-{2972113,3880208,3880790,-1,0.464433333333333},
-{2972114,3876008,3876763,0.507,-1},
-{2972115,3876763,3877254,-1,0.285233333333333},
-{2972116,3877254,3877523,-1,0.1377},
-{2972117,3877425,3877897,-1,-1},
-{2972118,3877918,3877897,0.0552,-1},
-{2972119,3878367,3877918,-1,-1},
-{2972120,3878405,3878367,-1,-1},
-{2972121,3878488,3878405,-1,-1},
-{2972122,3879049,3878405,-1,-1},
-{2972123,3877875,3878332,-1,-1},
-{2972124,3878367,3878332,-1,-1},
-{2972125,3878332,3878313,-1,-1},
-{2972126,3877897,3877875,0.05577,-1},
-{2972127,3878313,3878213,-1,-1},
-{2972128,3878213,3878154,0.2403,-1},
-{2972129,3878154,3878122,0.106736842105263,-1},
-{2972130,3877672,3877645,0.118623529411765,0.106136842105263},
-{2972131,3875054,3875389,0.229733333333333,-1},
-{2972132,3875389,3876319,0.391776923076923,-1},
-{2972133,3874982,3875326,0.2536125,-1},
-{2972134,3875326,3875614,0.130344,-1},
-{2972135,3875614,3876239,0.320809090909091,-1},
-{2972136,3877009,3877219,-1,-1},
-{2972137,3877273,3877219,-1,-1},
-{2972138,3876973,3876821,-1,-1},
-{2972139,3876137,3876345,0.102495652173913,-1},
-{2972140,3876345,3876398,0.100675,-1},
-{2972141,3878237,3878166,0.229228571428571,-1},
-{2972142,3878166,3878115,0.1377,-1},
-{2972143,3878115,3878088,0.0712,-1},
-{2972144,3877988,3877964,0.105624,-1},
-{2972145,3877273,3877491,-1,-1},
-{2972146,3877203,3877332,-1,-1},
-{2972147,3877332,3877782,0.536953846153846,0.536953846153846},
-{2972148,3878714,3878626,-1,0.32232},
-{2972149,3878626,3878526,-1,0.432144},
-{2972150,3878626,3879110,-1,0.2622},
-{2972151,3878115,3878626,-1,0.301231578947368},
-{2972152,3875315,3874960,-1,-1},
-{2972153,3878526,3878473,-1,0.2578},
-{2972154,3878473,3878444,-1,0.275133333333333},
-{2972155,3877964,3877962,0.0182869565217391,-1},
-{2972156,3877906,3877854,0.2768,-1},
-{2972157,3876735,3877326,-1,0.31068},
-{2972158,3878444,3878565,0.4068,-1},
-{2972159,3877488,3878102,0.292142857142857,-1},
-{2972160,3878102,3878565,0.312282352941176,-1},
-{2972161,3878102,3878224,0.244565217391304,-1},
-{2972162,3878565,3878672,0.2514,-1},
-{2972163,3878224,3878672,-1,0.227817391304348},
-{2972164,3877616,3878224,-1,0.268617391304348},
-{2972165,3878224,3878316,0.330141176470588,-1},
-{2972166,3877719,3878316,-1,0.3081},
-{2972167,3877110,3877719,0.30663,-1},
-{2972168,3875236,3875266,0.177369230769231,0.15372},
-{2972169,3875264,3875236,0.0188,0.0171652173913043},
-{2972170,3876048,3876150,0.220416,-1},
-{2972171,3875748,3876150,0.305475,-1},
-{2972172,3876150,3876284,0.266571428571429,-1},
-{2972173,3875848,3876284,0.302223529411765,0.285433333333333},
-{2972174,3876284,3877110,0.44136,-1},
-{2972175,3877376,3877649,0.27141,-1},
-{2972176,3877649,3877863,0.2268,-1},
-{2972177,3877863,3878037,0.1698,-1},
-{2972178,3878037,3878069,0.023925,-1},
-{2972179,3878069,3878206,0.147628571428571,-1},
-{2972180,3878206,3878519,0.373854545454545,-1},
-{2972181,3878519,3878781,0.331171428571429,-1},
-{2972182,3878794,3878630,-1,0.103828571428571},
-{2972183,3879056,3878794,-1,0.146452173913043},
-{2972184,3879056,3879331,0.43776,-1},
-{2972185,3879331,3879713,0.469460869565217,-1},
-{2972186,3879713,3879953,0.366285714285714,-1},
-{2972187,3879953,3880209,0.391685714285714,-1},
-{2972191,3861701,3862257,0.9265875,0.98836},
-{2972192,3862257,3862116,0.228,0.2394},
-{2972193,3864958,3863773,0.4834,-1},
-{2972204,3859627,3859655,0.186,0.186},
-{2972205,3859234,3859084,0.0822,0.092064},
-{2972206,3860082,3859234,0.364836363636364,0.325394594594595},
-{2972207,3860259,3860082,0.0942222222222222,0.0795},
-{2972208,3860566,3860259,0.140032258064516,0.124028571428571},
-{2972209,3861313,3860566,0.367986206896552,0.313870588235294},
-{2972210,3861313,3861527,0.218318181818182,0.200125},
-{2972211,3861214,3860853,0.208235294117647,0.214545454545455},
-{2972212,3862165,3862319,0.11574,0.1286},
-{2972213,3862319,3862127,0.176053846153846,0.14304375},
-{2972214,3861530,3861687,0.130963636363636,0.151642105263158},
-{2972215,3861687,3861733,0.0372260869565217,0.0305785714285714},
-{2972216,3861733,3861886,0.107947826086957,0.08276},
-{2972217,3861941,3861886,-1,0.478344},
-{2972218,3861964,3861941,-1,0.16233},
-{2972219,3873650,3873607,0.5139,0.41754375},
-{2972220,3873607,3873576,0.60284347826087,0.60284347826087},
-{2972221,3858664,3859014,0.0976142857142857,-1},
-{2972222,3859014,3859469,0.0959529411764706,-1},
-{2972223,3858558,3858529,0.0499672131147541,0.0491612903225806},
-{2972224,3858034,3858558,0.102537931034483,0.092925},
-{2972225,3858558,3859083,0.085040625,0.0877838709677419},
-{2972226,3859083,3859469,0.0626861538461538,0.0646761904761905},
-{2972227,3899877,3900393,-1,0.270444444444444},
-{2972228,3899211,3899877,-1,0.405384},
-{2972231,3896857,3897620,0.333204545454545,0.396243243243243},
-{2972232,3896239,3896857,0.32784,0.312228571428571},
-{2972233,3917912,3917987,0.03805,0.0358117647058824},
-{2972234,3917987,3918014,0.012432,0.0117283018867925},
-{2972235,3917310,3917578,-1,0.152025},
-{2972236,3917936,3918853,0.275605263157895,0.299228571428571},
-{2972237,3917789,3917936,0.0520064516129032,0.067175},
-{2972238,3917655,3917789,0.0554275862068965,0.0945529411764706},
-{2972239,3914275,3915173,0.2762,0.239373333333333},
-{2972240,3911802,3914275,0.418221818181818,0.425966666666667},
-{2972241,3911713,3911802,0.12,0.0914285714285714},
-{2972242,3911022,3911802,0.152672727272727,0.158433962264151},
-{2972243,3910510,3911022,0.11064,0.0905236363636364},
-{2972244,3909963,3910510,0.0943058823529412,0.0981551020408163},
-{2972259,3864126,3864411,-1,0.333485714285714},
-{2972260,3864023,3864973,-1,0.583591304347826},
-{2972261,3864663,3864943,-1,0.22791},
-{2972262,3864616,3864663,-1,0.0402857142857143},
-{2972263,3864380,3864616,-1,0.2375},
-{2972264,3868350,3868448,0.152815384615385,0.0946},
-{2972265,3868828,3868448,0.2029,-1},
-{2972266,3869123,3868828,0.22353,-1},
-{2972300,3902629,3903976,0.511184210526316,0.669827586206897},
-{2972301,3904075,3903976,0.0577,0.0665769230769231},
-{2972302,3901347,3900961,0.155276470588235,0.14665},
-{2972303,3901863,3901347,0.170578378378378,0.161830769230769},
-{2972304,3902119,3901863,0.0879096774193548,0.0757},
-{2972305,3902356,3902119,0.0870827586206896,0.0765272727272727},
-{2972306,3902450,3902356,0.0630642857142857,0.05886},
-{2972307,3902778,3902450,0.159724137931035,0.1544},
-{2972308,3902965,3902778,0.0834214285714286,0.0865111111111111},
-{2972309,3903199,3902965,0.0930685714285714,0.0987090909090909},
-{2972310,3903601,3903199,0.157988571428571,0.162635294117647},
-{2972311,3903709,3903601,0.0521636363636364,0.05379375},
-{2972351,3858657,3858556,0.0575142857142857,0.0555310344827586},
-{2972352,3860393,3858657,0.843085714285714,0.814013793103448},
-{2972353,3858390,3858657,0.243511111111111,0.243511111111111},
-{2972354,3858217,3858390,0.184928571428571,0.184928571428571},
-{2972355,3852856,3852040,0.323006896551724,0.346933333333333},
-{2972361,3855570,3855947,0.207805714285714,0.23461935483871},
-{2972362,3855511,3855570,0.0692363636363636,0.07616},
-{2972363,3855570,3855278,-1,0.145852173913043},
-{2972364,3855511,3855278,0.0990428571428571,-1},
-{2972365,3855278,3854623,0.340737931034483,0.30879375},
-{2972366,3858317,3858787,0.329165217391304,-1},
-{2972367,3856857,3857202,0.154683870967742,0.171257142857143},
-{2972368,3857202,3857394,0.0893111111111111,0.083151724137931},
-{2972369,3857394,3857832,0.286745454545455,0.274278260869565},
-{2972370,3857832,3858531,0.473181818181818,0.547894736842105},
-{2972371,3861509,3861019,0.3502,0.306425},
-{2972372,3861019,3860520,0.265872,0.214412903225806},
-{2972373,3860888,3860990,0.08735,0.10482},
-{2972374,3860520,3860888,0.3012,0.28865},
-{2972375,3860520,3859759,0.369154838709677,0.309291891891892},
-{2972376,3859759,3859689,0.1088,0.1088},
-{2972377,3859522,3859759,0.135923076923077,0.135923076923077},
-{2972378,3859522,3859689,0.100610526315789,0.0831130434782609},
-{2972379,3858843,3859522,0.72936,0.792782608695652},
-{2972380,3859689,3858659,0.80235652173913,0.768925},
-{2972381,3858659,3858531,0.0822,0.0786260869565217},
-{2972382,3859689,3860063,0.2764,0.287030769230769},
-{2972383,3857082,3856798,0.20778,0.17315},
-{2972384,3857394,3857082,0.201228571428571,0.192081818181818},
-{2972385,3857727,3857394,0.1961,0.23532},
-{2972386,3857974,3857727,0.1572,0.190294736842105},
-{2972387,3858787,3857974,0.54404347826087,-1},
-{2972394,3852335,3852426,0.09784,0.09784},
-{2972395,3852426,3853418,0.49586,0.619825},
-{2972396,3853418,3853717,0.2375,0.219230769230769},
-{2972397,3855491,3855537,0.0459230769230769,0.0459230769230769},
-{2972398,3855537,3856684,0.683875,-1},
-{2972399,3855491,3855180,0.49092,-1},
-{2972400,3855208,3854897,0.2755875,-1},
-{2972401,3854897,3854467,0.323842105263158,-1},
-{2972402,3855180,3855091,-1,0.149057142857143},
-{2972403,3855208,3856228,-1,0.744490909090909},
-{2972404,3854785,3854897,0.0692222222222222,0.0692222222222222},
-{2972405,3854897,3855944,0.699336,-1},
-{2972406,3854299,3854467,-1,0.19696},
-{2972407,3854467,3855705,-1,0.579264705882353},
-{2972408,3857043,3856684,0.115426666666667,0.120795348837209},
-{2972409,3855705,3856329,-1,0.34565},
-{2972410,3856329,3856676,-1,0.204244444444444},
-{2972411,3856676,3856059,0.3279,0.39348},
-{2972412,3856059,3855547,0.265523076923077,0.276144},
-{2972413,3855134,3854524,0.29312,0.283664516129032},
-{2972414,3854524,3853797,0.347335714285714,0.374053846153846},
-{2972428,3858531,3857906,0.434428571428571,0.414681818181818},
-{2972429,3857994,3856899,-1,0.764618181818182},
-{2972430,3856899,3856756,-1,0.1059},
-{2972431,3862124,3862722,0.464657142857143,0.5421},
-{2972432,3862722,3862988,0.267821052631579,0.22124347826087},
-{2972433,3864110,3863132,0.498528,-1},
-{2972434,3863132,3862506,0.302488888888889,-1},
-{2972435,3862506,3861321,0.818742857142857,-1},
-{2972436,3861321,3860863,-1,0.397453846153846},
-{2972437,3864122,3862899,-1,0.537744827586207},
-{2972438,3862899,3862152,-1,0.269290909090909},
-{2972439,3862152,3861682,-1,0.272765217391304},
-{2972440,3861682,3860805,-1,0.662428571428571},
-{2972441,3860987,3860805,0.30266,0.313096551724138},
-{2972442,3860805,3860443,0.220779310344828,0.237133333333333},
-{2972443,3866360,3864963,-1,0.866355555555556},
-{2972451,3864913,3865169,0.249766666666667,0.249766666666667},
-{2972452,3865479,3865598,0.30176,0.266258823529412},
-{2972462,3863773,3863680,-1,0.287660869565217},
-{2972572,3859948,3859869,-1,-1},
-{2972573,3860081,3860611,0.344488888888889,0.372048},
-{2972574,3857537,3856564,-1,-1},
-{2972575,3857938,3857537,-1,-1},
-{2972576,3857003,3855686,0.5046,0.523288888888889},
-{2972577,3855807,3855686,0.396031578947368,0.32715652173913},
-{2972578,3855487,3854916,0.195565714285714,0.195565714285714},
-{2972579,3854916,3854586,0.117070588235294,0.13268},
-{2972580,3855686,3855487,0.0749225806451613,0.07742},
-{2972581,3854111,3854267,0.435442105263158,0.55156},
-{2972582,3854046,3854062,0.277448275862069,0.33525},
-{2972583,3854233,3854046,0.1506,0.198792},
-{2972584,3854586,3854233,0.25141875,0.287335714285714},
-{2972585,3854155,3853608,0.241427586206897,0.304408695652174},
-{2972623,3918265,3918514,0.130176923076923,-1},
-{2972624,3895018,3895146,-1,0.10192},
-{2972625,3895566,3895308,0.0868363636363636,-1},
-{2972626,3894631,3894748,0.2673,-1},
-{2972627,3894906,3895180,0.178924137931034,-1},
-{2972628,3895103,3895532,0.344838461538462,-1},
-{2972629,3897312,3897786,0.21534,0.280878260869565},
-{2972631,3895226,3894168,0.766533333333333,0.766533333333333},
-{2972632,3894941,3895024,0.0532137931034483,0.0593538461538461},
-{2972633,3896109,3895336,-1,0.85875},
-{2972634,3895457,3896109,-1,0.55602},
-{2972635,3895744,3895536,0.294046153846154,0.131813793103448},
-{2972636,3895882,3895744,0.0764545454545455,0.0764545454545455},
-{2972637,3896226,3895882,0.148133333333333,0.14412972972973},
-{2972638,3896348,3896226,0.0929,0.123866666666667},
-{2972639,3899987,3900403,-1,0.330485714285714},
-{2972640,3900403,3900779,-1,0.152260465116279},
-{2972641,3900779,3901362,-1,0.22659512195122},
-{2972642,3901362,3901947,-1,0.227655},
-{2972643,3901947,3902607,-1,0.26125},
-{2972644,3902418,3902708,0.137086956521739,0.137086956521739},
-{2972645,3902708,3903270,0.3286,0.3286},
-{2972646,3902607,3902708,0.0566,0.0566},
-{2972647,3902660,3902958,-1,0.730885714285714},
-{2972648,3915530,3915700,0.124736842105263,0.131666666666667},
-{2972649,3896965,3897324,-1,-1},
-{2972650,3897324,3897576,-1,-1},
-{2972651,3897532,3897659,0.12339,0.117514285714286},
-{2972652,3898065,3898862,0.534333333333333,0.424323529411765},
-{2972653,3902737,3902793,0.0973578947368421,-1},
-{2972654,3902101,3902793,0.288115384615385,0.258310344827586},
-{2972655,3902737,3902876,-1,0.0871423728813559},
-{2972656,3903090,3902723,0.2521125,0.2521125},
-{2972657,3902793,3903021,0.19608,-1},
-{2972658,3903655,3903510,0.324969230769231,0.28164},
-{2972659,3902876,3903111,-1,0.197252631578947},
-{2972660,3903251,3904090,0.401561538461538,-1},
-{2972670,3885789,3885724,0.445272,-1},
-{2972671,3892663,3892803,0.07315,0.07315},
-{2972675,3860063,3860259,0.195711111111111,0.220175},
-{2972676,3860990,3861313,0.266376,0.277475},
-{2972677,3857125,3857003,0.3683,-1},
-{2972678,3853608,3853104,0.312365217391304,0.312365217391304},
-{2972679,3853855,3854267,0.215592857142857,0.194729032258065},
-{2973106,3876803,3878320,0.5195,0.77925},
-{2973107,3875862,3876693,0.6831,0.31878},
-{2973108,3876693,3876803,0.0505636363636364,0.065435294117647},
-{2973109,3876803,3877047,0.2548,-1},
-{2973110,3876970,3876693,0.314721951219512,-1},
-{2973111,3876970,3877047,0.0307241379310345,0.0405},
-{2973112,3877047,3877749,0.22678064516129,0.390566666666667},
-{2973113,3874807,3875436,0.301453846153846,0.252832258064516},
-{2973114,3875436,3876121,0.25784,0.297507692307692},
-{2973115,3877749,3878347,0.3642,0.213496551724138},
-{2973116,3878386,3878372,0.0235173913043478,-1},
-{2973117,3882613,3882636,0.08166,-1},
-{2973118,3886563,3886659,0.0566,0.0625578947368421},
-{2973119,3888729,3888545,-1,0.439753846153846},
-{2973120,3888730,3889043,-1,0.2088},
-{2973121,3888545,3888730,0.044148,0.0817555555555556},
-{2973122,3888730,3890267,0.740192307692308,0.506447368421053},
-{2973123,3889043,3889738,-1,0.127596610169492},
-{2973124,3889967,3891343,0.482046153846154,0.671421428571429},
-{2973125,3890704,3890774,0.0571548387096774,0.070872},
-{2973126,3889387,3890267,0.594793548387097,0.542311764705882},
-{2973127,3891579,3892152,-1,0.129932142857143},
-{2973128,3892482,3892497,0.0531545454545454,0.05847},
-{2973129,3894253,3895064,0.453631578947368,0.383066666666667},
-{2973130,3895064,3895137,0.087825,0.0401485714285714},
-{2973131,3887450,3887585,-1,0.0301542857142857},
-{2973132,3887041,3887179,-1,0.0542448979591837},
-{2973145,3856534,3855427,0.424785,0.414424390243902},
-{2973146,3856809,3856534,0.117866666666667,0.1326},
-{2973147,3853762,3854135,0.63725,0.566444444444444},
-{2973161,3853762,3853401,0.310664516129032,0.332089655172414},
-{2973165,3875936,3876023,-1,0.0307384615384615},
-{2973166,3876377,3877058,0.21084,0.204983333333333},
-{2973167,3877058,3877202,-1,0.0532235294117647},
-{2973168,3877058,3877011,0.203742857142857,-1},
-{2973169,3877071,3877011,0.0201,-1},
-{2973170,3877011,3876875,0.211569230769231,-1},
-{2973171,3877071,3876970,0.2007,-1},
-{2973172,3876121,3876875,0.448066666666667,0.298711111111111},
-{2973173,3876875,3876970,0.0399652173913043,0.0278545454545455},
-{2973174,3876377,3876121,0.386524137931034,0.533771428571429},
-{2973175,3877859,3877749,-1,0.550957894736842},
-{2973176,3880625,3880746,-1,0.0532971428571429},
-{2973177,3882238,3882385,0.0271913043478261,-1},
-{2973178,3885520,3885679,0.0241217391304348,-1},
-{2973179,3885551,3885804,-1,0.0405088235294118},
-{2973180,3882752,3882769,-1,0.061725},
-{2973181,3882712,3882766,0.0438230769230769,-1},
-{2973182,3881949,3882116,0.0973081967213115,0.0973081967213115},
-{2973183,3882541,3882613,0.1845625,-1},
-{2973184,3886761,3886563,0.22395,0.0995333333333333},
-{2973185,3886761,3886875,0.0427371428571429,0.0650347826086956},
-{2973186,3886875,3887774,0.251916279069767,0.27081},
-{2973187,3886659,3886944,0.14455,0.150834782608696},
-{2973188,3886944,3887041,0.0519625,0.0479653846153846},
-{2973189,3887179,3887312,-1,0.060096},
-{2973190,3887412,3887585,0.117636363636364,-1},
-{2973191,3887179,3887156,-1,0.0376928571428571},
-{2973192,3887059,3887002,-1,0.067875},
-{2973193,3885804,3887134,-1,0.228363636363636},
-{2973194,3887134,3887239,-1,0.0166246153846154},
-{2973195,3887156,3887147,-1,0.01275},
-{2973196,3887147,3887059,-1,0.0797294117647059},
-{2973197,3887312,3887059,-1,0.0385457142857143},
-{2973198,3887147,3887235,0.0530553191489362,-1},
-{2973199,3887002,3887235,0.164025,-1},
-{2973200,3888856,3889250,0.0731207547169811,-1},
-{2973201,3889250,3889352,0.0229018867924528,-1},
-{2973202,3896483,3896401,0.0389785714285714,-1},
-{2973203,3896192,3896271,0.0456133333333333,-1},
-{2973204,3896322,3896390,0.0305823529411765,-1},
-{2973205,3895080,3895892,-1,0.259848},
-{2973206,3896390,3897968,0.410094117647059,-1},
-{2973207,3895875,3895811,-1,0.09564},
-{2973208,3895974,3895986,-1,0.00512941176470588},
-{2973209,3895986,3896003,-1,0.01335},
-{2973210,3896003,3896019,-1,0.0308571428571429},
-{2973211,3896019,3895984,-1,0.22164},
-{2973212,3895876,3896019,-1,0.0635379310344828},
-{2973213,3895984,3896091,0.0700736842105263,-1},
-{2973214,3896091,3896105,0.00842857142857143,-1},
-{2973215,3896019,3896091,-1,0.0347357142857143},
-{2973216,3896091,3896148,-1,0.0240461538461538},
-{2973217,3895371,3895478,0.0740487804878049,-1},
-{2973218,3895478,3895709,0.1377,-1},
-{2973297,3859527,3859644,0.137775,0.157457142857143},
-{2973298,3860352,3859644,0.751615384615385,-1},
-{2973299,3860656,3860494,-1,-1},
-{2973354,3851305,3850986,0.290057142857143,0.243648},
-{2973355,3848906,3850839,1.06171111111111,1.06171111111111},
-{2974288,3874713,3874561,0.251089655172414,0.234890322580645},
-{2974339,3853454,3853797,-1,0.565015384615385},
-{2974351,3856270,3856541,0.27,0.27},
-{2974352,3857402,3857767,0.207688888888889,0.207688888888889},
-{2974353,3855547,3856270,-1,-1},
-{2974354,3856059,3856707,0.459738461538462,0.543327272727273},
-{2974355,3858390,3858703,0.162822222222222,0.162822222222222},
-{2974357,3854524,3855019,-1,-1},
-{2974489,3851949,3853322,-1,0.8346},
-{2974490,3851949,3851625,0.406928571428571,-1},
-{2974491,3852426,3851949,0.333627272727273,0.305825},
-{2974492,3854088,3854524,0.408218181818182,0.44904},
-{2974493,3854566,3855134,-1,-1},
-{2974494,3854892,3855066,-1,0.167285714285714},
-{2974495,3855066,3855125,0.0368903225806452,0.0408428571428571},
-{2974496,3855769,3856059,0.230086956521739,0.278526315789474},
-{2974497,3855301,3855769,0.316721739130435,-1},
-{2974498,3856377,3856899,0.392025,-1},
-{2974499,3858538,3857311,0.699276923076923,0.727248},
-{2974500,3859316,3857953,0.547412903225806,0.808085714285714},
-{2974501,3854467,3854095,0.247009090909091,0.201266666666667},
-{2974502,3855865,3857043,-1,0.525464516129032},
-{2974503,3855865,3855537,0.306,-1},
-{2974504,3856232,3855865,0.263494736842105,-1},
-{2974505,3855684,3855865,-1,0.16604},
-{2974506,3860459,3860322,-1,0.615965217391304},
-{2974507,3862152,3862506,0.3474,0.3474},
-{2974508,3862238,3862710,0.51728,0.51728},
-{2974509,3863132,3862238,0.6708,-1},
-{2974512,3867069,3865169,1.34837142857143,-1},
-{2974513,3867227,3865479,0.914968421052632,0.914968421052632},
-{2974514,3862899,3863132,-1,0.537388235294118},
-{2974516,3866457,3867344,0.56202,-1},
-{2974522,3868981,3867998,0.295863157894737,0.3513375},
-{2974523,3869488,3868981,0.229092857142857,0.246715384615385},
-{2974540,3879377,3879823,-1,0.289057142857143},
-{2974551,3879823,3880224,-1,0.286314285714286},
-{2974552,3881159,3880279,0.443952,-1},
-{2974555,3882167,3882624,0.3804,0.336507692307692},
-{2974568,3852082,3851485,0.163507692307692,0.172345945945946},
-{2974569,3852293,3852082,-1,-1},
-{2974570,3853172,3852082,0.321483333333333,0.340394117647059},
-{2974571,3853556,3852966,0.5647875,-1},
-{2974572,3853556,3853317,-1,0.170828571428571},
-{2974573,3853317,3852944,0.290869565217391,-1},
-{2974574,3853947,3853317,0.314657142857143,-1},
-{2974575,3852082,3851986,-1,-1},
-{2974576,3854353,3853947,0.21888,-1},
-{2974577,3854353,3854007,0.271577777777778,0.271577777777778},
-{2974578,3857082,3857529,0.257712,0.3068},
-{2974579,3856911,3857082,0.0940153846153846,0.111109090909091},
-{2974580,3856593,3856911,0.161834482758621,0.213327272727273},
-{2974581,3856593,3856271,0.195027272727273,0.195027272727273},
-{2974582,3856857,3856593,0.199857142857143,0.2798},
-{2974583,3856911,3857202,0.154,0.154},
-{2974584,3857727,3858161,0.32184,0.32184},
-{2974585,3857974,3858404,0.300913043478261,0.27684},
-{2974586,3857476,3856857,0.336876923076923,0.58392},
-{2974587,3857476,3857974,0.2763,0.2763},
-{2974588,3860082,3860698,-1,0.621757894736842},
-{2974589,3858659,3859234,-1,0.430433333333333},
-{2974590,3861273,3861926,0.456911111111111,0.474484615384615},
-{2974591,3862219,3862536,-1,-1},
-{2974592,3862060,3862219,0.126222222222222,0.148173913043478},
-{2974593,3860566,3861064,0.45729,0.5716125},
-{2974594,3860990,3860063,0.518355555555556,0.518355555555556},
-{2974595,3861639,3862385,0.49395,0.515426086956522},
-{2974596,3862703,3862219,0.23451724137931,0.2267},
-{2974597,3862385,3862703,0.283733333333333,0.283733333333333},
-{2974598,3858933,3858497,0.240844444444444,0.240844444444444},
-{2974599,3863836,3862713,-1,0.607464},
-{2974600,3865191,3863851,-1,-1},
-{2974601,3863237,3862703,0.264411428571429,0.2892},
-{2974602,3864481,3863237,1.23873333333333,1.23873333333333},
-{2974603,3866365,3865892,0.371575,-1},
-{2974604,3865268,3865892,0.261244444444444,0.261244444444444},
-{2974605,3868778,3868346,0.134818181818182,0.261705882352941},
-{2974606,3868949,3868778,0.0582387096774194,0.078495652173913},
-{2974607,3867537,3867018,0.225432,0.296621052631579},
-{2974608,3867243,3867537,-1,0.610157142857143},
-{2974609,3868346,3867537,0.225324324324324,0.347375},
-{2974610,3867939,3868346,0.533566666666667,-1},
-{2974611,3868883,3868981,0.350685714285714,0.283246153846154},
-{2974612,3868778,3868883,0.25655,0.30786},
-{2974613,3869823,3869488,1.01558823529412,0.784772727272727},
-{2974614,3869457,3869823,0.233861538461538,0.217157142857143},
-{2974615,3869323,3869939,0.229511111111111,0.229511111111111},
-{2974616,3870342,3870448,0.194888888888889,0.194888888888889},
-{2974617,3868265,3868695,0.32385,-1},
-{2974618,3867531,3867839,0.203084210526316,0.175390909090909},
-{2974619,3868967,3868265,-1,0.500433333333333},
-{2974620,3868967,3869332,-1,0.236088},
-{2974621,3868174,3867903,0.53652,0.53652},
-{2974622,3867903,3867839,0.0388909090909091,-1},
-{2974623,3868585,3867903,0.366260869565217,-1},
-{2974624,3871420,3870832,0.336,0.248347826086957},
-{2974625,3871867,3871420,0.13506,0.192942857142857},
-{2974626,3871867,3871697,0.387666666666667,0.4652},
-{2974627,3871687,3872273,1.0448,-1},
-{2974628,3871985,3871421,0.442636363636364,0.442636363636364},
-{2974629,3872053,3872166,0.0543142857142857,-1},
-{2974630,3871697,3872078,0.183733333333333,-1},
-{2974631,3878285,3877742,0.3528,-1},
-{2974632,3877972,3877428,-1,0.38204},
-{2974633,3876990,3877492,-1,-1},
-{2974634,3877665,3877137,-1,0.28728},
-{2974635,3878931,3878445,-1,0.4308},
-{2974636,3879476,3878960,0.3749625,-1},
-{2974637,3877249,3876741,0.3262,-1},
-{2974638,3877649,3877249,-1,0.207947368421053},
-{2974639,3878067,3877649,-1,0.245431578947368},
-{2974640,3877864,3877564,0.20475,-1},
-{2974641,3878167,3877864,0.167715789473684,-1},
-{2974642,3883888,3883123,0.507525,0.641084210526316},
-{2974643,3881459,3881905,0.340844444444444,0.340844444444444},
-{2974644,3883331,3883182,0.0962444444444445,0.0962444444444445},
-{2974645,3877610,3877864,-1,-1},
-{2974646,3878794,3879030,0.472028571428571,-1},
-{2974656,3851390,3849629,0.665735294117647,0.7545},
-{2974657,3851986,3851753,-1,-1},
-{2974658,3853003,3851986,0.363103448275862,0.2925},
-{2974659,3851753,3851390,0.143733333333333,0.149261538461538},
-{2974660,3852696,3851753,0.293245714285714,0.366557142857143},
-{2974661,3851092,3851935,0.544942857142857,0.602305263157895},
-{2974662,3853171,3852711,-1,-1},
-{2974663,3853476,3853003,0.50068,0.50068},
-{2974665,3854483,3854578,0.14847,0.114207692307692},
-{2974666,3854483,3854680,0.617475,0.617475},
-{2974667,3854322,3854483,0.136130769230769,0.11798},
-{2974668,3854097,3854322,0.499745454545455,0.499745454545455},
-{2974669,3854680,3854322,0.205707692307692,0.205707692307692},
-{2974670,3855025,3854680,0.154741935483871,0.208565217391304},
-{2974671,3854680,3854190,0.308,0.308},
-{2974672,3854316,3853721,0.290955555555556,0.290955555555556},
-{2974673,3856553,3856041,0.474771428571429,0.398808},
-{2974674,3858675,3858773,-1,0.136090909090909},
-{2974675,3859781,3860470,0.67856,0.67856},
-{2974676,3861704,3860888,1.68915,1.50146666666667},
-{2974677,3860470,3860587,0.3329,0.3329},
-{2974678,3858317,3857476,0.5788,-1},
-{2974679,3862722,3861992,0.513286956521739,0.621347368421053},
-{2974680,3859774,3859913,0.1346,0.1346},
-{2974681,3861790,3861459,0.278463157894737,0.278463157894737},
-{2974682,3859735,3859276,0.260973913043478,0.272836363636364},
-{2974683,3860081,3859735,0.186,0.193153846153846},
-{2974684,3865670,3865959,-1,0.2959875},
-{2974685,3865725,3865670,0.0208714285714286,0.023376},
-{2974686,3864663,3864126,-1,0.338314285714286},
-{2974687,3864616,3864887,0.264388235294118,-1},
-{2974688,3865364,3864887,-1,-1},
-{2974689,3864887,3864576,0.3366,-1},
-{2974690,3865626,3865872,0.20889,-1},
-{2974691,3866168,3866359,-1,-1},
-{2974692,3865974,3866168,0.112777777777778,0.112777777777778},
-{2974693,3866168,3866323,0.0642888888888889,0.0642888888888889},
-{2974694,3867065,3867228,0.2254,-1},
-{2974695,3866916,3867065,0.194542857142857,0.226966666666667},
-{2974696,3867228,3867563,0.450654545454545,-1},
-{2974697,3867772,3867065,0.524014285714286,-1},
-{2974698,3868053,3868552,0.374086956521739,0.374086956521739},
-{2974699,3867772,3867846,-1,0.234066666666667},
-{2974700,3867929,3867861,0.1955,-1},
-{2974701,3867993,3867929,0.195114285714286,-1},
-{2974702,3867584,3867494,0.101822222222222,0.101822222222222},
-{2974703,3867929,3868544,0.216844444444444,0.216844444444444},
-{2974704,3869625,3869451,-1,0.690847058823529},
-{2974705,3870701,3870108,-1,0.26967},
-{2974706,3870691,3870061,0.2412,0.275657142857143},
-{2974707,3869412,3869625,-1,0.261545454545455},
-{2974708,3869412,3868791,-1,-1},
-{2974709,3872184,3872078,0.302256,-1},
-{2974710,3872184,3871867,0.111792,-1},
-{2974711,3872184,3872466,-1,0.1026},
-{2974712,3871315,3871318,0.2861625,0.327042857142857},
-{2974713,3870451,3871315,0.351026086956522,0.351026086956522},
-{2974714,3871861,3871315,0.183377777777778,0.183377777777778},
-{2974715,3872459,3872010,-1,0.181252173913043},
-{2974716,3871350,3870701,-1,0.291485714285714},
-{2974717,3872052,3871350,-1,0.37965},
-{2974718,3872455,3872045,-1,0.2475},
-{2974719,3871356,3870698,0.30639,0.30639},
-{2974720,3870630,3870691,-1,0.42861},
-{2974721,3871356,3871350,0.299571428571429,0.273521739130435},
-{2974722,3872064,3871356,-1,0.320684210526316},
-{2974723,3872453,3872064,0.235275,0.209133333333333},
-{2974724,3872044,3872458,-1,0.2452125},
-{2974725,3867881,3867993,0.352371428571429,-1},
-{2974726,3868976,3869127,0.227684210526316,-1},
-{2974727,3871344,3871356,0.172125,0.12909375},
-{2974728,3871338,3871344,0.192623076923077,0.208675},
-{2974729,3871344,3872022,0.29445,0.25604347826087},
-{2974739,3852779,3853023,0.1983,0.180272727272727},
-{2974740,3853023,3852450,-1,0.47688},
-{2974741,3853590,3852712,-1,0.543177777777778},
-{2974742,3852450,3853384,0.5235,0.58632},
-{2974743,3853023,3854053,0.8286,0.8286},
-{2974744,3855526,3855641,0.1406,0.1406},
-{2974745,3856268,3856041,0.0886666666666667,0.0886666666666667},
-{2974746,3857332,3857523,0.371057142857143,0.371057142857143},
-{2974747,3853793,3853590,-1,0.234257142857143},
-{2974748,3855206,3853793,1.1447,1.1447},
-{2974749,3855206,3855520,0.60996,0.4692},
-{2974750,3854740,3855206,1.077525,0.615728571428571},
-{2974751,3857566,3855520,0.959784,1.04324347826087},
-{2974752,3858544,3857566,0.395688888888889,0.323745454545455},
-{2974753,3857090,3857566,0.306321428571429,-1},
-{2974754,3857090,3855206,0.854066666666667,0.922392},
-{2974755,3855520,3855153,0.160355555555556,0.160355555555556},
-{2974756,3857091,3857332,0.167266666666667,0.167266666666667},
-{2974757,3853376,3853590,-1,-1},
-{2974758,3858862,3858544,0.193933333333333,0.218175},
-{2974759,3862732,3861553,0.608329411764706,0.827328},
-{2974760,3859249,3860319,0.619468965517241,0.641592857142857},
-{2974761,3861341,3860993,-1,-1},
-{2974762,3858862,3858795,0.409022222222222,0.48015652173913},
-{2974763,3858141,3858795,0.317139130434783,0.36471},
-{2974764,3858795,3859034,0.249314285714286,0.193911111111111},
-{2974765,3859034,3859592,0.2554,0.2554},
-{2974766,3857939,3858948,0.414288888888889,0.414288888888889},
-{2974767,3864346,3863294,0.730266666666667,0.730266666666667},
-{2974768,3862765,3861790,0.537925,0.561313043478261},
-{2974769,3863915,3862765,0.5754,-1},
-{2974770,3862765,3862517,0.241090909090909,-1},
-{2974771,3865109,3864258,-1,0.8295},
-{2974772,3862323,3862149,-1,0.1392375},
-{2974773,3866913,3865845,0.45825,-1},
-{2974774,3867433,3866913,0.2616,-1},
-{2974775,3868086,3868145,-1,-1},
-{2974776,3868645,3867433,0.469476923076923,-1},
-{2974777,3868781,3867452,0.53825,0.561652173913044},
-{2974778,3868229,3867740,0.580615384615385,-1},
-{2974779,3866368,3865890,-1,0.26218064516129},
-{2974780,3868976,3868790,0.0695111111111111,0.0695111111111111},
-{2974781,3866998,3867248,-1,-1},
-{2974782,3867248,3867513,-1,-1},
-{2974783,3867513,3867208,-1,-1},
-{2974784,3867592,3867248,-1,-1},
-{2974785,3867917,3867513,-1,-1},
-{2974786,3867882,3867513,-1,-1},
-{2974787,3868237,3868248,-1,-1},
-{2974788,3868248,3867917,-1,-1},
-{2974789,3868248,3868186,-1,-1},
-{2974790,3868210,3867882,-1,-1},
-{2974791,3867592,3867389,-1,-1},
-{2974792,3868984,3868210,-1,-1},
-{2974793,3866933,3866368,-1,0.317731034482759},
-{2974794,3870421,3870613,-1,0.328736842105263},
-{2974795,3869258,3868781,0.188616,0.196475},
-{2974796,3869813,3869258,0.216575,0.207912},
-{2974797,3870519,3869813,0.453461538461538,0.436666666666667},
-{2974798,3870815,3870519,0.363408,0.349430769230769},
-{2974799,3868312,3868922,-1,-1},
-{2974800,3868922,3869144,-1,-1},
-{2974801,3869263,3868689,-1,-1},
-{2974802,3869938,3869110,0.382866666666667,0.382866666666667},
-{2974803,3869263,3869426,-1,-1},
-{2974804,3868581,3867882,-1,-1},
-{2974805,3868984,3868581,-1,-1},
-{2974806,3868289,3867592,-1,-1},
-{2974807,3868700,3868581,-1,-1},
-{2974808,3870815,3871099,0.30189375,0.3578},
-{2974809,3871347,3871322,0.314258823529412,-1},
-{2974810,3871347,3871386,-1,0.4584375},
-{2974811,3872489,3871929,-1,0.3208125},
-{2974812,3869109,3868984,-1,-1},
-{2974813,3869263,3869109,-1,-1},
-{2974834,3852369,3853384,1.8913875,1.8913875},
-{2974835,3851702,3852369,0.373711111111111,-1},
-{2974836,3852569,3852369,0.119689655172414,0.119689655172414},
-{2974837,3852898,3852569,0.176464285714286,0.176464285714286},
-{2974838,3852569,3851909,-1,-1},
-{2974840,3850940,3850749,0.2248,0.2248},
-{2974842,3850358,3849439,0.281151219512195,-1},
-{2974843,3851171,3850358,0.40746,0.40746},
-{2974845,3854053,3855222,0.934718181818182,-1},
-{2974846,3855249,3855222,0.3636,0.390533333333333},
-{2974847,3854238,3854155,0.230688,0.3204},
-{2974848,3855222,3855304,0.2346,0.1938},
-{2974849,3855304,3855686,0.411625,0.411625},
-{2974850,3855367,3855807,0.470806451612903,0.503275862068965},
-{2974851,3857836,3857491,0.162666666666667,0.162666666666667},
-{2974852,3857003,3856818,0.22365,0.22365},
-{2974853,3856818,3856426,0.176844444444444,0.217036363636364},
-{2974854,3854233,3854420,0.0840888888888889,0.0840888888888889},
-{2974855,3854420,3854612,0.117777777777778,0.117777777777778},
-{2974856,3854825,3854916,-1,-1},
-{2974857,3854825,3854420,0.201511111111111,0.201511111111111},
-{2974858,3855369,3854825,0.241822222222222,0.241822222222222},
-{2974859,3855369,3855487,-1,-1},
-{2974860,3854825,3854937,-1,-1},
-{2974861,3854937,3854612,0.153022222222222,0.153022222222222},
-{2974862,3854937,3855369,0.265533333333333,0.265533333333333},
-{2974863,3854937,3855023,-1,-1},
-{2974864,3855690,3855626,0.0481333333333333,0.0481333333333333},
-{2974865,3856426,3855690,0.288422222222222,0.288422222222222},
-{2974866,3856389,3855427,-1,0.347477419354839},
-{2974867,3856823,3856389,-1,0.151158620689655},
-{2974868,3859002,3857604,0.61485,0.662146153846154},
-{2974869,3858679,3859034,-1,0.279988235294118},
-{2974870,3859034,3860265,0.606138461538462,0.606138461538462},
-{2974871,3860265,3861168,0.473025,0.454104},
-{2974872,3860458,3861168,0.335555555555556,0.335555555555556},
-{2974873,3860890,3861168,0.435688888888889,0.435688888888889},
-{2974874,3861244,3861168,0.165385714285714,0.185232},
-{2974875,3861315,3860737,0.266355555555556,0.266355555555556},
-{2974876,3861821,3861680,0.160938461538462,0.181930434782609},
-{2974877,3862190,3862002,0.18675,0.18675},
-{2974878,3862149,3862190,-1,0.405844444444444},
-{2974879,3861568,3861191,0.355608,-1},
-{2974880,3863055,3862428,0.41256,-1},
-{2974881,3862785,3862731,0.291020689655172,-1},
-{2974882,3859824,3859086,0.590928,0.703485714285714},
-{2974883,3861191,3860714,0.449575,-1},
-{2974884,3861612,3861209,-1,0.437064},
-{2974885,3863137,3862952,-1,0.263717647058824},
-{2974886,3865031,3864383,-1,0.4366125},
-{2974887,3865026,3864145,0.438490909090909,-1},
-{2974888,3867657,3866933,-1,0.4048},
-{2974889,3869423,3868700,-1,-1},
-{2974890,3868674,3868289,-1,-1},
-{2974891,3868674,3868443,-1,-1},
-{2974892,3869423,3869695,-1,-1},
-{2974893,3869701,3869695,-1,-1},
-{2974894,3869586,3869423,-1,-1},
-{2974895,3869186,3868674,-1,-1},
-{2974896,3869435,3869186,-1,-1},
-{2974897,3869844,3869701,-1,-1},
-{2974898,3869951,3869844,-1,-1},
-{2974899,3870141,3869951,-1,-1},
-{2974900,3869653,3869435,-1,-1},
-{2974901,3869918,3869653,-1,-1},
-{2974902,3870205,3869918,-1,-1},
-{2974903,3869844,3869435,-1,-1},
-{2974904,3869951,3869653,-1,-1},
-{2974905,3869918,3870141,-1,-1},
-{2974906,3871015,3870721,0.39558,-1},
-{2974907,3868995,3868060,0.56721,-1},
-{2974908,3869221,3868995,0.218682352941176,-1},
-{2974909,3868995,3868760,0.1968,0.1968},
-{2974910,3869461,3868995,-1,0.314305263157895},
-{2974911,3871561,3871209,0.235888888888889,0.235888888888889},
-{2974912,3871313,3871414,0.149111111111111,0.149111111111111},
-{2974913,3871570,3871784,-1,0.41364},
-{2974914,3872118,3871570,0.25038,0.294564705882353},
-{2974915,3872428,3872118,0.15429,0.220414285714286},
-{2974916,3871504,3871570,-1,0.203633333333333},
-{2974917,3871463,3871504,0.134953846153846,0.08772},
-{2974918,3871829,3871504,-1,0.2358},
-{2974919,3872231,3872118,0.3414375,-1},
-{2974920,3872231,3871829,-1,0.213366666666667},
-{2974921,3872906,3872579,-1,-1},
-{2974922,3872447,3872231,0.315388235294118,-1},
-{2974923,3872771,3872447,0.168529411764706,0.168529411764706},
-{2974924,3871561,3871990,-1,-1},
-{2974925,3871660,3871561,-1,-1},
-{2974926,3873215,3873446,-1,0.24372},
-{2974927,3873215,3873486,0.433244444444444,0.433244444444444},
-{2974928,3874329,3874482,0.120525,-1},
-{2974929,3874482,3874694,0.199227272727273,-1},
-{2974930,3874694,3874485,0.12003,0.12003},
-{2974931,3874948,3874833,0.11044,0.11044},
-{2974932,3874974,3875207,0.25305,-1},
-{2974933,3871039,3871568,0.244823076923077,-1},
-{2974934,3871568,3871461,-1,-1},
-{2974935,3871822,3872683,0.40212,0.40212},
-{2974936,3872683,3873819,0.511444444444444,-1},
-{2974937,3868578,3870250,-1,0.96351},
-{2974938,3868761,3869260,-1,0.348808695652174},
-{2974939,3869260,3869800,0.281904,0.281904},
-{2974940,3869800,3870307,0.330314285714286,0.239193103448276},
-{2974941,3870896,3870307,0.23195,-1},
-{2974942,3870307,3869447,0.393031578947368,-1},
-{2974943,3867673,3867552,0.0605357142857143,-1},
-{2974944,3867552,3866777,0.33024,-1},
-{2974945,3867454,3867464,-1,0.204033333333333},
-{2974946,3867464,3868321,0.468766666666667,0.468766666666667},
-{2974947,3869260,3868418,0.643421052631579,0.643421052631579},
-{2974948,3867464,3867814,-1,0.26031},
-{2974949,3868418,3867814,0.3408,0.30672},
-{2974950,3870307,3870579,0.181539130434783,0.189790909090909},
-{2974951,3870579,3871130,0.365976,0.365976},
-{2974952,3870579,3869976,0.513514285714286,0.422894117647059},
-{2974953,3869976,3869483,0.3065,0.324529411764706},
-{2974954,3866421,3865040,0.693694736842105,-1},
-{2974955,3866421,3866464,0.417514285714286,0.40311724137931},
-{2974956,3866915,3866464,0.156466666666667,0.156466666666667},
-{2974957,3866464,3866474,0.2774,0.24966},
-{2974958,3867117,3866474,0.340010526315789,0.340010526315789},
-{2974959,3864937,3863845,0.527921739130435,-1},
-{2974960,3864959,3864279,0.336545454545455,-1},
-{2974961,3863530,3862752,0.7356,0.630514285714286},
-{2974962,3864279,3864404,0.446008695652174,-1},
-{2974963,3863379,3863050,0.2294,0.2294},
-{2974964,3862088,3861638,0.447825,0.421482352941176},
-{2974965,3862553,3862088,-1,0.417233333333333},
-{2974966,3862395,3862088,0.324917647058824,-1},
-{2974967,3862553,3862395,0.114133333333333,-1},
-{2974968,3862941,3862553,0.316,0.334588235294118},
-{2974969,3864216,3863281,-1,0.7010625},
-{2974970,3864200,3864216,-1,0.252857142857143},
-{2974971,3861909,3861655,0.239813793103448,0.278184},
-{2974972,3864499,3864206,-1,-1},
-{2974973,3864505,3864499,-1,-1},
-{2974974,3864769,3864505,0.30324,0.30324},
-{2974975,3864499,3864769,-1,-1},
-{2974976,3858587,3858073,-1,-1},
-{2974977,3859086,3858587,0.250714285714286,0.219375},
-{2974978,3860412,3859647,0.424,0.565333333333333},
-{2974979,3861036,3860412,0.326765217391304,0.326765217391304},
-{2974980,3859383,3859086,0.126488888888889,0.148486956521739},
-{2974981,3859953,3859383,0.284225,0.272856},
-{2974982,3859383,3858742,0.612518181818182,0.44918},
-{2974983,3857751,3856687,-1,0.388821428571429},
-{2974984,3859085,3858959,0.170481818181818,0.2344125},
-{2974985,3858959,3858708,0.315933333333333,0.355425},
-{2974986,3860027,3858959,0.62895,0.62895},
-{2974987,3861655,3860786,0.62454,0.462622222222222},
-{2974988,3857806,3856818,-1,0.41676},
-{2974989,3857806,3856823,-1,0.49945},
-{2974990,3854691,3855274,-1,0.386833333333333},
-{2974991,3855198,3855460,0.281866666666667,0.281866666666667},
-{2974992,3855303,3855198,0.314288888888889,0.314288888888889},
-{2974993,3856063,3855303,0.41025,0.41025},
-{2974994,3855743,3856515,0.32395,0.32395},
-{2974995,3853178,3852842,-1,-1},
-{2974996,3855084,3855345,0.450066666666667,0.450066666666667},
-{2974997,3854895,3855186,0.42918,0.3732},
-{2974998,3851746,3851649,0.108733333333333,0.108733333333333},
-{2974999,3850218,3850755,-1,-1},
-{2975000,3850755,3851565,-1,-1},
-{2975001,3851565,3851634,0.135128571428571,0.140133333333333},
-{2975002,3849752,3850249,0.422112,0.458817391304348},
-{2975003,3850249,3851175,0.635866666666667,0.635866666666667},
-{2975006,3850249,3849696,0.4236,0.4236},
-{2975007,3849109,3849696,0.438333333333333,0.438333333333333},
-{2975021,3851361,3850502,0.426288888888889,0.426288888888889},
-{2975022,3852691,3852472,0.320377777777778,0.320377777777778},
-{2975023,3852855,3852691,0.0705111111111111,0.0705111111111111},
-{2975024,3852632,3852184,0.131897142857143,0.139890909090909},
-{2975026,3850839,3850487,0.176733333333333,0.176733333333333},
-{2975027,3855708,3854895,0.335828571428571,0.284945454545455},
-{2975028,3856013,3855708,0.155688888888889,0.17515},
-{2975029,3856613,3856761,0.289107692307692,0.341672727272727},
-{2975030,3857162,3856613,0.302129032258065,0.346888888888889},
-{2975031,3857120,3857372,1.62432857142857,1.62432857142857},
-{2975032,3854486,3854610,0.346263157894737,0.4111875},
-{2975033,3856013,3854622,0.695422222222222,0.670585714285714},
-{2975034,3857372,3857141,0.143223529411765,0.115942857142857},
-{2975035,3858278,3858470,0.176625,0.148736842105263},
-{2975036,3858708,3857948,1.43796,0.653618181818182},
-{2975037,3860494,3859767,-1,-1},
-{2975038,3859226,3858578,-1,1.2522},
-{2975039,3860530,3859644,-1,0.840366666666667},
-{2975040,3860352,3860117,0.383060869565217,0.383060869565217},
-{2975041,3860117,3859761,0.303313043478261,0.3171},
-{2975042,3860549,3860117,0.240081818181818,0.22964347826087},
-{2975043,3860530,3861551,0.7133,-1},
-{2975044,3862878,3861412,0.745707692307692,0.80785},
-{2975045,3862217,3861115,0.793061538461538,0.589131428571429},
-{2975046,3862721,3862419,0.201208695652174,0.201208695652174},
-{2975047,3863200,3862721,0.41268,0.41268},
-{2975048,3861961,3860900,0.745567741935484,0.924504},
-{2975049,3861604,3861278,0.442171428571428,0.442171428571428},
-{2975050,3862419,3862070,0.373831578947368,0.373831578947368},
-{2975051,3862073,3861961,0.154852173913043,-1},
-{2975052,3863012,3862702,-1,-1},
-{2975053,3863200,3863012,-1,-1},
-{2975054,3858578,3859105,0.396766666666667,0.35709},
-{2975055,3859105,3859555,0.376228571428572,0.303876923076923},
-{2975056,3859761,3859105,0.503034782608696,0.503034782608696},
-{2975057,3859105,3858588,0.65901,0.65901},
-{2975058,3863559,3863989,0.704504347826087,0.648144},
-{2975059,3863989,3863200,-1,0.390111111111111},
-{2975060,3863989,3864245,0.175153846153846,0.162642857142857},
-{2975061,3864350,3863989,-1,-1},
-{2975062,3866179,3865790,0.292909090909091,0.280173913043478},
-{2975063,3866474,3866179,0.199915384615385,0.167670967741935},
-{2975064,3867501,3866179,-1,0.979753846153846},
-{2975065,3867730,3865790,0.6988,1.10985882352941},
-{2975066,3868650,3868907,-1,0.602742857142857},
-{2975067,3866373,3866859,0.568957894736842,0.491372727272727},
-{2975068,3866859,3867658,0.281731034482759,0.281731034482759},
-{2975069,3867406,3867658,0.461526315789474,0.461526315789474},
-{2975070,3867658,3868384,-1,0.312208695652174},
-{2975071,3871406,3871260,-1,-1},
-{2975072,3871406,3872205,0.320318181818182,0.370894736842105},
-{2975073,3872199,3871626,0.3853875,0.440442857142857},
-{2975074,3869920,3870404,-1,-1},
-{2975075,3869724,3869783,0.1394,0.1394},
-{2975076,3870566,3871210,-1,0.517472727272727},
-{2975077,3872546,3871812,0.290060869565217,0.266856},
-{2975078,3873119,3872912,0.347855172413793,0.403512},
-{2975079,3873283,3872546,0.289569230769231,0.268885714285714},
-{2975080,3873178,3873119,0.0493071428571429,0.0531},
-{2975081,3873544,3873178,0.1524,0.1778},
-{2975082,3872568,3871775,-1,0.452672727272727},
-{2975083,3874457,3873283,0.487355555555556,0.487355555555556},
-{2975084,3874352,3873544,0.3552,0.3552},
-{2975085,3866373,3866449,0.637324137931035,0.61608},
-{2975086,3868688,3868404,0.267864,0.478328571428571},
-{2975087,3849627,3849376,0.287557894736842,0.287557894736842},
-{2975088,3849715,3849627,0.0646857142857143,0.0646857142857143},
-{2975089,3850282,3849627,0.402177777777778,0.402177777777778},
-{2975090,3850394,3850282,0.0891818181818182,0.115411764705882},
-{2975091,3850032,3849715,0.29379,0.29379},
-{2975092,3850282,3849985,0.220155555555556,0.220155555555556},
-{2975093,3852301,3851770,0.256755555555556,0.256755555555556},
-{2975094,3852011,3852301,-1,-1},
-{2975095,3852301,3852629,0.225366666666667,0.225366666666667},
-{2975096,3851453,3850212,0.578177777777778,0.578177777777778},
-{2975097,3852407,3853170,0.439622222222222,0.439622222222222},
-{2975098,3852359,3852156,0.0761777777777778,0.0761777777777778},
-{2975099,3852359,3852728,0.311822222222222,-1},
-{2975100,3854134,3852359,0.757933333333333,0.757933333333333},
-{2975101,3856906,3855255,0.7152,0.7152},
-{2975102,3857349,3856906,0.2271,0.252333333333333},
-{2975103,3858578,3858202,-1,0.641446153846154},
-{2975104,3858202,3858093,-1,0.562875},
-{2975105,3854371,3853150,0.764072727272727,0.509381818181818},
-{2975106,3856906,3855814,-1,0.71328},
-{2975107,3858122,3857349,0.38615,0.38615},
-{2975108,3858549,3858122,0.295010526315789,0.295010526315789},
-{2975109,3859555,3860120,0.33005,0.3444},
-{2975110,3860267,3860973,0.5828,0.5828},
-{2975111,3859151,3859674,0.334757142857143,0.446342857142857},
-{2975112,3861494,3861437,0.393184615384615,0.538042105263158},
-{2975113,3861215,3861723,0.278,0.278},
-{2975114,3850032,3849809,0.15759,0.15759},
-{2975115,3849809,3850198,0.2622,0.2622},
-{2975116,3850198,3850270,0.0618521739130435,0.056904},
-{2975117,3850599,3850270,0.274090909090909,0.287142857142857},
-{2975118,3850561,3850032,0.332921739130435,0.332921739130435},
-{2975119,3850645,3850394,0.320809090909091,0.35289},
-{2975120,3850645,3850561,0.0789333333333333,0.07104},
-{2975121,3851274,3850645,0.43761,0.43761},
-{2975122,3850394,3850951,0.264711111111111,0.264711111111111},
-{2975123,3851274,3850951,0.251114285714286,0.277547368421053},
-{2975124,3851741,3851274,0.484476923076923,0.484476923076923},
-{2975438,3884286,3883627,0.630466666666667,-1},
-{2975439,3886372,3885663,-1,0.528381818181818},
-{2975440,3886896,3886372,0.475,-1},
-{2975441,3887221,3886896,0.2822,-1},
-{2975442,3887339,3887278,0.0647625,0.0314},
-{2975443,3886270,3886896,0.452452173913043,-1},
-{2975444,3885264,3885952,0.351422222222222,0.412539130434783},
-{2975445,3889561,3890065,-1,-1},
-{2975446,3875393,3875476,0.0324,0.0324},
-{2975447,3877956,3878102,0.24888,-1},
-{2975448,3877854,3877956,0.211114285714286,-1},
-{2975449,3880703,3880471,0.233933333333333,-1},
-{2975450,3880703,3880965,-1,0.191563636363636},
-{2975451,3880492,3880703,-1,0.261214285714286},
-{2975452,3883451,3882763,-1,0.515971428571429},
-{2975453,3884003,3883451,-1,0.459757894736842},
-{2975454,3883730,3884003,-1,0.236576470588235},
-{2975455,3884707,3884286,0.396663157894737,-1},
-{2975456,3885141,3884707,0.35496,-1},
-{2975457,3884707,3885264,-1,0.359372727272727},
-{2975458,3884306,3884707,-1,0.331768421052632},
-{2975459,3884003,3884306,-1,0.2511},
-{2975460,3884389,3884003,-1,0.320305263157895},
-{2975461,3885630,3886270,-1,-1},
-{2975462,3886977,3886701,-1,0.256989473684211},
-{2975463,3886376,3886977,-1,0.418982608695652},
-{2975464,3887217,3886977,-1,0.20583},
-{2975465,3888066,3887691,0.264914285714286,-1},
-{2975466,3885377,3885695,-1,0.291882352941177},
-{2975467,3884557,3885031,0.305863636363636,-1},
-{2975468,3886085,3885755,-1,-1},
-{2975469,3891335,3892550,-1,-1},
-{2975470,3892550,3892708,-1,-1},
-{2975471,3892510,3891335,-1,-1},
-{2975472,3893406,3892855,-1,-1},
-{2975473,3890844,3890883,0.0501454545454545,0.0501454545454545},
-{2975474,3890883,3891006,0.270545454545455,0.270545454545455},
-{2975475,3893278,3893249,0.06656,0.0768},
-{2975476,3893173,3893605,0.6421,0.6421},
-{2975477,3893782,3894341,0.45549,-1},
-{2975478,3889416,3889797,0.228190909090909,-1},
-{2975479,3875315,3875535,0.124936363636364,0.119504347826087},
-{2975480,3875535,3876163,0.3654,0.315572727272727},
-{2975481,3877045,3876821,0.14058,-1},
-{2975482,3877332,3877045,0.148028571428571,-1},
-{2975483,3877491,3877332,-1,-1},
-{2975484,3877545,3877491,-1,-1},
-{2975485,3877165,3877672,-1,-1},
-{2975486,3877672,3878154,-1,-1},
-{2975487,3881773,3882079,0.4511,-1},
-{2975488,3881803,3882112,0.322482352941176,0.322482352941176},
-{2975489,3884852,3885377,-1,0.36591},
-{2975490,3885433,3885761,-1,0.258157894736842},
-{2975491,3884891,3885433,-1,0.317660869565217},
-{2975492,3885957,3886348,-1,0.234133333333333},
-{2975493,3888621,3889416,0.47343,-1},
-{2975494,3888065,3888621,0.287921739130435,-1},
-{2975495,3889307,3890011,0.352444444444444,-1},
-{2975496,3888733,3889307,0.273648,-1},
-{2975497,3887142,3887617,0.2916,-1},
-{2975498,3886806,3887142,0.2532,-1},
-{2975499,3890362,3891359,0.742863157894737,-1},
-{2975500,3890011,3890362,0.227918181818182,-1},
-{2975501,3891851,3891563,-1,0.281191304347826},
-{2975502,3892124,3892857,0.463707692307692,0.6698},
-{2975503,3891873,3892150,-1,0.4584},
-{2975504,3892150,3892439,0.3892875,-1},
-{2975505,3892118,3891851,-1,0.327221052631579},
-{2975506,3891851,3892150,-1,0.187488},
-{2975507,3891450,3891851,-1,0.242208},
-{2975508,3891093,3891450,-1,0.222681818181818},
-{2975509,3890416,3891093,-1,0.389688},
-{2975510,3893657,3893907,0.250581818181818,0.196885714285714},
-{2975511,3893400,3893657,0.226275,0.164563636363636},
-{2975512,3892857,3893400,0.45795652173913,0.405115384615385},
-{2975513,3893815,3893546,0.953785714285714,0.8345625},
-{2975514,3893907,3893318,-1,0.439246153846154},
-{2975515,3894567,3893907,-1,0.406489655172414},
-{2975516,3894286,3893657,0.420921428571429,0.7366125},
-{2975517,3894011,3893400,0.514095652173913,0.492675},
-{2975518,3893815,3894317,0.24495,0.236503448275862},
-{2975519,3895085,3893800,0.827657142857143,-1},
-{2975520,3895163,3894863,0.1968,0.1968},
-{2975521,3889889,3889572,-1,0.32667},
-{2975522,3889889,3890416,0.403421052631579,-1},
-{2975523,3890181,3889889,-1,-1},
-{2975524,3876834,3876961,-1,-1},
-{2975525,3876961,3876716,-1,-1},
-{2975526,3876716,3876311,-1,-1},
-{2975527,3876311,3876011,0.128777777777778,0.128777777777778},
-{2975528,3879728,3879534,0.2200875,-1},
-{2975529,3879924,3879583,0.433892307692308,-1},
-{2975530,3880197,3879924,0.1684,0.1684},
-{2975531,3878226,3878270,0.156022222222222,0.156022222222222},
-{2975532,3885412,3884938,-1,0.34947},
-{2975533,3886201,3886676,-1,0.311060869565217},
-{2975534,3887332,3888033,0.35421,-1},
-{2975535,3886077,3886904,0.458895652173913,-1},
-{2975536,3887157,3887833,0.281544,0.391033333333333},
-{2975537,3890395,3890400,0.217333333333333,0.217333333333333},
-{2975538,3891410,3891408,0.278488888888889,0.278488888888889},
-{2975539,3876992,3876730,-1,-1},
-{2975540,3877478,3877845,-1,-1},
-{2975541,3879146,3878484,-1,-1},
-{2975542,3879416,3879146,-1,-1},
-{2975543,3878771,3879146,-1,-1},
-{2975544,3879521,3879756,-1,-1},
-{2975545,3879521,3879592,-1,-1},
-{2975546,3879506,3879521,-1,-1},
-{2975547,3879592,3880015,-1,-1},
-{2975548,3880015,3879756,-1,-1},
-{2975549,3879578,3879416,-1,-1},
-{2975550,3879693,3879578,-1,-1},
-{2975551,3880246,3880015,-1,-1},
-{2975552,3880506,3880246,-1,-1},
-{2975553,3884456,3884891,-1,0.278181818181818},
-{2975554,3885761,3885926,-1,0.0950857142857143},
-{2975555,3885865,3885926,-1,0.1542375},
-{2975556,3885926,3886251,-1,0.292457142857143},
-{2975557,3876961,3877220,-1,-1},
-{2975558,3877220,3877264,-1,-1},
-{2975559,3877220,3877112,-1,-1},
-{2975560,3874483,3874239,-1,-1},
-{2975561,3874886,3874483,0.206022222222222,0.206022222222222},
-{2975562,3873819,3874044,0.272025,-1},
-{2975563,3867298,3867239,-1,0.1113},
-{2975564,3870989,3870953,0.298955555555556,0.298955555555556},
-{2975565,3871099,3871171,0.0804857142857143,0.107314285714286},
-{2975566,3857591,3857349,0.280581818181818,-1},
-{2975571,3868634,3868791,-1,-1},
-{2975572,3868791,3868846,-1,-1},
-{2975573,3865096,3865162,0.241266666666667,0.241266666666667},
-{2975574,3886231,3886444,-1,0.540913043478261},
-{2975575,3886591,3886890,0.399624,-1},
-{2975576,3887040,3887251,-1,0.3678},
-{2975577,3887371,3887568,0.256863157894737,-1},
-{2975578,3886444,3886524,-1,0.173366666666667},
-{2975579,3886524,3886686,-1,0.263628571428571},
-{2975580,3886153,3886524,0.272766666666667,-1},
-{2975581,3885502,3885875,0.173890909090909,-1},
-{2975582,3885760,3885875,0.152458064516129,-1},
-{2975583,3886686,3886963,-1,0.429},
-{2975584,3886890,3887116,0.378234782608696,-1},
-{2975585,3887251,3887524,-1,0.3535},
-{2975586,3887568,3887872,0.3285,-1},
-{2975587,3887116,3887402,0.431590909090909,-1},
-{2975588,3887872,3888178,0.388486956521739,-1},
-{2975589,3888897,3889189,0.4514,-1},
-{2975590,3889189,3889895,0.443810526315789,0.42162},
-{2975591,3889260,3889486,0.174833333333333,-1},
-{2975592,3888569,3889260,0.367278260869565,-1},
-{2975593,3889260,3889666,-1,0.379673684210526},
-{2975594,3879724,3879737,-1,-1},
-{2975595,3879737,3879747,-1,-1},
-{2975596,3885875,3886029,0.220448275862069,-1},
-{2975597,3887213,3887577,-1,0.4248},
-{2975598,3887979,3888245,0.382547368421053,-1},
-{2975599,3888486,3888555,0.265244444444444,0.265244444444444},
-{2975600,3888555,3888574,0.24528,-1},
-{2975601,3888555,3888811,-1,0.1404},
-{2975602,3888811,3888789,-1,-1},
-{2975603,3886380,3886371,-1,0.1896},
-{2975604,3885966,3886371,-1,0.262764705882353},
-{2975605,3886371,3886868,-1,0.285542857142857},
-{2975606,3886371,3886599,-1,0.510027272727273},
-{2975607,3887107,3887112,0.0664702702702703,0.0702685714285714},
-{2975608,3886871,3887329,0.26205,-1},
-{2975609,3887329,3887444,0.142376470588235,-1},
-{2975610,3887329,3887518,-1,-1},
-{2975611,3887847,3888243,0.204109090909091,-1},
-{2975612,3886599,3886564,-1,0.3518625},
-{2975613,3888811,3889502,-1,0.275446153846154},
-{2975614,3885469,3885424,-1,-1},
-{2975615,3885874,3885469,-1,-1},
-{2975616,3885392,3885469,-1,-1},
-{2975617,3888225,3888876,0.594155555555556,0.594155555555556},
-{2975622,3891006,3890902,0.267945454545455,0.267945454545455},
-{2975623,3897916,3897504,0.34256,0.25692},
-{2975624,3899518,3899628,0.61,0.665454545454545},
-{2975625,3899258,3899628,0.141270967741935,0.156407142857143},
-{2975626,3899961,3900519,0.496515789473684,-1},
-{2975627,3900940,3900359,0.467536363636364,-1},
-{2975628,3896454,3897827,0.400814634146341,0.421369230769231},
-{2975629,3897827,3898183,0.0996166666666667,0.089655},
-{2975630,3898183,3898535,0.100578947368421,0.093219512195122},
-{2975631,3898535,3898867,0.100105263157895,0.0951},
-{2975632,3898867,3899258,0.14576,0.141058064516129},
-{2975633,3898721,3898951,0.202870588235294,0.202870588235294},
-{2975634,3898951,3899273,0.267375,-1},
-{2975635,3898244,3898646,0.380964705882353,0.380964705882353},
-{2975636,3889466,3890277,-1,-1},
-{2975637,3890277,3890557,0.223684615384615,-1},
-{2975638,3890557,3890996,0.307264285714286,-1},
-{2975639,3890996,3891310,0.220371428571429,-1},
-{2975640,3891310,3890290,0.581975,-1},
-{2975641,3892343,3892093,0.1392,0.1392},
-{2975642,3889780,3890615,0.4297875,0.45844},
-{2975643,3890615,3891200,0.323554838709677,0.33434},
-{2975644,3891200,3891153,0.25528,0.15955},
-{2975645,3891819,3891200,-1,0.6308},
-{2975646,3892294,3891819,-1,-1},
-{2975647,3892294,3893118,-1,0.733661538461539},
-{2975648,3890332,3890418,-1,0.360490909090909},
-{2975649,3891208,3891763,0.23288275862069,-1},
-{2975650,3891763,3892295,0.259938461538462,-1},
-{2975651,3892295,3893054,0.344136,-1},
-{2975652,3893002,3893054,-1,0.324825},
-{2975653,3893054,3893101,-1,0.273466666666667},
-{2975654,3891763,3891870,-1,0.381886956521739},
-{2975655,3891870,3891942,-1,0.191784},
-{2975656,3898472,3899847,0.462811764705882,0.629424},
-{2975657,3899847,3899947,0.204422222222222,0.204422222222222},
-{2975658,3898771,3898472,0.276662068965517,0.40116},
-{2975659,3899622,3898819,0.337755555555556,0.337755555555556},
-{2975660,3899654,3899622,0.116088888888889,0.116088888888889},
-{2975661,3899608,3899622,0.0898666666666667,0.0898666666666667},
-{2975662,3899608,3899128,0.212555555555556,0.212555555555556},
-{2975663,3899696,3899847,0.303925714285714,0.35458},
-{2975664,3900213,3900410,-1,0.22614},
-{2975665,3900410,3900418,-1,0.0949555555555555},
-{2975666,3900410,3900448,0.0969333333333333,0.0969333333333333},
-{2975667,3900448,3901537,0.530822222222222,0.530822222222222},
-{2975668,3900418,3901001,0.263844444444444,0.263844444444444},
-{2975669,3901001,3901436,0.177155555555556,0.177155555555556},
-{2975670,3900410,3901035,0.584169230769231,0.584169230769231},
-{2975671,3900448,3901075,0.281088888888889,0.281088888888889},
-{2975672,3901035,3901001,0.0871111111111111,0.0871111111111111},
-{2975673,3901035,3901075,0.0910444444444444,0.0910444444444444},
-{2975674,3901479,3901035,0.377953846153846,0.223336363636364},
-{2975675,3901075,3901511,0.183688888888889,0.183688888888889},
-{2975676,3901436,3901402,0.074,0.074},
-{2975677,3901436,3901479,0.0919333333333333,0.0919333333333333},
-{2975678,3901479,3901511,0.0910444444444444,0.0910444444444444},
-{2975679,3901511,3901537,0.0834666666666667,0.0834666666666667},
-{2975680,3901436,3902307,0.343088888888889,0.343088888888889},
-{2975681,3901479,3902340,0.350330769230769,0.350330769230769},
-{2975682,3901511,3902389,0.340311111111111,0.340311111111111},
-{2975683,3901537,3902416,0.339577777777778,0.339577777777778},
-{2975684,3902273,3902307,0.11577,0.15436},
-{2975685,3902307,3902340,0.113809090909091,0.131778947368421},
-{2975686,3902340,3902389,0.104832,0.104832},
-{2975687,3902389,3902416,0.126252631578947,0.126252631578947},
-{2975688,3900439,3900250,0.1372875,0.129211764705882},
-{2975689,3900718,3900724,-1,-1},
-{2975690,3900444,3900439,-1,-1},
-{2975691,3900769,3900718,-1,-1},
-{2975692,3900769,3900444,-1,-1},
-{2975693,3900424,3900444,-1,-1},
-{2975694,3902255,3902273,0.0742645161290322,0.100095652173913},
-{2975695,3882242,3882646,-1,0.340835294117647},
-{2975696,3886770,3887003,-1,0.378081818181818},
-{2975697,3887153,3887463,0.484129411764706,-1},
-{2975698,3887773,3888141,-1,0.395571428571429},
-{2975699,3885036,3885322,-1,0.732642857142857},
-{2975700,3886539,3886770,-1,0.390457142857143},
-{2975701,3886900,3887153,0.400894736842105,-1},
-{2975702,3886900,3886539,0.31088,-1},
-{2975703,3886445,3886539,-1,0.15669},
-{2975704,3886763,3886900,0.185481818181818,-1},
-{2975705,3886338,3886445,-1,0.20478},
-{2975706,3886664,3886763,0.150571428571429,-1},
-{2975707,3886338,3886664,0.225852631578947,-1},
-{2975708,3887257,3887773,-1,0.535330434782609},
-{2975709,3888803,3889417,-1,0.386966666666667},
-{2975710,3889417,3890064,-1,0.37617},
-{2975711,3889959,3890064,0.546128571428572,-1},
-{2975712,3889686,3889689,0.1176,0.1176},
-{2975713,3890050,3890055,0.118933333333333,0.118933333333333},
-{2975714,3889426,3889689,0.110066666666667,0.1143},
-{2975715,3889689,3890055,0.145944827586207,0.145944827586207},
-{2975716,3890587,3890648,-1,0.203422222222222},
-{2975717,3889424,3890648,-1,0.534955555555556},
-{2975718,3890648,3890689,-1,0.17355},
-{2975719,3891942,3892011,-1,0.296928},
-{2975720,3891535,3892011,0.255541935483871,0.282921428571429},
-{2975721,3892011,3892860,0.366766666666667,0.471557142857143},
-{2975722,3891349,3891267,0.370772727272727,0.370772727272727},
-{2975723,3889882,3890563,0.5961,-1},
-{2975724,3888043,3889010,0.460338461538462,-1},
-{2975725,3889010,3889565,0.351371428571429,-1},
-{2975726,3890313,3891148,-1,0.569423076923077},
-{2975727,3889565,3890016,0.373058823529412,-1},
-{2975728,3890016,3890313,-1,0.2137},
-{2975729,3895393,3895463,0.331270588235294,0.331270588235294},
-{2975730,3895463,3896445,0.624354545454545,0.624354545454545},
-{2975731,3896445,3896314,0.344428571428571,0.314478260869565},
-{2975732,3894192,3895279,0.737563636363636,0.81132},
-{2975733,3895279,3896149,0.733,0.573652173913043},
-{2975734,3894259,3895191,0.633272727272727,0.87075},
-{2975735,3895191,3895279,0.53724,0.424136842105263},
-{2975736,3896149,3897039,0.7792875,0.6927},
-{2975737,3896761,3897039,0.354085714285714,0.354085714285714},
-{2975738,3895191,3895987,0.61668,0.560618181818182},
-{2975739,3895987,3896761,0.7881,0.649023529411765},
-{2975740,3894325,3895007,0.473228571428571,0.523042105263158},
-{2975741,3895007,3895191,0.523036363636364,0.261518181818182},
-{2975742,3894794,3895007,-1,0.4089},
-{2975743,3895007,3895762,0.529721739130435,0.641242105263158},
-{2975744,3898821,3898305,-1,-1},
-{2975745,3898740,3899521,-1,-1},
-{2975746,3898821,3898740,-1,-1},
-{2975747,3899621,3898821,-1,-1},
-{2975748,3901875,3899621,-1,-1},
-{2975749,3902480,3899521,-1,-1},
-{2975750,3902480,3901875,0.522266666666667,0.522266666666667},
-{2975751,3897601,3897128,-1,-1},
-{2975752,3897128,3896789,-1,-1},
-{2975753,3899621,3900346,-1,-1},
-{2975754,3884527,3884808,-1,0.427114285714286},
-{2975755,3884531,3885459,0.500372727272727,-1},
-{2975756,3885459,3886288,0.396264,-1},
-{2975757,3886048,3886338,-1,0.492252631578947},
-{2975758,3886288,3886664,0.515485714285714,-1},
-{2975759,3886707,3887257,-1,0.692072727272727},
-{2975760,3887358,3888112,-1,0.390052173913044},
-{2975761,3888112,3888703,-1,0.3068},
-{2975762,3889303,3889565,0.24003,-1},
-{2975763,3888703,3889303,0.410191304347826,-1},
-{2975764,3888703,3889148,-1,0.216816},
-{2975765,3889148,3889774,-1,0.383376923076923},
-{2975766,3889774,3890016,-1,0.199309090909091},
-{2975767,3890890,3891804,-1,0.733982608695652},
-{2975768,3891829,3892114,0.150235714285714,-1},
-{2975769,3891446,3891829,0.19086,-1},
-{2975770,3891032,3891446,0.219346153846154,-1},
-{2975771,3890957,3891032,0.0503454545454545,0.069225},
-{2975772,3891446,3891630,0.157977777777778,0.157977777777778},
-{2975773,3891630,3892002,0.208155555555556,0.208155555555556},
-{2975774,3891829,3892002,0.153466666666667,0.153466666666667},
-{2975775,3895762,3896562,0.652976470588235,0.6167},
-{2975776,3896305,3896562,0.364233333333333,0.385658823529412},
-{2975777,3896051,3896305,0.384733333333333,0.329771428571429},
-{2975778,3894544,3894794,-1,0.29475},
-{2975779,3894437,3894544,-1,0.164866666666667},
-{2975780,3894808,3894437,0.3550875,0.315633333333333},
-{2975781,3895204,3894808,0.30297,-1},
-{2975782,3894808,3895172,0.33824,-1},
-{2975783,3896562,3896761,0.316326315789474,0.316326315789474},
-{2975784,3896562,3897026,0.348157894736842,0.348157894736842},
-{2975785,3885835,3885976,0.31695,-1},
-{2975786,3885493,3885976,0.218375,0.291166666666667},
-{2975787,3885976,3886721,0.557717647058824,-1},
-{2975788,3885920,3887082,0.426051428571429,0.5142},
-{2975789,3887082,3887481,0.16455,0.14398125},
-{2975790,3887481,3887887,0.1220625,0.1302},
-{2975791,3887887,3888715,0.344815384615385,0.344815384615385},
-{2975792,3887481,3887776,0.194955555555556,0.194955555555556},
-{2975793,3887887,3888549,0.64719,-1},
-{2975794,3890417,3891196,0.489648648648649,0.6039},
-{2975795,3891528,3891896,0.344088888888889,0.344088888888889},
-{2975796,3892047,3892411,0.355844444444444,0.355844444444444},
-{2975797,3893762,3893863,0.133925,0.139747826086957},
-{2975798,3893863,3895760,0.684570731707317,0.684570731707317},
-{2975799,3896789,3899053,-1,-1},
-{2975800,3895097,3895818,0.3798,0.3798},
-{2975801,3895818,3896239,0.2007,0.193779310344828},
-{2975802,3897430,3896857,0.308555555555556,0.308555555555556},
-{2975803,3896857,3896484,0.181645161290323,0.181645161290323},
-{2975804,3895905,3895818,0.108514285714286,0.119936842105263},
-{2975805,3895771,3895905,0.11652,0.137082352941177},
-{2975806,3895618,3895771,0.0872666666666667,0.0872666666666667},
-{2975807,3895523,3895618,0.0739333333333333,0.0739333333333333},
-{2975808,3895422,3895523,0.0716222222222222,0.0716222222222222},
-{2975809,3895267,3895422,0.0877777777777778,0.0877777777777778},
-{2975810,3895422,3895804,0.357311111111111,0.357311111111111},
-{2975811,3896484,3896344,0.0534714285714286,0.0534714285714286},
-{2975812,3896344,3896202,0.0511304347826087,0.0511304347826087},
-{2975813,3896202,3896062,0.0444954545454545,0.0444954545454545},
-{2975814,3896062,3895904,0.0626,0.0626},
-{2975815,3895904,3895761,0.0798,0.0798},
-{2975816,3895761,3896127,0.297889655172414,0.297889655172414},
-{2975817,3896127,3896002,0.426955555555556,0.426955555555556},
-{2975818,3896127,3896417,0.194775,0.194775},
-{2975819,3896417,3896002,0.2354,0.2354},
-{2975820,3897025,3897332,0.282272727272727,0.326842105263158},
-{2975821,3897945,3897332,-1,-1},
-{2975822,3897332,3897660,0.255072,0.255072},
-{2975823,3900196,3900811,0.335977777777778,0.335977777777778},
-{2975824,3900277,3900811,0.243177777777778,0.243177777777778},
-{2975825,3900357,3900811,0.293555555555556,0.293555555555556},
-{2975826,3900423,3901163,0.329888888888889,0.329888888888889},
-{2975827,3901163,3900492,0.364422222222222,0.364422222222222},
-{2975828,3900723,3901957,1.911,-1},
-{2975829,3900544,3901680,0.514128,0.514128},
-{2975830,3900260,3900892,0.342822222222222,0.342822222222222},
-{2975831,3901522,3902117,-1,0.79525},
-{2975832,3902117,3902287,-1,0.358227272727273},
-{2975833,3902117,3901802,0.279533333333333,0.279533333333333},
-{2975834,3903915,3904004,0.2545,0.234923076923077},
-{2975835,3904847,3904911,0.189913043478261,0.256941176470588},
-{2975836,3903915,3904847,0.67108,-1},
-{2975837,3903103,3905138,1.67192,1.19422857142857},
-{2975838,3903033,3903452,-1,-1},
-{2975839,3903452,3903804,-1,-1},
-{2975840,3904369,3904530,-1,-1},
-{2975841,3904369,3904711,-1,-1},
-{2975842,3904711,3904916,-1,-1},
-{2975843,3903848,3903915,0.36429,0.36429},
-{2975844,3904847,3905067,0.15468,0.143222222222222},
-{2975845,3905192,3905067,0.06385,0.06385},
-{2975846,3905067,3905008,0.168620689655172,0.139714285714286},
-{2975847,3905392,3905884,-1,-1},
-{2975848,3904800,3905351,0.597,0.597},
-{2975849,3886759,3887013,0.153081818181818,0.153081818181818},
-{2975850,3887013,3887090,-1,-1},
-{2975851,3887090,3888051,-1,-1},
-{2975852,3890221,3891460,-1,0.950576470588235},
-{2975853,3896002,3896283,0.252244444444444,0.252244444444444},
-{2975854,3896710,3896283,0.251777777777778,0.251777777777778},
-{2975855,3897332,3896710,0.532588235294118,0.532588235294118},
-{2975856,3896283,3896692,0.301755555555556,0.301755555555556},
-{2975857,3902029,3902051,-1,0.142466666666667},
-{2975858,3901591,3902029,0.1708,0.1708},
-{2975859,3903675,3903265,0.293044444444444,-1},
-{2975860,3901339,3901167,0.245977777777778,0.245977777777778},
-{2975861,3901616,3901339,0.1188,0.1188},
-{2975862,3901559,3901532,0.111914285714286,-1},
-{2975863,3903048,3903265,-1,0.336244444444444},
-{2975864,3901616,3902051,0.173177777777778,0.173177777777778},
-{2975865,3902051,3902645,-1,0.216866666666667},
-{2975866,3902641,3902970,-1,-1},
-{2975867,3903714,3902970,-1,-1},
-{2975868,3902960,3902970,-1,-1},
-{2975869,3902645,3903756,-1,-1},
-{2975870,3906043,3906804,0.370418181818182,0.370418181818182},
-{2975871,3909651,3909963,0.218,0.218},
-{2975872,3909970,3910510,0.374113043478261,-1},
-{2975873,3910440,3911022,-1,0.4431},
-{2975874,3907558,3906959,-1,0.4046},
-{2975875,3906959,3906488,-1,0.32862},
-{2975876,3906488,3906133,-1,0.255725},
-{2975877,3906133,3905699,-1,0.27245},
-{2975878,3905699,3905266,-1,0.285886956521739},
-{2975879,3906177,3906488,0.218111111111111,0.218111111111111},
-{2975880,3906488,3906958,0.249555555555556,0.249555555555556},
-{2975881,3905744,3906133,-1,0.30837},
-{2975882,3906133,3906520,0.34758947368421,0.2446},
-{2975883,3906520,3906968,0.295827272727273,0.295827272727273},
-{2975884,3908995,3908470,0.257977777777778,0.257977777777778},
-{2975885,3908470,3907908,0.384031578947368,0.384031578947368},
-{2975886,3907980,3908470,0.2468,0.2468},
-{2975887,3908470,3908941,0.594,0.3267},
-{2975888,3908941,3908442,0.256435714285714,-1},
-{2975889,3913861,3914275,0.319475,0.38337},
-{2975890,3911625,3911283,0.349246153846154,0.267070588235294},
-{2975891,3912355,3911625,0.68136,0.51102},
-{2975892,3911625,3911768,0.11022,0.122466666666667},
-{2975893,3911592,3911494,0.0667826086956522,0.0698181818181818},
-{2975894,3911768,3911592,0.147252631578947,0.13989},
-{2975895,3912546,3912934,0.209060869565217,0.218563636363636},
-{2975896,3912020,3911915,0.0698842105263158,0.055325},
-{2975897,3912256,3912020,0.217542857142857,0.217542857142857},
-{2975898,3912256,3912458,0.2793,0.2443875},
-{2975899,3912458,3912686,0.2434,0.2434},
-{2975900,3913400,3912458,0.54825,0.54825},
-{2975901,3912934,3912280,0.307057142857143,0.32241},
-{2975902,3913573,3912934,0.293686956521739,0.355515789473684},
-{2975903,3914181,3913573,0.4088625,0.363433333333333},
-{2975904,3911592,3912020,0.33072,0.314971428571429},
-{2975905,3912020,3912514,0.228514285714286,0.2666},
-{2975906,3911166,3911592,0.218777777777778,0.218777777777778},
-{2975907,3914075,3913194,0.539342857142857,0.596115789473684},
-{2975908,3913194,3913046,0.15305,0.131185714285714},
-{2975909,3913046,3912887,0.0883,0.0883},
-{2975910,3912514,3913046,0.264547826086957,0.289742857142857},
-{2975911,3913046,3914437,1.1140875,1.37118461538462},
-{2975912,3913194,3913561,0.323957142857143,0.323957142857143},
-{2975913,3914334,3913561,0.8501,0.8501},
-{2975914,3913561,3914437,0.7000125,0.7000125},
-{2975915,3914437,3914695,0.181285714285714,0.165521739130435},
-{2975916,3914928,3914075,0.63321,0.666536842105263},
-{2975917,3914928,3914475,0.307955555555556,0.307955555555556},
-{2975918,3914928,3915334,0.31011,0.229711111111111},
-{2975919,3914359,3914453,0.0321567567567567,0.0626210526315789},
-{2975920,3914453,3914785,0.274153846153846,0.274153846153846},
-{2975921,3914699,3914785,0.0472888888888889,0.0472888888888889},
-{2975922,3915833,3915876,0.0728666666666667,0.0570260869565217},
-{2975923,3915603,3915833,0.24666,0.274066666666667},
-{2975924,3914453,3914831,0.202292307692308,0.210384},
-{2975925,3915365,3915830,-1,-1},
-{2975926,3915830,3916115,-1,-1},
-{2975927,3915603,3916115,-1,-1},
-{2975928,3915833,3916411,0.291775,0.389033333333333},
-{2975929,3916421,3916411,0.694,0.567818181818182},
-{2975930,3916905,3917310,0.2634,0.2634},
-{2975931,3916322,3916551,0.217885714285714,0.269152941176471},
-{2975932,3916322,3915862,0.303244444444444,0.303244444444444},
-{2975933,3916126,3916322,0.213704347826087,0.258694736842105},
-{2975934,3915862,3916126,0.184894736842105,-1},
-{2975935,3916432,3916126,-1,0.326914285714286},
-{2975936,3915862,3915530,-1,0.397623529411765},
-{2975937,3915365,3915530,0.150075,0.1334},
-{2975938,3916905,3917117,-1,0.161288888888889},
-{2975939,3916698,3917203,-1,0.46365},
-{2975940,3918658,3919450,0.617454545454545,0.54336},
-{2975941,3919299,3920365,0.483923076923077,0.483923076923077},
-{2975942,3920365,3920862,0.21945,0.21945},
-{2975943,3919856,3920365,0.503333333333333,-1},
-{2975944,3920149,3920862,0.460153846153846,0.460153846153846},
-{2975945,3920505,3921157,0.421288888888889,0.421288888888889},
-{2975946,3921157,3921265,0.0688,0.0688},
-{2975947,3920749,3921600,0.523244444444444,0.523244444444444},
-{2975948,3920959,3921744,0.459911111111111,0.459911111111111},
-{2975949,3921215,3921812,0.362311111111111,0.362311111111111},
-{2975950,3921971,3922669,0.431155555555556,0.431155555555556},
-{2975951,3921971,3922014,0.167311111111111,0.167311111111111},
-{2975952,3922014,3922892,0.59,0.59},
-{2975953,3919262,3920073,0.595747826086957,0.622827272727273},
-{2975954,3919616,3920423,0.569775,0.621572727272727},
-{2975955,3921440,3921857,0.243222222222222,0.243222222222222},
-{2975956,3921562,3921851,0.176133333333333,0.176133333333333},
-{2975957,3921992,3922014,0.204355555555556,0.204355555555556},
-{2975958,3922060,3923076,0.7812,0.7812},
-{2975959,3922404,3923460,0.839266666666667,0.839266666666667},
-{2975961,3922063,3922404,0.2168,0.2168},
-{2975981,3903049,3902402,0.252777777777778,0.252777777777778},
-{2975982,3903049,3902899,0.113481818181818,0.1387},
-{2975983,3903539,3903049,0.298777777777778,0.32268},
-{2975984,3903962,3903539,0.34065,-1},
-{2975985,3904427,3903962,0.216174193548387,-1},
-{2975986,3904835,3904427,0.3003,-1},
-{2975987,3905266,3904835,0.268361538461538,-1},
-{2975988,3904460,3904835,0.227911111111111,0.227911111111111},
-{2975989,3904835,3905248,0.247733333333333,0.247733333333333},
-{2975990,3904024,3904427,-1,0.343133333333333},
-{2975991,3904427,3904810,0.283721739130435,0.283721739130435},
-{2975992,3903589,3903962,0.229155555555556,0.229155555555556},
-{2975993,3903962,3904407,0.243044444444444,0.243044444444444},
-{2975994,3904810,3905237,0.356557894736842,0.376366666666667},
-{2975995,3902899,3902671,0.120022222222222,0.120022222222222},
-{2975996,3902899,3903288,0.302171428571429,0.302171428571429},
-{2975997,3903497,3903885,0.242177777777778,0.242177777777778},
-{2975998,3904382,3903885,0.4746,0.547615384615385},
-{2975999,3905432,3904814,0.2626,0.2626},
-{2976000,3906063,3905432,0.247088888888889,0.247088888888889},
-{2976001,3905478,3905432,0.241511111111111,0.241511111111111},
-{2976002,3905466,3905478,0.239066666666667,0.239066666666667},
-{2976003,3906130,3906079,0.584781818181818,0.584781818181818},
-{2976004,3906079,3906063,0.347314285714286,0.347314285714286},
-{2976005,3906063,3906096,0.147808695652174,0.147808695652174},
-{2976006,3905316,3905699,0.226377777777778,0.226377777777778},
-{2976007,3905699,3906145,0.255311111111111,0.255311111111111},
-{2976008,3902354,3902596,0.10775625,-1},
-{2976009,3907367,3906680,0.243822222222222,0.243822222222222},
-{2976010,3907973,3907367,0.29295,0.29295},
-{2976011,3908014,3907973,0.256888888888889,0.256888888888889},
-{2976012,3907973,3907959,0.252555555555556,0.252555555555556},
-{2976013,3909287,3909128,0.304092857142857,0.304092857142857},
-{2976014,3909287,3909955,0.530233333333333,0.530233333333333},
-{2976015,3907277,3906130,0.4524,0.4524},
-{2976016,3907959,3907277,0.240488888888889,0.240488888888889},
-{2976017,3908340,3907959,0.162704347826087,0.2079},
-{2976018,3908340,3908397,0.150216,0.150216},
-{2976019,3908397,3908379,0.256084615384615,0.256084615384615},
-{2976020,3909099,3908397,0.239622222222222,0.239622222222222},
-{2976021,3909801,3909099,0.265866666666667,0.265866666666667},
-{2976022,3909099,3909091,0.340966666666667,0.340966666666667},
-{2976023,3909091,3909090,0.302018181818182,0.302018181818182},
-{2976024,3909955,3909808,0.394254545454545,0.510211764705882},
-{2976025,3910526,3909955,0.315866666666667,0.315866666666667},
-{2976026,3910429,3909808,0.24594,0.254420689655172},
-{2976027,3910873,3910429,0.260125,0.231222222222222},
-{2976028,3908379,3908368,0.4672,0.4672},
-{2976029,3906459,3906096,0.198163636363636,0.161466666666667},
-{2976030,3907101,3906459,0.26028,0.26028},
-{2976031,3908368,3907101,0.50695,0.50695},
-{2976032,3910429,3910911,0.366433333333333,0.366433333333333},
-{2976033,3910911,3910370,0.346914285714286,0.331145454545455},
-{2976034,3911494,3910911,0.2852,0.2852},
-{2976035,3911915,3911377,-1,0.350481818181818},
-{2976036,3910911,3911377,0.244288888888889,0.244288888888889},
-{2976037,3911377,3910989,-1,0.230607692307692},
-{2976038,3910350,3910816,0.293608695652174,0.2251},
-{2976039,3910350,3909823,0.236088888888889,0.219806896551724},
-{2976040,3910350,3910822,0.245888888888889,0.245888888888889},
-{2976041,3910822,3911265,0.221844444444444,0.221844444444444},
-{2976042,3912887,3911711,0.552955555555556,0.552955555555556},
-{2976043,3911711,3911265,0.27245,0.284295652173913},
-{2976044,3913330,3912104,-1,0.673472727272727},
-{2976045,3909823,3909278,0.246870967741936,0.273321428571429},
-{2976046,3909278,3909211,0.03184,0.0341142857142857},
-{2976047,3917899,3918320,0.342,0.342},
-{2976048,3918320,3918428,0.0704285714285714,0.07395},
-{2976049,3917569,3918320,0.78496,0.78496},
-{2976050,3917395,3917536,0.47788,-1},
-{2976051,3916926,3917010,0.056,0.106909090909091},
-{2976052,3916755,3917010,0.171733333333333,0.171733333333333},
-{2976053,3917010,3917261,0.200828571428571,0.221968421052632},
-{2976054,3917502,3917569,0.147766666666667,0.1209},
-{2976055,3916935,3917502,0.51816,0.51816},
-{2976056,3916935,3917378,0.269784,0.269784},
-{2976057,3918409,3918473,0.0515181818181818,0.0515181818181818},
-{2976058,3917751,3918409,0.333735483870968,0.413832},
-{2976059,3917378,3917751,0.183868965517241,0.205084615384615},
-{2976060,3918409,3918728,0.18645,0.18645},
-{2976061,3918728,3918806,0.0597157894736842,0.0630333333333333},
-{2976062,3918728,3919160,0.236044444444444,0.236044444444444},
-{2976063,3917751,3918071,0.21084,0.183339130434783},
-{2976064,3918071,3918728,0.492371428571429,0.492371428571429},
-{2976065,3917921,3918071,0.238569230769231,0.25845},
-{2976066,3918071,3918484,0.219576,0.211130769230769},
-{2976067,3918484,3919160,-1,-1},
-{2976068,3918473,3919262,0.504866666666667,0.504866666666667},
-{2976069,3918806,3919616,0.488207142857143,0.68349},
-{2976070,3919927,3920749,0.8052,0.488871428571429},
-{2976071,3919117,3919927,0.486385714285714,0.486385714285714},
-{2976072,3919453,3920236,1.13185,1.13185},
-{2976073,3919786,3920578,0.5024,0.5024},
-{2976074,3918320,3918797,0.66474,0.66474},
-{2976075,3917378,3918045,-1,-1},
-{2976076,3918045,3918409,0.168511111111111,0.168511111111111},
-{2976077,3919097,3919625,0.438488888888889,0.438488888888889},
-{2976078,3918484,3919097,0.379486956521739,0.300972413793103},
-{2976079,3919097,3919396,0.223547368421053,0.176975},
-{2976080,3916577,3917101,0.50648,0.422066666666667},
-{2976081,3916140,3916434,0.231939130434783,0.254028571428571},
-{2976082,3916434,3916370,0.0671333333333333,0.0710823529411765},
-{2976083,3916822,3916434,0.3688125,0.327833333333333},
-{2976084,3916822,3917121,0.191133333333333,0.191133333333333},
-{2976085,3917338,3916822,0.63568,0.529733333333333},
-{2976086,3917101,3917434,0.254571428571429,0.281368421052632},
-{2976087,3917434,3917338,0.126070588235294,0.126070588235294},
-{2976088,3917690,3917338,0.433061538461538,0.28149},
-{2976089,3917434,3917875,0.283371428571429,0.258730434782609},
-{2976090,3916434,3916786,0.208266666666667,0.208266666666667},
-{2976091,3918044,3917004,-1,-1},
-{2976092,3917981,3918044,0.0989111111111111,0.0989111111111111},
-{2976093,3918126,3918044,0.0334222222222222,0.0334222222222222},
-{2976094,3914779,3914953,0.131177777777778,0.131177777777778},
-{2976095,3916786,3917097,0.199355555555556,0.199355555555556},
-{2976096,3915611,3915268,0.2192,0.2192},
-{2976097,3915268,3915370,0.0737333333333333,0.0737333333333333},
-{2976098,3915932,3915596,0.205266666666667,0.205266666666667},
-{2976099,3916370,3915932,0.364171428571429,0.364171428571429},
-{2976100,3915932,3915499,0.387133333333333,0.29035},
-{2976101,3917047,3917097,0.0529714285714286,0.0529714285714286},
-{2976102,3917457,3917097,-1,-1},
-{2976103,3917660,3917457,0.194,0.1746},
-{2976104,3917660,3917881,0.1939,0.1939},
-{2976105,3918196,3917881,0.343254545454545,0.37758},
-{2976106,3917881,3918237,0.312233333333333,0.3512625},
-{2976107,3918373,3918490,0.113047058823529,0.106766666666667},
-{2976108,3918722,3918373,0.480955555555556,0.480955555555556},
-{2976109,3918153,3918373,0.245828571428571,0.1912},
-{2976110,3917660,3917994,-1,-1},
-{2976111,3917457,3917770,0.3331125,0.313517647058823},
-{2976112,3917398,3917710,0.197333333333333,0.197333333333333},
-{2976113,3917710,3918029,0.291633333333333,0.291633333333333},
-{2976114,3918029,3917963,0.0713,0.08556},
-{2976115,3918200,3918029,0.136966666666667,0.1540875},
-{2976116,3918513,3918200,0.244228571428571,0.2137},
-{2976117,3918517,3918200,0.19,0.19},
-{2976118,3918517,3918284,0.1893,0.219189473684211},
-{2976119,3918513,3918835,0.188288888888889,0.188288888888889},
-{2976120,3918835,3918517,0.16944,0.181542857142857},
-{2976121,3919159,3918835,0.18864,0.2096},
-{2976122,3919159,3919475,0.278684210526316,0.311470588235294},
-{2976123,3916720,3915818,0.567969230769231,0.5274},
-{2976124,3917047,3916145,0.74298,0.479341935483871},
-{2976125,3915908,3915611,0.298270588235294,0.362185714285714},
-{2976126,3916577,3915908,0.669347368421053,0.578072727272727},
-{2976127,3920236,3921063,0.8544,0.8544},
-{2976128,3920578,3921379,0.504377777777778,0.504377777777778},
-{2976129,3920884,3921727,0.588052173913043,0.56355},
-{2976130,3921218,3921956,0.446422222222222,0.446422222222222},
-{2976131,3920420,3921218,0.618572727272727,0.618572727272727},
-{2976132,3921556,3921985,0.254355555555556,0.254355555555556},
-{2976133,3922100,3922677,0.3628,0.3628},
-{2976134,3919558,3920420,0.771568421052632,0.771568421052632},
-{2976135,3920720,3921046,0.172823076923077,0.172823076923077},
-{2976136,3921046,3921879,0.501666666666667,0.501666666666667},
-{2976137,3921046,3921305,0.182018181818182,0.13348},
-{2976138,3922100,3922129,0.15036,0.15036},
-{2976139,3921305,3921383,0.0377806451612903,0.0366},
-{2976140,3921383,3922056,0.403511111111111,0.403511111111111},
-{2976141,3921383,3921610,0.0969085714285714,0.121135714285714},
-{2976142,3922056,3922092,0.21801,0.21801},
-{2976143,3922092,3922133,0.27726,0.27726},
-{2976144,3921610,3922092,0.301177777777778,0.301177777777778},
-{2976145,3921879,3922030,0.090825,0.10899},
-{2976146,3922030,3922056,0.251175,0.251175},
-{2976147,3922756,3922959,0.165266666666667,0.165266666666667},
-{2976148,3922959,3923382,0.510377777777778,0.510377777777778},
-{2976151,3922765,3923502,0.510945454545455,0.510945454545455},
-{2976152,3922584,3923382,0.523090909090909,0.822},
-{2976153,3922242,3922584,0.249075,0.229915384615385},
-{2976154,3922584,3922765,0.19648,0.1842},
-{2976155,3922765,3923082,0.2666,0.2666},
-{2976160,3922350,3923082,0.5208,-1},
-{2976164,3920730,3921610,0.547272,0.547272},
-{2976165,3921610,3921842,0.16935,0.140151724137931},
-{2976166,3921842,3922133,0.170866666666667,0.170866666666667},
-{2976167,3921119,3921842,0.41242,0.651189473684211},
-{2976168,3901128,3901394,0.2804625,0.2804625},
-{2976169,3901394,3901636,0.135085714285714,0.135085714285714},
-{2976170,3901636,3901886,0.13815,0.13815},
-{2976171,3901886,3902163,0.201821052631579,0.147484615384615},
-{2976172,3902163,3902470,0.1614,0.1614},
-{2976173,3902470,3902692,0.126733333333333,0.126733333333333},
-{2976174,3902692,3902903,0.113524137931034,0.113524137931034},
-{2976175,3902903,3903167,0.205571428571429,0.1439},
-{2976176,3903167,3903415,0.1335,0.1335},
-{2976177,3903415,3903592,0.152454545454545,0.119785714285714},
-{2976178,3903592,3903813,0.128464285714286,0.128464285714286},
-{2976179,3903813,3904132,0.19604347826087,0.14090625},
-{2976180,3904132,3904410,0.2795625,0.194478260869565},
-{2976181,3904410,3904707,0.20275,0.231714285714286},
-{2976182,3904707,3904960,0.150528,0.129765517241379},
-{2976183,3904960,3905193,0.12922,0.114017647058824},
-{2976184,3905193,3905287,0.0778173913043478,0.0526411764705882},
-{2976185,3905287,3905405,0.0853090909090909,0.0536228571428571},
-{2976186,3905405,3905505,0.06432,0.0472941176470588},
-{2976187,3905505,3905678,0.0797571428571428,0.0656823529411765},
-{2976188,3905678,3905881,0.1141,0.1141},
-{2976189,3905881,3906104,0.196326315789474,0.143469230769231},
-{2976190,3901394,3901693,0.23515,0.28218},
-{2976191,3900502,3901394,0.434127272727273,0.573048},
-{2976192,3899550,3900502,0.483754838709677,0.483754838709677},
-{2976193,3901636,3902354,0.41855,0.41855},
-{2976194,3900727,3901636,0.534044444444444,0.534044444444444},
-{2976195,3901886,3902749,0.584857142857143,0.534},
-{2976196,3902163,3903113,0.514933333333333,0.514933333333333},
-{2976197,3902470,3903434,0.533533333333333,0.533533333333333},
-{2976198,3902692,3903606,0.539866666666667,0.539866666666667},
-{2976199,3902903,3903824,0.665809090909091,0.665809090909091},
-{2976200,3903167,3904121,0.538,0.538},
-{2976201,3903415,3904370,0.72795,0.72795},
-{2976202,3903592,3904571,0.585648,0.6972},
-{2976203,3903813,3904787,0.544822222222222,0.544822222222222},
-{2976204,3904132,3905082,0.503875862068966,0.503875862068966},
-{2976205,3904707,3905668,0.663218181818182,0.663218181818182},
-{2976206,3904960,3905902,0.543555555555555,0.543555555555555},
-{2976207,3905193,3906150,0.97424,0.97424},
-{2976208,3905405,3906373,0.538933333333333,0.538933333333333},
-{2976209,3905678,3906601,0.858882352941176,0.858882352941176},
-{2976210,3905881,3906847,0.645313043478261,0.645313043478261},
-{2976211,3901187,3902163,0.534133333333333,0.534133333333333},
-{2976212,3901440,3902470,0.547066666666667,0.547066666666667},
-{2976213,3901675,3902692,0.5362,0.5362},
-{2976214,3901857,3902903,0.780252631578947,0.780252631578947},
-{2976215,3902176,3903167,0.545377777777778,0.545377777777778},
-{2976216,3902434,3903415,0.567946153846154,0.567946153846154},
-{2976217,3902667,3903592,0.544866666666667,0.544866666666667},
-{2976218,3902887,3903813,0.61775,0.61775},
-{2976219,3903175,3904132,0.520328571428571,0.520328571428571},
-{2976220,3903726,3904707,0.585264,0.585264},
-{2976221,3903972,3904960,0.6954,0.6954},
-{2976222,3904365,3905287,0.641504347826087,0.641504347826087},
-{2976223,3904581,3905505,0.546,0.546},
-{2976224,3904925,3905881,0.73317,0.563976923076923},
-{2976225,3905149,3906104,0.815933333333333,0.63855652173913},
-{2976226,3899736,3900663,0.5494,0.5494},
-{2976227,3899952,3900851,0.58656,0.58656},
-{2976228,3900176,3901059,0.548022222222222,0.548022222222222},
-{2976229,3900349,3901242,0.554066666666667,0.554066666666667},
-{2976230,3900522,3901440,1.06902857142857,1.06902857142857},
-{2976231,3900715,3901675,0.47274375,0.47274375},
-{2976232,3900922,3901857,0.543555555555555,0.543555555555555},
-{2976233,3901190,3902219,0.714685714285714,0.714685714285714},
-{2976234,3901405,3902434,0.555111111111111,0.555111111111111},
-{2976235,3901614,3902667,0.553511111111111,0.553511111111111},
-{2976236,3901834,3902887,0.479032258064516,0.479032258064516},
-{2976237,3902181,3903175,0.718885714285714,0.718885714285714},
-{2976238,3902725,3903661,0.529735714285714,-1},
-{2976239,3902946,3903864,0.59652,0.59652},
-{2976240,3903140,3904101,0.448909090909091,0.448909090909091},
-{2976241,3903396,3904365,0.516372413793104,0.483058064516129},
-{2976242,3899325,3899550,0.183409090909091,0.175434782608696},
-{2976243,3899550,3899641,0.0649,0.0458117647058824},
-{2976244,3899641,3899736,0.0546413793103448,0.039615},
-{2976245,3899736,3899848,0.0590785714285714,0.041355},
-{2976246,3899848,3899952,0.0624923076923077,0.0439135135135135},
-{2976247,3899952,3900084,0.096325,0.0660514285714286},
-{2976248,3900084,3900176,0.0383142857142857,0.0298},
-{2976249,3900176,3900349,0.116328,0.09694},
-{2976250,3900349,3900522,0.148090909090909,0.120666666666667},
-{2976251,3900522,3900715,0.16842,0.129553846153846},
-{2976252,3900715,3900922,0.132761538461538,0.127844444444444},
-{2976253,3900922,3901009,0.065256,0.065256},
-{2976254,3901009,3901190,0.12845,0.1101},
-{2976255,3901190,3901405,0.148063636363636,0.135725},
-{2976256,3901405,3901614,0.1344,0.16128},
-{2976257,3901614,3901834,0.154747826086957,0.161781818181818},
-{2976258,3901834,3902181,0.20195,0.20195},
-{2976259,3902181,3902456,0.238764705882353,0.193285714285714},
-{2976260,3902456,3902725,0.167321739130435,0.202547368421053},
-{2976261,3902725,3902946,0.16653,0.144808695652174},
-{2976262,3902946,3903140,0.152771428571429,0.128328},
-{2976263,3903140,3903396,0.152330769230769,0.146688888888889},
-{2976264,3898718,3899641,0.73293,0.73293},
-{2976265,3898925,3899848,0.545622222222222,0.545622222222222},
-{2976266,3899190,3900084,1.8264,1.8264},
-{2976267,3899434,3900349,0.543755555555556,0.543755555555556},
-{2976268,3899605,3900522,0.96924,0.96924},
-{2976269,3899820,3900715,0.907125,0.907125},
-{2976270,3900134,3901009,0.541911111111111,0.541911111111111},
-{2976271,3900340,3901190,1.2101,0.500731034482759},
-{2976272,3900525,3901405,0.537044444444444,0.537044444444444},
-{2976273,3900714,3901614,0.96944,0.96944},
-{2976274,3901177,3902181,0.637486956521739,0.637486956521739},
-{2976275,3898018,3898562,0.312046153846154,0.507075},
-{2976276,3898562,3898866,0.247326315789474,0.2937},
-{2976277,3899010,3899315,0.272329411764706,0.272329411764706},
-{2976278,3898562,3899010,0.2706,0.2706},
-{2976279,3897701,3898243,0.386514285714286,0.386514285714286},
-{2976280,3898243,3898707,0.271022222222222,0.271022222222222},
-{2976281,3898243,3898562,0.216027272727273,0.198025},
-{2976282,3897870,3898243,0.266747368421053,0.22035652173913},
-{2976283,3898707,3899010,0.175266666666667,0.175266666666667},
-{2976284,3898386,3898707,0.265042105263158,0.265042105263158},
-{2976285,3896899,3897667,0.467022222222222,0.467022222222222},
-{2976286,3896653,3896899,0.205745454545455,0.266258823529412},
-{2976287,3897120,3897870,1.14081818181818,1.14081818181818},
-{2976288,3897338,3898129,0.464355555555556,0.464355555555556},
-{2976289,3897544,3898386,0.467644444444444,0.467644444444444},
-{2976290,3896899,3897120,0.163609090909091,0.17997},
-{2976291,3897120,3897198,0.0594,0.0803647058823529},
-{2976292,3897198,3897338,0.112771428571429,0.124642105263158},
-{2976293,3897338,3897544,0.23992,0.23992},
-{2976294,3896838,3897198,0.296033333333333,0.296033333333333},
-{2976295,3896577,3896838,0.205527272727273,0.265976470588235},
-{2976296,3896838,3897245,0.291807692307692,0.281},
-{2976297,3897245,3897544,0.332672727272727,0.457425},
-{2976298,3897245,3897429,0.1272,0.122307692307692},
-{2976299,3897429,3897674,0.26496,0.19872},
-{2976300,3897674,3898172,0.519471428571429,0.519471428571429},
-{2976301,3898172,3898655,0.32715652173913,0.300984},
-{2976302,3898655,3899605,0.8149,0.97788},
-{2976303,3899006,3899923,0.535555555555556,-1},
-{2976304,3899301,3900230,1.1993,1.1993},
-{2976305,3899516,3900436,0.531022222222222,0.531022222222222},
-{2976306,3899747,3900638,0.89415,0.89415},
-{2976307,3900941,3901886,0.515421428571429,0.515421428571429},
-{2976308,3903885,3904341,0.249911111111111,0.249911111111111},
-{2976309,3904813,3904341,0.35904,0.398933333333333},
-{2976310,3904813,3904798,0.407368421052632,0.407368421052632},
-{2976311,3904341,3904044,0.286566666666667,0.286566666666667},
-{2976312,3904798,3904044,0.363417391304348,0.363417391304348},
-{2976313,3905394,3904798,0.363442105263158,0.363442105263158},
-{2976314,3905432,3905395,0.343244444444444,0.343244444444444},
-{2976315,3905395,3905290,0.0493333333333333,0.0444},
-{2976316,3905395,3905497,0.04342,0.0566347826086957},
-{2976317,3905497,3905567,0.0710285714285714,0.0552444444444444},
-{2976318,3905567,3905508,0.0619909090909091,0.056825},
-{2976319,3904798,3904777,0.1146,0.1146},
-{2976320,3904777,3905187,0.333536842105263,0.333536842105263},
-{2976321,3906054,3905294,0.388685714285714,0.388685714285714},
-{2976322,3905294,3905187,0.0837666666666667,0.10052},
-{2976323,3905187,3904625,0.234244444444444,0.234244444444444},
-{2976324,3905588,3906002,0.357566666666667,0.357566666666667},
-{2976325,3906424,3906002,0.5666,0.5666},
-{2976326,3906466,3905567,0.355564285714286,0.414825},
-{2976327,3906459,3906466,0.250044444444444,0.250044444444444},
-{2976328,3906466,3906464,0.253733333333333,0.253733333333333},
-{2976329,3907067,3906466,0.277990909090909,0.291228571428571},
-{2976330,3907676,3907067,-1,0.221155555555556},
-{2976331,3908839,3909278,0.236955555555556,0.236955555555556},
-{2976332,3908530,3907841,0.328044444444444,0.305420689655172},
-{2976333,3907841,3907389,0.290236363636364,0.277617391304348},
-{2976334,3907389,3906970,0.224347826086957,0.198461538461538},
-{2976335,3907389,3907836,0.241688888888889,0.241688888888889},
-{2976336,3907836,3908262,0.217355555555556,0.217355555555556},
-{2976337,3907749,3906875,0.365511111111111,0.365511111111111},
-{2976338,3908262,3907749,0.530907692307692,0.313718181818182},
-{2976339,3908789,3908262,0.277175,0.302372727272727},
-{2976340,3908853,3909267,0.220488888888889,0.220488888888889},
-{2976341,3909211,3909667,0.243466666666667,0.243466666666667},
-{2976342,3909267,3908789,0.274925,0.274925},
-{2976343,3909815,3910292,0.221022222222222,0.221022222222222},
-{2976344,3911265,3910786,0.226328571428571,0.234711111111111},
-{2976345,3910786,3910292,0.236244444444444,0.303742857142857},
-{2976346,3910292,3909735,0.261253846153846,0.283025},
-{2976347,3909735,3909267,0.196011428571429,0.254088888888889},
-{2976348,3911202,3910178,0.630628571428571,0.630628571428571},
-{2976349,3910178,3909182,0.617072727272727,-1},
-{2976350,3909182,3908168,0.4958,0.582026086956522},
-{2976351,3906002,3906420,0.4333125,0.4333125},
-{2976352,3906854,3906420,0.366821052631579,0.366821052631579},
-{2976353,3906964,3906899,0.2556,0.285092307692308},
-{2976354,3907337,3906899,0.22632,0.22632},
-{2976355,3906899,3906875,0.166938461538462,0.166938461538462},
-{2976356,3908530,3909011,0.44036,0.44036},
-{2976357,3912104,3911202,0.5772,0.5772},
-{2976358,3912827,3911783,0.488822222222222,0.41244375},
-{2976359,3913875,3912827,0.3980625,0.4246},
-{2976360,3914572,3913875,-1,-1},
-{2976361,3914572,3914188,-1,-1},
-{2976362,3914572,3914892,-1,-1},
-{2976363,3914572,3914884,-1,-1},
-{2976364,3914653,3913729,0.465422222222222,0.465422222222222},
-{2976365,3915499,3914653,0.49926,-1},
-{2976366,3914957,3914168,0.5238,0.5238},
-{2976367,3915818,3914957,-1,0.514137931034483},
-{2976368,3915250,3914528,0.532725,0.532725},
-{2976369,3916145,3915250,0.668918181818182,-1},
-{2976370,3916931,3916615,0.200066666666667,0.200066666666667},
-{2976371,3916970,3917279,0.200866666666667,0.200866666666667},
-{2976372,3918284,3917383,0.6043,0.517971428571429},
-{2976373,3921982,3921696,-1,0.300485714285714},
-{2976374,3921696,3921967,0.19881,0.19881},
-{2976375,3921967,3922971,0.575044444444444,0.419627027027027},
-{2976379,3921696,3921329,0.241,0.241},
-{2976380,3921329,3921644,0.147733333333333,0.147733333333333},
-{2976381,3921329,3921034,0.216688888888889,0.216688888888889},
-{2976382,3921034,3921330,0.149422222222222,0.149422222222222},
-{2976383,3896385,3896838,0.386791304347826,0.370675},
-{2976384,3896966,3897245,0.22371,0.213057142857143},
-{2976385,3896102,3895930,0.151928571428571,0.193363636363636},
-{2976386,3896102,3896088,0.50301,0.50301},
-{2976387,3897373,3897476,0.10098,0.0748},
-{2976388,3896798,3896807,0.0625555555555556,0.0625555555555556},
-{2976389,3896959,3896798,0.1274625,0.0971142857142857},
-{2976390,3897166,3897373,0.48168,0.8028},
-{2976391,3897429,3897884,0.35184,0.2932},
-{2976392,3897674,3897983,0.203739130434783,0.203739130434783},
-{2976393,3898172,3898471,0.167711111111111,0.167711111111111},
-{2976394,3897983,3898471,0.261266666666667,0.261266666666667},
-{2976395,3897983,3898234,0.167863636363636,0.167863636363636},
-{2976396,3900895,3901834,0.49062,0.73593},
-{2976397,3899997,3900895,0.577896,0.72237},
-{2976398,3898471,3898714,0.1454,0.1454},
-{2976399,3898234,3898714,0.268733333333333,0.268733333333333},
-{2976400,3898714,3898904,0.111422222222222,0.111422222222222},
-{2976401,3898444,3898904,0.266533333333333,0.266533333333333},
-{2976402,3898904,3899388,0.375,0.375},
-{2976403,3901709,3902725,0.8126,1.46268},
-{2976404,3901920,3902946,0.6645,0.6645},
-{2976405,3903665,3904654,0.575676923076923,0.575676923076923},
-{2976406,3903396,3903665,0.16448,0.197376},
-{2976407,3903665,3903919,0.1373,0.152555555555556},
-{2976408,3903919,3904925,0.553755555555555,0.553755555555555},
-{2976409,3910815,3909706,0.416029411764706,0.589375},
-{2976410,3911257,3910107,0.579312,0.689657142857143},
-{2976411,3907847,3908692,0.477573913043478,0.477573913043478},
-{2976412,3909004,3909148,0.10269,0.0933545454545454},
-{2976413,3908692,3909004,0.137979310344828,0.142907142857143},
-{2976414,3906795,3907549,-1,-1},
-{2976415,3907549,3908352,0.400244444444445,0.400244444444445},
-{2976416,3908352,3908692,0.146442857142857,0.132270967741935},
-{2976417,3909745,3909953,0.132433333333333,0.19865},
-{2976418,3909004,3909745,0.53352,0.53352},
-{2976419,3906245,3906782,0.316511111111111,0.356075},
-{2976420,3906962,3907122,0.0711642857142857,0.0711642857142857},
-{2976421,3905999,3906635,0.6074,0.45555},
-{2976422,3906635,3906962,0.178434782608696,0.178434782608696},
-{2976423,3911783,3910815,0.5644,0.467089655172414},
-{2976424,3912199,3911257,0.535656,0.582234782608696},
-{2976425,3913729,3912649,0.579365217391304,0.579365217391304},
-{2976426,3912649,3911621,0.541632,0.541632},
-{2976427,3911621,3910600,0.593025,0.593025},
-{2976428,3914168,3913120,0.606109090909091,0.606109090909091},
-{2976429,3913120,3911998,0.5868,0.5868},
-{2976430,3911998,3910992,0.71808,0.574464},
-{2976431,3914528,3913529,0.489,0.507807692307692},
-{2976432,3913529,3912422,0.614945454545455,0.541152},
-{2976433,3912422,3911363,0.532688888888889,0.532688888888889},
-{2976434,3915439,3914701,0.487777777777778,0.487777777777778},
-{2976435,3914701,3914021,0.356777777777778,0.356777777777778},
-{2976436,3914021,3913703,0.1941,0.1941},
-{2976437,3915747,3914997,0.424451612903226,0.424451612903226},
-{2976438,3914997,3914145,0.611181818181818,0.517153846153846},
-{2976439,3916206,3915439,0.472688888888889,0.472688888888889},
-{2976440,3917383,3916515,0.620375,0.620375},
-{2976441,3916515,3915747,0.553486956521739,0.553486956521739},
-{2976442,3913703,3912557,0.835694117647059,0.835694117647059},
-{2976443,3914145,3913016,0.5292,0.5292},
-{2976444,3908692,3909482,0.453525,0.453525},
-{2976445,3909745,3910681,0.521971428571429,0.521971428571429},
-{2976446,3908048,3908352,0.153155555555556,0.159046153846154},
-{2976447,3908352,3909165,0.388135714285714,0.388135714285714},
-{2976448,3909482,3909745,0.152838461538462,0.209147368421053},
-{2976449,3909165,3909482,0.155711111111111,0.175175},
-{2976450,3908862,3909165,0.17115,0.164304},
-{2976451,3909482,3910284,0.494918181818182,0.494918181818182},
-{2976452,3909165,3909952,0.4102,0.4102},
-{2976453,3918315,3918611,0.215592,0.26949},
-{2976454,3918611,3918929,0.17398064516129,0.16854375},
-{2976455,3918611,3918048,0.823909090909091,0.6042},
-{2976456,3918929,3918398,0.338066666666667,0.338066666666667},
-{2976457,3917016,3917346,0.241513043478261,0.326752941176471},
-{2976458,3918048,3917346,0.457823076923077,0.425121428571429},
-{2976459,3918398,3917676,0.798171428571429,0.798171428571429},
-{2976460,3917346,3917676,0.283547368421053,0.224475},
-{2976461,3917346,3917055,0.1942,0.1942},
-{2976462,3917676,3917382,0.193622222222222,0.193622222222222},
-{2976463,3918702,3918043,0.582866666666667,0.45615652173913},
-{2976464,3917676,3918043,0.244527272727273,0.244527272727273},
-{2976465,3918043,3918447,0.215232,0.233947826086957},
-{2976466,3919012,3918447,0.4092,0.392832},
-{2976467,3916594,3916900,0.206044444444444,0.252872727272727},
-{2976468,3916900,3917210,0.203111111111111,0.249272727272727},
-{2976469,3917210,3917501,0.199546153846154,0.216175},
-{2976470,3918043,3917501,0.5064,0.5064},
-{2976471,3916900,3916398,0.303066666666667,0.303066666666667},
-{2976472,3918929,3919222,0.16910625,0.16910625},
-{2976473,3919222,3919575,0.191614285714286,0.185006896551724},
-{2976474,3919575,3919787,0.2652,-1},
-{2976475,3919222,3918702,0.336444444444444,0.336444444444444},
-{2976476,3919575,3919012,0.579675,0.579675},
-{2976477,3918447,3918794,0.244145454545455,0.214848},
-{2976478,3918794,3918872,0.0644666666666667,0.046416},
-{2976479,3917210,3916749,0.740836363636364,0.740836363636364},
-{2976480,3917501,3917042,0.300644444444444,0.300644444444444},
-{2976481,3917501,3917819,0.191892857142857,0.26865},
-{2976482,3918447,3917819,0.32208,0.32208},
-{2976483,3918794,3918140,0.392377777777778,0.392377777777778},
-{2976484,3917819,3918140,0.17041875,0.302966666666667},
-{2976485,3918140,3918314,0.124636363636364,0.210923076923077},
-{2976486,3917819,3917348,0.328056,0.328056},
-{2976487,3916749,3916485,0.1308375,0.1308375},
-{2976488,3916485,3916226,0.162955555555556,0.162955555555556},
-{2976489,3921330,3921913,0.311088,0.235672727272727},
-{2976490,3921913,3922038,0.0687777777777778,0.0422045454545455},
-{2976491,3922038,3922384,0.215321739130435,0.126984615384615},
-{2976492,3922384,3922531,0.0783,0.0727071428571429},
-{2976497,3922384,3921881,0.490147826086956,0.256213636363636},
-{2976498,3921881,3921743,0.0970181818181818,0.0604075471698113},
-{2976499,3921743,3921531,0.13472,0.080832},
-{2976500,3922638,3922006,0.532066666666667,0.532066666666667},
-{2976501,3921743,3922006,0.1434,0.1434},
-{2976502,3921531,3921822,0.173582608695652,0.210126315789474},
-{2976503,3922006,3921822,0.243847058823529,0.243847058823529},
-{2976507,3922459,3922181,0.233488888888889,0.233488888888889},
-{2976508,3921822,3922181,0.20655,0.198288},
-{2976509,3921034,3920759,0.2098,0.2098},
-{2976510,3920759,3920479,0.217911111111111,0.217911111111111},
-{2976511,3920479,3920100,0.264711111111111,0.264711111111111},
-{2976512,3920759,3921019,0.148955555555556,0.148955555555556},
-{2976513,3920479,3920722,0.141533333333333,0.141533333333333},
-{2976514,3920100,3920382,0.140911111111111,0.140911111111111},
-{2976521,3922181,3922747,0.333830769230769,0.299296551724138},
-{2976522,3922181,3921958,0.191330769230769,0.191330769230769},
-{2976523,3921958,3921699,0.271114285714286,0.271114285714286},
-{2976524,3921958,3922252,0.149288888888889,0.149288888888889},
-{2976529,3921531,3921188,0.2239125,0.174760975609756},
-{2976530,3921188,3921041,0.132488888888889,0.0941368421052632},
-{2976531,3921041,3920820,0.226129411764706,0.142377777777778},
-{2976532,3921822,3921309,0.393333333333333,0.393333333333333},
-{2976533,3921041,3921309,0.155725,0.18687},
-{2976534,3921309,3921699,0.15615,0.16656},
-{2976535,3894597,3894633,0.0879103448275862,0.09105},
-{2976536,3895288,3895259,0.218256,0.341025},
-{2976537,3895084,3895359,0.202885714285714,0.21303},
-{2976538,3895359,3895735,0.291342857142857,0.2266},
-{2976539,3896027,3895887,-1,-1},
-{2976540,3895887,3896012,0.184511111111111,0.184511111111111},
-{2976541,3895887,3895833,0.159777777777778,0.159777777777778},
-{2976542,3895383,3895427,0.225888888888889,0.225888888888889},
-{2976543,3895518,3895383,0.0737555555555555,0.0737555555555555},
-{2976544,3895099,3895383,0.145844444444444,0.145844444444444},
-{2976545,3895722,3895938,-1,-1},
-{2976546,3895938,3895941,0.236933333333333,0.236933333333333},
-{2976547,3895308,3895809,0.294984,0.294984},
-{2976548,3896588,3896767,0.2237,0.2237},
-{2976549,3897432,3897626,0.182125,0.257117647058824},
-{2976550,3897626,3897379,0.284723076923077,0.284723076923077},
-{2976551,3898741,3899676,0.643121739130435,0.643121739130435},
-{2976552,3897834,3898569,0.453742857142857,0.433118181818182},
-{2976553,3898088,3898816,0.51761052631579,-1},
-{2976554,3899083,3899997,0.61355,0.7012},
-{2976555,3899382,3900353,0.783284210526316,0.875435294117647},
-{2976556,3899045,3898848,0.114555555555556,0.114555555555556},
-{2976557,3899132,3899965,0.494060869565217,0.494060869565217},
-{2976558,3899866,3900750,0.659345454545454,0.659345454545454},
-{2976559,3900122,3900996,0.537266666666667,0.537266666666667},
-{2976560,3899399,3900303,0.449538461538462,0.46752},
-{2976561,3900374,3901254,1.46256,-1},
-{2976562,3900541,3901482,0.583464,0.583464},
-{2976563,3900793,3901701,0.526511111111111,0.526511111111111},
-{2976564,3899846,3900793,0.581590909090909,0.556304347826087},
-{2976565,3900311,3901177,0.537066666666667,0.537066666666667},
-{2976566,3900898,3901105,0.176563636363636,0.2988},
-{2976567,3901084,3901326,-1,-1},
-{2976568,3901450,3901420,-1,0.541309090909091},
-{2976569,3900548,3901043,0.239475,-1},
-{2976570,3901326,3901420,0.104657142857143,0.104657142857143},
-{2976571,3901105,3901043,0.125727272727273,0.0864375},
-{2976572,3901043,3901391,0.416485714285714,-1},
-{2976573,3901111,3901391,-1,0.2762},
-{2976574,3901391,3901513,0.0767111111111111,0.0767111111111111},
-{2976575,3901799,3901420,0.3613875,-1},
-{2976576,3901799,3902067,-1,0.173425},
-{2976577,3901391,3901799,-1,-1},
-{2976578,3901513,3901655,0.0796444444444444,0.0796444444444444},
-{2976579,3901799,3901917,0.0694444444444444,0.0694444444444444},
-{2976580,3901917,3902090,0.0895777777777778,0.0895777777777778},
-{2976581,3902710,3902996,0.203628571428571,0.185921739130435},
-{2976582,3902285,3902710,0.175976470588235,0.161708108108108},
-{2976583,3901992,3902285,0.178475,0.186234782608696},
-{2976584,3902154,3903140,1.4718,1.4718},
-{2976585,3902410,3903396,1.12029230769231,1.12029230769231},
-{2976586,3902738,3903665,0.543444444444445,1.22275},
-{2976587,3902996,3903919,0.59328,0.570461538461538},
-{2976588,3901369,3901992,0.384792,0.310316129032258},
-{2976589,3901021,3901369,0.218060869565217,0.227972727272727},
-{2976590,3903919,3904193,0.134742857142857,0.150912},
-{2976591,3904193,3904483,0.22995,0.219},
-{2976592,3903257,3904193,-1,0.505241379310345},
-{2976593,3902582,3903307,-1,0.321051428571429},
-{2976594,3902338,3902582,-1,0.120288888888889},
-{2976595,3902582,3902805,0.209894117647059,0.209894117647059},
-{2976596,3901369,3901557,0.116232,0.116232},
-{2976597,3901557,3901881,0.211176,0.211176},
-{2976598,3901557,3901798,0.136688888888889,0.136688888888889},
-{2976599,3902805,3903314,0.333666666666667,0.391695652173913},
-{2976600,3903314,3904244,0.529022222222222,0.751768421052632},
-{2976601,3898318,3898457,0.136366666666667,0.12918947368421},
-{2976602,3896306,3896871,-1,-1},
-{2976603,3904193,3905149,0.553022222222222,0.553022222222222},
-{2976604,3904552,3904758,0.15786,0.1754},
-{2976605,3904758,3904939,0.128672727272727,0.113232},
-{2976606,3904043,3904939,-1,0.548832},
-{2976607,3904939,3905281,0.308873684210526,0.308873684210526},
-{2976608,3904415,3905281,0.578175,0.578175},
-{2976609,3904703,3905024,0.226657142857143,0.226657142857143},
-{2976610,3905713,3906391,0.4362,0.419423076923077},
-{2976611,3906155,3906391,0.155808,0.19476},
-{2976612,3904758,3905622,0.506644444444444,0.506644444444444},
-{2976613,3904939,3905814,0.5136,0.5136},
-{2976614,3905281,3906193,0.507222222222222,0.507222222222222},
-{2976615,3905560,3906439,0.45262,0.45262},
-{2976616,3905281,3905560,0.22032,0.22032},
-{2976617,3905024,3905560,0.476336842105263,0.476336842105263},
-{2976618,3905024,3905304,0.177222222222222,0.177222222222222},
-{2976619,3905560,3905920,0.307094117647059,0.307094117647059},
-{2976620,3905304,3905920,0.282075,0.282075},
-{2976621,3905030,3905304,0.191353846153846,0.226145454545455},
-{2976622,3905920,3906226,0.2433,0.2433},
-{2976623,3906226,3906350,0.0759333333333333,0.0759333333333333},
-{2976624,3906109,3906350,0.209115789473684,0.128167741935484},
-{2976625,3905861,3906109,0.148266666666667,0.148266666666667},
-{2976626,3905434,3905861,0.243288,0.217221428571429},
-{2976627,3906391,3907125,0.6820875,0.496063636363636},
-{2976628,3906391,3906635,0.20517,0.186518181818182},
-{2976629,3906635,3907420,0.4536,0.351174193548387},
-{2976630,3907122,3907725,0.310628571428571,0.347904},
-{2976631,3907725,3908048,0.17015,0.145842857142857},
-{2976632,3907420,3907725,0.151022222222222,0.151022222222222},
-{2976633,3907125,3907420,0.152022222222222,0.157869230769231},
-{2976634,3906830,3907125,0.155123076923077,0.16805},
-{2976635,3905920,3906779,0.4201125,0.480128571428571},
-{2976636,3906226,3907136,0.493088888888889,0.493088888888889},
-{2976637,3906901,3907273,0.211968,0.203815384615385},
-{2976638,3906620,3906901,0.134678571428571,0.101918918918919},
-{2976639,3906350,3906620,0.18065,0.154842857142857},
-{2976640,3907125,3907897,0.401266666666667,0.492463636363636},
-{2976641,3907420,3908219,0.388971428571429,0.388971428571429},
-{2976642,3907725,3908546,0.404377777777778,0.404377777777778},
-{2976643,3908546,3908862,0.163872,0.157569230769231},
-{2976644,3908219,3908546,0.175591304347826,0.155330769230769},
-{2976645,3907897,3908219,0.187527272727273,0.1719},
-{2976646,3907596,3907897,0.180027272727273,0.1886},
-{2976647,3908546,3909347,0.409377777777778,0.409377777777778},
-{2976648,3908219,3909051,0.381041379310345,0.381041379310345},
-{2976649,3907897,3908750,0.426092307692308,0.481669565217391},
-{2976650,3906901,3907970,0.547533333333333,0.547533333333333},
-{2976651,3906620,3907647,0.544888888888889,0.544888888888889},
-{2976652,3906350,3907365,0.556377777777778,0.556377777777778},
-{2976653,3907970,3908283,0.161266666666667,0.161266666666667},
-{2976654,3908283,3908725,0.26448,0.240436363636364},
-{2976655,3906109,3907032,0.542466666666667,0.542466666666667},
-{2976656,3905861,3906727,0.539355555555556,0.539355555555556},
-{2976657,3907647,3907987,0.208828571428571,0.208828571428571},
-{2976658,3906727,3907033,0.2622,0.247633333333333},
-{2976659,3907987,3908283,0.160272,0.174208695652174},
-{2976660,3907675,3907987,0.142220689655172,0.158630769230769},
-{2976661,3907390,3907675,0.151546153846154,0.171313043478261},
-{2976662,3907033,3907390,0.1896,0.156910344827586},
-{2976663,3908283,3909023,0.365066666666667,0.365066666666667},
-{2976664,3907987,3908720,0.364466666666667,0.364466666666667},
-{2976665,3907675,3908363,1.38282857142857,1.38282857142857},
-{2976666,3909023,3909420,0.254228571428571,0.254228571428571},
-{2976667,3908720,3909023,0.169675,0.169675},
-{2976668,3908363,3908720,0.187017391304348,0.187017391304348},
-{2976669,3908720,3909433,0.370733333333333,0.370733333333333},
-{2976670,3909023,3909712,0.366755555555556,0.366755555555556},
-{2976671,3909098,3909638,0.293133333333333,0.293133333333333},
-{2976672,3909098,3909524,0.249511111111111,0.249511111111111},
-{2976673,3909638,3909910,0.143822222222222,0.143822222222222},
-{2976674,3909635,3909910,0.19737,0.179427272727273},
-{2976675,3910284,3910616,0.208957894736842,0.208957894736842},
-{2976676,3910729,3911034,0.148846153846154,0.175909090909091},
-{2976677,3909910,3910252,0.174417391304348,0.174417391304348},
-{2976678,3910252,3910616,0.194536363636364,0.194536363636364},
-{2976679,3910616,3911034,0.205088888888889,0.205088888888889},
-{2976680,3909638,3910063,0.263977777777778,0.263977777777778},
-{2976681,3909222,3909524,0.20445,0.20445},
-{2976682,3909524,3910063,0.273,0.273},
-{2976683,3909910,3910824,0.495260869565217,0.35596875},
-{2976684,3910252,3911112,0.401066666666667,0.401066666666667},
-{2976685,3910616,3911402,0.6203,0.6203},
-{2976686,3910824,3911112,0.12075,0.1288},
-{2976687,3911112,3911402,0.0960878048780488,0.119381818181818},
-{2976688,3911587,3911580,0.257710344827586,0.257710344827586},
-{2976689,3911580,3912357,0.33744375,0.830630769230769},
-{2976690,3911580,3911455,0.247129411764706,0.247129411764706},
-{2976691,3911455,3911370,0.153987096774194,0.153987096774194},
-{2976692,3911455,3912052,0.319155555555556,0.319155555555556},
-{2976693,3911370,3911778,0.2164,0.2164},
-{2976694,3913016,3912447,0.32388,0.32388},
-{2976695,3914381,3914722,0.197355555555556,0.197355555555556},
-{2976696,3913795,3913966,0.0993714285714286,0.0907304347826087},
-{2976697,3912447,3912954,0.443446153846154,0.443446153846154},
-{2976698,3914787,3914381,0.349266666666667,0.392925},
-{2976699,3914722,3914335,0.210488888888889,0.210488888888889},
-{2976700,3913966,3913374,0.425611764705882,0.344542857142857},
-{2976701,3913966,3914207,0.13005,0.13005},
-{2976702,3914335,3914207,0.0702666666666667,0.0702666666666667},
-{2976703,3914207,3914529,0.175269230769231,0.1519},
-{2976704,3914529,3914843,0.211617391304348,0.2028},
-{2976705,3914722,3914980,0.169466666666667,0.169466666666667},
-{2976706,3914980,3914529,0.445658823529412,0.3294},
-{2976707,3915307,3914980,0.3132,0.261},
-{2976708,3915607,3914843,0.478928571428571,0.478928571428571},
-{2976709,3914843,3914465,0.277314285714286,0.200813793103448},
-{2976710,3913374,3914465,0.474461538461538,0.474461538461538},
-{2976711,3911844,3912704,0.401688888888889,0.401688888888889},
-{2976712,3912103,3913079,0.423288888888889,0.423288888888889},
-{2976713,3912353,3913396,1.02765,0.493272},
-{2976714,3912682,3913777,0.484222222222222,0.484222222222222},
-{2976715,3912052,3912353,0.163225,0.163225},
-{2976716,3911778,3912052,0.138688888888889,0.138688888888889},
-{2976717,3912052,3912671,0.294022222222222,0.294022222222222},
-{2976718,3911778,3912329,0.278866666666667,0.278866666666667},
-{2976719,3916229,3915449,0.486488888888889,0.486488888888889},
-{2977132,3896234,3895226,0.475156097560976,0.572982352941176},
-{2977133,3896234,3895988,0.187145454545455,-1},
-{2977148,3899326,3899037,0.147537931034483,0.164561538461538},
-{2977149,3899587,3899326,0.163152,0.145671428571429},
-{2977150,3899686,3899587,0.073,0.0589615384615385},
-{2977151,3900069,3899686,0.250718181818182,0.204288888888889},
-{2977153,3899289,3899706,0.47596,0.310408695652174},
-{2977155,3899587,3899706,0.101621052631579,0.09654},
-{2977156,3899706,3900323,0.439114285714286,0.439114285714286},
-{2977157,3899706,3900069,0.358023529411765,0.338133333333333},
-{2977158,3900069,3900664,0.46338,0.487768421052632},
-{2977160,3902463,3901734,0.479018181818182,0.390311111111111},
-{2977162,3898921,3899326,0.404485714285714,0.2574},
-{2977163,3899208,3898921,0.229010526315789,0.2072},
-{2977164,3899208,3899587,0.207642857142857,0.223615384615385},
-{2977165,3899686,3899680,0.08896,0.116034782608696},
-{2977166,3899691,3899680,0.23328,0.208285714285714},
-{2977167,3900269,3899680,0.316,0.316},
-{2977168,3898920,3899208,0.163823076923077,0.163823076923077},
-{2977169,3899439,3898920,0.853466666666667,0.853466666666667},
-{2977170,3899691,3899439,0.140866666666667,0.152136},
-{2977171,3899439,3899214,0.151226086956522,0.1581},
-{2977172,3899911,3899691,0.170345454545455,0.15615},
-{2977173,3900963,3900592,0.385835294117647,-1},
-{2977178,3898921,3898398,0.5451,0.346881818181818},
-{2977179,3898249,3898921,0.4389,0.4389},
-{2977180,3897693,3898249,0.4178,0.358114285714286},
-{2977181,3898559,3898920,0.207384,0.192022222222222},
-{2977184,3903356,3902463,0.517984615384615,0.517984615384615},
-{2977194,3905502,3905056,0.294688888888889,0.294688888888889},
-{2977195,3904397,3905075,0.366377777777778,0.366377777777778},
-{2977199,3906044,3905891,0.240911111111111,0.240911111111111},
-{2977267,3894795,3894171,-1,0.4114},
-{2977268,3895336,3894795,-1,0.485808},
-{2977269,3894795,3895103,0.3888,0.416571428571429},
-{2977270,3896594,3897215,-1,0.414485714285714},
-{2977271,3896109,3896594,-1,0.4338},
-{2977272,3895625,3895433,0.146066666666667,0.146066666666667},
-{2977273,3897675,3897991,0.29988,-1},
-{2977274,3897335,3897675,0.26625,-1},
-{2977275,3898514,3897675,0.488925,0.510182608695652},
-{2977276,3899323,3898854,0.34494,0.34494},
-{2977277,3898932,3898514,0.314154545454545,0.300495652173913},
-{2977278,3899454,3898932,0.294728571428571,0.2578875},
-{2977279,3898715,3898285,0.287225,0.287225},
-{2977280,3899228,3898715,1.62408,0.624646153846154},
-{2977281,3899412,3899606,0.140904,0.135484615384615},
-{2977282,3899606,3900141,0.278192307692308,0.267888888888889},
-{2977283,3900141,3899911,0.17105,0.17105},
-{2977284,3900495,3900141,0.1668,0.160384615384615},
-{2977285,3900495,3900963,0.312168,0.289044444444444},
-{2977286,3899670,3899606,0.193936363636364,0.147124137931034},
-{2977287,3900589,3900495,0.0769384615384615,0.0740888888888889},
-{2977288,3900753,3900589,0.109177777777778,0.105278571428571},
-{2977289,3900144,3900589,0.278448,0.267738461538462},
-{2977290,3899774,3900144,0.229636363636364,0.229636363636364},
-{2977291,3900144,3900546,0.343768421052632,0.296890909090909},
-{2977292,3899774,3899670,0.0837272727272727,0.07368},
-{2977293,3900154,3899774,0.292581818181818,0.279860869565217},
-{2977294,3900279,3900546,0.190278260869565,0.18235},
-{2977295,3900154,3900279,0.0808909090909091,0.071184},
-{2977296,3899454,3900154,-1,-1},
-{2977297,3899228,3899454,0.153542857142857,0.16122},
-{2977298,3898932,3899323,0.201755555555556,0.18158},
-{2977299,3898715,3898932,0.142486956521739,0.131088},
-{2977300,3898503,3898715,0.177633333333333,0.21316},
-{2977301,3898423,3897856,0.34335,0.2289},
-{2977302,3901301,3900963,0.200844444444444,-1},
-{2977303,3901301,3901487,0.11415652173913,0.11415652173913},
-{2977304,3900753,3901301,0.343121739130435,0.328825},
-{2977305,3901461,3901257,0.126225,0.1377},
-{2977306,3901729,3901461,0.243564705882353,0.295757142857143},
-{2977307,3900546,3900725,0.141757894736842,0.128257142857143},
-{2977308,3900725,3901461,0.462954545454546,0.7275},
-{2977309,3899817,3899454,0.31587,0.263225},
-{2977310,3900279,3900684,-1,-1},
-{2977311,3898343,3898559,0.115155555555556,0.115155555555556},
-{2977312,3901487,3901730,-1,0.168425},
-{2977313,3901257,3901730,0.236871428571429,0.236871428571429},
-{2977314,3901730,3901897,0.112822222222222,0.112822222222222},
-{2977315,3904022,3903356,0.488454545454545,0.488454545454545},
-{2977316,3902864,3903928,0.646357894736842,0.646357894736842},
-{2977317,3903928,3904022,0.09075,0.08712},
-{2977318,3903846,3903928,0.10728,0.0957857142857143},
-{2977319,3903568,3903846,0.2444,0.279314285714286},
-{2977320,3904117,3903846,0.1104,0.123648},
-{2977321,3904638,3904117,0.219716129032258,0.34056},
-{2977322,3904232,3904117,-1,-1},
-{2977323,3902439,3901729,0.312688235294118,0.279773684210526},
-{2977324,3903263,3902439,0.334894736842105,0.343945945945946},
-{2977325,3904773,3905110,0.35096,0.277073684210526},
-{2977326,3905509,3905110,0.238056,0.270518181818182},
-{2977327,3906066,3905509,0.2488,0.257379310344828},
-{2977329,3905143,3904773,0.194828571428571,0.2273},
-{2977330,3905143,3905509,0.218088888888889,0.218088888888889},
-{2977331,3905526,3905143,0.2187375,0.2187375},
-{2977332,3905663,3905825,-1,-1},
-{2977428,3896741,3896109,-1,0.541275},
-{2977429,3896741,3897235,0.36909,-1},
-{2977430,3896175,3896741,0.338644444444444,-1},
-{2977431,3897181,3896741,-1,0.33835},
-{2977432,3898266,3897881,0.438284210526316,-1},
-{2977433,3897617,3897644,-1,0.312525},
-{2977434,3897617,3898266,0.348257142857143,0.348257142857143},
-{2977435,3898451,3898266,0.178745454545455,-1},
-{2977436,3898646,3898451,0.19476,-1},
-{2977437,3898951,3898646,0.299147368421053,-1},
-{2977438,3898451,3898896,0.322833333333333,0.29055},
-{2977439,3897729,3898451,0.421657142857143,0.354192},
-{2977440,3897699,3897729,0.05922,0.074025},
-{2977441,3897294,3897614,0.187377777777778,0.187377777777778},
-{2977442,3899341,3899094,0.58662,0.58662},
-{2977443,3898961,3899341,0.209836363636364,0.19235},
-{2977444,3899868,3899341,0.257897142857143,0.347169230769231},
-{2977445,3899352,3899868,0.416858823529412,0.272561538461538},
-{2977446,3900359,3899868,0.263571428571429,0.351428571428571},
-{2977447,3903012,3901967,-1,0.736771428571429},
-{2977448,3903475,3902566,0.675409090909091,-1},
-{2977451,3903513,3903475,0.068175,0.0389571428571429},
-{2977452,3903513,3903954,0.194861538461538,0.220278260869565},
-{2977453,3903954,3903889,0.42624,0.202971428571429},
-{2977454,3904053,3903954,0.179825,0.172632},
-{2977455,3903954,3904344,0.234,0.221},
-{2977456,3904344,3904746,0.23217,0.244389473684211},
-{2977457,3904409,3904344,0.646714285714286,0.646714285714286},
-{2977458,3904811,3904746,0.163511111111111,0.163511111111111},
-{2977459,3904409,3904053,0.176618181818182,0.176618181818182},
-{2977460,3904811,3904409,0.1809,0.213790909090909},
-{2977461,3905403,3904811,0.662466666666667,0.6276},
-{2977465,3905295,3905197,-1,-1},
-{2977467,3904282,3904421,0.25215,0.25215},
-{2977468,3904421,3904712,0.2606,0.300692307692308},
-{2977469,3904712,3904565,0.198133333333333,0.274338461538462},
-{2977470,3904746,3904712,0.357857142857143,0.357857142857143},
-{2977471,3904858,3904931,0.194777777777778,0.194777777777778},
-{2977586,3918140,3917638,0.290022222222222,0.290022222222222},
-{2977587,3917191,3917627,0.291822222222222,0.291822222222222},
-{2977588,3917627,3918274,0.418375,0.6694},
-{2977589,3917348,3917192,0.0956222222222222,0.0956222222222222},
-{2977590,3916226,3916841,0.389044444444444,0.389044444444444},
-{2977591,3916841,3917155,0.1982,0.1982},
-{2977592,3917155,3917207,0.247758620689655,0.247758620689655},
-{2977593,3916485,3917023,0.331066666666667,0.331066666666667},
-{2977594,3917023,3917018,0.101355555555556,0.101355555555556},
-{2977595,3917018,3916841,0.101711111111111,0.101711111111111},
-{2977596,3916841,3916587,0.158044444444444,0.158044444444444},
-{2977597,3916587,3915768,0.501466666666667,0.501466666666667},
-{2977598,3916912,3916093,0.504044444444444,0.504044444444444},
-{2977599,3917411,3917155,0.193107692307692,0.193107692307692},
-{2977600,3917207,3917449,0.210365217391304,0.2304},
-{2977601,3917449,3917740,0.154529032258065,0.154529032258065},
-{2977602,3917449,3917258,0.166577777777778,0.166577777777778},
-{2977603,3917258,3917009,0.230371428571429,0.230371428571429},
-{2977604,3917042,3917102,0.203755555555556,0.203755555555556},
-{2977605,3917102,3917192,0.0468888888888889,0.0468888888888889},
-{2977606,3917191,3917192,0.109688888888889,0.109688888888889},
-{2977607,3917122,3917191,0.0432,0.0432},
-{2977608,3917018,3917122,0.0462222222222222,0.0462222222222222},
-{2977609,3917102,3917023,0.0358444444444444,0.0358444444444444},
-{2977610,3917122,3917155,0.151941176470588,0.151941176470588},
-{2977611,3917880,3918540,0.607866666666667,0.521028571428571},
-{2977612,3918540,3918274,0.156444444444444,0.156444444444444},
-{2977613,3918148,3918849,1.25273333333333,1.25273333333333},
-{2977614,3918314,3919021,0.475968,0.475968},
-{2977615,3918476,3919466,0.613955555555555,0.613955555555555},
-{2977616,3917740,3917486,0.186755555555556,0.186755555555556},
-{2977617,3917486,3917268,0.206242105263158,0.206242105263158},
-{2977618,3917740,3917928,0.121878260869565,0.133485714285714},
-{2977619,3917928,3918006,0.114789473684211,0.114789473684211},
-{2977620,3917928,3918207,0.154488888888889,0.154488888888889},
-{2977621,3918207,3918655,0.286771428571429,0.286771428571429},
-{2977622,3918006,3917749,0.147111111111111,0.147111111111111},
-{2977623,3917749,3917533,0.152222222222222,0.152222222222222},
-{2977624,3917486,3917749,0.189104347826087,0.189104347826087},
-{2977625,3918006,3918496,0.342314285714286,0.342314285714286},
-{2977626,3889636,3890557,0.431844444444444,0.353327272727273},
-{2977627,3891036,3891401,0.237457142857143,0.191792307692308},
-{2977628,3886153,3886302,-1,-1},
-{2977629,3885480,3885966,0.2589,-1},
-{2977630,3890420,3891272,-1,-1},
-{2977631,3891244,3890420,-1,-1},
-{2977632,3880453,3880675,0.134422222222222,0.134422222222222},
-{2977633,3880883,3880986,0.1742,-1},
-{2977634,3880761,3880883,-1,0.1814},
-{2977635,3921699,3921989,0.1338,0.2007},
-{2977636,3921989,3922325,0.222057142857143,0.222057142857143},
-{2977639,3922252,3921989,0.191266666666667,0.191266666666667},
-{2977643,3922265,3920935,0.881688888888889,0.881688888888889},
-{2977645,3921963,3921208,0.489244444444444,0.489244444444444},
-{2977652,3918655,3918496,0.200428571428571,0.21045},
-{2977653,3918496,3918329,0.126690909090909,0.149314285714286},
-{2977654,3918329,3918119,0.20685,0.197},
-{2977655,3917749,3918329,0.27732,0.27732},
-{2977656,3918958,3918452,0.6546,1.45466666666667},
-{2977657,3918958,3919226,0.152488888888889,0.117634285714286},
-{2977658,3919226,3918721,0.479822222222222,0.479822222222222},
-{2977659,3919226,3919509,0.106866666666667,0.0874363636363636},
-{2977660,3919509,3919793,0.108566666666667,0.0930571428571429},
-{2977661,3919793,3920060,0.164424,0.146807142857143},
-{2977662,3919509,3918997,0.481977777777778,0.481977777777778},
-{2977663,3919793,3919248,0.483511111111111,0.483511111111111},
-{2977664,3920935,3920379,0.570704347826087,2.1877},
-{2977665,3921208,3920648,0.557181818181818,0.557181818181818},
-{2977670,3913361,3914521,0.515089655172414,0.515089655172414},
-{2977671,3913728,3914826,0.569488888888889,0.569488888888889},
-{2977672,3914090,3915101,0.479145454545454,0.52706},
-{2977673,3914369,3915330,0.575142857142857,0.575142857142857},
-{2977674,3914648,3915569,0.650256,0.650256},
-{2977675,3914870,3915811,0.866747368421053,0.633392307692308},
-{2977676,3915085,3916068,0.522774193548387,0.463028571428571},
-{2977677,3914090,3914369,0.1824,0.161353846153846},
-{2977678,3914369,3914648,0.133567741935484,0.106169230769231},
-{2977679,3914648,3914870,0.125670967741935,0.105291891891892},
-{2977680,3914870,3915085,0.137935714285714,0.133179310344828},
-{2977681,3914833,3915085,0.158076923076923,0.146785714285714},
-{2977682,3920648,3920011,0.5186,0.5186},
-{2977683,3920379,3919769,0.497311111111111,0.497311111111111},
-{2977684,3921461,3920907,0.431066666666667,0.431066666666667},
-{2977685,3921758,3921207,0.533342857142857,0.533342857142857},
-{2977686,3922051,3921508,1.87,1.87},
-{2977690,3920907,3920274,0.528711111111111,0.528711111111111},
-{2977691,3921207,3920546,0.554355555555556,0.554355555555556},
-{2977692,3921508,3920793,0.580511111111111,0.580511111111111},
-{2977696,3922109,3921378,0.568955555555555,0.568955555555555},
-{2977700,3919541,3919769,0.147790909090909,0.180633333333333},
-{2977701,3919769,3919834,0.0430846153846154,0.03734},
-{2977702,3919834,3920011,0.0954967741935484,0.0925125},
-{2977703,3920011,3920085,0.0357352941176471,0.0368181818181818},
-{2977704,3920085,3920274,0.0762171428571429,0.0808363636363636},
-{2977705,3920274,3920372,0.03945,0.0405771428571429},
-{2977706,3920372,3920546,0.0773666666666667,0.0819176470588235},
-{2977707,3920546,3920793,0.11688,0.11688},
-{2977708,3920793,3921039,0.116329411764706,0.1236},
-{2977709,3921378,3921754,0.131152941176471,0.135127272727273},
-{2977712,3919834,3919629,0.154266666666667,0.154266666666667},
-{2977713,3920085,3919925,0.128066666666667,0.128066666666667},
-{2977714,3920372,3920191,0.0953555555555556,0.0953555555555556},
-{2977715,3919629,3919925,-1,-1},
-{2977716,3919925,3920191,-1,-1},
-{2977818,3902059,3902191,0.686013333333333,0.735014285714286},
-{2977819,3902191,3902255,0.260022857142857,0.2528},
-{2977822,3903384,3903428,0.2322,0.259517647058824},
-{2977823,3903482,3903428,0.153761538461538,0.159912},
-{2977824,3903534,3903482,0.181875,0.167884615384615},
-{2977825,3903987,3904039,0.276923076923077,0.2},
-{2977826,3904039,3904042,0.0654,0.04905},
-{2977827,3904042,3904107,0.193870588235294,0.1831},
-{2977828,3904128,3904107,0.0429157894736842,0.05436},
-{2977829,3904190,3904128,0.2712,0.2712},
-{2977830,3903428,3904042,0.258466666666667,0.258466666666667},
-{2977831,3903482,3904107,0.8718,0.8718},
-{2977832,3903534,3904190,0.28956,0.28956},
-{2977834,3902416,3902458,0.0722222222222222,0.0722222222222222},
-{2977835,3902458,3903534,0.60153,0.60153},
-{2977837,3898183,3898224,0.14421,0.1802625},
-{2977838,3898224,3898290,0.202176,0.229745454545455},
-{2977839,3898290,3898345,0.112118181818182,0.16444},
-{2977840,3897986,3898345,0.133755555555556,0.133755555555556},
-{2977841,3898345,3898679,0.1818,0.2121},
-{2977842,3898679,3899011,0.143284615384615,0.161973913043478},
-{2977843,3899011,3899393,0.159,0.178875},
-{2977844,3898535,3898679,0.479263636363636,0.620223529411765},
-{2977845,3898867,3899011,-1,-1},
-{2977846,3898679,3898818,0.4575,-1},
-{2977847,3899011,3899173,-1,-1},
-{2977848,3898669,3898818,0.0640444444444445,0.0640444444444445},
-{2977849,3899173,3899543,0.2328,0.201054545454545},
-{2977850,3898224,3898290,0.3104,0.3104},
-{2978074,3898347,3900553,-1,-1},
-{2978075,3900553,3901122,0.534333333333333,0.534333333333333},
-{2978076,3899053,3900878,-1,-1},
-{2978078,3902332,3902071,0.1281,0.1281},
-{2978079,3902608,3902332,0.143936842105263,-1},
-{2978080,3902608,3903138,-1,-1},
-{2978081,3902071,3902904,0.659778947368421,0.659778947368421},
-{2978082,3902806,3902904,0.0784434782608696,0.0644357142857143},
-{2978083,3902904,3903036,-1,-1},
-{2978084,3902332,3903036,-1,-1},
-{2978085,3902608,3903364,-1,0.861214285714286},
-{2978086,3903138,3903249,-1,-1},
-{2978087,3903249,3903708,-1,0.74604},
-{2978088,3903249,3903438,0.2331,0.2331},
-{2978089,3903860,3903708,0.08468,0.0940888888888889},
-{2978090,3903438,3903708,0.217868571428571,0.24598064516129},
-{2978091,3903438,3903364,0.0756,0.061425},
-{2978092,3903364,3903308,0.0722608695652174,0.0615555555555555},
-{2978093,3902574,3903044,0.3028,0.24224},
-{2978094,3903258,3903479,0.162872727272727,0.23888},
-{2978095,3903479,3903633,0.1578,0.1578},
-{2978096,3903711,3903933,0.160309090909091,0.195933333333333},
-{2978097,3903933,3904175,0.128232,0.133575},
-{2978098,3903479,3903933,0.272688888888889,0.272688888888889},
-{2978099,3903457,3903633,0.137568,0.181010526315789},
-{2978100,3903633,3904175,0.210891428571429,0.263614285714286},
-{2978101,3904175,3904719,0.316533333333333,0.305228571428571},
-{2978102,3905124,3904667,0.258955555555555,0.258955555555555},
-{2978103,3905351,3905991,0.636234782608696,0.48778},
-{2978211,3907068,3907801,0.413975,0.382130769230769},
-{2978212,3905351,3906621,0.848305263157895,0.848305263157895},
-{2978213,3909727,3911178,0.626288888888889,0.626288888888889},
-{2978214,3908279,3910214,0.790222222222222,0.790222222222222},
-{2978215,3911414,3911718,0.392426086956522,0.392426086956522},
-{2978216,3912006,3911718,0.2315,0.264571428571429},
-{2978217,3911718,3911807,0.1032,0.1032},
-{2978218,3911807,3912502,0.530333333333333,0.530333333333333},
-{2978219,3911807,3913018,0.4414,0.4414},
-{2978220,3913018,3913364,0.242822222222222,0.242822222222222},
-{2978221,3913018,3913548,0.201466666666667,0.201466666666667},
-{2978222,3912502,3913018,0.307333333333333,0.307333333333333},
-{2978224,3914167,3914679,0.478854545454546,0.478854545454546},
-{2978226,3915408,3915715,0.269807142857143,0.4197},
-{2978231,3915715,3916464,0.450192857142857,0.484823076923077},
-{2978232,3915906,3916712,0.469721739130435,0.469721739130435},
-{2978233,3915648,3916452,0.407866666666667,0.407866666666667},
-{2978238,3923628,3924024,0.483505263157895,0.483505263157895},
-{2978240,3922675,3922709,0.603133333333334,0.603133333333334},
-{2978241,3922033,3922329,0.281844444444444,0.281844444444444},
-{2978242,3922329,3922227,0.0674888888888889,0.0674888888888889},
-{2978244,3921771,3922020,0.264847058823529,0.264847058823529},
-{2978245,3921771,3921938,0.39424,0.39424},
-{2978246,3922020,3921938,0.10012,0.10012},
-{2978247,3922918,3923520,0.536888888888889,0.536888888888889},
-{2978248,3922841,3923398,0.83324,0.83324},
-{2978249,3923041,3923320,0.315872727272727,0.315872727272727},
-{2978250,3921559,3921678,0.388,0.388},
-{2978251,3922244,3921763,0.2746,0.2746},
-{2978252,3921763,3921975,0.152044444444444,0.152044444444444},
-{2978253,3921975,3922168,0.124,0.239142857142857},
-{2978254,3922168,3922257,0.0606521739130435,0.0775},
-{2978255,3922345,3922556,0.343244444444444,-1},
-{2978256,3921111,3921291,0.191964705882353,0.1554},
-{2978257,3921194,3921291,0.0826,0.0874588235294118},
-{2978258,3921194,3920842,0.29691,0.6598},
-{2978259,3920755,3920636,0.110929411764706,0.110929411764706},
-{2978364,3859221,3858420,0.56448,0.56448},
-{2978365,3857672,3858477,0.366652173913043,0.383318181818182},
-{2978366,3858477,3858825,0.143133333333333,0.143133333333333},
-{2978367,3858825,3858815,0.0874666666666667,0.0874666666666667},
-{2978368,3858825,3858972,0.100022222222222,0.100022222222222},
-{2978369,3858815,3858792,0.164844444444444,0.164844444444444},
-{2978370,3864715,3864281,-1,0.256246153846154},
-{2978371,3865232,3864715,-1,0.36255},
-{2978372,3864715,3865417,1.37145882352941,0.932592},
-{2978373,3864281,3863872,-1,-1},
-{2978374,3865923,3865417,0.191688888888889,0.191688888888889},
-{2978375,3866283,3865825,0.2619,0.428563636363636},
-{2978376,3865417,3865459,0.19205,0.19205},
-{2978377,3865905,3865459,0.208745454545455,0.255133333333333},
-{2978378,3865459,3865078,-1,-1},
-{2978379,3864453,3863923,0.441623076923077,0.410078571428571},
-{2978380,3863397,3863171,0.183504,0.254866666666667},
-{2978381,3863171,3863165,0.04743,0.07905},
-{2978382,3863898,3863397,0.306888888888889,0.306888888888889},
-{2978383,3864018,3863898,0.084984,0.0786888888888889},
-{2978384,3863898,3863165,0.5058,0.684317647058823},
-{2978385,3865300,3865063,0.27147,0.246790909090909},
-{2978386,3863490,3863181,0.174933333333333,0.174933333333333},
-{2978387,3869865,3868713,-1,1.71036923076923},
-{2978388,3869421,3868258,0.692557894736842,-1},
-{2978389,3871944,3870419,0.9498,0.904571428571429},
-{2978390,3871539,3869421,1.12785,-1},
-{2978391,3867564,3867354,0.217226086956522,0.3122625},
-{2978392,3866487,3867354,-1,0.7579},
-{2978393,3867788,3867450,0.1926,0.4066},
-{2978394,3867450,3866503,0.555795,0.555795},
-{2978395,3867450,3867835,0.567533333333333,0.547264285714286},
-{2978396,3868458,3867835,0.27085,0.250015384615385},
-{2978397,3872921,3872568,-1,0.428742857142857},
-{2978398,3874738,3875430,0.641444444444444,0.641444444444444},
-{2978399,3876195,3876267,0.338715789473684,0.32178},
-{2978400,3876195,3875347,1.01621052631579,1.20675},
-{2978401,3878307,3877054,0.654709090909091,-1},
-{2978403,3851558,3850581,0.632975,0.632975},
-{2978404,3850917,3851402,0.317333333333333,0.317333333333333},
-{2978405,3851322,3851558,0.1712,0.1712},
-{2978406,3851558,3851717,0.0927857142857143,0.0787272727272727},
-{2978407,3851717,3851923,0.117222222222222,0.117222222222222},
-{2978408,3851717,3852219,0.237444444444444,0.221068965517241},
-{2978409,3852219,3851969,0.156888,0.170530434782609},
-{2978410,3852219,3852755,0.2037,0.197129032258065},
-{2978411,3852517,3852755,0.155866666666667,0.155866666666667},
-{2978412,3853628,3853251,0.219022222222222,0.219022222222222},
-{2978413,3854673,3854371,0.175778571428571,0.182288888888889},
-{2978414,3856584,3854673,0.773225806451613,0.647837837837838},
-{2978415,3857349,3856768,0.603069230769231,-1},
-{2978416,3854520,3854282,0.26841,0.282536842105263},
-{2978417,3854801,3854282,0.251622222222222,0.251622222222222},
-{2978418,3856030,3854801,0.601177777777778,0.601177777777778},
-{2978419,3854801,3854561,0.204866666666667,0.204866666666667},
-{2978420,3854561,3853990,0.24858,0.225981818181818},
-{2978421,3855889,3854561,0.564165517241379,0.4812},
-{2978422,3856181,3855870,0.548781818181818,0.482928},
-{2978423,3856692,3856181,0.280896,0.270092307692308},
-{2978424,3856873,3856692,0.119222222222222,0.119222222222222},
-{2978425,3858477,3858444,0.358976470588235,0.30513},
-{2978426,3858444,3858373,-1,0.156966666666667},
-{2978427,3858716,3858383,0.335538461538462,0.335538461538462},
-{2978428,3860073,3859918,0.183814285714286,0.270884210526316},
-{2978429,3859411,3859199,0.519564705882353,0.519564705882353},
-{2978430,3859199,3858716,0.54675652173913,0.54675652173913},
-{2978431,3861228,3860962,0.192327272727273,0.222694736842105},
-{2978432,3861677,3861228,0.282688235294118,0.32038},
-{2978433,3859033,3858716,0.239937931034483,0.23194},
-{2978434,3859918,3859033,1.039575,1.039575},
-{2978435,3860895,3860471,0.324378947368421,0.3424},
-{2978436,3860471,3859571,0.755622222222222,0.755622222222222},
-{2978437,3859571,3859236,0.15828,0.164875},
-{2978438,3860962,3860598,0.2308,0.2885},
-{2978439,3860598,3860237,0.19861875,0.2354},
-{2978440,3860237,3859798,0.246507692307692,0.291327272727273},
-{2978441,3859798,3859571,0.206311111111111,0.206311111111111},
-{2978442,3863171,3862741,0.201977777777778,0.201977777777778},
-{2978443,3862055,3862744,0.977133333333333,0.977133333333333},
-{2978444,3862653,3862744,0.0822666666666667,0.0822666666666667},
-{2978445,3862744,3863025,0.243988235294118,0.243988235294118},
-{2978446,3863025,3863184,0.125345454545455,0.17235},
-{2978447,3862568,3862324,0.15414,0.12845},
-{2978448,3863184,3862946,0.256095652173913,0.280485714285714},
-{2978449,3865816,3866058,-1,-1},
-{2978450,3866058,3866150,0.122177777777778,0.122177777777778},
-{2978451,3866150,3865659,0.201,0.201},
-{2978452,3865662,3865659,0.0864727272727273,0.0679428571428571},
-{2978453,3866150,3866232,0.11355,0.0973285714285714},
-{2978454,3866232,3865662,0.231192,0.3211},
-{2978455,3868655,3868754,-1,0.12048},
-{2978456,3869689,3869066,0.769771428571429,-1},
-{2978457,3867869,3867474,-1,0.207885714285714},
-{2978458,3868268,3867869,-1,0.1686},
-{2978459,3868402,3868268,-1,0.0691090909090909},
-{2978460,3868211,3868402,0.323060869565217,-1},
-{2978461,3869032,3868402,-1,0.294457142857143},
-{2978462,3869873,3869190,-1,0.394366666666667},
-{2978463,3870878,3870540,-1,0.5268},
-{2978464,3867613,3867017,0.4268,0.376588235294118},
-{2978465,3867869,3867613,0.332217391304348,0.272892857142857},
-{2978466,3867613,3867688,0.172338461538462,0.106685714285714},
-{2978467,3868268,3867968,0.587584615384615,-1},
-{2978468,3868402,3868567,0.283105263157895,-1},
-{2978469,3871291,3870878,-1,0.740505882352941},
-{2978470,3867017,3867170,0.473723076923077,0.473723076923077},
-{2978471,3870285,3870098,-1,0.56502},
-{2978472,3871395,3870973,0.522978947368421,-1},
-{2978473,3873412,3874448,0.515363636363636,0.515363636363636},
-{2978474,3874448,3874419,0.270385714285714,0.164582608695652},
-{2978475,3876052,3875960,0.225044444444444,0.225044444444444},
-{2978476,3875501,3874123,0.874042105263158,-1},
-{2978477,3878655,3877969,-1,0.346963636363636},
-{2978478,3877092,3876748,-1,0.484275},
-{2978479,3878243,3877920,-1,0.621},
-{2978480,3878155,3877902,-1,0.423366666666667},
-{2978481,3879484,3878586,0.654675,-1},
-{2978482,3878967,3878975,0.0939111111111111,0.0939111111111111},
-{2978483,3876276,3876371,0.0663,0.0663},
-{2978484,3876371,3876323,-1,-1},
-{2978485,3876323,3876192,-1,-1},
-{2978486,3878897,3878882,0.22825,-1},
-{2978487,3878950,3878882,-1,0.06046},
-{2978488,3879195,3879226,0.18651,-1},
-{2978489,3880277,3879222,-1,-1},
-{2978491,3850208,3850006,0.17565,0.17565},
-{2978492,3850541,3850208,0.25815652173913,0.269890909090909},
-{2978493,3851228,3851969,0.50984347826087,0.4886},
-{2978494,3851015,3851495,0.270576923076923,0.260555555555556},
-{2978495,3850934,3851015,0.051888,0.0564},
-{2978496,3855362,3855298,0.78084705882353,0.78084705882353},
-{2978497,3855362,3855608,0.457942857142857,0.457942857142857},
-{2978498,3855579,3855362,0.50673,0.460663636363636},
-{2978499,3856351,3856255,0.705670588235294,0.705670588235294},
-{2978500,3856351,3856537,0.3006,0.3006},
-{2978501,3857560,3857715,0.0725333333333333,0.0725333333333333},
-{2978502,3857715,3857393,0.191177777777778,0.191177777777778},
-{2978503,3857021,3856746,0.160355555555556,0.160355555555556},
-{2978504,3856723,3856351,0.38565,0.30852},
-{2978505,3856618,3856723,0.12033,0.141564705882353},
-{2978506,3854709,3854202,0.35048,0.328575},
-{2978507,3856692,3856434,0.208444444444444,0.208444444444444},
-{2978508,3857826,3856692,0.670075,0.730990909090909},
-{2978509,3858294,3857826,0.28885,0.266630769230769},
-{2978510,3856525,3856172,0.239084210526316,0.239084210526316},
-{2978511,3858107,3857678,0.245918181818182,0.245918181818182},
-{2978512,3859798,3859478,0.187485714285714,0.16405},
-{2978513,3859914,3859615,0.151511111111111,0.151511111111111},
-{2978514,3859914,3859798,0.1184,0.1184},
-{2978515,3859166,3858294,0.85028,0.85028},
-{2978516,3859150,3859323,0.148355555555556,0.148355555555556},
-{2978517,3858692,3858294,0.247328571428571,0.364484210526316},
-{2978518,3859423,3858692,0.429704347826087,0.429704347826087},
-{2978519,3859654,3858692,0.496142857142857,0.473590909090909},
-{2978520,3859806,3859166,0.300048,0.326139130434783},
-{2978521,3860059,3859654,0.297,0.297},
-{2978522,3860477,3860059,0.197822222222222,0.197822222222222},
-{2978523,3860899,3860059,0.434,0.434},
-{2978524,3860154,3859914,0.221333333333333,0.221333333333333},
-{2978525,3859806,3860154,0.184069565217391,0.162830769230769},
-{2978526,3860421,3859914,0.251288888888889,0.251288888888889},
-{2978527,3860421,3860237,0.229418181818182,0.229418181818182},
-{2978528,3860425,3860421,0.232375,0.232375},
-{2978529,3860154,3860425,0.142220689655172,0.187472727272727},
-{2978530,3860853,3860425,0.239345454545455,0.315936},
-{2978531,3861345,3861746,0.514427586206897,0.481238709677419},
-{2978532,3860598,3860960,0.353488888888889,0.353488888888889},
-{2978533,3859836,3859273,0.352930434782609,0.352930434782609},
-{2978534,3860258,3860066,0.16935,0.16935},
-{2978535,3860066,3859836,0.186436363636364,0.124290909090909},
-{2978536,3859836,3859581,0.23406,0.180046153846154},
-{2978537,3860465,3860066,0.255777777777778,0.255777777777778},
-{2978538,3861452,3860475,0.513311111111111,0.513311111111111},
-{2978539,3859836,3860226,0.340447058823529,0.2756},
-{2978540,3860769,3860465,0.166017391304348,0.200968421052632},
-{2978541,3861658,3860769,0.578478260869565,0.578478260869565},
-{2978542,3861746,3861960,0.259607142857143,0.29076},
-{2978543,3861960,3861984,0.0314444444444444,0.0303214285714286},
-{2978544,3862691,3861960,0.539866666666667,0.539866666666667},
-{2978545,3862286,3861984,0.295008,0.295008},
-{2978546,3862991,3862568,0.355777777777778,0.355777777777778},
-{2978547,3862991,3862691,-1,-1},
-{2978548,3863417,3862991,0.267666666666667,0.267666666666667},
-{2978549,3863417,3862946,-1,0.40815652173913},
-{2978550,3863243,3862991,-1,0.4000875},
-{2978551,3862814,3863243,0.253375,0.253375},
-{2978552,3862432,3862286,0.186366666666667,0.197329411764706},
-{2978553,3862286,3863015,0.468,0.468},
-{2978554,3863243,3863460,-1,0.125355555555556},
-{2978555,3863460,3863681,-1,0.250476923076923},
-{2978556,3863681,3863417,-1,0.20742},
-{2978557,3863681,3864039,0.284888888888889,0.284888888888889},
-{2978558,3863668,3864039,0.179822222222222,0.179822222222222},
-{2978559,3865703,3865662,0.09468,0.0860727272727273},
-{2978560,3865804,3865703,0.167666666666667,0.2515},
-{2978561,3866232,3866318,0.1202,0.0874181818181818},
-{2978562,3866318,3866416,0.18492,0.132085714285714},
-{2978563,3866318,3865703,-1,0.357705882352941},
-{2978564,3866683,3866318,-1,0.115333333333333},
-{2978565,3866600,3866683,0.0895777777777778,0.0895777777777778},
-{2978566,3866683,3866748,0.0946444444444444,-1},
-{2978567,3865072,3864444,0.3014,0.3014},
-{2978568,3865773,3865072,0.270038709677419,0.380509090909091},
-{2978569,3865400,3865072,0.405866666666667,0.405866666666667},
-{2978570,3866943,3865661,0.564977777777778,0.564977777777778},
-{2978571,3865072,3864768,0.368035714285714,0.429375},
-{2978572,3867633,3867214,0.203977777777778,0.203977777777778},
-{2978573,3867644,3867622,-1,0.168657142857143},
-{2978574,3867538,3867909,-1,0.734115789473684},
-{2978575,3867928,3868337,-1,-1},
-{2978576,3868254,3868649,-1,0.74307},
-{2978577,3868583,3868780,0.2742,0.380833333333333},
-{2978578,3868780,3869013,0.369626086956522,0.404828571428571},
-{2978579,3869405,3868780,0.284373913043478,0.344242105263158},
-{2978580,3870670,3870098,0.232375,-1},
-{2978581,3870472,3869492,-1,0.395921739130435},
-{2978582,3871016,3870472,-1,0.244460869565217},
-{2978583,3871184,3871016,0.194475,0.194475},
-{2978584,3868264,3867769,0.306177777777778,0.306177777777778},
-{2978585,3871216,3871016,-1,0.225190909090909},
-{2978586,3870122,3870244,0.151147826086957,0.14485},
-{2978587,3870244,3870618,0.2842,0.2842},
-{2978588,3870618,3870862,0.182472,0.162921428571429},
-{2978589,3869169,3869395,0.652705263157895,0.62007},
-{2978590,3868278,3868342,0.296125,0.338428571428571},
-{2978591,3868342,3867622,0.263630769230769,0.311563636363636},
-{2978592,3868902,3868342,0.180289655172414,0.201092307692308},
-{2978593,3870618,3869624,0.35808,0.35808},
-{2978594,3870862,3869531,0.37785,0.345462857142857},
-{2978595,3871206,3870862,0.108658064516129,0.0935666666666667},
-{2978596,3871489,3871206,0.394992,0.394992},
-{2978597,3871978,3871206,0.270888,0.282175},
-{2978598,3869726,3870098,0.131288888888889,0.131288888888889},
-{2978599,3872864,3872781,-1,-1},
-{2978600,3873046,3872974,-1,-1},
-{2978601,3872781,3872513,-1,0.328090909090909},
-{2978602,3872974,3872740,0.2939,-1},
-{2978603,3872740,3872513,0.0918545454545455,0.0918545454545455},
-{2978604,3872910,3872740,0.10132,0.0660782608695652},
-{2978605,3872513,3872275,-1,0.2},
-{2978606,3872910,3872747,-1,0.23523},
-{2978607,3873780,3872910,-1,0.414704347826087},
-{2978608,3873685,3872747,0.473628571428571,-1},
-{2978609,3873889,3873780,0.281372727272727,-1},
-{2978610,3873780,3873685,0.210763636363636,-1},
-{2978611,3875160,3873780,-1,0.611511111111111},
-{2978612,3876012,3875816,0.536925,0.613628571428571},
-{2978613,3875816,3875916,0.4032,0.4032},
-{2978614,3875974,3875916,0.152557894736842,-1},
-{2978615,3875916,3875733,0.281290909090909,-1},
-{2978616,3876325,3876822,-1,0.50736},
-{2978617,3876454,3875733,0.28791724137931,0.28791724137931},
-{2978618,3876630,3876454,-1,0.387495652173913},
-{2978619,3871978,3871324,0.4782,0.498125},
-{2978620,3872687,3871978,0.303365217391304,0.317154545454545},
-{2978621,3873104,3872687,0.340888888888889,0.354},
-{2978622,3872687,3872314,0.305634782608696,0.334742857142857},
-{2978623,3873584,3873352,0.367666666666667,0.381807692307692},
-{2978624,3873352,3872687,0.283523076923077,0.30715},
-{2978625,3874265,3874065,-1,0.347078571428571},
-{2978626,3873286,3872314,0.3454,0.490831578947369},
-{2978627,3873352,3873286,0.107555555555556,0.107555555555556},
-{2978628,3873878,3873352,0.196924137931034,0.1784625},
-{2978629,3874065,3873878,0.108272727272727,0.09528},
-{2978630,3876822,3876841,0.167733333333333,0.0794526315789474},
-{2978631,3876822,3876919,-1,0.695625},
-{2978632,3877686,3877793,0.324685714285714,-1},
-{2978633,3877793,3877615,0.23997,-1},
-{2978634,3877793,3878114,-1,0.200541176470588},
-{2978635,3877218,3876454,0.304822222222222,0.265490322580645},
-{2978636,3879076,3878492,-1,0.456190909090909},
-{2978637,3878492,3878730,0.263810526315789,0.227836363636364},
-{2978638,3879397,3878730,0.316933333333333,0.316933333333333},
-{2978639,3878730,3878875,0.58419,0.486825},
-{2978640,3852836,3852976,2.18416666666667,2.18416666666667},
-{2978641,3858107,3857747,0.267313043478261,0.219578571428571},
-{2978642,3858232,3857747,-1,0.354033333333333},
-{2978643,3858969,3858232,0.490577777777778,0.473057142857143},
-{2978644,3855679,3856031,0.246577777777778,0.246577777777778},
-{2978645,3856618,3856031,0.297469565217391,0.402458823529412},
-{2978646,3860465,3860310,0.086376,0.0744620689655172},
-{2978647,3860310,3860226,0.048375,0.048375},
-{2978648,3860226,3859995,0.272166666666667,0.222681818181818},
-{2978649,3861002,3860310,0.463118181818182,0.463118181818182},
-{2978650,3861511,3861208,0.257084210526316,0.187869230769231},
-{2978651,3861208,3861002,0.157609090909091,0.15075652173913},
-{2978652,3861002,3860597,0.274172727272727,0.251325},
-{2978653,3861813,3861511,0.206688888888889,0.206688888888889},
-{2978654,3861813,3861564,0.429257142857143,0.222577777777778},
-{2978655,3861564,3861201,0.328252173913043,0.37749},
-{2978656,3859877,3859268,0.411933333333333,0.37074},
-{2978657,3860408,3860730,0.12915,0.133316129032258},
-{2978658,3860730,3861136,0.223992857142857,0.223992857142857},
-{2978659,3861935,3861813,0.333253846153846,0.361025},
-{2978660,3862069,3861813,0.193536,0.193536},
-{2978661,3862481,3862069,0.4318875,0.4318875},
-{2978662,3862069,3861770,0.32106,0.256848},
-{2978663,3860579,3859877,-1,0.358135714285714},
-{2978664,3858303,3858131,0.113008695652174,0.123771428571429},
-{2978665,3858303,3859268,0.598036363636364,0.626514285714286},
-{2978666,3858361,3858303,0.0394,0.0454615384615385},
-{2978667,3859877,3858683,0.805114285714286,0.805114285714286},
-{2978668,3862960,3862723,0.1254,0.1254},
-{2978669,3863038,3862319,0.362328,0.335488888888889},
-{2978670,3863198,3863038,0.0960521739130435,0.0960521739130435},
-{2978671,3863699,3863198,0.255,0.255},
-{2978672,3865311,3865689,0.262955555555556,0.262955555555556},
-{2978673,3865689,3865226,0.3157875,0.3157875},
-{2978674,3865907,3865689,0.0953454545454545,0.0953454545454545},
-{2978675,3866118,3865907,0.109542857142857,0.104563636363636},
-{2978676,3866517,3866118,0.156730434782609,0.1502},
-{2978677,3866733,3866517,0.088875,0.0820384615384615},
-{2978678,3865181,3865714,0.280457142857143,0.346447058823529},
-{2978679,3865907,3865714,0.473823529411765,0.423947368421053},
-{2978680,3865714,3865605,0.280961538461538,0.811666666666667},
-{2978681,3865714,3865855,0.0567461538461538,0.0776526315789474},
-{2978682,3865855,3866463,0.235107692307692,0.277854545454545},
-{2978683,3865855,3865605,0.263666666666667,0.263666666666667},
-{2978684,3865014,3865468,0.250658823529412,0.250658823529412},
-{2978685,3865605,3865468,0.1621125,0.12969},
-{2978686,3865605,3866394,0.296622222222222,0.296622222222222},
-{2978687,3866439,3866118,0.2837,0.486342857142857},
-{2978688,3866439,3866463,0.267947368421053,0.212125},
-{2978689,3866463,3866394,0.25122,0.279133333333333},
-{2978690,3866439,3867004,0.199888888888889,0.199888888888889},
-{2978691,3866517,3867119,0.241622222222222,0.241622222222222},
-{2978692,3867119,3867223,0.157066666666667,0.157066666666667},
-{2978693,3867119,3867004,-1,-1},
-{2978694,3867296,3867004,0.112466666666667,0.112466666666667},
-{2978695,3865468,3866303,0.3475,0.417},
-{2978696,3866394,3866303,0.1695,0.1582},
-{2978697,3867523,3867223,0.130904347826087,0.103820689655172},
-{2978698,3867684,3867523,0.075525,0.0697153846153846},
-{2978699,3867508,3867684,0.352264285714286,0.379361538461538},
-{2978700,3867508,3867296,0.21717,0.28956},
-{2978701,3867296,3867086,0.468,0.468},
-{2978702,3866962,3867086,0.0538,0.0561391304347826},
-{2978703,3867722,3867508,0.155052631578947,0.1473},
-{2978704,3867086,3867335,0.128147368421053,0.128147368421053},
-{2978705,3868196,3867684,0.217390909090909,0.183946153846154},
-{2978706,3866394,3866833,0.153888888888889,0.153888888888889},
-{2978707,3866833,3866962,0.154,0.154},
-{2978708,3867004,3866833,0.369511111111111,0.369511111111111},
-{2978709,3868447,3868196,0.10905,0.100661538461538},
-{2978710,3868677,3868447,0.11097,0.105685714285714},
-{2978711,3869029,3868677,0.129715384615385,0.134904},
-{2978712,3869379,3869029,0.158018181818182,0.158018181818182},
-{2978713,3869636,3869379,0.101754545454545,0.1599},
-{2978714,3867622,3867523,0.465092307692308,0.431871428571429},
-{2978715,3868342,3868447,0.459626086956522,0.406592307692308},
-{2978716,3868902,3869029,0.409025,0.426808695652174},
-{2978717,3868156,3868196,0.4011,0.431953846153846},
-{2978718,3868653,3868677,0.521342857142857,0.437928},
-{2978719,3871324,3871373,0.293035714285714,0.2735},
-{2978720,3871373,3871181,0.603575,0.536511111111111},
-{2978721,3870360,3869762,0.485288888888889,0.485288888888889},
-{2978722,3871589,3871972,0.125244444444444,0.125244444444444},
-{2978723,3871972,3871816,-1,0.23217},
-{2978724,3871972,3872311,0.133825,-1},
-{2978725,3872314,3872311,0.269178947368421,-1},
-{2978726,3872311,3873149,0.608492307692308,-1},
-{2978727,3873286,3873218,0.0852387096774193,-1},
-{2978728,3873218,3873149,0.10085625,0.10085625},
-{2978729,3873149,3872986,0.278192307692308,0.278192307692308},
-{2978730,3873878,3873218,0.331422222222222,-1},
-{2978731,3874065,3873948,-1,0.229315384615385},
-{2978732,3874477,3874065,0.280226086956522,0.280226086956522},
-{2978733,3874477,3874418,0.158269565217391,0.202233333333333},
-{2978734,3874418,3873948,0.2448,0.28152},
-{2978735,3874667,3874418,0.13008,0.17344},
-{2978736,3873948,3873754,-1,0.446345454545455},
-{2978737,3875436,3875204,0.618,-1},
-{2978738,3872200,3871805,0.73866,0.73866},
-{2978739,3872986,3872572,0.63192,-1},
-{2978740,3875204,3875006,0.342744,-1},
-{2978741,3874337,3875006,0.26092,0.372742857142857},
-{2978742,3875006,3875679,0.3337,0.296622222222222},
-{2978743,3875862,3875679,-1,0.3667},
-{2978744,3871805,3871181,-1,0.277685714285714},
-{2978745,3873370,3872572,-1,0.341925},
-{2978746,3873754,3873370,-1,0.764018181818182},
-{2978747,3874228,3874923,0.3284,0.342678260869565},
-{2978748,3875006,3874923,0.18625,-1},
-{2978749,3875679,3875599,-1,0.168104347826087},
-{2978750,3874923,3874840,0.187824,-1},
-{2978751,3874120,3874840,0.331725,0.361881818181818},
-{2978752,3874840,3875475,0.303784615384615,0.292533333333333},
-{2978753,3871181,3871120,-1,0.103512},
-{2978754,3871120,3871004,-1,0.313254545454545},
-{2978755,3871869,3871120,-1,-1},
-{2978756,3871918,3871869,-1,-1},
-{2978757,3871869,3871659,-1,-1},
-{2978758,3871659,3871004,0.3361,-1},
-{2978759,3872348,3871659,0.279573913043478,-1},
-{2978760,3873169,3872348,0.40659,-1},
-{2978761,3872547,3871869,0.234911111111111,0.234911111111111},
-{2978762,3872572,3872547,0.0666631578947368,0.0575727272727273},
-{2978763,3872547,3872427,0.206372727272727,0.206372727272727},
-{2978764,3872427,3872348,0.133371428571429,0.112032},
-{2978765,3873370,3873169,-1,0.286114285714286},
-{2978766,3870402,3870368,0.210911111111111,0.210911111111111},
-{2978767,3870368,3870327,0.0888666666666667,0.114257142857143},
-{2978768,3873087,3870368,0.958977777777778,0.958977777777778},
-{2978769,3873169,3873087,-1,0.180457142857143},
-{2978770,3873087,3873001,0.39654,0.165225},
-{2978771,3873602,3873169,0.164121428571429,-1},
-{2978772,3873923,3873602,0.151425,-1},
-{2978773,3873602,3873087,0.4344,0.4344},
-{2978774,3878375,3880278,0.853711111111111,0.853711111111111},
-{2978775,3880241,3880405,-1,-1},
-{2978776,3880405,3882602,-1,-1},
-{2978777,3878346,3879499,0.4936,0.4936},
-{2978778,3882602,3880440,-1,-1},
-{2978779,3857718,3858361,0.77772,0.77772},
-{2978780,3854970,3856892,0.839236363636364,0.839236363636364},
-{2978781,3855431,3854970,0.225763636363636,0.225763636363636},
-{2978782,3858996,3858683,0.21295,0.222208695652174},
-{2978783,3860128,3860434,0.178333333333333,0.178333333333333},
-{2978784,3859809,3859177,0.529073684210526,0.529073684210526},
-{2978785,3859565,3858717,0.461333333333333,0.461333333333333},
-{2978786,3860234,3860032,0.272033333333333,0.3060375},
-{2978787,3860032,3859809,0.160655172413793,0.150290322580645},
-{2978788,3859809,3859565,0.186553846153846,0.186553846153846},
-{2978789,3860758,3860373,0.320139130434783,0.334690909090909},
-{2978790,3860373,3860078,0.2438,0.263304},
-{2978791,3860961,3860078,0.5093,0.81488},
-{2978792,3861339,3860373,0.504044444444444,0.504044444444444},
-{2978793,3861552,3861339,0.292036363636364,-1},
-{2978794,3861331,3861339,-1,0.0835363636363636},
-{2978795,3860961,3861331,0.272942857142857,0.272942857142857},
-{2978796,3861469,3861743,0.4422,-1},
-{2978797,3861469,3861331,-1,0.147954545454545},
-{2978798,3861886,3862255,-1,0.2301},
-{2978799,3861701,3861733,0.777763636363636,-1},
-{2978800,3862293,3862255,0.276535714285714,-1},
-{2978801,3862322,3862293,0.135417391304348,-1},
-{2978802,3861941,3862293,-1,-1},
-{2978803,3862255,3863042,0.733311111111111,0.733311111111111},
-{2978804,3862198,3862257,0.345511111111111,0.345511111111111},
-{2978805,3862545,3862244,0.224288888888889,0.224288888888889},
-{2978806,3862797,3862244,0.288977777777778,0.288977777777778},
-{2978807,3862797,3862738,0.0766666666666667,0.0766666666666667},
-{2978808,3862940,3862797,0.0730222222222222,0.0730222222222222},
-{2978809,3863221,3863097,0.0881684210526316,0.0698},
-{2978810,3863488,3863221,0.186678260869565,0.1789},
-{2978811,3863299,3860961,2.15565,2.15565},
-{2978812,3867675,3866223,0.531111111111111,-1},
-{2978813,3867675,3868155,-1,0.200536363636364},
-{2978814,3868155,3868592,-1,0.200536363636364},
-{2978815,3868592,3869056,-1,0.2226},
-{2978816,3869056,3869604,-1,0.274136842105263},
-{2978817,3867675,3867555,0.285466666666667,0.285466666666667},
-{2978818,3868155,3868018,0.283755555555556,0.283755555555556},
-{2978819,3868592,3868467,0.284266666666667,0.284266666666667},
-{2978820,3869056,3868924,0.291933333333333,0.291933333333333},
-{2978821,3867188,3867446,0.399177777777778,0.399177777777778},
-{2978822,3867715,3867813,0.184866666666667,0.184866666666667},
-{2978823,3867167,3867473,0.23268,0.202330434782609},
-{2978824,3867473,3868038,0.312042857142857,0.336046153846154},
-{2978825,3867473,3867145,0.488066666666667,0.516776470588235},
-{2978826,3867145,3866147,0.325427586206897,0.31458},
-{2978827,3868151,3867473,0.357971428571429,0.357971428571429},
-{2978828,3868617,3868151,0.219457142857143,0.23043},
-{2978829,3869060,3868617,0.191263636363636,0.168312},
-{2978830,3869574,3869060,0.249126315789474,0.278435294117647},
-{2978831,3868195,3868151,0.272788235294118,0.244073684210526},
-{2978832,3868151,3868038,0.45537,0.337311111111111},
-{2978833,3868008,3867145,0.295551724137931,0.329653846153846},
-{2978834,3868038,3868008,0.107645454545455,0.102965217391304},
-{2978835,3868617,3868596,0.0947333333333333,0.0947333333333333},
-{2978836,3869063,3869060,0.0963555555555556,0.0963555555555556},
-{2978837,3868596,3869063,0.164311111111111,0.164311111111111},
-{2978838,3868596,3868566,0.1746,0.1746},
-{2978839,3869063,3869048,0.181666666666667,0.181666666666667},
-{2978840,3868566,3868235,0.306915789473684,0.323966666666667},
-{2978841,3869048,3868566,0.245336842105263,0.245336842105263},
-{2978842,3869540,3869048,0.244736842105263,0.31},
-{2978843,3868008,3868235,0.0887739130434783,0.0928090909090909},
-{2978844,3868235,3868460,0.0792620689655173,0.0884076923076923},
-{2978845,3869576,3868460,0.4406,0.391644444444444},
-{2978846,3869677,3870992,0.558709090909091,0.682866666666667},
-{2978847,3870992,3872020,0.45906,0.399182608695652},
-{2978848,3872073,3872944,0.40209,0.382942857142857},
-{2978849,3872944,3873494,0.341233333333333,0.279190909090909},
-{2978850,3870992,3871109,0.4018,0.4018},
-{2978851,3872944,3872776,0.33435,0.351947368421053},
-{2978852,3872776,3872622,0.287433333333333,0.246371428571429},
-{2978853,3872776,3871883,-1,-1},
-{2978854,3873336,3872776,0.30354,0.30354},
-{2978855,3873494,3873336,0.365494736842105,0.330685714285714},
-{2978856,3873336,3873233,0.23799,0.264433333333333},
-{2978857,3871109,3871366,0.280444444444444,0.280444444444444},
-{2978858,3870242,3870148,0.279688888888889,0.279688888888889},
-{2978859,3870757,3870642,0.383936842105263,-1},
-{2978860,3870148,3869628,0.177138461538462,-1},
-{2978861,3870642,3870148,0.157593103448276,-1},
-{2978862,3871366,3870642,0.291860869565217,-1},
-{2978863,3871573,3871366,0.0824571428571429,0.0824571428571429},
-{2978864,3870642,3870578,0.26937,-1},
-{2978865,3870578,3870525,0.164755555555556,-1},
-{2978866,3871419,3870578,-1,0.291866666666667},
-{2978867,3870525,3869576,0.3168,0.328984615384615},
-{2978868,3871301,3870525,0.252496551724138,0.281630769230769},
-{2978869,3869556,3868955,0.327733333333333,0.39328},
-{2978870,3869556,3870460,0.35115652173913,0.367118181818182},
-{2978871,3870525,3870460,0.1998,0.183816},
-{2978872,3872622,3872451,0.26424,0.314571428571429},
-{2978873,3872451,3872320,0.193846153846154,0.21},
-{2978874,3872320,3872204,0.231314285714286,0.285741176470588},
-{2978875,3872204,3871301,0.301422222222222,0.35384347826087},
-{2978876,3872204,3872966,0.260311111111111,0.260311111111111},
-{2978877,3872320,3873064,0.262977777777778,0.262977777777778},
-{2978878,3872451,3873184,0.265533333333333,0.265533333333333},
-{2978879,3873896,3874068,-1,0.140664},
-{2978880,3874000,3874678,0.357081818181818,0.561128571428572},
-{2978881,3874678,3875321,-1,-1},
-{2978882,3874840,3874678,0.343390909090909,-1},
-{2978883,3874678,3874508,0.29864347826087,-1},
-{2978884,3875321,3875200,-1,0.278475},
-{2978885,3874498,3874188,0.651818181818182,0.623478260869565},
-{2978886,3873506,3874188,0.287078571428571,0.334925},
-{2978887,3875185,3874901,0.4908,0.47444},
-{2978888,3874188,3874901,0.313368,0.340617391304348},
-{2978889,3873314,3874025,0.343382608695652,0.358990909090909},
-{2978890,3874025,3874707,0.356072727272727,0.290133333333333},
-{2978891,3873151,3873900,0.321888,0.298044444444445},
-{2978892,3873900,3874577,0.2802,0.217933333333333},
-{2978893,3874025,3873900,0.388129411764706,0.388129411764706},
-{2978894,3874901,3874707,0.300077419354839,0.281890909090909},
-{2978895,3874707,3874577,0.230266666666667,0.222042857142857},
-{2978896,3874707,3875581,0.386888888888889,0.386888888888889},
-{2978897,3856892,3856551,0.297618181818182,0.297618181818182},
-{2978898,3856892,3858718,0.90614,0.84950625},
-{2978899,3858718,3859193,0.3149625,0.3149625},
-{2978900,3859193,3859828,0.327418181818182,0.327418181818182},
-{2978901,3861601,3859828,0.890981818181818,0.890981818181818},
-{2978902,3859193,3859091,0.128690909090909,0.128690909090909},
-{2978903,3865530,3864968,0.269028571428571,0.201771428571429},
-{2978904,3866380,3865530,0.365608695652174,0.323423076923077},
-{2978905,3865429,3865530,0.247166666666667,0.247166666666667},
-{2978906,3865530,3866288,0.353466666666667,0.353466666666667},
-{2978907,3865603,3865826,0.177155555555556,0.177155555555556},
-{2978908,3866322,3865603,0.2616,0.2616},
-{2978909,3866263,3865826,0.164466666666667,0.164466666666667},
-{2978910,3864739,3864228,0.229444444444444,0.229444444444444},
-{2978911,3864236,3864335,0.164111111111111,0.164111111111111},
-{2978912,3868008,3867933,0.2466,0.305784},
-{2978913,3868460,3868410,0.0927,0.132428571428571},
-{2978914,3868206,3868410,0.0791333333333333,0.0791333333333333},
-{2978915,3868206,3868150,0.206377777777778,0.206377777777778},
-{2978916,3867933,3868150,0.09516,0.105733333333333},
-{2978917,3868150,3868409,0.13473,0.112275},
-{2978918,3868410,3868657,0.20811,0.20811},
-{2978919,3868657,3868409,0.154885714285714,-1},
-{2978920,3868955,3868657,0.178547368421053,-1},
-{2978921,3868409,3868539,0.0760857142857143,-1},
-{2978922,3868539,3868798,0.142885714285714,-1},
-{2978923,3868798,3868955,0.106,-1},
-{2978924,3868798,3869537,0.529866666666667,0.529866666666667},
-{2978925,3868539,3868861,0.225222222222222,0.225222222222222},
-{2978926,3867874,3866314,0.75684,0.75684},
-{2978927,3868425,3867874,-1,0.197177777777778},
-{2978928,3869291,3869088,-1,-1},
-{2978929,3867754,3866644,0.454176,0.493669565217391},
-{2978930,3868425,3868396,0.24465,0.24465},
-{2978931,3868396,3868405,0.171992307692308,0.2794875},
-{2978932,3869036,3868396,0.224511111111111,0.224511111111111},
-{2978933,3869088,3869036,0.1268,0.1268},
-{2978934,3869036,3869076,0.136844444444444,0.136844444444444},
-{2978935,3868405,3867754,0.282872727272727,0.296342857142857},
-{2978936,3868946,3868405,0.185222222222222,0.192346153846154},
-{2978937,3869076,3868946,0.0593739130434783,0.0525230769230769},
-{2978938,3869278,3869076,0.10161,0.0883565217391304},
-{2978939,3869514,3869278,0.1154,0.159784615384615},
-{2978940,3867754,3867662,0.65235,0.497028571428571},
-{2978941,3868946,3868948,0.12576,0.147952941176471},
-{2978942,3869009,3869005,0.21616,0.180133333333333},
-{2978943,3868948,3867936,0.48537,0.64716},
-{2978944,3869009,3867936,1.57933333333333,1.57933333333333},
-{2978945,3868948,3869009,0.421305882352941,0.3979},
-{2978946,3867645,3867662,0.0358363636363636,0.03285},
-{2978947,3869005,3867662,0.374735294117647,0.455035714285714},
-{2978948,3869250,3869005,0.0927461538461538,0.114828571428571},
-{2978949,3869473,3869250,0.106171428571429,0.14864},
-{2978950,3870070,3869529,0.181176923076923,0.2617},
-{2978951,3870070,3870031,0.79692,-1},
-{2978952,3870749,3870070,0.181129411764706,0.181129411764706},
-{2978953,3871139,3872049,0.621369230769231,0.621369230769231},
-{2978954,3871021,3871901,0.40362,0.33635},
-{2978955,3872204,3872049,0.238733333333333,0.257832},
-{2978956,3872049,3871966,0.125295652173913,0.130990909090909},
-{2978957,3871966,3871901,0.113435294117647,0.0876545454545455},
-{2978958,3871901,3871839,0.1896,0.11376},
-{2978959,3871755,3871658,0.17652,0.22065},
-{2978960,3871658,3871312,0.408367741935484,0.506376},
-{2978961,3871966,3872511,0.236288888888889,0.236288888888889},
-{2978962,3872633,3871755,0.493941176470588,0.493941176470588},
-{2978963,3871658,3870749,0.245523529411765,0.287855172413793},
-{2978964,3872550,3871658,0.264483870967742,0.32796},
-{2978965,3870460,3870345,0.384991304347826,0.327955555555556},
-{2978966,3878656,3878246,0.435044444444444,0.435044444444444},
-{2978967,3871312,3870979,0.428565517241379,0.478015384615385},
-{2978968,3870979,3870147,-1,0.295066666666667},
-{2978969,3872328,3873176,0.323496,-1},
-{2978970,3873176,3873915,0.290733333333333,-1},
-{2978971,3873176,3873022,0.425858823529412,0.425858823529412},
-{2978972,3873022,3872937,0.145733333333333,0.145733333333333},
-{2978973,3873765,3873022,0.31236,0.31236},
-{2978974,3873915,3873765,0.337017391304348,0.337017391304348},
-{2978975,3873765,3873655,0.165444444444444,0.165444444444444},
-{2978976,3861924,3861034,0.5204,0.5204},
-{2978977,3862098,3861765,0.2244,0.2244},
-{2978978,3862098,3862464,0.464177777777778,0.464177777777778},
-{2978979,3862007,3862098,0.241366666666667,0.241366666666667},
-{2978980,3861942,3862007,0.116366666666667,0.116366666666667},
-{2978981,3862951,3863098,0.287355555555556,0.287355555555556},
-{2978982,3864128,3863653,0.27831,0.27831},
-{2978983,3863224,3863653,0.740686956521739,0.740686956521739},
-{2978984,3864069,3863737,0.217305882352941,0.175914285714286},
-{2978985,3864069,3864456,0.520875,0.520875},
-{2978986,3864521,3864069,0.302188235294118,0.233509090909091},
-{2978987,3865911,3864862,0.514472727272727,0.514472727272727},
-{2978988,3863861,3864069,0.253342857142857,0.253342857142857},
-{2978989,3863861,3863599,0.153654545454545,0.14085},
-{2978990,3864408,3863861,0.257304,0.238244444444444},
-{2978991,3863521,3863861,0.389622222222222,0.389622222222222},
-{2978992,3864862,3864745,0.148010526315789,0.133914285714286},
-{2978993,3864745,3864521,0.184285714285714,0.16125},
-{2978994,3864275,3864861,0.474063157894737,0.474063157894737},
-{2978995,3862337,3862746,0.477955555555556,0.477955555555556},
-{2978996,3862618,3863047,0.498866666666667,0.498866666666667},
-{2978997,3862736,3863190,0.516511111111111,0.516511111111111},
-{2978998,3862337,3862098,0.113815384615385,0.1233},
-{2978999,3862618,3862337,0.136272,0.11356},
-{2979000,3862736,3862618,0.0851739130434783,0.0851739130434783},
-{2979001,3862861,3862736,0.113766666666667,0.13652},
-{2979002,3863521,3863130,0.55788,0.55788},
-{2979003,3862753,3862007,0.339266666666667,0.339266666666667},
-{2979004,3863130,3862861,0.166422222222222,0.166422222222222},
-{2979005,3863819,3863993,0.145244444444444,0.145244444444444},
-{2979006,3864315,3864568,0.105556097560976,0.127288235294118},
-{2979007,3866989,3866322,0.2586,0.2586},
-{2979008,3867253,3866989,0.232421052631579,0.232421052631579},
-{2979009,3866989,3867468,0.405,0.405},
-{2979010,3867645,3867468,0.171317647058824,0.19416},
-{2979011,3867468,3867401,0.101511111111111,0.101511111111111},
-{2979012,3866858,3866989,0.235433333333333,0.235433333333333},
-{2979013,3866814,3866237,0.235527272727273,0.235527272727273},
-{2979014,3867307,3866814,0.1422,0.16671724137931},
-{2979015,3867694,3867307,0.156,0.16848},
-{2979016,3868203,3867694,0.154877419354839,0.165558620689655},
-{2979017,3868444,3868203,0.0882827586206897,0.08534},
-{2979018,3866858,3866234,0.218307692307692,0.218307692307692},
-{2979019,3867301,3866814,0.551192307692308,0.551192307692308},
-{2979020,3867551,3867307,0.297351724137931,0.297351724137931},
-{2979021,3867856,3867694,0.213977777777778,0.213977777777778},
-{2979022,3867301,3866874,0.211554545454545,0.211554545454545},
-{2979023,3867660,3867301,0.164533333333333,0.164533333333333},
-{2979024,3867551,3867856,0.133977777777778,0.133977777777778},
-{2979025,3867660,3867551,0.0748,0.0748},
-{2979026,3868032,3867856,0.0997333333333333,0.0997333333333333},
-{2979027,3868327,3868203,0.171977777777778,0.171977777777778},
-{2979028,3868032,3868327,0.130488888888889,0.130488888888889},
-{2979029,3868958,3868327,0.331266666666667,0.331266666666667},
-{2979030,3867800,3867660,0.07196,0.134925},
-{2979031,3868159,3868032,0.0707555555555556,0.0707555555555556},
-{2979032,3867918,3867301,0.550690909090909,0.550690909090909},
-{2979033,3867800,3868159,0.140911111111111,0.140911111111111},
-{2979034,3867800,3868344,0.477333333333333,0.318222222222222},
-{2979035,3868636,3868159,0.279422222222222,0.279422222222222},
-{2979036,3869245,3868958,0.154022222222222,0.159946153846154},
-{2979037,3868958,3868751,0.09358,0.08773125},
-{2979038,3868751,3868636,0.0481928571428571,0.0499777777777778},
-{2979039,3868636,3868344,0.152955555555556,0.13321935483871},
-{2979040,3868344,3867918,0.221328,0.197614285714286},
-{2979041,3869455,3868751,0.3446,0.3446},
-{2979042,3868880,3868344,0.234662068965517,0.22684},
-{2979043,3869911,3869455,-1,-1},
-{2979044,3870038,3869911,-1,-1},
-{2979045,3867918,3868330,0.230630769230769,0.230630769230769},
-{2979046,3868330,3868438,0.139266666666667,0.139266666666667},
-{2979047,3869357,3868880,0.2102625,0.269136},
-{2979048,3868880,3868330,0.242777777777778,0.242777777777778},
-{2979049,3868438,3867810,0.238688888888889,0.238688888888889},
-{2979050,3869357,3868438,0.382025,0.416754545454545},
-{2979051,3869357,3869471,0.08168,0.0556909090909091},
-{2979052,3869911,3870044,-1,-1},
-{2979053,3870547,3870648,0.394466666666667,0.394466666666667},
-{2979054,3873309,3873297,0.212,0.212},
-{2979055,3850176,3850314,0.098,0.098},
-{2979056,3851828,3852455,0.556869230769231,0.658118181818182},
-{2979057,3852455,3852762,0.263854545454545,0.263854545454545},
-{2979058,3852455,3853105,0.202872727272727,0.202872727272727},
-{2979059,3853055,3853105,0.124145454545455,0.124145454545455},
-{2979060,3853105,3853705,0.302545454545455,0.302545454545455},
-{2979061,3850314,3849947,0.183272727272727,0.183272727272727},
-{2979062,3861518,3861145,0.252285714285714,0.240818181818182},
-{2979063,3861692,3860944,0.548557894736842,0.548557894736842},
-{2979064,3861942,3861933,-1,0.409088888888889},
-{2979065,3862327,3861933,0.334606451612903,0.334606451612903},
-{2979066,3861933,3861518,0.302177777777778,0.291385714285714},
-{2979067,3861933,3862248,-1,-1},
-{2979068,3862670,3862248,0.455815384615385,0.59256},
-{2979069,3862248,3861996,0.240675,0.28881},
-{2979070,3861836,3861518,0.120331578947368,0.138563636363636},
-{2979071,3861996,3861836,0.0635351351351351,0.07836},
-{2979072,3862211,3861996,0.102977142857143,0.109218181818182},
-{2979073,3862552,3862211,0.13032972972973,0.13395},
-{2979074,3861836,3861692,0.235088888888889,0.235088888888889},
-{2979075,3861692,3861566,0.341454545454545,0.278222222222222},
-{2979076,3862735,3861692,0.630939130434783,0.630939130434783},
-{2979077,3862644,3862735,0.218836363636364,0.218836363636364},
-{2979078,3863130,3863023,0.176368421052632,0.159571428571429},
-{2979079,3863066,3863023,0.246552,0.267991304347826},
-{2979080,3862211,3863066,0.528155555555556,0.528155555555556},
-{2979081,3863242,3863066,0.142009090909091,0.142009090909091},
-{2979082,3864315,3863897,0.301711111111111,0.301711111111111},
-{2979083,3863897,3863628,-1,-1},
-{2979084,3864223,3863897,0.175288888888889,0.175288888888889},
-{2979085,3864568,3864223,0.256044444444444,0.256044444444444},
-{2979086,3865404,3864762,0.305511111111111,0.305511111111111},
-{2979087,3865673,3865051,0.287533333333333,0.287533333333333},
-{2979088,3864474,3864223,0.112711111111111,0.112711111111111},
-{2979089,3864797,3864474,0.191466666666667,0.191466666666667},
-{2979090,3864797,3865051,0.0987789473684211,0.134057142857143},
-{2979091,3865051,3865735,0.307418181818182,0.307418181818182},
-{2979092,3865418,3864474,0.507955555555555,0.507955555555555},
-{2979093,3862552,3863242,0.532,0.532},
-{2979094,3862873,3862552,0.156411428571429,0.156411428571429},
-{2979095,3863543,3863242,0.177666666666667,0.177666666666667},
-{2979096,3863543,3863871,0.229955555555556,0.229955555555556},
-{2979097,3863151,3863543,0.303533333333333,0.303533333333333},
-{2979098,3862873,3863151,0.296034782608696,0.296034782608696},
-{2979099,3863151,3863416,0.152844444444444,0.152844444444444},
-{2979100,3863416,3863543,0.445977777777778,0.445977777777778},
-{2979101,3863416,3863803,0.204822222222222,0.204822222222222},
-{2979102,3865999,3866752,0.309822222222222,0.309822222222222},
-{2979103,3866972,3866752,0.132555555555556,0.132555555555556},
-{2979104,3866371,3866972,0.283622222222222,0.283622222222222},
-{2979105,3866012,3866371,0.162046153846154,0.150471428571429},
-{2979106,3865735,3866012,0.12266,0.12266},
-{2979107,3865634,3865735,0.0505125,0.0734727272727273},
-{2979108,3865418,3865634,0.137454545454545,0.116307692307692},
-{2979109,3864756,3865418,0.382390909090909,0.442768421052632},
-{2979110,3863353,3862873,0.249745945945946,0.318641379310345},
-{2979111,3864109,3864615,0.37236,0.404739130434783},
-{2979112,3863928,3864109,0.191025,0.183384},
-{2979113,3865751,3865634,0.190017391304348,0.190017391304348},
-{2979114,3865216,3864940,0.162757894736842,0.162757894736842},
-{2979115,3865751,3865216,0.252088888888889,0.252088888888889},
-{2979116,3865995,3865751,0.112577777777778,0.112577777777778},
-{2979117,3866309,3866012,0.168133333333333,0.168133333333333},
-{2979118,3866309,3865995,0.141111111111111,0.141111111111111},
-{2979119,3866710,3866309,0.214657142857143,0.214657142857143},
-{2979120,3866872,3866309,0.322044444444444,0.322044444444444},
-{2979121,3867277,3866872,0.2427,0.285529411764706},
-{2979122,3866442,3865995,0.253755555555556,0.253755555555556},
-{2979123,3866872,3866442,0.158888888888889,0.158888888888889},
-{2979124,3866671,3866872,0.178733333333333,0.178733333333333},
-{2979125,3867083,3866671,0.2528,0.2528},
-{2979126,3865837,3865751,0.292177777777778,0.292177777777778},
-{2979127,3865837,3865216,0.268022222222222,0.268022222222222},
-{2979128,3865937,3865837,0.0786260869565217,0.0822},
-{2979129,3865576,3865937,0.168888888888889,0.168888888888889},
-{2979130,3865937,3866199,0.116066666666667,0.116066666666667},
-{2979131,3866442,3866199,0.145422222222222,0.145422222222222},
-{2979132,3866199,3866671,0.1524,0.1524},
-{2979133,3866033,3865937,0.0816947368421053,0.0739142857142857},
-{2979134,3866838,3866033,0.4435,0.4435},
-{2979135,3866207,3866033,0.64845,0.51876},
-{2979136,3864109,3865237,0.521955555555556,0.521955555555556},
-{2979137,3867410,3866872,0.329422222222222,0.329422222222222},
-{2979138,3868438,3868658,0.188537142857143,0.188537142857143},
-{2979139,3868818,3868242,0.265714285714286,0.265714285714286},
-{2979140,3868658,3868818,0.157822222222222,0.157822222222222},
-{2979141,3868818,3869041,0.507035294117647,0.507035294117647},
-{2979142,3869041,3869307,0.335577777777778,0.335577777777778},
-{2979143,3869528,3868658,0.316755555555556,0.316755555555556},
-{2979144,3869600,3868818,0.314725,0.314725},
-{2979145,3869041,3868595,0.164066666666667,0.164066666666667},
-{2979146,3869668,3869041,0.3198,0.3198},
-{2979147,3870256,3869528,0.381282352941176,0.308657142857143},
-{2979148,3870332,3870256,0.1442,0.157309090909091},
-{2979149,3870256,3870216,0.359968421052632,0.359968421052632},
-{2979150,3870830,3870658,0.369857142857143,0.383555555555556},
-{2979151,3869582,3869779,0.0789,0.0826571428571429},
-{2979152,3869779,3869978,0.08799,0.0799909090909091},
-{2979153,3869978,3870216,0.0977454545454546,0.074151724137931},
-{2979154,3870216,3870658,0.20454,0.1461},
-{2979155,3869978,3869889,0.348736363636364,0.426233333333333},
-{2979156,3869889,3869786,0.286377777777778,0.286377777777778},
-{2979157,3870096,3869889,0.164618181818182,0.164618181818182},
-{2979158,3870096,3869992,0.299422222222222,0.299422222222222},
-{2979159,3870561,3870096,0.155511111111111,0.155511111111111},
-{2979160,3870658,3870625,0.189542857142857,0.189542857142857},
-{2979161,3870625,3870603,-1,0.065895652173913},
-{2979162,3870603,3870561,-1,0.10419},
-{2979163,3870561,3870416,-1,0.362488888888889},
-{2979164,3870625,3870810,-1,0.0630692307692308},
-{2979165,3870603,3870787,0.0603333333333333,0.0603333333333333},
-{2979166,3870810,3870787,0.0532222222222222,0.0532222222222222},
-{2979167,3870787,3870779,0.0788222222222222,0.0788222222222222},
-{2979168,3870779,3870675,0.355555555555556,0.355555555555556},
-{2979169,3871156,3871054,0.357444444444444,0.357444444444444},
-{2979170,3872056,3871931,0.333066666666667,0.333066666666667},
-{2979171,3871931,3871804,-1,-1},
-{2979172,3871804,3871689,0.376955555555556,0.376955555555556},
-{2979173,3872248,3872146,-1,0.45426},
-{2979174,3871931,3872146,-1,-1},
-{2979175,3872146,3872112,-1,0.153703448275862},
-{2979176,3871804,3872034,-1,-1},
-{2979177,3872112,3872034,-1,0.14341935483871},
-{2979178,3872034,3871912,-1,0.6354375},
-{2979179,3872112,3872480,0.269261538461538,0.269261538461538},
-{2979180,3872480,3872582,0.0585882352941176,0.0664},
-{2979181,3872775,3872631,0.477234782608696,0.439056},
-{2979182,3873207,3873158,0.455325,0.455325},
-{2979183,3872631,3873158,0.191888888888889,0.191888888888889},
-{2979184,3872631,3872582,0.139042105263158,0.120081818181818},
-{2979185,3872582,3872919,0.14376,0.14376},
-{2979186,3872919,3873153,0.1152,0.1152},
-{2979187,3873158,3873153,0.0988444444444444,0.0988444444444444},
-{2979188,3872480,3872329,0.900975,0.900975},
-{2979189,3872919,3872801,0.779233333333333,0.779233333333333},
-{2979190,3870416,3870326,0.461952,0.412457142857143},
-{2979191,3870326,3871011,0.237755555555556,0.237755555555556},
-{2979192,3869857,3870172,0.107928,0.117313043478261},
-{2979193,3869857,3870267,0.519733333333333,0.519733333333333},
-{2979194,3870267,3870172,0.429333333333333,0.429333333333333},
-{2979195,3870326,3870310,0.120978947368421,0.11493},
-{2979196,3870310,3870296,0.06984,0.0455478260869565},
-{2979197,3870172,3870296,0.047025,0.0594},
-{2979198,3870296,3870293,0.0405333333333333,0.0420923076923077},
-{2979199,3870293,3870266,0.177461538461538,0.096125},
-{2979200,3870266,3870941,0.233955555555556,0.233955555555556},
-{2979201,3870310,3870293,0.5446,0.5446},
-{2979202,3871912,3871746,0.4314,0.449375},
-{2979203,3871746,3872436,0.294142857142857,0.30885},
-{2979204,3872436,3872721,0.0746129032258064,0.110142857142857},
-{2979205,3872801,3872721,0.332909090909091,0.422538461538461},
-{2979206,3872721,3872955,0.118642105263158,0.093925},
-{2979207,3873576,3873552,0.497530434782609,0.4768},
-{2979208,3872436,3872384,0.34122,0.359178947368421},
-{2979209,3872913,3872955,0.324657142857143,0.4261125},
-{2979210,3871429,3871038,0.196666666666667,0.131111111111111},
-{2979211,3871429,3871634,0.0649354838709677,0.0774230769230769},
-{2979212,3871634,3872384,0.2512,0.260861538461538},
-{2979213,3872384,3872913,0.160055172413793,0.185664},
-{2979214,3871656,3871634,0.0484444444444444,0.0484444444444444},
-{2979215,3873153,3873271,0.0473555555555556,0.0473555555555556},
-{2979216,3873271,3873607,0.127244444444444,0.127244444444444},
-{2979217,3873271,3873190,0.514777777777778,0.514777777777778},
-{2979218,3885991,3886317,0.119172413793103,-1},
-{2979219,3886005,3886317,0.135036363636364,-1},
-{2979220,3861011,3859859,1.72033846153846,1.06497142857143},
-{2979221,3862720,3861492,0.513154838709677,0.513154838709677},
-{2979222,3862828,3862720,0.278918181818182,0.322957894736842},
-{2979223,3862300,3861318,0.534666666666667,0.534666666666667},
-{2979224,3862300,3862112,0.425266666666667,0.425266666666667},
-{2979225,3862204,3861430,0.7184,0.7184},
-{2979226,3861492,3861357,0.174288888888889,0.174288888888889},
-{2979227,3863665,3863928,0.301539130434783,0.256866666666667},
-{2979228,3866036,3863928,1.7666,1.7666},
-{2979229,3866036,3866367,0.29079,0.29079},
-{2979230,3865759,3866036,0.255628571428571,0.255628571428571},
-{2979231,3865641,3865759,0.0788222222222222,0.0788222222222222},
-{2979232,3866775,3866036,0.299733333333333,0.299733333333333},
-{2979233,3863557,3863262,0.33265,0.33265},
-{2979234,3864151,3863821,0.6074,0.6074},
-{2979235,3863262,3862720,0.322272,0.322272},
-{2979236,3863821,3863262,0.309807692307692,0.309807692307692},
-{2979237,3864139,3863821,0.18366,0.18366},
-{2979238,3865612,3864139,0.665822222222222,0.665822222222222},
-{2979239,3865914,3865612,0.41448,0.41448},
-{2979240,3865612,3865492,0.185711111111111,0.185711111111111},
-{2979241,3863542,3862934,0.312511111111111,0.312511111111111},
-{2979242,3863754,3863542,0.106466666666667,0.106466666666667},
-{2979243,3863918,3863754,0.138046153846154,0.138046153846154},
-{2979244,3863821,3863542,0.283844444444444,0.283844444444444},
-{2979245,3863754,3863627,0.314955555555556,0.314955555555556},
-{2979246,3863627,3863937,0.137733333333333,0.137733333333333},
-{2979247,3865857,3865612,0.0961111111111111,0.0961111111111111},
-{2979248,3865857,3865548,0.242155555555556,0.242155555555556},
-{2979249,3866137,3865857,0.224133333333333,0.224133333333333},
-{2979250,3868109,3866285,0.763533333333333,0.763533333333333},
-{2979251,3868313,3866602,0.740222222222222,0.740222222222222},
-{2979252,3866983,3867557,0.265133333333333,0.265133333333333},
-{2979253,3867557,3868134,0.248844444444444,0.248844444444444},
-{2979254,3867713,3867557,0.1094,0.1094},
-{2979255,3868297,3867713,0.236111111111111,0.236111111111111},
-{2979256,3868297,3868134,0.113444444444444,0.113444444444444},
-{2979257,3868741,3868297,0.186755555555556,0.186755555555556},
-{2979258,3869012,3867595,0.599422222222222,0.599422222222222},
-{2979259,3868074,3868827,0.312577777777778,0.312577777777778},
-{2979260,3868827,3869325,0.272791304347826,0.241315384615385},
-{2979261,3868827,3869497,0.5412,0.5412},
-{2979262,3872141,3871656,0.316977777777778,0.316977777777778},
-{2979263,3868056,3867628,0.308,0.308},
-{2979264,3869321,3868298,-1,-1},
-{2979265,3882075,3882641,0.36318,0.36318},
-{2979266,3882641,3882903,0.16479,0.16479},
-{2979267,3884580,3885174,0.1879875,0.146721951219512},
-{2979268,3885174,3885462,0.126576923076923,0.0997272727272727},
-{2979269,3882987,3882641,0.40665,0.40665},
-{2979270,3882987,3882289,0.39381,0.39381},
-{2979271,3883208,3882987,0.11277,0.11277},
-{2979272,3883605,3884066,0.24543,0.24543},
-{2979273,3884028,3884066,0.388377777777778,0.388377777777778},
-{2979274,3885143,3884628,0.26421,0.26421},
-{2979275,3883107,3882903,0.152688888888889,0.152688888888889},
-{2979276,3887762,3887788,0.0400888888888889,0.0400888888888889},
-{2979277,3887788,3887828,0.21987,0.21987},
-{2979278,3861592,3860922,0.451272,0.451272},
-{2979279,3861617,3861592,0.060312,0.0558444444444444},
-{2979280,3861781,3861592,0.118009090909091,0.136642105263158},
-{2979281,3861781,3861614,0.282422222222222,0.282422222222222},
-{2979282,3862207,3862204,0.199725,0.152171428571429},
-{2979283,3860324,3859430,0.409468965517241,0.424092857142857},
-{2979284,3861212,3861617,0.552714285714286,0.552714285714286},
-{2979285,3862730,3861781,0.546485714285714,0.7172625},
-{2979286,3864314,3861617,1.485216,1.3752},
-{2979287,3863354,3862730,0.445642105263158,0.6048},
-{2979288,3863354,3862974,0.731,0.731},
-{2979289,3863969,3863354,0.387694736842105,0.433305882352941},
-{2979290,3864540,3865410,0.418963636363636,0.418963636363636},
-{2979291,3864541,3864101,0.195333333333333,0.195333333333333},
-{2979292,3863914,3864188,0.154955555555556,0.154955555555556},
-{2979293,3866355,3866014,0.135977777777778,0.135977777777778},
-{2979294,3866744,3866355,0.21168,0.249035294117647},
-{2979295,3866885,3866509,0.133269230769231,0.182368421052632},
-{2979296,3866885,3866707,0.131133333333333,0.131133333333333},
-{2979297,3866707,3866304,0.178009090909091,0.19581},
-{2979298,3866980,3866707,0.1663,0.173530434782609},
-{2979299,3866370,3866304,0.297022222222222,0.297022222222222},
-{2979300,3866370,3866582,0.133333333333333,0.133333333333333},
-{2979301,3866740,3866370,0.145088888888889,0.145088888888889},
-{2979302,3866642,3866740,0.222755555555556,0.222755555555556},
-{2979303,3866740,3866846,0.109644444444444,0.109644444444444},
-{2979304,3866980,3866846,0.0944666666666667,0.0944666666666667},
-{2979305,3867317,3866980,0.169153846153846,0.18325},
-{2979306,3866846,3867317,0.205244444444444,0.205244444444444},
-{2979307,3867317,3867759,0.234111111111111,0.234111111111111},
-{2979308,3867516,3867317,0.147222222222222,0.19875},
-{2979309,3867143,3867516,0.284815384615385,0.3366},
-{2979310,3867516,3867759,0.104088888888889,0.104088888888889},
-{2979311,3867678,3866885,0.302690322580645,0.375336},
-{2979312,3868152,3867678,0.219268965517241,0.21196},
-{2979313,3867759,3868152,-1,-1},
-{2979314,3868516,3868152,0.190071428571429,0.231391304347826},
-{2979315,3867656,3868784,0.470933333333333,0.470933333333333},
-{2979316,3870201,3869321,-1,-1},
-{2979317,3867628,3867150,0.208533333333333,0.208533333333333},
-{2979318,3869159,3868764,0.42033,0.42033},
-{2979319,3869739,3869159,0.3165,0.3165},
-{2979320,3869374,3869248,0.117644444444444,0.117644444444444},
-{2979321,3869326,3869374,0.167311111111111,0.167311111111111},
-{2979322,3869479,3869326,0.247155555555556,0.247155555555556},
-{2979323,3870055,3869374,0.279133333333333,0.279133333333333},
-{2979324,3870386,3870490,0.35943,0.35943},
-{2979325,3869980,3870237,0.243511111111111,0.243511111111111},
-{2979326,3870313,3870237,0.0281777777777778,0.0281777777777778},
-{2979327,3870248,3870313,0.195244444444444,0.195244444444444},
-{2979328,3870237,3869479,0.356355555555556,0.356355555555556},
-{2979329,3870313,3870605,0.0982222222222222,0.0982222222222222},
-{2979330,3870597,3870605,0.189646153846154,0.182622222222222},
-{2979331,3871880,3872269,0.151069565217391,0.165457142857143},
-{2979332,3873858,3873874,0.0947555555555556,0.0882206896551724},
-{2979333,3879696,3878822,-1,-1},
-{2979334,3880181,3879717,0.240777777777778,0.240777777777778},
-{2979335,3879700,3879716,0.101577777777778,0.101577777777778},
-{2979336,3879696,3879700,0.0674666666666667,0.0674666666666667},
-{2979337,3879696,3879717,0.153711111111111,0.153711111111111},
-{2979338,3880226,3880289,0.4752375,0.4752375},
-{2979339,3880226,3880213,0.1084,0.1084},
-{2979340,3880181,3880213,0.3018,0.3018},
-{2979341,3880163,3880181,0.1341375,0.165092307692308},
-{2979342,3880144,3880163,0.14535,0.184990909090909},
-{2979343,3880642,3880181,0.218044444444444,0.218044444444444},
-{2979344,3880610,3880289,0.2650875,0.21207},
-{2979345,3880610,3880712,-1,-1},
-{2979346,3880687,3880712,-1,-1},
-{2979347,3880687,3880642,-1,-1},
-{2979348,3880576,3880642,0.6961,0.6961},
-{2979349,3880984,3880610,0.203685714285714,0.194427272727273},
-{2979350,3881478,3880642,0.357511111111111,0.357511111111111},
-{2979351,3881737,3880984,0.487729411764706,0.41457},
-{2979352,3881588,3881737,0.389057142857143,0.40851},
-{2979353,3881588,3881512,0.276138461538461,0.276138461538461},
-{2979354,3882136,3882134,0.59528,0.59528},
-{2979355,3881463,3880338,-1,-1},
-{2979356,3882731,3882817,-1,-1},
-{2979357,3882134,3882114,1.07383636363636,1.07383636363636},
-{2979358,3881512,3881478,0.140725,0.14684347826087},
-{2979359,3883605,3883642,0.404733333333333,0.404733333333333},
-{2979360,3884066,3884128,-1,0.429777777777778},
-{2979361,3884687,3884628,0.75612,0.75612},
-{2979362,3884715,3884687,0.197188235294118,0.197188235294118},
-{2979363,3887571,3888042,0.259914285714286,0.237313043478261},
-{2979364,3885015,3885020,0.0905714285714286,0.1585},
-{2979365,3887571,3889116,0.74877,0.74877},
-{2979366,3889116,3889095,0.35996,0.3374625},
-{2979367,3884680,3885085,0.151288888888889,0.151288888888889},
-{2979368,3885862,3885789,0.595177777777778,0.595177777777778},
-{2979369,3885535,3886315,0.2978,0.2978},
-{2979370,3889116,3890497,0.78933,0.78933},
-{2979371,3890497,3890481,-1,-1},
-{2979372,3890497,3890847,0.148022222222222,0.148022222222222},
-{2979373,3893806,3894088,0.189371428571429,0.152953846153846},
-{2979374,3894088,3894120,0.44505,0.547753846153846},
-{2979375,3894088,3894564,-1,0.263256},
-{2979376,3893941,3893806,-1,0.263234482758621},
-{2979377,3894088,3894240,0.386494736842105,0.349685714285714},
-{2979378,3894826,3895423,0.233451428571429,0.2476},
-{2979379,3894131,3894252,-1,-1},
-{2979380,3894430,3894261,0.141,0.1498125},
-{2979381,3895744,3895637,0.0918818181818182,0.0918818181818182},
-{2979382,3895637,3895464,0.158311111111111,0.158311111111111},
-{2979383,3895637,3896112,0.287911111111111,0.287911111111111},
-{2979384,3895874,3896112,0.197863636363636,0.229105263157895},
-{2979385,3896112,3896226,0.1295625,0.109105263157895},
-{2979386,3895882,3896614,0.638739130434782,0.58764},
-{2979387,3896614,3897327,0.680714285714286,0.71475},
-{2979388,3897327,3897913,0.36125625,0.502617391304348},
-{2979389,3897913,3898460,0.274961538461538,0.297875},
-{2979390,3896614,3897066,0.421866666666667,0.33015652173913},
-{2979391,3896260,3896844,-1,0.882327272727273},
-{2979392,3896990,3897059,-1,0.053325},
-{2979393,3897059,3897199,-1,0.0998444444444444},
-{2979394,3897199,3897550,-1,0.324518181818182},
-{2979395,3897066,3897550,0.31575,0.344454545454545},
-{2979396,3897059,3897532,-1,0.344971428571429},
-{2979397,3897199,3897659,0.344885714285714,-1},
-{2979398,3897532,3897848,-1,-1},
-{2979399,3897550,3898065,-1,0.338018181818182},
-{2979400,3897576,3897700,-1,-1},
-{2979401,3898966,3899288,0.285175,-1},
-{2979402,3898065,3898187,0.0719714285714286,0.0839666666666667},
-{2979403,3898187,3898397,0.171176470588235,0.161666666666667},
-{2979404,3898397,3898549,0.0784571428571429,0.06865},
-{2979405,3898706,3899188,0.248622222222222,0.248622222222222},
-{2979406,3898853,3899188,0.3672375,0.267081818181818},
-{2979407,3898187,3898597,0.317008695652174,0.317008695652174},
-{2979408,3898597,3898706,0.0820285714285714,0.0820285714285714},
-{2979409,3898549,3898597,0.3882,0.3882},
-{2979410,3899288,3899528,0.131590909090909,0.131590909090909},
-{2979411,3899528,3899778,0.24879,0.24879},
-{2979412,3899188,3899262,0.0590608695652174,0.0522461538461538},
-{2979413,3899262,3899778,0.274,0.274},
-{2979414,3899528,3899812,0.161232,0.16795},
-{2979415,3899812,3899982,0.142452631578947,0.13533},
-{2979416,3899812,3900120,0.197666666666667,0.197666666666667},
-{2979417,3899808,3900120,0.159333333333333,0.159333333333333},
-{2979418,3899262,3899485,0.207266666666667,0.15545},
-{2979419,3897550,3898349,0.90135,0.554676923076923},
-{2979420,3897700,3898457,-1,0.4858},
-{2979421,3900071,3901021,0.479888888888889,0.46275},
-{2979422,3900312,3901244,0.40918125,0.503607692307692},
-{2979423,3898349,3898790,0.374563636363636,0.433705263157895},
-{2979424,3899153,3899562,0.352095652173913,0.352095652173913},
-{2979425,3898790,3899312,0.470325,0.37626},
-{2979426,3899312,3899562,0.207410526315789,0.231811764705882},
-{2979427,3899562,3899984,0.20788,0.20788},
-{2979428,3899688,3900108,0.32325,0.32325},
-{2979429,3899984,3900108,0.0869454545454545,0.0869454545454545},
-{2979430,3900108,3900403,0.165844444444444,0.165844444444444},
-{2979431,3899984,3900345,0.246711111111111,-1},
-{2979432,3900108,3900488,0.297954545454545,0.297954545454545},
-{2979433,3900345,3900488,0.0920666666666667,0.0920666666666667},
-{2979434,3900488,3900779,0.25275,0.25275},
-{2979435,3900779,3901252,0.35757,0.286056},
-{2979436,3900869,3901535,0.355064516129032,0.423346153846154},
-{2979437,3901252,3901535,0.210314285714286,0.184025},
-{2979438,3901205,3901821,0.370844444444444,0.400512},
-{2979439,3901535,3901821,0.192130434782609,0.163666666666667},
-{2979440,3899562,3900421,0.671575,0.671575},
-{2979441,3901535,3902151,0.341911111111111,0.341911111111111},
-{2979442,3901821,3902460,0.3291,0.3291},
-{2979443,3898276,3898790,0.492,0.351428571428571},
-{2979444,3898790,3899170,0.262638461538462,0.325171428571429},
-{2979445,3898650,3899170,0.299952,0.299952},
-{2979446,3899170,3899645,0.335863636363636,0.307875},
-{2979447,3899170,3899392,0.163688888888889,0.163688888888889},
-{2979448,3902151,3902754,0.469263157894737,0.469263157894737},
-{2979449,3901821,3902156,0.182904,0.175869230769231},
-{2979450,3902156,3902289,0.135642857142857,0.135642857142857},
-{2979451,3902289,3903314,0.635775,0.76293},
-{2979452,3902565,3902873,0.155844444444444,0.155844444444444},
-{2979453,3902873,3903105,0.172088888888889,0.172088888888889},
-{2979454,3902460,3903050,0.334533333333333,0.334533333333333},
-{2979455,3901947,3902453,0.3093,0.3093},
-{2979456,3902453,3902754,0.27945,0.263011764705882},
-{2979457,3902754,3903050,0.2862,0.195136363636364},
-{2979458,3903050,3903373,0.2659,0.217554545454545},
-{2979459,3902754,3903346,0.345311111111111,0.345311111111111},
-{2979460,3903050,3903593,0.343355555555556,0.343355555555556},
-{2979461,3903373,3903761,0.34248,0.34248},
-{2979462,3904147,3904312,0.135314285714286,0.135314285714286},
-{2979463,3903314,3903770,0.365208,0.351161538461538},
-{2979464,3903770,3904152,0.246375,0.203896551724138},
-{2979465,3904152,3904312,0.13455,0.129168},
-{2979466,3904152,3905204,0.589244444444444,-1},
-{2979467,3904312,3904574,0.20136,0.20136},
-{2979468,3904312,3904817,0.332378571428572,0.387775},
-{2979469,3904817,3905206,0.320542857142857,0.269256},
-{2979470,3904574,3905076,0.334377777777778,0.334377777777778},
-{2979471,3904564,3905177,0.407244444444444,0.407244444444444},
-{2979472,3904243,3904740,0.345622222222222,0.345622222222222},
-{2979473,3904574,3905353,0.500376,0.500376},
-{2979474,3905206,3906356,0.95261052631579,0.670355555555556},
-{2979475,3903593,3903985,0.229,0.229},
-{2979476,3903985,3904439,-1,0.216575},
-{2979477,3904439,3904740,0.167504347826087,0.167504347826087},
-{2979478,3904740,3905177,0.162218181818182,0.162218181818182},
-{2979479,3905177,3905484,0.147814285714286,0.159184615384615},
-{2979480,3904417,3904617,0.133622222222222,0.133622222222222},
-{2979481,3902873,3903132,0.153311111111111,0.153311111111111},
-{2979482,3906606,3907033,0.245530434782609,0.256690909090909},
-{2979483,3905865,3906108,0.123174193548387,0.141422222222222},
-{2979484,3906108,3906378,0.135561290322581,0.144910344827586},
-{2979485,3906378,3906606,0.185113043478261,0.193527272727273},
-{2979486,3907033,3907745,0.363822222222222,0.363822222222222},
-{2979487,3907745,3908507,0.374088888888889,0.374088888888889},
-{2979488,3907390,3908069,0.358288888888889,0.358288888888889},
-{2979489,3908069,3908816,0.371555555555556,0.371555555555556},
-{2979490,3908363,3909135,0.530242105263158,0.530242105263158},
-{2979491,3906378,3906984,0.356488888888889,0.356488888888889},
-{2979492,3906984,3907328,0.282675,0.22614},
-{2979493,3907328,3907745,0.28077,0.4011},
-{2979494,3907745,3908069,0.162888,0.162888},
-{2979495,3908069,3908363,0.170725,0.241023529411765},
-{2979496,3909135,3909384,0.168026086956522,0.19323},
-{2979497,3908799,3909384,0.341688888888889,0.341688888888889},
-{2979498,3909384,3909717,0.222057142857143,0.222057142857143},
-{2979499,3909717,3910051,0.158911111111111,0.158911111111111},
-{2979500,3910051,3910139,0.230844444444444,0.230844444444444},
-{2979501,3909384,3910166,0.381407142857143,0.368255172413793},
-{2979502,3909717,3910567,0.384533333333333,0.384533333333333},
-{2979503,3910051,3910865,0.376111111111111,0.376111111111111},
-{2979504,3909800,3910166,0.185492307692308,0.141847058823529},
-{2979505,3910166,3910567,0.23181,0.210736363636364},
-{2979506,3910567,3910865,0.22575,0.196304347826087},
-{2979507,3910865,3911011,0.37276,0.243104347826087},
-{2979508,3908799,3909474,0.357444444444444,0.357444444444444},
-{2979509,3909474,3909800,0.133327272727273,0.129405882352941},
-{2979510,3910949,3910837,0.20444347826087,0.20444347826087},
-{2979511,3911290,3911218,0.171038709677419,0.171038709677419},
-{2979512,3911218,3911099,0.326034782608696,0.357085714285714},
-{2979513,3911290,3912035,0.384422222222222,0.384422222222222},
-{2979514,3911218,3911730,0.35292,0.35292},
-{2979515,3904699,3905513,0.557165217391304,0.441889655172414},
-{2979516,3905513,3905601,0.0597333333333333,0.0896},
-{2979517,3905601,3905516,0.0629684210526316,0.0629684210526316},
-{2979518,3905944,3905601,0.225182608695652,0.235418181818182},
-{2979519,3905516,3905865,0.200423076923077,0.20844},
-{2979520,3906108,3906718,0.361955555555556,0.361955555555556},
-{2979521,3906718,3906984,0.207966666666667,0.207966666666667},
-{2979522,3904999,3905880,0.585981818181818,0.460414285714286},
-{2979523,3905880,3905944,0.0711666666666667,0.04575},
-{2979524,3905880,3906088,0.199231578947368,0.199231578947368},
-{2979525,3905226,3906088,0.460888888888889,0.460888888888889},
-{2979526,3905457,3906299,0.452444444444444,0.452444444444444},
-{2979527,3906088,3906299,0.134511111111111,0.134511111111111},
-{2979528,3906299,3906534,0.196663636363636,0.196663636363636},
-{2979529,3905944,3906170,0.123782608695652,0.101678571428571},
-{2979530,3906170,3906307,0.0939391304347826,0.0771642857142857},
-{2979531,3906170,3906889,0.514434782608696,0.514434782608696},
-{2979532,3905865,3906307,0.336272727272727,0.336272727272727},
-{2979533,3906307,3906609,0.153875,0.14772},
-{2979534,3906609,3906893,0.177977777777778,0.177977777777778},
-{2979535,3906893,3907203,0.169888888888889,0.169888888888889},
-{2979536,3906609,3906718,0.132830769230769,0.132830769230769},
-{2979537,3906893,3907255,0.277233333333333,0.277233333333333},
-{2979538,3906984,3907376,0.188711111111111,0.188711111111111},
-{2979539,3907376,3907689,0.23538,0.276917647058823},
-{2979540,3907376,3907684,0.3643,-1},
-{2979541,3912329,3912685,0.170622222222222,0.170622222222222},
-{2979542,3911597,3912685,0.534577777777778,0.534577777777778},
-{2979543,3912685,3912833,0.0818526315789474,0.0818526315789474},
-{2979544,3912833,3913098,0.19935,0.1772},
-{2979545,3910949,3911776,0.308066666666667,0.308066666666667},
-{2979546,3911897,3913098,1.5954,1.5954},
-{2979547,3913182,3912833,0.238575,0.238575},
-{2979548,3913448,3913182,0.20478947368421,0.20478947368421},
-{2979549,3913182,3913759,0.285866666666667,0.285866666666667},
-{2979550,3913098,3913428,0.216771428571429,0.239589473684211},
-{2979551,3913428,3913755,0.1617,0.168168},
-{2979552,3912542,3913755,0.534133333333333,0.534133333333333},
-{2979604,3859969,3859631,0.54468,0.54468},
-{2979616,3865495,3865623,0.48159,0.48159},
-{2979626,3866085,3864868,0.41522,0.461355555555556},
-{2979627,3867323,3866085,0.3644625,0.402165517241379},
-{2979628,3867008,3866576,0.50072,0.357657142857143},
-{2979629,3866828,3866576,0.15591,0.15591},
-{2979630,3866828,3867352,0.302022222222222,0.302022222222222},
-{2979631,3867133,3866828,0.133103225806452,0.171925},
-{2979632,3867133,3867656,0.306422222222222,0.306422222222222},
-{2979633,3867436,3867133,0.13089375,0.13089375},
-{2979634,3867653,3867436,0.122091891891892,0.122091891891892},
-{2979635,3867807,3867653,-1,-1},
-{2979636,3868540,3868131,0.191844444444444,0.191844444444444},
-{2979637,3868338,3868540,0.117644444444444,0.117644444444444},
-{2979638,3868901,3868540,0.373688888888889,0.373688888888889},
-{2979639,3869018,3867653,0.521733333333333,0.521733333333333},
-{2979640,3867436,3866928,0.229555555555556,0.229555555555556},
-{2979641,3870984,3870571,0.145688888888889,0.145688888888889},
-{2979642,3870158,3870135,-1,-1},
-{2979643,3870894,3870135,0.29335,0.306104347826087},
-{2979644,3868972,3869053,0.121933333333333,0.121933333333333},
-{2979645,3869155,3868972,-1,-1},
-{2979646,3869336,3869155,-1,-1},
-{2979647,3870072,3869336,0.253288888888889,0.253288888888889},
-{2979648,3869336,3869387,0.0579111111111111,0.0579111111111111},
-{2979649,3869387,3869442,0.0559777777777778,0.0559777777777778},
-{2979650,3869442,3869583,0.100155555555556,0.100155555555556},
-{2979651,3870682,3870877,0.132444444444444,0.132444444444444},
-{2979652,3870072,3870129,0.124511111111111,0.124511111111111},
-{2979653,3870909,3871535,-1,0.45312},
-{2979654,3871721,3872367,0.253147826086957,0.215644444444444},
-{2979655,3872269,3872254,0.0893555555555556,0.0893555555555556},
-{2979656,3872815,3872666,0.246555555555556,0.246555555555556},
-{2979657,3872367,3872269,0.211485714285714,0.193095652173913},
-{2979658,3872367,3872815,0.186485714285714,0.139864285714286},
-{2979659,3873858,3873872,0.1248,0.12064},
-{2979660,3873872,3874017,0.331232432432432,0.314246153846154},
-{2979661,3872417,3872367,0.155575,0.143607692307692},
-{2979662,3872417,3872879,0.241552941176471,0.241552941176471},
-{2979663,3872879,3872815,0.235585714285714,0.235585714285714},
-{2979664,3872499,3872417,0.141,0.135964285714286},
-{2979665,3871946,3872499,0.249942857142857,0.26244},
-{2979666,3872557,3872499,0.168625,0.183954545454545},
-{2979667,3872385,3872557,0.0586222222222222,0.0586222222222222},
-{2979668,3872385,3872739,-1,-1},
-{2979669,3872739,3872557,0.141124137931034,0.177939130434783},
-{2979670,3871334,3871256,-1,-1},
-{2979671,3871535,3871615,0.0432,0.0412363636363636},
-{2979672,3872283,3872767,-1,0.3651},
-{2979673,3872767,3872739,0.0561333333333333,0.07578},
-{2979674,3872856,3872767,0.214554545454545,0.214554545454545},
-{2979675,3871535,3871494,0.20724,0.287833333333333},
-{2979676,3871615,3872067,0.468141176470588,0.468141176470588},
-{2979677,3872856,3873195,-1,0.592090909090909},
-{2979678,3872905,3872856,0.16971,0.28285},
-{2979679,3872574,3872905,0.17685,-1},
-{2979680,3872905,3873195,0.21592,-1},
-{2979681,3872101,3872574,0.329742857142857,-1},
-{2979682,3878615,3878777,-1,-1},
-{2979683,3878359,3878615,-1,-1},
-{2979684,3879716,3879708,0.153266666666667,0.153266666666667},
-{2979685,3878770,3878518,-1,-1},
-{2979686,3879708,3880180,0.2884,0.2884},
-{2979687,3880099,3880793,0.388958823529412,0.400745454545455},
-{2979688,3881862,3881458,0.521307692307692,0.322714285714286},
-{2979689,3881483,3881344,0.160777777777778,0.131545454545455},
-{2979690,3881344,3881117,0.123947368421053,0.120769230769231},
-{2979691,3881458,3881344,0.08373,0.08373},
-{2979692,3881117,3881274,0.12705,0.112933333333333},
-{2979693,3881458,3881274,0.239633333333333,0.2054},
-{2979694,3881274,3881093,0.415661538461538,0.337725},
-{2979695,3880424,3880877,0.414,0.414},
-{2979696,3881093,3880877,0.235341176470588,0.235341176470588},
-{2979697,3878076,3877880,-1,-1},
-{2979698,3878518,3878076,-1,-1},
-{2979699,3878188,3878076,-1,-1},
-{2979700,3878188,3878057,-1,-1},
-{2979701,3878908,3879202,0.1548,0.1548},
-{2979702,3879636,3879202,0.3528,0.373552941176471},
-{2979703,3879202,3879471,0.227977777777778,0.227977777777778},
-{2979704,3879471,3879864,0.292257142857143,0.245496},
-{2979705,3880424,3880091,0.257444444444444,0.210636363636364},
-{2979706,3880091,3879792,0.305972727272727,0.217141935483871},
-{2979707,3880486,3880091,0.251622222222222,0.251622222222222},
-{2979708,3880864,3880486,0.286022222222222,0.286022222222222},
-{2979709,3880486,3880135,0.234488888888889,0.234488888888889},
-{2979710,3880644,3880326,0.230444444444444,0.345666666666667},
-{2979711,3880644,3880486,0.0988,0.0988},
-{2979712,3880163,3879696,0.243311111111111,0.243311111111111},
-{2979713,3881478,3881487,0.073075,0.0923052631578947},
-{2979714,3881483,3881487,0.401929411764706,0.401929411764706},
-{2979715,3882097,3882114,0.46308,0.46308},
-{2979716,3880180,3880576,0.336466666666667,0.336466666666667},
-{2979717,3881896,3881458,0.206133333333333,0.206133333333333},
-{2979718,3882308,3881896,0.225177777777778,0.225177777777778},
-{2979719,3881582,3880877,0.344511111111111,0.344511111111111},
-{2979720,3881794,3881582,0.173589473684211,0.157057142857143},
-{2979721,3881582,3881094,0.64348,0.567776470588235},
-{2979722,3881869,3882235,0.481044444444444,0.481044444444444},
-{2979723,3880644,3881094,0.2826,0.3297},
-{2979724,3884598,3884572,0.495,0.495},
-{2979725,3886220,3886355,0.07872,0.0874666666666667},
-{2979726,3886355,3887360,0.460246153846154,0.4432},
-{2979727,3886355,3886327,0.296911111111111,0.296911111111111},
-{2979728,3886327,3886291,0.300333333333333,0.300333333333333},
-{2979729,3886134,3886291,0.0659777777777778,0.08907},
-{2979730,3886291,3887281,0.39094,0.316978378378378},
-{2979731,3886291,3886307,0.215244444444444,0.215244444444444},
-{2979732,3887360,3889299,0.697044444444444,0.697044444444444},
-{2979733,3887281,3889963,1.00644444444444,1.00644444444444},
-{2979734,3886648,3886605,0.45696,0.45696},
-{2979735,3889963,3890236,0.21676,0.16257},
-{2979736,3889963,3890085,0.52888,0.52888},
-{2979737,3885197,3885419,-1,-1},
-{2979738,3885419,3885395,-1,-1},
-{2979739,3885419,3885652,-1,-1},
-{2979740,3885652,3885620,-1,-1},
-{2979741,3884585,3884413,0.564022222222222,0.564022222222222},
-{2979742,3884766,3885036,-1,0.577094117647059},
-{2979788,3882361,3882167,0.148408695652174,0.200788235294118},
-{2979789,3882167,3882069,0.0751153846153846,0.0673448275862069},
-{2979790,3881905,3882069,0.09448,0.109015384615385},
-{2979795,3894041,3894295,-1,-1},
-{2979796,3894295,3894587,-1,-1},
-{2979797,3898295,3898789,0.4596,0.40215},
-{2979798,3899043,3900231,0.525763636363636,0.49572},
-{2979799,3899877,3900181,0.187022222222222,0.187022222222222},
-{2979800,3899490,3900181,0.462954545454546,-1},
-{2979801,3900181,3900620,0.263333333333333,-1},
-{2979802,3899692,3900834,0.86214,0.86214},
-{2979803,3901189,3901529,0.159977777777778,0.159977777777778},
-{2979804,3900620,3901529,0.524244444444444,0.524244444444444},
-{2979805,3901529,3901838,0.183044444444444,0.183044444444444},
-{2979806,3900834,3901838,0.547333333333333,0.547333333333333},
-{2979807,3900102,3901235,0.641622222222222,0.641622222222222},
-{2979808,3898295,3898937,0.435488888888889,0.435488888888889},
-{2979809,3901838,3902144,0.142055172413793,0.142055172413793},
-{2979810,3903346,3903610,0.175155555555556,0.175155555555556},
-{2979811,3903270,3903610,0.20195,0.2308},
-{2979812,3903610,3903985,0.177336,0.13854375},
-{2979813,3902116,3901811,0.170733333333333,0.170733333333333},
-{2979814,3902144,3902436,0.221236363636364,0.221236363636364},
-{2979815,3902116,3902436,0.20229,0.20229},
-{2979816,3901319,3902039,0.372133333333333,0.372133333333333},
-{2979817,3902039,3902116,0.060312,0.060312},
-{2979818,3902436,3902786,0.246088888888889,0.246088888888889},
-{2979819,3902708,3903187,0.5856,0.421632},
-{2979820,3903187,3903701,0.58332,0.58332},
-{2979821,3903519,3904154,0.347688888888889,0.347688888888889},
-{2979822,3903985,3904154,0.1399125,0.1399125},
-{2979823,3904154,3904377,0.135577777777778,0.135577777777778},
-{2979824,3903698,3904377,0.368177777777778,0.397632},
-{2979825,3904377,3904699,0.236085714285714,0.206575},
-{2979826,3903892,3904999,0.5748,0.5748},
-{2979827,3904129,3905226,0.604155555555556,0.604155555555556},
-{2979828,3902786,3902990,0.146111111111111,0.146111111111111},
-{2979829,3902990,3903173,0.1416,0.1416},
-{2979830,3904290,3905457,0.593379310344827,0.593379310344827},
-{2979831,3901660,3902039,0.641778947368421,0.641778947368421},
-{2979832,3901866,3902990,0.554466666666667,0.554466666666667},
-{2979833,3902104,3903173,0.548533333333333,0.548533333333333},
-{2979834,3903173,3903395,0.148177777777778,0.148177777777778},
-{2979835,3903395,3903574,0.153555555555556,0.153555555555556},
-{2979836,3903395,3903701,0.214152,0.214152},
-{2979837,3903701,3903924,0.158644444444444,0.158644444444444},
-{2979838,3903924,3904077,0.107955555555556,0.107955555555556},
-{2979839,3903701,3904290,0.33745,0.33745},
-{2979840,3904077,3904650,0.33612,0.33612},
-{2979841,3904727,3906041,0.6253,0.6253},
-{2979842,3900281,3901413,0.6408,0.6408},
-{2979843,3900687,3901866,0.53986875,0.664453846153846},
-{2979844,3902351,3903395,0.524335714285714,0.524335714285714},
-{2979845,3906041,3906600,0.330355555555556,0.330355555555556},
-{2979846,3906276,3906860,0.326622222222222,0.326622222222222},
-{2979847,3906813,3907484,0.3709,0.387026086956522},
-{2979848,3907716,3907672,0.333022222222222,0.333022222222222},
-{2979849,3907716,3908217,0.3935625,0.3935625},
-{2979850,3907170,3907672,0.24,0.24},
-{2979851,3907672,3908000,0.20439,0.20439},
-{2979852,3907689,3908000,0.165375,0.233470588235294},
-{2979853,3907672,3908217,0.259511111111111,0.259511111111111},
-{2979854,3907484,3908138,0.448854545454545,0.429339130434783},
-{2979855,3908000,3908522,0.195908571428571,0.195908571428571},
-{2979856,3908217,3908522,0.143977777777778,0.143977777777778},
-{2979857,3908522,3908821,0.1704,0.1704},
-{2979858,3908138,3908821,0.331546153846154,0.307864285714286},
-{2979859,3908095,3909153,0.56796,-1},
-{2979860,3908821,3909153,0.155544827586207,0.145509677419355},
-{2979861,3909153,3909474,0.151965517241379,0.1469},
-{2979862,3908821,3909097,0.139666666666667,0.139666666666667},
-{2979863,3909153,3909670,0.281244444444444,0.281244444444444},
-{2979864,3908616,3909097,0.242177777777778,0.242177777777778},
-{2979865,3908863,3909322,0.212622222222222,0.212622222222222},
-{2979866,3909097,3909322,0.119955555555556,0.119955555555556},
-{2979867,3909322,3909913,0.3076,0.3076},
-{2979868,3909703,3909913,0.118685714285714,0.138466666666667},
-{2979869,3909322,3909670,0.1662,0.1662},
-{2979870,3909670,3910358,0.309288888888889,0.309288888888889},
-{2979871,3909913,3910358,0.19885,0.216927272727273},
-{2979872,3909348,3909517,-1,-1},
-{2979873,3909517,3909609,-1,-1},
-{2979874,3907690,3908603,0.417311111111111,0.417311111111111},
-{2979875,3905343,3906813,0.879675,0.781933333333333},
-{2979876,3905551,3907113,1.09149,0.873192},
-{2979877,3905986,3907690,0.973625,0.93468},
-{2979878,3908908,3909180,0.182514285714286,0.201726315789474},
-{2979879,3911207,3911497,0.155466666666667,0.155466666666667},
-{2979880,3911497,3911732,0.138,0.138},
-{2979881,3911354,3911497,0.14072,0.14072},
-{2979882,3911354,3911732,0.148488888888889,0.148488888888889},
-{2979883,3911207,3911701,0.2546,0.2546},
-{2979884,3911701,3912221,0.4300125,0.4300125},
-{2979885,3911701,3912009,0.165222222222222,0.165222222222222},
-{2979886,3911497,3911882,0.194022222222222,0.194022222222222},
-{2979887,3911882,3912009,0.0616551724137931,0.0616551724137931},
-{2979888,3912009,3912227,0.114860869565217,0.110075},
-{2979889,3912227,3912605,0.230333333333333,0.218210526315789},
-{2979890,3911732,3912440,0.247977777777778,0.247977777777778},
-{2979891,3911882,3912440,0.299822222222222,0.299822222222222},
-{2979892,3912227,3913038,0.386155555555556,0.386155555555556},
-{2979893,3912440,3913038,0.180488888888889,0.180488888888889},
-{2979894,3914836,3915258,0.343121739130435,0.328825},
-{2979895,3915447,3915166,-1,-1},
-{2979896,3915166,3915161,-1,-1},
-{2979897,3915166,3915495,-1,-1},
-{2979940,3866085,3866032,0.256955555555556,0.256955555555556},
-{2979941,3865839,3865450,0.632533333333333,0.632533333333333},
-{2979955,3865354,3864647,0.251688888888889,0.251688888888889},
-{2979956,3865235,3864632,0.29904,0.29904},
-{2979959,3865450,3865354,0.18305,0.231221052631579},
-{2979960,3865354,3865235,0.164746153846154,0.203971428571429},
-{2979961,3866526,3866024,0.664355555555556,0.664355555555556},
-{2979962,3866336,3865354,0.366155555555556,0.366155555555556},
-{2979967,3864988,3865235,0.380968421052632,0.314713043478261},
-{2979975,3866949,3866289,0.827034782608696,0.827034782608696},
-{2979976,3865846,3865235,0.235444444444444,0.235444444444444},
-{2979977,3866395,3865846,0.189622222222222,0.189622222222222},
-{2979978,3866695,3866611,0.263711111111111,0.263711111111111},
-{2979980,3865690,3864988,0.208129411764706,0.202182857142857},
-{2979981,3869053,3868712,0.247114285714286,0.247114285714286},
-{2979982,3868712,3868619,0.0720666666666667,0.0720666666666667},
-{2979983,3868712,3869091,0.618366666666667,0.618366666666667},
-{2979984,3868619,3867870,0.2668,0.2668},
-{2979985,3867806,3867870,0.265257142857143,0.293178947368421},
-{2979986,3868619,3868503,0.375028571428571,0.342417391304348},
-{2979987,3869053,3869206,0.151304347826087,0.145},
-{2979988,3867291,3866949,0.148644444444444,-1},
-{2979989,3867705,3867291,0.235314285714286,-1},
-{2979990,3867806,3867705,0.166894736842105,0.15855},
-{2979991,3868301,3867705,0.25904347826087,0.25904347826087},
-{2979992,3868647,3868301,0.177133333333333,0.177133333333333},
-{2979993,3868879,3868874,0.121547368421053,0.121547368421053},
-{2979994,3868777,3868301,0.182666666666667,0.182666666666667},
-{2979995,3867291,3866796,0.546444444444445,0.546444444444445},
-{2979996,3867705,3867383,0.392048275862069,0.392048275862069},
-{2979997,3868874,3868777,0.0938444444444444,0.0938444444444444},
-{2979998,3869206,3869231,0.0311612903225806,0.0292727272727273},
-{2979999,3869231,3869577,0.337311111111111,0.337311111111111},
-{2980000,3869583,3869755,0.119911111111111,0.119911111111111},
-{2980001,3869888,3869755,0.07665,0.07665},
-{2980002,3870129,3870134,0.0995777777777778,0.0995777777777778},
-{2980003,3870134,3869888,0.126882352941176,0.126882352941176},
-{2980004,3870284,3870134,0.0530444444444444,0.059675},
-{2980005,3871106,3870284,0.3675,0.310961538461539},
-{2980006,3869888,3869832,0.5058,0.5058},
-{2980007,3870297,3869990,0.1395,0.1395},
-{2980008,3870239,3870297,0.0857777777777778,0.0857777777777778},
-{2980009,3870297,3870227,0.117577777777778,0.117577777777778},
-{2980010,3870358,3870444,0.159366666666667,0.220661538461538},
-{2980011,3869927,3868874,0.390222222222222,0.390222222222222},
-{2980012,3870074,3869927,0.120866666666667,0.120866666666667},
-{2980013,3869927,3869776,0.126222222222222,0.126222222222222},
-{2980014,3869776,3868777,0.387177777777778,0.387177777777778},
-{2980015,3870204,3869776,0.154622222222222,0.154622222222222},
-{2980016,3870487,3870204,-1,-1},
-{2980017,3866796,3866730,0.0743111111111111,0.0743111111111111},
-{2980018,3866730,3866695,-1,-1},
-{2980019,3867235,3866796,0.190486956521739,0.190486956521739},
-{2980020,3867383,3867235,0.09378,0.09378},
-{2980021,3867961,3867383,0.454828571428571,0.415278260869565},
-{2980022,3867961,3867752,0.0968222222222222,0.0968222222222222},
-{2980023,3869174,3868191,0.362311111111111,0.362311111111111},
-{2980024,3869007,3868191,0.340066666666667,0.340066666666667},
-{2980025,3869007,3869017,0.0398666666666667,0.0398666666666667},
-{2980026,3869904,3869571,-1,-1},
-{2980027,3869904,3870073,-1,-1},
-{2980028,3870956,3870350,-1,0.59856},
-{2980029,3871269,3870444,0.397,0.378954545454545},
-{2980030,3871337,3871541,0.0952666666666667,0.0952666666666667},
-{2980031,3871164,3871666,0.161777777777778,0.161777777777778},
-{2980032,3870999,3871592,0.344622222222222,-1},
-{2980033,3871820,3871666,-1,-1},
-{2980034,3871666,3872018,0.169844444444444,0.169844444444444},
-{2980035,3872018,3871676,0.117777777777778,0.117777777777778},
-{2980036,3871820,3872178,-1,-1},
-{2980037,3872018,3872178,0.0635333333333333,0.0635333333333333},
-{2980038,3870977,3871119,-1,-1},
-{2980039,3871119,3871592,0.191888888888889,0.191888888888889},
-{2980040,3871119,3871104,0.133111111111111,0.133111111111111},
-{2980041,3870524,3869904,-1,-1},
-{2980042,3871104,3870929,0.0638444444444444,0.0638444444444444},
-{2980043,3871592,3871553,0.0866888888888889,0.0866888888888889},
-{2980044,3871553,3871540,0.0846,0.0846},
-{2980045,3871906,3871553,0.22128,0.22128},
-{2980046,3871906,3871824,0.0677111111111111,0.0677111111111111},
-{2980047,3871247,3871104,0.0701368421052632,0.0701368421052632},
-{2980048,3871553,3871247,0.12843,0.12843},
-{2980049,3872181,3871906,0.144352941176471,0.144352941176471},
-{2980050,3872088,3871824,0.1556625,0.1556625},
-{2980051,3872668,3872088,0.260295652173913,0.352164705882353},
-{2980052,3872088,3872059,0.030768,0.0452470588235294},
-{2980053,3871494,3871716,0.120046153846154,0.15606},
-{2980054,3871716,3871820,0.237022222222222,0.237022222222222},
-{2980055,3872181,3872438,0.165177777777778,0.165177777777778},
-{2980056,3872876,3872668,0.157822222222222,0.157822222222222},
-{2980057,3869523,3869676,0.167644444444444,0.167644444444444},
-{2980058,3870113,3869523,0.200377777777778,0.200377777777778},
-{2980059,3870113,3870324,0.229955555555556,0.229955555555556},
-{2980060,3870243,3870113,0.0910714285714286,0.0910714285714286},
-{2980061,3872877,3873175,0.177094736842105,0.2103},
-{2980062,3872810,3873246,0.176555555555556,0.176555555555556},
-{2980063,3879933,3879221,-1,-1},
-{2980064,3880135,3879621,0.444888888888889,0.462},
-{2980065,3879496,3879621,0.12774,0.12774},
-{2980066,3877493,3878068,0.411422222222222,0.411422222222222},
-{2980067,3878885,3878068,0.425611764705882,0.425611764705882},
-{2980068,3878031,3878605,0.3958,0.3958},
-{2980069,3878605,3879152,0.288931034482759,0.288931034482759},
-{2980070,3879152,3879384,0.17355,0.204176470588235},
-{2980071,3878605,3879782,0.697133333333333,0.697133333333333},
-{2980072,3879221,3878654,-1,-1},
-{2980073,3881523,3880980,0.365355555555556,0.365355555555556},
-{2980074,3881364,3880980,0.223666666666667,0.223666666666667},
-{2980075,3881652,3881364,0.326133333333333,0.326133333333333},
-{2980076,3881364,3881229,0.171733333333333,0.171733333333333},
-{2980077,3883596,3883371,0.37425,0.415833333333333},
-{2980078,3883371,3883105,0.282622222222222,0.282622222222222},
-{2980079,3883371,3883326,0.286644444444444,0.286644444444444},
-{2980080,3883105,3883326,0.0888888888888889,0.0888888888888889},
-{2980081,3883105,3882858,0.3882,0.3882},
-{2980082,3883275,3882858,0.138370588235294,-1},
-{2980083,3883326,3883275,0.384275,0.384275},
-{2980084,3882858,3882558,0.419571428571428,0.518294117647059},
-{2980085,3882853,3883275,0.5394,0.5394},
-{2980086,3882558,3882382,0.255366666666667,0.255366666666667},
-{2980087,3882853,3882558,0.2104125,-1},
-{2980088,3883242,3882853,0.3007875,-1},
-{2980089,3884413,3884391,0.34188,0.25641},
-{2980090,3884920,3884391,0.299305263157895,0.334517647058824},
-{2980091,3884195,3883677,-1,0.554628571428571},
-{2980092,3880673,3880868,0.123777777777778,0.123777777777778},
-{2980093,3887603,3887607,0.151022222222222,-1},
-{2980094,3887922,3887909,0.155155555555556,0.155155555555556},
-{2980095,3888075,3888050,-1,0.148},
-{2980096,3887202,3887607,-1,0.147888888888889},
-{2980097,3888050,3888568,-1,0.188155555555556},
-{2980098,3887570,3887171,-1,0.1452},
-{2980099,3887523,3887570,-1,0.137644444444444},
-{2980100,3887841,3887871,0.141,0.141},
-{2980101,3888159,3888169,0.136311111111111,-1},
-{2980102,3886582,3886509,0.40756875,0.43474},
-{2980103,3887841,3887752,0.419883870967742,0.419883870967742},
-{2980104,3884806,3885014,0.179353846153846,0.137152941176471},
-{2980105,3884784,3884413,0.177954545454545,0.206052631578947},
-{2980106,3884984,3884784,0.102409090909091,0.18775},
-{2980107,3884784,3884806,0.314446153846154,0.4542},
-{2980108,3885014,3885546,0.289831578947368,0.393342857142857},
-{2980109,3885546,3885524,0.490733333333333,0.464905263157895},
-{2980110,3885524,3885918,0.309230769230769,0.268},
-{2980111,3885816,3885759,0.98688,0.98688},
-{2980112,3889274,3889228,0.429666666666667,0.429666666666667},
-{2980113,3889927,3889874,0.316133333333333,0.316133333333333},
-{2980114,3889874,3889842,0.6577,0.6577},
-{2980115,3889758,3889842,0.486644444444444,0.486644444444444},
-{2980116,3885604,3885545,0.67374,0.67374},
-{2980117,3885269,3885545,0.111688888888889,0.111688888888889},
-{2980118,3885545,3885553,0.28554,0.28554},
-{2980119,3886509,3886428,0.646733333333333,0.48505},
-{2980120,3887752,3887661,0.539527272727273,0.539527272727273},
-{2980121,3889133,3889018,0.649755555555556,0.649755555555556},
-{2980122,3889758,3889650,0.89118,0.89118},
-{2980123,3890476,3890438,0.301303448275862,0.416085714285714},
-{2980124,3890438,3890375,0.5796,0.5796},
-{2980125,3890375,3890321,0.568460869565217,0.568460869565217},
-{2980126,3890321,3890225,0.942284210526316,0.89517},
-{2980127,3891553,3891513,0.442155555555556,0.37306875},
-{2980128,3890945,3891513,0.29475652173913,0.322828571428571},
-{2980129,3891513,3891508,0.101775,0.116314285714286},
-{2980130,3891508,3891492,0.13035,0.125855172413793},
-{2980131,3891492,3891467,0.2838,0.272448},
-{2980132,3891467,3891358,0.577316129032258,0.59656},
-{2980133,3884763,3884117,0.524,0.524},
-{2980134,3884117,3884528,0.274418181818182,0.274418181818182},
-{2980135,3884877,3884958,0.321866666666667,0.321866666666667},
-{2980136,3885164,3884877,0.24595,0.24595},
-{2980137,3885124,3885450,0.19945,0.19945},
-{2980138,3885124,3885483,0.211222222222222,0.211222222222222},
-{2980139,3884877,3885011,0.127835294117647,0.127835294117647},
-{2980140,3885011,3885124,0.0409741935483871,0.0438},
-{2980141,3885011,3884734,0.154509677419355,0.154509677419355},
-{2980142,3884734,3884528,0.1368,0.146933333333333},
-{2980143,3884734,3885481,0.367779310344828,0.367779310344828},
-{2980144,3884528,3884482,0.0420923076923077,0.043776},
-{2980145,3892149,3892332,0.0806444444444444,0.0806444444444444},
-{2980146,3892148,3892149,0.0808,0.0808},
-{2980147,3891645,3891508,0.11168,-1},
-{2980148,3891492,3891626,0.0678,0.0941666666666667},
-{2980149,3891626,3891787,0.0890347826086957,0.0930818181818182},
-{2980150,3891787,3892004,0.153866666666667,0.131885714285714},
-{2980151,3892004,3891985,0.384733333333333,0.46168},
-{2980152,3892148,3892189,-1,0.388888888888889},
-{2980153,3892332,3892638,0.5352,-1},
-{2980154,3892189,3892290,-1,0.0797625},
-{2980155,3892290,3892638,-1,0.28908},
-{2980156,3892290,3892263,-1,0.405276923076923},
-{2980157,3892263,3892240,-1,0.377314285714286},
-{2980158,3892263,3892898,0.265,-1},
-{2980159,3892638,3892898,-1,0.376168421052632},
-{2980160,3892898,3893055,0.170688888888889,0.170688888888889},
-{2980161,3891985,3891964,0.2568,0.321},
-{2980162,3891964,3892293,0.157711111111111,0.157711111111111},
-{2980163,3899407,3900339,0.606133333333333,0.606133333333333},
-{2980164,3899215,3899407,-1,0.154566666666667},
-{2980165,3899407,3899591,-1,0.133663636363636},
-{2980166,3898902,3899344,0.267266666666667,0.36081},
-{2980167,3901103,3902351,0.748852173913043,0.615128571428571},
-{2980168,3901568,3902837,0.639422222222222,0.639422222222222},
-{2980169,3902837,3903788,0.532888888888889,0.532888888888889},
-{2980170,3903574,3903720,0.190835294117647,0.190835294117647},
-{2980171,3903720,3903788,0.05795,0.06954},
-{2980172,3903720,3904077,0.25215,0.25215},
-{2980173,3901781,3903064,0.642822222222222,0.642822222222222},
-{2980174,3903064,3904023,0.525822222222222,0.525822222222222},
-{2980175,3903788,3904023,0.154577777777778,0.154577777777778},
-{2980176,3904023,3904252,0.20931,0.20931},
-{2980177,3905184,3904252,0.493377777777778,0.493377777777778},
-{2980178,3904252,3904444,0.20571,0.20571},
-{2980179,3904444,3904653,0.243733333333333,0.243733333333333},
-{2980180,3904653,3904862,0.308261538461538,0.308261538461538},
-{2980181,3904862,3905087,0.28428,0.193827272727273},
-{2980182,3905087,3905265,0.252975,0.16865},
-{2980183,3904444,3905343,0.463427586206897,0.433529032258065},
-{2980184,3903489,3904444,0.553512,0.44638064516129},
-{2980185,3903682,3904653,0.549672,0.572575},
-{2980186,3900483,3900694,0.168207692307692,0.168207692307692},
-{2980187,3900694,3900891,0.11852,0.11852},
-{2980188,3900694,3901568,0.58635,0.58635},
-{2980189,3900891,3901781,0.514222222222222,0.514222222222222},
-{2980190,3904653,3905551,0.496533333333333,0.496533333333333},
-{2980191,3905087,3905986,0.57764347826087,0.492066666666667},
-{2980192,3905265,3906199,0.607309090909091,0.607309090909091},
-{2980193,3904701,3905265,0.305121428571429,0.305121428571429},
-{2980194,3904385,3904701,0.2484,-1},
-{2980195,3905265,3905496,0.3043125,0.3043125},
-{2980196,3902284,3901711,0.2876,0.2876},
-{2980197,3901463,3901711,0.126311111111111,0.126311111111111},
-{2980198,3904447,3905087,0.278254545454545,0.278254545454545},
-{2980199,3904174,3904447,-1,0.222284210526316},
-{2980200,3906199,3908004,1.001975,0.80158},
-{2980201,3909180,3909609,0.209866666666667,0.209866666666667},
-{2980202,3908272,3909180,0.55779,0.55779},
-{2980203,3909609,3909859,0.135022222222222,0.135022222222222},
-{2980204,3909180,3909353,0.1002,0.1002},
-{2980205,3909353,3909531,0.0806222222222222,0.0806222222222222},
-{2980206,3908518,3909353,0.402733333333333,0.402733333333333},
-{2980207,3909859,3909531,0.208755555555556,0.208755555555556},
-{2980208,3909531,3908743,0.412911111111111,0.412911111111111},
-{2980209,3906774,3907233,0.215807142857143,0.30213},
-{2980210,3907233,3907736,0.204774193548387,0.186705882352941},
-{2980211,3907736,3908296,0.227148387096774,0.185305263157895},
-{2980212,3908296,3908889,0.284424,0.25395},
-{2980213,3907233,3908017,0.4989,0.577673684210526},
-{2980214,3907736,3908599,0.415044444444444,0.415044444444444},
-{2980215,3908296,3909163,0.422711111111111,0.422711111111111},
-{2980216,3905553,3906885,0.678835714285714,1.26716},
-{2980217,3905774,3907082,0.93537,0.93537},
-{2980218,3908017,3909397,1.43065714285714,1.43065714285714},
-{2980219,3908599,3910029,0.588017647058824,0.588017647058824},
-{2980220,3909163,3910831,0.661676470588235,0.661676470588235},
-{2980322,3865183,3864876,0.131426086956522,0.131426086956522},
-{2980323,3865170,3864703,0.1666,0.1666},
-{2980324,3865170,3865183,0.183111111111111,0.183111111111111},
-{2980325,3865132,3865170,0.190755555555556,0.190755555555556},
-{2980326,3864906,3864181,0.390886956521739,0.390886956521739},
-{2980327,3864907,3864584,0.19797,0.19797},
-{2980328,3864907,3864906,0.171369230769231,0.171369230769231},
-{2980329,3864906,3864914,0.15092,0.15092},
-{2980330,3864914,3864664,0.109622222222222,0.109622222222222},
-{2980331,3865132,3864907,0.0987545454545455,0.0987545454545455},
-{2980332,3865607,3865132,0.224657142857143,0.224657142857143},
-{2980333,3865776,3864914,0.595371428571428,0.595371428571428},
-{2980334,3865665,3865183,0.174021428571429,0.174021428571429},
-{2980335,3865690,3865665,0.2014,0.2014},
-{2980336,3865665,3865643,0.1743,0.1743},
-{2980337,3865643,3865607,0.192311111111111,0.192311111111111},
-{2980338,3865643,3865170,0.175844444444444,0.175844444444444},
-{2980339,3865607,3865754,0.121975,0.133063636363636},
-{2980340,3865754,3865776,0.057,0.0619565217391304},
-{2980341,3865776,3865814,0.201685714285714,0.176475},
-{2980346,3865224,3864135,0.478755555555556,0.478755555555556},
-{2980347,3865640,3865893,0.6828375,0.376737931034483},
-{2980348,3866198,3866397,0.340822222222222,0.340822222222222},
-{2980349,3866525,3865690,0.292288888888889,0.292288888888889},
-{2980350,3866471,3865690,0.31145,0.219847058823529},
-{2980351,3866339,3865665,0.222579310344828,0.21516},
-{2980352,3867215,3866339,0.361930434782609,0.308311111111111},
-{2980353,3866275,3865643,0.223688888888889,0.223688888888889},
-{2980354,3866525,3866471,0.0695142857142857,0.0695142857142857},
-{2980355,3866471,3866339,0.129511111111111,0.129511111111111},
-{2980356,3866339,3866275,0.167616,0.2328},
-{2980357,3866545,3866684,0.212977777777778,0.212977777777778},
-{2980358,3866239,3865754,0.174622222222222,0.174622222222222},
-{2980359,3866275,3866239,0.285333333333333,0.285333333333333},
-{2980360,3867571,3866525,0.379,0.379},
-{2980361,3868320,3867753,0.205153846153846,0.205153846153846},
-{2980362,3868853,3868320,0.214575,0.214575},
-{2980363,3867333,3866851,0.173777777777778,0.173777777777778},
-{2980364,3867460,3867333,0.339755555555556,0.339755555555556},
-{2980365,3868391,3867333,0.392377777777778,0.392377777777778},
-{2980366,3868492,3867811,0.238088888888889,0.238088888888889},
-{2980367,3868453,3867568,0.321355555555556,0.321355555555556},
-{2980368,3869284,3869523,0.249133333333333,0.249133333333333},
-{2980369,3868607,3868492,0.265828571428571,0.27912},
-{2980370,3868492,3868453,0.03748,0.0624666666666667},
-{2980371,3868453,3868391,0.136846153846154,0.14825},
-{2980372,3868391,3868374,0.120257142857143,0.114790909090909},
-{2980373,3868374,3868279,0.1802,0.300333333333333},
-{2980374,3868279,3868199,0.209509090909091,0.209509090909091},
-{2980375,3866830,3868279,0.526511111111111,0.526511111111111},
-{2980376,3870511,3870907,0.200885714285714,0.21093},
-{2980377,3869185,3868808,0.457777777777778,0.457777777777778},
-{2980378,3868279,3868807,0.190444444444444,0.190444444444444},
-{2980379,3868684,3869016,0.122955555555556,0.122955555555556},
-{2980380,3869016,3869353,0.123444444444444,0.123444444444444},
-{2980381,3869539,3869933,0.131866666666667,0.131866666666667},
-{2980382,3870907,3870997,0.550984615384615,0.550984615384615},
-{2980383,3869015,3869388,0.178172727272727,0.19599},
-{2980384,3869388,3869728,0.225694736842105,0.2680125},
-{2980385,3869933,3870590,0.220777777777778,0.220777777777778},
-{2980386,3870637,3870590,0.1338375,0.1338375},
-{2980387,3870590,3870496,0.163466666666667,0.163466666666667},
-{2980388,3871037,3870496,0.197955555555556,0.197955555555556},
-{2980389,3869728,3870212,0.174222222222222,0.174222222222222},
-{2980390,3870212,3870390,0.0908666666666667,0.0908666666666667},
-{2980391,3870390,3870299,0.106822222222222,0.106822222222222},
-{2980392,3870907,3871789,0.319666666666667,0.319666666666667},
-{2980393,3870997,3871631,0.210644444444444,0.210644444444444},
-{2980394,3871631,3871789,0.145711111111111,0.145711111111111},
-{2980395,3872079,3871789,0.221733333333333,0.221733333333333},
-{2980396,3871278,3871179,0.172288888888889,0.172288888888889},
-{2980397,3871838,3871278,-1,-1},
-{2980398,3867023,3867799,0.301755555555556,0.301755555555556},
-{2980399,3869420,3869621,0.394747826086956,0.56745},
-{2980400,3869621,3869728,0.19548,0.154326315789474},
-{2980401,3870081,3869621,0.279633333333333,0.201336},
-{2980402,3870081,3870212,0.152577777777778,0.152577777777778},
-{2980403,3870793,3870081,0.42129,0.312066666666667},
-{2980404,3871186,3870523,0.287577777777778,0.287577777777778},
-{2980405,3870793,3871186,0.209977777777778,0.209977777777778},
-{2980406,3868320,3868441,0.231555555555556,0.231555555555556},
-{2980407,3871789,3872214,0.147111111111111,0.147111111111111},
-{2980408,3872214,3872604,0.138088888888889,0.138088888888889},
-{2980409,3872604,3872991,0.140288888888889,0.140288888888889},
-{2980410,3872991,3873308,0.130533333333333,0.130533333333333},
-{2980411,3872214,3872412,0.186111111111111,0.186111111111111},
-{2980412,3872412,3872832,0.136688888888889,0.136688888888889},
-{2980413,3872604,3872832,0.187177777777778,0.187177777777778},
-{2980414,3871631,3872831,0.426577777777778,0.426577777777778},
-{2980415,3872831,3872991,0.170955555555556,0.170955555555556},
-{2980416,3872741,3872831,0.19692,0.19692},
-{2980417,3872607,3872741,0.293245161290323,0.363624},
-{2980418,3872741,3873117,0.156688888888889,0.156688888888889},
-{2980419,3879384,3878760,0.299576470588235,0.308654545454545},
-{2980420,3878241,3878041,0.0544833333333333,0.0544833333333333},
-{2980421,3878460,3878241,0.149005714285714,0.149005714285714},
-{2980422,3879782,3880245,0.319844444444444,0.319844444444444},
-{2980423,3880062,3879591,-1,-1},
-{2980424,3878460,3879501,-1,-1},
-{2980425,3878241,3879275,0.5192,0.5192},
-{2980426,3881570,3880784,0.498288888888889,0.498288888888889},
-{2980427,3881894,3881033,0.698044444444444,0.698044444444444},
-{2980428,3883677,3883209,0.689371428571429,0.689371428571429},
-{2980429,3882443,3881919,0.369977777777778,0.369977777777778},
-{2980430,3881919,3881996,0.0492888888888889,0.0492888888888889},
-{2980431,3884482,3885196,0.395844444444444,0.395844444444444},
-{2980432,3884482,3884210,0.11916,0.1324},
-{2980433,3884210,3885004,0.437044444444444,0.437044444444444},
-{2980434,3883606,3883402,0.17376,0.193066666666667},
-{2980435,3883220,3883048,0.161972727272727,0.169685714285714},
-{2980436,3883402,3883890,0.498888888888889,-1},
-{2980437,3884798,3885337,0.596,-1},
-{2980438,3886593,3886649,0.05844,0.0859411764705882},
-{2980439,3887522,3887479,0.173652631578947,0.149972727272727},
-{2980440,3887479,3888023,0.184177777777778,0.184177777777778},
-{2980441,3887136,3887354,0.1635,0.218},
-{2980442,3887354,3887479,0.0869777777777778,0.11742},
-{2980443,3887354,3887779,0.1974,0.1974},
-{2980444,3887779,3887818,0.246622222222222,0.246622222222222},
-{2980445,3887818,3887206,0.37971,0.37971},
-{2980446,3889018,3888912,0.669644444444444,0.669644444444444},
-{2980447,3889650,3889527,1.18041,1.18041},
-{2980448,3886570,3886969,0.455905263157895,0.455905263157895},
-{2980449,3887206,3888218,0.57954,-1},
-{2980450,3888480,3888218,0.256061538461538,0.20805},
-{2980451,3887206,3886969,0.24339,0.24339},
-{2980452,3886326,3886579,0.30132,0.30132},
-{2980453,3886548,3886321,0.249733333333333,0.249733333333333},
-{2980454,3886579,3886548,0.139976470588235,0.139976470588235},
-{2980455,3886969,3886579,0.23277,0.23277},
-{2980456,3886548,3887550,0.65472,0.65472},
-{2980457,3886969,3887778,0.66927,0.66927},
-{2980458,3888218,3888160,0.0819428571428572,0.0521454545454546},
-{2980459,3888160,3887877,0.2179,0.186771428571429},
-{2980460,3887877,3887778,0.0498666666666667,0.04488},
-{2980461,3887778,3887550,0.155652631578947,0.140828571428571},
-{2980462,3891964,3891952,0.114735483870968,0.114735483870968},
-{2980463,3891952,3891891,0.254930769230769,0.194947058823529},
-{2980464,3891952,3892831,0.396044444444444,0.396044444444444},
-{2980465,3892831,3892807,0.243266666666667,0.243266666666667},
-{2980466,3890225,3890157,0.481635,0.55044},
-{2980467,3891358,3891304,0.294042857142857,0.283903448275862},
-{2980468,3892403,3892344,0.820866666666667,0.547244444444444},
-{2980469,3893007,3892928,0.637022222222222,0.637022222222222},
-{2980470,3890989,3891950,0.532244444444445,0.532244444444445},
-{2980471,3891950,3892344,0.220711111111111,0.220711111111111},
-{2980472,3890157,3890399,0.172666666666667,0.172666666666667},
-{2980473,3890399,3890925,0.54632,0.455266666666667},
-{2980474,3889639,3889922,0.211690909090909,0.211690909090909},
-{2980475,3889922,3890261,0.35136,0.3294},
-{2980476,3890261,3890399,0.186507692307692,0.1515375},
-{2980477,3890399,3890953,0.277755555555556,0.277755555555556},
-{2980478,3890953,3891204,0.234444444444444,0.234444444444444},
-{2980479,3891950,3892027,0.140488888888889,0.140488888888889},
-{2980480,3891782,3892027,0.131244444444444,0.131244444444444},
-{2980481,3892027,3892566,0.254177777777778,0.254177777777778},
-{2980482,3892566,3893198,0.280355555555556,0.280355555555556},
-{2980483,3893513,3893376,0.493589189189189,0.652242857142857},
-{2980484,3893683,3894124,0.260288888888889,0.260288888888889},
-{2980485,3893178,3893449,0.174391304347826,0.174391304347826},
-{2980486,3893449,3893624,0.165633333333333,0.114669230769231},
-{2980487,3893837,3894302,0.2604,0.2604},
-{2980488,3894032,3894354,0.174533333333333,0.174533333333333},
-{2980489,3894354,3894495,0.0892222222222222,0.0892222222222222},
-{2980490,3894354,3894599,0.301088888888889,0.301088888888889},
-{2980491,3894599,3894265,0.174822222222222,0.174822222222222},
-{2980492,3894599,3894869,0.23757,0.23757},
-{2980493,3896711,3897434,0.45333,0.45333},
-{2980494,3900325,3899786,0.269333333333333,0.269333333333333},
-{2980495,3897434,3899134,1.17774,1.17774},
-{2980496,3900807,3900288,0.419885714285714,0.489866666666667},
-{2980497,3897434,3898364,-1,-1},
-{2980498,3899134,3898364,-1,-1},
-{2980499,3901106,3901459,0.231577777777778,0.231577777777778},
-{2980500,3903444,3902783,0.364711111111111,0.364711111111111},
-{2980501,3903741,3904001,0.148422222222222,0.148422222222222},
-{2980502,3905255,3905878,0.3888,0.3888},
-{2980503,3904786,3905017,0.15912,0.1326},
-{2980504,3904592,3904786,0.153342857142857,0.134175},
-{2980505,3904592,3905109,0.4193,0.4792},
-{2980506,3904786,3905365,0.477327272727273,0.477327272727273},
-{2980507,3905365,3905624,0.24408,0.215364705882353},
-{2980508,3905109,3905365,0.218533333333333,0.24585},
-{2980509,3905109,3905846,0.824084210526316,0.6524},
-{2980510,3905365,3906253,0.559355555555555,0.559355555555555},
-{2980511,3902769,3903084,0.284525,0.206927272727273},
-{2980512,3905624,3906493,0.689045454545455,0.659086956521739},
-{2980513,3905878,3906736,0.562488888888889,0.562488888888889},
-{2980514,3902769,3902620,0.136866666666667,0.136866666666667},
-{2980515,3904701,3904447,0.21456,-1},
-{2980516,3906091,3906419,0.28137,0.28137},
-{2980517,3906419,3906975,0.287435294117647,0.375876923076923},
-{2980518,3905846,3906253,0.258125,0.258125},
-{2980519,3906253,3906493,0.19155,0.182428571428571},
-{2980520,3906493,3906736,0.17094,0.1554},
-{2980521,3906736,3906975,0.14427,0.125452173913044},
-{2980522,3906419,3906831,0.29106,0.3234},
-{2980523,3906831,3907321,0.231715384615385,0.231715384615385},
-{2980524,3907321,3907808,0.291027272727273,0.32013},
-{2980525,3906831,3907290,0.254866666666667,0.254866666666667},
-{2980526,3907290,3907762,0.272844444444444,0.272844444444444},
-{2980527,3906975,3907293,0.170488888888889,0.1918},
-{2980528,3907293,3907762,0.212764285714286,0.170211428571429},
-{2980529,3907762,3908226,0.152194736842105,0.144585},
-{2980530,3908226,3908767,0.292963636363636,0.280226086956522},
-{2980531,3907321,3907751,0.247844444444444,0.247844444444444},
-{2980532,3907751,3908226,0.267622222222222,0.267622222222222},
-{2980533,3907290,3907751,0.29079,0.29079},
-{2980534,3907751,3908265,0.31866,0.31866},
-{2980535,3908767,3909397,0.477247058823529,0.368781818181818},
-{2980536,3909397,3910029,0.334275,0.334275},
-{2980537,3910029,3910276,0.105115384615385,0.0976071428571429},
-{2980538,3910276,3910831,0.296945454545455,0.296945454545455},
-{2980539,3910831,3911380,0.279,0.268269230769231},
-{2980540,3909397,3910187,0.597536842105263,0.37844},
-{2980541,3910276,3910907,0.338261538461539,0.351792},
-{2980542,3909790,3910333,0.257977777777778,0.257977777777778},
-{2980543,3906493,3906692,0.122222222222222,0.122222222222222},
-{2980544,3910187,3910714,0.256466666666667,0.256466666666667},
-{2980545,3910562,3911033,0.258222222222222,0.258222222222222},
-{2980546,3910831,3911436,0.308755555555556,0.308755555555556},
-{2980547,3911436,3911943,0.296034782608696,0.261876923076923},
-{2980548,3910907,3911436,0.270276923076923,0.260266666666667},
-{2980549,3911436,3912638,0.654096,0.743290909090909},
-{2980550,3912638,3912974,0.150644444444444,0.150644444444444},
-{2980551,3912974,3913190,0.09,0.09},
-{2980552,3909982,3910333,0.160704,0.211452631578947},
-{2980553,3910333,3910714,0.140883870967742,0.189886956521739},
-{2980554,3910714,3911033,0.155256,0.155256},
-{2980555,3911033,3911427,0.194333333333333,0.194333333333333},
-{2980556,3910333,3910666,0.2791125,0.2791125},
-{2980557,3910666,3911315,0.9278,0.9278},
-{2980558,3911033,3911315,0.21345,0.194045454545455},
-{2980629,3864585,3864396,0.155155555555556,0.155155555555556},
-{2980630,3864594,3864231,0.177377777777778,0.177377777777778},
-{2980631,3865062,3864585,0.205133333333333,0.205133333333333},
-{2980632,3864309,3864673,0.161866666666667,0.161866666666667},
-{2980635,3864446,3864673,0.410175,0.410175},
-{2980636,3864673,3864987,0.3094,0.3094},
-{2980637,3864987,3864828,0.1139625,0.0868285714285714},
-{2980638,3864716,3865369,0.580422222222222,0.580422222222222},
-{2980639,3865369,3864987,0.138864,0.11572},
-{2980640,3865676,3865369,0.127303448275862,0.108582352941176},
-{2980641,3865057,3865676,0.573444444444444,0.573444444444444},
-{2980642,3865452,3865748,0.510085714285714,0.510085714285714},
-{2980643,3865748,3866063,0.286288888888889,0.286288888888889},
-{2980646,3864780,3864585,0.148955555555556,0.148955555555556},
-{2980647,3865303,3864780,0.289642105263158,0.289642105263158},
-{2980648,3864432,3863274,1.09338260869565,1.09338260869565},
-{2980652,3865017,3864780,0.257905263157895,0.257905263157895},
-{2980653,3865893,3866477,0.6927,0.6927},
-{2980654,3866477,3866063,0.1593,0.147046153846154},
-{2980655,3866992,3866477,0.247392857142857,0.314863636363636},
-{2980656,3866431,3866992,0.474266666666667,0.474266666666667},
-{2980657,3867898,3868473,0.200444444444444,0.200444444444444},
-{2980658,3868627,3868049,0.217844444444444,0.217844444444444},
-{2980659,3869661,3869266,0.130866666666667,0.130866666666667},
-{2980660,3868580,3868708,0.178914285714286,0.221011764705882},
-{2980661,3868708,3869202,0.174377777777778,0.174377777777778},
-{2980662,3869187,3869841,0.218644444444444,0.218644444444444},
-{2980663,3869429,3868852,0.216266666666667,0.216266666666667},
-{2980664,3869661,3869596,0.16935,0.176713043478261},
-{2980665,3869841,3869661,0.27718064516129,0.343704},
-{2980666,3869969,3869841,0.233822222222222,0.286963636363636},
-{2980667,3867591,3866992,0.27588,0.2299},
-{2980668,3868049,3867591,0.2457,0.258631578947368},
-{2980669,3872699,3869193,2.17257777777778,2.17257777777778},
-{2980670,3878283,3877685,0.493728,0.474738461538462},
-{2980671,3879032,3878283,0.400584,0.357664285714286},
-{2980672,3880076,3879032,0.416016666666667,0.49922},
-{2980673,3877685,3877353,0.37476,0.37476},
-{2980674,3878082,3877896,0.219022222222222,0.219022222222222},
-{2980675,3877620,3877353,0.14406,0.14406},
-{2980676,3877856,3877620,0.0807483870967742,0.0807483870967742},
-{2980677,3878312,3877856,0.182955555555556,0.182955555555556},
-{2980678,3879475,3878312,0.538176923076923,0.736452631578947},
-{2980679,3877620,3877550,0.138466666666667,0.138466666666667},
-{2980680,3877856,3877693,0.152333333333333,0.152333333333333},
-{2980681,3878312,3878192,0.175075,0.175075},
-{2980682,3877693,3877550,0.0662444444444445,0.0662444444444445},
-{2980683,3878192,3877693,0.1854,0.1854},
-{2980684,3881954,3881909,0.0405130434782609,0.0517666666666667},
-{2980685,3881954,3882323,0.60498,0.60498},
-{2980686,3882278,3882323,0.0882923076923077,0.0882923076923077},
-{2980687,3882323,3882949,0.99198,0.99198},
-{2980688,3882949,3883251,0.19089,0.224576470588235},
-{2980689,3882949,3883425,0.777866666666667,0.777866666666667},
-{2980690,3883290,3883425,0.136833333333333,0.136833333333333},
-{2980691,3883425,3883548,0.0789333333333333,0.0789333333333333},
-{2980692,3882310,3882999,0.568066666666667,0.568066666666667},
-{2980693,3882323,3882999,0.561458823529412,-1},
-{2980694,3883041,3883548,0.305755555555556,-1},
-{2980695,3883548,3883871,0.2655,-1},
-{2980696,3883290,3883594,0.167733333333333,0.167733333333333},
-{2980697,3883594,3883857,0.202729411764706,0.181389473684211},
-{2980698,3883594,3883468,0.140357142857143,0.1228125},
-{2980699,3884104,3883871,0.174884210526316,0.174884210526316},
-{2980700,3884104,3883857,0.21012,0.21012},
-{2980701,3884104,3884431,0.29115,0.29115},
-{2980702,3881874,3881690,0.144085714285714,0.1681},
-{2980703,3881690,3881538,0.0741157894736842,0.0741157894736842},
-{2980704,3881538,3881401,0.0797833333333333,0.0755842105263158},
-{2980705,3881401,3881282,0.10595,0.0941777777777778},
-{2980706,3881108,3880571,0.27658125,0.2682},
-{2980707,3881308,3881108,0.122606896551724,0.142224},
-{2980708,3881467,3881108,0.192933333333333,0.192933333333333},
-{2980709,3881643,3881467,0.1452,0.122861538461538},
-{2980710,3881643,3881802,0.09225,0.0952258064516129},
-{2980711,3881802,3881921,0.09163125,0.0888545454545454},
-{2980712,3881921,3882078,0.156657142857143,0.143034782608696},
-{2980713,3881401,3881643,-1,-1},
-{2980714,3881538,3881802,-1,-1},
-{2980715,3881690,3881921,-1,-1},
-{2980716,3882278,3881755,0.562325,0.562325},
-{2980717,3880751,3881051,0.152,0.152},
-{2980718,3882691,3882391,0.21963,0.244033333333333},
-{2980719,3882391,3882177,0.1474,0.1474},
-{2980720,3881708,3881946,0.111555555555556,0.111555555555556},
-{2980721,3882037,3882331,0.183311111111111,0.183311111111111},
-{2980722,3882177,3882331,0.0992666666666667,0.0992666666666667},
-{2980723,3882331,3883298,0.5278,0.5278},
-{2980724,3882391,3883663,0.65288275862069,0.65288275862069},
-{2980725,3883857,3884167,0.340569230769231,0.260435294117647},
-{2980726,3880605,3880751,-1,0.225288},
-{2980727,3880916,3880605,-1,0.44652},
-{2980728,3881174,3881346,-1,0.139066666666667},
-{2980729,3882269,3881406,0.466666666666667,0.466666666666667},
-{2980730,3882504,3881675,0.471444444444444,0.471444444444444},
-{2980731,3884547,3883871,0.402955555555556,0.402955555555556},
-{2980732,3885210,3884547,0.348733333333333,-1},
-{2980733,3884412,3884104,0.222975,0.254828571428571},
-{2980734,3884693,3884412,0.293166666666667,0.293166666666667},
-{2980735,3884693,3884547,0.1468,0.1468},
-{2980736,3884779,3884693,0.05805,0.0546352941176471},
-{2980737,3885044,3884779,0.161930769230769,0.161930769230769},
-{2980738,3885210,3885044,0.09274,0.09274},
-{2980739,3885337,3885210,0.0863368421052632,0.0863368421052632},
-{2980740,3884412,3884767,0.181577777777778,0.181577777777778},
-{2980741,3884779,3885082,0.249494117647059,0.249494117647059},
-{2980742,3885044,3885348,0.149822222222222,0.149822222222222},
-{2980743,3885337,3885619,0.26484,0.209084210526316},
-{2980744,3885791,3886110,0.154555555555556,0.154555555555556},
-{2980745,3885348,3885628,0.180365217391304,0.180365217391304},
-{2980746,3885915,3885619,0.153933333333333,0.153933333333333},
-{2980747,3885861,3885628,0.18078,0.18078},
-{2980748,3885915,3885861,0.0335555555555556,0.0335555555555556},
-{2980749,3886110,3885915,0.106733333333333,0.106733333333333},
-{2980750,3885628,3886328,0.334634482758621,0.334634482758621},
-{2980751,3886110,3886729,0.357488888888889,0.357488888888889},
-{2980752,3885861,3886531,0.353555555555556,0.353555555555556},
-{2980753,3884847,3885808,0.505577777777778,0.505577777777778},
-{2980754,3887550,3887263,0.196333333333333,0.160636363636364},
-{2980755,3887263,3886973,0.246075,0.218733333333333},
-{2980756,3887877,3888888,0.62598,0.62598},
-{2980757,3887550,3888607,0.65766,0.65766},
-{2980758,3888567,3888970,0.40203,0.40203},
-{2980759,3886973,3886729,0.252141176470588,0.28576},
-{2980760,3886729,3886531,0.1997,0.211447058823529},
-{2980761,3886531,3886328,0.215533333333333,0.19398},
-{2980762,3886328,3886104,0.2144,0.227011764705882},
-{2980763,3886104,3885808,0.247164705882353,0.221147368421053},
-{2980764,3885808,3885573,0.221766666666667,0.17355652173913},
-{2980765,3885573,3885312,0.237866666666667,0.18615652173913},
-{2980766,3886729,3887761,0.555992307692308,0.555992307692308},
-{2980767,3886531,3887488,0.534444444444444,0.534444444444444},
-{2980768,3886328,3887262,0.542066666666667,0.542066666666667},
-{2980769,3887263,3888367,0.68838,0.68838},
-{2980770,3888970,3888674,0.15336,0.15336},
-{2980771,3888160,3889128,0.6219,0.6219},
-{2980772,3885808,3886804,0.535333333333333,0.535333333333333},
-{2980773,3884576,3885573,0.505311111111111,0.505311111111111},
-{2980774,3885573,3886547,0.519288888888889,0.519288888888889},
-{2980775,3884324,3885312,0.570675,0.570675},
-{2980776,3885312,3885024,0.307,0.2878125},
-{2980777,3889065,3889208,0.141094736842105,0.141094736842105},
-{2980778,3889208,3889332,0.4098,0.4098},
-{2980779,3889332,3888970,0.196848,0.189276923076923},
-{2980780,3888970,3889301,0.357777777777778,0.357777777777778},
-{2980781,3889332,3889785,0.314918181818182,0.2566},
-{2980782,3889785,3889746,0.278172413793103,0.2689},
-{2980783,3888870,3887729,0.507555555555556,0.507555555555556},
-{2980784,3889207,3888008,0.539244444444444,0.539244444444444},
-{2980785,3887729,3888008,0.160622222222222,0.160622222222222},
-{2980786,3888008,3888273,0.149488888888889,0.149488888888889},
-{2980787,3890047,3889785,0.108329032258065,0.10494375},
-{2980788,3885312,3885908,0.301511111111111,0.301511111111111},
-{2980789,3887729,3887262,0.263422222222222,0.263422222222222},
-{2980790,3887729,3887505,0.102066666666667,0.102066666666667},
-{2980791,3884675,3884447,0.198628571428571,0.245364705882353},
-{2980792,3889208,3890329,0.621266666666667,0.621266666666667},
-{2980793,3890329,3890047,0.134866666666667,0.13005},
-{2980794,3889378,3889922,0.246222222222222,0.3324},
-{2980795,3889922,3890423,0.45124,0.45124},
-{2980796,3890261,3890423,0.34086,0.34086},
-{2980797,3890423,3890926,0.450852631578947,0.450852631578947},
-{2980798,3890906,3890926,0.0318631578947368,0.0356117647058823},
-{2980799,3890926,3891539,0.448,0.4032},
-{2980800,3890953,3891405,0.299622222222222,0.299622222222222},
-{2980801,3891405,3891638,0.372044444444444,0.372044444444444},
-{2980802,3891405,3891539,0.149742857142857,0.149742857142857},
-{2980803,3891539,3891803,0.239329411764706,0.226033333333333},
-{2980804,3891803,3892178,0.411933333333333,0.411933333333333},
-{2980805,3891392,3891984,0.463389473684211,0.463389473684211},
-{2980806,3891803,3891984,0.2085,0.2085},
-{2980807,3891984,3892505,0.33207,0.33207},
-{2980808,3891627,3892509,0.58281,0.58281},
-{2980809,3892352,3892566,0.348711111111111,0.348711111111111},
-{2980810,3892505,3892667,0.2532,0.2532},
-{2980811,3892509,3892505,0.18579,0.18579},
-{2980812,3892373,3892509,0.23379,0.23379},
-{2980813,3892103,3892347,0.189,0.2016},
-{2980814,3890675,3890618,0.113955555555556,0.123072},
-{2980815,3890618,3890329,0.2186,0.2049375},
-{2980816,3890618,3891264,0.6429,0.6429},
-{2980817,3891627,3891264,0.32613,0.32613},
-{2980818,3890047,3890378,-1,0.307133333333333},
-{2980819,3890378,3889902,0.601753846153846,0.601753846153846},
-{2980820,3890499,3890378,0.0650888888888889,0.0650888888888889},
-{2980821,3890329,3890602,0.18976,0.271085714285714},
-{2980822,3890499,3890602,0.1417,0.1417},
-{2980823,3891264,3890602,0.360888888888889,0.360888888888889},
-{2980824,3891264,3891908,0.49728,0.49728},
-{2980825,3892667,3892747,0.235694117647059,0.235694117647059},
-{2980826,3892373,3892747,0.22806,0.22806},
-{2980827,3892390,3892373,0.1552,0.1552},
-{2980828,3892347,3892390,0.1434,0.0882461538461538},
-{2980829,3892390,3893062,0.4749375,0.4749375},
-{2980830,3892684,3892667,0.622305882352941,0.622305882352941},
-{2980831,3892747,3893062,0.336814285714286,0.336814285714286},
-{2980832,3892347,3893047,0.359444444444444,0.359444444444444},
-{2980833,3893062,3893333,0.234141176470588,0.209494736842105},
-{2980834,3892340,3891908,0.359936842105263,0.325657142857143},
-{2980835,3890499,3891399,0.49731724137931,0.49731724137931},
-{2980836,3891399,3891505,0.0856153846153846,0.101181818181818},
-{2980837,3891908,3891505,0.292009090909091,0.4015125},
-{2980838,3891958,3891505,0.29361,0.29361},
-{2980839,3892111,3891958,0.16988,0.21235},
-{2980840,3891908,3892052,0.194964705882353,0.194964705882353},
-{2980841,3892052,3892111,0.0876,0.08322},
-{2980842,3892111,3892187,0.051936,0.0590181818181818},
-{2980843,3892532,3892052,0.304425,0.4566375},
-{2980844,3892712,3892187,0.243222222222222,0.243222222222222},
-{2980845,3893062,3893047,0.38769,0.38769},
-{2980846,3893047,3893166,0.203177777777778,0.203177777777778},
-{2980847,3893333,3893662,0.74484,0.74484},
-{2980848,3889356,3889955,0.64941,0.683589473684211},
-{2980849,3893334,3894063,0.4344,0.4344},
-{2980850,3894063,3894293,0.1234,0.1234},
-{2980851,3894293,3894601,0.152266666666667,0.152266666666667},
-{2980852,3894601,3894712,0.235357894736842,0.235357894736842},
-{2980853,3894063,3894214,0.35175,0.35175},
-{2980854,3894293,3894921,0.6165,0.6165},
-{2980855,3894601,3894921,0.410866666666667,0.410866666666667},
-{2980856,3894921,3895046,0.303266666666667,0.303266666666667},
-{2980857,3893604,3894327,1.17912,1.17912},
-{2980858,3893333,3893927,0.491514285714286,0.34406},
-{2980859,3893927,3894003,0.0826235294117647,0.0520222222222222},
-{2980860,3894003,3893867,0.285023076923077,0.308775},
-{2980861,3894003,3894122,0.18148,0.18148},
-{2980862,3894300,3894331,0.0300444444444444,0.0300444444444444},
-{2980863,3894331,3894570,0.131111111111111,0.131111111111111},
-{2980864,3894570,3895094,0.415955555555556,0.415955555555556},
-{2980865,3894003,3894367,0.220090909090909,0.1614},
-{2980866,3894327,3894367,0.0558,0.0558},
-{2980867,3894367,3894461,0.0372666666666667,0.0432774193548387},
-{2980868,3894461,3895069,0.241145454545455,0.24868125},
-{2980869,3894461,3895242,0.92841,0.92841},
-{2980870,3895444,3895698,0.29019,0.29019},
-{2980871,3892712,3893369,0.334153846153846,0.413714285714286},
-{2980872,3893369,3893933,0.41127,0.41127},
-{2980873,3893369,3893537,0.192763636363636,0.2232},
-{2980874,3893537,3893710,0.25152,0.25152},
-{2980875,3893537,3893933,0.303190909090909,0.370566666666667},
-{2980876,3893933,3894234,0.43041,0.43041},
-{2980877,3893710,3894234,0.37464,0.37464},
-{2980878,3894754,3895094,0.224945454545455,0.215165217391304},
-{2980879,3895094,3895242,0.117652173913043,0.159176470588235},
-{2980880,3895242,3895490,0.170342857142857,0.170342857142857},
-{2980881,3902550,3902769,0.184636363636364,0.131032258064516},
-{2980882,3902335,3902550,0.124577777777778,0.124577777777778},
-{2980883,3902335,3902172,0.0888888888888889,0.0888888888888889},
-{2980884,3902172,3902592,0.28236,0.28236},
-{2980885,3903339,3904068,0.316377777777778,0.316377777777778},
-{2980886,3901961,3902035,0.0426444444444445,0.0426444444444445},
-{2980887,3901827,3901961,0.0679333333333333,0.0679333333333333},
-{2980888,3901718,3901827,0.0965714285714286,0.0965714285714286},
-{2980889,3901827,3902085,0.264286956521739,0.264286956521739},
-{2980890,3902085,3902132,0.08728125,0.08728125},
-{2980891,3902132,3902185,0.0824666666666667,0.0824666666666667},
-{2980892,3902085,3902642,0.211733333333333,0.211733333333333},
-{2980893,3902132,3902943,0.308755555555556,0.308755555555556},
-{2980894,3902185,3903112,0.362688888888889,0.362688888888889},
-{2980895,3902550,3902314,0.153044444444444,0.153044444444444},
-{2980896,3902335,3902028,0.169266666666667,0.169266666666667},
-{2980897,3901827,3901428,0.238622222222222,0.238622222222222},
-{2980898,3901718,3901851,0.178,0.178},
-{2980899,3901144,3901718,0.317169230769231,0.317169230769231},
-{2980900,3901088,3901144,0.232844444444444,0.232844444444444},
-{2980901,3901961,3902118,0.0870666666666667,0.0870666666666667},
-{2980902,3901144,3901222,-1,0.281110344827586},
-{2980903,3902185,3902217,0.115755555555556,0.1953375},
-{2980904,3901222,3902217,0.555252631578947,0.555252631578947},
-{2980905,3902217,3903192,0.387088888888889,0.387088888888889},
-{2980906,3902217,3902254,0.120975,0.223338461538462},
-{2980907,3902254,3902290,0.128225,0.146542857142857},
-{2980908,3901334,3902290,0.471409090909091,0.471409090909091},
-{2980909,3902254,3903237,0.387888888888889,0.387888888888889},
-{2980910,3902290,3903274,0.3862,0.3862},
-{2980911,3903192,3903237,0.215861538461538,0.215861538461538},
-{2980912,3903237,3903274,0.107133333333333,0.107133333333333},
-{2980913,3903516,3904135,0.251466666666667,0.251466666666667},
-{2980914,3903687,3904181,0.191755555555556,0.191755555555556},
-{2980915,3904135,3905325,0.69786,0.69786},
-{2980916,3904181,3905336,0.504911111111111,-1},
-{2980917,3904257,3905041,-1,0.503633333333333},
-{2980918,3905325,3905471,0.16023,0.16023},
-{2980919,3904297,3904776,0.29088,0.252939130434783},
-{2980920,3904348,3904972,0.272630769230769,0.272630769230769},
-{2980921,3904972,3905172,0.18438,0.127158620689655},
-{2980922,3904776,3904972,0.143975,0.111464516129032},
-{2980923,3904776,3905041,0.18723,0.197084210526316},
-{2980924,3905041,3905336,0.175938461538462,0.22872},
-{2980925,3905336,3905471,0.109275,0.102847058823529},
-{2980926,3911650,3911909,0.21345,0.224684210526316},
-{2980927,3911909,3912211,0.161330769230769,0.161330769230769},
-{2980928,3912211,3912539,0.1368,0.1368},
-{2980929,3912539,3912896,0.122172972972973,0.122172972972973},
-{2980930,3911355,3911909,0.30715,0.567046153846154},
-{2980931,3912211,3912771,0.229422222222222,0.229422222222222},
-{2980932,3912539,3913158,0.242666666666667,0.242666666666667},
-{2980933,3912896,3913478,0.306490909090909,-1},
-{2980934,3911799,3912138,0.21453,0.252388235294118},
-{2980935,3912138,3912896,0.338136,0.469633333333333},
-{2981027,3875889,3874945,0.612327272727273,0.612327272727273},
-{2981028,3877550,3877469,0.163244444444444,0.163244444444444},
-{2981029,3877556,3877469,0.0391111111111111,0.0391111111111111},
-{2981030,3877693,3877556,0.160777777777778,0.160777777777778},
-{2981031,3877469,3877463,0.175888888888889,0.175888888888889},
-{2981032,3877556,3877463,0.153377777777778,0.153377777777778},
-{2981033,3878036,3877556,0.185622222222222,0.185622222222222},
-{2981034,3877889,3877463,0.165822222222222,0.165822222222222},
-{2981035,3879321,3878192,0.501733333333333,0.501733333333333},
-{2981036,3879198,3878036,0.504688888888889,0.504688888888889},
-{2981037,3879052,3877889,0.505733333333333,0.505733333333333},
-{2981038,3878192,3878036,0.159911111111111,0.159911111111111},
-{2981039,3878036,3877889,0.13194375,0.13194375},
-{2981040,3877463,3877778,0.233133333333333,0.233133333333333},
-{2981041,3877889,3877778,0.127083870967742,0.127083870967742},
-{2981042,3878921,3877778,0.494511111111111,0.494511111111111},
-{2981043,3877778,3877671,0.149420689655172,0.149420689655172},
-{2981044,3877671,3877519,0.162066666666667,0.162066666666667},
-{2981045,3877519,3877246,0.227844444444444,0.227844444444444},
-{2981046,3878805,3877671,1.8702,1.8702},
-{2981047,3878462,3877519,0.401584615384615,0.336812903225806},
-{2981048,3878683,3878462,0.118142857142857,0.12405},
-{2981049,3878462,3878354,0.125,0.125},
-{2981050,3878354,3878215,0.176044444444444,0.176044444444444},
-{2981051,3878215,3878221,0.4772,0.4772},
-{2981052,3878221,3878354,0.0658,0.0658},
-{2981053,3877246,3877032,0.232111111111111,0.232111111111111},
-{2981054,3877032,3878197,0.458933333333333,0.458933333333333},
-{2981055,3878215,3878197,0.237822222222222,0.237822222222222},
-{2981056,3880605,3880159,0.601536,-1},
-{2981057,3878821,3879179,0.19587,0.178063636363636},
-{2981058,3879179,3879866,0.267411428571429,0.275276470588235},
-{2981059,3879856,3879861,0.35496,0.35496},
-{2981060,3879856,3879630,0.243977777777778,0.243977777777778},
-{2981061,3880168,3879856,0.164721428571429,0.170822222222222},
-{2981062,3879630,3879965,0.190377777777778,0.190377777777778},
-{2981063,3879965,3880168,0.223288888888889,0.223288888888889},
-{2981064,3881537,3881138,0.52215,-1},
-{2981065,3880718,3881464,0.627085714285714,0.598581818181818},
-{2981066,3881343,3880929,0.208133333333333,0.208133333333333},
-{2981067,3882277,3881944,0.58296,-1},
-{2981068,3881511,3881944,-1,0.279463636363636},
-{2981069,3880301,3880168,0.075875,0.0700384615384615},
-{2981070,3880417,3880476,0.0834,0.0834},
-{2981071,3880417,3880701,0.144377777777778,0.144377777777778},
-{2981072,3880476,3880578,0.170022222222222,0.170022222222222},
-{2981073,3882474,3883306,0.428133333333333,0.428133333333333},
-{2981074,3883555,3882194,0.680644444444444,0.680644444444444},
-{2981075,3883663,3884134,0.2418,0.2325},
-{2981076,3884134,3884447,0.196036363636364,0.1797},
-{2981077,3884134,3883306,0.527928,0.43994},
-{2981078,3884447,3883555,0.740052631578947,0.740052631578947},
-{2981079,3884108,3884663,0.352911111111111,0.352911111111111},
-{2981080,3880706,3880396,0.393066666666667,0.393066666666667},
-{2981081,3884949,3885827,-1,0.447311111111111},
-{2981082,3885827,3886433,0.316955555555556,0.316955555555556},
-{2981083,3884819,3885655,-1,0.435488888888889},
-{2981084,3886260,3885655,0.308311111111111,0.308311111111111},
-{2981085,3885655,3884886,1.01787,-1},
-{2981086,3886260,3886284,0.19488,0.19488},
-{2981087,3886284,3885815,0.288725,0.288725},
-{2981088,3887025,3886284,0.445977777777778,0.445977777777778},
-{2981089,3887025,3887161,0.082776,0.082776},
-{2981090,3887367,3887161,0.1731,0.1731},
-{2981091,3887446,3887367,0.0632727272727273,0.0632727272727273},
-{2981092,3888172,3887367,0.371022222222222,0.371022222222222},
-{2981093,3887161,3888012,0.379777777777778,0.379777777777778},
-{2981094,3888172,3888012,0.166457142857143,0.15536},
-{2981095,3886804,3887070,0.245033333333333,0.245033333333333},
-{2981096,3887070,3887381,0.244733333333333,0.244733333333333},
-{2981097,3887662,3887381,0.146888888888889,0.146888888888889},
-{2981098,3887381,3887320,0.0905571428571429,0.0905571428571429},
-{2981099,3887070,3886631,0.41049,0.41049},
-{2981100,3886308,3886631,0.26556,0.26556},
-{2981101,3886631,3886912,0.22194,0.22194},
-{2981102,3886912,3886634,0.267757894736842,0.25437},
-{2981103,3887320,3886912,0.412552941176471,0.412552941176471},
-{2981104,3885827,3885655,0.164333333333333,0.164333333333333},
-{2981105,3885959,3885827,0.084825,0.084825},
-{2981106,3886912,3887324,0.225644444444444,0.225644444444444},
-{2981107,3887320,3887696,0.235577777777778,0.235577777777778},
-{2981108,3887324,3887696,0.27303,0.27303},
-{2981109,3887324,3887501,0.0916,0.0916},
-{2981110,3887696,3887843,0.1284,0.1284},
-{2981111,3887501,3888090,0.345844444444444,0.345844444444444},
-{2981112,3888144,3888688,0.425192307692308,0.614166666666667},
-{2981113,3887849,3888090,0.184870588235294,0.196425},
-{2981114,3888090,3888519,0.255177777777778,0.255177777777778},
-{2981115,3889074,3888493,0.29445,-1},
-{2981116,3889605,3889074,0.301609090909091,-1},
-{2981117,3889074,3889771,0.510096,0.510096},
-{2981118,3888688,3889130,-1,0.161222222222222},
-{2981119,3888688,3888911,0.400581818181818,0.400581818181818},
-{2981120,3888911,3889425,0.44958,0.44958},
-{2981121,3889113,3889425,0.226957894736842,0.21561},
-{2981122,3888252,3888172,0.0828,0.100542857142857},
-{2981123,3888172,3888863,0.3374,0.3374},
-{2981124,3890083,3889771,0.3896625,0.3896625},
-{2981125,3889771,3890151,0.299975,0.299975},
-{2981126,3890151,3889969,0.123469565217391,0.123469565217391},
-{2981127,3890525,3890151,0.292933333333333,0.277515789473684},
-{2981128,3890758,3890215,0.3894,0.3894},
-{2981129,3889969,3890215,0.163157142857143,0.163157142857143},
-{2981130,3890215,3890426,0.151848,0.12654},
-{2981131,3890450,3890191,0.120992307692308,0.131075},
-{2981132,3890426,3890450,0.0750818181818182,0.0750818181818182},
-{2981133,3890942,3890426,0.304125,0.317347826086957},
-{2981134,3891194,3890450,0.358536,0.320121428571429},
-{2981135,3889425,3889850,0.236208,0.236208},
-{2981136,3888012,3888081,0.0774,0.0663428571428571},
-{2981137,3888081,3886872,-1,1.78789090909091},
-{2981138,3888081,3889174,1.29556363636364,-1},
-{2981139,3889955,3889658,0.2421,0.2421},
-{2981140,3890168,3889955,0.104888888888889,0.104888888888889},
-{2981141,3890490,3890168,0.27192,0.27192},
-{2981142,3889955,3890323,0.326975,0.326975},
-{2981143,3890168,3890511,0.275377777777778,0.275377777777778},
-{2981144,3890511,3890323,0.154058823529412,0.154058823529412},
-{2981145,3890735,3890511,0.19275,0.19275},
-{2981146,3890323,3890535,0.214057142857143,0.214057142857143},
-{2981147,3890944,3890535,0.213422222222222,0.213422222222222},
-{2981148,3890535,3890846,0.247155555555556,0.247155555555556},
-{2981149,3890846,3890525,0.152284615384615,0.152284615384615},
-{2981150,3890745,3890703,0.16698,0.16698},
-{2981151,3890703,3890735,0.189688888888889,0.189688888888889},
-{2981152,3890735,3890944,0.165288888888889,0.165288888888889},
-{2981153,3890703,3891243,0.36795,0.36795},
-{2981154,3890944,3891474,0.42336,0.42336},
-{2981155,3891135,3890846,0.114617647058824,0.114617647058824},
-{2981156,3891474,3891135,0.167664,0.161215384615385},
-{2981157,3891474,3891558,0.0793411764705882,0.0642285714285714},
-{2981158,3890846,3891293,0.4662,0.4662},
-{2981159,3891293,3890998,0.299538461538462,0.299538461538462},
-{2981160,3891565,3891293,0.1392,0.1392},
-{2981161,3891135,3891565,0.44496,0.44496},
-{2981162,3891505,3891525,0.83181,0.83181},
-{2981163,3891958,3892234,0.5122,0.5122},
-{2981164,3892187,3892835,0.586661538461538,0.586661538461538},
-{2981165,3891965,3891584,0.3155625,0.3155625},
-{2981166,3892234,3891965,0.237141176470588,0.237141176470588},
-{2981167,3892123,3891632,0.34725,0.34725},
-{2981168,3892835,3892234,0.34395,0.34395},
-{2981169,3891965,3892123,0.16008,0.16008},
-{2981170,3892257,3892123,0.09057,0.09057},
-{2981171,3892445,3892257,0.12102,0.12102},
-{2981172,3892234,3892445,0.1324,0.1324},
-{2981173,3892445,3892801,0.1932,0.1932},
-{2981174,3892835,3893095,0.234763636363636,0.234763636363636},
-{2981175,3892123,3892252,0.259577777777778,0.259577777777778},
-{2981176,3892252,3891888,0.25137,0.25137},
-{2981177,3893095,3892801,0.150577777777778,0.150577777777778},
-{2981178,3892252,3892418,0.122755555555556,0.122755555555556},
-{2981179,3891399,3891085,-1,-1},
-{2981180,3892257,3892582,0.69906,0.69906},
-{2981181,3892418,3891945,0.33414,0.33414},
-{2981182,3891293,3891779,0.3916,0.3916},
-{2981183,3892418,3892582,0.110422222222222,0.110422222222222},
-{2981184,3892582,3892822,0.133533333333333,0.133533333333333},
-{2981185,3892801,3893108,0.356533333333333,0.356533333333333},
-{2981186,3893095,3893187,0.49929,0.49929},
-{2981187,3893108,3893187,0.09366,0.09366},
-{2981188,3893187,3893373,0.127714285714286,0.127714285714286},
-{2981189,3893435,3893095,0.239345454545455,0.239345454545455},
-{2981190,3893710,3893772,0.13122,0.13122},
-{2981191,3894085,3894234,0.299463157894737,0.299463157894737},
-{2981192,3894234,3894970,0.53982,0.53982},
-{2981193,3893435,3894145,0.381774193548387,0.408103448275862},
-{2981194,3895094,3895454,0.45435,0.45435},
-{2981195,3895454,3895572,0.14526,0.14526},
-{2981196,3895454,3895786,0.31584,0.31584},
-{2981197,3895572,3895888,0.291821052631579,0.291821052631579},
-{2981198,3893399,3893679,0.2079,0.2079},
-{2981199,3893679,3893935,0.19494,0.19494},
-{2981200,3893935,3894174,0.16815,0.16815},
-{2981201,3893679,3893653,0.28707,0.28707},
-{2981202,3893373,3893653,0.155676923076923,0.16865},
-{2981203,3894174,3894145,0.162571428571429,0.155181818181818},
-{2981204,3894145,3894379,0.156533333333333,0.156533333333333},
-{2981205,3894727,3895203,0.49419,0.49419},
-{2981206,3895203,3895261,0.10122,0.10122},
-{2981207,3893368,3893755,0.266057142857143,0.266057142857143},
-{2981208,3893935,3893909,-1,0.215133333333333},
-{2981209,3894174,3894659,0.386918181818182,0.370095652173913},
-{2981210,3893909,3894481,0.244072727272727,0.244072727272727},
-{2981211,3894481,3894659,0.158936842105263,0.131295652173913},
-{2981212,3894659,3894925,0.223688888888889,0.20132},
-{2981213,3895203,3895501,0.295911111111111,0.295911111111111},
-{2981214,3893653,3893743,0.0471103448275862,0.03795},
-{2981215,3893743,3893909,0.0755117647058823,0.0626195121951219},
-{2981216,3893743,3893755,0.192644444444444,0.192644444444444},
-{2981217,3893755,3894000,0.20889,0.20889},
-{2981218,3898563,3898919,0.21816,0.21816},
-{2981219,3897994,3897839,0.08292,0.08292},
-{2981220,3899716,3900153,0.224008695652174,0.224008695652174},
-{2981221,3900291,3899746,0.293444444444444,0.293444444444444},
-{2981222,3900153,3900291,0.0809181818181818,0.0659333333333333},
-{2981223,3900605,3901283,0.323625,0.298730769230769},
-{2981224,3900605,3900629,0.647533333333333,0.647533333333333},
-{2981225,3900629,3900647,0.134777777777778,0.134777777777778},
-{2981226,3900629,3900932,-1,-1},
-{2981227,3899396,3899716,0.146666666666667,0.146666666666667},
-{2981228,3899396,3899636,0.199444444444444,0.199444444444444},
-{2981229,3899716,3899999,0.278288888888889,0.278288888888889},
-{2981230,3900153,3900198,0.3146,0.3146},
-{2981231,3900932,3900979,0.0612,0.0612},
-{2981232,3900979,3900978,0.0859411764705882,0.0503793103448276},
-{2981233,3900979,3901516,0.355588235294118,0.318157894736842},
-{2981234,3900613,3900605,0.212022222222222,0.212022222222222},
-{2981235,3900855,3900932,0.316155555555556,0.316155555555556},
-{2981236,3900245,3898563,3.02883157894737,2.61580909090909},
-{2981237,3902290,3902323,0.113072727272727,0.113072727272727},
-{2981238,3902323,3902357,0.138208695652174,0.151371428571429},
-{2981239,3902357,3902378,0.106875,0.0855},
-{2981240,3903274,3903302,0.136772727272727,0.136772727272727},
-{2981241,3903302,3903345,0.0977793103448276,0.0977793103448276},
-{2981242,3903345,3903390,0.311541176470588,0.311541176470588},
-{2981243,3902323,3903302,0.384844444444444,0.384844444444444},
-{2981244,3902357,3903345,0.387955555555556,0.387955555555556},
-{2981245,3903345,3903815,0.211266666666667,0.211266666666667},
-{2981246,3902515,3902809,0.70505,0.70505},
-{2981247,3902804,3903062,0.554333333333333,0.554333333333333},
-{2981248,3903047,3903293,0.486977777777778,0.486977777777778},
-{2981249,3903989,3904253,0.193581818181818,-1},
-{2981250,3903588,3904231,0.2626,0.2626},
-{2981251,3902809,3903386,0.792445161290323,0.792445161290323},
-{2981252,3903202,3903984,0.714,0.714},
-{2981253,3904253,3905012,0.429137142857143,-1},
-{2981254,3905471,3906538,1.10127,1.10127},
-{2981255,3901334,3901368,-1,0.174},
-{2981256,3901368,3901657,-1,1.26353333333333},
-{2981257,3901657,3902098,-1,0.79888},
-{2981258,3905653,3905811,0.44952,0.44952},
-{2981259,3909494,3911280,0.521909090909091,0.521909090909091},
-{2981304,3863556,3863888,0.404,0.440727272727273},
-{2981305,3863888,3866912,1.33095555555556,1.33095555555556},
-{2981307,3874945,3874356,0.394236363636364,0.394236363636364},
-{2981308,3877032,3876213,0.589355555555556,0.589355555555556},
-{2981309,3878197,3878004,0.443311111111111,0.443311111111111},
-{2981310,3886465,3885404,0.463644444444444,0.463644444444444},
-{2981311,3884205,3885404,0.755066666666667,0.755066666666667},
-{2981312,3891140,3891542,0.528933333333333,0.528933333333333},
-{2981313,3891779,3892133,0.66849,0.66849},
-{2981314,3891966,3891342,0.301555555555556,-1},
-{2981315,3892133,3892481,0.48366,0.48366},
-{2981316,3891917,3891637,0.141688888888889,0.141688888888889},
-{2981317,3892196,3891917,0.185113043478261,0.185113043478261},
-{2981318,3892481,3892196,0.20619,0.242576470588235},
-{2981319,3892414,3892848,0.396022222222222,0.396022222222222},
-{2981320,3892481,3892688,0.10925,0.145666666666667},
-{2981321,3892848,3892688,0.0886333333333333,0.0886333333333333},
-{2981322,3893075,3892848,0.158652631578947,0.131060869565217},
-{2981323,3892462,3892962,0.329044444444444,0.329044444444444},
-{2981324,3892651,3892962,0.398177777777778,0.398177777777778},
-{2981325,3892962,3892657,0.221223529411765,0.18804},
-{2981326,3892962,3893243,0.269895652173913,0.31038},
-{2981327,3893639,3893243,0.409554545454545,0.360408},
-{2981328,3893243,3893344,0.0610615384615385,0.06615},
-{2981329,3893344,3893685,0.41889,0.41889},
-{2981330,3893685,3893303,0.275514285714286,0.275514285714286},
-{2981331,3892481,3893186,0.618444444444444,0.618444444444444},
-{2981332,3891917,3892546,0.607466666666667,0.607466666666667},
-{2981333,3893781,3894000,0.29193,0.29193},
-{2981334,3894000,3894450,0.3822,0.3822},
-{2981335,3894096,3893344,0.375496551724138,0.388907142857143},
-{2981336,3894095,3894456,0.468272727272727,0.468272727272727},
-{2981337,3894481,3894747,0.46056,0.46056},
-{2981338,3894450,3894456,0.40416,0.40416},
-{2981339,3894450,3894747,0.19839,0.19839},
-{2981340,3894747,3895043,0.19512,0.19512},
-{2981341,3895043,3895247,0.14928,0.14928},
-{2981342,3894925,3895247,0.21624375,0.197708571428571},
-{2981343,3895501,3895927,0.317777777777778,0.317777777777778},
-{2981344,3895968,3895927,0.46062,0.46062},
-{2981345,3895927,3896268,0.2102,0.2102},
-{2981346,3894747,3895354,0.66948,0.66948},
-{2981347,3895043,3895448,0.56058,0.56058},
-{2981348,3895247,3895466,0.12262,0.102183333333333},
-{2981349,3895466,3895989,0.336022222222222,0.312848275862069},
-{2981350,3894456,3895056,0.48525,0.48525},
-{2981351,3895056,3895354,0.2643,0.2643},
-{2981352,3895354,3895448,0.08418,0.08418},
-{2981353,3895448,3895628,0.14781,0.14781},
-{2981354,3893685,3893913,0.21984,0.21984},
-{2981355,3893913,3894237,0.4536,0.4536},
-{2981356,3894188,3894885,0.53742,0.53742},
-{2981357,3894885,3895322,0.32691,0.32691},
-{2981358,3895056,3895322,0.209333333333333,0.209333333333333},
-{2981359,3895354,3896106,0.75375,0.75375},
-{2981360,3895628,3896163,0.60129,0.60129},
-{2981361,3895628,3895776,0.12519,0.12519},
-{2981362,3895776,3895989,0.17709,0.17709},
-{2981363,3895466,3895776,0.4209,0.4209},
-{2981364,3895989,3896321,0.268248,0.22354},
-{2981365,3895989,3896268,0.327214285714286,0.327214285714286},
-{2981366,3896268,3896321,0.44253,0.44253},
-{2981367,3896321,3896537,0.204046153846154,0.196488888888889},
-{2981368,3896268,3896733,0.31341,0.31341},
-{2981369,3896850,3897225,-1,-1},
-{2981370,3896645,3897124,0.4203,0.4203},
-{2981371,3895322,3895898,0.61935,0.61935},
-{2981372,3897124,3896870,0.23523,0.23523},
-{2981373,3893523,3893695,0.185577777777778,0.185577777777778},
-{2981374,3894017,3893695,0.230478260869565,0.240954545454545},
-{2981375,3894316,3895116,0.59325,0.59325},
-{2981376,3897374,3897415,0.20305,0.20305},
-{2981377,3897415,3897583,0.548815384615385,0.548815384615385},
-{2981378,3897583,3897631,0.10656,0.10656},
-{2981379,3897077,3897631,0.32667,0.32667},
-{2981380,3897583,3897718,0.07944,0.07944},
-{2981381,3897718,3898091,0.34765,0.34765},
-{2981382,3900647,3900828,-1,-1},
-{2981383,3900978,3901329,1.09582857142857,0.885092307692308},
-{2981384,3900828,3901329,-1,-1},
-{2981385,3902098,3902932,0.36295,0.335030769230769},
-{2981386,3900828,3901081,-1,-1},
-{2981387,3901329,3901724,0.983634782608696,0.904944},
-{2981388,3900038,3899793,0.31272,0.2606},
-{2981389,3900477,3900038,0.219763636363636,0.20145},
-{2981390,3901081,3901393,-1,-1},
-{2981391,3901393,3901769,0.230033333333333,0.230033333333333},
-{2981392,3902098,3902589,-1,1.25373333333333},
-{2981393,3902589,3902660,-1,0.64632},
-{2981394,3903411,3903749,-1,0.2668},
-{2981395,3903693,3903749,0.103036363636364,0.09445},
-{2981396,3905012,3904844,0.133694117647059,-1},
-{2981397,3903984,3904816,0.589755555555555,0.589755555555555},
-{2981398,3904816,3905107,0.200044444444444,0.200044444444444},
-{2981399,3904850,3905283,0.225933333333333,0.225933333333333},
-{2981400,3903386,3903468,0.153521739130435,0.1605},
-{2981401,3903468,3903992,0.61058,0.61058},
-{2981402,3903468,3904660,0.755844444444444,0.755844444444444},
-{2981403,3904816,3905240,0.229,0.229},
-{2981404,3905529,3905690,0.0594,0.066825},
-{2981405,3906089,3905690,0.184584,0.177484615384615},
-{2981406,3905066,3905599,-1,0.271888888888889},
-{2981407,3905240,3905694,0.211777777777778,-1},
-{2981408,3905599,3905694,0.183311111111111,0.183311111111111},
-{2981409,3905694,3905529,0.323955555555556,0.323955555555556},
-{2981410,3906089,3905830,0.284688888888889,0.284688888888889},
-{2981411,3906643,3910530,2.94318,2.94318},
-{2981412,3905811,3908638,2.3625,2.3625},
-{2981413,3905690,3906498,0.730266666666667,0.730266666666667},
-{2981414,3906840,3906089,0.728333333333333,0.728333333333333},
-{2981415,3904660,3905616,0.6422,0.6422},
-{2981416,3907998,3906595,0.891133333333333,0.891133333333333},
-{2981483,3892546,3892927,0.304488888888889,0.304488888888889},
-{2981484,3892927,3893259,0.348444444444444,0.348444444444444},
-{2981485,3893259,3893674,0.436933333333333,0.436933333333333},
-{2981486,3892927,3892588,0.19383,0.19383},
-{2981487,3893209,3892927,0.2088,0.2088},
-{2981488,3893340,3893104,0.206,0.206},
-{2981489,3893695,3893340,0.223707692307692,0.24235},
-{2981490,3893209,3893861,0.448095652173913,0.448095652173913},
-{2981491,3893259,3893025,0.137844444444444,0.137844444444444},
-{2981492,3893520,3893259,0.156577777777778,0.156577777777778},
-{2981493,3893735,3893520,0.17382,0.158018181818182},
-{2981494,3893340,3893963,0.499711111111111,0.499711111111111},
-{2981495,3893861,3893963,0.0519230769230769,0.0519230769230769},
-{2981496,3893963,3893735,0.142523076923077,0.132342857142857},
-{2981497,3893695,3894274,0.49068,0.49068},
-{2981498,3894215,3893963,0.129942857142857,0.117367741935484},
-{2981499,3894493,3894215,0.146592,0.140953846153846},
-{2981500,3894719,3894493,0.156518181818182,0.143475},
-{2981501,3894905,3894719,0.197236363636364,0.160711111111111},
-{2981502,3893735,3894139,0.433533333333333,0.433533333333333},
-{2981503,3893963,3894377,0.430933333333333,0.430933333333333},
-{2981504,3894215,3894627,0.4036,0.4036},
-{2981505,3894719,3895113,0.50877,0.50877},
-{2981506,3893674,3893949,0.311111111111111,0.311111111111111},
-{2981507,3894139,3894447,0.308355555555556,0.308355555555556},
-{2981508,3894377,3894695,0.311866666666667,0.311866666666667},
-{2981509,3894627,3894910,0.3138,0.3138},
-{2981510,3895113,3895388,0.41346,0.41346},
-{2981511,3893949,3893703,0.20385,0.20385},
-{2981512,3894207,3893949,0.27656,0.27656},
-{2981513,3894447,3894207,0.155836363636364,0.201670588235294},
-{2981514,3894695,3894447,0.143376,0.170685714285714},
-{2981515,3894910,3894695,0.1276,0.1276},
-{2981516,3895160,3894910,0.1505,0.1505},
-{2981517,3895388,3895160,0.18255,0.18255},
-{2981518,3894910,3895258,0.363044444444444,0.363044444444444},
-{2981519,3895388,3895769,0.38715,0.38715},
-{2981520,3895570,3895258,0.235628571428571,0.190315384615385},
-{2981521,3895769,3895570,0.297423529411765,0.297423529411765},
-{2981522,3894928,3895176,0.169666666666667,0.147774193548387},
-{2981523,3895116,3894928,-1,-1},
-{2981524,3895344,3895176,0.0937384615384615,0.0786193548387097},
-{2981525,3895176,3895438,0.36846,0.36846},
-{2981526,3895116,3895344,0.228641379310345,0.245577777777778},
-{2981527,3895803,3895116,0.5604,0.5604},
-{2981528,3896108,3895344,0.470191304347826,0.33795},
-{2981529,3895898,3896227,0.61287,0.61287},
-{2981530,3895898,3896518,0.53694,0.53694},
-{2981531,3895252,3895599,0.42477,0.42477},
-{2981532,3895599,3895388,0.18975,0.18975},
-{2981533,3895599,3895967,0.27558,0.27558},
-{2981534,3895562,3895967,0.59715,0.59715},
-{2981535,3896032,3895769,0.2406,0.253263157894737},
-{2981536,3895967,3896032,0.0453777777777778,0.0453777777777778},
-{2981537,3896032,3896649,0.64449,0.64449},
-{2981538,3896033,3896486,0.47331,0.47331},
-{2981539,3896554,3896032,0.331914285714286,0.387233333333333},
-{2981540,3896518,3897130,0.43875,0.43875},
-{2981541,3896518,3897289,0.69333,0.69333},
-{2981542,3896801,3897047,0.26688,0.26688},
-{2981543,3896553,3897047,0.31314,0.31314},
-{2981544,3896553,3897151,0.62907,0.62907},
-{2981545,3897047,3897151,0.52299,0.52299},
-{2981546,3897151,3897230,0.10062,0.10062},
-{2981547,3897230,3897556,0.20772,0.20772},
-{2981548,3896108,3896257,0.176353846153846,0.176353846153846},
-{2981549,3896187,3896257,0.0412666666666667,0.0412666666666667},
-{2981550,3896257,3896553,0.35755,0.35755},
-{2981551,3897718,3898592,0.87396,0.87396},
-{2981552,3897631,3898147,0.71814,0.71814},
-{2981553,3897586,3898147,0.34149,0.34149},
-{2981554,3898147,3898592,0.24114,0.24114},
-{2981555,3898147,3898326,0.13506,0.13506},
-{2981556,3898326,3899077,0.46353,0.46353},
-{2981557,3897551,3898062,0.62679,0.62679},
-{2981558,3897556,3898062,0.27903,0.27903},
-{2981559,3897941,3898326,0.29907,0.29907},
-{2981560,3897941,3898924,0.59553,0.59553},
-{2981561,3898924,3899077,0.221444444444444,0.221444444444444},
-{2981562,3898924,3899493,0.36951,0.36951},
-{2981563,3898941,3898924,0.33438,0.33438},
-{2981564,3897230,3897733,0.490658823529412,0.490658823529412},
-{2981565,3897526,3897733,0.270830769230769,0.251485714285714},
-{2981566,3897733,3897818,0.0909428571428571,0.0909428571428571},
-{2981567,3897818,3898040,0.248528571428571,0.248528571428571},
-{2981568,3897556,3897876,0.26925,0.26925},
-{2981569,3897876,3898040,0.1429875,0.1429875},
-{2981570,3897876,3898175,0.20841,0.20841},
-{2981571,3898062,3898175,0.10194,0.10194},
-{2981572,3898175,3898505,-1,-1},
-{2981573,3898175,3898735,0.42354,0.42354},
-{2981574,3898735,3898941,0.25014,0.25014},
-{2981575,3898040,3898537,0.35949,0.35949},
-{2981576,3898537,3898735,0.21624,0.21624},
-{2981577,3901243,3901273,0.262044444444444,0.262044444444444},
-{2981578,3901393,3901637,0.654192857142857,0.654192857142857},
-{2981579,3901243,3901637,0.15376,0.159062068965517},
-{2981580,3901637,3902101,0.167109677419355,0.185014285714286},
-{2981581,3903749,3904323,0.494296551724138,0.494296551724138},
-{2981582,3904260,3904702,0.259303448275862,0.259303448275862},
-{2981583,3904702,3905060,0.253090909090909,0.22272},
-{2981584,3904260,3904636,0.24363,0.24363},
-{2981585,3904702,3905078,0.26757,0.26757},
-{2981586,3902958,3903510,-1,0.5565},
-{2981587,3904145,3904463,0.234438461538462,0.243816},
-{2981588,3905060,3905275,0.188504347826087,0.18065},
-{2981589,3905275,3905422,0.110688,0.106430769230769},
-{2981590,3905422,3905709,0.184511111111111,0.191607692307692},
-{2981591,3905275,3905709,0.675377777777778,0.675377777777778},
-{2981592,3905709,3906082,0.209088888888889,0.209088888888889},
-{2981593,3902101,3902114,-1,-1},
-{2981594,3908239,3909558,0.868866666666667,0.868866666666667},
-{2981595,3905422,3906476,0.450711111111111,0.450711111111111},
-{2981596,3906302,3906476,0.2186,0.2186},
-{2981597,3906355,3907149,0.531133333333333,0.531133333333333},
-{2981598,3908239,3908832,0.208866666666667,0.208866666666667},
-{2981629,3869593,3869874,0.108977777777778,0.108977777777778},
-{2981630,3869874,3870381,0.233111111111111,0.233111111111111},
-{2981631,3870881,3870381,0.37748,0.37748},
-{2981632,3893949,3894504,0.567044444444444,0.567044444444444},
-{2981633,3894504,3894228,0.186028571428571,0.162775},
-{2981634,3894504,3894914,0.60414,0.60414},
-{2981635,3894447,3894821,0.368155555555556,0.368155555555556},
-{2981636,3894821,3894578,0.161263636363636,0.1314},
-{2981637,3894695,3895053,0.360844444444444,0.360844444444444},
-{2981638,3895053,3894821,0.142368,0.104682352941176},
-{2981639,3895258,3895053,0.124533333333333,0.105075},
-{2981640,3894821,3895157,0.4743,0.4743},
-{2981641,3895157,3895455,0.43959,0.43959},
-{2981642,3895157,3894785,0.209328,0.209328},
-{2981643,3894785,3894504,0.177125,0.17004},
-{2981644,3895053,3895271,0.250066666666667,0.250066666666667},
-{2981645,3895504,3895157,0.195577777777778,0.195577777777778},
-{2981646,3895271,3895504,0.34584,0.34584},
-{2981647,3895455,3895234,0.211425,0.241628571428571},
-{2981648,3895656,3895455,0.262542857142857,0.229725},
-{2981649,3895504,3895656,0.23955,0.23955},
-{2981650,3895258,3895491,0.33033,0.33033},
-{2981651,3895491,3895271,0.16941,0.16941},
-{2981652,3895859,3895491,0.29643,0.29643},
-{2981653,3895769,3896475,0.63267,0.63267},
-{2981654,3896649,3896475,0.14532,0.14532},
-{2981655,3896570,3895859,0.43617,0.43617},
-{2981656,3895491,3895680,0.29517,0.29517},
-{2981657,3895680,3895907,0.29637,0.29637},
-{2981658,3895907,3895656,0.270323076923077,0.2196375},
-{2981659,3896118,3895680,0.31218,0.31218},
-{2981660,3896399,3895907,0.46396,0.46396},
-{2981661,3895907,3896189,0.28539,0.28539},
-{2981662,3896654,3896189,0.31974,0.31974},
-{2981663,3896635,3896654,0.063,0.063},
-{2981664,3896189,3896512,0.26622,0.26622},
-{2981665,3896475,3896570,0.12564,0.12564},
-{2981666,3895656,3895853,0.26313,0.26313},
-{2981667,3895853,3895437,0.34077,0.34077},
-{2981668,3896859,3896834,0.437766666666667,0.437766666666667},
-{2981669,3896649,3896834,0.19116,0.19116},
-{2981670,3897021,3896570,0.28359,0.28359},
-{2981671,3896570,3896998,0.4761,0.4761},
-{2981672,3896998,3896399,0.36354,0.36354},
-{2981673,3895853,3896448,0.56025,0.56025},
-{2981674,3896512,3896448,0.33627,0.33627},
-{2981675,3896512,3896913,0.28848,0.28848},
-{2981676,3896913,3897016,0.06816,0.06816},
-{2981677,3896913,3896812,0.33939,0.33939},
-{2981678,3897818,3898378,0.40215,0.40215},
-{2981679,3898378,3899220,0.6447,0.6447},
-{2981680,3898537,3899346,0.647684210526316,0.647684210526316},
-{2981681,3898735,3899433,0.52602,0.52602},
-{2981682,3896834,3897021,0.1199,0.1199},
-{2981683,3897021,3897838,0.55899,0.55899},
-{2981684,3897838,3896998,0.50334,0.50334},
-{2981685,3896998,3897826,0.67884,0.67884},
-{2981686,3898378,3898537,0.18315,0.18315},
-{2981687,3898208,3898378,0.17886,0.17886},
-{2981688,3898499,3898132,0.451447058823529,0.403926315789474},
-{2981689,3898132,3897826,0.5102,0.680266666666667},
-{2981690,3897826,3897707,0.20308,0.160326315789474},
-{2981691,3897838,3898132,0.442885714285714,0.442885714285714},
-{2981692,3898132,3898433,0.385363636363636,0.385363636363636},
-{2981693,3898433,3898726,0.2799,0.29856},
-{2981694,3898770,3898433,0.38202,0.38202},
-{2981695,3898433,3898044,0.579257142857143,0.579257142857143},
-{2981696,3897296,3897358,0.1122,0.136242857142857},
-{2981697,3897358,3897450,0.0441333333333333,0.0441333333333333},
-{2981698,3897358,3897838,0.687726315789474,0.725933333333333},
-{2981699,3897400,3897132,0.34323,0.34323},
-{2981700,3897016,3897132,0.07233,0.07233},
-{2981701,3897132,3897582,0.29694,0.29694},
-{2981702,3897582,3897768,0.1161,0.1161},
-{2981703,3897768,3898159,0.22038,0.22038},
-{2981704,3897582,3897830,0.44085,0.44085},
-{2981705,3898044,3897768,0.29589,0.29589},
-{2981706,3900646,3900997,0.210688888888889,0.210688888888889},
-{2981707,3900330,3900646,0.641666666666667,0.641666666666667},
-{2981708,3900330,3900566,0.15834,0.15834},
-{2981709,3900633,3900566,0.101288888888889,0.101288888888889},
-{2981710,3900997,3900633,0.455955555555556,0.455955555555556},
-{2981711,3900633,3901434,0.3594,0.3594},
-{2981712,3900566,3901008,0.193542857142857,0.193542857142857},
-{2981713,3901008,3901341,0.154944,0.1614},
-{2981714,3901246,3901008,0.212,0.212},
-{2981715,3901246,3901341,0.0804444444444445,0.0804444444444445},
-{2981716,3901341,3901434,0.123285714285714,0.107875},
-{2981717,3901434,3901526,0.1117,0.141094736842105},
-{2981718,3901651,3900997,0.285288888888889,0.285288888888889},
-{2981719,3901651,3901238,0.482133333333333,0.482133333333333},
-{2981720,3901238,3901526,0.131711111111111,0.131711111111111},
-{2981721,3901526,3901656,0.0641739130434783,0.082},
-{2981722,3901651,3902114,-1,-1},
-{2981723,3902114,3902069,0.133933333333333,0.133933333333333},
-{2981724,3902069,3901656,0.346135714285714,0.372761538461538},
-{2981725,3901656,3902358,0.3884,0.313707692307692},
-{2981726,3902069,3902723,0.362427272727273,0.318936},
-{2981727,3902449,3902701,0.119022222222222,0.119022222222222},
-{2981728,3902701,3903393,0.355177777777778,0.355177777777778},
-{2981729,3903393,3903154,0.116066666666667,0.116066666666667},
-{2981730,3903393,3903709,0.2486,0.2486},
-{2981731,3902319,3902766,0.478133333333333,0.478133333333333},
-{2981732,3901873,3902766,0.355311111111111,0.355311111111111},
-{2981733,3902701,3903199,0.569,0.569},
-{2981734,3903601,3903784,0.215052631578947,0.215052631578947},
-{2981735,3904222,3903784,0.211,0.211},
-{2981736,3904127,3904295,0.1497,0.1497},
-{2981737,3904295,3904468,0.0821555555555556,0.0821555555555556},
-{2981738,3904127,3904429,0.406711111111111,0.406711111111111},
-{2981739,3904429,3904484,0.227509090909091,0.227509090909091},
-{2981740,3904295,3904794,0.451088888888889,0.451088888888889},
-{2981741,3904429,3904794,0.158155555555556,0.158155555555556},
-{2981742,3904794,3904923,0.172772727272727,0.172772727272727},
-{2981743,3904923,3905104,0.168024,0.168024},
-{2981744,3905104,3905267,0.110452173913043,0.149435294117647},
-{2981745,3905267,3904587,0.541175,0.43294},
-{2981746,3904899,3905557,0.322846153846154,0.322846153846154},
-{2981747,3905557,3905727,0.157155555555556,0.157155555555556},
-{2981748,3905267,3906461,0.569333333333333,0.569333333333333},
-{2981749,3905557,3906461,0.408311111111111,0.408311111111111},
-{2981750,3905727,3906597,0.402488888888889,0.402488888888889},
-{2981751,3906461,3906714,0.122155555555556,0.122155555555556},
-{2981752,3905727,3905992,0.2532,0.2532},
-{2981753,3905468,3905557,0.0803555555555556,0.0803555555555556},
-{2981780,3902766,3902965,0.153755555555556,0.153755555555556},
-{2981781,3903199,3903403,0.144155555555556,0.144155555555556},
-{2981782,3902778,3902922,0.14958947368421,0.1579},
-{2981783,3904222,3904684,0.364266666666667,0.364266666666667},
-{2981784,3903784,3904296,0.371288888888889,0.371288888888889},
-{2981785,3903403,3903863,0.3858,0.3858},
-{2981786,3902922,3903437,0.6484125,0.6484125},
-{2981787,3902356,3903029,0.584781818181818,0.584781818181818},
-{2981788,3901863,3902690,0.570096,-1},
-{2981789,3901347,3902296,0.66095,0.66095},
-{2981790,3900961,3901905,0.662765217391304,0.662765217391304},
-{2981791,3900666,3901395,0.474311111111111,0.5568},
-{2981792,3903784,3903403,0.220032,0.220032},
-{2981793,3903403,3902922,0.28407,0.28407},
-{2981794,3902922,3902356,0.328957894736842,0.328957894736842},
-{2981795,3904296,3903863,0.197533333333333,0.197533333333333},
-{2981796,3903863,3903496,0.196022222222222,0.196022222222222},
-{2981797,3903437,3903496,0.0612,0.0612},
-{2981798,3903437,3903029,0.330063157894737,0.330063157894737},
-{2981799,3903029,3902690,0.248747368421053,0.248747368421053},
-{2981800,3902690,3902296,0.179777777777778,0.179777777777778},
-{2981801,3902296,3901905,0.1614,0.1614},
-{2981803,3901704,3902778,0.445977777777778,0.445977777777778},
-{2981804,3901527,3902450,0.386311111111111,0.386311111111111},
-{2981805,3901367,3902119,0.328066666666667,0.328066666666667},
-{2981806,3904296,3905190,0.673777777777778,0.673777777777778},
-{2981807,3903496,3904635,0.885866666666667,0.885866666666667},
-{2983258,3876371,3877167,-1,0.507282352941176},
-{2983261,3904469,3904773,0.191448,0.208095652173913},
-{2983262,3905222,3905526,0.2319,0.220857142857143},
-{2983263,3900963,3901469,0.397333333333333,0.510857142857143},
-{2983264,3901469,3901553,0.08744,0.119236363636364},
-{2983265,3901487,3901803,0.273847058823529,0.211609090909091},
-{2983266,3901803,3901884,0.0715411764705882,0.0715411764705882},
-{2983268,3903381,3903131,0.252,0.252},
-{2983269,3903381,3902983,0.210733333333333,0.210733333333333},
-{2986618,3880172,3880391,-1,-1},
-{2986638,3853853,3854046,0.0896888888888889,0.0896888888888889},
-{2986642,3912280,3912370,0.0938823529411765,0.0886666666666667},
-{2986649,3864194,3863681,0.249622222222222,0.249622222222222},
-{2986650,3865063,3864450,0.253088888888889,0.253088888888889},
-{2986651,3865636,3865063,0.258860869565217,0.3721125},
-{2986652,3867608,3867604,0.5064,0.384864},
-{2986653,3866449,3866140,0.3652875,0.3438},
-{2986654,3868939,3868098,0.529517647058823,-1},
-{2986655,3866646,3866373,0.147939130434783,0.130869230769231},
-{2986656,3866766,3866859,0.4028,0.4028},
-{2986657,3854486,3854218,0.1172,0.1172},
-{2986658,3854487,3854857,0.405444444444444,0.405444444444444},
-{2986659,3880307,3880603,-1,-1},
-{2986660,3878103,3878233,0.0989555555555555,0.0989555555555555},
-{2986661,3877254,3877293,0.146044444444444,0.146044444444444},
-{2986662,3876852,3877136,-1,0.102492857142857},
-{2986663,3877326,3877956,-1,0.267339130434783},
-{2986664,3876284,3876433,0.286866666666667,0.286866666666667},
-{2986665,3876575,3876840,-1,-1},
-{2986674,3861655,3861562,0.265371428571429,0.161530434782609},
-{2986676,3893836,3894594,0.401555555555556,0.401555555555556},
-{2986680,3914640,3914833,0.135392307692308,0.113554838709677},
-{2986681,3914388,3914640,0.108811764705882,0.108811764705882},
-{2986682,3914128,3914388,0.17679,0.17679},
-{2986683,3913830,3914128,0.20292,0.20292},
-{2986687,3858664,3858781,0.0803307692307692,0.10443},
-{2986688,3859176,3858781,0.144814285714286,0.150177777777778},
-{2986689,3859766,3859176,0.267214285714286,0.29928},
-{2986690,3861683,3860070,0.843066666666667,0.843066666666667},
-{2986691,3861193,3861384,0.106711111111111,0.106711111111111},
-{2986692,3858888,3858903,0.0397454545454545,0.0397454545454545},
-{2986693,3858903,3859091,0.149618181818182,0.149618181818182},
-{2986694,3859940,3860696,0.330466666666667,0.330466666666667},
-{2986695,3861900,3861601,0.129036363636364,0.129036363636364},
-{2986701,3859084,3858733,0.187377777777778,0.187377777777778},
-{2986703,3860815,3860611,0.118933333333333,0.118933333333333},
-{2986704,3861043,3860954,0.0730888888888889,0.0730888888888889},
-{2986705,3857593,3857751,0.172111111111111,0.172111111111111},
-{2986719,3903497,3903288,0.1924,0.1924},
-{2986720,3903926,3903497,0.504857142857143,0.8835},
-{2986721,3903288,3903134,0.0935333333333333,0.0935333333333333},
-{2986722,3906420,3906298,0.0726666666666667,0.0726666666666667},
-{2986723,3896441,3896723,0.2006,0.3009},
-{2986724,3905206,3905423,0.194475,0.245652631578947},
-{2986725,3905446,3905516,0.0769125,0.0769125},
-{2986726,3876195,3875833,0.1596,0.1596},
-{2986729,3891647,3891565,0.0522,0.0522},
-{2986730,3891140,3890795,0.100688372093023,0.103085714285714},
-{2986732,3891477,3891140,0.1197,0.147323076923077},
-{2986787,3874577,3875580,0.5642,0.348476470588235},
-{2986788,3875475,3876252,-1,-1},
-{2986789,3875599,3876381,0.328733333333333,0.328733333333333},
-{2986790,3875679,3876500,0.345311111111111,0.345311111111111},
-{2986791,3876500,3876381,-1,-1},
-{2986792,3876381,3876252,-1,-1},
-{2986793,3876738,3878297,0.578133333333333,0.578133333333333},
-{2986794,3885302,3885520,0.0355391304347826,-1},
-{2986795,3885290,3885551,-1,0.0416205882352941},
-{2986796,3891172,3892538,0.649888888888889,0.649888888888889},
-{2986797,3892497,3892538,0.25345,0.5069},
-{2986798,3892538,3893863,0.701568,0.6496},
-{2986799,3892696,3893762,0.516555555555556,0.516555555555556},
-{2986800,3895346,3895760,0.615104347826087,-1},
-{2986801,3895201,3895346,0.0583076923076923,-1},
-{2986860,3853401,3853086,0.4154,0.29078},
-{2986861,3855389,3854867,0.276342857142857,0.266813793103448},
-{2986862,3856172,3855389,0.387777777777778,0.455217391304348},
-{2986865,3907374,3907602,0.101825,0.12219},
-{2986866,3907602,3907935,0.121152,0.131686956521739},
-{2986867,3907602,3907558,0.24535,0.24535},
-{2986886,3853086,3853644,0.250422222222222,0.250422222222222},
-{2986887,3886659,3886791,0.0665785714285714,-1},
-{2986888,3895709,3896323,-1,-1},
-{2986896,3869611,3868809,0.295177777777778,0.295177777777778},
-{2986911,3875890,3875935,0.0688736842105263,0.0688736842105263},
-{2986912,3876311,3876072,0.261860869565217,0.261860869565217},
-{2986913,3876072,3875851,0.107955555555556,0.107955555555556},
-{2986914,3882502,3882562,0.115486956521739,0.115486956521739},
-{2986915,3883341,3883435,-1,0.222733333333333},
-{2986916,3883435,3883458,-1,0.1248},
-{2986917,3883435,3883630,-1,-1},
-{2986918,3887107,3886909,0.0956222222222222,0.0956222222222222},
-{2986919,3898651,3899654,0.418644444444444,0.418644444444444},
-{2986923,3856054,3856182,0.0472222222222222,0.0472222222222222},
-{2986924,3856695,3856054,0.252888888888889,0.252888888888889},
-{2986925,3859717,3859221,0.265755555555556,0.265755555555556},
-{2986926,3862073,3862154,-1,-1},
-{2986927,3866419,3866096,0.0994888888888889,0.0994888888888889},
-{2986928,3865417,3865011,0.133,0.133},
-{2986929,3873600,3873415,0.137888888888889,0.137888888888889},
-{2986930,3872144,3871563,0.347377777777778,0.347377777777778},
-{2986931,3874858,3874804,0.184066666666667,0.184066666666667},
-{2986932,3873823,3873412,0.2862,0.2862},
-{2986933,3896149,3896272,0.268511111111111,0.268511111111111},
-{2986934,3898347,3898632,-1,-1},
-{2986935,3898305,3898632,0.0951428571428571,0.108},
-{2986936,3898632,3901386,0.651155555555556,0.639316363636364},
-{2986937,3901386,3901828,0.105129411764706,0.101162264150943},
-{2986938,3897727,3897969,0.208971428571429,0.0886545454545454},
-{2986939,3897559,3897851,-1,0.1182},
-{2986940,3898213,3898099,-1,-1},
-{2986941,3898305,3898213,0.0575555555555556,0.0575555555555556},
-{2986942,3898213,3898347,-1,-1},
-{2986943,3898347,3898170,-1,-1},
-{2986944,3898170,3898099,-1,-1},
-{2986945,3898170,3897601,-1,-1},
-{2986956,3849376,3849125,0.250644444444444,0.250644444444444},
-{2986957,3855814,3855306,0.243333333333333,0.243333333333333},
-{2986958,3858972,3859540,0.256577777777778,0.256577777777778},
-{2986959,3858122,3858043,0.0733333333333333,0.0733333333333333},
-{2986960,3867474,3866847,0.383294117647059,0.250615384615385},
-{2986961,3875571,3875443,0.342644444444444,0.342644444444444},
-{2986962,3877822,3877102,0.265577777777778,0.265577777777778},
-{2986963,3880356,3880277,-1,-1},
-{2986964,3896470,3896390,-1,0.128},
-{2986965,3901612,3901386,0.291085714285714,0.218314285714286},
-{2986966,3901612,3901828,0.155266666666667,0.155266666666667},
-{2986967,3901122,3901612,0.27295,0.350935714285714},
-{2986968,3869814,3869573,-1,0.1550625},
-{2986969,3869573,3869766,0.09985,-1},
-{2986970,3866882,3866210,0.273339130434783,0.273339130434783},
-{2986971,3866210,3864928,0.472177777777778,0.472177777777778},
-{2986972,3866882,3866231,0.130557446808511,0.1278375},
-{2986973,3866210,3866231,0.266914285714286,-1},
-{2986974,3872207,3872117,0.113022222222222,0.113022222222222},
-{2986975,3872061,3871978,0.119444444444444,0.119444444444444},
-{2986976,3872779,3872413,0.133288888888889,0.133288888888889},
-{2986977,3872267,3871978,0.158222222222222,0.158222222222222},
-{2986978,3878421,3878107,-1,0.0968714285714286},
-{2986979,3878492,3878421,-1,0.0556153846153846},
-{2986980,3878882,3878562,0.280305882352941,-1},
-{2986981,3890539,3890879,0.598757142857143,0.441189473684211},
-{2986984,3857715,3858171,-1,-1},
-{2986985,3860579,3859530,0.255665454545455,-1},
-{2986986,3859530,3858996,0.124458823529412,-1},
-{2986987,3859530,3859782,0.1796,0.1796},
-{2986988,3880405,3880539,0.183155555555556,0.183155555555556},
-{2986989,3862617,3863073,0.275377777777778,0.275377777777778},
-{2986990,3862135,3862314,0.0888,0.0888},
-{2986991,3868867,3869623,0.3752,0.3752},
-{2986992,3873225,3872961,0.301,0.301},
-{2986993,3871697,3871564,0.206511111111111,0.206511111111111},
-{2986994,3877811,3878067,-1,0.260657142857143},
-{2986995,3887723,3887949,0.129111111111111,0.129111111111111},
-{2986996,3897675,3897208,0.275133333333333,0.275133333333333},
-{2987005,3851124,3850876,0.325452631578947,0.363741176470588},
-{2987006,3851093,3850588,0.215755555555556,0.215755555555556},
-{2987007,3850588,3850804,0.489882352941177,0.5552},
-{2987008,3856998,3857131,0.143822222222222,0.143822222222222},
-{2987009,3854053,3854400,0.199333333333333,0.199333333333333},
-{2987010,3859276,3858569,0.389755555555556,0.389755555555556},
-{2987011,3859509,3859249,0.189133333333333,0.189133333333333},
-{2987012,3861790,3861699,0.0766222222222222,0.0766222222222222},
-{2987013,3860688,3860398,0.2752,0.2752},
-{2987014,3865716,3865566,0.0659111111111111,0.0659111111111111},
-{2987015,3874890,3874819,0.240761538461538,0.240761538461538},
-{2987016,3890590,3890896,0.275336842105263,0.26157},
-{2987017,3894326,3894011,0.29345,0.29345},
-{2987029,3851048,3850637,0.593822222222222,-1},
-{2987030,3853608,3853417,0.256422222222222,0.256422222222222},
-{2987031,3860204,3860265,0.083,0.083},
-{2987032,3861618,3861343,0.251688888888889,0.251688888888889},
-{2987033,3864645,3863664,0.4742,0.4742},
-{2987034,3870208,3869701,-1,-1},
-{2987035,3870205,3869903,-1,-1},
-{2987036,3871015,3871041,-1,0.13064},
-{2987037,3871015,3871209,-1,0.1235625},
-{2987038,3870995,3871237,-1,-1},
-{2987039,3869958,3869667,0.144333333333333,0.144333333333333},
-{2987040,3872889,3872703,0.04284,0.04284},
-{2987041,3872476,3872315,-1,-1},
-{2987042,3890964,3890491,0.195964285714286,0.195964285714286},
-{2987043,3897414,3897520,-1,0.0924666666666667},
-{2987057,3850240,3851575,0.8236,0.8236},
-{2987058,3870771,3870895,0.0646888888888889,0.0646888888888889},
-{2987059,3868398,3868162,0.0980444444444444,0.0980444444444444},
-{2987060,3873819,3873946,0.0858888888888889,0.0858888888888889},
-{2987061,3874297,3874253,-1,0.05865},
-{2987062,3897827,3897927,0.315844444444444,0.315844444444444},
-{2987063,3898345,3898463,0.309088888888889,0.309088888888889},
-{2987064,3855743,3855572,0.0707777777777778,0.0707777777777778},
-{2987065,3855950,3855928,-1,0.214823076923077},
-{2987066,3855928,3855645,0.114155555555556,0.114155555555556},
-{2987067,3856343,3855946,0.207355555555556,0.207355555555556},
-{2987068,3855303,3855160,0.0660444444444444,0.0660444444444444},
-{2987069,3856169,3856013,0.105136363636364,0.11565},
-{2987070,3856613,3856169,0.180696,0.173746153846154},
-{2987071,3856169,3855802,0.228155555555556,0.228155555555556},
-{2987072,3860530,3860488,0.103911111111111,0.103911111111111},
-{2987073,3860706,3860352,0.163777777777778,0.163777777777778},
-{2987074,3862712,3862554,0.121044444444444,0.121044444444444},
-{2987075,3863082,3862835,0.210422222222222,0.210422222222222},
-{2987076,3869008,3868828,0.114555555555556,0.114555555555556},
-{2987077,3869672,3869123,0.310355555555556,0.310355555555556},
-{2987078,3870110,3869559,0.305377777777778,0.305377777777778},
-{2987079,3869559,3869082,0.114246153846154,0.120421621621622},
-{2987080,3869082,3868858,0.0613263157894737,0.0896307692307692},
-{2987081,3869160,3869082,0.067175,0.0895666666666667},
-{2987082,3872546,3873007,0.360088888888889,0.360088888888889},
-{2987117,3857767,3857541,0.108488888888889,0.108488888888889},
-{2987120,3853754,3853390,0.308577777777778,0.308577777777778},
-{2987121,3860698,3861053,0.235422222222222,0.235422222222222},
-{2987122,3864559,3864913,0.264822222222222,0.264822222222222},
-{2987123,3868371,3867227,0.444955555555556,0.444955555555556},
-{2987124,3871128,3870015,0.413644444444444,0.413644444444444},
-{2987125,3869332,3869071,0.141484615384615,0.136244444444444},
-{2987126,3870342,3869290,0.271628571428571,-1},
-{2987154,3852743,3852696,0.0196,-1},
-{2987155,3853476,3852743,0.2148,-1},
-{2987157,3853164,3852696,0.206466666666667,0.206466666666667},
-{2987158,3853602,3853101,0.221088888888889,0.221088888888889},
-{2987159,3859475,3859332,0.0905333333333333,0.0452666666666667},
-{2987160,3859475,3859315,0.0704709677419355,-1},
-{2987161,3861761,3861459,0.3214,0.3214},
-{2987162,3863414,3863294,0.107822222222222,0.107822222222222},
-{2987164,3865801,3866713,0.612666666666667,0.612666666666667},
-{2987167,3875902,3877505,0.696846428571429,0.696846428571429},
-{2987169,3852812,3852378,0.288222222222222,0.288222222222222},
-{2987170,3852375,3851943,0.293422222222222,0.293422222222222},
-{2987191,3858717,3858737,0.0485111111111111,0.0485111111111111},
-{2987192,3859828,3859282,0.601454545454545,0.601454545454545},
-{2987193,3859282,3859438,0.206114285714286,0.254611764705882},
-{2987194,3859690,3860078,-1,0.559145454545455},
-{2987195,3859670,3859477,0.0570179104477612,0.0578818181818182},
-{2987196,3860467,3859670,0.296844827586207,0.441461538461538},
-{2987197,3862244,3861700,0.309022222222222,0.309022222222222},
-{2987198,3861640,3861700,0.0714888888888889,0.0714888888888889},
-{2987199,3861700,3861846,0.152622222222222,0.152622222222222},
-{2987200,3869250,3869261,0.1572,0.1572},
-{2987201,3893008,3894694,0.922628571428571,0.759811764705882},
-{2987203,3859014,3859083,0.195163636363636,-1},
-{2987204,3870706,3870498,0.319888888888889,0.319888888888889},
-{2987205,3871928,3871707,0.323288888888889,0.323288888888889},
-{2987206,3870706,3870427,0.0777272727272727,0.07125},
-{2987207,3871140,3870706,0.116183333333333,0.119502857142857},
-{2987208,3871436,3871312,0.0367741935483871,0.038},
-{2987209,3871928,3871436,0.13464375,0.130563636363636},
-{2987210,3872227,3871928,0.100555555555556,0.129285714285714},
-{2987211,3851828,3852662,0.254436363636364,0.254436363636364},
-{2987212,3860526,3859793,0.342163636363636,0.4182},
-{2987213,3860526,3860260,0.127022222222222,0.127022222222222},
-{2987214,3859550,3859257,0.146515384615385,0.146515384615385},
-{2987215,3858621,3858859,-1,-1},
-{2987216,3870228,3870991,0.315022222222222,0.315022222222222},
-{2987217,3870991,3870520,0.172488888888889,0.172488888888889},
-{2987218,3871391,3870942,0.526616666666667,-1},
-{2987219,3871327,3871160,0.265473913043478,0.283995348837209},
-{2987220,3875808,3875273,0.226333333333333,0.226333333333333},
-{2987221,3885369,3885643,0.112555555555556,0.112555555555556},
-{2987222,3887788,3888306,0.38907,0.38907},
-{2987225,3886563,3886427,0.0950857142857143,0.0868173913043478},
-{2987226,3886629,3886807,0.11926,0.108418181818182},
-{2987227,3885289,3885713,-1,-1},
-{2987228,3886174,3886162,-1,-1},
-{2987229,3886944,3886888,0.2525625,-1},
-{2987230,3893762,3893565,0.3545,0.3545},
-{2987231,3899322,3898746,0.258376470588235,0.24862641509434},
-{2987232,3899623,3899322,0.158013333333333,0.158013333333333},
-{2987233,3898482,3899693,0.644377777777778,0.644377777777778},
-{2987234,3899693,3899322,0.726222222222222,0.726222222222222},
-{2987235,3900989,3900974,0.0357483870967742,0.046175},
-{2987236,3901080,3900989,0.0857538461538462,0.0857538461538462},
-{2987237,3900462,3900989,-1,0.601870588235294},
-{2987238,3901080,3900462,-1,0.462733333333333},
-{2987239,3900462,3900391,-1,0.0374},
-{2987240,3901181,3901080,0.10365,0.118457142857143},
-{2987241,3901198,3901181,0.0187125,0.0230307692307692},
-{2987242,3903117,3903103,0.05288,0.063456},
-{2987243,3903121,3903117,0.0224142857142857,0.03138},
-{2987244,3900974,3901686,0.467933333333333,0.467933333333333},
-{2987245,3901686,3902065,0.239047058823529,0.239047058823529},
-{2987246,3902065,3902408,0.25372,0.25372},
-{2987247,3902408,3902732,0.204063157894737,0.204063157894737},
-{2987248,3902732,3902997,0.131488888888889,0.131488888888889},
-{2987249,3902732,3902868,0.24492,0.24492},
-{2987250,3902408,3902552,0.18645,0.18645},
-{2987251,3902065,3902204,-1,-1},
-{2987252,3901686,3901826,0.29332,0.29332},
-{2987253,3901181,3901826,0.390057142857143,-1},
-{2987254,3901826,3902204,0.1781,-1},
-{2987255,3902204,3902552,0.169617391304348,-1},
-{2987256,3902552,3902868,0.140544827586207,-1},
-{2987257,3902868,3903117,0.232333333333333,-1},
-{2987258,3860128,3859534,0.287581818181818,0.287581818181818},
-{2987259,3866223,3866172,0.0551162790697674,0.0564285714285714},
-{2987260,3866172,3867432,0.443533333333333,0.443533333333333},
-{2987261,3872427,3871847,0.198377777777778,0.198377777777778},
-{2987262,3886759,3886185,0.443644444444444,0.443644444444444},
-{2987263,3896942,3897395,0.275288888888889,0.275288888888889},
-{2987264,3912180,3912081,0.0535111111111111,0.0535111111111111},
-{2987265,3911758,3910733,-1,-1},
-{2987266,3917379,3917989,0.412571428571429,-1},
-{2987267,3917724,3917628,0.0674285714285714,-1},
-{2987268,3917234,3917135,0.101325,-1},
-{2987269,3916551,3916657,-1,0.10635},
-{2987527,3914312,3915006,0.217813953488372,0.2926875},
-{2987528,3915006,3915382,0.150615789473684,0.130077272727273},
-{2987529,3914950,3914181,0.388315384615385,0.388315384615385},
-{2987530,3915006,3914950,0.051768,0.0562695652173913},
-{2987531,3914950,3915390,0.248755555555556,0.248755555555556},
-{2987532,3916182,3916530,-1,-1},
-{2987533,3916530,3916621,-1,-1},
-{2987534,3916530,3916813,-1,-1},
-{2987535,3916432,3916813,-1,0.277633333333333},
-{2987536,3916813,3916926,-1,0.0677333333333333},
-{2987537,3916346,3916621,0.152937931034483,-1},
-{2987538,3916621,3916926,0.123306666666667,-1},
-{2987544,3903885,3903538,0.213444444444444,0.213444444444444},
-{2987545,3901964,3902262,0.1962,0.1962},
-{2987546,3902858,3903382,0.130675471698113,-1},
-{2987547,3902858,3902939,0.0628235294117647,-1},
-{2987548,3903113,3903434,0.0917375,-1},
-{2987549,3902749,3902858,-1,0.073704},
-{2987550,3906002,3905636,0.214088888888889,0.214088888888889},
-{2987551,3915486,3915233,0.161822222222222,0.161822222222222},
-{2987552,3918373,3918083,0.162466666666667,0.162466666666667},
-{2987553,3922133,3922149,0.34059,0.34059},
-{2987554,3870779,3871156,-1,-1},
-{2987555,3871156,3871288,0.135288888888889,0.135288888888889},
-{2987556,3870810,3871288,-1,0.178292307692308},
-{2987557,3871288,3871438,-1,0.0488785714285714},
-{2987558,3871636,3871438,0.338918181818182,0.3468},
-{2987559,3871438,3871296,0.316843902439024,0.3093},
-{2987560,3867932,3868114,0.0620888888888889,0.0620888888888889},
-{2987561,3906875,3906841,0.0678444444444444,0.0678444444444444},
-{2987562,3906841,3906810,0.120755555555556,0.120755555555556},
-{2987563,3906841,3906653,0.0868444444444444,0.0868444444444444},
-{2987564,3907135,3907280,0.0303042253521127,-1},
-{2987565,3905103,3907135,0.436525,-1},
-{2987566,3907212,3907847,0.332733333333333,0.332733333333333},
-{2987567,3907297,3907355,0.109111111111111,0.109111111111111},
-{2987568,3909706,3908935,0.402266666666667,0.402266666666667},
-{2987569,3910107,3909376,0.375866666666667,0.375866666666667},
-{2987570,3910600,3909757,0.375933333333333,0.375933333333333},
-{2987571,3910992,3910211,0.356911111111111,0.356911111111111},
-{2987583,3863262,3862975,0.297555555555556,0.297555555555556},
-{2987584,3869272,3869317,0.308511111111111,0.308511111111111},
-{2987585,3870266,3870272,0.0559741935483871,0.0559741935483871},
-{2987586,3897734,3897626,0.0660888888888889,0.0660888888888889},
-{2987587,3907095,3906954,0.09639,0.09639},
-{2987588,3907258,3907424,0.16195,0.077736},
-{2987589,3911363,3910676,0.360488888888889,0.360488888888889},
-{2987590,3911735,3911074,0.361666666666667,0.361666666666667},
-{2987591,3912141,3911500,0.339822222222222,0.339822222222222},
-{2987592,3912447,3912261,0.0850888888888889,0.0850888888888889},
-{2987593,3905129,3907186,-1,0.51892131147541},
-{2987594,3918195,3917740,0.282577777777778,0.282577777777778},
-{2987595,3918849,3919021,0.228184615384615,0.228184615384615},
-{2987606,3869159,3868820,0.20649,0.20649},
-{2987607,3867628,3868360,0.290577777777778,0.290577777777778},
-{2987608,3867628,3867579,0.169533333333333,0.169533333333333},
-{2987609,3867043,3866885,0.30408,0.30408},
-{2987610,3868546,3868052,0.328118181818182,0.343742857142857},
-{2987611,3895744,3896378,-1,0.598490322580645},
-{2987612,3897045,3897327,0.105675,0.0983023255813953},
-{2987613,3896174,3896378,-1,0.123955555555556},
-{2987614,3893671,3893791,0.064,0.064},
-{2987615,3896880,3896990,-1,0.0903272727272727},
-{2987616,3896514,3896910,0.232022222222222,0.232022222222222},
-{2987617,3906609,3907255,0.279573913043478,0.221731034482759},
-{2987618,3907255,3907376,0.09252,0.0816352941176471},
-{2987619,3913935,3913887,-1,0.02228},
-{2987637,3869479,3869210,0.102111111111111,0.102111111111111},
-{2987638,3867306,3867305,0.0664888888888889,0.0664888888888889},
-{2987639,3866576,3866469,0.0930444444444444,0.0930444444444444},
-{2987640,3872589,3872666,0.0812666666666667,0.0812666666666667},
-{2987641,3872254,3872187,0.0794444444444444,0.0794444444444444},
-{2987642,3873558,3873874,0.124711111111111,0.124711111111111},
-{2987643,3871880,3871825,0.173977777777778,0.173977777777778},
-{2987644,3871451,3871979,0.253755555555556,0.253755555555556},
-{2987645,3884780,3884744,0.173133333333333,0.173133333333333},
-{2987646,3896829,3897045,-1,0.0691945945945946},
-{2987647,3896829,3896905,-1,0.0519461538461539},
-{2987648,3896905,3896961,-1,0.0405428571428571},
-{2987649,3896695,3896905,0.0662,-1},
-{2987650,3896905,3896986,0.0249666666666667,-1},
-{2987651,3896961,3896986,0.0383357142857143,-1},
-{2987652,3897652,3898703,0.509731034482759,0.509731034482759},
-{2987653,3896961,3897652,-1,0.428960869565217},
-{2987654,3897652,3897821,-1,0.145356},
-{2987655,3897821,3898295,0.415628571428571,0.415628571428571},
-{2987656,3898789,3898871,0.0986709677419355,0.0955875},
-{2987657,3910806,3910820,0.0762521739130435,0.0762521739130435},
-{2987658,3910820,3910837,0.188228571428571,0.179672727272727},
-{2987659,3910166,3910671,0.264875,0.264875},
-{2987660,3910358,3910450,0.207644444444444,0.207644444444444},
-{2987661,3909474,3910450,0.462066666666667,0.462066666666667},
-{2987662,3910820,3911701,0.323933333333333,0.323933333333333},
-{2987667,3870485,3870072,0.143866666666667,0.143866666666667},
-{2987668,3869571,3869174,0.145044444444444,0.145044444444444},
-{2987669,3869174,3869007,0.0621555555555555,0.0621555555555555},
-{2987670,3872502,3872181,0.113888888888889,0.113888888888889},
-{2987671,3872545,3872856,0.0980444444444444,0.0980444444444444},
-{2987672,3892379,3892332,0.16904,0.16904},
-{2987673,3892169,3892379,0.0774545454545454,0.079875},
-{2987674,3892379,3892477,0.0529615384615385,0.0529615384615385},
-{2987675,3898232,3898677,-1,0.390924324324324},
-{2987676,3910563,3909791,-1,-1},
-{2987677,3909791,3909224,0.396171428571429,-1},
-{2987690,3884026,3883928,0.0492782608695652,0.0809571428571429},
-{2987691,3883928,3883677,0.132913043478261,0.1910625},
-{2987692,3883928,3884164,0.191088888888889,0.191088888888889},
-{2987693,3882443,3882537,0.0446516129032258,0.0446516129032258},
-{2987694,3883315,3883209,0.0545739130434783,0.0545739130434783},
-{2987695,3912172,3913052,-1,-1},
-{2987697,3868257,3868389,0.0588444444444444,0.0588444444444444},
-{2987698,3869266,3868844,0.1568,0.1568},
-{2987699,3869266,3869257,0.0828444444444444,0.0828444444444444},
-{2987700,3873010,3873302,0.227630769230769,-1},
-{2987701,3873302,3872888,0.09544,0.09544},
-{2987702,3903099,3903986,0.383,0.383},
-{2987703,3903241,3904037,0.340555555555556,0.340555555555556},
-{2987704,3903165,3903999,0.355444444444444,0.355444444444444},
-{2987705,3902592,3902907,0.25596,0.25596},
-{2987706,3902592,3902886,0.20148,0.20148},
-{2987707,3912138,3911659,0.397533333333333,0.397533333333333},
-{2987708,3911984,3912211,0.28524,0.28524},
-{2987714,3863323,3865772,1.1786,1.1786},
-{2987715,3865772,3866325,0.28932972972973,0.28932972972973},
-{2987716,3886634,3886749,0.0364705882352941,0.0357692307692308},
-{2987717,3886749,3887173,0.126992307692308,0.126992307692308},
-{2987718,3886749,3886513,0.159777777777778,0.159777777777778},
-{2987719,3888519,3888866,0.204866666666667,0.204866666666667},
-{2987720,3900291,3900605,0.149807142857143,0.123370588235294},
-{2987729,3864644,3864713,0.0748363636363636,-1},
-{2987730,3864400,3864713,0.0779866666666667,-1},
-{2987731,3864713,3865039,0.09045,-1},
-{2987732,3878208,3877874,0.347813333333333,0.326075},
-{2987733,3896279,3896537,0.1452,0.1452},
-{2987748,3896334,3896518,0.17187,0.17187},
-{2987749,3898592,3898879,0.15885,0.15885},
-{2987750,3896971,3897038,-1,-1},
-{2987751,3902589,3903380,0.336484615384615,0.460452631578947},
-{2987752,3903380,3903411,0.039227027027027,0.0403166666666667},
-{2987753,3903353,3903380,0.0410333333333333,0.0447636363636364},
-{2987755,3902889,3904075,0.736222222222222,0.736222222222222},
-{2987756,3904305,3904075,0.101528571428571,0.109338461538462},
-{2987757,3904305,3904509,0.116791304347826,-1},
-{2987758,3904509,3904587,0.033924,0.0332588235294118},
-{2987759,3904315,3904305,0.111981818181818,-1},
-{2987760,3904090,3904305,0.186622222222222,-1},
-{2987761,3904172,3905104,-1,0.534142857142857},
-{2987762,3903710,3904014,0.11067,0.11067},
-{2987763,3904014,3904172,0.0554896551724138,0.0574714285714286},
-{2987764,3904014,3904062,0.0167111111111111,-1},
-{2987765,3904062,3904484,0.239085714285714,-1},
-{2987766,3903278,3904062,-1,0.361419230769231},
-{2987767,3903111,3903090,-1,0.1018},
-{2987768,3903278,3903251,0.0450893617021277,-1},
-{2987769,3902572,3902449,0.0938666666666667,0.0938666666666667},
-{2987770,3901367,3900961,0.454488888888889,0.454488888888889},
-{2987771,3901527,3901367,0.122644444444444,0.122644444444444},
-{2987772,3901704,3901527,0.151022222222222,0.151022222222222},
-{2987773,3901873,3901704,0.145644444444444,0.145644444444444},
-{2987774,3904478,3904222,0.167933333333333,0.167933333333333},
-{2987775,3904899,3904935,0.00936842105263158,0.00953571428571428},
-{2987776,3904935,3905140,-1,0.0882},
-{2987777,3904935,3905088,0.1008,0.1008},
-{2987778,3905140,3905727,0.36705,0.36705},
-{2987781,3905196,3905695,0.165409523809524,0.168077419354839},
-{2987782,3905886,3906450,0.183797014925373,0.1924125},
-{2987783,3906880,3906739,0.202088888888889,0.202088888888889},
-{2987784,3906560,3906739,0.0454090909090909,0.0454090909090909},
-{2987785,3906880,3906560,0.209544,0.194022222222222},
-{2987786,3906560,3906025,0.322913513513513,0.306353846153846},
-{2987814,3849376,3848873,0.592466666666667,0.592466666666667},
-{2987815,3874848,3875270,0.372358064516129,-1},
-{2987816,3876916,3874848,0.807558620689655,0.6888},
-{2987817,3873650,3874390,0.3552,0.224336842105263},
-{2987818,3873576,3874033,0.3201375,0.150652941176471},
-{2987819,3874110,3875093,0.408733333333333,0.580831578947368},
-{2987820,3874110,3874470,0.507403846153846,-1},
-{2987821,3872913,3873988,0.77692,0.485575},
-{2987822,3874058,3874110,0.340328571428571,-1},
-{2987823,3874475,3874542,0.0194052631578947,-1},
-{2987824,3874351,3874275,-1,0.102815094339623},
-{2987825,3874542,3874612,0.0180461538461538,-1},
-{2987826,3874393,3874348,0.114583333333333,-1},
-{2987827,3874348,3874067,0.15873488372093,-1},
-{2987828,3874542,3874348,0.117414285714286,-1},
-{2987829,3874348,3874275,0.023115,-1},
-{2987830,3874888,3874673,0.1176,0.152188235294118},
-{2987831,3874673,3874254,0.731957142857143,-1},
-{2987832,3874673,3874786,0.288763636363636,0.288763636363636},
-{2987833,3874058,3874786,0.27136,0.581485714285714},
-{2987865,3903926,3903049,0.391246153846154,0.391246153846154},
-{2987866,3850898,3851082,-1,0.1316},
-{2987867,3850910,3851116,0.0708171428571429,-1},
-{2987868,3851076,3851268,0.0726406779661017,0.087465306122449},
-{2987869,3850712,3851268,0.234716129032258,-1},
-{2987870,3850712,3851959,0.222688235294118,-1},
-{2987871,3851268,3851959,0.1632,0.17408},
-{2987872,3858060,3858034,-1,0.11848},
-{2987873,3860260,3859550,0.2348,0.2348},
-{2987874,3856551,3857279,0.37,0.37},
-{2987875,3858697,3857279,0.503072727272727,0.503072727272727},
-{2987876,3857279,3854944,0.883745454545455,0.883745454545455},
-{2987877,3853446,3854944,1.05412727272727,1.05412727272727},
-{2987878,3865908,3864954,-1,0.664058823529412},
-{2987879,3864770,3864815,0.212731914893617,0.2083},
-{2987880,3864815,3865255,0.269378571428571,0.163969565217391},
-{2987881,3866345,3865744,0.214733333333333,0.214733333333333},
-{2987882,3866379,3865515,0.310866666666667,0.310866666666667},
-{2987883,3866404,3865423,0.391176,0.391176},
-{2987884,3866403,3865419,0.358044444444444,0.358044444444444},
-{2987885,3865744,3866314,0.227266666666667,0.227266666666667},
-{2987886,3865515,3865744,0.130577777777778,0.130577777777778},
-{2987887,3865423,3865515,0.1487,0.1487},
-{2987888,3865419,3865423,0.266857142857143,0.266857142857143},
-{2987889,3865419,3865603,0.208911111111111,0.208911111111111},
-{2987890,3864739,3864815,0.1398,0.0668608695652174},
-{2987891,3864531,3864739,0.276222222222222,0.276222222222222},
-{2987892,3864531,3864984,0.194333333333333,0.194333333333333},
-{2987893,3864824,3865429,-1,0.360211764705882},
-{2987894,3866334,3865429,0.312,-1},
-{2987895,3863087,3863517,0.218577777777778,0.218577777777778},
-{2987896,3862276,3862066,-1,0.0571358490566038},
-{2987897,3862276,3862285,0.0483,0.0399724137931034},
-{2987898,3862360,3862285,-1,0.0439034482758621},
-{2987899,3851082,3850904,0.113333333333333,-1},
-{2987900,3851047,3851076,0.0230222222222222,0.024864},
-{2987905,3849621,3848885,0.538371428571429,0.491556521739131},
-{2987906,3848885,3848641,0.1772,0.148848},
-{2987907,3850405,3850208,0.176975,0.184669565217391},
-{2987908,3850621,3850405,0.12495,0.1428},
-{2987909,3850842,3850621,0.1265,0.145961538461538},
-{2987910,3850842,3851015,0.150730434782609,0.119544827586207},
-{2987911,3849788,3849858,0.128817391304348,0.128817391304348},
-{2987912,3849984,3850085,0.125710344827586,0.101266666666667},
-{2987913,3850085,3850207,0.216432,0.208107692307692},
-{2987914,3849858,3849953,0.0461,0.044256},
-{2987915,3849953,3850405,0.258244444444444,0.258244444444444},
-{2987916,3849953,3850251,0.247133333333333,0.193408695652174},
-{2987917,3850251,3850531,0.227966666666667,0.227966666666667},
-{2987918,3850531,3850772,0.2256375,0.190010526315789},
-{2987919,3850772,3850207,0.362928,0.37805},
-{2987920,3850251,3849984,0.19191,0.19191},
-{2987921,3850531,3850085,0.235755555555556,0.235755555555556},
-{2987922,3850531,3850842,0.291825,0.424472727272727},
-{2987923,3850772,3850934,0.0958909090909091,0.0879},
-{2987924,3850251,3850621,0.212622222222222,0.212622222222222},
-{2987956,3871494,3871541,-1,-1},
-{2987957,3870997,3871129,0.280452631578947,0.3330375},
-{2987958,3871129,3871179,0.137325,0.0998727272727273},
-{2987959,3904684,3904296,0.216422222222222,0.216422222222222},
-{2987960,3905088,3904684,0.207044444444444,0.207044444444444},
-{2987962,3878766,3879080,-1,-1},
-{2987963,3880209,3880377,0.233028571428571,-1},
-{2987964,3880377,3880536,0.2144,-1},
-{2987970,3898105,3897660,0.166229268292683,0.400905882352941},
-{2987971,3898166,3898330,-1,0.0671076923076923},
-{2987972,3898458,3898413,0.0330461538461538,0.0330461538461538},
-{2987973,3898166,3898190,0.2112,0.0918260869565217},
-{2987974,3898190,3898105,0.0385818181818182,0.0748941176470588},
-{2987975,3898413,3898330,0.0473111111111111,0.0672315789473684},
-{2987976,3898190,3898217,0.0441461538461538,0.0604105263157895},
-{2987977,3895285,3895346,0.02304,-1},
-{2987978,3868516,3868673,0.254526315789474,0.219818181818182},
-{2987979,3869326,3868673,0.253656,0.2439},
-{2987980,3868673,3868546,0.1454,0.153952941176471},
-{2988036,3881469,3881586,0.0499411764705882,-1},
-{2988037,3881732,3881723,0.0664838709677419,-1},
-{2988038,3882412,3882244,0.0961363636363636,0.1175},
-{2988039,3882412,3882454,-1,0.141461538461538},
-{2988040,3882572,3882412,0.231642857142857,0.147409090909091},
-{2988041,3865014,3864949,0.04225,0.04225},
-{2988042,3864872,3864915,0.0523885714285714,0.0470153846153846},
-{2988043,3865894,3865810,0.0436301886792453,0.0453411764705882},
-{2988044,3866172,3866094,0.0446553191489362,0.04664},
-{2988045,3866094,3866029,0.0898857142857143,0.0877953488372093},
-{2988046,3866305,3865103,0.329216666666667,-1},
-{2988047,3866029,3865894,0.140976,0.135553846153846},
-{2988048,3866029,3866481,0.242618181818182,0.254171428571429},
-{2988049,3864949,3864472,0.239863636363636,-1},
-{2988050,3864472,3864249,0.1628,-1},
-{2988051,3864249,3864166,0.217111111111111,0.217111111111111},
-{2988052,3864626,3864360,0.117205714285714,0.117205714285714},
-{2988053,3865894,3866481,0.262453846153846,0.262453846153846},
-{2988142,3880269,3879974,0.18748,-1},
-{2988143,3879112,3879127,-1,0.152935135135135},
-{2988144,3879809,3879927,-1,0.073155},
-{2988145,3879158,3879112,-1,0.039},
-{2988146,3879279,3879452,-1,0.0847777777777778},
-{2988147,3878672,3879127,-1,0.219225},
-{2988148,3878565,3879112,-1,0.31428},
-{2988149,3879566,3879056,-1,0.352266666666667},
-{2988150,3879809,3879331,0.32895,-1},
-{2988152,3865806,3866507,0.2092,-1},
-{2988153,3866507,3866942,0.1071,-1},
-{2988154,3866000,3865806,-1,-1},
-{2988155,3866000,3866507,0.222685714285714,0.222685714285714},
-{2988156,3888883,3889033,0.0403692307692308,-1},
-{2988157,3889531,3889609,0.0198585365853659,-1},
-{2988158,3888586,3888514,0.0382216216216216,0.0328883720930233},
-{2988159,3888586,3888806,0.117105,-1},
-{2988160,3888995,3889066,-1,0.101571428571429},
-{2988161,3889438,3889770,0.15741,-1},
-{2988162,3889770,3889996,0.0795260869565217,-1},
-{2988163,3889996,3889899,0.0525957446808511,-1},
-{2988164,3889609,3889899,-1,0.493866666666667},
-{2988165,3889241,3889167,-1,0.0240769230769231},
-{2988166,3888909,3888586,0.166548387096774,-1},
-{2988167,3889960,3890400,-1,0.295733333333333},
-{2988168,3889092,3889669,0.229303448275862,0.214509677419355},
-{2988169,3888949,3889889,-1,0.53264347826087},
-{2988170,3879127,3879264,-1,0.15074},
-{2988171,3879346,3879445,0.06645,-1},
-{2988172,3879264,3879295,-1,0.02235},
-{2988173,3879334,3879360,-1,0.01174},
-{2988174,3880204,3879711,-1,0.373592307692308},
-{2988175,3879360,3879410,-1,0.02086},
-{2988176,3879410,3879540,-1,0.0918},
-{2988177,3879445,3879410,-1,0.0656086956521739},
-{2988178,3879410,3879403,-1,0.0128608695652174},
-{2988179,3879427,3879394,0.0140727272727273,-1},
-{2988180,3879394,3879279,0.0339771428571429,-1},
-{2988181,3879394,3879452,-1,0.121628571428571},
-{2988182,3880021,3879711,-1,0.675952941176471},
-{2988183,3879359,3879330,-1,0.00818571428571429},
-{2988184,3879303,3879334,-1,0.0170322580645161},
-{2988185,3879330,3879303,-1,0.00984285714285714},
-{2988186,3879303,3879199,-1,0.04296},
-{2988187,3879199,3879297,0.0424615384615385,-1},
-{2988188,3879297,3879326,0.0108888888888889,-1},
-{2988189,3879379,3879394,-1,0.0234947368421053},
-{2988190,3879540,3879442,0.0537642857142857,-1},
-{2988191,3879442,3879427,0.00678181818181818,-1},
-{2988192,3879417,3879442,0.0117103448275862,-1},
-{2988193,3879442,3879510,0.03648,-1},
-{2988194,3879540,3879510,0.060816,-1},
-{2988203,3852011,3851830,0.0391866666666667,0.0678230769230769},
-{2988204,3860609,3861604,0.441018181818182,0.4548},
-{2988205,3861723,3861825,0.0920666666666667,0.0920666666666667},
-{2988206,3861723,3862965,0.705155555555556,0.705155555555556},
-{2988207,3890689,3890722,0.104155555555556,0.104155555555556},
-{2988208,3901875,3901829,-1,-1},
-{2988209,3853338,3853251,0.201503225806452,0.19520625},
-{2988210,3853477,3853338,0.2123,0.19903125},
-{2988211,3853899,3853477,0.257668965517241,0.241045161290323},
-{2988212,3853849,3853338,0.340866666666667,0.340866666666667},
-{2988213,3854240,3853849,0.20532,0.23954},
-{2988214,3854240,3853477,0.440288888888889,0.440288888888889},
-{2988215,3854256,3854394,0.0646666666666667,0.0646666666666667},
-{2988221,3857474,3857132,0.120625531914894,0.120625531914894},
-{2988222,3857132,3856626,0.204984,0.209167346938776},
-{2988223,3856626,3856413,0.0768576923076923,0.0815632653061225},
-{2988224,3857474,3857326,0.0980823529411765,0.069475},
-{2988225,3857326,3857080,0.1808,0.1808},
-{2988226,3857326,3857051,0.2286,0.155121428571429},
-{2988227,3857051,3856759,0.177288888888889,0.177288888888889},
-{2988228,3857051,3856786,0.184608,0.23076},
-{2988229,3856786,3856557,0.224921739130435,0.235145454545455},
-{2988230,3856626,3856557,0.0510642857142857,0.0461225806451613},
-{2988231,3856537,3856786,0.22878,0.22878},
-{2988232,3856255,3856557,0.281505882352941,0.281505882352941},
-{2988233,3856557,3855954,0.424666666666667,0.4095},
-{2988234,3855608,3855954,0.37404,0.37404},
-{2988235,3857747,3857132,0.5298,0.504571428571429},
-{2988236,3856840,3856525,0.223371428571429,0.223371428571429},
-{2988237,3857269,3856840,0.225933333333333,0.244008},
-{2988238,3857269,3857263,0.092928,0.0801103448275862},
-{2988239,3857678,3857263,0.186644444444444,0.186644444444444},
-{2988240,3857747,3856887,-1,0.425955555555556},
-{2988241,3857263,3856887,0.159832258064516,0.133913513513514},
-{2988242,3856887,3856413,0.228511111111111,0.186963636363636},
-{2988243,3856172,3855682,0.281318181818182,0.269086956521739},
-{2988244,3855954,3855687,0.22998947368421,0.22998947368421},
-{2988245,3854176,3854052,0.0418212765957447,0.0531243243243243},
-{2988246,3854709,3854176,0.247533333333333,0.238692857142857},
-{2988247,3855687,3855124,0.311192307692308,0.288964285714286},
-{2988248,3855124,3854903,0.17928,0.17928},
-{2988249,3854903,3854947,0.039275,0.04713},
-{2988250,3854903,3854236,0.49692,0.382246153846154},
-{2988251,3854236,3853986,0.229275,0.146736},
-{2988252,3854052,3853986,0.050825,0.0580857142857143},
-{2988253,3853675,3854236,1.07385882352941,1.82556},
-{2988254,3853675,3853986,1.16731578947368,2.01627272727273},
-{2988255,3854551,3855124,1.36370769230769,1.36370769230769},
-{2988256,3855298,3855687,0.521435294117647,0.521435294117647},
-{2988257,3854052,3852900,0.341476595744681,0.3489},
-{2988258,3852373,3852753,0.128804081632653,0.121373076923077},
-{2988259,3863309,3863194,0.07335,0.0851806451612903},
-{2988260,3863566,3863309,0.143288888888889,0.143288888888889},
-{2988261,3863566,3863666,0.0751777777777778,0.0751777777777778},
-{2988262,3895278,3895273,0.10614,-1},
-{2988263,3895273,3895285,0.03075,-1},
-{2988264,3895193,3895273,-1,0.047232},
-{2988265,3895327,3895371,0.0208434782608696,-1},
-{2988266,3895273,3895327,-1,0.0375157894736842},
-{2988267,3895327,3895434,-1,0.1286},
-{2988269,3923738,3924198,0.280984615384615,0.254846511627907},
-{2988280,3880539,3880568,0.0283741935483871,0.0517411764705882},
-{2988281,3920536,3920636,0.0443684210526316,0.0411219512195122},
-{2988282,3920057,3920536,0.189097297297297,0.199902857142857},
-{2988283,3920189,3920536,0.277666666666667,0.277666666666667},
-{2988284,3920057,3920189,0.0888222222222222,0.0888222222222222},
-{2988285,3861281,3861303,0.2298,0.2298},
-{2988286,3874069,3873370,0.54904,0.358069565217391},
-{2988287,3854442,3854263,0.06717,0.06717},
-{2988288,3854970,3854442,0.311436363636364,0.311436363636364},
-{2988289,3854442,3856551,0.917163636363636,0.917163636363636},
-{2988290,3895434,3895371,0.0911684210526316,-1},
-{2988291,3852800,3851836,0.298263157894737,0.28335},
-{2988292,3851836,3851640,0.077325,0.0759684210526316},
-{2988293,3861034,3860070,0.442133333333333,0.442133333333333},
-{2988294,3861570,3859873,0.82993125,0.88526},
-{2988295,3862229,3861034,0.493,0.493},
-{2988296,3861323,3860526,0.454384615384615,0.407379310344828},
-{2988374,3868864,3868741,0.0387488372093023,0.0362217391304348},
-{2988375,3869012,3868864,0.0638926829268293,0.0623714285714286},
-{2988376,3868074,3866775,0.523644444444444,0.523644444444444},
-{2988377,3914048,3913716,0.0884086956521739,-1},
-{2988378,3914381,3914098,0.148533333333333,0.148533333333333},
-{2988379,3867678,3867833,0.0709111111111111,0.0709111111111111},
-{2988380,3866304,3866509,0.119,0.0973636363636364},
-{2988383,3912605,3912914,0.127386206896552,0.108652941176471},
-{2988384,3912914,3913169,0.0862666666666667,0.0862666666666667},
-{2988385,3913755,3914089,0.172575,0.172575},
-{2988386,3914128,3913502,0.283333333333333,0.283333333333333},
-{2988387,3913254,3913830,0.288733333333333,0.288733333333333},
-{2988388,3913831,3914089,0.16941,0.2117625},
-{2988389,3913502,3913831,0.117464516129032,0.117464516129032},
-{2988390,3913254,3913502,0.124903448275862,0.124903448275862},
-{2988391,3912914,3913254,0.18552,0.176685714285714},
-{2988392,3913522,3913830,0.178326315789474,0.178326315789474},
-{2988393,3913169,3913522,0.147193548387097,0.157344827586207},
-{2988395,3884331,3884195,0.04944375,0.0586},
-{2988396,3884569,3884331,0.114288,0.19048},
-{2988397,3894587,3895293,-1,-1},
-{2988401,3871186,3871767,0.263022222222222,0.263022222222222},
-{2988402,3870390,3871425,0.393533333333333,0.393533333333333},
-{2988403,3869193,3866325,0.776595348837209,0.795085714285714},
-{2988404,3882419,3883271,0.253983333333333,0.253983333333333},
-{2988405,3881031,3882681,1.36275555555556,1.36275555555556},
-{2988414,3877381,3876129,0.5634,0.5634},
-{2988415,3879963,3879254,0.696857142857143,0.562846153846154},
-{2988416,3880664,3881335,0.368309090909091,0.368309090909091},
-{2988417,3880664,3880648,0.290363636363636,0.290363636363636},
-{2988418,3877338,3877547,0.0411294117647059,0.0437},
-{2988419,3878422,3878792,0.0979914893617021,0.092112},
-{2988420,3878844,3878434,0.270993103448276,0.270993103448276},
-{2988421,3876171,3876400,0.108925,0.104568},
-{2988422,3876849,3877193,0.286984615384615,0.24872},
-{2988423,3877193,3877942,0.33135652173913,0.544371428571429},
-{2988424,3877942,3878111,0.100658823529412,0.122228571428571},
-{2988425,3878111,3878434,0.3079,0.284215384615385},
-{2988426,3877109,3876171,1.16257777777778,1.16257777777778},
-{2988427,3877338,3876400,1.15246666666667,1.15246666666667},
-{2988428,3877858,3876849,1.13637777777778,1.13637777777778},
-{2988429,3878792,3877942,1.12284444444444,1.12284444444444},
-{2988430,3878911,3878111,1.11826666666667,1.11826666666667},
-{2988433,3871415,3873471,1.20164444444444,1.20164444444444},
-{2988435,3870723,3872709,1.22611111111111,1.22611111111111},
-{2988442,3875675,3876017,-1,0.0905744680851064},
-{2988443,3875663,3875718,0.03754,0.03519375},
-{2988444,3875761,3875896,0.0851828571428571,-1},
-{2988445,3875761,3875827,-1,0.102},
-{2988449,3897628,3896422,-1,-1},
-{2988470,3860921,3861050,-1,-1},
-{2988471,3862314,3862617,-1,-1},
-{2988472,3853101,3852940,-1,-1},
-{2988473,3852770,3851487,-1,-1},
-{2988474,3852770,3853721,-1,-1},
-{2988475,3852579,3851536,0.343164705882353,0.307042105263158},
-{2988476,3852940,3852579,0.12514,0.129455172413793},
-{2988477,3858948,3858673,-1,-1},
-{2988478,3878244,3878247,-1,-1},
-{2988479,3877995,3878244,-1,-1},
-{2988480,3877678,3877978,-1,-1},
-{2988481,3877995,3878458,-1,-1},
-{2988482,3878244,3878771,-1,-1},
-{2988483,3877284,3877573,-1,-1},
-{2988484,3878276,3878938,-1,-1},
-{2988485,3878339,3878930,-1,-1},
-{2988486,3877339,3877478,-1,-1},
-{2988487,3877285,3877339,-1,-1},
-{2988488,3877478,3877264,-1,-1},
-{2988489,3876992,3877285,-1,-1},
-{2988490,3875851,3876011,-1,-1},
-{2988491,3878938,3879416,-1,-1},
-{2988492,3859735,3859509,-1,-1},
-{2988493,3858108,3857939,-1,-1},
-{2988494,3860954,3860815,-1,-1},
-{2988495,3859869,3859735,-1,-1},
-{2988496,3860398,3860319,-1,-1},
-{2988497,3861699,3861631,-1,-1},
-{2988498,3861459,3861043,-1,-1},
-{2988499,3862732,3862323,-1,-1},
-{2988500,3869938,3870178,-1,-1},
-{2988501,3870178,3870519,-1,-1},
-{2988502,3871403,3870884,-1,-1},
-{2988503,3855304,3855807,-1,-1},
-{2988504,3855807,3856794,-1,-1},
-{2988505,3856794,3857125,-1,-1},
-{2988506,3860056,3860204,-1,-1},
-{2988507,3861856,3861680,-1,-1},
-{2988508,3861343,3861168,-1,-1},
-{2988509,3882079,3882425,-1,-1},
-{2988510,3885812,3885965,-1,-1},
-{2988511,3856389,3856426,-1,-1},
-{2988512,3856965,3856823,-1,-1},
-{2988513,3867031,3866777,0.0724307692307692,0.0763459459459459},
-{2988514,3867302,3867031,0.0796263157894737,0.0817783783783784},
-{2988515,3865550,3865196,0.17864347826087,-1},
-{2988516,3865196,3865085,-1,0.292928571428571},
-{2988517,3870019,3869800,-1,-1},
-{2988518,3870250,3870019,-1,-1},
-{2988519,3870513,3870291,-1,-1},
-{2988520,3873946,3874181,-1,-1},
-{2988521,3860488,3860352,-1,-1},
-{2988522,3869483,3869008,-1,-1},
-{2988523,3869840,3869672,-1,-1},
-{2988524,3870196,3870110,-1,-1},
-{2988525,3868889,3868735,-1,-1},
-{2988526,3868735,3868398,-1,-1},
-{2988527,3878989,3878621,-1,-1},
-{2988528,3859674,3859221,-1,-1},
-{2988529,3858805,3859199,-1,-1},
-{2988530,3867017,3866058,-1,-1},
-{2988531,3874060,3873823,-1,-1},
-{2988532,3874804,3874787,-1,-1},
-{2988533,3875960,3875145,-1,-1},
-{2988534,3875960,3876069,-1,-1},
-{2988535,3890443,3890539,0.0985777777777778,0.0985777777777778},
-{2988538,3920189,3920611,-1,-1},
-{2988539,3921180,3920611,-1,-1},
-{2988540,3921678,3921908,-1,-1},
-{2988541,3921908,3922302,-1,-1},
-{2988542,3922513,3922611,-1,-1},
-{2988543,3922611,3922709,-1,-1},
-{2988544,3922709,3922862,-1,-1},
-{2988545,3922862,3923096,-1,-1},
-{2988546,3858741,3858469,0.18012,0.128657142857143},
-{2988547,3859599,3858741,0.31625625,0.297652941176471},
-{2988548,3859430,3858579,0.422110344827586,0.422110344827586},
-{2988549,3858579,3858741,0.30801,0.267834782608696},
-{2988550,3858352,3858579,0.387654545454545,0.341136},
-{2988551,3858344,3858352,0.3288,0.34524},
-{2988552,3858352,3859118,0.315355555555556,0.315355555555556},
-{2988573,3867480,3867306,-1,-1},
-{2988575,3890739,3891023,0.118820689655172,0.123064285714286},
-{2988576,3871129,3872741,1.20818571428571,1.20818571428571},
-{2988577,3869257,3869202,-1,-1},
-{2988578,3868844,3868627,-1,-1},
-{2988592,3851185,3851108,0.0759931034482759,0.0958173913043478},
-{2988593,3851361,3851575,0.123348387096774,0.11949375},
-{2988594,3851361,3851282,0.0867428571428571,0.083751724137931},
-{2988595,3851185,3851342,0.0709,-1},
-{2988596,3851342,3851282,0.05422,-1},
-{2988597,3851527,3851342,0.0607411764705882,0.0666193548387097},
-{2988598,3852184,3851527,0.251806451612903,0.236545454545455},
-{2988599,3851108,3850839,0.207633333333333,0.207633333333333},
-{2988623,3863888,3863323,0.467111111111111,0.467111111111111},
-{2988624,3866916,3866510,0.14289375,0.207845454545455},
-{2988625,3866510,3865974,0.187954838709677,0.2158},
-{2988626,3864027,3864126,-1,-1},
-{2988629,3877505,3877257,0.2734,0.210307692307692},
-{2988630,3877650,3877257,0.164025,0.160677551020408},
-{2988655,3853390,3853272,-1,-1},
-{2988656,3852378,3852293,-1,-1},
-{2988657,3851943,3851857,-1,-1},
-{2988668,3878037,3877665,-1,-1},
-{2988669,3878467,3878069,-1,-1},
-{2988670,3856451,3856530,0.1057,0.100136842105263},
-{2988671,3856588,3856451,0.188016,0.174088888888889},
-{2988672,3856639,3856588,0.054096,0.0483},
-{2988673,3856451,3856376,0.0354315789473684,0.0354315789473684},
-{2988674,3856376,3856398,0.123088888888889,0.123088888888889},
-{2988675,3856376,3856131,0.0941333333333333,0.0941333333333333},
-{2988676,3856131,3856099,0.1086,0.1086},
-{2988677,3856131,3856157,0.0601555555555556,0.0601555555555556},
-{2988678,3856588,3856293,0.189444444444444,0.189444444444444},
-{2988679,3870010,3869623,-1,-1},
-{2988680,3868229,3868722,-1,-1},
-{2988681,3868722,3868781,-1,-1},
-{2988682,3868781,3868790,-1,-1},
-{2988683,3869110,3869450,-1,-1},
-{2988684,3869813,3869450,-1,-1},
-{2988685,3869813,3870078,-1,-1},
-{2988686,3867664,3867208,-1,-1},
-{2988687,3867208,3866454,-1,-1},
-{2988688,3866998,3866454,-1,-1},
-{2988689,3866998,3867389,-1,-1},
-{2988690,3868443,3867389,-1,-1},
-{2988691,3871012,3869903,-1,-1},
-{2988692,3871829,3871652,-1,-1},
-{2988693,3872579,3872231,-1,-1},
-{2988694,3871701,3872135,-1,-1},
-{2988695,3872447,3872135,-1,-1},
-{2988696,3868968,3868742,-1,-1},
-{2988697,3868938,3868443,-1,-1},
-{2988698,3869903,3868938,-1,-1},
-{2988699,3868938,3868968,-1,-1},
-{2988700,3869186,3868938,-1,-1},
-{2988701,3867657,3867404,-1,-1},
-{2988702,3867922,3867657,-1,-1},
-{2988703,3866270,3865890,-1,-1},
-{2988704,3865890,3865716,-1,-1},
-{2988705,3866653,3866368,-1,-1},
-{2988706,3867160,3866933,-1,-1},
-{2988707,3866933,3866618,-1,-1},
-{2988708,3871234,3871209,0.108733333333333,-1},
-{2988709,3870985,3871234,0.146255172413793,-1},
-{2988710,3870989,3871228,-1,-1},
-{2988711,3871249,3870989,-1,-1},
-{2988712,3871508,3871228,-1,-1},
-{2988713,3871228,3871392,-1,-1},
-{2988714,3871392,3871701,-1,-1},
-{2988715,3871701,3872281,-1,-1},
-{2988716,3872281,3872701,-1,-1},
-{2988717,3872281,3872284,-1,-1},
-{2988718,3872284,3872210,-1,-1},
-{2988719,3872284,3871234,-1,-1},
-{2988720,3872210,3871769,-1,-1},
-{2988721,3871769,3871660,-1,-1},
-{2988722,3872281,3872315,-1,-1},
-{2988723,3871652,3871392,-1,-1},
-{2988724,3872703,3872476,-1,-1},
-{2988725,3871570,3871056,-1,-1},
-{2988726,3870953,3870650,-1,-1},
-{2988727,3870733,3871099,-1,-1},
-{2988728,3870815,3871053,-1,-1},
-{2988729,3868700,3868289,-1,-1},
-{2988730,3871699,3871325,-1,-1},
-{2988731,3868689,3868922,-1,-1},
-{2988732,3869253,3869258,-1,-1},
-{2988733,3869258,3869270,-1,-1},
-{2988734,3859303,3859078,0.248172413793103,0.248172413793103},
-{2988735,3859078,3858859,-1,-1},
-{2988736,3859375,3859078,0.126666666666667,0.126666666666667},
-{2988737,3859505,3859375,0.0550222222222222,0.0550222222222222},
-{2988738,3860095,3859505,0.364628571428571,0.364628571428571},
-{2988739,3859303,3859613,0.160063636363636,0.160063636363636},
-{2988740,3861175,3859823,0.824314285714286,0.824314285714286},
-{2988741,3861430,3861318,-1,-1},
-{2988742,3859257,3858750,0.207675,-1},
-{2988743,3859582,3859257,0.156690909090909,-1},
-{2988744,3860205,3859582,0.282545454545455,-1},
-{2988745,3858510,3858410,0.291910344827586,0.325592307692308},
-{2988746,3860099,3859883,0.300311111111111,0.300311111111111},
-{2988747,3860763,3859883,0.44805,0.467530434782609},
-{2988748,3859100,3858410,0.308977777777778,0.320861538461538},
-{2988749,3859100,3859420,0.284452173913044,0.384847058823529},
-{2988750,3858510,3859420,0.541936363636364,0.458561538461538},
-{2988751,3859420,3859582,-1,-1},
-{2988752,3863627,3863716,0.216755555555556,0.216755555555556},
-{2988753,3864101,3863716,0.202666666666667,0.202666666666667},
-{2988757,3897737,3897850,0.0832046511627907,0.0616862068965517},
-{2988789,3870895,3871039,-1,-1},
-{2988790,3871039,3871244,-1,-1},
-{2988791,3870604,3870727,-1,-1},
-{2988792,3870727,3871236,-1,-1},
-{2988793,3874184,3874485,-1,-1},
-{2988794,3872404,3872683,-1,-1},
-{2988795,3871277,3871643,0.0866125,-1},
-{2988796,3871643,3871916,0.0609176470588235,-1},
-{2988797,3871063,3871102,-1,-1},
-{2988798,3871369,3871639,-1,-1},
-{2988799,3871063,3871323,-1,0.264545454545455},
-{2988800,3871916,3872305,0.0861056603773585,-1},
-{2988801,3872229,3872194,-1,-1},
-{2988802,3872194,3871832,-1,-1},
-{2988803,3871832,3871639,-1,-1},
-{2988804,3871832,3871639,-1,-1},
-{2988805,3871369,3871323,-1,-1},
-{2988806,3872194,3871941,-1,-1},
-{2988807,3871323,3871321,-1,0.0897724137931034},
-{2988808,3871323,3871683,-1,-1},
-{2988809,3871683,3871437,-1,-1},
-{2988810,3873130,3873334,-1,-1},
-{2988811,3873387,3873757,0.161155555555556,-1},
-{2988812,3874174,3874524,0.181555555555556,0.181555555555556},
-{2988813,3874044,3874131,-1,-1},
-{2988814,3877845,3878270,-1,-1},
-{2988815,3878270,3878599,-1,-1},
-{2988816,3878599,3878724,-1,-1},
-{2988817,3878724,3878668,-1,-1},
-{2988818,3878724,3878658,-1,-1},
-{2988892,3851487,3851093,-1,-1},
-{2988893,3851186,3850804,-1,-1},
-{2988894,3874448,3874585,-1,-1},
-{2988895,3876192,3876030,-1,-1},
-{2988896,3875078,3873685,0.612533333333333,0.612533333333333},
-{2988897,3872747,3872119,-1,-1},
-{2988898,3872119,3871748,-1,-1},
-{2988899,3871748,3870714,-1,-1},
-{2988900,3872275,3872119,-1,-1},
-{2989062,3865162,3865193,-1,-1},
-{2989063,3865193,3865240,-1,-1},
-{2989064,3891457,3892592,-1,-1},
-{2989065,3890883,3891454,-1,-1},
-{2989066,3891454,3891991,-1,-1},
-{2989067,3891991,3891925,-1,-1},
-{2989068,3891006,3891925,-1,-1},
-{2989069,3890902,3890183,-1,-1},
-{2989070,3892623,3892855,-1,-1},
-{2989071,3892708,3892623,-1,-1},
-{2989072,3890924,3891210,-1,-1},
-{2989073,3891210,3891335,-1,-1},
-{2989077,3905498,3905735,-1,0.0626666666666667},
-{2989078,3905735,3905897,-1,0.0415698113207547},
-{2989081,3905414,3904360,0.614958620689655,0.660511111111111},
-{2989082,3904360,3903947,0.3704,0.241565217391304},
-{2989100,3904360,3904473,0.0773555555555556,0.0773555555555556},
-{2989101,3901217,3901671,-1,0.125207547169811},
-{2989102,3901671,3902140,-1,0.131952},
-{2989103,3901967,3901628,0.18001935483871,0.214638461538462},
-{2989104,3902430,3902081,-1,-1},
-{2989124,3903021,3903090,0.0911076923076923,-1},
-{2989125,3902986,3903078,0.0721258064516129,0.07453},
-{2989126,3903021,3903111,0.0547615384615385,-1},
-{2989127,3896018,3896695,0.267938181818182,-1},
-{2989128,3893726,3893322,-1,0.137371428571429},
-{2989130,3888113,3888736,0.27345,-1},
-{2989131,3888033,3888113,0.05964,-1},
-{2989141,3861298,3861682,-1,-1},
-{2989142,3861053,3861394,-1,-1},
-{2989143,3917395,3917569,0.20572,0.20572},
-{2989144,3917261,3917502,0.238033333333333,0.2677875},
-{2989145,3917261,3917395,0.10827,0.10827},
-{2989146,3875558,3875698,0.0338478260869565,0.0346},
-{2989147,3874524,3874723,0.0681631578947368,-1},
-{2989148,3874723,3874905,0.0748666666666667,-1},
-{2989149,3874902,3874723,0.0620823529411765,-1},
-{2989150,3875010,3874771,0.0863294117647059,-1},
-{2989151,3874771,3874259,0.228783333333333,-1},
-{2989152,3874902,3874771,0.0500869565217391,-1},
-{2989159,3900206,3900177,-1,0.0483054545454545},
-{2989160,3864954,3864770,-1,0.09831},
-{2989161,3864961,3864926,0.127933333333333,0.127933333333333},
-{2989162,3865554,3864926,0.231555555555556,0.231555555555556},
-{2989163,3865353,3864961,0.131622222222222,0.131622222222222},
-{2989172,3877464,3877004,-1,0.256495081967213},
-{2989174,3877102,3876865,-1,-1},
-{2989175,3878618,3878624,0.0606,-1},
-{2989176,3878618,3878430,-1,0.123484615384615},
-{2989178,3864926,3864954,0.150844444444444,0.150844444444444},
-{2989179,3865008,3865002,0.0454864864864865,-1},
-{2989180,3865002,3864934,0.0260117647058824,-1},
-{2989182,3866161,3866068,0.113653846153846,-1},
-{2989183,3866073,3865993,0.08016,0.0572571428571428},
-{2989184,3863081,3862763,0.12504,-1},
-{2989185,3854609,3854263,0.282506896551724,0.287463157894737},
-{2989186,3918609,3919497,0.199511111111111,0.203275471698113},
-{2989187,3918700,3918455,0.17348275862069,-1},
-{2989188,3918455,3918946,0.161133333333333,-1},
-{2989192,3920913,3919855,0.316015384615385,-1},
-{2989193,3919649,3919884,0.0578588235294118,0.0602204081632653},
-{2989194,3919884,3920047,0.0436666666666667,0.0453461538461538},
-{2989195,3920330,3919855,0.24579512195122,-1},
-{2989196,3919430,3919808,0.183014117647059,-1},
-{2989197,3919430,3919649,0.421210344827586,-1},
-{2989198,3918700,3918752,0.0305025,-1},
-{2989199,3918752,3918946,0.1254075,-1},
-{2989200,3919137,3918941,0.132,-1},
-{2989201,3918941,3918867,0.0561375,-1},
-{2989202,3918867,3918555,0.215772972972973,-1},
-{2989203,3918943,3918589,0.0870244897959184,0.085284},
-{2989204,3918589,3918378,0.0510941176470588,0.0491660377358491},
-{2989205,3918378,3917292,0.315714893617021,0.3091375},
-{2989206,3918387,3918609,0.0487777777777778,0.0496981132075472},
-{2989207,3918367,3918700,0.236732432432432,-1},
-{2989208,3917704,3918035,0.242305263157895,-1},
-{2989209,3918035,3918367,0.209212987012987,-1},
-{2989210,3918555,3918247,0.204280519480519,-1},
-{2989211,3918035,3917503,0.275818867924528,-1},
-{2989212,3917503,3917319,0.0725625,-1},
-{2989213,3919497,3919192,0.145991489361702,-1},
-{2989214,3917245,3916335,0.876027272727273,0.8964},
-{2989215,3917162,3917292,0.0539454545454546,-1},
-{2989216,3917319,3917245,0.0457875,-1},
-{2989217,3917245,3917118,0.075825,-1},
-{2989218,3917118,3917162,0.0503625,-1},
-{2989219,3920062,3919797,0.218654545454545,0.218654545454545},
-{2989220,3918943,3919192,0.107514893617021,-1},
-{2989221,3918943,3918555,-1,0.390875},
-{2989225,3857511,3857952,0.125033333333333,-1},
-{2989226,3859191,3858718,0.420727272727273,0.420727272727273},
-{2989227,3859282,3859191,0.059328,0.0478451612903226},
-{2989228,3859177,3859445,0.0639333333333333,-1},
-{2989229,3860691,3860665,0.169745454545455,-1},
-{2989230,3860622,3860512,0.0782780487804878,-1},
-{2989231,3860512,3860467,0.0176869565217391,0.0246545454545455},
-{2989232,3860844,3860851,-1,0.0607058823529412},
-{2989233,3860851,3860876,-1,0.0262384615384615},
-{2989234,3860754,3860851,-1,0.122672727272727},
-{2989235,3860876,3860964,-1,0.0521823529411765},
-{2989236,3860865,3860964,0.0343783783783784,-1},
-{2989237,3860876,3860865,-1,0.03951},
-{2989238,3862075,3861882,0.0626516129032258,-1},
-{2989239,3861136,3861084,0.0164705882352941,-1},
-{2989240,3866231,3865304,0.226554545454545,0.207675},
-{2989241,3865304,3865217,0.136466666666667,-1},
-{2989242,3865822,3865217,-1,0.147279069767442},
-{2989243,3865217,3865048,-1,0.0424},
-{2989244,3865217,3865174,0.0334857142857143,-1},
-{2989245,3866067,3865993,0.0325058823529412,-1},
-{2989246,3866067,3865903,0.0911428571428571,-1},
-{2989247,3865903,3865779,0.0662210526315789,0.0699},
-{2989248,3865133,3865282,-1,0.0388216216216216},
-{2989249,3866437,3865822,-1,0.107018181818182},
-{2989250,3865822,3865804,0.0430125,0.028675},
-{2989251,3866416,3866437,0.0298857142857143,0.0285272727272727},
-{2989252,3869196,3868567,0.117,-1},
-{2989253,3869196,3869216,0.0195942857142857,-1},
-{2989254,3869267,3869279,-1,0.0223},
-{2989255,3869216,3869405,0.1656,-1},
-{2989256,3869492,3869405,0.0365181818181818,0.0382571428571429},
-{2989257,3869839,3869749,0.0381,0.0331304347826087},
-{2989258,3870973,3870540,0.0973090909090909,-1},
-{2989259,3870481,3869716,0.15631914893617,-1},
-{2989260,3870384,3870181,-1,0.0478046511627907},
-{2989261,3869716,3869660,0.0744,0.053568},
-{2989262,3868927,3869038,0.0434333333333333,-1},
-{2989263,3868994,3869038,-1,0.0371489361702128},
-{2989264,3868641,3868994,-1,0.233297872340426},
-{2989265,3868994,3868927,0.0341555555555556,-1},
-{2989266,3868994,3868904,0.0410076923076923,-1},
-{2989267,3868549,3868641,-1,0.07475},
-{2989268,3868641,3868577,-1,0.03882},
-{2989269,3868458,3868549,-1,0.0381714285714286},
-{2989270,3867982,3868458,0.310432653061225,-1},
-{2989271,3867788,3867982,0.181455,-1},
-{2989272,3867982,3868098,0.04539,0.0534},
-{2989273,3871459,3870910,-1,0.143351351351351},
-{2989274,3872085,3871538,0.1069,-1},
-{2989275,3871538,3871459,-1,0.0471},
-{2989276,3872653,3872036,-1,0.141842857142857},
-{2989277,3872085,3872036,0.0718875,-1},
-{2989278,3873217,3873091,-1,0.0451333333333333},
-{2989279,3873108,3872978,0.0399,-1},
-{2989280,3874015,3873475,-1,0.139373333333333},
-{2989281,3869573,3869169,-1,0.1317375},
-{2989282,3869812,3869814,0.0300166666666667,-1},
-{2989283,3869886,3869867,-1,0.13164},
-{2989284,3869766,3869836,0.0502736842105263,-1},
-{2989285,3869867,3869836,-1,0.0412875},
-{2989286,3869886,3869814,-1,0.0366521739130435},
-{2989287,3870035,3870122,-1,0.06438},
-{2989288,3869531,3869452,0.02892,0.0262909090909091},
-{2989289,3869452,3869636,0.191375,-1},
-{2989290,3869707,3869896,-1,0.268135135135135},
-{2989291,3869707,3869636,0.038175,0.0436285714285714},
-{2989292,3873475,3873518,0.0825230769230769,-1},
-{2989293,3874258,3874175,-1,0.0217066666666667},
-{2989294,3874199,3874175,0.0375677419354839,-1},
-{2989295,3875297,3875293,0.07832,-1},
-{2989296,3876147,3875796,-1,0.107618181818182},
-{2989297,3875819,3875784,0.0119846153846154,-1},
-{2989298,3876147,3876097,0.0594,-1},
-{2989299,3876180,3876147,0.152618181818182,-1},
-{2989300,3876771,3876147,-1,0.176386363636364},
-{2989301,3875746,3875859,0.0499555555555556,-1},
-{2989302,3876130,3876180,0.032325,-1},
-{2989303,3876130,3876498,0.10551,-1},
-{2989304,3872378,3872222,-1,0.0744},
-{2989305,3872781,3872388,0.18081,0.139084615384615},
-{2989306,3872388,3872378,0.0799411764705882,-1},
-{2989307,3872222,3871651,-1,0.28872},
-{2989308,3870343,3870168,0.08763,0.0449384615384615},
-{2989309,3874035,3874015,0.0648,-1},
-{2989310,3876012,3876841,0.206832558139535,-1},
-{2989311,3875776,3875721,0.0352105263157895,0.0352105263157895},
-{2989312,3875390,3875486,-1,0.0252571428571429},
-{2989313,3875374,3875453,0.0265421052631579,-1},
-{2989314,3875374,3875257,0.2142,-1},
-{2989315,3875390,3875374,0.0400875,-1},
-{2989316,3875257,3875160,0.112144186046512,-1},
-{2989317,3876867,3876841,0.0647181818181818,0.0678},
-{2989318,3872222,3872125,0.0457304347826087,0.0553578947368421},
-{2989319,3877707,3878139,-1,0.0962790697674419},
-{2989320,3877707,3876867,0.28392,-1},
-{2989321,3878139,3878107,0.048825,0.0558},
-{2989322,3877707,3878205,-1,-1},
-{2989323,3879801,3879148,-1,0.285768},
-{2989324,3878875,3878910,0.0860727272727273,-1},
-{2989325,3878875,3879088,-1,0.0622378378378378},
-{2989326,3879148,3878941,-1,0.0433888888888889},
-{2989327,3879088,3878910,0.0430415094339623,-1},
-{2989328,3879088,3879148,0.0215032258064516,0.0215032258064516},
-{2989329,3878910,3878941,0.0350666666666667,0.02104},
-{2989330,3879222,3879603,-1,0.126437837837838},
-{2989331,3878916,3879222,-1,0.0888615384615385},
-{2989332,3878916,3878897,0.0360947368421053,0.0263769230769231},
-{2989333,3878416,3878916,-1,0.305514285714286},
-{2989334,3877902,3878416,-1,0.186929032258065},
-{2989335,3877266,3877902,-1,0.192158823529412},
-{2989336,3878416,3878393,0.02226,0.027825},
-{2989337,3876720,3877270,0.20736,-1},
-{2989338,3877266,3877270,0.0394736842105263,0.0340909090909091},
-{2989339,3876535,3876748,-1,0.0794689655172414},
-{2989340,3879536,3879622,0.0247527272727273,-1},
-{2989341,3879464,3879536,0.054575,-1},
-{2989342,3879464,3879603,-1,0.072075},
-{2989343,3880977,3880680,0.0771396226415094,-1},
-{2989344,3881291,3881329,0.01532,0.0160325581395349},
-{2989345,3881399,3881370,0.0113678571428571,0.0115745454545455},
-{2989346,3880911,3880713,-1,0.0907555555555556},
-{2989347,3880911,3881000,0.0983032258064516,-1},
-{2989348,3880680,3880678,-1,0.10545},
-{2989349,3880977,3880678,0.108794117647059,-1},
-{2989350,3876742,3876771,0.0384,0.0301714285714286},
-{2989351,3877377,3876742,0.234697297297297,-1},
-{2989352,3877377,3877371,0.09268,-1},
-{2989353,3878105,3877822,0.241885714285714,-1},
-{2989354,3878307,3878145,0.297888888888889,-1},
-{2989355,3878408,3878377,0.00978947368421053,0.00978947368421053},
-{2989356,3878377,3878290,0.0624,-1},
-{2989357,3878334,3878290,0.0371555555555556,-1},
-{2989358,3878667,3878412,-1,-1},
-{2989359,3878884,3878815,-1,0.0476181818181818},
-{2989360,3880055,3879996,-1,0.0479428571428571},
-{2989361,3880206,3880243,-1,0.0266516129032258},
-{2989362,3880149,3880243,0.0344117647058824,-1},
-{2989363,3870464,3870343,0.0519428571428571,0.0259714285714286},
-{2989364,3867406,3867195,-1,0.0413872340425532},
-{2989365,3868261,3868143,0.0819666666666667,-1},
-{2989366,3869299,3869269,-1,0.1455},
-{2989367,3869549,3869269,-1,0.163742857142857},
-{2989368,3869920,3869549,-1,0.0706775510204082},
-{2989369,3871007,3871032,-1,0.0328105263157895},
-{2989370,3875471,3875558,0.0281866666666667,-1},
-{2989371,3876341,3876587,0.102088235294118,-1},
-{2989372,3876341,3876529,-1,0.0716727272727273},
-{2989373,3876529,3876661,-1,0.059064},
-{2989374,3876587,3876529,-1,0.0302684210526316},
-{2989375,3876529,3876426,-1,0.0671454545454545},
-{2989376,3869286,3869299,-1,0.02589},
-{2989377,3865149,3865283,0.07312,0.0406222222222222},
-{2989378,3865275,3865149,0.069725,-1},
-{2989379,3865275,3865283,0.030216,-1},
-{2989380,3865203,3865213,0.0424595744680851,-1},
-{2989381,3865119,3865203,0.129293023255814,-1},
-{2989382,3865236,3865342,-1,0.1479},
-{2989383,3865236,3865119,-1,0.0337928571428571},
-{2989384,3864959,3865119,0.306980487804878,-1},
-{2989385,3864981,3864990,-1,0.0718875},
-{2989386,3864981,3864946,0.0178285714285714,-1},
-{2989387,3864946,3864889,0.0280090909090909,-1},
-{2989388,3865069,3865015,-1,0.016258064516129},
-{2989389,3865531,3865309,0.331527272727273,-1},
-{2989390,3865339,3865309,-1,0.0484235294117647},
-{2989391,3865566,3865528,0.02251875,0.0156652173913043},
-{2989392,3865144,3865212,0.0718883720930233,-1},
-{2989393,3866507,3866595,0.0411931034482759,-1},
-{2989394,3866595,3867005,-1,0.110374468085106},
-{2989395,3867005,3867435,-1,0.118453333333333},
-{2989396,3867005,3866942,0.0580333333333333,0.0652875},
-{2989397,3867435,3867376,-1,0.0494526315789474},
-{2989398,3867435,3867690,-1,0.0834976744186047},
-{2989399,3867690,3867631,0.0349153846153846,0.037825},
-{2989400,3867690,3868760,-1,0.318789473684211},
-{2989401,3868869,3869049,0.0614117647058824,-1},
-{2989402,3868869,3868757,0.0886173913043478,-1},
-{2989403,3868757,3868578,0.044925,0.105705882352941},
-{2989404,3869093,3869049,0.010935,0.018225},
-{2989405,3874171,3874186,0.0667953488372093,-1},
-{2989406,3874171,3874297,-1,0.0887666666666667},
-{2989407,3874253,3874373,0.0728333333333333,-1},
-{2989408,3874297,3874329,-1,0.0171076923076923},
-{2989409,3874329,3874373,-1,0.03},
-{2989410,3871321,3871437,0.0875538461538461,0.0875538461538461},
-{2989411,3865309,3865298,-1,0.0125617021276596},
-{2989412,3865175,3865298,0.0474666666666667,-1},
-{2989413,3865260,3865265,-1,0.008},
-{2989414,3865038,3865278,0.07542,-1},
-{2989415,3865278,3865362,0.02694,-1},
-{2989416,3865133,3865281,-1,0.0399290322580645},
-{2989417,3865281,3865362,-1,0.0231103448275862},
-{2989418,3865278,3865281,-1,0.0232864864864865},
-{2989419,3865281,3865282,-1,0.0169411764705882},
-{2989420,3875486,3875453,-1,0.0507111111111111},
-{2989421,3875511,3875486,-1,0.0596785714285714},
-{2989422,3879464,3879539,0.0427,-1},
-{2989423,3879539,3879622,0.0304941176470588,-1},
-{2989424,3879536,3879539,-1,0.0223636363636364},
-{2989425,3879539,3879656,-1,0.110869565217391},
-{2989426,3879419,3879536,0.0367132075471698,-1},
-{2989427,3879419,3879582,0.105417391304348,-1},
-{2989428,3879536,3879582,0.0558631578947368,-1},
-{2989429,3879582,3879633,0.0429571428571429,-1},
-{2989430,3879676,3879633,0.01798125,0.0359625},
-{2989431,3877270,3877870,0.221635714285714,-1},
-{2989432,3877902,3877870,0.0241111111111111,0.0241111111111111},
-{2989433,3865131,3864850,0.1473,-1},
-{2989434,3867995,3867780,0.12363,0.12363},
-{2989435,3868229,3868140,0.05832,0.0624857142857143},
-{2989436,3868790,3868645,0.0437555555555556,0.0437555555555556},
-{2989437,3868662,3868645,0.0451636363636364,-1},
-{2989438,3868662,3868558,-1,0.0352764705882353},
-{2989439,3870078,3870163,0.0410222222222222,-1},
-{2989440,3869946,3869416,0.12385,-1},
-{2989441,3870630,3869946,0.2316,-1},
-{2989442,3871338,3870630,0.160287804878049,-1},
-{2989443,3869940,3869944,0.008775,0.011232},
-{2989444,3869944,3869946,0.00984375,0.013125},
-{2989445,3870613,3870621,-1,0.010475},
-{2989446,3870621,3870630,-1,0.0123},
-{2989447,3871914,3871322,-1,0.373371428571429},
-{2989448,3871322,3871326,0.0141,-1},
-{2989449,3871326,3871338,0.0133142857142857,-1},
-{2989450,3871914,3871922,-1,0.00767368421052632},
-{2989451,3871922,3871930,-1,0.00685945945945946},
-{2989452,3871877,3871887,-1,0.0190864864864865},
-{2989453,3872008,3872000,-1,0.0167571428571429},
-{2989454,3868454,3868408,0.0126,0.0186967741935484},
-{2989455,3870721,3870673,0.1244,0.1244},
-{2989456,3869665,3869543,-1,-1},
-{2989457,3869695,3869665,-1,-1},
-{2989458,3872889,3872814,0.0898645161290322,0.0819352941176471},
-{2989459,3872900,3872814,-1,0.0621461538461538},
-{2989460,3872961,3872900,-1,0.0264},
-{2989461,3873047,3872911,0.321504,0.26792},
-{2989462,3873047,3872834,0.306949090909091,0.312633333333333},
-{2989463,3869047,3869010,-1,0.0422896551724138},
-{2989464,3872022,3872044,-1,0.022815},
-{2989465,3872052,3872045,-1,0.0139317073170732},
-{2989466,3872440,3872529,0.0469058823529412,0.0469058823529412},
-{2989467,3865245,3865118,-1,0.050725},
-{2989468,3864768,3864874,-1,0.0790285714285714},
-{2989469,3864874,3864714,0.0730666666666667,-1},
-{2989470,3865267,3865118,-1,0.0466258064516129},
-{2989471,3865267,3865245,0.0365351351351351,-1},
-{2989472,3865245,3865256,0.0131513513513513,-1},
-{2989473,3865280,3865256,-1,0.0125846153846154},
-{2989474,3865280,3865311,-1,0.0141428571428571},
-{2989475,3865375,3865267,-1,0.03658},
-{2989476,3864714,3864626,0.04356,-1},
-{2989477,3864708,3864626,-1,0.0243243243243243},
-{2989478,3864768,3864714,0.103835294117647,0.103835294117647},
-{2989479,3865142,3865100,0.0596869565217391,0.0584170212765957},
-{2989480,3865142,3865226,0.0381176470588235,0.0381176470588235},
-{2989481,3865100,3865181,0.0387176470588235,0.0387176470588235},
-{2989482,3871122,3870759,-1,0.143256},
-{2989483,3870832,3871064,0.233566666666667,-1},
-{2989484,3871420,3871221,-1,0.398275},
-{2989485,3871221,3871064,-1,0.0775363636363636},
-{2989486,3872708,3872711,-1,0.0191684210526316},
-{2989487,3872053,3872040,0.0505,-1},
-{2989488,3872166,3872040,0.0595,-1},
-{2989489,3872613,3872708,-1,0.013863829787234},
-{2989490,3872618,3872711,0.0142826086956522,-1},
-{2989491,3872613,3872618,0.02372,-1},
-{2989492,3872292,3872335,0.0637928571428571,-1},
-{2989493,3872335,3872346,0.0146545454545455,-1},
-{2989494,3868695,3868738,0.0388285714285714,0.0247090909090909},
-{2989495,3866321,3866360,-1,0.025425},
-{2989496,3866390,3866436,0.039096,-1},
-{2989497,3866360,3866436,-1,0.0246692307692308},
-{2989498,3866321,3866390,0.0285913043478261,-1},
-{2989499,3866112,3866365,0.1722,-1},
-{2989500,3866560,3866365,0.1073,-1},
-{2989501,3861454,3861315,0.089875,0.0980454545454546},
-{2989502,3866943,3865773,0.287533333333333,-1},
-{2989503,3865818,3865773,0.0250846153846154,0.0362333333333333},
-{2989504,3867093,3866943,0.0425285714285714,-1},
-{2989505,3866966,3866943,0.0349826086956522,0.0447},
-{2989506,3867146,3867093,-1,0.0426333333333333},
-{2989507,3867644,3867633,0.0438333333333333,-1},
-{2989508,3868264,3867633,0.163116279069767,-1},
-{2989509,3869149,3868264,0.232186363636364,-1},
-{2989510,3869149,3869169,0.03222,0.0339157894736842},
-{2989511,3868278,3868264,0.0387666666666667,0.0303391304347826},
-{2989512,3869896,3869825,0.029625,0.0374210526315789},
-{2989513,3869762,3869900,0.446304545454546,-1},
-{2989514,3868439,3867244,0.259473913043478,-1},
-{2989515,3868428,3867226,-1,0.238632},
-{2989516,3868439,3868428,0.0469125,0.0469125},
-{2989517,3869694,3869613,0.0230689655172414,-1},
-{2989518,3869693,3869608,-1,0.0257777777777778},
-{2989519,3867244,3867226,0.0344181818181818,0.0236625},
-{2989520,3866305,3866294,0.0269538461538462,0.0333714285714286},
-{2989521,3869608,3869604,0.123405882352941,-1},
-{2989522,3869613,3869608,0.0237103448275862,-1},
-{2989523,3869694,3869693,-1,0.0238},
-{2989524,3870327,3870692,-1,0.0714765957446809},
-{2989525,3872140,3870692,0.271065306122449,-1},
-{2989526,3872140,3872127,0.03474,0.0302086956521739},
-{2989527,3872127,3872987,0.173234042553191,-1},
-{2989528,3864915,3864949,0.0606620689655172,0.0418857142857143},
-{2989529,3865103,3864915,0.102138461538462,-1},
-{2989530,3873001,3872987,0.0316090909090909,0.0198685714285714},
-{2989531,3873861,3874068,-1,0.1209},
-{2989532,3873861,3873852,-1,0.02385},
-{2989533,3874063,3874498,0.10995652173913,-1},
-{2989534,3874068,3874063,0.021951724137931,0.0454714285714286},
-{2989535,3874498,3875185,0.161816326530612,-1},
-{2989536,3874508,3874498,0.0346105263157895,0.04384},
-{2989537,3878386,3878438,-1,0.0643384615384615},
-{2989538,3878288,3878386,-1,0.0754928571428571},
-{2989539,3878353,3878418,-1,0.0114276923076923},
-{2989540,3878350,3878414,0.0120491803278689,-1},
-{2989541,3878406,3878404,-1,0.0889384615384615},
-{2989542,3878404,3878395,-1,0.197907692307692},
-{2989543,3878347,3878395,0.022536,0.022536},
-{2989544,3878395,3878375,-1,0.235524},
-{2989545,3878320,3878297,0.0673071428571429,-1},
-{2989546,3878320,3878371,0.03735,0.0249},
-{2989547,3880568,3880746,-1,0.05598},
-{2989548,3880625,3880568,-1,0.0429},
-{2989549,3882522,3882548,0.0347333333333333,0.0302516129032258},
-{2989550,3882766,3882752,-1,0.137708571428571},
-{2989551,3882752,3882724,0.1768,-1},
-{2989552,3882724,3882712,0.0189529411764706,-1},
-{2989553,3882766,3882724,0.0624,-1},
-{2989554,3882636,3882656,0.0674903225806451,-1},
-{2989555,3878232,3878138,0.186623529411765,-1},
-{2989556,3878278,3878209,-1,0.170689285714286},
-{2989557,3878138,3878079,0.211034482758621,-1},
-{2989558,3878209,3878162,-1,0.121141176470588},
-{2989559,3875200,3875185,0.0289304347826087,0.0369666666666667},
-{2989560,3876805,3877580,-1,0.19119512195122},
-{2989561,3876793,3877560,0.180418604651163,-1},
-{2989562,3878079,3878162,-1,0.0289384615384615},
-{2989563,3878066,3878150,0.0255310344827586,-1},
-{2989564,3878232,3878278,0.0213214285714286,0.0314210526315789},
-{2989565,3878138,3878209,0.0213705882352941,0.04844},
-{2989566,3877580,3877560,0.0353142857142857,0.0412},
-{2989567,3876805,3876793,0.0237677419354839,0.0320347826086956},
-{2989568,3878150,3878346,0.0797586206896552,-1},
-{2989569,3878162,3878346,-1,0.303225},
-{2989570,3875312,3875257,0.0383454545454546,0.0496235294117647},
-{2989571,3875124,3875078,0.05365,0.0247615384615385},
-{2989572,3875035,3874980,0.0332285714285714,0.0387666666666667},
-{2989573,3874433,3874514,0.0386307692307692,0.0478285714285714},
-{2989574,3874069,3873923,0.158478260869565,-1},
-{2989575,3874000,3873923,0.0334222222222222,0.0243891891891892},
-{2989576,3873781,3873861,-1,0.0333},
-{2989577,3873763,3873852,0.0393,-1},
-{2989578,3873781,3873763,0.0262846153846154,-1},
-{2989579,3876231,3875677,-1,0.564611538461538},
-{2989580,3876178,3875580,0.545055555555556,-1},
-{2989581,3875580,3875677,0.0514571428571429,0.0514571428571429},
-{2989582,3875305,3875415,0.0496344827586207,0.0685428571428571},
-{2989583,3873445,3873221,0.203413333333333,-1},
-{2989584,3873221,3873314,0.0336222222222222,0.0336222222222222},
-{2989585,3872746,3872863,0.0230533333333333,0.0280378378378378},
-{2989586,3872648,3872550,0.0312923076923077,0.0428210526315789},
-{2989587,3872648,3872328,-1,0.275795454545455},
-{2989588,3872328,3872227,0.0382384615384615,0.0552333333333333},
-{2989589,3872227,3872071,0.240424390243902,-1},
-{2989590,3872071,3871913,0.258028571428571,0.12315},
-{2989591,3877943,3878017,0.04788,0.04788},
-{2989592,3877812,3877888,0.044175,0.04712},
-{2989593,3877681,3877765,0.04011,0.05348},
-{2989594,3877765,3877701,-1,0.0893020408163265},
-{2989595,3877681,3877628,0.0697967213114754,-1},
-{2989596,3877577,3877464,-1,0.0835838709677419},
-{2989597,3877701,3877628,0.0426,0.0497},
-{2989598,3877628,3877474,0.124877419354839,-1},
-{2989599,3877701,3877577,-1,0.131125423728814},
-{2989600,3877474,3877363,0.0820571428571429,-1},
-{2989601,3877363,3877464,0.0220714285714286,0.0220714285714286},
-{2989602,3877004,3876916,0.0518333333333333,0.0444285714285714},
-{2989603,3877004,3876858,-1,0.0486654545454545},
-{2989604,3876916,3876804,0.0340631578947368,-1},
-{2989605,3876858,3876804,0.0408,0.07072},
-{2989606,3875869,3875828,0.02945625,0.02945625},
-{2989607,3875217,3875278,-1,0.03875},
-{2989608,3875180,3875110,0.05732,0.05732},
-{2989609,3875180,3875164,-1,0.06644},
-{2989610,3875110,3875093,0.0635714285714286,-1},
-{2989611,3875093,3875164,0.05492,0.04119},
-{2989612,3875093,3875089,0.051196875,-1},
-{2989613,3875164,3875150,-1,0.05554},
-{2989614,3875150,3875089,0.0150117647058824,0.0150117647058824},
-{2989615,3875150,3875125,-1,0.09183},
-{2989616,3875089,3875066,0.0872190476190476,-1},
-{2989617,3875125,3875066,0.0191052631578947,0.03025},
-{2989618,3874999,3875076,0.0414,0.0462705882352941},
-{2989619,3874936,3874888,0.0337636363636364,0.0337636363636364},
-{2989620,3869677,3869649,-1,0.220902127659574},
-{2989621,3869649,3869580,0.040275,0.0280173913043478},
-{2989622,3869649,3869635,-1,0.0878884615384615},
-{2989623,3869635,3869574,0.037875,0.0432857142857143},
-{2989624,3869612,3869540,0.03063,0.03063},
-{2989625,3869612,3869568,-1,0.0945169811320755},
-{2989626,3869568,3869576,0.0103125,0.00951923076923077},
-{2989627,3879420,3879017,0.120306976744186,-1},
-{2989628,3875332,3875449,0.160947169811321,0.160947169811321},
-{2989629,3875449,3875462,0.00606666666666667,0.00606666666666667},
-{2989630,3875650,3875663,0.0147931034482759,0.01340625},
-{2989631,3875650,3875989,0.0945733333333333,-1},
-{2989632,3878360,3878583,0.163571428571429,-1},
-{2989633,3877324,3877216,0.16236,-1},
-{2989634,3877216,3876915,0.1638,0.2268},
-{2989635,3879400,3879348,0.0217135135135135,-1},
-{2989636,3879348,3878938,0.19130625,-1},
-{2989637,3878930,3879348,-1,0.140329411764706},
-{2989638,3879348,3879473,-1,0.039555},
-{2989639,3878339,3878497,-1,0.215325},
-{2989640,3878881,3878930,-1,0.0236045454545455},
-{2989641,3878497,3878530,-1,0.0157153846153846},
-{2989642,3879871,3879815,0.0314341463414634,-1},
-{2989643,3879829,3879815,-1,0.0252},
-{2989644,3881085,3881042,0.00921176470588235,-1},
-{2989645,3881085,3881088,0.0111219512195122,-1},
-{2989646,3881088,3881106,0.00993488372093023,-1},
-{2989647,3880001,3879766,0.11075,-1},
-{2989648,3879924,3879824,0.2469,0.2469},
-{2989649,3879174,3879011,-1,0.0803111111111111},
-{2989650,3875549,3875729,0.278014285714286,0.169226086956522},
-{2989651,3875729,3875769,0.0504,0.0296470588235294},
-{2989652,3875769,3875890,0.114490909090909,-1},
-{2989653,3875769,3875804,-1,0.11672},
-{2989654,3875797,3875804,0.0432,-1},
-{2989655,3875804,3875890,0.0579913043478261,-1},
-{2989656,3875890,3875981,0.111814285714286,-1},
-{2989657,3875797,3875981,0.0964285714285714,-1},
-{2989658,3875935,3876072,0.15372,0.13251724137931},
-{2989659,3875935,3876158,-1,-1},
-{2989660,3876047,3876158,0.0632571428571428,-1},
-{2989661,3876158,3876222,0.0311142857142857,-1},
-{2989662,3876222,3876368,0.0683478260869565,-1},
-{2989663,3876047,3876135,0.0906260869565217,-1},
-{2989664,3876135,3876368,-1,0.105046153846154},
-{2989665,3875740,3875352,0.182295652173913,0.322523076923077},
-{2989666,3875687,3875582,-1,0.0536068965517241},
-{2989667,3875687,3875797,0.131554838709677,-1},
-{2989668,3877875,3877739,0.5628,-1},
-{2989669,3876422,3876852,-1,0.195782608695652},
-{2989670,3874890,3874960,0.05955,0.0529333333333333},
-{2989671,3875800,3876053,-1,0.167192307692308},
-{2989672,3875800,3876055,0.14865,0.110111111111111},
-{2989673,3876053,3876041,0.224193103448276,0.2322},
-{2989674,3876105,3876137,0.059075,-1},
-{2989675,3876216,3876105,0.104628571428571,-1},
-{2989676,3876398,3876216,0.0912857142857143,-1},
-{2989677,3877782,3877654,0.089825,0.0937304347826087},
-{2989678,3877782,3877988,0.14084,0.0960272727272727},
-{2989679,3877398,3877654,0.07792,0.0899076923076923},
-{2989680,3877962,3877906,0.25875,-1},
-{2989681,3878088,3877988,0.25596,-1},
-{2989682,3879140,3879220,0.0925,-1},
-{2989683,3879220,3879376,0.0903111111111111,-1},
-{2989684,3879147,3879376,-1,0.111025},
-{2989685,3879220,3879147,0.0816947368421053,0.0674869565217391},
-{2989686,3875264,3875324,-1,0.348138461538462},
-{2989687,3875559,3875264,0.157513043478261,0.172514285714286},
-{2989688,3875324,3875622,0.23076,0.23076},
-{2989689,3875324,3875387,-1,0.236530434782609},
-{2989690,3875387,3875748,-1,-1},
-{2989691,3875387,3875476,-1,0.276457142857143},
-{2989692,3875476,3875560,-1,-1},
-{2989693,3875476,3875848,-1,-1},
-{2989694,3876145,3876475,-1,0.135161538461538},
-{2989695,3876041,3876458,0.167577777777778,0.180984},
-{2989696,3877242,3877268,-1,0.0145846153846154},
-{2989697,3877268,3877289,-1,0.012425},
-{2989698,3877860,3877876,0.0171461538461538,-1},
-{2989699,3877876,3877893,0.0110689655172414,-1},
-{2989700,3877860,3878389,0.148671428571429,-1},
-{2989701,3880021,3880204,0.180933333333333,0.116314285714286},
-{2989702,3880451,3880676,0.286753846153846,-1},
-{2989703,3881781,3881830,0.0384818181818182,-1},
-{2989704,3880994,3880948,-1,0.0350086956521739},
-{2989705,3882107,3881781,-1,0.197458064516129},
-{2989706,3882107,3882152,-1,0.06595},
-{2989707,3882396,3882358,-1,0.0441176470588235},
-{2989708,3882422,3882396,-1,0.158957142857143},
-{2989709,3882152,3882317,-1,0.119775},
-{2989710,3882881,3882358,-1,0.2494},
-{2989711,3882422,3882714,0.220989473684211,-1},
-{2989712,3882317,3882598,-1,0.327342857142857},
-{2989713,3883362,3882714,0.52308,-1},
-{2989714,3882650,3882598,0.0446086956521739,-1},
-{2989715,3882714,3883077,0.253336363636364,-1},
-{2989716,3882598,3882971,-1,0.246469565217391},
-{2989717,3883373,3883077,-1,0.180312},
-{2989718,3883025,3882971,-1,0.051},
-{2989719,3883077,3883462,0.206777777777778,-1},
-{2989720,3882971,3883356,-1,0.18252},
-{2989721,3883765,3883462,0.3103125,-1},
-{2989722,3883413,3883356,0.0495714285714286,-1},
-{2989723,3883356,3883778,-1,0.42888},
-{2989724,3883462,3883905,0.32955,-1},
-{2989725,3883905,3884245,0.242657142857143,-1},
-{2989726,3883778,3884144,-1,0.370842857142857},
-{2989727,3884606,3883905,0.47375,0.334411764705882},
-{2989728,3883835,3883778,0.03984,0.0415},
-{2989729,3884245,3884641,0.1903875,-1},
-{2989730,3884144,3884512,-1,0.207707142857143},
-{2989731,3884557,3884245,-1,0.236290909090909},
-{2989732,3884184,3884144,-1,0.0531157894736842},
-{2989733,3884641,3884892,0.173,-1},
-{2989734,3884512,3884772,-1,0.202610526315789},
-{2989735,3885031,3884641,0.281842105263158,-1},
-{2989736,3884559,3884512,0.0419727272727273,-1},
-{2989737,3884892,3885258,0.2642,-1},
-{2989738,3884867,3884772,0.29484,-1},
-{2989739,3885208,3886017,-1,0.427355555555556},
-{2989740,3885339,3886128,0.405492857142857,-1},
-{2989741,3885208,3884867,0.2357625,-1},
-{2989742,3885339,3885287,0.061275,-1},
-{2989743,3886128,3886701,0.369392307692308,-1},
-{2989744,3886017,3886598,-1,0.352933333333333},
-{2989745,3886376,3886128,0.240566666666667,-1},
-{2989746,3886073,3886017,0.0325862068965517,-1},
-{2989747,3886701,3887339,0.378333333333333,-1},
-{2989748,3886598,3887221,-1,0.379844444444444},
-{2989749,3886598,3886270,-1,0.255975},
-{2989750,3886701,3886651,0.0297090909090909,0.0445636363636364},
-{2989751,3887691,3887339,0.253057142857143,-1},
-{2989752,3887278,3887221,0.0510631578947368,0.03465},
-{2989753,3885992,3885965,-1,-1},
-{2989754,3885460,3885922,-1,0.187429411764706},
-{2989755,3886403,3886778,0.185345454545455,-1},
-{2989756,3886705,3886448,0.274733333333333,0.149854545454545},
-{2989757,3886812,3886705,0.433382608695652,-1},
-{2989758,3882425,3882469,-1,-1},
-{2989759,3883181,3882881,-1,0.226121739130435},
-{2989760,3883866,3883181,-1,0.3412},
-{2989761,3884487,3883866,-1,0.295389473684211},
-{2989762,3883866,3883924,0.0438947368421053,-1},
-{2989763,3884097,3884487,-1,0.217384615384615},
-{2989764,3885098,3885070,-1,0.0352181818181818},
-{2989765,3885070,3885127,0.0424909090909091,-1},
-{2989766,3884942,3885098,0.119169230769231,-1},
-{2989767,3884942,3885070,0.0889,-1},
-{2989768,3885253,3885098,-1,0.269325},
-{2989769,3885108,3885248,0.04952,-1},
-{2989770,3885345,3885638,-1,0.0962914285714286},
-{2989771,3885253,3885251,0.0101351351351351,-1},
-{2989772,3885251,3885248,0.0109459459459459,-1},
-{2989773,3885345,3885357,-1,0.00764210526315789},
-{2989774,3885357,3885372,-1,0.0115459459459459},
-{2989775,3885242,3885320,0.0669,-1},
-{2989776,3885320,3885488,0.468153846153846,-1},
-{2989777,3884950,3885051,0.2563,0.320375},
-{2989778,3884991,3885038,0.0230526315789474,-1},
-{2989779,3884935,3885488,-1,0.280742857142857},
-{2989780,3885488,3885501,0.108874285714286,-1},
-{2989781,3885501,3885487,0.083475,-1},
-{2989782,3885487,3885457,0.120628571428571,-1},
-{2989783,3885457,3885376,0.2004,-1},
-{2989784,3885171,3885376,0.182890909090909,-1},
-{2989785,3885291,3885383,0.0239294117647059,0.0262451612903226},
-{2989786,3885187,3885237,0.0249,-1},
-{2989787,3884540,3884198,-1,0.3451},
-{2989788,3884339,3884540,-1,0.188176744186047},
-{2989789,3884339,3884398,-1,0.0310965517241379},
-{2989790,3884401,3884531,0.128021739130435,0.128021739130435},
-{2989791,3884370,3884404,-1,0.03756},
-{2989792,3884227,3884370,-1,0.0540142857142857},
-{2989793,3884227,3884258,0.0356432432432432,-1},
-{2989794,3884148,3884258,0.0376857142857143,-1},
-{2989795,3884107,3884227,-1,0.0351},
-{2989796,3883280,3883321,0.0268846153846154,0.0258888888888889},
-{2989797,3882431,3882727,0.0913375,0.0996409090909091},
-{2989798,3881114,3881183,0.0266666666666667,0.0282352941176471},
-{2989799,3880892,3880883,-1,0.12648},
-{2989800,3875718,3875902,0.34734375,-1},
-{2989801,3875896,3875827,-1,0.0492947368421053},
-{2989802,3875827,3875977,-1,0.164},
-{2989803,3876031,3875977,0.0470117647058824,-1},
-{2989804,3875977,3876352,-1,0.232773333333333},
-{2989805,3876420,3876352,-1,0.0399714285714286},
-{2989806,3876533,3876488,-1,-1},
-{2989807,3889033,3889241,0.0560108108108108,-1},
-{2989808,3889370,3889345,0.00944081632653061,0.00889615384615385},
-{2989809,3889389,3889370,0.0349125,-1},
-{2989810,3889389,3889531,0.044055,-1},
-{2989811,3891275,3891411,0.0338478260869565,-1},
-{2989812,3891275,3891287,0.06625,-1},
-{2989813,3892441,3892432,-1,-1},
-{2989814,3894155,3894157,0.08562,-1},
-{2989815,3896024,3896146,-1,0.0797454545454545},
-{2989816,3897504,3897316,0.0585538461538462,-1},
-{2989817,3897504,3897487,0.01848,-1},
-{2989818,3897487,3897482,0.0142090909090909,-1},
-{2989819,3897523,3897557,0.0382,-1},
-{2989820,3897557,3897605,0.0457384615384615,-1},
-{2989821,3897520,3897523,-1,0.0198923076923077},
-{2989822,3897588,3897615,0.0568909090909091,-1},
-{2989823,3897615,3897605,0.01002,-1},
-{2989824,3897552,3897572,0.0171,-1},
-{2989825,3897414,3897552,-1,0.0380936170212766},
-{2989826,3897552,3897579,-1,0.00669333333333333},
-{2989827,3898991,3899009,-1,0.0159483870967742},
-{2989828,3899009,3899016,-1,0.00982758620689655},
-{2989829,3899638,3899772,-1,0.0398769230769231},
-{2989830,3899772,3899880,-1,0.0415935483870968},
-{2989831,3899791,3899853,0.0231483870967742,-1},
-{2989832,3899853,3899891,0.0161294117647059,-1},
-{2989833,3899880,3900011,-1,0.057432},
-{2989834,3899891,3900030,0.03873,-1},
-{2989835,3899791,3899780,-1,0.0113560975609756},
-{2989836,3899780,3899772,-1,0.0115609756097561},
-{2989837,3899891,3899885,0.0117257142857143,-1},
-{2989838,3899885,3899880,0.0122571428571429,-1},
-{2989839,3900008,3899937,0.06676,-1},
-{2989840,3899937,3899888,0.0294,-1},
-{2989841,3902495,3902709,-1,0.134228571428571},
-{2989842,3902375,3902468,-1,0.0214536585365854},
-{2989843,3902468,3902693,-1,0.0601894736842105},
-{2989844,3903541,3904021,-1,0.108832653061224},
-{2989845,3903554,3904040,0.0944631578947368,-1},
-{2989846,3903554,3903547,-1,0.0204},
-{2989847,3903547,3903541,-1,0.0200571428571429},
-{2989848,3904040,3904029,0.0210461538461538,-1},
-{2989849,3904029,3904021,0.0296571428571429,-1},
-{2989867,3871954,3872002,0.0500888888888889,-1},
-{2989868,3872032,3872086,-1,0.0507555555555556},
-{2990009,3895024,3895226,0.18065,0.333507692307692},
-{2990010,3898324,3898464,0.08019,0.0486},
-{2990011,3898896,3898324,-1,0.233139622641509},
-{2990012,3899273,3898896,-1,0.183117647058824},
-{2990013,3899542,3899273,-1,0.237308571428571},
-{2990014,3900158,3900222,0.0283111111111111,0.0347454545454545},
-{2990015,3900222,3900296,0.0266785714285714,0.0393157894736842},
-{2990016,3900047,3900046,0.0389125,-1},
-{2990017,3898771,3899912,0.595527272727273,0.297763636363636},
-{2990018,3900132,3900232,0.0277170731707317,0.0598105263157895},
-{2990019,3899972,3899622,0.145088888888889,0.145088888888889},
-{2990020,3899557,3899616,0.0382434782608696,0.0274875},
-{2990021,3899616,3899683,0.0254222222222222,0.0245142857142857},
-{2990022,3897969,3898042,0.03325,0.0306923076923077},
-{2990023,3898042,3898090,0.0168967741935484,0.021825},
-{2990024,3896841,3896791,0.0281714285714286,0.0219111111111111},
-{2990025,3896791,3896752,0.021696,0.0258285714285714},
-{2990026,3896401,3896289,0.0630692307692308,-1},
-{2990027,3896152,3896322,0.0905142857142857,-1},
-{2990028,3896323,3896322,-1,-1},
-{2990029,3896323,3896390,-1,-1},
-{2990030,3887179,3887450,-1,0.124684615384615},
-{2990031,3894469,3894585,-1,0.0327206896551724},
-{2990032,3893688,3893705,0.0154758620689655,-1},
-{2990033,3892950,3892988,0.022725,-1},
-{2990034,3892988,3893049,0.0301111111111111,-1},
-{2990035,3892849,3892884,-1,0.0146615384615385},
-{2990036,3892884,3892945,-1,0.0204529411764706},
-{2990037,3900383,3900041,-1,0.280326315789474},
-{2990038,3900506,3900528,-1,0.0101833333333333},
-{2990039,3900528,3900565,-1,0.02023125},
-{2990040,3900597,3900628,0.00962790697674419,-1},
-{2990041,3900628,3900670,0.0134266666666667,-1},
-{2990042,3900846,3900780,0.02505,0.0159409090909091},
-{2990043,3903129,3903121,0.092525,0.158614285714286},
-{2990044,3903273,3903121,-1,0.14812},
-{2990045,3903129,3903273,0.0310758620689655,-1},
-{2990046,3903122,3903133,-1,0.023808},
-{2990047,3903133,3903129,-1,0.0164086956521739},
-{2990048,3906691,3905679,-1,0.408825},
-{2990049,3905679,3905192,0.252542857142857,0.279126315789474},
-{2990050,3905370,3905610,0.0425333333333333,-1},
-{2990051,3905311,3905610,-1,0.0604909090909091},
-{2990052,3905311,3905750,-1,0.0861934426229508},
-{2990053,3906805,3906761,-1,0.0272},
-{2990054,3906761,3906700,-1,0.029352},
-{2990055,3906986,3906877,-1,0.11754},
-{2990056,3907184,3907451,-1,0.129288888888889},
-{2990057,3906805,3906913,-1,0.0265375},
-{2990058,3906877,3907016,0.0340897959183673,-1},
-{2990059,3907074,3906691,-1,0.203933333333333},
-{2990060,3908136,3908257,0.028932,-1},
-{2990061,3908123,3908136,-1,0.0335571428571429},
-{2990062,3908136,3908130,-1,0.0586},
-{2990063,3908257,3908441,0.0384734693877551,-1},
-{2990070,3898604,3898746,0.06875,0.0515625},
-{2990071,3898223,3898604,-1,0.160552941176471},
-{2990072,3898346,3898604,0.187296,-1},
-{2990073,3898223,3898346,-1,0.108294736842105},
-{2990074,3898260,3898413,0.0919772727272727,-1},
-{2990075,3898346,3898458,-1,0.0747191489361702},
-{2990076,3898482,3898458,0.01635,0.012658064516129},
-{2990077,3899517,3900103,0.176805882352941,-1},
-{2990078,3902545,3902475,0.042672,-1},
-{2990079,3902475,3902535,0.040224,-1},
-{2990080,3902535,3902614,0.0401769230769231,-1},
-{2990081,3902614,3902545,0.0413,-1},
-{2990082,3901057,3901416,-1,0.1494375},
-{2990083,3901057,3901351,-1,0.112605633802817},
-{2990084,3901956,3901933,0.135707142857143,-1},
-{2990085,3901933,3902021,0.2344875,-1},
-{2990086,3894748,3894906,0.11094,-1},
-{2990087,3894890,3894748,0.113541176470588,-1},
-{2990088,3893726,3894476,0.272257894736842,0.32330625},
-{2990089,3893322,3893266,0.01686,0.01686},
-{2990090,3894912,3894956,0.0198222222222222,-1},
-{2990091,3896174,3896190,-1,0.01074},
-{2990092,3896986,3897045,0.0282166666666667,-1},
-{2990093,3896190,3896743,0.170729577464789,0.173168571428571},
-{2990094,3896743,3896755,0.00466285714285714,0.0048},
-{2990095,3896695,3896829,0.0807692307692308,-1},
-{2990097,3881704,3881424,0.0860181818181818,-1},
-{2990098,3881333,3881424,0.22388,-1},
-{2990119,3874535,3874483,0.0924222222222222,0.0924222222222222},
-{2990151,3851453,3851305,0.0684230769230769,0.0936315789473684},
-{2990152,3852205,3851527,0.22014,0.22014},
-{2990155,3915657,3915615,-1,0.0495642857142857},
-{2990156,3915721,3915752,-1,0.0463846153846154},
-{2990157,3915752,3915657,-1,0.0465214285714286},
-{2990158,3914399,3915404,-1,0.215391666666667},
-{2990171,3881156,3880474,1.04592,1.04592},
-{2990172,3881156,3881472,0.50532,0.50532},
-{2990173,3881362,3881176,-1,0.145778571428571},
-{2990174,3881530,3881472,0.11082,0.11082},
-{2990175,3881616,3881800,0.2103,0.2103},
-{2990176,3881472,3881564,0.04911,0.0377769230769231},
-{2990177,3881564,3881362,0.329184,0.27432},
-{2990178,3881564,3881800,0.0646641509433962,0.0646641509433962},
-{2990179,3891581,3892152,-1,0.392838461538462},
-{2990180,3891581,3891579,0.188536363636364,-1},
-{2990181,3891581,3891196,0.30198,0.30198},
-{2990182,3890431,3891196,0.472527272727273,0.577533333333333},
-{2990183,3890431,3890267,0.23118,0.110085714285714},
-{2990185,3872006,3871483,0.174046153846154,-1},
-{2990186,3871483,3871398,0.0244071428571429,-1},
-{2990187,3875943,3875777,0.0610775510204082,-1},
-{2990188,3875891,3875487,-1,-1},
-{2990189,3875943,3875891,-1,-1},
-{2990192,3855370,3855491,0.101929411764706,0.1444},
-{2990193,3855208,3855180,0.0287368421052632,0.0287368421052632},
-{2990194,3856798,3856758,0.0256090909090909,0.0216692307692308},
-{2990195,3856271,3856232,0.033,-1},
-{2990196,3857327,3857350,0.0175428571428571,0.0160173913043478},
-{2990197,3856069,3856027,0.0138153846153846,0.0141789473684211},
-{2990198,3867861,3867639,-1,0.08182},
-{2990199,3867639,3867585,-1,0.0456857142857143},
-{2990200,3880641,3880554,0.16195,0.138814285714286},
-{2990201,3879801,3880554,0.375511111111111,0.405552},
-{2990202,3879676,3879801,-1,0.12405},
-{2990203,3880796,3879613,0.747248275862069,0.833469230769231},
-{2990204,3882116,3882529,0.340033846153846,0.334881818181818},
-{2990205,3882529,3882541,0.0308275862068966,0.0288387096774194},
-{2990206,3881243,3880796,-1,-1},
-{2990207,3872513,3872275,0.425127272727273,-1},
-{2990208,3917578,3917655,-1,0.0375857142857143},
-{2990209,3877765,3878656,0.3504,0.3504},
-{2990210,3878656,3880024,1.57264444444444,1.57264444444444},
-{2990211,3878145,3878105,0.0346064516129032,-1},
-{2990212,3878214,3878145,0.03045,-1},
-{2990213,3878179,3877969,-1,0.16051914893617},
-{2990214,3878179,3878105,-1,0.0311},
-{2990215,3877822,3877530,0.233421428571429,-1},
-{2990216,3877623,3877530,0.06285,-1},
-{2990217,3882358,3882221,-1,0.0628628571428571},
-{2990218,3882396,3882280,0.07272,-1},
-{2990219,3882280,3882379,0.0482615384615385,0.0553588235294118},
-{2990220,3882221,3882280,0.0220628571428571,0.02145},
-{2990221,3865391,3865408,-1,0.0099},
-{2990222,3865444,3865416,-1,0.01364},
-{2990223,3865416,3865392,-1,0.0127285714285714},
-{2990224,3865391,3865416,-1,0.0113318181818182},
-{2990225,3865489,3865491,-1,0.0081},
-{2990226,3865491,3865497,-1,0.0240714285714286},
-{2990227,3865416,3865491,-1,0.0377692307692308},
-{2990228,3865491,3865536,-1,0.0255085714285714},
-{2990229,3864562,3863590,1.15272857142857,0.896566666666667},
-{2990230,3864562,3864362,0.1172,0.1172},
-{2990231,3865180,3865313,0.1103,0.1103},
-{2990232,3865189,3865180,0.276177777777778,0.276177777777778},
-{2990233,3865180,3865149,0.230425,0.230425},
-{2990234,3872621,3872716,0.0366,-1},
-{2990235,3881042,3881073,0.0290571428571429,0.00904},
-{2990237,3871461,3871272,0.0952444444444444,0.0952444444444444},
-{2990245,3884148,3884221,0.145844444444444,0.187514285714286},
-{2990246,3883779,3884221,0.3136,0.3136},
-{2990249,3874848,3874768,0.0297724137931034,0.035975},
-{2990250,3874390,3874470,0.038225,0.038225},
-{2990251,3874033,3874390,-1,0.42152380952381},
-{2990252,3874033,3874110,0.05325,0.05325},
-{2990253,3873988,3874033,-1,0.326689655172414},
-{2990254,3873988,3874058,0.0498315789473684,0.059175},
-{2990255,3873998,3874067,0.0346615384615385,0.0321857142857143},
-{2990256,3874351,3874393,0.03588,-1},
-{2990298,3853972,3854095,-1,0.140894117647059},
-{2990299,3858141,3858104,0.05205,0.0268645161290323},
-{2990300,3858221,3858141,0.1625,0.132954545454545},
-{2990301,3858221,3857984,0.149152941176471,0.120742857142857},
-{2990303,3869071,3868695,-1,0.214325},
-{2990304,3869139,3869071,-1,0.04653},
-{2990305,3865974,3865725,0.10314,0.106696551724138},
-{2990306,3864973,3864549,0.317634782608696,0.317634782608696},
-{2990307,3865872,3865952,0.0395111111111111,0.0395111111111111},
-{2990313,3899542,3899450,0.0360375,-1},
-{2990314,3899542,3899648,-1,0.0783789473684211},
-{2990315,3899669,3899648,0.0159130434782609,-1},
-{2990316,3899554,3899542,-1,0.0167842105263158},
-{2990317,3899678,3899669,0.0144272727272727,-1},
-{2990318,3899554,3899611,0.0318214285714286,-1},
-{2990319,3899611,3899669,0.01976,-1},
-{2990320,3899542,3899611,-1,0.0333857142857143},
-{2990321,3899611,3899678,-1,0.028125},
-{2990322,3899554,3899447,-1,0.0686842105263158},
-{2990323,3899580,3899447,-1,0.086525},
-{2990324,3898678,3898721,0.0610421052631579,0.0724875},
-{2990325,3898678,3898308,0.155528571428571,0.120966666666667},
-{2990326,3896734,3896864,-1,0.0738782608695652},
-{2990327,3896799,3896864,0.06148,-1},
-{2990328,3896744,3896799,0.053856,-1},
-{2990329,3896799,3896734,0.113492307692308,-1},
-{2990330,3896701,3896734,-1,0.1056},
-{2990331,3896644,3896734,-1,0.05364},
-{2990332,3896644,3896175,0.193089473684211,-1},
-{2990333,3896601,3896122,0.157289361702128,0.184815},
-{2990334,3896744,3896701,0.0250344827586207,0.0191052631578947},
-{2990335,3896601,3896644,-1,0.0211588235294118},
-{2990336,3896175,3896122,0.0143433962264151,0.0262137931034483},
-{2990337,3868970,3868738,0.0896129032258064,0.0896129032258064},
-{2990338,3869139,3868970,-1,-1},
-{2990342,3881939,3882281,0.1422,0.15642},
-{2990345,3859562,3859531,0.017544,0.0125314285714286},
-{2990346,3859531,3859485,0.04705,0.0342181818181818},
-{2990347,3902196,3902275,0.0169756097560976,-1},
-{2990358,3895323,3895485,0.0492,-1},
-{2990359,3895328,3895430,-1,0.0281875},
-{2990360,3871319,3871404,0.02454,0.0261063829787234},
-{2990367,3851171,3851140,0.019056,0.019056},
-{2990368,3851140,3851048,0.0565153846153846,0.0544222222222222},
-{2990369,3851477,3851226,0.132925,0.187658823529412},
-{2990371,3907801,3907914,0.0888461538461539,0.0888461538461539},
-{2990374,3869839,3869879,-1,0.141484615384615},
-{2990375,3870117,3870035,-1,0.079825},
-{2990378,3899102,3899302,-1,0.04202},
-{2990391,3879131,3879242,-1,0.0862125},
-{2990392,3879475,3879861,0.326427272727273,0.377968421052632},
-{2990393,3880331,3880422,0.0649555555555555,0.0649555555555555},
-{2990394,3880422,3880571,0.116488888888889,0.116488888888889},
-{2990395,3880881,3880993,0.07385,0.08862},
-{2990396,3881441,3881540,0.07434,0.0550666666666667},
-{2990397,3881824,3881688,-1,-1},
-{2990398,3883845,3884413,0.337966666666667,0.289685714285714},
-{2990399,3883975,3884185,0.0846666666666667,-1},
-{2990400,3884010,3884071,-1,0.0239111111111111},
-{2990401,3884071,3884185,-1,0.308333333333333},
-{2990402,3884039,3884115,-1,0.0278769230769231},
-{2990403,3884115,3884598,-1,0.183},
-{2990404,3884106,3884655,0.216857142857143,-1},
-{2990405,3884186,3884680,0.246518181818182,0.216936},
-{2990406,3884715,3884234,0.211176,0.159981818181818},
-{2990407,3884234,3884208,0.01254,0.0078375},
-{2990408,3858386,3858326,0.0826241379310345,0.0904188679245283},
-{2990409,3859873,3859816,0.0879473684210526,0.0618888888888889},
-{2990410,3859816,3859766,0.0610636363636364,0.055975},
-{2990418,3901250,3901306,0.0209307692307692,0.0209307692307692},
-{2990419,3898645,3898677,0.01784,0.0254857142857143},
-{2990420,3904346,3904420,0.042275,0.0563666666666667},
-{2990421,3900862,3900866,0.005240625,0.00588421052631579},
-{2990422,3915583,3915662,0.04132,0.0387375},
-{2990423,3915662,3916477,0.261466666666667,0.231462295081967},
-{2990433,3864642,3865357,0.267705882352941,0.243803571428571},
-{2990434,3866430,3865860,0.421533333333333,0.421533333333333},
-{2990435,3872353,3872667,0.143911111111111,0.24285},
-{2990436,3902521,3902587,0.0331142857142857,0.0434625},
-{2990437,3902587,3902629,0.02451,0.0350142857142857},
-{2990438,3907116,3906840,0.071172972972973,0.065835},
-{2990439,3907488,3907587,0.1082,0.1082},
-{2990440,3907587,3908464,0.605777777777778,0.605777777777778},
-{2990441,3907884,3908052,0.145073684210526,0.153133333333333},
-{2990442,3908052,3908239,0.132933333333333,0.14955},
-{2990443,3905695,3905770,0.0265015384615385,0.0273428571428571},
-{2990447,3907205,3907137,0.01984,-1},
-{2990448,3894969,3895018,0.025225,-1},
-{2990449,3894989,3895005,-1,0.0119},
-{2990450,3895005,3895018,-1,0.00953142857142857},
-{2990451,3920868,3920950,0.0230425531914894,0.0225625},
-{2990452,3920950,3921863,0.232640816326531,0.227988},
-{2990453,3913529,3913981,0.256685714285714,0.283705263157895},
-{2990457,3911395,3912354,0.4728,0.509169230769231},
-{2990459,3912557,3911859,0.334155555555556,0.334155555555556},
-{2990460,3880854,3880920,0.0192,0.0168},
-{2990470,3907164,3907184,-1,0.0579},
-{2990472,3907025,3906986,-1,0.02735},
-{2990473,3907025,3907022,0.0130222222222222,-1},
-{2990474,3907029,3907025,0.0103615384615385,-1},
-{2990475,3906913,3907029,-1,0.027504},
-{2990476,3907164,3907062,-1,0.0817125},
-{2990477,3907062,3907025,-1,0.0270923076923077},
-{2990478,3907029,3907062,-1,0.00611020408163265},
-{2990479,3907062,3907137,-1,0.0156127659574468},
-{2990486,3869940,3869416,-1,0.1839},
-{2990487,3864956,3864912,-1,0.0145714285714286},
-{2990489,3915404,3915500,-1,0.0212547945205479},
-{2990490,3915513,3915696,0.037648,-1},
-{2990493,3864936,3865037,0.0889384615384615,-1},
-{2990494,3865037,3865076,0.021375,-1},
-{2990496,3894607,3894704,0.0517846153846154,0.0561},
-{2990500,3874902,3875102,-1,0.08718},
-{2990502,3918160,3918808,0.329472,-1},
-{2990503,3918808,3918999,0.100211650485437,-1},
-{2990504,3919068,3918883,0.0957844660194175,-1},
-{2990505,3873120,3873168,0.0204461538461538,0.0166125},
-{2990507,3870544,3870385,0.0317632653061225,-1},
-{2990508,3869299,3869116,-1,0.035988},
-{2990509,3876661,3876443,0.0895914893617021,-1},
-{2990510,3876443,3875943,0.19785,-1},
-{2990511,3876661,3876715,-1,0.0197318181818182},
-{2990512,3907186,3907325,-1,0.0316838709677419},
-{2990513,3908391,3908543,-1,0.0266117647058824},
-{2990514,3907280,3907523,0.0462676056338028,-1},
-{2990515,3907325,3907437,-1,0.0233809523809524},
-{2990516,3907437,3907573,-1,0.0326857142857143},
-{2990517,3908287,3908391,-1,0.0176597014925373},
-{2990518,3907523,3908322,0.150777464788732,-1},
-{2990519,3908322,3908476,0.0242281690140845,-1},
-{2990520,3907590,3907573,0.006192,0.00631836734693878},
-{2990521,3867631,3868716,0.321063157894737,-1},
-{2990522,3868716,3868869,0.0496838709677419,-1},
-{2990523,3868760,3868851,-1,0.0303529411764706},
-{2990524,3868851,3869093,-1,0.0877875},
-{2990525,3921931,3922117,0.0387387096774194,0.0363909090909091},
-{2990526,3865745,3865880,-1,0.0629692307692308},
-{2990527,3865880,3866595,-1,0.224342857142857},
-{2990529,3896096,3896156,-1,0.0257066666666667},
-{2990530,3896156,3896496,-1,0.17238},
-{2990531,3896578,3896841,0.135677777777778,-1},
-{2990532,3896841,3897083,0.110775,-1},
-{2990533,3897083,3897337,0.110357142857143,-1},
-{2990534,3897337,3897637,0.139673076923077,-1},
-{2990535,3897637,3897931,0.1356,-1},
-{2990536,3901933,3902078,0.0362228571428571,-1},
-{2990537,3902078,3902106,0.00520285714285714,-1},
-{2990538,3901968,3902138,-1,0.0393617647058823},
-{2990539,3902138,3902160,-1,0.00547058823529412},
-{2990548,3902106,3903093,0.19935,-1},
-{2990549,3903093,3903382,0.0587753424657534,-1},
-{2990558,3908123,3908284,-1,0.06944},
-{2990559,3908284,3908441,-1,0.0666214285714286},
-{2990560,3906761,3907331,0.0960310344827586,0.0960310344827586},
-{2990561,3896047,3896174,-1,0.0381138461538462},
-{2990562,3896018,3896138,0.0331521126760563,-1},
-{2990563,3896138,3896190,0.0101666666666667,-1},
-{2990564,3865415,3865430,-1,0.03688},
-{2990565,3865005,3865040,-1,0.0847170731707317},
-{2990566,3865211,3865154,-1,0.114386666666667},
-{2990567,3865154,3865152,-1,0.0565173913043478},
-{2990571,3902618,3902462,-1,0.0464823529411765},
-{2990572,3878770,3879087,-1,-1},
-{2990573,3896755,3896773,0.00481714285714286,0.00495882352941177},
-{2990574,3896773,3896794,0.00676285714285714,0.00696176470588235},
-{2990575,3896090,3896091,0.0111724137931034,-1},
-{2990576,3896152,3896091,-1,0.04168},
-{2990577,3865251,3865370,0.0536,-1},
-{2990578,3865497,3865500,-1,0.01881},
-{2990579,3865499,3865563,0.0192218181818182,0.0199471698113208},
-{2990580,3865408,3865426,-1,0.0137333333333333},
-{2990581,3865426,3865496,-1,0.1472625},
-{2990582,3865500,3865426,-1,0.0207142857142857},
-{2990583,3865372,3865367,-1,0.00554634146341463},
-{2990584,3865426,3865372,-1,0.0215675675675676},
-{2990585,3865260,3865319,-1,0.0228418604651163},
-{2990586,3865319,3865327,-1,0.00547317073170732},
-{2990587,3865372,3865319,-1,0.0130727272727273},
-{2990588,3865319,3865293,-1,0.00778064516129032},
-{2990589,3865265,3865272,-1,0.00775714285714286},
-{2990590,3865272,3865278,-1,0.014055},
-{2990591,3865293,3865272,-1,0.00848571428571429},
-{2990592,3865362,3865392,0.0149414634146341,-1},
-{2990593,3865362,3865391,-1,0.0119586206896552},
-{2990594,3865327,3865365,-1,0.0126439024390244},
-{2990595,3865365,3865391,-1,0.0122093023255814},
-{2990596,3865367,3865365,-1,0.00560487804878049},
-{2990597,3865365,3865362,-1,0.0145105263157895},
-{2990598,3865362,3865355,-1,0.0289235294117647},
-{2990601,3896322,3896341,-1,0.114525},
-{2990609,3879251,3879740,0.20174347826087,0.220957142857143},
-{2990610,3879740,3879754,0.00767058823529412,0.00815},
-{2990611,3879799,3879855,0.0354413793103448,-1},
-{2990616,3902468,3902424,-1,0.024625},
-{2990617,3902424,3902377,-1,0.02335},
-{2990618,3902375,3902424,0.0209586206896552,-1},
-{2990619,3902424,3902462,0.014325,-1},
-{2990643,3879771,3879815,-1,0.0211833333333333},
-{2990645,3880333,3880497,-1,0.0759454545454546},
-{2990646,3881106,3881135,0.0143538461538462,-1},
-{2990647,3881135,3881469,0.151588235294118,-1},
-{2990648,3889060,3889459,0.117685714285714,0.12357},
-{2990649,3881175,3881412,0.223540540540541,-1},
-{2990650,3877242,3877575,0.0839853658536585,-1},
-{2990651,3877575,3877860,0.0758285714285714,-1},
-{2990652,3900296,3900136,0.197275471698113,-1},
-{2990653,3900136,3900008,0.139925,-1},
-{2990654,3900252,3900250,0.131443636363636,-1},
-{2990655,3885070,3884747,-1,0.272892857142857},
-{2990656,3884747,3884487,-1,0.190581818181818},
-{2990657,3904040,3906426,0.48816,-1},
-{2990659,3879959,3879682,-1,0.124516666666667},
-{2990660,3880367,3880329,-1,0.01640625},
-{2990661,3880329,3880032,-1,0.148236363636364},
-{2990662,3884455,3884566,-1,0.0363488372093023},
-{2990663,3884745,3885064,0.11184375,-1},
-{2990664,3885064,3885108,0.0174387096774194,-1},
-{2990665,3885188,3885127,0.0769448275862069,-1},
-{2990666,3865341,3865345,0.0516692307692308,-1},
-{2990667,3866646,3865827,-1,0.159502040816326},
-{2990668,3865370,3865376,-1,0.0337826086956522},
-{2990669,3865376,3865372,-1,0.021293023255814},
-{2990670,3865334,3865499,0.0697714285714286,0.0737207547169811},
-{2990671,3865518,3866037,-1,0.263762790697674},
-{2990675,3865152,3865147,-1,0.0816558139534884},
-{2990676,3865147,3865143,-1,0.0450473684210526},
-{2990677,3879746,3879803,0.0380454545454545,-1},
-{2990678,3902777,3902609,-1,0.0839818181818182},
-{2990679,3903956,3903486,-1,0.332425},
-{2990680,3903486,3902777,-1,0.231096},
-{2990693,3899707,3899678,0.0421463414634146,-1},
-{2990694,3898324,3897666,-1,0.229716},
-{2990695,3897666,3897215,-1,0.14446779661017},
-{2990696,3897215,3896258,-1,0.324894736842105},
-{2990697,3896258,3896128,-1,0.05275},
-{2990698,3895988,3895580,0.146755555555556,-1},
-{2990699,3895580,3895024,0.220835294117647,-1},
-{2990700,3895024,3894419,0.20592,-1},
-{2990701,3894419,3893890,0.18585,-1},
-{2990713,3878431,3878807,-1,0.19932},
-{2990714,3878807,3879279,-1,0.167135294117647},
-{2990715,3875989,3876854,0.302735294117647,-1},
-{2990716,3876854,3877242,0.119036842105263,-1},
-{2990782,3866303,3866962,0.241152,0.262121739130435},
-{2990786,3920209,3919762,0.188360377358491,-1},
-{2990787,3919762,3919068,0.316965714285714,-1},
-{2990788,3918999,3919494,0.237102857142857,-1},
-{2990789,3919808,3920411,0.292965,-1},
-{2990796,3919855,3919637,0.1200525,-1},
-{2990826,3881817,3882238,0.0791217391304348,-1},
-{2990827,3880539,3880747,0.0418615384615385,-1},
-{2990828,3880747,3882548,0.3396,-1},
-{2990829,3882659,3882851,-1,0.0275558823529412},
-{2990830,3882675,3882854,0.0256628571428571,-1},
-{2990848,3915752,3915866,0.0894774193548387,0.102733333333333},
-{2990849,3915866,3916589,0.276279069767442,0.282857142857143},
-{2990850,3917533,3917885,0.11654347826087,0.119133333333333},
-{2990851,3917885,3918119,0.0808883720930233,0.0828142857142857},
-{2990857,3908448,3908550,0.0216292682926829,0.0197066666666667},
-{2990858,3908550,3909963,0.289152,0.272784905660377},
-{2990859,3873683,3873677,0.123552,0.125221621621622},
-{2990860,3921479,3921931,0.0829475409836066,0.079059375},
-{2990861,3869593,3869856,0.352955555555556,0.352955555555556},
-{2990862,3869856,3870381,0.177377777777778,0.177377777777778},
-{2990863,3872757,3871965,0.160536842105263,0.160536842105263},
-{2990864,3871965,3871845,0.0192310344827586,0.0192310344827586},
-{2990865,3876213,3875732,0.406444444444444,0.406444444444444},
-{2990866,3876982,3876508,0.146163636363636,0.146163636363636},
-{2990867,3873221,3873066,0.153417391304348,-1},
-{2990868,3873066,3872746,0.45184,-1},
-{2990869,3872863,3872735,-1,0.230147368421053},
-{2990870,3872735,3872648,-1,0.07765},
-{2990871,3882668,3882656,-1,0.0380634146341463},
-{2990872,3879982,3880413,0.118944827586207,-1},
-{2990873,3879923,3880356,-1,0.135011538461538},
-{2990874,3879633,3879749,0.1128,-1},
-{2990875,3879749,3879088,0.276204,-1},
-{2990876,3879510,3879637,0.114290909090909,-1},
-{2990877,3879637,3879746,0.0776487804878049,-1},
-{2990878,3879803,3879845,0.0319021276595745,-1},
-{2990879,3879845,3879927,0.0683142857142857,-1},
-{2990880,3879566,3879722,-1,0.118954285714286},
-{2990881,3879722,3879809,-1,0.0631846153846154},
-{2990882,3879160,3879193,0.113546341463415,-1},
-{2990883,3879193,3879212,0.128010810810811,-1},
-{2990884,3878438,3878428,-1,0.0088304347826087},
-{2990885,3875923,3876014,0.0474230769230769,-1},
-{2990886,3878371,3878349,-1,0.0632847457627119},
-{2990887,3878349,3878278,-1,0.196067796610169},
-{2990888,3878347,3878324,0.223788679245283,-1},
-{2990889,3878324,3878320,0.0315,-1},
-{2990895,3878333,3878344,0.0651157894736842,-1},
-{2990896,3878344,3878347,0.181367441860465,-1},
-{2990897,3877047,3877153,0.106488888888889,-1},
-{2990898,3874152,3874069,0.0974204081632653,-1},
-{2990899,3874433,3874250,0.220105263157895,-1},
-{2990900,3874250,3874152,0.0978510638297872,-1},
-{2990901,3874807,3874731,-1,0.08601},
-{2990902,3874731,3874514,-1,0.2685},
-{2990903,3879226,3879401,-1,0.0528933333333333},
-{2990904,3879401,3879464,-1,0.0276},
-{2990905,3879619,3879676,-1,0.0819103448275862},
-{2990906,3879076,3879278,0.0465849056603774,-1},
-{2990907,3879278,3879419,0.0363509433962264,-1},
-{2990908,3878364,3878139,0.0705906976744186,-1},
-{2990909,3879711,3879519,-1,0.109422222222222},
-{2990910,3879519,3879445,-1,0.0334875},
-{2990911,3879761,3879581,0.145942857142857,-1},
-{2990912,3880676,3880454,-1,0.100624390243902},
-{2990913,3880454,3880204,-1,0.119368421052632},
-{2990914,3881043,3880738,0.125261538461538,-1},
-{2990915,3881830,3881320,0.187214634146341,-1},
-{2990916,3881320,3881043,0.104637209302326,-1},
-{2990917,3875297,3874836,0.124258823529412,-1},
-{2990918,3875796,3875742,-1,0.01653},
-{2990919,3875742,3875293,-1,0.17221935483871},
-{2990921,3870311,3870674,0.0720382978723404,-1},
-{2990922,3869574,3869566,0.063611320754717,-1},
-{2990923,3869566,3869540,0.0817615384615385,-1},
-{2990924,3869685,3869828,-1,0.4057375},
-{2990925,3869828,3869825,-1,0.0291574468085106},
-{2990926,3865628,3865054,0.168307692307692,-1},
-{2990927,3865054,3864874,0.07272,-1},
-{2990928,3865773,3865712,0.0140428571428571,-1},
-{2990929,3865712,3865628,0.0229609756097561,-1},
-{2990930,3865118,3864877,-1,0.0847818181818182},
-{2990931,3864877,3864708,-1,0.0522705882352941},
-{2990932,3865020,3864900,-1,0.0494275862068966},
-{2990933,3865103,3864900,0.116788235294118,-1},
-{2990934,3864900,3864872,0.021,0.01125},
-{2990935,3862165,3861969,-1,0.0698360655737705},
-{2990936,3862763,3862672,0.035025,-1},
-{2990937,3862672,3862475,0.0632285714285714,-1},
-{2990938,3862821,3862723,-1,0.0398163934426229},
-{2990939,3863138,3862821,-1,0.132551612903226},
-{2990940,3910759,3911354,0.39116,0.39116},
-{2990942,3875453,3875564,0.0313736842105263,-1},
-{2990943,3875501,3875429,0.11925,-1},
-{2990944,3875429,3875390,0.068025,-1},
-{2990945,3896545,3896700,0.150985714285714,0.150985714285714},
-{2990946,3896700,3896798,0.0767294117647059,0.0931714285714286},
-{2990947,3896707,3896700,0.446533333333333,0.446533333333333},
-{2990948,3875390,3874988,0.116386363636364,-1},
-{2990949,3874988,3874569,0.124843902439024,-1},
-{2990950,3874569,3874035,0.151271428571429,-1},
-{2990951,3875213,3875124,-1,0.100061538461538},
-{2990952,3875776,3875668,-1,0.256827272727273},
-{2990953,3875585,3875511,-1,0.110712},
-{2990954,3872671,3872323,0.0741130434782609,-1},
-{2990955,3872323,3872125,0.0480125,-1},
-{2990956,3872125,3871620,0.101338775510204,-1},
-{2990957,3871620,3871184,0.085908,-1},
-{2990958,3871651,3871219,-1,0.0999767441860465},
-{2990959,3871219,3870464,-1,0.180886363636364},
-{2990960,3878624,3878522,0.06134,-1},
-{2990961,3878522,3878334,0.131269565217391,-1},
-{2990962,3878430,3878268,-1,0.09834},
-{2990963,3878268,3878230,-1,0.0309333333333333},
-{2990964,3897579,3897609,-1,0.00718666666666667},
-{2990965,3897609,3897647,0.0220545454545455,-1},
-{2990966,3897647,3897670,0.0138166666666667,-1},
-{2990967,3867604,3866284,0.332386046511628,-1},
-{2990968,3866284,3866140,0.0351130434782609,-1},
-{2990969,3866247,3866082,-1,0.0425162790697674},
-{2990970,3866082,3866017,-1,0.0221692307692308},
-{2990971,3866161,3866340,-1,0.08775},
-{2990972,3866340,3866425,-1,0.041784},
-{2990973,3866283,3866348,0.0367222222222222,-1},
-{2990974,3866348,3866419,0.110444444444444,-1},
-{2990975,3866425,3866492,-1,0.118835294117647},
-{2990976,3866492,3866487,-1,0.0356653846153846},
-{2990977,3866419,3866413,0.0328641509433962,-1},
-{2990978,3866413,3866067,0.325934693877551,-1},
-{2990979,3896072,3896068,-1,0.0101769230769231},
-{2990980,3896072,3896053,-1,0.00915555555555556},
-{2990981,3895876,3895961,-1,0.0375692307692308},
-{2990982,3895961,3895974,-1,0.00441176470588235},
-{2990983,3896003,3895961,-1,0.0197454545454545},
-{2990984,3894631,3894618,-1,0.00777735849056604},
-{2990985,3895178,3895180,-1,0.145015384615385},
-{2990986,3894878,3894989,-1,0.07764},
-{2990993,3894848,3894756,0.0261673469387755,0.0261673469387755},
-{2990994,3894756,3894733,0.005364,0.005364},
-{2990995,3901000,3901293,0.105287671232877,-1},
-{2990998,3885187,3885106,0.135861538461538,-1},
-{2990999,3885106,3885060,0.0788666666666667,-1},
-{2991000,3885383,3885300,-1,0.243642857142857},
-{2991001,3885300,3885237,-1,0.16247027027027},
-{2991002,3885449,3885408,-1,0.131125714285714},
-{2991003,3885408,3885383,-1,0.0824294117647059},
-{2991004,3887312,3887350,-1,0.0142875},
-{2991005,3887350,3887412,-1,0.026725},
-{2991006,3891287,3891414,-1,0.03834},
-{2991007,3891414,3891772,-1,0.113061538461538},
-{2991008,3887041,3887147,0.0840954545454546,-1},
-{2991009,3887447,3887404,-1,0.00577714285714286},
-{2991010,3887477,3887561,-1,0.008821875},
-{2991012,3909029,3909914,0.172227692307692,0.167086567164179},
-{2991013,3909914,3910535,0.10512,0.103527272727273},
-{2991014,3888856,3888743,-1,0.0159085714285714},
-{2991015,3888743,3887447,-1,0.173256338028169},
-{2991016,3889738,3890294,-1,0.123545454545455},
-{2991017,3892497,3892168,-1,0.081276},
-{2991018,3892168,3891573,-1,0.135685714285714},
-{2991019,3892482,3893529,-1,0.328714285714286},
-{2991020,3893529,3895137,-1,0.422054237288136},
-{2991021,3885060,3885026,0.0380363636363636,-1},
-{2991022,3885026,3884978,0.04855,-1},
-{2991045,3883361,3883449,-1,0.0192724137931034},
-{2991046,3883430,3883504,0.0203236363636364,-1},
-{2991047,3884540,3884796,-1,0.262046153846154},
-{2991048,3883449,3883603,-1,0.0370821428571429},
-{2991049,3883603,3883843,-1,0.0635207547169811},
-{2991050,3884206,3884398,0.185053846153846,-1},
-{2991051,3883610,3884148,0.179657142857143,-1},
-{2991052,3884348,3884401,0.0198782608695652,-1},
-{2991065,3872930,3872807,0.0386322580645161,0.0544363636363636},
-{2991066,3870251,3870193,0.0212275862068966,0.0171},
-{2991067,3880104,3879977,-1,0.07333125},
-{2991068,3879977,3879855,-1,0.0642193548387097},
-{2991069,3889855,3889293,-1,0.102777049180328},
-{2991070,3854769,3854466,0.0859866666666667,0.117254545454545},
-{2991071,3869541,3869286,0.0552585365853659,-1},
-{2991151,3882851,3883947,-1,0.170434782608696},
-{2991152,3882854,3883941,0.164585915492958,-1},
-{2991153,3881432,3882192,0.185793103448276,-1},
-{2991154,3881411,3882161,-1,0.174531147540984},
-{2991155,3879053,3878408,-1,0.25427027027027},
-{2991156,3879017,3878377,0.347911111111111,-1},
-{2991157,3874383,3873464,0.290302702702703,0.261980487804878},
-{2991158,3873464,3873430,0.0132642857142857,0.0106114285714286},
-{2991164,3875412,3875299,0.0435705882352941,0.0423257142857143},
-{2991165,3875299,3874383,0.281553846153846,0.255362790697674},
-{2991166,3879420,3879718,-1,0.1135},
-{2991167,3876530,3877533,0.198747368421053,0.198747368421053},
-{2991168,3879675,3879740,0.0409384615384615,-1},
-{2991169,3882161,3883044,-1,0.200537704918033},
-{2991170,3882192,3883089,0.208706896551724,-1},
-{2991171,3895622,3895876,-1,0.138097959183673},
-{2991172,3895400,3895622,-1,0.13932},
-{2991173,3893688,3894066,0.11028,-1},
-{2991174,3894066,3894435,0.09285,-1},
-{2991175,3894435,3894689,0.0612967741935484,-1},
-{2991176,3900391,3900454,0.05049,-1},
-{2991177,3900454,3900597,0.09955,-1},
-{2991178,3900383,3900333,0.03942,-1},
-{2991179,3900333,3900248,0.0663076923076923,-1},
-{2991180,3900597,3900865,0.069264,-1},
-{2991181,3900865,3901198,0.0820690909090909,-1},
-{2991182,3899087,3899210,0.0269016393442623,-1},
-{2991183,3903122,3903369,-1,0.0605755102040816},
-{2991184,3902923,3903129,0.0464315789473684,-1},
-{2991185,3902482,3902923,0.0919578947368421,-1},
-{2991186,3902091,3902482,0.0820666666666667,-1},
-{2991187,3901198,3902091,0.19275,-1},
-{2991188,3881563,3881611,-1,0.0314545454545455},
-{2991189,3858246,3858172,0.00917045454545455,-1},
-{2991190,3858415,3858348,-1,0.00913695652173913},
-{2991191,3890859,3890913,-1,-1},
-{2991192,3890913,3891006,-1,-1},
-{2991193,3889707,3890069,-1,-1},
-{2991194,3890069,3890154,-1,-1},
-{2991195,3873536,3873951,0.0995739130434783,-1},
-{2991196,3874281,3875650,0.383347826086957,-1},
-{2991197,3873526,3873935,-1,0.0910408163265306},
-{2991198,3890491,3890776,0.118581818181818,-1},
-{2991214,3908585,3907691,0.238738775510204,0.238738775510204},
-{2991215,3907691,3907590,0.023952,0.0244408163265306},
-{2991216,3878993,3879010,-1,0.0902},
-{2991236,3903007,3903248,-1,0.0672},
-{2991237,3903248,3903541,-1,0.0757173913043478},
-{2991242,3881234,3881476,-1,0.226264864864865},
-{2991253,3872707,3872718,0.0880758620689655,-1},
-{2991254,3872718,3872716,0.0552486486486487,-1},
-{2991255,3872400,3872435,-1,0.035856},
-{2991256,3872086,3872362,-1,0.210136842105263},
-{2991257,3872362,3872400,-1,0.0293222222222222},
-{2991258,3874532,3872043,-1,0.444203389830508},
-{2991259,3865056,3865046,0.116157142857143,-1},
-{2991260,3865046,3865031,0.110869565217391,-1},
-{2991261,3865212,3865179,0.0586695652173913,-1},
-{2991262,3865179,3865109,0.0800790697674419,-1},
-{2991263,3865290,3865227,-1,0.0771681818181818},
-{2991264,3868213,3868143,-1,0.0181297297297297},
-{2991270,3897969,3898096,-1,0.0536042553191489},
-{2991271,3900073,3900099,-1,0.136188888888889},
-{2991272,3900099,3900114,-1,0.0707307692307692},
-{2991273,3867538,3867187,-1,0.0686490566037736},
-{2991274,3867187,3866765,-1,0.0778714285714286},
-{2991275,3866765,3866437,-1,0.0557052631578947},
-{2991276,3867928,3867687,-1,0.0454754716981132},
-{2991277,3867687,3867538,-1,0.0332884615384615},
-{2991278,3868567,3868236,0.0618222222222222,-1},
-{2991279,3868236,3867968,0.0469698113207547,-1},
-{2991280,3867890,3867763,0.04935,-1},
-{2991281,3867853,3868098,-1,0.409705263157895},
-{2991282,3869812,3869465,0.113648275862069,-1},
-{2991283,3869465,3869149,0.09408,-1},
-{2991284,3869814,3869787,0.0487609756097561,-1},
-{2991285,3869787,3869766,0.0162,-1},
-{2991286,3870464,3870117,-1,0.1316},
-{2991287,3870343,3870097,0.0777272727272727,-1},
-{2991288,3870097,3869879,0.0819692307692308,-1},
-{2991289,3865304,3865093,-1,0.0726514285714286},
-{2991290,3865093,3865048,-1,0.02378},
-{2991291,3865804,3865582,0.0458875,-1},
-{2991292,3865582,3865174,0.0963466666666667,-1},
-{2991293,3863783,3863563,0.0806095238095238,-1},
-{2991294,3864699,3864514,-1,0.0838},
-{2991295,3864529,3864376,0.0747875,-1},
-{2991296,3863983,3863616,-1,0.120845901639344},
-{2991297,3869038,3869107,-1,0.0490565217391304},
-{2991298,3866487,3866135,-1,0.308919230769231},
-{2991299,3866135,3866073,-1,0.0372244897959184},
-{2991300,3866659,3865766,0.193172727272727,-1},
-{2991301,3866996,3866843,0.029076,-1},
-{2991302,3866843,3866659,0.0368352941176471,-1},
-{2991303,3867395,3866996,0.078204,-1},
-{2991304,3864724,3864699,-1,0.0124761904761905},
-{2991305,3869766,3869563,0.162305882352941,-1},
-{2991306,3869563,3869452,0.0928384615384615,-1},
-{2991307,3860703,3860639,0.00973972602739726,-1},
-{2991308,3860639,3859838,0.143432,-1},
-{2991309,3860691,3860641,-1,0.00755844155844156},
-{2991310,3897345,3897382,0.00928636363636363,-1},
-{2991327,3881291,3881332,-1,0.0088448275862069},
-{2991328,3881332,3881411,-1,0.0193862068965517},
-{2991329,3881329,3881357,0.00797586206896552,-1},
-{2991330,3881357,3881432,0.019448275862069,-1},
-{2991331,3897568,3897588,0.0103548387096774,-1},
-{2991332,3897572,3897588,0.0127428571428571,-1},
-{2991341,3873283,3873544,-1,-1},
-{2991342,3868408,3868370,0.0131466666666667,0.0179272727272727},
-{2991343,3868370,3867404,0.305491304347826,0.351315},
-{2991344,3868742,3868667,-1,0.04584},
-{2991345,3868667,3867657,-1,0.505542857142857},
-{2991346,3868370,3868667,-1,0.295430769230769},
-{2991347,3868500,3868454,0.0120697674418605,0.016741935483871},
-{2991348,3868849,3868813,0.0273,0.0287368421052632},
-{2991349,3868813,3868742,0.0396705882352941,0.0306545454545455},
-{2991350,3868454,3868813,0.229058823529412,-1},
-{2991351,3869110,3868766,0.135864,0.178768421052632},
-{2991352,3868766,3868229,0.285821052631579,0.36204},
-{2991353,3869858,3870184,-1,-1},
-{2991354,3872930,3873093,0.098225,-1},
-{2991355,3873093,3873215,0.137218181818182,0.205827272727273},
-{2991356,3873093,3873179,0.0800666666666667,-1},
-{2991357,3872463,3872382,-1,0.0243290322580645},
-{2991358,3872382,3871914,-1,0.234233333333333},
-{2991359,3872098,3871942,-1,0.0579272727272727},
-{2991360,3871887,3872109,-1,0.12516},
-{2991361,3872098,3872109,-1,-1},
-{2991362,3872468,3872349,-1,0.0468272727272727},
-{2991363,3872349,3872098,-1,0.12474},
-{2991364,3872349,3872347,-1,-1},
-{2991365,3872109,3872347,-1,0.11583},
-{2991366,3872347,3872467,-1,0.0839368421052632},
-{2991367,3870404,3870409,0.1794,0.1794},
-{2991368,3870409,3870382,0.0263777777777778,0.0263777777777778},
-{2991369,3895931,3895895,-1,0.0146533333333333},
-{2991370,3896128,3896155,0.0139058823529412,-1},
-{2991371,3896155,3896217,0.03776,-1},
-{2991372,3872468,3872463,0.189083333333333,-1},
-{2991373,3872463,3872465,0.00686666666666667,-1},
-{2991374,3872465,3872469,0.00681666666666667,-1},
-{2991375,3872469,3872458,0.1283,-1},
-{2991376,3872469,3872331,0.0443555555555556,-1},
-{2991377,3872331,3871930,0.127241379310345,-1},
-{2991378,3896030,3895988,0.0145058823529412,-1},
-{2991393,3900424,3900700,-1,-1},
-{2991394,3900700,3900760,-1,-1},
-{2991395,3900769,3900762,-1,-1},
-{2991396,3900762,3900760,-1,-1},
-{2991397,3866920,3866857,-1,0.0199285714285714},
-{2991398,3872309,3872724,0.195,0.195},
-{2991399,3872724,3871955,0.316942105263158,0.316942105263158},
-{2991400,3872921,3872860,0.0239172413793103,0.0187459459459459},
-{2991401,3872860,3872317,0.195192857142857,0.18218},
-{2991402,3872724,3872860,-1,-1},
-{2991403,3867433,3867180,0.27308,-1},
-{2991404,3867180,3867239,0.113929411764706,-1},
-{2991405,3866857,3866823,-1,0.0139333333333333},
-{2991406,3866823,3866734,-1,0.0363230769230769},
-{2991407,3866420,3866538,0.0419571428571428,-1},
-{2991408,3870015,3869823,-1,-1},
-{2991409,3868127,3867847,-1,0.0838333333333333},
-{2991410,3867847,3867714,-1,0.0409588235294118},
-{2991411,3867890,3867847,0.0575428571428571,0.0464769230769231},
-{2991412,3867847,3867788,0.0433071428571429,-1},
-{2991413,3867788,3867714,-1,0.077544},
-{2991417,3876821,3876707,-1,0.0787333333333333},
-{2991418,3876707,3876345,0.258852631578947,0.258852631578947},
-{2991421,3878768,3878754,-1,-1},
-{2991422,3878754,3878714,-1,-1},
-{2991423,3879096,3878754,-1,-1},
-{2991424,3867034,3866875,-1,0.0678782608695652},
-{2991431,3866875,3867034,0.164022222222222,0.164022222222222},
-{2991432,3866875,3866784,-1,0.0393130434782609},
-{2991433,3866784,3866425,-1,0.149427272727273},
-{2991434,3867354,3867106,-1,0.138866666666667},
-{2991435,3867106,3867034,-1,0.0370636363636364},
-{2991436,3888064,3888278,0.229533333333333,0.229533333333333},
-{2991441,3865300,3864162,0.445427586206896,0.478422222222222},
-{2991442,3864162,3864018,0.0906461538461538,0.094272},
-{2991443,3864450,3864162,-1,-1},
-{2991448,3865993,3865949,0.0222452830188679,-1},
-{2991449,3865949,3865636,0.133488888888889,-1},
-{2991450,3865903,3865949,0.112305882352941,-1},
-{2991453,3880453,3880834,-1,0.233622222222222},
-{2991454,3862149,3861856,-1,-1},
-{2991460,3867239,3866945,-1,0.107979310344828},
-{2991461,3866945,3866920,-1,0.00996428571428572},
-{2991462,3867009,3866945,0.052925,-1},
-{2991463,3885501,3885566,0.0382941176470588,-1},
-{2991464,3877606,3877634,-1,0.0897428571428572},
-{2991465,3877606,3877741,0.0441375,0.0403542857142857},
-{2991466,3877741,3878091,0.10618125,0.10618125},
-{2991467,3877634,3877741,0.165,-1},
-{2991468,3868904,3868212,0.256044444444444,-1},
-{2991469,3868927,3868214,-1,0.563169230769231},
-{2991470,3862279,3862190,0.0388888888888889,0.0388888888888889},
-{2991471,3862851,3862511,0.1632,0.1632},
-{2991472,3862511,3862421,-1,-1},
-{2991473,3862421,3862279,-1,-1},
-{2991474,3881952,3881990,-1,-1},
-{2991475,3881281,3881952,-1,-1},
-{2991476,3884737,3884683,0.0797052631578947,0.0841333333333333},
-{2991477,3884584,3884745,0.0402,-1},
-{2991478,3884584,3884683,0.0792315789473684,-1},
-{2991479,3879502,3879296,0.200435294117647,0.1262},
-{2991480,3879296,3879220,0.07628,0.03814},
-{2991481,3879135,3879296,0.139633333333333,-1},
-{2991482,3879578,3879889,-1,-1},
-{2991483,3879889,3880246,-1,-1},
-{2991484,3884566,3884716,-1,0.0366},
-{2991485,3884716,3884953,-1,0.0599727272727273},
-{2991486,3863664,3863525,-1,-1},
-{2991487,3867716,3867683,0.0400173913043478,-1},
-{2991488,3867683,3867474,0.33906,-1},
-{2991497,3880971,3880913,0.03969375,-1},
-{2991498,3880913,3880545,0.334585714285714,-1},
-{2991499,3864497,3864470,0.0181826086956522,-1},
-{2991500,3880854,3880781,-1,0.0593117647058823},
-{2991506,3864511,3864417,0.0237285714285714,0.0243073170731707},
-{2991507,3864559,3864417,-1,-1},
-{2991522,3877789,3877691,0.11715,-1},
-{2991523,3877691,3877668,0.07164,-1},
-{2991526,3878799,3878033,-1,0.568930434782609},
-{2991527,3878033,3877881,-1,0.103527272727273},
-{2991528,3877766,3877871,0.0554608695652174,-1},
-{2991529,3877691,3877871,0.38124,-1},
-{2991530,3877871,3878033,0.35496,-1},
-{2991531,3881730,3881732,0.00755294117647059,-1},
-{2991532,3881710,3881722,0.00772941176470588,-1},
-{2991533,3881722,3881730,0.0188470588235294,-1},
-{2991534,3881722,3881634,-1,0.069408},
-{2991535,3881634,3881599,-1,0.23395},
-{2991536,3881475,3881461,0.0144,-1},
-{2991537,3881611,3881475,0.1048875,-1},
-{2991538,3881461,3881448,0.01176,-1},
-{2991539,3881448,3881436,0.010141935483871,-1},
-{2991540,3881436,3881393,0.03399375,-1},
-{2991541,3881393,3881385,0.00765454545454545,-1},
-{2991542,3881385,3881085,0.160290909090909,-1},
-{2991543,3881461,3881385,0.21594,-1},
-{2991544,3875774,3875608,-1,0.0793363636363636},
-{2991545,3875608,3874858,-1,0.27819375},
-{2991546,3875571,3875608,-1,-1},
-{2991547,3863836,3863698,0.0961756097560976,0.101107692307692},
-{2991548,3863698,3863691,0.04422,0.03685},
-{2991549,3863851,3863758,0.0284470588235294,0.0312},
-{2991550,3863758,3863691,0.03612,0.0387},
-{2991551,3863691,3863667,0.0123,0.00933103448275862},
-{2991552,3863667,3862713,0.334215789473684,0.295353488372093},
-{2991553,3881628,3881710,0.0560647058823529,-1},
-{2991567,3865052,3865056,0.0381767441860465,-1},
-{2991568,3865002,3865028,0.0601317073170732,-1},
-{2991569,3865028,3865052,0.0540585365853659,-1},
-{2991578,3865056,3865137,0.0334909090909091,-1},
-{2991579,3865137,3865175,0.00980769230769231,-1},
-{2991580,3865137,3865163,0.0178090909090909,-1},
-{2991583,3881127,3881159,0.0198555555555556,0.0223375},
-{2991584,3865161,3865190,0.00601578947368421,-1},
-{2991585,3865190,3865273,0.0256166666666667,-1},
-{2991586,3865190,3865163,-1,0.0183692307692308},
-{2991587,3880766,3880813,0.103377272727273,0.12635},
-{2991588,3881022,3880992,0.011151724137931,-1},
-{2991589,3880992,3880951,0.01538,-1},
-{2991590,3881028,3880183,-1,0.469486956521739},
-{2991591,3881028,3881127,-1,0.0591818181818182},
-{2991592,3881022,3880924,-1,0.0885},
-{2991593,3880924,3880813,-1,0.0462235294117647},
-{2991594,3880924,3881209,0.1292625,-1},
-{2991595,3881083,3881022,0.0256071428571429,-1},
-{2991596,3881063,3881022,-1,0.033036},
-{2991597,3881083,3881063,0.069288,-1},
-{2991598,3878624,3878762,-1,0.123245454545455},
-{2991599,3878762,3878884,-1,0.12018},
-{2991600,3878618,3878696,0.0435214285714286,-1},
-{2991601,3878762,3878696,0.085425,-1},
-{2991602,3878884,3879210,-1,0.208246153846154},
-{2991603,3879210,3879616,-1,0.186920930232558},
-{2991606,3864216,3864209,0.0546,0.0546},
-{2991607,3864209,3864206,-1,-1},
-{2991608,3864507,3864503,0.267545454545455,-1},
-{2991609,3864503,3864505,0.1784,-1},
-{2991610,3864778,3864774,-1,0.25616},
-{2991611,3864774,3864769,-1,0.0472714285714286},
-{2991612,3879452,3879472,0.02745,-1},
-{2991623,3878815,3878797,0.0104142857142857,0.01215},
-{2991624,3879510,3879472,-1,0.0318545454545455},
-{2991625,3879558,3879996,0.24033,-1},
-{2991626,3881276,3881468,-1,0.111954545454545},
-{2991627,3863763,3863322,0.9074625,0.392416216216216},
-{2991628,3864040,3863968,0.02338125,0.02494},
-{2991629,3863855,3863679,0.0547846153846154,-1},
-{2991644,3863679,3863605,0.0408882352941177,-1},
-{2991645,3863605,3863561,0.0159257142857143,0.02787},
-{2991651,3865670,3865045,0.265157142857143,0.285553846153846},
-{2991652,3865045,3864973,0.0455294117647059,0.048375},
-{2991653,3865096,3865045,0.0542,0.03252},
-{2991654,3869225,3869293,0.1837,0.239608695652174},
-{2991655,3869293,3869323,0.0385578947368421,0.0457875},
-{2991656,3869208,3869293,-1,-1},
-{2991657,3869139,3869191,0.190371428571429,0.183806896551724},
-{2991658,3869191,3868970,0.160869230769231,0.149378571428571},
-{2991659,3869208,3869191,-1,-1},
-{2991660,3866209,3865562,0.25132,0.269271428571429},
-{2991661,3865562,3865374,0.0810882352941177,-1},
-{2991662,3865191,3865373,0.0699846153846154,0.0718263157894737},
-{2991663,3865373,3865374,0.04795,0.04795},
-{2991664,3865562,3865373,0.117915789473684,0.0722709677419355},
-{2991665,3863845,3863600,0.141857142857143,-1},
-{2991666,3863600,3863475,-1,-1},
-{2991667,3863621,3863475,-1,0.0574344827586207},
-{2991668,3863600,3863621,0.0604173913043478,-1},
-{2991669,3857994,3858289,0.0801681818181818,0.0839857142857143},
-{2991670,3858289,3858538,0.0737875,0.0787066666666667},
-{2991671,3858538,3858574,0.0119875,0.0127866666666667},
-{2991672,3858574,3858619,0.0140125,0.0149466666666667},
-{2991673,3858289,3858574,0.44046,-1},
-{2991674,3879376,3879402,0.0165454545454545,0.0202222222222222},
-{2991675,3879402,3880021,0.350452941176471,0.350452941176471},
-{2991676,3879150,3879402,-1,0.152371428571429},
-{2991677,3858619,3858676,0.01775,0.0189333333333333},
-{2991678,3858676,3859048,0.10095652173913,0.110571428571429},
-{2991679,3859048,3859213,0.0718857142857143,0.0794526315789474},
-{2991680,3858676,3859048,0.49644,-1},
-{2991684,3862731,3862709,0.0348,-1},
-{2991685,3862709,3862264,0.348672,-1},
-{2991686,3862842,3862815,0.0335454545454546,0.0320869565217391},
-{2991687,3862815,3862428,0.254232,0.264825},
-{2991688,3862709,3862815,-1,0.0918521739130435},
-{2991722,3865227,3865305,-1,0.158412},
-{2991723,3863855,3863683,-1,0.155},
-{2991724,3863683,3863605,-1,0.08136},
-{2991725,3881543,3881536,0.0074625,-1},
-{2991729,3868143,3868088,-1,0.0158823529411765},
-{2991730,3868088,3867406,-1,0.249088888888889},
-{2991749,3881496,3881475,0.0145542857142857,-1},
-{2991751,3880898,3880951,-1,0.0538923076923077},
-{2991752,3880813,3880835,-1,0.0509023255813953},
-{2991753,3880835,3880898,-1,0.047553488372093},
-{2991780,3897382,3897577,0.0558837209302326,-1},
-{2991781,3897577,3897670,0.0240266666666667,-1},
-{2991786,3900330,3898857,1.43826666666667,1.43826666666667},
-{2991792,3915513,3915369,-1,0.030584},
-{2991793,3873488,3873541,0.524822222222222,0.545007692307692},
-{2991794,3870377,3869740,0.135072,-1},
-{2991795,3866073,3866003,-1,0.0292285714285714},
-{2991796,3866003,3865687,-1,0.141367346938776},
-{2991797,3875796,3875788,0.01285,-1},
-{2991798,3875788,3875783,0.01455,-1},
-{2991799,3875783,3875746,0.10415,-1},
-{2991802,3870978,3870315,-1,0.18219},
-{2991803,3870315,3870221,-1,0.0216},
-{2991804,3860844,3860796,-1,0.0296093023255814},
-{2991805,3860796,3860754,-1,0.018175},
-{2991806,3860665,3860796,0.0958421052631579,-1},
-{2991807,3864568,3864762,0.0862378378378378,0.113957142857143},
-{2991808,3864762,3864797,0.0191,0.02292},
-{2991809,3875120,3875110,0.0782190476190476,-1},
-{2991810,3875195,3875180,-1,0.0808819672131147},
-{2991811,3875120,3875195,0.0165529411764706,0.0165529411764706},
-{2991812,3875143,3875131,0.0681049180327869,-1},
-{2991813,3875131,3875120,0.0686761904761905,-1},
-{2991814,3875222,3875211,-1,0.0650262295081967},
-{2991815,3875211,3875195,-1,0.070672131147541},
-{2991835,3868708,3868721,0.0550444444444445,-1},
-{2991836,3868721,3868708,0.169911111111111,-1},
-{2991853,3867799,3867661,0.164448,0.152266666666667},
-{2991854,3867661,3867743,0.093564705882353,0.0611769230769231},
-{2991855,3867743,3867626,0.05225,0.05016},
-{2991856,3867626,3867194,0.190747826086957,0.175488},
-{2991857,3867661,3867626,0.0498222222222222,0.0498222222222222},
-{2991858,3868737,3868299,0.193745454545455,0.157866666666667},
-{2991859,3868299,3868204,0.037775,0.03022},
-{2991860,3868479,3868417,-1,-1},
-{2991861,3868417,3868204,0.284488888888889,0.284488888888889},
-{2991862,3869016,3868933,-1,-1},
-{2991863,3868933,3868737,0.2716,0.2716},
-{2991864,3871838,3871736,0.0414,0.0365294117647059},
-{2991865,3871736,3871179,0.221458064516129,0.236731034482759},
-{2991866,3865988,3865724,0.10711875,0.11426},
-{2991867,3866125,3865988,0.0374666666666667,0.04496},
-{2991868,3866282,3866484,0.0603103448275862,0.0603103448275862},
-{2991869,3865619,3866143,0.293155555555556,0.293155555555556},
-{2991870,3866125,3866169,0.0294888888888889,-1},
-{2991871,3866169,3866282,0.0384666666666667,-1},
-{2991872,3866129,3866169,0.0349333333333333,0.0349333333333333},
-{2991873,3866125,3866181,-1,0.0382},
-{2991874,3866181,3866282,-1,0.0658888888888889},
-{2991875,3866143,3866181,0.101333333333333,0.101333333333333},
-{2991881,3870135,3870004,0.0410129032258065,0.0438413793103448},
-{2991882,3870004,3869876,0.03356,0.0347172413793103},
-{2991883,3869876,3868557,0.42934,0.495392307692308},
-{2991884,3868557,3867807,0.2296125,0.272133333333333},
-{2991885,3868535,3868557,0.0367578947368421,0.0367578947368421},
-{2991886,3868535,3867760,0.273622222222222,0.273622222222222},
-{2991887,3870004,3869963,0.0412888888888889,0.0412888888888889},
-{2991888,3869963,3868535,0.661285714285714,0.69435},
-{2991889,3869963,3870372,0.173018181818182,0.181257142857143},
-{2991898,3871060,3870886,-1,0.09455},
-{2991899,3870886,3870894,0.0447652173913044,0.0447652173913044},
-{2991900,3871060,3870860,-1,0.0940857142857143},
-{2991901,3870860,3870828,0.01662,0.0151090909090909},
-{2991946,3887138,3887089,0.0258,-1},
-{2991947,3887089,3886522,0.356571428571429,-1},
-{2991948,3887184,3887138,0.0251612903225806,0.0251612903225806},
-{2991979,3851974,3851665,0.227066666666667,0.227066666666667},
-{2991980,3851665,3851517,-1,-1},
-{2991981,3854353,3854823,-1,-1},
-{2991987,3853003,3853167,0.132792857142857,0.161660869565217},
-{2991988,3854086,3853304,0.340285714285714,0.330833333333333},
-{2991989,3853307,3853272,0.0281793103448276,-1},
-{2991990,3853272,3853197,0.0284,-1},
-{2991991,3853197,3852293,0.346490909090909,0.38114},
-{2991992,3853172,3853197,-1,0.016575},
-{2992001,3850814,3851083,0.19075,0.176076923076923},
-{2992002,3864781,3864827,0.148927272727273,0.148927272727273},
-{2992003,3864740,3864827,0.14196,0.14196},
-{2992004,3864872,3864776,-1,-1},
-{2992005,3864776,3864740,-1,-1},
-{2992006,3864740,3864776,-1,-1},
-{2992016,3862454,3862360,0.0284142857142857,0.0306},
-{2992017,3862832,3862454,0.155732142857143,0.1938},
-{2992018,3862454,3862832,0.90144,-1},
-{2992028,3851226,3850578,0.26042,0.26042},
-{2992029,3850578,3850392,0.0716823529411765,0.0658702702702703},
-{2992030,3850559,3850392,0.0891724137931034,0.0891724137931034},
-{2992031,3850578,3850559,0.02868,0.02868},
-{2992032,3859084,3859594,0.333827586206897,0.312290322580645},
-{2992033,3859594,3859627,0.0290470588235294,0.0290470588235294},
-{2992034,3859213,3859594,0.238028571428571,0.24993},
-{2992035,3857718,3857682,0.0333714285714286,0.03504},
-{2992039,3857950,3858131,0.0803428571428572,0.0749866666666667},
-{2992040,3857734,3857950,0.0835565217391304,-1},
-{2992041,3857718,3857734,0.00503478260869565,0.00492765957446808},
-{2992042,3857734,3857950,-1,0.0814978723404255},
-{2992043,3851212,3851217,0.0143636363636364,0.0148125},
-{2992044,3851217,3851390,0.166577142857143,0.176672727272727},
-{2992045,3851986,3851246,0.2582625,0.236125714285714},
-{2992046,3851246,3851212,0.0132827586206897,0.0124258064516129},
-{2992047,3886005,3885990,-1,0.0215898305084746},
-{2992048,3850824,3851092,0.131976,0.157114285714286},
-{2992049,3851092,3851536,0.896678571428571,0.896678571428571},
-{2992050,3885991,3885945,-1,0.0181846153846154},
-{2992051,3885945,3885941,-1,0.0137678571428571},
-{2992052,3887096,3891202,1.06855609756098,-1},
-{2992053,3885941,3885988,-1,0.0284470588235294},
-{2992054,3885988,3886214,-1,0.11631},
-{2992055,3885949,3885982,-1,0.07054},
-{2992056,3885982,3885988,-1,0.07123},
-{2992057,3886214,3885982,0.143505882352941,-1},
-{2992058,3886214,3886553,-1,0.1315125},
-{2992059,3886317,3886555,0.0836666666666667,-1},
-{2992060,3886555,3887096,0.173336842105263,-1},
-{2992061,3886553,3886555,0.0563538461538462,0.0563538461538462},
-{2992062,3885951,3885441,0.379887804878049,0.362218604651163},
-{2992063,3885951,3885989,0.0329823529411765,0.0273512195121951},
-{2992066,3859200,3859178,0.0133333333333333,-1},
-{2992067,3859243,3859200,0.0242,0.0257612903225806},
-{2992068,3859243,3859274,0.022056,-1},
-{2992069,3859332,3859274,0.027325,0.0198727272727273},
-{2992070,3859274,3859200,0.0229241379310345,0.0214451612903226},
-{2992071,3862596,3863038,0.249244444444444,0.249244444444444},
-{2992072,3859485,3859390,0.1099,0.0799272727272727},
-{2992073,3864249,3864291,0.352285714285714,-1},
-{2992074,3864291,3864360,0.19325,0.19325},
-{2992075,3865256,3865244,0.00983684210526316,0.009345},
-{2992076,3859390,3859342,0.0656857142857143,0.0405705882352941},
-{2992077,3859342,3859243,0.1236,0.0811125},
-{2992078,3864708,3864701,-1,0.060888},
-{2992079,3865244,3864701,0.220177777777778,-1},
-{2992080,3859485,3859251,0.157416,0.2811},
-{2992081,3859342,3859251,0.6765,-1},
-{2992082,3865244,3865168,0.101720930232558,0.0994090909090909},
-{2992083,3865168,3865142,0.0250695652173913,0.024536170212766},
-{2992084,3864701,3864684,-1,0.0517777777777778},
-{2992085,3864684,3864472,-1,0.792884210526316},
-{2992087,3872572,3871918,-1,0.289390909090909},
-{2992088,3871918,3871805,0.0364384615384615,0.0364384615384615},
-{2992089,3856698,3855511,0.285612765957447,0.305086363636364},
-{2992090,3856928,3856698,0.052008,0.054175},
-{2992091,3857308,3857140,0.0397276595744681,0.0414933333333333},
-{2992092,3857140,3856928,0.0544125,0.0567782608695652},
-{2992093,3857631,3857308,0.08625,0.0880851063829787},
-{2992094,3871181,3871004,1.11756,-1},
-{2992095,3876657,3876803,0.14925652173913,-1},
-{2992096,3876188,3876569,-1,0.469246153846154},
-{2992097,3876569,3876693,-1,0.13451320754717},
-{2992112,3892093,3893118,0.692772413793103,-1},
-{2992113,3893118,3893119,0.0661826086956522,-1},
-{2992114,3878821,3878805,0.0114,0.0111673469387755},
-{2992115,3878805,3878732,0.0460875,0.0460875},
-{2992123,3869382,3869409,-1,0.303533333333333},
-{2992124,3869379,3869366,0.0818142857142857,0.0818142857142857},
-{2992125,3869366,3869382,0.42264,0.325107692307692},
-{2992127,3875211,3875131,0.0518625,0.0296357142857143},
-{2992135,3892959,3897728,1.91785454545455,1.91785454545455},
-{2992136,3892586,3892804,0.0750612244897959,0.0782553191489362},
-{2992137,3892804,3893621,0.650422222222222,0.399122727272727},
-{2992151,3869452,3869395,0.0214,0.0321},
-{2992152,3869395,3868902,0.1570875,0.193338461538462},
-{2992153,3884391,3884355,0.211227272727273,0.193625},
-{2992154,3884355,3884331,0.174128571428571,0.128305263157895},
-{2992155,3884783,3884355,0.168022222222222,0.168022222222222},
-{2992156,3883606,3884099,0.213475862068966,0.229288888888889},
-{2992157,3884099,3884210,0.0423636363636364,0.0388333333333333},
-{2992158,3884026,3883683,0.165995454545455,0.1739},
-{2992159,3883683,3883315,0.20674,0.167627027027027},
-{2992160,3883683,3883722,-1,-1},
-{2992161,3883722,3884099,-1,-1},
-{2992162,3883315,3883393,0.04212,0.0702},
-{2992163,3883393,3883606,0.100220689655172,0.2422},
-{2992164,3883393,3883722,0.228088888888889,0.228088888888889},
-{2992165,3883890,3883756,0.148414285714286,-1},
-{2992166,3883756,3883512,-1,-1},
-{2992167,3897728,3897774,0.0157272727272727,0.0157272727272727},
-{2992171,3883173,3883251,0.0707333333333333,0.079575},
-{2992172,3883251,3883290,0.0316588235294118,0.0299},
-{2992178,3879965,3879866,-1,-1},
-{2992179,3879242,3879188,-1,0.689576470588235},
-{2992180,3879188,3879179,0.0315142857142857,0.0315142857142857},
-{2992181,3879188,3879630,-1,-1},
-{2992182,3878491,3878394,0.120244444444444,0.120244444444444},
-{2992183,3885989,3886558,0.231227027027027,0.182029787234043},
-{2992184,3885589,3885250,0.268666666666667,0.268666666666667},
-{2992185,3885544,3885589,-1,0.0324413793103448},
-{2992187,3892736,3892849,0.0226133333333333,-1},
-{2992188,3892950,3892996,0.0126734693877551,-1},
-{2992189,3886553,3887094,-1,0.1694},
-{2992190,3887094,3887096,0.0261555555555556,0.0261555555555556},
-{2992191,3891202,3887094,1.2240972972973,-1},
-{2992192,3901257,3900985,0.1632,0.156672},
-{2992193,3900985,3900753,0.155769230769231,0.15},
-{2992194,3900546,3900985,-1,-1},
-{2992195,3893049,3893268,-1,0.0879073170731707},
-{2992196,3893268,3893723,-1,0.206333333333333},
-{2992203,3892996,3893688,0.220704,-1},
-{2992207,3885990,3885960,-1,0.0211358490566038},
-{2992208,3885960,3885945,-1,0.0593333333333333},
-{2992209,3885941,3885929,-1,0.0737389830508475},
-{2992210,3885929,3885949,-1,0.0692852459016393},
-{2992214,3891717,3891728,0.147327272727273,-1},
-{2992215,3891796,3892080,0.130991489361702,0.143176744186047},
-{2992216,3891717,3891796,-1,0.09748},
-{2992217,3862004,3861935,0.0451565217391304,0.043275},
-{2992218,3861935,3861511,0.230864516129032,0.230864516129032},
-{2992219,3861984,3861970,0.822882352941177,0.518111111111111},
-{2992220,3861970,3861925,0.03615,0.02892},
-{2992221,3884715,3884872,0.0461823529411765,0.0506516129032258},
-{2992222,3884872,3885015,0.04944375,0.0452057142857143},
-{2992223,3862432,3862185,0.124622222222222,0.124622222222222},
-{2992224,3862185,3861970,-1,-1},
-{2992225,3863081,3863024,0.04075,0.0514736842105263},
-{2992226,3863024,3862432,0.452953846153846,0.512034782608696},
-{2992227,3862185,3863024,0.521155555555556,0.521155555555556},
-{2992228,3884128,3883642,0.262168421052632,0.262168421052632},
-{2992235,3885942,3885950,0.0592243902439024,0.0592243902439024},
-{2992237,3885787,3885899,0.0397542857142857,0.0515333333333333},
-{2992238,3885899,3886015,0.0359,0.062825},
-{2992239,3885942,3885899,0.0416052631578947,0.0416052631578947},
-{2992240,3865168,3864684,0.176755555555556,0.176755555555556},
-{2992241,3886275,3886193,0.0369,0.0436090909090909},
-{2992242,3886193,3885950,0.0926222222222222,0.0961846153846154},
-{2992243,3886015,3886223,0.0609652173913044,0.09348},
-{2992244,3886223,3886275,0.01895,0.02274},
-{2992245,3886193,3886223,0.0595846153846154,0.0249870967741935},
-{2992246,3864827,3864860,0.0549942857142857,0.0469463414634146},
-{2992247,3864860,3864872,0.0472235294117647,0.0411692307692308},
-{2992248,3866294,3865108,-1,0.5301},
-{2992249,3865108,3865020,-1,0.023475},
-{2992250,3864860,3865020,0.0746888888888889,-1},
-{2992251,3866294,3866223,0.124747058823529,0.14138},
-{2992252,3867226,3866294,-1,0.236005263157895},
-{2992253,3867244,3866327,0.2919,-1},
-{2992254,3866327,3866305,0.00756428571428571,-1},
-{2992255,3877792,3877765,-1,0.057984},
-{2992256,3877713,3877681,0.0513724137931034,-1},
-{2992257,3877792,3877713,0.0372857142857143,0.0372857142857143},
-{2992258,3889899,3889960,-1,0.0431625},
-{2992259,3876014,3876178,0.0968842105263158,-1},
-{2992260,3876178,3876231,0.0218142857142857,-1},
-{2992261,3893108,3893126,0.0501157894736842,0.0501157894736842},
-{2992262,3876023,3876188,-1,0.05788125},
-{2992263,3876188,3876245,-1,0.0236307692307692},
-{2992264,3875305,3875349,-1,0.0405368421052632},
-{2992265,3874651,3875221,0.310036363636364,0.155018181818182},
-{2992266,3875221,3875305,0.0671,0.0345085714285714},
-{2992267,3875349,3875221,0.07788,-1},
-{2992268,3875270,3875398,0.153384905660377,-1},
-{2992269,3875398,3875415,0.0181153846153846,-1},
-{2992270,3875415,3875508,0.0287166666666667,0.0738428571428571},
-{2992271,3875398,3875508,0.04464375,-1},
-{2992272,3875415,3875439,0.0301466666666667,-1},
-{2992273,3875508,3875439,0.0628615384615385,-1},
-{2992274,3874768,3875290,-1,0.510059016393443},
-{2992275,3875290,3875305,-1,0.0174103448275862},
-{2992276,3874170,3874046,0.1382,0.1382},
-{2992277,3874351,3874220,0.0931821428571429,0.08697},
-{2992278,3874220,3874170,0.04005,0.0361741935483871},
-{2992279,3874046,3874220,-1,0.0834909090909091},
-{2992280,3874170,3874126,0.0361932203389831,0.0338952380952381},
-{2992281,3874046,3874126,0.111675,-1},
-{2992282,3868864,3868919,0.0318,0.053},
-{2992283,3868919,3868400,0.47826,0.47826},
-{2992284,3868919,3869012,0.133355555555556,0.133355555555556},
-{2992285,3890299,3890327,0.0213677419354839,0.0135183673469388},
-{2992286,3871636,3871819,0.0658153846153846,0.0900631578947368},
-{2992287,3871819,3872056,0.0550764705882353,0.0604064516129032},
-{2992288,3871665,3871636,0.0571621621621622,0.0503571428571429},
-{2992289,3871819,3871665,0.103915384615385,-1},
-{2992290,3863993,3864275,0.118723076923077,0.149361290322581},
-{2992291,3864275,3864315,0.0138769230769231,0.0200444444444444},
-{2992292,3866380,3866473,0.120434482758621,0.124735714285714},
-{2992293,3866473,3866502,0.202725,0.0600666666666667},
-{2992294,3865908,3866267,0.0635689655172414,0.0709038461538462},
-{2992295,3866267,3866502,0.0338896551724138,0.0378},
-{2992296,3866473,3866334,0.0526714285714286,-1},
-{2992297,3866334,3866267,0.0357230769230769,-1},
-{2992298,3890277,3890308,-1,0.0502173913043478},
-{2992299,3890180,3890308,0.129866666666667,-1},
-{2992300,3890299,3890408,-1,0.138728571428571},
-{2992301,3860754,3860818,0.053328,-1},
-{2992302,3860818,3860865,0.0274545454545455,-1},
-{2992303,3860758,3860772,0.118994117647059,0.109345945945946},
-{2992304,3860772,3860865,0.076875,-1},
-{2992305,3860818,3860772,0.0679548387096774,-1},
-{2992306,3857901,3857868,0.0123642857142857,0.0164857142857143},
-{2992307,3869366,3869382,0.43614,0.43614},
-{2992313,3889669,3890054,0.75396,0.75396},
-{2992314,3869694,3869778,-1,0.03084},
-{2992315,3869778,3870327,-1,0.180235714285714},
-{2992316,3869762,3869702,-1,0.166358823529412},
-{2992317,3869702,3869694,-1,0.0276529411764706},
-{2992318,3869778,3869702,0.0519923076923077,-1},
-{2992319,3869685,3869616,0.20631724137931,-1},
-{2992320,3869616,3869613,0.0224142857142857,-1},
-{2992321,3869613,3869547,0.0175875,-1},
-{2992322,3869547,3868439,0.259360975609756,-1},
-{2992323,3869616,3869547,0.0311111111111111,-1},
-{2992324,3869608,3869481,-1,0.04995},
-{2992325,3869481,3868428,-1,0.395353846153846},
-{2992326,3869693,3869777,0.0278785714285714,-1},
-{2992327,3869777,3870311,0.127863157894737,-1},
-{2992328,3871373,3871252,0.0354620689655172,0.0331741935483871},
-{2992329,3871252,3870844,0.115474285714286,0.112266666666667},
-{2992330,3870844,3870176,0.189981818181818,0.184394117647059},
-{2992331,3870176,3869896,0.191630769230769,0.113236363636364},
-{2992332,3867622,3867325,-1,0.170305263157895},
-{2992333,3867325,3867146,-1,0.0789789473684211},
-{2992334,3867633,3867245,0.114951219512195,-1},
-{2992335,3867245,3867093,0.0480473684210526,-1},
-{2992336,3867644,3867270,-1,0.112917073170732},
-{2992337,3867270,3867146,-1,0.03261},
-{2992338,3871252,3870840,-1,0.47976},
-{2992339,3870840,3870176,0.69906,-1},
-{2992340,3870844,3870840,0.07386,0.07386},
-{2992341,3865810,3865891,0.0503225806451613,0.0678260869565217},
-{2992342,3865891,3866147,0.342272727272727,0.332205882352941},
-{2992343,3865810,3865746,0.0265111111111111,0.0275307692307692},
-{2992344,3865891,3865746,-1,0.07107},
-{2992345,3865746,3865176,0.240760714285714,0.249677777777778},
-{2992346,3865176,3864980,0.0675333333333333,0.0688075471698113},
-{2992347,3878450,3878582,0.0593571428571429,-1},
-{2992348,3878582,3879613,0.324507692307692,0.308678048780488},
-{2992349,3878941,3878483,-1,0.198634615384615},
-{2992350,3878582,3878483,0.09585,-1},
-{2992351,3878910,3878429,0.213929411764706,-1},
-{2992352,3878429,3878280,0.100909090909091,-1},
-{2992353,3862797,3862633,0.156822222222222,0.156822222222222},
-{2992354,3862329,3862059,0.167466666666667,0.167466666666667},
-{2992355,3862738,3863097,0.202695652173913,0.2331},
-{2992356,3863097,3863036,0.0551111111111111,0.0551111111111111},
-{2992357,3863036,3862840,0.112244444444444,0.112244444444444},
-{2992358,3863036,3863304,0.162066666666667,0.162066666666667},
-{2992359,3862738,3862708,0.0225272727272727,0.0215478260869565},
-{2992360,3862708,3862329,0.21405,0.186130434782609},
-{2992361,3862708,3862818,0.112333333333333,0.112333333333333},
-{2992362,3862329,3861936,0.261884210526316,0.184288888888889},
-{2992363,3861936,3861469,0.353904,0.402163636363636},
-{2992364,3861936,3862033,0.110066666666667,0.110066666666667},
-{2992389,3852367,3850520,-1,0.711658064516129},
-{2992394,3852306,3852224,0.0253255813953488,0.02178},
-{2992401,3852224,3852076,0.054893023255814,0.047208},
-{2992402,3852224,3851987,-1,0.183317647058824},
-{2992403,3851987,3851122,0.455136,-1},
-{2992404,3851987,3852076,-1,0.05283},
-{2992407,3852076,3851362,0.498136363636364,0.273975},
-{2992415,3855066,3855404,-1,0.180874285714286},
-{2992416,3855404,3855547,-1,0.136476923076923},
-{2992417,3855547,3855450,0.048576,0.03795},
-{2992418,3855450,3855134,0.147367741935484,0.157531034482759},
-{2992419,3855404,3855450,-1,0.09417},
-{2992440,3856676,3857052,-1,0.18484},
-{2992441,3857052,3857114,-1,0.0328965517241379},
-{2992442,3858217,3857495,0.240016216216216,0.227707692307692},
-{2992443,3857495,3857402,0.0288954545454545,0.031785},
-{2992444,3859259,3858916,0.109030434782609,0.122326829268293},
-{2992445,3858916,3858787,0.0595571428571429,0.0641384615384615},
-{2992446,3858787,3858788,0.057219512195122,0.057219512195122},
-{2992447,3858916,3858788,0.46926,-1},
-{2992455,3872877,3873396,0.35144,-1},
-{2992483,3864432,3864304,0.04183125,0.0304227272727273},
-{2992484,3864304,3863815,0.214758620689655,0.1557},
-{2992487,3864432,3864553,0.139171428571429,0.171917647058824},
-{2992488,3864553,3864642,0.05823,0.05823},
-{2992489,3864304,3864553,0.106425,-1},
-{2992490,3865017,3864658,0.09105,0.0817591836734694},
-{2992491,3864658,3864432,0.073654054054054,0.0579829787234043},
-{2992492,3864553,3864658,0.131341935483871,-1},
-{2992511,3859839,3860413,0.269967567567568,0.32221935483871},
-{2992512,3860413,3860443,0.0159692307692308,0.0173},
-{2992513,3860443,3860393,0.0756,0.110492307692308},
-{2992514,3860443,3860583,0.0529538461538462,0.0573666666666667},
-{2992515,3860583,3861321,0.245370731707317,0.264742105263158},
-{2992516,3860393,3860459,-1,0.0474},
-{2992517,3860459,3860583,-1,0.056304},
-{2992523,3860524,3860327,0.0455411764705882,0.1106},
-{2992524,3860396,3859896,0.186286363636364,0.372572727272727},
-{2992528,3872340,3872588,0.0932888888888889,0.0932888888888889},
-{2992529,3872588,3872810,0.0795333333333333,0.0795333333333333},
-{2992530,3853972,3854069,0.07475,0.0381702127659574},
-{2992531,3854069,3854177,0.0670645161290323,0.0495},
-{2992532,3854069,3854005,0.0278842105263158,-1},
-{2992533,3873246,3873371,0.621244444444444,0.621244444444444},
-{2992534,3858926,3858706,-1,0.16608},
-{2992535,3858706,3858675,0.0118533333333333,0.0161636363636364},
-{2992536,3859178,3859115,0.0478894736842105,-1},
-{2992537,3859035,3858926,-1,0.0758210526315789},
-{2992538,3858994,3858929,0.02005,0.0515571428571429},
-{2992539,3858929,3857631,0.3732,0.41052},
-{2992540,3859035,3858929,0.0805578947368421,-1},
-{2992554,3871642,3871547,0.0316125,0.0316125},
-{2992555,3871547,3870915,0.212755555555556,-1},
-{2992556,3871482,3871524,0.0464042553191489,-1},
-{2992557,3871524,3871547,0.0381446808510638,-1},
-{2992558,3871648,3871524,-1,0.0795473684210526},
-{2992559,3871648,3871711,0.0368470588235294,0.0284727272727273},
-{2992560,3871711,3871880,0.075,0.0652173913043478},
-{2992561,3871642,3871711,0.0334636363636364,0.0334636363636364},
-{2992562,3871351,3871327,0.0259538461538462,0.0241},
-{2992563,3871051,3871363,0.157566666666667,0.113448},
-{2992564,3871363,3871485,0.0485181818181818,-1},
-{2992565,3871482,3871363,-1,0.250186046511628},
-{2992566,3903527,3903617,0.0604928571428571,0.05293125},
-{2992567,3903617,3903646,0.0118864864864865,0.0151655172413793},
-{2992568,3903646,3903821,0.0832941176470588,0.236},
-{2992569,3903821,3904043,0.0871783783783784,0.0896},
-{2992571,3871256,3871669,-1,-1},
-{2992572,3871632,3871669,0.0269869565217391,-1},
-{2992573,3900312,3900435,0.108991304347826,0.0677513513513514},
-{2992574,3900435,3900532,0.114388235294118,0.077784},
-{2992575,3899987,3900427,0.159466666666667,0.14352},
-{2992576,3900427,3900532,0.0448628571428571,0.0424378378378378},
-{2992577,3857984,3857281,0.181772727272727,0.190428571428571},
-{2992578,3857281,3857106,0.0400227272727273,0.0391333333333333},
-{2992579,3857090,3857281,0.159,0.0908571428571429},
-{2992580,3859399,3859592,0.378333333333333,0.378333333333333},
-{2992581,3894740,3894776,0.0389379310344828,0.045168},
-{2992582,3894776,3894782,0.0129375,0.0138},
-{2992583,3894669,3894776,0.0436588235294118,-1},
-{2992584,3894291,3894332,0.0617653846153846,0.0573535714285714},
-{2992585,3894473,3894291,0.102016216216216,-1},
-{2992586,3917419,3917496,0.0336444444444444,0.030793220338983},
-{2992587,3917419,3917368,0.0245842105263158,0.0359307692307692},
-{2992588,3917368,3917162,0.351476923076923,0.34269},
-{2992589,3917496,3917368,0.0430340425531915,-1},
-{2992590,3917394,3917419,0.0168339622641509,0.0168339622641509},
-{2992591,3917368,3917394,0.0450181818181818,-1},
-{2992592,3917183,3917243,0.032948275862069,0.0424666666666667},
-{2992593,3917243,3917394,0.403137931034483,0.403137931034483},
-{2992594,3917299,3917243,0.0799928571428571,-1},
-{2992595,3872178,3872872,0.5228,0.5228},
-{2992596,3872872,3872876,0.0225111111111111,0.0225111111111111},
-{2992597,3872502,3872876,-1,-1},
-{2992598,3870893,3870885,0.0249714285714286,0.0228},
-{2992599,3870885,3870527,-1,0.25588},
-{2992600,3870527,3870511,0.00937714285714286,0.00965294117647059},
-{2992601,3870527,3870885,-1,0.23326875},
-{2992603,3861680,3861542,-1,-1},
-{2992604,3861542,3861244,-1,-1},
-{2992612,3849715,3849345,0.230866666666667,0.230866666666667},
-{2992613,3849345,3849205,-1,-1},
-{2992614,3849809,3849628,0.113,0.113},
-{2992616,3849479,3849025,0.259869230769231,0.241307142857143},
-{2992619,3857938,3858895,0.401875862068966,0.38848},
-{2992620,3859085,3858889,0.10686,0.10686},
-{2992621,3858889,3857751,-1,0.637254545454545},
-{2992622,3858895,3858889,0.0449333333333333,0.0449333333333333},
-{2992623,3856463,3856454,0.0302285714285714,0.03174},
-{2992624,3856454,3856013,0.401424,0.401424},
-{2992625,3861638,3861584,0.02442,0.0271333333333333},
-{2992627,3863458,3863353,0.10928,0.16392},
-{2992628,3863353,3863487,0.0688666666666667,0.0688666666666667},
-{2992629,3863487,3863803,0.313377777777778,0.313377777777778},
-{2992630,3863458,3863487,0.113466666666667,0.113466666666667},
-{2992631,3852134,3852632,0.42009,0.336072},
-{2992632,3852632,3852675,0.04935,0.0448636363636364},
-{2992633,3863473,3863458,0.0292384615384615,0.0543},
-{2992634,3852855,3852837,0.0100971428571429,0.0114},
-{2992635,3852632,3852837,0.104507142857143,0.0943935483870968},
-{2992636,3854194,3854297,0.09681,0.0744692307692308},
-{2992637,3854297,3853762,0.442452631578947,0.431107692307692},
-{2992639,3862363,3862313,0.0728666666666667,0.0728666666666667},
-{2992640,3862313,3862300,0.0193555555555556,0.0193555555555556},
-{2992641,3862934,3862611,0.205581818181818,0.205581818181818},
-{2992642,3862611,3862363,0.204471428571429,0.204471428571429},
-{2992643,3862313,3862611,0.127822222222222,0.127822222222222},
-{2992644,3862730,3862601,0.68505,0.68505},
-{2992645,3862601,3862491,0.146,0.146},
-{2992646,3861614,3862601,0.445022222222222,0.445022222222222},
-{2992648,3865914,3864589,0.328296,0.321858823529412},
-{2992649,3864589,3864538,0.0194933333333333,0.0194933333333333},
-{2992653,3856253,3856021,0.0491739130434783,0.0526046511627907},
-{2992654,3856021,3854789,0.3518875,0.359374468085106},
-{2992655,3856530,3856261,0.163835294117647,-1},
-{2992656,3856261,3856253,0.0836625,-1},
-{2992657,3856021,3856261,0.192685714285714,0.192685714285714},
-{2992658,3859825,3859335,0.312866666666667,0.191986363636364},
-{2992659,3859335,3859344,0.110929411764706,-1},
-{2992660,3859110,3859335,0.10006875,0.168536842105263},
-{2992661,3861163,3861036,0.0711702127659574,0.0743333333333333},
-{2992662,3861584,3861262,0.122755102040816,0.130760869565217},
-{2992663,3861262,3861163,0.0293125,0.0305869565217391},
-{2992664,3871363,3871342,-1,0.0615724137931035},
-{2992678,3861163,3861584,0.79338,-1},
-{2992679,3871621,3871632,0.0194347826086957,-1},
-{2992685,3871700,3871408,-1,0.147776470588235},
-{2992686,3871408,3871334,-1,0.0265153846153846},
-{2992687,3871276,3871380,0.182925,-1},
-{2992688,3871380,3871615,0.4359,0.36325},
-{2992689,3871408,3871380,-1,0.19172},
-{2992690,3871334,3871276,-1,0.0202615384615385},
-{2992691,3871276,3871060,-1,0.0798923076923077},
-{2992692,3871700,3871729,0.05916,-1},
-{2992693,3871729,3871939,0.187706666666667,-1},
-{2992694,3871846,3871946,-1,0.0567866666666667},
-{2992724,3865000,3864901,0.127371428571429,-1},
-{2992741,3872707,3872628,0.05456,0.0355826086956522},
-{2992802,3907030,3908171,0.355240909090909,0.355240909090909},
-{2992803,3909507,3908411,0.316247058823529,0.288010714285714},
-{2992804,3908411,3908279,0.0663724137931034,0.0377411764705882},
-{2992805,3908188,3908411,-1,0.07063125},
-{2992808,3890400,3890404,0.180031578947368,0.126688888888889},
-{2992809,3890404,3890408,0.1449,0.06624},
-{2992844,3895130,3895072,0.039696,0.0522315789473684},
-{2992845,3895130,3895162,0.0317647058823529,-1},
-{2992846,3895072,3894553,0.253910526315789,0.275674285714286},
-{2992847,3894553,3894167,0.219,0.2263},
-{2992848,3919647,3919879,0.156181818181818,0.122714285714286},
-{2992849,3919459,3919476,-1,0.106392},
-{2992850,3919228,3919298,0.0974470588235294,0.0502},
-{2992851,3919647,3919626,-1,0.0327692307692308},
-{2992852,3858326,3858315,0.0147559322033898,0.0155464285714286},
-{2992853,3857983,3857959,0.0137225806451613,0.0146689655172414},
-{2992859,3919459,3919326,-1,0.0703862068965517},
-{2992860,3919326,3919298,0.0133542857142857,0.018696},
-{2992864,3919232,3919267,0.0286125,0.01308},
-{2992865,3919171,3919228,0.051912,0.0309},
-{2992866,3919232,3919171,0.109841379310345,-1},
-{2992867,3919298,3919376,0.0542285714285714,0.0392689655172414},
-{2992868,3919376,3919476,0.0371612903225806,0.0411428571428571},
-{2992869,3919228,3919376,0.0655161290322581,-1},
-{2992870,3873001,3873689,-1,0.169632558139535},
-{2992871,3873689,3873781,-1,0.0283941176470588},
-{2992872,3873923,3873810,0.208,-1},
-{2992873,3873810,3873781,0.05526,-1},
-{2992874,3873689,3873810,-1,0.0580888888888889},
-{2992875,3872987,3873646,0.2197875,-1},
-{2992876,3873646,3873763,0.06099,-1},
-{2992877,3873763,3873727,0.0511125,-1},
-{2992878,3873727,3873445,0.295479069767442,-1},
-{2992879,3873646,3873727,0.063375,-1},
-{2992884,3873852,3873805,-1,0.117733333333333},
-{2992885,3873805,3873506,-1,0.350245714285714},
-{2992886,3886427,3886332,-1,-1},
-{2992887,3886332,3886162,-1,-1},
-{2992888,3886427,3886523,0.0977076923076923,0.158775},
-{2992889,3886523,3886629,0.06924,0.0712764705882353},
-{2992896,3905124,3905863,0.235236,0.230623529411765},
-{2992897,3905863,3905991,0.043375,0.0424897959183674},
-{2992898,3903936,3905715,0.438346666666667,0.419693617021277},
-{2992899,3905715,3905991,0.108844444444444,0.0864352941176471},
-{2992900,3905863,3905715,0.1332,-1},
-{2992901,3905991,3906172,0.10416,0.16275},
-{2992902,3905991,3906171,0.0909428571428571,0.0909428571428571},
-{2992903,3906172,3906171,0.123728571428571,0.123728571428571},
-{2992911,3899695,3899718,0.0691764705882353,0.0712727272727273},
-{2992912,3899718,3899992,0.244028571428571,0.277005405405405},
-{2992913,3899623,3899718,0.0552,0.0966},
-{2992914,3878718,3878667,0.033075,0.0378},
-{2992915,3878722,3878718,0.005952,0.00676363636363636},
-{2992916,3878696,3878815,0.090768,-1},
-{2992921,3908279,3908215,0.0471,0.0334933333333333},
-{2992922,3908215,3907243,0.539692307692308,0.467733333333333},
-{2992923,3908171,3908215,0.0736125,-1},
-{2992924,3879996,3880029,0.0221806451612903,-1},
-{2992925,3880029,3880149,0.116269565217391,-1},
-{2992926,3880055,3880084,-1,0.0160390243902439},
-{2992927,3880084,3880206,-1,0.0850058823529412},
-{2992928,3880029,3880084,-1,0.0643875},
-{2992937,3880678,3880914,0.353060869565217,0.2537625},
-{2992938,3880914,3881082,0.105533333333333,0.0904571428571428},
-{2992939,3880902,3880943,0.02415,0.0173384615384615},
-{2992940,3880943,3881082,0.0713142857142857,0.0713142857142857},
-{2992941,3880914,3880943,-1,0.0786},
-{2992970,3887167,3887109,0.02,0.02},
-{2992971,3887109,3885331,0.6340125,0.67628},
-{2992973,3885331,3886209,0.5444,0.441405405405405},
-{2992974,3886067,3886209,0.215577777777778,0.253069565217391},
-{2992975,3881329,3881491,0.078,0.085609756097561},
-{2992976,3881491,3881589,0.0368769230769231,0.0661241379310345},
-{2992977,3881633,3881758,0.055668,-1},
-{2992982,3880413,3880542,0.0345052631578947,-1},
-{2992985,3881122,3880641,0.307333333333333,0.307333333333333},
-{2992986,3881014,3881122,0.0915555555555556,0.0915555555555556},
-{2992987,3881758,3881936,0.0854947368421053,-1},
-{2992988,3881936,3881949,0.00736271186440678,0.00775714285714286},
-{2992989,3880680,3880601,0.0211924528301887,-1},
-{2992990,3850939,3850774,0.0562645161290323,0.02907},
-{2992991,3850939,3850931,0.06915,0.113894117647059},
-{2992992,3850774,3850931,0.0817166666666667,-1},
-{2992993,3851512,3851038,0.117957446808511,0.126},
-{2992994,3851038,3850939,0.0330473684210526,0.0205868852459016},
-{2992995,3850925,3851038,0.101592857142857,-1},
-{2992996,3854873,3854805,0.018432,0.017388679245283},
-{2992997,3854652,3854764,0.0529885714285714,-1},
-{2992998,3854764,3854873,0.0607777777777778,-1},
-{2992999,3854805,3854745,0.015204,0.0143433962264151},
-{2993000,3854764,3854745,0.0681,-1},
-{2993009,3854648,3854643,0.0392470588235294,-1},
-{2993010,3854643,3854652,0.0360473684210526,-1},
-{2993035,3849037,3848853,0.0509333333333333,0.0528923076923077},
-{2993036,3848853,3848419,0.125556,0.1307875},
-{2993037,3848851,3848853,0.254444444444444,-1},
-{2993038,3849521,3849861,0.401752941176471,0.487842857142857},
-{2993039,3848910,3849101,0.306666666666667,0.306666666666667},
-{2993040,3849861,3850182,0.68193,0.568275},
-{2993043,3849147,3849101,0.0286,0.0286},
-{2993044,3874067,3874109,0.0186882352941176,0.0244384615384615},
-{2993045,3874254,3874109,0.0731478260869565,-1},
-{2993046,3874639,3874612,-1,0.0149853658536585},
-{2993047,3874556,3874542,0.0124875,-1},
-{2993048,3874639,3874556,0.0379894736842105,-1},
-{2993049,3874786,3874920,0.05236,0.0561},
-{2993050,3874920,3874999,0.0477818181818182,0.0553263157894737},
-{2993051,3875016,3874999,0.0610263157894737,-1},
-{2993052,3874920,3875016,-1,0.08666},
-{2993053,3875076,3875057,-1,0.041628},
-{2993054,3875057,3874936,-1,0.0952981132075472},
-{2993055,3875076,3875153,0.04572,0.0435428571428571},
-{2993056,3875153,3875808,1.50835714285714,1.45634482758621},
-{2993057,3875057,3875153,0.0827785714285714,-1},
-{2993058,3874999,3874987,0.0277636363636364,-1},
-{2993059,3874987,3874888,0.111294117647059,-1},
-{2993060,3874920,3874987,0.0554689655172414,-1},
-{2993061,3875087,3875076,-1,0.0351529411764706},
-{2993062,3875153,3875087,0.146657142857143,-1},
-{2993086,3848473,3848765,0.173844444444444,0.173844444444444},
-{2993087,3849889,3849920,0.0726176470588235,0.0685833333333333},
-{2993088,3849889,3850348,0.228688888888889,0.228688888888889},
-{2993089,3851556,3851716,0.0447375,0.0447375},
-{2993090,3852132,3852373,0.0989727272727273,0.101274418604651},
-{2993091,3851716,3851988,0.07845,-1},
-{2993092,3852104,3852103,-1,0.0158785714285714},
-{2993093,3852103,3852115,-1,0.072},
-{2993094,3852115,3852132,-1,0.0203142857142857},
-{2993095,3852103,3852137,0.0104816326530612,-1},
-{2993096,3852137,3852480,0.0720979591836735,-1},
-{2993097,3852115,3852137,0.076975,-1},
-{2993098,3852046,3852104,-1,0.0153230769230769},
-{2993099,3851988,3852045,0.0343333333333333,-1},
-{2993100,3851988,3852041,0.0110875,-1},
-{2993101,3852046,3852041,0.0186222222222222,-1},
-{2993102,3852041,3852045,0.0352222222222222,-1},
-{2993108,3851716,3851995,-1,0.0744418604651163},
-{2993109,3851995,3852046,-1,0.01329},
-{2993110,3852480,3852140,0.0644423076923077,-1},
-{2993111,3852140,3852104,0.010776,-1},
-{2993112,3852045,3852132,0.05605,-1},
-{2993139,3852753,3853235,0.179105882352941,0.160252631578947},
-{2993140,3853986,3853746,0.1203375,0.142622222222222},
-{2993141,3853746,3852373,1.3808,1.15066666666667},
-{2993145,3853514,3853746,-1,-1},
-{2993147,3852753,3853157,-1,-1},
-{2993148,3853157,3853514,-1,-1},
-{2993149,3853473,3853514,-1,-1},
-{2993150,3853157,3853473,-1,-1},
-{2993153,3858527,3858478,0.0533666666666667,0.0565058823529412},
-{2993154,3858478,3858107,0.261528,0.242155555555556},
-{2993155,3856976,3856893,0.0612315789473684,0.0612315789473684},
-{2993156,3856893,3856502,0.2747,0.253569230769231},
-{2993157,3856434,3856352,0.0349333333333333,0.0349333333333333},
-{2993158,3856352,3855876,-1,-1},
-{2993159,3857416,3857355,0.0486,0.0486},
-{2993160,3857355,3856840,0.461914285714286,0.461914285714286},
-{2993161,3857816,3857748,0.07136,0.07136},
-{2993162,3857748,3857269,0.264225,0.253656},
-{2993163,3857678,3858029,0.264733333333333,0.264733333333333},
-{2993164,3858029,3858101,0.0594,0.0594},
-{2993165,3856352,3856893,0.338616,0.338616},
-{2993166,3856893,3857355,0.3733,0.33597},
-{2993167,3857355,3857748,0.311368421052632,0.2958},
-{2993168,3857748,3858029,0.28232,0.28232},
-{2993169,3858029,3858478,-1,-1},
-{2993170,3856699,3856742,0.0216,0.0348},
-{2993171,3856742,3856768,0.113727272727273,0.139},
-{2993172,3856808,3856742,0.08628,0.0958666666666667},
-{2993194,3857868,3857777,0.0395612903225806,0.0681333333333333},
-{2993195,3857764,3857847,0.142872,-1},
-{2993196,3857847,3857868,0.0340736842105263,-1},
-{2993197,3857777,3857847,-1,0.04708},
-{2993198,3857764,3857792,-1,0.020025},
-{2993199,3857792,3857901,-1,0.120688888888889},
-{2993200,3858230,3858117,0.03912,-1},
-{2993201,3857792,3858077,-1,0.1371},
-{2993202,3857868,3857896,0.0208090909090909,-1},
-{2993203,3857896,3857952,0.041112,-1},
-{2993204,3858117,3858077,0.01562,-1},
-{2993205,3858077,3857901,0.10269,-1},
-{2993206,3857896,3858077,-1,0.0742181818181818},
-{2993228,3851959,3852484,0.0829217391304348,0.0880246153846154},
-{2993229,3853163,3852800,0.156345,0.156345},
-{2993230,3853094,3853163,0.0742333333333333,-1},
-{2993231,3853273,3853239,0.0414352941176471,0.0335428571428571},
-{2993232,3853239,3853163,0.05898,0.0561714285714286},
-{2993233,3853094,3853239,0.0635142857142857,-1},
-{2993234,3853239,3853290,0.0284307692307692,-1},
-{2993235,3853290,3853410,0.0383347826086957,-1},
-{2993236,3853163,3853290,0.048225,-1},
-{2993237,3853223,3853273,-1,0.0168117647058824},
-{2993238,3853469,3853324,0.0995555555555555,0.0672},
-{2993239,3853324,3853273,0.0566470588235294,0.0356666666666667},
-{2993240,3853223,3853324,-1,0.052095652173913},
-{2993241,3853273,3853367,-1,0.0331875},
-{2993242,3853367,3853410,-1,0.030192},
-{2993243,3853324,3853367,-1,0.0594857142857143},
-{2993246,3849782,3849689,0.0405846153846154,0.0416526315789474},
-{2993247,3849689,3849827,-1,-1},
-{2993248,3849827,3849860,0.0282230769230769,0.0333545454545455},
-{2993249,3849782,3849827,0.0548888888888889,0.0741},
-{2993250,3870038,3869510,-1,0.136268571428571},
-{2993251,3869510,3869449,0.0157111111111111,0.01414},
-{2993252,3871913,3871787,0.0552947368421053,0.0618},
-{2993253,3871787,3871456,-1,0.19832},
-{2993254,3870979,3870936,0.134431578947368,0.12771},
-{2993255,3869510,3870057,-1,0.14720625},
-{2993256,3870057,3870936,-1,0.186259090909091},
-{2993259,3858327,3858417,0.0491714285714286,-1},
-{2993260,3858450,3858417,0.0419785714285714,0.0452076923076923},
-{2993261,3858327,3858450,-1,0.06452},
-{2993262,3858417,3858406,0.0126526315789474,0.0136075471698113},
-{2993263,3858327,3858406,0.0549789473684211,-1},
-{2993301,3895757,3895452,0.13411914893617,0.131325},
-{2993302,3895452,3895407,0.018930612244898,0.0206133333333333},
-{2993305,3896235,3895920,0.222432,0.213876923076923},
-{2993307,3895452,3895920,0.342288,-1},
-{2993316,3888327,3887962,0.19795,-1},
-{2993334,3895014,3895085,0.033,0.0337674418604651},
-{2993335,3894798,3894813,0.0121111111111111,0.00883783783783784},
-{2993336,3894813,3895014,-1,0.1303},
-{2993337,3894813,3895014,0.118672727272727,-1},
-{2993338,3900789,3901140,-1,0.0880978723404255},
-{2993339,3901687,3901991,-1,0.0711652173913044},
-{2993423,3888736,3888806,0.0384,-1},
-{2993424,3888909,3888949,-1,0.0187636363636364},
-{2993435,3915102,3915173,0.140442857142857,0.0756230769230769},
-{2993436,3915173,3915357,0.0913846153846154,0.0678857142857143},
-{2993437,3915357,3915876,0.150643902439024,0.137253333333333},
-{2993438,3915102,3915357,0.1161375,-1},
-{2993455,3916905,3916657,0.284086956521739,-1},
-{2993465,3892782,3893021,0.102175,0.272466666666667},
-{2993466,3893021,3893815,0.402985714285714,0.451344},
-{2993467,3892960,3893021,0.1194,-1},
-{2993468,3892782,3892929,0.074544,0.07765},
-{2993469,3892929,3893546,0.377382352941176,0.40096875},
-{2993470,3893021,3892929,0.11106,-1},
-{2993480,3917340,3918265,-1,-1},
-{2993481,3917117,3917409,0.1494,0.118641176470588},
-{2993482,3917409,3917467,0.024216,0.0195290322580645},
-{2993514,3916594,3916574,0.00617333333333333,0.00661428571428571},
-{2993515,3916574,3916078,0.172330434782609,-1},
-{2993516,3916078,3916118,0.0364571428571429,0.0546857142857143},
-{2993517,3916118,3916398,0.202776923076923,0.202776923076923},
-{2993518,3916574,3916118,-1,0.188057142857143},
-{2993519,3915273,3915313,0.0459529411764706,0.048825},
-{2993520,3915313,3915616,0.199711111111111,0.199711111111111},
-{2993521,3914504,3914562,0.0276545454545455,0.0325928571428571},
-{2993522,3914562,3914787,0.0930307692307692,0.103662857142857},
-{2993523,3915313,3914562,-1,0.407127272727273},
-{2993524,3914562,3914115,-1,0.2672},
-{2993525,3914048,3914115,0.0444571428571429,0.0444571428571429},
-{2993526,3914115,3914381,0.3711,0.3711},
-{2993527,3900776,3901165,0.0883411764705882,-1},
-{2993528,3913425,3913491,0.0347181818181818,0.0363714285714286},
-{2993529,3913491,3913795,0.153275,0.167209090909091},
-{2993530,3914115,3913802,-1,0.0945627906976744},
-{2993531,3912673,3912749,-1,0.00978},
-{2993532,3913491,3913015,-1,0.160969230769231},
-{2993533,3912954,3913015,0.0350842105263158,0.026664},
-{2993540,3912621,3912665,0.00819428571428571,-1},
-{2993541,3912665,3913887,0.182005714285714,-1},
-{2993548,3889669,3889770,0.05733,0.04095},
-{2993577,3900925,3900957,0.0104780487804878,0.00914042553191489},
-{2993578,3900957,3901217,-1,0.0967531914893617},
-{2993579,3901628,3901280,0.24475,0.189483870967742},
-{2993580,3901280,3901217,0.04437,0.0268909090909091},
-{2993581,3900957,3901280,0.100591304347826,-1},
-{2993582,3901671,3901722,0.0465529411764706,0.0465529411764706},
-{2993583,3901722,3902081,-1,-1},
-{2993584,3901280,3901722,0.125649056603774,-1},
-{2993585,3902542,3902198,0.199915384615385,0.157509090909091},
-{2993586,3902198,3902140,0.06508,0.0443727272727273},
-{2993587,3901722,3902198,0.129047058823529,-1},
-{2993588,3904389,3904028,-1,0.152633333333333},
-{2993589,3904469,3904146,0.2418,-1},
-{2993590,3904028,3904146,0.0496344827586207,-1},
-{2993591,3905110,3904720,0.229254545454545,0.201744},
-{2993592,3904720,3904638,0.0541,0.0374538461538462},
-{2993593,3905663,3905357,0.205172727272727,0.205172727272727},
-{2993594,3905825,3905540,-1,-1},
-{2993595,3905540,3905793,0.072252,-1},
-{2993597,3853071,3853437,0.313333333333333,0.313333333333333},
-{2993598,3853437,3853882,0.618923076923077,0.618923076923077},
-{2993599,3852755,3853412,0.26448,0.26448},
-{2993600,3853412,3854202,0.387646153846154,0.359957142857143},
-{2993601,3853437,3853412,0.091776,0.0740129032258064},
-{2993602,3903336,3904028,0.3577,-1},
-{2993603,3903263,3903336,0.0514,0.0402260869565217},
-{2993604,3902140,3902634,-1,0.129952941176471},
-{2993605,3902634,3903263,-1,0.175311111111111},
-{2993606,3902198,3902686,0.127557692307692,-1},
-{2993607,3902686,3903336,0.176844444444444,-1},
-{2993608,3902634,3902686,0.0449368421052632,0.0656769230769231},
-{2993609,3903336,3903451,0.213541935483871,0.275825},
-{2993610,3903139,3903451,0.168444444444444,0.168444444444444},
-{2993611,3854371,3854107,-1,-1},
-{2993612,3854107,3853628,0.228866666666667,0.228866666666667},
-{2993613,3905357,3905475,0.035484,-1},
-{2993614,3905475,3905540,0.0187882352941177,-1},
-{2993615,3905414,3905475,0.0291642857142857,0.0371181818181818},
-{2993616,3854827,3854730,0.3192,0.3192},
-{2993617,3850093,3850172,0.0719727272727273,0.05655},
-{2993618,3850193,3850172,0.00773571428571429,0.0103142857142857},
-{2993619,3850193,3850254,0.0390285714285714,0.0292714285714286},
-{2993620,3850257,3850272,0.02744,0.0294},
-{2993621,3853251,3853228,0.0176068965517241,0.0196384615384615},
-{2993622,3853228,3852914,0.171490909090909,-1},
-{2993623,3852914,3852468,0.299571428571429,-1},
-{2993624,3852456,3852869,0.226825,-1},
-{2993625,3852869,3853228,0.189641379310345,-1},
-{2993626,3852914,3852869,0.0203485714285714,0.0203485714285714},
-{2993627,3864980,3864968,0.00591923076923077,0.00603529411764706},
-{2993628,3864968,3864824,0.0807428571428571,0.082425},
-{2993629,3865255,3865463,-1,0.250155555555556},
-{2993630,3865463,3865908,0.103624137931034,0.122657142857143},
-{2993631,3861213,3861312,0.0160971428571429,0.0165705882352941},
-{2993632,3862360,3862338,0.00608571428571429,0.00655384615384615},
-{2993633,3862338,3862276,-1,0.0246235294117647},
-{2993634,3862263,3862338,-1,0.01536},
-{2993635,3862276,3862263,0.04032,0.0448},
-{2993636,3862077,3862263,-1,0.0485357142857143},
-{2993647,3887287,3886988,0.1349625,0.208974193548387},
-{2993648,3886988,3886843,-1,0.0776153846153846},
-{2993649,3886671,3886934,0.140076923076923,0.117483870967742},
-{2993650,3886934,3887702,0.254715789473684,0.24198},
-{2993654,3886988,3886836,0.100755,-1},
-{2993655,3886836,3886934,0.124354838709677,-1},
-{2993656,3886843,3886836,0.0814714285714286,-1},
-{2993657,3887880,3887212,-1,0.635652631578947},
-{2993658,3887212,3887184,0.0199862068965517,0.0186967741935484},
-{2993659,3887880,3887948,0.0218275862068966,0.0234444444444444},
-{2993660,3887948,3888263,0.112954285714286,0.208073684210526},
-{2993661,3887212,3887948,-1,0.432878571428571},
-{2993704,3895072,3895162,0.0627,-1},
-{2993705,3893477,3893562,0.10665,0.1422},
-{2993706,3893562,3893836,0.275685714285714,0.257306666666667},
-{2993707,3893477,3893687,0.104090322580645,0.169831578947368},
-{2993708,3893687,3895900,0.598707692307692,0.610447058823529},
-{2993709,3893562,3893687,0.134504347826087,0.162821052631579},
-{2993716,3867362,3866738,0.558755555555556,0.50288},
-{2993717,3866738,3866493,0.23628,0.23628},
-{2993718,3874390,3874415,-1,0.0277071428571429},
-{2993719,3874415,3874650,-1,0.187903448275862},
-{2993720,3874415,3874650,0.416777777777778,0.416777777777778},
-{2993722,3906852,3906880,0.02166,0.0240666666666667},
-{2993723,3906876,3907692,0.217457142857143,0.22833},
-{2993724,3906852,3906789,-1,0.067425},
-{2993725,3906852,3906734,0.06909,-1},
-{2993726,3906596,3906625,0.01752,0.0181241379310345},
-{2993727,3906734,3906596,0.07428,-1},
-{2993728,3906625,3906648,0.0127783783783784,0.01576},
-{2993729,3906648,3907333,0.31728,0.453257142857143},
-{2993730,3906789,3906876,0.0240830769230769,0.02609},
-{2993731,3906648,3906789,0.0555384615384615,-1},
-{2993741,3874621,3874556,0.0398816326530612,-1},
-{2993742,3874556,3874481,0.04122,-1},
-{2993743,3874481,3874254,0.0890689655172414,-1},
-{2993744,3874621,3874481,0.0634545454545455,-1},
-{2993745,3873998,3873887,0.0392742857142857,0.06873},
-{2993746,3873998,3873972,-1,0.0367674418604651},
-{2993747,3873887,3873972,-1,0.06804375},
-{2993760,3874067,3874037,0.0354,-1},
-{2993761,3874037,3874058,0.224431034482759,-1},
-{2993764,3874109,3874235,0.0429315789473684,-1},
-{2993765,3874235,3874475,0.067365,-1},
-{2993766,3874936,3874686,-1,0.136442307692308},
-{2993767,3874686,3874639,-1,0.0416454545454545},
-{2993784,3901222,3901318,-1,0.192235714285714},
-{2993785,3901318,3901334,-1,0.043128},
-{2993799,3901250,3901169,0.0255090909090909,0.0290275862068965},
-{2993800,3901169,3901121,-1,0.074235},
-{2993801,3901169,3901225,0.0536653846153846,-1},
-{2993811,3901005,3901030,0.0402818181818182,0.0402818181818182},
-{2993812,3901250,3901271,-1,0.119535483870968},
-{2993813,3901225,3901271,0.0148947368421053,-1},
-{2993819,3901271,3901278,0.0107275862068965,0.0141409090909091},
-{2993820,3901278,3901283,0.00597931034482759,0.00770666666666667},
-{2993836,3901516,3901584,0.070110447761194,0.070110447761194},
-{2993837,3902213,3902445,0.266953846153846,0.2169},
-{2993838,3901329,3901921,0.4528,0.3396},
-{2993839,3901921,3901981,-1,0.0400588235294118},
-{2993840,3901921,3902213,0.19498064516129,-1},
-{2993847,3901584,3901814,0.224408955223881,-1},
-{2993848,3901814,3901921,0.0693545454545455,-1},
-{2993849,3901916,3901584,0.2464,-1},
-{2993850,3902213,3901981,0.198203225806452,-1},
-{2993851,3901981,3901916,0.0480184615384615,-1},
-{2993855,3903510,3903389,0.0626933333333333,0.0641181818181818},
-{2993856,3903389,3903234,0.0773581395348837,0.0792},
-{2993857,3903278,3903533,0.22743,0.22743},
-{2993858,3903533,3904127,0.4217,0.330026086956522},
-{2993859,3903389,3903533,0.170242105263158,0.154028571428571},
-{2993860,3867462,3867570,0.0760090909090909,0.0760090909090909},
-{2993861,3867570,3867810,0.291652173913043,0.291652173913043},
-{2993862,3867918,3867581,0.1997,0.1997},
-{2993863,3867581,3867462,0.0868,0.0868},
-{2993864,3867570,3867581,0.0349333333333333,0.0349333333333333},
-{2993865,3903976,3903950,0.0408214285714286,0.047625},
-{2993866,3903950,3903709,0.123135483870968,0.12724},
-{2993928,3880571,3880665,0.08245,0.0706714285714286},
-{2993929,3880665,3880751,0.0678642857142857,0.0575818181818182},
-{2993930,3880665,3880162,0.420533333333333,0.420533333333333},
-{2993934,3898330,3898303,0.0169384615384615,0.0231789473684211},
-{2993935,3898303,3898190,0.07575,0.101},
-{2993936,3898413,3898494,0.0364528301886792,-1},
-{2993937,3898303,3898494,0.0887739130434783,-1},
-{2993939,3898458,3898539,-1,0.0565666666666667},
-{2993950,3905676,3905267,0.207866666666667,0.207866666666667},
-{2993951,3904463,3904373,0.470977777777778,0.470977777777778},
-{2993952,3904373,3904468,0.093,0.093},
-{2993953,3892725,3892335,0.134128571428571,-1},
-{2993956,3905709,3906009,0.21725,0.21725},
-{2993957,3905539,3905798,0.103777777777778,0.103777777777778},
-{2993958,3905798,3906355,0.33009,0.33009},
-{2993963,3896556,3896666,0.11174693877551,0.114075},
-{2993964,3896666,3896682,0.01098,0.0114375},
-{2993968,3896238,3896461,-1,-1},
-{2993969,3896461,3896666,-1,-1},
-{2993970,3889601,3889989,0.343909090909091,-1},
-{2993971,3889148,3889344,0.168917647058824,0.130527272727273},
-{2993972,3889217,3889344,-1,0.0333136363636364},
-{2993973,3889344,3889601,-1,0.0676090909090909},
-{2993974,3890974,3891528,0.7206,0.526592307692308},
-{2993975,3890287,3890974,0.23412,-1},
-{2993976,3888120,3888353,0.141,-1},
-{2993977,3887088,3887261,0.0429804878048781,-1},
-{2993978,3888509,3889266,0.173059090909091,-1},
-{2993979,3885835,3886111,0.0628883720930233,-1},
-{2993980,3886467,3886721,0.226915384615385,0.453830769230769},
-{2993981,3886111,3886467,0.108405,-1},
-{2993982,3886467,3887088,0.19074,-1},
-{2993983,3886345,3886438,0.233290909090909,-1},
-{2993984,3886438,3887071,-1,0.173293333333333},
-{2993985,3887607,3887909,-1,-1},
-{2993986,3887909,3888050,-1,-1},
-{2993987,3888030,3888169,0.0524,0.0524},
-{2993988,3888030,3887871,-1,-1},
-{2993989,3887871,3887570,-1,-1},
-{2993990,3888169,3888216,0.0188222222222222,0.0188222222222222},
-{2993991,3883671,3883242,0.262637837837838,0.373753846153846},
-{2993992,3883706,3883275,0.154606451612903,-1},
-{2993993,3892725,3892778,-1,0.0127894736842105},
-{2993996,3883671,3883706,-1,0.0404275862068965},
-{2993997,3883766,3883820,0.0240230769230769,0.0231333333333333},
-{2993998,3883820,3884195,0.14358,0.253376470588235},
-{2994001,3883798,3883766,-1,0.03348},
-{2994002,3883820,3883798,0.0474,-1},
-{2994009,3889989,3890192,0.2786,-1},
-{2994010,3890192,3890226,0.0732428571428571,-1},
-{2994011,3889601,3890114,-1,0.13515},
-{2994031,3904315,3904398,0.0351490909090909,0.0364754716981132},
-{2994032,3904398,3904509,0.04512,0.049632},
-{2994033,3904305,3904398,0.07864,0.0453692307692308},
-{2994040,3917292,3917333,0.0423529411764706,-1},
-{2994041,3917333,3917319,0.00954705882352941,-1},
-{2994042,3875241,3875217,0.0141918367346939,-1},
-{2994043,3874470,3874931,0.1631625,0.326325},
-{2994044,3875030,3875217,-1,0.0529142857142857},
-{2994045,3875828,3875348,0.113315789473684,-1},
-{2994046,3875348,3875241,0.038316,-1},
-{2994047,3875177,3875143,0.107811111111111,-1},
-{2994048,3875869,3875433,-1,0.0979928571428571},
-{2994049,3875247,3875222,-1,0.102905454545455},
-{2994050,3875177,3875247,0.04173,-1},
-{2994051,3875247,3875433,0.59766,-1},
-{2994052,3875433,3875348,0.07808,-1},
-{2994053,3875241,3875030,0.06996,-1},
-{2994054,3875030,3874931,0.0288558139534884,-1},
-{2994055,3874931,3875072,0.06232,-1},
-{2994056,3875072,3875177,0.0832,-1},
-{2994057,3875278,3875261,-1,0.0069},
-{2994058,3875261,3875247,-1,0.0138588235294118},
-{2994059,3875072,3875196,0.0765789473684211,-1},
-{2994066,3875433,3875303,-1,0.0429576923076923},
-{2994067,3875303,3875278,-1,0.014556},
-{2994086,3917333,3917522,0.0623142857142857,-1},
-{2994087,3917522,3918367,0.223119230769231,-1},
-{2994096,3887514,3887964,0.1821,0.130071428571429},
-{2994097,3888353,3888439,0.0371414634146341,-1},
-{2994098,3888439,3888715,0.111146666666667,0.128246153846154},
-{2994099,3888150,3888703,-1,-1},
-{2994100,3888509,3888427,-1,-1},
-{2994101,3888284,3888509,0.0548048780487805,-1},
-{2994102,3887964,3888150,-1,0.0646666666666667},
-{2994103,3888150,3888223,-1,0.0323636363636364},
-{2994104,3888223,3888284,-1,0.039104347826087},
-{2994105,3888284,3888427,-1,0.2323125},
-{2994106,3888427,3888439,-1,0.0646666666666667},
-{2994107,3888091,3888120,0.0257225806451613,-1},
-{2994110,3873721,3873594,0.07107,0.0804566037735849},
-{2994112,3873305,3873411,0.0804537313432836,-1},
-{2994115,3883596,3883865,0.160533333333333,0.115584},
-{2994116,3883793,3883865,-1,0.31528},
-{2994117,3883865,3883887,-1,0.128414634146341},
-{2994119,3905973,3906025,0.143113043478261,0.10972},
-{2994120,3905088,3905630,0.312183333333333,-1},
-{2994121,3905630,3905751,0.09147,-1},
-{2994122,3905140,3905660,-1,0.277723076923077},
-{2994123,3905660,3905751,-1,0.0556545454545454},
-{2994132,3887071,3887232,-1,0.03744},
-{2994136,3900961,3900859,0.070775,0.0585724137931034},
-{2994137,3900604,3900200,0.2646,0.257448648648649},
-{2994138,3900653,3900666,0.0110526315789474,0.013125},
-{2994139,3887964,3888036,0.0640105263157895,-1},
-{2994140,3888036,3888091,0.07398,-1},
-{2994141,3888223,3888490,-1,0.0760764705882353},
-{2994142,3888490,3889217,-1,0.181245},
-{2994143,3900593,3900578,0.00640434782608696,0.0061375},
-{2994144,3900578,3900501,0.0419632653061225,0.0501512195121951},
-{2994145,3900610,3900578,-1,0.0282947368421053},
-{2994146,3900606,3900593,0.00730666666666667,0.00671020408163265},
-{2994147,3900859,3900681,0.18696,0.107861538461538},
-{2994148,3900653,3900604,0.0534461538461538,0.0496285714285714},
-{2994151,3900681,3900649,-1,0.0162},
-{2994152,3900649,3900610,-1,0.0231},
-{2994153,3900681,3900669,0.0372260869565217,0.0389181818181818},
-{2994154,3900669,3900653,0.01895,0.0197739130434783},
-{2994155,3900649,3900669,0.0424333333333333,-1},
-{2994158,3883766,3883741,-1,0.0176076923076923},
-{2994159,3883741,3883671,-1,0.0375130434782609},
-{2994160,3883766,3883731,0.00906666666666667,-1},
-{2994161,3883731,3883706,0.00991578947368421,-1},
-{2994163,3889620,3890152,0.2936,-1},
-{2994173,3892358,3892769,0.137473170731707,-1},
-{2994194,3890774,3890874,0.0637833333333333,0.15308},
-{2994195,3890874,3890951,0.054195,0.0802888888888889},
-{2994196,3890860,3890774,-1,0.0248093023255814},
-{2994197,3890874,3890860,0.0827793103448276,-1},
-{2994198,3890704,3890813,-1,0.0341675675675676},
-{2994199,3890813,3891579,-1,0.256215789473684},
-{2994210,3883865,3883891,-1,-1},
-{2994211,3883891,3883917,-1,-1},
-{2994214,3883480,3883991,0.237104347826087,0.18178},
-{2994215,3891206,3891355,0.0610390243902439,-1},
-{2994216,3891355,3891460,0.0748758620689655,-1},
-{2994217,3891460,3891562,0.0778333333333333,0.07005},
-{2994218,3891355,3891562,0.0630818181818182,-1},
-{2994219,3891562,3891746,0.0555913043478261,-1},
-{2994220,3891597,3891746,-1,0.080205},
-{2994221,3891562,3891597,0.0795157894736842,0.0487354838709677},
-{2994222,3891515,3891597,-1,0.04955},
-{2994223,3891515,3891757,0.122007692307692,0.109386206896552},
-{2994224,3891746,3891968,0.102216,0.102216},
-{2994225,3891968,3893008,0.557822222222222,0.568347169811321},
-{2994226,3891460,3891968,1.05222,1.05222},
-{2994227,3883991,3884014,0.02748,0.00947586206896552},
-{2994228,3884014,3884039,0.02418,0.00863571428571429},
-{2994229,3891206,3891360,-1,0.0695586206896552},
-{2994230,3891360,3891515,-1,0.07192},
-{2994231,3891230,3891360,0.131466666666667,0.131466666666667},
-{2994232,3883913,3883934,-1,0.1052125},
-{2994233,3883742,3883792,-1,0.287961290322581},
-{2994234,3883792,3883793,-1,0.0137375},
-{2994235,3895900,3895932,0.00971052631578948,0.00753061224489796},
-{2994236,3895932,3896591,0.163608,-1},
-{2994237,3896591,3897564,0.1908,-1},
-{2994238,3897564,3898228,0.117796721311475,0.133066666666667},
-{2994239,3895932,3896587,-1,0.151876363636364},
-{2994240,3896587,3897564,-1,0.20167868852459},
-{2994241,3883542,3884043,0.275115789473684,0.275115789473684},
-{2994242,3884096,3884043,0.318522580645161,-1},
-{2994243,3884043,3883991,0.375911111111111,-1},
-{2994244,3901647,3901770,0.1038,0.0481928571428571},
-{2994245,3901756,3901770,0.0347333333333333,0.02605},
-{2994246,3901647,3901756,-1,0.0550838709677419},
-{2994247,3901207,3901613,0.136909090909091,0.110195121951219},
-{2994248,3901613,3901647,0.0252,0.0118588235294118},
-{2994249,3901808,3901956,0.154764705882353,0.1754},
-{2994250,3884043,3884069,0.0137142857142857,0.0144},
-{2994251,3884069,3884106,0.0161428571428571,0.01695},
-{2994252,3884177,3884153,-1,-1},
-{2994257,3884128,3884130,0.18668275862069,-1},
-{2994258,3884130,3884096,0.150763636363636,-1},
-{2994259,3883845,3883808,-1,0.226545},
-{2994260,3883808,3883798,-1,0.0158307692307692},
-{2994261,3883706,3883726,-1,0.0340695652173913},
-{2994262,3883726,3883742,-1,0.0152454545454545},
-{2994263,3902336,3901578,0.579955555555556,0.579955555555556},
-{2994264,3902336,3902426,-1,0.07078125},
-{2994265,3902426,3902393,-1,0.067725},
-{2994277,3901435,3901525,0.275348571428571,-1},
-{2994278,3901493,3901503,0.01569375,0.0152181818181818},
-{2994279,3901525,3901508,0.0498222222222222,-1},
-{2994280,3901508,3901503,0.0567111111111111,-1},
-{2994281,3901416,3901449,-1,0.0138444444444444},
-{2994282,3901449,3901493,-1,0.0215793103448276},
-{2994283,3901508,3901449,0.0258,-1},
-{2994311,3912055,3912638,0.161106976744186,0.164942857142857},
-{2994312,3911427,3911913,0.259628571428571,0.259628571428571},
-{2994313,3911913,3912055,0.108176470588235,0.1149375},
-{2994314,3911979,3911650,-1,0.133508108108108},
-{2994315,3912055,3911979,0.02244,0.0236210526315789},
-{2994316,3911979,3911846,0.038295,-1},
-{2994317,3911315,3911611,0.243466666666667,0.230652631578947},
-{2994318,3911611,3911650,0.0582,0.0623571428571429},
-{2994319,3911846,3911611,0.0961028571428572,-1},
-{2994330,3857952,3858139,0.05844,-1},
-{2994331,3858139,3858737,0.141159183673469,-1},
-{2994332,3910308,3910609,0.0858127659574468,0.084025},
-{2994333,3910609,3910653,0.015306976744186,0.0137125},
-{2994334,3911611,3910609,0.501696,-1},
-{2994335,3904146,3904275,0.0512926829268293,-1},
-{2994336,3904275,3904720,0.135492,-1},
-{2994339,3904720,3904875,0.0421584905660377,-1},
-{2994340,3904875,3905357,0.141894339622642,-1},
-{2994350,3884107,3884148,-1,0.0312486486486486},
-{2994379,3870938,3870942,0.0774,0.06966},
-{2994381,3904777,3904625,0.222644444444444,0.222644444444444},
-{2994383,3884153,3884128,-1,-1},
-{2994384,3884208,3884177,-1,-1},
-{2994385,3872807,3872731,0.0206909090909091,0.02276},
-{2994386,3872731,3872701,0.00853333333333333,0.00903529411764706},
-{2994387,3870864,3870382,-1,-1},
-{2994388,3901975,3902036,0.0132615384615385,-1},
-{2994391,3902789,3902934,0.0286867924528302,-1},
-{2994393,3874905,3875155,0.12312,-1},
-{2994395,3894912,3894969,0.0320727272727273,-1},
-{2994396,3894956,3894969,-1,0.025175},
-{2994398,3878406,3878333,0.0201285714285714,0.0301928571428571},
-{2994399,3868904,3868927,0.0326228571428571,-1},
-{2994400,3878230,3878290,-1,0.0502137931034483},
-{2994402,3872435,3872346,-1,0.0408222222222222},
-{2994403,3858895,3859085,0.0651428571428571,0.0675555555555555},
-{2994404,3864470,3864463,0.0974857142857143,-1},
-{2994407,3875196,3875261,0.0423428571428571,-1},
-{2994408,3886299,3886466,0.22206,0.22206},
-{2994409,3886466,3886476,0.23574,0.23574},
-{2994410,3887443,3887457,0.18606,0.18606},
-{2994411,3886466,3887294,-1,-1},
-{2994412,3887294,3887457,-1,-1},
-{2994413,3886248,3887238,0.302738461538462,0.327966666666667},
-{2994414,3887238,3887418,0.0554756756756757,0.0488714285714286},
-{2994415,3887294,3887238,-1,-1},
-{2994416,3888841,3889095,0.0462888888888889,0.0480692307692308},
-{2994417,3887457,3888797,-1,-1},
-{2994418,3888797,3888786,-1,-1},
-{2994419,3882469,3882501,-1,-1},
-{2994420,3882501,3882881,-1,0.26193},
-{2994423,3900565,3900670,-1,0.0347230769230769},
-{2994425,3885988,3885991,-1,0.0144305084745763},
-{2994426,3869267,3869196,0.0143555555555556,-1},
-{2994427,3869279,3869216,-1,0.01756},
-{2994428,3873091,3872978,-1,0.02908},
-{2994429,3873217,3873108,0.0267782608695652,-1},
-{2994430,3876231,3876245,0.016275,-1},
-{2994431,3876178,3876188,-1,0.015588},
-{2994432,3878079,3878066,0.019425,-1},
-{2994433,3878162,3878150,-1,0.0166978723404255},
-{2994434,3852041,3852103,0.0126122448979592,-1},
-{2994435,3875217,3875196,0.009775,-1},
-{2994436,3875196,3875177,0.012734693877551,-1},
-{2994438,3904028,3903956,-1,0.0327},
-{2994439,3904146,3904066,0.0362516129032258,-1},
-{2994444,3885248,3885372,0.0362057142857143,-1},
-{2994445,3892945,3893049,-1,0.0310266666666667},
-{2994446,3900506,3900597,0.0304565217391304,-1},
-{2994447,3892849,3892950,0.0247659574468085,-1},
-{2994448,3888091,3888223,-1,0.0345},
-{2994449,3888120,3888284,0.0425692307692308,-1},
-{2994450,3885253,3885345,-1,0.0252585365853659},
-{3014035,3891449,3891796,0.16048,0.138876923076923},
-{3014036,3891310,3891717,0.27231724137931,0.376057142857143},
-{3014039,3915615,3915646,-1,0.02604},
-{3014040,3915646,3915721,-1,0.0398608695652174},
-{3014041,3915287,3915176,0.0660222222222222,0.0660222222222222},
-{3014042,3915224,3915615,-1,0.167258823529412},
-{3014043,3915287,3915224,0.1119375,-1},
-{3014044,3915646,3915619,0.0267461538461538,-1},
-{3014131,3886587,3886700,0.1491,0.156947368421053},
-{3014132,3915619,3915287,0.279473684210526,-1},
-{3014139,3886737,3886784,0.07782,0.07782},
-{3014140,3886587,3887275,0.434318181818182,0.415434782608696},
-{3014141,3887275,3887109,0.2371,0.218861538461538},
-{3014142,3887275,3887507,0.149444444444444,0.149444444444444},
-{3014143,3902634,3902496,0.0788888888888889,0.0788888888888889},
-{3014969,3847751,3847735,0.2982,0.2982},
-{3014970,3848117,3848096,0.259577777777778,0.259577777777778},
-{3014986,3853318,3853473,-1,-1},
-{3015067,3854520,3854256,0.174969230769231,0.168488888888889},
-{3015068,3854256,3854240,0.0121111111111111,0.0112758620689655},
-{3015069,3854202,3853944,0.387860869565217,0.356832},
-{3015070,3853944,3853882,0.12012,0.1092},
-{3015071,3854282,3854041,0.24492,0.233257142857143},
-{3015072,3854041,3853990,0.0797076923076923,0.0609529411764706},
-{3015073,3853990,3853899,0.0577826086956522,0.055375},
-{3015074,3853944,3853990,0.0754,0.05655},
-{3015084,3859150,3856982,1.02944444444444,1.02944444444444},
-{3015085,3856982,3856808,0.165371428571429,0.157854545454545},
-{3015102,3876121,3875862,0.5841,0.676326315789474},
-{3015380,3883054,3883650,0.464223529411765,0.464223529411765},
-{3015480,3886784,3887208,1.1694,1.1694},
-{3015481,3887208,3886784,1.6302,1.6302},
-{3015750,3849212,3848433,0.370883333333333,0.351363157894737},
-{3015756,3888915,3888872,0.0169615384615385,0.018375},
-{3015757,3865463,3865318,-1,0.127748275862069},
-{3015758,3865318,3865279,-1,0.0280392857142857},
-{3015759,3865255,3865318,-1,0.0271428571428571},
-{3015760,3888665,3888850,-1,0.0946071428571429},
-{3015801,3877798,3877709,-1,0.996138461538462},
-{3015894,3849849,3849889,0.1499625,0.145418181818182},
-{3015895,3850172,3849999,0.112704,0.122504347826087},
-{3015896,3849999,3849844,0.09745,0.09745},
-{3015897,3849849,3849999,0.23196,0.23196},
-{3015926,3850257,3850254,0.00809032258064516,0.00836},
-{3015930,3848675,3848473,0.227688888888889,0.227688888888889},
-{3015973,3875312,3875228,-1,0.117692307692308},
-{3015974,3875228,3875213,-1,0.0218857142857143},
-{3015975,3887059,3885943,-1,0.187697142857143},
-{3015976,3885943,3885679,-1,0.0365828571428571},
-{3016009,3891623,3891760,0.0938896551724138,0.0878322580645161},
-{3016212,3864222,3864236,0.0251333333333333,0.0357157894736842},
-{3016249,3860665,3860628,0.0562166666666667,-1},
-{3016250,3860628,3860622,0.0191842105263158,-1},
-{3016251,3860628,3860754,-1,0.0967285714285714},
-{3016289,3848797,3848851,0.22674,0.22674},
-{3016290,3848869,3848910,0.0924,0.0924},
-{3016293,3848830,3848869,0.0792222222222222,0.0792222222222222},
-{3016294,3848670,3848830,0.157933333333333,0.157933333333333},
-{3016297,3848705,3848792,0.0494,0.0494},
-{3016298,3848792,3848830,0.0559111111111111,0.0559111111111111},
-{3016299,3848792,3848797,0.22176,0.22176},
-{3016348,3900103,3900128,0.0212769230769231,-1},
-{3016456,3868552,3868585,-1,0.0251307692307692},
-{3016457,3868585,3868967,-1,0.227030769230769},
-{3016577,3887239,3887327,-1,0.01488},
-{3016578,3887327,3887477,-1,0.0249230769230769},
-{3016579,3887404,3887366,-1,0.00679714285714286},
-{3016580,3887366,3887312,-1,0.00823714285714286},
-{3016595,3894969,3895005,-1,0.0258285714285714},
-{3016596,3866123,3866170,-1,0.0169371428571429},
-{3016597,3866170,3866208,-1,0.0103885714285714},
-{3016762,3864204,3864270,0.105252631578947,0.0571371428571429},
-{3016763,3864270,3864310,0.0397285714285714,0.0347625},
-{3016769,3864753,3864696,0.0164647058823529,-1},
-{3017032,3850017,3850353,0.102326086956522,0.112071428571429},
-{3017033,3850634,3850663,0.00898235294117647,0.00954375},
-{3017034,3850663,3850814,0.0504352941176471,0.0553161290322581},
-{3017096,3852648,3853016,0.266288888888889,0.266288888888889},
-{3017097,3853016,3853692,0.377044444444444,0.377044444444444},
-{3017098,3853692,3853293,0.190240909090909,0.186013333333333},
-{3017099,3853293,3852629,0.238346666666667,0.238346666666667},
-{3017100,3853016,3853293,-1,-1},
-{3017106,3851989,3852613,0.37435,0.408381818181818},
-{3017107,3852613,3852633,0.0206,0.02124375},
-{3017113,3852613,3852528,-1,-1},
-{3017123,3853853,3853368,-1,-1},
-{3017125,3853417,3853368,0.0792,0.0792},
-{3017142,3854228,3854102,0.245123076923077,0.245123076923077},
-{3017143,3854102,3853916,0.258133333333333,0.258133333333333},
-{3017144,3854586,3854228,0.155742857142857,0.167723076923077},
-{3017145,3854228,3854155,0.03056,0.036672},
-{3017148,3854838,3854857,0.201177777777778,0.201177777777778},
-{3017149,3855160,3854838,-1,-1},
-{3017150,3854838,3854267,-1,-1},
-{3017182,3852393,3852637,0.14655,0.154263157894737},
-{3017183,3852637,3852558,0.0918666666666667,0.0918666666666667},
-{3017184,3852907,3852578,0.1725,0.20125},
-{3017185,3852578,3852219,0.210744,0.210744},
-{3017186,3855946,3855663,0.199133333333333,0.199133333333333},
-{3017187,3855663,3855614,0.0423777777777778,0.0423777777777778},
-{3017188,3854717,3854818,0.283992857142857,0.283992857142857},
-{3017190,3855663,3855198,-1,-1},
-{3017191,3855198,3854818,-1,-1},
-{3017192,3855296,3855194,0.09925,0.0882222222222222},
-{3017193,3855194,3855186,0.0212769230769231,0.0190758620689655},
-{3017194,3855186,3855660,0.268722580645161,0.260325},
-{3017213,3899136,3899054,0.0188571428571429,0.0203076923076923},
-{3017214,3899054,3898678,0.106492682926829,0.103957142857143},
-{3017215,3899226,3898721,0.212378571428571,-1},
-{3017307,3854316,3854504,0.145111111111111,0.145111111111111},
-{3017311,3854504,3854231,0.121622222222222,0.121622222222222},
-{3017317,3857090,3857106,0.164815384615385,-1},
-{3017322,3858587,3857779,0.308290909090909,0.322971428571429},
-{3017323,3857779,3857510,0.06531,0.06531},
-{3017324,3858742,3857956,0.30484,0.295006451612903},
-{3017325,3857956,3856809,0.417064285714286,0.417064285714286},
-{3017326,3857779,3857956,-1,-1},
-{3017332,3853167,3853172,-1,0.053},
-{3017333,3853307,3853304,-1,0.0104275862068966},
-{3017334,3853304,3853167,-1,0.06604},
-{3017639,3864686,3865008,0.391285714285714,0.148054054054054},
-{3017815,3895201,3895260,0.0302428571428571,-1},
-{3017816,3895260,3895285,0.0128863636363636,-1},
-{3017817,3895285,3895327,0.0214636363636364,-1},
-{3018024,3893119,3893536,0.166388571428571,0.142039024390244},
-{3018025,3893536,3893621,0.0371828571428571,0.04066875},
-{3018026,3893536,3893623,-1,0.162514285714286},
-{3018027,3906025,3905762,0.131377777777778,0.12231724137931},
-{3018028,3905762,3906596,0.527876470588235,0.527876470588235},
-{3018029,3905762,3904793,0.553116279069767,0.609846153846154},
-{3018039,3854095,3853165,-1,0.536958620689655},
-{3018040,3853972,3853069,0.30174,0.486677419354839},
-{3018041,3853069,3852367,0.199376470588235,0.221047826086957},
-{3018042,3853165,3853069,-1,0.106114285714286},
-{3018043,3853165,3853234,0.0433333333333333,0.0433333333333333},
-{3018132,3853086,3852457,0.569111111111111,0.569111111111111},
-{3018133,3852457,3852430,0.0300666666666667,0.0300666666666667},
-{3018134,3855660,3855708,-1,-1},
-{3018135,3855345,3855572,-1,-1},
-{3018136,3855761,3855743,-1,0.49984},
-{3018137,3856428,3856870,0.58536,0.509008695652174},
-{3018138,3856870,3857120,0.086341935483871,0.086341935483871},
-{3018139,3856515,3856446,0.179664,0.21910243902439},
-{3018140,3856446,3856428,0.207976744186047,0.218121951219512},
-{3018141,3855795,3856446,-1,-1},
-{3018142,3856446,3856870,-1,-1},
-{3018148,3851476,3852150,0.400105263157895,0.475125},
-{3018149,3852150,3852450,0.139281818181818,0.133226086956522},
-{3018150,3852533,3852150,0.4556,0.4556},
-{3018151,3850986,3850179,0.371222222222222,0.3855},
-{3018152,3850179,3850077,0.0651130434782609,0.0680727272727273},
-{3018153,3851305,3850192,0.496711111111111,0.496711111111111},
-{3018154,3850192,3850123,0.0336444444444444,0.0336444444444444},
-{3018155,3850179,3850192,-1,-1},
-{3018156,3850717,3851017,-1,-1},
-{3018157,3851480,3851017,0.297666666666667,0.297666666666667},
-{3018158,3851017,3850986,0.019,0.019},
-{3018159,3850788,3851159,0.1802,0.1802},
-{3018160,3851614,3851565,0.0238444444444444,0.0292636363636364},
-{3018161,3851393,3851879,-1,-1},
-{3018162,3851879,3852134,-1,-1},
-{3018163,3852079,3851879,0.251711111111111,0.251711111111111},
-{3018164,3852134,3852213,0.28125,0.28125},
-{3018165,3852213,3852079,0.136338461538462,0.122234482758621},
-{3018166,3852079,3851614,0.535525,0.535525},
-{3018177,3852528,3852430,-1,-1},
-{3018182,3851480,3851830,-1,-1},
-{3018186,3852407,3851602,0.292675862068966,0.292675862068966},
-{3018187,3851602,3850434,0.511288888888889,0.511288888888889},
-{3018188,3851830,3851561,0.282235714285714,0.282235714285714},
-{3018189,3851561,3851453,0.0388551724137931,0.0512181818181818},
-{3018190,3851602,3851561,-1,-1},
-{3018191,3852675,3853678,0.388548387096774,0.4015},
-{3018192,3853678,3854194,0.322575,0.3519},
-{3018193,3853404,3853678,0.393088888888889,0.393088888888889},
-{3018194,3853401,3853080,0.210041379310345,0.20304},
-{3018195,3853080,3852855,0.274524324324324,0.290211428571429},
-{3018196,3852747,3853080,0.350644444444444,0.350644444444444},
-{3018197,3856745,3856639,0.3366,0.3366},
-{3018198,3856362,3856745,0.310933333333333,0.310933333333333},
-{3018199,3856740,3856745,0.0706,0.0706},
-{3018204,3854622,3854828,0.24501,0.24501},
-{3018205,3854828,3854895,0.3229,0.38748},
-{3018206,3854514,3854565,0.0536,0.0536},
-{3018207,3854565,3854828,0.3681,0.3681},
-{3018208,3854565,3854468,0.136938461538462,0.136938461538462},
-{3018209,3854093,3854468,0.174133333333333,0.174133333333333},
-{3018210,3854468,3854485,0.0541090909090909,0.0541090909090909},
-{3018211,3854779,3854485,0.1842,0.1842},
-{3018212,3854425,3854485,0.0816444444444444,0.0816444444444444},
-{3018213,3854156,3854425,0.120866666666667,0.120866666666667},
-{3018214,3854437,3854425,0.0479555555555555,0.0479555555555555},
-{3018215,3854895,3854706,0.144725,0.151017391304348},
-{3018216,3854437,3854656,0.146511111111111,0.146511111111111},
-{3018217,3854412,3854437,0.158,0.158},
-{3018218,3854706,3854628,0.05856,0.061},
-{3018219,3854628,3854486,0.105965217391304,0.128273684210526},
-{3018220,3854412,3854628,0.130933333333333,0.130933333333333},
-{3018221,3858278,3858223,0.03966,0.0344869565217391},
-{3018222,3858223,3857372,0.418173913043478,0.4809},
-{3018223,3906403,3907173,0.375192857142857,0.375192857142857},
-{3018224,3907173,3908272,0.47374,0.418005882352941},
-{3018225,3906662,3907479,0.314945454545455,0.3247875},
-{3018226,3907479,3908743,0.396707692307692,0.429766666666667},
-{3018227,3907173,3907479,0.298863157894737,0.298863157894737},
-{3018228,3901655,3902090,-1,-1},
-{3018229,3902090,3902410,0.162577777777778,0.162577777777778},
-{3018230,3899545,3900150,-1,0.195232258064516},
-{3018231,3900165,3899545,0.389177777777778,0.389177777777778},
-{3018234,3860098,3860366,0.178695652173913,0.178695652173913},
-{3018235,3860366,3860408,0.033792,0.033792},
-{3018236,3860867,3860366,0.286933333333333,0.286933333333333},
-{3018237,3869530,3869525,0.0347625,0.0505636363636364},
-{3018238,3869525,3869514,0.141,0.235},
-{3018239,3871755,3870887,0.626953846153846,0.354365217391304},
-{3018240,3870887,3870875,0.020592,0.0270947368421053},
-{3018247,3885372,3885401,-1,0.05255625},
-{3018248,3885401,3885456,-1,0.169220689655172},
-{3018255,3871799,3871846,-1,0.0331692307692308},
-{3018256,3871700,3871846,0.0651714285714286,-1},
-{3018264,3890061,3890174,0.048727868852459,0.0540436363636364},
-{3018265,3890174,3890221,0.015984375,0.0200588235294118},
-{3018266,3885054,3885162,0.0483365853658537,0.0460883720930233},
-{3018267,3885162,3885493,0.144,0.171428571428571},
-{3018268,3885054,3885445,0.152076923076923,-1},
-{3018269,3885445,3885835,0.111876923076923,-1},
-{3018270,3885162,3885445,0.132765517241379,-1},
-{3018271,3883321,3883414,-1,0.0380428571428571},
-{3018272,3883414,3883658,-1,0.108342857142857},
-{3018273,3883414,3883419,0.0599657142857143,-1},
-{3018274,3883280,3883355,0.0396,-1},
-{3018275,3883355,3883610,0.101586666666667,-1},
-{3018276,3885737,3886427,0.6133,0.525685714285714},
-{3018277,3885920,3885737,0.078075,0.074952},
-{3018278,3885737,3885410,-1,-1},
-{3018280,3859200,3859167,0.01034,0.01034},
-{3018281,3859167,3859035,-1,0.075925},
-{3018282,3899403,3899363,0.0186333333333333,-1},
-{3018283,3899307,3899557,-1,0.126758490566038},
-{3018284,3899363,3899307,0.01848,-1},
-{3018285,3899683,3899852,0.0618727272727273,0.10209},
-{3018286,3899852,3900171,0.0936923076923077,0.126},
-{3018314,3864463,3864646,0.07168,-1},
-{3018315,3859115,3858706,0.1169,-1},
-{3018320,3859258,3859115,0.0403692307692308,-1},
-{3018321,3859315,3859258,0.0204166666666667,-1},
-{3018322,3884683,3884745,0.0829578947368421,-1},
-{3018452,3864015,3864032,0.0397636363636364,-1},
-{3018453,3864032,3864380,0.338028571428571,-1},
-{3018462,3865144,3865247,0.046944,0.0335314285714286},
-{3018463,3865247,3865328,0.0332647058823529,0.039},
-{3018464,3865247,3865285,-1,0.071},
-{3018465,3865285,3865315,-1,0.0424384615384615},
-{3018466,3865213,3865021,0.15804,0.15804},
-{3018467,3864470,3864328,0.0934363636363636,-1},
-{3018468,3864328,3864310,0.0144,-1},
-{3018469,3864270,3864328,0.0400636363636364,-1},
-{3018470,3864328,3864463,0.0534461538461538,-1},
-{3018471,3871934,3872032,-1,0.171765957446809},
-{3018472,3871954,3872032,-1,0.0326181818181818},
-{3020208,3900337,3900448,0.0639555555555556,0.0639555555555556},
-{3020447,3889293,3889152,-1,0.022065671641791},
-{3020448,3889152,3888856,-1,0.0423130434782609},
-{3020469,3881451,3881476,-1,0.0138285714285714},
-{3020529,3913573,3913159,0.27618,0.27618},
-{3020530,3913159,3913104,0.0290526315789474,0.0262857142857143},
-{3020531,3913104,3913061,0.0233052631578947,0.0210857142857143},
-{3020532,3913057,3912256,0.47151,0.554717647058824},
-{3020533,3913057,3913099,0.0348428571428571,0.0304875},
-{3020927,3905947,3906538,0.34737,0.34737},
-{3020928,3903785,3903828,0.0220888888888889,0.0220888888888889},
-{3020929,3903828,3904253,0.207644444444444,0.207644444444444},
-{3020990,3867763,3867847,-1,0.08365},
-{3020991,3867847,3867853,-1,0.0289636363636364},
-{3021002,3848123,3848831,0.412927272727273,0.412927272727273},
-{3021003,3848831,3848980,0.0723272727272727,0.0723272727272727},
-{3021021,3873008,3873018,0.116674285714286,0.163344},
-{3021022,3873018,3873359,0.135977777777778,0.135977777777778},
-{3021023,3874046,3873251,0.3734,0.289083870967742},
-{3021024,3873018,3872804,0.122511111111111,0.122511111111111},
-{3021025,3872804,3873279,0.6194,0.6194},
-{3021026,3873279,3873251,0.135675,0.127694117647059},
-{3021027,3872804,3873279,0.661328571428571,0.661328571428571},
-{3021031,3858011,3857983,0.0740380952380952,-1},
-{3021032,3855897,3856249,0.2764,-1},
-{3021033,3855897,3855140,-1,0.314711111111111},
-{3021034,3855140,3854739,0.2114,0.1812},
-{3021035,3853749,3854211,0.170072727272727,0.170072727272727},
-{3021036,3853763,3853241,0.2046,0.2046},
-{3021037,3853428,3853749,0.131872727272727,0.131872727272727},
-{3021038,3853241,3852830,0.142527272727273,0.142527272727273},
-{3021039,3852822,3853428,0.202272727272727,0.202272727272727},
-{3021040,3852830,3852268,0.174818181818182,0.174818181818182},
-{3021041,3852256,3852822,0.167854545454545,0.167854545454545},
-{3021042,3852268,3851730,0.177309090909091,0.177309090909091},
-{3021043,3851816,3852256,0.134964705882353,0.134964705882353},
-{3021044,3850999,3851081,0.122018181818182,0.122018181818182},
-{3021045,3851081,3851816,0.257945454545455,0.257945454545455},
-{3021055,3863075,3862960,0.0731333333333333,0.0731333333333333},
-{3021067,3871704,3872103,0.121037837837838,0.135709090909091},
-{3021068,3871092,3871280,0.0767142857142857,0.0639285714285714},
-{3021124,3858565,3858278,0.130066666666667,0.130066666666667},
-{3021125,3919957,3919866,0.066525,0.0939176470588235},
-{3021126,3919866,3919159,0.480456,0.60057},
-{3021127,3919866,3919457,0.320166666666667,0.274428571428571},
-{3021128,3902036,3902123,0.021945,-1},
-{3021129,3914199,3914359,0.133826086956522,0.219857142857143},
-{3021130,3914359,3914699,0.171131707317073,0.17541},
-{3021132,3908441,3908999,0.125748,0.1497},
-{3021133,3908999,3908744,0.160622222222222,0.160622222222222},
-{3021139,3907205,3907326,-1,0.0333219512195122},
-{3021140,3907326,3907159,0.260657142857143,-1},
-{3021141,3907159,3907057,0.14754,-1},
-{3021148,3870743,3870883,0.108166666666667,-1},
-{3021149,3870771,3870378,0.123512195121951,-1},
-{3021150,3870378,3870278,0.039454054054054,0.0317347826086956},
-{3021151,3870508,3870743,-1,0.228347368421053},
-{3021152,3870743,3870718,-1,0.00657},
-{3021153,3870718,3870378,-1,0.113790697674419},
-{3021154,3897298,3897345,0.0124636363636364,-1},
-{3021155,3897259,3897298,0.11196,-1},
-{3021156,3897259,3897496,0.28278,0.28278},
-{3021176,3864541,3864669,0.246069230769231,0.236955555555556},
-{3021177,3864669,3865619,0.5163,0.501548571428571},
-{3021178,3864669,3864415,0.4542,0.4542},
-{3021179,3871451,3871391,0.100033333333333,-1},
-{3021180,3871391,3871351,0.0368368421052632,-1},
-{3021181,3871342,3871310,-1,0.0985875},
-{3021182,3871310,3871351,-1,0.0481609756097561},
-{3021184,3891411,3891414,-1,0.0427894736842105},
-{3021200,3898149,3898223,-1,0.0868524590163934},
-{3021201,3898149,3897857,0.772707692307692,-1},
-{3021202,3900549,3900721,0.041796,-1},
-{3021203,3900721,3900776,0.0134588235294118,-1},
-{3021204,3900721,3900720,0.01767,0.0126214285714286},
-{3021214,3900539,3900719,-1,0.0526142857142857},
-{3021215,3900719,3900789,-1,0.0193333333333333},
-{3021216,3900720,3900719,0.0278117647058824,0.01576},
-{3021219,3898083,3898145,0.0852090909090909,-1},
-{3021220,3898145,3898156,0.014053125,-1},
-{3021221,3897835,3898145,0.579026086956522,-1},
-{3021224,3901991,3902048,-1,0.0149727272727273},
-{3021225,3902048,3902200,-1,0.0345906976744186},
-{3021237,3883641,3883929,0.0684888888888889,-1},
-{3021238,3883929,3884206,0.12441,-1},
-{3021239,3883966,3884061,0.034858064516129,-1},
-{3021240,3884061,3884227,0.357939130434783,-1},
-{3021291,3890881,3891507,0.236982352941176,0.161148},
-{3021292,3891507,3891569,0.100971428571429,0.02945},
-{3021293,3891569,3891723,0.037968,0.037968},
-{3021294,3891723,3892260,0.138788235294118,0.141564},
-{3021295,3891507,3891723,-1,0.0711473684210526},
-{3021296,3887667,3887710,0.0185863636363636,-1},
-{3021297,3887990,3887893,-1,0.0314470588235294},
-{3021298,3887990,3888003,0.00478666666666667,-1},
-{3021299,3887710,3887749,0.0163428571428571,-1},
-{3021300,3888003,3888071,0.0169914893617021,-1},
-{3021304,3890881,3890861,0.054888,0.0762333333333333},
-{3021305,3890861,3890847,0.24315,0.24315},
-{3021309,3890861,3891046,0.460457142857143,0.460457142857143},
-{3021325,3887749,3887860,0.045978947368421,-1},
-{3021326,3887860,3887842,0.0575538461538462,-1},
-{3021346,3888061,3888071,-1,0.0234510638297872},
-{3021347,3887990,3888061,0.02445,-1},
-{3021350,3897794,3897793,0.0193636363636364,0.0193636363636364},
-{3021351,3897609,3897788,-1,0.0504731707317073},
-{3021352,3897788,3897793,0.0250909090909091,0.0250909090909091},
-{3021356,3897334,3897414,-1,0.0194625},
-{3021357,3896024,3896211,-1,0.0454040816326531},
-{3021367,3887316,3887690,0.165024,-1},
-{3021368,3887690,3887893,0.06824,-1},
-{3021384,3885856,3885864,0.0189677419354839,0.0189677419354839},
-{3021385,3885864,3885949,0.191645901639344,0.191645901639344},
-{3021386,3885864,3886956,0.61935,0.61935},
-{3021390,3906608,3907074,0.198763636363636,-1},
-{3021487,3885597,3885710,0.145865625,0.137285294117647},
-{3021488,3885963,3886082,0.305424,0.331982608695652},
-{3021489,3885710,3885911,-1,0.165486956521739},
-{3021576,3907297,3907187,0.0623777777777778,0.0623777777777778},
-{3022379,3885345,3885272,0.102633333333333,-1},
-{3022380,3885272,3885188,0.1310625,-1},
-{3022381,3880854,3880893,0.02626,-1},
-{3022388,3872283,3871939,0.200775,-1},
-{3022389,3895278,3895333,-1,0.0365},
-{3022390,3895333,3895400,-1,0.0349170731707317},
-{3022468,3897646,3897762,-1,0.0236173913043478},
-{3022469,3898191,3899087,0.174290625,-1},
-{3023424,3893801,3894269,0.601930434782609,0.314645454545455},
-{3023425,3894269,3894307,0.0260538461538462,0.0233586206896552},
-{3023426,3893831,3894190,0.167022857142857,-1},
-{3023427,3894190,3894307,0.0863307692307692,-1},
-{3023428,3894307,3894380,0.03688,0.0502909090909091},
-{3023429,3894380,3894794,0.177771428571429,0.282818181818182},
-{3023430,3894190,3894380,0.10645,-1},
-{3023431,3894147,3894269,-1,0.056445},
-{3023432,3893801,3894187,0.266542857142857,0.243365217391304},
-{3023433,3894187,3894259,0.053,0.0477},
-{3023434,3894238,3894187,-1,0.140534693877551},
-{3023435,3894187,3894136,-1,0.168117647058824},
-{3023436,3894136,3894077,-1,0.226614285714286},
-{3023437,3892616,3894004,0.624827586206896,0.549090909090909},
-{3023438,3894004,3894065,0.042675,0.0296869565217391},
-{3023439,3894004,3893972,-1,0.0923590909090909},
-{3023440,3893289,3894077,-1,0.61581},
-{3023441,3894077,3894125,0.0288666666666667,0.06495},
-{3023442,3893101,3893972,-1,0.458355555555556},
-{3023443,3893972,3894022,-1,0.0374},
-{3023444,3893921,3893811,0.0609230769230769,-1},
-{3023445,3893811,3893724,0.0837111111111111,0.0538142857142857},
-{3023446,3894022,3893978,0.0870418604651163,-1},
-{3023447,3893978,3893921,0.0374857142857143,-1},
-{3023448,3893961,3893921,0.0610666666666667,0.07328},
-{3023449,3893978,3893961,0.0709354838709677,-1},
-{3023450,3893891,3893811,-1,0.06},
-{3023451,3893921,3893891,0.0336857142857143,0.0277411764705882},
-{3023452,3893972,3893939,-1,0.0790243902439024},
-{3023453,3893939,3893891,-1,0.0430578947368421},
-{3023455,3849886,3849626,0.29688,0.30925},
-{3023812,3899580,3899554,-1,0.0425076923076923},
-{3023813,3900171,3899551,0.4786,0.499408695652174},
-{3023814,3899551,3899403,0.0847090909090909,0.0716769230769231},
-{3023817,3865328,3865401,0.103726829268293,-1},
-{3024256,3883929,3883935,-1,0.0415304347826087},
-{3024257,3884285,3884345,-1,0.1299},
-{3024258,3884345,3884370,-1,0.0325058823529412},
-{3024259,3883935,3884229,-1,0.259907142857143},
-{3024260,3884229,3884345,-1,0.168768},
-{3024261,3884229,3884285,-1,0.04314},
-{3038793,3909340,3908941,0.215688,-1},
-{3038794,3909412,3909287,0.291133333333333,0.291133333333333},
-{3038812,3862735,3862873,0.204352941176471,0.204352941176471},
-{3038814,3871777,3871799,-1,0.0231076923076923},
-{3038815,3871669,3871777,-1,0.0569052631578947},
-{3038816,3871669,3871700,0.0485866666666667,-1},
-{3038824,3909368,3909449,0.0568,0.0426},
-{3038825,3909449,3909567,0.11676,0.08757},
-{3038828,3909567,3909485,0.0362,0.047784},
-{3038829,3909485,3908585,0.265865217391304,0.321836842105263},
-{3038830,3909449,3909485,0.117284210526316,-1},
-{3038839,3908442,3909010,0.255754838709677,0.2477625},
-{3038840,3909010,3909128,0.0476,0.0541655172413793},
-{3038841,3908977,3907973,0.346488888888889,0.346488888888889},
-{3038842,3909010,3908977,0.0566,0.0566},
-{3038843,3909012,3908340,0.27136875,0.27136875},
-{3038844,3908977,3909012,0.050295652173913,0.050295652173913},
-{3038845,3909123,3909099,0.39105,0.39105},
-{3038846,3909012,3909123,0.0535090909090909,0.0511826086956522},
-{3038847,3909128,3909204,0.0401225806451613,0.0460666666666667},
-{3038848,3909204,3909808,0.308078571428571,0.319488888888889},
-{3038849,3909123,3909204,0.0551181818181818,0.0551181818181818},
-{3038862,3885850,3886162,-1,-1},
-{3038881,3900760,3900902,-1,-1},
-{3038882,3900902,3900910,0.0636,0.05088},
-{3038883,3900724,3900902,0.99738947368421,1.11472941176471},
-{3038884,3900234,3900235,0.0144,-1},
-{3038885,3900235,3900252,0.16811320754717,-1},
-{3038889,3900220,3900213,-1,0.0539234042553191},
-{3038901,3900428,3900919,0.1371,0.194593548387097},
-{3038902,3900919,3901376,0.104811764705882,0.1113625},
-{3038903,3900910,3900919,0.0834782608695652,0.0533333333333333},
-{3038904,3900910,3901484,-1,-1},
-{3038905,3901484,3902255,-1,-1},
-{3038906,3901376,3901496,0.0237396226415094,0.0267702127659574},
-{3038907,3901496,3902273,0.219061538461538,0.244097142857143},
-{3038908,3901484,3901496,0.048,0.048},
-{3038970,3899302,3899859,-1,0.130746428571429},
-{3038975,3900382,3900455,-1,0.022004347826087},
-{3038976,3900981,3901239,0.1108,0.1108},
-{3038977,3900068,3900381,0.3409,0.3409},
-{3038981,3901019,3900981,0.142778571428571,0.148066666666667},
-{3038982,3901019,3902574,0.478145454545455,0.478145454545455},
-{3039003,3883271,3883676,0.179733333333333,0.179733333333333},
-{3039004,3883010,3883397,0.110473469387755,0.106141176470588},
-{3039005,3883397,3883271,0.101175,0.1349},
-{3039006,3883794,3883839,0.0257307692307692,0.0318571428571429},
-{3039007,3883839,3884108,0.143957142857143,0.223933333333333},
-{3039008,3883397,3883839,0.215032258064516,0.162585365853659},
-{3039009,3883010,3881387,0.461292857142857,0.478377777777778},
-{3039010,3879866,3881301,0.797266666666667,0.768792857142857},
-{3039011,3881301,3881387,0.07772,0.0529909090909091},
-{3039012,3881511,3881301,0.222347368421053,0.176025},
-{3039013,3877491,3877637,-1,-1},
-{3039014,3877637,3878088,-1,-1},
-{3039015,3878530,3878800,0.0641222222222222,0.0678941176470588},
-{3039016,3878800,3879324,0.130702040816327,0.128088},
-{3039019,3884920,3885522,0.230555555555556,0.230555555555556},
-{3039020,3885522,3885524,0.09,-1},
-{3039021,3884783,3885503,0.2380125,0.282088888888889},
-{3039022,3885503,3885604,0.0288882352941177,0.0338689655172414},
-{3039023,3885522,3885503,-1,0.49698},
-{3039024,3898818,3898860,0.0225789473684211,0.0225789473684211},
-{3039025,3898860,3899173,0.16887,0.241242857142857},
-{3039026,3898733,3899092,0.117635294117647,0.1111},
-{3039027,3899092,3899696,0.268269230769231,0.249107142857143},
-{3039028,3898860,3899092,0.4755,0.4755},
-{3039033,3900232,3900380,0.05004375,0.0942},
-{3039034,3900380,3900428,0.0184166666666667,0.039},
-{3039035,3900235,3900577,-1,0.200085714285714},
-{3039036,3900577,3900910,0.144488888888889,0.139328571428571},
-{3039037,3900380,3900577,0.136338461538462,0.2532},
-{3039085,3899497,3899615,0.0701777777777778,0.0701777777777778},
-{3039086,3899244,3899497,0.128818181818182,0.1417},
-{3039087,3899615,3899244,0.256755555555556,0.256755555555556},
-{3039088,3899095,3899287,0.133406896551724,0.09672},
-{3039089,3899287,3899526,0.1371,0.112172727272727},
-{3039090,3899615,3900356,0.400955555555556,0.400955555555556},
-{3039091,3900064,3900356,0.175644444444444,0.175644444444444},
-{3039092,3899988,3900064,0.0450222222222222,0.0450222222222222},
-{3039093,3899988,3900332,0.134955555555556,0.134955555555556},
-{3039094,3900332,3901120,0.439111111111111,0.439111111111111},
-{3039095,3900356,3900579,0.113711111111111,0.113711111111111},
-{3039096,3900579,3901158,0.273577777777778,0.273577777777778},
-{3039097,3900332,3900579,0.207555555555556,0.207555555555556},
-{3039099,3900049,3900039,0.0259714285714286,-1},
-{3039100,3900039,3899983,0.0920526315789474,-1},
-{3039101,3900000,3900041,0.01338,-1},
-{3039121,3860494,3861326,-1,-1},
-{3039122,3861326,3861558,0.122511111111111,0.122511111111111},
-{3039283,3859420,3859564,0.12004,0.105917647058824},
-{3039284,3859564,3859929,0.284485714285714,0.3319},
-{3039285,3859929,3860099,0.16188,0.186784615384615},
-{3039286,3859564,3859929,0.2222,0.2222},
-{3039287,3861013,3860371,0.28438,-1},
-{3039288,3860371,3860205,0.0660810810810811,-1},
-{3039289,3860371,3860099,-1,-1},
-{3039292,3860099,3860884,-1,-1},
-{3039346,3868140,3868179,-1,-1},
-{3039347,3868179,3868237,-1,-1},
-{3039432,3900455,3900515,-1,0.0189545454545455},
-{3039433,3900515,3900565,-1,0.0202},
-{3039438,3895137,3895193,-1,0.0340772727272727},
-{3040236,3861321,3862136,0.322287804878049,0.35712972972973},
-{3040345,3868192,3868211,0.01836,-1},
-{3040354,3867716,3867453,0.117133333333333,0.121638461538462},
-{3040355,3867453,3867230,0.0751241379310345,0.0702774193548387},
-{3040428,3884747,3884813,0.0256451612903226,0.0361363636363636},
-{3040654,3888353,3888427,0.04542,-1},
-{3040660,3890957,3891082,0.154690909090909,0.121542857142857},
-{3040661,3891082,3891146,-1,0.0624692307692308},
-{3040662,3891031,3891146,-1,0.037095},
-{3040663,3891082,3891031,0.113470588235294,-1},
-{3040664,3890974,3891052,0.0267,-1},
-{3040665,3891052,3891160,0.0407513513513513,-1},
-{3041935,3898020,3898046,0.0168,0.01848},
-{3041936,3898046,3898318,0.20793,0.20793},
-{3041937,3895180,3895338,0.0468979591836735,0.0441923076923077},
-{3041938,3895338,3895566,-1,0.0673591836734694},
-{3041939,3895978,3896005,0.0212129032258065,0.0274},
-{3041940,3896005,3896260,0.1804125,0.3396},
-{3041941,3895199,3895547,0.22432,-1},
-{3041942,3896735,3896844,0.129070588235294,0.129070588235294},
-{3041943,3896735,3896005,-1,0.261757894736842},
-{3041944,3895547,3895338,-1,0.0614553191489362},
-{3041945,3898046,3897537,-1,0.224854545454545},
-{3041946,3897522,3897537,0.022968,0.0261},
-{3041947,3880838,3880912,0.02374,-1},
-{3041948,3881006,3880912,0.0923333333333333,0.0923333333333333},
-{3041951,3895663,3896075,0.329947826086957,0.216822857142857},
-{3041952,3896075,3896128,0.0236068965517241,-1},
-{3041953,3896471,3896563,0.0444,-1},
-{3041954,3896437,3896234,0.1395,0.172714285714286},
-{3041955,3896128,3896092,-1,0.0136173913043478},
-{3041956,3896092,3895931,-1,0.0706604651162791},
-{3041957,3895931,3896119,0.217928571428571,-1},
-{3041958,3896119,3896155,0.02068,-1},
-{3041959,3896217,3896181,0.0149720930232558,-1},
-{3041960,3896181,3896030,0.0629086956521739,-1},
-{3041961,3896075,3896092,-1,0.025125},
-{3041962,3896092,3896119,-1,0.01494375},
-{3041963,3896119,3896181,-1,0.0418444444444444},
-{3041964,3896181,3896437,-1,0.244166666666667},
-{3041965,3896437,3896563,-1,0.0494647058823529},
-{3042484,3890457,3890562,-1,0.0389272727272727},
-{3042486,3892862,3892945,-1,0.0178408163265306},
-{3042490,3885150,3885118,-1,0.0470903225806452},
-{3042491,3885118,3885097,-1,0.0456882352941176},
-{3042495,3885118,3885255,-1,0.159635294117647},
-{3042496,3885026,3884809,0.120627272727273,-1},
-{3042497,3884796,3884947,-1,0.23278},
-{3042498,3884947,3884978,-1,0.0488057142857143},
-{3042499,3884809,3884947,0.159157894736842,-1},
-{3042543,3895346,3895643,0.119222727272727,-1},
-{3042544,3895434,3895450,-1,0.01422},
-{3042545,3893565,3895158,0.416937931034483,-1},
-{3042546,3895158,3895201,0.0244909090909091,-1},
-{3042549,3898746,3898640,0.0601736842105263,0.0476375},
-{3042550,3898494,3898557,0.0257379310344828,-1},
-{3042552,3869824,3869680,0.04308,0.0349297297297297},
-{3042553,3869680,3869461,0.05076,0.05076},
-{3042554,3870193,3869981,0.09621,0.0549771428571429},
-{3042555,3869981,3869824,0.0628173913043478,0.0437818181818182},
-{3042556,3870041,3869824,0.1904,0.068},
-{3042567,3865015,3864643,0.115005882352941,0.162925},
-{3042568,3864643,3864040,0.211747058823529,0.232238709677419},
-{3042569,3864629,3864863,0.107651162790698,0.125108108108108},
-{3042570,3864863,3865144,0.136962162162162,0.120657142857143},
-{3042571,3864473,3864560,0.0601714285714286,0.0815225806451613},
-{3042572,3864560,3864629,0.0371581395348837,0.0469941176470588},
-{3042577,3866009,3865767,0.109241379310345,0.111157894736842},
-{3042578,3865767,3865334,0.270703448275862,0.280371428571429},
-{3042579,3865015,3865004,0.0477733333333333,-1},
-{3042580,3865004,3864890,0.269433962264151,-1},
-{3042581,3864890,3864889,0.0688188679245283,-1},
-{3042582,3865079,3864986,-1,0.28164},
-{3042583,3864986,3864981,-1,0.0906470588235294},
-{3042584,3865196,3865128,0.0336375,-1},
-{3042585,3865128,3864981,0.087675,-1},
-{3042586,3863953,3863322,0.26925,-1},
-{3042587,3864912,3864819,-1,0.038875},
-{3042588,3864819,3863621,-1,0.5268},
-{3042589,3864990,3864998,-1,0.044775},
-{3042590,3864998,3865005,-1,0.0536615384615385},
-{3042592,3877871,3878020,0.0833052631578947,-1},
-{3042596,3865309,3865261,0.181690909090909,-1},
-{3042597,3865261,3865186,0.07065,-1},
-{3042600,3884871,3885029,0.30921,-1},
-{3042601,3885029,3885097,0.0886384615384615,-1},
-{3042602,3864784,3864931,0.0736434782608696,-1},
-{3042603,3864931,3865056,0.0654,-1},
-{3042604,3864934,3864869,0.0722903225806452,-1},
-{3042605,3864869,3864784,0.0793846153846154,-1},
-{3042613,3890664,3890704,0.047295652173913,0.03626},
-{3042614,3890494,3890585,0.0835928571428571,0.0866888888888889},
-{3042615,3887585,3887706,0.0323210526315789,0.0314923076923077},
-{3042616,3887706,3888545,0.20673488372093,0.216819512195122},
-{3042617,3871961,3871968,0.0653189189189189,-1},
-{3042618,3872452,3872484,-1,0.026796},
-{3042619,3886816,3887002,0.08265,-1},
-{3042620,3869774,3869498,0.0636714285714286,-1},
-{3042621,3870062,3869924,-1,0.0441},
-{3042622,3870079,3870062,0.19684,0.109355555555556},
-{3042623,3870092,3870079,0.11802,0.0931736842105263},
-{3042624,3887842,3887750,0.0243428571428571,-1},
-{3042625,3887750,3887556,0.0554571428571429,-1},
-{3042626,3875102,3875100,0.0988941176470588,-1},
-{3042627,3887592,3887531,0.0229609756097561,-1},
-{3042630,3850774,3850566,0.0602428571428571,0.0486576923076923},
-{3042631,3850566,3850165,0.1,0.0910714285714286},
-{3042632,3878140,3878360,0.0592285714285714,0.051825},
-{3042647,3899648,3899733,-1,0.0731625},
-{3042648,3899733,3899819,-1,0.07845},
-{3042649,3899669,3899757,0.0398470588235294,-1},
-{3042650,3899757,3899819,0.0283945945945946,-1},
-{3042654,3853410,3853523,0.0428678571428571,0.0436472727272727},
-{3042655,3853523,3853685,0.0733142857142857,0.0744967741935484},
-{3042656,3852484,3853012,0.110684210526316,-1},
-{3042657,3853012,3853094,0.0257318181818182,-1},
-{3042663,3899450,3899282,0.0796153846153846,-1},
-{3042664,3899282,3899226,0.021825,-1},
-{3042665,3899447,3899276,-1,0.0863478260869565},
-{3042666,3899276,3899136,-1,0.0561428571428571},
-{3042667,3899450,3899279,0.0533513513513513,-1},
-{3042668,3899282,3899279,-1,0.0182166666666667},
-{3042669,3899279,3899276,0.0470769230769231,0.034},
-{3042670,3899276,3899263,0.0729555555555556,0.0729555555555556},
-{3042677,3875582,3875549,0.121515789473684,0.112624390243902},
-{3042678,3875380,3875499,0.0639,0.0594418604651163},
-{3042679,3875499,3875582,0.0590368421052632,0.056085},
-{3042684,3872414,3872456,0.046575,-1},
-{3042685,3872664,3872707,0.08505,-1},
-{3042688,3872065,3872053,0.0474285714285714,-1},
-{3042689,3872456,3872510,0.06072,-1},
-{3042690,3872510,3872569,0.06845,-1},
-{3042691,3872524,3872623,-1,0.0935333333333333},
-{3042694,3872006,3872381,-1,0.0922421052631579},
-{3042695,3897924,3898140,-1,0.051615},
-{3042696,3880951,3880770,0.0720642857142857,-1},
-{3042697,3880770,3880536,0.0887333333333333,-1},
-{3042700,3899698,3899660,-1,0.0690648648648649},
-{3042701,3899660,3899580,-1,0.136231578947368},
-{3042702,3899763,3899723,-1,0.054227027027027},
-{3042703,3899723,3899698,-1,0.0592421052631579},
-{3042706,3912518,3912673,-1,0.0255217391304348},
-{3042707,3912749,3912967,-1,0.0314},
-{3042708,3912967,3913638,-1,0.104031428571429},
-{3042718,3854745,3854648,0.0218823529411765,0.0206666666666667},
-{3042736,3875508,3875661,0.039,0.1092},
-{3042737,3875661,3877681,0.6648,0.506514285714286},
-{3042738,3875349,3875408,-1,0.0665192307692308},
-{3042739,3875408,3875580,-1,0.157835294117647},
-{3042740,3872863,3873916,0.207316363636364,0.316733333333333},
-{3042741,3865102,3865039,0.0186171428571429,0.013575},
-{3042742,3864838,3865075,0.0527236363636364,0.0475377049180328},
-{3042743,3865680,3865656,0.0394301886792453,0.0401884615384615},
-{3042744,3865656,3865102,0.160285714285714,0.148188679245283},
-{3042745,3865526,3868434,0.5184,0.480834782608696},
-{3042746,3874519,3874393,-1,0.1026},
-{3042747,3874669,3874621,0.0233884615384615,-1},
-{3042748,3874888,3874800,0.0388254545454545,-1},
-{3042749,3874800,3874669,0.0687888888888889,-1},
-{3042750,3873972,3873944,-1,0.0739066666666667},
-{3042751,3873944,3873988,-1,0.185088888888889},
-{3042752,3873887,3873729,0.0484578947368421,0.076725},
-{3042753,3873729,3873407,0.0727148936170213,0.0813714285714286},
-{3042754,3873407,3873008,0.0843622641509434,0.089424},
-{3042755,3874275,3873998,-1,0.14778},
-{3042766,3864480,3864442,0.011175,0.01396875},
-{3042767,3864442,3864362,0.023535,0.0268971428571429},
-{3042802,3865496,3865503,-1,0.02863125},
-{3042803,3865503,3865518,-1,0.154976470588235},
-{3042810,3901293,3901385,0.0374630136986301,-1},
-{3042811,3901385,3901531,0.0544816901408451,-1},
-{3042812,3900150,3900864,-1,0.23747619047619},
-{3042813,3901351,3901439,-1,0.0367114285714286},
-{3042814,3901439,3901585,-1,0.0581485714285714},
-{3042815,3901503,3901590,0.0882,0.0774439024390244},
-{3042816,3878315,3878177,0.05828,-1},
-{3042817,3877873,3877789,0.04203,-1},
-{3042818,3877668,3877344,-1,0.255266666666667},
-{3042819,3857745,3857764,0.0304,0.0304},
-{3042820,3858996,3858360,0.160884,-1},
-{3042821,3858360,3858230,0.0366976744186047,-1},
-{3042822,3855029,3854873,0.0379882352941176,0.0412212765957447},
-{3042823,3855338,3855029,0.0682846153846154,0.0696235294117647},
-{3042824,3856827,3855938,0.176049056603774,0.166617857142857},
-{3042825,3854652,3854641,0.0214325581395349,0.0214325581395349},
-{3042826,3854641,3854609,0.04385,0.0429551020408163},
-{3042836,3901233,3901470,-1,0.0614},
-{3042837,3901470,3901689,-1,0.0516905660377358},
-{3042838,3870278,3870130,0.06172,0.0402521739130435},
-{3042839,3870130,3870041,0.061,0.0284666666666667},
-{3042840,3879195,3879355,0.177,-1},
-{3042841,3879355,3879464,0.11485,-1},
-{3042846,3880809,3880826,0.0299217391304348,0.0264692307692308},
-{3042847,3902309,3902164,0.0986769230769231,0.0874636363636364},
-{3042848,3902164,3902129,0.0336692307692308,0.0236594594594595},
-{3042849,3902883,3902930,0.0222545454545455,0.0288},
-{3042850,3902930,3902983,0.0291652173913043,0.0353052631578947},
-{3042851,3899872,3899831,0.092505,-1},
-{3042852,3899831,3899816,0.0332590909090909,-1},
-{3042853,3900372,3900539,-1,0.0600315789473684},
-{3042854,3899888,3899858,-1,0.0492},
-{3042855,3899858,3899813,-1,0.0693428571428572},
-{3042856,3900030,3900286,0.0634428571428571,-1},
-{3042857,3900286,3900549,0.070425,-1},
-{3042858,3899279,3899136,0.0431414634146341,-1},
-{3042859,3901196,3901250,-1,0.0858878048780488},
-{3042862,3868288,3868213,-1,0.01782},
-{3042863,3871317,3871272,0.01236,-1},
-{3042864,3871272,3870771,0.156068181818182,-1},
-{3043195,3881829,3881683,0.0932052631578947,-1},
-{3043196,3881683,3882318,0.209925,-1},
-{3043197,3878418,3881336,-1,0.4966},
-{3043198,3881506,3882238,0.1348,-1},
-{3043199,3878414,3881323,0.523014705882353,-1},
-{3043200,3881323,3881817,0.0776417910447761,-1},
-{3043201,3858492,3858450,0.0595963636363636,0.0607},
-{3043205,3903195,3903443,-1,0.0592354838709677},
-{3043206,3903443,3903853,-1,0.118170491803279},
-{3043210,3915727,3915764,-1,0.00875},
-{3043278,3853685,3857169,0.713214084507042,0.6843},
-{3043279,3857169,3857587,0.072346875,0.063427397260274},
-{3043284,3894825,3894868,0.029412,-1},
-{3043285,3894868,3894912,0.029868,-1},
-{3043296,3895566,3895724,-1,0.0536142857142857},
-{3043297,3895724,3895978,-1,0.105522580645161},
-{3043298,3896005,3895616,-1,0.287894117647059},
-{3043299,3895616,3895547,-1,0.0330769230769231},
-{3043336,3895770,3895811,0.032975,-1},
-{3043341,3895961,3895811,-1,0.117525},
-{3043342,3895984,3896152,0.12087,-1},
-{3043343,3895709,3895960,0.135272727272727,-1},
-{3043344,3895960,3895984,0.0142702702702703,-1},
-{3043345,3900691,3900814,0.0842947368421053,0.12012},
-{3043346,3901121,3901083,-1,0.125},
-{3043347,3901083,3901030,-1,0.138714285714286},
-{3043348,3880601,3880503,0.0301444444444444,-1},
-{3043349,3880503,3880356,0.04,-1},
-{3043353,3880977,3881111,-1,0.0348555555555556},
-{3043354,3881000,3881139,0.0348535714285714,-1},
-{3043355,3881480,3881402,0.0384857142857143,0.0612272727272727},
-{3043356,3881402,3880911,0.190645714285714,0.20851875},
-{3043357,3878789,3879143,0.122057142857143,-1},
-{3043358,3879143,3879199,0.0268258064516129,-1},
-{3043362,3879581,3879561,0.011208,-1},
-{3043363,3879561,3879540,0.0126,-1},
-{3043364,3879452,3879507,-1,0.063912},
-{3043365,3879507,3879566,-1,0.05786},
-{3043366,3879212,3879284,0.106737931034483,-1},
-{3043367,3879284,3879346,0.0518086956521739,-1},
-{3043374,3901030,3901143,-1,0.1518},
-{3043375,3901143,3901196,-1,0.0854836363636364},
-{3043376,3900881,3901005,0.253418181818182,0.2613375},
-{3043377,3884150,3884243,-1,0.0501061224489796},
-{3043378,3884243,3884339,-1,0.0531191489361702},
-{3043379,3900814,3900862,0.0488571428571429,0.0580754716981132},
-{3043380,3883419,3883585,0.07714,0.105190909090909},
-{3043381,3883585,3883732,0.0743785714285714,0.06942},
-{3043384,3902514,3902558,0.03885,0.0481},
-{3043385,3902558,3902737,0.149493103448276,0.160566666666667},
-{3043386,3882727,3883000,0.1129375,-1},
-{3043387,3882727,3883029,-1,0.107514893617021},
-{3043388,3883029,3883067,-1,0.0132382978723404},
-{3043389,3902737,3902882,0.111267692307692,0.12054},
-{3043390,3902882,3902986,0.078196875,0.0820426229508197},
-{3043397,3903267,3903405,0.05181,0.05181},
-{3043398,3903405,3903710,0.141747540983607,0.139461290322581},
-{3043401,3904172,3904224,0.0227368421052632,0.0235636363636364},
-{3043402,3904224,3904315,0.0336321428571429,0.0348777777777778},
-{3043414,3904935,3905196,0.09717,0.0988169491525424},
-{3043415,3896378,3896559,-1,0.0884052631578948},
-{3043416,3896559,3896829,-1,0.14613488372093},
-{3237937,3918946,3919430,0.32504,-1},
-{3237938,3919137,3919637,-1,0.298875},
-{3237950,3920010,3920106,0.0622137931034483,0.100233333333333},
-{3237951,3919497,3919921,0.1176,0.112486956521739},
-{3237952,3919921,3920010,0.0429375,0.0381666666666667},
-{3237953,3920106,3919921,-1,0.0750333333333333},
-{3237954,3920010,3920211,0.0767117647058824,0.08150625},
-{3237955,3920106,3920211,0.0692571428571429,-1},
-{3237956,3920106,3920364,0.128883870967742,0.121072727272727},
-{3237957,3920364,3920499,0.131625,0.100285714285714},
-{3237958,3920364,3920434,0.0849555555555556,-1},
-{3237959,3920602,3920364,0.0879942857142857,-1},
-{3237981,3866769,3866733,0.0583909090909091,0.0583909090909091},
-{3237984,3922038,3921841,0.152222222222222,0.152222222222222},
-{3238645,3881842,3881653,0.1898,-1},
-{3238646,3881653,3881386,0.28212,-1},
-{3238678,3873482,3873462,0.0344454545454545,-1},
-{3238718,3870910,3870973,-1,-1},
-{3239077,3875837,3876264,0.13842,0.13842},
-{3239090,3886907,3886885,0.2874,0.2874},
-{3239093,3891272,3891295,0.0298378378378378,0.0306666666666667},
-{3239132,3891160,3891146,0.05144,-1},
-{3239429,3902199,3902237,0.147111111111111,-1},
-{3239430,3902237,3902029,-1,0.1206},
-{3239431,3902641,3902237,-1,0.26492},
-{3239681,3871406,3871091,0.201545454545455,0.2217},
-{3239682,3871124,3871091,0.0387375,0.0387375},
-{3239683,3871091,3870864,0.0816888888888889,0.0816888888888889},
-{3239685,3858791,3857712,0.443444444444444,0.443444444444444},
-{3239687,3858825,3858968,-1,-1},
-{3239688,3858968,3859221,0.1268,0.1268},
-{3239689,3854670,3854250,0.231222222222222,0.231222222222222},
-{3239690,3854250,3853817,0.201644444444444,0.201644444444444},
-{3239691,3854734,3854670,0.0454,0.0454},
-{3239707,3848834,3848365,0.4738,0.4738},
-{3239721,3851556,3852198,0.355622222222222,0.355622222222222},
-{3239722,3852198,3852517,0.125622222222222,0.125622222222222},
-{3239723,3852198,3852317,0.138266666666667,0.138266666666667},
-{3239726,3854867,3854709,0.108025,0.12963},
-{3239727,3855823,3856352,0.3238,0.3238},
-{3239728,3854202,3855366,0.573738461538462,0.573738461538462},
-{3239729,3855366,3855876,0.2614,0.2614},
-{3239730,3854867,3855366,0.567969230769231,-1},
-{3239731,3855366,3855823,0.343421052631579,-1},
-{3239742,3857682,3857691,0.0370325581395349,0.0388390243902439},
-{3239743,3857691,3857745,0.0947466666666667,0.099153488372093},
-{3239744,3858683,3858591,0.0518647058823529,0.05878},
-{3239745,3858591,3858361,0.123051428571429,0.153814285714286},
-{3239746,3857691,3857778,0.0318444444444444,0.0318444444444444},
-{3239747,3857778,3858591,0.340311111111111,0.340311111111111},
-{3239782,3850091,3850612,-1,-1},
-{3239783,3851186,3851132,-1,-1},
-{3239784,3851132,3850663,-1,-1},
-{3239788,3851132,3851557,-1,-1},
-{3239789,3851557,3851657,-1,-1},
-{3239790,3921330,3921155,0.08379,0.0713106382978723},
-{3239791,3921155,3921019,0.0530936170212766,0.0519875},
-{3239792,3921155,3921246,0.199644444444444,0.199644444444444},
-{3239795,3851083,3851031,0.174064864864865,0.149776744186047},
-{3239796,3851031,3851477,0.182751219512195,0.182751219512195},
-{3239797,3850966,3851031,-1,-1},
-{3239801,3859594,3860080,-1,-1},
-{3239802,3863237,3863022,0.141911111111111,0.141911111111111},
-{3239803,3863022,3862893,-1,-1},
-{3239821,3859869,3860019,-1,-1},
-{3239822,3860019,3860081,0.0830444444444444,0.0830444444444444},
-{3239829,3859276,3859230,-1,-1},
-{3239830,3859251,3859184,0.02768,0.02768},
-{3239831,3859184,3858457,0.21027,0.21027},
-{3239832,3859230,3859184,-1,-1},
-{3239833,3849472,3849452,0.224155555555556,0.224155555555556},
-{3239836,3857939,3857119,-1,-1},
-{3239837,3857119,3856944,-1,-1},
-{3239838,3858673,3858039,-1,-1},
-{3239840,3857119,3857919,-1,-1},
-{3239841,3857919,3858039,-1,-1},
-{3239842,3857939,3857919,-1,-1},
-{3239843,3867223,3866808,0.228631578947368,0.188869565217391},
-{3239844,3866808,3866733,0.0343565217391304,0.0303923076923077},
-{3239845,3866966,3866769,-1,0.870471428571429},
-{3239846,3866808,3866769,0.0637411764705882,0.0637411764705882},
-{3239848,3868287,3868595,0.31116,0.31116},
-{3239851,3852900,3852480,0.0931882352941176,0.0990125},
-{3239855,3854263,3853530,0.254915789473684,0.246274576271186},
-{3239856,3853530,3853469,0.0210954545454545,0.0189428571428571},
-{3239860,3866449,3866798,0.138461538461538,0.138461538461538},
-{3239861,3866798,3867608,0.30228,0.30228},
-{3239862,3866798,3867007,-1,-1},
-{3239865,3867854,3867608,-1,-1},
-{3239869,3858673,3858803,-1,-1},
-{3239878,3859470,3859399,0.0344,0.0344},
-{3239879,3859399,3858862,0.218244444444444,0.218244444444444},
-{3239913,3880554,3880580,0.222471428571429,0.183211764705882},
-{3239914,3880580,3880796,0.17795625,0.138892682926829},
-{3239915,3880580,3881456,-1,-1},
-{3239916,3875599,3875553,-1,0.0605538461538462},
-{3239917,3875553,3875475,-1,0.128577777777778},
-{3239918,3850353,3850593,0.0930333333333333,0.0985058823529412},
-{3239919,3850593,3850634,0.0191142857142857,0.0202727272727273},
-{3239920,3850593,3850338,-1,-1},
-{3239922,3864952,3864829,0.207818181818182,0.0788275862068966},
-{3239923,3864944,3865113,0.186466666666667,-1},
-{3239924,3865113,3865251,0.138342857142857,0.12105},
-{3239925,3865113,3865115,0.05095,0.05095},
-{3239926,3865115,3864952,0.179353846153846,-1},
-{3239927,3865232,3865066,0.101746153846154,0.08266875},
-{3239928,3865066,3864952,0.08853,0.0571161290322581},
-{3239929,3865115,3865066,0.129911111111111,-1},
-{3239937,3865091,3864862,0.262422222222222,0.262422222222222},
-{3239938,3861228,3861756,0.35769,0.35769},
-{3239943,3861228,3861004,0.265246153846154,0.2463},
-{3239944,3861004,3860895,0.106820689655172,0.134686956521739},
-{3239946,3861004,3861083,0.04785,0.04785},
-{3239947,3861083,3861151,0.05475,0.05475},
-{3239948,3861677,3862105,0.227304,0.218561538461538},
-{3239949,3862105,3862025,-1,-1},
-{3239950,3862025,3861894,-1,-1},
-{3239953,3863165,3863018,0.102666666666667,0.102666666666667},
-{3239979,3864840,3864830,-1,0.3336},
-{3239980,3864830,3864845,0.0786923076923077,0.066},
-{3239981,3850637,3850627,0.01018125,-1},
-{3239982,3850627,3850559,0.0394071428571429,-1},
-{3239983,3850417,3850376,-1,-1},
-{3239984,3850311,3850275,0.00841304347826087,0.00758823529411765},
-{3239985,3850275,3850033,0.0730173913043478,0.067176},
-{3239986,3850376,3850275,-1,-1},
-{3239987,3864830,3864758,0.367390909090909,0.577328571428571},
-{3239988,3864758,3864479,0.201266666666667,0.201266666666667},
-{3239989,3864758,3864840,-1,-1},
-{3239990,3850627,3850540,-1,-1},
-{3239991,3850540,3850376,-1,-1},
-{3239994,3859674,3860550,0.513955555555556,0.513955555555556},
-{3239995,3851904,3852111,-1,-1},
-{3240020,3861036,3861762,0.505257142857143,0.408092307692308},
-{3240021,3861762,3861675,0.20382,0.20382},
-{3240025,3859850,3860298,0.260672727272727,0.220569230769231},
-{3240026,3860592,3860274,-1,0.40008},
-{3240027,3860274,3859211,-1,0.481244444444444},
-{3240028,3859085,3859810,0.310022222222222,0.29895},
-{3240029,3859810,3859850,0.021216,0.0171096774193548},
-{3240031,3859870,3859810,0.0902222222222222,0.0902222222222222},
-{3240033,3859870,3859432,0.197111111111111,0.197111111111111},
-{3240034,3859870,3860224,0.168822222222222,0.168822222222222},
-{3240044,3860032,3859579,0.283044444444444,0.283044444444444},
-{3240045,3859579,3859534,0.0229111111111111,0.0229111111111111},
-{3240084,3858826,3858496,0.164424,0.1612},
-{3240085,3858578,3858496,0.0963428571428571,0.103753846153846},
-{3240088,3879603,3879656,-1,0.0241818181818182},
-{3240089,3879656,3879923,-1,0.132794117647059},
-{3240090,3879622,3879982,0.112866666666667,-1},
-{3240094,3871651,3871763,0.309355555555556,0.309355555555556},
-{3240100,3877615,3877773,0.0699230769230769,0.0699230769230769},
-{3240101,3877773,3878029,0.099888,0.0891857142857143},
-{3240102,3878029,3878193,0.0884,0.0663},
-{3240103,3877773,3878029,1.40406,1.40406},
-{3240104,3849788,3849555,0.173660869565217,0.147933333333333},
-{3240105,3849555,3849644,0.1914,0.1914},
-{3240106,3849644,3849670,0.0592222222222222,0.0592222222222222},
-{3240107,3849858,3849948,0.113006896551724,0.1024125},
-{3240108,3849948,3849984,0.03988,0.0362545454545455},
-{3240109,3849644,3849948,0.151844444444444,0.151844444444444},
-{3240110,3853622,3853229,-1,0.27195},
-{3240111,3853229,3853171,-1,0.0378},
-{3240112,3853229,3852590,0.309377777777778,0.309377777777778},
-{3240113,3877322,3877382,-1,0.06516},
-{3240114,3877382,3877859,0.224771428571429,0.14750625},
-{3240115,3877382,3877248,0.188955555555556,0.188955555555556},
-{3240119,3867716,3868027,-1,0.114822222222222},
-{3240120,3868027,3868148,-1,0.03902},
-{3240121,3867835,3868176,-1,0.38878064516129},
-{3240122,3868132,3867869,-1,0.297163636363636},
-{3240123,3868122,3867683,-1,0.170304},
-{3240124,3868148,3868176,-1,0.01},
-{3240125,3868176,3868212,-1,0.021216},
-{3240126,3868212,3868214,-1,0.027768},
-{3240127,3868132,3868122,-1,0.01605},
-{3240128,3868122,3868148,-1,0.03096},
-{3240156,3866094,3866015,0.02805,0.031416},
-{3240157,3866015,3864781,0.351116666666667,0.341627027027027},
-{3240158,3866015,3865981,0.29964,0.29964},
-{3240193,3851485,3851468,0.00297,0.00321081081081081},
-{3240194,3851468,3850360,0.429193548387097,0.492777777777778},
-{3240195,3851468,3851535,-1,-1},
-{3240196,3851535,3851703,-1,-1},
-{3240197,3877322,3878101,0.176165217391304,-1},
-{3240198,3878101,3878350,0.0479898305084746,-1},
-{3240199,3853384,3853439,0.0280125,0.0344769230769231},
-{3240200,3853439,3854238,0.4165,0.4685625},
-{3240201,3854053,3853439,0.50592,0.50592},
-{3240204,3863058,3863078,0.0655125,0.0748714285714286},
-{3240205,3863058,3863196,-1,0.0515027027027027},
-{3240206,3862999,3862832,0.058152,0.07269},
-{3240207,3863058,3863037,0.04125,-1},
-{3240213,3921161,3921186,-1,0.0230857142857143},
-{3240214,3921186,3921425,-1,0.248177777777778},
-{3240215,3921425,3921407,-1,0.0224347826086957},
-{3240216,3921186,3921425,-1,0.37476},
-{3240232,3858496,3858096,0.160064150943396,0.163142307692308},
-{3240233,3858096,3857762,0.232540909090909,0.227373333333333},
-{3240234,3858202,3858096,0.0475555555555556,0.0475555555555556},
-{3240235,3852579,3852692,0.122533333333333,0.122533333333333},
-{3240236,3852692,3852770,-1,-1},
-{3240241,3871280,3871361,0.032625,0.0267692307692308},
-{3240242,3871248,3871361,0.195428571428571,-1},
-{3240247,3871263,3871248,0.00998709677419355,0.00814736842105263},
-{3240248,3871361,3871488,0.0481588235294118,0.0380790697674419},
-{3240249,3871263,3871488,0.1242,-1},
-{3240259,3851935,3852258,0.141208695652174,0.154657142857143},
-{3240260,3852258,3852435,0.0911428571428571,0.106333333333333},
-{3240261,3851907,3852258,0.464630769230769,0.464630769230769},
-{3240262,3872321,3872370,0.0207310344827586,0.0146634146341463},
-{3240263,3872990,3872806,0.52386,0.52386},
-{3240264,3872354,3872694,0.32244,0.32244},
-{3240265,3872694,3872806,0.1122,0.1122},
-{3240266,3872354,3872925,0.77298,-1},
-{3240267,3872925,3872990,0.21,0.21},
-{3240268,3872694,3872925,0.6171,0.6171},
-{3240269,3872806,3872983,0.19998,0.19998},
-{3240270,3872983,3873516,0.61374,0.61374},
-{3240271,3872983,3872847,0.38574,0.38574},
-{3240272,3873928,3873667,0.31596,0.31596},
-{3240273,3873516,3873667,0.6435,0.6435},
-{3240274,3873667,3873928,0.57054,0.57054},
-{3240275,3873696,3873897,0.47844,0.47844},
-{3240276,3873897,3873928,0.8295,0.8295},
-{3240277,3873928,3873786,0.67908,0.67908},
-{3240278,3873786,3873696,0.3201,0.3201},
-{3240279,3873516,3873786,0.29382,0.29382},
-{3240280,3873786,3873897,0.15096,0.15096},
-{3240281,3873043,3872990,0.06708,0.06708},
-{3240282,3873155,3872103,0.3298125,0.5277},
-{3240283,3873043,3873155,-1,0.30096},
-{3240284,3873667,3873100,0.59934,0.59934},
-{3240285,3873100,3873043,0.05778,0.05778},
-{3240286,3873251,3873192,0.0381666666666667,0.028625},
-{3240287,3873192,3873155,0.0178,0.0138444444444444},
-{3240288,3873100,3873192,0.29922,-1},
-{3240289,3872847,3873450,0.67434,0.67434},
-{3240290,3873450,3873696,0.27438,0.27438},
-{3240291,3873516,3873450,0.32964,0.32964},
-{3240292,3872523,3872354,0.55212,0.55212},
-{3240293,3872562,3872847,0.23532,0.23532},
-{3240294,3872523,3872562,0.07872,0.07872},
-{3240297,3851074,3851035,0.0288,0.0368},
-{3240298,3851035,3850541,0.325275,0.354845454545455},
-{3240299,3851035,3851278,0.19341,0.19341},
-{3240300,3850541,3850926,0.218565517241379,0.198075},
-{3240301,3851278,3850926,-1,0.315088888888889},
-{3240308,3863530,3863343,-1,0.098341935483871},
-{3240309,3863343,3863348,-1,0.0298114285714286},
-{3240310,3863116,3862158,-1,0.404014285714286},
-{3240311,3862835,3862721,-1,-1},
-{3240312,3862419,3862275,0.108094736842105,0.0662516129032258},
-{3240313,3862275,3862217,0.0294571428571429,0.0187454545454545},
-{3240314,3862554,3862275,-1,-1},
-{3240315,3863559,3863383,0.0629647058823529,0.0611657142857143},
-{3240316,3863383,3863082,0.117466666666667,0.114291891891892},
-{3240317,3860900,3860879,0.00774146341463415,0.00881666666666667},
-{3240318,3860879,3860549,0.221682352941176,0.2284},
-{3240319,3860706,3860879,-1,-1},
-{3240320,3861288,3861224,0.03105,0.03493125},
-{3240321,3861224,3861115,0.0555833333333333,0.06253125},
-{3240322,3861224,3860800,0.239177777777778,0.239177777777778},
-{3240323,3856998,3856268,-1,-1},
-{3240324,3856268,3856251,-1,-1},
-{3240325,3856041,3855323,0.466666666666667,0.4},
-{3240326,3855323,3854316,0.90532,0.754433333333333},
-{3240327,3855323,3855231,0.1148,0.1148},
-{3240328,3854504,3854669,0.126733333333333,0.126733333333333},
-{3240329,3873790,3873769,0.016932,0.0192409090909091},
-{3240330,3873769,3873721,0.0362716981132075,0.0457714285714286},
-{3240331,3873693,3873790,0.06924,0.0577},
-{3240332,3873769,3873693,-1,0.0459636363636364},
-{3240333,3874126,3873818,0.292243636363636,0.26789},
-{3240334,3873818,3873790,0.0249875,0.0255191489361702},
-{3240335,3873693,3873818,-1,0.040427027027027},
-{3240336,3858410,3858091,0.131688888888889,0.131688888888889},
-{3240337,3858037,3858011,0.0334571428571429,-1},
-{3240338,3858315,3858251,-1,0.126189473684211},
-{3240339,3858750,3858534,0.177575,0.21309},
-{3240340,3858534,3858524,0.0454,0.05675},
-{3240341,3858524,3858510,0.0521,0.0822631578947368},
-{3240342,3857593,3857537,-1,-1},
-{3240343,3858251,3858197,-1,0.064448275862069},
-{3240344,3858197,3858091,-1,0.141263157894737},
-{3240345,3858524,3858431,0.112707692307692,-1},
-{3240346,3858431,3858197,-1,0.145930434782609},
-{3240347,3858251,3858467,-1,0.213323076923077},
-{3240348,3858467,3858534,0.0534,-1},
-{3240349,3858431,3858467,0.03645,0.03645},
-{3240350,3858315,3858211,0.118052459016393,-1},
-{3240351,3858211,3858147,0.0611225806451613,-1},
-{3240352,3858718,3858697,0.0149428571428571,0.0142636363636364},
-{3240353,3858697,3858611,0.119874193548387,0.114341538461538},
-{3240354,3861711,3861630,-1,0.0578769230769231},
-{3240355,3862127,3862054,0.0496181818181818,0.0454833333333333},
-{3240356,3861630,3861783,0.0734222222222222,-1},
-{3240357,3861783,3862054,0.198311111111111,-1},
-{3240358,3862054,3861859,0.132783333333333,0.132783333333333},
-{3240359,3861859,3861687,0.155525,0.11664375},
-{3240360,3861783,3861859,-1,0.0518888888888889},
-{3240361,3861680,3861149,0.442666666666667,0.442666666666667},
-{3240362,3861149,3860993,0.120096,0.120096},
-{3240371,3870844,3870645,0.710470588235294,-1},
-{3240372,3870645,3869900,1.07155714285714,-1},
-{3240382,3851741,3852415,-1,-1},
-{3240418,3895892,3895975,-1,0.0371769230769231},
-{3240419,3895975,3896096,-1,0.0751034482758621},
-{3240426,3895876,3895811,-1,0.131223529411765},
-{3240439,3861756,3861883,0.09447,0.09447},
-{3240440,3861883,3861756,0.14133,0.14133},
-{3240449,3865313,3865330,0.1118,-1},
-{3240450,3865330,3865341,0.07205625,-1},
-{3240451,3899683,3899864,0.118889361702128,-1},
-{3240452,3899864,3900025,0.0853368421052632,-1},
-{3240458,3899557,3899724,-1,0.116629787234043},
-{3240468,3874181,3874164,0.0423857142857143,-1},
-{3240469,3874164,3874131,0.106,-1},
-{3240478,3898156,3898206,0.0412819672131148,-1},
-{3240479,3898206,3898260,0.0470716981132075,-1},
-{3240485,3898260,3898176,0.05518,-1},
-{3240486,3898176,3898054,0.0848571428571429,-1},
-{3240487,3866361,3866393,-1,0.00927428571428571},
-{3240488,3866393,3866433,-1,0.0166},
-{3240496,3898640,3898560,0.0819545454545455,0.0419302325581395},
-{3240497,3898560,3898482,0.1114125,0.0524294117647059},
-{3240541,3889066,3889020,-1,0.036312},
-{3240542,3889020,3888806,-1,0.13460625},
-{3240543,3889609,3889715,0.0267384615384615,-1},
-{3240544,3889715,3889751,0.009675,-1},
-{3240545,3889979,3890169,0.0621666666666667,-1},
-{3240548,3895308,3895096,0.082665,-1},
-{3240549,3895096,3894890,0.0997333333333333,-1},
-{3240557,3877257,3876488,0.387095454545455,0.3548375},
-{3240561,3900248,3900319,0.0270162162162162,-1},
-{3240562,3900319,3900391,0.0440516129032258,-1},
-{3240575,3850015,3850459,0.0863076923076923,-1},
-{3240576,3850459,3850712,0.0526338461538462,-1},
-{3240577,3851040,3851047,0.00696,0.007656},
-{3240578,3850921,3850907,0.0638290909090909,0.0626892857142857},
-{3240579,3850907,3850898,0.0407263157894737,0.0393457627118644},
-{3240582,3849499,3848471,0.174534782608696,-1},
-{3240616,3859469,3859926,0.0767014925373134,0.0790615384615385},
-{3240617,3859926,3860588,0.111980281690141,0.116920588235294},
-{3240618,3860588,3861213,0.104825,0.109382608695652},
-{3240957,3872560,3872613,-1,0.00924255319148936},
-{3240958,3872019,3872576,0.13161,-1},
-{3240959,3872576,3872618,0.00672,-1},
-{3240965,3868214,3868192,-1,0.0132461538461538},
-{3240966,3868192,3868132,-1,0.0287739130434783},
-{3240967,3874228,3874152,0.0402571428571429,0.0301928571428571},
-{3240968,3855889,3855823,0.05496,0.05496},
-{3240989,3854734,3854655,-1,-1},
-{3240990,3854730,3854732,0.0531333333333333,0.0531333333333333},
-{3240991,3854732,3854734,0.0485076923076923,0.0485076923076923},
-{3240993,3860759,3861082,0.21375,0.244285714285714},
-{3240994,3861082,3861244,0.35131875,0.387662068965517},
-{3240995,3898539,3898631,-1,0.0583945945945946},
-{3240998,3876352,3876478,-1,0.0781909090909091},
-{3240999,3876478,3876488,0.00958536585365854,0.00836170212765957},
-{3241180,3898026,3898348,-1,-1},
-{3241181,3898026,3898016,0.0156882352941176,0.01524},
-{3241182,3898016,3897916,0.119914285714286,0.108309677419355},
-{3241183,3897916,3897897,0.08716,0.04085625},
-{3241184,3897897,3897842,-1,0.0906},
-{3241185,3898016,3898023,-1,0.48018},
-{3241186,3898023,3897897,-1,0.11754},
-{3241187,3898023,3898342,0.31512,0.31512},
-{3241202,3900539,3900530,-1,-1},
-{3241205,3901126,3900940,0.439422222222222,0.439422222222222},
-{3241207,3892054,3892117,0.0275866666666667,0.0326684210526316},
-{3241208,3890896,3891214,0.509953846153846,0.189411428571429},
-{3241209,3891214,3891497,-1,0.21475},
-{3241210,3891214,3891018,0.26185,-1},
-{3241254,3901044,3900908,-1,0.0487787234042553},
-{3241255,3900908,3900664,-1,0.0868897959183673},
-{3241256,3901127,3900983,0.057306976744186,-1},
-{3241257,3900983,3900739,0.0880595744680851,-1},
-{3241258,3900908,3900983,0.0942,0.0942},
-{3241284,3880122,3880273,-1,-1},
-{3241285,3880273,3879621,-1,-1},
-{3241293,3890134,3890336,0.0530042553191489,0.0593142857142857},
-{3241294,3890336,3890481,0.0435,0.0424883720930233},
-{3241295,3890129,3890335,0.149052631578947,0.104888888888889},
-{3241296,3890335,3891566,0.518361290322581,0.595155555555556},
-{3241297,3890336,3890335,0.02941875,0.037656},
-{3241301,3882748,3882537,0.0773066666666667,0.0756260869565217},
-{3241302,3883209,3882665,0.328444444444444,0.328444444444444},
-{3241303,3882665,3882443,0.132822222222222,0.132822222222222},
-{3241304,3882748,3882665,0.0506666666666667,0.0506666666666667},
-{3241388,3895234,3895356,0.0950228571428571,0.127915384615385},
-{3241389,3895356,3895361,-1,0.0554181818181818},
-{3241390,3895361,3895356,-1,0.0530608695652174},
-{3241462,3874311,3874500,-1,0.0631783783783784},
-{3241463,3874500,3875675,-1,0.3193375},
-{3241482,3903508,3902320,0.294982978723404,0.308093333333333},
-{3241483,3902320,3901384,0.184915789473684,0.184915789473684},
-{3241495,3903508,3903287,0.252853846153846,0.469585714285714},
-{3241496,3903287,3902480,0.323612903225806,0.3344},
-{3241532,3858619,3858733,-1,-1},
-{3241543,3876713,3876779,0.0347478260869565,0.04995},
-{3241544,3877381,3876774,0.233386046511628,0.244770731707317},
-{3241545,3876774,3876713,0.0214975609756098,0.02754375},
-{3241546,3876779,3876774,0.0472571428571429,-1},
-{3241548,3914399,3914994,-1,0.150452830188679},
-{3241549,3914994,3915224,-1,0.079152},
-{3241554,3916494,3916218,0.17025,0.194571428571429},
-{3241555,3916218,3915721,0.296163636363636,0.264145945945946},
-{3241556,3914994,3916218,0.72262,0.72262},
-{3241564,3877737,3877723,0.00983076923076923,0.0100235294117647},
-{3241565,3877723,3877381,0.170916,0.1780375},
-{3241573,3877874,3877844,0.0263222222222222,0.0278705882352941},
-{3241574,3877844,3877737,0.0882,0.0916588235294118},
-{3241575,3877737,3877874,-1,0.852923076923077},
-{3241588,3857953,3857749,0.0766363636363636,0.0766363636363636},
-{3241589,3857749,3857114,0.297085714285714,0.297085714285714},
-{3241590,3857311,3857309,0.103133333333333,0.126572727272727},
-{3241591,3857309,3857052,0.351365217391304,0.351365217391304},
-{3241592,3857749,3857533,0.0872222222222222,0.0872222222222222},
-{3241593,3857533,3857309,-1,-1},
-{3241594,3857953,3858022,-1,-1},
-{3241595,3858022,3858235,0.1378,0.1378},
-{3241606,3879752,3879898,0.0827777777777778,0.0827777777777778},
-{3241607,3859213,3859265,0.027705,0.0307833333333333},
-{3241608,3859265,3859316,0.0237076923076923,0.0264171428571429},
-{3241609,3859316,3859543,0.0783891891891892,0.0805666666666667},
-{3241610,3859543,3859655,0.0391875,0.0338918918918919},
-{3241611,3859265,3859543,0.147244444444444,-1},
-{3241612,3916346,3916420,0.0254341463414634,0.0359586206896552},
-{3241613,3916420,3917167,0.255160975609756,0.4359},
-{3241627,3880331,3880194,0.0711183673469388,0.0968},
-{3241628,3880194,3880076,0.071028,0.11098125},
-{3241629,3880488,3880331,0.0915658536585366,0.0816130434782609},
-{3241632,3879504,3879778,0.2546,0.2546},
-{3241633,3880109,3879778,0.134882926829268,-1},
-{3241634,3879859,3879504,-1,0.169127272727273},
-{3241635,3880109,3879956,0.175225,0.175225},
-{3241636,3879956,3879859,0.126190909090909,0.126190909090909},
-{3241637,3880488,3880341,0.08745,-1},
-{3241638,3880341,3880109,0.09444,-1},
-{3241639,3879956,3880079,0.0768,0.0768},
-{3241640,3880079,3880341,0.50142,0.50142},
-{3241641,3880194,3879975,-1,0.269215384615385},
-{3241642,3879975,3879859,-1,0.0625935483870968},
-{3241643,3880079,3879975,0.1681125,0.1681125},
-{3241644,3902402,3902279,-1,-1},
-{3241645,3883302,3884205,0.601688888888889,0.601688888888889},
-{3241688,3879778,3879439,0.1596,-1},
-{3241746,3881996,3881805,0.155347826086957,0.09925},
-{3241747,3881805,3881659,0.119647058823529,0.08136},
-{3241749,3881540,3881605,0.0450947368421053,0.04284},
-{3241750,3881605,3881659,0.0428857142857143,0.0562875},
-{3241751,3881805,3881605,0.19525,-1},
-{3241775,3883052,3883300,0.38136,0.38136},
-{3241776,3883315,3882977,0.134953846153846,0.187971428571429},
-{3241777,3882977,3882748,0.0902,0.0966428571428572},
-{3241778,3883052,3882977,0.1293,0.1293},
-{3241779,3882612,3882537,0.11256,0.11256},
-{3241780,3881942,3882056,0.2088,0.2088},
-{3241781,3881996,3882056,0.12354,0.12354},
-{3241786,3882160,3881954,0.191028571428571,0.211136842105263},
-{3241788,3882056,3882154,0.21564,0.21564},
-{3241789,3882154,3882612,0.80166,0.80166},
-{3241836,3922650,3922707,0.0492666666666667,0.0492666666666667},
-{3241846,3922239,3921983,0.194936842105263,0.18519},
-{3241847,3922239,3922326,0.0691111111111111,0.0691111111111111},
-{3241856,3921504,3921697,-1,-1},
-{3241857,3921697,3921983,-1,-1},
-{3241858,3921983,3922033,0.0324230769230769,0.0383181818181818},
-{3241864,3883058,3882206,0.400625,0.400625},
-{3241865,3882206,3882119,0.0394269230769231,0.0372763636363636},
-{3241866,3921938,3922046,0.158914285714286,0.171138461538462},
-{3241867,3922046,3921787,0.336046153846154,0.43686},
-{3241868,3922046,3922130,0.0584888888888889,0.0584888888888889},
-{3241871,3882119,3882343,-1,0.141775},
-{3241872,3882343,3882443,-1,0.05322},
-{3241873,3882206,3882343,0.180577777777778,-1},
-{3241874,3922033,3922227,0.336911111111111,0.336911111111111},
-{3241875,3922227,3922302,-1,-1},
-{3241876,3889225,3889711,0.294272727272727,0.294272727272727},
-{3241877,3922302,3922395,-1,-1},
-{3241878,3922395,3922513,-1,-1},
-{3241879,3922329,3922395,-1,-1},
-{3241881,3888770,3888502,-1,0.129422222222222},
-{3241882,3888850,3888908,-1,0.141992307692308},
-{3241883,3888908,3888770,-1,0.0595161290322581},
-{3241890,3890065,3890183,-1,-1},
-{3241891,3890183,3891335,-1,-1},
-{3241892,3922841,3922878,0.0281555555555556,0.0281555555555556},
-{3241893,3922878,3922918,0.0299777777777778,0.0299777777777778},
-{3241894,3922878,3922806,0.128911111111111,0.128911111111111},
-{3241895,3922806,3922918,0.101911111111111,0.101911111111111},
-{3241896,3922841,3922751,0.0673111111111111,0.0673111111111111},
-{3241897,3922751,3922611,-1,-1},
-{3241898,3923041,3922974,0.0597142857142857,0.057},
-{3241899,3922974,3922737,0.1912,0.1912},
-{3241900,3922737,3922974,0.193133333333333,0.193133333333333},
-{3241901,3922737,3922570,0.134844444444444,0.134844444444444},
-{3241915,3923243,3923178,0.0535333333333333,0.0535333333333333},
-{3241916,3923178,3923071,0.100711111111111,0.100711111111111},
-{3241917,3923071,3922862,-1,-1},
-{3241918,3923178,3923375,0.177266666666667,0.177266666666667},
-{3241919,3923375,3923515,-1,-1},
-{3241923,3882139,3878649,-1,-1},
-{3241924,3922732,3922831,0.0947111111111111,0.0947111111111111},
-{3241925,3922732,3922831,0.182844444444444,0.182844444444444},
-{3241926,3922831,3922882,0.0406222222222222,0.0406222222222222},
-{3241927,3922882,3923123,0.205666666666667,0.205666666666667},
-{3241928,3923002,3923102,0.0515846153846154,0.050295},
-{3241929,3923102,3923123,0.0127538461538462,0.0121317073170732},
-{3241930,3922882,3923102,0.571866666666667,0.571866666666667},
-{3241931,3883124,3883327,0.093495652173913,0.0896},
-{3241932,3883327,3883480,0.063816,0.0569785714285714},
-{3241933,3881869,3881997,0.07899,0.063192},
-{3241934,3881997,3882066,0.0598941176470588,0.0442695652173913},
-{3241937,3922505,3922377,0.0826444444444445,0.0826444444444445},
-{3241938,3922809,3923002,0.161155555555556,0.161155555555556},
-{3241939,3922505,3922742,0.172866666666667,0.172866666666667},
-{3241940,3922742,3922809,0.191475,0.191475},
-{3241941,3922377,3922643,0.177866666666667,0.177866666666667},
-{3241942,3922643,3922731,0.0751777777777778,0.0751777777777778},
-{3241943,3922742,3922643,0.0784,0.0784},
-{3241944,3885132,3885078,0.265,0.240348837209302},
-{3241945,3885078,3885073,0.00967692307692308,0.0102},
-{3241947,3883917,3884579,-1,-1},
-{3241948,3884585,3884579,0.0227333333333333,0.0227333333333333},
-{3241949,3922244,3922556,0.168989189189189,0.156315},
-{3241975,3890902,3891400,0.358672727272727,0.358672727272727},
-{3241976,3891400,3891335,-1,-1},
-{3242033,3890844,3891217,0.1386,0.1386},
-{3242034,3891217,3891457,-1,-1},
-{3242043,3920997,3921200,0.263711111111111,0.263711111111111},
-{3242044,3921200,3921311,0.085608,0.085608},
-{3242045,3920997,3921293,0.194,0.194},
-{3242046,3921293,3921200,0.0578222222222222,0.0578222222222222},
-{3242049,3885816,3885796,0.0730888888888889,0.0598},
-{3242050,3885796,3885787,0.0304444444444444,0.0293571428571429},
-{3242051,3885553,3885731,0.0878,0.0711891891891892},
-{3242052,3885731,3885787,0.0252774193548387,0.0230470588235294},
-{3242053,3885796,3885731,0.02736,-1},
-{3242059,3921311,3921224,0.057264,0.0795333333333333},
-{3242060,3921224,3921111,0.0847043478260869,0.102536842105263},
-{3242061,3921284,3921224,0.07768,0.07768},
-{3242062,3921284,3921364,0.1674,0.1674},
-{3242063,3921364,3921291,0.0510666666666667,0.0510666666666667},
-{3242064,3921364,3921405,0.0321333333333333,0.0321333333333333},
-{3242065,3921311,3921356,0.0399555555555556,0.0399555555555556},
-{3242066,3921356,3921284,0.0523111111111111,0.0523111111111111},
-{3242073,3921059,3921111,0.05736,0.0318666666666667},
-{3242085,3921059,3921180,-1,-1},
-{3242086,3921180,3921194,-1,-1},
-{3242095,3859258,3859179,-1,-1},
-{3242096,3859179,3858773,0.218111111111111,0.218111111111111},
-{3242103,3917234,3917628,-1,0.23976},
-{3242104,3920842,3920901,0.05493,0.0646235294117647},
-{3242105,3920901,3920755,0.136371428571429,0.168458823529412},
-{3242106,3917310,3917379,0.04265,-1},
-{3242107,3920901,3921402,-1,-1},
-{3242108,3921402,3921678,-1,-1},
-{3242109,3921291,3921402,-1,-1},
-{3242110,3921402,3921763,-1,-1},
-{3242114,3886042,3886037,0.0126558139534884,0.0129571428571429},
-{3242115,3886037,3885971,0.04206,0.0647076923076923},
-{3242116,3921975,3921846,0.103377777777778,0.103377777777778},
-{3242117,3921980,3922168,0.105666666666667,0.105666666666667},
-{3242125,3885971,3885601,0.251645454545455,0.3460125},
-{3242126,3885601,3885546,0.303521739130435,0.317318181818182},
-{3242127,3886037,3886021,0.0634133333333333,0.0663627906976744},
-{3242128,3886021,3885978,0.19886511627907,0.190026666666667},
-{3242129,3885601,3886021,0.300557142857143,-1},
-{3242136,3857094,3857327,-1,0.101110344827586},
-{3242137,3857116,3857327,0.160452631578947,-1},
-{3242138,3857094,3857116,0.0348,0.0348},
-{3242151,3898941,3899354,0.213364285714286,0.19914},
-{3242152,3899354,3899466,0.0654444444444445,0.0654444444444445},
-{3242153,3899493,3899472,0.111517647058824,0.101560714285714},
-{3242154,3899472,3899466,0.04365,0.0398210526315789},
-{3242155,3899354,3899472,0.0983333333333333,0.0885},
-{3242159,3921424,3921146,0.186155555555556,0.186155555555556},
-{3242160,3921559,3921597,0.0255333333333333,0.0265153846153846},
-{3242161,3921597,3921424,0.2146,0.2146},
-{3242162,3921424,3921597,0.0995333333333333,0.0995333333333333},
-{3242163,3921597,3921789,0.125088888888889,0.125088888888889},
-{3242165,3921875,3922258,0.175006451612903,0.187075862068966},
-{3242166,3922258,3922392,0.0510285714285714,0.0465913043478261},
-{3242167,3921642,3922003,-1,0.2386},
-{3242168,3922003,3922258,-1,0.1656},
-{3242169,3922003,3922146,0.0936666666666667,0.0936666666666667},
-{3242176,3870701,3870622,-1,0.19968},
-{3242177,3870622,3870451,0.162023076923077,0.162023076923077},
-{3242178,3869939,3869995,0.0993555555555556,0.0993555555555556},
-{3242179,3869995,3869823,0.139066666666667,0.139066666666667},
-{3242180,3869995,3870171,0.0781111111111111,0.0781111111111111},
-{3242181,3919012,3919219,0.0977560975609756,0.102769230769231},
-{3242182,3919219,3919281,0.0308057142857143,0.0326727272727273},
-{3242183,3922650,3922371,0.207860869565217,0.207860869565217},
-{3242184,3919281,3919236,0.0389739130434783,0.0689538461538461},
-{3242185,3919236,3918872,0.214508108108108,0.256025806451613},
-{3242186,3922611,3922547,-1,-1},
-{3242187,3922547,3922371,0.143488888888889,0.143488888888889},
-{3242188,3922371,3922455,0.194222222222222,0.194222222222222},
-{3242189,3922455,3922513,-1,-1},
-{3242190,3922547,3922455,0.0625333333333333,0.0625333333333333},
-{3242191,3899220,3899069,0.104966666666667,0.107965714285714},
-{3242192,3898770,3898995,0.102383333333333,0.11518125},
-{3242193,3899069,3898995,0.0317189189189189,-1},
-{3242194,3899029,3898726,0.183742105263158,0.183742105263158},
-{3242195,3898995,3899029,0.039,-1},
-{3242196,3899029,3899069,0.0298928571428571,-1},
-{3242200,3920606,3920914,0.325766666666667,0.308621052631579},
-{3242201,3920914,3921059,0.15264,0.0880615384615385},
-{3242202,3920864,3920914,0.08304,0.08304},
-{3242203,3920864,3920814,0.09426,0.09426},
-{3242204,3920605,3920864,0.4182,0.4182},
-{3242205,3920605,3920542,0.13446,0.13446},
-{3242206,3920814,3920658,0.4686,0.4686},
-{3242207,3920658,3920605,0.11334,0.11334},
-{3242208,3920542,3920603,0.10656,0.10656},
-{3242209,3920658,3920603,0.1173,0.1173},
-{3242210,3920603,3920473,0.25464,0.25464},
-{3242211,3920473,3920542,0.34752,0.34752},
-{3242212,3921119,3921362,0.1025,0.0838636363636364},
-{3242213,3921362,3921539,0.0577736842105263,0.0562923076923077},
-{3242217,3896505,3896952,0.270192,0.28145},
-{3242218,3896952,3897055,0.0645428571428572,0.0645428571428572},
-{3242219,3897055,3897101,0.0332423076923077,0.0314290909090909},
-{3242220,3897101,3897103,0.00204230769230769,0.00196666666666667},
-{3242221,3896952,3897101,0.14468,0.14468},
-{3242238,3884687,3884231,-1,0.3886875},
-{3242239,3884231,3884208,-1,0.0338285714285714},
-{3242240,3884628,3884587,0.2343,0.2343},
-{3242241,3884231,3884449,0.8316,0.8316},
-{3242247,3920606,3920784,0.078446511627907,0.0822731707317073},
-{3242248,3920784,3920983,0.102920930232558,0.100581818181818},
-{3242249,3919445,3919211,0.4299,0.4299},
-{3242250,3919721,3919445,1.35816,1.35816},
-{3242251,3919445,3919721,0.81012,0.81012},
-{3242252,3920784,3920705,0.11382,0.11382},
-{3242253,3920705,3920128,2.08032,2.08032},
-{3242254,3920128,3920705,2.01936,2.01936},
-{3242255,3920413,3920606,0.096153488372093,0.133374193548387},
-{3242256,3920128,3920089,0.16704,0.16704},
-{3242257,3920413,3920089,0.45036,0.45036},
-{3242258,3920089,3919911,0.30192,0.30192},
-{3242259,3919911,3919319,0.86328,0.86328},
-{3242260,3885020,3885087,0.319278260869565,0.319278260869565},
-{3242261,3885087,3885143,0.4857,0.4857},
-{3242262,3919911,3919843,0.27312,0.27312},
-{3242263,3919843,3919720,1.31424,1.31424},
-{3242264,3919720,3919440,0.78636,0.78636},
-{3242265,3919843,3919720,0.4656,0.4656},
-{3242266,3920089,3919938,0.7134,0.7134},
-{3242267,3919938,3919782,0.501,0.501},
-{3242268,3919938,3919782,1.34916,1.34916},
-{3242269,3919782,3919755,0.11184,0.11184},
-{3242270,3919755,3919721,0.13536,0.13536},
-{3242271,3920053,3920413,0.160275,0.156365853658537},
-{3242273,3919211,3919695,0.164657142857143,0.17289},
-{3242274,3919755,3920029,-1,0.45696},
-{3242275,3920029,3920053,-1,0.0150692307692308},
-{3242283,3881799,3878878,-1,-1},
-{3242286,3878878,3878855,-1,-1},
-{3242287,3878855,3880429,-1,-1},
-{3242288,3880408,3880839,-1,-1},
-{3242289,3880429,3880839,-1,-1},
-{3242301,3889019,3889088,0.40026,0.40026},
-{3242302,3885834,3887715,1.03494,1.03494},
-{3242303,3887715,3889019,0.63141,0.63141},
-{3242304,3887351,3887340,0.19704,0.19704},
-{3242306,3887351,3889654,1.20468,1.20468},
-{3242309,3903138,3903559,-1,-1},
-{3242310,3903559,3903036,-1,-1},
-{3242318,3913400,3913589,0.121533333333333,0.10938},
-{3242319,3913589,3913602,0.00619090909090909,0.00681},
-{3242324,3913591,3913625,0.0156705882352941,0.0111},
-{3242325,3913625,3914075,0.322833333333333,0.242125},
-{3242328,3923213,3923239,0.0227333333333333,0.0227333333333333},
-{3242329,3923239,3923686,-1,-1},
-{3242333,3921362,3921441,0.144415384615385,0.234675},
-{3242337,3921578,3921964,0.328088888888889,0.328088888888889},
-{3242338,3921441,3921448,0.01848,0.0462},
-{3242339,3921441,3921738,1.47385714285714,-1},
-{3242340,3921738,3921578,0.190909090909091,-1},
-{3242341,3921448,3921476,0.0317454545454545,0.0582},
-{3242344,3921448,3921653,0.15392,0.23088},
-{3242345,3921476,3921653,0.22092,0.22092},
-{3242347,3921476,3921513,0.0298666666666667,0.03584},
-{3242348,3921513,3921578,0.0496105263157895,0.0496105263157895},
-{3242350,3921653,3921686,0.0204,0.0204},
-{3242351,3921686,3921738,0.0436222222222222,-1},
-{3242352,3921513,3921686,0.2127,0.2127},
-{3242364,3893648,3893806,0.0918222222222222,0.0854896551724138},
-{3242365,3882361,3882426,0.0231647058823529,0.0319297297297297},
-{3242366,3882426,3883123,0.1874,-1},
-{3242369,3882426,3883031,-1,0.21816},
-{3242380,3911768,3912513,0.536433333333333,0.4598},
-{3242381,3912513,3913061,0.3788625,0.336766666666667},
-{3242383,3912355,3912519,0.0914086956521739,0.10512},
-{3242384,3912519,3912546,0.00694838709677419,0.00936521739130435},
-{3242385,3893210,3893266,0.013104,0.013104},
-{3242386,3893219,3893718,0.313118181818182,0.287025},
-{3242396,3909590,3909633,0.01185,0.0116081632653061},
-{3242399,3900345,3900783,0.293777777777778,0.293777777777778},
-{3242400,3900783,3900886,-1,-1},
-{3242401,3919957,3920158,0.0733813953488372,0.0717136363636364},
-{3242402,3920158,3920353,0.060465,0.0620153846153846},
-{3242405,3920816,3920925,0.79974,0.79974},
-{3242406,3920925,3920816,0.1647,0.1647},
-{3242410,3920158,3920271,0.18216,0.18216},
-{3242411,3920271,3920816,1.1019,1.1019},
-{3242412,3920482,3920610,0.214636363636364,0.214636363636364},
-{3242413,3920271,3920610,0.46188,0.46188},
-{3242414,3920610,3920628,-1,0.0177272727272727},
-{3242415,3920628,3921305,-1,0.47875},
-{3242418,3917921,3918321,0.12942,0.136231578947368},
-{3242419,3918321,3918821,0.178584615384615,0.17412},
-{3242420,3918484,3918321,-1,-1},
-{3242421,3901248,3900846,0.120661538461538,0.104573333333333},
-{3242422,3901248,3901284,0.114975,0.18396},
-{3242423,3901284,3901209,0.0648,0.0891},
-{3242424,3901284,3901327,0.0246666666666667,0.0246666666666667},
-{3242425,3896012,3895938,-1,-1},
-{3242426,3917875,3917981,0.0756315789473684,0.0898125},
-{3242427,3917981,3918196,0.154642105263158,0.163233333333333},
-{3242442,3916601,3916420,-1,-1},
-{3242451,3899210,3899646,0.0983586206896552,-1},
-{3242452,3910572,3910757,-1,-1},
-{3242453,3918837,3919232,0.220569230769231,0.136542857142857},
-{3242454,3918837,3919471,-1,0.329888888888889},
-{3242455,3919326,3919360,-1,0.03996},
-{3242456,3919360,3919471,-1,0.0543257142857143},
-{3242457,3919232,3919360,-1,0.0885818181818182},
-{3242458,3913103,3914483,-1,-1},
-{3242459,3919695,3919879,0.168317647058824,0.130063636363636},
-{3242461,3919879,3920053,0.0967538461538461,0.0898428571428572},
-{3242462,3919695,3920029,-1,0.283628571428571},
-{3242465,3914483,3912088,-1,-1},
-{3242466,3915906,3916007,0.0953357142857143,0.0651073170731707},
-{3242467,3916007,3916164,0.2355375,0.139577777777778},
-{3242468,3916164,3916368,0.0592528301886793,0.0570981818181818},
-{3242469,3916368,3916961,0.146116981132075,0.140803636363636},
-{3242470,3916007,3916368,0.546323076923077,0.5073},
-{3242520,3873951,3874082,0.0402439024390244,-1},
-{3242521,3874082,3874281,0.06,-1},
-{3242522,3897268,3897418,0.22584,0.22584},
-{3242531,3901655,3901874,0.126288888888889,0.126288888888889},
-{3242532,3901874,3902285,0.214955555555556,0.214955555555556},
-{3242540,3917137,3917299,0.0671657142857143,-1},
-{3242634,3910675,3911082,0.337213953488372,0.45313125},
-{3242635,3911082,3911220,0.226689473684211,0.297041379310345},
-{3242636,3911370,3911361,0.02502,0.02502},
-{3242637,3911361,3911290,0.14916,0.14916},
-{3242638,3911082,3911361,0.14874,0.14874},
-{3242661,3910865,3910970,0.0557714285714286,0.0557714285714286},
-{3242662,3910970,3910949,0.0789652173913044,0.0672666666666667},
-{3242668,3911011,3911099,0.02724,0.0360529411764706},
-{3242669,3911099,3911282,0.0643285714285714,0.08443125},
-{3242670,3910970,3910988,0.0230275862068966,0.0230275862068966},
-{3242671,3910988,3911282,0.19851,0.19851},
-{3242672,3911099,3910988,0.29745,0.29745},
-{3242683,3891497,3891822,-1,0.147317647058824},
-{3242684,3891760,3891915,0.0749842105263158,0.0814114285714286},
-{3242685,3891915,3892054,0.0665714285714286,0.0735789473684211},
-{3242686,3907016,3907159,0.0275877551020408,-1},
-{3242687,3906700,3906856,0.0367304347826087,-1},
-{3242688,3906856,3906877,0.00473333333333333,-1},
-{3242691,3919626,3919532,-1,0.0514461538461538},
-{3242692,3919532,3919459,-1,0.0373058823529412},
-{3242694,3892977,3892193,0.273365217391304,-1},
-{3242695,3893024,3893037,0.0196875,0.0196875},
-{3242696,3893037,3893563,0.487133333333333,0.487133333333333},
-{3242697,3893024,3892977,0.0145565217391304,-1},
-{3242698,3893138,3893024,0.0498954545454546,-1},
-{3242699,3894487,3894506,0.012227027027027,0.0137090909090909},
-{3242700,3894506,3894941,0.315488888888889,0.37035652173913},
-{3242702,3894171,3894470,0.140571428571429,0.1476},
-{3242703,3894470,3894487,0.0082054054054054,0.0092},
-{3242704,3894443,3894470,0.0173777777777778,-1},
-{3242707,3893307,3893782,-1,0.226960975609756},
-{3242708,3893138,3893173,-1,0.020565},
-{3242709,3893173,3893307,-1,0.0831090909090909},
-{3242710,3893143,3893278,0.0808666666666667,-1},
-{3242711,3895950,3895930,-1,-1},
-{3242712,3896104,3896113,0.126266666666667,0.126266666666667},
-{3242716,3893143,3892983,-1,0.0701857142857143},
-{3242717,3892983,3892156,-1,0.279510638297872},
-{3242718,3893024,3892983,0.0278526315789474,0.02646},
-{3242724,3893278,3893742,0.223360975609756,-1},
-{3242725,3893782,3893742,0.05116,0.0403894736842105},
-{3242726,3896356,3896534,0.0740666666666667,0.0740666666666667},
-{3242727,3896329,3896393,0.08048,0.08048},
-{3242728,3896393,3896534,0.104733333333333,0.104733333333333},
-{3242729,3896356,3896393,0.0941111111111111,0.0941111111111111},
-{3242759,3888283,3888378,0.172177777777778,0.172177777777778},
-{3242760,3888131,3888283,0.0693,0.0693},
-{3242761,3888378,3888131,0.197666666666667,-1},
-{3242762,3903889,3903467,0.267321428571429,0.440294117647059},
-{3242763,3903467,3903057,0.178389473684211,0.178389473684211},
-{3242765,3916335,3916387,0.821109090909091,0.821109090909091},
-{3242766,3904282,3904520,0.0607854545454545,0.0726782608695652},
-{3242767,3904520,3904565,0.0121178571428571,0.0138489795918367},
-{3242768,3903467,3903572,0.0968210526315789,0.108211764705882},
-{3242769,3904283,3904520,0.135830769230769,0.1308},
-{3242770,3903572,3904283,0.793542857142857,0.793542857142857},
-{3242771,3915447,3916261,-1,-1},
-{3242772,3903572,3903822,0.40552,0.40552},
-{3242773,3903935,3904283,0.283357894736842,0.26919},
-{3242774,3903822,3903935,0.0887428571428571,0.109623529411765},
-{3242775,3916387,3916261,0.127863157894737,0.127863157894737},
-{3242776,3916282,3916261,0.0162333333333333,0.0153789473684211},
-{3242777,3916762,3917118,0.17472,0.1248},
-{3242778,3916659,3916387,0.428966666666667,0.428966666666667},
-{3242779,3916282,3916659,0.309663157894737,0.255808695652174},
-{3242780,3916659,3916762,0.0608086956521739,0.04995},
-{3242781,3916261,3916659,0.594,0.565714285714286},
-{3242783,3905120,3905293,0.0684130434782609,-1},
-{3242784,3905293,3905882,0.43233,-1},
-{3242785,3904858,3904943,0.0172363636363636,0.0185882352941176},
-{3242786,3904943,3905162,0.0623555555555555,0.0647538461538461},
-{3242787,3905162,3905225,0.0192905660377359,0.020448},
-{3242788,3905162,3905005,0.162233333333333,-1},
-{3242789,3904819,3904610,0.187333333333333,0.187333333333333},
-{3242790,3904610,3904666,0.11046,0.11046},
-{3242791,3859613,3859823,0.0878689655172414,0.106175},
-{3242792,3905293,3904946,0.209914285714286,0.217688888888889},
-{3242793,3904946,3904819,0.0477724137931034,-1},
-{3242794,3904666,3904846,0.115486956521739,0.126485714285714},
-{3242795,3904846,3904946,0.0621096774193548,-1},
-{3242796,3904778,3904846,0.0344,-1},
-{3242797,3904666,3904738,0.0748125,0.0748125},
-{3242798,3904686,3904943,0.268058823529412,-1},
-{3242799,3904738,3904686,0.142511111111111,0.142511111111111},
-{3242800,3905005,3904854,0.101858823529412,0.101858823529412},
-{3242801,3904854,3904686,0.13635,0.13635},
-{3242802,3904738,3904854,0.13695,0.128894117647059},
-{3242803,3904738,3905005,0.335022222222222,-1},
-{3242804,3904819,3904778,0.04096,-1},
-{3242805,3904778,3904610,0.127515789473684,0.127515789473684},
-{3242816,3910695,3910757,0.178032,0.178032},
-{3242817,3910695,3910759,0.04275,0.04275},
-{3242825,3910671,3910820,0.0852,0.0852},
-{3242826,3910757,3910787,0.0881142857142857,0.0881142857142857},
-{3242827,3910787,3910806,0.0568888888888889,0.0568888888888889},
-{3242828,3910806,3910917,0.0551777777777778,0.0551777777777778},
-{3242829,3910917,3911207,0.141977777777778,0.141977777777778},
-{3242830,3910787,3910917,0.0508,0.0508},
-{3242832,3851899,3852127,0.208222222222222,0.208222222222222},
-{3242833,3852215,3852127,0.0440222222222222,0.0440222222222222},
-{3242834,3852127,3852019,0.0541333333333333,0.0541333333333333},
-{3242849,3860500,3860640,0.0681913043478261,0.0667404255319149},
-{3242850,3860640,3860922,0.156516279069767,0.152959090909091},
-{3242851,3860640,3861065,0.219955555555556,0.219955555555556},
-{3242852,3860922,3861044,0.158356097560976,0.150990697674419},
-{3242853,3861044,3861059,0.0211434782608696,0.0226186046511628},
-{3242854,3861044,3861373,0.168511111111111,0.168511111111111},
-{3242892,3863053,3862584,0.514755555555556,0.514755555555556},
-{3242893,3862584,3862204,0.2538,0.2538},
-{3242894,3862720,3862525,0.239290909090909,0.210576},
-{3242895,3862525,3862363,0.225221052631579,0.225221052631579},
-{3242896,3862525,3862097,0.176666666666667,0.176666666666667},
-{3242902,3866430,3865737,0.579458823529412,0.579458823529412},
-{3242903,3865737,3865622,0.0677666666666667,0.0451777777777778},
-{3242904,3865831,3865708,0.0486,0.0271255813953488},
-{3242905,3865708,3865622,0.0255096774193548,0.0188285714285714},
-{3242906,3865737,3865708,0.0238166666666667,-1},
-{3242908,3864109,3863803,0.142377777777778,0.142377777777778},
-{3242913,3864983,3865979,0.443288888888889,0.443288888888889},
-{3242914,3867566,3866633,0.265954285714286,0.358015384615385},
-{3242915,3866633,3866114,0.14218064516129,0.14692},
-{3242916,3866633,3866590,0.0987111111111111,0.0987111111111111},
-{3242918,3867150,3866914,0.1082,0.1082},
-{3242922,3866579,3866355,0.202444444444444,0.202444444444444},
-{3242923,3866954,3866719,0.220133333333333,0.220133333333333},
-{3242924,3866719,3866579,-1,-1},
-{3242925,3867698,3867760,-1,-1},
-{3242926,3867760,3867547,0.0854444444444445,0.0854444444444445},
-{3242927,3867566,3867547,-1,-1},
-{3242928,3867547,3867480,0.211066666666667,0.211066666666667},
-{3242935,3867305,3867747,0.182884615384615,0.182884615384615},
-{3242936,3867747,3868048,0.129913043478261,0.129913043478261},
-{3242937,3869759,3869388,0.213111111111111,0.213111111111111},
-{3242938,3873479,3873488,0.01075,0.010530612244898},
-{3242939,3873358,3872059,0.354384615384615,0.383916666666667},
-{3242940,3873485,3873484,0.016475,0.0175733333333333},
-{3242941,3873484,3873479,0.012465306122449,0.0132782608695652},
-{3242942,3873479,3873413,0.042,0.035},
-{3242943,3873413,3873358,0.03096,0.0281454545454545},
-{3242946,3869583,3869329,0.10905,0.10905},
-{3242947,3869329,3869206,-1,-1},
-{3242957,3850077,3849921,0.078576,0.0677379310344828},
-{3242958,3849921,3849479,0.211244444444444,0.183987096774194},
-{3242959,3849921,3849299,0.760177777777778,0.760177777777778},
-{3242960,3870284,3870239,-1,-1},
-{3242961,3869755,3869700,0.36006,0.36006},
-{3242962,3860120,3860261,0.180469565217391,0.180469565217391},
-{3242963,3860261,3860267,0.0157333333333333,0.0157333333333333},
-{3242964,3860261,3860438,-1,-1},
-{3242965,3860261,3860021,0.128066666666667,0.128066666666667},
-{3242966,3860021,3860007,0.0831777777777778,0.0831777777777778},
-{3242967,3859769,3860021,-1,-1},
-{3242970,3870681,3870682,0.00153333333333333,0.00153333333333333},
-{3242971,3870485,3870681,0.0686,0.0686},
-{3242974,3858791,3858968,-1,-1},
-{3242975,3858825,3858925,0.0431777777777778,0.0431777777777778},
-{3242976,3858925,3859000,-1,-1},
-{3242979,3859353,3859326,0.0106227272727273,0.0106227272727273},
-{3242980,3859326,3859155,0.05848,0.05848},
-{3242981,3859644,3859436,-1,0.21918},
-{3242982,3859436,3859226,-1,0.1803},
-{3242983,3859326,3859436,-1,-1},
-{3242984,3862158,3862038,0.28191724137931,0.291985714285714},
-{3242985,3862038,3862018,0.0694636363636364,0.0727714285714286},
-{3242986,3862148,3862038,0.098664,-1},
-{3242987,3863120,3862449,0.221545945945946,0.2561625},
-{3242988,3870971,3871035,0.0415555555555556,0.0415555555555556},
-{3242989,3870971,3870788,0.10863,0.10863},
-{3242990,3870788,3870129,0.244577777777778,0.244577777777778},
-{3242991,3878230,3878137,-1,0.2116},
-{3242992,3877159,3878137,0.363327272727273,0.32625306122449},
-{3242993,3878137,3878290,-1,0.0920823529411765},
-{3242997,3876894,3876587,-1,0.114457894736842},
-{3242998,3876715,3876894,-1,0.0723782608695652},
-{3242999,3876894,3877159,0.101804347826087,0.09366},
-{3243000,3870909,3870752,0.0971333333333333,0.1457},
-{3243001,3870752,3870747,0.00246315789473684,0.0036},
-{3243002,3870752,3870602,-1,-1},
-{3243003,3870602,3870681,0.0924222222222222,0.0924222222222222},
-{3243005,3850376,3849162,-1,-1},
-{3243007,3851283,3851306,0.029736,0.0391263157894737},
-{3243008,3851306,3851746,0.212181818181818,0.241448275862069},
-{3243010,3850876,3850510,0.216222222222222,0.216222222222222},
-{3243016,3871900,3872417,-1,-1},
-{3243017,3871607,3871621,0.0249260869565217,-1},
-{3243018,3871721,3871607,0.0655764705882353,0.07432},
-{3243019,3871642,3871682,-1,0.0693},
-{3243020,3871682,3871721,-1,0.0551526315789474},
-{3243021,3871547,3871582,0.0458625,-1},
-{3243022,3871582,3871607,0.0442851063829787,-1},
-{3243023,3871682,3871582,0.0189411764705882,0.0189411764705882},
-{3243024,3878496,3878364,0.0385826086956522,-1},
-{3243025,3878950,3878922,0.0107,-1},
-{3243026,3879076,3878919,-1,0.0420566037735849},
-{3243027,3878919,3878689,-1,0.0689192307692308},
-{3243028,3878689,3878919,0.2511,-1},
-{3243029,3878562,3878407,0.10833,-1},
-{3243030,3878407,3878205,0.156433333333333,-1},
-{3243031,3878496,3878471,-1,0.0838235294117647},
-{3243032,3878471,3878922,-1,0.341647058823529},
-{3243033,3878407,3878471,-1,0.0624},
-{3243035,3878689,3878525,-1,0.040665306122449},
-{3243036,3878525,3878421,-1,0.03315},
-{3243037,3878922,3878646,0.08725,-1},
-{3243038,3878646,3878496,0.0418085106382979,-1},
-{3243039,3859948,3859774,0.059115,0.0563},
-{3243040,3859774,3859562,0.0931655172413793,0.0711},
-{3243044,3851701,3849923,0.547442857142857,0.489204255319149},
-{3243049,3861944,3861652,0.0763764705882353,0.0721333333333333},
-{3243050,3861652,3861568,0.0243411764705882,0.023422641509434},
-{3243051,3862428,3861715,0.481822222222222,0.481822222222222},
-{3243052,3861715,3861652,-1,-1},
-{3243054,3886888,3886782,0.0569181818181818,-1},
-{3243055,3886782,3885804,0.275707317073171,-1},
-{3243056,3886782,3886726,0.1218,-1},
-{3243057,3886726,3886802,0.0750857142857143,0.10512},
-{3243058,3886802,3886807,0.0429,0.0449428571428571},
-{3243059,3886807,3886847,0.0514105263157895,-1},
-{3243060,3886847,3886888,0.129860869565217,-1},
-{3243061,3886802,3886847,0.01746,-1},
-{3243062,3877560,3878066,0.279933333333333,-1},
-{3243063,3877560,3877542,0.05058,0.06744},
-{3243064,3878066,3878052,0.0475813953488372,-1},
-{3243065,3878052,3877943,0.234860377358491,-1},
-{3243066,3877930,3878052,-1,0.114572727272727},
-{3243067,3877321,3877314,0.0502421052631579,0.0502421052631579},
-{3243068,3877930,3877321,-1,1.30152},
-{3243069,3877898,3877812,0.168294545454545,-1},
-{3243070,3877980,3877888,-1,0.213559090909091},
-{3243071,3877898,3877980,0.0488,0.0305},
-{3243072,3877542,3877427,0.296715789473684,0.296715789473684},
-{3243073,3889464,3889544,0.0473733333333333,0.0435061224489796},
-{3243074,3889544,3889872,0.19185,0.1438875},
-{3243075,3888450,3889544,0.49569375,-1},
-{3243076,3889352,3890607,0.272830188679245,-1},
-{3243078,3877775,3877898,0.07788,0.0449307692307692},
-{3243079,3877943,3877919,0.0553473684210526,-1},
-{3243080,3877919,3877898,0.0314275862068965,-1},
-{3243081,3877775,3877919,-1,0.0783931034482759},
-{3243082,3890694,3890815,-1,0.0312279069767442},
-{3243083,3890815,3890952,-1,0.0423627906976744},
-{3243084,3890952,3891031,-1,0.0243571428571429},
-{3243088,3877314,3877417,0.0290181818181818,0.02394},
-{3243089,3877417,3877775,0.141825,0.10636875},
-{3243090,3877321,3877417,-1,0.0408},
-{3243091,3893439,3893501,0.0492375,0.0477454545454545},
-{3243092,3893439,3893284,-1,0.53424},
-{3243093,3893284,3893501,-1,0.52752},
-{3243094,3877580,3877621,-1,0.00878918918918919},
-{3243095,3877621,3878079,-1,0.158958620689655},
-{3243096,3878150,3878135,-1,0.0429260869565217},
-{3243097,3878135,3878017,-1,0.264970212765957},
-{3243098,3878017,3877991,-1,0.0690666666666667},
-{3243099,3877991,3877980,-1,0.0354875},
-{3243100,3901522,3901670,0.332311111111111,0.332311111111111},
-{3243101,3901670,3901719,0.0268888888888889,0.0268888888888889},
-{3243102,3901670,3901597,0.0272,0.0272},
-{3243103,3883658,3883610,0.0290076923076923,-1},
-{3243104,3885289,3886276,0.270505263157895,0.302329411764706},
-{3243105,3886276,3886726,0.240782608695652,0.23075},
-{3243106,3886103,3886276,-1,-1},
-{3243107,3886045,3886174,-1,-1},
-{3243108,3875733,3875323,0.19235,0.15388},
-{3243109,3875323,3875124,0.145447058823529,0.107504347826087},
-{3243110,3875323,3875373,0.115044444444444,0.115044444444444},
-{3243112,3887860,3887953,0.0321857142857143,-1},
-{3243113,3887953,3887990,0.0233428571428571,-1},
-{3243114,3887842,3887953,-1,0.0231076923076923},
-{3243115,3887957,3888028,-1,0.0349363636363636},
-{3243116,3888028,3888061,-1,0.0156818181818182},
-{3243117,3887953,3888028,-1,0.0289875},
-{3243118,3884812,3885013,0.194,0.127756097560976},
-{3243119,3885013,3885054,0.0276909090909091,0.0198652173913043},
-{3243120,3889387,3889598,0.105876923076923,0.161929411764706},
-{3243121,3889598,3890417,0.251944186046512,0.300933333333333},
-{3243122,3889598,3889508,0.248733333333333,0.248733333333333},
-{3243123,3875553,3875772,0.0915692307692308,0.140047058823529},
-{3243124,3875772,3875735,0.0748444444444444,0.0748444444444444},
-{3243125,3875772,3876140,0.236273684210526,0.236273684210526},
-{3243126,3876140,3876263,0.0492666666666667,0.0492666666666667},
-{3243127,3876140,3876117,0.0650666666666667,0.0650666666666667},
-{3243130,3886438,3886467,0.0468352941176471,0.06635},
-{3243131,3885811,3886438,-1,0.157883720930233},
-{3243132,3885013,3885497,-1,0.21145},
-{3243133,3885497,3885811,-1,0.0823857142857143},
-{3243134,3887261,3887232,0.0464,0.0464},
-{3243136,3889344,3889361,0.0419428571428571,0.0326222222222222},
-{3243137,3900187,3899672,0.318418181818182,0.269430769230769},
-{3243138,3899672,3899241,0.190059574468085,0.194191304347826},
-{3243139,3899672,3899539,0.0658384615384615,-1},
-{3243140,3899539,3900093,-1,0.373606451612903},
-{3243141,3899539,3899420,0.0690782608695652,-1},
-{3243142,3900093,3900293,-1,0.111363636363636},
-{3243143,3899420,3899345,0.043392,-1},
-{3243144,3899345,3898876,0.245911111111111,0.245911111111111},
-{3243145,3899420,3900174,1.02636,-1},
-{3243146,3900174,3900293,0.0786,0.0786},
-{3243147,3899345,3900174,0.630444444444444,-1},
-{3243148,3911532,3911961,0.147014285714286,-1},
-{3243149,3911899,3912621,0.123402857142857,-1},
-{3243150,3911532,3911899,0.109213636363636,-1},
-{3243151,3900128,3900295,0.231890322580645,-1},
-{3243152,3900295,3900187,0.0782117647058823,0.0738666666666667},
-{3243153,3900103,3900843,0.222102857142857,-1},
-{3243154,3900843,3901000,0.0573833333333333,-1},
-{3243155,3910193,3911899,0.311966197183099,-1},
-{3243156,3909953,3910320,0.107655,-1},
-{3243157,3910320,3910848,0.162965853658537,-1},
-{3243158,3910193,3910320,0.040836,-1},
-{3243159,3900295,3900654,0.353647058823529,0.353647058823529},
-{3243160,3900452,3900187,0.3380625,0.154542857142857},
-{3243161,3900654,3900452,0.162631578947368,-1},
-{3243162,3900654,3900735,0.0484888888888889,-1},
-{3243163,3900735,3900843,0.0413117647058824,-1},
-{3243164,3900500,3900452,-1,0.0286604651162791},
-{3243165,3900735,3900500,-1,0.137822222222222},
-{3243166,3900864,3900896,-1,0.0107538461538462},
-{3243167,3900896,3901057,-1,0.0617090909090909},
-{3243168,3896942,3897057,0.1074,0.0835333333333333},
-{3243169,3916895,3916925,0.0139235294117647,0.0182076923076923},
-{3243170,3916896,3916895,0.0170487804878049,-1},
-{3243171,3898217,3898849,0.296757142857143,0.519325},
-{3243172,3898849,3899241,0.1654,0.158784},
-{3243173,3916895,3916952,0.0137268292682927,-1},
-{3243174,3897057,3897545,0.199753846153846,0.199753846153846},
-{3243175,3897545,3898849,0.476042857142857,0.434647826086957},
-{3243176,3897395,3897545,0.0910666666666667,0.0910666666666667},
-{3243177,3880834,3880792,0.0197379310344828,-1},
-{3243178,3880792,3880565,0.0933483870967742,-1},
-{3243179,3880792,3880912,-1,0.0728666666666667},
-{3243180,3880834,3880909,-1,0.0234},
-{3243181,3880912,3880909,-1,0.0475714285714286},
-{3243182,3894345,3894418,0.137542857142857,-1},
-{3243225,3891032,3891189,0.213466666666667,0.19212},
-{3243226,3891189,3891630,0.2622,0.251275},
-{3243227,3892335,3892022,0.0947375,-1},
-{3243228,3889185,3889337,0.0701478260869565,-1},
-{3243229,3889237,3889249,0.00809230769230769,0.0116888888888889},
-{3243230,3889249,3889337,0.0425560975609756,0.0562838709677419},
-{3243231,3889185,3889249,0.068592,-1},
-{3243232,3888028,3889059,-1,0.4731},
-{3243233,3887854,3887660,0.0920526315789474,-1},
-{3243234,3887660,3887592,0.0291,-1},
-{3243235,3889059,3887660,-1,0.442747058823529},
-{3243237,3887232,3887978,-1,0.160053333333333},
-{3243238,3887978,3888091,-1,0.02896},
-{3243239,3888036,3887978,0.0951157894736842,-1},
-{3243240,3893557,3894694,0.399814925373134,0.4252},
-{3243241,3895900,3896440,0.611066666666667,0.611066666666667},
-{3243242,3880912,3881114,0.0679764705882353,-1},
-{3243243,3883321,3883384,0.037695652173913,0.0456315789473684},
-{3243244,3883384,3883419,0.0157111111111111,0.0192818181818182},
-{3243245,3883067,3883178,-1,0.0378},
-{3243246,3883178,3883321,-1,0.0642954545454545},
-{3243247,3883384,3883178,0.09896,-1},
-{3243248,3883000,3883113,0.0508536585365854,-1},
-{3243249,3883113,3883280,0.0763166666666667,-1},
-{3243250,3887854,3887933,-1,0.0278590909090909},
-{3243251,3887933,3887957,-1,0.00827727272727273},
-{3243252,3887261,3887993,0.211288235294118,-1},
-{3243253,3887993,3888120,0.0407225806451613,-1},
-{3243254,3911025,3911705,-1,0.133411267605634},
-{3243255,3911705,3912518,-1,0.149434782608696},
-{3243256,3908543,3910257,-1,0.3258},
-{3243257,3910257,3911025,-1,0.134117142857143},
-{3243258,3894332,3894345,0.0365672727272727,0.0365672727272727},
-{3243259,3894345,3894349,0.00417966101694915,0.00474230769230769},
-{3243261,3887326,3887580,0.098835,-1},
-{3243262,3887580,3887667,0.0358883720930233,-1},
-{3243263,3888061,3889075,0.27624,-1},
-{3243264,3889075,3889185,0.0499241379310345,-1},
-{3243310,3856054,3855397,0.271555555555556,0.271555555555556},
-{3243311,3855397,3855414,0.0410666666666667,0.0410666666666667},
-{3243312,3858469,3858129,0.442690909090909,-1},
-{3243313,3858129,3858259,0.429342857142857,0.429342857142857},
-{3243314,3858129,3858253,0.179866666666667,0.179866666666667},
-{3243315,3858253,3858465,0.227218181818182,0.227218181818182},
-{3243316,3868242,3868270,0.0248727272727273,0.02736},
-{3243317,3868270,3868287,0.0209454545454545,0.02304},
-{3243318,3867959,3867935,0.0358,0.03759},
-{3243319,3867935,3867362,0.4486875,0.4486875},
-{3243320,3867962,3867935,-1,-1},
-{3243321,3868270,3868226,-1,-1},
-{3243322,3869325,3869302,0.0167571428571429,0.0138},
-{3243323,3869302,3869012,0.130714285714286,0.111585365853659},
-{3243324,3869302,3869340,-1,-1},
-{3243325,3869827,3869882,-1,-1},
-{3243326,3870038,3870057,0.03306,0.03306},
-{3243327,3870922,3870936,0.0307304347826087,0.044175},
-{3243328,3871814,3871762,0.0222,0.0191166666666667},
-{3243329,3871762,3871704,0.0827333333333333,0.07446},
-{3243330,3871488,3871757,0.120445161290323,0.128751724137931},
-{3243331,3871757,3871814,0.0410275862068965,0.0626210526315789},
-{3243332,3871762,3871757,-1,0.050775},
-{3243333,3871898,3871814,0.0272896551724138,0.0208263157894737},
-{3243334,3871757,3871898,-1,0.0340923076923077},
-{3243335,3860366,3860075,0.170933333333333,0.170933333333333},
-{3243336,3860075,3859877,-1,-1},
-{3243337,3870936,3871462,-1,0.143223529411765},
-{3243338,3871462,3871787,-1,0.122184},
-{3243339,3875475,3875365,-1,0.163529032258065},
-{3243340,3875365,3875321,-1,0.0819483870967742},
-{3243341,3875365,3875567,0.334355555555556,0.334355555555556},
-{3243342,3875200,3875541,-1,0.0955733333333333},
-{3243343,3875541,3875936,-1,0.0916933333333333},
-{3243344,3875541,3875793,-1,-1},
-{3243345,3875793,3875826,-1,-1},
-{3243346,3875500,3875793,-1,-1},
-{3243347,3875793,3876019,-1,-1},
-{3243348,3876102,3876019,0.0772222222222222,0.0772222222222222},
-{3243349,3876252,3876159,0.195088888888889,0.195088888888889},
-{3243350,3876019,3876159,0.170155555555556,0.170155555555556},
-{3243351,3876159,3876124,0.0815777777777778,0.0786642857142857},
-{3243352,3876124,3875847,0.136466666666667,0.136466666666667},
-{3243353,3876124,3876099,0.0628363636363636,0.0628363636363636},
-{3243354,3876099,3875767,0.146377777777778,0.146377777777778},
-{3243355,3876099,3876068,0.0596322580645161,0.0596322580645161},
-{3243356,3876068,3876023,0.0911307692307692,0.0764322580645161},
-{3243357,3876068,3875695,0.1644,0.1644},
-{3243358,3875185,3875531,0.0922085106382979,-1},
-{3243359,3875531,3875923,0.0997756097560976,-1},
-{3243360,3881476,3881709,-1,0.284707317073171},
-{3243361,3881709,3881723,-1,0.0105081081081081},
-{3243362,3884472,3884471,0.1247625,-1},
-{3243363,3884471,3884493,0.3933,-1},
-{3243364,3884137,3884270,-1,0.111557142857143},
-{3243365,3884270,3884472,-1,0.168461538461538},
-{3243366,3884471,3884270,-1,-1},
-{3243367,3889686,3889986,-1,0.1074375},
-{3243368,3889986,3890050,-1,0.0234363636363636},
-{3243369,3891295,3891321,0.0649166666666667,0.07303125},
-{3243370,3891321,3891332,0.0238181818181818,0.0271034482758621},
-{3243371,3877690,3877375,0.138225,0.135404081632653},
-{3243372,3877375,3876915,0.295133333333333,0.22135},
-{3243373,3900046,3900045,0.013752,-1},
-{3243374,3900045,3900049,0.0685038461538462,-1},
-{3243375,3892875,3892804,0.0540545454545455,0.0349764705882353},
-{3243376,3880146,3880333,-1,0.0973},
-{3243377,3866270,3867044,0.327558620689655,-1},
-{3243378,3867044,3867995,0.456163636363636,0.456163636363636},
-{3243379,3890547,3890617,0.0182780487804878,-1},
-{3243380,3890617,3891275,0.187342857142857,-1},
-{3243381,3890562,3890621,-1,0.01716},
-{3243382,3890621,3891287,-1,0.212108108108108},
-{3243383,3890617,3890621,0.029648275862069,0.0505764705882353},
-{3243384,3891285,3890635,0.77088,-1},
-{3243385,3890635,3890457,0.23388,-1},
-{3243386,3870733,3870577,0.4964,-1},
-{3243387,3897246,3897334,-1,0.0197142857142857},
-{3243388,3897242,3897246,-1,0.07866},
-{3243389,3897242,3897394,0.40692,0.40692},
-{3243390,3869426,3869511,-1,-1},
-{3243391,3897394,3897231,0.18474,0.18474},
-{3243392,3897231,3897242,0.33234,0.33234},
-{3243393,3869938,3869652,-1,-1},
-{3243394,3869652,3869858,-1,-1},
-{3243395,3869652,3869705,-1,-1},
-{3243396,3869705,3869511,-1,-1},
-{3243397,3897150,3897298,0.0388304347826087,-1},
-{3243398,3881412,3881584,0.275072727272727,-1},
-{3243399,3900232,3900227,-1,0.0232173913043478},
-{3243400,3900227,3900220,-1,0.0403333333333333},
-{3243401,3900258,3900278,0.164488888888889,-1},
-{3243402,3900278,3900296,0.212105882352941,-1},
-{3243403,3870721,3870403,-1,-1},
-{3243404,3870403,3870141,-1,-1},
-{3243405,3870205,3870241,-1,-1},
-{3243406,3870241,3870673,-1,-1},
-{3243407,3870403,3870241,-1,-1},
-{3243408,3890621,3890635,-1,0.12966},
-{3243409,3891287,3891285,0.13746,-1},
-{3243410,3890635,3891285,-1,0.94722},
-{3243411,3868689,3868536,-1,-1},
-{3243412,3868536,3868248,-1,-1},
-{3243416,3869109,3869300,-1,-1},
-{3243417,3869300,3869543,-1,-1},
-{3243418,3869543,3869384,-1,-1},
-{3243419,3869384,3869263,-1,-1},
-{3243420,3869300,3869384,-1,-1},
-{3243421,3872912,3872917,0.0133935483870968,0.0143172413793103},
-{3243422,3872917,3872931,0.0521785714285714,0.0541111111111111},
-{3243423,3872917,3873400,-1,-1},
-{3243424,3871234,3871249,-1,-1},
-{3243425,3871249,3871701,-1,-1},
-{3243444,3919797,3919836,-1,0.0415028571428571},
-{3243445,3919930,3919960,-1,0.0550888888888889},
-{3243446,3920135,3919930,0.201,0.201},
-{3243447,3920135,3920177,-1,0.0344545454545454},
-{3243448,3920177,3919960,0.119981818181818,-1},
-{3243449,3919960,3920012,-1,0.09361875},
-{3243450,3920177,3920012,-1,0.426018181818182},
-{3243451,3920012,3920031,-1,0.034741935483871},
-{3243452,3920031,3920773,-1,0.556125},
-{3243454,3920031,3921008,0.621835714285714,-1},
-{3243555,3919797,3919614,0.118436363636364,-1},
-{3243556,3919614,3920552,0.625291304347826,-1},
-{3243557,3919614,3919624,-1,0.319782352941176},
-{3243558,3919624,3919674,0.03438,0.03438},
-{3243559,3919674,3919797,-1,0.197125714285714},
-{3243560,3919624,3919675,0.0299823529411765,0.0299823529411765},
-{3243561,3919675,3919763,0.145728,0.107152941176471},
-{3243562,3919674,3919675,0.0407785714285714,0.0407785714285714},
-{3243563,3919887,3919860,-1,0.0400928571428571},
-{3243564,3919686,3919667,-1,0.02461875},
-{3243565,3919137,3919686,0.37044,-1},
-{3243566,3919860,3919763,-1,0.0517777777777778},
-{3243567,3919763,3919686,-1,0.0434888888888889},
-{3243568,3922335,3920056,-1,1.30087741935484},
-{3243569,3920056,3919860,-1,0.14038064516129},
-{3243570,3919887,3920099,-1,0.183415384615385},
-{3243571,3920099,3922335,-1,1.06708421052632},
-{3243572,3920056,3920099,0.035184,0.035184},
-{3243573,3919823,3919859,-1,0.01475},
-{3243574,3919859,3919887,-1,0.04516},
-{3243575,3919919,3919859,0.0394457142857143,0.0418363636363636},
-{3243576,3919667,3919823,-1,0.0824571428571429},
-{3243577,3901328,3900756,0.37962,0.37962},
-{3243578,3900756,3900343,0.3357,0.3357},
-{3243579,3900756,3900986,0.37983,0.37983},
-{3243580,3900986,3901094,0.1302,0.1302},
-{3243581,3900986,3900636,0.23787,0.23787},
-{3243582,3900477,3901004,0.209090322580645,0.175183783783784},
-{3243583,3901004,3901081,-1,-1},
-{3243584,3901069,3901243,0.443458536585366,0.422832558139535},
-{3243585,3901004,3901069,0.0219081081081081,0.0219081081081081},
-{3243591,3899793,3899174,0.690552,0.784718181818182},
-{3243595,3899174,3899362,0.203142857142857,0.203142857142857},
-{3243596,3899174,3898978,0.24903,0.24903},
-{3243597,3899177,3899362,0.236021052631579,0.236021052631579},
-{3243598,3898978,3899177,0.11787,0.11787},
-{3243599,3898978,3898710,0.40326,0.40326},
-{3243600,3898898,3899177,0.39573,0.39573},
-{3243601,3898710,3898898,0.11475,0.11475},
-{3243602,3898710,3898515,0.35307,0.35307},
-{3243603,3898690,3898898,0.33807,0.33807},
-{3243604,3898515,3898690,0.10812,0.10812},
-{3243605,3898169,3897994,0.09321,0.09321},
-{3243606,3898034,3897839,0.41574,0.41574},
-{3243607,3898169,3898368,0.40695,0.40695},
-{3243608,3898034,3898368,0.17841,0.17841},
-{3243609,3898515,3898263,0.45699,0.45699},
-{3243610,3898263,3898034,0.38073,0.38073},
-{3243611,3898368,3898555,0.38358,0.38358},
-{3243612,3898555,3898690,0.46632,0.46632},
-{3243613,3898263,3898555,0.16665,0.16665},
-{3243614,3897839,3897585,0.47574,0.47574},
-{3243615,3897994,3897750,0.47298,0.47298},
-{3243616,3897750,3897625,0.28086,0.28086},
-{3243617,3897585,3897750,0.10209,0.10209},
-{3243618,3897750,3898106,0.19269,0.19269},
-{3243619,3898106,3898005,0.108133333333333,0.108133333333333},
-{3243620,3898005,3897819,0.20739,0.20739},
-{3243621,3898235,3898322,0.0882,0.0882},
-{3243622,3898005,3898322,0.19089,0.19089},
-{3243623,3898209,3898106,0.087625,0.087625},
-{3243624,3898322,3898533,0.1986,0.1986},
-{3243625,3898209,3898533,0.2097,0.2097},
-{3243626,3898563,3898392,0.09891,0.09891},
-{3243627,3898392,3898169,0.11793,0.11793},
-{3243628,3898533,3898719,0.20244,0.20244},
-{3243629,3898719,3898919,0.24681,0.24681},
-{3243630,3898563,3898387,0.25904,0.19428},
-{3243631,3898387,3898209,0.163675,0.2455125},
-{3243632,3898392,3898387,0.23316,0.23316},
-{3243633,3898387,3898719,0.22119,0.22119},
-{3243634,3897585,3897354,0.49329,0.49329},
-{3243635,3897354,3897108,0.51177,0.51177},
-{3243636,3897354,3897521,0.10308,0.10308},
-{3243637,3897521,3897625,0.20934,0.20934},
-{3243638,3897521,3897445,0.16782,0.16782},
-{3243639,3897445,3897280,0.33894,0.33894},
-{3243640,3897445,3897819,0.43224,0.43224},
-{3243641,3897819,3898134,0.18354,0.18354},
-{3243642,3898134,3898235,0.10341,0.10341},
-{3243643,3898134,3897778,0.33315,0.33315},
-{3243644,3900245,3900477,0.419634782608696,0.438709090909091},
-{3243645,3898977,3899126,0.0577836734693878,0.0555176470588235},
-{3243646,3899126,3899364,0.136908,0.134223529411765},
-{3243647,3919836,3919881,-1,0.0624545454545455},
-{3243648,3919881,3919930,-1,0.0993230769230769},
-{3243649,3919836,3920020,-1,0.296618181818182},
-{3243650,3920020,3920135,-1,0.0733272727272727},
-{3243651,3919881,3920020,0.0763636363636364,0.0763636363636364},
-{3243658,3910530,3910724,0.0266454545454545,0.0254869565217391},
-{3243659,3906476,3907041,0.486333333333333,0.486333333333333},
-{3244226,3886020,3886301,0.29564,-1},
-{3244227,3887184,3886301,-1,0.591845454545454},
-{3244228,3886205,3886085,-1,0.0921714285714286},
-{3244229,3887089,3886413,0.6874125,-1},
-{3244272,3909105,3909174,0.037272,0.0358384615384615},
-{3244273,3909174,3909224,0.0235548387096774,0.0317478260869565},
-{3244274,3909669,3909732,0.058275,0.0358615384615385},
-{3244275,3909732,3909791,0.0288782608695652,0.0288782608695652},
-{3244276,3909174,3909732,-1,0.169261224489796},
-{3244277,3910416,3910503,0.0384260869565217,0.0465157894736842},
-{3244278,3910503,3910563,0.0284608695652174,0.03273},
-{3244279,3909732,3910503,-1,0.193714285714286},
-{3244280,3910503,3910878,-1,0.114988235294118},
-{3244338,3895950,3896113,0.0739555555555556,0.0739555555555556},
-{3244516,3905959,3905378,0.2526,-1},
-{3244517,3905378,3905222,0.0615191489361702,-1},
-{3244518,3888521,3888689,-1,0.064646511627907},
-{3244519,3888689,3888972,-1,0.1114},
-{3244522,3893782,3894372,-1,0.28116},
-{3244713,3889059,3889169,-1,0.0407230769230769},
-{3244714,3889169,3889237,-1,0.02705},
-{3245170,3877342,3877890,0.315320689655172,0.30481},
-{3245344,3884909,3885968,0.65979,0.65979},
-{3245345,3885753,3884696,0.66348,0.66348},
-{3245346,3885753,3885968,0.16716,0.16716},
-{3245347,3884909,3884696,0.18498,0.18498},
-{3245350,3884696,3883258,1.43691,1.43691},
-{3245351,3884250,3885753,1.26513913043478,1.26513913043478},
-{3245352,3884250,3883258,0.65262,0.65262},
-{3245353,3884250,3883777,0.370392,0.370392},
-{3245354,3882743,3883258,0.48903,0.48903},
-{3245355,3882743,3883777,0.65802,0.65802},
-{3245356,3886537,3883777,1.82445,1.82445},
-{3245358,3892238,3893424,0.847945454545455,0.847945454545455},
-{3245359,3894321,3894181,0.138511111111111,0.138511111111111},
-{3245360,3892443,3893681,0.97371,0.97371},
-{3245361,3892443,3892066,0.41022,0.41022},
-{3245362,3892066,3893452,1.01826,1.01826},
-{3245363,3892066,3891806,0.25065,0.25065},
-{3245364,3886537,3888287,1.64799,1.64799},
-{3245365,3886537,3888083,0.96726,0.96726},
-{3245366,3888021,3888476,0.26889,0.26889},
-{3245367,3888476,3888953,0.27147,0.27147},
-{3245368,3888561,3889129,0.32964,0.32964},
-{3245369,3889973,3888083,1.16898,1.16898},
-{3245437,3882516,3883777,0.826510344827586,0.826510344827586},
-{3245438,3889129,3888659,0.370772727272727,0.313730769230769},
-{3245439,3893452,3893984,0.43698,0.43698},
-{3245440,3893681,3894201,0.44196,0.44196},
-{3245601,3893681,3893452,0.3642,0.3642},
-{3245602,3893681,3893958,0.26205,0.26205},
-{3245603,3888083,3888021,0.43533,0.43533},
-{3245706,3898189,3897864,0.18963,0.18963},
-{3245707,3897990,3898189,0.18402,0.18402},
-{3245708,3897990,3897648,0.2202,0.2202},
-{3245709,3897801,3897990,0.18465,0.18465},
-{3245710,3897801,3897501,0.21228,0.21228},
-{3245711,3897638,3897801,0.18285,0.18285},
-{3245712,3897638,3897347,0.20865,0.20865},
-{3245713,3897456,3897638,0.18198,0.18198},
-{3246979,3896593,3897623,0.637702702702703,0.637702702702703},
-{3247238,3889174,3888627,0.130242857142857,0.118917391304348},
-{3247240,3888627,3888659,0.02247,0.0204272727272727},
-{3247243,3888627,3887587,0.233481818181818,0.228293333333333},
-{3247244,3887587,3887605,0.0259384615384615,0.0240857142857143},
-{3247245,3887587,3887048,0.146292307692308,0.158483333333333},
-{3247246,3887048,3886872,0.0709,0.0750705882352941},
-{3247247,3887048,3887057,0.01305,0.01305},
-{3247248,3886872,3886695,0.0652578947368421,0.07749375},
-{3247249,3886695,3886465,0.0889833333333333,0.103335483870968},
-{3247250,3886732,3886695,0.0297652173913044,0.0297652173913044},
-{3251885,3876852,3876847,0.0258428571428571,0.0258428571428571},
-{3251886,3876847,3876743,0.620357142857143,0.620357142857143},
-{3251887,3876743,3876734,0.0559714285714286,0.0559714285714286},
-{3251931,3892623,3891210,-1,-1},
-{3251972,3891925,3892510,-1,-1},
-{3251975,3891454,3891457,-1,-1},
-{3251976,3892592,3891991,-1,-1},
-{3252061,3873130,3873387,-1,-1},
-{3252085,3871102,3871369,-1,-1},
-{3252087,3871102,3871277,-1,-1},
-{3252111,3870896,3871063,-1,-1},
-{3252165,3852381,3853238,0.351355555555556,0.351355555555556},
-{3252166,3854496,3854194,0.668976923076923,0.668976923076923},
-{3252167,3854518,3854496,0.355007142857143,0.355007142857143},
-{3252168,3854543,3854518,0.209647058823529,0.209647058823529},
-{3252169,3862025,3862741,-1,-1},
-{3252170,3861756,3861548,-1,-1},
-{3252172,3861083,3861597,0.54261,0.54261},
-{3252173,3847896,3847766,0.0788,0.0788},
-{3252180,3850314,3852072,1.0116,1.0116},
-{3252186,3847766,3847689,0.0987555555555556,0.0987555555555556},
-{3252191,3879982,3880012,-1,-1},
-{3252192,3880012,3880077,-1,-1},
-{3252377,3865259,3865983,-1,-1},
-{3252379,3865259,3865725,-1,-1},
-{3252380,3865259,3864549,-1,-1},
-{3252381,3865259,3864943,-1,-1},
-{3252616,3904048,3905300,1.26813,1.26813},
-{3252617,3905300,3905325,0.0194,0.0194},
-{3252618,3885965,3885961,-1,-1},
-{3252619,3885961,3885957,-1,-1},
-{3252620,3885478,3885773,0.26559,-1},
-{3252621,3885938,3885922,0.050295652173913,-1},
-{3252622,3882570,3882754,-1,0.119557894736842},
-{3252623,3882754,3882819,-1,0.0402947368421053},
-{3252624,3882570,3882383,0.148575,-1},
-{3252625,3882383,3882349,0.0333333333333333,-1},
-{3252696,3870350,3870352,0.00926666666666667,-1},
-{3252697,3870352,3870353,0.147222222222222,-1},
-{3252725,3873845,3874561,0.352177777777778,0.352177777777778},
-{3252726,3874338,3874311,0.147218181818182,0.0899666666666667},
-{3252741,3874980,3874751,0.0969310344827586,0.23425},
-{3252742,3874751,3874265,0.122946666666667,0.14952972972973},
-{3252743,3874980,3874922,0.1032,-1},
-{3252744,3874922,3874734,0.2352,-1},
-{3252745,3874751,3874922,0.168155555555556,0.168155555555556},
-{3252754,3918883,3918622,0.136944,-1},
-{3252755,3862105,3862788,0.351730434782609,0.351730434782609},
-{3252756,3862788,3863025,0.12292,0.167618181818182},
-{3252757,3862788,3862305,0.229822222222222,0.229822222222222},
-{3252760,3918622,3918269,0.189189795918367,-1},
-{3252761,3918269,3917929,0.164212903225806,-1},
-{3252762,3862324,3862137,0.102565714285714,0.1158},
-{3252763,3862137,3862055,0.0656294117647059,0.06973125},
-{3252766,3862055,3861888,0.125422222222222,0.125422222222222},
-{3252767,3861888,3861831,0.0386888888888889,0.0386888888888889},
-{3252768,3862137,3861888,0.188311111111111,0.188311111111111},
-{3252769,3862946,3862620,0.215791304347826,0.198528},
-{3252770,3862620,3862568,0.0211071428571429,0.01846875},
-{3252771,3862540,3862620,0.066,0.066},
-{3252776,3849790,3849521,0.0680423076923077,0.0667584905660377},
-{3252777,3849521,3849313,0.0549529411764706,0.0549529411764706},
-{3252784,3854655,3854371,0.134444444444444,0.134444444444444},
-{3252785,3917773,3917929,-1,0.0715011235955056},
-{3252786,3917704,3917831,0.0561133333333333,-1},
-{3252787,3917831,3918160,0.165032258064516,-1},
-{3252794,3858043,3857904,-1,-1},
-{3252807,3854551,3854298,0.20361,0.193914285714286},
-{3252808,3854298,3854903,0.90531,0.90531},
-{3252828,3917151,3917773,-1,0.221944186046512},
-{3252860,3916187,3916254,-1,0.0180311688311688},
-{3252861,3866237,3866233,0.0365647058823529,0.0296},
-{3252862,3866233,3866234,0.0326666666666667,0.0267272727272727},
-{3252863,3864128,3864183,0.146123076923077,0.0904571428571428},
-{3252866,3871913,3871747,0.261307692307692,0.248560975609756},
-{3252870,3871747,3871740,0.0205066666666667,0.0205066666666667},
-{3252875,3852800,3851509,2.01785454545455,2.01785454545455},
-{3252876,3851509,3851640,0.0543473684210526,0.0480279069767442},
-{3252877,3851509,3850248,0.576654545454545,0.576654545454545},
-{3252901,3875808,3874680,1.33146666666667,1.33146666666667},
-{3252902,3874680,3873874,0.349355555555556,0.349355555555556},
-{3252903,3873874,3873970,0.398292307692308,0.388335},
-{3252904,3873970,3873790,0.12267,0.106669565217391},
-{3252905,3873970,3874880,0.753066666666667,0.753066666666667},
-{3252913,3915369,3913887,-1,0.289548648648649},
-{3252915,3915500,3915521,-1,0.00663243243243243},
-{3252916,3915521,3915727,-1,0.0426081081081081},
-{3252917,3915696,3915797,0.024152,-1},
-{3252918,3913638,3914399,-1,0.1272},
-{3252921,3901839,3901249,0.492761538461538,0.492761538461538},
-{3252922,3901412,3901687,-1,0.0628775510204082},
-{3252933,3907573,3907865,-1,0.058959375},
-{3252934,3907865,3908287,-1,0.0840272727272727},
-{3252971,3875035,3874973,-1,0.08628},
-{3252972,3874973,3874807,-1,0.2751},
-{3253009,3898631,3898825,-1,0.0816625},
-{3253010,3898825,3899545,-1,0.2401},
-{3253027,3897857,3898095,-1,0.0960738461538461},
-{3253028,3898095,3898149,-1,0.0451741935483871},
-{3253031,3895450,3895915,-1,0.213372972972973},
-{3253066,3898557,3898624,0.022,-1},
-{3253206,3866488,3866510,0.0191368421052632,-1},
-{3253207,3865983,3866203,0.136107692307692,-1},
-{3253208,3866203,3866488,0.179825,-1},
-{3253274,3901421,3901975,0.162552631578947,-1},
-{3253365,3871888,3872292,-1,0.16449375},
-{3254727,3881657,3882743,0.89718,0.89718},
-{3254729,3881841,3882017,0.68439,0.68439},
-{3254730,3881841,3882017,1.12674,1.12674},
-{3254820,3877890,3878216,0.201355555555556,0.201355555555556},
-{3255181,3865305,3865312,-1,0.0264566037735849},
-{3255182,3874771,3874744,0.0068,-1},
-{3255183,3873710,3873991,-1,0.235885714285714},
-{3255184,3873991,3874044,-1,0.0887076923076923},
-{3255282,3886977,3887691,-1,0.386007692307692},
-{3255283,3887691,3888381,-1,0.372675},
-{3255333,3889246,3889237,0.0189833333333333,0.0253111111111111},
-{3255528,3881657,3881841,0.19584,0.19584},
-{3255583,3894228,3894549,0.475125,0.584769230769231},
-{3255584,3894549,3894914,0.397757142857143,0.397757142857143},
-{3255585,3894532,3894549,0.0335538461538462,0.0242333333333333},
-{3255589,3894743,3894825,0.0425345454545455,-1},
-{3255626,3881767,3882011,-1,-1},
-{3255627,3916771,3916791,0.00646153846153846,-1},
-{3255628,3916801,3916824,-1,0.0055425},
-{3255629,3916824,3917151,-1,0.0941341463414634},
-{3255630,3897605,3897842,0.123678260869565,-1},
-{3255677,3912954,3912886,0.018,-1},
-{3255678,3912886,3912673,0.0732705882352941,-1},
-{3255679,3913015,3912957,-1,0.0183},
-{3255680,3912957,3912749,-1,0.0861428571428571},
-{3255682,3870108,3870107,0.0391272727272727,0.0416516129032258},
-{3255683,3870107,3870092,0.126716666666667,0.130337142857143},
-{3255684,3869924,3869627,-1,0.108985714285714},
-{3255685,3869627,3869451,-1,0.0451666666666667},
-{3255686,3870551,3870814,0.17315,-1},
-{3255687,3870814,3870832,0.0182,-1},
-{3255688,3871318,3871246,-1,0.0142461538461538},
-{3255689,3871246,3870551,-1,0.161546341463415},
-{3255690,3872078,3872074,0.011895652173913,-1},
-{3255691,3872074,3872065,0.0431181818181818,-1},
-{3255713,3875100,3875615,0.199545,-1},
-{3255742,3895478,3895553,-1,-1},
-{3255743,3895553,3895773,-1,-1},
-{3256819,3850997,3851116,0.178657894736842,-1},
-{3256855,3850997,3851006,0.00699642857142857,0.0081625},
-{3256856,3851006,3851012,0.00555,0.00634285714285714},
-{3256877,3852861,3850696,0.254935483870968,-1},
-{3256878,3851012,3851040,0.0203571428571429,0.023265306122449},
-{3258289,3906450,3906554,0.0344735294117647,0.036628125},
-{3258320,3893726,3893718,0.0158076923076923,0.0178695652173913},
-{3258321,3893718,3893721,0.0345555555555556,0.038875},
-{3258322,3892585,3892452,0.348622222222222,0.348622222222222},
-{3258564,3858506,3858376,-1,0.0770545454545455},
-{3258565,3858376,3858060,-1,0.100062857142857},
-{3258578,3880826,3880897,0.0723652173913043,0.0616444444444444},
-{3258579,3880897,3880905,0.01779,0.0127071428571429},
-{3258585,3859690,3859670,0.039,0.0455},
-{3258591,3895193,3895223,-1,0.0221162790697674},
-{3258592,3895223,3895278,-1,0.0334975609756098},
-{3258599,3862066,3862288,0.09084,-1},
-{3258600,3862285,3862288,0.0251625,0.0277655172413793},
-{3258603,3897482,3897421,-1,0.0566666666666667},
-{3258604,3897421,3897316,-1,0.0722470588235294},
-{3258605,3864376,3864277,0.0428338983050847,-1},
-{3258608,3897523,3897503,-1,0.0380869565217391},
-{3258609,3897503,3897482,-1,0.0255714285714286},
-{3258615,3861084,3860898,0.0636857142857143,-1},
-{3258616,3860898,3860691,0.166869230769231,-1},
-{3258635,3858010,3858393,0.0650584615384615,0.0650584615384615},
-{3258638,3855377,3858010,0.38718,0.38172676056338},
-{3258639,3854860,3855377,0.0936090909090909,0.0922119402985075},
-{3258644,3857731,3856967,0.145298360655738,0.145298360655738},
-{3258645,3897968,3898191,0.0369784615384615,-1},
-{3258647,3858091,3858037,-1,0.03808},
-{3258812,3863037,3862999,0.0187733333333333,-1},
-{3258815,3863196,3863078,0.0368634146341463,-1},
-{3258816,3863078,3863037,0.0155581395348837,-1},
-{3258821,3863078,3863093,0.0225111111111111,0.04052},
-{3258823,3863093,3863203,0.036645,-1},
-{3258824,3862999,3863056,0.0209230769230769,-1},
-{3258825,3863056,3863093,0.0136615384615385,-1},
-{3258838,3898063,3898083,0.0184029850746269,-1},
-{3258839,3916791,3917103,0.0877139240506329,-1},
-{3258840,3917103,3917704,0.233887058823529,-1},
-{3258885,3865075,3865310,0.041272131147541,0.0375761194029851},
-{3258886,3865310,3865526,0.04674375,0.0427371428571429},
-{3258915,3874612,3874519,-1,0.0753073170731707},
-{3258950,3858091,3858072,-1,0.0380842105263158},
-{3258951,3858072,3857983,-1,0.0793684210526316},
-{3258952,3858011,3858072,0.041,0.025448275862069},
-{3258953,3858621,3858568,-1,-1},
-{3258954,3887561,3887939,-1,0.054534375},
-{3258955,3887939,3888729,-1,0.130347540983607},
-{3258960,3881829,3882237,-1,0.0797076923076923},
-{3258961,3882237,3882406,-1,0.031934328358209},
-{3258962,3881336,3881566,-1,0.0351666666666667},
-{3258963,3881566,3881829,-1,0.0381166666666667},
-{3258964,3877642,3878303,-1,0.122368965517241},
-{3258965,3878303,3878353,-1,0.008596875},
-{3258988,3865174,3865024,0.03129,-1},
-{3258989,3864277,3863812,0.195764516129032,-1},
-{3258990,3863812,3863783,0.00650476190476191,-1},
-{3259153,3865816,3866117,0.172660465116279,0.148488},
-{3259154,3865659,3865750,0.110902702702703,0.082068},
-{3259155,3869221,3869443,-1,-1},
-{3259156,3870427,3870147,0.4112,0.4112},
-{3259157,3870147,3870057,0.16844347826087,0.16844347826087},
-{3259158,3863097,3863143,0.179111111111111,0.179111111111111},
-{3259159,3863221,3863239,0.0357111111111111,0.0357111111111111},
-{3259163,3866134,3866319,-1,0.268121739130435},
-{3259168,3860070,3859873,0.122589473684211,0.110914285714286},
-{3259169,3859873,3859120,-1,-1},
-{3259170,3859262,3859120,0.073,0.073},
-{3259171,3859793,3859365,0.249066666666667,0.249066666666667},
-{3259172,3859262,3859365,0.105622222222222,-1},
-{3259173,3859365,3859262,0.114355555555556,-1},
-{3259178,3866886,3865807,0.517875,-1},
-{3259179,3865890,3865869,-1,0.013025},
-{3259180,3865869,3865684,-1,0.0996387096774193},
-{3259181,3865807,3865869,0.11535,-1},
-{3259182,3871312,3871175,0.0370645161290323,0.0396206896551724},
-{3259183,3871175,3871140,0.00978181818181818,0.0104129032258065},
-{3259184,3871175,3871170,0.0491454545454545,0.03604},
-{3259185,3871170,3870966,-1,0.322133333333333},
-{3259186,3870966,3871170,-1,0.8664},
-{3259193,3921504,3921522,0.237771428571429,0.2628},
-{3259194,3921522,3921414,0.0688222222222222,0.0688222222222222},
-{3259195,3921522,3921643,0.0926,0.0926},
-{3259196,3921643,3921771,0.134652631578947,0.12792},
-{3259202,3918582,3919049,0.209722222222222,0.202232142857143},
-{3259203,3919049,3919171,0.0934166666666667,0.0715531914893617},
-{3259204,3918647,3919049,0.433478571428571,-1},
-{3259205,3918497,3918647,-1,0.14816},
-{3259206,3919049,3918497,0.40818,-1},
-{3259211,3874239,3874259,-1,0.0695785714285714},
-{3259212,3874744,3874368,0.132382978723404,-1},
-{3259213,3874368,3874300,0.0231714285714286,-1},
-{3259232,3889996,3890180,0.089955,0.0705529411764706},
-{3259233,3890180,3890299,0.0764709677419355,0.0483795918367347},
-{3259234,3893901,3893981,0.063552,-1},
-{3259235,3893981,3893961,0.137052631578947,0.1085},
-{3259236,3893901,3894031,0.034608,0.0455368421052632},
-{3259237,3894031,3898728,1.22264081632653,1.27466808510638},
-{3259238,3893981,3894031,0.0425727272727273,0.04683},
-{3259253,3890676,3890905,0.0882489795918367,0.0920042553191489},
-{3259254,3890557,3890676,-1,-1},
-{3259260,3888066,3888724,0.3226,-1},
-{3259263,3894125,3894204,0.0406,0.0553636363636364},
-{3259265,3895279,3895391,0.42759,-1},
-{3259266,3895391,3895393,0.0363142857142857,-1},
-{3259267,3897851,3897929,-1,0.0355333333333333},
-{3259268,3897929,3897969,-1,0.0130730769230769},
-{3259269,3897039,3897391,0.419285714285714,0.419285714285714},
-{3259270,3897391,3897419,0.0408352941176471,0.0330571428571429},
-{3259271,3895393,3895614,-1,0.0822382978723404},
-{3259283,3920047,3920613,0.127483636363636,0.129844444444444},
-{3259294,3882245,3882686,-1,-1},
-{3259299,3919649,3919485,0.30696,-1},
-{3259300,3919485,3919808,0.112579591836735,-1},
-{3259314,3894820,3894890,-1,0.0461333333333333},
-{3259317,3895484,3895345,0.105915789473684,0.105915789473684},
-{3259318,3895345,3895135,0.115733333333333,0.115733333333333},
-{3259319,3895135,3895115,0.0945789473684211,0.105705882352941},
-{3259320,3909800,3910479,0.300911111111111,0.300911111111111},
-{3259321,3910572,3910581,0.0135157894736842,0.0135157894736842},
-{3259322,3910581,3910671,0.171144,0.171144},
-{3259323,3910479,3910581,0.0356222222222222,0.0356222222222222},
-{3259324,3910450,3910557,0.14245,0.14245},
-{3259325,3910557,3910572,0.0133105263157895,0.0133105263157895},
-{3259326,3910479,3910557,0.0404222222222222,0.0404222222222222},
-{3259381,3883606,3884321,0.214413333333333,0.224386046511628},
-{3259382,3884321,3884726,0.128328571428571,0.128328571428571},
-{3259473,3897216,3896483,0.263036842105263,-1},
-{3259484,3892152,3892370,-1,0.0505698113207547},
-{3259485,3892370,3892482,-1,0.0306875},
-{3259554,3877153,3877170,0.0292754716981132,-1},
-{3259555,3877170,3877322,0.09445,-1},
-{3259561,3898630,3899176,0.208450909090909,-1},
-{3259562,3899176,3899403,0.125595,-1},
-{3259587,3899859,3900092,-1,0.0550730769230769},
-{3259588,3900092,3900382,-1,0.0712040816326531},
-{3259593,3900041,3900375,0.12932,-1},
-{3259595,3900375,3900413,0.0187945945945946,-1},
-{3259596,3865000,3865208,0.105952941176471,-1},
-{3259597,3865208,3865251,0.0186,-1},
-{3259603,3858835,3858246,0.0826235294117647,-1},
-{3259620,3854609,3854154,0.05735,-1},
-{3259621,3854154,3852861,0.166818947368421,-1},
-{3259625,3851082,3851520,-1,0.1131625},
-{3259628,3851076,3851089,0.0693066666666667,-1},
-{3259629,3852663,3852148,-1,0.0531489795918367},
-{3259630,3852148,3850854,-1,0.149248484848485},
-{3259631,3853169,3852663,-1,0.0565469387755102},
-{3259633,3854600,3854471,-1,0.0169175257731959},
-{3259634,3854471,3853169,-1,0.163620618556701},
-{3259659,3870386,3870436,0.20679,0.20679},
-{3259660,3870386,3870556,0.11262,0.11262},
-{3259670,3897931,3898090,0.0591882352941177,-1},
-{3259678,3900726,3900691,0.0121411764705882,0.02064},
-{3259679,3900657,3900691,0.0276905660377359,0.0312255319148936},
-{3259680,3900726,3900657,0.0446571428571429,-1},
-{3259681,3898566,3898590,0.0130838709677419,0.00965714285714286},
-{3259682,3898590,3898645,0.0214645161290323,0.02218},
-{3259683,3898590,3898554,0.01495,-1},
-{3259684,3898590,3898575,-1,0.0187818181818182},
-{3259685,3921643,3921771,0.180911111111111,0.180911111111111},
-{3259686,3892022,3891756,0.080064,-1},
-{3259687,3891756,3891146,0.212815384615385,-1},
-{3259688,3891160,3891788,0.185647826086957,-1},
-{3259689,3891788,3892358,0.178251063829787,-1},
-{3259690,3891756,3891788,0.0279777777777778,0.0279777777777778},
-{3259691,3889266,3889361,0.0246558139534884,-1},
-{3259692,3889361,3889620,0.0727857142857143,-1},
-{3259693,3888715,3889414,-1,-1},
-{3259694,3889414,3890443,-1,-1},
-{3259695,3889361,3889380,0.128485714285714,0.13491},
-{3259696,3889380,3889414,0.0861555555555556,0.0861555555555556},
-{3259697,3890152,3890242,0.044375,-1},
-{3259698,3890242,3890287,0.0196344827586207,-1},
-{3259699,3883658,3883850,-1,0.092775},
-{3259700,3883850,3883966,-1,0.122664},
-{3259702,3912951,3921618,1.74692658227848,-1},
-{3259705,3880909,3880950,-1,0.01534},
-{3259706,3880950,3881114,-1,0.0654967741935484},
-{3259717,3851520,3851718,-1,0.0405684210526316},
-{3259718,3851718,3852861,-1,0.19507},
-{3259727,3871436,3871416,0.04428,0.04428},
-{3259728,3871416,3871214,0.355133333333333,-1},
-{3259729,3871416,3871214,-1,0.341644444444444},
-{3259767,3865687,3865292,-1,0.187690909090909},
-{3259768,3865292,3864724,-1,0.215990322580645},
-{3259769,3864514,3863983,-1,0.215154098360656},
-{3259770,3892497,3892675,0.0443411764705882,-1},
-{3259771,3892675,3893565,0.213,-1},
-{3259792,3866780,3866422,-1,0.180644444444444},
-{3259796,3872888,3869246,0.530336842105263,0.537408},
-{3259805,3906554,3906734,0.0520208955223881,0.0562161290322581},
-{3259806,3906734,3906789,0.0108636363636364,0.0117540983606557},
-{3259871,3862127,3862737,0.2988,0.2988},
-{3259876,3892875,3892938,0.0247272727272727,0.0354782608695652},
-{3259877,3892938,3893379,0.367311111111111,0.33058},
-{3259878,3894694,3895900,0.614717647058824,0.614717647058824},
-{3259988,3886274,3886148,-1,0.13554375},
-{3259989,3886274,3886060,0.132313846153846,-1},
-{3259992,3890114,3890226,-1,0.0327857142857143},
-{3259994,3880905,3881114,0.283071428571429,-1},
-{3259995,3880905,3880834,0.15688,-1},
-{3259996,3880905,3881183,-1,0.162331034482759},
-{3260035,3881584,3881592,0.0320869565217391,-1},
-{3260302,3895139,3895135,0.110466666666667,0.110466666666667},
-{3260303,3895345,3895139,0.215844444444444,0.215844444444444},
-{3260329,3849512,3848589,-1,0.147658064516129},
-{3260330,3848589,3848476,-1,0.0246574468085106},
-{3260331,3848476,3848248,-1,0.0344273684210526},
-{3260332,3848248,3847374,-1,0.136124210526316},
-{3260433,3896707,3896550,0.17724,0.17724},
-{3260434,3896550,3896545,0.325311111111111,0.325311111111111},
-{3260435,3896550,3896183,0.247,0.247},
-{3260458,3873358,3873485,-1,0.0362372093023256},
-{3260666,3881536,3881496,0.0283941176470588,-1},
-{3260667,3881563,3881543,0.0152903225806452,-1},
-{3260781,3901283,3901309,0.0266033898305085,0.0327},
-{3260782,3901309,3901516,0.264440625,0.272970967741935},
-{3260935,3894056,3894167,0.0851803278688524,0.0851803278688524},
-{3260947,3891812,3891926,-1,0.0674836363636364},
-{3260948,3891926,3892016,0.0632,0.0741913043478261},
-{3260953,3891926,3891745,-1,0.0778375},
-{3260954,3891745,3891406,-1,0.208214285714286},
-{3260955,3891812,3891745,0.0423692307692308,0.06885},
-{3260960,3891406,3891704,-1,0.0946761904761905},
-{3260961,3891704,3891812,-1,0.0493448275862069},
-{3260995,3888710,3888964,0.0919888888888889,0.105689361702128},
-{3260996,3888964,3889406,0.15714,0.171425454545455},
-{3260997,3888450,3888675,0.091476,0.0933428571428572},
-{3260998,3888675,3888710,0.01962,0.0204375},
-{3261046,3889406,3889551,0.0568451612903226,0.0629357142857143},
-{3261047,3889551,3890061,0.185070967741935,0.194481355932203},
-{3261059,3890221,3890341,0.0488861538461539,0.0676085106382979},
-{3261060,3890341,3891406,0.383,0.414393442622951},
-{3261067,3892740,3892891,0.0647311475409836,0.0598272727272727},
-{3261068,3892891,3894056,0.680281818181818,0.650704347826087},
-{3261072,3894618,3894508,-1,0.131421052631579},
-{3261076,3894956,3895101,0.0566142857142857,-1},
-{3261151,3895822,3896024,-1,0.0490408163265306},
-{3261370,3875698,3876057,0.091524,0.0880038461538461},
-{3261371,3876057,3876530,0.10632,0.104421428571429},
-{3261405,3916743,3917078,-1,-1},
-{3261406,3915671,3916743,-1,-1},
-{3261418,3899187,3899307,-1,0.0493368421052632},
-{3261429,3850898,3850904,0.0915428571428571,0.0723483870967742},
-{3261430,3860641,3860394,-1,0.0424},
-{3261454,3864644,3864504,0.038821052631579,0.0514604651162791},
-{3261455,3864504,3864400,0.0200285714285714,0.0257510204081633},
-{3261456,3898510,3898991,-1,0.12746511627907},
-{3261457,3898991,3899361,-1,0.103107692307692},
-{3261458,3899361,3899638,-1,0.0871692307692308},
-{3261459,3897391,3897671,0.127427586206897,-1},
-{3261460,3897419,3897671,-1,0.0979230769230769},
-{3261461,3897671,3897727,0.0342,0.0201692307692308},
-{3263519,3876508,3876074,0.146472727272727,0.146472727272727},
-{3263520,3876074,3875930,0.0544909090909091,0.0544909090909091},
-{3264021,3889671,3889734,0.0349,0.0465333333333333},
-{3264056,3889664,3889734,-1,0.0319317073170732},
-{3264058,3889734,3889849,-1,0.0563027027027027},
-{3264059,3889849,3890415,-1,0.253922727272727},
-{3264068,3890351,3890415,0.0366521739130435,0.0526875},
-{3264069,3890415,3890590,0.15864,0.2644},
-{3264077,3891003,3890759,0.113272340425532,-1},
-{3264078,3890759,3890415,0.156687804878049,-1},
-{3264088,3894204,3895038,0.283758139534884,-1},
-{3264089,3895038,3895391,0.118408695652174,-1},
-{3264090,3895038,3895047,0.02388,0.02388},
-{3264093,3894204,3895047,-1,0.319736842105263},
-{3264094,3895047,3895393,-1,0.107522448979592},
-{3265429,3865536,3865489,0.0254076923076923,-1},
-{3265430,3864023,3863237,0.437945454545455,0.535266666666667},
-{3265431,3863636,3864023,0.292428571428571,0.24564},
-{3265432,3864023,3864025,0.0208222222222222,0.0208222222222222},
-{3265433,3864244,3864122,0.08013,0.103393548387097},
-{3265434,3867998,3867421,0.233688,0.216377777777778},
-{3265435,3867421,3867378,0.0180230769230769,0.0203739130434783},
-{3265436,3864913,3864903,0.00584,0.00515294117647059},
-{3265437,3864903,3864284,0.353177777777778,0.340564285714286},
-{3265438,3866809,3864963,0.7234,-1},
-{3265439,3864963,3864913,0.0201642857142857,0.0171090909090909},
-{3265440,3865892,3866209,0.205341176470588,0.205341176470588},
-{3265441,3866209,3866257,0.0191181818181818,0.0145034482758621},
-{3265442,3871421,3871204,0.429709090909091,0.429709090909091},
-{3265443,3871204,3871141,0.0621777777777778,0.08394},
-{3265444,3869457,3869392,0.035625,0.035625},
-{3265445,3869392,3869308,0.0458,0.0437181818181818},
-{3265446,3869290,3869225,0.035751724137931,0.035751724137931},
-{3265447,3869225,3869139,0.03555,0.0366967741935484},
-{3265448,3867839,3868174,0.251431578947368,-1},
-{3265449,3868174,3868265,0.0663142857142857,-1},
-{3265450,3868197,3867916,-1,0.113530434782609},
-{3265451,3867916,3867846,-1,0.0378857142857143},
-{3265452,3868053,3868041,0.0124181818181818,0.0124181818181818},
-{3265453,3868041,3867790,0.267771428571429,0.267771428571429},
-{3265454,3871867,3871963,0.3621,-1},
-{3265455,3871963,3871981,0.0161111111111111,-1},
-{3265456,3872440,3872466,-1,0.0199454545454545},
-{3265457,3870691,3870698,-1,0.04749},
-{3265458,3870698,3870701,-1,0.275166666666667},
-{3265459,3869625,3869557,-1,0.0338666666666667},
-{3265460,3869557,3869200,-1,0.179242105263158},
-{3265461,3868846,3868039,-1,0.334513043478261},
-{3265462,3868039,3867993,-1,0.0197714285714286},
-{3265463,3871410,3871199,-1,0.0592125},
-{3265464,3871199,3871122,-1,0.0209272727272727},
-{3265465,3871193,3871116,0.0254666666666667,-1},
-{3265466,3871116,3870812,0.133226086956522,-1},
-{3265467,3871398,3871287,0.0364344827586207,-1},
-{3265468,3871287,3871193,0.0274137931034483,-1},
-{3265469,3868831,3868631,0.0391866666666667,-1},
-{3265470,3868631,3867784,0.207245454545455,-1},
-{3265471,3863490,3863474,0.01308,0.0148636363636364},
-{3265472,3863474,3863397,0.07902,0.112885714285714},
-{3265473,3864710,3864662,0.0401833333333333,-1},
-{3265474,3864662,3864611,0.040845,-1},
-{3265475,3869405,3869419,0.0104297872340426,-1},
-{3265476,3869419,3869749,0.493357894736842,-1},
-{3265477,3867740,3867452,0.365914285714286,-1},
-{3265478,3867452,3867433,0.0256153846153846,-1},
-{3265479,3872314,3872230,0.035625,0.0475},
-{3265480,3872230,3871324,0.33425,0.364636363636364},
-{3265481,3874466,3874419,0.0159636363636364,-1},
-{3265482,3874419,3874386,0.0119314285714286,-1},
-{3265483,3877615,3877581,0.024432,0.0234923076923077},
-{3265484,3877581,3877218,0.319777777777778,0.297724137931035},
-{3265485,3868210,3868186,-1,-1},
-{3265486,3868186,3867917,-1,-1},
-{3265487,3893787,3894147,-1,0.12105306122449},
-{3265488,3894269,3894247,-1,0.1840125},
-{3265489,3894247,3894238,-1,0.02444},
-{3265490,3890300,3890587,-1,0.101381818181818},
-{3265491,3890587,3890609,-1,0.00728571428571429},
-{3265492,3890609,3890627,-1,0.006},
-{3265493,3869701,3869586,-1,-1},
-{3265494,3869586,3869186,-1,-1},
-{3265495,3892241,3892315,0.0175857142857143,0.0180146341463415},
-{3265496,3892315,3892464,0.0440454545454545,0.0472682926829268},
-{3265497,3879974,3879779,0.184539130434783,-1},
-{3265498,3879779,3879761,0.0145846153846154,-1},
-{3265499,3878488,3878554,0.0211941176470588,0.0343142857142857},
-{3265500,3878554,3878778,0.0801272727272727,0.120190909090909},
-{3265501,3889101,3889699,0.21656,0.209574193548387},
-{3265502,3889699,3889780,0.0338,0.0480315789473684},
-{3265503,3888849,3888880,0.02445,0.0201352941176471},
-{3265504,3888880,3889101,0.151593103448276,0.13738125},
-{3265505,3878483,3878450,-1,0.0435882352941176},
-{3265506,3878450,3878438,-1,0.022944},
-{3265507,3887371,3888040,0.32271,0.2082},
-{3265508,3888040,3888116,0.02786,0.033432},
-{3265509,3887524,3887552,-1,0.017425},
-{3265510,3887552,3887866,-1,0.36825},
-{3265511,3880951,3880995,-1,0.0499666666666667},
-{3265512,3880995,3881028,-1,0.0368526315789474},
-{3265513,3881127,3881090,-1,0.0496415094339623},
-{3265514,3881090,3881063,-1,0.0243882352941176},
-{3265515,3887577,3887545,0.0405333333333333,0.0405333333333333},
-{3265516,3887545,3887107,0.171553846153846,0.22302},
-{3265517,3878714,3878751,0.0281333333333333,0.0266526315789474},
-{3265518,3878751,3879100,0.297092307692308,0.2413875},
-{3265519,3879416,3879506,-1,-1},
-{3265520,3879506,3879592,-1,-1},
-{3265521,3881904,3882163,-1,-1},
-{3265522,3877339,3877573,-1,-1},
-{3265523,3877573,3877636,-1,-1},
-{3265524,3877636,3877978,-1,-1},
-{3265525,3877978,3877995,-1,-1},
-{3265526,3872154,3871552,0.1487625,-1},
-{3265527,3870250,3870291,-1,0.0188608695652174},
-{3265528,3870291,3871063,-1,0.297212903225806},
-{3265529,3881182,3881196,-1,0.0116285714285714},
-{3265530,3881196,3881276,-1,0.0471272727272727},
-{3265531,3868965,3869360,-1,0.208539130434783},
-{3265532,3868418,3868965,0.255914285714286,0.282852631578947},
-{3265533,3869376,3869021,-1,0.147761538461538},
-{3265534,3869021,3868889,0.0843777777777778,0.0843777777777778},
-{3265535,3881599,3881574,0.051025,-1},
-{3265536,3880104,3880199,0.0525090909090909,-1},
-{3265537,3882562,3882595,-1,0.0172},
-{3265538,3882595,3883341,-1,0.40191},
-{3265539,3879040,3879122,-1,0.0666545454545455},
-{3265540,3879122,3879171,-1,0.02556},
-{3265541,3869559,3869160,0.123754838709677,0.123754838709677},
-{3265542,3869160,3869123,0.0230526315789474,0.0365},
-{3265543,3871235,3871210,0.0127125,0.0113},
-{3265544,3861562,3861887,0.1713,0.123716666666667},
-{3265545,3861887,3862018,-1,0.0565034482758621},
-{3265546,3862967,3862530,0.158271428571429,0.166185},
-{3265547,3862530,3862222,0.125967567567568,-1},
-{3265548,3862222,3862148,0.0445071428571429,-1},
-{3265549,3862148,3862018,0.0702,-1},
-{3265550,3861887,3861997,0.059136,-1},
-{3265551,3862018,3861997,0.0268,0.0268},
-{3265552,3861997,3862109,0.0546,-1},
-{3265553,3862205,3862530,0.10280487804878,-1},
-{3265554,3894372,3894463,-1,0.0582620689655172},
-{3265555,3894463,3894506,-1,0.0303692307692308},
-{3265556,3862582,3862659,0.110314285714286,-1},
-{3265557,3862952,3862750,0.0998785714285714,-1},
-{3265558,3862750,3862582,0.0546461538461539,-1},
-{3265559,3862659,3862750,0.0518307692307692,0.053904},
-{3265560,3862659,3862864,0.162218181818182,-1},
-{3265561,3862864,3863249,0.371541176470588,-1},
-{3265568,3864013,3864015,0.01665,-1},
-{3265569,3884258,3884273,0.007,-1},
-{3265570,3884273,3884348,0.04755,-1},
-{3265571,3881193,3881680,-1,0.204144827586207},
-{3265572,3881680,3881716,-1,0.0118444444444444},
-{3265576,3872529,3872537,0.0170926829268293,-1},
-{3265577,3869492,3869517,-1,0.0118857142857143},
-{3265578,3869517,3869839,-1,0.232756097560976},
-{3265579,3874444,3874402,-1,0.0225130434782609},
-{3265582,3870673,3871012,0.319671428571429,-1},
-{3265583,3871012,3871041,0.0181333333333333,-1},
-{3265584,3871941,3871858,-1,-1},
-{3265585,3871858,3871683,-1,-1},
-{3265586,3871210,3872199,0.2959875,-1},
-{3265587,3872199,3872246,0.015375,-1},
-{3265588,3863525,3862764,0.510844444444445,0.510844444444445},
-{3265589,3862764,3862732,0.0168666666666667,0.0168666666666667},
-{3265590,3870384,3870285,-1,0.0273473684210526},
-{3265591,3870181,3870082,0.0196723404255319,-1},
-{3265592,3878429,3878400,0.029075,-1},
-{3265593,3878400,3878386,0.00817021276595745,-1},
-{3265817,3865251,3865233,0.07884,-1},
-{3265818,3880542,3880623,0.0252857142857143,-1},
-{3265819,3880623,3880713,0.0235333333333333,-1},
-{3265820,3867052,3866720,0.157658823529412,-1},
-{3265821,3865872,3865964,0.068375,-1},
-{3265822,3865964,3865983,0.015792,-1},
-{3265823,3908130,3907855,-1,0.13056},
-{3265824,3908999,3909078,0.0142235294117647,0.0154340425531915},
-{3265825,3909078,3909590,0.120408,0.133786666666667},
-{3265826,3875629,3875764,-1,0.0365513513513513},
-{3265827,3875764,3876030,-1,0.0856421052631579},
-{3265828,3875668,3875613,-1,0.09148125},
-{3265829,3875613,3875585,-1,0.0406071428571428},
-{3265990,3890154,3890185,-1,-1},
-{3265991,3890185,3890198,-1,-1},
-{3265992,3890198,3890859,-1,-1},
-{3265993,3865133,3864978,0.0473142857142857,-1},
-{3265994,3864978,3864901,0.0290057142857143,-1},
-{3265995,3879581,3879803,-1,1.104},
-{3266021,3878288,3878338,0.0558972972972973,-1},
-{3266022,3878338,3878372,0.0284,-1},
-{3266023,3878193,3878280,0.127409302325581,0.161135294117647},
-{3266024,3878280,3878288,0.0130390243902439,0.0157235294117647},
-{3266025,3865272,3865178,-1,0.0442695652173913},
-{3266026,3865178,3865038,-1,0.07512},
-{3266027,3865355,3865322,0.00619459459459459,-1},
-{3266028,3865827,3865549,-1,0.0790186046511628},
-{3266029,3865549,3865500,-1,0.0183384615384615},
-{3266030,3865322,3865282,0.0119526315789474,-1},
-{3266112,3899297,3899126,0.0627454545454545,0.0627454545454545},
-{3266113,3885911,3885919,-1,0.00466764705882353},
-{3266114,3885919,3885972,-1,0.0315176470588235},
-{3266115,3886060,3886050,0.0125090909090909,-1},
-{3266116,3886148,3886116,-1,0.0108276923076923},
-{3266117,3892691,3892958,0.0492692307692308,0.0492692307692308},
-{3266118,3899839,3899914,0.0304909090909091,0.0304909090909091},
-{3266189,3869049,3869120,0.0288,-1},
-{3266190,3869120,3870513,0.377585714285714,-1},
-{3266650,3866482,3866524,0.018885,-1},
-{3266651,3866524,3866619,0.0379,-1},
-{3266652,3866720,3866521,0.0962689655172414,-1},
-{3266653,3866521,3866433,0.04325625,-1},
-{3266667,3894706,3894720,0.010464,-1},
-{3266668,3894720,3894743,0.011088,-1},
-{3266669,3894810,3894831,-1,0.00967826086956522},
-{3266670,3894831,3894878,-1,0.0343826086956522},
-{3266677,3861176,3861175,0.0259,0.0227414634146341},
-{3266678,3861175,3861011,0.244663636363636,0.250353488372093},
-{3266681,3860500,3860218,0.13746,0.13746},
-{3266682,3860218,3859599,0.3834,-1},
-{3266714,3881894,3881570,0.1766,0.12788275862069},
-{3266715,3881894,3881970,0.0286909090909091,-1},
-{3266716,3881970,3882382,0.148994594594595,-1},
-{3266734,3878031,3878068,0.0197793103448276,0.0197793103448276},
-{3266737,3877316,3877441,0.0671142857142857,0.081704347826087},
-{3266738,3877441,3878031,0.365275,0.337176923076923},
-{3266739,3877316,3877053,0.7934,0.7934},
-{3266740,3877316,3877331,0.132290322580645,0.110837837837838},
-{3266741,3878605,3878269,0.168422222222222,0.168422222222222},
-{3266742,3877869,3877795,0.116621739130435,0.114140425531915},
-{3266744,3877795,3877579,0.143566666666667,0.143566666666667},
-{3266745,3877685,3877315,0.124655172413793,0.150625},
-{3266746,3877579,3877315,0.357804545454545,0.357804545454545},
-{3266747,3878283,3877955,0.1516,0.1516},
-{3266748,3879450,3878435,0.649992857142857,0.649992857142857},
-{3266749,3878435,3877795,0.24052,0.232761290322581},
-{3266750,3878435,3878602,0.0853111111111111,0.0853111111111111},
-{3266752,3880849,3881093,0.27085,0.27085},
-{3266757,3860325,3860273,0.0319894736842105,0.0289428571428571},
-{3266758,3860273,3859969,0.1607,0.12856},
-{3266759,3880993,3881282,0.190307142857143,0.197355555555556},
-{3266760,3881282,3881308,0.0183652173913043,0.0201142857142857},
-{3266764,3870348,3870254,0.0654585365853659,-1},
-{3266765,3870254,3870126,0.08817,-1},
-{3266965,3907480,3907456,0.00624489795918367,0.00624489795918367},
-{3266966,3907456,3907118,0.0975061224489796,0.0975061224489796},
-{3267084,3860394,3860195,-1,0.034605},
-{3267085,3860195,3859890,-1,0.0519585365853659},
-{3267164,3908476,3910193,0.318912676056338,-1},
-{3267165,3898624,3899517,0.269236363636364,-1},
-{3267200,3865283,3865313,0.1002,-1},
-{3267264,3896211,3896307,-1,0.027134693877551},
-{3267265,3896146,3896307,-1,0.177876923076923},
-{3267281,3891411,3891628,0.0531795918367347,-1},
-{3267282,3891628,3891710,0.0184470588235294,-1},
-{3267889,3895895,3895691,-1,0.0875617021276596},
-{3267890,3895691,3895532,-1,0.0744122448979592},
-{3267948,3865636,3864509,0.46515,-1},
-{3267997,3899646,3899759,0.0267692307692308,-1},
-{3267998,3885679,3886173,0.0820677966101695,-1},
-{3267999,3886173,3886500,0.0708842105263158,-1},
-{3268000,3886500,3886816,0.0774244897959184,-1},
-{3268321,3900418,3900261,0.0709111111111111,0.0709111111111111},
-{3268417,3882819,3882448,-1,0.262344},
-{3268418,3882448,3882394,-1,0.0492444444444444},
-{3268419,3882394,3882357,-1,0.0634588235294118},
-{3268420,3882357,3881910,-1,0.469114285714286},
-{3268421,3885947,3885993,0.0245379310344828,0.02965},
-{3268422,3885993,3886448,0.34805,0.363182608695652},
-{3268423,3886256,3886092,-1,0.26154},
-{3268424,3886092,3885993,-1,0.138711111111111},
-{3268425,3891055,3891531,0.297469565217391,-1},
-{3268429,3900807,3900812,0.02504,0.0197684210526316},
-{3268430,3900812,3900863,0.0185777777777778,0.0185777777777778},
-{3268435,3897700,3897769,0.0779666666666667,0.0779666666666667},
-{3268436,3897769,3897848,-1,0.0773333333333333},
-{3268437,3898457,3898528,0.0503217391304348,0.0723375},
-{3268438,3898528,3898966,0.308328,-1},
-{3268439,3897769,3898528,0.5712,-1},
-{3268440,3859913,3859941,0.0274222222222222,0.0274222222222222},
-{3268441,3854777,3854688,0.207222857142857,0.278953846153846},
-{3268442,3854688,3854691,0.018975,0.0207},
-{3268443,3854062,3854101,0.06234375,0.0867391304347826},
-{3268444,3854101,3854111,0.00991875,0.0122076923076923},
-{3268445,3854688,3854101,0.255355555555556,0.299765217391304},
-{3268446,3854818,3854871,0.0580444444444444,0.0580444444444444},
-{3268447,3854871,3854869,-1,0.0240444444444444},
-{3268448,3854869,3854910,-1,0.0296666666666667},
-{3268449,3854910,3854871,-1,0.122355555555556},
-{3268485,3850338,3850353,0.295175,0.262377777777778},
-{3268486,3850534,3850695,0.0836222222222222,0.0836222222222222},
-{3268487,3850695,3850814,0.0713428571428572,0.0516620689655172},
-{3268488,3850695,3850878,-1,-1},
-{3268489,3850878,3850966,-1,-1},
-{3268490,3853368,3853345,0.0149333333333333,0.0149333333333333},
-{3268491,3853345,3853140,0.271269230769231,0.190621621621622},
-{3268541,3852696,3852703,-1,-1},
-{3268542,3852703,3853003,-1,-1},
-{3268543,3852779,3852712,0.0128266666666667,0.0125478260869565},
-{3268544,3854789,3855249,0.563014285714286,0.52548},
-{3268545,3855249,3855367,0.113492307692308,0.118032},
-{3268558,3851634,3851393,0.238605882352941,0.25351875},
-{3268559,3851393,3851280,0.131030769230769,0.154854545454545},
-{3268560,3849696,3850019,0.206644444444444,0.206644444444444},
-{3268561,3851879,3851221,0.278133333333333,0.278133333333333},
-{3268562,3855928,3855795,-1,0.199841379310345},
-{3268563,3855795,3855761,-1,0.0505},
-{3268564,3861551,3861558,0.0991384615384615,0.0758117647058824},
-{3268565,3861558,3861562,0.0632,0.0474},
-{3268713,3861016,3861297,0.250242857142857,0.259511111111111},
-{3268714,3861297,3861437,0.0973454545454545,0.103625806451613},
-{3268715,3861297,3860822,0.290911111111111,0.290911111111111},
-{3268716,3858202,3858153,0.0286222222222222,0.0286222222222222},
-{3268947,3881117,3880849,0.120107692307692,0.141945454545455},
-{3268948,3880849,3880793,0.02634,0.0270153846153846},
-{3269188,3896880,3896824,0.0659333333333333,-1},
-{3269191,3888729,3888832,-1,0.0152285714285714},
-{3269192,3888832,3889043,-1,0.0343645161290323},
-{3269258,3850904,3850910,0.0161351351351351,0.00978688524590164},
-{3269259,3850910,3850997,0.1245,0.119888888888889},
-{3269287,3861711,3861161,-1,0.134256338028169},
-{3269288,3861530,3861504,-1,0.0162489795918367},
-{3269289,3861504,3860844,-1,0.291484615384615},
-{3269290,3861161,3861302,0.1845,-1},
-{3269291,3861302,3861554,1.53744,-1},
-{3269292,3861647,3861134,0.14058,-1},
-{3269293,3861134,3860703,0.093,-1},
-{3269302,3861630,3861554,-1,0.0538363636363636},
-{3269303,3861554,3861530,-1,0.0112875},
-{3269307,3850740,3850854,0.159702857142857,-1},
-{3269347,3920211,3920518,0.086415,0.0934216216216216},
-{3269348,3920518,3920868,0.101413333333333,0.0992086956521739},
-{3269364,3881858,3882281,0.465507692307692,0.550145454545455},
-{3269365,3867968,3867914,0.0103811320754717,-1},
-{3269366,3867914,3867688,0.0428716981132075,-1},
-{3269367,3868254,3867984,-1,0.0478415094339623},
-{3269368,3867984,3867928,-1,0.00990566037735849},
-{3269382,3879613,3881097,-1,0.611322580645161},
-{3269383,3881097,3882022,-1,0.38056},
-{3269393,3873916,3874272,0.0739448275862069,0.0809207547169811},
-{3269394,3874272,3874651,0.0739444444444444,0.0753396226415094},
-{3269424,3858232,3857657,0.3309,0.319489655172414},
-{3269434,3855682,3855175,0.147024489795918,0.144084},
-{3269435,3855175,3854947,0.0719125,0.0750391304347826},
-{3269436,3856413,3856094,0.116955555555556,0.123835294117647},
-{3269437,3856094,3855682,0.122736,0.12785},
-{3269438,3854947,3854279,0.21055,0.219704347826087},
-{3269439,3854279,3854176,0.0329428571428571,0.0373945945945946},
-{3269457,3857341,3858938,0.88275652173913,1.84576363636364},
-{3269458,3858938,3858984,0.0296903225806452,0.036816},
-{3269459,3858984,3859236,0.11829375,0.151416},
-{3269511,3890712,3891206,0.230710344827586,0.196782352941176},
-{3269512,3890061,3890625,0.220994117647059,0.288992307692308},
-{3269513,3890625,3890712,0.0265395348837209,0.02536},
-{3269514,3898308,3897661,0.18456,0.263657142857143},
-{3269515,3897661,3896744,0.3987,0.23922},
-{3269516,3880986,3881134,-1,0.1746},
-{3269517,3881134,3881292,-1,0.247326315789474},
-{3269541,3884402,3884749,-1,0.178514285714286},
-{3269542,3884749,3885230,-1,0.193015384615385},
-{3269543,3867718,3867992,-1,0.25375},
-{3269544,3867992,3868373,-1,0.21987},
-{3269545,3874006,3874116,0.0429538461538462,-1},
-{3269546,3874116,3874524,0.149059459459459,-1},
-{3269547,3871784,3872025,0.186818181818182,-1},
-{3269548,3872025,3872265,0.15,-1},
-{3269575,3874131,3874014,0.216,-1},
-{3269576,3879992,3880089,-1,0.266169230769231},
-{3269577,3880089,3880208,-1,0.25248},
-{3269578,3879914,3880078,0.0973333333333333,0.0973333333333333},
-{3269579,3880078,3880265,0.4568,0.4568},
-{3269580,3877636,3877816,-1,-1},
-{3269581,3877816,3878045,-1,-1},
-{3269582,3878313,3878659,-1,-1},
-{3269583,3878659,3879057,-1,-1},
-{3269584,3876476,3876481,0.15140625,-1},
-{3269585,3876481,3876475,0.19659,-1},
-{3269588,3876494,3876746,-1,-1},
-{3269589,3876746,3876992,-1,-1},
-{3269590,3879323,3879469,0.0734888888888889,0.0734888888888889},
-{3269591,3879469,3879588,0.0650222222222222,0.0650222222222222},
-{3269592,3880031,3880185,0.238254545454545,-1},
-{3269593,3880185,3880366,0.18048,-1},
-{3269594,3877892,3878339,-1,-1},
-{3269595,3877200,3877129,-1,0.128884615384615},
-{3269596,3879482,3879611,-1,-1},
-{3269597,3879611,3879737,-1,-1},
-{3269598,3878190,3878484,0.23336,0.269261538461538},
-{3269599,3877849,3878166,0.1126,0.1126},
-{3269600,3878658,3878674,-1,-1},
-{3269601,3875740,3876096,-1,0.27116},
-{3269602,3876096,3876600,-1,0.3490125},
-{3269603,3876024,3875990,0.2044,-1},
-{3269604,3875990,3875958,0.13101,-1},
-{3269605,3876494,3876570,0.0824444444444445,0.0824444444444445},
-{3269606,3876570,3876692,0.104146153846154,0.104146153846154},
-{3269607,3850358,3850234,-1,-1},
-{3269608,3850234,3850218,-1,-1},
-{3269609,3880263,3880430,0.240494117647059,-1},
-{3269610,3880430,3880603,0.2646,-1},
-{3269611,3880732,3880934,-1,-1},
-{3269612,3880934,3881182,-1,-1},
-{3269613,3878315,3878463,-1,0.296871428571429},
-{3269614,3877616,3877241,0.156081818181818,-1},
-{3269615,3877241,3876995,0.124281818181818,-1},
-{3269616,3875614,3875535,0.188375,0.4521},
-{3269617,3878045,3878337,-1,-1},
-{3269618,3878337,3878658,-1,-1},
-{3269619,3877264,3877510,-1,-1},
-{3269620,3877510,3877753,-1,-1},
-{3269621,3877740,3877504,-1,-1},
-{3269622,3877678,3877496,-1,-1},
-{3269623,3877496,3877284,-1,-1},
-{3269624,3880310,3880655,0.193888888888889,0.193888888888889},
-{3269625,3880655,3881075,0.800485714285714,0.329611764705882},
-{3269626,3879139,3879311,0.16052,0.185215384615385},
-{3269627,3879311,3879489,0.0926888888888889,0.0926888888888889},
-{3269628,3889996,3889808,0.0700111111111111,0.0741294117647059},
-{3269629,3889808,3889370,0.142675471698113,0.142675471698113},
-{3269630,3882163,3882181,-1,-1},
-{3270067,3878388,3878434,0.0207,0.0207},
-{3270068,3878065,3878388,0.19172,0.188577049180328},
-{3270140,3869127,3869292,-1,0.1863},
-{3270141,3869292,3869412,-1,0.0949448275862069},
-{3270270,3919494,3919847,0.145681132075472,-1},
-{3270271,3919847,3920837,0.358531428571429,-1},
-{3270299,3903863,3904599,0.560911111111111,0.560911111111111},
-{3270302,3903029,3903695,0.490066666666667,0.490066666666667},
-{3270323,3865100,3864955,0.2364,0.2364},
-{3270324,3864955,3864949,0.0203853658536585,0.0203853658536585},
-{3270325,3901328,3900928,0.146958620689655,0.149536842105263},
-{3270326,3899986,3900928,0.564266666666667,0.564266666666667},
-{3270328,3899625,3899406,0.438666666666667,0.438666666666667},
-{3270329,3906881,3906840,0.0470666666666667,0.0470666666666667},
-{3270330,3906881,3907051,0.123511111111111,0.123511111111111},
-{3270331,3907051,3907450,0.3504,0.3504},
-{3270332,3904373,3904900,0.2188,0.2188},
-{3270333,3904468,3905676,1.13466,1.13466},
-{3270334,3907149,3907190,0.0264,0.0264},
-{3270335,3904900,3905131,0.105822222222222,0.105822222222222},
-{3270336,3904463,3905330,0.40156,0.50195},
-{3270337,3905330,3905539,0.091,0.091},
-{3270338,3905131,3905330,0.43592,0.5449},
-{3270339,3906120,3906290,0.16005,0.16005},
-{3270340,3905131,3905683,0.54705,0.54705},
-{3270341,3905683,3907190,1.06191,1.06191},
-{3270342,3906120,3905683,0.28821,0.28821},
-{3270343,3905330,3905667,0.28605,0.28605},
-{3270344,3905667,3906120,0.44496,0.44496},
-{3270345,3905667,3905798,0.17979,0.17979},
-{3270346,3905798,3906009,0.182266666666667,0.182266666666667},
-{3270467,3850534,3850342,0.0964666666666667,0.0964666666666667},
-{3270468,3850342,3850174,-1,-1},
-{3270469,3862449,3862374,0.029151724137931,0.0313111111111111},
-{3270470,3862374,3862222,0.08586,0.07155},
-{3270471,3862374,3862148,0.110672727272727,-1},
-{3270472,3863343,3863283,-1,0.0310258064516129},
-{3270473,3863283,3863116,-1,0.0846888888888889},
-{3270474,3863348,3863283,-1,0.06027},
-{3270476,3854543,3854390,0.0704368421052632,0.0686307692307692},
-{3270477,3854390,3853692,0.280102325581395,0.267653333333333},
-{3270478,3850060,3850292,-1,-1},
-{3270479,3850292,3851280,0.764822222222222,0.764822222222222},
-{3270481,3862890,3862842,-1,0.0256344827586207},
-{3270482,3862842,3862731,-1,0.080328},
-{3270483,3851753,3851569,0.1842,0.1842},
-{3270484,3863968,3863893,0.023172972972973,0.0317555555555556},
-{3270485,3863893,3863855,0.00955263157894737,0.0139615384615385},
-{3270486,3863763,3863909,-1,0.15234375},
-{3270487,3863909,3863968,-1,0.0358384615384615},
-{3270488,3863893,3863909,0.012855,-1},
-{3270489,3864040,3863951,-1,0.065976},
-{3270490,3863951,3863763,-1,0.31024},
-{3270491,3851185,3851159,-1,0.0271862068965517},
-{3270492,3851159,3851282,-1,0.0724888888888889},
-{3270493,3854134,3853566,0.483339130434783,0.505309090909091},
-{3270494,3853139,3852407,0.289022222222222,0.339286956521739},
-{3270495,3853566,3853139,0.223248,0.223248},
-{3270496,3853470,3853220,0.0810818181818182,0.108109090909091},
-{3270497,3853220,3852011,0.418772727272727,0.5758125},
-{3270498,3853139,3853220,0.06117,0.050975},
-{3270499,3853527,3853470,0.0134266666666667,0.0183090909090909},
-{3270506,3895262,3895130,0.101485714285714,-1},
-{3270507,3895717,3895262,0.213284210526316,-1},
-{3270508,3895262,3895384,-1,0.113921739130435},
-{3270509,3895445,3895330,-1,0.0923368421052631},
-{3270510,3895384,3895632,0.261847058823529,0.261847058823529},
-{3270511,3895632,3895717,0.0788,0.0417176470588235},
-{3270512,3894383,3895264,0.490155555555555,0.490155555555555},
-{3270513,3893134,3893557,0.159838235294118,0.17252380952381},
-{3270514,3891757,3893134,0.574958823529412,0.501246153846154},
-{3270515,3891488,3893134,0.563274193548387,0.572508196721311},
-{3270516,3891394,3891488,0.0264941176470588,0.0241285714285714},
-{3270517,3891343,3891394,0.03225,0.0258},
-{3270518,3890607,3890875,0.0894315789473684,0.161828571428571},
-{3270519,3890875,3890951,0.0537391304347826,0.0588571428571429},
-{3270520,3890369,3889855,-1,0.155657142857143},
-{3270521,3890447,3890394,-1,0.0197032258064516},
-{3270522,3890394,3890369,-1,0.0114},
-{3270523,3890470,3890394,0.0964666666666667,0.069456},
-{3270524,3890607,3890548,0.0452769230769231,0.0692470588235294},
-{3270525,3890548,3890470,0.076904347826087,0.076904347826087},
-{3270526,3890875,3890852,-1,0.0268},
-{3270527,3890852,3890470,-1,0.466523076923077},
-{3270528,3890548,3890852,0.195966666666667,0.2204625},
-{3270529,3890226,3890242,0.032232,-1},
-{3270530,3889380,3889626,0.106355555555556,0.106355555555556},
-{3270531,3889626,3890163,-1,-1},
-{3270532,3890163,3890242,-1,-1},
-{3270533,3902336,3902393,0.0217153846153846,0.0217153846153846},
-{3270534,3901756,3902250,-1,0.540105882352941},
-{3270535,3902250,3902336,-1,0.0685894736842105},
-{3270536,3902393,3902304,-1,0.0725230769230769},
-{3270537,3902304,3901770,-1,0.352842857142857},
-{3270538,3902250,3902304,0.03108,0.03108},
-{3270539,3902535,3902429,0.297696774193548,0.329592857142857},
-{3270540,3902429,3902426,0.0144222222222222,0.0144222222222222},
-{3270541,3902304,3902429,0.316444444444444,0.316444444444444},
-{3270542,3902627,3902960,0.1477,0.1688},
-{3270543,3902960,3903048,0.03402,0.03189375},
-{3270544,3902147,3902199,0.02943,0.02943},
-{3270545,3902199,3902627,0.2127,0.2127},
-{3270546,3901559,3902108,0.263345454545455,0.3408},
-{3270547,3902108,3902147,0.0173052631578947,0.0173052631578947},
-{3270548,3902108,3902100,-1,0.0528947368421053},
-{3270549,3902100,3901532,-1,0.860266666666667},
-{3270550,3901339,3901300,0.0751777777777778,0.0751777777777778},
-{3270551,3901802,3902046,-1,0.0855257142857143},
-{3270552,3902046,3902551,-1,0.159066666666667},
-{3270553,3902031,3902046,0.0286285714285714,0.0261391304347826},
-{3270554,3903273,3904050,0.16611,-1},
-{3270555,3904050,3905370,0.278065573770492,-1},
-{3270556,3905679,3905189,-1,0.2592},
-{3270557,3905189,3905138,0.0511090909090909,0.0535428571428571},
-{3270558,3904050,3905189,1.51326,-1},
-{3270559,3903848,3903333,0.179485714285714,0.1963125},
-{3270560,3903333,3902975,0.0956651162790698,0.117531428571429},
-{3270561,3902975,3902758,0.0732909090909091,0.0780193548387097},
-{3270562,3903333,3902975,0.60912,-1},
-{3270563,3887261,3887373,0.15237,0.15237},
-{3270564,3887373,3887887,0.301122580645161,-1},
-{3270565,3903369,3904063,-1,0.1611},
-{3270566,3904063,3905311,-1,0.253914285714286},
-{3270690,3909309,3909060,0.165572727272727,0.145704},
-{3270691,3909970,3910149,0.0418772727272727,0.0409466666666667},
-{3270692,3910149,3910440,0.0629590909090909,0.0629590909090909},
-{3270693,3909309,3909890,0.78534,-1},
-{3270694,3909907,3909691,0.116256,0.14532},
-{3270695,3909691,3909309,0.169181818181818,0.159514285714286},
-{3270696,3909890,3909691,0.25056,-1},
-{3270697,3909890,3910061,0.23832,0.23832},
-{3270698,3910061,3910149,-1,0.11274},
-{3270699,3910588,3910422,0.108157894736842,0.158076923076923},
-{3270700,3910422,3909523,0.498275,0.459946153846154},
-{3270701,3910061,3910422,0.41022,-1},
-{3270711,3908887,3908737,0.10104,0.106357894736842},
-{3270712,3908737,3908530,0.0864,0.0923586206896552},
-{3270713,3908368,3908751,0.177555555555556,0.208434782608696},
-{3270714,3908751,3908887,0.080025,0.0738692307692308},
-{3270715,3908737,3908751,0.156633333333333,0.156633333333333},
-{3270716,3909211,3909035,0.0942666666666667,0.0978923076923077},
-{3270717,3909035,3908887,0.1133,0.107336842105263},
-{3270718,3908751,3909035,0.102355555555556,0.102355555555556},
-{3270748,3894252,3894121,-1,-1},
-{3270749,3894121,3894261,0.133844444444444,0.133844444444444},
-{3270754,3897537,3897119,-1,0.143786666666667},
-{3270755,3897119,3897263,0.121111111111111,0.121111111111111},
-{3270756,3897522,3897090,0.141665217391304,-1},
-{3270757,3897090,3896767,0.107,-1},
-{3270758,3897659,3897942,0.16771875,0.153342857142857},
-{3270759,3897942,3898065,0.0697615384615385,0.0490216216216216},
-{3270760,3897848,3898279,-1,0.341628571428571},
-{3270761,3913802,3913671,-1,0.0374318181818182},
-{3270762,3913671,3913491,-1,0.0507142857142857},
-{3270763,3914098,3913958,0.0725111111111111,0.0725111111111111},
-{3270764,3913958,3913795,0.0743555555555556,0.0743555555555556},
-{3270765,3913671,3913958,0.134355555555556,0.134355555555556},
-{3270766,3913716,3913621,0.0323608695652174,-1},
-{3270767,3913621,3913425,0.05236,-1},
-{3270768,3916118,3915609,-1,0.191631818181818},
-{3270769,3915609,3915313,-1,0.114823255813953},
-{3270770,3916078,3915567,0.175965957446809,-1},
-{3270771,3915567,3915273,0.11008085106383,-1},
-{3270772,3915609,3915567,0.019935,0.019935},
-{3270773,3909416,3909412,0.0096,0.0096},
-{3270774,3909523,3909427,0.05799,-1},
-{3270775,3909427,3909340,0.058,-1},
-{3270776,3909416,3909427,0.0243333333333333,0.0243333333333333},
-{3270777,3916755,3916691,0.11238,0.11238},
-{3270778,3916691,3916601,-1,-1},
-{3270779,3916601,3916690,-1,-1},
-{3270780,3916690,3916935,0.34596,0.34596},
-{3270781,3897377,3897490,-1,-1},
-{3270782,3897490,3897532,0.0487875,0.0354818181818182},
-{3270783,3897769,3897490,0.2958,0.316928571428571},
-{3270972,3904592,3904279,0.21963,0.21963},
-{3271028,3895267,3895726,0.412733333333333,0.412733333333333},
-{3271029,3895726,3895761,-1,-1},
-{3271030,3895942,3895908,0.0246444444444444,0.0246444444444444},
-{3271031,3895908,3895523,0.334977777777778,0.334977777777778},
-{3271032,3895618,3896044,0.3316,0.3316},
-{3271033,3895908,3896044,0.10395,0.10395},
-{3271034,3896044,3896143,0.0706666666666667,0.0706666666666667},
-{3271035,3895771,3896292,0.404666666666667,0.404666666666667},
-{3271036,3895905,3896443,0.410577777777778,0.410577777777778},
-{3271037,3896443,3896484,-1,-1},
-{3271038,3900603,3900500,0.0723882352941176,0.053504347826087},
-{3271039,3900787,3900810,0.02102,0.020341935483871},
-{3271040,3900810,3900603,0.185496774193548,0.159733333333333},
-{3271041,3895097,3894823,0.141428571428571,0.165},
-{3271042,3896473,3896540,0.07635,0.0832909090909091},
-{3271043,3896753,3896876,0.115166666666667,0.10365},
-{3271044,3896540,3896876,-1,-1},
-{3271045,3896540,3896610,0.0695478260869565,0.0761714285714286},
-{3271046,3896876,3896974,0.0680454545454545,0.05988},
-{3271047,3896610,3896974,-1,-1},
-{3271048,3896610,3896660,0.0545769230769231,0.059125},
-{3271049,3896974,3897050,0.0700857142857143,0.0474774193548387},
-{3271050,3896660,3897050,-1,-1},
-{3271051,3896660,3896722,0.0716608695652174,0.0749181818181818},
-{3271052,3897050,3897144,0.0682909090909091,0.0682909090909091},
-{3271053,3896722,3897144,-1,-1},
-{3271054,3896722,3896771,0.0571714285714286,0.048024},
-{3271055,3897144,3897220,0.08,0.08},
-{3271056,3896771,3897220,-1,-1},
-{3271057,3896771,3896839,0.0549,0.04460625},
-{3271058,3896839,3896942,0.0646551724137931,0.0646551724137931},
-{3271059,3897220,3897306,0.0519333333333333,0.0519333333333333},
-{3271060,3897306,3897395,0.0571555555555556,0.0571555555555556},
-{3271061,3896839,3897306,-1,-1},
-{3271362,3877427,3877411,-1,0.08628},
-{3271363,3877374,3877034,0.495547826086957,0.495547826086957},
-{3271364,3877411,3877374,0.0266769230769231,0.0266769230769231},
-{3271367,3871271,3871725,0.201251612903226,0.201251612903226},
-{3271380,3887153,3887773,-1,0.286575},
-{3271735,3906692,3907439,0.57453,0.57453},
-{3271736,3905846,3906566,0.77604,0.77604},
-{3271737,3906566,3907464,0.79668,0.79668},
-{3271738,3907439,3906566,0.60081,0.60081},
-{3271740,3910955,3911327,0.23169,0.356446153846154},
-{3271741,3911327,3911355,0.019848,0.0275666666666667},
-{3271744,3903211,3903668,0.72564,0.72564},
-{3271745,3903457,3903286,0.0766333333333333,0.0726},
-{3271746,3903286,3903145,0.08748,0.0624857142857143},
-{3271747,3903211,3903286,0.12846,0.12846},
-{3271748,3903114,3903211,0.16134,0.16134},
-{3271749,3900068,3900447,0.1134,0.131789189189189},
-{3271750,3900447,3900616,0.051648,0.0527020408163265},
-{3271751,3900616,3901019,0.113304,0.111082352941176},
-{3271752,3900447,3900616,0.57636,0.57636},
-{3271753,3902806,3902916,0.0347466666666667,0.0363627906976744},
-{3271754,3902916,3903044,0.0435272727272727,0.05472},
-{3271755,3902916,3903145,0.0906206896551724,-1},
-{3271756,3901715,3901792,0.0226695652173913,0.0237},
-{3271757,3901792,3902806,0.296865306122449,0.285223529411765},
-{3271758,3901715,3901615,0.0269428571428571,0.0251466666666667},
-{3271759,3901615,3901248,0.0915333333333333,0.0876382978723404},
-{3271760,3902095,3901735,0.158764285714286,0.134709090909091},
-{3271761,3901735,3901715,0.0153,0.0116068965517241},
-{3271762,3902071,3901872,0.126675,0.0965142857142857},
-{3271763,3901872,3901792,0.069,0.0345},
-{3271764,3903176,3903308,0.057384,0.057384},
-{3271765,3902891,3902937,0.0123567567567568,0.01143},
-{3271766,3902937,3903176,0.0966882352941176,0.0939257142857143},
-{3271767,3903176,3902937,0.61518,-1},
-{3271768,3910811,3909727,0.291461538461538,0.30930612244898},
-{3271769,3910811,3911367,-1,-1},
-{3271771,3910850,3910811,0.0161608695652174,0.0218647058823529},
-{3271772,3907914,3910854,1.04484444444444,1.04484444444444},
-{3271788,3910786,3911023,0.161336842105263,0.161336842105263},
-{3271789,3911023,3911202,0.187242857142857,0.187242857142857},
-{3271790,3915616,3915290,0.191875862068966,0.191875862068966},
-{3271791,3915290,3914876,0.280088888888889,0.280088888888889},
-{3271792,3915969,3915581,0.174866666666667,0.174866666666667},
-{3271793,3915581,3915167,0.232916129032258,0.232916129032258},
-{3271794,3915290,3915581,0.2088,0.2088},
-{3271795,3916398,3915799,0.376311111111111,0.376311111111111},
-{3271796,3915799,3915616,0.123644444444444,0.123644444444444},
-{3271797,3916226,3916152,0.0441882352941177,0.0441882352941177},
-{3271798,3916152,3915969,0.097575,0.097575},
-{3271799,3921950,3922000,0.05388,0.06735},
-{3271800,3922000,3922765,0.416763636363636,0.443651612903226},
-{3271801,3922000,3922001,0.0434823529411765,0.0462},
-{3271802,3913190,3913283,0.0467111111111111,0.0467111111111111},
-{3271803,3913851,3913283,0.3432,0.3432},
-{3271804,3913283,3913307,0.0130222222222222,0.0130222222222222},
-{3271805,3913307,3913336,0.0173333333333333,0.0173333333333333},
-{3271806,3903503,3904048,0.231404347826087,0.231404347826087},
-{3271807,3903503,3903144,0.41502,0.41502},
-{3271808,3903277,3903334,0.0236684210526316,0.022485},
-{3271809,3903334,3903503,0.0840418604651163,0.0803066666666667},
-{3271810,3903334,3903046,0.3318,0.3318},
-{3271811,3904528,3904627,-1,0.091551724137931},
-{3271812,3904627,3904844,-1,0.095545945945946},
-{3271813,3905283,3904882,0.296422222222222,0.296422222222222},
-{3271814,3904627,3904882,0.18021,0.18021},
-{3271815,3903992,3904072,0.0521142857142857,0.0684},
-{3271816,3904072,3904260,0.115128,0.115128},
-{3271817,3904072,3903749,0.152688888888889,0.152688888888889},
-{3271818,3911984,3911614,0.3204,-1},
-{3271819,3911614,3911327,0.341271428571429,-1},
-{3271820,3911659,3911614,0.0697058823529412,0.0697058823529412},
-{3271821,3910028,3911423,0.520163636363636,0.520163636363636},
-{3271822,3910028,3909914,0.0682736842105263,0.05405},
-{3271823,3894227,3894284,-1,-1},
-{3271824,3894284,3894295,-1,-1},
-{3271825,3894284,3895027,0.52764,0.52764},
-{3271826,3894070,3894227,-1,-1},
-{3271827,3894070,3894440,0.2595,0.2595},
-{3271828,3894440,3894676,0.28743,0.28743},
-{3271829,3895293,3895701,0.311288888888889,0.311288888888889},
-{3271830,3905876,3905676,0.0883333333333333,0.0883333333333333},
-{3271831,3914021,3913781,0.1072,0.1072},
-{3271832,3912081,3911496,0.486317647058823,0.635953846153846},
-{3271833,3911496,3911283,0.157433333333333,0.1771125},
-{3271834,3911496,3911118,0.194177777777778,0.194177777777778},
-{3271835,3911118,3910956,0.0780666666666667,0.0780666666666667},
-{3271836,3910956,3911118,0.0745333333333333,0.0745333333333333},
-{3271843,3913099,3913311,0.17024,0.1596},
-{3271844,3913311,3913400,0.08,0.0847058823529412},
-{3271845,3913400,3913311,0.357355555555556,0.357355555555556},
-{3271846,3915390,3915335,0.20058,0.20058},
-{3271851,3914699,3914955,0.132025,0.140826666666667},
-{3271852,3914955,3915102,0.08988,0.0921846153846154},
-{3271853,3914785,3915043,0.228133333333333,0.228133333333333},
-{3271854,3915043,3915833,0.479544,0.79924},
-{3271855,3914955,3915043,0.0877875,0.0877875},
-{3271856,3914924,3915603,0.5546,0.5546},
-{3271857,3914831,3914872,0.0652125,0.0652125},
-{3271858,3914872,3914924,0.1001,0.0858},
-{3271859,3914924,3914872,0.5853,0.5853},
-{3271860,3915309,3915509,0.192017647058824,0.225124137931035},
-{3271861,3915509,3915531,-1,-1},
-{3271868,3922616,3922556,0.0334444444444444,0.0334444444444444},
-{3271869,3922244,3922356,0.0800666666666667,0.0800666666666667},
-{3271870,3922356,3922616,0.192688888888889,0.192688888888889},
-{3271904,3864105,3864458,0.29458064516129,-1},
-{3271905,3864105,3864513,-1,0.332089655172414},
-{3271906,3864458,3864159,0.203481818181818,-1},
-{3271907,3864159,3863266,0.401903225806452,-1},
-{3271908,3863279,3864167,0.41498,-1},
-{3271909,3864167,3864513,0.215608695652174,-1},
-{3271910,3863940,3864178,1.0998,1.0998},
-{3271911,3864167,3864178,0.07086,0.07086},
-{3271912,3864178,3863940,1.55832,1.55832},
-{3271943,3864458,3864513,0.022992,0.0302526315789474},
-{3271944,3864159,3864167,0.0399,0.0399},
-{3271945,3864513,3864637,-1,-1},
-{3271946,3864642,3864132,0.282286956521739,0.240466666666667},
-{3271950,3849689,3849169,0.155152173913043,0.162204545454545},
-{3271954,3879445,3879388,-1,0.0199024390243902},
-{3271955,3879388,3879359,-1,0.00588571428571429},
-{3272083,3868554,3868500,0.017706976744186,0.02379375},
-{3272084,3869221,3868804,0.137127272727273,0.18855},
-{3272085,3868804,3868554,0.0756,0.0924},
-{3272086,3868554,3868804,0.199073684210526,-1},
-{3272088,3873215,3873256,0.0259,0.0282545454545455},
-{3272089,3873256,3873446,0.3258,-1},
-{3272092,3870513,3870623,0.0322304347826087,-1},
-{3272093,3870623,3870730,0.0269106382978723,-1},
-{3272094,3870730,3870854,0.0306127659574468,-1},
-{3272095,3870854,3871000,0.0413875,-1},
-{3272096,3870623,3870854,0.126177777777778,-1},
-{3272104,3871652,3871508,0.0544137931034483,-1},
-{3272105,3871508,3871463,0.0130137931034483,-1},
-{3272120,3871141,3871018,0.14412,0.156652173913043},
-{3272121,3871018,3870943,0.2862,0.24645},
-{3272122,3870943,3871006,0.01662,0.0369333333333333},
-{3272123,3871006,3871627,-1,-1},
-{3272124,3871018,3871006,0.59304,0.306744827586207},
-{3272307,3901122,3901085,0.101777777777778,0.101777777777778},
-{3272308,3901085,3900878,-1,-1},
-{3272309,3897128,3897336,0.0900888888888889,0.0900888888888889},
-{3272310,3897336,3897601,-1,-1},
-{3272315,3901384,3901862,0.187834285714286,-1},
-{3272316,3901862,3902320,0.216704347826087,-1},
-{3272321,3901828,3901829,-1,-1},
-{3272339,3900439,3900563,0.114225,0.114225},
-{3272340,3900563,3900724,0.1798,0.202275},
-{3272341,3900718,3900563,-1,-1},
-{3272347,3904281,3904333,0.0212538461538462,0.0212538461538462},
-{3272348,3904333,3904985,0.302423076923077,0.302423076923077},
-{3272349,3904333,3904985,1.70076,1.70076},
-{3272353,3905897,3905742,0.0771111111111111,0.0771111111111111},
-{3272354,3905742,3905684,0.0381555555555556,0.0381555555555556},
-{3272355,3905735,3905617,0.0621333333333333,0.0621333333333333},
-{3272356,3905617,3905500,0.0532888888888889,0.0532888888888889},
-{3272400,3920883,3921875,0.251757692307692,0.256694117647059},
-{3272401,3919476,3920519,0.299272340425532,0.351645},
-{3272402,3920519,3920883,0.101282352941176,0.129135},
-{3272403,3920584,3920519,0.155018181818182,0.100305882352941},
-{3272404,3920636,3920869,0.0859609756097561,0.0927473684210526},
-{3272405,3920869,3921642,0.287842105263158,0.280461538461538},
-{3272406,3920584,3920801,0.3651,0.3651},
-{3272407,3920801,3920869,0.103341176470588,0.0836571428571428},
-{3272408,3920514,3920584,0.135054545454545,0.09904},
-{3272409,3920514,3919626,0.794181818181818,0.69888},
-{3272412,3920883,3920584,0.58326,-1},
-{3272413,3920801,3920514,0.41924,0.41924},
-{3272414,3919471,3919586,-1,0.0460857142857143},
-{3272415,3919586,3919647,-1,0.0265066666666667},
-{3272430,3919209,3919036,0.130475,0.20876},
-{3272431,3919036,3919124,0.0786352941176471,0.0786352941176471},
-{3272432,3919124,3919317,0.0984,0.0984},
-{3272433,3919124,3919457,0.263084210526316,0.263084210526316},
-{3272435,3919457,3919316,0.104590909090909,0.095875},
-{3272436,3919316,3918513,0.677314285714286,1.1853},
-{3272437,3919036,3918979,0.042432,0.0482181818181818},
-{3272438,3918979,3918950,0.02379,0.0176222222222222},
-{3272439,3919316,3918979,0.191352,0.191352},
-{3272453,3886440,3886274,0.163448275862069,0.225714285714286},
-{3272454,3886067,3886451,0.498461538461538,0.216},
-{3272455,3886451,3886470,0.0185,0.01332},
-{3272456,3886440,3886451,-1,0.0372375},
-{3272457,3886740,3886901,0.193028571428571,0.162144},
-{3272458,3886451,3886901,-1,0.211066666666667},
-{3272459,3887556,3887007,0.121577777777778,-1},
-{3272460,3886901,3887007,-1,0.0384},
-{3272461,3886519,3886470,0.025375,0.03045},
-{3272462,3886440,3886519,0.05656,-1},
-{3272463,3887189,3887316,0.0428487804878049,-1},
-{3272471,3886519,3886935,0.199914285714286,-1},
-{3272476,3886791,3886959,0.0977,-1},
-{3272477,3886959,3886875,0.10572,0.124376470588235},
-{3272478,3887450,3887103,0.471026086956522,0.6771},
-{3272479,3886959,3887103,0.180704347826087,0.197914285714286},
-{3272502,3886657,3886688,0.05724,0.05724},
-{3272505,3886657,3886488,1.16544,1.16544},
-{3272506,3886488,3886657,0.67488,0.67488},
-{3272510,3886209,3886254,0.0894206896551724,0.0894206896551724},
-{3272511,3886254,3886587,0.1467375,0.173911111111111},
-{3272548,3886519,3887013,0.580525,0.480434482758621},
-{3272555,3886759,3891654,2.34946285714286,2.16397894736842},
-{3272556,3891731,3890270,1.1998,1.1998},
-{3272558,3891731,3893069,1.60584444444444,1.60584444444444},
-{3272741,3901326,3901197,0.0575555555555556,0.0575555555555556},
-{3272742,3901197,3901105,0.0534222222222222,0.0534222222222222},
-{3272743,3919123,3918976,0.0837272727272727,0.0837272727272727},
-{3272744,3918655,3918826,0.0816444444444444,0.0816444444444444},
-{3272745,3921039,3921073,0.0085741935483871,0.00886},
-{3272746,3921073,3921378,0.124236363636364,0.13666},
-{3272747,3921819,3921097,0.5774,0.5774},
-{3272748,3921097,3921073,0.032925,0.032925},
-{3272749,3916555,3914836,1.03863243243243,1.13027647058824},
-{3273239,3915453,3915382,0.19662,0.115658823529412},
-{3273240,3915453,3915400,-1,0.08118},
-{3273241,3915530,3915506,0.0271826086956522,0.0347333333333333},
-{3273242,3915506,3915453,0.0621176470588235,0.0621176470588235},
-{3273243,3915400,3915445,0.1041,0.1041},
-{3273244,3915506,3915445,0.08898,-1},
-{3273245,3915365,3915319,0.03561,0.03561},
-{3273246,3915319,3914831,0.294384,0.283061538461538},
-{3273247,3915445,3915321,0.2289,0.2289},
-{3273248,3915321,3915400,0.34932,0.34932},
-{3273249,3915319,3915321,0.0167666666666667,0.0167666666666667},
-{3273339,3852484,3853092,-1,0.116095081967213},
-{3273340,3853092,3853223,-1,0.0351666666666667},
-{3273501,3903567,3903946,0.08605,-1},
-{3273502,3903946,3905103,0.246341666666667,-1},
-{3273503,3877202,3877125,0.0868533333333333,-1},
-{3273504,3877125,3877071,0.0583,-1},
-{3273505,3861312,3861384,0.0140695652173913,-1},
-{3273506,3861312,3861378,-1,0.0142029850746269},
-{3273507,3861384,3861876,0.105987692307692,-1},
-{3273508,3861876,3861991,0.0281898305084746,-1},
-{3273519,3859408,3859191,0.0847432835820895,0.0834970588235294},
-{3273530,3857587,3857659,0.01136,0.00973714285714286},
-{3273531,3857659,3857812,0.0272105263157895,0.0224782608695652},
-{3273534,3858147,3858140,0.00788571428571429,-1},
-{3273535,3858140,3858037,0.120038709677419,-1},
-{3273608,3861882,3861718,0.0471818181818182,-1},
-{3273609,3861718,3861647,0.0247764705882353,-1},
-{3273703,3858529,3858506,0.0367967213114754,0.0367967213114754},
-{3273816,3858611,3858728,-1,0.0707027027027027},
-{3273817,3858728,3858888,-1,0.0410093023255814},
-{3273865,3900325,3900535,0.107259375,0.11071935483871},
-{3273866,3900535,3900657,0.0721052631578947,0.0747272727272727},
-{3273887,3869246,3868604,0.11704347826087,0.120537313432836},
-{3273888,3868604,3868434,0.031940625,0.0329709677419355},
-{3273889,3875439,3875465,0.0248553191489362,-1},
-{3273890,3875465,3875677,0.250786666666667,-1},
-{3273893,3876245,3876657,0.438075,-1},
-{3273939,3891573,3890956,-1,0.147769811320755},
-{3273940,3890956,3890860,-1,0.0284425531914894},
-{3274460,3871839,3872232,0.0778533333333333,0.0686941176470588},
-{3274461,3872232,3872746,0.110371428571429,0.105354545454545},
-{3274588,3897835,3897995,0.0540088235294118,-1},
-{3274589,3897995,3898063,0.0411705882352941,-1},
-{3274623,3861969,3861837,-1,0.046078125},
-{3274624,3861837,3861711,-1,0.0381818181818182},
-{3274663,3860835,3860730,-1,-1},
-{3274664,3861201,3860989,-1,-1},
-{3274665,3860098,3860597,0.386208,0.386208},
-{3274666,3860098,3859603,0.339436363636364,0.339436363636364},
-{3274667,3859567,3859995,0.412421052631579,0.412421052631579},
-{3274676,3856280,3856502,0.117888888888889,0.117888888888889},
-{3274680,3856746,3857294,0.136117647058824,0.150913043478261},
-{3274681,3857294,3857322,0.00618367346938776,0.00704651162790698},
-{3274682,3855913,3855335,0.381688888888889,0.381688888888889},
-{3274685,3856031,3856185,0.12228,0.12228},
-{3274688,3856839,3857322,0.715730769230769,0.715730769230769},
-{3274689,3856185,3856839,0.707533333333333,0.707533333333333},
-{3274693,3857560,3857393,0.130111111111111,0.130111111111111},
-{3274694,3857393,3857322,0.09616,0.0801333333333333},
-{3274697,3854802,3855348,0.411576,0.411576},
-{3274698,3855348,3855650,0.125927272727273,0.125927272727273},
-{3274705,3851495,3851630,0.0538434782608696,0.0562909090909091},
-{3274706,3851630,3851706,0.0872,0.0826105263157895},
-{3274707,3851630,3851971,0.2734,0.2734},
-{3274708,3850926,3851161,0.134018181818182,0.12636},
-{3274709,3851161,3851495,0.200035714285714,0.215423076923077},
-{3274710,3851278,3851605,0.24843,0.24843},
-{3274711,3851605,3851854,0.20331,0.20331},
-{3274712,3851161,3851605,-1,0.314911111111111},
-{3274717,3858038,3857754,0.137911111111111,0.137911111111111},
-{3274721,3858171,3858099,0.0713666666666667,0.0626634146341463},
-{3274722,3858099,3858038,0.0315666666666667,0.0307135135135135},
-{3274723,3858479,3859268,0.432371428571429,0.412718181818182},
-{3274724,3857657,3857638,0.0120782608695652,0.011112},
-{3274725,3857638,3857474,0.1364,0.0909333333333334},
-{3274726,3858479,3857638,0.52008,0.4728},
-{3274727,3858099,3858239,0.1514,-1},
-{3274728,3858239,3858479,0.28048,0.28048},
-{3274732,3860895,3860369,0.425255172413793,0.536191304347826},
-{3274733,3855306,3854907,0.2276,0.2276},
-{3274739,3860073,3860228,0.20352,0.164129032258065},
-{3274740,3860228,3860369,0.128068965517241,0.109235294117647},
-{3274745,3874470,3874510,0.051468,-1},
-{3274746,3874510,3874706,0.1628,-1},
-{3274747,3874706,3874820,0.09893,-1},
-{3274748,3874820,3874848,0.0208131147540984,-1},
-{3274749,3874510,3874820,0.5824,-1},
-{3274756,3874650,3874742,-1,0.09445},
-{3274757,3874742,3874768,-1,0.0172881355932203},
-{3274760,3862545,3862442,0.0283695652173913,0.0261},
-{3274761,3862442,3862116,0.0929347826086956,0.0872448979591837},
-{3274762,3862469,3862532,0.27414,0.255013953488372},
-{3274763,3862532,3862545,0.105885714285714,0.0600972972972973},
-{3274764,3862442,3862532,-1,0.0599},
-{3274776,3872927,3872926,0.00405,0.00405},
-{3274777,3872926,3872493,0.43038,0.43038},
-{3274791,3869576,3869572,0.0226,0.021696},
-{3274792,3869572,3869558,0.0586375,0.0574408163265306},
-{3274793,3869558,3869556,0.0180125,0.0180125},
-{3274794,3869572,3869558,-1,-1},
-{3274795,3872955,3873143,0.0820153846153846,0.0969272727272727},
-{3274796,3873143,3873552,0.195572727272727,0.21513},
-{3274797,3873190,3873143,0.418355555555556,0.418355555555556},
-{3274798,3869600,3869639,0.109417021276596,0.111795652173913},
-{3274799,3869639,3869668,0.0662808510638298,0.0692266666666667},
-{3274800,3869779,3869639,-1,0.243511111111111},
-{3275067,3915447,3916335,0.49595625,0.511954838709677},
-{3275074,3896440,3896596,0.168622222222222,0.168622222222222},
-{3275083,3867579,3867076,-1,-1},
-{3275084,3867076,3867043,0.0642,0.0998666666666667},
-{3275085,3868052,3867076,0.420807692307692,0.475695652173913},
-{3275086,3866014,3865944,0.0333333333333333,0.0333333333333333},
-{3275087,3900293,3900342,0.0446857142857143,0.0260666666666667},
-{3275088,3900342,3900787,0.330771428571429,0.264617142857143},
-{3275089,3900342,3898876,0.885777777777778,0.885777777777778},
-{3275093,3880881,3880741,0.057744,0.0555230769230769},
-{3275094,3880741,3880488,0.17712,0.121552941176471},
-{3275095,3879275,3880741,-1,-1},
-{3275096,3885250,3884631,-1,-1},
-{3275097,3884631,3881799,-1,-1},
-{3275098,3884426,3884631,-1,-1},
-{3275099,3852868,3852930,0.117528,0.14691},
-{3275100,3852930,3852836,0.108175,0.136642105263158},
-{3275101,3853879,3854276,0.133134782608696,0.130302127659574},
-{3275102,3854276,3854795,0.1581125,0.151788},
-{3275103,3852930,3854276,0.576206896551724,0.539032258064516},
-{3275117,3894083,3894065,0.0891954545454545,-1},
-{3275118,3894155,3894830,0.18,-1},
-{3275119,3894830,3895323,0.1614,-1},
-{3275454,3894157,3894816,-1,0.17292},
-{3275455,3894816,3895328,-1,0.131422641509434},
-{3275460,3894004,3894042,0.0912391304347826,-1},
-{3275462,3875594,3874428,-1,0.791233333333333},
-{3275463,3874428,3874258,0.09145,0.09145},
-{3275476,3899297,3899839,0.13,0.13},
-{3275820,3855140,3855305,-1,0.30051},
-{3275821,3856249,3855305,0.32278125,0.313},
-{3275822,3873008,3872887,0.0265333333333333,0.0275538461538462},
-{3275823,3872887,3871898,0.239569230769231,0.198791489361702},
-{3275824,3872887,3872488,-1,-1},
-{3276497,3890881,3891009,0.54714,0.54714},
-{3276498,3888797,3888837,-1,-1},
-{3276499,3888837,3888841,-1,-1},
-{3276500,3889095,3889864,0.157992452830189,0.161030769230769},
-{3276501,3889864,3890134,0.06528,0.06528},
-{3276502,3888837,3889864,1.18614,1.18614},
-{3276503,3888837,3888552,0.27522,0.27522},
-{3276504,3887512,3888163,0.133186956521739,0.153165},
-{3276505,3888163,3888841,0.124584905660377,0.134755102040816},
-{3276506,3887502,3888158,0.61272,0.61272},
-{3276507,3888158,3888163,0.10134,0.10134},
-{3276508,3887457,3887489,-1,-1},
-{3276509,3887489,3887502,0.17514,0.17514},
-{3276510,3888158,3887489,0.78318,0.78318},
-{3276511,3888158,3888552,0.38646,0.38646},
-{3276512,3886331,3886931,0.214570588235294,0.235335483870968},
-{3276513,3886931,3886929,0.1023,0.1023},
-{3276514,3886929,3887502,0.63552,0.63552},
-{3276515,3883859,3884154,0.152422222222222,0.152422222222222},
-{3276516,3884154,3884547,0.206933333333333,0.206933333333333},
-{3276517,3884154,3884403,0.40944,0.40944},
-{3276518,3883041,3882999,0.0611538461538462,0.0611538461538462},
-{3276519,3883512,3883222,-1,-1},
-{3276520,3883222,3883041,0.26355,0.26355},
-{3276521,3883222,3883649,0.73704,0.73704},
-{3276522,3882310,3882180,0.0802,0.0886421052631579},
-{3276523,3882180,3882160,0.0137714285714286,0.015221052631579},
-{3276524,3883890,3884508,-1,0.310444444444444},
-{3276525,3886929,3886434,0.77904,0.77904},
-{3276526,3886434,3886929,0.77466,0.77466},
-{3277158,3860853,3860919,0.0588,0.0464210526315789},
-{3277159,3860919,3861027,0.44985,0.346038461538462},
-{3277160,3861027,3860919,0.362711111111111,0.362711111111111},
-{3277996,3883402,3883392,0.161590909090909,0.17775},
-{3277997,3883392,3883220,0.17265,0.159369230769231},
-{3277998,3883775,3883807,0.0177555555555556,0.0177555555555556},
-{3277999,3883775,3883681,0.0601555555555556,0.0601555555555556},
-{3278000,3883392,3883450,0.042,0.0532},
-{3278001,3883450,3883775,0.169466666666667,0.169466666666667},
-{3278002,3883756,3883282,0.366466666666667,0.366466666666667},
-{3278003,3883282,3883220,0.02868,0.0325909090909091},
-{3278004,3883450,3883282,0.216473684210526,0.241941176470588},
-{3278082,3883402,3882941,0.262266666666667,0.262266666666667},
-{3278094,3882612,3882861,0.39216,0.39216},
-{3278095,3882861,3883052,0.3345,0.3345},
-{3278096,3882861,3882941,-1,0.17934},
-{3278097,3883048,3883036,0.00984705882352941,0.00881052631578947},
-{3278098,3882941,3882904,-1,0.336092307692308},
-{3278099,3882904,3883036,-1,0.0843333333333333},
-{3278100,3882904,3882941,0.193066666666667,0.193066666666667},
-{3278104,3883036,3882725,0.26214,0.238309090909091},
-{3278105,3882725,3882310,0.282757894736842,0.233582608695652},
-{3278106,3882252,3882154,0.16015,0.16015},
-{3278107,3882904,3882583,-1,0.34888},
-{3278108,3882583,3882725,0.0827333333333333,-1},
-{3278109,3882252,3882279,0.0356571428571429,0.0453818181818182},
-{3278110,3882279,3882583,0.2507625,0.2507625},
-{3278111,3882180,3882247,0.11256,0.129876923076923},
-{3278112,3882279,3882247,0.0329571428571429,0.0271411764705882},
-{3278134,3884508,3884523,0.74076,0.74076},
-{3278137,3884508,3884639,0.15756,0.1477125},
-{3278138,3884639,3884798,0.121342857142857,0.12741},
-{3278140,3884940,3884869,0.0727894736842105,0.0922},
-{3278141,3884869,3884798,0.0628736842105263,0.0543},
-{3278143,3884639,3884869,1.37442,1.37442},
-{3278206,3889665,3890191,0.444052173913044,0.408528},
-{3278207,3889467,3889481,0.0114444444444444,0.0134347826086957},
-{3278208,3889481,3889665,0.124153846153846,0.140347826086957},
-{3278209,3889665,3889481,0.184285714285714,-1},
-{3278210,3888774,3888882,0.125164285714286,0.125164285714286},
-{3278211,3888882,3889074,0.195114285714286,0.195114285714286},
-{3278212,3888635,3888765,0.113431578947368,0.10776},
-{3278213,3888765,3888774,0.0136,0.0136},
-{3278214,3888882,3888765,0.359444444444444,-1},
-{3278233,3892688,3893156,0.30483,0.30483},
-{3278234,3893156,3893523,0.357066666666667,0.357066666666667},
-{3278235,3893985,3894905,0.411567567567568,0.461454545454546},
-{3278236,3894905,3894928,0.01168,0.0106181818181818},
-{3278279,3894659,3894841,0.116777777777778,0.116777777777778},
-{3278280,3894925,3895392,0.31575,0.31575},
-{3278802,3894885,3895056,-1,-1},
-{3278803,3894634,3894838,0.256023529411765,0.256023529411765},
-{3278804,3894838,3894964,0.0706222222222222,0.0706222222222222},
-{3278805,3894885,3894838,0.0597,0.0597},
-{3278806,3896279,3896224,-1,-1},
-{3278807,3897124,3897331,0.0934444444444444,0.0934444444444444},
-{3278808,3897331,3897415,-1,-1},
-{3278810,3886593,3886853,0.0867,0.084930612244898},
-{3278811,3886853,3887032,0.0653877551020408,0.0728181818181818},
-{3278812,3887032,3887136,0.0415914893617021,0.0528324324324324},
-{3278813,3886853,3887032,0.968657142857143,-1},
-{3278814,3887902,3888305,-1,-1},
-{3278819,3896227,3896285,0.04656,0.04656},
-{3278820,3896285,3896301,0.01098,0.01098},
-{3278821,3896334,3896285,-1,-1},
-{3278822,3893980,3894164,0.105377777777778,0.105377777777778},
-{3278865,3894122,3894113,0.02682,0.02682},
-{3278866,3894113,3894331,0.40878,0.40878},
-{3278867,3894122,3894177,0.0559263157894737,0.0559263157894737},
-{3278868,3894177,3894570,0.277333333333333,0.277333333333333},
-{3278896,3893867,3894300,0.1892,0.21285},
-{3278897,3894300,3894406,0.0393846153846154,0.0451764705882353},
-{3278923,3896654,3896917,0.36225,0.36225},
-{3278924,3896917,3896913,0.0906222222222222,0.0906222222222222},
-{3278962,3861027,3860998,0.053895652173913,0.0476769230769231},
-{3278963,3860998,3860960,0.127,0.103909090909091},
-{3278964,3860998,3861063,0.157936363636364,0.144775},
-{3278965,3861345,3861301,0.071575,0.071575},
-{3278966,3861301,3861291,0.0166615384615385,0.01805},
-{3278967,3861063,3861301,0.2392,0.2808},
-{3278968,3861368,3861677,0.172577777777778,0.172577777777778},
-{3278969,3861301,3861368,0.045312,0.0404571428571429},
-{3278972,3848765,3849784,0.845294117647059,0.798333333333333},
-{3278973,3849844,3849829,0.0156,0.0156},
-{3278974,3849829,3849849,0.0868153846153846,0.0836},
-{3278975,3849784,3849829,0.0358941176470588,0.03051},
-{3279938,3868681,3868600,0.069063829787234,0.0705652173913043},
-{3279939,3868600,3868570,0.017748,0.0188808510638298},
-{3279941,3869795,3868699,0.422335714285714,0.422335714285714},
-{3279942,3868600,3868699,0.0654,0.073575},
-{3279943,3868570,3868534,0.015408,0.0163914893617021},
-{3279944,3868534,3868258,0.1243625,0.129769565217391},
-{3279945,3868699,3868534,0.1010625,0.0621923076923077},
-{3282206,3895163,3894917,0.168929032258064,0.11384347826087},
-{3282207,3894917,3894798,0.2311,0.089458064516129},
-{3282356,3875564,3875921,0.092865,-1},
-{3282357,3875921,3876012,0.0295428571428571,-1},
-{3282367,3880568,3878685,0.470611764705882,-1},
-{3282368,3878685,3878406,0.0965636363636364,-1},
-{3282376,3890128,3890573,0.202142307692308,0.198328301886792},
-{3282377,3889872,3889911,0.0589034482758621,-1},
-{3282378,3889911,3890128,0.115784615384615,-1},
-{3282379,3890128,3889967,0.138072727272727,-1},
-{3282380,3889967,3889872,0.0466285714285714,-1},
-{3282381,3889911,3889967,0.04008,0.0445333333333333},
-{3282382,3890951,3891025,0.0526727272727273,0.0404232558139535},
-{3282383,3891343,3891341,-1,0.0469655172413793},
-{3282384,3891284,3891341,0.024756,0.030190243902439},
-{3282385,3891341,3891394,0.0203345454545455,0.0294315789473684},
-{3282406,3896121,3895993,0.094368,0.214472727272727},
-{3282407,3895162,3895244,0.07100625,-1},
-{3282479,3908085,3907859,0.0892758620689655,-1},
-{3282480,3907859,3907558,0.146466666666667,-1},
-{3282538,3917496,3917546,0.0213535714285714,0.0202677966101695},
-{3282539,3917546,3918387,0.2102,0.2102},
-{3282555,3914294,3914860,0.104381818181818,0.10764375},
-{3282556,3914860,3915583,0.195470588235294,0.226568181818182},
-{3282557,3913101,3914294,0.1788,0.1788},
-{3282558,3906615,3906805,-1,0.0388705882352941},
-{3282559,3902723,3902714,0.00894418604651163,0.00818297872340426},
-{3282560,3902714,3902534,-1,0.107059090909091},
-{3282561,3902534,3902521,0.01056,0.0108307692307692},
-{3282562,3902714,3902534,0.131016666666667,-1},
-{3282565,3902358,3902195,0.0785142857142857,0.0874363636363636},
-{3282566,3902195,3901328,0.32148,0.344442857142857},
-{3282567,3900928,3900786,0.0643529411764706,0.0596727272727273},
-{3282568,3900786,3900606,0.112712195121951,0.0906117647058823},
-{3282615,3916477,3917493,0.2589,0.255253521126761},
-{3282761,3918086,3920081,0.527298591549296,0.519975},
-{3282773,3894938,3895770,0.289386666666667,-1},
-{3282774,3906471,3906608,0.0381183673469388,-1},
-{3282775,3906608,3906700,0.0203020408163265,-1},
-{3282776,3892274,3892321,0.013656,-1},
-{3282777,3892274,3892327,-1,0.0107},
-{3282778,3876449,3875310,0.275871428571429,0.343306666666667},
-{3282779,3875310,3873927,0.347431578947368,0.353635714285714},
-{3282780,3873927,3873764,0.041751724137931,0.041751724137931},
-{3282781,3873764,3872757,0.224389473684211,0.220520689655172},
-{3282839,3885710,3885830,0.051,-1},
-{3282840,3885830,3886002,0.120972727272727,-1},
-{3282939,3882753,3882766,0.0978521739130435,0.056265},
-{3282940,3881589,3881617,0.00807777777777778,0.0111846153846154},
-{3282941,3881617,3881633,0.0149781818181818,-1},
-{3282942,3881847,3881936,-1,0.0636},
-{3282943,3881617,3881660,-1,0.0236322580645161},
-{3282944,3881660,3881847,-1,0.120486486486486},
-{3283029,3850931,3850925,0.0209692307692308,0.0233657142857143},
-{3283030,3850925,3850921,0.0559531914893617,0.0571695652173913},
-{3283035,3854173,3854802,1.07692727272727,1.07692727272727},
-{3283036,3854802,3854805,0.0315818181818182,0.013896},
-{3283041,3857777,3857511,0.07374,0.113446153846154},
-{3283042,3855938,3855555,0.0789735849056604,0.0775111111111111},
-{3283043,3855555,3855338,0.0439846153846154,0.0431547169811321},
-{3283044,3857330,3856827,0.106812,0.104717647058824},
-{3283045,3864445,3864213,-1,0.126484210526316},
-{3283046,3864213,3863983,-1,0.0942387096774193},
-{3283327,3895420,3895427,0.0170553191489362,0.0178133333333333},
-{3283328,3895427,3895518,0.127902127659574,0.127902127659574},
-{3283329,3901384,3900533,0.192338181818182,0.188903571428571},
-{3283330,3900533,3900171,0.116535,0.103586666666667},
-{3283331,3912596,3912864,0.0588452830188679,0.0567054545454545},
-{3283332,3912864,3913440,0.113705084745763,0.11181},
-{3283333,3914082,3914347,0.058871186440678,0.0598862068965517},
-{3283334,3914347,3914574,0.0507254237288136,0.0516},
-{3283347,3871354,3871687,-1,0.12824347826087},
-{3283348,3871204,3871354,-1,0.0657142857142857},
-{3283349,3870734,3870774,-1,0.03025},
-{3283350,3870774,3870821,-1,0.08067},
-{3283351,3870821,3870872,-1,0.0787826086956522},
-{3283352,3870872,3871128,-1,0.2368875},
-{3283355,3870598,3870552,0.0344833333333333,-1},
-{3283356,3870552,3870465,0.0549243243243243,-1},
-{3283357,3870699,3870631,0.0468363636363636,-1},
-{3283358,3870631,3870598,0.024,-1},
-{3283359,3870465,3870438,0.0171157894736842,-1},
-{3283360,3870438,3870383,0.0309947368421053,-1},
-{3283361,3870383,3870348,0.0218769230769231,-1},
-{3283362,3869842,3869774,0.016845,-1},
-{3283363,3869112,3869010,0.0267348837209302,-1},
-{3283364,3869498,3869298,0.0488790697674419,-1},
-{3283365,3869298,3869112,0.0486418604651163,-1},
-{3283422,3873396,3873467,0.0458142857142857,-1},
-{3283423,3873467,3873485,0.0119086956521739,-1},
-{3283508,3877890,3877961,0.0346271186440678,0.0334918032786885},
-{3283509,3877961,3878065,0.0573762711864407,0.0554950819672131},
-{3283514,3878956,3878844,0.0852981818181818,0.0852981818181818},
-{3283515,3878995,3878956,0.0223471698113208,0.0219333333333333},
-{3283516,3879254,3879145,0.110367567567568,0.107463157894737},
-{3283517,3879145,3878995,0.0824941176470588,0.084144},
-{3283522,3880944,3880968,0.00876315789473684,0.01332},
-{3283523,3880968,3881176,0.0812318181818182,0.10212},
-{3283565,3871038,3871022,0.0821875,0.0896590909090909},
-{3283566,3871022,3871092,0.212938775510204,0.226826086956522},
-{3283567,3877888,3877829,-1,0.177394736842105},
-{3283568,3877829,3877792,-1,0.0735692307692308},
-{3283569,3878375,3878324,0.024825,0.024825},
-{3283570,3878404,3878585,0.0807483870967742,-1},
-{3283571,3878585,3880539,0.474011538461538,-1},
-{3283572,3874836,3874245,0.139517647058824,-1},
-{3283573,3874245,3874199,0.0116588235294118,-1},
-{3283581,3885539,3885525,-1,0.08724},
-{3283582,3885525,3885502,-1,0.0938142857142857},
-{3283586,3875819,3875796,0.0361625,-1},
-{3283587,3894477,3893542,0.230657142857143,0.24371320754717},
-{3283588,3893542,3893322,0.061368,0.0590076923076923},
-{3283589,3850254,3850416,0.0931941176470588,0.0856378378378378},
-{3283590,3850416,3850581,0.0571466666666667,0.053575},
-{3283614,3871296,3871187,0.187628571428571,0.2388},
-{3283615,3871187,3871038,0.2492375,0.265853333333333},
-{3283639,3865380,3865479,0.0834222222222222,0.0834222222222222},
-{3283640,3865169,3865264,0.0555111111111111,0.0555111111111111},
-{3283641,3865264,3865380,-1,-1},
-{3283642,3864248,3864110,0.1116,0.105035294117647},
-{3283643,3864253,3864244,0.00645789473684211,0.00876428571428571},
-{3283644,3864248,3864253,0.03616875,-1},
-{3283645,3864253,3864284,0.0243777777777778,-1},
-{3283646,3864248,3864288,-1,0.0270857142857143},
-{3283647,3864916,3864288,0.31305,0.282754838709677},
-{3283648,3864288,3864284,-1,0.0237777777777778},
-{3283658,3865818,3865639,-1,0.0474681818181818},
-{3283659,3865639,3865375,-1,0.0967578947368421},
-{3283660,3865375,3865288,-1,0.0509},
-{3283661,3865288,3865280,-1,0.0098},
-{3283670,3881370,3881078,0.108711111111111,0.110762264150943},
-{3283671,3881399,3882713,0.816558620689655,0.802718644067797},
-{3283672,3882713,3882753,0.121953191489362,0.108147169811321},
-{3283696,3847752,3847542,0.148751020408163,0.15508085106383},
-{3283700,3846633,3847029,0.1228375,0.131026666666667},
-{3283747,3878800,3878881,-1,0.0348818181818182},
-{3283748,3878881,3879324,-1,0.123439024390244},
-{3283749,3877812,3877779,0.0683464285714286,-1},
-{3283750,3877779,3877713,0.112891525423729,-1},
-{3283751,3876804,3875972,0.19018,-1},
-{3283752,3875972,3875828,0.0377016393442623,-1},
-{3283762,3877244,3877501,0.065655737704918,0.06675},
-{3283763,3877501,3878377,0.24355,0.251948275862069},
-{3283769,3873408,3873146,0.185196428571429,0.185196428571429},
-{3283770,3873146,3873047,0.115652830188679,0.117876923076923},
-{3283771,3872625,3872635,0.0656111111111111,0.0656111111111111},
-{3283779,3878408,3878690,0.0881068965517241,0.0896526315789474},
-{3283780,3878690,3879786,0.368275862068965,0.374736842105263},
-{3283781,3879786,3880030,0.102044444444444,0.103969811320755},
-{3283834,3858788,3858830,0.0720285714285714,0.07563},
-{3283835,3858830,3858843,0.0632769230769231,0.06855},
-{3283836,3858843,3858661,0.0774,0.0815837837837838},
-{3283837,3858661,3858497,0.0733116279069767,0.0750571428571429},
-{3283849,3871704,3871670,0.0873428571428571,0.0797478260869565},
-{3283850,3879682,3879299,-1,0.161763636363636},
-{3283853,3901911,3901933,0.00620869565217391,-1},
-{3283854,3901943,3901968,-1,0.00821470588235294},
-{3283957,3856271,3856408,0.0534666666666667,-1},
-{3283958,3856232,3856374,-1,0.0727285714285714},
-{3283959,3856408,3856374,0.013575,0.013575},
-{3283960,3856408,3856670,0.0881142857142857,-1},
-{3283961,3856374,3856651,-1,0.0974368421052632},
-{3283962,3856670,3856651,0.01404,0.01404},
-{3283963,3856670,3856737,0.0168545454545455,-1},
-{3283964,3856737,3856798,0.0191590909090909,-1},
-{3283965,3856651,3856704,-1,0.0187142857142857},
-{3283966,3856704,3856758,-1,0.0172714285714286},
-{3283967,3856737,3856704,0.014325,0.014325},
-{3283968,3856798,3856984,0.0648142857142857,-1},
-{3283969,3856984,3857116,0.0491837837837838,-1},
-{3283970,3856758,3856958,-1,0.0675951219512195},
-{3283971,3856958,3857094,-1,0.045675},
-{3283972,3856984,3856958,0.01242,0.01242},
-{3284218,3874259,3874014,0.114193548387097,-1},
-{3284223,3861631,3861491,0.0599538461538461,0.0556714285714286},
-{3284224,3861491,3861043,0.153083720930233,0.153083720930233},
-{3284252,3901207,3900934,0.164745,0.21966},
-{3284253,3900934,3900787,0.108092307692308,0.1171},
-{3285118,3893831,3894064,0.17811,0.1979},
-{3285119,3894064,3894544,0.297425,0.297425},
-{3285128,3896761,3896984,0.103288888888889,0.103288888888889},
-{3285129,3896984,3897275,0.145822222222222,0.145822222222222},
-{3285133,3897039,3897274,0.113311111111111,0.113311111111111},
-{3285134,3897274,3897559,0.1506,0.1506},
-{3285142,3896272,3896300,-1,-1},
-{3285144,3896300,3896314,0.03567,0.029725},
-{3285145,3895391,3895689,0.101244,-1},
-{3285146,3895689,3896300,0.17094,-1},
-{3285147,3895614,3895706,-1,0.0265102040816327},
-{3285148,3895706,3896314,-1,0.175555102040816},
-{3285149,3895689,3895706,0.020445,0.020445},
-{3285159,3895463,3894471,0.653345454545455,-1},
-{3285161,3894471,3894200,0.18174,-1},
-{3285162,3894200,3894083,0.1302,-1},
-{3285163,3894471,3894162,-1,1.05192},
-{3285164,3894162,3894200,-1,0.0672888888888889},
-{3285165,3894125,3894107,0.0678,-1},
-{3285166,3894107,3894083,0.0627446808510638,-1},
-{3285167,3894162,3894107,-1,0.0380869565217391},
-{3285173,3890627,3891035,-1,0.146909090909091},
-{3285174,3891035,3891332,-1,0.131711111111111},
-{3285175,3890822,3891030,0.36192,0.36192},
-{3285176,3891035,3891030,0.28482,0.28482},
-{3285177,3891030,3890822,0.36648,0.36648},
-{3285179,3890627,3890623,0.28728,0.28728},
-{3285180,3890623,3890619,0.09702,0.09702},
-{3285181,3890623,3890619,0.64692,0.64692},
-{3285191,3890055,3890304,0.160642105263158,0.160642105263158},
-{3285192,3890304,3890300,0.239353846153846,0.239353846153846},
-{3285197,3890050,3890213,-1,0.0586545454545454},
-{3285198,3890213,3890300,-1,0.0348774193548387},
-{3285201,3890213,3890214,0.27348,0.27348},
-{3285202,3890214,3889987,0.27012,0.27012},
-{3285203,3889987,3889794,0.32928,0.32928},
-{3285204,3890214,3889795,0.6054,0.6054},
-{3285205,3889795,3889796,0.42324,0.42324},
-{3285206,3889794,3889795,0.00852,0.00852},
-{3285213,3889404,3889418,0.183408,0.169822222222222},
-{3285214,3889057,3889052,-1,-1},
-{3285215,3889052,3889047,0.258571428571429,0.2172},
-{3285218,3894042,3894057,0.0666418604651163,-1},
-{3285219,3894057,3894077,0.0768,-1},
-{3285305,3919450,3919612,0.0551166666666667,0.049605},
-{3285306,3919612,3919794,0.0663658536585366,0.0632790697674419},
-{3285310,3921992,3922060,0.022335,0.0229076923076923},
-{3285313,3922794,3922906,0.049815,0.06226875},
-{3285314,3922906,3923753,0.32304,0.329632653061225},
-{3285316,3896300,3896907,0.1704,-1},
-{3285317,3896907,3897391,0.136136170212766,-1},
-{3285341,3908171,3908188,0.00965,0.0072375},
-{3285342,3908188,3908279,0.0618631578947368,0.0405310344827586},
-{3285429,3875077,3875332,0.424848,0.416517647058824},
-{3285433,3874819,3874821,0.0403846153846154,0.0403846153846154},
-{3285522,3889082,3889058,-1,-1},
-{3285523,3889058,3889057,-1,-1},
-{3285524,3889183,3889052,0.0436285714285714,0.0349028571428571},
-{3285525,3889393,3889397,0.126553846153846,0.253107692307692},
-{3285526,3889397,3889400,0.185823529411765,0.191454545454545},
-{3285527,3889183,3889285,0.0457,0.0645176470588235},
-{3285528,3889400,3889402,0.0383272727272727,0.039525},
-{3285529,3889402,3889404,0.02660625,0.02660625},
-{3285530,3889285,3889402,0.05004,0.0735882352941176},
-{3285533,3889058,3889183,0.89028,0.89028},
-{3285534,3889397,3889285,0.88506,0.88506},
-{3285567,3887643,3887634,-1,0.0785428571428571},
-{3285568,3887634,3887624,-1,0.244},
-{3285569,3888230,3888228,0.09303,-1},
-{3285570,3888228,3888225,0.09192,0.127666666666667},
-{3285571,3887634,3888228,0.2205,0.3583125},
-{3285572,3889524,3889591,0.0168,0.0164181818181818},
-{3285573,3889591,3890026,0.107882608695652,0.107882608695652},
-{3285574,3890036,3890026,-1,-1},
-{3285575,3889591,3890036,-1,-1},
-{3285578,3890435,3890383,-1,-1},
-{3285579,3890383,3890036,-1,-1},
-{3285580,3890418,3890439,-1,-1},
-{3285581,3890439,3890435,-1,-1},
-{3285589,3890864,3890865,-1,-1},
-{3285590,3890435,3890865,-1,-1},
-{3285601,3887396,3887528,-1,0.101668965517241},
-{3285602,3888064,3887711,0.120206896551724,0.112451612903226},
-{3285603,3887711,3887528,0.0848608695652174,0.0848608695652174},
-{3285604,3887680,3887711,0.09942,0.09942},
-{3285605,3887396,3887451,0.05712,0.05712},
-{3285606,3887451,3887680,0.34986,0.34986},
-{3285607,3887680,3887451,0.33312,0.33312},
-{3285643,3902542,3902859,-1,-1},
-{3285644,3902859,3903139,-1,-1},
-{3285648,3902686,3902755,0.0663666666666667,0.09955},
-{3285649,3902493,3902755,0.3576375,0.3576375},
-{3285650,3902755,3902555,0.3081,0.32864},
-{3285651,3902555,3902493,0.0628285714285714,0.0628285714285714},
-{3285652,3902493,3902555,0.167377777777778,0.167377777777778},
-{3285659,3900685,3900080,0.54423,0.54423},
-{3285660,3900080,3899120,-1,-1},
-{3285661,3901902,3901839,0.0361111111111111,0.0361111111111111},
-{3285834,3887418,3887632,0.0533294117647059,0.04533},
-{3285835,3887443,3887632,0.86322,0.86322},
-{3285836,3887632,3887844,0.0507,0.0450666666666667},
-{3285837,3887844,3887955,0.0193255813953488,0.0180652173913043},
-{3285838,3887844,3887975,0.280066666666667,0.280066666666667},
-{3285839,3887955,3888032,0.0204,0.0199466666666667},
-{3285840,3887975,3888032,0.2806,0.2806},
-{3285841,3888032,3888222,0.0423574468085106,0.0462976744186047},
-{3285842,3888222,3888337,0.0239733333333333,0.0263121951219512},
-{3285843,3888222,3888364,0.290288888888889,0.290288888888889},
-{3285844,3888337,3888413,0.0187714285714286,0.0202153846153846},
-{3285845,3888413,3888751,0.111124137931034,0.10070625},
-{3285846,3888364,3888413,0.281355555555556,0.281355555555556},
-{3285847,3891566,3892266,0.415090909090909,0.434857142857143},
-{3285848,3892266,3892351,0.119888888888889,0.119888888888889},
-{3285849,3892266,3891519,0.790444444444445,0.790444444444445},
-{3285865,3891566,3891842,0.872444444444444,0.872444444444444},
-{3285866,3892997,3893253,0.108,0.108},
-{3285881,3894032,3894160,0.0834588235294118,0.0834588235294118},
-{3285882,3894160,3894265,0.0943263157894737,0.0814636363636364},
-{3285883,3894265,3894279,0.0163714285714286,0.01146},
-{3285884,3894324,3894335,0.0125142857142857,0.00947027027027027},
-{3285885,3894279,3894324,-1,0.0404052631578947},
-{3285886,3894246,3894279,-1,0.0171111111111111},
-{3285887,3894242,3894246,-1,0.0177923076923077},
-{3285888,3894242,3894211,0.01478,0.017736},
-{3285889,3894242,3894324,0.0429923076923077,-1},
-{3285892,3894160,3894123,0.0226666666666667,0.0226666666666667},
-{3285893,3894123,3894246,-1,-1},
-{3285895,3892017,3892039,0.00808421052631579,0.0083027027027027},
-{3285896,3892039,3892169,0.0413384615384615,0.0413384615384615},
-{3285897,3892149,3892026,0.0662086956521739,0.0662086956521739},
-{3285898,3892039,3892026,0.120694736842105,0.1092},
-{3285899,3892020,3892148,0.0617111111111111,0.0617111111111111},
-{3285900,3892026,3892020,0.0795777777777778,0.0795777777777778},
-{3285901,3891553,3891979,0.151062857142857,0.135569230769231},
-{3285902,3891979,3892017,0.0157263157894737,0.0161513513513514},
-{3285903,3891979,3891937,0.441666666666667,0.441666666666667},
-{3285906,3892020,3891992,0.279177777777778,0.279177777777778},
-{3285907,3891992,3891937,0.0558,0.0558},
-{3285908,3892189,3891982,0.1677,-1},
-{3285909,3891992,3891982,0.0819111111111111,-1},
-{3285910,3891982,3891928,0.0485294117647059,-1},
-{3285911,3891928,3891797,0.0814666666666667,-1},
-{3285912,3891937,3891928,0.0844222222222222,-1},
-{3285916,3891739,3891769,0.0252,0.0252},
-{3285917,3891769,3891937,0.1234125,0.0940285714285714},
-{3285918,3891797,3891765,0.0233684210526316,-1},
-{3285919,3891769,3891765,0.0914222222222222,-1},
-{3285920,3891513,3891696,0.140325,0.118168421052632},
-{3285921,3891696,3891739,0.02097,0.0199714285714286},
-{3285922,3891765,3891691,0.0519333333333333,-1},
-{3285923,3891691,3891645,0.0350823529411765,-1},
-{3285924,3891696,3891691,0.0926888888888889,-1},
-{3285925,3891645,3891626,-1,0.132666666666667},
-{3285926,3891797,3891787,-1,0.132533333333333},
-{3285930,3889903,3889890,0.0392785714285714,0.0392785714285714},
-{3285931,3889890,3889963,0.2634,0.2634},
-{3285932,3889862,3889903,0.0190188679245283,0.0190188679245283},
-{3285933,3889903,3890236,0.140861538461538,0.140861538461538},
-{3285939,3888786,3889036,0.0810727272727273,0.07644},
-{3285940,3889036,3889204,0.04497,0.0418325581395349},
-{3285941,3889036,3889204,0.469888888888889,0.469888888888889},
-{3285947,3888786,3888759,0.126158823529412,0.138367741935484},
-{3285948,3888759,3888751,0.04788,0.0507818181818182},
-{3285949,3888786,3888759,0.249555555555556,0.249555555555556},
-{3285954,3886605,3886834,0.0630139534883721,0.058904347826087},
-{3285955,3886834,3886887,0.0142636363636364,0.013075},
-{3285956,3886834,3886860,0.2198,-1},
-{3285957,3886887,3886914,0.00943255813953488,0.00845},
-{3285958,3886914,3887222,0.0899384615384615,0.0779466666666667},
-{3285959,3886860,3886914,0.214111111111111,-1},
-{3285960,3886042,3886452,0.164813793103448,0.19915},
-{3285961,3886452,3886468,0.006675,0.00684615384615385},
-{3285962,3886452,3886446,0.3838875,-1},
-{3285963,3886468,3886512,0.012409756097561,0.0130461538461538},
-{3285964,3886512,3886605,0.0264,0.0234666666666667},
-{3285965,3886446,3886512,0.2356,-1},
-{3285966,3886098,3886049,0.189091304347826,0.193293333333333},
-{3285967,3886049,3886042,0.0224,0.0218790697674419},
-{3285968,3887570,3887588,-1,-1},
-{3285969,3887588,3887607,-1,-1},
-{3285970,3888050,3888044,-1,-1},
-{3285971,3888044,3888030,-1,-1},
-{3285972,3888216,3888295,0.0251555555555556,0.0251555555555556},
-{3285973,3888295,3888564,0.0988888888888889,0.0988888888888889},
-{3285974,3888216,3888295,0.3206,0.3206},
-{3285975,3885620,3885995,0.572777777777778,0.572777777777778},
-{3285976,3885995,3886049,0.03348,0.020925},
-{3285977,3884780,3885022,0.0985555555555556,0.0985555555555556},
-{3285978,3885022,3885167,0.1125,0.0964285714285714},
-{3285979,3885132,3884997,0.0688105263157895,0.118854545454545},
-{3285980,3884997,3884744,0.1726125,0.197271428571429},
-{3285981,3885022,3884997,0.179466666666667,0.179466666666667},
-{3285982,3884550,3884572,0.255688888888889,0.255688888888889},
-{3285983,3884744,3884719,0.0210315789473684,0.0285428571428571},
-{3285984,3884719,3884550,0.0661777777777778,0.0661777777777778},
-{3285985,3884719,3884709,0.0706333333333333,0.115581818181818},
-{3285986,3884709,3884701,0.0766666666666667,0.0985714285714286},
-{3285987,3884709,3884701,0.194377777777778,0.194377777777778},
-{3285988,3884701,3884695,0.0605,0.0605},
-{3285989,3884695,3884689,0.0462,0.0462},
-{3285990,3884695,3884689,0.196533333333333,0.196533333333333},
-{3285991,3884689,3884681,0.0610666666666667,0.0610666666666667},
-{3285992,3884681,3884673,0.205733333333333,0.205733333333333},
-{3285993,3884673,3884681,0.0526,0.0526},
-{3285994,3884579,3884668,-1,-1},
-{3285995,3884668,3885078,-1,-1},
-{3285996,3884673,3884668,0.0617111111111111,0.0617111111111111},
-{3285997,3885167,3885263,0.0526736842105263,0.0556},
-{3285998,3885132,3885247,0.0605052631578947,0.0676235294117647},
-{3285999,3885263,3885247,0.49164,0.49164},
-{3286000,3885263,3885359,0.051,0.0655714285714286},
-{3286001,3885359,3885395,0.0237230769230769,0.0237230769230769},
-{3286002,3885247,3885342,0.0554470588235294,0.0523666666666667},
-{3286003,3885359,3885342,0.49062,0.49062},
-{3286004,3885395,3885342,0.248976,0.248976},
-{3286006,3884699,3884706,-1,-1},
-{3286007,3884706,3884715,0.0369555555555556,0.0369555555555556},
-{3286008,3884418,3884706,0.3225,0.3225},
-{3286009,3884699,3884868,-1,-1},
-{3286010,3884868,3884872,0.0379555555555555,0.0379555555555555},
-{3286011,3884706,3884868,0.15486,0.15486},
-{3286012,3884868,3885183,0.32532,0.32532},
-{3286015,3883505,3883721,0.543923076923077,0.517390243902439},
-{3286016,3883721,3884580,0.22004,0.225040909090909},
-{3286017,3883721,3882903,0.52416,0.52416},
-{3286018,3883558,3883581,0.111755555555556,0.111755555555556},
-{3286019,3883581,3883605,0.0813111111111111,0.0813111111111111},
-{3286020,3883208,3883311,0.05082,0.05082},
-{3286025,3906782,3906803,0.00785625,0.00810967741935484},
-{3286026,3906803,3906962,0.0835285714285714,0.080648275862069},
-{3286027,3906954,3906803,0.115866666666667,0.115866666666667},
-{3286028,3907258,3907122,0.0863181818181818,0.111705882352941},
-{3286029,3881737,3881859,0.112114285714286,0.120738461538462},
-{3286030,3881859,3882138,0.174371428571429,0.174371428571429},
-{3286031,3882586,3882458,1.52128235294118,1.36114736842105},
-{3286032,3882601,3882586,0.1359,0.100136842105263},
-{3286033,3882601,3882608,0.110314285714286,-1},
-{3286034,3882138,3882321,0.0983142857142857,0.086025},
-{3286035,3882321,3882601,0.172484210526316,-1},
-{3286036,3882608,3882321,0.257621052631579,-1},
-{3286037,3883478,3883412,0.0377142857142857,0.0495},
-{3286038,3883411,3883478,0.0709846153846154,0.0419454545454545},
-{3286039,3883411,3883293,-1,0.0924},
-{3286040,3882608,3882937,0.18012,0.18012},
-{3286041,3882937,3883042,-1,0.0640421052631579},
-{3286042,3883293,3883191,-1,0.0395307692307692},
-{3286043,3883191,3882937,-1,0.13371},
-{3286044,3883191,3883190,0.588444444444445,0.588444444444445},
-{3286045,3881737,3881787,0.0857555555555556,0.0857555555555556},
-{3286050,3880289,3879529,0.380355555555556,0.380355555555556},
-{3286051,3879529,3879470,-1,-1},
-{3286052,3880226,3879470,0.380711111111111,0.380711111111111},
-{3286053,3879513,3880213,0.351977777777778,0.351977777777778},
-{3286054,3879470,3878774,0.584111111111111,0.584111111111111},
-{3286055,3878774,3879717,0.401355555555556,0.401355555555556},
-{3286056,3878774,3878767,0.107955555555556,0.107955555555556},
-{3286057,3878767,3878822,-1,-1},
-{3286058,3878767,3878761,0.107955555555556,0.107955555555556},
-{3286059,3878761,3879700,0.400088888888889,0.400088888888889},
-{3286060,3878761,3878777,0.0948,0.0948},
-{3286061,3878981,3879087,-1,-1},
-{3286062,3878183,3878376,0.387111111111111,0.387111111111111},
-{3286063,3878376,3878649,-1,-1},
-{3286064,3878112,3878127,0.0209333333333333,0.0209333333333333},
-{3286065,3878127,3878183,0.194717647058824,0.236442857142857},
-{3286066,3878777,3878127,0.414566666666667,0.355342857142857},
-{3286067,3878127,3877738,0.550466666666667,0.41285},
-{3286068,3883042,3883169,-1,0.0728823529411765},
-{3286069,3883169,3883411,-1,0.139136842105263},
-{3286070,3877738,3877087,0.779972727272727,0.490268571428571},
-{3286071,3877087,3877298,0.119328,0.0962322580645161},
-{3286072,3877298,3877997,0.48405,0.455576470588235},
-{3286073,3878469,3878537,0.061,0.0508333333333333},
-{3286074,3878537,3878606,0.0572470588235294,0.0463428571428571},
-{3286075,3878793,3878537,0.221955555555556,0.221955555555556},
-{3286076,3878793,3878680,0.0950470588235294,0.1009875},
-{3286077,3878680,3878572,0.0771555555555556,0.0771555555555556},
-{3286078,3878572,3878409,0.129911111111111,0.129911111111111},
-{3286079,3878409,3878401,0.01131,0.01131},
-{3286080,3878401,3878469,0.06692,0.0590470588235294},
-{3286081,3878908,3878809,0.06837,0.0759666666666667},
-{3286082,3878809,3878776,0.0211714285714286,0.02223},
-{3286083,3879471,3879103,0.187869230769231,0.2326},
-{3286084,3879103,3878793,0.159475,0.212633333333333},
-{3286085,3878809,3879103,0.243644444444444,0.243644444444444},
-{3286086,3879103,3879281,0.336642857142857,0.336642857142857},
-{3286087,3879281,3879271,0.0665555555555556,0.0665555555555556},
-{3286088,3879557,3879440,-1,-1},
-{3286089,3879440,3879281,0.0688666666666667,0.0688666666666667},
-{3286090,3879648,3879893,0.216666666666667,0.216666666666667},
-{3286091,3879893,3880180,-1,-1},
-{3286092,3877053,3877021,0.0125555555555556,0.0125555555555556},
-{3286093,3877021,3876942,-1,-1},
-{3286094,3876942,3877087,-1,-1},
-{3286095,3877997,3877826,0.116333333333333,0.116333333333333},
-{3286096,3877997,3878311,0.4203,0.309694736842105},
-{3286097,3878311,3878401,0.0718941176470588,0.0763875},
-{3286098,3878908,3878693,0.25884,0.25884},
-{3286099,3878693,3879413,0.345822222222222,0.345822222222222},
-{3286101,3878776,3878723,0.03591,0.03591},
-{3286102,3878723,3878606,0.0841714285714286,0.0982},
-{3286103,3878323,3877826,0.229666666666667,0.229666666666667},
-{3286104,3878723,3878323,0.7412,0.59296},
-{3286105,3878071,3877744,0.134022222222222,0.134022222222222},
-{3286106,3878323,3878071,0.25524,0.464072727272727},
-{3286107,3878071,3877735,0.324221052631579,0.324221052631579},
-{3286108,3877735,3877493,0.206222222222222,0.206222222222222},
-{3286117,3878148,3878071,0.0827333333333333,0.0827333333333333},
-{3286120,3878770,3879132,-1,-1},
-{3286121,3879132,3879281,0.0730888888888889,0.0730888888888889},
-{3286161,3854740,3854395,0.0984130434782609,0.105279069767442},
-{3286162,3854395,3852779,0.451302127659575,0.4419},
-{3286175,3852712,3852428,0.0667363636363636,0.0652533333333333},
-{3286176,3852428,3851657,0.25124347826087,0.25124347826087},
-{3286177,3851657,3851650,0.0906125,0.0906125},
-{3286178,3851650,3851476,0.0949787234042553,0.0875294117647059},
-{3286201,3903486,3903568,0.0718857142857143,0.0539142857142857},
-{3286207,3910681,3910729,0.0248222222222222,0.026808},
-{3286208,3910729,3910848,0.0812181818181818,0.0687230769230769},
-{3286209,3911034,3911273,0.213494117647059,0.1578},
-{3286210,3910848,3911409,0.179663414634146,-1},
-{3286211,3911409,3911532,0.0366585365853659,-1},
-{3286212,3911273,3911409,0.0725111111111111,0.0889909090909091},
-{3286213,3911273,3911292,0.016272,0.0226},
-{3286214,3911402,3911477,0.0256457142857143,0.030951724137931},
-{3286215,3911477,3911549,0.0322645161290323,0.0285771428571429},
-{3286216,3911292,3911309,0.0387,0.0602},
-{3286217,3911309,3911477,0.240309677419355,-1},
-{3286218,3911549,3911587,0.0179454545454545,0.0174176470588235},
-{3286219,3911587,3911961,0.199711111111111,0.215688},
-{3286220,3911309,3911587,-1,0.2503},
-{3286221,3911535,3911580,0.0194,0.0187071428571429},
-{3286222,3911580,3911844,0.125275862068966,0.0981891891891892},
-{3286223,3913396,3913777,0.09075,-1},
-{3286224,3913777,3913935,0.0275678571428571,-1},
-{3286225,3915258,3915351,0.0499818181818182,0.0499818181818182},
-{3286226,3915351,3915447,-1,-1},
-{3286227,3915258,3914888,0.206127272727273,0.206127272727273},
-{3286228,3914888,3914483,-1,-1},
-{3286229,3914388,3914141,0.132488888888889,0.132488888888889},
-{3286230,3914141,3913831,0.154244444444444,0.154244444444444},
-{3286231,3914375,3914640,0.213211764705882,0.213211764705882},
-{3286232,3914141,3914375,-1,-1},
-{3286233,3903761,3903812,0.0279,0.0279},
-{3286234,3903812,3904057,0.130592307692308,0.130592307692308},
-{3286235,3904057,3904147,0.0452,0.0452},
-{3286236,3903812,3904057,0.421511111111111,0.421511111111111},
-{3286237,3900120,3900224,0.0523333333333333,0.0523333333333333},
-{3286238,3900224,3900312,-1,-1},
-{3286239,3899778,3899808,0.0262421052631579,0.0216782608695652},
-{3286240,3899808,3899987,0.292984615384615,0.19044},
-{3286241,3903741,3904005,0.152008695652174,0.11654},
-{3286242,3904005,3904174,0.154071428571429,0.126882352941176},
-{3286243,3904001,3904233,0.0908294117647059,0.0908294117647059},
-{3286244,3904233,3904385,0.116336842105263,0.11052},
-{3286245,3904005,3904233,0.40914,-1},
-{3286246,3905496,3905535,-1,-1},
-{3286247,3905535,3905738,0.143844444444444,0.143844444444444},
-{3286248,3905880,3905725,0.0891555555555555,0.0891555555555555},
-{3286249,3908616,3908824,0.06105,0.0666},
-{3286250,3908824,3908863,0.0115818181818182,0.0106166666666667},
-{3286321,3908381,3908510,0.0668,0.0825176470588235},
-{3286322,3908510,3908750,0.0997928571428571,0.107469230769231},
-{3286323,3908523,3908510,0.0510171428571429,-1},
-{3286325,3908523,3908621,0.05301,-1},
-{3286326,3908621,3909098,0.166466666666667,0.1362},
-{3286327,3908510,3908621,0.0740571428571429,0.0740571428571429},
-{3286356,3905423,3905446,0.010536,0.0146333333333333},
-{3286357,3905446,3905484,0.0257478260869565,0.0423},
-{3286358,3905484,3905513,0.0250571428571429,0.04385},
-{3286359,3915101,3915237,0.0500941176470588,-1},
-{3286360,3915237,3915330,0.0290150943396226,-1},
-{3286362,3910450,3910695,0.112539130434783,0.112539130434783},
-{3286562,3903218,3902933,0.172333333333333,0.172333333333333},
-{3286563,3903006,3902762,0.129444444444444,0.129444444444444},
-{3286564,3902771,3902525,0.127466666666667,0.127466666666667},
-{3286565,3902529,3902278,0.129733333333333,0.129733333333333},
-{3286742,3892419,3892997,1.29162,1.29162},
-{3286743,3892419,3895841,6.01659,6.01659},
-{3286766,3901590,3901756,0.2966,0.138413333333333},
-{3286770,3864417,3864041,0.122892307692308,0.11982},
-{3286771,3864041,3863851,0.0543405405405405,0.0574457142857143},
-{3286773,3864888,3864511,0.100271428571429,0.102717073170732},
-{3286775,3865374,3865343,0.0154166666666667,0.015},
-{3286776,3865343,3864888,0.1404,-1},
-{3286777,3864888,3865343,0.14055,-1},
-{3286789,3893825,3894091,-1,0.152155555555556},
-{3286790,3866112,3865591,0.123083720930233,-1},
-{3286791,3865591,3865521,0.0158727272727273,0.01746},
-{3286792,3866560,3866248,0.0644372093023256,0.0659714285714286},
-{3286793,3866248,3866112,0.0306837209302326,-1},
-{3286798,3865591,3866099,0.125971428571429,-1},
-{3286799,3866099,3866248,0.0311162790697674,-1},
-{3287320,3919541,3919407,0.204,0.204},
-{3287428,3904618,3903126,0.666,0.678109090909091},
-{3288519,3904484,3904837,0.162888888888889,0.162888888888889},
-{3288520,3904837,3904923,-1,-1},
-{3289019,3864889,3864652,0.08142,-1},
-{3289020,3864652,3863953,0.211342105263158,-1},
-{3289023,3875155,3875331,0.0926,-1},
-{3289024,3875331,3875410,0.0361227272727273,-1},
-{3290715,3848675,3848819,0.273022222222222,0.273022222222222},
-{3290716,3848819,3848831,0.0188363636363636,0.0188363636363636},
-{3290721,3848563,3848327,0.117127272727273,0.117127272727273},
-{3290723,3848838,3848650,0.475309090909091,0.387288888888889},
-{3290724,3848650,3848563,0.209228571428571,0.209228571428571},
-{3290725,3848838,3849293,0.260955555555556,0.260955555555556},
-{3290726,3849293,3849705,0.177927272727273,0.177927272727273},
-{3290727,3851640,3849850,0.6023625,0.6023625},
-{3290728,3849850,3849782,0.0339681818181818,0.0347581395348837},
-{3290729,3849452,3849451,-1,-1},
-{3290730,3848362,3847896,-1,-1},
-{3291805,3895100,3895166,-1,-1},
-{3291806,3895166,3895808,-1,-1},
-{3291807,3898884,3898977,0.0401632653061224,0.0385882352941176},
-{3291812,3893424,3893277,0.16194,0.16194},
-{3291813,3893277,3892443,0.84375,0.84375},
-{3291814,3890171,3891792,1.13007,1.13007},
-{3291815,3891792,3891806,0.01092,0.01092},
-{3291816,3891806,3889773,1.99464,1.99464},
-{3291817,3889773,3888287,0.91194,0.91194},
-{3291818,3889973,3890093,0.08145,0.08145},
-{3291819,3890093,3891213,0.78906,0.78906},
-{3291820,3889973,3889884,0.10644,0.10644},
-{3291821,3888476,3887886,0.314690909090909,0.314690909090909},
-{3291822,3887886,3887057,0.550688888888889,0.550688888888889},
-{3291823,3888953,3888646,0.156,0.156},
-{3291824,3888646,3887605,0.680222222222222,0.680222222222222},
-{3291825,3888021,3887151,0.466981818181818,0.466981818181818},
-{3291826,3887151,3886732,0.458028571428571,0.458028571428571},
-{3291827,3886537,3885063,1.46361,1.46361},
-{3291828,3885063,3884961,0.09129,0.09129},
-{3291829,3885404,3884632,0.48552,0.48552},
-{3291830,3879963,3881318,1.62582,1.62582},
-{3291831,3881318,3881614,0.31503,0.31503},
-{3291832,3880606,3881940,0.79782,0.79782},
-{3291833,3878844,3879705,0.377377777777778,0.377377777777778},
-{3291834,3879705,3880664,0.431763636363636,0.431763636363636},
-{3291846,3868565,3866110,0.8654,0.8654},
-{3291847,3874356,3868613,2.75465454545455,2.75465454545455},
-{3291848,3868613,3868565,0.0272666666666667,0.0272666666666667},
-{3291849,3875732,3875384,0.146955555555556,0.146955555555556},
-{3291850,3875384,3874356,0.412436363636364,0.412436363636364},
-{3291851,3876213,3875963,0.113955555555556,0.113955555555556},
-{3291852,3875963,3874945,0.4116,0.4116},
-{3291853,3877246,3877031,0.0927333333333333,0.0927333333333333},
-{3291854,3877031,3875889,0.409690909090909,0.409690909090909},
-{3292519,3872708,3873526,-1,0.169356},
-{3292520,3872711,3873536,0.1772875,-1},
-{3292521,3872716,3872848,0.309432,0.38679},
-{3292522,3872848,3872657,0.168925,0.176269565217391},
-{3292540,3873935,3874311,-1,0.107473170731707},
-{3292541,3869912,3869859,0.0148263157894737,-1},
-{3292542,3869859,3869842,0.00784615384615384,-1},
-{3292543,3867784,3867783,-1,0.0251076923076923},
-{3292544,3867141,3866976,-1,0.0750923076923077},
-{3292545,3866741,3866619,-1,0.0505395348837209},
-{3292546,3865076,3865036,0.0082054054054054,-1},
-{3292547,3865036,3864753,0.07965,-1},
-{3292548,3860327,3860229,0.021816,0.0404},
-{3292549,3858773,3858784,-1,0.01652},
-{3292550,3858784,3859259,-1,0.286121739130435},
-{3292551,3855710,3855684,0.00996279069767442,0.0104487804878049},
-{3292557,3916068,3916123,0.0486,0.0897230769230769},
-{3292558,3916123,3916555,0.279127659574468,0.291533333333333},
-{3292559,3913522,3913572,0.02568,0.02568},
-{3292560,3913572,3914836,0.468092307692308,0.521588571428571},
-{3292561,3915764,3916187,-1,0.0963405405405405},
-{3292562,3915797,3916195,0.089152,-1},
-{3292566,3907702,3907789,0.0411391304347826,-1},
-{3292567,3907789,3907875,0.066768,0.066768},
-{3292568,3904108,3904176,0.03328,0.039936},
-{3292569,3904176,3904920,0.640966666666667,0.427311111111111},
-{3292570,3901770,3901788,0.0170129032258064,0.0181862068965517},
-{3292571,3901788,3901808,0.0204685714285714,0.0265333333333333},
-{3292572,3922677,3922767,0.0581586206896552,0.0544064516129032},
-{3292573,3922767,3922794,0.01835,0.0227793103448276},
-{3292574,3919402,3919477,0.0287142857142857,0.025125},
-{3292577,3902229,3902546,-1,0.217772727272727},
-{3292578,3902546,3902640,-1,0.0273391304347826},
-{3292579,3915173,3915212,0.053856,0.08976},
-{3292580,3915212,3915309,0.1198,0.163363636363636},
-{3292581,3917655,3917688,0.0268875,0.0220615384615385},
-{3292582,3917688,3917708,0.0138171428571429,0.0124},
-{3292583,3917789,3917727,0.048725,-1},
-{3292584,3917727,3917708,0.0195,-1},
-{3292585,3918265,3917996,0.162514285714286,0.162514285714286},
-{3292586,3917996,3917936,0.0459913043478261,0.0364758620689655},
-{3292587,3920794,3921287,0.0989809523809524,0.0989809523809524},
-{3292588,3921287,3921416,0.0278065573770492,0.0269238095238095},
-{3292623,3912088,3910563,0.5257875,0.5257875},
-{3292624,3895871,3895912,0.0564,0.0564},
-{3292625,3896422,3896402,0.01119,0.01119},
-{3292626,3896402,3895871,0.41877,0.41877},
-{3292627,3892958,3892986,0.00589615384615385,0.00589615384615385},
-{3292628,3892260,3892392,0.0281207547169811,0.0292235294117647},
-{3292629,3892392,3892691,0.0721132075471698,0.0749411764705882},
-{3292630,3891842,3892402,0.54588,0.54588},
-{3292631,3892402,3892419,0.0426,0.0426},
-{3292632,3891842,3892560,0.53343,0.53343},
-{3292633,3892560,3892577,0.02721,0.02721},
-{3292634,3902771,3902827,0.0331894736842105,0.03153},
-{3292635,3903218,3903275,0.030704347826087,0.0371684210526316},
-{3292636,3903444,3903485,-1,0.0470117647058824},
-{3292637,3903713,3903762,0.02144,0.0292363636363636},
-{3292638,3899134,3897713,-1,-1},
-{3292639,3897713,3897628,-1,-1},
-{3292640,3896604,3897434,-1,-1},
-{3292641,3895912,3896034,0.17292,0.17292},
-{3292642,3896034,3896711,0.89682,0.89682},
-{3292643,3899786,3899650,0.0950444444444444,0.0950444444444444},
-{3292644,3901531,3901608,0.0283714285714286,-1},
-{3292645,3901608,3901911,0.109105714285714,-1},
-{3292646,3897604,3897471,0.0882888888888889,0.0882888888888889},
-{3292647,3895731,3895717,0.00830232558139535,-1},
-{3292648,3895445,3895640,0.46181052631579,0.46181052631579},
-{3292649,3895640,3895632,0.0193058823529412,0.0105870967741935},
-{3292650,3895384,3895380,0.114914285714286,0.114914285714286},
-{3292651,3895380,3895445,0.1193,0.1193},
-{3292652,3895244,3895275,0.0236666666666667,-1},
-{3292653,3895275,3895330,0.0463333333333333,-1},
-{3292654,3894167,3894235,0.107882352941176,0.0965263157894737},
-{3292655,3894235,3894262,0.043604347826087,0.0385730769230769},
-{3292656,3894534,3894477,0.0142188679245283,0.0147764705882353},
-{3292657,3894476,3894559,0.0345818181818182,0.03804},
-{3292658,3894559,3894607,0.022448275862069,0.02325},
-{3292659,3894751,3894737,0.00745454545454545,0.00745454545454545},
-{3292660,3894737,3894430,0.183933333333333,0.183933333333333},
-{3292661,3895423,3896281,0.402886956521739,0.3861},
-{3292702,3874249,3874238,-1,-1},
-{3292703,3873609,3873827,0.113689285714286,0.113689285714286},
-{3292704,3873827,3875169,0.651377777777778,0.651377777777778},
-{3292705,3875313,3875723,0.155296153846154,0.149544444444444},
-{3292706,3875723,3875837,0.0355894736842105,0.0349758620689655},
-{3292707,3875777,3875672,0.0344816326530612,-1},
-{3292708,3875672,3875138,0.258411428571429,-1},
-{3292709,3875615,3875633,0.00861333333333333,-1},
-{3292710,3875633,3875891,0.09596,-1},
-{3292711,3875558,3875519,0.00978571428571428,-1},
-{3292712,3875519,3875444,0.0211384615384615,-1},
-{3292713,3875444,3875383,0.0196263157894737,-1},
-{3292714,3875383,3875366,0.00611351351351351,-1},
-{3292715,3875366,3875102,0.117476923076923,-1},
-{3292716,3875208,3875471,0.0834954545454546,-1},
-{3292717,3875155,3875208,0.0155714285714286,-1},
-{3292718,3875155,3874896,-1,0.0841578947368421},
-{3292719,3874896,3874818,-1,0.0223170731707317},
-{3292720,3874905,3874705,0.17685,-1},
-{3292721,3874705,3874461,0.123771428571429,-1},
-{3292722,3874723,3874534,0.132727272727273,-1},
-{3292723,3874534,3874461,0.0273483870967742,-1},
-{3292724,3873408,3873443,0.0220947368421053,0.0224892857142857},
-{3292725,3873443,3873609,0.0926947368421053,0.09435},
-{3292726,3878020,3878181,0.0826285714285714,-1},
-{3292727,3877905,3877873,0.012325,-1},
-{3292728,3877533,3877767,0.0462763636363636,0.0446526315789474},
-{3292729,3877283,3877358,-1,0.06115},
-{3292730,3877358,3877740,-1,0.39354},
-{3292731,3877283,3877231,-1,0.1066},
-{3292732,3877231,3877200,-1,0.050448},
-{3292733,3876915,3876033,0.51656,0.6457},
-{3292734,3876033,3875734,0.242031818181818,0.266235},
-{3292735,3875734,3875706,0.014780487804878,0.014780487804878},
-{3292736,3875706,3875665,0.0594,0.101329411764706},
-{3292737,3875665,3875729,0.12945,0.1726},
-{3292738,3875549,3875545,0.00558571428571429,0.00521333333333333},
-{3292739,3875545,3875706,0.166771428571429,0.155653333333333},
-{3292740,3875539,3875431,0.0494129032258065,-1},
-{3292741,3875431,3875412,0.0102,-1},
-{3292742,3875307,3875380,0.0605853658536585,0.0577674418604651},
-{3292743,3875114,3875307,0.215133333333333,0.21045652173913},
-{3292744,3874913,3875114,0.2474,0.2474},
-{3292745,3874890,3874929,0.311481818181818,0.207654545454545},
-{3292746,3874929,3874913,0.0169333333333333,0.00635},
-{3292747,3874913,3874845,0.123911111111111,0.126249056603774},
-{3292748,3874845,3874819,0.123509433962264,0.123509433962264},
-{3292749,3865500,3865444,-1,0.0219454545454545},
-{3292750,3869286,3869147,0.0331116279069767,-1},
-{3292751,3869147,3869108,0.00895909090909091,-1},
-{3292752,3871062,3871007,0.0151783783783784,-1},
-{3292753,3868261,3868166,0.0221466666666667,-1},
-{3292754,3868166,3868107,0.0111521739130435,-1},
-{3292755,3868107,3868047,0.010395652173913,-1},
-{3292756,3866226,3866108,0.0355928571428571,0.0369111111111111},
-{3292757,3865143,3865079,-1,0.380329411764706},
-{3292758,3865143,3865069,-1,0.0281117647058823},
-{3292759,3865056,3865161,0.0344909090909091,-1},
-{3292760,3865427,3865401,-1,0.010032},
-{3292761,3865648,3865507,0.123128571428571,0.0594413793103448},
-{3292762,3865648,3865583,0.15152,-1},
-{3292763,3873598,3873643,0.0694714285714286,0.0784354838709677},
-{3292764,3873643,3873657,0.02125,0.0228358208955224},
-{3292765,3873458,3873598,0.122269565217391,0.129793846153846},
-{3292766,3873390,3873402,-1,0.0226628571428571},
-{3292767,3873402,3873411,-1,0.0510857142857143},
-{3292768,3873594,3873339,0.144775384615385,-1},
-{3292769,3873339,3873305,0.0550909090909091,-1},
-{3292770,3872370,3872562,0.25104,-1},
-{3292771,3872321,3872523,-1,0.26724},
-{3292772,3872103,3872321,0.501324324324324,0.529971428571429},
-{3292773,3871670,3871404,0.1094,0.100469387755102},
-{3292774,3871248,3871280,-1,0.101963636363636},
-{3292775,3869882,3870272,0.155361290322581,0.155361290322581},
-{3292776,3869857,3869882,0.0989333333333333,0.0989333333333333},
-{3292777,3869822,3869524,0.17144,0.17144},
-{3292778,3869524,3869422,0.05336,0.05336},
-{3292779,3868993,3869031,0.0492571428571429,0.0492571428571429},
-{3292780,3869031,3869422,0.323627586206897,0.323627586206897},
-{3292781,3849860,3850324,0.147907692307692,0.140692682926829},
-{3292782,3850273,3849626,0.323088,0.323088},
-{3292783,3849886,3850185,0.137022222222222,0.137022222222222},
-{3292784,3850176,3850097,0.1474125,0.15724},
-{3292785,3850097,3849886,0.200244444444444,0.216264},
-{3292786,3850176,3850035,0.0632181818181818,0.0632181818181818},
-{3292787,3850176,3850010,0.171485714285714,0.171485714285714},
-{3292794,3866384,3866738,0.150822222222222,0.150822222222222},
-{3292795,3868093,3867959,0.118593103448276,0.118593103448276},
-{3292796,3871306,3871319,0.004452,0.00473617021276596},
-{3292797,3873371,3873510,-1,0.174697959183673},
-{3292798,3873510,3873522,-1,0.0393829787234043},
-{3292799,3873522,3873396,-1,0.0951473684210526},
-{3292800,3873522,3873485,-1,0.0571565217391304},
-{3292801,3873541,3873369,0.0776,0.0886857142857143},
-{3292802,3873369,3872607,0.278258823529412,0.286690909090909},
-{3292803,3873541,3873341,0.0927058823529412,0.0909230769230769},
-{3292804,3873341,3872353,0.283524,0.277964705882353},
-{3292864,3858439,3858522,0.0355454545454545,0.0355454545454545},
-{3292865,3858906,3860427,0.810666666666667,0.810666666666667},
-{3292866,3856967,3856545,0.0685107692307692,0.0654882352941176},
-{3292867,3856545,3854813,0.286627272727273,0.278197058823529},
-{3292868,3857568,3858011,0.167515384615385,0.106229268292683},
-{3292882,3896090,3896072,-1,0.0239142857142857},
-{3292883,3896207,3896289,-1,0.05601},
-{3292884,3899115,3899102,-1,-1},
-{3292885,3899859,3899901,0.0474,0.0778714285714286},
-{3292886,3900387,3900382,-1,0.0516782608695652},
-{3292887,3900536,3900455,0.17085,0.0471310344827586},
-{3292888,3900780,3900680,0.0671052631578948,-1},
-{3292889,3900680,3900565,0.07089,-1},
-{3292890,3900846,3900819,-1,0.0392769230769231},
-{3292891,3900819,3900831,-1,0.04708},
-{3292892,3900780,3900742,-1,0.0152428571428571},
-{3292893,3900742,3900670,-1,0.0301421052631579},
-{3292894,3905019,3905392,-1,-1},
-{3292895,3901613,3901755,0.064975,-1},
-{3292896,3901755,3901808,0.02592,-1},
-{3292897,3896053,3896003,-1,0.027528},
-{3292898,3896522,3896578,0.0274333333333333,-1},
-{3292899,3896866,3896841,0.0114857142857143,0.0104869565217391},
-{3292900,3897371,3897337,-1,-1},
-{3292901,3898090,3898119,0.00795483870967742,0.010275},
-{3292902,3898182,3898185,-1,0.014904},
-{3292903,3900114,3900173,0.0261818181818182,0.0261818181818182},
-{3292904,3900114,3900124,-1,0.0981058823529412},
-{3292905,3900082,3900135,0.0296625,0.01582},
-{3292906,3899628,3899818,0.0641090909090909,0.07052},
-{3292907,3899748,3899518,0.09236,-1},
-{3292908,3899629,3899677,0.0168,-1},
-{3292909,3902618,3902719,0.04488,-1},
-{3292914,3897670,3897794,0.0304173913043478,-1},
-{3292915,3897520,3897568,0.0535714285714286,-1},
-{3292916,3897394,3897421,0.0633,-1},
-{3292917,3897219,3897231,0.11244,-1},
-{3292918,3898437,3898468,0.00848333333333333,0.00783076923076923},
-{3292919,3898468,3898771,0.08376,0.0779162790697674},
-{3292920,3897499,3897709,0.125816326530612,0.125816326530612},
-{3292921,3897709,3898437,0.303286363636364,0.296546666666667},
-{3292922,3895323,3895517,0.507085714285714,0.5916},
-{3292923,3895517,3895650,0.107866666666667,0.107866666666667},
-{3292924,3896146,3896145,0.035575,0.0449368421052632},
-{3292925,3896247,3896333,0.17286,-1},
-{3292926,3896333,3897259,1.1193,-1},
-{3292927,3897382,3897552,0.1515,-1},
-{3292970,3866493,3866382,0.09384,0.09384},
-{3292971,3866382,3866254,0.081,0.0964285714285714},
-{3292972,3866254,3866240,0.0132666666666667,0.0140470588235294},
-{3292973,3866240,3866051,0.164571428571429,0.1728},
-{3292974,3900038,3899953,0.0376222222222222,0.0376222222222222},
-{3292975,3899953,3899914,0.0103454545454545,0.0103454545454545},
-{3292976,3886116,3886113,-1,0.00382153846153846},
-{3292977,3886113,3886072,-1,0.0335538461538462},
-{3292978,3886050,3886038,0.00407272727272727,-1},
-{3292979,3886038,3885972,0.0340567164179104,-1},
-{3292980,3898879,3898936,-1,-1},
-{3292981,3898936,3898977,-1,-1},
-{3292982,3899077,3899233,0.09207,0.09207},
-{3292983,3899233,3899364,0.1229,0.1229},
-{3292984,3899364,3899489,0.134470588235294,0.122464285714286},
-{3292985,3899489,3899493,0.0384823529411765,0.0344315789473684},
-{3292986,3877353,3877181,0.0774888888888889,0.0774888888888889},
-{3292987,3877181,3875889,0.924654545454546,0.924654545454546},
-{3292988,3877315,3877080,0.0939555555555556,0.110295652173913},
-{3292989,3877080,3876982,0.0340645161290323,0.0391111111111111},
-{3292990,3886002,3886016,0.00971818181818182,-1},
-{3292991,3886016,3886072,0.0311181818181818,-1},
-{3292992,3898364,3897654,0.4998,0.4998},
-{3292993,3897654,3897567,0.06051,0.06051},
-{3292994,3899062,3898842,0.12627,0.12627},
-{3292995,3899428,3899062,0.36174,0.36174},
-{3292996,3899535,3899428,0.0800222222222222,0.0800222222222222},
-{3292997,3898364,3899746,-1,-1},
-{3292998,3899746,3899535,0.0999777777777778,0.0999777777777778},
-{3292999,3876193,3876199,0.0653272727272727,0.0653272727272727},
-{3293000,3876199,3876195,0.12735,0.12735},
-{3293001,3879740,3879760,0.0139153846153846,-1},
-{3293002,3879760,3879799,0.0221076923076923,-1},
-{3293003,3879718,3879738,-1,0.00926842105263158},
-{3293004,3879738,3879771,-1,0.0187945945945946},
-{3293005,3879392,3879276,0.0908210526315789,0.0663692307692308},
-{3293006,3875077,3875225,0.21448,0.2681},
-{3293007,3875225,3875266,0.0429230769230769,0.0265714285714286},
-{3293008,3875334,3875379,0.101471428571429,0.0947066666666667},
-{3293009,3875379,3875393,0.0358857142857143,0.0342545454545455},
-{3293010,3875560,3875522,0.026475,0.00814615384615384},
-{3293011,3875522,3875481,0.0290625,0.0103333333333333},
-{3293012,3875560,3875632,0.15844,-1},
-{3293013,3875632,3875623,0.00703636363636364,-1},
-{3293014,3879379,3879417,0.0184285714285714,-1},
-{3293015,3879403,3879379,-1,0.0215454545454545},
-{3293016,3879326,3879379,0.0204,-1},
-{3293017,3879855,3879829,-1,0.0313714285714286},
-{3293018,3880679,3881106,0.25245,-1},
-{3293019,3881628,3881611,0.178971428571429,-1},
-{3293020,3881412,3881451,-1,0.020328},
-{3293021,3879295,3879346,-1,0.0330666666666667},
-{3293022,3879171,3879010,0.106324137931034,-1},
-{3293023,3880781,3880590,-1,0.226730769230769},
-{3293024,3880590,3880570,-1,0.01724},
-{3293025,3879018,3879559,-1,-1},
-{3293026,3879559,3879583,-1,0.0343},
-{3293027,3863045,3863058,0.0475304347826087,0.0341625},
-{3293028,3863087,3861496,0.807422222222222,0.807422222222222},
-{3293029,3861496,3859438,0.855454545454545,0.855454545454545},
-{3293030,3859438,3859520,0.128576470588235,0.156128571428571},
-{3293031,3859520,3859690,0.31416,0.31416},
-{3293032,3859477,3859417,0.0200776119402985,0.0200776119402985},
-{3293033,3859417,3859408,0.00375223880597015,0.00375223880597015},
-{3293034,3859191,3858507,0.676381818181818,0.676381818181818},
-{3293035,3858507,3858717,0.128133333333333,0.128133333333333},
-{3293036,3858348,3858314,-1,0.00435652173913043},
-{3293037,3858314,3854600,-1,0.430774468085106},
-{3293038,3858172,3858080,0.0117954545454545,-1},
-{3293039,3858080,3854609,0.404806451612903,-1},
-{3293040,3857511,3857480,0.00869333333333333,0.00931428571428571},
-{3293041,3857480,3857330,0.0387702127659574,0.0404933333333333},
-{3293042,3856793,3856839,0.024624,0.024624},
-{3293043,3855913,3856649,0.39246,0.39246},
-{3293044,3855348,3855659,0.25464,0.25464},
-{3293045,3855659,3855913,0.1314,0.1314},
-{3293046,3854795,3854896,0.0318489795918367,0.031212},
-{3293047,3854896,3855579,0.196035294117647,0.199956},
-{3293048,3854795,3854812,0.0131636363636364,0.0188869565217391},
-{3293049,3854812,3854551,0.474518181818182,0.497114285714286},
-{3293050,3853675,3853904,0.511263157894737,0.539666666666667},
-{3293051,3853904,3853879,0.0341647058823529,0.0200275862068966},
-{3293052,3853235,3853638,0.18264,0.169111111111111},
-{3293053,3853638,3853879,0.0985043478260869,0.0924734693877551},
-{3293054,3851549,3852836,0.840023076923077,1.09203},
-{3293055,3850207,3850404,0.447917647058824,0.400768421052632},
-{3293056,3850404,3849705,1.1376,1.1376},
-{3293057,3849555,3849242,0.178866666666667,0.146345454545455},
-{3293058,3849242,3849212,0.0149454545454545,0.0133297297297297},
-{3293059,3878430,3878480,0.0935357142857143,-1},
-{3293060,3878480,3878307,0.12752,-1},
-{3293061,3878618,3878561,-1,0.03673125},
-{3293062,3878797,3878733,0.0285111111111111,0.0334695652173913},
-{3293063,3878733,3878722,0.005856,0.00665454545454545},
-{3293064,3879616,3879886,-1,0.127213333333333},
-{3293065,3879886,3880055,-1,0.0883363636363636},
-{3293066,3880030,3880239,0.169977777777778,-1},
-{3293067,3880239,3880206,0.0458608695652174,-1},
-{3293068,3880030,3880498,0.206533333333333,0.189673469387755},
-{3293069,3880498,3880704,0.158689655172414,0.121105263157895},
-{3293070,3881078,3880798,0.143237837837838,0.108159183673469},
-{3293071,3880798,3880704,0.0753777777777778,0.0484571428571429},
-{3293072,3881082,3881178,0.0458341463414634,0.0536914285714286},
-{3293073,3881178,3881291,0.0536590909090909,0.0575853658536585},
-{3293074,3881111,3881268,-1,0.0398571428571429},
-{3293075,3881268,3881291,-1,0.0052448275862069},
-{3293076,3881139,3881295,0.0424551724137931,-1},
-{3293077,3881295,3881329,0.0067551724137931,-1},
-{3293078,3881491,3881494,0.04843125,-1},
-{3293079,3881494,3881480,0.0302,-1},
-{3293080,3881589,3881533,0.04784,0.04485},
-{3293081,3881533,3881480,0.0260347826086957,0.037425},
-{3293082,3881480,3881550,0.0301909090909091,-1},
-{3293083,3881550,3881633,0.04146,-1},
-{3293084,3881949,3881920,0.01893,0.02524},
-{3293085,3882493,3882529,-1,-1},
-{3293086,3882657,3882597,0.11594693877551,-1},
-{3293087,3882597,3882541,0.04586,-1},
-{3293088,3882712,3882693,0.02428,-1},
-{3293089,3882693,3882657,0.0562285714285714,-1},
-{3293090,3882636,3882712,0.0305769230769231,-1},
-{3293091,3882724,3882656,0.05145,-1},
-{3293092,3882522,3882654,-1,0.0554153846153846},
-{3293093,3882652,3882548,-1,0.03375},
-{3293094,3882548,3882631,-1,-1},
-{3293095,3882631,3882629,-1,-1},
-{3293096,3882629,3882602,-1,-1},
-{3293097,3849705,3850080,0.501163636363636,0.501163636363636},
-{3293098,3850080,3850119,0.260933333333333,0.260933333333333},
-{3293099,3850119,3850164,0.270363636363636,0.270363636363636},
-{3293100,3849313,3849305,0.02205,0.0363176470588235},
-{3293101,3849305,3848838,0.736605405405405,0.736605405405405},
-{3293102,3849313,3849247,0.0149660377358491,0.0149660377358491},
-{3293103,3849247,3849037,0.0551,0.0561396226415094},
-{3293104,3848851,3849042,0.106022222222222,0.106022222222222},
-{3293105,3849042,3849861,0.334163636363636,0.334163636363636},
-{3293106,3848910,3849105,-1,-1},
-{3293107,3849105,3850182,-1,-1},
-{3293108,3850182,3849578,0.543363636363636,0.543363636363636},
-{3293109,3849578,3849147,0.2154,0.2154},
-{3293110,3850696,3850043,0.0957438202247191,-1},
-{3293111,3850043,3849499,0.07976,-1},
-{3293112,3850854,3850168,-1,0.0881755102040816},
-{3293113,3850168,3849512,-1,0.0920273684210526},
-{3293114,3857991,3858327,0.108323076923077,0.084492},
-{3293115,3858060,3857977,-1,0.0206571428571429},
-{3293116,3857977,3857587,-1,0.0802723404255319},
-{3293117,3857812,3857976,0.0330679245283019,0.0257735294117647},
-{3293118,3857976,3858034,0.0123,0.00976764705882353},
-{3293119,3858611,3858302,0.114272727272727,-1},
-{3293120,3858302,3858180,0.0261807692307692,-1},
-{3293121,3858180,3857973,0.0431892857142857,-1},
-{3293122,3857973,3857812,0.0362947368421053,-1},
-{3293123,3858611,3858572,0.0530322580645161,0.051375},
-{3293124,3858572,3858558,0.0161806451612903,0.0159238095238095},
-{3293125,3858888,3859189,-1,0.0591807692307692},
-{3293126,3859189,3859469,-1,0.0581571428571429},
-{3293127,3858903,3859776,0.285672727272727,0.285672727272727},
-{3293128,3859776,3859940,0.0720888888888889,0.0720888888888889},
-{3293129,3859091,3859910,0.3434,0.3434},
-{3293130,3859910,3859940,0.0165333333333333,0.0165333333333333},
-{3293131,3860696,3861255,0.2564,0.2564},
-{3293132,3861255,3861601,0.151836363636364,0.151836363636364},
-{3293133,3860696,3861776,0.517133333333333,0.517133333333333},
-{3293134,3861776,3861900,0.0549818181818182,0.0549818181818182},
-{3293135,3861378,3861953,-1,0.126140625},
-{3293136,3862066,3862042,-1,0.00643636363636364},
-{3293137,3862042,3861991,-1,0.0144214285714286},
-{3293138,3862288,3862284,0.0144206896551724,0.0134903225806452},
-{3293139,3862284,3862280,0.0248625,0.0241090909090909},
-{3293142,3883089,3883430,0.0713678571428571,-1},
-{3293143,3883044,3883361,-1,0.0665389830508474},
-{3293144,3864183,3864211,0.0595125,0.0453428571428571},
-{3293145,3864211,3864222,0.009,0.009},
-{3293146,3849628,3849526,-1,-1},
-{3293147,3849526,3849505,-1,-1},
-{3293148,3852316,3852304,0.0138666666666667,0.0138666666666667},
-{3293149,3852304,3851741,0.614263636363636,0.643514285714286},
-{3293150,3853628,3852737,0.512422222222222,0.628881818181818},
-{3293151,3852737,3852728,0.004525,0.00638823529411765},
-{3293152,3854250,3854134,0.167576470588235,0.167576470588235},
-{3293153,3854870,3854543,0.194379310344828,0.28185},
-{3293154,3855397,3855247,0.0929111111111111,0.0929111111111111},
-{3293155,3861596,3861603,0.00920869565217391,0.01412},
-{3293156,3861603,3861723,0.118281818181818,0.17348},
-{3293161,3892857,3892128,0.462225,-1},
-{3293162,3892128,3892117,0.0128,-1},
-{3293163,3893982,3894313,-1,-1},
-{3293164,3893249,3893329,0.1431,0.1431},
-{3293165,3893249,3893222,-1,-1},
-{3293166,3892592,3892823,0.0774181818181818,0.0774181818181818},
-{3293167,3892823,3893249,0.55285,0.510323076923077},
-{3293168,3891457,3891611,-1,-1},
-{3293171,3890771,3890844,0.227025,0.12108},
-{3293172,3890612,3890844,0.209446153846154,-1},
-{3293173,3890112,3890283,0.112566666666667,-1},
-{3293174,3890283,3890612,0.295476923076923,-1},
-{3293175,3889316,3888950,0.15214,0.147232258064516},
-{3293176,3888950,3888915,0.0136153846153846,0.01416},
-{3293177,3888988,3889455,0.371366666666667,0.33423},
-{3293178,3889455,3889561,0.129642857142857,0.129642857142857},
-{3293179,3888972,3889664,-1,0.303495},
-{3293180,3888972,3888893,0.0406571428571429,0.0449368421052632},
-{3293181,3888320,3888521,-1,0.060195652173913},
-{3293188,3891710,3892318,0.154848,-1},
-{3293189,3889167,3889132,-1,0.0169894736842105},
-{3293190,3889132,3889066,-1,0.0277542857142857},
-{3293191,3889462,3889443,0.008856,-1},
-{3293192,3889443,3888909,0.286555555555556,-1},
-{3293193,3883989,3883954,0.0193272727272727,0.0193272727272727},
-{3293194,3883954,3883686,0.178333333333333,0.178333333333333},
-{3293195,3881362,3880930,0.360325,-1},
-{3293196,3880766,3880944,0.0824108108108108,0.160484210526316},
-{3293197,3880667,3880800,0.0632,-1},
-{3293275,3893705,3893723,0.0131837837837838,-1},
-{3293276,3894585,3894802,-1,0.05469375},
-{3293277,3895892,3895875,-1,0.0656},
-{3293278,3895892,3895986,-1,0.0469666666666667},
-{3293279,3892586,3892942,0.139176,-1},
-{3293280,3892942,3892959,0.0121333333333333,-1},
-{3293281,3892959,3892953,0.00984,0.00984},
-{3293282,3892953,3892875,0.0654521739130435,0.07527},
-{3293283,3894830,3894835,-1,-1},
-{3293357,3883941,3884899,0.143492957746479,-1},
-{3293358,3884899,3885302,0.0588608695652174,-1},
-{3293359,3883947,3884913,-1,0.149713043478261},
-{3293360,3884913,3885290,-1,0.0549739130434783},
-{3293361,3901585,3901643,-1,0.0236914285714286},
-{3293362,3901643,3901943,-1,0.108855882352941},
-{3293363,3913336,3914556,0.85332,0.85332},
-{3293364,3914556,3914574,0.01272,0.01272},
-{3293365,3913478,3914063,0.23175,0.218117647058824},
-{3293366,3914063,3914082,0.0140117647058824,0.00882222222222222},
-{3293367,3912896,3913416,0.271977777777778,0.22948125},
-{3293368,3913416,3913440,0.02432,0.0110545454545455},
-{3293369,3911799,3912300,0.19607027027027,0.186015384615385},
-{3293370,3912300,3912334,0.0241428571428571,0.0144857142857143},
-{3293371,3909648,3910535,0.6268,0.65814},
-{3293372,3906538,3906590,0.02322,0.02322},
-{3293373,3906590,3906752,0.05528,0.05528},
-{3293374,3906752,3907156,0.230842105263158,0.230842105263158},
-{3293375,3910724,3913000,0.330286567164179,0.325429411764706},
-{3293376,3907041,3907251,0.23928,0.23928},
-{3293377,3906009,3906278,0.1946,0.1946},
-{3293378,3906278,3906335,0.0395111111111111,0.0395111111111111},
-{3293379,3906335,3906355,0.0584222222222222,0.0584222222222222},
-{3293380,3907251,3907220,0.78063,0.78063},
-{3293381,3907220,3907149,0.05064,0.05064},
-{3293382,3907190,3907336,0.0978444444444444,0.0978444444444444},
-{3293383,3907336,3907394,0.0896545454545454,0.0896545454545454},
-{3293384,3907394,3907183,0.0919818181818182,0.0919818181818182},
-{3293385,3907183,3906690,0.172888888888889,0.172888888888889},
-{3293386,3905968,3905876,0.0399777777777778,0.0399777777777778},
-{3331546,3879171,3879185,-1,0.0143769230769231},
-{3331547,3879185,3879217,-1,0.0194666666666667},
-{3331548,3879299,3879174,-1,0.0507454545454545},
-{3331771,3898987,3899228,0.153381818181818,0.16872},
-{3331772,3899323,3899506,0.100577777777778,0.0798705882352941},
-{3331773,3899506,3899670,0.095575,0.0849555555555556},
-{3331774,3899506,3899617,0.240288888888889,0.240288888888889},
-{3331775,3904818,3904311,0.331513043478261,0.346581818181818},
-{3331776,3904311,3904022,0.147921428571429,0.165672},
-{3331777,3903928,3904311,0.2483625,-1},
-{3331962,3881680,3881661,0.0151,-1},
-{3331963,3881661,3881237,0.431325,-1},
-{3331966,3850772,3851044,0.28254,0.269085714285714},
-{3331967,3851706,3851874,0.144312,0.144312},
-{3331968,3851874,3852372,0.316872727272727,0.360579310344828},
-{3331969,3852766,3852868,0.0742,0.0933483870967742},
-{3331970,3852766,3851906,0.266127272727273,0.266127272727273},
-{3331971,3851044,3851454,0.216644444444444,0.216644444444444},
-{3331972,3851454,3851874,0.209622222222222,0.209622222222222},
-{3331973,3852372,3852547,0.0669681818181818,0.0685255813953488},
-{3331974,3852547,3852766,0.12508,0.137282926829268},
-{3331975,3852485,3852547,0.0152727272727273,0.0152727272727273},
-{3331976,3851454,3852027,0.411044444444444,0.411044444444444},
-{3331977,3852027,3852485,0.174333333333333,0.174333333333333},
-{3331978,3851840,3851652,0.0699636363636364,0.0699636363636364},
-{3332140,3849205,3848556,0.457336363636364,0.591847058823529},
-{3332362,3898091,3898852,0.299588235294118,0.2778},
-{3332363,3898852,3898884,0.011669387755102,0.0109961538461538},
-{3332497,3864009,3864013,0.06005,-1},
-{3332498,3863854,3864015,-1,0.0953052631578947},
-{3332499,3863465,3863472,-1,0.00842222222222222},
-{3332500,3863472,3864027,-1,0.771988235294118},
-{3332501,3862791,3862824,-1,0.0445411764705882},
-{3332502,3862824,3863615,-1,0.796857142857143},
-{3332503,3862616,3862587,0.0426,-1},
-{3332504,3862587,3862535,0.0979909090909091,-1},
-{3332505,3860787,3860810,0.0389333333333333,0.0368842105263158},
-{3332506,3860810,3860921,0.120444444444444,0.120444444444444},
-{3332507,3860524,3860396,0.04836,0.101810526315789},
-{3332508,3860327,3860396,-1,0.08097},
-{3332509,3860229,3859961,0.071075,0.100341176470588},
-{3332510,3859315,3859328,0.0297157894736842,-1},
-{3332511,3859961,3859563,0.141754838709677,0.107180487804878},
-{3332512,3859563,3859475,0.0340714285714286,0.0244615384615385},
-{3332513,3859328,3859350,0.0174571428571429,-1},
-{3332514,3859350,3859781,0.2868,-1},
-{3332515,3858773,3858317,0.31135,0.298896},
-{3332516,3858245,3858317,0.0544090909090909,0.0323513513513514},
-{3332517,3866450,3866346,-1,0.052875},
-{3332518,3866346,3866217,-1,0.0831428571428571},
-{3332519,3866307,3866405,0.0483545454545454,-1},
-{3332520,3866538,3866734,0.0652071428571429,-1},
-{3332521,3866755,3866619,0.14696,-1},
-{3332522,3867408,3867210,-1,0.199133333333333},
-{3332523,3867639,3867426,-1,0.110616},
-{3332524,3867426,3867141,-1,0.12252},
-{3332525,3867784,3867668,0.0266,-1},
-{3332526,3867668,3867585,0.0245066666666667,-1},
-{3332527,3869010,3868831,0.0470590909090909,-1},
-{3332528,3870062,3869912,0.0524275862068966,0.0460727272727273},
-{3332529,3870832,3870375,0.26805,-1},
-{3332530,3871064,3871123,0.129161538461538,-1},
-{3332531,3871123,3871122,0.00783529411764706,-1},
-{3332532,3871221,3871207,-1,0.17676},
-{3332533,3871207,3871199,-1,0.0141789473684211},
-{3332534,3871496,3871465,-1,0.00754545454545455},
-{3332535,3871465,3871410,-1,0.0136909090909091},
-{3332536,3872019,3871496,-1,0.125616666666667},
-{3332537,3872381,3872560,-1,0.03788},
-{3332538,3872628,3872630,-1,0.0462714285714286},
-{3332539,3872657,3872632,0.0391888888888889,0.0384763636363636},
-{3332540,3872632,3872625,0.438621818181818,0.423231578947368},
-{3332545,3872878,3872866,0.0243762711864407,0.0282},
-{3332546,3872866,3872855,0.03205,0.0369807692307692},
-{3332547,3872669,3872700,-1,0.0766829268292683},
-{3332548,3872700,3872708,-1,0.0194},
-{3332549,3872569,3872608,0.1146,-1},
-{3332550,3872608,3872613,0.02484,-1},
-{3332551,3872006,3872003,0.016551724137931,-1},
-{3332552,3872003,3871985,0.112525,-1},
-{3332553,3871483,3871468,-1,-1},
-{3332554,3871468,3871421,-1,-1},
-{3332555,3870812,3870766,0.01378,-1},
-{3332556,3870766,3870734,0.00687096774193548,-1},
-{3332557,3870759,3870726,-1,0.00826153846153846},
-{3332558,3870726,3870699,-1,0.011016},
-{3332559,3870126,3870101,0.0201538461538462,-1},
-{3332560,3870101,3870058,0.0384486486486487,-1},
-{3332561,3870058,3870014,0.0248833333333333,-1},
-{3332562,3870014,3869965,0.018372972972973,-1},
-{3332563,3869965,3869912,0.0160702702702703,-1},
-{3332564,3869010,3868867,0.0712222222222222,0.09615},
-{3332565,3867783,3867779,-1,0.0658714285714286},
-{3332566,3867779,3867772,-1,0.261505263157895},
-{3332567,3867585,3867554,0.0210461538461538,0.0304},
-{3332568,3867554,3866916,0.288535714285714,0.577071428571428},
-{3332569,3867585,3867366,0.0646266666666667,-1},
-{3332570,3867366,3867052,0.0985813953488372,-1},
-{3332571,3866482,3866208,0.07788,-1},
-{3332572,3866420,3866122,-1,0.0746},
-{3332573,3865076,3865082,0.0237882352941176,0.0139448275862069},
-{3332574,3865082,3865105,0.163094117647059,0.163094117647059},
-{3332575,3864550,3864520,0.0174642857142857,-1},
-{3332576,3864520,3864475,0.0132342857142857,-1},
-{3332577,3864475,3864435,0.0110470588235294,-1},
-{3332619,3864435,3864386,0.01515,-1},
-{3332620,3856069,3856271,0.0984222222222222,-1},
-{3332621,3856027,3855787,0.08817,0.103729411764706},
-{3332622,3855787,3855710,0.024,0.0258461538461538},
-{3332623,3852289,3851945,-1,0.310517647058824},
-{3332624,3851901,3851945,0.01872,-1},
-{3332625,3851901,3851878,-1,0.014328},
-{3332626,3851878,3849591,-1,1.41927},
-{3332627,3855684,3855644,0.0173571428571429,0.0177804878048781},
-{3332628,3855644,3855370,0.108230769230769,0.1005},
-{3332631,3918119,3918327,0.0768,0.0861090909090909},
-{3332632,3918327,3918370,0.0194294117647059,0.02202},
-{3332633,3920820,3920285,0.329688888888889,0.342369230769231},
-{3332634,3911732,3911914,0.13758,0.13758},
-{3332635,3911914,3913103,0.72675,0.72675},
-{3332636,3909224,3909338,0.18,0.187826086956522},
-{3332637,3909338,3910835,0.685866666666667,0.685866666666667},
-{3332638,3908743,3908768,0.00487659574468085,0.00545714285714286},
-{3332639,3906662,3906679,0.00901395348837209,0.00880909090909091},
-{3332640,3906679,3906735,0.0253,0.0247116279069767},
-{3332641,3907855,3907682,-1,0.07604},
-{3332642,3907682,3907642,-1,0.01336},
-{3332643,3908083,3908136,0.0124897959183673,-1},
-{3332644,3908270,3908448,0.0465789473684211,0.0421428571428571},
-{3332653,3905869,3905884,0.00968275862068966,0.011232},
-{3332654,3907215,3907128,0.0503032258064516,-1},
-{3332655,3907128,3907106,0.00755172413793103,-1},
-{3332656,3907215,3907191,-1,0.0699652173913043},
-{3332657,3907191,3907164,-1,0.0417},
-{3332658,3907593,3907629,0.1337,-1},
-{3332659,3907629,3907702,0.0301909090909091,-1},
-{3332660,3907875,3907907,0.0287571428571429,0.0298222222222222},
-{3332662,3923205,3924137,0.616118918918919,0.735367741935484},
-{3332669,3922922,3923485,0.142490909090909,0.142490909090909},
-{3332670,3921275,3921370,0.0871272727272727,0.0871272727272727},
-{3332671,3921370,3921875,0.464533333333333,0.464533333333333},
-{3332672,3918426,3918582,0.0712714285714286,0.0700210526315789},
-{3332673,3918141,3917296,0.515171428571429,0.450775},
-{3332674,3917296,3915952,0.5439375,0.511941176470588},
-{3332675,3915952,3916028,0.083775,0.0957428571428571},
-{3332676,3916028,3916452,0.27387,0.3222},
-{3332677,3915096,3915208,0.153914285714286,0.153914285714286},
-{3332678,3915208,3915648,0.329735294117647,0.249133333333333},
-{3332679,3910214,3910245,0.00857777777777778,0.00857777777777778},
-{3332680,3910245,3909473,0.353618181818182,0.353618181818182},
-{3332681,3907732,3907270,0.376615384615385,0.188307692307692},
-{3332682,3907270,3907243,0.0127909090909091,0.011256},
-{3332683,3907243,3907230,0.00913548387096774,0.00944},
-{3332684,3907230,3907215,0.0115935483870968,0.0128357142857143},
-{3332685,3905884,3905922,0.0371225806451613,0.0396827586206897},
-{3332686,3905922,3906139,0.166552941176471,0.166552941176471},
-{3332687,3907907,3908028,0.04426,0.04426},
-{3332688,3908028,3908270,0.0779647058823529,0.0736333333333333},
-{3332689,3907593,3907860,-1,0.0705},
-{3332690,3907860,3908123,-1,0.0710594594594594},
-{3332691,3907579,3907821,0.050256,-1},
-{3332692,3907821,3908083,0.0538408163265306,-1},
-{3332694,3922243,3921624,0.367345945945946,0.37755},
-{3332695,3921624,3921604,0.0108818181818182,0.0082551724137931},
-{3332736,3895293,3895276,0.0281333333333333,0.0281333333333333},
-{3332737,3895276,3896312,0.874327272727273,0.874327272727273},
-{3332738,3894049,3894070,-1,-1},
-{3332739,3895701,3896280,0.374825,0.2726},
-{3332740,3896280,3896652,0.136271428571429,0.136271428571429},
-{3332741,3901914,3901924,0.004464,0.00465},
-{3332742,3901924,3902016,0.031596,0.0329125},
-{3332743,3902016,3902099,0.0410307692307692,0.0508},
-{3332744,3903208,3903918,0.597618181818182,0.597618181818182},
-{3332745,3904871,3904914,0.01878,0.0165705882352941},
-{3332746,3904914,3904971,0.03494,0.0291166666666667},
-{3332747,3904010,3904069,0.0379333333333333,0.0379333333333333},
-{3332748,3903918,3903993,0.150776470588235,0.11144347826087},
-{3332749,3903993,3904010,0.0322285714285714,0.03008},
-{3332750,3903762,3903816,0.02406,0.028872},
-{3332751,3903816,3904010,0.0761470588235294,0.0739714285714286},
-{3332752,3903485,3903525,-1,0.0316090909090909},
-{3332753,3903525,3904603,-1,0.465781818181818},
-{3332754,3903275,3903329,0.0282,0.0250666666666667},
-{3332755,3903329,3904001,0.308236363636364,0.308236363636364},
-{3332756,3903006,3903094,0.0585391304347826,0.0792},
-{3332757,3903094,3903741,0.302927272727273,0.302927272727273},
-{3332758,3902827,3902867,0.0336315789473684,0.0304285714285714},
-{3332759,3902867,3903905,0.605746153846154,0.54308275862069},
-{3332760,3902529,3902625,0.0983,0.073725},
-{3332761,3902625,3903682,0.721090909090909,0.721090909090909},
-{3332762,3902361,3903489,0.889933333333333,0.53396},
-{3332763,3902099,3902115,0.0105,0.0121578947368421},
-{3332764,3902115,3903269,0.70424347826087,0.70424347826087},
-{3332765,3901781,3901903,0.049404,0.0504122448979592},
-{3332766,3901903,3901914,0.0036,0.00375},
-{3332767,3900891,3901049,0.119888888888889,0.119888888888889},
-{3332768,3901049,3901106,0.052584,0.052584},
-{3332769,3900288,3900271,0.00991363636363636,0.0106390243902439},
-{3332770,3900271,3900107,0.0715116279069767,0.0809210526315789},
-{3332771,3900107,3899526,0.2457,0.292183783783784},
-{3332772,3900483,3899553,0.421594285714286,0.409883333333333},
-{3332773,3899553,3899526,0.0220090909090909,0.0172928571428571},
-{3332774,3899287,3899317,0.0122181818181818,0.0122181818181818},
-{3332775,3899317,3899988,0.432933333333333,0.432933333333333},
-{3332776,3899095,3899124,0.0147130434782609,0.02256},
-{3332777,3899124,3899244,0.087264,0.0991636363636364},
-{3332778,3898902,3898914,0.0221625,0.00933157894736842},
-{3332779,3898914,3899095,0.15815,0.0925756097560975},
-{3332780,3898677,3898891,-1,0.208224},
-{3332781,3898891,3898902,-1,0.00934736842105263},
-{3332782,3898677,3898750,0.03748,0.07496},
-{3332783,3898750,3898970,0.105859459459459,0.186514285714286},
-{3332784,3898232,3898374,0.0577454545454546,0.0577454545454546},
-{3332785,3898374,3898937,0.437288888888889,0.437288888888889},
-{3332786,3897821,3897877,-1,0.043272},
-{3332787,3897877,3898232,-1,0.2411375},
-{3332788,3897549,3897571,0.0148885714285714,0.015104347826087},
-{3332789,3895502,3895733,0.0917619047619048,-1},
-{3332790,3895733,3896018,0.0918727272727273,-1},
-{3332791,3895536,3895502,0.01922,-1},
-{3332792,3895146,3895439,-1,0.155530434782609},
-{3332793,3895439,3895536,-1,0.051625},
-{3332794,3895146,3895150,0.0233625,-1},
-{3332795,3895150,3895199,0.0850838709677419,-1},
-{3332796,3895018,3895059,0.0228230769230769,-1},
-{3332797,3895059,3895199,0.0730758620689655,-1},
-{3332798,3895005,3895020,-1,0.00710322580645161},
-{3332799,3895020,3895054,-1,0.0186},
-{3332800,3894748,3894787,-1,0.0292723404255319},
-{3332801,3894787,3894810,-1,0.0170869565217391},
-{3332802,3894701,3894721,-1,0.0227076923076923},
-{3332803,3894721,3894748,-1,0.0204734693877551},
-{3332804,3894349,3894584,-1,0.343955172413793},
-{3332805,3894584,3894701,-1,0.114993103448276},
-{3332806,3894508,3894429,-1,0.136609523809524},
-{3332807,3894429,3894349,-1,0.1572375},
-{3332808,3894262,3894281,0.0391714285714286,0.0376352941176471},
-{3332809,3894281,3894291,0.0137884615384615,0.0140588235294118},
-{3332810,3895330,3895453,0.0787714285714286,-1},
-{3332811,3895453,3895993,0.430408695652174,-1},
-{3332812,3895993,3895959,0.0185314285714286,-1},
-{3332813,3895959,3895731,0.107839024390244,-1},
-{3332814,3898018,3897879,0.1036,0.143446153846154},
-{3332815,3897879,3897604,0.253523076923077,0.253523076923077},
-{3332816,3894021,3894030,-1,-1},
-{3332817,3894030,3894049,-1,-1},
-{3332834,3868525,3868598,0.0494666666666667,-1},
-{3332835,3869116,3868908,-1,0.044016},
-{3332836,3868908,3868650,-1,0.0481959183673469},
-{3332837,3869549,3869299,-1,0.0437411764705882},
-{3332838,3869897,3869704,0.0432272727272727,-1},
-{3332839,3869704,3869541,0.0330142857142857,-1},
-{3332840,3871032,3870627,-1,0.108892682926829},
-{3332841,3870627,3870566,-1,0.0137875},
-{3332842,3871032,3871058,0.019176,0.0282},
-{3332843,3871058,3871271,0.0922444444444444,0.226418181818182},
-{3332844,3865186,3865008,0.0789777777777778,-1},
-{3332845,3865186,3865002,0.0735714285714286,-1},
-{3332846,3865052,3865137,0.1329,-1},
-{3332847,3878799,3878886,-1,0.1101},
-{3332848,3878886,3879093,-1,0.186166666666667},
-{3332849,3878181,3878186,0.00225714285714286,-1},
-{3332850,3878186,3878233,0.0273142857142857,-1},
-{3332851,3878177,3877946,0.0851785714285714,-1},
-{3332852,3877946,3877905,0.018504,-1},
-{3332853,3877767,3877803,0.00672222222222222,0.00636842105263158},
-{3332854,3877803,3878140,0.0646846153846154,0.0590105263157895},
-{3332855,3877502,3877613,-1,-1},
-{3332856,3877613,3877892,-1,-1},
-{3332857,3876011,3876324,-1,-1},
-{3332858,3875582,3875464,-1,0.042951724137931},
-{3332859,3865328,3865315,-1,0.0482232558139535},
-{3332860,3865528,3865328,0.253425,0.0942976744186047},
-{3332861,3865684,3865524,-1,0.0979034482758621},
-{3332862,3865524,3865427,-1,0.065736},
-{3332863,3865845,3865715,0.048816,0.0381375},
-{3332864,3865715,3865648,0.0309,0.0219290322580645},
-{3332865,3872035,3871995,0.00716470588235294,-1},
-{3332866,3870801,3870988,0.301371428571429,0.290979310344828},
-{3332867,3870988,3870994,0.00942857142857143,0.01056},
-{3332868,3870196,3870820,0.342168,0.329007692307692},
-{3332869,3870820,3870831,0.00957692307692308,0.00996},
-{3332870,3870831,3870238,0.168617142857143,0.163933333333333},
-{3332871,3870238,3869559,0.159252631578947,0.144085714285714},
-{3332872,3868858,3869083,0.259257142857143,0.247472727272727},
-{3332873,3869083,3869108,0.027,0.027},
-{3332874,3869108,3868747,0.0882439024390244,-1},
-{3332875,3868747,3868632,0.024555,-1},
-{3332876,3868632,3868525,0.0309512195121951,-1},
-{3332877,3868858,3868490,0.125155555555556,0.1024},
-{3332878,3868490,3868255,0.100382608695652,0.07696},
-{3332879,3868448,3868144,0.25495,-1},
-{3332880,3868125,3868350,0.1122,0.1122},
-{3332881,3868162,3868215,0.144272727272727,0.0961818181818182},
-{3332882,3868215,3868350,0.112406896551724,0.135825},
-{3332883,3868139,3868162,-1,0.0119351351351351},
-{3332884,3867814,3868102,-1,0.174338461538462},
-{3332885,3868102,3868139,-1,0.0280216216216216},
-{3332886,3867598,3868125,0.324046153846154,0.324046153846154},
-{3332887,3866777,3866673,0.0353076923076923,0.0353076923076923},
-{3332888,3866673,3866319,0.1224,0.126348387096774},
-{3332889,3867168,3866398,0.5124,-1},
-{3332890,3866398,3866319,0.04592,-1},
-{3332891,3866422,3866227,-1,0.08146},
-{3332892,3866227,3866134,-1,0.0495692307692308},
-{3332893,3865601,3865752,0.0493756097560976,-1},
-{3332894,3865752,3865806,0.0186279069767442,-1},
-{3332895,3865745,3865601,0.1182,-1},
-{3332896,3865531,3865745,-1,0.0856736842105263},
-{3332897,3865315,3865290,-1,0.0486292682926829},
-{3332898,3867195,3866792,-1,0.0766867924528302},
-{3332899,3868047,3867395,0.134155102040816,-1},
-{3332901,3865834,3866213,0.181844444444444,0.181844444444444},
-{3332902,3866213,3866384,0.0704888888888889,0.0704888888888889},
-{3332903,3866972,3867283,0.2581875,0.2581875},
-{3332904,3867283,3867362,0.0481428571428571,0.0481428571428571},
-{3332905,3867205,3867891,0.294733333333333,0.294733333333333},
-{3332906,3867891,3867959,0.0467368421052632,0.0467368421052632},
-{3332907,3868400,3868247,0.153967741935484,0.153967741935484},
-{3332908,3868247,3868093,0.113882926829268,0.113882926829268},
-{3332909,3871704,3871263,0.175615384615385,0.185108108108108},
-{3332910,3868595,3868985,0.3312,0.357696},
-{3332911,3868985,3868993,0.0132272727272727,0.01164},
-{3332914,3902159,3902125,0.0270272727272727,-1},
-{3332915,3902537,3902512,-1,0.0254076923076923},
-{3332916,3903033,3902978,0.0703764705882353,0.0520173913043478},
-{3332917,3902978,3902952,0.05025,0.03216},
-{3332918,3905392,3905442,-1,-1},
-{3332919,3905442,3905700,-1,-1},
-{3332920,3905019,3905057,-1,-1},
-{3332921,3905057,3905276,-1,-1},
-{3332922,3904711,3904637,-1,-1},
-{3332923,3904637,3905019,-1,-1},
-{3332924,3903804,3904270,-1,-1},
-{3332925,3904270,3904369,-1,-1},
-{3332926,3903804,3903836,-1,-1},
-{3332927,3903836,3904150,-1,-1},
-{3332928,3903452,3903470,-1,-1},
-{3332929,3903470,3903688,-1,-1},
-{3332930,3903308,3903059,0.261469565217391,0.214778571428571},
-{3332931,3903059,3903033,0.0259636363636364,0.022848},
-{3332932,3902891,3902630,-1,0.236169230769231},
-{3332933,3902630,3902537,-1,0.072624},
-{3332934,3902528,3902235,0.24816,-1},
-{3332935,3902235,3902159,0.1032,-1},
-{3332936,3901327,3901285,-1,-1},
-{3332937,3901285,3901221,-1,-1},
-{3332938,3901236,3901209,0.0638444444444444,0.0638444444444444},
-{3332939,3901209,3901011,0.0883555555555555,0.0883555555555555},
-{3332940,3901011,3901236,0.102563636363636,0.102563636363636},
-{3332941,3900981,3900601,0.52917,0.52917},
-{3332942,3900601,3900536,0.1272,0.0442434782608696},
-{3332943,3900381,3900396,-1,0.1818},
-{3332944,3900396,3900387,-1,0.0717375},
-{3332945,3899901,3899936,0.0365379310344828,0.0883},
-{3332946,3899936,3900068,0.0684324324324324,0.133263157894737},
-{3332947,3899053,3899119,-1,-1},
-{3332948,3899119,3899115,-1,-1},
-{3332949,3896483,3896476,-1,0.05118},
-{3332950,3896476,3896470,-1,0.02928},
-{3332951,3896401,3896353,0.0706666666666667,-1},
-{3332952,3896353,3896341,0.0243,-1},
-{3332953,3896145,3896144,0.0290769230769231,0.04725},
-{3332954,3896144,3896454,0.34452,0.43065},
-{3332955,3899016,3899019,0.0143142857142857,0.0107357142857143},
-{3332956,3899019,3899144,0.228407142857143,0.2907},
-{3332957,3899818,3899863,0.0213555555555556,0.01922},
-{3332958,3899795,3899748,0.0189555555555556,-1},
-{3332959,3899393,3899966,0.301118181818182,0.245355555555556},
-{3332960,3899543,3900018,0.238617391304348,0.27441},
-{3332961,3900018,3900082,0.0388125,0.0207},
-{3332962,3899696,3900081,0.314614285714286,0.231821052631579},
-{3332963,3900081,3900114,0.00950322580645161,0.0133909090909091},
-{3332964,3900004,3899972,0.0146444444444444,0.0146444444444444},
-{3332965,3899968,3899972,0.0747777777777778,0.0747777777777778},
-{3332966,3899608,3899946,0.167822222222222,0.167822222222222},
-{3332967,3899946,3899968,0.0361818181818182,0.0361818181818182},
-{3332968,3898728,3899462,0.416914285714286,0.198981818181818},
-{3332969,3898096,3898810,-1,0.275477777777778},
-{3332970,3898090,3898111,0.00467547169811321,-1},
-{3332971,3898111,3898182,0.0245433962264151,-1},
-{3332972,3896903,3896866,0.0292875,0.0213},
-{3332973,3896288,3896271,-1,-1},
-{3332974,3896192,3896194,-1,0.0198428571428571},
-{3332975,3896105,3896151,0.0186,-1},
-{3332976,3896151,3896192,0.018195652173913,-1},
-{3332977,3896192,3896116,-1,0.03204},
-{3332978,3896116,3896072,-1,0.0219777777777778},
-{3332979,3896068,3896064,-1,0.014184},
-{3332980,3896064,3896096,-1,0.0928173913043478},
-{3332981,3895986,3896025,-1,0.018564},
-{3332982,3896025,3896096,-1,0.0413625},
-{3332985,3902693,3902639,0.0247846153846154,-1},
-{3332986,3902639,3902538,0.0618260869565217,-1},
-{3332987,3902538,3902489,-1,0.0469714285714286},
-{3332988,3902489,3902468,-1,0.0133846153846154},
-{3332989,3902375,3902399,-1,0.013392},
-{3332990,3902399,3902495,-1,0.1267875},
-{3332991,3902375,3902352,0.01055625,0.0125111111111111},
-{3332992,3902352,3902259,0.0426387096774194,0.0629428571428571},
-{3332993,3902259,3902212,0.10995,-1},
-{3332994,3902212,3902200,0.0155142857142857,-1},
-{3332995,3901991,3901962,-1,-1},
-{3332996,3901962,3901902,-1,-1},
-{3332997,3901839,3901408,0.318884210526316,-1},
-{3332998,3901408,3901412,0.04668,-1},
-{3332999,3901140,3901131,-1,-1},
-{3333000,3901131,3901126,-1,-1},
-{3333001,3900530,3900529,0.00889090909090909,0.00889090909090909},
-{3333002,3900529,3900415,0.322377777777778,0.322377777777778},
-{3333003,3900011,3899895,0.0739363636363636,-1},
-{3333004,3899895,3899872,0.016875,-1},
-{3333005,3899880,3899873,0.0317513513513513,-1},
-{3333006,3899873,3899872,0.00819,-1},
-{3333007,3899742,3899763,-1,0.0311217391304348},
-{3333008,3899772,3899767,-1,0.0289609756097561},
-{3333009,3899767,3899763,-1,0.0169024390243902},
-{3333010,3899638,3899732,-1,0.0697826086956522},
-{3333011,3899732,3899742,-1,0.0168},
-{3333012,3898140,3898510,-1,0.0880363636363636},
-{3333013,3896148,3896185,-1,0.01932},
-{3333014,3896185,3896207,-1,0.00980869565217391},
-{3333015,3896194,3896203,-1,0.0100888888888889},
-{3333016,3896203,3896289,-1,0.0571285714285714},
-{3333017,3896789,3896304,-1,-1},
-{3333018,3896304,3896288,-1,-1},
-{3333019,3897128,3896936,0.166341176470588,0.166341176470588},
-{3333020,3896936,3896903,0.0240857142857143,0.0160571428571429},
-{3333021,3897601,3897431,-1,-1},
-{3333022,3898119,3898143,0.00998709677419355,0.0140727272727273},
-{3333023,3898143,3898305,0.0522,0.110925},
-{3333024,3898185,3898200,-1,0.0110769230769231},
-{3333025,3898200,3898305,-1,0.0678620689655172},
-{3333026,3898740,3898274,-1,-1},
-{3333027,3898182,3898595,0.156884210526316,-1},
-{3333028,3898810,3899038,-1,0.07904},
-{3333029,3899038,3899187,-1,0.0490677966101695},
-{3333030,3899462,3899503,0.0273714285714286,0.0159666666666667},
-{3333031,3899503,3899557,0.027,0.0182647058823529},
-{3333032,3899724,3899829,-1,0.0573381818181818},
-{3333033,3899829,3899865,-1,0.0229137931034483},
-{3333034,3900046,3900132,0.0192146341463415,0.02461875},
-{3333035,3900173,3900195,0.0116307692307692,0.0116307692307692},
-{3333036,3900195,3900258,0.0271846153846154,0.0271846153846154},
-{3333037,3900135,3900140,-1,0.0191127272727273},
-{3333038,3900140,3900158,-1,0.189672},
-{3333039,3899966,3900022,0.07008,0.0259555555555556},
-{3333040,3900022,3900158,0.120163636363636,0.0508384615384615},
-{3333041,3899863,3899910,0.0291,0.0207857142857143},
-{3333042,3899910,3900003,0.0596470588235294,0.0349655172413793},
-{3333043,3899888,3899841,0.0278869565217391,-1},
-{3333044,3899841,3899795,0.020256,-1},
-{3333045,3899813,3899787,-1,0.0198},
-{3333046,3899787,3899730,-1,0.0314},
-{3333047,3899813,3899805,-1,0.00953181818181818},
-{3333048,3899805,3899791,-1,0.0266142857142857},
-{3333049,3899933,3899908,0.05754,-1},
-{3333050,3899908,3899891,0.0356,-1},
-{3333051,3899933,3899957,0.0558,-1},
-{3333052,3899957,3900030,0.0630923076923077,-1},
-{3333053,3902129,3902111,0.0185714285714286,0.0114705882352941},
-{3333054,3902111,3902036,0.146676923076923,0.0681},
-{3333055,3902129,3902139,0.0183,-1},
-{3333056,3902139,3902123,0.117741176470588,-1},
-{3333057,3902719,3902756,0.026775,-1},
-{3333058,3902756,3902883,0.0695684210526316,-1},
-{3333059,3902934,3902847,-1,0.0931090909090909},
-{3333060,3902847,3902838,-1,0.015425},
-{3333061,3902789,3902831,-1,0.12945},
-{3333062,3902831,3902838,-1,0.0206117647058824},
-{3333067,3866051,3865815,0.152311111111111,0.13708},
-{3333068,3865815,3865134,0.245574193548387,0.217508571428571},
-{3333069,3866051,3865958,0.0359333333333333,0.0359333333333333},
-{3333070,3865958,3865222,0.283688888888889,0.283688888888889},
-{3333071,3865911,3866159,0.13685,0.13685},
-{3333072,3866159,3866254,0.0700875,0.0801},
-{3333073,3865124,3866372,0.613311111111111,0.613311111111111},
-{3333074,3866372,3866493,0.0541555555555556,0.0541555555555556},
-{3333075,3880528,3880654,0.0649090909090909,-1},
-{3333076,3880654,3880679,0.009225,-1},
-{3333077,3880470,3880565,0.0486333333333333,0.0500228571428571},
-{3333078,3879855,3879883,-1,0.0146571428571429},
-{3333079,3879883,3880453,-1,0.345257142857143},
-{3333080,3879754,3880470,0.306685714285714,0.341536363636364},
-{3333081,3880104,3880114,0.0128823529411765,-1},
-{3333082,3880114,3880707,0.495975,-1},
-{3333083,3881073,3881106,0.0282,0.0100266666666667},
-{3333084,3879217,3879257,-1,0.0183},
-{3333085,3879257,3879408,-1,0.0615272727272727},
-{3333086,3880368,3880383,0.00816,-1},
-{3333087,3880383,3880528,0.06384,-1},
-{3333088,3879871,3880038,-1,0.0780947368421053},
-{3333089,3879871,3879842,0.0225,-1},
-{3333090,3879815,3879790,-1,0.0366},
-{3333091,3879790,3879726,-1,0.111507692307692},
-{3333092,3879634,3879414,0.153533333333333,0.133722580645161},
-{3333093,3879414,3879392,0.0178434782608696,0.014151724137931},
-{3333094,3879276,3879302,0.0220421052631579,-1},
-{3333095,3879302,3879524,0.21304,-1},
-{3333096,3881472,3880988,-1,0.329511111111111},
-{3333097,3880988,3880968,-1,0.0365636363636364},
-{3333098,3881176,3881515,0.108633962264151,0.11995},
-{3333099,3881515,3881564,0.013,0.0135},
-{3333100,3863689,3863489,-1,-1},
-{3333101,3852475,3852415,0.0204909090909091,0.0375666666666667},
-{3333102,3859753,3859590,0.142228571428571,0.09956},
-{3333103,3859590,3859555,0.0228545454545455,0.0157125},
-{3333104,3879365,3879558,0.102815384615385,-1},
-{3333105,3882654,3882668,-1,0.11089756097561},
-{3333106,3863087,3863043,0.0872333333333333,0.0805230769230769},
-{3333107,3863043,3863045,0.0132642857142857,0.0109235294117647},
-{3333108,3856649,3856668,0.0103111111111111,0.0103111111111111},
-{3333109,3856668,3856793,0.0490222222222222,0.0490222222222222},
-{3333110,3851044,3851528,0.390860869565217,0.408627272727273},
-{3333111,3851528,3851549,0.016575,0.0189428571428571},
-{3333112,3852027,3851860,0.0618666666666667,0.0618666666666667},
-{3333113,3851860,3851840,0.00678181818181818,0.00678181818181818},
-{3333114,3848765,3848958,0.467155555555556,0.467155555555556},
-{3333115,3848958,3848972,0.03405,0.03405},
-{3333118,3851322,3851304,0.0128608695652174,-1},
-{3333119,3851304,3850561,0.565085714285714,-1},
-{3333120,3891772,3892359,-1,0.171251162790698},
-{3333121,3892359,3892432,-1,0.0272833333333333},
-{3333122,3892318,3892369,0.01248,-1},
-{3333123,3892369,3892441,0.018528,-1},
-{3333124,3889273,3889224,0.0167625,0.0157764705882353},
-{3333125,3889224,3888586,0.259542857142857,0.213741176470588},
-{3333126,3885663,3886420,0.302072727272727,0.262326315789474},
-{3333127,3886420,3886501,0.0576,0.0512},
-{3333128,3886372,3887051,0.551589473684211,0.317581818181818},
-{3333129,3887051,3887076,0.0186521739130435,0.01716},
-{3333130,3886896,3887604,-1,-1},
-{3333131,3887604,3887631,-1,-1},
-{3333132,3887221,3887892,-1,0.42708},
-{3333133,3887892,3887895,-1,0.0346285714285714},
-{3333134,3887278,3888037,0.559133333333333,0.264852631578947},
-{3333135,3888037,3888068,0.0195230769230769,0.0163741935483871},
-{3333136,3887339,3888177,0.6514875,-1},
-{3333137,3888177,3888231,0.0365647058823529,-1},
-{3333138,3891822,3891886,-1,0.04045},
-{3333139,3891886,3891915,-1,0.014775},
-{3333140,3891822,3892005,-1,0.0749806451612903},
-{3333141,3892005,3892054,-1,0.0206545454545455},
-{3333142,3893406,3893488,-1,-1},
-{3333143,3889225,3889158,0.0480923076923077,0.0329052631578947},
-{3333144,3889158,3889068,0.11064,0.0790285714285714},
-{3333145,3889068,3888972,0.10425,0.0893571428571429},
-{3333146,3888599,3888651,0.0264222222222222,0.0264222222222222},
-{3333147,3888651,3889225,0.28176,0.270923076923077},
-{3333148,3888521,3888464,0.110544,-1},
-{3333149,3888464,3888502,0.0607090909090909,-1},
-{3333150,3888502,3888412,-1,0.0393333333333333},
-{3333151,3888412,3888294,-1,0.064728},
-{3333152,3887962,3887911,0.0179777777777778,-1},
-{3333153,3887962,3887926,0.0303,-1},
-{3333154,3887926,3887747,0.116625,-1},
-{3333155,3887911,3887874,0.0112615384615385,-1},
-{3333156,3887874,3887664,0.0729310344827586,-1},
-{3333157,3887076,3887227,0.0707538461538462,0.07665},
-{3333158,3892042,3893114,0.76059,-1},
-{3333159,3893114,3893128,0.0187285714285714,-1},
-{3333160,3891885,3892968,-1,0.77007},
-{3333161,3892968,3892991,-1,0.0105230769230769},
-{3333162,3892439,3892731,0.28508,0.158377777777778},
-{3333163,3892731,3892782,0.0207,0.0175153846153846},
-{3333164,3892150,3892416,-1,0.168},
-{3333165,3892416,3892442,-1,0.0128454545454545},
-{3333166,3891873,3892102,0.279553846153846,-1},
-{3333167,3892102,3892124,0.0227333333333333,-1},
-{3333168,3891531,3891623,0.0985058823529412,-1},
-{3333169,3880800,3880827,0.01572,-1},
-{3333170,3880827,3880944,0.0428444444444444,-1},
-{3333181,3892480,3892527,-1,-1},
-{3333182,3894873,3894888,0.011048275862069,0.0145636363636364},
-{3333183,3894888,3895204,0.287941935483871,0.405736363636364},
-{3333184,3893723,3893825,-1,0.075},
-{3333208,3907404,3908392,0.367088888888889,0.367088888888889},
-{3333209,3908392,3909494,0.412177777777778,0.412177777777778},
-{3333210,3909494,3910260,0.37,0.37},
-{3333211,3906690,3905968,0.267581818181818,0.267581818181818},
-{3342162,3856027,3856232,-1,0.188571428571429},
-{3342165,3856367,3856593,0.144442105263158,0.161435294117647},
-{3342167,3856681,3856857,0.140273684210526,0.2221},
-{3342170,3857387,3857476,0.0718090909090909,0.0987375},
-{3342189,3864386,3864320,0.0204967741935484,-1},
-{3342190,3864320,3864204,0.0491806451612903,-1},
-{3342207,3904021,3906539,-1,0.546011538461538},
-{3342237,3885713,3886045,-1,-1},
-{3342238,3886045,3886103,-1,-1},
-{3342239,3878561,3878412,-1,0.0950516129032258},
-{3342240,3878412,3878214,-1,0.2608875},
-{3342255,3849152,3849920,0.473452173913044,0.473452173913044},
-{3342675,3882138,3882136,0.01665,0.01665},
-{3342850,3854466,3854430,-1,0.0843},
-{3342851,3854430,3853947,-1,0.468834782608696},
-{3342861,3866996,3866792,0.0388588235294118,-1},
-{3342867,3851899,3851892,0.0161666666666667,0.0223846153846154},
-{3342868,3851892,3851274,0.54104347826087,0.6222},
-{3342873,3898857,3898317,1.00745454545455,1.00745454545455},
-{3342877,3895027,3894700,0.4326,0.4326},
-{3342878,3894700,3894676,0.03912,0.03912},
-{3342879,3895701,3895050,1.51941,1.51941},
-{3342880,3895050,3895027,0.0273,0.0273},
-{3342887,3902284,3902361,0.0482,0.0632625},
-{3342905,3907464,3907992,0.43362,0.43362},
-{3342906,3907992,3909029,0.89388,0.89388},
-{3343320,3898595,3898612,0.00493220338983051,-1},
-{3343321,3898612,3898630,0.00693559322033898,-1},
-{3343322,3897431,3897371,-1,-1},
-{3343323,3898089,3897284,0.180783050847458,-1},
-{3343324,3897284,3897216,0.0139034482758621,-1},
-{3343360,3870385,3870007,0.0821632653061224,-1},
-{3343361,3870007,3869897,0.0214173913043478,-1},
-{3343362,3871995,3871062,0.2334,-1},
-{3343363,3874461,3872035,0.50886,-1},
-{3343366,3872635,3872649,0.131665384615385,0.129181132075472},
-{3343369,3872649,3872784,0.368917647058823,0.354996226415094},
-{3343370,3872784,3872834,0.0612,0.0624},
-{3343521,3899457,3899629,0.0757285714285714,-1},
-{3343522,3899677,3899791,0.0465,-1},
-{3343632,3880199,3880284,0.03636,-1},
-{3343633,3880284,3880368,0.0375891891891892,-1},
-{3343634,3880368,3880388,-1,0.027},
-{3343635,3880388,3880761,-1,0.428966666666667},
-{3343646,3880565,3880584,0.0181741935483871,-1},
-{3343647,3880584,3880838,0.147365217391304,-1},
-{3343885,3906172,3906227,0.0413307692307692,0.0413307692307692},
-{3343886,3906227,3907068,0.476376923076923,0.516075},
-{3343887,3906171,3906321,0.0598064516129032,0.0579375},
-{3343888,3906321,3907739,0.426811764705882,0.372092307692308},
-{3343889,3906227,3906321,0.19455,0.19455},
-{3344074,3908768,3908889,0.033,0.0360697674418605},
-{3344076,3916195,3916249,0.0146368421052632,-1},
-{3344077,3904069,3904279,0.12855,0.12855},
-{3344078,3895180,3894865,0.0925066666666667,0.0925066666666667},
-{3344079,3894865,3894848,0.00449387755102041,0.00449387755102041},
-{3344080,3894810,3894819,0.00867,-1},
-{3344081,3894819,3894906,0.0552,-1},
-{3344084,3875464,3875437,-1,0.00856875},
-{3344085,3875437,3875412,-1,0.0101454545454545},
-{3344086,3874821,3874915,0.201655555555556,0.209411538461538},
-{3344087,3874915,3875077,0.211846153846154,0.216},
-{3344165,3887715,3887709,0.05154,0.05154},
-{3344166,3887709,3887351,2.30055,2.30055},
-{3344335,3874272,3874185,0.129876923076923,0.129876923076923},
-{3344336,3874185,3873915,0.457548387096774,0.44325},
-{3344729,3908946,3909174,-1,0.0587217391304348},
-{3344789,3884455,3884427,0.00934090909090909,-1},
-{3344790,3884379,3884427,0.0120818181818182,0.0120818181818182},
-{3345169,3897762,3898031,-1,0.0455130434782609},
-{3345170,3898031,3898089,-1,0.00796521739130435},
-{3345171,3898089,3898824,-1,0.142885714285714},
-{3345172,3898824,3899102,-1,0.0561344262295082},
-{3345219,3876231,3876555,0.0983833333333333,-1},
-{3345220,3876555,3876793,0.0560454545454546,-1},
-{3345221,3876555,3876184,-1,-1},
-{3345222,3875677,3876037,0.1272,0.214231578947368},
-{3345223,3876037,3877812,0.656057142857143,0.496475675675676},
-{3345224,3876037,3876109,-1,-1},
-{3345225,3876109,3876156,-1,-1},
-{3345226,3876109,3876409,-1,-1},
-{3345227,3876245,3876564,-1,0.23548},
-{3345228,3876564,3876805,-1,0.0709411764705882},
-{3345230,3894748,3894731,0.0217565217391304,-1},
-{3345231,3894731,3894706,0.0285461538461538,-1},
-{3345254,3897842,3897895,-1,0.0970363636363636},
-{3345255,3897895,3897924,-1,0.0132230769230769},
-{3345256,3897852,3897803,0.0179625,-1},
-{3345257,3897803,3897615,0.09026,-1},
-{3345258,3897588,3897597,0.0073125,-1},
-{3345259,3897597,3897609,0.00735,-1},
-{3345260,3888381,3888429,-1,0.0346666666666667},
-{3345261,3888429,3888453,-1,0.01581},
-{3345262,3888724,3888858,0.144818181818182,0.144818181818182},
-{3345263,3888858,3888893,0.0276,0.0345},
-{3345264,3889615,3889588,0.0235894736842105,-1},
-{3345265,3889797,3890677,0.566809090909091,-1},
-{3345266,3890677,3890702,0.0240375,-1},
-{3345267,3889459,3890328,0.5096,0.370618181818182},
-{3345268,3890328,3890351,0.0154571428571429,0.0147545454545455},
-{3345269,3889712,3889688,-1,0.0245076923076923},
-{3345279,3899730,3899717,-1,0.009048},
-{3345280,3899717,3899677,-1,0.0234692307692308},
-{3345292,3900124,3900125,-1,0.0166555555555556},
-{3345293,3900125,3900135,-1,0.0601090909090909},
-{3345299,3899654,3900015,0.155511111111111,0.155511111111111},
-{3345300,3900015,3900045,0.0198,0.0198},
-{3345301,3899912,3900017,0.0850714285714286,0.0384193548387097},
-{3345302,3900017,3900046,0.0102,0.0091448275862069},
-{3345303,3899847,3900050,0.11715,0.111571428571429},
-{3345304,3900050,3900073,0.00747272727272727,0.010275},
-{3345305,3900049,3900027,0.00701818181818182,0.00701818181818182},
-{3345306,3900027,3900004,0.00888888888888889,0.00888888888888889},
-{3345312,3873411,3873416,0.00465217391304348,0.00458571428571428},
-{3345313,3873416,3873458,0.0304086956521739,0.0299742857142857},
-{3345314,3873594,3873380,-1,0.17430447761194},
-{3345315,3873380,3873390,-1,0.0183085714285714},
-{3345316,3894585,3894629,-1,0.00898928571428572},
-{3345317,3894629,3894873,-1,0.0640842105263158},
-{3345318,3894469,3894482,0.0091125,-1},
-{3345319,3894482,3894808,0.309103448275862,-1},
-{3345320,3894091,3894098,-1,0.0117652173913043},
-{3345321,3894098,3894437,-1,0.5715},
-{3345322,3892114,3892312,0.15327,-1},
-{3345323,3892312,3892321,0.0141157894736842,-1},
-{3345324,3892736,3892777,0.0160838709677419,-1},
-{3345325,3892777,3892725,0.0295548387096774,-1},
-{3345326,3892778,3892824,-1,0.0128666666666667},
-{3345327,3892824,3892849,-1,0.00848571428571429},
-{3345328,3892769,3892919,0.1042875,-1},
-{3345329,3892919,3892950,0.0179368421052632,-1},
-{3345330,3892769,3892967,0.0646125,-1},
-{3345331,3892967,3892996,0.01148,-1},
-{3345332,3893501,3893672,0.3097125,0.16518},
-{3345333,3893672,3893688,0.0163565217391304,0.0129724137931034},
-{3345334,3894689,3894707,0.00851785714285714,-1},
-{3345335,3894707,3894938,0.0675321428571429,-1},
-{3345336,3893000,3892947,0.0226965517241379,-1},
-{3345337,3892947,3892862,0.02728,-1},
-{3345338,3892945,3892964,-1,0.0104823529411765},
-{3345339,3892964,3893000,-1,0.0244421052631579},
-{3345340,3893049,3893073,0.0143625,-1},
-{3345341,3893073,3893141,0.0302914285714286,-1},
-{3345342,3893141,3893153,-1,0.0456428571428571},
-{3345343,3893153,3893233,-1,0.0472941176470588},
-{3345344,3893233,3893268,-1,0.0144307692307692},
-{3345347,3882560,3882635,-1,0.0129223880597015},
-{3345348,3882635,3882659,-1,0.00398507462686567},
-{3345349,3882640,3882675,0.00465428571428571,-1},
-{3345350,3861953,3861928,0.0122222222222222,0.0122222222222222},
-{3345351,3861928,3861900,0.0126,0.0126},
-{3345352,3861953,3861977,-1,0.00561639344262295},
-{3345353,3861977,3862077,-1,0.02565},
-{3345360,3884427,3884584,0.0435348837209302,-1},
-{3345361,3865871,3866069,-1,0.0567666666666667},
-{3345362,3866069,3866123,-1,0.0163333333333333},
-{3345363,3864696,3864653,0.0149090909090909,-1},
-{3345364,3865471,3865766,-1,0.161112},
-{3345365,3865471,3865488,-1,0.0690652173913043},
-{3345366,3865345,3865355,0.126627272727273,-1},
-{3345367,3865345,3865282,0.13295,-1},
-{3345368,3864879,3864480,0.117681081081081,-1},
-{3345369,3864710,3864480,-1,0.1875},
-{3345370,3864662,3864578,0.0447142857142857,0.0426818181818182},
-{3345371,3864578,3863559,0.368382857142857,0.368382857142857},
-{3345372,3871007,3870612,0.105,-1},
-{3345373,3870612,3870544,0.0160875,-1},
-{3345374,3866433,3866385,0.03018,0.0503},
-{3345375,3866393,3866195,0.0898333333333333,-1},
-{3345376,3866195,3865131,0.6600375,-1},
-{3345377,3871564,3871513,-1,-1},
-{3345378,3871513,3871496,-1,-1},
-{3345379,3872040,3872021,0.276709090909091,-1},
-{3345380,3872021,3872019,0.01124,-1},
-{3345381,3872618,3872621,0.02672,-1},
-{3345386,3895536,3895750,-1,0.111982978723404},
-{3345387,3895750,3896047,-1,0.105629508196721},
-{3345388,3895101,3895404,0.11917,-1},
-{3345389,3895404,3895502,0.0372096774193548,-1},
-{3345390,3875623,3875642,0.0177111111111111,0.0144909090909091},
-{3345391,3875642,3875650,0.00786428571428571,0.00667272727272727},
-{3345392,3875997,3875989,-1,0.0122307692307692},
-{3345393,3877110,3877226,-1,0.241846153846154},
-{3345394,3877226,3877242,-1,0.0266608695652174},
-{3345395,3877719,3877831,0.287775,-1},
-{3345396,3877831,3877860,0.023895652173913,-1},
-{3345397,3878316,3878382,0.24715,-1},
-{3345398,3878382,3878389,0.0230608695652174,-1},
-{3345399,3878672,3878782,0.391042105263158,-1},
-{3345400,3878782,3878789,0.0192285714285714,-1},
-{3345401,3879264,3879235,-1,0.0415714285714286},
-{3345402,3879235,3879199,-1,0.0392571428571429},
-{3345403,3879264,3879286,-1,0.0177375},
-{3345404,3879286,3879303,-1,0.01119375},
-{3345407,3880031,3880130,-1,-1},
-{3345408,3880130,3880146,-1,-1},
-{3345409,3880366,3880477,0.22565,0.13539},
-{3345410,3880477,3880497,0.0313714285714286,0.02196},
-{3345411,3880815,3881018,0.514,-1},
-{3345412,3881018,3881042,0.02736,-1},
-{3345413,3881468,3881501,-1,0.0159545454545455},
-{3345414,3881501,3881563,-1,0.0271714285714286},
-{3345415,3880923,3881157,-1,0.182475},
-{3345416,3881157,3881175,-1,0.018},
-{3345417,3880617,3880823,0.08918,0.0723081081081081},
-{3345418,3880823,3880854,0.0092,0.00843333333333333},
-{3345419,3879756,3879945,-1,-1},
-{3345420,3879945,3879959,-1,-1},
-{3345421,3878780,3879159,-1,0.387933333333333},
-{3345422,3879159,3879174,-1,0.02408},
-{3345423,3878724,3878971,-1,-1},
-{3345424,3878971,3879011,-1,-1},
-{3345425,3878962,3878993,0.0157578947368421,0.0103241379310345},
-{3345426,3881106,3881120,0.01576,0.0139058823529412},
-{3345427,3881120,3881281,0.2067375,0.300709090909091},
-{3345428,3881469,3881518,-1,-1},
-{3345429,3881586,3881671,0.045425,-1},
-{3345430,3881671,3881852,0.1327125,-1},
-{3345432,3881476,3881507,-1,0.0160421052631579},
-{3345433,3881507,3882332,-1,0.65596},
-{3345434,3881709,3881759,0.03284,-1},
-{3345435,3881759,3882562,0.523736842105263,-1},
-{3345436,3881754,3881743,0.0254625,0.01358},
-{3345437,3881743,3881722,0.0172588235294118,0.0101172413793103},
-{3345438,3881212,3880997,0.0977769230769231,-1},
-{3345439,3880997,3880913,0.05541,-1},
-{3345440,3880545,3880572,0.0211090909090909,-1},
-{3345441,3880572,3880730,0.0840260869565218,-1},
-{3345442,3880499,3880532,-1,0.020895652173913},
-{3345443,3880532,3880730,-1,0.194871428571429},
-{3345444,3880499,3880485,0.0394941176470588,-1},
-{3345445,3880485,3880863,0.5244,-1},
-{3345446,3879824,3879787,-1,0.11178},
-{3345447,3879787,3879766,-1,0.0224181818181818},
-{3345459,3895054,3895178,-1,0.0998842105263158},
-{3345468,3872446,3872616,-1,0.07132},
-{3345469,3872616,3872630,-1,0.00714545454545455},
-{3345470,3872628,3872598,0.0133058823529412,0.01131},
-{3345471,3872598,3872446,0.0728210526315789,0.1153},
-{3345472,3872466,3872617,-1,0.23079512195122},
-{3345473,3872617,3872628,-1,0.0126714285714286},
-{3345474,3872537,3872615,0.125414634146341,-1},
-{3345475,3872615,3872664,0.0555166666666667,-1},
-{3345476,3864520,3864497,0.012552,-1},
-{3345477,3864653,3864610,0.013725,-1},
-{3345478,3864610,3864550,0.02252,-1},
-{3345479,3863203,3863769,0.165293617021277,-1},
-{3345480,3863769,3864222,0.116173333333333,-1},
-{3345481,3864236,3863788,0.0919821428571428,-1},
-{3345527,3877331,3877821,0.435255319148936,0.40914},
-{3345528,3877821,3877869,0.068985,0.0627136363636364},
-{3345529,3878041,3877821,0.0842222222222222,0.0733548387096774},
-{3345530,3878460,3878617,0.103432258064516,0.114514285714286},
-{3345531,3878617,3878760,0.117484615384615,0.109092857142857},
-{3345532,3878617,3879079,0.231985714285714,0.223986206896552},
-{3345533,3879504,3879439,-1,0.507078260869565},
-{3345534,3879439,3879450,-1,0.018024},
-{3345535,3878693,3878566,0.0969555555555556,0.0969555555555556},
-{3345536,3879413,3879268,0.0909724137931034,0.065955},
-{3345537,3879268,3878885,0.253285714285714,0.2364},
-{3345538,3878566,3879268,0.342111111111111,0.342111111111111},
-{3345539,3889989,3890263,0.217330434782609,-1},
-{3345540,3890263,3890551,0.233018181818182,-1},
-{3345541,3890226,3890288,-1,0.018075},
-{3345542,3890288,3890694,-1,0.1272},
-{3345543,3890288,3890514,-1,-1},
-{3345544,3890514,3890770,-1,-1},
-{3345545,3890263,3890514,-1,-1},
-{3345548,3880817,3880717,0.0763555555555556,0.0763555555555556},
-{3345549,3881418,3881185,0.279654545454545,0.25635},
-{3345550,3881185,3880817,0.195511111111111,0.195511111111111},
-{3345551,3880717,3880659,0.0421777777777778,0.0421777777777778},
-{3345552,3880659,3880631,0.0149307692307692,0.0149307692307692},
-{3345553,3895864,3895945,0.0820875,0.0820875},
-{3345554,3880631,3880242,0.240111111111111,0.240111111111111},
-{3345555,3880659,3881052,0.267771428571429,0.224928},
-{3345556,3881052,3881185,0.16035,0.150917647058824},
-{3345557,3881052,3880434,0.451666666666667,0.451666666666667},
-{3345558,3895864,3895945,0.95364,0.95364},
-{3345559,3895945,3896115,0.2934,0.2934},
-{3345560,3896115,3896113,0.197,0.197},
-{3345561,3896115,3896329,0.19132,0.19132},
-{3345562,3895484,3895620,0.323261538461538,0.323261538461538},
-{3345563,3895620,3895707,0.0672521739130435,0.0672521739130435},
-{3345564,3895707,3895864,0.134209090909091,0.134209090909091},
-{3345565,3895620,3895707,1.01478,1.01478},
-{3345566,3881869,3881778,0.0638,0.0638},
-{3345567,3881778,3881652,0.0450888888888889,0.0450888888888889},
-{3345568,3895930,3895832,0.0887142857142857,0.077625},
-{3345569,3895832,3895661,0.1179,0.101057142857143},
-{3345570,3895832,3895830,-1,-1},
-{3345571,3892986,3893084,0.0256352941176471,0.0251423076923077},
-{3345572,3893084,3893210,0.036288,0.0355764705882353},
-{3345573,3893096,3893079,0.0941777777777778,0.0941777777777778},
-{3345574,3893096,3893219,0.100033333333333,0.1125375},
-{3345575,3892585,3893096,1.11348888888889,1.15631538461538},
-{3345576,3880180,3880327,0.0928666666666667,0.0928666666666667},
-{3345577,3880327,3880793,0.259955555555556,0.259955555555556},
-{3345578,3881483,3880804,0.297138461538462,0.3219},
-{3345579,3880804,3880576,0.14025,0.1275},
-{3345580,3880327,3880804,0.400266666666667,0.400266666666667},
-{3345581,3882547,3882848,0.191555555555556,0.191555555555556},
-{3345582,3882235,3882424,0.0975111111111111,0.0975111111111111},
-{3345583,3882424,3882547,0.0617555555555556,0.0617555555555556},
-{3345592,3878989,3879083,-1,-1},
-{3345593,3879083,3879139,0.0290444444444444,0.0290444444444444},
-{3345594,3879747,3880129,0.207244444444444,0.207244444444444},
-{3345595,3880129,3880310,-1,-1},
-{3345659,3897567,3898842,1.14606,1.14606},
-{3345672,3896711,3896566,0.18483,0.18483},
-{3345673,3896566,3896420,0.09651,0.09651},
-{3345674,3897567,3896420,1.28124,1.28124},
-{3345675,3896420,3895568,1.09407,1.09407},
-{3345676,3895568,3895871,0.34284,0.34284},
-{3345678,3896312,3896340,0.0176444444444444,0.0176444444444444},
-{3345679,3896340,3896422,-1,-1},
-{3345680,3896422,3896604,-1,-1},
-{3345683,3881794,3881190,0.4826625,0.594046153846154},
-{3345684,3881190,3881093,0.09876,0.113953846153846},
-{3345685,3882108,3881446,0.6122,0.6122},
-{3345686,3881446,3881274,0.132133333333333,0.132133333333333},
-{3345687,3881190,3881446,0.198955555555556,0.198955555555556},
-{3345688,3882235,3881886,0.482890909090909,0.482890909090909},
-{3345689,3881886,3881794,0.143727272727273,0.121615384615385},
-{3345690,3882108,3881886,0.192155555555556,0.192155555555556},
-{3345691,3882308,3882202,0.0802,0.0802},
-{3345692,3882202,3882108,0.0875777777777778,0.0875777777777778},
-{3345693,3882308,3882622,0.161355555555556,0.161355555555556},
-{3345694,3882622,3882812,0.0839333333333333,0.0839333333333333},
-{3345695,3882409,3882108,0.165244444444444,0.165244444444444},
-{3345696,3882959,3882805,0.133311111111111,0.133311111111111},
-{3345697,3883124,3883112,0.10245,0.10245},
-{3345698,3883112,3883057,-1,-1},
-{3345699,3883934,3883945,-1,0.0308553191489362},
-{3345700,3883945,3883991,-1,0.219891428571429},
-{3345701,3883480,3883456,0.190133333333333,0.190133333333333},
-{3345702,3883422,3883377,0.374511111111111,0.374511111111111},
-{3345703,3883887,3883910,-1,0.0987521739130435},
-{3345704,3883910,3883913,-1,0.0135829787234043},
-{3345705,3883422,3883910,-1,-1},
-{3345706,3883456,3883406,0.0952222222222222,0.0952222222222222},
-{3345707,3883406,3883945,-1,-1},
-{3345712,3883975,3883971,-1,0.0117918367346939},
-{3345713,3883971,3883917,-1,0.226576744186047},
-{3345714,3883406,3883337,-1,-1},
-{3345715,3883337,3883422,-1,-1},
-{3345716,3883337,3883097,-1,-1},
-{3345719,3883097,3883082,-1,-1},
-{3345720,3882990,3883039,0.021456,0.0206307692307692},
-{3345721,3883039,3883377,0.117786206896552,0.110187096774194},
-{3345722,3883082,3883039,-1,-1},
-{3345724,3883103,3882959,0.1746,0.1746},
-{3345725,3882817,3882610,0.0778888888888889,0.0778888888888889},
-{3345726,3882610,3881463,-1,-1},
-{3345747,3881075,3881224,0.539294117647059,-1},
-{3345748,3881224,3881182,0.2194125,0.2194125},
-{3345762,3899850,3899859,0.0250333333333333,-1},
-{3345763,3899759,3899832,0.0189428571428571,-1},
-{3345764,3899832,3900000,0.0478133333333333,-1},
-{3345765,3899850,3899832,-1,0.0244333333333333},
-{3345766,3894782,3894479,0.201827586206897,0.254478260869565},
-{3345767,3894479,3894462,0.0347368421052632,0.0425806451612903},
-{3345768,3894479,3894462,0.4416,0.4416},
-{3345772,3894462,3894472,0.0629090909090909,0.0715862068965517},
-{3345773,3894472,3894488,0.0430263157894737,0.05109375},
-{3345774,3894472,3894488,0.58176,0.58176},
-{3345775,3894488,3894510,0.0566368421052632,0.0614914285714286},
-{3345776,3894510,3894528,0.0371230769230769,0.0438727272727273},
-{3345777,3894510,3894528,0.5841,0.5841},
-{3345778,3894528,3894555,0.0587414634146342,0.0688114285714286},
-{3345779,3894555,3894569,0.030195,0.0326432432432432},
-{3345780,3894569,3894597,0.0802833333333333,0.0825771428571429},
-{3345781,3894555,3894569,0.41034,0.41034},
-{3345782,3894597,3894845,0.121644444444444,0.121644444444444},
-{3345783,3894845,3894993,0.127933333333333,0.127933333333333},
-{3345784,3894887,3894993,0.04494,0.0408545454545455},
-{3345785,3894845,3894887,0.0879555555555556,0.0879555555555556},
-{3345786,3894633,3894833,0.101711111111111,0.0980785714285714},
-{3345787,3894833,3894887,0.0249677419354839,0.0266896551724138},
-{3345788,3894633,3894650,0.0758888888888889,0.0788076923076923},
-{3345789,3894833,3894650,0.184844444444444,0.184844444444444},
-{3345790,3894650,3894680,0.0593090909090909,0.08155},
-{3345791,3894680,3894702,0.0589071428571428,0.0568758620689655},
-{3345792,3894680,3894702,0.62082,0.62082},
-{3345793,3894702,3894757,0.0935111111111111,0.0935111111111111},
-{3345794,3894757,3894781,0.0501857142857143,0.0501857142857143},
-{3345795,3894781,3894820,0.057275,0.057275},
-{3345796,3894757,3894781,-1,0.56952},
-{3345797,3893542,3894357,-1,0.26685},
-{3345798,3894357,3894477,0.0721,0.0721},
-{3345799,3894357,3894224,0.0707777777777778,0.0707777777777778},
-{3345800,3893721,3893677,0.02757,0.0306333333333333},
-{3345801,3893718,3893677,0.0351230769230769,0.0480631578947368},
-{3345802,3893677,3893651,0.0232666666666667,0.0273130434782609},
-{3345803,3893651,3893599,0.588046153846154,0.546042857142857},
-{3345804,3893574,3893648,0.113983333333333,0.105215384615385},
-{3345805,3894489,3894376,0.359576470588235,0.38205},
-{3345806,3894376,3894489,0.800742857142857,0.800742857142857},
-{3345807,3894376,3894400,0.432525,0.432525},
-{3345808,3894240,3894285,0.108352941176471,0.0969473684210526},
-{3345809,3893715,3894285,0.311622222222222,0.311622222222222},
-{3345810,3894285,3894872,0.298755555555556,0.298755555555556},
-{3345811,3894285,3894348,0.148366666666667,0.148366666666667},
-{3345812,3894348,3894489,0.346389473684211,0.365633333333333},
-{3345813,3893773,3894348,0.305377777777778,0.305377777777778},
-{3345814,3894348,3894948,0.309777777777778,0.309777777777778},
-{3345815,3893599,3894006,0.665490909090909,0.593545945945946},
-{3345816,3894006,3894021,0.0207555555555556,0.0207555555555556},
-{3345817,3894006,3894400,0.413584615384615,0.384042857142857},
-{3345818,3894826,3894872,0.1287,0.105988235294118},
-{3345819,3894872,3894948,0.119536363636364,0.114339130434783},
-{3345820,3894948,3895418,0.645777777777778,0.645777777777778},
-{3345821,3895418,3895500,0.12468,0.12468},
-{3345822,3896281,3897105,0.347188888888889,0.340876363636364},
-{3345823,3897105,3897302,0.509679069767442,0.509679069767442},
-{3345824,3895500,3897105,1.48542,1.48542},
-{3345825,3894400,3894955,0.3876,0.3876},
-{3345826,3894955,3895418,0.241933333333333,0.241933333333333},
-{3345827,3895464,3895509,0.0302222222222222,0.0302222222222222},
-{3345828,3895509,3895874,0.252555555555556,0.252555555555556},
-{3345829,3895464,3895509,0.73032,0.73032},
-{3345834,3899288,3899175,0.0734086956521739,0.07035},
-{3345835,3899175,3898853,0.162876923076923,0.192490909090909},
-{3345836,3899188,3899175,0.356666666666667,0.356666666666667},
-{3345837,3898549,3898717,0.0878454545454546,0.080525},
-{3345838,3898717,3898853,0.0645,0.06192},
-{3345839,3898717,3899036,0.58086,0.58086},
-{3345840,3897942,3898038,0.12186,0.12186},
-{3345841,3898038,3898279,0.3291,0.3291},
-{3345842,3898279,3898327,-1,0.0422842105263158},
-{3345843,3898327,3898397,-1,0.0609},
-{3345844,3898038,3898327,0.40158,0.40158},
-{3345845,3896764,3896871,0.0605076923076923,0.0605076923076923},
-{3345846,3896871,3896912,0.06624,0.06624},
-{3345847,3896912,3896884,0.25122,0.25122},
-{3345848,3896884,3896912,0.24948,0.24948},
-{3345849,3897626,3898009,0.322028571428571,0.322028571428571},
-{3345850,3898009,3898084,0.05625,0.05625},
-{3345851,3898009,3897781,0.32586,0.32586},
-{3345852,3896871,3897024,0.100881818181818,0.100881818181818},
-{3345853,3897024,3897048,0.0244105263157895,0.019325},
-{3345854,3897048,3897301,0.2346,0.170618181818182},
-{3345855,3896782,3896992,0.55158,0.55158},
-{3345856,3896782,3896992,0.31164,0.31164},
-{3345857,3896885,3896782,0.18552,0.18552},
-{3345858,3896992,3897079,0.17364,0.17364},
-{3345859,3896885,3897079,0.3126,0.3126},
-{3345860,3897024,3896969,-1,0.11058},
-{3345861,3896969,3896885,0.14418,0.14418},
-{3345862,3897079,3897161,0.1494,0.1494},
-{3345863,3897161,3897048,-1,0.38112},
-{3345864,3896969,3897161,0.30804,0.30804},
-{3345867,3895420,3895611,0.115955555555556,0.13045},
-{3345868,3895611,3895722,0.042975,0.0509333333333333},
-{3345869,3895596,3895722,0.249555555555556,0.249555555555556},
-{3345870,3895611,3895596,0.217488888888889,0.217488888888889},
-{3345871,3895567,3895596,0.0521555555555556,0.0521555555555556},
-{3345872,3895288,3895567,0.176644444444444,0.176644444444444},
-{3345873,3895084,3895144,0.0330933333333333,0.0323739130434783},
-{3345874,3895144,3895288,0.118630434782609,0.121266666666667},
-{3345875,3895144,3895095,0.66738,0.66738},
-{3345876,3896104,3896346,-1,-1},
-{3345877,3896346,3896356,0.171777777777778,0.171777777777778},
-{3345878,3896104,3896103,0.367892307692308,0.367892307692308},
-{3345879,3896103,3896102,0.101294117647059,0.1148},
-{3345880,3896183,3896103,0.0639428571428571,0.0639428571428571},
-{3345881,3895359,3895498,0.147466666666667,0.147466666666667},
-{3345882,3895498,3895567,0.0900888888888889,0.0900888888888889},
-{3345883,3896534,3896567,0.02415,0.02415},
-{3345884,3896567,3896672,0.0845538461538461,0.0845538461538461},
-{3345885,3896567,3896672,0.79314,0.79314},
-{3345886,3896672,3896788,0.0991777777777778,0.0991777777777778},
-{3345887,3896788,3896934,0.0867333333333333,0.0867333333333333},
-{3345888,3896788,3896934,0.76092,0.76092},
-{3345889,3896934,3897068,0.1116,0.1116},
-{3345890,3897068,3897194,0.0819777777777778,0.0819777777777778},
-{3345891,3897194,3897373,0.126333333333333,0.131192307692308},
-{3345892,3897068,3897194,0.75252,0.75252},
-{3346101,3891654,3891731,0.179266666666667,0.179266666666667},
-{3346104,3909360,3908514,0.345218181818182,0.37974},
-{3346105,3908514,3908391,0.0761333333333333,0.0489428571428571},
-{3346171,3901401,3900367,0.407818181818182,0.407818181818182},
-{3346177,3897471,3897438,-1,-1},
-{3346180,3897438,3897060,-1,-1},
-{3346200,3876882,3876867,0.031025,0.0338454545454545},
-{3346201,3877270,3877189,0.17105,0.241482352941176},
-{3346202,3877189,3877167,0.0344888888888889,0.037248},
-{3346203,3876882,3877189,-1,-1},
-{3346212,3877134,3877049,0.109483333333333,0.119436363636364},
-{3346213,3877049,3876882,0.251148387096774,0.288355555555556},
-{3346214,3877049,3876752,0.113933333333333,0.113933333333333},
-{3346252,3870375,3870348,0.266861538461538,-1},
-{3346630,3921875,3923177,0.385064150943396,0.385064150943396},
-{3346631,3923177,3923334,0.0502581818181818,0.0493607142857143},
-{3346632,3923177,3923641,0.343622222222222,0.343622222222222},
-{3346652,3886688,3886700,-1,0.032},
-{3346653,3886740,3886688,-1,0.0332857142857143},
-{3346654,3886700,3886737,-1,0.0229578947368421},
-{3346655,3886737,3886740,-1,0.0309},
-{3346686,3920542,3920413,0.1863,0.1863},
-{3346687,3920473,3920634,0.24462,0.24462},
-{3346688,3920814,3920634,-1,-1},
-{3346702,3922730,3923205,0.406311111111111,0.378289655172414},
-{3346703,3922734,3923002,0.156,0.160588235294118},
-{3346704,3922730,3922734,0.03582,-1},
-{3346705,3922556,3922674,0.0759111111111111,0.05856},
-{3346706,3922734,3922674,0.0369642857142857,-1},
-{3346707,3922345,3922670,0.150670588235294,0.1423},
-{3346708,3922674,3922670,0.03612,-1},
-{3346709,3922670,3922730,0.0359612903225806,-1},
-{3346722,3918497,3918288,0.122525,-1},
-{3346723,3918288,3918141,0.0842666666666667,-1},
-{3346724,3918647,3918293,-1,0.186931034482759},
-{3346725,3918293,3918141,-1,0.06228},
-{3346726,3918288,3918293,0.0406173913043478,-1},
-{3346731,3915096,3915518,0.418328571428571,0.325366666666667},
-{3346732,3915518,3915952,0.2298,0.211416},
-{3346733,3907039,3907029,0.0253,-1},
-{3346734,3907106,3907048,0.0411,-1},
-{3346735,3907048,3907039,0.009225,-1},
-{3346736,3907001,3906913,0.0301161290322581,-1},
-{3346737,3907048,3907001,0.01273125,-1},
-{3347453,3877796,3878226,0.233133333333333,0.233133333333333},
-{3347454,3877745,3877753,-1,-1},
-{3347455,3877796,3877745,0.0423333333333333,-1},
-{3347457,3877845,3877760,0.3016,-1},
-{3347458,3877760,3877753,-1,-1},
-{3347459,3877796,3877760,-1,0.0361},
-{3347473,3858640,3858827,-1,-1},
-{3347474,3858827,3859100,-1,-1},
-{3347475,3859281,3858640,0.245977777777778,0.245977777777778},
-{3347476,3859883,3859607,0.178036363636364,0.1632},
-{3347477,3859607,3859100,0.39021,0.312168},
-{3347478,3859281,3859607,0.239025,0.224964705882353},
-{3347521,3894321,3895210,0.490355555555556,0.490355555555556},
-{3347522,3895210,3894181,0.6242,0.6242},
-{3347523,3894321,3894428,0.0900222222222222,0.097224},
-{3347524,3894428,3894532,0.174466666666667,0.15702},
-{3347525,3894428,3893838,0.371022222222222,0.371022222222222},
-{3347765,3872530,3872485,-1,0.0561076923076923},
-{3347766,3872485,3872398,-1,0.150284210526316},
-{3347767,3872398,3872500,-1,0.106152941176471},
-{3347768,3872500,3872551,-1,0.0593181818181818},
-{3347769,3872485,3872500,0.00869268292682927,-1},
-{3347770,3872398,3872341,0.0499525423728814,0.0556075471698113},
-{3347771,3872341,3872188,0.209266666666667,0.21973},
-{3347773,3872844,3872656,0.150701694915254,-1},
-{3347774,3872844,3872624,-1,0.169958490566038},
-{3347775,3872084,3872303,0.1998,-1},
-{3347776,3872303,3872414,0.100984615384615,-1},
-{3347777,3872594,3872485,0.23766,0.35649},
-{3347778,3872346,3872394,0.0509837837837838,-1},
-{3347779,3872394,3872414,0.0258428571428571,-1},
-{3347780,3872484,3872490,-1,0.00444489795918367},
-{3347781,3872490,3872524,-1,0.0318409090909091},
-{3347782,3872303,3872394,0.0323769230769231,-1},
-{3347783,3872394,3872490,0.0738461538461539,0.0436363636363636},
-{3347784,3872490,3872538,0.04098,0.0482117647058823},
-{3347785,3872538,3872594,0.0423818181818182,0.0717230769230769},
-{3347788,3872624,3872530,-1,0.089925},
-{3347789,3872656,3872551,0.0899,-1},
-{3348171,3847694,3846821,0.33440625,0.324272727272727},
-{3348172,3846700,3846821,0.341,0.341},
-{3348489,3848689,3848099,-1,-1},
-{3349230,3848569,3853483,-1,-1},
-{3349231,3847766,3848569,-1,-1},
-{3349232,3849451,3848362,-1,-1},
-{3349280,3851142,3850951,0.1456,0.1456},
-{3350290,3854813,3854860,0.388996363636364,0.38205},
-{3350291,3858719,3858906,0.0618,0.0618},
-{3350292,3858393,3859169,0.203585454545455,0.211267924528302},
-{3350293,3858253,3858439,0.950444444444444,0.950444444444444},
-{3350299,3850035,3848439,1.15786666666667,1.15786666666667},
-{3350300,3850010,3849472,0.26508,0.26508},
-{3350301,3857996,3855897,-1,-1},
-{3350302,3856249,3856523,0.159872727272727,0.138836842105263},
-{3350303,3856523,3857568,0.358725,0.326113636363636},
-{3350304,3855305,3855176,0.2877,0.309830769230769},
-{3350305,3854220,3854212,0.44084347826087,0.44084347826087},
-{3350306,3854212,3854211,0.030552,0.030552},
-{3350307,3853763,3853750,0.258254545454545,0.258254545454545},
-{3350308,3853750,3853749,0.0311090909090909,0.0311090909090909},
-{3350309,3853241,3853374,0.201581818181818,0.201581818181818},
-{3350310,3853374,3853428,0.0681818181818182,0.0681818181818182},
-{3350311,3852830,3852823,0.150454545454545,0.150454545454545},
-{3350312,3852823,3852822,0.0771636363636364,0.0771636363636364},
-{3350313,3852268,3852256,0.165890909090909,0.165890909090909},
-{3350314,3851730,3851745,0.0237272727272727,0.0237272727272727},
-{3350315,3851745,3851816,0.107381818181818,0.107381818181818},
-{3350316,3851730,3850999,0.259290909090909,0.259290909090909},
-{3350317,3850324,3854647,0.795447619047619,0.759290909090909},
-{3350318,3851836,3854759,2.16264,2.16264},
-{3350322,3858326,3857996,-1,-1},
-{3350323,3858506,3858492,0.0222218181818182,0.0207152542372881},
-{3350324,3858492,3858664,0.0719265306122449,-1},
-{3350327,3849531,3848840,0.303324324324324,0.267214285714286},
-{3350328,3852415,3851695,0.292605,0.325116666666667},
-{3350329,3851695,3849531,0.737723076923077,0.701736585365854},
-{3350330,3851741,3851276,0.244888888888889,0.244888888888889},
-{3350331,3851276,3851142,0.0971111111111111,0.0971111111111111},
-{3350412,3920856,3915583,3.93036,3.93036},
-{3359922,3883021,3882955,0.0757058823529412,-1},
-{3359923,3884105,3883330,-1,0.578714285714286},
-{3359924,3883330,3883267,-1,0.05847},
-{3359925,3883021,3883330,-1,-1},
-{3361616,3846821,3844192,0.715513636363636,0.850881081081081},
-{3361622,3889450,3889129,0.30834,0.30834},
-{3361623,3889450,3888936,0.32184,0.32184},
-{3361624,3889884,3889760,0.12858,0.12858},
-{3361625,3889760,3889450,0.31098,0.31098},
-{3361626,3889760,3889536,0.13506,0.13506},
-{3361627,3889536,3889277,0.18624,0.18624},
-{3361631,3885968,3886258,0.27591,0.27591},
-{3361632,3889165,3888287,0.81453,0.81453},
-{3361633,3889504,3889165,0.34032,0.34032},
-{3361634,3886258,3886560,0.346042105263158,0.346042105263158},
-{3361638,3889830,3889504,0.32241,0.32241},
-{3361639,3888847,3889830,0.61137,0.61137},
-{3361640,3889212,3888847,0.32724,0.32724},
-{3361641,3889504,3888475,0.62061,0.62061},
-{3361642,3888847,3888475,0.32493,0.32493},
-{3361643,3888109,3889165,0.62385,0.62385},
-{3361644,3888475,3888109,0.32604,0.32604},
-{3361646,3886865,3887827,0.60423,0.60423},
-{3361647,3888189,3887827,0.32598,0.32598},
-{3361648,3887827,3887997,0.09075,0.09075},
-{3361649,3887997,3888847,0.49566,0.49566},
-{3361650,3888475,3887612,0.49311,0.49311},
-{3361651,3887997,3887612,0.33003,0.33003},
-{3361652,3887612,3887415,0.09774,0.09774},
-{3361653,3887415,3886560,0.5961,0.5961},
-{3361654,3886258,3887098,0.60759,0.60759},
-{3361655,3887098,3888109,0.58539,0.58539},
-{3361656,3887415,3887098,0.32304,0.32304},
-{3361660,3894181,3893714,0.465488888888889,0.465488888888889},
-{3361661,3893714,3893424,0.306555555555556,0.306555555555556},
-{3361662,3893714,3893976,0.999022222222222,0.999022222222222},
-{3361663,3890171,3890130,0.04344,0.04344},
-{3361664,3890130,3889830,0.32457,0.32457},
-{3361665,3890130,3889497,0.42789,0.42789},
-{3361666,3889497,3889212,0.18834,0.18834},
-{3361667,3889497,3889837,0.32964,0.32964},
-{3361668,3889837,3890144,0.34284,0.34284},
-{3361671,3889212,3888335,0.50892,0.50892},
-{3361675,3889837,3888758,0.66771,0.66771},
-{3361737,3871350,3871315,0.327514285714286,0.299034782608696},
-{3362217,3890281,3890312,0.124688888888889,0.124688888888889},
-{3362225,3882011,3882065,-1,-1},
-{3362226,3882065,3882743,-1,-1},
-{3362227,3882065,3881940,0.08082,0.08082},
-{3362259,3890795,3890303,0.128372727272727,0.131358139534884},
-{3362260,3890303,3889886,0.134178947368421,0.124360975609756},
-{3362261,3890303,3890312,0.0180888888888889,0.0180888888888889},
-{3362317,3872701,3873465,-1,-1},
-{3362318,3873465,3873204,-1,-1},
-{3362319,3873287,3873716,-1,-1},
-{3362320,3873716,3873825,-1,-1},
-{3362321,3873716,3873819,-1,-1},
-{3362322,3873465,3873503,-1,-1},
-{3362323,3873045,3873503,-1,-1},
-{3362324,3873503,3873719,-1,-1},
-{3362327,3871568,3871798,0.1488,0.1488},
-{3362328,3871798,3871822,0.0123157894736842,0.0123157894736842},
-{3362329,3872009,3871244,0.209045454545455,0.2555},
-{3362330,3871798,3872009,-1,-1},
-{3362331,3871798,3871552,-1,-1},
-{3362333,3871237,3871495,-1,-1},
-{3362334,3871495,3872308,-1,-1},
-{3362335,3871769,3871575,-1,-1},
-{3362336,3871495,3871575,-1,-1},
-{3362339,3872308,3872816,-1,-1},
-{3362340,3872816,3872867,-1,-1},
-{3362341,3871769,3872816,-1,-1},
-{3362342,3872816,3872882,-1,-1},
-{3362343,3872308,3872772,-1,-1},
-{3362350,3892896,3892710,-1,-1},
-{3362351,3892710,3892510,-1,-1},
-{3362352,3892710,3892878,-1,-1},
-{3362353,3893440,3893436,-1,-1},
-{3362354,3892878,3893440,-1,-1},
-{3362355,3893492,3893440,-1,-1},
-{3362356,3893759,3893982,0.178309090909091,0.178309090909091},
-{3362357,3893492,3893602,-1,-1},
-{3362358,3893602,3893759,-1,-1},
-{3362359,3893982,3893733,-1,-1},
-{3362360,3893602,3893733,-1,-1},
-{3362361,3892878,3893352,-1,-1},
-{3362362,3893352,3893492,-1,-1},
-{3362363,3893329,3893497,0.1938,0.162792},
-{3362364,3893497,3893759,0.264,0.276},
-{3362365,3893222,3893154,-1,-1},
-{3362366,3893154,3892896,-1,-1},
-{3362367,3893352,3893422,-1,-1},
-{3362368,3893422,3893497,-1,-1},
-{3362369,3893154,3893422,-1,-1},
-{3362370,3893422,3893602,-1,-1},
-{3362371,3892726,3892550,-1,-1},
-{3362372,3893982,3893455,-1,-1},
-{3362373,3893455,3893406,-1,-1},
-{3362374,3892708,3892779,-1,-1},
-{3362375,3892779,3893406,-1,-1},
-{3362376,3892726,3893083,-1,-1},
-{3362377,3892779,3893083,-1,-1},
-{3362378,3893733,3893436,-1,-1},
-{3362379,3893083,3893428,-1,-1},
-{3362380,3893428,3893436,-1,-1},
-{3362381,3893083,3893430,-1,-1},
-{3362382,3893430,3893455,-1,-1},
-{3362383,3893428,3893430,-1,-1},
-{3362384,3889711,3889747,-1,-1},
-{3362385,3889747,3890088,-1,-1},
-{3362386,3890065,3890031,-1,-1},
-{3362391,3890031,3890469,-1,-1},
-{3362392,3890469,3890924,-1,-1},
-{3362393,3890031,3890469,-1,-1},
-{3362394,3890088,3890156,0.0407454545454545,0.0407454545454545},
-{3362395,3890156,3890590,0.52545,0.52545},
-{3362402,3873733,3873486,-1,-1},
-{3362405,3873733,3873766,0.0145285714285714,0.0141906976744186},
-{3362415,3883331,3883349,-1,-1},
-{3362416,3884023,3884123,-1,-1},
-{3362467,3846404,3846522,0.247866666666667,0.247866666666667},
-{3362509,3874818,3874633,-1,0.0491727272727273},
-{3362510,3874633,3874532,-1,0.018734693877551},
-{3362511,3874633,3874994,-1,-1},
-{3362512,3875410,3875446,0.0130772727272727,0.01644},
-{3362513,3875446,3875487,0.0120409090909091,0.0143189189189189},
-{3362514,3875446,3875230,-1,-1},
-{3362515,3875230,3874994,-1,-1},
-{3362516,3875338,3875230,-1,-1},
-{3362517,3874277,3874930,-1,-1},
-{3362518,3875338,3875218,-1,-1},
-{3362519,3875218,3874930,-1,-1},
-{3362520,3875218,3875028,-1,-1},
-{3362521,3875288,3875028,-1,-1},
-{3362522,3875288,3875338,-1,-1},
-{3362523,3875028,3874632,-1,-1},
-{3362524,3874632,3874277,-1,-1},
-{3362525,3874137,3874076,-1,-1},
-{3362526,3874632,3874213,-1,-1},
-{3362527,3874213,3874137,-1,-1},
-{3362528,3874367,3874213,-1,-1},
-{3362529,3874420,3874367,-1,-1},
-{3362530,3874576,3874420,-1,-1},
-{3362531,3874571,3874457,-1,-1},
-{3362532,3874457,3874420,-1,-1},
-{3362533,3874571,3874964,-1,-1},
-{3362534,3875724,3875477,-1,-1},
-{3362535,3875477,3875288,-1,-1},
-{3362536,3876677,3875950,-1,-1},
-{3362538,3875477,3875950,-1,-1},
-{3362539,3875950,3875724,-1,-1},
-{3362540,3876504,3875724,-1,-1},
-{3362543,3875477,3875353,-1,-1},
-{3362544,3875353,3874576,-1,-1},
-{3362545,3875724,3875459,-1,-1},
-{3362546,3875459,3875353,-1,-1},
-{3362547,3875459,3874964,-1,-1},
-{3362549,3875051,3875052,-1,-1},
-{3362550,3874725,3874964,-1,-1},
-{3362551,3874725,3874515,-1,-1},
-{3362552,3874515,3874471,-1,-1},
-{3362553,3874725,3874531,-1,-1},
-{3362554,3874531,3874424,-1,-1},
-{3362555,3875525,3875459,-1,-1},
-{3362556,3874795,3874725,-1,-1},
-{3362557,3875525,3874795,-1,-1},
-{3362558,3875058,3874795,-1,-1},
-{3362565,3874642,3874445,-1,-1},
-{3362566,3874795,3874572,-1,-1},
-{3362567,3874445,3874572,-1,-1},
-{3362568,3875052,3875053,-1,-1},
-{3362569,3875053,3875058,-1,-1},
-{3362570,3874572,3874914,-1,-1},
-{3362571,3874914,3874642,-1,-1},
-{3362572,3875053,3874914,-1,-1},
-{3362575,3875525,3875275,-1,-1},
-{3362576,3875275,3875058,-1,-1},
-{3362577,3875669,3875572,-1,-1},
-{3362578,3875572,3875275,-1,-1},
-{3362579,3875572,3875191,-1,-1},
-{3362580,3875191,3875053,-1,-1},
-{3362581,3875900,3875191,-1,-1},
-{3362582,3875900,3876004,-1,-1},
-{3362601,3872043,3871083,-1,0.1766},
-{3362602,3871083,3871032,-1,0.0128266666666667},
-{3362603,3871105,3871083,-1,-1},
-{3362604,3871194,3871105,-1,-1},
-{3362605,3871346,3871194,-1,-1},
-{3362606,3872790,3871105,-1,-1},
-{3362610,3872487,3872107,-1,-1},
-{3362611,3872197,3872107,-1,-1},
-{3362612,3872107,3871733,-1,-1},
-{3362613,3871733,3871346,-1,-1},
-{3362614,3872197,3871733,-1,-1},
-{3362615,3872242,3872197,-1,-1},
-{3362616,3872242,3871992,-1,-1},
-{3362617,3871725,3871766,0.029125,0.0183947368421053},
-{3362618,3871766,3871812,0.0337304347826087,0.0204157894736842},
-{3362619,3871992,3871766,-1,-1},
-{3362620,3873283,3873249,-1,-1},
-{3362621,3873067,3872626,-1,-1},
-{3362622,3872642,3872300,-1,-1},
-{3362623,3872300,3872242,-1,-1},
-{3362624,3872626,3872300,-1,-1},
-{3362625,3873249,3873229,-1,-1},
-{3362626,3873229,3873067,-1,-1},
-{3362628,3872790,3872318,-1,-1},
-{3362629,3872318,3872107,-1,-1},
-{3362630,3873139,3872318,-1,-1},
-{3362631,3872928,3872790,-1,-1},
-{3362632,3874277,3873712,-1,-1},
-{3362633,3873712,3873229,-1,-1},
-{3362634,3873229,3873258,-1,-1},
-{3362635,3873258,3873139,-1,-1},
-{3362636,3873712,3873392,-1,-1},
-{3362637,3873392,3873258,-1,-1},
-{3362638,3873392,3873180,-1,-1},
-{3362639,3873180,3873139,-1,-1},
-{3362640,3873139,3872970,-1,-1},
-{3362641,3872970,3872928,-1,-1},
-{3362642,3873180,3873203,-1,-1},
-{3362643,3873203,3872970,-1,-1},
-{3362644,3874930,3873565,-1,-1},
-{3362645,3873565,3872928,-1,-1},
-{3362646,3873565,3873203,-1,-1},
-{3362647,3873565,3873392,-1,-1},
-{3362648,3873334,3872940,0.15404,0.149070967741935},
-{3362649,3872940,3872142,0.273268965517241,0.240145454545455},
-{3362650,3872069,3872075,-1,-1},
-{3362651,3872115,3872075,-1,-1},
-{3362652,3872106,3872142,0.0216,0.02},
-{3362653,3872115,3872106,-1,-1},
-{3362654,3872047,3872035,-1,-1},
-{3362655,3871884,3871437,-1,-1},
-{3362656,3872069,3871884,-1,-1},
-{3362657,3872075,3871959,-1,-1},
-{3362658,3871959,3871884,-1,-1},
-{3362659,3871437,3871817,0.248530434782609,0.219853846153846},
-{3362660,3872115,3871959,-1,-1},
-{3362661,3872305,3872981,0.135266666666667,-1},
-{3362662,3872981,3873387,0.09822,-1},
-{3362663,3873130,3872840,-1,-1},
-{3362664,3872840,3872981,-1,-1},
-{3362665,3872940,3872563,-1,-1},
-{3362666,3872563,3872115,-1,-1},
-{3362667,3872777,3873130,-1,-1},
-{3362668,3872777,3872840,-1,-1},
-{3362669,3872777,3872563,-1,-1},
-{3362670,3872350,3872777,-1,-1},
-{3362671,3872057,3872069,-1,-1},
-{3362672,3872350,3872057,-1,-1},
-{3362673,3872057,3871683,-1,-1},
-{3362674,3871858,3872023,-1,-1},
-{3362675,3872023,3872057,-1,-1},
-{3362676,3871941,3871989,-1,-1},
-{3362677,3871989,3872350,-1,-1},
-{3362678,3872023,3871989,-1,-1},
-{3362679,3871941,3871832,-1,-1},
-{3362683,3869175,3868849,0.136384615384615,0.126642857142857},
-{3362684,3869443,3869057,0.18372,0.177793548387097},
-{3362685,3869057,3868849,0.142625,0.148826086956522},
-{3362686,3869175,3869057,-1,-1},
-{3362687,3869792,3869664,0.0546642857142857,0.0463818181818182},
-{3362688,3869664,3869175,0.169858064516129,0.146266666666667},
-{3362689,3869601,3870504,0.706061538461538,0.7649},
-{3362690,3870504,3870995,0.210432,0.26304},
-{3362691,3869956,3869975,0.0110545454545455,0.0130285714285714},
-{3362692,3869975,3869601,0.431485714285714,0.635873684210526},
-{3362693,3870504,3869975,-1,-1},
-{3362722,3862546,3862566,0.0113555555555556,0.0113555555555556},
-{3362723,3862566,3862596,0.0165333333333333,0.0165333333333333},
-{3362724,3862546,3862381,-1,0.0514576271186441},
-{3362725,3862381,3862165,-1,0.0700372881355932},
-{3362726,3862566,3862381,-1,-1},
-{3362727,3862475,3862320,0.0456387096774193,-1},
-{3362728,3862320,3862075,0.0713322580645161,-1},
-{3362729,3862381,3862320,-1,-1},
-{3362730,3862475,3862455,-1,0.0202875},
-{3362731,3862455,3862069,-1,0.310231578947368},
-{3362732,3862320,3862455,-1,-1},
-{3362733,3863539,3863563,0.015,0.01},
-{3362734,3863464,3863081,0.160378125,-1},
-{3362735,3863532,3863138,-1,0.164862295081967},
-{3362736,3878815,3879133,0.161823529411765,-1},
-{3362737,3879133,3879365,0.120247058823529,-1},
-{3362738,3879133,3879091,-1,-1},
-{3362739,3880149,3879822,0.202986206896552,-1},
-{3362740,3879822,3879461,0.182941935483871,-1},
-{3362741,3878667,3878662,0.1745625,0.22344},
-{3362742,3878662,3878665,0.0805263157894737,0.0765},
-{3362743,3878737,3878662,-1,-1},
-{3362744,3878737,3878736,-1,-1},
-{3362745,3879091,3878917,-1,-1},
-{3362746,3878917,3878737,-1,-1},
-{3362747,3878736,3878917,-1,-1},
-{3362748,3878736,3878735,-1,-1},
-{3362749,3878665,3878663,0.0172615384615385,0.0172615384615385},
-{3362750,3878663,3878655,0.195746341463415,0.191085714285714},
-{3362751,3878735,3878663,-1,-1},
-{3362752,3878655,3879016,-1,-1},
-{3362753,3879016,3879074,-1,-1},
-{3362754,3879074,3879073,-1,-1},
-{3362755,3878735,3879154,-1,-1},
-{3362756,3879154,3879016,-1,-1},
-{3362757,3879154,3879168,-1,-1},
-{3362758,3879074,3879313,-1,-1},
-{3362759,3879461,3879300,0.0602516129032258,-1},
-{3362760,3879300,3878635,0.37482,-1},
-{3362761,3879313,3879300,-1,-1},
-{3362762,3879154,3879327,-1,-1},
-{3362763,3879327,3879313,-1,-1},
-{3362764,3879313,3879514,-1,-1},
-{3362765,3879327,3879514,-1,-1},
-{3362766,3879514,3879537,-1,-1},
-{3362767,3879537,3879305,-1,-1},
-{3362768,3879305,3879309,-1,-1},
-{3362769,3879305,3879194,-1,-1},
-{3362770,3879537,3879627,-1,-1},
-{3362771,3879627,3879785,-1,-1},
-{3362772,3879785,3879704,-1,-1},
-{3362773,3879785,3879836,-1,-1},
-{3362774,3879627,3879692,-1,-1},
-{3362775,3879692,3879822,-1,-1},
-{3362776,3879692,3879853,-1,-1},
-{3362777,3880902,3880218,-1,0.496314285714286},
-{3362778,3880218,3879549,-1,0.328694117647059},
-{3362779,3880218,3880503,-1,-1},
-{3362780,3879822,3879802,-1,-1},
-{3362781,3879802,3880034,-1,-1},
-{3362782,3880034,3880218,-1,-1},
-{3362783,3880034,3880504,-1,-1},
-{3362784,3879802,3879555,-1,-1},
-{3362785,3879555,3879484,-1,-1},
-{3362786,3879891,3880034,-1,-1},
-{3362787,3879555,3879891,-1,-1},
-{3362788,3879555,3879596,-1,-1},
-{3362789,3879596,3879891,-1,-1},
-{3362790,3879596,3879520,-1,-1},
-{3362791,3879627,3879628,-1,-1},
-{3362792,3873751,3872938,0.384171428571429,0.384171428571429},
-{3362793,3873751,3873587,-1,-1},
-{3362794,3874096,3873697,-1,-1},
-{3362795,3874238,3874298,-1,-1},
-{3362796,3874298,3875050,-1,-1},
-{3362797,3874303,3874298,-1,-1},
-{3362798,3874096,3874144,-1,-1},
-{3362799,3874144,3874303,-1,-1},
-{3362800,3874307,3874144,-1,-1},
-{3362801,3874303,3874307,-1,-1},
-{3362802,3874323,3874307,-1,-1},
-{3362803,3873945,3874096,-1,-1},
-{3362804,3874323,3874160,-1,-1},
-{3362805,3874160,3873945,-1,-1},
-{3362806,3874497,3874323,-1,-1},
-{3362807,3874160,3874446,-1,-1},
-{3362808,3874446,3874497,-1,-1},
-{3362809,3874224,3873945,-1,-1},
-{3362810,3874446,3874295,-1,-1},
-{3362811,3874295,3874224,-1,-1},
-{3362812,3874770,3874688,-1,-1},
-{3362813,3874688,3874497,-1,-1},
-{3362814,3874307,3874688,-1,-1},
-{3362815,3874718,3874770,-1,-1},
-{3362816,3874946,3874770,-1,-1},
-{3362817,3874295,3874674,-1,-1},
-{3362818,3874674,3874770,-1,-1},
-{3362819,3874946,3875132,-1,-1},
-{3362820,3875425,3874946,-1,-1},
-{3362821,3875425,3875812,-1,-1},
-{3362822,3875812,3875132,-1,-1},
-{3362823,3874718,3875341,-1,-1},
-{3362824,3875341,3875425,-1,-1},
-{3362825,3875568,3875341,-1,-1},
-{3362826,3875568,3876131,-1,-1},
-{3362827,3876064,3875050,-1,-1},
-{3362828,3876131,3876176,-1,-1},
-{3362829,3876176,3876064,-1,-1},
-{3362830,3876176,3876242,-1,-1},
-{3362831,3876061,3876085,-1,-1},
-{3362832,3876085,3876064,-1,-1},
-{3362833,3876190,3876085,-1,-1},
-{3362834,3875132,3875073,-1,-1},
-{3362835,3875073,3874674,-1,-1},
-{3362836,3875727,3875716,-1,-1},
-{3362837,3875812,3876050,-1,-1},
-{3362838,3876187,3876050,-1,-1},
-{3362839,3875952,3876187,-1,-1},
-{3362840,3876050,3875982,-1,-1},
-{3362841,3875982,3875568,-1,-1},
-{3362842,3875982,3876028,-1,-1},
-{3362843,3876093,3875952,-1,-1},
-{3362844,3876215,3876093,-1,-1},
-{3362845,3876187,3876556,-1,-1},
-{3362846,3876265,3876650,-1,-1},
-{3362847,3876242,3876257,-1,-1},
-{3362848,3876257,3876190,-1,-1},
-{3362850,3876257,3876490,-1,-1},
-{3362851,3876490,3876524,-1,-1},
-{3362852,3876556,3876526,-1,-1},
-{3362853,3876526,3876093,-1,-1},
-{3362854,3876215,3876526,-1,-1},
-{3362855,3876490,3876576,-1,-1},
-{3362856,3876576,3876504,-1,-1},
-{3362857,3876755,3876576,-1,-1},
-{3362858,3876755,3876820,-1,-1},
-{3362859,3876820,3876843,-1,-1},
-{3362860,3876028,3876705,-1,-1},
-{3362861,3876705,3876755,-1,-1},
-{3362862,3876028,3876724,-1,-1},
-{3362863,3876724,3876705,-1,-1},
-{3362864,3876820,3876813,-1,-1},
-{3362865,3876813,3876677,-1,-1},
-{3362866,3876724,3876813,-1,-1},
-{3362867,3876187,3876428,-1,-1},
-{3362868,3876428,3876615,-1,-1},
-{3362869,3876615,3876556,-1,-1},
-{3362870,3876724,3876737,-1,-1},
-{3362871,3876737,3876428,-1,-1},
-{3362872,3876935,3876737,-1,-1},
-{3362873,3876615,3876964,-1,-1},
-{3362874,3876964,3876935,-1,-1},
-{3362875,3876935,3876945,-1,-1},
-{3362876,3876945,3876943,-1,-1},
-{3362877,3876945,3877237,-1,-1},
-{3362878,3877237,3876964,-1,-1},
-{3362879,3877237,3877149,-1,-1},
-{3362880,3877149,3877138,-1,-1},
-{3362881,3877237,3877186,-1,-1},
-{3362882,3877149,3877051,-1,-1},
-{3362883,3877051,3876964,-1,-1},
-{3362884,3877074,3877051,-1,-1},
-{3362885,3876556,3876770,-1,-1},
-{3362886,3876770,3877074,-1,-1},
-{3362887,3876785,3876770,-1,-1},
-{3362888,3876526,3876785,-1,-1},
-{3362889,3877111,3877074,-1,-1},
-{3362890,3876785,3877111,-1,-1},
-{3362891,3876650,3876838,-1,-1},
-{3362892,3876838,3876785,-1,-1},
-{3362893,3877142,3877111,-1,-1},
-{3362894,3876838,3877082,-1,-1},
-{3362895,3877082,3877142,-1,-1},
-{3362896,3876650,3876762,-1,-1},
-{3362897,3877082,3877225,-1,-1},
-{3362898,3877225,3876762,-1,-1},
-{3362899,3877480,3877142,-1,-1},
-{3362900,3877237,3877473,-1,-1},
-{3362901,3877473,3877480,-1,-1},
-{3362902,3877473,3877430,-1,-1},
-{3362903,3877549,3877480,-1,-1},
-{3362904,3877549,3877526,-1,-1},
-{3362905,3877337,3877549,-1,-1},
-{3362906,3877225,3877243,-1,-1},
-{3362907,3877243,3877337,-1,-1},
-{3362908,3877337,3877206,-1,-1},
-{3362909,3877206,3877243,-1,-1},
-{3362910,3876762,3877039,-1,-1},
-{3362911,3877206,3877039,-1,-1},
-{3362912,3877039,3877251,-1,-1},
-{3362913,3877251,3877484,-1,-1},
-{3362914,3877251,3877663,-1,-1},
-{3362915,3877894,3877950,-1,-1},
-{3362916,3877950,3877957,-1,-1},
-{3362917,3877950,3878018,-1,-1},
-{3362918,3877484,3877599,-1,-1},
-{3362919,3878151,3877633,0.201177777777778,0.258657142857143},
-{3362920,3877599,3877633,-1,-1},
-{3362921,3877663,3877736,-1,-1},
-{3362922,3877736,3877894,-1,-1},
-{3362923,3877599,3877736,-1,-1},
-{3362924,3877736,3878128,-1,-1},
-{3362925,3878230,3878168,0.0292695652173913,0.0396},
-{3362926,3878168,3878151,0.0091304347826087,0.0123529411764706},
-{3362927,3878128,3878160,-1,-1},
-{3362928,3878160,3878168,-1,-1},
-{3362929,3878160,3878080,-1,-1},
-{3362930,3873587,3874224,-1,-1},
-{3362931,3874303,3874718,-1,-1},
-{3362932,3881122,3881456,-1,-1},
-{3362933,3880796,3881426,0.255763636363636,0.228113513513513},
-{3362934,3881426,3881837,0.175075,0.120051428571429},
-{3362935,3881456,3881638,-1,-1},
-{3362936,3881638,3881426,-1,-1},
-{3362937,3882051,3881920,-1,-1},
-{3362938,3881456,3881857,-1,-1},
-{3362939,3881638,3881957,-1,-1},
-{3362940,3881857,3881957,-1,-1},
-{3362941,3882306,3882336,-1,-1},
-{3362942,3882336,3882051,-1,-1},
-{3362943,3882336,3882413,-1,-1},
-{3362944,3882463,3882493,-1,-1},
-{3362945,3882413,3882463,-1,-1},
-{3362946,3881837,3882198,-1,-1},
-{3362947,3882198,3882463,-1,-1},
-{3362948,3882225,3882306,-1,-1},
-{3362949,3881957,3882143,-1,-1},
-{3362950,3882143,3882225,-1,-1},
-{3362951,3882299,3882225,-1,-1},
-{3362952,3882143,3882299,-1,-1},
-{3362953,3882198,3882187,-1,-1},
-{3362954,3882187,3882299,-1,-1},
-{3362955,3882187,3881514,-1,-1},
-{3362956,3882225,3882049,-1,-1},
-{3362957,3882049,3882143,-1,-1},
-{3362958,3881857,3882045,-1,-1},
-{3362959,3882045,3882126,-1,-1},
-{3362960,3882049,3882045,-1,-1},
-{3362961,3881920,3881863,0.0380285714285714,0.0499125},
-{3362962,3881863,3881122,0.325177777777778,0.325177777777778},
-{3362963,3882045,3881863,-1,-1},
-{3362976,3847383,3846884,0.190275,0.179082352941176},
-{3362977,3846884,3845033,0.86,0.86},
-{3362978,3846884,3846862,0.154066666666667,0.154066666666667},
-{3363018,3854739,3854220,0.335733333333333,0.2518},
-{3363019,3854220,3853763,0.172563636363636,0.172563636363636},
-{3363020,3854647,3854759,0.02106,0.0229745454545455},
-{3363021,3854759,3857991,0.530918181818182,0.5562},
-{3363025,3854739,3854686,0.434111111111111,0.434111111111111},
-{3363026,3854211,3854694,0.221184,0.240417391304348},
-{3363027,3854694,3855176,0.265669565217391,0.210703448275862},
-{3363028,3854686,3854694,0.0351545454545455,0.0336260869565217},
-{3363043,3865750,3865816,0.0416727272727273,0.0359529411764706},
-{3363044,3866117,3866503,0.201969230769231,0.1641},
-{3363062,3847029,3847227,0.0654558139534884,0.070365},
-{3363063,3847227,3847265,0.011175,0.0117631578947368},
-{3363064,3847308,3847227,0.202333333333333,0.173428571428571},
-{3363065,3849169,3847054,0.527574545454545,0.558011538461539},
-{3363066,3847418,3847447,0.0536222222222222,0.0536222222222222},
-{3363255,3882181,3882400,-1,-1},
-{3363301,3864828,3864600,0.102,0.102},
-{3363302,3864600,3864396,0.12915,0.12915},
-{3363320,3885895,3885885,-1,-1},
-{3363321,3885885,3885874,-1,-1},
-{3363322,3885885,3886532,-1,-1},
-{3363323,3886985,3886953,0.368485714285714,-1},
-{3363324,3886532,3886953,-1,-1},
-{3363325,3887624,3887606,-1,0.267218181818182},
-{3363326,3886953,3887606,-1,-1},
-{3363327,3888215,3888202,0.31818,-1},
-{3363328,3888202,3888181,0.35865,-1},
-{3363329,3887606,3888202,-1,-1},
-{3363330,3888807,3888805,-1,0.3762},
-{3363331,3888805,3888798,-1,0.293431578947368},
-{3363332,3888202,3888805,-1,-1},
-{3363365,3866063,3865925,0.064392,0.0487818181818182},
-{3363366,3865925,3865676,0.0906,0.07248},
-{3363369,3865925,3866080,0.35664,0.35664},
-{3363396,3884221,3884516,0.353916666666667,0.344351351351351},
-{3363397,3884516,3884323,0.0880888888888889,0.0880888888888889},
-{3363398,3884516,3884654,0.149857894736842,0.138892682926829},
-{3363399,3884654,3884501,0.0710222222222222,0.0710222222222222},
-{3363435,3908887,3909017,0.082904347826087,0.0706222222222222},
-{3363436,3909017,3909343,0.160324137931034,0.185976},
-{3363437,3908737,3909017,-1,-1},
-{3363438,3909017,3909035,-1,-1},
-{3363439,3913759,3914484,0.418675,0.418675},
-{3363440,3914484,3914833,0.2114,0.2114},
-{3363441,3914089,3914213,0.0731478260869565,0.0731478260869565},
-{3363442,3914213,3914375,0.0850714285714286,0.103565217391304},
-{3363443,3914484,3914213,-1,-1},
-{3363447,3865442,3865410,0.0156,0.0193142857142857},
-{3363448,3865944,3865749,0.0832444444444445,0.0832444444444445},
-{3363449,3865749,3864722,0.64866,0.64866},
-{3363450,3865442,3865749,-1,-1},
-{3363451,3880338,3878856,-1,-1},
-{3363467,3848779,3849838,0.5624,0.5624},
-{3363567,3884654,3884851,0.130508108108108,0.112297674418605},
-{3363568,3885410,3885370,-1,-1},
-{3363569,3885370,3885850,-1,-1},
-{3363570,3884851,3885047,0.112615384615385,0.1098},
-{3363571,3884758,3885047,-1,-1},
-{3363572,3884758,3884967,-1,-1},
-{3363573,3885047,3885349,0.133,0.145975609756098},
-{3363574,3885349,3885737,0.280954838709677,0.235394594594595},
-{3363575,3884967,3885349,-1,-1},
-{3363831,3859375,3858882,-1,-1},
-{3363832,3858741,3858882,0.1545,0.1545},
-{3363833,3858882,3859078,0.1687,0.178623529411765},
-{3363910,3899482,3900270,0.470711111111111,0.470711111111111},
-{3363911,3900270,3900501,0.2746,0.143269565217391},
-{3363914,3900255,3900290,-1,0.0628545454545455},
-{3363915,3900501,3900376,0.0577090909090909,0.0835263157894737},
-{3363916,3900376,3900255,0.042651724137931,0.0549733333333333},
-{3363917,3900290,3900376,-1,0.0356888888888889},
-{3363918,3900290,3900257,0.04248,0.04248},
-{3363919,3900257,3900217,0.49848,0.49848},
-{3363920,3900217,3900270,0.0511058823529412,0.0394909090909091},
-{3363921,3900257,3900217,0.47964,0.47964},
-{3363930,3900270,3900373,0.0971,0.0971},
-{3363931,3900373,3900471,0.44442,0.44442},
-{3363932,3900471,3900373,0.8451,0.8451},
-{3363933,3900373,3900471,0.21972,0.21972},
-{3363966,3884851,3884622,-1,-1},
-{3363967,3884622,3884758,-1,-1},
-{3364717,3881574,3881559,0.0559153846153846,-1},
-{3364718,3881559,3881563,0.00813103448275862,-1},
-{3364719,3881586,3881618,0.0170647058823529,-1},
-{3364720,3881618,3881628,0.00732352941176471,-1},
-{3364721,3881592,3881596,0.0178857142857143,-1},
-{3364722,3881596,3881599,0.01185,-1},
-{3364911,3893742,3894432,0.4359,-1},
-{3364912,3894432,3894443,0.0161217391304348,-1},
-{3364913,3888770,3888988,0.127835294117647,-1},
-{3364914,3890924,3890590,-1,-1},
-{3364915,3889561,3889225,0.3746,-1},
-{3364916,3890924,3890896,-1,-1},
-{3364917,3891497,3892855,-1,-1},
-{3364918,3893488,3893554,-1,-1},
-{3364919,3894313,3894443,-1,-1},
-{3364920,3889747,3890031,-1,-1},
-{3364921,3890469,3890156,-1,-1},
-{3364922,3888327,3888283,-1,-1},
-{3364923,3888872,3888850,-1,0.0759130434782609},
-{3364924,3888908,3888988,-1,0.104733333333333},
-{3364925,3887227,3887834,0.222225,0.35556},
-{3364926,3887834,3888131,0.139542857142857,0.0888},
-{3364927,3885460,3885478,0.0245647058823529,-1},
-{3364928,3885946,3885938,0.24513,-1},
-{3364929,3885957,3885946,0.0503,-1},
-{3364930,3885773,3885812,0.0438631578947368,-1},
-{3364931,3882082,3882394,0.2611,-1},
-{3364932,3887133,3887355,-1,0.182372727272727},
-{3364933,3887355,3887668,-1,0.186364285714286},
-{3364934,3887668,3887688,-1,0.0129},
-{3364935,3886153,3886088,-1,0.0345714285714286},
-{3364936,3886088,3885649,-1,0.19755652173913},
-{3364937,3885649,3885566,-1,0.0401714285714286},
-{3364938,3851765,3851985,0.1528,0.1528},
-{3364939,3851985,3852111,0.0810666666666667,0.0810666666666667},
-{3364940,3851306,3851400,0.0864705882352941,0.0773684210526316},
-{3364941,3851400,3851904,0.2574,0.2574},
-{3364942,3863001,3862781,0.178466666666667,0.178466666666667},
-{3364943,3862781,3862765,0.0184333333333333,0.0255230769230769},
-{3364944,3862223,3861804,-1,-1},
-{3364945,3861804,3861790,-1,-1},
-{3364946,3863294,3863284,-1,-1},
-{3364947,3863284,3863001,-1,-1},
-{3364950,3873776,3873845,0.1254,0.1254},
-{3364953,3881900,3881964,-1,-1},
-{3364954,3881964,3882469,-1,-1},
-{3364955,3881842,3881898,-1,0.1203},
-{3364956,3881898,3882079,-1,0.34374},
-{3364957,3882545,3882705,0.18404,-1},
-{3364958,3882501,3882545,0.0732666666666667,-1},
-{3364959,3881837,3882022,0.456190909090909,0.477914285714286},
-{3364960,3873482,3873217,-1,0.0739571428571429},
-{3364961,3872978,3872653,-1,0.0777285714285714},
-{3364962,3873108,3872714,0.101344186046512,-1},
-{3364963,3873462,3873108,0.142365517241379,-1},
-{3364964,3879729,3879997,0.354646153846154,-1},
-{3364965,3879997,3880031,0.0604666666666667,-1},
-{3364966,3879634,3879678,0.0471,0.0538285714285714},
-{3364967,3879678,3879729,0.0585,0.06825},
-{3364968,3879842,3879726,0.08979,-1},
-{3364969,3880038,3880146,-1,0.0495428571428571},
-{3364970,3876324,3877324,-1,-1},
-{3364971,3876821,3876731,0.121421052631579,-1},
-{3364972,3876731,3876734,0.0483333333333333,-1},
-{3364973,3876239,3876719,0.33824,0.267031578947368},
-{3364974,3876719,3876734,0.0119142857142857,0.00834},
-{3364975,3877219,3877367,-1,-1},
-{3364976,3877645,3877629,0.0389333333333333,0.0269538461538462},
-{3364977,3877629,3877545,0.165866666666667,0.165866666666667},
-{3364978,3877545,3877598,0.0173777777777778,0.0173777777777778},
-{3364979,3877598,3877849,0.0944888888888889,0.0944888888888889},
-{3364980,3877136,3877009,-1,-1},
-{3364981,3869093,3870083,-1,0.404378571428571},
-{3364982,3870083,3870508,-1,0.12467027027027},
-{3364983,3872062,3872249,-1,0.105},
-{3364984,3872249,3872507,-1,0.112342857142857},
-{3364985,3872507,3872555,-1,0.0206},
-{3364986,3872305,3872229,0.042264,0.042264},
-{3364987,3871643,3872229,0.291777777777778,0.291777777777778},
-{3364988,3873757,3873334,0.17708275862069,0.270284210526316},
-{3364989,3872106,3872047,-1,-1},
-{3364990,3871817,3872106,0.148244444444444,0.14295},
-{3364991,3871959,3871817,-1,-1},
-{3364992,3870094,3870699,0.54448,0.302488888888889},
-{3364993,3869290,3870094,0.626111111111111,0.582931034482759},
-{3364996,3869022,3868552,0.215044444444444,0.215044444444444},
-{3364997,3866976,3866935,-1,0.0152511627906977},
-{3364998,3866935,3866741,-1,0.0704045454545455},
-{3364999,3867210,3867141,-1,0.03876},
-{3365019,3917493,3917508,0.00333529411764706,0.00324},
-{3365020,3917508,3918086,0.143330434782609,0.139292957746479},
-{3365021,3883360,3883383,0.0277578947368421,-1},
-{3365022,3883717,3883976,0.25272,-1},
-{3365023,3883976,3884002,0.02805,-1},
-{3365024,3883543,3883559,0.0168,-1},
-{3365025,3883559,3883918,0.482863636363636,-1},
-{3365194,3870289,3870184,-1,-1},
-{3365195,3870577,3870554,-1,-1},
-{3365196,3870554,3870387,-1,-1},
-{3365197,3870554,3870289,-1,-1},
-{3365200,3870289,3870245,-1,-1},
-{3365201,3870245,3869705,-1,-1},
-{3365203,3870245,3869973,-1,-1},
-{3365214,3870953,3871056,0.0758666666666667,0.06828},
-{3365215,3871056,3871159,0.100094117647059,0.0945333333333333},
-{3365216,3869667,3869515,0.0804,0.0665379310344827},
-{3365217,3869515,3869443,0.0272,0.0236903225806452},
-{3365218,3869515,3869792,-1,-1},
-{3365220,3870577,3870531,0.118870588235294,-1},
-{3365221,3870531,3870650,0.257492307692308,-1},
-{3365222,3869665,3870043,-1,-1},
-{3365223,3870043,3870223,-1,-1},
-{3365224,3870223,3870208,-1,-1},
-{3365225,3870531,3870277,-1,-1},
-{3365226,3870277,3870043,-1,-1},
-{3365227,3870223,3870277,-1,-1},
-{3365228,3870650,3870440,-1,-1},
-{3365229,3870208,3870440,-1,-1},
-{3365230,3869660,3869594,-1,0.013965},
-{3365231,3869594,3869038,-1,0.137025},
-{3365232,3869594,3869545,-1,-1},
-{3365233,3869585,3869545,-1,-1},
-{3365234,3870181,3869585,-1,-1},
-{3365235,3869545,3869463,-1,-1},
-{3365236,3869107,3869194,-1,0.0614093023255814},
-{3365237,3869194,3869267,-1,0.0709714285714286},
-{3365238,3869463,3869194,-1,-1},
-{3365239,3869463,3869482,-1,-1},
-{3365240,3869482,3869585,-1,-1},
-{3365241,3870082,3869297,0.144230769230769,-1},
-{3365242,3869297,3869267,0.00692222222222222,-1},
-{3365243,3869482,3869297,-1,-1},
-{3365244,3869716,3869634,0.0143466666666667,-1},
-{3365245,3869634,3868994,0.177216666666667,-1},
-{3365246,3870285,3869318,-1,0.214428571428571},
-{3365247,3869318,3869279,-1,0.00738666666666667},
-{3365248,3869032,3869114,0.0810705882352941,-1},
-{3365249,3869114,3869196,0.0901777777777778,-1},
-{3365250,3874402,3873803,-1,0.220090909090909},
-{3365251,3873803,3873006,-1,0.2199},
-{3365252,3873782,3873745,-1,-1},
-{3365253,3874199,3873917,0.0814163265306122,-1},
-{3365254,3873917,3873462,0.207,-1},
-{3365255,3874444,3874210,0.6027,-1},
-{3365256,3874210,3874199,0.0252260869565217,-1},
-{3365257,3873782,3873903,-1,-1},
-{3365258,3873903,3873917,-1,-1},
-{3365259,3874210,3873903,-1,-1},
-{3365260,3873794,3873782,-1,-1},
-{3365261,3873903,3873794,-1,-1},
-{3365262,3873745,3873633,-1,-1},
-{3365263,3873633,3873794,-1,-1},
-{3365264,3872927,3872755,0.273666666666667,-1},
-{3365265,3872755,3872714,0.0653076923076923,-1},
-{3365266,3873006,3872595,0.327042857142857,0.3522},
-{3365267,3872595,3872493,0.0757111111111111,0.085175},
-{3365268,3873633,3873103,-1,-1},
-{3365269,3873103,3872755,-1,-1},
-{3365270,3872595,3872939,-1,-1},
-{3365271,3872939,3873118,-1,-1},
-{3365272,3873118,3873103,-1,-1},
-{3365273,3872939,3873245,-1,-1},
-{3365274,3873245,3873118,-1,-1},
-{3365275,3873803,3873828,-1,-1},
-{3365276,3873828,3873815,-1,-1},
-{3365277,3873815,3873771,-1,-1},
-{3365278,3873771,3873815,-1,-1},
-{3365279,3873245,3873546,-1,-1},
-{3365280,3873546,3873828,-1,-1},
-{3365281,3873771,3873755,-1,-1},
-{3365282,3873755,3873745,-1,-1},
-{3365283,3873546,3873755,-1,-1},
-{3365284,3873766,3873839,0.0348279069767442,0.0348279069767442},
-{3365285,3873839,3874161,0.27488,0.28766511627907},
-{3365286,3873256,3873628,0.185385,0.190138461538462},
-{3365287,3873628,3873733,0.0510714285714286,0.0510714285714286},
-{3365289,3873091,3872865,-1,0.0811764705882353},
-{3365290,3872865,3872729,-1,0.03996},
-{3365291,3873475,3873364,-1,0.0276266666666667},
-{3365292,3873364,3873091,-1,0.0647217391304348},
-{3365293,3872865,3873364,-1,-1},
-{3365296,3874386,3873841,0.179610810810811,-1},
-{3365297,3873841,3873042,0.234745945945946,-1},
-{3365298,3874175,3873924,-1,0.0775066666666667},
-{3365299,3873924,3873482,-1,0.121426666666667},
-{3365300,3872978,3872811,0.0433733333333333,-1},
-{3365301,3872811,3872671,0.0288521739130435,-1},
-{3365302,3873518,3873399,0.0317302325581395,-1},
-{3365303,3873399,3873217,0.04184,-1},
-{3365307,3863309,3863477,0.176285714285714,0.137111111111111},
-{3365308,3863477,3863539,0.0456375,0.0260785714285714},
-{3365309,3863563,3863464,0.030352380952381,-1},
-{3365310,3863616,3863532,-1,0.0339639344262295},
-{3365311,3863477,3863467,-1,-1},
-{3365312,3863467,3863485,-1,-1},
-{3365313,3863485,3863573,-1,-1},
-{3365314,3863573,3863534,-1,-1},
-{3365318,3872317,3872286,0.0575,0.06},
-{3365319,3872286,3872309,0.014328,0.0137769230769231},
-{3365320,3872144,3872286,-1,-1},
-{3365323,3873808,3873788,0.00668333333333333,0.00729090909090909},
-{3365324,3873788,3873751,0.0114833333333333,0.0125272727272727},
-{3365325,3873600,3873788,-1,-1},
-{3365326,3879622,3879612,-1,0.0320322580645161},
-{3365327,3879612,3879619,-1,0.0403928571428571},
-{3365328,3879612,3879649,-1,-1},
-{3365329,3879649,3879673,-1,-1},
-{3365330,3879673,3880641,-1,-1},
-{3365331,3879673,3880077,-1,-1},
-{3365332,3880623,3880633,-1,-1},
-{3365333,3880633,3881014,-1,-1},
-{3365334,3880077,3880633,-1,-1},
-{3365337,3882406,3882523,-1,0.0173194029850746},
-{3365338,3882523,3882560,-1,0.00638507462686567},
-{3365339,3882022,3882592,-1,0.232703225806452},
-{3365340,3882592,3882613,-1,0.0260571428571429},
-{3365341,3882318,3882606,0.1844,-1},
-{3365342,3882606,3882636,0.0156,-1},
-{3365343,3882463,3882592,-1,-1},
-{3365344,3882592,3882606,-1,-1},
-{3365345,3882606,3882523,-1,-1},
-{3365350,3871822,3872492,0.282088888888889,0.362685714285714},
-{3365351,3872492,3872009,0.236845161290323,0.271933333333333},
-{3365352,3872492,3873287,-1,-1},
-{3365353,3873503,3873579,-1,-1},
-{3365354,3873579,3873716,-1,-1},
-{3365355,3873287,3873579,-1,-1},
-{3365357,3873579,3873719,-1,-1},
-{3365359,3873719,3873717,-1,-1},
-{3365360,3865290,3865383,0.0516272727272727,-1},
-{3365361,3865383,3865528,0.09207,-1},
-{3365363,3868454,3868401,0.027225,0.0297},
-{3365364,3868401,3868060,0.15622,0.213027272727273},
-{3365365,3867845,3868401,-1,-1},
-{3365366,3866788,3866595,-1,-1},
-{3365369,3865531,3865440,0.0659052631578947,-1},
-{3365370,3865440,3865339,0.09645,-1},
-{3365371,3865730,3865440,-1,-1},
-{3365372,3865730,3866292,-1,-1},
-{3365373,3866292,3866618,-1,-1},
-{3365374,3866788,3866518,-1,-1},
-{3365375,3866518,3865730,-1,-1},
-{3365376,3866292,3867082,-1,-1},
-{3365377,3866518,3867082,-1,-1},
-{3365378,3867404,3867365,0.0124933333333333,0.0119617021276596},
-{3365379,3867365,3866618,0.235533333333333,0.230413043478261},
-{3365380,3867082,3867365,-1,-1},
-{3365381,3867082,3867120,-1,-1},
-{3365382,3867120,3867845,-1,-1},
-{3365383,3867404,3867120,-1,-1},
-{3365384,3867845,3866803,-1,-1},
-{3365385,3866803,3866788,-1,-1},
-{3365386,3867120,3866803,-1,-1},
-{3365387,3865383,3865437,-1,-1},
-{3365388,3865437,3866292,-1,-1},
-{3365389,3865312,3865316,-1,0.00658867924528302},
-{3365390,3865316,3865339,-1,0.0506769230769231},
-{3365391,3865437,3865316,-1,-1},
-{3366056,3864861,3865352,0.26285,0.2253},
-{3366057,3865352,3865911,0.225066666666667,0.279393103448276},
-{3366058,3865352,3864975,0.180333333333333,0.180333333333333},
-{3366073,3866404,3866392,0.0769153846153846,0.0769153846153846},
-{3366074,3866392,3866379,0.0606230769230769,0.065675},
-{3366075,3867874,3867815,0.26322,0.26322},
-{3366076,3867815,3867754,0.217771428571429,0.217771428571429},
-{3366077,3866392,3866946,0.191022222222222,0.191022222222222},
-{3366078,3866946,3867815,0.330244444444444,0.330244444444444},
-{3366079,3866345,3866946,0.340711111111111,0.340711111111111},
-{3366224,3849152,3848980,0.1829625,0.1829625},
-{3366225,3848980,3848972,0.0358615384615385,0.0358615384615385},
-{3366226,3874966,3874841,0.2559,-1},
-{3366227,3874841,3874774,0.0813923076923077,-1},
-{3366228,3874533,3874396,-1,0.365957142857143},
-{3366229,3874396,3874345,-1,0.085425},
-{3366230,3874841,3874396,0.187733333333333,0.187733333333333},
-{3366231,3875073,3875441,-1,-1},
-{3366232,3875441,3875716,0.144690909090909,0.144690909090909},
-{3366233,3875430,3875447,0.0386666666666667,0.0386666666666667},
-{3366234,3875447,3875441,0.0226363636363636,0.0226363636363636},
-{3366235,3875132,3875357,-1,-1},
-{3366236,3875357,3875727,-1,-1},
-{3366237,3877633,3877594,0.0105,0.012},
-{3366238,3877594,3877054,0.176545454545455,0.215777777777778},
-{3366239,3877251,3877233,-1,-1},
-{3366240,3877233,3877197,-1,-1},
-{3366241,3877233,3877446,-1,-1},
-{3366242,3877446,3877594,-1,-1},
-{3366243,3875727,3875762,-1,-1},
-{3366244,3875727,3875952,-1,-1},
-{3366245,3876193,3876189,0.0221272727272727,0.0221272727272727},
-{3366246,3875909,3876189,-1,-1},
-{3366247,3876215,3876265,-1,-1},
-{3366248,3876189,3876215,-1,-1},
-{3366249,3876265,3877233,-1,-1},
-{3366250,3875532,3875747,-1,-1},
-{3366251,3875747,3875762,-1,-1},
-{3366252,3875762,3875909,-1,-1},
-{3366253,3863618,3863585,0.023295652173913,0.0255142857142857},
-{3366254,3863585,3863490,0.0490173913043478,0.05637},
-{3366255,3863585,3864479,-1,-1},
-{3366267,3897945,3898004,-1,-1},
-{3366268,3898004,3898054,-1,-1},
-{3366269,3898054,3898103,0.0379894736842105,0.0379894736842105},
-{3366270,3898103,3898166,0.0829714285714286,0.0829714285714286},
-{3366927,3881611,3881648,-1,0.026175},
-{3366928,3881648,3881710,-1,0.0616285714285714},
-{3366929,3881648,3881631,0.0198631578947368,-1},
-{3366930,3881631,3881563,0.04806,-1},
-{3366983,3882385,3882510,0.0192434782608696,-1},
-{3366984,3882510,3882640,0.0207826086956522,-1},
-{3367621,3866378,3866336,0.115485714285714,0.115485714285714},
-{3367622,3866336,3866395,0.185288888888889,0.185288888888889},
-{3367839,3870350,3869994,-1,0.319090909090909},
-{3367840,3869994,3869885,0.0407555555555556,0.0407555555555556},
-{3367841,3870073,3869971,0.0406181818181818,-1},
-{3367842,3869971,3869885,0.0269612903225806,-1},
-{3367843,3869994,3869971,-1,0.106690909090909},
-{3367853,3870353,3870346,0.0214,-1},
-{3367854,3870346,3870204,0.0516888888888889,0.0516888888888889},
-{3367967,3866333,3866289,0.0099063829787234,0.0099063829787234},
-{3367968,3866289,3866024,0.0568851063829787,0.0581217391304348},
-{3367970,3866695,3866378,0.058524,0.0609625},
-{3367971,3866378,3866333,0.00677872340425532,0.00677872340425532},
-{3368013,3872879,3873059,0.0764222222222222,0.0764222222222222},
-{3368018,3873657,3873666,0.0110547945205479,0.0118676470588235},
-{3368019,3873666,3873683,0.0834,0.0881657142857143},
-{3368020,3873598,3873881,0.115915384615385,0.273981818181818},
-{3368021,3873881,3874017,0.0639,0.0755181818181818},
-{3368022,3873666,3873688,0.04428,-1},
-{3368023,3873688,3873785,0.29208,-1},
-{3368024,3873785,3874017,0.6174,0.6174},
-{3368025,3873881,3873785,-1,0.47196},
-{3368700,3859682,3859517,-1,-1},
-{3368701,3859517,3859303,-1,-1},
-{3368702,3859517,3860297,-1,-1},
-{3368843,3905770,3905886,0.0306923076923077,0.0316666666666667},
-{3368928,3865357,3865397,0.0183927272727273,0.0177473684210526},
-{3369009,3921416,3921453,0.0066,0.00639047619047619},
-{3369010,3921453,3921479,0.00378688524590164,0.00366666666666667},
-{3369011,3921930,3921960,0.012190243902439,0.0128153846153846},
-{3369012,3921960,3921992,0.012945,0.0136263157894737},
-{3369013,3921780,3921831,0.0249,0.0256545454545455},
-{3369014,3921831,3921950,0.0412971428571429,0.0425117647058824},
-{3369015,3918370,3918388,0.00767272727272727,0.00844},
-{3369016,3918388,3918452,0.0190058823529412,0.0208451612903226},
-{3369017,3918014,3918426,0.161770909090909,0.156094736842105},
-{3369035,3900812,3900773,0.0529666666666667,0.0529666666666667},
-{3369036,3900773,3900726,0.0272,0.0386526315789474},
-{3369037,3896794,3896955,0.04602,0.0473735294117647},
-{3369038,3896955,3897549,0.252197260273973,0.266817391304348},
-{3369039,3894704,3894738,0.0184857142857143,-1},
-{3369040,3894738,3894825,0.0625,-1},
-{3369041,3894704,3894715,-1,0.0219},
-{3369042,3894715,3894743,-1,0.058632},
-{3369043,3890174,3890115,0.0462631578947368,0.0976666666666667},
-{3369044,3894733,3894534,0.0532705882352941,0.054336},
-{3369045,3899650,3899227,0.227272727272727,0.227272727272727},
-{3369046,3899227,3899134,0.0371818181818182,0.0371818181818182},
-{3369047,3900866,3900872,0.009571875,0.0105620689655172},
-{3369048,3900872,3900881,0.010584375,0.0114813559322034},
-{3369056,3868404,3868368,0.0197714285714286,0.0230666666666667},
-{3369057,3868368,3867854,0.246377777777778,0.246377777777778},
-{3369058,3868598,3868379,-1,0.0466565217391304},
-{3369059,3868379,3868288,-1,0.0260142857142857},
-{3369060,3868525,3868363,0.036,-1},
-{3369061,3868363,3868261,0.0263581395348837,-1},
-{3369062,3866319,3866250,0.02688,0.028},
-{3369063,3866250,3866226,0.00881538461538462,0.009168},
-{3369071,3865860,3865922,0.0429333333333333,0.0429333333333333},
-{3369072,3865922,3867199,0.509933333333333,0.509933333333333},
-{3369075,3865397,3865680,0.177452830188679,0.174166666666667},
-{3369076,3872667,3873010,0.209296551724138,0.2529},
-{3369077,3872815,3873090,0.20044,0.111355555555556},
-{3369078,3873090,3873120,0.015575,0.01168125},
-{3369079,3871160,3871270,0.0352163265306122,0.0375130434782609},
-{3369080,3871270,3871306,0.009084,0.00966382978723404},
-{3369081,3869340,3869827,-1,-1},
-{3369082,3867959,3868097,-1,-1},
-{3369083,3868097,3868287,-1,-1},
-{3369084,3868226,3867962,-1,-1},
-{3369085,3849626,3849614,0.0708315789473684,0.06729},
-{3369086,3849614,3849860,0.20439,0.215147368421053},
-{3369087,3854739,3854675,0.0870444444444445,0.097925},
-{3369088,3854675,3854647,0.06204,0.0517},
-{3369089,3900123,3900177,0.0254210526315789,-1},
-{3369094,3909727,3909551,0.0542631578947368,0.0542631578947368},
-{3369095,3909551,3909507,0.0136421052631579,0.0136421052631579},
-{3369098,3895760,3896021,-1,-1},
-{3369099,3896021,3896239,-1,-1},
-{3369100,3895643,3896691,0.262054838709677,-1},
-{3369101,3896691,3897835,0.277028571428571,-1},
-{3369102,3895915,3896748,-1,0.21851},
-{3369103,3896748,3897857,-1,0.278843076923077},
-{3369104,3901828,3903179,0.312152941176471,0.30037358490566},
-{3369105,3903179,3903378,0.04855,0.0456941176470588},
-{3369107,3900025,3900123,0.0435413793103448,-1},
-{3369108,3899865,3899983,-1,0.0710068965517241},
-{3369110,3902123,3902196,0.0190243902439024,-1},
-{3369111,3901249,3901380,-1,-1},
-{3369112,3901380,3901497,-1,-1},
-{3369113,3900685,3900925,0.085935,0.073136170212766},
-{3369114,3899120,3899374,0.101417647058824,0.10775625},
-{3369124,3885699,3885856,0.15372,0.096075},
-{3369125,3866233,3865469,-1,-1},
-{3369126,3865469,3863689,-1,-1},
-{3369127,3864222,3865279,0.273741818181818,-1},
-{3369128,3890115,3889735,0.275715789473684,0.476236363636364},
-{3369129,3889735,3890270,0.605555555555556,0.605555555555556},
-{3369130,3865255,3864236,0.316905882352941,-1},
-{3369131,3864166,3863639,-1,-1},
-{3369132,3863639,3862737,-1,-1},
-{3369133,3865048,3864445,-1,0.248610810810811},
-{3369134,3865024,3864529,0.163153846153846,-1},
-{3369135,3867714,3867564,-1,0.0678206896551724},
-{3369136,3867763,3867604,0.0537085714285714,-1},
-{3369137,3869749,3869812,0.185127272727273,-1},
-{3369138,3869879,3869812,0.0265548387096774,-1},
-{3369139,3869879,3869886,-1,0.0400444444444444},
-{3369140,3870117,3869886,-1,0.09564},
-{3369141,3875078,3874980,0.201463636363636,-1},
-{3369142,3875124,3875035,-1,0.136163636363636},
-{3369143,3877202,3877642,-1,0.10788},
-{3369144,3878372,3878333,0.2125,-1},
-{3369145,3878428,3878406,-1,0.14304},
-{3369146,3880625,3881506,0.277004651162791,-1},
-{3369147,3882769,3882652,-1,0.107925},
-{3369148,3858406,3858389,0.0253392857142857,0.0267735849056604},
-{3369149,3858389,3858386,0.00544210526315789,0.00585283018867925},
-{3369150,3862280,3862229,0.0423833333333333,0.0423833333333333},
-{3369151,3863788,3863196,0.157003846153846,-1},
-{3369152,3895430,3895608,-1,0.058825},
-{3369153,3895608,3895822,-1,0.0574530612244898},
-{3369154,3895485,3895657,0.0632,-1},
-{3369155,3895657,3896146,0.14844,-1},
-{3369156,3896563,3896657,0.0483692307692308,0.0483692307692308},
-{3369157,3895226,3895452,-1,-1},
-{3369172,3883349,3883702,-1,-1},
-{3369173,3883702,3884023,-1,-1},
-{3369174,3881800,3881903,0.0418961538461538,0.0427176470588235},
-{3369175,3881903,3881939,0.011568,0.011568},
-{3369189,3886067,3885548,0.225278571428571,0.242607692307692},
-{3369190,3885548,3885191,0.212044444444444,0.212044444444444},
-{3369191,3889337,3889432,0.0414545454545455,0.0456},
-{3369192,3889432,3889464,0.0187333333333333,0.0183260869565217},
-{3369193,3888071,3888359,0.117624,0.133663636363636},
-{3369194,3888359,3888450,0.0342452830188679,0.0378125},
-{3369195,3891025,3891107,0.0644926829268293,-1},
-{3369196,3891107,3891284,0.066725,-1},
-{3369197,3891025,3891184,-1,0.0694304347826087},
-{3369198,3891184,3891284,-1,0.0595733333333333},
-{3369199,3885331,3885303,0.08358,0.0759818181818182},
-{3369200,3885303,3885289,0.161151724137931,0.166907142857143},
-{3369201,3887235,3887293,0.0307538461538461,-1},
-{3369202,3887293,3887326,0.017055,-1},
-{3369203,3887531,3887431,0.0331813953488372,-1},
-{3369204,3887431,3887412,0.0123,-1},
-{3369205,3889738,3889232,0.212142857142857,-1},
-{3369206,3889232,3889246,0.00807428571428571,-1},
-{3369207,3890369,3889255,-1,0.379492307692308},
-{3369208,3889255,3889246,-1,0.0096},
-{3369209,3894823,3894268,0.327575,0.327575},
-{3369210,3894268,3894198,0.0356222222222222,0.0356222222222222},
-{3369211,3900606,3900644,-1,0.0265263157894737},
-{3369212,3900644,3900681,-1,0.0506625},
-{3369213,3903078,3903267,0.10351,0.105264406779661},
-{3369214,3902445,3902536,0.0449727272727273,0.041225},
-{3369215,3902536,3902589,0.02352,0.0276705882352941},
-{3369216,3901306,3901333,0.00934615384615385,0.00972},
-{3369217,3901333,3901368,0.0211846153846154,0.0262285714285714},
-{3369218,3903989,3904334,0.14856,0.171415384615385},
-{3369219,3904334,3904346,0.005064,0.00602857142857143},
-{3369220,3907488,3907177,0.0869189189189189,0.0804},
-{3369221,3907177,3907116,0.0144342857142857,0.0129538461538462},
-{3369222,3905751,3905907,0.0876631578947368,0.0489882352941177},
-{3369223,3905907,3905973,0.0373428571428571,0.02614},
-{3372867,3870605,3870782,0.292,0.292},
-{3372868,3870782,3871051,-1,-1},
-{3372911,3883889,3883177,-1,-1},
-{3372912,3883177,3883345,-1,-1},
-{3372913,3882564,3883030,0.269034782608696,-1},
-{3372914,3883030,3883054,0.00936428571428571,-1},
-{3372915,3883177,3883030,-1,-1},
-{3372916,3884967,3885354,-1,-1},
-{3372917,3885354,3885370,-1,-1},
-{3372918,3885713,3885781,-1,-1},
-{3372919,3885781,3885850,-1,-1},
-{3372920,3885317,3885781,-1,-1},
-{3372921,3885354,3885318,-1,-1},
-{3372922,3885318,3885317,-1,-1},
-{3372923,3885012,3885318,-1,-1},
-{3372924,3885317,3885012,-1,-1},
-{3372925,3885354,3885384,-1,-1},
-{3372926,3885317,3885012,-1,-1},
-{3372927,3889368,3889882,-1,0.306675},
-{3372928,3889565,3889599,0.02832,-1},
-{3372929,3889599,3889882,0.24393,-1},
-{3372930,3889882,3889662,-1,-1},
-{3372931,3889662,3889470,-1,-1},
-{3372932,3889470,3889599,-1,-1},
-{3372933,3889662,3889475,-1,-1},
-{3372934,3889475,3889470,-1,-1},
-{3372935,3889338,3889368,-1,0.0246272727272727},
-{3372936,3889475,3889338,-1,-1},
-{3372937,3889010,3889028,-1,0.0174315789473684},
-{3372938,3889028,3889338,-1,0.225027272727273},
-{3372939,3889475,3889028,-1,-1},
-{3372940,3891395,3891349,0.1968,0.1968},
-{3372941,3891086,3891097,-1,-1},
-{3372942,3891097,3891266,-1,-1},
-{3372943,3891266,3891395,-1,-1},
-{3372944,3890541,3890899,0.1554,0.1554},
-{3372945,3890899,3891349,0.218577777777778,0.218577777777778},
-{3372946,3891266,3890899,-1,-1},
-{3372947,3891485,3891444,0.0676222222222222,0.0676222222222222},
-{3372948,3891444,3891395,0.0808888888888889,0.0808888888888889},
-{3372949,3893100,3893592,-1,-1},
-{3372950,3893000,3893309,-1,0.216725},
-{3372951,3893309,3893787,-1,0.177790909090909},
-{3372952,3893100,3893309,-1,-1},
-{3372953,3893141,3893362,0.150066666666667,-1},
-{3372954,3893362,3893831,0.218333333333333,-1},
-{3372955,3891444,3891831,-1,-1},
-{3372956,3892851,3893100,-1,-1},
-{3372957,3891831,3892697,-1,-1},
-{3372958,3892697,3892851,-1,-1},
-{3372959,3891831,3892873,-1,-1},
-{3372960,3892873,3892851,-1,-1},
-{3372961,3892697,3892873,-1,-1},
-{3372962,3889636,3889627,0.0147428571428571,0.012384},
-{3372963,3889627,3889466,0.224496,0.23385},
-{3372964,3889092,3889055,0.01125,0.013125},
-{3372965,3889055,3888330,0.216377142857143,0.270471428571429},
-{3372966,3888330,3888266,0.0213483870967742,0.0194647058823529},
-{3372967,3888266,3888064,0.0673875,0.0673875},
-{3372968,3889627,3888722,-1,-1},
-{3372969,3888722,3888677,-1,-1},
-{3372970,3888677,3889055,-1,-1},
-{3372971,3888266,3888530,-1,-1},
-{3372972,3888530,3888722,-1,-1},
-{3372973,3888677,3888530,-1,-1},
-{3372974,3878668,3878890,0.203957142857143,0.158633333333333},
-{3372975,3878890,3878962,0.0525176470588235,0.0469894736842105},
-{3372976,3878778,3878918,0.08667,-1},
-{3372977,3878918,3879034,0.08136,-1},
-{3372978,3878890,3878918,-1,-1},
-{3372979,3878554,3878563,-1,-1},
-{3372980,3878563,3878668,-1,-1},
-{3372981,3878668,3878540,0.07215,0.103071428571429},
-{3372982,3878540,3878226,0.1822,0.2733},
-{3372983,3878563,3878266,-1,-1},
-{3372984,3878266,3878540,-1,-1},
-{3372985,3878266,3878106,-1,-1},
-{3372986,3878106,3877634,-1,-1},
-{3372987,3877634,3877726,-1,0.50064},
-{3372988,3877726,3877745,-1,0.0528947368421053},
-{3372989,3878106,3877726,-1,-1},
-{3372990,3875527,3875483,-1,-1},
-{3372991,3875483,3875236,-1,-1},
-{3372992,3875483,3875236,-1,-1},
-{3372993,3875948,3875649,0.13585,-1},
-{3372994,3875649,3875560,0.0479052631578947,-1},
-{3372995,3875948,3876015,-1,0.110475},
-{3372996,3876015,3875997,-1,0.06655},
-{3372997,3875649,3876015,-1,-1},
-{3372998,3876017,3876154,-1,0.14012},
-{3372999,3876154,3876266,-1,0.22568},
-{3373000,3875755,3876154,-1,-1},
-{3373002,3879206,3879069,0.138733333333333,0.138733333333333},
-{3373003,3879377,3879206,-1,-1},
-{3373004,3881424,3881125,0.147664285714286,-1},
-{3373005,3881125,3881083,0.0164444444444444,-1},
-{3373006,3881125,3881391,-1,-1},
-{3373007,3881391,3881459,-1,-1},
-{3373008,3881459,3881391,-1,-1},
-{3373009,3875718,3875755,0.0333454545454545,0.0333454545454545},
-{3373010,3875755,3875761,0.00637714285714286,0.00656470588235294},
-{3373011,3874416,3874357,0.136069565217391,0.136069565217391},
-{3373012,3874357,3874338,0.0793846153846154,0.0469090909090909},
-{3373013,3873845,3874357,-1,-1},
-{3373015,3876002,3874467,1.5442,1.5442},
-{3373016,3874357,3874806,-1,-1},
-{3373017,3874806,3876002,-1,-1},
-{3373018,3874561,3874557,0.8596,0.7368},
-{3373019,3874557,3874416,0.567969230769231,0.3516},
-{3373020,3874806,3874557,-1,-1},
-{3373021,3870448,3870467,0.0794666666666667,0.0794666666666667},
-{3373022,3870467,3870497,0.113466666666667,0.113466666666667},
-{3373023,3870171,3870467,-1,-1},
-{3373024,3871985,3871984,0.012,-1},
-{3373025,3871984,3871961,0.142388571428571,-1},
-{3373026,3871984,3872569,-1,-1},
-{3373027,3872855,3872844,0.045472131147541,0.0523358490566038},
-{3373028,3872623,3872655,-1,0.0454173913043478},
-{3373029,3872655,3872669,-1,0.0184046511627907},
-{3373030,3869308,3869064,0.0973714285714286,0.09088},
-{3373031,3869064,3868949,0.0421548387096774,0.0396},
-{3373032,3869308,3869230,0.227844444444444,0.227844444444444},
-{3373033,3869230,3869208,0.0297777777777778,0.0297777777777778},
-{3373034,3869293,3869230,-1,-1},
-{3373035,3869230,3869064,-1,-1},
-{3373036,3865507,3865314,0.137242105263158,0.162975},
-{3373037,3865314,3864948,0.201845454545455,0.170792307692308},
-{3373038,3866027,3865514,-1,-1},
-{3373039,3865514,3865314,-1,-1},
-{3373040,3865214,3864948,-1,-1},
-{3373041,3864936,3865198,0.06588,-1},
-{3373042,3865198,3866122,0.31222,-1},
-{3373043,3865214,3865187,-1,-1},
-{3373044,3865187,3865198,-1,-1},
-{3373045,3865514,3865405,-1,-1},
-{3373046,3865405,3865214,-1,-1},
-{3373047,3865187,3865405,-1,-1},
-{3373048,3865076,3865201,-1,0.02928},
-{3373049,3865201,3865871,-1,0.194108571428571},
-{3373050,3888327,3888444,-1,0.03968},
-{3373051,3888444,3888665,-1,0.07172},
-{3373054,3889707,3889340,0.138462857142857,0.134616666666667},
-{3373055,3889340,3889316,0.00845142857142857,0.00799459459459459},
-{3373057,3888665,3888819,-1,0.0591777777777778},
-{3373058,3888819,3888872,-1,0.021336},
-{3373059,3888444,3888642,-1,-1},
-{3373060,3888819,3888642,-1,-1},
-{3373061,3888642,3888679,-1,-1},
-{3373062,3888679,3888773,-1,-1},
-{3373063,3888937,3889003,-1,-1},
-{3373064,3889003,3889340,-1,-1},
-{3373065,3889003,3889748,-1,-1},
-{3373072,3890112,3890158,0.0146341463414634,0.0162162162162162},
-{3373073,3890158,3890207,0.0180585365853659,0.0200108108108108},
-{3373074,3890094,3890158,-1,-1},
-{3373088,3888642,3888820,-1,-1},
-{3374548,3919281,3919382,0.04689375,0.037515},
-{3375004,3919192,3918598,0.189188888888889,-1},
-{3375005,3918598,3918247,0.129790476190476,-1},
-{3375007,3918247,3918202,0.0248958904109589,-1},
-{3375008,3918202,3917929,0.127566233766234,-1},
-{3375018,3851089,3850826,0.0878195121951219,-1},
-{3375019,3850826,3850740,0.0284057142857143,-1},
-{3375020,3858867,3858415,-1,0.05962},
-{3375021,3861161,3860782,-1,0.0801081081081081},
-{3375022,3860782,3860691,-1,0.0173922077922078},
-{3375148,3916249,3916583,0.0751324675324675,-1},
-{3375149,3916583,3916771,0.0490538461538462,-1},
-{3375189,3922117,3922706,0.12103125,0.117363636363636},
-{3375190,3922706,3922922,0.0573969230769231,0.0556835820895522},
-{3375236,3902011,3901991,0.0240461538461538,0.0271826086956522},
-{3375263,3851116,3851245,0.0384166666666667,-1},
-{3375264,3851245,3850696,0.27205,-1},
-{3375316,3850015,3849512,-1,0.0942347826086957},
-{3375321,3887209,3887343,-1,0.266185714285714},
-{3375322,3887343,3887396,-1,0.0711428571428571},
-{3375323,3887209,3887030,0.089275,-1},
-{3375324,3887030,3886676,0.276993103448276,-1},
-{3375325,3890408,3890379,-1,0.081825},
-{3375326,3890327,3890379,0.02592,0.0189},
-{3375327,3890379,3890676,0.126177272727273,0.118123404255319},
-{3375328,3890308,3890327,-1,0.02544},
-{3375341,3893307,3893278,0.0353333333333333,0.0334736842105263},
-{3375395,3919354,3919263,0.0236808510638298,-1},
-{3375396,3919263,3918867,0.141980769230769,-1},
-{3375435,3890393,3890494,0.0620625,0.0763846153846154},
-{3375436,3890267,3890370,0.0769111111111111,0.06489375},
-{3375437,3890370,3890393,0.02002,0.02002},
-{3375438,3890370,3890515,0.243423529411765,-1},
-{3375439,3890294,3890515,-1,0.0583224489795918},
-{3375440,3890515,3890704,-1,0.0540585365853659},
-{3375441,3890431,3890534,-1,0.1681875},
-{3375442,3890534,3890393,0.0669771428571429,-1},
-{3375443,3890585,3890647,0.0810857142857143,0.0532125},
-{3375444,3890647,3890664,0.0159,0.0123096774193548},
-{3375445,3890534,3890647,-1,0.110982857142857},
-{3375446,3890774,3890544,-1,0.0895354838709677},
-{3375447,3890544,3890447,-1,0.0453642857142857},
-{3375522,3901140,3901256,-1,0.0231183673469388},
-{3375523,3901256,3901412,-1,0.0368571428571429},
-{3375524,3900011,3900284,-1,0.124486956521739},
-{3375525,3900284,3900372,-1,0.0274764705882353},
-{3375527,3897788,3897852,-1,0.01896},
-{3375528,3897852,3897924,-1,0.0215538461538462},
-{3375529,3897794,3897858,0.0164297872340426,-1},
-{3375530,3897858,3897939,0.0194625,-1},
-{3375531,3896533,3897246,-1,0.168092307692308},
-{3375532,3893382,3894155,0.207703846153846,-1},
-{3375533,3893188,3893386,-1,0.05634},
-{3375534,3893386,3894157,-1,0.211294117647059},
-{3375540,3907326,3907451,-1,0.0412540540540541},
-{3375541,3907451,3907593,-1,0.0480972972972973},
-{3375542,3907159,3907427,0.0602705882352941,-1},
-{3375543,3907427,3907579,0.0367176470588235,-1},
-{3375544,3905750,3905895,-1,0.02739},
-{3375545,3905895,3906615,-1,0.168052631578947},
-{3375546,3905750,3905815,-1,0.0432},
-{3375547,3905815,3905869,0.0340071428571429,0.0453428571428571},
-{3375548,3905895,3905815,0.0449032258064516,-1},
-{3375549,3905707,3905852,0.02794,-1},
-{3375550,3905852,3906471,0.144760714285714,-1},
-{3375551,3903369,3903200,0.127938461538462,-1},
-{3375552,3903200,3903129,0.0544941176470588,-1},
-{3375553,3900670,3900831,-1,0.073741935483871},
-{3375554,3900831,3900885,-1,0.0164625},
-{3375555,3900885,3900944,-1,0.0298909090909091},
-{3375556,3900944,3900990,-1,0.0151},
-{3375557,3900990,3901233,-1,0.07797},
-{3375558,3900680,3900515,0.0365068965517241,-1},
-{3375559,3900413,3900473,0.018495,-1},
-{3375560,3900473,3900506,0.011553488372093,-1},
-{3375561,3896271,3896371,0.0689234042553191,-1},
-{3375562,3896371,3896522,0.0850163265306123,-1},
-{3375564,3899403,3899547,0.0943230769230769,-1},
-{3375565,3899547,3899683,0.0912,-1},
-{3375568,3900008,3899976,0.0500318181818182,-1},
-{3375569,3899976,3899933,0.0625333333333333,-1},
-{3375713,3897798,3897794,0.0213272727272727,0.0213272727272727},
-{3375719,3901165,3901356,0.039504,-1},
-{3375720,3901356,3901421,0.0159918367346939,-1},
-{3375783,3902275,3902403,0.029504347826087,-1},
-{3375784,3902403,3902618,0.0442212765957447,-1},
-{3376135,3916555,3916628,0.0248341463414634,0.0248341463414634},
-{3376136,3916628,3916895,0.165308108108108,0.156830769230769},
-{3376137,3916583,3916628,-1,-1},
-{3376138,3916254,3916517,-1,0.0611844155844156},
-{3376139,3916517,3916801,-1,0.0687721518987342},
-{3376169,3850858,3850273,0.25086,0.25086},
-{3376170,3850185,3850933,0.276781818181818,0.276781818181818},
-{3376171,3850933,3850858,0.1332,0.1332},
-{3376177,3858750,3858648,0.05396,0.0899333333333333},
-{3376178,3858648,3858326,0.215185714285714,-1},
-{3376179,3858648,3858629,0.02166,0.02166},
-{3376180,3858629,3858601,0.62982,0.62982},
-{3376181,3858601,3858629,0.07644,0.07644},
-{3376187,3903822,3904577,0.462244444444444,0.462244444444444},
-{3376188,3904577,3903935,0.413181818181818,0.37875},
-{3376189,3904666,3904577,0.0749052631578947,0.0677714285714286},
-{3376190,3898308,3898066,0.333428571428571,0.376451612903226},
-{3376191,3898066,3898026,0.0441567567567568,0.0441567567567568},
-{3376192,3898066,3896599,-1,-1},
-{3376193,3866260,3866241,0.143688888888889,0.143688888888889},
-{3376197,3869088,3868890,-1,-1},
-{3376198,3868890,3868425,-1,0.153578571428571},
-{3376199,3869530,3868891,0.135939130434783,0.164557894736842},
-{3376200,3868891,3867887,0.166768421052632,0.182803846153846},
-{3376201,3868890,3868891,0.0242647058823529,-1},
-{3376202,3867933,3867889,0.200155555555556,0.200155555555556},
-{3376203,3872370,3872890,0.14283,0.150347368421053},
-{3376204,3872890,3873693,0.276668571428571,0.261713513513514},
-{3376205,3872890,3872984,-1,-1},
-{3376206,3872984,3872943,-1,-1},
-{3376207,3872943,3872984,-1,-1},
-{3376209,3871455,3871368,0.319755555555556,0.319755555555556},
-{3376210,3871456,3871364,0.323088888888889,0.323088888888889},
-{3376213,3871740,3871727,0.0204818181818182,0.0200266666666667},
-{3376214,3871727,3871665,0.112112195121951,0.106897674418605},
-{3376215,3872279,3872248,0.2498,0.2498},
-{3376216,3871727,3872279,0.346714285714286,0.346714285714286},
-{3376217,3872282,3872279,-1,-1},
-{3376218,3874768,3872374,0.647615384615385,0.935444444444444},
-{3376219,3872374,3871913,0.322753846153846,0.14985},
-{3376220,3872282,3872374,-1,-1},
-{3376922,3885372,3885510,0.0456,-1},
-{3376923,3885510,3885638,0.041553488372093,-1},
-{3376939,3892441,3892551,0.028896,-1},
-{3376941,3892441,3892448,-1,-1},
-{3376942,3892448,3892480,-1,-1},
-{3376943,3892551,3892448,-1,-1},
-{3376945,3892432,3892547,-1,0.0460645161290323},
-{3376960,3896146,3896247,0.0282533333333333,-1},
-{3376961,3896307,3896368,-1,0.016524},
-{3376962,3896368,3896533,-1,0.0355058823529412},
-{3376963,3896247,3896624,0.0927061224489796,-1},
-{3376964,3896624,3897150,0.126588235294118,-1},
-{3377003,3899016,3899368,0.110897142857143,-1},
-{3377004,3899368,3899457,0.0306352941176471,-1},
-{3377005,3899816,3899728,0.113,-1},
-{3377006,3899728,3899707,0.0487609756097561,-1},
-{3377009,3898464,3898074,0.128364,-1},
-{3377010,3898074,3897856,0.0653035714285714,-1},
-{3377011,3897312,3896632,0.245811111111111,-1},
-{3377012,3896632,3896441,0.0747063829787234,-1},
-{3378858,3893382,3893386,-1,0.09138},
-{3378859,3890028,3890371,-1,0.134825806451613},
-{3378860,3890371,3890457,-1,0.03506},
-{3378881,3885589,3885784,-1,0.17738},
-{3378882,3885462,3885523,-1,0.0639555555555556},
-{3378883,3885523,3885544,-1,0.0224785714285714},
-{3378884,3885462,3885547,0.0434769230769231,-1},
-{3378885,3885523,3885547,0.0739384615384615,-1},
-{3378886,3885143,3885174,0.2598,0.2598},
-{3378887,3883642,3883505,0.1289,0.096675},
-{3378888,3883505,3883478,0.0146347826086957,0.02244},
-{3378889,3882411,3882914,0.223025,0.205869230769231},
-{3378890,3882914,3882990,0.034536,0.034536},
-{3378891,3882914,3882892,0.0392181818181818,0.0392181818181818},
-{3378892,3882892,3882928,-1,0.0459777777777778},
-{3378893,3881894,3881908,0.0423428571428571,0.0342},
-{3378894,3881908,3882012,0.0466666666666667,-1},
-{3378895,3882928,3882370,-1,0.662688888888889},
-{3378896,3882228,3882012,-1,0.317466666666667},
-{3378897,3882172,3881908,0.258214285714286,0.309857142857143},
-{3378898,3882228,3882172,0.0725333333333333,-1},
-{3378899,3882231,3882172,0.0536918918918919,0.0484536585365854},
-{3378900,3882231,3882858,-1,0.215505882352941},
-{3378901,3882892,3882267,0.438026666666667,0.4584},
-{3378902,3882267,3882231,0.02095,0.0271783783783784},
-{3378903,3882370,3882267,-1,0.0542888888888889},
-{3378904,3883505,3883405,0.568107692307692,0.568107692307692},
-{3378905,3883405,3883327,0.31501875,0.31501875},
-{3378906,3883405,3883542,0.05094375,0.05094375},
-{3378907,3885997,3885998,-1,0.0388909090909091},
-{3378908,3885784,3885997,-1,0.0483625},
-{3378909,3885784,3885996,-1,0.125133333333333},
-{3378910,3885990,3885996,0.0504,0.0425793103448276},
-{3378911,3885996,3885997,-1,0.0811368421052632},
-{3378912,3885989,3886012,0.059925,-1},
-{3378913,3886012,3885998,0.0945183673469388,-1},
-{3378914,3885547,3885802,0.0998068965517241,-1},
-{3378915,3885802,3885989,0.04935,-1},
-{3378916,3886012,3885802,-1,0.1513},
-{3378917,3883327,3882914,0.652168421052632,0.652168421052632},
-{3378920,3909163,3909654,0.207270967741935,0.178483333333333},
-{3378921,3909654,3909669,0.0172875,0.011064},
-{3378922,3893382,3894155,2.19252,-1},
-{3378923,3894835,3894837,-1,-1},
-{3378924,3894837,3894853,-1,-1},
-{3378925,3894837,3894722,-1,-1},
-{3378926,3894722,3894155,-1,-1},
-{3379727,3871954,3871794,0.0944769230769231,-1},
-{3379728,3871794,3871741,0.5229375,-1},
-{3379729,3871627,3871830,0.1822,0.1822},
-{3379730,3871830,3872002,0.0994714285714286,0.0994714285714286},
-{3379731,3871794,3871830,0.310666666666667,0.310666666666667},
-{3379738,3867394,3867495,0.046296,0.0723375},
-{3379739,3867495,3868865,0.66912,0.514707692307692},
-{3379740,3868865,3867495,1.44702,1.44702},
-{3379741,3868865,3869046,0.0710444444444444,0.0710444444444444},
-{3379742,3869046,3869685,-1,-1},
-{3379743,3872568,3872423,-1,-1},
-{3379744,3872423,3872317,0.0728222222222222,0.0728222222222222},
-{3379807,3877034,3877027,0.0290129032258064,0.035976},
-{3379808,3877027,3877314,0.154006451612903,0.140417647058824},
-{3379809,3877321,3877027,0.1468,-1},
-{3379810,3877411,3877034,-1,0.626873684210526},
-{3379811,3877542,3877928,0.305769230769231,0.305769230769231},
-{3379812,3877928,3877930,-1,0.185614285714286},
-{3379813,3867230,3867077,0.0547935483870968,0.0471833333333333},
-{3379814,3867077,3866503,0.279057142857143,0.18313125},
-{3379815,3866847,3866190,0.228911111111111,0.228911111111111},
-{3379816,3866190,3866117,-1,-1},
-{3379817,3867077,3866190,-1,-1},
-{3379820,3875313,3875207,0.116025,-1},
-{3379821,3875207,3875138,0.03888,-1},
-{3379827,3871210,3871158,-1,0.0186909090909091},
-{3379828,3871158,3870404,-1,0.252317647058824},
-{3379944,3880499,3880448,0.0219529411764706,-1},
-{3379945,3880448,3880075,0.173770588235294,-1},
-{3379946,3880441,3880448,0.06308,-1},
-{3379947,3880441,3880367,-1,0.0661714285714286},
-{3379948,3859890,3858867,-1,0.141557647058824},
-{3379949,3859838,3858835,0.150744303797468,-1},
-{3380089,3862109,3862160,0.0230117647058823,-1},
-{3380090,3862160,3862205,0.0197189189189189,-1},
-{3380091,3862160,3862222,0.0376909090909091,-1},
-{3380103,3880570,3880505,-1,0.05584},
-{3380104,3880505,3880367,-1,0.06538125},
-{3380126,3874694,3874974,0.205552941176471,-1},
-{3380127,3874974,3874948,0.03476,-1},
-{3380152,3892527,3892734,-1,-1},
-{3380155,3894853,3894858,-1,-1},
-{3380156,3894858,3892734,-1,-1},
-{3380157,3892734,3894858,-1,-1},
-{3380210,3859603,3859512,0.10985,-1},
-{3380211,3859512,3859567,0.08956,-1},
-{3380212,3878993,3879040,-1,0.0193448275862069},
-{3380213,3879040,3878990,0.0716,-1},
-{3380214,3879011,3878990,-1,0.0556846153846154},
-{3380215,3878990,3878993,-1,0.0234},
-{3380364,3886564,3886540,0.141888888888889,0.141888888888889},
-{3380365,3886540,3886532,-1,-1},
-{3380366,3886532,3886514,-1,-1},
-{3380367,3886514,3886461,0.260955555555556,0.260955555555556},
-{3380368,3886953,3886913,0.322833333333333,-1},
-{3380369,3886913,3886907,0.0474,0.0474},
-{3380370,3885874,3885848,-1,-1},
-{3380371,3885848,3885813,-1,-1},
-{3380642,3896767,3896714,0.02188,-1},
-{3380643,3896714,3895978,0.429991304347826,-1},
-{3380644,3896735,3896714,-1,0.030375},
-{3380645,3897119,3896784,-1,0.109786363636364},
-{3380646,3896784,3896735,-1,0.0206133333333333},
-{3380719,3860319,3860729,0.22158,0.265896},
-{3380720,3860729,3860759,0.0144774193548387,0.0166222222222222},
-{3380721,3860993,3860729,0.249352941176471,0.249352941176471},
-{3380747,3922392,3922585,0.0669954545454546,0.0627191489361702},
-{3380748,3922585,3922631,0.0107466666666667,0.010075},
-{3380749,3922585,3923081,0.403622222222222,0.403622222222222},
-{3380750,3914022,3915509,0.394317391304348,-1},
-{3380751,3915531,3915540,-1,-1},
-{3380752,3915540,3915671,-1,-1},
-{3380755,3889345,3889325,0.00764081632653061,0.00734117647058823},
-{3380756,3889325,3889273,0.017265306122449,0.0165882352941176},
-{3380757,3889462,3889408,0.0652434782608696,-1},
-{3380758,3889408,3889389,0.0594,-1},
-{3380759,3889241,3889408,0.051219512195122,-1},
-{3380760,3889531,3889447,-1,0.0400578947368421},
-{3380761,3889447,3889462,-1,0.0190838709677419},
-{3380762,3889408,3889447,0.011565,-1},
-{3380764,3900113,3899630,0.254577777777778,0.254577777777778},
-{3380765,3868048,3868923,0.350712,0.350712},
-{3380766,3868923,3868972,0.0264,0.0264},
-{3380767,3868923,3867751,0.469577777777778,0.469577777777778},
-{3380768,3890491,3890412,-1,0.0408},
-{3380776,3889751,3889931,0.0560368421052632,-1},
-{3380777,3889931,3889979,0.0154864864864865,-1},
-{3380778,3890028,3889931,-1,0.0440297872340426},
-{3380779,3890028,3889901,0.0402765957446809,-1},
-{3380780,3889901,3889885,0.0417375,-1},
-{3380781,3889885,3889831,-1,0.035775},
-{3380782,3889901,3889831,0.0226363636363636,-1},
-{3380783,3889831,3889696,0.0273214285714286,-1},
-{3380784,3889241,3889318,0.0244540540540541,-1},
-{3380785,3889318,3889389,0.0199846153846154,-1},
-{3380786,3889370,3889394,0.0375,-1},
-{3380787,3889394,3889438,0.0218625,-1},
-{3380789,3889885,3890235,0.149505882352941,-1},
-{3380790,3890235,3890412,0.0891272727272727,-1},
-{3380791,3889831,3889447,-1,0.0960576923076923},
-{3380820,3889318,3889394,0.04100625,-1},
-{3380890,3877504,3877448,-1,-1},
-{3380891,3877448,3877372,-1,-1},
-{3381934,3916494,3916776,0.168936,0.248435294117647},
-{3381935,3916776,3917264,0.300888888888889,0.300888888888889},
-{3381936,3916776,3916723,0.09156,0.09156},
-{3381937,3916723,3916651,0.65148,0.65148},
-{3381938,3916651,3916723,0.11604,0.11604},
-{3381939,3915049,3914976,0.73944,0.73944},
-{3381940,3915049,3914976,0.11556,0.11556},
-{3381941,3914772,3914861,0.16176,0.16176},
-{3381942,3914861,3915049,0.3324,0.3324},
-{3381943,3914976,3914861,0.2109,0.2109},
-{3381986,3867048,3866744,0.1746,0.184870588235294},
-{3381987,3867048,3867076,0.0202,0.0178235294117647},
-{3381992,3866007,3866506,0.342955555555556,0.342955555555556},
-{3381993,3865944,3865883,0.0783333333333333,0.0783333333333333},
-{3381996,3893379,3893682,0.2368,0.2368},
-{3382287,3885459,3885764,0.284025,-1},
-{3382288,3885764,3886025,0.201469565217391,-1},
-{3382289,3885764,3886320,0.234422222222222,0.234422222222222},
-{3382632,3915852,3916061,0.0830444444444444,0.0773172413793103},
-{3382633,3916061,3916742,0.246545454545455,0.246545454545455},
-{3382634,3916061,3916039,0.22938,0.22938},
-{3382635,3915509,3915787,0.154857142857143,0.191294117647059},
-{3382636,3915787,3915852,0.035472,0.0316714285714286},
-{3382637,3915787,3915767,0.20748,0.20748},
-{3382640,3917578,3917542,-1,0.07287},
-{3382643,3917542,3917515,-1,0.015925},
-{3382644,3917515,3917467,0.02134,0.0278347826086957},
-{3382645,3917716,3918389,-1,0.29672},
-{3382646,3917716,3917661,0.0626608695652174,-1},
-{3382647,3917661,3917655,0.0380068965517241,-1},
-{3382648,3917661,3917578,0.0466571428571428,-1},
-{3382652,3917708,3917791,0.0516166666666667,0.046455},
-{3382653,3917791,3917912,0.0557860465116279,0.0533066666666667},
-{3382654,3917791,3917626,0.103071428571429,-1},
-{3382655,3917515,3917572,0.0366,0.0261428571428571},
-{3382656,3917572,3917655,0.0463428571428571,0.0360444444444444},
-{3382657,3917626,3917572,0.0340285714285714,-1},
-{3382719,3876683,3876499,-1,-1},
-{3382720,3876499,3876222,0.225133333333333,0.225133333333333},
-{3382726,3876730,3876716,-1,-1},
-{3382727,3876716,3876683,-1,-1},
-{3382764,3897729,3897616,0.0794210526315789,0.0794210526315789},
-{3382765,3897616,3897617,-1,0.213507692307692},
-{3382947,3903113,3902939,-1,0.0490434782608696},
-{3382948,3902939,3902749,-1,0.0464347826086957},
-{3383000,3903860,3903936,0.052416,-1},
-{3383001,3903936,3903852,0.03496,-1},
-{3383002,3903852,3903860,0.0388444444444444,-1},
-{3383506,3886935,3886961,0.0113529411764706,-1},
-{3383507,3886961,3887189,0.078536170212766,-1},
-{3383624,3882872,3883053,0.253578947368421,-1},
-{3383625,3883053,3883360,0.342,-1},
-{3383626,3883053,3883136,0.10092,0.10092},
-{3383627,3882157,3882579,-1,0.251634782608696},
-{3383628,3882579,3882872,-1,0.163434782608696},
-{3383629,3882579,3882567,0.02394,0.02394},
-{3383634,3881518,3881808,-1,-1},
-{3383635,3881808,3881952,-1,-1},
-{3383639,3885792,3885891,0.0350647058823529,0.0340628571428571},
-{3383640,3885891,3886048,0.0560117647058823,0.0577090909090909},
-{3383641,3885891,3885912,0.02676,0.02676},
-{3383644,3884263,3884197,0.09948,0.09948},
-{3383645,3862469,3862586,0.0454444444444444,0.0454444444444444},
-{3383646,3862586,3863042,0.2082,0.2082},
-{3383647,3862586,3862571,0.55806,0.55806},
-{3383695,3883635,3883092,0.65985,-1},
-{3383696,3883092,3883021,0.0680842105263158,-1},
-{3383697,3883092,3883045,0.06156,0.06156},
-{3383714,3886157,3885870,-1,0.35765},
-{3383715,3885870,3885412,-1,0.302664},
-{3383716,3885870,3885906,0.0459,0.0459},
-{3383722,3881359,3880811,0.5288625,-1},
-{3383723,3880811,3880530,0.3177375,-1},
-{3383725,3880811,3880822,0.03192,0.03192},
-{3383770,3884381,3883818,0.359712,-1},
-{3383771,3883818,3883587,0.199231578947368,-1},
-{3383772,3883818,3883854,0.04854,0.04854},
-{3383782,3887606,3887534,-1,0.207235714285714},
-{3383783,3887534,3887433,-1,0.121938461538462},
-{3383784,3887534,3887495,0.02592,0.02592},
-{3383823,3882400,3882441,0.0196,0.0196},
-{3383824,3882441,3882572,0.14238,0.109523076923077},
-{3383825,3882441,3882439,0.02112,0.02112},
-{3383850,3880971,3881100,-1,0.166133333333333},
-{3383851,3881100,3881234,-1,0.306525},
-{3383852,3881100,3881153,0.0531,0.0531},
-{3383870,3885748,3885845,0.13737,-1},
-{3383871,3885845,3886077,0.233352,-1},
-{3383883,3881224,3881261,0.04206,0.04206},
-{3383962,3866320,3866065,-1,0.257592857142857},
-{3383963,3866065,3866000,-1,0.100663636363636},
-{3383964,3866065,3866156,0.0972,0.0972},
-{3384018,3878091,3877974,0.407775,-1},
-{3384019,3877974,3877918,0.159410526315789,-1},
-{3384020,3877974,3878007,0.03612,0.03612},
-{3384036,3877739,3877687,0.1491,0.1677375},
-{3384037,3877687,3877672,0.0772857142857143,0.08115},
-{3384041,3877687,3877827,0.13122,0.13122},
-{3384057,3877367,3877235,0.053295652173913,-1},
-{3384058,3877235,3877136,0.046368,-1},
-{3384059,3877235,3877222,0.09618,0.09618},
-{3384084,3866385,3866104,0.16794,0.3732},
-{3384085,3866104,3866138,0.03462,0.03462},
-{3384101,3866104,3865996,0.07602,0.0724},
-{3384102,3865996,3865626,0.3216,0.303733333333333},
-{3384104,3865996,3865963,0.05316,0.05316},
-{3384149,3878488,3878490,0.02394,0.02394},
-{3384214,3881830,3882053,0.197147368421053,-1},
-{3384215,3882053,3882201,0.126514285714286,-1},
-{3384216,3882053,3882035,0.04182,0.04182},
-{3384219,3879092,3879575,0.336054545454545,-1},
-{3384220,3879575,3879875,0.301010526315789,-1},
-{3384224,3879575,3879590,0.03144,0.03144},
-{3384225,3879225,3879667,-1,0.380778947368421},
-{3384226,3879667,3880056,-1,0.36951},
-{3384227,3879667,3879655,0.02964,0.02964},
-{3384228,3880893,3881019,0.112605882352941,-1},
-{3384229,3881019,3881175,0.134183333333333,-1},
-{3384234,3876891,3877098,0.282105882352941,-1},
-{3384235,3877098,3877376,0.355433333333333,-1},
-{3384236,3877098,3877056,0.04818,0.04818},
-{3384237,3879577,3879620,-1,0.0603391304347826},
-{3384238,3879620,3879844,-1,0.28515},
-{3384239,3879620,3879645,0.03396,0.03396},
-{3384273,3878484,3878597,0.1524,0.1524},
-{3384274,3878597,3878674,0.0866526315789474,0.0866526315789474},
-{3384275,3878597,3878539,0.0855,0.0855},
-{3384276,3887025,3886752,0.223747826086957,-1},
-{3384277,3886752,3886197,1.57990909090909,-1},
-{3384278,3886752,3886785,0.06174,0.06174},
-{3384679,3879381,3884090,2.76844444444444,2.76844444444444},
-{3384680,3884090,3885699,1.8728,1.77423157894737},
-{3384681,3884090,3882131,0.844266666666667,0.844266666666667},
-{3384682,3886082,3885937,0.43743,0.448646153846154},
-{3384683,3885937,3885597,0.271846153846154,0.1767},
-{3384684,3885937,3885326,0.51841935483871,0.51841935483871},
-{3384685,3885326,3884873,0.656742857142857,0.417927272727273},
-{3384686,3885623,3885834,0.911408219178082,0.924066666666667},
-{3384687,3885597,3885618,0.112097142857143,0.124552380952381},
-{3384688,3885618,3885623,0.0374083333333333,0.0396088235294118},
-{3384689,3885963,3885452,4.49804444444444,4.49804444444444},
-{3384690,3883434,3882191,0.494555555555556,0.494555555555556},
-{3384691,3884032,3883434,0.385822222222222,0.385822222222222},
-{3384692,3884032,3884022,0.148133333333333,0.148133333333333},
-{3384693,3883434,3884022,0.234911111111111,0.234911111111111},
-{3384694,3884022,3884462,0.174111111111111,0.174111111111111},
-{3384695,3884873,3884757,0.0451333333333333,0.0451333333333333},
-{3384696,3884757,3884032,0.288933333333333,0.288933333333333},
-{3384697,3884757,3884462,0.200844444444444,0.200844444444444},
-{3384698,3884462,3884457,0.136511111111111,0.136511111111111},
-{3384699,3884457,3884435,0.288577777777778,0.288577777777778},
-{3384700,3884873,3884457,0.454866666666667,0.454866666666667},
-{3384701,3873927,3875356,0.89022,0.847828571428571},
-{3384702,3872757,3874717,1.59723333333333,1.59723333333333},
-{3384703,3874717,3875597,0.804388235294118,0.719715789473684},
-{3384704,3874717,3875356,1.17264,1.17264},
-{3384708,3881335,3881657,0.209054545454545,0.209054545454545},
-{3384709,3880648,3880436,0.244836363636364,0.244836363636364},
-{3384716,3879254,3879629,0.345557142857143,0.537533333333333},
-{3384717,3879629,3880606,0.69003,0.69003},
-{3384729,3878732,3881031,1.55582727272727,1.55582727272727},
-{3384730,3882314,3882516,0.186,0.144},
-{3384731,3880421,3882096,1.52110434782609,1.399416},
-{3384732,3882096,3882314,0.202695652173913,0.1665},
-{3384733,3884632,3882681,0.955711111111111,0.955711111111111},
-{3384734,3882681,3882096,0.320755555555556,0.320755555555556},
-{3384735,3878792,3878911,0.0419076923076923,0.0380093023255814},
-{3384736,3878911,3879254,0.18999,0.135707142857143},
-{3384737,3877193,3877585,0.59517,0.59517},
-{3384738,3877547,3877858,0.0615396226415094,0.0639529411764706},
-{3384739,3877858,3878422,0.119083018867925,0.119083018867925},
-{3384740,3876779,3877109,0.109145454545455,0.163718181818182},
-{3384741,3877109,3877338,0.0543702127659575,0.0594279069767442},
-{3384742,3876400,3876578,0.08305,0.0866608695652174},
-{3384743,3876578,3876849,0.19432,0.19432},
-{3384744,3876578,3877547,1.14084444444444,1.14084444444444},
-{3384745,3876713,3876612,0.0293347826086956,0.0499777777777778},
-{3384746,3876612,3876449,0.044832,0.0862153846153846},
-{3384747,3875356,3875803,0.208275,0.238028571428571},
-{3384748,3875803,3876171,0.2112,0.22176},
-{3384749,3875803,3876612,1.54137,1.54137},
-{3384750,3917126,3917442,0.126041860465116,0.129042857142857},
-{3384751,3917805,3917728,0.0508444444444444,0.0508444444444444},
-{3384752,3917442,3917600,0.109822222222222,0.109822222222222},
-{3384753,3917600,3917805,0.5176,0.5176},
-{3384754,3917805,3917600,0.114911111111111,0.114911111111111},
-{3384755,3917442,3917861,0.125571428571429,0.1281875},
-{3384756,3917861,3918181,0.201933333333333,0.201933333333333},
-{3384757,3918181,3918581,0.239688888888889,0.239688888888889},
-{3384758,3918181,3918451,0.1422,0.1422},
-{3384759,3917861,3918215,0.105091304347826,0.109868181818182},
-{3384760,3918215,3919211,0.309097959183673,0.32925652173913},
-{3384761,3916961,3917301,0.09465,0.0911444444444444},
-{3384762,3917301,3918837,0.389307692307692,0.374888888888889},
-{3384763,3917301,3917721,0.602957142857143,0.29108275862069},
-{3384764,3917721,3918215,0.380742857142857,0.4442},
-{3384765,3917721,3917280,0.263977777777778,0.263977777777778},
-{3384766,3883264,3883083,0.205885714285714,-1},
-{3384767,3883083,3882744,0.351692307692308,-1},
-{3384768,3875066,3875016,0.18168679245283,-1},
-{3384769,3875125,3875087,-1,0.172413559322034},
-{3384771,3893054,3893585,0.419115789473684,-1},
-{3384772,3893585,3893623,0.0915176470588235,-1},
-{3384773,3893585,3893584,0.03066,0.03066},
-{3384774,3866942,3866812,0.158446153846154,0.121164705882353},
-{3384775,3866812,3866479,0.190333333333333,0.190333333333333},
-{3384776,3866812,3866722,0.11886,0.11886},
-{3384777,3880302,3880098,-1,0.261952941176471},
-{3384778,3880098,3879946,-1,0.1944},
-{3384779,3880098,3880053,0.10368,0.10368},
-{3384780,3880896,3880745,-1,0.146894117647059},
-{3384781,3880745,3880394,-1,0.33327},
-{3384782,3880745,3880799,0.11346,0.11346},
-{3384783,3883348,3883551,0.114626086956522,-1},
-{3384784,3883551,3883672,0.0750285714285714,-1},
-{3384785,3883551,3883598,0.06822,0.06822},
-{3384803,3882332,3882410,-1,0.232695652173913},
-{3384804,3882410,3882502,-1,0.171022222222222},
-{3384805,3882410,3882462,0.06036,0.06036},
-{3384816,3876692,3876968,0.118133333333333,0.118133333333333},
-{3384817,3876968,3877285,0.146511111111111,0.146511111111111},
-{3384818,3876968,3876908,0.14796,0.14796},
-{3384819,3877129,3877014,0.2112,0.2112},
-{3384824,3892551,3892936,0.0764,-1},
-{3384825,3892936,3893382,0.120741176470588,-1},
-{3384826,3892936,3892933,0.05484,0.05484},
-{3384827,3892547,3892916,-1,0.124412903225806},
-{3384828,3892916,3893188,-1,0.0814186046511628},
-{3384829,3879793,3880105,0.229304347826087,-1},
-{3384830,3880105,3880208,0.0629217391304348,-1},
-{3384831,3880105,3880113,0.03606,0.03606},
-{3384875,3880954,3881156,-1,-1},
-{3384876,3885845,3885901,0.05916,0.05916},
-{3384877,3884097,3883841,-1,0.184609090909091},
-{3384878,3883841,3883348,-1,0.26868},
-{3384879,3883841,3883787,0.10002,0.10002},
-{3384880,3865342,3865361,-1,0.0195375},
-{3384881,3865361,3865415,-1,0.100327659574468},
-{3384882,3884490,3884263,0.192566666666667,-1},
-{3384883,3884263,3883632,0.448581818181818,-1},
-{3385099,3899382,3898642,-1,0.338225806451613},
-{3385128,3902296,3903551,0.948666666666667,0.948666666666667},
-{3385129,3902690,3903717,1.28935555555556,1.28935555555556},
-{3385171,3896599,3896408,0.0935555555555555,0.0935555555555555},
-{3385181,3896408,3895184,1.30435714285714,1.30435714285714},
-{3385182,3895184,3896408,0.887836363636364,0.887836363636364},
-{3385183,3895184,3894317,0.539427272727273,0.6246},
-{3385184,3894317,3894326,0.4196625,-1},
-{3385214,3910260,3912177,1.33218,1.33218},
-{3385215,3913000,3913081,0.0100153846153846,0.00986363636363636},
-{3385216,3913081,3913101,0.00337846153846154,0.00327761194029851},
-{3385217,3912177,3913081,0.58674,0.58674},
-{3385227,3917508,3916042,1.21371,1.21371},
-{3385228,3916042,3913656,1.96335,1.96335},
-{3385229,3916042,3918013,1.74981,1.74981},
-{3385230,3900721,3900737,-1,-1},
-{3385231,3900737,3900781,-1,-1},
-{3385258,3903131,3904259,0.546936,0.581846808510638},
-{3385259,3904259,3904281,0.0156576923076923,0.0156576923076923},
-{3385265,3904259,3906310,0.9856,0.9856},
-{3385287,3913283,3912723,0.30957,0.30957},
-{3385307,3909516,3909819,0.103442553191489,0.105691304347826},
-{3385308,3909819,3909982,0.0470571428571429,0.0480375},
-{3385309,3909516,3909819,-1,-1},
-{3385336,3910666,3910308,0.19962,0.19962},
-{3385337,3909574,3909982,0.26463,0.26463},
-{3385338,3910308,3909780,0.29271,0.29271},
-{3385339,3909780,3909574,0.21417,0.21417},
-{3385340,3908880,3909780,0.59457,0.59457},
-{3385341,3908761,3909648,0.80847,0.80847},
-{3385342,3908880,3908761,0.19374,0.19374},
-{3385343,3909574,3908623,0.60459,0.60459},
-{3385344,3908623,3908880,0.21447,0.21447},
-{3385345,3907293,3908373,0.91914,0.91914},
-{3385346,3908373,3908761,0.31158,0.31158},
-{3385347,3908623,3908373,0.13233,0.13233},
-{3385395,3920048,3920554,0.246545454545455,0.246545454545455},
-{3385419,3921005,3920376,0.309781818181818,0.309781818181818},
-{3385425,3920704,3921230,0.90912,-1},
-{3385440,3907986,3910043,0.892133333333333,0.892133333333333},
-{3385550,3894018,3893992,0.15168,0.15168},
-{3385552,3890905,3890967,0.02706,0.0287872340425532},
-{3385553,3890967,3891124,0.0684352941176471,0.0811674418604651},
-{3385556,3890967,3891080,0.113228571428571,0.10568},
-{3385557,3891080,3891108,0.0222857142857143,0.024},
-{3385560,3891080,3891430,0.2314,0.2314},
-{3385561,3891108,3892007,0.520914285714286,0.497236363636364},
-{3385562,3892007,3892723,0.269309090909091,0.269309090909091},
-{3385563,3891430,3892007,0.347290909090909,0.347290909090909},
-{3385564,3891714,3891726,0.04422,0.04422},
-{3385565,3891726,3892503,1.33938,1.33938},
-{3385566,3892327,3892493,-1,0.0416555555555556},
-{3385567,3892493,3892862,-1,0.086256},
-{3385568,3892503,3892493,0.02358,0.02358},
-{3385572,3892321,3892470,0.0447428571428571,-1},
-{3385573,3892470,3892736,0.08028,-1},
-{3385624,3897057,3897867,0.620180487804878,0.5297375},
-{3385626,3897867,3898059,0.115482352941176,0.140228571428571},
-{3385627,3898059,3899080,0.621109090909091,0.621109090909091},
-{3385628,3899080,3898059,1.49406,1.49406},
-{3385629,3897867,3897935,0.0513545454545455,0.047075},
-{3385630,3897935,3898228,0.226583333333333,0.214657894736842},
-{3385631,3897894,3897935,0.0237375,0.0172636363636364},
-{3385632,3897131,3897233,0.1692,0.1692},
-{3385633,3897233,3897853,0.371914285714286,0.371914285714286},
-{3385634,3897853,3897894,0.0428142857142857,0.0285428571428571},
-{3385635,3897233,3897853,2.12933333333333,2.12933333333333},
-{3385807,3879270,3879257,0.0126333333333333,-1},
-{3385808,3879559,3879270,0.339461538461538,-1},
-{3385809,3879618,3879559,0.0636375,-1},
-{3385825,3870251,3870279,0.00865714285714286,-1},
-{3385826,3870279,3871039,0.453,-1},
-{3385827,3870604,3870279,-1,-1},
-{3385828,3870251,3870280,0.00625,0.00661764705882353},
-{3385829,3870280,3872701,0.64872,0.597505263157895},
-{3385830,3870251,3870050,-1,-1},
-{3385831,3870050,3869958,0.0423333333333333,0.0423333333333333},
-{3385836,3869668,3869715,0.130904347826087,0.15054},
-{3385837,3869715,3869732,0.0688702702702703,0.07963125},
-{3385838,3869786,3869715,0.0253111111111111,0.0253111111111111},
-{3385839,3871839,3871755,0.1182,0.185742857142857},
-{3385840,3870947,3870887,0.0712615384615385,0.0842181818181818},
-{3385841,3870345,3869791,0.120071428571429,0.0988823529411765},
-{3385842,3869791,3869530,0.0611837837837838,0.052646511627907},
-{3385843,3870947,3870717,0.0417622641509434,0.0425653846153846},
-{3385844,3870717,3870345,0.0684,0.0645283018867925},
-{3385845,3869791,3870717,0.353866666666667,-1},
-{3385862,3893436,3892770,-1,-1},
-{3385863,3892770,3892510,-1,-1},
-{3385864,3892760,3892726,-1,-1},
-{3385865,3892770,3892760,-1,-1},
-{3388770,3881808,3881856,-1,-1},
-{3390039,3903451,3904299,0.42336,0.42336},
-{3390040,3904299,3904389,0.0609428571428571,0.0581727272727273},
-{3390042,3904039,3904855,0.500166666666667,0.500166666666667},
-{3390044,3904128,3904926,0.3342,0.3342},
-{3390055,3886931,3887183,0.0663681818181818,0.0663681818181818},
-{3390056,3887183,3887512,0.0826285714285714,0.0826285714285714},
-{3390057,3885441,3887228,0.543632432432432,0.718371428571429},
-{3390058,3887228,3887572,0.1182,0.11426},
-{3390059,3887183,3887228,0.8316,0.8316},
-{3390413,3890865,3891020,-1,-1},
-{3390414,3891020,3891208,-1,-1},
-{3390418,3891188,3891223,-1,0.03171},
-{3390419,3891340,3891013,-1,0.287357142857143},
-{3390420,3891013,3890964,-1,0.0411529411764706},
-{3390421,3891223,3891013,0.5111,-1},
-{3390422,3890776,3890922,0.06168,-1},
-{3390423,3890922,3891127,0.104083333333333,-1},
-{3390424,3890922,3890895,-1,0.01825},
-{3390425,3891188,3891053,0.14,0.075},
-{3390426,3891053,3890964,0.0567692307692308,0.0508965517241379},
-{3390427,3890922,3891053,0.103984615384615,-1},
-{3390428,3891188,3891253,0.167034782608696,-1},
-{3390429,3891253,3891256,0.0089,-1},
-{3390430,3891253,3891390,0.0797142857142857,-1},
-{3390431,3891223,3891337,-1,0.0998210526315789},
-{3390432,3891337,3891340,-1,0.0279230769230769},
-{3390433,3891337,3891390,-1,0.288410526315789},
-{3390434,3891190,3891227,0.0143657142857143,0.0162193548387097},
-{3390435,3891227,3891396,0.07685625,0.08198},
-{3390436,3891227,3891256,-1,0.042875},
-{3390709,3888019,3887982,0.019695,0.019695},
-{3390712,3887982,3887947,0.0373894736842105,0.0373894736842105},
-{3390713,3888019,3887628,-1,0.168507692307692},
-{3390714,3887628,3887184,-1,0.197733333333333},
-{3390715,3887628,3887590,0.0424105263157895,0.0424105263157895},
-{3390716,3887947,3887554,0.122485714285714,-1},
-{3390717,3887554,3887089,0.248590909090909,-1},
-{3390718,3887554,3887590,0.0189473684210526,0.0189473684210526},
-{3390721,3889588,3888485,0.502155555555555,-1},
-{3390722,3888485,3887947,0.185382857142857,-1},
-{3390723,3888485,3888520,0.0231290322580645,0.0231290322580645},
-{3390726,3889688,3888835,-1,0.5628},
-{3390727,3888835,3888019,-1,0.330289655172414},
-{3390728,3888835,3888791,0.0318,0.0318},
-{3392886,3912552,3921535,-1,1.65925813953488},
-{3393722,3855153,3854731,0.257777777777778,0.257777777777778},
-{3393724,3849985,3849595,0.180955555555556,0.180955555555556},
-{3393725,3851923,3852019,0.0412222222222222,0.0412222222222222},
-{3393726,3852637,3852733,0.139933333333333,0.134935714285714},
-{3393727,3852733,3852907,0.197133333333333,0.204715384615385},
-{3393728,3852215,3852657,0.29214,0.29214},
-{3393729,3852657,3852733,-1,-1},
-{3393732,3902267,3902324,0.0863142857142857,0.0863142857142857},
-{3393733,3902463,3902187,0.144533333333333,0.144533333333333},
-{3393734,3902187,3902267,0.0528222222222222,0.0528222222222222},
-{3393735,3902268,3902077,0.0964666666666667,0.0964666666666667},
-{3393736,3902077,3901927,0.0835555555555556,0.0835555555555556},
-{3393737,3902187,3902077,0.0472222222222222,0.0472222222222222},
-{3393738,3902297,3902268,0.0200888888888889,0.0200888888888889},
-{3393739,3902324,3902360,0.0323647058823529,0.0323647058823529},
-{3393740,3902360,3902610,0.138333333333333,0.138333333333333},
-{3393741,3902297,3902360,0.0431052631578947,0.0431052631578947},
-{3393742,3902705,3901980,0.304376470588235,-1},
-{3393743,3901980,3901884,0.0308739130434783,-1},
-{3393744,3901980,3902297,0.2812875,0.2812875},
-{3393745,3899094,3898953,0.111822222222222,0.111822222222222},
-{3393746,3863198,3863222,0.0956666666666667,0.0956666666666667},
-{3393747,3863222,3863075,0.0849111111111111,0.0849111111111111},
-{3393748,3866752,3866587,0.0861555555555556,0.0861555555555556},
-{3393749,3861492,3861300,0.0805764705882353,0.0805764705882353},
-{3393750,3861300,3860672,0.286692857142857,0.286692857142857},
-{3393751,3861300,3861177,0.1208,0.1208},
-{3393752,3867752,3867316,0.193777777777778,0.193777777777778},
-{3393761,3850612,3850850,-1,-1},
-{3393762,3850804,3850632,0.152244444444444,0.152244444444444},
-{3393763,3858569,3858108,0.210155555555556,0.210155555555556},
-{3393764,3858108,3857644,0.179511111111111,0.179511111111111},
-{3393765,3858108,3858118,-1,-1},
-{3393766,3858457,3858152,0.5643375,0.60196},
-{3393767,3858152,3857332,0.500752941176471,0.500752941176471},
-{3393768,3858118,3858152,-1,-1},
-{3393769,3884717,3884604,0.126333333333333,0.126333333333333},
-{3393770,3884717,3884686,0.2166,0.2166},
-{3393771,3884686,3884655,0.374178947368421,0.374178947368421},
-{3393772,3884686,3884593,0.260133333333333,0.260133333333333},
-{3393774,3868820,3868569,0.1623,0.1623},
-{3393775,3866469,3866513,0.430444444444444,0.430444444444444},
-{3393776,3866129,3865926,0.1002,0.0858857142857143},
-{3393777,3865926,3865495,0.189503225806452,0.178018181818182},
-{3393778,3866576,3866214,0.160844444444444,0.160844444444444},
-{3393779,3866214,3865926,0.151755555555556,0.151755555555556},
-{3393780,3866214,3865982,0.0912888888888889,0.0912888888888889},
-{3393792,3863716,3863168,0.405130434782609,0.405130434782609},
-{3393793,3863168,3863413,0.428025,0.428025},
-{3393794,3863168,3862800,0.231533333333333,0.231533333333333},
-{3393817,3860458,3859592,-1,-1},
-{3393880,3865724,3864734,0.275554285714286,0.292254545454545},
-{3393881,3864734,3863969,0.263254545454545,0.28958},
-{3393882,3864734,3864592,0.149533333333333,0.149533333333333},
-{3393883,3866304,3865832,0.244584,0.30573},
-{3393884,3865832,3865442,0.177921428571429,0.199272},
-{3393885,3865832,3865534,0.2186,0.2186},
-{3394326,3902609,3901896,-1,0.461318181818182},
-{3394327,3901896,3901803,-1,0.0318857142857143},
-{3394354,3867752,3867304,0.181977777777778,0.181977777777778},
-{3394355,3867304,3867213,0.0282222222222222,0.0282222222222222},
-{3394356,3867316,3867304,0.0235555555555556,0.0235555555555556},
-{3394359,3859674,3859769,-1,-1},
-{3394414,3850019,3850240,-1,-1},
-{3394461,3852134,3852014,1.06704444444444,1.06704444444444},
-{3394462,3852014,3851562,0.497644444444444,0.497644444444444},
-{3680770,3902763,3902758,9999.99,9999.99},
-{3680771,3902758,3902685,9999.99,9999.99},
-{3680772,3902438,3902551,9999.99,9999.99},
-{3680773,3902438,3902685,9999.99,9999.99},
-{3680774,3902551,3902763,9999.99,9999.99},
-{3680779,3847666,3847694,0.16503829787234,0.1616},
-{3680780,3847387,3847264,0.314172972972973,0.415157142857143},
-{3680781,3847391,3847387,0.06722,0.080664},
-{3680783,3848229,3848419,0.325992,0.25468125},
-{3680785,3848014,3848229,0.271057894736842,0.257505},
-{3680795,3848633,3848557,0.177247058823529,0.20088},
-{3680796,3848557,3848452,0.283533333333333,0.283533333333333},
-{3680839,3847265,3847618,0.55425,0.542938775510204},
-{3680840,3847418,3847308,0.234777777777778,0.234777777777778},
-{3680841,3847424,3847391,0.06946,0.10419},
-{3680843,3848419,3848550,0.228754838709677,0.23638},
-{3680915,3880187,3880474,0.226552941176471,0.160475},
-{3680916,3884380,3885609,0.770285714285714,0.64704},
-{3680932,3883686,3883888,0.09555,-1},
-{3680933,3883888,3884380,0.231889655172414,0.268992},
-{3680941,3852966,3852289,0.14085306122449,0.1437875},
-{3680942,3854299,3854177,0.0373463414634146,0.0464},
-{3680943,3854466,3854299,0.0481772727272727,0.0623470588235294},
-{3680944,3861845,3860787,0.28284,0.328883720930233},
-{3680945,3862616,3862321,0.0633882352941176,0.0979636363636364},
-{3680946,3862791,3862616,0.0481625,0.07224375},
-{3680947,3867881,3868145,-1,0.0581121951219512},
-{3680948,3868145,3868634,-1,0.119692682926829},
-{3680949,3867298,3867881,-1,0.153153846153846},
-{3680950,3866755,3866804,-1,0.03504},
-{3680951,3863854,3863465,0.122138461538462,0.132316666666667},
-{3680953,3887895,3888068,0.104955555555556,0.0629733333333333},
-{3680954,3888068,3888231,0.0939724137931034,0.056775},
-{3680955,3888453,3888893,0.15428,-1},
-{3680956,3891018,3891359,0.150418604651163,0.154},
-{3680957,3888231,3888294,0.02353125,0.0160212765957447},
-{3680958,3887747,3887895,0.078312,0.0444954545454545},
-{3680959,3879147,3879140,0.0657384615384615,0.08011875},
-{3680960,3879123,3879116,0.083125,0.0927906976744186},
-{3680961,3879116,3879110,0.136952941176471,0.139692},
-{3680962,3879110,3879099,0.138368181818182,0.121764},
-{3680963,3883691,3883587,0.0466181818181818,0.0496258064516129},
-{3680964,3882737,3882276,0.213496551724138,0.238130769230769},
-{3680965,3885903,3885343,0.24553125,0.291},
-{3680966,3879057,3879055,0.0528681818181818,0.0505695652173913},
-{3680967,3879055,3879049,0.103665,0.0942409090909091},
-{3680968,3879034,3879029,0.0314117647058824,0.0410769230769231},
-{3680969,3879029,3879018,0.17436,0.13621875},
-{3680970,3879160,3879157,0.1179375,0.0428863636363636},
-{3680971,3866108,3865550,0.162257142857143,0.162257142857143},
-{3680972,3869697,3869280,0.139292307692308,0.116825806451613},
-{3680973,3872982,3872931,0.0680454545454545,0.0650869565217391},
-{3680974,3872931,3872205,0.2826,0.295445454545455},
-{3680975,3865085,3864990,-1,0.0296307692307692},
-{3680976,3865550,3865085,-1,0.14205},
-{3680977,3857762,3858093,0.133130769230769,0.2163375},
-{3680978,3858588,3859151,0.1316875,0.123941176470588},
-{3680979,3849071,3849205,0.0803818181818182,0.0780176470588235},
-{3680980,3887733,3887209,0.134385714285714,0.125426666666667},
-{3680981,3886592,3886157,0.166535294117647,0.123091304347826},
-{3680982,3883510,3883205,0.07928,0.0964216216216216},
-{3680983,3882723,3882642,0.0186954545454545,0.0178826086956522},
-{3680984,3892042,3891993,0.02885,0.0314727272727273},
-{3680985,3888883,3888844,0.0096,0.00983414634146341},
-{3680986,3889462,3889167,0.0937297297297297,-1},
-{3680987,3891993,3891390,0.3079,0.295584},
-{3680988,3886653,3886592,0.0192923076923077,0.01672},
-{3681004,3909556,3908794,0.116316923076923,0.118134375},
-{3681010,3861942,3861570,0.195822222222222,0.195822222222222},
-{3681011,3862327,3861942,0.132291891891892,0.135966666666667},
-{3681012,3862670,3862327,0.161725,0.138621428571429},
-{3681013,3863023,3862670,0.20016,0.238285714285714},
-{3681014,3863628,3863023,0.2755875,0.284477419354839},
-{3681015,3863871,3863628,0.104435294117647,0.104435294117647},
-{3681016,3867595,3866983,0.231072727272727,0.262944827586207},
-{3681017,3868074,3867595,0.17690625,0.1665},
-{3681018,3869272,3869035,0.112257142857143,0.138670588235294},
-{3681019,3869497,3869272,0.0948260869565217,0.121166666666667},
-{3681027,3859859,3859682,0.142422222222222,0.142422222222222},
-{3681028,3859682,3859459,-1,-1},
-{3681030,3882454,3882244,0.128175,0.08545},
-{3681031,3883650,3883498,0.0592666666666667,0.0889},
-{3681032,3885813,3885362,0.1566,0.119948936170213},
-{3681033,3886246,3885813,0.102268085106383,0.104491304347826},
-{3681034,3886461,3886246,0.0634163265306122,0.0817736842105263},
-{3681035,3887003,3886885,0.03594,0.0417906976744186},
-{3681036,3887336,3887003,0.0829836734693877,0.0945627906976744},
-{3681037,3887463,3887336,0.033375,0.0356},
-{3681038,3887879,3887463,0.0843795918367347,0.0898826086956522},
-{3681039,3891439,3891148,0.0699807692307692,0.0791086956521739},
-{3681040,3892245,3891804,0.118,0.124941176470588},
-{3681041,3907374,3906804,0.1587875,0.18589756097561},
-{3681042,3906177,3905744,0.113705454545455,0.117996226415094},
-{3681043,3905744,3905316,0.12262641509434,0.124984615384615},
-{3681044,3904460,3904024,0.1217,0.128858823529412},
-{3681045,3903589,3903160,0.137652,0.137652},
-{3681046,3899325,3898357,0.353157142857143,0.315587234042553},
-{3681047,3898357,3898018,0.105066666666667,0.135085714285714},
-{3681048,3898018,3897701,0.0927692307692308,0.104869565217391},
-{3681049,3897701,3897409,0.0944150943396227,0.0962307692307692},
-{3681050,3897409,3896653,0.246847058823529,0.246847058823529},
-{3681051,3896653,3896385,0.107553488372093,0.0984},
-{3681052,3895300,3895115,0.0805469387755102,0.078936},
-{3681053,3895115,3894740,0.1429125,0.15244},
-{3681054,3885097,3884978,0.0441333333333333,0.0350470588235294},
-{3681055,3892274,3892245,0.00611111111111111,0.00647058823529412},
-{3681057,3921208,3920935,0.103419512195122,0.124711764705882},
-{3681058,3921604,3921461,0.051,0.0483846153846154},
-{3681059,3921758,3921604,0.0682058823529412,0.0748064516129032},
-{3681071,3922129,3922794,0.551536363636364,0.551536363636364},
-{3681073,3909669,3909105,-1,0.165072},
-{3681074,3911943,3911380,0.154988888888889,0.15791320754717},
-{3681075,3912172,3911943,0.0575510204081633,0.0552941176470588},
-{3681076,3913809,3913258,0.141242307692308,0.136011111111111},
-{3681077,3903208,3903084,0.0689172413793103,0.0740222222222222},
-{3681078,3903084,3903713,0.453457142857143,0.47613},
-{3681079,3903218,3903006,0.084465306122449,0.100946341463415},
-{3681080,3902016,3901463,0.298521428571429,0.298521428571429},
-{3681081,3901463,3901106,0.200088888888889,0.200088888888889},
-{3681092,3921055,3920868,0.0973235294117647,0.143869565217391},
-{3681096,3913258,3912172,0.250732075471698,0.250732075471698},
-{3681098,3918406,3918014,0.0812,0.08265},
-{3681099,3918014,3917078,0.215536842105263,0.227511111111111},
-{3681100,3908794,3907765,0.1520625,0.1520625},
-{3681101,3898713,3898589,0.0605538461538462,0.0562285714285714},
-{3681102,3896121,3895300,0.36999512195122,0.47405625},
-{3681103,3896385,3896121,0.162765517241379,0.121030769230769},
-{3681104,3900265,3899325,0.271766666666667,0.287752941176471},
-{3681105,3902229,3902201,0.0136137931034483,0.0116117647058824},
-{3681106,3906804,3906550,0.0663666666666667,0.071676},
-{3681107,3905610,3906761,0.233177419354839,0.225890625},
-{3681108,3896041,3895875,0.0326823529411765,0.0326823529411765},
-{3681109,3895875,3894802,0.252689552238806,0.252689552238806},
-{3681113,3852289,3849498,0.716321739130435,0.672465306122449},
-{3681118,3880971,3880920,0.01467,0.0158594594594595},
-{3681124,3907022,3907016,0.0244071428571429,-1},
-{3681125,3864990,3864956,-1,0.0149379310344828},
-{3681127,3864448,3863871,0.378555555555556,0.3407},
-{3681128,3865576,3864940,0.246634285714286,0.239783333333333},
-{3681129,3858568,3858469,0.0674065573770492,0.06853},
-{3681130,3864615,3864448,0.1641,0.156965217391304},
-{3681131,3864756,3864615,0.0826344827586207,0.0773032258064516},
-{3681132,3864940,3864756,0.107651612903226,0.1042875},
-{3681133,3860345,3859859,0.373863157894737,0.417847058823529},
-{3681134,3860748,3860659,0.175017391304348,0.161016},
-{3681135,3861013,3860944,0.0727102040816327,0.0828558139534884},
-{3681136,3861145,3861013,0.0889148936170213,0.0889148936170213},
-{3681137,3861323,3861145,0.11156170212766,0.11156170212766},
-{3681138,3861570,3861323,0.221811764705882,0.226248},
-{3681139,3873305,3873168,0.0484928571428571,0.04526},
-{3681140,3903277,3903208,0.0284,0.0300705882352941},
-{3681141,3896341,3896470,0.0264088235294118,0.0264088235294118},
-{3681142,3870128,3869497,0.312166666666667,0.3511875},
-{3681143,3869035,3868074,0.60995,0.60995},
-{3681144,3866983,3866602,0.127566666666667,0.148141935483871},
-{3681145,3866602,3866367,0.0752594594594595,0.0898258064516129},
-{3681146,3866367,3866285,0.03994,0.03744375},
-{3681147,3866285,3866207,0.130007142857143,0.134822222222222},
-{3681148,3866207,3865576,0.311057142857143,0.322577777777778},
-{3681149,3910416,3909669,-1,0.1966875},
-{3681151,3848873,3849071,0.127890909090909,0.120582857142857},
-{3681152,3853150,3853817,0.179582608695652,0.165216},
-{3681153,3864964,3865000,0.02165,-1},
-{3681158,3882361,3883159,0.447471428571429,-1},
-{3681164,3872205,3871626,0.344863636363636,0.344863636363636},
-{3681165,3871626,3871124,0.3346125,0.297433333333333},
-{3681168,3865401,3865507,0.111805714285714,-1},
-{3681169,3866915,3866421,-1,-1},
-{3681170,3867501,3867117,0.373714285714286,-1},
-{3681171,3867117,3866915,-1,-1},
-{3681172,3866421,3866108,0.315975,0.3447},
-{3681180,3866307,3866420,0.0520838709677419,-1},
-{3681181,3902284,3902016,0.0805959183673469,0.077435294117647},
-{3681182,3902771,3902529,0.0897063829787234,0.0826705882352941},
-{3681183,3903444,3903218,0.0935581395348837,0.0838125},
-{3681187,3879980,3880187,0.119929411764706,0.122328},
-{3681188,3886501,3886768,0.132553846153846,0.16155},
-{3681189,3886768,3887076,0.21312,0.155941463414634},
-{3681192,3920661,3921984,0.70074705882353,0.567271428571429},
-{3681193,3864587,3864611,0.01245,0.00905454545454545},
-{3681194,3868384,3868143,-1,0.243422222222222},
-{3681195,3866862,3866941,-1,0.0375473684210526},
-{3681196,3879096,3879090,0.0189521739130435,0.0202744186046512},
-{3681199,3866941,3867009,-1,0.0302727272727273},
-{3681200,3867009,3867298,-1,0.109176923076923},
-{3681201,3879135,3879123,0.0370133333333333,0.05205},
-{3681202,3880930,3881209,0.0983318181818182,-1},
-{3681203,3879446,3879462,0.00622909090909091,0.00634444444444444},
-{3681204,3879462,3879472,0.00496363636363636,0.00505555555555556},
-{3681205,3889468,3889615,0.0808216216216216,-1},
-{3681206,3889615,3889671,0.0205578947368421,-1},
-{3681207,3889671,3889712,0.0180428571428571,-1},
-{3681208,3889712,3889832,0.0462681818181818,-1},
-{3681215,3854177,3854005,-1,0.111428571428571},
-{3681216,3894740,3894669,0.0299142857142857,0.0292186046511628},
-{3681217,3894669,3894645,0.00810731707317073,0.00810731707317073},
-{3681218,3894645,3894473,0.0905636363636364,0.0853885714285714},
-{3681219,3918455,3917299,0.326826923076923,0.361595744680851},
-{3681220,3917299,3917183,0.0915882352941176,0.06228},
-{3681224,3848550,3848591,0.0726,0.06435},
-{3681225,3848591,3848653,0.08403,0.0800285714285714},
-{3681226,3848654,3848633,0.0588307692307692,0.0603789473684211},
-{3681227,3860763,3860748,0.0208216216216216,0.0202736842105263},
-{3681228,3887631,3887664,0.0113318181818182,0.0127846153846154},
-{3681229,3887664,3887747,0.0310604651162791,0.0290347826086957},
-{3681230,3888408,3888453,0.0161466666666667,-1},
-{3681234,3918514,3918406,0.0253344827586207,0.0253344827586207},
-{3681235,3849621,3850093,0.27088,0.262141935483871},
-{3681236,3873390,3873305,0.0334222222222222,0.0265411764705882},
-{3681243,3907765,3907709,0.00918,0.00918},
-{3681261,3848653,3848705,0.0668487804878049,0.0702769230769231},
-{3681262,3848670,3848654,0.0174571428571429,0.0192947368421053},
-{3681263,3907016,3907057,0.05761875,-1},
-{3681264,3907057,3907074,0.0155272727272727,-1},
-{3681265,3901156,3901128,0.00956470588235294,0.0157354838709677},
-{3681266,3901128,3900265,0.285057692307692,0.361536585365854},
-{3681267,3901282,3901156,0.0345918367346939,0.0546774193548387},
-{3681270,3866420,3866482,0.0282473684210526,-1},
-{3681271,3860944,3860884,0.032124,0.0365045454545455},
-{3681272,3860884,3860763,0.110133333333333,0.118},
-{3681273,3885255,3885097,0.0863714285714286,0.045345},
-{3681274,3884978,3884809,0.06631875,0.0757928571428571},
-{3681275,3884809,3884739,0.0225081081081081,0.02776},
-{3681307,3903160,3902464,0.276584615384615,0.220138775510204},
-{3681567,3920499,3920434,0.0244666666666667,0.0400363636363636},
-{3681568,3920602,3920499,0.057658064516129,0.0616344827586207},
-{3681576,3855414,3856182,0.18315652173913,0.18315652173913},
-{3681579,3921407,3921161,0.08564,0.08564},
-{3681581,3889641,3889462,0.0500235294117647,-1},
-{3681582,3889912,3889861,0.0274137931034483,-1},
-{3681583,3888844,3888804,0.00948571428571429,0.00971707317073171},
-{3681584,3888804,3888762,0.0101441860465116,0.0103857142857143},
-{3681592,3884739,3884399,0.124097142857143,0.127747058823529},
-{3681593,3884399,3884244,0.0607636363636364,0.0557},
-{3681604,3917183,3917137,0.0246107142857143,0.024178947368421},
-{3681609,3916925,3916896,0.00978,0.007824},
-{3681610,3916896,3916589,0.126946666666667,0.1190125},
-{3681611,3917549,3916952,0.247038461538462,0.285466666666667},
-{3681612,3916952,3916925,0.00722352941176471,0.00722352941176471},
-{3681613,3894473,3894418,0.0582,0.0353357142857143},
-{3681614,3894418,3894332,0.0604571428571429,0.0470222222222222},
-{3681615,3854827,3854870,0.03408,0.02272},
-{3681616,3855190,3855247,0.0238875,0.02548},
-{3681617,3858469,3858259,0.114790476190476,0.122572881355932},
-{3681618,3919667,3919354,0.110057142857143,-1},
-{3681619,3909105,3908946,-1,0.0541},
-{3681620,3908946,3908889,0.01876,0.0183521739130435},
-{3681621,3911380,3910878,0.136753846153846,0.131688888888889},
-{3681622,3910878,3910416,-1,0.115292307692308},
-{3681623,3888294,3888320,0.0115609756097561,0.0100851063829787},
-{3681624,3888320,3888408,0.0524714285714286,-1},
-{3681625,3889168,3889468,0.114954545454545,-1},
-{3681626,3888893,3889126,0.0787404255319149,-1},
-{3681627,3889126,3889168,0.018775,-1},
-{3681634,3847694,3847693,0.0596125,0.0596125},
-{3681635,3847693,3847689,0.0490595744680851,0.0480375},
-{3681636,3847689,3847692,0.0929489361702128,0.0891551020408163},
-{3681637,3847692,3847538,0.195474418604651,0.182726086956522},
-{3681642,3866804,3866831,-1,0.0158117647058824},
-{3681643,3866831,3866862,-1,0.0166},
-{3681646,3920794,3920477,0.0671076923076923,0.06815625},
-{3681647,3920477,3918514,0.380838095238095,0.38698064516129},
-{3681648,3859169,3858974,0.121686206896552,0.126032142857143},
-{3681651,3870436,3870128,0.175313513513514,0.190782352941176},
-{3681652,3870938,3870556,0.214065,0.225331578947368},
-{3681653,3870556,3870436,0.0622,0.0706054054054054},
-{3681654,3898566,3898554,0.00754909090909091,0.00783396226415094},
-{3681655,3898589,3898575,0.00812307692307692,0.00782222222222222},
-{3681656,3898575,3898566,0.0073811320754717,0.00752307692307692},
-{3681660,3898554,3898336,0.106901694915254,0.114676363636364},
-{3681661,3898336,3897850,0.27478064516129,0.288752542372881},
-{3681665,3889832,3890032,0.0842297872340426,-1},
-{3681666,3890032,3890351,0.152442857142857,-1},
-{3681667,3891003,3891018,0.0124,0.0115733333333333},
-{3681668,3864611,3864732,0.08586,-1},
-{3681669,3869127,3869189,0.01872,0.0111428571428571},
-{3681670,3869189,3869416,0.097,0.0554285714285714},
-{3681671,3883159,3883182,0.009168,-1},
-{3681672,3883182,3883686,0.263884615384615,-1},
-{3681673,3887209,3887097,0.0276418604651163,0.0276418604651163},
-{3681674,3887076,3887584,0.201424390243902,0.217326315789474},
-{3681675,3887584,3887631,0.01695,0.018645},
-{3681676,3892155,3892190,0.0166578947368421,0.0154390243902439},
-{3681677,3892190,3892442,0.135852631578947,0.12906},
-{3681678,3892124,3892155,0.0171891891891892,0.0151428571428571},
-{3681679,3870382,3869783,0.179787096774194,0.179787096774194},
-{3681680,3869783,3869697,0.0335217391304348,0.0275357142857143},
-{3681681,3864944,3864964,0.010392,-1},
-{3681684,3894021,3893814,0.110022222222222,0.110022222222222},
-{3681693,3886205,3885903,0.151022222222222,0.127425},
-{3681694,3868634,3868786,-1,0.0326368421052632},
-{3681695,3868786,3869127,-1,0.0941675675675676},
-{3681696,3913851,3913809,0.00745555555555556,0.00732},
-{3681697,3920868,3919123,0.605153571428571,0.639407547169811},
-{3681698,3919123,3917549,0.490357894736842,0.5176},
-{3681711,3858070,3857756,0.17896,0.195229090909091},
-{3681712,3858974,3858686,0.136734375,0.138904761904762},
-{3681713,3858686,3858568,0.069752380952381,0.0708774193548387},
-{3681714,3858259,3858098,0.0834290322580645,0.0847967213114754},
-{3681715,3858098,3858070,0.0127451612903226,0.0129540983606557},
-{3681718,3860659,3860427,0.0940758620689655,0.109128},
-{3681719,3860427,3860345,0.0436378378378378,0.0461314285714286},
-{3681733,3917137,3916852,0.0969966101694915,0.104050909090909},
-{3681734,3852393,3852434,0.111097959183673,0.111097959183673},
-{3681735,3879165,3879162,0.0205846153846154,0.0151471698113208},
-{3681736,3879162,3879158,0.00901621621621622,0.00641538461538462},
-{3681737,3879158,3879160,0.1118,0.053664},
-{3681738,3847538,3847466,0.117642857142857,0.117642857142857},
-{3681739,3847466,3847424,0.0506461538461539,0.04938},
-{3681740,3893610,3893934,0.103174468085106,0.0989632653061224},
-{3681787,3866307,3866251,-1,0.0295363636363636},
-{3681788,3866251,3866122,-1,0.0525545454545455},
-{3681789,3864009,3863964,0.0170153846153846,0.0201090909090909},
-{3681790,3863964,3863854,0.032865,0.0386647058823529},
-{3681791,3863465,3862954,0.156533333333333,0.207176470588235},
-{3681792,3862954,3862830,0.030225,0.038178947368421},
-{3681793,3862830,3862791,0.0092875,0.0123833333333333},
-{3681794,3853819,3853742,0.02697,0.03596},
-{3681795,3866127,3866184,0.0310965517241379,-1},
-{3681796,3866184,3866217,0.0135724137931034,-1},
-{3681797,3907578,3907642,0.0452538461538462,-1},
-{3681798,3922001,3922242,0.272466666666667,0.262735714285714},
-{3681799,3919754,3919477,0.102492307692308,0.105189473684211},
-{3681800,3921843,3921407,0.151571428571429,0.176833333333333},
-{3681801,3920935,3920924,0.00434594594594595,0.005025},
-{3681802,3921226,3921208,0.00597,0.00682285714285714},
-{3681813,3904024,3903746,0.0723222222222222,0.0751038461538462},
-{3681814,3903746,3903589,0.0518111111111111,0.0538038461538462},
-{3681815,3904920,3904460,0.1464,0.17139512195122},
-{3681816,3905316,3905200,0.042468,0.0416352941176471},
-{3681817,3905200,3904920,0.107023255813953,0.10004347826087},
-{3681818,3906550,3906221,0.0980509090909091,0.105741176470588},
-{3681837,3874249,3874077,0.0859333333333333,0.0859333333333333},
-{3681838,3873622,3872982,0.262671428571429,0.24516},
-{3681839,3864829,3864944,0.063888,-1},
-{3681843,3879927,3879947,0.0123115384615385,0.012804},
-{3681844,3879947,3879980,0.0240807692307692,0.025044},
-{3681845,3879472,3879508,0.0181963636363636,0.0185333333333333},
-{3681846,3881286,3881212,0.0230571428571429,0.0220090909090909},
-{3681847,3879157,3879155,0.11724,0.073275},
-{3681848,3879155,3879150,0.0214114285714286,0.018735},
-{3681849,3879150,3879149,0.0164432432432432,0.0148390243902439},
-{3681850,3879140,3879135,0.0126545454545455,0.0174},
-{3681851,3879099,3879101,0.0352744186046512,0.0316},
-{3681852,3879101,3879100,0.0120933333333333,0.0115787234042553},
-{3681853,3879100,3879097,0.0274851063829787,0.0300418604651163},
-{3681854,3879097,3879092,0.0541375,0.0590590909090909},
-{3681855,3879092,3879094,0.00919148936170213,0.010046511627907},
-{3681856,3879094,3879096,0.0199695652173913,0.0213627906976744},
-{3681857,3879090,3879089,0.0022,0.00225},
-{3681858,3879089,3879084,0.0146,0.0152790697674419},
-{3681859,3879084,3879082,0.0289304347826087,0.0309488372093023},
-{3681860,3879063,3879061,0.0182808510638298,0.0182808510638298},
-{3681861,3879049,3879048,0.00990857142857143,0.00806511627906977},
-{3681862,3879048,3879047,0.229421052631579,0.108975},
-{3681863,3879047,3879045,0.0139565217391304,0.00891666666666667},
-{3681864,3879045,3879044,0.034344,0.0252529411764706},
-{3681865,3879044,3879041,0.01044,0.0111857142857143},
-{3681866,3879041,3879036,0.04685625,0.0681545454545455},
-{3681867,3881910,3881902,0.0100875,-1},
-{3681868,3881902,3881639,0.231126315789474,-1},
-{3681869,3881639,3881498,0.1055,-1},
-{3681870,3881425,3881381,0.0508736842105263,0.0508736842105263},
-{3681871,3880039,3879884,0.161329411764706,-1},
-{3681872,3879884,3879869,0.00952,-1},
-{3681873,3879869,3879769,0.1155,-1},
-{3681874,3849205,3849348,0.0906387096774193,0.0826411764705882},
-{3681875,3849348,3849505,0.0906882352941176,0.0906882352941176},
-{3681876,3851188,3851293,0.0292085106382979,0.0280163265306122},
-{3681877,3851293,3851322,0.00709787234042553,0.00680816326530612},
-{3681878,3852434,3852452,0.0492391304347826,0.0481914893617021},
-{3681879,3852452,3852456,0.00834545454545455,0.00816},
-{3681880,3853089,3853150,0.0143162790697674,0.012825},
-{3681881,3853817,3854134,0.0920590909090909,0.0861829787234043},
-{3681882,3854463,3854827,0.153107142857143,0.119083333333333},
-{3681883,3854870,3855190,0.179044444444444,0.2302},
-{3681884,3855247,3855414,0.0549257142857143,0.0565411764705882},
-{3681885,3857712,3857720,0.0193021276595745,0.0185142857142857},
-{3681886,3857720,3857740,0.0597681818181818,0.0571695652173913},
-{3681887,3857740,3857761,0.03738,0.0364682926829268},
-{3681888,3857761,3857762,0.0425666666666667,0.0425666666666667},
-{3681889,3858093,3858100,0.000874285714285714,0.000927272727272727},
-{3681890,3858100,3858420,0.0898461538461538,0.0922105263157895},
-{3681891,3858420,3858511,0.0253227272727273,0.02476},
-{3681892,3858511,3858588,0.0239478260869565,0.0234382978723404},
-{3681893,3859151,3859501,0.0871531914893617,0.081924},
-{3681894,3859501,3859555,0.0152133333333333,0.0148826086956522},
-{3681895,3859897,3860428,0.302818181818182,-1},
-{3681896,3860428,3860438,0.0024,-1},
-{3681897,3859555,3859821,0.0695466666666667,0.0680347826086957},
-{3681898,3859821,3859897,0.0161617021276596,0.0161617021276596},
-{3681899,3882887,3882788,0.0344108108108108,0.0276782608695652},
-{3681900,3883498,3882979,0.156014285714286,0.192723529411765},
-{3681901,3882979,3882887,0.0366,0.0318260869565217},
-{3681904,3891666,3891680,0.0101666666666667,0.0114375},
-{3681905,3889861,3889844,0.0115655172413793,-1},
-{3681906,3889844,3889696,0.0665586206896552,-1},
-{3681907,3889696,3889641,0.0119018181818182,-1},
-{3681908,3890181,3890080,0.0432545454545454,-1},
-{3681909,3890828,3890731,0.0333166666666667,-1},
-{3681910,3889510,3888913,0.182941463414634,0.23439375},
-{3681911,3887819,3887590,0.0630714285714286,0.0563617021276596},
-{3681912,3887284,3887138,0.0703615384615385,0.0538058823529412},
-{3681913,3886889,3886622,0.09264,0.09264},
-{3681914,3886622,3886585,0.0142054054054054,0.0122232558139535},
-{3681915,3886585,3886495,0.0373411764705882,0.0302285714285714},
-{3681916,3882085,3882361,0.0882,0.1071},
-{3681917,3882025,3882085,0.0198230769230769,0.021475},
-{3681918,3881704,3881720,0.00208235294117647,0.00272307692307692},
-{3681919,3881720,3882025,0.0906692307692308,0.107154545454545},
-{3681920,3881333,3881627,0.0770875,-1},
-{3681921,3881627,3881704,0.019668,-1},
-{3681922,3881209,3881333,0.0383478260869565,-1},
-{3681923,3885692,3885664,0.00975789473684211,0.00862325581395349},
-{3681924,3885664,3885638,0.00762631578947369,0.00673953488372093},
-{3681925,3887097,3887035,0.0186136363636364,0.019046511627907},
-{3681926,3886794,3886653,0.0450878048780488,0.04108},
-{3681927,3888038,3887998,0.00890232558139535,0.00832173913043478},
-{3681928,3887998,3887733,0.0575045454545455,0.055004347826087},
-{3681929,3888249,3888175,0.0227842105263158,0.0188217391304348},
-{3681930,3888175,3888038,0.03723,0.0323739130434783},
-{3681931,3886495,3886413,0.0493285714285714,0.03453},
-{3681932,3886413,3886243,0.110045454545455,0.0691714285714286},
-{3681933,3886243,3886205,0.0208285714285714,0.0176727272727273},
-{3681934,3884966,3884922,0.0256173913043478,0.02946},
-{3681935,3884922,3884480,0.21412,0.256944},
-{3681936,3884480,3884444,0.0154216216216216,0.01585},
-{3681937,3884444,3884083,0.144416666666667,0.144416666666667},
-{3681938,3884083,3883768,0.123548571428571,0.120116666666667},
-{3681939,3883768,3883691,0.0313588235294118,0.0304628571428571},
-{3681940,3883247,3883181,0.036275,0.0378521739130435},
-{3681941,3882939,3882841,0.0553333333333333,0.0574615384615385},
-{3681942,3882841,3882737,0.0429692307692308,0.0429692307692308},
-{3681943,3882244,3882111,0.0694551724137931,0.06294375},
-{3681944,3882111,3881892,0.142875,0.0979714285714286},
-{3681945,3881892,3881852,0.028875,0.0203823529411765},
-{3681946,3882788,3882486,0.147456,0.0877714285714286},
-{3681947,3882486,3882454,0.02067,0.010335},
-{3681948,3885362,3885295,0.0268,0.01608},
-{3681949,3885295,3885255,0.0161076923076923,0.00951818181818182},
-{3681950,3889247,3888996,0.0513169811320755,0.0555061224489796},
-{3681951,3890015,3889692,0.0805471698113208,0.08538},
-{3681952,3889692,3889640,0.0101547169811321,0.0105529411764706},
-{3681953,3890216,3890097,0.0323265306122449,0.03168},
-{3681954,3890097,3890015,0.0203176470588235,0.0211469387755102},
-{3681955,3882642,3882404,0.0657714285714286,0.0600521739130435},
-{3681956,3882404,3882243,0.0532307692307692,0.0451304347826087},
-{3681957,3883915,3883824,0.0252,0.0230086956521739},
-{3682002,3866217,3866307,0.0513310344827586,-1},
-{3682003,3862163,3862130,0.00707547169811321,0.00872093023255814},
-{3682004,3862130,3861845,0.0753735849056604,0.0868434782608696},
-{3682005,3862321,3862234,0.0168230769230769,0.02187},
-{3682006,3862234,3862163,0.0162,0.0200571428571429},
-{3682007,3864204,3864140,0.0311833333333333,0.046775},
-{3682008,3864140,3864009,0.0562540540540541,0.0717724137931035},
-{3682009,3866482,3866755,-1,0.16928},
-{3682010,3853426,3853363,0.01719,0.01719},
-{3682011,3853363,3852966,0.107575609756098,0.113092307692308},
-{3682012,3853742,3853696,0.015790243902439,0.0196181818181818},
-{3682013,3853696,3853478,0.0703463414634146,0.0801166666666667},
-{3682014,3853478,3853426,0.0193756097560976,0.01986},
-{3682015,3854005,3853819,0.059985,0.109063636363636},
-{3682026,3920924,3920709,0.133466666666667,0.1287},
-{3682027,3920709,3920661,0.0446666666666667,0.03216},
-{3682028,3920820,3919754,0.378,0.378},
-{3682029,3921161,3920820,0.117545454545455,0.117545454545455},
-{3682030,3902201,3902021,0.0678857142857143,0.07425},
-{3682031,3922242,3922129,1.17994285714286,1.07733913043478},
-{3682032,3902464,3902272,0.1571,0.0689707317073171},
-{3682033,3902272,3902229,0.01665,0.0126},
-{3682034,3906221,3906200,0.00870545454545455,0.00920769230769231},
-{3682035,3906200,3906177,0.00872727272727273,0.00905660377358491},
-{3682036,3907642,3907374,0.119181818181818,0.2458125},
-{3682037,3907709,3907481,0.0379830508474576,0.0379830508474576},
-{3682038,3907481,3907331,0.0260896551724138,0.0260896551724138},
-{3682039,3907074,3907494,0.214916666666667,-1},
-{3682040,3907494,3907578,0.074895652173913,-1},
-{3682056,3922022,3921758,0.115018181818182,0.0973230769230769},
-{3682057,3921461,3921418,0.0141157894736842,0.0141157894736842},
-{3682058,3921418,3921226,0.0835578947368421,0.0882},
-{3682059,3921984,3921912,0.0384545454545454,0.047},
-{3682060,3921912,3921843,0.0231567567567568,0.0329538461538462},
-{3682070,3897302,3896652,0.2443375,0.249536170212766},
-{3682071,3902529,3902520,0.00562978723404255,0.00518823529411765},
-{3682072,3902520,3902284,0.0841125,0.0791647058823529},
-{3682073,3903006,3902785,0.0884454545454545,0.077832},
-{3682074,3902785,3902771,0.00531063829787234,0.0048},
-{3682075,3903713,3903694,0.0148695652173913,0.0148695652173913},
-{3682076,3903694,3903444,0.158109090909091,0.168309677419355},
-{3682077,3902021,3901867,0.0513658536585366,0.0513658536585366},
-{3682078,3901867,3901699,0.056504347826087,0.056504347826087},
-{3682103,3865507,3865583,0.0483352941176471,-1},
-{3682104,3867730,3867709,0.0196758620689655,-1},
-{3682105,3867709,3867501,0.26305,-1},
-{3682106,3867884,3867730,0.139258064516129,-1},
-{3682107,3868047,3868028,0.0101769230769231,-1},
-{3682108,3896470,3897558,0.212802857142857,0.215886956521739},
-{3682109,3897558,3897646,0.0153652173913043,0.0151457142857143},
-{3682110,3897219,3897316,0.0427111111111111,0.0256266666666667},
-{3682111,3897114,3897219,0.0378352941176471,0.0268},
-{3682112,3896041,3896200,0.0315794117647059,0.0315794117647059},
-{3682113,3896200,3896341,0.0313411764705882,0.0313411764705882},
-{3682114,3881212,3881058,0.0470634146341463,0.0459428571428571},
-{3682115,3879391,3879330,0.0225283018867924,0.0217090909090909},
-{3682116,3879295,3879252,0.0222923076923077,0.0214666666666667},
-{3682117,3879252,3879176,0.064596,0.0609396226415094},
-{3682118,3879176,3879165,0.124069565217391,0.105688888888889},
-{3682119,3879149,3879147,0.0185368421052632,0.0171804878048781},
-{3682120,3879082,3879081,0.0046468085106383,0.00496363636363636},
-{3682121,3879081,3879071,0.0537829787234043,0.0561733333333333},
-{3682122,3879071,3879067,0.0101375,0.0105782608695652},
-{3682123,3879067,3879063,0.0255063829787234,0.0260608695652174},
-{3682124,3879061,3879058,0.0136826086956522,0.0133914893617021},
-{3682125,3879058,3879057,0.00234782608695652,0.00229787234042553},
-{3682126,3879036,3879035,0.00888,0.0148},
-{3682127,3879035,3879034,0.0331333333333333,0.0568},
-{3682128,3881498,3881477,0.0174,0.0174},
-{3682129,3881477,3881425,0.05,0.05},
-{3682130,3881381,3881356,0.02082,-1},
-{3682131,3881356,3881267,0.0779052631578947,-1},
-{3682132,3881267,3881228,0.0358235294117647,-1},
-{3682133,3881228,3881166,0.0585666666666667,-1},
-{3682134,3881166,3880940,0.203466666666667,-1},
-{3682135,3880940,3880932,0.0099375,-1},
-{3682136,3880932,3880896,0.029925,-1},
-{3682137,3880896,3880842,0.041475,-1},
-{3682138,3880842,3880824,0.0177882352941176,-1},
-{3682139,3880824,3880722,0.0909666666666667,-1},
-{3682140,3880722,3880607,0.0967,-1},
-{3682141,3880607,3880530,0.09236,-1},
-{3682142,3880530,3880493,0.0384857142857143,-1},
-{3682143,3880493,3880458,0.03572,-1},
-{3682144,3880458,3880359,0.09728,-1},
-{3682145,3880359,3880302,0.0725571428571429,-1},
-{3682146,3880302,3880285,0.0226,-1},
-{3682147,3880285,3880175,0.100305882352941,-1},
-{3682148,3880175,3880133,0.0263368421052632,-1},
-{3682149,3880133,3880095,0.03567,-1},
-{3682150,3880095,3880039,0.0605684210526316,-1},
-{3682151,3879769,3879736,0.0366352941176471,-1},
-{3682152,3879736,3879618,0.113435294117647,-1},
-{3682153,3879391,3879446,0.0304036363636364,0.0309666666666667},
-{3682154,3879508,3879605,0.0484285714285714,0.0493090909090909},
-{3682155,3879605,3879927,0.168814285714286,0.168814285714286},
-{3682156,3880474,3880551,0.0567631578947368,0.0501627906976744},
-{3682157,3880551,3880667,0.0852972972972973,0.0717272727272727},
-{3682158,3850272,3850317,0.0233032258064516,0.02408},
-{3682159,3850317,3850599,0.123075,0.120073170731707},
-{3682160,3852316,3852344,0.0129136363636364,0.0129136363636364},
-{3682161,3852344,3852354,0.00913636363636364,0.00913636363636364},
-{3682162,3852354,3852393,0.0727866666666667,0.0727866666666667},
-{3682163,3852231,3852236,0.00129333333333333,0.00132272727272727},
-{3682164,3852236,3852316,0.0203866666666667,0.02085},
-{3682165,3852468,3852469,0.007875,0.00768292682926829},
-{3682166,3852469,3852475,0.020355,0.020355},
-{3682167,3852475,3852667,0.0754421052631579,0.0735076923076923},
-{3682168,3852667,3852728,0.0253538461538462,0.0253538461538462},
-{3682169,3852728,3852786,0.0155846153846154,0.0155846153846154},
-{3682170,3852786,3853089,0.0810878048780488,0.0773162790697674},
-{3682171,3854134,3854363,0.0605121951219512,0.0590714285714286},
-{3682172,3854363,3854463,0.0311076923076923,0.029590243902439},
-{3682173,3856182,3857392,0.277826086956522,0.277826086956522},
-{3682174,3857392,3857431,0.01644,0.0151421052631579},
-{3682175,3857431,3857561,0.100524324324324,0.0978789473684211},
-{3682176,3857561,3857610,0.047535,0.0513891891891892},
-{3682177,3857610,3857692,0.108666666666667,0.108666666666667},
-{3682178,3857692,3857712,0.029463829787234,0.0282612244897959},
-{3682179,3860438,3860826,0.151927272727273,-1},
-{3682180,3860826,3860923,0.0351529411764706,-1},
-{3682181,3860923,3861215,0.123794117647059,-1},
-{3682182,3861215,3861229,0.00745454545454545,-1},
-{3682183,3861229,3861329,0.0306176470588235,-1},
-{3682184,3861329,3861587,0.152807142857143,-1},
-{3682185,3861587,3861596,0.0155052631578947,-1},
-{3682186,3861596,3861625,0.029832,-1},
-{3682187,3861625,3861849,0.139324137931034,-1},
-{3682188,3861849,3861908,0.0319542857142857,-1},
-{3682189,3861908,3862154,0.0890914285714286,-1},
-{3682190,3862154,3862341,0.0566666666666667,-1},
-{3682191,3862341,3862492,0.0435789473684211,-1},
-{3682192,3862492,3862591,0.0288157894736842,-1},
-{3682193,3862591,3863028,0.212676923076923,-1},
-{3682194,3863028,3863095,0.0235421052631579,-1},
-{3682195,3863095,3863100,0.00241578947368421,-1},
-{3682196,3863100,3863368,0.109885714285714,-1},
-{3682197,3863368,3863400,0.0366,-1},
-{3682198,3863400,3863406,0.0117230769230769,-1},
-{3682199,3863406,3863079,0.191914285714286,-1},
-{3682200,3863079,3862509,0.33118,-1},
-{3682201,3862509,3862499,0.00759130434782609,-1},
-{3682202,3862499,3862477,0.0167217391304348,-1},
-{3682203,3862477,3862702,0.0539739130434783,0.0551733333333333},
-{3682204,3862702,3863544,0.259261224489796,0.254076},
-{3682205,3863544,3863575,0.00827547169811321,0.00843461538461538},
-{3682206,3863575,3863872,0.0974076923076923,0.0993176470588235},
-{3682207,3863872,3864333,0.1813625,0.193453333333333},
-{3682208,3864333,3864358,0.00452195121951219,0.00487894736842105},
-{3682209,3864358,3864522,0.0438947368421053,0.0450810810810811},
-{3682210,3864522,3864570,0.0215090909090909,0.0197166666666667},
-{3682211,3864570,3864660,0.05268,0.0439},
-{3682212,3864660,3864648,0.0135724137931034,0.0112457142857143},
-{3682213,3864648,3864634,0.010258064516129,0.00908571428571429},
-{3682214,3864634,3864281,0.215604545454545,0.206230434782609},
-{3682215,3864281,3864250,0.068376,0.0697714285714286},
-{3682216,3864250,3864247,0.004548,0.0047375},
-{3682217,3864247,3864245,0.0045,0.0046875},
-{3682218,3864245,3864289,0.100126530612245,0.100126530612245},
-{3682219,3864289,3864300,0.0083375,0.00851489361702128},
-{3682220,3864300,3864350,0.0338042553191489,0.0345391304347826},
-{3682221,3864350,3864401,0.019095652173913,0.019095652173913},
-{3682222,3864401,3864449,0.0151772727272727,0.01484},
-{3682223,3864732,3864805,0.0625125,-1},
-{3682224,3864805,3864829,0.0168666666666667,-1},
-{3682225,3851086,3851188,0.031,0.0291764705882353},
-{3682226,3851322,3851352,0.00738666666666667,0.00738666666666667},
-{3682227,3851352,3851383,0.0120681818181818,0.0120681818181818},
-{3682228,3851899,3851965,0.0128608695652174,0.0140857142857143},
-{3682229,3851965,3852231,0.06488,0.0695142857142857},
-{3682230,3851383,3851866,0.12792,0.130827272727273},
-{3682231,3851866,3851899,0.00944347826086956,0.00987272727272727},
-{3682232,3852456,3852468,0.0299581395348837,0.0306714285714286},
-{3682233,3890080,3890037,0.0200727272727273,-1},
-{3682234,3890037,3889991,0.0202545454545455,-1},
-{3682235,3889991,3889912,0.0338181818181818,-1},
-{3682236,3890201,3890181,0.0101636363636364,-1},
-{3682237,3890436,3890282,0.0736,-1},
-{3682238,3890282,3890201,0.0404689655172414,-1},
-{3682239,3890731,3890684,0.0201567567567568,-1},
-{3682240,3890684,3890505,0.0675166666666667,-1},
-{3682241,3890505,3890436,0.0289090909090909,-1},
-{3682242,3891127,3891083,0.0151272727272727,-1},
-{3682243,3890867,3890828,0.0177166666666667,-1},
-{3682244,3893569,3893610,0.0207409090909091,0.0194170212765957},
-{3682245,3893610,3892785,0.3944,0.3944},
-{3682246,3892785,3892108,0.297733333333333,0.2772},
-{3682247,3892108,3892042,0.0284275862068966,0.032976},
-{3682248,3887590,3887559,0.00987,0.00858260869565217},
-{3682249,3887559,3887419,0.034572972972973,0.0290727272727273},
-{3682250,3887419,3887284,0.0651310344827586,0.04722},
-{3682251,3887138,3886889,0.098772972972973,0.117890322580645},
-{3682252,3890351,3890434,0.03436,-1},
-{3682253,3890434,3890508,0.0322595744680851,-1},
-{3682254,3890508,3890669,0.0599375,-1},
-{3682255,3890669,3890686,0.005275,-1},
-{3682256,3890686,3890702,0.006375,-1},
-{3682257,3890702,3890912,0.0938590909090909,-1},
-{3682258,3890912,3890960,0.0179,-1},
-{3682259,3890960,3891003,0.0138285714285714,-1},
-{3682260,3891359,3891476,0.0544578947368421,0.0470318181818182},
-{3682261,3891476,3891599,0.08720625,0.069765},
-{3682262,3891599,3891623,0.0123771428571429,0.0111076923076923},
-{3682263,3891623,3891649,0.0164909090909091,0.01700625},
-{3682264,3891649,3891666,0.0108705882352941,0.01155},
-{3682265,3891680,3892057,0.211484210526316,0.243527272727273},
-{3682266,3892057,3892088,0.0174810810810811,0.0143733333333333},
-{3682267,3892088,3892124,0.0233513513513514,0.020093023255814},
-{3682268,3892442,3892489,0.024465,0.0271833333333333},
-{3682269,3892489,3892519,0.0126615384615385,0.0137166666666667},
-{3682270,3892519,3892742,0.14472,0.140051612903226},
-{3682271,3892742,3892782,0.0130833333333333,0.0181153846153846},
-{3682272,3892782,3892960,0.073275,0.172411764705882},
-{3682273,3892960,3892978,0.00655909090909091,0.012025},
-{3682274,3892978,3892991,0.00610666666666667,0.010992},
-{3682275,3892991,3893009,0.00592173913043478,0.0100888888888889},
-{3682276,3893009,3893066,0.0282510638297872,0.04149375},
-{3682277,3893066,3893102,0.0161125,0.0209027027027027},
-{3682278,3893102,3893128,0.011775,0.01413},
-{3682279,3893490,3893569,0.0399627906976744,0.0373565217391304},
-{3682280,3893412,3893482,0.032504347826087,0.0318127659574468},
-{3682281,3893482,3893490,0.00614666666666667,0.00601304347826087},
-{3682282,3885748,3885714,0.00769230769230769,0.00697674418604651},
-{3682283,3885714,3885692,0.00983076923076923,0.00891627906976744},
-{3682284,3886157,3885841,0.0876972972972973,0.0737454545454545},
-{3682285,3885841,3885748,0.0260368421052632,0.0224863636363636},
-{3682286,3887035,3886991,0.0128045454545455,0.0131023255813954},
-{3682287,3886991,3886819,0.0516818181818182,0.0516818181818182},
-{3682288,3886819,3886794,0.00703255813953488,0.00672},
-{3682289,3888762,3888438,0.0791428571428571,0.0773023255813954},
-{3682290,3888438,3888298,0.0394578947368421,0.03332},
-{3682291,3888298,3888249,0.0112263157894737,0.00927391304347826},
-{3682292,3885343,3885007,0.260011764705882,0.163711111111111},
-{3682293,3885007,3884966,0.02976,0.0283428571428571},
-{3682294,3883587,3883447,0.0915130434782609,0.0637818181818182},
-{3682295,3883447,3883247,0.18496,0.102755555555556},
-{3682296,3883181,3882988,0.095825,0.121042105263158},
-{3682297,3882988,3882939,0.0245333333333333,0.026496},
-{3682298,3882276,3882251,0.00956129032258065,0.0128869565217391},
-{3682299,3882251,3882176,0.03436,0.0468545454545455},
-{3682300,3882176,3882060,0.0741111111111111,0.0741111111111111},
-{3682301,3882060,3881910,0.117442105263158,0.092975},
-{3682302,3880766,3880930,0.060375,-1},
-{3682303,3890563,3890456,0.0312510638297872,0.0282461538461538},
-{3682304,3890456,3890216,0.0716936170212766,0.0660705882352941},
-{3682305,3890608,3890563,0.009425,0.0087},
-{3682306,3889640,3889509,0.0302666666666667,0.0320470588235294},
-{3682307,3889509,3889280,0.0522444444444444,0.056424},
-{3682308,3889280,3889247,0.00956666666666667,0.010332},
-{3682309,3888996,3888824,0.035977358490566,0.039725},
-{3682310,3888824,3888712,0.0215207547169811,0.0237625},
-{3682311,3888712,3888581,0.0286528301886792,0.0316375},
-{3682312,3888581,3888401,0.0374264150943396,0.0422042553191489},
-{3682313,3888401,3888238,0.0315396226415094,0.0355659574468085},
-{3682314,3888238,3888141,0.0238615384615385,0.0264},
-{3682315,3888141,3888103,0.00613846153846154,0.00679148936170213},
-{3682316,3888103,3887960,0.037356,0.040604347826087},
-{3682317,3887960,3887930,0.004608,0.00500869565217391},
-{3682318,3887930,3887879,0.009012,0.00979565217391304},
-{3682319,3886885,3886727,0.0414367346938775,0.0483428571428571},
-{3682320,3886727,3886595,0.0363673469387755,0.0456923076923077},
-{3682321,3886595,3886571,0.00762857142857143,0.00983684210526316},
-{3682322,3886571,3886461,0.0274897959183673,0.0384857142857143},
-{3682323,3884244,3884199,0.0147081081081081,0.0143210526315789},
-{3682324,3884199,3884157,0.0147076923076923,0.0155027027027027},
-{3682325,3881971,3881880,0.025493023255814,0.0267365853658537},
-{3682326,3881880,3881286,0.157581818181818,0.165085714285714},
-{3682327,3882120,3882009,0.0419707317073171,0.0400186046511628},
-{3682328,3882009,3881971,0.0103674418604651,0.0106142857142857},
-{3682329,3882145,3882120,0.00651,0.00578666666666667},
-{3682330,3882243,3882166,0.0252307692307692,0.0218666666666667},
-{3682331,3882166,3882145,0.007125,0.00633333333333333},
-{3682332,3882756,3882723,0.00766666666666667,0.0075},
-{3682333,3882830,3882756,0.0171130434782609,0.0174933333333333},
-{3682334,3883154,3882830,0.0815869565217391,0.0915365853658537},
-{3682335,3883205,3883188,0.00577021276595745,0.00713684210526316},
-{3682336,3883188,3883154,0.00877021276595745,0.0108473684210526},
-{3682337,3883634,3883510,0.036975,0.0343953488372093},
-{3682338,3883824,3883669,0.0439230769230769,0.0380666666666667},
-{3682339,3883669,3883634,0.00981,0.00872},
-{3682340,3884160,3883915,0.0654136363636364,0.0625695652173913},
-{3682341,3884379,3884337,0.0122590909090909,0.0119866666666667},
-{3682342,3884337,3884160,0.0451333333333333,0.0451333333333333},
-{3682359,3849505,3849536,0.0160588235294118,0.0165454545454545},
-{3682360,3849536,3849621,0.0712,0.0689032258064516},
-{3682363,3865563,3866792,0.227432727272727,0.236015094339623},
-{3682364,3850599,3851063,0.1328125,0.1275},
-{3682365,3851063,3851086,0.00697959183673469,0.00670588235294118},
-{3682366,3900113,3899184,0.31978,0.290709090909091},
-{3682367,3899184,3898713,0.172778947368421,0.161449180327869},
-{3682368,3893128,3893387,0.130625,0.136304347826087},
-{3682369,3893387,3893412,0.00864255319148936,0.00864255319148936},
-{3682370,3880667,3880725,0.0498342857142857,0.0396409090909091},
-{3682371,3880725,3880766,0.0302432432432432,0.0266428571428571},
-{3682374,3889671,3889634,0.01665,0.01998},
-{3682375,3889634,3889510,0.0648,0.1404},
-{3682376,3873858,3873420,0.192275,0.15382},
-{3682377,3873420,3873390,0.0108923076923077,0.00809142857142857},
-{3682378,3868028,3867884,0.156514285714286,-1},
-{3682379,3864449,3864567,0.05229,0.0475363636363636},
-{3682380,3864567,3864587,0.00848571428571429,0.00675},
-{3682381,3879330,3879317,0.00528679245283019,0.00518888888888889},
-{3682382,3879317,3879295,0.00985384615384615,0.00948888888888889},
-{3682383,3879018,3879012,0.01985,0.0144363636363636},
-{3682384,3879012,3879010,0.0135,0.010125},
-{3682385,3881852,3881768,0.0581,0.0422545454545454},
-{3682386,3881768,3881754,0.01952,0.00944516129032258},
-{3682387,3881058,3881007,0.01392,0.0142769230769231},
-{3682388,3881007,3880971,0.012045,0.0126789473684211},
-{3682401,3901699,3901401,0.098595652173913,0.098595652173913},
-{3682402,3901401,3901282,0.0438279069767442,0.0509351351351351},
-{3682425,3916852,3915020,0.5187,0.528130909090909},
-{3682455,3848705,3848689,0.105994736842105,0.108859459459459},
-{3682456,3848689,3848670,0.01836,0.0188307692307692},
-{3682551,3875051,3874249,-1,-1},
-{3682552,3876061,3876004,-1,-1},
-{3682553,3876004,3875051,-1,-1},
-{3682556,3874077,3873697,0.325825,0.300761538461538},
-{3682557,3873697,3873622,0.047341935483871,0.0444727272727273},
-{3682558,3847618,3847649,0.031475,0.0321446808510638},
-{3682559,3847649,3847666,0.0267829787234043,0.0267829787234043},
-{3682577,3881754,3881736,0.01165,-1},
-{3682578,3881736,3881710,0.0170571428571429,-1},
-{3682598,3897850,3897719,0.0697363636363636,0.139472727272727},
-{3682599,3897719,3897302,0.1998,0.31968},
-{3682601,3868688,3868486,-1,0.126833333333333},
-{3682602,3868486,3868384,-1,0.0609},
-{3682604,3886340,3886501,0.0891891891891892,0.0891891891891892},
-{3682611,3884157,3883889,0.087135,0.0968166666666667},
-{3682612,3883889,3883650,0.0810333333333333,0.09724},
-{3682613,3891148,3891086,0.0148,0.0173739130434783},
-{3682614,3891086,3890608,0.128952941176471,0.134216326530612},
-{3682615,3865583,3866027,0.197043243243243,-1},
-{3682616,3866027,3866127,0.04779375,-1},
-{3682623,3919382,3919402,0.00656363636363636,0.005415},
-{3682662,3915531,3914022,0.265835294117647,0.278104615384615},
-{3682663,3914022,3909556,0.608828571428571,0.645727272727273},
-{3682664,3917078,3915550,0.297590163934426,0.31298275862069},
-{3682665,3915550,3915531,0.003534375,0.00370819672131148},
-{3682666,3889167,3888995,0.0468439024390244,-1},
-{3682667,3888995,3888883,0.0352769230769231,-1},
-{3682668,3915020,3914772,0.125513513513514,0.211090909090909},
-{3682669,3914772,3913851,0.266082352941176,0.260965384615385},
-{3682687,3920434,3920048,0.151405263157895,0.19178},
-{3682688,3920048,3919919,0.0642769230769231,0.0677513513513514},
-{3682691,3921055,3920704,0.2262,0.201964285714286},
-{3682692,3920704,3920602,0.052725,0.0482057142857143},
-{3682693,3893934,3894018,0.0217698113207547,0.0213666666666667},
-{3682694,3894018,3897114,0.745134545454545,0.706593103448276},
-{3682695,3891804,3891714,0.0277245283018868,0.029388},
-{3682696,3891714,3891439,0.0724384615384615,0.0768734693877551},
-{3682700,3891083,3890895,0.0904285714285714,-1},
-{3682701,3890895,3890867,0.0109166666666667,-1},
-{3682705,3888520,3887982,0.137246808510638,0.1343875},
-{3682706,3887982,3887819,0.0371866666666667,0.0341510204081633},
-{3682707,3888913,3888791,0.0277787234042553,0.0277787234042553},
-{3682708,3888791,3888520,0.0698217391304348,0.068336170212766}
-};
diff --git a/src/trsp/tester/issue191-bad.h b/src/trsp/tester/issue191-bad.h
deleted file mode 100644
index 398904c..0000000
--- a/src/trsp/tester/issue191-bad.h
+++ /dev/null
@@ -1,22599 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-#define NEDGE 22573
-
-static edge_t edges[NEDGE] = {
-{2950984,3847538,3847326,0.1338,0.14049},
-{2951013,3848117,3848557,0.21634,0.196672727272727},
-{2951139,3847707,3848229,0.281288888888889,0.361657142857143},
-{2951145,3846938,3848653,1.38490588235294,1.38490588235294},
-{2951177,3847689,3847383,0.15845,0.165339130434783},
-{2951237,3847076,3848452,0.749777777777778,0.749777777777778},
-{2951267,3847751,3848117,0.147342857142857,0.156272727272727},
-{2951290,3847383,3847326,0.453022222222222,0.453022222222222},
-{2951291,3846724,3846228,0.190076470588235,0.190076470588235},
-{2951341,3846522,3845953,0.280711111111111,0.261351724137931},
-{2951342,3846323,3847649,1.08084444444444,1.08084444444444},
-{2951510,3847387,3846522,0.392133333333333,0.407215384615385},
-{2951520,3847326,3846724,0.2280375,0.208491428571429},
-{2951553,3846902,3847957,0.503844444444444,0.503844444444444},
-{2951555,3846959,3848550,0.9066,0.9066},
-{2951673,3846882,3848633,0.989,0.989},
-{2951702,3846966,3848419,0.406975,0.424669565217391},
-{2951743,3848471,3846688,0.267018947368421,1000000},
-{2962266,3847391,3847542,1000000,0.129814285714286},
-{2962477,3852941,3853106,0.161454545454545,0.190285714285714},
-{2962549,3852941,3852856,0.0389538461538462,1000000},
-{2962550,3852856,3852882,0.0715071428571429,1000000},
-{2962551,3852988,3852941,0.0468,1000000},
-{2962552,3852988,3852882,1000000,0.0600692307692308},
-{2962553,3853322,3852988,0.152027586206897,0.137775},
-{2962554,3853454,3853322,0.0454714285714286,0.0454714285714286},
-{2962555,3851625,3852882,0.471342857142857,0.611},
-{2962559,3852335,3852224,0.0390666666666667,0.0390666666666667},
-{2962560,3852306,3852367,0.01944,0.0220909090909091},
-{2962561,3853717,3853454,0.0938347826086957,0.0981},
-{2962562,3854088,3853717,0.1192875,0.121825531914894},
-{2962563,3854566,3854088,0.1677125,0.1677125},
-{2962564,3854892,3854566,0.124852173913043,0.122195744680851},
-{2962565,3854995,3854892,0.0395217391304348,0.0386808510638298},
-{2962566,3855301,3854995,0.111717391304348,0.1142},
-{2962567,3855705,3855301,0.143569565217391,0.14676},
-{2962568,3855944,3855705,0.102559090909091,0.10028},
-{2962569,3856228,3855944,0.0917869565217391,0.0981906976744186},
-{2962570,3856377,3856228,0.0465333333333333,0.0465333333333333},
-{2962571,3863773,3862710,0.35272,0.360736363636364},
-{2962572,3864110,3863773,0.215115789473684,0.215115789473684},
-{2962573,3866457,3865801,0.1674,0.17205},
-{2962574,3865801,3865598,0.0696827586206897,0.0594352941176471},
-{2962575,3865598,3864916,1000000,0.213658064516129},
-{2962576,3864122,3863836,0.160578260869565,0.167877272727273},
-{2962577,3867378,3866457,0.273418181818182,0.265376470588235},
-{2962578,3867227,3867421,0.18181875,0.19394},
-{2962579,3867069,3867227,0.138723076923077,0.138723076923077},
-{2962580,3867018,3867069,0.0444,0.0411512195121951},
-{2962584,3870943,3871224,0.4197,0.368517073170732},
-{2962585,3872002,3872095,0.0696555555555556,1000000},
-{2962589,3878423,3878571,0.18618,0.223416},
-{2962590,3878423,3877865,0.268278260869565,1000000},
-{2962591,3877798,3877865,0.0944117647058823,0.0697826086956522},
-{2962592,3877742,3877798,0.07065,0.0605571428571429},
-{2962593,3877557,3877742,0.1438125,0.1438125},
-{2962594,3878781,3878423,0.1689,1000000},
-{2962595,3879207,3878781,0.1523625,1000000},
-{2962596,3879689,3879207,0.237784615384615,1000000},
-{2962603,3881159,3881235,0.0644,0.0709714285714286},
-{2962638,3854912,3854769,0.051446511627907,0.06145},
-{2962639,3855091,3854912,0.0777428571428571,0.0697692307692308},
-{2962640,3855091,3855370,0.107928571428571,0.174346153846154},
-{2962641,3856367,3856069,0.131363636363636,0.0985227272727273},
-{2962642,3856681,3856367,0.130994117647059,0.106042857142857},
-{2962643,3857387,3856681,0.243616666666667,0.1827125},
-{2962644,3856684,3856377,0.0975136363636364,0.0912893617021277},
-{2962645,3857350,3857043,0.150514285714286,0.195111111111111},
-{2962646,3857529,3857350,0.183768,0.14356875},
-{2962647,3857832,3857529,0.102351219512195,0.0975906976744186},
-{2962648,3859655,3859839,0.104884615384615,0.0940344827586207},
-{2962649,3858161,3857832,0.104466666666667,0.109325581395349},
-{2962650,3858404,3858161,0.07568,0.0774},
-{2962651,3858497,3858404,0.0338045454545455,0.0345906976744186},
-{2962652,3864854,3865191,0.163842857142857,0.181089473684211},
-{2962653,3865240,3864854,0.128692307692308,0.132078947368421},
-{2962654,3865521,3865240,0.0996162162162162,0.0898975609756098},
-{2962655,3866809,3867018,0.177173684210526,0.19236},
-{2962656,3866749,3866809,0.075552,0.06296},
-{2962657,3867243,3866749,0.16753125,0.141078947368421},
-{2962658,3867939,3867243,0.167113043478261,0.167113043478261},
-{2962659,3868738,3867939,0.223138461538462,0.212253658536585},
-{2962660,3870348,3869892,0.196466666666667,0.3789},
-{2962661,3867563,3866560,0.268910526315789,0.237641860465116},
-{2962662,3867790,3867563,0.0752,0.0689333333333333},
-{2962663,3871128,3871204,1000000,0.0642230769230769},
-{2962664,3871687,3871888,1000000,0.0552363636363636},
-{2962665,3872095,3872273,0.18952,1000000},
-{2962666,3872273,3872292,0.0428903225806452,1000000},
-{2962667,3870734,3870699,0.02552,1000000},
-{2962668,3872435,3872452,1000000,0.0138346153846154},
-{2962669,3871968,3871888,0.0976636363636364,1000000},
-{2962670,3872630,3872621,1000000,0.0543789473684211},
-{2962671,3872446,3872166,0.09675,0.159352941176471},
-{2962672,3872711,3872716,1000000,0.0217945945945946},
-{2962673,3876266,3875896,1000000,0.219495652173913},
-{2962674,3877492,3877557,0.0462,0.04224},
-{2962675,3877428,3877492,0.04242,0.0374294117647059},
-{2962676,3877288,3877428,0.1198,0.0951352941176471},
-{2962677,3877137,3877288,0.129537931034483,0.129537931034483},
-{2962678,3876979,3877137,0.169909090909091,0.178},
-{2962679,3876741,3876979,1000000,0.227},
-{2962680,3876509,3876741,1000000,0.214968},
-{2962681,3876366,3876509,1000000,0.203052631578947},
-{2962682,3876266,3876366,0.0659612903225806,0.13632},
-{2962683,3877557,3878087,0.29004,1000000},
-{2962684,3878087,3878194,0.0900461538461539,1000000},
-{2962685,3878519,3878194,1000000,0.14895},
-{2962686,3878883,3878519,1000000,0.199825},
-{2962687,3878883,3879207,1000000,0.308575},
-{2962688,3878576,3878883,1000000,0.2563875},
-{2962689,3880096,3879689,0.222022222222222,1000000},
-{2962690,3878467,3878576,0.0984,0.0984},
-{2962691,3878445,3878467,0.0262125,0.0262125},
-{2962692,3878287,3878445,1000000,0.1197375},
-{2962693,3878067,3878287,1000000,0.1737},
-{2962694,3879433,3878883,1000000,0.237688888888889},
-{2962695,3879844,3879433,1000000,0.206834482758621},
-{2962696,3879105,3879433,0.393428571428571,1000000},
-{2962697,3878960,3879105,0.106778571428571,1000000},
-{2962698,3878931,3878960,0.0285870967741935,1000000},
-{2962699,3878798,3878931,0.130531034482759,1000000},
-{2962700,3876017,3876891,1000000,0.240251162790698},
-{2962701,3877564,3877811,1000000,0.210577777777778},
-{2962702,3878384,3878798,0.35678,1000000},
-{2962703,3880536,3880096,0.182175,1000000},
-{2962704,3880209,3879844,1000000,0.169036363636364},
-{2962705,3880766,3880209,1000000,0.487725},
-{2962706,3884123,3884820,0.225671428571429,0.225671428571429},
-{2962707,3883627,3884123,0.22654,0.151026666666667},
-{2962708,3883165,3883627,0.2178,0.146778260869565},
-{2962709,3884820,3885663,0.226775510204082,0.226775510204082},
-{2962710,3890112,3889707,0.165123529411765,0.147742105263158},
-{2962713,3894341,3893822,1000000,0.208969565217391},
-{2962714,3894941,3894341,1000000,0.252926086956522},
-{2962715,3895407,3894373,0.620418181818182,0.499360975609756},
-{2962716,3896232,3895757,0.187486956521739,0.165853846153846},
-{2962717,3895532,3894941,1000000,0.231404081632653},
-{2962720,3898398,3898807,0.121689795918367,0.116917647058824},
-{2962721,3898282,3898398,0.0318,0.0311510204081633},
-{2962722,3897752,3898282,0.166271428571429,0.174585},
-{2962723,3897202,3897752,0.235086486486486,0.193293333333333},
-{2962724,3896926,3897202,0.0942130434782609,0.0902875},
-{2962737,3851455,3849926,0.511723076923077,0.525189473684211},
-{2962738,3851907,3851455,0.148381818181818,1000000},
-{2962739,3852261,3851907,0.08667,1000000},
-{2962740,3852696,3852261,0.145851428571429,1000000},
-{2962741,3854086,3853919,0.09462,0.135171428571429},
-{2962742,3854151,3854086,0.0231771428571429,0.0219243243243243},
-{2962743,3854578,3854151,0.130448780487805,0.124381395348837},
-{2962744,3855947,3854578,0.357354545454545,0.357354545454545},
-{2962745,3856149,3855947,0.114884210526316,0.0808444444444444},
-{2962746,3858245,3857387,0.251575,0.227841509433962},
-{2962747,3858675,3858245,0.16076170212766,0.1799},
-{2962748,3859167,3858994,0.0588967741935484,0.1074},
-{2962749,3859781,3859259,0.15255652173913,0.159490909090909},
-{2962750,3859896,3859781,0.0376695652173913,0.0402976744186046},
-{2962751,3861043,3859948,0.323026666666667,0.323026666666667},
-{2962752,3860787,3860524,0.0635875,0.10174},
-{2962753,3867916,3868053,1000000,0.0938526315789474},
-{2962754,3868197,3868053,0.08542,0.08542},
-{2962755,3868867,3868197,0.204963636363636,0.270552},
-{2962756,3869451,3869047,1000000,0.116076923076923},
-{2962757,3869047,3868665,1000000,0.101769230769231},
-{2962758,3868665,3867861,1000000,0.231048648648649},
-{2962759,3871981,3871318,1000000,0.28737},
-{2962760,3872440,3871963,0.27048,1000000},
-{2962761,3871981,3872483,0.167785714285714,1000000},
-{2962762,3872483,3872529,0.0848108108108108,1000000},
-{2962763,3872459,3872483,0.108333333333333,1000000},
-{2962764,3872455,3872459,0.105391304347826,1000000},
-{2962765,3872453,3872455,0.18435652173913,1000000},
-{2962766,3872458,3872453,0.0647632653061224,1000000},
-{2962767,3872010,3871981,1000000,0.16605},
-{2962768,3872045,3872010,1000000,0.12753},
-{2962769,3872064,3872052,1000000,0.163297674418605},
-{2962770,3872044,3872064,1000000,0.0792857142857143},
-{2962771,3871930,3872022,1000000,0.1277},
-{2962772,3875393,3875481,0.14904,0.156884210526316},
-{2962773,3875266,3875334,0.157268571428571,0.148767567567568},
-{2962774,3876026,3875527,0.218378571428571,0.244584},
-{2962775,3876891,3877289,1000000,0.107818604651163},
-{2962776,3877289,3877564,1000000,0.329964705882353},
-{2962777,3877289,3877610,1000000,0.0784571428571429},
-{2962778,3877610,3877893,1000000,0.0752372093023256},
-{2962779,3877893,3878431,1000000,0.175266666666667},
-{2962780,3878389,3878789,0.117954545454545,1000000},
-{2962781,3876995,3877110,1000000,0.169163636363636},
-{2962782,3876876,3876995,1000000,0.17660625},
-{2962783,3876735,3876876,1000000,0.227871428571429},
-{2962784,3878167,3878384,0.19146,1000000},
-{2962785,3877893,3878167,0.221123076923077,1000000},
-{2962786,3877616,3877719,0.19965,1000000},
-{2962787,3877488,3877616,0.17353125,1000000},
-{2962788,3877326,3877488,0.1716,1000000},
-{2962789,3876846,3876735,1000000,0.385827272727273},
-{2962790,3877274,3877326,0.239777777777778,1000000},
-{2962791,3880269,3880471,0.1217,0.125896551724138},
-{2962792,3880204,3880269,0.033576,0.02798},
-{2962793,3882281,3883165,0.611463157894737,0.283360975609756},
-{2962794,3882763,3883165,0.254045454545455,0.109588235294118},
-{2962795,3882468,3882763,0.09996,0.0740444444444444},
-{2962796,3882165,3882468,0.106526086956522,0.0924566037735849},
-{2962797,3881858,3882165,0.137184615384615,0.102888461538462},
-{2962798,3881457,3881858,0.161735294117647,0.112224489795918},
-{2962799,3881101,3881457,0.128846511627907,0.142061538461538},
-{2962800,3880728,3881101,0.147236842105263,0.3496875},
-{2962801,3880471,3880728,0.118994594594595,0.1375875},
-{2962802,3883811,3883165,1000000,0.442248},
-{2962803,3884306,3883811,1000000,0.25595625},
-{2962804,3884669,3884306,1000000,0.2099},
-{2962805,3884867,3884669,1000000,0.25445},
-{2962806,3885287,3885208,0.0433304347826087,1000000},
-{2962807,3880492,3880269,0.120783333333333,1000000},
-{2962808,3880738,3880492,0.113184615384615,1000000},
-{2962809,3880991,3880676,1000000,0.12576},
-{2962810,3886651,3887278,0.217774468085106,0.204708},
-{2962811,3886073,3886651,0.2529,0.343221428571429},
-{2962812,3885287,3886073,0.417311111111111,0.312983333333333},
-{2962813,3885046,3885287,0.068425,0.0763813953488372},
-{2962814,3884829,3885046,0.0738,0.0690893617021276},
-{2962815,3884772,3884829,0.04638,1000000},
-{2962816,3884559,3884829,0.085953488372093,0.0786382978723404},
-{2962817,3884184,3884559,0.130369565217391,0.127595744680851},
-{2962818,3883835,3884184,0.127215,0.118339534883721},
-{2962819,3885258,3885339,0.2779125,1000000},
-{2962820,3884829,3884892,0.0462521739130435,1000000},
-{2962821,3885393,3885258,1000000,0.0578823529411765},
-{2962822,3885695,3885393,1000000,0.140876923076923},
-{2962823,3886085,3885695,1000000,0.19668},
-{2962824,3893554,3893800,0.127131818181818,0.124306666666667},
-{2962825,3893318,3893554,0.129333333333333,0.108279069767442},
-{2962826,3892117,3893318,0.46528085106383,0.437364},
-{2962827,3893800,3894171,0.150528,0.150528},
-{2962828,3896657,3896232,0.240975,0.265903448275862},
-{2962829,3896657,3896926,0.0924533333333333,0.0924533333333333},
-{2962830,3896217,3896471,0.1482,1000000},
-{2962831,3895336,3895663,0.383684210526316,0.158478260869565},
-{2962832,3895085,3895336,0.12028,0.1127625},
-{2962833,3894567,3894798,0.23124,0.121705263157895},
-{2962834,3894798,3893554,0.749825806451613,0.860911111111111},
-{2962835,3896441,3896217,0.11787,1000000},
-{2962836,3897856,3897312,0.178221052631579,1000000},
-{2962853,3854789,3854740,0.0235363636363636,0.0246571428571429},
-{2962854,3851476,3851083,0.281120930232558,0.2518375},
-{2962855,3857984,3858104,0.0965414634146341,0.08796},
-{2962856,3861802,3861631,0.0632684210526316,0.0572428571428572},
-{2962857,3862517,3861802,0.244871428571429,0.239176744186047},
-{2962858,3864629,3864346,0.144933333333333,0.3261},
-{2962859,3863339,3862517,0.433509677419355,0.407236363636364},
-{2962860,3864346,3864258,0.0437032258064516,0.0483857142857143},
-{2962861,3864258,3863915,0.199176923076923,0.18495},
-{2962862,3863915,3863339,0.495733333333333,0.387965217391304},
-{2962863,3866618,3865566,0.424214285714286,0.387326086956522},
-{2962864,3865109,3865008,0.382828571428571,1000000},
-{2962865,3864686,3863915,0.470766666666667,0.546696774193548},
-{2962866,3864784,3863339,1000000,0.897434482758621},
-{2962867,3870613,3869940,1000000,0.180141176470588},
-{2962868,3871322,3870613,1000000,0.168753846153846},
-{2962869,3871930,3871338,0.148165714285714,1000000},
-{2962870,3868086,3867239,1000000,0.246158823529412},
-{2962871,3868558,3868086,1000000,0.127897297297297},
-{2962872,3868976,3868662,1000000,0.0827833333333333},
-{2962873,3869270,3868976,1000000,0.0783157894736842},
-{2962874,3869931,3869270,1000000,0.19754},
-{2962875,3870046,3869931,1000000,0.033951724137931},
-{2962876,3870421,3870046,1000000,0.0981333333333333},
-{2962877,3870904,3870421,1000000,0.120047368421053},
-{2962878,3871347,3870904,1000000,0.11185},
-{2962879,3867497,3866913,0.28248,0.252214285714286},
-{2962880,3871935,3871347,1000000,0.272021052631579},
-{2962881,3871935,3871914,1000000,0.131431578947368},
-{2962882,3871942,3871935,1000000,0.05551875},
-{2962883,3871887,3871942,1000000,0.159441176470588},
-{2962884,3872467,3872468,0.174882352941176,1000000},
-{2962885,3872489,3872467,0.0720166666666667,1000000},
-{2962886,3871929,3871877,1000000,0.07392},
-{2962887,3872000,3871929,1000000,0.0984857142857143},
-{2962888,3872062,3872008,1000000,0.0706186046511628},
-{2962889,3872130,3872062,1000000,0.138175609756098},
-{2962890,3872265,3872130,1000000,0.159465},
-{2962891,3872517,3872489,0.0921681818181818,1000000},
-{2962892,3872555,3872517,0.0824936170212766,1000000},
-{2962893,3872597,3872555,0.105782608695652,1000000},
-{2962894,3872742,3872597,0.257178947368421,1000000},
-{2962895,3872375,3872265,1000000,0.100976470588235},
-{2962896,3872375,3872742,0.2781,0.256707692307692},
-{2962897,3876041,3876026,0.292296774193548,0.312455172413793},
-{2962898,3876458,3876476,0.0106137931034483,0.00879428571428571},
-{2962899,3876476,3876846,0.15815,0.1186125},
-{2962900,3876055,3876053,0.10315,0.154725},
-{2962901,3874960,3875344,0.314113043478261,0.258021428571429},
-{2962902,3875344,3875800,0.303176470588235,0.20616},
-{2962903,3875315,3875344,0.19524,1000000},
-{2962904,3874982,3874960,1000000,0.160386206896552},
-{2962905,3875326,3875315,0.157696551724138,1000000},
-{2962906,3875054,3874982,1000000,0.136248648648649},
-{2962907,3875389,3875326,0.163296774193548,1000000},
-{2962908,3875121,3875054,1000000,0.123076923076923},
-{2962909,3875448,3875389,0.176111111111111,1000000},
-{2962910,3872742,3872911,0.09912,0.1239},
-{2962911,3876846,3877274,0.164422222222222,0.170746153846154},
-{2962912,3877274,3877854,0.146526315789474,0.206222222222222},
-{2962913,3877854,3878444,0.15387,0.15387},
-{2962914,3878444,3879157,0.350504347826087,0.287914285714286},
-{2962915,3876911,3876846,1000000,0.24498},
-{2962916,3876981,3876911,1000000,0.18195652173913},
-{2962917,3877045,3876981,1000000,0.28029},
-{2962918,3876495,3876911,0.158111111111111,0.152464285714286},
-{2962919,3876911,3877340,0.200918181818182,0.122783333333333},
-{2962920,3877340,3877906,0.208707692307692,0.200977777777778},
-{2962921,3877906,3878473,0.20394,0.30591},
-{2962922,3878473,3879147,0.416833333333333,0.267964285714286},
-{2962923,3877340,3877274,0.225463636363636,1000000},
-{2962924,3877398,3877340,0.246,1000000},
-{2962925,3876537,3876495,1000000,0.187663636363636},
-{2962926,3876981,3877398,0.14488,0.135825},
-{2962927,3876537,3876981,0.144483870967742,0.154448275862069},
-{2962928,3876055,3876105,0.08235,0.08235},
-{2962929,3876163,3876137,0.0718137931034483,0.06942},
-{2962930,3876239,3876163,0.15788275862069,0.14308125},
-{2962931,3876319,3876239,0.175137931034483,0.153909090909091},
-{2962932,3876422,3876319,0.1674,0.186715384615385},
-{2962933,3876463,3876422,1000000,0.0846521739130435},
-{2962934,3879753,3879502,0.15164,0.162471428571429},
-{2962935,3879985,3879753,0.171333333333333,0.15951724137931},
-{2962936,3880219,3879985,0.1938,0.185725},
-{2962937,3880449,3880219,0.16985,0.185290909090909},
-{2962938,3880716,3880449,0.2175,0.2175},
-{2962939,3881144,3880716,1000000,1000000},
-{2962940,3881255,3880991,1000000,0.0995581395348837},
-{2962941,3881781,3881255,1000000,0.2467125},
-{2962942,3882152,3881830,0.170033333333333,1000000},
-{2962943,3883413,3883835,0.191135294117647,0.15113023255814},
-{2962944,3883025,3883413,0.162670588235294,0.128623255813954},
-{2962945,3882650,3883025,0.134671428571429,0.145030769230769},
-{2962946,3882379,3882650,0.10383,0.133974193548387},
-{2962947,3882317,3882379,1000000,0.0517142857142857},
-{2962948,3882280,3882152,0.06156,1000000},
-{2962949,3882118,3882221,0.0496666666666667,0.0447},
-{2962950,3882118,3882107,1000000,0.193},
-{2962951,3882379,3882422,1000000,0.0546352941176471},
-{2962952,3882221,3882107,1000000,0.0690387096774193},
-{2962953,3882358,3882118,1000000,0.160533333333333},
-{2962954,3881900,3882118,0.137648275862069,0.105047368421053},
-{2962955,3880637,3881144,0.233823529411765,0.203846153846154},
-{2962956,3880397,3880637,0.112326315789474,0.109446153846154},
-{2962957,3882915,3882396,0.385721739130435,1000000},
-{2962958,3883247,3882915,0.158647058823529,1000000},
-{2962959,3881384,3881144,0.3554,0.21324},
-{2962960,3881803,3881384,0.274175,0.253084615384615},
-{2962961,3881910,3881803,0.098,0.123789473684211},
-{2962962,3883924,3883247,0.535226086956522,1000000},
-{2962963,3887702,3887880,0.079775,0.05983125},
-{2962964,3885903,3886020,0.064025,1000000},
-{2962965,3886251,3886020,1000000,0.12146},
-{2962966,3886671,3886251,1000000,0.23998064516129},
-{2962967,3886843,3886671,1000000,0.0906171428571429},
-{2962968,3887617,3887287,0.155369230769231,0.168316666666667},
-{2962969,3887961,3887617,0.14823,0.141171428571429},
-{2962970,3889252,3889594,0.130466666666667,1000000},
-{2962971,3889045,3889252,0.0623675675675676,1000000},
-{2962972,3888848,3889045,0.0706764705882353,1000000},
-{2962973,3887961,3888848,0.35628,1000000},
-{2962974,3887455,3887961,0.341011764705882,1000000},
-{2962975,3886830,3887287,1000000,0.244038461538462},
-{2962976,3886448,3886830,1000000,0.252490909090909},
-{2962977,3886256,3886448,1000000,0.105765517241379},
-{2962978,3885969,3886256,1000000,0.125775},
-{2962979,3890645,3891055,0.171105882352941,1000000},
-{2962980,3890291,3890645,0.143725714285714,1000000},
-{2962981,3889594,3890291,0.273034285714286,1000000},
-{2962982,3893546,3894011,0.217760869565217,0.263605263157895},
-{2962983,3892118,3892439,0.14900625,0.170292857142857},
-{2962984,3891744,3892118,0.165416666666667,0.1985},
-{2962985,3891396,3891744,0.160954838709677,0.1782},
-{2962986,3894286,3894567,0.125316279069767,0.1122625},
-{2962987,3894011,3894286,0.121682608695652,0.109752941176471},
-{2962988,3895457,3895163,0.143808,0.130734545454545},
-{2962989,3895625,3895457,0.0767563636363637,0.0767563636363637},
-{2962990,3896122,3895625,0.162866666666667,0.159905454545455},
-{2962991,3896701,3896601,0.0501833333333333,0.0547454545454545},
-{2962992,3897699,3896799,0.672766666666667,1000000},
-{2962993,3898244,3897699,0.19141875,1000000},
-{2962994,3898721,3898244,0.231825,1000000},
-{2962995,3898961,3898464,0.26235652173913,1000000},
-{2962996,3899352,3898961,0.162831578947368,1000000},
-{2962997,3899648,3899352,0.159853846153846,1000000},
-{2962998,3905225,3905329,0.0337411764705882,0.0351183673469388},
-{2962999,3903475,3903889,0.131559183673469,0.146509090909091},
-{2963000,3903376,3903475,0.0321115384615385,0.0347875},
-{2963001,3903012,3903376,0.0982705882352941,0.111373333333333},
-{2963024,3851477,3851702,0.0801567567567568,0.0780473684210526},
-{2963025,3851702,3851809,0.0604054054054054,0.06984375},
-{2963026,3851765,3851809,0.06228,0.0573631578947368},
-{2963027,3851283,3851765,0.365,0.386470588235294},
-{2963028,3851048,3850940,0.0476516129032258,0.04924},
-{2963029,3850940,3850311,0.183342857142857,0.175009090909091},
-{2963031,3858679,3858104,0.214082608695652,0.21884},
-{2963032,3859021,3858679,0.230853333333333,0.3148},
-{2963033,3859021,3859110,0.115547368421053,0.0593351351351352},
-{2963034,3859110,3859344,0.0888,0.0826758620689655},
-{2963035,3859722,3859344,0.180130434782609,0.111972972972973},
-{2963036,3861049,3859722,0.331704,0.345525},
-{2963037,3861263,3861049,0.0552566037735849,0.058572},
-{2963038,3861568,3861263,0.0825346153846154,0.0841529411764706},
-{2963039,3862264,3861944,0.0795647058823529,0.0765622641509434},
-{2963040,3862342,3862264,0.0164307692307692,0.017088},
-{2963041,3862785,3862342,0.100015384615385,0.10835},
-{2963042,3859110,3859002,0.326194285714286,0.543657142857143},
-{2963043,3859002,3858587,0.260218604651163,0.266414285714286},
-{2963044,3860522,3859825,0.222709090909091,0.21776},
-{2963045,3861191,3860522,0.179660869565217,0.179660869565217},
-{2963046,3861612,3861191,0.1286625,0.13724},
-{2963047,3862001,3861612,0.1146125,0.125031818181818},
-{2963048,3859824,3859825,0.0756,0.0360818181818182},
-{2963049,3859824,3860094,0.230804081632653,0.25132},
-{2963050,3864784,3864645,0.117367741935484,1000000},
-{2963051,3864645,3864383,0.19667027027027,1000000},
-{2963052,3864383,3864265,0.0938742857142857,1000000},
-{2963053,3864265,3864145,0.118816666666667,1000000},
-{2963054,3863561,3863137,0.330963636363636,0.404511111111111},
-{2963055,3865031,3865022,0.0824093023255814,1000000},
-{2963056,3865022,3865026,0.0728914285714286,1000000},
-{2963057,3865026,3865015,0.0722333333333333,1000000},
-{2963058,3872135,3871652,0.176903225806452,1000000},
-{2963059,3871463,3870953,0.2199,1000000},
-{2963060,3870953,3870733,0.274872,1000000},
-{2963061,3870650,3870985,0.313447058823529,1000000},
-{2963062,3871041,3871209,0.1942,0.1942},
-{2963063,3870995,3871041,0.0489529411764706,0.0489529411764706},
-{2963064,3870604,3869956,0.209372093023256,0.29041935483871},
-{2963065,3869956,3869792,0.087312,0.094904347826087},
-{2963066,3868742,3868408,0.3196,0.2256},
-{2963067,3869824,3869221,0.240436363636364,0.255948387096774},
-{2963068,3866942,3867376,0.112889361702128,1000000},
-{2963069,3867376,3867631,0.0805813953488372,1000000},
-{2963070,3869461,3869093,0.103459459459459,0.1276},
-{2963071,3869049,3868757,0.07281,0.2427},
-{2963072,3868411,3868578,0.0578666666666667,0.0400615384615385},
-{2963073,3871244,3870619,0.191565957446809,0.2501},
-{2963074,3870619,3870604,0.0048875,0.00651666666666667},
-{2963075,3872906,3872742,0.207672727272727,1000000},
-{2963076,3872961,3872906,0.22081935483871,1000000},
-{2963077,3872900,3872771,0.0706105263157895,0.0706105263157895},
-{2963078,3872428,3872375,1000000,0.0569225806451613},
-{2963079,3872579,3872428,1000000,0.1421},
-{2963080,3872771,3872579,1000000,0.149205405405405},
-{2963081,3872814,3872771,0.04605,0.04605},
-{2963082,3873025,3872889,0.186490909090909,0.279736363636364},
-{2963083,3872315,3872135,0.12031875,1000000},
-{2963084,3872731,3872315,0.302111111111111,1000000},
-{2963085,3875229,3875121,1000000,0.201890322580645},
-{2963086,3875352,3875229,1000000,0.206807142857143},
-{2963087,3875506,3875352,1000000,0.217036363636364},
-{2963088,3875981,3876047,0.0370909090909091,1000000},
-{2963089,3875552,3875448,0.252,1000000},
-{2963090,3875740,3875552,0.226392,1000000},
-{2963091,3875886,3876008,1000000,0.149030769230769},
-{2963092,3876135,3876008,0.119363636363636,1000000},
-{2963093,3876368,3876834,0.3131625,0.172779310344828},
-{2963094,3876515,3876463,1000000,0.1794},
-{2963095,3876600,3876515,1000000,0.2262},
-{2963096,3876671,3876600,1000000,0.240521739130435},
-{2963097,3876763,3876671,1000000,0.250963636363636},
-{2963098,3876834,3876763,1000000,0.3156375},
-{2963099,3877240,3877165,0.156488888888889,0.156488888888889},
-{2963100,3877425,3877240,0.56298,1000000},
-{2963101,3877523,3877425,0.262942857142857,1000000},
-{2963102,3877606,3877523,0.25134,1000000},
-{2963103,3878778,3879044,0.13186,0.152146153846154},
-{2963104,3878091,3878488,0.144135483870968,0.2031},
-{2963105,3877323,3877606,0.08546,0.0776909090909091},
-{2963106,3880156,3880397,0.112357894736842,0.10674},
-{2963107,3879949,3880156,0.111518918918919,0.1058},
-{2963108,3879728,3879949,0.119666666666667,0.119666666666667},
-{2963109,3879044,3879728,0.289989473684211,1.10196},
-{2963110,3879766,3879408,0.155789189189189,1000000},
-{2963111,3885006,3885460,1000000,0.183375},
-{2963112,3884532,3885006,1000000,0.44976},
-{2963113,3884532,3883924,0.333254545454545,1000000},
-{2963114,3884813,3884532,0.192441176470588,1000000},
-{2963115,3885127,3884813,0.25431724137931,1000000},
-{2963116,3884953,3885253,1000000,0.081585},
-{2963117,3885127,3885412,0.159886956521739,1000000},
-{2963118,3884918,3884942,0.0166666666666667,1000000},
-{2963119,3884490,3884918,0.289390909090909,1000000},
-{2963120,3884105,3884490,0.215666666666667,1000000},
-{2963121,3883635,3884105,0.203813793103448,1000000},
-{2963122,3883329,3883635,0.158634782608696,1000000},
-{2963123,3884487,3884532,1000000,0.0485647058823529},
-{2963124,3883632,3884097,1000000,0.237921428571429},
-{2963125,3883267,3883632,1000000,0.194337931034483},
-{2963126,3882955,3883267,1000000,0.12724},
-{2963127,3882710,3882955,1000000,0.119357142857143},
-{2963128,3882146,3882710,1000000,0.280384615384615},
-{2963129,3881716,3882146,1000000,0.226577777777778},
-{2963130,3887133,3887455,0.1276,1000000},
-{2963131,3886812,3887133,0.135157894736842,1000000},
-{2963132,3886778,3886812,0.0152666666666667,1000000},
-{2963133,3885992,3886403,0.1659,1000000},
-{2963134,3885823,3885992,0.0577411764705882,1000000},
-{2963135,3885412,3885823,0.18838125,1000000},
-{2963136,3888514,3887961,0.306325714285714,0.243668181818182},
-{2963137,3890169,3890547,0.121832432432432,1000000},
-{2963138,3895323,3895328,1000000,0.0398333333333333},
-{2963139,3900158,3900003,1000000,0.248885714285714},
-{2963143,3857510,3856965,0.163782352941176,0.163782352941176},
-{2963144,3856965,3856809,0.0936,0.0903724137931034},
-{2963145,3856809,3856687,0.131533333333333,0.131533333333333},
-{2963146,3856687,3856564,0.138409756097561,0.153372972972973},
-{2963147,3856564,3856515,0.080209756097561,0.0843230769230769},
-{2963148,3860127,3860094,0.045465306122449,0.045465306122449},
-{2963149,3860412,3860127,0.278611764705882,0.289983673469388},
-{2963150,3860592,3860412,0.204369230769231,0.346539130434783},
-{2963151,3860786,3860592,0.294,0.196},
-{2963152,3860920,3860786,0.102570731707317,0.0978},
-{2963153,3861038,3860920,0.0783891891891892,0.0763263157894737},
-{2963154,3862582,3862001,0.159668181818182,0.2602},
-{2963155,3862659,3861638,0.319936363636364,0.485420689655172},
-{2963156,3861036,3860858,0.0841076923076923,0.082005},
-{2963157,3860858,3860592,0.228282352941176,0.133820689655172},
-{2963158,3860592,3860298,0.1746,0.374142857142857},
-{2963159,3860298,3860203,0.042255,0.04695},
-{2963160,3860203,3860027,0.0922727272727273,0.0780769230769231},
-{2963161,3860027,3859874,0.0560634146341464,0.06385},
-{2963162,3859874,3859671,0.068805,0.1529},
-{2963163,3860920,3860203,0.348088888888889,1000000},
-{2963164,3860656,3860027,1000000,0.24036},
-{2963165,3861038,3860656,1000000,0.15816},
-{2963166,3863137,3862750,0.27216,0.15552},
-{2963167,3863322,3862952,0.20473125,1000000},
-{2963168,3863322,3863249,0.068208,0.068208},
-{2963169,3863249,3863050,0.127164705882353,0.227557894736842},
-{2963170,3863050,3862941,0.05985,0.0684},
-{2963171,3862941,3862752,0.0859813953488372,0.0948},
-{2963172,3862752,3862158,0.357507692307692,0.3873},
-{2963173,3864889,3864912,0.0683529411764706,1000000},
-{2963174,3864912,3864937,0.0762588235294117,1000000},
-{2963175,3864937,3864959,0.0700470588235294,1000000},
-{2963176,3865040,3865236,1000000,0.278060869565217},
-{2963177,3863475,3863249,1000000,0.184142857142857},
-{2963178,3868411,3867816,0.189252631578947,0.211517647058824},
-{2963179,3867816,3867718,0.0347692307692308,0.0410909090909091},
-{2963180,3867718,3867673,0.0173414634146341,0.0229354838709677},
-{2963181,3867673,3867454,0.10035,0.129483870967742},
-{2963182,3867454,3867302,0.07595625,0.0675166666666667},
-{2963183,3872081,3871822,0.177392307692308,0.256233333333333},
-{2963184,3871552,3871317,0.0573733333333333,1000000},
-{2963185,3872404,3872154,0.06976,1000000},
-{2963186,3872081,3871552,0.3218,1000000},
-{2963187,3872154,3872081,0.173275,1000000},
-{2963188,3871000,3871203,0.0531782608695652,1000000},
-{2963189,3871203,3871277,0.0168244897959184,1000000},
-{2963190,3873710,3872404,0.324986666666667,1000000},
-{2963191,3873757,3873905,0.0733333333333333,1000000},
-{2963192,3873905,3874006,0.0403028571428571,1000000},
-{2963193,3874186,3874181,0.0228,1000000},
-{2963194,3874186,3874297,1000000,0.05589},
-{2963195,3874181,3874253,0.0451578947368421,1000000},
-{2963196,3874253,3874184,1000000,0.15771724137931},
-{2963197,3874259,3874006,1000000,0.27105},
-{2963198,3874014,3873710,0.107368421052632,1000000},
-{2963199,3874373,3874485,1000000,0.0937135135135135},
-{2963200,3874485,3874833,1000000,0.2022},
-{2963201,3878045,3877845,0.3264,1000000},
-{2963202,3878771,3878458,0.238513043478261,1000000},
-{2963203,3878938,3878771,0.144736363636364,1000000},
-{2963204,3880545,3880499,0.0317806451612903,1000000},
-{2963205,3880730,3881193,1000000,0.388371428571429},
-{2963206,3880506,3880617,0.0476666666666667,0.0476666666666667},
-{2963207,3879992,3880506,0.213163636363636,0.180369230769231},
-{2963208,3879693,3879992,0.1624,0.0953217391304348},
-{2963209,3879473,3879693,0.0838216216216216,0.0659872340425532},
-{2963210,3879564,3879400,0.0847578947368421,1000000},
-{2963211,3879400,3879473,0.0266285714285714,0.0237957446808511},
-{2963212,3878530,3878360,0.0461111111111111,0.0452727272727273},
-{2963213,3878583,3878621,0.0451363636363636,1000000},
-{2963214,3878583,3878315,0.151075,1000000},
-{2963215,3877766,3877668,1000000,0.080475},
-{2963216,3879324,3879400,0.0213681818181818,0.0195875},
-{2963217,3879324,3879564,1000000,0.0955621621621622},
-{2963218,3879564,3879793,1000000,0.17216},
-{2963219,3879724,3879793,0.04848,1000000},
-{2963220,3879356,3879724,0.208130769230769,1000000},
-{2963221,3878766,3879356,0.275825,1000000},
-{2963222,3878463,3878766,0.172254545454545,1000000},
-{2963223,3878233,3878463,0.136254545454545,1000000},
-{2963224,3878621,3878766,0.2649,1000000},
-{2963225,3882584,3883329,0.323955555555556,1000000},
-{2963226,3882057,3882584,0.223490322580645,1000000},
-{2963227,3880730,3882057,0.635475,1000000},
-{2963228,3885248,3885242,0.0688461538461538,1000000},
-{2963229,3885456,3885542,1000000,0.505323529411765},
-{2963230,3885542,3885566,1000000,0.109102702702703},
-{2963231,3885566,3885539,1000000,0.113477419354839},
-{2963232,3891124,3891449,0.12216,0.138818181818182},
-{2963233,3892080,3892586,0.237095454545455,0.208644},
-{2963234,3900250,3900258,0.0741,1000000},
-{2963239,3856428,3856463,0.0954642857142857,0.0891},
-{2963240,3856761,3856463,0.169816666666667,0.179805882352941},
-{2963241,3857141,3856761,0.1596375,0.1596375},
-{2963242,3857822,3857141,0.208014285714286,0.208014285714286},
-{2963243,3858164,3857822,0.0918,0.101463157894737},
-{2963244,3858470,3858164,0.1896,0.194009302325581},
-{2963245,3858599,3858470,0.0802829268292683,0.0731466666666667},
-{2963246,3859671,3858599,0.397786956521739,0.406626666666667},
-{2963247,3861038,3861562,0.2047,0.179736585365854},
-{2963248,3859874,3859767,0.207436363636364,0.212260465116279},
-{2963249,3859767,3859527,0.151917391304348,0.148685106382979},
-{2963250,3859527,3859353,0.0925953488372093,0.08848},
-{2963251,3864829,3864710,1000000,0.0676695652173913},
-{2963252,3868144,3868255,0.19948,0.256474285714286},
-{2963253,3868255,3868525,0.374494736842105,1000000},
-{2963254,3870566,3869920,1000000,0.132955102040816},
-{2963255,3868650,3868598,1000000,0.0133148936170213},
-{2963256,3869269,3868907,1000000,0.227594117647059},
-{2963257,3868907,3868688,0.266928,0.175610526315789},
-{2963258,3875471,3875410,1000000,0.145745454545455},
-{2963259,3879793,3880088,1000000,0.36696},
-{2963260,3880088,3880310,1000000,1000000},
-{2963261,3880529,3880310,1000000,1000000},
-{2963262,3880529,3881182,1000000,0.492066666666667},
-{2963263,3880497,3881042,1000000,0.226233333333333},
-{2963264,3882572,3883564,0.332475,0.506628571428571},
-{2963265,3883564,3884493,0.373133333333333,0.272286486486487},
-{2963266,3884493,3885291,0.286241379310345,0.25940625},
-{2963267,3885502,3885449,1000000,0.21221052631579},
-{2963268,3885376,3885319,0.116668421052632,1000000},
-{2963269,3885319,3885291,0.0829058823529412,1000000},
-{2963270,3885291,3885230,0.192283333333333,1000000},
-{2963271,3885230,3885187,0.156308108108108,1000000},
-{2963272,3885955,3886380,0.134005714285714,0.123426315789474},
-{2963273,3886380,3886820,0.154491428571429,0.168975},
-{2963274,3886820,3887112,0.0955230769230769,0.149016},
-{2963275,3887112,3887589,0.134022857142857,0.123442105263158},
-{2963276,3887589,3888574,0.235082926829268,0.260497297297297},
-{2963277,3888574,3888789,0.0554461538461538,0.0502883720930233},
-{2963278,3888789,3889082,0.07101,0.0645545454545454},
-{2963279,3889082,3889393,0.08196,0.0745090909090909},
-{2963280,3889393,3889524,0.0377285714285714,0.0360136363636364},
-{2963281,3890026,3890418,0.09975,0.0977142857142857},
-{2963282,3890418,3890864,0.114306666666667,0.109442553191489},
-{2963283,3890864,3891153,0.12428,0.0847363636363636},
-{2963284,3891153,3891867,0.365856,0.217771428571429},
-{2963285,3891867,3892241,0.140845714285714,0.12324},
-{2963286,3892464,3893002,0.12675652173913,0.138828571428571},
-{2963287,3893002,3893119,0.0360418604651163,0.0336913043478261},
-{2963288,3893621,3893901,0.100157142857143,0.2214},
-{2963289,3894065,3894022,0.0915272727272727,1000000},
-{2963290,3900213,3900208,1000000,0.0371411764705882},
-{2963291,3900208,3900206,1000000,0.0237111111111111},
-{2963320,3859155,3858826,0.168153191489362,0.16465},
-{2963321,3861016,3859897,0.266016,0.266016},
-{2963322,3861278,3861016,0.0685102040816327,0.0658235294117647},
-{2963323,3861494,3861278,0.058104,0.0558692307692308},
-{2963324,3862073,3861494,0.162465306122449,0.159216},
-{2963325,3862477,3862073,0.0990260869565217,0.0949},
-{2963326,3869052,3868127,1000000,0.23332},
-{2963327,3869689,3869052,1000000,0.148460869565217},
-{2963328,3870221,3869689,1000000,0.1167625},
-{2963329,3868688,3868713,0.0550829268292683,0.0501866666666667},
-{2963330,3878214,3878179,1000000,0.0226666666666667},
-{2963331,3877969,3877623,1000000,0.181241860465116},
-{2963332,3880206,3880149,0.0275172413793103,1000000},
-{2963333,3881183,3881236,0.0216473684210526,0.0222324324324324},
-{2963334,3881236,3881702,0.186063157894737,0.168342857142857},
-{2963335,3881702,3882008,0.135723076923077,0.117626666666667},
-{2963336,3882008,3882242,0.100595454545455,0.09836},
-{2963337,3882242,3882431,0.0755454545454546,0.0722608695652174},
-{2963338,3885237,3885200,1000000,0.149091428571429},
-{2963339,3885200,3885150,1000000,0.0972},
-{2963340,3884597,3884871,0.330290322580645,1000000},
-{2963341,3884398,3884597,0.255218181818182,1000000},
-{2963342,3884398,3884766,1000000,0.281178947368421},
-{2963343,3896314,3897419,1000000,0.30855},
-{2963344,3894192,3894125,0.246615384615385,1000000},
-{2963345,3894259,3894192,0.173211764705882,1000000},
-{2963346,3894325,3894259,0.152976,1000000},
-{2963347,3894307,3894325,0.171126315789474,1000000},
-{2963348,3903508,3904083,0.149086956521739,0.207818181818182},
-{2963363,3855814,3854870,0.5109,0.469475675675676},
-{2963364,3856584,3855814,0.3069875,0.31351914893617},
-{2963365,3856699,3856584,0.0724883720930233,0.0692666666666667},
-{2963366,3856766,3856699,0.0466363636363636,0.0500487804878049},
-{2963367,3856932,3856766,0.222927272727273,0.228111627906977},
-{2963368,3868458,3868577,0.0785739130434783,1000000},
-{2963369,3868577,3868904,0.4882,1000000},
-{2963370,3868927,3869032,0.0930473684210526,1000000},
-{2963371,3869279,3869492,1000000,0.26568},
-{2963372,3870181,3869660,1000000,0.134033333333333},
-{2963373,3870540,3870481,0.0135906976744186,1000000},
-{2963374,3870910,3870384,1000000,0.1368},
-{2963375,3871538,3870973,0.1102625,1000000},
-{2963376,3872036,3871459,1000000,0.1236},
-{2963377,3870481,3870181,0.0620266666666667,1000000},
-{2963378,3869216,3868583,1000000,0.140946666666667},
-{2963379,3868583,3868254,1000000,0.0647538461538461},
-{2963380,3867688,3867520,0.0362490566037736,1000000},
-{2963381,3867520,3867170,0.0676075471698113,1000000},
-{2963382,3867170,3866748,0.0818888888888889,1000000},
-{2963383,3866748,3866416,0.0584222222222222,1000000},
-{2963384,3871291,3870978,1000000,0.084555},
-{2963385,3873006,3871291,1000000,0.422034146341463},
-{2963386,3875443,3874466,0.352563636363636,1000000},
-{2963387,3874466,3874444,0.0837,0.0732375},
-{2963388,3875443,3874444,1000000,0.56175652173913},
-{2963389,3875784,3875443,0.14725,1000000},
-{2963390,3876742,3876097,0.182945454545455,1000000},
-{2963391,3876097,3875819,0.087525,1000000},
-{2963392,3875784,3875297,0.142257142857143,1000000},
-{2963393,3875293,3874873,1000000,0.338152941176471},
-{2963394,3874873,3874258,1000000,0.175088372093023},
-{2963395,3872729,3872378,1000000,0.11174},
-{2963396,3872714,3872085,0.129886956521739,1000000},
-{2963397,3873518,3873482,0.159741176470588,1000000},
-{2963398,3872653,3872671,0.143433333333333,1000000},
-{2963399,3874035,3873518,0.14749756097561,1000000},
-{2963400,3875859,3876130,0.1335625,1000000},
-{2963401,3875859,3875776,1000000,0.143625},
-{2963402,3875746,3875721,0.107675,1000000},
-{2963403,3875721,3875594,0.228792,1000000},
-{2963404,3875594,3875501,0.288,1000000},
-{2963405,3876180,3876535,1000000,0.2848875},
-{2963406,3876498,3876720,0.0878444444444444,1000000},
-{2963407,3877530,3877377,0.08296875,1000000},
-{2963408,3877623,3877371,1000000,0.0905285714285714},
-{2963409,3877371,3876771,1000000,0.186627906976744},
-{2963410,3878655,3878635,0.2584,0.228},
-{2963411,3878635,3878586,0.273668571428571,0.30898064516129},
-{2963412,3878586,3878553,0.130937142857143,0.1273},
-{2963413,3878553,3878416,0.290592857142857,0.290592857142857},
-{2963414,3876748,3877266,1000000,0.196},
-{2963415,3877870,3878393,0.345423529411765,1000000},
-{2963416,3878393,3878897,0.230014285714286,1000000},
-{2963417,3878897,3879195,0.122155555555556,1000000},
-{2963418,3880243,3880902,0.387651428571429,0.357047368421053},
-{2963419,3880704,3880902,1000000,0.228830769230769},
-{2963420,3881000,3880713,1000000,0.0694},
-{2963421,3883843,3884150,1000000,0.0879888888888889},
-{2963422,3883732,3883918,1000000,0.0732620689655172},
-{2963423,3883918,3884150,1000000,0.0805935483870968},
-{2963424,3883732,3883843,0.120577777777778,1000000},
-{2963425,3883504,3883641,0.0355777777777778,1000000},
-{2963426,3883641,3883966,0.100782352941176,1000000},
-{2963427,3884174,3884285,1000000,0.216572727272727},
-{2963428,3884404,3884401,1000000,0.0249951219512195},
-{2963429,3884766,3885240,0.28105,0.198388235294118},
-{2963430,3884531,3884812,0.302147368421053,0.2496},
-{2963431,3885240,3885650,0.235944,0.159421621621622},
-{2963432,3885650,3885792,0.07126875,0.06335},
-{2963433,3886048,3886288,0.107541176470588,0.1142625},
-{2963434,3886288,3886707,0.203228571428571,0.182384615384615},
-{2963435,3886707,3886999,0.145694117647059,0.117942857142857},
-{2963436,3886999,3887514,0.217870588235294,0.168354545454545},
-{2963437,3894091,3894469,1000000,0.110823529411765},
-{2963438,3897275,3897559,1000000,0.12306},
-{2963439,3897026,3897275,1000000,0.104141379310345},
-{2963440,3896752,3897026,1000000,0.114905454545455},
-{2963441,3896496,3896752,1000000,0.132833333333333},
-{2963457,3850581,3850917,0.1085,0.102117647058824},
-{2963458,3850917,3851074,0.0524936170212766,0.0483764705882353},
-{2963459,3851074,3851228,0.04976,0.044784},
-{2963460,3851228,3851556,0.101424489795918,0.099396},
-{2963461,3858650,3856932,0.478146666666667,0.500386046511628},
-{2963462,3859166,3858650,0.184390909090909,0.197882926829268},
-{2963463,3859654,3859166,0.165025531914894,0.168613043478261},
-{2963464,3860084,3859654,0.177485714285714,0.162052173913043},
-{2963465,3860258,3860084,0.066588,0.0708382978723404},
-{2963466,3860475,3860258,0.0739294117647059,0.0769469387755102},
-{2963467,3860769,3860475,0.0946117647058824,0.096504},
-{2963468,3866416,3865804,0.113642307692308,1000000},
-{2963469,3864509,3864376,0.0674135593220339,1000000},
-{2963470,3867909,3866882,0.2179,0.222536170212766},
-{2963471,3868337,3867909,0.082334693877551,0.080688},
-{2963472,3868649,3868337,0.0640897959183674,0.062808},
-{2963473,3869013,3868649,0.0732,0.0732},
-{2963474,3869749,3869013,0.200152941176471,0.378066666666667},
-{2963475,3871184,3870343,0.21500487804878,1000000},
-{2963476,3869169,3868278,1000000,0.238911627906977},
-{2963477,3868278,3867644,1000000,0.16386976744186},
-{2963478,3869836,3869624,1000000,0.179776744186047},
-{2963479,3869624,3869531,1000000,0.0936734693877551},
-{2963480,3867146,3866966,1000000,0.0628864864864865},
-{2963481,3874533,3874015,1000000,0.142513636363636},
-{2963482,3874966,3874533,1000000,0.130155},
-{2963483,3875374,3874966,1000000,0.151694117647059},
-{2963484,3875453,3875312,1000000,0.38403},
-{2963485,3875160,3875078,0.128351351351351,1000000},
-{2963486,3875486,3875629,1000000,0.0379076923076923},
-{2963487,3876030,3876867,1000000,0.240064864864865},
-{2963488,3877686,3876841,1000000,0.193772727272727},
-{2963489,3877686,3878107,0.1251,1000000},
-{2963490,3879226,3878950,0.071475,1000000},
-{2963491,3878107,3878114,0.21107027027027,0.411031578947368},
-{2963492,3878114,3878193,0.101659090909091,0.1278},
-{2963493,3885493,3885920,0.187123404255319,0.162866666666667},
-{2963494,3885920,3886563,0.373846153846154,0.297551020408163},
-{2963495,3888715,3889387,0.418241379310345,0.311},
-{2963497,3904719,3905124,0.138114893617021,0.1352375},
-{2963498,3902125,3902512,1000000,0.0808777777777778},
-{2963499,3902512,3902952,1000000,0.097},
-{2963500,3902952,3903122,1000000,0.0436153846153846},
-{2963501,3905991,3907030,0.341289795918367,0.334464},
-{2963503,3911888,3912006,0.026832,0.0258},
-{2963504,3912006,3913364,0.286621276595745,0.264141176470588},
-{2963505,3913364,3914167,0.165587755102041,0.1690375},
-{2963506,3914167,3914702,0.121176923076923,0.118890566037736},
-{2963507,3914702,3915408,0.192344444444444,0.188847272727273},
-{2963510,3920983,3921520,0.221026666666667,0.198924},
-{2963515,3855579,3856618,0.250592307692308,0.255505882352941},
-{2963516,3857322,3857718,0.12999,0.14856},
-{2963517,3861208,3860769,0.167139622641509,0.177168},
-{2963518,3861564,3861208,0.145729411764706,0.151677551020408},
-{2963519,3861770,3861564,0.0942127659574468,0.0962608695652174},
-{2963520,3861770,3862075,0.235911111111111,0.181988571428571},
-{2963521,3861882,3861729,0.0390115384615385,1000000},
-{2963522,3861729,3861136,0.1797,1000000},
-{2963523,3861084,3860579,0.124366666666667,1000000},
-{2963524,3862723,3862546,1000000,0.06506},
-{2963525,3866966,3865818,1000000,0.284209090909091},
-{2963526,3865226,3865181,1000000,0.0982285714285714},
-{2963527,3865181,3865014,1000000,0.44295},
-{2963528,3858737,3859177,0.0875666666666667,1000000},
-{2963529,3859445,3859534,0.02442,1000000},
-{2963530,3859445,3859890,0.116224137931034,1000000},
-{2963531,3860665,3860754,0.1113,1000000},
-{2963532,3860754,3860512,1000000,0.121276923076923},
-{2963533,3860234,3860128,0.11157,0.0719806451612903},
-{2963534,3860467,3860234,0.194242105263158,0.36906},
-{2963535,3869531,3869707,1000000,0.1868},
-{2963536,3869636,3869825,0.289817647058824,1000000},
-{2963537,3874734,3874667,0.0802744186046512,1000000},
-{2963538,3874667,3874433,0.312174193548387,1000000},
-{2963539,3874514,3874337,1000000,0.290875862068965},
-{2963540,3874337,3874228,1000000,0.0986478260869565},
-{2963541,3874228,3874120,1000000,0.0999375},
-{2963542,3874120,3874000,1000000,0.158908695652174},
-{2963543,3878375,3878371,1000000,0.0312931034482759},
-{2963544,3878297,3878232,0.206067857142857,1000000},
-{2963545,3899695,3899623,0.0313173913043478,0.0300125},
-{2963546,3915408,3916164,0.190675471698113,0.187144444444444},
-{2963547,3917135,3917310,1000000,0.0872936170212766},
-{2963551,3850165,3849790,0.0891396226415094,0.0858981818181818},
-{2963552,3852017,3851512,0.100811111111111,0.0938586206896552},
-{2963553,3852976,3852017,0.180043636363636,0.170731034482759},
-{2963554,3854648,3852976,0.358264285714286,0.351978947368421},
-{2963555,3861743,3861552,0.0713869565217391,0.065676},
-{2963556,3862116,3861743,0.119604255319149,0.112428},
-{2963557,3869693,3869677,1000000,0.233933333333333},
-{2963558,3869604,3869580,0.2174375,1000000},
-{2963559,3869580,3869574,0.0913058823529412,1000000},
-{2963560,3869635,3869628,1000000,0.0638264150943396},
-{2963561,3869628,3869612,1000000,0.0807283018867924},
-{2963562,3874000,3873896,1000000,0.126885},
-{2963563,3873896,3873861,1000000,0.0662727272727273},
-{2963564,3873506,3873314,1000000,0.212720930232558},
-{2963565,3872140,3873001,1000000,0.1697125},
-{2963566,3907935,3907642,0.1687,0.106547368421053},
-{2963567,3907935,3908085,0.0401181818181818,0.07355},
-{2963568,3908085,3908565,0.128835294117647,0.193252941176471},
-{2963569,3908565,3909060,0.133068,0.144639130434783},
-{2963570,3909060,3909523,0.140387234042553,0.140387234042553},
-{2963571,3909523,3909985,0.146282608695652,0.143170212765957},
-{2963572,3910526,3909985,0.139110638297872,0.1362125},
-{2963573,3909633,3909907,0.0715066666666667,0.0670375},
-{2963574,3909907,3909970,0.0153488372093023,0.0143478260869565},
-{2963575,3910440,3910588,0.0341302325581395,0.0333545454545455},
-{2963576,3910588,3911189,0.21230625,0.178784210526316},
-{2963577,3911189,3911758,0.160744186046512,0.2304},
-{2963578,3911758,3912370,0.1410625,0.144063829787234},
-{2963579,3912370,3912587,0.0410938775510204,0.040272},
-{2963580,3912587,3914199,0.581979310344828,0.375053333333333},
-{2963581,3914199,3914312,0.0409818181818182,0.0397764705882353},
-{2963598,3863454,3862545,0.323614285714286,0.30204},
-{2963599,3863454,3863488,0.210884210526316,0.205476923076923},
-{2963600,3863488,3863299,0.131536363636364,0.134595348837209},
-{2963601,3863299,3863087,0.1287875,0.134386956521739},
-{2963602,3864824,3864770,0.0309913043478261,0.03168},
-{2963603,3869540,3869568,0.0987411764705882,1000000},
-{2963604,3869556,3869537,0.150769230769231,0.127826086956522},
-{2963605,3869537,3869530,0.177388235294118,0.0886941176470588},
-{2963606,3869514,3869529,0.0387673469387755,0.0431727272727273},
-{2963607,3869529,3869473,0.2489,0.265493333333333},
-{2963608,3873314,3873151,1000000,0.167751219512195},
-{2963609,3873151,3872863,1000000,0.34209},
-{2963610,3872746,3872633,0.127036363636364,1000000},
-{2963611,3872633,3872550,0.0697142857142857,1000000},
-{2963612,3872550,3872227,0.271533333333333,1000000},
-{2963613,3877363,3876916,0.251883870967742,1000000},
-{2963614,3892016,3893477,0.685266666666667,0.57819375},
-{2963615,3892016,3892740,0.416167741935484,0.548987234042553},
-{2963616,3898228,3901207,0.57779,0.619060714285714},
-{2963617,3901693,3901282,0.353871428571429,0.159812903225806},
-{2963618,3901964,3901693,0.0760153846153846,0.0689441860465116},
-{2963619,3902354,3901964,0.0977384615384615,0.0929707317073171},
-{2963620,3902749,3902354,0.13021875,0.0886595744680851},
-{2963621,3902640,3902828,1000000,0.0551423076923077},
-{2963622,3902828,3903195,1000000,0.112843636363636},
-{2963623,3902021,3902333,0.123048648648649,1000000},
-{2963624,3902333,3902596,0.0765795918367347,1000000},
-{2963625,3902596,3902858,0.0783260869565217,1000000},
-{2963638,3862229,3862099,0.122440909090909,0.117117391304348},
-{2963639,3863737,3864128,0.480311111111111,0.370525714285714},
-{2963640,3863599,3863737,0.200555555555556,0.1805},
-{2963641,3863599,3863224,0.209712,0.201646153846154},
-{2963642,3863224,3862951,0.116365714285714,0.127275},
-{2963643,3862951,3862229,0.296668965517241,0.296668965517241},
-{2963644,3862099,3861924,0.120470588235294,0.118153846153846},
-{2963645,3861924,3861765,0.1166,0.1166},
-{2963646,3861765,3861683,0.041592,0.041592},
-{2963647,3861683,3861570,0.0888588235294118,0.0888588235294118},
-{2963648,3869473,3869449,0.30462,0.324063829787234},
-{2963649,3869449,3869455,0.207188235294118,0.2201375},
-{2963650,3869455,3869471,0.163672340425532,0.183157142857143},
-{2963651,3872328,3872071,1000000,0.215347826086957},
-{2963652,3876858,3875869,1000000,0.23495593220339},
-{2963653,3857959,3857731,0.09576,0.0990620689655173},
-{2963654,3861566,3860748,0.36312,0.389057142857143},
-{2963655,3862644,3861566,0.375291891891892,0.420781818181818},
-{2963656,3885834,3885856,0.124735384615385,0.126684375},
-{2963657,3896121,3896577,0.251170588235294,0.502341176470588},
-{2963658,3896577,3896966,0.162446808510638,0.155816326530612},
-{2963659,3896966,3897618,0.264678260869565,0.248473469387755},
-{2963660,3897618,3897834,0.0895733333333333,0.0857617021276596},
-{2963661,3847542,3847424,0.0547909090909091,0.0588},
-{2963662,3860672,3861011,0.5595,0.53712},
-{2963663,3885991,3886005,1000000,0.0507152542372881},
-{2963664,3894631,3894706,0.0638076923076923,1000000},
-{2963666,3873297,3873650,0.0827727272727273,0.0714117647058824},
-{2963667,3873207,3873297,0.0202772727272727,0.0171576923076923},
-{2963668,3872775,3873207,0.1016,0.0896470588235294},
-{2963669,3872248,3872775,0.110542857142857,0.096725},
-{2963670,3872056,3872248,0.048375,0.0471951219512195},
-{2963671,3869471,3869528,0.131253333333333,0.1284},
-{2963672,3869528,3869582,0.109252173913043,0.114218181818182},
-{2963673,3869582,3869600,0.0354133333333333,0.0370604651162791},
-{2963674,3869822,3869732,0.271389473684211,0.234381818181818},
-{2963675,3869822,3869857,0.12065,0.140109677419355},
-{2963676,3871485,3871451,0.06518,1000000},
-{2963677,3885441,3885398,0.3094,0.219836842105263},
-{2963678,3885015,3885398,0.335509090909091,0.141946153846154},
-{2963679,3885398,3886331,0.431373913043478,0.522189473684211},
-{2963680,3884208,3884186,1000000,0.136753846153846},
-{2963681,3884186,3884106,1000000,0.375013636363636},
-{2963682,3885398,3885369,0.148766666666667,0.232852173913043},
-{2963683,3885369,3885262,0.496018181818182,0.419707692307692},
-{2963684,3888042,3889952,0.410522448979592,0.359207142857143},
-{2963685,3889952,3890881,0.223224,0.199307142857143},
-{2963686,3890481,3891046,0.152142857142857,0.1553125},
-{2963687,3891046,3891569,0.137988235294118,0.140748},
-{2964597,3915382,3915544,0.0760363636363636,0.0643384615384615},
-{2964598,3915544,3915963,0.145042105263158,0.13779},
-{2964599,3910526,3911027,0.1391125,0.133548},
-{2964600,3911027,3911494,0.135991836734694,0.133272},
-{2964601,3911494,3911915,0.133089795918367,0.125411538461538},
-{2964602,3911915,3912397,0.137502127659574,0.124280769230769},
-{2964603,3912397,3912818,0.120474418604651,0.105722448979592},
-{2964604,3912818,3912887,0.0205756097560976,0.0196186046511628},
-{2964605,3912887,3913330,0.14115,0.131302325581395},
-{2964606,3913330,3913751,0.3087,0.150178378378378},
-{2964607,3913751,3914189,0.238773913043478,0.219672},
-{2964608,3914189,3914564,0.212492307692308,0.153466666666667},
-{2964609,3915963,3916346,0.169605882352941,0.155854054054054},
-{2964610,3915544,3915334,0.150161538461538,0.229658823529412},
-{2964611,3915334,3914808,0.238814634146341,0.315851612903226},
-{2964612,3914808,3913751,0.7064,1000000},
-{2964613,3913751,3912553,0.398659459459459,0.590016},
-{2964614,3912553,3911598,0.249858823529412,0.260057142857143},
-{2964615,3916928,3917135,1000000,0.0900521739130435},
-{2964616,3916698,3916928,1000000,0.104269565217391},
-{2964617,3916432,3916698,1000000,0.121273170731707},
-{2964618,3916182,3916432,1000000,0.227575},
-{2964619,3916124,3916182,1000000,0.0351642857142857},
-{2964620,3915963,3916124,1000000,0.128},
-{2964621,3917167,3917921,0.289605405405405,0.267885},
-{2964622,3918821,3919209,0.135711627906977,0.135711627906977},
-{2964623,3919209,3919558,0.100630434782609,0.115725},
-{2964624,3919558,3919882,0.1008,0.105381818181818},
-{2964625,3919882,3919957,0.0254666666666667,0.0254666666666667},
-{2964626,3920353,3920482,0.0419268292682927,0.0464594594594595},
-{2964627,3920482,3920730,0.086246511627907,0.092715},
-{2964628,3920730,3921119,0.135135,0.12012},
-{2964635,3903434,3903606,0.0665387755102041,1000000},
-{2964636,3903606,3903824,0.069084,1000000},
-{2964637,3903824,3904121,0.0828823529411765,1000000},
-{2964638,3904121,3904370,0.0794875,1000000},
-{2964639,3904370,3904571,0.067716,1000000},
-{2964640,3904787,3904571,1000000,0.0726510638297872},
-{2964641,3904787,3905082,0.0956625,1000000},
-{2964642,3905082,3905334,0.0994933333333334,1000000},
-{2964643,3905334,3905668,0.129536842105263,1000000},
-{2964644,3905668,3905902,0.0726705882352941,1000000},
-{2964645,3905902,3906150,0.0712528301886792,1000000},
-{2964646,3903853,3904508,1000000,0.161911475409836},
-{2964647,3904508,3905129,1000000,0.160337704918033},
-{2964648,3911598,3910629,0.265596,0.282548936170213},
-{2964649,3910629,3909567,0.366762162162162,0.330980487804878},
-{2964650,3906795,3907118,0.0799294117647059,0.0831918367346939},
-{2964651,3906500,3906795,0.0911217391304348,0.0931466666666667},
-{2964652,3906392,3906500,0.0343176470588235,0.0486166666666667},
-{2964653,3906245,3906392,0.0499125,0.0520826086956522},
-{2964654,3905999,3906245,0.078504,0.081775},
-{2964655,3905713,3905999,0.087325,0.0911217391304348},
-{2964656,3914564,3914884,0.1452,0.209733333333333},
-{2964657,3914884,3915189,0.13806,0.145326315789474},
-{2964658,3915189,3915499,0.131471428571429,0.131471428571429},
-{2964659,3915499,3915818,0.12555,0.12276},
-{2964660,3915818,3916145,0.122168181818182,0.11685652173913},
-{2964661,3916145,3916460,0.127660465116279,0.124759090909091},
-{2964662,3916460,3916806,0.12412,0.126940909090909},
-{2964663,3916806,3917112,0.113182978723404,0.113182978723404},
-{2964664,3917112,3917383,0.111078260869565,0.108714893617021},
-{2964665,3917383,3917706,0.14319512195122,0.14319512195122},
-{2964666,3920353,3919475,0.46824375,0.454054545454545},
-{2964667,3919475,3918623,0.323493333333333,0.309727659574468},
-{2964668,3918623,3918315,0.117506666666667,0.128970731707317},
-{2964669,3918315,3917706,0.326586206896552,0.3157},
-{2964670,3921539,3921715,0.0555947368421053,0.0586833333333333},
-{2964671,3921715,3921780,0.0301666666666667,0.0319411764705882},
-{2964672,3921950,3921982,0.0179189189189189,0.0184166666666667},
-{2964673,3921982,3922277,0.10143,0.109654054054054},
-{2964674,3922277,3922350,0.0232,0.0232},
-{2964675,3922350,3922736,0.129093333333333,0.135097674418605},
-{2964679,3921539,3921626,1000000,1000000},
-{2964680,3921780,3921626,0.109075862068966,0.1318},
-{2964681,3921626,3919787,0.783587234042553,0.783587234042553},
-{2964697,3906150,3906373,0.0714923076923077,1000000},
-{2964698,3906373,3906601,0.0784352941176471,1000000},
-{2964699,3906601,3906847,0.066612,1000000},
-{2964700,3906847,3907130,0.075156,1000000},
-{2964701,3908282,3909148,0.280861538461538,1000000},
-{2964702,3909148,3909953,0.354232258064516,1000000},
-{2964703,3917706,3918048,0.12188,0.130585714285714},
-{2964704,3918048,3918398,0.1120125,0.114395744680851},
-{2964705,3918398,3918702,0.113386956521739,0.1086625},
-{2964706,3918702,3919012,0.120995454545455,0.118306666666667},
-{2964707,3917706,3917016,0.349594285714286,0.421924137931035},
-{2964708,3917016,3916851,0.0540382978723404,0.0577227272727273},
-{2964709,3916851,3916594,0.102573333333333,0.107344186046512},
-{2964710,3919787,3919281,0.285829411764706,0.335110344827586},
-{2964744,3863473,3862644,0.294568421052632,0.329223529411765},
-{2964745,3863665,3863473,0.0803225806451613,0.0922222222222222},
-{2964746,3864767,3863665,0.408917647058824,0.408917647058824},
-{2964747,3865759,3864767,0.385412903225806,0.362054545454545},
-{2964748,3868378,3865759,0.868872727272727,0.796466666666667},
-{2964749,3869035,3868378,0.285504,0.285504},
-{2964750,3897834,3898088,0.0900818181818182,0.084331914893617},
-{2964751,3898088,3898363,0.164577777777778,0.1058},
-{2964752,3898363,3898412,0.0286444444444444,0.0209027027027027},
-{2964753,3898412,3898642,0.115023529411765,0.144844444444444},
-{2964754,3898642,3898046,1000000,0.297276923076923},
-{2964755,3898412,3898020,0.26934375,1000000},
-{2964756,3898020,3897522,0.157904347826087,1000000},
-{2964757,3905425,3905713,0.116605714285714,0.1275375},
-{2964758,3904552,3905425,0.355661538461538,0.315245454545455},
-{2964759,3904483,3904552,0.0204352941176471,0.021269387755102},
-{2964760,3903646,3904483,0.281013333333333,0.468355555555556},
-{2964761,3902805,3903527,0.500269565217391,0.255693333333333},
-{2964762,3902578,3902805,0.0747066666666667,0.0686081632653061},
-{2964763,3901881,3902578,0.223548837209302,0.213613333333333},
-{2964764,3901750,3901881,0.0587368421052632,0.0676363636363636},
-{2964765,3901564,3901750,0.0772285714285714,0.142263157894737},
-{2964766,3911961,3912357,0.17,1000000},
-{2964767,3912357,3912704,0.096521052631579,1000000},
-{2964768,3915273,3914504,0.406890909090909,1000000},
-{2964769,3914504,3914048,0.228107142857143,1000000},
-{2964770,3913425,3912954,0.147528571428571,1000000},
-{2964771,3912704,3913079,0.0778468085106383,1000000},
-{2964772,3913079,3913396,0.08156,1000000},
-{2964773,3913935,3914135,0.0381254237288136,1000000},
-{2964774,3914135,3914521,0.0835789473684211,1000000},
-{2964775,3914521,3914826,0.0786206896551724,1000000},
-{2964776,3914826,3915101,0.0853309090909091,1000000},
-{2964777,3922325,3921984,0.276469565217391,0.205122580645161},
-{2964793,3862207,3861176,0.362936842105263,0.353630769230769},
-{2964794,3862974,3862207,0.171905882352941,0.190591304347826},
-{2964795,3863053,3862974,0.023575,0.0263162790697674},
-{2964796,3863413,3863053,0.128261538461538,0.131636842105263},
-{2964797,3894477,3894476,0.0198620689655172,0.0198620689655172},
-{2964798,3901205,3901564,0.14191875,0.129754285714286},
-{2964799,3900869,3901205,0.108809302325581,0.108809302325581},
-{2964800,3899688,3899987,0.106389473684211,0.0986048780487805},
-{2964801,3899485,3899688,0.0632,0.0677142857142857},
-{2964802,3899153,3899485,0.113666666666667,0.1705},
-{2964803,3898862,3899153,0.117458823529412,0.1248},
-{2964804,3898349,3898862,0.221241176470588,0.183468292682927},
-{2964805,3897785,3898349,0.216085714285714,0.199026315789474},
-{2964806,3897327,3897785,0.279553846153846,0.173057142857143},
-{2964807,3901564,3902156,0.310737931034483,1000000},
-{2964808,3902156,3902781,0.238384615384615,1000000},
-{2964809,3902781,3902961,0.0562714285714286,1000000},
-{2964810,3902961,3903373,0.134676,0.129496153846154},
-{2964811,3903373,3903895,0.183084,0.179494117647059},
-{2964812,3903895,3904439,0.154892307692308,0.161088},
-{2964813,3904439,3904699,0.0808981132075472,0.085752},
-{2964814,3904699,3904999,0.0889038461538461,0.0906470588235294},
-{2964815,3904999,3905226,0.0744346153846154,0.0758941176470588},
-{2964816,3905226,3905457,0.0765058823529412,0.0796285714285714},
-{2964817,3905457,3905737,0.0876734693877551,0.102285714285714},
-{2964818,3915330,3915569,0.0781245283018868,1000000},
-{2964819,3915569,3915811,0.072622641509434,1000000},
-{2964820,3915811,3916068,0.089796,1000000},
-{2964821,3915727,3915635,0.04665,1000000},
-{2964822,3915635,3915657,0.0402387096774194,1000000},
-{2964870,3871648,3871485,0.43378125,1000000},
-{2964871,3871642,3871648,0.0121894736842105,1000000},
-{2964872,3871721,3871777,1000000,0.0839692307692308},
-{2964873,3871946,3872283,1000000,0.197454545454545},
-{2964874,3884106,3884039,1000000,0.33858},
-{2964875,3884039,3884010,1000000,0.308232},
-{2964876,3884010,3883975,1000000,0.140604255319149},
-{2964877,3885262,3885203,0.33421875,0.305571428571429},
-{2964878,3885203,3885197,0.058245,0.0896076923076923},
-{2964879,3885197,3885167,0.140733333333333,0.191909090909091},
-{2964880,3885167,3885132,0.104910638297872,0.109573333333333},
-{2964881,3897571,3897737,0.10825,0.0984090909090909},
-{2964882,3905737,3906041,0.1098,0.0957829787234043},
-{2964883,3906041,3906276,0.0828367346938775,0.0845625},
-{2964884,3906276,3906508,0.0751411764705882,0.076644},
-{2964885,3906508,3906813,0.0882470588235294,0.0937625},
-{2964886,3906813,3907113,0.0869265306122449,0.0925956521739131},
-{2964887,3907113,3907407,0.0890297872340425,0.0890297872340425},
-{2964888,3907407,3907690,0.0842375,0.0898533333333333},
-{2964889,3907690,3908004,0.0862625,0.0920133333333333},
-{2964890,3908004,3908272,0.078330612244898,0.0872318181818182},
-{2964891,3908272,3908518,0.060134693877551,0.06548},
-{2964892,3908518,3908743,0.0621829787234043,0.0695857142857143},
-{2964928,3865450,3865032,0.0789,0.074433962264151},
-{2964929,3865763,3865450,0.0668375,0.0629058823529412},
-{2964930,3866024,3865763,0.0612,0.0598978723404255},
-{2964931,3867961,3866695,0.26975,0.275489361702128},
-{2964932,3868906,3867961,0.248538461538462,0.230785714285714},
-{2964933,3869027,3868906,0.0438,0.0498413793103448},
-{2964934,3869571,3869027,0.204464516129032,1000000},
-{2964935,3869885,3869571,0.10902,1000000},
-{2964936,3869027,3868853,0.204233333333333,0.2228},
-{2964937,3871197,3870893,0.0736,0.1104},
-{2964938,3871540,3871197,0.0680790697674419,0.0770368421052632},
-{2964939,3868853,3868749,0.13452,0.161424},
-{2964940,3869284,3868749,0.17564,0.154976470588235},
-{2964941,3869984,3869284,0.19085625,0.174497142857143},
-{2964942,3870511,3870243,0.08019375,0.0777636363636364},
-{2964943,3870243,3869984,0.184414285714286,0.178055172413793},
-{2964944,3871939,3872067,0.17046,1000000},
-{2964945,3872067,3872101,0.0266526315789474,1000000},
-{2964946,3872101,3872340,0.17157,1000000},
-{2964947,3872340,3872662,0.151486363636364,1000000},
-{2964948,3872662,3872877,0.0826565217391304,1000000},
-{2964949,3872283,3872439,1000000,0.11337},
-{2964950,3872439,3872574,1000000,0.0939081081081081},
-{2964951,3872574,3872810,1000000,0.137430769230769},
-{2964952,3872810,3873175,1000000,0.248413043478261},
-{2964953,3873175,3873371,1000000,0.107975510204082},
-{2964954,3872353,3871432,0.203914285714286,0.212591489361702},
-{2964955,3873677,3873302,0.859028571428572,0.870331578947369},
-{2964956,3883917,3883845,1000000,0.371895},
-{2964957,3883242,3883058,0.11045625,0.088365},
-{2964958,3885073,3885014,0.238409302325581,0.27707027027027},
-{2964959,3885014,3884984,0.100268181818182,0.1026},
-{2964960,3884984,3884920,0.139118918918919,0.131984615384615},
-{2964961,3884920,3884783,0.139333333333333,0.139333333333333},
-{2964962,3884783,3884569,0.150168,0.11731875},
-{2964963,3884569,3884026,0.302209756097561,0.427262068965517},
-{2964964,3884763,3884569,0.134505882352941,0.0994173913043478},
-{2964965,3884958,3884763,0.093225,0.0639257142857143},
-{2964966,3885164,3884958,0.0694216216216216,0.0658615384615385},
-{2964967,3885269,3885164,0.03177,0.0302571428571429},
-{2964968,3885450,3885269,0.0609285714285714,0.0609285714285714},
-{2964969,3885604,3885759,0.0637285714285714,0.05948},
-{2964970,3885759,3885878,0.0408230769230769,0.044225},
-{2964971,3885878,3886509,0.189989189189189,0.260355555555556},
-{2964972,3886509,3887079,0.150652173913043,0.154},
-{2964973,3887079,3887752,0.137387755102041,0.14025},
-{2964974,3887752,3888445,0.132804,0.135514285714286},
-{2964975,3888445,3889133,0.1266,0.131564705882353},
-{2964976,3889133,3889758,0.133,0.133},
-{2964977,3889758,3890321,0.129311538461538,0.137228571428571},
-{2964978,3890321,3890909,0.137877551020408,0.146869565217391},
-{2964979,3890909,3891467,0.175926315789474,0.163053658536585},
-{2964980,3891467,3891985,0.151060465116279,0.144346666666667},
-{2964981,3891985,3892240,0.0881230769230769,0.0781090909090909},
-{2964982,3892240,3892751,0.153765,0.157707692307692},
-{2964983,3892751,3893178,0.233910638297872,0.233910638297872},
-{2964984,3893178,3893320,0.0864679245283019,0.0864679245283019},
-{2964985,3893320,3893445,0.0766301886792453,0.0796352941176471},
-{2964986,3893445,3893513,0.038748,0.0440318181818182},
-{2964987,3900113,3900325,0.0805636363636364,0.08308125},
-{2965004,3882119,3881688,0.227885106382979,0.194738181818182},
-{2965005,3881688,3881441,0.133297297297297,0.10065306122449},
-{2965006,3884726,3884940,0.0804833333333333,0.0689857142857143},
-{2965007,3884940,3885900,0.369272727272727,0.259276595744681},
-{2965008,3885900,3886043,0.0645461538461538,0.067128},
-{2965009,3886043,3886321,0.0899142857142857,0.198757894736842},
-{2965010,3886321,3886973,0.194796226415094,0.219663829787234},
-{2965011,3886973,3888093,0.274449056603774,0.269366666666667},
-{2965012,3885450,3885553,0.0438789473684211,0.0406682926829268},
-{2965013,3886275,3886428,0.0554651162790698,0.059625},
-{2965014,3886428,3886472,0.0200863636363636,0.0210428571428571},
-{2965015,3886472,3886593,0.0392571428571429,0.040075},
-{2965016,3887136,3887818,0.198346153846154,0.194603773584906},
-{2965017,3887818,3888205,0.113065384615385,0.117588},
-{2965018,3888205,3888480,0.0798339622641509,0.0813692307692308},
-{2965019,3893513,3893683,0.102554716981132,0.104526923076923},
-{2965020,3893683,3893837,0.0994666666666667,0.0976581818181818},
-{2965021,3893837,3894032,0.105174545454545,0.105174545454545},
-{2965022,3894335,3894712,0.15145,0.132980487804878},
-{2965023,3894712,3895010,0.0905045454545454,0.0884933333333333},
-{2965024,3895010,3895100,0.0356780487804878,0.0340186046511628},
-{2965025,3895100,3895688,0.469276595744681,0.424153846153846},
-{2965067,3864594,3864309,0.0902448979591837,0.08844},
-{2965068,3864828,3864594,0.084275,0.0793176470588235},
-{2965069,3865062,3864828,0.0903702127659575,0.084948},
-{2965070,3865303,3865062,0.0888,0.0800941176470588},
-{2965071,3865622,3865303,0.243042857142857,0.261738461538462},
-{2965072,3871432,3869969,0.30768,0.295846153846154},
-{2965073,3869969,3869055,0.179175,0.172008},
-{2965074,3869055,3868526,0.107124,0.105023529411765},
-{2965075,3868526,3865831,0.726983333333333,0.513164705882353},
-{2965076,3865622,3865017,0.154153846153846,0.146634146341463},
-{2965077,3881441,3881198,0.124015384615385,0.13435},
-{2965078,3881198,3880881,0.135941176470588,0.141489795918367},
-{2965079,3880076,3879599,0.25545,0.278672727272727},
-{2965080,3879599,3879475,0.0895894736842105,0.0945666666666667},
-{2965081,3879475,3879321,0.0951954545454545,0.182113043478261},
-{2965082,3879321,3879198,0.084384,0.120548571428571},
-{2965083,3879198,3879131,0.048648,0.0552818181818182},
-{2965084,3879131,3879052,0.035688,0.0379659574468085},
-{2965085,3881659,3881753,0.0427555555555556,0.0501913043478261},
-{2965086,3881753,3881874,0.073858064516129,0.0995478260869565},
-{2965087,3881874,3881909,0.0160764705882353,0.0160764705882353},
-{2965088,3881909,3882078,0.0720439024390244,0.073845},
-{2965089,3882078,3882278,0.0760772727272727,0.0743866666666667},
-{2965090,3882278,3882691,0.140042553191489,0.137125},
-{2965091,3882691,3883173,0.138502040816327,0.138502040816327},
-{2965092,3883173,3883468,0.0950375,0.0930979591836735},
-{2965093,3883468,3883984,0.237825,0.205686486486487},
-{2965094,3883984,3884675,0.2494,0.347378571428571},
-{2965095,3884675,3885024,0.115768421052632,0.157114285714286},
-{2965096,3885024,3885959,0.300628571428571,0.300628571428571},
-{2965097,3888480,3889378,0.2578625,0.229211111111111},
-{2965098,3889378,3890675,0.332472,0.325952941176471},
-{2965099,3890675,3890906,0.057732,0.0524836363636364},
-{2965100,3890906,3891392,0.145742307692308,0.140344444444444},
-{2965101,3891392,3891627,0.0779333333333333,0.0779333333333333},
-{2965102,3891627,3892103,0.161258181818182,0.164244444444444},
-{2965103,3892103,3892340,0.0788072727272727,0.0817811320754717},
-{2965104,3892340,3892532,0.0667132075471698,0.070716},
-{2965105,3888093,3888674,0.173742857142857,0.140330769230769},
-{2965106,3888674,3888870,0.0494037735849057,0.0503538461538462},
-{2965107,3888870,3889207,0.094725,0.0967404255319149},
-{2965108,3889207,3889301,0.0331894736842105,0.0331894736842105},
-{2965109,3889301,3889356,0.0511272727272727,0.0511272727272727},
-{2965110,3889356,3889086,0.135870967741935,0.145241379310345},
-{2965111,3895688,3896556,0.644044897959184,0.606888461538462},
-{2965112,3914574,3915020,0.133455555555556,0.133455555555556},
-{2965113,3913440,3914082,0.124657627118644,0.124657627118644},
-{2965114,3912334,3912596,0.0670142857142857,0.0574408163265306},
-{2965115,3910535,3912334,0.364171875,0.369952380952381},
-{2965164,3865039,3864838,0.122256,1000000},
-{2965165,3865039,3864644,0.378381818181818,1000000},
-{2965166,3864838,3864644,0.0492452830188679,0.054375},
-{2965167,3864400,3861633,0.640134375,0.640134375},
-{2965168,3879052,3878921,0.08244,0.085875},
-{2965169,3878921,3878821,0.085575,0.0838285714285714},
-{2965170,3878732,3878683,0.037175,0.037175},
-{2965171,3878683,3878208,0.410386956521739,0.401655319148936},
-{2965172,3885959,3886489,0.164784,0.17165},
-{2965173,3886489,3886634,0.043908,0.0422192307692308},
-{2965174,3887173,3887446,0.08238,0.0777169811320755},
-{2965175,3887446,3887849,0.0925176470588235,0.0890264150943396},
-{2965176,3888384,3888863,0.139695652173913,0.139695652173913},
-{2965177,3888863,3889113,0.0757,0.0757},
-{2965178,3889113,3889624,0.261703448275862,0.210816666666667},
-{2965179,3889086,3889605,0.24004,0.234821739130435},
-{2965180,3889605,3889658,0.0141777777777778,0.0136714285714286},
-{2965181,3889658,3890083,0.165064285714286,0.162168421052632},
-{2965182,3890083,3890525,0.170978181818182,0.167925},
-{2965183,3890525,3890758,0.0803142857142857,0.0789052631578947},
-{2965184,3890758,3890942,0.07215,0.0708842105263158},
-{2965185,3890942,3890998,0.0186109090909091,0.0179578947368421},
-{2965186,3890998,3891194,0.0809444444444444,0.0766842105263158},
-{2965187,3891194,3891477,0.111505882352941,0.109361538461538},
-{2965188,3889886,3889624,0.08874375,0.101421428571429},
-{2965189,3892532,3892663,0.061176,0.0624244897959184},
-{2965190,3892663,3892712,0.0684375,0.0698936170212766},
-{2965191,3892712,3893418,0.295176,0.307475},
-{2965192,3893418,3893435,0.0857347826086957,0.0857347826086957},
-{2965193,3893435,3893399,0.119294117647059,0.119294117647059},
-{2965194,3893399,3893373,0.115905882352941,0.115905882352941},
-{2965195,3893373,3893368,0.111324,0.118429787234043},
-{2965196,3896682,3896897,0.2052,0.197307692307692},
-{2965197,3896897,3897055,0.142811538461538,0.137522222222222},
-{2965198,3897103,3897225,0.111380769230769,0.109279245283019},
-{2965199,3897225,3897738,0.266919230769231,0.257033333333333},
-{2965200,3901926,3902423,0.465376744186046,0.4169},
-{2965201,3902423,3902809,0.143958620689655,1000000},
-{2965202,3902809,3903062,0.0787945945945946,1000000},
-{2965203,3903062,3903202,0.04668,1000000},
-{2965204,3903202,3903293,0.024315,1000000},
-{2965205,3903293,3903615,0.120783333333333,1000000},
-{2965206,3903615,3903881,0.121090909090909,1000000},
-{2965207,3903881,3903989,0.0362166666666667,0.0501461538461538},
-{2965208,3904420,3904495,0.040488,0.06748},
-{2965209,3904495,3905172,1000000,0.307896},
-{2965210,3904495,3905653,0.491224390243902,1000000},
-{2965211,3905172,3905477,1000000,0.14895},
-{2965212,3905477,3906126,1000000,0.265068292682927},
-{2965213,3905653,3906126,0.160446153846154,1000000},
-{2965214,3906126,3906643,0.118369811320755,0.142581818181818},
-{2965215,3906643,3907156,0.0898736842105263,0.08538},
-{2965216,3907156,3907404,0.04464,0.04185},
-{2965217,3907404,3909029,0.289303125,0.276349253731343},
-{2965218,3902423,3902932,0.453916981132075,0.511863829787234},
-{2965221,3871845,3871415,0.0859157894736842,0.0859157894736842},
-{2965222,3871415,3871275,0.0284210526315789,0.0284210526315789},
-{2965223,3871275,3870881,0.0809578947368421,0.0809578947368421},
-{2965224,3870881,3870723,0.032925,0.032925},
-{2965225,3870723,3870145,0.114235714285714,0.116312727272727},
-{2965227,3890795,3891236,0.79032,0.79032},
-{2965228,3891236,3891342,0.16604347826087,0.16604347826087},
-{2965229,3891342,3891637,0.340930434782609,0.340930434782609},
-{2965230,3891477,3891835,0.27685,0.246088888888889},
-{2965231,3891835,3891966,0.0688444444444445,0.0640965517241379},
-{2965232,3891966,3892196,0.124677777777778,0.118115789473684},
-{2965233,3891637,3892256,0.82752,0.82752},
-{2965234,3892256,3892588,0.41694,0.41694},
-{2965235,3892588,3893025,0.45795,0.45795},
-{2965236,3892196,3892886,0.300938181818182,0.295564285714286},
-{2965237,3892886,3893104,0.0913309090909091,0.094777358490566},
-{2965238,3893104,3893209,0.0652222222222222,0.0677307692307692},
-{2965239,3893209,3893520,0.168396226415094,0.1785},
-{2965240,3893025,3893429,0.58926,0.58926},
-{2965241,3893429,3893703,0.4215,0.4215},
-{2965242,3893703,3894228,0.76755,0.76755},
-{2965243,3894914,3895361,0.43168,0.4047},
-{2965244,3893520,3893914,0.218211111111111,0.222328301886792},
-{2965245,3893914,3894207,0.161838461538462,0.168312},
-{2965246,3894207,3894578,0.201673469387755,0.224590909090909},
-{2965247,3894578,3894785,0.108894117647059,0.126218181818182},
-{2965248,3894785,3895234,0.237522222222222,0.278830434782609},
-{2965249,3893368,3893639,0.153941176470588,0.167042553191489},
-{2965250,3893639,3893781,0.050988,0.0520285714285714},
-{2965251,3893781,3894096,0.228931914893617,0.233908695652174},
-{2965252,3894096,3894095,0.018153488372093,0.0173466666666667},
-{2965253,3894095,3894164,0.0944933333333333,0.0924391304347826},
-{2965254,3894164,3894188,0.0117574468085106,0.0117574468085106},
-{2965255,3894188,3894634,0.17056,0.163302127659574},
-{2965256,3894634,3895545,0.3909,0.382213333333333},
-{2965257,3895545,3895803,0.123510638297872,0.126195652173913},
-{2965258,3895803,3896056,0.1343875,0.131644897959184},
-{2965259,3896056,3896108,0.037725,0.0385276595744681},
-{2965260,3896108,3896187,0.0465,0.0465},
-{2965261,3896187,3896262,0.0475787234042553,0.0456367346938776},
-{2965262,3896262,3896486,0.145148936170213,0.142125},
-{2965263,3896486,3896554,0.0391276595744681,0.0383125},
-{2965264,3896554,3896859,0.206266666666667,0.206266666666667},
-{2965265,3896859,3896971,0.0348461538461538,0.0308863636363636},
-{2965266,3896971,3897296,0.0930136363636364,0.0951767441860465},
-{2965267,3897296,3897450,0.050093023255814,0.0478666666666667},
-{2965268,3897450,3897526,0.0278454545454545,0.0272266666666667},
-{2965269,3897526,3898208,0.217787234042553,0.232636363636364},
-{2965270,3898208,3898499,0.091575,0.107209756097561},
-{2965271,3898499,3898770,0.0922173913043478,0.108769230769231},
-{2965272,3897738,3898091,0.130705882352941,0.1212},
-{2965273,3899466,3899433,0.1224,0.111471428571429},
-{2965274,3899433,3899346,0.100338461538462,0.100338461538462},
-{2965275,3899346,3899220,0.0853173913043478,0.0835021276595745},
-{2965276,3898726,3898420,0.154069565217391,0.161072727272727},
-{2965277,3898420,3898159,0.107129411764706,0.111502040816327},
-{2965278,3898159,3897830,0.1454,0.159585365853659},
-{2965279,3897830,3897633,0.134136,0.1458},
-{2965280,3897633,3897623,0.0163714285714286,0.0163714285714286},
-{2965281,3895361,3895437,0.06054,0.0526434782608696},
-{2965282,3895437,3896448,0.679142857142857,0.648272727272727},
-{2965283,3896448,3896812,0.237782608695652,0.287842105263158},
-{2965284,3896812,3897633,0.542314285714286,0.56943},
-{2965285,3902445,3902514,0.0725560975609756,0.0929625},
-{2965286,3902932,3903353,0.507177272727273,0.474804255319149},
-{2965287,3903411,3903655,0.346897674418605,0.339013636363636},
-{2965288,3903655,3904145,0.1695,0.200888888888889},
-{2965289,3904145,3904323,0.0534409090909091,0.0534409090909091},
-{2965290,3904323,3905060,0.186661224489796,0.19055},
-{2965291,3905060,3905616,0.129657692307692,0.1404625},
-{2965292,3905616,3906093,0.0998603773584906,0.105852},
-{2965293,3906093,3906302,0.0460117647058824,0.0488875},
-{2965294,3906302,3906498,0.0474117647058823,0.050375},
-{2965295,3906498,3906840,0.0753063829787234,0.0786533333333333},
-{2965296,3910530,3908638,0.266620588235294,0.283284375},
-{2965297,3907998,3908638,0.107956363636364,0.104168421052632},
-{2965298,3907998,3907884,0.0187615384615385,0.0199102040816327},
-{2965299,3907884,3907488,0.0850434782608696,0.0850434782608696},
-{2965347,3902521,3902358,0.0806926829268293,0.0945257142857143},
-{2965348,3903234,3903278,0.0592933333333333,0.0635285714285714},
-{2965355,3904587,3904899,0.116477777777778,0.120957692307692},
-{2965362,3885046,3884867,1000000,0.141417391304348},
-{2965363,3885258,3885046,1000000,0.106490322580645},
-{2965364,3880032,3879959,1000000,0.0321333333333333},
-{2965365,3880075,3880001,0.0335314285714286,1000000},
-{2965366,3880545,3880441,1000000,0.0855},
-{2965367,3875848,3875948,1000000,1000000},
-{2965368,3875748,3875848,0.215284615384615,0.233225},
-{2965369,3875622,3875748,0.206022222222222,0.163605882352941},
-{2965370,3875334,3875387,0.0290666666666667,0.0327},
-{2965371,3875266,3875324,0.0536142857142857,0.0536142857142857},
-{2965372,3875622,3876048,0.270066666666667,1000000},
-{2965373,3876048,3876876,0.408763636363636,1000000},
-{2965374,3876876,3877488,0.281345454545455,1000000},
-{2965375,3876026,3876048,0.358344,1000000},
-{2965376,3875121,3875448,1000000,0.225966666666667},
-{2965377,3875229,3875552,0.220933333333333,1000000},
-{2965378,3876515,3877240,1000000,0.37992},
-{2965379,3877240,3877739,0.204991304347826,1000000},
-{2965380,3877739,3878213,0.2298,1000000},
-{2965381,3878526,3879123,0.308863636363636,1000000},
-{2965382,3877964,3878526,0.265669565217391,1000000},
-{2965383,3877654,3877964,0.1283,0.133878260869565},
-{2965384,3878237,3878714,1000000,0.253336363636364},
-{2965385,3875506,3875601,0.0904,1000000},
-{2965386,3875886,3875858,0.0408,1000000},
-{2965387,3875858,3875740,0.176373913043478,1000000},
-{2965388,3875858,3875506,0.185337931034483,1000000},
-{2965389,3875601,3875687,0.105636363636364,1000000},
-{2965390,3876671,3877425,1000000,1000000},
-{2965391,3875886,3876671,1000000,1000000},
-{2965392,3873025,3872930,0.105626086956522,1000000},
-{2965393,3873179,3873025,0.090625,1000000},
-{2965394,3873179,3873408,0.0759,0.1012},
-{2965395,3873408,3873430,0.00727058823529412,0.00915555555555556},
-{2965396,3872848,3872878,0.146192727272727,0.191442857142857},
-{2965397,3872834,3872911,0.272109090909091,0.390417391304348},
-{2965398,3875481,3875623,0.212008695652174,0.125030769230769},
-{2965399,3875623,3875332,0.296222222222222,0.275793103448276},
-{2965400,3875601,3875539,0.0405483870967742,1000000},
-{2965401,3875169,3875313,0.0844227272727273,0.0714346153846154},
-{2965402,3875138,3875010,0.0523241379310345,1000000},
-{2965403,3876264,3877244,0.286849180327869,0.29163},
-{2965404,3876494,3876311,1000000,0.212904},
-{2965405,3876845,3876692,1000000,0.123857142857143},
-{2965406,3877129,3876845,1000000,0.351672},
-{2965407,3879726,3879634,0.06105,0.06105},
-{2965408,3879675,3879053,1000000,0.245533333333333},
-{2965409,3878408,3878334,1000000,0.0709142857142857},
-{2965410,3878635,3878243,0.202252173913043,1000000},
-{2965411,3878243,3877697,0.26253,1000000},
-{2965412,3877697,3877623,0.0895,1000000},
-{2965413,3877697,3877644,0.203466666666667,1000000},
-{2965414,3877371,3877644,1000000,1000000},
-{2965415,3877644,3877434,0.4006,1000000},
-{2965416,3877434,3877266,0.49388,1000000},
-{2965417,3877092,3877434,0.19992,1000000},
-{2965418,3876771,3877092,0.205136842105263,1000000},
-{2965419,3877434,3877920,0.21284347826087,1000000},
-{2965420,3877920,3878155,0.0912692307692308,1000000},
-{2965421,3878155,3878553,0.217390909090909,1000000},
-{2965422,3878553,3878967,0.200544,1000000},
-{2965423,3878967,3879520,0.230423076923077,1000000},
-{2965424,3879520,3879549,0.263863636363636,0.252391304347826},
-{2965425,3879549,3878916,0.5153,0.403278260869565},
-{2965426,3883658,3884107,1000000,0.135114893617021},
-{2965427,3882431,3882920,0.274514285714286,0.3603},
-{2965428,3882920,3883732,1000000,0.557925},
-{2965429,3882920,3883457,0.287945454545455,0.287945454545455},
-{2965430,3883457,3883543,0.1116,1000000},
-{2965431,3883543,3884198,0.375027272727273,1000000},
-{2965432,3884597,3884540,1000000,0.030048},
-{2965433,3882646,3882920,1000000,0.1849},
-{2965434,3882417,3882646,1000000,0.1263},
-{2965435,3882157,3882417,1000000,0.253142857142857},
-{2965436,3883383,3883457,0.110433333333333,1000000},
-{2965437,3881702,3882157,1000000,0.4230375},
-{2965438,3883345,3884244,1000000,0.456346153846154},
-{2965439,3881281,3881527,1000000,0.45009},
-{2965440,3881527,3881738,1000000,1000000},
-{2965441,3881738,3881845,1000000,0.21459},
-{2965442,3881845,3882157,1000000,0.329025},
-{2965443,3882464,3882564,0.163757142857143,1000000},
-{2965444,3882217,3882464,1000000,1000000},
-{2965445,3881990,3882217,1000000,1000000},
-{2965446,3880897,3881292,0.2832,0.3186},
-{2965447,3881292,3881738,1000000,0.254685714285714},
-{2965448,3881738,3882464,0.505547368421053,1000000},
-{2965449,3883717,3884739,0.667581818181818,1000000},
-{2965450,3884002,3884198,0.19116,0.2124},
-{2965451,3883383,3884002,1000000,0.52004},
-{2965452,3879080,3879387,1000000,1000000},
-{2965453,3879755,3879813,1000000,1000000},
-{2965454,3879813,3879914,1000000,1000000},
-{2965455,3879914,3880031,1000000,1000000},
-{2965456,3879640,3879747,0.107123076923077,0.11605},
-{2965457,3879482,3879640,0.26228,1000000},
-{2965458,3879356,3879482,0.201692307692308,1000000},
-{2965459,3880307,3880366,1000000,0.0822333333333333},
-{2965460,3879080,3879640,0.2526,0.2526},
-{2965461,3879640,3880010,0.571136842105263,1000000},
-{2965462,3880010,3880265,1000000,0.40776},
-{2965463,3880265,3880307,1000000,0.0759666666666667},
-{2965464,3879755,3880010,0.211133333333333,0.211133333333333},
-{2965465,3880010,3880263,0.331928571428571,1000000},
-{2965466,3880263,3880520,1000000,1000000},
-{2965467,3880520,3880529,1000000,0.110228571428571},
-{2965468,3879276,3878799,1000000,0.4965375},
-{2965469,3879524,3879813,0.162911111111111,0.162911111111111},
-{2965470,3877881,3877766,1000000,0.12333},
-{2965471,3877881,3878042,0.139542857142857,1000000},
-{2965472,3879093,3879387,0.1544,0.1544},
-{2965473,3878698,3879080,0.1886,0.1886},
-{2965474,3878698,3879093,1000000,0.2773},
-{2965475,3880923,3881075,0.316623529411765,1000000},
-{2965476,3878276,3878339,1000000,0.123529411764706},
-{2965477,3878247,3878276,1000000,0.0578210526315789},
-{2965478,3877740,3878247,1000000,0.291366666666667},
-{2965479,3876845,3877284,0.188511111111111,0.188511111111111},
-{2965480,3877372,3877678,1000000,1000000},
-{2965481,3877129,3877372,1000000,1000000},
-{2965482,3875958,3876422,1000000,0.207216},
-{2965483,3875448,3875958,1000000,0.292042105263158},
-{2965484,3880500,3880451,1000000,0.0402260869565217},
-{2965485,3880735,3880500,1000000,0.209045454545455},
-{2965486,3880948,3880735,1000000,0.161086956521739},
-{2965487,3881226,3880994,1000000,0.185427272727273},
-{2965488,3881409,3881226,1000000,0.153},
-{2965489,3881490,3881409,1000000,0.0921529411764706},
-{2965490,3881900,3881490,1000000,0.646254545454546},
-{2965491,3880965,3880728,0.4062,1000000},
-{2965492,3881260,3880965,0.272873684210526,1000000},
-{2965493,3882201,3881260,0.792685714285714,1000000},
-{2965494,3882598,3882201,0.34368,1000000},
-{2965495,3881381,3880818,0.516766666666667,1000000},
-{2965496,3880818,3880889,0.0466421052631579,1000000},
-{2965497,3880889,3880637,0.391145454545455,1000000},
-{2965498,3882749,3883348,0.279025,1000000},
-{2965499,3883672,3883866,0.20135,1000000},
-{2965500,3882394,3882749,0.191607692307692,1000000},
-{2965501,3883348,3882737,1000000,0.647431578947368},
-{2965502,3884918,3884097,1000000,0.633628571428571},
-{2965503,3881644,3882082,0.399327272727273,1000000},
-{2965504,3880863,3881237,0.368084210526316,1000000},
-{2965505,3881237,3881359,0.137964705882353,1000000},
-{2965506,3881359,3881644,0.254336842105263,1000000},
-{2965507,3883510,3883329,0.331090909090909,1000000},
-{2965508,3883329,3882710,0.595742857142857,1000000},
-{2965509,3882710,3882349,0.3622,1000000},
-{2965510,3882349,3882082,0.30162,1000000},
-{2965511,3882082,3881498,0.541942857142857,1000000},
-{2965512,3881971,3882164,1000000,0.558247058823529},
-{2965513,3882164,3882332,1000000,0.430171428571429},
-{2965514,3883205,3883266,0.0577363636363636,1000000},
-{2965515,3883266,3883678,0.25301052631579,1000000},
-{2965516,3883634,3883678,1000000,0.07731},
-{2965517,3883266,3883420,0.265628571428571,1000000},
-{2965518,3883420,3883607,0.338542857142857,1000000},
-{2965519,3882332,3883061,0.465733333333333,1000000},
-{2965520,3883061,3883760,0.336182608695652,1000000},
-{2965521,3883760,3884017,0.1304,1000000},
-{2965522,3884017,3884714,0.359657142857143,1000000},
-{2965523,3883458,3883564,1000000,0.31992},
-{2965524,3883061,3883341,0.705378947368421,1000000},
-{2965525,3882889,3883061,0.363927272727273,1000000},
-{2965526,3882642,3882889,0.465575,1000000},
-{2965527,3883607,3884121,0.251045454545455,1000000},
-{2965528,3885488,3885542,0.023424,0.0325333333333333},
-{2965529,3884121,3884759,0.283176,1000000},
-{2965530,3884935,3884759,1000000,0.1219875},
-{2965531,3884950,3884935,0.1704,0.1704},
-{2965532,3884714,3884950,0.148233333333333,1000000},
-{2965533,3883607,3883760,0.280114285714286,1000000},
-{2965534,3885038,3885501,0.377953846153846,1000000},
-{2965535,3885038,3885487,0.3226125,1000000},
-{2965536,3884759,3884714,1000000,0.153},
-{2965537,3884714,3884472,0.785660869565217,1000000},
-{2965538,3884493,3884402,0.31225,1000000},
-{2965539,3883564,3883498,1000000,0.580989473684211},
-{2965540,3884402,3884362,0.13728,1000000},
-{2965541,3884362,3884244,0.51116,1000000},
-{2965542,3884362,3885187,0.5462625,1000000},
-{2965543,3875462,3875479,0.00915555555555556,0.00915555555555556},
-{2965544,3875479,3875902,0.197822222222222,0.197822222222222},
-{2965545,3876398,3876537,0.0492193548387097,0.0586846153846154},
-{2965546,3876216,3876055,0.1154625,1000000},
-{2965547,3877085,3877045,1000000,1000000},
-{2965548,3876973,3877085,1000000,1000000},
-{2965549,3876947,3876973,1000000,1000000},
-{2965550,3876734,3876947,1000000,1000000},
-{2965551,3877009,3876947,1000000,1000000},
-{2965552,3877165,3877136,1000000,1000000},
-{2965553,3876463,3877165,1000000,1000000},
-{2965554,3877085,3877203,1000000,1000000},
-{2965555,3877203,3877273,1000000,1000000},
-{2965556,3878122,3878237,0.0615789473684211,0.045},
-{2965557,3877645,3878122,1000000,0.19164},
-{2965558,3877367,3877645,1000000,0.118971428571429},
-{2965559,3879323,3879524,1000000,0.2965},
-{2965560,3879093,3879323,1000000,0.173018181818182},
-{2965561,3878233,3878698,1000000,0.40458},
-{2965562,3880889,3881384,0.33325,0.33325},
-{2965563,3880615,3880818,0.17292,1000000},
-{2965564,3880615,3880397,1000000,0.2725125},
-{2965565,3880394,3880615,0.192872727272727,1000000},
-{2965566,3879946,3880394,0.384927272727273,1000000},
-{2965567,3879034,3879946,0.699063157894737,1000000},
-{2965568,3882120,3882057,0.0962571428571429,0.16845},
-{2965569,3882686,3883458,1000000,0.438126315789474},
-{2965570,3883345,3883717,0.413566666666667,1000000},
-{2965571,3878665,3878214,0.35092,1000000},
-{2965572,3875293,3875746,0.307828571428571,1000000},
-{2965573,3874175,3874123,0.1776,1000000},
-{2965574,3874123,3874035,0.44928,1000000},
-{2965575,3872729,3872864,0.0790434782608696,1000000},
-{2965576,3872864,3873046,0.0807777777777778,1000000},
-{2965577,3873046,3873475,0.490745454545454,1000000},
-{2965578,3871955,3871539,0.154248648648649,0.135885714285714},
-{2965579,3873412,3871955,0.85311,1000000},
-{2965580,3874585,3873412,1000000,0.532823076923077},
-{2965581,3874858,3874585,1000000,0.0896909090909091},
-{2965582,3876052,3875774,1000000,0.142878260869565},
-{2965583,3876473,3876052,0.238142857142857,0.238142857142857},
-{2965584,3876742,3876473,0.3166,0.55405},
-{2965585,3876865,3876473,0.4971,0.437448},
-{2965586,3876837,3876865,0.362446153846154,0.349022222222222},
-{2965587,3878105,3876837,1000000,0.7092},
-{2965588,3876934,3876837,0.176290909090909,0.133737931034483},
-{2965589,3877054,3876934,0.2053,0.236884615384615},
-{2965590,3876934,3876267,0.409434782608696,0.448428571428571},
-{2965591,3876267,3876069,0.563377777777778,0.6338},
-{2965592,3876069,3875347,0.352688888888889,0.396775},
-{2965593,3875347,3875122,0.13545,0.1548},
-{2965594,3875122,3874738,0.36705,0.354393103448276},
-{2965595,3874738,3873808,0.400125,0.413032258064516},
-{2965596,3874787,3874060,0.342144827586207,0.320070967741936},
-{2965597,3874060,3873415,0.30766875,0.30766875},
-{2965598,3873415,3872921,0.196725,0.179862857142857},
-{2965599,3872317,3871944,0.149785714285714,0.1398},
-{2965600,3871944,3870393,0.654511111111111,0.58906},
-{2965601,3872938,3871775,0.34514,0.32356875},
-{2965602,3871955,3871563,0.266364705882353,0.22641},
-{2965603,3871563,3870419,0.4185,0.369264705882353},
-{2965604,3870419,3869865,0.215978571428571,0.183254545454545},
-{2965605,3869421,3869795,1000000,0.351410526315789},
-{2965606,3869865,3869795,0.0303,0.0225085714285714},
-{2965607,3869783,3870393,0.201774193548387,0.223392857142857},
-{2965608,3869280,3868907,0.38825,0.345111111111111},
-{2965609,3872246,3872912,0.277605882352941,0.286018181818182},
-{2965610,3871812,3872246,1000000,0.271288235294118},
-{2965611,3872493,3872085,0.4434,1000000},
-{2965612,3872493,3871973,0.292042105263158,0.264228571428571},
-{2965613,3871973,3871395,0.292366666666667,0.2506},
-{2965614,3871395,3870878,0.203688,0.195853846153846},
-{2965615,3870878,3870271,0.335533333333333,0.274527272727273},
-{2965616,3870271,3869475,0.291744,0.291744},
-{2965617,3869475,3869066,0.157755555555556,0.170376},
-{2965618,3870978,3870271,0.583408695652174,1000000},
-{2965619,3870271,3869873,0.261022222222222,1000000},
-{2965620,3869873,3869716,0.148771428571429,1000000},
-{2965621,3870315,3869475,1000000,0.554355555555556},
-{2965622,3869475,3869190,1000000,0.257269565217391},
-{2965623,3869190,3868994,1000000,0.170352},
-{2965624,3869052,3868939,1000000,0.24603},
-{2965625,3872125,3871765,0.117755555555556,1000000},
-{2965626,3871765,3871216,0.210168,1000000},
-{2965627,3871459,3871216,1000000,0.4022625},
-{2965628,3871973,3871538,1000000,0.474142857142857},
-{2965629,3872388,3872222,0.1014375,0.0737727272727273},
-{2965630,3874015,3873889,0.3231,1000000},
-{2965631,3874345,3873889,0.225816,1000000},
-{2965632,3874774,3874345,0.2099,1000000},
-{2965633,3875257,3874774,0.275918181818182,1000000},
-{2965634,3875816,3875974,0.0950285714285714,0.0950285714285714},
-{2965635,3875312,3875816,0.273685714285714,0.302494736842105},
-{2965636,3870994,3871007,1000000,0.020125},
-{2965637,3870994,3870831,0.0699692307692308,0.072768},
-{2965638,3870801,3869976,0.290490909090909,0.29956875},
-{2965639,3869976,3869376,0.233167741935484,0.24094},
-{2965640,3869840,3870196,0.112556756756757,0.1262},
-{2965641,3869840,3869483,0.151536,0.145707692307692},
-{2965642,3868735,3869483,0.274072727272727,0.347861538461538},
-{2965643,3868418,3868735,0.313269230769231,0.370227272727273},
-{2965644,3868321,3868418,0.3201,0.3201},
-{2965645,3868373,3868321,0.125688888888889,0.1616},
-{2965646,3868761,3868373,0.257791304347826,1000000},
-{2965647,3868411,3868761,0.275571428571429,0.304578947368421},
-{2965648,3869447,3869376,1000000,0.103314285714286},
-{2965649,3869360,3869447,1000000,0.0947142857142857},
-{2965650,3869800,3869360,1000000,0.283885714285714},
-{2965651,3868761,3870019,0.61275,1000000},
-{2965652,3870019,3870896,0.4064,1000000},
-{2965653,3870896,3871321,0.256838709677419,0.256838709677419},
-{2965654,3871437,3871130,0.194210526315789,0.1845},
-{2965655,3871130,3870801,0.26,0.203478260869565},
-{2965656,3871725,3871235,0.2649,0.222174193548387},
-{2965657,3874161,3874171,0.0103116279069767,0.0105571428571429},
-{2965658,3871916,3872154,0.224142857142857,1000000},
-{2965659,3871277,3871552,1000000,0.261507692307692},
-{2965660,3870508,3870883,1000000,0.1176},
-{2965661,3870883,3871317,1000000,0.122554285714286},
-{2965662,3870883,3871000,0.112236363636364,1000000},
-{2965663,3869021,3868965,1000000,0.1322},
-{2965664,3867376,3866780,1000000,0.47235},
-{2965665,3867168,3866780,1000000,0.237736363636364},
-{2965666,3867816,3867168,1000000,0.603257142857143},
-{2965667,3865472,3865601,0.049275,1000000},
-{2965668,3865211,3865472,0.0999096774193548,1000000},
-{2965669,3865273,3865211,1000000,0.0883846153846154},
-{2965670,3865472,3865273,1000000,0.0681512195121951},
-{2965671,3865298,3865273,1000000,0.0501488372093023},
-{2965672,3864556,3863120,0.496268571428571,0.57898},
-{2965673,3865149,3864556,0.192967741935484,0.260086956521739},
-{2965674,3865790,3865430,0.3789,0.157875},
-{2965675,3861675,3860858,0.409179310344828,0.423792857142857},
-{2965676,3861909,3861675,0.12138,0.12138},
-{2965677,3862158,3861909,0.137139130434783,0.175233333333333},
-{2965678,3864200,3863348,1000000,0.437165217391304},
-{2965679,3864404,3864200,1000000,0.09895},
-{2965680,3864507,3864404,1000000,0.0413},
-{2965681,3864778,3864507,1000000,0.126425},
-{2965682,3865119,3864778,1000000,0.27645},
-{2965683,3864279,3863530,1000000,0.426311111111111},
-{2965684,3864279,3863845,0.22762,1000000},
-{2965685,3868060,3867690,0.221771428571429,0.166328571428571},
-{2965686,3864646,3864596,1000000,0.09456},
-{2965687,3864310,3864473,0.122752941176471,0.189709090909091},
-{2965688,3864473,3864596,0.134457142857143,1000000},
-{2965689,3864948,3864596,0.24666,0.259642105263158},
-{2965690,3864948,3864629,0.4696,1000000},
-{2965691,3868846,3868665,1000000,0.522066666666667},
-{2965692,3869200,3868846,1000000,0.1722},
-{2965693,3869200,3869047,1000000,0.434475},
-{2965694,3870551,3870062,1000000,0.14060625},
-{2965695,3870734,3870342,0.114774193548387,1000000},
-{2965696,3869892,3869332,0.209690909090909,0.192216666666667},
-{2965697,3870104,3869625,0.246035294117647,0.232366666666667},
-{2965698,3870104,3870108,0.0705230769230769,0.06112},
-{2965699,3870061,3870104,0.129576923076923,0.124777777777778},
-{2965700,3869946,3870061,0.269509090909091,0.3294},
-{2965701,3869931,3869940,0.228913043478261,0.2925},
-{2965702,3872130,3872597,0.253233333333333,1000000},
-{2965703,3867584,3867408,1000000,0.101778947368421},
-{2965704,3867993,3867584,1000000,0.187963636363636},
-{2965705,3868558,3868634,1000000,0.1835},
-{2965706,3867740,3867497,0.20235,0.20235},
-{2965707,3868722,3867740,0.355984615384615,0.420709090909091},
-{2965708,3869253,3868722,0.166567741935484,0.1613625},
-{2965709,3869450,3869253,0.08405,0.087704347826087},
-{2965710,3870178,3869450,0.403311111111111,0.418823076923077},
-{2965711,3870733,3870178,0.902457142857143,0.823982608695652},
-{2965712,3871313,3871325,1000000,0.135184615384615},
-{2965713,3871325,3871053,1000000,0.136489655172414},
-{2965714,3871053,3871036,1000000,0.1336},
-{2965715,3871036,3870884,1000000,0.223084615384615},
-{2965716,3871522,3871036,1000000,0.200127272727273},
-{2965717,3871613,3871522,1000000,0.151472727272727},
-{2965718,3871613,3872062,0.211768421052632,1000000},
-{2965719,3871386,3870904,0.604242857142857,1000000},
-{2965720,3871403,3871386,1000000,0.209833333333333},
-{2965721,3871877,3871386,0.29052,0.29052},
-{2965722,3871522,3871403,1000000,0.272147368421053},
-{2965723,3871699,3871613,1000000,0.131544827586207},
-{2965724,3871784,3871699,1000000,0.189782608695652},
-{2965725,3872008,3871522,0.191686956521739,1000000},
-{2965726,3872517,3872000,0.32072,1000000},
-{2965727,3870884,3870519,0.196042105263158,0.18624},
-{2965728,3869601,3868968,0.49449,1000000},
-{2965729,3868968,3867922,0.468711111111111,1000000},
-{2965730,3867922,3867160,0.36934,1000000},
-{2965731,3867160,3866653,0.307628571428571,1000000},
-{2965732,3866653,3866270,0.237622222222222,1000000},
-{2965733,3858457,3857523,0.208004347826087,0.195269387755102},
-{2965734,3856553,3855526,0.246386666666667,0.241030434782609},
-{2965735,3855526,3855297,0.07225,0.08128125},
-{2965736,3855297,3853721,1000000,1000000},
-{2965737,3851487,3851186,1000000,1000000},
-{2965740,3851124,3850588,0.2608875,0.27828},
-{2965741,3851536,3851124,0.18219375,0.153426315789474},
-{2965742,3851390,3851455,0.2322,0.215614285714286},
-{2965743,3851455,3850824,0.394178571428571,0.4245},
-{2965744,3854623,3854151,1000000,0.358542857142857},
-{2965745,3853171,3853602,0.2560875,0.264348387096774},
-{2965746,3853602,3853721,1000000,1000000},
-{2965747,3855025,3854190,0.257326829268293,0.22935652173913},
-{2965748,3855294,3855025,0.108206896551724,0.101225806451613},
-{2965749,3855297,3855294,0.235864285714286,0.227731034482759},
-{2965750,3856149,3855294,0.40284,0.431614285714286},
-{2965751,3854623,3854007,0.3068,0.287625},
-{2965752,3854007,3853754,0.11828,0.11828},
-{2965753,3853754,3852944,0.422422222222222,0.35641875},
-{2965754,3852944,3852812,0.05144,0.0417081081081081},
-{2965755,3852812,3852375,0.15193125,0.127942105263158},
-{2965756,3851974,3851701,0.201233333333333,0.157486956521739},
-{2965757,3852293,3851857,0.1588125,0.1588125},
-{2965758,3851857,3851703,0.0564947368421053,0.0564947368421053},
-{2965759,3851703,3851517,0.0617526315789474,0.0634216216216216},
-{2965760,3851517,3851091,0.217730769230769,0.22644},
-{2965762,3851701,3851091,0.392736,0.426886956521739},
-{2965763,3852966,3851701,0.388369230769231,0.409362162162162},
-{2965771,3855769,3856329,0.266935714285714,0.287469230769231},
-{2965772,3857114,3857495,0.25488,0.199125},
-{2965773,3865626,3865364,1000000,1000000},
-{2965774,3865364,3864943,1000000,1000000},
-{2965775,3864943,3864411,1000000,0.446147368421053},
-{2965776,3864411,3863619,1000000,0.74136},
-{2965777,3863619,3863636,1000000,0.04494},
-{2965778,3864850,3864576,0.157141935483871,0.2118},
-{2965779,3864576,3864380,0.0902108108108108,0.123622222222222},
-{2965780,3864380,3864027,0.2175,0.183157894736842},
-{2965781,3864027,3863615,0.156885,0.179297142857143},
-{2965782,3863615,3863285,0.18346,0.177541935483871},
-{2965783,3862535,3863285,0.9428,1000000},
-{2965784,3863285,3863619,0.457928571428571,0.6411},
-{2965785,3863285,3862988,0.148371428571429,0.148371428571429},
-{2965786,3862988,3862258,0.265828571428571,0.265828571428571},
-{2965787,3862535,3862124,0.229527272727273,0.240457142857143},
-{2965788,3862124,3861192,0.521907692307692,0.502577777777778},
-{2965789,3861192,3861050,0.1244,0.11196},
-{2965790,3861050,3860587,0.2461,0.2461},
-{2965791,3861192,3861509,0.330384,0.330384},
-{2965792,3861509,3861704,0.215675,0.235281818181818},
-{2965793,3861704,3861992,0.168744,0.21093},
-{2965794,3861992,3862258,0.196854545454545,0.196854545454545},
-{2965795,3862258,3862135,0.0598829268292683,0.0558},
-{2965796,3862135,3861639,0.277395348837209,0.277395348837209},
-{2965797,3861639,3861527,0.0557590909090909,0.0721588235294118},
-{2965798,3861527,3861273,0.1305875,0.2022},
-{2965799,3861273,3861064,0.0989478260869565,0.0989478260869565},
-{2965800,3861064,3860698,0.197289473684211,0.197289473684211},
-{2965801,3860698,3860080,0.258994285714286,1000000},
-{2965802,3860080,3860294,0.298915384615385,1000000},
-{2965805,3856270,3855275,0.315308108108108,0.38888},
-{2965806,3856707,3856270,0.13715,0.145217647058824},
-{2965807,3857402,3856707,0.191713636363636,0.241011428571429},
-{2965808,3860294,3859839,0.326968421052632,0.2004},
-{2965809,3861394,3861298,0.0306558139534884,0.0321512195121951},
-{2965810,3862536,3861394,0.317489361702128,0.310875},
-{2965811,3862713,3862536,0.05152,0.0504},
-{2965812,3865521,3865193,1000000,0.143238461538462},
-{2965813,3865193,3864023,1000000,0.429041379310345},
-{2965814,3867846,3867228,1000000,0.3044},
-{2965815,3867228,3866359,1000000,0.376852173913043},
-{2965816,3866359,3865959,1000000,0.133821428571429},
-{2965817,3865959,3865096,1000000,0.35515},
-{2965818,3864549,3864411,0.206571428571429,0.1446},
-{2965819,3865096,3864973,0.07512,0.0662823529411765},
-{2965820,3863636,3863073,0.441816,0.424823076923077},
-{2965821,3863073,3862893,0.123707142857143,0.0989657142857143},
-{2965822,3862893,3862385,0.29062,0.27245625},
-{2965823,3862385,3862060,0.249876923076923,0.240622222222222},
-{2965824,3862060,3861926,0.124266666666667,0.115696551724138},
-{2965825,3861926,3861394,0.460464,0.396951724137931},
-{2965826,3865105,3865131,0.0406857142857143,1000000},
-{2965827,3865131,3865626,0.47628,1000000},
-{2965828,3867790,3867531,1000000,0.340685714285714},
-{2965829,3867531,3866390,0.497678571428571,0.497678571428571},
-{2965830,3866436,3866749,0.313510344827586,0.313510344827586},
-{2965831,3866257,3866321,0.0278086956521739,0.0220551724137931},
-{2965832,3869323,3869392,0.171070588235294,0.200565517241379},
-{2965833,3869392,3869488,0.3429,0.3857625},
-{2965834,3869488,3868809,0.511941176470588,0.561483870967742},
-{2965835,3868809,3867998,0.46455,0.46455},
-{2965836,3868809,3868758,0.0642,0.07704},
-{2965867,3864145,3863679,0.2728875,1000000},
-{2965868,3863561,3862785,0.211174468085106,0.283577142857143},
-{2965869,3865022,3864265,0.41217,1000000},
-{2965870,3864265,3863408,0.338345454545455,0.465225},
-{2965871,3863408,3863055,0.228851612903226,1000000},
-{2965872,3863055,3862851,0.102356756756757,1000000},
-{2965873,3863339,3862732,0.392622222222222,0.588933333333333},
-{2965874,3863055,3862732,0.47952,0.508581818181818},
-{2965875,3862851,3862323,0.278305263157895,1000000},
-{2965876,3862323,3861818,0.2627,1000000},
-{2965877,3861341,3861818,0.29799375,0.307606451612903},
-{2965878,3861553,3861341,0.229968,0.221123076923077},
-{2965879,3861802,3861553,0.303,0.303},
-{2965880,3860688,3861341,0.3669,0.39136},
-{2965881,3860611,3860688,0.0598615384615385,0.0864666666666667},
-{2965882,3861802,3860611,0.53775,1000000},
-{2965883,3860611,3859249,0.49629375,0.5882},
-{2965884,3858544,3858221,0.375161538461538,0.424095652173913},
-{2965885,3858673,3858544,1000000,1000000},
-{2965886,3859249,3858948,0.181622222222222,0.181622222222222},
-{2965887,3858994,3856149,1000000,0.910341176470588},
-{2965888,3851171,3851283,0.05124,0.05124},
-{2965955,3852711,3852940,0.156909090909091,0.1726},
-{2965956,3852435,3852711,0.211634482758621,0.20458},
-{2965957,3852435,3852793,0.129214285714286,0.1206},
-{2965958,3852793,3853171,0.130623529411765,0.11103},
-{2965962,3850392,3849584,0.348068571428571,0.320589473684211},
-{2965963,3861818,3861856,0.2786,0.329254545454545},
-{2965964,3861856,3861821,0.159872727272727,0.170187096774194},
-{2965965,3861454,3861263,1000000,1000000},
-{2965967,3851809,3851909,1000000,0.0550857142857143},
-{2965968,3851909,3852898,1000000,0.3738},
-{2965969,3852898,3854238,0.566855172413793,0.608844444444444},
-{2965970,3854238,3855304,0.486969230769231,0.42204},
-{2965971,3857125,3857364,1000000,0.122228571428571},
-{2965972,3851746,3851989,0.0966,0.101684210526316},
-{2965973,3852842,3853736,0.43128,0.4193},
-{2965974,3859211,3858742,0.241486956521739,0.241486956521739},
-{2965975,3859211,3859085,0.313623529411765,0.26658},
-{2965976,3859647,3859211,0.38571,0.367342857142857},
-{2965977,3859953,3859647,0.313363636363636,0.28725},
-{2965978,3860127,3859953,0.184742857142857,0.228211764705882},
-{2965979,3860522,3860094,1000000,0.350016},
-{2965980,3861049,3860522,1000000,0.416625},
-{2965981,3860714,3860094,0.299466666666667,0.351547826086957},
-{2965982,3861209,3860714,0.240062068965517,0.21755625},
-{2965983,3861638,3861209,0.271875,0.20390625},
-{2965984,3862001,3861638,1000000,0.451223076923077},
-{2965985,3862342,3862001,1000000,0.430752},
-{2965986,3862428,3862002,0.269746153846154,0.23378},
-{2965987,3862002,3861821,0.1804,0.1804},
-{2965988,3863408,3862890,1000000,0.31252},
-{2965989,3853736,3854135,0.274272727272727,0.3017},
-{2965990,3854135,3854487,0.121533333333333,0.125005714285714},
-{2965991,3854487,3854610,0.060975,0.062941935483871},
-{2965992,3855950,3856454,0.202875,0.202875},
-{2965993,3857120,3857611,0.197568,0.1764},
-{2965995,3852629,3852205,0.116832558139535,0.116832558139535},
-{2965996,3851575,3852134,0.23235,0.23235},
-{2965997,3849832,3850122,0.115722580645161,1000000},
-{2966002,3861551,3861412,0.203136,0.230836363636364},
-{2966003,3861412,3861288,0.0985941176470588,0.115593103448276},
-{2966004,3860609,3860549,0.0844363636363636,0.074304},
-{2966005,3857162,3854297,0.831384615384615,0.8106},
-{2966006,3857822,3857162,0.196783333333333,0.196783333333333},
-{2966143,3859671,3858708,0.455686956521739,0.52404},
-{2966144,3856564,3856063,0.239428571428571,0.193384615384615},
-{2966145,3854691,3854717,0.0983357142857143,0.0888193548387097},
-{2966149,3850940,3850417,1000000,1000000},
-{2966150,3850060,3849752,0.1559,0.173222222222222},
-{2966156,3863120,3862967,1000000,1000000},
-{2966157,3863281,3863120,0.387571428571429,1000000},
-{2966158,3863348,3863281,0.163885714285714,1000000},
-{2966159,3862967,3862878,0.216685714285714,0.3792},
-{2966160,3862878,3862712,0.233328,0.24305},
-{2966161,3862712,3861288,0.587717647058823,0.62445},
-{2966162,3863082,3862712,0.15885,0.195507692307692},
-{2966163,3862702,3862070,0.213264705882353,0.2417},
-{2966164,3862070,3861961,0.0584275862068965,0.05295},
-{2966165,3861961,3861604,0.146262857142857,0.146262857142857},
-{2966166,3859761,3860238,0.272238461538462,0.393233333333333},
-{2966167,3857948,3858278,1000000,0.359742857142857},
-{2966168,3857611,3857948,1000000,0.6328},
-{2966169,3852205,3852381,1000000,0.15344347826087},
-{2966170,3852381,3852675,1000000,0.254175},
-{2966171,3850717,3851108,0.312970588235294,0.280026315789474},
-{2966172,3850077,3850717,0.337885714285714,0.31536},
-{2966173,3865825,3865923,1000000,0.182836363636364},
-{2966174,3865923,3865905,1000000,0.157517647058824},
-{2966175,3865779,3865905,0.484384615384615,1000000},
-{2966176,3865993,3865903,0.1084,0.2168},
-{2966177,3879461,3879484,0.207,0.22425},
-{2966178,3879484,3879520,0.193103225806452,0.230238461538462},
-{2966179,3875721,3874873,1000000,0.557810526315789},
-{2966180,3858786,3859411,0.268407692307692,0.211472727272727},
-{2966181,3859411,3859918,0.243977777777778,0.227151724137931},
-{2966182,3859918,3860471,0.473454545454545,0.385777777777778},
-{2966183,3860471,3860962,0.445881818181818,0.377284615384615},
-{2966184,3860962,3861291,0.327624,0.292521428571429},
-{2966185,3858549,3858805,0.246342857142857,0.255466666666667},
-{2966186,3858805,3858383,0.270707142857143,0.280733333333333},
-{2966187,3858383,3857904,0.321988235294118,0.228075},
-{2966188,3857904,3857341,0.538771428571429,0.342854545454545},
-{2966189,3856768,3856584,0.147214285714286,0.1145},
-{2966190,3856768,3857341,0.255313043478261,0.3670125},
-{2966191,3859033,3859236,0.194208,0.2023},
-{2966192,3859236,3859478,0.20115,0.216623076923077},
-{2966193,3859478,3859615,0.118045161290323,0.110890909090909},
-{2966194,3859615,3859806,0.158496774193548,0.140382857142857},
-{2966195,3860477,3860853,0.208852173913044,0.228742857142857},
-{2966196,3862055,3861677,0.220958823529412,0.23476875},
-{2966197,3862691,3862324,0.266416216216216,0.30804375},
-{2966198,3862814,3862691,0.0768923076923077,0.0937125},
-{2966199,3863015,3862814,0.105892307692308,0.13321935483871},
-{2966200,3863194,3863015,0.09678,0.113858823529412},
-{2966201,3859478,3859150,0.139466666666667,0.150624},
-{2966202,3859150,3858650,0.236664,0.246525},
-{2966203,3858650,3857826,0.41345,0.451036363636364},
-{2966204,3857826,3856976,0.37695652173913,0.3468},
-{2966205,3853849,3853628,0.123194117647059,0.149592857142857},
-{2966206,3855078,3854520,0.281377777777778,0.2374125},
-{2966207,3856181,3855078,0.48695625,0.48695625},
-{2966208,3855870,3855078,0.272925,0.256870588235294},
-{2966209,3856766,3855870,0.338622222222222,0.365712},
-{2966210,3856030,3856181,0.137372727272727,0.1314},
-{2966211,3855889,3856030,0.1372,0.149672727272727},
-{2966212,3856434,3855889,0.204309090909091,0.22474},
-{2966213,3856502,3856172,0.18214,0.18214},
-{2966214,3857416,3856976,0.233979310344828,0.21204375},
-{2966215,3861729,3861201,0.276705882352941,0.303483870967742},
-{2966216,3861201,3860597,0.225775609756098,0.225775609756098},
-{2966217,3860597,3859995,0.232384615384615,0.226575},
-{2966218,3859995,3859581,0.157989473684211,0.139618604651163},
-{2966219,3859581,3858969,0.244835294117647,0.244835294117647},
-{2966220,3858969,3858527,0.219703448275862,0.193072727272727},
-{2966221,3858527,3858101,0.163292307692308,0.15921},
-{2966222,3858038,3857474,0.258421621621622,0.2656},
-{2966223,3849920,3850006,0.297835714285714,0.287565517241379},
-{2966224,3850006,3849788,0.151118181818182,0.138525},
-{2966225,3877859,3878333,0.465054545454545,0.1764},
-{2966226,3875035,3876377,0.48905625,0.601915384615385},
-{2966227,3874514,3875204,0.214005405405405,0.344269565217391},
-{2966228,3874433,3873754,0.262064516129032,0.369272727272727},
-{2966229,3873754,3872986,0.234342857142857,0.241235294117647},
-{2966230,3872986,3872200,0.198372972972973,0.203883333333333},
-{2966231,3872200,3871816,0.0882461538461538,0.0983314285714286},
-{2966232,3871816,3871373,0.131593548387097,0.123618181818182},
-{2966233,3871489,3870122,0.297763636363636,0.344778947368421},
-{2966234,3872207,3871489,0.123701886792453,0.128552941176471},
-{2966235,3872779,3872207,0.0953236363636364,0.0989207547169811},
-{2966236,3873104,3872779,0.0643745454545455,0.0668037735849057},
-{2966237,3873584,3873104,0.0979924528301887,0.105991836734694},
-{2966238,3874265,3873584,0.161364,0.171663829787234},
-{2966239,3862324,3861746,0.410136,0.379755555555556},
-{2966240,3861214,3860899,0.1987,0.176622222222222},
-{2966241,3860899,3860084,0.400248,0.33354},
-{2966242,3860084,3859423,0.39813,0.442366666666667},
-{2966243,3862464,3862099,0.138212903225806,0.153021428571429},
-{2966244,3862746,3862464,0.0824487804878049,0.109045161290323},
-{2966245,3863047,3862746,0.0960146341463415,0.115782352941176},
-{2966246,3863190,3863047,0.0553621621621622,0.0620727272727273},
-{2966247,3863351,3863190,0.0737647058823529,0.076},
-{2966248,3863351,3863599,0.203376,0.175324137931034},
-{2966249,3864456,3864128,0.160536,0.154361538461538},
-{2966250,3864727,3864456,0.129864,0.124869230769231},
-{2966251,3864521,3864727,0.345836363636364,0.345836363636364},
-{2966252,3864408,3864521,0.176018181818182,0.16135},
-{2966253,3864385,3864408,0.0656869565217391,0.060432},
-{2966254,3863246,3863351,0.167930769230769,0.161711111111111},
-{2966255,3863246,3863521,0.150755555555556,0.150755555555556},
-{2966256,3863521,3863993,0.179311764705882,0.164772972972973},
-{2966257,3863993,3864385,0.485085714285714,1000000},
-{2966258,3862861,3863246,0.318525,0.308872727272727},
-{2966259,3862753,3862861,0.0849642857142857,0.0881111111111111},
-{2966260,3862670,3862753,0.10124347826087,0.10124347826087},
-{2966261,3864861,3864385,0.216511764705882,0.210325714285714},
-{2966262,3865673,3865404,0.112540909090909,0.107647826086957},
-{2966263,3866710,3866371,0.108586363636364,0.111111627906977},
-{2966264,3867827,3867277,0.198247826086957,0.1899875},
-{2966265,3866838,3866207,0.306208695652174,0.306208695652174},
-{2966266,3867083,3866838,0.104464285714286,0.100862068965517},
-{2966267,3867827,3867932,0.03315,0.03536},
-{2966268,3867932,3868109,0.0543829787234043,0.0568},
-{2966269,3868313,3868109,0.0809318181818182,0.0741875},
-{2966270,3868741,3868313,0.15876,0.152004255319149},
-{2966271,3870128,3869325,0.5291625,0.604757142857143},
-{2966272,3870942,3870490,0.140690322580645,0.174456},
-{2966273,3869739,3868298,0.428671428571429,0.409186363636364},
-{2966274,3868298,3868378,0.143871428571429,0.154938461538462},
-{2966275,3868298,3868056,0.0565227272727273,0.0540652173913043},
-{2966276,3868056,3866954,0.22446,0.220058823529412},
-{2966277,3866954,3866506,0.0874384615384615,0.0842},
-{2966278,3864538,3864151,0.111065217391304,0.111065217391304},
-{2966279,3864151,3863557,0.15389387755102,0.1571},
-{2966280,3866147,3866288,0.15781935483871,0.148254545454545},
-{2966281,3866288,3866380,0.130164705882353,0.134109090909091},
-{2966282,3866502,3867887,0.242042105263158,0.250843636363636},
-{2966283,3870947,3871839,0.17308085106383,0.150644444444444},
-{2966284,3873852,3874063,0.0830727272727273,1000000},
-{2966285,3874068,3874508,1000000,0.136436842105263},
-{2966286,3874508,3875200,1000000,0.164675},
-{2966287,3867722,3867394,0.464238461538461,0.482808},
-{2966288,3867394,3867335,0.111052173913043,0.106425},
-{2966289,3867335,3867244,0.194857142857143,0.157384615384615},
-{2966290,3866345,3866314,0.115333333333333,0.115333333333333},
-{2966291,3866379,3866345,0.126507692307692,0.149509090909091},
-{2966292,3867253,3866644,0.327088888888889,0.327088888888889},
-{2966293,3867645,3867253,0.152833333333333,0.22008},
-{2966294,3869449,3869245,0.0958363636363636,0.131775},
-{2966295,3870922,3870038,1000000,0.200882926829268},
-{2966296,3871912,3872329,0.0976923076923077,0.100263157894737},
-{2966297,3872329,3872801,0.103876923076923,0.10128},
-{2966298,3872801,3873190,0.10281,0.105446153846154},
-{2966299,3873190,3873576,0.106484210526316,0.103753846153846},
-{2966300,3870416,3869732,0.27,0.2484},
-{2966301,3870044,3869471,0.222545454545455,0.212869565217391},
-{2966302,3870332,3870044,0.100666666666667,0.10872},
-{2966303,3870648,3870332,0.09061875,0.111530769230769},
-{2966304,3870830,3870648,0.0638769230769231,0.0638769230769231},
-{2966305,3872127,3872073,0.12393,0.1458},
-{2966306,3871883,3871726,0.2392,0.229632},
-{2966307,3871726,3871573,0.246533333333333,0.27735},
-{2966308,3871573,3871419,0.216888,0.225925},
-{2966309,3871419,3871301,0.172222222222222,0.19375},
-{2966310,3870749,3870427,0.500352,0.3909},
-{2966311,3870031,3869473,0.20504347826087,0.168428571428571},
-{2966312,3870427,3870031,0.1086,0.119109677419355},
-{2966313,3872622,3871726,0.324192,0.324192},
-{2966314,3871726,3871109,0.200421428571429,0.200421428571429},
-{2966315,3871109,3870757,0.1105125,0.114077419354839},
-{2966316,3870757,3870242,0.1315,0.127945945945946},
-{2966317,3870242,3869649,0.22345,0.17876},
-{2966318,3869580,3868195,0.526344,0.731033333333333},
-{2966319,3868195,3867715,0.167376923076923,0.167376923076923},
-{2966320,3866481,3867167,0.436125,0.436125},
-{2966321,3879331,3879030,0.150245454545455,1000000},
-{2966322,3879030,3878867,0.120533333333333,1000000},
-{2966323,3878867,3878384,0.367623529411765,1000000},
-{2966324,3878384,3877811,0.4653,1000000},
-{2966325,3877811,3877376,0.2919375,1000000},
-{2966326,3877376,3877019,0.231635294117647,1000000},
-{2966327,3877019,3876509,1000000,0.362325},
-{2966328,3876509,3876031,0.38144,1000000},
-{2966329,3875896,3876031,0.152478947368421,1000000},
-{2966330,3876031,3876420,0.299066666666667,1000000},
-{2966331,3876420,3876478,0.0862578947368421,1000000},
-{2966332,3876979,3876420,1000000,0.329621052631579},
-{2966333,3877494,3876979,1000000,0.23088},
-{2966334,3877863,3877494,1000000,0.180545454545455},
-{2966335,3878287,3877863,1000000,0.2677},
-{2966336,3878798,3878287,1000000,0.358566666666667},
-{2966337,3879301,3878798,1000000,0.289457142857143},
-{2966338,3879713,3879301,1000000,0.28011},
-{2966339,3880187,3879713,1000000,0.428188235294118},
-{2966340,3878431,3878630,1000000,0.43005},
-{2966341,3878630,3878867,1000000,0.3},
-{2966342,3878867,3879301,1000000,0.467869565217391},
-{2966343,3879301,3879476,1000000,0.225542857142857},
-{2966344,3879476,3879577,1000000,0.126652173913043},
-{2966345,3877019,3877249,0.215856,1000000},
-{2966346,3877249,3877494,0.26718,1000000},
-{2966347,3877494,3877665,0.145776923076923,1000000},
-{2966348,3877665,3877824,0.12578,1000000},
-{2966349,3877824,3877972,0.10036875,1000000},
-{2966350,3877824,3877288,0.334870588235294,1000000},
-{2966351,3878206,3877824,0.214547368421053,1000000},
-{2966352,3878576,3878206,0.249789473684211,1000000},
-{2966353,3879105,3878576,0.32814,1000000},
-{2966354,3879577,3879105,0.3323,1000000},
-{2966355,3879953,3879577,0.243182608695652,1000000},
-{2966356,3880474,3879953,0.31535,1000000},
-{2966357,3876533,3876990,1000000,1000000},
-{2966358,3877288,3876990,1000000,1000000},
-{2966361,3877865,3878235,0.45325,0.402888888888889},
-{2966363,3878194,3878285,0.0865448275862069,1000000},
-{2966364,3878285,3878423,0.139992857142857,1000000},
-{2966365,3879207,3879377,1000000,0.2466},
-{2966366,3879377,3879512,1000000,0.149382857142857},
-{2966369,3879433,3879689,0.321696,1000000},
-{2966370,3879689,3879823,0.18518,1000000},
-{2966371,3879823,3879934,0.155505882352941,1000000},
-{2966374,3879844,3880096,1000000,0.398209090909091},
-{2966375,3880224,3880279,1000000,0.0697153846153846},
-{2966376,3880279,3880358,1000000,0.124735714285714},
-{2966481,3882416,3881858,0.51252,0.410016},
-{2966482,3883407,3882416,0.455029411764706,0.418135135135135},
-{2966483,3883778,3883407,0.177141176470588,0.316989473684211},
-{2966484,3882043,3881457,0.411725,1000000},
-{2966485,3882951,3882043,0.614215384615385,1000000},
-{2966486,3883356,3882951,0.261875,1000000},
-{2966487,3882714,3882650,0.0519333333333333,1000000},
-{2966488,3883691,3883362,0.27222,1000000},
-{2966489,3883462,3883413,0.0580125,1000000},
-{2966490,3884149,3883765,0.2522,1000000},
-{2966491,3884480,3884149,0.24,1000000},
-{2966492,3884891,3884480,0.33411,1000000},
-{2966493,3884842,3884123,0.38878,1000000},
-{2966494,3885264,3884842,0.2091375,1000000},
-{2966495,3885630,3885264,0.162166666666667,1000000},
-{2966496,3885756,3885630,0.0627,1000000},
-{2966497,3886017,3885756,0.110163636363636,1000000},
-{2966498,3885549,3884820,1000000,0.466128},
-{2966499,3885952,3885549,1000000,0.234346153846154},
-{2966500,3886270,3885952,1000000,0.185933333333333},
-{2966501,3886651,3886598,0.0518,0.0518},
-{2966502,3885549,3886372,0.384642857142857,0.307714285714286},
-{2966503,3884842,3885549,1000000,0.350733333333333},
-{2966504,3884286,3884842,1000000,0.23488125},
-{2966505,3883811,3884286,1000000,0.238155555555556},
-{2966506,3883451,3883811,1000000,0.16666},
-{2966507,3883163,3883451,1000000,0.137896551724138},
-{2966508,3882806,3883163,1000000,0.191053846153846},
-{2966509,3883163,3882468,0.490172727272727,1000000},
-{2966510,3883730,3883163,0.415690909090909,1000000},
-{2966511,3884119,3883730,0.268909090909091,1000000},
-{2966512,3884512,3884119,0.27792,1000000},
-{2966513,3882416,3882806,0.203568,0.203568},
-{2966514,3882043,3882416,1000000,0.230492307692308},
-{2966515,3881666,3882043,1000000,0.198921428571429},
-{2966516,3881260,3881666,1000000,0.233},
-{2966517,3880738,3881260,1000000,0.446611764705882},
-{2966518,3885141,3885756,0.3466,1000000},
-{2966519,3884669,3885141,0.287142857142857,1000000},
-{2966520,3884389,3884669,0.248223529411765,1000000},
-{2966521,3884119,3884389,0.177730434782609,1000000},
-{2966522,3883767,3884119,0.223445454545455,1000000},
-{2966523,3883407,3883767,0.236727272727273,1000000},
-{2966524,3882951,3883407,0.31593,1000000},
-{2966525,3881409,3881781,0.41635,1000000},
-{2966526,3882573,3882951,0.246381818181818,1000000},
-{2966527,3882201,3882573,0.258381818181818,1000000},
-{2966528,3886128,3886073,0.0404347826086957,1000000},
-{2966529,3886522,3886376,0.0817058823529412,1000000},
-{2966530,3885393,3886522,0.53145,1000000},
-{2966531,3886522,3887217,0.3486,1000000},
-{2966532,3887217,3887723,0.1879875,1000000},
-{2966533,3887723,3888066,0.1275,1000000},
-{2966534,3884641,3884559,0.07072,1000000},
-{2966535,3885377,3885031,0.226610526315789,1000000},
-{2966536,3885755,3885377,0.326766666666667,1000000},
-{2966537,3885903,3885755,0.125325,1000000},
-{2966538,3883905,3883835,0.049578947368421,0.0348888888888889},
-{2966539,3884966,3884606,0.17266875,0.240234782608696},
-{2966540,3883924,3884381,0.287885714285714,1000000},
-{2966541,3884381,3884857,0.256375,1000000},
-{2966542,3884857,3885360,0.245746153846154,1000000},
-{2966543,3885360,3885947,0.343718181818182,1000000},
-{2966544,3885947,3886324,0.214434782608696,1000000},
-{2966545,3886324,3886843,0.39441,1000000},
-{2966546,3885433,3884966,0.2394,0.216232258064516},
-{2966547,3885947,3885433,0.255193548387097,0.2637},
-{2966548,3885360,3884891,0.3276,1000000},
-{2966549,3885969,3885360,0.416452173913043,1000000},
-{2966550,3885922,3885969,1000000,0.0141771428571429},
-{2966551,3886806,3886705,0.0545351351351351,0.0545351351351351},
-{2966552,3887133,3886806,0.22185,0.230066666666667},
-{2966553,3887733,3887332,0.29515,0.337314285714286},
-{2966554,3887332,3887195,1000000,0.116809090909091},
-{2966555,3887195,3886778,1000000,0.3648},
-{2966556,3885006,3884381,0.552,1000000},
-{2966557,3885436,3885006,0.3714,1000000},
-{2966558,3885823,3885436,0.376266666666667,1000000},
-{2966559,3886201,3885823,1000000,0.29445},
-{2966560,3886592,3886201,1000000,0.374942857142857},
-{2966561,3886676,3886403,0.286408695652174,1000000},
-{2966562,3886403,3886348,0.290347826086957,1000000},
-{2966563,3886348,3886256,0.368307692307692,1000000},
-{2966564,3888514,3889572,1000000,0.690031578947368},
-{2966565,3887195,3887688,0.255834782608696,0.235368},
-{2966566,3888069,3888514,0.3468,0.226173913043478},
-{2966567,3887455,3888069,0.383815384615385,1000000},
-{2966568,3887455,3887142,1000000,0.335933333333333},
-{2966569,3887142,3886830,1000000,0.300136363636364},
-{2966570,3886830,3886324,1000000,0.5148},
-{2966571,3885761,3885343,1000000,0.33969},
-{2966572,3885343,3884974,1000000,0.322517647058823},
-{2966573,3884974,3884852,1000000,0.0967363636363636},
-{2966574,3884852,3884557,1000000,0.179475},
-{2966575,3884245,3884184,1000000,0.0434181818181818},
-{2966576,3882806,3882165,1000000,0.500542857142857},
-{2966577,3883767,3882806,1000000,0.8489},
-{2966578,3884144,3883767,1000000,0.338364705882353},
-{2966579,3881666,3881101,1000000,0.454885714285714},
-{2966580,3882573,3881666,1000000,0.741736363636364},
-{2966581,3882971,3882573,1000000,0.314285714285714},
-{2966582,3883077,3883025,1000000,0.0421826086956522},
-{2966583,3883744,3883373,1000000,0.283609090909091},
-{2966584,3884083,3883744,1000000,0.289484210526316},
-{2966585,3882705,3882737,0.0458307692307692,0.0458307692307692},
-{2966586,3882915,3883362,0.2712,0.328294736842105},
-{2966587,3883362,3883744,0.252081818181818,1000000},
-{2966588,3883744,3884149,0.294157894736842,1000000},
-{2966589,3884149,3884606,0.310690909090909,1000000},
-{2966590,3884606,3884974,0.25614,1000000},
-{2966591,3883373,3883765,1000000,0.27918},
-{2966592,3885460,3884857,1000000,0.50151},
-{2966593,3884813,3884938,0.0671076923076923,0.158618181818182},
-{2966594,3884938,3885436,1000000,0.31881},
-{2966595,3885436,3885812,1000000,0.247095652173913},
-{2966596,3888249,3888033,1000000,0.57355},
-{2966597,3888033,3887882,0.240366666666667,0.2704125},
-{2966598,3888263,3889060,0.228248780487805,0.233955},
-{2966599,3887287,3888397,1000000,0.583281818181818},
-{2966600,3888065,3887702,1000000,0.245492307692308},
-{2966601,3888397,3888065,1000000,0.25025},
-{2966602,3888733,3888397,1000000,0.226755555555556},
-{2966603,3888885,3888733,1000000,0.0854709677419355},
-{2966604,3889045,3888885,1000000,0.181517647058824},
-{2966605,3889190,3889045,1000000,0.100872},
-{2966606,3888848,3889190,1000000,1000000},
-{2966607,3889572,3889190,1000000,0.2746},
-{2966608,3890071,3891018,1000000,0.438483870967742},
-{2966609,3889710,3890071,1000000,0.147564705882353},
-{2966610,3888978,3889710,1000000,0.254789189189189},
-{2966611,3888397,3888978,1000000,0.194348571428571},
-{2966612,3888621,3888263,0.3201,1000000},
-{2966613,3888978,3888621,0.247875,1000000},
-{2966614,3889307,3888978,0.282,1000000},
-{2966615,3889594,3889307,0.252286956521739,1000000},
-{2966616,3890111,3889594,0.445375,1000000},
-{2966617,3889572,3890111,0.4106,0.351942857142857},
-{2966618,3890111,3890814,0.423652173913043,1000000},
-{2966619,3889416,3889060,1000000,0.290618181818182},
-{2966620,3889710,3889416,1000000,0.29703},
-{2966621,3890011,3889710,1000000,0.271382608695652},
-{2966622,3890291,3890011,1000000,0.323233333333333},
-{2966623,3890814,3890291,1000000,0.461086956521739},
-{2966624,3890814,3891129,0.271466666666667,1000000},
-{2966625,3891129,3891563,1000000,1000000},
-{2966626,3891563,3891873,0.185256,1000000},
-{2966627,3891093,3890814,1000000,0.277695652173913},
-{2966628,3891396,3891093,1000000,0.31326},
-{2966629,3889797,3889459,0.292636363636364,1000000},
-{2966630,3890071,3889797,0.2457,1000000},
-{2966631,3890362,3890071,0.297628571428571,1000000},
-{2966632,3890645,3890362,0.263863636363636,1000000},
-{2966633,3891129,3890645,0.420912,1000000},
-{2966634,3891450,3891129,0.2696,1000000},
-{2966635,3891744,3891450,0.329747368421053,1000000},
-{2966636,3884953,3884490,0.401166666666667,1000000},
-{2966637,3883632,3882749,0.680863636363636,1000000},
-{2966638,3882749,3882176,0.52581,1000000},
-{2966639,3883267,3882819,1000000,0.4118},
-{2966640,3884878,3885320,0.410072727272727,0.196121739130435},
-{2966641,3885456,3886154,1000000,0.468675},
-{2966642,3886077,3886154,0.147572727272727,1000000},
-{2966643,3885542,3886068,1000000,0.35532},
-{2966644,3885704,3886068,0.545488888888889,0.545488888888889},
-{2966645,3886068,3886153,0.197557894736842,0.18768},
-{2966646,3885539,3885760,1000000,0.217963636363636},
-{2966647,3885760,3886302,1000000,0.1681875},
-{2966648,3886154,3886231,1000000,0.0308625},
-{2966649,3886231,3886591,0.1602,0.140781818181818},
-{2966650,3886591,3887040,0.173981818181818,0.173981818181818},
-{2966651,3887040,3887229,0.0733241379310345,0.0607542857142857},
-{2966652,3887229,3887371,0.0943263157894737,0.0484378378378378},
-{2966653,3886653,3886904,0.3202,1000000},
-{2966654,3886904,3887157,0.255436363636364,1000000},
-{2966655,3887157,3887229,0.1557,0.1557},
-{2966656,3886068,3886444,1000000,0.197686956521739},
-{2966657,3886444,3886890,1000000,0.225725},
-{2966658,3886890,3887251,1000000,0.1866},
-{2966659,3887251,3887568,1000000,0.136095652173913},
-{2966660,3887568,3888018,1000000,0.191921739130435},
-{2966661,3886904,3887528,0.343285714285714,1000000},
-{2966662,3887528,3887833,1000000,0.233},
-{2966663,3886302,3886686,1000000,0.156225},
-{2966664,3886686,3887116,1000000,0.214752},
-{2966665,3887116,3887524,1000000,0.178},
-{2966666,3887552,3887872,1000000,0.140452173913044},
-{2966667,3887872,3888406,1000000,0.240965217391304},
-{2966668,3886302,3886574,1000000,0.390696},
-{2966669,3886574,3886820,0.641,1000000},
-{2966670,3885449,3886029,0.231422222222222,0.480646153846154},
-{2966671,3884878,3884890,0.248628571428571,0.290066666666667},
-{2966672,3884890,3884935,0.554215384615385,0.576384},
-{2966673,3884950,3884991,0.0291,1000000},
-{2966674,3885051,3885171,0.368713043478261,1000000},
-{2966675,3885376,3885449,0.0488470588235294,1000000},
-{2966676,3884472,3885171,1000000,0.432705882352941},
-{2966677,3886029,3886198,0.0763,0.0963789473684211},
-{2966678,3886198,3886574,0.200975,1000000},
-{2966679,3886198,3886380,1000000,0.376591304347826},
-{2966680,3886574,3886963,0.188192307692308,1000000},
-{2966681,3886963,3887213,0.105321428571429,1000000},
-{2966682,3887213,3887402,0.0874615384615385,1000000},
-{2966683,3887402,3887866,0.1614,1000000},
-{2966684,3887866,3887979,0.03525,1000000},
-{2966685,3887979,3888178,0.0707806451612903,1000000},
-{2966686,3887589,3887545,0.206366666666667,0.37146},
-{2966687,3887577,3888245,1000000,0.340363636363636},
-{2966688,3888178,3888849,0.276096,1000000},
-{2966689,3888245,3888486,1000000,1000000},
-{2966690,3888486,3888980,1000000,1000000},
-{2966691,3888018,3888406,0.226533333333333,0.291257142857143},
-{2966692,3888406,3888569,0.0873230769230769,0.100164705882353},
-{2966693,3888569,3888849,0.150252631578947,0.203914285714286},
-{2966694,3888980,3889101,0.110957142857143,1000000},
-{2966695,3889780,3890666,0.425871428571429,0.425871428571429},
-{2966696,3890290,3890666,0.252812903225807,0.290266666666667},
-{2966697,3888038,3888330,0.376017391304348,1000000},
-{2966698,3888762,3889092,1000000,0.482833333333333},
-{2966699,3889466,3889092,0.402577777777778,0.3882},
-{2966700,3889636,3889895,0.373057142857143,0.3561},
-{2966701,3889895,3890290,1000000,0.356075},
-{2966702,3890290,3891401,0.379388571428571,0.379388571428571},
-{2966703,3890666,3891036,1000000,0.241942857142857},
-{2966704,3891401,3892093,0.438910344827586,0.438910344827586},
-{2966705,3892093,3892586,0.479676923076923,1000000},
-{2966706,3890666,3891238,0.366548571428571,0.32073},
-{2966707,3882562,3882686,1000000,0.326466666666667},
-{2966708,3883630,3884137,1000000,1000000},
-{2966709,3885200,3885935,0.3139,1000000},
-{2966710,3885966,3885955,0.1049,1000000},
-{2966711,3885966,3885980,0.56991,1000000},
-{2966712,3885980,3885935,0.3834,1000000},
-{2966713,3885935,3885895,1000000,1000000},
-{2966714,3885237,3885980,0.3789,1000000},
-{2966715,3885980,3886599,0.34,1000000},
-{2966716,3886599,3887029,0.273126315789474,1000000},
-{2966717,3887029,3887643,0.286963636363636,1000000},
-{2966718,3887643,3888230,0.28461,1000000},
-{2966719,3885195,3885424,1000000,1000000},
-{2966720,3885424,3885895,1000000,1000000},
-{2966721,3885935,3886564,0.308869565217391,1000000},
-{2966722,3886564,3886985,0.231681818181818,1000000},
-{2966723,3886985,3887624,0.315342857142857,1000000},
-{2966724,3887624,3888215,0.3,1000000},
-{2966725,3888574,3888243,1000000,0.371428571428571},
-{2966726,3888243,3888230,1000000,0.17589},
-{2966727,3888215,3888807,0.2389,0.229344},
-{2966728,3888181,3887879,0.635442857142857,1000000},
-{2966729,3889418,3889686,1000000,0.107828571428571},
-{2966730,3887433,3887336,1000000,0.23772},
-{2966731,3888980,3889502,1000000,0.444925},
-{2966732,3889502,3889524,1000000,0.3069},
-{2966733,3889502,3890332,1000000,0.371538461538462},
-{2966734,3890332,3890615,1000000,0.18249},
-{2966735,3890615,3891238,1000000,0.417714285714286},
-{2966736,3891238,3891614,1000000,0.274168421052632},
-{2966737,3891614,3892093,1000000,0.35586},
-{2966738,3889292,3888880,1000000,1000000},
-{2966739,3889292,3889666,1000000,1000000},
-{2966740,3889666,3890290,1000000,0.42993},
-{2966741,3889418,3889426,0.1515,1000000},
-{2966742,3889423,3889417,0.32385,1000000},
-{2966743,3889417,3888996,0.5326,1000000},
-{2966744,3889426,3889424,0.159171428571429,1000000},
-{2966745,3889424,3889423,0.150130434782609,1000000},
-{2966746,3889640,3890527,1000000,1000000},
-{2966747,3890527,3891267,0.293969230769231,0.301705263157895},
-{2966748,3891267,3891588,0.142333333333333,0.150705882352941},
-{2966749,3891588,3893035,0.617091891891892,0.585446153846154},
-{2966750,3891535,3891588,0.179733333333333,0.156541935483871},
-{2966751,3891442,3891535,0.236588571428571,0.2238},
-{2966752,3891407,3891442,0.0552,0.0504685714285714},
-{2966753,3891332,3891407,0.15885,0.173290909090909},
-{2966754,3891153,3891208,0.134888888888889,0.191684210526316},
-{2966755,3892295,3892241,0.35204,0.16501875},
-{2966756,3892295,3892616,0.261308571428571,0.261308571428571},
-{2966757,3892616,3892860,0.162127272727273,0.140794736842105},
-{2966758,3891321,3891870,1000000,0.248644444444444},
-{2966759,3891870,3892616,1000000,0.366715384615385},
-{2966760,3892860,3893035,0.132,0.132},
-{2966761,3893035,3893289,0.200092307692308,0.190331707317073},
-{2966762,3893289,3893801,0.336242553191489,0.336242553191489},
-{2966763,3887433,3888181,0.30284347826087,1000000},
-{2966764,3888181,3888798,0.364376470588235,1000000},
-{2966765,3888798,3889423,0.352333333333333,1000000},
-{2966766,3889423,3889959,0.325073684210526,1000000},
-{2966767,3889959,3890689,0.3616,1000000},
-{2966768,3890689,3891442,0.336555555555556,0.395086956521739},
-{2966769,3891411,3891410,0.2884,0.34608},
-{2966770,3890400,3891410,0.37093125,0.423921428571429},
-{2966771,3896454,3897499,0.725791304347826,0.758781818181818},
-{2966772,3897499,3898733,0.366259459459459,0.410654545454545},
-{2966773,3899144,3899258,0.257337931034483,0.298512},
-{2966774,3899258,3899393,0.318090909090909,0.32803125},
-{2966775,3899393,3899543,0.277466666666667,0.344441379310345},
-{2966776,3899543,3899696,0.269417142857143,0.336771428571429},
-{2966777,3895550,3896305,0.250026666666667,0.250026666666667},
-{2966778,3896305,3896752,0.4012875,0.188841176470588},
-{2966779,3895987,3896149,0.364571428571429,0.364571428571429},
-{2966780,3895762,3895987,0.2516,0.30192},
-{2966781,3895550,3895762,0.289609090909091,0.374788235294118},
-{2966782,3895299,3895550,0.280944,0.29265},
-{2966783,3895204,3895299,0.0890727272727273,0.122475},
-{2966784,3882217,3882788,1000000,0.688242857142857},
-{2966785,3881527,3882217,1000000,0.5319375},
-{2966786,3880986,3881527,0.31587,1000000},
-{2966787,3884871,3885322,1000000,0.288966666666667},
-{2966788,3885322,3885964,1000000,0.37065},
-{2966789,3885964,3886374,1000000,0.284},
-{2966790,3886374,3886770,1000000,0.27189},
-{2966791,3886770,3887153,1000000,0.289966666666667},
-{2966792,3887773,3888338,1000000,0.268147826086957},
-{2966793,3884597,3885036,0.320775,1000000},
-{2966794,3885036,3885626,0.46188,1000000},
-{2966795,3885626,3886061,1000000,0.368228571428571},
-{2966796,3886061,3886445,0.3339375,1000000},
-{2966797,3886763,3887257,0.324142857142857,1000000},
-{2966798,3887257,3887735,0.272714285714286,1000000},
-{2966799,3884285,3884527,1000000,0.179633333333333},
-{2966800,3884527,3884827,1000000,0.147844444444444},
-{2966801,3884827,3885240,1000000,0.269685714285714},
-{2966802,3885240,3885626,1000000,0.664411764705882},
-{2966803,3885626,3885964,1000000,0.52071},
-{2966804,3885964,3886246,1000000,0.392714285714286},
-{2966805,3886374,3886595,0.640984615384615,1000000},
-{2966806,3886061,3886374,0.54141,1000000},
-{2966807,3885650,3886061,0.659810526315789,1000000},
-{2966808,3884404,3884808,0.189046153846154,0.223418181818182},
-{2966809,3884808,3885140,0.163425,0.13074},
-{2966810,3885140,3885792,1000000,0.33045},
-{2966811,3884812,3886025,0.563808,1000000},
-{2966812,3886025,3886999,0.527088,1000000},
-{2966813,3886025,3886345,0.295025,1000000},
-{2966814,3887735,3888676,0.428856,1000000},
-{2966815,3888676,3889303,0.3098,1000000},
-{2966816,3889303,3889774,0.278154545454545,1000000},
-{2966817,3888338,3889368,1000000,0.477814285714286},
-{2966818,3889882,3890313,1000000,0.3057},
-{2966819,3890313,3890551,1000000,0.195726315789474},
-{2966820,3888338,3888712,0.441284210526316,1000000},
-{2966821,3888043,3888338,0.265368,1000000},
-{2966822,3887735,3888043,0.30537,1000000},
-{2966823,3887358,3887735,0.389571428571429,1000000},
-{2966824,3889368,3890015,1000000,0.451823076923077},
-{2966825,3888676,3889010,1000000,0.253371428571429},
-{2966826,3888112,3888676,1000000,0.351408},
-{2966827,3886999,3887358,0.359209090909091,1000000},
-{2966828,3887514,3888112,1000000,0.341544},
-{2966829,3886345,3887514,1000000,0.812463157894737},
-{2966830,3889774,3889989,0.184942857142857,1000000},
-{2966831,3890551,3890890,1000000,0.240085714285714},
-{2966832,3890890,3890957,0.09831,0.0756230769230769},
-{2966833,3886721,3887082,0.255247058823529,0.309942857142857},
-{2966834,3887082,3887774,0.42436875,0.484992857142857},
-{2966835,3887774,3888549,0.180829787234043,0.193159090909091},
-{2966836,3888549,3889387,0.399325,0.281876470588235},
-{2966837,3890879,3891528,0.20786511627907,0.21800487804878},
-{2966838,3891528,3892047,0.159587234042553,0.159587234042553},
-{2966839,3892047,3893439,0.415097872340426,0.433546666666667},
-{2966840,3893439,3894253,0.489507692307692,0.47727},
-{2966841,3890573,3891206,0.293882352941176,0.333066666666667},
-{2966842,3891812,3893008,0.548785714285714,0.548785714285714},
-{2966843,3893008,3893477,0.562727272727273,0.442142857142857},
-{2966844,3893836,3894383,0.392552941176471,0.385003846153846},
-{2966845,3894383,3895130,0.5686625,0.58076170212766},
-{2966846,3897620,3897945,0.228244444444444,0.228244444444444},
-{2966847,3897025,3896417,0.313034482758621,0.313034482758621},
-{2966848,3897620,3897025,0.308441379310345,0.3727},
-{2966849,3896417,3896710,0.21004,0.21004},
-{2966850,3897062,3896710,0.361228571428572,0.270921428571429},
-{2966851,3897660,3897062,0.217786363636364,0.245707692307692},
-{2966852,3897062,3896753,0.162812903225806,0.186933333333333},
-{2966853,3896753,3896692,0.0410516129032258,0.0438827586206897},
-{2966854,3896692,3896473,0.1672,0.191085714285714},
-{2966855,3882008,3882417,0.342966666666667,1000000},
-{2966856,3884174,3884766,0.50472,1000000},
-{2966857,3890551,3891439,0.819947368421053,1000000},
-{2966858,3899992,3900723,0.306165517241379,0.286412903225806},
-{2966859,3900723,3900988,0.129816,0.115907142857143},
-{2966860,3900892,3900988,0.214927272727273,0.22164375},
-{2966861,3900988,3901522,0.257478260869565,0.257478260869565},
-{2966862,3901522,3902287,0.470717647058824,0.40011},
-{2966863,3900988,3901802,0.399852631578947,0.446894117647059},
-{2966864,3901802,3902031,0.08952,1000000},
-{2966865,3902287,3902673,0.170856,0.164284615384615},
-{2966866,3900544,3900611,0.0574682926829268,0.047124},
-{2966867,3901167,3900611,1000000,0.282391304347826},
-{2966868,3901167,3901653,0.2219,1000000},
-{2966869,3901653,3902654,0.430375,0.430375},
-{2966870,3902031,3901957,0.0984,0.0849818181818182},
-{2966871,3901957,3901680,0.39534,0.39534},
-{2966872,3901680,3901653,0.112,0.138352941176471},
-{2966873,3901653,3901616,0.203057142857143,0.218676923076923},
-{2966874,3901616,3901591,0.139179310344828,0.149488888888889},
-{2966875,3901591,3901571,0.0698322580645161,0.0832615384615385},
-{2966876,3901571,3901559,0.0986666666666667,0.111},
-{2966877,3900611,3901435,0.673604651162791,0.629673913043478},
-{2966878,3901435,3901578,0.0590275862068966,0.05349375},
-{2966879,3901578,3902475,0.321475862068966,0.266365714285714},
-{2966880,3903103,3903051,0.243323076923077,0.253056},
-{2966881,3902673,3903051,0.239242105263158,0.206618181818182},
-{2966882,3902654,3902685,0.214690909090909,0.202422857142857},
-{2966883,3902645,3902654,0.145781818181818,0.133633333333333},
-{2966884,3902645,3902641,0.143047058823529,0.143047058823529},
-{2966885,3902654,3903791,0.5428,0.5664},
-{2966886,3902641,3902627,0.13772,0.142468965517241},
-{2966887,3902627,3902545,0.290925,0.31032},
-{2966888,3903048,3903675,0.284723076923077,0.2313375},
-{2966889,3903714,3903675,0.1757,0.18825},
-{2966890,3903714,3903756,0.10760625,0.111077419354839},
-{2966891,3903756,3903774,0.0518896551724138,0.0518896551724138},
-{2966892,3903774,3903791,0.10916,0.112924137931034},
-{2966893,3901351,3901493,0.196594285714286,1000000},
-{2966894,3901956,3902229,1000000,0.189186206896552},
-{2966895,3904108,3902614,0.62270625,0.603836363636364},
-{2966896,3903774,3904497,0.3564,0.3564},
-{2966897,3904497,3904108,0.34821,0.357138461538462},
-{2966898,3903791,3903848,0.22306,0.202781818181818},
-{2966899,3905008,3904497,0.274475,0.274475},
-{2966900,3905192,3905008,0.104265306122449,0.111065217391304},
-{2966901,3905707,3905679,0.0256258064516129,0.031776},
-{2966902,3903848,3905008,0.517025,0.496344},
-{2966903,3903051,3904004,0.53115652173913,0.469869230769231},
-{2966904,3904004,3904911,0.489742857142857,0.428525},
-{2966905,3904911,3905138,0.224869565217391,0.246285714285714},
-{2966906,3892740,3893836,0.496664516129032,0.733171428571429},
-{2966907,3889406,3890573,0.563577777777778,0.800873684210526},
-{2966908,3888710,3889911,0.8017,0.72153},
-{2966909,3890216,3890527,0.174724137931034,0.3166875},
-{2966910,3895299,3896051,0.495991304347826,0.7129875},
-{2966911,3896051,3896496,0.31623,0.287481818181818},
-{2966912,3888897,3889636,0.252327272727273,0.20817},
-{2966913,3884379,3884105,1000000,0.359357142857143},
-{2966914,3891127,3891190,0.0245666666666667,0.0276375},
-{2966915,3879055,3879455,0.28916,1000000},
-{2966916,3879455,3879534,0.0724,1000000},
-{2966917,3879534,3879788,0.243766666666667,1000000},
-{2966918,3879788,3880240,0.42801,1000000},
-{2966919,3879082,3879225,1000000,0.09808},
-{2966920,3880637,3880207,1000000,1000000},
-{2966921,3880207,3880056,1000000,1000000},
-{2966922,3880397,3880240,1000000,0.353266666666667},
-{2966923,3879099,3879670,1000000,0.711692307692308},
-{2966924,3879225,3879485,1000000,0.184966666666667},
-{2966925,3879485,3879969,1000000,0.534282352941176},
-{2966926,3879969,3880207,1000000,1000000},
-{2966927,3879969,3880240,1000000,0.35932},
-{2966928,3880056,3879875,1000000,1000000},
-{2966929,3879875,3879670,1000000,1000000},
-{2966930,3879670,3879985,1000000,0.331136842105263},
-{2966931,3879670,3879116,0.502357894736842,1000000},
-{2966932,3880056,3880449,1000000,0.4439625},
-{2966933,3880449,3881226,1000000,0.65961},
-{2966934,3879985,3880735,1000000,0.657371428571429},
-{2966935,3880735,3880991,1000000,0.232833333333333},
-{2966936,3879788,3879949,0.3348,1000000},
-{2966937,3880676,3880738,0.0486333333333333,0.036475},
-{2966938,3876495,3876476,1000000,0.207075},
-{2966939,3878458,3878336,0.0952090909090909,1000000},
-{2966940,3878336,3878190,0.129572727272727,1000000},
-{2966941,3878190,3878045,0.10293,1000000},
-{2966942,3878336,3878484,1000000,0.212785714285714},
-{2966943,3878674,3878780,1000000,0.1299},
-{2966944,3877892,3877740,1000000,1000000},
-{2967325,3905414,3905498,1000000,0.0223444444444444},
-{2967326,3904638,3904818,1000000,0.0483962264150943},
-{2967327,3904232,3904638,1000000,0.141436363636364},
-{2967328,3904066,3904232,1000000,0.097775},
-{2967329,3899819,3899961,0.0495365853658537,0.119470588235294},
-{2967330,3899961,3900359,0.122660869565217,0.148484210526316},
-{2967331,3900359,3900685,0.120587234042553,0.118075},
-{2967332,3903057,3902542,0.193714285714286,0.198439024390244},
-{2967333,3903356,3903947,0.2035375,0.199383673469388},
-{2967334,3901497,3900925,0.395378571428571,0.299205405405405},
-{2967335,3901249,3900685,0.379241379310345,0.354774193548387},
-{2967336,3901497,3901967,0.267182608695652,0.267182608695652},
-{2967337,3901967,3902566,0.222075,0.273323076923077},
-{2967338,3902566,3903057,0.274460869565217,0.22545},
-{2967340,3903947,3902374,1.0947,1000000},
-{2967341,3899816,3900415,0.282278571428571,0.4939875},
-{2967342,3900415,3900519,0.05475,0.0464545454545455},
-{2967343,3900519,3900940,0.213827586206897,0.177171428571429},
-{2967344,3900940,3901249,0.160032,0.129058064516129},
-{2967345,3896864,3897181,0.116085,0.125497297297297},
-{2967346,3897181,3897644,0.195681081081081,0.160893333333333},
-{2967347,3897644,3897881,0.0968833333333333,0.0917842105263158},
-{2967348,3897881,3898324,0.3462,0.136657894736842},
-{2967349,3898464,3899120,0.241994117647059,0.27426},
-{2967350,3899374,3899817,0.1566,0.267525},
-{2967351,3899817,3900684,0.248508,0.248508},
-{2967352,3900684,3901729,0.283505882352941,0.272807547169811},
-{2967353,3900925,3899374,0.779897142857143,0.802835294117647},
-{2967354,3899374,3898987,0.20488,0.341466666666667},
-{2967355,3898987,3898503,0.163775510204082,0.1605},
-{2967356,3898503,3898030,0.1466375,0.163688372093023},
-{2967357,3898030,3897335,0.237416326530612,0.219498113207547},
-{2967358,3897335,3896657,0.327883333333333,0.319021621621622},
-{2967359,3898030,3898285,0.14024347826087,0.16128},
-{2967360,3898285,3898514,0.121176923076923,0.101632258064516},
-{2967361,3899412,3899911,0.272935714285714,0.283044444444444},
-{2967362,3899911,3900269,0.168455172413793,0.157587096774194},
-{2967363,3900269,3900592,0.1573875,0.152618181818182},
-{2967367,3897294,3897644,1000000,0.331142857142857},
-{2967368,3897294,3897235,0.0384818181818182,1000000},
-{2967369,3897235,3896594,0.562460869565217,1000000},
-{2967370,3896594,3895663,0.970389473684211,1000000},
-{2967371,3895663,3895103,0.38398064516129,0.495975},
-{2967372,3895103,3894487,0.538028571428571,0.322817142857143},
-{2967373,3893546,3892857,0.495275,1000000},
-{2967375,3893307,3893605,0.181671428571429,0.203472},
-{2967376,3893605,3893822,0.232623529411765,0.146466666666667},
-{2967377,3899214,3899412,0.144624,0.144624},
-{2967378,3899214,3898559,0.279696774193548,0.255017647058824},
-{2967379,3898559,3898249,0.149731034482759,0.149731034482759},
-{2967380,3898249,3897752,0.5358,0.3948},
-{2967381,3897991,3897693,1000000,0.174456},
-{2967382,3897693,3897202,1000000,0.36},
-{2967383,3897202,3896724,0.34325,0.374454545454545},
-{2967384,3896724,3896235,0.330311111111111,0.318514285714286},
-{2967385,3897752,3897251,0.336946153846154,0.4867},
-{2967386,3897251,3896739,0.274875,0.251314285714286},
-{2967387,3897702,3898282,0.385125,0.36972},
-{2967389,3896235,3896739,0.350352,1000000},
-{2967392,3895757,3896235,0.339432,1000000},
-{2967396,3895407,3895865,1000000,0.329515384615385},
-{2967428,3897251,3897702,1000000,0.281792307692308},
-{2967429,3896724,3897251,1000000,0.346296},
-{2967430,3896232,3896724,1000000,0.314866666666667},
-{2967431,3900296,3902059,0.47226976744186,0.67692},
-{2967432,3902059,3903126,0.339018181818182,0.286861538461539},
-{2967433,3902273,3903384,0.332183333333333,0.298965},
-{2967434,3903044,3903258,0.080019512195122,0.102525},
-{2967435,3903258,3903711,0.163069565217391,0.166693333333333},
-{2967436,3902528,3902095,0.112897674418605,0.121365},
-{2967437,3902528,3902891,0.10983,0.10983},
-{2967438,3904530,3904800,0.1096125,0.113148387096774},
-{2967439,3904800,3904916,0.0367235294117647,0.0320153846153846},
-{2967440,3906621,3906139,0.353630769230769,0.372745945945946},
-{2967441,3906621,3907030,0.297038709677419,0.30694},
-{2967442,3907739,3907030,0.600155555555556,0.50638125},
-{2967518,3916464,3917126,0.203625,0.207957446808511},
-{2967519,3916452,3916712,0.13986976744186,0.182254545454545},
-{2967520,3916712,3916961,0.247992,0.258325},
-{2967521,3915648,3915906,0.18350625,0.133459090909091},
-{2967522,3915220,3915715,0.394514285714286,0.251054545454545},
-{2967523,3914702,3915220,0.274733333333333,0.282582857142857},
-{2967524,3915220,3915522,0.129572093023256,0.11370612244898},
-{2967526,3915220,3914679,0.323723076923077,0.323723076923077},
-{2967545,3917126,3917582,0.345222222222222,0.388375},
-{2967583,3922631,3923205,0.239506666666667,0.219955102040816},
-{2967584,3923205,3923732,0.23085,0.20729387755102},
-{2967616,3911189,3911713,0.35475,0.551833333333333},
-{2967617,3918853,3919119,0.167755555555556,0.129411428571429},
-{2967618,3918389,3918853,0.274885714285714,1000000},
-{2967619,3917989,3918389,0.1914,1000000},
-{2967620,3917203,3917489,0.101032653061224,1000000},
-{2967621,3916926,3917203,0.103677551020408,1000000},
-{2967622,3919119,3919299,0.145457142857143,0.145457142857143},
-{2967623,3919119,3919450,0.205982608695652,0.128043243243243},
-{2967624,3919794,3919856,0.0202829268292683,0.0189},
-{2967625,3919856,3920073,0.0822714285714286,0.0785318181818182},
-{2967626,3920073,3920149,0.027219512195122,0.0253636363636364},
-{2967627,3920149,3920423,0.087135,0.085009756097561},
-{2967628,3920423,3920505,0.0263526315789474,0.0278166666666667},
-{2967629,3920505,3920749,0.0919384615384615,0.128057142857143},
-{2967630,3920749,3920959,0.0741767441860465,0.0817846153846154},
-{2967631,3920959,3921063,0.0285272727272727,0.0298857142857143},
-{2967632,3921063,3921215,0.04976,0.0508909090909091},
-{2967633,3921215,3921379,0.0520266666666667,0.0520266666666667},
-{2967634,3921379,3921440,0.0187565217391304,0.0196090909090909},
-{2967635,3921440,3921562,0.0322434782608696,0.0337090909090909},
-{2967636,3921562,3921727,0.0475636363636364,0.0475636363636364},
-{2967637,3921727,3921930,0.0722153846153846,0.07041},
-{2967638,3918872,3918476,0.16409387755102,0.1675125},
-{2967639,3918476,3918314,0.0599764705882353,0.0624244897959184},
-{2967640,3918314,3918148,0.0573294117647059,0.0609125},
-{2967641,3918148,3917880,0.0963647058823529,0.1023875},
-{2967642,3917880,3917627,0.0862269230769231,0.089676},
-{2967643,3917268,3917533,0.110693023255814,0.103473913043478},
-{2967644,3914876,3915167,0.1155125,0.113155102040816},
-{2967645,3916587,3916912,0.184277419354839,0.142815},
-{2967646,3916229,3916587,0.18244,0.13683},
-{2967647,3917638,3917880,0.221,0.221},
-{2967648,3913016,3913425,0.215653846153846,0.17521875},
-{2967649,3912557,3913016,0.151251428571429,0.151251428571429},
-{2967650,3912141,3912557,0.182937931034483,0.151577142857143},
-{2967651,3911363,3911735,0.193714285714286,0.200888888888889},
-{2967652,3910992,3911363,0.201177777777778,0.217272},
-{2967653,3910600,3910992,0.210369230769231,0.237808695652174},
-{2967654,3910107,3910600,0.255681818181818,0.208333333333333},
-{2967655,3912873,3911735,0.554469230769231,0.497110344827586},
-{2967656,3911735,3912141,0.1982,0.191121428571429},
-{2967657,3911621,3911998,0.119386956521739,0.12204},
-{2967658,3911998,3912422,0.116208510638298,0.118734782608696},
-{2967659,3912422,3912873,0.129714285714286,0.129714285714286},
-{2967660,3912873,3913321,0.133095,0.126757142857143},
-{2967661,3913321,3913703,0.117081818181818,0.119804651162791},
-{2967662,3913703,3914145,0.118826666666667,0.124353488372093},
-{2967663,3914145,3914504,0.145735135135135,0.149783333333333},
-{2967664,3909706,3910107,0.26943,0.215544},
-{2967665,3909360,3909706,0.285971428571429,0.230976923076923},
-{2967666,3908975,3909360,0.259742857142857,0.218184},
-{2967667,3910387,3910815,0.136728571428571,0.143565},
-{2967668,3909954,3910387,0.124660465116279,0.141063157894737},
-{2967669,3909567,3909954,0.193821428571429,0.3391875},
-{2967670,3908168,3908585,0.26706,1000000},
-{2967671,3909182,3909368,0.0877071428571429,0.0846827586206897},
-{2967672,3908789,3909182,0.15227027027027,0.148263157894737},
-{2967673,3908323,3908789,0.146092682926829,0.146092682926829},
-{2967674,3907749,3908168,0.297568421052632,0.297568421052632},
-{2967675,3907337,3907749,0.24895,0.271581818181818},
-{2967676,3906964,3907337,0.21245,0.21245},
-{2967677,3907067,3907012,0.175783333333333,0.180805714285714},
-{2967678,3907101,3907067,0.16239512195122,0.195829411764706},
-{2967679,3906424,3906054,0.173562162162162,0.14595},
-{2967680,3907147,3907101,0.20544375,0.212070967741935},
-{2967681,3907147,3906634,1000000,0.1510875},
-{2967682,3907705,3907147,1000000,0.17195625},
-{2967683,3907730,3907705,1000000,0.182690909090909},
-{2967684,3907715,3907730,1000000,0.16431724137931},
-{2967685,3907224,3907715,1000000,0.1551},
-{2967686,3906644,3907224,1000000,0.182148387096774},
-{2967687,3906633,3906644,1000000,0.170558823529412},
-{2967688,3906634,3906633,1000000,0.148181818181818},
-{2967689,3906634,3906096,0.3024,0.3248},
-{2967690,3906633,3906079,0.249669230769231,0.309114285714286},
-{2967691,3906079,3905478,0.188170588235294,0.236955555555556},
-{2967692,3905478,3904863,0.243724137931034,0.207882352941176},
-{2967693,3906054,3906464,0.167193103448276,0.193944},
-{2967694,3906464,3907012,0.2586,0.227568},
-{2967695,3907841,3908323,0.156814285714286,0.173321052631579},
-{2967696,3907378,3907841,0.17291052631579,0.182516666666667},
-{2967697,3907067,3907378,0.115533333333333,0.154044444444444},
-{2967698,3907378,3907012,0.231571428571429,0.221045454545455},
-{2967699,3907676,3907378,0.17172,0.165115384615385},
-{2967700,3908368,3907676,0.30808,0.355476923076923},
-{2967701,3909343,3909735,0.19932,0.19932},
-{2967702,3910629,3911029,0.239947826086957,0.250854545454545},
-{2967703,3911029,3911395,0.282978947368421,0.233765217391304},
-{2967704,3911395,3911783,0.218676923076923,0.2472},
-{2967705,3911783,3912199,0.212755555555556,0.24975652173913},
-{2967706,3907558,3907469,0.293335135135135,0.293335135135135},
-{2967707,3908565,3907980,1000000,0.302688},
-{2967708,3907980,3907469,1000000,0.2162},
-{2967709,3907469,3907908,0.2682,0.2682},
-{2967710,3907908,3908442,0.250371428571429,0.241737931034483},
-{2967711,3911189,3909985,0.628896,0.714654545454545},
-{2967712,3906592,3906959,0.190688888888889,0.190688888888889},
-{2967713,3906959,3907469,0.3414,0.3414},
-{2967714,3908442,3908014,0.13558,0.156438461538462},
-{2967715,3907469,3907428,0.256978378378378,0.264116666666667},
-{2967716,3908014,3907428,0.250336363636364,0.229475},
-{2967717,3907428,3906968,0.247248,0.280963636363636},
-{2967718,3907428,3907367,0.184095,0.23011875},
-{2967719,3907367,3907277,0.167355,0.176163157894737},
-{2967720,3909985,3909287,1000000,0.41628},
-{2967721,3909287,3908442,1000000,0.302022222222222},
-{2967722,3907277,3907224,0.21116,0.1979625},
-{2967723,3908340,3907715,0.362817391304348,0.298028571428571},
-{2967724,3909808,3909801,0.136432258064516,0.169176},
-{2967725,3909801,3909771,0.217824,0.217824},
-{2967726,3908379,3907730,0.197322580645161,0.174771428571429},
-{2967727,3909091,3908379,0.139353191489362,0.145546666666667},
-{2967728,3909771,3909091,0.153130434782609,0.160090909090909},
-{2967729,3910816,3909771,0.204853333333333,0.204853333333333},
-{2967730,3909808,3910370,0.255311111111111,0.265130769230769},
-{2967731,3910370,3910816,0.307863157894737,0.243725},
-{2967732,3906130,3905466,0.379084615384615,0.428530434782609},
-{2967733,3905466,3905237,0.146261538461538,0.135814285714286},
-{2967734,3905237,3904863,0.19678,0.227053846153846},
-{2967735,3906130,3906644,0.3462,0.321471428571429},
-{2967736,3905693,3906130,0.2496,0.2496},
-{2967737,3905266,3905693,0.218187096774194,0.21136875},
-{2967738,3904920,3905266,0.251625,0.3774375},
-{2967739,3903160,3903539,0.171133333333333,0.246432},
-{2967740,3903539,3903926,0.171836842105263,0.210638709677419},
-{2967741,3904863,3903926,0.359464285714286,0.359464285714286},
-{2967742,3903926,3904382,0.151663636363636,0.175610526315789},
-{2967743,3904382,3904813,0.166437209302326,0.152272340425532},
-{2967744,3907469,3906958,1000000,0.251666666666667},
-{2967745,3906958,3906520,0.232644444444444,0.232644444444444},
-{2967746,3906520,3906145,0.307914285714286,0.307914285714286},
-{2967747,3906145,3905693,0.352705263157895,1000000},
-{2967748,3905693,3905248,0.286625,0.327571428571429},
-{2967749,3905248,3904810,0.242764285714286,0.261438461538462},
-{2967750,3904810,3904407,0.236228571428571,0.236228571428571},
-{2967751,3904407,3903926,0.325571428571429,0.379833333333333},
-{2967752,3907705,3908368,0.319714285714286,0.331555555555556},
-{2967753,3908839,3908368,0.212111111111111,0.19748275862069},
-{2967754,3909090,3908839,0.0942324324324324,0.0996171428571429},
-{2967755,3880219,3880994,0.610227272727273,1000000},
-{2967756,3879875,3880219,0.4218,1000000},
-{2967757,3880716,3881386,0.54648,1000000},
-{2967758,3881386,3881490,0.12004,1000000},
-{2967759,3879049,3879455,0.259881818181818,1000000},
-{2967760,3879061,3879485,0.2206,1000000},
-{2967761,3881193,3880863,1000000,0.238073684210526},
-{2967762,3880863,3880172,1000000,0.6117},
-{2967763,3880172,3879884,1000000,0.311611764705882},
-{2967764,3882057,3881680,0.678847058823529,1000000},
-{2967765,3881644,3880940,1000000,0.777075},
-{2967766,3882146,3881644,0.616235294117647,1000000},
-{2967767,3882584,3882146,1000000,0.6582},
-{2967768,3882723,3882584,1000000,0.110337931034483},
-{2967769,3887882,3888069,0.100486956521739,0.0888923076923077},
-{2967770,3887688,3887882,0.0834,0.0744642857142857},
-{2967771,3889190,3889252,0.125755555555556,1000000},
-{2967772,3889252,3888885,0.142177777777778,1000000},
-{2967773,3888885,3888848,1000000,1000000},
-{2967905,3909955,3909128,0.319361538461538,0.319361538461538},
-{2967906,3910873,3909955,0.397285714285714,0.5562},
-{2967907,3911027,3910873,0.07845,0.142636363636364},
-{2967908,3910989,3910816,0.0335066666666667,0.0350651162790698},
-{2967909,3911929,3910989,0.207534782608696,0.1988875},
-{2967910,3912818,3911929,0.24376875,0.24376875},
-{2967911,3914075,3914334,0.182685714285714,0.1668},
-{2967912,3912397,3911929,1000000,0.231688888888889},
-{2967913,3911929,3911321,0.364825,0.397990909090909},
-{2967914,3910816,3911321,0.247137931034483,0.298625},
-{2967915,3911321,3911711,0.2265,0.23556},
-{2967916,3911711,3912104,0.23425,0.22488},
-{2967917,3912104,3912553,1000000,0.28065},
-{2967918,3911321,3910822,0.212961290322581,0.253915384615385},
-{2967919,3910822,3910355,0.197767741935484,0.197767741935484},
-{2967920,3910355,3909815,0.22748275862069,0.22748275862069},
-{2967921,3909815,3909667,0.110033333333333,0.0900272727272727},
-{2967922,3909667,3909343,0.337028571428571,0.337028571428571},
-{2967923,3909343,3909011,0.209127272727273,0.209127272727273},
-{2967924,3909011,3908853,0.05607,0.07476},
-{2967925,3908853,3908323,0.274475,0.227151724137931},
-{2967926,3908323,3907836,0.318228571428571,0.33414},
-{2967927,3907836,3907337,0.325542857142857,0.325542857142857},
-{2967928,3905294,3905214,0.336168,0.323238461538462},
-{2967929,3905214,3905129,0.0971052631578947,0.0838636363636364},
-{2967930,3905588,3905214,0.3028,0.286863157894737},
-{2967931,3906054,3905588,0.345,0.363157894736842},
-{2967932,3909090,3909369,0.104952631578947,0.0949571428571429},
-{2967933,3909369,3909771,0.228207692307692,0.19778},
-{2967934,3909369,3909823,0.272325,0.272325},
-{2967935,3909823,3910355,0.264408,0.254238461538462},
-{2967936,3910355,3910786,0.280285714285714,0.280285714285714},
-{2967937,3911202,3911598,0.206222222222222,0.206222222222222},
-{2967938,3911598,3911942,0.23115652173913,0.26583},
-{2967939,3911942,3912354,0.219048,0.238095652173913},
-{2967940,3912354,3912827,0.235625,0.2175},
-{2967941,3912827,3913308,0.22908,0.249},
-{2967942,3913308,3913729,0.22965,0.22965},
-{2967943,3913729,3914168,0.204533333333333,0.262971428571429},
-{2967944,3914168,3914528,0.191592857142857,0.243845454545455},
-{2967945,3914528,3914856,0.260914285714286,0.288378947368421},
-{2967946,3914856,3915147,0.249828571428571,0.249828571428571},
-{2967947,3913308,3912199,0.488533333333333,0.488533333333333},
-{2967948,3914288,3913308,0.471377777777778,0.471377777777778},
-{2967949,3914892,3914288,1000000,1000000},
-{2967950,3915189,3914892,1000000,1000000},
-{2967951,3912553,3912991,0.2224,0.296533333333333},
-{2967952,3912991,3913405,0.227375,0.237260869565217},
-{2967953,3913405,3913875,0.234175,0.255463636363636},
-{2967954,3913875,3914288,0.229008,0.23855},
-{2967955,3914189,3912991,1000000,0.879388235294118},
-{2967956,3912991,3911942,0.454842857142857,0.489830769230769},
-{2967957,3911942,3911029,0.4376,0.690947368421053},
-{2967958,3911029,3909954,0.712105263157895,0.588260869565217},
-{2967959,3909954,3908975,0.791223529411765,0.67254},
-{2967960,3912199,3912649,0.202933333333333,0.238226086956522},
-{2967961,3912649,3913120,0.201777777777778,0.201777777777778},
-{2967962,3913120,3913529,0.204177777777778,0.204177777777778},
-{2967963,3913981,3912873,0.409945454545455,0.356005263157895},
-{2967964,3914856,3913981,0.29328,0.269338775510204},
-{2967965,3915147,3915439,0.204288888888889,0.204288888888889},
-{2967966,3915439,3915747,0.272936842105263,0.235718181818182},
-{2967967,3915747,3916078,0.3337125,0.281021052631579},
-{2967968,3915556,3914856,0.287918181818182,0.263925},
-{2967969,3916460,3915556,0.402681081081081,0.438211764705882},
-{2967970,3917334,3916460,0.616625,0.59196},
-{2967971,3914288,3914653,0.210484615384615,0.228025},
-{2967972,3914653,3914957,0.226725,0.217656},
-{2967973,3914957,3915250,0.1992,0.206861538461538},
-{2967974,3915250,3915556,0.27765,0.241434782608696},
-{2967975,3915556,3915887,0.27255,0.27255},
-{2967976,3915887,3916206,0.27285,0.27285},
-{2967977,3916206,3916515,0.302082352941176,0.302082352941176},
-{2967978,3916515,3916851,0.28209,0.313433333333333},
-{2967979,3913981,3914358,0.27066,0.2082},
-{2967980,3914358,3914701,0.225913043478261,0.185571428571429},
-{2967981,3914997,3914701,0.190992857142857,0.222825},
-{2967982,3914997,3915273,0.2987,0.3360375},
-{2967983,3915969,3915616,0.157383333333333,0.17705625},
-{2967984,3915969,3916229,0.156,0.124},
-{2967985,3913321,3912141,0.838658823529412,0.838658823529412},
-{2967986,3913637,3913321,0.2115,0.158625},
-{2967987,3914358,3913637,0.313064516129032,0.359444444444444},
-{2967988,3915147,3914358,0.511038461538462,0.511038461538462},
-{2967989,3915887,3915147,0.502488,0.405232258064516},
-{2967990,3918284,3918623,0.240939130434783,0.191089655172414},
-{2967991,3917963,3918284,0.190355555555556,0.17132},
-{2967992,3917631,3917963,0.192471428571429,0.158505882352941},
-{2967993,3917334,3917631,0.190634482758621,0.167527272727273},
-{2967994,3917047,3917334,0.17444,0.158581818181818},
-{2967995,3916720,3917047,0.193903448275862,0.165388235294118},
-{2967996,3916370,3916720,0.199066666666667,0.185337931034483},
-{2967997,3916048,3916370,0.19928275862069,0.19928275862069},
-{2967998,3915611,3916048,0.249,0.249},
-{2967999,3915396,3915611,0.197936842105263,0.197936842105263},
-{2968000,3915114,3915396,0.246763636363636,0.258514285714286},
-{2968001,3914808,3915114,0.290242105263158,0.2626},
-{2968002,3915114,3914189,0.46723125,1000000},
-{2968003,3915963,3915114,0.383769230769231,1000000},
-{2968004,3914779,3914564,1000000,0.127338461538462},
-{2968005,3914927,3914779,1000000,0.068780487804878},
-{2968006,3915396,3914927,1000000,0.188439130434783},
-{2968007,3916346,3915396,1000000,0.627969230769231},
-{2968008,3914564,3914188,0.24195652173913,0.46375},
-{2968009,3914188,3913405,0.361292307692308,0.347911111111111},
-{2968010,3913405,3912354,0.454157142857143,0.410206451612903},
-{2968011,3911395,3910387,0.539544,0.499577777777778},
-{2968012,3910387,3909360,0.44998,0.499977777777778},
-{2968013,3917710,3917631,0.0689368421052632,0.0569478260869565},
-{2968014,3916398,3916749,0.196007142857143,0.219528},
-{2968015,3916749,3917042,0.1968,0.1968},
-{2968016,3917042,3917348,0.202844444444444,0.202844444444444},
-{2968017,3917348,3917638,0.188185714285714,0.188185714285714},
-{2968018,3917258,3917268,0.241476923076923,0.190254545454545},
-{2968019,3917989,3918428,0.265336363636364,0.243225},
-{2968020,3918428,3918658,0.0959828571428571,0.0959828571428571},
-{2968021,3918658,3918967,0.13861875,0.134418181818182},
-{2968022,3918967,3919262,0.174936,0.190147826086957},
-{2968023,3918967,3919794,0.589173913043478,0.615954545454545},
-{2968024,3919262,3919616,0.184992,0.220228571428571},
-{2968025,3919616,3919927,0.182112,0.206945454545455},
-{2968026,3919927,3920236,0.189875,0.189875},
-{2968027,3920236,3920578,0.1761,0.240978947368421},
-{2968028,3920578,3920884,0.174946153846154,0.2527},
-{2968029,3920884,3921218,0.199747826086957,0.218771428571429},
-{2968030,3921218,3921556,0.1886,0.215542857142857},
-{2968031,3921556,3921879,0.156492857142857,0.182575},
-{2968032,3919882,3920720,1000000,1.45182},
-{2968033,3920720,3921556,0.530053846153846,0.530053846153846},
-{2968034,3920420,3920720,0.202718181818182,0.14866},
-{2968035,3920091,3920420,0.182,0.150620689655172},
-{2968036,3920091,3920884,0.563025,0.614209090909091},
-{2968037,3919786,3920091,0.184128,0.177046153846154},
-{2968038,3918806,3919117,0.167442857142857,0.180323076923077},
-{2968039,3918473,3918806,0.1396125,0.14892},
-{2968047,3922404,3922677,0.135972413793103,0.101107692307692},
-{2968048,3922060,3922404,0.12429,0.12429},
-{2968049,3918213,3918967,0.3864,0.490430769230769},
-{2968050,3916928,3917489,0.366365217391304,1000000},
-{2968051,3916551,3916928,0.3233625,1000000},
-{2968052,3911713,3913245,0.628008,0.461770588235294},
-{2968053,3913245,3913861,0.2589,0.177142105263158},
-{2968054,3913861,3914699,0.391632,0.279737142857143},
-{2968055,3912587,3913245,0.379130769230769,0.547633333333333},
-{2968120,3922277,3921967,0.20874,0.231933333333333},
-{2968121,3921967,3921644,0.143308695652174,0.140259574468085},
-{2968122,3921644,3921330,0.1363,0.116828571428571},
-{2968123,3921019,3920722,0.115765384615385,0.12808085106383},
-{2968124,3920722,3920382,0.127276363636364,0.15556},
-{2968125,3920382,3919754,0.284972727272727,0.338886486486487},
-{2968126,3921984,3922265,0.11975,0.148655172413793},
-{2968162,3918452,3918721,0.102384615384615,0.105078947368421},
-{2968163,3918721,3918997,0.0877826086956522,0.0897333333333333},
-{2968164,3918997,3919248,0.0812739130434783,0.0869441860465116},
-{2968165,3919248,3919541,0.10872972972973,0.1341},
-{2968166,3920060,3919541,0.370433333333333,0.360421621621622},
-{2968167,3920661,3920060,0.336541463414634,0.328528571428571},
-{2968168,3920060,3920379,0.13688,0.157938461538462},
-{2968169,3920379,3920648,0.0953121951219512,0.0831446808510638},
-{2968170,3920648,3920907,0.0845347826086957,0.0720111111111111},
-{2968171,3920907,3921207,0.0877659574468085,0.0763888888888889},
-{2968172,3921207,3921508,0.0897521739130435,0.0750654545454545},
-{2968173,3921508,3921819,0.086,0.0764444444444445},
-{2968424,3900265,3900502,0.13284,0.159408},
-{2968425,3900502,3900663,0.0735073170731707,0.0700883720930233},
-{2968426,3900663,3900727,0.0257857142857143,0.0230425531914894},
-{2968427,3900727,3900851,0.0517857142857143,0.0453125},
-{2968428,3901059,3901187,0.0417882352941176,0.0417882352941176},
-{2968429,3901187,3901242,0.0180588235294118,0.0180588235294118},
-{2968430,3901242,3901440,0.0600692307692308,0.0612470588235294},
-{2968431,3901440,3901675,0.07134,0.07134},
-{2968432,3901675,3901857,0.0739304347826087,0.068016},
-{2968433,3901857,3902176,0.0882255319148936,0.0863875},
-{2968434,3902176,3902219,0.0153551020408163,0.015675},
-{2968435,3902219,3902434,0.064925,0.064925},
-{2968436,3902434,3902667,0.0730565217391304,0.0685836734693877},
-{2968437,3902667,3902887,0.0791333333333333,0.0726734693877551},
-{2968438,3902887,3903175,0.110326829268293,0.102804545454545},
-{2968439,3903175,3903455,0.2712,0.149627586206897},
-{2968440,3903455,3903661,0.162175,0.25948},
-{2968441,3903661,3903726,0.0243142857142857,0.0291771428571429},
-{2968442,3903726,3903864,0.0506727272727273,0.0530857142857143},
-{2968443,3903864,3903972,0.0331125,0.0345521739130435},
-{2968444,3903972,3904101,0.03462,0.0353265306122449},
-{2968445,3904101,3904365,0.0767411764705883,0.0767411764705883},
-{2968446,3904365,3904581,0.0716235294117647,0.0702461538461538},
-{2968447,3904581,3904654,0.0255,0.0255},
-{2968448,3904654,3904925,0.0788117647058823,0.0788117647058823},
-{2968449,3904925,3905149,0.0798765957446809,0.0798765957446809},
-{2968450,3905149,3905425,0.246284210526316,0.150948387096774},
-{2968451,3905425,3905622,0.107078571428571,0.1578},
-{2968452,3905622,3905814,0.0708139534883721,0.087},
-{2968453,3905814,3906155,0.10122,0.10768085106383},
-{2968454,3906155,3906193,0.0151038461538462,0.0160285714285714},
-{2968455,3906193,3906439,0.0858117647058823,0.0893142857142857},
-{2968456,3906439,3906779,0.102129411764706,0.106297959183673},
-{2968457,3906779,3906830,0.0127132075471698,0.014336170212766},
-{2968458,3906830,3907136,0.0836588235294118,0.085332},
-{2968459,3907136,3907273,0.0409269230769231,0.042564},
-{2968460,3907273,3907596,0.0828905660377358,0.0861411764705882},
-{2968461,3907596,3908381,0.202673076923077,0.224234042553191},
-{2968462,3908381,3908523,0.0340909090909091,0.0294117647058824},
-{2968463,3908523,3908725,0.0640468085106383,0.060204},
-{2968464,3908725,3909222,0.134258823529412,0.131676923076923},
-{2968465,3909222,3909420,0.0581307692307692,0.060456},
-{2968466,3909420,3909532,0.025692,0.0262163265306122},
-{2968467,3909532,3910139,0.240566666666667,0.262436363636364},
-{2968468,3910139,3910675,0.14553488372093,0.15645},
-{2968469,3910675,3911011,0.105413333333333,0.128205405405405},
-{2968470,3911282,3911597,0.121136842105263,0.127866666666667},
-{2968471,3911597,3911776,0.07272,0.0786162162162162},
-{2968472,3911776,3911897,0.040515,0.0450166666666667},
-{2968473,3911897,3912221,0.180936,0.173976923076923},
-{2968474,3912221,3912542,0.237423529411765,0.212431578947368},
-{2968475,3912542,3912605,0.0275769230769231,0.0256071428571429},
-{2968479,3901769,3902101,0.678912,0.628622222222222},
-{2968480,3901769,3902514,1000000,0.3519},
-{2968481,3901724,3901769,0.171063157894737,0.154771428571429},
-{2968482,3901724,3902445,0.4710375,1000000},
-{2968483,3903353,3903693,0.159664285714286,0.178824},
-{2968484,3903693,3903992,0.0866769230769231,0.0913621621621622},
-{2968485,3903992,3904660,0.185776744186046,0.1902},
-{2968486,3904660,3905107,0.12212,0.130842857142857},
-{2968487,3905107,3905347,0.0826105263157895,0.0872},
-{2968488,3905347,3906093,0.57054375,0.536982352941176},
-{2968489,3905347,3905529,0.08036,0.0777677419354839},
-{2968490,3905240,3905529,0.239314285714286,0.231062068965517},
-{2968491,3905066,3905240,0.132193548387097,0.120529411764706},
-{2968492,3904850,3905066,0.12834375,0.12834375},
-{2968493,3904528,3904850,0.229007142857143,0.246623076923077},
-{2968494,3903785,3904528,0.837573913043478,0.66428275862069},
-{2968495,3903615,3903785,0.189547826086957,0.161466666666667},
-{2968496,3901926,3902378,1000000,0.147948387096774},
-{2968497,3902378,3902515,1000000,0.0347384615384615},
-{2968498,3902515,3902804,1000000,0.0778682926829268},
-{2968499,3902804,3903047,1000000,0.06855},
-{2968500,3903047,3903390,1000000,0.105113513513513},
-{2968501,3903390,3903588,1000000,0.083625},
-{2968502,3903588,3903881,1000000,0.25036},
-{2968503,3904348,3904420,0.15038,0.145529032258065},
-{2968504,3904297,3904348,0.0736186046511628,0.077209756097561},
-{2968505,3904257,3904297,0.0653869565217391,0.0699488372093023},
-{2968506,3904181,3904257,0.0848875,0.0905466666666667},
-{2968507,3904135,3904181,0.07345,0.0750127659574468},
-{2968508,3904068,3904135,0.0726,0.0726},
-{2968509,3904037,3904068,0.0543,0.0532352941176471},
-{2968510,3903999,3904037,0.056808,0.0556941176470588},
-{2968511,3903986,3903999,0.0944042553191489,0.0944042553191489},
-{2968512,3904048,3903986,0.116692682926829,0.11961},
-{2968513,3904603,3904871,0.149177142857143,0.145033333333333},
-{2968514,3904971,3905017,0.03121875,0.0262894736842105},
-{2968515,3905017,3905624,0.283637837837838,0.299845714285714},
-{2968516,3905624,3905878,0.127288888888889,0.122742857142857},
-{2968517,3905878,3906091,0.0882162162162162,0.075906976744186},
-{2968518,3904871,3905738,0.360216666666667,0.381405882352941},
-{2968519,3905738,3906662,0.345138461538462,0.345138461538462},
-{2968520,3906091,3906495,0.128795744680851,0.114215094339623},
-{2968521,3906495,3907449,0.2832,0.289636363636364},
-{2968522,3906735,3906774,0.0151714285714286,0.0148186046511628},
-{2968523,3906774,3906885,0.0444976744186047,0.0455571428571429},
-{2968524,3906885,3907082,0.078,0.0817142857142857},
-{2968525,3907082,3907449,0.199264285714286,0.199264285714286},
-{2968526,3907449,3907808,0.20168275862069,0.224953846153846},
-{2968527,3907808,3908265,0.1437125,0.140779591836735},
-{2968528,3908265,3908767,0.13755,0.143052},
-{2968529,3908767,3909516,0.24945652173913,0.255},
-{2968530,3909982,3910308,0.088725,0.088725},
-{2968531,3910653,3910955,0.102808695652174,0.098525},
-{2968532,3910955,3911799,0.271016326530612,0.2766625},
-{2968533,3908599,3909163,0.163857142857143,0.160046511627907},
-{2968534,3908017,3908599,0.175695,0.156173333333333},
-{2968535,3907449,3908017,0.174945,0.170678048780488},
-{2968536,3905017,3905255,0.134335714285714,0.163539130434783},
-{2968537,3905255,3905453,0.146228571428571,0.122832},
-{2968538,3905453,3905553,0.09968,0.0786947368421053},
-{2968539,3905553,3905774,0.17478,0.17478},
-{2968540,3905774,3906091,0.305333333333333,0.2748},
-{2968541,3910187,3910562,0.12009375,0.19215},
-{2968542,3910562,3910907,0.15012,0.204709090909091},
-{2968543,3910907,3911427,0.259088888888889,0.23318},
-{2968544,3912638,3913258,0.21129375,0.204890909090909},
-{2968545,3912055,3912771,0.332711111111111,0.499066666666667},
-{2968546,3912771,3913158,0.117015,0.15602},
-{2968547,3901568,3901781,0.0813428571428571,0.0830375},
-{2968548,3901350,3901568,0.09495,0.0930122448979592},
-{2968549,3900687,3901103,0.16465,0.168153191489362},
-{2968550,3900499,3900687,0.0807918367346939,0.079176},
-{2968551,3900339,3900499,0.0686705882352941,0.0745148936170213},
-{2968552,3900281,3900339,0.0204734693877551,0.0228},
-{2968553,3900148,3900281,0.0512875,0.0631230769230769},
-{2968554,3900102,3900148,0.0174837209302326,0.0179},
-{2968555,3899900,3900102,0.0842181818181818,0.0861767441860465},
-{2968556,3899692,3899900,0.0840734693877551,0.0915466666666667},
-{2968557,3899490,3899692,0.0783529411764706,0.0815510204081633},
-{2968558,3899211,3899490,0.1054625,0.103310204081633},
-{2968559,3899043,3899211,0.0765285714285714,0.0698739130434783},
-{2968560,3898789,3899043,0.136216666666667,0.129047368421053},
-{2968561,3898650,3898871,0.10986,0.118767567567568},
-{2968562,3898460,3898650,0.071025,0.0811714285714286},
-{2968563,3898276,3898460,0.06768,0.0752},
-{2968564,3897785,3898276,0.238337142857143,0.397228571428571},
-{2968565,3898970,3899215,0.103445454545455,0.101146666666667},
-{2968566,3899215,3900148,0.464708108108108,0.39986511627907},
-{2968567,3897066,3897785,0.434981818181818,0.368061538461538},
-{2968568,3896514,3897066,0.242910638297872,0.253706666666667},
-{2968569,3898642,3898848,0.1134,0.1782},
-{2968570,3898848,3899008,0.0734368421052631,0.069765},
-{2968571,3899008,3899132,0.0434045454545455,0.04244},
-{2968572,3899132,3899399,0.10772,0.1009875},
-{2968573,3898862,3899312,0.25869375,0.4599},
-{2968574,3899312,3899645,0.154772727272727,0.144893617021277},
-{2968575,3899645,3899887,0.102381818181818,0.0979304347826087},
-{2968576,3899887,3900143,0.106540909090909,0.0997404255319149},
-{2968577,3900143,3900231,0.045153488372093,0.0422086956521739},
-{2968578,3900231,3900393,0.065504347826087,0.0614938775510204},
-{2968579,3900393,3900620,0.1033375,0.099204},
-{2968580,3900620,3900834,0.0901021276595745,0.0830352941176471},
-{2968581,3900834,3901052,0.0869617021276596,0.0801411764705882},
-{2968582,3901052,3901235,0.0770170212765958,0.0738734693877551},
-{2968583,3901235,3901319,0.0254125,0.0259531914893617},
-{2968584,3901319,3901413,0.042475,0.042475},
-{2968585,3901413,3901660,0.0922285714285714,0.0922285714285714},
-{2968586,3901660,3901866,0.08235,0.08235},
-{2968587,3901866,3902104,0.0830170212765958,0.0812875},
-{2968588,3902104,3902351,0.0881617021276596,0.0881617021276596},
-{2968589,3902351,3902594,0.0878297872340426,0.0917333333333333},
-{2968590,3902594,3902837,0.0969260869565217,0.0928875},
-{2968591,3902837,3903064,0.0891391304347826,0.082008},
-{2968592,3903064,3903269,0.0889695652173913,0.0835224489795918},
-{2968593,3903269,3903489,0.09608,0.0919914893617021},
-{2968594,3903489,3903682,0.0930933333333333,0.089131914893617},
-{2968595,3903682,3903905,0.089895652173913,0.0879829787234043},
-{2968596,3903905,3904174,0.0941608695652174,0.0962533333333333},
-{2968597,3904174,3904385,0.0959441860465116,0.09168},
-{2968598,3904385,3904603,0.104473170731707,0.101985714285714},
-{2968599,3906403,3906662,0.125413636363636,0.122626666666667},
-{2968600,3906199,3906403,0.0908086956521739,0.083544},
-{2968601,3905986,3906199,0.083448,0.0802384615384615},
-{2968602,3905766,3905986,0.08292,0.0767777777777778},
-{2968603,3905551,3905766,0.083376,0.0772},
-{2968604,3905343,3905551,0.0822705882352941,0.0777},
-{2968605,3904507,3904650,0.060276,0.0627875},
-{2968606,3904290,3904507,0.100295454545455,0.0848653846153846},
-{2968607,3904129,3904290,0.0703411764705882,0.0689884615384615},
-{2968608,3903892,3904129,0.0767769230769231,0.0767769230769231},
-{2968609,3903698,3903892,0.0729807692307692,0.0729807692307692},
-{2968610,3903519,3903698,0.077,0.077},
-{2968611,3903270,3903519,0.0988775510204082,0.0988775510204082},
-{2968612,3903054,3903270,0.075725,0.0741795918367347},
-{2968613,3902453,3903054,0.187640816326531,0.180282352941176},
-{2968614,3901819,3902453,0.183624,0.183624},
-{2968615,3901252,3901819,0.177917647058824,0.174496153846154},
-{2968616,3897409,3897667,0.211254545454545,0.2582},
-{2968617,3897667,3897870,0.142,0.13632},
-{2968618,3897870,3898129,0.160539130434783,0.167836363636364},
-{2968619,3898129,3898386,0.14448,0.138923076923077},
-{2968620,3898386,3898655,0.211457142857143,0.22203},
-{2968621,3898655,3899006,0.231875,0.2226},
-{2968622,3899006,3899301,0.181128,0.22641},
-{2968623,3899301,3899388,0.0860210526315789,0.0908},
-{2968624,3899676,3899747,0.0509142857142857,0.042768},
-{2968625,3899747,3899997,0.18115,0.207028571428571},
-{2968626,3899997,3900311,0.211581818181818,0.221657142857143},
-{2968627,3900311,3900353,0.0292444444444444,0.03948},
-{2968628,3900353,3900548,0.207317647058824,0.207317647058824},
-{2968629,3900548,3900750,0.184714285714286,1000000},
-{2968630,3900750,3900996,0.13938,1000000},
-{2968631,3900996,3901111,0.0625555555555556,1000000},
-{2968632,3901111,3901254,0.0838384615384615,1000000},
-{2968633,3901254,3901482,0.139688888888889,1000000},
-{2968634,3901482,3901701,0.106527272727273,1000000},
-{2968635,3901701,3901992,0.131509090909091,1000000},
-{2968636,3901992,3902338,0.126868421052632,1000000},
-{2968637,3902338,3902578,0.15944347826087,1000000},
-{2968638,3901244,3901564,0.373661538461538,0.194304},
-{2968639,3901021,3901244,0.0863318181818182,0.0844133333333333},
-{2968640,3900793,3901021,0.0840857142857143,0.087663829787234},
-{2968641,3900541,3900793,0.0766961538461538,0.0813918367346939},
-{2968642,3900374,3900541,0.067128,0.069925},
-{2968643,3900303,3900374,0.02094,0.0213673469387755},
-{2968644,3900122,3900303,0.055572,0.0591191489361702},
-{2968645,3899965,3900122,0.0485375,0.0506478260869565},
-{2968646,3899866,3899965,0.0386181818181818,0.0395162790697674},
-{2968647,3899769,3899866,0.037185,0.0391421052631579},
-{2968648,3899600,3899769,0.07011,0.127472727272727},
-{2968649,3899148,3899382,1000000,0.139044444444444},
-{2968650,3898412,3899148,1000000,0.4273},
-{2968651,3899600,3900548,0.382815384615385,0.392889473684211},
-{2968652,3899083,3899148,0.0586666666666667,0.0459130434782609},
-{2968653,3898816,3899083,0.184281818181818,0.144792857142857},
-{2968654,3898741,3898816,0.06085,0.0540888888888889},
-{2968655,3898569,3898741,0.12843,0.0917357142857143},
-{2968656,3898444,3898569,0.0913826086956522,0.0724758620689655},
-{2968657,3898234,3898444,0.150028571428571,0.136982608695652},
-{2968658,3897884,3898234,0.220172727272727,0.24219},
-{2968659,3897618,3897884,0.197454545454545,0.255529411764706},
-{2968660,3898357,3898718,0.241075,0.321433333333333},
-{2968661,3898718,3898866,0.0576139534883721,0.0563045454545455},
-{2968662,3898866,3898925,0.0207681818181818,0.0198652173913043},
-{2968663,3898925,3899190,0.0886666666666667,0.0848936170212766},
-{2968664,3899190,3899315,0.0469787234042553,0.04416},
-{2968665,3899315,3899434,0.0418565217391304,0.038508},
-{2968666,3899434,3899605,0.0648260869565217,0.0608571428571429},
-{2968667,3899605,3899820,0.0709914893617021,0.066732},
-{2968668,3899820,3899923,0.042375,0.04068},
-{2968669,3899923,3900134,0.062675,0.060168},
-{2968670,3900134,3900230,0.0338553191489362,0.031824},
-{2968671,3900230,3900340,0.0338170212765957,0.0324367346938776},
-{2968672,3900340,3900436,0.0395125,0.0387061224489796},
-{2968673,3900436,3900525,0.0301404255319149,0.0295125},
-{2968674,3900525,3900638,0.0461617021276596,0.0461617021276596},
-{2968675,3900638,3900714,0.0250304347826087,0.0239875},
-{2968676,3900714,3900895,0.066525,0.0694173913043478},
-{2968677,3900895,3901177,0.110762790697674,0.108245454545455},
-{2968678,3901177,3901450,0.185504347826087,0.125488235294118},
-{2968679,3901450,3902456,0.333381818181818,0.444509090909091},
-{2968680,3901450,3901709,0.12968,0.1621},
-{2968681,3901709,3901920,0.0837,0.0904864864864865},
-{2968682,3901920,3902067,0.0562428571428571,0.0549348837209302},
-{2968683,3902067,3902154,0.0211363636363636,0.0221428571428571},
-{2968684,3902154,3902234,0.0300681818181818,0.0300681818181818},
-{2968685,3902234,3902410,0.0544046511627907,0.0519866666666667},
-{2968686,3902410,3902738,0.10905652173913,0.10905652173913},
-{2968687,3902738,3902996,0.0905347826086957,0.09465},
-{2968688,3902996,3903257,0.0950571428571429,0.0973756097560976},
-{2968689,3903257,3903307,0.0234166666666667,0.0227837837837838},
-{2968690,3903307,3903527,0.37092,0.132471428571429},
-{2968691,3904043,3904244,0.078375,0.07125},
-{2968692,3904244,3904415,0.0593302325581395,0.05315},
-{2968693,3904415,3904703,0.101569565217391,0.0916117647058824},
-{2968694,3904703,3904806,0.0392553191489362,0.0361764705882353},
-{2968695,3904806,3905030,0.071595652173913,0.071595652173913},
-{2968696,3905030,3905204,0.062525,0.0652434782608696},
-{2968697,3905204,3905353,0.0562085106382979,0.0518},
-{2968698,3905353,3905434,0.0291066666666667,0.0272875},
-{2968699,3905434,3905910,0.156357446808511,0.146976},
-{2968700,3905910,3906356,0.16035,0.172082926829268},
-{2968701,3906356,3906606,0.102981818181818,0.0964085106382979},
-{2968702,3906606,3907328,0.202212244897959,0.198168},
-{2968703,3907328,3907684,0.112573333333333,0.123556097560976},
-{2968704,3907684,3908072,0.176357142857143,0.176357142857143},
-{2968705,3908072,3908095,0.0276,1000000},
-{2968706,3908072,3908799,1000000,0.271344},
-{2968707,3908799,3910166,1000000,0.302018181818182},
-{2968708,3910166,3910837,0.213471428571429,0.145785365853659},
-{2968709,3910837,3912221,0.373621621621622,0.3456},
-{2968710,3908004,3908908,0.397585714285714,1000000},
-{2968711,3904507,3905737,0.618931034482759,1000000},
-{2968712,3903924,3904507,0.314169230769231,0.314169230769231},
-{2968713,3903574,3903924,0.183641379310345,0.204830769230769},
-{2968714,3902594,3903574,0.467516129032258,0.536777777777778},
-{2968715,3901350,3902594,0.53334375,0.656423076923077},
-{2968716,3905737,3906348,0.27571875,0.2941},
-{2968717,3906348,3906600,0.142722580645161,0.134072727272727},
-{2968718,3906600,3906860,0.0993333333333333,0.0941052631578947},
-{2968719,3906860,3907133,0.0968052631578947,0.102183333333333},
-{2968720,3907133,3907484,0.151309090909091,0.20805},
-{2968721,3907484,3907786,0.185582608695652,0.194018181818182},
-{2968722,3907113,3907786,1000000,0.368775},
-{2968723,3906348,3906534,0.0712133333333333,0.0681829787234043},
-{2968724,3906534,3906889,0.0994695652173913,0.095325},
-{2968725,3906889,3907170,0.134485714285714,0.144830769230769},
-{2968726,3907170,3907716,0.204816666666667,0.189061538461538},
-{2968727,3907716,3908138,0.118633333333333,0.125611764705882},
-{2968728,3908138,3908616,0.1436,0.1436},
-{2968729,3907786,3908027,0.1650375,0.1650375},
-{2968730,3908027,3908824,1000000,1000000},
-{2968731,3908908,3909348,0.192931034482759,1000000},
-{2968732,3909348,3909703,0.289664516129032,1000000},
-{2968733,3908863,3909703,0.341822222222222,0.341822222222222},
-{2968734,3908027,3908291,0.178909090909091,0.178909090909091},
-{2968735,3908291,3908603,0.148377777777778,0.148377777777778},
-{2968736,3908603,3908908,0.194372727272727,0.194372727272727},
-{2968737,3906889,3907203,0.0889466666666666,0.0833875},
-{2968738,3907203,3907689,0.136378723404255,0.1335375},
-{2968739,3908072,3907689,0.115905,0.113078048780488},
-{2968740,3902846,3902961,0.0499469387755102,0.0499469387755102},
-{2968741,3902565,3902846,0.105855319148936,0.105855319148936},
-{2968742,3902289,3902565,0.0923478260869565,0.0923478260869565},
-{2968743,3901750,3902289,0.30178,0.30178},
-{2968744,3908072,3908507,0.129823255813954,0.118774468085106},
-{2968745,3908507,3908816,0.0834367346938776,0.0786230769230769},
-{2968746,3908816,3909135,0.0827755102040816,0.0765283018867925},
-{2968747,3909135,3909433,0.0830884615384615,0.0815207547169811},
-{2968748,3909433,3909712,0.083808,0.0873},
-{2968749,3909712,3910139,0.175924137931034,0.141716666666667},
-{2968750,3912221,3913428,0.389691891891892,0.360465},
-{2968751,3913428,3913759,0.10026,0.108389189189189},
-{2968752,3913759,3914090,0.117882352941176,0.167},
-{2968753,3913728,3914090,0.166511111111111,0.172915384615385},
-{2968754,3913037,3913361,0.139727272727273,0.112463414634146},
-{2968755,3912682,3913037,0.12015,0.08544},
-{2968756,3912353,3912682,0.111994285714286,0.0852130434782609},
-{2968757,3912103,3912353,0.096972972972973,0.0797333333333333},
-{2968758,3911844,3912103,0.0936162162162162,0.0769733333333333},
-{2968759,3910824,3911220,0.136355555555556,0.111563636363636},
-{2968760,3909532,3910824,0.52085625,0.505072727272727},
-{2968761,3911535,3911220,0.0993483870967742,0.1062},
-{2968762,3903905,3904862,0.588991304347826,0.521030769230769},
-{2968763,3904603,3905496,0.381705882352941,0.418645161290323},
-{2968764,3905496,3906403,0.464896551724138,0.408545454545455},
-{2968765,3904862,3905766,0.533544,0.635171428571429},
-{2968766,3905766,3907407,0.986765217391304,1.19450526315789},
-{2968767,3907407,3908291,0.453528,0.453528},
-{2968768,3899497,3899862,0.276704347826087,0.276704347826087},
-{2968769,3899862,3900687,0.615,0.615},
-{2968770,3906508,3907133,0.44145,0.44145},
-{2968771,3905144,3906508,0.777969230769231,0.777969230769231},
-{2968772,3903269,3904252,0.5424,0.5424},
-{2968773,3899591,3899862,0.223933333333333,0.223933333333333},
-{2968774,3899344,3899591,0.174715384615385,0.146535483870968},
-{2968775,3899591,3900499,0.4862625,0.51868},
-{2968776,3900499,3901660,0.57944,0.599420689655172},
-{2968777,3899900,3901052,0.72185,0.618728571428571},
-{2968778,3901660,3902786,0.53955,0.604296},
-{2968779,3902786,3903187,0.259173913043478,0.248375},
-{2968780,3903187,3903698,0.353809090909091,0.353809090909091},
-{2968781,3902144,3902418,0.122648275862069,0.11856},
-{2968782,3902418,3902607,0.110112,0.105876923076923},
-{2968783,3902607,3903054,0.311672727272727,0.298121739130435},
-{2968784,3903054,3903346,0.21951,0.209057142857143},
-{2968785,3903346,3903593,0.132527272727273,0.141077419354839},
-{2968786,3903593,3903895,0.23,0.20125},
-{2968787,3903895,3904243,0.203875,0.188192307692308},
-{2968788,3904243,3904564,0.140627027027027,0.148662857142857},
-{2968789,3904564,3904817,0.1464,0.152030769230769},
-{2968790,3904817,3905076,0.13186,0.179809090909091},
-{2968791,3905076,3905910,0.516576923076923,0.516576923076923},
-{2968792,3903105,3903770,0.392957142857143,0.407511111111111},
-{2968793,3902846,3903105,0.188781818181818,0.230733333333333},
-{2968794,3902846,3902781,0.0438,0.0707538461538462},
-{2968795,3902460,3902781,0.245084210526316,0.194025},
-{2968796,3902151,3902460,0.208228571428571,0.14576},
-{2968797,3901819,3902151,0.21711,0.160822222222222},
-{2968798,3901362,3901819,0.342571428571429,0.342571428571429},
-{2968799,3900886,3901362,0.2502,0.278},
-{2968800,3900421,3900886,0.234658064516129,0.202066666666667},
-{2968801,3900143,3900421,0.156577777777778,0.192163636363636},
-{2968802,3898871,3899392,0.304464,1000000},
-{2968803,3899392,3899887,0.258868965517241,1000000},
-{2968804,3897576,3897832,1000000,1000000},
-{2968805,3897832,3898318,1000000,1000000},
-{2968806,3898318,3898848,1000000,0.441035294117647},
-{2968807,3899008,3899769,0.424776923076923,1000000},
-{2968808,3902456,3903455,0.574592307692308,0.439394117647059},
-{2968809,3903455,3904410,0.386368421052632,0.815666666666667},
-{2968810,3904410,3905334,0.349171428571429,0.4582875},
-{2968811,3907847,3908282,1000000,0.199907142857143},
-{2968812,3907549,3907847,1000000,0.133838709677419},
-{2968813,3907265,3907549,1000000,0.142644444444444},
-{2968814,3907265,3907424,0.12006,0.0923538461538462},
-{2968815,3907424,3908048,0.41838,0.298842857142857},
-{2968816,3908048,3908862,0.403133333333333,0.403133333333333},
-{2968817,3908862,3909635,0.436536,0.436536},
-{2968818,3909098,3910063,0.263916666666667,0.231731707317073},
-{2968819,3910063,3910706,0.168225,0.141663157894737},
-{2968820,3910706,3910824,0.0459677419354839,0.0407142857142857},
-{2968821,3908750,3909051,0.118235294117647,0.129677419354839},
-{2968822,3909051,3909347,0.11175,0.129774193548387},
-{2968823,3909347,3909635,0.133741935483871,0.148071428571429},
-{2968824,3909635,3909952,0.140275862068966,0.150666666666667},
-{2968825,3909952,3910284,0.13501935483871,0.13952},
-{2968826,3910284,3910681,0.1366,0.155441379310345},
-{2968827,3913037,3914135,0.511777777777778,0.511777777777778},
-{2968828,3912671,3913037,0.20517,0.170975},
-{2968829,3912671,3912329,0.132558620689655,0.142377777777778},
-{2968830,3912035,3912329,0.134442857142857,0.12548},
-{2968831,3911730,3912035,0.120476470588235,0.120476470588235},
-{2968832,3911282,3911730,0.313828571428571,0.313828571428571},
-{2968833,3907970,3908381,0.223275,0.243572727272727},
-{2968834,3907647,3907970,0.13528,0.156092307692308},
-{2968835,3907365,3907647,0.147857142857143,0.147857142857143},
-{2968836,3907032,3907365,0.143441379310345,0.143441379310345},
-{2968837,3906727,3907032,0.13508,0.150088888888889},
-{2968838,3906356,3906727,0.223753846153846,0.252939130434783},
-{2968839,3896306,3896690,0.19886,0.180781818181818},
-{2968840,3897796,3898020,0.215933333333333,0.19434},
-{2968841,3896012,3896306,0.1839,0.169753846153846},
-{2968842,3897301,3897796,0.385736842105263,0.333136363636364},
-{2968843,3896690,3897301,0.417707142857143,0.417707142857143},
-{2968844,3896588,3896764,0.148827272727273,0.148827272727273},
-{2968845,3893671,3893620,0.101853658536585,0.1044},
-{2968846,3893620,3893574,0.0974634146341463,0.0999},
-{2968847,3893675,3893941,0.152711111111111,0.152711111111111},
-{2968848,3893941,3894240,0.187852173913043,0.187852173913043},
-{2968849,3894240,3894826,0.280778571428571,0.357354545454545},
-{2968850,3894564,3894826,1000000,0.291438461538462},
-{2968851,3894261,3894564,0.394766666666667,0.322990909090909},
-{2968852,3894261,3894120,0.19415,0.15532},
-{2968853,3903984,3904528,0.26088,0.2038125},
-{2968854,3903386,3903984,0.259862068965517,0.215314285714286},
-{2968855,3902932,3903386,0.205944,0.234027272727273},
-{2969718,3879276,3879251,1000000,0.0742434782608696},
-{2969866,3880338,3880408,1000000,1000000},
-{2969867,3883377,3883596,0.0812896551724138,0.0714363636363636},
-{2969868,3882411,3882066,0.336494117647059,0.346690909090909},
-{2969869,3881523,3881869,0.154777777777778,0.144103448275862},
-{2969870,3881094,3881523,0.217178571428571,0.196161290322581},
-{2969871,3880864,3881094,0.1077,0.111688888888889},
-{2969872,3880424,3880864,0.240771428571429,0.232468965517241},
-{2969873,3880099,3880424,0.1874,0.14055},
-{2969874,3879648,3880099,0.4149,0.393063157894737},
-{2969875,3879281,3879648,0.260894117647059,0.3168},
-{2969876,3878359,3878770,1000000,1000000},
-{2969877,3878359,3877929,1000000,1000000},
-{2969878,3879716,3878777,0.471052173913043,0.471052173913043},
-{2969879,3880144,3879716,0.1882875,0.215185714285714},
-{2969880,3880576,3880144,0.27549,0.289989473684211},
-{2969881,3881862,3881483,0.158136,0.146422222222222},
-{2969882,3882097,3881862,0.0971032258064516,0.0885352941176471},
-{2969883,3882458,3882097,0.152420689655172,0.130005882352941},
-{2969884,3882959,3882458,0.198711111111111,0.173070967741935},
-{2969885,3883124,3882959,0.072675,0.069768},
-{2969886,3883542,3883480,0.388407692307692,0.360664285714286},
-{2969887,3883642,3883542,1.1031,1.00281818181818},
-{2969888,3879599,3878491,0.45703125,0.504310344827586},
-{2969889,3878491,3878082,0.1347,0.149666666666667},
-{2969890,3878082,3877685,0.1344375,0.1344375},
-{2969891,3883058,3882382,1000000,0.38661},
-{2969892,3881570,3881418,0.0834857142857143,0.070128},
-{2969893,3881577,3881418,0.191423076923077,0.216391304347826},
-{2969894,3882066,3881577,0.430905,0.465843243243243},
-{2969895,3881577,3881229,0.187915384615385,0.212426086956522},
-{2969896,3881229,3880868,0.14295,0.155945454545455},
-{2969897,3880868,3880326,0.29412,0.29412},
-{2969898,3880135,3880326,0.1649,0.1649},
-{2969899,3880135,3879933,0.156463636363636,0.149660869565217},
-{2969900,3879792,3879933,0.115546153846154,0.107292857142857},
-{2969901,3879792,3879636,0.111381818181818,0.116685714285714},
-{2969902,3880099,3879864,0.240023076923077,0.189109090909091},
-{2969903,3879636,3879864,0.21762,0.225124137931035},
-{2969904,3879636,3879413,0.185222222222222,0.151545454545455},
-{2969905,3881198,3879079,0.918145454545455,0.891141176470588},
-{2969906,3879858,3880122,0.191090322580645,0.211564285714286},
-{2969907,3879496,3880122,0.434422222222222,0.404462068965517},
-{2969908,3879221,3879496,0.183736363636364,0.155469230769231},
-{2969909,3878885,3879221,0.203171428571429,0.147124137931034},
-{2969910,3877880,3877929,1000000,1000000},
-{2969911,3878357,3878148,0.2532,0.2321},
-{2969912,3878357,3878885,0.603923076923077,0.560785714285714},
-{2969913,3882537,3881996,0.21855652173913,0.21855652173913},
-{2969914,3884598,3885203,1000000,0.19340625},
-{2969915,3884655,3885262,0.41244,1000000},
-{2969916,3885203,3885724,1000000,0.270542857142857},
-{2969917,3885724,3886178,0.535725,0.13393125},
-{2969918,3886178,3886327,0.074625,0.1791},
-{2969919,3886327,3887318,0.420235714285714,0.405744827586207},
-{2969920,3886220,3886178,0.204276923076923,0.189685714285714},
-{2969921,3886228,3886220,0.0952411764705882,0.0981272727272727},
-{2969922,3885262,3885789,0.219853846153846,1000000},
-{2969923,3885789,3886228,0.1941,1000000},
-{2969924,3886248,3886228,0.194089655172414,0.160817142857143},
-{2969925,3886299,3886248,0.195446511627907,0.191004545454545},
-{2969926,3886300,3886299,0.0471627906976744,0.0460909090909091},
-{2969927,3886315,3886300,0.0618923076923077,0.0652378378378378},
-{2969928,3886331,3886315,0.115114285714286,0.16116},
-{2969929,3891023,3891004,0.27788,0.252618181818182},
-{2969930,3890236,3890739,0.244157142857143,0.244157142857143},
-{2969931,3889299,3889862,0.209116981132075,0.213138461538462},
-{2969932,3888751,3889299,0.221826666666667,0.221826666666667},
-{2969933,3890129,3890134,0.117566666666667,0.0920086956521739},
-{2969934,3889204,3890129,0.299707692307692,0.307594736842105},
-{2969935,3887418,3887360,0.29511724137931,0.28528},
-{2969936,3887418,3887443,0.68358,0.68358},
-{2969937,3887360,3887318,0.264716129032258,0.264716129032258},
-{2969938,3887318,3889862,0.751447058823529,0.774218181818182},
-{2969939,3887318,3887281,0.2486625,0.274386206896552},
-{2969940,3887281,3887250,0.224935714285714,0.217179310344828},
-{2969941,3886178,3886134,0.176413043478261,0.197926829268293},
-{2969942,3887250,3887222,0.329464285714286,0.318103448275862},
-{2969943,3888592,3889274,0.152468181818182,0.159728571428571},
-{2969944,3889274,3889874,0.154618604651163,0.141459574468085},
-{2969945,3889874,3890438,0.169275,0.15746511627907},
-{2969946,3890438,3891004,0.264096,0.16506},
-{2969947,3891004,3890945,0.247072340425532,0.297753846153846},
-{2969948,3890945,3890909,0.389982352941177,0.348931578947368},
-{2969949,3888531,3888445,0.44108,0.44108},
-{2969950,3888564,3888531,0.135276923076923,0.140688},
-{2969951,3888568,3888564,0.123514285714286,0.13509375},
-{2969952,3888592,3888568,0.164425,0.171573913043478},
-{2969953,3887222,3887202,0.151355555555556,0.157176923076923},
-{2969954,3887202,3887171,0.1158,0.1158},
-{2969955,3887171,3887155,0.125355555555556,0.116710344827586},
-{2969956,3887155,3887079,0.453972413793103,0.424683870967742},
-{2969957,3885978,3885918,0.177951219512195,0.169674418604651},
-{2969958,3885918,3885878,0.2786,0.18283125},
-{2969959,3886472,3886649,0.0727714285714286,0.10188},
-{2969960,3886649,3886998,0.148613793103448,0.165761538461538},
-{2969961,3887079,3886998,0.539781818181818,0.55665},
-{2969962,3886998,3887522,0.189765517241379,0.220128},
-{2969963,3887522,3887661,0.0571363636363636,0.052375},
-{2969964,3887661,3888345,0.244444444444444,0.275},
-{2969965,3888445,3888345,0.574412903225806,0.5396},
-{2969966,3888345,3889018,0.237385714285714,0.27695},
-{2969967,3889018,3889650,0.239121428571429,0.247977777777778},
-{2969968,3890909,3890805,0.541254545454546,0.576174193548387},
-{2969969,3889650,3890225,0.22442,0.24045},
-{2969970,3890225,3890805,0.267456,0.290713043478261},
-{2969971,3890805,3891358,0.192891428571429,0.198564705882353},
-{2969972,3891358,3891891,0.156385714285714,0.164205},
-{2969973,3891891,3892403,0.1479,0.158721951219512},
-{2969974,3892403,3892807,0.0961404255319149,0.107585714285714},
-{2969975,3892807,3893007,0.0481953488372093,0.0481953488372093},
-{2969976,3893007,3893445,0.172697142857143,0.163362162162162},
-{2969977,3891891,3891830,0.654533333333333,0.654533333333333},
-{2969978,3890805,3890757,0.413109677419355,0.42688},
-{2969979,3885978,3886582,0.258222222222222,0.27888},
-{2969980,3886582,3887155,0.236875862068966,0.208163636363636},
-{2969981,3888531,3889228,0.234041379310345,0.22624},
-{2969982,3889228,3889842,0.231537931034483,0.22382},
-{2969983,3889842,3890375,0.2714,0.191576470588235},
-{2969984,3890375,3890945,0.268296,0.23955},
-{2969985,3888345,3888305,0.391581818181818,0.410228571428571},
-{2969986,3888305,3888290,0.1692,0.16215},
-{2969987,3888290,3888205,0.275424,0.222116129032258},
-{2969988,3888290,3888912,0.22995,0.22995},
-{2969989,3888912,3889527,0.209246511627907,0.22494},
-{2969990,3889527,3889639,0.05738,0.0555290322580645},
-{2969991,3889639,3890157,0.232323529411765,0.24684375},
-{2969992,3890157,3890757,0.265062857142857,0.250735135135135},
-{2969993,3890757,3890989,0.126144827586207,0.1407},
-{2969994,3890989,3891304,0.156951724137931,0.15172},
-{2969995,3891304,3891830,0.2376,0.245264516129032},
-{2969996,3891830,3892344,0.22455,0.1996},
-{2969997,3892344,3892928,0.198383333333333,0.193021621621622},
-{2969998,3892928,3893376,0.180113513513513,0.185116666666667},
-{2969999,3890757,3890925,0.171066666666667,0.19245},
-{2970000,3890925,3891204,0.160781818181818,0.151594285714286},
-{2970001,3891204,3891638,0.1503,0.154594285714286},
-{2970002,3891638,3891782,0.0669375,0.0738620689655173},
-{2970003,3891782,3892178,0.254509090909091,0.239965714285714},
-{2970004,3893376,3894211,0.386763636363636,0.344951351351351},
-{2970005,3893376,3893198,0.177730434782609,0.177730434782609},
-{2970006,3893198,3893334,0.1119,0.122072727272727},
-{2970007,3892684,3893476,0.324270967741935,0.3141375},
-{2970008,3893334,3893476,0.122723076923077,0.113957142857143},
-{2970009,3893476,3893604,0.0961862068965517,0.0774833333333333},
-{2970010,3893604,3894214,0.246980487804878,0.235493023255814},
-{2970011,3894214,3894879,0.345531818181818,0.353567441860465},
-{2970012,3894879,3895046,0.11335,0.160023529411765},
-{2970013,3895046,3895688,0.445617391304348,0.465872727272727},
-{2970014,3894879,3895069,0.190542857142857,0.20840625},
-{2970015,3895069,3895171,0.0711,0.0690685714285714},
-{2970016,3895171,3895444,0.245455813953488,0.277752631578947},
-{2970017,3895444,3895490,0.02922,0.0324666666666667},
-{2970018,3895490,3895786,0.16992,0.196061538461538},
-{2970019,3895786,3895888,0.0928,0.0954514285714286},
-{2970020,3895888,3896205,0.206106976744186,0.260664705882353},
-{2970021,3896205,3896238,0.0365513513513513,0.0466344827586207},
-{2970022,3896238,3896505,0.421634482758621,0.509475},
-{2970023,3896505,3896733,0.28276875,0.323164285714286},
-{2970024,3896733,3896850,0.112781818181818,0.11630625},
-{2970025,3896850,3896728,0.15770625,0.174020689655172},
-{2970026,3896728,3897374,0.355752,0.355752},
-{2970027,3897374,3897738,0.20225,0.21104347826087},
-{2970028,3896728,3896645,0.06826875,0.0809111111111111},
-{2970029,3896645,3896537,0.106128,0.0914896551724138},
-{2970030,3896537,3896870,0.3196,0.308185714285714},
-{2970031,3896870,3897077,0.152727272727273,0.186666666666667},
-{2970032,3897077,3897130,0.0360333333333333,0.0498923076923077},
-{2970033,3897130,3897586,0.31995,0.31995},
-{2970034,3898505,3898941,0.17265,0.156954545454545},
-{2970035,3897941,3898505,0.268447058823529,0.260777142857143},
-{2970036,3897849,3897941,0.0461823529411765,0.0461823529411765},
-{2970037,3897586,3897849,0.334933333333333,0.334933333333333},
-{2970038,3895545,3895898,0.26555,0.26555},
-{2970039,3896106,3895898,0.277278260869565,0.2362},
-{2970040,3896163,3896106,0.11781,0.094248},
-{2970041,3895968,3896505,0.377972727272727,0.41577},
-{2970042,3895261,3895968,0.77736,0.728775},
-{2970043,3894727,3895261,0.551152941176471,0.5856},
-{2970044,3894379,3894727,0.162581818181818,0.173070967741935},
-{2970045,3894085,3894379,0.120405405405405,0.120405405405405},
-{2970046,3893772,3894085,0.137866666666667,0.127261538461538},
-{2970047,3893418,3893772,0.20385,0.2114},
-{2970048,3892532,3892803,0.0915405405405405,0.0915405405405405},
-{2970049,3892803,3893166,0.146777142857143,0.12529756097561},
-{2970050,3893166,3893662,0.195536842105263,0.190523076923077},
-{2970051,3893662,3893867,0.0966727272727273,0.102909677419355},
-{2970052,3894406,3894754,0.262988571428571,0.296922580645161},
-{2970053,3894754,3894970,0.15934,0.199175},
-{2970054,3894970,3895572,0.4611,0.4611},
-{2970055,3895572,3896205,0.50634,0.50634},
-{2970056,3895171,3895698,0.341911111111111,0.341911111111111},
-{2970057,3895698,3896556,0.721088888888889,0.721088888888889},
-{2970058,3885950,3885481,0.192109090909091,0.18784},
-{2970059,3885481,3885196,0.113642553191489,0.106824},
-{2970060,3885196,3885004,0.0714666666666667,0.0684255319148936},
-{2970061,3885004,3884726,0.212577777777778,0.163988571428571},
-{2970062,3887136,3886570,0.271375609756098,0.337163636363636},
-{2970063,3886570,3886326,0.0948941176470588,0.0948941176470588},
-{2970064,3886326,3885900,0.35796,0.193491891891892},
-{2970065,3885619,3885348,0.0922212765957447,0.09632},
-{2970066,3885348,3885082,0.0888893617021276,0.0888893617021276},
-{2970067,3885082,3884847,0.0873652173913043,0.0855063829787234},
-{2970068,3884847,3884767,0.0228367346938776,0.0228367346938776},
-{2970069,3884767,3884576,0.062475,0.062475},
-{2970070,3884576,3884431,0.0520212765957447,0.0531521739130435},
-{2970071,3884431,3884324,0.04112,0.0420545454545455},
-{2970072,3884324,3884167,0.062,0.062},
-{2970073,3884167,3883984,0.129626086956522,0.124225},
-{2970074,3881308,3881467,0.120052173913044,0.102266666666667},
-{2970075,3881467,3881755,0.162664285714286,0.182184},
-{2970076,3881755,3881946,0.134048275862069,0.1254},
-{2970077,3881946,3882037,0.0496457142857143,0.0526545454545455},
-{2970078,3882037,3882269,0.1376,0.1376},
-{2970079,3882269,3882504,0.123216666666667,0.13861875},
-{2970080,3883984,3883663,0.136852941176471,0.23265},
-{2970081,3883663,3883298,0.0945,0.0966},
-{2970082,3883298,3882780,0.142995918367347,0.14908085106383},
-{2970083,3882504,3882780,0.2013,0.210052173913043},
-{2970084,3882780,3882474,0.0794235294117647,0.082665306122449},
-{2970085,3882474,3882194,0.087075,0.0908608695652174},
-{2970086,3882194,3881933,0.146586206896552,0.128818181818182},
-{2970087,3882780,3883306,0.48258947368421,1.0188},
-{2970088,3883306,3883555,0.14296,0.134025},
-{2970089,3883555,3883794,0.2356,0.163107692307692},
-{2970090,3881346,3881258,1000000,0.119792307692308},
-{2970091,3881708,3881346,0.303135483870968,0.268491428571429},
-{2970092,3881755,3881708,0.0981,0.102771428571429},
-{2970093,3880751,3880916,0.0939352941176471,0.118288888888889},
-{2970094,3880916,3881174,0.1746,0.161169230769231},
-{2970095,3881174,3881258,0.0822,0.06028},
-{2970096,3881258,3880910,1000000,0.406176923076923},
-{2970097,3880910,3880718,1000000,0.203142857142857},
-{2970098,3881258,3881406,0.0940285714285714,0.0731333333333333},
-{2970099,3881406,3881537,0.0679333333333333,0.06114},
-{2970100,3881537,3881675,0.05163,0.0529538461538462},
-{2970101,3881675,3881933,0.128708108108108,0.15361935483871},
-{2970102,3880910,3881138,1000000,0.0929142857142857},
-{2970103,3881138,3881740,1000000,0.35124},
-{2970104,3881740,3882277,0.249062068965517,0.249062068965517},
-{2970105,3881933,3882419,0.287664705882353,0.250784615384615},
-{2970106,3882419,3882277,0.178928571428571,1000000},
-{2970107,3879861,3880159,0.13775625,0.163266666666667},
-{2970108,3880159,3880396,0.135325,0.147627272727273},
-{2970109,3880396,3880718,0.164511111111111,0.164511111111111},
-{2970110,3885082,3886104,0.532984615384615,0.43305},
-{2970111,3887027,3886104,0.345171428571429,0.439309090909091},
-{2970112,3886308,3885959,0.188353846153846,0.1530375},
-{2970113,3886547,3886308,0.0928909090909091,0.0908266666666667},
-{2970114,3886804,3886547,0.105468292682927,0.102957142857143},
-{2970115,3887027,3886804,0.154292307692308,0.154292307692308},
-{2970116,3887262,3887027,0.147346153846154,0.15324},
-{2970117,3887488,3887262,0.0894545454545454,0.0915348837209302},
-{2970118,3887761,3887488,0.08484,0.0829956521739131},
-{2970119,3888093,3887761,0.14728,0.152358620689655},
-{2970120,3888367,3888093,0.154272,1000000},
-{2970121,3888567,3888367,0.0663209302325582,1000000},
-{2970122,3888607,3888567,0.0150510638297872,1000000},
-{2970123,3888888,3888607,0.0824869565217391,1000000},
-{2970124,3889065,3888888,0.05564,1000000},
-{2970125,3889128,3889065,0.0187142857142857,1000000},
-{2970126,3889378,3889128,0.123522580645161,1000000},
-{2970127,3887027,3887505,0.217432258064516,0.177378947368421},
-{2970128,3887505,3887662,0.0426666666666667,0.0417391304347826},
-{2970129,3887662,3888167,0.16032,0.142506666666667},
-{2970130,3889086,3888635,1000000,0.198235714285714},
-{2970131,3888635,3888273,0.162642857142857,0.162642857142857},
-{2970132,3888273,3888167,0.0475111111111111,0.0475111111111111},
-{2970133,3888167,3888493,0.187155,0.197005263157895},
-{2970134,3887501,3887173,0.25794,0.25794},
-{2970135,3887843,3887501,0.20277,0.20277},
-{2970136,3888144,3887843,0.1591,0.14319},
-{2970137,3888493,3888144,0.198733333333333,0.23848},
-{2970138,3888493,3889130,0.3253,0.285629268292683},
-{2970139,3889130,3889467,0.14835,0.184158620689655},
-{2970140,3888911,3889467,0.232968,0.232968},
-{2970141,3888911,3888519,0.161292857142857,0.155731034482759},
-{2970142,3888519,3888384,0.0795545454545455,0.0648222222222222},
-{2970143,3880396,3880212,0.240688888888889,0.240688888888889},
-{2970144,3880212,3880301,0.06924,0.06924},
-{2970145,3880301,3880476,0.12036,0.1062},
-{2970146,3880476,3880701,0.160671428571429,0.1405875},
-{2970147,3880701,3880929,0.143088888888889,0.143088888888889},
-{2970148,3881740,3881464,0.228664285714286,0.266775},
-{2970149,3881464,3881343,0.1296,0.145152},
-{2970150,3881343,3881162,0.312947368421053,0.258521739130435},
-{2970151,3880929,3881162,0.11635,0.135116129032258},
-{2970152,3881162,3881511,0.24015,0.280175},
-{2970153,3881102,3881387,0.0904,0.0853777777777778},
-{2970154,3878208,3879752,0.707066666666667,0.707066666666667},
-{2970155,3881031,3881102,0.0262415094339623,0.0252872727272727},
-{2970156,3880421,3881031,0.206434615384615,0.198788888888889},
-{2970157,3880222,3880421,0.0714857142857143,0.070056},
-{2970158,3880222,3879963,0.211382142857143,0.219211111111111},
-{2970159,3883839,3884819,0.38787,0.44328},
-{2970160,3884108,3884886,0.288012765957447,0.300813333333333},
-{2970161,3886260,3885815,1000000,0.403088888888889},
-{2970162,3884886,3885540,0.24134693877551,0.24134693877551},
-{2970163,3885815,3885540,1000000,0.8443875},
-{2970164,3885540,3886197,0.230244,0.250265217391304},
-{2970165,3886197,3886465,0.1509,0.1509},
-{2970166,3889624,3889174,0.135243243243243,0.119142857142857},
-{2970167,3890191,3889850,0.164424,0.12845625},
-{2970168,3889850,3889886,0.159,0.159},
-{2970169,3889356,3889746,0.167723076923077,0.1817},
-{2970170,3889746,3889902,0.097551724137931,0.08840625},
-{2970171,3890490,3889902,0.245883333333333,0.226969230769231},
-{2970172,3890745,3890490,0.073305,0.0751846153846154},
-{2970173,3891243,3891525,0.25269375,0.25269375},
-{2970174,3891525,3891558,0.165286956521739,0.12672},
-{2970175,3891558,3891584,0.0835,0.0607272727272727},
-{2970176,3891584,3891632,0.107574193548387,0.0980823529411765},
-{2970177,3891632,3891647,0.093096,0.0705272727272727},
-{2970178,3891647,3891888,0.169444444444444,0.157758620689655},
-{2970179,3891888,3891945,0.124130769230769,0.119533333333333},
-{2970180,3891945,3891997,0.1756,0.15365},
-{2970181,3891779,3891477,0.193885714285714,0.20358},
-{2970182,3891997,3891779,0.123075,0.123075},
-{2970183,3891997,3892204,0.214539130434783,0.214539130434783},
-{2970184,3893368,3893126,0.185136,0.185136},
-{2970185,3893126,3892822,0.174312,1000000},
-{2970186,3892822,3892651,0.0597375,1000000},
-{2970187,3892651,3892462,0.0874457142857143,1000000},
-{2970188,3892462,3892204,0.15384,1000000},
-{2970189,3892204,3892657,0.292916129032258,0.2837625},
-{2970190,3892657,3892414,0.1542,0.140791304347826},
-{2970191,3892414,3892133,0.152975,0.131121428571429},
-{2970192,3892133,3891835,0.188914285714286,0.1653},
-{2970193,3891835,3891542,0.145022222222222,0.145022222222222},
-{2970194,3891542,3891236,0.146044444444444,0.146044444444444},
-{2970195,3892657,3893075,0.34746,0.32574375},
-{2970196,3893075,3893303,0.146035714285714,0.1363},
-{2970197,3893303,3893868,0.338708571428571,0.39516},
-{2970198,3892546,3892256,0.147844444444444,0.147844444444444},
-{2970199,3892886,3892546,0.151888888888889,0.151888888888889},
-{2970200,3893186,3892886,1000000,0.156555555555556},
-{2970201,3893523,3893186,1000000,0.202915384615385},
-{2970202,3893868,3893523,1000000,0.240048},
-{2970203,3893868,3893985,0.130928571428571,0.14664},
-{2970204,3893985,3894017,0.0851,0.07659},
-{2970205,3894237,3893868,1000000,0.248973913043478},
-{2970206,3894237,3894316,0.07089,0.07089},
-{2970207,3894634,3894316,0.248652631578947,0.23622},
-{2970208,3894017,3894274,0.319311111111111,0.319311111111111},
-{2970209,3894274,3894493,0.196911111111111,0.196911111111111},
-{2970210,3894493,3894860,0.384044444444444,0.384044444444444},
-{2970211,3894860,3895160,0.223556756756757,0.223556756756757},
-{2970212,3895160,3895570,0.301381818181818,0.292517647058823},
-{2970213,3895570,3895859,0.2198625,0.23452},
-{2970214,3895859,3896118,0.1306,0.144347368421053},
-{2970215,3896118,3896399,0.148843902439024,0.160594736842105},
-{2970216,3896399,3896635,0.110780487804878,0.137636363636364},
-{2970217,3896635,3897400,0.252223255813953,0.28541052631579},
-{2970218,3897400,3897707,0.0919826086956522,0.117533333333333},
-{2970219,3897707,3898044,0.110289473684211,0.155222222222222},
-{2970220,3898044,3898420,0.197236363636364,0.1808},
-{2970221,3893674,3893429,0.19743,0.19743},
-{2970222,3893914,3893674,0.228966666666667,0.228966666666667},
-{2970223,3894139,3893914,0.1652,0.1652},
-{2970224,3894377,3894139,0.158209090909091,0.145025},
-{2970225,3894627,3894377,0.155425,0.155425},
-{2970226,3894860,3894627,0.1298,0.1298},
-{2970227,3895113,3894860,0.18276,0.18276},
-{2970228,3895252,3895113,0.12954,0.12954},
-{2970229,3895438,3895252,0.13449,0.13449},
-{2970230,3895438,3895562,0.12336,0.12336},
-{2970231,3896033,3895562,0.231511111111111,0.231511111111111},
-{2970232,3896262,3896033,0.103933333333333,0.103933333333333},
-{2970233,3896056,3896227,0.23418947368421,0.23418947368421},
-{2970234,3896301,3896801,0.40284,0.40284},
-{2970235,3896801,3897289,0.28695,0.28695},
-{2970236,3897289,3897551,0.17223,0.17223},
-{2970237,3897551,3897849,0.18447,0.18447},
-{2970238,3886098,3886307,0.108828571428571,0.11427},
-{2970239,3886307,3886648,0.1415,0.146379310344828},
-{2970240,3886648,3887250,0.35385,0.28308},
-{2970241,3887250,3888650,0.525346153846154,0.4553},
-{2970242,3888650,3888592,0.3888,0.3888},
-{2970243,3888650,3889927,0.67341,0.612190909090909},
-{2970244,3889927,3890085,0.0824608695652174,0.0654},
-{2970245,3890085,3890476,0.138441176470588,0.134485714285714},
-{2970246,3890476,3890739,0.120264,0.0969870967741936},
-{2970247,3891004,3891553,0.22016,0.287165217391304},
-{2970248,3892477,3893275,0.886028571428571,0.918844444444445},
-{2970249,3894869,3895010,0.178753846153846,0.105627272727273},
-{2970250,3894495,3894869,0.319046153846154,0.270495652173913},
-{2970251,3894302,3894495,0.149483333333333,0.116986956521739},
-{2970252,3894124,3894302,0.142538461538462,0.132357142857143},
-{2970253,3893624,3894124,0.409923076923077,0.340148936170213},
-{2970254,3893275,3893624,0.4107,0.381364285714286},
-{2970255,3861059,3861176,0.208168421052632,0.183962790697674},
-{2970256,3861059,3860095,0.304305,0.347777142857143},
-{2970257,3859599,3860095,0.346454545454545,0.300868421052632},
-{2970258,3863969,3863413,0.607251428571429,0.625111764705882},
-{2970259,3860324,3860500,0.131323076923077,0.134778947368421},
-{2970260,3860324,3860325,0.0367741935483871,0.0316666666666667},
-{2970261,3860325,3860799,0.370524324324324,0.370524324324324},
-{2970279,3865839,3865258,0.157263157894737,0.153230769230769},
-{2970280,3866032,3865839,0.0514923076923077,0.0528473684210526},
-{2970281,3866155,3866032,0.0325833333333333,0.0308684210526316},
-{2970282,3866526,3866155,0.0819846153846154,0.0841421052631579},
-{2970283,3866949,3866526,0.102415384615385,0.11095},
-{2970284,3867546,3866949,0.162291891891892,0.171565714285714},
-{2970285,3867806,3867546,0.0826363636363636,0.0879677419354839},
-{2970286,3868503,3867806,0.191382857142857,0.186066666666667},
-{2970287,3868647,3868503,0.0478058823529412,0.0478058823529412},
-{2970288,3868879,3868647,0.0541297297297297,0.0589058823529412},
-{2970289,3869091,3868879,0.0587189189189189,0.06035},
-{2970290,3869577,3869091,0.131485714285714,0.127833333333333},
-{2970291,3869700,3869577,0.0339272727272727,0.0329294117647059},
-{2970292,3869832,3869700,0.0354514285714286,0.0376},
-{2970293,3870074,3869832,0.0651081081081081,0.0688285714285714},
-{2970294,3870227,3870074,0.0402514285714286,0.0414352941176471},
-{2970295,3870358,3870227,0.0388545454545455,0.04006875},
-{2970296,3870487,3870358,0.03898125,0.0366882352941176},
-{2970297,3871164,3870487,0.270792,0.270792},
-{2970298,3871164,3870999,0.229008,0.23855},
-{2970299,3870999,3870956,0.0756692307692308,0.06558},
-{2970300,3870956,3870977,0.0575357142857143,0.0519677419354839},
-{2970301,3870977,3870929,0.12984,0.12984},
-{2970302,3870929,3870893,0.136033333333333,0.12243},
-{2970303,3871269,3871164,0.116685714285714,0.12252},
-{2970304,3871337,3871269,0.0441103448275862,0.051168},
-{2970305,3871259,3871337,0.06556,0.0678206896551724},
-{2970306,3871106,3871259,0.125109677419355,0.117527272727273},
-{2970307,3871035,3871106,0.11472,0.106222222222222},
-{2970308,3871080,3871035,0.0751862068965517,0.0751862068965517},
-{2970309,3870909,3871080,0.32675625,0.34854},
-{2970310,3870909,3870894,0.0588260869565217,0.056375},
-{2970311,3870886,3870860,0.0772875,0.0562090909090909},
-{2970312,3870828,3870797,1000000,0.104353846153846},
-{2970313,3870797,3870915,1000000,0.251806451612903},
-{2970314,3870747,3870372,0.17346,0.192733333333333},
-{2970315,3870828,3870158,0.236330769230769,0.21945},
-{2970316,3870158,3869870,0.0704842105263158,0.0744},
-{2970317,3869870,3869018,0.2307,0.250474285714286},
-{2970318,3869018,3868901,0.203276470588235,0.246835714285714},
-{2970319,3868901,3868338,0.229765714285714,0.259412903225806},
-{2970320,3868338,3868131,0.0789666666666667,0.0861454545454546},
-{2970321,3868131,3867656,0.164929411764706,0.1752375},
-{2970322,3867656,3867443,0.103316129032258,0.0889666666666667},
-{2970323,3867008,3866642,0.111247058823529,0.1182},
-{2970324,3867443,3868516,0.487488888888889,0.487488888888889},
-{2970325,3870055,3869739,0.143830434782609,0.161370731707317},
-{2970326,3870228,3870055,0.0473632653061224,0.0504521739130435},
-{2970327,3869980,3869326,0.20262,0.217092857142857},
-{2970328,3870520,3870228,0.111234782608696,0.116290909090909},
-{2970329,3870597,3870520,0.0396648648648649,0.0407666666666667},
-{2970330,3871051,3870597,0.384394285714286,0.384394285714286},
-{2970331,3870984,3871051,0.258790909090909,0.237225},
-{2970332,3870915,3870984,0.49251,0.469057142857143},
-{2970333,3867807,3867566,0.0682054054054054,0.08412},
-{2970334,3866114,3864983,0.372116129032258,0.461424},
-{2970339,3861212,3860325,0.497225,0.426192857142857},
-{2970340,3864767,3864589,0.289338461538461,0.208966666666667},
-{2970341,3864538,3864139,0.326328,0.339925},
-{2970342,3864139,3863918,0.255311111111111,0.287225},
-{2970343,3863918,3863937,0.239635714285714,0.22366},
-{2970344,3863937,3864188,0.141309090909091,0.137152941176471},
-{2970345,3864188,3864540,0.170110344827586,0.182711111111111},
-{2970346,3864541,3864540,0.0411333333333333,0.0321913043478261},
-{2970347,3865724,3865619,0.0507642857142857,0.04738},
-{2970349,3859969,3858344,0.493066666666667,0.479740540540541},
-{2970352,3865495,3864314,0.569590909090909,0.50124},
-{2970353,3864996,3864314,0.389888888888889,0.42108},
-{2970355,3866155,3865763,0.648422222222222,0.648422222222222},
-{2970360,3872607,3871838,0.279878571428571,0.24489375},
-{2970361,3871179,3870637,0.193451612903226,0.206793103448276},
-{2970362,3870637,3869752,0.353825,0.303278571428571},
-{2970363,3869782,3869752,0.02175,0.024},
-{2970364,3869984,3869782,0.139585714285714,0.156336},
-{2970365,3868749,3868607,0.162675,1000000},
-{2970366,3869782,3869185,0.202244444444444,0.188296551724138},
-{2970367,3869185,3868607,0.22692,0.195620689655172},
-{2970368,3867753,3867961,0.356266666666667,0.3006},
-{2970369,3867571,3867753,0.127625806451613,0.104115789473684},
-{2970370,3867215,3867571,0.17825625,0.167770588235294},
-{2970371,3868607,3867460,0.467856,0.48735},
-{2970372,3867460,3867215,0.131929411764706,0.140175},
-{2970373,3866851,3867215,0.284927272727273,0.261183333333333},
-{2970374,3866786,3866851,0.19261935483871,0.180945454545455},
-{2970375,3869752,3869539,0.110902702702703,0.113983333333333},
-{2970376,3869539,3869168,0.198347368421053,0.221682352941176},
-{2970377,3869168,3869015,0.099075,0.117422222222222},
-{2970378,3869015,3868807,0.145711111111111,0.145711111111111},
-{2970379,3868479,3868199,0.087225,0.09304},
-{2970380,3866830,3866786,0.1441,0.123514285714286},
-{2970381,3866889,3866830,0.124761290322581,0.1172},
-{2970382,3868199,3867868,0.105662068965517,0.117853846153846},
-{2970383,3867868,3866889,0.517452631578947,0.517452631578947},
-{2970384,3867023,3866889,0.121928571428571,0.103454545454545},
-{2970385,3867194,3867023,0.16594,0.150854545454545},
-{2970386,3867591,3867194,0.2826375,0.251233333333333},
-{2970387,3868526,3867591,0.532148571428572,0.517366666666667},
-{2970388,3866545,3866889,0.1768,0.1326},
-{2970389,3866545,3866397,0.0429942857142857,0.0396},
-{2970390,3866397,3865893,0.1690875,0.1690875},
-{2970391,3865893,3865452,0.1395,0.1395},
-{2970392,3865452,3865057,0.107468571428571,0.113981818181818},
-{2970393,3865057,3864716,0.109890909090909,0.113325},
-{2970394,3864716,3864446,0.101047058823529,0.104109090909091},
-{2970399,3865099,3864494,0.1825,0.1825},
-{2970400,3865640,3865099,0.131414634146341,0.138153846153846},
-{2970401,3865814,3865640,0.05295,0.0498352941176471},
-{2970402,3866198,3865814,0.125322580645161,0.114264705882353},
-{2970403,3866786,3866198,0.1787,0.191464285714286},
-{2970404,3868374,3866786,0.52592,0.478109090909091},
-{2970405,3868808,3868374,0.144022222222222,0.117836363636364},
-{2970406,3869168,3868808,0.126724137931034,0.136111111111111},
-{2970407,3867194,3866684,0.188844444444444,0.175820689655172},
-{2970408,3866684,3866431,0.07160625,0.0587538461538461},
-{2970409,3866431,3865893,0.181510344827586,0.146216666666667},
-{2970416,3873010,3872699,0.215689655172414,0.164605263157895},
-{2970417,3872699,3868568,1.22346486486486,0.905364},
-{2970418,3868434,3868568,0.157118181818182,0.2469},
-{2970419,3868568,3869193,0.395769230769231,0.42875},
-{2970440,3865099,3865224,0.162955555555556,0.162955555555556},
-{2970441,3865224,3865452,0.2396,0.2396},
-{2970533,3863803,3864448,0.409666666666667,0.409666666666667},
-{2970534,3865134,3864727,0.157361538461538,0.13638},
-{2970535,3866435,3866404,0.133475,0.145609090909091},
-{2970536,3866403,3866435,0.0683076923076923,0.0986666666666667},
-{2970537,3866322,3866403,0.186848275862069,0.193521428571429},
-{2970538,3866263,3866322,0.13982,0.135309677419355},
-{2970539,3866241,3866237,0.0258666666666667,0.0273882352941176},
-{2970540,3866874,3866241,0.674424,0.674424},
-{2970541,3865999,3865673,0.1222,0.1222},
-{2970542,3867462,3866874,0.435806896551724,0.435806896551724},
-{2970543,3867810,3868242,0.371528571428571,0.371528571428571},
-{2970544,3869307,3868993,0.151172727272727,0.184766666666667},
-{2970545,3869732,3869307,0.164781818181818,0.213247058823529},
-{2970546,3851828,3850176,1.1109,1.05243157894737},
-{2970547,3867305,3865081,0.68859375,0.595540540540541},
-{2970548,3867323,3867546,0.3144,0.249351724137931},
-{2970549,3867305,3867323,0.215918181818182,0.1827},
-{2970553,3871432,3870793,0.452068965517241,0.452068965517241},
-{2970554,3870793,3869596,0.408415384615385,0.424752},
-{2970555,3869596,3869420,0.0550846153846154,0.0682},
-{2970556,3869420,3868737,0.321771428571429,0.28155},
-{2970557,3868204,3867743,0.234833333333333,0.183782608695652},
-{2970558,3867868,3867799,0.097632,0.0938769230769231},
-{2970571,3900532,3900869,0.116,0.12227027027027},
-{2970572,3900532,3901252,0.304905,0.530269565217391},
-{2970598,3919267,3919298,0.0243666666666667,0.01370625},
-{2970599,3915715,3916446,0.36958,0.36958},
-{2970600,3916164,3916446,0.19358,0.19358},
-{2970601,3916446,3917126,0.36084,0.341335135135135},
-{2970622,3922257,3921642,0.246454054054054,0.260537142857143},
-{2970623,3923320,3923398,0.0508411764705882,0.0454894736842105},
-{2970624,3923213,3923320,0.0656432432432432,0.0622769230769231},
-{2970625,3923123,3923213,0.0507076923076923,0.0482341463414634},
-{2970628,3915876,3916456,0.166214285714286,0.151760869565217},
-{2970629,3917627,3917411,0.0838333333333333,0.088764705882353},
-{2970630,3917009,3917268,0.0976428571428571,0.0932045454545454},
-{2970631,3915449,3915607,0.054612,0.0557265306122449},
-{2970632,3915307,3915449,0.047616,0.047616},
-{2970633,3915167,3915307,0.051132,0.051132},
-{2970634,3914787,3914876,0.0381,0.0398318181818182},
-{2970635,3911257,3911621,0.11714347826087,0.119746666666667},
-{2970636,3910815,3911257,0.135195348837209,0.138414285714286},
-{2970637,3909735,3910178,0.237125,0.237125},
-{2970638,3910178,3910629,0.277768421052632,1000000},
-{2970639,3906680,3906130,0.336066666666667,0.394513043478261},
-{2970640,3906968,3906680,0.125925,0.154984615384615},
-{2970641,3878213,3878768,0.27415,1000000},
-{2970642,3878768,3879090,0.278169230769231,1000000},
-{2970706,3858373,3858549,0.118220689655172,0.137136},
-{2970707,3857632,3857672,0.209541176470588,0.187484210526316},
-{2970708,3857561,3857672,0.0558315789473684,0.0624},
-{2970709,3900974,3900892,0.178851428571429,0.160507692307692},
-{2970803,3854095,3855301,0.624909090909091,0.542684210526316},
-{2970804,3855125,3854995,0.194494736842105,0.12318},
-{2970805,3855125,3855769,0.236632258064516,0.252951724137931},
-{2970806,3856756,3857311,0.20818,0.249816},
-{2970807,3856329,3856756,0.182129032258065,0.209111111111111},
-{2970808,3858235,3858217,0.06216,0.06216},
-{2970809,3859839,3858235,0.612582352941176,0.671864516129032},
-{2970810,3860987,3860294,0.197679069767442,0.207321951219512},
-{2970811,3861298,3860987,0.102673170731707,0.107938461538462},
-{2970813,3867378,3867848,0.4066,0.420620689655172},
-{2970815,3871853,3871954,0.154845283018868,1000000},
-{2970817,3852375,3851974,0.175311111111111,0.175311111111111},
-{2970819,3850298,3851212,0.40648,1000000},
-{2970820,3857906,3857994,0.0249571428571429,0.0283297297297297},
-{2970821,3857350,3857906,0.25089375,0.382314285714286},
-{2970822,3880183,3880224,1000000,0.0671111111111111},
-{2970823,3880096,3880183,1000000,0.173971428571429},
-{2970824,3877972,3878087,0.0854903225806452,1000000},
-{2970825,3853919,3853622,1000000,0.1932375},
-{2970826,3853919,3853476,0.155416666666667,1000000},
-{2970827,3854097,3853602,0.2019,0.179466666666667},
-{2970828,3854190,3854097,0.0302153846153846,0.0261866666666667},
-{2970829,3860587,3859896,0.339288,0.302935714285714},
-{2970833,3857131,3856553,0.130876595744681,0.133721739130435},
-{2970834,3857523,3857131,0.0859695652173913,0.0841404255319149},
-{2970835,3866886,3865845,0.282617647058824,0.266916666666667},
-{2970836,3870046,3870078,0.0372,1000000},
-{2970837,3870884,3870163,1000000,0.37753125},
-{2970838,3870163,3870421,0.0785636363636364,1000000},
-{2970841,3851809,3853104,1000000,0.6687},
-{2970842,3853104,3853345,0.186227586206897,0.186227586206897},
-{2970843,3856253,3856513,0.063855,0.05805},
-{2970844,3857106,3856513,0.152914285714286,0.149358139534884},
-{2970845,3856530,3856513,1000000,0.1720875},
-{2970846,3857364,3856639,0.604015384615385,0.604015384615385},
-{2970847,3857604,3857364,0.316275,0.316275},
-{2970848,3857806,3857604,0.4803,1000000},
-{2970849,3855023,3854777,0.1135875,0.1135875},
-{2970850,3855427,3855023,0.263502857142857,0.279472727272727},
-{2970851,3855427,3855274,0.283366666666667,0.25503},
-{2970852,3861821,3861618,0.2947,0.342232258064516},
-{2970853,3861618,3861454,0.171492857142857,0.200075},
-{2970854,3860056,3859722,0.287557894736842,0.27318},
-{2970855,3860780,3860056,0.324266666666667,0.324266666666667},
-{2970856,3861315,3860780,0.267792857142857,0.277711111111111},
-{2970857,3866780,3866320,1000000,0.2245},
-{2970858,3900071,3900312,0.099525,0.0925813953488372},
-{2970859,3913158,3913478,0.104342857142857,0.13695},
-{2970860,3910653,3911650,0.5986,1000000},
-{2970861,3900483,3901350,0.520392857142857,0.58284},
-{2970862,3898970,3899344,0.297366666666667,1000000},
-{2970863,3896260,3896348,0.0550421052631579,0.0581},
-{2970864,3896348,3896514,0.07494,0.0768615384615385},
-{2970865,3896348,3896824,1000000,0.449082352941176},
-{2970866,3905184,3905343,0.0727294117647059,0.0686888888888889},
-{2970867,3905144,3905184,0.0171576923076923,0.0162218181818182},
-{2970868,3904727,3905144,0.158270588235294,0.149477777777778},
-{2970869,3904650,3904727,0.0284117647058823,0.02898},
-{2970870,3899388,3899516,0.102694736842105,0.1084},
-{2970871,3899516,3899676,0.130342857142857,0.124418181818182},
-{2970872,3858073,3857806,0.141371428571429,0.134945454545455},
-{2970873,3857510,3858073,0.4346,0.451315384615385},
-{2970874,3857611,3857938,0.26145,0.20916},
-{2970875,3858708,3857938,0.46266,0.402313043478261},
-{2970876,3855460,3855274,0.166153846153846,0.166153846153846},
-{2970877,3855614,3855460,0.115933333333333,0.115933333333333},
-{2970878,3856063,3855946,0.183208695652174,0.183208695652174},
-{2970879,3853178,3853855,0.4847,0.440636363636364},
-{2970880,3853855,3853736,0.208773913043478,0.208773913043478},
-{2970881,3853140,3853178,0.769521428571429,0.695051612903226},
-{2970882,3852633,3852842,0.0951333333333333,0.0951333333333333},
-{2970883,3854610,3855084,0.222444444444444,0.222444444444444},
-{2970884,3855084,3855296,0.137525,0.132024},
-{2970885,3855660,3855950,0.151007142857143,0.151007142857143},
-{2970886,3850122,3850325,0.1374,1000000},
-{2970887,3850325,3851289,0.718335483870968,0.6748},
-{2970888,3851289,3851280,0.168854545454545,0.168854545454545},
-{2970889,3859155,3859226,0.1227,0.115482352941176},
-{2970890,3859761,3859226,0.310552941176471,0.391066666666667},
-{2970891,3861115,3860900,0.114726315789474,0.140632258064516},
-{2970892,3860609,3860367,0.168672727272727,0.206155555555556},
-{2970893,3860367,3860238,0.0692526315789474,0.0848903225806452},
-{2970894,3871260,3870393,0.243741176470588,0.236777142857143},
-{2970895,3871260,3871775,0.117569230769231,0.120663157894737},
-{2970896,3872938,3872982,0.0886846153846154,0.096075},
-{2970897,3854390,3853527,0.300324324324324,0.336727272727273},
-{2970922,3876026,3876145,1000000,0.057925},
-{2970923,3876475,3876735,1000000,0.105216},
-{2970924,3875559,3875622,0.179928,0.145103225806452},
-{2970925,3875527,3875559,0.16865,0.155676923076923},
-{2970926,3875552,3876024,1000000,0.227791304347826},
-{2970927,3876024,3876515,1000000,0.244690909090909},
-{2970928,3880268,3880021,1000000,0.2427},
-{2970929,3880451,3880268,1000000,0.159104347826087},
-{2970930,3881144,3881842,0.54024,0.284336842105263},
-{2970931,3881842,3881900,0.050825,0.0321},
-{2970932,3884456,3884083,1000000,0.2711},
-{2970933,3884857,3884456,1000000,0.309627272727273},
-{2970934,3885865,3885761,1000000,0.0668857142857143},
-{2970935,3886324,3885865,1000000,0.312218181818182},
-{2970936,3876834,3877112,0.108346153846154,0.0853636363636364},
-{2970937,3877112,3877323,0.0717483870967742,0.0654176470588235},
-{2970938,3888116,3888018,0.05244375,0.0987176470588235},
-{2970939,3888137,3888040,0.08742,0.0672461538461538},
-{2970940,3888137,3888897,0.255096774193548,0.292888888888889},
-{2970941,3887833,3888137,1000000,0.232058823529412},
-{2970942,3889486,3890290,0.3233,0.293909090909091},
-{2970943,3889189,3889486,0.0972857142857143,0.0896052631578947},
-{2970944,3888116,3889189,0.356729032258065,0.480808695652174},
-{2970945,3876426,3875891,1000000,0.323325},
-{2970946,3875487,3876341,0.252173333333333,0.263902325581395},
-{2970947,3876341,3876426,1000000,0.0668},
-{2970948,3873905,3874014,1000000,0.296014285714286},
-{2970949,3874184,3874239,1000000,0.093},
-{2970950,3874886,3875010,1000000,0.146544827586207},
-{2970951,3874833,3874886,1000000,0.0364909090909091},
-{2970952,3874300,3874259,0.015015,1000000},
-{2970953,3867302,3867598,0.244766666666667,0.259164705882353},
-{2970954,3868125,3868144,0.0576734693877551,0.0657209302325582},
-{2970955,3867408,3866862,0.428366666666667,1000000},
-{2970956,3866208,3866361,1000000,0.0604971428571429},
-{2970957,3866913,3866450,0.285275,0.273864},
-{2970958,3866405,3866450,0.02352,0.0267272727272727},
-{2970959,3866405,3866734,0.2676,1000000},
-{2970960,3867780,3867497,0.123868965517241,0.156182608695652},
-{2970961,3868140,3867995,0.1014,0.11492},
-{2970962,3871159,3871171,0.175957894736842,0.196658823529412},
-{2970963,3871171,3871313,1000000,0.274085714285714},
-{2971009,3857591,3857632,1000000,0.0629478260869565},
-{2971010,3857591,3858373,0.4932,1000000},
-{2971015,3872084,3871968,1000000,0.04160625},
-{2971016,3872346,3872084,1000000,0.197175},
-{2971017,3864481,3864854,0.244517647058824,0.159876923076923},
-{2971018,3864025,3864481,1000000,0.28262},
-{2971019,3864775,3864936,0.0626275862068966,1000000},
-{2971020,3864775,3864646,1000000,0.0512357142857143},
-{2971021,3864753,3864771,1000000,0.0250615384615385},
-{2971022,3864771,3864775,1000000,0.122030769230769},
-{2971023,3865105,3864817,1000000,0.26305},
-{2971024,3864817,3864850,1000000,0.02961},
-{2971025,3864817,3864013,0.371016,1000000},
-{2971026,3850325,3850060,0.165622222222222,0.178872},
-{2971030,3857491,3856530,0.5216,0.5216},
-{2971031,3859021,3858891,1000000,0.0971571428571429},
-{2971032,3857364,3858891,0.6971,1000000},
-{2971033,3858891,3857491,0.725328,0.725328},
-{2971034,3888225,3888215,0.13458,0.149533333333333},
-{2971035,3888807,3889047,0.1,0.0774193548387097},
-{2971036,3889047,3889418,0.169909090909091,0.128896551724138},
-{2971040,3900003,3899888,1000000,0.153416326530612},
-{2971041,3897605,3897504,0.0887625,1000000},
-{2971042,3897939,3899016,0.281517073170732,1000000},
-{2971043,3891401,3891728,0.140228571428571,0.13088},
-{2971044,3891728,3892080,0.334114285714286,1000000},
-{2971045,3891238,3891819,0.65649,0.354859459459459},
-{2971046,3891819,3891867,0.061,0.05124},
-{2971047,3893724,3893621,0.0877555555555556,0.057790243902439},
-{2971048,3900073,3900047,0.192829787234043,1000000},
-{2971049,3900234,3900232,1000000,0.0316875},
-{2971050,3894794,3895172,0.120829787234043,0.149447368421053},
-{2971051,3895172,3895550,0.13516,0.132221739130435},
-{2971052,3890417,3890879,0.135381818181818,0.141828571428571},
-{2971053,3900248,3899695,0.2502,0.255523404255319},
-{2971054,3899992,3900196,0.145453333333333,0.139263829787234},
-{2971055,3900196,3900277,0.0556851063829787,0.0534122448979592},
-{2971056,3900277,3900357,0.0564510638297872,0.0541469387755102},
-{2971057,3900357,3900423,0.0617739130434783,0.0579918367346939},
-{2971058,3900423,3900492,0.054404347826087,0.0510734693877551},
-{2971059,3900492,3900544,0.0572181818181818,0.05245},
-{2971060,3903308,3903688,0.170729032258065,0.182503448275862},
-{2971061,3903688,3904150,0.141972972972973,0.138236842105263},
-{2971062,3904150,3904530,0.138771428571429,0.142852941176471},
-{2971063,3901689,3902125,1000000,0.0930654545454545},
-{2971064,3902031,3902438,0.143886486486486,1000000},
-{2971065,3902438,3902551,1000000,0.065425},
-{2971066,3902438,3902685,0.11758125,1000000},
-{2971067,3902551,3902763,1000000,0.0764903225806452},
-{2971068,3902763,3902758,0.0532181818181818,0.05488125},
-{2971069,3902758,3902685,0.0476294117647059,0.0490727272727273},
-{2971070,3903051,3902763,0.435229411764706,0.422794285714286},
-{2971071,3904916,3905276,0.126923076923077,0.120731707317073},
-{2971072,3905276,3905700,0.125648780487805,0.12879},
-{2971073,3905700,3906139,0.184986206896552,0.173051612903226},
-{2971074,3912081,3912355,0.2341875,0.208166666666667},
-{2971075,3911283,3911027,0.187933333333333,0.22552},
-{2971076,3914181,3913602,0.37884,0.398778947368421},
-{2971077,3914312,3914181,0.0977,1000000},
-{2971078,3913591,3912686,0.498,0.842769230769231},
-{2971079,3912686,3912514,0.118235294117647,0.1005},
-{2971080,3914334,3914475,0.074328,0.0807913043478261},
-{2971081,3914475,3914695,0.18852,0.198442105263158},
-{2971082,3914695,3914808,0.103941176470588,0.0981666666666667},
-{2971083,3867780,3866886,0.2703,0.235646153846154},
-{2971084,3916456,3917117,0.226235294117647,0.187609756097561},
-{2971085,3916421,3916551,0.11648,0.069888},
-{2971086,3916115,3916421,0.164666666666667,0.164666666666667},
-{2971087,3916115,3916411,1000000,1000000},
-{2971088,3916411,3916456,0.0727578947368421,0.06912},
-{2971089,3915700,3916124,1000000,0.3643125},
-{2971090,3915544,3915700,1000000,0.3576},
-{2971091,3904863,3904814,0.214,0.24075},
-{2971092,3904814,3904813,0.210782608695652,0.167172413793103},
-{2971093,3918213,3918473,0.164378571428571,0.148470967741935},
-{2971094,3917899,3917989,0.0382829268292683,1000000},
-{2971095,3917724,3917899,0.0585906976744186,1000000},
-{2971096,3917536,3917724,0.0768558139534884,1000000},
-{2971097,3917489,3917536,0.0207409090909091,1000000},
-{2971098,3919117,3919288,0.0765483870967742,0.0697941176470588},
-{2971099,3919288,3919453,0.0678,0.06215},
-{2971100,3919453,3919625,0.0624166666666667,0.0624166666666667},
-{2971101,3919625,3919786,0.0660857142857143,0.0680294117647059},
-{2971102,3919396,3920091,0.59097,1000000},
-{2971103,3919209,3919396,0.204085714285714,0.28572},
-{2971104,3916140,3916048,0.0746,0.0610363636363636},
-{2971105,3916480,3916140,0.282763636363636,0.296228571428571},
-{2971106,3917101,3916480,0.482171428571429,0.50628},
-{2971107,3917167,3917101,0.1077,0.0942375},
-{2971108,3916786,3916720,0.0697875,0.0587684210526316},
-{2971109,3917004,3916786,0.182542857142857,0.182542857142857},
-{2971110,3917121,3917004,0.0703655172413793,0.0703655172413793},
-{2971111,3917690,3917121,0.474054545454545,0.386266666666667},
-{2971112,3917875,3917690,0.162423529411765,0.2124},
-{2971113,3917921,3917875,0.0904235294117647,0.15372},
-{2971114,3915486,3915189,0.26466,0.27858947368421},
-{2971115,3915596,3915486,0.0942,0.0994333333333333},
-{2971116,3916048,3915596,0.335345454545455,0.36888},
-{2971117,3918490,3917710,0.688866666666667,0.61998},
-{2971118,3918950,3918490,0.285507692307692,0.239458064516129},
-{2971119,3917398,3917334,0.0712235294117647,0.0712235294117647},
-{2971120,3917770,3917398,0.27335,0.3124},
-{2971121,3917994,3917770,0.11624,0.11624},
-{2971122,3918153,3917994,0.0734516129032258,0.0669705882352941},
-{2971123,3918237,3918153,0.0464769230769231,0.0377625},
-{2971124,3918722,3918237,0.257806451612903,0.242181818181818},
-{2971125,3918821,3918722,0.0732521739130435,0.0936},
-{2971126,3900851,3900941,0.0318933333333333,0.0299},
-{2971127,3900941,3901059,0.0397021276595745,0.03732},
-{2971128,3904813,3905290,0.179079069767442,0.183342857142857},
-{2971129,3905290,3905394,0.0447219512195122,0.0509333333333333},
-{2971130,3905394,3905508,0.0422142857142857,0.0422142857142857},
-{2971131,3905508,3906054,0.189,0.213230769230769},
-{2971132,3905394,3905294,0.273392307692308,0.296175},
-{2971133,3905394,3905497,0.0752608695652174,0.0961666666666667},
-{2971134,3906096,3905497,0.318771428571429,0.307779310344828},
-{2971135,3907012,3906970,0.259954285714286,0.233292307692308},
-{2971136,3906424,3906854,0.155385714285714,0.181283333333333},
-{2971137,3906854,3906964,0.0482727272727273,0.0455142857142857},
-{2971138,3906970,3906964,0.108022222222222,0.09114375},
-{2971139,3916615,3915887,0.456530769230769,0.349111764705882},
-{2971140,3916806,3916615,0.145971428571429,0.180317647058824},
-{2971141,3916970,3916806,0.237461538461538,0.162473684210526},
-{2971142,3917631,3916970,0.404834482758621,0.434822222222222},
-{2971143,3917112,3916931,0.138228571428571,0.170752941176471},
-{2971144,3917279,3917112,0.198,0.166736842105263},
-{2971145,3917963,3917279,0.429555555555556,0.414214285714286},
-{2971146,3916931,3916206,0.476712,0.476712},
-{2971147,3897476,3897618,0.123070588235294,0.10461},
-{2971148,3897432,3897476,0.0345214285714286,0.0345214285714286},
-{2971149,3897166,3897432,0.147910344827586,0.153192857142857},
-{2971150,3896959,3897166,0.0931935483870968,0.103178571428571},
-{2971151,3896810,3896959,0.0675636363636364,0.0675636363636364},
-{2971152,3896690,3896810,0.0622166666666667,0.0658764705882353},
-{2971153,3895300,3895484,0.17636,0.195955555555556},
-{2971154,3895484,3895661,0.152085,0.144842857142857},
-{2971155,3895661,3895735,0.0478975609756098,0.0467571428571428},
-{2971156,3895735,3896027,0.1776,0.169527272727273},
-{2971157,3896027,3896088,0.039409756097561,0.039409756097561},
-{2971158,3896088,3896306,0.175761290322581,0.18162},
-{2971159,3906500,3907095,1000000,0.324133333333333},
-{2971160,3907095,3907265,1000000,0.091368},
-{2971161,3895833,3896012,0.0709,0.0709},
-{2971162,3895722,3895833,0.0500129032258064,0.062016},
-{2971163,3895259,3895420,0.0973714285714286,0.081792},
-{2971164,3894993,3895259,0.140292857142857,0.119036363636364},
-{2971165,3894782,3895084,0.209546341463415,0.204557142857143},
-{2971166,3895288,3895420,0.116693617021277,0.119230434782609},
-{2971167,3895518,3895756,0.139281818181818,0.139281818181818},
-{2971168,3895756,3895809,0.0533090909090909,0.0451076923076923},
-{2971169,3895809,3895978,0.1473,0.124638461538462},
-{2971170,3895941,3896588,1000000,0.459884210526316},
-{2971171,3895756,3895941,1000000,0.114714285714286},
-{2971172,3899382,3899513,0.075075,0.0828413793103448},
-{2971173,3899513,3899600,0.0445125,0.0647454545454545},
-{2971174,3897166,3897379,1000000,0.169878260869565},
-{2971175,3897379,3897796,1000000,0.285964285714286},
-{2971176,3898084,3898363,1000000,0.129111111111111},
-{2971177,3897796,3898084,0.187457142857143,0.187457142857143},
-{2971178,3901084,3901450,0.225672,0.201492857142857},
-{2971179,3900898,3901084,0.074895,0.0809675675675676},
-{2971180,3900548,3900898,0.132125581395349,0.142035},
-{2971181,3899399,3899469,0.0322340425531915,0.0309183673469388},
-{2971182,3899469,3899846,0.1374875,0.134681632653061},
-{2971183,3897301,3897418,0.0936,0.0980571428571429},
-{2971184,3897418,3897522,0.115633333333333,0.0946090909090909},
-{2971231,3896723,3896471,0.167014285714286,0.23382},
-{2971232,3897786,3896723,0.3948,0.567525},
-{2971239,3905502,3905217,0.103677272727273,0.091236},
-{2971240,3906269,3905502,0.23715652173913,0.330581818181818},
-{2971241,3903947,3904397,0.141655813953488,0.138436363636364},
-{2971248,3898854,3897991,1000000,0.413668965517241},
-{2971249,3898854,3899412,0.311261538461538,0.289028571428571},
-{2971250,3898514,3898854,0.183422222222222,0.176871428571429},
-{2971251,3898423,3897786,0.259594736842105,0.365355555555556},
-{2971252,3899120,3898423,1000000,1000000},
-{2971253,3903568,3902864,0.281019512195122,1000000},
-{2971254,3905320,3905414,1000000,0.0283358490566038},
-{2971255,3904818,3905320,1000000,0.141755555555556},
-{2971256,3905799,3905663,0.0876444444444444,0.0986},
-{2971272,3903889,3904282,0.100476923076923,0.137494736842105},
-{2971273,3904565,3904858,0.0749142857142857,0.083904},
-{2971288,3916912,3917207,0.230139130434783,0.1654125},
-{2971289,3917411,3917207,0.0852923076923077,0.0869647058823529},
-{2971290,3917207,3917258,0.250096551724138,0.259028571428571},
-{2971291,3916093,3916494,0.318790909090909,0.21916875},
-{2971292,3915768,3916093,0.109628571428571,0.1119125},
-{2971293,3915607,3915768,0.0552941176470588,0.0564},
-{2971294,3889895,3890996,0.601147826086956,0.5761},
-{2971295,3890996,3891124,0.128828571428571,1000000},
-{2971296,3892294,3892315,1000000,0.050775},
-{2971297,3891614,3892294,1000000,0.507677419354839},
-{2971298,3891036,3891614,1000000,0.435558620689655},
-{2971299,3889699,3889292,1000000,1000000},
-{2971300,3887518,3887589,1000000,1000000},
-{2971301,3887518,3887444,1000000,1000000},
-{2971302,3887444,3887847,0.287775,1000000},
-{2971303,3887643,3887847,0.10244347826087,1000000},
-{2971304,3886820,3886868,0.20025,1000000},
-{2971305,3886868,3886871,0.0278454545454545,1000000},
-{2971306,3886871,3887029,0.4295,1000000},
-{2971307,3887029,3886985,0.276954545454545,1000000},
-{2971308,3888803,3888401,0.48885,0.48885},
-{2971309,3888798,3888803,1000000,0.190533333333333},
-{2971310,3894873,3895080,1000000,0.0513310344827586},
-{2971311,3894689,3894802,0.0246454545454545,1000000},
-{2971312,3897646,3897968,0.0642882352941176,1000000},
-{2971313,3899518,3899144,0.167653846153846,1000000},
-{2971314,3879387,3879588,1000000,1000000},
-{2971315,3879588,3879755,1000000,1000000},
-{2971316,3879524,3879729,0.42232,1000000},
-{2971317,3879139,3879356,0.412690909090909,0.324257142857143},
-{2971318,3877789,3877453,0.271866666666667,1000000},
-{2971319,3877453,3877502,1000000,1000000},
-{2971320,3877324,3877283,1000000,0.14556},
-{2971321,3877502,3877324,1000000,1000000},
-{2971322,3877324,3877344,0.09685,1000000},
-{2971323,3877344,3877453,1000000,0.059424},
-{2971324,3877344,3877216,0.0677142857142857,0.05925},
-{2971325,3878042,3877690,0.13073023255814,0.15192972972973},
-{2971326,3879251,3878478,0.336555,0.354268421052632},
-{2971327,3878478,3878042,0.189268421052632,0.179805},
-{2971328,3885480,3885383,0.0430071428571429,0.0415241379310345},
-{2971329,3885955,3885480,0.16212,0.156890322580645},
-{2971330,3891244,3891272,0.0656052631578947,0.0673783783783784},
-{2971331,3891208,3891244,0.0688105263157895,0.0769058823529412},
-{2971332,3880841,3880809,0.221769230769231,0.11532},
-{2971333,3880761,3880882,0.2274,0.10233},
-{2971334,3880892,3880986,0.0494181818181818,0.0639529411764706},
-{2971335,3880882,3880841,0.1689,0.14075},
-{2971336,3880707,3880809,0.090744,1000000},
-{2971337,3880883,3881281,1000000,0.4617},
-{2971338,3880882,3880892,0.0648782608695652,0.0710571428571429},
-{2971339,3882564,3882744,0.238666666666667,1000000},
-{2971340,3882744,3882872,0.215785714285714,1000000},
-{2971341,3882872,3883264,1000000,0.241371428571429},
-{2971346,3903384,3903987,0.151110638297872,0.139258823529412},
-{2971347,3903987,3904973,0.302382857142857,0.264585},
-{2971399,3903044,3903145,0.0674222222222222,0.130028571428571},
-{2971400,3903668,3903457,0.104084210526316,0.09888},
-{2971401,3903852,3903668,0.0849090909090909,0.0849090909090909},
-{2971422,3907739,3907801,0.0714,0.0634666666666667},
-{2971423,3907914,3908020,0.0977571428571429,0.109488},
-{2971433,3923096,3923243,0.0916363636363637,0.103384615384615},
-{2971434,3923243,3923307,0.0307565217391304,0.03537},
-{2971435,3923307,3923677,0.214677272727273,0.255291891891892},
-{2971436,3923520,3923677,0.136145454545455,0.119808},
-{2971437,3923398,3923520,0.0885375,0.0809485714285714},
-{2971438,3920983,3921559,0.31258064516129,0.31258064516129},
-{2971439,3921559,3921787,0.12369375,0.0899590909090909},
-{2971440,3921787,3921908,0.08745,0.061215},
-{2971441,3921908,3922244,0.1643,0.144263414634146},
-{2971442,3922257,3922345,0.0426,0.0404153846153846},
-{2971443,3919879,3920057,0.124175,0.212871428571429},
-{2971445,3865232,3865403,0.182841176470588,0.230244444444444},
-{2971446,3865403,3865825,1000000,0.54572},
-{2971447,3865779,3865300,0.254057142857143,0.254057142857143},
-{2971448,3868713,3868681,0.102560869565217,0.102560869565217},
-{2971449,3875145,3874787,0.177876923076923,0.177876923076923},
-{2971450,3875122,3875145,0.0871363636363636,0.09585},
-{2971451,3857632,3858444,1000000,0.431085714285714},
-{2971452,3858444,3858786,0.21561,0.172488},
-{2971453,3868939,3868655,1000000,0.415153846153846},
-{2971454,3868549,3868655,1000000,0.07816},
-{2971455,3869066,3868754,0.16338,0.192211764705882},
-{2971456,3868641,3868754,0.0865333333333333,1000000},
-{2971457,3858131,3858171,0.0711833333333333,0.0595953488372093},
-{2971458,3856618,3856746,0.0366807692307692,0.0405829787234043},
-{2971459,3856976,3856434,0.26570625,0.223752631578947},
-{2971460,3857816,3857416,0.214844444444444,0.207171428571429},
-{2971461,3858101,3857816,0.112310526315789,0.115345945945946},
-{2971462,3859806,3860477,0.350078571428571,0.377007692307692},
-{2971463,3861746,3861214,0.5835,0.507391304347826},
-{2971464,3859423,3859273,0.0803333333333333,0.0774642857142857},
-{2971465,3859273,3858969,0.198218181818182,0.1896},
-{2971466,3870087,3869839,0.1938,0.0750193548387097},
-{2971467,3870168,3870087,0.0342571428571429,0.0189315789473684},
-{2971468,3870035,3869867,1000000,0.07963125},
-{2971469,3872974,3872781,0.0725357142857143,0.0923181818181818},
-{2971470,3873889,3872974,0.432825,1000000},
-{2971471,3875974,3876325,0.139692857142857,0.156456},
-{2971472,3876325,3876630,0.1779,0.169428571428571},
-{2971473,3876630,3876919,0.15111,0.143914285714286},
-{2971474,3876919,3877581,0.33849,0.294339130434783},
-{2971475,3848563,3848433,0.359976923076923,0.359976923076923},
-{2971476,3865628,3865267,0.155594117647059,1000000},
-{2971477,3865311,3865226,1000000,0.213765517241379},
-{2971478,3868156,3867722,0.157015384615385,0.1458},
-{2971479,3868653,3868156,0.1713,0.1713},
-{2971480,3869409,3868653,0.218682352941176,0.225309090909091},
-{2971481,3869825,3869409,0.132533333333333,0.275261538461538},
-{2971482,3869896,3869900,1000000,0.049425},
-{2971483,3875204,3875862,0.196610526315789,0.201924324324324},
-{2971484,3872127,3870674,1000000,0.271395918367347},
-{2971485,3880746,3882522,1000000,0.409176},
-{2971486,3860964,3861281,0.114153846153846,0.1113},
-{2971487,3861701,3861281,0.168908571428571,0.168908571428571},
-{2971488,3861964,3861701,0.125815384615385,0.0962117647058824},
-{2971489,3862322,3861964,0.148386206896552,0.153685714285714},
-{2971490,3862322,3862469,0.199834285714286,0.189032432432432},
-{2971491,3861274,3860758,0.195990697674419,0.183208695652174},
-{2971492,3861552,3861274,0.091284,0.091284},
-{2971493,3867446,3867167,0.176905263157895,0.176905263157895},
-{2971494,3867715,3867446,0.119524137931034,0.119524137931034},
-{2971495,3872073,3872020,0.0685363636363636,0.0655565217391304},
-{2971496,3872020,3871883,0.1917,0.200034782608696},
-{2971497,3873233,3872622,0.228511111111111,0.228511111111111},
-{2971498,3873445,3873233,0.086976,0.103542857142857},
-{2971499,3866435,3866644,0.0831,0.0870571428571429},
-{2971500,3871301,3871139,0.263836363636364,0.341435294117647},
-{2971501,3871139,3871021,0.186530769230769,0.202075},
-{2971502,3871021,3870947,0.146514285714286,0.161936842105263},
-{2971503,3870875,3870749,0.227139130434783,0.26121},
-{2971504,3871456,3870922,1000000,0.149127272727273},
-{2971505,3865124,3864861,0.0990571428571429,0.0924533333333333},
-{2971506,3865404,3865124,0.110316279069767,0.105413333333333},
-{2971507,3869245,3868444,0.3765,0.340064516129032},
-{2971508,3868273,3867645,0.316977777777778,0.316977777777778},
-{2971509,3866234,3866263,0.0852,0.0781},
-{2971510,3871368,3870830,0.15890625,0.211875},
-{2971511,3871636,3871368,0.0863777777777778,0.11661},
-{2971512,3866371,3865999,0.101045454545455,0.101045454545455},
-{2971513,3867205,3866710,0.179553488372093,0.16784347826087},
-{2971514,3867205,3867277,0.0285652173913043,0.0305581395348837},
-{2971515,3867410,3867083,0.124316129032258,0.137635714285714},
-{2971516,3867827,3867410,0.180878571428571,0.230209090909091},
-{2971517,3870675,3870416,0.101791304347826,0.09755},
-{2971518,3871054,3870675,0.12052,0.1572},
-{2971519,3871296,3871054,0.11358,0.22716},
-{2971520,3871296,3871689,0.143925,0.246728571428571},
-{2971521,3871689,3871912,0.0594529411764706,0.06316875},
-{2971522,3862828,3861460,0.337096153846154,0.35058},
-{2971523,3863361,3862828,0.14556,0.14556},
-{2971524,3863557,3863361,0.0483183673469388,0.047352},
-{2971525,3866137,3865914,0.0507622641509434,0.0517384615384615},
-{2971526,3866506,3866137,0.0699346153846154,0.0713058823529412},
-{2971527,3886558,3887572,0.334455319148936,0.308223529411765},
-{2971528,3887762,3887572,0.04075,0.0501538461538462},
-{2971529,3888042,3887762,0.0511224489795918,0.0596428571428571},
-{2971530,3893721,3893671,0.103358823529412,0.10981875},
-{2971531,3866642,3866484,0.0435096774193548,0.04496},
-{2971532,3867143,3867008,0.0504529411764706,0.0553354838709677},
-{2971533,3867352,3867143,0.0825111111111111,0.0675090909090909},
-{2971534,3867443,3867352,0.0410571428571429,0.0328457142857143},
-{2971535,3870201,3869739,0.18145,0.189339130434783},
-{2971536,3870490,3870201,0.0773657142857143,0.104146153846154},
-{2971537,3870248,3869980,0.0915333333333333,0.112336363636364},
-{2971538,3870520,3870248,0.10375,0.138333333333333},
-{2971539,3883412,3882817,0.374964705882353,0.374964705882353},
-{2971540,3887571,3887572,0.141144,0.130688888888889},
-{2971541,3887512,3887571,0.215825,0.235445454545455},
-{2971542,3896824,3896965,1000000,1000000},
-{2971543,3899846,3899982,0.055531914893617,0.055531914893617},
-{2971544,3899982,3900071,0.0369272727272727,0.0361066666666667},
-{2971545,3903770,3904417,0.372192,0.372192},
-{2971546,3904417,3904806,0.360811764705882,0.245352},
-{2971547,3913361,3913448,0.0416322580645161,0.032265},
-{2971548,3913448,3913728,0.0913459459459459,0.0866615384615385},
-{2971549,3886134,3886102,0.0574625,0.0574625},
-{2971550,3886102,3886098,0.0614375,0.0614375},
-{2971551,3883264,3883345,1000000,0.0448222222222222},
-{2971552,3885140,3885459,0.3066,1000000},
-{2971553,3884827,3885140,0.33435,1000000},
-{2971554,3900383,3900506,1000000,0.0516},
-{2971555,3902160,3903110,1000000,0.211137313432836},
-{2971556,3903110,3903195,1000000,0.0168461538461538},
-{2971557,3905370,3905707,0.06906,1000000},
-{2971558,3908257,3908130,1000000,0.0819},
-{2971559,3908794,3907732,0.243380487804878,1000000},
-{2971561,3907789,3907765,0.0259826086956522,0.0259826086956522},
-{2971562,3907765,3907732,0.0383727272727273,0.036704347826087},
-{2971563,3907789,3908794,0.257194736842105,1000000},
-{2971569,3876840,3876366,1000000,0.37848},
-{2971570,3876840,3877019,0.183136363636364,1000000},
-{2971576,3884380,3883643,0.454155555555556,0.471623076923077},
-{2971588,3898703,3898871,1000000,0.119828571428571},
-{2971589,3898703,3898789,0.114461538461538,0.0875294117647059},
-{2971590,3901052,3901811,0.393085714285714,0.393085714285714},
-{2971591,3901811,3902144,0.14538,0.13629375},
-{2971595,3870524,3870073,0.119969230769231,1000000},
-{2971596,3870893,3870524,0.087790243902439,1000000},
-{2971597,3872059,3871540,0.114572727272727,0.120028571428571},
-{2971598,3879782,3879858,0.0505034482758621,0.0563307692307692},
-{2971599,3879782,3879591,0.130741935483871,0.12665625},
-{2971600,3879384,3879591,0.12312,0.12312},
-{2971601,3887222,3887603,0.0966615384615385,0.0819521739130435},
-{2971602,3887603,3887922,0.0648266666666667,0.0634173913043478},
-{2971603,3887922,3888075,0.0364636363636364,0.0327428571428571},
-{2971604,3888075,3888592,0.12519512195122,0.122214285714286},
-{2971605,3887155,3887523,0.11630625,0.12406},
-{2971606,3887523,3887841,0.0850114285714286,0.0804162162162162},
-{2971607,3887841,3888159,0.09549375,0.0873085714285714},
-{2971608,3888159,3888531,0.14508,0.134333333333333},
-{2971609,3885878,3885816,0.271054545454545,0.331288888888889},
-{2971610,3901103,3901158,0.0257333333333333,0.0236326530612245},
-{2971611,3901158,3901350,0.0716590909090909,0.0656875},
-{2971612,3868684,3868479,0.083325,0.0784235294117647},
-{2971613,3868807,3868684,0.0446,0.0408833333333333},
-{2971614,3904010,3904871,0.354822857142857,0.344966666666667},
-{2971615,3909516,3909790,0.144822222222222,0.19551},
-{2971616,3909790,3910187,0.135970588235294,0.18492},
-{2971619,3867898,3867743,0.114830769230769,0.129808695652174},
-{2971620,3868049,3867898,0.104121428571429,0.100531034482759},
-{2971621,3868257,3868049,0.106234285714286,0.119941935483871},
-{2971622,3868580,3868257,0.18165,0.198163636363636},
-{2971623,3868852,3868580,0.153123529411765,0.157763636363636},
-{2971624,3869055,3868852,0.186026086956522,0.225189473684211},
-{2971625,3886043,3885791,0.123103448275862,0.274615384615385},
-{2971626,3885791,3885619,0.0719285714285714,0.0839166666666667},
-{2971627,3892178,3892352,0.0777818181818182,0.0754941176470588},
-{2971628,3892352,3892684,0.136581818181818,0.128777142857143},
-{2971635,3884819,3884949,0.08655,0.0814588235294118},
-{2971636,3884949,3885024,0.0722842105263158,0.057225},
-{2971637,3886433,3886260,0.1888875,0.20148},
-{2971638,3886489,3886433,0.0622333333333333,0.07468},
-{2971639,3887849,3888252,0.107436734693878,0.105288},
-{2971640,3888252,3888384,0.0353739130434783,0.0353739130434783},
-{2971641,3890745,3891085,0.119505,0.125794736842105},
-{2971642,3891085,3891243,0.150917647058824,0.150917647058824},
-{2971643,3901368,3901926,0.1956,0.41728},
-{2971644,3901657,3902423,0.40467,0.367881818181818},
-{2971645,3896163,3896224,0.040625,0.0464285714285714},
-{2971646,3896224,3896870,0.5214,0.603726315789474},
-{2971647,3902958,3903655,0.362325,0.362325},
-{2971700,3877167,3877134,0.0698647058823529,0.0819103448275862},
-{2971701,3875859,3876276,1000000,1000000},
-{2971702,3876498,3876276,1000000,0.4071375},
-{2971703,3878393,3878205,0.3527,0.52905},
-{2971704,3878205,3878139,0.135456,0.0967542857142857},
-{2971705,3891563,3891055,1000000,0.455791304347826},
-{2971706,3890416,3890111,0.278634782608696,1000000},
-{2971707,3890731,3890416,0.237511111111111,1000000},
-{2971708,3891885,3891744,0.2146125,0.163514285714286},
-{2971709,3891993,3891885,0.130857142857143,0.152666666666667},
-{2971752,3905120,3905222,0.0639545454545455,0.0639545454545455},
-{2971753,3905222,3904828,0.123795918367347,1000000},
-{2971754,3904739,3905120,0.117482352941176,1000000},
-{2971755,3904828,3904469,0.127353191489362,1000000},
-{2971756,3904739,3904389,1000000,0.113447058823529},
-{2971757,3904066,3903856,0.0754333333333333,1000000},
-{2971758,3903856,3903568,0.10965,1000000},
-{2971759,3903956,3904066,1000000,0.0421714285714286},
-{2971760,3903263,3903956,1000000,0.2246},
-{2971761,3904389,3904469,0.0584,0.0737684210526316},
-{2971762,3901127,3901734,0.282690909090909,0.32168275862069},
-{2971763,3901044,3901127,0.0834,0.0834},
-{2971764,3900592,3901044,0.286325,0.286325},
-{2971765,3901469,3901044,1000000,0.139714285714286},
-{2971766,3901553,3901127,0.158609302325581,1000000},
-{2971767,3901884,3901553,0.113934782608696,1000000},
-{2971768,3901803,3901469,1000000,0.102864},
-{2971769,3902609,3902705,0.0452068965517241,0.0422903225806452},
-{2971770,3902705,3903356,0.224822727272727,0.32974},
-{2971771,3902864,3902705,0.16568,1000000},
-{2971772,3901729,3902609,0.357793548387097,0.264085714285714},
-{2971773,3903126,3902309,0.367870588235294,0.360796153846154},
-{2971774,3902983,3903131,0.0738612244897959,0.0861714285714286},
-{2971775,3902838,3902883,1000000,0.0945391304347826},
-{2971776,3902759,3902779,1000000,0.045},
-{2971777,3902759,3903007,1000000,0.0728166666666667},
-{2971778,3902934,3903554,0.128475,1000000},
-{2971779,3902779,3902789,1000000,0.0387},
-{2971780,3902618,3902789,0.0375294117647059,1000000},
-{2971781,3902377,3902275,1000000,0.0555391304347826},
-{2971782,3902538,3902709,0.0769135135135135,1000000},
-{2971783,3902259,3902495,1000000,0.25872},
-{2971784,3902693,3902759,1000000,0.0215351351351351},
-{2971785,3902200,3902375,1000000,0.0454307692307692},
-{2971786,3902036,3902011,0.0202636363636364,0.018575},
-{2971787,3902155,3901497,0.307032558139535,0.322009756097561},
-{2971788,3902709,3903012,0.0917217391304348,0.10548},
-{2971789,3902259,3902155,0.0730137931034483,0.151242857142857},
-{2971843,3916715,3916494,0.205666666666667,0.1156875},
-{2971844,3917207,3916715,0.231558139534884,0.211851063829787},
-{2971845,3916715,3917009,0.14895,0.226971428571429},
-{2971925,3915237,3915513,0.0878533333333333,1000000},
-{2971952,3908476,3908282,1000000,0.0339396226415094},
-{2971953,3907555,3907523,0.00996734693877551,0.00996734693877551},
-{2971954,3907130,3907355,0.10038,1000000},
-{2971955,3907280,3907355,0.0259161290322581,1000000},
-{2971956,3907523,3907480,0.0134204081632653,0.0134204081632653},
-{2971957,3907355,3907480,0.0398478260869565,1000000},
-{2971958,3907480,3908282,0.2286,1000000},
-{2971959,3906104,3907130,0.621575,1000000},
-{2971960,3906104,3906392,1000000,0.206972727272727},
-{2971961,3908168,3907186,0.515007692307692,0.535608},
-{2971962,3908585,3908975,0.201066666666667,0.201066666666667},
-{2971963,3903382,3903567,0.04815,1000000},
-{2971970,3907573,3907555,0.006564,0.00669795918367347},
-{2971993,3860753,3860659,0.0585,0.0615789473684211},
-{2971994,3860672,3860753,0.1704375,0.165272727272727},
-{2971995,3861460,3860753,0.223614285714286,0.240815384615385},
-{2971998,3862763,3862481,0.154535294117647,0.1946},
-{2971999,3862481,3862004,0.218268292682927,0.213071428571429},
-{2972000,3862004,3861925,0.0350634146341463,0.0350634146341463},
-{2972001,3861925,3861658,0.132409090909091,0.135488372093023},
-{2972002,3861658,3861452,0.0976695652173913,0.109580487804878},
-{2972003,3861452,3861214,0.1335,0.140526315789474},
-{2972004,3860238,3859753,0.361885714285714,0.4222},
-{2972005,3859897,3859753,1000000,1000000},
-{2972006,3861437,3861596,0.14424,0.200333333333333},
-{2972007,3860367,3861016,0.598581818181818,0.65844},
-{2972008,3864709,3864660,0.0733714285714286,0.0642},
-{2972009,3864709,3864570,0.0718285714285714,0.0655826086956522},
-{2972010,3864845,3864709,0.245311111111111,0.245311111111111},
-{2972011,3865078,3864840,0.165884210526316,0.143263636363636},
-{2972012,3865779,3865078,0.312,0.300444444444444},
-{2972013,3864840,3864453,0.198457142857143,0.198457142857143},
-{2972014,3864453,3863618,0.369921428571429,0.414312},
-{2972015,3863923,3863490,0.36672,0.293376},
-{2972016,3864018,3863923,0.0621230769230769,0.0769142857142857},
-{2972017,3866247,3866068,1000000,0.1356},
-{2972018,3867564,3866247,1000000,0.324404651162791},
-{2972019,3865571,3865403,0.110147368421053,0.0721655172413793},
-{2972020,3873006,3873042,0.0838714285714286,0.0690705882352941},
-{2972021,3871357,3871291,0.0524454545454545,0.104890909090909},
-{2972022,3873042,3871357,0.374347826086956,1000000},
-{2972023,3871049,3870978,0.09465,0.059778947368421},
-{2972024,3871539,3871049,0.26028,0.209903225806452},
-{2972025,3871357,3871049,0.0795073170731707,1000000},
-{2972026,3871049,3870377,0.157787234042553,1000000},
-{2972027,3869094,3869052,0.06246,0.0543130434782609},
-{2972028,3869094,3869421,1000000,0.3552},
-{2972029,3869740,3869094,0.14129387755102,1000000},
-{2972030,3868258,3867890,0.355666666666667,0.177833333333333},
-{2972031,3867604,3867564,0.0715125,0.05721},
-{2972032,3869094,3867890,0.498444444444444,1000000},
-{2972033,3868098,3868549,1000000,0.298968},
-{2972034,3866077,3866283,0.0842072727272727,1000000},
-{2972035,3866077,3866009,1000000,0.0485052631578947},
-{2972036,3866140,3866037,0.0349531914893617,1000000},
-{2972037,3865571,3866077,0.241934693877551,1000000},
-{2972038,3864879,3864710,0.0905225806451613,1000000},
-{2972039,3864901,3864879,0.00946285714285714,1000000},
-{2972040,3864362,3863590,0.277185714285714,0.258706666666667},
-{2972041,3863590,3862967,0.247214285714286,0.225717391304348},
-{2972042,3865213,3865275,0.0923,1000000},
-{2972043,3865430,3865458,1000000,0.121728571428571},
-{2972044,3865790,3865458,1000000,0.219230769230769},
-{2972045,3865283,3865430,0.0632086956521739,0.0765157894736842},
-{2972046,3866766,3866646,1000000,0.0235411764705882},
-{2972047,3867195,3866766,1000000,0.087684},
-{2972048,3865766,3865536,0.12,1000000},
-{2972049,3865488,3865489,1000000,0.0196266666666667},
-{2972050,3865489,3865441,0.0233785714285714,1000000},
-{2972051,3865441,3865488,0.0326926829268293,1000000},
-{2972052,3865441,3865355,0.0334181818181818,1000000},
-{2972053,3865392,3865441,0.0291538461538461,1000000},
-{2972054,3865392,3865355,1000000,0.024192},
-{2972055,3865251,3865260,1000000,0.02145},
-{2972056,3865458,3865471,1000000,0.122413043478261},
-{2972057,3865038,3865000,1000000,0.020825},
-{2972058,3865370,3865848,0.336906382978723,1000000},
-{2972059,3866068,3866017,0.117808695652174,1000000},
-{2972060,3866017,3866037,0.0583235294117647,1000000},
-{2972061,3866017,3865848,1000000,0.0970457142857143},
-{2972062,3865233,3865571,0.20525,1000000},
-{2972063,3865496,3865500,0.0739411764705882,1000000},
-{2972064,3866009,3866161,1000000,0.0577854545454545},
-{2972065,3872036,3871765,0.366533333333333,1000000},
-{2972066,3870472,3870087,0.3682,1000000},
-{2972067,3870670,3870472,0.191875,1000000},
-{2972068,3871216,3870670,0.209353846153846,1000000},
-{2972069,3870910,3870670,0.263825,1000000},
-{2972075,3865598,3865599,0.258707142857143,1000000},
-{2972077,3865250,3864958,0.11442,1000000},
-{2972078,3864958,3864916,0.202181818181818,1000000},
-{2972081,3879946,3879728,1000000,0.30852},
-{2972082,3880394,3880156,1000000,0.287475},
-{2972083,3882112,3881773,0.385552941176471,1000000},
-{2972084,3882276,3882112,0.168494117647059,1000000},
-{2972085,3881384,3881773,0.279663157894737,1000000},
-{2972086,3879502,3880268,1000000,0.687714285714286},
-{2972087,3879753,3880500,0.589775,1000000},
-{2972088,3880948,3881255,0.210857142857143,1000000},
-{2972089,3883672,3882939,0.586114285714286,1000000},
-{2972090,3879924,3880172,0.3645,0.3402},
-{2972091,3883824,3883635,1000000,0.12458},
-{2972092,3882955,3882570,0.393126315789474,1000000},
-{2972093,3884737,3884451,0.195066666666667,1000000},
-{2972094,3884737,3884878,0.07278,0.0661636363636364},
-{2972095,3884451,3884573,0.28269,1000000},
-{2972096,3884573,3884890,0.197576470588235,0.152672727272727},
-{2972097,3883842,3884573,1000000,0.359217391304348},
-{2972098,3883420,3883842,1000000,0.2676},
-{2972099,3883678,3883842,1000000,1000000},
-{2972100,3883842,3884121,1000000,0.539533333333333},
-{2972101,3882164,3882889,1000000,0.384428571428571},
-{2972102,3884017,3884137,1000000,1.01656666666667},
-{2972103,3885051,3885457,1000000,0.210094736842105},
-{2972104,3885171,3885319,0.297317647058824,1000000},
-{2972105,3881236,3881845,0.468866666666667,1000000},
-{2972106,3880520,3880732,0.420225,1000000},
-{2972107,3880732,3880815,0.2064,1000000},
-{2972108,3880815,3881276,1000000,1000000},
-{2972109,3880603,3880815,0.287169230769231,1000000},
-{2972110,3880088,3880923,1000000,0.73584705882353},
-{2972111,3880790,3880923,1000000,0.25836},
-{2972112,3880617,3880790,0.335233333333333,1000000},
-{2972113,3880208,3880790,1000000,0.464433333333333},
-{2972114,3876008,3876763,0.507,1000000},
-{2972115,3876763,3877254,1000000,0.285233333333333},
-{2972116,3877254,3877523,1000000,0.1377},
-{2972117,3877425,3877897,1000000,1000000},
-{2972118,3877918,3877897,0.0552,1000000},
-{2972119,3878367,3877918,1000000,1000000},
-{2972120,3878405,3878367,1000000,1000000},
-{2972121,3878488,3878405,1000000,1000000},
-{2972122,3879049,3878405,1000000,1000000},
-{2972123,3877875,3878332,1000000,1000000},
-{2972124,3878367,3878332,1000000,1000000},
-{2972125,3878332,3878313,1000000,1000000},
-{2972126,3877897,3877875,0.05577,1000000},
-{2972127,3878313,3878213,1000000,1000000},
-{2972128,3878213,3878154,0.2403,1000000},
-{2972129,3878154,3878122,0.106736842105263,1000000},
-{2972130,3877672,3877645,0.118623529411765,0.106136842105263},
-{2972131,3875054,3875389,0.229733333333333,1000000},
-{2972132,3875389,3876319,0.391776923076923,1000000},
-{2972133,3874982,3875326,0.2536125,1000000},
-{2972134,3875326,3875614,0.130344,1000000},
-{2972135,3875614,3876239,0.320809090909091,1000000},
-{2972136,3877009,3877219,1000000,1000000},
-{2972137,3877273,3877219,1000000,1000000},
-{2972138,3876973,3876821,1000000,1000000},
-{2972139,3876137,3876345,0.102495652173913,1000000},
-{2972140,3876345,3876398,0.100675,1000000},
-{2972141,3878237,3878166,0.229228571428571,1000000},
-{2972142,3878166,3878115,0.1377,1000000},
-{2972143,3878115,3878088,0.0712,1000000},
-{2972144,3877988,3877964,0.105624,1000000},
-{2972145,3877273,3877491,1000000,1000000},
-{2972146,3877203,3877332,1000000,1000000},
-{2972147,3877332,3877782,0.536953846153846,0.536953846153846},
-{2972148,3878714,3878626,1000000,0.32232},
-{2972149,3878626,3878526,1000000,0.432144},
-{2972150,3878626,3879110,1000000,0.2622},
-{2972151,3878115,3878626,1000000,0.301231578947368},
-{2972152,3875315,3874960,1000000,1000000},
-{2972153,3878526,3878473,1000000,0.2578},
-{2972154,3878473,3878444,1000000,0.275133333333333},
-{2972155,3877964,3877962,0.0182869565217391,1000000},
-{2972156,3877906,3877854,0.2768,1000000},
-{2972157,3876735,3877326,1000000,0.31068},
-{2972158,3878444,3878565,0.4068,1000000},
-{2972159,3877488,3878102,0.292142857142857,1000000},
-{2972160,3878102,3878565,0.312282352941176,1000000},
-{2972161,3878102,3878224,0.244565217391304,1000000},
-{2972162,3878565,3878672,0.2514,1000000},
-{2972163,3878224,3878672,1000000,0.227817391304348},
-{2972164,3877616,3878224,1000000,0.268617391304348},
-{2972165,3878224,3878316,0.330141176470588,1000000},
-{2972166,3877719,3878316,1000000,0.3081},
-{2972167,3877110,3877719,0.30663,1000000},
-{2972168,3875236,3875266,0.177369230769231,0.15372},
-{2972169,3875264,3875236,0.0188,0.0171652173913043},
-{2972170,3876048,3876150,0.220416,1000000},
-{2972171,3875748,3876150,0.305475,1000000},
-{2972172,3876150,3876284,0.266571428571429,1000000},
-{2972173,3875848,3876284,0.302223529411765,0.285433333333333},
-{2972174,3876284,3877110,0.44136,1000000},
-{2972175,3877376,3877649,0.27141,1000000},
-{2972176,3877649,3877863,0.2268,1000000},
-{2972177,3877863,3878037,0.1698,1000000},
-{2972178,3878037,3878069,0.023925,1000000},
-{2972179,3878069,3878206,0.147628571428571,1000000},
-{2972180,3878206,3878519,0.373854545454545,1000000},
-{2972181,3878519,3878781,0.331171428571429,1000000},
-{2972182,3878794,3878630,1000000,0.103828571428571},
-{2972183,3879056,3878794,1000000,0.146452173913043},
-{2972184,3879056,3879331,0.43776,1000000},
-{2972185,3879331,3879713,0.469460869565217,1000000},
-{2972186,3879713,3879953,0.366285714285714,1000000},
-{2972187,3879953,3880209,0.391685714285714,1000000},
-{2972191,3861701,3862257,0.9265875,0.98836},
-{2972192,3862257,3862116,0.228,0.2394},
-{2972193,3864958,3863773,0.4834,1000000},
-{2972204,3859627,3859655,0.186,0.186},
-{2972205,3859234,3859084,0.0822,0.092064},
-{2972206,3860082,3859234,0.364836363636364,0.325394594594595},
-{2972207,3860259,3860082,0.0942222222222222,0.0795},
-{2972208,3860566,3860259,0.140032258064516,0.124028571428571},
-{2972209,3861313,3860566,0.367986206896552,0.313870588235294},
-{2972210,3861313,3861527,0.218318181818182,0.200125},
-{2972211,3861214,3860853,0.208235294117647,0.214545454545455},
-{2972212,3862165,3862319,0.11574,0.1286},
-{2972213,3862319,3862127,0.176053846153846,0.14304375},
-{2972214,3861530,3861687,0.130963636363636,0.151642105263158},
-{2972215,3861687,3861733,0.0372260869565217,0.0305785714285714},
-{2972216,3861733,3861886,0.107947826086957,0.08276},
-{2972217,3861941,3861886,1000000,0.478344},
-{2972218,3861964,3861941,1000000,0.16233},
-{2972219,3873650,3873607,0.5139,0.41754375},
-{2972220,3873607,3873576,0.60284347826087,0.60284347826087},
-{2972221,3858664,3859014,0.0976142857142857,1000000},
-{2972222,3859014,3859469,0.0959529411764706,1000000},
-{2972223,3858558,3858529,0.0499672131147541,0.0491612903225806},
-{2972224,3858034,3858558,0.102537931034483,0.092925},
-{2972225,3858558,3859083,0.085040625,0.0877838709677419},
-{2972226,3859083,3859469,0.0626861538461538,0.0646761904761905},
-{2972227,3899877,3900393,1000000,0.270444444444444},
-{2972228,3899211,3899877,1000000,0.405384},
-{2972231,3896857,3897620,0.333204545454545,0.396243243243243},
-{2972232,3896239,3896857,0.32784,0.312228571428571},
-{2972233,3917912,3917987,0.03805,0.0358117647058824},
-{2972234,3917987,3918014,0.012432,0.0117283018867925},
-{2972235,3917310,3917578,1000000,0.152025},
-{2972236,3917936,3918853,0.275605263157895,0.299228571428571},
-{2972237,3917789,3917936,0.0520064516129032,0.067175},
-{2972238,3917655,3917789,0.0554275862068965,0.0945529411764706},
-{2972239,3914275,3915173,0.2762,0.239373333333333},
-{2972240,3911802,3914275,0.418221818181818,0.425966666666667},
-{2972241,3911713,3911802,0.12,0.0914285714285714},
-{2972242,3911022,3911802,0.152672727272727,0.158433962264151},
-{2972243,3910510,3911022,0.11064,0.0905236363636364},
-{2972244,3909963,3910510,0.0943058823529412,0.0981551020408163},
-{2972259,3864126,3864411,1000000,0.333485714285714},
-{2972260,3864023,3864973,1000000,0.583591304347826},
-{2972261,3864663,3864943,1000000,0.22791},
-{2972262,3864616,3864663,1000000,0.0402857142857143},
-{2972263,3864380,3864616,1000000,0.2375},
-{2972264,3868350,3868448,0.152815384615385,0.0946},
-{2972265,3868828,3868448,0.2029,1000000},
-{2972266,3869123,3868828,0.22353,1000000},
-{2972300,3902629,3903976,0.511184210526316,0.669827586206897},
-{2972301,3904075,3903976,0.0577,0.0665769230769231},
-{2972302,3901347,3900961,0.155276470588235,0.14665},
-{2972303,3901863,3901347,0.170578378378378,0.161830769230769},
-{2972304,3902119,3901863,0.0879096774193548,0.0757},
-{2972305,3902356,3902119,0.0870827586206896,0.0765272727272727},
-{2972306,3902450,3902356,0.0630642857142857,0.05886},
-{2972307,3902778,3902450,0.159724137931035,0.1544},
-{2972308,3902965,3902778,0.0834214285714286,0.0865111111111111},
-{2972309,3903199,3902965,0.0930685714285714,0.0987090909090909},
-{2972310,3903601,3903199,0.157988571428571,0.162635294117647},
-{2972311,3903709,3903601,0.0521636363636364,0.05379375},
-{2972351,3858657,3858556,0.0575142857142857,0.0555310344827586},
-{2972352,3860393,3858657,0.843085714285714,0.814013793103448},
-{2972353,3858390,3858657,0.243511111111111,0.243511111111111},
-{2972354,3858217,3858390,0.184928571428571,0.184928571428571},
-{2972355,3852856,3852040,0.323006896551724,0.346933333333333},
-{2972361,3855570,3855947,0.207805714285714,0.23461935483871},
-{2972362,3855511,3855570,0.0692363636363636,0.07616},
-{2972363,3855570,3855278,1000000,0.145852173913043},
-{2972364,3855511,3855278,0.0990428571428571,1000000},
-{2972365,3855278,3854623,0.340737931034483,0.30879375},
-{2972366,3858317,3858787,0.329165217391304,1000000},
-{2972367,3856857,3857202,0.154683870967742,0.171257142857143},
-{2972368,3857202,3857394,0.0893111111111111,0.083151724137931},
-{2972369,3857394,3857832,0.286745454545455,0.274278260869565},
-{2972370,3857832,3858531,0.473181818181818,0.547894736842105},
-{2972371,3861509,3861019,0.3502,0.306425},
-{2972372,3861019,3860520,0.265872,0.214412903225806},
-{2972373,3860888,3860990,0.08735,0.10482},
-{2972374,3860520,3860888,0.3012,0.28865},
-{2972375,3860520,3859759,0.369154838709677,0.309291891891892},
-{2972376,3859759,3859689,0.1088,0.1088},
-{2972377,3859522,3859759,0.135923076923077,0.135923076923077},
-{2972378,3859522,3859689,0.100610526315789,0.0831130434782609},
-{2972379,3858843,3859522,0.72936,0.792782608695652},
-{2972380,3859689,3858659,0.80235652173913,0.768925},
-{2972381,3858659,3858531,0.0822,0.0786260869565217},
-{2972382,3859689,3860063,0.2764,0.287030769230769},
-{2972383,3857082,3856798,0.20778,0.17315},
-{2972384,3857394,3857082,0.201228571428571,0.192081818181818},
-{2972385,3857727,3857394,0.1961,0.23532},
-{2972386,3857974,3857727,0.1572,0.190294736842105},
-{2972387,3858787,3857974,0.54404347826087,1000000},
-{2972394,3852335,3852426,0.09784,0.09784},
-{2972395,3852426,3853418,0.49586,0.619825},
-{2972396,3853418,3853717,0.2375,0.219230769230769},
-{2972397,3855491,3855537,0.0459230769230769,0.0459230769230769},
-{2972398,3855537,3856684,0.683875,1000000},
-{2972399,3855491,3855180,0.49092,1000000},
-{2972400,3855208,3854897,0.2755875,1000000},
-{2972401,3854897,3854467,0.323842105263158,1000000},
-{2972402,3855180,3855091,1000000,0.149057142857143},
-{2972403,3855208,3856228,1000000,0.744490909090909},
-{2972404,3854785,3854897,0.0692222222222222,0.0692222222222222},
-{2972405,3854897,3855944,0.699336,1000000},
-{2972406,3854299,3854467,1000000,0.19696},
-{2972407,3854467,3855705,1000000,0.579264705882353},
-{2972408,3857043,3856684,0.115426666666667,0.120795348837209},
-{2972409,3855705,3856329,1000000,0.34565},
-{2972410,3856329,3856676,1000000,0.204244444444444},
-{2972411,3856676,3856059,0.3279,0.39348},
-{2972412,3856059,3855547,0.265523076923077,0.276144},
-{2972413,3855134,3854524,0.29312,0.283664516129032},
-{2972414,3854524,3853797,0.347335714285714,0.374053846153846},
-{2972428,3858531,3857906,0.434428571428571,0.414681818181818},
-{2972429,3857994,3856899,1000000,0.764618181818182},
-{2972430,3856899,3856756,1000000,0.1059},
-{2972431,3862124,3862722,0.464657142857143,0.5421},
-{2972432,3862722,3862988,0.267821052631579,0.22124347826087},
-{2972433,3864110,3863132,0.498528,1000000},
-{2972434,3863132,3862506,0.302488888888889,1000000},
-{2972435,3862506,3861321,0.818742857142857,1000000},
-{2972436,3861321,3860863,1000000,0.397453846153846},
-{2972437,3864122,3862899,1000000,0.537744827586207},
-{2972438,3862899,3862152,1000000,0.269290909090909},
-{2972439,3862152,3861682,1000000,0.272765217391304},
-{2972440,3861682,3860805,1000000,0.662428571428571},
-{2972441,3860987,3860805,0.30266,0.313096551724138},
-{2972442,3860805,3860443,0.220779310344828,0.237133333333333},
-{2972443,3866360,3864963,1000000,0.866355555555556},
-{2972451,3864913,3865169,0.249766666666667,0.249766666666667},
-{2972452,3865479,3865598,0.30176,0.266258823529412},
-{2972462,3863773,3863680,1000000,0.287660869565217},
-{2972572,3859948,3859869,1000000,1000000},
-{2972573,3860081,3860611,0.344488888888889,0.372048},
-{2972574,3857537,3856564,1000000,1000000},
-{2972575,3857938,3857537,1000000,1000000},
-{2972576,3857003,3855686,0.5046,0.523288888888889},
-{2972577,3855807,3855686,0.396031578947368,0.32715652173913},
-{2972578,3855487,3854916,0.195565714285714,0.195565714285714},
-{2972579,3854916,3854586,0.117070588235294,0.13268},
-{2972580,3855686,3855487,0.0749225806451613,0.07742},
-{2972581,3854111,3854267,0.435442105263158,0.55156},
-{2972582,3854046,3854062,0.277448275862069,0.33525},
-{2972583,3854233,3854046,0.1506,0.198792},
-{2972584,3854586,3854233,0.25141875,0.287335714285714},
-{2972585,3854155,3853608,0.241427586206897,0.304408695652174},
-{2972623,3918265,3918514,0.130176923076923,1000000},
-{2972624,3895018,3895146,1000000,0.10192},
-{2972625,3895566,3895308,0.0868363636363636,1000000},
-{2972626,3894631,3894748,0.2673,1000000},
-{2972627,3894906,3895180,0.178924137931034,1000000},
-{2972628,3895103,3895532,0.344838461538462,1000000},
-{2972629,3897312,3897786,0.21534,0.280878260869565},
-{2972631,3895226,3894168,0.766533333333333,0.766533333333333},
-{2972632,3894941,3895024,0.0532137931034483,0.0593538461538461},
-{2972633,3896109,3895336,1000000,0.85875},
-{2972634,3895457,3896109,1000000,0.55602},
-{2972635,3895744,3895536,0.294046153846154,0.131813793103448},
-{2972636,3895882,3895744,0.0764545454545455,0.0764545454545455},
-{2972637,3896226,3895882,0.148133333333333,0.14412972972973},
-{2972638,3896348,3896226,0.0929,0.123866666666667},
-{2972639,3899987,3900403,1000000,0.330485714285714},
-{2972640,3900403,3900779,1000000,0.152260465116279},
-{2972641,3900779,3901362,1000000,0.22659512195122},
-{2972642,3901362,3901947,1000000,0.227655},
-{2972643,3901947,3902607,1000000,0.26125},
-{2972644,3902418,3902708,0.137086956521739,0.137086956521739},
-{2972645,3902708,3903270,0.3286,0.3286},
-{2972646,3902607,3902708,0.0566,0.0566},
-{2972647,3902660,3902958,1000000,0.730885714285714},
-{2972648,3915530,3915700,0.124736842105263,0.131666666666667},
-{2972649,3896965,3897324,1000000,1000000},
-{2972650,3897324,3897576,1000000,1000000},
-{2972651,3897532,3897659,0.12339,0.117514285714286},
-{2972652,3898065,3898862,0.534333333333333,0.424323529411765},
-{2972653,3902737,3902793,0.0973578947368421,1000000},
-{2972654,3902101,3902793,0.288115384615385,0.258310344827586},
-{2972655,3902737,3902876,1000000,0.0871423728813559},
-{2972656,3903090,3902723,0.2521125,0.2521125},
-{2972657,3902793,3903021,0.19608,1000000},
-{2972658,3903655,3903510,0.324969230769231,0.28164},
-{2972659,3902876,3903111,1000000,0.197252631578947},
-{2972660,3903251,3904090,0.401561538461538,1000000},
-{2972670,3885789,3885724,0.445272,1000000},
-{2972671,3892663,3892803,0.07315,0.07315},
-{2972675,3860063,3860259,0.195711111111111,0.220175},
-{2972676,3860990,3861313,0.266376,0.277475},
-{2972677,3857125,3857003,0.3683,1000000},
-{2972678,3853608,3853104,0.312365217391304,0.312365217391304},
-{2972679,3853855,3854267,0.215592857142857,0.194729032258065},
-{2973106,3876803,3878320,0.5195,0.77925},
-{2973107,3875862,3876693,0.6831,0.31878},
-{2973108,3876693,3876803,0.0505636363636364,0.065435294117647},
-{2973109,3876803,3877047,0.2548,1000000},
-{2973110,3876970,3876693,0.314721951219512,1000000},
-{2973111,3876970,3877047,0.0307241379310345,0.0405},
-{2973112,3877047,3877749,0.22678064516129,0.390566666666667},
-{2973113,3874807,3875436,0.301453846153846,0.252832258064516},
-{2973114,3875436,3876121,0.25784,0.297507692307692},
-{2973115,3877749,3878347,0.3642,0.213496551724138},
-{2973116,3878386,3878372,0.0235173913043478,1000000},
-{2973117,3882613,3882636,0.08166,1000000},
-{2973118,3886563,3886659,0.0566,0.0625578947368421},
-{2973119,3888729,3888545,1000000,0.439753846153846},
-{2973120,3888730,3889043,1000000,0.2088},
-{2973121,3888545,3888730,0.044148,0.0817555555555556},
-{2973122,3888730,3890267,0.740192307692308,0.506447368421053},
-{2973123,3889043,3889738,1000000,0.127596610169492},
-{2973124,3889967,3891343,0.482046153846154,0.671421428571429},
-{2973125,3890704,3890774,0.0571548387096774,0.070872},
-{2973126,3889387,3890267,0.594793548387097,0.542311764705882},
-{2973127,3891579,3892152,1000000,0.129932142857143},
-{2973128,3892482,3892497,0.0531545454545454,0.05847},
-{2973129,3894253,3895064,0.453631578947368,0.383066666666667},
-{2973130,3895064,3895137,0.087825,0.0401485714285714},
-{2973131,3887450,3887585,1000000,0.0301542857142857},
-{2973132,3887041,3887179,1000000,0.0542448979591837},
-{2973145,3856534,3855427,0.424785,0.414424390243902},
-{2973146,3856809,3856534,0.117866666666667,0.1326},
-{2973147,3853762,3854135,0.63725,0.566444444444444},
-{2973161,3853762,3853401,0.310664516129032,0.332089655172414},
-{2973165,3875936,3876023,1000000,0.0307384615384615},
-{2973166,3876377,3877058,0.21084,0.204983333333333},
-{2973167,3877058,3877202,1000000,0.0532235294117647},
-{2973168,3877058,3877011,0.203742857142857,1000000},
-{2973169,3877071,3877011,0.0201,1000000},
-{2973170,3877011,3876875,0.211569230769231,1000000},
-{2973171,3877071,3876970,0.2007,1000000},
-{2973172,3876121,3876875,0.448066666666667,0.298711111111111},
-{2973173,3876875,3876970,0.0399652173913043,0.0278545454545455},
-{2973174,3876377,3876121,0.386524137931034,0.533771428571429},
-{2973175,3877859,3877749,1000000,0.550957894736842},
-{2973176,3880625,3880746,1000000,0.0532971428571429},
-{2973177,3882238,3882385,0.0271913043478261,1000000},
-{2973178,3885520,3885679,0.0241217391304348,1000000},
-{2973179,3885551,3885804,1000000,0.0405088235294118},
-{2973180,3882752,3882769,1000000,0.061725},
-{2973181,3882712,3882766,0.0438230769230769,1000000},
-{2973182,3881949,3882116,0.0973081967213115,0.0973081967213115},
-{2973183,3882541,3882613,0.1845625,1000000},
-{2973184,3886761,3886563,0.22395,0.0995333333333333},
-{2973185,3886761,3886875,0.0427371428571429,0.0650347826086956},
-{2973186,3886875,3887774,0.251916279069767,0.27081},
-{2973187,3886659,3886944,0.14455,0.150834782608696},
-{2973188,3886944,3887041,0.0519625,0.0479653846153846},
-{2973189,3887179,3887312,1000000,0.060096},
-{2973190,3887412,3887585,0.117636363636364,1000000},
-{2973191,3887179,3887156,1000000,0.0376928571428571},
-{2973192,3887059,3887002,1000000,0.067875},
-{2973193,3885804,3887134,1000000,0.228363636363636},
-{2973194,3887134,3887239,1000000,0.0166246153846154},
-{2973195,3887156,3887147,1000000,0.01275},
-{2973196,3887147,3887059,1000000,0.0797294117647059},
-{2973197,3887312,3887059,1000000,0.0385457142857143},
-{2973198,3887147,3887235,0.0530553191489362,1000000},
-{2973199,3887002,3887235,0.164025,1000000},
-{2973200,3888856,3889250,0.0731207547169811,1000000},
-{2973201,3889250,3889352,0.0229018867924528,1000000},
-{2973202,3896483,3896401,0.0389785714285714,1000000},
-{2973203,3896192,3896271,0.0456133333333333,1000000},
-{2973204,3896322,3896390,0.0305823529411765,1000000},
-{2973205,3895080,3895892,1000000,0.259848},
-{2973206,3896390,3897968,0.410094117647059,1000000},
-{2973207,3895875,3895811,1000000,0.09564},
-{2973208,3895974,3895986,1000000,0.00512941176470588},
-{2973209,3895986,3896003,1000000,0.01335},
-{2973210,3896003,3896019,1000000,0.0308571428571429},
-{2973211,3896019,3895984,1000000,0.22164},
-{2973212,3895876,3896019,1000000,0.0635379310344828},
-{2973213,3895984,3896091,0.0700736842105263,1000000},
-{2973214,3896091,3896105,0.00842857142857143,1000000},
-{2973215,3896019,3896091,1000000,0.0347357142857143},
-{2973216,3896091,3896148,1000000,0.0240461538461538},
-{2973217,3895371,3895478,0.0740487804878049,1000000},
-{2973218,3895478,3895709,0.1377,1000000},
-{2973297,3859527,3859644,0.137775,0.157457142857143},
-{2973298,3860352,3859644,0.751615384615385,1000000},
-{2973299,3860656,3860494,1000000,1000000},
-{2973354,3851305,3850986,0.290057142857143,0.243648},
-{2973355,3848906,3850839,1.06171111111111,1.06171111111111},
-{2974288,3874713,3874561,0.251089655172414,0.234890322580645},
-{2974339,3853454,3853797,1000000,0.565015384615385},
-{2974351,3856270,3856541,0.27,0.27},
-{2974352,3857402,3857767,0.207688888888889,0.207688888888889},
-{2974353,3855547,3856270,1000000,1000000},
-{2974354,3856059,3856707,0.459738461538462,0.543327272727273},
-{2974355,3858390,3858703,0.162822222222222,0.162822222222222},
-{2974357,3854524,3855019,1000000,1000000},
-{2974489,3851949,3853322,1000000,0.8346},
-{2974490,3851949,3851625,0.406928571428571,1000000},
-{2974491,3852426,3851949,0.333627272727273,0.305825},
-{2974492,3854088,3854524,0.408218181818182,0.44904},
-{2974493,3854566,3855134,1000000,1000000},
-{2974494,3854892,3855066,1000000,0.167285714285714},
-{2974495,3855066,3855125,0.0368903225806452,0.0408428571428571},
-{2974496,3855769,3856059,0.230086956521739,0.278526315789474},
-{2974497,3855301,3855769,0.316721739130435,1000000},
-{2974498,3856377,3856899,0.392025,1000000},
-{2974499,3858538,3857311,0.699276923076923,0.727248},
-{2974500,3859316,3857953,0.547412903225806,0.808085714285714},
-{2974501,3854467,3854095,0.247009090909091,0.201266666666667},
-{2974502,3855865,3857043,1000000,0.525464516129032},
-{2974503,3855865,3855537,0.306,1000000},
-{2974504,3856232,3855865,0.263494736842105,1000000},
-{2974505,3855684,3855865,1000000,0.16604},
-{2974506,3860459,3860322,1000000,0.615965217391304},
-{2974507,3862152,3862506,0.3474,0.3474},
-{2974508,3862238,3862710,0.51728,0.51728},
-{2974509,3863132,3862238,0.6708,1000000},
-{2974512,3867069,3865169,1.34837142857143,1000000},
-{2974513,3867227,3865479,0.914968421052632,0.914968421052632},
-{2974514,3862899,3863132,1000000,0.537388235294118},
-{2974516,3866457,3867344,0.56202,1000000},
-{2974522,3868981,3867998,0.295863157894737,0.3513375},
-{2974523,3869488,3868981,0.229092857142857,0.246715384615385},
-{2974540,3879377,3879823,1000000,0.289057142857143},
-{2974551,3879823,3880224,1000000,0.286314285714286},
-{2974552,3881159,3880279,0.443952,1000000},
-{2974555,3882167,3882624,0.3804,0.336507692307692},
-{2974568,3852082,3851485,0.163507692307692,0.172345945945946},
-{2974569,3852293,3852082,1000000,1000000},
-{2974570,3853172,3852082,0.321483333333333,0.340394117647059},
-{2974571,3853556,3852966,0.5647875,1000000},
-{2974572,3853556,3853317,1000000,0.170828571428571},
-{2974573,3853317,3852944,0.290869565217391,1000000},
-{2974574,3853947,3853317,0.314657142857143,1000000},
-{2974575,3852082,3851986,1000000,1000000},
-{2974576,3854353,3853947,0.21888,1000000},
-{2974577,3854353,3854007,0.271577777777778,0.271577777777778},
-{2974578,3857082,3857529,0.257712,0.3068},
-{2974579,3856911,3857082,0.0940153846153846,0.111109090909091},
-{2974580,3856593,3856911,0.161834482758621,0.213327272727273},
-{2974581,3856593,3856271,0.195027272727273,0.195027272727273},
-{2974582,3856857,3856593,0.199857142857143,0.2798},
-{2974583,3856911,3857202,0.154,0.154},
-{2974584,3857727,3858161,0.32184,0.32184},
-{2974585,3857974,3858404,0.300913043478261,0.27684},
-{2974586,3857476,3856857,0.336876923076923,0.58392},
-{2974587,3857476,3857974,0.2763,0.2763},
-{2974588,3860082,3860698,1000000,0.621757894736842},
-{2974589,3858659,3859234,1000000,0.430433333333333},
-{2974590,3861273,3861926,0.456911111111111,0.474484615384615},
-{2974591,3862219,3862536,1000000,1000000},
-{2974592,3862060,3862219,0.126222222222222,0.148173913043478},
-{2974593,3860566,3861064,0.45729,0.5716125},
-{2974594,3860990,3860063,0.518355555555556,0.518355555555556},
-{2974595,3861639,3862385,0.49395,0.515426086956522},
-{2974596,3862703,3862219,0.23451724137931,0.2267},
-{2974597,3862385,3862703,0.283733333333333,0.283733333333333},
-{2974598,3858933,3858497,0.240844444444444,0.240844444444444},
-{2974599,3863836,3862713,1000000,0.607464},
-{2974600,3865191,3863851,1000000,1000000},
-{2974601,3863237,3862703,0.264411428571429,0.2892},
-{2974602,3864481,3863237,1.23873333333333,1.23873333333333},
-{2974603,3866365,3865892,0.371575,1000000},
-{2974604,3865268,3865892,0.261244444444444,0.261244444444444},
-{2974605,3868778,3868346,0.134818181818182,0.261705882352941},
-{2974606,3868949,3868778,0.0582387096774194,0.078495652173913},
-{2974607,3867537,3867018,0.225432,0.296621052631579},
-{2974608,3867243,3867537,1000000,0.610157142857143},
-{2974609,3868346,3867537,0.225324324324324,0.347375},
-{2974610,3867939,3868346,0.533566666666667,1000000},
-{2974611,3868883,3868981,0.350685714285714,0.283246153846154},
-{2974612,3868778,3868883,0.25655,0.30786},
-{2974613,3869823,3869488,1.01558823529412,0.784772727272727},
-{2974614,3869457,3869823,0.233861538461538,0.217157142857143},
-{2974615,3869323,3869939,0.229511111111111,0.229511111111111},
-{2974616,3870342,3870448,0.194888888888889,0.194888888888889},
-{2974617,3868265,3868695,0.32385,1000000},
-{2974618,3867531,3867839,0.203084210526316,0.175390909090909},
-{2974619,3868967,3868265,1000000,0.500433333333333},
-{2974620,3868967,3869332,1000000,0.236088},
-{2974621,3868174,3867903,0.53652,0.53652},
-{2974622,3867903,3867839,0.0388909090909091,1000000},
-{2974623,3868585,3867903,0.366260869565217,1000000},
-{2974624,3871420,3870832,0.336,0.248347826086957},
-{2974625,3871867,3871420,0.13506,0.192942857142857},
-{2974626,3871867,3871697,0.387666666666667,0.4652},
-{2974627,3871687,3872273,1.0448,1000000},
-{2974628,3871985,3871421,0.442636363636364,0.442636363636364},
-{2974629,3872053,3872166,0.0543142857142857,1000000},
-{2974630,3871697,3872078,0.183733333333333,1000000},
-{2974631,3878285,3877742,0.3528,1000000},
-{2974632,3877972,3877428,1000000,0.38204},
-{2974633,3876990,3877492,1000000,1000000},
-{2974634,3877665,3877137,1000000,0.28728},
-{2974635,3878931,3878445,1000000,0.4308},
-{2974636,3879476,3878960,0.3749625,1000000},
-{2974637,3877249,3876741,0.3262,1000000},
-{2974638,3877649,3877249,1000000,0.207947368421053},
-{2974639,3878067,3877649,1000000,0.245431578947368},
-{2974640,3877864,3877564,0.20475,1000000},
-{2974641,3878167,3877864,0.167715789473684,1000000},
-{2974642,3883888,3883123,0.507525,0.641084210526316},
-{2974643,3881459,3881905,0.340844444444444,0.340844444444444},
-{2974644,3883331,3883182,0.0962444444444445,0.0962444444444445},
-{2974645,3877610,3877864,1000000,1000000},
-{2974646,3878794,3879030,0.472028571428571,1000000},
-{2974656,3851390,3849629,0.665735294117647,0.7545},
-{2974657,3851986,3851753,1000000,1000000},
-{2974658,3853003,3851986,0.363103448275862,0.2925},
-{2974659,3851753,3851390,0.143733333333333,0.149261538461538},
-{2974660,3852696,3851753,0.293245714285714,0.366557142857143},
-{2974661,3851092,3851935,0.544942857142857,0.602305263157895},
-{2974662,3853171,3852711,1000000,1000000},
-{2974663,3853476,3853003,0.50068,0.50068},
-{2974665,3854483,3854578,0.14847,0.114207692307692},
-{2974666,3854483,3854680,0.617475,0.617475},
-{2974667,3854322,3854483,0.136130769230769,0.11798},
-{2974668,3854097,3854322,0.499745454545455,0.499745454545455},
-{2974669,3854680,3854322,0.205707692307692,0.205707692307692},
-{2974670,3855025,3854680,0.154741935483871,0.208565217391304},
-{2974671,3854680,3854190,0.308,0.308},
-{2974672,3854316,3853721,0.290955555555556,0.290955555555556},
-{2974673,3856553,3856041,0.474771428571429,0.398808},
-{2974674,3858675,3858773,1000000,0.136090909090909},
-{2974675,3859781,3860470,0.67856,0.67856},
-{2974676,3861704,3860888,1.68915,1.50146666666667},
-{2974677,3860470,3860587,0.3329,0.3329},
-{2974678,3858317,3857476,0.5788,1000000},
-{2974679,3862722,3861992,0.513286956521739,0.621347368421053},
-{2974680,3859774,3859913,0.1346,0.1346},
-{2974681,3861790,3861459,0.278463157894737,0.278463157894737},
-{2974682,3859735,3859276,0.260973913043478,0.272836363636364},
-{2974683,3860081,3859735,0.186,0.193153846153846},
-{2974684,3865670,3865959,1000000,0.2959875},
-{2974685,3865725,3865670,0.0208714285714286,0.023376},
-{2974686,3864663,3864126,1000000,0.338314285714286},
-{2974687,3864616,3864887,0.264388235294118,1000000},
-{2974688,3865364,3864887,1000000,1000000},
-{2974689,3864887,3864576,0.3366,1000000},
-{2974690,3865626,3865872,0.20889,1000000},
-{2974691,3866168,3866359,1000000,1000000},
-{2974692,3865974,3866168,0.112777777777778,0.112777777777778},
-{2974693,3866168,3866323,0.0642888888888889,0.0642888888888889},
-{2974694,3867065,3867228,0.2254,1000000},
-{2974695,3866916,3867065,0.194542857142857,0.226966666666667},
-{2974696,3867228,3867563,0.450654545454545,1000000},
-{2974697,3867772,3867065,0.524014285714286,1000000},
-{2974698,3868053,3868552,0.374086956521739,0.374086956521739},
-{2974699,3867772,3867846,1000000,0.234066666666667},
-{2974700,3867929,3867861,0.1955,1000000},
-{2974701,3867993,3867929,0.195114285714286,1000000},
-{2974702,3867584,3867494,0.101822222222222,0.101822222222222},
-{2974703,3867929,3868544,0.216844444444444,0.216844444444444},
-{2974704,3869625,3869451,1000000,0.690847058823529},
-{2974705,3870701,3870108,1000000,0.26967},
-{2974706,3870691,3870061,0.2412,0.275657142857143},
-{2974707,3869412,3869625,1000000,0.261545454545455},
-{2974708,3869412,3868791,1000000,1000000},
-{2974709,3872184,3872078,0.302256,1000000},
-{2974710,3872184,3871867,0.111792,1000000},
-{2974711,3872184,3872466,1000000,0.1026},
-{2974712,3871315,3871318,0.2861625,0.327042857142857},
-{2974713,3870451,3871315,0.351026086956522,0.351026086956522},
-{2974714,3871861,3871315,0.183377777777778,0.183377777777778},
-{2974715,3872459,3872010,1000000,0.181252173913043},
-{2974716,3871350,3870701,1000000,0.291485714285714},
-{2974717,3872052,3871350,1000000,0.37965},
-{2974718,3872455,3872045,1000000,0.2475},
-{2974719,3871356,3870698,0.30639,0.30639},
-{2974720,3870630,3870691,1000000,0.42861},
-{2974721,3871356,3871350,0.299571428571429,0.273521739130435},
-{2974722,3872064,3871356,1000000,0.320684210526316},
-{2974723,3872453,3872064,0.235275,0.209133333333333},
-{2974724,3872044,3872458,1000000,0.2452125},
-{2974725,3867881,3867993,0.352371428571429,1000000},
-{2974726,3868976,3869127,0.227684210526316,1000000},
-{2974727,3871344,3871356,0.172125,0.12909375},
-{2974728,3871338,3871344,0.192623076923077,0.208675},
-{2974729,3871344,3872022,0.29445,0.25604347826087},
-{2974739,3852779,3853023,0.1983,0.180272727272727},
-{2974740,3853023,3852450,1000000,0.47688},
-{2974741,3853590,3852712,1000000,0.543177777777778},
-{2974742,3852450,3853384,0.5235,0.58632},
-{2974743,3853023,3854053,0.8286,0.8286},
-{2974744,3855526,3855641,0.1406,0.1406},
-{2974745,3856268,3856041,0.0886666666666667,0.0886666666666667},
-{2974746,3857332,3857523,0.371057142857143,0.371057142857143},
-{2974747,3853793,3853590,1000000,0.234257142857143},
-{2974748,3855206,3853793,1.1447,1.1447},
-{2974749,3855206,3855520,0.60996,0.4692},
-{2974750,3854740,3855206,1.077525,0.615728571428571},
-{2974751,3857566,3855520,0.959784,1.04324347826087},
-{2974752,3858544,3857566,0.395688888888889,0.323745454545455},
-{2974753,3857090,3857566,0.306321428571429,1000000},
-{2974754,3857090,3855206,0.854066666666667,0.922392},
-{2974755,3855520,3855153,0.160355555555556,0.160355555555556},
-{2974756,3857091,3857332,0.167266666666667,0.167266666666667},
-{2974757,3853376,3853590,1000000,1000000},
-{2974758,3858862,3858544,0.193933333333333,0.218175},
-{2974759,3862732,3861553,0.608329411764706,0.827328},
-{2974760,3859249,3860319,0.619468965517241,0.641592857142857},
-{2974761,3861341,3860993,1000000,1000000},
-{2974762,3858862,3858795,0.409022222222222,0.48015652173913},
-{2974763,3858141,3858795,0.317139130434783,0.36471},
-{2974764,3858795,3859034,0.249314285714286,0.193911111111111},
-{2974765,3859034,3859592,0.2554,0.2554},
-{2974766,3857939,3858948,0.414288888888889,0.414288888888889},
-{2974767,3864346,3863294,0.730266666666667,0.730266666666667},
-{2974768,3862765,3861790,0.537925,0.561313043478261},
-{2974769,3863915,3862765,0.5754,1000000},
-{2974770,3862765,3862517,0.241090909090909,1000000},
-{2974771,3865109,3864258,1000000,0.8295},
-{2974772,3862323,3862149,1000000,0.1392375},
-{2974773,3866913,3865845,0.45825,1000000},
-{2974774,3867433,3866913,0.2616,1000000},
-{2974775,3868086,3868145,1000000,1000000},
-{2974776,3868645,3867433,0.469476923076923,1000000},
-{2974777,3868781,3867452,0.53825,0.561652173913044},
-{2974778,3868229,3867740,0.580615384615385,1000000},
-{2974779,3866368,3865890,1000000,0.26218064516129},
-{2974780,3868976,3868790,0.0695111111111111,0.0695111111111111},
-{2974781,3866998,3867248,1000000,1000000},
-{2974782,3867248,3867513,1000000,1000000},
-{2974783,3867513,3867208,1000000,1000000},
-{2974784,3867592,3867248,1000000,1000000},
-{2974785,3867917,3867513,1000000,1000000},
-{2974786,3867882,3867513,1000000,1000000},
-{2974787,3868237,3868248,1000000,1000000},
-{2974788,3868248,3867917,1000000,1000000},
-{2974789,3868248,3868186,1000000,1000000},
-{2974790,3868210,3867882,1000000,1000000},
-{2974791,3867592,3867389,1000000,1000000},
-{2974792,3868984,3868210,1000000,1000000},
-{2974793,3866933,3866368,1000000,0.317731034482759},
-{2974794,3870421,3870613,1000000,0.328736842105263},
-{2974795,3869258,3868781,0.188616,0.196475},
-{2974796,3869813,3869258,0.216575,0.207912},
-{2974797,3870519,3869813,0.453461538461538,0.436666666666667},
-{2974798,3870815,3870519,0.363408,0.349430769230769},
-{2974799,3868312,3868922,1000000,1000000},
-{2974800,3868922,3869144,1000000,1000000},
-{2974801,3869263,3868689,1000000,1000000},
-{2974802,3869938,3869110,0.382866666666667,0.382866666666667},
-{2974803,3869263,3869426,1000000,1000000},
-{2974804,3868581,3867882,1000000,1000000},
-{2974805,3868984,3868581,1000000,1000000},
-{2974806,3868289,3867592,1000000,1000000},
-{2974807,3868700,3868581,1000000,1000000},
-{2974808,3870815,3871099,0.30189375,0.3578},
-{2974809,3871347,3871322,0.314258823529412,1000000},
-{2974810,3871347,3871386,1000000,0.4584375},
-{2974811,3872489,3871929,1000000,0.3208125},
-{2974812,3869109,3868984,1000000,1000000},
-{2974813,3869263,3869109,1000000,1000000},
-{2974834,3852369,3853384,1.8913875,1.8913875},
-{2974835,3851702,3852369,0.373711111111111,1000000},
-{2974836,3852569,3852369,0.119689655172414,0.119689655172414},
-{2974837,3852898,3852569,0.176464285714286,0.176464285714286},
-{2974838,3852569,3851909,1000000,1000000},
-{2974840,3850940,3850749,0.2248,0.2248},
-{2974842,3850358,3849439,0.281151219512195,1000000},
-{2974843,3851171,3850358,0.40746,0.40746},
-{2974845,3854053,3855222,0.934718181818182,1000000},
-{2974846,3855249,3855222,0.3636,0.390533333333333},
-{2974847,3854238,3854155,0.230688,0.3204},
-{2974848,3855222,3855304,0.2346,0.1938},
-{2974849,3855304,3855686,0.411625,0.411625},
-{2974850,3855367,3855807,0.470806451612903,0.503275862068965},
-{2974851,3857836,3857491,0.162666666666667,0.162666666666667},
-{2974852,3857003,3856818,0.22365,0.22365},
-{2974853,3856818,3856426,0.176844444444444,0.217036363636364},
-{2974854,3854233,3854420,0.0840888888888889,0.0840888888888889},
-{2974855,3854420,3854612,0.117777777777778,0.117777777777778},
-{2974856,3854825,3854916,1000000,1000000},
-{2974857,3854825,3854420,0.201511111111111,0.201511111111111},
-{2974858,3855369,3854825,0.241822222222222,0.241822222222222},
-{2974859,3855369,3855487,1000000,1000000},
-{2974860,3854825,3854937,1000000,1000000},
-{2974861,3854937,3854612,0.153022222222222,0.153022222222222},
-{2974862,3854937,3855369,0.265533333333333,0.265533333333333},
-{2974863,3854937,3855023,1000000,1000000},
-{2974864,3855690,3855626,0.0481333333333333,0.0481333333333333},
-{2974865,3856426,3855690,0.288422222222222,0.288422222222222},
-{2974866,3856389,3855427,1000000,0.347477419354839},
-{2974867,3856823,3856389,1000000,0.151158620689655},
-{2974868,3859002,3857604,0.61485,0.662146153846154},
-{2974869,3858679,3859034,1000000,0.279988235294118},
-{2974870,3859034,3860265,0.606138461538462,0.606138461538462},
-{2974871,3860265,3861168,0.473025,0.454104},
-{2974872,3860458,3861168,0.335555555555556,0.335555555555556},
-{2974873,3860890,3861168,0.435688888888889,0.435688888888889},
-{2974874,3861244,3861168,0.165385714285714,0.185232},
-{2974875,3861315,3860737,0.266355555555556,0.266355555555556},
-{2974876,3861821,3861680,0.160938461538462,0.181930434782609},
-{2974877,3862190,3862002,0.18675,0.18675},
-{2974878,3862149,3862190,1000000,0.405844444444444},
-{2974879,3861568,3861191,0.355608,1000000},
-{2974880,3863055,3862428,0.41256,1000000},
-{2974881,3862785,3862731,0.291020689655172,1000000},
-{2974882,3859824,3859086,0.590928,0.703485714285714},
-{2974883,3861191,3860714,0.449575,1000000},
-{2974884,3861612,3861209,1000000,0.437064},
-{2974885,3863137,3862952,1000000,0.263717647058824},
-{2974886,3865031,3864383,1000000,0.4366125},
-{2974887,3865026,3864145,0.438490909090909,1000000},
-{2974888,3867657,3866933,1000000,0.4048},
-{2974889,3869423,3868700,1000000,1000000},
-{2974890,3868674,3868289,1000000,1000000},
-{2974891,3868674,3868443,1000000,1000000},
-{2974892,3869423,3869695,1000000,1000000},
-{2974893,3869701,3869695,1000000,1000000},
-{2974894,3869586,3869423,1000000,1000000},
-{2974895,3869186,3868674,1000000,1000000},
-{2974896,3869435,3869186,1000000,1000000},
-{2974897,3869844,3869701,1000000,1000000},
-{2974898,3869951,3869844,1000000,1000000},
-{2974899,3870141,3869951,1000000,1000000},
-{2974900,3869653,3869435,1000000,1000000},
-{2974901,3869918,3869653,1000000,1000000},
-{2974902,3870205,3869918,1000000,1000000},
-{2974903,3869844,3869435,1000000,1000000},
-{2974904,3869951,3869653,1000000,1000000},
-{2974905,3869918,3870141,1000000,1000000},
-{2974906,3871015,3870721,0.39558,1000000},
-{2974907,3868995,3868060,0.56721,1000000},
-{2974908,3869221,3868995,0.218682352941176,1000000},
-{2974909,3868995,3868760,0.1968,0.1968},
-{2974910,3869461,3868995,1000000,0.314305263157895},
-{2974911,3871561,3871209,0.235888888888889,0.235888888888889},
-{2974912,3871313,3871414,0.149111111111111,0.149111111111111},
-{2974913,3871570,3871784,1000000,0.41364},
-{2974914,3872118,3871570,0.25038,0.294564705882353},
-{2974915,3872428,3872118,0.15429,0.220414285714286},
-{2974916,3871504,3871570,1000000,0.203633333333333},
-{2974917,3871463,3871504,0.134953846153846,0.08772},
-{2974918,3871829,3871504,1000000,0.2358},
-{2974919,3872231,3872118,0.3414375,1000000},
-{2974920,3872231,3871829,1000000,0.213366666666667},
-{2974921,3872906,3872579,1000000,1000000},
-{2974922,3872447,3872231,0.315388235294118,1000000},
-{2974923,3872771,3872447,0.168529411764706,0.168529411764706},
-{2974924,3871561,3871990,1000000,1000000},
-{2974925,3871660,3871561,1000000,1000000},
-{2974926,3873215,3873446,1000000,0.24372},
-{2974927,3873215,3873486,0.433244444444444,0.433244444444444},
-{2974928,3874329,3874482,0.120525,1000000},
-{2974929,3874482,3874694,0.199227272727273,1000000},
-{2974930,3874694,3874485,0.12003,0.12003},
-{2974931,3874948,3874833,0.11044,0.11044},
-{2974932,3874974,3875207,0.25305,1000000},
-{2974933,3871039,3871568,0.244823076923077,1000000},
-{2974934,3871568,3871461,1000000,1000000},
-{2974935,3871822,3872683,0.40212,0.40212},
-{2974936,3872683,3873819,0.511444444444444,1000000},
-{2974937,3868578,3870250,1000000,0.96351},
-{2974938,3868761,3869260,1000000,0.348808695652174},
-{2974939,3869260,3869800,0.281904,0.281904},
-{2974940,3869800,3870307,0.330314285714286,0.239193103448276},
-{2974941,3870896,3870307,0.23195,1000000},
-{2974942,3870307,3869447,0.393031578947368,1000000},
-{2974943,3867673,3867552,0.0605357142857143,1000000},
-{2974944,3867552,3866777,0.33024,1000000},
-{2974945,3867454,3867464,1000000,0.204033333333333},
-{2974946,3867464,3868321,0.468766666666667,0.468766666666667},
-{2974947,3869260,3868418,0.643421052631579,0.643421052631579},
-{2974948,3867464,3867814,1000000,0.26031},
-{2974949,3868418,3867814,0.3408,0.30672},
-{2974950,3870307,3870579,0.181539130434783,0.189790909090909},
-{2974951,3870579,3871130,0.365976,0.365976},
-{2974952,3870579,3869976,0.513514285714286,0.422894117647059},
-{2974953,3869976,3869483,0.3065,0.324529411764706},
-{2974954,3866421,3865040,0.693694736842105,1000000},
-{2974955,3866421,3866464,0.417514285714286,0.40311724137931},
-{2974956,3866915,3866464,0.156466666666667,0.156466666666667},
-{2974957,3866464,3866474,0.2774,0.24966},
-{2974958,3867117,3866474,0.340010526315789,0.340010526315789},
-{2974959,3864937,3863845,0.527921739130435,1000000},
-{2974960,3864959,3864279,0.336545454545455,1000000},
-{2974961,3863530,3862752,0.7356,0.630514285714286},
-{2974962,3864279,3864404,0.446008695652174,1000000},
-{2974963,3863379,3863050,0.2294,0.2294},
-{2974964,3862088,3861638,0.447825,0.421482352941176},
-{2974965,3862553,3862088,1000000,0.417233333333333},
-{2974966,3862395,3862088,0.324917647058824,1000000},
-{2974967,3862553,3862395,0.114133333333333,1000000},
-{2974968,3862941,3862553,0.316,0.334588235294118},
-{2974969,3864216,3863281,1000000,0.7010625},
-{2974970,3864200,3864216,1000000,0.252857142857143},
-{2974971,3861909,3861655,0.239813793103448,0.278184},
-{2974972,3864499,3864206,1000000,1000000},
-{2974973,3864505,3864499,1000000,1000000},
-{2974974,3864769,3864505,0.30324,0.30324},
-{2974975,3864499,3864769,1000000,1000000},
-{2974976,3858587,3858073,1000000,1000000},
-{2974977,3859086,3858587,0.250714285714286,0.219375},
-{2974978,3860412,3859647,0.424,0.565333333333333},
-{2974979,3861036,3860412,0.326765217391304,0.326765217391304},
-{2974980,3859383,3859086,0.126488888888889,0.148486956521739},
-{2974981,3859953,3859383,0.284225,0.272856},
-{2974982,3859383,3858742,0.612518181818182,0.44918},
-{2974983,3857751,3856687,1000000,0.388821428571429},
-{2974984,3859085,3858959,0.170481818181818,0.2344125},
-{2974985,3858959,3858708,0.315933333333333,0.355425},
-{2974986,3860027,3858959,0.62895,0.62895},
-{2974987,3861655,3860786,0.62454,0.462622222222222},
-{2974988,3857806,3856818,1000000,0.41676},
-{2974989,3857806,3856823,1000000,0.49945},
-{2974990,3854691,3855274,1000000,0.386833333333333},
-{2974991,3855198,3855460,0.281866666666667,0.281866666666667},
-{2974992,3855303,3855198,0.314288888888889,0.314288888888889},
-{2974993,3856063,3855303,0.41025,0.41025},
-{2974994,3855743,3856515,0.32395,0.32395},
-{2974995,3853178,3852842,1000000,1000000},
-{2974996,3855084,3855345,0.450066666666667,0.450066666666667},
-{2974997,3854895,3855186,0.42918,0.3732},
-{2974998,3851746,3851649,0.108733333333333,0.108733333333333},
-{2974999,3850218,3850755,1000000,1000000},
-{2975000,3850755,3851565,1000000,1000000},
-{2975001,3851565,3851634,0.135128571428571,0.140133333333333},
-{2975002,3849752,3850249,0.422112,0.458817391304348},
-{2975003,3850249,3851175,0.635866666666667,0.635866666666667},
-{2975006,3850249,3849696,0.4236,0.4236},
-{2975007,3849109,3849696,0.438333333333333,0.438333333333333},
-{2975021,3851361,3850502,0.426288888888889,0.426288888888889},
-{2975022,3852691,3852472,0.320377777777778,0.320377777777778},
-{2975023,3852855,3852691,0.0705111111111111,0.0705111111111111},
-{2975024,3852632,3852184,0.131897142857143,0.139890909090909},
-{2975026,3850839,3850487,0.176733333333333,0.176733333333333},
-{2975027,3855708,3854895,0.335828571428571,0.284945454545455},
-{2975028,3856013,3855708,0.155688888888889,0.17515},
-{2975029,3856613,3856761,0.289107692307692,0.341672727272727},
-{2975030,3857162,3856613,0.302129032258065,0.346888888888889},
-{2975031,3857120,3857372,1.62432857142857,1.62432857142857},
-{2975032,3854486,3854610,0.346263157894737,0.4111875},
-{2975033,3856013,3854622,0.695422222222222,0.670585714285714},
-{2975034,3857372,3857141,0.143223529411765,0.115942857142857},
-{2975035,3858278,3858470,0.176625,0.148736842105263},
-{2975036,3858708,3857948,1.43796,0.653618181818182},
-{2975037,3860494,3859767,1000000,1000000},
-{2975038,3859226,3858578,1000000,1.2522},
-{2975039,3860530,3859644,1000000,0.840366666666667},
-{2975040,3860352,3860117,0.383060869565217,0.383060869565217},
-{2975041,3860117,3859761,0.303313043478261,0.3171},
-{2975042,3860549,3860117,0.240081818181818,0.22964347826087},
-{2975043,3860530,3861551,0.7133,1000000},
-{2975044,3862878,3861412,0.745707692307692,0.80785},
-{2975045,3862217,3861115,0.793061538461538,0.589131428571429},
-{2975046,3862721,3862419,0.201208695652174,0.201208695652174},
-{2975047,3863200,3862721,0.41268,0.41268},
-{2975048,3861961,3860900,0.745567741935484,0.924504},
-{2975049,3861604,3861278,0.442171428571428,0.442171428571428},
-{2975050,3862419,3862070,0.373831578947368,0.373831578947368},
-{2975051,3862073,3861961,0.154852173913043,1000000},
-{2975052,3863012,3862702,1000000,1000000},
-{2975053,3863200,3863012,1000000,1000000},
-{2975054,3858578,3859105,0.396766666666667,0.35709},
-{2975055,3859105,3859555,0.376228571428572,0.303876923076923},
-{2975056,3859761,3859105,0.503034782608696,0.503034782608696},
-{2975057,3859105,3858588,0.65901,0.65901},
-{2975058,3863559,3863989,0.704504347826087,0.648144},
-{2975059,3863989,3863200,1000000,0.390111111111111},
-{2975060,3863989,3864245,0.175153846153846,0.162642857142857},
-{2975061,3864350,3863989,1000000,1000000},
-{2975062,3866179,3865790,0.292909090909091,0.280173913043478},
-{2975063,3866474,3866179,0.199915384615385,0.167670967741935},
-{2975064,3867501,3866179,1000000,0.979753846153846},
-{2975065,3867730,3865790,0.6988,1.10985882352941},
-{2975066,3868650,3868907,1000000,0.602742857142857},
-{2975067,3866373,3866859,0.568957894736842,0.491372727272727},
-{2975068,3866859,3867658,0.281731034482759,0.281731034482759},
-{2975069,3867406,3867658,0.461526315789474,0.461526315789474},
-{2975070,3867658,3868384,1000000,0.312208695652174},
-{2975071,3871406,3871260,1000000,1000000},
-{2975072,3871406,3872205,0.320318181818182,0.370894736842105},
-{2975073,3872199,3871626,0.3853875,0.440442857142857},
-{2975074,3869920,3870404,1000000,1000000},
-{2975075,3869724,3869783,0.1394,0.1394},
-{2975076,3870566,3871210,1000000,0.517472727272727},
-{2975077,3872546,3871812,0.290060869565217,0.266856},
-{2975078,3873119,3872912,0.347855172413793,0.403512},
-{2975079,3873283,3872546,0.289569230769231,0.268885714285714},
-{2975080,3873178,3873119,0.0493071428571429,0.0531},
-{2975081,3873544,3873178,0.1524,0.1778},
-{2975082,3872568,3871775,1000000,0.452672727272727},
-{2975083,3874457,3873283,0.487355555555556,0.487355555555556},
-{2975084,3874352,3873544,0.3552,0.3552},
-{2975085,3866373,3866449,0.637324137931035,0.61608},
-{2975086,3868688,3868404,0.267864,0.478328571428571},
-{2975087,3849627,3849376,0.287557894736842,0.287557894736842},
-{2975088,3849715,3849627,0.0646857142857143,0.0646857142857143},
-{2975089,3850282,3849627,0.402177777777778,0.402177777777778},
-{2975090,3850394,3850282,0.0891818181818182,0.115411764705882},
-{2975091,3850032,3849715,0.29379,0.29379},
-{2975092,3850282,3849985,0.220155555555556,0.220155555555556},
-{2975093,3852301,3851770,0.256755555555556,0.256755555555556},
-{2975094,3852011,3852301,1000000,1000000},
-{2975095,3852301,3852629,0.225366666666667,0.225366666666667},
-{2975096,3851453,3850212,0.578177777777778,0.578177777777778},
-{2975097,3852407,3853170,0.439622222222222,0.439622222222222},
-{2975098,3852359,3852156,0.0761777777777778,0.0761777777777778},
-{2975099,3852359,3852728,0.311822222222222,1000000},
-{2975100,3854134,3852359,0.757933333333333,0.757933333333333},
-{2975101,3856906,3855255,0.7152,0.7152},
-{2975102,3857349,3856906,0.2271,0.252333333333333},
-{2975103,3858578,3858202,1000000,0.641446153846154},
-{2975104,3858202,3858093,1000000,0.562875},
-{2975105,3854371,3853150,0.764072727272727,0.509381818181818},
-{2975106,3856906,3855814,1000000,0.71328},
-{2975107,3858122,3857349,0.38615,0.38615},
-{2975108,3858549,3858122,0.295010526315789,0.295010526315789},
-{2975109,3859555,3860120,0.33005,0.3444},
-{2975110,3860267,3860973,0.5828,0.5828},
-{2975111,3859151,3859674,0.334757142857143,0.446342857142857},
-{2975112,3861494,3861437,0.393184615384615,0.538042105263158},
-{2975113,3861215,3861723,0.278,0.278},
-{2975114,3850032,3849809,0.15759,0.15759},
-{2975115,3849809,3850198,0.2622,0.2622},
-{2975116,3850198,3850270,0.0618521739130435,0.056904},
-{2975117,3850599,3850270,0.274090909090909,0.287142857142857},
-{2975118,3850561,3850032,0.332921739130435,0.332921739130435},
-{2975119,3850645,3850394,0.320809090909091,0.35289},
-{2975120,3850645,3850561,0.0789333333333333,0.07104},
-{2975121,3851274,3850645,0.43761,0.43761},
-{2975122,3850394,3850951,0.264711111111111,0.264711111111111},
-{2975123,3851274,3850951,0.251114285714286,0.277547368421053},
-{2975124,3851741,3851274,0.484476923076923,0.484476923076923},
-{2975438,3884286,3883627,0.630466666666667,1000000},
-{2975439,3886372,3885663,1000000,0.528381818181818},
-{2975440,3886896,3886372,0.475,1000000},
-{2975441,3887221,3886896,0.2822,1000000},
-{2975442,3887339,3887278,0.0647625,0.0314},
-{2975443,3886270,3886896,0.452452173913043,1000000},
-{2975444,3885264,3885952,0.351422222222222,0.412539130434783},
-{2975445,3889561,3890065,1000000,1000000},
-{2975446,3875393,3875476,0.0324,0.0324},
-{2975447,3877956,3878102,0.24888,1000000},
-{2975448,3877854,3877956,0.211114285714286,1000000},
-{2975449,3880703,3880471,0.233933333333333,1000000},
-{2975450,3880703,3880965,1000000,0.191563636363636},
-{2975451,3880492,3880703,1000000,0.261214285714286},
-{2975452,3883451,3882763,1000000,0.515971428571429},
-{2975453,3884003,3883451,1000000,0.459757894736842},
-{2975454,3883730,3884003,1000000,0.236576470588235},
-{2975455,3884707,3884286,0.396663157894737,1000000},
-{2975456,3885141,3884707,0.35496,1000000},
-{2975457,3884707,3885264,1000000,0.359372727272727},
-{2975458,3884306,3884707,1000000,0.331768421052632},
-{2975459,3884003,3884306,1000000,0.2511},
-{2975460,3884389,3884003,1000000,0.320305263157895},
-{2975461,3885630,3886270,1000000,1000000},
-{2975462,3886977,3886701,1000000,0.256989473684211},
-{2975463,3886376,3886977,1000000,0.418982608695652},
-{2975464,3887217,3886977,1000000,0.20583},
-{2975465,3888066,3887691,0.264914285714286,1000000},
-{2975466,3885377,3885695,1000000,0.291882352941177},
-{2975467,3884557,3885031,0.305863636363636,1000000},
-{2975468,3886085,3885755,1000000,1000000},
-{2975469,3891335,3892550,1000000,1000000},
-{2975470,3892550,3892708,1000000,1000000},
-{2975471,3892510,3891335,1000000,1000000},
-{2975472,3893406,3892855,1000000,1000000},
-{2975473,3890844,3890883,0.0501454545454545,0.0501454545454545},
-{2975474,3890883,3891006,0.270545454545455,0.270545454545455},
-{2975475,3893278,3893249,0.06656,0.0768},
-{2975476,3893173,3893605,0.6421,0.6421},
-{2975477,3893782,3894341,0.45549,1000000},
-{2975478,3889416,3889797,0.228190909090909,1000000},
-{2975479,3875315,3875535,0.124936363636364,0.119504347826087},
-{2975480,3875535,3876163,0.3654,0.315572727272727},
-{2975481,3877045,3876821,0.14058,1000000},
-{2975482,3877332,3877045,0.148028571428571,1000000},
-{2975483,3877491,3877332,1000000,1000000},
-{2975484,3877545,3877491,1000000,1000000},
-{2975485,3877165,3877672,1000000,1000000},
-{2975486,3877672,3878154,1000000,1000000},
-{2975487,3881773,3882079,0.4511,1000000},
-{2975488,3881803,3882112,0.322482352941176,0.322482352941176},
-{2975489,3884852,3885377,1000000,0.36591},
-{2975490,3885433,3885761,1000000,0.258157894736842},
-{2975491,3884891,3885433,1000000,0.317660869565217},
-{2975492,3885957,3886348,1000000,0.234133333333333},
-{2975493,3888621,3889416,0.47343,1000000},
-{2975494,3888065,3888621,0.287921739130435,1000000},
-{2975495,3889307,3890011,0.352444444444444,1000000},
-{2975496,3888733,3889307,0.273648,1000000},
-{2975497,3887142,3887617,0.2916,1000000},
-{2975498,3886806,3887142,0.2532,1000000},
-{2975499,3890362,3891359,0.742863157894737,1000000},
-{2975500,3890011,3890362,0.227918181818182,1000000},
-{2975501,3891851,3891563,1000000,0.281191304347826},
-{2975502,3892124,3892857,0.463707692307692,0.6698},
-{2975503,3891873,3892150,1000000,0.4584},
-{2975504,3892150,3892439,0.3892875,1000000},
-{2975505,3892118,3891851,1000000,0.327221052631579},
-{2975506,3891851,3892150,1000000,0.187488},
-{2975507,3891450,3891851,1000000,0.242208},
-{2975508,3891093,3891450,1000000,0.222681818181818},
-{2975509,3890416,3891093,1000000,0.389688},
-{2975510,3893657,3893907,0.250581818181818,0.196885714285714},
-{2975511,3893400,3893657,0.226275,0.164563636363636},
-{2975512,3892857,3893400,0.45795652173913,0.405115384615385},
-{2975513,3893815,3893546,0.953785714285714,0.8345625},
-{2975514,3893907,3893318,1000000,0.439246153846154},
-{2975515,3894567,3893907,1000000,0.406489655172414},
-{2975516,3894286,3893657,0.420921428571429,0.7366125},
-{2975517,3894011,3893400,0.514095652173913,0.492675},
-{2975518,3893815,3894317,0.24495,0.236503448275862},
-{2975519,3895085,3893800,0.827657142857143,1000000},
-{2975520,3895163,3894863,0.1968,0.1968},
-{2975521,3889889,3889572,1000000,0.32667},
-{2975522,3889889,3890416,0.403421052631579,1000000},
-{2975523,3890181,3889889,1000000,1000000},
-{2975524,3876834,3876961,1000000,1000000},
-{2975525,3876961,3876716,1000000,1000000},
-{2975526,3876716,3876311,1000000,1000000},
-{2975527,3876311,3876011,0.128777777777778,0.128777777777778},
-{2975528,3879728,3879534,0.2200875,1000000},
-{2975529,3879924,3879583,0.433892307692308,1000000},
-{2975530,3880197,3879924,0.1684,0.1684},
-{2975531,3878226,3878270,0.156022222222222,0.156022222222222},
-{2975532,3885412,3884938,1000000,0.34947},
-{2975533,3886201,3886676,1000000,0.311060869565217},
-{2975534,3887332,3888033,0.35421,1000000},
-{2975535,3886077,3886904,0.458895652173913,1000000},
-{2975536,3887157,3887833,0.281544,0.391033333333333},
-{2975537,3890395,3890400,0.217333333333333,0.217333333333333},
-{2975538,3891410,3891408,0.278488888888889,0.278488888888889},
-{2975539,3876992,3876730,1000000,1000000},
-{2975540,3877478,3877845,1000000,1000000},
-{2975541,3879146,3878484,1000000,1000000},
-{2975542,3879416,3879146,1000000,1000000},
-{2975543,3878771,3879146,1000000,1000000},
-{2975544,3879521,3879756,1000000,1000000},
-{2975545,3879521,3879592,1000000,1000000},
-{2975546,3879506,3879521,1000000,1000000},
-{2975547,3879592,3880015,1000000,1000000},
-{2975548,3880015,3879756,1000000,1000000},
-{2975549,3879578,3879416,1000000,1000000},
-{2975550,3879693,3879578,1000000,1000000},
-{2975551,3880246,3880015,1000000,1000000},
-{2975552,3880506,3880246,1000000,1000000},
-{2975553,3884456,3884891,1000000,0.278181818181818},
-{2975554,3885761,3885926,1000000,0.0950857142857143},
-{2975555,3885865,3885926,1000000,0.1542375},
-{2975556,3885926,3886251,1000000,0.292457142857143},
-{2975557,3876961,3877220,1000000,1000000},
-{2975558,3877220,3877264,1000000,1000000},
-{2975559,3877220,3877112,1000000,1000000},
-{2975560,3874483,3874239,1000000,1000000},
-{2975561,3874886,3874483,0.206022222222222,0.206022222222222},
-{2975562,3873819,3874044,0.272025,1000000},
-{2975563,3867298,3867239,1000000,0.1113},
-{2975564,3870989,3870953,0.298955555555556,0.298955555555556},
-{2975565,3871099,3871171,0.0804857142857143,0.107314285714286},
-{2975566,3857591,3857349,0.280581818181818,1000000},
-{2975571,3868634,3868791,1000000,1000000},
-{2975572,3868791,3868846,1000000,1000000},
-{2975573,3865096,3865162,0.241266666666667,0.241266666666667},
-{2975574,3886231,3886444,1000000,0.540913043478261},
-{2975575,3886591,3886890,0.399624,1000000},
-{2975576,3887040,3887251,1000000,0.3678},
-{2975577,3887371,3887568,0.256863157894737,1000000},
-{2975578,3886444,3886524,1000000,0.173366666666667},
-{2975579,3886524,3886686,1000000,0.263628571428571},
-{2975580,3886153,3886524,0.272766666666667,1000000},
-{2975581,3885502,3885875,0.173890909090909,1000000},
-{2975582,3885760,3885875,0.152458064516129,1000000},
-{2975583,3886686,3886963,1000000,0.429},
-{2975584,3886890,3887116,0.378234782608696,1000000},
-{2975585,3887251,3887524,1000000,0.3535},
-{2975586,3887568,3887872,0.3285,1000000},
-{2975587,3887116,3887402,0.431590909090909,1000000},
-{2975588,3887872,3888178,0.388486956521739,1000000},
-{2975589,3888897,3889189,0.4514,1000000},
-{2975590,3889189,3889895,0.443810526315789,0.42162},
-{2975591,3889260,3889486,0.174833333333333,1000000},
-{2975592,3888569,3889260,0.367278260869565,1000000},
-{2975593,3889260,3889666,1000000,0.379673684210526},
-{2975594,3879724,3879737,1000000,1000000},
-{2975595,3879737,3879747,1000000,1000000},
-{2975596,3885875,3886029,0.220448275862069,1000000},
-{2975597,3887213,3887577,1000000,0.4248},
-{2975598,3887979,3888245,0.382547368421053,1000000},
-{2975599,3888486,3888555,0.265244444444444,0.265244444444444},
-{2975600,3888555,3888574,0.24528,1000000},
-{2975601,3888555,3888811,1000000,0.1404},
-{2975602,3888811,3888789,1000000,1000000},
-{2975603,3886380,3886371,1000000,0.1896},
-{2975604,3885966,3886371,1000000,0.262764705882353},
-{2975605,3886371,3886868,1000000,0.285542857142857},
-{2975606,3886371,3886599,1000000,0.510027272727273},
-{2975607,3887107,3887112,0.0664702702702703,0.0702685714285714},
-{2975608,3886871,3887329,0.26205,1000000},
-{2975609,3887329,3887444,0.142376470588235,1000000},
-{2975610,3887329,3887518,1000000,1000000},
-{2975611,3887847,3888243,0.204109090909091,1000000},
-{2975612,3886599,3886564,1000000,0.3518625},
-{2975613,3888811,3889502,1000000,0.275446153846154},
-{2975614,3885469,3885424,1000000,1000000},
-{2975615,3885874,3885469,1000000,1000000},
-{2975616,3885392,3885469,1000000,1000000},
-{2975617,3888225,3888876,0.594155555555556,0.594155555555556},
-{2975622,3891006,3890902,0.267945454545455,0.267945454545455},
-{2975623,3897916,3897504,0.34256,0.25692},
-{2975624,3899518,3899628,0.61,0.665454545454545},
-{2975625,3899258,3899628,0.141270967741935,0.156407142857143},
-{2975626,3899961,3900519,0.496515789473684,1000000},
-{2975627,3900940,3900359,0.467536363636364,1000000},
-{2975628,3896454,3897827,0.400814634146341,0.421369230769231},
-{2975629,3897827,3898183,0.0996166666666667,0.089655},
-{2975630,3898183,3898535,0.100578947368421,0.093219512195122},
-{2975631,3898535,3898867,0.100105263157895,0.0951},
-{2975632,3898867,3899258,0.14576,0.141058064516129},
-{2975633,3898721,3898951,0.202870588235294,0.202870588235294},
-{2975634,3898951,3899273,0.267375,1000000},
-{2975635,3898244,3898646,0.380964705882353,0.380964705882353},
-{2975636,3889466,3890277,1000000,1000000},
-{2975637,3890277,3890557,0.223684615384615,1000000},
-{2975638,3890557,3890996,0.307264285714286,1000000},
-{2975639,3890996,3891310,0.220371428571429,1000000},
-{2975640,3891310,3890290,0.581975,1000000},
-{2975641,3892343,3892093,0.1392,0.1392},
-{2975642,3889780,3890615,0.4297875,0.45844},
-{2975643,3890615,3891200,0.323554838709677,0.33434},
-{2975644,3891200,3891153,0.25528,0.15955},
-{2975645,3891819,3891200,1000000,0.6308},
-{2975646,3892294,3891819,1000000,1000000},
-{2975647,3892294,3893118,1000000,0.733661538461539},
-{2975648,3890332,3890418,1000000,0.360490909090909},
-{2975649,3891208,3891763,0.23288275862069,1000000},
-{2975650,3891763,3892295,0.259938461538462,1000000},
-{2975651,3892295,3893054,0.344136,1000000},
-{2975652,3893002,3893054,1000000,0.324825},
-{2975653,3893054,3893101,1000000,0.273466666666667},
-{2975654,3891763,3891870,1000000,0.381886956521739},
-{2975655,3891870,3891942,1000000,0.191784},
-{2975656,3898472,3899847,0.462811764705882,0.629424},
-{2975657,3899847,3899947,0.204422222222222,0.204422222222222},
-{2975658,3898771,3898472,0.276662068965517,0.40116},
-{2975659,3899622,3898819,0.337755555555556,0.337755555555556},
-{2975660,3899654,3899622,0.116088888888889,0.116088888888889},
-{2975661,3899608,3899622,0.0898666666666667,0.0898666666666667},
-{2975662,3899608,3899128,0.212555555555556,0.212555555555556},
-{2975663,3899696,3899847,0.303925714285714,0.35458},
-{2975664,3900213,3900410,1000000,0.22614},
-{2975665,3900410,3900418,1000000,0.0949555555555555},
-{2975666,3900410,3900448,0.0969333333333333,0.0969333333333333},
-{2975667,3900448,3901537,0.530822222222222,0.530822222222222},
-{2975668,3900418,3901001,0.263844444444444,0.263844444444444},
-{2975669,3901001,3901436,0.177155555555556,0.177155555555556},
-{2975670,3900410,3901035,0.584169230769231,0.584169230769231},
-{2975671,3900448,3901075,0.281088888888889,0.281088888888889},
-{2975672,3901035,3901001,0.0871111111111111,0.0871111111111111},
-{2975673,3901035,3901075,0.0910444444444444,0.0910444444444444},
-{2975674,3901479,3901035,0.377953846153846,0.223336363636364},
-{2975675,3901075,3901511,0.183688888888889,0.183688888888889},
-{2975676,3901436,3901402,0.074,0.074},
-{2975677,3901436,3901479,0.0919333333333333,0.0919333333333333},
-{2975678,3901479,3901511,0.0910444444444444,0.0910444444444444},
-{2975679,3901511,3901537,0.0834666666666667,0.0834666666666667},
-{2975680,3901436,3902307,0.343088888888889,0.343088888888889},
-{2975681,3901479,3902340,0.350330769230769,0.350330769230769},
-{2975682,3901511,3902389,0.340311111111111,0.340311111111111},
-{2975683,3901537,3902416,0.339577777777778,0.339577777777778},
-{2975684,3902273,3902307,0.11577,0.15436},
-{2975685,3902307,3902340,0.113809090909091,0.131778947368421},
-{2975686,3902340,3902389,0.104832,0.104832},
-{2975687,3902389,3902416,0.126252631578947,0.126252631578947},
-{2975688,3900439,3900250,0.1372875,0.129211764705882},
-{2975689,3900718,3900724,1000000,1000000},
-{2975690,3900444,3900439,1000000,1000000},
-{2975691,3900769,3900718,1000000,1000000},
-{2975692,3900769,3900444,1000000,1000000},
-{2975693,3900424,3900444,1000000,1000000},
-{2975694,3902255,3902273,0.0742645161290322,0.100095652173913},
-{2975695,3882242,3882646,1000000,0.340835294117647},
-{2975696,3886770,3887003,1000000,0.378081818181818},
-{2975697,3887153,3887463,0.484129411764706,1000000},
-{2975698,3887773,3888141,1000000,0.395571428571429},
-{2975699,3885036,3885322,1000000,0.732642857142857},
-{2975700,3886539,3886770,1000000,0.390457142857143},
-{2975701,3886900,3887153,0.400894736842105,1000000},
-{2975702,3886900,3886539,0.31088,1000000},
-{2975703,3886445,3886539,1000000,0.15669},
-{2975704,3886763,3886900,0.185481818181818,1000000},
-{2975705,3886338,3886445,1000000,0.20478},
-{2975706,3886664,3886763,0.150571428571429,1000000},
-{2975707,3886338,3886664,0.225852631578947,1000000},
-{2975708,3887257,3887773,1000000,0.535330434782609},
-{2975709,3888803,3889417,1000000,0.386966666666667},
-{2975710,3889417,3890064,1000000,0.37617},
-{2975711,3889959,3890064,0.546128571428572,1000000},
-{2975712,3889686,3889689,0.1176,0.1176},
-{2975713,3890050,3890055,0.118933333333333,0.118933333333333},
-{2975714,3889426,3889689,0.110066666666667,0.1143},
-{2975715,3889689,3890055,0.145944827586207,0.145944827586207},
-{2975716,3890587,3890648,1000000,0.203422222222222},
-{2975717,3889424,3890648,1000000,0.534955555555556},
-{2975718,3890648,3890689,1000000,0.17355},
-{2975719,3891942,3892011,1000000,0.296928},
-{2975720,3891535,3892011,0.255541935483871,0.282921428571429},
-{2975721,3892011,3892860,0.366766666666667,0.471557142857143},
-{2975722,3891349,3891267,0.370772727272727,0.370772727272727},
-{2975723,3889882,3890563,0.5961,1000000},
-{2975724,3888043,3889010,0.460338461538462,1000000},
-{2975725,3889010,3889565,0.351371428571429,1000000},
-{2975726,3890313,3891148,1000000,0.569423076923077},
-{2975727,3889565,3890016,0.373058823529412,1000000},
-{2975728,3890016,3890313,1000000,0.2137},
-{2975729,3895393,3895463,0.331270588235294,0.331270588235294},
-{2975730,3895463,3896445,0.624354545454545,0.624354545454545},
-{2975731,3896445,3896314,0.344428571428571,0.314478260869565},
-{2975732,3894192,3895279,0.737563636363636,0.81132},
-{2975733,3895279,3896149,0.733,0.573652173913043},
-{2975734,3894259,3895191,0.633272727272727,0.87075},
-{2975735,3895191,3895279,0.53724,0.424136842105263},
-{2975736,3896149,3897039,0.7792875,0.6927},
-{2975737,3896761,3897039,0.354085714285714,0.354085714285714},
-{2975738,3895191,3895987,0.61668,0.560618181818182},
-{2975739,3895987,3896761,0.7881,0.649023529411765},
-{2975740,3894325,3895007,0.473228571428571,0.523042105263158},
-{2975741,3895007,3895191,0.523036363636364,0.261518181818182},
-{2975742,3894794,3895007,1000000,0.4089},
-{2975743,3895007,3895762,0.529721739130435,0.641242105263158},
-{2975744,3898821,3898305,1000000,1000000},
-{2975745,3898740,3899521,1000000,1000000},
-{2975746,3898821,3898740,1000000,1000000},
-{2975747,3899621,3898821,1000000,1000000},
-{2975748,3901875,3899621,1000000,1000000},
-{2975749,3902480,3899521,1000000,1000000},
-{2975750,3902480,3901875,0.522266666666667,0.522266666666667},
-{2975751,3897601,3897128,1000000,1000000},
-{2975752,3897128,3896789,1000000,1000000},
-{2975753,3899621,3900346,1000000,1000000},
-{2975754,3884527,3884808,1000000,0.427114285714286},
-{2975755,3884531,3885459,0.500372727272727,1000000},
-{2975756,3885459,3886288,0.396264,1000000},
-{2975757,3886048,3886338,1000000,0.492252631578947},
-{2975758,3886288,3886664,0.515485714285714,1000000},
-{2975759,3886707,3887257,1000000,0.692072727272727},
-{2975760,3887358,3888112,1000000,0.390052173913044},
-{2975761,3888112,3888703,1000000,0.3068},
-{2975762,3889303,3889565,0.24003,1000000},
-{2975763,3888703,3889303,0.410191304347826,1000000},
-{2975764,3888703,3889148,1000000,0.216816},
-{2975765,3889148,3889774,1000000,0.383376923076923},
-{2975766,3889774,3890016,1000000,0.199309090909091},
-{2975767,3890890,3891804,1000000,0.733982608695652},
-{2975768,3891829,3892114,0.150235714285714,1000000},
-{2975769,3891446,3891829,0.19086,1000000},
-{2975770,3891032,3891446,0.219346153846154,1000000},
-{2975771,3890957,3891032,0.0503454545454545,0.069225},
-{2975772,3891446,3891630,0.157977777777778,0.157977777777778},
-{2975773,3891630,3892002,0.208155555555556,0.208155555555556},
-{2975774,3891829,3892002,0.153466666666667,0.153466666666667},
-{2975775,3895762,3896562,0.652976470588235,0.6167},
-{2975776,3896305,3896562,0.364233333333333,0.385658823529412},
-{2975777,3896051,3896305,0.384733333333333,0.329771428571429},
-{2975778,3894544,3894794,1000000,0.29475},
-{2975779,3894437,3894544,1000000,0.164866666666667},
-{2975780,3894808,3894437,0.3550875,0.315633333333333},
-{2975781,3895204,3894808,0.30297,1000000},
-{2975782,3894808,3895172,0.33824,1000000},
-{2975783,3896562,3896761,0.316326315789474,0.316326315789474},
-{2975784,3896562,3897026,0.348157894736842,0.348157894736842},
-{2975785,3885835,3885976,0.31695,1000000},
-{2975786,3885493,3885976,0.218375,0.291166666666667},
-{2975787,3885976,3886721,0.557717647058824,1000000},
-{2975788,3885920,3887082,0.426051428571429,0.5142},
-{2975789,3887082,3887481,0.16455,0.14398125},
-{2975790,3887481,3887887,0.1220625,0.1302},
-{2975791,3887887,3888715,0.344815384615385,0.344815384615385},
-{2975792,3887481,3887776,0.194955555555556,0.194955555555556},
-{2975793,3887887,3888549,0.64719,1000000},
-{2975794,3890417,3891196,0.489648648648649,0.6039},
-{2975795,3891528,3891896,0.344088888888889,0.344088888888889},
-{2975796,3892047,3892411,0.355844444444444,0.355844444444444},
-{2975797,3893762,3893863,0.133925,0.139747826086957},
-{2975798,3893863,3895760,0.684570731707317,0.684570731707317},
-{2975799,3896789,3899053,1000000,1000000},
-{2975800,3895097,3895818,0.3798,0.3798},
-{2975801,3895818,3896239,0.2007,0.193779310344828},
-{2975802,3897430,3896857,0.308555555555556,0.308555555555556},
-{2975803,3896857,3896484,0.181645161290323,0.181645161290323},
-{2975804,3895905,3895818,0.108514285714286,0.119936842105263},
-{2975805,3895771,3895905,0.11652,0.137082352941177},
-{2975806,3895618,3895771,0.0872666666666667,0.0872666666666667},
-{2975807,3895523,3895618,0.0739333333333333,0.0739333333333333},
-{2975808,3895422,3895523,0.0716222222222222,0.0716222222222222},
-{2975809,3895267,3895422,0.0877777777777778,0.0877777777777778},
-{2975810,3895422,3895804,0.357311111111111,0.357311111111111},
-{2975811,3896484,3896344,0.0534714285714286,0.0534714285714286},
-{2975812,3896344,3896202,0.0511304347826087,0.0511304347826087},
-{2975813,3896202,3896062,0.0444954545454545,0.0444954545454545},
-{2975814,3896062,3895904,0.0626,0.0626},
-{2975815,3895904,3895761,0.0798,0.0798},
-{2975816,3895761,3896127,0.297889655172414,0.297889655172414},
-{2975817,3896127,3896002,0.426955555555556,0.426955555555556},
-{2975818,3896127,3896417,0.194775,0.194775},
-{2975819,3896417,3896002,0.2354,0.2354},
-{2975820,3897025,3897332,0.282272727272727,0.326842105263158},
-{2975821,3897945,3897332,1000000,1000000},
-{2975822,3897332,3897660,0.255072,0.255072},
-{2975823,3900196,3900811,0.335977777777778,0.335977777777778},
-{2975824,3900277,3900811,0.243177777777778,0.243177777777778},
-{2975825,3900357,3900811,0.293555555555556,0.293555555555556},
-{2975826,3900423,3901163,0.329888888888889,0.329888888888889},
-{2975827,3901163,3900492,0.364422222222222,0.364422222222222},
-{2975828,3900723,3901957,1.911,1000000},
-{2975829,3900544,3901680,0.514128,0.514128},
-{2975830,3900260,3900892,0.342822222222222,0.342822222222222},
-{2975831,3901522,3902117,1000000,0.79525},
-{2975832,3902117,3902287,1000000,0.358227272727273},
-{2975833,3902117,3901802,0.279533333333333,0.279533333333333},
-{2975834,3903915,3904004,0.2545,0.234923076923077},
-{2975835,3904847,3904911,0.189913043478261,0.256941176470588},
-{2975836,3903915,3904847,0.67108,1000000},
-{2975837,3903103,3905138,1.67192,1.19422857142857},
-{2975838,3903033,3903452,1000000,1000000},
-{2975839,3903452,3903804,1000000,1000000},
-{2975840,3904369,3904530,1000000,1000000},
-{2975841,3904369,3904711,1000000,1000000},
-{2975842,3904711,3904916,1000000,1000000},
-{2975843,3903848,3903915,0.36429,0.36429},
-{2975844,3904847,3905067,0.15468,0.143222222222222},
-{2975845,3905192,3905067,0.06385,0.06385},
-{2975846,3905067,3905008,0.168620689655172,0.139714285714286},
-{2975847,3905392,3905884,1000000,1000000},
-{2975848,3904800,3905351,0.597,0.597},
-{2975849,3886759,3887013,0.153081818181818,0.153081818181818},
-{2975850,3887013,3887090,1000000,1000000},
-{2975851,3887090,3888051,1000000,1000000},
-{2975852,3890221,3891460,1000000,0.950576470588235},
-{2975853,3896002,3896283,0.252244444444444,0.252244444444444},
-{2975854,3896710,3896283,0.251777777777778,0.251777777777778},
-{2975855,3897332,3896710,0.532588235294118,0.532588235294118},
-{2975856,3896283,3896692,0.301755555555556,0.301755555555556},
-{2975857,3902029,3902051,1000000,0.142466666666667},
-{2975858,3901591,3902029,0.1708,0.1708},
-{2975859,3903675,3903265,0.293044444444444,1000000},
-{2975860,3901339,3901167,0.245977777777778,0.245977777777778},
-{2975861,3901616,3901339,0.1188,0.1188},
-{2975862,3901559,3901532,0.111914285714286,1000000},
-{2975863,3903048,3903265,1000000,0.336244444444444},
-{2975864,3901616,3902051,0.173177777777778,0.173177777777778},
-{2975865,3902051,3902645,1000000,0.216866666666667},
-{2975866,3902641,3902970,1000000,1000000},
-{2975867,3903714,3902970,1000000,1000000},
-{2975868,3902960,3902970,1000000,1000000},
-{2975869,3902645,3903756,1000000,1000000},
-{2975870,3906043,3906804,0.370418181818182,0.370418181818182},
-{2975871,3909651,3909963,0.218,0.218},
-{2975872,3909970,3910510,0.374113043478261,1000000},
-{2975873,3910440,3911022,1000000,0.4431},
-{2975874,3907558,3906959,1000000,0.4046},
-{2975875,3906959,3906488,1000000,0.32862},
-{2975876,3906488,3906133,1000000,0.255725},
-{2975877,3906133,3905699,1000000,0.27245},
-{2975878,3905699,3905266,1000000,0.285886956521739},
-{2975879,3906177,3906488,0.218111111111111,0.218111111111111},
-{2975880,3906488,3906958,0.249555555555556,0.249555555555556},
-{2975881,3905744,3906133,1000000,0.30837},
-{2975882,3906133,3906520,0.34758947368421,0.2446},
-{2975883,3906520,3906968,0.295827272727273,0.295827272727273},
-{2975884,3908995,3908470,0.257977777777778,0.257977777777778},
-{2975885,3908470,3907908,0.384031578947368,0.384031578947368},
-{2975886,3907980,3908470,0.2468,0.2468},
-{2975887,3908470,3908941,0.594,0.3267},
-{2975888,3908941,3908442,0.256435714285714,1000000},
-{2975889,3913861,3914275,0.319475,0.38337},
-{2975890,3911625,3911283,0.349246153846154,0.267070588235294},
-{2975891,3912355,3911625,0.68136,0.51102},
-{2975892,3911625,3911768,0.11022,0.122466666666667},
-{2975893,3911592,3911494,0.0667826086956522,0.0698181818181818},
-{2975894,3911768,3911592,0.147252631578947,0.13989},
-{2975895,3912546,3912934,0.209060869565217,0.218563636363636},
-{2975896,3912020,3911915,0.0698842105263158,0.055325},
-{2975897,3912256,3912020,0.217542857142857,0.217542857142857},
-{2975898,3912256,3912458,0.2793,0.2443875},
-{2975899,3912458,3912686,0.2434,0.2434},
-{2975900,3913400,3912458,0.54825,0.54825},
-{2975901,3912934,3912280,0.307057142857143,0.32241},
-{2975902,3913573,3912934,0.293686956521739,0.355515789473684},
-{2975903,3914181,3913573,0.4088625,0.363433333333333},
-{2975904,3911592,3912020,0.33072,0.314971428571429},
-{2975905,3912020,3912514,0.228514285714286,0.2666},
-{2975906,3911166,3911592,0.218777777777778,0.218777777777778},
-{2975907,3914075,3913194,0.539342857142857,0.596115789473684},
-{2975908,3913194,3913046,0.15305,0.131185714285714},
-{2975909,3913046,3912887,0.0883,0.0883},
-{2975910,3912514,3913046,0.264547826086957,0.289742857142857},
-{2975911,3913046,3914437,1.1140875,1.37118461538462},
-{2975912,3913194,3913561,0.323957142857143,0.323957142857143},
-{2975913,3914334,3913561,0.8501,0.8501},
-{2975914,3913561,3914437,0.7000125,0.7000125},
-{2975915,3914437,3914695,0.181285714285714,0.165521739130435},
-{2975916,3914928,3914075,0.63321,0.666536842105263},
-{2975917,3914928,3914475,0.307955555555556,0.307955555555556},
-{2975918,3914928,3915334,0.31011,0.229711111111111},
-{2975919,3914359,3914453,0.0321567567567567,0.0626210526315789},
-{2975920,3914453,3914785,0.274153846153846,0.274153846153846},
-{2975921,3914699,3914785,0.0472888888888889,0.0472888888888889},
-{2975922,3915833,3915876,0.0728666666666667,0.0570260869565217},
-{2975923,3915603,3915833,0.24666,0.274066666666667},
-{2975924,3914453,3914831,0.202292307692308,0.210384},
-{2975925,3915365,3915830,1000000,1000000},
-{2975926,3915830,3916115,1000000,1000000},
-{2975927,3915603,3916115,1000000,1000000},
-{2975928,3915833,3916411,0.291775,0.389033333333333},
-{2975929,3916421,3916411,0.694,0.567818181818182},
-{2975930,3916905,3917310,0.2634,0.2634},
-{2975931,3916322,3916551,0.217885714285714,0.269152941176471},
-{2975932,3916322,3915862,0.303244444444444,0.303244444444444},
-{2975933,3916126,3916322,0.213704347826087,0.258694736842105},
-{2975934,3915862,3916126,0.184894736842105,1000000},
-{2975935,3916432,3916126,1000000,0.326914285714286},
-{2975936,3915862,3915530,1000000,0.397623529411765},
-{2975937,3915365,3915530,0.150075,0.1334},
-{2975938,3916905,3917117,1000000,0.161288888888889},
-{2975939,3916698,3917203,1000000,0.46365},
-{2975940,3918658,3919450,0.617454545454545,0.54336},
-{2975941,3919299,3920365,0.483923076923077,0.483923076923077},
-{2975942,3920365,3920862,0.21945,0.21945},
-{2975943,3919856,3920365,0.503333333333333,1000000},
-{2975944,3920149,3920862,0.460153846153846,0.460153846153846},
-{2975945,3920505,3921157,0.421288888888889,0.421288888888889},
-{2975946,3921157,3921265,0.0688,0.0688},
-{2975947,3920749,3921600,0.523244444444444,0.523244444444444},
-{2975948,3920959,3921744,0.459911111111111,0.459911111111111},
-{2975949,3921215,3921812,0.362311111111111,0.362311111111111},
-{2975950,3921971,3922669,0.431155555555556,0.431155555555556},
-{2975951,3921971,3922014,0.167311111111111,0.167311111111111},
-{2975952,3922014,3922892,0.59,0.59},
-{2975953,3919262,3920073,0.595747826086957,0.622827272727273},
-{2975954,3919616,3920423,0.569775,0.621572727272727},
-{2975955,3921440,3921857,0.243222222222222,0.243222222222222},
-{2975956,3921562,3921851,0.176133333333333,0.176133333333333},
-{2975957,3921992,3922014,0.204355555555556,0.204355555555556},
-{2975958,3922060,3923076,0.7812,0.7812},
-{2975959,3922404,3923460,0.839266666666667,0.839266666666667},
-{2975961,3922063,3922404,0.2168,0.2168},
-{2975981,3903049,3902402,0.252777777777778,0.252777777777778},
-{2975982,3903049,3902899,0.113481818181818,0.1387},
-{2975983,3903539,3903049,0.298777777777778,0.32268},
-{2975984,3903962,3903539,0.34065,1000000},
-{2975985,3904427,3903962,0.216174193548387,1000000},
-{2975986,3904835,3904427,0.3003,1000000},
-{2975987,3905266,3904835,0.268361538461538,1000000},
-{2975988,3904460,3904835,0.227911111111111,0.227911111111111},
-{2975989,3904835,3905248,0.247733333333333,0.247733333333333},
-{2975990,3904024,3904427,1000000,0.343133333333333},
-{2975991,3904427,3904810,0.283721739130435,0.283721739130435},
-{2975992,3903589,3903962,0.229155555555556,0.229155555555556},
-{2975993,3903962,3904407,0.243044444444444,0.243044444444444},
-{2975994,3904810,3905237,0.356557894736842,0.376366666666667},
-{2975995,3902899,3902671,0.120022222222222,0.120022222222222},
-{2975996,3902899,3903288,0.302171428571429,0.302171428571429},
-{2975997,3903497,3903885,0.242177777777778,0.242177777777778},
-{2975998,3904382,3903885,0.4746,0.547615384615385},
-{2975999,3905432,3904814,0.2626,0.2626},
-{2976000,3906063,3905432,0.247088888888889,0.247088888888889},
-{2976001,3905478,3905432,0.241511111111111,0.241511111111111},
-{2976002,3905466,3905478,0.239066666666667,0.239066666666667},
-{2976003,3906130,3906079,0.584781818181818,0.584781818181818},
-{2976004,3906079,3906063,0.347314285714286,0.347314285714286},
-{2976005,3906063,3906096,0.147808695652174,0.147808695652174},
-{2976006,3905316,3905699,0.226377777777778,0.226377777777778},
-{2976007,3905699,3906145,0.255311111111111,0.255311111111111},
-{2976008,3902354,3902596,0.10775625,1000000},
-{2976009,3907367,3906680,0.243822222222222,0.243822222222222},
-{2976010,3907973,3907367,0.29295,0.29295},
-{2976011,3908014,3907973,0.256888888888889,0.256888888888889},
-{2976012,3907973,3907959,0.252555555555556,0.252555555555556},
-{2976013,3909287,3909128,0.304092857142857,0.304092857142857},
-{2976014,3909287,3909955,0.530233333333333,0.530233333333333},
-{2976015,3907277,3906130,0.4524,0.4524},
-{2976016,3907959,3907277,0.240488888888889,0.240488888888889},
-{2976017,3908340,3907959,0.162704347826087,0.2079},
-{2976018,3908340,3908397,0.150216,0.150216},
-{2976019,3908397,3908379,0.256084615384615,0.256084615384615},
-{2976020,3909099,3908397,0.239622222222222,0.239622222222222},
-{2976021,3909801,3909099,0.265866666666667,0.265866666666667},
-{2976022,3909099,3909091,0.340966666666667,0.340966666666667},
-{2976023,3909091,3909090,0.302018181818182,0.302018181818182},
-{2976024,3909955,3909808,0.394254545454545,0.510211764705882},
-{2976025,3910526,3909955,0.315866666666667,0.315866666666667},
-{2976026,3910429,3909808,0.24594,0.254420689655172},
-{2976027,3910873,3910429,0.260125,0.231222222222222},
-{2976028,3908379,3908368,0.4672,0.4672},
-{2976029,3906459,3906096,0.198163636363636,0.161466666666667},
-{2976030,3907101,3906459,0.26028,0.26028},
-{2976031,3908368,3907101,0.50695,0.50695},
-{2976032,3910429,3910911,0.366433333333333,0.366433333333333},
-{2976033,3910911,3910370,0.346914285714286,0.331145454545455},
-{2976034,3911494,3910911,0.2852,0.2852},
-{2976035,3911915,3911377,1000000,0.350481818181818},
-{2976036,3910911,3911377,0.244288888888889,0.244288888888889},
-{2976037,3911377,3910989,1000000,0.230607692307692},
-{2976038,3910350,3910816,0.293608695652174,0.2251},
-{2976039,3910350,3909823,0.236088888888889,0.219806896551724},
-{2976040,3910350,3910822,0.245888888888889,0.245888888888889},
-{2976041,3910822,3911265,0.221844444444444,0.221844444444444},
-{2976042,3912887,3911711,0.552955555555556,0.552955555555556},
-{2976043,3911711,3911265,0.27245,0.284295652173913},
-{2976044,3913330,3912104,1000000,0.673472727272727},
-{2976045,3909823,3909278,0.246870967741936,0.273321428571429},
-{2976046,3909278,3909211,0.03184,0.0341142857142857},
-{2976047,3917899,3918320,0.342,0.342},
-{2976048,3918320,3918428,0.0704285714285714,0.07395},
-{2976049,3917569,3918320,0.78496,0.78496},
-{2976050,3917395,3917536,0.47788,1000000},
-{2976051,3916926,3917010,0.056,0.106909090909091},
-{2976052,3916755,3917010,0.171733333333333,0.171733333333333},
-{2976053,3917010,3917261,0.200828571428571,0.221968421052632},
-{2976054,3917502,3917569,0.147766666666667,0.1209},
-{2976055,3916935,3917502,0.51816,0.51816},
-{2976056,3916935,3917378,0.269784,0.269784},
-{2976057,3918409,3918473,0.0515181818181818,0.0515181818181818},
-{2976058,3917751,3918409,0.333735483870968,0.413832},
-{2976059,3917378,3917751,0.183868965517241,0.205084615384615},
-{2976060,3918409,3918728,0.18645,0.18645},
-{2976061,3918728,3918806,0.0597157894736842,0.0630333333333333},
-{2976062,3918728,3919160,0.236044444444444,0.236044444444444},
-{2976063,3917751,3918071,0.21084,0.183339130434783},
-{2976064,3918071,3918728,0.492371428571429,0.492371428571429},
-{2976065,3917921,3918071,0.238569230769231,0.25845},
-{2976066,3918071,3918484,0.219576,0.211130769230769},
-{2976067,3918484,3919160,1000000,1000000},
-{2976068,3918473,3919262,0.504866666666667,0.504866666666667},
-{2976069,3918806,3919616,0.488207142857143,0.68349},
-{2976070,3919927,3920749,0.8052,0.488871428571429},
-{2976071,3919117,3919927,0.486385714285714,0.486385714285714},
-{2976072,3919453,3920236,1.13185,1.13185},
-{2976073,3919786,3920578,0.5024,0.5024},
-{2976074,3918320,3918797,0.66474,0.66474},
-{2976075,3917378,3918045,1000000,1000000},
-{2976076,3918045,3918409,0.168511111111111,0.168511111111111},
-{2976077,3919097,3919625,0.438488888888889,0.438488888888889},
-{2976078,3918484,3919097,0.379486956521739,0.300972413793103},
-{2976079,3919097,3919396,0.223547368421053,0.176975},
-{2976080,3916577,3917101,0.50648,0.422066666666667},
-{2976081,3916140,3916434,0.231939130434783,0.254028571428571},
-{2976082,3916434,3916370,0.0671333333333333,0.0710823529411765},
-{2976083,3916822,3916434,0.3688125,0.327833333333333},
-{2976084,3916822,3917121,0.191133333333333,0.191133333333333},
-{2976085,3917338,3916822,0.63568,0.529733333333333},
-{2976086,3917101,3917434,0.254571428571429,0.281368421052632},
-{2976087,3917434,3917338,0.126070588235294,0.126070588235294},
-{2976088,3917690,3917338,0.433061538461538,0.28149},
-{2976089,3917434,3917875,0.283371428571429,0.258730434782609},
-{2976090,3916434,3916786,0.208266666666667,0.208266666666667},
-{2976091,3918044,3917004,1000000,1000000},
-{2976092,3917981,3918044,0.0989111111111111,0.0989111111111111},
-{2976093,3918126,3918044,0.0334222222222222,0.0334222222222222},
-{2976094,3914779,3914953,0.131177777777778,0.131177777777778},
-{2976095,3916786,3917097,0.199355555555556,0.199355555555556},
-{2976096,3915611,3915268,0.2192,0.2192},
-{2976097,3915268,3915370,0.0737333333333333,0.0737333333333333},
-{2976098,3915932,3915596,0.205266666666667,0.205266666666667},
-{2976099,3916370,3915932,0.364171428571429,0.364171428571429},
-{2976100,3915932,3915499,0.387133333333333,0.29035},
-{2976101,3917047,3917097,0.0529714285714286,0.0529714285714286},
-{2976102,3917457,3917097,1000000,1000000},
-{2976103,3917660,3917457,0.194,0.1746},
-{2976104,3917660,3917881,0.1939,0.1939},
-{2976105,3918196,3917881,0.343254545454545,0.37758},
-{2976106,3917881,3918237,0.312233333333333,0.3512625},
-{2976107,3918373,3918490,0.113047058823529,0.106766666666667},
-{2976108,3918722,3918373,0.480955555555556,0.480955555555556},
-{2976109,3918153,3918373,0.245828571428571,0.1912},
-{2976110,3917660,3917994,1000000,1000000},
-{2976111,3917457,3917770,0.3331125,0.313517647058823},
-{2976112,3917398,3917710,0.197333333333333,0.197333333333333},
-{2976113,3917710,3918029,0.291633333333333,0.291633333333333},
-{2976114,3918029,3917963,0.0713,0.08556},
-{2976115,3918200,3918029,0.136966666666667,0.1540875},
-{2976116,3918513,3918200,0.244228571428571,0.2137},
-{2976117,3918517,3918200,0.19,0.19},
-{2976118,3918517,3918284,0.1893,0.219189473684211},
-{2976119,3918513,3918835,0.188288888888889,0.188288888888889},
-{2976120,3918835,3918517,0.16944,0.181542857142857},
-{2976121,3919159,3918835,0.18864,0.2096},
-{2976122,3919159,3919475,0.278684210526316,0.311470588235294},
-{2976123,3916720,3915818,0.567969230769231,0.5274},
-{2976124,3917047,3916145,0.74298,0.479341935483871},
-{2976125,3915908,3915611,0.298270588235294,0.362185714285714},
-{2976126,3916577,3915908,0.669347368421053,0.578072727272727},
-{2976127,3920236,3921063,0.8544,0.8544},
-{2976128,3920578,3921379,0.504377777777778,0.504377777777778},
-{2976129,3920884,3921727,0.588052173913043,0.56355},
-{2976130,3921218,3921956,0.446422222222222,0.446422222222222},
-{2976131,3920420,3921218,0.618572727272727,0.618572727272727},
-{2976132,3921556,3921985,0.254355555555556,0.254355555555556},
-{2976133,3922100,3922677,0.3628,0.3628},
-{2976134,3919558,3920420,0.771568421052632,0.771568421052632},
-{2976135,3920720,3921046,0.172823076923077,0.172823076923077},
-{2976136,3921046,3921879,0.501666666666667,0.501666666666667},
-{2976137,3921046,3921305,0.182018181818182,0.13348},
-{2976138,3922100,3922129,0.15036,0.15036},
-{2976139,3921305,3921383,0.0377806451612903,0.0366},
-{2976140,3921383,3922056,0.403511111111111,0.403511111111111},
-{2976141,3921383,3921610,0.0969085714285714,0.121135714285714},
-{2976142,3922056,3922092,0.21801,0.21801},
-{2976143,3922092,3922133,0.27726,0.27726},
-{2976144,3921610,3922092,0.301177777777778,0.301177777777778},
-{2976145,3921879,3922030,0.090825,0.10899},
-{2976146,3922030,3922056,0.251175,0.251175},
-{2976147,3922756,3922959,0.165266666666667,0.165266666666667},
-{2976148,3922959,3923382,0.510377777777778,0.510377777777778},
-{2976151,3922765,3923502,0.510945454545455,0.510945454545455},
-{2976152,3922584,3923382,0.523090909090909,0.822},
-{2976153,3922242,3922584,0.249075,0.229915384615385},
-{2976154,3922584,3922765,0.19648,0.1842},
-{2976155,3922765,3923082,0.2666,0.2666},
-{2976160,3922350,3923082,0.5208,1000000},
-{2976164,3920730,3921610,0.547272,0.547272},
-{2976165,3921610,3921842,0.16935,0.140151724137931},
-{2976166,3921842,3922133,0.170866666666667,0.170866666666667},
-{2976167,3921119,3921842,0.41242,0.651189473684211},
-{2976168,3901128,3901394,0.2804625,0.2804625},
-{2976169,3901394,3901636,0.135085714285714,0.135085714285714},
-{2976170,3901636,3901886,0.13815,0.13815},
-{2976171,3901886,3902163,0.201821052631579,0.147484615384615},
-{2976172,3902163,3902470,0.1614,0.1614},
-{2976173,3902470,3902692,0.126733333333333,0.126733333333333},
-{2976174,3902692,3902903,0.113524137931034,0.113524137931034},
-{2976175,3902903,3903167,0.205571428571429,0.1439},
-{2976176,3903167,3903415,0.1335,0.1335},
-{2976177,3903415,3903592,0.152454545454545,0.119785714285714},
-{2976178,3903592,3903813,0.128464285714286,0.128464285714286},
-{2976179,3903813,3904132,0.19604347826087,0.14090625},
-{2976180,3904132,3904410,0.2795625,0.194478260869565},
-{2976181,3904410,3904707,0.20275,0.231714285714286},
-{2976182,3904707,3904960,0.150528,0.129765517241379},
-{2976183,3904960,3905193,0.12922,0.114017647058824},
-{2976184,3905193,3905287,0.0778173913043478,0.0526411764705882},
-{2976185,3905287,3905405,0.0853090909090909,0.0536228571428571},
-{2976186,3905405,3905505,0.06432,0.0472941176470588},
-{2976187,3905505,3905678,0.0797571428571428,0.0656823529411765},
-{2976188,3905678,3905881,0.1141,0.1141},
-{2976189,3905881,3906104,0.196326315789474,0.143469230769231},
-{2976190,3901394,3901693,0.23515,0.28218},
-{2976191,3900502,3901394,0.434127272727273,0.573048},
-{2976192,3899550,3900502,0.483754838709677,0.483754838709677},
-{2976193,3901636,3902354,0.41855,0.41855},
-{2976194,3900727,3901636,0.534044444444444,0.534044444444444},
-{2976195,3901886,3902749,0.584857142857143,0.534},
-{2976196,3902163,3903113,0.514933333333333,0.514933333333333},
-{2976197,3902470,3903434,0.533533333333333,0.533533333333333},
-{2976198,3902692,3903606,0.539866666666667,0.539866666666667},
-{2976199,3902903,3903824,0.665809090909091,0.665809090909091},
-{2976200,3903167,3904121,0.538,0.538},
-{2976201,3903415,3904370,0.72795,0.72795},
-{2976202,3903592,3904571,0.585648,0.6972},
-{2976203,3903813,3904787,0.544822222222222,0.544822222222222},
-{2976204,3904132,3905082,0.503875862068966,0.503875862068966},
-{2976205,3904707,3905668,0.663218181818182,0.663218181818182},
-{2976206,3904960,3905902,0.543555555555555,0.543555555555555},
-{2976207,3905193,3906150,0.97424,0.97424},
-{2976208,3905405,3906373,0.538933333333333,0.538933333333333},
-{2976209,3905678,3906601,0.858882352941176,0.858882352941176},
-{2976210,3905881,3906847,0.645313043478261,0.645313043478261},
-{2976211,3901187,3902163,0.534133333333333,0.534133333333333},
-{2976212,3901440,3902470,0.547066666666667,0.547066666666667},
-{2976213,3901675,3902692,0.5362,0.5362},
-{2976214,3901857,3902903,0.780252631578947,0.780252631578947},
-{2976215,3902176,3903167,0.545377777777778,0.545377777777778},
-{2976216,3902434,3903415,0.567946153846154,0.567946153846154},
-{2976217,3902667,3903592,0.544866666666667,0.544866666666667},
-{2976218,3902887,3903813,0.61775,0.61775},
-{2976219,3903175,3904132,0.520328571428571,0.520328571428571},
-{2976220,3903726,3904707,0.585264,0.585264},
-{2976221,3903972,3904960,0.6954,0.6954},
-{2976222,3904365,3905287,0.641504347826087,0.641504347826087},
-{2976223,3904581,3905505,0.546,0.546},
-{2976224,3904925,3905881,0.73317,0.563976923076923},
-{2976225,3905149,3906104,0.815933333333333,0.63855652173913},
-{2976226,3899736,3900663,0.5494,0.5494},
-{2976227,3899952,3900851,0.58656,0.58656},
-{2976228,3900176,3901059,0.548022222222222,0.548022222222222},
-{2976229,3900349,3901242,0.554066666666667,0.554066666666667},
-{2976230,3900522,3901440,1.06902857142857,1.06902857142857},
-{2976231,3900715,3901675,0.47274375,0.47274375},
-{2976232,3900922,3901857,0.543555555555555,0.543555555555555},
-{2976233,3901190,3902219,0.714685714285714,0.714685714285714},
-{2976234,3901405,3902434,0.555111111111111,0.555111111111111},
-{2976235,3901614,3902667,0.553511111111111,0.553511111111111},
-{2976236,3901834,3902887,0.479032258064516,0.479032258064516},
-{2976237,3902181,3903175,0.718885714285714,0.718885714285714},
-{2976238,3902725,3903661,0.529735714285714,1000000},
-{2976239,3902946,3903864,0.59652,0.59652},
-{2976240,3903140,3904101,0.448909090909091,0.448909090909091},
-{2976241,3903396,3904365,0.516372413793104,0.483058064516129},
-{2976242,3899325,3899550,0.183409090909091,0.175434782608696},
-{2976243,3899550,3899641,0.0649,0.0458117647058824},
-{2976244,3899641,3899736,0.0546413793103448,0.039615},
-{2976245,3899736,3899848,0.0590785714285714,0.041355},
-{2976246,3899848,3899952,0.0624923076923077,0.0439135135135135},
-{2976247,3899952,3900084,0.096325,0.0660514285714286},
-{2976248,3900084,3900176,0.0383142857142857,0.0298},
-{2976249,3900176,3900349,0.116328,0.09694},
-{2976250,3900349,3900522,0.148090909090909,0.120666666666667},
-{2976251,3900522,3900715,0.16842,0.129553846153846},
-{2976252,3900715,3900922,0.132761538461538,0.127844444444444},
-{2976253,3900922,3901009,0.065256,0.065256},
-{2976254,3901009,3901190,0.12845,0.1101},
-{2976255,3901190,3901405,0.148063636363636,0.135725},
-{2976256,3901405,3901614,0.1344,0.16128},
-{2976257,3901614,3901834,0.154747826086957,0.161781818181818},
-{2976258,3901834,3902181,0.20195,0.20195},
-{2976259,3902181,3902456,0.238764705882353,0.193285714285714},
-{2976260,3902456,3902725,0.167321739130435,0.202547368421053},
-{2976261,3902725,3902946,0.16653,0.144808695652174},
-{2976262,3902946,3903140,0.152771428571429,0.128328},
-{2976263,3903140,3903396,0.152330769230769,0.146688888888889},
-{2976264,3898718,3899641,0.73293,0.73293},
-{2976265,3898925,3899848,0.545622222222222,0.545622222222222},
-{2976266,3899190,3900084,1.8264,1.8264},
-{2976267,3899434,3900349,0.543755555555556,0.543755555555556},
-{2976268,3899605,3900522,0.96924,0.96924},
-{2976269,3899820,3900715,0.907125,0.907125},
-{2976270,3900134,3901009,0.541911111111111,0.541911111111111},
-{2976271,3900340,3901190,1.2101,0.500731034482759},
-{2976272,3900525,3901405,0.537044444444444,0.537044444444444},
-{2976273,3900714,3901614,0.96944,0.96944},
-{2976274,3901177,3902181,0.637486956521739,0.637486956521739},
-{2976275,3898018,3898562,0.312046153846154,0.507075},
-{2976276,3898562,3898866,0.247326315789474,0.2937},
-{2976277,3899010,3899315,0.272329411764706,0.272329411764706},
-{2976278,3898562,3899010,0.2706,0.2706},
-{2976279,3897701,3898243,0.386514285714286,0.386514285714286},
-{2976280,3898243,3898707,0.271022222222222,0.271022222222222},
-{2976281,3898243,3898562,0.216027272727273,0.198025},
-{2976282,3897870,3898243,0.266747368421053,0.22035652173913},
-{2976283,3898707,3899010,0.175266666666667,0.175266666666667},
-{2976284,3898386,3898707,0.265042105263158,0.265042105263158},
-{2976285,3896899,3897667,0.467022222222222,0.467022222222222},
-{2976286,3896653,3896899,0.205745454545455,0.266258823529412},
-{2976287,3897120,3897870,1.14081818181818,1.14081818181818},
-{2976288,3897338,3898129,0.464355555555556,0.464355555555556},
-{2976289,3897544,3898386,0.467644444444444,0.467644444444444},
-{2976290,3896899,3897120,0.163609090909091,0.17997},
-{2976291,3897120,3897198,0.0594,0.0803647058823529},
-{2976292,3897198,3897338,0.112771428571429,0.124642105263158},
-{2976293,3897338,3897544,0.23992,0.23992},
-{2976294,3896838,3897198,0.296033333333333,0.296033333333333},
-{2976295,3896577,3896838,0.205527272727273,0.265976470588235},
-{2976296,3896838,3897245,0.291807692307692,0.281},
-{2976297,3897245,3897544,0.332672727272727,0.457425},
-{2976298,3897245,3897429,0.1272,0.122307692307692},
-{2976299,3897429,3897674,0.26496,0.19872},
-{2976300,3897674,3898172,0.519471428571429,0.519471428571429},
-{2976301,3898172,3898655,0.32715652173913,0.300984},
-{2976302,3898655,3899605,0.8149,0.97788},
-{2976303,3899006,3899923,0.535555555555556,1000000},
-{2976304,3899301,3900230,1.1993,1.1993},
-{2976305,3899516,3900436,0.531022222222222,0.531022222222222},
-{2976306,3899747,3900638,0.89415,0.89415},
-{2976307,3900941,3901886,0.515421428571429,0.515421428571429},
-{2976308,3903885,3904341,0.249911111111111,0.249911111111111},
-{2976309,3904813,3904341,0.35904,0.398933333333333},
-{2976310,3904813,3904798,0.407368421052632,0.407368421052632},
-{2976311,3904341,3904044,0.286566666666667,0.286566666666667},
-{2976312,3904798,3904044,0.363417391304348,0.363417391304348},
-{2976313,3905394,3904798,0.363442105263158,0.363442105263158},
-{2976314,3905432,3905395,0.343244444444444,0.343244444444444},
-{2976315,3905395,3905290,0.0493333333333333,0.0444},
-{2976316,3905395,3905497,0.04342,0.0566347826086957},
-{2976317,3905497,3905567,0.0710285714285714,0.0552444444444444},
-{2976318,3905567,3905508,0.0619909090909091,0.056825},
-{2976319,3904798,3904777,0.1146,0.1146},
-{2976320,3904777,3905187,0.333536842105263,0.333536842105263},
-{2976321,3906054,3905294,0.388685714285714,0.388685714285714},
-{2976322,3905294,3905187,0.0837666666666667,0.10052},
-{2976323,3905187,3904625,0.234244444444444,0.234244444444444},
-{2976324,3905588,3906002,0.357566666666667,0.357566666666667},
-{2976325,3906424,3906002,0.5666,0.5666},
-{2976326,3906466,3905567,0.355564285714286,0.414825},
-{2976327,3906459,3906466,0.250044444444444,0.250044444444444},
-{2976328,3906466,3906464,0.253733333333333,0.253733333333333},
-{2976329,3907067,3906466,0.277990909090909,0.291228571428571},
-{2976330,3907676,3907067,1000000,0.221155555555556},
-{2976331,3908839,3909278,0.236955555555556,0.236955555555556},
-{2976332,3908530,3907841,0.328044444444444,0.305420689655172},
-{2976333,3907841,3907389,0.290236363636364,0.277617391304348},
-{2976334,3907389,3906970,0.224347826086957,0.198461538461538},
-{2976335,3907389,3907836,0.241688888888889,0.241688888888889},
-{2976336,3907836,3908262,0.217355555555556,0.217355555555556},
-{2976337,3907749,3906875,0.365511111111111,0.365511111111111},
-{2976338,3908262,3907749,0.530907692307692,0.313718181818182},
-{2976339,3908789,3908262,0.277175,0.302372727272727},
-{2976340,3908853,3909267,0.220488888888889,0.220488888888889},
-{2976341,3909211,3909667,0.243466666666667,0.243466666666667},
-{2976342,3909267,3908789,0.274925,0.274925},
-{2976343,3909815,3910292,0.221022222222222,0.221022222222222},
-{2976344,3911265,3910786,0.226328571428571,0.234711111111111},
-{2976345,3910786,3910292,0.236244444444444,0.303742857142857},
-{2976346,3910292,3909735,0.261253846153846,0.283025},
-{2976347,3909735,3909267,0.196011428571429,0.254088888888889},
-{2976348,3911202,3910178,0.630628571428571,0.630628571428571},
-{2976349,3910178,3909182,0.617072727272727,1000000},
-{2976350,3909182,3908168,0.4958,0.582026086956522},
-{2976351,3906002,3906420,0.4333125,0.4333125},
-{2976352,3906854,3906420,0.366821052631579,0.366821052631579},
-{2976353,3906964,3906899,0.2556,0.285092307692308},
-{2976354,3907337,3906899,0.22632,0.22632},
-{2976355,3906899,3906875,0.166938461538462,0.166938461538462},
-{2976356,3908530,3909011,0.44036,0.44036},
-{2976357,3912104,3911202,0.5772,0.5772},
-{2976358,3912827,3911783,0.488822222222222,0.41244375},
-{2976359,3913875,3912827,0.3980625,0.4246},
-{2976360,3914572,3913875,1000000,1000000},
-{2976361,3914572,3914188,1000000,1000000},
-{2976362,3914572,3914892,1000000,1000000},
-{2976363,3914572,3914884,1000000,1000000},
-{2976364,3914653,3913729,0.465422222222222,0.465422222222222},
-{2976365,3915499,3914653,0.49926,1000000},
-{2976366,3914957,3914168,0.5238,0.5238},
-{2976367,3915818,3914957,1000000,0.514137931034483},
-{2976368,3915250,3914528,0.532725,0.532725},
-{2976369,3916145,3915250,0.668918181818182,1000000},
-{2976370,3916931,3916615,0.200066666666667,0.200066666666667},
-{2976371,3916970,3917279,0.200866666666667,0.200866666666667},
-{2976372,3918284,3917383,0.6043,0.517971428571429},
-{2976373,3921982,3921696,1000000,0.300485714285714},
-{2976374,3921696,3921967,0.19881,0.19881},
-{2976375,3921967,3922971,0.575044444444444,0.419627027027027},
-{2976379,3921696,3921329,0.241,0.241},
-{2976380,3921329,3921644,0.147733333333333,0.147733333333333},
-{2976381,3921329,3921034,0.216688888888889,0.216688888888889},
-{2976382,3921034,3921330,0.149422222222222,0.149422222222222},
-{2976383,3896385,3896838,0.386791304347826,0.370675},
-{2976384,3896966,3897245,0.22371,0.213057142857143},
-{2976385,3896102,3895930,0.151928571428571,0.193363636363636},
-{2976386,3896102,3896088,0.50301,0.50301},
-{2976387,3897373,3897476,0.10098,0.0748},
-{2976388,3896798,3896807,0.0625555555555556,0.0625555555555556},
-{2976389,3896959,3896798,0.1274625,0.0971142857142857},
-{2976390,3897166,3897373,0.48168,0.8028},
-{2976391,3897429,3897884,0.35184,0.2932},
-{2976392,3897674,3897983,0.203739130434783,0.203739130434783},
-{2976393,3898172,3898471,0.167711111111111,0.167711111111111},
-{2976394,3897983,3898471,0.261266666666667,0.261266666666667},
-{2976395,3897983,3898234,0.167863636363636,0.167863636363636},
-{2976396,3900895,3901834,0.49062,0.73593},
-{2976397,3899997,3900895,0.577896,0.72237},
-{2976398,3898471,3898714,0.1454,0.1454},
-{2976399,3898234,3898714,0.268733333333333,0.268733333333333},
-{2976400,3898714,3898904,0.111422222222222,0.111422222222222},
-{2976401,3898444,3898904,0.266533333333333,0.266533333333333},
-{2976402,3898904,3899388,0.375,0.375},
-{2976403,3901709,3902725,0.8126,1.46268},
-{2976404,3901920,3902946,0.6645,0.6645},
-{2976405,3903665,3904654,0.575676923076923,0.575676923076923},
-{2976406,3903396,3903665,0.16448,0.197376},
-{2976407,3903665,3903919,0.1373,0.152555555555556},
-{2976408,3903919,3904925,0.553755555555555,0.553755555555555},
-{2976409,3910815,3909706,0.416029411764706,0.589375},
-{2976410,3911257,3910107,0.579312,0.689657142857143},
-{2976411,3907847,3908692,0.477573913043478,0.477573913043478},
-{2976412,3909004,3909148,0.10269,0.0933545454545454},
-{2976413,3908692,3909004,0.137979310344828,0.142907142857143},
-{2976414,3906795,3907549,1000000,1000000},
-{2976415,3907549,3908352,0.400244444444445,0.400244444444445},
-{2976416,3908352,3908692,0.146442857142857,0.132270967741935},
-{2976417,3909745,3909953,0.132433333333333,0.19865},
-{2976418,3909004,3909745,0.53352,0.53352},
-{2976419,3906245,3906782,0.316511111111111,0.356075},
-{2976420,3906962,3907122,0.0711642857142857,0.0711642857142857},
-{2976421,3905999,3906635,0.6074,0.45555},
-{2976422,3906635,3906962,0.178434782608696,0.178434782608696},
-{2976423,3911783,3910815,0.5644,0.467089655172414},
-{2976424,3912199,3911257,0.535656,0.582234782608696},
-{2976425,3913729,3912649,0.579365217391304,0.579365217391304},
-{2976426,3912649,3911621,0.541632,0.541632},
-{2976427,3911621,3910600,0.593025,0.593025},
-{2976428,3914168,3913120,0.606109090909091,0.606109090909091},
-{2976429,3913120,3911998,0.5868,0.5868},
-{2976430,3911998,3910992,0.71808,0.574464},
-{2976431,3914528,3913529,0.489,0.507807692307692},
-{2976432,3913529,3912422,0.614945454545455,0.541152},
-{2976433,3912422,3911363,0.532688888888889,0.532688888888889},
-{2976434,3915439,3914701,0.487777777777778,0.487777777777778},
-{2976435,3914701,3914021,0.356777777777778,0.356777777777778},
-{2976436,3914021,3913703,0.1941,0.1941},
-{2976437,3915747,3914997,0.424451612903226,0.424451612903226},
-{2976438,3914997,3914145,0.611181818181818,0.517153846153846},
-{2976439,3916206,3915439,0.472688888888889,0.472688888888889},
-{2976440,3917383,3916515,0.620375,0.620375},
-{2976441,3916515,3915747,0.553486956521739,0.553486956521739},
-{2976442,3913703,3912557,0.835694117647059,0.835694117647059},
-{2976443,3914145,3913016,0.5292,0.5292},
-{2976444,3908692,3909482,0.453525,0.453525},
-{2976445,3909745,3910681,0.521971428571429,0.521971428571429},
-{2976446,3908048,3908352,0.153155555555556,0.159046153846154},
-{2976447,3908352,3909165,0.388135714285714,0.388135714285714},
-{2976448,3909482,3909745,0.152838461538462,0.209147368421053},
-{2976449,3909165,3909482,0.155711111111111,0.175175},
-{2976450,3908862,3909165,0.17115,0.164304},
-{2976451,3909482,3910284,0.494918181818182,0.494918181818182},
-{2976452,3909165,3909952,0.4102,0.4102},
-{2976453,3918315,3918611,0.215592,0.26949},
-{2976454,3918611,3918929,0.17398064516129,0.16854375},
-{2976455,3918611,3918048,0.823909090909091,0.6042},
-{2976456,3918929,3918398,0.338066666666667,0.338066666666667},
-{2976457,3917016,3917346,0.241513043478261,0.326752941176471},
-{2976458,3918048,3917346,0.457823076923077,0.425121428571429},
-{2976459,3918398,3917676,0.798171428571429,0.798171428571429},
-{2976460,3917346,3917676,0.283547368421053,0.224475},
-{2976461,3917346,3917055,0.1942,0.1942},
-{2976462,3917676,3917382,0.193622222222222,0.193622222222222},
-{2976463,3918702,3918043,0.582866666666667,0.45615652173913},
-{2976464,3917676,3918043,0.244527272727273,0.244527272727273},
-{2976465,3918043,3918447,0.215232,0.233947826086957},
-{2976466,3919012,3918447,0.4092,0.392832},
-{2976467,3916594,3916900,0.206044444444444,0.252872727272727},
-{2976468,3916900,3917210,0.203111111111111,0.249272727272727},
-{2976469,3917210,3917501,0.199546153846154,0.216175},
-{2976470,3918043,3917501,0.5064,0.5064},
-{2976471,3916900,3916398,0.303066666666667,0.303066666666667},
-{2976472,3918929,3919222,0.16910625,0.16910625},
-{2976473,3919222,3919575,0.191614285714286,0.185006896551724},
-{2976474,3919575,3919787,0.2652,1000000},
-{2976475,3919222,3918702,0.336444444444444,0.336444444444444},
-{2976476,3919575,3919012,0.579675,0.579675},
-{2976477,3918447,3918794,0.244145454545455,0.214848},
-{2976478,3918794,3918872,0.0644666666666667,0.046416},
-{2976479,3917210,3916749,0.740836363636364,0.740836363636364},
-{2976480,3917501,3917042,0.300644444444444,0.300644444444444},
-{2976481,3917501,3917819,0.191892857142857,0.26865},
-{2976482,3918447,3917819,0.32208,0.32208},
-{2976483,3918794,3918140,0.392377777777778,0.392377777777778},
-{2976484,3917819,3918140,0.17041875,0.302966666666667},
-{2976485,3918140,3918314,0.124636363636364,0.210923076923077},
-{2976486,3917819,3917348,0.328056,0.328056},
-{2976487,3916749,3916485,0.1308375,0.1308375},
-{2976488,3916485,3916226,0.162955555555556,0.162955555555556},
-{2976489,3921330,3921913,0.311088,0.235672727272727},
-{2976490,3921913,3922038,0.0687777777777778,0.0422045454545455},
-{2976491,3922038,3922384,0.215321739130435,0.126984615384615},
-{2976492,3922384,3922531,0.0783,0.0727071428571429},
-{2976497,3922384,3921881,0.490147826086956,0.256213636363636},
-{2976498,3921881,3921743,0.0970181818181818,0.0604075471698113},
-{2976499,3921743,3921531,0.13472,0.080832},
-{2976500,3922638,3922006,0.532066666666667,0.532066666666667},
-{2976501,3921743,3922006,0.1434,0.1434},
-{2976502,3921531,3921822,0.173582608695652,0.210126315789474},
-{2976503,3922006,3921822,0.243847058823529,0.243847058823529},
-{2976507,3922459,3922181,0.233488888888889,0.233488888888889},
-{2976508,3921822,3922181,0.20655,0.198288},
-{2976509,3921034,3920759,0.2098,0.2098},
-{2976510,3920759,3920479,0.217911111111111,0.217911111111111},
-{2976511,3920479,3920100,0.264711111111111,0.264711111111111},
-{2976512,3920759,3921019,0.148955555555556,0.148955555555556},
-{2976513,3920479,3920722,0.141533333333333,0.141533333333333},
-{2976514,3920100,3920382,0.140911111111111,0.140911111111111},
-{2976521,3922181,3922747,0.333830769230769,0.299296551724138},
-{2976522,3922181,3921958,0.191330769230769,0.191330769230769},
-{2976523,3921958,3921699,0.271114285714286,0.271114285714286},
-{2976524,3921958,3922252,0.149288888888889,0.149288888888889},
-{2976529,3921531,3921188,0.2239125,0.174760975609756},
-{2976530,3921188,3921041,0.132488888888889,0.0941368421052632},
-{2976531,3921041,3920820,0.226129411764706,0.142377777777778},
-{2976532,3921822,3921309,0.393333333333333,0.393333333333333},
-{2976533,3921041,3921309,0.155725,0.18687},
-{2976534,3921309,3921699,0.15615,0.16656},
-{2976535,3894597,3894633,0.0879103448275862,0.09105},
-{2976536,3895288,3895259,0.218256,0.341025},
-{2976537,3895084,3895359,0.202885714285714,0.21303},
-{2976538,3895359,3895735,0.291342857142857,0.2266},
-{2976539,3896027,3895887,1000000,1000000},
-{2976540,3895887,3896012,0.184511111111111,0.184511111111111},
-{2976541,3895887,3895833,0.159777777777778,0.159777777777778},
-{2976542,3895383,3895427,0.225888888888889,0.225888888888889},
-{2976543,3895518,3895383,0.0737555555555555,0.0737555555555555},
-{2976544,3895099,3895383,0.145844444444444,0.145844444444444},
-{2976545,3895722,3895938,1000000,1000000},
-{2976546,3895938,3895941,0.236933333333333,0.236933333333333},
-{2976547,3895308,3895809,0.294984,0.294984},
-{2976548,3896588,3896767,0.2237,0.2237},
-{2976549,3897432,3897626,0.182125,0.257117647058824},
-{2976550,3897626,3897379,0.284723076923077,0.284723076923077},
-{2976551,3898741,3899676,0.643121739130435,0.643121739130435},
-{2976552,3897834,3898569,0.453742857142857,0.433118181818182},
-{2976553,3898088,3898816,0.51761052631579,1000000},
-{2976554,3899083,3899997,0.61355,0.7012},
-{2976555,3899382,3900353,0.783284210526316,0.875435294117647},
-{2976556,3899045,3898848,0.114555555555556,0.114555555555556},
-{2976557,3899132,3899965,0.494060869565217,0.494060869565217},
-{2976558,3899866,3900750,0.659345454545454,0.659345454545454},
-{2976559,3900122,3900996,0.537266666666667,0.537266666666667},
-{2976560,3899399,3900303,0.449538461538462,0.46752},
-{2976561,3900374,3901254,1.46256,1000000},
-{2976562,3900541,3901482,0.583464,0.583464},
-{2976563,3900793,3901701,0.526511111111111,0.526511111111111},
-{2976564,3899846,3900793,0.581590909090909,0.556304347826087},
-{2976565,3900311,3901177,0.537066666666667,0.537066666666667},
-{2976566,3900898,3901105,0.176563636363636,0.2988},
-{2976567,3901084,3901326,1000000,1000000},
-{2976568,3901450,3901420,1000000,0.541309090909091},
-{2976569,3900548,3901043,0.239475,1000000},
-{2976570,3901326,3901420,0.104657142857143,0.104657142857143},
-{2976571,3901105,3901043,0.125727272727273,0.0864375},
-{2976572,3901043,3901391,0.416485714285714,1000000},
-{2976573,3901111,3901391,1000000,0.2762},
-{2976574,3901391,3901513,0.0767111111111111,0.0767111111111111},
-{2976575,3901799,3901420,0.3613875,1000000},
-{2976576,3901799,3902067,1000000,0.173425},
-{2976577,3901391,3901799,1000000,1000000},
-{2976578,3901513,3901655,0.0796444444444444,0.0796444444444444},
-{2976579,3901799,3901917,0.0694444444444444,0.0694444444444444},
-{2976580,3901917,3902090,0.0895777777777778,0.0895777777777778},
-{2976581,3902710,3902996,0.203628571428571,0.185921739130435},
-{2976582,3902285,3902710,0.175976470588235,0.161708108108108},
-{2976583,3901992,3902285,0.178475,0.186234782608696},
-{2976584,3902154,3903140,1.4718,1.4718},
-{2976585,3902410,3903396,1.12029230769231,1.12029230769231},
-{2976586,3902738,3903665,0.543444444444445,1.22275},
-{2976587,3902996,3903919,0.59328,0.570461538461538},
-{2976588,3901369,3901992,0.384792,0.310316129032258},
-{2976589,3901021,3901369,0.218060869565217,0.227972727272727},
-{2976590,3903919,3904193,0.134742857142857,0.150912},
-{2976591,3904193,3904483,0.22995,0.219},
-{2976592,3903257,3904193,1000000,0.505241379310345},
-{2976593,3902582,3903307,1000000,0.321051428571429},
-{2976594,3902338,3902582,1000000,0.120288888888889},
-{2976595,3902582,3902805,0.209894117647059,0.209894117647059},
-{2976596,3901369,3901557,0.116232,0.116232},
-{2976597,3901557,3901881,0.211176,0.211176},
-{2976598,3901557,3901798,0.136688888888889,0.136688888888889},
-{2976599,3902805,3903314,0.333666666666667,0.391695652173913},
-{2976600,3903314,3904244,0.529022222222222,0.751768421052632},
-{2976601,3898318,3898457,0.136366666666667,0.12918947368421},
-{2976602,3896306,3896871,1000000,1000000},
-{2976603,3904193,3905149,0.553022222222222,0.553022222222222},
-{2976604,3904552,3904758,0.15786,0.1754},
-{2976605,3904758,3904939,0.128672727272727,0.113232},
-{2976606,3904043,3904939,1000000,0.548832},
-{2976607,3904939,3905281,0.308873684210526,0.308873684210526},
-{2976608,3904415,3905281,0.578175,0.578175},
-{2976609,3904703,3905024,0.226657142857143,0.226657142857143},
-{2976610,3905713,3906391,0.4362,0.419423076923077},
-{2976611,3906155,3906391,0.155808,0.19476},
-{2976612,3904758,3905622,0.506644444444444,0.506644444444444},
-{2976613,3904939,3905814,0.5136,0.5136},
-{2976614,3905281,3906193,0.507222222222222,0.507222222222222},
-{2976615,3905560,3906439,0.45262,0.45262},
-{2976616,3905281,3905560,0.22032,0.22032},
-{2976617,3905024,3905560,0.476336842105263,0.476336842105263},
-{2976618,3905024,3905304,0.177222222222222,0.177222222222222},
-{2976619,3905560,3905920,0.307094117647059,0.307094117647059},
-{2976620,3905304,3905920,0.282075,0.282075},
-{2976621,3905030,3905304,0.191353846153846,0.226145454545455},
-{2976622,3905920,3906226,0.2433,0.2433},
-{2976623,3906226,3906350,0.0759333333333333,0.0759333333333333},
-{2976624,3906109,3906350,0.209115789473684,0.128167741935484},
-{2976625,3905861,3906109,0.148266666666667,0.148266666666667},
-{2976626,3905434,3905861,0.243288,0.217221428571429},
-{2976627,3906391,3907125,0.6820875,0.496063636363636},
-{2976628,3906391,3906635,0.20517,0.186518181818182},
-{2976629,3906635,3907420,0.4536,0.351174193548387},
-{2976630,3907122,3907725,0.310628571428571,0.347904},
-{2976631,3907725,3908048,0.17015,0.145842857142857},
-{2976632,3907420,3907725,0.151022222222222,0.151022222222222},
-{2976633,3907125,3907420,0.152022222222222,0.157869230769231},
-{2976634,3906830,3907125,0.155123076923077,0.16805},
-{2976635,3905920,3906779,0.4201125,0.480128571428571},
-{2976636,3906226,3907136,0.493088888888889,0.493088888888889},
-{2976637,3906901,3907273,0.211968,0.203815384615385},
-{2976638,3906620,3906901,0.134678571428571,0.101918918918919},
-{2976639,3906350,3906620,0.18065,0.154842857142857},
-{2976640,3907125,3907897,0.401266666666667,0.492463636363636},
-{2976641,3907420,3908219,0.388971428571429,0.388971428571429},
-{2976642,3907725,3908546,0.404377777777778,0.404377777777778},
-{2976643,3908546,3908862,0.163872,0.157569230769231},
-{2976644,3908219,3908546,0.175591304347826,0.155330769230769},
-{2976645,3907897,3908219,0.187527272727273,0.1719},
-{2976646,3907596,3907897,0.180027272727273,0.1886},
-{2976647,3908546,3909347,0.409377777777778,0.409377777777778},
-{2976648,3908219,3909051,0.381041379310345,0.381041379310345},
-{2976649,3907897,3908750,0.426092307692308,0.481669565217391},
-{2976650,3906901,3907970,0.547533333333333,0.547533333333333},
-{2976651,3906620,3907647,0.544888888888889,0.544888888888889},
-{2976652,3906350,3907365,0.556377777777778,0.556377777777778},
-{2976653,3907970,3908283,0.161266666666667,0.161266666666667},
-{2976654,3908283,3908725,0.26448,0.240436363636364},
-{2976655,3906109,3907032,0.542466666666667,0.542466666666667},
-{2976656,3905861,3906727,0.539355555555556,0.539355555555556},
-{2976657,3907647,3907987,0.208828571428571,0.208828571428571},
-{2976658,3906727,3907033,0.2622,0.247633333333333},
-{2976659,3907987,3908283,0.160272,0.174208695652174},
-{2976660,3907675,3907987,0.142220689655172,0.158630769230769},
-{2976661,3907390,3907675,0.151546153846154,0.171313043478261},
-{2976662,3907033,3907390,0.1896,0.156910344827586},
-{2976663,3908283,3909023,0.365066666666667,0.365066666666667},
-{2976664,3907987,3908720,0.364466666666667,0.364466666666667},
-{2976665,3907675,3908363,1.38282857142857,1.38282857142857},
-{2976666,3909023,3909420,0.254228571428571,0.254228571428571},
-{2976667,3908720,3909023,0.169675,0.169675},
-{2976668,3908363,3908720,0.187017391304348,0.187017391304348},
-{2976669,3908720,3909433,0.370733333333333,0.370733333333333},
-{2976670,3909023,3909712,0.366755555555556,0.366755555555556},
-{2976671,3909098,3909638,0.293133333333333,0.293133333333333},
-{2976672,3909098,3909524,0.249511111111111,0.249511111111111},
-{2976673,3909638,3909910,0.143822222222222,0.143822222222222},
-{2976674,3909635,3909910,0.19737,0.179427272727273},
-{2976675,3910284,3910616,0.208957894736842,0.208957894736842},
-{2976676,3910729,3911034,0.148846153846154,0.175909090909091},
-{2976677,3909910,3910252,0.174417391304348,0.174417391304348},
-{2976678,3910252,3910616,0.194536363636364,0.194536363636364},
-{2976679,3910616,3911034,0.205088888888889,0.205088888888889},
-{2976680,3909638,3910063,0.263977777777778,0.263977777777778},
-{2976681,3909222,3909524,0.20445,0.20445},
-{2976682,3909524,3910063,0.273,0.273},
-{2976683,3909910,3910824,0.495260869565217,0.35596875},
-{2976684,3910252,3911112,0.401066666666667,0.401066666666667},
-{2976685,3910616,3911402,0.6203,0.6203},
-{2976686,3910824,3911112,0.12075,0.1288},
-{2976687,3911112,3911402,0.0960878048780488,0.119381818181818},
-{2976688,3911587,3911580,0.257710344827586,0.257710344827586},
-{2976689,3911580,3912357,0.33744375,0.830630769230769},
-{2976690,3911580,3911455,0.247129411764706,0.247129411764706},
-{2976691,3911455,3911370,0.153987096774194,0.153987096774194},
-{2976692,3911455,3912052,0.319155555555556,0.319155555555556},
-{2976693,3911370,3911778,0.2164,0.2164},
-{2976694,3913016,3912447,0.32388,0.32388},
-{2976695,3914381,3914722,0.197355555555556,0.197355555555556},
-{2976696,3913795,3913966,0.0993714285714286,0.0907304347826087},
-{2976697,3912447,3912954,0.443446153846154,0.443446153846154},
-{2976698,3914787,3914381,0.349266666666667,0.392925},
-{2976699,3914722,3914335,0.210488888888889,0.210488888888889},
-{2976700,3913966,3913374,0.425611764705882,0.344542857142857},
-{2976701,3913966,3914207,0.13005,0.13005},
-{2976702,3914335,3914207,0.0702666666666667,0.0702666666666667},
-{2976703,3914207,3914529,0.175269230769231,0.1519},
-{2976704,3914529,3914843,0.211617391304348,0.2028},
-{2976705,3914722,3914980,0.169466666666667,0.169466666666667},
-{2976706,3914980,3914529,0.445658823529412,0.3294},
-{2976707,3915307,3914980,0.3132,0.261},
-{2976708,3915607,3914843,0.478928571428571,0.478928571428571},
-{2976709,3914843,3914465,0.277314285714286,0.200813793103448},
-{2976710,3913374,3914465,0.474461538461538,0.474461538461538},
-{2976711,3911844,3912704,0.401688888888889,0.401688888888889},
-{2976712,3912103,3913079,0.423288888888889,0.423288888888889},
-{2976713,3912353,3913396,1.02765,0.493272},
-{2976714,3912682,3913777,0.484222222222222,0.484222222222222},
-{2976715,3912052,3912353,0.163225,0.163225},
-{2976716,3911778,3912052,0.138688888888889,0.138688888888889},
-{2976717,3912052,3912671,0.294022222222222,0.294022222222222},
-{2976718,3911778,3912329,0.278866666666667,0.278866666666667},
-{2976719,3916229,3915449,0.486488888888889,0.486488888888889},
-{2977132,3896234,3895226,0.475156097560976,0.572982352941176},
-{2977133,3896234,3895988,0.187145454545455,1000000},
-{2977148,3899326,3899037,0.147537931034483,0.164561538461538},
-{2977149,3899587,3899326,0.163152,0.145671428571429},
-{2977150,3899686,3899587,0.073,0.0589615384615385},
-{2977151,3900069,3899686,0.250718181818182,0.204288888888889},
-{2977153,3899289,3899706,0.47596,0.310408695652174},
-{2977155,3899587,3899706,0.101621052631579,0.09654},
-{2977156,3899706,3900323,0.439114285714286,0.439114285714286},
-{2977157,3899706,3900069,0.358023529411765,0.338133333333333},
-{2977158,3900069,3900664,0.46338,0.487768421052632},
-{2977160,3902463,3901734,0.479018181818182,0.390311111111111},
-{2977162,3898921,3899326,0.404485714285714,0.2574},
-{2977163,3899208,3898921,0.229010526315789,0.2072},
-{2977164,3899208,3899587,0.207642857142857,0.223615384615385},
-{2977165,3899686,3899680,0.08896,0.116034782608696},
-{2977166,3899691,3899680,0.23328,0.208285714285714},
-{2977167,3900269,3899680,0.316,0.316},
-{2977168,3898920,3899208,0.163823076923077,0.163823076923077},
-{2977169,3899439,3898920,0.853466666666667,0.853466666666667},
-{2977170,3899691,3899439,0.140866666666667,0.152136},
-{2977171,3899439,3899214,0.151226086956522,0.1581},
-{2977172,3899911,3899691,0.170345454545455,0.15615},
-{2977173,3900963,3900592,0.385835294117647,1000000},
-{2977178,3898921,3898398,0.5451,0.346881818181818},
-{2977179,3898249,3898921,0.4389,0.4389},
-{2977180,3897693,3898249,0.4178,0.358114285714286},
-{2977181,3898559,3898920,0.207384,0.192022222222222},
-{2977184,3903356,3902463,0.517984615384615,0.517984615384615},
-{2977194,3905502,3905056,0.294688888888889,0.294688888888889},
-{2977195,3904397,3905075,0.366377777777778,0.366377777777778},
-{2977199,3906044,3905891,0.240911111111111,0.240911111111111},
-{2977267,3894795,3894171,1000000,0.4114},
-{2977268,3895336,3894795,1000000,0.485808},
-{2977269,3894795,3895103,0.3888,0.416571428571429},
-{2977270,3896594,3897215,1000000,0.414485714285714},
-{2977271,3896109,3896594,1000000,0.4338},
-{2977272,3895625,3895433,0.146066666666667,0.146066666666667},
-{2977273,3897675,3897991,0.29988,1000000},
-{2977274,3897335,3897675,0.26625,1000000},
-{2977275,3898514,3897675,0.488925,0.510182608695652},
-{2977276,3899323,3898854,0.34494,0.34494},
-{2977277,3898932,3898514,0.314154545454545,0.300495652173913},
-{2977278,3899454,3898932,0.294728571428571,0.2578875},
-{2977279,3898715,3898285,0.287225,0.287225},
-{2977280,3899228,3898715,1.62408,0.624646153846154},
-{2977281,3899412,3899606,0.140904,0.135484615384615},
-{2977282,3899606,3900141,0.278192307692308,0.267888888888889},
-{2977283,3900141,3899911,0.17105,0.17105},
-{2977284,3900495,3900141,0.1668,0.160384615384615},
-{2977285,3900495,3900963,0.312168,0.289044444444444},
-{2977286,3899670,3899606,0.193936363636364,0.147124137931034},
-{2977287,3900589,3900495,0.0769384615384615,0.0740888888888889},
-{2977288,3900753,3900589,0.109177777777778,0.105278571428571},
-{2977289,3900144,3900589,0.278448,0.267738461538462},
-{2977290,3899774,3900144,0.229636363636364,0.229636363636364},
-{2977291,3900144,3900546,0.343768421052632,0.296890909090909},
-{2977292,3899774,3899670,0.0837272727272727,0.07368},
-{2977293,3900154,3899774,0.292581818181818,0.279860869565217},
-{2977294,3900279,3900546,0.190278260869565,0.18235},
-{2977295,3900154,3900279,0.0808909090909091,0.071184},
-{2977296,3899454,3900154,1000000,1000000},
-{2977297,3899228,3899454,0.153542857142857,0.16122},
-{2977298,3898932,3899323,0.201755555555556,0.18158},
-{2977299,3898715,3898932,0.142486956521739,0.131088},
-{2977300,3898503,3898715,0.177633333333333,0.21316},
-{2977301,3898423,3897856,0.34335,0.2289},
-{2977302,3901301,3900963,0.200844444444444,1000000},
-{2977303,3901301,3901487,0.11415652173913,0.11415652173913},
-{2977304,3900753,3901301,0.343121739130435,0.328825},
-{2977305,3901461,3901257,0.126225,0.1377},
-{2977306,3901729,3901461,0.243564705882353,0.295757142857143},
-{2977307,3900546,3900725,0.141757894736842,0.128257142857143},
-{2977308,3900725,3901461,0.462954545454546,0.7275},
-{2977309,3899817,3899454,0.31587,0.263225},
-{2977310,3900279,3900684,1000000,1000000},
-{2977311,3898343,3898559,0.115155555555556,0.115155555555556},
-{2977312,3901487,3901730,1000000,0.168425},
-{2977313,3901257,3901730,0.236871428571429,0.236871428571429},
-{2977314,3901730,3901897,0.112822222222222,0.112822222222222},
-{2977315,3904022,3903356,0.488454545454545,0.488454545454545},
-{2977316,3902864,3903928,0.646357894736842,0.646357894736842},
-{2977317,3903928,3904022,0.09075,0.08712},
-{2977318,3903846,3903928,0.10728,0.0957857142857143},
-{2977319,3903568,3903846,0.2444,0.279314285714286},
-{2977320,3904117,3903846,0.1104,0.123648},
-{2977321,3904638,3904117,0.219716129032258,0.34056},
-{2977322,3904232,3904117,1000000,1000000},
-{2977323,3902439,3901729,0.312688235294118,0.279773684210526},
-{2977324,3903263,3902439,0.334894736842105,0.343945945945946},
-{2977325,3904773,3905110,0.35096,0.277073684210526},
-{2977326,3905509,3905110,0.238056,0.270518181818182},
-{2977327,3906066,3905509,0.2488,0.257379310344828},
-{2977329,3905143,3904773,0.194828571428571,0.2273},
-{2977330,3905143,3905509,0.218088888888889,0.218088888888889},
-{2977331,3905526,3905143,0.2187375,0.2187375},
-{2977332,3905663,3905825,1000000,1000000},
-{2977428,3896741,3896109,1000000,0.541275},
-{2977429,3896741,3897235,0.36909,1000000},
-{2977430,3896175,3896741,0.338644444444444,1000000},
-{2977431,3897181,3896741,1000000,0.33835},
-{2977432,3898266,3897881,0.438284210526316,1000000},
-{2977433,3897617,3897644,1000000,0.312525},
-{2977434,3897617,3898266,0.348257142857143,0.348257142857143},
-{2977435,3898451,3898266,0.178745454545455,1000000},
-{2977436,3898646,3898451,0.19476,1000000},
-{2977437,3898951,3898646,0.299147368421053,1000000},
-{2977438,3898451,3898896,0.322833333333333,0.29055},
-{2977439,3897729,3898451,0.421657142857143,0.354192},
-{2977440,3897699,3897729,0.05922,0.074025},
-{2977441,3897294,3897614,0.187377777777778,0.187377777777778},
-{2977442,3899341,3899094,0.58662,0.58662},
-{2977443,3898961,3899341,0.209836363636364,0.19235},
-{2977444,3899868,3899341,0.257897142857143,0.347169230769231},
-{2977445,3899352,3899868,0.416858823529412,0.272561538461538},
-{2977446,3900359,3899868,0.263571428571429,0.351428571428571},
-{2977447,3903012,3901967,1000000,0.736771428571429},
-{2977448,3903475,3902566,0.675409090909091,1000000},
-{2977451,3903513,3903475,0.068175,0.0389571428571429},
-{2977452,3903513,3903954,0.194861538461538,0.220278260869565},
-{2977453,3903954,3903889,0.42624,0.202971428571429},
-{2977454,3904053,3903954,0.179825,0.172632},
-{2977455,3903954,3904344,0.234,0.221},
-{2977456,3904344,3904746,0.23217,0.244389473684211},
-{2977457,3904409,3904344,0.646714285714286,0.646714285714286},
-{2977458,3904811,3904746,0.163511111111111,0.163511111111111},
-{2977459,3904409,3904053,0.176618181818182,0.176618181818182},
-{2977460,3904811,3904409,0.1809,0.213790909090909},
-{2977461,3905403,3904811,0.662466666666667,0.6276},
-{2977465,3905295,3905197,1000000,1000000},
-{2977467,3904282,3904421,0.25215,0.25215},
-{2977468,3904421,3904712,0.2606,0.300692307692308},
-{2977469,3904712,3904565,0.198133333333333,0.274338461538462},
-{2977470,3904746,3904712,0.357857142857143,0.357857142857143},
-{2977471,3904858,3904931,0.194777777777778,0.194777777777778},
-{2977586,3918140,3917638,0.290022222222222,0.290022222222222},
-{2977587,3917191,3917627,0.291822222222222,0.291822222222222},
-{2977588,3917627,3918274,0.418375,0.6694},
-{2977589,3917348,3917192,0.0956222222222222,0.0956222222222222},
-{2977590,3916226,3916841,0.389044444444444,0.389044444444444},
-{2977591,3916841,3917155,0.1982,0.1982},
-{2977592,3917155,3917207,0.247758620689655,0.247758620689655},
-{2977593,3916485,3917023,0.331066666666667,0.331066666666667},
-{2977594,3917023,3917018,0.101355555555556,0.101355555555556},
-{2977595,3917018,3916841,0.101711111111111,0.101711111111111},
-{2977596,3916841,3916587,0.158044444444444,0.158044444444444},
-{2977597,3916587,3915768,0.501466666666667,0.501466666666667},
-{2977598,3916912,3916093,0.504044444444444,0.504044444444444},
-{2977599,3917411,3917155,0.193107692307692,0.193107692307692},
-{2977600,3917207,3917449,0.210365217391304,0.2304},
-{2977601,3917449,3917740,0.154529032258065,0.154529032258065},
-{2977602,3917449,3917258,0.166577777777778,0.166577777777778},
-{2977603,3917258,3917009,0.230371428571429,0.230371428571429},
-{2977604,3917042,3917102,0.203755555555556,0.203755555555556},
-{2977605,3917102,3917192,0.0468888888888889,0.0468888888888889},
-{2977606,3917191,3917192,0.109688888888889,0.109688888888889},
-{2977607,3917122,3917191,0.0432,0.0432},
-{2977608,3917018,3917122,0.0462222222222222,0.0462222222222222},
-{2977609,3917102,3917023,0.0358444444444444,0.0358444444444444},
-{2977610,3917122,3917155,0.151941176470588,0.151941176470588},
-{2977611,3917880,3918540,0.607866666666667,0.521028571428571},
-{2977612,3918540,3918274,0.156444444444444,0.156444444444444},
-{2977613,3918148,3918849,1.25273333333333,1.25273333333333},
-{2977614,3918314,3919021,0.475968,0.475968},
-{2977615,3918476,3919466,0.613955555555555,0.613955555555555},
-{2977616,3917740,3917486,0.186755555555556,0.186755555555556},
-{2977617,3917486,3917268,0.206242105263158,0.206242105263158},
-{2977618,3917740,3917928,0.121878260869565,0.133485714285714},
-{2977619,3917928,3918006,0.114789473684211,0.114789473684211},
-{2977620,3917928,3918207,0.154488888888889,0.154488888888889},
-{2977621,3918207,3918655,0.286771428571429,0.286771428571429},
-{2977622,3918006,3917749,0.147111111111111,0.147111111111111},
-{2977623,3917749,3917533,0.152222222222222,0.152222222222222},
-{2977624,3917486,3917749,0.189104347826087,0.189104347826087},
-{2977625,3918006,3918496,0.342314285714286,0.342314285714286},
-{2977626,3889636,3890557,0.431844444444444,0.353327272727273},
-{2977627,3891036,3891401,0.237457142857143,0.191792307692308},
-{2977628,3886153,3886302,1000000,1000000},
-{2977629,3885480,3885966,0.2589,1000000},
-{2977630,3890420,3891272,1000000,1000000},
-{2977631,3891244,3890420,1000000,1000000},
-{2977632,3880453,3880675,0.134422222222222,0.134422222222222},
-{2977633,3880883,3880986,0.1742,1000000},
-{2977634,3880761,3880883,1000000,0.1814},
-{2977635,3921699,3921989,0.1338,0.2007},
-{2977636,3921989,3922325,0.222057142857143,0.222057142857143},
-{2977639,3922252,3921989,0.191266666666667,0.191266666666667},
-{2977643,3922265,3920935,0.881688888888889,0.881688888888889},
-{2977645,3921963,3921208,0.489244444444444,0.489244444444444},
-{2977652,3918655,3918496,0.200428571428571,0.21045},
-{2977653,3918496,3918329,0.126690909090909,0.149314285714286},
-{2977654,3918329,3918119,0.20685,0.197},
-{2977655,3917749,3918329,0.27732,0.27732},
-{2977656,3918958,3918452,0.6546,1.45466666666667},
-{2977657,3918958,3919226,0.152488888888889,0.117634285714286},
-{2977658,3919226,3918721,0.479822222222222,0.479822222222222},
-{2977659,3919226,3919509,0.106866666666667,0.0874363636363636},
-{2977660,3919509,3919793,0.108566666666667,0.0930571428571429},
-{2977661,3919793,3920060,0.164424,0.146807142857143},
-{2977662,3919509,3918997,0.481977777777778,0.481977777777778},
-{2977663,3919793,3919248,0.483511111111111,0.483511111111111},
-{2977664,3920935,3920379,0.570704347826087,2.1877},
-{2977665,3921208,3920648,0.557181818181818,0.557181818181818},
-{2977670,3913361,3914521,0.515089655172414,0.515089655172414},
-{2977671,3913728,3914826,0.569488888888889,0.569488888888889},
-{2977672,3914090,3915101,0.479145454545454,0.52706},
-{2977673,3914369,3915330,0.575142857142857,0.575142857142857},
-{2977674,3914648,3915569,0.650256,0.650256},
-{2977675,3914870,3915811,0.866747368421053,0.633392307692308},
-{2977676,3915085,3916068,0.522774193548387,0.463028571428571},
-{2977677,3914090,3914369,0.1824,0.161353846153846},
-{2977678,3914369,3914648,0.133567741935484,0.106169230769231},
-{2977679,3914648,3914870,0.125670967741935,0.105291891891892},
-{2977680,3914870,3915085,0.137935714285714,0.133179310344828},
-{2977681,3914833,3915085,0.158076923076923,0.146785714285714},
-{2977682,3920648,3920011,0.5186,0.5186},
-{2977683,3920379,3919769,0.497311111111111,0.497311111111111},
-{2977684,3921461,3920907,0.431066666666667,0.431066666666667},
-{2977685,3921758,3921207,0.533342857142857,0.533342857142857},
-{2977686,3922051,3921508,1.87,1.87},
-{2977690,3920907,3920274,0.528711111111111,0.528711111111111},
-{2977691,3921207,3920546,0.554355555555556,0.554355555555556},
-{2977692,3921508,3920793,0.580511111111111,0.580511111111111},
-{2977696,3922109,3921378,0.568955555555555,0.568955555555555},
-{2977700,3919541,3919769,0.147790909090909,0.180633333333333},
-{2977701,3919769,3919834,0.0430846153846154,0.03734},
-{2977702,3919834,3920011,0.0954967741935484,0.0925125},
-{2977703,3920011,3920085,0.0357352941176471,0.0368181818181818},
-{2977704,3920085,3920274,0.0762171428571429,0.0808363636363636},
-{2977705,3920274,3920372,0.03945,0.0405771428571429},
-{2977706,3920372,3920546,0.0773666666666667,0.0819176470588235},
-{2977707,3920546,3920793,0.11688,0.11688},
-{2977708,3920793,3921039,0.116329411764706,0.1236},
-{2977709,3921378,3921754,0.131152941176471,0.135127272727273},
-{2977712,3919834,3919629,0.154266666666667,0.154266666666667},
-{2977713,3920085,3919925,0.128066666666667,0.128066666666667},
-{2977714,3920372,3920191,0.0953555555555556,0.0953555555555556},
-{2977715,3919629,3919925,1000000,1000000},
-{2977716,3919925,3920191,1000000,1000000},
-{2977818,3902059,3902191,0.686013333333333,0.735014285714286},
-{2977819,3902191,3902255,0.260022857142857,0.2528},
-{2977822,3903384,3903428,0.2322,0.259517647058824},
-{2977823,3903482,3903428,0.153761538461538,0.159912},
-{2977824,3903534,3903482,0.181875,0.167884615384615},
-{2977825,3903987,3904039,0.276923076923077,0.2},
-{2977826,3904039,3904042,0.0654,0.04905},
-{2977827,3904042,3904107,0.193870588235294,0.1831},
-{2977828,3904128,3904107,0.0429157894736842,0.05436},
-{2977829,3904190,3904128,0.2712,0.2712},
-{2977830,3903428,3904042,0.258466666666667,0.258466666666667},
-{2977831,3903482,3904107,0.8718,0.8718},
-{2977832,3903534,3904190,0.28956,0.28956},
-{2977834,3902416,3902458,0.0722222222222222,0.0722222222222222},
-{2977835,3902458,3903534,0.60153,0.60153},
-{2977837,3898183,3898224,0.14421,0.1802625},
-{2977838,3898224,3898290,0.202176,0.229745454545455},
-{2977839,3898290,3898345,0.112118181818182,0.16444},
-{2977840,3897986,3898345,0.133755555555556,0.133755555555556},
-{2977841,3898345,3898679,0.1818,0.2121},
-{2977842,3898679,3899011,0.143284615384615,0.161973913043478},
-{2977843,3899011,3899393,0.159,0.178875},
-{2977844,3898535,3898679,0.479263636363636,0.620223529411765},
-{2977845,3898867,3899011,1000000,1000000},
-{2977846,3898679,3898818,0.4575,1000000},
-{2977847,3899011,3899173,1000000,1000000},
-{2977848,3898669,3898818,0.0640444444444445,0.0640444444444445},
-{2977849,3899173,3899543,0.2328,0.201054545454545},
-{2977850,3898224,3898290,0.3104,0.3104},
-{2978074,3898347,3900553,1000000,1000000},
-{2978075,3900553,3901122,0.534333333333333,0.534333333333333},
-{2978076,3899053,3900878,1000000,1000000},
-{2978078,3902332,3902071,0.1281,0.1281},
-{2978079,3902608,3902332,0.143936842105263,1000000},
-{2978080,3902608,3903138,1000000,1000000},
-{2978081,3902071,3902904,0.659778947368421,0.659778947368421},
-{2978082,3902806,3902904,0.0784434782608696,0.0644357142857143},
-{2978083,3902904,3903036,1000000,1000000},
-{2978084,3902332,3903036,1000000,1000000},
-{2978085,3902608,3903364,1000000,0.861214285714286},
-{2978086,3903138,3903249,1000000,1000000},
-{2978087,3903249,3903708,1000000,0.74604},
-{2978088,3903249,3903438,0.2331,0.2331},
-{2978089,3903860,3903708,0.08468,0.0940888888888889},
-{2978090,3903438,3903708,0.217868571428571,0.24598064516129},
-{2978091,3903438,3903364,0.0756,0.061425},
-{2978092,3903364,3903308,0.0722608695652174,0.0615555555555555},
-{2978093,3902574,3903044,0.3028,0.24224},
-{2978094,3903258,3903479,0.162872727272727,0.23888},
-{2978095,3903479,3903633,0.1578,0.1578},
-{2978096,3903711,3903933,0.160309090909091,0.195933333333333},
-{2978097,3903933,3904175,0.128232,0.133575},
-{2978098,3903479,3903933,0.272688888888889,0.272688888888889},
-{2978099,3903457,3903633,0.137568,0.181010526315789},
-{2978100,3903633,3904175,0.210891428571429,0.263614285714286},
-{2978101,3904175,3904719,0.316533333333333,0.305228571428571},
-{2978102,3905124,3904667,0.258955555555555,0.258955555555555},
-{2978103,3905351,3905991,0.636234782608696,0.48778},
-{2978211,3907068,3907801,0.413975,0.382130769230769},
-{2978212,3905351,3906621,0.848305263157895,0.848305263157895},
-{2978213,3909727,3911178,0.626288888888889,0.626288888888889},
-{2978214,3908279,3910214,0.790222222222222,0.790222222222222},
-{2978215,3911414,3911718,0.392426086956522,0.392426086956522},
-{2978216,3912006,3911718,0.2315,0.264571428571429},
-{2978217,3911718,3911807,0.1032,0.1032},
-{2978218,3911807,3912502,0.530333333333333,0.530333333333333},
-{2978219,3911807,3913018,0.4414,0.4414},
-{2978220,3913018,3913364,0.242822222222222,0.242822222222222},
-{2978221,3913018,3913548,0.201466666666667,0.201466666666667},
-{2978222,3912502,3913018,0.307333333333333,0.307333333333333},
-{2978224,3914167,3914679,0.478854545454546,0.478854545454546},
-{2978226,3915408,3915715,0.269807142857143,0.4197},
-{2978231,3915715,3916464,0.450192857142857,0.484823076923077},
-{2978232,3915906,3916712,0.469721739130435,0.469721739130435},
-{2978233,3915648,3916452,0.407866666666667,0.407866666666667},
-{2978238,3923628,3924024,0.483505263157895,0.483505263157895},
-{2978240,3922675,3922709,0.603133333333334,0.603133333333334},
-{2978241,3922033,3922329,0.281844444444444,0.281844444444444},
-{2978242,3922329,3922227,0.0674888888888889,0.0674888888888889},
-{2978244,3921771,3922020,0.264847058823529,0.264847058823529},
-{2978245,3921771,3921938,0.39424,0.39424},
-{2978246,3922020,3921938,0.10012,0.10012},
-{2978247,3922918,3923520,0.536888888888889,0.536888888888889},
-{2978248,3922841,3923398,0.83324,0.83324},
-{2978249,3923041,3923320,0.315872727272727,0.315872727272727},
-{2978250,3921559,3921678,0.388,0.388},
-{2978251,3922244,3921763,0.2746,0.2746},
-{2978252,3921763,3921975,0.152044444444444,0.152044444444444},
-{2978253,3921975,3922168,0.124,0.239142857142857},
-{2978254,3922168,3922257,0.0606521739130435,0.0775},
-{2978255,3922345,3922556,0.343244444444444,1000000},
-{2978256,3921111,3921291,0.191964705882353,0.1554},
-{2978257,3921194,3921291,0.0826,0.0874588235294118},
-{2978258,3921194,3920842,0.29691,0.6598},
-{2978259,3920755,3920636,0.110929411764706,0.110929411764706},
-{2978364,3859221,3858420,0.56448,0.56448},
-{2978365,3857672,3858477,0.366652173913043,0.383318181818182},
-{2978366,3858477,3858825,0.143133333333333,0.143133333333333},
-{2978367,3858825,3858815,0.0874666666666667,0.0874666666666667},
-{2978368,3858825,3858972,0.100022222222222,0.100022222222222},
-{2978369,3858815,3858792,0.164844444444444,0.164844444444444},
-{2978370,3864715,3864281,1000000,0.256246153846154},
-{2978371,3865232,3864715,1000000,0.36255},
-{2978372,3864715,3865417,1.37145882352941,0.932592},
-{2978373,3864281,3863872,1000000,1000000},
-{2978374,3865923,3865417,0.191688888888889,0.191688888888889},
-{2978375,3866283,3865825,0.2619,0.428563636363636},
-{2978376,3865417,3865459,0.19205,0.19205},
-{2978377,3865905,3865459,0.208745454545455,0.255133333333333},
-{2978378,3865459,3865078,1000000,1000000},
-{2978379,3864453,3863923,0.441623076923077,0.410078571428571},
-{2978380,3863397,3863171,0.183504,0.254866666666667},
-{2978381,3863171,3863165,0.04743,0.07905},
-{2978382,3863898,3863397,0.306888888888889,0.306888888888889},
-{2978383,3864018,3863898,0.084984,0.0786888888888889},
-{2978384,3863898,3863165,0.5058,0.684317647058823},
-{2978385,3865300,3865063,0.27147,0.246790909090909},
-{2978386,3863490,3863181,0.174933333333333,0.174933333333333},
-{2978387,3869865,3868713,1000000,1.71036923076923},
-{2978388,3869421,3868258,0.692557894736842,1000000},
-{2978389,3871944,3870419,0.9498,0.904571428571429},
-{2978390,3871539,3869421,1.12785,1000000},
-{2978391,3867564,3867354,0.217226086956522,0.3122625},
-{2978392,3866487,3867354,1000000,0.7579},
-{2978393,3867788,3867450,0.1926,0.4066},
-{2978394,3867450,3866503,0.555795,0.555795},
-{2978395,3867450,3867835,0.567533333333333,0.547264285714286},
-{2978396,3868458,3867835,0.27085,0.250015384615385},
-{2978397,3872921,3872568,1000000,0.428742857142857},
-{2978398,3874738,3875430,0.641444444444444,0.641444444444444},
-{2978399,3876195,3876267,0.338715789473684,0.32178},
-{2978400,3876195,3875347,1.01621052631579,1.20675},
-{2978401,3878307,3877054,0.654709090909091,1000000},
-{2978403,3851558,3850581,0.632975,0.632975},
-{2978404,3850917,3851402,0.317333333333333,0.317333333333333},
-{2978405,3851322,3851558,0.1712,0.1712},
-{2978406,3851558,3851717,0.0927857142857143,0.0787272727272727},
-{2978407,3851717,3851923,0.117222222222222,0.117222222222222},
-{2978408,3851717,3852219,0.237444444444444,0.221068965517241},
-{2978409,3852219,3851969,0.156888,0.170530434782609},
-{2978410,3852219,3852755,0.2037,0.197129032258065},
-{2978411,3852517,3852755,0.155866666666667,0.155866666666667},
-{2978412,3853628,3853251,0.219022222222222,0.219022222222222},
-{2978413,3854673,3854371,0.175778571428571,0.182288888888889},
-{2978414,3856584,3854673,0.773225806451613,0.647837837837838},
-{2978415,3857349,3856768,0.603069230769231,1000000},
-{2978416,3854520,3854282,0.26841,0.282536842105263},
-{2978417,3854801,3854282,0.251622222222222,0.251622222222222},
-{2978418,3856030,3854801,0.601177777777778,0.601177777777778},
-{2978419,3854801,3854561,0.204866666666667,0.204866666666667},
-{2978420,3854561,3853990,0.24858,0.225981818181818},
-{2978421,3855889,3854561,0.564165517241379,0.4812},
-{2978422,3856181,3855870,0.548781818181818,0.482928},
-{2978423,3856692,3856181,0.280896,0.270092307692308},
-{2978424,3856873,3856692,0.119222222222222,0.119222222222222},
-{2978425,3858477,3858444,0.358976470588235,0.30513},
-{2978426,3858444,3858373,1000000,0.156966666666667},
-{2978427,3858716,3858383,0.335538461538462,0.335538461538462},
-{2978428,3860073,3859918,0.183814285714286,0.270884210526316},
-{2978429,3859411,3859199,0.519564705882353,0.519564705882353},
-{2978430,3859199,3858716,0.54675652173913,0.54675652173913},
-{2978431,3861228,3860962,0.192327272727273,0.222694736842105},
-{2978432,3861677,3861228,0.282688235294118,0.32038},
-{2978433,3859033,3858716,0.239937931034483,0.23194},
-{2978434,3859918,3859033,1.039575,1.039575},
-{2978435,3860895,3860471,0.324378947368421,0.3424},
-{2978436,3860471,3859571,0.755622222222222,0.755622222222222},
-{2978437,3859571,3859236,0.15828,0.164875},
-{2978438,3860962,3860598,0.2308,0.2885},
-{2978439,3860598,3860237,0.19861875,0.2354},
-{2978440,3860237,3859798,0.246507692307692,0.291327272727273},
-{2978441,3859798,3859571,0.206311111111111,0.206311111111111},
-{2978442,3863171,3862741,0.201977777777778,0.201977777777778},
-{2978443,3862055,3862744,0.977133333333333,0.977133333333333},
-{2978444,3862653,3862744,0.0822666666666667,0.0822666666666667},
-{2978445,3862744,3863025,0.243988235294118,0.243988235294118},
-{2978446,3863025,3863184,0.125345454545455,0.17235},
-{2978447,3862568,3862324,0.15414,0.12845},
-{2978448,3863184,3862946,0.256095652173913,0.280485714285714},
-{2978449,3865816,3866058,1000000,1000000},
-{2978450,3866058,3866150,0.122177777777778,0.122177777777778},
-{2978451,3866150,3865659,0.201,0.201},
-{2978452,3865662,3865659,0.0864727272727273,0.0679428571428571},
-{2978453,3866150,3866232,0.11355,0.0973285714285714},
-{2978454,3866232,3865662,0.231192,0.3211},
-{2978455,3868655,3868754,1000000,0.12048},
-{2978456,3869689,3869066,0.769771428571429,1000000},
-{2978457,3867869,3867474,1000000,0.207885714285714},
-{2978458,3868268,3867869,1000000,0.1686},
-{2978459,3868402,3868268,1000000,0.0691090909090909},
-{2978460,3868211,3868402,0.323060869565217,1000000},
-{2978461,3869032,3868402,1000000,0.294457142857143},
-{2978462,3869873,3869190,1000000,0.394366666666667},
-{2978463,3870878,3870540,1000000,0.5268},
-{2978464,3867613,3867017,0.4268,0.376588235294118},
-{2978465,3867869,3867613,0.332217391304348,0.272892857142857},
-{2978466,3867613,3867688,0.172338461538462,0.106685714285714},
-{2978467,3868268,3867968,0.587584615384615,1000000},
-{2978468,3868402,3868567,0.283105263157895,1000000},
-{2978469,3871291,3870878,1000000,0.740505882352941},
-{2978470,3867017,3867170,0.473723076923077,0.473723076923077},
-{2978471,3870285,3870098,1000000,0.56502},
-{2978472,3871395,3870973,0.522978947368421,1000000},
-{2978473,3873412,3874448,0.515363636363636,0.515363636363636},
-{2978474,3874448,3874419,0.270385714285714,0.164582608695652},
-{2978475,3876052,3875960,0.225044444444444,0.225044444444444},
-{2978476,3875501,3874123,0.874042105263158,1000000},
-{2978477,3878655,3877969,1000000,0.346963636363636},
-{2978478,3877092,3876748,1000000,0.484275},
-{2978479,3878243,3877920,1000000,0.621},
-{2978480,3878155,3877902,1000000,0.423366666666667},
-{2978481,3879484,3878586,0.654675,1000000},
-{2978482,3878967,3878975,0.0939111111111111,0.0939111111111111},
-{2978483,3876276,3876371,0.0663,0.0663},
-{2978484,3876371,3876323,1000000,1000000},
-{2978485,3876323,3876192,1000000,1000000},
-{2978486,3878897,3878882,0.22825,1000000},
-{2978487,3878950,3878882,1000000,0.06046},
-{2978488,3879195,3879226,0.18651,1000000},
-{2978489,3880277,3879222,1000000,1000000},
-{2978491,3850208,3850006,0.17565,0.17565},
-{2978492,3850541,3850208,0.25815652173913,0.269890909090909},
-{2978493,3851228,3851969,0.50984347826087,0.4886},
-{2978494,3851015,3851495,0.270576923076923,0.260555555555556},
-{2978495,3850934,3851015,0.051888,0.0564},
-{2978496,3855362,3855298,0.78084705882353,0.78084705882353},
-{2978497,3855362,3855608,0.457942857142857,0.457942857142857},
-{2978498,3855579,3855362,0.50673,0.460663636363636},
-{2978499,3856351,3856255,0.705670588235294,0.705670588235294},
-{2978500,3856351,3856537,0.3006,0.3006},
-{2978501,3857560,3857715,0.0725333333333333,0.0725333333333333},
-{2978502,3857715,3857393,0.191177777777778,0.191177777777778},
-{2978503,3857021,3856746,0.160355555555556,0.160355555555556},
-{2978504,3856723,3856351,0.38565,0.30852},
-{2978505,3856618,3856723,0.12033,0.141564705882353},
-{2978506,3854709,3854202,0.35048,0.328575},
-{2978507,3856692,3856434,0.208444444444444,0.208444444444444},
-{2978508,3857826,3856692,0.670075,0.730990909090909},
-{2978509,3858294,3857826,0.28885,0.266630769230769},
-{2978510,3856525,3856172,0.239084210526316,0.239084210526316},
-{2978511,3858107,3857678,0.245918181818182,0.245918181818182},
-{2978512,3859798,3859478,0.187485714285714,0.16405},
-{2978513,3859914,3859615,0.151511111111111,0.151511111111111},
-{2978514,3859914,3859798,0.1184,0.1184},
-{2978515,3859166,3858294,0.85028,0.85028},
-{2978516,3859150,3859323,0.148355555555556,0.148355555555556},
-{2978517,3858692,3858294,0.247328571428571,0.364484210526316},
-{2978518,3859423,3858692,0.429704347826087,0.429704347826087},
-{2978519,3859654,3858692,0.496142857142857,0.473590909090909},
-{2978520,3859806,3859166,0.300048,0.326139130434783},
-{2978521,3860059,3859654,0.297,0.297},
-{2978522,3860477,3860059,0.197822222222222,0.197822222222222},
-{2978523,3860899,3860059,0.434,0.434},
-{2978524,3860154,3859914,0.221333333333333,0.221333333333333},
-{2978525,3859806,3860154,0.184069565217391,0.162830769230769},
-{2978526,3860421,3859914,0.251288888888889,0.251288888888889},
-{2978527,3860421,3860237,0.229418181818182,0.229418181818182},
-{2978528,3860425,3860421,0.232375,0.232375},
-{2978529,3860154,3860425,0.142220689655172,0.187472727272727},
-{2978530,3860853,3860425,0.239345454545455,0.315936},
-{2978531,3861345,3861746,0.514427586206897,0.481238709677419},
-{2978532,3860598,3860960,0.353488888888889,0.353488888888889},
-{2978533,3859836,3859273,0.352930434782609,0.352930434782609},
-{2978534,3860258,3860066,0.16935,0.16935},
-{2978535,3860066,3859836,0.186436363636364,0.124290909090909},
-{2978536,3859836,3859581,0.23406,0.180046153846154},
-{2978537,3860465,3860066,0.255777777777778,0.255777777777778},
-{2978538,3861452,3860475,0.513311111111111,0.513311111111111},
-{2978539,3859836,3860226,0.340447058823529,0.2756},
-{2978540,3860769,3860465,0.166017391304348,0.200968421052632},
-{2978541,3861658,3860769,0.578478260869565,0.578478260869565},
-{2978542,3861746,3861960,0.259607142857143,0.29076},
-{2978543,3861960,3861984,0.0314444444444444,0.0303214285714286},
-{2978544,3862691,3861960,0.539866666666667,0.539866666666667},
-{2978545,3862286,3861984,0.295008,0.295008},
-{2978546,3862991,3862568,0.355777777777778,0.355777777777778},
-{2978547,3862991,3862691,1000000,1000000},
-{2978548,3863417,3862991,0.267666666666667,0.267666666666667},
-{2978549,3863417,3862946,1000000,0.40815652173913},
-{2978550,3863243,3862991,1000000,0.4000875},
-{2978551,3862814,3863243,0.253375,0.253375},
-{2978552,3862432,3862286,0.186366666666667,0.197329411764706},
-{2978553,3862286,3863015,0.468,0.468},
-{2978554,3863243,3863460,1000000,0.125355555555556},
-{2978555,3863460,3863681,1000000,0.250476923076923},
-{2978556,3863681,3863417,1000000,0.20742},
-{2978557,3863681,3864039,0.284888888888889,0.284888888888889},
-{2978558,3863668,3864039,0.179822222222222,0.179822222222222},
-{2978559,3865703,3865662,0.09468,0.0860727272727273},
-{2978560,3865804,3865703,0.167666666666667,0.2515},
-{2978561,3866232,3866318,0.1202,0.0874181818181818},
-{2978562,3866318,3866416,0.18492,0.132085714285714},
-{2978563,3866318,3865703,1000000,0.357705882352941},
-{2978564,3866683,3866318,1000000,0.115333333333333},
-{2978565,3866600,3866683,0.0895777777777778,0.0895777777777778},
-{2978566,3866683,3866748,0.0946444444444444,1000000},
-{2978567,3865072,3864444,0.3014,0.3014},
-{2978568,3865773,3865072,0.270038709677419,0.380509090909091},
-{2978569,3865400,3865072,0.405866666666667,0.405866666666667},
-{2978570,3866943,3865661,0.564977777777778,0.564977777777778},
-{2978571,3865072,3864768,0.368035714285714,0.429375},
-{2978572,3867633,3867214,0.203977777777778,0.203977777777778},
-{2978573,3867644,3867622,1000000,0.168657142857143},
-{2978574,3867538,3867909,1000000,0.734115789473684},
-{2978575,3867928,3868337,1000000,1000000},
-{2978576,3868254,3868649,1000000,0.74307},
-{2978577,3868583,3868780,0.2742,0.380833333333333},
-{2978578,3868780,3869013,0.369626086956522,0.404828571428571},
-{2978579,3869405,3868780,0.284373913043478,0.344242105263158},
-{2978580,3870670,3870098,0.232375,1000000},
-{2978581,3870472,3869492,1000000,0.395921739130435},
-{2978582,3871016,3870472,1000000,0.244460869565217},
-{2978583,3871184,3871016,0.194475,0.194475},
-{2978584,3868264,3867769,0.306177777777778,0.306177777777778},
-{2978585,3871216,3871016,1000000,0.225190909090909},
-{2978586,3870122,3870244,0.151147826086957,0.14485},
-{2978587,3870244,3870618,0.2842,0.2842},
-{2978588,3870618,3870862,0.182472,0.162921428571429},
-{2978589,3869169,3869395,0.652705263157895,0.62007},
-{2978590,3868278,3868342,0.296125,0.338428571428571},
-{2978591,3868342,3867622,0.263630769230769,0.311563636363636},
-{2978592,3868902,3868342,0.180289655172414,0.201092307692308},
-{2978593,3870618,3869624,0.35808,0.35808},
-{2978594,3870862,3869531,0.37785,0.345462857142857},
-{2978595,3871206,3870862,0.108658064516129,0.0935666666666667},
-{2978596,3871489,3871206,0.394992,0.394992},
-{2978597,3871978,3871206,0.270888,0.282175},
-{2978598,3869726,3870098,0.131288888888889,0.131288888888889},
-{2978599,3872864,3872781,1000000,1000000},
-{2978600,3873046,3872974,1000000,1000000},
-{2978601,3872781,3872513,1000000,0.328090909090909},
-{2978602,3872974,3872740,0.2939,1000000},
-{2978603,3872740,3872513,0.0918545454545455,0.0918545454545455},
-{2978604,3872910,3872740,0.10132,0.0660782608695652},
-{2978605,3872513,3872275,1000000,0.2},
-{2978606,3872910,3872747,1000000,0.23523},
-{2978607,3873780,3872910,1000000,0.414704347826087},
-{2978608,3873685,3872747,0.473628571428571,1000000},
-{2978609,3873889,3873780,0.281372727272727,1000000},
-{2978610,3873780,3873685,0.210763636363636,1000000},
-{2978611,3875160,3873780,1000000,0.611511111111111},
-{2978612,3876012,3875816,0.536925,0.613628571428571},
-{2978613,3875816,3875916,0.4032,0.4032},
-{2978614,3875974,3875916,0.152557894736842,1000000},
-{2978615,3875916,3875733,0.281290909090909,1000000},
-{2978616,3876325,3876822,1000000,0.50736},
-{2978617,3876454,3875733,0.28791724137931,0.28791724137931},
-{2978618,3876630,3876454,1000000,0.387495652173913},
-{2978619,3871978,3871324,0.4782,0.498125},
-{2978620,3872687,3871978,0.303365217391304,0.317154545454545},
-{2978621,3873104,3872687,0.340888888888889,0.354},
-{2978622,3872687,3872314,0.305634782608696,0.334742857142857},
-{2978623,3873584,3873352,0.367666666666667,0.381807692307692},
-{2978624,3873352,3872687,0.283523076923077,0.30715},
-{2978625,3874265,3874065,1000000,0.347078571428571},
-{2978626,3873286,3872314,0.3454,0.490831578947369},
-{2978627,3873352,3873286,0.107555555555556,0.107555555555556},
-{2978628,3873878,3873352,0.196924137931034,0.1784625},
-{2978629,3874065,3873878,0.108272727272727,0.09528},
-{2978630,3876822,3876841,0.167733333333333,0.0794526315789474},
-{2978631,3876822,3876919,1000000,0.695625},
-{2978632,3877686,3877793,0.324685714285714,1000000},
-{2978633,3877793,3877615,0.23997,1000000},
-{2978634,3877793,3878114,1000000,0.200541176470588},
-{2978635,3877218,3876454,0.304822222222222,0.265490322580645},
-{2978636,3879076,3878492,1000000,0.456190909090909},
-{2978637,3878492,3878730,0.263810526315789,0.227836363636364},
-{2978638,3879397,3878730,0.316933333333333,0.316933333333333},
-{2978639,3878730,3878875,0.58419,0.486825},
-{2978640,3852836,3852976,2.18416666666667,2.18416666666667},
-{2978641,3858107,3857747,0.267313043478261,0.219578571428571},
-{2978642,3858232,3857747,1000000,0.354033333333333},
-{2978643,3858969,3858232,0.490577777777778,0.473057142857143},
-{2978644,3855679,3856031,0.246577777777778,0.246577777777778},
-{2978645,3856618,3856031,0.297469565217391,0.402458823529412},
-{2978646,3860465,3860310,0.086376,0.0744620689655172},
-{2978647,3860310,3860226,0.048375,0.048375},
-{2978648,3860226,3859995,0.272166666666667,0.222681818181818},
-{2978649,3861002,3860310,0.463118181818182,0.463118181818182},
-{2978650,3861511,3861208,0.257084210526316,0.187869230769231},
-{2978651,3861208,3861002,0.157609090909091,0.15075652173913},
-{2978652,3861002,3860597,0.274172727272727,0.251325},
-{2978653,3861813,3861511,0.206688888888889,0.206688888888889},
-{2978654,3861813,3861564,0.429257142857143,0.222577777777778},
-{2978655,3861564,3861201,0.328252173913043,0.37749},
-{2978656,3859877,3859268,0.411933333333333,0.37074},
-{2978657,3860408,3860730,0.12915,0.133316129032258},
-{2978658,3860730,3861136,0.223992857142857,0.223992857142857},
-{2978659,3861935,3861813,0.333253846153846,0.361025},
-{2978660,3862069,3861813,0.193536,0.193536},
-{2978661,3862481,3862069,0.4318875,0.4318875},
-{2978662,3862069,3861770,0.32106,0.256848},
-{2978663,3860579,3859877,1000000,0.358135714285714},
-{2978664,3858303,3858131,0.113008695652174,0.123771428571429},
-{2978665,3858303,3859268,0.598036363636364,0.626514285714286},
-{2978666,3858361,3858303,0.0394,0.0454615384615385},
-{2978667,3859877,3858683,0.805114285714286,0.805114285714286},
-{2978668,3862960,3862723,0.1254,0.1254},
-{2978669,3863038,3862319,0.362328,0.335488888888889},
-{2978670,3863198,3863038,0.0960521739130435,0.0960521739130435},
-{2978671,3863699,3863198,0.255,0.255},
-{2978672,3865311,3865689,0.262955555555556,0.262955555555556},
-{2978673,3865689,3865226,0.3157875,0.3157875},
-{2978674,3865907,3865689,0.0953454545454545,0.0953454545454545},
-{2978675,3866118,3865907,0.109542857142857,0.104563636363636},
-{2978676,3866517,3866118,0.156730434782609,0.1502},
-{2978677,3866733,3866517,0.088875,0.0820384615384615},
-{2978678,3865181,3865714,0.280457142857143,0.346447058823529},
-{2978679,3865907,3865714,0.473823529411765,0.423947368421053},
-{2978680,3865714,3865605,0.280961538461538,0.811666666666667},
-{2978681,3865714,3865855,0.0567461538461538,0.0776526315789474},
-{2978682,3865855,3866463,0.235107692307692,0.277854545454545},
-{2978683,3865855,3865605,0.263666666666667,0.263666666666667},
-{2978684,3865014,3865468,0.250658823529412,0.250658823529412},
-{2978685,3865605,3865468,0.1621125,0.12969},
-{2978686,3865605,3866394,0.296622222222222,0.296622222222222},
-{2978687,3866439,3866118,0.2837,0.486342857142857},
-{2978688,3866439,3866463,0.267947368421053,0.212125},
-{2978689,3866463,3866394,0.25122,0.279133333333333},
-{2978690,3866439,3867004,0.199888888888889,0.199888888888889},
-{2978691,3866517,3867119,0.241622222222222,0.241622222222222},
-{2978692,3867119,3867223,0.157066666666667,0.157066666666667},
-{2978693,3867119,3867004,1000000,1000000},
-{2978694,3867296,3867004,0.112466666666667,0.112466666666667},
-{2978695,3865468,3866303,0.3475,0.417},
-{2978696,3866394,3866303,0.1695,0.1582},
-{2978697,3867523,3867223,0.130904347826087,0.103820689655172},
-{2978698,3867684,3867523,0.075525,0.0697153846153846},
-{2978699,3867508,3867684,0.352264285714286,0.379361538461538},
-{2978700,3867508,3867296,0.21717,0.28956},
-{2978701,3867296,3867086,0.468,0.468},
-{2978702,3866962,3867086,0.0538,0.0561391304347826},
-{2978703,3867722,3867508,0.155052631578947,0.1473},
-{2978704,3867086,3867335,0.128147368421053,0.128147368421053},
-{2978705,3868196,3867684,0.217390909090909,0.183946153846154},
-{2978706,3866394,3866833,0.153888888888889,0.153888888888889},
-{2978707,3866833,3866962,0.154,0.154},
-{2978708,3867004,3866833,0.369511111111111,0.369511111111111},
-{2978709,3868447,3868196,0.10905,0.100661538461538},
-{2978710,3868677,3868447,0.11097,0.105685714285714},
-{2978711,3869029,3868677,0.129715384615385,0.134904},
-{2978712,3869379,3869029,0.158018181818182,0.158018181818182},
-{2978713,3869636,3869379,0.101754545454545,0.1599},
-{2978714,3867622,3867523,0.465092307692308,0.431871428571429},
-{2978715,3868342,3868447,0.459626086956522,0.406592307692308},
-{2978716,3868902,3869029,0.409025,0.426808695652174},
-{2978717,3868156,3868196,0.4011,0.431953846153846},
-{2978718,3868653,3868677,0.521342857142857,0.437928},
-{2978719,3871324,3871373,0.293035714285714,0.2735},
-{2978720,3871373,3871181,0.603575,0.536511111111111},
-{2978721,3870360,3869762,0.485288888888889,0.485288888888889},
-{2978722,3871589,3871972,0.125244444444444,0.125244444444444},
-{2978723,3871972,3871816,1000000,0.23217},
-{2978724,3871972,3872311,0.133825,1000000},
-{2978725,3872314,3872311,0.269178947368421,1000000},
-{2978726,3872311,3873149,0.608492307692308,1000000},
-{2978727,3873286,3873218,0.0852387096774193,1000000},
-{2978728,3873218,3873149,0.10085625,0.10085625},
-{2978729,3873149,3872986,0.278192307692308,0.278192307692308},
-{2978730,3873878,3873218,0.331422222222222,1000000},
-{2978731,3874065,3873948,1000000,0.229315384615385},
-{2978732,3874477,3874065,0.280226086956522,0.280226086956522},
-{2978733,3874477,3874418,0.158269565217391,0.202233333333333},
-{2978734,3874418,3873948,0.2448,0.28152},
-{2978735,3874667,3874418,0.13008,0.17344},
-{2978736,3873948,3873754,1000000,0.446345454545455},
-{2978737,3875436,3875204,0.618,1000000},
-{2978738,3872200,3871805,0.73866,0.73866},
-{2978739,3872986,3872572,0.63192,1000000},
-{2978740,3875204,3875006,0.342744,1000000},
-{2978741,3874337,3875006,0.26092,0.372742857142857},
-{2978742,3875006,3875679,0.3337,0.296622222222222},
-{2978743,3875862,3875679,1000000,0.3667},
-{2978744,3871805,3871181,1000000,0.277685714285714},
-{2978745,3873370,3872572,1000000,0.341925},
-{2978746,3873754,3873370,1000000,0.764018181818182},
-{2978747,3874228,3874923,0.3284,0.342678260869565},
-{2978748,3875006,3874923,0.18625,1000000},
-{2978749,3875679,3875599,1000000,0.168104347826087},
-{2978750,3874923,3874840,0.187824,1000000},
-{2978751,3874120,3874840,0.331725,0.361881818181818},
-{2978752,3874840,3875475,0.303784615384615,0.292533333333333},
-{2978753,3871181,3871120,1000000,0.103512},
-{2978754,3871120,3871004,1000000,0.313254545454545},
-{2978755,3871869,3871120,1000000,1000000},
-{2978756,3871918,3871869,1000000,1000000},
-{2978757,3871869,3871659,1000000,1000000},
-{2978758,3871659,3871004,0.3361,1000000},
-{2978759,3872348,3871659,0.279573913043478,1000000},
-{2978760,3873169,3872348,0.40659,1000000},
-{2978761,3872547,3871869,0.234911111111111,0.234911111111111},
-{2978762,3872572,3872547,0.0666631578947368,0.0575727272727273},
-{2978763,3872547,3872427,0.206372727272727,0.206372727272727},
-{2978764,3872427,3872348,0.133371428571429,0.112032},
-{2978765,3873370,3873169,1000000,0.286114285714286},
-{2978766,3870402,3870368,0.210911111111111,0.210911111111111},
-{2978767,3870368,3870327,0.0888666666666667,0.114257142857143},
-{2978768,3873087,3870368,0.958977777777778,0.958977777777778},
-{2978769,3873169,3873087,1000000,0.180457142857143},
-{2978770,3873087,3873001,0.39654,0.165225},
-{2978771,3873602,3873169,0.164121428571429,1000000},
-{2978772,3873923,3873602,0.151425,1000000},
-{2978773,3873602,3873087,0.4344,0.4344},
-{2978774,3878375,3880278,0.853711111111111,0.853711111111111},
-{2978775,3880241,3880405,1000000,1000000},
-{2978776,3880405,3882602,1000000,1000000},
-{2978777,3878346,3879499,0.4936,0.4936},
-{2978778,3882602,3880440,1000000,1000000},
-{2978779,3857718,3858361,0.77772,0.77772},
-{2978780,3854970,3856892,0.839236363636364,0.839236363636364},
-{2978781,3855431,3854970,0.225763636363636,0.225763636363636},
-{2978782,3858996,3858683,0.21295,0.222208695652174},
-{2978783,3860128,3860434,0.178333333333333,0.178333333333333},
-{2978784,3859809,3859177,0.529073684210526,0.529073684210526},
-{2978785,3859565,3858717,0.461333333333333,0.461333333333333},
-{2978786,3860234,3860032,0.272033333333333,0.3060375},
-{2978787,3860032,3859809,0.160655172413793,0.150290322580645},
-{2978788,3859809,3859565,0.186553846153846,0.186553846153846},
-{2978789,3860758,3860373,0.320139130434783,0.334690909090909},
-{2978790,3860373,3860078,0.2438,0.263304},
-{2978791,3860961,3860078,0.5093,0.81488},
-{2978792,3861339,3860373,0.504044444444444,0.504044444444444},
-{2978793,3861552,3861339,0.292036363636364,1000000},
-{2978794,3861331,3861339,1000000,0.0835363636363636},
-{2978795,3860961,3861331,0.272942857142857,0.272942857142857},
-{2978796,3861469,3861743,0.4422,1000000},
-{2978797,3861469,3861331,1000000,0.147954545454545},
-{2978798,3861886,3862255,1000000,0.2301},
-{2978799,3861701,3861733,0.777763636363636,1000000},
-{2978800,3862293,3862255,0.276535714285714,1000000},
-{2978801,3862322,3862293,0.135417391304348,1000000},
-{2978802,3861941,3862293,1000000,1000000},
-{2978803,3862255,3863042,0.733311111111111,0.733311111111111},
-{2978804,3862198,3862257,0.345511111111111,0.345511111111111},
-{2978805,3862545,3862244,0.224288888888889,0.224288888888889},
-{2978806,3862797,3862244,0.288977777777778,0.288977777777778},
-{2978807,3862797,3862738,0.0766666666666667,0.0766666666666667},
-{2978808,3862940,3862797,0.0730222222222222,0.0730222222222222},
-{2978809,3863221,3863097,0.0881684210526316,0.0698},
-{2978810,3863488,3863221,0.186678260869565,0.1789},
-{2978811,3863299,3860961,2.15565,2.15565},
-{2978812,3867675,3866223,0.531111111111111,1000000},
-{2978813,3867675,3868155,1000000,0.200536363636364},
-{2978814,3868155,3868592,1000000,0.200536363636364},
-{2978815,3868592,3869056,1000000,0.2226},
-{2978816,3869056,3869604,1000000,0.274136842105263},
-{2978817,3867675,3867555,0.285466666666667,0.285466666666667},
-{2978818,3868155,3868018,0.283755555555556,0.283755555555556},
-{2978819,3868592,3868467,0.284266666666667,0.284266666666667},
-{2978820,3869056,3868924,0.291933333333333,0.291933333333333},
-{2978821,3867188,3867446,0.399177777777778,0.399177777777778},
-{2978822,3867715,3867813,0.184866666666667,0.184866666666667},
-{2978823,3867167,3867473,0.23268,0.202330434782609},
-{2978824,3867473,3868038,0.312042857142857,0.336046153846154},
-{2978825,3867473,3867145,0.488066666666667,0.516776470588235},
-{2978826,3867145,3866147,0.325427586206897,0.31458},
-{2978827,3868151,3867473,0.357971428571429,0.357971428571429},
-{2978828,3868617,3868151,0.219457142857143,0.23043},
-{2978829,3869060,3868617,0.191263636363636,0.168312},
-{2978830,3869574,3869060,0.249126315789474,0.278435294117647},
-{2978831,3868195,3868151,0.272788235294118,0.244073684210526},
-{2978832,3868151,3868038,0.45537,0.337311111111111},
-{2978833,3868008,3867145,0.295551724137931,0.329653846153846},
-{2978834,3868038,3868008,0.107645454545455,0.102965217391304},
-{2978835,3868617,3868596,0.0947333333333333,0.0947333333333333},
-{2978836,3869063,3869060,0.0963555555555556,0.0963555555555556},
-{2978837,3868596,3869063,0.164311111111111,0.164311111111111},
-{2978838,3868596,3868566,0.1746,0.1746},
-{2978839,3869063,3869048,0.181666666666667,0.181666666666667},
-{2978840,3868566,3868235,0.306915789473684,0.323966666666667},
-{2978841,3869048,3868566,0.245336842105263,0.245336842105263},
-{2978842,3869540,3869048,0.244736842105263,0.31},
-{2978843,3868008,3868235,0.0887739130434783,0.0928090909090909},
-{2978844,3868235,3868460,0.0792620689655173,0.0884076923076923},
-{2978845,3869576,3868460,0.4406,0.391644444444444},
-{2978846,3869677,3870992,0.558709090909091,0.682866666666667},
-{2978847,3870992,3872020,0.45906,0.399182608695652},
-{2978848,3872073,3872944,0.40209,0.382942857142857},
-{2978849,3872944,3873494,0.341233333333333,0.279190909090909},
-{2978850,3870992,3871109,0.4018,0.4018},
-{2978851,3872944,3872776,0.33435,0.351947368421053},
-{2978852,3872776,3872622,0.287433333333333,0.246371428571429},
-{2978853,3872776,3871883,1000000,1000000},
-{2978854,3873336,3872776,0.30354,0.30354},
-{2978855,3873494,3873336,0.365494736842105,0.330685714285714},
-{2978856,3873336,3873233,0.23799,0.264433333333333},
-{2978857,3871109,3871366,0.280444444444444,0.280444444444444},
-{2978858,3870242,3870148,0.279688888888889,0.279688888888889},
-{2978859,3870757,3870642,0.383936842105263,1000000},
-{2978860,3870148,3869628,0.177138461538462,1000000},
-{2978861,3870642,3870148,0.157593103448276,1000000},
-{2978862,3871366,3870642,0.291860869565217,1000000},
-{2978863,3871573,3871366,0.0824571428571429,0.0824571428571429},
-{2978864,3870642,3870578,0.26937,1000000},
-{2978865,3870578,3870525,0.164755555555556,1000000},
-{2978866,3871419,3870578,1000000,0.291866666666667},
-{2978867,3870525,3869576,0.3168,0.328984615384615},
-{2978868,3871301,3870525,0.252496551724138,0.281630769230769},
-{2978869,3869556,3868955,0.327733333333333,0.39328},
-{2978870,3869556,3870460,0.35115652173913,0.367118181818182},
-{2978871,3870525,3870460,0.1998,0.183816},
-{2978872,3872622,3872451,0.26424,0.314571428571429},
-{2978873,3872451,3872320,0.193846153846154,0.21},
-{2978874,3872320,3872204,0.231314285714286,0.285741176470588},
-{2978875,3872204,3871301,0.301422222222222,0.35384347826087},
-{2978876,3872204,3872966,0.260311111111111,0.260311111111111},
-{2978877,3872320,3873064,0.262977777777778,0.262977777777778},
-{2978878,3872451,3873184,0.265533333333333,0.265533333333333},
-{2978879,3873896,3874068,1000000,0.140664},
-{2978880,3874000,3874678,0.357081818181818,0.561128571428572},
-{2978881,3874678,3875321,1000000,1000000},
-{2978882,3874840,3874678,0.343390909090909,1000000},
-{2978883,3874678,3874508,0.29864347826087,1000000},
-{2978884,3875321,3875200,1000000,0.278475},
-{2978885,3874498,3874188,0.651818181818182,0.623478260869565},
-{2978886,3873506,3874188,0.287078571428571,0.334925},
-{2978887,3875185,3874901,0.4908,0.47444},
-{2978888,3874188,3874901,0.313368,0.340617391304348},
-{2978889,3873314,3874025,0.343382608695652,0.358990909090909},
-{2978890,3874025,3874707,0.356072727272727,0.290133333333333},
-{2978891,3873151,3873900,0.321888,0.298044444444445},
-{2978892,3873900,3874577,0.2802,0.217933333333333},
-{2978893,3874025,3873900,0.388129411764706,0.388129411764706},
-{2978894,3874901,3874707,0.300077419354839,0.281890909090909},
-{2978895,3874707,3874577,0.230266666666667,0.222042857142857},
-{2978896,3874707,3875581,0.386888888888889,0.386888888888889},
-{2978897,3856892,3856551,0.297618181818182,0.297618181818182},
-{2978898,3856892,3858718,0.90614,0.84950625},
-{2978899,3858718,3859193,0.3149625,0.3149625},
-{2978900,3859193,3859828,0.327418181818182,0.327418181818182},
-{2978901,3861601,3859828,0.890981818181818,0.890981818181818},
-{2978902,3859193,3859091,0.128690909090909,0.128690909090909},
-{2978903,3865530,3864968,0.269028571428571,0.201771428571429},
-{2978904,3866380,3865530,0.365608695652174,0.323423076923077},
-{2978905,3865429,3865530,0.247166666666667,0.247166666666667},
-{2978906,3865530,3866288,0.353466666666667,0.353466666666667},
-{2978907,3865603,3865826,0.177155555555556,0.177155555555556},
-{2978908,3866322,3865603,0.2616,0.2616},
-{2978909,3866263,3865826,0.164466666666667,0.164466666666667},
-{2978910,3864739,3864228,0.229444444444444,0.229444444444444},
-{2978911,3864236,3864335,0.164111111111111,0.164111111111111},
-{2978912,3868008,3867933,0.2466,0.305784},
-{2978913,3868460,3868410,0.0927,0.132428571428571},
-{2978914,3868206,3868410,0.0791333333333333,0.0791333333333333},
-{2978915,3868206,3868150,0.206377777777778,0.206377777777778},
-{2978916,3867933,3868150,0.09516,0.105733333333333},
-{2978917,3868150,3868409,0.13473,0.112275},
-{2978918,3868410,3868657,0.20811,0.20811},
-{2978919,3868657,3868409,0.154885714285714,1000000},
-{2978920,3868955,3868657,0.178547368421053,1000000},
-{2978921,3868409,3868539,0.0760857142857143,1000000},
-{2978922,3868539,3868798,0.142885714285714,1000000},
-{2978923,3868798,3868955,0.106,1000000},
-{2978924,3868798,3869537,0.529866666666667,0.529866666666667},
-{2978925,3868539,3868861,0.225222222222222,0.225222222222222},
-{2978926,3867874,3866314,0.75684,0.75684},
-{2978927,3868425,3867874,1000000,0.197177777777778},
-{2978928,3869291,3869088,1000000,1000000},
-{2978929,3867754,3866644,0.454176,0.493669565217391},
-{2978930,3868425,3868396,0.24465,0.24465},
-{2978931,3868396,3868405,0.171992307692308,0.2794875},
-{2978932,3869036,3868396,0.224511111111111,0.224511111111111},
-{2978933,3869088,3869036,0.1268,0.1268},
-{2978934,3869036,3869076,0.136844444444444,0.136844444444444},
-{2978935,3868405,3867754,0.282872727272727,0.296342857142857},
-{2978936,3868946,3868405,0.185222222222222,0.192346153846154},
-{2978937,3869076,3868946,0.0593739130434783,0.0525230769230769},
-{2978938,3869278,3869076,0.10161,0.0883565217391304},
-{2978939,3869514,3869278,0.1154,0.159784615384615},
-{2978940,3867754,3867662,0.65235,0.497028571428571},
-{2978941,3868946,3868948,0.12576,0.147952941176471},
-{2978942,3869009,3869005,0.21616,0.180133333333333},
-{2978943,3868948,3867936,0.48537,0.64716},
-{2978944,3869009,3867936,1.57933333333333,1.57933333333333},
-{2978945,3868948,3869009,0.421305882352941,0.3979},
-{2978946,3867645,3867662,0.0358363636363636,0.03285},
-{2978947,3869005,3867662,0.374735294117647,0.455035714285714},
-{2978948,3869250,3869005,0.0927461538461538,0.114828571428571},
-{2978949,3869473,3869250,0.106171428571429,0.14864},
-{2978950,3870070,3869529,0.181176923076923,0.2617},
-{2978951,3870070,3870031,0.79692,1000000},
-{2978952,3870749,3870070,0.181129411764706,0.181129411764706},
-{2978953,3871139,3872049,0.621369230769231,0.621369230769231},
-{2978954,3871021,3871901,0.40362,0.33635},
-{2978955,3872204,3872049,0.238733333333333,0.257832},
-{2978956,3872049,3871966,0.125295652173913,0.130990909090909},
-{2978957,3871966,3871901,0.113435294117647,0.0876545454545455},
-{2978958,3871901,3871839,0.1896,0.11376},
-{2978959,3871755,3871658,0.17652,0.22065},
-{2978960,3871658,3871312,0.408367741935484,0.506376},
-{2978961,3871966,3872511,0.236288888888889,0.236288888888889},
-{2978962,3872633,3871755,0.493941176470588,0.493941176470588},
-{2978963,3871658,3870749,0.245523529411765,0.287855172413793},
-{2978964,3872550,3871658,0.264483870967742,0.32796},
-{2978965,3870460,3870345,0.384991304347826,0.327955555555556},
-{2978966,3878656,3878246,0.435044444444444,0.435044444444444},
-{2978967,3871312,3870979,0.428565517241379,0.478015384615385},
-{2978968,3870979,3870147,1000000,0.295066666666667},
-{2978969,3872328,3873176,0.323496,1000000},
-{2978970,3873176,3873915,0.290733333333333,1000000},
-{2978971,3873176,3873022,0.425858823529412,0.425858823529412},
-{2978972,3873022,3872937,0.145733333333333,0.145733333333333},
-{2978973,3873765,3873022,0.31236,0.31236},
-{2978974,3873915,3873765,0.337017391304348,0.337017391304348},
-{2978975,3873765,3873655,0.165444444444444,0.165444444444444},
-{2978976,3861924,3861034,0.5204,0.5204},
-{2978977,3862098,3861765,0.2244,0.2244},
-{2978978,3862098,3862464,0.464177777777778,0.464177777777778},
-{2978979,3862007,3862098,0.241366666666667,0.241366666666667},
-{2978980,3861942,3862007,0.116366666666667,0.116366666666667},
-{2978981,3862951,3863098,0.287355555555556,0.287355555555556},
-{2978982,3864128,3863653,0.27831,0.27831},
-{2978983,3863224,3863653,0.740686956521739,0.740686956521739},
-{2978984,3864069,3863737,0.217305882352941,0.175914285714286},
-{2978985,3864069,3864456,0.520875,0.520875},
-{2978986,3864521,3864069,0.302188235294118,0.233509090909091},
-{2978987,3865911,3864862,0.514472727272727,0.514472727272727},
-{2978988,3863861,3864069,0.253342857142857,0.253342857142857},
-{2978989,3863861,3863599,0.153654545454545,0.14085},
-{2978990,3864408,3863861,0.257304,0.238244444444444},
-{2978991,3863521,3863861,0.389622222222222,0.389622222222222},
-{2978992,3864862,3864745,0.148010526315789,0.133914285714286},
-{2978993,3864745,3864521,0.184285714285714,0.16125},
-{2978994,3864275,3864861,0.474063157894737,0.474063157894737},
-{2978995,3862337,3862746,0.477955555555556,0.477955555555556},
-{2978996,3862618,3863047,0.498866666666667,0.498866666666667},
-{2978997,3862736,3863190,0.516511111111111,0.516511111111111},
-{2978998,3862337,3862098,0.113815384615385,0.1233},
-{2978999,3862618,3862337,0.136272,0.11356},
-{2979000,3862736,3862618,0.0851739130434783,0.0851739130434783},
-{2979001,3862861,3862736,0.113766666666667,0.13652},
-{2979002,3863521,3863130,0.55788,0.55788},
-{2979003,3862753,3862007,0.339266666666667,0.339266666666667},
-{2979004,3863130,3862861,0.166422222222222,0.166422222222222},
-{2979005,3863819,3863993,0.145244444444444,0.145244444444444},
-{2979006,3864315,3864568,0.105556097560976,0.127288235294118},
-{2979007,3866989,3866322,0.2586,0.2586},
-{2979008,3867253,3866989,0.232421052631579,0.232421052631579},
-{2979009,3866989,3867468,0.405,0.405},
-{2979010,3867645,3867468,0.171317647058824,0.19416},
-{2979011,3867468,3867401,0.101511111111111,0.101511111111111},
-{2979012,3866858,3866989,0.235433333333333,0.235433333333333},
-{2979013,3866814,3866237,0.235527272727273,0.235527272727273},
-{2979014,3867307,3866814,0.1422,0.16671724137931},
-{2979015,3867694,3867307,0.156,0.16848},
-{2979016,3868203,3867694,0.154877419354839,0.165558620689655},
-{2979017,3868444,3868203,0.0882827586206897,0.08534},
-{2979018,3866858,3866234,0.218307692307692,0.218307692307692},
-{2979019,3867301,3866814,0.551192307692308,0.551192307692308},
-{2979020,3867551,3867307,0.297351724137931,0.297351724137931},
-{2979021,3867856,3867694,0.213977777777778,0.213977777777778},
-{2979022,3867301,3866874,0.211554545454545,0.211554545454545},
-{2979023,3867660,3867301,0.164533333333333,0.164533333333333},
-{2979024,3867551,3867856,0.133977777777778,0.133977777777778},
-{2979025,3867660,3867551,0.0748,0.0748},
-{2979026,3868032,3867856,0.0997333333333333,0.0997333333333333},
-{2979027,3868327,3868203,0.171977777777778,0.171977777777778},
-{2979028,3868032,3868327,0.130488888888889,0.130488888888889},
-{2979029,3868958,3868327,0.331266666666667,0.331266666666667},
-{2979030,3867800,3867660,0.07196,0.134925},
-{2979031,3868159,3868032,0.0707555555555556,0.0707555555555556},
-{2979032,3867918,3867301,0.550690909090909,0.550690909090909},
-{2979033,3867800,3868159,0.140911111111111,0.140911111111111},
-{2979034,3867800,3868344,0.477333333333333,0.318222222222222},
-{2979035,3868636,3868159,0.279422222222222,0.279422222222222},
-{2979036,3869245,3868958,0.154022222222222,0.159946153846154},
-{2979037,3868958,3868751,0.09358,0.08773125},
-{2979038,3868751,3868636,0.0481928571428571,0.0499777777777778},
-{2979039,3868636,3868344,0.152955555555556,0.13321935483871},
-{2979040,3868344,3867918,0.221328,0.197614285714286},
-{2979041,3869455,3868751,0.3446,0.3446},
-{2979042,3868880,3868344,0.234662068965517,0.22684},
-{2979043,3869911,3869455,1000000,1000000},
-{2979044,3870038,3869911,1000000,1000000},
-{2979045,3867918,3868330,0.230630769230769,0.230630769230769},
-{2979046,3868330,3868438,0.139266666666667,0.139266666666667},
-{2979047,3869357,3868880,0.2102625,0.269136},
-{2979048,3868880,3868330,0.242777777777778,0.242777777777778},
-{2979049,3868438,3867810,0.238688888888889,0.238688888888889},
-{2979050,3869357,3868438,0.382025,0.416754545454545},
-{2979051,3869357,3869471,0.08168,0.0556909090909091},
-{2979052,3869911,3870044,1000000,1000000},
-{2979053,3870547,3870648,0.394466666666667,0.394466666666667},
-{2979054,3873309,3873297,0.212,0.212},
-{2979055,3850176,3850314,0.098,0.098},
-{2979056,3851828,3852455,0.556869230769231,0.658118181818182},
-{2979057,3852455,3852762,0.263854545454545,0.263854545454545},
-{2979058,3852455,3853105,0.202872727272727,0.202872727272727},
-{2979059,3853055,3853105,0.124145454545455,0.124145454545455},
-{2979060,3853105,3853705,0.302545454545455,0.302545454545455},
-{2979061,3850314,3849947,0.183272727272727,0.183272727272727},
-{2979062,3861518,3861145,0.252285714285714,0.240818181818182},
-{2979063,3861692,3860944,0.548557894736842,0.548557894736842},
-{2979064,3861942,3861933,1000000,0.409088888888889},
-{2979065,3862327,3861933,0.334606451612903,0.334606451612903},
-{2979066,3861933,3861518,0.302177777777778,0.291385714285714},
-{2979067,3861933,3862248,1000000,1000000},
-{2979068,3862670,3862248,0.455815384615385,0.59256},
-{2979069,3862248,3861996,0.240675,0.28881},
-{2979070,3861836,3861518,0.120331578947368,0.138563636363636},
-{2979071,3861996,3861836,0.0635351351351351,0.07836},
-{2979072,3862211,3861996,0.102977142857143,0.109218181818182},
-{2979073,3862552,3862211,0.13032972972973,0.13395},
-{2979074,3861836,3861692,0.235088888888889,0.235088888888889},
-{2979075,3861692,3861566,0.341454545454545,0.278222222222222},
-{2979076,3862735,3861692,0.630939130434783,0.630939130434783},
-{2979077,3862644,3862735,0.218836363636364,0.218836363636364},
-{2979078,3863130,3863023,0.176368421052632,0.159571428571429},
-{2979079,3863066,3863023,0.246552,0.267991304347826},
-{2979080,3862211,3863066,0.528155555555556,0.528155555555556},
-{2979081,3863242,3863066,0.142009090909091,0.142009090909091},
-{2979082,3864315,3863897,0.301711111111111,0.301711111111111},
-{2979083,3863897,3863628,1000000,1000000},
-{2979084,3864223,3863897,0.175288888888889,0.175288888888889},
-{2979085,3864568,3864223,0.256044444444444,0.256044444444444},
-{2979086,3865404,3864762,0.305511111111111,0.305511111111111},
-{2979087,3865673,3865051,0.287533333333333,0.287533333333333},
-{2979088,3864474,3864223,0.112711111111111,0.112711111111111},
-{2979089,3864797,3864474,0.191466666666667,0.191466666666667},
-{2979090,3864797,3865051,0.0987789473684211,0.134057142857143},
-{2979091,3865051,3865735,0.307418181818182,0.307418181818182},
-{2979092,3865418,3864474,0.507955555555555,0.507955555555555},
-{2979093,3862552,3863242,0.532,0.532},
-{2979094,3862873,3862552,0.156411428571429,0.156411428571429},
-{2979095,3863543,3863242,0.177666666666667,0.177666666666667},
-{2979096,3863543,3863871,0.229955555555556,0.229955555555556},
-{2979097,3863151,3863543,0.303533333333333,0.303533333333333},
-{2979098,3862873,3863151,0.296034782608696,0.296034782608696},
-{2979099,3863151,3863416,0.152844444444444,0.152844444444444},
-{2979100,3863416,3863543,0.445977777777778,0.445977777777778},
-{2979101,3863416,3863803,0.204822222222222,0.204822222222222},
-{2979102,3865999,3866752,0.309822222222222,0.309822222222222},
-{2979103,3866972,3866752,0.132555555555556,0.132555555555556},
-{2979104,3866371,3866972,0.283622222222222,0.283622222222222},
-{2979105,3866012,3866371,0.162046153846154,0.150471428571429},
-{2979106,3865735,3866012,0.12266,0.12266},
-{2979107,3865634,3865735,0.0505125,0.0734727272727273},
-{2979108,3865418,3865634,0.137454545454545,0.116307692307692},
-{2979109,3864756,3865418,0.382390909090909,0.442768421052632},
-{2979110,3863353,3862873,0.249745945945946,0.318641379310345},
-{2979111,3864109,3864615,0.37236,0.404739130434783},
-{2979112,3863928,3864109,0.191025,0.183384},
-{2979113,3865751,3865634,0.190017391304348,0.190017391304348},
-{2979114,3865216,3864940,0.162757894736842,0.162757894736842},
-{2979115,3865751,3865216,0.252088888888889,0.252088888888889},
-{2979116,3865995,3865751,0.112577777777778,0.112577777777778},
-{2979117,3866309,3866012,0.168133333333333,0.168133333333333},
-{2979118,3866309,3865995,0.141111111111111,0.141111111111111},
-{2979119,3866710,3866309,0.214657142857143,0.214657142857143},
-{2979120,3866872,3866309,0.322044444444444,0.322044444444444},
-{2979121,3867277,3866872,0.2427,0.285529411764706},
-{2979122,3866442,3865995,0.253755555555556,0.253755555555556},
-{2979123,3866872,3866442,0.158888888888889,0.158888888888889},
-{2979124,3866671,3866872,0.178733333333333,0.178733333333333},
-{2979125,3867083,3866671,0.2528,0.2528},
-{2979126,3865837,3865751,0.292177777777778,0.292177777777778},
-{2979127,3865837,3865216,0.268022222222222,0.268022222222222},
-{2979128,3865937,3865837,0.0786260869565217,0.0822},
-{2979129,3865576,3865937,0.168888888888889,0.168888888888889},
-{2979130,3865937,3866199,0.116066666666667,0.116066666666667},
-{2979131,3866442,3866199,0.145422222222222,0.145422222222222},
-{2979132,3866199,3866671,0.1524,0.1524},
-{2979133,3866033,3865937,0.0816947368421053,0.0739142857142857},
-{2979134,3866838,3866033,0.4435,0.4435},
-{2979135,3866207,3866033,0.64845,0.51876},
-{2979136,3864109,3865237,0.521955555555556,0.521955555555556},
-{2979137,3867410,3866872,0.329422222222222,0.329422222222222},
-{2979138,3868438,3868658,0.188537142857143,0.188537142857143},
-{2979139,3868818,3868242,0.265714285714286,0.265714285714286},
-{2979140,3868658,3868818,0.157822222222222,0.157822222222222},
-{2979141,3868818,3869041,0.507035294117647,0.507035294117647},
-{2979142,3869041,3869307,0.335577777777778,0.335577777777778},
-{2979143,3869528,3868658,0.316755555555556,0.316755555555556},
-{2979144,3869600,3868818,0.314725,0.314725},
-{2979145,3869041,3868595,0.164066666666667,0.164066666666667},
-{2979146,3869668,3869041,0.3198,0.3198},
-{2979147,3870256,3869528,0.381282352941176,0.308657142857143},
-{2979148,3870332,3870256,0.1442,0.157309090909091},
-{2979149,3870256,3870216,0.359968421052632,0.359968421052632},
-{2979150,3870830,3870658,0.369857142857143,0.383555555555556},
-{2979151,3869582,3869779,0.0789,0.0826571428571429},
-{2979152,3869779,3869978,0.08799,0.0799909090909091},
-{2979153,3869978,3870216,0.0977454545454546,0.074151724137931},
-{2979154,3870216,3870658,0.20454,0.1461},
-{2979155,3869978,3869889,0.348736363636364,0.426233333333333},
-{2979156,3869889,3869786,0.286377777777778,0.286377777777778},
-{2979157,3870096,3869889,0.164618181818182,0.164618181818182},
-{2979158,3870096,3869992,0.299422222222222,0.299422222222222},
-{2979159,3870561,3870096,0.155511111111111,0.155511111111111},
-{2979160,3870658,3870625,0.189542857142857,0.189542857142857},
-{2979161,3870625,3870603,1000000,0.065895652173913},
-{2979162,3870603,3870561,1000000,0.10419},
-{2979163,3870561,3870416,1000000,0.362488888888889},
-{2979164,3870625,3870810,1000000,0.0630692307692308},
-{2979165,3870603,3870787,0.0603333333333333,0.0603333333333333},
-{2979166,3870810,3870787,0.0532222222222222,0.0532222222222222},
-{2979167,3870787,3870779,0.0788222222222222,0.0788222222222222},
-{2979168,3870779,3870675,0.355555555555556,0.355555555555556},
-{2979169,3871156,3871054,0.357444444444444,0.357444444444444},
-{2979170,3872056,3871931,0.333066666666667,0.333066666666667},
-{2979171,3871931,3871804,1000000,1000000},
-{2979172,3871804,3871689,0.376955555555556,0.376955555555556},
-{2979173,3872248,3872146,1000000,0.45426},
-{2979174,3871931,3872146,1000000,1000000},
-{2979175,3872146,3872112,1000000,0.153703448275862},
-{2979176,3871804,3872034,1000000,1000000},
-{2979177,3872112,3872034,1000000,0.14341935483871},
-{2979178,3872034,3871912,1000000,0.6354375},
-{2979179,3872112,3872480,0.269261538461538,0.269261538461538},
-{2979180,3872480,3872582,0.0585882352941176,0.0664},
-{2979181,3872775,3872631,0.477234782608696,0.439056},
-{2979182,3873207,3873158,0.455325,0.455325},
-{2979183,3872631,3873158,0.191888888888889,0.191888888888889},
-{2979184,3872631,3872582,0.139042105263158,0.120081818181818},
-{2979185,3872582,3872919,0.14376,0.14376},
-{2979186,3872919,3873153,0.1152,0.1152},
-{2979187,3873158,3873153,0.0988444444444444,0.0988444444444444},
-{2979188,3872480,3872329,0.900975,0.900975},
-{2979189,3872919,3872801,0.779233333333333,0.779233333333333},
-{2979190,3870416,3870326,0.461952,0.412457142857143},
-{2979191,3870326,3871011,0.237755555555556,0.237755555555556},
-{2979192,3869857,3870172,0.107928,0.117313043478261},
-{2979193,3869857,3870267,0.519733333333333,0.519733333333333},
-{2979194,3870267,3870172,0.429333333333333,0.429333333333333},
-{2979195,3870326,3870310,0.120978947368421,0.11493},
-{2979196,3870310,3870296,0.06984,0.0455478260869565},
-{2979197,3870172,3870296,0.047025,0.0594},
-{2979198,3870296,3870293,0.0405333333333333,0.0420923076923077},
-{2979199,3870293,3870266,0.177461538461538,0.096125},
-{2979200,3870266,3870941,0.233955555555556,0.233955555555556},
-{2979201,3870310,3870293,0.5446,0.5446},
-{2979202,3871912,3871746,0.4314,0.449375},
-{2979203,3871746,3872436,0.294142857142857,0.30885},
-{2979204,3872436,3872721,0.0746129032258064,0.110142857142857},
-{2979205,3872801,3872721,0.332909090909091,0.422538461538461},
-{2979206,3872721,3872955,0.118642105263158,0.093925},
-{2979207,3873576,3873552,0.497530434782609,0.4768},
-{2979208,3872436,3872384,0.34122,0.359178947368421},
-{2979209,3872913,3872955,0.324657142857143,0.4261125},
-{2979210,3871429,3871038,0.196666666666667,0.131111111111111},
-{2979211,3871429,3871634,0.0649354838709677,0.0774230769230769},
-{2979212,3871634,3872384,0.2512,0.260861538461538},
-{2979213,3872384,3872913,0.160055172413793,0.185664},
-{2979214,3871656,3871634,0.0484444444444444,0.0484444444444444},
-{2979215,3873153,3873271,0.0473555555555556,0.0473555555555556},
-{2979216,3873271,3873607,0.127244444444444,0.127244444444444},
-{2979217,3873271,3873190,0.514777777777778,0.514777777777778},
-{2979218,3885991,3886317,0.119172413793103,1000000},
-{2979219,3886005,3886317,0.135036363636364,1000000},
-{2979220,3861011,3859859,1.72033846153846,1.06497142857143},
-{2979221,3862720,3861492,0.513154838709677,0.513154838709677},
-{2979222,3862828,3862720,0.278918181818182,0.322957894736842},
-{2979223,3862300,3861318,0.534666666666667,0.534666666666667},
-{2979224,3862300,3862112,0.425266666666667,0.425266666666667},
-{2979225,3862204,3861430,0.7184,0.7184},
-{2979226,3861492,3861357,0.174288888888889,0.174288888888889},
-{2979227,3863665,3863928,0.301539130434783,0.256866666666667},
-{2979228,3866036,3863928,1.7666,1.7666},
-{2979229,3866036,3866367,0.29079,0.29079},
-{2979230,3865759,3866036,0.255628571428571,0.255628571428571},
-{2979231,3865641,3865759,0.0788222222222222,0.0788222222222222},
-{2979232,3866775,3866036,0.299733333333333,0.299733333333333},
-{2979233,3863557,3863262,0.33265,0.33265},
-{2979234,3864151,3863821,0.6074,0.6074},
-{2979235,3863262,3862720,0.322272,0.322272},
-{2979236,3863821,3863262,0.309807692307692,0.309807692307692},
-{2979237,3864139,3863821,0.18366,0.18366},
-{2979238,3865612,3864139,0.665822222222222,0.665822222222222},
-{2979239,3865914,3865612,0.41448,0.41448},
-{2979240,3865612,3865492,0.185711111111111,0.185711111111111},
-{2979241,3863542,3862934,0.312511111111111,0.312511111111111},
-{2979242,3863754,3863542,0.106466666666667,0.106466666666667},
-{2979243,3863918,3863754,0.138046153846154,0.138046153846154},
-{2979244,3863821,3863542,0.283844444444444,0.283844444444444},
-{2979245,3863754,3863627,0.314955555555556,0.314955555555556},
-{2979246,3863627,3863937,0.137733333333333,0.137733333333333},
-{2979247,3865857,3865612,0.0961111111111111,0.0961111111111111},
-{2979248,3865857,3865548,0.242155555555556,0.242155555555556},
-{2979249,3866137,3865857,0.224133333333333,0.224133333333333},
-{2979250,3868109,3866285,0.763533333333333,0.763533333333333},
-{2979251,3868313,3866602,0.740222222222222,0.740222222222222},
-{2979252,3866983,3867557,0.265133333333333,0.265133333333333},
-{2979253,3867557,3868134,0.248844444444444,0.248844444444444},
-{2979254,3867713,3867557,0.1094,0.1094},
-{2979255,3868297,3867713,0.236111111111111,0.236111111111111},
-{2979256,3868297,3868134,0.113444444444444,0.113444444444444},
-{2979257,3868741,3868297,0.186755555555556,0.186755555555556},
-{2979258,3869012,3867595,0.599422222222222,0.599422222222222},
-{2979259,3868074,3868827,0.312577777777778,0.312577777777778},
-{2979260,3868827,3869325,0.272791304347826,0.241315384615385},
-{2979261,3868827,3869497,0.5412,0.5412},
-{2979262,3872141,3871656,0.316977777777778,0.316977777777778},
-{2979263,3868056,3867628,0.308,0.308},
-{2979264,3869321,3868298,1000000,1000000},
-{2979265,3882075,3882641,0.36318,0.36318},
-{2979266,3882641,3882903,0.16479,0.16479},
-{2979267,3884580,3885174,0.1879875,0.146721951219512},
-{2979268,3885174,3885462,0.126576923076923,0.0997272727272727},
-{2979269,3882987,3882641,0.40665,0.40665},
-{2979270,3882987,3882289,0.39381,0.39381},
-{2979271,3883208,3882987,0.11277,0.11277},
-{2979272,3883605,3884066,0.24543,0.24543},
-{2979273,3884028,3884066,0.388377777777778,0.388377777777778},
-{2979274,3885143,3884628,0.26421,0.26421},
-{2979275,3883107,3882903,0.152688888888889,0.152688888888889},
-{2979276,3887762,3887788,0.0400888888888889,0.0400888888888889},
-{2979277,3887788,3887828,0.21987,0.21987},
-{2979278,3861592,3860922,0.451272,0.451272},
-{2979279,3861617,3861592,0.060312,0.0558444444444444},
-{2979280,3861781,3861592,0.118009090909091,0.136642105263158},
-{2979281,3861781,3861614,0.282422222222222,0.282422222222222},
-{2979282,3862207,3862204,0.199725,0.152171428571429},
-{2979283,3860324,3859430,0.409468965517241,0.424092857142857},
-{2979284,3861212,3861617,0.552714285714286,0.552714285714286},
-{2979285,3862730,3861781,0.546485714285714,0.7172625},
-{2979286,3864314,3861617,1.485216,1.3752},
-{2979287,3863354,3862730,0.445642105263158,0.6048},
-{2979288,3863354,3862974,0.731,0.731},
-{2979289,3863969,3863354,0.387694736842105,0.433305882352941},
-{2979290,3864540,3865410,0.418963636363636,0.418963636363636},
-{2979291,3864541,3864101,0.195333333333333,0.195333333333333},
-{2979292,3863914,3864188,0.154955555555556,0.154955555555556},
-{2979293,3866355,3866014,0.135977777777778,0.135977777777778},
-{2979294,3866744,3866355,0.21168,0.249035294117647},
-{2979295,3866885,3866509,0.133269230769231,0.182368421052632},
-{2979296,3866885,3866707,0.131133333333333,0.131133333333333},
-{2979297,3866707,3866304,0.178009090909091,0.19581},
-{2979298,3866980,3866707,0.1663,0.173530434782609},
-{2979299,3866370,3866304,0.297022222222222,0.297022222222222},
-{2979300,3866370,3866582,0.133333333333333,0.133333333333333},
-{2979301,3866740,3866370,0.145088888888889,0.145088888888889},
-{2979302,3866642,3866740,0.222755555555556,0.222755555555556},
-{2979303,3866740,3866846,0.109644444444444,0.109644444444444},
-{2979304,3866980,3866846,0.0944666666666667,0.0944666666666667},
-{2979305,3867317,3866980,0.169153846153846,0.18325},
-{2979306,3866846,3867317,0.205244444444444,0.205244444444444},
-{2979307,3867317,3867759,0.234111111111111,0.234111111111111},
-{2979308,3867516,3867317,0.147222222222222,0.19875},
-{2979309,3867143,3867516,0.284815384615385,0.3366},
-{2979310,3867516,3867759,0.104088888888889,0.104088888888889},
-{2979311,3867678,3866885,0.302690322580645,0.375336},
-{2979312,3868152,3867678,0.219268965517241,0.21196},
-{2979313,3867759,3868152,1000000,1000000},
-{2979314,3868516,3868152,0.190071428571429,0.231391304347826},
-{2979315,3867656,3868784,0.470933333333333,0.470933333333333},
-{2979316,3870201,3869321,1000000,1000000},
-{2979317,3867628,3867150,0.208533333333333,0.208533333333333},
-{2979318,3869159,3868764,0.42033,0.42033},
-{2979319,3869739,3869159,0.3165,0.3165},
-{2979320,3869374,3869248,0.117644444444444,0.117644444444444},
-{2979321,3869326,3869374,0.167311111111111,0.167311111111111},
-{2979322,3869479,3869326,0.247155555555556,0.247155555555556},
-{2979323,3870055,3869374,0.279133333333333,0.279133333333333},
-{2979324,3870386,3870490,0.35943,0.35943},
-{2979325,3869980,3870237,0.243511111111111,0.243511111111111},
-{2979326,3870313,3870237,0.0281777777777778,0.0281777777777778},
-{2979327,3870248,3870313,0.195244444444444,0.195244444444444},
-{2979328,3870237,3869479,0.356355555555556,0.356355555555556},
-{2979329,3870313,3870605,0.0982222222222222,0.0982222222222222},
-{2979330,3870597,3870605,0.189646153846154,0.182622222222222},
-{2979331,3871880,3872269,0.151069565217391,0.165457142857143},
-{2979332,3873858,3873874,0.0947555555555556,0.0882206896551724},
-{2979333,3879696,3878822,1000000,1000000},
-{2979334,3880181,3879717,0.240777777777778,0.240777777777778},
-{2979335,3879700,3879716,0.101577777777778,0.101577777777778},
-{2979336,3879696,3879700,0.0674666666666667,0.0674666666666667},
-{2979337,3879696,3879717,0.153711111111111,0.153711111111111},
-{2979338,3880226,3880289,0.4752375,0.4752375},
-{2979339,3880226,3880213,0.1084,0.1084},
-{2979340,3880181,3880213,0.3018,0.3018},
-{2979341,3880163,3880181,0.1341375,0.165092307692308},
-{2979342,3880144,3880163,0.14535,0.184990909090909},
-{2979343,3880642,3880181,0.218044444444444,0.218044444444444},
-{2979344,3880610,3880289,0.2650875,0.21207},
-{2979345,3880610,3880712,1000000,1000000},
-{2979346,3880687,3880712,1000000,1000000},
-{2979347,3880687,3880642,1000000,1000000},
-{2979348,3880576,3880642,0.6961,0.6961},
-{2979349,3880984,3880610,0.203685714285714,0.194427272727273},
-{2979350,3881478,3880642,0.357511111111111,0.357511111111111},
-{2979351,3881737,3880984,0.487729411764706,0.41457},
-{2979352,3881588,3881737,0.389057142857143,0.40851},
-{2979353,3881588,3881512,0.276138461538461,0.276138461538461},
-{2979354,3882136,3882134,0.59528,0.59528},
-{2979355,3881463,3880338,1000000,1000000},
-{2979356,3882731,3882817,1000000,1000000},
-{2979357,3882134,3882114,1.07383636363636,1.07383636363636},
-{2979358,3881512,3881478,0.140725,0.14684347826087},
-{2979359,3883605,3883642,0.404733333333333,0.404733333333333},
-{2979360,3884066,3884128,1000000,0.429777777777778},
-{2979361,3884687,3884628,0.75612,0.75612},
-{2979362,3884715,3884687,0.197188235294118,0.197188235294118},
-{2979363,3887571,3888042,0.259914285714286,0.237313043478261},
-{2979364,3885015,3885020,0.0905714285714286,0.1585},
-{2979365,3887571,3889116,0.74877,0.74877},
-{2979366,3889116,3889095,0.35996,0.3374625},
-{2979367,3884680,3885085,0.151288888888889,0.151288888888889},
-{2979368,3885862,3885789,0.595177777777778,0.595177777777778},
-{2979369,3885535,3886315,0.2978,0.2978},
-{2979370,3889116,3890497,0.78933,0.78933},
-{2979371,3890497,3890481,1000000,1000000},
-{2979372,3890497,3890847,0.148022222222222,0.148022222222222},
-{2979373,3893806,3894088,0.189371428571429,0.152953846153846},
-{2979374,3894088,3894120,0.44505,0.547753846153846},
-{2979375,3894088,3894564,1000000,0.263256},
-{2979376,3893941,3893806,1000000,0.263234482758621},
-{2979377,3894088,3894240,0.386494736842105,0.349685714285714},
-{2979378,3894826,3895423,0.233451428571429,0.2476},
-{2979379,3894131,3894252,1000000,1000000},
-{2979380,3894430,3894261,0.141,0.1498125},
-{2979381,3895744,3895637,0.0918818181818182,0.0918818181818182},
-{2979382,3895637,3895464,0.158311111111111,0.158311111111111},
-{2979383,3895637,3896112,0.287911111111111,0.287911111111111},
-{2979384,3895874,3896112,0.197863636363636,0.229105263157895},
-{2979385,3896112,3896226,0.1295625,0.109105263157895},
-{2979386,3895882,3896614,0.638739130434782,0.58764},
-{2979387,3896614,3897327,0.680714285714286,0.71475},
-{2979388,3897327,3897913,0.36125625,0.502617391304348},
-{2979389,3897913,3898460,0.274961538461538,0.297875},
-{2979390,3896614,3897066,0.421866666666667,0.33015652173913},
-{2979391,3896260,3896844,1000000,0.882327272727273},
-{2979392,3896990,3897059,1000000,0.053325},
-{2979393,3897059,3897199,1000000,0.0998444444444444},
-{2979394,3897199,3897550,1000000,0.324518181818182},
-{2979395,3897066,3897550,0.31575,0.344454545454545},
-{2979396,3897059,3897532,1000000,0.344971428571429},
-{2979397,3897199,3897659,0.344885714285714,1000000},
-{2979398,3897532,3897848,1000000,1000000},
-{2979399,3897550,3898065,1000000,0.338018181818182},
-{2979400,3897576,3897700,1000000,1000000},
-{2979401,3898966,3899288,0.285175,1000000},
-{2979402,3898065,3898187,0.0719714285714286,0.0839666666666667},
-{2979403,3898187,3898397,0.171176470588235,0.161666666666667},
-{2979404,3898397,3898549,0.0784571428571429,0.06865},
-{2979405,3898706,3899188,0.248622222222222,0.248622222222222},
-{2979406,3898853,3899188,0.3672375,0.267081818181818},
-{2979407,3898187,3898597,0.317008695652174,0.317008695652174},
-{2979408,3898597,3898706,0.0820285714285714,0.0820285714285714},
-{2979409,3898549,3898597,0.3882,0.3882},
-{2979410,3899288,3899528,0.131590909090909,0.131590909090909},
-{2979411,3899528,3899778,0.24879,0.24879},
-{2979412,3899188,3899262,0.0590608695652174,0.0522461538461538},
-{2979413,3899262,3899778,0.274,0.274},
-{2979414,3899528,3899812,0.161232,0.16795},
-{2979415,3899812,3899982,0.142452631578947,0.13533},
-{2979416,3899812,3900120,0.197666666666667,0.197666666666667},
-{2979417,3899808,3900120,0.159333333333333,0.159333333333333},
-{2979418,3899262,3899485,0.207266666666667,0.15545},
-{2979419,3897550,3898349,0.90135,0.554676923076923},
-{2979420,3897700,3898457,1000000,0.4858},
-{2979421,3900071,3901021,0.479888888888889,0.46275},
-{2979422,3900312,3901244,0.40918125,0.503607692307692},
-{2979423,3898349,3898790,0.374563636363636,0.433705263157895},
-{2979424,3899153,3899562,0.352095652173913,0.352095652173913},
-{2979425,3898790,3899312,0.470325,0.37626},
-{2979426,3899312,3899562,0.207410526315789,0.231811764705882},
-{2979427,3899562,3899984,0.20788,0.20788},
-{2979428,3899688,3900108,0.32325,0.32325},
-{2979429,3899984,3900108,0.0869454545454545,0.0869454545454545},
-{2979430,3900108,3900403,0.165844444444444,0.165844444444444},
-{2979431,3899984,3900345,0.246711111111111,1000000},
-{2979432,3900108,3900488,0.297954545454545,0.297954545454545},
-{2979433,3900345,3900488,0.0920666666666667,0.0920666666666667},
-{2979434,3900488,3900779,0.25275,0.25275},
-{2979435,3900779,3901252,0.35757,0.286056},
-{2979436,3900869,3901535,0.355064516129032,0.423346153846154},
-{2979437,3901252,3901535,0.210314285714286,0.184025},
-{2979438,3901205,3901821,0.370844444444444,0.400512},
-{2979439,3901535,3901821,0.192130434782609,0.163666666666667},
-{2979440,3899562,3900421,0.671575,0.671575},
-{2979441,3901535,3902151,0.341911111111111,0.341911111111111},
-{2979442,3901821,3902460,0.3291,0.3291},
-{2979443,3898276,3898790,0.492,0.351428571428571},
-{2979444,3898790,3899170,0.262638461538462,0.325171428571429},
-{2979445,3898650,3899170,0.299952,0.299952},
-{2979446,3899170,3899645,0.335863636363636,0.307875},
-{2979447,3899170,3899392,0.163688888888889,0.163688888888889},
-{2979448,3902151,3902754,0.469263157894737,0.469263157894737},
-{2979449,3901821,3902156,0.182904,0.175869230769231},
-{2979450,3902156,3902289,0.135642857142857,0.135642857142857},
-{2979451,3902289,3903314,0.635775,0.76293},
-{2979452,3902565,3902873,0.155844444444444,0.155844444444444},
-{2979453,3902873,3903105,0.172088888888889,0.172088888888889},
-{2979454,3902460,3903050,0.334533333333333,0.334533333333333},
-{2979455,3901947,3902453,0.3093,0.3093},
-{2979456,3902453,3902754,0.27945,0.263011764705882},
-{2979457,3902754,3903050,0.2862,0.195136363636364},
-{2979458,3903050,3903373,0.2659,0.217554545454545},
-{2979459,3902754,3903346,0.345311111111111,0.345311111111111},
-{2979460,3903050,3903593,0.343355555555556,0.343355555555556},
-{2979461,3903373,3903761,0.34248,0.34248},
-{2979462,3904147,3904312,0.135314285714286,0.135314285714286},
-{2979463,3903314,3903770,0.365208,0.351161538461538},
-{2979464,3903770,3904152,0.246375,0.203896551724138},
-{2979465,3904152,3904312,0.13455,0.129168},
-{2979466,3904152,3905204,0.589244444444444,1000000},
-{2979467,3904312,3904574,0.20136,0.20136},
-{2979468,3904312,3904817,0.332378571428572,0.387775},
-{2979469,3904817,3905206,0.320542857142857,0.269256},
-{2979470,3904574,3905076,0.334377777777778,0.334377777777778},
-{2979471,3904564,3905177,0.407244444444444,0.407244444444444},
-{2979472,3904243,3904740,0.345622222222222,0.345622222222222},
-{2979473,3904574,3905353,0.500376,0.500376},
-{2979474,3905206,3906356,0.95261052631579,0.670355555555556},
-{2979475,3903593,3903985,0.229,0.229},
-{2979476,3903985,3904439,1000000,0.216575},
-{2979477,3904439,3904740,0.167504347826087,0.167504347826087},
-{2979478,3904740,3905177,0.162218181818182,0.162218181818182},
-{2979479,3905177,3905484,0.147814285714286,0.159184615384615},
-{2979480,3904417,3904617,0.133622222222222,0.133622222222222},
-{2979481,3902873,3903132,0.153311111111111,0.153311111111111},
-{2979482,3906606,3907033,0.245530434782609,0.256690909090909},
-{2979483,3905865,3906108,0.123174193548387,0.141422222222222},
-{2979484,3906108,3906378,0.135561290322581,0.144910344827586},
-{2979485,3906378,3906606,0.185113043478261,0.193527272727273},
-{2979486,3907033,3907745,0.363822222222222,0.363822222222222},
-{2979487,3907745,3908507,0.374088888888889,0.374088888888889},
-{2979488,3907390,3908069,0.358288888888889,0.358288888888889},
-{2979489,3908069,3908816,0.371555555555556,0.371555555555556},
-{2979490,3908363,3909135,0.530242105263158,0.530242105263158},
-{2979491,3906378,3906984,0.356488888888889,0.356488888888889},
-{2979492,3906984,3907328,0.282675,0.22614},
-{2979493,3907328,3907745,0.28077,0.4011},
-{2979494,3907745,3908069,0.162888,0.162888},
-{2979495,3908069,3908363,0.170725,0.241023529411765},
-{2979496,3909135,3909384,0.168026086956522,0.19323},
-{2979497,3908799,3909384,0.341688888888889,0.341688888888889},
-{2979498,3909384,3909717,0.222057142857143,0.222057142857143},
-{2979499,3909717,3910051,0.158911111111111,0.158911111111111},
-{2979500,3910051,3910139,0.230844444444444,0.230844444444444},
-{2979501,3909384,3910166,0.381407142857143,0.368255172413793},
-{2979502,3909717,3910567,0.384533333333333,0.384533333333333},
-{2979503,3910051,3910865,0.376111111111111,0.376111111111111},
-{2979504,3909800,3910166,0.185492307692308,0.141847058823529},
-{2979505,3910166,3910567,0.23181,0.210736363636364},
-{2979506,3910567,3910865,0.22575,0.196304347826087},
-{2979507,3910865,3911011,0.37276,0.243104347826087},
-{2979508,3908799,3909474,0.357444444444444,0.357444444444444},
-{2979509,3909474,3909800,0.133327272727273,0.129405882352941},
-{2979510,3910949,3910837,0.20444347826087,0.20444347826087},
-{2979511,3911290,3911218,0.171038709677419,0.171038709677419},
-{2979512,3911218,3911099,0.326034782608696,0.357085714285714},
-{2979513,3911290,3912035,0.384422222222222,0.384422222222222},
-{2979514,3911218,3911730,0.35292,0.35292},
-{2979515,3904699,3905513,0.557165217391304,0.441889655172414},
-{2979516,3905513,3905601,0.0597333333333333,0.0896},
-{2979517,3905601,3905516,0.0629684210526316,0.0629684210526316},
-{2979518,3905944,3905601,0.225182608695652,0.235418181818182},
-{2979519,3905516,3905865,0.200423076923077,0.20844},
-{2979520,3906108,3906718,0.361955555555556,0.361955555555556},
-{2979521,3906718,3906984,0.207966666666667,0.207966666666667},
-{2979522,3904999,3905880,0.585981818181818,0.460414285714286},
-{2979523,3905880,3905944,0.0711666666666667,0.04575},
-{2979524,3905880,3906088,0.199231578947368,0.199231578947368},
-{2979525,3905226,3906088,0.460888888888889,0.460888888888889},
-{2979526,3905457,3906299,0.452444444444444,0.452444444444444},
-{2979527,3906088,3906299,0.134511111111111,0.134511111111111},
-{2979528,3906299,3906534,0.196663636363636,0.196663636363636},
-{2979529,3905944,3906170,0.123782608695652,0.101678571428571},
-{2979530,3906170,3906307,0.0939391304347826,0.0771642857142857},
-{2979531,3906170,3906889,0.514434782608696,0.514434782608696},
-{2979532,3905865,3906307,0.336272727272727,0.336272727272727},
-{2979533,3906307,3906609,0.153875,0.14772},
-{2979534,3906609,3906893,0.177977777777778,0.177977777777778},
-{2979535,3906893,3907203,0.169888888888889,0.169888888888889},
-{2979536,3906609,3906718,0.132830769230769,0.132830769230769},
-{2979537,3906893,3907255,0.277233333333333,0.277233333333333},
-{2979538,3906984,3907376,0.188711111111111,0.188711111111111},
-{2979539,3907376,3907689,0.23538,0.276917647058823},
-{2979540,3907376,3907684,0.3643,1000000},
-{2979541,3912329,3912685,0.170622222222222,0.170622222222222},
-{2979542,3911597,3912685,0.534577777777778,0.534577777777778},
-{2979543,3912685,3912833,0.0818526315789474,0.0818526315789474},
-{2979544,3912833,3913098,0.19935,0.1772},
-{2979545,3910949,3911776,0.308066666666667,0.308066666666667},
-{2979546,3911897,3913098,1.5954,1.5954},
-{2979547,3913182,3912833,0.238575,0.238575},
-{2979548,3913448,3913182,0.20478947368421,0.20478947368421},
-{2979549,3913182,3913759,0.285866666666667,0.285866666666667},
-{2979550,3913098,3913428,0.216771428571429,0.239589473684211},
-{2979551,3913428,3913755,0.1617,0.168168},
-{2979552,3912542,3913755,0.534133333333333,0.534133333333333},
-{2979604,3859969,3859631,0.54468,0.54468},
-{2979616,3865495,3865623,0.48159,0.48159},
-{2979626,3866085,3864868,0.41522,0.461355555555556},
-{2979627,3867323,3866085,0.3644625,0.402165517241379},
-{2979628,3867008,3866576,0.50072,0.357657142857143},
-{2979629,3866828,3866576,0.15591,0.15591},
-{2979630,3866828,3867352,0.302022222222222,0.302022222222222},
-{2979631,3867133,3866828,0.133103225806452,0.171925},
-{2979632,3867133,3867656,0.306422222222222,0.306422222222222},
-{2979633,3867436,3867133,0.13089375,0.13089375},
-{2979634,3867653,3867436,0.122091891891892,0.122091891891892},
-{2979635,3867807,3867653,1000000,1000000},
-{2979636,3868540,3868131,0.191844444444444,0.191844444444444},
-{2979637,3868338,3868540,0.117644444444444,0.117644444444444},
-{2979638,3868901,3868540,0.373688888888889,0.373688888888889},
-{2979639,3869018,3867653,0.521733333333333,0.521733333333333},
-{2979640,3867436,3866928,0.229555555555556,0.229555555555556},
-{2979641,3870984,3870571,0.145688888888889,0.145688888888889},
-{2979642,3870158,3870135,1000000,1000000},
-{2979643,3870894,3870135,0.29335,0.306104347826087},
-{2979644,3868972,3869053,0.121933333333333,0.121933333333333},
-{2979645,3869155,3868972,1000000,1000000},
-{2979646,3869336,3869155,1000000,1000000},
-{2979647,3870072,3869336,0.253288888888889,0.253288888888889},
-{2979648,3869336,3869387,0.0579111111111111,0.0579111111111111},
-{2979649,3869387,3869442,0.0559777777777778,0.0559777777777778},
-{2979650,3869442,3869583,0.100155555555556,0.100155555555556},
-{2979651,3870682,3870877,0.132444444444444,0.132444444444444},
-{2979652,3870072,3870129,0.124511111111111,0.124511111111111},
-{2979653,3870909,3871535,1000000,0.45312},
-{2979654,3871721,3872367,0.253147826086957,0.215644444444444},
-{2979655,3872269,3872254,0.0893555555555556,0.0893555555555556},
-{2979656,3872815,3872666,0.246555555555556,0.246555555555556},
-{2979657,3872367,3872269,0.211485714285714,0.193095652173913},
-{2979658,3872367,3872815,0.186485714285714,0.139864285714286},
-{2979659,3873858,3873872,0.1248,0.12064},
-{2979660,3873872,3874017,0.331232432432432,0.314246153846154},
-{2979661,3872417,3872367,0.155575,0.143607692307692},
-{2979662,3872417,3872879,0.241552941176471,0.241552941176471},
-{2979663,3872879,3872815,0.235585714285714,0.235585714285714},
-{2979664,3872499,3872417,0.141,0.135964285714286},
-{2979665,3871946,3872499,0.249942857142857,0.26244},
-{2979666,3872557,3872499,0.168625,0.183954545454545},
-{2979667,3872385,3872557,0.0586222222222222,0.0586222222222222},
-{2979668,3872385,3872739,1000000,1000000},
-{2979669,3872739,3872557,0.141124137931034,0.177939130434783},
-{2979670,3871334,3871256,1000000,1000000},
-{2979671,3871535,3871615,0.0432,0.0412363636363636},
-{2979672,3872283,3872767,1000000,0.3651},
-{2979673,3872767,3872739,0.0561333333333333,0.07578},
-{2979674,3872856,3872767,0.214554545454545,0.214554545454545},
-{2979675,3871535,3871494,0.20724,0.287833333333333},
-{2979676,3871615,3872067,0.468141176470588,0.468141176470588},
-{2979677,3872856,3873195,1000000,0.592090909090909},
-{2979678,3872905,3872856,0.16971,0.28285},
-{2979679,3872574,3872905,0.17685,1000000},
-{2979680,3872905,3873195,0.21592,1000000},
-{2979681,3872101,3872574,0.329742857142857,1000000},
-{2979682,3878615,3878777,1000000,1000000},
-{2979683,3878359,3878615,1000000,1000000},
-{2979684,3879716,3879708,0.153266666666667,0.153266666666667},
-{2979685,3878770,3878518,1000000,1000000},
-{2979686,3879708,3880180,0.2884,0.2884},
-{2979687,3880099,3880793,0.388958823529412,0.400745454545455},
-{2979688,3881862,3881458,0.521307692307692,0.322714285714286},
-{2979689,3881483,3881344,0.160777777777778,0.131545454545455},
-{2979690,3881344,3881117,0.123947368421053,0.120769230769231},
-{2979691,3881458,3881344,0.08373,0.08373},
-{2979692,3881117,3881274,0.12705,0.112933333333333},
-{2979693,3881458,3881274,0.239633333333333,0.2054},
-{2979694,3881274,3881093,0.415661538461538,0.337725},
-{2979695,3880424,3880877,0.414,0.414},
-{2979696,3881093,3880877,0.235341176470588,0.235341176470588},
-{2979697,3878076,3877880,1000000,1000000},
-{2979698,3878518,3878076,1000000,1000000},
-{2979699,3878188,3878076,1000000,1000000},
-{2979700,3878188,3878057,1000000,1000000},
-{2979701,3878908,3879202,0.1548,0.1548},
-{2979702,3879636,3879202,0.3528,0.373552941176471},
-{2979703,3879202,3879471,0.227977777777778,0.227977777777778},
-{2979704,3879471,3879864,0.292257142857143,0.245496},
-{2979705,3880424,3880091,0.257444444444444,0.210636363636364},
-{2979706,3880091,3879792,0.305972727272727,0.217141935483871},
-{2979707,3880486,3880091,0.251622222222222,0.251622222222222},
-{2979708,3880864,3880486,0.286022222222222,0.286022222222222},
-{2979709,3880486,3880135,0.234488888888889,0.234488888888889},
-{2979710,3880644,3880326,0.230444444444444,0.345666666666667},
-{2979711,3880644,3880486,0.0988,0.0988},
-{2979712,3880163,3879696,0.243311111111111,0.243311111111111},
-{2979713,3881478,3881487,0.073075,0.0923052631578947},
-{2979714,3881483,3881487,0.401929411764706,0.401929411764706},
-{2979715,3882097,3882114,0.46308,0.46308},
-{2979716,3880180,3880576,0.336466666666667,0.336466666666667},
-{2979717,3881896,3881458,0.206133333333333,0.206133333333333},
-{2979718,3882308,3881896,0.225177777777778,0.225177777777778},
-{2979719,3881582,3880877,0.344511111111111,0.344511111111111},
-{2979720,3881794,3881582,0.173589473684211,0.157057142857143},
-{2979721,3881582,3881094,0.64348,0.567776470588235},
-{2979722,3881869,3882235,0.481044444444444,0.481044444444444},
-{2979723,3880644,3881094,0.2826,0.3297},
-{2979724,3884598,3884572,0.495,0.495},
-{2979725,3886220,3886355,0.07872,0.0874666666666667},
-{2979726,3886355,3887360,0.460246153846154,0.4432},
-{2979727,3886355,3886327,0.296911111111111,0.296911111111111},
-{2979728,3886327,3886291,0.300333333333333,0.300333333333333},
-{2979729,3886134,3886291,0.0659777777777778,0.08907},
-{2979730,3886291,3887281,0.39094,0.316978378378378},
-{2979731,3886291,3886307,0.215244444444444,0.215244444444444},
-{2979732,3887360,3889299,0.697044444444444,0.697044444444444},
-{2979733,3887281,3889963,1.00644444444444,1.00644444444444},
-{2979734,3886648,3886605,0.45696,0.45696},
-{2979735,3889963,3890236,0.21676,0.16257},
-{2979736,3889963,3890085,0.52888,0.52888},
-{2979737,3885197,3885419,1000000,1000000},
-{2979738,3885419,3885395,1000000,1000000},
-{2979739,3885419,3885652,1000000,1000000},
-{2979740,3885652,3885620,1000000,1000000},
-{2979741,3884585,3884413,0.564022222222222,0.564022222222222},
-{2979742,3884766,3885036,1000000,0.577094117647059},
-{2979788,3882361,3882167,0.148408695652174,0.200788235294118},
-{2979789,3882167,3882069,0.0751153846153846,0.0673448275862069},
-{2979790,3881905,3882069,0.09448,0.109015384615385},
-{2979795,3894041,3894295,1000000,1000000},
-{2979796,3894295,3894587,1000000,1000000},
-{2979797,3898295,3898789,0.4596,0.40215},
-{2979798,3899043,3900231,0.525763636363636,0.49572},
-{2979799,3899877,3900181,0.187022222222222,0.187022222222222},
-{2979800,3899490,3900181,0.462954545454546,1000000},
-{2979801,3900181,3900620,0.263333333333333,1000000},
-{2979802,3899692,3900834,0.86214,0.86214},
-{2979803,3901189,3901529,0.159977777777778,0.159977777777778},
-{2979804,3900620,3901529,0.524244444444444,0.524244444444444},
-{2979805,3901529,3901838,0.183044444444444,0.183044444444444},
-{2979806,3900834,3901838,0.547333333333333,0.547333333333333},
-{2979807,3900102,3901235,0.641622222222222,0.641622222222222},
-{2979808,3898295,3898937,0.435488888888889,0.435488888888889},
-{2979809,3901838,3902144,0.142055172413793,0.142055172413793},
-{2979810,3903346,3903610,0.175155555555556,0.175155555555556},
-{2979811,3903270,3903610,0.20195,0.2308},
-{2979812,3903610,3903985,0.177336,0.13854375},
-{2979813,3902116,3901811,0.170733333333333,0.170733333333333},
-{2979814,3902144,3902436,0.221236363636364,0.221236363636364},
-{2979815,3902116,3902436,0.20229,0.20229},
-{2979816,3901319,3902039,0.372133333333333,0.372133333333333},
-{2979817,3902039,3902116,0.060312,0.060312},
-{2979818,3902436,3902786,0.246088888888889,0.246088888888889},
-{2979819,3902708,3903187,0.5856,0.421632},
-{2979820,3903187,3903701,0.58332,0.58332},
-{2979821,3903519,3904154,0.347688888888889,0.347688888888889},
-{2979822,3903985,3904154,0.1399125,0.1399125},
-{2979823,3904154,3904377,0.135577777777778,0.135577777777778},
-{2979824,3903698,3904377,0.368177777777778,0.397632},
-{2979825,3904377,3904699,0.236085714285714,0.206575},
-{2979826,3903892,3904999,0.5748,0.5748},
-{2979827,3904129,3905226,0.604155555555556,0.604155555555556},
-{2979828,3902786,3902990,0.146111111111111,0.146111111111111},
-{2979829,3902990,3903173,0.1416,0.1416},
-{2979830,3904290,3905457,0.593379310344827,0.593379310344827},
-{2979831,3901660,3902039,0.641778947368421,0.641778947368421},
-{2979832,3901866,3902990,0.554466666666667,0.554466666666667},
-{2979833,3902104,3903173,0.548533333333333,0.548533333333333},
-{2979834,3903173,3903395,0.148177777777778,0.148177777777778},
-{2979835,3903395,3903574,0.153555555555556,0.153555555555556},
-{2979836,3903395,3903701,0.214152,0.214152},
-{2979837,3903701,3903924,0.158644444444444,0.158644444444444},
-{2979838,3903924,3904077,0.107955555555556,0.107955555555556},
-{2979839,3903701,3904290,0.33745,0.33745},
-{2979840,3904077,3904650,0.33612,0.33612},
-{2979841,3904727,3906041,0.6253,0.6253},
-{2979842,3900281,3901413,0.6408,0.6408},
-{2979843,3900687,3901866,0.53986875,0.664453846153846},
-{2979844,3902351,3903395,0.524335714285714,0.524335714285714},
-{2979845,3906041,3906600,0.330355555555556,0.330355555555556},
-{2979846,3906276,3906860,0.326622222222222,0.326622222222222},
-{2979847,3906813,3907484,0.3709,0.387026086956522},
-{2979848,3907716,3907672,0.333022222222222,0.333022222222222},
-{2979849,3907716,3908217,0.3935625,0.3935625},
-{2979850,3907170,3907672,0.24,0.24},
-{2979851,3907672,3908000,0.20439,0.20439},
-{2979852,3907689,3908000,0.165375,0.233470588235294},
-{2979853,3907672,3908217,0.259511111111111,0.259511111111111},
-{2979854,3907484,3908138,0.448854545454545,0.429339130434783},
-{2979855,3908000,3908522,0.195908571428571,0.195908571428571},
-{2979856,3908217,3908522,0.143977777777778,0.143977777777778},
-{2979857,3908522,3908821,0.1704,0.1704},
-{2979858,3908138,3908821,0.331546153846154,0.307864285714286},
-{2979859,3908095,3909153,0.56796,1000000},
-{2979860,3908821,3909153,0.155544827586207,0.145509677419355},
-{2979861,3909153,3909474,0.151965517241379,0.1469},
-{2979862,3908821,3909097,0.139666666666667,0.139666666666667},
-{2979863,3909153,3909670,0.281244444444444,0.281244444444444},
-{2979864,3908616,3909097,0.242177777777778,0.242177777777778},
-{2979865,3908863,3909322,0.212622222222222,0.212622222222222},
-{2979866,3909097,3909322,0.119955555555556,0.119955555555556},
-{2979867,3909322,3909913,0.3076,0.3076},
-{2979868,3909703,3909913,0.118685714285714,0.138466666666667},
-{2979869,3909322,3909670,0.1662,0.1662},
-{2979870,3909670,3910358,0.309288888888889,0.309288888888889},
-{2979871,3909913,3910358,0.19885,0.216927272727273},
-{2979872,3909348,3909517,1000000,1000000},
-{2979873,3909517,3909609,1000000,1000000},
-{2979874,3907690,3908603,0.417311111111111,0.417311111111111},
-{2979875,3905343,3906813,0.879675,0.781933333333333},
-{2979876,3905551,3907113,1.09149,0.873192},
-{2979877,3905986,3907690,0.973625,0.93468},
-{2979878,3908908,3909180,0.182514285714286,0.201726315789474},
-{2979879,3911207,3911497,0.155466666666667,0.155466666666667},
-{2979880,3911497,3911732,0.138,0.138},
-{2979881,3911354,3911497,0.14072,0.14072},
-{2979882,3911354,3911732,0.148488888888889,0.148488888888889},
-{2979883,3911207,3911701,0.2546,0.2546},
-{2979884,3911701,3912221,0.4300125,0.4300125},
-{2979885,3911701,3912009,0.165222222222222,0.165222222222222},
-{2979886,3911497,3911882,0.194022222222222,0.194022222222222},
-{2979887,3911882,3912009,0.0616551724137931,0.0616551724137931},
-{2979888,3912009,3912227,0.114860869565217,0.110075},
-{2979889,3912227,3912605,0.230333333333333,0.218210526315789},
-{2979890,3911732,3912440,0.247977777777778,0.247977777777778},
-{2979891,3911882,3912440,0.299822222222222,0.299822222222222},
-{2979892,3912227,3913038,0.386155555555556,0.386155555555556},
-{2979893,3912440,3913038,0.180488888888889,0.180488888888889},
-{2979894,3914836,3915258,0.343121739130435,0.328825},
-{2979895,3915447,3915166,1000000,1000000},
-{2979896,3915166,3915161,1000000,1000000},
-{2979897,3915166,3915495,1000000,1000000},
-{2979940,3866085,3866032,0.256955555555556,0.256955555555556},
-{2979941,3865839,3865450,0.632533333333333,0.632533333333333},
-{2979955,3865354,3864647,0.251688888888889,0.251688888888889},
-{2979956,3865235,3864632,0.29904,0.29904},
-{2979959,3865450,3865354,0.18305,0.231221052631579},
-{2979960,3865354,3865235,0.164746153846154,0.203971428571429},
-{2979961,3866526,3866024,0.664355555555556,0.664355555555556},
-{2979962,3866336,3865354,0.366155555555556,0.366155555555556},
-{2979967,3864988,3865235,0.380968421052632,0.314713043478261},
-{2979975,3866949,3866289,0.827034782608696,0.827034782608696},
-{2979976,3865846,3865235,0.235444444444444,0.235444444444444},
-{2979977,3866395,3865846,0.189622222222222,0.189622222222222},
-{2979978,3866695,3866611,0.263711111111111,0.263711111111111},
-{2979980,3865690,3864988,0.208129411764706,0.202182857142857},
-{2979981,3869053,3868712,0.247114285714286,0.247114285714286},
-{2979982,3868712,3868619,0.0720666666666667,0.0720666666666667},
-{2979983,3868712,3869091,0.618366666666667,0.618366666666667},
-{2979984,3868619,3867870,0.2668,0.2668},
-{2979985,3867806,3867870,0.265257142857143,0.293178947368421},
-{2979986,3868619,3868503,0.375028571428571,0.342417391304348},
-{2979987,3869053,3869206,0.151304347826087,0.145},
-{2979988,3867291,3866949,0.148644444444444,1000000},
-{2979989,3867705,3867291,0.235314285714286,1000000},
-{2979990,3867806,3867705,0.166894736842105,0.15855},
-{2979991,3868301,3867705,0.25904347826087,0.25904347826087},
-{2979992,3868647,3868301,0.177133333333333,0.177133333333333},
-{2979993,3868879,3868874,0.121547368421053,0.121547368421053},
-{2979994,3868777,3868301,0.182666666666667,0.182666666666667},
-{2979995,3867291,3866796,0.546444444444445,0.546444444444445},
-{2979996,3867705,3867383,0.392048275862069,0.392048275862069},
-{2979997,3868874,3868777,0.0938444444444444,0.0938444444444444},
-{2979998,3869206,3869231,0.0311612903225806,0.0292727272727273},
-{2979999,3869231,3869577,0.337311111111111,0.337311111111111},
-{2980000,3869583,3869755,0.119911111111111,0.119911111111111},
-{2980001,3869888,3869755,0.07665,0.07665},
-{2980002,3870129,3870134,0.0995777777777778,0.0995777777777778},
-{2980003,3870134,3869888,0.126882352941176,0.126882352941176},
-{2980004,3870284,3870134,0.0530444444444444,0.059675},
-{2980005,3871106,3870284,0.3675,0.310961538461539},
-{2980006,3869888,3869832,0.5058,0.5058},
-{2980007,3870297,3869990,0.1395,0.1395},
-{2980008,3870239,3870297,0.0857777777777778,0.0857777777777778},
-{2980009,3870297,3870227,0.117577777777778,0.117577777777778},
-{2980010,3870358,3870444,0.159366666666667,0.220661538461538},
-{2980011,3869927,3868874,0.390222222222222,0.390222222222222},
-{2980012,3870074,3869927,0.120866666666667,0.120866666666667},
-{2980013,3869927,3869776,0.126222222222222,0.126222222222222},
-{2980014,3869776,3868777,0.387177777777778,0.387177777777778},
-{2980015,3870204,3869776,0.154622222222222,0.154622222222222},
-{2980016,3870487,3870204,1000000,1000000},
-{2980017,3866796,3866730,0.0743111111111111,0.0743111111111111},
-{2980018,3866730,3866695,1000000,1000000},
-{2980019,3867235,3866796,0.190486956521739,0.190486956521739},
-{2980020,3867383,3867235,0.09378,0.09378},
-{2980021,3867961,3867383,0.454828571428571,0.415278260869565},
-{2980022,3867961,3867752,0.0968222222222222,0.0968222222222222},
-{2980023,3869174,3868191,0.362311111111111,0.362311111111111},
-{2980024,3869007,3868191,0.340066666666667,0.340066666666667},
-{2980025,3869007,3869017,0.0398666666666667,0.0398666666666667},
-{2980026,3869904,3869571,1000000,1000000},
-{2980027,3869904,3870073,1000000,1000000},
-{2980028,3870956,3870350,1000000,0.59856},
-{2980029,3871269,3870444,0.397,0.378954545454545},
-{2980030,3871337,3871541,0.0952666666666667,0.0952666666666667},
-{2980031,3871164,3871666,0.161777777777778,0.161777777777778},
-{2980032,3870999,3871592,0.344622222222222,1000000},
-{2980033,3871820,3871666,1000000,1000000},
-{2980034,3871666,3872018,0.169844444444444,0.169844444444444},
-{2980035,3872018,3871676,0.117777777777778,0.117777777777778},
-{2980036,3871820,3872178,1000000,1000000},
-{2980037,3872018,3872178,0.0635333333333333,0.0635333333333333},
-{2980038,3870977,3871119,1000000,1000000},
-{2980039,3871119,3871592,0.191888888888889,0.191888888888889},
-{2980040,3871119,3871104,0.133111111111111,0.133111111111111},
-{2980041,3870524,3869904,1000000,1000000},
-{2980042,3871104,3870929,0.0638444444444444,0.0638444444444444},
-{2980043,3871592,3871553,0.0866888888888889,0.0866888888888889},
-{2980044,3871553,3871540,0.0846,0.0846},
-{2980045,3871906,3871553,0.22128,0.22128},
-{2980046,3871906,3871824,0.0677111111111111,0.0677111111111111},
-{2980047,3871247,3871104,0.0701368421052632,0.0701368421052632},
-{2980048,3871553,3871247,0.12843,0.12843},
-{2980049,3872181,3871906,0.144352941176471,0.144352941176471},
-{2980050,3872088,3871824,0.1556625,0.1556625},
-{2980051,3872668,3872088,0.260295652173913,0.352164705882353},
-{2980052,3872088,3872059,0.030768,0.0452470588235294},
-{2980053,3871494,3871716,0.120046153846154,0.15606},
-{2980054,3871716,3871820,0.237022222222222,0.237022222222222},
-{2980055,3872181,3872438,0.165177777777778,0.165177777777778},
-{2980056,3872876,3872668,0.157822222222222,0.157822222222222},
-{2980057,3869523,3869676,0.167644444444444,0.167644444444444},
-{2980058,3870113,3869523,0.200377777777778,0.200377777777778},
-{2980059,3870113,3870324,0.229955555555556,0.229955555555556},
-{2980060,3870243,3870113,0.0910714285714286,0.0910714285714286},
-{2980061,3872877,3873175,0.177094736842105,0.2103},
-{2980062,3872810,3873246,0.176555555555556,0.176555555555556},
-{2980063,3879933,3879221,1000000,1000000},
-{2980064,3880135,3879621,0.444888888888889,0.462},
-{2980065,3879496,3879621,0.12774,0.12774},
-{2980066,3877493,3878068,0.411422222222222,0.411422222222222},
-{2980067,3878885,3878068,0.425611764705882,0.425611764705882},
-{2980068,3878031,3878605,0.3958,0.3958},
-{2980069,3878605,3879152,0.288931034482759,0.288931034482759},
-{2980070,3879152,3879384,0.17355,0.204176470588235},
-{2980071,3878605,3879782,0.697133333333333,0.697133333333333},
-{2980072,3879221,3878654,1000000,1000000},
-{2980073,3881523,3880980,0.365355555555556,0.365355555555556},
-{2980074,3881364,3880980,0.223666666666667,0.223666666666667},
-{2980075,3881652,3881364,0.326133333333333,0.326133333333333},
-{2980076,3881364,3881229,0.171733333333333,0.171733333333333},
-{2980077,3883596,3883371,0.37425,0.415833333333333},
-{2980078,3883371,3883105,0.282622222222222,0.282622222222222},
-{2980079,3883371,3883326,0.286644444444444,0.286644444444444},
-{2980080,3883105,3883326,0.0888888888888889,0.0888888888888889},
-{2980081,3883105,3882858,0.3882,0.3882},
-{2980082,3883275,3882858,0.138370588235294,1000000},
-{2980083,3883326,3883275,0.384275,0.384275},
-{2980084,3882858,3882558,0.419571428571428,0.518294117647059},
-{2980085,3882853,3883275,0.5394,0.5394},
-{2980086,3882558,3882382,0.255366666666667,0.255366666666667},
-{2980087,3882853,3882558,0.2104125,1000000},
-{2980088,3883242,3882853,0.3007875,1000000},
-{2980089,3884413,3884391,0.34188,0.25641},
-{2980090,3884920,3884391,0.299305263157895,0.334517647058824},
-{2980091,3884195,3883677,1000000,0.554628571428571},
-{2980092,3880673,3880868,0.123777777777778,0.123777777777778},
-{2980093,3887603,3887607,0.151022222222222,1000000},
-{2980094,3887922,3887909,0.155155555555556,0.155155555555556},
-{2980095,3888075,3888050,1000000,0.148},
-{2980096,3887202,3887607,1000000,0.147888888888889},
-{2980097,3888050,3888568,1000000,0.188155555555556},
-{2980098,3887570,3887171,1000000,0.1452},
-{2980099,3887523,3887570,1000000,0.137644444444444},
-{2980100,3887841,3887871,0.141,0.141},
-{2980101,3888159,3888169,0.136311111111111,1000000},
-{2980102,3886582,3886509,0.40756875,0.43474},
-{2980103,3887841,3887752,0.419883870967742,0.419883870967742},
-{2980104,3884806,3885014,0.179353846153846,0.137152941176471},
-{2980105,3884784,3884413,0.177954545454545,0.206052631578947},
-{2980106,3884984,3884784,0.102409090909091,0.18775},
-{2980107,3884784,3884806,0.314446153846154,0.4542},
-{2980108,3885014,3885546,0.289831578947368,0.393342857142857},
-{2980109,3885546,3885524,0.490733333333333,0.464905263157895},
-{2980110,3885524,3885918,0.309230769230769,0.268},
-{2980111,3885816,3885759,0.98688,0.98688},
-{2980112,3889274,3889228,0.429666666666667,0.429666666666667},
-{2980113,3889927,3889874,0.316133333333333,0.316133333333333},
-{2980114,3889874,3889842,0.6577,0.6577},
-{2980115,3889758,3889842,0.486644444444444,0.486644444444444},
-{2980116,3885604,3885545,0.67374,0.67374},
-{2980117,3885269,3885545,0.111688888888889,0.111688888888889},
-{2980118,3885545,3885553,0.28554,0.28554},
-{2980119,3886509,3886428,0.646733333333333,0.48505},
-{2980120,3887752,3887661,0.539527272727273,0.539527272727273},
-{2980121,3889133,3889018,0.649755555555556,0.649755555555556},
-{2980122,3889758,3889650,0.89118,0.89118},
-{2980123,3890476,3890438,0.301303448275862,0.416085714285714},
-{2980124,3890438,3890375,0.5796,0.5796},
-{2980125,3890375,3890321,0.568460869565217,0.568460869565217},
-{2980126,3890321,3890225,0.942284210526316,0.89517},
-{2980127,3891553,3891513,0.442155555555556,0.37306875},
-{2980128,3890945,3891513,0.29475652173913,0.322828571428571},
-{2980129,3891513,3891508,0.101775,0.116314285714286},
-{2980130,3891508,3891492,0.13035,0.125855172413793},
-{2980131,3891492,3891467,0.2838,0.272448},
-{2980132,3891467,3891358,0.577316129032258,0.59656},
-{2980133,3884763,3884117,0.524,0.524},
-{2980134,3884117,3884528,0.274418181818182,0.274418181818182},
-{2980135,3884877,3884958,0.321866666666667,0.321866666666667},
-{2980136,3885164,3884877,0.24595,0.24595},
-{2980137,3885124,3885450,0.19945,0.19945},
-{2980138,3885124,3885483,0.211222222222222,0.211222222222222},
-{2980139,3884877,3885011,0.127835294117647,0.127835294117647},
-{2980140,3885011,3885124,0.0409741935483871,0.0438},
-{2980141,3885011,3884734,0.154509677419355,0.154509677419355},
-{2980142,3884734,3884528,0.1368,0.146933333333333},
-{2980143,3884734,3885481,0.367779310344828,0.367779310344828},
-{2980144,3884528,3884482,0.0420923076923077,0.043776},
-{2980145,3892149,3892332,0.0806444444444444,0.0806444444444444},
-{2980146,3892148,3892149,0.0808,0.0808},
-{2980147,3891645,3891508,0.11168,1000000},
-{2980148,3891492,3891626,0.0678,0.0941666666666667},
-{2980149,3891626,3891787,0.0890347826086957,0.0930818181818182},
-{2980150,3891787,3892004,0.153866666666667,0.131885714285714},
-{2980151,3892004,3891985,0.384733333333333,0.46168},
-{2980152,3892148,3892189,1000000,0.388888888888889},
-{2980153,3892332,3892638,0.5352,1000000},
-{2980154,3892189,3892290,1000000,0.0797625},
-{2980155,3892290,3892638,1000000,0.28908},
-{2980156,3892290,3892263,1000000,0.405276923076923},
-{2980157,3892263,3892240,1000000,0.377314285714286},
-{2980158,3892263,3892898,0.265,1000000},
-{2980159,3892638,3892898,1000000,0.376168421052632},
-{2980160,3892898,3893055,0.170688888888889,0.170688888888889},
-{2980161,3891985,3891964,0.2568,0.321},
-{2980162,3891964,3892293,0.157711111111111,0.157711111111111},
-{2980163,3899407,3900339,0.606133333333333,0.606133333333333},
-{2980164,3899215,3899407,1000000,0.154566666666667},
-{2980165,3899407,3899591,1000000,0.133663636363636},
-{2980166,3898902,3899344,0.267266666666667,0.36081},
-{2980167,3901103,3902351,0.748852173913043,0.615128571428571},
-{2980168,3901568,3902837,0.639422222222222,0.639422222222222},
-{2980169,3902837,3903788,0.532888888888889,0.532888888888889},
-{2980170,3903574,3903720,0.190835294117647,0.190835294117647},
-{2980171,3903720,3903788,0.05795,0.06954},
-{2980172,3903720,3904077,0.25215,0.25215},
-{2980173,3901781,3903064,0.642822222222222,0.642822222222222},
-{2980174,3903064,3904023,0.525822222222222,0.525822222222222},
-{2980175,3903788,3904023,0.154577777777778,0.154577777777778},
-{2980176,3904023,3904252,0.20931,0.20931},
-{2980177,3905184,3904252,0.493377777777778,0.493377777777778},
-{2980178,3904252,3904444,0.20571,0.20571},
-{2980179,3904444,3904653,0.243733333333333,0.243733333333333},
-{2980180,3904653,3904862,0.308261538461538,0.308261538461538},
-{2980181,3904862,3905087,0.28428,0.193827272727273},
-{2980182,3905087,3905265,0.252975,0.16865},
-{2980183,3904444,3905343,0.463427586206897,0.433529032258065},
-{2980184,3903489,3904444,0.553512,0.44638064516129},
-{2980185,3903682,3904653,0.549672,0.572575},
-{2980186,3900483,3900694,0.168207692307692,0.168207692307692},
-{2980187,3900694,3900891,0.11852,0.11852},
-{2980188,3900694,3901568,0.58635,0.58635},
-{2980189,3900891,3901781,0.514222222222222,0.514222222222222},
-{2980190,3904653,3905551,0.496533333333333,0.496533333333333},
-{2980191,3905087,3905986,0.57764347826087,0.492066666666667},
-{2980192,3905265,3906199,0.607309090909091,0.607309090909091},
-{2980193,3904701,3905265,0.305121428571429,0.305121428571429},
-{2980194,3904385,3904701,0.2484,1000000},
-{2980195,3905265,3905496,0.3043125,0.3043125},
-{2980196,3902284,3901711,0.2876,0.2876},
-{2980197,3901463,3901711,0.126311111111111,0.126311111111111},
-{2980198,3904447,3905087,0.278254545454545,0.278254545454545},
-{2980199,3904174,3904447,1000000,0.222284210526316},
-{2980200,3906199,3908004,1.001975,0.80158},
-{2980201,3909180,3909609,0.209866666666667,0.209866666666667},
-{2980202,3908272,3909180,0.55779,0.55779},
-{2980203,3909609,3909859,0.135022222222222,0.135022222222222},
-{2980204,3909180,3909353,0.1002,0.1002},
-{2980205,3909353,3909531,0.0806222222222222,0.0806222222222222},
-{2980206,3908518,3909353,0.402733333333333,0.402733333333333},
-{2980207,3909859,3909531,0.208755555555556,0.208755555555556},
-{2980208,3909531,3908743,0.412911111111111,0.412911111111111},
-{2980209,3906774,3907233,0.215807142857143,0.30213},
-{2980210,3907233,3907736,0.204774193548387,0.186705882352941},
-{2980211,3907736,3908296,0.227148387096774,0.185305263157895},
-{2980212,3908296,3908889,0.284424,0.25395},
-{2980213,3907233,3908017,0.4989,0.577673684210526},
-{2980214,3907736,3908599,0.415044444444444,0.415044444444444},
-{2980215,3908296,3909163,0.422711111111111,0.422711111111111},
-{2980216,3905553,3906885,0.678835714285714,1.26716},
-{2980217,3905774,3907082,0.93537,0.93537},
-{2980218,3908017,3909397,1.43065714285714,1.43065714285714},
-{2980219,3908599,3910029,0.588017647058824,0.588017647058824},
-{2980220,3909163,3910831,0.661676470588235,0.661676470588235},
-{2980322,3865183,3864876,0.131426086956522,0.131426086956522},
-{2980323,3865170,3864703,0.1666,0.1666},
-{2980324,3865170,3865183,0.183111111111111,0.183111111111111},
-{2980325,3865132,3865170,0.190755555555556,0.190755555555556},
-{2980326,3864906,3864181,0.390886956521739,0.390886956521739},
-{2980327,3864907,3864584,0.19797,0.19797},
-{2980328,3864907,3864906,0.171369230769231,0.171369230769231},
-{2980329,3864906,3864914,0.15092,0.15092},
-{2980330,3864914,3864664,0.109622222222222,0.109622222222222},
-{2980331,3865132,3864907,0.0987545454545455,0.0987545454545455},
-{2980332,3865607,3865132,0.224657142857143,0.224657142857143},
-{2980333,3865776,3864914,0.595371428571428,0.595371428571428},
-{2980334,3865665,3865183,0.174021428571429,0.174021428571429},
-{2980335,3865690,3865665,0.2014,0.2014},
-{2980336,3865665,3865643,0.1743,0.1743},
-{2980337,3865643,3865607,0.192311111111111,0.192311111111111},
-{2980338,3865643,3865170,0.175844444444444,0.175844444444444},
-{2980339,3865607,3865754,0.121975,0.133063636363636},
-{2980340,3865754,3865776,0.057,0.0619565217391304},
-{2980341,3865776,3865814,0.201685714285714,0.176475},
-{2980346,3865224,3864135,0.478755555555556,0.478755555555556},
-{2980347,3865640,3865893,0.6828375,0.376737931034483},
-{2980348,3866198,3866397,0.340822222222222,0.340822222222222},
-{2980349,3866525,3865690,0.292288888888889,0.292288888888889},
-{2980350,3866471,3865690,0.31145,0.219847058823529},
-{2980351,3866339,3865665,0.222579310344828,0.21516},
-{2980352,3867215,3866339,0.361930434782609,0.308311111111111},
-{2980353,3866275,3865643,0.223688888888889,0.223688888888889},
-{2980354,3866525,3866471,0.0695142857142857,0.0695142857142857},
-{2980355,3866471,3866339,0.129511111111111,0.129511111111111},
-{2980356,3866339,3866275,0.167616,0.2328},
-{2980357,3866545,3866684,0.212977777777778,0.212977777777778},
-{2980358,3866239,3865754,0.174622222222222,0.174622222222222},
-{2980359,3866275,3866239,0.285333333333333,0.285333333333333},
-{2980360,3867571,3866525,0.379,0.379},
-{2980361,3868320,3867753,0.205153846153846,0.205153846153846},
-{2980362,3868853,3868320,0.214575,0.214575},
-{2980363,3867333,3866851,0.173777777777778,0.173777777777778},
-{2980364,3867460,3867333,0.339755555555556,0.339755555555556},
-{2980365,3868391,3867333,0.392377777777778,0.392377777777778},
-{2980366,3868492,3867811,0.238088888888889,0.238088888888889},
-{2980367,3868453,3867568,0.321355555555556,0.321355555555556},
-{2980368,3869284,3869523,0.249133333333333,0.249133333333333},
-{2980369,3868607,3868492,0.265828571428571,0.27912},
-{2980370,3868492,3868453,0.03748,0.0624666666666667},
-{2980371,3868453,3868391,0.136846153846154,0.14825},
-{2980372,3868391,3868374,0.120257142857143,0.114790909090909},
-{2980373,3868374,3868279,0.1802,0.300333333333333},
-{2980374,3868279,3868199,0.209509090909091,0.209509090909091},
-{2980375,3866830,3868279,0.526511111111111,0.526511111111111},
-{2980376,3870511,3870907,0.200885714285714,0.21093},
-{2980377,3869185,3868808,0.457777777777778,0.457777777777778},
-{2980378,3868279,3868807,0.190444444444444,0.190444444444444},
-{2980379,3868684,3869016,0.122955555555556,0.122955555555556},
-{2980380,3869016,3869353,0.123444444444444,0.123444444444444},
-{2980381,3869539,3869933,0.131866666666667,0.131866666666667},
-{2980382,3870907,3870997,0.550984615384615,0.550984615384615},
-{2980383,3869015,3869388,0.178172727272727,0.19599},
-{2980384,3869388,3869728,0.225694736842105,0.2680125},
-{2980385,3869933,3870590,0.220777777777778,0.220777777777778},
-{2980386,3870637,3870590,0.1338375,0.1338375},
-{2980387,3870590,3870496,0.163466666666667,0.163466666666667},
-{2980388,3871037,3870496,0.197955555555556,0.197955555555556},
-{2980389,3869728,3870212,0.174222222222222,0.174222222222222},
-{2980390,3870212,3870390,0.0908666666666667,0.0908666666666667},
-{2980391,3870390,3870299,0.106822222222222,0.106822222222222},
-{2980392,3870907,3871789,0.319666666666667,0.319666666666667},
-{2980393,3870997,3871631,0.210644444444444,0.210644444444444},
-{2980394,3871631,3871789,0.145711111111111,0.145711111111111},
-{2980395,3872079,3871789,0.221733333333333,0.221733333333333},
-{2980396,3871278,3871179,0.172288888888889,0.172288888888889},
-{2980397,3871838,3871278,1000000,1000000},
-{2980398,3867023,3867799,0.301755555555556,0.301755555555556},
-{2980399,3869420,3869621,0.394747826086956,0.56745},
-{2980400,3869621,3869728,0.19548,0.154326315789474},
-{2980401,3870081,3869621,0.279633333333333,0.201336},
-{2980402,3870081,3870212,0.152577777777778,0.152577777777778},
-{2980403,3870793,3870081,0.42129,0.312066666666667},
-{2980404,3871186,3870523,0.287577777777778,0.287577777777778},
-{2980405,3870793,3871186,0.209977777777778,0.209977777777778},
-{2980406,3868320,3868441,0.231555555555556,0.231555555555556},
-{2980407,3871789,3872214,0.147111111111111,0.147111111111111},
-{2980408,3872214,3872604,0.138088888888889,0.138088888888889},
-{2980409,3872604,3872991,0.140288888888889,0.140288888888889},
-{2980410,3872991,3873308,0.130533333333333,0.130533333333333},
-{2980411,3872214,3872412,0.186111111111111,0.186111111111111},
-{2980412,3872412,3872832,0.136688888888889,0.136688888888889},
-{2980413,3872604,3872832,0.187177777777778,0.187177777777778},
-{2980414,3871631,3872831,0.426577777777778,0.426577777777778},
-{2980415,3872831,3872991,0.170955555555556,0.170955555555556},
-{2980416,3872741,3872831,0.19692,0.19692},
-{2980417,3872607,3872741,0.293245161290323,0.363624},
-{2980418,3872741,3873117,0.156688888888889,0.156688888888889},
-{2980419,3879384,3878760,0.299576470588235,0.308654545454545},
-{2980420,3878241,3878041,0.0544833333333333,0.0544833333333333},
-{2980421,3878460,3878241,0.149005714285714,0.149005714285714},
-{2980422,3879782,3880245,0.319844444444444,0.319844444444444},
-{2980423,3880062,3879591,1000000,1000000},
-{2980424,3878460,3879501,1000000,1000000},
-{2980425,3878241,3879275,0.5192,0.5192},
-{2980426,3881570,3880784,0.498288888888889,0.498288888888889},
-{2980427,3881894,3881033,0.698044444444444,0.698044444444444},
-{2980428,3883677,3883209,0.689371428571429,0.689371428571429},
-{2980429,3882443,3881919,0.369977777777778,0.369977777777778},
-{2980430,3881919,3881996,0.0492888888888889,0.0492888888888889},
-{2980431,3884482,3885196,0.395844444444444,0.395844444444444},
-{2980432,3884482,3884210,0.11916,0.1324},
-{2980433,3884210,3885004,0.437044444444444,0.437044444444444},
-{2980434,3883606,3883402,0.17376,0.193066666666667},
-{2980435,3883220,3883048,0.161972727272727,0.169685714285714},
-{2980436,3883402,3883890,0.498888888888889,1000000},
-{2980437,3884798,3885337,0.596,1000000},
-{2980438,3886593,3886649,0.05844,0.0859411764705882},
-{2980439,3887522,3887479,0.173652631578947,0.149972727272727},
-{2980440,3887479,3888023,0.184177777777778,0.184177777777778},
-{2980441,3887136,3887354,0.1635,0.218},
-{2980442,3887354,3887479,0.0869777777777778,0.11742},
-{2980443,3887354,3887779,0.1974,0.1974},
-{2980444,3887779,3887818,0.246622222222222,0.246622222222222},
-{2980445,3887818,3887206,0.37971,0.37971},
-{2980446,3889018,3888912,0.669644444444444,0.669644444444444},
-{2980447,3889650,3889527,1.18041,1.18041},
-{2980448,3886570,3886969,0.455905263157895,0.455905263157895},
-{2980449,3887206,3888218,0.57954,1000000},
-{2980450,3888480,3888218,0.256061538461538,0.20805},
-{2980451,3887206,3886969,0.24339,0.24339},
-{2980452,3886326,3886579,0.30132,0.30132},
-{2980453,3886548,3886321,0.249733333333333,0.249733333333333},
-{2980454,3886579,3886548,0.139976470588235,0.139976470588235},
-{2980455,3886969,3886579,0.23277,0.23277},
-{2980456,3886548,3887550,0.65472,0.65472},
-{2980457,3886969,3887778,0.66927,0.66927},
-{2980458,3888218,3888160,0.0819428571428572,0.0521454545454546},
-{2980459,3888160,3887877,0.2179,0.186771428571429},
-{2980460,3887877,3887778,0.0498666666666667,0.04488},
-{2980461,3887778,3887550,0.155652631578947,0.140828571428571},
-{2980462,3891964,3891952,0.114735483870968,0.114735483870968},
-{2980463,3891952,3891891,0.254930769230769,0.194947058823529},
-{2980464,3891952,3892831,0.396044444444444,0.396044444444444},
-{2980465,3892831,3892807,0.243266666666667,0.243266666666667},
-{2980466,3890225,3890157,0.481635,0.55044},
-{2980467,3891358,3891304,0.294042857142857,0.283903448275862},
-{2980468,3892403,3892344,0.820866666666667,0.547244444444444},
-{2980469,3893007,3892928,0.637022222222222,0.637022222222222},
-{2980470,3890989,3891950,0.532244444444445,0.532244444444445},
-{2980471,3891950,3892344,0.220711111111111,0.220711111111111},
-{2980472,3890157,3890399,0.172666666666667,0.172666666666667},
-{2980473,3890399,3890925,0.54632,0.455266666666667},
-{2980474,3889639,3889922,0.211690909090909,0.211690909090909},
-{2980475,3889922,3890261,0.35136,0.3294},
-{2980476,3890261,3890399,0.186507692307692,0.1515375},
-{2980477,3890399,3890953,0.277755555555556,0.277755555555556},
-{2980478,3890953,3891204,0.234444444444444,0.234444444444444},
-{2980479,3891950,3892027,0.140488888888889,0.140488888888889},
-{2980480,3891782,3892027,0.131244444444444,0.131244444444444},
-{2980481,3892027,3892566,0.254177777777778,0.254177777777778},
-{2980482,3892566,3893198,0.280355555555556,0.280355555555556},
-{2980483,3893513,3893376,0.493589189189189,0.652242857142857},
-{2980484,3893683,3894124,0.260288888888889,0.260288888888889},
-{2980485,3893178,3893449,0.174391304347826,0.174391304347826},
-{2980486,3893449,3893624,0.165633333333333,0.114669230769231},
-{2980487,3893837,3894302,0.2604,0.2604},
-{2980488,3894032,3894354,0.174533333333333,0.174533333333333},
-{2980489,3894354,3894495,0.0892222222222222,0.0892222222222222},
-{2980490,3894354,3894599,0.301088888888889,0.301088888888889},
-{2980491,3894599,3894265,0.174822222222222,0.174822222222222},
-{2980492,3894599,3894869,0.23757,0.23757},
-{2980493,3896711,3897434,0.45333,0.45333},
-{2980494,3900325,3899786,0.269333333333333,0.269333333333333},
-{2980495,3897434,3899134,1.17774,1.17774},
-{2980496,3900807,3900288,0.419885714285714,0.489866666666667},
-{2980497,3897434,3898364,1000000,1000000},
-{2980498,3899134,3898364,1000000,1000000},
-{2980499,3901106,3901459,0.231577777777778,0.231577777777778},
-{2980500,3903444,3902783,0.364711111111111,0.364711111111111},
-{2980501,3903741,3904001,0.148422222222222,0.148422222222222},
-{2980502,3905255,3905878,0.3888,0.3888},
-{2980503,3904786,3905017,0.15912,0.1326},
-{2980504,3904592,3904786,0.153342857142857,0.134175},
-{2980505,3904592,3905109,0.4193,0.4792},
-{2980506,3904786,3905365,0.477327272727273,0.477327272727273},
-{2980507,3905365,3905624,0.24408,0.215364705882353},
-{2980508,3905109,3905365,0.218533333333333,0.24585},
-{2980509,3905109,3905846,0.824084210526316,0.6524},
-{2980510,3905365,3906253,0.559355555555555,0.559355555555555},
-{2980511,3902769,3903084,0.284525,0.206927272727273},
-{2980512,3905624,3906493,0.689045454545455,0.659086956521739},
-{2980513,3905878,3906736,0.562488888888889,0.562488888888889},
-{2980514,3902769,3902620,0.136866666666667,0.136866666666667},
-{2980515,3904701,3904447,0.21456,1000000},
-{2980516,3906091,3906419,0.28137,0.28137},
-{2980517,3906419,3906975,0.287435294117647,0.375876923076923},
-{2980518,3905846,3906253,0.258125,0.258125},
-{2980519,3906253,3906493,0.19155,0.182428571428571},
-{2980520,3906493,3906736,0.17094,0.1554},
-{2980521,3906736,3906975,0.14427,0.125452173913044},
-{2980522,3906419,3906831,0.29106,0.3234},
-{2980523,3906831,3907321,0.231715384615385,0.231715384615385},
-{2980524,3907321,3907808,0.291027272727273,0.32013},
-{2980525,3906831,3907290,0.254866666666667,0.254866666666667},
-{2980526,3907290,3907762,0.272844444444444,0.272844444444444},
-{2980527,3906975,3907293,0.170488888888889,0.1918},
-{2980528,3907293,3907762,0.212764285714286,0.170211428571429},
-{2980529,3907762,3908226,0.152194736842105,0.144585},
-{2980530,3908226,3908767,0.292963636363636,0.280226086956522},
-{2980531,3907321,3907751,0.247844444444444,0.247844444444444},
-{2980532,3907751,3908226,0.267622222222222,0.267622222222222},
-{2980533,3907290,3907751,0.29079,0.29079},
-{2980534,3907751,3908265,0.31866,0.31866},
-{2980535,3908767,3909397,0.477247058823529,0.368781818181818},
-{2980536,3909397,3910029,0.334275,0.334275},
-{2980537,3910029,3910276,0.105115384615385,0.0976071428571429},
-{2980538,3910276,3910831,0.296945454545455,0.296945454545455},
-{2980539,3910831,3911380,0.279,0.268269230769231},
-{2980540,3909397,3910187,0.597536842105263,0.37844},
-{2980541,3910276,3910907,0.338261538461539,0.351792},
-{2980542,3909790,3910333,0.257977777777778,0.257977777777778},
-{2980543,3906493,3906692,0.122222222222222,0.122222222222222},
-{2980544,3910187,3910714,0.256466666666667,0.256466666666667},
-{2980545,3910562,3911033,0.258222222222222,0.258222222222222},
-{2980546,3910831,3911436,0.308755555555556,0.308755555555556},
-{2980547,3911436,3911943,0.296034782608696,0.261876923076923},
-{2980548,3910907,3911436,0.270276923076923,0.260266666666667},
-{2980549,3911436,3912638,0.654096,0.743290909090909},
-{2980550,3912638,3912974,0.150644444444444,0.150644444444444},
-{2980551,3912974,3913190,0.09,0.09},
-{2980552,3909982,3910333,0.160704,0.211452631578947},
-{2980553,3910333,3910714,0.140883870967742,0.189886956521739},
-{2980554,3910714,3911033,0.155256,0.155256},
-{2980555,3911033,3911427,0.194333333333333,0.194333333333333},
-{2980556,3910333,3910666,0.2791125,0.2791125},
-{2980557,3910666,3911315,0.9278,0.9278},
-{2980558,3911033,3911315,0.21345,0.194045454545455},
-{2980629,3864585,3864396,0.155155555555556,0.155155555555556},
-{2980630,3864594,3864231,0.177377777777778,0.177377777777778},
-{2980631,3865062,3864585,0.205133333333333,0.205133333333333},
-{2980632,3864309,3864673,0.161866666666667,0.161866666666667},
-{2980635,3864446,3864673,0.410175,0.410175},
-{2980636,3864673,3864987,0.3094,0.3094},
-{2980637,3864987,3864828,0.1139625,0.0868285714285714},
-{2980638,3864716,3865369,0.580422222222222,0.580422222222222},
-{2980639,3865369,3864987,0.138864,0.11572},
-{2980640,3865676,3865369,0.127303448275862,0.108582352941176},
-{2980641,3865057,3865676,0.573444444444444,0.573444444444444},
-{2980642,3865452,3865748,0.510085714285714,0.510085714285714},
-{2980643,3865748,3866063,0.286288888888889,0.286288888888889},
-{2980646,3864780,3864585,0.148955555555556,0.148955555555556},
-{2980647,3865303,3864780,0.289642105263158,0.289642105263158},
-{2980648,3864432,3863274,1.09338260869565,1.09338260869565},
-{2980652,3865017,3864780,0.257905263157895,0.257905263157895},
-{2980653,3865893,3866477,0.6927,0.6927},
-{2980654,3866477,3866063,0.1593,0.147046153846154},
-{2980655,3866992,3866477,0.247392857142857,0.314863636363636},
-{2980656,3866431,3866992,0.474266666666667,0.474266666666667},
-{2980657,3867898,3868473,0.200444444444444,0.200444444444444},
-{2980658,3868627,3868049,0.217844444444444,0.217844444444444},
-{2980659,3869661,3869266,0.130866666666667,0.130866666666667},
-{2980660,3868580,3868708,0.178914285714286,0.221011764705882},
-{2980661,3868708,3869202,0.174377777777778,0.174377777777778},
-{2980662,3869187,3869841,0.218644444444444,0.218644444444444},
-{2980663,3869429,3868852,0.216266666666667,0.216266666666667},
-{2980664,3869661,3869596,0.16935,0.176713043478261},
-{2980665,3869841,3869661,0.27718064516129,0.343704},
-{2980666,3869969,3869841,0.233822222222222,0.286963636363636},
-{2980667,3867591,3866992,0.27588,0.2299},
-{2980668,3868049,3867591,0.2457,0.258631578947368},
-{2980669,3872699,3869193,2.17257777777778,2.17257777777778},
-{2980670,3878283,3877685,0.493728,0.474738461538462},
-{2980671,3879032,3878283,0.400584,0.357664285714286},
-{2980672,3880076,3879032,0.416016666666667,0.49922},
-{2980673,3877685,3877353,0.37476,0.37476},
-{2980674,3878082,3877896,0.219022222222222,0.219022222222222},
-{2980675,3877620,3877353,0.14406,0.14406},
-{2980676,3877856,3877620,0.0807483870967742,0.0807483870967742},
-{2980677,3878312,3877856,0.182955555555556,0.182955555555556},
-{2980678,3879475,3878312,0.538176923076923,0.736452631578947},
-{2980679,3877620,3877550,0.138466666666667,0.138466666666667},
-{2980680,3877856,3877693,0.152333333333333,0.152333333333333},
-{2980681,3878312,3878192,0.175075,0.175075},
-{2980682,3877693,3877550,0.0662444444444445,0.0662444444444445},
-{2980683,3878192,3877693,0.1854,0.1854},
-{2980684,3881954,3881909,0.0405130434782609,0.0517666666666667},
-{2980685,3881954,3882323,0.60498,0.60498},
-{2980686,3882278,3882323,0.0882923076923077,0.0882923076923077},
-{2980687,3882323,3882949,0.99198,0.99198},
-{2980688,3882949,3883251,0.19089,0.224576470588235},
-{2980689,3882949,3883425,0.777866666666667,0.777866666666667},
-{2980690,3883290,3883425,0.136833333333333,0.136833333333333},
-{2980691,3883425,3883548,0.0789333333333333,0.0789333333333333},
-{2980692,3882310,3882999,0.568066666666667,0.568066666666667},
-{2980693,3882323,3882999,0.561458823529412,1000000},
-{2980694,3883041,3883548,0.305755555555556,1000000},
-{2980695,3883548,3883871,0.2655,1000000},
-{2980696,3883290,3883594,0.167733333333333,0.167733333333333},
-{2980697,3883594,3883857,0.202729411764706,0.181389473684211},
-{2980698,3883594,3883468,0.140357142857143,0.1228125},
-{2980699,3884104,3883871,0.174884210526316,0.174884210526316},
-{2980700,3884104,3883857,0.21012,0.21012},
-{2980701,3884104,3884431,0.29115,0.29115},
-{2980702,3881874,3881690,0.144085714285714,0.1681},
-{2980703,3881690,3881538,0.0741157894736842,0.0741157894736842},
-{2980704,3881538,3881401,0.0797833333333333,0.0755842105263158},
-{2980705,3881401,3881282,0.10595,0.0941777777777778},
-{2980706,3881108,3880571,0.27658125,0.2682},
-{2980707,3881308,3881108,0.122606896551724,0.142224},
-{2980708,3881467,3881108,0.192933333333333,0.192933333333333},
-{2980709,3881643,3881467,0.1452,0.122861538461538},
-{2980710,3881643,3881802,0.09225,0.0952258064516129},
-{2980711,3881802,3881921,0.09163125,0.0888545454545454},
-{2980712,3881921,3882078,0.156657142857143,0.143034782608696},
-{2980713,3881401,3881643,1000000,1000000},
-{2980714,3881538,3881802,1000000,1000000},
-{2980715,3881690,3881921,1000000,1000000},
-{2980716,3882278,3881755,0.562325,0.562325},
-{2980717,3880751,3881051,0.152,0.152},
-{2980718,3882691,3882391,0.21963,0.244033333333333},
-{2980719,3882391,3882177,0.1474,0.1474},
-{2980720,3881708,3881946,0.111555555555556,0.111555555555556},
-{2980721,3882037,3882331,0.183311111111111,0.183311111111111},
-{2980722,3882177,3882331,0.0992666666666667,0.0992666666666667},
-{2980723,3882331,3883298,0.5278,0.5278},
-{2980724,3882391,3883663,0.65288275862069,0.65288275862069},
-{2980725,3883857,3884167,0.340569230769231,0.260435294117647},
-{2980726,3880605,3880751,1000000,0.225288},
-{2980727,3880916,3880605,1000000,0.44652},
-{2980728,3881174,3881346,1000000,0.139066666666667},
-{2980729,3882269,3881406,0.466666666666667,0.466666666666667},
-{2980730,3882504,3881675,0.471444444444444,0.471444444444444},
-{2980731,3884547,3883871,0.402955555555556,0.402955555555556},
-{2980732,3885210,3884547,0.348733333333333,1000000},
-{2980733,3884412,3884104,0.222975,0.254828571428571},
-{2980734,3884693,3884412,0.293166666666667,0.293166666666667},
-{2980735,3884693,3884547,0.1468,0.1468},
-{2980736,3884779,3884693,0.05805,0.0546352941176471},
-{2980737,3885044,3884779,0.161930769230769,0.161930769230769},
-{2980738,3885210,3885044,0.09274,0.09274},
-{2980739,3885337,3885210,0.0863368421052632,0.0863368421052632},
-{2980740,3884412,3884767,0.181577777777778,0.181577777777778},
-{2980741,3884779,3885082,0.249494117647059,0.249494117647059},
-{2980742,3885044,3885348,0.149822222222222,0.149822222222222},
-{2980743,3885337,3885619,0.26484,0.209084210526316},
-{2980744,3885791,3886110,0.154555555555556,0.154555555555556},
-{2980745,3885348,3885628,0.180365217391304,0.180365217391304},
-{2980746,3885915,3885619,0.153933333333333,0.153933333333333},
-{2980747,3885861,3885628,0.18078,0.18078},
-{2980748,3885915,3885861,0.0335555555555556,0.0335555555555556},
-{2980749,3886110,3885915,0.106733333333333,0.106733333333333},
-{2980750,3885628,3886328,0.334634482758621,0.334634482758621},
-{2980751,3886110,3886729,0.357488888888889,0.357488888888889},
-{2980752,3885861,3886531,0.353555555555556,0.353555555555556},
-{2980753,3884847,3885808,0.505577777777778,0.505577777777778},
-{2980754,3887550,3887263,0.196333333333333,0.160636363636364},
-{2980755,3887263,3886973,0.246075,0.218733333333333},
-{2980756,3887877,3888888,0.62598,0.62598},
-{2980757,3887550,3888607,0.65766,0.65766},
-{2980758,3888567,3888970,0.40203,0.40203},
-{2980759,3886973,3886729,0.252141176470588,0.28576},
-{2980760,3886729,3886531,0.1997,0.211447058823529},
-{2980761,3886531,3886328,0.215533333333333,0.19398},
-{2980762,3886328,3886104,0.2144,0.227011764705882},
-{2980763,3886104,3885808,0.247164705882353,0.221147368421053},
-{2980764,3885808,3885573,0.221766666666667,0.17355652173913},
-{2980765,3885573,3885312,0.237866666666667,0.18615652173913},
-{2980766,3886729,3887761,0.555992307692308,0.555992307692308},
-{2980767,3886531,3887488,0.534444444444444,0.534444444444444},
-{2980768,3886328,3887262,0.542066666666667,0.542066666666667},
-{2980769,3887263,3888367,0.68838,0.68838},
-{2980770,3888970,3888674,0.15336,0.15336},
-{2980771,3888160,3889128,0.6219,0.6219},
-{2980772,3885808,3886804,0.535333333333333,0.535333333333333},
-{2980773,3884576,3885573,0.505311111111111,0.505311111111111},
-{2980774,3885573,3886547,0.519288888888889,0.519288888888889},
-{2980775,3884324,3885312,0.570675,0.570675},
-{2980776,3885312,3885024,0.307,0.2878125},
-{2980777,3889065,3889208,0.141094736842105,0.141094736842105},
-{2980778,3889208,3889332,0.4098,0.4098},
-{2980779,3889332,3888970,0.196848,0.189276923076923},
-{2980780,3888970,3889301,0.357777777777778,0.357777777777778},
-{2980781,3889332,3889785,0.314918181818182,0.2566},
-{2980782,3889785,3889746,0.278172413793103,0.2689},
-{2980783,3888870,3887729,0.507555555555556,0.507555555555556},
-{2980784,3889207,3888008,0.539244444444444,0.539244444444444},
-{2980785,3887729,3888008,0.160622222222222,0.160622222222222},
-{2980786,3888008,3888273,0.149488888888889,0.149488888888889},
-{2980787,3890047,3889785,0.108329032258065,0.10494375},
-{2980788,3885312,3885908,0.301511111111111,0.301511111111111},
-{2980789,3887729,3887262,0.263422222222222,0.263422222222222},
-{2980790,3887729,3887505,0.102066666666667,0.102066666666667},
-{2980791,3884675,3884447,0.198628571428571,0.245364705882353},
-{2980792,3889208,3890329,0.621266666666667,0.621266666666667},
-{2980793,3890329,3890047,0.134866666666667,0.13005},
-{2980794,3889378,3889922,0.246222222222222,0.3324},
-{2980795,3889922,3890423,0.45124,0.45124},
-{2980796,3890261,3890423,0.34086,0.34086},
-{2980797,3890423,3890926,0.450852631578947,0.450852631578947},
-{2980798,3890906,3890926,0.0318631578947368,0.0356117647058823},
-{2980799,3890926,3891539,0.448,0.4032},
-{2980800,3890953,3891405,0.299622222222222,0.299622222222222},
-{2980801,3891405,3891638,0.372044444444444,0.372044444444444},
-{2980802,3891405,3891539,0.149742857142857,0.149742857142857},
-{2980803,3891539,3891803,0.239329411764706,0.226033333333333},
-{2980804,3891803,3892178,0.411933333333333,0.411933333333333},
-{2980805,3891392,3891984,0.463389473684211,0.463389473684211},
-{2980806,3891803,3891984,0.2085,0.2085},
-{2980807,3891984,3892505,0.33207,0.33207},
-{2980808,3891627,3892509,0.58281,0.58281},
-{2980809,3892352,3892566,0.348711111111111,0.348711111111111},
-{2980810,3892505,3892667,0.2532,0.2532},
-{2980811,3892509,3892505,0.18579,0.18579},
-{2980812,3892373,3892509,0.23379,0.23379},
-{2980813,3892103,3892347,0.189,0.2016},
-{2980814,3890675,3890618,0.113955555555556,0.123072},
-{2980815,3890618,3890329,0.2186,0.2049375},
-{2980816,3890618,3891264,0.6429,0.6429},
-{2980817,3891627,3891264,0.32613,0.32613},
-{2980818,3890047,3890378,1000000,0.307133333333333},
-{2980819,3890378,3889902,0.601753846153846,0.601753846153846},
-{2980820,3890499,3890378,0.0650888888888889,0.0650888888888889},
-{2980821,3890329,3890602,0.18976,0.271085714285714},
-{2980822,3890499,3890602,0.1417,0.1417},
-{2980823,3891264,3890602,0.360888888888889,0.360888888888889},
-{2980824,3891264,3891908,0.49728,0.49728},
-{2980825,3892667,3892747,0.235694117647059,0.235694117647059},
-{2980826,3892373,3892747,0.22806,0.22806},
-{2980827,3892390,3892373,0.1552,0.1552},
-{2980828,3892347,3892390,0.1434,0.0882461538461538},
-{2980829,3892390,3893062,0.4749375,0.4749375},
-{2980830,3892684,3892667,0.622305882352941,0.622305882352941},
-{2980831,3892747,3893062,0.336814285714286,0.336814285714286},
-{2980832,3892347,3893047,0.359444444444444,0.359444444444444},
-{2980833,3893062,3893333,0.234141176470588,0.209494736842105},
-{2980834,3892340,3891908,0.359936842105263,0.325657142857143},
-{2980835,3890499,3891399,0.49731724137931,0.49731724137931},
-{2980836,3891399,3891505,0.0856153846153846,0.101181818181818},
-{2980837,3891908,3891505,0.292009090909091,0.4015125},
-{2980838,3891958,3891505,0.29361,0.29361},
-{2980839,3892111,3891958,0.16988,0.21235},
-{2980840,3891908,3892052,0.194964705882353,0.194964705882353},
-{2980841,3892052,3892111,0.0876,0.08322},
-{2980842,3892111,3892187,0.051936,0.0590181818181818},
-{2980843,3892532,3892052,0.304425,0.4566375},
-{2980844,3892712,3892187,0.243222222222222,0.243222222222222},
-{2980845,3893062,3893047,0.38769,0.38769},
-{2980846,3893047,3893166,0.203177777777778,0.203177777777778},
-{2980847,3893333,3893662,0.74484,0.74484},
-{2980848,3889356,3889955,0.64941,0.683589473684211},
-{2980849,3893334,3894063,0.4344,0.4344},
-{2980850,3894063,3894293,0.1234,0.1234},
-{2980851,3894293,3894601,0.152266666666667,0.152266666666667},
-{2980852,3894601,3894712,0.235357894736842,0.235357894736842},
-{2980853,3894063,3894214,0.35175,0.35175},
-{2980854,3894293,3894921,0.6165,0.6165},
-{2980855,3894601,3894921,0.410866666666667,0.410866666666667},
-{2980856,3894921,3895046,0.303266666666667,0.303266666666667},
-{2980857,3893604,3894327,1.17912,1.17912},
-{2980858,3893333,3893927,0.491514285714286,0.34406},
-{2980859,3893927,3894003,0.0826235294117647,0.0520222222222222},
-{2980860,3894003,3893867,0.285023076923077,0.308775},
-{2980861,3894003,3894122,0.18148,0.18148},
-{2980862,3894300,3894331,0.0300444444444444,0.0300444444444444},
-{2980863,3894331,3894570,0.131111111111111,0.131111111111111},
-{2980864,3894570,3895094,0.415955555555556,0.415955555555556},
-{2980865,3894003,3894367,0.220090909090909,0.1614},
-{2980866,3894327,3894367,0.0558,0.0558},
-{2980867,3894367,3894461,0.0372666666666667,0.0432774193548387},
-{2980868,3894461,3895069,0.241145454545455,0.24868125},
-{2980869,3894461,3895242,0.92841,0.92841},
-{2980870,3895444,3895698,0.29019,0.29019},
-{2980871,3892712,3893369,0.334153846153846,0.413714285714286},
-{2980872,3893369,3893933,0.41127,0.41127},
-{2980873,3893369,3893537,0.192763636363636,0.2232},
-{2980874,3893537,3893710,0.25152,0.25152},
-{2980875,3893537,3893933,0.303190909090909,0.370566666666667},
-{2980876,3893933,3894234,0.43041,0.43041},
-{2980877,3893710,3894234,0.37464,0.37464},
-{2980878,3894754,3895094,0.224945454545455,0.215165217391304},
-{2980879,3895094,3895242,0.117652173913043,0.159176470588235},
-{2980880,3895242,3895490,0.170342857142857,0.170342857142857},
-{2980881,3902550,3902769,0.184636363636364,0.131032258064516},
-{2980882,3902335,3902550,0.124577777777778,0.124577777777778},
-{2980883,3902335,3902172,0.0888888888888889,0.0888888888888889},
-{2980884,3902172,3902592,0.28236,0.28236},
-{2980885,3903339,3904068,0.316377777777778,0.316377777777778},
-{2980886,3901961,3902035,0.0426444444444445,0.0426444444444445},
-{2980887,3901827,3901961,0.0679333333333333,0.0679333333333333},
-{2980888,3901718,3901827,0.0965714285714286,0.0965714285714286},
-{2980889,3901827,3902085,0.264286956521739,0.264286956521739},
-{2980890,3902085,3902132,0.08728125,0.08728125},
-{2980891,3902132,3902185,0.0824666666666667,0.0824666666666667},
-{2980892,3902085,3902642,0.211733333333333,0.211733333333333},
-{2980893,3902132,3902943,0.308755555555556,0.308755555555556},
-{2980894,3902185,3903112,0.362688888888889,0.362688888888889},
-{2980895,3902550,3902314,0.153044444444444,0.153044444444444},
-{2980896,3902335,3902028,0.169266666666667,0.169266666666667},
-{2980897,3901827,3901428,0.238622222222222,0.238622222222222},
-{2980898,3901718,3901851,0.178,0.178},
-{2980899,3901144,3901718,0.317169230769231,0.317169230769231},
-{2980900,3901088,3901144,0.232844444444444,0.232844444444444},
-{2980901,3901961,3902118,0.0870666666666667,0.0870666666666667},
-{2980902,3901144,3901222,1000000,0.281110344827586},
-{2980903,3902185,3902217,0.115755555555556,0.1953375},
-{2980904,3901222,3902217,0.555252631578947,0.555252631578947},
-{2980905,3902217,3903192,0.387088888888889,0.387088888888889},
-{2980906,3902217,3902254,0.120975,0.223338461538462},
-{2980907,3902254,3902290,0.128225,0.146542857142857},
-{2980908,3901334,3902290,0.471409090909091,0.471409090909091},
-{2980909,3902254,3903237,0.387888888888889,0.387888888888889},
-{2980910,3902290,3903274,0.3862,0.3862},
-{2980911,3903192,3903237,0.215861538461538,0.215861538461538},
-{2980912,3903237,3903274,0.107133333333333,0.107133333333333},
-{2980913,3903516,3904135,0.251466666666667,0.251466666666667},
-{2980914,3903687,3904181,0.191755555555556,0.191755555555556},
-{2980915,3904135,3905325,0.69786,0.69786},
-{2980916,3904181,3905336,0.504911111111111,1000000},
-{2980917,3904257,3905041,1000000,0.503633333333333},
-{2980918,3905325,3905471,0.16023,0.16023},
-{2980919,3904297,3904776,0.29088,0.252939130434783},
-{2980920,3904348,3904972,0.272630769230769,0.272630769230769},
-{2980921,3904972,3905172,0.18438,0.127158620689655},
-{2980922,3904776,3904972,0.143975,0.111464516129032},
-{2980923,3904776,3905041,0.18723,0.197084210526316},
-{2980924,3905041,3905336,0.175938461538462,0.22872},
-{2980925,3905336,3905471,0.109275,0.102847058823529},
-{2980926,3911650,3911909,0.21345,0.224684210526316},
-{2980927,3911909,3912211,0.161330769230769,0.161330769230769},
-{2980928,3912211,3912539,0.1368,0.1368},
-{2980929,3912539,3912896,0.122172972972973,0.122172972972973},
-{2980930,3911355,3911909,0.30715,0.567046153846154},
-{2980931,3912211,3912771,0.229422222222222,0.229422222222222},
-{2980932,3912539,3913158,0.242666666666667,0.242666666666667},
-{2980933,3912896,3913478,0.306490909090909,1000000},
-{2980934,3911799,3912138,0.21453,0.252388235294118},
-{2980935,3912138,3912896,0.338136,0.469633333333333},
-{2981027,3875889,3874945,0.612327272727273,0.612327272727273},
-{2981028,3877550,3877469,0.163244444444444,0.163244444444444},
-{2981029,3877556,3877469,0.0391111111111111,0.0391111111111111},
-{2981030,3877693,3877556,0.160777777777778,0.160777777777778},
-{2981031,3877469,3877463,0.175888888888889,0.175888888888889},
-{2981032,3877556,3877463,0.153377777777778,0.153377777777778},
-{2981033,3878036,3877556,0.185622222222222,0.185622222222222},
-{2981034,3877889,3877463,0.165822222222222,0.165822222222222},
-{2981035,3879321,3878192,0.501733333333333,0.501733333333333},
-{2981036,3879198,3878036,0.504688888888889,0.504688888888889},
-{2981037,3879052,3877889,0.505733333333333,0.505733333333333},
-{2981038,3878192,3878036,0.159911111111111,0.159911111111111},
-{2981039,3878036,3877889,0.13194375,0.13194375},
-{2981040,3877463,3877778,0.233133333333333,0.233133333333333},
-{2981041,3877889,3877778,0.127083870967742,0.127083870967742},
-{2981042,3878921,3877778,0.494511111111111,0.494511111111111},
-{2981043,3877778,3877671,0.149420689655172,0.149420689655172},
-{2981044,3877671,3877519,0.162066666666667,0.162066666666667},
-{2981045,3877519,3877246,0.227844444444444,0.227844444444444},
-{2981046,3878805,3877671,1.8702,1.8702},
-{2981047,3878462,3877519,0.401584615384615,0.336812903225806},
-{2981048,3878683,3878462,0.118142857142857,0.12405},
-{2981049,3878462,3878354,0.125,0.125},
-{2981050,3878354,3878215,0.176044444444444,0.176044444444444},
-{2981051,3878215,3878221,0.4772,0.4772},
-{2981052,3878221,3878354,0.0658,0.0658},
-{2981053,3877246,3877032,0.232111111111111,0.232111111111111},
-{2981054,3877032,3878197,0.458933333333333,0.458933333333333},
-{2981055,3878215,3878197,0.237822222222222,0.237822222222222},
-{2981056,3880605,3880159,0.601536,1000000},
-{2981057,3878821,3879179,0.19587,0.178063636363636},
-{2981058,3879179,3879866,0.267411428571429,0.275276470588235},
-{2981059,3879856,3879861,0.35496,0.35496},
-{2981060,3879856,3879630,0.243977777777778,0.243977777777778},
-{2981061,3880168,3879856,0.164721428571429,0.170822222222222},
-{2981062,3879630,3879965,0.190377777777778,0.190377777777778},
-{2981063,3879965,3880168,0.223288888888889,0.223288888888889},
-{2981064,3881537,3881138,0.52215,1000000},
-{2981065,3880718,3881464,0.627085714285714,0.598581818181818},
-{2981066,3881343,3880929,0.208133333333333,0.208133333333333},
-{2981067,3882277,3881944,0.58296,1000000},
-{2981068,3881511,3881944,1000000,0.279463636363636},
-{2981069,3880301,3880168,0.075875,0.0700384615384615},
-{2981070,3880417,3880476,0.0834,0.0834},
-{2981071,3880417,3880701,0.144377777777778,0.144377777777778},
-{2981072,3880476,3880578,0.170022222222222,0.170022222222222},
-{2981073,3882474,3883306,0.428133333333333,0.428133333333333},
-{2981074,3883555,3882194,0.680644444444444,0.680644444444444},
-{2981075,3883663,3884134,0.2418,0.2325},
-{2981076,3884134,3884447,0.196036363636364,0.1797},
-{2981077,3884134,3883306,0.527928,0.43994},
-{2981078,3884447,3883555,0.740052631578947,0.740052631578947},
-{2981079,3884108,3884663,0.352911111111111,0.352911111111111},
-{2981080,3880706,3880396,0.393066666666667,0.393066666666667},
-{2981081,3884949,3885827,1000000,0.447311111111111},
-{2981082,3885827,3886433,0.316955555555556,0.316955555555556},
-{2981083,3884819,3885655,1000000,0.435488888888889},
-{2981084,3886260,3885655,0.308311111111111,0.308311111111111},
-{2981085,3885655,3884886,1.01787,1000000},
-{2981086,3886260,3886284,0.19488,0.19488},
-{2981087,3886284,3885815,0.288725,0.288725},
-{2981088,3887025,3886284,0.445977777777778,0.445977777777778},
-{2981089,3887025,3887161,0.082776,0.082776},
-{2981090,3887367,3887161,0.1731,0.1731},
-{2981091,3887446,3887367,0.0632727272727273,0.0632727272727273},
-{2981092,3888172,3887367,0.371022222222222,0.371022222222222},
-{2981093,3887161,3888012,0.379777777777778,0.379777777777778},
-{2981094,3888172,3888012,0.166457142857143,0.15536},
-{2981095,3886804,3887070,0.245033333333333,0.245033333333333},
-{2981096,3887070,3887381,0.244733333333333,0.244733333333333},
-{2981097,3887662,3887381,0.146888888888889,0.146888888888889},
-{2981098,3887381,3887320,0.0905571428571429,0.0905571428571429},
-{2981099,3887070,3886631,0.41049,0.41049},
-{2981100,3886308,3886631,0.26556,0.26556},
-{2981101,3886631,3886912,0.22194,0.22194},
-{2981102,3886912,3886634,0.267757894736842,0.25437},
-{2981103,3887320,3886912,0.412552941176471,0.412552941176471},
-{2981104,3885827,3885655,0.164333333333333,0.164333333333333},
-{2981105,3885959,3885827,0.084825,0.084825},
-{2981106,3886912,3887324,0.225644444444444,0.225644444444444},
-{2981107,3887320,3887696,0.235577777777778,0.235577777777778},
-{2981108,3887324,3887696,0.27303,0.27303},
-{2981109,3887324,3887501,0.0916,0.0916},
-{2981110,3887696,3887843,0.1284,0.1284},
-{2981111,3887501,3888090,0.345844444444444,0.345844444444444},
-{2981112,3888144,3888688,0.425192307692308,0.614166666666667},
-{2981113,3887849,3888090,0.184870588235294,0.196425},
-{2981114,3888090,3888519,0.255177777777778,0.255177777777778},
-{2981115,3889074,3888493,0.29445,1000000},
-{2981116,3889605,3889074,0.301609090909091,1000000},
-{2981117,3889074,3889771,0.510096,0.510096},
-{2981118,3888688,3889130,1000000,0.161222222222222},
-{2981119,3888688,3888911,0.400581818181818,0.400581818181818},
-{2981120,3888911,3889425,0.44958,0.44958},
-{2981121,3889113,3889425,0.226957894736842,0.21561},
-{2981122,3888252,3888172,0.0828,0.100542857142857},
-{2981123,3888172,3888863,0.3374,0.3374},
-{2981124,3890083,3889771,0.3896625,0.3896625},
-{2981125,3889771,3890151,0.299975,0.299975},
-{2981126,3890151,3889969,0.123469565217391,0.123469565217391},
-{2981127,3890525,3890151,0.292933333333333,0.277515789473684},
-{2981128,3890758,3890215,0.3894,0.3894},
-{2981129,3889969,3890215,0.163157142857143,0.163157142857143},
-{2981130,3890215,3890426,0.151848,0.12654},
-{2981131,3890450,3890191,0.120992307692308,0.131075},
-{2981132,3890426,3890450,0.0750818181818182,0.0750818181818182},
-{2981133,3890942,3890426,0.304125,0.317347826086957},
-{2981134,3891194,3890450,0.358536,0.320121428571429},
-{2981135,3889425,3889850,0.236208,0.236208},
-{2981136,3888012,3888081,0.0774,0.0663428571428571},
-{2981137,3888081,3886872,1000000,1.78789090909091},
-{2981138,3888081,3889174,1.29556363636364,1000000},
-{2981139,3889955,3889658,0.2421,0.2421},
-{2981140,3890168,3889955,0.104888888888889,0.104888888888889},
-{2981141,3890490,3890168,0.27192,0.27192},
-{2981142,3889955,3890323,0.326975,0.326975},
-{2981143,3890168,3890511,0.275377777777778,0.275377777777778},
-{2981144,3890511,3890323,0.154058823529412,0.154058823529412},
-{2981145,3890735,3890511,0.19275,0.19275},
-{2981146,3890323,3890535,0.214057142857143,0.214057142857143},
-{2981147,3890944,3890535,0.213422222222222,0.213422222222222},
-{2981148,3890535,3890846,0.247155555555556,0.247155555555556},
-{2981149,3890846,3890525,0.152284615384615,0.152284615384615},
-{2981150,3890745,3890703,0.16698,0.16698},
-{2981151,3890703,3890735,0.189688888888889,0.189688888888889},
-{2981152,3890735,3890944,0.165288888888889,0.165288888888889},
-{2981153,3890703,3891243,0.36795,0.36795},
-{2981154,3890944,3891474,0.42336,0.42336},
-{2981155,3891135,3890846,0.114617647058824,0.114617647058824},
-{2981156,3891474,3891135,0.167664,0.161215384615385},
-{2981157,3891474,3891558,0.0793411764705882,0.0642285714285714},
-{2981158,3890846,3891293,0.4662,0.4662},
-{2981159,3891293,3890998,0.299538461538462,0.299538461538462},
-{2981160,3891565,3891293,0.1392,0.1392},
-{2981161,3891135,3891565,0.44496,0.44496},
-{2981162,3891505,3891525,0.83181,0.83181},
-{2981163,3891958,3892234,0.5122,0.5122},
-{2981164,3892187,3892835,0.586661538461538,0.586661538461538},
-{2981165,3891965,3891584,0.3155625,0.3155625},
-{2981166,3892234,3891965,0.237141176470588,0.237141176470588},
-{2981167,3892123,3891632,0.34725,0.34725},
-{2981168,3892835,3892234,0.34395,0.34395},
-{2981169,3891965,3892123,0.16008,0.16008},
-{2981170,3892257,3892123,0.09057,0.09057},
-{2981171,3892445,3892257,0.12102,0.12102},
-{2981172,3892234,3892445,0.1324,0.1324},
-{2981173,3892445,3892801,0.1932,0.1932},
-{2981174,3892835,3893095,0.234763636363636,0.234763636363636},
-{2981175,3892123,3892252,0.259577777777778,0.259577777777778},
-{2981176,3892252,3891888,0.25137,0.25137},
-{2981177,3893095,3892801,0.150577777777778,0.150577777777778},
-{2981178,3892252,3892418,0.122755555555556,0.122755555555556},
-{2981179,3891399,3891085,1000000,1000000},
-{2981180,3892257,3892582,0.69906,0.69906},
-{2981181,3892418,3891945,0.33414,0.33414},
-{2981182,3891293,3891779,0.3916,0.3916},
-{2981183,3892418,3892582,0.110422222222222,0.110422222222222},
-{2981184,3892582,3892822,0.133533333333333,0.133533333333333},
-{2981185,3892801,3893108,0.356533333333333,0.356533333333333},
-{2981186,3893095,3893187,0.49929,0.49929},
-{2981187,3893108,3893187,0.09366,0.09366},
-{2981188,3893187,3893373,0.127714285714286,0.127714285714286},
-{2981189,3893435,3893095,0.239345454545455,0.239345454545455},
-{2981190,3893710,3893772,0.13122,0.13122},
-{2981191,3894085,3894234,0.299463157894737,0.299463157894737},
-{2981192,3894234,3894970,0.53982,0.53982},
-{2981193,3893435,3894145,0.381774193548387,0.408103448275862},
-{2981194,3895094,3895454,0.45435,0.45435},
-{2981195,3895454,3895572,0.14526,0.14526},
-{2981196,3895454,3895786,0.31584,0.31584},
-{2981197,3895572,3895888,0.291821052631579,0.291821052631579},
-{2981198,3893399,3893679,0.2079,0.2079},
-{2981199,3893679,3893935,0.19494,0.19494},
-{2981200,3893935,3894174,0.16815,0.16815},
-{2981201,3893679,3893653,0.28707,0.28707},
-{2981202,3893373,3893653,0.155676923076923,0.16865},
-{2981203,3894174,3894145,0.162571428571429,0.155181818181818},
-{2981204,3894145,3894379,0.156533333333333,0.156533333333333},
-{2981205,3894727,3895203,0.49419,0.49419},
-{2981206,3895203,3895261,0.10122,0.10122},
-{2981207,3893368,3893755,0.266057142857143,0.266057142857143},
-{2981208,3893935,3893909,1000000,0.215133333333333},
-{2981209,3894174,3894659,0.386918181818182,0.370095652173913},
-{2981210,3893909,3894481,0.244072727272727,0.244072727272727},
-{2981211,3894481,3894659,0.158936842105263,0.131295652173913},
-{2981212,3894659,3894925,0.223688888888889,0.20132},
-{2981213,3895203,3895501,0.295911111111111,0.295911111111111},
-{2981214,3893653,3893743,0.0471103448275862,0.03795},
-{2981215,3893743,3893909,0.0755117647058823,0.0626195121951219},
-{2981216,3893743,3893755,0.192644444444444,0.192644444444444},
-{2981217,3893755,3894000,0.20889,0.20889},
-{2981218,3898563,3898919,0.21816,0.21816},
-{2981219,3897994,3897839,0.08292,0.08292},
-{2981220,3899716,3900153,0.224008695652174,0.224008695652174},
-{2981221,3900291,3899746,0.293444444444444,0.293444444444444},
-{2981222,3900153,3900291,0.0809181818181818,0.0659333333333333},
-{2981223,3900605,3901283,0.323625,0.298730769230769},
-{2981224,3900605,3900629,0.647533333333333,0.647533333333333},
-{2981225,3900629,3900647,0.134777777777778,0.134777777777778},
-{2981226,3900629,3900932,1000000,1000000},
-{2981227,3899396,3899716,0.146666666666667,0.146666666666667},
-{2981228,3899396,3899636,0.199444444444444,0.199444444444444},
-{2981229,3899716,3899999,0.278288888888889,0.278288888888889},
-{2981230,3900153,3900198,0.3146,0.3146},
-{2981231,3900932,3900979,0.0612,0.0612},
-{2981232,3900979,3900978,0.0859411764705882,0.0503793103448276},
-{2981233,3900979,3901516,0.355588235294118,0.318157894736842},
-{2981234,3900613,3900605,0.212022222222222,0.212022222222222},
-{2981235,3900855,3900932,0.316155555555556,0.316155555555556},
-{2981236,3900245,3898563,3.02883157894737,2.61580909090909},
-{2981237,3902290,3902323,0.113072727272727,0.113072727272727},
-{2981238,3902323,3902357,0.138208695652174,0.151371428571429},
-{2981239,3902357,3902378,0.106875,0.0855},
-{2981240,3903274,3903302,0.136772727272727,0.136772727272727},
-{2981241,3903302,3903345,0.0977793103448276,0.0977793103448276},
-{2981242,3903345,3903390,0.311541176470588,0.311541176470588},
-{2981243,3902323,3903302,0.384844444444444,0.384844444444444},
-{2981244,3902357,3903345,0.387955555555556,0.387955555555556},
-{2981245,3903345,3903815,0.211266666666667,0.211266666666667},
-{2981246,3902515,3902809,0.70505,0.70505},
-{2981247,3902804,3903062,0.554333333333333,0.554333333333333},
-{2981248,3903047,3903293,0.486977777777778,0.486977777777778},
-{2981249,3903989,3904253,0.193581818181818,1000000},
-{2981250,3903588,3904231,0.2626,0.2626},
-{2981251,3902809,3903386,0.792445161290323,0.792445161290323},
-{2981252,3903202,3903984,0.714,0.714},
-{2981253,3904253,3905012,0.429137142857143,1000000},
-{2981254,3905471,3906538,1.10127,1.10127},
-{2981255,3901334,3901368,1000000,0.174},
-{2981256,3901368,3901657,1000000,1.26353333333333},
-{2981257,3901657,3902098,1000000,0.79888},
-{2981258,3905653,3905811,0.44952,0.44952},
-{2981259,3909494,3911280,0.521909090909091,0.521909090909091},
-{2981304,3863556,3863888,0.404,0.440727272727273},
-{2981305,3863888,3866912,1.33095555555556,1.33095555555556},
-{2981307,3874945,3874356,0.394236363636364,0.394236363636364},
-{2981308,3877032,3876213,0.589355555555556,0.589355555555556},
-{2981309,3878197,3878004,0.443311111111111,0.443311111111111},
-{2981310,3886465,3885404,0.463644444444444,0.463644444444444},
-{2981311,3884205,3885404,0.755066666666667,0.755066666666667},
-{2981312,3891140,3891542,0.528933333333333,0.528933333333333},
-{2981313,3891779,3892133,0.66849,0.66849},
-{2981314,3891966,3891342,0.301555555555556,1000000},
-{2981315,3892133,3892481,0.48366,0.48366},
-{2981316,3891917,3891637,0.141688888888889,0.141688888888889},
-{2981317,3892196,3891917,0.185113043478261,0.185113043478261},
-{2981318,3892481,3892196,0.20619,0.242576470588235},
-{2981319,3892414,3892848,0.396022222222222,0.396022222222222},
-{2981320,3892481,3892688,0.10925,0.145666666666667},
-{2981321,3892848,3892688,0.0886333333333333,0.0886333333333333},
-{2981322,3893075,3892848,0.158652631578947,0.131060869565217},
-{2981323,3892462,3892962,0.329044444444444,0.329044444444444},
-{2981324,3892651,3892962,0.398177777777778,0.398177777777778},
-{2981325,3892962,3892657,0.221223529411765,0.18804},
-{2981326,3892962,3893243,0.269895652173913,0.31038},
-{2981327,3893639,3893243,0.409554545454545,0.360408},
-{2981328,3893243,3893344,0.0610615384615385,0.06615},
-{2981329,3893344,3893685,0.41889,0.41889},
-{2981330,3893685,3893303,0.275514285714286,0.275514285714286},
-{2981331,3892481,3893186,0.618444444444444,0.618444444444444},
-{2981332,3891917,3892546,0.607466666666667,0.607466666666667},
-{2981333,3893781,3894000,0.29193,0.29193},
-{2981334,3894000,3894450,0.3822,0.3822},
-{2981335,3894096,3893344,0.375496551724138,0.388907142857143},
-{2981336,3894095,3894456,0.468272727272727,0.468272727272727},
-{2981337,3894481,3894747,0.46056,0.46056},
-{2981338,3894450,3894456,0.40416,0.40416},
-{2981339,3894450,3894747,0.19839,0.19839},
-{2981340,3894747,3895043,0.19512,0.19512},
-{2981341,3895043,3895247,0.14928,0.14928},
-{2981342,3894925,3895247,0.21624375,0.197708571428571},
-{2981343,3895501,3895927,0.317777777777778,0.317777777777778},
-{2981344,3895968,3895927,0.46062,0.46062},
-{2981345,3895927,3896268,0.2102,0.2102},
-{2981346,3894747,3895354,0.66948,0.66948},
-{2981347,3895043,3895448,0.56058,0.56058},
-{2981348,3895247,3895466,0.12262,0.102183333333333},
-{2981349,3895466,3895989,0.336022222222222,0.312848275862069},
-{2981350,3894456,3895056,0.48525,0.48525},
-{2981351,3895056,3895354,0.2643,0.2643},
-{2981352,3895354,3895448,0.08418,0.08418},
-{2981353,3895448,3895628,0.14781,0.14781},
-{2981354,3893685,3893913,0.21984,0.21984},
-{2981355,3893913,3894237,0.4536,0.4536},
-{2981356,3894188,3894885,0.53742,0.53742},
-{2981357,3894885,3895322,0.32691,0.32691},
-{2981358,3895056,3895322,0.209333333333333,0.209333333333333},
-{2981359,3895354,3896106,0.75375,0.75375},
-{2981360,3895628,3896163,0.60129,0.60129},
-{2981361,3895628,3895776,0.12519,0.12519},
-{2981362,3895776,3895989,0.17709,0.17709},
-{2981363,3895466,3895776,0.4209,0.4209},
-{2981364,3895989,3896321,0.268248,0.22354},
-{2981365,3895989,3896268,0.327214285714286,0.327214285714286},
-{2981366,3896268,3896321,0.44253,0.44253},
-{2981367,3896321,3896537,0.204046153846154,0.196488888888889},
-{2981368,3896268,3896733,0.31341,0.31341},
-{2981369,3896850,3897225,1000000,1000000},
-{2981370,3896645,3897124,0.4203,0.4203},
-{2981371,3895322,3895898,0.61935,0.61935},
-{2981372,3897124,3896870,0.23523,0.23523},
-{2981373,3893523,3893695,0.185577777777778,0.185577777777778},
-{2981374,3894017,3893695,0.230478260869565,0.240954545454545},
-{2981375,3894316,3895116,0.59325,0.59325},
-{2981376,3897374,3897415,0.20305,0.20305},
-{2981377,3897415,3897583,0.548815384615385,0.548815384615385},
-{2981378,3897583,3897631,0.10656,0.10656},
-{2981379,3897077,3897631,0.32667,0.32667},
-{2981380,3897583,3897718,0.07944,0.07944},
-{2981381,3897718,3898091,0.34765,0.34765},
-{2981382,3900647,3900828,1000000,1000000},
-{2981383,3900978,3901329,1.09582857142857,0.885092307692308},
-{2981384,3900828,3901329,1000000,1000000},
-{2981385,3902098,3902932,0.36295,0.335030769230769},
-{2981386,3900828,3901081,1000000,1000000},
-{2981387,3901329,3901724,0.983634782608696,0.904944},
-{2981388,3900038,3899793,0.31272,0.2606},
-{2981389,3900477,3900038,0.219763636363636,0.20145},
-{2981390,3901081,3901393,1000000,1000000},
-{2981391,3901393,3901769,0.230033333333333,0.230033333333333},
-{2981392,3902098,3902589,1000000,1.25373333333333},
-{2981393,3902589,3902660,1000000,0.64632},
-{2981394,3903411,3903749,1000000,0.2668},
-{2981395,3903693,3903749,0.103036363636364,0.09445},
-{2981396,3905012,3904844,0.133694117647059,1000000},
-{2981397,3903984,3904816,0.589755555555555,0.589755555555555},
-{2981398,3904816,3905107,0.200044444444444,0.200044444444444},
-{2981399,3904850,3905283,0.225933333333333,0.225933333333333},
-{2981400,3903386,3903468,0.153521739130435,0.1605},
-{2981401,3903468,3903992,0.61058,0.61058},
-{2981402,3903468,3904660,0.755844444444444,0.755844444444444},
-{2981403,3904816,3905240,0.229,0.229},
-{2981404,3905529,3905690,0.0594,0.066825},
-{2981405,3906089,3905690,0.184584,0.177484615384615},
-{2981406,3905066,3905599,1000000,0.271888888888889},
-{2981407,3905240,3905694,0.211777777777778,1000000},
-{2981408,3905599,3905694,0.183311111111111,0.183311111111111},
-{2981409,3905694,3905529,0.323955555555556,0.323955555555556},
-{2981410,3906089,3905830,0.284688888888889,0.284688888888889},
-{2981411,3906643,3910530,2.94318,2.94318},
-{2981412,3905811,3908638,2.3625,2.3625},
-{2981413,3905690,3906498,0.730266666666667,0.730266666666667},
-{2981414,3906840,3906089,0.728333333333333,0.728333333333333},
-{2981415,3904660,3905616,0.6422,0.6422},
-{2981416,3907998,3906595,0.891133333333333,0.891133333333333},
-{2981483,3892546,3892927,0.304488888888889,0.304488888888889},
-{2981484,3892927,3893259,0.348444444444444,0.348444444444444},
-{2981485,3893259,3893674,0.436933333333333,0.436933333333333},
-{2981486,3892927,3892588,0.19383,0.19383},
-{2981487,3893209,3892927,0.2088,0.2088},
-{2981488,3893340,3893104,0.206,0.206},
-{2981489,3893695,3893340,0.223707692307692,0.24235},
-{2981490,3893209,3893861,0.448095652173913,0.448095652173913},
-{2981491,3893259,3893025,0.137844444444444,0.137844444444444},
-{2981492,3893520,3893259,0.156577777777778,0.156577777777778},
-{2981493,3893735,3893520,0.17382,0.158018181818182},
-{2981494,3893340,3893963,0.499711111111111,0.499711111111111},
-{2981495,3893861,3893963,0.0519230769230769,0.0519230769230769},
-{2981496,3893963,3893735,0.142523076923077,0.132342857142857},
-{2981497,3893695,3894274,0.49068,0.49068},
-{2981498,3894215,3893963,0.129942857142857,0.117367741935484},
-{2981499,3894493,3894215,0.146592,0.140953846153846},
-{2981500,3894719,3894493,0.156518181818182,0.143475},
-{2981501,3894905,3894719,0.197236363636364,0.160711111111111},
-{2981502,3893735,3894139,0.433533333333333,0.433533333333333},
-{2981503,3893963,3894377,0.430933333333333,0.430933333333333},
-{2981504,3894215,3894627,0.4036,0.4036},
-{2981505,3894719,3895113,0.50877,0.50877},
-{2981506,3893674,3893949,0.311111111111111,0.311111111111111},
-{2981507,3894139,3894447,0.308355555555556,0.308355555555556},
-{2981508,3894377,3894695,0.311866666666667,0.311866666666667},
-{2981509,3894627,3894910,0.3138,0.3138},
-{2981510,3895113,3895388,0.41346,0.41346},
-{2981511,3893949,3893703,0.20385,0.20385},
-{2981512,3894207,3893949,0.27656,0.27656},
-{2981513,3894447,3894207,0.155836363636364,0.201670588235294},
-{2981514,3894695,3894447,0.143376,0.170685714285714},
-{2981515,3894910,3894695,0.1276,0.1276},
-{2981516,3895160,3894910,0.1505,0.1505},
-{2981517,3895388,3895160,0.18255,0.18255},
-{2981518,3894910,3895258,0.363044444444444,0.363044444444444},
-{2981519,3895388,3895769,0.38715,0.38715},
-{2981520,3895570,3895258,0.235628571428571,0.190315384615385},
-{2981521,3895769,3895570,0.297423529411765,0.297423529411765},
-{2981522,3894928,3895176,0.169666666666667,0.147774193548387},
-{2981523,3895116,3894928,1000000,1000000},
-{2981524,3895344,3895176,0.0937384615384615,0.0786193548387097},
-{2981525,3895176,3895438,0.36846,0.36846},
-{2981526,3895116,3895344,0.228641379310345,0.245577777777778},
-{2981527,3895803,3895116,0.5604,0.5604},
-{2981528,3896108,3895344,0.470191304347826,0.33795},
-{2981529,3895898,3896227,0.61287,0.61287},
-{2981530,3895898,3896518,0.53694,0.53694},
-{2981531,3895252,3895599,0.42477,0.42477},
-{2981532,3895599,3895388,0.18975,0.18975},
-{2981533,3895599,3895967,0.27558,0.27558},
-{2981534,3895562,3895967,0.59715,0.59715},
-{2981535,3896032,3895769,0.2406,0.253263157894737},
-{2981536,3895967,3896032,0.0453777777777778,0.0453777777777778},
-{2981537,3896032,3896649,0.64449,0.64449},
-{2981538,3896033,3896486,0.47331,0.47331},
-{2981539,3896554,3896032,0.331914285714286,0.387233333333333},
-{2981540,3896518,3897130,0.43875,0.43875},
-{2981541,3896518,3897289,0.69333,0.69333},
-{2981542,3896801,3897047,0.26688,0.26688},
-{2981543,3896553,3897047,0.31314,0.31314},
-{2981544,3896553,3897151,0.62907,0.62907},
-{2981545,3897047,3897151,0.52299,0.52299},
-{2981546,3897151,3897230,0.10062,0.10062},
-{2981547,3897230,3897556,0.20772,0.20772},
-{2981548,3896108,3896257,0.176353846153846,0.176353846153846},
-{2981549,3896187,3896257,0.0412666666666667,0.0412666666666667},
-{2981550,3896257,3896553,0.35755,0.35755},
-{2981551,3897718,3898592,0.87396,0.87396},
-{2981552,3897631,3898147,0.71814,0.71814},
-{2981553,3897586,3898147,0.34149,0.34149},
-{2981554,3898147,3898592,0.24114,0.24114},
-{2981555,3898147,3898326,0.13506,0.13506},
-{2981556,3898326,3899077,0.46353,0.46353},
-{2981557,3897551,3898062,0.62679,0.62679},
-{2981558,3897556,3898062,0.27903,0.27903},
-{2981559,3897941,3898326,0.29907,0.29907},
-{2981560,3897941,3898924,0.59553,0.59553},
-{2981561,3898924,3899077,0.221444444444444,0.221444444444444},
-{2981562,3898924,3899493,0.36951,0.36951},
-{2981563,3898941,3898924,0.33438,0.33438},
-{2981564,3897230,3897733,0.490658823529412,0.490658823529412},
-{2981565,3897526,3897733,0.270830769230769,0.251485714285714},
-{2981566,3897733,3897818,0.0909428571428571,0.0909428571428571},
-{2981567,3897818,3898040,0.248528571428571,0.248528571428571},
-{2981568,3897556,3897876,0.26925,0.26925},
-{2981569,3897876,3898040,0.1429875,0.1429875},
-{2981570,3897876,3898175,0.20841,0.20841},
-{2981571,3898062,3898175,0.10194,0.10194},
-{2981572,3898175,3898505,1000000,1000000},
-{2981573,3898175,3898735,0.42354,0.42354},
-{2981574,3898735,3898941,0.25014,0.25014},
-{2981575,3898040,3898537,0.35949,0.35949},
-{2981576,3898537,3898735,0.21624,0.21624},
-{2981577,3901243,3901273,0.262044444444444,0.262044444444444},
-{2981578,3901393,3901637,0.654192857142857,0.654192857142857},
-{2981579,3901243,3901637,0.15376,0.159062068965517},
-{2981580,3901637,3902101,0.167109677419355,0.185014285714286},
-{2981581,3903749,3904323,0.494296551724138,0.494296551724138},
-{2981582,3904260,3904702,0.259303448275862,0.259303448275862},
-{2981583,3904702,3905060,0.253090909090909,0.22272},
-{2981584,3904260,3904636,0.24363,0.24363},
-{2981585,3904702,3905078,0.26757,0.26757},
-{2981586,3902958,3903510,1000000,0.5565},
-{2981587,3904145,3904463,0.234438461538462,0.243816},
-{2981588,3905060,3905275,0.188504347826087,0.18065},
-{2981589,3905275,3905422,0.110688,0.106430769230769},
-{2981590,3905422,3905709,0.184511111111111,0.191607692307692},
-{2981591,3905275,3905709,0.675377777777778,0.675377777777778},
-{2981592,3905709,3906082,0.209088888888889,0.209088888888889},
-{2981593,3902101,3902114,1000000,1000000},
-{2981594,3908239,3909558,0.868866666666667,0.868866666666667},
-{2981595,3905422,3906476,0.450711111111111,0.450711111111111},
-{2981596,3906302,3906476,0.2186,0.2186},
-{2981597,3906355,3907149,0.531133333333333,0.531133333333333},
-{2981598,3908239,3908832,0.208866666666667,0.208866666666667},
-{2981629,3869593,3869874,0.108977777777778,0.108977777777778},
-{2981630,3869874,3870381,0.233111111111111,0.233111111111111},
-{2981631,3870881,3870381,0.37748,0.37748},
-{2981632,3893949,3894504,0.567044444444444,0.567044444444444},
-{2981633,3894504,3894228,0.186028571428571,0.162775},
-{2981634,3894504,3894914,0.60414,0.60414},
-{2981635,3894447,3894821,0.368155555555556,0.368155555555556},
-{2981636,3894821,3894578,0.161263636363636,0.1314},
-{2981637,3894695,3895053,0.360844444444444,0.360844444444444},
-{2981638,3895053,3894821,0.142368,0.104682352941176},
-{2981639,3895258,3895053,0.124533333333333,0.105075},
-{2981640,3894821,3895157,0.4743,0.4743},
-{2981641,3895157,3895455,0.43959,0.43959},
-{2981642,3895157,3894785,0.209328,0.209328},
-{2981643,3894785,3894504,0.177125,0.17004},
-{2981644,3895053,3895271,0.250066666666667,0.250066666666667},
-{2981645,3895504,3895157,0.195577777777778,0.195577777777778},
-{2981646,3895271,3895504,0.34584,0.34584},
-{2981647,3895455,3895234,0.211425,0.241628571428571},
-{2981648,3895656,3895455,0.262542857142857,0.229725},
-{2981649,3895504,3895656,0.23955,0.23955},
-{2981650,3895258,3895491,0.33033,0.33033},
-{2981651,3895491,3895271,0.16941,0.16941},
-{2981652,3895859,3895491,0.29643,0.29643},
-{2981653,3895769,3896475,0.63267,0.63267},
-{2981654,3896649,3896475,0.14532,0.14532},
-{2981655,3896570,3895859,0.43617,0.43617},
-{2981656,3895491,3895680,0.29517,0.29517},
-{2981657,3895680,3895907,0.29637,0.29637},
-{2981658,3895907,3895656,0.270323076923077,0.2196375},
-{2981659,3896118,3895680,0.31218,0.31218},
-{2981660,3896399,3895907,0.46396,0.46396},
-{2981661,3895907,3896189,0.28539,0.28539},
-{2981662,3896654,3896189,0.31974,0.31974},
-{2981663,3896635,3896654,0.063,0.063},
-{2981664,3896189,3896512,0.26622,0.26622},
-{2981665,3896475,3896570,0.12564,0.12564},
-{2981666,3895656,3895853,0.26313,0.26313},
-{2981667,3895853,3895437,0.34077,0.34077},
-{2981668,3896859,3896834,0.437766666666667,0.437766666666667},
-{2981669,3896649,3896834,0.19116,0.19116},
-{2981670,3897021,3896570,0.28359,0.28359},
-{2981671,3896570,3896998,0.4761,0.4761},
-{2981672,3896998,3896399,0.36354,0.36354},
-{2981673,3895853,3896448,0.56025,0.56025},
-{2981674,3896512,3896448,0.33627,0.33627},
-{2981675,3896512,3896913,0.28848,0.28848},
-{2981676,3896913,3897016,0.06816,0.06816},
-{2981677,3896913,3896812,0.33939,0.33939},
-{2981678,3897818,3898378,0.40215,0.40215},
-{2981679,3898378,3899220,0.6447,0.6447},
-{2981680,3898537,3899346,0.647684210526316,0.647684210526316},
-{2981681,3898735,3899433,0.52602,0.52602},
-{2981682,3896834,3897021,0.1199,0.1199},
-{2981683,3897021,3897838,0.55899,0.55899},
-{2981684,3897838,3896998,0.50334,0.50334},
-{2981685,3896998,3897826,0.67884,0.67884},
-{2981686,3898378,3898537,0.18315,0.18315},
-{2981687,3898208,3898378,0.17886,0.17886},
-{2981688,3898499,3898132,0.451447058823529,0.403926315789474},
-{2981689,3898132,3897826,0.5102,0.680266666666667},
-{2981690,3897826,3897707,0.20308,0.160326315789474},
-{2981691,3897838,3898132,0.442885714285714,0.442885714285714},
-{2981692,3898132,3898433,0.385363636363636,0.385363636363636},
-{2981693,3898433,3898726,0.2799,0.29856},
-{2981694,3898770,3898433,0.38202,0.38202},
-{2981695,3898433,3898044,0.579257142857143,0.579257142857143},
-{2981696,3897296,3897358,0.1122,0.136242857142857},
-{2981697,3897358,3897450,0.0441333333333333,0.0441333333333333},
-{2981698,3897358,3897838,0.687726315789474,0.725933333333333},
-{2981699,3897400,3897132,0.34323,0.34323},
-{2981700,3897016,3897132,0.07233,0.07233},
-{2981701,3897132,3897582,0.29694,0.29694},
-{2981702,3897582,3897768,0.1161,0.1161},
-{2981703,3897768,3898159,0.22038,0.22038},
-{2981704,3897582,3897830,0.44085,0.44085},
-{2981705,3898044,3897768,0.29589,0.29589},
-{2981706,3900646,3900997,0.210688888888889,0.210688888888889},
-{2981707,3900330,3900646,0.641666666666667,0.641666666666667},
-{2981708,3900330,3900566,0.15834,0.15834},
-{2981709,3900633,3900566,0.101288888888889,0.101288888888889},
-{2981710,3900997,3900633,0.455955555555556,0.455955555555556},
-{2981711,3900633,3901434,0.3594,0.3594},
-{2981712,3900566,3901008,0.193542857142857,0.193542857142857},
-{2981713,3901008,3901341,0.154944,0.1614},
-{2981714,3901246,3901008,0.212,0.212},
-{2981715,3901246,3901341,0.0804444444444445,0.0804444444444445},
-{2981716,3901341,3901434,0.123285714285714,0.107875},
-{2981717,3901434,3901526,0.1117,0.141094736842105},
-{2981718,3901651,3900997,0.285288888888889,0.285288888888889},
-{2981719,3901651,3901238,0.482133333333333,0.482133333333333},
-{2981720,3901238,3901526,0.131711111111111,0.131711111111111},
-{2981721,3901526,3901656,0.0641739130434783,0.082},
-{2981722,3901651,3902114,1000000,1000000},
-{2981723,3902114,3902069,0.133933333333333,0.133933333333333},
-{2981724,3902069,3901656,0.346135714285714,0.372761538461538},
-{2981725,3901656,3902358,0.3884,0.313707692307692},
-{2981726,3902069,3902723,0.362427272727273,0.318936},
-{2981727,3902449,3902701,0.119022222222222,0.119022222222222},
-{2981728,3902701,3903393,0.355177777777778,0.355177777777778},
-{2981729,3903393,3903154,0.116066666666667,0.116066666666667},
-{2981730,3903393,3903709,0.2486,0.2486},
-{2981731,3902319,3902766,0.478133333333333,0.478133333333333},
-{2981732,3901873,3902766,0.355311111111111,0.355311111111111},
-{2981733,3902701,3903199,0.569,0.569},
-{2981734,3903601,3903784,0.215052631578947,0.215052631578947},
-{2981735,3904222,3903784,0.211,0.211},
-{2981736,3904127,3904295,0.1497,0.1497},
-{2981737,3904295,3904468,0.0821555555555556,0.0821555555555556},
-{2981738,3904127,3904429,0.406711111111111,0.406711111111111},
-{2981739,3904429,3904484,0.227509090909091,0.227509090909091},
-{2981740,3904295,3904794,0.451088888888889,0.451088888888889},
-{2981741,3904429,3904794,0.158155555555556,0.158155555555556},
-{2981742,3904794,3904923,0.172772727272727,0.172772727272727},
-{2981743,3904923,3905104,0.168024,0.168024},
-{2981744,3905104,3905267,0.110452173913043,0.149435294117647},
-{2981745,3905267,3904587,0.541175,0.43294},
-{2981746,3904899,3905557,0.322846153846154,0.322846153846154},
-{2981747,3905557,3905727,0.157155555555556,0.157155555555556},
-{2981748,3905267,3906461,0.569333333333333,0.569333333333333},
-{2981749,3905557,3906461,0.408311111111111,0.408311111111111},
-{2981750,3905727,3906597,0.402488888888889,0.402488888888889},
-{2981751,3906461,3906714,0.122155555555556,0.122155555555556},
-{2981752,3905727,3905992,0.2532,0.2532},
-{2981753,3905468,3905557,0.0803555555555556,0.0803555555555556},
-{2981780,3902766,3902965,0.153755555555556,0.153755555555556},
-{2981781,3903199,3903403,0.144155555555556,0.144155555555556},
-{2981782,3902778,3902922,0.14958947368421,0.1579},
-{2981783,3904222,3904684,0.364266666666667,0.364266666666667},
-{2981784,3903784,3904296,0.371288888888889,0.371288888888889},
-{2981785,3903403,3903863,0.3858,0.3858},
-{2981786,3902922,3903437,0.6484125,0.6484125},
-{2981787,3902356,3903029,0.584781818181818,0.584781818181818},
-{2981788,3901863,3902690,0.570096,1000000},
-{2981789,3901347,3902296,0.66095,0.66095},
-{2981790,3900961,3901905,0.662765217391304,0.662765217391304},
-{2981791,3900666,3901395,0.474311111111111,0.5568},
-{2981792,3903784,3903403,0.220032,0.220032},
-{2981793,3903403,3902922,0.28407,0.28407},
-{2981794,3902922,3902356,0.328957894736842,0.328957894736842},
-{2981795,3904296,3903863,0.197533333333333,0.197533333333333},
-{2981796,3903863,3903496,0.196022222222222,0.196022222222222},
-{2981797,3903437,3903496,0.0612,0.0612},
-{2981798,3903437,3903029,0.330063157894737,0.330063157894737},
-{2981799,3903029,3902690,0.248747368421053,0.248747368421053},
-{2981800,3902690,3902296,0.179777777777778,0.179777777777778},
-{2981801,3902296,3901905,0.1614,0.1614},
-{2981803,3901704,3902778,0.445977777777778,0.445977777777778},
-{2981804,3901527,3902450,0.386311111111111,0.386311111111111},
-{2981805,3901367,3902119,0.328066666666667,0.328066666666667},
-{2981806,3904296,3905190,0.673777777777778,0.673777777777778},
-{2981807,3903496,3904635,0.885866666666667,0.885866666666667},
-{2983258,3876371,3877167,1000000,0.507282352941176},
-{2983261,3904469,3904773,0.191448,0.208095652173913},
-{2983262,3905222,3905526,0.2319,0.220857142857143},
-{2983263,3900963,3901469,0.397333333333333,0.510857142857143},
-{2983264,3901469,3901553,0.08744,0.119236363636364},
-{2983265,3901487,3901803,0.273847058823529,0.211609090909091},
-{2983266,3901803,3901884,0.0715411764705882,0.0715411764705882},
-{2983268,3903381,3903131,0.252,0.252},
-{2983269,3903381,3902983,0.210733333333333,0.210733333333333},
-{2986618,3880172,3880391,1000000,1000000},
-{2986638,3853853,3854046,0.0896888888888889,0.0896888888888889},
-{2986642,3912280,3912370,0.0938823529411765,0.0886666666666667},
-{2986649,3864194,3863681,0.249622222222222,0.249622222222222},
-{2986650,3865063,3864450,0.253088888888889,0.253088888888889},
-{2986651,3865636,3865063,0.258860869565217,0.3721125},
-{2986652,3867608,3867604,0.5064,0.384864},
-{2986653,3866449,3866140,0.3652875,0.3438},
-{2986654,3868939,3868098,0.529517647058823,1000000},
-{2986655,3866646,3866373,0.147939130434783,0.130869230769231},
-{2986656,3866766,3866859,0.4028,0.4028},
-{2986657,3854486,3854218,0.1172,0.1172},
-{2986658,3854487,3854857,0.405444444444444,0.405444444444444},
-{2986659,3880307,3880603,1000000,1000000},
-{2986660,3878103,3878233,0.0989555555555555,0.0989555555555555},
-{2986661,3877254,3877293,0.146044444444444,0.146044444444444},
-{2986662,3876852,3877136,1000000,0.102492857142857},
-{2986663,3877326,3877956,1000000,0.267339130434783},
-{2986664,3876284,3876433,0.286866666666667,0.286866666666667},
-{2986665,3876575,3876840,1000000,1000000},
-{2986674,3861655,3861562,0.265371428571429,0.161530434782609},
-{2986676,3893836,3894594,0.401555555555556,0.401555555555556},
-{2986680,3914640,3914833,0.135392307692308,0.113554838709677},
-{2986681,3914388,3914640,0.108811764705882,0.108811764705882},
-{2986682,3914128,3914388,0.17679,0.17679},
-{2986683,3913830,3914128,0.20292,0.20292},
-{2986687,3858664,3858781,0.0803307692307692,0.10443},
-{2986688,3859176,3858781,0.144814285714286,0.150177777777778},
-{2986689,3859766,3859176,0.267214285714286,0.29928},
-{2986690,3861683,3860070,0.843066666666667,0.843066666666667},
-{2986691,3861193,3861384,0.106711111111111,0.106711111111111},
-{2986692,3858888,3858903,0.0397454545454545,0.0397454545454545},
-{2986693,3858903,3859091,0.149618181818182,0.149618181818182},
-{2986694,3859940,3860696,0.330466666666667,0.330466666666667},
-{2986695,3861900,3861601,0.129036363636364,0.129036363636364},
-{2986701,3859084,3858733,0.187377777777778,0.187377777777778},
-{2986703,3860815,3860611,0.118933333333333,0.118933333333333},
-{2986704,3861043,3860954,0.0730888888888889,0.0730888888888889},
-{2986705,3857593,3857751,0.172111111111111,0.172111111111111},
-{2986719,3903497,3903288,0.1924,0.1924},
-{2986720,3903926,3903497,0.504857142857143,0.8835},
-{2986721,3903288,3903134,0.0935333333333333,0.0935333333333333},
-{2986722,3906420,3906298,0.0726666666666667,0.0726666666666667},
-{2986723,3896441,3896723,0.2006,0.3009},
-{2986724,3905206,3905423,0.194475,0.245652631578947},
-{2986725,3905446,3905516,0.0769125,0.0769125},
-{2986726,3876195,3875833,0.1596,0.1596},
-{2986729,3891647,3891565,0.0522,0.0522},
-{2986730,3891140,3890795,0.100688372093023,0.103085714285714},
-{2986732,3891477,3891140,0.1197,0.147323076923077},
-{2986787,3874577,3875580,0.5642,0.348476470588235},
-{2986788,3875475,3876252,1000000,1000000},
-{2986789,3875599,3876381,0.328733333333333,0.328733333333333},
-{2986790,3875679,3876500,0.345311111111111,0.345311111111111},
-{2986791,3876500,3876381,1000000,1000000},
-{2986792,3876381,3876252,1000000,1000000},
-{2986793,3876738,3878297,0.578133333333333,0.578133333333333},
-{2986794,3885302,3885520,0.0355391304347826,1000000},
-{2986795,3885290,3885551,1000000,0.0416205882352941},
-{2986796,3891172,3892538,0.649888888888889,0.649888888888889},
-{2986797,3892497,3892538,0.25345,0.5069},
-{2986798,3892538,3893863,0.701568,0.6496},
-{2986799,3892696,3893762,0.516555555555556,0.516555555555556},
-{2986800,3895346,3895760,0.615104347826087,1000000},
-{2986801,3895201,3895346,0.0583076923076923,1000000},
-{2986860,3853401,3853086,0.4154,0.29078},
-{2986861,3855389,3854867,0.276342857142857,0.266813793103448},
-{2986862,3856172,3855389,0.387777777777778,0.455217391304348},
-{2986865,3907374,3907602,0.101825,0.12219},
-{2986866,3907602,3907935,0.121152,0.131686956521739},
-{2986867,3907602,3907558,0.24535,0.24535},
-{2986886,3853086,3853644,0.250422222222222,0.250422222222222},
-{2986887,3886659,3886791,0.0665785714285714,1000000},
-{2986888,3895709,3896323,1000000,1000000},
-{2986896,3869611,3868809,0.295177777777778,0.295177777777778},
-{2986911,3875890,3875935,0.0688736842105263,0.0688736842105263},
-{2986912,3876311,3876072,0.261860869565217,0.261860869565217},
-{2986913,3876072,3875851,0.107955555555556,0.107955555555556},
-{2986914,3882502,3882562,0.115486956521739,0.115486956521739},
-{2986915,3883341,3883435,1000000,0.222733333333333},
-{2986916,3883435,3883458,1000000,0.1248},
-{2986917,3883435,3883630,1000000,1000000},
-{2986918,3887107,3886909,0.0956222222222222,0.0956222222222222},
-{2986919,3898651,3899654,0.418644444444444,0.418644444444444},
-{2986923,3856054,3856182,0.0472222222222222,0.0472222222222222},
-{2986924,3856695,3856054,0.252888888888889,0.252888888888889},
-{2986925,3859717,3859221,0.265755555555556,0.265755555555556},
-{2986926,3862073,3862154,1000000,1000000},
-{2986927,3866419,3866096,0.0994888888888889,0.0994888888888889},
-{2986928,3865417,3865011,0.133,0.133},
-{2986929,3873600,3873415,0.137888888888889,0.137888888888889},
-{2986930,3872144,3871563,0.347377777777778,0.347377777777778},
-{2986931,3874858,3874804,0.184066666666667,0.184066666666667},
-{2986932,3873823,3873412,0.2862,0.2862},
-{2986933,3896149,3896272,0.268511111111111,0.268511111111111},
-{2986934,3898347,3898632,1000000,1000000},
-{2986935,3898305,3898632,0.0951428571428571,0.108},
-{2986936,3898632,3901386,0.651155555555556,0.639316363636364},
-{2986937,3901386,3901828,0.105129411764706,0.101162264150943},
-{2986938,3897727,3897969,0.208971428571429,0.0886545454545454},
-{2986939,3897559,3897851,1000000,0.1182},
-{2986940,3898213,3898099,1000000,1000000},
-{2986941,3898305,3898213,0.0575555555555556,0.0575555555555556},
-{2986942,3898213,3898347,1000000,1000000},
-{2986943,3898347,3898170,1000000,1000000},
-{2986944,3898170,3898099,1000000,1000000},
-{2986945,3898170,3897601,1000000,1000000},
-{2986956,3849376,3849125,0.250644444444444,0.250644444444444},
-{2986957,3855814,3855306,0.243333333333333,0.243333333333333},
-{2986958,3858972,3859540,0.256577777777778,0.256577777777778},
-{2986959,3858122,3858043,0.0733333333333333,0.0733333333333333},
-{2986960,3867474,3866847,0.383294117647059,0.250615384615385},
-{2986961,3875571,3875443,0.342644444444444,0.342644444444444},
-{2986962,3877822,3877102,0.265577777777778,0.265577777777778},
-{2986963,3880356,3880277,1000000,1000000},
-{2986964,3896470,3896390,1000000,0.128},
-{2986965,3901612,3901386,0.291085714285714,0.218314285714286},
-{2986966,3901612,3901828,0.155266666666667,0.155266666666667},
-{2986967,3901122,3901612,0.27295,0.350935714285714},
-{2986968,3869814,3869573,1000000,0.1550625},
-{2986969,3869573,3869766,0.09985,1000000},
-{2986970,3866882,3866210,0.273339130434783,0.273339130434783},
-{2986971,3866210,3864928,0.472177777777778,0.472177777777778},
-{2986972,3866882,3866231,0.130557446808511,0.1278375},
-{2986973,3866210,3866231,0.266914285714286,1000000},
-{2986974,3872207,3872117,0.113022222222222,0.113022222222222},
-{2986975,3872061,3871978,0.119444444444444,0.119444444444444},
-{2986976,3872779,3872413,0.133288888888889,0.133288888888889},
-{2986977,3872267,3871978,0.158222222222222,0.158222222222222},
-{2986978,3878421,3878107,1000000,0.0968714285714286},
-{2986979,3878492,3878421,1000000,0.0556153846153846},
-{2986980,3878882,3878562,0.280305882352941,1000000},
-{2986981,3890539,3890879,0.598757142857143,0.441189473684211},
-{2986984,3857715,3858171,1000000,1000000},
-{2986985,3860579,3859530,0.255665454545455,1000000},
-{2986986,3859530,3858996,0.124458823529412,1000000},
-{2986987,3859530,3859782,0.1796,0.1796},
-{2986988,3880405,3880539,0.183155555555556,0.183155555555556},
-{2986989,3862617,3863073,0.275377777777778,0.275377777777778},
-{2986990,3862135,3862314,0.0888,0.0888},
-{2986991,3868867,3869623,0.3752,0.3752},
-{2986992,3873225,3872961,0.301,0.301},
-{2986993,3871697,3871564,0.206511111111111,0.206511111111111},
-{2986994,3877811,3878067,1000000,0.260657142857143},
-{2986995,3887723,3887949,0.129111111111111,0.129111111111111},
-{2986996,3897675,3897208,0.275133333333333,0.275133333333333},
-{2987005,3851124,3850876,0.325452631578947,0.363741176470588},
-{2987006,3851093,3850588,0.215755555555556,0.215755555555556},
-{2987007,3850588,3850804,0.489882352941177,0.5552},
-{2987008,3856998,3857131,0.143822222222222,0.143822222222222},
-{2987009,3854053,3854400,0.199333333333333,0.199333333333333},
-{2987010,3859276,3858569,0.389755555555556,0.389755555555556},
-{2987011,3859509,3859249,0.189133333333333,0.189133333333333},
-{2987012,3861790,3861699,0.0766222222222222,0.0766222222222222},
-{2987013,3860688,3860398,0.2752,0.2752},
-{2987014,3865716,3865566,0.0659111111111111,0.0659111111111111},
-{2987015,3874890,3874819,0.240761538461538,0.240761538461538},
-{2987016,3890590,3890896,0.275336842105263,0.26157},
-{2987017,3894326,3894011,0.29345,0.29345},
-{2987029,3851048,3850637,0.593822222222222,1000000},
-{2987030,3853608,3853417,0.256422222222222,0.256422222222222},
-{2987031,3860204,3860265,0.083,0.083},
-{2987032,3861618,3861343,0.251688888888889,0.251688888888889},
-{2987033,3864645,3863664,0.4742,0.4742},
-{2987034,3870208,3869701,1000000,1000000},
-{2987035,3870205,3869903,1000000,1000000},
-{2987036,3871015,3871041,1000000,0.13064},
-{2987037,3871015,3871209,1000000,0.1235625},
-{2987038,3870995,3871237,1000000,1000000},
-{2987039,3869958,3869667,0.144333333333333,0.144333333333333},
-{2987040,3872889,3872703,0.04284,0.04284},
-{2987041,3872476,3872315,1000000,1000000},
-{2987042,3890964,3890491,0.195964285714286,0.195964285714286},
-{2987043,3897414,3897520,1000000,0.0924666666666667},
-{2987057,3850240,3851575,0.8236,0.8236},
-{2987058,3870771,3870895,0.0646888888888889,0.0646888888888889},
-{2987059,3868398,3868162,0.0980444444444444,0.0980444444444444},
-{2987060,3873819,3873946,0.0858888888888889,0.0858888888888889},
-{2987061,3874297,3874253,1000000,0.05865},
-{2987062,3897827,3897927,0.315844444444444,0.315844444444444},
-{2987063,3898345,3898463,0.309088888888889,0.309088888888889},
-{2987064,3855743,3855572,0.0707777777777778,0.0707777777777778},
-{2987065,3855950,3855928,1000000,0.214823076923077},
-{2987066,3855928,3855645,0.114155555555556,0.114155555555556},
-{2987067,3856343,3855946,0.207355555555556,0.207355555555556},
-{2987068,3855303,3855160,0.0660444444444444,0.0660444444444444},
-{2987069,3856169,3856013,0.105136363636364,0.11565},
-{2987070,3856613,3856169,0.180696,0.173746153846154},
-{2987071,3856169,3855802,0.228155555555556,0.228155555555556},
-{2987072,3860530,3860488,0.103911111111111,0.103911111111111},
-{2987073,3860706,3860352,0.163777777777778,0.163777777777778},
-{2987074,3862712,3862554,0.121044444444444,0.121044444444444},
-{2987075,3863082,3862835,0.210422222222222,0.210422222222222},
-{2987076,3869008,3868828,0.114555555555556,0.114555555555556},
-{2987077,3869672,3869123,0.310355555555556,0.310355555555556},
-{2987078,3870110,3869559,0.305377777777778,0.305377777777778},
-{2987079,3869559,3869082,0.114246153846154,0.120421621621622},
-{2987080,3869082,3868858,0.0613263157894737,0.0896307692307692},
-{2987081,3869160,3869082,0.067175,0.0895666666666667},
-{2987082,3872546,3873007,0.360088888888889,0.360088888888889},
-{2987117,3857767,3857541,0.108488888888889,0.108488888888889},
-{2987120,3853754,3853390,0.308577777777778,0.308577777777778},
-{2987121,3860698,3861053,0.235422222222222,0.235422222222222},
-{2987122,3864559,3864913,0.264822222222222,0.264822222222222},
-{2987123,3868371,3867227,0.444955555555556,0.444955555555556},
-{2987124,3871128,3870015,0.413644444444444,0.413644444444444},
-{2987125,3869332,3869071,0.141484615384615,0.136244444444444},
-{2987126,3870342,3869290,0.271628571428571,1000000},
-{2987154,3852743,3852696,0.0196,1000000},
-{2987155,3853476,3852743,0.2148,1000000},
-{2987157,3853164,3852696,0.206466666666667,0.206466666666667},
-{2987158,3853602,3853101,0.221088888888889,0.221088888888889},
-{2987159,3859475,3859332,0.0905333333333333,0.0452666666666667},
-{2987160,3859475,3859315,0.0704709677419355,1000000},
-{2987161,3861761,3861459,0.3214,0.3214},
-{2987162,3863414,3863294,0.107822222222222,0.107822222222222},
-{2987164,3865801,3866713,0.612666666666667,0.612666666666667},
-{2987167,3875902,3877505,0.696846428571429,0.696846428571429},
-{2987169,3852812,3852378,0.288222222222222,0.288222222222222},
-{2987170,3852375,3851943,0.293422222222222,0.293422222222222},
-{2987191,3858717,3858737,0.0485111111111111,0.0485111111111111},
-{2987192,3859828,3859282,0.601454545454545,0.601454545454545},
-{2987193,3859282,3859438,0.206114285714286,0.254611764705882},
-{2987194,3859690,3860078,1000000,0.559145454545455},
-{2987195,3859670,3859477,0.0570179104477612,0.0578818181818182},
-{2987196,3860467,3859670,0.296844827586207,0.441461538461538},
-{2987197,3862244,3861700,0.309022222222222,0.309022222222222},
-{2987198,3861640,3861700,0.0714888888888889,0.0714888888888889},
-{2987199,3861700,3861846,0.152622222222222,0.152622222222222},
-{2987200,3869250,3869261,0.1572,0.1572},
-{2987201,3893008,3894694,0.922628571428571,0.759811764705882},
-{2987203,3859014,3859083,0.195163636363636,1000000},
-{2987204,3870706,3870498,0.319888888888889,0.319888888888889},
-{2987205,3871928,3871707,0.323288888888889,0.323288888888889},
-{2987206,3870706,3870427,0.0777272727272727,0.07125},
-{2987207,3871140,3870706,0.116183333333333,0.119502857142857},
-{2987208,3871436,3871312,0.0367741935483871,0.038},
-{2987209,3871928,3871436,0.13464375,0.130563636363636},
-{2987210,3872227,3871928,0.100555555555556,0.129285714285714},
-{2987211,3851828,3852662,0.254436363636364,0.254436363636364},
-{2987212,3860526,3859793,0.342163636363636,0.4182},
-{2987213,3860526,3860260,0.127022222222222,0.127022222222222},
-{2987214,3859550,3859257,0.146515384615385,0.146515384615385},
-{2987215,3858621,3858859,1000000,1000000},
-{2987216,3870228,3870991,0.315022222222222,0.315022222222222},
-{2987217,3870991,3870520,0.172488888888889,0.172488888888889},
-{2987218,3871391,3870942,0.526616666666667,1000000},
-{2987219,3871327,3871160,0.265473913043478,0.283995348837209},
-{2987220,3875808,3875273,0.226333333333333,0.226333333333333},
-{2987221,3885369,3885643,0.112555555555556,0.112555555555556},
-{2987222,3887788,3888306,0.38907,0.38907},
-{2987225,3886563,3886427,0.0950857142857143,0.0868173913043478},
-{2987226,3886629,3886807,0.11926,0.108418181818182},
-{2987227,3885289,3885713,1000000,1000000},
-{2987228,3886174,3886162,1000000,1000000},
-{2987229,3886944,3886888,0.2525625,1000000},
-{2987230,3893762,3893565,0.3545,0.3545},
-{2987231,3899322,3898746,0.258376470588235,0.24862641509434},
-{2987232,3899623,3899322,0.158013333333333,0.158013333333333},
-{2987233,3898482,3899693,0.644377777777778,0.644377777777778},
-{2987234,3899693,3899322,0.726222222222222,0.726222222222222},
-{2987235,3900989,3900974,0.0357483870967742,0.046175},
-{2987236,3901080,3900989,0.0857538461538462,0.0857538461538462},
-{2987237,3900462,3900989,1000000,0.601870588235294},
-{2987238,3901080,3900462,1000000,0.462733333333333},
-{2987239,3900462,3900391,1000000,0.0374},
-{2987240,3901181,3901080,0.10365,0.118457142857143},
-{2987241,3901198,3901181,0.0187125,0.0230307692307692},
-{2987242,3903117,3903103,0.05288,0.063456},
-{2987243,3903121,3903117,0.0224142857142857,0.03138},
-{2987244,3900974,3901686,0.467933333333333,0.467933333333333},
-{2987245,3901686,3902065,0.239047058823529,0.239047058823529},
-{2987246,3902065,3902408,0.25372,0.25372},
-{2987247,3902408,3902732,0.204063157894737,0.204063157894737},
-{2987248,3902732,3902997,0.131488888888889,0.131488888888889},
-{2987249,3902732,3902868,0.24492,0.24492},
-{2987250,3902408,3902552,0.18645,0.18645},
-{2987251,3902065,3902204,1000000,1000000},
-{2987252,3901686,3901826,0.29332,0.29332},
-{2987253,3901181,3901826,0.390057142857143,1000000},
-{2987254,3901826,3902204,0.1781,1000000},
-{2987255,3902204,3902552,0.169617391304348,1000000},
-{2987256,3902552,3902868,0.140544827586207,1000000},
-{2987257,3902868,3903117,0.232333333333333,1000000},
-{2987258,3860128,3859534,0.287581818181818,0.287581818181818},
-{2987259,3866223,3866172,0.0551162790697674,0.0564285714285714},
-{2987260,3866172,3867432,0.443533333333333,0.443533333333333},
-{2987261,3872427,3871847,0.198377777777778,0.198377777777778},
-{2987262,3886759,3886185,0.443644444444444,0.443644444444444},
-{2987263,3896942,3897395,0.275288888888889,0.275288888888889},
-{2987264,3912180,3912081,0.0535111111111111,0.0535111111111111},
-{2987265,3911758,3910733,1000000,1000000},
-{2987266,3917379,3917989,0.412571428571429,1000000},
-{2987267,3917724,3917628,0.0674285714285714,1000000},
-{2987268,3917234,3917135,0.101325,1000000},
-{2987269,3916551,3916657,1000000,0.10635},
-{2987527,3914312,3915006,0.217813953488372,0.2926875},
-{2987528,3915006,3915382,0.150615789473684,0.130077272727273},
-{2987529,3914950,3914181,0.388315384615385,0.388315384615385},
-{2987530,3915006,3914950,0.051768,0.0562695652173913},
-{2987531,3914950,3915390,0.248755555555556,0.248755555555556},
-{2987532,3916182,3916530,1000000,1000000},
-{2987533,3916530,3916621,1000000,1000000},
-{2987534,3916530,3916813,1000000,1000000},
-{2987535,3916432,3916813,1000000,0.277633333333333},
-{2987536,3916813,3916926,1000000,0.0677333333333333},
-{2987537,3916346,3916621,0.152937931034483,1000000},
-{2987538,3916621,3916926,0.123306666666667,1000000},
-{2987544,3903885,3903538,0.213444444444444,0.213444444444444},
-{2987545,3901964,3902262,0.1962,0.1962},
-{2987546,3902858,3903382,0.130675471698113,1000000},
-{2987547,3902858,3902939,0.0628235294117647,1000000},
-{2987548,3903113,3903434,0.0917375,1000000},
-{2987549,3902749,3902858,1000000,0.073704},
-{2987550,3906002,3905636,0.214088888888889,0.214088888888889},
-{2987551,3915486,3915233,0.161822222222222,0.161822222222222},
-{2987552,3918373,3918083,0.162466666666667,0.162466666666667},
-{2987553,3922133,3922149,0.34059,0.34059},
-{2987554,3870779,3871156,1000000,1000000},
-{2987555,3871156,3871288,0.135288888888889,0.135288888888889},
-{2987556,3870810,3871288,1000000,0.178292307692308},
-{2987557,3871288,3871438,1000000,0.0488785714285714},
-{2987558,3871636,3871438,0.338918181818182,0.3468},
-{2987559,3871438,3871296,0.316843902439024,0.3093},
-{2987560,3867932,3868114,0.0620888888888889,0.0620888888888889},
-{2987561,3906875,3906841,0.0678444444444444,0.0678444444444444},
-{2987562,3906841,3906810,0.120755555555556,0.120755555555556},
-{2987563,3906841,3906653,0.0868444444444444,0.0868444444444444},
-{2987564,3907135,3907280,0.0303042253521127,1000000},
-{2987565,3905103,3907135,0.436525,1000000},
-{2987566,3907212,3907847,0.332733333333333,0.332733333333333},
-{2987567,3907297,3907355,0.109111111111111,0.109111111111111},
-{2987568,3909706,3908935,0.402266666666667,0.402266666666667},
-{2987569,3910107,3909376,0.375866666666667,0.375866666666667},
-{2987570,3910600,3909757,0.375933333333333,0.375933333333333},
-{2987571,3910992,3910211,0.356911111111111,0.356911111111111},
-{2987583,3863262,3862975,0.297555555555556,0.297555555555556},
-{2987584,3869272,3869317,0.308511111111111,0.308511111111111},
-{2987585,3870266,3870272,0.0559741935483871,0.0559741935483871},
-{2987586,3897734,3897626,0.0660888888888889,0.0660888888888889},
-{2987587,3907095,3906954,0.09639,0.09639},
-{2987588,3907258,3907424,0.16195,0.077736},
-{2987589,3911363,3910676,0.360488888888889,0.360488888888889},
-{2987590,3911735,3911074,0.361666666666667,0.361666666666667},
-{2987591,3912141,3911500,0.339822222222222,0.339822222222222},
-{2987592,3912447,3912261,0.0850888888888889,0.0850888888888889},
-{2987593,3905129,3907186,1000000,0.51892131147541},
-{2987594,3918195,3917740,0.282577777777778,0.282577777777778},
-{2987595,3918849,3919021,0.228184615384615,0.228184615384615},
-{2987606,3869159,3868820,0.20649,0.20649},
-{2987607,3867628,3868360,0.290577777777778,0.290577777777778},
-{2987608,3867628,3867579,0.169533333333333,0.169533333333333},
-{2987609,3867043,3866885,0.30408,0.30408},
-{2987610,3868546,3868052,0.328118181818182,0.343742857142857},
-{2987611,3895744,3896378,1000000,0.598490322580645},
-{2987612,3897045,3897327,0.105675,0.0983023255813953},
-{2987613,3896174,3896378,1000000,0.123955555555556},
-{2987614,3893671,3893791,0.064,0.064},
-{2987615,3896880,3896990,1000000,0.0903272727272727},
-{2987616,3896514,3896910,0.232022222222222,0.232022222222222},
-{2987617,3906609,3907255,0.279573913043478,0.221731034482759},
-{2987618,3907255,3907376,0.09252,0.0816352941176471},
-{2987619,3913935,3913887,1000000,0.02228},
-{2987637,3869479,3869210,0.102111111111111,0.102111111111111},
-{2987638,3867306,3867305,0.0664888888888889,0.0664888888888889},
-{2987639,3866576,3866469,0.0930444444444444,0.0930444444444444},
-{2987640,3872589,3872666,0.0812666666666667,0.0812666666666667},
-{2987641,3872254,3872187,0.0794444444444444,0.0794444444444444},
-{2987642,3873558,3873874,0.124711111111111,0.124711111111111},
-{2987643,3871880,3871825,0.173977777777778,0.173977777777778},
-{2987644,3871451,3871979,0.253755555555556,0.253755555555556},
-{2987645,3884780,3884744,0.173133333333333,0.173133333333333},
-{2987646,3896829,3897045,1000000,0.0691945945945946},
-{2987647,3896829,3896905,1000000,0.0519461538461539},
-{2987648,3896905,3896961,1000000,0.0405428571428571},
-{2987649,3896695,3896905,0.0662,1000000},
-{2987650,3896905,3896986,0.0249666666666667,1000000},
-{2987651,3896961,3896986,0.0383357142857143,1000000},
-{2987652,3897652,3898703,0.509731034482759,0.509731034482759},
-{2987653,3896961,3897652,1000000,0.428960869565217},
-{2987654,3897652,3897821,1000000,0.145356},
-{2987655,3897821,3898295,0.415628571428571,0.415628571428571},
-{2987656,3898789,3898871,0.0986709677419355,0.0955875},
-{2987657,3910806,3910820,0.0762521739130435,0.0762521739130435},
-{2987658,3910820,3910837,0.188228571428571,0.179672727272727},
-{2987659,3910166,3910671,0.264875,0.264875},
-{2987660,3910358,3910450,0.207644444444444,0.207644444444444},
-{2987661,3909474,3910450,0.462066666666667,0.462066666666667},
-{2987662,3910820,3911701,0.323933333333333,0.323933333333333},
-{2987667,3870485,3870072,0.143866666666667,0.143866666666667},
-{2987668,3869571,3869174,0.145044444444444,0.145044444444444},
-{2987669,3869174,3869007,0.0621555555555555,0.0621555555555555},
-{2987670,3872502,3872181,0.113888888888889,0.113888888888889},
-{2987671,3872545,3872856,0.0980444444444444,0.0980444444444444},
-{2987672,3892379,3892332,0.16904,0.16904},
-{2987673,3892169,3892379,0.0774545454545454,0.079875},
-{2987674,3892379,3892477,0.0529615384615385,0.0529615384615385},
-{2987675,3898232,3898677,1000000,0.390924324324324},
-{2987676,3910563,3909791,1000000,1000000},
-{2987677,3909791,3909224,0.396171428571429,1000000},
-{2987690,3884026,3883928,0.0492782608695652,0.0809571428571429},
-{2987691,3883928,3883677,0.132913043478261,0.1910625},
-{2987692,3883928,3884164,0.191088888888889,0.191088888888889},
-{2987693,3882443,3882537,0.0446516129032258,0.0446516129032258},
-{2987694,3883315,3883209,0.0545739130434783,0.0545739130434783},
-{2987695,3912172,3913052,1000000,1000000},
-{2987697,3868257,3868389,0.0588444444444444,0.0588444444444444},
-{2987698,3869266,3868844,0.1568,0.1568},
-{2987699,3869266,3869257,0.0828444444444444,0.0828444444444444},
-{2987700,3873010,3873302,0.227630769230769,1000000},
-{2987701,3873302,3872888,0.09544,0.09544},
-{2987702,3903099,3903986,0.383,0.383},
-{2987703,3903241,3904037,0.340555555555556,0.340555555555556},
-{2987704,3903165,3903999,0.355444444444444,0.355444444444444},
-{2987705,3902592,3902907,0.25596,0.25596},
-{2987706,3902592,3902886,0.20148,0.20148},
-{2987707,3912138,3911659,0.397533333333333,0.397533333333333},
-{2987708,3911984,3912211,0.28524,0.28524},
-{2987714,3863323,3865772,1.1786,1.1786},
-{2987715,3865772,3866325,0.28932972972973,0.28932972972973},
-{2987716,3886634,3886749,0.0364705882352941,0.0357692307692308},
-{2987717,3886749,3887173,0.126992307692308,0.126992307692308},
-{2987718,3886749,3886513,0.159777777777778,0.159777777777778},
-{2987719,3888519,3888866,0.204866666666667,0.204866666666667},
-{2987720,3900291,3900605,0.149807142857143,0.123370588235294},
-{2987729,3864644,3864713,0.0748363636363636,1000000},
-{2987730,3864400,3864713,0.0779866666666667,1000000},
-{2987731,3864713,3865039,0.09045,1000000},
-{2987732,3878208,3877874,0.347813333333333,0.326075},
-{2987733,3896279,3896537,0.1452,0.1452},
-{2987748,3896334,3896518,0.17187,0.17187},
-{2987749,3898592,3898879,0.15885,0.15885},
-{2987750,3896971,3897038,1000000,1000000},
-{2987751,3902589,3903380,0.336484615384615,0.460452631578947},
-{2987752,3903380,3903411,0.039227027027027,0.0403166666666667},
-{2987753,3903353,3903380,0.0410333333333333,0.0447636363636364},
-{2987755,3902889,3904075,0.736222222222222,0.736222222222222},
-{2987756,3904305,3904075,0.101528571428571,0.109338461538462},
-{2987757,3904305,3904509,0.116791304347826,1000000},
-{2987758,3904509,3904587,0.033924,0.0332588235294118},
-{2987759,3904315,3904305,0.111981818181818,1000000},
-{2987760,3904090,3904305,0.186622222222222,1000000},
-{2987761,3904172,3905104,1000000,0.534142857142857},
-{2987762,3903710,3904014,0.11067,0.11067},
-{2987763,3904014,3904172,0.0554896551724138,0.0574714285714286},
-{2987764,3904014,3904062,0.0167111111111111,1000000},
-{2987765,3904062,3904484,0.239085714285714,1000000},
-{2987766,3903278,3904062,1000000,0.361419230769231},
-{2987767,3903111,3903090,1000000,0.1018},
-{2987768,3903278,3903251,0.0450893617021277,1000000},
-{2987769,3902572,3902449,0.0938666666666667,0.0938666666666667},
-{2987770,3901367,3900961,0.454488888888889,0.454488888888889},
-{2987771,3901527,3901367,0.122644444444444,0.122644444444444},
-{2987772,3901704,3901527,0.151022222222222,0.151022222222222},
-{2987773,3901873,3901704,0.145644444444444,0.145644444444444},
-{2987774,3904478,3904222,0.167933333333333,0.167933333333333},
-{2987775,3904899,3904935,0.00936842105263158,0.00953571428571428},
-{2987776,3904935,3905140,1000000,0.0882},
-{2987777,3904935,3905088,0.1008,0.1008},
-{2987778,3905140,3905727,0.36705,0.36705},
-{2987781,3905196,3905695,0.165409523809524,0.168077419354839},
-{2987782,3905886,3906450,0.183797014925373,0.1924125},
-{2987783,3906880,3906739,0.202088888888889,0.202088888888889},
-{2987784,3906560,3906739,0.0454090909090909,0.0454090909090909},
-{2987785,3906880,3906560,0.209544,0.194022222222222},
-{2987786,3906560,3906025,0.322913513513513,0.306353846153846},
-{2987814,3849376,3848873,0.592466666666667,0.592466666666667},
-{2987815,3874848,3875270,0.372358064516129,1000000},
-{2987816,3876916,3874848,0.807558620689655,0.6888},
-{2987817,3873650,3874390,0.3552,0.224336842105263},
-{2987818,3873576,3874033,0.3201375,0.150652941176471},
-{2987819,3874110,3875093,0.408733333333333,0.580831578947368},
-{2987820,3874110,3874470,0.507403846153846,1000000},
-{2987821,3872913,3873988,0.77692,0.485575},
-{2987822,3874058,3874110,0.340328571428571,1000000},
-{2987823,3874475,3874542,0.0194052631578947,1000000},
-{2987824,3874351,3874275,1000000,0.102815094339623},
-{2987825,3874542,3874612,0.0180461538461538,1000000},
-{2987826,3874393,3874348,0.114583333333333,1000000},
-{2987827,3874348,3874067,0.15873488372093,1000000},
-{2987828,3874542,3874348,0.117414285714286,1000000},
-{2987829,3874348,3874275,0.023115,1000000},
-{2987830,3874888,3874673,0.1176,0.152188235294118},
-{2987831,3874673,3874254,0.731957142857143,1000000},
-{2987832,3874673,3874786,0.288763636363636,0.288763636363636},
-{2987833,3874058,3874786,0.27136,0.581485714285714},
-{2987865,3903926,3903049,0.391246153846154,0.391246153846154},
-{2987866,3850898,3851082,1000000,0.1316},
-{2987867,3850910,3851116,0.0708171428571429,1000000},
-{2987868,3851076,3851268,0.0726406779661017,0.087465306122449},
-{2987869,3850712,3851268,0.234716129032258,1000000},
-{2987870,3850712,3851959,0.222688235294118,1000000},
-{2987871,3851268,3851959,0.1632,0.17408},
-{2987872,3858060,3858034,1000000,0.11848},
-{2987873,3860260,3859550,0.2348,0.2348},
-{2987874,3856551,3857279,0.37,0.37},
-{2987875,3858697,3857279,0.503072727272727,0.503072727272727},
-{2987876,3857279,3854944,0.883745454545455,0.883745454545455},
-{2987877,3853446,3854944,1.05412727272727,1.05412727272727},
-{2987878,3865908,3864954,1000000,0.664058823529412},
-{2987879,3864770,3864815,0.212731914893617,0.2083},
-{2987880,3864815,3865255,0.269378571428571,0.163969565217391},
-{2987881,3866345,3865744,0.214733333333333,0.214733333333333},
-{2987882,3866379,3865515,0.310866666666667,0.310866666666667},
-{2987883,3866404,3865423,0.391176,0.391176},
-{2987884,3866403,3865419,0.358044444444444,0.358044444444444},
-{2987885,3865744,3866314,0.227266666666667,0.227266666666667},
-{2987886,3865515,3865744,0.130577777777778,0.130577777777778},
-{2987887,3865423,3865515,0.1487,0.1487},
-{2987888,3865419,3865423,0.266857142857143,0.266857142857143},
-{2987889,3865419,3865603,0.208911111111111,0.208911111111111},
-{2987890,3864739,3864815,0.1398,0.0668608695652174},
-{2987891,3864531,3864739,0.276222222222222,0.276222222222222},
-{2987892,3864531,3864984,0.194333333333333,0.194333333333333},
-{2987893,3864824,3865429,1000000,0.360211764705882},
-{2987894,3866334,3865429,0.312,1000000},
-{2987895,3863087,3863517,0.218577777777778,0.218577777777778},
-{2987896,3862276,3862066,1000000,0.0571358490566038},
-{2987897,3862276,3862285,0.0483,0.0399724137931034},
-{2987898,3862360,3862285,1000000,0.0439034482758621},
-{2987899,3851082,3850904,0.113333333333333,1000000},
-{2987900,3851047,3851076,0.0230222222222222,0.024864},
-{2987905,3849621,3848885,0.538371428571429,0.491556521739131},
-{2987906,3848885,3848641,0.1772,0.148848},
-{2987907,3850405,3850208,0.176975,0.184669565217391},
-{2987908,3850621,3850405,0.12495,0.1428},
-{2987909,3850842,3850621,0.1265,0.145961538461538},
-{2987910,3850842,3851015,0.150730434782609,0.119544827586207},
-{2987911,3849788,3849858,0.128817391304348,0.128817391304348},
-{2987912,3849984,3850085,0.125710344827586,0.101266666666667},
-{2987913,3850085,3850207,0.216432,0.208107692307692},
-{2987914,3849858,3849953,0.0461,0.044256},
-{2987915,3849953,3850405,0.258244444444444,0.258244444444444},
-{2987916,3849953,3850251,0.247133333333333,0.193408695652174},
-{2987917,3850251,3850531,0.227966666666667,0.227966666666667},
-{2987918,3850531,3850772,0.2256375,0.190010526315789},
-{2987919,3850772,3850207,0.362928,0.37805},
-{2987920,3850251,3849984,0.19191,0.19191},
-{2987921,3850531,3850085,0.235755555555556,0.235755555555556},
-{2987922,3850531,3850842,0.291825,0.424472727272727},
-{2987923,3850772,3850934,0.0958909090909091,0.0879},
-{2987924,3850251,3850621,0.212622222222222,0.212622222222222},
-{2987956,3871494,3871541,1000000,1000000},
-{2987957,3870997,3871129,0.280452631578947,0.3330375},
-{2987958,3871129,3871179,0.137325,0.0998727272727273},
-{2987959,3904684,3904296,0.216422222222222,0.216422222222222},
-{2987960,3905088,3904684,0.207044444444444,0.207044444444444},
-{2987962,3878766,3879080,1000000,1000000},
-{2987963,3880209,3880377,0.233028571428571,1000000},
-{2987964,3880377,3880536,0.2144,1000000},
-{2987970,3898105,3897660,0.166229268292683,0.400905882352941},
-{2987971,3898166,3898330,1000000,0.0671076923076923},
-{2987972,3898458,3898413,0.0330461538461538,0.0330461538461538},
-{2987973,3898166,3898190,0.2112,0.0918260869565217},
-{2987974,3898190,3898105,0.0385818181818182,0.0748941176470588},
-{2987975,3898413,3898330,0.0473111111111111,0.0672315789473684},
-{2987976,3898190,3898217,0.0441461538461538,0.0604105263157895},
-{2987977,3895285,3895346,0.02304,1000000},
-{2987978,3868516,3868673,0.254526315789474,0.219818181818182},
-{2987979,3869326,3868673,0.253656,0.2439},
-{2987980,3868673,3868546,0.1454,0.153952941176471},
-{2988036,3881469,3881586,0.0499411764705882,1000000},
-{2988037,3881732,3881723,0.0664838709677419,1000000},
-{2988038,3882412,3882244,0.0961363636363636,0.1175},
-{2988039,3882412,3882454,1000000,0.141461538461538},
-{2988040,3882572,3882412,0.231642857142857,0.147409090909091},
-{2988041,3865014,3864949,0.04225,0.04225},
-{2988042,3864872,3864915,0.0523885714285714,0.0470153846153846},
-{2988043,3865894,3865810,0.0436301886792453,0.0453411764705882},
-{2988044,3866172,3866094,0.0446553191489362,0.04664},
-{2988045,3866094,3866029,0.0898857142857143,0.0877953488372093},
-{2988046,3866305,3865103,0.329216666666667,1000000},
-{2988047,3866029,3865894,0.140976,0.135553846153846},
-{2988048,3866029,3866481,0.242618181818182,0.254171428571429},
-{2988049,3864949,3864472,0.239863636363636,1000000},
-{2988050,3864472,3864249,0.1628,1000000},
-{2988051,3864249,3864166,0.217111111111111,0.217111111111111},
-{2988052,3864626,3864360,0.117205714285714,0.117205714285714},
-{2988053,3865894,3866481,0.262453846153846,0.262453846153846},
-{2988142,3880269,3879974,0.18748,1000000},
-{2988143,3879112,3879127,1000000,0.152935135135135},
-{2988144,3879809,3879927,1000000,0.073155},
-{2988145,3879158,3879112,1000000,0.039},
-{2988146,3879279,3879452,1000000,0.0847777777777778},
-{2988147,3878672,3879127,1000000,0.219225},
-{2988148,3878565,3879112,1000000,0.31428},
-{2988149,3879566,3879056,1000000,0.352266666666667},
-{2988150,3879809,3879331,0.32895,1000000},
-{2988152,3865806,3866507,0.2092,1000000},
-{2988153,3866507,3866942,0.1071,1000000},
-{2988154,3866000,3865806,1000000,1000000},
-{2988155,3866000,3866507,0.222685714285714,0.222685714285714},
-{2988156,3888883,3889033,0.0403692307692308,1000000},
-{2988157,3889531,3889609,0.0198585365853659,1000000},
-{2988158,3888586,3888514,0.0382216216216216,0.0328883720930233},
-{2988159,3888586,3888806,0.117105,1000000},
-{2988160,3888995,3889066,1000000,0.101571428571429},
-{2988161,3889438,3889770,0.15741,1000000},
-{2988162,3889770,3889996,0.0795260869565217,1000000},
-{2988163,3889996,3889899,0.0525957446808511,1000000},
-{2988164,3889609,3889899,1000000,0.493866666666667},
-{2988165,3889241,3889167,1000000,0.0240769230769231},
-{2988166,3888909,3888586,0.166548387096774,1000000},
-{2988167,3889960,3890400,1000000,0.295733333333333},
-{2988168,3889092,3889669,0.229303448275862,0.214509677419355},
-{2988169,3888949,3889889,1000000,0.53264347826087},
-{2988170,3879127,3879264,1000000,0.15074},
-{2988171,3879346,3879445,0.06645,1000000},
-{2988172,3879264,3879295,1000000,0.02235},
-{2988173,3879334,3879360,1000000,0.01174},
-{2988174,3880204,3879711,1000000,0.373592307692308},
-{2988175,3879360,3879410,1000000,0.02086},
-{2988176,3879410,3879540,1000000,0.0918},
-{2988177,3879445,3879410,1000000,0.0656086956521739},
-{2988178,3879410,3879403,1000000,0.0128608695652174},
-{2988179,3879427,3879394,0.0140727272727273,1000000},
-{2988180,3879394,3879279,0.0339771428571429,1000000},
-{2988181,3879394,3879452,1000000,0.121628571428571},
-{2988182,3880021,3879711,1000000,0.675952941176471},
-{2988183,3879359,3879330,1000000,0.00818571428571429},
-{2988184,3879303,3879334,1000000,0.0170322580645161},
-{2988185,3879330,3879303,1000000,0.00984285714285714},
-{2988186,3879303,3879199,1000000,0.04296},
-{2988187,3879199,3879297,0.0424615384615385,1000000},
-{2988188,3879297,3879326,0.0108888888888889,1000000},
-{2988189,3879379,3879394,1000000,0.0234947368421053},
-{2988190,3879540,3879442,0.0537642857142857,1000000},
-{2988191,3879442,3879427,0.00678181818181818,1000000},
-{2988192,3879417,3879442,0.0117103448275862,1000000},
-{2988193,3879442,3879510,0.03648,1000000},
-{2988194,3879540,3879510,0.060816,1000000},
-{2988203,3852011,3851830,0.0391866666666667,0.0678230769230769},
-{2988204,3860609,3861604,0.441018181818182,0.4548},
-{2988205,3861723,3861825,0.0920666666666667,0.0920666666666667},
-{2988206,3861723,3862965,0.705155555555556,0.705155555555556},
-{2988207,3890689,3890722,0.104155555555556,0.104155555555556},
-{2988208,3901875,3901829,1000000,1000000},
-{2988209,3853338,3853251,0.201503225806452,0.19520625},
-{2988210,3853477,3853338,0.2123,0.19903125},
-{2988211,3853899,3853477,0.257668965517241,0.241045161290323},
-{2988212,3853849,3853338,0.340866666666667,0.340866666666667},
-{2988213,3854240,3853849,0.20532,0.23954},
-{2988214,3854240,3853477,0.440288888888889,0.440288888888889},
-{2988215,3854256,3854394,0.0646666666666667,0.0646666666666667},
-{2988221,3857474,3857132,0.120625531914894,0.120625531914894},
-{2988222,3857132,3856626,0.204984,0.209167346938776},
-{2988223,3856626,3856413,0.0768576923076923,0.0815632653061225},
-{2988224,3857474,3857326,0.0980823529411765,0.069475},
-{2988225,3857326,3857080,0.1808,0.1808},
-{2988226,3857326,3857051,0.2286,0.155121428571429},
-{2988227,3857051,3856759,0.177288888888889,0.177288888888889},
-{2988228,3857051,3856786,0.184608,0.23076},
-{2988229,3856786,3856557,0.224921739130435,0.235145454545455},
-{2988230,3856626,3856557,0.0510642857142857,0.0461225806451613},
-{2988231,3856537,3856786,0.22878,0.22878},
-{2988232,3856255,3856557,0.281505882352941,0.281505882352941},
-{2988233,3856557,3855954,0.424666666666667,0.4095},
-{2988234,3855608,3855954,0.37404,0.37404},
-{2988235,3857747,3857132,0.5298,0.504571428571429},
-{2988236,3856840,3856525,0.223371428571429,0.223371428571429},
-{2988237,3857269,3856840,0.225933333333333,0.244008},
-{2988238,3857269,3857263,0.092928,0.0801103448275862},
-{2988239,3857678,3857263,0.186644444444444,0.186644444444444},
-{2988240,3857747,3856887,1000000,0.425955555555556},
-{2988241,3857263,3856887,0.159832258064516,0.133913513513514},
-{2988242,3856887,3856413,0.228511111111111,0.186963636363636},
-{2988243,3856172,3855682,0.281318181818182,0.269086956521739},
-{2988244,3855954,3855687,0.22998947368421,0.22998947368421},
-{2988245,3854176,3854052,0.0418212765957447,0.0531243243243243},
-{2988246,3854709,3854176,0.247533333333333,0.238692857142857},
-{2988247,3855687,3855124,0.311192307692308,0.288964285714286},
-{2988248,3855124,3854903,0.17928,0.17928},
-{2988249,3854903,3854947,0.039275,0.04713},
-{2988250,3854903,3854236,0.49692,0.382246153846154},
-{2988251,3854236,3853986,0.229275,0.146736},
-{2988252,3854052,3853986,0.050825,0.0580857142857143},
-{2988253,3853675,3854236,1.07385882352941,1.82556},
-{2988254,3853675,3853986,1.16731578947368,2.01627272727273},
-{2988255,3854551,3855124,1.36370769230769,1.36370769230769},
-{2988256,3855298,3855687,0.521435294117647,0.521435294117647},
-{2988257,3854052,3852900,0.341476595744681,0.3489},
-{2988258,3852373,3852753,0.128804081632653,0.121373076923077},
-{2988259,3863309,3863194,0.07335,0.0851806451612903},
-{2988260,3863566,3863309,0.143288888888889,0.143288888888889},
-{2988261,3863566,3863666,0.0751777777777778,0.0751777777777778},
-{2988262,3895278,3895273,0.10614,1000000},
-{2988263,3895273,3895285,0.03075,1000000},
-{2988264,3895193,3895273,1000000,0.047232},
-{2988265,3895327,3895371,0.0208434782608696,1000000},
-{2988266,3895273,3895327,1000000,0.0375157894736842},
-{2988267,3895327,3895434,1000000,0.1286},
-{2988269,3923738,3924198,0.280984615384615,0.254846511627907},
-{2988280,3880539,3880568,0.0283741935483871,0.0517411764705882},
-{2988281,3920536,3920636,0.0443684210526316,0.0411219512195122},
-{2988282,3920057,3920536,0.189097297297297,0.199902857142857},
-{2988283,3920189,3920536,0.277666666666667,0.277666666666667},
-{2988284,3920057,3920189,0.0888222222222222,0.0888222222222222},
-{2988285,3861281,3861303,0.2298,0.2298},
-{2988286,3874069,3873370,0.54904,0.358069565217391},
-{2988287,3854442,3854263,0.06717,0.06717},
-{2988288,3854970,3854442,0.311436363636364,0.311436363636364},
-{2988289,3854442,3856551,0.917163636363636,0.917163636363636},
-{2988290,3895434,3895371,0.0911684210526316,1000000},
-{2988291,3852800,3851836,0.298263157894737,0.28335},
-{2988292,3851836,3851640,0.077325,0.0759684210526316},
-{2988293,3861034,3860070,0.442133333333333,0.442133333333333},
-{2988294,3861570,3859873,0.82993125,0.88526},
-{2988295,3862229,3861034,0.493,0.493},
-{2988296,3861323,3860526,0.454384615384615,0.407379310344828},
-{2988374,3868864,3868741,0.0387488372093023,0.0362217391304348},
-{2988375,3869012,3868864,0.0638926829268293,0.0623714285714286},
-{2988376,3868074,3866775,0.523644444444444,0.523644444444444},
-{2988377,3914048,3913716,0.0884086956521739,1000000},
-{2988378,3914381,3914098,0.148533333333333,0.148533333333333},
-{2988379,3867678,3867833,0.0709111111111111,0.0709111111111111},
-{2988380,3866304,3866509,0.119,0.0973636363636364},
-{2988383,3912605,3912914,0.127386206896552,0.108652941176471},
-{2988384,3912914,3913169,0.0862666666666667,0.0862666666666667},
-{2988385,3913755,3914089,0.172575,0.172575},
-{2988386,3914128,3913502,0.283333333333333,0.283333333333333},
-{2988387,3913254,3913830,0.288733333333333,0.288733333333333},
-{2988388,3913831,3914089,0.16941,0.2117625},
-{2988389,3913502,3913831,0.117464516129032,0.117464516129032},
-{2988390,3913254,3913502,0.124903448275862,0.124903448275862},
-{2988391,3912914,3913254,0.18552,0.176685714285714},
-{2988392,3913522,3913830,0.178326315789474,0.178326315789474},
-{2988393,3913169,3913522,0.147193548387097,0.157344827586207},
-{2988395,3884331,3884195,0.04944375,0.0586},
-{2988396,3884569,3884331,0.114288,0.19048},
-{2988397,3894587,3895293,1000000,1000000},
-{2988401,3871186,3871767,0.263022222222222,0.263022222222222},
-{2988402,3870390,3871425,0.393533333333333,0.393533333333333},
-{2988403,3869193,3866325,0.776595348837209,0.795085714285714},
-{2988404,3882419,3883271,0.253983333333333,0.253983333333333},
-{2988405,3881031,3882681,1.36275555555556,1.36275555555556},
-{2988414,3877381,3876129,0.5634,0.5634},
-{2988415,3879963,3879254,0.696857142857143,0.562846153846154},
-{2988416,3880664,3881335,0.368309090909091,0.368309090909091},
-{2988417,3880664,3880648,0.290363636363636,0.290363636363636},
-{2988418,3877338,3877547,0.0411294117647059,0.0437},
-{2988419,3878422,3878792,0.0979914893617021,0.092112},
-{2988420,3878844,3878434,0.270993103448276,0.270993103448276},
-{2988421,3876171,3876400,0.108925,0.104568},
-{2988422,3876849,3877193,0.286984615384615,0.24872},
-{2988423,3877193,3877942,0.33135652173913,0.544371428571429},
-{2988424,3877942,3878111,0.100658823529412,0.122228571428571},
-{2988425,3878111,3878434,0.3079,0.284215384615385},
-{2988426,3877109,3876171,1.16257777777778,1.16257777777778},
-{2988427,3877338,3876400,1.15246666666667,1.15246666666667},
-{2988428,3877858,3876849,1.13637777777778,1.13637777777778},
-{2988429,3878792,3877942,1.12284444444444,1.12284444444444},
-{2988430,3878911,3878111,1.11826666666667,1.11826666666667},
-{2988433,3871415,3873471,1.20164444444444,1.20164444444444},
-{2988435,3870723,3872709,1.22611111111111,1.22611111111111},
-{2988442,3875675,3876017,1000000,0.0905744680851064},
-{2988443,3875663,3875718,0.03754,0.03519375},
-{2988444,3875761,3875896,0.0851828571428571,1000000},
-{2988445,3875761,3875827,1000000,0.102},
-{2988449,3897628,3896422,1000000,1000000},
-{2988470,3860921,3861050,1000000,1000000},
-{2988471,3862314,3862617,1000000,1000000},
-{2988472,3853101,3852940,1000000,1000000},
-{2988473,3852770,3851487,1000000,1000000},
-{2988474,3852770,3853721,1000000,1000000},
-{2988475,3852579,3851536,0.343164705882353,0.307042105263158},
-{2988476,3852940,3852579,0.12514,0.129455172413793},
-{2988477,3858948,3858673,1000000,1000000},
-{2988478,3878244,3878247,1000000,1000000},
-{2988479,3877995,3878244,1000000,1000000},
-{2988480,3877678,3877978,1000000,1000000},
-{2988481,3877995,3878458,1000000,1000000},
-{2988482,3878244,3878771,1000000,1000000},
-{2988483,3877284,3877573,1000000,1000000},
-{2988484,3878276,3878938,1000000,1000000},
-{2988485,3878339,3878930,1000000,1000000},
-{2988486,3877339,3877478,1000000,1000000},
-{2988487,3877285,3877339,1000000,1000000},
-{2988488,3877478,3877264,1000000,1000000},
-{2988489,3876992,3877285,1000000,1000000},
-{2988490,3875851,3876011,1000000,1000000},
-{2988491,3878938,3879416,1000000,1000000},
-{2988492,3859735,3859509,1000000,1000000},
-{2988493,3858108,3857939,1000000,1000000},
-{2988494,3860954,3860815,1000000,1000000},
-{2988495,3859869,3859735,1000000,1000000},
-{2988496,3860398,3860319,1000000,1000000},
-{2988497,3861699,3861631,1000000,1000000},
-{2988498,3861459,3861043,1000000,1000000},
-{2988499,3862732,3862323,1000000,1000000},
-{2988500,3869938,3870178,1000000,1000000},
-{2988501,3870178,3870519,1000000,1000000},
-{2988502,3871403,3870884,1000000,1000000},
-{2988503,3855304,3855807,1000000,1000000},
-{2988504,3855807,3856794,1000000,1000000},
-{2988505,3856794,3857125,1000000,1000000},
-{2988506,3860056,3860204,1000000,1000000},
-{2988507,3861856,3861680,1000000,1000000},
-{2988508,3861343,3861168,1000000,1000000},
-{2988509,3882079,3882425,1000000,1000000},
-{2988510,3885812,3885965,1000000,1000000},
-{2988511,3856389,3856426,1000000,1000000},
-{2988512,3856965,3856823,1000000,1000000},
-{2988513,3867031,3866777,0.0724307692307692,0.0763459459459459},
-{2988514,3867302,3867031,0.0796263157894737,0.0817783783783784},
-{2988515,3865550,3865196,0.17864347826087,1000000},
-{2988516,3865196,3865085,1000000,0.292928571428571},
-{2988517,3870019,3869800,1000000,1000000},
-{2988518,3870250,3870019,1000000,1000000},
-{2988519,3870513,3870291,1000000,1000000},
-{2988520,3873946,3874181,1000000,1000000},
-{2988521,3860488,3860352,1000000,1000000},
-{2988522,3869483,3869008,1000000,1000000},
-{2988523,3869840,3869672,1000000,1000000},
-{2988524,3870196,3870110,1000000,1000000},
-{2988525,3868889,3868735,1000000,1000000},
-{2988526,3868735,3868398,1000000,1000000},
-{2988527,3878989,3878621,1000000,1000000},
-{2988528,3859674,3859221,1000000,1000000},
-{2988529,3858805,3859199,1000000,1000000},
-{2988530,3867017,3866058,1000000,1000000},
-{2988531,3874060,3873823,1000000,1000000},
-{2988532,3874804,3874787,1000000,1000000},
-{2988533,3875960,3875145,1000000,1000000},
-{2988534,3875960,3876069,1000000,1000000},
-{2988535,3890443,3890539,0.0985777777777778,0.0985777777777778},
-{2988538,3920189,3920611,1000000,1000000},
-{2988539,3921180,3920611,1000000,1000000},
-{2988540,3921678,3921908,1000000,1000000},
-{2988541,3921908,3922302,1000000,1000000},
-{2988542,3922513,3922611,1000000,1000000},
-{2988543,3922611,3922709,1000000,1000000},
-{2988544,3922709,3922862,1000000,1000000},
-{2988545,3922862,3923096,1000000,1000000},
-{2988546,3858741,3858469,0.18012,0.128657142857143},
-{2988547,3859599,3858741,0.31625625,0.297652941176471},
-{2988548,3859430,3858579,0.422110344827586,0.422110344827586},
-{2988549,3858579,3858741,0.30801,0.267834782608696},
-{2988550,3858352,3858579,0.387654545454545,0.341136},
-{2988551,3858344,3858352,0.3288,0.34524},
-{2988552,3858352,3859118,0.315355555555556,0.315355555555556},
-{2988573,3867480,3867306,1000000,1000000},
-{2988575,3890739,3891023,0.118820689655172,0.123064285714286},
-{2988576,3871129,3872741,1.20818571428571,1.20818571428571},
-{2988577,3869257,3869202,1000000,1000000},
-{2988578,3868844,3868627,1000000,1000000},
-{2988592,3851185,3851108,0.0759931034482759,0.0958173913043478},
-{2988593,3851361,3851575,0.123348387096774,0.11949375},
-{2988594,3851361,3851282,0.0867428571428571,0.083751724137931},
-{2988595,3851185,3851342,0.0709,1000000},
-{2988596,3851342,3851282,0.05422,1000000},
-{2988597,3851527,3851342,0.0607411764705882,0.0666193548387097},
-{2988598,3852184,3851527,0.251806451612903,0.236545454545455},
-{2988599,3851108,3850839,0.207633333333333,0.207633333333333},
-{2988623,3863888,3863323,0.467111111111111,0.467111111111111},
-{2988624,3866916,3866510,0.14289375,0.207845454545455},
-{2988625,3866510,3865974,0.187954838709677,0.2158},
-{2988626,3864027,3864126,1000000,1000000},
-{2988629,3877505,3877257,0.2734,0.210307692307692},
-{2988630,3877650,3877257,0.164025,0.160677551020408},
-{2988655,3853390,3853272,1000000,1000000},
-{2988656,3852378,3852293,1000000,1000000},
-{2988657,3851943,3851857,1000000,1000000},
-{2988668,3878037,3877665,1000000,1000000},
-{2988669,3878467,3878069,1000000,1000000},
-{2988670,3856451,3856530,0.1057,0.100136842105263},
-{2988671,3856588,3856451,0.188016,0.174088888888889},
-{2988672,3856639,3856588,0.054096,0.0483},
-{2988673,3856451,3856376,0.0354315789473684,0.0354315789473684},
-{2988674,3856376,3856398,0.123088888888889,0.123088888888889},
-{2988675,3856376,3856131,0.0941333333333333,0.0941333333333333},
-{2988676,3856131,3856099,0.1086,0.1086},
-{2988677,3856131,3856157,0.0601555555555556,0.0601555555555556},
-{2988678,3856588,3856293,0.189444444444444,0.189444444444444},
-{2988679,3870010,3869623,1000000,1000000},
-{2988680,3868229,3868722,1000000,1000000},
-{2988681,3868722,3868781,1000000,1000000},
-{2988682,3868781,3868790,1000000,1000000},
-{2988683,3869110,3869450,1000000,1000000},
-{2988684,3869813,3869450,1000000,1000000},
-{2988685,3869813,3870078,1000000,1000000},
-{2988686,3867664,3867208,1000000,1000000},
-{2988687,3867208,3866454,1000000,1000000},
-{2988688,3866998,3866454,1000000,1000000},
-{2988689,3866998,3867389,1000000,1000000},
-{2988690,3868443,3867389,1000000,1000000},
-{2988691,3871012,3869903,1000000,1000000},
-{2988692,3871829,3871652,1000000,1000000},
-{2988693,3872579,3872231,1000000,1000000},
-{2988694,3871701,3872135,1000000,1000000},
-{2988695,3872447,3872135,1000000,1000000},
-{2988696,3868968,3868742,1000000,1000000},
-{2988697,3868938,3868443,1000000,1000000},
-{2988698,3869903,3868938,1000000,1000000},
-{2988699,3868938,3868968,1000000,1000000},
-{2988700,3869186,3868938,1000000,1000000},
-{2988701,3867657,3867404,1000000,1000000},
-{2988702,3867922,3867657,1000000,1000000},
-{2988703,3866270,3865890,1000000,1000000},
-{2988704,3865890,3865716,1000000,1000000},
-{2988705,3866653,3866368,1000000,1000000},
-{2988706,3867160,3866933,1000000,1000000},
-{2988707,3866933,3866618,1000000,1000000},
-{2988708,3871234,3871209,0.108733333333333,1000000},
-{2988709,3870985,3871234,0.146255172413793,1000000},
-{2988710,3870989,3871228,1000000,1000000},
-{2988711,3871249,3870989,1000000,1000000},
-{2988712,3871508,3871228,1000000,1000000},
-{2988713,3871228,3871392,1000000,1000000},
-{2988714,3871392,3871701,1000000,1000000},
-{2988715,3871701,3872281,1000000,1000000},
-{2988716,3872281,3872701,1000000,1000000},
-{2988717,3872281,3872284,1000000,1000000},
-{2988718,3872284,3872210,1000000,1000000},
-{2988719,3872284,3871234,1000000,1000000},
-{2988720,3872210,3871769,1000000,1000000},
-{2988721,3871769,3871660,1000000,1000000},
-{2988722,3872281,3872315,1000000,1000000},
-{2988723,3871652,3871392,1000000,1000000},
-{2988724,3872703,3872476,1000000,1000000},
-{2988725,3871570,3871056,1000000,1000000},
-{2988726,3870953,3870650,1000000,1000000},
-{2988727,3870733,3871099,1000000,1000000},
-{2988728,3870815,3871053,1000000,1000000},
-{2988729,3868700,3868289,1000000,1000000},
-{2988730,3871699,3871325,1000000,1000000},
-{2988731,3868689,3868922,1000000,1000000},
-{2988732,3869253,3869258,1000000,1000000},
-{2988733,3869258,3869270,1000000,1000000},
-{2988734,3859303,3859078,0.248172413793103,0.248172413793103},
-{2988735,3859078,3858859,1000000,1000000},
-{2988736,3859375,3859078,0.126666666666667,0.126666666666667},
-{2988737,3859505,3859375,0.0550222222222222,0.0550222222222222},
-{2988738,3860095,3859505,0.364628571428571,0.364628571428571},
-{2988739,3859303,3859613,0.160063636363636,0.160063636363636},
-{2988740,3861175,3859823,0.824314285714286,0.824314285714286},
-{2988741,3861430,3861318,1000000,1000000},
-{2988742,3859257,3858750,0.207675,1000000},
-{2988743,3859582,3859257,0.156690909090909,1000000},
-{2988744,3860205,3859582,0.282545454545455,1000000},
-{2988745,3858510,3858410,0.291910344827586,0.325592307692308},
-{2988746,3860099,3859883,0.300311111111111,0.300311111111111},
-{2988747,3860763,3859883,0.44805,0.467530434782609},
-{2988748,3859100,3858410,0.308977777777778,0.320861538461538},
-{2988749,3859100,3859420,0.284452173913044,0.384847058823529},
-{2988750,3858510,3859420,0.541936363636364,0.458561538461538},
-{2988751,3859420,3859582,1000000,1000000},
-{2988752,3863627,3863716,0.216755555555556,0.216755555555556},
-{2988753,3864101,3863716,0.202666666666667,0.202666666666667},
-{2988757,3897737,3897850,0.0832046511627907,0.0616862068965517},
-{2988789,3870895,3871039,1000000,1000000},
-{2988790,3871039,3871244,1000000,1000000},
-{2988791,3870604,3870727,1000000,1000000},
-{2988792,3870727,3871236,1000000,1000000},
-{2988793,3874184,3874485,1000000,1000000},
-{2988794,3872404,3872683,1000000,1000000},
-{2988795,3871277,3871643,0.0866125,1000000},
-{2988796,3871643,3871916,0.0609176470588235,1000000},
-{2988797,3871063,3871102,1000000,1000000},
-{2988798,3871369,3871639,1000000,1000000},
-{2988799,3871063,3871323,1000000,0.264545454545455},
-{2988800,3871916,3872305,0.0861056603773585,1000000},
-{2988801,3872229,3872194,1000000,1000000},
-{2988802,3872194,3871832,1000000,1000000},
-{2988803,3871832,3871639,1000000,1000000},
-{2988804,3871832,3871639,1000000,1000000},
-{2988805,3871369,3871323,1000000,1000000},
-{2988806,3872194,3871941,1000000,1000000},
-{2988807,3871323,3871321,1000000,0.0897724137931034},
-{2988808,3871323,3871683,1000000,1000000},
-{2988809,3871683,3871437,1000000,1000000},
-{2988810,3873130,3873334,1000000,1000000},
-{2988811,3873387,3873757,0.161155555555556,1000000},
-{2988812,3874174,3874524,0.181555555555556,0.181555555555556},
-{2988813,3874044,3874131,1000000,1000000},
-{2988814,3877845,3878270,1000000,1000000},
-{2988815,3878270,3878599,1000000,1000000},
-{2988816,3878599,3878724,1000000,1000000},
-{2988817,3878724,3878668,1000000,1000000},
-{2988818,3878724,3878658,1000000,1000000},
-{2988892,3851487,3851093,1000000,1000000},
-{2988893,3851186,3850804,1000000,1000000},
-{2988894,3874448,3874585,1000000,1000000},
-{2988895,3876192,3876030,1000000,1000000},
-{2988896,3875078,3873685,0.612533333333333,0.612533333333333},
-{2988897,3872747,3872119,1000000,1000000},
-{2988898,3872119,3871748,1000000,1000000},
-{2988899,3871748,3870714,1000000,1000000},
-{2988900,3872275,3872119,1000000,1000000},
-{2989062,3865162,3865193,1000000,1000000},
-{2989063,3865193,3865240,1000000,1000000},
-{2989064,3891457,3892592,1000000,1000000},
-{2989065,3890883,3891454,1000000,1000000},
-{2989066,3891454,3891991,1000000,1000000},
-{2989067,3891991,3891925,1000000,1000000},
-{2989068,3891006,3891925,1000000,1000000},
-{2989069,3890902,3890183,1000000,1000000},
-{2989070,3892623,3892855,1000000,1000000},
-{2989071,3892708,3892623,1000000,1000000},
-{2989072,3890924,3891210,1000000,1000000},
-{2989073,3891210,3891335,1000000,1000000},
-{2989077,3905498,3905735,1000000,0.0626666666666667},
-{2989078,3905735,3905897,1000000,0.0415698113207547},
-{2989081,3905414,3904360,0.614958620689655,0.660511111111111},
-{2989082,3904360,3903947,0.3704,0.241565217391304},
-{2989100,3904360,3904473,0.0773555555555556,0.0773555555555556},
-{2989101,3901217,3901671,1000000,0.125207547169811},
-{2989102,3901671,3902140,1000000,0.131952},
-{2989103,3901967,3901628,0.18001935483871,0.214638461538462},
-{2989104,3902430,3902081,1000000,1000000},
-{2989124,3903021,3903090,0.0911076923076923,1000000},
-{2989125,3902986,3903078,0.0721258064516129,0.07453},
-{2989126,3903021,3903111,0.0547615384615385,1000000},
-{2989127,3896018,3896695,0.267938181818182,1000000},
-{2989128,3893726,3893322,1000000,0.137371428571429},
-{2989130,3888113,3888736,0.27345,1000000},
-{2989131,3888033,3888113,0.05964,1000000},
-{2989141,3861298,3861682,1000000,1000000},
-{2989142,3861053,3861394,1000000,1000000},
-{2989143,3917395,3917569,0.20572,0.20572},
-{2989144,3917261,3917502,0.238033333333333,0.2677875},
-{2989145,3917261,3917395,0.10827,0.10827},
-{2989146,3875558,3875698,0.0338478260869565,0.0346},
-{2989147,3874524,3874723,0.0681631578947368,1000000},
-{2989148,3874723,3874905,0.0748666666666667,1000000},
-{2989149,3874902,3874723,0.0620823529411765,1000000},
-{2989150,3875010,3874771,0.0863294117647059,1000000},
-{2989151,3874771,3874259,0.228783333333333,1000000},
-{2989152,3874902,3874771,0.0500869565217391,1000000},
-{2989159,3900206,3900177,1000000,0.0483054545454545},
-{2989160,3864954,3864770,1000000,0.09831},
-{2989161,3864961,3864926,0.127933333333333,0.127933333333333},
-{2989162,3865554,3864926,0.231555555555556,0.231555555555556},
-{2989163,3865353,3864961,0.131622222222222,0.131622222222222},
-{2989172,3877464,3877004,1000000,0.256495081967213},
-{2989174,3877102,3876865,1000000,1000000},
-{2989175,3878618,3878624,0.0606,1000000},
-{2989176,3878618,3878430,1000000,0.123484615384615},
-{2989178,3864926,3864954,0.150844444444444,0.150844444444444},
-{2989179,3865008,3865002,0.0454864864864865,1000000},
-{2989180,3865002,3864934,0.0260117647058824,1000000},
-{2989182,3866161,3866068,0.113653846153846,1000000},
-{2989183,3866073,3865993,0.08016,0.0572571428571428},
-{2989184,3863081,3862763,0.12504,1000000},
-{2989185,3854609,3854263,0.282506896551724,0.287463157894737},
-{2989186,3918609,3919497,0.199511111111111,0.203275471698113},
-{2989187,3918700,3918455,0.17348275862069,1000000},
-{2989188,3918455,3918946,0.161133333333333,1000000},
-{2989192,3920913,3919855,0.316015384615385,1000000},
-{2989193,3919649,3919884,0.0578588235294118,0.0602204081632653},
-{2989194,3919884,3920047,0.0436666666666667,0.0453461538461538},
-{2989195,3920330,3919855,0.24579512195122,1000000},
-{2989196,3919430,3919808,0.183014117647059,1000000},
-{2989197,3919430,3919649,0.421210344827586,1000000},
-{2989198,3918700,3918752,0.0305025,1000000},
-{2989199,3918752,3918946,0.1254075,1000000},
-{2989200,3919137,3918941,0.132,1000000},
-{2989201,3918941,3918867,0.0561375,1000000},
-{2989202,3918867,3918555,0.215772972972973,1000000},
-{2989203,3918943,3918589,0.0870244897959184,0.085284},
-{2989204,3918589,3918378,0.0510941176470588,0.0491660377358491},
-{2989205,3918378,3917292,0.315714893617021,0.3091375},
-{2989206,3918387,3918609,0.0487777777777778,0.0496981132075472},
-{2989207,3918367,3918700,0.236732432432432,1000000},
-{2989208,3917704,3918035,0.242305263157895,1000000},
-{2989209,3918035,3918367,0.209212987012987,1000000},
-{2989210,3918555,3918247,0.204280519480519,1000000},
-{2989211,3918035,3917503,0.275818867924528,1000000},
-{2989212,3917503,3917319,0.0725625,1000000},
-{2989213,3919497,3919192,0.145991489361702,1000000},
-{2989214,3917245,3916335,0.876027272727273,0.8964},
-{2989215,3917162,3917292,0.0539454545454546,1000000},
-{2989216,3917319,3917245,0.0457875,1000000},
-{2989217,3917245,3917118,0.075825,1000000},
-{2989218,3917118,3917162,0.0503625,1000000},
-{2989219,3920062,3919797,0.218654545454545,0.218654545454545},
-{2989220,3918943,3919192,0.107514893617021,1000000},
-{2989221,3918943,3918555,1000000,0.390875},
-{2989225,3857511,3857952,0.125033333333333,1000000},
-{2989226,3859191,3858718,0.420727272727273,0.420727272727273},
-{2989227,3859282,3859191,0.059328,0.0478451612903226},
-{2989228,3859177,3859445,0.0639333333333333,1000000},
-{2989229,3860691,3860665,0.169745454545455,1000000},
-{2989230,3860622,3860512,0.0782780487804878,1000000},
-{2989231,3860512,3860467,0.0176869565217391,0.0246545454545455},
-{2989232,3860844,3860851,1000000,0.0607058823529412},
-{2989233,3860851,3860876,1000000,0.0262384615384615},
-{2989234,3860754,3860851,1000000,0.122672727272727},
-{2989235,3860876,3860964,1000000,0.0521823529411765},
-{2989236,3860865,3860964,0.0343783783783784,1000000},
-{2989237,3860876,3860865,1000000,0.03951},
-{2989238,3862075,3861882,0.0626516129032258,1000000},
-{2989239,3861136,3861084,0.0164705882352941,1000000},
-{2989240,3866231,3865304,0.226554545454545,0.207675},
-{2989241,3865304,3865217,0.136466666666667,1000000},
-{2989242,3865822,3865217,1000000,0.147279069767442},
-{2989243,3865217,3865048,1000000,0.0424},
-{2989244,3865217,3865174,0.0334857142857143,1000000},
-{2989245,3866067,3865993,0.0325058823529412,1000000},
-{2989246,3866067,3865903,0.0911428571428571,1000000},
-{2989247,3865903,3865779,0.0662210526315789,0.0699},
-{2989248,3865133,3865282,1000000,0.0388216216216216},
-{2989249,3866437,3865822,1000000,0.107018181818182},
-{2989250,3865822,3865804,0.0430125,0.028675},
-{2989251,3866416,3866437,0.0298857142857143,0.0285272727272727},
-{2989252,3869196,3868567,0.117,1000000},
-{2989253,3869196,3869216,0.0195942857142857,1000000},
-{2989254,3869267,3869279,1000000,0.0223},
-{2989255,3869216,3869405,0.1656,1000000},
-{2989256,3869492,3869405,0.0365181818181818,0.0382571428571429},
-{2989257,3869839,3869749,0.0381,0.0331304347826087},
-{2989258,3870973,3870540,0.0973090909090909,1000000},
-{2989259,3870481,3869716,0.15631914893617,1000000},
-{2989260,3870384,3870181,1000000,0.0478046511627907},
-{2989261,3869716,3869660,0.0744,0.053568},
-{2989262,3868927,3869038,0.0434333333333333,1000000},
-{2989263,3868994,3869038,1000000,0.0371489361702128},
-{2989264,3868641,3868994,1000000,0.233297872340426},
-{2989265,3868994,3868927,0.0341555555555556,1000000},
-{2989266,3868994,3868904,0.0410076923076923,1000000},
-{2989267,3868549,3868641,1000000,0.07475},
-{2989268,3868641,3868577,1000000,0.03882},
-{2989269,3868458,3868549,1000000,0.0381714285714286},
-{2989270,3867982,3868458,0.310432653061225,1000000},
-{2989271,3867788,3867982,0.181455,1000000},
-{2989272,3867982,3868098,0.04539,0.0534},
-{2989273,3871459,3870910,1000000,0.143351351351351},
-{2989274,3872085,3871538,0.1069,1000000},
-{2989275,3871538,3871459,1000000,0.0471},
-{2989276,3872653,3872036,1000000,0.141842857142857},
-{2989277,3872085,3872036,0.0718875,1000000},
-{2989278,3873217,3873091,1000000,0.0451333333333333},
-{2989279,3873108,3872978,0.0399,1000000},
-{2989280,3874015,3873475,1000000,0.139373333333333},
-{2989281,3869573,3869169,1000000,0.1317375},
-{2989282,3869812,3869814,0.0300166666666667,1000000},
-{2989283,3869886,3869867,1000000,0.13164},
-{2989284,3869766,3869836,0.0502736842105263,1000000},
-{2989285,3869867,3869836,1000000,0.0412875},
-{2989286,3869886,3869814,1000000,0.0366521739130435},
-{2989287,3870035,3870122,1000000,0.06438},
-{2989288,3869531,3869452,0.02892,0.0262909090909091},
-{2989289,3869452,3869636,0.191375,1000000},
-{2989290,3869707,3869896,1000000,0.268135135135135},
-{2989291,3869707,3869636,0.038175,0.0436285714285714},
-{2989292,3873475,3873518,0.0825230769230769,1000000},
-{2989293,3874258,3874175,1000000,0.0217066666666667},
-{2989294,3874199,3874175,0.0375677419354839,1000000},
-{2989295,3875297,3875293,0.07832,1000000},
-{2989296,3876147,3875796,1000000,0.107618181818182},
-{2989297,3875819,3875784,0.0119846153846154,1000000},
-{2989298,3876147,3876097,0.0594,1000000},
-{2989299,3876180,3876147,0.152618181818182,1000000},
-{2989300,3876771,3876147,1000000,0.176386363636364},
-{2989301,3875746,3875859,0.0499555555555556,1000000},
-{2989302,3876130,3876180,0.032325,1000000},
-{2989303,3876130,3876498,0.10551,1000000},
-{2989304,3872378,3872222,1000000,0.0744},
-{2989305,3872781,3872388,0.18081,0.139084615384615},
-{2989306,3872388,3872378,0.0799411764705882,1000000},
-{2989307,3872222,3871651,1000000,0.28872},
-{2989308,3870343,3870168,0.08763,0.0449384615384615},
-{2989309,3874035,3874015,0.0648,1000000},
-{2989310,3876012,3876841,0.206832558139535,1000000},
-{2989311,3875776,3875721,0.0352105263157895,0.0352105263157895},
-{2989312,3875390,3875486,1000000,0.0252571428571429},
-{2989313,3875374,3875453,0.0265421052631579,1000000},
-{2989314,3875374,3875257,0.2142,1000000},
-{2989315,3875390,3875374,0.0400875,1000000},
-{2989316,3875257,3875160,0.112144186046512,1000000},
-{2989317,3876867,3876841,0.0647181818181818,0.0678},
-{2989318,3872222,3872125,0.0457304347826087,0.0553578947368421},
-{2989319,3877707,3878139,1000000,0.0962790697674419},
-{2989320,3877707,3876867,0.28392,1000000},
-{2989321,3878139,3878107,0.048825,0.0558},
-{2989322,3877707,3878205,1000000,1000000},
-{2989323,3879801,3879148,1000000,0.285768},
-{2989324,3878875,3878910,0.0860727272727273,1000000},
-{2989325,3878875,3879088,1000000,0.0622378378378378},
-{2989326,3879148,3878941,1000000,0.0433888888888889},
-{2989327,3879088,3878910,0.0430415094339623,1000000},
-{2989328,3879088,3879148,0.0215032258064516,0.0215032258064516},
-{2989329,3878910,3878941,0.0350666666666667,0.02104},
-{2989330,3879222,3879603,1000000,0.126437837837838},
-{2989331,3878916,3879222,1000000,0.0888615384615385},
-{2989332,3878916,3878897,0.0360947368421053,0.0263769230769231},
-{2989333,3878416,3878916,1000000,0.305514285714286},
-{2989334,3877902,3878416,1000000,0.186929032258065},
-{2989335,3877266,3877902,1000000,0.192158823529412},
-{2989336,3878416,3878393,0.02226,0.027825},
-{2989337,3876720,3877270,0.20736,1000000},
-{2989338,3877266,3877270,0.0394736842105263,0.0340909090909091},
-{2989339,3876535,3876748,1000000,0.0794689655172414},
-{2989340,3879536,3879622,0.0247527272727273,1000000},
-{2989341,3879464,3879536,0.054575,1000000},
-{2989342,3879464,3879603,1000000,0.072075},
-{2989343,3880977,3880680,0.0771396226415094,1000000},
-{2989344,3881291,3881329,0.01532,0.0160325581395349},
-{2989345,3881399,3881370,0.0113678571428571,0.0115745454545455},
-{2989346,3880911,3880713,1000000,0.0907555555555556},
-{2989347,3880911,3881000,0.0983032258064516,1000000},
-{2989348,3880680,3880678,1000000,0.10545},
-{2989349,3880977,3880678,0.108794117647059,1000000},
-{2989350,3876742,3876771,0.0384,0.0301714285714286},
-{2989351,3877377,3876742,0.234697297297297,1000000},
-{2989352,3877377,3877371,0.09268,1000000},
-{2989353,3878105,3877822,0.241885714285714,1000000},
-{2989354,3878307,3878145,0.297888888888889,1000000},
-{2989355,3878408,3878377,0.00978947368421053,0.00978947368421053},
-{2989356,3878377,3878290,0.0624,1000000},
-{2989357,3878334,3878290,0.0371555555555556,1000000},
-{2989358,3878667,3878412,1000000,1000000},
-{2989359,3878884,3878815,1000000,0.0476181818181818},
-{2989360,3880055,3879996,1000000,0.0479428571428571},
-{2989361,3880206,3880243,1000000,0.0266516129032258},
-{2989362,3880149,3880243,0.0344117647058824,1000000},
-{2989363,3870464,3870343,0.0519428571428571,0.0259714285714286},
-{2989364,3867406,3867195,1000000,0.0413872340425532},
-{2989365,3868261,3868143,0.0819666666666667,1000000},
-{2989366,3869299,3869269,1000000,0.1455},
-{2989367,3869549,3869269,1000000,0.163742857142857},
-{2989368,3869920,3869549,1000000,0.0706775510204082},
-{2989369,3871007,3871032,1000000,0.0328105263157895},
-{2989370,3875471,3875558,0.0281866666666667,1000000},
-{2989371,3876341,3876587,0.102088235294118,1000000},
-{2989372,3876341,3876529,1000000,0.0716727272727273},
-{2989373,3876529,3876661,1000000,0.059064},
-{2989374,3876587,3876529,1000000,0.0302684210526316},
-{2989375,3876529,3876426,1000000,0.0671454545454545},
-{2989376,3869286,3869299,1000000,0.02589},
-{2989377,3865149,3865283,0.07312,0.0406222222222222},
-{2989378,3865275,3865149,0.069725,1000000},
-{2989379,3865275,3865283,0.030216,1000000},
-{2989380,3865203,3865213,0.0424595744680851,1000000},
-{2989381,3865119,3865203,0.129293023255814,1000000},
-{2989382,3865236,3865342,1000000,0.1479},
-{2989383,3865236,3865119,1000000,0.0337928571428571},
-{2989384,3864959,3865119,0.306980487804878,1000000},
-{2989385,3864981,3864990,1000000,0.0718875},
-{2989386,3864981,3864946,0.0178285714285714,1000000},
-{2989387,3864946,3864889,0.0280090909090909,1000000},
-{2989388,3865069,3865015,1000000,0.016258064516129},
-{2989389,3865531,3865309,0.331527272727273,1000000},
-{2989390,3865339,3865309,1000000,0.0484235294117647},
-{2989391,3865566,3865528,0.02251875,0.0156652173913043},
-{2989392,3865144,3865212,0.0718883720930233,1000000},
-{2989393,3866507,3866595,0.0411931034482759,1000000},
-{2989394,3866595,3867005,1000000,0.110374468085106},
-{2989395,3867005,3867435,1000000,0.118453333333333},
-{2989396,3867005,3866942,0.0580333333333333,0.0652875},
-{2989397,3867435,3867376,1000000,0.0494526315789474},
-{2989398,3867435,3867690,1000000,0.0834976744186047},
-{2989399,3867690,3867631,0.0349153846153846,0.037825},
-{2989400,3867690,3868760,1000000,0.318789473684211},
-{2989401,3868869,3869049,0.0614117647058824,1000000},
-{2989402,3868869,3868757,0.0886173913043478,1000000},
-{2989403,3868757,3868578,0.044925,0.105705882352941},
-{2989404,3869093,3869049,0.010935,0.018225},
-{2989405,3874171,3874186,0.0667953488372093,1000000},
-{2989406,3874171,3874297,1000000,0.0887666666666667},
-{2989407,3874253,3874373,0.0728333333333333,1000000},
-{2989408,3874297,3874329,1000000,0.0171076923076923},
-{2989409,3874329,3874373,1000000,0.03},
-{2989410,3871321,3871437,0.0875538461538461,0.0875538461538461},
-{2989411,3865309,3865298,1000000,0.0125617021276596},
-{2989412,3865175,3865298,0.0474666666666667,1000000},
-{2989413,3865260,3865265,1000000,0.008},
-{2989414,3865038,3865278,0.07542,1000000},
-{2989415,3865278,3865362,0.02694,1000000},
-{2989416,3865133,3865281,1000000,0.0399290322580645},
-{2989417,3865281,3865362,1000000,0.0231103448275862},
-{2989418,3865278,3865281,1000000,0.0232864864864865},
-{2989419,3865281,3865282,1000000,0.0169411764705882},
-{2989420,3875486,3875453,1000000,0.0507111111111111},
-{2989421,3875511,3875486,1000000,0.0596785714285714},
-{2989422,3879464,3879539,0.0427,1000000},
-{2989423,3879539,3879622,0.0304941176470588,1000000},
-{2989424,3879536,3879539,1000000,0.0223636363636364},
-{2989425,3879539,3879656,1000000,0.110869565217391},
-{2989426,3879419,3879536,0.0367132075471698,1000000},
-{2989427,3879419,3879582,0.105417391304348,1000000},
-{2989428,3879536,3879582,0.0558631578947368,1000000},
-{2989429,3879582,3879633,0.0429571428571429,1000000},
-{2989430,3879676,3879633,0.01798125,0.0359625},
-{2989431,3877270,3877870,0.221635714285714,1000000},
-{2989432,3877902,3877870,0.0241111111111111,0.0241111111111111},
-{2989433,3865131,3864850,0.1473,1000000},
-{2989434,3867995,3867780,0.12363,0.12363},
-{2989435,3868229,3868140,0.05832,0.0624857142857143},
-{2989436,3868790,3868645,0.0437555555555556,0.0437555555555556},
-{2989437,3868662,3868645,0.0451636363636364,1000000},
-{2989438,3868662,3868558,1000000,0.0352764705882353},
-{2989439,3870078,3870163,0.0410222222222222,1000000},
-{2989440,3869946,3869416,0.12385,1000000},
-{2989441,3870630,3869946,0.2316,1000000},
-{2989442,3871338,3870630,0.160287804878049,1000000},
-{2989443,3869940,3869944,0.008775,0.011232},
-{2989444,3869944,3869946,0.00984375,0.013125},
-{2989445,3870613,3870621,1000000,0.010475},
-{2989446,3870621,3870630,1000000,0.0123},
-{2989447,3871914,3871322,1000000,0.373371428571429},
-{2989448,3871322,3871326,0.0141,1000000},
-{2989449,3871326,3871338,0.0133142857142857,1000000},
-{2989450,3871914,3871922,1000000,0.00767368421052632},
-{2989451,3871922,3871930,1000000,0.00685945945945946},
-{2989452,3871877,3871887,1000000,0.0190864864864865},
-{2989453,3872008,3872000,1000000,0.0167571428571429},
-{2989454,3868454,3868408,0.0126,0.0186967741935484},
-{2989455,3870721,3870673,0.1244,0.1244},
-{2989456,3869665,3869543,1000000,1000000},
-{2989457,3869695,3869665,1000000,1000000},
-{2989458,3872889,3872814,0.0898645161290322,0.0819352941176471},
-{2989459,3872900,3872814,1000000,0.0621461538461538},
-{2989460,3872961,3872900,1000000,0.0264},
-{2989461,3873047,3872911,0.321504,0.26792},
-{2989462,3873047,3872834,0.306949090909091,0.312633333333333},
-{2989463,3869047,3869010,1000000,0.0422896551724138},
-{2989464,3872022,3872044,1000000,0.022815},
-{2989465,3872052,3872045,1000000,0.0139317073170732},
-{2989466,3872440,3872529,0.0469058823529412,0.0469058823529412},
-{2989467,3865245,3865118,1000000,0.050725},
-{2989468,3864768,3864874,1000000,0.0790285714285714},
-{2989469,3864874,3864714,0.0730666666666667,1000000},
-{2989470,3865267,3865118,1000000,0.0466258064516129},
-{2989471,3865267,3865245,0.0365351351351351,1000000},
-{2989472,3865245,3865256,0.0131513513513513,1000000},
-{2989473,3865280,3865256,1000000,0.0125846153846154},
-{2989474,3865280,3865311,1000000,0.0141428571428571},
-{2989475,3865375,3865267,1000000,0.03658},
-{2989476,3864714,3864626,0.04356,1000000},
-{2989477,3864708,3864626,1000000,0.0243243243243243},
-{2989478,3864768,3864714,0.103835294117647,0.103835294117647},
-{2989479,3865142,3865100,0.0596869565217391,0.0584170212765957},
-{2989480,3865142,3865226,0.0381176470588235,0.0381176470588235},
-{2989481,3865100,3865181,0.0387176470588235,0.0387176470588235},
-{2989482,3871122,3870759,1000000,0.143256},
-{2989483,3870832,3871064,0.233566666666667,1000000},
-{2989484,3871420,3871221,1000000,0.398275},
-{2989485,3871221,3871064,1000000,0.0775363636363636},
-{2989486,3872708,3872711,1000000,0.0191684210526316},
-{2989487,3872053,3872040,0.0505,1000000},
-{2989488,3872166,3872040,0.0595,1000000},
-{2989489,3872613,3872708,1000000,0.013863829787234},
-{2989490,3872618,3872711,0.0142826086956522,1000000},
-{2989491,3872613,3872618,0.02372,1000000},
-{2989492,3872292,3872335,0.0637928571428571,1000000},
-{2989493,3872335,3872346,0.0146545454545455,1000000},
-{2989494,3868695,3868738,0.0388285714285714,0.0247090909090909},
-{2989495,3866321,3866360,1000000,0.025425},
-{2989496,3866390,3866436,0.039096,1000000},
-{2989497,3866360,3866436,1000000,0.0246692307692308},
-{2989498,3866321,3866390,0.0285913043478261,1000000},
-{2989499,3866112,3866365,0.1722,1000000},
-{2989500,3866560,3866365,0.1073,1000000},
-{2989501,3861454,3861315,0.089875,0.0980454545454546},
-{2989502,3866943,3865773,0.287533333333333,1000000},
-{2989503,3865818,3865773,0.0250846153846154,0.0362333333333333},
-{2989504,3867093,3866943,0.0425285714285714,1000000},
-{2989505,3866966,3866943,0.0349826086956522,0.0447},
-{2989506,3867146,3867093,1000000,0.0426333333333333},
-{2989507,3867644,3867633,0.0438333333333333,1000000},
-{2989508,3868264,3867633,0.163116279069767,1000000},
-{2989509,3869149,3868264,0.232186363636364,1000000},
-{2989510,3869149,3869169,0.03222,0.0339157894736842},
-{2989511,3868278,3868264,0.0387666666666667,0.0303391304347826},
-{2989512,3869896,3869825,0.029625,0.0374210526315789},
-{2989513,3869762,3869900,0.446304545454546,1000000},
-{2989514,3868439,3867244,0.259473913043478,1000000},
-{2989515,3868428,3867226,1000000,0.238632},
-{2989516,3868439,3868428,0.0469125,0.0469125},
-{2989517,3869694,3869613,0.0230689655172414,1000000},
-{2989518,3869693,3869608,1000000,0.0257777777777778},
-{2989519,3867244,3867226,0.0344181818181818,0.0236625},
-{2989520,3866305,3866294,0.0269538461538462,0.0333714285714286},
-{2989521,3869608,3869604,0.123405882352941,1000000},
-{2989522,3869613,3869608,0.0237103448275862,1000000},
-{2989523,3869694,3869693,1000000,0.0238},
-{2989524,3870327,3870692,1000000,0.0714765957446809},
-{2989525,3872140,3870692,0.271065306122449,1000000},
-{2989526,3872140,3872127,0.03474,0.0302086956521739},
-{2989527,3872127,3872987,0.173234042553191,1000000},
-{2989528,3864915,3864949,0.0606620689655172,0.0418857142857143},
-{2989529,3865103,3864915,0.102138461538462,1000000},
-{2989530,3873001,3872987,0.0316090909090909,0.0198685714285714},
-{2989531,3873861,3874068,1000000,0.1209},
-{2989532,3873861,3873852,1000000,0.02385},
-{2989533,3874063,3874498,0.10995652173913,1000000},
-{2989534,3874068,3874063,0.021951724137931,0.0454714285714286},
-{2989535,3874498,3875185,0.161816326530612,1000000},
-{2989536,3874508,3874498,0.0346105263157895,0.04384},
-{2989537,3878386,3878438,1000000,0.0643384615384615},
-{2989538,3878288,3878386,1000000,0.0754928571428571},
-{2989539,3878353,3878418,1000000,0.0114276923076923},
-{2989540,3878350,3878414,0.0120491803278689,1000000},
-{2989541,3878406,3878404,1000000,0.0889384615384615},
-{2989542,3878404,3878395,1000000,0.197907692307692},
-{2989543,3878347,3878395,0.022536,0.022536},
-{2989544,3878395,3878375,1000000,0.235524},
-{2989545,3878320,3878297,0.0673071428571429,1000000},
-{2989546,3878320,3878371,0.03735,0.0249},
-{2989547,3880568,3880746,1000000,0.05598},
-{2989548,3880625,3880568,1000000,0.0429},
-{2989549,3882522,3882548,0.0347333333333333,0.0302516129032258},
-{2989550,3882766,3882752,1000000,0.137708571428571},
-{2989551,3882752,3882724,0.1768,1000000},
-{2989552,3882724,3882712,0.0189529411764706,1000000},
-{2989553,3882766,3882724,0.0624,1000000},
-{2989554,3882636,3882656,0.0674903225806451,1000000},
-{2989555,3878232,3878138,0.186623529411765,1000000},
-{2989556,3878278,3878209,1000000,0.170689285714286},
-{2989557,3878138,3878079,0.211034482758621,1000000},
-{2989558,3878209,3878162,1000000,0.121141176470588},
-{2989559,3875200,3875185,0.0289304347826087,0.0369666666666667},
-{2989560,3876805,3877580,1000000,0.19119512195122},
-{2989561,3876793,3877560,0.180418604651163,1000000},
-{2989562,3878079,3878162,1000000,0.0289384615384615},
-{2989563,3878066,3878150,0.0255310344827586,1000000},
-{2989564,3878232,3878278,0.0213214285714286,0.0314210526315789},
-{2989565,3878138,3878209,0.0213705882352941,0.04844},
-{2989566,3877580,3877560,0.0353142857142857,0.0412},
-{2989567,3876805,3876793,0.0237677419354839,0.0320347826086956},
-{2989568,3878150,3878346,0.0797586206896552,1000000},
-{2989569,3878162,3878346,1000000,0.303225},
-{2989570,3875312,3875257,0.0383454545454546,0.0496235294117647},
-{2989571,3875124,3875078,0.05365,0.0247615384615385},
-{2989572,3875035,3874980,0.0332285714285714,0.0387666666666667},
-{2989573,3874433,3874514,0.0386307692307692,0.0478285714285714},
-{2989574,3874069,3873923,0.158478260869565,1000000},
-{2989575,3874000,3873923,0.0334222222222222,0.0243891891891892},
-{2989576,3873781,3873861,1000000,0.0333},
-{2989577,3873763,3873852,0.0393,1000000},
-{2989578,3873781,3873763,0.0262846153846154,1000000},
-{2989579,3876231,3875677,1000000,0.564611538461538},
-{2989580,3876178,3875580,0.545055555555556,1000000},
-{2989581,3875580,3875677,0.0514571428571429,0.0514571428571429},
-{2989582,3875305,3875415,0.0496344827586207,0.0685428571428571},
-{2989583,3873445,3873221,0.203413333333333,1000000},
-{2989584,3873221,3873314,0.0336222222222222,0.0336222222222222},
-{2989585,3872746,3872863,0.0230533333333333,0.0280378378378378},
-{2989586,3872648,3872550,0.0312923076923077,0.0428210526315789},
-{2989587,3872648,3872328,1000000,0.275795454545455},
-{2989588,3872328,3872227,0.0382384615384615,0.0552333333333333},
-{2989589,3872227,3872071,0.240424390243902,1000000},
-{2989590,3872071,3871913,0.258028571428571,0.12315},
-{2989591,3877943,3878017,0.04788,0.04788},
-{2989592,3877812,3877888,0.044175,0.04712},
-{2989593,3877681,3877765,0.04011,0.05348},
-{2989594,3877765,3877701,1000000,0.0893020408163265},
-{2989595,3877681,3877628,0.0697967213114754,1000000},
-{2989596,3877577,3877464,1000000,0.0835838709677419},
-{2989597,3877701,3877628,0.0426,0.0497},
-{2989598,3877628,3877474,0.124877419354839,1000000},
-{2989599,3877701,3877577,1000000,0.131125423728814},
-{2989600,3877474,3877363,0.0820571428571429,1000000},
-{2989601,3877363,3877464,0.0220714285714286,0.0220714285714286},
-{2989602,3877004,3876916,0.0518333333333333,0.0444285714285714},
-{2989603,3877004,3876858,1000000,0.0486654545454545},
-{2989604,3876916,3876804,0.0340631578947368,1000000},
-{2989605,3876858,3876804,0.0408,0.07072},
-{2989606,3875869,3875828,0.02945625,0.02945625},
-{2989607,3875217,3875278,1000000,0.03875},
-{2989608,3875180,3875110,0.05732,0.05732},
-{2989609,3875180,3875164,1000000,0.06644},
-{2989610,3875110,3875093,0.0635714285714286,1000000},
-{2989611,3875093,3875164,0.05492,0.04119},
-{2989612,3875093,3875089,0.051196875,1000000},
-{2989613,3875164,3875150,1000000,0.05554},
-{2989614,3875150,3875089,0.0150117647058824,0.0150117647058824},
-{2989615,3875150,3875125,1000000,0.09183},
-{2989616,3875089,3875066,0.0872190476190476,1000000},
-{2989617,3875125,3875066,0.0191052631578947,0.03025},
-{2989618,3874999,3875076,0.0414,0.0462705882352941},
-{2989619,3874936,3874888,0.0337636363636364,0.0337636363636364},
-{2989620,3869677,3869649,1000000,0.220902127659574},
-{2989621,3869649,3869580,0.040275,0.0280173913043478},
-{2989622,3869649,3869635,1000000,0.0878884615384615},
-{2989623,3869635,3869574,0.037875,0.0432857142857143},
-{2989624,3869612,3869540,0.03063,0.03063},
-{2989625,3869612,3869568,1000000,0.0945169811320755},
-{2989626,3869568,3869576,0.0103125,0.00951923076923077},
-{2989627,3879420,3879017,0.120306976744186,1000000},
-{2989628,3875332,3875449,0.160947169811321,0.160947169811321},
-{2989629,3875449,3875462,0.00606666666666667,0.00606666666666667},
-{2989630,3875650,3875663,0.0147931034482759,0.01340625},
-{2989631,3875650,3875989,0.0945733333333333,1000000},
-{2989632,3878360,3878583,0.163571428571429,1000000},
-{2989633,3877324,3877216,0.16236,1000000},
-{2989634,3877216,3876915,0.1638,0.2268},
-{2989635,3879400,3879348,0.0217135135135135,1000000},
-{2989636,3879348,3878938,0.19130625,1000000},
-{2989637,3878930,3879348,1000000,0.140329411764706},
-{2989638,3879348,3879473,1000000,0.039555},
-{2989639,3878339,3878497,1000000,0.215325},
-{2989640,3878881,3878930,1000000,0.0236045454545455},
-{2989641,3878497,3878530,1000000,0.0157153846153846},
-{2989642,3879871,3879815,0.0314341463414634,1000000},
-{2989643,3879829,3879815,1000000,0.0252},
-{2989644,3881085,3881042,0.00921176470588235,1000000},
-{2989645,3881085,3881088,0.0111219512195122,1000000},
-{2989646,3881088,3881106,0.00993488372093023,1000000},
-{2989647,3880001,3879766,0.11075,1000000},
-{2989648,3879924,3879824,0.2469,0.2469},
-{2989649,3879174,3879011,1000000,0.0803111111111111},
-{2989650,3875549,3875729,0.278014285714286,0.169226086956522},
-{2989651,3875729,3875769,0.0504,0.0296470588235294},
-{2989652,3875769,3875890,0.114490909090909,1000000},
-{2989653,3875769,3875804,1000000,0.11672},
-{2989654,3875797,3875804,0.0432,1000000},
-{2989655,3875804,3875890,0.0579913043478261,1000000},
-{2989656,3875890,3875981,0.111814285714286,1000000},
-{2989657,3875797,3875981,0.0964285714285714,1000000},
-{2989658,3875935,3876072,0.15372,0.13251724137931},
-{2989659,3875935,3876158,1000000,1000000},
-{2989660,3876047,3876158,0.0632571428571428,1000000},
-{2989661,3876158,3876222,0.0311142857142857,1000000},
-{2989662,3876222,3876368,0.0683478260869565,1000000},
-{2989663,3876047,3876135,0.0906260869565217,1000000},
-{2989664,3876135,3876368,1000000,0.105046153846154},
-{2989665,3875740,3875352,0.182295652173913,0.322523076923077},
-{2989666,3875687,3875582,1000000,0.0536068965517241},
-{2989667,3875687,3875797,0.131554838709677,1000000},
-{2989668,3877875,3877739,0.5628,1000000},
-{2989669,3876422,3876852,1000000,0.195782608695652},
-{2989670,3874890,3874960,0.05955,0.0529333333333333},
-{2989671,3875800,3876053,1000000,0.167192307692308},
-{2989672,3875800,3876055,0.14865,0.110111111111111},
-{2989673,3876053,3876041,0.224193103448276,0.2322},
-{2989674,3876105,3876137,0.059075,1000000},
-{2989675,3876216,3876105,0.104628571428571,1000000},
-{2989676,3876398,3876216,0.0912857142857143,1000000},
-{2989677,3877782,3877654,0.089825,0.0937304347826087},
-{2989678,3877782,3877988,0.14084,0.0960272727272727},
-{2989679,3877398,3877654,0.07792,0.0899076923076923},
-{2989680,3877962,3877906,0.25875,1000000},
-{2989681,3878088,3877988,0.25596,1000000},
-{2989682,3879140,3879220,0.0925,1000000},
-{2989683,3879220,3879376,0.0903111111111111,1000000},
-{2989684,3879147,3879376,1000000,0.111025},
-{2989685,3879220,3879147,0.0816947368421053,0.0674869565217391},
-{2989686,3875264,3875324,1000000,0.348138461538462},
-{2989687,3875559,3875264,0.157513043478261,0.172514285714286},
-{2989688,3875324,3875622,0.23076,0.23076},
-{2989689,3875324,3875387,1000000,0.236530434782609},
-{2989690,3875387,3875748,1000000,1000000},
-{2989691,3875387,3875476,1000000,0.276457142857143},
-{2989692,3875476,3875560,1000000,1000000},
-{2989693,3875476,3875848,1000000,1000000},
-{2989694,3876145,3876475,1000000,0.135161538461538},
-{2989695,3876041,3876458,0.167577777777778,0.180984},
-{2989696,3877242,3877268,1000000,0.0145846153846154},
-{2989697,3877268,3877289,1000000,0.012425},
-{2989698,3877860,3877876,0.0171461538461538,1000000},
-{2989699,3877876,3877893,0.0110689655172414,1000000},
-{2989700,3877860,3878389,0.148671428571429,1000000},
-{2989701,3880021,3880204,0.180933333333333,0.116314285714286},
-{2989702,3880451,3880676,0.286753846153846,1000000},
-{2989703,3881781,3881830,0.0384818181818182,1000000},
-{2989704,3880994,3880948,1000000,0.0350086956521739},
-{2989705,3882107,3881781,1000000,0.197458064516129},
-{2989706,3882107,3882152,1000000,0.06595},
-{2989707,3882396,3882358,1000000,0.0441176470588235},
-{2989708,3882422,3882396,1000000,0.158957142857143},
-{2989709,3882152,3882317,1000000,0.119775},
-{2989710,3882881,3882358,1000000,0.2494},
-{2989711,3882422,3882714,0.220989473684211,1000000},
-{2989712,3882317,3882598,1000000,0.327342857142857},
-{2989713,3883362,3882714,0.52308,1000000},
-{2989714,3882650,3882598,0.0446086956521739,1000000},
-{2989715,3882714,3883077,0.253336363636364,1000000},
-{2989716,3882598,3882971,1000000,0.246469565217391},
-{2989717,3883373,3883077,1000000,0.180312},
-{2989718,3883025,3882971,1000000,0.051},
-{2989719,3883077,3883462,0.206777777777778,1000000},
-{2989720,3882971,3883356,1000000,0.18252},
-{2989721,3883765,3883462,0.3103125,1000000},
-{2989722,3883413,3883356,0.0495714285714286,1000000},
-{2989723,3883356,3883778,1000000,0.42888},
-{2989724,3883462,3883905,0.32955,1000000},
-{2989725,3883905,3884245,0.242657142857143,1000000},
-{2989726,3883778,3884144,1000000,0.370842857142857},
-{2989727,3884606,3883905,0.47375,0.334411764705882},
-{2989728,3883835,3883778,0.03984,0.0415},
-{2989729,3884245,3884641,0.1903875,1000000},
-{2989730,3884144,3884512,1000000,0.207707142857143},
-{2989731,3884557,3884245,1000000,0.236290909090909},
-{2989732,3884184,3884144,1000000,0.0531157894736842},
-{2989733,3884641,3884892,0.173,1000000},
-{2989734,3884512,3884772,1000000,0.202610526315789},
-{2989735,3885031,3884641,0.281842105263158,1000000},
-{2989736,3884559,3884512,0.0419727272727273,1000000},
-{2989737,3884892,3885258,0.2642,1000000},
-{2989738,3884867,3884772,0.29484,1000000},
-{2989739,3885208,3886017,1000000,0.427355555555556},
-{2989740,3885339,3886128,0.405492857142857,1000000},
-{2989741,3885208,3884867,0.2357625,1000000},
-{2989742,3885339,3885287,0.061275,1000000},
-{2989743,3886128,3886701,0.369392307692308,1000000},
-{2989744,3886017,3886598,1000000,0.352933333333333},
-{2989745,3886376,3886128,0.240566666666667,1000000},
-{2989746,3886073,3886017,0.0325862068965517,1000000},
-{2989747,3886701,3887339,0.378333333333333,1000000},
-{2989748,3886598,3887221,1000000,0.379844444444444},
-{2989749,3886598,3886270,1000000,0.255975},
-{2989750,3886701,3886651,0.0297090909090909,0.0445636363636364},
-{2989751,3887691,3887339,0.253057142857143,1000000},
-{2989752,3887278,3887221,0.0510631578947368,0.03465},
-{2989753,3885992,3885965,1000000,1000000},
-{2989754,3885460,3885922,1000000,0.187429411764706},
-{2989755,3886403,3886778,0.185345454545455,1000000},
-{2989756,3886705,3886448,0.274733333333333,0.149854545454545},
-{2989757,3886812,3886705,0.433382608695652,1000000},
-{2989758,3882425,3882469,1000000,1000000},
-{2989759,3883181,3882881,1000000,0.226121739130435},
-{2989760,3883866,3883181,1000000,0.3412},
-{2989761,3884487,3883866,1000000,0.295389473684211},
-{2989762,3883866,3883924,0.0438947368421053,1000000},
-{2989763,3884097,3884487,1000000,0.217384615384615},
-{2989764,3885098,3885070,1000000,0.0352181818181818},
-{2989765,3885070,3885127,0.0424909090909091,1000000},
-{2989766,3884942,3885098,0.119169230769231,1000000},
-{2989767,3884942,3885070,0.0889,1000000},
-{2989768,3885253,3885098,1000000,0.269325},
-{2989769,3885108,3885248,0.04952,1000000},
-{2989770,3885345,3885638,1000000,0.0962914285714286},
-{2989771,3885253,3885251,0.0101351351351351,1000000},
-{2989772,3885251,3885248,0.0109459459459459,1000000},
-{2989773,3885345,3885357,1000000,0.00764210526315789},
-{2989774,3885357,3885372,1000000,0.0115459459459459},
-{2989775,3885242,3885320,0.0669,1000000},
-{2989776,3885320,3885488,0.468153846153846,1000000},
-{2989777,3884950,3885051,0.2563,0.320375},
-{2989778,3884991,3885038,0.0230526315789474,1000000},
-{2989779,3884935,3885488,1000000,0.280742857142857},
-{2989780,3885488,3885501,0.108874285714286,1000000},
-{2989781,3885501,3885487,0.083475,1000000},
-{2989782,3885487,3885457,0.120628571428571,1000000},
-{2989783,3885457,3885376,0.2004,1000000},
-{2989784,3885171,3885376,0.182890909090909,1000000},
-{2989785,3885291,3885383,0.0239294117647059,0.0262451612903226},
-{2989786,3885187,3885237,0.0249,1000000},
-{2989787,3884540,3884198,1000000,0.3451},
-{2989788,3884339,3884540,1000000,0.188176744186047},
-{2989789,3884339,3884398,1000000,0.0310965517241379},
-{2989790,3884401,3884531,0.128021739130435,0.128021739130435},
-{2989791,3884370,3884404,1000000,0.03756},
-{2989792,3884227,3884370,1000000,0.0540142857142857},
-{2989793,3884227,3884258,0.0356432432432432,1000000},
-{2989794,3884148,3884258,0.0376857142857143,1000000},
-{2989795,3884107,3884227,1000000,0.0351},
-{2989796,3883280,3883321,0.0268846153846154,0.0258888888888889},
-{2989797,3882431,3882727,0.0913375,0.0996409090909091},
-{2989798,3881114,3881183,0.0266666666666667,0.0282352941176471},
-{2989799,3880892,3880883,1000000,0.12648},
-{2989800,3875718,3875902,0.34734375,1000000},
-{2989801,3875896,3875827,1000000,0.0492947368421053},
-{2989802,3875827,3875977,1000000,0.164},
-{2989803,3876031,3875977,0.0470117647058824,1000000},
-{2989804,3875977,3876352,1000000,0.232773333333333},
-{2989805,3876420,3876352,1000000,0.0399714285714286},
-{2989806,3876533,3876488,1000000,1000000},
-{2989807,3889033,3889241,0.0560108108108108,1000000},
-{2989808,3889370,3889345,0.00944081632653061,0.00889615384615385},
-{2989809,3889389,3889370,0.0349125,1000000},
-{2989810,3889389,3889531,0.044055,1000000},
-{2989811,3891275,3891411,0.0338478260869565,1000000},
-{2989812,3891275,3891287,0.06625,1000000},
-{2989813,3892441,3892432,1000000,1000000},
-{2989814,3894155,3894157,0.08562,1000000},
-{2989815,3896024,3896146,1000000,0.0797454545454545},
-{2989816,3897504,3897316,0.0585538461538462,1000000},
-{2989817,3897504,3897487,0.01848,1000000},
-{2989818,3897487,3897482,0.0142090909090909,1000000},
-{2989819,3897523,3897557,0.0382,1000000},
-{2989820,3897557,3897605,0.0457384615384615,1000000},
-{2989821,3897520,3897523,1000000,0.0198923076923077},
-{2989822,3897588,3897615,0.0568909090909091,1000000},
-{2989823,3897615,3897605,0.01002,1000000},
-{2989824,3897552,3897572,0.0171,1000000},
-{2989825,3897414,3897552,1000000,0.0380936170212766},
-{2989826,3897552,3897579,1000000,0.00669333333333333},
-{2989827,3898991,3899009,1000000,0.0159483870967742},
-{2989828,3899009,3899016,1000000,0.00982758620689655},
-{2989829,3899638,3899772,1000000,0.0398769230769231},
-{2989830,3899772,3899880,1000000,0.0415935483870968},
-{2989831,3899791,3899853,0.0231483870967742,1000000},
-{2989832,3899853,3899891,0.0161294117647059,1000000},
-{2989833,3899880,3900011,1000000,0.057432},
-{2989834,3899891,3900030,0.03873,1000000},
-{2989835,3899791,3899780,1000000,0.0113560975609756},
-{2989836,3899780,3899772,1000000,0.0115609756097561},
-{2989837,3899891,3899885,0.0117257142857143,1000000},
-{2989838,3899885,3899880,0.0122571428571429,1000000},
-{2989839,3900008,3899937,0.06676,1000000},
-{2989840,3899937,3899888,0.0294,1000000},
-{2989841,3902495,3902709,1000000,0.134228571428571},
-{2989842,3902375,3902468,1000000,0.0214536585365854},
-{2989843,3902468,3902693,1000000,0.0601894736842105},
-{2989844,3903541,3904021,1000000,0.108832653061224},
-{2989845,3903554,3904040,0.0944631578947368,1000000},
-{2989846,3903554,3903547,1000000,0.0204},
-{2989847,3903547,3903541,1000000,0.0200571428571429},
-{2989848,3904040,3904029,0.0210461538461538,1000000},
-{2989849,3904029,3904021,0.0296571428571429,1000000},
-{2989867,3871954,3872002,0.0500888888888889,1000000},
-{2989868,3872032,3872086,1000000,0.0507555555555556},
-{2990009,3895024,3895226,0.18065,0.333507692307692},
-{2990010,3898324,3898464,0.08019,0.0486},
-{2990011,3898896,3898324,1000000,0.233139622641509},
-{2990012,3899273,3898896,1000000,0.183117647058824},
-{2990013,3899542,3899273,1000000,0.237308571428571},
-{2990014,3900158,3900222,0.0283111111111111,0.0347454545454545},
-{2990015,3900222,3900296,0.0266785714285714,0.0393157894736842},
-{2990016,3900047,3900046,0.0389125,1000000},
-{2990017,3898771,3899912,0.595527272727273,0.297763636363636},
-{2990018,3900132,3900232,0.0277170731707317,0.0598105263157895},
-{2990019,3899972,3899622,0.145088888888889,0.145088888888889},
-{2990020,3899557,3899616,0.0382434782608696,0.0274875},
-{2990021,3899616,3899683,0.0254222222222222,0.0245142857142857},
-{2990022,3897969,3898042,0.03325,0.0306923076923077},
-{2990023,3898042,3898090,0.0168967741935484,0.021825},
-{2990024,3896841,3896791,0.0281714285714286,0.0219111111111111},
-{2990025,3896791,3896752,0.021696,0.0258285714285714},
-{2990026,3896401,3896289,0.0630692307692308,1000000},
-{2990027,3896152,3896322,0.0905142857142857,1000000},
-{2990028,3896323,3896322,1000000,1000000},
-{2990029,3896323,3896390,1000000,1000000},
-{2990030,3887179,3887450,1000000,0.124684615384615},
-{2990031,3894469,3894585,1000000,0.0327206896551724},
-{2990032,3893688,3893705,0.0154758620689655,1000000},
-{2990033,3892950,3892988,0.022725,1000000},
-{2990034,3892988,3893049,0.0301111111111111,1000000},
-{2990035,3892849,3892884,1000000,0.0146615384615385},
-{2990036,3892884,3892945,1000000,0.0204529411764706},
-{2990037,3900383,3900041,1000000,0.280326315789474},
-{2990038,3900506,3900528,1000000,0.0101833333333333},
-{2990039,3900528,3900565,1000000,0.02023125},
-{2990040,3900597,3900628,0.00962790697674419,1000000},
-{2990041,3900628,3900670,0.0134266666666667,1000000},
-{2990042,3900846,3900780,0.02505,0.0159409090909091},
-{2990043,3903129,3903121,0.092525,0.158614285714286},
-{2990044,3903273,3903121,1000000,0.14812},
-{2990045,3903129,3903273,0.0310758620689655,1000000},
-{2990046,3903122,3903133,1000000,0.023808},
-{2990047,3903133,3903129,1000000,0.0164086956521739},
-{2990048,3906691,3905679,1000000,0.408825},
-{2990049,3905679,3905192,0.252542857142857,0.279126315789474},
-{2990050,3905370,3905610,0.0425333333333333,1000000},
-{2990051,3905311,3905610,1000000,0.0604909090909091},
-{2990052,3905311,3905750,1000000,0.0861934426229508},
-{2990053,3906805,3906761,1000000,0.0272},
-{2990054,3906761,3906700,1000000,0.029352},
-{2990055,3906986,3906877,1000000,0.11754},
-{2990056,3907184,3907451,1000000,0.129288888888889},
-{2990057,3906805,3906913,1000000,0.0265375},
-{2990058,3906877,3907016,0.0340897959183673,1000000},
-{2990059,3907074,3906691,1000000,0.203933333333333},
-{2990060,3908136,3908257,0.028932,1000000},
-{2990061,3908123,3908136,1000000,0.0335571428571429},
-{2990062,3908136,3908130,1000000,0.0586},
-{2990063,3908257,3908441,0.0384734693877551,1000000},
-{2990070,3898604,3898746,0.06875,0.0515625},
-{2990071,3898223,3898604,1000000,0.160552941176471},
-{2990072,3898346,3898604,0.187296,1000000},
-{2990073,3898223,3898346,1000000,0.108294736842105},
-{2990074,3898260,3898413,0.0919772727272727,1000000},
-{2990075,3898346,3898458,1000000,0.0747191489361702},
-{2990076,3898482,3898458,0.01635,0.012658064516129},
-{2990077,3899517,3900103,0.176805882352941,1000000},
-{2990078,3902545,3902475,0.042672,1000000},
-{2990079,3902475,3902535,0.040224,1000000},
-{2990080,3902535,3902614,0.0401769230769231,1000000},
-{2990081,3902614,3902545,0.0413,1000000},
-{2990082,3901057,3901416,1000000,0.1494375},
-{2990083,3901057,3901351,1000000,0.112605633802817},
-{2990084,3901956,3901933,0.135707142857143,1000000},
-{2990085,3901933,3902021,0.2344875,1000000},
-{2990086,3894748,3894906,0.11094,1000000},
-{2990087,3894890,3894748,0.113541176470588,1000000},
-{2990088,3893726,3894476,0.272257894736842,0.32330625},
-{2990089,3893322,3893266,0.01686,0.01686},
-{2990090,3894912,3894956,0.0198222222222222,1000000},
-{2990091,3896174,3896190,1000000,0.01074},
-{2990092,3896986,3897045,0.0282166666666667,1000000},
-{2990093,3896190,3896743,0.170729577464789,0.173168571428571},
-{2990094,3896743,3896755,0.00466285714285714,0.0048},
-{2990095,3896695,3896829,0.0807692307692308,1000000},
-{2990097,3881704,3881424,0.0860181818181818,1000000},
-{2990098,3881333,3881424,0.22388,1000000},
-{2990119,3874535,3874483,0.0924222222222222,0.0924222222222222},
-{2990151,3851453,3851305,0.0684230769230769,0.0936315789473684},
-{2990152,3852205,3851527,0.22014,0.22014},
-{2990155,3915657,3915615,1000000,0.0495642857142857},
-{2990156,3915721,3915752,1000000,0.0463846153846154},
-{2990157,3915752,3915657,1000000,0.0465214285714286},
-{2990158,3914399,3915404,1000000,0.215391666666667},
-{2990171,3881156,3880474,1.04592,1.04592},
-{2990172,3881156,3881472,0.50532,0.50532},
-{2990173,3881362,3881176,1000000,0.145778571428571},
-{2990174,3881530,3881472,0.11082,0.11082},
-{2990175,3881616,3881800,0.2103,0.2103},
-{2990176,3881472,3881564,0.04911,0.0377769230769231},
-{2990177,3881564,3881362,0.329184,0.27432},
-{2990178,3881564,3881800,0.0646641509433962,0.0646641509433962},
-{2990179,3891581,3892152,1000000,0.392838461538462},
-{2990180,3891581,3891579,0.188536363636364,1000000},
-{2990181,3891581,3891196,0.30198,0.30198},
-{2990182,3890431,3891196,0.472527272727273,0.577533333333333},
-{2990183,3890431,3890267,0.23118,0.110085714285714},
-{2990185,3872006,3871483,0.174046153846154,1000000},
-{2990186,3871483,3871398,0.0244071428571429,1000000},
-{2990187,3875943,3875777,0.0610775510204082,1000000},
-{2990188,3875891,3875487,1000000,1000000},
-{2990189,3875943,3875891,1000000,1000000},
-{2990192,3855370,3855491,0.101929411764706,0.1444},
-{2990193,3855208,3855180,0.0287368421052632,0.0287368421052632},
-{2990194,3856798,3856758,0.0256090909090909,0.0216692307692308},
-{2990195,3856271,3856232,0.033,1000000},
-{2990196,3857327,3857350,0.0175428571428571,0.0160173913043478},
-{2990197,3856069,3856027,0.0138153846153846,0.0141789473684211},
-{2990198,3867861,3867639,1000000,0.08182},
-{2990199,3867639,3867585,1000000,0.0456857142857143},
-{2990200,3880641,3880554,0.16195,0.138814285714286},
-{2990201,3879801,3880554,0.375511111111111,0.405552},
-{2990202,3879676,3879801,1000000,0.12405},
-{2990203,3880796,3879613,0.747248275862069,0.833469230769231},
-{2990204,3882116,3882529,0.340033846153846,0.334881818181818},
-{2990205,3882529,3882541,0.0308275862068966,0.0288387096774194},
-{2990206,3881243,3880796,1000000,1000000},
-{2990207,3872513,3872275,0.425127272727273,1000000},
-{2990208,3917578,3917655,1000000,0.0375857142857143},
-{2990209,3877765,3878656,0.3504,0.3504},
-{2990210,3878656,3880024,1.57264444444444,1.57264444444444},
-{2990211,3878145,3878105,0.0346064516129032,1000000},
-{2990212,3878214,3878145,0.03045,1000000},
-{2990213,3878179,3877969,1000000,0.16051914893617},
-{2990214,3878179,3878105,1000000,0.0311},
-{2990215,3877822,3877530,0.233421428571429,1000000},
-{2990216,3877623,3877530,0.06285,1000000},
-{2990217,3882358,3882221,1000000,0.0628628571428571},
-{2990218,3882396,3882280,0.07272,1000000},
-{2990219,3882280,3882379,0.0482615384615385,0.0553588235294118},
-{2990220,3882221,3882280,0.0220628571428571,0.02145},
-{2990221,3865391,3865408,1000000,0.0099},
-{2990222,3865444,3865416,1000000,0.01364},
-{2990223,3865416,3865392,1000000,0.0127285714285714},
-{2990224,3865391,3865416,1000000,0.0113318181818182},
-{2990225,3865489,3865491,1000000,0.0081},
-{2990226,3865491,3865497,1000000,0.0240714285714286},
-{2990227,3865416,3865491,1000000,0.0377692307692308},
-{2990228,3865491,3865536,1000000,0.0255085714285714},
-{2990229,3864562,3863590,1.15272857142857,0.896566666666667},
-{2990230,3864562,3864362,0.1172,0.1172},
-{2990231,3865180,3865313,0.1103,0.1103},
-{2990232,3865189,3865180,0.276177777777778,0.276177777777778},
-{2990233,3865180,3865149,0.230425,0.230425},
-{2990234,3872621,3872716,0.0366,1000000},
-{2990235,3881042,3881073,0.0290571428571429,0.00904},
-{2990237,3871461,3871272,0.0952444444444444,0.0952444444444444},
-{2990245,3884148,3884221,0.145844444444444,0.187514285714286},
-{2990246,3883779,3884221,0.3136,0.3136},
-{2990249,3874848,3874768,0.0297724137931034,0.035975},
-{2990250,3874390,3874470,0.038225,0.038225},
-{2990251,3874033,3874390,1000000,0.42152380952381},
-{2990252,3874033,3874110,0.05325,0.05325},
-{2990253,3873988,3874033,1000000,0.326689655172414},
-{2990254,3873988,3874058,0.0498315789473684,0.059175},
-{2990255,3873998,3874067,0.0346615384615385,0.0321857142857143},
-{2990256,3874351,3874393,0.03588,1000000},
-{2990298,3853972,3854095,1000000,0.140894117647059},
-{2990299,3858141,3858104,0.05205,0.0268645161290323},
-{2990300,3858221,3858141,0.1625,0.132954545454545},
-{2990301,3858221,3857984,0.149152941176471,0.120742857142857},
-{2990303,3869071,3868695,1000000,0.214325},
-{2990304,3869139,3869071,1000000,0.04653},
-{2990305,3865974,3865725,0.10314,0.106696551724138},
-{2990306,3864973,3864549,0.317634782608696,0.317634782608696},
-{2990307,3865872,3865952,0.0395111111111111,0.0395111111111111},
-{2990313,3899542,3899450,0.0360375,1000000},
-{2990314,3899542,3899648,1000000,0.0783789473684211},
-{2990315,3899669,3899648,0.0159130434782609,1000000},
-{2990316,3899554,3899542,1000000,0.0167842105263158},
-{2990317,3899678,3899669,0.0144272727272727,1000000},
-{2990318,3899554,3899611,0.0318214285714286,1000000},
-{2990319,3899611,3899669,0.01976,1000000},
-{2990320,3899542,3899611,1000000,0.0333857142857143},
-{2990321,3899611,3899678,1000000,0.028125},
-{2990322,3899554,3899447,1000000,0.0686842105263158},
-{2990323,3899580,3899447,1000000,0.086525},
-{2990324,3898678,3898721,0.0610421052631579,0.0724875},
-{2990325,3898678,3898308,0.155528571428571,0.120966666666667},
-{2990326,3896734,3896864,1000000,0.0738782608695652},
-{2990327,3896799,3896864,0.06148,1000000},
-{2990328,3896744,3896799,0.053856,1000000},
-{2990329,3896799,3896734,0.113492307692308,1000000},
-{2990330,3896701,3896734,1000000,0.1056},
-{2990331,3896644,3896734,1000000,0.05364},
-{2990332,3896644,3896175,0.193089473684211,1000000},
-{2990333,3896601,3896122,0.157289361702128,0.184815},
-{2990334,3896744,3896701,0.0250344827586207,0.0191052631578947},
-{2990335,3896601,3896644,1000000,0.0211588235294118},
-{2990336,3896175,3896122,0.0143433962264151,0.0262137931034483},
-{2990337,3868970,3868738,0.0896129032258064,0.0896129032258064},
-{2990338,3869139,3868970,1000000,1000000},
-{2990342,3881939,3882281,0.1422,0.15642},
-{2990345,3859562,3859531,0.017544,0.0125314285714286},
-{2990346,3859531,3859485,0.04705,0.0342181818181818},
-{2990347,3902196,3902275,0.0169756097560976,1000000},
-{2990358,3895323,3895485,0.0492,1000000},
-{2990359,3895328,3895430,1000000,0.0281875},
-{2990360,3871319,3871404,0.02454,0.0261063829787234},
-{2990367,3851171,3851140,0.019056,0.019056},
-{2990368,3851140,3851048,0.0565153846153846,0.0544222222222222},
-{2990369,3851477,3851226,0.132925,0.187658823529412},
-{2990371,3907801,3907914,0.0888461538461539,0.0888461538461539},
-{2990374,3869839,3869879,1000000,0.141484615384615},
-{2990375,3870117,3870035,1000000,0.079825},
-{2990378,3899102,3899302,1000000,0.04202},
-{2990391,3879131,3879242,1000000,0.0862125},
-{2990392,3879475,3879861,0.326427272727273,0.377968421052632},
-{2990393,3880331,3880422,0.0649555555555555,0.0649555555555555},
-{2990394,3880422,3880571,0.116488888888889,0.116488888888889},
-{2990395,3880881,3880993,0.07385,0.08862},
-{2990396,3881441,3881540,0.07434,0.0550666666666667},
-{2990397,3881824,3881688,1000000,1000000},
-{2990398,3883845,3884413,0.337966666666667,0.289685714285714},
-{2990399,3883975,3884185,0.0846666666666667,1000000},
-{2990400,3884010,3884071,1000000,0.0239111111111111},
-{2990401,3884071,3884185,1000000,0.308333333333333},
-{2990402,3884039,3884115,1000000,0.0278769230769231},
-{2990403,3884115,3884598,1000000,0.183},
-{2990404,3884106,3884655,0.216857142857143,1000000},
-{2990405,3884186,3884680,0.246518181818182,0.216936},
-{2990406,3884715,3884234,0.211176,0.159981818181818},
-{2990407,3884234,3884208,0.01254,0.0078375},
-{2990408,3858386,3858326,0.0826241379310345,0.0904188679245283},
-{2990409,3859873,3859816,0.0879473684210526,0.0618888888888889},
-{2990410,3859816,3859766,0.0610636363636364,0.055975},
-{2990418,3901250,3901306,0.0209307692307692,0.0209307692307692},
-{2990419,3898645,3898677,0.01784,0.0254857142857143},
-{2990420,3904346,3904420,0.042275,0.0563666666666667},
-{2990421,3900862,3900866,0.005240625,0.00588421052631579},
-{2990422,3915583,3915662,0.04132,0.0387375},
-{2990423,3915662,3916477,0.261466666666667,0.231462295081967},
-{2990433,3864642,3865357,0.267705882352941,0.243803571428571},
-{2990434,3866430,3865860,0.421533333333333,0.421533333333333},
-{2990435,3872353,3872667,0.143911111111111,0.24285},
-{2990436,3902521,3902587,0.0331142857142857,0.0434625},
-{2990437,3902587,3902629,0.02451,0.0350142857142857},
-{2990438,3907116,3906840,0.071172972972973,0.065835},
-{2990439,3907488,3907587,0.1082,0.1082},
-{2990440,3907587,3908464,0.605777777777778,0.605777777777778},
-{2990441,3907884,3908052,0.145073684210526,0.153133333333333},
-{2990442,3908052,3908239,0.132933333333333,0.14955},
-{2990443,3905695,3905770,0.0265015384615385,0.0273428571428571},
-{2990447,3907205,3907137,0.01984,1000000},
-{2990448,3894969,3895018,0.025225,1000000},
-{2990449,3894989,3895005,1000000,0.0119},
-{2990450,3895005,3895018,1000000,0.00953142857142857},
-{2990451,3920868,3920950,0.0230425531914894,0.0225625},
-{2990452,3920950,3921863,0.232640816326531,0.227988},
-{2990453,3913529,3913981,0.256685714285714,0.283705263157895},
-{2990457,3911395,3912354,0.4728,0.509169230769231},
-{2990459,3912557,3911859,0.334155555555556,0.334155555555556},
-{2990460,3880854,3880920,0.0192,0.0168},
-{2990470,3907164,3907184,1000000,0.0579},
-{2990472,3907025,3906986,1000000,0.02735},
-{2990473,3907025,3907022,0.0130222222222222,1000000},
-{2990474,3907029,3907025,0.0103615384615385,1000000},
-{2990475,3906913,3907029,1000000,0.027504},
-{2990476,3907164,3907062,1000000,0.0817125},
-{2990477,3907062,3907025,1000000,0.0270923076923077},
-{2990478,3907029,3907062,1000000,0.00611020408163265},
-{2990479,3907062,3907137,1000000,0.0156127659574468},
-{2990486,3869940,3869416,1000000,0.1839},
-{2990487,3864956,3864912,1000000,0.0145714285714286},
-{2990489,3915404,3915500,1000000,0.0212547945205479},
-{2990490,3915513,3915696,0.037648,1000000},
-{2990493,3864936,3865037,0.0889384615384615,1000000},
-{2990494,3865037,3865076,0.021375,1000000},
-{2990496,3894607,3894704,0.0517846153846154,0.0561},
-{2990500,3874902,3875102,1000000,0.08718},
-{2990502,3918160,3918808,0.329472,1000000},
-{2990503,3918808,3918999,0.100211650485437,1000000},
-{2990504,3919068,3918883,0.0957844660194175,1000000},
-{2990505,3873120,3873168,0.0204461538461538,0.0166125},
-{2990507,3870544,3870385,0.0317632653061225,1000000},
-{2990508,3869299,3869116,1000000,0.035988},
-{2990509,3876661,3876443,0.0895914893617021,1000000},
-{2990510,3876443,3875943,0.19785,1000000},
-{2990511,3876661,3876715,1000000,0.0197318181818182},
-{2990512,3907186,3907325,1000000,0.0316838709677419},
-{2990513,3908391,3908543,1000000,0.0266117647058824},
-{2990514,3907280,3907523,0.0462676056338028,1000000},
-{2990515,3907325,3907437,1000000,0.0233809523809524},
-{2990516,3907437,3907573,1000000,0.0326857142857143},
-{2990517,3908287,3908391,1000000,0.0176597014925373},
-{2990518,3907523,3908322,0.150777464788732,1000000},
-{2990519,3908322,3908476,0.0242281690140845,1000000},
-{2990520,3907590,3907573,0.006192,0.00631836734693878},
-{2990521,3867631,3868716,0.321063157894737,1000000},
-{2990522,3868716,3868869,0.0496838709677419,1000000},
-{2990523,3868760,3868851,1000000,0.0303529411764706},
-{2990524,3868851,3869093,1000000,0.0877875},
-{2990525,3921931,3922117,0.0387387096774194,0.0363909090909091},
-{2990526,3865745,3865880,1000000,0.0629692307692308},
-{2990527,3865880,3866595,1000000,0.224342857142857},
-{2990529,3896096,3896156,1000000,0.0257066666666667},
-{2990530,3896156,3896496,1000000,0.17238},
-{2990531,3896578,3896841,0.135677777777778,1000000},
-{2990532,3896841,3897083,0.110775,1000000},
-{2990533,3897083,3897337,0.110357142857143,1000000},
-{2990534,3897337,3897637,0.139673076923077,1000000},
-{2990535,3897637,3897931,0.1356,1000000},
-{2990536,3901933,3902078,0.0362228571428571,1000000},
-{2990537,3902078,3902106,0.00520285714285714,1000000},
-{2990538,3901968,3902138,1000000,0.0393617647058823},
-{2990539,3902138,3902160,1000000,0.00547058823529412},
-{2990548,3902106,3903093,0.19935,1000000},
-{2990549,3903093,3903382,0.0587753424657534,1000000},
-{2990558,3908123,3908284,1000000,0.06944},
-{2990559,3908284,3908441,1000000,0.0666214285714286},
-{2990560,3906761,3907331,0.0960310344827586,0.0960310344827586},
-{2990561,3896047,3896174,1000000,0.0381138461538462},
-{2990562,3896018,3896138,0.0331521126760563,1000000},
-{2990563,3896138,3896190,0.0101666666666667,1000000},
-{2990564,3865415,3865430,1000000,0.03688},
-{2990565,3865005,3865040,1000000,0.0847170731707317},
-{2990566,3865211,3865154,1000000,0.114386666666667},
-{2990567,3865154,3865152,1000000,0.0565173913043478},
-{2990571,3902618,3902462,1000000,0.0464823529411765},
-{2990572,3878770,3879087,1000000,1000000},
-{2990573,3896755,3896773,0.00481714285714286,0.00495882352941177},
-{2990574,3896773,3896794,0.00676285714285714,0.00696176470588235},
-{2990575,3896090,3896091,0.0111724137931034,1000000},
-{2990576,3896152,3896091,1000000,0.04168},
-{2990577,3865251,3865370,0.0536,1000000},
-{2990578,3865497,3865500,1000000,0.01881},
-{2990579,3865499,3865563,0.0192218181818182,0.0199471698113208},
-{2990580,3865408,3865426,1000000,0.0137333333333333},
-{2990581,3865426,3865496,1000000,0.1472625},
-{2990582,3865500,3865426,1000000,0.0207142857142857},
-{2990583,3865372,3865367,1000000,0.00554634146341463},
-{2990584,3865426,3865372,1000000,0.0215675675675676},
-{2990585,3865260,3865319,1000000,0.0228418604651163},
-{2990586,3865319,3865327,1000000,0.00547317073170732},
-{2990587,3865372,3865319,1000000,0.0130727272727273},
-{2990588,3865319,3865293,1000000,0.00778064516129032},
-{2990589,3865265,3865272,1000000,0.00775714285714286},
-{2990590,3865272,3865278,1000000,0.014055},
-{2990591,3865293,3865272,1000000,0.00848571428571429},
-{2990592,3865362,3865392,0.0149414634146341,1000000},
-{2990593,3865362,3865391,1000000,0.0119586206896552},
-{2990594,3865327,3865365,1000000,0.0126439024390244},
-{2990595,3865365,3865391,1000000,0.0122093023255814},
-{2990596,3865367,3865365,1000000,0.00560487804878049},
-{2990597,3865365,3865362,1000000,0.0145105263157895},
-{2990598,3865362,3865355,1000000,0.0289235294117647},
-{2990601,3896322,3896341,1000000,0.114525},
-{2990609,3879251,3879740,0.20174347826087,0.220957142857143},
-{2990610,3879740,3879754,0.00767058823529412,0.00815},
-{2990611,3879799,3879855,0.0354413793103448,1000000},
-{2990616,3902468,3902424,1000000,0.024625},
-{2990617,3902424,3902377,1000000,0.02335},
-{2990618,3902375,3902424,0.0209586206896552,1000000},
-{2990619,3902424,3902462,0.014325,1000000},
-{2990643,3879771,3879815,1000000,0.0211833333333333},
-{2990645,3880333,3880497,1000000,0.0759454545454546},
-{2990646,3881106,3881135,0.0143538461538462,1000000},
-{2990647,3881135,3881469,0.151588235294118,1000000},
-{2990648,3889060,3889459,0.117685714285714,0.12357},
-{2990649,3881175,3881412,0.223540540540541,1000000},
-{2990650,3877242,3877575,0.0839853658536585,1000000},
-{2990651,3877575,3877860,0.0758285714285714,1000000},
-{2990652,3900296,3900136,0.197275471698113,1000000},
-{2990653,3900136,3900008,0.139925,1000000},
-{2990654,3900252,3900250,0.131443636363636,1000000},
-{2990655,3885070,3884747,1000000,0.272892857142857},
-{2990656,3884747,3884487,1000000,0.190581818181818},
-{2990657,3904040,3906426,0.48816,1000000},
-{2990659,3879959,3879682,1000000,0.124516666666667},
-{2990660,3880367,3880329,1000000,0.01640625},
-{2990661,3880329,3880032,1000000,0.148236363636364},
-{2990662,3884455,3884566,1000000,0.0363488372093023},
-{2990663,3884745,3885064,0.11184375,1000000},
-{2990664,3885064,3885108,0.0174387096774194,1000000},
-{2990665,3885188,3885127,0.0769448275862069,1000000},
-{2990666,3865341,3865345,0.0516692307692308,1000000},
-{2990667,3866646,3865827,1000000,0.159502040816326},
-{2990668,3865370,3865376,1000000,0.0337826086956522},
-{2990669,3865376,3865372,1000000,0.021293023255814},
-{2990670,3865334,3865499,0.0697714285714286,0.0737207547169811},
-{2990671,3865518,3866037,1000000,0.263762790697674},
-{2990675,3865152,3865147,1000000,0.0816558139534884},
-{2990676,3865147,3865143,1000000,0.0450473684210526},
-{2990677,3879746,3879803,0.0380454545454545,1000000},
-{2990678,3902777,3902609,1000000,0.0839818181818182},
-{2990679,3903956,3903486,1000000,0.332425},
-{2990680,3903486,3902777,1000000,0.231096},
-{2990693,3899707,3899678,0.0421463414634146,1000000},
-{2990694,3898324,3897666,1000000,0.229716},
-{2990695,3897666,3897215,1000000,0.14446779661017},
-{2990696,3897215,3896258,1000000,0.324894736842105},
-{2990697,3896258,3896128,1000000,0.05275},
-{2990698,3895988,3895580,0.146755555555556,1000000},
-{2990699,3895580,3895024,0.220835294117647,1000000},
-{2990700,3895024,3894419,0.20592,1000000},
-{2990701,3894419,3893890,0.18585,1000000},
-{2990713,3878431,3878807,1000000,0.19932},
-{2990714,3878807,3879279,1000000,0.167135294117647},
-{2990715,3875989,3876854,0.302735294117647,1000000},
-{2990716,3876854,3877242,0.119036842105263,1000000},
-{2990782,3866303,3866962,0.241152,0.262121739130435},
-{2990786,3920209,3919762,0.188360377358491,1000000},
-{2990787,3919762,3919068,0.316965714285714,1000000},
-{2990788,3918999,3919494,0.237102857142857,1000000},
-{2990789,3919808,3920411,0.292965,1000000},
-{2990796,3919855,3919637,0.1200525,1000000},
-{2990826,3881817,3882238,0.0791217391304348,1000000},
-{2990827,3880539,3880747,0.0418615384615385,1000000},
-{2990828,3880747,3882548,0.3396,1000000},
-{2990829,3882659,3882851,1000000,0.0275558823529412},
-{2990830,3882675,3882854,0.0256628571428571,1000000},
-{2990848,3915752,3915866,0.0894774193548387,0.102733333333333},
-{2990849,3915866,3916589,0.276279069767442,0.282857142857143},
-{2990850,3917533,3917885,0.11654347826087,0.119133333333333},
-{2990851,3917885,3918119,0.0808883720930233,0.0828142857142857},
-{2990857,3908448,3908550,0.0216292682926829,0.0197066666666667},
-{2990858,3908550,3909963,0.289152,0.272784905660377},
-{2990859,3873683,3873677,0.123552,0.125221621621622},
-{2990860,3921479,3921931,0.0829475409836066,0.079059375},
-{2990861,3869593,3869856,0.352955555555556,0.352955555555556},
-{2990862,3869856,3870381,0.177377777777778,0.177377777777778},
-{2990863,3872757,3871965,0.160536842105263,0.160536842105263},
-{2990864,3871965,3871845,0.0192310344827586,0.0192310344827586},
-{2990865,3876213,3875732,0.406444444444444,0.406444444444444},
-{2990866,3876982,3876508,0.146163636363636,0.146163636363636},
-{2990867,3873221,3873066,0.153417391304348,1000000},
-{2990868,3873066,3872746,0.45184,1000000},
-{2990869,3872863,3872735,1000000,0.230147368421053},
-{2990870,3872735,3872648,1000000,0.07765},
-{2990871,3882668,3882656,1000000,0.0380634146341463},
-{2990872,3879982,3880413,0.118944827586207,1000000},
-{2990873,3879923,3880356,1000000,0.135011538461538},
-{2990874,3879633,3879749,0.1128,1000000},
-{2990875,3879749,3879088,0.276204,1000000},
-{2990876,3879510,3879637,0.114290909090909,1000000},
-{2990877,3879637,3879746,0.0776487804878049,1000000},
-{2990878,3879803,3879845,0.0319021276595745,1000000},
-{2990879,3879845,3879927,0.0683142857142857,1000000},
-{2990880,3879566,3879722,1000000,0.118954285714286},
-{2990881,3879722,3879809,1000000,0.0631846153846154},
-{2990882,3879160,3879193,0.113546341463415,1000000},
-{2990883,3879193,3879212,0.128010810810811,1000000},
-{2990884,3878438,3878428,1000000,0.0088304347826087},
-{2990885,3875923,3876014,0.0474230769230769,1000000},
-{2990886,3878371,3878349,1000000,0.0632847457627119},
-{2990887,3878349,3878278,1000000,0.196067796610169},
-{2990888,3878347,3878324,0.223788679245283,1000000},
-{2990889,3878324,3878320,0.0315,1000000},
-{2990895,3878333,3878344,0.0651157894736842,1000000},
-{2990896,3878344,3878347,0.181367441860465,1000000},
-{2990897,3877047,3877153,0.106488888888889,1000000},
-{2990898,3874152,3874069,0.0974204081632653,1000000},
-{2990899,3874433,3874250,0.220105263157895,1000000},
-{2990900,3874250,3874152,0.0978510638297872,1000000},
-{2990901,3874807,3874731,1000000,0.08601},
-{2990902,3874731,3874514,1000000,0.2685},
-{2990903,3879226,3879401,1000000,0.0528933333333333},
-{2990904,3879401,3879464,1000000,0.0276},
-{2990905,3879619,3879676,1000000,0.0819103448275862},
-{2990906,3879076,3879278,0.0465849056603774,1000000},
-{2990907,3879278,3879419,0.0363509433962264,1000000},
-{2990908,3878364,3878139,0.0705906976744186,1000000},
-{2990909,3879711,3879519,1000000,0.109422222222222},
-{2990910,3879519,3879445,1000000,0.0334875},
-{2990911,3879761,3879581,0.145942857142857,1000000},
-{2990912,3880676,3880454,1000000,0.100624390243902},
-{2990913,3880454,3880204,1000000,0.119368421052632},
-{2990914,3881043,3880738,0.125261538461538,1000000},
-{2990915,3881830,3881320,0.187214634146341,1000000},
-{2990916,3881320,3881043,0.104637209302326,1000000},
-{2990917,3875297,3874836,0.124258823529412,1000000},
-{2990918,3875796,3875742,1000000,0.01653},
-{2990919,3875742,3875293,1000000,0.17221935483871},
-{2990921,3870311,3870674,0.0720382978723404,1000000},
-{2990922,3869574,3869566,0.063611320754717,1000000},
-{2990923,3869566,3869540,0.0817615384615385,1000000},
-{2990924,3869685,3869828,1000000,0.4057375},
-{2990925,3869828,3869825,1000000,0.0291574468085106},
-{2990926,3865628,3865054,0.168307692307692,1000000},
-{2990927,3865054,3864874,0.07272,1000000},
-{2990928,3865773,3865712,0.0140428571428571,1000000},
-{2990929,3865712,3865628,0.0229609756097561,1000000},
-{2990930,3865118,3864877,1000000,0.0847818181818182},
-{2990931,3864877,3864708,1000000,0.0522705882352941},
-{2990932,3865020,3864900,1000000,0.0494275862068966},
-{2990933,3865103,3864900,0.116788235294118,1000000},
-{2990934,3864900,3864872,0.021,0.01125},
-{2990935,3862165,3861969,1000000,0.0698360655737705},
-{2990936,3862763,3862672,0.035025,1000000},
-{2990937,3862672,3862475,0.0632285714285714,1000000},
-{2990938,3862821,3862723,1000000,0.0398163934426229},
-{2990939,3863138,3862821,1000000,0.132551612903226},
-{2990940,3910759,3911354,0.39116,0.39116},
-{2990942,3875453,3875564,0.0313736842105263,1000000},
-{2990943,3875501,3875429,0.11925,1000000},
-{2990944,3875429,3875390,0.068025,1000000},
-{2990945,3896545,3896700,0.150985714285714,0.150985714285714},
-{2990946,3896700,3896798,0.0767294117647059,0.0931714285714286},
-{2990947,3896707,3896700,0.446533333333333,0.446533333333333},
-{2990948,3875390,3874988,0.116386363636364,1000000},
-{2990949,3874988,3874569,0.124843902439024,1000000},
-{2990950,3874569,3874035,0.151271428571429,1000000},
-{2990951,3875213,3875124,1000000,0.100061538461538},
-{2990952,3875776,3875668,1000000,0.256827272727273},
-{2990953,3875585,3875511,1000000,0.110712},
-{2990954,3872671,3872323,0.0741130434782609,1000000},
-{2990955,3872323,3872125,0.0480125,1000000},
-{2990956,3872125,3871620,0.101338775510204,1000000},
-{2990957,3871620,3871184,0.085908,1000000},
-{2990958,3871651,3871219,1000000,0.0999767441860465},
-{2990959,3871219,3870464,1000000,0.180886363636364},
-{2990960,3878624,3878522,0.06134,1000000},
-{2990961,3878522,3878334,0.131269565217391,1000000},
-{2990962,3878430,3878268,1000000,0.09834},
-{2990963,3878268,3878230,1000000,0.0309333333333333},
-{2990964,3897579,3897609,1000000,0.00718666666666667},
-{2990965,3897609,3897647,0.0220545454545455,1000000},
-{2990966,3897647,3897670,0.0138166666666667,1000000},
-{2990967,3867604,3866284,0.332386046511628,1000000},
-{2990968,3866284,3866140,0.0351130434782609,1000000},
-{2990969,3866247,3866082,1000000,0.0425162790697674},
-{2990970,3866082,3866017,1000000,0.0221692307692308},
-{2990971,3866161,3866340,1000000,0.08775},
-{2990972,3866340,3866425,1000000,0.041784},
-{2990973,3866283,3866348,0.0367222222222222,1000000},
-{2990974,3866348,3866419,0.110444444444444,1000000},
-{2990975,3866425,3866492,1000000,0.118835294117647},
-{2990976,3866492,3866487,1000000,0.0356653846153846},
-{2990977,3866419,3866413,0.0328641509433962,1000000},
-{2990978,3866413,3866067,0.325934693877551,1000000},
-{2990979,3896072,3896068,1000000,0.0101769230769231},
-{2990980,3896072,3896053,1000000,0.00915555555555556},
-{2990981,3895876,3895961,1000000,0.0375692307692308},
-{2990982,3895961,3895974,1000000,0.00441176470588235},
-{2990983,3896003,3895961,1000000,0.0197454545454545},
-{2990984,3894631,3894618,1000000,0.00777735849056604},
-{2990985,3895178,3895180,1000000,0.145015384615385},
-{2990986,3894878,3894989,1000000,0.07764},
-{2990993,3894848,3894756,0.0261673469387755,0.0261673469387755},
-{2990994,3894756,3894733,0.005364,0.005364},
-{2990995,3901000,3901293,0.105287671232877,1000000},
-{2990998,3885187,3885106,0.135861538461538,1000000},
-{2990999,3885106,3885060,0.0788666666666667,1000000},
-{2991000,3885383,3885300,1000000,0.243642857142857},
-{2991001,3885300,3885237,1000000,0.16247027027027},
-{2991002,3885449,3885408,1000000,0.131125714285714},
-{2991003,3885408,3885383,1000000,0.0824294117647059},
-{2991004,3887312,3887350,1000000,0.0142875},
-{2991005,3887350,3887412,1000000,0.026725},
-{2991006,3891287,3891414,1000000,0.03834},
-{2991007,3891414,3891772,1000000,0.113061538461538},
-{2991008,3887041,3887147,0.0840954545454546,1000000},
-{2991009,3887447,3887404,1000000,0.00577714285714286},
-{2991010,3887477,3887561,1000000,0.008821875},
-{2991012,3909029,3909914,0.172227692307692,0.167086567164179},
-{2991013,3909914,3910535,0.10512,0.103527272727273},
-{2991014,3888856,3888743,1000000,0.0159085714285714},
-{2991015,3888743,3887447,1000000,0.173256338028169},
-{2991016,3889738,3890294,1000000,0.123545454545455},
-{2991017,3892497,3892168,1000000,0.081276},
-{2991018,3892168,3891573,1000000,0.135685714285714},
-{2991019,3892482,3893529,1000000,0.328714285714286},
-{2991020,3893529,3895137,1000000,0.422054237288136},
-{2991021,3885060,3885026,0.0380363636363636,1000000},
-{2991022,3885026,3884978,0.04855,1000000},
-{2991045,3883361,3883449,1000000,0.0192724137931034},
-{2991046,3883430,3883504,0.0203236363636364,1000000},
-{2991047,3884540,3884796,1000000,0.262046153846154},
-{2991048,3883449,3883603,1000000,0.0370821428571429},
-{2991049,3883603,3883843,1000000,0.0635207547169811},
-{2991050,3884206,3884398,0.185053846153846,1000000},
-{2991051,3883610,3884148,0.179657142857143,1000000},
-{2991052,3884348,3884401,0.0198782608695652,1000000},
-{2991065,3872930,3872807,0.0386322580645161,0.0544363636363636},
-{2991066,3870251,3870193,0.0212275862068966,0.0171},
-{2991067,3880104,3879977,1000000,0.07333125},
-{2991068,3879977,3879855,1000000,0.0642193548387097},
-{2991069,3889855,3889293,1000000,0.102777049180328},
-{2991070,3854769,3854466,0.0859866666666667,0.117254545454545},
-{2991071,3869541,3869286,0.0552585365853659,1000000},
-{2991151,3882851,3883947,1000000,0.170434782608696},
-{2991152,3882854,3883941,0.164585915492958,1000000},
-{2991153,3881432,3882192,0.185793103448276,1000000},
-{2991154,3881411,3882161,1000000,0.174531147540984},
-{2991155,3879053,3878408,1000000,0.25427027027027},
-{2991156,3879017,3878377,0.347911111111111,1000000},
-{2991157,3874383,3873464,0.290302702702703,0.261980487804878},
-{2991158,3873464,3873430,0.0132642857142857,0.0106114285714286},
-{2991164,3875412,3875299,0.0435705882352941,0.0423257142857143},
-{2991165,3875299,3874383,0.281553846153846,0.255362790697674},
-{2991166,3879420,3879718,1000000,0.1135},
-{2991167,3876530,3877533,0.198747368421053,0.198747368421053},
-{2991168,3879675,3879740,0.0409384615384615,1000000},
-{2991169,3882161,3883044,1000000,0.200537704918033},
-{2991170,3882192,3883089,0.208706896551724,1000000},
-{2991171,3895622,3895876,1000000,0.138097959183673},
-{2991172,3895400,3895622,1000000,0.13932},
-{2991173,3893688,3894066,0.11028,1000000},
-{2991174,3894066,3894435,0.09285,1000000},
-{2991175,3894435,3894689,0.0612967741935484,1000000},
-{2991176,3900391,3900454,0.05049,1000000},
-{2991177,3900454,3900597,0.09955,1000000},
-{2991178,3900383,3900333,0.03942,1000000},
-{2991179,3900333,3900248,0.0663076923076923,1000000},
-{2991180,3900597,3900865,0.069264,1000000},
-{2991181,3900865,3901198,0.0820690909090909,1000000},
-{2991182,3899087,3899210,0.0269016393442623,1000000},
-{2991183,3903122,3903369,1000000,0.0605755102040816},
-{2991184,3902923,3903129,0.0464315789473684,1000000},
-{2991185,3902482,3902923,0.0919578947368421,1000000},
-{2991186,3902091,3902482,0.0820666666666667,1000000},
-{2991187,3901198,3902091,0.19275,1000000},
-{2991188,3881563,3881611,1000000,0.0314545454545455},
-{2991189,3858246,3858172,0.00917045454545455,1000000},
-{2991190,3858415,3858348,1000000,0.00913695652173913},
-{2991191,3890859,3890913,1000000,1000000},
-{2991192,3890913,3891006,1000000,1000000},
-{2991193,3889707,3890069,1000000,1000000},
-{2991194,3890069,3890154,1000000,1000000},
-{2991195,3873536,3873951,0.0995739130434783,1000000},
-{2991196,3874281,3875650,0.383347826086957,1000000},
-{2991197,3873526,3873935,1000000,0.0910408163265306},
-{2991198,3890491,3890776,0.118581818181818,1000000},
-{2991214,3908585,3907691,0.238738775510204,0.238738775510204},
-{2991215,3907691,3907590,0.023952,0.0244408163265306},
-{2991216,3878993,3879010,1000000,0.0902},
-{2991236,3903007,3903248,1000000,0.0672},
-{2991237,3903248,3903541,1000000,0.0757173913043478},
-{2991242,3881234,3881476,1000000,0.226264864864865},
-{2991253,3872707,3872718,0.0880758620689655,1000000},
-{2991254,3872718,3872716,0.0552486486486487,1000000},
-{2991255,3872400,3872435,1000000,0.035856},
-{2991256,3872086,3872362,1000000,0.210136842105263},
-{2991257,3872362,3872400,1000000,0.0293222222222222},
-{2991258,3874532,3872043,1000000,0.444203389830508},
-{2991259,3865056,3865046,0.116157142857143,1000000},
-{2991260,3865046,3865031,0.110869565217391,1000000},
-{2991261,3865212,3865179,0.0586695652173913,1000000},
-{2991262,3865179,3865109,0.0800790697674419,1000000},
-{2991263,3865290,3865227,1000000,0.0771681818181818},
-{2991264,3868213,3868143,1000000,0.0181297297297297},
-{2991270,3897969,3898096,1000000,0.0536042553191489},
-{2991271,3900073,3900099,1000000,0.136188888888889},
-{2991272,3900099,3900114,1000000,0.0707307692307692},
-{2991273,3867538,3867187,1000000,0.0686490566037736},
-{2991274,3867187,3866765,1000000,0.0778714285714286},
-{2991275,3866765,3866437,1000000,0.0557052631578947},
-{2991276,3867928,3867687,1000000,0.0454754716981132},
-{2991277,3867687,3867538,1000000,0.0332884615384615},
-{2991278,3868567,3868236,0.0618222222222222,1000000},
-{2991279,3868236,3867968,0.0469698113207547,1000000},
-{2991280,3867890,3867763,0.04935,1000000},
-{2991281,3867853,3868098,1000000,0.409705263157895},
-{2991282,3869812,3869465,0.113648275862069,1000000},
-{2991283,3869465,3869149,0.09408,1000000},
-{2991284,3869814,3869787,0.0487609756097561,1000000},
-{2991285,3869787,3869766,0.0162,1000000},
-{2991286,3870464,3870117,1000000,0.1316},
-{2991287,3870343,3870097,0.0777272727272727,1000000},
-{2991288,3870097,3869879,0.0819692307692308,1000000},
-{2991289,3865304,3865093,1000000,0.0726514285714286},
-{2991290,3865093,3865048,1000000,0.02378},
-{2991291,3865804,3865582,0.0458875,1000000},
-{2991292,3865582,3865174,0.0963466666666667,1000000},
-{2991293,3863783,3863563,0.0806095238095238,1000000},
-{2991294,3864699,3864514,1000000,0.0838},
-{2991295,3864529,3864376,0.0747875,1000000},
-{2991296,3863983,3863616,1000000,0.120845901639344},
-{2991297,3869038,3869107,1000000,0.0490565217391304},
-{2991298,3866487,3866135,1000000,0.308919230769231},
-{2991299,3866135,3866073,1000000,0.0372244897959184},
-{2991300,3866659,3865766,0.193172727272727,1000000},
-{2991301,3866996,3866843,0.029076,1000000},
-{2991302,3866843,3866659,0.0368352941176471,1000000},
-{2991303,3867395,3866996,0.078204,1000000},
-{2991304,3864724,3864699,1000000,0.0124761904761905},
-{2991305,3869766,3869563,0.162305882352941,1000000},
-{2991306,3869563,3869452,0.0928384615384615,1000000},
-{2991307,3860703,3860639,0.00973972602739726,1000000},
-{2991308,3860639,3859838,0.143432,1000000},
-{2991309,3860691,3860641,1000000,0.00755844155844156},
-{2991310,3897345,3897382,0.00928636363636363,1000000},
-{2991327,3881291,3881332,1000000,0.0088448275862069},
-{2991328,3881332,3881411,1000000,0.0193862068965517},
-{2991329,3881329,3881357,0.00797586206896552,1000000},
-{2991330,3881357,3881432,0.019448275862069,1000000},
-{2991331,3897568,3897588,0.0103548387096774,1000000},
-{2991332,3897572,3897588,0.0127428571428571,1000000},
-{2991341,3873283,3873544,1000000,1000000},
-{2991342,3868408,3868370,0.0131466666666667,0.0179272727272727},
-{2991343,3868370,3867404,0.305491304347826,0.351315},
-{2991344,3868742,3868667,1000000,0.04584},
-{2991345,3868667,3867657,1000000,0.505542857142857},
-{2991346,3868370,3868667,1000000,0.295430769230769},
-{2991347,3868500,3868454,0.0120697674418605,0.016741935483871},
-{2991348,3868849,3868813,0.0273,0.0287368421052632},
-{2991349,3868813,3868742,0.0396705882352941,0.0306545454545455},
-{2991350,3868454,3868813,0.229058823529412,1000000},
-{2991351,3869110,3868766,0.135864,0.178768421052632},
-{2991352,3868766,3868229,0.285821052631579,0.36204},
-{2991353,3869858,3870184,1000000,1000000},
-{2991354,3872930,3873093,0.098225,1000000},
-{2991355,3873093,3873215,0.137218181818182,0.205827272727273},
-{2991356,3873093,3873179,0.0800666666666667,1000000},
-{2991357,3872463,3872382,1000000,0.0243290322580645},
-{2991358,3872382,3871914,1000000,0.234233333333333},
-{2991359,3872098,3871942,1000000,0.0579272727272727},
-{2991360,3871887,3872109,1000000,0.12516},
-{2991361,3872098,3872109,1000000,1000000},
-{2991362,3872468,3872349,1000000,0.0468272727272727},
-{2991363,3872349,3872098,1000000,0.12474},
-{2991364,3872349,3872347,1000000,1000000},
-{2991365,3872109,3872347,1000000,0.11583},
-{2991366,3872347,3872467,1000000,0.0839368421052632},
-{2991367,3870404,3870409,0.1794,0.1794},
-{2991368,3870409,3870382,0.0263777777777778,0.0263777777777778},
-{2991369,3895931,3895895,1000000,0.0146533333333333},
-{2991370,3896128,3896155,0.0139058823529412,1000000},
-{2991371,3896155,3896217,0.03776,1000000},
-{2991372,3872468,3872463,0.189083333333333,1000000},
-{2991373,3872463,3872465,0.00686666666666667,1000000},
-{2991374,3872465,3872469,0.00681666666666667,1000000},
-{2991375,3872469,3872458,0.1283,1000000},
-{2991376,3872469,3872331,0.0443555555555556,1000000},
-{2991377,3872331,3871930,0.127241379310345,1000000},
-{2991378,3896030,3895988,0.0145058823529412,1000000},
-{2991393,3900424,3900700,1000000,1000000},
-{2991394,3900700,3900760,1000000,1000000},
-{2991395,3900769,3900762,1000000,1000000},
-{2991396,3900762,3900760,1000000,1000000},
-{2991397,3866920,3866857,1000000,0.0199285714285714},
-{2991398,3872309,3872724,0.195,0.195},
-{2991399,3872724,3871955,0.316942105263158,0.316942105263158},
-{2991400,3872921,3872860,0.0239172413793103,0.0187459459459459},
-{2991401,3872860,3872317,0.195192857142857,0.18218},
-{2991402,3872724,3872860,1000000,1000000},
-{2991403,3867433,3867180,0.27308,1000000},
-{2991404,3867180,3867239,0.113929411764706,1000000},
-{2991405,3866857,3866823,1000000,0.0139333333333333},
-{2991406,3866823,3866734,1000000,0.0363230769230769},
-{2991407,3866420,3866538,0.0419571428571428,1000000},
-{2991408,3870015,3869823,1000000,1000000},
-{2991409,3868127,3867847,1000000,0.0838333333333333},
-{2991410,3867847,3867714,1000000,0.0409588235294118},
-{2991411,3867890,3867847,0.0575428571428571,0.0464769230769231},
-{2991412,3867847,3867788,0.0433071428571429,1000000},
-{2991413,3867788,3867714,1000000,0.077544},
-{2991417,3876821,3876707,1000000,0.0787333333333333},
-{2991418,3876707,3876345,0.258852631578947,0.258852631578947},
-{2991421,3878768,3878754,1000000,1000000},
-{2991422,3878754,3878714,1000000,1000000},
-{2991423,3879096,3878754,1000000,1000000},
-{2991424,3867034,3866875,1000000,0.0678782608695652},
-{2991431,3866875,3867034,0.164022222222222,0.164022222222222},
-{2991432,3866875,3866784,1000000,0.0393130434782609},
-{2991433,3866784,3866425,1000000,0.149427272727273},
-{2991434,3867354,3867106,1000000,0.138866666666667},
-{2991435,3867106,3867034,1000000,0.0370636363636364},
-{2991436,3888064,3888278,0.229533333333333,0.229533333333333},
-{2991441,3865300,3864162,0.445427586206896,0.478422222222222},
-{2991442,3864162,3864018,0.0906461538461538,0.094272},
-{2991443,3864450,3864162,1000000,1000000},
-{2991448,3865993,3865949,0.0222452830188679,1000000},
-{2991449,3865949,3865636,0.133488888888889,1000000},
-{2991450,3865903,3865949,0.112305882352941,1000000},
-{2991453,3880453,3880834,1000000,0.233622222222222},
-{2991454,3862149,3861856,1000000,1000000},
-{2991460,3867239,3866945,1000000,0.107979310344828},
-{2991461,3866945,3866920,1000000,0.00996428571428572},
-{2991462,3867009,3866945,0.052925,1000000},
-{2991463,3885501,3885566,0.0382941176470588,1000000},
-{2991464,3877606,3877634,1000000,0.0897428571428572},
-{2991465,3877606,3877741,0.0441375,0.0403542857142857},
-{2991466,3877741,3878091,0.10618125,0.10618125},
-{2991467,3877634,3877741,0.165,1000000},
-{2991468,3868904,3868212,0.256044444444444,1000000},
-{2991469,3868927,3868214,1000000,0.563169230769231},
-{2991470,3862279,3862190,0.0388888888888889,0.0388888888888889},
-{2991471,3862851,3862511,0.1632,0.1632},
-{2991472,3862511,3862421,1000000,1000000},
-{2991473,3862421,3862279,1000000,1000000},
-{2991474,3881952,3881990,1000000,1000000},
-{2991475,3881281,3881952,1000000,1000000},
-{2991476,3884737,3884683,0.0797052631578947,0.0841333333333333},
-{2991477,3884584,3884745,0.0402,1000000},
-{2991478,3884584,3884683,0.0792315789473684,1000000},
-{2991479,3879502,3879296,0.200435294117647,0.1262},
-{2991480,3879296,3879220,0.07628,0.03814},
-{2991481,3879135,3879296,0.139633333333333,1000000},
-{2991482,3879578,3879889,1000000,1000000},
-{2991483,3879889,3880246,1000000,1000000},
-{2991484,3884566,3884716,1000000,0.0366},
-{2991485,3884716,3884953,1000000,0.0599727272727273},
-{2991486,3863664,3863525,1000000,1000000},
-{2991487,3867716,3867683,0.0400173913043478,1000000},
-{2991488,3867683,3867474,0.33906,1000000},
-{2991497,3880971,3880913,0.03969375,1000000},
-{2991498,3880913,3880545,0.334585714285714,1000000},
-{2991499,3864497,3864470,0.0181826086956522,1000000},
-{2991500,3880854,3880781,1000000,0.0593117647058823},
-{2991506,3864511,3864417,0.0237285714285714,0.0243073170731707},
-{2991507,3864559,3864417,1000000,1000000},
-{2991522,3877789,3877691,0.11715,1000000},
-{2991523,3877691,3877668,0.07164,1000000},
-{2991526,3878799,3878033,1000000,0.568930434782609},
-{2991527,3878033,3877881,1000000,0.103527272727273},
-{2991528,3877766,3877871,0.0554608695652174,1000000},
-{2991529,3877691,3877871,0.38124,1000000},
-{2991530,3877871,3878033,0.35496,1000000},
-{2991531,3881730,3881732,0.00755294117647059,1000000},
-{2991532,3881710,3881722,0.00772941176470588,1000000},
-{2991533,3881722,3881730,0.0188470588235294,1000000},
-{2991534,3881722,3881634,1000000,0.069408},
-{2991535,3881634,3881599,1000000,0.23395},
-{2991536,3881475,3881461,0.0144,1000000},
-{2991537,3881611,3881475,0.1048875,1000000},
-{2991538,3881461,3881448,0.01176,1000000},
-{2991539,3881448,3881436,0.010141935483871,1000000},
-{2991540,3881436,3881393,0.03399375,1000000},
-{2991541,3881393,3881385,0.00765454545454545,1000000},
-{2991542,3881385,3881085,0.160290909090909,1000000},
-{2991543,3881461,3881385,0.21594,1000000},
-{2991544,3875774,3875608,1000000,0.0793363636363636},
-{2991545,3875608,3874858,1000000,0.27819375},
-{2991546,3875571,3875608,1000000,1000000},
-{2991547,3863836,3863698,0.0961756097560976,0.101107692307692},
-{2991548,3863698,3863691,0.04422,0.03685},
-{2991549,3863851,3863758,0.0284470588235294,0.0312},
-{2991550,3863758,3863691,0.03612,0.0387},
-{2991551,3863691,3863667,0.0123,0.00933103448275862},
-{2991552,3863667,3862713,0.334215789473684,0.295353488372093},
-{2991553,3881628,3881710,0.0560647058823529,1000000},
-{2991567,3865052,3865056,0.0381767441860465,1000000},
-{2991568,3865002,3865028,0.0601317073170732,1000000},
-{2991569,3865028,3865052,0.0540585365853659,1000000},
-{2991578,3865056,3865137,0.0334909090909091,1000000},
-{2991579,3865137,3865175,0.00980769230769231,1000000},
-{2991580,3865137,3865163,0.0178090909090909,1000000},
-{2991583,3881127,3881159,0.0198555555555556,0.0223375},
-{2991584,3865161,3865190,0.00601578947368421,1000000},
-{2991585,3865190,3865273,0.0256166666666667,1000000},
-{2991586,3865190,3865163,1000000,0.0183692307692308},
-{2991587,3880766,3880813,0.103377272727273,0.12635},
-{2991588,3881022,3880992,0.011151724137931,1000000},
-{2991589,3880992,3880951,0.01538,1000000},
-{2991590,3881028,3880183,1000000,0.469486956521739},
-{2991591,3881028,3881127,1000000,0.0591818181818182},
-{2991592,3881022,3880924,1000000,0.0885},
-{2991593,3880924,3880813,1000000,0.0462235294117647},
-{2991594,3880924,3881209,0.1292625,1000000},
-{2991595,3881083,3881022,0.0256071428571429,1000000},
-{2991596,3881063,3881022,1000000,0.033036},
-{2991597,3881083,3881063,0.069288,1000000},
-{2991598,3878624,3878762,1000000,0.123245454545455},
-{2991599,3878762,3878884,1000000,0.12018},
-{2991600,3878618,3878696,0.0435214285714286,1000000},
-{2991601,3878762,3878696,0.085425,1000000},
-{2991602,3878884,3879210,1000000,0.208246153846154},
-{2991603,3879210,3879616,1000000,0.186920930232558},
-{2991606,3864216,3864209,0.0546,0.0546},
-{2991607,3864209,3864206,1000000,1000000},
-{2991608,3864507,3864503,0.267545454545455,1000000},
-{2991609,3864503,3864505,0.1784,1000000},
-{2991610,3864778,3864774,1000000,0.25616},
-{2991611,3864774,3864769,1000000,0.0472714285714286},
-{2991612,3879452,3879472,0.02745,1000000},
-{2991623,3878815,3878797,0.0104142857142857,0.01215},
-{2991624,3879510,3879472,1000000,0.0318545454545455},
-{2991625,3879558,3879996,0.24033,1000000},
-{2991626,3881276,3881468,1000000,0.111954545454545},
-{2991627,3863763,3863322,0.9074625,0.392416216216216},
-{2991628,3864040,3863968,0.02338125,0.02494},
-{2991629,3863855,3863679,0.0547846153846154,1000000},
-{2991644,3863679,3863605,0.0408882352941177,1000000},
-{2991645,3863605,3863561,0.0159257142857143,0.02787},
-{2991651,3865670,3865045,0.265157142857143,0.285553846153846},
-{2991652,3865045,3864973,0.0455294117647059,0.048375},
-{2991653,3865096,3865045,0.0542,0.03252},
-{2991654,3869225,3869293,0.1837,0.239608695652174},
-{2991655,3869293,3869323,0.0385578947368421,0.0457875},
-{2991656,3869208,3869293,1000000,1000000},
-{2991657,3869139,3869191,0.190371428571429,0.183806896551724},
-{2991658,3869191,3868970,0.160869230769231,0.149378571428571},
-{2991659,3869208,3869191,1000000,1000000},
-{2991660,3866209,3865562,0.25132,0.269271428571429},
-{2991661,3865562,3865374,0.0810882352941177,1000000},
-{2991662,3865191,3865373,0.0699846153846154,0.0718263157894737},
-{2991663,3865373,3865374,0.04795,0.04795},
-{2991664,3865562,3865373,0.117915789473684,0.0722709677419355},
-{2991665,3863845,3863600,0.141857142857143,1000000},
-{2991666,3863600,3863475,1000000,1000000},
-{2991667,3863621,3863475,1000000,0.0574344827586207},
-{2991668,3863600,3863621,0.0604173913043478,1000000},
-{2991669,3857994,3858289,0.0801681818181818,0.0839857142857143},
-{2991670,3858289,3858538,0.0737875,0.0787066666666667},
-{2991671,3858538,3858574,0.0119875,0.0127866666666667},
-{2991672,3858574,3858619,0.0140125,0.0149466666666667},
-{2991673,3858289,3858574,0.44046,1000000},
-{2991674,3879376,3879402,0.0165454545454545,0.0202222222222222},
-{2991675,3879402,3880021,0.350452941176471,0.350452941176471},
-{2991676,3879150,3879402,1000000,0.152371428571429},
-{2991677,3858619,3858676,0.01775,0.0189333333333333},
-{2991678,3858676,3859048,0.10095652173913,0.110571428571429},
-{2991679,3859048,3859213,0.0718857142857143,0.0794526315789474},
-{2991680,3858676,3859048,0.49644,1000000},
-{2991684,3862731,3862709,0.0348,1000000},
-{2991685,3862709,3862264,0.348672,1000000},
-{2991686,3862842,3862815,0.0335454545454546,0.0320869565217391},
-{2991687,3862815,3862428,0.254232,0.264825},
-{2991688,3862709,3862815,1000000,0.0918521739130435},
-{2991722,3865227,3865305,1000000,0.158412},
-{2991723,3863855,3863683,1000000,0.155},
-{2991724,3863683,3863605,1000000,0.08136},
-{2991725,3881543,3881536,0.0074625,1000000},
-{2991729,3868143,3868088,1000000,0.0158823529411765},
-{2991730,3868088,3867406,1000000,0.249088888888889},
-{2991749,3881496,3881475,0.0145542857142857,1000000},
-{2991751,3880898,3880951,1000000,0.0538923076923077},
-{2991752,3880813,3880835,1000000,0.0509023255813953},
-{2991753,3880835,3880898,1000000,0.047553488372093},
-{2991780,3897382,3897577,0.0558837209302326,1000000},
-{2991781,3897577,3897670,0.0240266666666667,1000000},
-{2991786,3900330,3898857,1.43826666666667,1.43826666666667},
-{2991792,3915513,3915369,1000000,0.030584},
-{2991793,3873488,3873541,0.524822222222222,0.545007692307692},
-{2991794,3870377,3869740,0.135072,1000000},
-{2991795,3866073,3866003,1000000,0.0292285714285714},
-{2991796,3866003,3865687,1000000,0.141367346938776},
-{2991797,3875796,3875788,0.01285,1000000},
-{2991798,3875788,3875783,0.01455,1000000},
-{2991799,3875783,3875746,0.10415,1000000},
-{2991802,3870978,3870315,1000000,0.18219},
-{2991803,3870315,3870221,1000000,0.0216},
-{2991804,3860844,3860796,1000000,0.0296093023255814},
-{2991805,3860796,3860754,1000000,0.018175},
-{2991806,3860665,3860796,0.0958421052631579,1000000},
-{2991807,3864568,3864762,0.0862378378378378,0.113957142857143},
-{2991808,3864762,3864797,0.0191,0.02292},
-{2991809,3875120,3875110,0.0782190476190476,1000000},
-{2991810,3875195,3875180,1000000,0.0808819672131147},
-{2991811,3875120,3875195,0.0165529411764706,0.0165529411764706},
-{2991812,3875143,3875131,0.0681049180327869,1000000},
-{2991813,3875131,3875120,0.0686761904761905,1000000},
-{2991814,3875222,3875211,1000000,0.0650262295081967},
-{2991815,3875211,3875195,1000000,0.070672131147541},
-{2991835,3868708,3868721,0.0550444444444445,1000000},
-{2991836,3868721,3868708,0.169911111111111,1000000},
-{2991853,3867799,3867661,0.164448,0.152266666666667},
-{2991854,3867661,3867743,0.093564705882353,0.0611769230769231},
-{2991855,3867743,3867626,0.05225,0.05016},
-{2991856,3867626,3867194,0.190747826086957,0.175488},
-{2991857,3867661,3867626,0.0498222222222222,0.0498222222222222},
-{2991858,3868737,3868299,0.193745454545455,0.157866666666667},
-{2991859,3868299,3868204,0.037775,0.03022},
-{2991860,3868479,3868417,1000000,1000000},
-{2991861,3868417,3868204,0.284488888888889,0.284488888888889},
-{2991862,3869016,3868933,1000000,1000000},
-{2991863,3868933,3868737,0.2716,0.2716},
-{2991864,3871838,3871736,0.0414,0.0365294117647059},
-{2991865,3871736,3871179,0.221458064516129,0.236731034482759},
-{2991866,3865988,3865724,0.10711875,0.11426},
-{2991867,3866125,3865988,0.0374666666666667,0.04496},
-{2991868,3866282,3866484,0.0603103448275862,0.0603103448275862},
-{2991869,3865619,3866143,0.293155555555556,0.293155555555556},
-{2991870,3866125,3866169,0.0294888888888889,1000000},
-{2991871,3866169,3866282,0.0384666666666667,1000000},
-{2991872,3866129,3866169,0.0349333333333333,0.0349333333333333},
-{2991873,3866125,3866181,1000000,0.0382},
-{2991874,3866181,3866282,1000000,0.0658888888888889},
-{2991875,3866143,3866181,0.101333333333333,0.101333333333333},
-{2991881,3870135,3870004,0.0410129032258065,0.0438413793103448},
-{2991882,3870004,3869876,0.03356,0.0347172413793103},
-{2991883,3869876,3868557,0.42934,0.495392307692308},
-{2991884,3868557,3867807,0.2296125,0.272133333333333},
-{2991885,3868535,3868557,0.0367578947368421,0.0367578947368421},
-{2991886,3868535,3867760,0.273622222222222,0.273622222222222},
-{2991887,3870004,3869963,0.0412888888888889,0.0412888888888889},
-{2991888,3869963,3868535,0.661285714285714,0.69435},
-{2991889,3869963,3870372,0.173018181818182,0.181257142857143},
-{2991898,3871060,3870886,1000000,0.09455},
-{2991899,3870886,3870894,0.0447652173913044,0.0447652173913044},
-{2991900,3871060,3870860,1000000,0.0940857142857143},
-{2991901,3870860,3870828,0.01662,0.0151090909090909},
-{2991946,3887138,3887089,0.0258,1000000},
-{2991947,3887089,3886522,0.356571428571429,1000000},
-{2991948,3887184,3887138,0.0251612903225806,0.0251612903225806},
-{2991979,3851974,3851665,0.227066666666667,0.227066666666667},
-{2991980,3851665,3851517,1000000,1000000},
-{2991981,3854353,3854823,1000000,1000000},
-{2991987,3853003,3853167,0.132792857142857,0.161660869565217},
-{2991988,3854086,3853304,0.340285714285714,0.330833333333333},
-{2991989,3853307,3853272,0.0281793103448276,1000000},
-{2991990,3853272,3853197,0.0284,1000000},
-{2991991,3853197,3852293,0.346490909090909,0.38114},
-{2991992,3853172,3853197,1000000,0.016575},
-{2992001,3850814,3851083,0.19075,0.176076923076923},
-{2992002,3864781,3864827,0.148927272727273,0.148927272727273},
-{2992003,3864740,3864827,0.14196,0.14196},
-{2992004,3864872,3864776,1000000,1000000},
-{2992005,3864776,3864740,1000000,1000000},
-{2992006,3864740,3864776,1000000,1000000},
-{2992016,3862454,3862360,0.0284142857142857,0.0306},
-{2992017,3862832,3862454,0.155732142857143,0.1938},
-{2992018,3862454,3862832,0.90144,1000000},
-{2992028,3851226,3850578,0.26042,0.26042},
-{2992029,3850578,3850392,0.0716823529411765,0.0658702702702703},
-{2992030,3850559,3850392,0.0891724137931034,0.0891724137931034},
-{2992031,3850578,3850559,0.02868,0.02868},
-{2992032,3859084,3859594,0.333827586206897,0.312290322580645},
-{2992033,3859594,3859627,0.0290470588235294,0.0290470588235294},
-{2992034,3859213,3859594,0.238028571428571,0.24993},
-{2992035,3857718,3857682,0.0333714285714286,0.03504},
-{2992039,3857950,3858131,0.0803428571428572,0.0749866666666667},
-{2992040,3857734,3857950,0.0835565217391304,1000000},
-{2992041,3857718,3857734,0.00503478260869565,0.00492765957446808},
-{2992042,3857734,3857950,1000000,0.0814978723404255},
-{2992043,3851212,3851217,0.0143636363636364,0.0148125},
-{2992044,3851217,3851390,0.166577142857143,0.176672727272727},
-{2992045,3851986,3851246,0.2582625,0.236125714285714},
-{2992046,3851246,3851212,0.0132827586206897,0.0124258064516129},
-{2992047,3886005,3885990,1000000,0.0215898305084746},
-{2992048,3850824,3851092,0.131976,0.157114285714286},
-{2992049,3851092,3851536,0.896678571428571,0.896678571428571},
-{2992050,3885991,3885945,1000000,0.0181846153846154},
-{2992051,3885945,3885941,1000000,0.0137678571428571},
-{2992052,3887096,3891202,1.06855609756098,1000000},
-{2992053,3885941,3885988,1000000,0.0284470588235294},
-{2992054,3885988,3886214,1000000,0.11631},
-{2992055,3885949,3885982,1000000,0.07054},
-{2992056,3885982,3885988,1000000,0.07123},
-{2992057,3886214,3885982,0.143505882352941,1000000},
-{2992058,3886214,3886553,1000000,0.1315125},
-{2992059,3886317,3886555,0.0836666666666667,1000000},
-{2992060,3886555,3887096,0.173336842105263,1000000},
-{2992061,3886553,3886555,0.0563538461538462,0.0563538461538462},
-{2992062,3885951,3885441,0.379887804878049,0.362218604651163},
-{2992063,3885951,3885989,0.0329823529411765,0.0273512195121951},
-{2992066,3859200,3859178,0.0133333333333333,1000000},
-{2992067,3859243,3859200,0.0242,0.0257612903225806},
-{2992068,3859243,3859274,0.022056,1000000},
-{2992069,3859332,3859274,0.027325,0.0198727272727273},
-{2992070,3859274,3859200,0.0229241379310345,0.0214451612903226},
-{2992071,3862596,3863038,0.249244444444444,0.249244444444444},
-{2992072,3859485,3859390,0.1099,0.0799272727272727},
-{2992073,3864249,3864291,0.352285714285714,1000000},
-{2992074,3864291,3864360,0.19325,0.19325},
-{2992075,3865256,3865244,0.00983684210526316,0.009345},
-{2992076,3859390,3859342,0.0656857142857143,0.0405705882352941},
-{2992077,3859342,3859243,0.1236,0.0811125},
-{2992078,3864708,3864701,1000000,0.060888},
-{2992079,3865244,3864701,0.220177777777778,1000000},
-{2992080,3859485,3859251,0.157416,0.2811},
-{2992081,3859342,3859251,0.6765,1000000},
-{2992082,3865244,3865168,0.101720930232558,0.0994090909090909},
-{2992083,3865168,3865142,0.0250695652173913,0.024536170212766},
-{2992084,3864701,3864684,1000000,0.0517777777777778},
-{2992085,3864684,3864472,1000000,0.792884210526316},
-{2992087,3872572,3871918,1000000,0.289390909090909},
-{2992088,3871918,3871805,0.0364384615384615,0.0364384615384615},
-{2992089,3856698,3855511,0.285612765957447,0.305086363636364},
-{2992090,3856928,3856698,0.052008,0.054175},
-{2992091,3857308,3857140,0.0397276595744681,0.0414933333333333},
-{2992092,3857140,3856928,0.0544125,0.0567782608695652},
-{2992093,3857631,3857308,0.08625,0.0880851063829787},
-{2992094,3871181,3871004,1.11756,1000000},
-{2992095,3876657,3876803,0.14925652173913,1000000},
-{2992096,3876188,3876569,1000000,0.469246153846154},
-{2992097,3876569,3876693,1000000,0.13451320754717},
-{2992112,3892093,3893118,0.692772413793103,1000000},
-{2992113,3893118,3893119,0.0661826086956522,1000000},
-{2992114,3878821,3878805,0.0114,0.0111673469387755},
-{2992115,3878805,3878732,0.0460875,0.0460875},
-{2992123,3869382,3869409,1000000,0.303533333333333},
-{2992124,3869379,3869366,0.0818142857142857,0.0818142857142857},
-{2992125,3869366,3869382,0.42264,0.325107692307692},
-{2992127,3875211,3875131,0.0518625,0.0296357142857143},
-{2992135,3892959,3897728,1.91785454545455,1.91785454545455},
-{2992136,3892586,3892804,0.0750612244897959,0.0782553191489362},
-{2992137,3892804,3893621,0.650422222222222,0.399122727272727},
-{2992151,3869452,3869395,0.0214,0.0321},
-{2992152,3869395,3868902,0.1570875,0.193338461538462},
-{2992153,3884391,3884355,0.211227272727273,0.193625},
-{2992154,3884355,3884331,0.174128571428571,0.128305263157895},
-{2992155,3884783,3884355,0.168022222222222,0.168022222222222},
-{2992156,3883606,3884099,0.213475862068966,0.229288888888889},
-{2992157,3884099,3884210,0.0423636363636364,0.0388333333333333},
-{2992158,3884026,3883683,0.165995454545455,0.1739},
-{2992159,3883683,3883315,0.20674,0.167627027027027},
-{2992160,3883683,3883722,1000000,1000000},
-{2992161,3883722,3884099,1000000,1000000},
-{2992162,3883315,3883393,0.04212,0.0702},
-{2992163,3883393,3883606,0.100220689655172,0.2422},
-{2992164,3883393,3883722,0.228088888888889,0.228088888888889},
-{2992165,3883890,3883756,0.148414285714286,1000000},
-{2992166,3883756,3883512,1000000,1000000},
-{2992167,3897728,3897774,0.0157272727272727,0.0157272727272727},
-{2992171,3883173,3883251,0.0707333333333333,0.079575},
-{2992172,3883251,3883290,0.0316588235294118,0.0299},
-{2992178,3879965,3879866,1000000,1000000},
-{2992179,3879242,3879188,1000000,0.689576470588235},
-{2992180,3879188,3879179,0.0315142857142857,0.0315142857142857},
-{2992181,3879188,3879630,1000000,1000000},
-{2992182,3878491,3878394,0.120244444444444,0.120244444444444},
-{2992183,3885989,3886558,0.231227027027027,0.182029787234043},
-{2992184,3885589,3885250,0.268666666666667,0.268666666666667},
-{2992185,3885544,3885589,1000000,0.0324413793103448},
-{2992187,3892736,3892849,0.0226133333333333,1000000},
-{2992188,3892950,3892996,0.0126734693877551,1000000},
-{2992189,3886553,3887094,1000000,0.1694},
-{2992190,3887094,3887096,0.0261555555555556,0.0261555555555556},
-{2992191,3891202,3887094,1.2240972972973,1000000},
-{2992192,3901257,3900985,0.1632,0.156672},
-{2992193,3900985,3900753,0.155769230769231,0.15},
-{2992194,3900546,3900985,1000000,1000000},
-{2992195,3893049,3893268,1000000,0.0879073170731707},
-{2992196,3893268,3893723,1000000,0.206333333333333},
-{2992203,3892996,3893688,0.220704,1000000},
-{2992207,3885990,3885960,1000000,0.0211358490566038},
-{2992208,3885960,3885945,1000000,0.0593333333333333},
-{2992209,3885941,3885929,1000000,0.0737389830508475},
-{2992210,3885929,3885949,1000000,0.0692852459016393},
-{2992214,3891717,3891728,0.147327272727273,1000000},
-{2992215,3891796,3892080,0.130991489361702,0.143176744186047},
-{2992216,3891717,3891796,1000000,0.09748},
-{2992217,3862004,3861935,0.0451565217391304,0.043275},
-{2992218,3861935,3861511,0.230864516129032,0.230864516129032},
-{2992219,3861984,3861970,0.822882352941177,0.518111111111111},
-{2992220,3861970,3861925,0.03615,0.02892},
-{2992221,3884715,3884872,0.0461823529411765,0.0506516129032258},
-{2992222,3884872,3885015,0.04944375,0.0452057142857143},
-{2992223,3862432,3862185,0.124622222222222,0.124622222222222},
-{2992224,3862185,3861970,1000000,1000000},
-{2992225,3863081,3863024,0.04075,0.0514736842105263},
-{2992226,3863024,3862432,0.452953846153846,0.512034782608696},
-{2992227,3862185,3863024,0.521155555555556,0.521155555555556},
-{2992228,3884128,3883642,0.262168421052632,0.262168421052632},
-{2992235,3885942,3885950,0.0592243902439024,0.0592243902439024},
-{2992237,3885787,3885899,0.0397542857142857,0.0515333333333333},
-{2992238,3885899,3886015,0.0359,0.062825},
-{2992239,3885942,3885899,0.0416052631578947,0.0416052631578947},
-{2992240,3865168,3864684,0.176755555555556,0.176755555555556},
-{2992241,3886275,3886193,0.0369,0.0436090909090909},
-{2992242,3886193,3885950,0.0926222222222222,0.0961846153846154},
-{2992243,3886015,3886223,0.0609652173913044,0.09348},
-{2992244,3886223,3886275,0.01895,0.02274},
-{2992245,3886193,3886223,0.0595846153846154,0.0249870967741935},
-{2992246,3864827,3864860,0.0549942857142857,0.0469463414634146},
-{2992247,3864860,3864872,0.0472235294117647,0.0411692307692308},
-{2992248,3866294,3865108,1000000,0.5301},
-{2992249,3865108,3865020,1000000,0.023475},
-{2992250,3864860,3865020,0.0746888888888889,1000000},
-{2992251,3866294,3866223,0.124747058823529,0.14138},
-{2992252,3867226,3866294,1000000,0.236005263157895},
-{2992253,3867244,3866327,0.2919,1000000},
-{2992254,3866327,3866305,0.00756428571428571,1000000},
-{2992255,3877792,3877765,1000000,0.057984},
-{2992256,3877713,3877681,0.0513724137931034,1000000},
-{2992257,3877792,3877713,0.0372857142857143,0.0372857142857143},
-{2992258,3889899,3889960,1000000,0.0431625},
-{2992259,3876014,3876178,0.0968842105263158,1000000},
-{2992260,3876178,3876231,0.0218142857142857,1000000},
-{2992261,3893108,3893126,0.0501157894736842,0.0501157894736842},
-{2992262,3876023,3876188,1000000,0.05788125},
-{2992263,3876188,3876245,1000000,0.0236307692307692},
-{2992264,3875305,3875349,1000000,0.0405368421052632},
-{2992265,3874651,3875221,0.310036363636364,0.155018181818182},
-{2992266,3875221,3875305,0.0671,0.0345085714285714},
-{2992267,3875349,3875221,0.07788,1000000},
-{2992268,3875270,3875398,0.153384905660377,1000000},
-{2992269,3875398,3875415,0.0181153846153846,1000000},
-{2992270,3875415,3875508,0.0287166666666667,0.0738428571428571},
-{2992271,3875398,3875508,0.04464375,1000000},
-{2992272,3875415,3875439,0.0301466666666667,1000000},
-{2992273,3875508,3875439,0.0628615384615385,1000000},
-{2992274,3874768,3875290,1000000,0.510059016393443},
-{2992275,3875290,3875305,1000000,0.0174103448275862},
-{2992276,3874170,3874046,0.1382,0.1382},
-{2992277,3874351,3874220,0.0931821428571429,0.08697},
-{2992278,3874220,3874170,0.04005,0.0361741935483871},
-{2992279,3874046,3874220,1000000,0.0834909090909091},
-{2992280,3874170,3874126,0.0361932203389831,0.0338952380952381},
-{2992281,3874046,3874126,0.111675,1000000},
-{2992282,3868864,3868919,0.0318,0.053},
-{2992283,3868919,3868400,0.47826,0.47826},
-{2992284,3868919,3869012,0.133355555555556,0.133355555555556},
-{2992285,3890299,3890327,0.0213677419354839,0.0135183673469388},
-{2992286,3871636,3871819,0.0658153846153846,0.0900631578947368},
-{2992287,3871819,3872056,0.0550764705882353,0.0604064516129032},
-{2992288,3871665,3871636,0.0571621621621622,0.0503571428571429},
-{2992289,3871819,3871665,0.103915384615385,1000000},
-{2992290,3863993,3864275,0.118723076923077,0.149361290322581},
-{2992291,3864275,3864315,0.0138769230769231,0.0200444444444444},
-{2992292,3866380,3866473,0.120434482758621,0.124735714285714},
-{2992293,3866473,3866502,0.202725,0.0600666666666667},
-{2992294,3865908,3866267,0.0635689655172414,0.0709038461538462},
-{2992295,3866267,3866502,0.0338896551724138,0.0378},
-{2992296,3866473,3866334,0.0526714285714286,1000000},
-{2992297,3866334,3866267,0.0357230769230769,1000000},
-{2992298,3890277,3890308,1000000,0.0502173913043478},
-{2992299,3890180,3890308,0.129866666666667,1000000},
-{2992300,3890299,3890408,1000000,0.138728571428571},
-{2992301,3860754,3860818,0.053328,1000000},
-{2992302,3860818,3860865,0.0274545454545455,1000000},
-{2992303,3860758,3860772,0.118994117647059,0.109345945945946},
-{2992304,3860772,3860865,0.076875,1000000},
-{2992305,3860818,3860772,0.0679548387096774,1000000},
-{2992306,3857901,3857868,0.0123642857142857,0.0164857142857143},
-{2992307,3869366,3869382,0.43614,0.43614},
-{2992313,3889669,3890054,0.75396,0.75396},
-{2992314,3869694,3869778,1000000,0.03084},
-{2992315,3869778,3870327,1000000,0.180235714285714},
-{2992316,3869762,3869702,1000000,0.166358823529412},
-{2992317,3869702,3869694,1000000,0.0276529411764706},
-{2992318,3869778,3869702,0.0519923076923077,1000000},
-{2992319,3869685,3869616,0.20631724137931,1000000},
-{2992320,3869616,3869613,0.0224142857142857,1000000},
-{2992321,3869613,3869547,0.0175875,1000000},
-{2992322,3869547,3868439,0.259360975609756,1000000},
-{2992323,3869616,3869547,0.0311111111111111,1000000},
-{2992324,3869608,3869481,1000000,0.04995},
-{2992325,3869481,3868428,1000000,0.395353846153846},
-{2992326,3869693,3869777,0.0278785714285714,1000000},
-{2992327,3869777,3870311,0.127863157894737,1000000},
-{2992328,3871373,3871252,0.0354620689655172,0.0331741935483871},
-{2992329,3871252,3870844,0.115474285714286,0.112266666666667},
-{2992330,3870844,3870176,0.189981818181818,0.184394117647059},
-{2992331,3870176,3869896,0.191630769230769,0.113236363636364},
-{2992332,3867622,3867325,1000000,0.170305263157895},
-{2992333,3867325,3867146,1000000,0.0789789473684211},
-{2992334,3867633,3867245,0.114951219512195,1000000},
-{2992335,3867245,3867093,0.0480473684210526,1000000},
-{2992336,3867644,3867270,1000000,0.112917073170732},
-{2992337,3867270,3867146,1000000,0.03261},
-{2992338,3871252,3870840,1000000,0.47976},
-{2992339,3870840,3870176,0.69906,1000000},
-{2992340,3870844,3870840,0.07386,0.07386},
-{2992341,3865810,3865891,0.0503225806451613,0.0678260869565217},
-{2992342,3865891,3866147,0.342272727272727,0.332205882352941},
-{2992343,3865810,3865746,0.0265111111111111,0.0275307692307692},
-{2992344,3865891,3865746,1000000,0.07107},
-{2992345,3865746,3865176,0.240760714285714,0.249677777777778},
-{2992346,3865176,3864980,0.0675333333333333,0.0688075471698113},
-{2992347,3878450,3878582,0.0593571428571429,1000000},
-{2992348,3878582,3879613,0.324507692307692,0.308678048780488},
-{2992349,3878941,3878483,1000000,0.198634615384615},
-{2992350,3878582,3878483,0.09585,1000000},
-{2992351,3878910,3878429,0.213929411764706,1000000},
-{2992352,3878429,3878280,0.100909090909091,1000000},
-{2992353,3862797,3862633,0.156822222222222,0.156822222222222},
-{2992354,3862329,3862059,0.167466666666667,0.167466666666667},
-{2992355,3862738,3863097,0.202695652173913,0.2331},
-{2992356,3863097,3863036,0.0551111111111111,0.0551111111111111},
-{2992357,3863036,3862840,0.112244444444444,0.112244444444444},
-{2992358,3863036,3863304,0.162066666666667,0.162066666666667},
-{2992359,3862738,3862708,0.0225272727272727,0.0215478260869565},
-{2992360,3862708,3862329,0.21405,0.186130434782609},
-{2992361,3862708,3862818,0.112333333333333,0.112333333333333},
-{2992362,3862329,3861936,0.261884210526316,0.184288888888889},
-{2992363,3861936,3861469,0.353904,0.402163636363636},
-{2992364,3861936,3862033,0.110066666666667,0.110066666666667},
-{2992389,3852367,3850520,1000000,0.711658064516129},
-{2992394,3852306,3852224,0.0253255813953488,0.02178},
-{2992401,3852224,3852076,0.054893023255814,0.047208},
-{2992402,3852224,3851987,1000000,0.183317647058824},
-{2992403,3851987,3851122,0.455136,1000000},
-{2992404,3851987,3852076,1000000,0.05283},
-{2992407,3852076,3851362,0.498136363636364,0.273975},
-{2992415,3855066,3855404,1000000,0.180874285714286},
-{2992416,3855404,3855547,1000000,0.136476923076923},
-{2992417,3855547,3855450,0.048576,0.03795},
-{2992418,3855450,3855134,0.147367741935484,0.157531034482759},
-{2992419,3855404,3855450,1000000,0.09417},
-{2992440,3856676,3857052,1000000,0.18484},
-{2992441,3857052,3857114,1000000,0.0328965517241379},
-{2992442,3858217,3857495,0.240016216216216,0.227707692307692},
-{2992443,3857495,3857402,0.0288954545454545,0.031785},
-{2992444,3859259,3858916,0.109030434782609,0.122326829268293},
-{2992445,3858916,3858787,0.0595571428571429,0.0641384615384615},
-{2992446,3858787,3858788,0.057219512195122,0.057219512195122},
-{2992447,3858916,3858788,0.46926,1000000},
-{2992455,3872877,3873396,0.35144,1000000},
-{2992483,3864432,3864304,0.04183125,0.0304227272727273},
-{2992484,3864304,3863815,0.214758620689655,0.1557},
-{2992487,3864432,3864553,0.139171428571429,0.171917647058824},
-{2992488,3864553,3864642,0.05823,0.05823},
-{2992489,3864304,3864553,0.106425,1000000},
-{2992490,3865017,3864658,0.09105,0.0817591836734694},
-{2992491,3864658,3864432,0.073654054054054,0.0579829787234043},
-{2992492,3864553,3864658,0.131341935483871,1000000},
-{2992511,3859839,3860413,0.269967567567568,0.32221935483871},
-{2992512,3860413,3860443,0.0159692307692308,0.0173},
-{2992513,3860443,3860393,0.0756,0.110492307692308},
-{2992514,3860443,3860583,0.0529538461538462,0.0573666666666667},
-{2992515,3860583,3861321,0.245370731707317,0.264742105263158},
-{2992516,3860393,3860459,1000000,0.0474},
-{2992517,3860459,3860583,1000000,0.056304},
-{2992523,3860524,3860327,0.0455411764705882,0.1106},
-{2992524,3860396,3859896,0.186286363636364,0.372572727272727},
-{2992528,3872340,3872588,0.0932888888888889,0.0932888888888889},
-{2992529,3872588,3872810,0.0795333333333333,0.0795333333333333},
-{2992530,3853972,3854069,0.07475,0.0381702127659574},
-{2992531,3854069,3854177,0.0670645161290323,0.0495},
-{2992532,3854069,3854005,0.0278842105263158,1000000},
-{2992533,3873246,3873371,0.621244444444444,0.621244444444444},
-{2992534,3858926,3858706,1000000,0.16608},
-{2992535,3858706,3858675,0.0118533333333333,0.0161636363636364},
-{2992536,3859178,3859115,0.0478894736842105,1000000},
-{2992537,3859035,3858926,1000000,0.0758210526315789},
-{2992538,3858994,3858929,0.02005,0.0515571428571429},
-{2992539,3858929,3857631,0.3732,0.41052},
-{2992540,3859035,3858929,0.0805578947368421,1000000},
-{2992554,3871642,3871547,0.0316125,0.0316125},
-{2992555,3871547,3870915,0.212755555555556,1000000},
-{2992556,3871482,3871524,0.0464042553191489,1000000},
-{2992557,3871524,3871547,0.0381446808510638,1000000},
-{2992558,3871648,3871524,1000000,0.0795473684210526},
-{2992559,3871648,3871711,0.0368470588235294,0.0284727272727273},
-{2992560,3871711,3871880,0.075,0.0652173913043478},
-{2992561,3871642,3871711,0.0334636363636364,0.0334636363636364},
-{2992562,3871351,3871327,0.0259538461538462,0.0241},
-{2992563,3871051,3871363,0.157566666666667,0.113448},
-{2992564,3871363,3871485,0.0485181818181818,1000000},
-{2992565,3871482,3871363,1000000,0.250186046511628},
-{2992566,3903527,3903617,0.0604928571428571,0.05293125},
-{2992567,3903617,3903646,0.0118864864864865,0.0151655172413793},
-{2992568,3903646,3903821,0.0832941176470588,0.236},
-{2992569,3903821,3904043,0.0871783783783784,0.0896},
-{2992571,3871256,3871669,1000000,1000000},
-{2992572,3871632,3871669,0.0269869565217391,1000000},
-{2992573,3900312,3900435,0.108991304347826,0.0677513513513514},
-{2992574,3900435,3900532,0.114388235294118,0.077784},
-{2992575,3899987,3900427,0.159466666666667,0.14352},
-{2992576,3900427,3900532,0.0448628571428571,0.0424378378378378},
-{2992577,3857984,3857281,0.181772727272727,0.190428571428571},
-{2992578,3857281,3857106,0.0400227272727273,0.0391333333333333},
-{2992579,3857090,3857281,0.159,0.0908571428571429},
-{2992580,3859399,3859592,0.378333333333333,0.378333333333333},
-{2992581,3894740,3894776,0.0389379310344828,0.045168},
-{2992582,3894776,3894782,0.0129375,0.0138},
-{2992583,3894669,3894776,0.0436588235294118,1000000},
-{2992584,3894291,3894332,0.0617653846153846,0.0573535714285714},
-{2992585,3894473,3894291,0.102016216216216,1000000},
-{2992586,3917419,3917496,0.0336444444444444,0.030793220338983},
-{2992587,3917419,3917368,0.0245842105263158,0.0359307692307692},
-{2992588,3917368,3917162,0.351476923076923,0.34269},
-{2992589,3917496,3917368,0.0430340425531915,1000000},
-{2992590,3917394,3917419,0.0168339622641509,0.0168339622641509},
-{2992591,3917368,3917394,0.0450181818181818,1000000},
-{2992592,3917183,3917243,0.032948275862069,0.0424666666666667},
-{2992593,3917243,3917394,0.403137931034483,0.403137931034483},
-{2992594,3917299,3917243,0.0799928571428571,1000000},
-{2992595,3872178,3872872,0.5228,0.5228},
-{2992596,3872872,3872876,0.0225111111111111,0.0225111111111111},
-{2992597,3872502,3872876,1000000,1000000},
-{2992598,3870893,3870885,0.0249714285714286,0.0228},
-{2992599,3870885,3870527,1000000,0.25588},
-{2992600,3870527,3870511,0.00937714285714286,0.00965294117647059},
-{2992601,3870527,3870885,1000000,0.23326875},
-{2992603,3861680,3861542,1000000,1000000},
-{2992604,3861542,3861244,1000000,1000000},
-{2992612,3849715,3849345,0.230866666666667,0.230866666666667},
-{2992613,3849345,3849205,1000000,1000000},
-{2992614,3849809,3849628,0.113,0.113},
-{2992616,3849479,3849025,0.259869230769231,0.241307142857143},
-{2992619,3857938,3858895,0.401875862068966,0.38848},
-{2992620,3859085,3858889,0.10686,0.10686},
-{2992621,3858889,3857751,1000000,0.637254545454545},
-{2992622,3858895,3858889,0.0449333333333333,0.0449333333333333},
-{2992623,3856463,3856454,0.0302285714285714,0.03174},
-{2992624,3856454,3856013,0.401424,0.401424},
-{2992625,3861638,3861584,0.02442,0.0271333333333333},
-{2992627,3863458,3863353,0.10928,0.16392},
-{2992628,3863353,3863487,0.0688666666666667,0.0688666666666667},
-{2992629,3863487,3863803,0.313377777777778,0.313377777777778},
-{2992630,3863458,3863487,0.113466666666667,0.113466666666667},
-{2992631,3852134,3852632,0.42009,0.336072},
-{2992632,3852632,3852675,0.04935,0.0448636363636364},
-{2992633,3863473,3863458,0.0292384615384615,0.0543},
-{2992634,3852855,3852837,0.0100971428571429,0.0114},
-{2992635,3852632,3852837,0.104507142857143,0.0943935483870968},
-{2992636,3854194,3854297,0.09681,0.0744692307692308},
-{2992637,3854297,3853762,0.442452631578947,0.431107692307692},
-{2992639,3862363,3862313,0.0728666666666667,0.0728666666666667},
-{2992640,3862313,3862300,0.0193555555555556,0.0193555555555556},
-{2992641,3862934,3862611,0.205581818181818,0.205581818181818},
-{2992642,3862611,3862363,0.204471428571429,0.204471428571429},
-{2992643,3862313,3862611,0.127822222222222,0.127822222222222},
-{2992644,3862730,3862601,0.68505,0.68505},
-{2992645,3862601,3862491,0.146,0.146},
-{2992646,3861614,3862601,0.445022222222222,0.445022222222222},
-{2992648,3865914,3864589,0.328296,0.321858823529412},
-{2992649,3864589,3864538,0.0194933333333333,0.0194933333333333},
-{2992653,3856253,3856021,0.0491739130434783,0.0526046511627907},
-{2992654,3856021,3854789,0.3518875,0.359374468085106},
-{2992655,3856530,3856261,0.163835294117647,1000000},
-{2992656,3856261,3856253,0.0836625,1000000},
-{2992657,3856021,3856261,0.192685714285714,0.192685714285714},
-{2992658,3859825,3859335,0.312866666666667,0.191986363636364},
-{2992659,3859335,3859344,0.110929411764706,1000000},
-{2992660,3859110,3859335,0.10006875,0.168536842105263},
-{2992661,3861163,3861036,0.0711702127659574,0.0743333333333333},
-{2992662,3861584,3861262,0.122755102040816,0.130760869565217},
-{2992663,3861262,3861163,0.0293125,0.0305869565217391},
-{2992664,3871363,3871342,1000000,0.0615724137931035},
-{2992678,3861163,3861584,0.79338,1000000},
-{2992679,3871621,3871632,0.0194347826086957,1000000},
-{2992685,3871700,3871408,1000000,0.147776470588235},
-{2992686,3871408,3871334,1000000,0.0265153846153846},
-{2992687,3871276,3871380,0.182925,1000000},
-{2992688,3871380,3871615,0.4359,0.36325},
-{2992689,3871408,3871380,1000000,0.19172},
-{2992690,3871334,3871276,1000000,0.0202615384615385},
-{2992691,3871276,3871060,1000000,0.0798923076923077},
-{2992692,3871700,3871729,0.05916,1000000},
-{2992693,3871729,3871939,0.187706666666667,1000000},
-{2992694,3871846,3871946,1000000,0.0567866666666667},
-{2992724,3865000,3864901,0.127371428571429,1000000},
-{2992741,3872707,3872628,0.05456,0.0355826086956522},
-{2992802,3907030,3908171,0.355240909090909,0.355240909090909},
-{2992803,3909507,3908411,0.316247058823529,0.288010714285714},
-{2992804,3908411,3908279,0.0663724137931034,0.0377411764705882},
-{2992805,3908188,3908411,1000000,0.07063125},
-{2992808,3890400,3890404,0.180031578947368,0.126688888888889},
-{2992809,3890404,3890408,0.1449,0.06624},
-{2992844,3895130,3895072,0.039696,0.0522315789473684},
-{2992845,3895130,3895162,0.0317647058823529,1000000},
-{2992846,3895072,3894553,0.253910526315789,0.275674285714286},
-{2992847,3894553,3894167,0.219,0.2263},
-{2992848,3919647,3919879,0.156181818181818,0.122714285714286},
-{2992849,3919459,3919476,1000000,0.106392},
-{2992850,3919228,3919298,0.0974470588235294,0.0502},
-{2992851,3919647,3919626,1000000,0.0327692307692308},
-{2992852,3858326,3858315,0.0147559322033898,0.0155464285714286},
-{2992853,3857983,3857959,0.0137225806451613,0.0146689655172414},
-{2992859,3919459,3919326,1000000,0.0703862068965517},
-{2992860,3919326,3919298,0.0133542857142857,0.018696},
-{2992864,3919232,3919267,0.0286125,0.01308},
-{2992865,3919171,3919228,0.051912,0.0309},
-{2992866,3919232,3919171,0.109841379310345,1000000},
-{2992867,3919298,3919376,0.0542285714285714,0.0392689655172414},
-{2992868,3919376,3919476,0.0371612903225806,0.0411428571428571},
-{2992869,3919228,3919376,0.0655161290322581,1000000},
-{2992870,3873001,3873689,1000000,0.169632558139535},
-{2992871,3873689,3873781,1000000,0.0283941176470588},
-{2992872,3873923,3873810,0.208,1000000},
-{2992873,3873810,3873781,0.05526,1000000},
-{2992874,3873689,3873810,1000000,0.0580888888888889},
-{2992875,3872987,3873646,0.2197875,1000000},
-{2992876,3873646,3873763,0.06099,1000000},
-{2992877,3873763,3873727,0.0511125,1000000},
-{2992878,3873727,3873445,0.295479069767442,1000000},
-{2992879,3873646,3873727,0.063375,1000000},
-{2992884,3873852,3873805,1000000,0.117733333333333},
-{2992885,3873805,3873506,1000000,0.350245714285714},
-{2992886,3886427,3886332,1000000,1000000},
-{2992887,3886332,3886162,1000000,1000000},
-{2992888,3886427,3886523,0.0977076923076923,0.158775},
-{2992889,3886523,3886629,0.06924,0.0712764705882353},
-{2992896,3905124,3905863,0.235236,0.230623529411765},
-{2992897,3905863,3905991,0.043375,0.0424897959183674},
-{2992898,3903936,3905715,0.438346666666667,0.419693617021277},
-{2992899,3905715,3905991,0.108844444444444,0.0864352941176471},
-{2992900,3905863,3905715,0.1332,1000000},
-{2992901,3905991,3906172,0.10416,0.16275},
-{2992902,3905991,3906171,0.0909428571428571,0.0909428571428571},
-{2992903,3906172,3906171,0.123728571428571,0.123728571428571},
-{2992911,3899695,3899718,0.0691764705882353,0.0712727272727273},
-{2992912,3899718,3899992,0.244028571428571,0.277005405405405},
-{2992913,3899623,3899718,0.0552,0.0966},
-{2992914,3878718,3878667,0.033075,0.0378},
-{2992915,3878722,3878718,0.005952,0.00676363636363636},
-{2992916,3878696,3878815,0.090768,1000000},
-{2992921,3908279,3908215,0.0471,0.0334933333333333},
-{2992922,3908215,3907243,0.539692307692308,0.467733333333333},
-{2992923,3908171,3908215,0.0736125,1000000},
-{2992924,3879996,3880029,0.0221806451612903,1000000},
-{2992925,3880029,3880149,0.116269565217391,1000000},
-{2992926,3880055,3880084,1000000,0.0160390243902439},
-{2992927,3880084,3880206,1000000,0.0850058823529412},
-{2992928,3880029,3880084,1000000,0.0643875},
-{2992937,3880678,3880914,0.353060869565217,0.2537625},
-{2992938,3880914,3881082,0.105533333333333,0.0904571428571428},
-{2992939,3880902,3880943,0.02415,0.0173384615384615},
-{2992940,3880943,3881082,0.0713142857142857,0.0713142857142857},
-{2992941,3880914,3880943,1000000,0.0786},
-{2992970,3887167,3887109,0.02,0.02},
-{2992971,3887109,3885331,0.6340125,0.67628},
-{2992973,3885331,3886209,0.5444,0.441405405405405},
-{2992974,3886067,3886209,0.215577777777778,0.253069565217391},
-{2992975,3881329,3881491,0.078,0.085609756097561},
-{2992976,3881491,3881589,0.0368769230769231,0.0661241379310345},
-{2992977,3881633,3881758,0.055668,1000000},
-{2992982,3880413,3880542,0.0345052631578947,1000000},
-{2992985,3881122,3880641,0.307333333333333,0.307333333333333},
-{2992986,3881014,3881122,0.0915555555555556,0.0915555555555556},
-{2992987,3881758,3881936,0.0854947368421053,1000000},
-{2992988,3881936,3881949,0.00736271186440678,0.00775714285714286},
-{2992989,3880680,3880601,0.0211924528301887,1000000},
-{2992990,3850939,3850774,0.0562645161290323,0.02907},
-{2992991,3850939,3850931,0.06915,0.113894117647059},
-{2992992,3850774,3850931,0.0817166666666667,1000000},
-{2992993,3851512,3851038,0.117957446808511,0.126},
-{2992994,3851038,3850939,0.0330473684210526,0.0205868852459016},
-{2992995,3850925,3851038,0.101592857142857,1000000},
-{2992996,3854873,3854805,0.018432,0.017388679245283},
-{2992997,3854652,3854764,0.0529885714285714,1000000},
-{2992998,3854764,3854873,0.0607777777777778,1000000},
-{2992999,3854805,3854745,0.015204,0.0143433962264151},
-{2993000,3854764,3854745,0.0681,1000000},
-{2993009,3854648,3854643,0.0392470588235294,1000000},
-{2993010,3854643,3854652,0.0360473684210526,1000000},
-{2993035,3849037,3848853,0.0509333333333333,0.0528923076923077},
-{2993036,3848853,3848419,0.125556,0.1307875},
-{2993037,3848851,3848853,0.254444444444444,1000000},
-{2993038,3849521,3849861,0.401752941176471,0.487842857142857},
-{2993039,3848910,3849101,0.306666666666667,0.306666666666667},
-{2993040,3849861,3850182,0.68193,0.568275},
-{2993043,3849147,3849101,0.0286,0.0286},
-{2993044,3874067,3874109,0.0186882352941176,0.0244384615384615},
-{2993045,3874254,3874109,0.0731478260869565,1000000},
-{2993046,3874639,3874612,1000000,0.0149853658536585},
-{2993047,3874556,3874542,0.0124875,1000000},
-{2993048,3874639,3874556,0.0379894736842105,1000000},
-{2993049,3874786,3874920,0.05236,0.0561},
-{2993050,3874920,3874999,0.0477818181818182,0.0553263157894737},
-{2993051,3875016,3874999,0.0610263157894737,1000000},
-{2993052,3874920,3875016,1000000,0.08666},
-{2993053,3875076,3875057,1000000,0.041628},
-{2993054,3875057,3874936,1000000,0.0952981132075472},
-{2993055,3875076,3875153,0.04572,0.0435428571428571},
-{2993056,3875153,3875808,1.50835714285714,1.45634482758621},
-{2993057,3875057,3875153,0.0827785714285714,1000000},
-{2993058,3874999,3874987,0.0277636363636364,1000000},
-{2993059,3874987,3874888,0.111294117647059,1000000},
-{2993060,3874920,3874987,0.0554689655172414,1000000},
-{2993061,3875087,3875076,1000000,0.0351529411764706},
-{2993062,3875153,3875087,0.146657142857143,1000000},
-{2993086,3848473,3848765,0.173844444444444,0.173844444444444},
-{2993087,3849889,3849920,0.0726176470588235,0.0685833333333333},
-{2993088,3849889,3850348,0.228688888888889,0.228688888888889},
-{2993089,3851556,3851716,0.0447375,0.0447375},
-{2993090,3852132,3852373,0.0989727272727273,0.101274418604651},
-{2993091,3851716,3851988,0.07845,1000000},
-{2993092,3852104,3852103,1000000,0.0158785714285714},
-{2993093,3852103,3852115,1000000,0.072},
-{2993094,3852115,3852132,1000000,0.0203142857142857},
-{2993095,3852103,3852137,0.0104816326530612,1000000},
-{2993096,3852137,3852480,0.0720979591836735,1000000},
-{2993097,3852115,3852137,0.076975,1000000},
-{2993098,3852046,3852104,1000000,0.0153230769230769},
-{2993099,3851988,3852045,0.0343333333333333,1000000},
-{2993100,3851988,3852041,0.0110875,1000000},
-{2993101,3852046,3852041,0.0186222222222222,1000000},
-{2993102,3852041,3852045,0.0352222222222222,1000000},
-{2993108,3851716,3851995,1000000,0.0744418604651163},
-{2993109,3851995,3852046,1000000,0.01329},
-{2993110,3852480,3852140,0.0644423076923077,1000000},
-{2993111,3852140,3852104,0.010776,1000000},
-{2993112,3852045,3852132,0.05605,1000000},
-{2993139,3852753,3853235,0.179105882352941,0.160252631578947},
-{2993140,3853986,3853746,0.1203375,0.142622222222222},
-{2993141,3853746,3852373,1.3808,1.15066666666667},
-{2993145,3853514,3853746,1000000,1000000},
-{2993147,3852753,3853157,1000000,1000000},
-{2993148,3853157,3853514,1000000,1000000},
-{2993149,3853473,3853514,1000000,1000000},
-{2993150,3853157,3853473,1000000,1000000},
-{2993153,3858527,3858478,0.0533666666666667,0.0565058823529412},
-{2993154,3858478,3858107,0.261528,0.242155555555556},
-{2993155,3856976,3856893,0.0612315789473684,0.0612315789473684},
-{2993156,3856893,3856502,0.2747,0.253569230769231},
-{2993157,3856434,3856352,0.0349333333333333,0.0349333333333333},
-{2993158,3856352,3855876,1000000,1000000},
-{2993159,3857416,3857355,0.0486,0.0486},
-{2993160,3857355,3856840,0.461914285714286,0.461914285714286},
-{2993161,3857816,3857748,0.07136,0.07136},
-{2993162,3857748,3857269,0.264225,0.253656},
-{2993163,3857678,3858029,0.264733333333333,0.264733333333333},
-{2993164,3858029,3858101,0.0594,0.0594},
-{2993165,3856352,3856893,0.338616,0.338616},
-{2993166,3856893,3857355,0.3733,0.33597},
-{2993167,3857355,3857748,0.311368421052632,0.2958},
-{2993168,3857748,3858029,0.28232,0.28232},
-{2993169,3858029,3858478,1000000,1000000},
-{2993170,3856699,3856742,0.0216,0.0348},
-{2993171,3856742,3856768,0.113727272727273,0.139},
-{2993172,3856808,3856742,0.08628,0.0958666666666667},
-{2993194,3857868,3857777,0.0395612903225806,0.0681333333333333},
-{2993195,3857764,3857847,0.142872,1000000},
-{2993196,3857847,3857868,0.0340736842105263,1000000},
-{2993197,3857777,3857847,1000000,0.04708},
-{2993198,3857764,3857792,1000000,0.020025},
-{2993199,3857792,3857901,1000000,0.120688888888889},
-{2993200,3858230,3858117,0.03912,1000000},
-{2993201,3857792,3858077,1000000,0.1371},
-{2993202,3857868,3857896,0.0208090909090909,1000000},
-{2993203,3857896,3857952,0.041112,1000000},
-{2993204,3858117,3858077,0.01562,1000000},
-{2993205,3858077,3857901,0.10269,1000000},
-{2993206,3857896,3858077,1000000,0.0742181818181818},
-{2993228,3851959,3852484,0.0829217391304348,0.0880246153846154},
-{2993229,3853163,3852800,0.156345,0.156345},
-{2993230,3853094,3853163,0.0742333333333333,1000000},
-{2993231,3853273,3853239,0.0414352941176471,0.0335428571428571},
-{2993232,3853239,3853163,0.05898,0.0561714285714286},
-{2993233,3853094,3853239,0.0635142857142857,1000000},
-{2993234,3853239,3853290,0.0284307692307692,1000000},
-{2993235,3853290,3853410,0.0383347826086957,1000000},
-{2993236,3853163,3853290,0.048225,1000000},
-{2993237,3853223,3853273,1000000,0.0168117647058824},
-{2993238,3853469,3853324,0.0995555555555555,0.0672},
-{2993239,3853324,3853273,0.0566470588235294,0.0356666666666667},
-{2993240,3853223,3853324,1000000,0.052095652173913},
-{2993241,3853273,3853367,1000000,0.0331875},
-{2993242,3853367,3853410,1000000,0.030192},
-{2993243,3853324,3853367,1000000,0.0594857142857143},
-{2993246,3849782,3849689,0.0405846153846154,0.0416526315789474},
-{2993247,3849689,3849827,1000000,1000000},
-{2993248,3849827,3849860,0.0282230769230769,0.0333545454545455},
-{2993249,3849782,3849827,0.0548888888888889,0.0741},
-{2993250,3870038,3869510,1000000,0.136268571428571},
-{2993251,3869510,3869449,0.0157111111111111,0.01414},
-{2993252,3871913,3871787,0.0552947368421053,0.0618},
-{2993253,3871787,3871456,1000000,0.19832},
-{2993254,3870979,3870936,0.134431578947368,0.12771},
-{2993255,3869510,3870057,1000000,0.14720625},
-{2993256,3870057,3870936,1000000,0.186259090909091},
-{2993259,3858327,3858417,0.0491714285714286,1000000},
-{2993260,3858450,3858417,0.0419785714285714,0.0452076923076923},
-{2993261,3858327,3858450,1000000,0.06452},
-{2993262,3858417,3858406,0.0126526315789474,0.0136075471698113},
-{2993263,3858327,3858406,0.0549789473684211,1000000},
-{2993301,3895757,3895452,0.13411914893617,0.131325},
-{2993302,3895452,3895407,0.018930612244898,0.0206133333333333},
-{2993305,3896235,3895920,0.222432,0.213876923076923},
-{2993307,3895452,3895920,0.342288,1000000},
-{2993316,3888327,3887962,0.19795,1000000},
-{2993334,3895014,3895085,0.033,0.0337674418604651},
-{2993335,3894798,3894813,0.0121111111111111,0.00883783783783784},
-{2993336,3894813,3895014,1000000,0.1303},
-{2993337,3894813,3895014,0.118672727272727,1000000},
-{2993338,3900789,3901140,1000000,0.0880978723404255},
-{2993339,3901687,3901991,1000000,0.0711652173913044},
-{2993423,3888736,3888806,0.0384,1000000},
-{2993424,3888909,3888949,1000000,0.0187636363636364},
-{2993435,3915102,3915173,0.140442857142857,0.0756230769230769},
-{2993436,3915173,3915357,0.0913846153846154,0.0678857142857143},
-{2993437,3915357,3915876,0.150643902439024,0.137253333333333},
-{2993438,3915102,3915357,0.1161375,1000000},
-{2993455,3916905,3916657,0.284086956521739,1000000},
-{2993465,3892782,3893021,0.102175,0.272466666666667},
-{2993466,3893021,3893815,0.402985714285714,0.451344},
-{2993467,3892960,3893021,0.1194,1000000},
-{2993468,3892782,3892929,0.074544,0.07765},
-{2993469,3892929,3893546,0.377382352941176,0.40096875},
-{2993470,3893021,3892929,0.11106,1000000},
-{2993480,3917340,3918265,1000000,1000000},
-{2993481,3917117,3917409,0.1494,0.118641176470588},
-{2993482,3917409,3917467,0.024216,0.0195290322580645},
-{2993514,3916594,3916574,0.00617333333333333,0.00661428571428571},
-{2993515,3916574,3916078,0.172330434782609,1000000},
-{2993516,3916078,3916118,0.0364571428571429,0.0546857142857143},
-{2993517,3916118,3916398,0.202776923076923,0.202776923076923},
-{2993518,3916574,3916118,1000000,0.188057142857143},
-{2993519,3915273,3915313,0.0459529411764706,0.048825},
-{2993520,3915313,3915616,0.199711111111111,0.199711111111111},
-{2993521,3914504,3914562,0.0276545454545455,0.0325928571428571},
-{2993522,3914562,3914787,0.0930307692307692,0.103662857142857},
-{2993523,3915313,3914562,1000000,0.407127272727273},
-{2993524,3914562,3914115,1000000,0.2672},
-{2993525,3914048,3914115,0.0444571428571429,0.0444571428571429},
-{2993526,3914115,3914381,0.3711,0.3711},
-{2993527,3900776,3901165,0.0883411764705882,1000000},
-{2993528,3913425,3913491,0.0347181818181818,0.0363714285714286},
-{2993529,3913491,3913795,0.153275,0.167209090909091},
-{2993530,3914115,3913802,1000000,0.0945627906976744},
-{2993531,3912673,3912749,1000000,0.00978},
-{2993532,3913491,3913015,1000000,0.160969230769231},
-{2993533,3912954,3913015,0.0350842105263158,0.026664},
-{2993540,3912621,3912665,0.00819428571428571,1000000},
-{2993541,3912665,3913887,0.182005714285714,1000000},
-{2993548,3889669,3889770,0.05733,0.04095},
-{2993577,3900925,3900957,0.0104780487804878,0.00914042553191489},
-{2993578,3900957,3901217,1000000,0.0967531914893617},
-{2993579,3901628,3901280,0.24475,0.189483870967742},
-{2993580,3901280,3901217,0.04437,0.0268909090909091},
-{2993581,3900957,3901280,0.100591304347826,1000000},
-{2993582,3901671,3901722,0.0465529411764706,0.0465529411764706},
-{2993583,3901722,3902081,1000000,1000000},
-{2993584,3901280,3901722,0.125649056603774,1000000},
-{2993585,3902542,3902198,0.199915384615385,0.157509090909091},
-{2993586,3902198,3902140,0.06508,0.0443727272727273},
-{2993587,3901722,3902198,0.129047058823529,1000000},
-{2993588,3904389,3904028,1000000,0.152633333333333},
-{2993589,3904469,3904146,0.2418,1000000},
-{2993590,3904028,3904146,0.0496344827586207,1000000},
-{2993591,3905110,3904720,0.229254545454545,0.201744},
-{2993592,3904720,3904638,0.0541,0.0374538461538462},
-{2993593,3905663,3905357,0.205172727272727,0.205172727272727},
-{2993594,3905825,3905540,1000000,1000000},
-{2993595,3905540,3905793,0.072252,1000000},
-{2993597,3853071,3853437,0.313333333333333,0.313333333333333},
-{2993598,3853437,3853882,0.618923076923077,0.618923076923077},
-{2993599,3852755,3853412,0.26448,0.26448},
-{2993600,3853412,3854202,0.387646153846154,0.359957142857143},
-{2993601,3853437,3853412,0.091776,0.0740129032258064},
-{2993602,3903336,3904028,0.3577,1000000},
-{2993603,3903263,3903336,0.0514,0.0402260869565217},
-{2993604,3902140,3902634,1000000,0.129952941176471},
-{2993605,3902634,3903263,1000000,0.175311111111111},
-{2993606,3902198,3902686,0.127557692307692,1000000},
-{2993607,3902686,3903336,0.176844444444444,1000000},
-{2993608,3902634,3902686,0.0449368421052632,0.0656769230769231},
-{2993609,3903336,3903451,0.213541935483871,0.275825},
-{2993610,3903139,3903451,0.168444444444444,0.168444444444444},
-{2993611,3854371,3854107,1000000,1000000},
-{2993612,3854107,3853628,0.228866666666667,0.228866666666667},
-{2993613,3905357,3905475,0.035484,1000000},
-{2993614,3905475,3905540,0.0187882352941177,1000000},
-{2993615,3905414,3905475,0.0291642857142857,0.0371181818181818},
-{2993616,3854827,3854730,0.3192,0.3192},
-{2993617,3850093,3850172,0.0719727272727273,0.05655},
-{2993618,3850193,3850172,0.00773571428571429,0.0103142857142857},
-{2993619,3850193,3850254,0.0390285714285714,0.0292714285714286},
-{2993620,3850257,3850272,0.02744,0.0294},
-{2993621,3853251,3853228,0.0176068965517241,0.0196384615384615},
-{2993622,3853228,3852914,0.171490909090909,1000000},
-{2993623,3852914,3852468,0.299571428571429,1000000},
-{2993624,3852456,3852869,0.226825,1000000},
-{2993625,3852869,3853228,0.189641379310345,1000000},
-{2993626,3852914,3852869,0.0203485714285714,0.0203485714285714},
-{2993627,3864980,3864968,0.00591923076923077,0.00603529411764706},
-{2993628,3864968,3864824,0.0807428571428571,0.082425},
-{2993629,3865255,3865463,1000000,0.250155555555556},
-{2993630,3865463,3865908,0.103624137931034,0.122657142857143},
-{2993631,3861213,3861312,0.0160971428571429,0.0165705882352941},
-{2993632,3862360,3862338,0.00608571428571429,0.00655384615384615},
-{2993633,3862338,3862276,1000000,0.0246235294117647},
-{2993634,3862263,3862338,1000000,0.01536},
-{2993635,3862276,3862263,0.04032,0.0448},
-{2993636,3862077,3862263,1000000,0.0485357142857143},
-{2993647,3887287,3886988,0.1349625,0.208974193548387},
-{2993648,3886988,3886843,1000000,0.0776153846153846},
-{2993649,3886671,3886934,0.140076923076923,0.117483870967742},
-{2993650,3886934,3887702,0.254715789473684,0.24198},
-{2993654,3886988,3886836,0.100755,1000000},
-{2993655,3886836,3886934,0.124354838709677,1000000},
-{2993656,3886843,3886836,0.0814714285714286,1000000},
-{2993657,3887880,3887212,1000000,0.635652631578947},
-{2993658,3887212,3887184,0.0199862068965517,0.0186967741935484},
-{2993659,3887880,3887948,0.0218275862068966,0.0234444444444444},
-{2993660,3887948,3888263,0.112954285714286,0.208073684210526},
-{2993661,3887212,3887948,1000000,0.432878571428571},
-{2993704,3895072,3895162,0.0627,1000000},
-{2993705,3893477,3893562,0.10665,0.1422},
-{2993706,3893562,3893836,0.275685714285714,0.257306666666667},
-{2993707,3893477,3893687,0.104090322580645,0.169831578947368},
-{2993708,3893687,3895900,0.598707692307692,0.610447058823529},
-{2993709,3893562,3893687,0.134504347826087,0.162821052631579},
-{2993716,3867362,3866738,0.558755555555556,0.50288},
-{2993717,3866738,3866493,0.23628,0.23628},
-{2993718,3874390,3874415,1000000,0.0277071428571429},
-{2993719,3874415,3874650,1000000,0.187903448275862},
-{2993720,3874415,3874650,0.416777777777778,0.416777777777778},
-{2993722,3906852,3906880,0.02166,0.0240666666666667},
-{2993723,3906876,3907692,0.217457142857143,0.22833},
-{2993724,3906852,3906789,1000000,0.067425},
-{2993725,3906852,3906734,0.06909,1000000},
-{2993726,3906596,3906625,0.01752,0.0181241379310345},
-{2993727,3906734,3906596,0.07428,1000000},
-{2993728,3906625,3906648,0.0127783783783784,0.01576},
-{2993729,3906648,3907333,0.31728,0.453257142857143},
-{2993730,3906789,3906876,0.0240830769230769,0.02609},
-{2993731,3906648,3906789,0.0555384615384615,1000000},
-{2993741,3874621,3874556,0.0398816326530612,1000000},
-{2993742,3874556,3874481,0.04122,1000000},
-{2993743,3874481,3874254,0.0890689655172414,1000000},
-{2993744,3874621,3874481,0.0634545454545455,1000000},
-{2993745,3873998,3873887,0.0392742857142857,0.06873},
-{2993746,3873998,3873972,1000000,0.0367674418604651},
-{2993747,3873887,3873972,1000000,0.06804375},
-{2993760,3874067,3874037,0.0354,1000000},
-{2993761,3874037,3874058,0.224431034482759,1000000},
-{2993764,3874109,3874235,0.0429315789473684,1000000},
-{2993765,3874235,3874475,0.067365,1000000},
-{2993766,3874936,3874686,1000000,0.136442307692308},
-{2993767,3874686,3874639,1000000,0.0416454545454545},
-{2993784,3901222,3901318,1000000,0.192235714285714},
-{2993785,3901318,3901334,1000000,0.043128},
-{2993799,3901250,3901169,0.0255090909090909,0.0290275862068965},
-{2993800,3901169,3901121,1000000,0.074235},
-{2993801,3901169,3901225,0.0536653846153846,1000000},
-{2993811,3901005,3901030,0.0402818181818182,0.0402818181818182},
-{2993812,3901250,3901271,1000000,0.119535483870968},
-{2993813,3901225,3901271,0.0148947368421053,1000000},
-{2993819,3901271,3901278,0.0107275862068965,0.0141409090909091},
-{2993820,3901278,3901283,0.00597931034482759,0.00770666666666667},
-{2993836,3901516,3901584,0.070110447761194,0.070110447761194},
-{2993837,3902213,3902445,0.266953846153846,0.2169},
-{2993838,3901329,3901921,0.4528,0.3396},
-{2993839,3901921,3901981,1000000,0.0400588235294118},
-{2993840,3901921,3902213,0.19498064516129,1000000},
-{2993847,3901584,3901814,0.224408955223881,1000000},
-{2993848,3901814,3901921,0.0693545454545455,1000000},
-{2993849,3901916,3901584,0.2464,1000000},
-{2993850,3902213,3901981,0.198203225806452,1000000},
-{2993851,3901981,3901916,0.0480184615384615,1000000},
-{2993855,3903510,3903389,0.0626933333333333,0.0641181818181818},
-{2993856,3903389,3903234,0.0773581395348837,0.0792},
-{2993857,3903278,3903533,0.22743,0.22743},
-{2993858,3903533,3904127,0.4217,0.330026086956522},
-{2993859,3903389,3903533,0.170242105263158,0.154028571428571},
-{2993860,3867462,3867570,0.0760090909090909,0.0760090909090909},
-{2993861,3867570,3867810,0.291652173913043,0.291652173913043},
-{2993862,3867918,3867581,0.1997,0.1997},
-{2993863,3867581,3867462,0.0868,0.0868},
-{2993864,3867570,3867581,0.0349333333333333,0.0349333333333333},
-{2993865,3903976,3903950,0.0408214285714286,0.047625},
-{2993866,3903950,3903709,0.123135483870968,0.12724},
-{2993928,3880571,3880665,0.08245,0.0706714285714286},
-{2993929,3880665,3880751,0.0678642857142857,0.0575818181818182},
-{2993930,3880665,3880162,0.420533333333333,0.420533333333333},
-{2993934,3898330,3898303,0.0169384615384615,0.0231789473684211},
-{2993935,3898303,3898190,0.07575,0.101},
-{2993936,3898413,3898494,0.0364528301886792,1000000},
-{2993937,3898303,3898494,0.0887739130434783,1000000},
-{2993939,3898458,3898539,1000000,0.0565666666666667},
-{2993950,3905676,3905267,0.207866666666667,0.207866666666667},
-{2993951,3904463,3904373,0.470977777777778,0.470977777777778},
-{2993952,3904373,3904468,0.093,0.093},
-{2993953,3892725,3892335,0.134128571428571,1000000},
-{2993956,3905709,3906009,0.21725,0.21725},
-{2993957,3905539,3905798,0.103777777777778,0.103777777777778},
-{2993958,3905798,3906355,0.33009,0.33009},
-{2993963,3896556,3896666,0.11174693877551,0.114075},
-{2993964,3896666,3896682,0.01098,0.0114375},
-{2993968,3896238,3896461,1000000,1000000},
-{2993969,3896461,3896666,1000000,1000000},
-{2993970,3889601,3889989,0.343909090909091,1000000},
-{2993971,3889148,3889344,0.168917647058824,0.130527272727273},
-{2993972,3889217,3889344,1000000,0.0333136363636364},
-{2993973,3889344,3889601,1000000,0.0676090909090909},
-{2993974,3890974,3891528,0.7206,0.526592307692308},
-{2993975,3890287,3890974,0.23412,1000000},
-{2993976,3888120,3888353,0.141,1000000},
-{2993977,3887088,3887261,0.0429804878048781,1000000},
-{2993978,3888509,3889266,0.173059090909091,1000000},
-{2993979,3885835,3886111,0.0628883720930233,1000000},
-{2993980,3886467,3886721,0.226915384615385,0.453830769230769},
-{2993981,3886111,3886467,0.108405,1000000},
-{2993982,3886467,3887088,0.19074,1000000},
-{2993983,3886345,3886438,0.233290909090909,1000000},
-{2993984,3886438,3887071,1000000,0.173293333333333},
-{2993985,3887607,3887909,1000000,1000000},
-{2993986,3887909,3888050,1000000,1000000},
-{2993987,3888030,3888169,0.0524,0.0524},
-{2993988,3888030,3887871,1000000,1000000},
-{2993989,3887871,3887570,1000000,1000000},
-{2993990,3888169,3888216,0.0188222222222222,0.0188222222222222},
-{2993991,3883671,3883242,0.262637837837838,0.373753846153846},
-{2993992,3883706,3883275,0.154606451612903,1000000},
-{2993993,3892725,3892778,1000000,0.0127894736842105},
-{2993996,3883671,3883706,1000000,0.0404275862068965},
-{2993997,3883766,3883820,0.0240230769230769,0.0231333333333333},
-{2993998,3883820,3884195,0.14358,0.253376470588235},
-{2994001,3883798,3883766,1000000,0.03348},
-{2994002,3883820,3883798,0.0474,1000000},
-{2994009,3889989,3890192,0.2786,1000000},
-{2994010,3890192,3890226,0.0732428571428571,1000000},
-{2994011,3889601,3890114,1000000,0.13515},
-{2994031,3904315,3904398,0.0351490909090909,0.0364754716981132},
-{2994032,3904398,3904509,0.04512,0.049632},
-{2994033,3904305,3904398,0.07864,0.0453692307692308},
-{2994040,3917292,3917333,0.0423529411764706,1000000},
-{2994041,3917333,3917319,0.00954705882352941,1000000},
-{2994042,3875241,3875217,0.0141918367346939,1000000},
-{2994043,3874470,3874931,0.1631625,0.326325},
-{2994044,3875030,3875217,1000000,0.0529142857142857},
-{2994045,3875828,3875348,0.113315789473684,1000000},
-{2994046,3875348,3875241,0.038316,1000000},
-{2994047,3875177,3875143,0.107811111111111,1000000},
-{2994048,3875869,3875433,1000000,0.0979928571428571},
-{2994049,3875247,3875222,1000000,0.102905454545455},
-{2994050,3875177,3875247,0.04173,1000000},
-{2994051,3875247,3875433,0.59766,1000000},
-{2994052,3875433,3875348,0.07808,1000000},
-{2994053,3875241,3875030,0.06996,1000000},
-{2994054,3875030,3874931,0.0288558139534884,1000000},
-{2994055,3874931,3875072,0.06232,1000000},
-{2994056,3875072,3875177,0.0832,1000000},
-{2994057,3875278,3875261,1000000,0.0069},
-{2994058,3875261,3875247,1000000,0.0138588235294118},
-{2994059,3875072,3875196,0.0765789473684211,1000000},
-{2994066,3875433,3875303,1000000,0.0429576923076923},
-{2994067,3875303,3875278,1000000,0.014556},
-{2994086,3917333,3917522,0.0623142857142857,1000000},
-{2994087,3917522,3918367,0.223119230769231,1000000},
-{2994096,3887514,3887964,0.1821,0.130071428571429},
-{2994097,3888353,3888439,0.0371414634146341,1000000},
-{2994098,3888439,3888715,0.111146666666667,0.128246153846154},
-{2994099,3888150,3888703,1000000,1000000},
-{2994100,3888509,3888427,1000000,1000000},
-{2994101,3888284,3888509,0.0548048780487805,1000000},
-{2994102,3887964,3888150,1000000,0.0646666666666667},
-{2994103,3888150,3888223,1000000,0.0323636363636364},
-{2994104,3888223,3888284,1000000,0.039104347826087},
-{2994105,3888284,3888427,1000000,0.2323125},
-{2994106,3888427,3888439,1000000,0.0646666666666667},
-{2994107,3888091,3888120,0.0257225806451613,1000000},
-{2994110,3873721,3873594,0.07107,0.0804566037735849},
-{2994112,3873305,3873411,0.0804537313432836,1000000},
-{2994115,3883596,3883865,0.160533333333333,0.115584},
-{2994116,3883793,3883865,1000000,0.31528},
-{2994117,3883865,3883887,1000000,0.128414634146341},
-{2994119,3905973,3906025,0.143113043478261,0.10972},
-{2994120,3905088,3905630,0.312183333333333,1000000},
-{2994121,3905630,3905751,0.09147,1000000},
-{2994122,3905140,3905660,1000000,0.277723076923077},
-{2994123,3905660,3905751,1000000,0.0556545454545454},
-{2994132,3887071,3887232,1000000,0.03744},
-{2994136,3900961,3900859,0.070775,0.0585724137931034},
-{2994137,3900604,3900200,0.2646,0.257448648648649},
-{2994138,3900653,3900666,0.0110526315789474,0.013125},
-{2994139,3887964,3888036,0.0640105263157895,1000000},
-{2994140,3888036,3888091,0.07398,1000000},
-{2994141,3888223,3888490,1000000,0.0760764705882353},
-{2994142,3888490,3889217,1000000,0.181245},
-{2994143,3900593,3900578,0.00640434782608696,0.0061375},
-{2994144,3900578,3900501,0.0419632653061225,0.0501512195121951},
-{2994145,3900610,3900578,1000000,0.0282947368421053},
-{2994146,3900606,3900593,0.00730666666666667,0.00671020408163265},
-{2994147,3900859,3900681,0.18696,0.107861538461538},
-{2994148,3900653,3900604,0.0534461538461538,0.0496285714285714},
-{2994151,3900681,3900649,1000000,0.0162},
-{2994152,3900649,3900610,1000000,0.0231},
-{2994153,3900681,3900669,0.0372260869565217,0.0389181818181818},
-{2994154,3900669,3900653,0.01895,0.0197739130434783},
-{2994155,3900649,3900669,0.0424333333333333,1000000},
-{2994158,3883766,3883741,1000000,0.0176076923076923},
-{2994159,3883741,3883671,1000000,0.0375130434782609},
-{2994160,3883766,3883731,0.00906666666666667,1000000},
-{2994161,3883731,3883706,0.00991578947368421,1000000},
-{2994163,3889620,3890152,0.2936,1000000},
-{2994173,3892358,3892769,0.137473170731707,1000000},
-{2994194,3890774,3890874,0.0637833333333333,0.15308},
-{2994195,3890874,3890951,0.054195,0.0802888888888889},
-{2994196,3890860,3890774,1000000,0.0248093023255814},
-{2994197,3890874,3890860,0.0827793103448276,1000000},
-{2994198,3890704,3890813,1000000,0.0341675675675676},
-{2994199,3890813,3891579,1000000,0.256215789473684},
-{2994210,3883865,3883891,1000000,1000000},
-{2994211,3883891,3883917,1000000,1000000},
-{2994214,3883480,3883991,0.237104347826087,0.18178},
-{2994215,3891206,3891355,0.0610390243902439,1000000},
-{2994216,3891355,3891460,0.0748758620689655,1000000},
-{2994217,3891460,3891562,0.0778333333333333,0.07005},
-{2994218,3891355,3891562,0.0630818181818182,1000000},
-{2994219,3891562,3891746,0.0555913043478261,1000000},
-{2994220,3891597,3891746,1000000,0.080205},
-{2994221,3891562,3891597,0.0795157894736842,0.0487354838709677},
-{2994222,3891515,3891597,1000000,0.04955},
-{2994223,3891515,3891757,0.122007692307692,0.109386206896552},
-{2994224,3891746,3891968,0.102216,0.102216},
-{2994225,3891968,3893008,0.557822222222222,0.568347169811321},
-{2994226,3891460,3891968,1.05222,1.05222},
-{2994227,3883991,3884014,0.02748,0.00947586206896552},
-{2994228,3884014,3884039,0.02418,0.00863571428571429},
-{2994229,3891206,3891360,1000000,0.0695586206896552},
-{2994230,3891360,3891515,1000000,0.07192},
-{2994231,3891230,3891360,0.131466666666667,0.131466666666667},
-{2994232,3883913,3883934,1000000,0.1052125},
-{2994233,3883742,3883792,1000000,0.287961290322581},
-{2994234,3883792,3883793,1000000,0.0137375},
-{2994235,3895900,3895932,0.00971052631578948,0.00753061224489796},
-{2994236,3895932,3896591,0.163608,1000000},
-{2994237,3896591,3897564,0.1908,1000000},
-{2994238,3897564,3898228,0.117796721311475,0.133066666666667},
-{2994239,3895932,3896587,1000000,0.151876363636364},
-{2994240,3896587,3897564,1000000,0.20167868852459},
-{2994241,3883542,3884043,0.275115789473684,0.275115789473684},
-{2994242,3884096,3884043,0.318522580645161,1000000},
-{2994243,3884043,3883991,0.375911111111111,1000000},
-{2994244,3901647,3901770,0.1038,0.0481928571428571},
-{2994245,3901756,3901770,0.0347333333333333,0.02605},
-{2994246,3901647,3901756,1000000,0.0550838709677419},
-{2994247,3901207,3901613,0.136909090909091,0.110195121951219},
-{2994248,3901613,3901647,0.0252,0.0118588235294118},
-{2994249,3901808,3901956,0.154764705882353,0.1754},
-{2994250,3884043,3884069,0.0137142857142857,0.0144},
-{2994251,3884069,3884106,0.0161428571428571,0.01695},
-{2994252,3884177,3884153,1000000,1000000},
-{2994257,3884128,3884130,0.18668275862069,1000000},
-{2994258,3884130,3884096,0.150763636363636,1000000},
-{2994259,3883845,3883808,1000000,0.226545},
-{2994260,3883808,3883798,1000000,0.0158307692307692},
-{2994261,3883706,3883726,1000000,0.0340695652173913},
-{2994262,3883726,3883742,1000000,0.0152454545454545},
-{2994263,3902336,3901578,0.579955555555556,0.579955555555556},
-{2994264,3902336,3902426,1000000,0.07078125},
-{2994265,3902426,3902393,1000000,0.067725},
-{2994277,3901435,3901525,0.275348571428571,1000000},
-{2994278,3901493,3901503,0.01569375,0.0152181818181818},
-{2994279,3901525,3901508,0.0498222222222222,1000000},
-{2994280,3901508,3901503,0.0567111111111111,1000000},
-{2994281,3901416,3901449,1000000,0.0138444444444444},
-{2994282,3901449,3901493,1000000,0.0215793103448276},
-{2994283,3901508,3901449,0.0258,1000000},
-{2994311,3912055,3912638,0.161106976744186,0.164942857142857},
-{2994312,3911427,3911913,0.259628571428571,0.259628571428571},
-{2994313,3911913,3912055,0.108176470588235,0.1149375},
-{2994314,3911979,3911650,1000000,0.133508108108108},
-{2994315,3912055,3911979,0.02244,0.0236210526315789},
-{2994316,3911979,3911846,0.038295,1000000},
-{2994317,3911315,3911611,0.243466666666667,0.230652631578947},
-{2994318,3911611,3911650,0.0582,0.0623571428571429},
-{2994319,3911846,3911611,0.0961028571428572,1000000},
-{2994330,3857952,3858139,0.05844,1000000},
-{2994331,3858139,3858737,0.141159183673469,1000000},
-{2994332,3910308,3910609,0.0858127659574468,0.084025},
-{2994333,3910609,3910653,0.015306976744186,0.0137125},
-{2994334,3911611,3910609,0.501696,1000000},
-{2994335,3904146,3904275,0.0512926829268293,1000000},
-{2994336,3904275,3904720,0.135492,1000000},
-{2994339,3904720,3904875,0.0421584905660377,1000000},
-{2994340,3904875,3905357,0.141894339622642,1000000},
-{2994350,3884107,3884148,1000000,0.0312486486486486},
-{2994379,3870938,3870942,0.0774,0.06966},
-{2994381,3904777,3904625,0.222644444444444,0.222644444444444},
-{2994383,3884153,3884128,1000000,1000000},
-{2994384,3884208,3884177,1000000,1000000},
-{2994385,3872807,3872731,0.0206909090909091,0.02276},
-{2994386,3872731,3872701,0.00853333333333333,0.00903529411764706},
-{2994387,3870864,3870382,1000000,1000000},
-{2994388,3901975,3902036,0.0132615384615385,1000000},
-{2994391,3902789,3902934,0.0286867924528302,1000000},
-{2994393,3874905,3875155,0.12312,1000000},
-{2994395,3894912,3894969,0.0320727272727273,1000000},
-{2994396,3894956,3894969,1000000,0.025175},
-{2994398,3878406,3878333,0.0201285714285714,0.0301928571428571},
-{2994399,3868904,3868927,0.0326228571428571,1000000},
-{2994400,3878230,3878290,1000000,0.0502137931034483},
-{2994402,3872435,3872346,1000000,0.0408222222222222},
-{2994403,3858895,3859085,0.0651428571428571,0.0675555555555555},
-{2994404,3864470,3864463,0.0974857142857143,1000000},
-{2994407,3875196,3875261,0.0423428571428571,1000000},
-{2994408,3886299,3886466,0.22206,0.22206},
-{2994409,3886466,3886476,0.23574,0.23574},
-{2994410,3887443,3887457,0.18606,0.18606},
-{2994411,3886466,3887294,1000000,1000000},
-{2994412,3887294,3887457,1000000,1000000},
-{2994413,3886248,3887238,0.302738461538462,0.327966666666667},
-{2994414,3887238,3887418,0.0554756756756757,0.0488714285714286},
-{2994415,3887294,3887238,1000000,1000000},
-{2994416,3888841,3889095,0.0462888888888889,0.0480692307692308},
-{2994417,3887457,3888797,1000000,1000000},
-{2994418,3888797,3888786,1000000,1000000},
-{2994419,3882469,3882501,1000000,1000000},
-{2994420,3882501,3882881,1000000,0.26193},
-{2994423,3900565,3900670,1000000,0.0347230769230769},
-{2994425,3885988,3885991,1000000,0.0144305084745763},
-{2994426,3869267,3869196,0.0143555555555556,1000000},
-{2994427,3869279,3869216,1000000,0.01756},
-{2994428,3873091,3872978,1000000,0.02908},
-{2994429,3873217,3873108,0.0267782608695652,1000000},
-{2994430,3876231,3876245,0.016275,1000000},
-{2994431,3876178,3876188,1000000,0.015588},
-{2994432,3878079,3878066,0.019425,1000000},
-{2994433,3878162,3878150,1000000,0.0166978723404255},
-{2994434,3852041,3852103,0.0126122448979592,1000000},
-{2994435,3875217,3875196,0.009775,1000000},
-{2994436,3875196,3875177,0.012734693877551,1000000},
-{2994438,3904028,3903956,1000000,0.0327},
-{2994439,3904146,3904066,0.0362516129032258,1000000},
-{2994444,3885248,3885372,0.0362057142857143,1000000},
-{2994445,3892945,3893049,1000000,0.0310266666666667},
-{2994446,3900506,3900597,0.0304565217391304,1000000},
-{2994447,3892849,3892950,0.0247659574468085,1000000},
-{2994448,3888091,3888223,1000000,0.0345},
-{2994449,3888120,3888284,0.0425692307692308,1000000},
-{2994450,3885253,3885345,1000000,0.0252585365853659},
-{3014035,3891449,3891796,0.16048,0.138876923076923},
-{3014036,3891310,3891717,0.27231724137931,0.376057142857143},
-{3014039,3915615,3915646,1000000,0.02604},
-{3014040,3915646,3915721,1000000,0.0398608695652174},
-{3014041,3915287,3915176,0.0660222222222222,0.0660222222222222},
-{3014042,3915224,3915615,1000000,0.167258823529412},
-{3014043,3915287,3915224,0.1119375,1000000},
-{3014044,3915646,3915619,0.0267461538461538,1000000},
-{3014131,3886587,3886700,0.1491,0.156947368421053},
-{3014132,3915619,3915287,0.279473684210526,1000000},
-{3014139,3886737,3886784,0.07782,0.07782},
-{3014140,3886587,3887275,0.434318181818182,0.415434782608696},
-{3014141,3887275,3887109,0.2371,0.218861538461538},
-{3014142,3887275,3887507,0.149444444444444,0.149444444444444},
-{3014143,3902634,3902496,0.0788888888888889,0.0788888888888889},
-{3014969,3847751,3847735,0.2982,0.2982},
-{3014970,3848117,3848096,0.259577777777778,0.259577777777778},
-{3014986,3853318,3853473,1000000,1000000},
-{3015067,3854520,3854256,0.174969230769231,0.168488888888889},
-{3015068,3854256,3854240,0.0121111111111111,0.0112758620689655},
-{3015069,3854202,3853944,0.387860869565217,0.356832},
-{3015070,3853944,3853882,0.12012,0.1092},
-{3015071,3854282,3854041,0.24492,0.233257142857143},
-{3015072,3854041,3853990,0.0797076923076923,0.0609529411764706},
-{3015073,3853990,3853899,0.0577826086956522,0.055375},
-{3015074,3853944,3853990,0.0754,0.05655},
-{3015084,3859150,3856982,1.02944444444444,1.02944444444444},
-{3015085,3856982,3856808,0.165371428571429,0.157854545454545},
-{3015102,3876121,3875862,0.5841,0.676326315789474},
-{3015380,3883054,3883650,0.464223529411765,0.464223529411765},
-{3015480,3886784,3887208,1.1694,1.1694},
-{3015481,3887208,3886784,1.6302,1.6302},
-{3015750,3849212,3848433,0.370883333333333,0.351363157894737},
-{3015756,3888915,3888872,0.0169615384615385,0.018375},
-{3015757,3865463,3865318,1000000,0.127748275862069},
-{3015758,3865318,3865279,1000000,0.0280392857142857},
-{3015759,3865255,3865318,1000000,0.0271428571428571},
-{3015760,3888665,3888850,1000000,0.0946071428571429},
-{3015801,3877798,3877709,1000000,0.996138461538462},
-{3015894,3849849,3849889,0.1499625,0.145418181818182},
-{3015895,3850172,3849999,0.112704,0.122504347826087},
-{3015896,3849999,3849844,0.09745,0.09745},
-{3015897,3849849,3849999,0.23196,0.23196},
-{3015926,3850257,3850254,0.00809032258064516,0.00836},
-{3015930,3848675,3848473,0.227688888888889,0.227688888888889},
-{3015973,3875312,3875228,1000000,0.117692307692308},
-{3015974,3875228,3875213,1000000,0.0218857142857143},
-{3015975,3887059,3885943,1000000,0.187697142857143},
-{3015976,3885943,3885679,1000000,0.0365828571428571},
-{3016009,3891623,3891760,0.0938896551724138,0.0878322580645161},
-{3016212,3864222,3864236,0.0251333333333333,0.0357157894736842},
-{3016249,3860665,3860628,0.0562166666666667,1000000},
-{3016250,3860628,3860622,0.0191842105263158,1000000},
-{3016251,3860628,3860754,1000000,0.0967285714285714},
-{3016289,3848797,3848851,0.22674,0.22674},
-{3016290,3848869,3848910,0.0924,0.0924},
-{3016293,3848830,3848869,0.0792222222222222,0.0792222222222222},
-{3016294,3848670,3848830,0.157933333333333,0.157933333333333},
-{3016297,3848705,3848792,0.0494,0.0494},
-{3016298,3848792,3848830,0.0559111111111111,0.0559111111111111},
-{3016299,3848792,3848797,0.22176,0.22176},
-{3016348,3900103,3900128,0.0212769230769231,1000000},
-{3016456,3868552,3868585,1000000,0.0251307692307692},
-{3016457,3868585,3868967,1000000,0.227030769230769},
-{3016577,3887239,3887327,1000000,0.01488},
-{3016578,3887327,3887477,1000000,0.0249230769230769},
-{3016579,3887404,3887366,1000000,0.00679714285714286},
-{3016580,3887366,3887312,1000000,0.00823714285714286},
-{3016595,3894969,3895005,1000000,0.0258285714285714},
-{3016596,3866123,3866170,1000000,0.0169371428571429},
-{3016597,3866170,3866208,1000000,0.0103885714285714},
-{3016762,3864204,3864270,0.105252631578947,0.0571371428571429},
-{3016763,3864270,3864310,0.0397285714285714,0.0347625},
-{3016769,3864753,3864696,0.0164647058823529,1000000},
-{3017032,3850017,3850353,0.102326086956522,0.112071428571429},
-{3017033,3850634,3850663,0.00898235294117647,0.00954375},
-{3017034,3850663,3850814,0.0504352941176471,0.0553161290322581},
-{3017096,3852648,3853016,0.266288888888889,0.266288888888889},
-{3017097,3853016,3853692,0.377044444444444,0.377044444444444},
-{3017098,3853692,3853293,0.190240909090909,0.186013333333333},
-{3017099,3853293,3852629,0.238346666666667,0.238346666666667},
-{3017100,3853016,3853293,1000000,1000000},
-{3017106,3851989,3852613,0.37435,0.408381818181818},
-{3017107,3852613,3852633,0.0206,0.02124375},
-{3017113,3852613,3852528,1000000,1000000},
-{3017123,3853853,3853368,1000000,1000000},
-{3017125,3853417,3853368,0.0792,0.0792},
-{3017142,3854228,3854102,0.245123076923077,0.245123076923077},
-{3017143,3854102,3853916,0.258133333333333,0.258133333333333},
-{3017144,3854586,3854228,0.155742857142857,0.167723076923077},
-{3017145,3854228,3854155,0.03056,0.036672},
-{3017148,3854838,3854857,0.201177777777778,0.201177777777778},
-{3017149,3855160,3854838,1000000,1000000},
-{3017150,3854838,3854267,1000000,1000000},
-{3017182,3852393,3852637,0.14655,0.154263157894737},
-{3017183,3852637,3852558,0.0918666666666667,0.0918666666666667},
-{3017184,3852907,3852578,0.1725,0.20125},
-{3017185,3852578,3852219,0.210744,0.210744},
-{3017186,3855946,3855663,0.199133333333333,0.199133333333333},
-{3017187,3855663,3855614,0.0423777777777778,0.0423777777777778},
-{3017188,3854717,3854818,0.283992857142857,0.283992857142857},
-{3017190,3855663,3855198,1000000,1000000},
-{3017191,3855198,3854818,1000000,1000000},
-{3017192,3855296,3855194,0.09925,0.0882222222222222},
-{3017193,3855194,3855186,0.0212769230769231,0.0190758620689655},
-{3017194,3855186,3855660,0.268722580645161,0.260325},
-{3017213,3899136,3899054,0.0188571428571429,0.0203076923076923},
-{3017214,3899054,3898678,0.106492682926829,0.103957142857143},
-{3017215,3899226,3898721,0.212378571428571,1000000},
-{3017307,3854316,3854504,0.145111111111111,0.145111111111111},
-{3017311,3854504,3854231,0.121622222222222,0.121622222222222},
-{3017317,3857090,3857106,0.164815384615385,1000000},
-{3017322,3858587,3857779,0.308290909090909,0.322971428571429},
-{3017323,3857779,3857510,0.06531,0.06531},
-{3017324,3858742,3857956,0.30484,0.295006451612903},
-{3017325,3857956,3856809,0.417064285714286,0.417064285714286},
-{3017326,3857779,3857956,1000000,1000000},
-{3017332,3853167,3853172,1000000,0.053},
-{3017333,3853307,3853304,1000000,0.0104275862068966},
-{3017334,3853304,3853167,1000000,0.06604},
-{3017639,3864686,3865008,0.391285714285714,0.148054054054054},
-{3017815,3895201,3895260,0.0302428571428571,1000000},
-{3017816,3895260,3895285,0.0128863636363636,1000000},
-{3017817,3895285,3895327,0.0214636363636364,1000000},
-{3018024,3893119,3893536,0.166388571428571,0.142039024390244},
-{3018025,3893536,3893621,0.0371828571428571,0.04066875},
-{3018026,3893536,3893623,1000000,0.162514285714286},
-{3018027,3906025,3905762,0.131377777777778,0.12231724137931},
-{3018028,3905762,3906596,0.527876470588235,0.527876470588235},
-{3018029,3905762,3904793,0.553116279069767,0.609846153846154},
-{3018039,3854095,3853165,1000000,0.536958620689655},
-{3018040,3853972,3853069,0.30174,0.486677419354839},
-{3018041,3853069,3852367,0.199376470588235,0.221047826086957},
-{3018042,3853165,3853069,1000000,0.106114285714286},
-{3018043,3853165,3853234,0.0433333333333333,0.0433333333333333},
-{3018132,3853086,3852457,0.569111111111111,0.569111111111111},
-{3018133,3852457,3852430,0.0300666666666667,0.0300666666666667},
-{3018134,3855660,3855708,1000000,1000000},
-{3018135,3855345,3855572,1000000,1000000},
-{3018136,3855761,3855743,1000000,0.49984},
-{3018137,3856428,3856870,0.58536,0.509008695652174},
-{3018138,3856870,3857120,0.086341935483871,0.086341935483871},
-{3018139,3856515,3856446,0.179664,0.21910243902439},
-{3018140,3856446,3856428,0.207976744186047,0.218121951219512},
-{3018141,3855795,3856446,1000000,1000000},
-{3018142,3856446,3856870,1000000,1000000},
-{3018148,3851476,3852150,0.400105263157895,0.475125},
-{3018149,3852150,3852450,0.139281818181818,0.133226086956522},
-{3018150,3852533,3852150,0.4556,0.4556},
-{3018151,3850986,3850179,0.371222222222222,0.3855},
-{3018152,3850179,3850077,0.0651130434782609,0.0680727272727273},
-{3018153,3851305,3850192,0.496711111111111,0.496711111111111},
-{3018154,3850192,3850123,0.0336444444444444,0.0336444444444444},
-{3018155,3850179,3850192,1000000,1000000},
-{3018156,3850717,3851017,1000000,1000000},
-{3018157,3851480,3851017,0.297666666666667,0.297666666666667},
-{3018158,3851017,3850986,0.019,0.019},
-{3018159,3850788,3851159,0.1802,0.1802},
-{3018160,3851614,3851565,0.0238444444444444,0.0292636363636364},
-{3018161,3851393,3851879,1000000,1000000},
-{3018162,3851879,3852134,1000000,1000000},
-{3018163,3852079,3851879,0.251711111111111,0.251711111111111},
-{3018164,3852134,3852213,0.28125,0.28125},
-{3018165,3852213,3852079,0.136338461538462,0.122234482758621},
-{3018166,3852079,3851614,0.535525,0.535525},
-{3018177,3852528,3852430,1000000,1000000},
-{3018182,3851480,3851830,1000000,1000000},
-{3018186,3852407,3851602,0.292675862068966,0.292675862068966},
-{3018187,3851602,3850434,0.511288888888889,0.511288888888889},
-{3018188,3851830,3851561,0.282235714285714,0.282235714285714},
-{3018189,3851561,3851453,0.0388551724137931,0.0512181818181818},
-{3018190,3851602,3851561,1000000,1000000},
-{3018191,3852675,3853678,0.388548387096774,0.4015},
-{3018192,3853678,3854194,0.322575,0.3519},
-{3018193,3853404,3853678,0.393088888888889,0.393088888888889},
-{3018194,3853401,3853080,0.210041379310345,0.20304},
-{3018195,3853080,3852855,0.274524324324324,0.290211428571429},
-{3018196,3852747,3853080,0.350644444444444,0.350644444444444},
-{3018197,3856745,3856639,0.3366,0.3366},
-{3018198,3856362,3856745,0.310933333333333,0.310933333333333},
-{3018199,3856740,3856745,0.0706,0.0706},
-{3018204,3854622,3854828,0.24501,0.24501},
-{3018205,3854828,3854895,0.3229,0.38748},
-{3018206,3854514,3854565,0.0536,0.0536},
-{3018207,3854565,3854828,0.3681,0.3681},
-{3018208,3854565,3854468,0.136938461538462,0.136938461538462},
-{3018209,3854093,3854468,0.174133333333333,0.174133333333333},
-{3018210,3854468,3854485,0.0541090909090909,0.0541090909090909},
-{3018211,3854779,3854485,0.1842,0.1842},
-{3018212,3854425,3854485,0.0816444444444444,0.0816444444444444},
-{3018213,3854156,3854425,0.120866666666667,0.120866666666667},
-{3018214,3854437,3854425,0.0479555555555555,0.0479555555555555},
-{3018215,3854895,3854706,0.144725,0.151017391304348},
-{3018216,3854437,3854656,0.146511111111111,0.146511111111111},
-{3018217,3854412,3854437,0.158,0.158},
-{3018218,3854706,3854628,0.05856,0.061},
-{3018219,3854628,3854486,0.105965217391304,0.128273684210526},
-{3018220,3854412,3854628,0.130933333333333,0.130933333333333},
-{3018221,3858278,3858223,0.03966,0.0344869565217391},
-{3018222,3858223,3857372,0.418173913043478,0.4809},
-{3018223,3906403,3907173,0.375192857142857,0.375192857142857},
-{3018224,3907173,3908272,0.47374,0.418005882352941},
-{3018225,3906662,3907479,0.314945454545455,0.3247875},
-{3018226,3907479,3908743,0.396707692307692,0.429766666666667},
-{3018227,3907173,3907479,0.298863157894737,0.298863157894737},
-{3018228,3901655,3902090,1000000,1000000},
-{3018229,3902090,3902410,0.162577777777778,0.162577777777778},
-{3018230,3899545,3900150,1000000,0.195232258064516},
-{3018231,3900165,3899545,0.389177777777778,0.389177777777778},
-{3018234,3860098,3860366,0.178695652173913,0.178695652173913},
-{3018235,3860366,3860408,0.033792,0.033792},
-{3018236,3860867,3860366,0.286933333333333,0.286933333333333},
-{3018237,3869530,3869525,0.0347625,0.0505636363636364},
-{3018238,3869525,3869514,0.141,0.235},
-{3018239,3871755,3870887,0.626953846153846,0.354365217391304},
-{3018240,3870887,3870875,0.020592,0.0270947368421053},
-{3018247,3885372,3885401,1000000,0.05255625},
-{3018248,3885401,3885456,1000000,0.169220689655172},
-{3018255,3871799,3871846,1000000,0.0331692307692308},
-{3018256,3871700,3871846,0.0651714285714286,1000000},
-{3018264,3890061,3890174,0.048727868852459,0.0540436363636364},
-{3018265,3890174,3890221,0.015984375,0.0200588235294118},
-{3018266,3885054,3885162,0.0483365853658537,0.0460883720930233},
-{3018267,3885162,3885493,0.144,0.171428571428571},
-{3018268,3885054,3885445,0.152076923076923,1000000},
-{3018269,3885445,3885835,0.111876923076923,1000000},
-{3018270,3885162,3885445,0.132765517241379,1000000},
-{3018271,3883321,3883414,1000000,0.0380428571428571},
-{3018272,3883414,3883658,1000000,0.108342857142857},
-{3018273,3883414,3883419,0.0599657142857143,1000000},
-{3018274,3883280,3883355,0.0396,1000000},
-{3018275,3883355,3883610,0.101586666666667,1000000},
-{3018276,3885737,3886427,0.6133,0.525685714285714},
-{3018277,3885920,3885737,0.078075,0.074952},
-{3018278,3885737,3885410,1000000,1000000},
-{3018280,3859200,3859167,0.01034,0.01034},
-{3018281,3859167,3859035,1000000,0.075925},
-{3018282,3899403,3899363,0.0186333333333333,1000000},
-{3018283,3899307,3899557,1000000,0.126758490566038},
-{3018284,3899363,3899307,0.01848,1000000},
-{3018285,3899683,3899852,0.0618727272727273,0.10209},
-{3018286,3899852,3900171,0.0936923076923077,0.126},
-{3018314,3864463,3864646,0.07168,1000000},
-{3018315,3859115,3858706,0.1169,1000000},
-{3018320,3859258,3859115,0.0403692307692308,1000000},
-{3018321,3859315,3859258,0.0204166666666667,1000000},
-{3018322,3884683,3884745,0.0829578947368421,1000000},
-{3018452,3864015,3864032,0.0397636363636364,1000000},
-{3018453,3864032,3864380,0.338028571428571,1000000},
-{3018462,3865144,3865247,0.046944,0.0335314285714286},
-{3018463,3865247,3865328,0.0332647058823529,0.039},
-{3018464,3865247,3865285,1000000,0.071},
-{3018465,3865285,3865315,1000000,0.0424384615384615},
-{3018466,3865213,3865021,0.15804,0.15804},
-{3018467,3864470,3864328,0.0934363636363636,1000000},
-{3018468,3864328,3864310,0.0144,1000000},
-{3018469,3864270,3864328,0.0400636363636364,1000000},
-{3018470,3864328,3864463,0.0534461538461538,1000000},
-{3018471,3871934,3872032,1000000,0.171765957446809},
-{3018472,3871954,3872032,1000000,0.0326181818181818},
-{3020208,3900337,3900448,0.0639555555555556,0.0639555555555556},
-{3020447,3889293,3889152,1000000,0.022065671641791},
-{3020448,3889152,3888856,1000000,0.0423130434782609},
-{3020469,3881451,3881476,1000000,0.0138285714285714},
-{3020529,3913573,3913159,0.27618,0.27618},
-{3020530,3913159,3913104,0.0290526315789474,0.0262857142857143},
-{3020531,3913104,3913061,0.0233052631578947,0.0210857142857143},
-{3020532,3913057,3912256,0.47151,0.554717647058824},
-{3020533,3913057,3913099,0.0348428571428571,0.0304875},
-{3020927,3905947,3906538,0.34737,0.34737},
-{3020928,3903785,3903828,0.0220888888888889,0.0220888888888889},
-{3020929,3903828,3904253,0.207644444444444,0.207644444444444},
-{3020990,3867763,3867847,1000000,0.08365},
-{3020991,3867847,3867853,1000000,0.0289636363636364},
-{3021002,3848123,3848831,0.412927272727273,0.412927272727273},
-{3021003,3848831,3848980,0.0723272727272727,0.0723272727272727},
-{3021021,3873008,3873018,0.116674285714286,0.163344},
-{3021022,3873018,3873359,0.135977777777778,0.135977777777778},
-{3021023,3874046,3873251,0.3734,0.289083870967742},
-{3021024,3873018,3872804,0.122511111111111,0.122511111111111},
-{3021025,3872804,3873279,0.6194,0.6194},
-{3021026,3873279,3873251,0.135675,0.127694117647059},
-{3021027,3872804,3873279,0.661328571428571,0.661328571428571},
-{3021031,3858011,3857983,0.0740380952380952,1000000},
-{3021032,3855897,3856249,0.2764,1000000},
-{3021033,3855897,3855140,1000000,0.314711111111111},
-{3021034,3855140,3854739,0.2114,0.1812},
-{3021035,3853749,3854211,0.170072727272727,0.170072727272727},
-{3021036,3853763,3853241,0.2046,0.2046},
-{3021037,3853428,3853749,0.131872727272727,0.131872727272727},
-{3021038,3853241,3852830,0.142527272727273,0.142527272727273},
-{3021039,3852822,3853428,0.202272727272727,0.202272727272727},
-{3021040,3852830,3852268,0.174818181818182,0.174818181818182},
-{3021041,3852256,3852822,0.167854545454545,0.167854545454545},
-{3021042,3852268,3851730,0.177309090909091,0.177309090909091},
-{3021043,3851816,3852256,0.134964705882353,0.134964705882353},
-{3021044,3850999,3851081,0.122018181818182,0.122018181818182},
-{3021045,3851081,3851816,0.257945454545455,0.257945454545455},
-{3021055,3863075,3862960,0.0731333333333333,0.0731333333333333},
-{3021067,3871704,3872103,0.121037837837838,0.135709090909091},
-{3021068,3871092,3871280,0.0767142857142857,0.0639285714285714},
-{3021124,3858565,3858278,0.130066666666667,0.130066666666667},
-{3021125,3919957,3919866,0.066525,0.0939176470588235},
-{3021126,3919866,3919159,0.480456,0.60057},
-{3021127,3919866,3919457,0.320166666666667,0.274428571428571},
-{3021128,3902036,3902123,0.021945,1000000},
-{3021129,3914199,3914359,0.133826086956522,0.219857142857143},
-{3021130,3914359,3914699,0.171131707317073,0.17541},
-{3021132,3908441,3908999,0.125748,0.1497},
-{3021133,3908999,3908744,0.160622222222222,0.160622222222222},
-{3021139,3907205,3907326,1000000,0.0333219512195122},
-{3021140,3907326,3907159,0.260657142857143,1000000},
-{3021141,3907159,3907057,0.14754,1000000},
-{3021148,3870743,3870883,0.108166666666667,1000000},
-{3021149,3870771,3870378,0.123512195121951,1000000},
-{3021150,3870378,3870278,0.039454054054054,0.0317347826086956},
-{3021151,3870508,3870743,1000000,0.228347368421053},
-{3021152,3870743,3870718,1000000,0.00657},
-{3021153,3870718,3870378,1000000,0.113790697674419},
-{3021154,3897298,3897345,0.0124636363636364,1000000},
-{3021155,3897259,3897298,0.11196,1000000},
-{3021156,3897259,3897496,0.28278,0.28278},
-{3021176,3864541,3864669,0.246069230769231,0.236955555555556},
-{3021177,3864669,3865619,0.5163,0.501548571428571},
-{3021178,3864669,3864415,0.4542,0.4542},
-{3021179,3871451,3871391,0.100033333333333,1000000},
-{3021180,3871391,3871351,0.0368368421052632,1000000},
-{3021181,3871342,3871310,1000000,0.0985875},
-{3021182,3871310,3871351,1000000,0.0481609756097561},
-{3021184,3891411,3891414,1000000,0.0427894736842105},
-{3021200,3898149,3898223,1000000,0.0868524590163934},
-{3021201,3898149,3897857,0.772707692307692,1000000},
-{3021202,3900549,3900721,0.041796,1000000},
-{3021203,3900721,3900776,0.0134588235294118,1000000},
-{3021204,3900721,3900720,0.01767,0.0126214285714286},
-{3021214,3900539,3900719,1000000,0.0526142857142857},
-{3021215,3900719,3900789,1000000,0.0193333333333333},
-{3021216,3900720,3900719,0.0278117647058824,0.01576},
-{3021219,3898083,3898145,0.0852090909090909,1000000},
-{3021220,3898145,3898156,0.014053125,1000000},
-{3021221,3897835,3898145,0.579026086956522,1000000},
-{3021224,3901991,3902048,1000000,0.0149727272727273},
-{3021225,3902048,3902200,1000000,0.0345906976744186},
-{3021237,3883641,3883929,0.0684888888888889,1000000},
-{3021238,3883929,3884206,0.12441,1000000},
-{3021239,3883966,3884061,0.034858064516129,1000000},
-{3021240,3884061,3884227,0.357939130434783,1000000},
-{3021291,3890881,3891507,0.236982352941176,0.161148},
-{3021292,3891507,3891569,0.100971428571429,0.02945},
-{3021293,3891569,3891723,0.037968,0.037968},
-{3021294,3891723,3892260,0.138788235294118,0.141564},
-{3021295,3891507,3891723,1000000,0.0711473684210526},
-{3021296,3887667,3887710,0.0185863636363636,1000000},
-{3021297,3887990,3887893,1000000,0.0314470588235294},
-{3021298,3887990,3888003,0.00478666666666667,1000000},
-{3021299,3887710,3887749,0.0163428571428571,1000000},
-{3021300,3888003,3888071,0.0169914893617021,1000000},
-{3021304,3890881,3890861,0.054888,0.0762333333333333},
-{3021305,3890861,3890847,0.24315,0.24315},
-{3021309,3890861,3891046,0.460457142857143,0.460457142857143},
-{3021325,3887749,3887860,0.045978947368421,1000000},
-{3021326,3887860,3887842,0.0575538461538462,1000000},
-{3021346,3888061,3888071,1000000,0.0234510638297872},
-{3021347,3887990,3888061,0.02445,1000000},
-{3021350,3897794,3897793,0.0193636363636364,0.0193636363636364},
-{3021351,3897609,3897788,1000000,0.0504731707317073},
-{3021352,3897788,3897793,0.0250909090909091,0.0250909090909091},
-{3021356,3897334,3897414,1000000,0.0194625},
-{3021357,3896024,3896211,1000000,0.0454040816326531},
-{3021367,3887316,3887690,0.165024,1000000},
-{3021368,3887690,3887893,0.06824,1000000},
-{3021384,3885856,3885864,0.0189677419354839,0.0189677419354839},
-{3021385,3885864,3885949,0.191645901639344,0.191645901639344},
-{3021386,3885864,3886956,0.61935,0.61935},
-{3021390,3906608,3907074,0.198763636363636,1000000},
-{3021487,3885597,3885710,0.145865625,0.137285294117647},
-{3021488,3885963,3886082,0.305424,0.331982608695652},
-{3021489,3885710,3885911,1000000,0.165486956521739},
-{3021576,3907297,3907187,0.0623777777777778,0.0623777777777778},
-{3022379,3885345,3885272,0.102633333333333,1000000},
-{3022380,3885272,3885188,0.1310625,1000000},
-{3022381,3880854,3880893,0.02626,1000000},
-{3022388,3872283,3871939,0.200775,1000000},
-{3022389,3895278,3895333,1000000,0.0365},
-{3022390,3895333,3895400,1000000,0.0349170731707317},
-{3022468,3897646,3897762,1000000,0.0236173913043478},
-{3022469,3898191,3899087,0.174290625,1000000},
-{3023424,3893801,3894269,0.601930434782609,0.314645454545455},
-{3023425,3894269,3894307,0.0260538461538462,0.0233586206896552},
-{3023426,3893831,3894190,0.167022857142857,1000000},
-{3023427,3894190,3894307,0.0863307692307692,1000000},
-{3023428,3894307,3894380,0.03688,0.0502909090909091},
-{3023429,3894380,3894794,0.177771428571429,0.282818181818182},
-{3023430,3894190,3894380,0.10645,1000000},
-{3023431,3894147,3894269,1000000,0.056445},
-{3023432,3893801,3894187,0.266542857142857,0.243365217391304},
-{3023433,3894187,3894259,0.053,0.0477},
-{3023434,3894238,3894187,1000000,0.140534693877551},
-{3023435,3894187,3894136,1000000,0.168117647058824},
-{3023436,3894136,3894077,1000000,0.226614285714286},
-{3023437,3892616,3894004,0.624827586206896,0.549090909090909},
-{3023438,3894004,3894065,0.042675,0.0296869565217391},
-{3023439,3894004,3893972,1000000,0.0923590909090909},
-{3023440,3893289,3894077,1000000,0.61581},
-{3023441,3894077,3894125,0.0288666666666667,0.06495},
-{3023442,3893101,3893972,1000000,0.458355555555556},
-{3023443,3893972,3894022,1000000,0.0374},
-{3023444,3893921,3893811,0.0609230769230769,1000000},
-{3023445,3893811,3893724,0.0837111111111111,0.0538142857142857},
-{3023446,3894022,3893978,0.0870418604651163,1000000},
-{3023447,3893978,3893921,0.0374857142857143,1000000},
-{3023448,3893961,3893921,0.0610666666666667,0.07328},
-{3023449,3893978,3893961,0.0709354838709677,1000000},
-{3023450,3893891,3893811,1000000,0.06},
-{3023451,3893921,3893891,0.0336857142857143,0.0277411764705882},
-{3023452,3893972,3893939,1000000,0.0790243902439024},
-{3023453,3893939,3893891,1000000,0.0430578947368421},
-{3023455,3849886,3849626,0.29688,0.30925},
-{3023812,3899580,3899554,1000000,0.0425076923076923},
-{3023813,3900171,3899551,0.4786,0.499408695652174},
-{3023814,3899551,3899403,0.0847090909090909,0.0716769230769231},
-{3023817,3865328,3865401,0.103726829268293,1000000},
-{3024256,3883929,3883935,1000000,0.0415304347826087},
-{3024257,3884285,3884345,1000000,0.1299},
-{3024258,3884345,3884370,1000000,0.0325058823529412},
-{3024259,3883935,3884229,1000000,0.259907142857143},
-{3024260,3884229,3884345,1000000,0.168768},
-{3024261,3884229,3884285,1000000,0.04314},
-{3038793,3909340,3908941,0.215688,1000000},
-{3038794,3909412,3909287,0.291133333333333,0.291133333333333},
-{3038812,3862735,3862873,0.204352941176471,0.204352941176471},
-{3038814,3871777,3871799,1000000,0.0231076923076923},
-{3038815,3871669,3871777,1000000,0.0569052631578947},
-{3038816,3871669,3871700,0.0485866666666667,1000000},
-{3038824,3909368,3909449,0.0568,0.0426},
-{3038825,3909449,3909567,0.11676,0.08757},
-{3038828,3909567,3909485,0.0362,0.047784},
-{3038829,3909485,3908585,0.265865217391304,0.321836842105263},
-{3038830,3909449,3909485,0.117284210526316,1000000},
-{3038839,3908442,3909010,0.255754838709677,0.2477625},
-{3038840,3909010,3909128,0.0476,0.0541655172413793},
-{3038841,3908977,3907973,0.346488888888889,0.346488888888889},
-{3038842,3909010,3908977,0.0566,0.0566},
-{3038843,3909012,3908340,0.27136875,0.27136875},
-{3038844,3908977,3909012,0.050295652173913,0.050295652173913},
-{3038845,3909123,3909099,0.39105,0.39105},
-{3038846,3909012,3909123,0.0535090909090909,0.0511826086956522},
-{3038847,3909128,3909204,0.0401225806451613,0.0460666666666667},
-{3038848,3909204,3909808,0.308078571428571,0.319488888888889},
-{3038849,3909123,3909204,0.0551181818181818,0.0551181818181818},
-{3038862,3885850,3886162,1000000,1000000},
-{3038881,3900760,3900902,1000000,1000000},
-{3038882,3900902,3900910,0.0636,0.05088},
-{3038883,3900724,3900902,0.99738947368421,1.11472941176471},
-{3038884,3900234,3900235,0.0144,1000000},
-{3038885,3900235,3900252,0.16811320754717,1000000},
-{3038889,3900220,3900213,1000000,0.0539234042553191},
-{3038901,3900428,3900919,0.1371,0.194593548387097},
-{3038902,3900919,3901376,0.104811764705882,0.1113625},
-{3038903,3900910,3900919,0.0834782608695652,0.0533333333333333},
-{3038904,3900910,3901484,1000000,1000000},
-{3038905,3901484,3902255,1000000,1000000},
-{3038906,3901376,3901496,0.0237396226415094,0.0267702127659574},
-{3038907,3901496,3902273,0.219061538461538,0.244097142857143},
-{3038908,3901484,3901496,0.048,0.048},
-{3038970,3899302,3899859,1000000,0.130746428571429},
-{3038975,3900382,3900455,1000000,0.022004347826087},
-{3038976,3900981,3901239,0.1108,0.1108},
-{3038977,3900068,3900381,0.3409,0.3409},
-{3038981,3901019,3900981,0.142778571428571,0.148066666666667},
-{3038982,3901019,3902574,0.478145454545455,0.478145454545455},
-{3039003,3883271,3883676,0.179733333333333,0.179733333333333},
-{3039004,3883010,3883397,0.110473469387755,0.106141176470588},
-{3039005,3883397,3883271,0.101175,0.1349},
-{3039006,3883794,3883839,0.0257307692307692,0.0318571428571429},
-{3039007,3883839,3884108,0.143957142857143,0.223933333333333},
-{3039008,3883397,3883839,0.215032258064516,0.162585365853659},
-{3039009,3883010,3881387,0.461292857142857,0.478377777777778},
-{3039010,3879866,3881301,0.797266666666667,0.768792857142857},
-{3039011,3881301,3881387,0.07772,0.0529909090909091},
-{3039012,3881511,3881301,0.222347368421053,0.176025},
-{3039013,3877491,3877637,1000000,1000000},
-{3039014,3877637,3878088,1000000,1000000},
-{3039015,3878530,3878800,0.0641222222222222,0.0678941176470588},
-{3039016,3878800,3879324,0.130702040816327,0.128088},
-{3039019,3884920,3885522,0.230555555555556,0.230555555555556},
-{3039020,3885522,3885524,0.09,1000000},
-{3039021,3884783,3885503,0.2380125,0.282088888888889},
-{3039022,3885503,3885604,0.0288882352941177,0.0338689655172414},
-{3039023,3885522,3885503,1000000,0.49698},
-{3039024,3898818,3898860,0.0225789473684211,0.0225789473684211},
-{3039025,3898860,3899173,0.16887,0.241242857142857},
-{3039026,3898733,3899092,0.117635294117647,0.1111},
-{3039027,3899092,3899696,0.268269230769231,0.249107142857143},
-{3039028,3898860,3899092,0.4755,0.4755},
-{3039033,3900232,3900380,0.05004375,0.0942},
-{3039034,3900380,3900428,0.0184166666666667,0.039},
-{3039035,3900235,3900577,1000000,0.200085714285714},
-{3039036,3900577,3900910,0.144488888888889,0.139328571428571},
-{3039037,3900380,3900577,0.136338461538462,0.2532},
-{3039085,3899497,3899615,0.0701777777777778,0.0701777777777778},
-{3039086,3899244,3899497,0.128818181818182,0.1417},
-{3039087,3899615,3899244,0.256755555555556,0.256755555555556},
-{3039088,3899095,3899287,0.133406896551724,0.09672},
-{3039089,3899287,3899526,0.1371,0.112172727272727},
-{3039090,3899615,3900356,0.400955555555556,0.400955555555556},
-{3039091,3900064,3900356,0.175644444444444,0.175644444444444},
-{3039092,3899988,3900064,0.0450222222222222,0.0450222222222222},
-{3039093,3899988,3900332,0.134955555555556,0.134955555555556},
-{3039094,3900332,3901120,0.439111111111111,0.439111111111111},
-{3039095,3900356,3900579,0.113711111111111,0.113711111111111},
-{3039096,3900579,3901158,0.273577777777778,0.273577777777778},
-{3039097,3900332,3900579,0.207555555555556,0.207555555555556},
-{3039099,3900049,3900039,0.0259714285714286,1000000},
-{3039100,3900039,3899983,0.0920526315789474,1000000},
-{3039101,3900000,3900041,0.01338,1000000},
-{3039121,3860494,3861326,1000000,1000000},
-{3039122,3861326,3861558,0.122511111111111,0.122511111111111},
-{3039283,3859420,3859564,0.12004,0.105917647058824},
-{3039284,3859564,3859929,0.284485714285714,0.3319},
-{3039285,3859929,3860099,0.16188,0.186784615384615},
-{3039286,3859564,3859929,0.2222,0.2222},
-{3039287,3861013,3860371,0.28438,1000000},
-{3039288,3860371,3860205,0.0660810810810811,1000000},
-{3039289,3860371,3860099,1000000,1000000},
-{3039292,3860099,3860884,1000000,1000000},
-{3039346,3868140,3868179,1000000,1000000},
-{3039347,3868179,3868237,1000000,1000000},
-{3039432,3900455,3900515,1000000,0.0189545454545455},
-{3039433,3900515,3900565,1000000,0.0202},
-{3039438,3895137,3895193,1000000,0.0340772727272727},
-{3040236,3861321,3862136,0.322287804878049,0.35712972972973},
-{3040345,3868192,3868211,0.01836,1000000},
-{3040354,3867716,3867453,0.117133333333333,0.121638461538462},
-{3040355,3867453,3867230,0.0751241379310345,0.0702774193548387},
-{3040428,3884747,3884813,0.0256451612903226,0.0361363636363636},
-{3040654,3888353,3888427,0.04542,1000000},
-{3040660,3890957,3891082,0.154690909090909,0.121542857142857},
-{3040661,3891082,3891146,1000000,0.0624692307692308},
-{3040662,3891031,3891146,1000000,0.037095},
-{3040663,3891082,3891031,0.113470588235294,1000000},
-{3040664,3890974,3891052,0.0267,1000000},
-{3040665,3891052,3891160,0.0407513513513513,1000000},
-{3041935,3898020,3898046,0.0168,0.01848},
-{3041936,3898046,3898318,0.20793,0.20793},
-{3041937,3895180,3895338,0.0468979591836735,0.0441923076923077},
-{3041938,3895338,3895566,1000000,0.0673591836734694},
-{3041939,3895978,3896005,0.0212129032258065,0.0274},
-{3041940,3896005,3896260,0.1804125,0.3396},
-{3041941,3895199,3895547,0.22432,1000000},
-{3041942,3896735,3896844,0.129070588235294,0.129070588235294},
-{3041943,3896735,3896005,1000000,0.261757894736842},
-{3041944,3895547,3895338,1000000,0.0614553191489362},
-{3041945,3898046,3897537,1000000,0.224854545454545},
-{3041946,3897522,3897537,0.022968,0.0261},
-{3041947,3880838,3880912,0.02374,1000000},
-{3041948,3881006,3880912,0.0923333333333333,0.0923333333333333},
-{3041951,3895663,3896075,0.329947826086957,0.216822857142857},
-{3041952,3896075,3896128,0.0236068965517241,1000000},
-{3041953,3896471,3896563,0.0444,1000000},
-{3041954,3896437,3896234,0.1395,0.172714285714286},
-{3041955,3896128,3896092,1000000,0.0136173913043478},
-{3041956,3896092,3895931,1000000,0.0706604651162791},
-{3041957,3895931,3896119,0.217928571428571,1000000},
-{3041958,3896119,3896155,0.02068,1000000},
-{3041959,3896217,3896181,0.0149720930232558,1000000},
-{3041960,3896181,3896030,0.0629086956521739,1000000},
-{3041961,3896075,3896092,1000000,0.025125},
-{3041962,3896092,3896119,1000000,0.01494375},
-{3041963,3896119,3896181,1000000,0.0418444444444444},
-{3041964,3896181,3896437,1000000,0.244166666666667},
-{3041965,3896437,3896563,1000000,0.0494647058823529},
-{3042484,3890457,3890562,1000000,0.0389272727272727},
-{3042486,3892862,3892945,1000000,0.0178408163265306},
-{3042490,3885150,3885118,1000000,0.0470903225806452},
-{3042491,3885118,3885097,1000000,0.0456882352941176},
-{3042495,3885118,3885255,1000000,0.159635294117647},
-{3042496,3885026,3884809,0.120627272727273,1000000},
-{3042497,3884796,3884947,1000000,0.23278},
-{3042498,3884947,3884978,1000000,0.0488057142857143},
-{3042499,3884809,3884947,0.159157894736842,1000000},
-{3042543,3895346,3895643,0.119222727272727,1000000},
-{3042544,3895434,3895450,1000000,0.01422},
-{3042545,3893565,3895158,0.416937931034483,1000000},
-{3042546,3895158,3895201,0.0244909090909091,1000000},
-{3042549,3898746,3898640,0.0601736842105263,0.0476375},
-{3042550,3898494,3898557,0.0257379310344828,1000000},
-{3042552,3869824,3869680,0.04308,0.0349297297297297},
-{3042553,3869680,3869461,0.05076,0.05076},
-{3042554,3870193,3869981,0.09621,0.0549771428571429},
-{3042555,3869981,3869824,0.0628173913043478,0.0437818181818182},
-{3042556,3870041,3869824,0.1904,0.068},
-{3042567,3865015,3864643,0.115005882352941,0.162925},
-{3042568,3864643,3864040,0.211747058823529,0.232238709677419},
-{3042569,3864629,3864863,0.107651162790698,0.125108108108108},
-{3042570,3864863,3865144,0.136962162162162,0.120657142857143},
-{3042571,3864473,3864560,0.0601714285714286,0.0815225806451613},
-{3042572,3864560,3864629,0.0371581395348837,0.0469941176470588},
-{3042577,3866009,3865767,0.109241379310345,0.111157894736842},
-{3042578,3865767,3865334,0.270703448275862,0.280371428571429},
-{3042579,3865015,3865004,0.0477733333333333,1000000},
-{3042580,3865004,3864890,0.269433962264151,1000000},
-{3042581,3864890,3864889,0.0688188679245283,1000000},
-{3042582,3865079,3864986,1000000,0.28164},
-{3042583,3864986,3864981,1000000,0.0906470588235294},
-{3042584,3865196,3865128,0.0336375,1000000},
-{3042585,3865128,3864981,0.087675,1000000},
-{3042586,3863953,3863322,0.26925,1000000},
-{3042587,3864912,3864819,1000000,0.038875},
-{3042588,3864819,3863621,1000000,0.5268},
-{3042589,3864990,3864998,1000000,0.044775},
-{3042590,3864998,3865005,1000000,0.0536615384615385},
-{3042592,3877871,3878020,0.0833052631578947,1000000},
-{3042596,3865309,3865261,0.181690909090909,1000000},
-{3042597,3865261,3865186,0.07065,1000000},
-{3042600,3884871,3885029,0.30921,1000000},
-{3042601,3885029,3885097,0.0886384615384615,1000000},
-{3042602,3864784,3864931,0.0736434782608696,1000000},
-{3042603,3864931,3865056,0.0654,1000000},
-{3042604,3864934,3864869,0.0722903225806452,1000000},
-{3042605,3864869,3864784,0.0793846153846154,1000000},
-{3042613,3890664,3890704,0.047295652173913,0.03626},
-{3042614,3890494,3890585,0.0835928571428571,0.0866888888888889},
-{3042615,3887585,3887706,0.0323210526315789,0.0314923076923077},
-{3042616,3887706,3888545,0.20673488372093,0.216819512195122},
-{3042617,3871961,3871968,0.0653189189189189,1000000},
-{3042618,3872452,3872484,1000000,0.026796},
-{3042619,3886816,3887002,0.08265,1000000},
-{3042620,3869774,3869498,0.0636714285714286,1000000},
-{3042621,3870062,3869924,1000000,0.0441},
-{3042622,3870079,3870062,0.19684,0.109355555555556},
-{3042623,3870092,3870079,0.11802,0.0931736842105263},
-{3042624,3887842,3887750,0.0243428571428571,1000000},
-{3042625,3887750,3887556,0.0554571428571429,1000000},
-{3042626,3875102,3875100,0.0988941176470588,1000000},
-{3042627,3887592,3887531,0.0229609756097561,1000000},
-{3042630,3850774,3850566,0.0602428571428571,0.0486576923076923},
-{3042631,3850566,3850165,0.1,0.0910714285714286},
-{3042632,3878140,3878360,0.0592285714285714,0.051825},
-{3042647,3899648,3899733,1000000,0.0731625},
-{3042648,3899733,3899819,1000000,0.07845},
-{3042649,3899669,3899757,0.0398470588235294,1000000},
-{3042650,3899757,3899819,0.0283945945945946,1000000},
-{3042654,3853410,3853523,0.0428678571428571,0.0436472727272727},
-{3042655,3853523,3853685,0.0733142857142857,0.0744967741935484},
-{3042656,3852484,3853012,0.110684210526316,1000000},
-{3042657,3853012,3853094,0.0257318181818182,1000000},
-{3042663,3899450,3899282,0.0796153846153846,1000000},
-{3042664,3899282,3899226,0.021825,1000000},
-{3042665,3899447,3899276,1000000,0.0863478260869565},
-{3042666,3899276,3899136,1000000,0.0561428571428571},
-{3042667,3899450,3899279,0.0533513513513513,1000000},
-{3042668,3899282,3899279,1000000,0.0182166666666667},
-{3042669,3899279,3899276,0.0470769230769231,0.034},
-{3042670,3899276,3899263,0.0729555555555556,0.0729555555555556},
-{3042677,3875582,3875549,0.121515789473684,0.112624390243902},
-{3042678,3875380,3875499,0.0639,0.0594418604651163},
-{3042679,3875499,3875582,0.0590368421052632,0.056085},
-{3042684,3872414,3872456,0.046575,1000000},
-{3042685,3872664,3872707,0.08505,1000000},
-{3042688,3872065,3872053,0.0474285714285714,1000000},
-{3042689,3872456,3872510,0.06072,1000000},
-{3042690,3872510,3872569,0.06845,1000000},
-{3042691,3872524,3872623,1000000,0.0935333333333333},
-{3042694,3872006,3872381,1000000,0.0922421052631579},
-{3042695,3897924,3898140,1000000,0.051615},
-{3042696,3880951,3880770,0.0720642857142857,1000000},
-{3042697,3880770,3880536,0.0887333333333333,1000000},
-{3042700,3899698,3899660,1000000,0.0690648648648649},
-{3042701,3899660,3899580,1000000,0.136231578947368},
-{3042702,3899763,3899723,1000000,0.054227027027027},
-{3042703,3899723,3899698,1000000,0.0592421052631579},
-{3042706,3912518,3912673,1000000,0.0255217391304348},
-{3042707,3912749,3912967,1000000,0.0314},
-{3042708,3912967,3913638,1000000,0.104031428571429},
-{3042718,3854745,3854648,0.0218823529411765,0.0206666666666667},
-{3042736,3875508,3875661,0.039,0.1092},
-{3042737,3875661,3877681,0.6648,0.506514285714286},
-{3042738,3875349,3875408,1000000,0.0665192307692308},
-{3042739,3875408,3875580,1000000,0.157835294117647},
-{3042740,3872863,3873916,0.207316363636364,0.316733333333333},
-{3042741,3865102,3865039,0.0186171428571429,0.013575},
-{3042742,3864838,3865075,0.0527236363636364,0.0475377049180328},
-{3042743,3865680,3865656,0.0394301886792453,0.0401884615384615},
-{3042744,3865656,3865102,0.160285714285714,0.148188679245283},
-{3042745,3865526,3868434,0.5184,0.480834782608696},
-{3042746,3874519,3874393,1000000,0.1026},
-{3042747,3874669,3874621,0.0233884615384615,1000000},
-{3042748,3874888,3874800,0.0388254545454545,1000000},
-{3042749,3874800,3874669,0.0687888888888889,1000000},
-{3042750,3873972,3873944,1000000,0.0739066666666667},
-{3042751,3873944,3873988,1000000,0.185088888888889},
-{3042752,3873887,3873729,0.0484578947368421,0.076725},
-{3042753,3873729,3873407,0.0727148936170213,0.0813714285714286},
-{3042754,3873407,3873008,0.0843622641509434,0.089424},
-{3042755,3874275,3873998,1000000,0.14778},
-{3042766,3864480,3864442,0.011175,0.01396875},
-{3042767,3864442,3864362,0.023535,0.0268971428571429},
-{3042802,3865496,3865503,1000000,0.02863125},
-{3042803,3865503,3865518,1000000,0.154976470588235},
-{3042810,3901293,3901385,0.0374630136986301,1000000},
-{3042811,3901385,3901531,0.0544816901408451,1000000},
-{3042812,3900150,3900864,1000000,0.23747619047619},
-{3042813,3901351,3901439,1000000,0.0367114285714286},
-{3042814,3901439,3901585,1000000,0.0581485714285714},
-{3042815,3901503,3901590,0.0882,0.0774439024390244},
-{3042816,3878315,3878177,0.05828,1000000},
-{3042817,3877873,3877789,0.04203,1000000},
-{3042818,3877668,3877344,1000000,0.255266666666667},
-{3042819,3857745,3857764,0.0304,0.0304},
-{3042820,3858996,3858360,0.160884,1000000},
-{3042821,3858360,3858230,0.0366976744186047,1000000},
-{3042822,3855029,3854873,0.0379882352941176,0.0412212765957447},
-{3042823,3855338,3855029,0.0682846153846154,0.0696235294117647},
-{3042824,3856827,3855938,0.176049056603774,0.166617857142857},
-{3042825,3854652,3854641,0.0214325581395349,0.0214325581395349},
-{3042826,3854641,3854609,0.04385,0.0429551020408163},
-{3042836,3901233,3901470,1000000,0.0614},
-{3042837,3901470,3901689,1000000,0.0516905660377358},
-{3042838,3870278,3870130,0.06172,0.0402521739130435},
-{3042839,3870130,3870041,0.061,0.0284666666666667},
-{3042840,3879195,3879355,0.177,1000000},
-{3042841,3879355,3879464,0.11485,1000000},
-{3042846,3880809,3880826,0.0299217391304348,0.0264692307692308},
-{3042847,3902309,3902164,0.0986769230769231,0.0874636363636364},
-{3042848,3902164,3902129,0.0336692307692308,0.0236594594594595},
-{3042849,3902883,3902930,0.0222545454545455,0.0288},
-{3042850,3902930,3902983,0.0291652173913043,0.0353052631578947},
-{3042851,3899872,3899831,0.092505,1000000},
-{3042852,3899831,3899816,0.0332590909090909,1000000},
-{3042853,3900372,3900539,1000000,0.0600315789473684},
-{3042854,3899888,3899858,1000000,0.0492},
-{3042855,3899858,3899813,1000000,0.0693428571428572},
-{3042856,3900030,3900286,0.0634428571428571,1000000},
-{3042857,3900286,3900549,0.070425,1000000},
-{3042858,3899279,3899136,0.0431414634146341,1000000},
-{3042859,3901196,3901250,1000000,0.0858878048780488},
-{3042862,3868288,3868213,1000000,0.01782},
-{3042863,3871317,3871272,0.01236,1000000},
-{3042864,3871272,3870771,0.156068181818182,1000000},
-{3043195,3881829,3881683,0.0932052631578947,1000000},
-{3043196,3881683,3882318,0.209925,1000000},
-{3043197,3878418,3881336,1000000,0.4966},
-{3043198,3881506,3882238,0.1348,1000000},
-{3043199,3878414,3881323,0.523014705882353,1000000},
-{3043200,3881323,3881817,0.0776417910447761,1000000},
-{3043201,3858492,3858450,0.0595963636363636,0.0607},
-{3043205,3903195,3903443,1000000,0.0592354838709677},
-{3043206,3903443,3903853,1000000,0.118170491803279},
-{3043210,3915727,3915764,1000000,0.00875},
-{3043278,3853685,3857169,0.713214084507042,0.6843},
-{3043279,3857169,3857587,0.072346875,0.063427397260274},
-{3043284,3894825,3894868,0.029412,1000000},
-{3043285,3894868,3894912,0.029868,1000000},
-{3043296,3895566,3895724,1000000,0.0536142857142857},
-{3043297,3895724,3895978,1000000,0.105522580645161},
-{3043298,3896005,3895616,1000000,0.287894117647059},
-{3043299,3895616,3895547,1000000,0.0330769230769231},
-{3043336,3895770,3895811,0.032975,1000000},
-{3043341,3895961,3895811,1000000,0.117525},
-{3043342,3895984,3896152,0.12087,1000000},
-{3043343,3895709,3895960,0.135272727272727,1000000},
-{3043344,3895960,3895984,0.0142702702702703,1000000},
-{3043345,3900691,3900814,0.0842947368421053,0.12012},
-{3043346,3901121,3901083,1000000,0.125},
-{3043347,3901083,3901030,1000000,0.138714285714286},
-{3043348,3880601,3880503,0.0301444444444444,1000000},
-{3043349,3880503,3880356,0.04,1000000},
-{3043353,3880977,3881111,1000000,0.0348555555555556},
-{3043354,3881000,3881139,0.0348535714285714,1000000},
-{3043355,3881480,3881402,0.0384857142857143,0.0612272727272727},
-{3043356,3881402,3880911,0.190645714285714,0.20851875},
-{3043357,3878789,3879143,0.122057142857143,1000000},
-{3043358,3879143,3879199,0.0268258064516129,1000000},
-{3043362,3879581,3879561,0.011208,1000000},
-{3043363,3879561,3879540,0.0126,1000000},
-{3043364,3879452,3879507,1000000,0.063912},
-{3043365,3879507,3879566,1000000,0.05786},
-{3043366,3879212,3879284,0.106737931034483,1000000},
-{3043367,3879284,3879346,0.0518086956521739,1000000},
-{3043374,3901030,3901143,1000000,0.1518},
-{3043375,3901143,3901196,1000000,0.0854836363636364},
-{3043376,3900881,3901005,0.253418181818182,0.2613375},
-{3043377,3884150,3884243,1000000,0.0501061224489796},
-{3043378,3884243,3884339,1000000,0.0531191489361702},
-{3043379,3900814,3900862,0.0488571428571429,0.0580754716981132},
-{3043380,3883419,3883585,0.07714,0.105190909090909},
-{3043381,3883585,3883732,0.0743785714285714,0.06942},
-{3043384,3902514,3902558,0.03885,0.0481},
-{3043385,3902558,3902737,0.149493103448276,0.160566666666667},
-{3043386,3882727,3883000,0.1129375,1000000},
-{3043387,3882727,3883029,1000000,0.107514893617021},
-{3043388,3883029,3883067,1000000,0.0132382978723404},
-{3043389,3902737,3902882,0.111267692307692,0.12054},
-{3043390,3902882,3902986,0.078196875,0.0820426229508197},
-{3043397,3903267,3903405,0.05181,0.05181},
-{3043398,3903405,3903710,0.141747540983607,0.139461290322581},
-{3043401,3904172,3904224,0.0227368421052632,0.0235636363636364},
-{3043402,3904224,3904315,0.0336321428571429,0.0348777777777778},
-{3043414,3904935,3905196,0.09717,0.0988169491525424},
-{3043415,3896378,3896559,1000000,0.0884052631578948},
-{3043416,3896559,3896829,1000000,0.14613488372093},
-{3237937,3918946,3919430,0.32504,1000000},
-{3237938,3919137,3919637,1000000,0.298875},
-{3237950,3920010,3920106,0.0622137931034483,0.100233333333333},
-{3237951,3919497,3919921,0.1176,0.112486956521739},
-{3237952,3919921,3920010,0.0429375,0.0381666666666667},
-{3237953,3920106,3919921,1000000,0.0750333333333333},
-{3237954,3920010,3920211,0.0767117647058824,0.08150625},
-{3237955,3920106,3920211,0.0692571428571429,1000000},
-{3237956,3920106,3920364,0.128883870967742,0.121072727272727},
-{3237957,3920364,3920499,0.131625,0.100285714285714},
-{3237958,3920364,3920434,0.0849555555555556,1000000},
-{3237959,3920602,3920364,0.0879942857142857,1000000},
-{3237981,3866769,3866733,0.0583909090909091,0.0583909090909091},
-{3237984,3922038,3921841,0.152222222222222,0.152222222222222},
-{3238645,3881842,3881653,0.1898,1000000},
-{3238646,3881653,3881386,0.28212,1000000},
-{3238678,3873482,3873462,0.0344454545454545,1000000},
-{3238718,3870910,3870973,1000000,1000000},
-{3239077,3875837,3876264,0.13842,0.13842},
-{3239090,3886907,3886885,0.2874,0.2874},
-{3239093,3891272,3891295,0.0298378378378378,0.0306666666666667},
-{3239132,3891160,3891146,0.05144,1000000},
-{3239429,3902199,3902237,0.147111111111111,1000000},
-{3239430,3902237,3902029,1000000,0.1206},
-{3239431,3902641,3902237,1000000,0.26492},
-{3239681,3871406,3871091,0.201545454545455,0.2217},
-{3239682,3871124,3871091,0.0387375,0.0387375},
-{3239683,3871091,3870864,0.0816888888888889,0.0816888888888889},
-{3239685,3858791,3857712,0.443444444444444,0.443444444444444},
-{3239687,3858825,3858968,1000000,1000000},
-{3239688,3858968,3859221,0.1268,0.1268},
-{3239689,3854670,3854250,0.231222222222222,0.231222222222222},
-{3239690,3854250,3853817,0.201644444444444,0.201644444444444},
-{3239691,3854734,3854670,0.0454,0.0454},
-{3239707,3848834,3848365,0.4738,0.4738},
-{3239721,3851556,3852198,0.355622222222222,0.355622222222222},
-{3239722,3852198,3852517,0.125622222222222,0.125622222222222},
-{3239723,3852198,3852317,0.138266666666667,0.138266666666667},
-{3239726,3854867,3854709,0.108025,0.12963},
-{3239727,3855823,3856352,0.3238,0.3238},
-{3239728,3854202,3855366,0.573738461538462,0.573738461538462},
-{3239729,3855366,3855876,0.2614,0.2614},
-{3239730,3854867,3855366,0.567969230769231,1000000},
-{3239731,3855366,3855823,0.343421052631579,1000000},
-{3239742,3857682,3857691,0.0370325581395349,0.0388390243902439},
-{3239743,3857691,3857745,0.0947466666666667,0.099153488372093},
-{3239744,3858683,3858591,0.0518647058823529,0.05878},
-{3239745,3858591,3858361,0.123051428571429,0.153814285714286},
-{3239746,3857691,3857778,0.0318444444444444,0.0318444444444444},
-{3239747,3857778,3858591,0.340311111111111,0.340311111111111},
-{3239782,3850091,3850612,1000000,1000000},
-{3239783,3851186,3851132,1000000,1000000},
-{3239784,3851132,3850663,1000000,1000000},
-{3239788,3851132,3851557,1000000,1000000},
-{3239789,3851557,3851657,1000000,1000000},
-{3239790,3921330,3921155,0.08379,0.0713106382978723},
-{3239791,3921155,3921019,0.0530936170212766,0.0519875},
-{3239792,3921155,3921246,0.199644444444444,0.199644444444444},
-{3239795,3851083,3851031,0.174064864864865,0.149776744186047},
-{3239796,3851031,3851477,0.182751219512195,0.182751219512195},
-{3239797,3850966,3851031,1000000,1000000},
-{3239801,3859594,3860080,1000000,1000000},
-{3239802,3863237,3863022,0.141911111111111,0.141911111111111},
-{3239803,3863022,3862893,1000000,1000000},
-{3239821,3859869,3860019,1000000,1000000},
-{3239822,3860019,3860081,0.0830444444444444,0.0830444444444444},
-{3239829,3859276,3859230,1000000,1000000},
-{3239830,3859251,3859184,0.02768,0.02768},
-{3239831,3859184,3858457,0.21027,0.21027},
-{3239832,3859230,3859184,1000000,1000000},
-{3239833,3849472,3849452,0.224155555555556,0.224155555555556},
-{3239836,3857939,3857119,1000000,1000000},
-{3239837,3857119,3856944,1000000,1000000},
-{3239838,3858673,3858039,1000000,1000000},
-{3239840,3857119,3857919,1000000,1000000},
-{3239841,3857919,3858039,1000000,1000000},
-{3239842,3857939,3857919,1000000,1000000},
-{3239843,3867223,3866808,0.228631578947368,0.188869565217391},
-{3239844,3866808,3866733,0.0343565217391304,0.0303923076923077},
-{3239845,3866966,3866769,1000000,0.870471428571429},
-{3239846,3866808,3866769,0.0637411764705882,0.0637411764705882},
-{3239848,3868287,3868595,0.31116,0.31116},
-{3239851,3852900,3852480,0.0931882352941176,0.0990125},
-{3239855,3854263,3853530,0.254915789473684,0.246274576271186},
-{3239856,3853530,3853469,0.0210954545454545,0.0189428571428571},
-{3239860,3866449,3866798,0.138461538461538,0.138461538461538},
-{3239861,3866798,3867608,0.30228,0.30228},
-{3239862,3866798,3867007,1000000,1000000},
-{3239865,3867854,3867608,1000000,1000000},
-{3239869,3858673,3858803,1000000,1000000},
-{3239878,3859470,3859399,0.0344,0.0344},
-{3239879,3859399,3858862,0.218244444444444,0.218244444444444},
-{3239913,3880554,3880580,0.222471428571429,0.183211764705882},
-{3239914,3880580,3880796,0.17795625,0.138892682926829},
-{3239915,3880580,3881456,1000000,1000000},
-{3239916,3875599,3875553,1000000,0.0605538461538462},
-{3239917,3875553,3875475,1000000,0.128577777777778},
-{3239918,3850353,3850593,0.0930333333333333,0.0985058823529412},
-{3239919,3850593,3850634,0.0191142857142857,0.0202727272727273},
-{3239920,3850593,3850338,1000000,1000000},
-{3239922,3864952,3864829,0.207818181818182,0.0788275862068966},
-{3239923,3864944,3865113,0.186466666666667,1000000},
-{3239924,3865113,3865251,0.138342857142857,0.12105},
-{3239925,3865113,3865115,0.05095,0.05095},
-{3239926,3865115,3864952,0.179353846153846,1000000},
-{3239927,3865232,3865066,0.101746153846154,0.08266875},
-{3239928,3865066,3864952,0.08853,0.0571161290322581},
-{3239929,3865115,3865066,0.129911111111111,1000000},
-{3239937,3865091,3864862,0.262422222222222,0.262422222222222},
-{3239938,3861228,3861756,0.35769,0.35769},
-{3239943,3861228,3861004,0.265246153846154,0.2463},
-{3239944,3861004,3860895,0.106820689655172,0.134686956521739},
-{3239946,3861004,3861083,0.04785,0.04785},
-{3239947,3861083,3861151,0.05475,0.05475},
-{3239948,3861677,3862105,0.227304,0.218561538461538},
-{3239949,3862105,3862025,1000000,1000000},
-{3239950,3862025,3861894,1000000,1000000},
-{3239953,3863165,3863018,0.102666666666667,0.102666666666667},
-{3239979,3864840,3864830,1000000,0.3336},
-{3239980,3864830,3864845,0.0786923076923077,0.066},
-{3239981,3850637,3850627,0.01018125,1000000},
-{3239982,3850627,3850559,0.0394071428571429,1000000},
-{3239983,3850417,3850376,1000000,1000000},
-{3239984,3850311,3850275,0.00841304347826087,0.00758823529411765},
-{3239985,3850275,3850033,0.0730173913043478,0.067176},
-{3239986,3850376,3850275,1000000,1000000},
-{3239987,3864830,3864758,0.367390909090909,0.577328571428571},
-{3239988,3864758,3864479,0.201266666666667,0.201266666666667},
-{3239989,3864758,3864840,1000000,1000000},
-{3239990,3850627,3850540,1000000,1000000},
-{3239991,3850540,3850376,1000000,1000000},
-{3239994,3859674,3860550,0.513955555555556,0.513955555555556},
-{3239995,3851904,3852111,1000000,1000000},
-{3240020,3861036,3861762,0.505257142857143,0.408092307692308},
-{3240021,3861762,3861675,0.20382,0.20382},
-{3240025,3859850,3860298,0.260672727272727,0.220569230769231},
-{3240026,3860592,3860274,1000000,0.40008},
-{3240027,3860274,3859211,1000000,0.481244444444444},
-{3240028,3859085,3859810,0.310022222222222,0.29895},
-{3240029,3859810,3859850,0.021216,0.0171096774193548},
-{3240031,3859870,3859810,0.0902222222222222,0.0902222222222222},
-{3240033,3859870,3859432,0.197111111111111,0.197111111111111},
-{3240034,3859870,3860224,0.168822222222222,0.168822222222222},
-{3240044,3860032,3859579,0.283044444444444,0.283044444444444},
-{3240045,3859579,3859534,0.0229111111111111,0.0229111111111111},
-{3240084,3858826,3858496,0.164424,0.1612},
-{3240085,3858578,3858496,0.0963428571428571,0.103753846153846},
-{3240088,3879603,3879656,1000000,0.0241818181818182},
-{3240089,3879656,3879923,1000000,0.132794117647059},
-{3240090,3879622,3879982,0.112866666666667,1000000},
-{3240094,3871651,3871763,0.309355555555556,0.309355555555556},
-{3240100,3877615,3877773,0.0699230769230769,0.0699230769230769},
-{3240101,3877773,3878029,0.099888,0.0891857142857143},
-{3240102,3878029,3878193,0.0884,0.0663},
-{3240103,3877773,3878029,1.40406,1.40406},
-{3240104,3849788,3849555,0.173660869565217,0.147933333333333},
-{3240105,3849555,3849644,0.1914,0.1914},
-{3240106,3849644,3849670,0.0592222222222222,0.0592222222222222},
-{3240107,3849858,3849948,0.113006896551724,0.1024125},
-{3240108,3849948,3849984,0.03988,0.0362545454545455},
-{3240109,3849644,3849948,0.151844444444444,0.151844444444444},
-{3240110,3853622,3853229,1000000,0.27195},
-{3240111,3853229,3853171,1000000,0.0378},
-{3240112,3853229,3852590,0.309377777777778,0.309377777777778},
-{3240113,3877322,3877382,1000000,0.06516},
-{3240114,3877382,3877859,0.224771428571429,0.14750625},
-{3240115,3877382,3877248,0.188955555555556,0.188955555555556},
-{3240119,3867716,3868027,1000000,0.114822222222222},
-{3240120,3868027,3868148,1000000,0.03902},
-{3240121,3867835,3868176,1000000,0.38878064516129},
-{3240122,3868132,3867869,1000000,0.297163636363636},
-{3240123,3868122,3867683,1000000,0.170304},
-{3240124,3868148,3868176,1000000,0.01},
-{3240125,3868176,3868212,1000000,0.021216},
-{3240126,3868212,3868214,1000000,0.027768},
-{3240127,3868132,3868122,1000000,0.01605},
-{3240128,3868122,3868148,1000000,0.03096},
-{3240156,3866094,3866015,0.02805,0.031416},
-{3240157,3866015,3864781,0.351116666666667,0.341627027027027},
-{3240158,3866015,3865981,0.29964,0.29964},
-{3240193,3851485,3851468,0.00297,0.00321081081081081},
-{3240194,3851468,3850360,0.429193548387097,0.492777777777778},
-{3240195,3851468,3851535,1000000,1000000},
-{3240196,3851535,3851703,1000000,1000000},
-{3240197,3877322,3878101,0.176165217391304,1000000},
-{3240198,3878101,3878350,0.0479898305084746,1000000},
-{3240199,3853384,3853439,0.0280125,0.0344769230769231},
-{3240200,3853439,3854238,0.4165,0.4685625},
-{3240201,3854053,3853439,0.50592,0.50592},
-{3240204,3863058,3863078,0.0655125,0.0748714285714286},
-{3240205,3863058,3863196,1000000,0.0515027027027027},
-{3240206,3862999,3862832,0.058152,0.07269},
-{3240207,3863058,3863037,0.04125,1000000},
-{3240213,3921161,3921186,1000000,0.0230857142857143},
-{3240214,3921186,3921425,1000000,0.248177777777778},
-{3240215,3921425,3921407,1000000,0.0224347826086957},
-{3240216,3921186,3921425,1000000,0.37476},
-{3240232,3858496,3858096,0.160064150943396,0.163142307692308},
-{3240233,3858096,3857762,0.232540909090909,0.227373333333333},
-{3240234,3858202,3858096,0.0475555555555556,0.0475555555555556},
-{3240235,3852579,3852692,0.122533333333333,0.122533333333333},
-{3240236,3852692,3852770,1000000,1000000},
-{3240241,3871280,3871361,0.032625,0.0267692307692308},
-{3240242,3871248,3871361,0.195428571428571,1000000},
-{3240247,3871263,3871248,0.00998709677419355,0.00814736842105263},
-{3240248,3871361,3871488,0.0481588235294118,0.0380790697674419},
-{3240249,3871263,3871488,0.1242,1000000},
-{3240259,3851935,3852258,0.141208695652174,0.154657142857143},
-{3240260,3852258,3852435,0.0911428571428571,0.106333333333333},
-{3240261,3851907,3852258,0.464630769230769,0.464630769230769},
-{3240262,3872321,3872370,0.0207310344827586,0.0146634146341463},
-{3240263,3872990,3872806,0.52386,0.52386},
-{3240264,3872354,3872694,0.32244,0.32244},
-{3240265,3872694,3872806,0.1122,0.1122},
-{3240266,3872354,3872925,0.77298,1000000},
-{3240267,3872925,3872990,0.21,0.21},
-{3240268,3872694,3872925,0.6171,0.6171},
-{3240269,3872806,3872983,0.19998,0.19998},
-{3240270,3872983,3873516,0.61374,0.61374},
-{3240271,3872983,3872847,0.38574,0.38574},
-{3240272,3873928,3873667,0.31596,0.31596},
-{3240273,3873516,3873667,0.6435,0.6435},
-{3240274,3873667,3873928,0.57054,0.57054},
-{3240275,3873696,3873897,0.47844,0.47844},
-{3240276,3873897,3873928,0.8295,0.8295},
-{3240277,3873928,3873786,0.67908,0.67908},
-{3240278,3873786,3873696,0.3201,0.3201},
-{3240279,3873516,3873786,0.29382,0.29382},
-{3240280,3873786,3873897,0.15096,0.15096},
-{3240281,3873043,3872990,0.06708,0.06708},
-{3240282,3873155,3872103,0.3298125,0.5277},
-{3240283,3873043,3873155,1000000,0.30096},
-{3240284,3873667,3873100,0.59934,0.59934},
-{3240285,3873100,3873043,0.05778,0.05778},
-{3240286,3873251,3873192,0.0381666666666667,0.028625},
-{3240287,3873192,3873155,0.0178,0.0138444444444444},
-{3240288,3873100,3873192,0.29922,1000000},
-{3240289,3872847,3873450,0.67434,0.67434},
-{3240290,3873450,3873696,0.27438,0.27438},
-{3240291,3873516,3873450,0.32964,0.32964},
-{3240292,3872523,3872354,0.55212,0.55212},
-{3240293,3872562,3872847,0.23532,0.23532},
-{3240294,3872523,3872562,0.07872,0.07872},
-{3240297,3851074,3851035,0.0288,0.0368},
-{3240298,3851035,3850541,0.325275,0.354845454545455},
-{3240299,3851035,3851278,0.19341,0.19341},
-{3240300,3850541,3850926,0.218565517241379,0.198075},
-{3240301,3851278,3850926,1000000,0.315088888888889},
-{3240308,3863530,3863343,1000000,0.098341935483871},
-{3240309,3863343,3863348,1000000,0.0298114285714286},
-{3240310,3863116,3862158,1000000,0.404014285714286},
-{3240311,3862835,3862721,1000000,1000000},
-{3240312,3862419,3862275,0.108094736842105,0.0662516129032258},
-{3240313,3862275,3862217,0.0294571428571429,0.0187454545454545},
-{3240314,3862554,3862275,1000000,1000000},
-{3240315,3863559,3863383,0.0629647058823529,0.0611657142857143},
-{3240316,3863383,3863082,0.117466666666667,0.114291891891892},
-{3240317,3860900,3860879,0.00774146341463415,0.00881666666666667},
-{3240318,3860879,3860549,0.221682352941176,0.2284},
-{3240319,3860706,3860879,1000000,1000000},
-{3240320,3861288,3861224,0.03105,0.03493125},
-{3240321,3861224,3861115,0.0555833333333333,0.06253125},
-{3240322,3861224,3860800,0.239177777777778,0.239177777777778},
-{3240323,3856998,3856268,1000000,1000000},
-{3240324,3856268,3856251,1000000,1000000},
-{3240325,3856041,3855323,0.466666666666667,0.4},
-{3240326,3855323,3854316,0.90532,0.754433333333333},
-{3240327,3855323,3855231,0.1148,0.1148},
-{3240328,3854504,3854669,0.126733333333333,0.126733333333333},
-{3240329,3873790,3873769,0.016932,0.0192409090909091},
-{3240330,3873769,3873721,0.0362716981132075,0.0457714285714286},
-{3240331,3873693,3873790,0.06924,0.0577},
-{3240332,3873769,3873693,1000000,0.0459636363636364},
-{3240333,3874126,3873818,0.292243636363636,0.26789},
-{3240334,3873818,3873790,0.0249875,0.0255191489361702},
-{3240335,3873693,3873818,1000000,0.040427027027027},
-{3240336,3858410,3858091,0.131688888888889,0.131688888888889},
-{3240337,3858037,3858011,0.0334571428571429,1000000},
-{3240338,3858315,3858251,1000000,0.126189473684211},
-{3240339,3858750,3858534,0.177575,0.21309},
-{3240340,3858534,3858524,0.0454,0.05675},
-{3240341,3858524,3858510,0.0521,0.0822631578947368},
-{3240342,3857593,3857537,1000000,1000000},
-{3240343,3858251,3858197,1000000,0.064448275862069},
-{3240344,3858197,3858091,1000000,0.141263157894737},
-{3240345,3858524,3858431,0.112707692307692,1000000},
-{3240346,3858431,3858197,1000000,0.145930434782609},
-{3240347,3858251,3858467,1000000,0.213323076923077},
-{3240348,3858467,3858534,0.0534,1000000},
-{3240349,3858431,3858467,0.03645,0.03645},
-{3240350,3858315,3858211,0.118052459016393,1000000},
-{3240351,3858211,3858147,0.0611225806451613,1000000},
-{3240352,3858718,3858697,0.0149428571428571,0.0142636363636364},
-{3240353,3858697,3858611,0.119874193548387,0.114341538461538},
-{3240354,3861711,3861630,1000000,0.0578769230769231},
-{3240355,3862127,3862054,0.0496181818181818,0.0454833333333333},
-{3240356,3861630,3861783,0.0734222222222222,1000000},
-{3240357,3861783,3862054,0.198311111111111,1000000},
-{3240358,3862054,3861859,0.132783333333333,0.132783333333333},
-{3240359,3861859,3861687,0.155525,0.11664375},
-{3240360,3861783,3861859,1000000,0.0518888888888889},
-{3240361,3861680,3861149,0.442666666666667,0.442666666666667},
-{3240362,3861149,3860993,0.120096,0.120096},
-{3240371,3870844,3870645,0.710470588235294,1000000},
-{3240372,3870645,3869900,1.07155714285714,1000000},
-{3240382,3851741,3852415,1000000,1000000},
-{3240418,3895892,3895975,1000000,0.0371769230769231},
-{3240419,3895975,3896096,1000000,0.0751034482758621},
-{3240426,3895876,3895811,1000000,0.131223529411765},
-{3240439,3861756,3861883,0.09447,0.09447},
-{3240440,3861883,3861756,0.14133,0.14133},
-{3240449,3865313,3865330,0.1118,1000000},
-{3240450,3865330,3865341,0.07205625,1000000},
-{3240451,3899683,3899864,0.118889361702128,1000000},
-{3240452,3899864,3900025,0.0853368421052632,1000000},
-{3240458,3899557,3899724,1000000,0.116629787234043},
-{3240468,3874181,3874164,0.0423857142857143,1000000},
-{3240469,3874164,3874131,0.106,1000000},
-{3240478,3898156,3898206,0.0412819672131148,1000000},
-{3240479,3898206,3898260,0.0470716981132075,1000000},
-{3240485,3898260,3898176,0.05518,1000000},
-{3240486,3898176,3898054,0.0848571428571429,1000000},
-{3240487,3866361,3866393,1000000,0.00927428571428571},
-{3240488,3866393,3866433,1000000,0.0166},
-{3240496,3898640,3898560,0.0819545454545455,0.0419302325581395},
-{3240497,3898560,3898482,0.1114125,0.0524294117647059},
-{3240541,3889066,3889020,1000000,0.036312},
-{3240542,3889020,3888806,1000000,0.13460625},
-{3240543,3889609,3889715,0.0267384615384615,1000000},
-{3240544,3889715,3889751,0.009675,1000000},
-{3240545,3889979,3890169,0.0621666666666667,1000000},
-{3240548,3895308,3895096,0.082665,1000000},
-{3240549,3895096,3894890,0.0997333333333333,1000000},
-{3240557,3877257,3876488,0.387095454545455,0.3548375},
-{3240561,3900248,3900319,0.0270162162162162,1000000},
-{3240562,3900319,3900391,0.0440516129032258,1000000},
-{3240575,3850015,3850459,0.0863076923076923,1000000},
-{3240576,3850459,3850712,0.0526338461538462,1000000},
-{3240577,3851040,3851047,0.00696,0.007656},
-{3240578,3850921,3850907,0.0638290909090909,0.0626892857142857},
-{3240579,3850907,3850898,0.0407263157894737,0.0393457627118644},
-{3240582,3849499,3848471,0.174534782608696,1000000},
-{3240616,3859469,3859926,0.0767014925373134,0.0790615384615385},
-{3240617,3859926,3860588,0.111980281690141,0.116920588235294},
-{3240618,3860588,3861213,0.104825,0.109382608695652},
-{3240957,3872560,3872613,1000000,0.00924255319148936},
-{3240958,3872019,3872576,0.13161,1000000},
-{3240959,3872576,3872618,0.00672,1000000},
-{3240965,3868214,3868192,1000000,0.0132461538461538},
-{3240966,3868192,3868132,1000000,0.0287739130434783},
-{3240967,3874228,3874152,0.0402571428571429,0.0301928571428571},
-{3240968,3855889,3855823,0.05496,0.05496},
-{3240989,3854734,3854655,1000000,1000000},
-{3240990,3854730,3854732,0.0531333333333333,0.0531333333333333},
-{3240991,3854732,3854734,0.0485076923076923,0.0485076923076923},
-{3240993,3860759,3861082,0.21375,0.244285714285714},
-{3240994,3861082,3861244,0.35131875,0.387662068965517},
-{3240995,3898539,3898631,1000000,0.0583945945945946},
-{3240998,3876352,3876478,1000000,0.0781909090909091},
-{3240999,3876478,3876488,0.00958536585365854,0.00836170212765957},
-{3241180,3898026,3898348,1000000,1000000},
-{3241181,3898026,3898016,0.0156882352941176,0.01524},
-{3241182,3898016,3897916,0.119914285714286,0.108309677419355},
-{3241183,3897916,3897897,0.08716,0.04085625},
-{3241184,3897897,3897842,1000000,0.0906},
-{3241185,3898016,3898023,1000000,0.48018},
-{3241186,3898023,3897897,1000000,0.11754},
-{3241187,3898023,3898342,0.31512,0.31512},
-{3241202,3900539,3900530,1000000,1000000},
-{3241205,3901126,3900940,0.439422222222222,0.439422222222222},
-{3241207,3892054,3892117,0.0275866666666667,0.0326684210526316},
-{3241208,3890896,3891214,0.509953846153846,0.189411428571429},
-{3241209,3891214,3891497,1000000,0.21475},
-{3241210,3891214,3891018,0.26185,1000000},
-{3241254,3901044,3900908,1000000,0.0487787234042553},
-{3241255,3900908,3900664,1000000,0.0868897959183673},
-{3241256,3901127,3900983,0.057306976744186,1000000},
-{3241257,3900983,3900739,0.0880595744680851,1000000},
-{3241258,3900908,3900983,0.0942,0.0942},
-{3241284,3880122,3880273,1000000,1000000},
-{3241285,3880273,3879621,1000000,1000000},
-{3241293,3890134,3890336,0.0530042553191489,0.0593142857142857},
-{3241294,3890336,3890481,0.0435,0.0424883720930233},
-{3241295,3890129,3890335,0.149052631578947,0.104888888888889},
-{3241296,3890335,3891566,0.518361290322581,0.595155555555556},
-{3241297,3890336,3890335,0.02941875,0.037656},
-{3241301,3882748,3882537,0.0773066666666667,0.0756260869565217},
-{3241302,3883209,3882665,0.328444444444444,0.328444444444444},
-{3241303,3882665,3882443,0.132822222222222,0.132822222222222},
-{3241304,3882748,3882665,0.0506666666666667,0.0506666666666667},
-{3241388,3895234,3895356,0.0950228571428571,0.127915384615385},
-{3241389,3895356,3895361,1000000,0.0554181818181818},
-{3241390,3895361,3895356,1000000,0.0530608695652174},
-{3241462,3874311,3874500,1000000,0.0631783783783784},
-{3241463,3874500,3875675,1000000,0.3193375},
-{3241482,3903508,3902320,0.294982978723404,0.308093333333333},
-{3241483,3902320,3901384,0.184915789473684,0.184915789473684},
-{3241495,3903508,3903287,0.252853846153846,0.469585714285714},
-{3241496,3903287,3902480,0.323612903225806,0.3344},
-{3241532,3858619,3858733,1000000,1000000},
-{3241543,3876713,3876779,0.0347478260869565,0.04995},
-{3241544,3877381,3876774,0.233386046511628,0.244770731707317},
-{3241545,3876774,3876713,0.0214975609756098,0.02754375},
-{3241546,3876779,3876774,0.0472571428571429,1000000},
-{3241548,3914399,3914994,1000000,0.150452830188679},
-{3241549,3914994,3915224,1000000,0.079152},
-{3241554,3916494,3916218,0.17025,0.194571428571429},
-{3241555,3916218,3915721,0.296163636363636,0.264145945945946},
-{3241556,3914994,3916218,0.72262,0.72262},
-{3241564,3877737,3877723,0.00983076923076923,0.0100235294117647},
-{3241565,3877723,3877381,0.170916,0.1780375},
-{3241573,3877874,3877844,0.0263222222222222,0.0278705882352941},
-{3241574,3877844,3877737,0.0882,0.0916588235294118},
-{3241575,3877737,3877874,1000000,0.852923076923077},
-{3241588,3857953,3857749,0.0766363636363636,0.0766363636363636},
-{3241589,3857749,3857114,0.297085714285714,0.297085714285714},
-{3241590,3857311,3857309,0.103133333333333,0.126572727272727},
-{3241591,3857309,3857052,0.351365217391304,0.351365217391304},
-{3241592,3857749,3857533,0.0872222222222222,0.0872222222222222},
-{3241593,3857533,3857309,1000000,1000000},
-{3241594,3857953,3858022,1000000,1000000},
-{3241595,3858022,3858235,0.1378,0.1378},
-{3241606,3879752,3879898,0.0827777777777778,0.0827777777777778},
-{3241607,3859213,3859265,0.027705,0.0307833333333333},
-{3241608,3859265,3859316,0.0237076923076923,0.0264171428571429},
-{3241609,3859316,3859543,0.0783891891891892,0.0805666666666667},
-{3241610,3859543,3859655,0.0391875,0.0338918918918919},
-{3241611,3859265,3859543,0.147244444444444,1000000},
-{3241612,3916346,3916420,0.0254341463414634,0.0359586206896552},
-{3241613,3916420,3917167,0.255160975609756,0.4359},
-{3241627,3880331,3880194,0.0711183673469388,0.0968},
-{3241628,3880194,3880076,0.071028,0.11098125},
-{3241629,3880488,3880331,0.0915658536585366,0.0816130434782609},
-{3241632,3879504,3879778,0.2546,0.2546},
-{3241633,3880109,3879778,0.134882926829268,1000000},
-{3241634,3879859,3879504,1000000,0.169127272727273},
-{3241635,3880109,3879956,0.175225,0.175225},
-{3241636,3879956,3879859,0.126190909090909,0.126190909090909},
-{3241637,3880488,3880341,0.08745,1000000},
-{3241638,3880341,3880109,0.09444,1000000},
-{3241639,3879956,3880079,0.0768,0.0768},
-{3241640,3880079,3880341,0.50142,0.50142},
-{3241641,3880194,3879975,1000000,0.269215384615385},
-{3241642,3879975,3879859,1000000,0.0625935483870968},
-{3241643,3880079,3879975,0.1681125,0.1681125},
-{3241644,3902402,3902279,1000000,1000000},
-{3241645,3883302,3884205,0.601688888888889,0.601688888888889},
-{3241688,3879778,3879439,0.1596,1000000},
-{3241746,3881996,3881805,0.155347826086957,0.09925},
-{3241747,3881805,3881659,0.119647058823529,0.08136},
-{3241749,3881540,3881605,0.0450947368421053,0.04284},
-{3241750,3881605,3881659,0.0428857142857143,0.0562875},
-{3241751,3881805,3881605,0.19525,1000000},
-{3241775,3883052,3883300,0.38136,0.38136},
-{3241776,3883315,3882977,0.134953846153846,0.187971428571429},
-{3241777,3882977,3882748,0.0902,0.0966428571428572},
-{3241778,3883052,3882977,0.1293,0.1293},
-{3241779,3882612,3882537,0.11256,0.11256},
-{3241780,3881942,3882056,0.2088,0.2088},
-{3241781,3881996,3882056,0.12354,0.12354},
-{3241786,3882160,3881954,0.191028571428571,0.211136842105263},
-{3241788,3882056,3882154,0.21564,0.21564},
-{3241789,3882154,3882612,0.80166,0.80166},
-{3241836,3922650,3922707,0.0492666666666667,0.0492666666666667},
-{3241846,3922239,3921983,0.194936842105263,0.18519},
-{3241847,3922239,3922326,0.0691111111111111,0.0691111111111111},
-{3241856,3921504,3921697,1000000,1000000},
-{3241857,3921697,3921983,1000000,1000000},
-{3241858,3921983,3922033,0.0324230769230769,0.0383181818181818},
-{3241864,3883058,3882206,0.400625,0.400625},
-{3241865,3882206,3882119,0.0394269230769231,0.0372763636363636},
-{3241866,3921938,3922046,0.158914285714286,0.171138461538462},
-{3241867,3922046,3921787,0.336046153846154,0.43686},
-{3241868,3922046,3922130,0.0584888888888889,0.0584888888888889},
-{3241871,3882119,3882343,1000000,0.141775},
-{3241872,3882343,3882443,1000000,0.05322},
-{3241873,3882206,3882343,0.180577777777778,1000000},
-{3241874,3922033,3922227,0.336911111111111,0.336911111111111},
-{3241875,3922227,3922302,1000000,1000000},
-{3241876,3889225,3889711,0.294272727272727,0.294272727272727},
-{3241877,3922302,3922395,1000000,1000000},
-{3241878,3922395,3922513,1000000,1000000},
-{3241879,3922329,3922395,1000000,1000000},
-{3241881,3888770,3888502,1000000,0.129422222222222},
-{3241882,3888850,3888908,1000000,0.141992307692308},
-{3241883,3888908,3888770,1000000,0.0595161290322581},
-{3241890,3890065,3890183,1000000,1000000},
-{3241891,3890183,3891335,1000000,1000000},
-{3241892,3922841,3922878,0.0281555555555556,0.0281555555555556},
-{3241893,3922878,3922918,0.0299777777777778,0.0299777777777778},
-{3241894,3922878,3922806,0.128911111111111,0.128911111111111},
-{3241895,3922806,3922918,0.101911111111111,0.101911111111111},
-{3241896,3922841,3922751,0.0673111111111111,0.0673111111111111},
-{3241897,3922751,3922611,1000000,1000000},
-{3241898,3923041,3922974,0.0597142857142857,0.057},
-{3241899,3922974,3922737,0.1912,0.1912},
-{3241900,3922737,3922974,0.193133333333333,0.193133333333333},
-{3241901,3922737,3922570,0.134844444444444,0.134844444444444},
-{3241915,3923243,3923178,0.0535333333333333,0.0535333333333333},
-{3241916,3923178,3923071,0.100711111111111,0.100711111111111},
-{3241917,3923071,3922862,1000000,1000000},
-{3241918,3923178,3923375,0.177266666666667,0.177266666666667},
-{3241919,3923375,3923515,1000000,1000000},
-{3241923,3882139,3878649,1000000,1000000},
-{3241924,3922732,3922831,0.0947111111111111,0.0947111111111111},
-{3241925,3922732,3922831,0.182844444444444,0.182844444444444},
-{3241926,3922831,3922882,0.0406222222222222,0.0406222222222222},
-{3241927,3922882,3923123,0.205666666666667,0.205666666666667},
-{3241928,3923002,3923102,0.0515846153846154,0.050295},
-{3241929,3923102,3923123,0.0127538461538462,0.0121317073170732},
-{3241930,3922882,3923102,0.571866666666667,0.571866666666667},
-{3241931,3883124,3883327,0.093495652173913,0.0896},
-{3241932,3883327,3883480,0.063816,0.0569785714285714},
-{3241933,3881869,3881997,0.07899,0.063192},
-{3241934,3881997,3882066,0.0598941176470588,0.0442695652173913},
-{3241937,3922505,3922377,0.0826444444444445,0.0826444444444445},
-{3241938,3922809,3923002,0.161155555555556,0.161155555555556},
-{3241939,3922505,3922742,0.172866666666667,0.172866666666667},
-{3241940,3922742,3922809,0.191475,0.191475},
-{3241941,3922377,3922643,0.177866666666667,0.177866666666667},
-{3241942,3922643,3922731,0.0751777777777778,0.0751777777777778},
-{3241943,3922742,3922643,0.0784,0.0784},
-{3241944,3885132,3885078,0.265,0.240348837209302},
-{3241945,3885078,3885073,0.00967692307692308,0.0102},
-{3241947,3883917,3884579,1000000,1000000},
-{3241948,3884585,3884579,0.0227333333333333,0.0227333333333333},
-{3241949,3922244,3922556,0.168989189189189,0.156315},
-{3241975,3890902,3891400,0.358672727272727,0.358672727272727},
-{3241976,3891400,3891335,1000000,1000000},
-{3242033,3890844,3891217,0.1386,0.1386},
-{3242034,3891217,3891457,1000000,1000000},
-{3242043,3920997,3921200,0.263711111111111,0.263711111111111},
-{3242044,3921200,3921311,0.085608,0.085608},
-{3242045,3920997,3921293,0.194,0.194},
-{3242046,3921293,3921200,0.0578222222222222,0.0578222222222222},
-{3242049,3885816,3885796,0.0730888888888889,0.0598},
-{3242050,3885796,3885787,0.0304444444444444,0.0293571428571429},
-{3242051,3885553,3885731,0.0878,0.0711891891891892},
-{3242052,3885731,3885787,0.0252774193548387,0.0230470588235294},
-{3242053,3885796,3885731,0.02736,1000000},
-{3242059,3921311,3921224,0.057264,0.0795333333333333},
-{3242060,3921224,3921111,0.0847043478260869,0.102536842105263},
-{3242061,3921284,3921224,0.07768,0.07768},
-{3242062,3921284,3921364,0.1674,0.1674},
-{3242063,3921364,3921291,0.0510666666666667,0.0510666666666667},
-{3242064,3921364,3921405,0.0321333333333333,0.0321333333333333},
-{3242065,3921311,3921356,0.0399555555555556,0.0399555555555556},
-{3242066,3921356,3921284,0.0523111111111111,0.0523111111111111},
-{3242073,3921059,3921111,0.05736,0.0318666666666667},
-{3242085,3921059,3921180,1000000,1000000},
-{3242086,3921180,3921194,1000000,1000000},
-{3242095,3859258,3859179,1000000,1000000},
-{3242096,3859179,3858773,0.218111111111111,0.218111111111111},
-{3242103,3917234,3917628,1000000,0.23976},
-{3242104,3920842,3920901,0.05493,0.0646235294117647},
-{3242105,3920901,3920755,0.136371428571429,0.168458823529412},
-{3242106,3917310,3917379,0.04265,1000000},
-{3242107,3920901,3921402,1000000,1000000},
-{3242108,3921402,3921678,1000000,1000000},
-{3242109,3921291,3921402,1000000,1000000},
-{3242110,3921402,3921763,1000000,1000000},
-{3242114,3886042,3886037,0.0126558139534884,0.0129571428571429},
-{3242115,3886037,3885971,0.04206,0.0647076923076923},
-{3242116,3921975,3921846,0.103377777777778,0.103377777777778},
-{3242117,3921980,3922168,0.105666666666667,0.105666666666667},
-{3242125,3885971,3885601,0.251645454545455,0.3460125},
-{3242126,3885601,3885546,0.303521739130435,0.317318181818182},
-{3242127,3886037,3886021,0.0634133333333333,0.0663627906976744},
-{3242128,3886021,3885978,0.19886511627907,0.190026666666667},
-{3242129,3885601,3886021,0.300557142857143,1000000},
-{3242136,3857094,3857327,1000000,0.101110344827586},
-{3242137,3857116,3857327,0.160452631578947,1000000},
-{3242138,3857094,3857116,0.0348,0.0348},
-{3242151,3898941,3899354,0.213364285714286,0.19914},
-{3242152,3899354,3899466,0.0654444444444445,0.0654444444444445},
-{3242153,3899493,3899472,0.111517647058824,0.101560714285714},
-{3242154,3899472,3899466,0.04365,0.0398210526315789},
-{3242155,3899354,3899472,0.0983333333333333,0.0885},
-{3242159,3921424,3921146,0.186155555555556,0.186155555555556},
-{3242160,3921559,3921597,0.0255333333333333,0.0265153846153846},
-{3242161,3921597,3921424,0.2146,0.2146},
-{3242162,3921424,3921597,0.0995333333333333,0.0995333333333333},
-{3242163,3921597,3921789,0.125088888888889,0.125088888888889},
-{3242165,3921875,3922258,0.175006451612903,0.187075862068966},
-{3242166,3922258,3922392,0.0510285714285714,0.0465913043478261},
-{3242167,3921642,3922003,1000000,0.2386},
-{3242168,3922003,3922258,1000000,0.1656},
-{3242169,3922003,3922146,0.0936666666666667,0.0936666666666667},
-{3242176,3870701,3870622,1000000,0.19968},
-{3242177,3870622,3870451,0.162023076923077,0.162023076923077},
-{3242178,3869939,3869995,0.0993555555555556,0.0993555555555556},
-{3242179,3869995,3869823,0.139066666666667,0.139066666666667},
-{3242180,3869995,3870171,0.0781111111111111,0.0781111111111111},
-{3242181,3919012,3919219,0.0977560975609756,0.102769230769231},
-{3242182,3919219,3919281,0.0308057142857143,0.0326727272727273},
-{3242183,3922650,3922371,0.207860869565217,0.207860869565217},
-{3242184,3919281,3919236,0.0389739130434783,0.0689538461538461},
-{3242185,3919236,3918872,0.214508108108108,0.256025806451613},
-{3242186,3922611,3922547,1000000,1000000},
-{3242187,3922547,3922371,0.143488888888889,0.143488888888889},
-{3242188,3922371,3922455,0.194222222222222,0.194222222222222},
-{3242189,3922455,3922513,1000000,1000000},
-{3242190,3922547,3922455,0.0625333333333333,0.0625333333333333},
-{3242191,3899220,3899069,0.104966666666667,0.107965714285714},
-{3242192,3898770,3898995,0.102383333333333,0.11518125},
-{3242193,3899069,3898995,0.0317189189189189,1000000},
-{3242194,3899029,3898726,0.183742105263158,0.183742105263158},
-{3242195,3898995,3899029,0.039,1000000},
-{3242196,3899029,3899069,0.0298928571428571,1000000},
-{3242200,3920606,3920914,0.325766666666667,0.308621052631579},
-{3242201,3920914,3921059,0.15264,0.0880615384615385},
-{3242202,3920864,3920914,0.08304,0.08304},
-{3242203,3920864,3920814,0.09426,0.09426},
-{3242204,3920605,3920864,0.4182,0.4182},
-{3242205,3920605,3920542,0.13446,0.13446},
-{3242206,3920814,3920658,0.4686,0.4686},
-{3242207,3920658,3920605,0.11334,0.11334},
-{3242208,3920542,3920603,0.10656,0.10656},
-{3242209,3920658,3920603,0.1173,0.1173},
-{3242210,3920603,3920473,0.25464,0.25464},
-{3242211,3920473,3920542,0.34752,0.34752},
-{3242212,3921119,3921362,0.1025,0.0838636363636364},
-{3242213,3921362,3921539,0.0577736842105263,0.0562923076923077},
-{3242217,3896505,3896952,0.270192,0.28145},
-{3242218,3896952,3897055,0.0645428571428572,0.0645428571428572},
-{3242219,3897055,3897101,0.0332423076923077,0.0314290909090909},
-{3242220,3897101,3897103,0.00204230769230769,0.00196666666666667},
-{3242221,3896952,3897101,0.14468,0.14468},
-{3242238,3884687,3884231,1000000,0.3886875},
-{3242239,3884231,3884208,1000000,0.0338285714285714},
-{3242240,3884628,3884587,0.2343,0.2343},
-{3242241,3884231,3884449,0.8316,0.8316},
-{3242247,3920606,3920784,0.078446511627907,0.0822731707317073},
-{3242248,3920784,3920983,0.102920930232558,0.100581818181818},
-{3242249,3919445,3919211,0.4299,0.4299},
-{3242250,3919721,3919445,1.35816,1.35816},
-{3242251,3919445,3919721,0.81012,0.81012},
-{3242252,3920784,3920705,0.11382,0.11382},
-{3242253,3920705,3920128,2.08032,2.08032},
-{3242254,3920128,3920705,2.01936,2.01936},
-{3242255,3920413,3920606,0.096153488372093,0.133374193548387},
-{3242256,3920128,3920089,0.16704,0.16704},
-{3242257,3920413,3920089,0.45036,0.45036},
-{3242258,3920089,3919911,0.30192,0.30192},
-{3242259,3919911,3919319,0.86328,0.86328},
-{3242260,3885020,3885087,0.319278260869565,0.319278260869565},
-{3242261,3885087,3885143,0.4857,0.4857},
-{3242262,3919911,3919843,0.27312,0.27312},
-{3242263,3919843,3919720,1.31424,1.31424},
-{3242264,3919720,3919440,0.78636,0.78636},
-{3242265,3919843,3919720,0.4656,0.4656},
-{3242266,3920089,3919938,0.7134,0.7134},
-{3242267,3919938,3919782,0.501,0.501},
-{3242268,3919938,3919782,1.34916,1.34916},
-{3242269,3919782,3919755,0.11184,0.11184},
-{3242270,3919755,3919721,0.13536,0.13536},
-{3242271,3920053,3920413,0.160275,0.156365853658537},
-{3242273,3919211,3919695,0.164657142857143,0.17289},
-{3242274,3919755,3920029,1000000,0.45696},
-{3242275,3920029,3920053,1000000,0.0150692307692308},
-{3242283,3881799,3878878,1000000,1000000},
-{3242286,3878878,3878855,1000000,1000000},
-{3242287,3878855,3880429,1000000,1000000},
-{3242288,3880408,3880839,1000000,1000000},
-{3242289,3880429,3880839,1000000,1000000},
-{3242301,3889019,3889088,0.40026,0.40026},
-{3242302,3885834,3887715,1.03494,1.03494},
-{3242303,3887715,3889019,0.63141,0.63141},
-{3242304,3887351,3887340,0.19704,0.19704},
-{3242306,3887351,3889654,1.20468,1.20468},
-{3242309,3903138,3903559,1000000,1000000},
-{3242310,3903559,3903036,1000000,1000000},
-{3242318,3913400,3913589,0.121533333333333,0.10938},
-{3242319,3913589,3913602,0.00619090909090909,0.00681},
-{3242324,3913591,3913625,0.0156705882352941,0.0111},
-{3242325,3913625,3914075,0.322833333333333,0.242125},
-{3242328,3923213,3923239,0.0227333333333333,0.0227333333333333},
-{3242329,3923239,3923686,1000000,1000000},
-{3242333,3921362,3921441,0.144415384615385,0.234675},
-{3242337,3921578,3921964,0.328088888888889,0.328088888888889},
-{3242338,3921441,3921448,0.01848,0.0462},
-{3242339,3921441,3921738,1.47385714285714,1000000},
-{3242340,3921738,3921578,0.190909090909091,1000000},
-{3242341,3921448,3921476,0.0317454545454545,0.0582},
-{3242344,3921448,3921653,0.15392,0.23088},
-{3242345,3921476,3921653,0.22092,0.22092},
-{3242347,3921476,3921513,0.0298666666666667,0.03584},
-{3242348,3921513,3921578,0.0496105263157895,0.0496105263157895},
-{3242350,3921653,3921686,0.0204,0.0204},
-{3242351,3921686,3921738,0.0436222222222222,1000000},
-{3242352,3921513,3921686,0.2127,0.2127},
-{3242364,3893648,3893806,0.0918222222222222,0.0854896551724138},
-{3242365,3882361,3882426,0.0231647058823529,0.0319297297297297},
-{3242366,3882426,3883123,0.1874,1000000},
-{3242369,3882426,3883031,1000000,0.21816},
-{3242380,3911768,3912513,0.536433333333333,0.4598},
-{3242381,3912513,3913061,0.3788625,0.336766666666667},
-{3242383,3912355,3912519,0.0914086956521739,0.10512},
-{3242384,3912519,3912546,0.00694838709677419,0.00936521739130435},
-{3242385,3893210,3893266,0.013104,0.013104},
-{3242386,3893219,3893718,0.313118181818182,0.287025},
-{3242396,3909590,3909633,0.01185,0.0116081632653061},
-{3242399,3900345,3900783,0.293777777777778,0.293777777777778},
-{3242400,3900783,3900886,1000000,1000000},
-{3242401,3919957,3920158,0.0733813953488372,0.0717136363636364},
-{3242402,3920158,3920353,0.060465,0.0620153846153846},
-{3242405,3920816,3920925,0.79974,0.79974},
-{3242406,3920925,3920816,0.1647,0.1647},
-{3242410,3920158,3920271,0.18216,0.18216},
-{3242411,3920271,3920816,1.1019,1.1019},
-{3242412,3920482,3920610,0.214636363636364,0.214636363636364},
-{3242413,3920271,3920610,0.46188,0.46188},
-{3242414,3920610,3920628,1000000,0.0177272727272727},
-{3242415,3920628,3921305,1000000,0.47875},
-{3242418,3917921,3918321,0.12942,0.136231578947368},
-{3242419,3918321,3918821,0.178584615384615,0.17412},
-{3242420,3918484,3918321,1000000,1000000},
-{3242421,3901248,3900846,0.120661538461538,0.104573333333333},
-{3242422,3901248,3901284,0.114975,0.18396},
-{3242423,3901284,3901209,0.0648,0.0891},
-{3242424,3901284,3901327,0.0246666666666667,0.0246666666666667},
-{3242425,3896012,3895938,1000000,1000000},
-{3242426,3917875,3917981,0.0756315789473684,0.0898125},
-{3242427,3917981,3918196,0.154642105263158,0.163233333333333},
-{3242442,3916601,3916420,1000000,1000000},
-{3242451,3899210,3899646,0.0983586206896552,1000000},
-{3242452,3910572,3910757,1000000,1000000},
-{3242453,3918837,3919232,0.220569230769231,0.136542857142857},
-{3242454,3918837,3919471,1000000,0.329888888888889},
-{3242455,3919326,3919360,1000000,0.03996},
-{3242456,3919360,3919471,1000000,0.0543257142857143},
-{3242457,3919232,3919360,1000000,0.0885818181818182},
-{3242458,3913103,3914483,1000000,1000000},
-{3242459,3919695,3919879,0.168317647058824,0.130063636363636},
-{3242461,3919879,3920053,0.0967538461538461,0.0898428571428572},
-{3242462,3919695,3920029,1000000,0.283628571428571},
-{3242465,3914483,3912088,1000000,1000000},
-{3242466,3915906,3916007,0.0953357142857143,0.0651073170731707},
-{3242467,3916007,3916164,0.2355375,0.139577777777778},
-{3242468,3916164,3916368,0.0592528301886793,0.0570981818181818},
-{3242469,3916368,3916961,0.146116981132075,0.140803636363636},
-{3242470,3916007,3916368,0.546323076923077,0.5073},
-{3242520,3873951,3874082,0.0402439024390244,1000000},
-{3242521,3874082,3874281,0.06,1000000},
-{3242522,3897268,3897418,0.22584,0.22584},
-{3242531,3901655,3901874,0.126288888888889,0.126288888888889},
-{3242532,3901874,3902285,0.214955555555556,0.214955555555556},
-{3242540,3917137,3917299,0.0671657142857143,1000000},
-{3242634,3910675,3911082,0.337213953488372,0.45313125},
-{3242635,3911082,3911220,0.226689473684211,0.297041379310345},
-{3242636,3911370,3911361,0.02502,0.02502},
-{3242637,3911361,3911290,0.14916,0.14916},
-{3242638,3911082,3911361,0.14874,0.14874},
-{3242661,3910865,3910970,0.0557714285714286,0.0557714285714286},
-{3242662,3910970,3910949,0.0789652173913044,0.0672666666666667},
-{3242668,3911011,3911099,0.02724,0.0360529411764706},
-{3242669,3911099,3911282,0.0643285714285714,0.08443125},
-{3242670,3910970,3910988,0.0230275862068966,0.0230275862068966},
-{3242671,3910988,3911282,0.19851,0.19851},
-{3242672,3911099,3910988,0.29745,0.29745},
-{3242683,3891497,3891822,1000000,0.147317647058824},
-{3242684,3891760,3891915,0.0749842105263158,0.0814114285714286},
-{3242685,3891915,3892054,0.0665714285714286,0.0735789473684211},
-{3242686,3907016,3907159,0.0275877551020408,1000000},
-{3242687,3906700,3906856,0.0367304347826087,1000000},
-{3242688,3906856,3906877,0.00473333333333333,1000000},
-{3242691,3919626,3919532,1000000,0.0514461538461538},
-{3242692,3919532,3919459,1000000,0.0373058823529412},
-{3242694,3892977,3892193,0.273365217391304,1000000},
-{3242695,3893024,3893037,0.0196875,0.0196875},
-{3242696,3893037,3893563,0.487133333333333,0.487133333333333},
-{3242697,3893024,3892977,0.0145565217391304,1000000},
-{3242698,3893138,3893024,0.0498954545454546,1000000},
-{3242699,3894487,3894506,0.012227027027027,0.0137090909090909},
-{3242700,3894506,3894941,0.315488888888889,0.37035652173913},
-{3242702,3894171,3894470,0.140571428571429,0.1476},
-{3242703,3894470,3894487,0.0082054054054054,0.0092},
-{3242704,3894443,3894470,0.0173777777777778,1000000},
-{3242707,3893307,3893782,1000000,0.226960975609756},
-{3242708,3893138,3893173,1000000,0.020565},
-{3242709,3893173,3893307,1000000,0.0831090909090909},
-{3242710,3893143,3893278,0.0808666666666667,1000000},
-{3242711,3895950,3895930,1000000,1000000},
-{3242712,3896104,3896113,0.126266666666667,0.126266666666667},
-{3242716,3893143,3892983,1000000,0.0701857142857143},
-{3242717,3892983,3892156,1000000,0.279510638297872},
-{3242718,3893024,3892983,0.0278526315789474,0.02646},
-{3242724,3893278,3893742,0.223360975609756,1000000},
-{3242725,3893782,3893742,0.05116,0.0403894736842105},
-{3242726,3896356,3896534,0.0740666666666667,0.0740666666666667},
-{3242727,3896329,3896393,0.08048,0.08048},
-{3242728,3896393,3896534,0.104733333333333,0.104733333333333},
-{3242729,3896356,3896393,0.0941111111111111,0.0941111111111111},
-{3242759,3888283,3888378,0.172177777777778,0.172177777777778},
-{3242760,3888131,3888283,0.0693,0.0693},
-{3242761,3888378,3888131,0.197666666666667,1000000},
-{3242762,3903889,3903467,0.267321428571429,0.440294117647059},
-{3242763,3903467,3903057,0.178389473684211,0.178389473684211},
-{3242765,3916335,3916387,0.821109090909091,0.821109090909091},
-{3242766,3904282,3904520,0.0607854545454545,0.0726782608695652},
-{3242767,3904520,3904565,0.0121178571428571,0.0138489795918367},
-{3242768,3903467,3903572,0.0968210526315789,0.108211764705882},
-{3242769,3904283,3904520,0.135830769230769,0.1308},
-{3242770,3903572,3904283,0.793542857142857,0.793542857142857},
-{3242771,3915447,3916261,1000000,1000000},
-{3242772,3903572,3903822,0.40552,0.40552},
-{3242773,3903935,3904283,0.283357894736842,0.26919},
-{3242774,3903822,3903935,0.0887428571428571,0.109623529411765},
-{3242775,3916387,3916261,0.127863157894737,0.127863157894737},
-{3242776,3916282,3916261,0.0162333333333333,0.0153789473684211},
-{3242777,3916762,3917118,0.17472,0.1248},
-{3242778,3916659,3916387,0.428966666666667,0.428966666666667},
-{3242779,3916282,3916659,0.309663157894737,0.255808695652174},
-{3242780,3916659,3916762,0.0608086956521739,0.04995},
-{3242781,3916261,3916659,0.594,0.565714285714286},
-{3242783,3905120,3905293,0.0684130434782609,1000000},
-{3242784,3905293,3905882,0.43233,1000000},
-{3242785,3904858,3904943,0.0172363636363636,0.0185882352941176},
-{3242786,3904943,3905162,0.0623555555555555,0.0647538461538461},
-{3242787,3905162,3905225,0.0192905660377359,0.020448},
-{3242788,3905162,3905005,0.162233333333333,1000000},
-{3242789,3904819,3904610,0.187333333333333,0.187333333333333},
-{3242790,3904610,3904666,0.11046,0.11046},
-{3242791,3859613,3859823,0.0878689655172414,0.106175},
-{3242792,3905293,3904946,0.209914285714286,0.217688888888889},
-{3242793,3904946,3904819,0.0477724137931034,1000000},
-{3242794,3904666,3904846,0.115486956521739,0.126485714285714},
-{3242795,3904846,3904946,0.0621096774193548,1000000},
-{3242796,3904778,3904846,0.0344,1000000},
-{3242797,3904666,3904738,0.0748125,0.0748125},
-{3242798,3904686,3904943,0.268058823529412,1000000},
-{3242799,3904738,3904686,0.142511111111111,0.142511111111111},
-{3242800,3905005,3904854,0.101858823529412,0.101858823529412},
-{3242801,3904854,3904686,0.13635,0.13635},
-{3242802,3904738,3904854,0.13695,0.128894117647059},
-{3242803,3904738,3905005,0.335022222222222,1000000},
-{3242804,3904819,3904778,0.04096,1000000},
-{3242805,3904778,3904610,0.127515789473684,0.127515789473684},
-{3242816,3910695,3910757,0.178032,0.178032},
-{3242817,3910695,3910759,0.04275,0.04275},
-{3242825,3910671,3910820,0.0852,0.0852},
-{3242826,3910757,3910787,0.0881142857142857,0.0881142857142857},
-{3242827,3910787,3910806,0.0568888888888889,0.0568888888888889},
-{3242828,3910806,3910917,0.0551777777777778,0.0551777777777778},
-{3242829,3910917,3911207,0.141977777777778,0.141977777777778},
-{3242830,3910787,3910917,0.0508,0.0508},
-{3242832,3851899,3852127,0.208222222222222,0.208222222222222},
-{3242833,3852215,3852127,0.0440222222222222,0.0440222222222222},
-{3242834,3852127,3852019,0.0541333333333333,0.0541333333333333},
-{3242849,3860500,3860640,0.0681913043478261,0.0667404255319149},
-{3242850,3860640,3860922,0.156516279069767,0.152959090909091},
-{3242851,3860640,3861065,0.219955555555556,0.219955555555556},
-{3242852,3860922,3861044,0.158356097560976,0.150990697674419},
-{3242853,3861044,3861059,0.0211434782608696,0.0226186046511628},
-{3242854,3861044,3861373,0.168511111111111,0.168511111111111},
-{3242892,3863053,3862584,0.514755555555556,0.514755555555556},
-{3242893,3862584,3862204,0.2538,0.2538},
-{3242894,3862720,3862525,0.239290909090909,0.210576},
-{3242895,3862525,3862363,0.225221052631579,0.225221052631579},
-{3242896,3862525,3862097,0.176666666666667,0.176666666666667},
-{3242902,3866430,3865737,0.579458823529412,0.579458823529412},
-{3242903,3865737,3865622,0.0677666666666667,0.0451777777777778},
-{3242904,3865831,3865708,0.0486,0.0271255813953488},
-{3242905,3865708,3865622,0.0255096774193548,0.0188285714285714},
-{3242906,3865737,3865708,0.0238166666666667,1000000},
-{3242908,3864109,3863803,0.142377777777778,0.142377777777778},
-{3242913,3864983,3865979,0.443288888888889,0.443288888888889},
-{3242914,3867566,3866633,0.265954285714286,0.358015384615385},
-{3242915,3866633,3866114,0.14218064516129,0.14692},
-{3242916,3866633,3866590,0.0987111111111111,0.0987111111111111},
-{3242918,3867150,3866914,0.1082,0.1082},
-{3242922,3866579,3866355,0.202444444444444,0.202444444444444},
-{3242923,3866954,3866719,0.220133333333333,0.220133333333333},
-{3242924,3866719,3866579,1000000,1000000},
-{3242925,3867698,3867760,1000000,1000000},
-{3242926,3867760,3867547,0.0854444444444445,0.0854444444444445},
-{3242927,3867566,3867547,1000000,1000000},
-{3242928,3867547,3867480,0.211066666666667,0.211066666666667},
-{3242935,3867305,3867747,0.182884615384615,0.182884615384615},
-{3242936,3867747,3868048,0.129913043478261,0.129913043478261},
-{3242937,3869759,3869388,0.213111111111111,0.213111111111111},
-{3242938,3873479,3873488,0.01075,0.010530612244898},
-{3242939,3873358,3872059,0.354384615384615,0.383916666666667},
-{3242940,3873485,3873484,0.016475,0.0175733333333333},
-{3242941,3873484,3873479,0.012465306122449,0.0132782608695652},
-{3242942,3873479,3873413,0.042,0.035},
-{3242943,3873413,3873358,0.03096,0.0281454545454545},
-{3242946,3869583,3869329,0.10905,0.10905},
-{3242947,3869329,3869206,1000000,1000000},
-{3242957,3850077,3849921,0.078576,0.0677379310344828},
-{3242958,3849921,3849479,0.211244444444444,0.183987096774194},
-{3242959,3849921,3849299,0.760177777777778,0.760177777777778},
-{3242960,3870284,3870239,1000000,1000000},
-{3242961,3869755,3869700,0.36006,0.36006},
-{3242962,3860120,3860261,0.180469565217391,0.180469565217391},
-{3242963,3860261,3860267,0.0157333333333333,0.0157333333333333},
-{3242964,3860261,3860438,1000000,1000000},
-{3242965,3860261,3860021,0.128066666666667,0.128066666666667},
-{3242966,3860021,3860007,0.0831777777777778,0.0831777777777778},
-{3242967,3859769,3860021,1000000,1000000},
-{3242970,3870681,3870682,0.00153333333333333,0.00153333333333333},
-{3242971,3870485,3870681,0.0686,0.0686},
-{3242974,3858791,3858968,1000000,1000000},
-{3242975,3858825,3858925,0.0431777777777778,0.0431777777777778},
-{3242976,3858925,3859000,1000000,1000000},
-{3242979,3859353,3859326,0.0106227272727273,0.0106227272727273},
-{3242980,3859326,3859155,0.05848,0.05848},
-{3242981,3859644,3859436,1000000,0.21918},
-{3242982,3859436,3859226,1000000,0.1803},
-{3242983,3859326,3859436,1000000,1000000},
-{3242984,3862158,3862038,0.28191724137931,0.291985714285714},
-{3242985,3862038,3862018,0.0694636363636364,0.0727714285714286},
-{3242986,3862148,3862038,0.098664,1000000},
-{3242987,3863120,3862449,0.221545945945946,0.2561625},
-{3242988,3870971,3871035,0.0415555555555556,0.0415555555555556},
-{3242989,3870971,3870788,0.10863,0.10863},
-{3242990,3870788,3870129,0.244577777777778,0.244577777777778},
-{3242991,3878230,3878137,1000000,0.2116},
-{3242992,3877159,3878137,0.363327272727273,0.32625306122449},
-{3242993,3878137,3878290,1000000,0.0920823529411765},
-{3242997,3876894,3876587,1000000,0.114457894736842},
-{3242998,3876715,3876894,1000000,0.0723782608695652},
-{3242999,3876894,3877159,0.101804347826087,0.09366},
-{3243000,3870909,3870752,0.0971333333333333,0.1457},
-{3243001,3870752,3870747,0.00246315789473684,0.0036},
-{3243002,3870752,3870602,1000000,1000000},
-{3243003,3870602,3870681,0.0924222222222222,0.0924222222222222},
-{3243005,3850376,3849162,1000000,1000000},
-{3243007,3851283,3851306,0.029736,0.0391263157894737},
-{3243008,3851306,3851746,0.212181818181818,0.241448275862069},
-{3243010,3850876,3850510,0.216222222222222,0.216222222222222},
-{3243016,3871900,3872417,1000000,1000000},
-{3243017,3871607,3871621,0.0249260869565217,1000000},
-{3243018,3871721,3871607,0.0655764705882353,0.07432},
-{3243019,3871642,3871682,1000000,0.0693},
-{3243020,3871682,3871721,1000000,0.0551526315789474},
-{3243021,3871547,3871582,0.0458625,1000000},
-{3243022,3871582,3871607,0.0442851063829787,1000000},
-{3243023,3871682,3871582,0.0189411764705882,0.0189411764705882},
-{3243024,3878496,3878364,0.0385826086956522,1000000},
-{3243025,3878950,3878922,0.0107,1000000},
-{3243026,3879076,3878919,1000000,0.0420566037735849},
-{3243027,3878919,3878689,1000000,0.0689192307692308},
-{3243028,3878689,3878919,0.2511,1000000},
-{3243029,3878562,3878407,0.10833,1000000},
-{3243030,3878407,3878205,0.156433333333333,1000000},
-{3243031,3878496,3878471,1000000,0.0838235294117647},
-{3243032,3878471,3878922,1000000,0.341647058823529},
-{3243033,3878407,3878471,1000000,0.0624},
-{3243035,3878689,3878525,1000000,0.040665306122449},
-{3243036,3878525,3878421,1000000,0.03315},
-{3243037,3878922,3878646,0.08725,1000000},
-{3243038,3878646,3878496,0.0418085106382979,1000000},
-{3243039,3859948,3859774,0.059115,0.0563},
-{3243040,3859774,3859562,0.0931655172413793,0.0711},
-{3243044,3851701,3849923,0.547442857142857,0.489204255319149},
-{3243049,3861944,3861652,0.0763764705882353,0.0721333333333333},
-{3243050,3861652,3861568,0.0243411764705882,0.023422641509434},
-{3243051,3862428,3861715,0.481822222222222,0.481822222222222},
-{3243052,3861715,3861652,1000000,1000000},
-{3243054,3886888,3886782,0.0569181818181818,1000000},
-{3243055,3886782,3885804,0.275707317073171,1000000},
-{3243056,3886782,3886726,0.1218,1000000},
-{3243057,3886726,3886802,0.0750857142857143,0.10512},
-{3243058,3886802,3886807,0.0429,0.0449428571428571},
-{3243059,3886807,3886847,0.0514105263157895,1000000},
-{3243060,3886847,3886888,0.129860869565217,1000000},
-{3243061,3886802,3886847,0.01746,1000000},
-{3243062,3877560,3878066,0.279933333333333,1000000},
-{3243063,3877560,3877542,0.05058,0.06744},
-{3243064,3878066,3878052,0.0475813953488372,1000000},
-{3243065,3878052,3877943,0.234860377358491,1000000},
-{3243066,3877930,3878052,1000000,0.114572727272727},
-{3243067,3877321,3877314,0.0502421052631579,0.0502421052631579},
-{3243068,3877930,3877321,1000000,1.30152},
-{3243069,3877898,3877812,0.168294545454545,1000000},
-{3243070,3877980,3877888,1000000,0.213559090909091},
-{3243071,3877898,3877980,0.0488,0.0305},
-{3243072,3877542,3877427,0.296715789473684,0.296715789473684},
-{3243073,3889464,3889544,0.0473733333333333,0.0435061224489796},
-{3243074,3889544,3889872,0.19185,0.1438875},
-{3243075,3888450,3889544,0.49569375,1000000},
-{3243076,3889352,3890607,0.272830188679245,1000000},
-{3243078,3877775,3877898,0.07788,0.0449307692307692},
-{3243079,3877943,3877919,0.0553473684210526,1000000},
-{3243080,3877919,3877898,0.0314275862068965,1000000},
-{3243081,3877775,3877919,1000000,0.0783931034482759},
-{3243082,3890694,3890815,1000000,0.0312279069767442},
-{3243083,3890815,3890952,1000000,0.0423627906976744},
-{3243084,3890952,3891031,1000000,0.0243571428571429},
-{3243088,3877314,3877417,0.0290181818181818,0.02394},
-{3243089,3877417,3877775,0.141825,0.10636875},
-{3243090,3877321,3877417,1000000,0.0408},
-{3243091,3893439,3893501,0.0492375,0.0477454545454545},
-{3243092,3893439,3893284,1000000,0.53424},
-{3243093,3893284,3893501,1000000,0.52752},
-{3243094,3877580,3877621,1000000,0.00878918918918919},
-{3243095,3877621,3878079,1000000,0.158958620689655},
-{3243096,3878150,3878135,1000000,0.0429260869565217},
-{3243097,3878135,3878017,1000000,0.264970212765957},
-{3243098,3878017,3877991,1000000,0.0690666666666667},
-{3243099,3877991,3877980,1000000,0.0354875},
-{3243100,3901522,3901670,0.332311111111111,0.332311111111111},
-{3243101,3901670,3901719,0.0268888888888889,0.0268888888888889},
-{3243102,3901670,3901597,0.0272,0.0272},
-{3243103,3883658,3883610,0.0290076923076923,1000000},
-{3243104,3885289,3886276,0.270505263157895,0.302329411764706},
-{3243105,3886276,3886726,0.240782608695652,0.23075},
-{3243106,3886103,3886276,1000000,1000000},
-{3243107,3886045,3886174,1000000,1000000},
-{3243108,3875733,3875323,0.19235,0.15388},
-{3243109,3875323,3875124,0.145447058823529,0.107504347826087},
-{3243110,3875323,3875373,0.115044444444444,0.115044444444444},
-{3243112,3887860,3887953,0.0321857142857143,1000000},
-{3243113,3887953,3887990,0.0233428571428571,1000000},
-{3243114,3887842,3887953,1000000,0.0231076923076923},
-{3243115,3887957,3888028,1000000,0.0349363636363636},
-{3243116,3888028,3888061,1000000,0.0156818181818182},
-{3243117,3887953,3888028,1000000,0.0289875},
-{3243118,3884812,3885013,0.194,0.127756097560976},
-{3243119,3885013,3885054,0.0276909090909091,0.0198652173913043},
-{3243120,3889387,3889598,0.105876923076923,0.161929411764706},
-{3243121,3889598,3890417,0.251944186046512,0.300933333333333},
-{3243122,3889598,3889508,0.248733333333333,0.248733333333333},
-{3243123,3875553,3875772,0.0915692307692308,0.140047058823529},
-{3243124,3875772,3875735,0.0748444444444444,0.0748444444444444},
-{3243125,3875772,3876140,0.236273684210526,0.236273684210526},
-{3243126,3876140,3876263,0.0492666666666667,0.0492666666666667},
-{3243127,3876140,3876117,0.0650666666666667,0.0650666666666667},
-{3243130,3886438,3886467,0.0468352941176471,0.06635},
-{3243131,3885811,3886438,1000000,0.157883720930233},
-{3243132,3885013,3885497,1000000,0.21145},
-{3243133,3885497,3885811,1000000,0.0823857142857143},
-{3243134,3887261,3887232,0.0464,0.0464},
-{3243136,3889344,3889361,0.0419428571428571,0.0326222222222222},
-{3243137,3900187,3899672,0.318418181818182,0.269430769230769},
-{3243138,3899672,3899241,0.190059574468085,0.194191304347826},
-{3243139,3899672,3899539,0.0658384615384615,1000000},
-{3243140,3899539,3900093,1000000,0.373606451612903},
-{3243141,3899539,3899420,0.0690782608695652,1000000},
-{3243142,3900093,3900293,1000000,0.111363636363636},
-{3243143,3899420,3899345,0.043392,1000000},
-{3243144,3899345,3898876,0.245911111111111,0.245911111111111},
-{3243145,3899420,3900174,1.02636,1000000},
-{3243146,3900174,3900293,0.0786,0.0786},
-{3243147,3899345,3900174,0.630444444444444,1000000},
-{3243148,3911532,3911961,0.147014285714286,1000000},
-{3243149,3911899,3912621,0.123402857142857,1000000},
-{3243150,3911532,3911899,0.109213636363636,1000000},
-{3243151,3900128,3900295,0.231890322580645,1000000},
-{3243152,3900295,3900187,0.0782117647058823,0.0738666666666667},
-{3243153,3900103,3900843,0.222102857142857,1000000},
-{3243154,3900843,3901000,0.0573833333333333,1000000},
-{3243155,3910193,3911899,0.311966197183099,1000000},
-{3243156,3909953,3910320,0.107655,1000000},
-{3243157,3910320,3910848,0.162965853658537,1000000},
-{3243158,3910193,3910320,0.040836,1000000},
-{3243159,3900295,3900654,0.353647058823529,0.353647058823529},
-{3243160,3900452,3900187,0.3380625,0.154542857142857},
-{3243161,3900654,3900452,0.162631578947368,1000000},
-{3243162,3900654,3900735,0.0484888888888889,1000000},
-{3243163,3900735,3900843,0.0413117647058824,1000000},
-{3243164,3900500,3900452,1000000,0.0286604651162791},
-{3243165,3900735,3900500,1000000,0.137822222222222},
-{3243166,3900864,3900896,1000000,0.0107538461538462},
-{3243167,3900896,3901057,1000000,0.0617090909090909},
-{3243168,3896942,3897057,0.1074,0.0835333333333333},
-{3243169,3916895,3916925,0.0139235294117647,0.0182076923076923},
-{3243170,3916896,3916895,0.0170487804878049,1000000},
-{3243171,3898217,3898849,0.296757142857143,0.519325},
-{3243172,3898849,3899241,0.1654,0.158784},
-{3243173,3916895,3916952,0.0137268292682927,1000000},
-{3243174,3897057,3897545,0.199753846153846,0.199753846153846},
-{3243175,3897545,3898849,0.476042857142857,0.434647826086957},
-{3243176,3897395,3897545,0.0910666666666667,0.0910666666666667},
-{3243177,3880834,3880792,0.0197379310344828,1000000},
-{3243178,3880792,3880565,0.0933483870967742,1000000},
-{3243179,3880792,3880912,1000000,0.0728666666666667},
-{3243180,3880834,3880909,1000000,0.0234},
-{3243181,3880912,3880909,1000000,0.0475714285714286},
-{3243182,3894345,3894418,0.137542857142857,1000000},
-{3243225,3891032,3891189,0.213466666666667,0.19212},
-{3243226,3891189,3891630,0.2622,0.251275},
-{3243227,3892335,3892022,0.0947375,1000000},
-{3243228,3889185,3889337,0.0701478260869565,1000000},
-{3243229,3889237,3889249,0.00809230769230769,0.0116888888888889},
-{3243230,3889249,3889337,0.0425560975609756,0.0562838709677419},
-{3243231,3889185,3889249,0.068592,1000000},
-{3243232,3888028,3889059,1000000,0.4731},
-{3243233,3887854,3887660,0.0920526315789474,1000000},
-{3243234,3887660,3887592,0.0291,1000000},
-{3243235,3889059,3887660,1000000,0.442747058823529},
-{3243237,3887232,3887978,1000000,0.160053333333333},
-{3243238,3887978,3888091,1000000,0.02896},
-{3243239,3888036,3887978,0.0951157894736842,1000000},
-{3243240,3893557,3894694,0.399814925373134,0.4252},
-{3243241,3895900,3896440,0.611066666666667,0.611066666666667},
-{3243242,3880912,3881114,0.0679764705882353,1000000},
-{3243243,3883321,3883384,0.037695652173913,0.0456315789473684},
-{3243244,3883384,3883419,0.0157111111111111,0.0192818181818182},
-{3243245,3883067,3883178,1000000,0.0378},
-{3243246,3883178,3883321,1000000,0.0642954545454545},
-{3243247,3883384,3883178,0.09896,1000000},
-{3243248,3883000,3883113,0.0508536585365854,1000000},
-{3243249,3883113,3883280,0.0763166666666667,1000000},
-{3243250,3887854,3887933,1000000,0.0278590909090909},
-{3243251,3887933,3887957,1000000,0.00827727272727273},
-{3243252,3887261,3887993,0.211288235294118,1000000},
-{3243253,3887993,3888120,0.0407225806451613,1000000},
-{3243254,3911025,3911705,1000000,0.133411267605634},
-{3243255,3911705,3912518,1000000,0.149434782608696},
-{3243256,3908543,3910257,1000000,0.3258},
-{3243257,3910257,3911025,1000000,0.134117142857143},
-{3243258,3894332,3894345,0.0365672727272727,0.0365672727272727},
-{3243259,3894345,3894349,0.00417966101694915,0.00474230769230769},
-{3243261,3887326,3887580,0.098835,1000000},
-{3243262,3887580,3887667,0.0358883720930233,1000000},
-{3243263,3888061,3889075,0.27624,1000000},
-{3243264,3889075,3889185,0.0499241379310345,1000000},
-{3243310,3856054,3855397,0.271555555555556,0.271555555555556},
-{3243311,3855397,3855414,0.0410666666666667,0.0410666666666667},
-{3243312,3858469,3858129,0.442690909090909,1000000},
-{3243313,3858129,3858259,0.429342857142857,0.429342857142857},
-{3243314,3858129,3858253,0.179866666666667,0.179866666666667},
-{3243315,3858253,3858465,0.227218181818182,0.227218181818182},
-{3243316,3868242,3868270,0.0248727272727273,0.02736},
-{3243317,3868270,3868287,0.0209454545454545,0.02304},
-{3243318,3867959,3867935,0.0358,0.03759},
-{3243319,3867935,3867362,0.4486875,0.4486875},
-{3243320,3867962,3867935,1000000,1000000},
-{3243321,3868270,3868226,1000000,1000000},
-{3243322,3869325,3869302,0.0167571428571429,0.0138},
-{3243323,3869302,3869012,0.130714285714286,0.111585365853659},
-{3243324,3869302,3869340,1000000,1000000},
-{3243325,3869827,3869882,1000000,1000000},
-{3243326,3870038,3870057,0.03306,0.03306},
-{3243327,3870922,3870936,0.0307304347826087,0.044175},
-{3243328,3871814,3871762,0.0222,0.0191166666666667},
-{3243329,3871762,3871704,0.0827333333333333,0.07446},
-{3243330,3871488,3871757,0.120445161290323,0.128751724137931},
-{3243331,3871757,3871814,0.0410275862068965,0.0626210526315789},
-{3243332,3871762,3871757,1000000,0.050775},
-{3243333,3871898,3871814,0.0272896551724138,0.0208263157894737},
-{3243334,3871757,3871898,1000000,0.0340923076923077},
-{3243335,3860366,3860075,0.170933333333333,0.170933333333333},
-{3243336,3860075,3859877,1000000,1000000},
-{3243337,3870936,3871462,1000000,0.143223529411765},
-{3243338,3871462,3871787,1000000,0.122184},
-{3243339,3875475,3875365,1000000,0.163529032258065},
-{3243340,3875365,3875321,1000000,0.0819483870967742},
-{3243341,3875365,3875567,0.334355555555556,0.334355555555556},
-{3243342,3875200,3875541,1000000,0.0955733333333333},
-{3243343,3875541,3875936,1000000,0.0916933333333333},
-{3243344,3875541,3875793,1000000,1000000},
-{3243345,3875793,3875826,1000000,1000000},
-{3243346,3875500,3875793,1000000,1000000},
-{3243347,3875793,3876019,1000000,1000000},
-{3243348,3876102,3876019,0.0772222222222222,0.0772222222222222},
-{3243349,3876252,3876159,0.195088888888889,0.195088888888889},
-{3243350,3876019,3876159,0.170155555555556,0.170155555555556},
-{3243351,3876159,3876124,0.0815777777777778,0.0786642857142857},
-{3243352,3876124,3875847,0.136466666666667,0.136466666666667},
-{3243353,3876124,3876099,0.0628363636363636,0.0628363636363636},
-{3243354,3876099,3875767,0.146377777777778,0.146377777777778},
-{3243355,3876099,3876068,0.0596322580645161,0.0596322580645161},
-{3243356,3876068,3876023,0.0911307692307692,0.0764322580645161},
-{3243357,3876068,3875695,0.1644,0.1644},
-{3243358,3875185,3875531,0.0922085106382979,1000000},
-{3243359,3875531,3875923,0.0997756097560976,1000000},
-{3243360,3881476,3881709,1000000,0.284707317073171},
-{3243361,3881709,3881723,1000000,0.0105081081081081},
-{3243362,3884472,3884471,0.1247625,1000000},
-{3243363,3884471,3884493,0.3933,1000000},
-{3243364,3884137,3884270,1000000,0.111557142857143},
-{3243365,3884270,3884472,1000000,0.168461538461538},
-{3243366,3884471,3884270,1000000,1000000},
-{3243367,3889686,3889986,1000000,0.1074375},
-{3243368,3889986,3890050,1000000,0.0234363636363636},
-{3243369,3891295,3891321,0.0649166666666667,0.07303125},
-{3243370,3891321,3891332,0.0238181818181818,0.0271034482758621},
-{3243371,3877690,3877375,0.138225,0.135404081632653},
-{3243372,3877375,3876915,0.295133333333333,0.22135},
-{3243373,3900046,3900045,0.013752,1000000},
-{3243374,3900045,3900049,0.0685038461538462,1000000},
-{3243375,3892875,3892804,0.0540545454545455,0.0349764705882353},
-{3243376,3880146,3880333,1000000,0.0973},
-{3243377,3866270,3867044,0.327558620689655,1000000},
-{3243378,3867044,3867995,0.456163636363636,0.456163636363636},
-{3243379,3890547,3890617,0.0182780487804878,1000000},
-{3243380,3890617,3891275,0.187342857142857,1000000},
-{3243381,3890562,3890621,1000000,0.01716},
-{3243382,3890621,3891287,1000000,0.212108108108108},
-{3243383,3890617,3890621,0.029648275862069,0.0505764705882353},
-{3243384,3891285,3890635,0.77088,1000000},
-{3243385,3890635,3890457,0.23388,1000000},
-{3243386,3870733,3870577,0.4964,1000000},
-{3243387,3897246,3897334,1000000,0.0197142857142857},
-{3243388,3897242,3897246,1000000,0.07866},
-{3243389,3897242,3897394,0.40692,0.40692},
-{3243390,3869426,3869511,1000000,1000000},
-{3243391,3897394,3897231,0.18474,0.18474},
-{3243392,3897231,3897242,0.33234,0.33234},
-{3243393,3869938,3869652,1000000,1000000},
-{3243394,3869652,3869858,1000000,1000000},
-{3243395,3869652,3869705,1000000,1000000},
-{3243396,3869705,3869511,1000000,1000000},
-{3243397,3897150,3897298,0.0388304347826087,1000000},
-{3243398,3881412,3881584,0.275072727272727,1000000},
-{3243399,3900232,3900227,1000000,0.0232173913043478},
-{3243400,3900227,3900220,1000000,0.0403333333333333},
-{3243401,3900258,3900278,0.164488888888889,1000000},
-{3243402,3900278,3900296,0.212105882352941,1000000},
-{3243403,3870721,3870403,1000000,1000000},
-{3243404,3870403,3870141,1000000,1000000},
-{3243405,3870205,3870241,1000000,1000000},
-{3243406,3870241,3870673,1000000,1000000},
-{3243407,3870403,3870241,1000000,1000000},
-{3243408,3890621,3890635,1000000,0.12966},
-{3243409,3891287,3891285,0.13746,1000000},
-{3243410,3890635,3891285,1000000,0.94722},
-{3243411,3868689,3868536,1000000,1000000},
-{3243412,3868536,3868248,1000000,1000000},
-{3243416,3869109,3869300,1000000,1000000},
-{3243417,3869300,3869543,1000000,1000000},
-{3243418,3869543,3869384,1000000,1000000},
-{3243419,3869384,3869263,1000000,1000000},
-{3243420,3869300,3869384,1000000,1000000},
-{3243421,3872912,3872917,0.0133935483870968,0.0143172413793103},
-{3243422,3872917,3872931,0.0521785714285714,0.0541111111111111},
-{3243423,3872917,3873400,1000000,1000000},
-{3243424,3871234,3871249,1000000,1000000},
-{3243425,3871249,3871701,1000000,1000000},
-{3243444,3919797,3919836,1000000,0.0415028571428571},
-{3243445,3919930,3919960,1000000,0.0550888888888889},
-{3243446,3920135,3919930,0.201,0.201},
-{3243447,3920135,3920177,1000000,0.0344545454545454},
-{3243448,3920177,3919960,0.119981818181818,1000000},
-{3243449,3919960,3920012,1000000,0.09361875},
-{3243450,3920177,3920012,1000000,0.426018181818182},
-{3243451,3920012,3920031,1000000,0.034741935483871},
-{3243452,3920031,3920773,1000000,0.556125},
-{3243454,3920031,3921008,0.621835714285714,1000000},
-{3243555,3919797,3919614,0.118436363636364,1000000},
-{3243556,3919614,3920552,0.625291304347826,1000000},
-{3243557,3919614,3919624,1000000,0.319782352941176},
-{3243558,3919624,3919674,0.03438,0.03438},
-{3243559,3919674,3919797,1000000,0.197125714285714},
-{3243560,3919624,3919675,0.0299823529411765,0.0299823529411765},
-{3243561,3919675,3919763,0.145728,0.107152941176471},
-{3243562,3919674,3919675,0.0407785714285714,0.0407785714285714},
-{3243563,3919887,3919860,1000000,0.0400928571428571},
-{3243564,3919686,3919667,1000000,0.02461875},
-{3243565,3919137,3919686,0.37044,1000000},
-{3243566,3919860,3919763,1000000,0.0517777777777778},
-{3243567,3919763,3919686,1000000,0.0434888888888889},
-{3243568,3922335,3920056,1000000,1.30087741935484},
-{3243569,3920056,3919860,1000000,0.14038064516129},
-{3243570,3919887,3920099,1000000,0.183415384615385},
-{3243571,3920099,3922335,1000000,1.06708421052632},
-{3243572,3920056,3920099,0.035184,0.035184},
-{3243573,3919823,3919859,1000000,0.01475},
-{3243574,3919859,3919887,1000000,0.04516},
-{3243575,3919919,3919859,0.0394457142857143,0.0418363636363636},
-{3243576,3919667,3919823,1000000,0.0824571428571429},
-{3243577,3901328,3900756,0.37962,0.37962},
-{3243578,3900756,3900343,0.3357,0.3357},
-{3243579,3900756,3900986,0.37983,0.37983},
-{3243580,3900986,3901094,0.1302,0.1302},
-{3243581,3900986,3900636,0.23787,0.23787},
-{3243582,3900477,3901004,0.209090322580645,0.175183783783784},
-{3243583,3901004,3901081,1000000,1000000},
-{3243584,3901069,3901243,0.443458536585366,0.422832558139535},
-{3243585,3901004,3901069,0.0219081081081081,0.0219081081081081},
-{3243591,3899793,3899174,0.690552,0.784718181818182},
-{3243595,3899174,3899362,0.203142857142857,0.203142857142857},
-{3243596,3899174,3898978,0.24903,0.24903},
-{3243597,3899177,3899362,0.236021052631579,0.236021052631579},
-{3243598,3898978,3899177,0.11787,0.11787},
-{3243599,3898978,3898710,0.40326,0.40326},
-{3243600,3898898,3899177,0.39573,0.39573},
-{3243601,3898710,3898898,0.11475,0.11475},
-{3243602,3898710,3898515,0.35307,0.35307},
-{3243603,3898690,3898898,0.33807,0.33807},
-{3243604,3898515,3898690,0.10812,0.10812},
-{3243605,3898169,3897994,0.09321,0.09321},
-{3243606,3898034,3897839,0.41574,0.41574},
-{3243607,3898169,3898368,0.40695,0.40695},
-{3243608,3898034,3898368,0.17841,0.17841},
-{3243609,3898515,3898263,0.45699,0.45699},
-{3243610,3898263,3898034,0.38073,0.38073},
-{3243611,3898368,3898555,0.38358,0.38358},
-{3243612,3898555,3898690,0.46632,0.46632},
-{3243613,3898263,3898555,0.16665,0.16665},
-{3243614,3897839,3897585,0.47574,0.47574},
-{3243615,3897994,3897750,0.47298,0.47298},
-{3243616,3897750,3897625,0.28086,0.28086},
-{3243617,3897585,3897750,0.10209,0.10209},
-{3243618,3897750,3898106,0.19269,0.19269},
-{3243619,3898106,3898005,0.108133333333333,0.108133333333333},
-{3243620,3898005,3897819,0.20739,0.20739},
-{3243621,3898235,3898322,0.0882,0.0882},
-{3243622,3898005,3898322,0.19089,0.19089},
-{3243623,3898209,3898106,0.087625,0.087625},
-{3243624,3898322,3898533,0.1986,0.1986},
-{3243625,3898209,3898533,0.2097,0.2097},
-{3243626,3898563,3898392,0.09891,0.09891},
-{3243627,3898392,3898169,0.11793,0.11793},
-{3243628,3898533,3898719,0.20244,0.20244},
-{3243629,3898719,3898919,0.24681,0.24681},
-{3243630,3898563,3898387,0.25904,0.19428},
-{3243631,3898387,3898209,0.163675,0.2455125},
-{3243632,3898392,3898387,0.23316,0.23316},
-{3243633,3898387,3898719,0.22119,0.22119},
-{3243634,3897585,3897354,0.49329,0.49329},
-{3243635,3897354,3897108,0.51177,0.51177},
-{3243636,3897354,3897521,0.10308,0.10308},
-{3243637,3897521,3897625,0.20934,0.20934},
-{3243638,3897521,3897445,0.16782,0.16782},
-{3243639,3897445,3897280,0.33894,0.33894},
-{3243640,3897445,3897819,0.43224,0.43224},
-{3243641,3897819,3898134,0.18354,0.18354},
-{3243642,3898134,3898235,0.10341,0.10341},
-{3243643,3898134,3897778,0.33315,0.33315},
-{3243644,3900245,3900477,0.419634782608696,0.438709090909091},
-{3243645,3898977,3899126,0.0577836734693878,0.0555176470588235},
-{3243646,3899126,3899364,0.136908,0.134223529411765},
-{3243647,3919836,3919881,1000000,0.0624545454545455},
-{3243648,3919881,3919930,1000000,0.0993230769230769},
-{3243649,3919836,3920020,1000000,0.296618181818182},
-{3243650,3920020,3920135,1000000,0.0733272727272727},
-{3243651,3919881,3920020,0.0763636363636364,0.0763636363636364},
-{3243658,3910530,3910724,0.0266454545454545,0.0254869565217391},
-{3243659,3906476,3907041,0.486333333333333,0.486333333333333},
-{3244226,3886020,3886301,0.29564,1000000},
-{3244227,3887184,3886301,1000000,0.591845454545454},
-{3244228,3886205,3886085,1000000,0.0921714285714286},
-{3244229,3887089,3886413,0.6874125,1000000},
-{3244272,3909105,3909174,0.037272,0.0358384615384615},
-{3244273,3909174,3909224,0.0235548387096774,0.0317478260869565},
-{3244274,3909669,3909732,0.058275,0.0358615384615385},
-{3244275,3909732,3909791,0.0288782608695652,0.0288782608695652},
-{3244276,3909174,3909732,1000000,0.169261224489796},
-{3244277,3910416,3910503,0.0384260869565217,0.0465157894736842},
-{3244278,3910503,3910563,0.0284608695652174,0.03273},
-{3244279,3909732,3910503,1000000,0.193714285714286},
-{3244280,3910503,3910878,1000000,0.114988235294118},
-{3244338,3895950,3896113,0.0739555555555556,0.0739555555555556},
-{3244516,3905959,3905378,0.2526,1000000},
-{3244517,3905378,3905222,0.0615191489361702,1000000},
-{3244518,3888521,3888689,1000000,0.064646511627907},
-{3244519,3888689,3888972,1000000,0.1114},
-{3244522,3893782,3894372,1000000,0.28116},
-{3244713,3889059,3889169,1000000,0.0407230769230769},
-{3244714,3889169,3889237,1000000,0.02705},
-{3245170,3877342,3877890,0.315320689655172,0.30481},
-{3245344,3884909,3885968,0.65979,0.65979},
-{3245345,3885753,3884696,0.66348,0.66348},
-{3245346,3885753,3885968,0.16716,0.16716},
-{3245347,3884909,3884696,0.18498,0.18498},
-{3245350,3884696,3883258,1.43691,1.43691},
-{3245351,3884250,3885753,1.26513913043478,1.26513913043478},
-{3245352,3884250,3883258,0.65262,0.65262},
-{3245353,3884250,3883777,0.370392,0.370392},
-{3245354,3882743,3883258,0.48903,0.48903},
-{3245355,3882743,3883777,0.65802,0.65802},
-{3245356,3886537,3883777,1.82445,1.82445},
-{3245358,3892238,3893424,0.847945454545455,0.847945454545455},
-{3245359,3894321,3894181,0.138511111111111,0.138511111111111},
-{3245360,3892443,3893681,0.97371,0.97371},
-{3245361,3892443,3892066,0.41022,0.41022},
-{3245362,3892066,3893452,1.01826,1.01826},
-{3245363,3892066,3891806,0.25065,0.25065},
-{3245364,3886537,3888287,1.64799,1.64799},
-{3245365,3886537,3888083,0.96726,0.96726},
-{3245366,3888021,3888476,0.26889,0.26889},
-{3245367,3888476,3888953,0.27147,0.27147},
-{3245368,3888561,3889129,0.32964,0.32964},
-{3245369,3889973,3888083,1.16898,1.16898},
-{3245437,3882516,3883777,0.826510344827586,0.826510344827586},
-{3245438,3889129,3888659,0.370772727272727,0.313730769230769},
-{3245439,3893452,3893984,0.43698,0.43698},
-{3245440,3893681,3894201,0.44196,0.44196},
-{3245601,3893681,3893452,0.3642,0.3642},
-{3245602,3893681,3893958,0.26205,0.26205},
-{3245603,3888083,3888021,0.43533,0.43533},
-{3245706,3898189,3897864,0.18963,0.18963},
-{3245707,3897990,3898189,0.18402,0.18402},
-{3245708,3897990,3897648,0.2202,0.2202},
-{3245709,3897801,3897990,0.18465,0.18465},
-{3245710,3897801,3897501,0.21228,0.21228},
-{3245711,3897638,3897801,0.18285,0.18285},
-{3245712,3897638,3897347,0.20865,0.20865},
-{3245713,3897456,3897638,0.18198,0.18198},
-{3246979,3896593,3897623,0.637702702702703,0.637702702702703},
-{3247238,3889174,3888627,0.130242857142857,0.118917391304348},
-{3247240,3888627,3888659,0.02247,0.0204272727272727},
-{3247243,3888627,3887587,0.233481818181818,0.228293333333333},
-{3247244,3887587,3887605,0.0259384615384615,0.0240857142857143},
-{3247245,3887587,3887048,0.146292307692308,0.158483333333333},
-{3247246,3887048,3886872,0.0709,0.0750705882352941},
-{3247247,3887048,3887057,0.01305,0.01305},
-{3247248,3886872,3886695,0.0652578947368421,0.07749375},
-{3247249,3886695,3886465,0.0889833333333333,0.103335483870968},
-{3247250,3886732,3886695,0.0297652173913044,0.0297652173913044},
-{3251885,3876852,3876847,0.0258428571428571,0.0258428571428571},
-{3251886,3876847,3876743,0.620357142857143,0.620357142857143},
-{3251887,3876743,3876734,0.0559714285714286,0.0559714285714286},
-{3251931,3892623,3891210,1000000,1000000},
-{3251972,3891925,3892510,1000000,1000000},
-{3251975,3891454,3891457,1000000,1000000},
-{3251976,3892592,3891991,1000000,1000000},
-{3252061,3873130,3873387,1000000,1000000},
-{3252085,3871102,3871369,1000000,1000000},
-{3252087,3871102,3871277,1000000,1000000},
-{3252111,3870896,3871063,1000000,1000000},
-{3252165,3852381,3853238,0.351355555555556,0.351355555555556},
-{3252166,3854496,3854194,0.668976923076923,0.668976923076923},
-{3252167,3854518,3854496,0.355007142857143,0.355007142857143},
-{3252168,3854543,3854518,0.209647058823529,0.209647058823529},
-{3252169,3862025,3862741,1000000,1000000},
-{3252170,3861756,3861548,1000000,1000000},
-{3252172,3861083,3861597,0.54261,0.54261},
-{3252173,3847896,3847766,0.0788,0.0788},
-{3252180,3850314,3852072,1.0116,1.0116},
-{3252186,3847766,3847689,0.0987555555555556,0.0987555555555556},
-{3252191,3879982,3880012,1000000,1000000},
-{3252192,3880012,3880077,1000000,1000000},
-{3252377,3865259,3865983,1000000,1000000},
-{3252379,3865259,3865725,1000000,1000000},
-{3252380,3865259,3864549,1000000,1000000},
-{3252381,3865259,3864943,1000000,1000000},
-{3252616,3904048,3905300,1.26813,1.26813},
-{3252617,3905300,3905325,0.0194,0.0194},
-{3252618,3885965,3885961,1000000,1000000},
-{3252619,3885961,3885957,1000000,1000000},
-{3252620,3885478,3885773,0.26559,1000000},
-{3252621,3885938,3885922,0.050295652173913,1000000},
-{3252622,3882570,3882754,1000000,0.119557894736842},
-{3252623,3882754,3882819,1000000,0.0402947368421053},
-{3252624,3882570,3882383,0.148575,1000000},
-{3252625,3882383,3882349,0.0333333333333333,1000000},
-{3252696,3870350,3870352,0.00926666666666667,1000000},
-{3252697,3870352,3870353,0.147222222222222,1000000},
-{3252725,3873845,3874561,0.352177777777778,0.352177777777778},
-{3252726,3874338,3874311,0.147218181818182,0.0899666666666667},
-{3252741,3874980,3874751,0.0969310344827586,0.23425},
-{3252742,3874751,3874265,0.122946666666667,0.14952972972973},
-{3252743,3874980,3874922,0.1032,1000000},
-{3252744,3874922,3874734,0.2352,1000000},
-{3252745,3874751,3874922,0.168155555555556,0.168155555555556},
-{3252754,3918883,3918622,0.136944,1000000},
-{3252755,3862105,3862788,0.351730434782609,0.351730434782609},
-{3252756,3862788,3863025,0.12292,0.167618181818182},
-{3252757,3862788,3862305,0.229822222222222,0.229822222222222},
-{3252760,3918622,3918269,0.189189795918367,1000000},
-{3252761,3918269,3917929,0.164212903225806,1000000},
-{3252762,3862324,3862137,0.102565714285714,0.1158},
-{3252763,3862137,3862055,0.0656294117647059,0.06973125},
-{3252766,3862055,3861888,0.125422222222222,0.125422222222222},
-{3252767,3861888,3861831,0.0386888888888889,0.0386888888888889},
-{3252768,3862137,3861888,0.188311111111111,0.188311111111111},
-{3252769,3862946,3862620,0.215791304347826,0.198528},
-{3252770,3862620,3862568,0.0211071428571429,0.01846875},
-{3252771,3862540,3862620,0.066,0.066},
-{3252776,3849790,3849521,0.0680423076923077,0.0667584905660377},
-{3252777,3849521,3849313,0.0549529411764706,0.0549529411764706},
-{3252784,3854655,3854371,0.134444444444444,0.134444444444444},
-{3252785,3917773,3917929,1000000,0.0715011235955056},
-{3252786,3917704,3917831,0.0561133333333333,1000000},
-{3252787,3917831,3918160,0.165032258064516,1000000},
-{3252794,3858043,3857904,1000000,1000000},
-{3252807,3854551,3854298,0.20361,0.193914285714286},
-{3252808,3854298,3854903,0.90531,0.90531},
-{3252828,3917151,3917773,1000000,0.221944186046512},
-{3252860,3916187,3916254,1000000,0.0180311688311688},
-{3252861,3866237,3866233,0.0365647058823529,0.0296},
-{3252862,3866233,3866234,0.0326666666666667,0.0267272727272727},
-{3252863,3864128,3864183,0.146123076923077,0.0904571428571428},
-{3252866,3871913,3871747,0.261307692307692,0.248560975609756},
-{3252870,3871747,3871740,0.0205066666666667,0.0205066666666667},
-{3252875,3852800,3851509,2.01785454545455,2.01785454545455},
-{3252876,3851509,3851640,0.0543473684210526,0.0480279069767442},
-{3252877,3851509,3850248,0.576654545454545,0.576654545454545},
-{3252901,3875808,3874680,1.33146666666667,1.33146666666667},
-{3252902,3874680,3873874,0.349355555555556,0.349355555555556},
-{3252903,3873874,3873970,0.398292307692308,0.388335},
-{3252904,3873970,3873790,0.12267,0.106669565217391},
-{3252905,3873970,3874880,0.753066666666667,0.753066666666667},
-{3252913,3915369,3913887,1000000,0.289548648648649},
-{3252915,3915500,3915521,1000000,0.00663243243243243},
-{3252916,3915521,3915727,1000000,0.0426081081081081},
-{3252917,3915696,3915797,0.024152,1000000},
-{3252918,3913638,3914399,1000000,0.1272},
-{3252921,3901839,3901249,0.492761538461538,0.492761538461538},
-{3252922,3901412,3901687,1000000,0.0628775510204082},
-{3252933,3907573,3907865,1000000,0.058959375},
-{3252934,3907865,3908287,1000000,0.0840272727272727},
-{3252971,3875035,3874973,1000000,0.08628},
-{3252972,3874973,3874807,1000000,0.2751},
-{3253009,3898631,3898825,1000000,0.0816625},
-{3253010,3898825,3899545,1000000,0.2401},
-{3253027,3897857,3898095,1000000,0.0960738461538461},
-{3253028,3898095,3898149,1000000,0.0451741935483871},
-{3253031,3895450,3895915,1000000,0.213372972972973},
-{3253066,3898557,3898624,0.022,1000000},
-{3253206,3866488,3866510,0.0191368421052632,1000000},
-{3253207,3865983,3866203,0.136107692307692,1000000},
-{3253208,3866203,3866488,0.179825,1000000},
-{3253274,3901421,3901975,0.162552631578947,1000000},
-{3253365,3871888,3872292,1000000,0.16449375},
-{3254727,3881657,3882743,0.89718,0.89718},
-{3254729,3881841,3882017,0.68439,0.68439},
-{3254730,3881841,3882017,1.12674,1.12674},
-{3254820,3877890,3878216,0.201355555555556,0.201355555555556},
-{3255181,3865305,3865312,1000000,0.0264566037735849},
-{3255182,3874771,3874744,0.0068,1000000},
-{3255183,3873710,3873991,1000000,0.235885714285714},
-{3255184,3873991,3874044,1000000,0.0887076923076923},
-{3255282,3886977,3887691,1000000,0.386007692307692},
-{3255283,3887691,3888381,1000000,0.372675},
-{3255333,3889246,3889237,0.0189833333333333,0.0253111111111111},
-{3255528,3881657,3881841,0.19584,0.19584},
-{3255583,3894228,3894549,0.475125,0.584769230769231},
-{3255584,3894549,3894914,0.397757142857143,0.397757142857143},
-{3255585,3894532,3894549,0.0335538461538462,0.0242333333333333},
-{3255589,3894743,3894825,0.0425345454545455,1000000},
-{3255626,3881767,3882011,1000000,1000000},
-{3255627,3916771,3916791,0.00646153846153846,1000000},
-{3255628,3916801,3916824,1000000,0.0055425},
-{3255629,3916824,3917151,1000000,0.0941341463414634},
-{3255630,3897605,3897842,0.123678260869565,1000000},
-{3255677,3912954,3912886,0.018,1000000},
-{3255678,3912886,3912673,0.0732705882352941,1000000},
-{3255679,3913015,3912957,1000000,0.0183},
-{3255680,3912957,3912749,1000000,0.0861428571428571},
-{3255682,3870108,3870107,0.0391272727272727,0.0416516129032258},
-{3255683,3870107,3870092,0.126716666666667,0.130337142857143},
-{3255684,3869924,3869627,1000000,0.108985714285714},
-{3255685,3869627,3869451,1000000,0.0451666666666667},
-{3255686,3870551,3870814,0.17315,1000000},
-{3255687,3870814,3870832,0.0182,1000000},
-{3255688,3871318,3871246,1000000,0.0142461538461538},
-{3255689,3871246,3870551,1000000,0.161546341463415},
-{3255690,3872078,3872074,0.011895652173913,1000000},
-{3255691,3872074,3872065,0.0431181818181818,1000000},
-{3255713,3875100,3875615,0.199545,1000000},
-{3255742,3895478,3895553,1000000,1000000},
-{3255743,3895553,3895773,1000000,1000000},
-{3256819,3850997,3851116,0.178657894736842,1000000},
-{3256855,3850997,3851006,0.00699642857142857,0.0081625},
-{3256856,3851006,3851012,0.00555,0.00634285714285714},
-{3256877,3852861,3850696,0.254935483870968,1000000},
-{3256878,3851012,3851040,0.0203571428571429,0.023265306122449},
-{3258289,3906450,3906554,0.0344735294117647,0.036628125},
-{3258320,3893726,3893718,0.0158076923076923,0.0178695652173913},
-{3258321,3893718,3893721,0.0345555555555556,0.038875},
-{3258322,3892585,3892452,0.348622222222222,0.348622222222222},
-{3258564,3858506,3858376,1000000,0.0770545454545455},
-{3258565,3858376,3858060,1000000,0.100062857142857},
-{3258578,3880826,3880897,0.0723652173913043,0.0616444444444444},
-{3258579,3880897,3880905,0.01779,0.0127071428571429},
-{3258585,3859690,3859670,0.039,0.0455},
-{3258591,3895193,3895223,1000000,0.0221162790697674},
-{3258592,3895223,3895278,1000000,0.0334975609756098},
-{3258599,3862066,3862288,0.09084,1000000},
-{3258600,3862285,3862288,0.0251625,0.0277655172413793},
-{3258603,3897482,3897421,1000000,0.0566666666666667},
-{3258604,3897421,3897316,1000000,0.0722470588235294},
-{3258605,3864376,3864277,0.0428338983050847,1000000},
-{3258608,3897523,3897503,1000000,0.0380869565217391},
-{3258609,3897503,3897482,1000000,0.0255714285714286},
-{3258615,3861084,3860898,0.0636857142857143,1000000},
-{3258616,3860898,3860691,0.166869230769231,1000000},
-{3258635,3858010,3858393,0.0650584615384615,0.0650584615384615},
-{3258638,3855377,3858010,0.38718,0.38172676056338},
-{3258639,3854860,3855377,0.0936090909090909,0.0922119402985075},
-{3258644,3857731,3856967,0.145298360655738,0.145298360655738},
-{3258645,3897968,3898191,0.0369784615384615,1000000},
-{3258647,3858091,3858037,1000000,0.03808},
-{3258812,3863037,3862999,0.0187733333333333,1000000},
-{3258815,3863196,3863078,0.0368634146341463,1000000},
-{3258816,3863078,3863037,0.0155581395348837,1000000},
-{3258821,3863078,3863093,0.0225111111111111,0.04052},
-{3258823,3863093,3863203,0.036645,1000000},
-{3258824,3862999,3863056,0.0209230769230769,1000000},
-{3258825,3863056,3863093,0.0136615384615385,1000000},
-{3258838,3898063,3898083,0.0184029850746269,1000000},
-{3258839,3916791,3917103,0.0877139240506329,1000000},
-{3258840,3917103,3917704,0.233887058823529,1000000},
-{3258885,3865075,3865310,0.041272131147541,0.0375761194029851},
-{3258886,3865310,3865526,0.04674375,0.0427371428571429},
-{3258915,3874612,3874519,1000000,0.0753073170731707},
-{3258950,3858091,3858072,1000000,0.0380842105263158},
-{3258951,3858072,3857983,1000000,0.0793684210526316},
-{3258952,3858011,3858072,0.041,0.025448275862069},
-{3258953,3858621,3858568,1000000,1000000},
-{3258954,3887561,3887939,1000000,0.054534375},
-{3258955,3887939,3888729,1000000,0.130347540983607},
-{3258960,3881829,3882237,1000000,0.0797076923076923},
-{3258961,3882237,3882406,1000000,0.031934328358209},
-{3258962,3881336,3881566,1000000,0.0351666666666667},
-{3258963,3881566,3881829,1000000,0.0381166666666667},
-{3258964,3877642,3878303,1000000,0.122368965517241},
-{3258965,3878303,3878353,1000000,0.008596875},
-{3258988,3865174,3865024,0.03129,1000000},
-{3258989,3864277,3863812,0.195764516129032,1000000},
-{3258990,3863812,3863783,0.00650476190476191,1000000},
-{3259153,3865816,3866117,0.172660465116279,0.148488},
-{3259154,3865659,3865750,0.110902702702703,0.082068},
-{3259155,3869221,3869443,1000000,1000000},
-{3259156,3870427,3870147,0.4112,0.4112},
-{3259157,3870147,3870057,0.16844347826087,0.16844347826087},
-{3259158,3863097,3863143,0.179111111111111,0.179111111111111},
-{3259159,3863221,3863239,0.0357111111111111,0.0357111111111111},
-{3259163,3866134,3866319,1000000,0.268121739130435},
-{3259168,3860070,3859873,0.122589473684211,0.110914285714286},
-{3259169,3859873,3859120,1000000,1000000},
-{3259170,3859262,3859120,0.073,0.073},
-{3259171,3859793,3859365,0.249066666666667,0.249066666666667},
-{3259172,3859262,3859365,0.105622222222222,1000000},
-{3259173,3859365,3859262,0.114355555555556,1000000},
-{3259178,3866886,3865807,0.517875,1000000},
-{3259179,3865890,3865869,1000000,0.013025},
-{3259180,3865869,3865684,1000000,0.0996387096774193},
-{3259181,3865807,3865869,0.11535,1000000},
-{3259182,3871312,3871175,0.0370645161290323,0.0396206896551724},
-{3259183,3871175,3871140,0.00978181818181818,0.0104129032258065},
-{3259184,3871175,3871170,0.0491454545454545,0.03604},
-{3259185,3871170,3870966,1000000,0.322133333333333},
-{3259186,3870966,3871170,1000000,0.8664},
-{3259193,3921504,3921522,0.237771428571429,0.2628},
-{3259194,3921522,3921414,0.0688222222222222,0.0688222222222222},
-{3259195,3921522,3921643,0.0926,0.0926},
-{3259196,3921643,3921771,0.134652631578947,0.12792},
-{3259202,3918582,3919049,0.209722222222222,0.202232142857143},
-{3259203,3919049,3919171,0.0934166666666667,0.0715531914893617},
-{3259204,3918647,3919049,0.433478571428571,1000000},
-{3259205,3918497,3918647,1000000,0.14816},
-{3259206,3919049,3918497,0.40818,1000000},
-{3259211,3874239,3874259,1000000,0.0695785714285714},
-{3259212,3874744,3874368,0.132382978723404,1000000},
-{3259213,3874368,3874300,0.0231714285714286,1000000},
-{3259232,3889996,3890180,0.089955,0.0705529411764706},
-{3259233,3890180,3890299,0.0764709677419355,0.0483795918367347},
-{3259234,3893901,3893981,0.063552,1000000},
-{3259235,3893981,3893961,0.137052631578947,0.1085},
-{3259236,3893901,3894031,0.034608,0.0455368421052632},
-{3259237,3894031,3898728,1.22264081632653,1.27466808510638},
-{3259238,3893981,3894031,0.0425727272727273,0.04683},
-{3259253,3890676,3890905,0.0882489795918367,0.0920042553191489},
-{3259254,3890557,3890676,1000000,1000000},
-{3259260,3888066,3888724,0.3226,1000000},
-{3259263,3894125,3894204,0.0406,0.0553636363636364},
-{3259265,3895279,3895391,0.42759,1000000},
-{3259266,3895391,3895393,0.0363142857142857,1000000},
-{3259267,3897851,3897929,1000000,0.0355333333333333},
-{3259268,3897929,3897969,1000000,0.0130730769230769},
-{3259269,3897039,3897391,0.419285714285714,0.419285714285714},
-{3259270,3897391,3897419,0.0408352941176471,0.0330571428571429},
-{3259271,3895393,3895614,1000000,0.0822382978723404},
-{3259283,3920047,3920613,0.127483636363636,0.129844444444444},
-{3259294,3882245,3882686,1000000,1000000},
-{3259299,3919649,3919485,0.30696,1000000},
-{3259300,3919485,3919808,0.112579591836735,1000000},
-{3259314,3894820,3894890,1000000,0.0461333333333333},
-{3259317,3895484,3895345,0.105915789473684,0.105915789473684},
-{3259318,3895345,3895135,0.115733333333333,0.115733333333333},
-{3259319,3895135,3895115,0.0945789473684211,0.105705882352941},
-{3259320,3909800,3910479,0.300911111111111,0.300911111111111},
-{3259321,3910572,3910581,0.0135157894736842,0.0135157894736842},
-{3259322,3910581,3910671,0.171144,0.171144},
-{3259323,3910479,3910581,0.0356222222222222,0.0356222222222222},
-{3259324,3910450,3910557,0.14245,0.14245},
-{3259325,3910557,3910572,0.0133105263157895,0.0133105263157895},
-{3259326,3910479,3910557,0.0404222222222222,0.0404222222222222},
-{3259381,3883606,3884321,0.214413333333333,0.224386046511628},
-{3259382,3884321,3884726,0.128328571428571,0.128328571428571},
-{3259473,3897216,3896483,0.263036842105263,1000000},
-{3259484,3892152,3892370,1000000,0.0505698113207547},
-{3259485,3892370,3892482,1000000,0.0306875},
-{3259554,3877153,3877170,0.0292754716981132,1000000},
-{3259555,3877170,3877322,0.09445,1000000},
-{3259561,3898630,3899176,0.208450909090909,1000000},
-{3259562,3899176,3899403,0.125595,1000000},
-{3259587,3899859,3900092,1000000,0.0550730769230769},
-{3259588,3900092,3900382,1000000,0.0712040816326531},
-{3259593,3900041,3900375,0.12932,1000000},
-{3259595,3900375,3900413,0.0187945945945946,1000000},
-{3259596,3865000,3865208,0.105952941176471,1000000},
-{3259597,3865208,3865251,0.0186,1000000},
-{3259603,3858835,3858246,0.0826235294117647,1000000},
-{3259620,3854609,3854154,0.05735,1000000},
-{3259621,3854154,3852861,0.166818947368421,1000000},
-{3259625,3851082,3851520,1000000,0.1131625},
-{3259628,3851076,3851089,0.0693066666666667,1000000},
-{3259629,3852663,3852148,1000000,0.0531489795918367},
-{3259630,3852148,3850854,1000000,0.149248484848485},
-{3259631,3853169,3852663,1000000,0.0565469387755102},
-{3259633,3854600,3854471,1000000,0.0169175257731959},
-{3259634,3854471,3853169,1000000,0.163620618556701},
-{3259659,3870386,3870436,0.20679,0.20679},
-{3259660,3870386,3870556,0.11262,0.11262},
-{3259670,3897931,3898090,0.0591882352941177,1000000},
-{3259678,3900726,3900691,0.0121411764705882,0.02064},
-{3259679,3900657,3900691,0.0276905660377359,0.0312255319148936},
-{3259680,3900726,3900657,0.0446571428571429,1000000},
-{3259681,3898566,3898590,0.0130838709677419,0.00965714285714286},
-{3259682,3898590,3898645,0.0214645161290323,0.02218},
-{3259683,3898590,3898554,0.01495,1000000},
-{3259684,3898590,3898575,1000000,0.0187818181818182},
-{3259685,3921643,3921771,0.180911111111111,0.180911111111111},
-{3259686,3892022,3891756,0.080064,1000000},
-{3259687,3891756,3891146,0.212815384615385,1000000},
-{3259688,3891160,3891788,0.185647826086957,1000000},
-{3259689,3891788,3892358,0.178251063829787,1000000},
-{3259690,3891756,3891788,0.0279777777777778,0.0279777777777778},
-{3259691,3889266,3889361,0.0246558139534884,1000000},
-{3259692,3889361,3889620,0.0727857142857143,1000000},
-{3259693,3888715,3889414,1000000,1000000},
-{3259694,3889414,3890443,1000000,1000000},
-{3259695,3889361,3889380,0.128485714285714,0.13491},
-{3259696,3889380,3889414,0.0861555555555556,0.0861555555555556},
-{3259697,3890152,3890242,0.044375,1000000},
-{3259698,3890242,3890287,0.0196344827586207,1000000},
-{3259699,3883658,3883850,1000000,0.092775},
-{3259700,3883850,3883966,1000000,0.122664},
-{3259702,3912951,3921618,1.74692658227848,1000000},
-{3259705,3880909,3880950,1000000,0.01534},
-{3259706,3880950,3881114,1000000,0.0654967741935484},
-{3259717,3851520,3851718,1000000,0.0405684210526316},
-{3259718,3851718,3852861,1000000,0.19507},
-{3259727,3871436,3871416,0.04428,0.04428},
-{3259728,3871416,3871214,0.355133333333333,1000000},
-{3259729,3871416,3871214,1000000,0.341644444444444},
-{3259767,3865687,3865292,1000000,0.187690909090909},
-{3259768,3865292,3864724,1000000,0.215990322580645},
-{3259769,3864514,3863983,1000000,0.215154098360656},
-{3259770,3892497,3892675,0.0443411764705882,1000000},
-{3259771,3892675,3893565,0.213,1000000},
-{3259792,3866780,3866422,1000000,0.180644444444444},
-{3259796,3872888,3869246,0.530336842105263,0.537408},
-{3259805,3906554,3906734,0.0520208955223881,0.0562161290322581},
-{3259806,3906734,3906789,0.0108636363636364,0.0117540983606557},
-{3259871,3862127,3862737,0.2988,0.2988},
-{3259876,3892875,3892938,0.0247272727272727,0.0354782608695652},
-{3259877,3892938,3893379,0.367311111111111,0.33058},
-{3259878,3894694,3895900,0.614717647058824,0.614717647058824},
-{3259988,3886274,3886148,1000000,0.13554375},
-{3259989,3886274,3886060,0.132313846153846,1000000},
-{3259992,3890114,3890226,1000000,0.0327857142857143},
-{3259994,3880905,3881114,0.283071428571429,1000000},
-{3259995,3880905,3880834,0.15688,1000000},
-{3259996,3880905,3881183,1000000,0.162331034482759},
-{3260035,3881584,3881592,0.0320869565217391,1000000},
-{3260302,3895139,3895135,0.110466666666667,0.110466666666667},
-{3260303,3895345,3895139,0.215844444444444,0.215844444444444},
-{3260329,3849512,3848589,1000000,0.147658064516129},
-{3260330,3848589,3848476,1000000,0.0246574468085106},
-{3260331,3848476,3848248,1000000,0.0344273684210526},
-{3260332,3848248,3847374,1000000,0.136124210526316},
-{3260433,3896707,3896550,0.17724,0.17724},
-{3260434,3896550,3896545,0.325311111111111,0.325311111111111},
-{3260435,3896550,3896183,0.247,0.247},
-{3260458,3873358,3873485,1000000,0.0362372093023256},
-{3260666,3881536,3881496,0.0283941176470588,1000000},
-{3260667,3881563,3881543,0.0152903225806452,1000000},
-{3260781,3901283,3901309,0.0266033898305085,0.0327},
-{3260782,3901309,3901516,0.264440625,0.272970967741935},
-{3260935,3894056,3894167,0.0851803278688524,0.0851803278688524},
-{3260947,3891812,3891926,1000000,0.0674836363636364},
-{3260948,3891926,3892016,0.0632,0.0741913043478261},
-{3260953,3891926,3891745,1000000,0.0778375},
-{3260954,3891745,3891406,1000000,0.208214285714286},
-{3260955,3891812,3891745,0.0423692307692308,0.06885},
-{3260960,3891406,3891704,1000000,0.0946761904761905},
-{3260961,3891704,3891812,1000000,0.0493448275862069},
-{3260995,3888710,3888964,0.0919888888888889,0.105689361702128},
-{3260996,3888964,3889406,0.15714,0.171425454545455},
-{3260997,3888450,3888675,0.091476,0.0933428571428572},
-{3260998,3888675,3888710,0.01962,0.0204375},
-{3261046,3889406,3889551,0.0568451612903226,0.0629357142857143},
-{3261047,3889551,3890061,0.185070967741935,0.194481355932203},
-{3261059,3890221,3890341,0.0488861538461539,0.0676085106382979},
-{3261060,3890341,3891406,0.383,0.414393442622951},
-{3261067,3892740,3892891,0.0647311475409836,0.0598272727272727},
-{3261068,3892891,3894056,0.680281818181818,0.650704347826087},
-{3261072,3894618,3894508,1000000,0.131421052631579},
-{3261076,3894956,3895101,0.0566142857142857,1000000},
-{3261151,3895822,3896024,1000000,0.0490408163265306},
-{3261370,3875698,3876057,0.091524,0.0880038461538461},
-{3261371,3876057,3876530,0.10632,0.104421428571429},
-{3261405,3916743,3917078,1000000,1000000},
-{3261406,3915671,3916743,1000000,1000000},
-{3261418,3899187,3899307,1000000,0.0493368421052632},
-{3261429,3850898,3850904,0.0915428571428571,0.0723483870967742},
-{3261430,3860641,3860394,1000000,0.0424},
-{3261454,3864644,3864504,0.038821052631579,0.0514604651162791},
-{3261455,3864504,3864400,0.0200285714285714,0.0257510204081633},
-{3261456,3898510,3898991,1000000,0.12746511627907},
-{3261457,3898991,3899361,1000000,0.103107692307692},
-{3261458,3899361,3899638,1000000,0.0871692307692308},
-{3261459,3897391,3897671,0.127427586206897,1000000},
-{3261460,3897419,3897671,1000000,0.0979230769230769},
-{3261461,3897671,3897727,0.0342,0.0201692307692308},
-{3263519,3876508,3876074,0.146472727272727,0.146472727272727},
-{3263520,3876074,3875930,0.0544909090909091,0.0544909090909091},
-{3264021,3889671,3889734,0.0349,0.0465333333333333},
-{3264056,3889664,3889734,1000000,0.0319317073170732},
-{3264058,3889734,3889849,1000000,0.0563027027027027},
-{3264059,3889849,3890415,1000000,0.253922727272727},
-{3264068,3890351,3890415,0.0366521739130435,0.0526875},
-{3264069,3890415,3890590,0.15864,0.2644},
-{3264077,3891003,3890759,0.113272340425532,1000000},
-{3264078,3890759,3890415,0.156687804878049,1000000},
-{3264088,3894204,3895038,0.283758139534884,1000000},
-{3264089,3895038,3895391,0.118408695652174,1000000},
-{3264090,3895038,3895047,0.02388,0.02388},
-{3264093,3894204,3895047,1000000,0.319736842105263},
-{3264094,3895047,3895393,1000000,0.107522448979592},
-{3265429,3865536,3865489,0.0254076923076923,1000000},
-{3265430,3864023,3863237,0.437945454545455,0.535266666666667},
-{3265431,3863636,3864023,0.292428571428571,0.24564},
-{3265432,3864023,3864025,0.0208222222222222,0.0208222222222222},
-{3265433,3864244,3864122,0.08013,0.103393548387097},
-{3265434,3867998,3867421,0.233688,0.216377777777778},
-{3265435,3867421,3867378,0.0180230769230769,0.0203739130434783},
-{3265436,3864913,3864903,0.00584,0.00515294117647059},
-{3265437,3864903,3864284,0.353177777777778,0.340564285714286},
-{3265438,3866809,3864963,0.7234,1000000},
-{3265439,3864963,3864913,0.0201642857142857,0.0171090909090909},
-{3265440,3865892,3866209,0.205341176470588,0.205341176470588},
-{3265441,3866209,3866257,0.0191181818181818,0.0145034482758621},
-{3265442,3871421,3871204,0.429709090909091,0.429709090909091},
-{3265443,3871204,3871141,0.0621777777777778,0.08394},
-{3265444,3869457,3869392,0.035625,0.035625},
-{3265445,3869392,3869308,0.0458,0.0437181818181818},
-{3265446,3869290,3869225,0.035751724137931,0.035751724137931},
-{3265447,3869225,3869139,0.03555,0.0366967741935484},
-{3265448,3867839,3868174,0.251431578947368,1000000},
-{3265449,3868174,3868265,0.0663142857142857,1000000},
-{3265450,3868197,3867916,1000000,0.113530434782609},
-{3265451,3867916,3867846,1000000,0.0378857142857143},
-{3265452,3868053,3868041,0.0124181818181818,0.0124181818181818},
-{3265453,3868041,3867790,0.267771428571429,0.267771428571429},
-{3265454,3871867,3871963,0.3621,1000000},
-{3265455,3871963,3871981,0.0161111111111111,1000000},
-{3265456,3872440,3872466,1000000,0.0199454545454545},
-{3265457,3870691,3870698,1000000,0.04749},
-{3265458,3870698,3870701,1000000,0.275166666666667},
-{3265459,3869625,3869557,1000000,0.0338666666666667},
-{3265460,3869557,3869200,1000000,0.179242105263158},
-{3265461,3868846,3868039,1000000,0.334513043478261},
-{3265462,3868039,3867993,1000000,0.0197714285714286},
-{3265463,3871410,3871199,1000000,0.0592125},
-{3265464,3871199,3871122,1000000,0.0209272727272727},
-{3265465,3871193,3871116,0.0254666666666667,1000000},
-{3265466,3871116,3870812,0.133226086956522,1000000},
-{3265467,3871398,3871287,0.0364344827586207,1000000},
-{3265468,3871287,3871193,0.0274137931034483,1000000},
-{3265469,3868831,3868631,0.0391866666666667,1000000},
-{3265470,3868631,3867784,0.207245454545455,1000000},
-{3265471,3863490,3863474,0.01308,0.0148636363636364},
-{3265472,3863474,3863397,0.07902,0.112885714285714},
-{3265473,3864710,3864662,0.0401833333333333,1000000},
-{3265474,3864662,3864611,0.040845,1000000},
-{3265475,3869405,3869419,0.0104297872340426,1000000},
-{3265476,3869419,3869749,0.493357894736842,1000000},
-{3265477,3867740,3867452,0.365914285714286,1000000},
-{3265478,3867452,3867433,0.0256153846153846,1000000},
-{3265479,3872314,3872230,0.035625,0.0475},
-{3265480,3872230,3871324,0.33425,0.364636363636364},
-{3265481,3874466,3874419,0.0159636363636364,1000000},
-{3265482,3874419,3874386,0.0119314285714286,1000000},
-{3265483,3877615,3877581,0.024432,0.0234923076923077},
-{3265484,3877581,3877218,0.319777777777778,0.297724137931035},
-{3265485,3868210,3868186,1000000,1000000},
-{3265486,3868186,3867917,1000000,1000000},
-{3265487,3893787,3894147,1000000,0.12105306122449},
-{3265488,3894269,3894247,1000000,0.1840125},
-{3265489,3894247,3894238,1000000,0.02444},
-{3265490,3890300,3890587,1000000,0.101381818181818},
-{3265491,3890587,3890609,1000000,0.00728571428571429},
-{3265492,3890609,3890627,1000000,0.006},
-{3265493,3869701,3869586,1000000,1000000},
-{3265494,3869586,3869186,1000000,1000000},
-{3265495,3892241,3892315,0.0175857142857143,0.0180146341463415},
-{3265496,3892315,3892464,0.0440454545454545,0.0472682926829268},
-{3265497,3879974,3879779,0.184539130434783,1000000},
-{3265498,3879779,3879761,0.0145846153846154,1000000},
-{3265499,3878488,3878554,0.0211941176470588,0.0343142857142857},
-{3265500,3878554,3878778,0.0801272727272727,0.120190909090909},
-{3265501,3889101,3889699,0.21656,0.209574193548387},
-{3265502,3889699,3889780,0.0338,0.0480315789473684},
-{3265503,3888849,3888880,0.02445,0.0201352941176471},
-{3265504,3888880,3889101,0.151593103448276,0.13738125},
-{3265505,3878483,3878450,1000000,0.0435882352941176},
-{3265506,3878450,3878438,1000000,0.022944},
-{3265507,3887371,3888040,0.32271,0.2082},
-{3265508,3888040,3888116,0.02786,0.033432},
-{3265509,3887524,3887552,1000000,0.017425},
-{3265510,3887552,3887866,1000000,0.36825},
-{3265511,3880951,3880995,1000000,0.0499666666666667},
-{3265512,3880995,3881028,1000000,0.0368526315789474},
-{3265513,3881127,3881090,1000000,0.0496415094339623},
-{3265514,3881090,3881063,1000000,0.0243882352941176},
-{3265515,3887577,3887545,0.0405333333333333,0.0405333333333333},
-{3265516,3887545,3887107,0.171553846153846,0.22302},
-{3265517,3878714,3878751,0.0281333333333333,0.0266526315789474},
-{3265518,3878751,3879100,0.297092307692308,0.2413875},
-{3265519,3879416,3879506,1000000,1000000},
-{3265520,3879506,3879592,1000000,1000000},
-{3265521,3881904,3882163,1000000,1000000},
-{3265522,3877339,3877573,1000000,1000000},
-{3265523,3877573,3877636,1000000,1000000},
-{3265524,3877636,3877978,1000000,1000000},
-{3265525,3877978,3877995,1000000,1000000},
-{3265526,3872154,3871552,0.1487625,1000000},
-{3265527,3870250,3870291,1000000,0.0188608695652174},
-{3265528,3870291,3871063,1000000,0.297212903225806},
-{3265529,3881182,3881196,1000000,0.0116285714285714},
-{3265530,3881196,3881276,1000000,0.0471272727272727},
-{3265531,3868965,3869360,1000000,0.208539130434783},
-{3265532,3868418,3868965,0.255914285714286,0.282852631578947},
-{3265533,3869376,3869021,1000000,0.147761538461538},
-{3265534,3869021,3868889,0.0843777777777778,0.0843777777777778},
-{3265535,3881599,3881574,0.051025,1000000},
-{3265536,3880104,3880199,0.0525090909090909,1000000},
-{3265537,3882562,3882595,1000000,0.0172},
-{3265538,3882595,3883341,1000000,0.40191},
-{3265539,3879040,3879122,1000000,0.0666545454545455},
-{3265540,3879122,3879171,1000000,0.02556},
-{3265541,3869559,3869160,0.123754838709677,0.123754838709677},
-{3265542,3869160,3869123,0.0230526315789474,0.0365},
-{3265543,3871235,3871210,0.0127125,0.0113},
-{3265544,3861562,3861887,0.1713,0.123716666666667},
-{3265545,3861887,3862018,1000000,0.0565034482758621},
-{3265546,3862967,3862530,0.158271428571429,0.166185},
-{3265547,3862530,3862222,0.125967567567568,1000000},
-{3265548,3862222,3862148,0.0445071428571429,1000000},
-{3265549,3862148,3862018,0.0702,1000000},
-{3265550,3861887,3861997,0.059136,1000000},
-{3265551,3862018,3861997,0.0268,0.0268},
-{3265552,3861997,3862109,0.0546,1000000},
-{3265553,3862205,3862530,0.10280487804878,1000000},
-{3265554,3894372,3894463,1000000,0.0582620689655172},
-{3265555,3894463,3894506,1000000,0.0303692307692308},
-{3265556,3862582,3862659,0.110314285714286,1000000},
-{3265557,3862952,3862750,0.0998785714285714,1000000},
-{3265558,3862750,3862582,0.0546461538461539,1000000},
-{3265559,3862659,3862750,0.0518307692307692,0.053904},
-{3265560,3862659,3862864,0.162218181818182,1000000},
-{3265561,3862864,3863249,0.371541176470588,1000000},
-{3265568,3864013,3864015,0.01665,1000000},
-{3265569,3884258,3884273,0.007,1000000},
-{3265570,3884273,3884348,0.04755,1000000},
-{3265571,3881193,3881680,1000000,0.204144827586207},
-{3265572,3881680,3881716,1000000,0.0118444444444444},
-{3265576,3872529,3872537,0.0170926829268293,1000000},
-{3265577,3869492,3869517,1000000,0.0118857142857143},
-{3265578,3869517,3869839,1000000,0.232756097560976},
-{3265579,3874444,3874402,1000000,0.0225130434782609},
-{3265582,3870673,3871012,0.319671428571429,1000000},
-{3265583,3871012,3871041,0.0181333333333333,1000000},
-{3265584,3871941,3871858,1000000,1000000},
-{3265585,3871858,3871683,1000000,1000000},
-{3265586,3871210,3872199,0.2959875,1000000},
-{3265587,3872199,3872246,0.015375,1000000},
-{3265588,3863525,3862764,0.510844444444445,0.510844444444445},
-{3265589,3862764,3862732,0.0168666666666667,0.0168666666666667},
-{3265590,3870384,3870285,1000000,0.0273473684210526},
-{3265591,3870181,3870082,0.0196723404255319,1000000},
-{3265592,3878429,3878400,0.029075,1000000},
-{3265593,3878400,3878386,0.00817021276595745,1000000},
-{3265817,3865251,3865233,0.07884,1000000},
-{3265818,3880542,3880623,0.0252857142857143,1000000},
-{3265819,3880623,3880713,0.0235333333333333,1000000},
-{3265820,3867052,3866720,0.157658823529412,1000000},
-{3265821,3865872,3865964,0.068375,1000000},
-{3265822,3865964,3865983,0.015792,1000000},
-{3265823,3908130,3907855,1000000,0.13056},
-{3265824,3908999,3909078,0.0142235294117647,0.0154340425531915},
-{3265825,3909078,3909590,0.120408,0.133786666666667},
-{3265826,3875629,3875764,1000000,0.0365513513513513},
-{3265827,3875764,3876030,1000000,0.0856421052631579},
-{3265828,3875668,3875613,1000000,0.09148125},
-{3265829,3875613,3875585,1000000,0.0406071428571428},
-{3265990,3890154,3890185,1000000,1000000},
-{3265991,3890185,3890198,1000000,1000000},
-{3265992,3890198,3890859,1000000,1000000},
-{3265993,3865133,3864978,0.0473142857142857,1000000},
-{3265994,3864978,3864901,0.0290057142857143,1000000},
-{3265995,3879581,3879803,1000000,1.104},
-{3266021,3878288,3878338,0.0558972972972973,1000000},
-{3266022,3878338,3878372,0.0284,1000000},
-{3266023,3878193,3878280,0.127409302325581,0.161135294117647},
-{3266024,3878280,3878288,0.0130390243902439,0.0157235294117647},
-{3266025,3865272,3865178,1000000,0.0442695652173913},
-{3266026,3865178,3865038,1000000,0.07512},
-{3266027,3865355,3865322,0.00619459459459459,1000000},
-{3266028,3865827,3865549,1000000,0.0790186046511628},
-{3266029,3865549,3865500,1000000,0.0183384615384615},
-{3266030,3865322,3865282,0.0119526315789474,1000000},
-{3266112,3899297,3899126,0.0627454545454545,0.0627454545454545},
-{3266113,3885911,3885919,1000000,0.00466764705882353},
-{3266114,3885919,3885972,1000000,0.0315176470588235},
-{3266115,3886060,3886050,0.0125090909090909,1000000},
-{3266116,3886148,3886116,1000000,0.0108276923076923},
-{3266117,3892691,3892958,0.0492692307692308,0.0492692307692308},
-{3266118,3899839,3899914,0.0304909090909091,0.0304909090909091},
-{3266189,3869049,3869120,0.0288,1000000},
-{3266190,3869120,3870513,0.377585714285714,1000000},
-{3266650,3866482,3866524,0.018885,1000000},
-{3266651,3866524,3866619,0.0379,1000000},
-{3266652,3866720,3866521,0.0962689655172414,1000000},
-{3266653,3866521,3866433,0.04325625,1000000},
-{3266667,3894706,3894720,0.010464,1000000},
-{3266668,3894720,3894743,0.011088,1000000},
-{3266669,3894810,3894831,1000000,0.00967826086956522},
-{3266670,3894831,3894878,1000000,0.0343826086956522},
-{3266677,3861176,3861175,0.0259,0.0227414634146341},
-{3266678,3861175,3861011,0.244663636363636,0.250353488372093},
-{3266681,3860500,3860218,0.13746,0.13746},
-{3266682,3860218,3859599,0.3834,1000000},
-{3266714,3881894,3881570,0.1766,0.12788275862069},
-{3266715,3881894,3881970,0.0286909090909091,1000000},
-{3266716,3881970,3882382,0.148994594594595,1000000},
-{3266734,3878031,3878068,0.0197793103448276,0.0197793103448276},
-{3266737,3877316,3877441,0.0671142857142857,0.081704347826087},
-{3266738,3877441,3878031,0.365275,0.337176923076923},
-{3266739,3877316,3877053,0.7934,0.7934},
-{3266740,3877316,3877331,0.132290322580645,0.110837837837838},
-{3266741,3878605,3878269,0.168422222222222,0.168422222222222},
-{3266742,3877869,3877795,0.116621739130435,0.114140425531915},
-{3266744,3877795,3877579,0.143566666666667,0.143566666666667},
-{3266745,3877685,3877315,0.124655172413793,0.150625},
-{3266746,3877579,3877315,0.357804545454545,0.357804545454545},
-{3266747,3878283,3877955,0.1516,0.1516},
-{3266748,3879450,3878435,0.649992857142857,0.649992857142857},
-{3266749,3878435,3877795,0.24052,0.232761290322581},
-{3266750,3878435,3878602,0.0853111111111111,0.0853111111111111},
-{3266752,3880849,3881093,0.27085,0.27085},
-{3266757,3860325,3860273,0.0319894736842105,0.0289428571428571},
-{3266758,3860273,3859969,0.1607,0.12856},
-{3266759,3880993,3881282,0.190307142857143,0.197355555555556},
-{3266760,3881282,3881308,0.0183652173913043,0.0201142857142857},
-{3266764,3870348,3870254,0.0654585365853659,1000000},
-{3266765,3870254,3870126,0.08817,1000000},
-{3266965,3907480,3907456,0.00624489795918367,0.00624489795918367},
-{3266966,3907456,3907118,0.0975061224489796,0.0975061224489796},
-{3267084,3860394,3860195,1000000,0.034605},
-{3267085,3860195,3859890,1000000,0.0519585365853659},
-{3267164,3908476,3910193,0.318912676056338,1000000},
-{3267165,3898624,3899517,0.269236363636364,1000000},
-{3267200,3865283,3865313,0.1002,1000000},
-{3267264,3896211,3896307,1000000,0.027134693877551},
-{3267265,3896146,3896307,1000000,0.177876923076923},
-{3267281,3891411,3891628,0.0531795918367347,1000000},
-{3267282,3891628,3891710,0.0184470588235294,1000000},
-{3267889,3895895,3895691,1000000,0.0875617021276596},
-{3267890,3895691,3895532,1000000,0.0744122448979592},
-{3267948,3865636,3864509,0.46515,1000000},
-{3267997,3899646,3899759,0.0267692307692308,1000000},
-{3267998,3885679,3886173,0.0820677966101695,1000000},
-{3267999,3886173,3886500,0.0708842105263158,1000000},
-{3268000,3886500,3886816,0.0774244897959184,1000000},
-{3268321,3900418,3900261,0.0709111111111111,0.0709111111111111},
-{3268417,3882819,3882448,1000000,0.262344},
-{3268418,3882448,3882394,1000000,0.0492444444444444},
-{3268419,3882394,3882357,1000000,0.0634588235294118},
-{3268420,3882357,3881910,1000000,0.469114285714286},
-{3268421,3885947,3885993,0.0245379310344828,0.02965},
-{3268422,3885993,3886448,0.34805,0.363182608695652},
-{3268423,3886256,3886092,1000000,0.26154},
-{3268424,3886092,3885993,1000000,0.138711111111111},
-{3268425,3891055,3891531,0.297469565217391,1000000},
-{3268429,3900807,3900812,0.02504,0.0197684210526316},
-{3268430,3900812,3900863,0.0185777777777778,0.0185777777777778},
-{3268435,3897700,3897769,0.0779666666666667,0.0779666666666667},
-{3268436,3897769,3897848,1000000,0.0773333333333333},
-{3268437,3898457,3898528,0.0503217391304348,0.0723375},
-{3268438,3898528,3898966,0.308328,1000000},
-{3268439,3897769,3898528,0.5712,1000000},
-{3268440,3859913,3859941,0.0274222222222222,0.0274222222222222},
-{3268441,3854777,3854688,0.207222857142857,0.278953846153846},
-{3268442,3854688,3854691,0.018975,0.0207},
-{3268443,3854062,3854101,0.06234375,0.0867391304347826},
-{3268444,3854101,3854111,0.00991875,0.0122076923076923},
-{3268445,3854688,3854101,0.255355555555556,0.299765217391304},
-{3268446,3854818,3854871,0.0580444444444444,0.0580444444444444},
-{3268447,3854871,3854869,1000000,0.0240444444444444},
-{3268448,3854869,3854910,1000000,0.0296666666666667},
-{3268449,3854910,3854871,1000000,0.122355555555556},
-{3268485,3850338,3850353,0.295175,0.262377777777778},
-{3268486,3850534,3850695,0.0836222222222222,0.0836222222222222},
-{3268487,3850695,3850814,0.0713428571428572,0.0516620689655172},
-{3268488,3850695,3850878,1000000,1000000},
-{3268489,3850878,3850966,1000000,1000000},
-{3268490,3853368,3853345,0.0149333333333333,0.0149333333333333},
-{3268491,3853345,3853140,0.271269230769231,0.190621621621622},
-{3268541,3852696,3852703,1000000,1000000},
-{3268542,3852703,3853003,1000000,1000000},
-{3268543,3852779,3852712,0.0128266666666667,0.0125478260869565},
-{3268544,3854789,3855249,0.563014285714286,0.52548},
-{3268545,3855249,3855367,0.113492307692308,0.118032},
-{3268558,3851634,3851393,0.238605882352941,0.25351875},
-{3268559,3851393,3851280,0.131030769230769,0.154854545454545},
-{3268560,3849696,3850019,0.206644444444444,0.206644444444444},
-{3268561,3851879,3851221,0.278133333333333,0.278133333333333},
-{3268562,3855928,3855795,1000000,0.199841379310345},
-{3268563,3855795,3855761,1000000,0.0505},
-{3268564,3861551,3861558,0.0991384615384615,0.0758117647058824},
-{3268565,3861558,3861562,0.0632,0.0474},
-{3268713,3861016,3861297,0.250242857142857,0.259511111111111},
-{3268714,3861297,3861437,0.0973454545454545,0.103625806451613},
-{3268715,3861297,3860822,0.290911111111111,0.290911111111111},
-{3268716,3858202,3858153,0.0286222222222222,0.0286222222222222},
-{3268947,3881117,3880849,0.120107692307692,0.141945454545455},
-{3268948,3880849,3880793,0.02634,0.0270153846153846},
-{3269188,3896880,3896824,0.0659333333333333,1000000},
-{3269191,3888729,3888832,1000000,0.0152285714285714},
-{3269192,3888832,3889043,1000000,0.0343645161290323},
-{3269258,3850904,3850910,0.0161351351351351,0.00978688524590164},
-{3269259,3850910,3850997,0.1245,0.119888888888889},
-{3269287,3861711,3861161,1000000,0.134256338028169},
-{3269288,3861530,3861504,1000000,0.0162489795918367},
-{3269289,3861504,3860844,1000000,0.291484615384615},
-{3269290,3861161,3861302,0.1845,1000000},
-{3269291,3861302,3861554,1.53744,1000000},
-{3269292,3861647,3861134,0.14058,1000000},
-{3269293,3861134,3860703,0.093,1000000},
-{3269302,3861630,3861554,1000000,0.0538363636363636},
-{3269303,3861554,3861530,1000000,0.0112875},
-{3269307,3850740,3850854,0.159702857142857,1000000},
-{3269347,3920211,3920518,0.086415,0.0934216216216216},
-{3269348,3920518,3920868,0.101413333333333,0.0992086956521739},
-{3269364,3881858,3882281,0.465507692307692,0.550145454545455},
-{3269365,3867968,3867914,0.0103811320754717,1000000},
-{3269366,3867914,3867688,0.0428716981132075,1000000},
-{3269367,3868254,3867984,1000000,0.0478415094339623},
-{3269368,3867984,3867928,1000000,0.00990566037735849},
-{3269382,3879613,3881097,1000000,0.611322580645161},
-{3269383,3881097,3882022,1000000,0.38056},
-{3269393,3873916,3874272,0.0739448275862069,0.0809207547169811},
-{3269394,3874272,3874651,0.0739444444444444,0.0753396226415094},
-{3269424,3858232,3857657,0.3309,0.319489655172414},
-{3269434,3855682,3855175,0.147024489795918,0.144084},
-{3269435,3855175,3854947,0.0719125,0.0750391304347826},
-{3269436,3856413,3856094,0.116955555555556,0.123835294117647},
-{3269437,3856094,3855682,0.122736,0.12785},
-{3269438,3854947,3854279,0.21055,0.219704347826087},
-{3269439,3854279,3854176,0.0329428571428571,0.0373945945945946},
-{3269457,3857341,3858938,0.88275652173913,1.84576363636364},
-{3269458,3858938,3858984,0.0296903225806452,0.036816},
-{3269459,3858984,3859236,0.11829375,0.151416},
-{3269511,3890712,3891206,0.230710344827586,0.196782352941176},
-{3269512,3890061,3890625,0.220994117647059,0.288992307692308},
-{3269513,3890625,3890712,0.0265395348837209,0.02536},
-{3269514,3898308,3897661,0.18456,0.263657142857143},
-{3269515,3897661,3896744,0.3987,0.23922},
-{3269516,3880986,3881134,1000000,0.1746},
-{3269517,3881134,3881292,1000000,0.247326315789474},
-{3269541,3884402,3884749,1000000,0.178514285714286},
-{3269542,3884749,3885230,1000000,0.193015384615385},
-{3269543,3867718,3867992,1000000,0.25375},
-{3269544,3867992,3868373,1000000,0.21987},
-{3269545,3874006,3874116,0.0429538461538462,1000000},
-{3269546,3874116,3874524,0.149059459459459,1000000},
-{3269547,3871784,3872025,0.186818181818182,1000000},
-{3269548,3872025,3872265,0.15,1000000},
-{3269575,3874131,3874014,0.216,1000000},
-{3269576,3879992,3880089,1000000,0.266169230769231},
-{3269577,3880089,3880208,1000000,0.25248},
-{3269578,3879914,3880078,0.0973333333333333,0.0973333333333333},
-{3269579,3880078,3880265,0.4568,0.4568},
-{3269580,3877636,3877816,1000000,1000000},
-{3269581,3877816,3878045,1000000,1000000},
-{3269582,3878313,3878659,1000000,1000000},
-{3269583,3878659,3879057,1000000,1000000},
-{3269584,3876476,3876481,0.15140625,1000000},
-{3269585,3876481,3876475,0.19659,1000000},
-{3269588,3876494,3876746,1000000,1000000},
-{3269589,3876746,3876992,1000000,1000000},
-{3269590,3879323,3879469,0.0734888888888889,0.0734888888888889},
-{3269591,3879469,3879588,0.0650222222222222,0.0650222222222222},
-{3269592,3880031,3880185,0.238254545454545,1000000},
-{3269593,3880185,3880366,0.18048,1000000},
-{3269594,3877892,3878339,1000000,1000000},
-{3269595,3877200,3877129,1000000,0.128884615384615},
-{3269596,3879482,3879611,1000000,1000000},
-{3269597,3879611,3879737,1000000,1000000},
-{3269598,3878190,3878484,0.23336,0.269261538461538},
-{3269599,3877849,3878166,0.1126,0.1126},
-{3269600,3878658,3878674,1000000,1000000},
-{3269601,3875740,3876096,1000000,0.27116},
-{3269602,3876096,3876600,1000000,0.3490125},
-{3269603,3876024,3875990,0.2044,1000000},
-{3269604,3875990,3875958,0.13101,1000000},
-{3269605,3876494,3876570,0.0824444444444445,0.0824444444444445},
-{3269606,3876570,3876692,0.104146153846154,0.104146153846154},
-{3269607,3850358,3850234,1000000,1000000},
-{3269608,3850234,3850218,1000000,1000000},
-{3269609,3880263,3880430,0.240494117647059,1000000},
-{3269610,3880430,3880603,0.2646,1000000},
-{3269611,3880732,3880934,1000000,1000000},
-{3269612,3880934,3881182,1000000,1000000},
-{3269613,3878315,3878463,1000000,0.296871428571429},
-{3269614,3877616,3877241,0.156081818181818,1000000},
-{3269615,3877241,3876995,0.124281818181818,1000000},
-{3269616,3875614,3875535,0.188375,0.4521},
-{3269617,3878045,3878337,1000000,1000000},
-{3269618,3878337,3878658,1000000,1000000},
-{3269619,3877264,3877510,1000000,1000000},
-{3269620,3877510,3877753,1000000,1000000},
-{3269621,3877740,3877504,1000000,1000000},
-{3269622,3877678,3877496,1000000,1000000},
-{3269623,3877496,3877284,1000000,1000000},
-{3269624,3880310,3880655,0.193888888888889,0.193888888888889},
-{3269625,3880655,3881075,0.800485714285714,0.329611764705882},
-{3269626,3879139,3879311,0.16052,0.185215384615385},
-{3269627,3879311,3879489,0.0926888888888889,0.0926888888888889},
-{3269628,3889996,3889808,0.0700111111111111,0.0741294117647059},
-{3269629,3889808,3889370,0.142675471698113,0.142675471698113},
-{3269630,3882163,3882181,1000000,1000000},
-{3270067,3878388,3878434,0.0207,0.0207},
-{3270068,3878065,3878388,0.19172,0.188577049180328},
-{3270140,3869127,3869292,1000000,0.1863},
-{3270141,3869292,3869412,1000000,0.0949448275862069},
-{3270270,3919494,3919847,0.145681132075472,1000000},
-{3270271,3919847,3920837,0.358531428571429,1000000},
-{3270299,3903863,3904599,0.560911111111111,0.560911111111111},
-{3270302,3903029,3903695,0.490066666666667,0.490066666666667},
-{3270323,3865100,3864955,0.2364,0.2364},
-{3270324,3864955,3864949,0.0203853658536585,0.0203853658536585},
-{3270325,3901328,3900928,0.146958620689655,0.149536842105263},
-{3270326,3899986,3900928,0.564266666666667,0.564266666666667},
-{3270328,3899625,3899406,0.438666666666667,0.438666666666667},
-{3270329,3906881,3906840,0.0470666666666667,0.0470666666666667},
-{3270330,3906881,3907051,0.123511111111111,0.123511111111111},
-{3270331,3907051,3907450,0.3504,0.3504},
-{3270332,3904373,3904900,0.2188,0.2188},
-{3270333,3904468,3905676,1.13466,1.13466},
-{3270334,3907149,3907190,0.0264,0.0264},
-{3270335,3904900,3905131,0.105822222222222,0.105822222222222},
-{3270336,3904463,3905330,0.40156,0.50195},
-{3270337,3905330,3905539,0.091,0.091},
-{3270338,3905131,3905330,0.43592,0.5449},
-{3270339,3906120,3906290,0.16005,0.16005},
-{3270340,3905131,3905683,0.54705,0.54705},
-{3270341,3905683,3907190,1.06191,1.06191},
-{3270342,3906120,3905683,0.28821,0.28821},
-{3270343,3905330,3905667,0.28605,0.28605},
-{3270344,3905667,3906120,0.44496,0.44496},
-{3270345,3905667,3905798,0.17979,0.17979},
-{3270346,3905798,3906009,0.182266666666667,0.182266666666667},
-{3270467,3850534,3850342,0.0964666666666667,0.0964666666666667},
-{3270468,3850342,3850174,1000000,1000000},
-{3270469,3862449,3862374,0.029151724137931,0.0313111111111111},
-{3270470,3862374,3862222,0.08586,0.07155},
-{3270471,3862374,3862148,0.110672727272727,1000000},
-{3270472,3863343,3863283,1000000,0.0310258064516129},
-{3270473,3863283,3863116,1000000,0.0846888888888889},
-{3270474,3863348,3863283,1000000,0.06027},
-{3270476,3854543,3854390,0.0704368421052632,0.0686307692307692},
-{3270477,3854390,3853692,0.280102325581395,0.267653333333333},
-{3270478,3850060,3850292,1000000,1000000},
-{3270479,3850292,3851280,0.764822222222222,0.764822222222222},
-{3270481,3862890,3862842,1000000,0.0256344827586207},
-{3270482,3862842,3862731,1000000,0.080328},
-{3270483,3851753,3851569,0.1842,0.1842},
-{3270484,3863968,3863893,0.023172972972973,0.0317555555555556},
-{3270485,3863893,3863855,0.00955263157894737,0.0139615384615385},
-{3270486,3863763,3863909,1000000,0.15234375},
-{3270487,3863909,3863968,1000000,0.0358384615384615},
-{3270488,3863893,3863909,0.012855,1000000},
-{3270489,3864040,3863951,1000000,0.065976},
-{3270490,3863951,3863763,1000000,0.31024},
-{3270491,3851185,3851159,1000000,0.0271862068965517},
-{3270492,3851159,3851282,1000000,0.0724888888888889},
-{3270493,3854134,3853566,0.483339130434783,0.505309090909091},
-{3270494,3853139,3852407,0.289022222222222,0.339286956521739},
-{3270495,3853566,3853139,0.223248,0.223248},
-{3270496,3853470,3853220,0.0810818181818182,0.108109090909091},
-{3270497,3853220,3852011,0.418772727272727,0.5758125},
-{3270498,3853139,3853220,0.06117,0.050975},
-{3270499,3853527,3853470,0.0134266666666667,0.0183090909090909},
-{3270506,3895262,3895130,0.101485714285714,1000000},
-{3270507,3895717,3895262,0.213284210526316,1000000},
-{3270508,3895262,3895384,1000000,0.113921739130435},
-{3270509,3895445,3895330,1000000,0.0923368421052631},
-{3270510,3895384,3895632,0.261847058823529,0.261847058823529},
-{3270511,3895632,3895717,0.0788,0.0417176470588235},
-{3270512,3894383,3895264,0.490155555555555,0.490155555555555},
-{3270513,3893134,3893557,0.159838235294118,0.17252380952381},
-{3270514,3891757,3893134,0.574958823529412,0.501246153846154},
-{3270515,3891488,3893134,0.563274193548387,0.572508196721311},
-{3270516,3891394,3891488,0.0264941176470588,0.0241285714285714},
-{3270517,3891343,3891394,0.03225,0.0258},
-{3270518,3890607,3890875,0.0894315789473684,0.161828571428571},
-{3270519,3890875,3890951,0.0537391304347826,0.0588571428571429},
-{3270520,3890369,3889855,1000000,0.155657142857143},
-{3270521,3890447,3890394,1000000,0.0197032258064516},
-{3270522,3890394,3890369,1000000,0.0114},
-{3270523,3890470,3890394,0.0964666666666667,0.069456},
-{3270524,3890607,3890548,0.0452769230769231,0.0692470588235294},
-{3270525,3890548,3890470,0.076904347826087,0.076904347826087},
-{3270526,3890875,3890852,1000000,0.0268},
-{3270527,3890852,3890470,1000000,0.466523076923077},
-{3270528,3890548,3890852,0.195966666666667,0.2204625},
-{3270529,3890226,3890242,0.032232,1000000},
-{3270530,3889380,3889626,0.106355555555556,0.106355555555556},
-{3270531,3889626,3890163,1000000,1000000},
-{3270532,3890163,3890242,1000000,1000000},
-{3270533,3902336,3902393,0.0217153846153846,0.0217153846153846},
-{3270534,3901756,3902250,1000000,0.540105882352941},
-{3270535,3902250,3902336,1000000,0.0685894736842105},
-{3270536,3902393,3902304,1000000,0.0725230769230769},
-{3270537,3902304,3901770,1000000,0.352842857142857},
-{3270538,3902250,3902304,0.03108,0.03108},
-{3270539,3902535,3902429,0.297696774193548,0.329592857142857},
-{3270540,3902429,3902426,0.0144222222222222,0.0144222222222222},
-{3270541,3902304,3902429,0.316444444444444,0.316444444444444},
-{3270542,3902627,3902960,0.1477,0.1688},
-{3270543,3902960,3903048,0.03402,0.03189375},
-{3270544,3902147,3902199,0.02943,0.02943},
-{3270545,3902199,3902627,0.2127,0.2127},
-{3270546,3901559,3902108,0.263345454545455,0.3408},
-{3270547,3902108,3902147,0.0173052631578947,0.0173052631578947},
-{3270548,3902108,3902100,1000000,0.0528947368421053},
-{3270549,3902100,3901532,1000000,0.860266666666667},
-{3270550,3901339,3901300,0.0751777777777778,0.0751777777777778},
-{3270551,3901802,3902046,1000000,0.0855257142857143},
-{3270552,3902046,3902551,1000000,0.159066666666667},
-{3270553,3902031,3902046,0.0286285714285714,0.0261391304347826},
-{3270554,3903273,3904050,0.16611,1000000},
-{3270555,3904050,3905370,0.278065573770492,1000000},
-{3270556,3905679,3905189,1000000,0.2592},
-{3270557,3905189,3905138,0.0511090909090909,0.0535428571428571},
-{3270558,3904050,3905189,1.51326,1000000},
-{3270559,3903848,3903333,0.179485714285714,0.1963125},
-{3270560,3903333,3902975,0.0956651162790698,0.117531428571429},
-{3270561,3902975,3902758,0.0732909090909091,0.0780193548387097},
-{3270562,3903333,3902975,0.60912,1000000},
-{3270563,3887261,3887373,0.15237,0.15237},
-{3270564,3887373,3887887,0.301122580645161,1000000},
-{3270565,3903369,3904063,1000000,0.1611},
-{3270566,3904063,3905311,1000000,0.253914285714286},
-{3270690,3909309,3909060,0.165572727272727,0.145704},
-{3270691,3909970,3910149,0.0418772727272727,0.0409466666666667},
-{3270692,3910149,3910440,0.0629590909090909,0.0629590909090909},
-{3270693,3909309,3909890,0.78534,1000000},
-{3270694,3909907,3909691,0.116256,0.14532},
-{3270695,3909691,3909309,0.169181818181818,0.159514285714286},
-{3270696,3909890,3909691,0.25056,1000000},
-{3270697,3909890,3910061,0.23832,0.23832},
-{3270698,3910061,3910149,1000000,0.11274},
-{3270699,3910588,3910422,0.108157894736842,0.158076923076923},
-{3270700,3910422,3909523,0.498275,0.459946153846154},
-{3270701,3910061,3910422,0.41022,1000000},
-{3270711,3908887,3908737,0.10104,0.106357894736842},
-{3270712,3908737,3908530,0.0864,0.0923586206896552},
-{3270713,3908368,3908751,0.177555555555556,0.208434782608696},
-{3270714,3908751,3908887,0.080025,0.0738692307692308},
-{3270715,3908737,3908751,0.156633333333333,0.156633333333333},
-{3270716,3909211,3909035,0.0942666666666667,0.0978923076923077},
-{3270717,3909035,3908887,0.1133,0.107336842105263},
-{3270718,3908751,3909035,0.102355555555556,0.102355555555556},
-{3270748,3894252,3894121,1000000,1000000},
-{3270749,3894121,3894261,0.133844444444444,0.133844444444444},
-{3270754,3897537,3897119,1000000,0.143786666666667},
-{3270755,3897119,3897263,0.121111111111111,0.121111111111111},
-{3270756,3897522,3897090,0.141665217391304,1000000},
-{3270757,3897090,3896767,0.107,1000000},
-{3270758,3897659,3897942,0.16771875,0.153342857142857},
-{3270759,3897942,3898065,0.0697615384615385,0.0490216216216216},
-{3270760,3897848,3898279,1000000,0.341628571428571},
-{3270761,3913802,3913671,1000000,0.0374318181818182},
-{3270762,3913671,3913491,1000000,0.0507142857142857},
-{3270763,3914098,3913958,0.0725111111111111,0.0725111111111111},
-{3270764,3913958,3913795,0.0743555555555556,0.0743555555555556},
-{3270765,3913671,3913958,0.134355555555556,0.134355555555556},
-{3270766,3913716,3913621,0.0323608695652174,1000000},
-{3270767,3913621,3913425,0.05236,1000000},
-{3270768,3916118,3915609,1000000,0.191631818181818},
-{3270769,3915609,3915313,1000000,0.114823255813953},
-{3270770,3916078,3915567,0.175965957446809,1000000},
-{3270771,3915567,3915273,0.11008085106383,1000000},
-{3270772,3915609,3915567,0.019935,0.019935},
-{3270773,3909416,3909412,0.0096,0.0096},
-{3270774,3909523,3909427,0.05799,1000000},
-{3270775,3909427,3909340,0.058,1000000},
-{3270776,3909416,3909427,0.0243333333333333,0.0243333333333333},
-{3270777,3916755,3916691,0.11238,0.11238},
-{3270778,3916691,3916601,1000000,1000000},
-{3270779,3916601,3916690,1000000,1000000},
-{3270780,3916690,3916935,0.34596,0.34596},
-{3270781,3897377,3897490,1000000,1000000},
-{3270782,3897490,3897532,0.0487875,0.0354818181818182},
-{3270783,3897769,3897490,0.2958,0.316928571428571},
-{3270972,3904592,3904279,0.21963,0.21963},
-{3271028,3895267,3895726,0.412733333333333,0.412733333333333},
-{3271029,3895726,3895761,1000000,1000000},
-{3271030,3895942,3895908,0.0246444444444444,0.0246444444444444},
-{3271031,3895908,3895523,0.334977777777778,0.334977777777778},
-{3271032,3895618,3896044,0.3316,0.3316},
-{3271033,3895908,3896044,0.10395,0.10395},
-{3271034,3896044,3896143,0.0706666666666667,0.0706666666666667},
-{3271035,3895771,3896292,0.404666666666667,0.404666666666667},
-{3271036,3895905,3896443,0.410577777777778,0.410577777777778},
-{3271037,3896443,3896484,1000000,1000000},
-{3271038,3900603,3900500,0.0723882352941176,0.053504347826087},
-{3271039,3900787,3900810,0.02102,0.020341935483871},
-{3271040,3900810,3900603,0.185496774193548,0.159733333333333},
-{3271041,3895097,3894823,0.141428571428571,0.165},
-{3271042,3896473,3896540,0.07635,0.0832909090909091},
-{3271043,3896753,3896876,0.115166666666667,0.10365},
-{3271044,3896540,3896876,1000000,1000000},
-{3271045,3896540,3896610,0.0695478260869565,0.0761714285714286},
-{3271046,3896876,3896974,0.0680454545454545,0.05988},
-{3271047,3896610,3896974,1000000,1000000},
-{3271048,3896610,3896660,0.0545769230769231,0.059125},
-{3271049,3896974,3897050,0.0700857142857143,0.0474774193548387},
-{3271050,3896660,3897050,1000000,1000000},
-{3271051,3896660,3896722,0.0716608695652174,0.0749181818181818},
-{3271052,3897050,3897144,0.0682909090909091,0.0682909090909091},
-{3271053,3896722,3897144,1000000,1000000},
-{3271054,3896722,3896771,0.0571714285714286,0.048024},
-{3271055,3897144,3897220,0.08,0.08},
-{3271056,3896771,3897220,1000000,1000000},
-{3271057,3896771,3896839,0.0549,0.04460625},
-{3271058,3896839,3896942,0.0646551724137931,0.0646551724137931},
-{3271059,3897220,3897306,0.0519333333333333,0.0519333333333333},
-{3271060,3897306,3897395,0.0571555555555556,0.0571555555555556},
-{3271061,3896839,3897306,1000000,1000000},
-{3271362,3877427,3877411,1000000,0.08628},
-{3271363,3877374,3877034,0.495547826086957,0.495547826086957},
-{3271364,3877411,3877374,0.0266769230769231,0.0266769230769231},
-{3271367,3871271,3871725,0.201251612903226,0.201251612903226},
-{3271380,3887153,3887773,1000000,0.286575},
-{3271735,3906692,3907439,0.57453,0.57453},
-{3271736,3905846,3906566,0.77604,0.77604},
-{3271737,3906566,3907464,0.79668,0.79668},
-{3271738,3907439,3906566,0.60081,0.60081},
-{3271740,3910955,3911327,0.23169,0.356446153846154},
-{3271741,3911327,3911355,0.019848,0.0275666666666667},
-{3271744,3903211,3903668,0.72564,0.72564},
-{3271745,3903457,3903286,0.0766333333333333,0.0726},
-{3271746,3903286,3903145,0.08748,0.0624857142857143},
-{3271747,3903211,3903286,0.12846,0.12846},
-{3271748,3903114,3903211,0.16134,0.16134},
-{3271749,3900068,3900447,0.1134,0.131789189189189},
-{3271750,3900447,3900616,0.051648,0.0527020408163265},
-{3271751,3900616,3901019,0.113304,0.111082352941176},
-{3271752,3900447,3900616,0.57636,0.57636},
-{3271753,3902806,3902916,0.0347466666666667,0.0363627906976744},
-{3271754,3902916,3903044,0.0435272727272727,0.05472},
-{3271755,3902916,3903145,0.0906206896551724,1000000},
-{3271756,3901715,3901792,0.0226695652173913,0.0237},
-{3271757,3901792,3902806,0.296865306122449,0.285223529411765},
-{3271758,3901715,3901615,0.0269428571428571,0.0251466666666667},
-{3271759,3901615,3901248,0.0915333333333333,0.0876382978723404},
-{3271760,3902095,3901735,0.158764285714286,0.134709090909091},
-{3271761,3901735,3901715,0.0153,0.0116068965517241},
-{3271762,3902071,3901872,0.126675,0.0965142857142857},
-{3271763,3901872,3901792,0.069,0.0345},
-{3271764,3903176,3903308,0.057384,0.057384},
-{3271765,3902891,3902937,0.0123567567567568,0.01143},
-{3271766,3902937,3903176,0.0966882352941176,0.0939257142857143},
-{3271767,3903176,3902937,0.61518,1000000},
-{3271768,3910811,3909727,0.291461538461538,0.30930612244898},
-{3271769,3910811,3911367,1000000,1000000},
-{3271771,3910850,3910811,0.0161608695652174,0.0218647058823529},
-{3271772,3907914,3910854,1.04484444444444,1.04484444444444},
-{3271788,3910786,3911023,0.161336842105263,0.161336842105263},
-{3271789,3911023,3911202,0.187242857142857,0.187242857142857},
-{3271790,3915616,3915290,0.191875862068966,0.191875862068966},
-{3271791,3915290,3914876,0.280088888888889,0.280088888888889},
-{3271792,3915969,3915581,0.174866666666667,0.174866666666667},
-{3271793,3915581,3915167,0.232916129032258,0.232916129032258},
-{3271794,3915290,3915581,0.2088,0.2088},
-{3271795,3916398,3915799,0.376311111111111,0.376311111111111},
-{3271796,3915799,3915616,0.123644444444444,0.123644444444444},
-{3271797,3916226,3916152,0.0441882352941177,0.0441882352941177},
-{3271798,3916152,3915969,0.097575,0.097575},
-{3271799,3921950,3922000,0.05388,0.06735},
-{3271800,3922000,3922765,0.416763636363636,0.443651612903226},
-{3271801,3922000,3922001,0.0434823529411765,0.0462},
-{3271802,3913190,3913283,0.0467111111111111,0.0467111111111111},
-{3271803,3913851,3913283,0.3432,0.3432},
-{3271804,3913283,3913307,0.0130222222222222,0.0130222222222222},
-{3271805,3913307,3913336,0.0173333333333333,0.0173333333333333},
-{3271806,3903503,3904048,0.231404347826087,0.231404347826087},
-{3271807,3903503,3903144,0.41502,0.41502},
-{3271808,3903277,3903334,0.0236684210526316,0.022485},
-{3271809,3903334,3903503,0.0840418604651163,0.0803066666666667},
-{3271810,3903334,3903046,0.3318,0.3318},
-{3271811,3904528,3904627,1000000,0.091551724137931},
-{3271812,3904627,3904844,1000000,0.095545945945946},
-{3271813,3905283,3904882,0.296422222222222,0.296422222222222},
-{3271814,3904627,3904882,0.18021,0.18021},
-{3271815,3903992,3904072,0.0521142857142857,0.0684},
-{3271816,3904072,3904260,0.115128,0.115128},
-{3271817,3904072,3903749,0.152688888888889,0.152688888888889},
-{3271818,3911984,3911614,0.3204,1000000},
-{3271819,3911614,3911327,0.341271428571429,1000000},
-{3271820,3911659,3911614,0.0697058823529412,0.0697058823529412},
-{3271821,3910028,3911423,0.520163636363636,0.520163636363636},
-{3271822,3910028,3909914,0.0682736842105263,0.05405},
-{3271823,3894227,3894284,1000000,1000000},
-{3271824,3894284,3894295,1000000,1000000},
-{3271825,3894284,3895027,0.52764,0.52764},
-{3271826,3894070,3894227,1000000,1000000},
-{3271827,3894070,3894440,0.2595,0.2595},
-{3271828,3894440,3894676,0.28743,0.28743},
-{3271829,3895293,3895701,0.311288888888889,0.311288888888889},
-{3271830,3905876,3905676,0.0883333333333333,0.0883333333333333},
-{3271831,3914021,3913781,0.1072,0.1072},
-{3271832,3912081,3911496,0.486317647058823,0.635953846153846},
-{3271833,3911496,3911283,0.157433333333333,0.1771125},
-{3271834,3911496,3911118,0.194177777777778,0.194177777777778},
-{3271835,3911118,3910956,0.0780666666666667,0.0780666666666667},
-{3271836,3910956,3911118,0.0745333333333333,0.0745333333333333},
-{3271843,3913099,3913311,0.17024,0.1596},
-{3271844,3913311,3913400,0.08,0.0847058823529412},
-{3271845,3913400,3913311,0.357355555555556,0.357355555555556},
-{3271846,3915390,3915335,0.20058,0.20058},
-{3271851,3914699,3914955,0.132025,0.140826666666667},
-{3271852,3914955,3915102,0.08988,0.0921846153846154},
-{3271853,3914785,3915043,0.228133333333333,0.228133333333333},
-{3271854,3915043,3915833,0.479544,0.79924},
-{3271855,3914955,3915043,0.0877875,0.0877875},
-{3271856,3914924,3915603,0.5546,0.5546},
-{3271857,3914831,3914872,0.0652125,0.0652125},
-{3271858,3914872,3914924,0.1001,0.0858},
-{3271859,3914924,3914872,0.5853,0.5853},
-{3271860,3915309,3915509,0.192017647058824,0.225124137931035},
-{3271861,3915509,3915531,1000000,1000000},
-{3271868,3922616,3922556,0.0334444444444444,0.0334444444444444},
-{3271869,3922244,3922356,0.0800666666666667,0.0800666666666667},
-{3271870,3922356,3922616,0.192688888888889,0.192688888888889},
-{3271904,3864105,3864458,0.29458064516129,1000000},
-{3271905,3864105,3864513,1000000,0.332089655172414},
-{3271906,3864458,3864159,0.203481818181818,1000000},
-{3271907,3864159,3863266,0.401903225806452,1000000},
-{3271908,3863279,3864167,0.41498,1000000},
-{3271909,3864167,3864513,0.215608695652174,1000000},
-{3271910,3863940,3864178,1.0998,1.0998},
-{3271911,3864167,3864178,0.07086,0.07086},
-{3271912,3864178,3863940,1.55832,1.55832},
-{3271943,3864458,3864513,0.022992,0.0302526315789474},
-{3271944,3864159,3864167,0.0399,0.0399},
-{3271945,3864513,3864637,1000000,1000000},
-{3271946,3864642,3864132,0.282286956521739,0.240466666666667},
-{3271950,3849689,3849169,0.155152173913043,0.162204545454545},
-{3271954,3879445,3879388,1000000,0.0199024390243902},
-{3271955,3879388,3879359,1000000,0.00588571428571429},
-{3272083,3868554,3868500,0.017706976744186,0.02379375},
-{3272084,3869221,3868804,0.137127272727273,0.18855},
-{3272085,3868804,3868554,0.0756,0.0924},
-{3272086,3868554,3868804,0.199073684210526,1000000},
-{3272088,3873215,3873256,0.0259,0.0282545454545455},
-{3272089,3873256,3873446,0.3258,1000000},
-{3272092,3870513,3870623,0.0322304347826087,1000000},
-{3272093,3870623,3870730,0.0269106382978723,1000000},
-{3272094,3870730,3870854,0.0306127659574468,1000000},
-{3272095,3870854,3871000,0.0413875,1000000},
-{3272096,3870623,3870854,0.126177777777778,1000000},
-{3272104,3871652,3871508,0.0544137931034483,1000000},
-{3272105,3871508,3871463,0.0130137931034483,1000000},
-{3272120,3871141,3871018,0.14412,0.156652173913043},
-{3272121,3871018,3870943,0.2862,0.24645},
-{3272122,3870943,3871006,0.01662,0.0369333333333333},
-{3272123,3871006,3871627,1000000,1000000},
-{3272124,3871018,3871006,0.59304,0.306744827586207},
-{3272307,3901122,3901085,0.101777777777778,0.101777777777778},
-{3272308,3901085,3900878,1000000,1000000},
-{3272309,3897128,3897336,0.0900888888888889,0.0900888888888889},
-{3272310,3897336,3897601,1000000,1000000},
-{3272315,3901384,3901862,0.187834285714286,1000000},
-{3272316,3901862,3902320,0.216704347826087,1000000},
-{3272321,3901828,3901829,1000000,1000000},
-{3272339,3900439,3900563,0.114225,0.114225},
-{3272340,3900563,3900724,0.1798,0.202275},
-{3272341,3900718,3900563,1000000,1000000},
-{3272347,3904281,3904333,0.0212538461538462,0.0212538461538462},
-{3272348,3904333,3904985,0.302423076923077,0.302423076923077},
-{3272349,3904333,3904985,1.70076,1.70076},
-{3272353,3905897,3905742,0.0771111111111111,0.0771111111111111},
-{3272354,3905742,3905684,0.0381555555555556,0.0381555555555556},
-{3272355,3905735,3905617,0.0621333333333333,0.0621333333333333},
-{3272356,3905617,3905500,0.0532888888888889,0.0532888888888889},
-{3272400,3920883,3921875,0.251757692307692,0.256694117647059},
-{3272401,3919476,3920519,0.299272340425532,0.351645},
-{3272402,3920519,3920883,0.101282352941176,0.129135},
-{3272403,3920584,3920519,0.155018181818182,0.100305882352941},
-{3272404,3920636,3920869,0.0859609756097561,0.0927473684210526},
-{3272405,3920869,3921642,0.287842105263158,0.280461538461538},
-{3272406,3920584,3920801,0.3651,0.3651},
-{3272407,3920801,3920869,0.103341176470588,0.0836571428571428},
-{3272408,3920514,3920584,0.135054545454545,0.09904},
-{3272409,3920514,3919626,0.794181818181818,0.69888},
-{3272412,3920883,3920584,0.58326,1000000},
-{3272413,3920801,3920514,0.41924,0.41924},
-{3272414,3919471,3919586,1000000,0.0460857142857143},
-{3272415,3919586,3919647,1000000,0.0265066666666667},
-{3272430,3919209,3919036,0.130475,0.20876},
-{3272431,3919036,3919124,0.0786352941176471,0.0786352941176471},
-{3272432,3919124,3919317,0.0984,0.0984},
-{3272433,3919124,3919457,0.263084210526316,0.263084210526316},
-{3272435,3919457,3919316,0.104590909090909,0.095875},
-{3272436,3919316,3918513,0.677314285714286,1.1853},
-{3272437,3919036,3918979,0.042432,0.0482181818181818},
-{3272438,3918979,3918950,0.02379,0.0176222222222222},
-{3272439,3919316,3918979,0.191352,0.191352},
-{3272453,3886440,3886274,0.163448275862069,0.225714285714286},
-{3272454,3886067,3886451,0.498461538461538,0.216},
-{3272455,3886451,3886470,0.0185,0.01332},
-{3272456,3886440,3886451,1000000,0.0372375},
-{3272457,3886740,3886901,0.193028571428571,0.162144},
-{3272458,3886451,3886901,1000000,0.211066666666667},
-{3272459,3887556,3887007,0.121577777777778,1000000},
-{3272460,3886901,3887007,1000000,0.0384},
-{3272461,3886519,3886470,0.025375,0.03045},
-{3272462,3886440,3886519,0.05656,1000000},
-{3272463,3887189,3887316,0.0428487804878049,1000000},
-{3272471,3886519,3886935,0.199914285714286,1000000},
-{3272476,3886791,3886959,0.0977,1000000},
-{3272477,3886959,3886875,0.10572,0.124376470588235},
-{3272478,3887450,3887103,0.471026086956522,0.6771},
-{3272479,3886959,3887103,0.180704347826087,0.197914285714286},
-{3272502,3886657,3886688,0.05724,0.05724},
-{3272505,3886657,3886488,1.16544,1.16544},
-{3272506,3886488,3886657,0.67488,0.67488},
-{3272510,3886209,3886254,0.0894206896551724,0.0894206896551724},
-{3272511,3886254,3886587,0.1467375,0.173911111111111},
-{3272548,3886519,3887013,0.580525,0.480434482758621},
-{3272555,3886759,3891654,2.34946285714286,2.16397894736842},
-{3272556,3891731,3890270,1.1998,1.1998},
-{3272558,3891731,3893069,1.60584444444444,1.60584444444444},
-{3272741,3901326,3901197,0.0575555555555556,0.0575555555555556},
-{3272742,3901197,3901105,0.0534222222222222,0.0534222222222222},
-{3272743,3919123,3918976,0.0837272727272727,0.0837272727272727},
-{3272744,3918655,3918826,0.0816444444444444,0.0816444444444444},
-{3272745,3921039,3921073,0.0085741935483871,0.00886},
-{3272746,3921073,3921378,0.124236363636364,0.13666},
-{3272747,3921819,3921097,0.5774,0.5774},
-{3272748,3921097,3921073,0.032925,0.032925},
-{3272749,3916555,3914836,1.03863243243243,1.13027647058824},
-{3273239,3915453,3915382,0.19662,0.115658823529412},
-{3273240,3915453,3915400,1000000,0.08118},
-{3273241,3915530,3915506,0.0271826086956522,0.0347333333333333},
-{3273242,3915506,3915453,0.0621176470588235,0.0621176470588235},
-{3273243,3915400,3915445,0.1041,0.1041},
-{3273244,3915506,3915445,0.08898,1000000},
-{3273245,3915365,3915319,0.03561,0.03561},
-{3273246,3915319,3914831,0.294384,0.283061538461538},
-{3273247,3915445,3915321,0.2289,0.2289},
-{3273248,3915321,3915400,0.34932,0.34932},
-{3273249,3915319,3915321,0.0167666666666667,0.0167666666666667},
-{3273339,3852484,3853092,1000000,0.116095081967213},
-{3273340,3853092,3853223,1000000,0.0351666666666667},
-{3273501,3903567,3903946,0.08605,1000000},
-{3273502,3903946,3905103,0.246341666666667,1000000},
-{3273503,3877202,3877125,0.0868533333333333,1000000},
-{3273504,3877125,3877071,0.0583,1000000},
-{3273505,3861312,3861384,0.0140695652173913,1000000},
-{3273506,3861312,3861378,1000000,0.0142029850746269},
-{3273507,3861384,3861876,0.105987692307692,1000000},
-{3273508,3861876,3861991,0.0281898305084746,1000000},
-{3273519,3859408,3859191,0.0847432835820895,0.0834970588235294},
-{3273530,3857587,3857659,0.01136,0.00973714285714286},
-{3273531,3857659,3857812,0.0272105263157895,0.0224782608695652},
-{3273534,3858147,3858140,0.00788571428571429,1000000},
-{3273535,3858140,3858037,0.120038709677419,1000000},
-{3273608,3861882,3861718,0.0471818181818182,1000000},
-{3273609,3861718,3861647,0.0247764705882353,1000000},
-{3273703,3858529,3858506,0.0367967213114754,0.0367967213114754},
-{3273816,3858611,3858728,1000000,0.0707027027027027},
-{3273817,3858728,3858888,1000000,0.0410093023255814},
-{3273865,3900325,3900535,0.107259375,0.11071935483871},
-{3273866,3900535,3900657,0.0721052631578947,0.0747272727272727},
-{3273887,3869246,3868604,0.11704347826087,0.120537313432836},
-{3273888,3868604,3868434,0.031940625,0.0329709677419355},
-{3273889,3875439,3875465,0.0248553191489362,1000000},
-{3273890,3875465,3875677,0.250786666666667,1000000},
-{3273893,3876245,3876657,0.438075,1000000},
-{3273939,3891573,3890956,1000000,0.147769811320755},
-{3273940,3890956,3890860,1000000,0.0284425531914894},
-{3274460,3871839,3872232,0.0778533333333333,0.0686941176470588},
-{3274461,3872232,3872746,0.110371428571429,0.105354545454545},
-{3274588,3897835,3897995,0.0540088235294118,1000000},
-{3274589,3897995,3898063,0.0411705882352941,1000000},
-{3274623,3861969,3861837,1000000,0.046078125},
-{3274624,3861837,3861711,1000000,0.0381818181818182},
-{3274663,3860835,3860730,1000000,1000000},
-{3274664,3861201,3860989,1000000,1000000},
-{3274665,3860098,3860597,0.386208,0.386208},
-{3274666,3860098,3859603,0.339436363636364,0.339436363636364},
-{3274667,3859567,3859995,0.412421052631579,0.412421052631579},
-{3274676,3856280,3856502,0.117888888888889,0.117888888888889},
-{3274680,3856746,3857294,0.136117647058824,0.150913043478261},
-{3274681,3857294,3857322,0.00618367346938776,0.00704651162790698},
-{3274682,3855913,3855335,0.381688888888889,0.381688888888889},
-{3274685,3856031,3856185,0.12228,0.12228},
-{3274688,3856839,3857322,0.715730769230769,0.715730769230769},
-{3274689,3856185,3856839,0.707533333333333,0.707533333333333},
-{3274693,3857560,3857393,0.130111111111111,0.130111111111111},
-{3274694,3857393,3857322,0.09616,0.0801333333333333},
-{3274697,3854802,3855348,0.411576,0.411576},
-{3274698,3855348,3855650,0.125927272727273,0.125927272727273},
-{3274705,3851495,3851630,0.0538434782608696,0.0562909090909091},
-{3274706,3851630,3851706,0.0872,0.0826105263157895},
-{3274707,3851630,3851971,0.2734,0.2734},
-{3274708,3850926,3851161,0.134018181818182,0.12636},
-{3274709,3851161,3851495,0.200035714285714,0.215423076923077},
-{3274710,3851278,3851605,0.24843,0.24843},
-{3274711,3851605,3851854,0.20331,0.20331},
-{3274712,3851161,3851605,1000000,0.314911111111111},
-{3274717,3858038,3857754,0.137911111111111,0.137911111111111},
-{3274721,3858171,3858099,0.0713666666666667,0.0626634146341463},
-{3274722,3858099,3858038,0.0315666666666667,0.0307135135135135},
-{3274723,3858479,3859268,0.432371428571429,0.412718181818182},
-{3274724,3857657,3857638,0.0120782608695652,0.011112},
-{3274725,3857638,3857474,0.1364,0.0909333333333334},
-{3274726,3858479,3857638,0.52008,0.4728},
-{3274727,3858099,3858239,0.1514,1000000},
-{3274728,3858239,3858479,0.28048,0.28048},
-{3274732,3860895,3860369,0.425255172413793,0.536191304347826},
-{3274733,3855306,3854907,0.2276,0.2276},
-{3274739,3860073,3860228,0.20352,0.164129032258065},
-{3274740,3860228,3860369,0.128068965517241,0.109235294117647},
-{3274745,3874470,3874510,0.051468,1000000},
-{3274746,3874510,3874706,0.1628,1000000},
-{3274747,3874706,3874820,0.09893,1000000},
-{3274748,3874820,3874848,0.0208131147540984,1000000},
-{3274749,3874510,3874820,0.5824,1000000},
-{3274756,3874650,3874742,1000000,0.09445},
-{3274757,3874742,3874768,1000000,0.0172881355932203},
-{3274760,3862545,3862442,0.0283695652173913,0.0261},
-{3274761,3862442,3862116,0.0929347826086956,0.0872448979591837},
-{3274762,3862469,3862532,0.27414,0.255013953488372},
-{3274763,3862532,3862545,0.105885714285714,0.0600972972972973},
-{3274764,3862442,3862532,1000000,0.0599},
-{3274776,3872927,3872926,0.00405,0.00405},
-{3274777,3872926,3872493,0.43038,0.43038},
-{3274791,3869576,3869572,0.0226,0.021696},
-{3274792,3869572,3869558,0.0586375,0.0574408163265306},
-{3274793,3869558,3869556,0.0180125,0.0180125},
-{3274794,3869572,3869558,1000000,1000000},
-{3274795,3872955,3873143,0.0820153846153846,0.0969272727272727},
-{3274796,3873143,3873552,0.195572727272727,0.21513},
-{3274797,3873190,3873143,0.418355555555556,0.418355555555556},
-{3274798,3869600,3869639,0.109417021276596,0.111795652173913},
-{3274799,3869639,3869668,0.0662808510638298,0.0692266666666667},
-{3274800,3869779,3869639,1000000,0.243511111111111},
-{3275067,3915447,3916335,0.49595625,0.511954838709677},
-{3275074,3896440,3896596,0.168622222222222,0.168622222222222},
-{3275083,3867579,3867076,1000000,1000000},
-{3275084,3867076,3867043,0.0642,0.0998666666666667},
-{3275085,3868052,3867076,0.420807692307692,0.475695652173913},
-{3275086,3866014,3865944,0.0333333333333333,0.0333333333333333},
-{3275087,3900293,3900342,0.0446857142857143,0.0260666666666667},
-{3275088,3900342,3900787,0.330771428571429,0.264617142857143},
-{3275089,3900342,3898876,0.885777777777778,0.885777777777778},
-{3275093,3880881,3880741,0.057744,0.0555230769230769},
-{3275094,3880741,3880488,0.17712,0.121552941176471},
-{3275095,3879275,3880741,1000000,1000000},
-{3275096,3885250,3884631,1000000,1000000},
-{3275097,3884631,3881799,1000000,1000000},
-{3275098,3884426,3884631,1000000,1000000},
-{3275099,3852868,3852930,0.117528,0.14691},
-{3275100,3852930,3852836,0.108175,0.136642105263158},
-{3275101,3853879,3854276,0.133134782608696,0.130302127659574},
-{3275102,3854276,3854795,0.1581125,0.151788},
-{3275103,3852930,3854276,0.576206896551724,0.539032258064516},
-{3275117,3894083,3894065,0.0891954545454545,1000000},
-{3275118,3894155,3894830,0.18,1000000},
-{3275119,3894830,3895323,0.1614,1000000},
-{3275454,3894157,3894816,1000000,0.17292},
-{3275455,3894816,3895328,1000000,0.131422641509434},
-{3275460,3894004,3894042,0.0912391304347826,1000000},
-{3275462,3875594,3874428,1000000,0.791233333333333},
-{3275463,3874428,3874258,0.09145,0.09145},
-{3275476,3899297,3899839,0.13,0.13},
-{3275820,3855140,3855305,1000000,0.30051},
-{3275821,3856249,3855305,0.32278125,0.313},
-{3275822,3873008,3872887,0.0265333333333333,0.0275538461538462},
-{3275823,3872887,3871898,0.239569230769231,0.198791489361702},
-{3275824,3872887,3872488,1000000,1000000},
-{3276497,3890881,3891009,0.54714,0.54714},
-{3276498,3888797,3888837,1000000,1000000},
-{3276499,3888837,3888841,1000000,1000000},
-{3276500,3889095,3889864,0.157992452830189,0.161030769230769},
-{3276501,3889864,3890134,0.06528,0.06528},
-{3276502,3888837,3889864,1.18614,1.18614},
-{3276503,3888837,3888552,0.27522,0.27522},
-{3276504,3887512,3888163,0.133186956521739,0.153165},
-{3276505,3888163,3888841,0.124584905660377,0.134755102040816},
-{3276506,3887502,3888158,0.61272,0.61272},
-{3276507,3888158,3888163,0.10134,0.10134},
-{3276508,3887457,3887489,1000000,1000000},
-{3276509,3887489,3887502,0.17514,0.17514},
-{3276510,3888158,3887489,0.78318,0.78318},
-{3276511,3888158,3888552,0.38646,0.38646},
-{3276512,3886331,3886931,0.214570588235294,0.235335483870968},
-{3276513,3886931,3886929,0.1023,0.1023},
-{3276514,3886929,3887502,0.63552,0.63552},
-{3276515,3883859,3884154,0.152422222222222,0.152422222222222},
-{3276516,3884154,3884547,0.206933333333333,0.206933333333333},
-{3276517,3884154,3884403,0.40944,0.40944},
-{3276518,3883041,3882999,0.0611538461538462,0.0611538461538462},
-{3276519,3883512,3883222,1000000,1000000},
-{3276520,3883222,3883041,0.26355,0.26355},
-{3276521,3883222,3883649,0.73704,0.73704},
-{3276522,3882310,3882180,0.0802,0.0886421052631579},
-{3276523,3882180,3882160,0.0137714285714286,0.015221052631579},
-{3276524,3883890,3884508,1000000,0.310444444444444},
-{3276525,3886929,3886434,0.77904,0.77904},
-{3276526,3886434,3886929,0.77466,0.77466},
-{3277158,3860853,3860919,0.0588,0.0464210526315789},
-{3277159,3860919,3861027,0.44985,0.346038461538462},
-{3277160,3861027,3860919,0.362711111111111,0.362711111111111},
-{3277996,3883402,3883392,0.161590909090909,0.17775},
-{3277997,3883392,3883220,0.17265,0.159369230769231},
-{3277998,3883775,3883807,0.0177555555555556,0.0177555555555556},
-{3277999,3883775,3883681,0.0601555555555556,0.0601555555555556},
-{3278000,3883392,3883450,0.042,0.0532},
-{3278001,3883450,3883775,0.169466666666667,0.169466666666667},
-{3278002,3883756,3883282,0.366466666666667,0.366466666666667},
-{3278003,3883282,3883220,0.02868,0.0325909090909091},
-{3278004,3883450,3883282,0.216473684210526,0.241941176470588},
-{3278082,3883402,3882941,0.262266666666667,0.262266666666667},
-{3278094,3882612,3882861,0.39216,0.39216},
-{3278095,3882861,3883052,0.3345,0.3345},
-{3278096,3882861,3882941,1000000,0.17934},
-{3278097,3883048,3883036,0.00984705882352941,0.00881052631578947},
-{3278098,3882941,3882904,1000000,0.336092307692308},
-{3278099,3882904,3883036,1000000,0.0843333333333333},
-{3278100,3882904,3882941,0.193066666666667,0.193066666666667},
-{3278104,3883036,3882725,0.26214,0.238309090909091},
-{3278105,3882725,3882310,0.282757894736842,0.233582608695652},
-{3278106,3882252,3882154,0.16015,0.16015},
-{3278107,3882904,3882583,1000000,0.34888},
-{3278108,3882583,3882725,0.0827333333333333,1000000},
-{3278109,3882252,3882279,0.0356571428571429,0.0453818181818182},
-{3278110,3882279,3882583,0.2507625,0.2507625},
-{3278111,3882180,3882247,0.11256,0.129876923076923},
-{3278112,3882279,3882247,0.0329571428571429,0.0271411764705882},
-{3278134,3884508,3884523,0.74076,0.74076},
-{3278137,3884508,3884639,0.15756,0.1477125},
-{3278138,3884639,3884798,0.121342857142857,0.12741},
-{3278140,3884940,3884869,0.0727894736842105,0.0922},
-{3278141,3884869,3884798,0.0628736842105263,0.0543},
-{3278143,3884639,3884869,1.37442,1.37442},
-{3278206,3889665,3890191,0.444052173913044,0.408528},
-{3278207,3889467,3889481,0.0114444444444444,0.0134347826086957},
-{3278208,3889481,3889665,0.124153846153846,0.140347826086957},
-{3278209,3889665,3889481,0.184285714285714,1000000},
-{3278210,3888774,3888882,0.125164285714286,0.125164285714286},
-{3278211,3888882,3889074,0.195114285714286,0.195114285714286},
-{3278212,3888635,3888765,0.113431578947368,0.10776},
-{3278213,3888765,3888774,0.0136,0.0136},
-{3278214,3888882,3888765,0.359444444444444,1000000},
-{3278233,3892688,3893156,0.30483,0.30483},
-{3278234,3893156,3893523,0.357066666666667,0.357066666666667},
-{3278235,3893985,3894905,0.411567567567568,0.461454545454546},
-{3278236,3894905,3894928,0.01168,0.0106181818181818},
-{3278279,3894659,3894841,0.116777777777778,0.116777777777778},
-{3278280,3894925,3895392,0.31575,0.31575},
-{3278802,3894885,3895056,1000000,1000000},
-{3278803,3894634,3894838,0.256023529411765,0.256023529411765},
-{3278804,3894838,3894964,0.0706222222222222,0.0706222222222222},
-{3278805,3894885,3894838,0.0597,0.0597},
-{3278806,3896279,3896224,1000000,1000000},
-{3278807,3897124,3897331,0.0934444444444444,0.0934444444444444},
-{3278808,3897331,3897415,1000000,1000000},
-{3278810,3886593,3886853,0.0867,0.084930612244898},
-{3278811,3886853,3887032,0.0653877551020408,0.0728181818181818},
-{3278812,3887032,3887136,0.0415914893617021,0.0528324324324324},
-{3278813,3886853,3887032,0.968657142857143,1000000},
-{3278814,3887902,3888305,1000000,1000000},
-{3278819,3896227,3896285,0.04656,0.04656},
-{3278820,3896285,3896301,0.01098,0.01098},
-{3278821,3896334,3896285,1000000,1000000},
-{3278822,3893980,3894164,0.105377777777778,0.105377777777778},
-{3278865,3894122,3894113,0.02682,0.02682},
-{3278866,3894113,3894331,0.40878,0.40878},
-{3278867,3894122,3894177,0.0559263157894737,0.0559263157894737},
-{3278868,3894177,3894570,0.277333333333333,0.277333333333333},
-{3278896,3893867,3894300,0.1892,0.21285},
-{3278897,3894300,3894406,0.0393846153846154,0.0451764705882353},
-{3278923,3896654,3896917,0.36225,0.36225},
-{3278924,3896917,3896913,0.0906222222222222,0.0906222222222222},
-{3278962,3861027,3860998,0.053895652173913,0.0476769230769231},
-{3278963,3860998,3860960,0.127,0.103909090909091},
-{3278964,3860998,3861063,0.157936363636364,0.144775},
-{3278965,3861345,3861301,0.071575,0.071575},
-{3278966,3861301,3861291,0.0166615384615385,0.01805},
-{3278967,3861063,3861301,0.2392,0.2808},
-{3278968,3861368,3861677,0.172577777777778,0.172577777777778},
-{3278969,3861301,3861368,0.045312,0.0404571428571429},
-{3278972,3848765,3849784,0.845294117647059,0.798333333333333},
-{3278973,3849844,3849829,0.0156,0.0156},
-{3278974,3849829,3849849,0.0868153846153846,0.0836},
-{3278975,3849784,3849829,0.0358941176470588,0.03051},
-{3279938,3868681,3868600,0.069063829787234,0.0705652173913043},
-{3279939,3868600,3868570,0.017748,0.0188808510638298},
-{3279941,3869795,3868699,0.422335714285714,0.422335714285714},
-{3279942,3868600,3868699,0.0654,0.073575},
-{3279943,3868570,3868534,0.015408,0.0163914893617021},
-{3279944,3868534,3868258,0.1243625,0.129769565217391},
-{3279945,3868699,3868534,0.1010625,0.0621923076923077},
-{3282206,3895163,3894917,0.168929032258064,0.11384347826087},
-{3282207,3894917,3894798,0.2311,0.089458064516129},
-{3282356,3875564,3875921,0.092865,1000000},
-{3282357,3875921,3876012,0.0295428571428571,1000000},
-{3282367,3880568,3878685,0.470611764705882,1000000},
-{3282368,3878685,3878406,0.0965636363636364,1000000},
-{3282376,3890128,3890573,0.202142307692308,0.198328301886792},
-{3282377,3889872,3889911,0.0589034482758621,1000000},
-{3282378,3889911,3890128,0.115784615384615,1000000},
-{3282379,3890128,3889967,0.138072727272727,1000000},
-{3282380,3889967,3889872,0.0466285714285714,1000000},
-{3282381,3889911,3889967,0.04008,0.0445333333333333},
-{3282382,3890951,3891025,0.0526727272727273,0.0404232558139535},
-{3282383,3891343,3891341,1000000,0.0469655172413793},
-{3282384,3891284,3891341,0.024756,0.030190243902439},
-{3282385,3891341,3891394,0.0203345454545455,0.0294315789473684},
-{3282406,3896121,3895993,0.094368,0.214472727272727},
-{3282407,3895162,3895244,0.07100625,1000000},
-{3282479,3908085,3907859,0.0892758620689655,1000000},
-{3282480,3907859,3907558,0.146466666666667,1000000},
-{3282538,3917496,3917546,0.0213535714285714,0.0202677966101695},
-{3282539,3917546,3918387,0.2102,0.2102},
-{3282555,3914294,3914860,0.104381818181818,0.10764375},
-{3282556,3914860,3915583,0.195470588235294,0.226568181818182},
-{3282557,3913101,3914294,0.1788,0.1788},
-{3282558,3906615,3906805,1000000,0.0388705882352941},
-{3282559,3902723,3902714,0.00894418604651163,0.00818297872340426},
-{3282560,3902714,3902534,1000000,0.107059090909091},
-{3282561,3902534,3902521,0.01056,0.0108307692307692},
-{3282562,3902714,3902534,0.131016666666667,1000000},
-{3282565,3902358,3902195,0.0785142857142857,0.0874363636363636},
-{3282566,3902195,3901328,0.32148,0.344442857142857},
-{3282567,3900928,3900786,0.0643529411764706,0.0596727272727273},
-{3282568,3900786,3900606,0.112712195121951,0.0906117647058823},
-{3282615,3916477,3917493,0.2589,0.255253521126761},
-{3282761,3918086,3920081,0.527298591549296,0.519975},
-{3282773,3894938,3895770,0.289386666666667,1000000},
-{3282774,3906471,3906608,0.0381183673469388,1000000},
-{3282775,3906608,3906700,0.0203020408163265,1000000},
-{3282776,3892274,3892321,0.013656,1000000},
-{3282777,3892274,3892327,1000000,0.0107},
-{3282778,3876449,3875310,0.275871428571429,0.343306666666667},
-{3282779,3875310,3873927,0.347431578947368,0.353635714285714},
-{3282780,3873927,3873764,0.041751724137931,0.041751724137931},
-{3282781,3873764,3872757,0.224389473684211,0.220520689655172},
-{3282839,3885710,3885830,0.051,1000000},
-{3282840,3885830,3886002,0.120972727272727,1000000},
-{3282939,3882753,3882766,0.0978521739130435,0.056265},
-{3282940,3881589,3881617,0.00807777777777778,0.0111846153846154},
-{3282941,3881617,3881633,0.0149781818181818,1000000},
-{3282942,3881847,3881936,1000000,0.0636},
-{3282943,3881617,3881660,1000000,0.0236322580645161},
-{3282944,3881660,3881847,1000000,0.120486486486486},
-{3283029,3850931,3850925,0.0209692307692308,0.0233657142857143},
-{3283030,3850925,3850921,0.0559531914893617,0.0571695652173913},
-{3283035,3854173,3854802,1.07692727272727,1.07692727272727},
-{3283036,3854802,3854805,0.0315818181818182,0.013896},
-{3283041,3857777,3857511,0.07374,0.113446153846154},
-{3283042,3855938,3855555,0.0789735849056604,0.0775111111111111},
-{3283043,3855555,3855338,0.0439846153846154,0.0431547169811321},
-{3283044,3857330,3856827,0.106812,0.104717647058824},
-{3283045,3864445,3864213,1000000,0.126484210526316},
-{3283046,3864213,3863983,1000000,0.0942387096774193},
-{3283327,3895420,3895427,0.0170553191489362,0.0178133333333333},
-{3283328,3895427,3895518,0.127902127659574,0.127902127659574},
-{3283329,3901384,3900533,0.192338181818182,0.188903571428571},
-{3283330,3900533,3900171,0.116535,0.103586666666667},
-{3283331,3912596,3912864,0.0588452830188679,0.0567054545454545},
-{3283332,3912864,3913440,0.113705084745763,0.11181},
-{3283333,3914082,3914347,0.058871186440678,0.0598862068965517},
-{3283334,3914347,3914574,0.0507254237288136,0.0516},
-{3283347,3871354,3871687,1000000,0.12824347826087},
-{3283348,3871204,3871354,1000000,0.0657142857142857},
-{3283349,3870734,3870774,1000000,0.03025},
-{3283350,3870774,3870821,1000000,0.08067},
-{3283351,3870821,3870872,1000000,0.0787826086956522},
-{3283352,3870872,3871128,1000000,0.2368875},
-{3283355,3870598,3870552,0.0344833333333333,1000000},
-{3283356,3870552,3870465,0.0549243243243243,1000000},
-{3283357,3870699,3870631,0.0468363636363636,1000000},
-{3283358,3870631,3870598,0.024,1000000},
-{3283359,3870465,3870438,0.0171157894736842,1000000},
-{3283360,3870438,3870383,0.0309947368421053,1000000},
-{3283361,3870383,3870348,0.0218769230769231,1000000},
-{3283362,3869842,3869774,0.016845,1000000},
-{3283363,3869112,3869010,0.0267348837209302,1000000},
-{3283364,3869498,3869298,0.0488790697674419,1000000},
-{3283365,3869298,3869112,0.0486418604651163,1000000},
-{3283422,3873396,3873467,0.0458142857142857,1000000},
-{3283423,3873467,3873485,0.0119086956521739,1000000},
-{3283508,3877890,3877961,0.0346271186440678,0.0334918032786885},
-{3283509,3877961,3878065,0.0573762711864407,0.0554950819672131},
-{3283514,3878956,3878844,0.0852981818181818,0.0852981818181818},
-{3283515,3878995,3878956,0.0223471698113208,0.0219333333333333},
-{3283516,3879254,3879145,0.110367567567568,0.107463157894737},
-{3283517,3879145,3878995,0.0824941176470588,0.084144},
-{3283522,3880944,3880968,0.00876315789473684,0.01332},
-{3283523,3880968,3881176,0.0812318181818182,0.10212},
-{3283565,3871038,3871022,0.0821875,0.0896590909090909},
-{3283566,3871022,3871092,0.212938775510204,0.226826086956522},
-{3283567,3877888,3877829,1000000,0.177394736842105},
-{3283568,3877829,3877792,1000000,0.0735692307692308},
-{3283569,3878375,3878324,0.024825,0.024825},
-{3283570,3878404,3878585,0.0807483870967742,1000000},
-{3283571,3878585,3880539,0.474011538461538,1000000},
-{3283572,3874836,3874245,0.139517647058824,1000000},
-{3283573,3874245,3874199,0.0116588235294118,1000000},
-{3283581,3885539,3885525,1000000,0.08724},
-{3283582,3885525,3885502,1000000,0.0938142857142857},
-{3283586,3875819,3875796,0.0361625,1000000},
-{3283587,3894477,3893542,0.230657142857143,0.24371320754717},
-{3283588,3893542,3893322,0.061368,0.0590076923076923},
-{3283589,3850254,3850416,0.0931941176470588,0.0856378378378378},
-{3283590,3850416,3850581,0.0571466666666667,0.053575},
-{3283614,3871296,3871187,0.187628571428571,0.2388},
-{3283615,3871187,3871038,0.2492375,0.265853333333333},
-{3283639,3865380,3865479,0.0834222222222222,0.0834222222222222},
-{3283640,3865169,3865264,0.0555111111111111,0.0555111111111111},
-{3283641,3865264,3865380,1000000,1000000},
-{3283642,3864248,3864110,0.1116,0.105035294117647},
-{3283643,3864253,3864244,0.00645789473684211,0.00876428571428571},
-{3283644,3864248,3864253,0.03616875,1000000},
-{3283645,3864253,3864284,0.0243777777777778,1000000},
-{3283646,3864248,3864288,1000000,0.0270857142857143},
-{3283647,3864916,3864288,0.31305,0.282754838709677},
-{3283648,3864288,3864284,1000000,0.0237777777777778},
-{3283658,3865818,3865639,1000000,0.0474681818181818},
-{3283659,3865639,3865375,1000000,0.0967578947368421},
-{3283660,3865375,3865288,1000000,0.0509},
-{3283661,3865288,3865280,1000000,0.0098},
-{3283670,3881370,3881078,0.108711111111111,0.110762264150943},
-{3283671,3881399,3882713,0.816558620689655,0.802718644067797},
-{3283672,3882713,3882753,0.121953191489362,0.108147169811321},
-{3283696,3847752,3847542,0.148751020408163,0.15508085106383},
-{3283700,3846633,3847029,0.1228375,0.131026666666667},
-{3283747,3878800,3878881,1000000,0.0348818181818182},
-{3283748,3878881,3879324,1000000,0.123439024390244},
-{3283749,3877812,3877779,0.0683464285714286,1000000},
-{3283750,3877779,3877713,0.112891525423729,1000000},
-{3283751,3876804,3875972,0.19018,1000000},
-{3283752,3875972,3875828,0.0377016393442623,1000000},
-{3283762,3877244,3877501,0.065655737704918,0.06675},
-{3283763,3877501,3878377,0.24355,0.251948275862069},
-{3283769,3873408,3873146,0.185196428571429,0.185196428571429},
-{3283770,3873146,3873047,0.115652830188679,0.117876923076923},
-{3283771,3872625,3872635,0.0656111111111111,0.0656111111111111},
-{3283779,3878408,3878690,0.0881068965517241,0.0896526315789474},
-{3283780,3878690,3879786,0.368275862068965,0.374736842105263},
-{3283781,3879786,3880030,0.102044444444444,0.103969811320755},
-{3283834,3858788,3858830,0.0720285714285714,0.07563},
-{3283835,3858830,3858843,0.0632769230769231,0.06855},
-{3283836,3858843,3858661,0.0774,0.0815837837837838},
-{3283837,3858661,3858497,0.0733116279069767,0.0750571428571429},
-{3283849,3871704,3871670,0.0873428571428571,0.0797478260869565},
-{3283850,3879682,3879299,1000000,0.161763636363636},
-{3283853,3901911,3901933,0.00620869565217391,1000000},
-{3283854,3901943,3901968,1000000,0.00821470588235294},
-{3283957,3856271,3856408,0.0534666666666667,1000000},
-{3283958,3856232,3856374,1000000,0.0727285714285714},
-{3283959,3856408,3856374,0.013575,0.013575},
-{3283960,3856408,3856670,0.0881142857142857,1000000},
-{3283961,3856374,3856651,1000000,0.0974368421052632},
-{3283962,3856670,3856651,0.01404,0.01404},
-{3283963,3856670,3856737,0.0168545454545455,1000000},
-{3283964,3856737,3856798,0.0191590909090909,1000000},
-{3283965,3856651,3856704,1000000,0.0187142857142857},
-{3283966,3856704,3856758,1000000,0.0172714285714286},
-{3283967,3856737,3856704,0.014325,0.014325},
-{3283968,3856798,3856984,0.0648142857142857,1000000},
-{3283969,3856984,3857116,0.0491837837837838,1000000},
-{3283970,3856758,3856958,1000000,0.0675951219512195},
-{3283971,3856958,3857094,1000000,0.045675},
-{3283972,3856984,3856958,0.01242,0.01242},
-{3284218,3874259,3874014,0.114193548387097,1000000},
-{3284223,3861631,3861491,0.0599538461538461,0.0556714285714286},
-{3284224,3861491,3861043,0.153083720930233,0.153083720930233},
-{3284252,3901207,3900934,0.164745,0.21966},
-{3284253,3900934,3900787,0.108092307692308,0.1171},
-{3285118,3893831,3894064,0.17811,0.1979},
-{3285119,3894064,3894544,0.297425,0.297425},
-{3285128,3896761,3896984,0.103288888888889,0.103288888888889},
-{3285129,3896984,3897275,0.145822222222222,0.145822222222222},
-{3285133,3897039,3897274,0.113311111111111,0.113311111111111},
-{3285134,3897274,3897559,0.1506,0.1506},
-{3285142,3896272,3896300,1000000,1000000},
-{3285144,3896300,3896314,0.03567,0.029725},
-{3285145,3895391,3895689,0.101244,1000000},
-{3285146,3895689,3896300,0.17094,1000000},
-{3285147,3895614,3895706,1000000,0.0265102040816327},
-{3285148,3895706,3896314,1000000,0.175555102040816},
-{3285149,3895689,3895706,0.020445,0.020445},
-{3285159,3895463,3894471,0.653345454545455,1000000},
-{3285161,3894471,3894200,0.18174,1000000},
-{3285162,3894200,3894083,0.1302,1000000},
-{3285163,3894471,3894162,1000000,1.05192},
-{3285164,3894162,3894200,1000000,0.0672888888888889},
-{3285165,3894125,3894107,0.0678,1000000},
-{3285166,3894107,3894083,0.0627446808510638,1000000},
-{3285167,3894162,3894107,1000000,0.0380869565217391},
-{3285173,3890627,3891035,1000000,0.146909090909091},
-{3285174,3891035,3891332,1000000,0.131711111111111},
-{3285175,3890822,3891030,0.36192,0.36192},
-{3285176,3891035,3891030,0.28482,0.28482},
-{3285177,3891030,3890822,0.36648,0.36648},
-{3285179,3890627,3890623,0.28728,0.28728},
-{3285180,3890623,3890619,0.09702,0.09702},
-{3285181,3890623,3890619,0.64692,0.64692},
-{3285191,3890055,3890304,0.160642105263158,0.160642105263158},
-{3285192,3890304,3890300,0.239353846153846,0.239353846153846},
-{3285197,3890050,3890213,1000000,0.0586545454545454},
-{3285198,3890213,3890300,1000000,0.0348774193548387},
-{3285201,3890213,3890214,0.27348,0.27348},
-{3285202,3890214,3889987,0.27012,0.27012},
-{3285203,3889987,3889794,0.32928,0.32928},
-{3285204,3890214,3889795,0.6054,0.6054},
-{3285205,3889795,3889796,0.42324,0.42324},
-{3285206,3889794,3889795,0.00852,0.00852},
-{3285213,3889404,3889418,0.183408,0.169822222222222},
-{3285214,3889057,3889052,1000000,1000000},
-{3285215,3889052,3889047,0.258571428571429,0.2172},
-{3285218,3894042,3894057,0.0666418604651163,1000000},
-{3285219,3894057,3894077,0.0768,1000000},
-{3285305,3919450,3919612,0.0551166666666667,0.049605},
-{3285306,3919612,3919794,0.0663658536585366,0.0632790697674419},
-{3285310,3921992,3922060,0.022335,0.0229076923076923},
-{3285313,3922794,3922906,0.049815,0.06226875},
-{3285314,3922906,3923753,0.32304,0.329632653061225},
-{3285316,3896300,3896907,0.1704,1000000},
-{3285317,3896907,3897391,0.136136170212766,1000000},
-{3285341,3908171,3908188,0.00965,0.0072375},
-{3285342,3908188,3908279,0.0618631578947368,0.0405310344827586},
-{3285429,3875077,3875332,0.424848,0.416517647058824},
-{3285433,3874819,3874821,0.0403846153846154,0.0403846153846154},
-{3285522,3889082,3889058,1000000,1000000},
-{3285523,3889058,3889057,1000000,1000000},
-{3285524,3889183,3889052,0.0436285714285714,0.0349028571428571},
-{3285525,3889393,3889397,0.126553846153846,0.253107692307692},
-{3285526,3889397,3889400,0.185823529411765,0.191454545454545},
-{3285527,3889183,3889285,0.0457,0.0645176470588235},
-{3285528,3889400,3889402,0.0383272727272727,0.039525},
-{3285529,3889402,3889404,0.02660625,0.02660625},
-{3285530,3889285,3889402,0.05004,0.0735882352941176},
-{3285533,3889058,3889183,0.89028,0.89028},
-{3285534,3889397,3889285,0.88506,0.88506},
-{3285567,3887643,3887634,1000000,0.0785428571428571},
-{3285568,3887634,3887624,1000000,0.244},
-{3285569,3888230,3888228,0.09303,1000000},
-{3285570,3888228,3888225,0.09192,0.127666666666667},
-{3285571,3887634,3888228,0.2205,0.3583125},
-{3285572,3889524,3889591,0.0168,0.0164181818181818},
-{3285573,3889591,3890026,0.107882608695652,0.107882608695652},
-{3285574,3890036,3890026,1000000,1000000},
-{3285575,3889591,3890036,1000000,1000000},
-{3285578,3890435,3890383,1000000,1000000},
-{3285579,3890383,3890036,1000000,1000000},
-{3285580,3890418,3890439,1000000,1000000},
-{3285581,3890439,3890435,1000000,1000000},
-{3285589,3890864,3890865,1000000,1000000},
-{3285590,3890435,3890865,1000000,1000000},
-{3285601,3887396,3887528,1000000,0.101668965517241},
-{3285602,3888064,3887711,0.120206896551724,0.112451612903226},
-{3285603,3887711,3887528,0.0848608695652174,0.0848608695652174},
-{3285604,3887680,3887711,0.09942,0.09942},
-{3285605,3887396,3887451,0.05712,0.05712},
-{3285606,3887451,3887680,0.34986,0.34986},
-{3285607,3887680,3887451,0.33312,0.33312},
-{3285643,3902542,3902859,1000000,1000000},
-{3285644,3902859,3903139,1000000,1000000},
-{3285648,3902686,3902755,0.0663666666666667,0.09955},
-{3285649,3902493,3902755,0.3576375,0.3576375},
-{3285650,3902755,3902555,0.3081,0.32864},
-{3285651,3902555,3902493,0.0628285714285714,0.0628285714285714},
-{3285652,3902493,3902555,0.167377777777778,0.167377777777778},
-{3285659,3900685,3900080,0.54423,0.54423},
-{3285660,3900080,3899120,1000000,1000000},
-{3285661,3901902,3901839,0.0361111111111111,0.0361111111111111},
-{3285834,3887418,3887632,0.0533294117647059,0.04533},
-{3285835,3887443,3887632,0.86322,0.86322},
-{3285836,3887632,3887844,0.0507,0.0450666666666667},
-{3285837,3887844,3887955,0.0193255813953488,0.0180652173913043},
-{3285838,3887844,3887975,0.280066666666667,0.280066666666667},
-{3285839,3887955,3888032,0.0204,0.0199466666666667},
-{3285840,3887975,3888032,0.2806,0.2806},
-{3285841,3888032,3888222,0.0423574468085106,0.0462976744186047},
-{3285842,3888222,3888337,0.0239733333333333,0.0263121951219512},
-{3285843,3888222,3888364,0.290288888888889,0.290288888888889},
-{3285844,3888337,3888413,0.0187714285714286,0.0202153846153846},
-{3285845,3888413,3888751,0.111124137931034,0.10070625},
-{3285846,3888364,3888413,0.281355555555556,0.281355555555556},
-{3285847,3891566,3892266,0.415090909090909,0.434857142857143},
-{3285848,3892266,3892351,0.119888888888889,0.119888888888889},
-{3285849,3892266,3891519,0.790444444444445,0.790444444444445},
-{3285865,3891566,3891842,0.872444444444444,0.872444444444444},
-{3285866,3892997,3893253,0.108,0.108},
-{3285881,3894032,3894160,0.0834588235294118,0.0834588235294118},
-{3285882,3894160,3894265,0.0943263157894737,0.0814636363636364},
-{3285883,3894265,3894279,0.0163714285714286,0.01146},
-{3285884,3894324,3894335,0.0125142857142857,0.00947027027027027},
-{3285885,3894279,3894324,1000000,0.0404052631578947},
-{3285886,3894246,3894279,1000000,0.0171111111111111},
-{3285887,3894242,3894246,1000000,0.0177923076923077},
-{3285888,3894242,3894211,0.01478,0.017736},
-{3285889,3894242,3894324,0.0429923076923077,1000000},
-{3285892,3894160,3894123,0.0226666666666667,0.0226666666666667},
-{3285893,3894123,3894246,1000000,1000000},
-{3285895,3892017,3892039,0.00808421052631579,0.0083027027027027},
-{3285896,3892039,3892169,0.0413384615384615,0.0413384615384615},
-{3285897,3892149,3892026,0.0662086956521739,0.0662086956521739},
-{3285898,3892039,3892026,0.120694736842105,0.1092},
-{3285899,3892020,3892148,0.0617111111111111,0.0617111111111111},
-{3285900,3892026,3892020,0.0795777777777778,0.0795777777777778},
-{3285901,3891553,3891979,0.151062857142857,0.135569230769231},
-{3285902,3891979,3892017,0.0157263157894737,0.0161513513513514},
-{3285903,3891979,3891937,0.441666666666667,0.441666666666667},
-{3285906,3892020,3891992,0.279177777777778,0.279177777777778},
-{3285907,3891992,3891937,0.0558,0.0558},
-{3285908,3892189,3891982,0.1677,1000000},
-{3285909,3891992,3891982,0.0819111111111111,1000000},
-{3285910,3891982,3891928,0.0485294117647059,1000000},
-{3285911,3891928,3891797,0.0814666666666667,1000000},
-{3285912,3891937,3891928,0.0844222222222222,1000000},
-{3285916,3891739,3891769,0.0252,0.0252},
-{3285917,3891769,3891937,0.1234125,0.0940285714285714},
-{3285918,3891797,3891765,0.0233684210526316,1000000},
-{3285919,3891769,3891765,0.0914222222222222,1000000},
-{3285920,3891513,3891696,0.140325,0.118168421052632},
-{3285921,3891696,3891739,0.02097,0.0199714285714286},
-{3285922,3891765,3891691,0.0519333333333333,1000000},
-{3285923,3891691,3891645,0.0350823529411765,1000000},
-{3285924,3891696,3891691,0.0926888888888889,1000000},
-{3285925,3891645,3891626,1000000,0.132666666666667},
-{3285926,3891797,3891787,1000000,0.132533333333333},
-{3285930,3889903,3889890,0.0392785714285714,0.0392785714285714},
-{3285931,3889890,3889963,0.2634,0.2634},
-{3285932,3889862,3889903,0.0190188679245283,0.0190188679245283},
-{3285933,3889903,3890236,0.140861538461538,0.140861538461538},
-{3285939,3888786,3889036,0.0810727272727273,0.07644},
-{3285940,3889036,3889204,0.04497,0.0418325581395349},
-{3285941,3889036,3889204,0.469888888888889,0.469888888888889},
-{3285947,3888786,3888759,0.126158823529412,0.138367741935484},
-{3285948,3888759,3888751,0.04788,0.0507818181818182},
-{3285949,3888786,3888759,0.249555555555556,0.249555555555556},
-{3285954,3886605,3886834,0.0630139534883721,0.058904347826087},
-{3285955,3886834,3886887,0.0142636363636364,0.013075},
-{3285956,3886834,3886860,0.2198,1000000},
-{3285957,3886887,3886914,0.00943255813953488,0.00845},
-{3285958,3886914,3887222,0.0899384615384615,0.0779466666666667},
-{3285959,3886860,3886914,0.214111111111111,1000000},
-{3285960,3886042,3886452,0.164813793103448,0.19915},
-{3285961,3886452,3886468,0.006675,0.00684615384615385},
-{3285962,3886452,3886446,0.3838875,1000000},
-{3285963,3886468,3886512,0.012409756097561,0.0130461538461538},
-{3285964,3886512,3886605,0.0264,0.0234666666666667},
-{3285965,3886446,3886512,0.2356,1000000},
-{3285966,3886098,3886049,0.189091304347826,0.193293333333333},
-{3285967,3886049,3886042,0.0224,0.0218790697674419},
-{3285968,3887570,3887588,1000000,1000000},
-{3285969,3887588,3887607,1000000,1000000},
-{3285970,3888050,3888044,1000000,1000000},
-{3285971,3888044,3888030,1000000,1000000},
-{3285972,3888216,3888295,0.0251555555555556,0.0251555555555556},
-{3285973,3888295,3888564,0.0988888888888889,0.0988888888888889},
-{3285974,3888216,3888295,0.3206,0.3206},
-{3285975,3885620,3885995,0.572777777777778,0.572777777777778},
-{3285976,3885995,3886049,0.03348,0.020925},
-{3285977,3884780,3885022,0.0985555555555556,0.0985555555555556},
-{3285978,3885022,3885167,0.1125,0.0964285714285714},
-{3285979,3885132,3884997,0.0688105263157895,0.118854545454545},
-{3285980,3884997,3884744,0.1726125,0.197271428571429},
-{3285981,3885022,3884997,0.179466666666667,0.179466666666667},
-{3285982,3884550,3884572,0.255688888888889,0.255688888888889},
-{3285983,3884744,3884719,0.0210315789473684,0.0285428571428571},
-{3285984,3884719,3884550,0.0661777777777778,0.0661777777777778},
-{3285985,3884719,3884709,0.0706333333333333,0.115581818181818},
-{3285986,3884709,3884701,0.0766666666666667,0.0985714285714286},
-{3285987,3884709,3884701,0.194377777777778,0.194377777777778},
-{3285988,3884701,3884695,0.0605,0.0605},
-{3285989,3884695,3884689,0.0462,0.0462},
-{3285990,3884695,3884689,0.196533333333333,0.196533333333333},
-{3285991,3884689,3884681,0.0610666666666667,0.0610666666666667},
-{3285992,3884681,3884673,0.205733333333333,0.205733333333333},
-{3285993,3884673,3884681,0.0526,0.0526},
-{3285994,3884579,3884668,1000000,1000000},
-{3285995,3884668,3885078,1000000,1000000},
-{3285996,3884673,3884668,0.0617111111111111,0.0617111111111111},
-{3285997,3885167,3885263,0.0526736842105263,0.0556},
-{3285998,3885132,3885247,0.0605052631578947,0.0676235294117647},
-{3285999,3885263,3885247,0.49164,0.49164},
-{3286000,3885263,3885359,0.051,0.0655714285714286},
-{3286001,3885359,3885395,0.0237230769230769,0.0237230769230769},
-{3286002,3885247,3885342,0.0554470588235294,0.0523666666666667},
-{3286003,3885359,3885342,0.49062,0.49062},
-{3286004,3885395,3885342,0.248976,0.248976},
-{3286006,3884699,3884706,1000000,1000000},
-{3286007,3884706,3884715,0.0369555555555556,0.0369555555555556},
-{3286008,3884418,3884706,0.3225,0.3225},
-{3286009,3884699,3884868,1000000,1000000},
-{3286010,3884868,3884872,0.0379555555555555,0.0379555555555555},
-{3286011,3884706,3884868,0.15486,0.15486},
-{3286012,3884868,3885183,0.32532,0.32532},
-{3286015,3883505,3883721,0.543923076923077,0.517390243902439},
-{3286016,3883721,3884580,0.22004,0.225040909090909},
-{3286017,3883721,3882903,0.52416,0.52416},
-{3286018,3883558,3883581,0.111755555555556,0.111755555555556},
-{3286019,3883581,3883605,0.0813111111111111,0.0813111111111111},
-{3286020,3883208,3883311,0.05082,0.05082},
-{3286025,3906782,3906803,0.00785625,0.00810967741935484},
-{3286026,3906803,3906962,0.0835285714285714,0.080648275862069},
-{3286027,3906954,3906803,0.115866666666667,0.115866666666667},
-{3286028,3907258,3907122,0.0863181818181818,0.111705882352941},
-{3286029,3881737,3881859,0.112114285714286,0.120738461538462},
-{3286030,3881859,3882138,0.174371428571429,0.174371428571429},
-{3286031,3882586,3882458,1.52128235294118,1.36114736842105},
-{3286032,3882601,3882586,0.1359,0.100136842105263},
-{3286033,3882601,3882608,0.110314285714286,1000000},
-{3286034,3882138,3882321,0.0983142857142857,0.086025},
-{3286035,3882321,3882601,0.172484210526316,1000000},
-{3286036,3882608,3882321,0.257621052631579,1000000},
-{3286037,3883478,3883412,0.0377142857142857,0.0495},
-{3286038,3883411,3883478,0.0709846153846154,0.0419454545454545},
-{3286039,3883411,3883293,1000000,0.0924},
-{3286040,3882608,3882937,0.18012,0.18012},
-{3286041,3882937,3883042,1000000,0.0640421052631579},
-{3286042,3883293,3883191,1000000,0.0395307692307692},
-{3286043,3883191,3882937,1000000,0.13371},
-{3286044,3883191,3883190,0.588444444444445,0.588444444444445},
-{3286045,3881737,3881787,0.0857555555555556,0.0857555555555556},
-{3286050,3880289,3879529,0.380355555555556,0.380355555555556},
-{3286051,3879529,3879470,1000000,1000000},
-{3286052,3880226,3879470,0.380711111111111,0.380711111111111},
-{3286053,3879513,3880213,0.351977777777778,0.351977777777778},
-{3286054,3879470,3878774,0.584111111111111,0.584111111111111},
-{3286055,3878774,3879717,0.401355555555556,0.401355555555556},
-{3286056,3878774,3878767,0.107955555555556,0.107955555555556},
-{3286057,3878767,3878822,1000000,1000000},
-{3286058,3878767,3878761,0.107955555555556,0.107955555555556},
-{3286059,3878761,3879700,0.400088888888889,0.400088888888889},
-{3286060,3878761,3878777,0.0948,0.0948},
-{3286061,3878981,3879087,1000000,1000000},
-{3286062,3878183,3878376,0.387111111111111,0.387111111111111},
-{3286063,3878376,3878649,1000000,1000000},
-{3286064,3878112,3878127,0.0209333333333333,0.0209333333333333},
-{3286065,3878127,3878183,0.194717647058824,0.236442857142857},
-{3286066,3878777,3878127,0.414566666666667,0.355342857142857},
-{3286067,3878127,3877738,0.550466666666667,0.41285},
-{3286068,3883042,3883169,1000000,0.0728823529411765},
-{3286069,3883169,3883411,1000000,0.139136842105263},
-{3286070,3877738,3877087,0.779972727272727,0.490268571428571},
-{3286071,3877087,3877298,0.119328,0.0962322580645161},
-{3286072,3877298,3877997,0.48405,0.455576470588235},
-{3286073,3878469,3878537,0.061,0.0508333333333333},
-{3286074,3878537,3878606,0.0572470588235294,0.0463428571428571},
-{3286075,3878793,3878537,0.221955555555556,0.221955555555556},
-{3286076,3878793,3878680,0.0950470588235294,0.1009875},
-{3286077,3878680,3878572,0.0771555555555556,0.0771555555555556},
-{3286078,3878572,3878409,0.129911111111111,0.129911111111111},
-{3286079,3878409,3878401,0.01131,0.01131},
-{3286080,3878401,3878469,0.06692,0.0590470588235294},
-{3286081,3878908,3878809,0.06837,0.0759666666666667},
-{3286082,3878809,3878776,0.0211714285714286,0.02223},
-{3286083,3879471,3879103,0.187869230769231,0.2326},
-{3286084,3879103,3878793,0.159475,0.212633333333333},
-{3286085,3878809,3879103,0.243644444444444,0.243644444444444},
-{3286086,3879103,3879281,0.336642857142857,0.336642857142857},
-{3286087,3879281,3879271,0.0665555555555556,0.0665555555555556},
-{3286088,3879557,3879440,1000000,1000000},
-{3286089,3879440,3879281,0.0688666666666667,0.0688666666666667},
-{3286090,3879648,3879893,0.216666666666667,0.216666666666667},
-{3286091,3879893,3880180,1000000,1000000},
-{3286092,3877053,3877021,0.0125555555555556,0.0125555555555556},
-{3286093,3877021,3876942,1000000,1000000},
-{3286094,3876942,3877087,1000000,1000000},
-{3286095,3877997,3877826,0.116333333333333,0.116333333333333},
-{3286096,3877997,3878311,0.4203,0.309694736842105},
-{3286097,3878311,3878401,0.0718941176470588,0.0763875},
-{3286098,3878908,3878693,0.25884,0.25884},
-{3286099,3878693,3879413,0.345822222222222,0.345822222222222},
-{3286101,3878776,3878723,0.03591,0.03591},
-{3286102,3878723,3878606,0.0841714285714286,0.0982},
-{3286103,3878323,3877826,0.229666666666667,0.229666666666667},
-{3286104,3878723,3878323,0.7412,0.59296},
-{3286105,3878071,3877744,0.134022222222222,0.134022222222222},
-{3286106,3878323,3878071,0.25524,0.464072727272727},
-{3286107,3878071,3877735,0.324221052631579,0.324221052631579},
-{3286108,3877735,3877493,0.206222222222222,0.206222222222222},
-{3286117,3878148,3878071,0.0827333333333333,0.0827333333333333},
-{3286120,3878770,3879132,1000000,1000000},
-{3286121,3879132,3879281,0.0730888888888889,0.0730888888888889},
-{3286161,3854740,3854395,0.0984130434782609,0.105279069767442},
-{3286162,3854395,3852779,0.451302127659575,0.4419},
-{3286175,3852712,3852428,0.0667363636363636,0.0652533333333333},
-{3286176,3852428,3851657,0.25124347826087,0.25124347826087},
-{3286177,3851657,3851650,0.0906125,0.0906125},
-{3286178,3851650,3851476,0.0949787234042553,0.0875294117647059},
-{3286201,3903486,3903568,0.0718857142857143,0.0539142857142857},
-{3286207,3910681,3910729,0.0248222222222222,0.026808},
-{3286208,3910729,3910848,0.0812181818181818,0.0687230769230769},
-{3286209,3911034,3911273,0.213494117647059,0.1578},
-{3286210,3910848,3911409,0.179663414634146,1000000},
-{3286211,3911409,3911532,0.0366585365853659,1000000},
-{3286212,3911273,3911409,0.0725111111111111,0.0889909090909091},
-{3286213,3911273,3911292,0.016272,0.0226},
-{3286214,3911402,3911477,0.0256457142857143,0.030951724137931},
-{3286215,3911477,3911549,0.0322645161290323,0.0285771428571429},
-{3286216,3911292,3911309,0.0387,0.0602},
-{3286217,3911309,3911477,0.240309677419355,1000000},
-{3286218,3911549,3911587,0.0179454545454545,0.0174176470588235},
-{3286219,3911587,3911961,0.199711111111111,0.215688},
-{3286220,3911309,3911587,1000000,0.2503},
-{3286221,3911535,3911580,0.0194,0.0187071428571429},
-{3286222,3911580,3911844,0.125275862068966,0.0981891891891892},
-{3286223,3913396,3913777,0.09075,1000000},
-{3286224,3913777,3913935,0.0275678571428571,1000000},
-{3286225,3915258,3915351,0.0499818181818182,0.0499818181818182},
-{3286226,3915351,3915447,1000000,1000000},
-{3286227,3915258,3914888,0.206127272727273,0.206127272727273},
-{3286228,3914888,3914483,1000000,1000000},
-{3286229,3914388,3914141,0.132488888888889,0.132488888888889},
-{3286230,3914141,3913831,0.154244444444444,0.154244444444444},
-{3286231,3914375,3914640,0.213211764705882,0.213211764705882},
-{3286232,3914141,3914375,1000000,1000000},
-{3286233,3903761,3903812,0.0279,0.0279},
-{3286234,3903812,3904057,0.130592307692308,0.130592307692308},
-{3286235,3904057,3904147,0.0452,0.0452},
-{3286236,3903812,3904057,0.421511111111111,0.421511111111111},
-{3286237,3900120,3900224,0.0523333333333333,0.0523333333333333},
-{3286238,3900224,3900312,1000000,1000000},
-{3286239,3899778,3899808,0.0262421052631579,0.0216782608695652},
-{3286240,3899808,3899987,0.292984615384615,0.19044},
-{3286241,3903741,3904005,0.152008695652174,0.11654},
-{3286242,3904005,3904174,0.154071428571429,0.126882352941176},
-{3286243,3904001,3904233,0.0908294117647059,0.0908294117647059},
-{3286244,3904233,3904385,0.116336842105263,0.11052},
-{3286245,3904005,3904233,0.40914,1000000},
-{3286246,3905496,3905535,1000000,1000000},
-{3286247,3905535,3905738,0.143844444444444,0.143844444444444},
-{3286248,3905880,3905725,0.0891555555555555,0.0891555555555555},
-{3286249,3908616,3908824,0.06105,0.0666},
-{3286250,3908824,3908863,0.0115818181818182,0.0106166666666667},
-{3286321,3908381,3908510,0.0668,0.0825176470588235},
-{3286322,3908510,3908750,0.0997928571428571,0.107469230769231},
-{3286323,3908523,3908510,0.0510171428571429,1000000},
-{3286325,3908523,3908621,0.05301,1000000},
-{3286326,3908621,3909098,0.166466666666667,0.1362},
-{3286327,3908510,3908621,0.0740571428571429,0.0740571428571429},
-{3286356,3905423,3905446,0.010536,0.0146333333333333},
-{3286357,3905446,3905484,0.0257478260869565,0.0423},
-{3286358,3905484,3905513,0.0250571428571429,0.04385},
-{3286359,3915101,3915237,0.0500941176470588,1000000},
-{3286360,3915237,3915330,0.0290150943396226,1000000},
-{3286362,3910450,3910695,0.112539130434783,0.112539130434783},
-{3286562,3903218,3902933,0.172333333333333,0.172333333333333},
-{3286563,3903006,3902762,0.129444444444444,0.129444444444444},
-{3286564,3902771,3902525,0.127466666666667,0.127466666666667},
-{3286565,3902529,3902278,0.129733333333333,0.129733333333333},
-{3286742,3892419,3892997,1.29162,1.29162},
-{3286743,3892419,3895841,6.01659,6.01659},
-{3286766,3901590,3901756,0.2966,0.138413333333333},
-{3286770,3864417,3864041,0.122892307692308,0.11982},
-{3286771,3864041,3863851,0.0543405405405405,0.0574457142857143},
-{3286773,3864888,3864511,0.100271428571429,0.102717073170732},
-{3286775,3865374,3865343,0.0154166666666667,0.015},
-{3286776,3865343,3864888,0.1404,1000000},
-{3286777,3864888,3865343,0.14055,1000000},
-{3286789,3893825,3894091,1000000,0.152155555555556},
-{3286790,3866112,3865591,0.123083720930233,1000000},
-{3286791,3865591,3865521,0.0158727272727273,0.01746},
-{3286792,3866560,3866248,0.0644372093023256,0.0659714285714286},
-{3286793,3866248,3866112,0.0306837209302326,1000000},
-{3286798,3865591,3866099,0.125971428571429,1000000},
-{3286799,3866099,3866248,0.0311162790697674,1000000},
-{3287320,3919541,3919407,0.204,0.204},
-{3287428,3904618,3903126,0.666,0.678109090909091},
-{3288519,3904484,3904837,0.162888888888889,0.162888888888889},
-{3288520,3904837,3904923,1000000,1000000},
-{3289019,3864889,3864652,0.08142,1000000},
-{3289020,3864652,3863953,0.211342105263158,1000000},
-{3289023,3875155,3875331,0.0926,1000000},
-{3289024,3875331,3875410,0.0361227272727273,1000000},
-{3290715,3848675,3848819,0.273022222222222,0.273022222222222},
-{3290716,3848819,3848831,0.0188363636363636,0.0188363636363636},
-{3290721,3848563,3848327,0.117127272727273,0.117127272727273},
-{3290723,3848838,3848650,0.475309090909091,0.387288888888889},
-{3290724,3848650,3848563,0.209228571428571,0.209228571428571},
-{3290725,3848838,3849293,0.260955555555556,0.260955555555556},
-{3290726,3849293,3849705,0.177927272727273,0.177927272727273},
-{3290727,3851640,3849850,0.6023625,0.6023625},
-{3290728,3849850,3849782,0.0339681818181818,0.0347581395348837},
-{3290729,3849452,3849451,1000000,1000000},
-{3290730,3848362,3847896,1000000,1000000},
-{3291805,3895100,3895166,1000000,1000000},
-{3291806,3895166,3895808,1000000,1000000},
-{3291807,3898884,3898977,0.0401632653061224,0.0385882352941176},
-{3291812,3893424,3893277,0.16194,0.16194},
-{3291813,3893277,3892443,0.84375,0.84375},
-{3291814,3890171,3891792,1.13007,1.13007},
-{3291815,3891792,3891806,0.01092,0.01092},
-{3291816,3891806,3889773,1.99464,1.99464},
-{3291817,3889773,3888287,0.91194,0.91194},
-{3291818,3889973,3890093,0.08145,0.08145},
-{3291819,3890093,3891213,0.78906,0.78906},
-{3291820,3889973,3889884,0.10644,0.10644},
-{3291821,3888476,3887886,0.314690909090909,0.314690909090909},
-{3291822,3887886,3887057,0.550688888888889,0.550688888888889},
-{3291823,3888953,3888646,0.156,0.156},
-{3291824,3888646,3887605,0.680222222222222,0.680222222222222},
-{3291825,3888021,3887151,0.466981818181818,0.466981818181818},
-{3291826,3887151,3886732,0.458028571428571,0.458028571428571},
-{3291827,3886537,3885063,1.46361,1.46361},
-{3291828,3885063,3884961,0.09129,0.09129},
-{3291829,3885404,3884632,0.48552,0.48552},
-{3291830,3879963,3881318,1.62582,1.62582},
-{3291831,3881318,3881614,0.31503,0.31503},
-{3291832,3880606,3881940,0.79782,0.79782},
-{3291833,3878844,3879705,0.377377777777778,0.377377777777778},
-{3291834,3879705,3880664,0.431763636363636,0.431763636363636},
-{3291846,3868565,3866110,0.8654,0.8654},
-{3291847,3874356,3868613,2.75465454545455,2.75465454545455},
-{3291848,3868613,3868565,0.0272666666666667,0.0272666666666667},
-{3291849,3875732,3875384,0.146955555555556,0.146955555555556},
-{3291850,3875384,3874356,0.412436363636364,0.412436363636364},
-{3291851,3876213,3875963,0.113955555555556,0.113955555555556},
-{3291852,3875963,3874945,0.4116,0.4116},
-{3291853,3877246,3877031,0.0927333333333333,0.0927333333333333},
-{3291854,3877031,3875889,0.409690909090909,0.409690909090909},
-{3292519,3872708,3873526,1000000,0.169356},
-{3292520,3872711,3873536,0.1772875,1000000},
-{3292521,3872716,3872848,0.309432,0.38679},
-{3292522,3872848,3872657,0.168925,0.176269565217391},
-{3292540,3873935,3874311,1000000,0.107473170731707},
-{3292541,3869912,3869859,0.0148263157894737,1000000},
-{3292542,3869859,3869842,0.00784615384615384,1000000},
-{3292543,3867784,3867783,1000000,0.0251076923076923},
-{3292544,3867141,3866976,1000000,0.0750923076923077},
-{3292545,3866741,3866619,1000000,0.0505395348837209},
-{3292546,3865076,3865036,0.0082054054054054,1000000},
-{3292547,3865036,3864753,0.07965,1000000},
-{3292548,3860327,3860229,0.021816,0.0404},
-{3292549,3858773,3858784,1000000,0.01652},
-{3292550,3858784,3859259,1000000,0.286121739130435},
-{3292551,3855710,3855684,0.00996279069767442,0.0104487804878049},
-{3292557,3916068,3916123,0.0486,0.0897230769230769},
-{3292558,3916123,3916555,0.279127659574468,0.291533333333333},
-{3292559,3913522,3913572,0.02568,0.02568},
-{3292560,3913572,3914836,0.468092307692308,0.521588571428571},
-{3292561,3915764,3916187,1000000,0.0963405405405405},
-{3292562,3915797,3916195,0.089152,1000000},
-{3292566,3907702,3907789,0.0411391304347826,1000000},
-{3292567,3907789,3907875,0.066768,0.066768},
-{3292568,3904108,3904176,0.03328,0.039936},
-{3292569,3904176,3904920,0.640966666666667,0.427311111111111},
-{3292570,3901770,3901788,0.0170129032258064,0.0181862068965517},
-{3292571,3901788,3901808,0.0204685714285714,0.0265333333333333},
-{3292572,3922677,3922767,0.0581586206896552,0.0544064516129032},
-{3292573,3922767,3922794,0.01835,0.0227793103448276},
-{3292574,3919402,3919477,0.0287142857142857,0.025125},
-{3292577,3902229,3902546,1000000,0.217772727272727},
-{3292578,3902546,3902640,1000000,0.0273391304347826},
-{3292579,3915173,3915212,0.053856,0.08976},
-{3292580,3915212,3915309,0.1198,0.163363636363636},
-{3292581,3917655,3917688,0.0268875,0.0220615384615385},
-{3292582,3917688,3917708,0.0138171428571429,0.0124},
-{3292583,3917789,3917727,0.048725,1000000},
-{3292584,3917727,3917708,0.0195,1000000},
-{3292585,3918265,3917996,0.162514285714286,0.162514285714286},
-{3292586,3917996,3917936,0.0459913043478261,0.0364758620689655},
-{3292587,3920794,3921287,0.0989809523809524,0.0989809523809524},
-{3292588,3921287,3921416,0.0278065573770492,0.0269238095238095},
-{3292623,3912088,3910563,0.5257875,0.5257875},
-{3292624,3895871,3895912,0.0564,0.0564},
-{3292625,3896422,3896402,0.01119,0.01119},
-{3292626,3896402,3895871,0.41877,0.41877},
-{3292627,3892958,3892986,0.00589615384615385,0.00589615384615385},
-{3292628,3892260,3892392,0.0281207547169811,0.0292235294117647},
-{3292629,3892392,3892691,0.0721132075471698,0.0749411764705882},
-{3292630,3891842,3892402,0.54588,0.54588},
-{3292631,3892402,3892419,0.0426,0.0426},
-{3292632,3891842,3892560,0.53343,0.53343},
-{3292633,3892560,3892577,0.02721,0.02721},
-{3292634,3902771,3902827,0.0331894736842105,0.03153},
-{3292635,3903218,3903275,0.030704347826087,0.0371684210526316},
-{3292636,3903444,3903485,1000000,0.0470117647058824},
-{3292637,3903713,3903762,0.02144,0.0292363636363636},
-{3292638,3899134,3897713,1000000,1000000},
-{3292639,3897713,3897628,1000000,1000000},
-{3292640,3896604,3897434,1000000,1000000},
-{3292641,3895912,3896034,0.17292,0.17292},
-{3292642,3896034,3896711,0.89682,0.89682},
-{3292643,3899786,3899650,0.0950444444444444,0.0950444444444444},
-{3292644,3901531,3901608,0.0283714285714286,1000000},
-{3292645,3901608,3901911,0.109105714285714,1000000},
-{3292646,3897604,3897471,0.0882888888888889,0.0882888888888889},
-{3292647,3895731,3895717,0.00830232558139535,1000000},
-{3292648,3895445,3895640,0.46181052631579,0.46181052631579},
-{3292649,3895640,3895632,0.0193058823529412,0.0105870967741935},
-{3292650,3895384,3895380,0.114914285714286,0.114914285714286},
-{3292651,3895380,3895445,0.1193,0.1193},
-{3292652,3895244,3895275,0.0236666666666667,1000000},
-{3292653,3895275,3895330,0.0463333333333333,1000000},
-{3292654,3894167,3894235,0.107882352941176,0.0965263157894737},
-{3292655,3894235,3894262,0.043604347826087,0.0385730769230769},
-{3292656,3894534,3894477,0.0142188679245283,0.0147764705882353},
-{3292657,3894476,3894559,0.0345818181818182,0.03804},
-{3292658,3894559,3894607,0.022448275862069,0.02325},
-{3292659,3894751,3894737,0.00745454545454545,0.00745454545454545},
-{3292660,3894737,3894430,0.183933333333333,0.183933333333333},
-{3292661,3895423,3896281,0.402886956521739,0.3861},
-{3292702,3874249,3874238,1000000,1000000},
-{3292703,3873609,3873827,0.113689285714286,0.113689285714286},
-{3292704,3873827,3875169,0.651377777777778,0.651377777777778},
-{3292705,3875313,3875723,0.155296153846154,0.149544444444444},
-{3292706,3875723,3875837,0.0355894736842105,0.0349758620689655},
-{3292707,3875777,3875672,0.0344816326530612,1000000},
-{3292708,3875672,3875138,0.258411428571429,1000000},
-{3292709,3875615,3875633,0.00861333333333333,1000000},
-{3292710,3875633,3875891,0.09596,1000000},
-{3292711,3875558,3875519,0.00978571428571428,1000000},
-{3292712,3875519,3875444,0.0211384615384615,1000000},
-{3292713,3875444,3875383,0.0196263157894737,1000000},
-{3292714,3875383,3875366,0.00611351351351351,1000000},
-{3292715,3875366,3875102,0.117476923076923,1000000},
-{3292716,3875208,3875471,0.0834954545454546,1000000},
-{3292717,3875155,3875208,0.0155714285714286,1000000},
-{3292718,3875155,3874896,1000000,0.0841578947368421},
-{3292719,3874896,3874818,1000000,0.0223170731707317},
-{3292720,3874905,3874705,0.17685,1000000},
-{3292721,3874705,3874461,0.123771428571429,1000000},
-{3292722,3874723,3874534,0.132727272727273,1000000},
-{3292723,3874534,3874461,0.0273483870967742,1000000},
-{3292724,3873408,3873443,0.0220947368421053,0.0224892857142857},
-{3292725,3873443,3873609,0.0926947368421053,0.09435},
-{3292726,3878020,3878181,0.0826285714285714,1000000},
-{3292727,3877905,3877873,0.012325,1000000},
-{3292728,3877533,3877767,0.0462763636363636,0.0446526315789474},
-{3292729,3877283,3877358,1000000,0.06115},
-{3292730,3877358,3877740,1000000,0.39354},
-{3292731,3877283,3877231,1000000,0.1066},
-{3292732,3877231,3877200,1000000,0.050448},
-{3292733,3876915,3876033,0.51656,0.6457},
-{3292734,3876033,3875734,0.242031818181818,0.266235},
-{3292735,3875734,3875706,0.014780487804878,0.014780487804878},
-{3292736,3875706,3875665,0.0594,0.101329411764706},
-{3292737,3875665,3875729,0.12945,0.1726},
-{3292738,3875549,3875545,0.00558571428571429,0.00521333333333333},
-{3292739,3875545,3875706,0.166771428571429,0.155653333333333},
-{3292740,3875539,3875431,0.0494129032258065,1000000},
-{3292741,3875431,3875412,0.0102,1000000},
-{3292742,3875307,3875380,0.0605853658536585,0.0577674418604651},
-{3292743,3875114,3875307,0.215133333333333,0.21045652173913},
-{3292744,3874913,3875114,0.2474,0.2474},
-{3292745,3874890,3874929,0.311481818181818,0.207654545454545},
-{3292746,3874929,3874913,0.0169333333333333,0.00635},
-{3292747,3874913,3874845,0.123911111111111,0.126249056603774},
-{3292748,3874845,3874819,0.123509433962264,0.123509433962264},
-{3292749,3865500,3865444,1000000,0.0219454545454545},
-{3292750,3869286,3869147,0.0331116279069767,1000000},
-{3292751,3869147,3869108,0.00895909090909091,1000000},
-{3292752,3871062,3871007,0.0151783783783784,1000000},
-{3292753,3868261,3868166,0.0221466666666667,1000000},
-{3292754,3868166,3868107,0.0111521739130435,1000000},
-{3292755,3868107,3868047,0.010395652173913,1000000},
-{3292756,3866226,3866108,0.0355928571428571,0.0369111111111111},
-{3292757,3865143,3865079,1000000,0.380329411764706},
-{3292758,3865143,3865069,1000000,0.0281117647058823},
-{3292759,3865056,3865161,0.0344909090909091,1000000},
-{3292760,3865427,3865401,1000000,0.010032},
-{3292761,3865648,3865507,0.123128571428571,0.0594413793103448},
-{3292762,3865648,3865583,0.15152,1000000},
-{3292763,3873598,3873643,0.0694714285714286,0.0784354838709677},
-{3292764,3873643,3873657,0.02125,0.0228358208955224},
-{3292765,3873458,3873598,0.122269565217391,0.129793846153846},
-{3292766,3873390,3873402,1000000,0.0226628571428571},
-{3292767,3873402,3873411,1000000,0.0510857142857143},
-{3292768,3873594,3873339,0.144775384615385,1000000},
-{3292769,3873339,3873305,0.0550909090909091,1000000},
-{3292770,3872370,3872562,0.25104,1000000},
-{3292771,3872321,3872523,1000000,0.26724},
-{3292772,3872103,3872321,0.501324324324324,0.529971428571429},
-{3292773,3871670,3871404,0.1094,0.100469387755102},
-{3292774,3871248,3871280,1000000,0.101963636363636},
-{3292775,3869882,3870272,0.155361290322581,0.155361290322581},
-{3292776,3869857,3869882,0.0989333333333333,0.0989333333333333},
-{3292777,3869822,3869524,0.17144,0.17144},
-{3292778,3869524,3869422,0.05336,0.05336},
-{3292779,3868993,3869031,0.0492571428571429,0.0492571428571429},
-{3292780,3869031,3869422,0.323627586206897,0.323627586206897},
-{3292781,3849860,3850324,0.147907692307692,0.140692682926829},
-{3292782,3850273,3849626,0.323088,0.323088},
-{3292783,3849886,3850185,0.137022222222222,0.137022222222222},
-{3292784,3850176,3850097,0.1474125,0.15724},
-{3292785,3850097,3849886,0.200244444444444,0.216264},
-{3292786,3850176,3850035,0.0632181818181818,0.0632181818181818},
-{3292787,3850176,3850010,0.171485714285714,0.171485714285714},
-{3292794,3866384,3866738,0.150822222222222,0.150822222222222},
-{3292795,3868093,3867959,0.118593103448276,0.118593103448276},
-{3292796,3871306,3871319,0.004452,0.00473617021276596},
-{3292797,3873371,3873510,1000000,0.174697959183673},
-{3292798,3873510,3873522,1000000,0.0393829787234043},
-{3292799,3873522,3873396,1000000,0.0951473684210526},
-{3292800,3873522,3873485,1000000,0.0571565217391304},
-{3292801,3873541,3873369,0.0776,0.0886857142857143},
-{3292802,3873369,3872607,0.278258823529412,0.286690909090909},
-{3292803,3873541,3873341,0.0927058823529412,0.0909230769230769},
-{3292804,3873341,3872353,0.283524,0.277964705882353},
-{3292864,3858439,3858522,0.0355454545454545,0.0355454545454545},
-{3292865,3858906,3860427,0.810666666666667,0.810666666666667},
-{3292866,3856967,3856545,0.0685107692307692,0.0654882352941176},
-{3292867,3856545,3854813,0.286627272727273,0.278197058823529},
-{3292868,3857568,3858011,0.167515384615385,0.106229268292683},
-{3292882,3896090,3896072,1000000,0.0239142857142857},
-{3292883,3896207,3896289,1000000,0.05601},
-{3292884,3899115,3899102,1000000,1000000},
-{3292885,3899859,3899901,0.0474,0.0778714285714286},
-{3292886,3900387,3900382,1000000,0.0516782608695652},
-{3292887,3900536,3900455,0.17085,0.0471310344827586},
-{3292888,3900780,3900680,0.0671052631578948,1000000},
-{3292889,3900680,3900565,0.07089,1000000},
-{3292890,3900846,3900819,1000000,0.0392769230769231},
-{3292891,3900819,3900831,1000000,0.04708},
-{3292892,3900780,3900742,1000000,0.0152428571428571},
-{3292893,3900742,3900670,1000000,0.0301421052631579},
-{3292894,3905019,3905392,1000000,1000000},
-{3292895,3901613,3901755,0.064975,1000000},
-{3292896,3901755,3901808,0.02592,1000000},
-{3292897,3896053,3896003,1000000,0.027528},
-{3292898,3896522,3896578,0.0274333333333333,1000000},
-{3292899,3896866,3896841,0.0114857142857143,0.0104869565217391},
-{3292900,3897371,3897337,1000000,1000000},
-{3292901,3898090,3898119,0.00795483870967742,0.010275},
-{3292902,3898182,3898185,1000000,0.014904},
-{3292903,3900114,3900173,0.0261818181818182,0.0261818181818182},
-{3292904,3900114,3900124,1000000,0.0981058823529412},
-{3292905,3900082,3900135,0.0296625,0.01582},
-{3292906,3899628,3899818,0.0641090909090909,0.07052},
-{3292907,3899748,3899518,0.09236,1000000},
-{3292908,3899629,3899677,0.0168,1000000},
-{3292909,3902618,3902719,0.04488,1000000},
-{3292914,3897670,3897794,0.0304173913043478,1000000},
-{3292915,3897520,3897568,0.0535714285714286,1000000},
-{3292916,3897394,3897421,0.0633,1000000},
-{3292917,3897219,3897231,0.11244,1000000},
-{3292918,3898437,3898468,0.00848333333333333,0.00783076923076923},
-{3292919,3898468,3898771,0.08376,0.0779162790697674},
-{3292920,3897499,3897709,0.125816326530612,0.125816326530612},
-{3292921,3897709,3898437,0.303286363636364,0.296546666666667},
-{3292922,3895323,3895517,0.507085714285714,0.5916},
-{3292923,3895517,3895650,0.107866666666667,0.107866666666667},
-{3292924,3896146,3896145,0.035575,0.0449368421052632},
-{3292925,3896247,3896333,0.17286,1000000},
-{3292926,3896333,3897259,1.1193,1000000},
-{3292927,3897382,3897552,0.1515,1000000},
-{3292970,3866493,3866382,0.09384,0.09384},
-{3292971,3866382,3866254,0.081,0.0964285714285714},
-{3292972,3866254,3866240,0.0132666666666667,0.0140470588235294},
-{3292973,3866240,3866051,0.164571428571429,0.1728},
-{3292974,3900038,3899953,0.0376222222222222,0.0376222222222222},
-{3292975,3899953,3899914,0.0103454545454545,0.0103454545454545},
-{3292976,3886116,3886113,1000000,0.00382153846153846},
-{3292977,3886113,3886072,1000000,0.0335538461538462},
-{3292978,3886050,3886038,0.00407272727272727,1000000},
-{3292979,3886038,3885972,0.0340567164179104,1000000},
-{3292980,3898879,3898936,1000000,1000000},
-{3292981,3898936,3898977,1000000,1000000},
-{3292982,3899077,3899233,0.09207,0.09207},
-{3292983,3899233,3899364,0.1229,0.1229},
-{3292984,3899364,3899489,0.134470588235294,0.122464285714286},
-{3292985,3899489,3899493,0.0384823529411765,0.0344315789473684},
-{3292986,3877353,3877181,0.0774888888888889,0.0774888888888889},
-{3292987,3877181,3875889,0.924654545454546,0.924654545454546},
-{3292988,3877315,3877080,0.0939555555555556,0.110295652173913},
-{3292989,3877080,3876982,0.0340645161290323,0.0391111111111111},
-{3292990,3886002,3886016,0.00971818181818182,1000000},
-{3292991,3886016,3886072,0.0311181818181818,1000000},
-{3292992,3898364,3897654,0.4998,0.4998},
-{3292993,3897654,3897567,0.06051,0.06051},
-{3292994,3899062,3898842,0.12627,0.12627},
-{3292995,3899428,3899062,0.36174,0.36174},
-{3292996,3899535,3899428,0.0800222222222222,0.0800222222222222},
-{3292997,3898364,3899746,1000000,1000000},
-{3292998,3899746,3899535,0.0999777777777778,0.0999777777777778},
-{3292999,3876193,3876199,0.0653272727272727,0.0653272727272727},
-{3293000,3876199,3876195,0.12735,0.12735},
-{3293001,3879740,3879760,0.0139153846153846,1000000},
-{3293002,3879760,3879799,0.0221076923076923,1000000},
-{3293003,3879718,3879738,1000000,0.00926842105263158},
-{3293004,3879738,3879771,1000000,0.0187945945945946},
-{3293005,3879392,3879276,0.0908210526315789,0.0663692307692308},
-{3293006,3875077,3875225,0.21448,0.2681},
-{3293007,3875225,3875266,0.0429230769230769,0.0265714285714286},
-{3293008,3875334,3875379,0.101471428571429,0.0947066666666667},
-{3293009,3875379,3875393,0.0358857142857143,0.0342545454545455},
-{3293010,3875560,3875522,0.026475,0.00814615384615384},
-{3293011,3875522,3875481,0.0290625,0.0103333333333333},
-{3293012,3875560,3875632,0.15844,1000000},
-{3293013,3875632,3875623,0.00703636363636364,1000000},
-{3293014,3879379,3879417,0.0184285714285714,1000000},
-{3293015,3879403,3879379,1000000,0.0215454545454545},
-{3293016,3879326,3879379,0.0204,1000000},
-{3293017,3879855,3879829,1000000,0.0313714285714286},
-{3293018,3880679,3881106,0.25245,1000000},
-{3293019,3881628,3881611,0.178971428571429,1000000},
-{3293020,3881412,3881451,1000000,0.020328},
-{3293021,3879295,3879346,1000000,0.0330666666666667},
-{3293022,3879171,3879010,0.106324137931034,1000000},
-{3293023,3880781,3880590,1000000,0.226730769230769},
-{3293024,3880590,3880570,1000000,0.01724},
-{3293025,3879018,3879559,1000000,1000000},
-{3293026,3879559,3879583,1000000,0.0343},
-{3293027,3863045,3863058,0.0475304347826087,0.0341625},
-{3293028,3863087,3861496,0.807422222222222,0.807422222222222},
-{3293029,3861496,3859438,0.855454545454545,0.855454545454545},
-{3293030,3859438,3859520,0.128576470588235,0.156128571428571},
-{3293031,3859520,3859690,0.31416,0.31416},
-{3293032,3859477,3859417,0.0200776119402985,0.0200776119402985},
-{3293033,3859417,3859408,0.00375223880597015,0.00375223880597015},
-{3293034,3859191,3858507,0.676381818181818,0.676381818181818},
-{3293035,3858507,3858717,0.128133333333333,0.128133333333333},
-{3293036,3858348,3858314,1000000,0.00435652173913043},
-{3293037,3858314,3854600,1000000,0.430774468085106},
-{3293038,3858172,3858080,0.0117954545454545,1000000},
-{3293039,3858080,3854609,0.404806451612903,1000000},
-{3293040,3857511,3857480,0.00869333333333333,0.00931428571428571},
-{3293041,3857480,3857330,0.0387702127659574,0.0404933333333333},
-{3293042,3856793,3856839,0.024624,0.024624},
-{3293043,3855913,3856649,0.39246,0.39246},
-{3293044,3855348,3855659,0.25464,0.25464},
-{3293045,3855659,3855913,0.1314,0.1314},
-{3293046,3854795,3854896,0.0318489795918367,0.031212},
-{3293047,3854896,3855579,0.196035294117647,0.199956},
-{3293048,3854795,3854812,0.0131636363636364,0.0188869565217391},
-{3293049,3854812,3854551,0.474518181818182,0.497114285714286},
-{3293050,3853675,3853904,0.511263157894737,0.539666666666667},
-{3293051,3853904,3853879,0.0341647058823529,0.0200275862068966},
-{3293052,3853235,3853638,0.18264,0.169111111111111},
-{3293053,3853638,3853879,0.0985043478260869,0.0924734693877551},
-{3293054,3851549,3852836,0.840023076923077,1.09203},
-{3293055,3850207,3850404,0.447917647058824,0.400768421052632},
-{3293056,3850404,3849705,1.1376,1.1376},
-{3293057,3849555,3849242,0.178866666666667,0.146345454545455},
-{3293058,3849242,3849212,0.0149454545454545,0.0133297297297297},
-{3293059,3878430,3878480,0.0935357142857143,1000000},
-{3293060,3878480,3878307,0.12752,1000000},
-{3293061,3878618,3878561,1000000,0.03673125},
-{3293062,3878797,3878733,0.0285111111111111,0.0334695652173913},
-{3293063,3878733,3878722,0.005856,0.00665454545454545},
-{3293064,3879616,3879886,1000000,0.127213333333333},
-{3293065,3879886,3880055,1000000,0.0883363636363636},
-{3293066,3880030,3880239,0.169977777777778,1000000},
-{3293067,3880239,3880206,0.0458608695652174,1000000},
-{3293068,3880030,3880498,0.206533333333333,0.189673469387755},
-{3293069,3880498,3880704,0.158689655172414,0.121105263157895},
-{3293070,3881078,3880798,0.143237837837838,0.108159183673469},
-{3293071,3880798,3880704,0.0753777777777778,0.0484571428571429},
-{3293072,3881082,3881178,0.0458341463414634,0.0536914285714286},
-{3293073,3881178,3881291,0.0536590909090909,0.0575853658536585},
-{3293074,3881111,3881268,1000000,0.0398571428571429},
-{3293075,3881268,3881291,1000000,0.0052448275862069},
-{3293076,3881139,3881295,0.0424551724137931,1000000},
-{3293077,3881295,3881329,0.0067551724137931,1000000},
-{3293078,3881491,3881494,0.04843125,1000000},
-{3293079,3881494,3881480,0.0302,1000000},
-{3293080,3881589,3881533,0.04784,0.04485},
-{3293081,3881533,3881480,0.0260347826086957,0.037425},
-{3293082,3881480,3881550,0.0301909090909091,1000000},
-{3293083,3881550,3881633,0.04146,1000000},
-{3293084,3881949,3881920,0.01893,0.02524},
-{3293085,3882493,3882529,1000000,1000000},
-{3293086,3882657,3882597,0.11594693877551,1000000},
-{3293087,3882597,3882541,0.04586,1000000},
-{3293088,3882712,3882693,0.02428,1000000},
-{3293089,3882693,3882657,0.0562285714285714,1000000},
-{3293090,3882636,3882712,0.0305769230769231,1000000},
-{3293091,3882724,3882656,0.05145,1000000},
-{3293092,3882522,3882654,1000000,0.0554153846153846},
-{3293093,3882652,3882548,1000000,0.03375},
-{3293094,3882548,3882631,1000000,1000000},
-{3293095,3882631,3882629,1000000,1000000},
-{3293096,3882629,3882602,1000000,1000000},
-{3293097,3849705,3850080,0.501163636363636,0.501163636363636},
-{3293098,3850080,3850119,0.260933333333333,0.260933333333333},
-{3293099,3850119,3850164,0.270363636363636,0.270363636363636},
-{3293100,3849313,3849305,0.02205,0.0363176470588235},
-{3293101,3849305,3848838,0.736605405405405,0.736605405405405},
-{3293102,3849313,3849247,0.0149660377358491,0.0149660377358491},
-{3293103,3849247,3849037,0.0551,0.0561396226415094},
-{3293104,3848851,3849042,0.106022222222222,0.106022222222222},
-{3293105,3849042,3849861,0.334163636363636,0.334163636363636},
-{3293106,3848910,3849105,1000000,1000000},
-{3293107,3849105,3850182,1000000,1000000},
-{3293108,3850182,3849578,0.543363636363636,0.543363636363636},
-{3293109,3849578,3849147,0.2154,0.2154},
-{3293110,3850696,3850043,0.0957438202247191,1000000},
-{3293111,3850043,3849499,0.07976,1000000},
-{3293112,3850854,3850168,1000000,0.0881755102040816},
-{3293113,3850168,3849512,1000000,0.0920273684210526},
-{3293114,3857991,3858327,0.108323076923077,0.084492},
-{3293115,3858060,3857977,1000000,0.0206571428571429},
-{3293116,3857977,3857587,1000000,0.0802723404255319},
-{3293117,3857812,3857976,0.0330679245283019,0.0257735294117647},
-{3293118,3857976,3858034,0.0123,0.00976764705882353},
-{3293119,3858611,3858302,0.114272727272727,1000000},
-{3293120,3858302,3858180,0.0261807692307692,1000000},
-{3293121,3858180,3857973,0.0431892857142857,1000000},
-{3293122,3857973,3857812,0.0362947368421053,1000000},
-{3293123,3858611,3858572,0.0530322580645161,0.051375},
-{3293124,3858572,3858558,0.0161806451612903,0.0159238095238095},
-{3293125,3858888,3859189,1000000,0.0591807692307692},
-{3293126,3859189,3859469,1000000,0.0581571428571429},
-{3293127,3858903,3859776,0.285672727272727,0.285672727272727},
-{3293128,3859776,3859940,0.0720888888888889,0.0720888888888889},
-{3293129,3859091,3859910,0.3434,0.3434},
-{3293130,3859910,3859940,0.0165333333333333,0.0165333333333333},
-{3293131,3860696,3861255,0.2564,0.2564},
-{3293132,3861255,3861601,0.151836363636364,0.151836363636364},
-{3293133,3860696,3861776,0.517133333333333,0.517133333333333},
-{3293134,3861776,3861900,0.0549818181818182,0.0549818181818182},
-{3293135,3861378,3861953,1000000,0.126140625},
-{3293136,3862066,3862042,1000000,0.00643636363636364},
-{3293137,3862042,3861991,1000000,0.0144214285714286},
-{3293138,3862288,3862284,0.0144206896551724,0.0134903225806452},
-{3293139,3862284,3862280,0.0248625,0.0241090909090909},
-{3293142,3883089,3883430,0.0713678571428571,1000000},
-{3293143,3883044,3883361,1000000,0.0665389830508474},
-{3293144,3864183,3864211,0.0595125,0.0453428571428571},
-{3293145,3864211,3864222,0.009,0.009},
-{3293146,3849628,3849526,1000000,1000000},
-{3293147,3849526,3849505,1000000,1000000},
-{3293148,3852316,3852304,0.0138666666666667,0.0138666666666667},
-{3293149,3852304,3851741,0.614263636363636,0.643514285714286},
-{3293150,3853628,3852737,0.512422222222222,0.628881818181818},
-{3293151,3852737,3852728,0.004525,0.00638823529411765},
-{3293152,3854250,3854134,0.167576470588235,0.167576470588235},
-{3293153,3854870,3854543,0.194379310344828,0.28185},
-{3293154,3855397,3855247,0.0929111111111111,0.0929111111111111},
-{3293155,3861596,3861603,0.00920869565217391,0.01412},
-{3293156,3861603,3861723,0.118281818181818,0.17348},
-{3293161,3892857,3892128,0.462225,1000000},
-{3293162,3892128,3892117,0.0128,1000000},
-{3293163,3893982,3894313,1000000,1000000},
-{3293164,3893249,3893329,0.1431,0.1431},
-{3293165,3893249,3893222,1000000,1000000},
-{3293166,3892592,3892823,0.0774181818181818,0.0774181818181818},
-{3293167,3892823,3893249,0.55285,0.510323076923077},
-{3293168,3891457,3891611,1000000,1000000},
-{3293171,3890771,3890844,0.227025,0.12108},
-{3293172,3890612,3890844,0.209446153846154,1000000},
-{3293173,3890112,3890283,0.112566666666667,1000000},
-{3293174,3890283,3890612,0.295476923076923,1000000},
-{3293175,3889316,3888950,0.15214,0.147232258064516},
-{3293176,3888950,3888915,0.0136153846153846,0.01416},
-{3293177,3888988,3889455,0.371366666666667,0.33423},
-{3293178,3889455,3889561,0.129642857142857,0.129642857142857},
-{3293179,3888972,3889664,1000000,0.303495},
-{3293180,3888972,3888893,0.0406571428571429,0.0449368421052632},
-{3293181,3888320,3888521,1000000,0.060195652173913},
-{3293188,3891710,3892318,0.154848,1000000},
-{3293189,3889167,3889132,1000000,0.0169894736842105},
-{3293190,3889132,3889066,1000000,0.0277542857142857},
-{3293191,3889462,3889443,0.008856,1000000},
-{3293192,3889443,3888909,0.286555555555556,1000000},
-{3293193,3883989,3883954,0.0193272727272727,0.0193272727272727},
-{3293194,3883954,3883686,0.178333333333333,0.178333333333333},
-{3293195,3881362,3880930,0.360325,1000000},
-{3293196,3880766,3880944,0.0824108108108108,0.160484210526316},
-{3293197,3880667,3880800,0.0632,1000000},
-{3293275,3893705,3893723,0.0131837837837838,1000000},
-{3293276,3894585,3894802,1000000,0.05469375},
-{3293277,3895892,3895875,1000000,0.0656},
-{3293278,3895892,3895986,1000000,0.0469666666666667},
-{3293279,3892586,3892942,0.139176,1000000},
-{3293280,3892942,3892959,0.0121333333333333,1000000},
-{3293281,3892959,3892953,0.00984,0.00984},
-{3293282,3892953,3892875,0.0654521739130435,0.07527},
-{3293283,3894830,3894835,1000000,1000000},
-{3293357,3883941,3884899,0.143492957746479,1000000},
-{3293358,3884899,3885302,0.0588608695652174,1000000},
-{3293359,3883947,3884913,1000000,0.149713043478261},
-{3293360,3884913,3885290,1000000,0.0549739130434783},
-{3293361,3901585,3901643,1000000,0.0236914285714286},
-{3293362,3901643,3901943,1000000,0.108855882352941},
-{3293363,3913336,3914556,0.85332,0.85332},
-{3293364,3914556,3914574,0.01272,0.01272},
-{3293365,3913478,3914063,0.23175,0.218117647058824},
-{3293366,3914063,3914082,0.0140117647058824,0.00882222222222222},
-{3293367,3912896,3913416,0.271977777777778,0.22948125},
-{3293368,3913416,3913440,0.02432,0.0110545454545455},
-{3293369,3911799,3912300,0.19607027027027,0.186015384615385},
-{3293370,3912300,3912334,0.0241428571428571,0.0144857142857143},
-{3293371,3909648,3910535,0.6268,0.65814},
-{3293372,3906538,3906590,0.02322,0.02322},
-{3293373,3906590,3906752,0.05528,0.05528},
-{3293374,3906752,3907156,0.230842105263158,0.230842105263158},
-{3293375,3910724,3913000,0.330286567164179,0.325429411764706},
-{3293376,3907041,3907251,0.23928,0.23928},
-{3293377,3906009,3906278,0.1946,0.1946},
-{3293378,3906278,3906335,0.0395111111111111,0.0395111111111111},
-{3293379,3906335,3906355,0.0584222222222222,0.0584222222222222},
-{3293380,3907251,3907220,0.78063,0.78063},
-{3293381,3907220,3907149,0.05064,0.05064},
-{3293382,3907190,3907336,0.0978444444444444,0.0978444444444444},
-{3293383,3907336,3907394,0.0896545454545454,0.0896545454545454},
-{3293384,3907394,3907183,0.0919818181818182,0.0919818181818182},
-{3293385,3907183,3906690,0.172888888888889,0.172888888888889},
-{3293386,3905968,3905876,0.0399777777777778,0.0399777777777778},
-{3331546,3879171,3879185,1000000,0.0143769230769231},
-{3331547,3879185,3879217,1000000,0.0194666666666667},
-{3331548,3879299,3879174,1000000,0.0507454545454545},
-{3331771,3898987,3899228,0.153381818181818,0.16872},
-{3331772,3899323,3899506,0.100577777777778,0.0798705882352941},
-{3331773,3899506,3899670,0.095575,0.0849555555555556},
-{3331774,3899506,3899617,0.240288888888889,0.240288888888889},
-{3331775,3904818,3904311,0.331513043478261,0.346581818181818},
-{3331776,3904311,3904022,0.147921428571429,0.165672},
-{3331777,3903928,3904311,0.2483625,1000000},
-{3331962,3881680,3881661,0.0151,1000000},
-{3331963,3881661,3881237,0.431325,1000000},
-{3331966,3850772,3851044,0.28254,0.269085714285714},
-{3331967,3851706,3851874,0.144312,0.144312},
-{3331968,3851874,3852372,0.316872727272727,0.360579310344828},
-{3331969,3852766,3852868,0.0742,0.0933483870967742},
-{3331970,3852766,3851906,0.266127272727273,0.266127272727273},
-{3331971,3851044,3851454,0.216644444444444,0.216644444444444},
-{3331972,3851454,3851874,0.209622222222222,0.209622222222222},
-{3331973,3852372,3852547,0.0669681818181818,0.0685255813953488},
-{3331974,3852547,3852766,0.12508,0.137282926829268},
-{3331975,3852485,3852547,0.0152727272727273,0.0152727272727273},
-{3331976,3851454,3852027,0.411044444444444,0.411044444444444},
-{3331977,3852027,3852485,0.174333333333333,0.174333333333333},
-{3331978,3851840,3851652,0.0699636363636364,0.0699636363636364},
-{3332140,3849205,3848556,0.457336363636364,0.591847058823529},
-{3332362,3898091,3898852,0.299588235294118,0.2778},
-{3332363,3898852,3898884,0.011669387755102,0.0109961538461538},
-{3332497,3864009,3864013,0.06005,1000000},
-{3332498,3863854,3864015,1000000,0.0953052631578947},
-{3332499,3863465,3863472,1000000,0.00842222222222222},
-{3332500,3863472,3864027,1000000,0.771988235294118},
-{3332501,3862791,3862824,1000000,0.0445411764705882},
-{3332502,3862824,3863615,1000000,0.796857142857143},
-{3332503,3862616,3862587,0.0426,1000000},
-{3332504,3862587,3862535,0.0979909090909091,1000000},
-{3332505,3860787,3860810,0.0389333333333333,0.0368842105263158},
-{3332506,3860810,3860921,0.120444444444444,0.120444444444444},
-{3332507,3860524,3860396,0.04836,0.101810526315789},
-{3332508,3860327,3860396,1000000,0.08097},
-{3332509,3860229,3859961,0.071075,0.100341176470588},
-{3332510,3859315,3859328,0.0297157894736842,1000000},
-{3332511,3859961,3859563,0.141754838709677,0.107180487804878},
-{3332512,3859563,3859475,0.0340714285714286,0.0244615384615385},
-{3332513,3859328,3859350,0.0174571428571429,1000000},
-{3332514,3859350,3859781,0.2868,1000000},
-{3332515,3858773,3858317,0.31135,0.298896},
-{3332516,3858245,3858317,0.0544090909090909,0.0323513513513514},
-{3332517,3866450,3866346,1000000,0.052875},
-{3332518,3866346,3866217,1000000,0.0831428571428571},
-{3332519,3866307,3866405,0.0483545454545454,1000000},
-{3332520,3866538,3866734,0.0652071428571429,1000000},
-{3332521,3866755,3866619,0.14696,1000000},
-{3332522,3867408,3867210,1000000,0.199133333333333},
-{3332523,3867639,3867426,1000000,0.110616},
-{3332524,3867426,3867141,1000000,0.12252},
-{3332525,3867784,3867668,0.0266,1000000},
-{3332526,3867668,3867585,0.0245066666666667,1000000},
-{3332527,3869010,3868831,0.0470590909090909,1000000},
-{3332528,3870062,3869912,0.0524275862068966,0.0460727272727273},
-{3332529,3870832,3870375,0.26805,1000000},
-{3332530,3871064,3871123,0.129161538461538,1000000},
-{3332531,3871123,3871122,0.00783529411764706,1000000},
-{3332532,3871221,3871207,1000000,0.17676},
-{3332533,3871207,3871199,1000000,0.0141789473684211},
-{3332534,3871496,3871465,1000000,0.00754545454545455},
-{3332535,3871465,3871410,1000000,0.0136909090909091},
-{3332536,3872019,3871496,1000000,0.125616666666667},
-{3332537,3872381,3872560,1000000,0.03788},
-{3332538,3872628,3872630,1000000,0.0462714285714286},
-{3332539,3872657,3872632,0.0391888888888889,0.0384763636363636},
-{3332540,3872632,3872625,0.438621818181818,0.423231578947368},
-{3332545,3872878,3872866,0.0243762711864407,0.0282},
-{3332546,3872866,3872855,0.03205,0.0369807692307692},
-{3332547,3872669,3872700,1000000,0.0766829268292683},
-{3332548,3872700,3872708,1000000,0.0194},
-{3332549,3872569,3872608,0.1146,1000000},
-{3332550,3872608,3872613,0.02484,1000000},
-{3332551,3872006,3872003,0.016551724137931,1000000},
-{3332552,3872003,3871985,0.112525,1000000},
-{3332553,3871483,3871468,1000000,1000000},
-{3332554,3871468,3871421,1000000,1000000},
-{3332555,3870812,3870766,0.01378,1000000},
-{3332556,3870766,3870734,0.00687096774193548,1000000},
-{3332557,3870759,3870726,1000000,0.00826153846153846},
-{3332558,3870726,3870699,1000000,0.011016},
-{3332559,3870126,3870101,0.0201538461538462,1000000},
-{3332560,3870101,3870058,0.0384486486486487,1000000},
-{3332561,3870058,3870014,0.0248833333333333,1000000},
-{3332562,3870014,3869965,0.018372972972973,1000000},
-{3332563,3869965,3869912,0.0160702702702703,1000000},
-{3332564,3869010,3868867,0.0712222222222222,0.09615},
-{3332565,3867783,3867779,1000000,0.0658714285714286},
-{3332566,3867779,3867772,1000000,0.261505263157895},
-{3332567,3867585,3867554,0.0210461538461538,0.0304},
-{3332568,3867554,3866916,0.288535714285714,0.577071428571428},
-{3332569,3867585,3867366,0.0646266666666667,1000000},
-{3332570,3867366,3867052,0.0985813953488372,1000000},
-{3332571,3866482,3866208,0.07788,1000000},
-{3332572,3866420,3866122,1000000,0.0746},
-{3332573,3865076,3865082,0.0237882352941176,0.0139448275862069},
-{3332574,3865082,3865105,0.163094117647059,0.163094117647059},
-{3332575,3864550,3864520,0.0174642857142857,1000000},
-{3332576,3864520,3864475,0.0132342857142857,1000000},
-{3332577,3864475,3864435,0.0110470588235294,1000000},
-{3332619,3864435,3864386,0.01515,1000000},
-{3332620,3856069,3856271,0.0984222222222222,1000000},
-{3332621,3856027,3855787,0.08817,0.103729411764706},
-{3332622,3855787,3855710,0.024,0.0258461538461538},
-{3332623,3852289,3851945,1000000,0.310517647058824},
-{3332624,3851901,3851945,0.01872,1000000},
-{3332625,3851901,3851878,1000000,0.014328},
-{3332626,3851878,3849591,1000000,1.41927},
-{3332627,3855684,3855644,0.0173571428571429,0.0177804878048781},
-{3332628,3855644,3855370,0.108230769230769,0.1005},
-{3332631,3918119,3918327,0.0768,0.0861090909090909},
-{3332632,3918327,3918370,0.0194294117647059,0.02202},
-{3332633,3920820,3920285,0.329688888888889,0.342369230769231},
-{3332634,3911732,3911914,0.13758,0.13758},
-{3332635,3911914,3913103,0.72675,0.72675},
-{3332636,3909224,3909338,0.18,0.187826086956522},
-{3332637,3909338,3910835,0.685866666666667,0.685866666666667},
-{3332638,3908743,3908768,0.00487659574468085,0.00545714285714286},
-{3332639,3906662,3906679,0.00901395348837209,0.00880909090909091},
-{3332640,3906679,3906735,0.0253,0.0247116279069767},
-{3332641,3907855,3907682,1000000,0.07604},
-{3332642,3907682,3907642,1000000,0.01336},
-{3332643,3908083,3908136,0.0124897959183673,1000000},
-{3332644,3908270,3908448,0.0465789473684211,0.0421428571428571},
-{3332653,3905869,3905884,0.00968275862068966,0.011232},
-{3332654,3907215,3907128,0.0503032258064516,1000000},
-{3332655,3907128,3907106,0.00755172413793103,1000000},
-{3332656,3907215,3907191,1000000,0.0699652173913043},
-{3332657,3907191,3907164,1000000,0.0417},
-{3332658,3907593,3907629,0.1337,1000000},
-{3332659,3907629,3907702,0.0301909090909091,1000000},
-{3332660,3907875,3907907,0.0287571428571429,0.0298222222222222},
-{3332662,3923205,3924137,0.616118918918919,0.735367741935484},
-{3332669,3922922,3923485,0.142490909090909,0.142490909090909},
-{3332670,3921275,3921370,0.0871272727272727,0.0871272727272727},
-{3332671,3921370,3921875,0.464533333333333,0.464533333333333},
-{3332672,3918426,3918582,0.0712714285714286,0.0700210526315789},
-{3332673,3918141,3917296,0.515171428571429,0.450775},
-{3332674,3917296,3915952,0.5439375,0.511941176470588},
-{3332675,3915952,3916028,0.083775,0.0957428571428571},
-{3332676,3916028,3916452,0.27387,0.3222},
-{3332677,3915096,3915208,0.153914285714286,0.153914285714286},
-{3332678,3915208,3915648,0.329735294117647,0.249133333333333},
-{3332679,3910214,3910245,0.00857777777777778,0.00857777777777778},
-{3332680,3910245,3909473,0.353618181818182,0.353618181818182},
-{3332681,3907732,3907270,0.376615384615385,0.188307692307692},
-{3332682,3907270,3907243,0.0127909090909091,0.011256},
-{3332683,3907243,3907230,0.00913548387096774,0.00944},
-{3332684,3907230,3907215,0.0115935483870968,0.0128357142857143},
-{3332685,3905884,3905922,0.0371225806451613,0.0396827586206897},
-{3332686,3905922,3906139,0.166552941176471,0.166552941176471},
-{3332687,3907907,3908028,0.04426,0.04426},
-{3332688,3908028,3908270,0.0779647058823529,0.0736333333333333},
-{3332689,3907593,3907860,1000000,0.0705},
-{3332690,3907860,3908123,1000000,0.0710594594594594},
-{3332691,3907579,3907821,0.050256,1000000},
-{3332692,3907821,3908083,0.0538408163265306,1000000},
-{3332694,3922243,3921624,0.367345945945946,0.37755},
-{3332695,3921624,3921604,0.0108818181818182,0.0082551724137931},
-{3332736,3895293,3895276,0.0281333333333333,0.0281333333333333},
-{3332737,3895276,3896312,0.874327272727273,0.874327272727273},
-{3332738,3894049,3894070,1000000,1000000},
-{3332739,3895701,3896280,0.374825,0.2726},
-{3332740,3896280,3896652,0.136271428571429,0.136271428571429},
-{3332741,3901914,3901924,0.004464,0.00465},
-{3332742,3901924,3902016,0.031596,0.0329125},
-{3332743,3902016,3902099,0.0410307692307692,0.0508},
-{3332744,3903208,3903918,0.597618181818182,0.597618181818182},
-{3332745,3904871,3904914,0.01878,0.0165705882352941},
-{3332746,3904914,3904971,0.03494,0.0291166666666667},
-{3332747,3904010,3904069,0.0379333333333333,0.0379333333333333},
-{3332748,3903918,3903993,0.150776470588235,0.11144347826087},
-{3332749,3903993,3904010,0.0322285714285714,0.03008},
-{3332750,3903762,3903816,0.02406,0.028872},
-{3332751,3903816,3904010,0.0761470588235294,0.0739714285714286},
-{3332752,3903485,3903525,1000000,0.0316090909090909},
-{3332753,3903525,3904603,1000000,0.465781818181818},
-{3332754,3903275,3903329,0.0282,0.0250666666666667},
-{3332755,3903329,3904001,0.308236363636364,0.308236363636364},
-{3332756,3903006,3903094,0.0585391304347826,0.0792},
-{3332757,3903094,3903741,0.302927272727273,0.302927272727273},
-{3332758,3902827,3902867,0.0336315789473684,0.0304285714285714},
-{3332759,3902867,3903905,0.605746153846154,0.54308275862069},
-{3332760,3902529,3902625,0.0983,0.073725},
-{3332761,3902625,3903682,0.721090909090909,0.721090909090909},
-{3332762,3902361,3903489,0.889933333333333,0.53396},
-{3332763,3902099,3902115,0.0105,0.0121578947368421},
-{3332764,3902115,3903269,0.70424347826087,0.70424347826087},
-{3332765,3901781,3901903,0.049404,0.0504122448979592},
-{3332766,3901903,3901914,0.0036,0.00375},
-{3332767,3900891,3901049,0.119888888888889,0.119888888888889},
-{3332768,3901049,3901106,0.052584,0.052584},
-{3332769,3900288,3900271,0.00991363636363636,0.0106390243902439},
-{3332770,3900271,3900107,0.0715116279069767,0.0809210526315789},
-{3332771,3900107,3899526,0.2457,0.292183783783784},
-{3332772,3900483,3899553,0.421594285714286,0.409883333333333},
-{3332773,3899553,3899526,0.0220090909090909,0.0172928571428571},
-{3332774,3899287,3899317,0.0122181818181818,0.0122181818181818},
-{3332775,3899317,3899988,0.432933333333333,0.432933333333333},
-{3332776,3899095,3899124,0.0147130434782609,0.02256},
-{3332777,3899124,3899244,0.087264,0.0991636363636364},
-{3332778,3898902,3898914,0.0221625,0.00933157894736842},
-{3332779,3898914,3899095,0.15815,0.0925756097560975},
-{3332780,3898677,3898891,1000000,0.208224},
-{3332781,3898891,3898902,1000000,0.00934736842105263},
-{3332782,3898677,3898750,0.03748,0.07496},
-{3332783,3898750,3898970,0.105859459459459,0.186514285714286},
-{3332784,3898232,3898374,0.0577454545454546,0.0577454545454546},
-{3332785,3898374,3898937,0.437288888888889,0.437288888888889},
-{3332786,3897821,3897877,1000000,0.043272},
-{3332787,3897877,3898232,1000000,0.2411375},
-{3332788,3897549,3897571,0.0148885714285714,0.015104347826087},
-{3332789,3895502,3895733,0.0917619047619048,1000000},
-{3332790,3895733,3896018,0.0918727272727273,1000000},
-{3332791,3895536,3895502,0.01922,1000000},
-{3332792,3895146,3895439,1000000,0.155530434782609},
-{3332793,3895439,3895536,1000000,0.051625},
-{3332794,3895146,3895150,0.0233625,1000000},
-{3332795,3895150,3895199,0.0850838709677419,1000000},
-{3332796,3895018,3895059,0.0228230769230769,1000000},
-{3332797,3895059,3895199,0.0730758620689655,1000000},
-{3332798,3895005,3895020,1000000,0.00710322580645161},
-{3332799,3895020,3895054,1000000,0.0186},
-{3332800,3894748,3894787,1000000,0.0292723404255319},
-{3332801,3894787,3894810,1000000,0.0170869565217391},
-{3332802,3894701,3894721,1000000,0.0227076923076923},
-{3332803,3894721,3894748,1000000,0.0204734693877551},
-{3332804,3894349,3894584,1000000,0.343955172413793},
-{3332805,3894584,3894701,1000000,0.114993103448276},
-{3332806,3894508,3894429,1000000,0.136609523809524},
-{3332807,3894429,3894349,1000000,0.1572375},
-{3332808,3894262,3894281,0.0391714285714286,0.0376352941176471},
-{3332809,3894281,3894291,0.0137884615384615,0.0140588235294118},
-{3332810,3895330,3895453,0.0787714285714286,1000000},
-{3332811,3895453,3895993,0.430408695652174,1000000},
-{3332812,3895993,3895959,0.0185314285714286,1000000},
-{3332813,3895959,3895731,0.107839024390244,1000000},
-{3332814,3898018,3897879,0.1036,0.143446153846154},
-{3332815,3897879,3897604,0.253523076923077,0.253523076923077},
-{3332816,3894021,3894030,1000000,1000000},
-{3332817,3894030,3894049,1000000,1000000},
-{3332834,3868525,3868598,0.0494666666666667,1000000},
-{3332835,3869116,3868908,1000000,0.044016},
-{3332836,3868908,3868650,1000000,0.0481959183673469},
-{3332837,3869549,3869299,1000000,0.0437411764705882},
-{3332838,3869897,3869704,0.0432272727272727,1000000},
-{3332839,3869704,3869541,0.0330142857142857,1000000},
-{3332840,3871032,3870627,1000000,0.108892682926829},
-{3332841,3870627,3870566,1000000,0.0137875},
-{3332842,3871032,3871058,0.019176,0.0282},
-{3332843,3871058,3871271,0.0922444444444444,0.226418181818182},
-{3332844,3865186,3865008,0.0789777777777778,1000000},
-{3332845,3865186,3865002,0.0735714285714286,1000000},
-{3332846,3865052,3865137,0.1329,1000000},
-{3332847,3878799,3878886,1000000,0.1101},
-{3332848,3878886,3879093,1000000,0.186166666666667},
-{3332849,3878181,3878186,0.00225714285714286,1000000},
-{3332850,3878186,3878233,0.0273142857142857,1000000},
-{3332851,3878177,3877946,0.0851785714285714,1000000},
-{3332852,3877946,3877905,0.018504,1000000},
-{3332853,3877767,3877803,0.00672222222222222,0.00636842105263158},
-{3332854,3877803,3878140,0.0646846153846154,0.0590105263157895},
-{3332855,3877502,3877613,1000000,1000000},
-{3332856,3877613,3877892,1000000,1000000},
-{3332857,3876011,3876324,1000000,1000000},
-{3332858,3875582,3875464,1000000,0.042951724137931},
-{3332859,3865328,3865315,1000000,0.0482232558139535},
-{3332860,3865528,3865328,0.253425,0.0942976744186047},
-{3332861,3865684,3865524,1000000,0.0979034482758621},
-{3332862,3865524,3865427,1000000,0.065736},
-{3332863,3865845,3865715,0.048816,0.0381375},
-{3332864,3865715,3865648,0.0309,0.0219290322580645},
-{3332865,3872035,3871995,0.00716470588235294,1000000},
-{3332866,3870801,3870988,0.301371428571429,0.290979310344828},
-{3332867,3870988,3870994,0.00942857142857143,0.01056},
-{3332868,3870196,3870820,0.342168,0.329007692307692},
-{3332869,3870820,3870831,0.00957692307692308,0.00996},
-{3332870,3870831,3870238,0.168617142857143,0.163933333333333},
-{3332871,3870238,3869559,0.159252631578947,0.144085714285714},
-{3332872,3868858,3869083,0.259257142857143,0.247472727272727},
-{3332873,3869083,3869108,0.027,0.027},
-{3332874,3869108,3868747,0.0882439024390244,1000000},
-{3332875,3868747,3868632,0.024555,1000000},
-{3332876,3868632,3868525,0.0309512195121951,1000000},
-{3332877,3868858,3868490,0.125155555555556,0.1024},
-{3332878,3868490,3868255,0.100382608695652,0.07696},
-{3332879,3868448,3868144,0.25495,1000000},
-{3332880,3868125,3868350,0.1122,0.1122},
-{3332881,3868162,3868215,0.144272727272727,0.0961818181818182},
-{3332882,3868215,3868350,0.112406896551724,0.135825},
-{3332883,3868139,3868162,1000000,0.0119351351351351},
-{3332884,3867814,3868102,1000000,0.174338461538462},
-{3332885,3868102,3868139,1000000,0.0280216216216216},
-{3332886,3867598,3868125,0.324046153846154,0.324046153846154},
-{3332887,3866777,3866673,0.0353076923076923,0.0353076923076923},
-{3332888,3866673,3866319,0.1224,0.126348387096774},
-{3332889,3867168,3866398,0.5124,1000000},
-{3332890,3866398,3866319,0.04592,1000000},
-{3332891,3866422,3866227,1000000,0.08146},
-{3332892,3866227,3866134,1000000,0.0495692307692308},
-{3332893,3865601,3865752,0.0493756097560976,1000000},
-{3332894,3865752,3865806,0.0186279069767442,1000000},
-{3332895,3865745,3865601,0.1182,1000000},
-{3332896,3865531,3865745,1000000,0.0856736842105263},
-{3332897,3865315,3865290,1000000,0.0486292682926829},
-{3332898,3867195,3866792,1000000,0.0766867924528302},
-{3332899,3868047,3867395,0.134155102040816,1000000},
-{3332901,3865834,3866213,0.181844444444444,0.181844444444444},
-{3332902,3866213,3866384,0.0704888888888889,0.0704888888888889},
-{3332903,3866972,3867283,0.2581875,0.2581875},
-{3332904,3867283,3867362,0.0481428571428571,0.0481428571428571},
-{3332905,3867205,3867891,0.294733333333333,0.294733333333333},
-{3332906,3867891,3867959,0.0467368421052632,0.0467368421052632},
-{3332907,3868400,3868247,0.153967741935484,0.153967741935484},
-{3332908,3868247,3868093,0.113882926829268,0.113882926829268},
-{3332909,3871704,3871263,0.175615384615385,0.185108108108108},
-{3332910,3868595,3868985,0.3312,0.357696},
-{3332911,3868985,3868993,0.0132272727272727,0.01164},
-{3332914,3902159,3902125,0.0270272727272727,1000000},
-{3332915,3902537,3902512,1000000,0.0254076923076923},
-{3332916,3903033,3902978,0.0703764705882353,0.0520173913043478},
-{3332917,3902978,3902952,0.05025,0.03216},
-{3332918,3905392,3905442,1000000,1000000},
-{3332919,3905442,3905700,1000000,1000000},
-{3332920,3905019,3905057,1000000,1000000},
-{3332921,3905057,3905276,1000000,1000000},
-{3332922,3904711,3904637,1000000,1000000},
-{3332923,3904637,3905019,1000000,1000000},
-{3332924,3903804,3904270,1000000,1000000},
-{3332925,3904270,3904369,1000000,1000000},
-{3332926,3903804,3903836,1000000,1000000},
-{3332927,3903836,3904150,1000000,1000000},
-{3332928,3903452,3903470,1000000,1000000},
-{3332929,3903470,3903688,1000000,1000000},
-{3332930,3903308,3903059,0.261469565217391,0.214778571428571},
-{3332931,3903059,3903033,0.0259636363636364,0.022848},
-{3332932,3902891,3902630,1000000,0.236169230769231},
-{3332933,3902630,3902537,1000000,0.072624},
-{3332934,3902528,3902235,0.24816,1000000},
-{3332935,3902235,3902159,0.1032,1000000},
-{3332936,3901327,3901285,1000000,1000000},
-{3332937,3901285,3901221,1000000,1000000},
-{3332938,3901236,3901209,0.0638444444444444,0.0638444444444444},
-{3332939,3901209,3901011,0.0883555555555555,0.0883555555555555},
-{3332940,3901011,3901236,0.102563636363636,0.102563636363636},
-{3332941,3900981,3900601,0.52917,0.52917},
-{3332942,3900601,3900536,0.1272,0.0442434782608696},
-{3332943,3900381,3900396,1000000,0.1818},
-{3332944,3900396,3900387,1000000,0.0717375},
-{3332945,3899901,3899936,0.0365379310344828,0.0883},
-{3332946,3899936,3900068,0.0684324324324324,0.133263157894737},
-{3332947,3899053,3899119,1000000,1000000},
-{3332948,3899119,3899115,1000000,1000000},
-{3332949,3896483,3896476,1000000,0.05118},
-{3332950,3896476,3896470,1000000,0.02928},
-{3332951,3896401,3896353,0.0706666666666667,1000000},
-{3332952,3896353,3896341,0.0243,1000000},
-{3332953,3896145,3896144,0.0290769230769231,0.04725},
-{3332954,3896144,3896454,0.34452,0.43065},
-{3332955,3899016,3899019,0.0143142857142857,0.0107357142857143},
-{3332956,3899019,3899144,0.228407142857143,0.2907},
-{3332957,3899818,3899863,0.0213555555555556,0.01922},
-{3332958,3899795,3899748,0.0189555555555556,1000000},
-{3332959,3899393,3899966,0.301118181818182,0.245355555555556},
-{3332960,3899543,3900018,0.238617391304348,0.27441},
-{3332961,3900018,3900082,0.0388125,0.0207},
-{3332962,3899696,3900081,0.314614285714286,0.231821052631579},
-{3332963,3900081,3900114,0.00950322580645161,0.0133909090909091},
-{3332964,3900004,3899972,0.0146444444444444,0.0146444444444444},
-{3332965,3899968,3899972,0.0747777777777778,0.0747777777777778},
-{3332966,3899608,3899946,0.167822222222222,0.167822222222222},
-{3332967,3899946,3899968,0.0361818181818182,0.0361818181818182},
-{3332968,3898728,3899462,0.416914285714286,0.198981818181818},
-{3332969,3898096,3898810,1000000,0.275477777777778},
-{3332970,3898090,3898111,0.00467547169811321,1000000},
-{3332971,3898111,3898182,0.0245433962264151,1000000},
-{3332972,3896903,3896866,0.0292875,0.0213},
-{3332973,3896288,3896271,1000000,1000000},
-{3332974,3896192,3896194,1000000,0.0198428571428571},
-{3332975,3896105,3896151,0.0186,1000000},
-{3332976,3896151,3896192,0.018195652173913,1000000},
-{3332977,3896192,3896116,1000000,0.03204},
-{3332978,3896116,3896072,1000000,0.0219777777777778},
-{3332979,3896068,3896064,1000000,0.014184},
-{3332980,3896064,3896096,1000000,0.0928173913043478},
-{3332981,3895986,3896025,1000000,0.018564},
-{3332982,3896025,3896096,1000000,0.0413625},
-{3332985,3902693,3902639,0.0247846153846154,1000000},
-{3332986,3902639,3902538,0.0618260869565217,1000000},
-{3332987,3902538,3902489,1000000,0.0469714285714286},
-{3332988,3902489,3902468,1000000,0.0133846153846154},
-{3332989,3902375,3902399,1000000,0.013392},
-{3332990,3902399,3902495,1000000,0.1267875},
-{3332991,3902375,3902352,0.01055625,0.0125111111111111},
-{3332992,3902352,3902259,0.0426387096774194,0.0629428571428571},
-{3332993,3902259,3902212,0.10995,1000000},
-{3332994,3902212,3902200,0.0155142857142857,1000000},
-{3332995,3901991,3901962,1000000,1000000},
-{3332996,3901962,3901902,1000000,1000000},
-{3332997,3901839,3901408,0.318884210526316,1000000},
-{3332998,3901408,3901412,0.04668,1000000},
-{3332999,3901140,3901131,1000000,1000000},
-{3333000,3901131,3901126,1000000,1000000},
-{3333001,3900530,3900529,0.00889090909090909,0.00889090909090909},
-{3333002,3900529,3900415,0.322377777777778,0.322377777777778},
-{3333003,3900011,3899895,0.0739363636363636,1000000},
-{3333004,3899895,3899872,0.016875,1000000},
-{3333005,3899880,3899873,0.0317513513513513,1000000},
-{3333006,3899873,3899872,0.00819,1000000},
-{3333007,3899742,3899763,1000000,0.0311217391304348},
-{3333008,3899772,3899767,1000000,0.0289609756097561},
-{3333009,3899767,3899763,1000000,0.0169024390243902},
-{3333010,3899638,3899732,1000000,0.0697826086956522},
-{3333011,3899732,3899742,1000000,0.0168},
-{3333012,3898140,3898510,1000000,0.0880363636363636},
-{3333013,3896148,3896185,1000000,0.01932},
-{3333014,3896185,3896207,1000000,0.00980869565217391},
-{3333015,3896194,3896203,1000000,0.0100888888888889},
-{3333016,3896203,3896289,1000000,0.0571285714285714},
-{3333017,3896789,3896304,1000000,1000000},
-{3333018,3896304,3896288,1000000,1000000},
-{3333019,3897128,3896936,0.166341176470588,0.166341176470588},
-{3333020,3896936,3896903,0.0240857142857143,0.0160571428571429},
-{3333021,3897601,3897431,1000000,1000000},
-{3333022,3898119,3898143,0.00998709677419355,0.0140727272727273},
-{3333023,3898143,3898305,0.0522,0.110925},
-{3333024,3898185,3898200,1000000,0.0110769230769231},
-{3333025,3898200,3898305,1000000,0.0678620689655172},
-{3333026,3898740,3898274,1000000,1000000},
-{3333027,3898182,3898595,0.156884210526316,1000000},
-{3333028,3898810,3899038,1000000,0.07904},
-{3333029,3899038,3899187,1000000,0.0490677966101695},
-{3333030,3899462,3899503,0.0273714285714286,0.0159666666666667},
-{3333031,3899503,3899557,0.027,0.0182647058823529},
-{3333032,3899724,3899829,1000000,0.0573381818181818},
-{3333033,3899829,3899865,1000000,0.0229137931034483},
-{3333034,3900046,3900132,0.0192146341463415,0.02461875},
-{3333035,3900173,3900195,0.0116307692307692,0.0116307692307692},
-{3333036,3900195,3900258,0.0271846153846154,0.0271846153846154},
-{3333037,3900135,3900140,1000000,0.0191127272727273},
-{3333038,3900140,3900158,1000000,0.189672},
-{3333039,3899966,3900022,0.07008,0.0259555555555556},
-{3333040,3900022,3900158,0.120163636363636,0.0508384615384615},
-{3333041,3899863,3899910,0.0291,0.0207857142857143},
-{3333042,3899910,3900003,0.0596470588235294,0.0349655172413793},
-{3333043,3899888,3899841,0.0278869565217391,1000000},
-{3333044,3899841,3899795,0.020256,1000000},
-{3333045,3899813,3899787,1000000,0.0198},
-{3333046,3899787,3899730,1000000,0.0314},
-{3333047,3899813,3899805,1000000,0.00953181818181818},
-{3333048,3899805,3899791,1000000,0.0266142857142857},
-{3333049,3899933,3899908,0.05754,1000000},
-{3333050,3899908,3899891,0.0356,1000000},
-{3333051,3899933,3899957,0.0558,1000000},
-{3333052,3899957,3900030,0.0630923076923077,1000000},
-{3333053,3902129,3902111,0.0185714285714286,0.0114705882352941},
-{3333054,3902111,3902036,0.146676923076923,0.0681},
-{3333055,3902129,3902139,0.0183,1000000},
-{3333056,3902139,3902123,0.117741176470588,1000000},
-{3333057,3902719,3902756,0.026775,1000000},
-{3333058,3902756,3902883,0.0695684210526316,1000000},
-{3333059,3902934,3902847,1000000,0.0931090909090909},
-{3333060,3902847,3902838,1000000,0.015425},
-{3333061,3902789,3902831,1000000,0.12945},
-{3333062,3902831,3902838,1000000,0.0206117647058824},
-{3333067,3866051,3865815,0.152311111111111,0.13708},
-{3333068,3865815,3865134,0.245574193548387,0.217508571428571},
-{3333069,3866051,3865958,0.0359333333333333,0.0359333333333333},
-{3333070,3865958,3865222,0.283688888888889,0.283688888888889},
-{3333071,3865911,3866159,0.13685,0.13685},
-{3333072,3866159,3866254,0.0700875,0.0801},
-{3333073,3865124,3866372,0.613311111111111,0.613311111111111},
-{3333074,3866372,3866493,0.0541555555555556,0.0541555555555556},
-{3333075,3880528,3880654,0.0649090909090909,1000000},
-{3333076,3880654,3880679,0.009225,1000000},
-{3333077,3880470,3880565,0.0486333333333333,0.0500228571428571},
-{3333078,3879855,3879883,1000000,0.0146571428571429},
-{3333079,3879883,3880453,1000000,0.345257142857143},
-{3333080,3879754,3880470,0.306685714285714,0.341536363636364},
-{3333081,3880104,3880114,0.0128823529411765,1000000},
-{3333082,3880114,3880707,0.495975,1000000},
-{3333083,3881073,3881106,0.0282,0.0100266666666667},
-{3333084,3879217,3879257,1000000,0.0183},
-{3333085,3879257,3879408,1000000,0.0615272727272727},
-{3333086,3880368,3880383,0.00816,1000000},
-{3333087,3880383,3880528,0.06384,1000000},
-{3333088,3879871,3880038,1000000,0.0780947368421053},
-{3333089,3879871,3879842,0.0225,1000000},
-{3333090,3879815,3879790,1000000,0.0366},
-{3333091,3879790,3879726,1000000,0.111507692307692},
-{3333092,3879634,3879414,0.153533333333333,0.133722580645161},
-{3333093,3879414,3879392,0.0178434782608696,0.014151724137931},
-{3333094,3879276,3879302,0.0220421052631579,1000000},
-{3333095,3879302,3879524,0.21304,1000000},
-{3333096,3881472,3880988,1000000,0.329511111111111},
-{3333097,3880988,3880968,1000000,0.0365636363636364},
-{3333098,3881176,3881515,0.108633962264151,0.11995},
-{3333099,3881515,3881564,0.013,0.0135},
-{3333100,3863689,3863489,1000000,1000000},
-{3333101,3852475,3852415,0.0204909090909091,0.0375666666666667},
-{3333102,3859753,3859590,0.142228571428571,0.09956},
-{3333103,3859590,3859555,0.0228545454545455,0.0157125},
-{3333104,3879365,3879558,0.102815384615385,1000000},
-{3333105,3882654,3882668,1000000,0.11089756097561},
-{3333106,3863087,3863043,0.0872333333333333,0.0805230769230769},
-{3333107,3863043,3863045,0.0132642857142857,0.0109235294117647},
-{3333108,3856649,3856668,0.0103111111111111,0.0103111111111111},
-{3333109,3856668,3856793,0.0490222222222222,0.0490222222222222},
-{3333110,3851044,3851528,0.390860869565217,0.408627272727273},
-{3333111,3851528,3851549,0.016575,0.0189428571428571},
-{3333112,3852027,3851860,0.0618666666666667,0.0618666666666667},
-{3333113,3851860,3851840,0.00678181818181818,0.00678181818181818},
-{3333114,3848765,3848958,0.467155555555556,0.467155555555556},
-{3333115,3848958,3848972,0.03405,0.03405},
-{3333118,3851322,3851304,0.0128608695652174,1000000},
-{3333119,3851304,3850561,0.565085714285714,1000000},
-{3333120,3891772,3892359,1000000,0.171251162790698},
-{3333121,3892359,3892432,1000000,0.0272833333333333},
-{3333122,3892318,3892369,0.01248,1000000},
-{3333123,3892369,3892441,0.018528,1000000},
-{3333124,3889273,3889224,0.0167625,0.0157764705882353},
-{3333125,3889224,3888586,0.259542857142857,0.213741176470588},
-{3333126,3885663,3886420,0.302072727272727,0.262326315789474},
-{3333127,3886420,3886501,0.0576,0.0512},
-{3333128,3886372,3887051,0.551589473684211,0.317581818181818},
-{3333129,3887051,3887076,0.0186521739130435,0.01716},
-{3333130,3886896,3887604,1000000,1000000},
-{3333131,3887604,3887631,1000000,1000000},
-{3333132,3887221,3887892,1000000,0.42708},
-{3333133,3887892,3887895,1000000,0.0346285714285714},
-{3333134,3887278,3888037,0.559133333333333,0.264852631578947},
-{3333135,3888037,3888068,0.0195230769230769,0.0163741935483871},
-{3333136,3887339,3888177,0.6514875,1000000},
-{3333137,3888177,3888231,0.0365647058823529,1000000},
-{3333138,3891822,3891886,1000000,0.04045},
-{3333139,3891886,3891915,1000000,0.014775},
-{3333140,3891822,3892005,1000000,0.0749806451612903},
-{3333141,3892005,3892054,1000000,0.0206545454545455},
-{3333142,3893406,3893488,1000000,1000000},
-{3333143,3889225,3889158,0.0480923076923077,0.0329052631578947},
-{3333144,3889158,3889068,0.11064,0.0790285714285714},
-{3333145,3889068,3888972,0.10425,0.0893571428571429},
-{3333146,3888599,3888651,0.0264222222222222,0.0264222222222222},
-{3333147,3888651,3889225,0.28176,0.270923076923077},
-{3333148,3888521,3888464,0.110544,1000000},
-{3333149,3888464,3888502,0.0607090909090909,1000000},
-{3333150,3888502,3888412,1000000,0.0393333333333333},
-{3333151,3888412,3888294,1000000,0.064728},
-{3333152,3887962,3887911,0.0179777777777778,1000000},
-{3333153,3887962,3887926,0.0303,1000000},
-{3333154,3887926,3887747,0.116625,1000000},
-{3333155,3887911,3887874,0.0112615384615385,1000000},
-{3333156,3887874,3887664,0.0729310344827586,1000000},
-{3333157,3887076,3887227,0.0707538461538462,0.07665},
-{3333158,3892042,3893114,0.76059,1000000},
-{3333159,3893114,3893128,0.0187285714285714,1000000},
-{3333160,3891885,3892968,1000000,0.77007},
-{3333161,3892968,3892991,1000000,0.0105230769230769},
-{3333162,3892439,3892731,0.28508,0.158377777777778},
-{3333163,3892731,3892782,0.0207,0.0175153846153846},
-{3333164,3892150,3892416,1000000,0.168},
-{3333165,3892416,3892442,1000000,0.0128454545454545},
-{3333166,3891873,3892102,0.279553846153846,1000000},
-{3333167,3892102,3892124,0.0227333333333333,1000000},
-{3333168,3891531,3891623,0.0985058823529412,1000000},
-{3333169,3880800,3880827,0.01572,1000000},
-{3333170,3880827,3880944,0.0428444444444444,1000000},
-{3333181,3892480,3892527,1000000,1000000},
-{3333182,3894873,3894888,0.011048275862069,0.0145636363636364},
-{3333183,3894888,3895204,0.287941935483871,0.405736363636364},
-{3333184,3893723,3893825,1000000,0.075},
-{3333208,3907404,3908392,0.367088888888889,0.367088888888889},
-{3333209,3908392,3909494,0.412177777777778,0.412177777777778},
-{3333210,3909494,3910260,0.37,0.37},
-{3333211,3906690,3905968,0.267581818181818,0.267581818181818},
-{3342162,3856027,3856232,1000000,0.188571428571429},
-{3342165,3856367,3856593,0.144442105263158,0.161435294117647},
-{3342167,3856681,3856857,0.140273684210526,0.2221},
-{3342170,3857387,3857476,0.0718090909090909,0.0987375},
-{3342189,3864386,3864320,0.0204967741935484,1000000},
-{3342190,3864320,3864204,0.0491806451612903,1000000},
-{3342207,3904021,3906539,1000000,0.546011538461538},
-{3342237,3885713,3886045,1000000,1000000},
-{3342238,3886045,3886103,1000000,1000000},
-{3342239,3878561,3878412,1000000,0.0950516129032258},
-{3342240,3878412,3878214,1000000,0.2608875},
-{3342255,3849152,3849920,0.473452173913044,0.473452173913044},
-{3342675,3882138,3882136,0.01665,0.01665},
-{3342850,3854466,3854430,1000000,0.0843},
-{3342851,3854430,3853947,1000000,0.468834782608696},
-{3342861,3866996,3866792,0.0388588235294118,1000000},
-{3342867,3851899,3851892,0.0161666666666667,0.0223846153846154},
-{3342868,3851892,3851274,0.54104347826087,0.6222},
-{3342873,3898857,3898317,1.00745454545455,1.00745454545455},
-{3342877,3895027,3894700,0.4326,0.4326},
-{3342878,3894700,3894676,0.03912,0.03912},
-{3342879,3895701,3895050,1.51941,1.51941},
-{3342880,3895050,3895027,0.0273,0.0273},
-{3342887,3902284,3902361,0.0482,0.0632625},
-{3342905,3907464,3907992,0.43362,0.43362},
-{3342906,3907992,3909029,0.89388,0.89388},
-{3343320,3898595,3898612,0.00493220338983051,1000000},
-{3343321,3898612,3898630,0.00693559322033898,1000000},
-{3343322,3897431,3897371,1000000,1000000},
-{3343323,3898089,3897284,0.180783050847458,1000000},
-{3343324,3897284,3897216,0.0139034482758621,1000000},
-{3343360,3870385,3870007,0.0821632653061224,1000000},
-{3343361,3870007,3869897,0.0214173913043478,1000000},
-{3343362,3871995,3871062,0.2334,1000000},
-{3343363,3874461,3872035,0.50886,1000000},
-{3343366,3872635,3872649,0.131665384615385,0.129181132075472},
-{3343369,3872649,3872784,0.368917647058823,0.354996226415094},
-{3343370,3872784,3872834,0.0612,0.0624},
-{3343521,3899457,3899629,0.0757285714285714,1000000},
-{3343522,3899677,3899791,0.0465,1000000},
-{3343632,3880199,3880284,0.03636,1000000},
-{3343633,3880284,3880368,0.0375891891891892,1000000},
-{3343634,3880368,3880388,1000000,0.027},
-{3343635,3880388,3880761,1000000,0.428966666666667},
-{3343646,3880565,3880584,0.0181741935483871,1000000},
-{3343647,3880584,3880838,0.147365217391304,1000000},
-{3343885,3906172,3906227,0.0413307692307692,0.0413307692307692},
-{3343886,3906227,3907068,0.476376923076923,0.516075},
-{3343887,3906171,3906321,0.0598064516129032,0.0579375},
-{3343888,3906321,3907739,0.426811764705882,0.372092307692308},
-{3343889,3906227,3906321,0.19455,0.19455},
-{3344074,3908768,3908889,0.033,0.0360697674418605},
-{3344076,3916195,3916249,0.0146368421052632,1000000},
-{3344077,3904069,3904279,0.12855,0.12855},
-{3344078,3895180,3894865,0.0925066666666667,0.0925066666666667},
-{3344079,3894865,3894848,0.00449387755102041,0.00449387755102041},
-{3344080,3894810,3894819,0.00867,1000000},
-{3344081,3894819,3894906,0.0552,1000000},
-{3344084,3875464,3875437,1000000,0.00856875},
-{3344085,3875437,3875412,1000000,0.0101454545454545},
-{3344086,3874821,3874915,0.201655555555556,0.209411538461538},
-{3344087,3874915,3875077,0.211846153846154,0.216},
-{3344165,3887715,3887709,0.05154,0.05154},
-{3344166,3887709,3887351,2.30055,2.30055},
-{3344335,3874272,3874185,0.129876923076923,0.129876923076923},
-{3344336,3874185,3873915,0.457548387096774,0.44325},
-{3344729,3908946,3909174,1000000,0.0587217391304348},
-{3344789,3884455,3884427,0.00934090909090909,1000000},
-{3344790,3884379,3884427,0.0120818181818182,0.0120818181818182},
-{3345169,3897762,3898031,1000000,0.0455130434782609},
-{3345170,3898031,3898089,1000000,0.00796521739130435},
-{3345171,3898089,3898824,1000000,0.142885714285714},
-{3345172,3898824,3899102,1000000,0.0561344262295082},
-{3345219,3876231,3876555,0.0983833333333333,1000000},
-{3345220,3876555,3876793,0.0560454545454546,1000000},
-{3345221,3876555,3876184,1000000,1000000},
-{3345222,3875677,3876037,0.1272,0.214231578947368},
-{3345223,3876037,3877812,0.656057142857143,0.496475675675676},
-{3345224,3876037,3876109,1000000,1000000},
-{3345225,3876109,3876156,1000000,1000000},
-{3345226,3876109,3876409,1000000,1000000},
-{3345227,3876245,3876564,1000000,0.23548},
-{3345228,3876564,3876805,1000000,0.0709411764705882},
-{3345230,3894748,3894731,0.0217565217391304,1000000},
-{3345231,3894731,3894706,0.0285461538461538,1000000},
-{3345254,3897842,3897895,1000000,0.0970363636363636},
-{3345255,3897895,3897924,1000000,0.0132230769230769},
-{3345256,3897852,3897803,0.0179625,1000000},
-{3345257,3897803,3897615,0.09026,1000000},
-{3345258,3897588,3897597,0.0073125,1000000},
-{3345259,3897597,3897609,0.00735,1000000},
-{3345260,3888381,3888429,1000000,0.0346666666666667},
-{3345261,3888429,3888453,1000000,0.01581},
-{3345262,3888724,3888858,0.144818181818182,0.144818181818182},
-{3345263,3888858,3888893,0.0276,0.0345},
-{3345264,3889615,3889588,0.0235894736842105,1000000},
-{3345265,3889797,3890677,0.566809090909091,1000000},
-{3345266,3890677,3890702,0.0240375,1000000},
-{3345267,3889459,3890328,0.5096,0.370618181818182},
-{3345268,3890328,3890351,0.0154571428571429,0.0147545454545455},
-{3345269,3889712,3889688,1000000,0.0245076923076923},
-{3345279,3899730,3899717,1000000,0.009048},
-{3345280,3899717,3899677,1000000,0.0234692307692308},
-{3345292,3900124,3900125,1000000,0.0166555555555556},
-{3345293,3900125,3900135,1000000,0.0601090909090909},
-{3345299,3899654,3900015,0.155511111111111,0.155511111111111},
-{3345300,3900015,3900045,0.0198,0.0198},
-{3345301,3899912,3900017,0.0850714285714286,0.0384193548387097},
-{3345302,3900017,3900046,0.0102,0.0091448275862069},
-{3345303,3899847,3900050,0.11715,0.111571428571429},
-{3345304,3900050,3900073,0.00747272727272727,0.010275},
-{3345305,3900049,3900027,0.00701818181818182,0.00701818181818182},
-{3345306,3900027,3900004,0.00888888888888889,0.00888888888888889},
-{3345312,3873411,3873416,0.00465217391304348,0.00458571428571428},
-{3345313,3873416,3873458,0.0304086956521739,0.0299742857142857},
-{3345314,3873594,3873380,1000000,0.17430447761194},
-{3345315,3873380,3873390,1000000,0.0183085714285714},
-{3345316,3894585,3894629,1000000,0.00898928571428572},
-{3345317,3894629,3894873,1000000,0.0640842105263158},
-{3345318,3894469,3894482,0.0091125,1000000},
-{3345319,3894482,3894808,0.309103448275862,1000000},
-{3345320,3894091,3894098,1000000,0.0117652173913043},
-{3345321,3894098,3894437,1000000,0.5715},
-{3345322,3892114,3892312,0.15327,1000000},
-{3345323,3892312,3892321,0.0141157894736842,1000000},
-{3345324,3892736,3892777,0.0160838709677419,1000000},
-{3345325,3892777,3892725,0.0295548387096774,1000000},
-{3345326,3892778,3892824,1000000,0.0128666666666667},
-{3345327,3892824,3892849,1000000,0.00848571428571429},
-{3345328,3892769,3892919,0.1042875,1000000},
-{3345329,3892919,3892950,0.0179368421052632,1000000},
-{3345330,3892769,3892967,0.0646125,1000000},
-{3345331,3892967,3892996,0.01148,1000000},
-{3345332,3893501,3893672,0.3097125,0.16518},
-{3345333,3893672,3893688,0.0163565217391304,0.0129724137931034},
-{3345334,3894689,3894707,0.00851785714285714,1000000},
-{3345335,3894707,3894938,0.0675321428571429,1000000},
-{3345336,3893000,3892947,0.0226965517241379,1000000},
-{3345337,3892947,3892862,0.02728,1000000},
-{3345338,3892945,3892964,1000000,0.0104823529411765},
-{3345339,3892964,3893000,1000000,0.0244421052631579},
-{3345340,3893049,3893073,0.0143625,1000000},
-{3345341,3893073,3893141,0.0302914285714286,1000000},
-{3345342,3893141,3893153,1000000,0.0456428571428571},
-{3345343,3893153,3893233,1000000,0.0472941176470588},
-{3345344,3893233,3893268,1000000,0.0144307692307692},
-{3345347,3882560,3882635,1000000,0.0129223880597015},
-{3345348,3882635,3882659,1000000,0.00398507462686567},
-{3345349,3882640,3882675,0.00465428571428571,1000000},
-{3345350,3861953,3861928,0.0122222222222222,0.0122222222222222},
-{3345351,3861928,3861900,0.0126,0.0126},
-{3345352,3861953,3861977,1000000,0.00561639344262295},
-{3345353,3861977,3862077,1000000,0.02565},
-{3345360,3884427,3884584,0.0435348837209302,1000000},
-{3345361,3865871,3866069,1000000,0.0567666666666667},
-{3345362,3866069,3866123,1000000,0.0163333333333333},
-{3345363,3864696,3864653,0.0149090909090909,1000000},
-{3345364,3865471,3865766,1000000,0.161112},
-{3345365,3865471,3865488,1000000,0.0690652173913043},
-{3345366,3865345,3865355,0.126627272727273,1000000},
-{3345367,3865345,3865282,0.13295,1000000},
-{3345368,3864879,3864480,0.117681081081081,1000000},
-{3345369,3864710,3864480,1000000,0.1875},
-{3345370,3864662,3864578,0.0447142857142857,0.0426818181818182},
-{3345371,3864578,3863559,0.368382857142857,0.368382857142857},
-{3345372,3871007,3870612,0.105,1000000},
-{3345373,3870612,3870544,0.0160875,1000000},
-{3345374,3866433,3866385,0.03018,0.0503},
-{3345375,3866393,3866195,0.0898333333333333,1000000},
-{3345376,3866195,3865131,0.6600375,1000000},
-{3345377,3871564,3871513,1000000,1000000},
-{3345378,3871513,3871496,1000000,1000000},
-{3345379,3872040,3872021,0.276709090909091,1000000},
-{3345380,3872021,3872019,0.01124,1000000},
-{3345381,3872618,3872621,0.02672,1000000},
-{3345386,3895536,3895750,1000000,0.111982978723404},
-{3345387,3895750,3896047,1000000,0.105629508196721},
-{3345388,3895101,3895404,0.11917,1000000},
-{3345389,3895404,3895502,0.0372096774193548,1000000},
-{3345390,3875623,3875642,0.0177111111111111,0.0144909090909091},
-{3345391,3875642,3875650,0.00786428571428571,0.00667272727272727},
-{3345392,3875997,3875989,1000000,0.0122307692307692},
-{3345393,3877110,3877226,1000000,0.241846153846154},
-{3345394,3877226,3877242,1000000,0.0266608695652174},
-{3345395,3877719,3877831,0.287775,1000000},
-{3345396,3877831,3877860,0.023895652173913,1000000},
-{3345397,3878316,3878382,0.24715,1000000},
-{3345398,3878382,3878389,0.0230608695652174,1000000},
-{3345399,3878672,3878782,0.391042105263158,1000000},
-{3345400,3878782,3878789,0.0192285714285714,1000000},
-{3345401,3879264,3879235,1000000,0.0415714285714286},
-{3345402,3879235,3879199,1000000,0.0392571428571429},
-{3345403,3879264,3879286,1000000,0.0177375},
-{3345404,3879286,3879303,1000000,0.01119375},
-{3345407,3880031,3880130,1000000,1000000},
-{3345408,3880130,3880146,1000000,1000000},
-{3345409,3880366,3880477,0.22565,0.13539},
-{3345410,3880477,3880497,0.0313714285714286,0.02196},
-{3345411,3880815,3881018,0.514,1000000},
-{3345412,3881018,3881042,0.02736,1000000},
-{3345413,3881468,3881501,1000000,0.0159545454545455},
-{3345414,3881501,3881563,1000000,0.0271714285714286},
-{3345415,3880923,3881157,1000000,0.182475},
-{3345416,3881157,3881175,1000000,0.018},
-{3345417,3880617,3880823,0.08918,0.0723081081081081},
-{3345418,3880823,3880854,0.0092,0.00843333333333333},
-{3345419,3879756,3879945,1000000,1000000},
-{3345420,3879945,3879959,1000000,1000000},
-{3345421,3878780,3879159,1000000,0.387933333333333},
-{3345422,3879159,3879174,1000000,0.02408},
-{3345423,3878724,3878971,1000000,1000000},
-{3345424,3878971,3879011,1000000,1000000},
-{3345425,3878962,3878993,0.0157578947368421,0.0103241379310345},
-{3345426,3881106,3881120,0.01576,0.0139058823529412},
-{3345427,3881120,3881281,0.2067375,0.300709090909091},
-{3345428,3881469,3881518,1000000,1000000},
-{3345429,3881586,3881671,0.045425,1000000},
-{3345430,3881671,3881852,0.1327125,1000000},
-{3345432,3881476,3881507,1000000,0.0160421052631579},
-{3345433,3881507,3882332,1000000,0.65596},
-{3345434,3881709,3881759,0.03284,1000000},
-{3345435,3881759,3882562,0.523736842105263,1000000},
-{3345436,3881754,3881743,0.0254625,0.01358},
-{3345437,3881743,3881722,0.0172588235294118,0.0101172413793103},
-{3345438,3881212,3880997,0.0977769230769231,1000000},
-{3345439,3880997,3880913,0.05541,1000000},
-{3345440,3880545,3880572,0.0211090909090909,1000000},
-{3345441,3880572,3880730,0.0840260869565218,1000000},
-{3345442,3880499,3880532,1000000,0.020895652173913},
-{3345443,3880532,3880730,1000000,0.194871428571429},
-{3345444,3880499,3880485,0.0394941176470588,1000000},
-{3345445,3880485,3880863,0.5244,1000000},
-{3345446,3879824,3879787,1000000,0.11178},
-{3345447,3879787,3879766,1000000,0.0224181818181818},
-{3345459,3895054,3895178,1000000,0.0998842105263158},
-{3345468,3872446,3872616,1000000,0.07132},
-{3345469,3872616,3872630,1000000,0.00714545454545455},
-{3345470,3872628,3872598,0.0133058823529412,0.01131},
-{3345471,3872598,3872446,0.0728210526315789,0.1153},
-{3345472,3872466,3872617,1000000,0.23079512195122},
-{3345473,3872617,3872628,1000000,0.0126714285714286},
-{3345474,3872537,3872615,0.125414634146341,1000000},
-{3345475,3872615,3872664,0.0555166666666667,1000000},
-{3345476,3864520,3864497,0.012552,1000000},
-{3345477,3864653,3864610,0.013725,1000000},
-{3345478,3864610,3864550,0.02252,1000000},
-{3345479,3863203,3863769,0.165293617021277,1000000},
-{3345480,3863769,3864222,0.116173333333333,1000000},
-{3345481,3864236,3863788,0.0919821428571428,1000000},
-{3345527,3877331,3877821,0.435255319148936,0.40914},
-{3345528,3877821,3877869,0.068985,0.0627136363636364},
-{3345529,3878041,3877821,0.0842222222222222,0.0733548387096774},
-{3345530,3878460,3878617,0.103432258064516,0.114514285714286},
-{3345531,3878617,3878760,0.117484615384615,0.109092857142857},
-{3345532,3878617,3879079,0.231985714285714,0.223986206896552},
-{3345533,3879504,3879439,1000000,0.507078260869565},
-{3345534,3879439,3879450,1000000,0.018024},
-{3345535,3878693,3878566,0.0969555555555556,0.0969555555555556},
-{3345536,3879413,3879268,0.0909724137931034,0.065955},
-{3345537,3879268,3878885,0.253285714285714,0.2364},
-{3345538,3878566,3879268,0.342111111111111,0.342111111111111},
-{3345539,3889989,3890263,0.217330434782609,1000000},
-{3345540,3890263,3890551,0.233018181818182,1000000},
-{3345541,3890226,3890288,1000000,0.018075},
-{3345542,3890288,3890694,1000000,0.1272},
-{3345543,3890288,3890514,1000000,1000000},
-{3345544,3890514,3890770,1000000,1000000},
-{3345545,3890263,3890514,1000000,1000000},
-{3345548,3880817,3880717,0.0763555555555556,0.0763555555555556},
-{3345549,3881418,3881185,0.279654545454545,0.25635},
-{3345550,3881185,3880817,0.195511111111111,0.195511111111111},
-{3345551,3880717,3880659,0.0421777777777778,0.0421777777777778},
-{3345552,3880659,3880631,0.0149307692307692,0.0149307692307692},
-{3345553,3895864,3895945,0.0820875,0.0820875},
-{3345554,3880631,3880242,0.240111111111111,0.240111111111111},
-{3345555,3880659,3881052,0.267771428571429,0.224928},
-{3345556,3881052,3881185,0.16035,0.150917647058824},
-{3345557,3881052,3880434,0.451666666666667,0.451666666666667},
-{3345558,3895864,3895945,0.95364,0.95364},
-{3345559,3895945,3896115,0.2934,0.2934},
-{3345560,3896115,3896113,0.197,0.197},
-{3345561,3896115,3896329,0.19132,0.19132},
-{3345562,3895484,3895620,0.323261538461538,0.323261538461538},
-{3345563,3895620,3895707,0.0672521739130435,0.0672521739130435},
-{3345564,3895707,3895864,0.134209090909091,0.134209090909091},
-{3345565,3895620,3895707,1.01478,1.01478},
-{3345566,3881869,3881778,0.0638,0.0638},
-{3345567,3881778,3881652,0.0450888888888889,0.0450888888888889},
-{3345568,3895930,3895832,0.0887142857142857,0.077625},
-{3345569,3895832,3895661,0.1179,0.101057142857143},
-{3345570,3895832,3895830,1000000,1000000},
-{3345571,3892986,3893084,0.0256352941176471,0.0251423076923077},
-{3345572,3893084,3893210,0.036288,0.0355764705882353},
-{3345573,3893096,3893079,0.0941777777777778,0.0941777777777778},
-{3345574,3893096,3893219,0.100033333333333,0.1125375},
-{3345575,3892585,3893096,1.11348888888889,1.15631538461538},
-{3345576,3880180,3880327,0.0928666666666667,0.0928666666666667},
-{3345577,3880327,3880793,0.259955555555556,0.259955555555556},
-{3345578,3881483,3880804,0.297138461538462,0.3219},
-{3345579,3880804,3880576,0.14025,0.1275},
-{3345580,3880327,3880804,0.400266666666667,0.400266666666667},
-{3345581,3882547,3882848,0.191555555555556,0.191555555555556},
-{3345582,3882235,3882424,0.0975111111111111,0.0975111111111111},
-{3345583,3882424,3882547,0.0617555555555556,0.0617555555555556},
-{3345592,3878989,3879083,1000000,1000000},
-{3345593,3879083,3879139,0.0290444444444444,0.0290444444444444},
-{3345594,3879747,3880129,0.207244444444444,0.207244444444444},
-{3345595,3880129,3880310,1000000,1000000},
-{3345659,3897567,3898842,1.14606,1.14606},
-{3345672,3896711,3896566,0.18483,0.18483},
-{3345673,3896566,3896420,0.09651,0.09651},
-{3345674,3897567,3896420,1.28124,1.28124},
-{3345675,3896420,3895568,1.09407,1.09407},
-{3345676,3895568,3895871,0.34284,0.34284},
-{3345678,3896312,3896340,0.0176444444444444,0.0176444444444444},
-{3345679,3896340,3896422,1000000,1000000},
-{3345680,3896422,3896604,1000000,1000000},
-{3345683,3881794,3881190,0.4826625,0.594046153846154},
-{3345684,3881190,3881093,0.09876,0.113953846153846},
-{3345685,3882108,3881446,0.6122,0.6122},
-{3345686,3881446,3881274,0.132133333333333,0.132133333333333},
-{3345687,3881190,3881446,0.198955555555556,0.198955555555556},
-{3345688,3882235,3881886,0.482890909090909,0.482890909090909},
-{3345689,3881886,3881794,0.143727272727273,0.121615384615385},
-{3345690,3882108,3881886,0.192155555555556,0.192155555555556},
-{3345691,3882308,3882202,0.0802,0.0802},
-{3345692,3882202,3882108,0.0875777777777778,0.0875777777777778},
-{3345693,3882308,3882622,0.161355555555556,0.161355555555556},
-{3345694,3882622,3882812,0.0839333333333333,0.0839333333333333},
-{3345695,3882409,3882108,0.165244444444444,0.165244444444444},
-{3345696,3882959,3882805,0.133311111111111,0.133311111111111},
-{3345697,3883124,3883112,0.10245,0.10245},
-{3345698,3883112,3883057,1000000,1000000},
-{3345699,3883934,3883945,1000000,0.0308553191489362},
-{3345700,3883945,3883991,1000000,0.219891428571429},
-{3345701,3883480,3883456,0.190133333333333,0.190133333333333},
-{3345702,3883422,3883377,0.374511111111111,0.374511111111111},
-{3345703,3883887,3883910,1000000,0.0987521739130435},
-{3345704,3883910,3883913,1000000,0.0135829787234043},
-{3345705,3883422,3883910,1000000,1000000},
-{3345706,3883456,3883406,0.0952222222222222,0.0952222222222222},
-{3345707,3883406,3883945,1000000,1000000},
-{3345712,3883975,3883971,1000000,0.0117918367346939},
-{3345713,3883971,3883917,1000000,0.226576744186047},
-{3345714,3883406,3883337,1000000,1000000},
-{3345715,3883337,3883422,1000000,1000000},
-{3345716,3883337,3883097,1000000,1000000},
-{3345719,3883097,3883082,1000000,1000000},
-{3345720,3882990,3883039,0.021456,0.0206307692307692},
-{3345721,3883039,3883377,0.117786206896552,0.110187096774194},
-{3345722,3883082,3883039,1000000,1000000},
-{3345724,3883103,3882959,0.1746,0.1746},
-{3345725,3882817,3882610,0.0778888888888889,0.0778888888888889},
-{3345726,3882610,3881463,1000000,1000000},
-{3345747,3881075,3881224,0.539294117647059,1000000},
-{3345748,3881224,3881182,0.2194125,0.2194125},
-{3345762,3899850,3899859,0.0250333333333333,1000000},
-{3345763,3899759,3899832,0.0189428571428571,1000000},
-{3345764,3899832,3900000,0.0478133333333333,1000000},
-{3345765,3899850,3899832,1000000,0.0244333333333333},
-{3345766,3894782,3894479,0.201827586206897,0.254478260869565},
-{3345767,3894479,3894462,0.0347368421052632,0.0425806451612903},
-{3345768,3894479,3894462,0.4416,0.4416},
-{3345772,3894462,3894472,0.0629090909090909,0.0715862068965517},
-{3345773,3894472,3894488,0.0430263157894737,0.05109375},
-{3345774,3894472,3894488,0.58176,0.58176},
-{3345775,3894488,3894510,0.0566368421052632,0.0614914285714286},
-{3345776,3894510,3894528,0.0371230769230769,0.0438727272727273},
-{3345777,3894510,3894528,0.5841,0.5841},
-{3345778,3894528,3894555,0.0587414634146342,0.0688114285714286},
-{3345779,3894555,3894569,0.030195,0.0326432432432432},
-{3345780,3894569,3894597,0.0802833333333333,0.0825771428571429},
-{3345781,3894555,3894569,0.41034,0.41034},
-{3345782,3894597,3894845,0.121644444444444,0.121644444444444},
-{3345783,3894845,3894993,0.127933333333333,0.127933333333333},
-{3345784,3894887,3894993,0.04494,0.0408545454545455},
-{3345785,3894845,3894887,0.0879555555555556,0.0879555555555556},
-{3345786,3894633,3894833,0.101711111111111,0.0980785714285714},
-{3345787,3894833,3894887,0.0249677419354839,0.0266896551724138},
-{3345788,3894633,3894650,0.0758888888888889,0.0788076923076923},
-{3345789,3894833,3894650,0.184844444444444,0.184844444444444},
-{3345790,3894650,3894680,0.0593090909090909,0.08155},
-{3345791,3894680,3894702,0.0589071428571428,0.0568758620689655},
-{3345792,3894680,3894702,0.62082,0.62082},
-{3345793,3894702,3894757,0.0935111111111111,0.0935111111111111},
-{3345794,3894757,3894781,0.0501857142857143,0.0501857142857143},
-{3345795,3894781,3894820,0.057275,0.057275},
-{3345796,3894757,3894781,1000000,0.56952},
-{3345797,3893542,3894357,1000000,0.26685},
-{3345798,3894357,3894477,0.0721,0.0721},
-{3345799,3894357,3894224,0.0707777777777778,0.0707777777777778},
-{3345800,3893721,3893677,0.02757,0.0306333333333333},
-{3345801,3893718,3893677,0.0351230769230769,0.0480631578947368},
-{3345802,3893677,3893651,0.0232666666666667,0.0273130434782609},
-{3345803,3893651,3893599,0.588046153846154,0.546042857142857},
-{3345804,3893574,3893648,0.113983333333333,0.105215384615385},
-{3345805,3894489,3894376,0.359576470588235,0.38205},
-{3345806,3894376,3894489,0.800742857142857,0.800742857142857},
-{3345807,3894376,3894400,0.432525,0.432525},
-{3345808,3894240,3894285,0.108352941176471,0.0969473684210526},
-{3345809,3893715,3894285,0.311622222222222,0.311622222222222},
-{3345810,3894285,3894872,0.298755555555556,0.298755555555556},
-{3345811,3894285,3894348,0.148366666666667,0.148366666666667},
-{3345812,3894348,3894489,0.346389473684211,0.365633333333333},
-{3345813,3893773,3894348,0.305377777777778,0.305377777777778},
-{3345814,3894348,3894948,0.309777777777778,0.309777777777778},
-{3345815,3893599,3894006,0.665490909090909,0.593545945945946},
-{3345816,3894006,3894021,0.0207555555555556,0.0207555555555556},
-{3345817,3894006,3894400,0.413584615384615,0.384042857142857},
-{3345818,3894826,3894872,0.1287,0.105988235294118},
-{3345819,3894872,3894948,0.119536363636364,0.114339130434783},
-{3345820,3894948,3895418,0.645777777777778,0.645777777777778},
-{3345821,3895418,3895500,0.12468,0.12468},
-{3345822,3896281,3897105,0.347188888888889,0.340876363636364},
-{3345823,3897105,3897302,0.509679069767442,0.509679069767442},
-{3345824,3895500,3897105,1.48542,1.48542},
-{3345825,3894400,3894955,0.3876,0.3876},
-{3345826,3894955,3895418,0.241933333333333,0.241933333333333},
-{3345827,3895464,3895509,0.0302222222222222,0.0302222222222222},
-{3345828,3895509,3895874,0.252555555555556,0.252555555555556},
-{3345829,3895464,3895509,0.73032,0.73032},
-{3345834,3899288,3899175,0.0734086956521739,0.07035},
-{3345835,3899175,3898853,0.162876923076923,0.192490909090909},
-{3345836,3899188,3899175,0.356666666666667,0.356666666666667},
-{3345837,3898549,3898717,0.0878454545454546,0.080525},
-{3345838,3898717,3898853,0.0645,0.06192},
-{3345839,3898717,3899036,0.58086,0.58086},
-{3345840,3897942,3898038,0.12186,0.12186},
-{3345841,3898038,3898279,0.3291,0.3291},
-{3345842,3898279,3898327,1000000,0.0422842105263158},
-{3345843,3898327,3898397,1000000,0.0609},
-{3345844,3898038,3898327,0.40158,0.40158},
-{3345845,3896764,3896871,0.0605076923076923,0.0605076923076923},
-{3345846,3896871,3896912,0.06624,0.06624},
-{3345847,3896912,3896884,0.25122,0.25122},
-{3345848,3896884,3896912,0.24948,0.24948},
-{3345849,3897626,3898009,0.322028571428571,0.322028571428571},
-{3345850,3898009,3898084,0.05625,0.05625},
-{3345851,3898009,3897781,0.32586,0.32586},
-{3345852,3896871,3897024,0.100881818181818,0.100881818181818},
-{3345853,3897024,3897048,0.0244105263157895,0.019325},
-{3345854,3897048,3897301,0.2346,0.170618181818182},
-{3345855,3896782,3896992,0.55158,0.55158},
-{3345856,3896782,3896992,0.31164,0.31164},
-{3345857,3896885,3896782,0.18552,0.18552},
-{3345858,3896992,3897079,0.17364,0.17364},
-{3345859,3896885,3897079,0.3126,0.3126},
-{3345860,3897024,3896969,1000000,0.11058},
-{3345861,3896969,3896885,0.14418,0.14418},
-{3345862,3897079,3897161,0.1494,0.1494},
-{3345863,3897161,3897048,1000000,0.38112},
-{3345864,3896969,3897161,0.30804,0.30804},
-{3345867,3895420,3895611,0.115955555555556,0.13045},
-{3345868,3895611,3895722,0.042975,0.0509333333333333},
-{3345869,3895596,3895722,0.249555555555556,0.249555555555556},
-{3345870,3895611,3895596,0.217488888888889,0.217488888888889},
-{3345871,3895567,3895596,0.0521555555555556,0.0521555555555556},
-{3345872,3895288,3895567,0.176644444444444,0.176644444444444},
-{3345873,3895084,3895144,0.0330933333333333,0.0323739130434783},
-{3345874,3895144,3895288,0.118630434782609,0.121266666666667},
-{3345875,3895144,3895095,0.66738,0.66738},
-{3345876,3896104,3896346,1000000,1000000},
-{3345877,3896346,3896356,0.171777777777778,0.171777777777778},
-{3345878,3896104,3896103,0.367892307692308,0.367892307692308},
-{3345879,3896103,3896102,0.101294117647059,0.1148},
-{3345880,3896183,3896103,0.0639428571428571,0.0639428571428571},
-{3345881,3895359,3895498,0.147466666666667,0.147466666666667},
-{3345882,3895498,3895567,0.0900888888888889,0.0900888888888889},
-{3345883,3896534,3896567,0.02415,0.02415},
-{3345884,3896567,3896672,0.0845538461538461,0.0845538461538461},
-{3345885,3896567,3896672,0.79314,0.79314},
-{3345886,3896672,3896788,0.0991777777777778,0.0991777777777778},
-{3345887,3896788,3896934,0.0867333333333333,0.0867333333333333},
-{3345888,3896788,3896934,0.76092,0.76092},
-{3345889,3896934,3897068,0.1116,0.1116},
-{3345890,3897068,3897194,0.0819777777777778,0.0819777777777778},
-{3345891,3897194,3897373,0.126333333333333,0.131192307692308},
-{3345892,3897068,3897194,0.75252,0.75252},
-{3346101,3891654,3891731,0.179266666666667,0.179266666666667},
-{3346104,3909360,3908514,0.345218181818182,0.37974},
-{3346105,3908514,3908391,0.0761333333333333,0.0489428571428571},
-{3346171,3901401,3900367,0.407818181818182,0.407818181818182},
-{3346177,3897471,3897438,1000000,1000000},
-{3346180,3897438,3897060,1000000,1000000},
-{3346200,3876882,3876867,0.031025,0.0338454545454545},
-{3346201,3877270,3877189,0.17105,0.241482352941176},
-{3346202,3877189,3877167,0.0344888888888889,0.037248},
-{3346203,3876882,3877189,1000000,1000000},
-{3346212,3877134,3877049,0.109483333333333,0.119436363636364},
-{3346213,3877049,3876882,0.251148387096774,0.288355555555556},
-{3346214,3877049,3876752,0.113933333333333,0.113933333333333},
-{3346252,3870375,3870348,0.266861538461538,1000000},
-{3346630,3921875,3923177,0.385064150943396,0.385064150943396},
-{3346631,3923177,3923334,0.0502581818181818,0.0493607142857143},
-{3346632,3923177,3923641,0.343622222222222,0.343622222222222},
-{3346652,3886688,3886700,1000000,0.032},
-{3346653,3886740,3886688,1000000,0.0332857142857143},
-{3346654,3886700,3886737,1000000,0.0229578947368421},
-{3346655,3886737,3886740,1000000,0.0309},
-{3346686,3920542,3920413,0.1863,0.1863},
-{3346687,3920473,3920634,0.24462,0.24462},
-{3346688,3920814,3920634,1000000,1000000},
-{3346702,3922730,3923205,0.406311111111111,0.378289655172414},
-{3346703,3922734,3923002,0.156,0.160588235294118},
-{3346704,3922730,3922734,0.03582,1000000},
-{3346705,3922556,3922674,0.0759111111111111,0.05856},
-{3346706,3922734,3922674,0.0369642857142857,1000000},
-{3346707,3922345,3922670,0.150670588235294,0.1423},
-{3346708,3922674,3922670,0.03612,1000000},
-{3346709,3922670,3922730,0.0359612903225806,1000000},
-{3346722,3918497,3918288,0.122525,1000000},
-{3346723,3918288,3918141,0.0842666666666667,1000000},
-{3346724,3918647,3918293,1000000,0.186931034482759},
-{3346725,3918293,3918141,1000000,0.06228},
-{3346726,3918288,3918293,0.0406173913043478,1000000},
-{3346731,3915096,3915518,0.418328571428571,0.325366666666667},
-{3346732,3915518,3915952,0.2298,0.211416},
-{3346733,3907039,3907029,0.0253,1000000},
-{3346734,3907106,3907048,0.0411,1000000},
-{3346735,3907048,3907039,0.009225,1000000},
-{3346736,3907001,3906913,0.0301161290322581,1000000},
-{3346737,3907048,3907001,0.01273125,1000000},
-{3347453,3877796,3878226,0.233133333333333,0.233133333333333},
-{3347454,3877745,3877753,1000000,1000000},
-{3347455,3877796,3877745,0.0423333333333333,1000000},
-{3347457,3877845,3877760,0.3016,1000000},
-{3347458,3877760,3877753,1000000,1000000},
-{3347459,3877796,3877760,1000000,0.0361},
-{3347473,3858640,3858827,1000000,1000000},
-{3347474,3858827,3859100,1000000,1000000},
-{3347475,3859281,3858640,0.245977777777778,0.245977777777778},
-{3347476,3859883,3859607,0.178036363636364,0.1632},
-{3347477,3859607,3859100,0.39021,0.312168},
-{3347478,3859281,3859607,0.239025,0.224964705882353},
-{3347521,3894321,3895210,0.490355555555556,0.490355555555556},
-{3347522,3895210,3894181,0.6242,0.6242},
-{3347523,3894321,3894428,0.0900222222222222,0.097224},
-{3347524,3894428,3894532,0.174466666666667,0.15702},
-{3347525,3894428,3893838,0.371022222222222,0.371022222222222},
-{3347765,3872530,3872485,1000000,0.0561076923076923},
-{3347766,3872485,3872398,1000000,0.150284210526316},
-{3347767,3872398,3872500,1000000,0.106152941176471},
-{3347768,3872500,3872551,1000000,0.0593181818181818},
-{3347769,3872485,3872500,0.00869268292682927,1000000},
-{3347770,3872398,3872341,0.0499525423728814,0.0556075471698113},
-{3347771,3872341,3872188,0.209266666666667,0.21973},
-{3347773,3872844,3872656,0.150701694915254,1000000},
-{3347774,3872844,3872624,1000000,0.169958490566038},
-{3347775,3872084,3872303,0.1998,1000000},
-{3347776,3872303,3872414,0.100984615384615,1000000},
-{3347777,3872594,3872485,0.23766,0.35649},
-{3347778,3872346,3872394,0.0509837837837838,1000000},
-{3347779,3872394,3872414,0.0258428571428571,1000000},
-{3347780,3872484,3872490,1000000,0.00444489795918367},
-{3347781,3872490,3872524,1000000,0.0318409090909091},
-{3347782,3872303,3872394,0.0323769230769231,1000000},
-{3347783,3872394,3872490,0.0738461538461539,0.0436363636363636},
-{3347784,3872490,3872538,0.04098,0.0482117647058823},
-{3347785,3872538,3872594,0.0423818181818182,0.0717230769230769},
-{3347788,3872624,3872530,1000000,0.089925},
-{3347789,3872656,3872551,0.0899,1000000},
-{3348171,3847694,3846821,0.33440625,0.324272727272727},
-{3348172,3846700,3846821,0.341,0.341},
-{3348489,3848689,3848099,1000000,1000000},
-{3349230,3848569,3853483,1000000,1000000},
-{3349231,3847766,3848569,1000000,1000000},
-{3349232,3849451,3848362,1000000,1000000},
-{3349280,3851142,3850951,0.1456,0.1456},
-{3350290,3854813,3854860,0.388996363636364,0.38205},
-{3350291,3858719,3858906,0.0618,0.0618},
-{3350292,3858393,3859169,0.203585454545455,0.211267924528302},
-{3350293,3858253,3858439,0.950444444444444,0.950444444444444},
-{3350299,3850035,3848439,1.15786666666667,1.15786666666667},
-{3350300,3850010,3849472,0.26508,0.26508},
-{3350301,3857996,3855897,1000000,1000000},
-{3350302,3856249,3856523,0.159872727272727,0.138836842105263},
-{3350303,3856523,3857568,0.358725,0.326113636363636},
-{3350304,3855305,3855176,0.2877,0.309830769230769},
-{3350305,3854220,3854212,0.44084347826087,0.44084347826087},
-{3350306,3854212,3854211,0.030552,0.030552},
-{3350307,3853763,3853750,0.258254545454545,0.258254545454545},
-{3350308,3853750,3853749,0.0311090909090909,0.0311090909090909},
-{3350309,3853241,3853374,0.201581818181818,0.201581818181818},
-{3350310,3853374,3853428,0.0681818181818182,0.0681818181818182},
-{3350311,3852830,3852823,0.150454545454545,0.150454545454545},
-{3350312,3852823,3852822,0.0771636363636364,0.0771636363636364},
-{3350313,3852268,3852256,0.165890909090909,0.165890909090909},
-{3350314,3851730,3851745,0.0237272727272727,0.0237272727272727},
-{3350315,3851745,3851816,0.107381818181818,0.107381818181818},
-{3350316,3851730,3850999,0.259290909090909,0.259290909090909},
-{3350317,3850324,3854647,0.795447619047619,0.759290909090909},
-{3350318,3851836,3854759,2.16264,2.16264},
-{3350322,3858326,3857996,1000000,1000000},
-{3350323,3858506,3858492,0.0222218181818182,0.0207152542372881},
-{3350324,3858492,3858664,0.0719265306122449,1000000},
-{3350327,3849531,3848840,0.303324324324324,0.267214285714286},
-{3350328,3852415,3851695,0.292605,0.325116666666667},
-{3350329,3851695,3849531,0.737723076923077,0.701736585365854},
-{3350330,3851741,3851276,0.244888888888889,0.244888888888889},
-{3350331,3851276,3851142,0.0971111111111111,0.0971111111111111},
-{3350412,3920856,3915583,3.93036,3.93036},
-{3359922,3883021,3882955,0.0757058823529412,1000000},
-{3359923,3884105,3883330,1000000,0.578714285714286},
-{3359924,3883330,3883267,1000000,0.05847},
-{3359925,3883021,3883330,1000000,1000000},
-{3361616,3846821,3844192,0.715513636363636,0.850881081081081},
-{3361622,3889450,3889129,0.30834,0.30834},
-{3361623,3889450,3888936,0.32184,0.32184},
-{3361624,3889884,3889760,0.12858,0.12858},
-{3361625,3889760,3889450,0.31098,0.31098},
-{3361626,3889760,3889536,0.13506,0.13506},
-{3361627,3889536,3889277,0.18624,0.18624},
-{3361631,3885968,3886258,0.27591,0.27591},
-{3361632,3889165,3888287,0.81453,0.81453},
-{3361633,3889504,3889165,0.34032,0.34032},
-{3361634,3886258,3886560,0.346042105263158,0.346042105263158},
-{3361638,3889830,3889504,0.32241,0.32241},
-{3361639,3888847,3889830,0.61137,0.61137},
-{3361640,3889212,3888847,0.32724,0.32724},
-{3361641,3889504,3888475,0.62061,0.62061},
-{3361642,3888847,3888475,0.32493,0.32493},
-{3361643,3888109,3889165,0.62385,0.62385},
-{3361644,3888475,3888109,0.32604,0.32604},
-{3361646,3886865,3887827,0.60423,0.60423},
-{3361647,3888189,3887827,0.32598,0.32598},
-{3361648,3887827,3887997,0.09075,0.09075},
-{3361649,3887997,3888847,0.49566,0.49566},
-{3361650,3888475,3887612,0.49311,0.49311},
-{3361651,3887997,3887612,0.33003,0.33003},
-{3361652,3887612,3887415,0.09774,0.09774},
-{3361653,3887415,3886560,0.5961,0.5961},
-{3361654,3886258,3887098,0.60759,0.60759},
-{3361655,3887098,3888109,0.58539,0.58539},
-{3361656,3887415,3887098,0.32304,0.32304},
-{3361660,3894181,3893714,0.465488888888889,0.465488888888889},
-{3361661,3893714,3893424,0.306555555555556,0.306555555555556},
-{3361662,3893714,3893976,0.999022222222222,0.999022222222222},
-{3361663,3890171,3890130,0.04344,0.04344},
-{3361664,3890130,3889830,0.32457,0.32457},
-{3361665,3890130,3889497,0.42789,0.42789},
-{3361666,3889497,3889212,0.18834,0.18834},
-{3361667,3889497,3889837,0.32964,0.32964},
-{3361668,3889837,3890144,0.34284,0.34284},
-{3361671,3889212,3888335,0.50892,0.50892},
-{3361675,3889837,3888758,0.66771,0.66771},
-{3361737,3871350,3871315,0.327514285714286,0.299034782608696},
-{3362217,3890281,3890312,0.124688888888889,0.124688888888889},
-{3362225,3882011,3882065,1000000,1000000},
-{3362226,3882065,3882743,1000000,1000000},
-{3362227,3882065,3881940,0.08082,0.08082},
-{3362259,3890795,3890303,0.128372727272727,0.131358139534884},
-{3362260,3890303,3889886,0.134178947368421,0.124360975609756},
-{3362261,3890303,3890312,0.0180888888888889,0.0180888888888889},
-{3362317,3872701,3873465,1000000,1000000},
-{3362318,3873465,3873204,1000000,1000000},
-{3362319,3873287,3873716,1000000,1000000},
-{3362320,3873716,3873825,1000000,1000000},
-{3362321,3873716,3873819,1000000,1000000},
-{3362322,3873465,3873503,1000000,1000000},
-{3362323,3873045,3873503,1000000,1000000},
-{3362324,3873503,3873719,1000000,1000000},
-{3362327,3871568,3871798,0.1488,0.1488},
-{3362328,3871798,3871822,0.0123157894736842,0.0123157894736842},
-{3362329,3872009,3871244,0.209045454545455,0.2555},
-{3362330,3871798,3872009,1000000,1000000},
-{3362331,3871798,3871552,1000000,1000000},
-{3362333,3871237,3871495,1000000,1000000},
-{3362334,3871495,3872308,1000000,1000000},
-{3362335,3871769,3871575,1000000,1000000},
-{3362336,3871495,3871575,1000000,1000000},
-{3362339,3872308,3872816,1000000,1000000},
-{3362340,3872816,3872867,1000000,1000000},
-{3362341,3871769,3872816,1000000,1000000},
-{3362342,3872816,3872882,1000000,1000000},
-{3362343,3872308,3872772,1000000,1000000},
-{3362350,3892896,3892710,1000000,1000000},
-{3362351,3892710,3892510,1000000,1000000},
-{3362352,3892710,3892878,1000000,1000000},
-{3362353,3893440,3893436,1000000,1000000},
-{3362354,3892878,3893440,1000000,1000000},
-{3362355,3893492,3893440,1000000,1000000},
-{3362356,3893759,3893982,0.178309090909091,0.178309090909091},
-{3362357,3893492,3893602,1000000,1000000},
-{3362358,3893602,3893759,1000000,1000000},
-{3362359,3893982,3893733,1000000,1000000},
-{3362360,3893602,3893733,1000000,1000000},
-{3362361,3892878,3893352,1000000,1000000},
-{3362362,3893352,3893492,1000000,1000000},
-{3362363,3893329,3893497,0.1938,0.162792},
-{3362364,3893497,3893759,0.264,0.276},
-{3362365,3893222,3893154,1000000,1000000},
-{3362366,3893154,3892896,1000000,1000000},
-{3362367,3893352,3893422,1000000,1000000},
-{3362368,3893422,3893497,1000000,1000000},
-{3362369,3893154,3893422,1000000,1000000},
-{3362370,3893422,3893602,1000000,1000000},
-{3362371,3892726,3892550,1000000,1000000},
-{3362372,3893982,3893455,1000000,1000000},
-{3362373,3893455,3893406,1000000,1000000},
-{3362374,3892708,3892779,1000000,1000000},
-{3362375,3892779,3893406,1000000,1000000},
-{3362376,3892726,3893083,1000000,1000000},
-{3362377,3892779,3893083,1000000,1000000},
-{3362378,3893733,3893436,1000000,1000000},
-{3362379,3893083,3893428,1000000,1000000},
-{3362380,3893428,3893436,1000000,1000000},
-{3362381,3893083,3893430,1000000,1000000},
-{3362382,3893430,3893455,1000000,1000000},
-{3362383,3893428,3893430,1000000,1000000},
-{3362384,3889711,3889747,1000000,1000000},
-{3362385,3889747,3890088,1000000,1000000},
-{3362386,3890065,3890031,1000000,1000000},
-{3362391,3890031,3890469,1000000,1000000},
-{3362392,3890469,3890924,1000000,1000000},
-{3362393,3890031,3890469,1000000,1000000},
-{3362394,3890088,3890156,0.0407454545454545,0.0407454545454545},
-{3362395,3890156,3890590,0.52545,0.52545},
-{3362402,3873733,3873486,1000000,1000000},
-{3362405,3873733,3873766,0.0145285714285714,0.0141906976744186},
-{3362415,3883331,3883349,1000000,1000000},
-{3362416,3884023,3884123,1000000,1000000},
-{3362467,3846404,3846522,0.247866666666667,0.247866666666667},
-{3362509,3874818,3874633,1000000,0.0491727272727273},
-{3362510,3874633,3874532,1000000,0.018734693877551},
-{3362511,3874633,3874994,1000000,1000000},
-{3362512,3875410,3875446,0.0130772727272727,0.01644},
-{3362513,3875446,3875487,0.0120409090909091,0.0143189189189189},
-{3362514,3875446,3875230,1000000,1000000},
-{3362515,3875230,3874994,1000000,1000000},
-{3362516,3875338,3875230,1000000,1000000},
-{3362517,3874277,3874930,1000000,1000000},
-{3362518,3875338,3875218,1000000,1000000},
-{3362519,3875218,3874930,1000000,1000000},
-{3362520,3875218,3875028,1000000,1000000},
-{3362521,3875288,3875028,1000000,1000000},
-{3362522,3875288,3875338,1000000,1000000},
-{3362523,3875028,3874632,1000000,1000000},
-{3362524,3874632,3874277,1000000,1000000},
-{3362525,3874137,3874076,1000000,1000000},
-{3362526,3874632,3874213,1000000,1000000},
-{3362527,3874213,3874137,1000000,1000000},
-{3362528,3874367,3874213,1000000,1000000},
-{3362529,3874420,3874367,1000000,1000000},
-{3362530,3874576,3874420,1000000,1000000},
-{3362531,3874571,3874457,1000000,1000000},
-{3362532,3874457,3874420,1000000,1000000},
-{3362533,3874571,3874964,1000000,1000000},
-{3362534,3875724,3875477,1000000,1000000},
-{3362535,3875477,3875288,1000000,1000000},
-{3362536,3876677,3875950,1000000,1000000},
-{3362538,3875477,3875950,1000000,1000000},
-{3362539,3875950,3875724,1000000,1000000},
-{3362540,3876504,3875724,1000000,1000000},
-{3362543,3875477,3875353,1000000,1000000},
-{3362544,3875353,3874576,1000000,1000000},
-{3362545,3875724,3875459,1000000,1000000},
-{3362546,3875459,3875353,1000000,1000000},
-{3362547,3875459,3874964,1000000,1000000},
-{3362549,3875051,3875052,1000000,1000000},
-{3362550,3874725,3874964,1000000,1000000},
-{3362551,3874725,3874515,1000000,1000000},
-{3362552,3874515,3874471,1000000,1000000},
-{3362553,3874725,3874531,1000000,1000000},
-{3362554,3874531,3874424,1000000,1000000},
-{3362555,3875525,3875459,1000000,1000000},
-{3362556,3874795,3874725,1000000,1000000},
-{3362557,3875525,3874795,1000000,1000000},
-{3362558,3875058,3874795,1000000,1000000},
-{3362565,3874642,3874445,1000000,1000000},
-{3362566,3874795,3874572,1000000,1000000},
-{3362567,3874445,3874572,1000000,1000000},
-{3362568,3875052,3875053,1000000,1000000},
-{3362569,3875053,3875058,1000000,1000000},
-{3362570,3874572,3874914,1000000,1000000},
-{3362571,3874914,3874642,1000000,1000000},
-{3362572,3875053,3874914,1000000,1000000},
-{3362575,3875525,3875275,1000000,1000000},
-{3362576,3875275,3875058,1000000,1000000},
-{3362577,3875669,3875572,1000000,1000000},
-{3362578,3875572,3875275,1000000,1000000},
-{3362579,3875572,3875191,1000000,1000000},
-{3362580,3875191,3875053,1000000,1000000},
-{3362581,3875900,3875191,1000000,1000000},
-{3362582,3875900,3876004,1000000,1000000},
-{3362601,3872043,3871083,1000000,0.1766},
-{3362602,3871083,3871032,1000000,0.0128266666666667},
-{3362603,3871105,3871083,1000000,1000000},
-{3362604,3871194,3871105,1000000,1000000},
-{3362605,3871346,3871194,1000000,1000000},
-{3362606,3872790,3871105,1000000,1000000},
-{3362610,3872487,3872107,1000000,1000000},
-{3362611,3872197,3872107,1000000,1000000},
-{3362612,3872107,3871733,1000000,1000000},
-{3362613,3871733,3871346,1000000,1000000},
-{3362614,3872197,3871733,1000000,1000000},
-{3362615,3872242,3872197,1000000,1000000},
-{3362616,3872242,3871992,1000000,1000000},
-{3362617,3871725,3871766,0.029125,0.0183947368421053},
-{3362618,3871766,3871812,0.0337304347826087,0.0204157894736842},
-{3362619,3871992,3871766,1000000,1000000},
-{3362620,3873283,3873249,1000000,1000000},
-{3362621,3873067,3872626,1000000,1000000},
-{3362622,3872642,3872300,1000000,1000000},
-{3362623,3872300,3872242,1000000,1000000},
-{3362624,3872626,3872300,1000000,1000000},
-{3362625,3873249,3873229,1000000,1000000},
-{3362626,3873229,3873067,1000000,1000000},
-{3362628,3872790,3872318,1000000,1000000},
-{3362629,3872318,3872107,1000000,1000000},
-{3362630,3873139,3872318,1000000,1000000},
-{3362631,3872928,3872790,1000000,1000000},
-{3362632,3874277,3873712,1000000,1000000},
-{3362633,3873712,3873229,1000000,1000000},
-{3362634,3873229,3873258,1000000,1000000},
-{3362635,3873258,3873139,1000000,1000000},
-{3362636,3873712,3873392,1000000,1000000},
-{3362637,3873392,3873258,1000000,1000000},
-{3362638,3873392,3873180,1000000,1000000},
-{3362639,3873180,3873139,1000000,1000000},
-{3362640,3873139,3872970,1000000,1000000},
-{3362641,3872970,3872928,1000000,1000000},
-{3362642,3873180,3873203,1000000,1000000},
-{3362643,3873203,3872970,1000000,1000000},
-{3362644,3874930,3873565,1000000,1000000},
-{3362645,3873565,3872928,1000000,1000000},
-{3362646,3873565,3873203,1000000,1000000},
-{3362647,3873565,3873392,1000000,1000000},
-{3362648,3873334,3872940,0.15404,0.149070967741935},
-{3362649,3872940,3872142,0.273268965517241,0.240145454545455},
-{3362650,3872069,3872075,1000000,1000000},
-{3362651,3872115,3872075,1000000,1000000},
-{3362652,3872106,3872142,0.0216,0.02},
-{3362653,3872115,3872106,1000000,1000000},
-{3362654,3872047,3872035,1000000,1000000},
-{3362655,3871884,3871437,1000000,1000000},
-{3362656,3872069,3871884,1000000,1000000},
-{3362657,3872075,3871959,1000000,1000000},
-{3362658,3871959,3871884,1000000,1000000},
-{3362659,3871437,3871817,0.248530434782609,0.219853846153846},
-{3362660,3872115,3871959,1000000,1000000},
-{3362661,3872305,3872981,0.135266666666667,1000000},
-{3362662,3872981,3873387,0.09822,1000000},
-{3362663,3873130,3872840,1000000,1000000},
-{3362664,3872840,3872981,1000000,1000000},
-{3362665,3872940,3872563,1000000,1000000},
-{3362666,3872563,3872115,1000000,1000000},
-{3362667,3872777,3873130,1000000,1000000},
-{3362668,3872777,3872840,1000000,1000000},
-{3362669,3872777,3872563,1000000,1000000},
-{3362670,3872350,3872777,1000000,1000000},
-{3362671,3872057,3872069,1000000,1000000},
-{3362672,3872350,3872057,1000000,1000000},
-{3362673,3872057,3871683,1000000,1000000},
-{3362674,3871858,3872023,1000000,1000000},
-{3362675,3872023,3872057,1000000,1000000},
-{3362676,3871941,3871989,1000000,1000000},
-{3362677,3871989,3872350,1000000,1000000},
-{3362678,3872023,3871989,1000000,1000000},
-{3362679,3871941,3871832,1000000,1000000},
-{3362683,3869175,3868849,0.136384615384615,0.126642857142857},
-{3362684,3869443,3869057,0.18372,0.177793548387097},
-{3362685,3869057,3868849,0.142625,0.148826086956522},
-{3362686,3869175,3869057,1000000,1000000},
-{3362687,3869792,3869664,0.0546642857142857,0.0463818181818182},
-{3362688,3869664,3869175,0.169858064516129,0.146266666666667},
-{3362689,3869601,3870504,0.706061538461538,0.7649},
-{3362690,3870504,3870995,0.210432,0.26304},
-{3362691,3869956,3869975,0.0110545454545455,0.0130285714285714},
-{3362692,3869975,3869601,0.431485714285714,0.635873684210526},
-{3362693,3870504,3869975,1000000,1000000},
-{3362722,3862546,3862566,0.0113555555555556,0.0113555555555556},
-{3362723,3862566,3862596,0.0165333333333333,0.0165333333333333},
-{3362724,3862546,3862381,1000000,0.0514576271186441},
-{3362725,3862381,3862165,1000000,0.0700372881355932},
-{3362726,3862566,3862381,1000000,1000000},
-{3362727,3862475,3862320,0.0456387096774193,1000000},
-{3362728,3862320,3862075,0.0713322580645161,1000000},
-{3362729,3862381,3862320,1000000,1000000},
-{3362730,3862475,3862455,1000000,0.0202875},
-{3362731,3862455,3862069,1000000,0.310231578947368},
-{3362732,3862320,3862455,1000000,1000000},
-{3362733,3863539,3863563,0.015,0.01},
-{3362734,3863464,3863081,0.160378125,1000000},
-{3362735,3863532,3863138,1000000,0.164862295081967},
-{3362736,3878815,3879133,0.161823529411765,1000000},
-{3362737,3879133,3879365,0.120247058823529,1000000},
-{3362738,3879133,3879091,1000000,1000000},
-{3362739,3880149,3879822,0.202986206896552,1000000},
-{3362740,3879822,3879461,0.182941935483871,1000000},
-{3362741,3878667,3878662,0.1745625,0.22344},
-{3362742,3878662,3878665,0.0805263157894737,0.0765},
-{3362743,3878737,3878662,1000000,1000000},
-{3362744,3878737,3878736,1000000,1000000},
-{3362745,3879091,3878917,1000000,1000000},
-{3362746,3878917,3878737,1000000,1000000},
-{3362747,3878736,3878917,1000000,1000000},
-{3362748,3878736,3878735,1000000,1000000},
-{3362749,3878665,3878663,0.0172615384615385,0.0172615384615385},
-{3362750,3878663,3878655,0.195746341463415,0.191085714285714},
-{3362751,3878735,3878663,1000000,1000000},
-{3362752,3878655,3879016,1000000,1000000},
-{3362753,3879016,3879074,1000000,1000000},
-{3362754,3879074,3879073,1000000,1000000},
-{3362755,3878735,3879154,1000000,1000000},
-{3362756,3879154,3879016,1000000,1000000},
-{3362757,3879154,3879168,1000000,1000000},
-{3362758,3879074,3879313,1000000,1000000},
-{3362759,3879461,3879300,0.0602516129032258,1000000},
-{3362760,3879300,3878635,0.37482,1000000},
-{3362761,3879313,3879300,1000000,1000000},
-{3362762,3879154,3879327,1000000,1000000},
-{3362763,3879327,3879313,1000000,1000000},
-{3362764,3879313,3879514,1000000,1000000},
-{3362765,3879327,3879514,1000000,1000000},
-{3362766,3879514,3879537,1000000,1000000},
-{3362767,3879537,3879305,1000000,1000000},
-{3362768,3879305,3879309,1000000,1000000},
-{3362769,3879305,3879194,1000000,1000000},
-{3362770,3879537,3879627,1000000,1000000},
-{3362771,3879627,3879785,1000000,1000000},
-{3362772,3879785,3879704,1000000,1000000},
-{3362773,3879785,3879836,1000000,1000000},
-{3362774,3879627,3879692,1000000,1000000},
-{3362775,3879692,3879822,1000000,1000000},
-{3362776,3879692,3879853,1000000,1000000},
-{3362777,3880902,3880218,1000000,0.496314285714286},
-{3362778,3880218,3879549,1000000,0.328694117647059},
-{3362779,3880218,3880503,1000000,1000000},
-{3362780,3879822,3879802,1000000,1000000},
-{3362781,3879802,3880034,1000000,1000000},
-{3362782,3880034,3880218,1000000,1000000},
-{3362783,3880034,3880504,1000000,1000000},
-{3362784,3879802,3879555,1000000,1000000},
-{3362785,3879555,3879484,1000000,1000000},
-{3362786,3879891,3880034,1000000,1000000},
-{3362787,3879555,3879891,1000000,1000000},
-{3362788,3879555,3879596,1000000,1000000},
-{3362789,3879596,3879891,1000000,1000000},
-{3362790,3879596,3879520,1000000,1000000},
-{3362791,3879627,3879628,1000000,1000000},
-{3362792,3873751,3872938,0.384171428571429,0.384171428571429},
-{3362793,3873751,3873587,1000000,1000000},
-{3362794,3874096,3873697,1000000,1000000},
-{3362795,3874238,3874298,1000000,1000000},
-{3362796,3874298,3875050,1000000,1000000},
-{3362797,3874303,3874298,1000000,1000000},
-{3362798,3874096,3874144,1000000,1000000},
-{3362799,3874144,3874303,1000000,1000000},
-{3362800,3874307,3874144,1000000,1000000},
-{3362801,3874303,3874307,1000000,1000000},
-{3362802,3874323,3874307,1000000,1000000},
-{3362803,3873945,3874096,1000000,1000000},
-{3362804,3874323,3874160,1000000,1000000},
-{3362805,3874160,3873945,1000000,1000000},
-{3362806,3874497,3874323,1000000,1000000},
-{3362807,3874160,3874446,1000000,1000000},
-{3362808,3874446,3874497,1000000,1000000},
-{3362809,3874224,3873945,1000000,1000000},
-{3362810,3874446,3874295,1000000,1000000},
-{3362811,3874295,3874224,1000000,1000000},
-{3362812,3874770,3874688,1000000,1000000},
-{3362813,3874688,3874497,1000000,1000000},
-{3362814,3874307,3874688,1000000,1000000},
-{3362815,3874718,3874770,1000000,1000000},
-{3362816,3874946,3874770,1000000,1000000},
-{3362817,3874295,3874674,1000000,1000000},
-{3362818,3874674,3874770,1000000,1000000},
-{3362819,3874946,3875132,1000000,1000000},
-{3362820,3875425,3874946,1000000,1000000},
-{3362821,3875425,3875812,1000000,1000000},
-{3362822,3875812,3875132,1000000,1000000},
-{3362823,3874718,3875341,1000000,1000000},
-{3362824,3875341,3875425,1000000,1000000},
-{3362825,3875568,3875341,1000000,1000000},
-{3362826,3875568,3876131,1000000,1000000},
-{3362827,3876064,3875050,1000000,1000000},
-{3362828,3876131,3876176,1000000,1000000},
-{3362829,3876176,3876064,1000000,1000000},
-{3362830,3876176,3876242,1000000,1000000},
-{3362831,3876061,3876085,1000000,1000000},
-{3362832,3876085,3876064,1000000,1000000},
-{3362833,3876190,3876085,1000000,1000000},
-{3362834,3875132,3875073,1000000,1000000},
-{3362835,3875073,3874674,1000000,1000000},
-{3362836,3875727,3875716,1000000,1000000},
-{3362837,3875812,3876050,1000000,1000000},
-{3362838,3876187,3876050,1000000,1000000},
-{3362839,3875952,3876187,1000000,1000000},
-{3362840,3876050,3875982,1000000,1000000},
-{3362841,3875982,3875568,1000000,1000000},
-{3362842,3875982,3876028,1000000,1000000},
-{3362843,3876093,3875952,1000000,1000000},
-{3362844,3876215,3876093,1000000,1000000},
-{3362845,3876187,3876556,1000000,1000000},
-{3362846,3876265,3876650,1000000,1000000},
-{3362847,3876242,3876257,1000000,1000000},
-{3362848,3876257,3876190,1000000,1000000},
-{3362850,3876257,3876490,1000000,1000000},
-{3362851,3876490,3876524,1000000,1000000},
-{3362852,3876556,3876526,1000000,1000000},
-{3362853,3876526,3876093,1000000,1000000},
-{3362854,3876215,3876526,1000000,1000000},
-{3362855,3876490,3876576,1000000,1000000},
-{3362856,3876576,3876504,1000000,1000000},
-{3362857,3876755,3876576,1000000,1000000},
-{3362858,3876755,3876820,1000000,1000000},
-{3362859,3876820,3876843,1000000,1000000},
-{3362860,3876028,3876705,1000000,1000000},
-{3362861,3876705,3876755,1000000,1000000},
-{3362862,3876028,3876724,1000000,1000000},
-{3362863,3876724,3876705,1000000,1000000},
-{3362864,3876820,3876813,1000000,1000000},
-{3362865,3876813,3876677,1000000,1000000},
-{3362866,3876724,3876813,1000000,1000000},
-{3362867,3876187,3876428,1000000,1000000},
-{3362868,3876428,3876615,1000000,1000000},
-{3362869,3876615,3876556,1000000,1000000},
-{3362870,3876724,3876737,1000000,1000000},
-{3362871,3876737,3876428,1000000,1000000},
-{3362872,3876935,3876737,1000000,1000000},
-{3362873,3876615,3876964,1000000,1000000},
-{3362874,3876964,3876935,1000000,1000000},
-{3362875,3876935,3876945,1000000,1000000},
-{3362876,3876945,3876943,1000000,1000000},
-{3362877,3876945,3877237,1000000,1000000},
-{3362878,3877237,3876964,1000000,1000000},
-{3362879,3877237,3877149,1000000,1000000},
-{3362880,3877149,3877138,1000000,1000000},
-{3362881,3877237,3877186,1000000,1000000},
-{3362882,3877149,3877051,1000000,1000000},
-{3362883,3877051,3876964,1000000,1000000},
-{3362884,3877074,3877051,1000000,1000000},
-{3362885,3876556,3876770,1000000,1000000},
-{3362886,3876770,3877074,1000000,1000000},
-{3362887,3876785,3876770,1000000,1000000},
-{3362888,3876526,3876785,1000000,1000000},
-{3362889,3877111,3877074,1000000,1000000},
-{3362890,3876785,3877111,1000000,1000000},
-{3362891,3876650,3876838,1000000,1000000},
-{3362892,3876838,3876785,1000000,1000000},
-{3362893,3877142,3877111,1000000,1000000},
-{3362894,3876838,3877082,1000000,1000000},
-{3362895,3877082,3877142,1000000,1000000},
-{3362896,3876650,3876762,1000000,1000000},
-{3362897,3877082,3877225,1000000,1000000},
-{3362898,3877225,3876762,1000000,1000000},
-{3362899,3877480,3877142,1000000,1000000},
-{3362900,3877237,3877473,1000000,1000000},
-{3362901,3877473,3877480,1000000,1000000},
-{3362902,3877473,3877430,1000000,1000000},
-{3362903,3877549,3877480,1000000,1000000},
-{3362904,3877549,3877526,1000000,1000000},
-{3362905,3877337,3877549,1000000,1000000},
-{3362906,3877225,3877243,1000000,1000000},
-{3362907,3877243,3877337,1000000,1000000},
-{3362908,3877337,3877206,1000000,1000000},
-{3362909,3877206,3877243,1000000,1000000},
-{3362910,3876762,3877039,1000000,1000000},
-{3362911,3877206,3877039,1000000,1000000},
-{3362912,3877039,3877251,1000000,1000000},
-{3362913,3877251,3877484,1000000,1000000},
-{3362914,3877251,3877663,1000000,1000000},
-{3362915,3877894,3877950,1000000,1000000},
-{3362916,3877950,3877957,1000000,1000000},
-{3362917,3877950,3878018,1000000,1000000},
-{3362918,3877484,3877599,1000000,1000000},
-{3362919,3878151,3877633,0.201177777777778,0.258657142857143},
-{3362920,3877599,3877633,1000000,1000000},
-{3362921,3877663,3877736,1000000,1000000},
-{3362922,3877736,3877894,1000000,1000000},
-{3362923,3877599,3877736,1000000,1000000},
-{3362924,3877736,3878128,1000000,1000000},
-{3362925,3878230,3878168,0.0292695652173913,0.0396},
-{3362926,3878168,3878151,0.0091304347826087,0.0123529411764706},
-{3362927,3878128,3878160,1000000,1000000},
-{3362928,3878160,3878168,1000000,1000000},
-{3362929,3878160,3878080,1000000,1000000},
-{3362930,3873587,3874224,1000000,1000000},
-{3362931,3874303,3874718,1000000,1000000},
-{3362932,3881122,3881456,1000000,1000000},
-{3362933,3880796,3881426,0.255763636363636,0.228113513513513},
-{3362934,3881426,3881837,0.175075,0.120051428571429},
-{3362935,3881456,3881638,1000000,1000000},
-{3362936,3881638,3881426,1000000,1000000},
-{3362937,3882051,3881920,1000000,1000000},
-{3362938,3881456,3881857,1000000,1000000},
-{3362939,3881638,3881957,1000000,1000000},
-{3362940,3881857,3881957,1000000,1000000},
-{3362941,3882306,3882336,1000000,1000000},
-{3362942,3882336,3882051,1000000,1000000},
-{3362943,3882336,3882413,1000000,1000000},
-{3362944,3882463,3882493,1000000,1000000},
-{3362945,3882413,3882463,1000000,1000000},
-{3362946,3881837,3882198,1000000,1000000},
-{3362947,3882198,3882463,1000000,1000000},
-{3362948,3882225,3882306,1000000,1000000},
-{3362949,3881957,3882143,1000000,1000000},
-{3362950,3882143,3882225,1000000,1000000},
-{3362951,3882299,3882225,1000000,1000000},
-{3362952,3882143,3882299,1000000,1000000},
-{3362953,3882198,3882187,1000000,1000000},
-{3362954,3882187,3882299,1000000,1000000},
-{3362955,3882187,3881514,1000000,1000000},
-{3362956,3882225,3882049,1000000,1000000},
-{3362957,3882049,3882143,1000000,1000000},
-{3362958,3881857,3882045,1000000,1000000},
-{3362959,3882045,3882126,1000000,1000000},
-{3362960,3882049,3882045,1000000,1000000},
-{3362961,3881920,3881863,0.0380285714285714,0.0499125},
-{3362962,3881863,3881122,0.325177777777778,0.325177777777778},
-{3362963,3882045,3881863,1000000,1000000},
-{3362976,3847383,3846884,0.190275,0.179082352941176},
-{3362977,3846884,3845033,0.86,0.86},
-{3362978,3846884,3846862,0.154066666666667,0.154066666666667},
-{3363018,3854739,3854220,0.335733333333333,0.2518},
-{3363019,3854220,3853763,0.172563636363636,0.172563636363636},
-{3363020,3854647,3854759,0.02106,0.0229745454545455},
-{3363021,3854759,3857991,0.530918181818182,0.5562},
-{3363025,3854739,3854686,0.434111111111111,0.434111111111111},
-{3363026,3854211,3854694,0.221184,0.240417391304348},
-{3363027,3854694,3855176,0.265669565217391,0.210703448275862},
-{3363028,3854686,3854694,0.0351545454545455,0.0336260869565217},
-{3363043,3865750,3865816,0.0416727272727273,0.0359529411764706},
-{3363044,3866117,3866503,0.201969230769231,0.1641},
-{3363062,3847029,3847227,0.0654558139534884,0.070365},
-{3363063,3847227,3847265,0.011175,0.0117631578947368},
-{3363064,3847308,3847227,0.202333333333333,0.173428571428571},
-{3363065,3849169,3847054,0.527574545454545,0.558011538461539},
-{3363066,3847418,3847447,0.0536222222222222,0.0536222222222222},
-{3363255,3882181,3882400,1000000,1000000},
-{3363301,3864828,3864600,0.102,0.102},
-{3363302,3864600,3864396,0.12915,0.12915},
-{3363320,3885895,3885885,1000000,1000000},
-{3363321,3885885,3885874,1000000,1000000},
-{3363322,3885885,3886532,1000000,1000000},
-{3363323,3886985,3886953,0.368485714285714,1000000},
-{3363324,3886532,3886953,1000000,1000000},
-{3363325,3887624,3887606,1000000,0.267218181818182},
-{3363326,3886953,3887606,1000000,1000000},
-{3363327,3888215,3888202,0.31818,1000000},
-{3363328,3888202,3888181,0.35865,1000000},
-{3363329,3887606,3888202,1000000,1000000},
-{3363330,3888807,3888805,1000000,0.3762},
-{3363331,3888805,3888798,1000000,0.293431578947368},
-{3363332,3888202,3888805,1000000,1000000},
-{3363365,3866063,3865925,0.064392,0.0487818181818182},
-{3363366,3865925,3865676,0.0906,0.07248},
-{3363369,3865925,3866080,0.35664,0.35664},
-{3363396,3884221,3884516,0.353916666666667,0.344351351351351},
-{3363397,3884516,3884323,0.0880888888888889,0.0880888888888889},
-{3363398,3884516,3884654,0.149857894736842,0.138892682926829},
-{3363399,3884654,3884501,0.0710222222222222,0.0710222222222222},
-{3363435,3908887,3909017,0.082904347826087,0.0706222222222222},
-{3363436,3909017,3909343,0.160324137931034,0.185976},
-{3363437,3908737,3909017,1000000,1000000},
-{3363438,3909017,3909035,1000000,1000000},
-{3363439,3913759,3914484,0.418675,0.418675},
-{3363440,3914484,3914833,0.2114,0.2114},
-{3363441,3914089,3914213,0.0731478260869565,0.0731478260869565},
-{3363442,3914213,3914375,0.0850714285714286,0.103565217391304},
-{3363443,3914484,3914213,1000000,1000000},
-{3363447,3865442,3865410,0.0156,0.0193142857142857},
-{3363448,3865944,3865749,0.0832444444444445,0.0832444444444445},
-{3363449,3865749,3864722,0.64866,0.64866},
-{3363450,3865442,3865749,1000000,1000000},
-{3363451,3880338,3878856,1000000,1000000},
-{3363467,3848779,3849838,0.5624,0.5624},
-{3363567,3884654,3884851,0.130508108108108,0.112297674418605},
-{3363568,3885410,3885370,1000000,1000000},
-{3363569,3885370,3885850,1000000,1000000},
-{3363570,3884851,3885047,0.112615384615385,0.1098},
-{3363571,3884758,3885047,1000000,1000000},
-{3363572,3884758,3884967,1000000,1000000},
-{3363573,3885047,3885349,0.133,0.145975609756098},
-{3363574,3885349,3885737,0.280954838709677,0.235394594594595},
-{3363575,3884967,3885349,1000000,1000000},
-{3363831,3859375,3858882,1000000,1000000},
-{3363832,3858741,3858882,0.1545,0.1545},
-{3363833,3858882,3859078,0.1687,0.178623529411765},
-{3363910,3899482,3900270,0.470711111111111,0.470711111111111},
-{3363911,3900270,3900501,0.2746,0.143269565217391},
-{3363914,3900255,3900290,1000000,0.0628545454545455},
-{3363915,3900501,3900376,0.0577090909090909,0.0835263157894737},
-{3363916,3900376,3900255,0.042651724137931,0.0549733333333333},
-{3363917,3900290,3900376,1000000,0.0356888888888889},
-{3363918,3900290,3900257,0.04248,0.04248},
-{3363919,3900257,3900217,0.49848,0.49848},
-{3363920,3900217,3900270,0.0511058823529412,0.0394909090909091},
-{3363921,3900257,3900217,0.47964,0.47964},
-{3363930,3900270,3900373,0.0971,0.0971},
-{3363931,3900373,3900471,0.44442,0.44442},
-{3363932,3900471,3900373,0.8451,0.8451},
-{3363933,3900373,3900471,0.21972,0.21972},
-{3363966,3884851,3884622,1000000,1000000},
-{3363967,3884622,3884758,1000000,1000000},
-{3364717,3881574,3881559,0.0559153846153846,1000000},
-{3364718,3881559,3881563,0.00813103448275862,1000000},
-{3364719,3881586,3881618,0.0170647058823529,1000000},
-{3364720,3881618,3881628,0.00732352941176471,1000000},
-{3364721,3881592,3881596,0.0178857142857143,1000000},
-{3364722,3881596,3881599,0.01185,1000000},
-{3364911,3893742,3894432,0.4359,1000000},
-{3364912,3894432,3894443,0.0161217391304348,1000000},
-{3364913,3888770,3888988,0.127835294117647,1000000},
-{3364914,3890924,3890590,1000000,1000000},
-{3364915,3889561,3889225,0.3746,1000000},
-{3364916,3890924,3890896,1000000,1000000},
-{3364917,3891497,3892855,1000000,1000000},
-{3364918,3893488,3893554,1000000,1000000},
-{3364919,3894313,3894443,1000000,1000000},
-{3364920,3889747,3890031,1000000,1000000},
-{3364921,3890469,3890156,1000000,1000000},
-{3364922,3888327,3888283,1000000,1000000},
-{3364923,3888872,3888850,1000000,0.0759130434782609},
-{3364924,3888908,3888988,1000000,0.104733333333333},
-{3364925,3887227,3887834,0.222225,0.35556},
-{3364926,3887834,3888131,0.139542857142857,0.0888},
-{3364927,3885460,3885478,0.0245647058823529,1000000},
-{3364928,3885946,3885938,0.24513,1000000},
-{3364929,3885957,3885946,0.0503,1000000},
-{3364930,3885773,3885812,0.0438631578947368,1000000},
-{3364931,3882082,3882394,0.2611,1000000},
-{3364932,3887133,3887355,1000000,0.182372727272727},
-{3364933,3887355,3887668,1000000,0.186364285714286},
-{3364934,3887668,3887688,1000000,0.0129},
-{3364935,3886153,3886088,1000000,0.0345714285714286},
-{3364936,3886088,3885649,1000000,0.19755652173913},
-{3364937,3885649,3885566,1000000,0.0401714285714286},
-{3364938,3851765,3851985,0.1528,0.1528},
-{3364939,3851985,3852111,0.0810666666666667,0.0810666666666667},
-{3364940,3851306,3851400,0.0864705882352941,0.0773684210526316},
-{3364941,3851400,3851904,0.2574,0.2574},
-{3364942,3863001,3862781,0.178466666666667,0.178466666666667},
-{3364943,3862781,3862765,0.0184333333333333,0.0255230769230769},
-{3364944,3862223,3861804,1000000,1000000},
-{3364945,3861804,3861790,1000000,1000000},
-{3364946,3863294,3863284,1000000,1000000},
-{3364947,3863284,3863001,1000000,1000000},
-{3364950,3873776,3873845,0.1254,0.1254},
-{3364953,3881900,3881964,1000000,1000000},
-{3364954,3881964,3882469,1000000,1000000},
-{3364955,3881842,3881898,1000000,0.1203},
-{3364956,3881898,3882079,1000000,0.34374},
-{3364957,3882545,3882705,0.18404,1000000},
-{3364958,3882501,3882545,0.0732666666666667,1000000},
-{3364959,3881837,3882022,0.456190909090909,0.477914285714286},
-{3364960,3873482,3873217,1000000,0.0739571428571429},
-{3364961,3872978,3872653,1000000,0.0777285714285714},
-{3364962,3873108,3872714,0.101344186046512,1000000},
-{3364963,3873462,3873108,0.142365517241379,1000000},
-{3364964,3879729,3879997,0.354646153846154,1000000},
-{3364965,3879997,3880031,0.0604666666666667,1000000},
-{3364966,3879634,3879678,0.0471,0.0538285714285714},
-{3364967,3879678,3879729,0.0585,0.06825},
-{3364968,3879842,3879726,0.08979,1000000},
-{3364969,3880038,3880146,1000000,0.0495428571428571},
-{3364970,3876324,3877324,1000000,1000000},
-{3364971,3876821,3876731,0.121421052631579,1000000},
-{3364972,3876731,3876734,0.0483333333333333,1000000},
-{3364973,3876239,3876719,0.33824,0.267031578947368},
-{3364974,3876719,3876734,0.0119142857142857,0.00834},
-{3364975,3877219,3877367,1000000,1000000},
-{3364976,3877645,3877629,0.0389333333333333,0.0269538461538462},
-{3364977,3877629,3877545,0.165866666666667,0.165866666666667},
-{3364978,3877545,3877598,0.0173777777777778,0.0173777777777778},
-{3364979,3877598,3877849,0.0944888888888889,0.0944888888888889},
-{3364980,3877136,3877009,1000000,1000000},
-{3364981,3869093,3870083,1000000,0.404378571428571},
-{3364982,3870083,3870508,1000000,0.12467027027027},
-{3364983,3872062,3872249,1000000,0.105},
-{3364984,3872249,3872507,1000000,0.112342857142857},
-{3364985,3872507,3872555,1000000,0.0206},
-{3364986,3872305,3872229,0.042264,0.042264},
-{3364987,3871643,3872229,0.291777777777778,0.291777777777778},
-{3364988,3873757,3873334,0.17708275862069,0.270284210526316},
-{3364989,3872106,3872047,1000000,1000000},
-{3364990,3871817,3872106,0.148244444444444,0.14295},
-{3364991,3871959,3871817,1000000,1000000},
-{3364992,3870094,3870699,0.54448,0.302488888888889},
-{3364993,3869290,3870094,0.626111111111111,0.582931034482759},
-{3364996,3869022,3868552,0.215044444444444,0.215044444444444},
-{3364997,3866976,3866935,1000000,0.0152511627906977},
-{3364998,3866935,3866741,1000000,0.0704045454545455},
-{3364999,3867210,3867141,1000000,0.03876},
-{3365019,3917493,3917508,0.00333529411764706,0.00324},
-{3365020,3917508,3918086,0.143330434782609,0.139292957746479},
-{3365021,3883360,3883383,0.0277578947368421,1000000},
-{3365022,3883717,3883976,0.25272,1000000},
-{3365023,3883976,3884002,0.02805,1000000},
-{3365024,3883543,3883559,0.0168,1000000},
-{3365025,3883559,3883918,0.482863636363636,1000000},
-{3365194,3870289,3870184,1000000,1000000},
-{3365195,3870577,3870554,1000000,1000000},
-{3365196,3870554,3870387,1000000,1000000},
-{3365197,3870554,3870289,1000000,1000000},
-{3365200,3870289,3870245,1000000,1000000},
-{3365201,3870245,3869705,1000000,1000000},
-{3365203,3870245,3869973,1000000,1000000},
-{3365214,3870953,3871056,0.0758666666666667,0.06828},
-{3365215,3871056,3871159,0.100094117647059,0.0945333333333333},
-{3365216,3869667,3869515,0.0804,0.0665379310344827},
-{3365217,3869515,3869443,0.0272,0.0236903225806452},
-{3365218,3869515,3869792,1000000,1000000},
-{3365220,3870577,3870531,0.118870588235294,1000000},
-{3365221,3870531,3870650,0.257492307692308,1000000},
-{3365222,3869665,3870043,1000000,1000000},
-{3365223,3870043,3870223,1000000,1000000},
-{3365224,3870223,3870208,1000000,1000000},
-{3365225,3870531,3870277,1000000,1000000},
-{3365226,3870277,3870043,1000000,1000000},
-{3365227,3870223,3870277,1000000,1000000},
-{3365228,3870650,3870440,1000000,1000000},
-{3365229,3870208,3870440,1000000,1000000},
-{3365230,3869660,3869594,1000000,0.013965},
-{3365231,3869594,3869038,1000000,0.137025},
-{3365232,3869594,3869545,1000000,1000000},
-{3365233,3869585,3869545,1000000,1000000},
-{3365234,3870181,3869585,1000000,1000000},
-{3365235,3869545,3869463,1000000,1000000},
-{3365236,3869107,3869194,1000000,0.0614093023255814},
-{3365237,3869194,3869267,1000000,0.0709714285714286},
-{3365238,3869463,3869194,1000000,1000000},
-{3365239,3869463,3869482,1000000,1000000},
-{3365240,3869482,3869585,1000000,1000000},
-{3365241,3870082,3869297,0.144230769230769,1000000},
-{3365242,3869297,3869267,0.00692222222222222,1000000},
-{3365243,3869482,3869297,1000000,1000000},
-{3365244,3869716,3869634,0.0143466666666667,1000000},
-{3365245,3869634,3868994,0.177216666666667,1000000},
-{3365246,3870285,3869318,1000000,0.214428571428571},
-{3365247,3869318,3869279,1000000,0.00738666666666667},
-{3365248,3869032,3869114,0.0810705882352941,1000000},
-{3365249,3869114,3869196,0.0901777777777778,1000000},
-{3365250,3874402,3873803,1000000,0.220090909090909},
-{3365251,3873803,3873006,1000000,0.2199},
-{3365252,3873782,3873745,1000000,1000000},
-{3365253,3874199,3873917,0.0814163265306122,1000000},
-{3365254,3873917,3873462,0.207,1000000},
-{3365255,3874444,3874210,0.6027,1000000},
-{3365256,3874210,3874199,0.0252260869565217,1000000},
-{3365257,3873782,3873903,1000000,1000000},
-{3365258,3873903,3873917,1000000,1000000},
-{3365259,3874210,3873903,1000000,1000000},
-{3365260,3873794,3873782,1000000,1000000},
-{3365261,3873903,3873794,1000000,1000000},
-{3365262,3873745,3873633,1000000,1000000},
-{3365263,3873633,3873794,1000000,1000000},
-{3365264,3872927,3872755,0.273666666666667,1000000},
-{3365265,3872755,3872714,0.0653076923076923,1000000},
-{3365266,3873006,3872595,0.327042857142857,0.3522},
-{3365267,3872595,3872493,0.0757111111111111,0.085175},
-{3365268,3873633,3873103,1000000,1000000},
-{3365269,3873103,3872755,1000000,1000000},
-{3365270,3872595,3872939,1000000,1000000},
-{3365271,3872939,3873118,1000000,1000000},
-{3365272,3873118,3873103,1000000,1000000},
-{3365273,3872939,3873245,1000000,1000000},
-{3365274,3873245,3873118,1000000,1000000},
-{3365275,3873803,3873828,1000000,1000000},
-{3365276,3873828,3873815,1000000,1000000},
-{3365277,3873815,3873771,1000000,1000000},
-{3365278,3873771,3873815,1000000,1000000},
-{3365279,3873245,3873546,1000000,1000000},
-{3365280,3873546,3873828,1000000,1000000},
-{3365281,3873771,3873755,1000000,1000000},
-{3365282,3873755,3873745,1000000,1000000},
-{3365283,3873546,3873755,1000000,1000000},
-{3365284,3873766,3873839,0.0348279069767442,0.0348279069767442},
-{3365285,3873839,3874161,0.27488,0.28766511627907},
-{3365286,3873256,3873628,0.185385,0.190138461538462},
-{3365287,3873628,3873733,0.0510714285714286,0.0510714285714286},
-{3365289,3873091,3872865,1000000,0.0811764705882353},
-{3365290,3872865,3872729,1000000,0.03996},
-{3365291,3873475,3873364,1000000,0.0276266666666667},
-{3365292,3873364,3873091,1000000,0.0647217391304348},
-{3365293,3872865,3873364,1000000,1000000},
-{3365296,3874386,3873841,0.179610810810811,1000000},
-{3365297,3873841,3873042,0.234745945945946,1000000},
-{3365298,3874175,3873924,1000000,0.0775066666666667},
-{3365299,3873924,3873482,1000000,0.121426666666667},
-{3365300,3872978,3872811,0.0433733333333333,1000000},
-{3365301,3872811,3872671,0.0288521739130435,1000000},
-{3365302,3873518,3873399,0.0317302325581395,1000000},
-{3365303,3873399,3873217,0.04184,1000000},
-{3365307,3863309,3863477,0.176285714285714,0.137111111111111},
-{3365308,3863477,3863539,0.0456375,0.0260785714285714},
-{3365309,3863563,3863464,0.030352380952381,1000000},
-{3365310,3863616,3863532,1000000,0.0339639344262295},
-{3365311,3863477,3863467,1000000,1000000},
-{3365312,3863467,3863485,1000000,1000000},
-{3365313,3863485,3863573,1000000,1000000},
-{3365314,3863573,3863534,1000000,1000000},
-{3365318,3872317,3872286,0.0575,0.06},
-{3365319,3872286,3872309,0.014328,0.0137769230769231},
-{3365320,3872144,3872286,1000000,1000000},
-{3365323,3873808,3873788,0.00668333333333333,0.00729090909090909},
-{3365324,3873788,3873751,0.0114833333333333,0.0125272727272727},
-{3365325,3873600,3873788,1000000,1000000},
-{3365326,3879622,3879612,1000000,0.0320322580645161},
-{3365327,3879612,3879619,1000000,0.0403928571428571},
-{3365328,3879612,3879649,1000000,1000000},
-{3365329,3879649,3879673,1000000,1000000},
-{3365330,3879673,3880641,1000000,1000000},
-{3365331,3879673,3880077,1000000,1000000},
-{3365332,3880623,3880633,1000000,1000000},
-{3365333,3880633,3881014,1000000,1000000},
-{3365334,3880077,3880633,1000000,1000000},
-{3365337,3882406,3882523,1000000,0.0173194029850746},
-{3365338,3882523,3882560,1000000,0.00638507462686567},
-{3365339,3882022,3882592,1000000,0.232703225806452},
-{3365340,3882592,3882613,1000000,0.0260571428571429},
-{3365341,3882318,3882606,0.1844,1000000},
-{3365342,3882606,3882636,0.0156,1000000},
-{3365343,3882463,3882592,1000000,1000000},
-{3365344,3882592,3882606,1000000,1000000},
-{3365345,3882606,3882523,1000000,1000000},
-{3365350,3871822,3872492,0.282088888888889,0.362685714285714},
-{3365351,3872492,3872009,0.236845161290323,0.271933333333333},
-{3365352,3872492,3873287,1000000,1000000},
-{3365353,3873503,3873579,1000000,1000000},
-{3365354,3873579,3873716,1000000,1000000},
-{3365355,3873287,3873579,1000000,1000000},
-{3365357,3873579,3873719,1000000,1000000},
-{3365359,3873719,3873717,1000000,1000000},
-{3365360,3865290,3865383,0.0516272727272727,1000000},
-{3365361,3865383,3865528,0.09207,1000000},
-{3365363,3868454,3868401,0.027225,0.0297},
-{3365364,3868401,3868060,0.15622,0.213027272727273},
-{3365365,3867845,3868401,1000000,1000000},
-{3365366,3866788,3866595,1000000,1000000},
-{3365369,3865531,3865440,0.0659052631578947,1000000},
-{3365370,3865440,3865339,0.09645,1000000},
-{3365371,3865730,3865440,1000000,1000000},
-{3365372,3865730,3866292,1000000,1000000},
-{3365373,3866292,3866618,1000000,1000000},
-{3365374,3866788,3866518,1000000,1000000},
-{3365375,3866518,3865730,1000000,1000000},
-{3365376,3866292,3867082,1000000,1000000},
-{3365377,3866518,3867082,1000000,1000000},
-{3365378,3867404,3867365,0.0124933333333333,0.0119617021276596},
-{3365379,3867365,3866618,0.235533333333333,0.230413043478261},
-{3365380,3867082,3867365,1000000,1000000},
-{3365381,3867082,3867120,1000000,1000000},
-{3365382,3867120,3867845,1000000,1000000},
-{3365383,3867404,3867120,1000000,1000000},
-{3365384,3867845,3866803,1000000,1000000},
-{3365385,3866803,3866788,1000000,1000000},
-{3365386,3867120,3866803,1000000,1000000},
-{3365387,3865383,3865437,1000000,1000000},
-{3365388,3865437,3866292,1000000,1000000},
-{3365389,3865312,3865316,1000000,0.00658867924528302},
-{3365390,3865316,3865339,1000000,0.0506769230769231},
-{3365391,3865437,3865316,1000000,1000000},
-{3366056,3864861,3865352,0.26285,0.2253},
-{3366057,3865352,3865911,0.225066666666667,0.279393103448276},
-{3366058,3865352,3864975,0.180333333333333,0.180333333333333},
-{3366073,3866404,3866392,0.0769153846153846,0.0769153846153846},
-{3366074,3866392,3866379,0.0606230769230769,0.065675},
-{3366075,3867874,3867815,0.26322,0.26322},
-{3366076,3867815,3867754,0.217771428571429,0.217771428571429},
-{3366077,3866392,3866946,0.191022222222222,0.191022222222222},
-{3366078,3866946,3867815,0.330244444444444,0.330244444444444},
-{3366079,3866345,3866946,0.340711111111111,0.340711111111111},
-{3366224,3849152,3848980,0.1829625,0.1829625},
-{3366225,3848980,3848972,0.0358615384615385,0.0358615384615385},
-{3366226,3874966,3874841,0.2559,1000000},
-{3366227,3874841,3874774,0.0813923076923077,1000000},
-{3366228,3874533,3874396,1000000,0.365957142857143},
-{3366229,3874396,3874345,1000000,0.085425},
-{3366230,3874841,3874396,0.187733333333333,0.187733333333333},
-{3366231,3875073,3875441,1000000,1000000},
-{3366232,3875441,3875716,0.144690909090909,0.144690909090909},
-{3366233,3875430,3875447,0.0386666666666667,0.0386666666666667},
-{3366234,3875447,3875441,0.0226363636363636,0.0226363636363636},
-{3366235,3875132,3875357,1000000,1000000},
-{3366236,3875357,3875727,1000000,1000000},
-{3366237,3877633,3877594,0.0105,0.012},
-{3366238,3877594,3877054,0.176545454545455,0.215777777777778},
-{3366239,3877251,3877233,1000000,1000000},
-{3366240,3877233,3877197,1000000,1000000},
-{3366241,3877233,3877446,1000000,1000000},
-{3366242,3877446,3877594,1000000,1000000},
-{3366243,3875727,3875762,1000000,1000000},
-{3366244,3875727,3875952,1000000,1000000},
-{3366245,3876193,3876189,0.0221272727272727,0.0221272727272727},
-{3366246,3875909,3876189,1000000,1000000},
-{3366247,3876215,3876265,1000000,1000000},
-{3366248,3876189,3876215,1000000,1000000},
-{3366249,3876265,3877233,1000000,1000000},
-{3366250,3875532,3875747,1000000,1000000},
-{3366251,3875747,3875762,1000000,1000000},
-{3366252,3875762,3875909,1000000,1000000},
-{3366253,3863618,3863585,0.023295652173913,0.0255142857142857},
-{3366254,3863585,3863490,0.0490173913043478,0.05637},
-{3366255,3863585,3864479,1000000,1000000},
-{3366267,3897945,3898004,1000000,1000000},
-{3366268,3898004,3898054,1000000,1000000},
-{3366269,3898054,3898103,0.0379894736842105,0.0379894736842105},
-{3366270,3898103,3898166,0.0829714285714286,0.0829714285714286},
-{3366927,3881611,3881648,1000000,0.026175},
-{3366928,3881648,3881710,1000000,0.0616285714285714},
-{3366929,3881648,3881631,0.0198631578947368,1000000},
-{3366930,3881631,3881563,0.04806,1000000},
-{3366983,3882385,3882510,0.0192434782608696,1000000},
-{3366984,3882510,3882640,0.0207826086956522,1000000},
-{3367621,3866378,3866336,0.115485714285714,0.115485714285714},
-{3367622,3866336,3866395,0.185288888888889,0.185288888888889},
-{3367839,3870350,3869994,1000000,0.319090909090909},
-{3367840,3869994,3869885,0.0407555555555556,0.0407555555555556},
-{3367841,3870073,3869971,0.0406181818181818,1000000},
-{3367842,3869971,3869885,0.0269612903225806,1000000},
-{3367843,3869994,3869971,1000000,0.106690909090909},
-{3367853,3870353,3870346,0.0214,1000000},
-{3367854,3870346,3870204,0.0516888888888889,0.0516888888888889},
-{3367967,3866333,3866289,0.0099063829787234,0.0099063829787234},
-{3367968,3866289,3866024,0.0568851063829787,0.0581217391304348},
-{3367970,3866695,3866378,0.058524,0.0609625},
-{3367971,3866378,3866333,0.00677872340425532,0.00677872340425532},
-{3368013,3872879,3873059,0.0764222222222222,0.0764222222222222},
-{3368018,3873657,3873666,0.0110547945205479,0.0118676470588235},
-{3368019,3873666,3873683,0.0834,0.0881657142857143},
-{3368020,3873598,3873881,0.115915384615385,0.273981818181818},
-{3368021,3873881,3874017,0.0639,0.0755181818181818},
-{3368022,3873666,3873688,0.04428,1000000},
-{3368023,3873688,3873785,0.29208,1000000},
-{3368024,3873785,3874017,0.6174,0.6174},
-{3368025,3873881,3873785,1000000,0.47196},
-{3368700,3859682,3859517,1000000,1000000},
-{3368701,3859517,3859303,1000000,1000000},
-{3368702,3859517,3860297,1000000,1000000},
-{3368843,3905770,3905886,0.0306923076923077,0.0316666666666667},
-{3368928,3865357,3865397,0.0183927272727273,0.0177473684210526},
-{3369009,3921416,3921453,0.0066,0.00639047619047619},
-{3369010,3921453,3921479,0.00378688524590164,0.00366666666666667},
-{3369011,3921930,3921960,0.012190243902439,0.0128153846153846},
-{3369012,3921960,3921992,0.012945,0.0136263157894737},
-{3369013,3921780,3921831,0.0249,0.0256545454545455},
-{3369014,3921831,3921950,0.0412971428571429,0.0425117647058824},
-{3369015,3918370,3918388,0.00767272727272727,0.00844},
-{3369016,3918388,3918452,0.0190058823529412,0.0208451612903226},
-{3369017,3918014,3918426,0.161770909090909,0.156094736842105},
-{3369035,3900812,3900773,0.0529666666666667,0.0529666666666667},
-{3369036,3900773,3900726,0.0272,0.0386526315789474},
-{3369037,3896794,3896955,0.04602,0.0473735294117647},
-{3369038,3896955,3897549,0.252197260273973,0.266817391304348},
-{3369039,3894704,3894738,0.0184857142857143,1000000},
-{3369040,3894738,3894825,0.0625,1000000},
-{3369041,3894704,3894715,1000000,0.0219},
-{3369042,3894715,3894743,1000000,0.058632},
-{3369043,3890174,3890115,0.0462631578947368,0.0976666666666667},
-{3369044,3894733,3894534,0.0532705882352941,0.054336},
-{3369045,3899650,3899227,0.227272727272727,0.227272727272727},
-{3369046,3899227,3899134,0.0371818181818182,0.0371818181818182},
-{3369047,3900866,3900872,0.009571875,0.0105620689655172},
-{3369048,3900872,3900881,0.010584375,0.0114813559322034},
-{3369056,3868404,3868368,0.0197714285714286,0.0230666666666667},
-{3369057,3868368,3867854,0.246377777777778,0.246377777777778},
-{3369058,3868598,3868379,1000000,0.0466565217391304},
-{3369059,3868379,3868288,1000000,0.0260142857142857},
-{3369060,3868525,3868363,0.036,1000000},
-{3369061,3868363,3868261,0.0263581395348837,1000000},
-{3369062,3866319,3866250,0.02688,0.028},
-{3369063,3866250,3866226,0.00881538461538462,0.009168},
-{3369071,3865860,3865922,0.0429333333333333,0.0429333333333333},
-{3369072,3865922,3867199,0.509933333333333,0.509933333333333},
-{3369075,3865397,3865680,0.177452830188679,0.174166666666667},
-{3369076,3872667,3873010,0.209296551724138,0.2529},
-{3369077,3872815,3873090,0.20044,0.111355555555556},
-{3369078,3873090,3873120,0.015575,0.01168125},
-{3369079,3871160,3871270,0.0352163265306122,0.0375130434782609},
-{3369080,3871270,3871306,0.009084,0.00966382978723404},
-{3369081,3869340,3869827,1000000,1000000},
-{3369082,3867959,3868097,1000000,1000000},
-{3369083,3868097,3868287,1000000,1000000},
-{3369084,3868226,3867962,1000000,1000000},
-{3369085,3849626,3849614,0.0708315789473684,0.06729},
-{3369086,3849614,3849860,0.20439,0.215147368421053},
-{3369087,3854739,3854675,0.0870444444444445,0.097925},
-{3369088,3854675,3854647,0.06204,0.0517},
-{3369089,3900123,3900177,0.0254210526315789,1000000},
-{3369094,3909727,3909551,0.0542631578947368,0.0542631578947368},
-{3369095,3909551,3909507,0.0136421052631579,0.0136421052631579},
-{3369098,3895760,3896021,1000000,1000000},
-{3369099,3896021,3896239,1000000,1000000},
-{3369100,3895643,3896691,0.262054838709677,1000000},
-{3369101,3896691,3897835,0.277028571428571,1000000},
-{3369102,3895915,3896748,1000000,0.21851},
-{3369103,3896748,3897857,1000000,0.278843076923077},
-{3369104,3901828,3903179,0.312152941176471,0.30037358490566},
-{3369105,3903179,3903378,0.04855,0.0456941176470588},
-{3369107,3900025,3900123,0.0435413793103448,1000000},
-{3369108,3899865,3899983,1000000,0.0710068965517241},
-{3369110,3902123,3902196,0.0190243902439024,1000000},
-{3369111,3901249,3901380,1000000,1000000},
-{3369112,3901380,3901497,1000000,1000000},
-{3369113,3900685,3900925,0.085935,0.073136170212766},
-{3369114,3899120,3899374,0.101417647058824,0.10775625},
-{3369124,3885699,3885856,0.15372,0.096075},
-{3369125,3866233,3865469,1000000,1000000},
-{3369126,3865469,3863689,1000000,1000000},
-{3369127,3864222,3865279,0.273741818181818,1000000},
-{3369128,3890115,3889735,0.275715789473684,0.476236363636364},
-{3369129,3889735,3890270,0.605555555555556,0.605555555555556},
-{3369130,3865255,3864236,0.316905882352941,1000000},
-{3369131,3864166,3863639,1000000,1000000},
-{3369132,3863639,3862737,1000000,1000000},
-{3369133,3865048,3864445,1000000,0.248610810810811},
-{3369134,3865024,3864529,0.163153846153846,1000000},
-{3369135,3867714,3867564,1000000,0.0678206896551724},
-{3369136,3867763,3867604,0.0537085714285714,1000000},
-{3369137,3869749,3869812,0.185127272727273,1000000},
-{3369138,3869879,3869812,0.0265548387096774,1000000},
-{3369139,3869879,3869886,1000000,0.0400444444444444},
-{3369140,3870117,3869886,1000000,0.09564},
-{3369141,3875078,3874980,0.201463636363636,1000000},
-{3369142,3875124,3875035,1000000,0.136163636363636},
-{3369143,3877202,3877642,1000000,0.10788},
-{3369144,3878372,3878333,0.2125,1000000},
-{3369145,3878428,3878406,1000000,0.14304},
-{3369146,3880625,3881506,0.277004651162791,1000000},
-{3369147,3882769,3882652,1000000,0.107925},
-{3369148,3858406,3858389,0.0253392857142857,0.0267735849056604},
-{3369149,3858389,3858386,0.00544210526315789,0.00585283018867925},
-{3369150,3862280,3862229,0.0423833333333333,0.0423833333333333},
-{3369151,3863788,3863196,0.157003846153846,1000000},
-{3369152,3895430,3895608,1000000,0.058825},
-{3369153,3895608,3895822,1000000,0.0574530612244898},
-{3369154,3895485,3895657,0.0632,1000000},
-{3369155,3895657,3896146,0.14844,1000000},
-{3369156,3896563,3896657,0.0483692307692308,0.0483692307692308},
-{3369157,3895226,3895452,1000000,1000000},
-{3369172,3883349,3883702,1000000,1000000},
-{3369173,3883702,3884023,1000000,1000000},
-{3369174,3881800,3881903,0.0418961538461538,0.0427176470588235},
-{3369175,3881903,3881939,0.011568,0.011568},
-{3369189,3886067,3885548,0.225278571428571,0.242607692307692},
-{3369190,3885548,3885191,0.212044444444444,0.212044444444444},
-{3369191,3889337,3889432,0.0414545454545455,0.0456},
-{3369192,3889432,3889464,0.0187333333333333,0.0183260869565217},
-{3369193,3888071,3888359,0.117624,0.133663636363636},
-{3369194,3888359,3888450,0.0342452830188679,0.0378125},
-{3369195,3891025,3891107,0.0644926829268293,1000000},
-{3369196,3891107,3891284,0.066725,1000000},
-{3369197,3891025,3891184,1000000,0.0694304347826087},
-{3369198,3891184,3891284,1000000,0.0595733333333333},
-{3369199,3885331,3885303,0.08358,0.0759818181818182},
-{3369200,3885303,3885289,0.161151724137931,0.166907142857143},
-{3369201,3887235,3887293,0.0307538461538461,1000000},
-{3369202,3887293,3887326,0.017055,1000000},
-{3369203,3887531,3887431,0.0331813953488372,1000000},
-{3369204,3887431,3887412,0.0123,1000000},
-{3369205,3889738,3889232,0.212142857142857,1000000},
-{3369206,3889232,3889246,0.00807428571428571,1000000},
-{3369207,3890369,3889255,1000000,0.379492307692308},
-{3369208,3889255,3889246,1000000,0.0096},
-{3369209,3894823,3894268,0.327575,0.327575},
-{3369210,3894268,3894198,0.0356222222222222,0.0356222222222222},
-{3369211,3900606,3900644,1000000,0.0265263157894737},
-{3369212,3900644,3900681,1000000,0.0506625},
-{3369213,3903078,3903267,0.10351,0.105264406779661},
-{3369214,3902445,3902536,0.0449727272727273,0.041225},
-{3369215,3902536,3902589,0.02352,0.0276705882352941},
-{3369216,3901306,3901333,0.00934615384615385,0.00972},
-{3369217,3901333,3901368,0.0211846153846154,0.0262285714285714},
-{3369218,3903989,3904334,0.14856,0.171415384615385},
-{3369219,3904334,3904346,0.005064,0.00602857142857143},
-{3369220,3907488,3907177,0.0869189189189189,0.0804},
-{3369221,3907177,3907116,0.0144342857142857,0.0129538461538462},
-{3369222,3905751,3905907,0.0876631578947368,0.0489882352941177},
-{3369223,3905907,3905973,0.0373428571428571,0.02614},
-{3372867,3870605,3870782,0.292,0.292},
-{3372868,3870782,3871051,1000000,1000000},
-{3372911,3883889,3883177,1000000,1000000},
-{3372912,3883177,3883345,1000000,1000000},
-{3372913,3882564,3883030,0.269034782608696,1000000},
-{3372914,3883030,3883054,0.00936428571428571,1000000},
-{3372915,3883177,3883030,1000000,1000000},
-{3372916,3884967,3885354,1000000,1000000},
-{3372917,3885354,3885370,1000000,1000000},
-{3372918,3885713,3885781,1000000,1000000},
-{3372919,3885781,3885850,1000000,1000000},
-{3372920,3885317,3885781,1000000,1000000},
-{3372921,3885354,3885318,1000000,1000000},
-{3372922,3885318,3885317,1000000,1000000},
-{3372923,3885012,3885318,1000000,1000000},
-{3372924,3885317,3885012,1000000,1000000},
-{3372925,3885354,3885384,1000000,1000000},
-{3372926,3885317,3885012,1000000,1000000},
-{3372927,3889368,3889882,1000000,0.306675},
-{3372928,3889565,3889599,0.02832,1000000},
-{3372929,3889599,3889882,0.24393,1000000},
-{3372930,3889882,3889662,1000000,1000000},
-{3372931,3889662,3889470,1000000,1000000},
-{3372932,3889470,3889599,1000000,1000000},
-{3372933,3889662,3889475,1000000,1000000},
-{3372934,3889475,3889470,1000000,1000000},
-{3372935,3889338,3889368,1000000,0.0246272727272727},
-{3372936,3889475,3889338,1000000,1000000},
-{3372937,3889010,3889028,1000000,0.0174315789473684},
-{3372938,3889028,3889338,1000000,0.225027272727273},
-{3372939,3889475,3889028,1000000,1000000},
-{3372940,3891395,3891349,0.1968,0.1968},
-{3372941,3891086,3891097,1000000,1000000},
-{3372942,3891097,3891266,1000000,1000000},
-{3372943,3891266,3891395,1000000,1000000},
-{3372944,3890541,3890899,0.1554,0.1554},
-{3372945,3890899,3891349,0.218577777777778,0.218577777777778},
-{3372946,3891266,3890899,1000000,1000000},
-{3372947,3891485,3891444,0.0676222222222222,0.0676222222222222},
-{3372948,3891444,3891395,0.0808888888888889,0.0808888888888889},
-{3372949,3893100,3893592,1000000,1000000},
-{3372950,3893000,3893309,1000000,0.216725},
-{3372951,3893309,3893787,1000000,0.177790909090909},
-{3372952,3893100,3893309,1000000,1000000},
-{3372953,3893141,3893362,0.150066666666667,1000000},
-{3372954,3893362,3893831,0.218333333333333,1000000},
-{3372955,3891444,3891831,1000000,1000000},
-{3372956,3892851,3893100,1000000,1000000},
-{3372957,3891831,3892697,1000000,1000000},
-{3372958,3892697,3892851,1000000,1000000},
-{3372959,3891831,3892873,1000000,1000000},
-{3372960,3892873,3892851,1000000,1000000},
-{3372961,3892697,3892873,1000000,1000000},
-{3372962,3889636,3889627,0.0147428571428571,0.012384},
-{3372963,3889627,3889466,0.224496,0.23385},
-{3372964,3889092,3889055,0.01125,0.013125},
-{3372965,3889055,3888330,0.216377142857143,0.270471428571429},
-{3372966,3888330,3888266,0.0213483870967742,0.0194647058823529},
-{3372967,3888266,3888064,0.0673875,0.0673875},
-{3372968,3889627,3888722,1000000,1000000},
-{3372969,3888722,3888677,1000000,1000000},
-{3372970,3888677,3889055,1000000,1000000},
-{3372971,3888266,3888530,1000000,1000000},
-{3372972,3888530,3888722,1000000,1000000},
-{3372973,3888677,3888530,1000000,1000000},
-{3372974,3878668,3878890,0.203957142857143,0.158633333333333},
-{3372975,3878890,3878962,0.0525176470588235,0.0469894736842105},
-{3372976,3878778,3878918,0.08667,1000000},
-{3372977,3878918,3879034,0.08136,1000000},
-{3372978,3878890,3878918,1000000,1000000},
-{3372979,3878554,3878563,1000000,1000000},
-{3372980,3878563,3878668,1000000,1000000},
-{3372981,3878668,3878540,0.07215,0.103071428571429},
-{3372982,3878540,3878226,0.1822,0.2733},
-{3372983,3878563,3878266,1000000,1000000},
-{3372984,3878266,3878540,1000000,1000000},
-{3372985,3878266,3878106,1000000,1000000},
-{3372986,3878106,3877634,1000000,1000000},
-{3372987,3877634,3877726,1000000,0.50064},
-{3372988,3877726,3877745,1000000,0.0528947368421053},
-{3372989,3878106,3877726,1000000,1000000},
-{3372990,3875527,3875483,1000000,1000000},
-{3372991,3875483,3875236,1000000,1000000},
-{3372992,3875483,3875236,1000000,1000000},
-{3372993,3875948,3875649,0.13585,1000000},
-{3372994,3875649,3875560,0.0479052631578947,1000000},
-{3372995,3875948,3876015,1000000,0.110475},
-{3372996,3876015,3875997,1000000,0.06655},
-{3372997,3875649,3876015,1000000,1000000},
-{3372998,3876017,3876154,1000000,0.14012},
-{3372999,3876154,3876266,1000000,0.22568},
-{3373000,3875755,3876154,1000000,1000000},
-{3373002,3879206,3879069,0.138733333333333,0.138733333333333},
-{3373003,3879377,3879206,1000000,1000000},
-{3373004,3881424,3881125,0.147664285714286,1000000},
-{3373005,3881125,3881083,0.0164444444444444,1000000},
-{3373006,3881125,3881391,1000000,1000000},
-{3373007,3881391,3881459,1000000,1000000},
-{3373008,3881459,3881391,1000000,1000000},
-{3373009,3875718,3875755,0.0333454545454545,0.0333454545454545},
-{3373010,3875755,3875761,0.00637714285714286,0.00656470588235294},
-{3373011,3874416,3874357,0.136069565217391,0.136069565217391},
-{3373012,3874357,3874338,0.0793846153846154,0.0469090909090909},
-{3373013,3873845,3874357,1000000,1000000},
-{3373015,3876002,3874467,1.5442,1.5442},
-{3373016,3874357,3874806,1000000,1000000},
-{3373017,3874806,3876002,1000000,1000000},
-{3373018,3874561,3874557,0.8596,0.7368},
-{3373019,3874557,3874416,0.567969230769231,0.3516},
-{3373020,3874806,3874557,1000000,1000000},
-{3373021,3870448,3870467,0.0794666666666667,0.0794666666666667},
-{3373022,3870467,3870497,0.113466666666667,0.113466666666667},
-{3373023,3870171,3870467,1000000,1000000},
-{3373024,3871985,3871984,0.012,1000000},
-{3373025,3871984,3871961,0.142388571428571,1000000},
-{3373026,3871984,3872569,1000000,1000000},
-{3373027,3872855,3872844,0.045472131147541,0.0523358490566038},
-{3373028,3872623,3872655,1000000,0.0454173913043478},
-{3373029,3872655,3872669,1000000,0.0184046511627907},
-{3373030,3869308,3869064,0.0973714285714286,0.09088},
-{3373031,3869064,3868949,0.0421548387096774,0.0396},
-{3373032,3869308,3869230,0.227844444444444,0.227844444444444},
-{3373033,3869230,3869208,0.0297777777777778,0.0297777777777778},
-{3373034,3869293,3869230,1000000,1000000},
-{3373035,3869230,3869064,1000000,1000000},
-{3373036,3865507,3865314,0.137242105263158,0.162975},
-{3373037,3865314,3864948,0.201845454545455,0.170792307692308},
-{3373038,3866027,3865514,1000000,1000000},
-{3373039,3865514,3865314,1000000,1000000},
-{3373040,3865214,3864948,1000000,1000000},
-{3373041,3864936,3865198,0.06588,1000000},
-{3373042,3865198,3866122,0.31222,1000000},
-{3373043,3865214,3865187,1000000,1000000},
-{3373044,3865187,3865198,1000000,1000000},
-{3373045,3865514,3865405,1000000,1000000},
-{3373046,3865405,3865214,1000000,1000000},
-{3373047,3865187,3865405,1000000,1000000},
-{3373048,3865076,3865201,1000000,0.02928},
-{3373049,3865201,3865871,1000000,0.194108571428571},
-{3373050,3888327,3888444,1000000,0.03968},
-{3373051,3888444,3888665,1000000,0.07172},
-{3373054,3889707,3889340,0.138462857142857,0.134616666666667},
-{3373055,3889340,3889316,0.00845142857142857,0.00799459459459459},
-{3373057,3888665,3888819,1000000,0.0591777777777778},
-{3373058,3888819,3888872,1000000,0.021336},
-{3373059,3888444,3888642,1000000,1000000},
-{3373060,3888819,3888642,1000000,1000000},
-{3373061,3888642,3888679,1000000,1000000},
-{3373062,3888679,3888773,1000000,1000000},
-{3373063,3888937,3889003,1000000,1000000},
-{3373064,3889003,3889340,1000000,1000000},
-{3373065,3889003,3889748,1000000,1000000},
-{3373072,3890112,3890158,0.0146341463414634,0.0162162162162162},
-{3373073,3890158,3890207,0.0180585365853659,0.0200108108108108},
-{3373074,3890094,3890158,1000000,1000000},
-{3373088,3888642,3888820,1000000,1000000},
-{3374548,3919281,3919382,0.04689375,0.037515},
-{3375004,3919192,3918598,0.189188888888889,1000000},
-{3375005,3918598,3918247,0.129790476190476,1000000},
-{3375007,3918247,3918202,0.0248958904109589,1000000},
-{3375008,3918202,3917929,0.127566233766234,1000000},
-{3375018,3851089,3850826,0.0878195121951219,1000000},
-{3375019,3850826,3850740,0.0284057142857143,1000000},
-{3375020,3858867,3858415,1000000,0.05962},
-{3375021,3861161,3860782,1000000,0.0801081081081081},
-{3375022,3860782,3860691,1000000,0.0173922077922078},
-{3375148,3916249,3916583,0.0751324675324675,1000000},
-{3375149,3916583,3916771,0.0490538461538462,1000000},
-{3375189,3922117,3922706,0.12103125,0.117363636363636},
-{3375190,3922706,3922922,0.0573969230769231,0.0556835820895522},
-{3375236,3902011,3901991,0.0240461538461538,0.0271826086956522},
-{3375263,3851116,3851245,0.0384166666666667,1000000},
-{3375264,3851245,3850696,0.27205,1000000},
-{3375316,3850015,3849512,1000000,0.0942347826086957},
-{3375321,3887209,3887343,1000000,0.266185714285714},
-{3375322,3887343,3887396,1000000,0.0711428571428571},
-{3375323,3887209,3887030,0.089275,1000000},
-{3375324,3887030,3886676,0.276993103448276,1000000},
-{3375325,3890408,3890379,1000000,0.081825},
-{3375326,3890327,3890379,0.02592,0.0189},
-{3375327,3890379,3890676,0.126177272727273,0.118123404255319},
-{3375328,3890308,3890327,1000000,0.02544},
-{3375341,3893307,3893278,0.0353333333333333,0.0334736842105263},
-{3375395,3919354,3919263,0.0236808510638298,1000000},
-{3375396,3919263,3918867,0.141980769230769,1000000},
-{3375435,3890393,3890494,0.0620625,0.0763846153846154},
-{3375436,3890267,3890370,0.0769111111111111,0.06489375},
-{3375437,3890370,3890393,0.02002,0.02002},
-{3375438,3890370,3890515,0.243423529411765,1000000},
-{3375439,3890294,3890515,1000000,0.0583224489795918},
-{3375440,3890515,3890704,1000000,0.0540585365853659},
-{3375441,3890431,3890534,1000000,0.1681875},
-{3375442,3890534,3890393,0.0669771428571429,1000000},
-{3375443,3890585,3890647,0.0810857142857143,0.0532125},
-{3375444,3890647,3890664,0.0159,0.0123096774193548},
-{3375445,3890534,3890647,1000000,0.110982857142857},
-{3375446,3890774,3890544,1000000,0.0895354838709677},
-{3375447,3890544,3890447,1000000,0.0453642857142857},
-{3375522,3901140,3901256,1000000,0.0231183673469388},
-{3375523,3901256,3901412,1000000,0.0368571428571429},
-{3375524,3900011,3900284,1000000,0.124486956521739},
-{3375525,3900284,3900372,1000000,0.0274764705882353},
-{3375527,3897788,3897852,1000000,0.01896},
-{3375528,3897852,3897924,1000000,0.0215538461538462},
-{3375529,3897794,3897858,0.0164297872340426,1000000},
-{3375530,3897858,3897939,0.0194625,1000000},
-{3375531,3896533,3897246,1000000,0.168092307692308},
-{3375532,3893382,3894155,0.207703846153846,1000000},
-{3375533,3893188,3893386,1000000,0.05634},
-{3375534,3893386,3894157,1000000,0.211294117647059},
-{3375540,3907326,3907451,1000000,0.0412540540540541},
-{3375541,3907451,3907593,1000000,0.0480972972972973},
-{3375542,3907159,3907427,0.0602705882352941,1000000},
-{3375543,3907427,3907579,0.0367176470588235,1000000},
-{3375544,3905750,3905895,1000000,0.02739},
-{3375545,3905895,3906615,1000000,0.168052631578947},
-{3375546,3905750,3905815,1000000,0.0432},
-{3375547,3905815,3905869,0.0340071428571429,0.0453428571428571},
-{3375548,3905895,3905815,0.0449032258064516,1000000},
-{3375549,3905707,3905852,0.02794,1000000},
-{3375550,3905852,3906471,0.144760714285714,1000000},
-{3375551,3903369,3903200,0.127938461538462,1000000},
-{3375552,3903200,3903129,0.0544941176470588,1000000},
-{3375553,3900670,3900831,1000000,0.073741935483871},
-{3375554,3900831,3900885,1000000,0.0164625},
-{3375555,3900885,3900944,1000000,0.0298909090909091},
-{3375556,3900944,3900990,1000000,0.0151},
-{3375557,3900990,3901233,1000000,0.07797},
-{3375558,3900680,3900515,0.0365068965517241,1000000},
-{3375559,3900413,3900473,0.018495,1000000},
-{3375560,3900473,3900506,0.011553488372093,1000000},
-{3375561,3896271,3896371,0.0689234042553191,1000000},
-{3375562,3896371,3896522,0.0850163265306123,1000000},
-{3375564,3899403,3899547,0.0943230769230769,1000000},
-{3375565,3899547,3899683,0.0912,1000000},
-{3375568,3900008,3899976,0.0500318181818182,1000000},
-{3375569,3899976,3899933,0.0625333333333333,1000000},
-{3375713,3897798,3897794,0.0213272727272727,0.0213272727272727},
-{3375719,3901165,3901356,0.039504,1000000},
-{3375720,3901356,3901421,0.0159918367346939,1000000},
-{3375783,3902275,3902403,0.029504347826087,1000000},
-{3375784,3902403,3902618,0.0442212765957447,1000000},
-{3376135,3916555,3916628,0.0248341463414634,0.0248341463414634},
-{3376136,3916628,3916895,0.165308108108108,0.156830769230769},
-{3376137,3916583,3916628,1000000,1000000},
-{3376138,3916254,3916517,1000000,0.0611844155844156},
-{3376139,3916517,3916801,1000000,0.0687721518987342},
-{3376169,3850858,3850273,0.25086,0.25086},
-{3376170,3850185,3850933,0.276781818181818,0.276781818181818},
-{3376171,3850933,3850858,0.1332,0.1332},
-{3376177,3858750,3858648,0.05396,0.0899333333333333},
-{3376178,3858648,3858326,0.215185714285714,1000000},
-{3376179,3858648,3858629,0.02166,0.02166},
-{3376180,3858629,3858601,0.62982,0.62982},
-{3376181,3858601,3858629,0.07644,0.07644},
-{3376187,3903822,3904577,0.462244444444444,0.462244444444444},
-{3376188,3904577,3903935,0.413181818181818,0.37875},
-{3376189,3904666,3904577,0.0749052631578947,0.0677714285714286},
-{3376190,3898308,3898066,0.333428571428571,0.376451612903226},
-{3376191,3898066,3898026,0.0441567567567568,0.0441567567567568},
-{3376192,3898066,3896599,1000000,1000000},
-{3376193,3866260,3866241,0.143688888888889,0.143688888888889},
-{3376197,3869088,3868890,1000000,1000000},
-{3376198,3868890,3868425,1000000,0.153578571428571},
-{3376199,3869530,3868891,0.135939130434783,0.164557894736842},
-{3376200,3868891,3867887,0.166768421052632,0.182803846153846},
-{3376201,3868890,3868891,0.0242647058823529,1000000},
-{3376202,3867933,3867889,0.200155555555556,0.200155555555556},
-{3376203,3872370,3872890,0.14283,0.150347368421053},
-{3376204,3872890,3873693,0.276668571428571,0.261713513513514},
-{3376205,3872890,3872984,1000000,1000000},
-{3376206,3872984,3872943,1000000,1000000},
-{3376207,3872943,3872984,1000000,1000000},
-{3376209,3871455,3871368,0.319755555555556,0.319755555555556},
-{3376210,3871456,3871364,0.323088888888889,0.323088888888889},
-{3376213,3871740,3871727,0.0204818181818182,0.0200266666666667},
-{3376214,3871727,3871665,0.112112195121951,0.106897674418605},
-{3376215,3872279,3872248,0.2498,0.2498},
-{3376216,3871727,3872279,0.346714285714286,0.346714285714286},
-{3376217,3872282,3872279,1000000,1000000},
-{3376218,3874768,3872374,0.647615384615385,0.935444444444444},
-{3376219,3872374,3871913,0.322753846153846,0.14985},
-{3376220,3872282,3872374,1000000,1000000},
-{3376922,3885372,3885510,0.0456,1000000},
-{3376923,3885510,3885638,0.041553488372093,1000000},
-{3376939,3892441,3892551,0.028896,1000000},
-{3376941,3892441,3892448,1000000,1000000},
-{3376942,3892448,3892480,1000000,1000000},
-{3376943,3892551,3892448,1000000,1000000},
-{3376945,3892432,3892547,1000000,0.0460645161290323},
-{3376960,3896146,3896247,0.0282533333333333,1000000},
-{3376961,3896307,3896368,1000000,0.016524},
-{3376962,3896368,3896533,1000000,0.0355058823529412},
-{3376963,3896247,3896624,0.0927061224489796,1000000},
-{3376964,3896624,3897150,0.126588235294118,1000000},
-{3377003,3899016,3899368,0.110897142857143,1000000},
-{3377004,3899368,3899457,0.0306352941176471,1000000},
-{3377005,3899816,3899728,0.113,1000000},
-{3377006,3899728,3899707,0.0487609756097561,1000000},
-{3377009,3898464,3898074,0.128364,1000000},
-{3377010,3898074,3897856,0.0653035714285714,1000000},
-{3377011,3897312,3896632,0.245811111111111,1000000},
-{3377012,3896632,3896441,0.0747063829787234,1000000},
-{3378858,3893382,3893386,1000000,0.09138},
-{3378859,3890028,3890371,1000000,0.134825806451613},
-{3378860,3890371,3890457,1000000,0.03506},
-{3378881,3885589,3885784,1000000,0.17738},
-{3378882,3885462,3885523,1000000,0.0639555555555556},
-{3378883,3885523,3885544,1000000,0.0224785714285714},
-{3378884,3885462,3885547,0.0434769230769231,1000000},
-{3378885,3885523,3885547,0.0739384615384615,1000000},
-{3378886,3885143,3885174,0.2598,0.2598},
-{3378887,3883642,3883505,0.1289,0.096675},
-{3378888,3883505,3883478,0.0146347826086957,0.02244},
-{3378889,3882411,3882914,0.223025,0.205869230769231},
-{3378890,3882914,3882990,0.034536,0.034536},
-{3378891,3882914,3882892,0.0392181818181818,0.0392181818181818},
-{3378892,3882892,3882928,1000000,0.0459777777777778},
-{3378893,3881894,3881908,0.0423428571428571,0.0342},
-{3378894,3881908,3882012,0.0466666666666667,1000000},
-{3378895,3882928,3882370,1000000,0.662688888888889},
-{3378896,3882228,3882012,1000000,0.317466666666667},
-{3378897,3882172,3881908,0.258214285714286,0.309857142857143},
-{3378898,3882228,3882172,0.0725333333333333,1000000},
-{3378899,3882231,3882172,0.0536918918918919,0.0484536585365854},
-{3378900,3882231,3882858,1000000,0.215505882352941},
-{3378901,3882892,3882267,0.438026666666667,0.4584},
-{3378902,3882267,3882231,0.02095,0.0271783783783784},
-{3378903,3882370,3882267,1000000,0.0542888888888889},
-{3378904,3883505,3883405,0.568107692307692,0.568107692307692},
-{3378905,3883405,3883327,0.31501875,0.31501875},
-{3378906,3883405,3883542,0.05094375,0.05094375},
-{3378907,3885997,3885998,1000000,0.0388909090909091},
-{3378908,3885784,3885997,1000000,0.0483625},
-{3378909,3885784,3885996,1000000,0.125133333333333},
-{3378910,3885990,3885996,0.0504,0.0425793103448276},
-{3378911,3885996,3885997,1000000,0.0811368421052632},
-{3378912,3885989,3886012,0.059925,1000000},
-{3378913,3886012,3885998,0.0945183673469388,1000000},
-{3378914,3885547,3885802,0.0998068965517241,1000000},
-{3378915,3885802,3885989,0.04935,1000000},
-{3378916,3886012,3885802,1000000,0.1513},
-{3378917,3883327,3882914,0.652168421052632,0.652168421052632},
-{3378920,3909163,3909654,0.207270967741935,0.178483333333333},
-{3378921,3909654,3909669,0.0172875,0.011064},
-{3378922,3893382,3894155,2.19252,1000000},
-{3378923,3894835,3894837,1000000,1000000},
-{3378924,3894837,3894853,1000000,1000000},
-{3378925,3894837,3894722,1000000,1000000},
-{3378926,3894722,3894155,1000000,1000000},
-{3379727,3871954,3871794,0.0944769230769231,1000000},
-{3379728,3871794,3871741,0.5229375,1000000},
-{3379729,3871627,3871830,0.1822,0.1822},
-{3379730,3871830,3872002,0.0994714285714286,0.0994714285714286},
-{3379731,3871794,3871830,0.310666666666667,0.310666666666667},
-{3379738,3867394,3867495,0.046296,0.0723375},
-{3379739,3867495,3868865,0.66912,0.514707692307692},
-{3379740,3868865,3867495,1.44702,1.44702},
-{3379741,3868865,3869046,0.0710444444444444,0.0710444444444444},
-{3379742,3869046,3869685,1000000,1000000},
-{3379743,3872568,3872423,1000000,1000000},
-{3379744,3872423,3872317,0.0728222222222222,0.0728222222222222},
-{3379807,3877034,3877027,0.0290129032258064,0.035976},
-{3379808,3877027,3877314,0.154006451612903,0.140417647058824},
-{3379809,3877321,3877027,0.1468,1000000},
-{3379810,3877411,3877034,1000000,0.626873684210526},
-{3379811,3877542,3877928,0.305769230769231,0.305769230769231},
-{3379812,3877928,3877930,1000000,0.185614285714286},
-{3379813,3867230,3867077,0.0547935483870968,0.0471833333333333},
-{3379814,3867077,3866503,0.279057142857143,0.18313125},
-{3379815,3866847,3866190,0.228911111111111,0.228911111111111},
-{3379816,3866190,3866117,1000000,1000000},
-{3379817,3867077,3866190,1000000,1000000},
-{3379820,3875313,3875207,0.116025,1000000},
-{3379821,3875207,3875138,0.03888,1000000},
-{3379827,3871210,3871158,1000000,0.0186909090909091},
-{3379828,3871158,3870404,1000000,0.252317647058824},
-{3379944,3880499,3880448,0.0219529411764706,1000000},
-{3379945,3880448,3880075,0.173770588235294,1000000},
-{3379946,3880441,3880448,0.06308,1000000},
-{3379947,3880441,3880367,1000000,0.0661714285714286},
-{3379948,3859890,3858867,1000000,0.141557647058824},
-{3379949,3859838,3858835,0.150744303797468,1000000},
-{3380089,3862109,3862160,0.0230117647058823,1000000},
-{3380090,3862160,3862205,0.0197189189189189,1000000},
-{3380091,3862160,3862222,0.0376909090909091,1000000},
-{3380103,3880570,3880505,1000000,0.05584},
-{3380104,3880505,3880367,1000000,0.06538125},
-{3380126,3874694,3874974,0.205552941176471,1000000},
-{3380127,3874974,3874948,0.03476,1000000},
-{3380152,3892527,3892734,1000000,1000000},
-{3380155,3894853,3894858,1000000,1000000},
-{3380156,3894858,3892734,1000000,1000000},
-{3380157,3892734,3894858,1000000,1000000},
-{3380210,3859603,3859512,0.10985,1000000},
-{3380211,3859512,3859567,0.08956,1000000},
-{3380212,3878993,3879040,1000000,0.0193448275862069},
-{3380213,3879040,3878990,0.0716,1000000},
-{3380214,3879011,3878990,1000000,0.0556846153846154},
-{3380215,3878990,3878993,1000000,0.0234},
-{3380364,3886564,3886540,0.141888888888889,0.141888888888889},
-{3380365,3886540,3886532,1000000,1000000},
-{3380366,3886532,3886514,1000000,1000000},
-{3380367,3886514,3886461,0.260955555555556,0.260955555555556},
-{3380368,3886953,3886913,0.322833333333333,1000000},
-{3380369,3886913,3886907,0.0474,0.0474},
-{3380370,3885874,3885848,1000000,1000000},
-{3380371,3885848,3885813,1000000,1000000},
-{3380642,3896767,3896714,0.02188,1000000},
-{3380643,3896714,3895978,0.429991304347826,1000000},
-{3380644,3896735,3896714,1000000,0.030375},
-{3380645,3897119,3896784,1000000,0.109786363636364},
-{3380646,3896784,3896735,1000000,0.0206133333333333},
-{3380719,3860319,3860729,0.22158,0.265896},
-{3380720,3860729,3860759,0.0144774193548387,0.0166222222222222},
-{3380721,3860993,3860729,0.249352941176471,0.249352941176471},
-{3380747,3922392,3922585,0.0669954545454546,0.0627191489361702},
-{3380748,3922585,3922631,0.0107466666666667,0.010075},
-{3380749,3922585,3923081,0.403622222222222,0.403622222222222},
-{3380750,3914022,3915509,0.394317391304348,1000000},
-{3380751,3915531,3915540,1000000,1000000},
-{3380752,3915540,3915671,1000000,1000000},
-{3380755,3889345,3889325,0.00764081632653061,0.00734117647058823},
-{3380756,3889325,3889273,0.017265306122449,0.0165882352941176},
-{3380757,3889462,3889408,0.0652434782608696,1000000},
-{3380758,3889408,3889389,0.0594,1000000},
-{3380759,3889241,3889408,0.051219512195122,1000000},
-{3380760,3889531,3889447,1000000,0.0400578947368421},
-{3380761,3889447,3889462,1000000,0.0190838709677419},
-{3380762,3889408,3889447,0.011565,1000000},
-{3380764,3900113,3899630,0.254577777777778,0.254577777777778},
-{3380765,3868048,3868923,0.350712,0.350712},
-{3380766,3868923,3868972,0.0264,0.0264},
-{3380767,3868923,3867751,0.469577777777778,0.469577777777778},
-{3380768,3890491,3890412,1000000,0.0408},
-{3380776,3889751,3889931,0.0560368421052632,1000000},
-{3380777,3889931,3889979,0.0154864864864865,1000000},
-{3380778,3890028,3889931,1000000,0.0440297872340426},
-{3380779,3890028,3889901,0.0402765957446809,1000000},
-{3380780,3889901,3889885,0.0417375,1000000},
-{3380781,3889885,3889831,1000000,0.035775},
-{3380782,3889901,3889831,0.0226363636363636,1000000},
-{3380783,3889831,3889696,0.0273214285714286,1000000},
-{3380784,3889241,3889318,0.0244540540540541,1000000},
-{3380785,3889318,3889389,0.0199846153846154,1000000},
-{3380786,3889370,3889394,0.0375,1000000},
-{3380787,3889394,3889438,0.0218625,1000000},
-{3380789,3889885,3890235,0.149505882352941,1000000},
-{3380790,3890235,3890412,0.0891272727272727,1000000},
-{3380791,3889831,3889447,1000000,0.0960576923076923},
-{3380820,3889318,3889394,0.04100625,1000000},
-{3380890,3877504,3877448,1000000,1000000},
-{3380891,3877448,3877372,1000000,1000000},
-{3381934,3916494,3916776,0.168936,0.248435294117647},
-{3381935,3916776,3917264,0.300888888888889,0.300888888888889},
-{3381936,3916776,3916723,0.09156,0.09156},
-{3381937,3916723,3916651,0.65148,0.65148},
-{3381938,3916651,3916723,0.11604,0.11604},
-{3381939,3915049,3914976,0.73944,0.73944},
-{3381940,3915049,3914976,0.11556,0.11556},
-{3381941,3914772,3914861,0.16176,0.16176},
-{3381942,3914861,3915049,0.3324,0.3324},
-{3381943,3914976,3914861,0.2109,0.2109},
-{3381986,3867048,3866744,0.1746,0.184870588235294},
-{3381987,3867048,3867076,0.0202,0.0178235294117647},
-{3381992,3866007,3866506,0.342955555555556,0.342955555555556},
-{3381993,3865944,3865883,0.0783333333333333,0.0783333333333333},
-{3381996,3893379,3893682,0.2368,0.2368},
-{3382287,3885459,3885764,0.284025,1000000},
-{3382288,3885764,3886025,0.201469565217391,1000000},
-{3382289,3885764,3886320,0.234422222222222,0.234422222222222},
-{3382632,3915852,3916061,0.0830444444444444,0.0773172413793103},
-{3382633,3916061,3916742,0.246545454545455,0.246545454545455},
-{3382634,3916061,3916039,0.22938,0.22938},
-{3382635,3915509,3915787,0.154857142857143,0.191294117647059},
-{3382636,3915787,3915852,0.035472,0.0316714285714286},
-{3382637,3915787,3915767,0.20748,0.20748},
-{3382640,3917578,3917542,1000000,0.07287},
-{3382643,3917542,3917515,1000000,0.015925},
-{3382644,3917515,3917467,0.02134,0.0278347826086957},
-{3382645,3917716,3918389,1000000,0.29672},
-{3382646,3917716,3917661,0.0626608695652174,1000000},
-{3382647,3917661,3917655,0.0380068965517241,1000000},
-{3382648,3917661,3917578,0.0466571428571428,1000000},
-{3382652,3917708,3917791,0.0516166666666667,0.046455},
-{3382653,3917791,3917912,0.0557860465116279,0.0533066666666667},
-{3382654,3917791,3917626,0.103071428571429,1000000},
-{3382655,3917515,3917572,0.0366,0.0261428571428571},
-{3382656,3917572,3917655,0.0463428571428571,0.0360444444444444},
-{3382657,3917626,3917572,0.0340285714285714,1000000},
-{3382719,3876683,3876499,1000000,1000000},
-{3382720,3876499,3876222,0.225133333333333,0.225133333333333},
-{3382726,3876730,3876716,1000000,1000000},
-{3382727,3876716,3876683,1000000,1000000},
-{3382764,3897729,3897616,0.0794210526315789,0.0794210526315789},
-{3382765,3897616,3897617,1000000,0.213507692307692},
-{3382947,3903113,3902939,1000000,0.0490434782608696},
-{3382948,3902939,3902749,1000000,0.0464347826086957},
-{3383000,3903860,3903936,0.052416,1000000},
-{3383001,3903936,3903852,0.03496,1000000},
-{3383002,3903852,3903860,0.0388444444444444,1000000},
-{3383506,3886935,3886961,0.0113529411764706,1000000},
-{3383507,3886961,3887189,0.078536170212766,1000000},
-{3383624,3882872,3883053,0.253578947368421,1000000},
-{3383625,3883053,3883360,0.342,1000000},
-{3383626,3883053,3883136,0.10092,0.10092},
-{3383627,3882157,3882579,1000000,0.251634782608696},
-{3383628,3882579,3882872,1000000,0.163434782608696},
-{3383629,3882579,3882567,0.02394,0.02394},
-{3383634,3881518,3881808,1000000,1000000},
-{3383635,3881808,3881952,1000000,1000000},
-{3383639,3885792,3885891,0.0350647058823529,0.0340628571428571},
-{3383640,3885891,3886048,0.0560117647058823,0.0577090909090909},
-{3383641,3885891,3885912,0.02676,0.02676},
-{3383644,3884263,3884197,0.09948,0.09948},
-{3383645,3862469,3862586,0.0454444444444444,0.0454444444444444},
-{3383646,3862586,3863042,0.2082,0.2082},
-{3383647,3862586,3862571,0.55806,0.55806},
-{3383695,3883635,3883092,0.65985,1000000},
-{3383696,3883092,3883021,0.0680842105263158,1000000},
-{3383697,3883092,3883045,0.06156,0.06156},
-{3383714,3886157,3885870,1000000,0.35765},
-{3383715,3885870,3885412,1000000,0.302664},
-{3383716,3885870,3885906,0.0459,0.0459},
-{3383722,3881359,3880811,0.5288625,1000000},
-{3383723,3880811,3880530,0.3177375,1000000},
-{3383725,3880811,3880822,0.03192,0.03192},
-{3383770,3884381,3883818,0.359712,1000000},
-{3383771,3883818,3883587,0.199231578947368,1000000},
-{3383772,3883818,3883854,0.04854,0.04854},
-{3383782,3887606,3887534,1000000,0.207235714285714},
-{3383783,3887534,3887433,1000000,0.121938461538462},
-{3383784,3887534,3887495,0.02592,0.02592},
-{3383823,3882400,3882441,0.0196,0.0196},
-{3383824,3882441,3882572,0.14238,0.109523076923077},
-{3383825,3882441,3882439,0.02112,0.02112},
-{3383850,3880971,3881100,1000000,0.166133333333333},
-{3383851,3881100,3881234,1000000,0.306525},
-{3383852,3881100,3881153,0.0531,0.0531},
-{3383870,3885748,3885845,0.13737,1000000},
-{3383871,3885845,3886077,0.233352,1000000},
-{3383883,3881224,3881261,0.04206,0.04206},
-{3383962,3866320,3866065,1000000,0.257592857142857},
-{3383963,3866065,3866000,1000000,0.100663636363636},
-{3383964,3866065,3866156,0.0972,0.0972},
-{3384018,3878091,3877974,0.407775,1000000},
-{3384019,3877974,3877918,0.159410526315789,1000000},
-{3384020,3877974,3878007,0.03612,0.03612},
-{3384036,3877739,3877687,0.1491,0.1677375},
-{3384037,3877687,3877672,0.0772857142857143,0.08115},
-{3384041,3877687,3877827,0.13122,0.13122},
-{3384057,3877367,3877235,0.053295652173913,1000000},
-{3384058,3877235,3877136,0.046368,1000000},
-{3384059,3877235,3877222,0.09618,0.09618},
-{3384084,3866385,3866104,0.16794,0.3732},
-{3384085,3866104,3866138,0.03462,0.03462},
-{3384101,3866104,3865996,0.07602,0.0724},
-{3384102,3865996,3865626,0.3216,0.303733333333333},
-{3384104,3865996,3865963,0.05316,0.05316},
-{3384149,3878488,3878490,0.02394,0.02394},
-{3384214,3881830,3882053,0.197147368421053,1000000},
-{3384215,3882053,3882201,0.126514285714286,1000000},
-{3384216,3882053,3882035,0.04182,0.04182},
-{3384219,3879092,3879575,0.336054545454545,1000000},
-{3384220,3879575,3879875,0.301010526315789,1000000},
-{3384224,3879575,3879590,0.03144,0.03144},
-{3384225,3879225,3879667,1000000,0.380778947368421},
-{3384226,3879667,3880056,1000000,0.36951},
-{3384227,3879667,3879655,0.02964,0.02964},
-{3384228,3880893,3881019,0.112605882352941,1000000},
-{3384229,3881019,3881175,0.134183333333333,1000000},
-{3384234,3876891,3877098,0.282105882352941,1000000},
-{3384235,3877098,3877376,0.355433333333333,1000000},
-{3384236,3877098,3877056,0.04818,0.04818},
-{3384237,3879577,3879620,1000000,0.0603391304347826},
-{3384238,3879620,3879844,1000000,0.28515},
-{3384239,3879620,3879645,0.03396,0.03396},
-{3384273,3878484,3878597,0.1524,0.1524},
-{3384274,3878597,3878674,0.0866526315789474,0.0866526315789474},
-{3384275,3878597,3878539,0.0855,0.0855},
-{3384276,3887025,3886752,0.223747826086957,1000000},
-{3384277,3886752,3886197,1.57990909090909,1000000},
-{3384278,3886752,3886785,0.06174,0.06174},
-{3384679,3879381,3884090,2.76844444444444,2.76844444444444},
-{3384680,3884090,3885699,1.8728,1.77423157894737},
-{3384681,3884090,3882131,0.844266666666667,0.844266666666667},
-{3384682,3886082,3885937,0.43743,0.448646153846154},
-{3384683,3885937,3885597,0.271846153846154,0.1767},
-{3384684,3885937,3885326,0.51841935483871,0.51841935483871},
-{3384685,3885326,3884873,0.656742857142857,0.417927272727273},
-{3384686,3885623,3885834,0.911408219178082,0.924066666666667},
-{3384687,3885597,3885618,0.112097142857143,0.124552380952381},
-{3384688,3885618,3885623,0.0374083333333333,0.0396088235294118},
-{3384689,3885963,3885452,4.49804444444444,4.49804444444444},
-{3384690,3883434,3882191,0.494555555555556,0.494555555555556},
-{3384691,3884032,3883434,0.385822222222222,0.385822222222222},
-{3384692,3884032,3884022,0.148133333333333,0.148133333333333},
-{3384693,3883434,3884022,0.234911111111111,0.234911111111111},
-{3384694,3884022,3884462,0.174111111111111,0.174111111111111},
-{3384695,3884873,3884757,0.0451333333333333,0.0451333333333333},
-{3384696,3884757,3884032,0.288933333333333,0.288933333333333},
-{3384697,3884757,3884462,0.200844444444444,0.200844444444444},
-{3384698,3884462,3884457,0.136511111111111,0.136511111111111},
-{3384699,3884457,3884435,0.288577777777778,0.288577777777778},
-{3384700,3884873,3884457,0.454866666666667,0.454866666666667},
-{3384701,3873927,3875356,0.89022,0.847828571428571},
-{3384702,3872757,3874717,1.59723333333333,1.59723333333333},
-{3384703,3874717,3875597,0.804388235294118,0.719715789473684},
-{3384704,3874717,3875356,1.17264,1.17264},
-{3384708,3881335,3881657,0.209054545454545,0.209054545454545},
-{3384709,3880648,3880436,0.244836363636364,0.244836363636364},
-{3384716,3879254,3879629,0.345557142857143,0.537533333333333},
-{3384717,3879629,3880606,0.69003,0.69003},
-{3384729,3878732,3881031,1.55582727272727,1.55582727272727},
-{3384730,3882314,3882516,0.186,0.144},
-{3384731,3880421,3882096,1.52110434782609,1.399416},
-{3384732,3882096,3882314,0.202695652173913,0.1665},
-{3384733,3884632,3882681,0.955711111111111,0.955711111111111},
-{3384734,3882681,3882096,0.320755555555556,0.320755555555556},
-{3384735,3878792,3878911,0.0419076923076923,0.0380093023255814},
-{3384736,3878911,3879254,0.18999,0.135707142857143},
-{3384737,3877193,3877585,0.59517,0.59517},
-{3384738,3877547,3877858,0.0615396226415094,0.0639529411764706},
-{3384739,3877858,3878422,0.119083018867925,0.119083018867925},
-{3384740,3876779,3877109,0.109145454545455,0.163718181818182},
-{3384741,3877109,3877338,0.0543702127659575,0.0594279069767442},
-{3384742,3876400,3876578,0.08305,0.0866608695652174},
-{3384743,3876578,3876849,0.19432,0.19432},
-{3384744,3876578,3877547,1.14084444444444,1.14084444444444},
-{3384745,3876713,3876612,0.0293347826086956,0.0499777777777778},
-{3384746,3876612,3876449,0.044832,0.0862153846153846},
-{3384747,3875356,3875803,0.208275,0.238028571428571},
-{3384748,3875803,3876171,0.2112,0.22176},
-{3384749,3875803,3876612,1.54137,1.54137},
-{3384750,3917126,3917442,0.126041860465116,0.129042857142857},
-{3384751,3917805,3917728,0.0508444444444444,0.0508444444444444},
-{3384752,3917442,3917600,0.109822222222222,0.109822222222222},
-{3384753,3917600,3917805,0.5176,0.5176},
-{3384754,3917805,3917600,0.114911111111111,0.114911111111111},
-{3384755,3917442,3917861,0.125571428571429,0.1281875},
-{3384756,3917861,3918181,0.201933333333333,0.201933333333333},
-{3384757,3918181,3918581,0.239688888888889,0.239688888888889},
-{3384758,3918181,3918451,0.1422,0.1422},
-{3384759,3917861,3918215,0.105091304347826,0.109868181818182},
-{3384760,3918215,3919211,0.309097959183673,0.32925652173913},
-{3384761,3916961,3917301,0.09465,0.0911444444444444},
-{3384762,3917301,3918837,0.389307692307692,0.374888888888889},
-{3384763,3917301,3917721,0.602957142857143,0.29108275862069},
-{3384764,3917721,3918215,0.380742857142857,0.4442},
-{3384765,3917721,3917280,0.263977777777778,0.263977777777778},
-{3384766,3883264,3883083,0.205885714285714,1000000},
-{3384767,3883083,3882744,0.351692307692308,1000000},
-{3384768,3875066,3875016,0.18168679245283,1000000},
-{3384769,3875125,3875087,1000000,0.172413559322034},
-{3384771,3893054,3893585,0.419115789473684,1000000},
-{3384772,3893585,3893623,0.0915176470588235,1000000},
-{3384773,3893585,3893584,0.03066,0.03066},
-{3384774,3866942,3866812,0.158446153846154,0.121164705882353},
-{3384775,3866812,3866479,0.190333333333333,0.190333333333333},
-{3384776,3866812,3866722,0.11886,0.11886},
-{3384777,3880302,3880098,1000000,0.261952941176471},
-{3384778,3880098,3879946,1000000,0.1944},
-{3384779,3880098,3880053,0.10368,0.10368},
-{3384780,3880896,3880745,1000000,0.146894117647059},
-{3384781,3880745,3880394,1000000,0.33327},
-{3384782,3880745,3880799,0.11346,0.11346},
-{3384783,3883348,3883551,0.114626086956522,1000000},
-{3384784,3883551,3883672,0.0750285714285714,1000000},
-{3384785,3883551,3883598,0.06822,0.06822},
-{3384803,3882332,3882410,1000000,0.232695652173913},
-{3384804,3882410,3882502,1000000,0.171022222222222},
-{3384805,3882410,3882462,0.06036,0.06036},
-{3384816,3876692,3876968,0.118133333333333,0.118133333333333},
-{3384817,3876968,3877285,0.146511111111111,0.146511111111111},
-{3384818,3876968,3876908,0.14796,0.14796},
-{3384819,3877129,3877014,0.2112,0.2112},
-{3384824,3892551,3892936,0.0764,1000000},
-{3384825,3892936,3893382,0.120741176470588,1000000},
-{3384826,3892936,3892933,0.05484,0.05484},
-{3384827,3892547,3892916,1000000,0.124412903225806},
-{3384828,3892916,3893188,1000000,0.0814186046511628},
-{3384829,3879793,3880105,0.229304347826087,1000000},
-{3384830,3880105,3880208,0.0629217391304348,1000000},
-{3384831,3880105,3880113,0.03606,0.03606},
-{3384875,3880954,3881156,1000000,1000000},
-{3384876,3885845,3885901,0.05916,0.05916},
-{3384877,3884097,3883841,1000000,0.184609090909091},
-{3384878,3883841,3883348,1000000,0.26868},
-{3384879,3883841,3883787,0.10002,0.10002},
-{3384880,3865342,3865361,1000000,0.0195375},
-{3384881,3865361,3865415,1000000,0.100327659574468},
-{3384882,3884490,3884263,0.192566666666667,1000000},
-{3384883,3884263,3883632,0.448581818181818,1000000},
-{3385099,3899382,3898642,1000000,0.338225806451613},
-{3385128,3902296,3903551,0.948666666666667,0.948666666666667},
-{3385129,3902690,3903717,1.28935555555556,1.28935555555556},
-{3385171,3896599,3896408,0.0935555555555555,0.0935555555555555},
-{3385181,3896408,3895184,1.30435714285714,1.30435714285714},
-{3385182,3895184,3896408,0.887836363636364,0.887836363636364},
-{3385183,3895184,3894317,0.539427272727273,0.6246},
-{3385184,3894317,3894326,0.4196625,1000000},
-{3385214,3910260,3912177,1.33218,1.33218},
-{3385215,3913000,3913081,0.0100153846153846,0.00986363636363636},
-{3385216,3913081,3913101,0.00337846153846154,0.00327761194029851},
-{3385217,3912177,3913081,0.58674,0.58674},
-{3385227,3917508,3916042,1.21371,1.21371},
-{3385228,3916042,3913656,1.96335,1.96335},
-{3385229,3916042,3918013,1.74981,1.74981},
-{3385230,3900721,3900737,1000000,1000000},
-{3385231,3900737,3900781,1000000,1000000},
-{3385258,3903131,3904259,0.546936,0.581846808510638},
-{3385259,3904259,3904281,0.0156576923076923,0.0156576923076923},
-{3385265,3904259,3906310,0.9856,0.9856},
-{3385287,3913283,3912723,0.30957,0.30957},
-{3385307,3909516,3909819,0.103442553191489,0.105691304347826},
-{3385308,3909819,3909982,0.0470571428571429,0.0480375},
-{3385309,3909516,3909819,1000000,1000000},
-{3385336,3910666,3910308,0.19962,0.19962},
-{3385337,3909574,3909982,0.26463,0.26463},
-{3385338,3910308,3909780,0.29271,0.29271},
-{3385339,3909780,3909574,0.21417,0.21417},
-{3385340,3908880,3909780,0.59457,0.59457},
-{3385341,3908761,3909648,0.80847,0.80847},
-{3385342,3908880,3908761,0.19374,0.19374},
-{3385343,3909574,3908623,0.60459,0.60459},
-{3385344,3908623,3908880,0.21447,0.21447},
-{3385345,3907293,3908373,0.91914,0.91914},
-{3385346,3908373,3908761,0.31158,0.31158},
-{3385347,3908623,3908373,0.13233,0.13233},
-{3385395,3920048,3920554,0.246545454545455,0.246545454545455},
-{3385419,3921005,3920376,0.309781818181818,0.309781818181818},
-{3385425,3920704,3921230,0.90912,1000000},
-{3385440,3907986,3910043,0.892133333333333,0.892133333333333},
-{3385550,3894018,3893992,0.15168,0.15168},
-{3385552,3890905,3890967,0.02706,0.0287872340425532},
-{3385553,3890967,3891124,0.0684352941176471,0.0811674418604651},
-{3385556,3890967,3891080,0.113228571428571,0.10568},
-{3385557,3891080,3891108,0.0222857142857143,0.024},
-{3385560,3891080,3891430,0.2314,0.2314},
-{3385561,3891108,3892007,0.520914285714286,0.497236363636364},
-{3385562,3892007,3892723,0.269309090909091,0.269309090909091},
-{3385563,3891430,3892007,0.347290909090909,0.347290909090909},
-{3385564,3891714,3891726,0.04422,0.04422},
-{3385565,3891726,3892503,1.33938,1.33938},
-{3385566,3892327,3892493,1000000,0.0416555555555556},
-{3385567,3892493,3892862,1000000,0.086256},
-{3385568,3892503,3892493,0.02358,0.02358},
-{3385572,3892321,3892470,0.0447428571428571,1000000},
-{3385573,3892470,3892736,0.08028,1000000},
-{3385624,3897057,3897867,0.620180487804878,0.5297375},
-{3385626,3897867,3898059,0.115482352941176,0.140228571428571},
-{3385627,3898059,3899080,0.621109090909091,0.621109090909091},
-{3385628,3899080,3898059,1.49406,1.49406},
-{3385629,3897867,3897935,0.0513545454545455,0.047075},
-{3385630,3897935,3898228,0.226583333333333,0.214657894736842},
-{3385631,3897894,3897935,0.0237375,0.0172636363636364},
-{3385632,3897131,3897233,0.1692,0.1692},
-{3385633,3897233,3897853,0.371914285714286,0.371914285714286},
-{3385634,3897853,3897894,0.0428142857142857,0.0285428571428571},
-{3385635,3897233,3897853,2.12933333333333,2.12933333333333},
-{3385807,3879270,3879257,0.0126333333333333,1000000},
-{3385808,3879559,3879270,0.339461538461538,1000000},
-{3385809,3879618,3879559,0.0636375,1000000},
-{3385825,3870251,3870279,0.00865714285714286,1000000},
-{3385826,3870279,3871039,0.453,1000000},
-{3385827,3870604,3870279,1000000,1000000},
-{3385828,3870251,3870280,0.00625,0.00661764705882353},
-{3385829,3870280,3872701,0.64872,0.597505263157895},
-{3385830,3870251,3870050,1000000,1000000},
-{3385831,3870050,3869958,0.0423333333333333,0.0423333333333333},
-{3385836,3869668,3869715,0.130904347826087,0.15054},
-{3385837,3869715,3869732,0.0688702702702703,0.07963125},
-{3385838,3869786,3869715,0.0253111111111111,0.0253111111111111},
-{3385839,3871839,3871755,0.1182,0.185742857142857},
-{3385840,3870947,3870887,0.0712615384615385,0.0842181818181818},
-{3385841,3870345,3869791,0.120071428571429,0.0988823529411765},
-{3385842,3869791,3869530,0.0611837837837838,0.052646511627907},
-{3385843,3870947,3870717,0.0417622641509434,0.0425653846153846},
-{3385844,3870717,3870345,0.0684,0.0645283018867925},
-{3385845,3869791,3870717,0.353866666666667,1000000},
-{3385862,3893436,3892770,1000000,1000000},
-{3385863,3892770,3892510,1000000,1000000},
-{3385864,3892760,3892726,1000000,1000000},
-{3385865,3892770,3892760,1000000,1000000},
-{3388770,3881808,3881856,1000000,1000000},
-{3390039,3903451,3904299,0.42336,0.42336},
-{3390040,3904299,3904389,0.0609428571428571,0.0581727272727273},
-{3390042,3904039,3904855,0.500166666666667,0.500166666666667},
-{3390044,3904128,3904926,0.3342,0.3342},
-{3390055,3886931,3887183,0.0663681818181818,0.0663681818181818},
-{3390056,3887183,3887512,0.0826285714285714,0.0826285714285714},
-{3390057,3885441,3887228,0.543632432432432,0.718371428571429},
-{3390058,3887228,3887572,0.1182,0.11426},
-{3390059,3887183,3887228,0.8316,0.8316},
-{3390413,3890865,3891020,1000000,1000000},
-{3390414,3891020,3891208,1000000,1000000},
-{3390418,3891188,3891223,1000000,0.03171},
-{3390419,3891340,3891013,1000000,0.287357142857143},
-{3390420,3891013,3890964,1000000,0.0411529411764706},
-{3390421,3891223,3891013,0.5111,1000000},
-{3390422,3890776,3890922,0.06168,1000000},
-{3390423,3890922,3891127,0.104083333333333,1000000},
-{3390424,3890922,3890895,1000000,0.01825},
-{3390425,3891188,3891053,0.14,0.075},
-{3390426,3891053,3890964,0.0567692307692308,0.0508965517241379},
-{3390427,3890922,3891053,0.103984615384615,1000000},
-{3390428,3891188,3891253,0.167034782608696,1000000},
-{3390429,3891253,3891256,0.0089,1000000},
-{3390430,3891253,3891390,0.0797142857142857,1000000},
-{3390431,3891223,3891337,1000000,0.0998210526315789},
-{3390432,3891337,3891340,1000000,0.0279230769230769},
-{3390433,3891337,3891390,1000000,0.288410526315789},
-{3390434,3891190,3891227,0.0143657142857143,0.0162193548387097},
-{3390435,3891227,3891396,0.07685625,0.08198},
-{3390436,3891227,3891256,1000000,0.042875},
-{3390709,3888019,3887982,0.019695,0.019695},
-{3390712,3887982,3887947,0.0373894736842105,0.0373894736842105},
-{3390713,3888019,3887628,1000000,0.168507692307692},
-{3390714,3887628,3887184,1000000,0.197733333333333},
-{3390715,3887628,3887590,0.0424105263157895,0.0424105263157895},
-{3390716,3887947,3887554,0.122485714285714,1000000},
-{3390717,3887554,3887089,0.248590909090909,1000000},
-{3390718,3887554,3887590,0.0189473684210526,0.0189473684210526},
-{3390721,3889588,3888485,0.502155555555555,1000000},
-{3390722,3888485,3887947,0.185382857142857,1000000},
-{3390723,3888485,3888520,0.0231290322580645,0.0231290322580645},
-{3390726,3889688,3888835,1000000,0.5628},
-{3390727,3888835,3888019,1000000,0.330289655172414},
-{3390728,3888835,3888791,0.0318,0.0318},
-{3392886,3912552,3921535,1000000,1.65925813953488},
-{3393722,3855153,3854731,0.257777777777778,0.257777777777778},
-{3393724,3849985,3849595,0.180955555555556,0.180955555555556},
-{3393725,3851923,3852019,0.0412222222222222,0.0412222222222222},
-{3393726,3852637,3852733,0.139933333333333,0.134935714285714},
-{3393727,3852733,3852907,0.197133333333333,0.204715384615385},
-{3393728,3852215,3852657,0.29214,0.29214},
-{3393729,3852657,3852733,1000000,1000000},
-{3393732,3902267,3902324,0.0863142857142857,0.0863142857142857},
-{3393733,3902463,3902187,0.144533333333333,0.144533333333333},
-{3393734,3902187,3902267,0.0528222222222222,0.0528222222222222},
-{3393735,3902268,3902077,0.0964666666666667,0.0964666666666667},
-{3393736,3902077,3901927,0.0835555555555556,0.0835555555555556},
-{3393737,3902187,3902077,0.0472222222222222,0.0472222222222222},
-{3393738,3902297,3902268,0.0200888888888889,0.0200888888888889},
-{3393739,3902324,3902360,0.0323647058823529,0.0323647058823529},
-{3393740,3902360,3902610,0.138333333333333,0.138333333333333},
-{3393741,3902297,3902360,0.0431052631578947,0.0431052631578947},
-{3393742,3902705,3901980,0.304376470588235,1000000},
-{3393743,3901980,3901884,0.0308739130434783,1000000},
-{3393744,3901980,3902297,0.2812875,0.2812875},
-{3393745,3899094,3898953,0.111822222222222,0.111822222222222},
-{3393746,3863198,3863222,0.0956666666666667,0.0956666666666667},
-{3393747,3863222,3863075,0.0849111111111111,0.0849111111111111},
-{3393748,3866752,3866587,0.0861555555555556,0.0861555555555556},
-{3393749,3861492,3861300,0.0805764705882353,0.0805764705882353},
-{3393750,3861300,3860672,0.286692857142857,0.286692857142857},
-{3393751,3861300,3861177,0.1208,0.1208},
-{3393752,3867752,3867316,0.193777777777778,0.193777777777778},
-{3393761,3850612,3850850,1000000,1000000},
-{3393762,3850804,3850632,0.152244444444444,0.152244444444444},
-{3393763,3858569,3858108,0.210155555555556,0.210155555555556},
-{3393764,3858108,3857644,0.179511111111111,0.179511111111111},
-{3393765,3858108,3858118,1000000,1000000},
-{3393766,3858457,3858152,0.5643375,0.60196},
-{3393767,3858152,3857332,0.500752941176471,0.500752941176471},
-{3393768,3858118,3858152,1000000,1000000},
-{3393769,3884717,3884604,0.126333333333333,0.126333333333333},
-{3393770,3884717,3884686,0.2166,0.2166},
-{3393771,3884686,3884655,0.374178947368421,0.374178947368421},
-{3393772,3884686,3884593,0.260133333333333,0.260133333333333},
-{3393774,3868820,3868569,0.1623,0.1623},
-{3393775,3866469,3866513,0.430444444444444,0.430444444444444},
-{3393776,3866129,3865926,0.1002,0.0858857142857143},
-{3393777,3865926,3865495,0.189503225806452,0.178018181818182},
-{3393778,3866576,3866214,0.160844444444444,0.160844444444444},
-{3393779,3866214,3865926,0.151755555555556,0.151755555555556},
-{3393780,3866214,3865982,0.0912888888888889,0.0912888888888889},
-{3393792,3863716,3863168,0.405130434782609,0.405130434782609},
-{3393793,3863168,3863413,0.428025,0.428025},
-{3393794,3863168,3862800,0.231533333333333,0.231533333333333},
-{3393817,3860458,3859592,1000000,1000000},
-{3393880,3865724,3864734,0.275554285714286,0.292254545454545},
-{3393881,3864734,3863969,0.263254545454545,0.28958},
-{3393882,3864734,3864592,0.149533333333333,0.149533333333333},
-{3393883,3866304,3865832,0.244584,0.30573},
-{3393884,3865832,3865442,0.177921428571429,0.199272},
-{3393885,3865832,3865534,0.2186,0.2186},
-{3394326,3902609,3901896,1000000,0.461318181818182},
-{3394327,3901896,3901803,1000000,0.0318857142857143},
-{3394354,3867752,3867304,0.181977777777778,0.181977777777778},
-{3394355,3867304,3867213,0.0282222222222222,0.0282222222222222},
-{3394356,3867316,3867304,0.0235555555555556,0.0235555555555556},
-{3394359,3859674,3859769,1000000,1000000},
-{3394414,3850019,3850240,1000000,1000000},
-{3394461,3852134,3852014,1.06704444444444,1.06704444444444},
-{3394462,3852014,3851562,0.497644444444444,0.497644444444444},
-{3680770,3902763,3902758,9999.99,9999.99},
-{3680771,3902758,3902685,9999.99,9999.99},
-{3680772,3902438,3902551,9999.99,9999.99},
-{3680773,3902438,3902685,9999.99,9999.99},
-{3680774,3902551,3902763,9999.99,9999.99},
-{3680779,3847666,3847694,0.16503829787234,0.1616},
-{3680780,3847387,3847264,0.314172972972973,0.415157142857143},
-{3680781,3847391,3847387,0.06722,0.080664},
-{3680783,3848229,3848419,0.325992,0.25468125},
-{3680785,3848014,3848229,0.271057894736842,0.257505},
-{3680795,3848633,3848557,0.177247058823529,0.20088},
-{3680796,3848557,3848452,0.283533333333333,0.283533333333333},
-{3680839,3847265,3847618,0.55425,0.542938775510204},
-{3680840,3847418,3847308,0.234777777777778,0.234777777777778},
-{3680841,3847424,3847391,0.06946,0.10419},
-{3680843,3848419,3848550,0.228754838709677,0.23638},
-{3680915,3880187,3880474,0.226552941176471,0.160475},
-{3680916,3884380,3885609,0.770285714285714,0.64704},
-{3680932,3883686,3883888,0.09555,1000000},
-{3680933,3883888,3884380,0.231889655172414,0.268992},
-{3680941,3852966,3852289,0.14085306122449,0.1437875},
-{3680942,3854299,3854177,0.0373463414634146,0.0464},
-{3680943,3854466,3854299,0.0481772727272727,0.0623470588235294},
-{3680944,3861845,3860787,0.28284,0.328883720930233},
-{3680945,3862616,3862321,0.0633882352941176,0.0979636363636364},
-{3680946,3862791,3862616,0.0481625,0.07224375},
-{3680947,3867881,3868145,1000000,0.0581121951219512},
-{3680948,3868145,3868634,1000000,0.119692682926829},
-{3680949,3867298,3867881,1000000,0.153153846153846},
-{3680950,3866755,3866804,1000000,0.03504},
-{3680951,3863854,3863465,0.122138461538462,0.132316666666667},
-{3680953,3887895,3888068,0.104955555555556,0.0629733333333333},
-{3680954,3888068,3888231,0.0939724137931034,0.056775},
-{3680955,3888453,3888893,0.15428,1000000},
-{3680956,3891018,3891359,0.150418604651163,0.154},
-{3680957,3888231,3888294,0.02353125,0.0160212765957447},
-{3680958,3887747,3887895,0.078312,0.0444954545454545},
-{3680959,3879147,3879140,0.0657384615384615,0.08011875},
-{3680960,3879123,3879116,0.083125,0.0927906976744186},
-{3680961,3879116,3879110,0.136952941176471,0.139692},
-{3680962,3879110,3879099,0.138368181818182,0.121764},
-{3680963,3883691,3883587,0.0466181818181818,0.0496258064516129},
-{3680964,3882737,3882276,0.213496551724138,0.238130769230769},
-{3680965,3885903,3885343,0.24553125,0.291},
-{3680966,3879057,3879055,0.0528681818181818,0.0505695652173913},
-{3680967,3879055,3879049,0.103665,0.0942409090909091},
-{3680968,3879034,3879029,0.0314117647058824,0.0410769230769231},
-{3680969,3879029,3879018,0.17436,0.13621875},
-{3680970,3879160,3879157,0.1179375,0.0428863636363636},
-{3680971,3866108,3865550,0.162257142857143,0.162257142857143},
-{3680972,3869697,3869280,0.139292307692308,0.116825806451613},
-{3680973,3872982,3872931,0.0680454545454545,0.0650869565217391},
-{3680974,3872931,3872205,0.2826,0.295445454545455},
-{3680975,3865085,3864990,1000000,0.0296307692307692},
-{3680976,3865550,3865085,1000000,0.14205},
-{3680977,3857762,3858093,0.133130769230769,0.2163375},
-{3680978,3858588,3859151,0.1316875,0.123941176470588},
-{3680979,3849071,3849205,0.0803818181818182,0.0780176470588235},
-{3680980,3887733,3887209,0.134385714285714,0.125426666666667},
-{3680981,3886592,3886157,0.166535294117647,0.123091304347826},
-{3680982,3883510,3883205,0.07928,0.0964216216216216},
-{3680983,3882723,3882642,0.0186954545454545,0.0178826086956522},
-{3680984,3892042,3891993,0.02885,0.0314727272727273},
-{3680985,3888883,3888844,0.0096,0.00983414634146341},
-{3680986,3889462,3889167,0.0937297297297297,1000000},
-{3680987,3891993,3891390,0.3079,0.295584},
-{3680988,3886653,3886592,0.0192923076923077,0.01672},
-{3681004,3909556,3908794,0.116316923076923,0.118134375},
-{3681010,3861942,3861570,0.195822222222222,0.195822222222222},
-{3681011,3862327,3861942,0.132291891891892,0.135966666666667},
-{3681012,3862670,3862327,0.161725,0.138621428571429},
-{3681013,3863023,3862670,0.20016,0.238285714285714},
-{3681014,3863628,3863023,0.2755875,0.284477419354839},
-{3681015,3863871,3863628,0.104435294117647,0.104435294117647},
-{3681016,3867595,3866983,0.231072727272727,0.262944827586207},
-{3681017,3868074,3867595,0.17690625,0.1665},
-{3681018,3869272,3869035,0.112257142857143,0.138670588235294},
-{3681019,3869497,3869272,0.0948260869565217,0.121166666666667},
-{3681027,3859859,3859682,0.142422222222222,0.142422222222222},
-{3681028,3859682,3859459,1000000,1000000},
-{3681030,3882454,3882244,0.128175,0.08545},
-{3681031,3883650,3883498,0.0592666666666667,0.0889},
-{3681032,3885813,3885362,0.1566,0.119948936170213},
-{3681033,3886246,3885813,0.102268085106383,0.104491304347826},
-{3681034,3886461,3886246,0.0634163265306122,0.0817736842105263},
-{3681035,3887003,3886885,0.03594,0.0417906976744186},
-{3681036,3887336,3887003,0.0829836734693877,0.0945627906976744},
-{3681037,3887463,3887336,0.033375,0.0356},
-{3681038,3887879,3887463,0.0843795918367347,0.0898826086956522},
-{3681039,3891439,3891148,0.0699807692307692,0.0791086956521739},
-{3681040,3892245,3891804,0.118,0.124941176470588},
-{3681041,3907374,3906804,0.1587875,0.18589756097561},
-{3681042,3906177,3905744,0.113705454545455,0.117996226415094},
-{3681043,3905744,3905316,0.12262641509434,0.124984615384615},
-{3681044,3904460,3904024,0.1217,0.128858823529412},
-{3681045,3903589,3903160,0.137652,0.137652},
-{3681046,3899325,3898357,0.353157142857143,0.315587234042553},
-{3681047,3898357,3898018,0.105066666666667,0.135085714285714},
-{3681048,3898018,3897701,0.0927692307692308,0.104869565217391},
-{3681049,3897701,3897409,0.0944150943396227,0.0962307692307692},
-{3681050,3897409,3896653,0.246847058823529,0.246847058823529},
-{3681051,3896653,3896385,0.107553488372093,0.0984},
-{3681052,3895300,3895115,0.0805469387755102,0.078936},
-{3681053,3895115,3894740,0.1429125,0.15244},
-{3681054,3885097,3884978,0.0441333333333333,0.0350470588235294},
-{3681055,3892274,3892245,0.00611111111111111,0.00647058823529412},
-{3681057,3921208,3920935,0.103419512195122,0.124711764705882},
-{3681058,3921604,3921461,0.051,0.0483846153846154},
-{3681059,3921758,3921604,0.0682058823529412,0.0748064516129032},
-{3681071,3922129,3922794,0.551536363636364,0.551536363636364},
-{3681073,3909669,3909105,1000000,0.165072},
-{3681074,3911943,3911380,0.154988888888889,0.15791320754717},
-{3681075,3912172,3911943,0.0575510204081633,0.0552941176470588},
-{3681076,3913809,3913258,0.141242307692308,0.136011111111111},
-{3681077,3903208,3903084,0.0689172413793103,0.0740222222222222},
-{3681078,3903084,3903713,0.453457142857143,0.47613},
-{3681079,3903218,3903006,0.084465306122449,0.100946341463415},
-{3681080,3902016,3901463,0.298521428571429,0.298521428571429},
-{3681081,3901463,3901106,0.200088888888889,0.200088888888889},
-{3681092,3921055,3920868,0.0973235294117647,0.143869565217391},
-{3681096,3913258,3912172,0.250732075471698,0.250732075471698},
-{3681098,3918406,3918014,0.0812,0.08265},
-{3681099,3918014,3917078,0.215536842105263,0.227511111111111},
-{3681100,3908794,3907765,0.1520625,0.1520625},
-{3681101,3898713,3898589,0.0605538461538462,0.0562285714285714},
-{3681102,3896121,3895300,0.36999512195122,0.47405625},
-{3681103,3896385,3896121,0.162765517241379,0.121030769230769},
-{3681104,3900265,3899325,0.271766666666667,0.287752941176471},
-{3681105,3902229,3902201,0.0136137931034483,0.0116117647058824},
-{3681106,3906804,3906550,0.0663666666666667,0.071676},
-{3681107,3905610,3906761,0.233177419354839,0.225890625},
-{3681108,3896041,3895875,0.0326823529411765,0.0326823529411765},
-{3681109,3895875,3894802,0.252689552238806,0.252689552238806},
-{3681113,3852289,3849498,0.716321739130435,0.672465306122449},
-{3681118,3880971,3880920,0.01467,0.0158594594594595},
-{3681124,3907022,3907016,0.0244071428571429,1000000},
-{3681125,3864990,3864956,1000000,0.0149379310344828},
-{3681127,3864448,3863871,0.378555555555556,0.3407},
-{3681128,3865576,3864940,0.246634285714286,0.239783333333333},
-{3681129,3858568,3858469,0.0674065573770492,0.06853},
-{3681130,3864615,3864448,0.1641,0.156965217391304},
-{3681131,3864756,3864615,0.0826344827586207,0.0773032258064516},
-{3681132,3864940,3864756,0.107651612903226,0.1042875},
-{3681133,3860345,3859859,0.373863157894737,0.417847058823529},
-{3681134,3860748,3860659,0.175017391304348,0.161016},
-{3681135,3861013,3860944,0.0727102040816327,0.0828558139534884},
-{3681136,3861145,3861013,0.0889148936170213,0.0889148936170213},
-{3681137,3861323,3861145,0.11156170212766,0.11156170212766},
-{3681138,3861570,3861323,0.221811764705882,0.226248},
-{3681139,3873305,3873168,0.0484928571428571,0.04526},
-{3681140,3903277,3903208,0.0284,0.0300705882352941},
-{3681141,3896341,3896470,0.0264088235294118,0.0264088235294118},
-{3681142,3870128,3869497,0.312166666666667,0.3511875},
-{3681143,3869035,3868074,0.60995,0.60995},
-{3681144,3866983,3866602,0.127566666666667,0.148141935483871},
-{3681145,3866602,3866367,0.0752594594594595,0.0898258064516129},
-{3681146,3866367,3866285,0.03994,0.03744375},
-{3681147,3866285,3866207,0.130007142857143,0.134822222222222},
-{3681148,3866207,3865576,0.311057142857143,0.322577777777778},
-{3681149,3910416,3909669,1000000,0.1966875},
-{3681151,3848873,3849071,0.127890909090909,0.120582857142857},
-{3681152,3853150,3853817,0.179582608695652,0.165216},
-{3681153,3864964,3865000,0.02165,1000000},
-{3681158,3882361,3883159,0.447471428571429,1000000},
-{3681164,3872205,3871626,0.344863636363636,0.344863636363636},
-{3681165,3871626,3871124,0.3346125,0.297433333333333},
-{3681168,3865401,3865507,0.111805714285714,1000000},
-{3681169,3866915,3866421,1000000,1000000},
-{3681170,3867501,3867117,0.373714285714286,1000000},
-{3681171,3867117,3866915,1000000,1000000},
-{3681172,3866421,3866108,0.315975,0.3447},
-{3681180,3866307,3866420,0.0520838709677419,1000000},
-{3681181,3902284,3902016,0.0805959183673469,0.077435294117647},
-{3681182,3902771,3902529,0.0897063829787234,0.0826705882352941},
-{3681183,3903444,3903218,0.0935581395348837,0.0838125},
-{3681187,3879980,3880187,0.119929411764706,0.122328},
-{3681188,3886501,3886768,0.132553846153846,0.16155},
-{3681189,3886768,3887076,0.21312,0.155941463414634},
-{3681192,3920661,3921984,0.70074705882353,0.567271428571429},
-{3681193,3864587,3864611,0.01245,0.00905454545454545},
-{3681194,3868384,3868143,1000000,0.243422222222222},
-{3681195,3866862,3866941,1000000,0.0375473684210526},
-{3681196,3879096,3879090,0.0189521739130435,0.0202744186046512},
-{3681199,3866941,3867009,1000000,0.0302727272727273},
-{3681200,3867009,3867298,1000000,0.109176923076923},
-{3681201,3879135,3879123,0.0370133333333333,0.05205},
-{3681202,3880930,3881209,0.0983318181818182,1000000},
-{3681203,3879446,3879462,0.00622909090909091,0.00634444444444444},
-{3681204,3879462,3879472,0.00496363636363636,0.00505555555555556},
-{3681205,3889468,3889615,0.0808216216216216,1000000},
-{3681206,3889615,3889671,0.0205578947368421,1000000},
-{3681207,3889671,3889712,0.0180428571428571,1000000},
-{3681208,3889712,3889832,0.0462681818181818,1000000},
-{3681215,3854177,3854005,1000000,0.111428571428571},
-{3681216,3894740,3894669,0.0299142857142857,0.0292186046511628},
-{3681217,3894669,3894645,0.00810731707317073,0.00810731707317073},
-{3681218,3894645,3894473,0.0905636363636364,0.0853885714285714},
-{3681219,3918455,3917299,0.326826923076923,0.361595744680851},
-{3681220,3917299,3917183,0.0915882352941176,0.06228},
-{3681224,3848550,3848591,0.0726,0.06435},
-{3681225,3848591,3848653,0.08403,0.0800285714285714},
-{3681226,3848654,3848633,0.0588307692307692,0.0603789473684211},
-{3681227,3860763,3860748,0.0208216216216216,0.0202736842105263},
-{3681228,3887631,3887664,0.0113318181818182,0.0127846153846154},
-{3681229,3887664,3887747,0.0310604651162791,0.0290347826086957},
-{3681230,3888408,3888453,0.0161466666666667,1000000},
-{3681234,3918514,3918406,0.0253344827586207,0.0253344827586207},
-{3681235,3849621,3850093,0.27088,0.262141935483871},
-{3681236,3873390,3873305,0.0334222222222222,0.0265411764705882},
-{3681243,3907765,3907709,0.00918,0.00918},
-{3681261,3848653,3848705,0.0668487804878049,0.0702769230769231},
-{3681262,3848670,3848654,0.0174571428571429,0.0192947368421053},
-{3681263,3907016,3907057,0.05761875,1000000},
-{3681264,3907057,3907074,0.0155272727272727,1000000},
-{3681265,3901156,3901128,0.00956470588235294,0.0157354838709677},
-{3681266,3901128,3900265,0.285057692307692,0.361536585365854},
-{3681267,3901282,3901156,0.0345918367346939,0.0546774193548387},
-{3681270,3866420,3866482,0.0282473684210526,1000000},
-{3681271,3860944,3860884,0.032124,0.0365045454545455},
-{3681272,3860884,3860763,0.110133333333333,0.118},
-{3681273,3885255,3885097,0.0863714285714286,0.045345},
-{3681274,3884978,3884809,0.06631875,0.0757928571428571},
-{3681275,3884809,3884739,0.0225081081081081,0.02776},
-{3681307,3903160,3902464,0.276584615384615,0.220138775510204},
-{3681567,3920499,3920434,0.0244666666666667,0.0400363636363636},
-{3681568,3920602,3920499,0.057658064516129,0.0616344827586207},
-{3681576,3855414,3856182,0.18315652173913,0.18315652173913},
-{3681579,3921407,3921161,0.08564,0.08564},
-{3681581,3889641,3889462,0.0500235294117647,1000000},
-{3681582,3889912,3889861,0.0274137931034483,1000000},
-{3681583,3888844,3888804,0.00948571428571429,0.00971707317073171},
-{3681584,3888804,3888762,0.0101441860465116,0.0103857142857143},
-{3681592,3884739,3884399,0.124097142857143,0.127747058823529},
-{3681593,3884399,3884244,0.0607636363636364,0.0557},
-{3681604,3917183,3917137,0.0246107142857143,0.024178947368421},
-{3681609,3916925,3916896,0.00978,0.007824},
-{3681610,3916896,3916589,0.126946666666667,0.1190125},
-{3681611,3917549,3916952,0.247038461538462,0.285466666666667},
-{3681612,3916952,3916925,0.00722352941176471,0.00722352941176471},
-{3681613,3894473,3894418,0.0582,0.0353357142857143},
-{3681614,3894418,3894332,0.0604571428571429,0.0470222222222222},
-{3681615,3854827,3854870,0.03408,0.02272},
-{3681616,3855190,3855247,0.0238875,0.02548},
-{3681617,3858469,3858259,0.114790476190476,0.122572881355932},
-{3681618,3919667,3919354,0.110057142857143,1000000},
-{3681619,3909105,3908946,1000000,0.0541},
-{3681620,3908946,3908889,0.01876,0.0183521739130435},
-{3681621,3911380,3910878,0.136753846153846,0.131688888888889},
-{3681622,3910878,3910416,1000000,0.115292307692308},
-{3681623,3888294,3888320,0.0115609756097561,0.0100851063829787},
-{3681624,3888320,3888408,0.0524714285714286,1000000},
-{3681625,3889168,3889468,0.114954545454545,1000000},
-{3681626,3888893,3889126,0.0787404255319149,1000000},
-{3681627,3889126,3889168,0.018775,1000000},
-{3681634,3847694,3847693,0.0596125,0.0596125},
-{3681635,3847693,3847689,0.0490595744680851,0.0480375},
-{3681636,3847689,3847692,0.0929489361702128,0.0891551020408163},
-{3681637,3847692,3847538,0.195474418604651,0.182726086956522},
-{3681642,3866804,3866831,1000000,0.0158117647058824},
-{3681643,3866831,3866862,1000000,0.0166},
-{3681646,3920794,3920477,0.0671076923076923,0.06815625},
-{3681647,3920477,3918514,0.380838095238095,0.38698064516129},
-{3681648,3859169,3858974,0.121686206896552,0.126032142857143},
-{3681651,3870436,3870128,0.175313513513514,0.190782352941176},
-{3681652,3870938,3870556,0.214065,0.225331578947368},
-{3681653,3870556,3870436,0.0622,0.0706054054054054},
-{3681654,3898566,3898554,0.00754909090909091,0.00783396226415094},
-{3681655,3898589,3898575,0.00812307692307692,0.00782222222222222},
-{3681656,3898575,3898566,0.0073811320754717,0.00752307692307692},
-{3681660,3898554,3898336,0.106901694915254,0.114676363636364},
-{3681661,3898336,3897850,0.27478064516129,0.288752542372881},
-{3681665,3889832,3890032,0.0842297872340426,1000000},
-{3681666,3890032,3890351,0.152442857142857,1000000},
-{3681667,3891003,3891018,0.0124,0.0115733333333333},
-{3681668,3864611,3864732,0.08586,1000000},
-{3681669,3869127,3869189,0.01872,0.0111428571428571},
-{3681670,3869189,3869416,0.097,0.0554285714285714},
-{3681671,3883159,3883182,0.009168,1000000},
-{3681672,3883182,3883686,0.263884615384615,1000000},
-{3681673,3887209,3887097,0.0276418604651163,0.0276418604651163},
-{3681674,3887076,3887584,0.201424390243902,0.217326315789474},
-{3681675,3887584,3887631,0.01695,0.018645},
-{3681676,3892155,3892190,0.0166578947368421,0.0154390243902439},
-{3681677,3892190,3892442,0.135852631578947,0.12906},
-{3681678,3892124,3892155,0.0171891891891892,0.0151428571428571},
-{3681679,3870382,3869783,0.179787096774194,0.179787096774194},
-{3681680,3869783,3869697,0.0335217391304348,0.0275357142857143},
-{3681681,3864944,3864964,0.010392,1000000},
-{3681684,3894021,3893814,0.110022222222222,0.110022222222222},
-{3681693,3886205,3885903,0.151022222222222,0.127425},
-{3681694,3868634,3868786,1000000,0.0326368421052632},
-{3681695,3868786,3869127,1000000,0.0941675675675676},
-{3681696,3913851,3913809,0.00745555555555556,0.00732},
-{3681697,3920868,3919123,0.605153571428571,0.639407547169811},
-{3681698,3919123,3917549,0.490357894736842,0.5176},
-{3681711,3858070,3857756,0.17896,0.195229090909091},
-{3681712,3858974,3858686,0.136734375,0.138904761904762},
-{3681713,3858686,3858568,0.069752380952381,0.0708774193548387},
-{3681714,3858259,3858098,0.0834290322580645,0.0847967213114754},
-{3681715,3858098,3858070,0.0127451612903226,0.0129540983606557},
-{3681718,3860659,3860427,0.0940758620689655,0.109128},
-{3681719,3860427,3860345,0.0436378378378378,0.0461314285714286},
-{3681733,3917137,3916852,0.0969966101694915,0.104050909090909},
-{3681734,3852393,3852434,0.111097959183673,0.111097959183673},
-{3681735,3879165,3879162,0.0205846153846154,0.0151471698113208},
-{3681736,3879162,3879158,0.00901621621621622,0.00641538461538462},
-{3681737,3879158,3879160,0.1118,0.053664},
-{3681738,3847538,3847466,0.117642857142857,0.117642857142857},
-{3681739,3847466,3847424,0.0506461538461539,0.04938},
-{3681740,3893610,3893934,0.103174468085106,0.0989632653061224},
-{3681787,3866307,3866251,1000000,0.0295363636363636},
-{3681788,3866251,3866122,1000000,0.0525545454545455},
-{3681789,3864009,3863964,0.0170153846153846,0.0201090909090909},
-{3681790,3863964,3863854,0.032865,0.0386647058823529},
-{3681791,3863465,3862954,0.156533333333333,0.207176470588235},
-{3681792,3862954,3862830,0.030225,0.038178947368421},
-{3681793,3862830,3862791,0.0092875,0.0123833333333333},
-{3681794,3853819,3853742,0.02697,0.03596},
-{3681795,3866127,3866184,0.0310965517241379,1000000},
-{3681796,3866184,3866217,0.0135724137931034,1000000},
-{3681797,3907578,3907642,0.0452538461538462,1000000},
-{3681798,3922001,3922242,0.272466666666667,0.262735714285714},
-{3681799,3919754,3919477,0.102492307692308,0.105189473684211},
-{3681800,3921843,3921407,0.151571428571429,0.176833333333333},
-{3681801,3920935,3920924,0.00434594594594595,0.005025},
-{3681802,3921226,3921208,0.00597,0.00682285714285714},
-{3681813,3904024,3903746,0.0723222222222222,0.0751038461538462},
-{3681814,3903746,3903589,0.0518111111111111,0.0538038461538462},
-{3681815,3904920,3904460,0.1464,0.17139512195122},
-{3681816,3905316,3905200,0.042468,0.0416352941176471},
-{3681817,3905200,3904920,0.107023255813953,0.10004347826087},
-{3681818,3906550,3906221,0.0980509090909091,0.105741176470588},
-{3681837,3874249,3874077,0.0859333333333333,0.0859333333333333},
-{3681838,3873622,3872982,0.262671428571429,0.24516},
-{3681839,3864829,3864944,0.063888,1000000},
-{3681843,3879927,3879947,0.0123115384615385,0.012804},
-{3681844,3879947,3879980,0.0240807692307692,0.025044},
-{3681845,3879472,3879508,0.0181963636363636,0.0185333333333333},
-{3681846,3881286,3881212,0.0230571428571429,0.0220090909090909},
-{3681847,3879157,3879155,0.11724,0.073275},
-{3681848,3879155,3879150,0.0214114285714286,0.018735},
-{3681849,3879150,3879149,0.0164432432432432,0.0148390243902439},
-{3681850,3879140,3879135,0.0126545454545455,0.0174},
-{3681851,3879099,3879101,0.0352744186046512,0.0316},
-{3681852,3879101,3879100,0.0120933333333333,0.0115787234042553},
-{3681853,3879100,3879097,0.0274851063829787,0.0300418604651163},
-{3681854,3879097,3879092,0.0541375,0.0590590909090909},
-{3681855,3879092,3879094,0.00919148936170213,0.010046511627907},
-{3681856,3879094,3879096,0.0199695652173913,0.0213627906976744},
-{3681857,3879090,3879089,0.0022,0.00225},
-{3681858,3879089,3879084,0.0146,0.0152790697674419},
-{3681859,3879084,3879082,0.0289304347826087,0.0309488372093023},
-{3681860,3879063,3879061,0.0182808510638298,0.0182808510638298},
-{3681861,3879049,3879048,0.00990857142857143,0.00806511627906977},
-{3681862,3879048,3879047,0.229421052631579,0.108975},
-{3681863,3879047,3879045,0.0139565217391304,0.00891666666666667},
-{3681864,3879045,3879044,0.034344,0.0252529411764706},
-{3681865,3879044,3879041,0.01044,0.0111857142857143},
-{3681866,3879041,3879036,0.04685625,0.0681545454545455},
-{3681867,3881910,3881902,0.0100875,1000000},
-{3681868,3881902,3881639,0.231126315789474,1000000},
-{3681869,3881639,3881498,0.1055,1000000},
-{3681870,3881425,3881381,0.0508736842105263,0.0508736842105263},
-{3681871,3880039,3879884,0.161329411764706,1000000},
-{3681872,3879884,3879869,0.00952,1000000},
-{3681873,3879869,3879769,0.1155,1000000},
-{3681874,3849205,3849348,0.0906387096774193,0.0826411764705882},
-{3681875,3849348,3849505,0.0906882352941176,0.0906882352941176},
-{3681876,3851188,3851293,0.0292085106382979,0.0280163265306122},
-{3681877,3851293,3851322,0.00709787234042553,0.00680816326530612},
-{3681878,3852434,3852452,0.0492391304347826,0.0481914893617021},
-{3681879,3852452,3852456,0.00834545454545455,0.00816},
-{3681880,3853089,3853150,0.0143162790697674,0.012825},
-{3681881,3853817,3854134,0.0920590909090909,0.0861829787234043},
-{3681882,3854463,3854827,0.153107142857143,0.119083333333333},
-{3681883,3854870,3855190,0.179044444444444,0.2302},
-{3681884,3855247,3855414,0.0549257142857143,0.0565411764705882},
-{3681885,3857712,3857720,0.0193021276595745,0.0185142857142857},
-{3681886,3857720,3857740,0.0597681818181818,0.0571695652173913},
-{3681887,3857740,3857761,0.03738,0.0364682926829268},
-{3681888,3857761,3857762,0.0425666666666667,0.0425666666666667},
-{3681889,3858093,3858100,0.000874285714285714,0.000927272727272727},
-{3681890,3858100,3858420,0.0898461538461538,0.0922105263157895},
-{3681891,3858420,3858511,0.0253227272727273,0.02476},
-{3681892,3858511,3858588,0.0239478260869565,0.0234382978723404},
-{3681893,3859151,3859501,0.0871531914893617,0.081924},
-{3681894,3859501,3859555,0.0152133333333333,0.0148826086956522},
-{3681895,3859897,3860428,0.302818181818182,1000000},
-{3681896,3860428,3860438,0.0024,1000000},
-{3681897,3859555,3859821,0.0695466666666667,0.0680347826086957},
-{3681898,3859821,3859897,0.0161617021276596,0.0161617021276596},
-{3681899,3882887,3882788,0.0344108108108108,0.0276782608695652},
-{3681900,3883498,3882979,0.156014285714286,0.192723529411765},
-{3681901,3882979,3882887,0.0366,0.0318260869565217},
-{3681904,3891666,3891680,0.0101666666666667,0.0114375},
-{3681905,3889861,3889844,0.0115655172413793,1000000},
-{3681906,3889844,3889696,0.0665586206896552,1000000},
-{3681907,3889696,3889641,0.0119018181818182,1000000},
-{3681908,3890181,3890080,0.0432545454545454,1000000},
-{3681909,3890828,3890731,0.0333166666666667,1000000},
-{3681910,3889510,3888913,0.182941463414634,0.23439375},
-{3681911,3887819,3887590,0.0630714285714286,0.0563617021276596},
-{3681912,3887284,3887138,0.0703615384615385,0.0538058823529412},
-{3681913,3886889,3886622,0.09264,0.09264},
-{3681914,3886622,3886585,0.0142054054054054,0.0122232558139535},
-{3681915,3886585,3886495,0.0373411764705882,0.0302285714285714},
-{3681916,3882085,3882361,0.0882,0.1071},
-{3681917,3882025,3882085,0.0198230769230769,0.021475},
-{3681918,3881704,3881720,0.00208235294117647,0.00272307692307692},
-{3681919,3881720,3882025,0.0906692307692308,0.107154545454545},
-{3681920,3881333,3881627,0.0770875,1000000},
-{3681921,3881627,3881704,0.019668,1000000},
-{3681922,3881209,3881333,0.0383478260869565,1000000},
-{3681923,3885692,3885664,0.00975789473684211,0.00862325581395349},
-{3681924,3885664,3885638,0.00762631578947369,0.00673953488372093},
-{3681925,3887097,3887035,0.0186136363636364,0.019046511627907},
-{3681926,3886794,3886653,0.0450878048780488,0.04108},
-{3681927,3888038,3887998,0.00890232558139535,0.00832173913043478},
-{3681928,3887998,3887733,0.0575045454545455,0.055004347826087},
-{3681929,3888249,3888175,0.0227842105263158,0.0188217391304348},
-{3681930,3888175,3888038,0.03723,0.0323739130434783},
-{3681931,3886495,3886413,0.0493285714285714,0.03453},
-{3681932,3886413,3886243,0.110045454545455,0.0691714285714286},
-{3681933,3886243,3886205,0.0208285714285714,0.0176727272727273},
-{3681934,3884966,3884922,0.0256173913043478,0.02946},
-{3681935,3884922,3884480,0.21412,0.256944},
-{3681936,3884480,3884444,0.0154216216216216,0.01585},
-{3681937,3884444,3884083,0.144416666666667,0.144416666666667},
-{3681938,3884083,3883768,0.123548571428571,0.120116666666667},
-{3681939,3883768,3883691,0.0313588235294118,0.0304628571428571},
-{3681940,3883247,3883181,0.036275,0.0378521739130435},
-{3681941,3882939,3882841,0.0553333333333333,0.0574615384615385},
-{3681942,3882841,3882737,0.0429692307692308,0.0429692307692308},
-{3681943,3882244,3882111,0.0694551724137931,0.06294375},
-{3681944,3882111,3881892,0.142875,0.0979714285714286},
-{3681945,3881892,3881852,0.028875,0.0203823529411765},
-{3681946,3882788,3882486,0.147456,0.0877714285714286},
-{3681947,3882486,3882454,0.02067,0.010335},
-{3681948,3885362,3885295,0.0268,0.01608},
-{3681949,3885295,3885255,0.0161076923076923,0.00951818181818182},
-{3681950,3889247,3888996,0.0513169811320755,0.0555061224489796},
-{3681951,3890015,3889692,0.0805471698113208,0.08538},
-{3681952,3889692,3889640,0.0101547169811321,0.0105529411764706},
-{3681953,3890216,3890097,0.0323265306122449,0.03168},
-{3681954,3890097,3890015,0.0203176470588235,0.0211469387755102},
-{3681955,3882642,3882404,0.0657714285714286,0.0600521739130435},
-{3681956,3882404,3882243,0.0532307692307692,0.0451304347826087},
-{3681957,3883915,3883824,0.0252,0.0230086956521739},
-{3682002,3866217,3866307,0.0513310344827586,1000000},
-{3682003,3862163,3862130,0.00707547169811321,0.00872093023255814},
-{3682004,3862130,3861845,0.0753735849056604,0.0868434782608696},
-{3682005,3862321,3862234,0.0168230769230769,0.02187},
-{3682006,3862234,3862163,0.0162,0.0200571428571429},
-{3682007,3864204,3864140,0.0311833333333333,0.046775},
-{3682008,3864140,3864009,0.0562540540540541,0.0717724137931035},
-{3682009,3866482,3866755,1000000,0.16928},
-{3682010,3853426,3853363,0.01719,0.01719},
-{3682011,3853363,3852966,0.107575609756098,0.113092307692308},
-{3682012,3853742,3853696,0.015790243902439,0.0196181818181818},
-{3682013,3853696,3853478,0.0703463414634146,0.0801166666666667},
-{3682014,3853478,3853426,0.0193756097560976,0.01986},
-{3682015,3854005,3853819,0.059985,0.109063636363636},
-{3682026,3920924,3920709,0.133466666666667,0.1287},
-{3682027,3920709,3920661,0.0446666666666667,0.03216},
-{3682028,3920820,3919754,0.378,0.378},
-{3682029,3921161,3920820,0.117545454545455,0.117545454545455},
-{3682030,3902201,3902021,0.0678857142857143,0.07425},
-{3682031,3922242,3922129,1.17994285714286,1.07733913043478},
-{3682032,3902464,3902272,0.1571,0.0689707317073171},
-{3682033,3902272,3902229,0.01665,0.0126},
-{3682034,3906221,3906200,0.00870545454545455,0.00920769230769231},
-{3682035,3906200,3906177,0.00872727272727273,0.00905660377358491},
-{3682036,3907642,3907374,0.119181818181818,0.2458125},
-{3682037,3907709,3907481,0.0379830508474576,0.0379830508474576},
-{3682038,3907481,3907331,0.0260896551724138,0.0260896551724138},
-{3682039,3907074,3907494,0.214916666666667,1000000},
-{3682040,3907494,3907578,0.074895652173913,1000000},
-{3682056,3922022,3921758,0.115018181818182,0.0973230769230769},
-{3682057,3921461,3921418,0.0141157894736842,0.0141157894736842},
-{3682058,3921418,3921226,0.0835578947368421,0.0882},
-{3682059,3921984,3921912,0.0384545454545454,0.047},
-{3682060,3921912,3921843,0.0231567567567568,0.0329538461538462},
-{3682070,3897302,3896652,0.2443375,0.249536170212766},
-{3682071,3902529,3902520,0.00562978723404255,0.00518823529411765},
-{3682072,3902520,3902284,0.0841125,0.0791647058823529},
-{3682073,3903006,3902785,0.0884454545454545,0.077832},
-{3682074,3902785,3902771,0.00531063829787234,0.0048},
-{3682075,3903713,3903694,0.0148695652173913,0.0148695652173913},
-{3682076,3903694,3903444,0.158109090909091,0.168309677419355},
-{3682077,3902021,3901867,0.0513658536585366,0.0513658536585366},
-{3682078,3901867,3901699,0.056504347826087,0.056504347826087},
-{3682103,3865507,3865583,0.0483352941176471,1000000},
-{3682104,3867730,3867709,0.0196758620689655,1000000},
-{3682105,3867709,3867501,0.26305,1000000},
-{3682106,3867884,3867730,0.139258064516129,1000000},
-{3682107,3868047,3868028,0.0101769230769231,1000000},
-{3682108,3896470,3897558,0.212802857142857,0.215886956521739},
-{3682109,3897558,3897646,0.0153652173913043,0.0151457142857143},
-{3682110,3897219,3897316,0.0427111111111111,0.0256266666666667},
-{3682111,3897114,3897219,0.0378352941176471,0.0268},
-{3682112,3896041,3896200,0.0315794117647059,0.0315794117647059},
-{3682113,3896200,3896341,0.0313411764705882,0.0313411764705882},
-{3682114,3881212,3881058,0.0470634146341463,0.0459428571428571},
-{3682115,3879391,3879330,0.0225283018867924,0.0217090909090909},
-{3682116,3879295,3879252,0.0222923076923077,0.0214666666666667},
-{3682117,3879252,3879176,0.064596,0.0609396226415094},
-{3682118,3879176,3879165,0.124069565217391,0.105688888888889},
-{3682119,3879149,3879147,0.0185368421052632,0.0171804878048781},
-{3682120,3879082,3879081,0.0046468085106383,0.00496363636363636},
-{3682121,3879081,3879071,0.0537829787234043,0.0561733333333333},
-{3682122,3879071,3879067,0.0101375,0.0105782608695652},
-{3682123,3879067,3879063,0.0255063829787234,0.0260608695652174},
-{3682124,3879061,3879058,0.0136826086956522,0.0133914893617021},
-{3682125,3879058,3879057,0.00234782608695652,0.00229787234042553},
-{3682126,3879036,3879035,0.00888,0.0148},
-{3682127,3879035,3879034,0.0331333333333333,0.0568},
-{3682128,3881498,3881477,0.0174,0.0174},
-{3682129,3881477,3881425,0.05,0.05},
-{3682130,3881381,3881356,0.02082,1000000},
-{3682131,3881356,3881267,0.0779052631578947,1000000},
-{3682132,3881267,3881228,0.0358235294117647,1000000},
-{3682133,3881228,3881166,0.0585666666666667,1000000},
-{3682134,3881166,3880940,0.203466666666667,1000000},
-{3682135,3880940,3880932,0.0099375,1000000},
-{3682136,3880932,3880896,0.029925,1000000},
-{3682137,3880896,3880842,0.041475,1000000},
-{3682138,3880842,3880824,0.0177882352941176,1000000},
-{3682139,3880824,3880722,0.0909666666666667,1000000},
-{3682140,3880722,3880607,0.0967,1000000},
-{3682141,3880607,3880530,0.09236,1000000},
-{3682142,3880530,3880493,0.0384857142857143,1000000},
-{3682143,3880493,3880458,0.03572,1000000},
-{3682144,3880458,3880359,0.09728,1000000},
-{3682145,3880359,3880302,0.0725571428571429,1000000},
-{3682146,3880302,3880285,0.0226,1000000},
-{3682147,3880285,3880175,0.100305882352941,1000000},
-{3682148,3880175,3880133,0.0263368421052632,1000000},
-{3682149,3880133,3880095,0.03567,1000000},
-{3682150,3880095,3880039,0.0605684210526316,1000000},
-{3682151,3879769,3879736,0.0366352941176471,1000000},
-{3682152,3879736,3879618,0.113435294117647,1000000},
-{3682153,3879391,3879446,0.0304036363636364,0.0309666666666667},
-{3682154,3879508,3879605,0.0484285714285714,0.0493090909090909},
-{3682155,3879605,3879927,0.168814285714286,0.168814285714286},
-{3682156,3880474,3880551,0.0567631578947368,0.0501627906976744},
-{3682157,3880551,3880667,0.0852972972972973,0.0717272727272727},
-{3682158,3850272,3850317,0.0233032258064516,0.02408},
-{3682159,3850317,3850599,0.123075,0.120073170731707},
-{3682160,3852316,3852344,0.0129136363636364,0.0129136363636364},
-{3682161,3852344,3852354,0.00913636363636364,0.00913636363636364},
-{3682162,3852354,3852393,0.0727866666666667,0.0727866666666667},
-{3682163,3852231,3852236,0.00129333333333333,0.00132272727272727},
-{3682164,3852236,3852316,0.0203866666666667,0.02085},
-{3682165,3852468,3852469,0.007875,0.00768292682926829},
-{3682166,3852469,3852475,0.020355,0.020355},
-{3682167,3852475,3852667,0.0754421052631579,0.0735076923076923},
-{3682168,3852667,3852728,0.0253538461538462,0.0253538461538462},
-{3682169,3852728,3852786,0.0155846153846154,0.0155846153846154},
-{3682170,3852786,3853089,0.0810878048780488,0.0773162790697674},
-{3682171,3854134,3854363,0.0605121951219512,0.0590714285714286},
-{3682172,3854363,3854463,0.0311076923076923,0.029590243902439},
-{3682173,3856182,3857392,0.277826086956522,0.277826086956522},
-{3682174,3857392,3857431,0.01644,0.0151421052631579},
-{3682175,3857431,3857561,0.100524324324324,0.0978789473684211},
-{3682176,3857561,3857610,0.047535,0.0513891891891892},
-{3682177,3857610,3857692,0.108666666666667,0.108666666666667},
-{3682178,3857692,3857712,0.029463829787234,0.0282612244897959},
-{3682179,3860438,3860826,0.151927272727273,1000000},
-{3682180,3860826,3860923,0.0351529411764706,1000000},
-{3682181,3860923,3861215,0.123794117647059,1000000},
-{3682182,3861215,3861229,0.00745454545454545,1000000},
-{3682183,3861229,3861329,0.0306176470588235,1000000},
-{3682184,3861329,3861587,0.152807142857143,1000000},
-{3682185,3861587,3861596,0.0155052631578947,1000000},
-{3682186,3861596,3861625,0.029832,1000000},
-{3682187,3861625,3861849,0.139324137931034,1000000},
-{3682188,3861849,3861908,0.0319542857142857,1000000},
-{3682189,3861908,3862154,0.0890914285714286,1000000},
-{3682190,3862154,3862341,0.0566666666666667,1000000},
-{3682191,3862341,3862492,0.0435789473684211,1000000},
-{3682192,3862492,3862591,0.0288157894736842,1000000},
-{3682193,3862591,3863028,0.212676923076923,1000000},
-{3682194,3863028,3863095,0.0235421052631579,1000000},
-{3682195,3863095,3863100,0.00241578947368421,1000000},
-{3682196,3863100,3863368,0.109885714285714,1000000},
-{3682197,3863368,3863400,0.0366,1000000},
-{3682198,3863400,3863406,0.0117230769230769,1000000},
-{3682199,3863406,3863079,0.191914285714286,1000000},
-{3682200,3863079,3862509,0.33118,1000000},
-{3682201,3862509,3862499,0.00759130434782609,1000000},
-{3682202,3862499,3862477,0.0167217391304348,1000000},
-{3682203,3862477,3862702,0.0539739130434783,0.0551733333333333},
-{3682204,3862702,3863544,0.259261224489796,0.254076},
-{3682205,3863544,3863575,0.00827547169811321,0.00843461538461538},
-{3682206,3863575,3863872,0.0974076923076923,0.0993176470588235},
-{3682207,3863872,3864333,0.1813625,0.193453333333333},
-{3682208,3864333,3864358,0.00452195121951219,0.00487894736842105},
-{3682209,3864358,3864522,0.0438947368421053,0.0450810810810811},
-{3682210,3864522,3864570,0.0215090909090909,0.0197166666666667},
-{3682211,3864570,3864660,0.05268,0.0439},
-{3682212,3864660,3864648,0.0135724137931034,0.0112457142857143},
-{3682213,3864648,3864634,0.010258064516129,0.00908571428571429},
-{3682214,3864634,3864281,0.215604545454545,0.206230434782609},
-{3682215,3864281,3864250,0.068376,0.0697714285714286},
-{3682216,3864250,3864247,0.004548,0.0047375},
-{3682217,3864247,3864245,0.0045,0.0046875},
-{3682218,3864245,3864289,0.100126530612245,0.100126530612245},
-{3682219,3864289,3864300,0.0083375,0.00851489361702128},
-{3682220,3864300,3864350,0.0338042553191489,0.0345391304347826},
-{3682221,3864350,3864401,0.019095652173913,0.019095652173913},
-{3682222,3864401,3864449,0.0151772727272727,0.01484},
-{3682223,3864732,3864805,0.0625125,1000000},
-{3682224,3864805,3864829,0.0168666666666667,1000000},
-{3682225,3851086,3851188,0.031,0.0291764705882353},
-{3682226,3851322,3851352,0.00738666666666667,0.00738666666666667},
-{3682227,3851352,3851383,0.0120681818181818,0.0120681818181818},
-{3682228,3851899,3851965,0.0128608695652174,0.0140857142857143},
-{3682229,3851965,3852231,0.06488,0.0695142857142857},
-{3682230,3851383,3851866,0.12792,0.130827272727273},
-{3682231,3851866,3851899,0.00944347826086956,0.00987272727272727},
-{3682232,3852456,3852468,0.0299581395348837,0.0306714285714286},
-{3682233,3890080,3890037,0.0200727272727273,1000000},
-{3682234,3890037,3889991,0.0202545454545455,1000000},
-{3682235,3889991,3889912,0.0338181818181818,1000000},
-{3682236,3890201,3890181,0.0101636363636364,1000000},
-{3682237,3890436,3890282,0.0736,1000000},
-{3682238,3890282,3890201,0.0404689655172414,1000000},
-{3682239,3890731,3890684,0.0201567567567568,1000000},
-{3682240,3890684,3890505,0.0675166666666667,1000000},
-{3682241,3890505,3890436,0.0289090909090909,1000000},
-{3682242,3891127,3891083,0.0151272727272727,1000000},
-{3682243,3890867,3890828,0.0177166666666667,1000000},
-{3682244,3893569,3893610,0.0207409090909091,0.0194170212765957},
-{3682245,3893610,3892785,0.3944,0.3944},
-{3682246,3892785,3892108,0.297733333333333,0.2772},
-{3682247,3892108,3892042,0.0284275862068966,0.032976},
-{3682248,3887590,3887559,0.00987,0.00858260869565217},
-{3682249,3887559,3887419,0.034572972972973,0.0290727272727273},
-{3682250,3887419,3887284,0.0651310344827586,0.04722},
-{3682251,3887138,3886889,0.098772972972973,0.117890322580645},
-{3682252,3890351,3890434,0.03436,1000000},
-{3682253,3890434,3890508,0.0322595744680851,1000000},
-{3682254,3890508,3890669,0.0599375,1000000},
-{3682255,3890669,3890686,0.005275,1000000},
-{3682256,3890686,3890702,0.006375,1000000},
-{3682257,3890702,3890912,0.0938590909090909,1000000},
-{3682258,3890912,3890960,0.0179,1000000},
-{3682259,3890960,3891003,0.0138285714285714,1000000},
-{3682260,3891359,3891476,0.0544578947368421,0.0470318181818182},
-{3682261,3891476,3891599,0.08720625,0.069765},
-{3682262,3891599,3891623,0.0123771428571429,0.0111076923076923},
-{3682263,3891623,3891649,0.0164909090909091,0.01700625},
-{3682264,3891649,3891666,0.0108705882352941,0.01155},
-{3682265,3891680,3892057,0.211484210526316,0.243527272727273},
-{3682266,3892057,3892088,0.0174810810810811,0.0143733333333333},
-{3682267,3892088,3892124,0.0233513513513514,0.020093023255814},
-{3682268,3892442,3892489,0.024465,0.0271833333333333},
-{3682269,3892489,3892519,0.0126615384615385,0.0137166666666667},
-{3682270,3892519,3892742,0.14472,0.140051612903226},
-{3682271,3892742,3892782,0.0130833333333333,0.0181153846153846},
-{3682272,3892782,3892960,0.073275,0.172411764705882},
-{3682273,3892960,3892978,0.00655909090909091,0.012025},
-{3682274,3892978,3892991,0.00610666666666667,0.010992},
-{3682275,3892991,3893009,0.00592173913043478,0.0100888888888889},
-{3682276,3893009,3893066,0.0282510638297872,0.04149375},
-{3682277,3893066,3893102,0.0161125,0.0209027027027027},
-{3682278,3893102,3893128,0.011775,0.01413},
-{3682279,3893490,3893569,0.0399627906976744,0.0373565217391304},
-{3682280,3893412,3893482,0.032504347826087,0.0318127659574468},
-{3682281,3893482,3893490,0.00614666666666667,0.00601304347826087},
-{3682282,3885748,3885714,0.00769230769230769,0.00697674418604651},
-{3682283,3885714,3885692,0.00983076923076923,0.00891627906976744},
-{3682284,3886157,3885841,0.0876972972972973,0.0737454545454545},
-{3682285,3885841,3885748,0.0260368421052632,0.0224863636363636},
-{3682286,3887035,3886991,0.0128045454545455,0.0131023255813954},
-{3682287,3886991,3886819,0.0516818181818182,0.0516818181818182},
-{3682288,3886819,3886794,0.00703255813953488,0.00672},
-{3682289,3888762,3888438,0.0791428571428571,0.0773023255813954},
-{3682290,3888438,3888298,0.0394578947368421,0.03332},
-{3682291,3888298,3888249,0.0112263157894737,0.00927391304347826},
-{3682292,3885343,3885007,0.260011764705882,0.163711111111111},
-{3682293,3885007,3884966,0.02976,0.0283428571428571},
-{3682294,3883587,3883447,0.0915130434782609,0.0637818181818182},
-{3682295,3883447,3883247,0.18496,0.102755555555556},
-{3682296,3883181,3882988,0.095825,0.121042105263158},
-{3682297,3882988,3882939,0.0245333333333333,0.026496},
-{3682298,3882276,3882251,0.00956129032258065,0.0128869565217391},
-{3682299,3882251,3882176,0.03436,0.0468545454545455},
-{3682300,3882176,3882060,0.0741111111111111,0.0741111111111111},
-{3682301,3882060,3881910,0.117442105263158,0.092975},
-{3682302,3880766,3880930,0.060375,1000000},
-{3682303,3890563,3890456,0.0312510638297872,0.0282461538461538},
-{3682304,3890456,3890216,0.0716936170212766,0.0660705882352941},
-{3682305,3890608,3890563,0.009425,0.0087},
-{3682306,3889640,3889509,0.0302666666666667,0.0320470588235294},
-{3682307,3889509,3889280,0.0522444444444444,0.056424},
-{3682308,3889280,3889247,0.00956666666666667,0.010332},
-{3682309,3888996,3888824,0.035977358490566,0.039725},
-{3682310,3888824,3888712,0.0215207547169811,0.0237625},
-{3682311,3888712,3888581,0.0286528301886792,0.0316375},
-{3682312,3888581,3888401,0.0374264150943396,0.0422042553191489},
-{3682313,3888401,3888238,0.0315396226415094,0.0355659574468085},
-{3682314,3888238,3888141,0.0238615384615385,0.0264},
-{3682315,3888141,3888103,0.00613846153846154,0.00679148936170213},
-{3682316,3888103,3887960,0.037356,0.040604347826087},
-{3682317,3887960,3887930,0.004608,0.00500869565217391},
-{3682318,3887930,3887879,0.009012,0.00979565217391304},
-{3682319,3886885,3886727,0.0414367346938775,0.0483428571428571},
-{3682320,3886727,3886595,0.0363673469387755,0.0456923076923077},
-{3682321,3886595,3886571,0.00762857142857143,0.00983684210526316},
-{3682322,3886571,3886461,0.0274897959183673,0.0384857142857143},
-{3682323,3884244,3884199,0.0147081081081081,0.0143210526315789},
-{3682324,3884199,3884157,0.0147076923076923,0.0155027027027027},
-{3682325,3881971,3881880,0.025493023255814,0.0267365853658537},
-{3682326,3881880,3881286,0.157581818181818,0.165085714285714},
-{3682327,3882120,3882009,0.0419707317073171,0.0400186046511628},
-{3682328,3882009,3881971,0.0103674418604651,0.0106142857142857},
-{3682329,3882145,3882120,0.00651,0.00578666666666667},
-{3682330,3882243,3882166,0.0252307692307692,0.0218666666666667},
-{3682331,3882166,3882145,0.007125,0.00633333333333333},
-{3682332,3882756,3882723,0.00766666666666667,0.0075},
-{3682333,3882830,3882756,0.0171130434782609,0.0174933333333333},
-{3682334,3883154,3882830,0.0815869565217391,0.0915365853658537},
-{3682335,3883205,3883188,0.00577021276595745,0.00713684210526316},
-{3682336,3883188,3883154,0.00877021276595745,0.0108473684210526},
-{3682337,3883634,3883510,0.036975,0.0343953488372093},
-{3682338,3883824,3883669,0.0439230769230769,0.0380666666666667},
-{3682339,3883669,3883634,0.00981,0.00872},
-{3682340,3884160,3883915,0.0654136363636364,0.0625695652173913},
-{3682341,3884379,3884337,0.0122590909090909,0.0119866666666667},
-{3682342,3884337,3884160,0.0451333333333333,0.0451333333333333},
-{3682359,3849505,3849536,0.0160588235294118,0.0165454545454545},
-{3682360,3849536,3849621,0.0712,0.0689032258064516},
-{3682363,3865563,3866792,0.227432727272727,0.236015094339623},
-{3682364,3850599,3851063,0.1328125,0.1275},
-{3682365,3851063,3851086,0.00697959183673469,0.00670588235294118},
-{3682366,3900113,3899184,0.31978,0.290709090909091},
-{3682367,3899184,3898713,0.172778947368421,0.161449180327869},
-{3682368,3893128,3893387,0.130625,0.136304347826087},
-{3682369,3893387,3893412,0.00864255319148936,0.00864255319148936},
-{3682370,3880667,3880725,0.0498342857142857,0.0396409090909091},
-{3682371,3880725,3880766,0.0302432432432432,0.0266428571428571},
-{3682374,3889671,3889634,0.01665,0.01998},
-{3682375,3889634,3889510,0.0648,0.1404},
-{3682376,3873858,3873420,0.192275,0.15382},
-{3682377,3873420,3873390,0.0108923076923077,0.00809142857142857},
-{3682378,3868028,3867884,0.156514285714286,1000000},
-{3682379,3864449,3864567,0.05229,0.0475363636363636},
-{3682380,3864567,3864587,0.00848571428571429,0.00675},
-{3682381,3879330,3879317,0.00528679245283019,0.00518888888888889},
-{3682382,3879317,3879295,0.00985384615384615,0.00948888888888889},
-{3682383,3879018,3879012,0.01985,0.0144363636363636},
-{3682384,3879012,3879010,0.0135,0.010125},
-{3682385,3881852,3881768,0.0581,0.0422545454545454},
-{3682386,3881768,3881754,0.01952,0.00944516129032258},
-{3682387,3881058,3881007,0.01392,0.0142769230769231},
-{3682388,3881007,3880971,0.012045,0.0126789473684211},
-{3682401,3901699,3901401,0.098595652173913,0.098595652173913},
-{3682402,3901401,3901282,0.0438279069767442,0.0509351351351351},
-{3682425,3916852,3915020,0.5187,0.528130909090909},
-{3682455,3848705,3848689,0.105994736842105,0.108859459459459},
-{3682456,3848689,3848670,0.01836,0.0188307692307692},
-{3682551,3875051,3874249,1000000,1000000},
-{3682552,3876061,3876004,1000000,1000000},
-{3682553,3876004,3875051,1000000,1000000},
-{3682556,3874077,3873697,0.325825,0.300761538461538},
-{3682557,3873697,3873622,0.047341935483871,0.0444727272727273},
-{3682558,3847618,3847649,0.031475,0.0321446808510638},
-{3682559,3847649,3847666,0.0267829787234043,0.0267829787234043},
-{3682577,3881754,3881736,0.01165,1000000},
-{3682578,3881736,3881710,0.0170571428571429,1000000},
-{3682598,3897850,3897719,0.0697363636363636,0.139472727272727},
-{3682599,3897719,3897302,0.1998,0.31968},
-{3682601,3868688,3868486,1000000,0.126833333333333},
-{3682602,3868486,3868384,1000000,0.0609},
-{3682604,3886340,3886501,0.0891891891891892,0.0891891891891892},
-{3682611,3884157,3883889,0.087135,0.0968166666666667},
-{3682612,3883889,3883650,0.0810333333333333,0.09724},
-{3682613,3891148,3891086,0.0148,0.0173739130434783},
-{3682614,3891086,3890608,0.128952941176471,0.134216326530612},
-{3682615,3865583,3866027,0.197043243243243,1000000},
-{3682616,3866027,3866127,0.04779375,1000000},
-{3682623,3919382,3919402,0.00656363636363636,0.005415},
-{3682662,3915531,3914022,0.265835294117647,0.278104615384615},
-{3682663,3914022,3909556,0.608828571428571,0.645727272727273},
-{3682664,3917078,3915550,0.297590163934426,0.31298275862069},
-{3682665,3915550,3915531,0.003534375,0.00370819672131148},
-{3682666,3889167,3888995,0.0468439024390244,1000000},
-{3682667,3888995,3888883,0.0352769230769231,1000000},
-{3682668,3915020,3914772,0.125513513513514,0.211090909090909},
-{3682669,3914772,3913851,0.266082352941176,0.260965384615385},
-{3682687,3920434,3920048,0.151405263157895,0.19178},
-{3682688,3920048,3919919,0.0642769230769231,0.0677513513513514},
-{3682691,3921055,3920704,0.2262,0.201964285714286},
-{3682692,3920704,3920602,0.052725,0.0482057142857143},
-{3682693,3893934,3894018,0.0217698113207547,0.0213666666666667},
-{3682694,3894018,3897114,0.745134545454545,0.706593103448276},
-{3682695,3891804,3891714,0.0277245283018868,0.029388},
-{3682696,3891714,3891439,0.0724384615384615,0.0768734693877551},
-{3682700,3891083,3890895,0.0904285714285714,1000000},
-{3682701,3890895,3890867,0.0109166666666667,1000000},
-{3682705,3888520,3887982,0.137246808510638,0.1343875},
-{3682706,3887982,3887819,0.0371866666666667,0.0341510204081633},
-{3682707,3888913,3888791,0.0277787234042553,0.0277787234042553},
-{3682708,3888791,3888520,0.0698217391304348,0.068336170212766}
-};
diff --git a/src/trsp/tester/issue191-good.h b/src/trsp/tester/issue191-good.h
deleted file mode 100644
index d2365fd..0000000
--- a/src/trsp/tester/issue191-good.h
+++ /dev/null
@@ -1,22601 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-#define NEDGE 22574
-
-static edge_t edges[NEDGE] = {
-{2950984,3847538,3847326,0.1338,0.14049},
-{2951013,3848117,3848557,0.21634,0.196672727272727},
-{2951139,3847707,3848229,0.281288888888889,0.361657142857143},
-{2951145,3846938,3848653,1.38490588235294,1.38490588235294},
-{2951177,3847689,3847383,0.15845,0.165339130434783},
-{2951237,3847076,3848452,0.749777777777778,0.749777777777778},
-{2951267,3847751,3848117,0.147342857142857,0.156272727272727},
-{2951290,3847383,3847326,0.453022222222222,0.453022222222222},
-{2951291,3846724,3846228,0.190076470588235,0.190076470588235},
-{2951341,3846522,3845953,0.280711111111111,0.261351724137931},
-{2951342,3846323,3847649,1.08084444444444,1.08084444444444},
-{2951510,3847387,3846522,0.392133333333333,0.407215384615385},
-{2951520,3847326,3846724,0.2280375,0.208491428571429},
-{2951553,3846902,3847957,0.503844444444444,0.503844444444444},
-{2951555,3846959,3848550,0.9066,0.9066},
-{2951673,3846882,3848633,0.989,0.989},
-{2951702,3846966,3848419,0.406975,0.424669565217391},
-{2951743,3848471,3846688,0.267018947368421,1000000},
-{2962266,3847391,3847542,1000000,0.129814285714286},
-{2962477,3852941,3853106,0.161454545454545,0.190285714285714},
-{2962549,3852941,3852856,0.0389538461538462,1000000},
-{2962550,3852856,3852882,0.0715071428571429,1000000},
-{2962551,3852988,3852941,0.0468,1000000},
-{2962552,3852988,3852882,1000000,0.0600692307692308},
-{2962553,3853322,3852988,0.152027586206897,0.137775},
-{2962554,3853454,3853322,0.0454714285714286,0.0454714285714286},
-{2962555,3851625,3852882,0.471342857142857,0.611},
-{2962559,3852335,3852224,0.0390666666666667,0.0390666666666667},
-{2962560,3852306,3852367,0.01944,0.0220909090909091},
-{2962561,3853717,3853454,0.0938347826086957,0.0981},
-{2962562,3854088,3853717,0.1192875,0.121825531914894},
-{2962563,3854566,3854088,0.1677125,0.1677125},
-{2962564,3854892,3854566,0.124852173913043,0.122195744680851},
-{2962565,3854995,3854892,0.0395217391304348,0.0386808510638298},
-{2962566,3855301,3854995,0.111717391304348,0.1142},
-{2962567,3855705,3855301,0.143569565217391,0.14676},
-{2962568,3855944,3855705,0.102559090909091,0.10028},
-{2962569,3856228,3855944,0.0917869565217391,0.0981906976744186},
-{2962570,3856377,3856228,0.0465333333333333,0.0465333333333333},
-{2962571,3863773,3862710,0.35272,0.360736363636364},
-{2962572,3864110,3863773,0.215115789473684,0.215115789473684},
-{2962573,3866457,3865801,0.1674,0.17205},
-{2962574,3865801,3865598,0.0696827586206897,0.0594352941176471},
-{2962575,3865598,3864916,1000000,0.213658064516129},
-{2962576,3864122,3863836,0.160578260869565,0.167877272727273},
-{2962577,3867378,3866457,0.273418181818182,0.265376470588235},
-{2962578,3867227,3867421,0.18181875,0.19394},
-{2962579,3867069,3867227,0.138723076923077,0.138723076923077},
-{2962580,3867018,3867069,0.0444,0.0411512195121951},
-{2962584,3870943,3871224,0.4197,0.368517073170732},
-{2962585,3872002,3872095,0.0696555555555556,1000000},
-{2962589,3878423,3878571,0.18618,0.223416},
-{2962590,3878423,3877865,0.268278260869565,1000000},
-{2962591,3877798,3877865,0.0944117647058823,0.0697826086956522},
-{2962592,3877742,3877798,0.07065,0.0605571428571429},
-{2962593,3877557,3877742,0.1438125,0.1438125},
-{2962594,3878781,3878423,0.1689,1000000},
-{2962595,3879207,3878781,0.1523625,1000000},
-{2962596,3879689,3879207,0.237784615384615,1000000},
-{2962603,3881159,3881235,0.0644,0.0709714285714286},
-{2962638,3854912,3854769,0.051446511627907,0.06145},
-{2962639,3855091,3854912,0.0777428571428571,0.0697692307692308},
-{2962640,3855091,3855370,0.107928571428571,0.174346153846154},
-{2962641,3856367,3856069,0.131363636363636,0.0985227272727273},
-{2962642,3856681,3856367,0.130994117647059,0.106042857142857},
-{2962643,3857387,3856681,0.243616666666667,0.1827125},
-{2962644,3856684,3856377,0.0975136363636364,0.0912893617021277},
-{2962645,3857350,3857043,0.150514285714286,0.195111111111111},
-{2962646,3857529,3857350,0.183768,0.14356875},
-{2962647,3857832,3857529,0.102351219512195,0.0975906976744186},
-{2962648,3859655,3859839,0.104884615384615,0.0940344827586207},
-{2962649,3858161,3857832,0.104466666666667,0.109325581395349},
-{2962650,3858404,3858161,0.07568,0.0774},
-{2962651,3858497,3858404,0.0338045454545455,0.0345906976744186},
-{2962652,3864854,3865191,0.163842857142857,0.181089473684211},
-{2962653,3865240,3864854,0.128692307692308,0.132078947368421},
-{2962654,3865521,3865240,0.0996162162162162,0.0898975609756098},
-{2962655,3866809,3867018,0.177173684210526,0.19236},
-{2962656,3866749,3866809,0.075552,0.06296},
-{2962657,3867243,3866749,0.16753125,0.141078947368421},
-{2962658,3867939,3867243,0.167113043478261,0.167113043478261},
-{2962659,3868738,3867939,0.223138461538462,0.212253658536585},
-{2962660,3870348,3869892,0.196466666666667,0.3789},
-{2962661,3867563,3866560,0.268910526315789,0.237641860465116},
-{2962662,3867790,3867563,0.0752,0.0689333333333333},
-{2962663,3871128,3871204,1000000,0.0642230769230769},
-{2962664,3871687,3871888,1000000,0.0552363636363636},
-{2962665,3872095,3872273,0.18952,1000000},
-{2962666,3872273,3872292,0.0428903225806452,1000000},
-{2962667,3870734,3870699,0.02552,1000000},
-{2962668,3872435,3872452,1000000,0.0138346153846154},
-{2962669,3871968,3871888,0.0976636363636364,1000000},
-{2962670,3872630,3872621,1000000,0.0543789473684211},
-{2962671,3872446,3872166,0.09675,0.159352941176471},
-{2962672,3872711,3872716,1000000,0.0217945945945946},
-{2962673,3876266,3875896,1000000,0.219495652173913},
-{2962674,3877492,3877557,0.0462,0.04224},
-{2962675,3877428,3877492,0.04242,0.0374294117647059},
-{2962676,3877288,3877428,0.1198,0.0951352941176471},
-{2962677,3877137,3877288,0.129537931034483,0.129537931034483},
-{2962678,3876979,3877137,0.169909090909091,0.178},
-{2962679,3876741,3876979,1000000,0.227},
-{2962680,3876509,3876741,1000000,0.214968},
-{2962681,3876366,3876509,1000000,0.203052631578947},
-{2962682,3876266,3876366,0.0659612903225806,0.13632},
-{2962683,3877557,3878087,0.29004,1000000},
-{2962684,3878087,3878194,0.0900461538461539,1000000},
-{2962685,3878519,3878194,1000000,0.14895},
-{2962686,3878883,3878519,1000000,0.199825},
-{2962687,3878883,3879207,1000000,0.308575},
-{2962688,3878576,3878883,1000000,0.2563875},
-{2962689,3880096,3879689,0.222022222222222,1000000},
-{2962690,3878467,3878576,0.0984,0.0984},
-{2962691,3878445,3878467,0.0262125,0.0262125},
-{2962692,3878287,3878445,1000000,0.1197375},
-{2962693,3878067,3878287,1000000,0.1737},
-{2962694,3879433,3878883,1000000,0.237688888888889},
-{2962695,3879844,3879433,1000000,0.206834482758621},
-{2962696,3879105,3879433,0.393428571428571,1000000},
-{2962697,3878960,3879105,0.106778571428571,1000000},
-{2962698,3878931,3878960,0.0285870967741935,1000000},
-{2962699,3878798,3878931,0.130531034482759,1000000},
-{2962700,3876017,3876891,1000000,0.240251162790698},
-{2962701,3877564,3877811,1000000,0.210577777777778},
-{2962702,3878384,3878798,0.35678,1000000},
-{2962703,3880536,3880096,0.182175,1000000},
-{2962704,3880209,3879844,1000000,0.169036363636364},
-{2962705,3880766,3880209,1000000,0.487725},
-{2962706,3884123,3884820,0.225671428571429,0.225671428571429},
-{2962707,3883627,3884123,0.22654,0.151026666666667},
-{2962708,3883165,3883627,0.2178,0.146778260869565},
-{2962709,3884820,3885663,0.226775510204082,0.226775510204082},
-{2962710,3890112,3889707,0.165123529411765,0.147742105263158},
-{2962713,3894341,3893822,1000000,0.208969565217391},
-{2962714,3894941,3894341,1000000,0.252926086956522},
-{2962715,3895407,3894373,0.620418181818182,0.499360975609756},
-{2962716,3896232,3895757,0.187486956521739,0.165853846153846},
-{2962717,3895532,3894941,1000000,0.231404081632653},
-{2962720,3898398,3898807,0.121689795918367,0.116917647058824},
-{2962721,3898282,3898398,0.0318,0.0311510204081633},
-{2962722,3897752,3898282,0.166271428571429,0.174585},
-{2962723,3897202,3897752,0.235086486486486,0.193293333333333},
-{2962724,3896926,3897202,0.0942130434782609,0.0902875},
-{2962737,3851455,3849926,0.511723076923077,0.525189473684211},
-{2962738,3851907,3851455,0.148381818181818,1000000},
-{2962739,3852261,3851907,0.08667,1000000},
-{2962740,3852696,3852261,0.145851428571429,1000000},
-{2962741,3854086,3853919,0.09462,0.135171428571429},
-{2962742,3854151,3854086,0.0231771428571429,0.0219243243243243},
-{2962743,3854578,3854151,0.130448780487805,0.124381395348837},
-{2962744,3855947,3854578,0.357354545454545,0.357354545454545},
-{2962745,3856149,3855947,0.114884210526316,0.0808444444444444},
-{2962746,3858245,3857387,0.251575,0.227841509433962},
-{2962747,3858675,3858245,0.16076170212766,0.1799},
-{2962748,3859167,3858994,0.0588967741935484,0.1074},
-{2962749,3859781,3859259,0.15255652173913,0.159490909090909},
-{2962750,3859896,3859781,0.0376695652173913,0.0402976744186046},
-{2962751,3861043,3859948,0.323026666666667,0.323026666666667},
-{2962752,3860787,3860524,0.0635875,0.10174},
-{2962753,3867916,3868053,1000000,0.0938526315789474},
-{2962754,3868197,3868053,0.08542,0.08542},
-{2962755,3868867,3868197,0.204963636363636,0.270552},
-{2962756,3869451,3869047,1000000,0.116076923076923},
-{2962757,3869047,3868665,1000000,0.101769230769231},
-{2962758,3868665,3867861,1000000,0.231048648648649},
-{2962759,3871981,3871318,1000000,0.28737},
-{2962760,3872440,3871963,0.27048,1000000},
-{2962761,3871981,3872483,0.167785714285714,1000000},
-{2962762,3872483,3872529,0.0848108108108108,1000000},
-{2962763,3872459,3872483,0.108333333333333,1000000},
-{2962764,3872455,3872459,0.105391304347826,1000000},
-{2962765,3872453,3872455,0.18435652173913,1000000},
-{2962766,3872458,3872453,0.0647632653061224,1000000},
-{2962767,3872010,3871981,1000000,0.16605},
-{2962768,3872045,3872010,1000000,0.12753},
-{2962769,3872064,3872052,1000000,0.163297674418605},
-{2962770,3872044,3872064,1000000,0.0792857142857143},
-{2962771,3871930,3872022,1000000,0.1277},
-{2962772,3875393,3875481,0.14904,0.156884210526316},
-{2962773,3875266,3875334,0.157268571428571,0.148767567567568},
-{2962774,3876026,3875527,0.218378571428571,0.244584},
-{2962775,3876891,3877289,1000000,0.107818604651163},
-{2962776,3877289,3877564,1000000,0.329964705882353},
-{2962777,3877289,3877610,1000000,0.0784571428571429},
-{2962778,3877610,3877893,1000000,0.0752372093023256},
-{2962779,3877893,3878431,1000000,0.175266666666667},
-{2962780,3878389,3878789,0.117954545454545,1000000},
-{2962781,3876995,3877110,1000000,0.169163636363636},
-{2962782,3876876,3876995,1000000,0.17660625},
-{2962783,3876735,3876876,1000000,0.227871428571429},
-{2962784,3878167,3878384,0.19146,1000000},
-{2962785,3877893,3878167,0.221123076923077,1000000},
-{2962786,3877616,3877719,0.19965,1000000},
-{2962787,3877488,3877616,0.17353125,1000000},
-{2962788,3877326,3877488,0.1716,1000000},
-{2962789,3876846,3876735,1000000,0.385827272727273},
-{2962790,3877274,3877326,0.239777777777778,1000000},
-{2962791,3880269,3880471,0.1217,0.125896551724138},
-{2962792,3880204,3880269,0.033576,0.02798},
-{2962793,3882281,3883165,0.611463157894737,0.283360975609756},
-{2962794,3882763,3883165,0.254045454545455,0.109588235294118},
-{2962795,3882468,3882763,0.09996,0.0740444444444444},
-{2962796,3882165,3882468,0.106526086956522,0.0924566037735849},
-{2962797,3881858,3882165,0.137184615384615,0.102888461538462},
-{2962798,3881457,3881858,0.161735294117647,0.112224489795918},
-{2962799,3881101,3881457,0.128846511627907,0.142061538461538},
-{2962800,3880728,3881101,0.147236842105263,0.3496875},
-{2962801,3880471,3880728,0.118994594594595,0.1375875},
-{2962802,3883811,3883165,1000000,0.442248},
-{2962803,3884306,3883811,1000000,0.25595625},
-{2962804,3884669,3884306,1000000,0.2099},
-{2962805,3884867,3884669,1000000,0.25445},
-{2962806,3885287,3885208,0.0433304347826087,1000000},
-{2962807,3880492,3880269,0.120783333333333,1000000},
-{2962808,3880738,3880492,0.113184615384615,1000000},
-{2962809,3880991,3880676,1000000,0.12576},
-{2962810,3886651,3887278,0.217774468085106,0.204708},
-{2962811,3886073,3886651,0.2529,0.343221428571429},
-{2962812,3885287,3886073,0.417311111111111,0.312983333333333},
-{2962813,3885046,3885287,0.068425,0.0763813953488372},
-{2962814,3884829,3885046,0.0738,0.0690893617021276},
-{2962815,3884772,3884829,0.04638,1000000},
-{2962816,3884559,3884829,0.085953488372093,0.0786382978723404},
-{2962817,3884184,3884559,0.130369565217391,0.127595744680851},
-{2962818,3883835,3884184,0.127215,0.118339534883721},
-{2962819,3885258,3885339,0.2779125,1000000},
-{2962820,3884829,3884892,0.0462521739130435,1000000},
-{2962821,3885393,3885258,1000000,0.0578823529411765},
-{2962822,3885695,3885393,1000000,0.140876923076923},
-{2962823,3886085,3885695,1000000,0.19668},
-{2962824,3893554,3893800,0.127131818181818,0.124306666666667},
-{2962825,3893318,3893554,0.129333333333333,0.108279069767442},
-{2962826,3892117,3893318,0.46528085106383,0.437364},
-{2962827,3893800,3894171,0.150528,0.150528},
-{2962828,3896657,3896232,0.240975,0.265903448275862},
-{2962829,3896657,3896926,0.0924533333333333,0.0924533333333333},
-{2962830,3896217,3896471,0.1482,1000000},
-{2962831,3895336,3895663,0.383684210526316,0.158478260869565},
-{2962832,3895085,3895336,0.12028,0.1127625},
-{2962833,3894567,3894798,0.23124,0.121705263157895},
-{2962834,3894798,3893554,0.749825806451613,0.860911111111111},
-{2962835,3896441,3896217,0.11787,1000000},
-{2962836,3897856,3897312,0.178221052631579,1000000},
-{2962853,3854789,3854740,0.0235363636363636,0.0246571428571429},
-{2962854,3851476,3851083,0.281120930232558,0.2518375},
-{2962855,3857984,3858104,0.0965414634146341,0.08796},
-{2962856,3861802,3861631,0.0632684210526316,0.0572428571428572},
-{2962857,3862517,3861802,0.244871428571429,0.239176744186047},
-{2962858,3864629,3864346,0.144933333333333,0.3261},
-{2962859,3863339,3862517,0.433509677419355,0.407236363636364},
-{2962860,3864346,3864258,0.0437032258064516,0.0483857142857143},
-{2962861,3864258,3863915,0.199176923076923,0.18495},
-{2962862,3863915,3863339,0.495733333333333,0.387965217391304},
-{2962863,3866618,3865566,0.424214285714286,0.387326086956522},
-{2962864,3865109,3865008,0.382828571428571,1000000},
-{2962865,3864686,3863915,0.470766666666667,0.546696774193548},
-{2962866,3864784,3863339,1000000,0.897434482758621},
-{2962867,3870613,3869940,1000000,0.180141176470588},
-{2962868,3871322,3870613,1000000,0.168753846153846},
-{2962869,3871930,3871338,0.148165714285714,1000000},
-{2962870,3868086,3867239,1000000,0.246158823529412},
-{2962871,3868558,3868086,1000000,0.127897297297297},
-{2962872,3868976,3868662,1000000,0.0827833333333333},
-{2962873,3869270,3868976,1000000,0.0783157894736842},
-{2962874,3869931,3869270,1000000,0.19754},
-{2962875,3870046,3869931,1000000,0.033951724137931},
-{2962876,3870421,3870046,1000000,0.0981333333333333},
-{2962877,3870904,3870421,1000000,0.120047368421053},
-{2962878,3871347,3870904,1000000,0.11185},
-{2962879,3867497,3866913,0.28248,0.252214285714286},
-{2962880,3871935,3871347,1000000,0.272021052631579},
-{2962881,3871935,3871914,1000000,0.131431578947368},
-{2962882,3871942,3871935,1000000,0.05551875},
-{2962883,3871887,3871942,1000000,0.159441176470588},
-{2962884,3872467,3872468,0.174882352941176,1000000},
-{2962885,3872489,3872467,0.0720166666666667,1000000},
-{2962886,3871929,3871877,1000000,0.07392},
-{2962887,3872000,3871929,1000000,0.0984857142857143},
-{2962888,3872062,3872008,1000000,0.0706186046511628},
-{2962889,3872130,3872062,1000000,0.138175609756098},
-{2962890,3872265,3872130,1000000,0.159465},
-{2962891,3872517,3872489,0.0921681818181818,1000000},
-{2962892,3872555,3872517,0.0824936170212766,1000000},
-{2962893,3872597,3872555,0.105782608695652,1000000},
-{2962894,3872742,3872597,0.257178947368421,1000000},
-{2962895,3872375,3872265,1000000,0.100976470588235},
-{2962896,3872375,3872742,0.2781,0.256707692307692},
-{2962897,3876041,3876026,0.292296774193548,0.312455172413793},
-{2962898,3876458,3876476,0.0106137931034483,0.00879428571428571},
-{2962899,3876476,3876846,0.15815,0.1186125},
-{2962900,3876055,3876053,0.10315,0.154725},
-{2962901,3874960,3875344,0.314113043478261,0.258021428571429},
-{2962902,3875344,3875800,0.303176470588235,0.20616},
-{2962903,3875315,3875344,0.19524,1000000},
-{2962904,3874982,3874960,1000000,0.160386206896552},
-{2962905,3875326,3875315,0.157696551724138,1000000},
-{2962906,3875054,3874982,1000000,0.136248648648649},
-{2962907,3875389,3875326,0.163296774193548,1000000},
-{2962908,3875121,3875054,1000000,0.123076923076923},
-{2962909,3875448,3875389,0.176111111111111,1000000},
-{2962910,3872742,3872911,0.09912,0.1239},
-{2962911,3876846,3877274,0.164422222222222,0.170746153846154},
-{2962912,3877274,3877854,0.146526315789474,0.206222222222222},
-{2962913,3877854,3878444,0.15387,0.15387},
-{2962914,3878444,3879157,0.350504347826087,0.287914285714286},
-{2962915,3876911,3876846,1000000,0.24498},
-{2962916,3876981,3876911,1000000,0.18195652173913},
-{2962917,3877045,3876981,1000000,0.28029},
-{2962918,3876495,3876911,0.158111111111111,0.152464285714286},
-{2962919,3876911,3877340,0.200918181818182,0.122783333333333},
-{2962920,3877340,3877906,0.208707692307692,0.200977777777778},
-{2962921,3877906,3878473,0.20394,0.30591},
-{2962922,3878473,3879147,0.416833333333333,0.267964285714286},
-{2962923,3877340,3877274,0.225463636363636,1000000},
-{2962924,3877398,3877340,0.246,1000000},
-{2962925,3876537,3876495,1000000,0.187663636363636},
-{2962926,3876981,3877398,0.14488,0.135825},
-{2962927,3876537,3876981,0.144483870967742,0.154448275862069},
-{2962928,3876055,3876105,0.08235,0.08235},
-{2962929,3876163,3876137,0.0718137931034483,0.06942},
-{2962930,3876239,3876163,0.15788275862069,0.14308125},
-{2962931,3876319,3876239,0.175137931034483,0.153909090909091},
-{2962932,3876422,3876319,0.1674,0.186715384615385},
-{2962933,3876463,3876422,1000000,0.0846521739130435},
-{2962934,3879753,3879502,0.15164,0.162471428571429},
-{2962935,3879985,3879753,0.171333333333333,0.15951724137931},
-{2962936,3880219,3879985,0.1938,0.185725},
-{2962937,3880449,3880219,0.16985,0.185290909090909},
-{2962938,3880716,3880449,0.2175,0.2175},
-{2962939,3881144,3880716,1000000,1000000},
-{2962940,3881255,3880991,1000000,0.0995581395348837},
-{2962941,3881781,3881255,1000000,0.2467125},
-{2962942,3882152,3881830,0.170033333333333,1000000},
-{2962943,3883413,3883835,0.191135294117647,0.15113023255814},
-{2962944,3883025,3883413,0.162670588235294,0.128623255813954},
-{2962945,3882650,3883025,0.134671428571429,0.145030769230769},
-{2962946,3882379,3882650,0.10383,0.133974193548387},
-{2962947,3882317,3882379,1000000,0.0517142857142857},
-{2962948,3882280,3882152,0.06156,1000000},
-{2962949,3882118,3882221,0.0496666666666667,0.0447},
-{2962950,3882118,3882107,1000000,0.193},
-{2962951,3882379,3882422,1000000,0.0546352941176471},
-{2962952,3882221,3882107,1000000,0.0690387096774193},
-{2962953,3882358,3882118,1000000,0.160533333333333},
-{2962954,3881900,3882118,0.137648275862069,0.105047368421053},
-{2962955,3880637,3881144,0.233823529411765,0.203846153846154},
-{2962956,3880397,3880637,0.112326315789474,0.109446153846154},
-{2962957,3882915,3882396,0.385721739130435,1000000},
-{2962958,3883247,3882915,0.158647058823529,1000000},
-{2962959,3881384,3881144,0.3554,0.21324},
-{2962960,3881803,3881384,0.274175,0.253084615384615},
-{2962961,3881910,3881803,0.098,0.123789473684211},
-{2962962,3883924,3883247,0.535226086956522,1000000},
-{2962963,3887702,3887880,0.079775,0.05983125},
-{2962964,3885903,3886020,0.064025,1000000},
-{2962965,3886251,3886020,1000000,0.12146},
-{2962966,3886671,3886251,1000000,0.23998064516129},
-{2962967,3886843,3886671,1000000,0.0906171428571429},
-{2962968,3887617,3887287,0.155369230769231,0.168316666666667},
-{2962969,3887961,3887617,0.14823,0.141171428571429},
-{2962970,3889252,3889594,0.130466666666667,1000000},
-{2962971,3889045,3889252,0.0623675675675676,1000000},
-{2962972,3888848,3889045,0.0706764705882353,1000000},
-{2962973,3887961,3888848,0.35628,1000000},
-{2962974,3887455,3887961,0.341011764705882,1000000},
-{2962975,3886830,3887287,1000000,0.244038461538462},
-{2962976,3886448,3886830,1000000,0.252490909090909},
-{2962977,3886256,3886448,1000000,0.105765517241379},
-{2962978,3885969,3886256,1000000,0.125775},
-{2962979,3890645,3891055,0.171105882352941,1000000},
-{2962980,3890291,3890645,0.143725714285714,1000000},
-{2962981,3889594,3890291,0.273034285714286,1000000},
-{2962982,3893546,3894011,0.217760869565217,0.263605263157895},
-{2962983,3892118,3892439,0.14900625,0.170292857142857},
-{2962984,3891744,3892118,0.165416666666667,0.1985},
-{2962985,3891396,3891744,0.160954838709677,0.1782},
-{2962986,3894286,3894567,0.125316279069767,0.1122625},
-{2962987,3894011,3894286,0.121682608695652,0.109752941176471},
-{2962988,3895457,3895163,0.143808,0.130734545454545},
-{2962989,3895625,3895457,0.0767563636363637,0.0767563636363637},
-{2962990,3896122,3895625,0.162866666666667,0.159905454545455},
-{2962991,3896701,3896601,0.0501833333333333,0.0547454545454545},
-{2962992,3897699,3896799,0.672766666666667,1000000},
-{2962993,3898244,3897699,0.19141875,1000000},
-{2962994,3898721,3898244,0.231825,1000000},
-{2962995,3898961,3898464,0.26235652173913,1000000},
-{2962996,3899352,3898961,0.162831578947368,1000000},
-{2962997,3899648,3899352,0.159853846153846,1000000},
-{2962998,3905225,3905329,0.0337411764705882,0.0351183673469388},
-{2962999,3903475,3903889,0.131559183673469,0.146509090909091},
-{2963000,3903376,3903475,0.0321115384615385,0.0347875},
-{2963001,3903012,3903376,0.0982705882352941,0.111373333333333},
-{2963024,3851477,3851702,0.0801567567567568,0.0780473684210526},
-{2963025,3851702,3851809,0.0604054054054054,0.06984375},
-{2963026,3851765,3851809,0.06228,0.0573631578947368},
-{2963027,3851283,3851765,0.365,0.386470588235294},
-{2963028,3851048,3850940,0.0476516129032258,0.04924},
-{2963029,3850940,3850311,0.183342857142857,0.175009090909091},
-{2963031,3858679,3858104,0.214082608695652,0.21884},
-{2963032,3859021,3858679,0.230853333333333,0.3148},
-{2963033,3859021,3859110,0.115547368421053,0.0593351351351352},
-{2963034,3859110,3859344,0.0888,0.0826758620689655},
-{2963035,3859722,3859344,0.180130434782609,0.111972972972973},
-{2963036,3861049,3859722,0.331704,0.345525},
-{2963037,3861263,3861049,0.0552566037735849,0.058572},
-{2963038,3861568,3861263,0.0825346153846154,0.0841529411764706},
-{2963039,3862264,3861944,0.0795647058823529,0.0765622641509434},
-{2963040,3862342,3862264,0.0164307692307692,0.017088},
-{2963041,3862785,3862342,0.100015384615385,0.10835},
-{2963042,3859110,3859002,0.326194285714286,0.543657142857143},
-{2963043,3859002,3858587,0.260218604651163,0.266414285714286},
-{2963044,3860522,3859825,0.222709090909091,0.21776},
-{2963045,3861191,3860522,0.179660869565217,0.179660869565217},
-{2963046,3861612,3861191,0.1286625,0.13724},
-{2963047,3862001,3861612,0.1146125,0.125031818181818},
-{2963048,3859824,3859825,0.0756,0.0360818181818182},
-{2963049,3859824,3860094,0.230804081632653,0.25132},
-{2963050,3864784,3864645,0.117367741935484,1000000},
-{2963051,3864645,3864383,0.19667027027027,1000000},
-{2963052,3864383,3864265,0.0938742857142857,1000000},
-{2963053,3864265,3864145,0.118816666666667,1000000},
-{2963054,3863561,3863137,0.330963636363636,0.404511111111111},
-{2963055,3865031,3865022,0.0824093023255814,1000000},
-{2963056,3865022,3865026,0.0728914285714286,1000000},
-{2963057,3865026,3865015,0.0722333333333333,1000000},
-{2963058,3872135,3871652,0.176903225806452,1000000},
-{2963059,3871463,3870953,0.2199,1000000},
-{2963060,3870953,3870733,0.274872,1000000},
-{2963061,3870650,3870985,0.313447058823529,1000000},
-{2963062,3871041,3871209,0.1942,0.1942},
-{2963063,3870995,3871041,0.0489529411764706,0.0489529411764706},
-{2963064,3870604,3869956,0.209372093023256,0.29041935483871},
-{2963065,3869956,3869792,0.087312,0.094904347826087},
-{2963066,3868742,3868408,0.3196,0.2256},
-{2963067,3869824,3869221,0.240436363636364,0.255948387096774},
-{2963068,3866942,3867376,0.112889361702128,1000000},
-{2963069,3867376,3867631,0.0805813953488372,1000000},
-{2963070,3869461,3869093,0.103459459459459,0.1276},
-{2963071,3869049,3868757,0.07281,0.2427},
-{2963072,3868411,3868578,0.0578666666666667,0.0400615384615385},
-{2963073,3871244,3870619,0.191565957446809,0.2501},
-{2963074,3870619,3870604,0.0048875,0.00651666666666667},
-{2963075,3872906,3872742,0.207672727272727,1000000},
-{2963076,3872961,3872906,0.22081935483871,1000000},
-{2963077,3872900,3872771,0.0706105263157895,0.0706105263157895},
-{2963078,3872428,3872375,1000000,0.0569225806451613},
-{2963079,3872579,3872428,1000000,0.1421},
-{2963080,3872771,3872579,1000000,0.149205405405405},
-{2963081,3872814,3872771,0.04605,0.04605},
-{2963082,3873025,3872889,0.186490909090909,0.279736363636364},
-{2963083,3872315,3872135,0.12031875,1000000},
-{2963084,3872731,3872315,0.302111111111111,1000000},
-{2963085,3875229,3875121,1000000,0.201890322580645},
-{2963086,3875352,3875229,1000000,0.206807142857143},
-{2963087,3875506,3875352,1000000,0.217036363636364},
-{2963088,3875981,3876047,0.0370909090909091,1000000},
-{2963089,3875552,3875448,0.252,1000000},
-{2963090,3875740,3875552,0.226392,1000000},
-{2963091,3875886,3876008,1000000,0.149030769230769},
-{2963092,3876135,3876008,0.119363636363636,1000000},
-{2963093,3876368,3876834,0.3131625,0.172779310344828},
-{2963094,3876515,3876463,1000000,0.1794},
-{2963095,3876600,3876515,1000000,0.2262},
-{2963096,3876671,3876600,1000000,0.240521739130435},
-{2963097,3876763,3876671,1000000,0.250963636363636},
-{2963098,3876834,3876763,1000000,0.3156375},
-{2963099,3877240,3877165,0.156488888888889,0.156488888888889},
-{2963100,3877425,3877240,0.56298,1000000},
-{2963101,3877523,3877425,0.262942857142857,1000000},
-{2963102,3877606,3877523,0.25134,1000000},
-{2963103,3878778,3879044,0.13186,0.152146153846154},
-{2963104,3878091,3878488,0.144135483870968,0.2031},
-{2963105,3877323,3877606,0.08546,0.0776909090909091},
-{2963106,3880156,3880397,0.112357894736842,0.10674},
-{2963107,3879949,3880156,0.111518918918919,0.1058},
-{2963108,3879728,3879949,0.119666666666667,0.119666666666667},
-{2963109,3879044,3879728,0.289989473684211,1.10196},
-{2963110,3879766,3879408,0.155789189189189,1000000},
-{2963111,3885006,3885460,1000000,0.183375},
-{2963112,3884532,3885006,1000000,0.44976},
-{2963113,3884532,3883924,0.333254545454545,1000000},
-{2963114,3884813,3884532,0.192441176470588,1000000},
-{2963115,3885127,3884813,0.25431724137931,1000000},
-{2963116,3884953,3885253,1000000,0.081585},
-{2963117,3885127,3885412,0.159886956521739,1000000},
-{2963118,3884918,3884942,0.0166666666666667,1000000},
-{2963119,3884490,3884918,0.289390909090909,1000000},
-{2963120,3884105,3884490,0.215666666666667,1000000},
-{2963121,3883635,3884105,0.203813793103448,1000000},
-{2963122,3883329,3883635,0.158634782608696,1000000},
-{2963123,3884487,3884532,1000000,0.0485647058823529},
-{2963124,3883632,3884097,1000000,0.237921428571429},
-{2963125,3883267,3883632,1000000,0.194337931034483},
-{2963126,3882955,3883267,1000000,0.12724},
-{2963127,3882710,3882955,1000000,0.119357142857143},
-{2963128,3882146,3882710,1000000,0.280384615384615},
-{2963129,3881716,3882146,1000000,0.226577777777778},
-{2963130,3887133,3887455,0.1276,1000000},
-{2963131,3886812,3887133,0.135157894736842,1000000},
-{2963132,3886778,3886812,0.0152666666666667,1000000},
-{2963133,3885992,3886403,0.1659,1000000},
-{2963134,3885823,3885992,0.0577411764705882,1000000},
-{2963135,3885412,3885823,0.18838125,1000000},
-{2963136,3888514,3887961,0.306325714285714,0.243668181818182},
-{2963137,3890169,3890547,0.121832432432432,1000000},
-{2963138,3895323,3895328,1000000,0.0398333333333333},
-{2963139,3900158,3900003,1000000,0.248885714285714},
-{2963143,3857510,3856965,0.163782352941176,0.163782352941176},
-{2963144,3856965,3856809,0.0936,0.0903724137931034},
-{2963145,3856809,3856687,0.131533333333333,0.131533333333333},
-{2963146,3856687,3856564,0.138409756097561,0.153372972972973},
-{2963147,3856564,3856515,0.080209756097561,0.0843230769230769},
-{2963148,3860127,3860094,0.045465306122449,0.045465306122449},
-{2963149,3860412,3860127,0.278611764705882,0.289983673469388},
-{2963150,3860592,3860412,0.204369230769231,0.346539130434783},
-{2963151,3860786,3860592,0.294,0.196},
-{2963152,3860920,3860786,0.102570731707317,0.0978},
-{2963153,3861038,3860920,0.0783891891891892,0.0763263157894737},
-{2963154,3862582,3862001,0.159668181818182,0.2602},
-{2963155,3862659,3861638,0.319936363636364,0.485420689655172},
-{2963156,3861036,3860858,0.0841076923076923,0.082005},
-{2963157,3860858,3860592,0.228282352941176,0.133820689655172},
-{2963158,3860592,3860298,0.1746,0.374142857142857},
-{2963159,3860298,3860203,0.042255,0.04695},
-{2963160,3860203,3860027,0.0922727272727273,0.0780769230769231},
-{2963161,3860027,3859874,0.0560634146341464,0.06385},
-{2963162,3859874,3859671,0.068805,0.1529},
-{2963163,3860920,3860203,0.348088888888889,1000000},
-{2963164,3860656,3860027,1000000,0.24036},
-{2963165,3861038,3860656,1000000,0.15816},
-{2963166,3863137,3862750,0.27216,0.15552},
-{2963167,3863322,3862952,0.20473125,1000000},
-{2963168,3863322,3863249,0.068208,0.068208},
-{2963169,3863249,3863050,0.127164705882353,0.227557894736842},
-{2963170,3863050,3862941,0.05985,0.0684},
-{2963171,3862941,3862752,0.0859813953488372,0.0948},
-{2963172,3862752,3862158,0.357507692307692,0.3873},
-{2963173,3864889,3864912,0.0683529411764706,1000000},
-{2963174,3864912,3864937,0.0762588235294117,1000000},
-{2963175,3864937,3864959,0.0700470588235294,1000000},
-{2963176,3865040,3865236,1000000,0.278060869565217},
-{2963177,3863475,3863249,1000000,0.184142857142857},
-{2963178,3868411,3867816,0.189252631578947,0.211517647058824},
-{2963179,3867816,3867718,0.0347692307692308,0.0410909090909091},
-{2963180,3867718,3867673,0.0173414634146341,0.0229354838709677},
-{2963181,3867673,3867454,0.10035,0.129483870967742},
-{2963182,3867454,3867302,0.07595625,0.0675166666666667},
-{2963183,3872081,3871822,0.177392307692308,0.256233333333333},
-{2963184,3871552,3871317,0.0573733333333333,1000000},
-{2963185,3872404,3872154,0.06976,1000000},
-{2963186,3872081,3871552,0.3218,1000000},
-{2963187,3872154,3872081,0.173275,1000000},
-{2963188,3871000,3871203,0.0531782608695652,1000000},
-{2963189,3871203,3871277,0.0168244897959184,1000000},
-{2963190,3873710,3872404,0.324986666666667,1000000},
-{2963191,3873757,3873905,0.0733333333333333,1000000},
-{2963192,3873905,3874006,0.0403028571428571,1000000},
-{2963193,3874186,3874181,0.0228,1000000},
-{2963194,3874186,3874297,1000000,0.05589},
-{2963195,3874181,3874253,0.0451578947368421,1000000},
-{2963196,3874253,3874184,1000000,0.15771724137931},
-{2963197,3874259,3874006,1000000,0.27105},
-{2963198,3874014,3873710,0.107368421052632,1000000},
-{2963199,3874373,3874485,1000000,0.0937135135135135},
-{2963200,3874485,3874833,1000000,0.2022},
-{2963201,3878045,3877845,0.3264,1000000},
-{2963202,3878771,3878458,0.238513043478261,1000000},
-{2963203,3878938,3878771,0.144736363636364,1000000},
-{2963204,3880545,3880499,0.0317806451612903,1000000},
-{2963205,3880730,3881193,1000000,0.388371428571429},
-{2963206,3880506,3880617,0.0476666666666667,0.0476666666666667},
-{2963207,3879992,3880506,0.213163636363636,0.180369230769231},
-{2963208,3879693,3879992,0.1624,0.0953217391304348},
-{2963209,3879473,3879693,0.0838216216216216,0.0659872340425532},
-{2963210,3879564,3879400,0.0847578947368421,1000000},
-{2963211,3879400,3879473,0.0266285714285714,0.0237957446808511},
-{2963212,3878530,3878360,0.0461111111111111,0.0452727272727273},
-{2963213,3878583,3878621,0.0451363636363636,1000000},
-{2963214,3878583,3878315,0.151075,1000000},
-{2963215,3877766,3877668,1000000,0.080475},
-{2963216,3879324,3879400,0.0213681818181818,0.0195875},
-{2963217,3879324,3879564,1000000,0.0955621621621622},
-{2963218,3879564,3879793,1000000,0.17216},
-{2963219,3879724,3879793,0.04848,1000000},
-{2963220,3879356,3879724,0.208130769230769,1000000},
-{2963221,3878766,3879356,0.275825,1000000},
-{2963222,3878463,3878766,0.172254545454545,1000000},
-{2963223,3878233,3878463,0.136254545454545,1000000},
-{2963224,3878621,3878766,0.2649,1000000},
-{2963225,3882584,3883329,0.323955555555556,1000000},
-{2963226,3882057,3882584,0.223490322580645,1000000},
-{2963227,3880730,3882057,0.635475,1000000},
-{2963228,3885248,3885242,0.0688461538461538,1000000},
-{2963229,3885456,3885542,1000000,0.505323529411765},
-{2963230,3885542,3885566,1000000,0.109102702702703},
-{2963231,3885566,3885539,1000000,0.113477419354839},
-{2963232,3891124,3891449,0.12216,0.138818181818182},
-{2963233,3892080,3892586,0.237095454545455,0.208644},
-{2963234,3900250,3900258,0.0741,1000000},
-{2963239,3856428,3856463,0.0954642857142857,0.0891},
-{2963240,3856761,3856463,0.169816666666667,0.179805882352941},
-{2963241,3857141,3856761,0.1596375,0.1596375},
-{2963242,3857822,3857141,0.208014285714286,0.208014285714286},
-{2963243,3858164,3857822,0.0918,0.101463157894737},
-{2963244,3858470,3858164,0.1896,0.194009302325581},
-{2963245,3858599,3858470,0.0802829268292683,0.0731466666666667},
-{2963246,3859671,3858599,0.397786956521739,0.406626666666667},
-{2963247,3861038,3861562,0.2047,0.179736585365854},
-{2963248,3859874,3859767,0.207436363636364,0.212260465116279},
-{2963249,3859767,3859527,0.151917391304348,0.148685106382979},
-{2963250,3859527,3859353,0.0925953488372093,0.08848},
-{2963251,3864829,3864710,1000000,0.0676695652173913},
-{2963252,3868144,3868255,0.19948,0.256474285714286},
-{2963253,3868255,3868525,0.374494736842105,1000000},
-{2963254,3870566,3869920,1000000,0.132955102040816},
-{2963255,3868650,3868598,1000000,0.0133148936170213},
-{2963256,3869269,3868907,1000000,0.227594117647059},
-{2963257,3868907,3868688,0.266928,0.175610526315789},
-{2963258,3875471,3875410,1000000,0.145745454545455},
-{2963259,3879793,3880088,1000000,0.36696},
-{2963260,3880088,3880310,1000000,1000000},
-{2963261,3880529,3880310,1000000,1000000},
-{2963262,3880529,3881182,1000000,0.492066666666667},
-{2963263,3880497,3881042,1000000,0.226233333333333},
-{2963264,3882572,3883564,0.332475,0.506628571428571},
-{2963265,3883564,3884493,0.373133333333333,0.272286486486487},
-{2963266,3884493,3885291,0.286241379310345,0.25940625},
-{2963267,3885502,3885449,1000000,0.21221052631579},
-{2963268,3885376,3885319,0.116668421052632,1000000},
-{2963269,3885319,3885291,0.0829058823529412,1000000},
-{2963270,3885291,3885230,0.192283333333333,1000000},
-{2963271,3885230,3885187,0.156308108108108,1000000},
-{2963272,3885955,3886380,0.134005714285714,0.123426315789474},
-{2963273,3886380,3886820,0.154491428571429,0.168975},
-{2963274,3886820,3887112,0.0955230769230769,0.149016},
-{2963275,3887112,3887589,0.134022857142857,0.123442105263158},
-{2963276,3887589,3888574,0.235082926829268,0.260497297297297},
-{2963277,3888574,3888789,0.0554461538461538,0.0502883720930233},
-{2963278,3888789,3889082,0.07101,0.0645545454545454},
-{2963279,3889082,3889393,0.08196,0.0745090909090909},
-{2963280,3889393,3889524,0.0377285714285714,0.0360136363636364},
-{2963281,3890026,3890418,0.09975,0.0977142857142857},
-{2963282,3890418,3890864,0.114306666666667,0.109442553191489},
-{2963283,3890864,3891153,0.12428,0.0847363636363636},
-{2963284,3891153,3891867,0.365856,0.217771428571429},
-{2963285,3891867,3892241,0.140845714285714,0.12324},
-{2963286,3892464,3893002,0.12675652173913,0.138828571428571},
-{2963287,3893002,3893119,0.0360418604651163,0.0336913043478261},
-{2963288,3893621,3893901,0.100157142857143,0.2214},
-{2963289,3894065,3894022,0.0915272727272727,1000000},
-{2963290,3900213,3900208,1000000,0.0371411764705882},
-{2963291,3900208,3900206,1000000,0.0237111111111111},
-{2963320,3859155,3858826,0.168153191489362,0.16465},
-{2963321,3861016,3859897,0.266016,0.266016},
-{2963322,3861278,3861016,0.0685102040816327,0.0658235294117647},
-{2963323,3861494,3861278,0.058104,0.0558692307692308},
-{2963324,3862073,3861494,0.162465306122449,0.159216},
-{2963325,3862477,3862073,0.0990260869565217,0.0949},
-{2963326,3869052,3868127,1000000,0.23332},
-{2963327,3869689,3869052,1000000,0.148460869565217},
-{2963328,3870221,3869689,1000000,0.1167625},
-{2963329,3868688,3868713,0.0550829268292683,0.0501866666666667},
-{2963330,3878214,3878179,1000000,0.0226666666666667},
-{2963331,3877969,3877623,1000000,0.181241860465116},
-{2963332,3880206,3880149,0.0275172413793103,1000000},
-{2963333,3881183,3881236,0.0216473684210526,0.0222324324324324},
-{2963334,3881236,3881702,0.186063157894737,0.168342857142857},
-{2963335,3881702,3882008,0.135723076923077,0.117626666666667},
-{2963336,3882008,3882242,0.100595454545455,0.09836},
-{2963337,3882242,3882431,0.0755454545454546,0.0722608695652174},
-{2963338,3885237,3885200,1000000,0.149091428571429},
-{2963339,3885200,3885150,1000000,0.0972},
-{2963340,3884597,3884871,0.330290322580645,1000000},
-{2963341,3884398,3884597,0.255218181818182,1000000},
-{2963342,3884398,3884766,1000000,0.281178947368421},
-{2963343,3896314,3897419,1000000,0.30855},
-{2963344,3894192,3894125,0.246615384615385,1000000},
-{2963345,3894259,3894192,0.173211764705882,1000000},
-{2963346,3894325,3894259,0.152976,1000000},
-{2963347,3894307,3894325,0.171126315789474,1000000},
-{2963348,3903508,3904083,0.149086956521739,0.207818181818182},
-{2963363,3855814,3854870,0.5109,0.469475675675676},
-{2963364,3856584,3855814,0.3069875,0.31351914893617},
-{2963365,3856699,3856584,0.0724883720930233,0.0692666666666667},
-{2963366,3856766,3856699,0.0466363636363636,0.0500487804878049},
-{2963367,3856932,3856766,0.222927272727273,0.228111627906977},
-{2963368,3868458,3868577,0.0785739130434783,1000000},
-{2963369,3868577,3868904,0.4882,1000000},
-{2963370,3868927,3869032,0.0930473684210526,1000000},
-{2963371,3869279,3869492,1000000,0.26568},
-{2963372,3870181,3869660,1000000,0.134033333333333},
-{2963373,3870540,3870481,0.0135906976744186,1000000},
-{2963374,3870910,3870384,1000000,0.1368},
-{2963375,3871538,3870973,0.1102625,1000000},
-{2963376,3872036,3871459,1000000,0.1236},
-{2963377,3870481,3870181,0.0620266666666667,1000000},
-{2963378,3869216,3868583,1000000,0.140946666666667},
-{2963379,3868583,3868254,1000000,0.0647538461538461},
-{2963380,3867688,3867520,0.0362490566037736,1000000},
-{2963381,3867520,3867170,0.0676075471698113,1000000},
-{2963382,3867170,3866748,0.0818888888888889,1000000},
-{2963383,3866748,3866416,0.0584222222222222,1000000},
-{2963384,3871291,3870978,1000000,0.084555},
-{2963385,3873006,3871291,1000000,0.422034146341463},
-{2963386,3875443,3874466,0.352563636363636,1000000},
-{2963387,3874466,3874444,0.0837,0.0732375},
-{2963388,3875443,3874444,1000000,0.56175652173913},
-{2963389,3875784,3875443,0.14725,1000000},
-{2963390,3876742,3876097,0.182945454545455,1000000},
-{2963391,3876097,3875819,0.087525,1000000},
-{2963392,3875784,3875297,0.142257142857143,1000000},
-{2963393,3875293,3874873,1000000,0.338152941176471},
-{2963394,3874873,3874258,1000000,0.175088372093023},
-{2963395,3872729,3872378,1000000,0.11174},
-{2963396,3872714,3872085,0.129886956521739,1000000},
-{2963397,3873518,3873482,0.159741176470588,1000000},
-{2963398,3872653,3872671,0.143433333333333,1000000},
-{2963399,3874035,3873518,0.14749756097561,1000000},
-{2963400,3875859,3876130,0.1335625,1000000},
-{2963401,3875859,3875776,1000000,0.143625},
-{2963402,3875746,3875721,0.107675,1000000},
-{2963403,3875721,3875594,0.228792,1000000},
-{2963404,3875594,3875501,0.288,1000000},
-{2963405,3876180,3876535,1000000,0.2848875},
-{2963406,3876498,3876720,0.0878444444444444,1000000},
-{2963407,3877530,3877377,0.08296875,1000000},
-{2963408,3877623,3877371,1000000,0.0905285714285714},
-{2963409,3877371,3876771,1000000,0.186627906976744},
-{2963410,3878655,3878635,0.2584,0.228},
-{2963411,3878635,3878586,0.273668571428571,0.30898064516129},
-{2963412,3878586,3878553,0.130937142857143,0.1273},
-{2963413,3878553,3878416,0.290592857142857,0.290592857142857},
-{2963414,3876748,3877266,1000000,0.196},
-{2963415,3877870,3878393,0.345423529411765,1000000},
-{2963416,3878393,3878897,0.230014285714286,1000000},
-{2963417,3878897,3879195,0.122155555555556,1000000},
-{2963418,3880243,3880902,0.387651428571429,0.357047368421053},
-{2963419,3880704,3880902,1000000,0.228830769230769},
-{2963420,3881000,3880713,1000000,0.0694},
-{2963421,3883843,3884150,1000000,0.0879888888888889},
-{2963422,3883732,3883918,1000000,0.0732620689655172},
-{2963423,3883918,3884150,1000000,0.0805935483870968},
-{2963424,3883732,3883843,0.120577777777778,1000000},
-{2963425,3883504,3883641,0.0355777777777778,1000000},
-{2963426,3883641,3883966,0.100782352941176,1000000},
-{2963427,3884174,3884285,1000000,0.216572727272727},
-{2963428,3884404,3884401,1000000,0.0249951219512195},
-{2963429,3884766,3885240,0.28105,0.198388235294118},
-{2963430,3884531,3884812,0.302147368421053,0.2496},
-{2963431,3885240,3885650,0.235944,0.159421621621622},
-{2963432,3885650,3885792,0.07126875,0.06335},
-{2963433,3886048,3886288,0.107541176470588,0.1142625},
-{2963434,3886288,3886707,0.203228571428571,0.182384615384615},
-{2963435,3886707,3886999,0.145694117647059,0.117942857142857},
-{2963436,3886999,3887514,0.217870588235294,0.168354545454545},
-{2963437,3894091,3894469,1000000,0.110823529411765},
-{2963438,3897275,3897559,1000000,0.12306},
-{2963439,3897026,3897275,1000000,0.104141379310345},
-{2963440,3896752,3897026,1000000,0.114905454545455},
-{2963441,3896496,3896752,1000000,0.132833333333333},
-{2963457,3850581,3850917,0.1085,0.102117647058824},
-{2963458,3850917,3851074,0.0524936170212766,0.0483764705882353},
-{2963459,3851074,3851228,0.04976,0.044784},
-{2963460,3851228,3851556,0.101424489795918,0.099396},
-{2963461,3858650,3856932,0.478146666666667,0.500386046511628},
-{2963462,3859166,3858650,0.184390909090909,0.197882926829268},
-{2963463,3859654,3859166,0.165025531914894,0.168613043478261},
-{2963464,3860084,3859654,0.177485714285714,0.162052173913043},
-{2963465,3860258,3860084,0.066588,0.0708382978723404},
-{2963466,3860475,3860258,0.0739294117647059,0.0769469387755102},
-{2963467,3860769,3860475,0.0946117647058824,0.096504},
-{2963468,3866416,3865804,0.113642307692308,1000000},
-{2963469,3864509,3864376,0.0674135593220339,1000000},
-{2963470,3867909,3866882,0.2179,0.222536170212766},
-{2963471,3868337,3867909,0.082334693877551,0.080688},
-{2963472,3868649,3868337,0.0640897959183674,0.062808},
-{2963473,3869013,3868649,0.0732,0.0732},
-{2963474,3869749,3869013,0.200152941176471,0.378066666666667},
-{2963475,3871184,3870343,0.21500487804878,1000000},
-{2963476,3869169,3868278,1000000,0.238911627906977},
-{2963477,3868278,3867644,1000000,0.16386976744186},
-{2963478,3869836,3869624,1000000,0.179776744186047},
-{2963479,3869624,3869531,1000000,0.0936734693877551},
-{2963480,3867146,3866966,1000000,0.0628864864864865},
-{2963481,3874533,3874015,1000000,0.142513636363636},
-{2963482,3874966,3874533,1000000,0.130155},
-{2963483,3875374,3874966,1000000,0.151694117647059},
-{2963484,3875453,3875312,1000000,0.38403},
-{2963485,3875160,3875078,0.128351351351351,1000000},
-{2963486,3875486,3875629,1000000,0.0379076923076923},
-{2963487,3876030,3876867,1000000,0.240064864864865},
-{2963488,3877686,3876841,1000000,0.193772727272727},
-{2963489,3877686,3878107,0.1251,1000000},
-{2963490,3879226,3878950,0.071475,1000000},
-{2963491,3878107,3878114,0.21107027027027,0.411031578947368},
-{2963492,3878114,3878193,0.101659090909091,0.1278},
-{2963493,3885493,3885920,0.187123404255319,0.162866666666667},
-{2963494,3885920,3886563,0.373846153846154,0.297551020408163},
-{2963495,3888715,3889387,0.418241379310345,0.311},
-{2963497,3904719,3905124,0.138114893617021,0.1352375},
-{2963498,3902125,3902512,1000000,0.0808777777777778},
-{2963499,3902512,3902952,1000000,0.097},
-{2963500,3902952,3903122,1000000,0.0436153846153846},
-{2963501,3905991,3907030,0.341289795918367,0.334464},
-{2963503,3911888,3912006,0.026832,0.0258},
-{2963504,3912006,3913364,0.286621276595745,0.264141176470588},
-{2963505,3913364,3914167,0.165587755102041,0.1690375},
-{2963506,3914167,3914702,0.121176923076923,0.118890566037736},
-{2963507,3914702,3915408,0.192344444444444,0.188847272727273},
-{2963510,3920983,3921520,0.221026666666667,0.198924},
-{2963515,3855579,3856618,0.250592307692308,0.255505882352941},
-{2963516,3857322,3857718,0.12999,0.14856},
-{2963517,3861208,3860769,0.167139622641509,0.177168},
-{2963518,3861564,3861208,0.145729411764706,0.151677551020408},
-{2963519,3861770,3861564,0.0942127659574468,0.0962608695652174},
-{2963520,3861770,3862075,0.235911111111111,0.181988571428571},
-{2963521,3861882,3861729,0.0390115384615385,1000000},
-{2963522,3861729,3861136,0.1797,1000000},
-{2963523,3861084,3860579,0.124366666666667,1000000},
-{2963524,3862723,3862546,1000000,0.06506},
-{2963525,3866966,3865818,1000000,0.284209090909091},
-{2963526,3865226,3865181,1000000,0.0982285714285714},
-{2963527,3865181,3865014,1000000,0.44295},
-{2963528,3858737,3859177,0.0875666666666667,1000000},
-{2963529,3859445,3859534,0.02442,1000000},
-{2963530,3859445,3859890,0.116224137931034,1000000},
-{2963531,3860665,3860754,0.1113,1000000},
-{2963532,3860754,3860512,1000000,0.121276923076923},
-{2963533,3860234,3860128,0.11157,0.0719806451612903},
-{2963534,3860467,3860234,0.194242105263158,0.36906},
-{2963535,3869531,3869707,1000000,0.1868},
-{2963536,3869636,3869825,0.289817647058824,1000000},
-{2963537,3874734,3874667,0.0802744186046512,1000000},
-{2963538,3874667,3874433,0.312174193548387,1000000},
-{2963539,3874514,3874337,1000000,0.290875862068965},
-{2963540,3874337,3874228,1000000,0.0986478260869565},
-{2963541,3874228,3874120,1000000,0.0999375},
-{2963542,3874120,3874000,1000000,0.158908695652174},
-{2963543,3878375,3878371,1000000,0.0312931034482759},
-{2963544,3878297,3878232,0.206067857142857,1000000},
-{2963545,3899695,3899623,0.0313173913043478,0.0300125},
-{2963546,3915408,3916164,0.190675471698113,0.187144444444444},
-{2963547,3917135,3917310,1000000,0.0872936170212766},
-{2963551,3850165,3849790,0.0891396226415094,0.0858981818181818},
-{2963552,3852017,3851512,0.100811111111111,0.0938586206896552},
-{2963553,3852976,3852017,0.180043636363636,0.170731034482759},
-{2963554,3854648,3852976,0.358264285714286,0.351978947368421},
-{2963555,3861743,3861552,0.0713869565217391,0.065676},
-{2963556,3862116,3861743,0.119604255319149,0.112428},
-{2963557,3869693,3869677,1000000,0.233933333333333},
-{2963558,3869604,3869580,0.2174375,1000000},
-{2963559,3869580,3869574,0.0913058823529412,1000000},
-{2963560,3869635,3869628,1000000,0.0638264150943396},
-{2963561,3869628,3869612,1000000,0.0807283018867924},
-{2963562,3874000,3873896,1000000,0.126885},
-{2963563,3873896,3873861,1000000,0.0662727272727273},
-{2963564,3873506,3873314,1000000,0.212720930232558},
-{2963565,3872140,3873001,1000000,0.1697125},
-{2963566,3907935,3907642,0.1687,0.106547368421053},
-{2963567,3907935,3908085,0.0401181818181818,0.07355},
-{2963568,3908085,3908565,0.128835294117647,0.193252941176471},
-{2963569,3908565,3909060,0.133068,0.144639130434783},
-{2963570,3909060,3909523,0.140387234042553,0.140387234042553},
-{2963571,3909523,3909985,0.146282608695652,0.143170212765957},
-{2963572,3910526,3909985,0.139110638297872,0.1362125},
-{2963573,3909633,3909907,0.0715066666666667,0.0670375},
-{2963574,3909907,3909970,0.0153488372093023,0.0143478260869565},
-{2963575,3910440,3910588,0.0341302325581395,0.0333545454545455},
-{2963576,3910588,3911189,0.21230625,0.178784210526316},
-{2963577,3911189,3911758,0.160744186046512,0.2304},
-{2963578,3911758,3912370,0.1410625,0.144063829787234},
-{2963579,3912370,3912587,0.0410938775510204,0.040272},
-{2963580,3912587,3914199,0.581979310344828,0.375053333333333},
-{2963581,3914199,3914312,0.0409818181818182,0.0397764705882353},
-{2963598,3863454,3862545,0.323614285714286,0.30204},
-{2963599,3863454,3863488,0.210884210526316,0.205476923076923},
-{2963600,3863488,3863299,0.131536363636364,0.134595348837209},
-{2963601,3863299,3863087,0.1287875,0.134386956521739},
-{2963602,3864824,3864770,0.0309913043478261,0.03168},
-{2963603,3869540,3869568,0.0987411764705882,1000000},
-{2963604,3869556,3869537,0.150769230769231,0.127826086956522},
-{2963605,3869537,3869530,0.177388235294118,0.0886941176470588},
-{2963606,3869514,3869529,0.0387673469387755,0.0431727272727273},
-{2963607,3869529,3869473,0.2489,0.265493333333333},
-{2963608,3873314,3873151,1000000,0.167751219512195},
-{2963609,3873151,3872863,1000000,0.34209},
-{2963610,3872746,3872633,0.127036363636364,1000000},
-{2963611,3872633,3872550,0.0697142857142857,1000000},
-{2963612,3872550,3872227,0.271533333333333,1000000},
-{2963613,3877363,3876916,0.251883870967742,1000000},
-{2963614,3892016,3893477,0.685266666666667,0.57819375},
-{2963615,3892016,3892740,0.416167741935484,0.548987234042553},
-{2963616,3898228,3901207,0.57779,0.619060714285714},
-{2963617,3901693,3901282,0.353871428571429,0.159812903225806},
-{2963618,3901964,3901693,0.0760153846153846,0.0689441860465116},
-{2963619,3902354,3901964,0.0977384615384615,0.0929707317073171},
-{2963620,3902749,3902354,0.13021875,0.0886595744680851},
-{2963621,3902640,3902828,1000000,0.0551423076923077},
-{2963622,3902828,3903195,1000000,0.112843636363636},
-{2963623,3902021,3902333,0.123048648648649,1000000},
-{2963624,3902333,3902596,0.0765795918367347,1000000},
-{2963625,3902596,3902858,0.0783260869565217,1000000},
-{2963638,3862229,3862099,0.122440909090909,0.117117391304348},
-{2963639,3863737,3864128,0.480311111111111,0.370525714285714},
-{2963640,3863599,3863737,0.200555555555556,0.1805},
-{2963641,3863599,3863224,0.209712,0.201646153846154},
-{2963642,3863224,3862951,0.116365714285714,0.127275},
-{2963643,3862951,3862229,0.296668965517241,0.296668965517241},
-{2963644,3862099,3861924,0.120470588235294,0.118153846153846},
-{2963645,3861924,3861765,0.1166,0.1166},
-{2963646,3861765,3861683,0.041592,0.041592},
-{2963647,3861683,3861570,0.0888588235294118,0.0888588235294118},
-{2963648,3869473,3869449,0.30462,0.324063829787234},
-{2963649,3869449,3869455,0.207188235294118,0.2201375},
-{2963650,3869455,3869471,0.163672340425532,0.183157142857143},
-{2963651,3872328,3872071,1000000,0.215347826086957},
-{2963652,3876858,3875869,1000000,0.23495593220339},
-{2963653,3857959,3857731,0.09576,0.0990620689655173},
-{2963654,3861566,3860748,0.36312,0.389057142857143},
-{2963655,3862644,3861566,0.375291891891892,0.420781818181818},
-{2963656,3885834,3885856,0.124735384615385,0.126684375},
-{2963657,3896121,3896577,0.251170588235294,0.502341176470588},
-{2963658,3896577,3896966,0.162446808510638,0.155816326530612},
-{2963659,3896966,3897618,0.264678260869565,0.248473469387755},
-{2963660,3897618,3897834,0.0895733333333333,0.0857617021276596},
-{2963661,3847542,3847424,0.0547909090909091,0.0588},
-{2963662,3860672,3861011,0.5595,0.53712},
-{2963663,3885991,3886005,1000000,0.0507152542372881},
-{2963664,3894631,3894706,0.0638076923076923,1000000},
-{2963666,3873297,3873650,0.0827727272727273,0.0714117647058824},
-{2963667,3873207,3873297,0.0202772727272727,0.0171576923076923},
-{2963668,3872775,3873207,0.1016,0.0896470588235294},
-{2963669,3872248,3872775,0.110542857142857,0.096725},
-{2963670,3872056,3872248,0.048375,0.0471951219512195},
-{2963671,3869471,3869528,0.131253333333333,0.1284},
-{2963672,3869528,3869582,0.109252173913043,0.114218181818182},
-{2963673,3869582,3869600,0.0354133333333333,0.0370604651162791},
-{2963674,3869822,3869732,0.271389473684211,0.234381818181818},
-{2963675,3869822,3869857,0.12065,0.140109677419355},
-{2963676,3871485,3871451,0.06518,1000000},
-{2963677,3885441,3885398,0.3094,0.219836842105263},
-{2963678,3885015,3885398,0.335509090909091,0.141946153846154},
-{2963679,3885398,3886331,0.431373913043478,0.522189473684211},
-{2963680,3884208,3884186,1000000,0.136753846153846},
-{2963681,3884186,3884106,1000000,0.375013636363636},
-{2963682,3885398,3885369,0.148766666666667,0.232852173913043},
-{2963683,3885369,3885262,0.496018181818182,0.419707692307692},
-{2963684,3888042,3889952,0.410522448979592,0.359207142857143},
-{2963685,3889952,3890881,0.223224,0.199307142857143},
-{2963686,3890481,3891046,0.152142857142857,0.1553125},
-{2963687,3891046,3891569,0.137988235294118,0.140748},
-{2964597,3915382,3915544,0.0760363636363636,0.0643384615384615},
-{2964598,3915544,3915963,0.145042105263158,0.13779},
-{2964599,3910526,3911027,0.1391125,0.133548},
-{2964600,3911027,3911494,0.135991836734694,0.133272},
-{2964601,3911494,3911915,0.133089795918367,0.125411538461538},
-{2964602,3911915,3912397,0.137502127659574,0.124280769230769},
-{2964603,3912397,3912818,0.120474418604651,0.105722448979592},
-{2964604,3912818,3912887,0.0205756097560976,0.0196186046511628},
-{2964605,3912887,3913330,0.14115,0.131302325581395},
-{2964606,3913330,3913751,0.3087,0.150178378378378},
-{2964607,3913751,3914189,0.238773913043478,0.219672},
-{2964608,3914189,3914564,0.212492307692308,0.153466666666667},
-{2964609,3915963,3916346,0.169605882352941,0.155854054054054},
-{2964610,3915544,3915334,0.150161538461538,0.229658823529412},
-{2964611,3915334,3914808,0.238814634146341,0.315851612903226},
-{2964612,3914808,3913751,0.7064,1000000},
-{2964613,3913751,3912553,0.398659459459459,0.590016},
-{2964614,3912553,3911598,0.249858823529412,0.260057142857143},
-{2964615,3916928,3917135,1000000,0.0900521739130435},
-{2964616,3916698,3916928,1000000,0.104269565217391},
-{2964617,3916432,3916698,1000000,0.121273170731707},
-{2964618,3916182,3916432,1000000,0.227575},
-{2964619,3916124,3916182,1000000,0.0351642857142857},
-{2964620,3915963,3916124,1000000,0.128},
-{2964621,3917167,3917921,0.289605405405405,0.267885},
-{2964622,3918821,3919209,0.135711627906977,0.135711627906977},
-{2964623,3919209,3919558,0.100630434782609,0.115725},
-{2964624,3919558,3919882,0.1008,0.105381818181818},
-{2964625,3919882,3919957,0.0254666666666667,0.0254666666666667},
-{2964626,3920353,3920482,0.0419268292682927,0.0464594594594595},
-{2964627,3920482,3920730,0.086246511627907,0.092715},
-{2964628,3920730,3921119,0.135135,0.12012},
-{2964635,3903434,3903606,0.0665387755102041,1000000},
-{2964636,3903606,3903824,0.069084,1000000},
-{2964637,3903824,3904121,0.0828823529411765,1000000},
-{2964638,3904121,3904370,0.0794875,1000000},
-{2964639,3904370,3904571,0.067716,1000000},
-{2964640,3904787,3904571,1000000,0.0726510638297872},
-{2964641,3904787,3905082,0.0956625,1000000},
-{2964642,3905082,3905334,0.0994933333333334,1000000},
-{2964643,3905334,3905668,0.129536842105263,1000000},
-{2964644,3905668,3905902,0.0726705882352941,1000000},
-{2964645,3905902,3906150,0.0712528301886792,1000000},
-{2964646,3903853,3904508,1000000,0.161911475409836},
-{2964647,3904508,3905129,1000000,0.160337704918033},
-{2964648,3911598,3910629,0.265596,0.282548936170213},
-{2964649,3910629,3909567,0.366762162162162,0.330980487804878},
-{2964650,3906795,3907118,0.0799294117647059,0.0831918367346939},
-{2964651,3906500,3906795,0.0911217391304348,0.0931466666666667},
-{2964652,3906392,3906500,0.0343176470588235,0.0486166666666667},
-{2964653,3906245,3906392,0.0499125,0.0520826086956522},
-{2964654,3905999,3906245,0.078504,0.081775},
-{2964655,3905713,3905999,0.087325,0.0911217391304348},
-{2964656,3914564,3914884,0.1452,0.209733333333333},
-{2964657,3914884,3915189,0.13806,0.145326315789474},
-{2964658,3915189,3915499,0.131471428571429,0.131471428571429},
-{2964659,3915499,3915818,0.12555,0.12276},
-{2964660,3915818,3916145,0.122168181818182,0.11685652173913},
-{2964661,3916145,3916460,0.127660465116279,0.124759090909091},
-{2964662,3916460,3916806,0.12412,0.126940909090909},
-{2964663,3916806,3917112,0.113182978723404,0.113182978723404},
-{2964664,3917112,3917383,0.111078260869565,0.108714893617021},
-{2964665,3917383,3917706,0.14319512195122,0.14319512195122},
-{2964666,3920353,3919475,0.46824375,0.454054545454545},
-{2964667,3919475,3918623,0.323493333333333,0.309727659574468},
-{2964668,3918623,3918315,0.117506666666667,0.128970731707317},
-{2964669,3918315,3917706,0.326586206896552,0.3157},
-{2964670,3921539,3921715,0.0555947368421053,0.0586833333333333},
-{2964671,3921715,3921780,0.0301666666666667,0.0319411764705882},
-{2964672,3921950,3921982,0.0179189189189189,0.0184166666666667},
-{2964673,3921982,3922277,0.10143,0.109654054054054},
-{2964674,3922277,3922350,0.0232,0.0232},
-{2964675,3922350,3922736,0.129093333333333,0.135097674418605},
-{2964679,3921539,3921626,1000000,1000000},
-{2964680,3921780,3921626,0.109075862068966,0.1318},
-{2964681,3921626,3919787,0.783587234042553,0.783587234042553},
-{2964697,3906150,3906373,0.0714923076923077,1000000},
-{2964698,3906373,3906601,0.0784352941176471,1000000},
-{2964699,3906601,3906847,0.066612,1000000},
-{2964700,3906847,3907130,0.075156,1000000},
-{2964701,3908282,3909148,0.280861538461538,1000000},
-{2964702,3909148,3909953,0.354232258064516,1000000},
-{2964703,3917706,3918048,0.12188,0.130585714285714},
-{2964704,3918048,3918398,0.1120125,0.114395744680851},
-{2964705,3918398,3918702,0.113386956521739,0.1086625},
-{2964706,3918702,3919012,0.120995454545455,0.118306666666667},
-{2964707,3917706,3917016,0.349594285714286,0.421924137931035},
-{2964708,3917016,3916851,0.0540382978723404,0.0577227272727273},
-{2964709,3916851,3916594,0.102573333333333,0.107344186046512},
-{2964710,3919787,3919281,0.285829411764706,0.335110344827586},
-{2964744,3863473,3862644,0.294568421052632,0.329223529411765},
-{2964745,3863665,3863473,0.0803225806451613,0.0922222222222222},
-{2964746,3864767,3863665,0.408917647058824,0.408917647058824},
-{2964747,3865759,3864767,0.385412903225806,0.362054545454545},
-{2964748,3868378,3865759,0.868872727272727,0.796466666666667},
-{2964749,3869035,3868378,0.285504,0.285504},
-{2964750,3897834,3898088,0.0900818181818182,0.084331914893617},
-{2964751,3898088,3898363,0.164577777777778,0.1058},
-{2964752,3898363,3898412,0.0286444444444444,0.0209027027027027},
-{2964753,3898412,3898642,0.115023529411765,0.144844444444444},
-{2964754,3898642,3898046,1000000,0.297276923076923},
-{2964755,3898412,3898020,0.26934375,1000000},
-{2964756,3898020,3897522,0.157904347826087,1000000},
-{2964757,3905425,3905713,0.116605714285714,0.1275375},
-{2964758,3904552,3905425,0.355661538461538,0.315245454545455},
-{2964759,3904483,3904552,0.0204352941176471,0.021269387755102},
-{2964760,3903646,3904483,0.281013333333333,0.468355555555556},
-{2964761,3902805,3903527,0.500269565217391,0.255693333333333},
-{2964762,3902578,3902805,0.0747066666666667,0.0686081632653061},
-{2964763,3901881,3902578,0.223548837209302,0.213613333333333},
-{2964764,3901750,3901881,0.0587368421052632,0.0676363636363636},
-{2964765,3901564,3901750,0.0772285714285714,0.142263157894737},
-{2964766,3911961,3912357,0.17,1000000},
-{2964767,3912357,3912704,0.096521052631579,1000000},
-{2964768,3915273,3914504,0.406890909090909,1000000},
-{2964769,3914504,3914048,0.228107142857143,1000000},
-{2964770,3913425,3912954,0.147528571428571,1000000},
-{2964771,3912704,3913079,0.0778468085106383,1000000},
-{2964772,3913079,3913396,0.08156,1000000},
-{2964773,3913935,3914135,0.0381254237288136,1000000},
-{2964774,3914135,3914521,0.0835789473684211,1000000},
-{2964775,3914521,3914826,0.0786206896551724,1000000},
-{2964776,3914826,3915101,0.0853309090909091,1000000},
-{2964777,3922325,3921984,0.276469565217391,0.205122580645161},
-{2964793,3862207,3861176,0.362936842105263,0.353630769230769},
-{2964794,3862974,3862207,0.171905882352941,0.190591304347826},
-{2964795,3863053,3862974,0.023575,0.0263162790697674},
-{2964796,3863413,3863053,0.128261538461538,0.131636842105263},
-{2964797,3894477,3894476,0.0198620689655172,0.0198620689655172},
-{2964798,3901205,3901564,0.14191875,0.129754285714286},
-{2964799,3900869,3901205,0.108809302325581,0.108809302325581},
-{2964800,3899688,3899987,0.106389473684211,0.0986048780487805},
-{2964801,3899485,3899688,0.0632,0.0677142857142857},
-{2964802,3899153,3899485,0.113666666666667,0.1705},
-{2964803,3898862,3899153,0.117458823529412,0.1248},
-{2964804,3898349,3898862,0.221241176470588,0.183468292682927},
-{2964805,3897785,3898349,0.216085714285714,0.199026315789474},
-{2964806,3897327,3897785,0.279553846153846,0.173057142857143},
-{2964807,3901564,3902156,0.310737931034483,1000000},
-{2964808,3902156,3902781,0.238384615384615,1000000},
-{2964809,3902781,3902961,0.0562714285714286,1000000},
-{2964810,3902961,3903373,0.134676,0.129496153846154},
-{2964811,3903373,3903895,0.183084,0.179494117647059},
-{2964812,3903895,3904439,0.154892307692308,0.161088},
-{2964813,3904439,3904699,0.0808981132075472,0.085752},
-{2964814,3904699,3904999,0.0889038461538461,0.0906470588235294},
-{2964815,3904999,3905226,0.0744346153846154,0.0758941176470588},
-{2964816,3905226,3905457,0.0765058823529412,0.0796285714285714},
-{2964817,3905457,3905737,0.0876734693877551,0.102285714285714},
-{2964818,3915330,3915569,0.0781245283018868,1000000},
-{2964819,3915569,3915811,0.072622641509434,1000000},
-{2964820,3915811,3916068,0.089796,1000000},
-{2964821,3915727,3915635,0.04665,1000000},
-{2964822,3915635,3915657,0.0402387096774194,1000000},
-{2964870,3871648,3871485,0.43378125,1000000},
-{2964871,3871642,3871648,0.0121894736842105,1000000},
-{2964872,3871721,3871777,1000000,0.0839692307692308},
-{2964873,3871946,3872283,1000000,0.197454545454545},
-{2964874,3884106,3884039,1000000,0.33858},
-{2964875,3884039,3884010,1000000,0.308232},
-{2964876,3884010,3883975,1000000,0.140604255319149},
-{2964877,3885262,3885203,0.33421875,0.305571428571429},
-{2964878,3885203,3885197,0.058245,0.0896076923076923},
-{2964879,3885197,3885167,0.140733333333333,0.191909090909091},
-{2964880,3885167,3885132,0.104910638297872,0.109573333333333},
-{2964881,3897571,3897737,0.10825,0.0984090909090909},
-{2964882,3905737,3906041,0.1098,0.0957829787234043},
-{2964883,3906041,3906276,0.0828367346938775,0.0845625},
-{2964884,3906276,3906508,0.0751411764705882,0.076644},
-{2964885,3906508,3906813,0.0882470588235294,0.0937625},
-{2964886,3906813,3907113,0.0869265306122449,0.0925956521739131},
-{2964887,3907113,3907407,0.0890297872340425,0.0890297872340425},
-{2964888,3907407,3907690,0.0842375,0.0898533333333333},
-{2964889,3907690,3908004,0.0862625,0.0920133333333333},
-{2964890,3908004,3908272,0.078330612244898,0.0872318181818182},
-{2964891,3908272,3908518,0.060134693877551,0.06548},
-{2964892,3908518,3908743,0.0621829787234043,0.0695857142857143},
-{2964928,3865450,3865032,0.0789,0.074433962264151},
-{2964929,3865763,3865450,0.0668375,0.0629058823529412},
-{2964930,3866024,3865763,0.0612,0.0598978723404255},
-{2964931,3867961,3866695,0.26975,0.275489361702128},
-{2964932,3868906,3867961,0.248538461538462,0.230785714285714},
-{2964933,3869027,3868906,0.0438,0.0498413793103448},
-{2964934,3869571,3869027,0.204464516129032,1000000},
-{2964935,3869885,3869571,0.10902,1000000},
-{2964936,3869027,3868853,0.204233333333333,0.2228},
-{2964937,3871197,3870893,0.0736,0.1104},
-{2964938,3871540,3871197,0.0680790697674419,0.0770368421052632},
-{2964939,3868853,3868749,0.13452,0.161424},
-{2964940,3869284,3868749,0.17564,0.154976470588235},
-{2964941,3869984,3869284,0.19085625,0.174497142857143},
-{2964942,3870511,3870243,0.08019375,0.0777636363636364},
-{2964943,3870243,3869984,0.184414285714286,0.178055172413793},
-{2964944,3871939,3872067,0.17046,1000000},
-{2964945,3872067,3872101,0.0266526315789474,1000000},
-{2964946,3872101,3872340,0.17157,1000000},
-{2964947,3872340,3872662,0.151486363636364,1000000},
-{2964948,3872662,3872877,0.0826565217391304,1000000},
-{2964949,3872283,3872439,1000000,0.11337},
-{2964950,3872439,3872574,1000000,0.0939081081081081},
-{2964951,3872574,3872810,1000000,0.137430769230769},
-{2964952,3872810,3873175,1000000,0.248413043478261},
-{2964953,3873175,3873371,1000000,0.107975510204082},
-{2964954,3872353,3871432,0.203914285714286,0.212591489361702},
-{2964955,3873677,3873302,0.859028571428572,0.870331578947369},
-{2964956,3883917,3883845,1000000,0.371895},
-{2964957,3883242,3883058,0.11045625,0.088365},
-{2964958,3885073,3885014,0.238409302325581,0.27707027027027},
-{2964959,3885014,3884984,0.100268181818182,0.1026},
-{2964960,3884984,3884920,0.139118918918919,0.131984615384615},
-{2964961,3884920,3884783,0.139333333333333,0.139333333333333},
-{2964962,3884783,3884569,0.150168,0.11731875},
-{2964963,3884569,3884026,0.302209756097561,0.427262068965517},
-{2964964,3884763,3884569,0.134505882352941,0.0994173913043478},
-{2964965,3884958,3884763,0.093225,0.0639257142857143},
-{2964966,3885164,3884958,0.0694216216216216,0.0658615384615385},
-{2964967,3885269,3885164,0.03177,0.0302571428571429},
-{2964968,3885450,3885269,0.0609285714285714,0.0609285714285714},
-{2964969,3885604,3885759,0.0637285714285714,0.05948},
-{2964970,3885759,3885878,0.0408230769230769,0.044225},
-{2964971,3885878,3886509,0.189989189189189,0.260355555555556},
-{2964972,3886509,3887079,0.150652173913043,0.154},
-{2964973,3887079,3887752,0.137387755102041,0.14025},
-{2964974,3887752,3888445,0.132804,0.135514285714286},
-{2964975,3888445,3889133,0.1266,0.131564705882353},
-{2964976,3889133,3889758,0.133,0.133},
-{2964977,3889758,3890321,0.129311538461538,0.137228571428571},
-{2964978,3890321,3890909,0.137877551020408,0.146869565217391},
-{2964979,3890909,3891467,0.175926315789474,0.163053658536585},
-{2964980,3891467,3891985,0.151060465116279,0.144346666666667},
-{2964981,3891985,3892240,0.0881230769230769,0.0781090909090909},
-{2964982,3892240,3892751,0.153765,0.157707692307692},
-{2964983,3892751,3893178,0.233910638297872,0.233910638297872},
-{2964984,3893178,3893320,0.0864679245283019,0.0864679245283019},
-{2964985,3893320,3893445,0.0766301886792453,0.0796352941176471},
-{2964986,3893445,3893513,0.038748,0.0440318181818182},
-{2964987,3900113,3900325,0.0805636363636364,0.08308125},
-{2965004,3882119,3881688,0.227885106382979,0.194738181818182},
-{2965005,3881688,3881441,0.133297297297297,0.10065306122449},
-{2965006,3884726,3884940,0.0804833333333333,0.0689857142857143},
-{2965007,3884940,3885900,0.369272727272727,0.259276595744681},
-{2965008,3885900,3886043,0.0645461538461538,0.067128},
-{2965009,3886043,3886321,0.0899142857142857,0.198757894736842},
-{2965010,3886321,3886973,0.194796226415094,0.219663829787234},
-{2965011,3886973,3888093,0.274449056603774,0.269366666666667},
-{2965012,3885450,3885553,0.0438789473684211,0.0406682926829268},
-{2965013,3886275,3886428,0.0554651162790698,0.059625},
-{2965014,3886428,3886472,0.0200863636363636,0.0210428571428571},
-{2965015,3886472,3886593,0.0392571428571429,0.040075},
-{2965016,3887136,3887818,0.198346153846154,0.194603773584906},
-{2965017,3887818,3888205,0.113065384615385,0.117588},
-{2965018,3888205,3888480,0.0798339622641509,0.0813692307692308},
-{2965019,3893513,3893683,0.102554716981132,0.104526923076923},
-{2965020,3893683,3893837,0.0994666666666667,0.0976581818181818},
-{2965021,3893837,3894032,0.105174545454545,0.105174545454545},
-{2965022,3894335,3894712,0.15145,0.132980487804878},
-{2965023,3894712,3895010,0.0905045454545454,0.0884933333333333},
-{2965024,3895010,3895100,0.0356780487804878,0.0340186046511628},
-{2965025,3895100,3895688,0.469276595744681,0.424153846153846},
-{2965067,3864594,3864309,0.0902448979591837,0.08844},
-{2965068,3864828,3864594,0.084275,0.0793176470588235},
-{2965069,3865062,3864828,0.0903702127659575,0.084948},
-{2965070,3865303,3865062,0.0888,0.0800941176470588},
-{2965071,3865622,3865303,0.243042857142857,0.261738461538462},
-{2965072,3871432,3869969,0.30768,0.295846153846154},
-{2965073,3869969,3869055,0.179175,0.172008},
-{2965074,3869055,3868526,0.107124,0.105023529411765},
-{2965075,3868526,3865831,0.726983333333333,0.513164705882353},
-{2965076,3865622,3865017,0.154153846153846,0.146634146341463},
-{2965077,3881441,3881198,0.124015384615385,0.13435},
-{2965078,3881198,3880881,0.135941176470588,0.141489795918367},
-{2965079,3880076,3879599,0.25545,0.278672727272727},
-{2965080,3879599,3879475,0.0895894736842105,0.0945666666666667},
-{2965081,3879475,3879321,0.0951954545454545,0.182113043478261},
-{2965082,3879321,3879198,0.084384,0.120548571428571},
-{2965083,3879198,3879131,0.048648,0.0552818181818182},
-{2965084,3879131,3879052,0.035688,0.0379659574468085},
-{2965085,3881659,3881753,0.0427555555555556,0.0501913043478261},
-{2965086,3881753,3881874,0.073858064516129,0.0995478260869565},
-{2965087,3881874,3881909,0.0160764705882353,0.0160764705882353},
-{2965088,3881909,3882078,0.0720439024390244,0.073845},
-{2965089,3882078,3882278,0.0760772727272727,0.0743866666666667},
-{2965090,3882278,3882691,0.140042553191489,0.137125},
-{2965091,3882691,3883173,0.138502040816327,0.138502040816327},
-{2965092,3883173,3883468,0.0950375,0.0930979591836735},
-{2965093,3883468,3883984,0.237825,0.205686486486487},
-{2965094,3883984,3884675,0.2494,0.347378571428571},
-{2965095,3884675,3885024,0.115768421052632,0.157114285714286},
-{2965096,3885024,3885959,0.300628571428571,0.300628571428571},
-{2965097,3888480,3889378,0.2578625,0.229211111111111},
-{2965098,3889378,3890675,0.332472,0.325952941176471},
-{2965099,3890675,3890906,0.057732,0.0524836363636364},
-{2965100,3890906,3891392,0.145742307692308,0.140344444444444},
-{2965101,3891392,3891627,0.0779333333333333,0.0779333333333333},
-{2965102,3891627,3892103,0.161258181818182,0.164244444444444},
-{2965103,3892103,3892340,0.0788072727272727,0.0817811320754717},
-{2965104,3892340,3892532,0.0667132075471698,0.070716},
-{2965105,3888093,3888674,0.173742857142857,0.140330769230769},
-{2965106,3888674,3888870,0.0494037735849057,0.0503538461538462},
-{2965107,3888870,3889207,0.094725,0.0967404255319149},
-{2965108,3889207,3889301,0.0331894736842105,0.0331894736842105},
-{2965109,3889301,3889356,0.0511272727272727,0.0511272727272727},
-{2965110,3889356,3889086,0.135870967741935,0.145241379310345},
-{2965111,3895688,3896556,0.644044897959184,0.606888461538462},
-{2965112,3914574,3915020,0.133455555555556,0.133455555555556},
-{2965113,3913440,3914082,0.124657627118644,0.124657627118644},
-{2965114,3912334,3912596,0.0670142857142857,0.0574408163265306},
-{2965115,3910535,3912334,0.364171875,0.369952380952381},
-{2965164,3865039,3864838,0.122256,1000000},
-{2965165,3865039,3864644,0.378381818181818,1000000},
-{2965166,3864838,3864644,0.0492452830188679,0.054375},
-{2965167,3864400,3861633,0.640134375,0.640134375},
-{2965168,3879052,3878921,0.08244,0.085875},
-{2965169,3878921,3878821,0.085575,0.0838285714285714},
-{2965170,3878732,3878683,0.037175,0.037175},
-{2965171,3878683,3878208,0.410386956521739,0.401655319148936},
-{2965172,3885959,3886489,0.164784,0.17165},
-{2965173,3886489,3886634,0.043908,0.0422192307692308},
-{2965174,3887173,3887446,0.08238,0.0777169811320755},
-{2965175,3887446,3887849,0.0925176470588235,0.0890264150943396},
-{2965176,3888384,3888863,0.139695652173913,0.139695652173913},
-{2965177,3888863,3889113,0.0757,0.0757},
-{2965178,3889113,3889624,0.261703448275862,0.210816666666667},
-{2965179,3889086,3889605,0.24004,0.234821739130435},
-{2965180,3889605,3889658,0.0141777777777778,0.0136714285714286},
-{2965181,3889658,3890083,0.165064285714286,0.162168421052632},
-{2965182,3890083,3890525,0.170978181818182,0.167925},
-{2965183,3890525,3890758,0.0803142857142857,0.0789052631578947},
-{2965184,3890758,3890942,0.07215,0.0708842105263158},
-{2965185,3890942,3890998,0.0186109090909091,0.0179578947368421},
-{2965186,3890998,3891194,0.0809444444444444,0.0766842105263158},
-{2965187,3891194,3891477,0.111505882352941,0.109361538461538},
-{2965188,3889886,3889624,0.08874375,0.101421428571429},
-{2965189,3892532,3892663,0.061176,0.0624244897959184},
-{2965190,3892663,3892712,0.0684375,0.0698936170212766},
-{2965191,3892712,3893418,0.295176,0.307475},
-{2965192,3893418,3893435,0.0857347826086957,0.0857347826086957},
-{2965193,3893435,3893399,0.119294117647059,0.119294117647059},
-{2965194,3893399,3893373,0.115905882352941,0.115905882352941},
-{2965195,3893373,3893368,0.111324,0.118429787234043},
-{2965196,3896682,3896897,0.2052,0.197307692307692},
-{2965197,3896897,3897055,0.142811538461538,0.137522222222222},
-{2965198,3897103,3897225,0.111380769230769,0.109279245283019},
-{2965199,3897225,3897738,0.266919230769231,0.257033333333333},
-{2965200,3901926,3902423,0.465376744186046,0.4169},
-{2965201,3902423,3902809,0.143958620689655,1000000},
-{2965202,3902809,3903062,0.0787945945945946,1000000},
-{2965203,3903062,3903202,0.04668,1000000},
-{2965204,3903202,3903293,0.024315,1000000},
-{2965205,3903293,3903615,0.120783333333333,1000000},
-{2965206,3903615,3903881,0.121090909090909,1000000},
-{2965207,3903881,3903989,0.0362166666666667,0.0501461538461538},
-{2965208,3904420,3904495,0.040488,0.06748},
-{2965209,3904495,3905172,1000000,0.307896},
-{2965210,3904495,3905653,0.491224390243902,1000000},
-{2965211,3905172,3905477,1000000,0.14895},
-{2965212,3905477,3906126,1000000,0.265068292682927},
-{2965213,3905653,3906126,0.160446153846154,1000000},
-{2965214,3906126,3906643,0.118369811320755,0.142581818181818},
-{2965215,3906643,3907156,0.0898736842105263,0.08538},
-{2965216,3907156,3907404,0.04464,0.04185},
-{2965217,3907404,3909029,0.289303125,0.276349253731343},
-{2965218,3902423,3902932,0.453916981132075,0.511863829787234},
-{2965221,3871845,3871415,0.0859157894736842,0.0859157894736842},
-{2965222,3871415,3871275,0.0284210526315789,0.0284210526315789},
-{2965223,3871275,3870881,0.0809578947368421,0.0809578947368421},
-{2965224,3870881,3870723,0.032925,0.032925},
-{2965225,3870723,3870145,0.114235714285714,0.116312727272727},
-{2965227,3890795,3891236,0.79032,0.79032},
-{2965228,3891236,3891342,0.16604347826087,0.16604347826087},
-{2965229,3891342,3891637,0.340930434782609,0.340930434782609},
-{2965230,3891477,3891835,0.27685,0.246088888888889},
-{2965231,3891835,3891966,0.0688444444444445,0.0640965517241379},
-{2965232,3891966,3892196,0.124677777777778,0.118115789473684},
-{2965233,3891637,3892256,0.82752,0.82752},
-{2965234,3892256,3892588,0.41694,0.41694},
-{2965235,3892588,3893025,0.45795,0.45795},
-{2965236,3892196,3892886,0.300938181818182,0.295564285714286},
-{2965237,3892886,3893104,0.0913309090909091,0.094777358490566},
-{2965238,3893104,3893209,0.0652222222222222,0.0677307692307692},
-{2965239,3893209,3893520,0.168396226415094,0.1785},
-{2965240,3893025,3893429,0.58926,0.58926},
-{2965241,3893429,3893703,0.4215,0.4215},
-{2965242,3893703,3894228,0.76755,0.76755},
-{2965243,3894914,3895361,0.43168,0.4047},
-{2965244,3893520,3893914,0.218211111111111,0.222328301886792},
-{2965245,3893914,3894207,0.161838461538462,0.168312},
-{2965246,3894207,3894578,0.201673469387755,0.224590909090909},
-{2965247,3894578,3894785,0.108894117647059,0.126218181818182},
-{2965248,3894785,3895234,0.237522222222222,0.278830434782609},
-{2965249,3893368,3893639,0.153941176470588,0.167042553191489},
-{2965250,3893639,3893781,0.050988,0.0520285714285714},
-{2965251,3893781,3894096,0.228931914893617,0.233908695652174},
-{2965252,3894096,3894095,0.018153488372093,0.0173466666666667},
-{2965253,3894095,3894164,0.0944933333333333,0.0924391304347826},
-{2965254,3894164,3894188,0.0117574468085106,0.0117574468085106},
-{2965255,3894188,3894634,0.17056,0.163302127659574},
-{2965256,3894634,3895545,0.3909,0.382213333333333},
-{2965257,3895545,3895803,0.123510638297872,0.126195652173913},
-{2965258,3895803,3896056,0.1343875,0.131644897959184},
-{2965259,3896056,3896108,0.037725,0.0385276595744681},
-{2965260,3896108,3896187,0.0465,0.0465},
-{2965261,3896187,3896262,0.0475787234042553,0.0456367346938776},
-{2965262,3896262,3896486,0.145148936170213,0.142125},
-{2965263,3896486,3896554,0.0391276595744681,0.0383125},
-{2965264,3896554,3896859,0.206266666666667,0.206266666666667},
-{2965265,3896859,3896971,0.0348461538461538,0.0308863636363636},
-{2965266,3896971,3897296,0.0930136363636364,0.0951767441860465},
-{2965267,3897296,3897450,0.050093023255814,0.0478666666666667},
-{2965268,3897450,3897526,0.0278454545454545,0.0272266666666667},
-{2965269,3897526,3898208,0.217787234042553,0.232636363636364},
-{2965270,3898208,3898499,0.091575,0.107209756097561},
-{2965271,3898499,3898770,0.0922173913043478,0.108769230769231},
-{2965272,3897738,3898091,0.130705882352941,0.1212},
-{2965273,3899466,3899433,0.1224,0.111471428571429},
-{2965274,3899433,3899346,0.100338461538462,0.100338461538462},
-{2965275,3899346,3899220,0.0853173913043478,0.0835021276595745},
-{2965276,3898726,3898420,0.154069565217391,0.161072727272727},
-{2965277,3898420,3898159,0.107129411764706,0.111502040816327},
-{2965278,3898159,3897830,0.1454,0.159585365853659},
-{2965279,3897830,3897633,0.134136,0.1458},
-{2965280,3897633,3897623,0.0163714285714286,0.0163714285714286},
-{2965281,3895361,3895437,0.06054,0.0526434782608696},
-{2965282,3895437,3896448,0.679142857142857,0.648272727272727},
-{2965283,3896448,3896812,0.237782608695652,0.287842105263158},
-{2965284,3896812,3897633,0.542314285714286,0.56943},
-{2965285,3902445,3902514,0.0725560975609756,0.0929625},
-{2965286,3902932,3903353,0.507177272727273,0.474804255319149},
-{2965287,3903411,3903655,0.346897674418605,0.339013636363636},
-{2965288,3903655,3904145,0.1695,0.200888888888889},
-{2965289,3904145,3904323,0.0534409090909091,0.0534409090909091},
-{2965290,3904323,3905060,0.186661224489796,0.19055},
-{2965291,3905060,3905616,0.129657692307692,0.1404625},
-{2965292,3905616,3906093,0.0998603773584906,0.105852},
-{2965293,3906093,3906302,0.0460117647058824,0.0488875},
-{2965294,3906302,3906498,0.0474117647058823,0.050375},
-{2965295,3906498,3906840,0.0753063829787234,0.0786533333333333},
-{2965296,3910530,3908638,0.266620588235294,0.283284375},
-{2965297,3907998,3908638,0.107956363636364,0.104168421052632},
-{2965298,3907998,3907884,0.0187615384615385,0.0199102040816327},
-{2965299,3907884,3907488,0.0850434782608696,0.0850434782608696},
-{2965347,3902521,3902358,0.0806926829268293,0.0945257142857143},
-{2965348,3903234,3903278,0.0592933333333333,0.0635285714285714},
-{2965355,3904587,3904899,0.116477777777778,0.120957692307692},
-{2965362,3885046,3884867,1000000,0.141417391304348},
-{2965363,3885258,3885046,1000000,0.106490322580645},
-{2965364,3880032,3879959,1000000,0.0321333333333333},
-{2965365,3880075,3880001,0.0335314285714286,1000000},
-{2965366,3880545,3880441,1000000,0.0855},
-{2965367,3875848,3875948,1000000,1000000},
-{2965368,3875748,3875848,0.215284615384615,0.233225},
-{2965369,3875622,3875748,0.206022222222222,0.163605882352941},
-{2965370,3875334,3875387,0.0290666666666667,0.0327},
-{2965371,3875266,3875324,0.0536142857142857,0.0536142857142857},
-{2965372,3875622,3876048,0.270066666666667,1000000},
-{2965373,3876048,3876876,0.408763636363636,1000000},
-{2965374,3876876,3877488,0.281345454545455,1000000},
-{2965375,3876026,3876048,0.358344,1000000},
-{2965376,3875121,3875448,1000000,0.225966666666667},
-{2965377,3875229,3875552,0.220933333333333,1000000},
-{2965378,3876515,3877240,1000000,0.37992},
-{2965379,3877240,3877739,0.204991304347826,1000000},
-{2965380,3877739,3878213,0.2298,1000000},
-{2965381,3878526,3879123,0.308863636363636,1000000},
-{2965382,3877964,3878526,0.265669565217391,1000000},
-{2965383,3877654,3877964,0.1283,0.133878260869565},
-{2965384,3878237,3878714,1000000,0.253336363636364},
-{2965385,3875506,3875601,0.0904,1000000},
-{2965386,3875886,3875858,0.0408,1000000},
-{2965387,3875858,3875740,0.176373913043478,1000000},
-{2965388,3875858,3875506,0.185337931034483,1000000},
-{2965389,3875601,3875687,0.105636363636364,1000000},
-{2965390,3876671,3877425,1000000,1000000},
-{2965391,3875886,3876671,1000000,1000000},
-{2965392,3873025,3872930,0.105626086956522,1000000},
-{2965393,3873179,3873025,0.090625,1000000},
-{2965394,3873179,3873408,0.0759,0.1012},
-{2965395,3873408,3873430,0.00727058823529412,0.00915555555555556},
-{2965396,3872848,3872878,0.146192727272727,0.191442857142857},
-{2965397,3872834,3872911,0.272109090909091,0.390417391304348},
-{2965398,3875481,3875623,0.212008695652174,0.125030769230769},
-{2965399,3875623,3875332,0.296222222222222,0.275793103448276},
-{2965400,3875601,3875539,0.0405483870967742,1000000},
-{2965401,3875169,3875313,0.0844227272727273,0.0714346153846154},
-{2965402,3875138,3875010,0.0523241379310345,1000000},
-{2965403,3876264,3877244,0.286849180327869,0.29163},
-{2965404,3876494,3876311,1000000,0.212904},
-{2965405,3876845,3876692,1000000,0.123857142857143},
-{2965406,3877129,3876845,1000000,0.351672},
-{2965407,3879726,3879634,0.06105,0.06105},
-{2965408,3879675,3879053,1000000,0.245533333333333},
-{2965409,3878408,3878334,1000000,0.0709142857142857},
-{2965410,3878635,3878243,0.202252173913043,1000000},
-{2965411,3878243,3877697,0.26253,1000000},
-{2965412,3877697,3877623,0.0895,1000000},
-{2965413,3877697,3877644,0.203466666666667,1000000},
-{2965414,3877371,3877644,1000000,1000000},
-{2965415,3877644,3877434,0.4006,1000000},
-{2965416,3877434,3877266,0.49388,1000000},
-{2965417,3877092,3877434,0.19992,1000000},
-{2965418,3876771,3877092,0.205136842105263,1000000},
-{2965419,3877434,3877920,0.21284347826087,1000000},
-{2965420,3877920,3878155,0.0912692307692308,1000000},
-{2965421,3878155,3878553,0.217390909090909,1000000},
-{2965422,3878553,3878967,0.200544,1000000},
-{2965423,3878967,3879520,0.230423076923077,1000000},
-{2965424,3879520,3879549,0.263863636363636,0.252391304347826},
-{2965425,3879549,3878916,0.5153,0.403278260869565},
-{2965426,3883658,3884107,1000000,0.135114893617021},
-{2965427,3882431,3882920,0.274514285714286,0.3603},
-{2965428,3882920,3883732,1000000,0.557925},
-{2965429,3882920,3883457,0.287945454545455,0.287945454545455},
-{2965430,3883457,3883543,0.1116,1000000},
-{2965431,3883543,3884198,0.375027272727273,1000000},
-{2965432,3884597,3884540,1000000,0.030048},
-{2965433,3882646,3882920,1000000,0.1849},
-{2965434,3882417,3882646,1000000,0.1263},
-{2965435,3882157,3882417,1000000,0.253142857142857},
-{2965436,3883383,3883457,0.110433333333333,1000000},
-{2965437,3881702,3882157,1000000,0.4230375},
-{2965438,3883345,3884244,1000000,0.456346153846154},
-{2965439,3881281,3881527,1000000,0.45009},
-{2965440,3881527,3881738,1000000,1000000},
-{2965441,3881738,3881845,1000000,0.21459},
-{2965442,3881845,3882157,1000000,0.329025},
-{2965443,3882464,3882564,0.163757142857143,1000000},
-{2965444,3882217,3882464,1000000,1000000},
-{2965445,3881990,3882217,1000000,1000000},
-{2965446,3880897,3881292,0.2832,0.3186},
-{2965447,3881292,3881738,1000000,0.254685714285714},
-{2965448,3881738,3882464,0.505547368421053,1000000},
-{2965449,3883717,3884739,0.667581818181818,1000000},
-{2965450,3884002,3884198,0.19116,0.2124},
-{2965451,3883383,3884002,1000000,0.52004},
-{2965452,3879080,3879387,1000000,1000000},
-{2965453,3879755,3879813,1000000,1000000},
-{2965454,3879813,3879914,1000000,1000000},
-{2965455,3879914,3880031,1000000,1000000},
-{2965456,3879640,3879747,0.107123076923077,0.11605},
-{2965457,3879482,3879640,0.26228,1000000},
-{2965458,3879356,3879482,0.201692307692308,1000000},
-{2965459,3880307,3880366,1000000,0.0822333333333333},
-{2965460,3879080,3879640,0.2526,0.2526},
-{2965461,3879640,3880010,0.571136842105263,1000000},
-{2965462,3880010,3880265,1000000,0.40776},
-{2965463,3880265,3880307,1000000,0.0759666666666667},
-{2965464,3879755,3880010,0.211133333333333,0.211133333333333},
-{2965465,3880010,3880263,0.331928571428571,1000000},
-{2965466,3880263,3880520,1000000,1000000},
-{2965467,3880520,3880529,1000000,0.110228571428571},
-{2965468,3879276,3878799,1000000,0.4965375},
-{2965469,3879524,3879813,0.162911111111111,0.162911111111111},
-{2965470,3877881,3877766,1000000,0.12333},
-{2965471,3877881,3878042,0.139542857142857,1000000},
-{2965472,3879093,3879387,0.1544,0.1544},
-{2965473,3878698,3879080,0.1886,0.1886},
-{2965474,3878698,3879093,1000000,0.2773},
-{2965475,3880923,3881075,0.316623529411765,1000000},
-{2965476,3878276,3878339,1000000,0.123529411764706},
-{2965477,3878247,3878276,1000000,0.0578210526315789},
-{2965478,3877740,3878247,1000000,0.291366666666667},
-{2965479,3876845,3877284,0.188511111111111,0.188511111111111},
-{2965480,3877372,3877678,1000000,1000000},
-{2965481,3877129,3877372,1000000,1000000},
-{2965482,3875958,3876422,1000000,0.207216},
-{2965483,3875448,3875958,1000000,0.292042105263158},
-{2965484,3880500,3880451,1000000,0.0402260869565217},
-{2965485,3880735,3880500,1000000,0.209045454545455},
-{2965486,3880948,3880735,1000000,0.161086956521739},
-{2965487,3881226,3880994,1000000,0.185427272727273},
-{2965488,3881409,3881226,1000000,0.153},
-{2965489,3881490,3881409,1000000,0.0921529411764706},
-{2965490,3881900,3881490,1000000,0.646254545454546},
-{2965491,3880965,3880728,0.4062,1000000},
-{2965492,3881260,3880965,0.272873684210526,1000000},
-{2965493,3882201,3881260,0.792685714285714,1000000},
-{2965494,3882598,3882201,0.34368,1000000},
-{2965495,3881381,3880818,0.516766666666667,1000000},
-{2965496,3880818,3880889,0.0466421052631579,1000000},
-{2965497,3880889,3880637,0.391145454545455,1000000},
-{2965498,3882749,3883348,0.279025,1000000},
-{2965499,3883672,3883866,0.20135,1000000},
-{2965500,3882394,3882749,0.191607692307692,1000000},
-{2965501,3883348,3882737,1000000,0.647431578947368},
-{2965502,3884918,3884097,1000000,0.633628571428571},
-{2965503,3881644,3882082,0.399327272727273,1000000},
-{2965504,3880863,3881237,0.368084210526316,1000000},
-{2965505,3881237,3881359,0.137964705882353,1000000},
-{2965506,3881359,3881644,0.254336842105263,1000000},
-{2965507,3883510,3883329,0.331090909090909,1000000},
-{2965508,3883329,3882710,0.595742857142857,1000000},
-{2965509,3882710,3882349,0.3622,1000000},
-{2965510,3882349,3882082,0.30162,1000000},
-{2965511,3882082,3881498,0.541942857142857,1000000},
-{2965512,3881971,3882164,1000000,0.558247058823529},
-{2965513,3882164,3882332,1000000,0.430171428571429},
-{2965514,3883205,3883266,0.0577363636363636,1000000},
-{2965515,3883266,3883678,0.25301052631579,1000000},
-{2965516,3883634,3883678,1000000,0.07731},
-{2965517,3883266,3883420,0.265628571428571,1000000},
-{2965518,3883420,3883607,0.338542857142857,1000000},
-{2965519,3882332,3883061,0.465733333333333,1000000},
-{2965520,3883061,3883760,0.336182608695652,1000000},
-{2965521,3883760,3884017,0.1304,1000000},
-{2965522,3884017,3884714,0.359657142857143,1000000},
-{2965523,3883458,3883564,1000000,0.31992},
-{2965524,3883061,3883341,0.705378947368421,1000000},
-{2965525,3882889,3883061,0.363927272727273,1000000},
-{2965526,3882642,3882889,0.465575,1000000},
-{2965527,3883607,3884121,0.251045454545455,1000000},
-{2965528,3885488,3885542,0.023424,0.0325333333333333},
-{2965529,3884121,3884759,0.283176,1000000},
-{2965530,3884935,3884759,1000000,0.1219875},
-{2965531,3884950,3884935,0.1704,0.1704},
-{2965532,3884714,3884950,0.148233333333333,1000000},
-{2965533,3883607,3883760,0.280114285714286,1000000},
-{2965534,3885038,3885501,0.377953846153846,1000000},
-{2965535,3885038,3885487,0.3226125,1000000},
-{2965536,3884759,3884714,1000000,0.153},
-{2965537,3884714,3884472,0.785660869565217,1000000},
-{2965538,3884493,3884402,0.31225,1000000},
-{2965539,3883564,3883498,1000000,0.580989473684211},
-{2965540,3884402,3884362,0.13728,1000000},
-{2965541,3884362,3884244,0.51116,1000000},
-{2965542,3884362,3885187,0.5462625,1000000},
-{2965543,3875462,3875479,0.00915555555555556,0.00915555555555556},
-{2965544,3875479,3875902,0.197822222222222,0.197822222222222},
-{2965545,3876398,3876537,0.0492193548387097,0.0586846153846154},
-{2965546,3876216,3876055,0.1154625,1000000},
-{2965547,3877085,3877045,1000000,1000000},
-{2965548,3876973,3877085,1000000,1000000},
-{2965549,3876947,3876973,1000000,1000000},
-{2965550,3876734,3876947,1000000,1000000},
-{2965551,3877009,3876947,1000000,1000000},
-{2965552,3877165,3877136,1000000,1000000},
-{2965553,3876463,3877165,1000000,1000000},
-{2965554,3877085,3877203,1000000,1000000},
-{2965555,3877203,3877273,1000000,1000000},
-{2965556,3878122,3878237,0.0615789473684211,0.045},
-{2965557,3877645,3878122,1000000,0.19164},
-{2965558,3877367,3877645,1000000,0.118971428571429},
-{2965559,3879323,3879524,1000000,0.2965},
-{2965560,3879093,3879323,1000000,0.173018181818182},
-{2965561,3878233,3878698,1000000,0.40458},
-{2965562,3880889,3881384,0.33325,0.33325},
-{2965563,3880615,3880818,0.17292,1000000},
-{2965564,3880615,3880397,1000000,0.2725125},
-{2965565,3880394,3880615,0.192872727272727,1000000},
-{2965566,3879946,3880394,0.384927272727273,1000000},
-{2965567,3879034,3879946,0.699063157894737,1000000},
-{2965568,3882120,3882057,0.0962571428571429,0.16845},
-{2965569,3882686,3883458,1000000,0.438126315789474},
-{2965570,3883345,3883717,0.413566666666667,1000000},
-{2965571,3878665,3878214,0.35092,1000000},
-{2965572,3875293,3875746,0.307828571428571,1000000},
-{2965573,3874175,3874123,0.1776,1000000},
-{2965574,3874123,3874035,0.44928,1000000},
-{2965575,3872729,3872864,0.0790434782608696,1000000},
-{2965576,3872864,3873046,0.0807777777777778,1000000},
-{2965577,3873046,3873475,0.490745454545454,1000000},
-{2965578,3871955,3871539,0.154248648648649,0.135885714285714},
-{2965579,3873412,3871955,0.85311,1000000},
-{2965580,3874585,3873412,1000000,0.532823076923077},
-{2965581,3874858,3874585,1000000,0.0896909090909091},
-{2965582,3876052,3875774,1000000,0.142878260869565},
-{2965583,3876473,3876052,0.238142857142857,0.238142857142857},
-{2965584,3876742,3876473,0.3166,0.55405},
-{2965585,3876865,3876473,0.4971,0.437448},
-{2965586,3876837,3876865,0.362446153846154,0.349022222222222},
-{2965587,3878105,3876837,1000000,0.7092},
-{2965588,3876934,3876837,0.176290909090909,0.133737931034483},
-{2965589,3877054,3876934,0.2053,0.236884615384615},
-{2965590,3876934,3876267,0.409434782608696,0.448428571428571},
-{2965591,3876267,3876069,0.563377777777778,0.6338},
-{2965592,3876069,3875347,0.352688888888889,0.396775},
-{2965593,3875347,3875122,0.13545,0.1548},
-{2965594,3875122,3874738,0.36705,0.354393103448276},
-{2965595,3874738,3873808,0.400125,0.413032258064516},
-{2965596,3874787,3874060,0.342144827586207,0.320070967741936},
-{2965597,3874060,3873415,0.30766875,0.30766875},
-{2965598,3873415,3872921,0.196725,0.179862857142857},
-{2965599,3872317,3871944,0.149785714285714,0.1398},
-{2965600,3871944,3870393,0.654511111111111,0.58906},
-{2965601,3872938,3871775,0.34514,0.32356875},
-{2965602,3871955,3871563,0.266364705882353,0.22641},
-{2965603,3871563,3870419,0.4185,0.369264705882353},
-{2965604,3870419,3869865,0.215978571428571,0.183254545454545},
-{2965605,3869421,3869795,1000000,0.351410526315789},
-{2965606,3869865,3869795,0.0303,0.0225085714285714},
-{2965607,3869783,3870393,0.201774193548387,0.223392857142857},
-{2965608,3869280,3868907,0.38825,0.345111111111111},
-{2965609,3872246,3872912,0.277605882352941,0.286018181818182},
-{2965610,3871812,3872246,1000000,0.271288235294118},
-{2965611,3872493,3872085,0.4434,1000000},
-{2965612,3872493,3871973,0.292042105263158,0.264228571428571},
-{2965613,3871973,3871395,0.292366666666667,0.2506},
-{2965614,3871395,3870878,0.203688,0.195853846153846},
-{2965615,3870878,3870271,0.335533333333333,0.274527272727273},
-{2965616,3870271,3869475,0.291744,0.291744},
-{2965617,3869475,3869066,0.157755555555556,0.170376},
-{2965618,3870978,3870271,0.583408695652174,1000000},
-{2965619,3870271,3869873,0.261022222222222,1000000},
-{2965620,3869873,3869716,0.148771428571429,1000000},
-{2965621,3870315,3869475,1000000,0.554355555555556},
-{2965622,3869475,3869190,1000000,0.257269565217391},
-{2965623,3869190,3868994,1000000,0.170352},
-{2965624,3869052,3868939,1000000,0.24603},
-{2965625,3872125,3871765,0.117755555555556,1000000},
-{2965626,3871765,3871216,0.210168,1000000},
-{2965627,3871459,3871216,1000000,0.4022625},
-{2965628,3871973,3871538,1000000,0.474142857142857},
-{2965629,3872388,3872222,0.1014375,0.0737727272727273},
-{2965630,3874015,3873889,0.3231,1000000},
-{2965631,3874345,3873889,0.225816,1000000},
-{2965632,3874774,3874345,0.2099,1000000},
-{2965633,3875257,3874774,0.275918181818182,1000000},
-{2965634,3875816,3875974,0.0950285714285714,0.0950285714285714},
-{2965635,3875312,3875816,0.273685714285714,0.302494736842105},
-{2965636,3870994,3871007,1000000,0.020125},
-{2965637,3870994,3870831,0.0699692307692308,0.072768},
-{2965638,3870801,3869976,0.290490909090909,0.29956875},
-{2965639,3869976,3869376,0.233167741935484,0.24094},
-{2965640,3869840,3870196,0.112556756756757,0.1262},
-{2965641,3869840,3869483,0.151536,0.145707692307692},
-{2965642,3868735,3869483,0.274072727272727,0.347861538461538},
-{2965643,3868418,3868735,0.313269230769231,0.370227272727273},
-{2965644,3868321,3868418,0.3201,0.3201},
-{2965645,3868373,3868321,0.125688888888889,0.1616},
-{2965646,3868761,3868373,0.257791304347826,1000000},
-{2965647,3868411,3868761,0.275571428571429,0.304578947368421},
-{2965648,3869447,3869376,1000000,0.103314285714286},
-{2965649,3869360,3869447,1000000,0.0947142857142857},
-{2965650,3869800,3869360,1000000,0.283885714285714},
-{2965651,3868761,3870019,0.61275,1000000},
-{2965652,3870019,3870896,0.4064,1000000},
-{2965653,3870896,3871321,0.256838709677419,0.256838709677419},
-{2965654,3871437,3871130,0.194210526315789,0.1845},
-{2965655,3871130,3870801,0.26,0.203478260869565},
-{2965656,3871725,3871235,0.2649,0.222174193548387},
-{2965657,3874161,3874171,0.0103116279069767,0.0105571428571429},
-{2965658,3871916,3872154,0.224142857142857,1000000},
-{2965659,3871277,3871552,1000000,0.261507692307692},
-{2965660,3870508,3870883,1000000,0.1176},
-{2965661,3870883,3871317,1000000,0.122554285714286},
-{2965662,3870883,3871000,0.112236363636364,1000000},
-{2965663,3869021,3868965,1000000,0.1322},
-{2965664,3867376,3866780,1000000,0.47235},
-{2965665,3867168,3866780,1000000,0.237736363636364},
-{2965666,3867816,3867168,1000000,0.603257142857143},
-{2965667,3865472,3865601,0.049275,1000000},
-{2965668,3865211,3865472,0.0999096774193548,1000000},
-{2965669,3865273,3865211,1000000,0.0883846153846154},
-{2965670,3865472,3865273,1000000,0.0681512195121951},
-{2965671,3865298,3865273,1000000,0.0501488372093023},
-{2965672,3864556,3863120,0.496268571428571,0.57898},
-{2965673,3865149,3864556,0.192967741935484,0.260086956521739},
-{2965674,3865790,3865430,0.3789,0.157875},
-{2965675,3861675,3860858,0.409179310344828,0.423792857142857},
-{2965676,3861909,3861675,0.12138,0.12138},
-{2965677,3862158,3861909,0.137139130434783,0.175233333333333},
-{2965678,3864200,3863348,1000000,0.437165217391304},
-{2965679,3864404,3864200,1000000,0.09895},
-{2965680,3864507,3864404,1000000,0.0413},
-{2965681,3864778,3864507,1000000,0.126425},
-{2965682,3865119,3864778,1000000,0.27645},
-{2965683,3864279,3863530,1000000,0.426311111111111},
-{2965684,3864279,3863845,0.22762,1000000},
-{2965685,3868060,3867690,0.221771428571429,0.166328571428571},
-{2965686,3864646,3864596,1000000,0.09456},
-{2965687,3864310,3864473,0.122752941176471,0.189709090909091},
-{2965688,3864473,3864596,0.134457142857143,1000000},
-{2965689,3864948,3864596,0.24666,0.259642105263158},
-{2965690,3864948,3864629,0.4696,1000000},
-{2965691,3868846,3868665,1000000,0.522066666666667},
-{2965692,3869200,3868846,1000000,0.1722},
-{2965693,3869200,3869047,1000000,0.434475},
-{2965694,3870551,3870062,1000000,0.14060625},
-{2965695,3870734,3870342,0.114774193548387,1000000},
-{2965696,3869892,3869332,0.209690909090909,0.192216666666667},
-{2965697,3870104,3869625,0.246035294117647,0.232366666666667},
-{2965698,3870104,3870108,0.0705230769230769,0.06112},
-{2965699,3870061,3870104,0.129576923076923,0.124777777777778},
-{2965700,3869946,3870061,0.269509090909091,0.3294},
-{2965701,3869931,3869940,0.228913043478261,0.2925},
-{2965702,3872130,3872597,0.253233333333333,1000000},
-{2965703,3867584,3867408,1000000,0.101778947368421},
-{2965704,3867993,3867584,1000000,0.187963636363636},
-{2965705,3868558,3868634,1000000,0.1835},
-{2965706,3867740,3867497,0.20235,0.20235},
-{2965707,3868722,3867740,0.355984615384615,0.420709090909091},
-{2965708,3869253,3868722,0.166567741935484,0.1613625},
-{2965709,3869450,3869253,0.08405,0.087704347826087},
-{2965710,3870178,3869450,0.403311111111111,0.418823076923077},
-{2965711,3870733,3870178,0.902457142857143,0.823982608695652},
-{2965712,3871313,3871325,1000000,0.135184615384615},
-{2965713,3871325,3871053,1000000,0.136489655172414},
-{2965714,3871053,3871036,1000000,0.1336},
-{2965715,3871036,3870884,1000000,0.223084615384615},
-{2965716,3871522,3871036,1000000,0.200127272727273},
-{2965717,3871613,3871522,1000000,0.151472727272727},
-{2965718,3871613,3872062,0.211768421052632,1000000},
-{2965719,3871386,3870904,0.604242857142857,1000000},
-{2965720,3871403,3871386,1000000,0.209833333333333},
-{2965721,3871877,3871386,0.29052,0.29052},
-{2965722,3871522,3871403,1000000,0.272147368421053},
-{2965723,3871699,3871613,1000000,0.131544827586207},
-{2965724,3871784,3871699,1000000,0.189782608695652},
-{2965725,3872008,3871522,0.191686956521739,1000000},
-{2965726,3872517,3872000,0.32072,1000000},
-{2965727,3870884,3870519,0.196042105263158,0.18624},
-{2965728,3869601,3868968,0.49449,1000000},
-{2965729,3868968,3867922,0.468711111111111,1000000},
-{2965730,3867922,3867160,0.36934,1000000},
-{2965731,3867160,3866653,0.307628571428571,1000000},
-{2965732,3866653,3866270,0.237622222222222,1000000},
-{2965733,3858457,3857523,0.208004347826087,0.195269387755102},
-{2965734,3856553,3855526,0.246386666666667,0.241030434782609},
-{2965735,3855526,3855297,0.07225,0.08128125},
-{2965736,3855297,3853721,1000000,1000000},
-{2965737,3851487,3851186,1000000,1000000},
-{2965740,3851124,3850588,0.2608875,0.27828},
-{2965741,3851536,3851124,0.18219375,0.153426315789474},
-{2965742,3851390,3851455,0.2322,0.215614285714286},
-{2965743,3851455,3850824,0.394178571428571,0.4245},
-{2965744,3854623,3854151,1000000,0.358542857142857},
-{2965745,3853171,3853602,0.2560875,0.264348387096774},
-{2965746,3853602,3853721,1000000,1000000},
-{2965747,3855025,3854190,0.257326829268293,0.22935652173913},
-{2965748,3855294,3855025,0.108206896551724,0.101225806451613},
-{2965749,3855297,3855294,0.235864285714286,0.227731034482759},
-{2965750,3856149,3855294,0.40284,0.431614285714286},
-{2965751,3854623,3854007,0.3068,0.287625},
-{2965752,3854007,3853754,0.11828,0.11828},
-{2965753,3853754,3852944,0.422422222222222,0.35641875},
-{2965754,3852944,3852812,0.05144,0.0417081081081081},
-{2965755,3852812,3852375,0.15193125,0.127942105263158},
-{2965756,3851974,3851701,0.201233333333333,0.157486956521739},
-{2965757,3852293,3851857,0.1588125,0.1588125},
-{2965758,3851857,3851703,0.0564947368421053,0.0564947368421053},
-{2965759,3851703,3851517,0.0617526315789474,0.0634216216216216},
-{2965760,3851517,3851091,0.217730769230769,0.22644},
-{2965762,3851701,3851091,0.392736,0.426886956521739},
-{2965763,3852966,3851701,0.388369230769231,0.409362162162162},
-{2965771,3855769,3856329,0.266935714285714,0.287469230769231},
-{2965772,3857114,3857495,0.25488,0.199125},
-{2965773,3865626,3865364,1000000,1000000},
-{2965774,3865364,3864943,1000000,1000000},
-{2965775,3864943,3864411,1000000,0.446147368421053},
-{2965776,3864411,3863619,1000000,0.74136},
-{2965777,3863619,3863636,1000000,0.04494},
-{2965778,3864850,3864576,0.157141935483871,0.2118},
-{2965779,3864576,3864380,0.0902108108108108,0.123622222222222},
-{2965780,3864380,3864027,0.2175,0.183157894736842},
-{2965781,3864027,3863615,0.156885,0.179297142857143},
-{2965782,3863615,3863285,0.18346,0.177541935483871},
-{2965783,3862535,3863285,0.9428,1000000},
-{2965784,3863285,3863619,0.457928571428571,0.6411},
-{2965785,3863285,3862988,0.148371428571429,0.148371428571429},
-{2965786,3862988,3862258,0.265828571428571,0.265828571428571},
-{2965787,3862535,3862124,0.229527272727273,0.240457142857143},
-{2965788,3862124,3861192,0.521907692307692,0.502577777777778},
-{2965789,3861192,3861050,0.1244,0.11196},
-{2965790,3861050,3860587,0.2461,0.2461},
-{2965791,3861192,3861509,0.330384,0.330384},
-{2965792,3861509,3861704,0.215675,0.235281818181818},
-{2965793,3861704,3861992,0.168744,0.21093},
-{2965794,3861992,3862258,0.196854545454545,0.196854545454545},
-{2965795,3862258,3862135,0.0598829268292683,0.0558},
-{2965796,3862135,3861639,0.277395348837209,0.277395348837209},
-{2965797,3861639,3861527,0.0557590909090909,0.0721588235294118},
-{2965798,3861527,3861273,0.1305875,0.2022},
-{2965799,3861273,3861064,0.0989478260869565,0.0989478260869565},
-{2965800,3861064,3860698,0.197289473684211,0.197289473684211},
-{2965801,3860698,3860080,0.258994285714286,1000000},
-{2965802,3860080,3860294,0.298915384615385,1000000},
-{2965805,3856270,3855275,0.315308108108108,0.38888},
-{2965806,3856707,3856270,0.13715,0.145217647058824},
-{2965807,3857402,3856707,0.191713636363636,0.241011428571429},
-{2965808,3860294,3859839,0.326968421052632,0.2004},
-{2965809,3861394,3861298,0.0306558139534884,0.0321512195121951},
-{2965810,3862536,3861394,0.317489361702128,0.310875},
-{2965811,3862713,3862536,0.05152,0.0504},
-{2965812,3865521,3865193,1000000,0.143238461538462},
-{2965813,3865193,3864023,1000000,0.429041379310345},
-{2965814,3867846,3867228,1000000,0.3044},
-{2965815,3867228,3866359,1000000,0.376852173913043},
-{2965816,3866359,3865959,1000000,0.133821428571429},
-{2965817,3865959,3865096,1000000,0.35515},
-{2965818,3864549,3864411,0.206571428571429,0.1446},
-{2965819,3865096,3864973,0.07512,0.0662823529411765},
-{2965820,3863636,3863073,0.441816,0.424823076923077},
-{2965821,3863073,3862893,0.123707142857143,0.0989657142857143},
-{2965822,3862893,3862385,0.29062,0.27245625},
-{2965823,3862385,3862060,0.249876923076923,0.240622222222222},
-{2965824,3862060,3861926,0.124266666666667,0.115696551724138},
-{2965825,3861926,3861394,0.460464,0.396951724137931},
-{2965826,3865105,3865131,0.0406857142857143,1000000},
-{2965827,3865131,3865626,0.47628,1000000},
-{2965828,3867790,3867531,1000000,0.340685714285714},
-{2965829,3867531,3866390,0.497678571428571,0.497678571428571},
-{2965830,3866436,3866749,0.313510344827586,0.313510344827586},
-{2965831,3866257,3866321,0.0278086956521739,0.0220551724137931},
-{2965832,3869323,3869392,0.171070588235294,0.200565517241379},
-{2965833,3869392,3869488,0.3429,0.3857625},
-{2965834,3869488,3868809,0.511941176470588,0.561483870967742},
-{2965835,3868809,3867998,0.46455,0.46455},
-{2965836,3868809,3868758,0.0642,0.07704},
-{2965867,3864145,3863679,0.2728875,1000000},
-{2965868,3863561,3862785,0.211174468085106,0.283577142857143},
-{2965869,3865022,3864265,0.41217,1000000},
-{2965870,3864265,3863408,0.338345454545455,0.465225},
-{2965871,3863408,3863055,0.228851612903226,1000000},
-{2965872,3863055,3862851,0.102356756756757,1000000},
-{2965873,3863339,3862732,0.392622222222222,0.588933333333333},
-{2965874,3863055,3862732,0.47952,0.508581818181818},
-{2965875,3862851,3862323,0.278305263157895,1000000},
-{2965876,3862323,3861818,0.2627,1000000},
-{2965877,3861341,3861818,0.29799375,0.307606451612903},
-{2965878,3861553,3861341,0.229968,0.221123076923077},
-{2965879,3861802,3861553,0.303,0.303},
-{2965880,3860688,3861341,0.3669,0.39136},
-{2965881,3860611,3860688,0.0598615384615385,0.0864666666666667},
-{2965882,3861802,3860611,0.53775,1000000},
-{2965883,3860611,3859249,0.49629375,0.5882},
-{2965884,3858544,3858221,0.375161538461538,0.424095652173913},
-{2965885,3858673,3858544,1000000,1000000},
-{2965886,3859249,3858948,0.181622222222222,0.181622222222222},
-{2965887,3858994,3856149,1000000,0.910341176470588},
-{2965888,3851171,3851283,0.05124,0.05124},
-{2965955,3852711,3852940,0.156909090909091,0.1726},
-{2965956,3852435,3852711,0.211634482758621,0.20458},
-{2965957,3852435,3852793,0.129214285714286,0.1206},
-{2965958,3852793,3853171,0.130623529411765,0.11103},
-{2965962,3850392,3849584,0.348068571428571,0.320589473684211},
-{2965963,3861818,3861856,0.2786,0.329254545454545},
-{2965964,3861856,3861821,0.159872727272727,0.170187096774194},
-{2965965,3861454,3861263,1000000,1000000},
-{2965967,3851809,3851909,1000000,0.0550857142857143},
-{2965968,3851909,3852898,1000000,0.3738},
-{2965969,3852898,3854238,0.566855172413793,0.608844444444444},
-{2965970,3854238,3855304,0.486969230769231,0.42204},
-{2965971,3857125,3857364,1000000,0.122228571428571},
-{2965972,3851746,3851989,0.0966,0.101684210526316},
-{2965973,3852842,3853736,0.43128,0.4193},
-{2965974,3859211,3858742,0.241486956521739,0.241486956521739},
-{2965975,3859211,3859085,0.313623529411765,0.26658},
-{2965976,3859647,3859211,0.38571,0.367342857142857},
-{2965977,3859953,3859647,0.313363636363636,0.28725},
-{2965978,3860127,3859953,0.184742857142857,0.228211764705882},
-{2965979,3860522,3860094,1000000,0.350016},
-{2965980,3861049,3860522,1000000,0.416625},
-{2965981,3860714,3860094,0.299466666666667,0.351547826086957},
-{2965982,3861209,3860714,0.240062068965517,0.21755625},
-{2965983,3861638,3861209,0.271875,0.20390625},
-{2965984,3862001,3861638,1000000,0.451223076923077},
-{2965985,3862342,3862001,1000000,0.430752},
-{2965986,3862428,3862002,0.269746153846154,0.23378},
-{2965987,3862002,3861821,0.1804,0.1804},
-{2965988,3863408,3862890,1000000,0.31252},
-{2965989,3853736,3854135,0.274272727272727,0.3017},
-{2965990,3854135,3854487,0.121533333333333,0.125005714285714},
-{2965991,3854487,3854610,0.060975,0.062941935483871},
-{2965992,3855950,3856454,0.202875,0.202875},
-{2965993,3857120,3857611,0.197568,0.1764},
-{2965995,3852629,3852205,0.116832558139535,0.116832558139535},
-{2965996,3851575,3852134,0.23235,0.23235},
-{2965997,3849832,3850122,0.115722580645161,1000000},
-{2966002,3861551,3861412,0.203136,0.230836363636364},
-{2966003,3861412,3861288,0.0985941176470588,0.115593103448276},
-{2966004,3860609,3860549,0.0844363636363636,0.074304},
-{2966005,3857162,3854297,0.831384615384615,0.8106},
-{2966006,3857822,3857162,0.196783333333333,0.196783333333333},
-{2966143,3859671,3858708,0.455686956521739,0.52404},
-{2966144,3856564,3856063,0.239428571428571,0.193384615384615},
-{2966145,3854691,3854717,0.0983357142857143,0.0888193548387097},
-{2966149,3850940,3850417,1000000,1000000},
-{2966150,3850060,3849752,0.1559,0.173222222222222},
-{2966156,3863120,3862967,1000000,1000000},
-{2966157,3863281,3863120,0.387571428571429,1000000},
-{2966158,3863348,3863281,0.163885714285714,1000000},
-{2966159,3862967,3862878,0.216685714285714,0.3792},
-{2966160,3862878,3862712,0.233328,0.24305},
-{2966161,3862712,3861288,0.587717647058823,0.62445},
-{2966162,3863082,3862712,0.15885,0.195507692307692},
-{2966163,3862702,3862070,0.213264705882353,0.2417},
-{2966164,3862070,3861961,0.0584275862068965,0.05295},
-{2966165,3861961,3861604,0.146262857142857,0.146262857142857},
-{2966166,3859761,3860238,0.272238461538462,0.393233333333333},
-{2966167,3857948,3858278,1000000,0.359742857142857},
-{2966168,3857611,3857948,1000000,0.6328},
-{2966169,3852205,3852381,1000000,0.15344347826087},
-{2966170,3852381,3852675,1000000,0.254175},
-{2966171,3850717,3851108,0.312970588235294,0.280026315789474},
-{2966172,3850077,3850717,0.337885714285714,0.31536},
-{2966173,3865825,3865923,1000000,0.182836363636364},
-{2966174,3865923,3865905,1000000,0.157517647058824},
-{2966175,3865779,3865905,0.484384615384615,1000000},
-{2966176,3865993,3865903,0.1084,0.2168},
-{2966177,3879461,3879484,0.207,0.22425},
-{2966178,3879484,3879520,0.193103225806452,0.230238461538462},
-{2966179,3875721,3874873,1000000,0.557810526315789},
-{2966180,3858786,3859411,0.268407692307692,0.211472727272727},
-{2966181,3859411,3859918,0.243977777777778,0.227151724137931},
-{2966182,3859918,3860471,0.473454545454545,0.385777777777778},
-{2966183,3860471,3860962,0.445881818181818,0.377284615384615},
-{2966184,3860962,3861291,0.327624,0.292521428571429},
-{2966185,3858549,3858805,0.246342857142857,0.255466666666667},
-{2966186,3858805,3858383,0.270707142857143,0.280733333333333},
-{2966187,3858383,3857904,0.321988235294118,0.228075},
-{2966188,3857904,3857341,0.538771428571429,0.342854545454545},
-{2966189,3856768,3856584,0.147214285714286,0.1145},
-{2966190,3856768,3857341,0.255313043478261,0.3670125},
-{2966191,3859033,3859236,0.194208,0.2023},
-{2966192,3859236,3859478,0.20115,0.216623076923077},
-{2966193,3859478,3859615,0.118045161290323,0.110890909090909},
-{2966194,3859615,3859806,0.158496774193548,0.140382857142857},
-{2966195,3860477,3860853,0.208852173913044,0.228742857142857},
-{2966196,3862055,3861677,0.220958823529412,0.23476875},
-{2966197,3862691,3862324,0.266416216216216,0.30804375},
-{2966198,3862814,3862691,0.0768923076923077,0.0937125},
-{2966199,3863015,3862814,0.105892307692308,0.13321935483871},
-{2966200,3863194,3863015,0.09678,0.113858823529412},
-{2966201,3859478,3859150,0.139466666666667,0.150624},
-{2966202,3859150,3858650,0.236664,0.246525},
-{2966203,3858650,3857826,0.41345,0.451036363636364},
-{2966204,3857826,3856976,0.37695652173913,0.3468},
-{2966205,3853849,3853628,0.123194117647059,0.149592857142857},
-{2966206,3855078,3854520,0.281377777777778,0.2374125},
-{2966207,3856181,3855078,0.48695625,0.48695625},
-{2966208,3855870,3855078,0.272925,0.256870588235294},
-{2966209,3856766,3855870,0.338622222222222,0.365712},
-{2966210,3856030,3856181,0.137372727272727,0.1314},
-{2966211,3855889,3856030,0.1372,0.149672727272727},
-{2966212,3856434,3855889,0.204309090909091,0.22474},
-{2966213,3856502,3856172,0.18214,0.18214},
-{2966214,3857416,3856976,0.233979310344828,0.21204375},
-{2966215,3861729,3861201,0.276705882352941,0.303483870967742},
-{2966216,3861201,3860597,0.225775609756098,0.225775609756098},
-{2966217,3860597,3859995,0.232384615384615,0.226575},
-{2966218,3859995,3859581,0.157989473684211,0.139618604651163},
-{2966219,3859581,3858969,0.244835294117647,0.244835294117647},
-{2966220,3858969,3858527,0.219703448275862,0.193072727272727},
-{2966221,3858527,3858101,0.163292307692308,0.15921},
-{2966222,3858038,3857474,0.258421621621622,0.2656},
-{2966223,3849920,3850006,0.297835714285714,0.287565517241379},
-{2966224,3850006,3849788,0.151118181818182,0.138525},
-{2966225,3877859,3878333,0.465054545454545,0.1764},
-{2966226,3875035,3876377,0.48905625,0.601915384615385},
-{2966227,3874514,3875204,0.214005405405405,0.344269565217391},
-{2966228,3874433,3873754,0.262064516129032,0.369272727272727},
-{2966229,3873754,3872986,0.234342857142857,0.241235294117647},
-{2966230,3872986,3872200,0.198372972972973,0.203883333333333},
-{2966231,3872200,3871816,0.0882461538461538,0.0983314285714286},
-{2966232,3871816,3871373,0.131593548387097,0.123618181818182},
-{2966233,3871489,3870122,0.297763636363636,0.344778947368421},
-{2966234,3872207,3871489,0.123701886792453,0.128552941176471},
-{2966235,3872779,3872207,0.0953236363636364,0.0989207547169811},
-{2966236,3873104,3872779,0.0643745454545455,0.0668037735849057},
-{2966237,3873584,3873104,0.0979924528301887,0.105991836734694},
-{2966238,3874265,3873584,0.161364,0.171663829787234},
-{2966239,3862324,3861746,0.410136,0.379755555555556},
-{2966240,3861214,3860899,0.1987,0.176622222222222},
-{2966241,3860899,3860084,0.400248,0.33354},
-{2966242,3860084,3859423,0.39813,0.442366666666667},
-{2966243,3862464,3862099,0.138212903225806,0.153021428571429},
-{2966244,3862746,3862464,0.0824487804878049,0.109045161290323},
-{2966245,3863047,3862746,0.0960146341463415,0.115782352941176},
-{2966246,3863190,3863047,0.0553621621621622,0.0620727272727273},
-{2966247,3863351,3863190,0.0737647058823529,0.076},
-{2966248,3863351,3863599,0.203376,0.175324137931034},
-{2966249,3864456,3864128,0.160536,0.154361538461538},
-{2966250,3864727,3864456,0.129864,0.124869230769231},
-{2966251,3864521,3864727,0.345836363636364,0.345836363636364},
-{2966252,3864408,3864521,0.176018181818182,0.16135},
-{2966253,3864385,3864408,0.0656869565217391,0.060432},
-{2966254,3863246,3863351,0.167930769230769,0.161711111111111},
-{2966255,3863246,3863521,0.150755555555556,0.150755555555556},
-{2966256,3863521,3863993,0.179311764705882,0.164772972972973},
-{2966257,3863993,3864385,0.485085714285714,1000000},
-{2966258,3862861,3863246,0.318525,0.308872727272727},
-{2966259,3862753,3862861,0.0849642857142857,0.0881111111111111},
-{2966260,3862670,3862753,0.10124347826087,0.10124347826087},
-{2966261,3864861,3864385,0.216511764705882,0.210325714285714},
-{2966262,3865673,3865404,0.112540909090909,0.107647826086957},
-{2966263,3866710,3866371,0.108586363636364,0.111111627906977},
-{2966264,3867827,3867277,0.198247826086957,0.1899875},
-{2966265,3866838,3866207,0.306208695652174,0.306208695652174},
-{2966266,3867083,3866838,0.104464285714286,0.100862068965517},
-{2966267,3867827,3867932,0.03315,0.03536},
-{2966268,3867932,3868109,0.0543829787234043,0.0568},
-{2966269,3868313,3868109,0.0809318181818182,0.0741875},
-{2966270,3868741,3868313,0.15876,0.152004255319149},
-{2966271,3870128,3869325,0.5291625,0.604757142857143},
-{2966272,3870942,3870490,0.140690322580645,0.174456},
-{2966273,3869739,3868298,0.428671428571429,0.409186363636364},
-{2966274,3868298,3868378,0.143871428571429,0.154938461538462},
-{2966275,3868298,3868056,0.0565227272727273,0.0540652173913043},
-{2966276,3868056,3866954,0.22446,0.220058823529412},
-{2966277,3866954,3866506,0.0874384615384615,0.0842},
-{2966278,3864538,3864151,0.111065217391304,0.111065217391304},
-{2966279,3864151,3863557,0.15389387755102,0.1571},
-{2966280,3866147,3866288,0.15781935483871,0.148254545454545},
-{2966281,3866288,3866380,0.130164705882353,0.134109090909091},
-{2966282,3866502,3867887,0.242042105263158,0.250843636363636},
-{2966283,3870947,3871839,0.17308085106383,0.150644444444444},
-{2966284,3873852,3874063,0.0830727272727273,1000000},
-{2966285,3874068,3874508,1000000,0.136436842105263},
-{2966286,3874508,3875200,1000000,0.164675},
-{2966287,3867722,3867394,0.464238461538461,0.482808},
-{2966288,3867394,3867335,0.111052173913043,0.106425},
-{2966289,3867335,3867244,0.194857142857143,0.157384615384615},
-{2966290,3866345,3866314,0.115333333333333,0.115333333333333},
-{2966291,3866379,3866345,0.126507692307692,0.149509090909091},
-{2966292,3867253,3866644,0.327088888888889,0.327088888888889},
-{2966293,3867645,3867253,0.152833333333333,0.22008},
-{2966294,3869449,3869245,0.0958363636363636,0.131775},
-{2966295,3870922,3870038,1000000,0.200882926829268},
-{2966296,3871912,3872329,0.0976923076923077,0.100263157894737},
-{2966297,3872329,3872801,0.103876923076923,0.10128},
-{2966298,3872801,3873190,0.10281,0.105446153846154},
-{2966299,3873190,3873576,0.106484210526316,0.103753846153846},
-{2966300,3870416,3869732,0.27,0.2484},
-{2966301,3870044,3869471,0.222545454545455,0.212869565217391},
-{2966302,3870332,3870044,0.100666666666667,0.10872},
-{2966303,3870648,3870332,0.09061875,0.111530769230769},
-{2966304,3870830,3870648,0.0638769230769231,0.0638769230769231},
-{2966305,3872127,3872073,0.12393,0.1458},
-{2966306,3871883,3871726,0.2392,0.229632},
-{2966307,3871726,3871573,0.246533333333333,0.27735},
-{2966308,3871573,3871419,0.216888,0.225925},
-{2966309,3871419,3871301,0.172222222222222,0.19375},
-{2966310,3870749,3870427,0.500352,0.3909},
-{2966311,3870031,3869473,0.20504347826087,0.168428571428571},
-{2966312,3870427,3870031,0.1086,0.119109677419355},
-{2966313,3872622,3871726,0.324192,0.324192},
-{2966314,3871726,3871109,0.200421428571429,0.200421428571429},
-{2966315,3871109,3870757,0.1105125,0.114077419354839},
-{2966316,3870757,3870242,0.1315,0.127945945945946},
-{2966317,3870242,3869649,0.22345,0.17876},
-{2966318,3869580,3868195,0.526344,0.731033333333333},
-{2966319,3868195,3867715,0.167376923076923,0.167376923076923},
-{2966320,3866481,3867167,0.436125,0.436125},
-{2966321,3879331,3879030,0.150245454545455,1000000},
-{2966322,3879030,3878867,0.120533333333333,1000000},
-{2966323,3878867,3878384,0.367623529411765,1000000},
-{2966324,3878384,3877811,0.4653,1000000},
-{2966325,3877811,3877376,0.2919375,1000000},
-{2966326,3877376,3877019,0.231635294117647,1000000},
-{2966327,3877019,3876509,1000000,0.362325},
-{2966328,3876509,3876031,0.38144,1000000},
-{2966329,3875896,3876031,0.152478947368421,1000000},
-{2966330,3876031,3876420,0.299066666666667,1000000},
-{2966331,3876420,3876478,0.0862578947368421,1000000},
-{2966332,3876979,3876420,1000000,0.329621052631579},
-{2966333,3877494,3876979,1000000,0.23088},
-{2966334,3877863,3877494,1000000,0.180545454545455},
-{2966335,3878287,3877863,1000000,0.2677},
-{2966336,3878798,3878287,1000000,0.358566666666667},
-{2966337,3879301,3878798,1000000,0.289457142857143},
-{2966338,3879713,3879301,1000000,0.28011},
-{2966339,3880187,3879713,1000000,0.428188235294118},
-{2966340,3878431,3878630,1000000,0.43005},
-{2966341,3878630,3878867,1000000,0.3},
-{2966342,3878867,3879301,1000000,0.467869565217391},
-{2966343,3879301,3879476,1000000,0.225542857142857},
-{2966344,3879476,3879577,1000000,0.126652173913043},
-{2966345,3877019,3877249,0.215856,1000000},
-{2966346,3877249,3877494,0.26718,1000000},
-{2966347,3877494,3877665,0.145776923076923,1000000},
-{2966348,3877665,3877824,0.12578,1000000},
-{2966349,3877824,3877972,0.10036875,1000000},
-{2966350,3877824,3877288,0.334870588235294,1000000},
-{2966351,3878206,3877824,0.214547368421053,1000000},
-{2966352,3878576,3878206,0.249789473684211,1000000},
-{2966353,3879105,3878576,0.32814,1000000},
-{2966354,3879577,3879105,0.3323,1000000},
-{2966355,3879953,3879577,0.243182608695652,1000000},
-{2966356,3880474,3879953,0.31535,1000000},
-{2966357,3876533,3876990,1000000,1000000},
-{2966358,3877288,3876990,1000000,1000000},
-{2966361,3877865,3878235,0.45325,0.402888888888889},
-{2966363,3878194,3878285,0.0865448275862069,1000000},
-{2966364,3878285,3878423,0.139992857142857,1000000},
-{2966365,3879207,3879377,1000000,0.2466},
-{2966366,3879377,3879512,1000000,0.149382857142857},
-{2966369,3879433,3879689,0.321696,1000000},
-{2966370,3879689,3879823,0.18518,1000000},
-{2966371,3879823,3879934,0.155505882352941,1000000},
-{2966374,3879844,3880096,1000000,0.398209090909091},
-{2966375,3880224,3880279,1000000,0.0697153846153846},
-{2966376,3880279,3880358,1000000,0.124735714285714},
-{2966481,3882416,3881858,0.51252,0.410016},
-{2966482,3883407,3882416,0.455029411764706,0.418135135135135},
-{2966483,3883778,3883407,0.177141176470588,0.316989473684211},
-{2966484,3882043,3881457,0.411725,1000000},
-{2966485,3882951,3882043,0.614215384615385,1000000},
-{2966486,3883356,3882951,0.261875,1000000},
-{2966487,3882714,3882650,0.0519333333333333,1000000},
-{2966488,3883691,3883362,0.27222,1000000},
-{2966489,3883462,3883413,0.0580125,1000000},
-{2966490,3884149,3883765,0.2522,1000000},
-{2966491,3884480,3884149,0.24,1000000},
-{2966492,3884891,3884480,0.33411,1000000},
-{2966493,3884842,3884123,0.38878,1000000},
-{2966494,3885264,3884842,0.2091375,1000000},
-{2966495,3885630,3885264,0.162166666666667,1000000},
-{2966496,3885756,3885630,0.0627,1000000},
-{2966497,3886017,3885756,0.110163636363636,1000000},
-{2966498,3885549,3884820,1000000,0.466128},
-{2966499,3885952,3885549,1000000,0.234346153846154},
-{2966500,3886270,3885952,1000000,0.185933333333333},
-{2966501,3886651,3886598,0.0518,0.0518},
-{2966502,3885549,3886372,0.384642857142857,0.307714285714286},
-{2966503,3884842,3885549,1000000,0.350733333333333},
-{2966504,3884286,3884842,1000000,0.23488125},
-{2966505,3883811,3884286,1000000,0.238155555555556},
-{2966506,3883451,3883811,1000000,0.16666},
-{2966507,3883163,3883451,1000000,0.137896551724138},
-{2966508,3882806,3883163,1000000,0.191053846153846},
-{2966509,3883163,3882468,0.490172727272727,1000000},
-{2966510,3883730,3883163,0.415690909090909,1000000},
-{2966511,3884119,3883730,0.268909090909091,1000000},
-{2966512,3884512,3884119,0.27792,1000000},
-{2966513,3882416,3882806,0.203568,0.203568},
-{2966514,3882043,3882416,1000000,0.230492307692308},
-{2966515,3881666,3882043,1000000,0.198921428571429},
-{2966516,3881260,3881666,1000000,0.233},
-{2966517,3880738,3881260,1000000,0.446611764705882},
-{2966518,3885141,3885756,0.3466,1000000},
-{2966519,3884669,3885141,0.287142857142857,1000000},
-{2966520,3884389,3884669,0.248223529411765,1000000},
-{2966521,3884119,3884389,0.177730434782609,1000000},
-{2966522,3883767,3884119,0.223445454545455,1000000},
-{2966523,3883407,3883767,0.236727272727273,1000000},
-{2966524,3882951,3883407,0.31593,1000000},
-{2966525,3881409,3881781,0.41635,1000000},
-{2966526,3882573,3882951,0.246381818181818,1000000},
-{2966527,3882201,3882573,0.258381818181818,1000000},
-{2966528,3886128,3886073,0.0404347826086957,1000000},
-{2966529,3886522,3886376,0.0817058823529412,1000000},
-{2966530,3885393,3886522,0.53145,1000000},
-{2966531,3886522,3887217,0.3486,1000000},
-{2966532,3887217,3887723,0.1879875,1000000},
-{2966533,3887723,3888066,0.1275,1000000},
-{2966534,3884641,3884559,0.07072,1000000},
-{2966535,3885377,3885031,0.226610526315789,1000000},
-{2966536,3885755,3885377,0.326766666666667,1000000},
-{2966537,3885903,3885755,0.125325,1000000},
-{2966538,3883905,3883835,0.049578947368421,0.0348888888888889},
-{2966539,3884966,3884606,0.17266875,0.240234782608696},
-{2966540,3883924,3884381,0.287885714285714,1000000},
-{2966541,3884381,3884857,0.256375,1000000},
-{2966542,3884857,3885360,0.245746153846154,1000000},
-{2966543,3885360,3885947,0.343718181818182,1000000},
-{2966544,3885947,3886324,0.214434782608696,1000000},
-{2966545,3886324,3886843,0.39441,1000000},
-{2966546,3885433,3884966,0.2394,0.216232258064516},
-{2966547,3885947,3885433,0.255193548387097,0.2637},
-{2966548,3885360,3884891,0.3276,1000000},
-{2966549,3885969,3885360,0.416452173913043,1000000},
-{2966550,3885922,3885969,1000000,0.0141771428571429},
-{2966551,3886806,3886705,0.0545351351351351,0.0545351351351351},
-{2966552,3887133,3886806,0.22185,0.230066666666667},
-{2966553,3887733,3887332,0.29515,0.337314285714286},
-{2966554,3887332,3887195,1000000,0.116809090909091},
-{2966555,3887195,3886778,1000000,0.3648},
-{2966556,3885006,3884381,0.552,1000000},
-{2966557,3885436,3885006,0.3714,1000000},
-{2966558,3885823,3885436,0.376266666666667,1000000},
-{2966559,3886201,3885823,1000000,0.29445},
-{2966560,3886592,3886201,1000000,0.374942857142857},
-{2966561,3886676,3886403,0.286408695652174,1000000},
-{2966562,3886403,3886348,0.290347826086957,1000000},
-{2966563,3886348,3886256,0.368307692307692,1000000},
-{2966564,3888514,3889572,1000000,0.690031578947368},
-{2966565,3887195,3887688,0.255834782608696,0.235368},
-{2966566,3888069,3888514,0.3468,0.226173913043478},
-{2966567,3887455,3888069,0.383815384615385,1000000},
-{2966568,3887455,3887142,1000000,0.335933333333333},
-{2966569,3887142,3886830,1000000,0.300136363636364},
-{2966570,3886830,3886324,1000000,0.5148},
-{2966571,3885761,3885343,1000000,0.33969},
-{2966572,3885343,3884974,1000000,0.322517647058823},
-{2966573,3884974,3884852,1000000,0.0967363636363636},
-{2966574,3884852,3884557,1000000,0.179475},
-{2966575,3884245,3884184,1000000,0.0434181818181818},
-{2966576,3882806,3882165,1000000,0.500542857142857},
-{2966577,3883767,3882806,1000000,0.8489},
-{2966578,3884144,3883767,1000000,0.338364705882353},
-{2966579,3881666,3881101,1000000,0.454885714285714},
-{2966580,3882573,3881666,1000000,0.741736363636364},
-{2966581,3882971,3882573,1000000,0.314285714285714},
-{2966582,3883077,3883025,1000000,0.0421826086956522},
-{2966583,3883744,3883373,1000000,0.283609090909091},
-{2966584,3884083,3883744,1000000,0.289484210526316},
-{2966585,3882705,3882737,0.0458307692307692,0.0458307692307692},
-{2966586,3882915,3883362,0.2712,0.328294736842105},
-{2966587,3883362,3883744,0.252081818181818,1000000},
-{2966588,3883744,3884149,0.294157894736842,1000000},
-{2966589,3884149,3884606,0.310690909090909,1000000},
-{2966590,3884606,3884974,0.25614,1000000},
-{2966591,3883373,3883765,1000000,0.27918},
-{2966592,3885460,3884857,1000000,0.50151},
-{2966593,3884813,3884938,0.0671076923076923,0.158618181818182},
-{2966594,3884938,3885436,1000000,0.31881},
-{2966595,3885436,3885812,1000000,0.247095652173913},
-{2966596,3888249,3888033,1000000,0.57355},
-{2966597,3888033,3887882,0.240366666666667,0.2704125},
-{2966598,3888263,3889060,0.228248780487805,0.233955},
-{2966599,3887287,3888397,1000000,0.583281818181818},
-{2966600,3888065,3887702,1000000,0.245492307692308},
-{2966601,3888397,3888065,1000000,0.25025},
-{2966602,3888733,3888397,1000000,0.226755555555556},
-{2966603,3888885,3888733,1000000,0.0854709677419355},
-{2966604,3889045,3888885,1000000,0.181517647058824},
-{2966605,3889190,3889045,1000000,0.100872},
-{2966606,3888848,3889190,1000000,1000000},
-{2966607,3889572,3889190,1000000,0.2746},
-{2966608,3890071,3891018,1000000,0.438483870967742},
-{2966609,3889710,3890071,1000000,0.147564705882353},
-{2966610,3888978,3889710,1000000,0.254789189189189},
-{2966611,3888397,3888978,1000000,0.194348571428571},
-{2966612,3888621,3888263,0.3201,1000000},
-{2966613,3888978,3888621,0.247875,1000000},
-{2966614,3889307,3888978,0.282,1000000},
-{2966615,3889594,3889307,0.252286956521739,1000000},
-{2966616,3890111,3889594,0.445375,1000000},
-{2966617,3889572,3890111,0.4106,0.351942857142857},
-{2966618,3890111,3890814,0.423652173913043,1000000},
-{2966619,3889416,3889060,1000000,0.290618181818182},
-{2966620,3889710,3889416,1000000,0.29703},
-{2966621,3890011,3889710,1000000,0.271382608695652},
-{2966622,3890291,3890011,1000000,0.323233333333333},
-{2966623,3890814,3890291,1000000,0.461086956521739},
-{2966624,3890814,3891129,0.271466666666667,1000000},
-{2966625,3891129,3891563,1000000,1000000},
-{2966626,3891563,3891873,0.185256,1000000},
-{2966627,3891093,3890814,1000000,0.277695652173913},
-{2966628,3891396,3891093,1000000,0.31326},
-{2966629,3889797,3889459,0.292636363636364,1000000},
-{2966630,3890071,3889797,0.2457,1000000},
-{2966631,3890362,3890071,0.297628571428571,1000000},
-{2966632,3890645,3890362,0.263863636363636,1000000},
-{2966633,3891129,3890645,0.420912,1000000},
-{2966634,3891450,3891129,0.2696,1000000},
-{2966635,3891744,3891450,0.329747368421053,1000000},
-{2966636,3884953,3884490,0.401166666666667,1000000},
-{2966637,3883632,3882749,0.680863636363636,1000000},
-{2966638,3882749,3882176,0.52581,1000000},
-{2966639,3883267,3882819,1000000,0.4118},
-{2966640,3884878,3885320,0.410072727272727,0.196121739130435},
-{2966641,3885456,3886154,1000000,0.468675},
-{2966642,3886077,3886154,0.147572727272727,1000000},
-{2966643,3885542,3886068,1000000,0.35532},
-{2966644,3885704,3886068,0.545488888888889,0.545488888888889},
-{2966645,3886068,3886153,0.197557894736842,0.18768},
-{2966646,3885539,3885760,1000000,0.217963636363636},
-{2966647,3885760,3886302,1000000,0.1681875},
-{2966648,3886154,3886231,1000000,0.0308625},
-{2966649,3886231,3886591,0.1602,0.140781818181818},
-{2966650,3886591,3887040,0.173981818181818,0.173981818181818},
-{2966651,3887040,3887229,0.0733241379310345,0.0607542857142857},
-{2966652,3887229,3887371,0.0943263157894737,0.0484378378378378},
-{2966653,3886653,3886904,0.3202,1000000},
-{2966654,3886904,3887157,0.255436363636364,1000000},
-{2966655,3887157,3887229,0.1557,0.1557},
-{2966656,3886068,3886444,1000000,0.197686956521739},
-{2966657,3886444,3886890,1000000,0.225725},
-{2966658,3886890,3887251,1000000,0.1866},
-{2966659,3887251,3887568,1000000,0.136095652173913},
-{2966660,3887568,3888018,1000000,0.191921739130435},
-{2966661,3886904,3887528,0.343285714285714,1000000},
-{2966662,3887528,3887833,1000000,0.233},
-{2966663,3886302,3886686,1000000,0.156225},
-{2966664,3886686,3887116,1000000,0.214752},
-{2966665,3887116,3887524,1000000,0.178},
-{2966666,3887552,3887872,1000000,0.140452173913044},
-{2966667,3887872,3888406,1000000,0.240965217391304},
-{2966668,3886302,3886574,1000000,0.390696},
-{2966669,3886574,3886820,0.641,1000000},
-{2966670,3885449,3886029,0.231422222222222,0.480646153846154},
-{2966671,3884878,3884890,0.248628571428571,0.290066666666667},
-{2966672,3884890,3884935,0.554215384615385,0.576384},
-{2966673,3884950,3884991,0.0291,1000000},
-{2966674,3885051,3885171,0.368713043478261,1000000},
-{2966675,3885376,3885449,0.0488470588235294,1000000},
-{2966676,3884472,3885171,1000000,0.432705882352941},
-{2966677,3886029,3886198,0.0763,0.0963789473684211},
-{2966678,3886198,3886574,0.200975,1000000},
-{2966679,3886198,3886380,1000000,0.376591304347826},
-{2966680,3886574,3886963,0.188192307692308,1000000},
-{2966681,3886963,3887213,0.105321428571429,1000000},
-{2966682,3887213,3887402,0.0874615384615385,1000000},
-{2966683,3887402,3887866,0.1614,1000000},
-{2966684,3887866,3887979,0.03525,1000000},
-{2966685,3887979,3888178,0.0707806451612903,1000000},
-{2966686,3887589,3887545,0.206366666666667,0.37146},
-{2966687,3887577,3888245,1000000,0.340363636363636},
-{2966688,3888178,3888849,0.276096,1000000},
-{2966689,3888245,3888486,1000000,1000000},
-{2966690,3888486,3888980,1000000,1000000},
-{2966691,3888018,3888406,0.226533333333333,0.291257142857143},
-{2966692,3888406,3888569,0.0873230769230769,0.100164705882353},
-{2966693,3888569,3888849,0.150252631578947,0.203914285714286},
-{2966694,3888980,3889101,0.110957142857143,1000000},
-{2966695,3889780,3890666,0.425871428571429,0.425871428571429},
-{2966696,3890290,3890666,0.252812903225807,0.290266666666667},
-{2966697,3888038,3888330,0.376017391304348,1000000},
-{2966698,3888762,3889092,1000000,0.482833333333333},
-{2966699,3889466,3889092,0.402577777777778,0.3882},
-{2966700,3889636,3889895,0.373057142857143,0.3561},
-{2966701,3889895,3890290,1000000,0.356075},
-{2966702,3890290,3891401,0.379388571428571,0.379388571428571},
-{2966703,3890666,3891036,1000000,0.241942857142857},
-{2966704,3891401,3892093,0.438910344827586,0.438910344827586},
-{2966705,3892093,3892586,0.479676923076923,1000000},
-{2966706,3890666,3891238,0.366548571428571,0.32073},
-{2966707,3882562,3882686,1000000,0.326466666666667},
-{2966708,3883630,3884137,1000000,1000000},
-{2966709,3885200,3885935,0.3139,1000000},
-{2966710,3885966,3885955,0.1049,1000000},
-{2966711,3885966,3885980,0.56991,1000000},
-{2966712,3885980,3885935,0.3834,1000000},
-{2966713,3885935,3885895,1000000,1000000},
-{2966714,3885237,3885980,0.3789,1000000},
-{2966715,3885980,3886599,0.34,1000000},
-{2966716,3886599,3887029,0.273126315789474,1000000},
-{2966717,3887029,3887643,0.286963636363636,1000000},
-{2966718,3887643,3888230,0.28461,1000000},
-{2966719,3885195,3885424,1000000,1000000},
-{2966720,3885424,3885895,1000000,1000000},
-{2966721,3885935,3886564,0.308869565217391,1000000},
-{2966722,3886564,3886985,0.231681818181818,1000000},
-{2966723,3886985,3887624,0.315342857142857,1000000},
-{2966724,3887624,3888215,0.3,1000000},
-{2966725,3888574,3888243,1000000,0.371428571428571},
-{2966726,3888243,3888230,1000000,0.17589},
-{2966727,3888215,3888807,0.2389,0.229344},
-{2966728,3888181,3887879,0.635442857142857,1000000},
-{2966729,3889418,3889686,1000000,0.107828571428571},
-{2966730,3887433,3887336,1000000,0.23772},
-{2966731,3888980,3889502,1000000,0.444925},
-{2966732,3889502,3889524,1000000,0.3069},
-{2966733,3889502,3890332,1000000,0.371538461538462},
-{2966734,3890332,3890615,1000000,0.18249},
-{2966735,3890615,3891238,1000000,0.417714285714286},
-{2966736,3891238,3891614,1000000,0.274168421052632},
-{2966737,3891614,3892093,1000000,0.35586},
-{2966738,3889292,3888880,1000000,1000000},
-{2966739,3889292,3889666,1000000,1000000},
-{2966740,3889666,3890290,1000000,0.42993},
-{2966741,3889418,3889426,0.1515,1000000},
-{2966742,3889423,3889417,0.32385,1000000},
-{2966743,3889417,3888996,0.5326,1000000},
-{2966744,3889426,3889424,0.159171428571429,1000000},
-{2966745,3889424,3889423,0.150130434782609,1000000},
-{2966746,3889640,3890527,1000000,1000000},
-{2966747,3890527,3891267,0.293969230769231,0.301705263157895},
-{2966748,3891267,3891588,0.142333333333333,0.150705882352941},
-{2966749,3891588,3893035,0.617091891891892,0.585446153846154},
-{2966750,3891535,3891588,0.179733333333333,0.156541935483871},
-{2966751,3891442,3891535,0.236588571428571,0.2238},
-{2966752,3891407,3891442,0.0552,0.0504685714285714},
-{2966753,3891332,3891407,0.15885,0.173290909090909},
-{2966754,3891153,3891208,0.134888888888889,0.191684210526316},
-{2966755,3892295,3892241,0.35204,0.16501875},
-{2966756,3892295,3892616,0.261308571428571,0.261308571428571},
-{2966757,3892616,3892860,0.162127272727273,0.140794736842105},
-{2966758,3891321,3891870,1000000,0.248644444444444},
-{2966759,3891870,3892616,1000000,0.366715384615385},
-{2966760,3892860,3893035,0.132,0.132},
-{2966761,3893035,3893289,0.200092307692308,0.190331707317073},
-{2966762,3893289,3893801,0.336242553191489,0.336242553191489},
-{2966763,3887433,3888181,0.30284347826087,1000000},
-{2966764,3888181,3888798,0.364376470588235,1000000},
-{2966765,3888798,3889423,0.352333333333333,1000000},
-{2966766,3889423,3889959,0.325073684210526,1000000},
-{2966767,3889959,3890689,0.3616,1000000},
-{2966768,3890689,3891442,0.336555555555556,0.395086956521739},
-{2966769,3891411,3891410,0.2884,0.34608},
-{2966770,3890400,3891410,0.37093125,0.423921428571429},
-{2966771,3896454,3897499,0.725791304347826,0.758781818181818},
-{2966772,3897499,3898733,0.366259459459459,0.410654545454545},
-{2966773,3899144,3899258,0.257337931034483,0.298512},
-{2966774,3899258,3899393,0.318090909090909,0.32803125},
-{2966775,3899393,3899543,0.277466666666667,0.344441379310345},
-{2966776,3899543,3899696,0.269417142857143,0.336771428571429},
-{2966777,3895550,3896305,0.250026666666667,0.250026666666667},
-{2966778,3896305,3896752,0.4012875,0.188841176470588},
-{2966779,3895987,3896149,0.364571428571429,0.364571428571429},
-{2966780,3895762,3895987,0.2516,0.30192},
-{2966781,3895550,3895762,0.289609090909091,0.374788235294118},
-{2966782,3895299,3895550,0.280944,0.29265},
-{2966783,3895204,3895299,0.0890727272727273,0.122475},
-{2966784,3882217,3882788,1000000,0.688242857142857},
-{2966785,3881527,3882217,1000000,0.5319375},
-{2966786,3880986,3881527,0.31587,1000000},
-{2966787,3884871,3885322,1000000,0.288966666666667},
-{2966788,3885322,3885964,1000000,0.37065},
-{2966789,3885964,3886374,1000000,0.284},
-{2966790,3886374,3886770,1000000,0.27189},
-{2966791,3886770,3887153,1000000,0.289966666666667},
-{2966792,3887773,3888338,1000000,0.268147826086957},
-{2966793,3884597,3885036,0.320775,1000000},
-{2966794,3885036,3885626,0.46188,1000000},
-{2966795,3885626,3886061,1000000,0.368228571428571},
-{2966796,3886061,3886445,0.3339375,1000000},
-{2966797,3886763,3887257,0.324142857142857,1000000},
-{2966798,3887257,3887735,0.272714285714286,1000000},
-{2966799,3884285,3884527,1000000,0.179633333333333},
-{2966800,3884527,3884827,1000000,0.147844444444444},
-{2966801,3884827,3885240,1000000,0.269685714285714},
-{2966802,3885240,3885626,1000000,0.664411764705882},
-{2966803,3885626,3885964,1000000,0.52071},
-{2966804,3885964,3886246,1000000,0.392714285714286},
-{2966805,3886374,3886595,0.640984615384615,1000000},
-{2966806,3886061,3886374,0.54141,1000000},
-{2966807,3885650,3886061,0.659810526315789,1000000},
-{2966808,3884404,3884808,0.189046153846154,0.223418181818182},
-{2966809,3884808,3885140,0.163425,0.13074},
-{2966810,3885140,3885792,1000000,0.33045},
-{2966811,3884812,3886025,0.563808,1000000},
-{2966812,3886025,3886999,0.527088,1000000},
-{2966813,3886025,3886345,0.295025,1000000},
-{2966814,3887735,3888676,0.428856,1000000},
-{2966815,3888676,3889303,0.3098,1000000},
-{2966816,3889303,3889774,0.278154545454545,1000000},
-{2966817,3888338,3889368,1000000,0.477814285714286},
-{2966818,3889882,3890313,1000000,0.3057},
-{2966819,3890313,3890551,1000000,0.195726315789474},
-{2966820,3888338,3888712,0.441284210526316,1000000},
-{2966821,3888043,3888338,0.265368,1000000},
-{2966822,3887735,3888043,0.30537,1000000},
-{2966823,3887358,3887735,0.389571428571429,1000000},
-{2966824,3889368,3890015,1000000,0.451823076923077},
-{2966825,3888676,3889010,1000000,0.253371428571429},
-{2966826,3888112,3888676,1000000,0.351408},
-{2966827,3886999,3887358,0.359209090909091,1000000},
-{2966828,3887514,3888112,1000000,0.341544},
-{2966829,3886345,3887514,1000000,0.812463157894737},
-{2966830,3889774,3889989,0.184942857142857,1000000},
-{2966831,3890551,3890890,1000000,0.240085714285714},
-{2966832,3890890,3890957,0.09831,0.0756230769230769},
-{2966833,3886721,3887082,0.255247058823529,0.309942857142857},
-{2966834,3887082,3887774,0.42436875,0.484992857142857},
-{2966835,3887774,3888549,0.180829787234043,0.193159090909091},
-{2966836,3888549,3889387,0.399325,0.281876470588235},
-{2966837,3890879,3891528,0.20786511627907,0.21800487804878},
-{2966838,3891528,3892047,0.159587234042553,0.159587234042553},
-{2966839,3892047,3893439,0.415097872340426,0.433546666666667},
-{2966840,3893439,3894253,0.489507692307692,0.47727},
-{2966841,3890573,3891206,0.293882352941176,0.333066666666667},
-{2966842,3891812,3893008,0.548785714285714,0.548785714285714},
-{2966843,3893008,3893477,0.562727272727273,0.442142857142857},
-{2966844,3893836,3894383,0.392552941176471,0.385003846153846},
-{2966845,3894383,3895130,0.5686625,0.58076170212766},
-{2966846,3897620,3897945,0.228244444444444,0.228244444444444},
-{2966847,3897025,3896417,0.313034482758621,0.313034482758621},
-{2966848,3897620,3897025,0.308441379310345,0.3727},
-{2966849,3896417,3896710,0.21004,0.21004},
-{2966850,3897062,3896710,0.361228571428572,0.270921428571429},
-{2966851,3897660,3897062,0.217786363636364,0.245707692307692},
-{2966852,3897062,3896753,0.162812903225806,0.186933333333333},
-{2966853,3896753,3896692,0.0410516129032258,0.0438827586206897},
-{2966854,3896692,3896473,0.1672,0.191085714285714},
-{2966855,3882008,3882417,0.342966666666667,1000000},
-{2966856,3884174,3884766,0.50472,1000000},
-{2966857,3890551,3891439,0.819947368421053,1000000},
-{2966858,3899992,3900723,0.306165517241379,0.286412903225806},
-{2966859,3900723,3900988,0.129816,0.115907142857143},
-{2966860,3900892,3900988,0.214927272727273,0.22164375},
-{2966861,3900988,3901522,0.257478260869565,0.257478260869565},
-{2966862,3901522,3902287,0.470717647058824,0.40011},
-{2966863,3900988,3901802,0.399852631578947,0.446894117647059},
-{2966864,3901802,3902031,0.08952,1000000},
-{2966865,3902287,3902673,0.170856,0.164284615384615},
-{2966866,3900544,3900611,0.0574682926829268,0.047124},
-{2966867,3901167,3900611,1000000,0.282391304347826},
-{2966868,3901167,3901653,0.2219,1000000},
-{2966869,3901653,3902654,0.430375,0.430375},
-{2966870,3902031,3901957,0.0984,0.0849818181818182},
-{2966871,3901957,3901680,0.39534,0.39534},
-{2966872,3901680,3901653,0.112,0.138352941176471},
-{2966873,3901653,3901616,0.203057142857143,0.218676923076923},
-{2966874,3901616,3901591,0.139179310344828,0.149488888888889},
-{2966875,3901591,3901571,0.0698322580645161,0.0832615384615385},
-{2966876,3901571,3901559,0.0986666666666667,0.111},
-{2966877,3900611,3901435,0.673604651162791,0.629673913043478},
-{2966878,3901435,3901578,0.0590275862068966,0.05349375},
-{2966879,3901578,3902475,0.321475862068966,0.266365714285714},
-{2966880,3903103,3903051,0.243323076923077,0.253056},
-{2966881,3902673,3903051,0.239242105263158,0.206618181818182},
-{2966882,3902654,3902685,0.214690909090909,0.202422857142857},
-{2966883,3902645,3902654,0.145781818181818,0.133633333333333},
-{2966884,3902645,3902641,0.143047058823529,0.143047058823529},
-{2966885,3902654,3903791,0.5428,0.5664},
-{2966886,3902641,3902627,0.13772,0.142468965517241},
-{2966887,3902627,3902545,0.290925,0.31032},
-{2966888,3903048,3903675,0.284723076923077,0.2313375},
-{2966889,3903714,3903675,0.1757,0.18825},
-{2966890,3903714,3903756,0.10760625,0.111077419354839},
-{2966891,3903756,3903774,0.0518896551724138,0.0518896551724138},
-{2966892,3903774,3903791,0.10916,0.112924137931034},
-{2966893,3901351,3901493,0.196594285714286,1000000},
-{2966894,3901956,3902229,1000000,0.189186206896552},
-{2966895,3904108,3902614,0.62270625,0.603836363636364},
-{2966896,3903774,3904497,0.3564,0.3564},
-{2966897,3904497,3904108,0.34821,0.357138461538462},
-{2966898,3903791,3903848,0.22306,0.202781818181818},
-{2966899,3905008,3904497,0.274475,0.274475},
-{2966900,3905192,3905008,0.104265306122449,0.111065217391304},
-{2966901,3905707,3905679,0.0256258064516129,0.031776},
-{2966902,3903848,3905008,0.517025,0.496344},
-{2966903,3903051,3904004,0.53115652173913,0.469869230769231},
-{2966904,3904004,3904911,0.489742857142857,0.428525},
-{2966905,3904911,3905138,0.224869565217391,0.246285714285714},
-{2966906,3892740,3893836,0.496664516129032,0.733171428571429},
-{2966907,3889406,3890573,0.563577777777778,0.800873684210526},
-{2966908,3888710,3889911,0.8017,0.72153},
-{2966909,3890216,3890527,0.174724137931034,0.3166875},
-{2966910,3895299,3896051,0.495991304347826,0.7129875},
-{2966911,3896051,3896496,0.31623,0.287481818181818},
-{2966912,3888897,3889636,0.252327272727273,0.20817},
-{2966913,3884379,3884105,1000000,0.359357142857143},
-{2966914,3891127,3891190,0.0245666666666667,0.0276375},
-{2966915,3879055,3879455,0.28916,1000000},
-{2966916,3879455,3879534,0.0724,1000000},
-{2966917,3879534,3879788,0.243766666666667,1000000},
-{2966918,3879788,3880240,0.42801,1000000},
-{2966919,3879082,3879225,1000000,0.09808},
-{2966920,3880637,3880207,1000000,1000000},
-{2966921,3880207,3880056,1000000,1000000},
-{2966922,3880397,3880240,1000000,0.353266666666667},
-{2966923,3879099,3879670,1000000,0.711692307692308},
-{2966924,3879225,3879485,1000000,0.184966666666667},
-{2966925,3879485,3879969,1000000,0.534282352941176},
-{2966926,3879969,3880207,1000000,1000000},
-{2966927,3879969,3880240,1000000,0.35932},
-{2966928,3880056,3879875,1000000,1000000},
-{2966929,3879875,3879670,1000000,1000000},
-{2966930,3879670,3879985,1000000,0.331136842105263},
-{2966931,3879670,3879116,0.502357894736842,1000000},
-{2966932,3880056,3880449,1000000,0.4439625},
-{2966933,3880449,3881226,1000000,0.65961},
-{2966934,3879985,3880735,1000000,0.657371428571429},
-{2966935,3880735,3880991,1000000,0.232833333333333},
-{2966936,3879788,3879949,0.3348,1000000},
-{2966937,3880676,3880738,0.0486333333333333,0.036475},
-{2966938,3876495,3876476,1000000,0.207075},
-{2966939,3878458,3878336,0.0952090909090909,1000000},
-{2966940,3878336,3878190,0.129572727272727,1000000},
-{2966941,3878190,3878045,0.10293,1000000},
-{2966942,3878336,3878484,1000000,0.212785714285714},
-{2966943,3878674,3878780,1000000,0.1299},
-{2966944,3877892,3877740,1000000,1000000},
-{2967325,3905414,3905498,1000000,0.0223444444444444},
-{2967326,3904638,3904818,1000000,0.0483962264150943},
-{2967327,3904232,3904638,1000000,0.141436363636364},
-{2967328,3904066,3904232,1000000,0.097775},
-{2967329,3899819,3899961,0.0495365853658537,0.119470588235294},
-{2967330,3899961,3900359,0.122660869565217,0.148484210526316},
-{2967331,3900359,3900685,0.120587234042553,0.118075},
-{2967332,3903057,3902542,0.193714285714286,0.198439024390244},
-{2967333,3903356,3903947,0.2035375,0.199383673469388},
-{2967334,3901497,3900925,0.395378571428571,0.299205405405405},
-{2967335,3901249,3900685,0.379241379310345,0.354774193548387},
-{2967336,3901497,3901967,0.267182608695652,0.267182608695652},
-{2967337,3901967,3902566,0.222075,0.273323076923077},
-{2967338,3902566,3903057,0.274460869565217,0.22545},
-{2967340,3903947,3902374,1.0947,1000000},
-{2967341,3899816,3900415,0.282278571428571,0.4939875},
-{2967342,3900415,3900519,0.05475,0.0464545454545455},
-{2967343,3900519,3900940,0.213827586206897,0.177171428571429},
-{2967344,3900940,3901249,0.160032,0.129058064516129},
-{2967345,3896864,3897181,0.116085,0.125497297297297},
-{2967346,3897181,3897644,0.195681081081081,0.160893333333333},
-{2967347,3897644,3897881,0.0968833333333333,0.0917842105263158},
-{2967348,3897881,3898324,0.3462,0.136657894736842},
-{2967349,3898464,3899120,0.241994117647059,0.27426},
-{2967350,3899374,3899817,0.1566,0.267525},
-{2967351,3899817,3900684,0.248508,0.248508},
-{2967352,3900684,3901729,0.283505882352941,0.272807547169811},
-{2967353,3900925,3899374,0.779897142857143,0.802835294117647},
-{2967354,3899374,3898987,0.20488,0.341466666666667},
-{2967355,3898987,3898503,0.163775510204082,0.1605},
-{2967356,3898503,3898030,0.1466375,0.163688372093023},
-{2967357,3898030,3897335,0.237416326530612,0.219498113207547},
-{2967358,3897335,3896657,0.327883333333333,0.319021621621622},
-{2967359,3898030,3898285,0.14024347826087,0.16128},
-{2967360,3898285,3898514,0.121176923076923,0.101632258064516},
-{2967361,3899412,3899911,0.272935714285714,0.283044444444444},
-{2967362,3899911,3900269,0.168455172413793,0.157587096774194},
-{2967363,3900269,3900592,0.1573875,0.152618181818182},
-{2967367,3897294,3897644,1000000,0.331142857142857},
-{2967368,3897294,3897235,0.0384818181818182,1000000},
-{2967369,3897235,3896594,0.562460869565217,1000000},
-{2967370,3896594,3895663,0.970389473684211,1000000},
-{2967371,3895663,3895103,0.38398064516129,0.495975},
-{2967372,3895103,3894487,0.538028571428571,0.322817142857143},
-{2967373,3893546,3892857,0.495275,1000000},
-{2967375,3893307,3893605,0.181671428571429,0.203472},
-{2967376,3893605,3893822,0.232623529411765,0.146466666666667},
-{2967377,3899214,3899412,0.144624,0.144624},
-{2967378,3899214,3898559,0.279696774193548,0.255017647058824},
-{2967379,3898559,3898249,0.149731034482759,0.149731034482759},
-{2967380,3898249,3897752,0.5358,0.3948},
-{2967381,3897991,3897693,1000000,0.174456},
-{2967382,3897693,3897202,1000000,0.36},
-{2967383,3897202,3896724,0.34325,0.374454545454545},
-{2967384,3896724,3896235,0.330311111111111,0.318514285714286},
-{2967385,3897752,3897251,0.336946153846154,0.4867},
-{2967386,3897251,3896739,0.274875,0.251314285714286},
-{2967387,3897702,3898282,0.385125,0.36972},
-{2967389,3896235,3896739,0.350352,1000000},
-{2967392,3895757,3896235,0.339432,1000000},
-{2967396,3895407,3895865,1000000,0.329515384615385},
-{2967428,3897251,3897702,1000000,0.281792307692308},
-{2967429,3896724,3897251,1000000,0.346296},
-{2967430,3896232,3896724,1000000,0.314866666666667},
-{2967431,3900296,3902059,0.47226976744186,0.67692},
-{2967432,3902059,3903126,0.339018181818182,0.286861538461539},
-{2967433,3902273,3903384,0.332183333333333,0.298965},
-{2967434,3903044,3903258,0.080019512195122,0.102525},
-{2967435,3903258,3903711,0.163069565217391,0.166693333333333},
-{2967436,3902528,3902095,0.112897674418605,0.121365},
-{2967437,3902528,3902891,0.10983,0.10983},
-{2967438,3904530,3904800,0.1096125,0.113148387096774},
-{2967439,3904800,3904916,0.0367235294117647,0.0320153846153846},
-{2967440,3906621,3906139,0.353630769230769,0.372745945945946},
-{2967441,3906621,3907030,0.297038709677419,0.30694},
-{2967442,3907739,3907030,0.600155555555556,0.50638125},
-{2967518,3916464,3917126,0.203625,0.207957446808511},
-{2967519,3916452,3916712,0.13986976744186,0.182254545454545},
-{2967520,3916712,3916961,0.247992,0.258325},
-{2967521,3915648,3915906,0.18350625,0.133459090909091},
-{2967522,3915220,3915715,0.394514285714286,0.251054545454545},
-{2967523,3914702,3915220,0.274733333333333,0.282582857142857},
-{2967524,3915220,3915522,0.129572093023256,0.11370612244898},
-{2967526,3915220,3914679,0.323723076923077,0.323723076923077},
-{2967545,3917126,3917582,0.345222222222222,0.388375},
-{2967583,3922631,3923205,0.239506666666667,0.219955102040816},
-{2967584,3923205,3923732,0.23085,0.20729387755102},
-{2967616,3911189,3911713,0.35475,0.551833333333333},
-{2967617,3918853,3919119,0.167755555555556,0.129411428571429},
-{2967618,3918389,3918853,0.274885714285714,1000000},
-{2967619,3917989,3918389,0.1914,1000000},
-{2967620,3917203,3917489,0.101032653061224,1000000},
-{2967621,3916926,3917203,0.103677551020408,1000000},
-{2967622,3919119,3919299,0.145457142857143,0.145457142857143},
-{2967623,3919119,3919450,0.205982608695652,0.128043243243243},
-{2967624,3919794,3919856,0.0202829268292683,0.0189},
-{2967625,3919856,3920073,0.0822714285714286,0.0785318181818182},
-{2967626,3920073,3920149,0.027219512195122,0.0253636363636364},
-{2967627,3920149,3920423,0.087135,0.085009756097561},
-{2967628,3920423,3920505,0.0263526315789474,0.0278166666666667},
-{2967629,3920505,3920749,0.0919384615384615,0.128057142857143},
-{2967630,3920749,3920959,0.0741767441860465,0.0817846153846154},
-{2967631,3920959,3921063,0.0285272727272727,0.0298857142857143},
-{2967632,3921063,3921215,0.04976,0.0508909090909091},
-{2967633,3921215,3921379,0.0520266666666667,0.0520266666666667},
-{2967634,3921379,3921440,0.0187565217391304,0.0196090909090909},
-{2967635,3921440,3921562,0.0322434782608696,0.0337090909090909},
-{2967636,3921562,3921727,0.0475636363636364,0.0475636363636364},
-{2967637,3921727,3921930,0.0722153846153846,0.07041},
-{2967638,3918872,3918476,0.16409387755102,0.1675125},
-{2967639,3918476,3918314,0.0599764705882353,0.0624244897959184},
-{2967640,3918314,3918148,0.0573294117647059,0.0609125},
-{2967641,3918148,3917880,0.0963647058823529,0.1023875},
-{2967642,3917880,3917627,0.0862269230769231,0.089676},
-{2967643,3917268,3917533,0.110693023255814,0.103473913043478},
-{2967644,3914876,3915167,0.1155125,0.113155102040816},
-{2967645,3916587,3916912,0.184277419354839,0.142815},
-{2967646,3916229,3916587,0.18244,0.13683},
-{2967647,3917638,3917880,0.221,0.221},
-{2967648,3913016,3913425,0.215653846153846,0.17521875},
-{2967649,3912557,3913016,0.151251428571429,0.151251428571429},
-{2967650,3912141,3912557,0.182937931034483,0.151577142857143},
-{2967651,3911363,3911735,0.193714285714286,0.200888888888889},
-{2967652,3910992,3911363,0.201177777777778,0.217272},
-{2967653,3910600,3910992,0.210369230769231,0.237808695652174},
-{2967654,3910107,3910600,0.255681818181818,0.208333333333333},
-{2967655,3912873,3911735,0.554469230769231,0.497110344827586},
-{2967656,3911735,3912141,0.1982,0.191121428571429},
-{2967657,3911621,3911998,0.119386956521739,0.12204},
-{2967658,3911998,3912422,0.116208510638298,0.118734782608696},
-{2967659,3912422,3912873,0.129714285714286,0.129714285714286},
-{2967660,3912873,3913321,0.133095,0.126757142857143},
-{2967661,3913321,3913703,0.117081818181818,0.119804651162791},
-{2967662,3913703,3914145,0.118826666666667,0.124353488372093},
-{2967663,3914145,3914504,0.145735135135135,0.149783333333333},
-{2967664,3909706,3910107,0.26943,0.215544},
-{2967665,3909360,3909706,0.285971428571429,0.230976923076923},
-{2967666,3908975,3909360,0.259742857142857,0.218184},
-{2967667,3910387,3910815,0.136728571428571,0.143565},
-{2967668,3909954,3910387,0.124660465116279,0.141063157894737},
-{2967669,3909567,3909954,0.193821428571429,0.3391875},
-{2967670,3908168,3908585,0.26706,1000000},
-{2967671,3909182,3909368,0.0877071428571429,0.0846827586206897},
-{2967672,3908789,3909182,0.15227027027027,0.148263157894737},
-{2967673,3908323,3908789,0.146092682926829,0.146092682926829},
-{2967674,3907749,3908168,0.297568421052632,0.297568421052632},
-{2967675,3907337,3907749,0.24895,0.271581818181818},
-{2967676,3906964,3907337,0.21245,0.21245},
-{2967677,3907067,3907012,0.175783333333333,0.180805714285714},
-{2967678,3907101,3907067,0.16239512195122,0.195829411764706},
-{2967679,3906424,3906054,0.173562162162162,0.14595},
-{2967680,3907147,3907101,0.20544375,0.212070967741935},
-{2967681,3907147,3906634,1000000,0.1510875},
-{2967682,3907705,3907147,1000000,0.17195625},
-{2967683,3907730,3907705,1000000,0.182690909090909},
-{2967684,3907715,3907730,1000000,0.16431724137931},
-{2967685,3907224,3907715,1000000,0.1551},
-{2967686,3906644,3907224,1000000,0.182148387096774},
-{2967687,3906633,3906644,1000000,0.170558823529412},
-{2967688,3906634,3906633,1000000,0.148181818181818},
-{2967689,3906634,3906096,0.3024,0.3248},
-{2967690,3906633,3906079,0.249669230769231,0.309114285714286},
-{2967691,3906079,3905478,0.188170588235294,0.236955555555556},
-{2967692,3905478,3904863,0.243724137931034,0.207882352941176},
-{2967693,3906054,3906464,0.167193103448276,0.193944},
-{2967694,3906464,3907012,0.2586,0.227568},
-{2967695,3907841,3908323,0.156814285714286,0.173321052631579},
-{2967696,3907378,3907841,0.17291052631579,0.182516666666667},
-{2967697,3907067,3907378,0.115533333333333,0.154044444444444},
-{2967698,3907378,3907012,0.231571428571429,0.221045454545455},
-{2967699,3907676,3907378,0.17172,0.165115384615385},
-{2967700,3908368,3907676,0.30808,0.355476923076923},
-{2967701,3909343,3909735,0.19932,0.19932},
-{2967702,3910629,3911029,0.239947826086957,0.250854545454545},
-{2967703,3911029,3911395,0.282978947368421,0.233765217391304},
-{2967704,3911395,3911783,0.218676923076923,0.2472},
-{2967705,3911783,3912199,0.212755555555556,0.24975652173913},
-{2967706,3907558,3907469,0.293335135135135,0.293335135135135},
-{2967707,3908565,3907980,1000000,0.302688},
-{2967708,3907980,3907469,1000000,0.2162},
-{2967709,3907469,3907908,0.2682,0.2682},
-{2967710,3907908,3908442,0.250371428571429,0.241737931034483},
-{2967711,3911189,3909985,0.628896,0.714654545454545},
-{2967712,3906592,3906959,0.190688888888889,0.190688888888889},
-{2967713,3906959,3907469,0.3414,0.3414},
-{2967714,3908442,3908014,0.13558,0.156438461538462},
-{2967715,3907469,3907428,0.256978378378378,0.264116666666667},
-{2967716,3908014,3907428,0.250336363636364,0.229475},
-{2967717,3907428,3906968,0.247248,0.280963636363636},
-{2967718,3907428,3907367,0.184095,0.23011875},
-{2967719,3907367,3907277,0.167355,0.176163157894737},
-{2967720,3909985,3909287,1000000,0.41628},
-{2967721,3909287,3908442,1000000,0.302022222222222},
-{2967722,3907277,3907224,0.21116,0.1979625},
-{2967723,3908340,3907715,0.362817391304348,0.298028571428571},
-{2967724,3909808,3909801,0.136432258064516,0.169176},
-{2967725,3909801,3909771,0.217824,0.217824},
-{2967726,3908379,3907730,0.197322580645161,0.174771428571429},
-{2967727,3909091,3908379,0.139353191489362,0.145546666666667},
-{2967728,3909771,3909091,0.153130434782609,0.160090909090909},
-{2967729,3910816,3909771,0.204853333333333,0.204853333333333},
-{2967730,3909808,3910370,0.255311111111111,0.265130769230769},
-{2967731,3910370,3910816,0.307863157894737,0.243725},
-{2967732,3906130,3905466,0.379084615384615,0.428530434782609},
-{2967733,3905466,3905237,0.146261538461538,0.135814285714286},
-{2967734,3905237,3904863,0.19678,0.227053846153846},
-{2967735,3906130,3906644,0.3462,0.321471428571429},
-{2967736,3905693,3906130,0.2496,0.2496},
-{2967737,3905266,3905693,0.218187096774194,0.21136875},
-{2967738,3904920,3905266,0.251625,0.3774375},
-{2967739,3903160,3903539,0.171133333333333,0.246432},
-{2967740,3903539,3903926,0.171836842105263,0.210638709677419},
-{2967741,3904863,3903926,0.359464285714286,0.359464285714286},
-{2967742,3903926,3904382,0.151663636363636,0.175610526315789},
-{2967743,3904382,3904813,0.166437209302326,0.152272340425532},
-{2967744,3907469,3906958,1000000,0.251666666666667},
-{2967745,3906958,3906520,0.232644444444444,0.232644444444444},
-{2967746,3906520,3906145,0.307914285714286,0.307914285714286},
-{2967747,3906145,3905693,0.352705263157895,1000000},
-{2967748,3905693,3905248,0.286625,0.327571428571429},
-{2967749,3905248,3904810,0.242764285714286,0.261438461538462},
-{2967750,3904810,3904407,0.236228571428571,0.236228571428571},
-{2967751,3904407,3903926,0.325571428571429,0.379833333333333},
-{2967752,3907705,3908368,0.319714285714286,0.331555555555556},
-{2967753,3908839,3908368,0.212111111111111,0.19748275862069},
-{2967754,3909090,3908839,0.0942324324324324,0.0996171428571429},
-{2967755,3880219,3880994,0.610227272727273,1000000},
-{2967756,3879875,3880219,0.4218,1000000},
-{2967757,3880716,3881386,0.54648,1000000},
-{2967758,3881386,3881490,0.12004,1000000},
-{2967759,3879049,3879455,0.259881818181818,1000000},
-{2967760,3879061,3879485,0.2206,1000000},
-{2967761,3881193,3880863,1000000,0.238073684210526},
-{2967762,3880863,3880172,1000000,0.6117},
-{2967763,3880172,3879884,1000000,0.311611764705882},
-{2967764,3882057,3881680,0.678847058823529,1000000},
-{2967765,3881644,3880940,1000000,0.777075},
-{2967766,3882146,3881644,0.616235294117647,1000000},
-{2967767,3882584,3882146,1000000,0.6582},
-{2967768,3882723,3882584,1000000,0.110337931034483},
-{2967769,3887882,3888069,0.100486956521739,0.0888923076923077},
-{2967770,3887688,3887882,0.0834,0.0744642857142857},
-{2967771,3889190,3889252,0.125755555555556,1000000},
-{2967772,3889252,3888885,0.142177777777778,1000000},
-{2967773,3888885,3888848,1000000,1000000},
-{2967905,3909955,3909128,0.319361538461538,0.319361538461538},
-{2967906,3910873,3909955,0.397285714285714,0.5562},
-{2967907,3911027,3910873,0.07845,0.142636363636364},
-{2967908,3910989,3910816,0.0335066666666667,0.0350651162790698},
-{2967909,3911929,3910989,0.207534782608696,0.1988875},
-{2967910,3912818,3911929,0.24376875,0.24376875},
-{2967911,3914075,3914334,0.182685714285714,0.1668},
-{2967912,3912397,3911929,1000000,0.231688888888889},
-{2967913,3911929,3911321,0.364825,0.397990909090909},
-{2967914,3910816,3911321,0.247137931034483,0.298625},
-{2967915,3911321,3911711,0.2265,0.23556},
-{2967916,3911711,3912104,0.23425,0.22488},
-{2967917,3912104,3912553,1000000,0.28065},
-{2967918,3911321,3910822,0.212961290322581,0.253915384615385},
-{2967919,3910822,3910355,0.197767741935484,0.197767741935484},
-{2967920,3910355,3909815,0.22748275862069,0.22748275862069},
-{2967921,3909815,3909667,0.110033333333333,0.0900272727272727},
-{2967922,3909667,3909343,0.337028571428571,0.337028571428571},
-{2967923,3909343,3909011,0.209127272727273,0.209127272727273},
-{2967924,3909011,3908853,0.05607,0.07476},
-{2967925,3908853,3908323,0.274475,0.227151724137931},
-{2967926,3908323,3907836,0.318228571428571,0.33414},
-{2967927,3907836,3907337,0.325542857142857,0.325542857142857},
-{2967928,3905294,3905214,0.336168,0.323238461538462},
-{2967929,3905214,3905129,0.0971052631578947,0.0838636363636364},
-{2967930,3905588,3905214,0.3028,0.286863157894737},
-{2967931,3906054,3905588,0.345,0.363157894736842},
-{2967932,3909090,3909369,0.104952631578947,0.0949571428571429},
-{2967933,3909369,3909771,0.228207692307692,0.19778},
-{2967934,3909369,3909823,0.272325,0.272325},
-{2967935,3909823,3910355,0.264408,0.254238461538462},
-{2967936,3910355,3910786,0.280285714285714,0.280285714285714},
-{2967937,3911202,3911598,0.206222222222222,0.206222222222222},
-{2967938,3911598,3911942,0.23115652173913,0.26583},
-{2967939,3911942,3912354,0.219048,0.238095652173913},
-{2967940,3912354,3912827,0.235625,0.2175},
-{2967941,3912827,3913308,0.22908,0.249},
-{2967942,3913308,3913729,0.22965,0.22965},
-{2967943,3913729,3914168,0.204533333333333,0.262971428571429},
-{2967944,3914168,3914528,0.191592857142857,0.243845454545455},
-{2967945,3914528,3914856,0.260914285714286,0.288378947368421},
-{2967946,3914856,3915147,0.249828571428571,0.249828571428571},
-{2967947,3913308,3912199,0.488533333333333,0.488533333333333},
-{2967948,3914288,3913308,0.471377777777778,0.471377777777778},
-{2967949,3914892,3914288,1000000,1000000},
-{2967950,3915189,3914892,1000000,1000000},
-{2967951,3912553,3912991,0.2224,0.296533333333333},
-{2967952,3912991,3913405,0.227375,0.237260869565217},
-{2967953,3913405,3913875,0.234175,0.255463636363636},
-{2967954,3913875,3914288,0.229008,0.23855},
-{2967955,3914189,3912991,1000000,0.879388235294118},
-{2967956,3912991,3911942,0.454842857142857,0.489830769230769},
-{2967957,3911942,3911029,0.4376,0.690947368421053},
-{2967958,3911029,3909954,0.712105263157895,0.588260869565217},
-{2967959,3909954,3908975,0.791223529411765,0.67254},
-{2967960,3912199,3912649,0.202933333333333,0.238226086956522},
-{2967961,3912649,3913120,0.201777777777778,0.201777777777778},
-{2967962,3913120,3913529,0.204177777777778,0.204177777777778},
-{2967963,3913981,3912873,0.409945454545455,0.356005263157895},
-{2967964,3914856,3913981,0.29328,0.269338775510204},
-{2967965,3915147,3915439,0.204288888888889,0.204288888888889},
-{2967966,3915439,3915747,0.272936842105263,0.235718181818182},
-{2967967,3915747,3916078,0.3337125,0.281021052631579},
-{2967968,3915556,3914856,0.287918181818182,0.263925},
-{2967969,3916460,3915556,0.402681081081081,0.438211764705882},
-{2967970,3917334,3916460,0.616625,0.59196},
-{2967971,3914288,3914653,0.210484615384615,0.228025},
-{2967972,3914653,3914957,0.226725,0.217656},
-{2967973,3914957,3915250,0.1992,0.206861538461538},
-{2967974,3915250,3915556,0.27765,0.241434782608696},
-{2967975,3915556,3915887,0.27255,0.27255},
-{2967976,3915887,3916206,0.27285,0.27285},
-{2967977,3916206,3916515,0.302082352941176,0.302082352941176},
-{2967978,3916515,3916851,0.28209,0.313433333333333},
-{2967979,3913981,3914358,0.27066,0.2082},
-{2967980,3914358,3914701,0.225913043478261,0.185571428571429},
-{2967981,3914997,3914701,0.190992857142857,0.222825},
-{2967982,3914997,3915273,0.2987,0.3360375},
-{2967983,3915969,3915616,0.157383333333333,0.17705625},
-{2967984,3915969,3916229,0.156,0.124},
-{2967985,3913321,3912141,0.838658823529412,0.838658823529412},
-{2967986,3913637,3913321,0.2115,0.158625},
-{2967987,3914358,3913637,0.313064516129032,0.359444444444444},
-{2967988,3915147,3914358,0.511038461538462,0.511038461538462},
-{2967989,3915887,3915147,0.502488,0.405232258064516},
-{2967990,3918284,3918623,0.240939130434783,0.191089655172414},
-{2967991,3917963,3918284,0.190355555555556,0.17132},
-{2967992,3917631,3917963,0.192471428571429,0.158505882352941},
-{2967993,3917334,3917631,0.190634482758621,0.167527272727273},
-{2967994,3917047,3917334,0.17444,0.158581818181818},
-{2967995,3916720,3917047,0.193903448275862,0.165388235294118},
-{2967996,3916370,3916720,0.199066666666667,0.185337931034483},
-{2967997,3916048,3916370,0.19928275862069,0.19928275862069},
-{2967998,3915611,3916048,0.249,0.249},
-{2967999,3915396,3915611,0.197936842105263,0.197936842105263},
-{2968000,3915114,3915396,0.246763636363636,0.258514285714286},
-{2968001,3914808,3915114,0.290242105263158,0.2626},
-{2968002,3915114,3914189,0.46723125,1000000},
-{2968003,3915963,3915114,0.383769230769231,1000000},
-{2968004,3914779,3914564,1000000,0.127338461538462},
-{2968005,3914927,3914779,1000000,0.068780487804878},
-{2968006,3915396,3914927,1000000,0.188439130434783},
-{2968007,3916346,3915396,1000000,0.627969230769231},
-{2968008,3914564,3914188,0.24195652173913,0.46375},
-{2968009,3914188,3913405,0.361292307692308,0.347911111111111},
-{2968010,3913405,3912354,0.454157142857143,0.410206451612903},
-{2968011,3911395,3910387,0.539544,0.499577777777778},
-{2968012,3910387,3909360,0.44998,0.499977777777778},
-{2968013,3917710,3917631,0.0689368421052632,0.0569478260869565},
-{2968014,3916398,3916749,0.196007142857143,0.219528},
-{2968015,3916749,3917042,0.1968,0.1968},
-{2968016,3917042,3917348,0.202844444444444,0.202844444444444},
-{2968017,3917348,3917638,0.188185714285714,0.188185714285714},
-{2968018,3917258,3917268,0.241476923076923,0.190254545454545},
-{2968019,3917989,3918428,0.265336363636364,0.243225},
-{2968020,3918428,3918658,0.0959828571428571,0.0959828571428571},
-{2968021,3918658,3918967,0.13861875,0.134418181818182},
-{2968022,3918967,3919262,0.174936,0.190147826086957},
-{2968023,3918967,3919794,0.589173913043478,0.615954545454545},
-{2968024,3919262,3919616,0.184992,0.220228571428571},
-{2968025,3919616,3919927,0.182112,0.206945454545455},
-{2968026,3919927,3920236,0.189875,0.189875},
-{2968027,3920236,3920578,0.1761,0.240978947368421},
-{2968028,3920578,3920884,0.174946153846154,0.2527},
-{2968029,3920884,3921218,0.199747826086957,0.218771428571429},
-{2968030,3921218,3921556,0.1886,0.215542857142857},
-{2968031,3921556,3921879,0.156492857142857,0.182575},
-{2968032,3919882,3920720,1000000,1.45182},
-{2968033,3920720,3921556,0.530053846153846,0.530053846153846},
-{2968034,3920420,3920720,0.202718181818182,0.14866},
-{2968035,3920091,3920420,0.182,0.150620689655172},
-{2968036,3920091,3920884,0.563025,0.614209090909091},
-{2968037,3919786,3920091,0.184128,0.177046153846154},
-{2968038,3918806,3919117,0.167442857142857,0.180323076923077},
-{2968039,3918473,3918806,0.1396125,0.14892},
-{2968047,3922404,3922677,0.135972413793103,0.101107692307692},
-{2968048,3922060,3922404,0.12429,0.12429},
-{2968049,3918213,3918967,0.3864,0.490430769230769},
-{2968050,3916928,3917489,0.366365217391304,1000000},
-{2968051,3916551,3916928,0.3233625,1000000},
-{2968052,3911713,3913245,0.628008,0.461770588235294},
-{2968053,3913245,3913861,0.2589,0.177142105263158},
-{2968054,3913861,3914699,0.391632,0.279737142857143},
-{2968055,3912587,3913245,0.379130769230769,0.547633333333333},
-{2968120,3922277,3921967,0.20874,0.231933333333333},
-{2968121,3921967,3921644,0.143308695652174,0.140259574468085},
-{2968122,3921644,3921330,0.1363,0.116828571428571},
-{2968123,3921019,3920722,0.115765384615385,0.12808085106383},
-{2968124,3920722,3920382,0.127276363636364,0.15556},
-{2968125,3920382,3919754,0.284972727272727,0.338886486486487},
-{2968126,3921984,3922265,0.11975,0.148655172413793},
-{2968162,3918452,3918721,0.102384615384615,0.105078947368421},
-{2968163,3918721,3918997,0.0877826086956522,0.0897333333333333},
-{2968164,3918997,3919248,0.0812739130434783,0.0869441860465116},
-{2968165,3919248,3919541,0.10872972972973,0.1341},
-{2968166,3920060,3919541,0.370433333333333,0.360421621621622},
-{2968167,3920661,3920060,0.336541463414634,0.328528571428571},
-{2968168,3920060,3920379,0.13688,0.157938461538462},
-{2968169,3920379,3920648,0.0953121951219512,0.0831446808510638},
-{2968170,3920648,3920907,0.0845347826086957,0.0720111111111111},
-{2968171,3920907,3921207,0.0877659574468085,0.0763888888888889},
-{2968172,3921207,3921508,0.0897521739130435,0.0750654545454545},
-{2968173,3921508,3921819,0.086,0.0764444444444445},
-{2968424,3900265,3900502,0.13284,0.159408},
-{2968425,3900502,3900663,0.0735073170731707,0.0700883720930233},
-{2968426,3900663,3900727,0.0257857142857143,0.0230425531914894},
-{2968427,3900727,3900851,0.0517857142857143,0.0453125},
-{2968428,3901059,3901187,0.0417882352941176,0.0417882352941176},
-{2968429,3901187,3901242,0.0180588235294118,0.0180588235294118},
-{2968430,3901242,3901440,0.0600692307692308,0.0612470588235294},
-{2968431,3901440,3901675,0.07134,0.07134},
-{2968432,3901675,3901857,0.0739304347826087,0.068016},
-{2968433,3901857,3902176,0.0882255319148936,0.0863875},
-{2968434,3902176,3902219,0.0153551020408163,0.015675},
-{2968435,3902219,3902434,0.064925,0.064925},
-{2968436,3902434,3902667,0.0730565217391304,0.0685836734693877},
-{2968437,3902667,3902887,0.0791333333333333,0.0726734693877551},
-{2968438,3902887,3903175,0.110326829268293,0.102804545454545},
-{2968439,3903175,3903455,0.2712,0.149627586206897},
-{2968440,3903455,3903661,0.162175,0.25948},
-{2968441,3903661,3903726,0.0243142857142857,0.0291771428571429},
-{2968442,3903726,3903864,0.0506727272727273,0.0530857142857143},
-{2968443,3903864,3903972,0.0331125,0.0345521739130435},
-{2968444,3903972,3904101,0.03462,0.0353265306122449},
-{2968445,3904101,3904365,0.0767411764705883,0.0767411764705883},
-{2968446,3904365,3904581,0.0716235294117647,0.0702461538461538},
-{2968447,3904581,3904654,0.0255,0.0255},
-{2968448,3904654,3904925,0.0788117647058823,0.0788117647058823},
-{2968449,3904925,3905149,0.0798765957446809,0.0798765957446809},
-{2968450,3905149,3905425,0.246284210526316,0.150948387096774},
-{2968451,3905425,3905622,0.107078571428571,0.1578},
-{2968452,3905622,3905814,0.0708139534883721,0.087},
-{2968453,3905814,3906155,0.10122,0.10768085106383},
-{2968454,3906155,3906193,0.0151038461538462,0.0160285714285714},
-{2968455,3906193,3906439,0.0858117647058823,0.0893142857142857},
-{2968456,3906439,3906779,0.102129411764706,0.106297959183673},
-{2968457,3906779,3906830,0.0127132075471698,0.014336170212766},
-{2968458,3906830,3907136,0.0836588235294118,0.085332},
-{2968459,3907136,3907273,0.0409269230769231,0.042564},
-{2968460,3907273,3907596,0.0828905660377358,0.0861411764705882},
-{2968461,3907596,3908381,0.202673076923077,0.224234042553191},
-{2968462,3908381,3908523,0.0340909090909091,0.0294117647058824},
-{2968463,3908523,3908725,0.0640468085106383,0.060204},
-{2968464,3908725,3909222,0.134258823529412,0.131676923076923},
-{2968465,3909222,3909420,0.0581307692307692,0.060456},
-{2968466,3909420,3909532,0.025692,0.0262163265306122},
-{2968467,3909532,3910139,0.240566666666667,0.262436363636364},
-{2968468,3910139,3910675,0.14553488372093,0.15645},
-{2968469,3910675,3911011,0.105413333333333,0.128205405405405},
-{2968470,3911282,3911597,0.121136842105263,0.127866666666667},
-{2968471,3911597,3911776,0.07272,0.0786162162162162},
-{2968472,3911776,3911897,0.040515,0.0450166666666667},
-{2968473,3911897,3912221,0.180936,0.173976923076923},
-{2968474,3912221,3912542,0.237423529411765,0.212431578947368},
-{2968475,3912542,3912605,0.0275769230769231,0.0256071428571429},
-{2968479,3901769,3902101,0.678912,0.628622222222222},
-{2968480,3901769,3902514,1000000,0.3519},
-{2968481,3901724,3901769,0.171063157894737,0.154771428571429},
-{2968482,3901724,3902445,0.4710375,1000000},
-{2968483,3903353,3903693,0.159664285714286,0.178824},
-{2968484,3903693,3903992,0.0866769230769231,0.0913621621621622},
-{2968485,3903992,3904660,0.185776744186046,0.1902},
-{2968486,3904660,3905107,0.12212,0.130842857142857},
-{2968487,3905107,3905347,0.0826105263157895,0.0872},
-{2968488,3905347,3906093,0.57054375,0.536982352941176},
-{2968489,3905347,3905529,0.08036,0.0777677419354839},
-{2968490,3905240,3905529,0.239314285714286,0.231062068965517},
-{2968491,3905066,3905240,0.132193548387097,0.120529411764706},
-{2968492,3904850,3905066,0.12834375,0.12834375},
-{2968493,3904528,3904850,0.229007142857143,0.246623076923077},
-{2968494,3903785,3904528,0.837573913043478,0.66428275862069},
-{2968495,3903615,3903785,0.189547826086957,0.161466666666667},
-{2968496,3901926,3902378,1000000,0.147948387096774},
-{2968497,3902378,3902515,1000000,0.0347384615384615},
-{2968498,3902515,3902804,1000000,0.0778682926829268},
-{2968499,3902804,3903047,1000000,0.06855},
-{2968500,3903047,3903390,1000000,0.105113513513513},
-{2968501,3903390,3903588,1000000,0.083625},
-{2968502,3903588,3903881,1000000,0.25036},
-{2968503,3904348,3904420,0.15038,0.145529032258065},
-{2968504,3904297,3904348,0.0736186046511628,0.077209756097561},
-{2968505,3904257,3904297,0.0653869565217391,0.0699488372093023},
-{2968506,3904181,3904257,0.0848875,0.0905466666666667},
-{2968507,3904135,3904181,0.07345,0.0750127659574468},
-{2968508,3904068,3904135,0.0726,0.0726},
-{2968509,3904037,3904068,0.0543,0.0532352941176471},
-{2968510,3903999,3904037,0.056808,0.0556941176470588},
-{2968511,3903986,3903999,0.0944042553191489,0.0944042553191489},
-{2968512,3904048,3903986,0.116692682926829,0.11961},
-{2968513,3904603,3904871,0.149177142857143,0.145033333333333},
-{2968514,3904971,3905017,0.03121875,0.0262894736842105},
-{2968515,3905017,3905624,0.283637837837838,0.299845714285714},
-{2968516,3905624,3905878,0.127288888888889,0.122742857142857},
-{2968517,3905878,3906091,0.0882162162162162,0.075906976744186},
-{2968518,3904871,3905738,0.360216666666667,0.381405882352941},
-{2968519,3905738,3906662,0.345138461538462,0.345138461538462},
-{2968520,3906091,3906495,0.128795744680851,0.114215094339623},
-{2968521,3906495,3907449,0.2832,0.289636363636364},
-{2968522,3906735,3906774,0.0151714285714286,0.0148186046511628},
-{2968523,3906774,3906885,0.0444976744186047,0.0455571428571429},
-{2968524,3906885,3907082,0.078,0.0817142857142857},
-{2968525,3907082,3907449,0.199264285714286,0.199264285714286},
-{2968526,3907449,3907808,0.20168275862069,0.224953846153846},
-{2968527,3907808,3908265,0.1437125,0.140779591836735},
-{2968528,3908265,3908767,0.13755,0.143052},
-{2968529,3908767,3909516,0.24945652173913,0.255},
-{2968530,3909982,3910308,0.088725,0.088725},
-{2968531,3910653,3910955,0.102808695652174,0.098525},
-{2968532,3910955,3911799,0.271016326530612,0.2766625},
-{2968533,3908599,3909163,0.163857142857143,0.160046511627907},
-{2968534,3908017,3908599,0.175695,0.156173333333333},
-{2968535,3907449,3908017,0.174945,0.170678048780488},
-{2968536,3905017,3905255,0.134335714285714,0.163539130434783},
-{2968537,3905255,3905453,0.146228571428571,0.122832},
-{2968538,3905453,3905553,0.09968,0.0786947368421053},
-{2968539,3905553,3905774,0.17478,0.17478},
-{2968540,3905774,3906091,0.305333333333333,0.2748},
-{2968541,3910187,3910562,0.12009375,0.19215},
-{2968542,3910562,3910907,0.15012,0.204709090909091},
-{2968543,3910907,3911427,0.259088888888889,0.23318},
-{2968544,3912638,3913258,0.21129375,0.204890909090909},
-{2968545,3912055,3912771,0.332711111111111,0.499066666666667},
-{2968546,3912771,3913158,0.117015,0.15602},
-{2968547,3901568,3901781,0.0813428571428571,0.0830375},
-{2968548,3901350,3901568,0.09495,0.0930122448979592},
-{2968549,3900687,3901103,0.16465,0.168153191489362},
-{2968550,3900499,3900687,0.0807918367346939,0.079176},
-{2968551,3900339,3900499,0.0686705882352941,0.0745148936170213},
-{2968552,3900281,3900339,0.0204734693877551,0.0228},
-{2968553,3900148,3900281,0.0512875,0.0631230769230769},
-{2968554,3900102,3900148,0.0174837209302326,0.0179},
-{2968555,3899900,3900102,0.0842181818181818,0.0861767441860465},
-{2968556,3899692,3899900,0.0840734693877551,0.0915466666666667},
-{2968557,3899490,3899692,0.0783529411764706,0.0815510204081633},
-{2968558,3899211,3899490,0.1054625,0.103310204081633},
-{2968559,3899043,3899211,0.0765285714285714,0.0698739130434783},
-{2968560,3898789,3899043,0.136216666666667,0.129047368421053},
-{2968561,3898650,3898871,0.10986,0.118767567567568},
-{2968562,3898460,3898650,0.071025,0.0811714285714286},
-{2968563,3898276,3898460,0.06768,0.0752},
-{2968564,3897785,3898276,0.238337142857143,0.397228571428571},
-{2968565,3898970,3899215,0.103445454545455,0.101146666666667},
-{2968566,3899215,3900148,0.464708108108108,0.39986511627907},
-{2968567,3897066,3897785,0.434981818181818,0.368061538461538},
-{2968568,3896514,3897066,0.242910638297872,0.253706666666667},
-{2968569,3898642,3898848,0.1134,0.1782},
-{2968570,3898848,3899008,0.0734368421052631,0.069765},
-{2968571,3899008,3899132,0.0434045454545455,0.04244},
-{2968572,3899132,3899399,0.10772,0.1009875},
-{2968573,3898862,3899312,0.25869375,0.4599},
-{2968574,3899312,3899645,0.154772727272727,0.144893617021277},
-{2968575,3899645,3899887,0.102381818181818,0.0979304347826087},
-{2968576,3899887,3900143,0.106540909090909,0.0997404255319149},
-{2968577,3900143,3900231,0.045153488372093,0.0422086956521739},
-{2968578,3900231,3900393,0.065504347826087,0.0614938775510204},
-{2968579,3900393,3900620,0.1033375,0.099204},
-{2968580,3900620,3900834,0.0901021276595745,0.0830352941176471},
-{2968581,3900834,3901052,0.0869617021276596,0.0801411764705882},
-{2968582,3901052,3901235,0.0770170212765958,0.0738734693877551},
-{2968583,3901235,3901319,0.0254125,0.0259531914893617},
-{2968584,3901319,3901413,0.042475,0.042475},
-{2968585,3901413,3901660,0.0922285714285714,0.0922285714285714},
-{2968586,3901660,3901866,0.08235,0.08235},
-{2968587,3901866,3902104,0.0830170212765958,0.0812875},
-{2968588,3902104,3902351,0.0881617021276596,0.0881617021276596},
-{2968589,3902351,3902594,0.0878297872340426,0.0917333333333333},
-{2968590,3902594,3902837,0.0969260869565217,0.0928875},
-{2968591,3902837,3903064,0.0891391304347826,0.082008},
-{2968592,3903064,3903269,0.0889695652173913,0.0835224489795918},
-{2968593,3903269,3903489,0.09608,0.0919914893617021},
-{2968594,3903489,3903682,0.0930933333333333,0.089131914893617},
-{2968595,3903682,3903905,0.089895652173913,0.0879829787234043},
-{2968596,3903905,3904174,0.0941608695652174,0.0962533333333333},
-{2968597,3904174,3904385,0.0959441860465116,0.09168},
-{2968598,3904385,3904603,0.104473170731707,0.101985714285714},
-{2968599,3906403,3906662,0.125413636363636,0.122626666666667},
-{2968600,3906199,3906403,0.0908086956521739,0.083544},
-{2968601,3905986,3906199,0.083448,0.0802384615384615},
-{2968602,3905766,3905986,0.08292,0.0767777777777778},
-{2968603,3905551,3905766,0.083376,0.0772},
-{2968604,3905343,3905551,0.0822705882352941,0.0777},
-{2968605,3904507,3904650,0.060276,0.0627875},
-{2968606,3904290,3904507,0.100295454545455,0.0848653846153846},
-{2968607,3904129,3904290,0.0703411764705882,0.0689884615384615},
-{2968608,3903892,3904129,0.0767769230769231,0.0767769230769231},
-{2968609,3903698,3903892,0.0729807692307692,0.0729807692307692},
-{2968610,3903519,3903698,0.077,0.077},
-{2968611,3903270,3903519,0.0988775510204082,0.0988775510204082},
-{2968612,3903054,3903270,0.075725,0.0741795918367347},
-{2968613,3902453,3903054,0.187640816326531,0.180282352941176},
-{2968614,3901819,3902453,0.183624,0.183624},
-{2968615,3901252,3901819,0.177917647058824,0.174496153846154},
-{2968616,3897409,3897667,0.211254545454545,0.2582},
-{2968617,3897667,3897870,0.142,0.13632},
-{2968618,3897870,3898129,0.160539130434783,0.167836363636364},
-{2968619,3898129,3898386,0.14448,0.138923076923077},
-{2968620,3898386,3898655,0.211457142857143,0.22203},
-{2968621,3898655,3899006,0.231875,0.2226},
-{2968622,3899006,3899301,0.181128,0.22641},
-{2968623,3899301,3899388,0.0860210526315789,0.0908},
-{2968624,3899676,3899747,0.0509142857142857,0.042768},
-{2968625,3899747,3899997,0.18115,0.207028571428571},
-{2968626,3899997,3900311,0.211581818181818,0.221657142857143},
-{2968627,3900311,3900353,0.0292444444444444,0.03948},
-{2968628,3900353,3900548,0.207317647058824,0.207317647058824},
-{2968629,3900548,3900750,0.184714285714286,1000000},
-{2968630,3900750,3900996,0.13938,1000000},
-{2968631,3900996,3901111,0.0625555555555556,1000000},
-{2968632,3901111,3901254,0.0838384615384615,1000000},
-{2968633,3901254,3901482,0.139688888888889,1000000},
-{2968634,3901482,3901701,0.106527272727273,1000000},
-{2968635,3901701,3901992,0.131509090909091,1000000},
-{2968636,3901992,3902338,0.126868421052632,1000000},
-{2968637,3902338,3902578,0.15944347826087,1000000},
-{2968638,3901244,3901564,0.373661538461538,0.194304},
-{2968639,3901021,3901244,0.0863318181818182,0.0844133333333333},
-{2968640,3900793,3901021,0.0840857142857143,0.087663829787234},
-{2968641,3900541,3900793,0.0766961538461538,0.0813918367346939},
-{2968642,3900374,3900541,0.067128,0.069925},
-{2968643,3900303,3900374,0.02094,0.0213673469387755},
-{2968644,3900122,3900303,0.055572,0.0591191489361702},
-{2968645,3899965,3900122,0.0485375,0.0506478260869565},
-{2968646,3899866,3899965,0.0386181818181818,0.0395162790697674},
-{2968647,3899769,3899866,0.037185,0.0391421052631579},
-{2968648,3899600,3899769,0.07011,0.127472727272727},
-{2968649,3899148,3899382,1000000,0.139044444444444},
-{2968650,3898412,3899148,1000000,0.4273},
-{2968651,3899600,3900548,0.382815384615385,0.392889473684211},
-{2968652,3899083,3899148,0.0586666666666667,0.0459130434782609},
-{2968653,3898816,3899083,0.184281818181818,0.144792857142857},
-{2968654,3898741,3898816,0.06085,0.0540888888888889},
-{2968655,3898569,3898741,0.12843,0.0917357142857143},
-{2968656,3898444,3898569,0.0913826086956522,0.0724758620689655},
-{2968657,3898234,3898444,0.150028571428571,0.136982608695652},
-{2968658,3897884,3898234,0.220172727272727,0.24219},
-{2968659,3897618,3897884,0.197454545454545,0.255529411764706},
-{2968660,3898357,3898718,0.241075,0.321433333333333},
-{2968661,3898718,3898866,0.0576139534883721,0.0563045454545455},
-{2968662,3898866,3898925,0.0207681818181818,0.0198652173913043},
-{2968663,3898925,3899190,0.0886666666666667,0.0848936170212766},
-{2968664,3899190,3899315,0.0469787234042553,0.04416},
-{2968665,3899315,3899434,0.0418565217391304,0.038508},
-{2968666,3899434,3899605,0.0648260869565217,0.0608571428571429},
-{2968667,3899605,3899820,0.0709914893617021,0.066732},
-{2968668,3899820,3899923,0.042375,0.04068},
-{2968669,3899923,3900134,0.062675,0.060168},
-{2968670,3900134,3900230,0.0338553191489362,0.031824},
-{2968671,3900230,3900340,0.0338170212765957,0.0324367346938776},
-{2968672,3900340,3900436,0.0395125,0.0387061224489796},
-{2968673,3900436,3900525,0.0301404255319149,0.0295125},
-{2968674,3900525,3900638,0.0461617021276596,0.0461617021276596},
-{2968675,3900638,3900714,0.0250304347826087,0.0239875},
-{2968676,3900714,3900895,0.066525,0.0694173913043478},
-{2968677,3900895,3901177,0.110762790697674,0.108245454545455},
-{2968678,3901177,3901450,0.185504347826087,0.125488235294118},
-{2968679,3901450,3902456,0.333381818181818,0.444509090909091},
-{2968680,3901450,3901709,0.12968,0.1621},
-{2968681,3901709,3901920,0.0837,0.0904864864864865},
-{2968682,3901920,3902067,0.0562428571428571,0.0549348837209302},
-{2968683,3902067,3902154,0.0211363636363636,0.0221428571428571},
-{2968684,3902154,3902234,0.0300681818181818,0.0300681818181818},
-{2968685,3902234,3902410,0.0544046511627907,0.0519866666666667},
-{2968686,3902410,3902738,0.10905652173913,0.10905652173913},
-{2968687,3902738,3902996,0.0905347826086957,0.09465},
-{2968688,3902996,3903257,0.0950571428571429,0.0973756097560976},
-{2968689,3903257,3903307,0.0234166666666667,0.0227837837837838},
-{2968690,3903307,3903527,0.37092,0.132471428571429},
-{2968691,3904043,3904244,0.078375,0.07125},
-{2968692,3904244,3904415,0.0593302325581395,0.05315},
-{2968693,3904415,3904703,0.101569565217391,0.0916117647058824},
-{2968694,3904703,3904806,0.0392553191489362,0.0361764705882353},
-{2968695,3904806,3905030,0.071595652173913,0.071595652173913},
-{2968696,3905030,3905204,0.062525,0.0652434782608696},
-{2968697,3905204,3905353,0.0562085106382979,0.0518},
-{2968698,3905353,3905434,0.0291066666666667,0.0272875},
-{2968699,3905434,3905910,0.156357446808511,0.146976},
-{2968700,3905910,3906356,0.16035,0.172082926829268},
-{2968701,3906356,3906606,0.102981818181818,0.0964085106382979},
-{2968702,3906606,3907328,0.202212244897959,0.198168},
-{2968703,3907328,3907684,0.112573333333333,0.123556097560976},
-{2968704,3907684,3908072,0.176357142857143,0.176357142857143},
-{2968705,3908072,3908095,0.0276,1000000},
-{2968706,3908072,3908799,1000000,0.271344},
-{2968707,3908799,3910166,1000000,0.302018181818182},
-{2968708,3910166,3910837,0.213471428571429,0.145785365853659},
-{2968709,3910837,3912221,0.373621621621622,0.3456},
-{2968710,3908004,3908908,0.397585714285714,1000000},
-{2968711,3904507,3905737,0.618931034482759,1000000},
-{2968712,3903924,3904507,0.314169230769231,0.314169230769231},
-{2968713,3903574,3903924,0.183641379310345,0.204830769230769},
-{2968714,3902594,3903574,0.467516129032258,0.536777777777778},
-{2968715,3901350,3902594,0.53334375,0.656423076923077},
-{2968716,3905737,3906348,0.27571875,0.2941},
-{2968717,3906348,3906600,0.142722580645161,0.134072727272727},
-{2968718,3906600,3906860,0.0993333333333333,0.0941052631578947},
-{2968719,3906860,3907133,0.0968052631578947,0.102183333333333},
-{2968720,3907133,3907484,0.151309090909091,0.20805},
-{2968721,3907484,3907786,0.185582608695652,0.194018181818182},
-{2968722,3907113,3907786,1000000,0.368775},
-{2968723,3906348,3906534,0.0712133333333333,0.0681829787234043},
-{2968724,3906534,3906889,0.0994695652173913,0.095325},
-{2968725,3906889,3907170,0.134485714285714,0.144830769230769},
-{2968726,3907170,3907716,0.204816666666667,0.189061538461538},
-{2968727,3907716,3908138,0.118633333333333,0.125611764705882},
-{2968728,3908138,3908616,0.1436,0.1436},
-{2968729,3907786,3908027,0.1650375,0.1650375},
-{2968730,3908027,3908824,1000000,1000000},
-{2968731,3908908,3909348,0.192931034482759,1000000},
-{2968732,3909348,3909703,0.289664516129032,1000000},
-{2968733,3908863,3909703,0.341822222222222,0.341822222222222},
-{2968734,3908027,3908291,0.178909090909091,0.178909090909091},
-{2968735,3908291,3908603,0.148377777777778,0.148377777777778},
-{2968736,3908603,3908908,0.194372727272727,0.194372727272727},
-{2968737,3906889,3907203,0.0889466666666666,0.0833875},
-{2968738,3907203,3907689,0.136378723404255,0.1335375},
-{2968739,3908072,3907689,0.115905,0.113078048780488},
-{2968740,3902846,3902961,0.0499469387755102,0.0499469387755102},
-{2968741,3902565,3902846,0.105855319148936,0.105855319148936},
-{2968742,3902289,3902565,0.0923478260869565,0.0923478260869565},
-{2968743,3901750,3902289,0.30178,0.30178},
-{2968744,3908072,3908507,0.129823255813954,0.118774468085106},
-{2968745,3908507,3908816,0.0834367346938776,0.0786230769230769},
-{2968746,3908816,3909135,0.0827755102040816,0.0765283018867925},
-{2968747,3909135,3909433,0.0830884615384615,0.0815207547169811},
-{2968748,3909433,3909712,0.083808,0.0873},
-{2968749,3909712,3910139,0.175924137931034,0.141716666666667},
-{2968750,3912221,3913428,0.389691891891892,0.360465},
-{2968751,3913428,3913759,0.10026,0.108389189189189},
-{2968752,3913759,3914090,0.117882352941176,0.167},
-{2968753,3913728,3914090,0.166511111111111,0.172915384615385},
-{2968754,3913037,3913361,0.139727272727273,0.112463414634146},
-{2968755,3912682,3913037,0.12015,0.08544},
-{2968756,3912353,3912682,0.111994285714286,0.0852130434782609},
-{2968757,3912103,3912353,0.096972972972973,0.0797333333333333},
-{2968758,3911844,3912103,0.0936162162162162,0.0769733333333333},
-{2968759,3910824,3911220,0.136355555555556,0.111563636363636},
-{2968760,3909532,3910824,0.52085625,0.505072727272727},
-{2968761,3911535,3911220,0.0993483870967742,0.1062},
-{2968762,3903905,3904862,0.588991304347826,0.521030769230769},
-{2968763,3904603,3905496,0.381705882352941,0.418645161290323},
-{2968764,3905496,3906403,0.464896551724138,0.408545454545455},
-{2968765,3904862,3905766,0.533544,0.635171428571429},
-{2968766,3905766,3907407,0.986765217391304,1.19450526315789},
-{2968767,3907407,3908291,0.453528,0.453528},
-{2968768,3899497,3899862,0.276704347826087,0.276704347826087},
-{2968769,3899862,3900687,0.615,0.615},
-{2968770,3906508,3907133,0.44145,0.44145},
-{2968771,3905144,3906508,0.777969230769231,0.777969230769231},
-{2968772,3903269,3904252,0.5424,0.5424},
-{2968773,3899591,3899862,0.223933333333333,0.223933333333333},
-{2968774,3899344,3899591,0.174715384615385,0.146535483870968},
-{2968775,3899591,3900499,0.4862625,0.51868},
-{2968776,3900499,3901660,0.57944,0.599420689655172},
-{2968777,3899900,3901052,0.72185,0.618728571428571},
-{2968778,3901660,3902786,0.53955,0.604296},
-{2968779,3902786,3903187,0.259173913043478,0.248375},
-{2968780,3903187,3903698,0.353809090909091,0.353809090909091},
-{2968781,3902144,3902418,0.122648275862069,0.11856},
-{2968782,3902418,3902607,0.110112,0.105876923076923},
-{2968783,3902607,3903054,0.311672727272727,0.298121739130435},
-{2968784,3903054,3903346,0.21951,0.209057142857143},
-{2968785,3903346,3903593,0.132527272727273,0.141077419354839},
-{2968786,3903593,3903895,0.23,0.20125},
-{2968787,3903895,3904243,0.203875,0.188192307692308},
-{2968788,3904243,3904564,0.140627027027027,0.148662857142857},
-{2968789,3904564,3904817,0.1464,0.152030769230769},
-{2968790,3904817,3905076,0.13186,0.179809090909091},
-{2968791,3905076,3905910,0.516576923076923,0.516576923076923},
-{2968792,3903105,3903770,0.392957142857143,0.407511111111111},
-{2968793,3902846,3903105,0.188781818181818,0.230733333333333},
-{2968794,3902846,3902781,0.0438,0.0707538461538462},
-{2968795,3902460,3902781,0.245084210526316,0.194025},
-{2968796,3902151,3902460,0.208228571428571,0.14576},
-{2968797,3901819,3902151,0.21711,0.160822222222222},
-{2968798,3901362,3901819,0.342571428571429,0.342571428571429},
-{2968799,3900886,3901362,0.2502,0.278},
-{2968800,3900421,3900886,0.234658064516129,0.202066666666667},
-{2968801,3900143,3900421,0.156577777777778,0.192163636363636},
-{2968802,3898871,3899392,0.304464,1000000},
-{2968803,3899392,3899887,0.258868965517241,1000000},
-{2968804,3897576,3897832,1000000,1000000},
-{2968805,3897832,3898318,1000000,1000000},
-{2968806,3898318,3898848,1000000,0.441035294117647},
-{2968807,3899008,3899769,0.424776923076923,1000000},
-{2968808,3902456,3903455,0.574592307692308,0.439394117647059},
-{2968809,3903455,3904410,0.386368421052632,0.815666666666667},
-{2968810,3904410,3905334,0.349171428571429,0.4582875},
-{2968811,3907847,3908282,1000000,0.199907142857143},
-{2968812,3907549,3907847,1000000,0.133838709677419},
-{2968813,3907265,3907549,1000000,0.142644444444444},
-{2968814,3907265,3907424,0.12006,0.0923538461538462},
-{2968815,3907424,3908048,0.41838,0.298842857142857},
-{2968816,3908048,3908862,0.403133333333333,0.403133333333333},
-{2968817,3908862,3909635,0.436536,0.436536},
-{2968818,3909098,3910063,0.263916666666667,0.231731707317073},
-{2968819,3910063,3910706,0.168225,0.141663157894737},
-{2968820,3910706,3910824,0.0459677419354839,0.0407142857142857},
-{2968821,3908750,3909051,0.118235294117647,0.129677419354839},
-{2968822,3909051,3909347,0.11175,0.129774193548387},
-{2968823,3909347,3909635,0.133741935483871,0.148071428571429},
-{2968824,3909635,3909952,0.140275862068966,0.150666666666667},
-{2968825,3909952,3910284,0.13501935483871,0.13952},
-{2968826,3910284,3910681,0.1366,0.155441379310345},
-{2968827,3913037,3914135,0.511777777777778,0.511777777777778},
-{2968828,3912671,3913037,0.20517,0.170975},
-{2968829,3912671,3912329,0.132558620689655,0.142377777777778},
-{2968830,3912035,3912329,0.134442857142857,0.12548},
-{2968831,3911730,3912035,0.120476470588235,0.120476470588235},
-{2968832,3911282,3911730,0.313828571428571,0.313828571428571},
-{2968833,3907970,3908381,0.223275,0.243572727272727},
-{2968834,3907647,3907970,0.13528,0.156092307692308},
-{2968835,3907365,3907647,0.147857142857143,0.147857142857143},
-{2968836,3907032,3907365,0.143441379310345,0.143441379310345},
-{2968837,3906727,3907032,0.13508,0.150088888888889},
-{2968838,3906356,3906727,0.223753846153846,0.252939130434783},
-{2968839,3896306,3896690,0.19886,0.180781818181818},
-{2968840,3897796,3898020,0.215933333333333,0.19434},
-{2968841,3896012,3896306,0.1839,0.169753846153846},
-{2968842,3897301,3897796,0.385736842105263,0.333136363636364},
-{2968843,3896690,3897301,0.417707142857143,0.417707142857143},
-{2968844,3896588,3896764,0.148827272727273,0.148827272727273},
-{2968845,3893671,3893620,0.101853658536585,0.1044},
-{2968846,3893620,3893574,0.0974634146341463,0.0999},
-{2968847,3893675,3893941,0.152711111111111,0.152711111111111},
-{2968848,3893941,3894240,0.187852173913043,0.187852173913043},
-{2968849,3894240,3894826,0.280778571428571,0.357354545454545},
-{2968850,3894564,3894826,1000000,0.291438461538462},
-{2968851,3894261,3894564,0.394766666666667,0.322990909090909},
-{2968852,3894261,3894120,0.19415,0.15532},
-{2968853,3903984,3904528,0.26088,0.2038125},
-{2968854,3903386,3903984,0.259862068965517,0.215314285714286},
-{2968855,3902932,3903386,0.205944,0.234027272727273},
-{2969718,3879276,3879251,1000000,0.0742434782608696},
-{2969866,3880338,3880408,1000000,1000000},
-{2969867,3883377,3883596,0.0812896551724138,0.0714363636363636},
-{2969868,3882411,3882066,0.336494117647059,0.346690909090909},
-{2969869,3881523,3881869,0.154777777777778,0.144103448275862},
-{2969870,3881094,3881523,0.217178571428571,0.196161290322581},
-{2969871,3880864,3881094,0.1077,0.111688888888889},
-{2969872,3880424,3880864,0.240771428571429,0.232468965517241},
-{2969873,3880099,3880424,0.1874,0.14055},
-{2969874,3879648,3880099,0.4149,0.393063157894737},
-{2969875,3879281,3879648,0.260894117647059,0.3168},
-{2969876,3878359,3878770,1000000,1000000},
-{2969877,3878359,3877929,1000000,1000000},
-{2969878,3879716,3878777,0.471052173913043,0.471052173913043},
-{2969879,3880144,3879716,0.1882875,0.215185714285714},
-{2969880,3880576,3880144,0.27549,0.289989473684211},
-{2969881,3881862,3881483,0.158136,0.146422222222222},
-{2969882,3882097,3881862,0.0971032258064516,0.0885352941176471},
-{2969883,3882458,3882097,0.152420689655172,0.130005882352941},
-{2969884,3882959,3882458,0.198711111111111,0.173070967741935},
-{2969885,3883124,3882959,0.072675,0.069768},
-{2969886,3883542,3883480,0.388407692307692,0.360664285714286},
-{2969887,3883642,3883542,1.1031,1.00281818181818},
-{2969888,3879599,3878491,0.45703125,0.504310344827586},
-{2969889,3878491,3878082,0.1347,0.149666666666667},
-{2969890,3878082,3877685,0.1344375,0.1344375},
-{2969891,3883058,3882382,1000000,0.38661},
-{2969892,3881570,3881418,0.0834857142857143,0.070128},
-{2969893,3881577,3881418,0.191423076923077,0.216391304347826},
-{2969894,3882066,3881577,0.430905,0.465843243243243},
-{2969895,3881577,3881229,0.187915384615385,0.212426086956522},
-{2969896,3881229,3880868,0.14295,0.155945454545455},
-{2969897,3880868,3880326,0.29412,0.29412},
-{2969898,3880135,3880326,0.1649,0.1649},
-{2969899,3880135,3879933,0.156463636363636,0.149660869565217},
-{2969900,3879792,3879933,0.115546153846154,0.107292857142857},
-{2969901,3879792,3879636,0.111381818181818,0.116685714285714},
-{2969902,3880099,3879864,0.240023076923077,0.189109090909091},
-{2969903,3879636,3879864,0.21762,0.225124137931035},
-{2969904,3879636,3879413,0.185222222222222,0.151545454545455},
-{2969905,3881198,3879079,0.918145454545455,0.891141176470588},
-{2969906,3879858,3880122,0.191090322580645,0.211564285714286},
-{2969907,3879496,3880122,0.434422222222222,0.404462068965517},
-{2969908,3879221,3879496,0.183736363636364,0.155469230769231},
-{2969909,3878885,3879221,0.203171428571429,0.147124137931034},
-{2969910,3877880,3877929,1000000,1000000},
-{2969911,3878357,3878148,0.2532,0.2321},
-{2969912,3878357,3878885,0.603923076923077,0.560785714285714},
-{2969913,3882537,3881996,0.21855652173913,0.21855652173913},
-{2969914,3884598,3885203,1000000,0.19340625},
-{2969915,3884655,3885262,0.41244,1000000},
-{2969916,3885203,3885724,1000000,0.270542857142857},
-{2969917,3885724,3886178,0.535725,0.13393125},
-{2969918,3886178,3886327,0.074625,0.1791},
-{2969919,3886327,3887318,0.420235714285714,0.405744827586207},
-{2969920,3886220,3886178,0.204276923076923,0.189685714285714},
-{2969921,3886228,3886220,0.0952411764705882,0.0981272727272727},
-{2969922,3885262,3885789,0.219853846153846,1000000},
-{2969923,3885789,3886228,0.1941,1000000},
-{2969924,3886248,3886228,0.194089655172414,0.160817142857143},
-{2969925,3886299,3886248,0.195446511627907,0.191004545454545},
-{2969926,3886300,3886299,0.0471627906976744,0.0460909090909091},
-{2969927,3886315,3886300,0.0618923076923077,0.0652378378378378},
-{2969928,3886331,3886315,0.115114285714286,0.16116},
-{2969929,3891023,3891004,0.27788,0.252618181818182},
-{2969930,3890236,3890739,0.244157142857143,0.244157142857143},
-{2969931,3889299,3889862,0.209116981132075,0.213138461538462},
-{2969932,3888751,3889299,0.221826666666667,0.221826666666667},
-{2969933,3890129,3890134,0.117566666666667,0.0920086956521739},
-{2969934,3889204,3890129,0.299707692307692,0.307594736842105},
-{2969935,3887418,3887360,0.29511724137931,0.28528},
-{2969936,3887418,3887443,0.68358,0.68358},
-{2969937,3887360,3887318,0.264716129032258,0.264716129032258},
-{2969938,3887318,3889862,0.751447058823529,0.774218181818182},
-{2969939,3887318,3887281,0.2486625,0.274386206896552},
-{2969940,3887281,3887250,0.224935714285714,0.217179310344828},
-{2969941,3886178,3886134,0.176413043478261,0.197926829268293},
-{2969942,3887250,3887222,0.329464285714286,0.318103448275862},
-{2969943,3888592,3889274,0.152468181818182,0.159728571428571},
-{2969944,3889274,3889874,0.154618604651163,0.141459574468085},
-{2969945,3889874,3890438,0.169275,0.15746511627907},
-{2969946,3890438,3891004,0.264096,0.16506},
-{2969947,3891004,3890945,0.247072340425532,0.297753846153846},
-{2969948,3890945,3890909,0.389982352941177,0.348931578947368},
-{2969949,3888531,3888445,0.44108,0.44108},
-{2969950,3888564,3888531,0.135276923076923,0.140688},
-{2969951,3888568,3888564,0.123514285714286,0.13509375},
-{2969952,3888592,3888568,0.164425,0.171573913043478},
-{2969953,3887222,3887202,0.151355555555556,0.157176923076923},
-{2969954,3887202,3887171,0.1158,0.1158},
-{2969955,3887171,3887155,0.125355555555556,0.116710344827586},
-{2969956,3887155,3887079,0.453972413793103,0.424683870967742},
-{2969957,3885978,3885918,0.177951219512195,0.169674418604651},
-{2969958,3885918,3885878,0.2786,0.18283125},
-{2969959,3886472,3886649,0.0727714285714286,0.10188},
-{2969960,3886649,3886998,0.148613793103448,0.165761538461538},
-{2969961,3887079,3886998,0.539781818181818,0.55665},
-{2969962,3886998,3887522,0.189765517241379,0.220128},
-{2969963,3887522,3887661,0.0571363636363636,0.052375},
-{2969964,3887661,3888345,0.244444444444444,0.275},
-{2969965,3888445,3888345,0.574412903225806,0.5396},
-{2969966,3888345,3889018,0.237385714285714,0.27695},
-{2969967,3889018,3889650,0.239121428571429,0.247977777777778},
-{2969968,3890909,3890805,0.541254545454546,0.576174193548387},
-{2969969,3889650,3890225,0.22442,0.24045},
-{2969970,3890225,3890805,0.267456,0.290713043478261},
-{2969971,3890805,3891358,0.192891428571429,0.198564705882353},
-{2969972,3891358,3891891,0.156385714285714,0.164205},
-{2969973,3891891,3892403,0.1479,0.158721951219512},
-{2969974,3892403,3892807,0.0961404255319149,0.107585714285714},
-{2969975,3892807,3893007,0.0481953488372093,0.0481953488372093},
-{2969976,3893007,3893445,0.172697142857143,0.163362162162162},
-{2969977,3891891,3891830,0.654533333333333,0.654533333333333},
-{2969978,3890805,3890757,0.413109677419355,0.42688},
-{2969979,3885978,3886582,0.258222222222222,0.27888},
-{2969980,3886582,3887155,0.236875862068966,0.208163636363636},
-{2969981,3888531,3889228,0.234041379310345,0.22624},
-{2969982,3889228,3889842,0.231537931034483,0.22382},
-{2969983,3889842,3890375,0.2714,0.191576470588235},
-{2969984,3890375,3890945,0.268296,0.23955},
-{2969985,3888345,3888305,0.391581818181818,0.410228571428571},
-{2969986,3888305,3888290,0.1692,0.16215},
-{2969987,3888290,3888205,0.275424,0.222116129032258},
-{2969988,3888290,3888912,0.22995,0.22995},
-{2969989,3888912,3889527,0.209246511627907,0.22494},
-{2969990,3889527,3889639,0.05738,0.0555290322580645},
-{2969991,3889639,3890157,0.232323529411765,0.24684375},
-{2969992,3890157,3890757,0.265062857142857,0.250735135135135},
-{2969993,3890757,3890989,0.126144827586207,0.1407},
-{2969994,3890989,3891304,0.156951724137931,0.15172},
-{2969995,3891304,3891830,0.2376,0.245264516129032},
-{2969996,3891830,3892344,0.22455,0.1996},
-{2969997,3892344,3892928,0.198383333333333,0.193021621621622},
-{2969998,3892928,3893376,0.180113513513513,0.185116666666667},
-{2969999,3890757,3890925,0.171066666666667,0.19245},
-{2970000,3890925,3891204,0.160781818181818,0.151594285714286},
-{2970001,3891204,3891638,0.1503,0.154594285714286},
-{2970002,3891638,3891782,0.0669375,0.0738620689655173},
-{2970003,3891782,3892178,0.254509090909091,0.239965714285714},
-{2970004,3893376,3894211,0.386763636363636,0.344951351351351},
-{2970005,3893376,3893198,0.177730434782609,0.177730434782609},
-{2970006,3893198,3893334,0.1119,0.122072727272727},
-{2970007,3892684,3893476,0.324270967741935,0.3141375},
-{2970008,3893334,3893476,0.122723076923077,0.113957142857143},
-{2970009,3893476,3893604,0.0961862068965517,0.0774833333333333},
-{2970010,3893604,3894214,0.246980487804878,0.235493023255814},
-{2970011,3894214,3894879,0.345531818181818,0.353567441860465},
-{2970012,3894879,3895046,0.11335,0.160023529411765},
-{2970013,3895046,3895688,0.445617391304348,0.465872727272727},
-{2970014,3894879,3895069,0.190542857142857,0.20840625},
-{2970015,3895069,3895171,0.0711,0.0690685714285714},
-{2970016,3895171,3895444,0.245455813953488,0.277752631578947},
-{2970017,3895444,3895490,0.02922,0.0324666666666667},
-{2970018,3895490,3895786,0.16992,0.196061538461538},
-{2970019,3895786,3895888,0.0928,0.0954514285714286},
-{2970020,3895888,3896205,0.206106976744186,0.260664705882353},
-{2970021,3896205,3896238,0.0365513513513513,0.0466344827586207},
-{2970022,3896238,3896505,0.421634482758621,0.509475},
-{2970023,3896505,3896733,0.28276875,0.323164285714286},
-{2970024,3896733,3896850,0.112781818181818,0.11630625},
-{2970025,3896850,3896728,0.15770625,0.174020689655172},
-{2970026,3896728,3897374,0.355752,0.355752},
-{2970027,3897374,3897738,0.20225,0.21104347826087},
-{2970028,3896728,3896645,0.06826875,0.0809111111111111},
-{2970029,3896645,3896537,0.106128,0.0914896551724138},
-{2970030,3896537,3896870,0.3196,0.308185714285714},
-{2970031,3896870,3897077,0.152727272727273,0.186666666666667},
-{2970032,3897077,3897130,0.0360333333333333,0.0498923076923077},
-{2970033,3897130,3897586,0.31995,0.31995},
-{2970034,3898505,3898941,0.17265,0.156954545454545},
-{2970035,3897941,3898505,0.268447058823529,0.260777142857143},
-{2970036,3897849,3897941,0.0461823529411765,0.0461823529411765},
-{2970037,3897586,3897849,0.334933333333333,0.334933333333333},
-{2970038,3895545,3895898,0.26555,0.26555},
-{2970039,3896106,3895898,0.277278260869565,0.2362},
-{2970040,3896163,3896106,0.11781,0.094248},
-{2970041,3895968,3896505,0.377972727272727,0.41577},
-{2970042,3895261,3895968,0.77736,0.728775},
-{2970043,3894727,3895261,0.551152941176471,0.5856},
-{2970044,3894379,3894727,0.162581818181818,0.173070967741935},
-{2970045,3894085,3894379,0.120405405405405,0.120405405405405},
-{2970046,3893772,3894085,0.137866666666667,0.127261538461538},
-{2970047,3893418,3893772,0.20385,0.2114},
-{2970048,3892532,3892803,0.0915405405405405,0.0915405405405405},
-{2970049,3892803,3893166,0.146777142857143,0.12529756097561},
-{2970050,3893166,3893662,0.195536842105263,0.190523076923077},
-{2970051,3893662,3893867,0.0966727272727273,0.102909677419355},
-{2970052,3894406,3894754,0.262988571428571,0.296922580645161},
-{2970053,3894754,3894970,0.15934,0.199175},
-{2970054,3894970,3895572,0.4611,0.4611},
-{2970055,3895572,3896205,0.50634,0.50634},
-{2970056,3895171,3895698,0.341911111111111,0.341911111111111},
-{2970057,3895698,3896556,0.721088888888889,0.721088888888889},
-{2970058,3885950,3885481,0.192109090909091,0.18784},
-{2970059,3885481,3885196,0.113642553191489,0.106824},
-{2970060,3885196,3885004,0.0714666666666667,0.0684255319148936},
-{2970061,3885004,3884726,0.212577777777778,0.163988571428571},
-{2970062,3887136,3886570,0.271375609756098,0.337163636363636},
-{2970063,3886570,3886326,0.0948941176470588,0.0948941176470588},
-{2970064,3886326,3885900,0.35796,0.193491891891892},
-{2970065,3885619,3885348,0.0922212765957447,0.09632},
-{2970066,3885348,3885082,0.0888893617021276,0.0888893617021276},
-{2970067,3885082,3884847,0.0873652173913043,0.0855063829787234},
-{2970068,3884847,3884767,0.0228367346938776,0.0228367346938776},
-{2970069,3884767,3884576,0.062475,0.062475},
-{2970070,3884576,3884431,0.0520212765957447,0.0531521739130435},
-{2970071,3884431,3884324,0.04112,0.0420545454545455},
-{2970072,3884324,3884167,0.062,0.062},
-{2970073,3884167,3883984,0.129626086956522,0.124225},
-{2970074,3881308,3881467,0.120052173913044,0.102266666666667},
-{2970075,3881467,3881755,0.162664285714286,0.182184},
-{2970076,3881755,3881946,0.134048275862069,0.1254},
-{2970077,3881946,3882037,0.0496457142857143,0.0526545454545455},
-{2970078,3882037,3882269,0.1376,0.1376},
-{2970079,3882269,3882504,0.123216666666667,0.13861875},
-{2970080,3883984,3883663,0.136852941176471,0.23265},
-{2970081,3883663,3883298,0.0945,0.0966},
-{2970082,3883298,3882780,0.142995918367347,0.14908085106383},
-{2970083,3882504,3882780,0.2013,0.210052173913043},
-{2970084,3882780,3882474,0.0794235294117647,0.082665306122449},
-{2970085,3882474,3882194,0.087075,0.0908608695652174},
-{2970086,3882194,3881933,0.146586206896552,0.128818181818182},
-{2970087,3882780,3883306,0.48258947368421,1.0188},
-{2970088,3883306,3883555,0.14296,0.134025},
-{2970089,3883555,3883794,0.2356,0.163107692307692},
-{2970090,3881346,3881258,1000000,0.119792307692308},
-{2970091,3881708,3881346,0.303135483870968,0.268491428571429},
-{2970092,3881755,3881708,0.0981,0.102771428571429},
-{2970093,3880751,3880916,0.0939352941176471,0.118288888888889},
-{2970094,3880916,3881174,0.1746,0.161169230769231},
-{2970095,3881174,3881258,0.0822,0.06028},
-{2970096,3881258,3880910,1000000,0.406176923076923},
-{2970097,3880910,3880718,1000000,0.203142857142857},
-{2970098,3881258,3881406,0.0940285714285714,0.0731333333333333},
-{2970099,3881406,3881537,0.0679333333333333,0.06114},
-{2970100,3881537,3881675,0.05163,0.0529538461538462},
-{2970101,3881675,3881933,0.128708108108108,0.15361935483871},
-{2970102,3880910,3881138,1000000,0.0929142857142857},
-{2970103,3881138,3881740,1000000,0.35124},
-{2970104,3881740,3882277,0.249062068965517,0.249062068965517},
-{2970105,3881933,3882419,0.287664705882353,0.250784615384615},
-{2970106,3882419,3882277,0.178928571428571,1000000},
-{2970107,3879861,3880159,0.13775625,0.163266666666667},
-{2970108,3880159,3880396,0.135325,0.147627272727273},
-{2970109,3880396,3880718,0.164511111111111,0.164511111111111},
-{2970110,3885082,3886104,0.532984615384615,0.43305},
-{2970111,3887027,3886104,0.345171428571429,0.439309090909091},
-{2970112,3886308,3885959,0.188353846153846,0.1530375},
-{2970113,3886547,3886308,0.0928909090909091,0.0908266666666667},
-{2970114,3886804,3886547,0.105468292682927,0.102957142857143},
-{2970115,3887027,3886804,0.154292307692308,0.154292307692308},
-{2970116,3887262,3887027,0.147346153846154,0.15324},
-{2970117,3887488,3887262,0.0894545454545454,0.0915348837209302},
-{2970118,3887761,3887488,0.08484,0.0829956521739131},
-{2970119,3888093,3887761,0.14728,0.152358620689655},
-{2970120,3888367,3888093,0.154272,1000000},
-{2970121,3888567,3888367,0.0663209302325582,1000000},
-{2970122,3888607,3888567,0.0150510638297872,1000000},
-{2970123,3888888,3888607,0.0824869565217391,1000000},
-{2970124,3889065,3888888,0.05564,1000000},
-{2970125,3889128,3889065,0.0187142857142857,1000000},
-{2970126,3889378,3889128,0.123522580645161,1000000},
-{2970127,3887027,3887505,0.217432258064516,0.177378947368421},
-{2970128,3887505,3887662,0.0426666666666667,0.0417391304347826},
-{2970129,3887662,3888167,0.16032,0.142506666666667},
-{2970130,3889086,3888635,1000000,0.198235714285714},
-{2970131,3888635,3888273,0.162642857142857,0.162642857142857},
-{2970132,3888273,3888167,0.0475111111111111,0.0475111111111111},
-{2970133,3888167,3888493,0.187155,0.197005263157895},
-{2970134,3887501,3887173,0.25794,0.25794},
-{2970135,3887843,3887501,0.20277,0.20277},
-{2970136,3888144,3887843,0.1591,0.14319},
-{2970137,3888493,3888144,0.198733333333333,0.23848},
-{2970138,3888493,3889130,0.3253,0.285629268292683},
-{2970139,3889130,3889467,0.14835,0.184158620689655},
-{2970140,3888911,3889467,0.232968,0.232968},
-{2970141,3888911,3888519,0.161292857142857,0.155731034482759},
-{2970142,3888519,3888384,0.0795545454545455,0.0648222222222222},
-{2970143,3880396,3880212,0.240688888888889,0.240688888888889},
-{2970144,3880212,3880301,0.06924,0.06924},
-{2970145,3880301,3880476,0.12036,0.1062},
-{2970146,3880476,3880701,0.160671428571429,0.1405875},
-{2970147,3880701,3880929,0.143088888888889,0.143088888888889},
-{2970148,3881740,3881464,0.228664285714286,0.266775},
-{2970149,3881464,3881343,0.1296,0.145152},
-{2970150,3881343,3881162,0.312947368421053,0.258521739130435},
-{2970151,3880929,3881162,0.11635,0.135116129032258},
-{2970152,3881162,3881511,0.24015,0.280175},
-{2970153,3881102,3881387,0.0904,0.0853777777777778},
-{2970154,3878208,3879752,0.707066666666667,0.707066666666667},
-{2970155,3881031,3881102,0.0262415094339623,0.0252872727272727},
-{2970156,3880421,3881031,0.206434615384615,0.198788888888889},
-{2970157,3880222,3880421,0.0714857142857143,0.070056},
-{2970158,3880222,3879963,0.211382142857143,0.219211111111111},
-{2970159,3883839,3884819,0.38787,0.44328},
-{2970160,3884108,3884886,0.288012765957447,0.300813333333333},
-{2970161,3886260,3885815,1000000,0.403088888888889},
-{2970162,3884886,3885540,0.24134693877551,0.24134693877551},
-{2970163,3885815,3885540,1000000,0.8443875},
-{2970164,3885540,3886197,0.230244,0.250265217391304},
-{2970165,3886197,3886465,0.1509,0.1509},
-{2970166,3889624,3889174,0.135243243243243,0.119142857142857},
-{2970167,3890191,3889850,0.164424,0.12845625},
-{2970168,3889850,3889886,0.159,0.159},
-{2970169,3889356,3889746,0.167723076923077,0.1817},
-{2970170,3889746,3889902,0.097551724137931,0.08840625},
-{2970171,3890490,3889902,0.245883333333333,0.226969230769231},
-{2970172,3890745,3890490,0.073305,0.0751846153846154},
-{2970173,3891243,3891525,0.25269375,0.25269375},
-{2970174,3891525,3891558,0.165286956521739,0.12672},
-{2970175,3891558,3891584,0.0835,0.0607272727272727},
-{2970176,3891584,3891632,0.107574193548387,0.0980823529411765},
-{2970177,3891632,3891647,0.093096,0.0705272727272727},
-{2970178,3891647,3891888,0.169444444444444,0.157758620689655},
-{2970179,3891888,3891945,0.124130769230769,0.119533333333333},
-{2970180,3891945,3891997,0.1756,0.15365},
-{2970181,3891779,3891477,0.193885714285714,0.20358},
-{2970182,3891997,3891779,0.123075,0.123075},
-{2970183,3891997,3892204,0.214539130434783,0.214539130434783},
-{2970184,3893368,3893126,0.185136,0.185136},
-{2970185,3893126,3892822,0.174312,1000000},
-{2970186,3892822,3892651,0.0597375,1000000},
-{2970187,3892651,3892462,0.0874457142857143,1000000},
-{2970188,3892462,3892204,0.15384,1000000},
-{2970189,3892204,3892657,0.292916129032258,0.2837625},
-{2970190,3892657,3892414,0.1542,0.140791304347826},
-{2970191,3892414,3892133,0.152975,0.131121428571429},
-{2970192,3892133,3891835,0.188914285714286,0.1653},
-{2970193,3891835,3891542,0.145022222222222,0.145022222222222},
-{2970194,3891542,3891236,0.146044444444444,0.146044444444444},
-{2970195,3892657,3893075,0.34746,0.32574375},
-{2970196,3893075,3893303,0.146035714285714,0.1363},
-{2970197,3893303,3893868,0.338708571428571,0.39516},
-{2970198,3892546,3892256,0.147844444444444,0.147844444444444},
-{2970199,3892886,3892546,0.151888888888889,0.151888888888889},
-{2970200,3893186,3892886,1000000,0.156555555555556},
-{2970201,3893523,3893186,1000000,0.202915384615385},
-{2970202,3893868,3893523,1000000,0.240048},
-{2970203,3893868,3893985,0.130928571428571,0.14664},
-{2970204,3893985,3894017,0.0851,0.07659},
-{2970205,3894237,3893868,1000000,0.248973913043478},
-{2970206,3894237,3894316,0.07089,0.07089},
-{2970207,3894634,3894316,0.248652631578947,0.23622},
-{2970208,3894017,3894274,0.319311111111111,0.319311111111111},
-{2970209,3894274,3894493,0.196911111111111,0.196911111111111},
-{2970210,3894493,3894860,0.384044444444444,0.384044444444444},
-{2970211,3894860,3895160,0.223556756756757,0.223556756756757},
-{2970212,3895160,3895570,0.301381818181818,0.292517647058823},
-{2970213,3895570,3895859,0.2198625,0.23452},
-{2970214,3895859,3896118,0.1306,0.144347368421053},
-{2970215,3896118,3896399,0.148843902439024,0.160594736842105},
-{2970216,3896399,3896635,0.110780487804878,0.137636363636364},
-{2970217,3896635,3897400,0.252223255813953,0.28541052631579},
-{2970218,3897400,3897707,0.0919826086956522,0.117533333333333},
-{2970219,3897707,3898044,0.110289473684211,0.155222222222222},
-{2970220,3898044,3898420,0.197236363636364,0.1808},
-{2970221,3893674,3893429,0.19743,0.19743},
-{2970222,3893914,3893674,0.228966666666667,0.228966666666667},
-{2970223,3894139,3893914,0.1652,0.1652},
-{2970224,3894377,3894139,0.158209090909091,0.145025},
-{2970225,3894627,3894377,0.155425,0.155425},
-{2970226,3894860,3894627,0.1298,0.1298},
-{2970227,3895113,3894860,0.18276,0.18276},
-{2970228,3895252,3895113,0.12954,0.12954},
-{2970229,3895438,3895252,0.13449,0.13449},
-{2970230,3895438,3895562,0.12336,0.12336},
-{2970231,3896033,3895562,0.231511111111111,0.231511111111111},
-{2970232,3896262,3896033,0.103933333333333,0.103933333333333},
-{2970233,3896056,3896227,0.23418947368421,0.23418947368421},
-{2970234,3896301,3896801,0.40284,0.40284},
-{2970235,3896801,3897289,0.28695,0.28695},
-{2970236,3897289,3897551,0.17223,0.17223},
-{2970237,3897551,3897849,0.18447,0.18447},
-{2970238,3886098,3886307,0.108828571428571,0.11427},
-{2970239,3886307,3886648,0.1415,0.146379310344828},
-{2970240,3886648,3887250,0.35385,0.28308},
-{2970241,3887250,3888650,0.525346153846154,0.4553},
-{2970242,3888650,3888592,0.3888,0.3888},
-{2970243,3888650,3889927,0.67341,0.612190909090909},
-{2970244,3889927,3890085,0.0824608695652174,0.0654},
-{2970245,3890085,3890476,0.138441176470588,0.134485714285714},
-{2970246,3890476,3890739,0.120264,0.0969870967741936},
-{2970247,3891004,3891553,0.22016,0.287165217391304},
-{2970248,3892477,3893275,0.886028571428571,0.918844444444445},
-{2970249,3894869,3895010,0.178753846153846,0.105627272727273},
-{2970250,3894495,3894869,0.319046153846154,0.270495652173913},
-{2970251,3894302,3894495,0.149483333333333,0.116986956521739},
-{2970252,3894124,3894302,0.142538461538462,0.132357142857143},
-{2970253,3893624,3894124,0.409923076923077,0.340148936170213},
-{2970254,3893275,3893624,0.4107,0.381364285714286},
-{2970255,3861059,3861176,0.208168421052632,0.183962790697674},
-{2970256,3861059,3860095,0.304305,0.347777142857143},
-{2970257,3859599,3860095,0.346454545454545,0.300868421052632},
-{2970258,3863969,3863413,0.607251428571429,0.625111764705882},
-{2970259,3860324,3860500,0.131323076923077,0.134778947368421},
-{2970260,3860324,3860325,0.0367741935483871,0.0316666666666667},
-{2970261,3860325,3860799,0.370524324324324,0.370524324324324},
-{2970279,3865839,3865258,0.157263157894737,0.153230769230769},
-{2970280,3866032,3865839,0.0514923076923077,0.0528473684210526},
-{2970281,3866155,3866032,0.0325833333333333,0.0308684210526316},
-{2970282,3866526,3866155,0.0819846153846154,0.0841421052631579},
-{2970283,3866949,3866526,0.102415384615385,0.11095},
-{2970284,3867546,3866949,0.162291891891892,0.171565714285714},
-{2970285,3867806,3867546,0.0826363636363636,0.0879677419354839},
-{2970286,3868503,3867806,0.191382857142857,0.186066666666667},
-{2970287,3868647,3868503,0.0478058823529412,0.0478058823529412},
-{2970288,3868879,3868647,0.0541297297297297,0.0589058823529412},
-{2970289,3869091,3868879,0.0587189189189189,0.06035},
-{2970290,3869577,3869091,0.131485714285714,0.127833333333333},
-{2970291,3869700,3869577,0.0339272727272727,0.0329294117647059},
-{2970292,3869832,3869700,0.0354514285714286,0.0376},
-{2970293,3870074,3869832,0.0651081081081081,0.0688285714285714},
-{2970294,3870227,3870074,0.0402514285714286,0.0414352941176471},
-{2970295,3870358,3870227,0.0388545454545455,0.04006875},
-{2970296,3870487,3870358,0.03898125,0.0366882352941176},
-{2970297,3871164,3870487,0.270792,0.270792},
-{2970298,3871164,3870999,0.229008,0.23855},
-{2970299,3870999,3870956,0.0756692307692308,0.06558},
-{2970300,3870956,3870977,0.0575357142857143,0.0519677419354839},
-{2970301,3870977,3870929,0.12984,0.12984},
-{2970302,3870929,3870893,0.136033333333333,0.12243},
-{2970303,3871269,3871164,0.116685714285714,0.12252},
-{2970304,3871337,3871269,0.0441103448275862,0.051168},
-{2970305,3871259,3871337,0.06556,0.0678206896551724},
-{2970306,3871106,3871259,0.125109677419355,0.117527272727273},
-{2970307,3871035,3871106,0.11472,0.106222222222222},
-{2970308,3871080,3871035,0.0751862068965517,0.0751862068965517},
-{2970309,3870909,3871080,0.32675625,0.34854},
-{2970310,3870909,3870894,0.0588260869565217,0.056375},
-{2970311,3870886,3870860,0.0772875,0.0562090909090909},
-{2970312,3870828,3870797,1000000,0.104353846153846},
-{2970313,3870797,3870915,1000000,0.251806451612903},
-{2970314,3870747,3870372,0.17346,0.192733333333333},
-{2970315,3870828,3870158,0.236330769230769,0.21945},
-{2970316,3870158,3869870,0.0704842105263158,0.0744},
-{2970317,3869870,3869018,0.2307,0.250474285714286},
-{2970318,3869018,3868901,0.203276470588235,0.246835714285714},
-{2970319,3868901,3868338,0.229765714285714,0.259412903225806},
-{2970320,3868338,3868131,0.0789666666666667,0.0861454545454546},
-{2970321,3868131,3867656,0.164929411764706,0.1752375},
-{2970322,3867656,3867443,0.103316129032258,0.0889666666666667},
-{2970323,3867008,3866642,0.111247058823529,0.1182},
-{2970324,3867443,3868516,0.487488888888889,0.487488888888889},
-{2970325,3870055,3869739,0.143830434782609,0.161370731707317},
-{2970326,3870228,3870055,0.0473632653061224,0.0504521739130435},
-{2970327,3869980,3869326,0.20262,0.217092857142857},
-{2970328,3870520,3870228,0.111234782608696,0.116290909090909},
-{2970329,3870597,3870520,0.0396648648648649,0.0407666666666667},
-{2970330,3871051,3870597,0.384394285714286,0.384394285714286},
-{2970331,3870984,3871051,0.258790909090909,0.237225},
-{2970332,3870915,3870984,0.49251,0.469057142857143},
-{2970333,3867807,3867566,0.0682054054054054,0.08412},
-{2970334,3866114,3864983,0.372116129032258,0.461424},
-{2970339,3861212,3860325,0.497225,0.426192857142857},
-{2970340,3864767,3864589,0.289338461538461,0.208966666666667},
-{2970341,3864538,3864139,0.326328,0.339925},
-{2970342,3864139,3863918,0.255311111111111,0.287225},
-{2970343,3863918,3863937,0.239635714285714,0.22366},
-{2970344,3863937,3864188,0.141309090909091,0.137152941176471},
-{2970345,3864188,3864540,0.170110344827586,0.182711111111111},
-{2970346,3864541,3864540,0.0411333333333333,0.0321913043478261},
-{2970347,3865724,3865619,0.0507642857142857,0.04738},
-{2970349,3859969,3858344,0.493066666666667,0.479740540540541},
-{2970352,3865495,3864314,0.569590909090909,0.50124},
-{2970353,3864996,3864314,0.389888888888889,0.42108},
-{2970355,3866155,3865763,0.648422222222222,0.648422222222222},
-{2970360,3872607,3871838,0.279878571428571,0.24489375},
-{2970361,3871179,3870637,0.193451612903226,0.206793103448276},
-{2970362,3870637,3869752,0.353825,0.303278571428571},
-{2970363,3869782,3869752,0.02175,0.024},
-{2970364,3869984,3869782,0.139585714285714,0.156336},
-{2970365,3868749,3868607,0.162675,1000000},
-{2970366,3869782,3869185,0.202244444444444,0.188296551724138},
-{2970367,3869185,3868607,0.22692,0.195620689655172},
-{2970368,3867753,3867961,0.356266666666667,0.3006},
-{2970369,3867571,3867753,0.127625806451613,0.104115789473684},
-{2970370,3867215,3867571,0.17825625,0.167770588235294},
-{2970371,3868607,3867460,0.467856,0.48735},
-{2970372,3867460,3867215,0.131929411764706,0.140175},
-{2970373,3866851,3867215,0.284927272727273,0.261183333333333},
-{2970374,3866786,3866851,0.19261935483871,0.180945454545455},
-{2970375,3869752,3869539,0.110902702702703,0.113983333333333},
-{2970376,3869539,3869168,0.198347368421053,0.221682352941176},
-{2970377,3869168,3869015,0.099075,0.117422222222222},
-{2970378,3869015,3868807,0.145711111111111,0.145711111111111},
-{2970379,3868479,3868199,0.087225,0.09304},
-{2970380,3866830,3866786,0.1441,0.123514285714286},
-{2970381,3866889,3866830,0.124761290322581,0.1172},
-{2970382,3868199,3867868,0.105662068965517,0.117853846153846},
-{2970383,3867868,3866889,0.517452631578947,0.517452631578947},
-{2970384,3867023,3866889,0.121928571428571,0.103454545454545},
-{2970385,3867194,3867023,0.16594,0.150854545454545},
-{2970386,3867591,3867194,0.2826375,0.251233333333333},
-{2970387,3868526,3867591,0.532148571428572,0.517366666666667},
-{2970388,3866545,3866889,0.1768,0.1326},
-{2970389,3866545,3866397,0.0429942857142857,0.0396},
-{2970390,3866397,3865893,0.1690875,0.1690875},
-{2970391,3865893,3865452,0.1395,0.1395},
-{2970392,3865452,3865057,0.107468571428571,0.113981818181818},
-{2970393,3865057,3864716,0.109890909090909,0.113325},
-{2970394,3864716,3864446,0.101047058823529,0.104109090909091},
-{2970399,3865099,3864494,0.1825,0.1825},
-{2970400,3865640,3865099,0.131414634146341,0.138153846153846},
-{2970401,3865814,3865640,0.05295,0.0498352941176471},
-{2970402,3866198,3865814,0.125322580645161,0.114264705882353},
-{2970403,3866786,3866198,0.1787,0.191464285714286},
-{2970404,3868374,3866786,0.52592,0.478109090909091},
-{2970405,3868808,3868374,0.144022222222222,0.117836363636364},
-{2970406,3869168,3868808,0.126724137931034,0.136111111111111},
-{2970407,3867194,3866684,0.188844444444444,0.175820689655172},
-{2970408,3866684,3866431,0.07160625,0.0587538461538461},
-{2970409,3866431,3865893,0.181510344827586,0.146216666666667},
-{2970416,3873010,3872699,0.215689655172414,0.164605263157895},
-{2970417,3872699,3868568,1.22346486486486,0.905364},
-{2970418,3868434,3868568,0.157118181818182,0.2469},
-{2970419,3868568,3869193,0.395769230769231,0.42875},
-{2970440,3865099,3865224,0.162955555555556,0.162955555555556},
-{2970441,3865224,3865452,0.2396,0.2396},
-{2970533,3863803,3864448,0.409666666666667,0.409666666666667},
-{2970534,3865134,3864727,0.157361538461538,0.13638},
-{2970535,3866435,3866404,0.133475,0.145609090909091},
-{2970536,3866403,3866435,0.0683076923076923,0.0986666666666667},
-{2970537,3866322,3866403,0.186848275862069,0.193521428571429},
-{2970538,3866263,3866322,0.13982,0.135309677419355},
-{2970539,3866241,3866237,0.0258666666666667,0.0273882352941176},
-{2970540,3866874,3866241,0.674424,0.674424},
-{2970541,3865999,3865673,0.1222,0.1222},
-{2970542,3867462,3866874,0.435806896551724,0.435806896551724},
-{2970543,3867810,3868242,0.371528571428571,0.371528571428571},
-{2970544,3869307,3868993,0.151172727272727,0.184766666666667},
-{2970545,3869732,3869307,0.164781818181818,0.213247058823529},
-{2970546,3851828,3850176,1.1109,1.05243157894737},
-{2970547,3867305,3865081,0.68859375,0.595540540540541},
-{2970548,3867323,3867546,0.3144,0.249351724137931},
-{2970549,3867305,3867323,0.215918181818182,0.1827},
-{2970553,3871432,3870793,0.452068965517241,0.452068965517241},
-{2970554,3870793,3869596,0.408415384615385,0.424752},
-{2970555,3869596,3869420,0.0550846153846154,0.0682},
-{2970556,3869420,3868737,0.321771428571429,0.28155},
-{2970557,3868204,3867743,0.234833333333333,0.183782608695652},
-{2970558,3867868,3867799,0.097632,0.0938769230769231},
-{2970571,3900532,3900869,0.116,0.12227027027027},
-{2970572,3900532,3901252,0.304905,0.530269565217391},
-{2970598,3919267,3919298,0.0243666666666667,0.01370625},
-{2970599,3915715,3916446,0.36958,0.36958},
-{2970600,3916164,3916446,0.19358,0.19358},
-{2970601,3916446,3917126,0.36084,0.341335135135135},
-{2970622,3922257,3921642,0.246454054054054,0.260537142857143},
-{2970623,3923320,3923398,0.0508411764705882,0.0454894736842105},
-{2970624,3923213,3923320,0.0656432432432432,0.0622769230769231},
-{2970625,3923123,3923213,0.0507076923076923,0.0482341463414634},
-{2970628,3915876,3916456,0.166214285714286,0.151760869565217},
-{2970629,3917627,3917411,0.0838333333333333,0.088764705882353},
-{2970630,3917009,3917268,0.0976428571428571,0.0932045454545454},
-{2970631,3915449,3915607,0.054612,0.0557265306122449},
-{2970632,3915307,3915449,0.047616,0.047616},
-{2970633,3915167,3915307,0.051132,0.051132},
-{2970634,3914787,3914876,0.0381,0.0398318181818182},
-{2970635,3911257,3911621,0.11714347826087,0.119746666666667},
-{2970636,3910815,3911257,0.135195348837209,0.138414285714286},
-{2970637,3909735,3910178,0.237125,0.237125},
-{2970638,3910178,3910629,0.277768421052632,1000000},
-{2970639,3906680,3906130,0.336066666666667,0.394513043478261},
-{2970640,3906968,3906680,0.125925,0.154984615384615},
-{2970641,3878213,3878768,0.27415,1000000},
-{2970642,3878768,3879090,0.278169230769231,1000000},
-{2970706,3858373,3858549,0.118220689655172,0.137136},
-{2970707,3857632,3857672,0.209541176470588,0.187484210526316},
-{2970708,3857561,3857672,0.0558315789473684,0.0624},
-{2970709,3900974,3900892,0.178851428571429,0.160507692307692},
-{2970803,3854095,3855301,0.624909090909091,0.542684210526316},
-{2970804,3855125,3854995,0.194494736842105,0.12318},
-{2970805,3855125,3855769,0.236632258064516,0.252951724137931},
-{2970806,3856756,3857311,0.20818,0.249816},
-{2970807,3856329,3856756,0.182129032258065,0.209111111111111},
-{2970808,3858235,3858217,0.06216,0.06216},
-{2970809,3859839,3858235,0.612582352941176,0.671864516129032},
-{2970810,3860987,3860294,0.197679069767442,0.207321951219512},
-{2970811,3861298,3860987,0.102673170731707,0.107938461538462},
-{2970813,3867378,3867848,0.4066,0.420620689655172},
-{2970815,3871853,3871954,0.154845283018868,1000000},
-{2970817,3852375,3851974,0.175311111111111,0.175311111111111},
-{2970819,3850298,3851212,0.40648,1000000},
-{2970820,3857906,3857994,0.0249571428571429,0.0283297297297297},
-{2970821,3857350,3857906,0.25089375,0.382314285714286},
-{2970822,3880183,3880224,1000000,0.0671111111111111},
-{2970823,3880096,3880183,1000000,0.173971428571429},
-{2970824,3877972,3878087,0.0854903225806452,1000000},
-{2970825,3853919,3853622,1000000,0.1932375},
-{2970826,3853919,3853476,0.155416666666667,1000000},
-{2970827,3854097,3853602,0.2019,0.179466666666667},
-{2970828,3854190,3854097,0.0302153846153846,0.0261866666666667},
-{2970829,3860587,3859896,0.339288,0.302935714285714},
-{2970833,3857131,3856553,0.130876595744681,0.133721739130435},
-{2970834,3857523,3857131,0.0859695652173913,0.0841404255319149},
-{2970835,3866886,3865845,0.282617647058824,0.266916666666667},
-{2970836,3870046,3870078,0.0372,1000000},
-{2970837,3870884,3870163,1000000,0.37753125},
-{2970838,3870163,3870421,0.0785636363636364,1000000},
-{2970841,3851809,3853104,1000000,0.6687},
-{2970842,3853104,3853345,0.186227586206897,0.186227586206897},
-{2970843,3856253,3856513,0.063855,0.05805},
-{2970844,3857106,3856513,0.152914285714286,0.149358139534884},
-{2970845,3856530,3856513,1000000,0.1720875},
-{2970846,3857364,3856639,0.604015384615385,0.604015384615385},
-{2970847,3857604,3857364,0.316275,0.316275},
-{2970848,3857806,3857604,0.4803,1000000},
-{2970849,3855023,3854777,0.1135875,0.1135875},
-{2970850,3855427,3855023,0.263502857142857,0.279472727272727},
-{2970851,3855427,3855274,0.283366666666667,0.25503},
-{2970852,3861821,3861618,0.2947,0.342232258064516},
-{2970853,3861618,3861454,0.171492857142857,0.200075},
-{2970854,3860056,3859722,0.287557894736842,0.27318},
-{2970855,3860780,3860056,0.324266666666667,0.324266666666667},
-{2970856,3861315,3860780,0.267792857142857,0.277711111111111},
-{2970857,3866780,3866320,1000000,0.2245},
-{2970858,3900071,3900312,0.099525,0.0925813953488372},
-{2970859,3913158,3913478,0.104342857142857,0.13695},
-{2970860,3910653,3911650,0.5986,1000000},
-{2970861,3900483,3901350,0.520392857142857,0.58284},
-{2970862,3898970,3899344,0.297366666666667,1000000},
-{2970863,3896260,3896348,0.0550421052631579,0.0581},
-{2970864,3896348,3896514,0.07494,0.0768615384615385},
-{2970865,3896348,3896824,1000000,0.449082352941176},
-{2970866,3905184,3905343,0.0727294117647059,0.0686888888888889},
-{2970867,3905144,3905184,0.0171576923076923,0.0162218181818182},
-{2970868,3904727,3905144,0.158270588235294,0.149477777777778},
-{2970869,3904650,3904727,0.0284117647058823,0.02898},
-{2970870,3899388,3899516,0.102694736842105,0.1084},
-{2970871,3899516,3899676,0.130342857142857,0.124418181818182},
-{2970872,3858073,3857806,0.141371428571429,0.134945454545455},
-{2970873,3857510,3858073,0.4346,0.451315384615385},
-{2970874,3857611,3857938,0.26145,0.20916},
-{2970875,3858708,3857938,0.46266,0.402313043478261},
-{2970876,3855460,3855274,0.166153846153846,0.166153846153846},
-{2970877,3855614,3855460,0.115933333333333,0.115933333333333},
-{2970878,3856063,3855946,0.183208695652174,0.183208695652174},
-{2970879,3853178,3853855,0.4847,0.440636363636364},
-{2970880,3853855,3853736,0.208773913043478,0.208773913043478},
-{2970881,3853140,3853178,0.769521428571429,0.695051612903226},
-{2970882,3852633,3852842,0.0951333333333333,0.0951333333333333},
-{2970883,3854610,3855084,0.222444444444444,0.222444444444444},
-{2970884,3855084,3855296,0.137525,0.132024},
-{2970885,3855660,3855950,0.151007142857143,0.151007142857143},
-{2970886,3850122,3850325,0.1374,1000000},
-{2970887,3850325,3851289,0.718335483870968,0.6748},
-{2970888,3851289,3851280,0.168854545454545,0.168854545454545},
-{2970889,3859155,3859226,0.1227,0.115482352941176},
-{2970890,3859761,3859226,0.310552941176471,0.391066666666667},
-{2970891,3861115,3860900,0.114726315789474,0.140632258064516},
-{2970892,3860609,3860367,0.168672727272727,0.206155555555556},
-{2970893,3860367,3860238,0.0692526315789474,0.0848903225806452},
-{2970894,3871260,3870393,0.243741176470588,0.236777142857143},
-{2970895,3871260,3871775,0.117569230769231,0.120663157894737},
-{2970896,3872938,3872982,0.0886846153846154,0.096075},
-{2970897,3854390,3853527,0.300324324324324,0.336727272727273},
-{2970922,3876026,3876145,1000000,0.057925},
-{2970923,3876475,3876735,1000000,0.105216},
-{2970924,3875559,3875622,0.179928,0.145103225806452},
-{2970925,3875527,3875559,0.16865,0.155676923076923},
-{2970926,3875552,3876024,1000000,0.227791304347826},
-{2970927,3876024,3876515,1000000,0.244690909090909},
-{2970928,3880268,3880021,1000000,0.2427},
-{2970929,3880451,3880268,1000000,0.159104347826087},
-{2970930,3881144,3881842,0.54024,0.284336842105263},
-{2970931,3881842,3881900,0.050825,0.0321},
-{2970932,3884456,3884083,1000000,0.2711},
-{2970933,3884857,3884456,1000000,0.309627272727273},
-{2970934,3885865,3885761,1000000,0.0668857142857143},
-{2970935,3886324,3885865,1000000,0.312218181818182},
-{2970936,3876834,3877112,0.108346153846154,0.0853636363636364},
-{2970937,3877112,3877323,0.0717483870967742,0.0654176470588235},
-{2970938,3888116,3888018,0.05244375,0.0987176470588235},
-{2970939,3888137,3888040,0.08742,0.0672461538461538},
-{2970940,3888137,3888897,0.255096774193548,0.292888888888889},
-{2970941,3887833,3888137,1000000,0.232058823529412},
-{2970942,3889486,3890290,0.3233,0.293909090909091},
-{2970943,3889189,3889486,0.0972857142857143,0.0896052631578947},
-{2970944,3888116,3889189,0.356729032258065,0.480808695652174},
-{2970945,3876426,3875891,1000000,0.323325},
-{2970946,3875487,3876341,0.252173333333333,0.263902325581395},
-{2970947,3876341,3876426,1000000,0.0668},
-{2970948,3873905,3874014,1000000,0.296014285714286},
-{2970949,3874184,3874239,1000000,0.093},
-{2970950,3874886,3875010,1000000,0.146544827586207},
-{2970951,3874833,3874886,1000000,0.0364909090909091},
-{2970952,3874300,3874259,0.015015,1000000},
-{2970953,3867302,3867598,0.244766666666667,0.259164705882353},
-{2970954,3868125,3868144,0.0576734693877551,0.0657209302325582},
-{2970955,3867408,3866862,0.428366666666667,1000000},
-{2970956,3866208,3866361,1000000,0.0604971428571429},
-{2970957,3866913,3866450,0.285275,0.273864},
-{2970958,3866405,3866450,0.02352,0.0267272727272727},
-{2970959,3866405,3866734,0.2676,1000000},
-{2970960,3867780,3867497,0.123868965517241,0.156182608695652},
-{2970961,3868140,3867995,0.1014,0.11492},
-{2970962,3871159,3871171,0.175957894736842,0.196658823529412},
-{2970963,3871171,3871313,1000000,0.274085714285714},
-{2971009,3857591,3857632,1000000,0.0629478260869565},
-{2971010,3857591,3858373,0.4932,1000000},
-{2971015,3872084,3871968,1000000,0.04160625},
-{2971016,3872346,3872084,1000000,0.197175},
-{2971017,3864481,3864854,0.244517647058824,0.159876923076923},
-{2971018,3864025,3864481,1000000,0.28262},
-{2971019,3864775,3864936,0.0626275862068966,1000000},
-{2971020,3864775,3864646,1000000,0.0512357142857143},
-{2971021,3864753,3864771,1000000,0.0250615384615385},
-{2971022,3864771,3864775,1000000,0.122030769230769},
-{2971023,3865105,3864817,1000000,0.26305},
-{2971024,3864817,3864850,1000000,0.02961},
-{2971025,3864817,3864013,0.371016,1000000},
-{2971026,3850325,3850060,0.165622222222222,0.178872},
-{2971030,3857491,3856530,0.5216,0.5216},
-{2971031,3859021,3858891,1000000,0.0971571428571429},
-{2971032,3857364,3858891,0.6971,1000000},
-{2971033,3858891,3857491,0.725328,0.725328},
-{2971034,3888225,3888215,0.13458,0.149533333333333},
-{2971035,3888807,3889047,0.1,0.0774193548387097},
-{2971036,3889047,3889418,0.169909090909091,0.128896551724138},
-{2971040,3900003,3899888,1000000,0.153416326530612},
-{2971041,3897605,3897504,0.0887625,1000000},
-{2971042,3897939,3899016,0.281517073170732,1000000},
-{2971043,3891401,3891728,0.140228571428571,0.13088},
-{2971044,3891728,3892080,0.334114285714286,1000000},
-{2971045,3891238,3891819,0.65649,0.354859459459459},
-{2971046,3891819,3891867,0.061,0.05124},
-{2971047,3893724,3893621,0.0877555555555556,0.057790243902439},
-{2971048,3900073,3900047,0.192829787234043,1000000},
-{2971049,3900234,3900232,1000000,0.0316875},
-{2971050,3894794,3895172,0.120829787234043,0.149447368421053},
-{2971051,3895172,3895550,0.13516,0.132221739130435},
-{2971052,3890417,3890879,0.135381818181818,0.141828571428571},
-{2971053,3900248,3899695,0.2502,0.255523404255319},
-{2971054,3899992,3900196,0.145453333333333,0.139263829787234},
-{2971055,3900196,3900277,0.0556851063829787,0.0534122448979592},
-{2971056,3900277,3900357,0.0564510638297872,0.0541469387755102},
-{2971057,3900357,3900423,0.0617739130434783,0.0579918367346939},
-{2971058,3900423,3900492,0.054404347826087,0.0510734693877551},
-{2971059,3900492,3900544,0.0572181818181818,0.05245},
-{2971060,3903308,3903688,0.170729032258065,0.182503448275862},
-{2971061,3903688,3904150,0.141972972972973,0.138236842105263},
-{2971062,3904150,3904530,0.138771428571429,0.142852941176471},
-{2971063,3901689,3902125,1000000,0.0930654545454545},
-{2971064,3902031,3902438,0.143886486486486,1000000},
-{2971065,3902438,3902551,1000000,0.065425},
-{2971066,3902438,3902685,0.11758125,1000000},
-{2971067,3902551,3902763,1000000,0.0764903225806452},
-{2971068,3902763,3902758,0.0532181818181818,0.05488125},
-{2971069,3902758,3902685,0.0476294117647059,0.0490727272727273},
-{2971070,3903051,3902763,0.435229411764706,0.422794285714286},
-{2971071,3904916,3905276,0.126923076923077,0.120731707317073},
-{2971072,3905276,3905700,0.125648780487805,0.12879},
-{2971073,3905700,3906139,0.184986206896552,0.173051612903226},
-{2971074,3912081,3912355,0.2341875,0.208166666666667},
-{2971075,3911283,3911027,0.187933333333333,0.22552},
-{2971076,3914181,3913602,0.37884,0.398778947368421},
-{2971077,3914312,3914181,0.0977,1000000},
-{2971078,3913591,3912686,0.498,0.842769230769231},
-{2971079,3912686,3912514,0.118235294117647,0.1005},
-{2971080,3914334,3914475,0.074328,0.0807913043478261},
-{2971081,3914475,3914695,0.18852,0.198442105263158},
-{2971082,3914695,3914808,0.103941176470588,0.0981666666666667},
-{2971083,3867780,3866886,0.2703,0.235646153846154},
-{2971084,3916456,3917117,0.226235294117647,0.187609756097561},
-{2971085,3916421,3916551,0.11648,0.069888},
-{2971086,3916115,3916421,0.164666666666667,0.164666666666667},
-{2971087,3916115,3916411,1000000,1000000},
-{2971088,3916411,3916456,0.0727578947368421,0.06912},
-{2971089,3915700,3916124,1000000,0.3643125},
-{2971090,3915544,3915700,1000000,0.3576},
-{2971091,3904863,3904814,0.214,0.24075},
-{2971092,3904814,3904813,0.210782608695652,0.167172413793103},
-{2971093,3918213,3918473,0.164378571428571,0.148470967741935},
-{2971094,3917899,3917989,0.0382829268292683,1000000},
-{2971095,3917724,3917899,0.0585906976744186,1000000},
-{2971096,3917536,3917724,0.0768558139534884,1000000},
-{2971097,3917489,3917536,0.0207409090909091,1000000},
-{2971098,3919117,3919288,0.0765483870967742,0.0697941176470588},
-{2971099,3919288,3919453,0.0678,0.06215},
-{2971100,3919453,3919625,0.0624166666666667,0.0624166666666667},
-{2971101,3919625,3919786,0.0660857142857143,0.0680294117647059},
-{2971102,3919396,3920091,0.59097,1000000},
-{2971103,3919209,3919396,0.204085714285714,0.28572},
-{2971104,3916140,3916048,0.0746,0.0610363636363636},
-{2971105,3916480,3916140,0.282763636363636,0.296228571428571},
-{2971106,3917101,3916480,0.482171428571429,0.50628},
-{2971107,3917167,3917101,0.1077,0.0942375},
-{2971108,3916786,3916720,0.0697875,0.0587684210526316},
-{2971109,3917004,3916786,0.182542857142857,0.182542857142857},
-{2971110,3917121,3917004,0.0703655172413793,0.0703655172413793},
-{2971111,3917690,3917121,0.474054545454545,0.386266666666667},
-{2971112,3917875,3917690,0.162423529411765,0.2124},
-{2971113,3917921,3917875,0.0904235294117647,0.15372},
-{2971114,3915486,3915189,0.26466,0.27858947368421},
-{2971115,3915596,3915486,0.0942,0.0994333333333333},
-{2971116,3916048,3915596,0.335345454545455,0.36888},
-{2971117,3918490,3917710,0.688866666666667,0.61998},
-{2971118,3918950,3918490,0.285507692307692,0.239458064516129},
-{2971119,3917398,3917334,0.0712235294117647,0.0712235294117647},
-{2971120,3917770,3917398,0.27335,0.3124},
-{2971121,3917994,3917770,0.11624,0.11624},
-{2971122,3918153,3917994,0.0734516129032258,0.0669705882352941},
-{2971123,3918237,3918153,0.0464769230769231,0.0377625},
-{2971124,3918722,3918237,0.257806451612903,0.242181818181818},
-{2971125,3918821,3918722,0.0732521739130435,0.0936},
-{2971126,3900851,3900941,0.0318933333333333,0.0299},
-{2971127,3900941,3901059,0.0397021276595745,0.03732},
-{2971128,3904813,3905290,0.179079069767442,0.183342857142857},
-{2971129,3905290,3905394,0.0447219512195122,0.0509333333333333},
-{2971130,3905394,3905508,0.0422142857142857,0.0422142857142857},
-{2971131,3905508,3906054,0.189,0.213230769230769},
-{2971132,3905394,3905294,0.273392307692308,0.296175},
-{2971133,3905394,3905497,0.0752608695652174,0.0961666666666667},
-{2971134,3906096,3905497,0.318771428571429,0.307779310344828},
-{2971135,3907012,3906970,0.259954285714286,0.233292307692308},
-{2971136,3906424,3906854,0.155385714285714,0.181283333333333},
-{2971137,3906854,3906964,0.0482727272727273,0.0455142857142857},
-{2971138,3906970,3906964,0.108022222222222,0.09114375},
-{2971139,3916615,3915887,0.456530769230769,0.349111764705882},
-{2971140,3916806,3916615,0.145971428571429,0.180317647058824},
-{2971141,3916970,3916806,0.237461538461538,0.162473684210526},
-{2971142,3917631,3916970,0.404834482758621,0.434822222222222},
-{2971143,3917112,3916931,0.138228571428571,0.170752941176471},
-{2971144,3917279,3917112,0.198,0.166736842105263},
-{2971145,3917963,3917279,0.429555555555556,0.414214285714286},
-{2971146,3916931,3916206,0.476712,0.476712},
-{2971147,3897476,3897618,0.123070588235294,0.10461},
-{2971148,3897432,3897476,0.0345214285714286,0.0345214285714286},
-{2971149,3897166,3897432,0.147910344827586,0.153192857142857},
-{2971150,3896959,3897166,0.0931935483870968,0.103178571428571},
-{2971151,3896810,3896959,0.0675636363636364,0.0675636363636364},
-{2971152,3896690,3896810,0.0622166666666667,0.0658764705882353},
-{2971153,3895300,3895484,0.17636,0.195955555555556},
-{2971154,3895484,3895661,0.152085,0.144842857142857},
-{2971155,3895661,3895735,0.0478975609756098,0.0467571428571428},
-{2971156,3895735,3896027,0.1776,0.169527272727273},
-{2971157,3896027,3896088,0.039409756097561,0.039409756097561},
-{2971158,3896088,3896306,0.175761290322581,0.18162},
-{2971159,3906500,3907095,1000000,0.324133333333333},
-{2971160,3907095,3907265,1000000,0.091368},
-{2971161,3895833,3896012,0.0709,0.0709},
-{2971162,3895722,3895833,0.0500129032258064,0.062016},
-{2971163,3895259,3895420,0.0973714285714286,0.081792},
-{2971164,3894993,3895259,0.140292857142857,0.119036363636364},
-{2971165,3894782,3895084,0.209546341463415,0.204557142857143},
-{2971166,3895288,3895420,0.116693617021277,0.119230434782609},
-{2971167,3895518,3895756,0.139281818181818,0.139281818181818},
-{2971168,3895756,3895809,0.0533090909090909,0.0451076923076923},
-{2971169,3895809,3895978,0.1473,0.124638461538462},
-{2971170,3895941,3896588,1000000,0.459884210526316},
-{2971171,3895756,3895941,1000000,0.114714285714286},
-{2971172,3899382,3899513,0.075075,0.0828413793103448},
-{2971173,3899513,3899600,0.0445125,0.0647454545454545},
-{2971174,3897166,3897379,1000000,0.169878260869565},
-{2971175,3897379,3897796,1000000,0.285964285714286},
-{2971176,3898084,3898363,1000000,0.129111111111111},
-{2971177,3897796,3898084,0.187457142857143,0.187457142857143},
-{2971178,3901084,3901450,0.225672,0.201492857142857},
-{2971179,3900898,3901084,0.074895,0.0809675675675676},
-{2971180,3900548,3900898,0.132125581395349,0.142035},
-{2971181,3899399,3899469,0.0322340425531915,0.0309183673469388},
-{2971182,3899469,3899846,0.1374875,0.134681632653061},
-{2971183,3897301,3897418,0.0936,0.0980571428571429},
-{2971184,3897418,3897522,0.115633333333333,0.0946090909090909},
-{2971231,3896723,3896471,0.167014285714286,0.23382},
-{2971232,3897786,3896723,0.3948,0.567525},
-{2971239,3905502,3905217,0.103677272727273,0.091236},
-{2971240,3906269,3905502,0.23715652173913,0.330581818181818},
-{2971241,3903947,3904397,0.141655813953488,0.138436363636364},
-{2971248,3898854,3897991,1000000,0.413668965517241},
-{2971249,3898854,3899412,0.311261538461538,0.289028571428571},
-{2971250,3898514,3898854,0.183422222222222,0.176871428571429},
-{2971251,3898423,3897786,0.259594736842105,0.365355555555556},
-{2971252,3899120,3898423,1000000,1000000},
-{2971253,3903568,3902864,0.281019512195122,1000000},
-{2971254,3905320,3905414,1000000,0.0283358490566038},
-{2971255,3904818,3905320,1000000,0.141755555555556},
-{2971256,3905799,3905663,0.0876444444444444,0.0986},
-{2971272,3903889,3904282,0.100476923076923,0.137494736842105},
-{2971273,3904565,3904858,0.0749142857142857,0.083904},
-{2971288,3916912,3917207,0.230139130434783,0.1654125},
-{2971289,3917411,3917207,0.0852923076923077,0.0869647058823529},
-{2971290,3917207,3917258,0.250096551724138,0.259028571428571},
-{2971291,3916093,3916494,0.318790909090909,0.21916875},
-{2971292,3915768,3916093,0.109628571428571,0.1119125},
-{2971293,3915607,3915768,0.0552941176470588,0.0564},
-{2971294,3889895,3890996,0.601147826086956,0.5761},
-{2971295,3890996,3891124,0.128828571428571,1000000},
-{2971296,3892294,3892315,1000000,0.050775},
-{2971297,3891614,3892294,1000000,0.507677419354839},
-{2971298,3891036,3891614,1000000,0.435558620689655},
-{2971299,3889699,3889292,1000000,1000000},
-{2971300,3887518,3887589,1000000,1000000},
-{2971301,3887518,3887444,1000000,1000000},
-{2971302,3887444,3887847,0.287775,1000000},
-{2971303,3887643,3887847,0.10244347826087,1000000},
-{2971304,3886820,3886868,0.20025,1000000},
-{2971305,3886868,3886871,0.0278454545454545,1000000},
-{2971306,3886871,3887029,0.4295,1000000},
-{2971307,3887029,3886985,0.276954545454545,1000000},
-{2971308,3888803,3888401,0.48885,0.48885},
-{2971309,3888798,3888803,1000000,0.190533333333333},
-{2971310,3894873,3895080,1000000,0.0513310344827586},
-{2971311,3894689,3894802,0.0246454545454545,1000000},
-{2971312,3897646,3897968,0.0642882352941176,1000000},
-{2971313,3899518,3899144,0.167653846153846,1000000},
-{2971314,3879387,3879588,1000000,1000000},
-{2971315,3879588,3879755,1000000,1000000},
-{2971316,3879524,3879729,0.42232,1000000},
-{2971317,3879139,3879356,0.412690909090909,0.324257142857143},
-{2971318,3877789,3877453,0.271866666666667,1000000},
-{2971319,3877453,3877502,1000000,1000000},
-{2971320,3877324,3877283,1000000,0.14556},
-{2971321,3877502,3877324,1000000,1000000},
-{2971322,3877324,3877344,0.09685,1000000},
-{2971323,3877344,3877453,1000000,0.059424},
-{2971324,3877344,3877216,0.0677142857142857,0.05925},
-{2971325,3878042,3877690,0.13073023255814,0.15192972972973},
-{2971326,3879251,3878478,0.336555,0.354268421052632},
-{2971327,3878478,3878042,0.189268421052632,0.179805},
-{2971328,3885480,3885383,0.0430071428571429,0.0415241379310345},
-{2971329,3885955,3885480,0.16212,0.156890322580645},
-{2971330,3891244,3891272,0.0656052631578947,0.0673783783783784},
-{2971331,3891208,3891244,0.0688105263157895,0.0769058823529412},
-{2971332,3880841,3880809,0.221769230769231,0.11532},
-{2971333,3880761,3880882,0.2274,0.10233},
-{2971334,3880892,3880986,0.0494181818181818,0.0639529411764706},
-{2971335,3880882,3880841,0.1689,0.14075},
-{2971336,3880707,3880809,0.090744,1000000},
-{2971337,3880883,3881281,1000000,0.4617},
-{2971338,3880882,3880892,0.0648782608695652,0.0710571428571429},
-{2971339,3882564,3882744,0.238666666666667,1000000},
-{2971340,3882744,3882872,0.215785714285714,1000000},
-{2971341,3882872,3883264,1000000,0.241371428571429},
-{2971346,3903384,3903987,0.151110638297872,0.139258823529412},
-{2971347,3903987,3904973,0.302382857142857,0.264585},
-{2971399,3903044,3903145,0.0674222222222222,0.130028571428571},
-{2971400,3903668,3903457,0.104084210526316,0.09888},
-{2971401,3903852,3903668,0.0849090909090909,0.0849090909090909},
-{2971422,3907739,3907801,0.0714,0.0634666666666667},
-{2971423,3907914,3908020,0.0977571428571429,0.109488},
-{2971433,3923096,3923243,0.0916363636363637,0.103384615384615},
-{2971434,3923243,3923307,0.0307565217391304,0.03537},
-{2971435,3923307,3923677,0.214677272727273,0.255291891891892},
-{2971436,3923520,3923677,0.136145454545455,0.119808},
-{2971437,3923398,3923520,0.0885375,0.0809485714285714},
-{2971438,3920983,3921559,0.31258064516129,0.31258064516129},
-{2971439,3921559,3921787,0.12369375,0.0899590909090909},
-{2971440,3921787,3921908,0.08745,0.061215},
-{2971441,3921908,3922244,0.1643,0.144263414634146},
-{2971442,3922257,3922345,0.0426,0.0404153846153846},
-{2971443,3919879,3920057,0.124175,0.212871428571429},
-{2971445,3865232,3865403,0.182841176470588,0.230244444444444},
-{2971446,3865403,3865825,1000000,0.54572},
-{2971447,3865779,3865300,0.254057142857143,0.254057142857143},
-{2971448,3868713,3868681,0.102560869565217,0.102560869565217},
-{2971449,3875145,3874787,0.177876923076923,0.177876923076923},
-{2971450,3875122,3875145,0.0871363636363636,0.09585},
-{2971451,3857632,3858444,1000000,0.431085714285714},
-{2971452,3858444,3858786,0.21561,0.172488},
-{2971453,3868939,3868655,1000000,0.415153846153846},
-{2971454,3868549,3868655,1000000,0.07816},
-{2971455,3869066,3868754,0.16338,0.192211764705882},
-{2971456,3868641,3868754,0.0865333333333333,1000000},
-{2971457,3858131,3858171,0.0711833333333333,0.0595953488372093},
-{2971458,3856618,3856746,0.0366807692307692,0.0405829787234043},
-{2971459,3856976,3856434,0.26570625,0.223752631578947},
-{2971460,3857816,3857416,0.214844444444444,0.207171428571429},
-{2971461,3858101,3857816,0.112310526315789,0.115345945945946},
-{2971462,3859806,3860477,0.350078571428571,0.377007692307692},
-{2971463,3861746,3861214,0.5835,0.507391304347826},
-{2971464,3859423,3859273,0.0803333333333333,0.0774642857142857},
-{2971465,3859273,3858969,0.198218181818182,0.1896},
-{2971466,3870087,3869839,0.1938,0.0750193548387097},
-{2971467,3870168,3870087,0.0342571428571429,0.0189315789473684},
-{2971468,3870035,3869867,1000000,0.07963125},
-{2971469,3872974,3872781,0.0725357142857143,0.0923181818181818},
-{2971470,3873889,3872974,0.432825,1000000},
-{2971471,3875974,3876325,0.139692857142857,0.156456},
-{2971472,3876325,3876630,0.1779,0.169428571428571},
-{2971473,3876630,3876919,0.15111,0.143914285714286},
-{2971474,3876919,3877581,0.33849,0.294339130434783},
-{2971475,3848563,3848433,0.359976923076923,0.359976923076923},
-{2971476,3865628,3865267,0.155594117647059,1000000},
-{2971477,3865311,3865226,1000000,0.213765517241379},
-{2971478,3868156,3867722,0.157015384615385,0.1458},
-{2971479,3868653,3868156,0.1713,0.1713},
-{2971480,3869409,3868653,0.218682352941176,0.225309090909091},
-{2971481,3869825,3869409,0.132533333333333,0.275261538461538},
-{2971482,3869896,3869900,1000000,0.049425},
-{2971483,3875204,3875862,0.196610526315789,0.201924324324324},
-{2971484,3872127,3870674,1000000,0.271395918367347},
-{2971485,3880746,3882522,1000000,0.409176},
-{2971486,3860964,3861281,0.114153846153846,0.1113},
-{2971487,3861701,3861281,0.168908571428571,0.168908571428571},
-{2971488,3861964,3861701,0.125815384615385,0.0962117647058824},
-{2971489,3862322,3861964,0.148386206896552,0.153685714285714},
-{2971490,3862322,3862469,0.199834285714286,0.189032432432432},
-{2971491,3861274,3860758,0.195990697674419,0.183208695652174},
-{2971492,3861552,3861274,0.091284,0.091284},
-{2971493,3867446,3867167,0.176905263157895,0.176905263157895},
-{2971494,3867715,3867446,0.119524137931034,0.119524137931034},
-{2971495,3872073,3872020,0.0685363636363636,0.0655565217391304},
-{2971496,3872020,3871883,0.1917,0.200034782608696},
-{2971497,3873233,3872622,0.228511111111111,0.228511111111111},
-{2971498,3873445,3873233,0.086976,0.103542857142857},
-{2971499,3866435,3866644,0.0831,0.0870571428571429},
-{2971500,3871301,3871139,0.263836363636364,0.341435294117647},
-{2971501,3871139,3871021,0.186530769230769,0.202075},
-{2971502,3871021,3870947,0.146514285714286,0.161936842105263},
-{2971503,3870875,3870749,0.227139130434783,0.26121},
-{2971504,3871456,3870922,1000000,0.149127272727273},
-{2971505,3865124,3864861,0.0990571428571429,0.0924533333333333},
-{2971506,3865404,3865124,0.110316279069767,0.105413333333333},
-{2971507,3869245,3868444,0.3765,0.340064516129032},
-{2971508,3868273,3867645,0.316977777777778,0.316977777777778},
-{2971509,3866234,3866263,0.0852,0.0781},
-{2971510,3871368,3870830,0.15890625,0.211875},
-{2971511,3871636,3871368,0.0863777777777778,0.11661},
-{2971512,3866371,3865999,0.101045454545455,0.101045454545455},
-{2971513,3867205,3866710,0.179553488372093,0.16784347826087},
-{2971514,3867205,3867277,0.0285652173913043,0.0305581395348837},
-{2971515,3867410,3867083,0.124316129032258,0.137635714285714},
-{2971516,3867827,3867410,0.180878571428571,0.230209090909091},
-{2971517,3870675,3870416,0.101791304347826,0.09755},
-{2971518,3871054,3870675,0.12052,0.1572},
-{2971519,3871296,3871054,0.11358,0.22716},
-{2971520,3871296,3871689,0.143925,0.246728571428571},
-{2971521,3871689,3871912,0.0594529411764706,0.06316875},
-{2971522,3862828,3861460,0.337096153846154,0.35058},
-{2971523,3863361,3862828,0.14556,0.14556},
-{2971524,3863557,3863361,0.0483183673469388,0.047352},
-{2971525,3866137,3865914,0.0507622641509434,0.0517384615384615},
-{2971526,3866506,3866137,0.0699346153846154,0.0713058823529412},
-{2971527,3886558,3887572,0.334455319148936,0.308223529411765},
-{2971528,3887762,3887572,0.04075,0.0501538461538462},
-{2971529,3888042,3887762,0.0511224489795918,0.0596428571428571},
-{2971530,3893721,3893671,0.103358823529412,0.10981875},
-{2971531,3866642,3866484,0.0435096774193548,0.04496},
-{2971532,3867143,3867008,0.0504529411764706,0.0553354838709677},
-{2971533,3867352,3867143,0.0825111111111111,0.0675090909090909},
-{2971534,3867443,3867352,0.0410571428571429,0.0328457142857143},
-{2971535,3870201,3869739,0.18145,0.189339130434783},
-{2971536,3870490,3870201,0.0773657142857143,0.104146153846154},
-{2971537,3870248,3869980,0.0915333333333333,0.112336363636364},
-{2971538,3870520,3870248,0.10375,0.138333333333333},
-{2971539,3883412,3882817,0.374964705882353,0.374964705882353},
-{2971540,3887571,3887572,0.141144,0.130688888888889},
-{2971541,3887512,3887571,0.215825,0.235445454545455},
-{2971542,3896824,3896965,1000000,1000000},
-{2971543,3899846,3899982,0.055531914893617,0.055531914893617},
-{2971544,3899982,3900071,0.0369272727272727,0.0361066666666667},
-{2971545,3903770,3904417,0.372192,0.372192},
-{2971546,3904417,3904806,0.360811764705882,0.245352},
-{2971547,3913361,3913448,0.0416322580645161,0.032265},
-{2971548,3913448,3913728,0.0913459459459459,0.0866615384615385},
-{2971549,3886134,3886102,0.0574625,0.0574625},
-{2971550,3886102,3886098,0.0614375,0.0614375},
-{2971551,3883264,3883345,1000000,0.0448222222222222},
-{2971552,3885140,3885459,0.3066,1000000},
-{2971553,3884827,3885140,0.33435,1000000},
-{2971554,3900383,3900506,1000000,0.0516},
-{2971555,3902160,3903110,1000000,0.211137313432836},
-{2971556,3903110,3903195,1000000,0.0168461538461538},
-{2971557,3905370,3905707,0.06906,1000000},
-{2971558,3908257,3908130,1000000,0.0819},
-{2971559,3908794,3907732,0.243380487804878,1000000},
-{2971561,3907789,3907765,0.0259826086956522,0.0259826086956522},
-{2971562,3907765,3907732,0.0383727272727273,0.036704347826087},
-{2971563,3907789,3908794,0.257194736842105,1000000},
-{2971569,3876840,3876366,1000000,0.37848},
-{2971570,3876840,3877019,0.183136363636364,1000000},
-{2971576,3884380,3883643,0.454155555555556,0.471623076923077},
-{2971588,3898703,3898871,1000000,0.119828571428571},
-{2971589,3898703,3898789,0.114461538461538,0.0875294117647059},
-{2971590,3901052,3901811,0.393085714285714,0.393085714285714},
-{2971591,3901811,3902144,0.14538,0.13629375},
-{2971595,3870524,3870073,0.119969230769231,1000000},
-{2971596,3870893,3870524,0.087790243902439,1000000},
-{2971597,3872059,3871540,0.114572727272727,0.120028571428571},
-{2971598,3879782,3879858,0.0505034482758621,0.0563307692307692},
-{2971599,3879782,3879591,0.130741935483871,0.12665625},
-{2971600,3879384,3879591,0.12312,0.12312},
-{2971601,3887222,3887603,0.0966615384615385,0.0819521739130435},
-{2971602,3887603,3887922,0.0648266666666667,0.0634173913043478},
-{2971603,3887922,3888075,0.0364636363636364,0.0327428571428571},
-{2971604,3888075,3888592,0.12519512195122,0.122214285714286},
-{2971605,3887155,3887523,0.11630625,0.12406},
-{2971606,3887523,3887841,0.0850114285714286,0.0804162162162162},
-{2971607,3887841,3888159,0.09549375,0.0873085714285714},
-{2971608,3888159,3888531,0.14508,0.134333333333333},
-{2971609,3885878,3885816,0.271054545454545,0.331288888888889},
-{2971610,3901103,3901158,0.0257333333333333,0.0236326530612245},
-{2971611,3901158,3901350,0.0716590909090909,0.0656875},
-{2971612,3868684,3868479,0.083325,0.0784235294117647},
-{2971613,3868807,3868684,0.0446,0.0408833333333333},
-{2971614,3904010,3904871,0.354822857142857,0.344966666666667},
-{2971615,3909516,3909790,0.144822222222222,0.19551},
-{2971616,3909790,3910187,0.135970588235294,0.18492},
-{2971619,3867898,3867743,0.114830769230769,0.129808695652174},
-{2971620,3868049,3867898,0.104121428571429,0.100531034482759},
-{2971621,3868257,3868049,0.106234285714286,0.119941935483871},
-{2971622,3868580,3868257,0.18165,0.198163636363636},
-{2971623,3868852,3868580,0.153123529411765,0.157763636363636},
-{2971624,3869055,3868852,0.186026086956522,0.225189473684211},
-{2971625,3886043,3885791,0.123103448275862,0.274615384615385},
-{2971626,3885791,3885619,0.0719285714285714,0.0839166666666667},
-{2971627,3892178,3892352,0.0777818181818182,0.0754941176470588},
-{2971628,3892352,3892684,0.136581818181818,0.128777142857143},
-{2971635,3884819,3884949,0.08655,0.0814588235294118},
-{2971636,3884949,3885024,0.0722842105263158,0.057225},
-{2971637,3886433,3886260,0.1888875,0.20148},
-{2971638,3886489,3886433,0.0622333333333333,0.07468},
-{2971639,3887849,3888252,0.107436734693878,0.105288},
-{2971640,3888252,3888384,0.0353739130434783,0.0353739130434783},
-{2971641,3890745,3891085,0.119505,0.125794736842105},
-{2971642,3891085,3891243,0.150917647058824,0.150917647058824},
-{2971643,3901368,3901926,0.1956,0.41728},
-{2971644,3901657,3902423,0.40467,0.367881818181818},
-{2971645,3896163,3896224,0.040625,0.0464285714285714},
-{2971646,3896224,3896870,0.5214,0.603726315789474},
-{2971647,3902958,3903655,0.362325,0.362325},
-{2971700,3877167,3877134,0.0698647058823529,0.0819103448275862},
-{2971701,3875859,3876276,1000000,1000000},
-{2971702,3876498,3876276,1000000,0.4071375},
-{2971703,3878393,3878205,0.3527,0.52905},
-{2971704,3878205,3878139,0.135456,0.0967542857142857},
-{2971705,3891563,3891055,1000000,0.455791304347826},
-{2971706,3890416,3890111,0.278634782608696,1000000},
-{2971707,3890731,3890416,0.237511111111111,1000000},
-{2971708,3891885,3891744,0.2146125,0.163514285714286},
-{2971709,3891993,3891885,0.130857142857143,0.152666666666667},
-{2971752,3905120,3905222,0.0639545454545455,0.0639545454545455},
-{2971753,3905222,3904828,0.123795918367347,1000000},
-{2971754,3904739,3905120,0.117482352941176,1000000},
-{2971755,3904828,3904469,0.127353191489362,1000000},
-{2971756,3904739,3904389,1000000,0.113447058823529},
-{2971757,3904066,3903856,0.0754333333333333,1000000},
-{2971758,3903856,3903568,0.10965,1000000},
-{2971759,3903956,3904066,1000000,0.0421714285714286},
-{2971760,3903263,3903956,1000000,0.2246},
-{2971761,3904389,3904469,0.0584,0.0737684210526316},
-{2971762,3901127,3901734,0.282690909090909,0.32168275862069},
-{2971763,3901044,3901127,0.0834,0.0834},
-{2971764,3900592,3901044,0.286325,0.286325},
-{2971765,3901469,3901044,1000000,0.139714285714286},
-{2971766,3901553,3901127,0.158609302325581,1000000},
-{2971767,3901884,3901553,0.113934782608696,1000000},
-{2971768,3901803,3901469,1000000,0.102864},
-{2971769,3902609,3902705,0.0452068965517241,0.0422903225806452},
-{2971770,3902705,3903356,0.224822727272727,0.32974},
-{2971771,3902864,3902705,0.16568,1000000},
-{2971772,3901729,3902609,0.357793548387097,0.264085714285714},
-{2971773,3903126,3902309,0.367870588235294,0.360796153846154},
-{2971774,3902983,3903131,0.0738612244897959,0.0861714285714286},
-{2971775,3902838,3902883,1000000,0.0945391304347826},
-{2971776,3902759,3902779,1000000,0.045},
-{2971777,3902759,3903007,1000000,0.0728166666666667},
-{2971778,3902934,3903554,0.128475,1000000},
-{2971779,3902779,3902789,1000000,0.0387},
-{2971780,3902618,3902789,0.0375294117647059,1000000},
-{2971781,3902377,3902275,1000000,0.0555391304347826},
-{2971782,3902538,3902709,0.0769135135135135,1000000},
-{2971783,3902259,3902495,1000000,0.25872},
-{2971784,3902693,3902759,1000000,0.0215351351351351},
-{2971785,3902200,3902375,1000000,0.0454307692307692},
-{2971786,3902036,3902011,0.0202636363636364,0.018575},
-{2971787,3902155,3901497,0.307032558139535,0.322009756097561},
-{2971788,3902709,3903012,0.0917217391304348,0.10548},
-{2971789,3902259,3902155,0.0730137931034483,0.151242857142857},
-{2971843,3916715,3916494,0.205666666666667,0.1156875},
-{2971844,3917207,3916715,0.231558139534884,0.211851063829787},
-{2971845,3916715,3917009,0.14895,0.226971428571429},
-{2971925,3915237,3915513,0.0878533333333333,1000000},
-{2971952,3908476,3908282,1000000,0.0339396226415094},
-{2971953,3907555,3907523,0.00996734693877551,0.00996734693877551},
-{2971954,3907130,3907355,0.10038,1000000},
-{2971955,3907280,3907355,0.0259161290322581,1000000},
-{2971956,3907523,3907480,0.0134204081632653,0.0134204081632653},
-{2971957,3907355,3907480,0.0398478260869565,1000000},
-{2971958,3907480,3908282,0.2286,1000000},
-{2971959,3906104,3907130,0.621575,1000000},
-{2971960,3906104,3906392,1000000,0.206972727272727},
-{2971961,3908168,3907186,0.515007692307692,0.535608},
-{2971962,3908585,3908975,0.201066666666667,0.201066666666667},
-{2971963,3903382,3903567,0.04815,1000000},
-{2971970,3907573,3907555,0.006564,0.00669795918367347},
-{2971993,3860753,3860659,0.0585,0.0615789473684211},
-{2971994,3860672,3860753,0.1704375,0.165272727272727},
-{2971995,3861460,3860753,0.223614285714286,0.240815384615385},
-{2971998,3862763,3862481,0.154535294117647,0.1946},
-{2971999,3862481,3862004,0.218268292682927,0.213071428571429},
-{2972000,3862004,3861925,0.0350634146341463,0.0350634146341463},
-{2972001,3861925,3861658,0.132409090909091,0.135488372093023},
-{2972002,3861658,3861452,0.0976695652173913,0.109580487804878},
-{2972003,3861452,3861214,0.1335,0.140526315789474},
-{2972004,3860238,3859753,0.361885714285714,0.4222},
-{2972005,3859897,3859753,1000000,1000000},
-{2972006,3861437,3861596,0.14424,0.200333333333333},
-{2972007,3860367,3861016,0.598581818181818,0.65844},
-{2972008,3864709,3864660,0.0733714285714286,0.0642},
-{2972009,3864709,3864570,0.0718285714285714,0.0655826086956522},
-{2972010,3864845,3864709,0.245311111111111,0.245311111111111},
-{2972011,3865078,3864840,0.165884210526316,0.143263636363636},
-{2972012,3865779,3865078,0.312,0.300444444444444},
-{2972013,3864840,3864453,0.198457142857143,0.198457142857143},
-{2972014,3864453,3863618,0.369921428571429,0.414312},
-{2972015,3863923,3863490,0.36672,0.293376},
-{2972016,3864018,3863923,0.0621230769230769,0.0769142857142857},
-{2972017,3866247,3866068,1000000,0.1356},
-{2972018,3867564,3866247,1000000,0.324404651162791},
-{2972019,3865571,3865403,0.110147368421053,0.0721655172413793},
-{2972020,3873006,3873042,0.0838714285714286,0.0690705882352941},
-{2972021,3871357,3871291,0.0524454545454545,0.104890909090909},
-{2972022,3873042,3871357,0.374347826086956,1000000},
-{2972023,3871049,3870978,0.09465,0.059778947368421},
-{2972024,3871539,3871049,0.26028,0.209903225806452},
-{2972025,3871357,3871049,0.0795073170731707,1000000},
-{2972026,3871049,3870377,0.157787234042553,1000000},
-{2972027,3869094,3869052,0.06246,0.0543130434782609},
-{2972028,3869094,3869421,1000000,0.3552},
-{2972029,3869740,3869094,0.14129387755102,1000000},
-{2972030,3868258,3867890,0.355666666666667,0.177833333333333},
-{2972031,3867604,3867564,0.0715125,0.05721},
-{2972032,3869094,3867890,0.498444444444444,1000000},
-{2972033,3868098,3868549,1000000,0.298968},
-{2972034,3866077,3866283,0.0842072727272727,1000000},
-{2972035,3866077,3866009,1000000,0.0485052631578947},
-{2972036,3866140,3866037,0.0349531914893617,1000000},
-{2972037,3865571,3866077,0.241934693877551,1000000},
-{2972038,3864879,3864710,0.0905225806451613,1000000},
-{2972039,3864901,3864879,0.00946285714285714,1000000},
-{2972040,3864362,3863590,0.277185714285714,0.258706666666667},
-{2972041,3863590,3862967,0.247214285714286,0.225717391304348},
-{2972042,3865213,3865275,0.0923,1000000},
-{2972043,3865430,3865458,1000000,0.121728571428571},
-{2972044,3865790,3865458,1000000,0.219230769230769},
-{2972045,3865283,3865430,0.0632086956521739,0.0765157894736842},
-{2972046,3866766,3866646,1000000,0.0235411764705882},
-{2972047,3867195,3866766,1000000,0.087684},
-{2972048,3865766,3865536,0.12,1000000},
-{2972049,3865488,3865489,1000000,0.0196266666666667},
-{2972050,3865489,3865441,0.0233785714285714,1000000},
-{2972051,3865441,3865488,0.0326926829268293,1000000},
-{2972052,3865441,3865355,0.0334181818181818,1000000},
-{2972053,3865392,3865441,0.0291538461538461,1000000},
-{2972054,3865392,3865355,1000000,0.024192},
-{2972055,3865251,3865260,1000000,0.02145},
-{2972056,3865458,3865471,1000000,0.122413043478261},
-{2972057,3865038,3865000,1000000,0.020825},
-{2972058,3865370,3865848,0.336906382978723,1000000},
-{2972059,3866068,3866017,0.117808695652174,1000000},
-{2972060,3866017,3866037,0.0583235294117647,1000000},
-{2972061,3866017,3865848,1000000,0.0970457142857143},
-{2972062,3865233,3865571,0.20525,1000000},
-{2972063,3865496,3865500,0.0739411764705882,1000000},
-{2972064,3866009,3866161,1000000,0.0577854545454545},
-{2972065,3872036,3871765,0.366533333333333,1000000},
-{2972066,3870472,3870087,0.3682,1000000},
-{2972067,3870670,3870472,0.191875,1000000},
-{2972068,3871216,3870670,0.209353846153846,1000000},
-{2972069,3870910,3870670,0.263825,1000000},
-{2972075,3865598,3865599,0.258707142857143,1000000},
-{2972077,3865250,3864958,0.11442,1000000},
-{2972078,3864958,3864916,0.202181818181818,1000000},
-{2972081,3879946,3879728,1000000,0.30852},
-{2972082,3880394,3880156,1000000,0.287475},
-{2972083,3882112,3881773,0.385552941176471,1000000},
-{2972084,3882276,3882112,0.168494117647059,1000000},
-{2972085,3881384,3881773,0.279663157894737,1000000},
-{2972086,3879502,3880268,1000000,0.687714285714286},
-{2972087,3879753,3880500,0.589775,1000000},
-{2972088,3880948,3881255,0.210857142857143,1000000},
-{2972089,3883672,3882939,0.586114285714286,1000000},
-{2972090,3879924,3880172,0.3645,0.3402},
-{2972091,3883824,3883635,1000000,0.12458},
-{2972092,3882955,3882570,0.393126315789474,1000000},
-{2972093,3884737,3884451,0.195066666666667,1000000},
-{2972094,3884737,3884878,0.07278,0.0661636363636364},
-{2972095,3884451,3884573,0.28269,1000000},
-{2972096,3884573,3884890,0.197576470588235,0.152672727272727},
-{2972097,3883842,3884573,1000000,0.359217391304348},
-{2972098,3883420,3883842,1000000,0.2676},
-{2972099,3883678,3883842,1000000,1000000},
-{2972100,3883842,3884121,1000000,0.539533333333333},
-{2972101,3882164,3882889,1000000,0.384428571428571},
-{2972102,3884017,3884137,1000000,1.01656666666667},
-{2972103,3885051,3885457,1000000,0.210094736842105},
-{2972104,3885171,3885319,0.297317647058824,1000000},
-{2972105,3881236,3881845,0.468866666666667,1000000},
-{2972106,3880520,3880732,0.420225,1000000},
-{2972107,3880732,3880815,0.2064,1000000},
-{2972108,3880815,3881276,1000000,1000000},
-{2972109,3880603,3880815,0.287169230769231,1000000},
-{2972110,3880088,3880923,1000000,0.73584705882353},
-{2972111,3880790,3880923,1000000,0.25836},
-{2972112,3880617,3880790,0.335233333333333,1000000},
-{2972113,3880208,3880790,1000000,0.464433333333333},
-{2972114,3876008,3876763,0.507,1000000},
-{2972115,3876763,3877254,1000000,0.285233333333333},
-{2972116,3877254,3877523,1000000,0.1377},
-{2972117,3877425,3877897,1000000,1000000},
-{2972118,3877918,3877897,0.0552,1000000},
-{2972119,3878367,3877918,1000000,1000000},
-{2972120,3878405,3878367,1000000,1000000},
-{2972121,3878488,3878405,1000000,1000000},
-{2972122,3879049,3878405,1000000,1000000},
-{2972123,3877875,3878332,1000000,1000000},
-{2972124,3878367,3878332,1000000,1000000},
-{2972125,3878332,3878313,1000000,1000000},
-{2972126,3877897,3877875,0.05577,1000000},
-{2972127,3878313,3878213,1000000,1000000},
-{2972128,3878213,3878154,0.2403,1000000},
-{2972129,3878154,3878122,0.106736842105263,1000000},
-{2972130,3877672,3877645,0.118623529411765,0.106136842105263},
-{2972131,3875054,3875389,0.229733333333333,1000000},
-{2972132,3875389,3876319,0.391776923076923,1000000},
-{2972133,3874982,3875326,0.2536125,1000000},
-{2972134,3875326,3875614,0.130344,1000000},
-{2972135,3875614,3876239,0.320809090909091,1000000},
-{2972136,3877009,3877219,1000000,1000000},
-{2972137,3877273,3877219,1000000,1000000},
-{2972138,3876973,3876821,1000000,1000000},
-{2972139,3876137,3876345,0.102495652173913,1000000},
-{2972140,3876345,3876398,0.100675,1000000},
-{2972141,3878237,3878166,0.229228571428571,1000000},
-{2972142,3878166,3878115,0.1377,1000000},
-{2972143,3878115,3878088,0.0712,1000000},
-{2972144,3877988,3877964,0.105624,1000000},
-{2972145,3877273,3877491,1000000,1000000},
-{2972146,3877203,3877332,1000000,1000000},
-{2972147,3877332,3877782,0.536953846153846,0.536953846153846},
-{2972148,3878714,3878626,1000000,0.32232},
-{2972149,3878626,3878526,1000000,0.432144},
-{2972150,3878626,3879110,1000000,0.2622},
-{2972151,3878115,3878626,1000000,0.301231578947368},
-{2972152,3875315,3874960,1000000,1000000},
-{2972153,3878526,3878473,1000000,0.2578},
-{2972154,3878473,3878444,1000000,0.275133333333333},
-{2972155,3877964,3877962,0.0182869565217391,1000000},
-{2972156,3877906,3877854,0.2768,1000000},
-{2972157,3876735,3877326,1000000,0.31068},
-{2972158,3878444,3878565,0.4068,1000000},
-{2972159,3877488,3878102,0.292142857142857,1000000},
-{2972160,3878102,3878565,0.312282352941176,1000000},
-{2972161,3878102,3878224,0.244565217391304,1000000},
-{2972162,3878565,3878672,0.2514,1000000},
-{2972163,3878224,3878672,1000000,0.227817391304348},
-{2972164,3877616,3878224,1000000,0.268617391304348},
-{2972165,3878224,3878316,0.330141176470588,1000000},
-{2972166,3877719,3878316,1000000,0.3081},
-{2972167,3877110,3877719,0.30663,1000000},
-{2972168,3875236,3875266,0.177369230769231,0.15372},
-{2972169,3875264,3875236,0.0188,0.0171652173913043},
-{2972170,3876048,3876150,0.220416,1000000},
-{2972171,3875748,3876150,0.305475,1000000},
-{2972172,3876150,3876284,0.266571428571429,1000000},
-{2972173,3875848,3876284,0.302223529411765,0.285433333333333},
-{2972174,3876284,3877110,0.44136,1000000},
-{2972175,3877376,3877649,0.27141,1000000},
-{2972176,3877649,3877863,0.2268,1000000},
-{2972177,3877863,3878037,0.1698,1000000},
-{2972178,3878037,3878069,0.023925,1000000},
-{2972179,3878069,3878206,0.147628571428571,1000000},
-{2972180,3878206,3878519,0.373854545454545,1000000},
-{2972181,3878519,3878781,0.331171428571429,1000000},
-{2972182,3878794,3878630,1000000,0.103828571428571},
-{2972183,3879056,3878794,1000000,0.146452173913043},
-{2972184,3879056,3879331,0.43776,1000000},
-{2972185,3879331,3879713,0.469460869565217,1000000},
-{2972186,3879713,3879953,0.366285714285714,1000000},
-{2972187,3879953,3880209,0.391685714285714,1000000},
-{2972191,3861701,3862257,0.9265875,0.98836},
-{2972192,3862257,3862116,0.228,0.2394},
-{2972193,3864958,3863773,0.4834,1000000},
-{2972204,3859627,3859655,0.186,0.186},
-{2972205,3859234,3859084,0.0822,0.092064},
-{2972206,3860082,3859234,0.364836363636364,0.325394594594595},
-{2972207,3860259,3860082,0.0942222222222222,0.0795},
-{2972208,3860566,3860259,0.140032258064516,0.124028571428571},
-{2972209,3861313,3860566,0.367986206896552,0.313870588235294},
-{2972210,3861313,3861527,0.218318181818182,0.200125},
-{2972211,3861214,3860853,0.208235294117647,0.214545454545455},
-{2972212,3862165,3862319,0.11574,0.1286},
-{2972213,3862319,3862127,0.176053846153846,0.14304375},
-{2972214,3861530,3861687,0.130963636363636,0.151642105263158},
-{2972215,3861687,3861733,0.0372260869565217,0.0305785714285714},
-{2972216,3861733,3861886,0.107947826086957,0.08276},
-{2972217,3861941,3861886,1000000,0.478344},
-{2972218,3861964,3861941,1000000,0.16233},
-{2972219,3873650,3873607,0.5139,0.41754375},
-{2972220,3873607,3873576,0.60284347826087,0.60284347826087},
-{2972221,3858664,3859014,0.0976142857142857,1000000},
-{2972222,3859014,3859469,0.0959529411764706,1000000},
-{2972223,3858558,3858529,0.0499672131147541,0.0491612903225806},
-{2972224,3858034,3858558,0.102537931034483,0.092925},
-{2972225,3858558,3859083,0.085040625,0.0877838709677419},
-{2972226,3859083,3859469,0.0626861538461538,0.0646761904761905},
-{2972227,3899877,3900393,1000000,0.270444444444444},
-{2972228,3899211,3899877,1000000,0.405384},
-{2972231,3896857,3897620,0.333204545454545,0.396243243243243},
-{2972232,3896239,3896857,0.32784,0.312228571428571},
-{2972233,3917912,3917987,0.03805,0.0358117647058824},
-{2972234,3917987,3918014,0.012432,0.0117283018867925},
-{2972235,3917310,3917578,1000000,0.152025},
-{2972236,3917936,3918853,0.275605263157895,0.299228571428571},
-{2972237,3917789,3917936,0.0520064516129032,0.067175},
-{2972238,3917655,3917789,0.0554275862068965,0.0945529411764706},
-{2972239,3914275,3915173,0.2762,0.239373333333333},
-{2972240,3911802,3914275,0.418221818181818,0.425966666666667},
-{2972241,3911713,3911802,0.12,0.0914285714285714},
-{2972242,3911022,3911802,0.152672727272727,0.158433962264151},
-{2972243,3910510,3911022,0.11064,0.0905236363636364},
-{2972244,3909963,3910510,0.0943058823529412,0.0981551020408163},
-{2972259,3864126,3864411,1000000,0.333485714285714},
-{2972260,3864023,3864973,1000000,0.583591304347826},
-{2972261,3864663,3864943,1000000,0.22791},
-{2972262,3864616,3864663,1000000,0.0402857142857143},
-{2972263,3864380,3864616,1000000,0.2375},
-{2972264,3868350,3868448,0.152815384615385,0.0946},
-{2972265,3868828,3868448,0.2029,1000000},
-{2972266,3869123,3868828,0.22353,1000000},
-{2972300,3902629,3903976,0.511184210526316,0.669827586206897},
-{2972301,3904075,3903976,0.0577,0.0665769230769231},
-{2972302,3901347,3900961,0.155276470588235,0.14665},
-{2972303,3901863,3901347,0.170578378378378,0.161830769230769},
-{2972304,3902119,3901863,0.0879096774193548,0.0757},
-{2972305,3902356,3902119,0.0870827586206896,0.0765272727272727},
-{2972306,3902450,3902356,0.0630642857142857,0.05886},
-{2972307,3902778,3902450,0.159724137931035,0.1544},
-{2972308,3902965,3902778,0.0834214285714286,0.0865111111111111},
-{2972309,3903199,3902965,0.0930685714285714,0.0987090909090909},
-{2972310,3903601,3903199,0.157988571428571,0.162635294117647},
-{2972311,3903709,3903601,0.0521636363636364,0.05379375},
-{2972351,3858657,3858556,0.0575142857142857,0.0555310344827586},
-{2972352,3860393,3858657,0.843085714285714,0.814013793103448},
-{2972353,3858390,3858657,0.243511111111111,0.243511111111111},
-{2972354,3858217,3858390,0.184928571428571,0.184928571428571},
-{2972355,3852856,3852040,0.323006896551724,0.346933333333333},
-{2972361,3855570,3855947,0.207805714285714,0.23461935483871},
-{2972362,3855511,3855570,0.0692363636363636,0.07616},
-{2972363,3855570,3855278,1000000,0.145852173913043},
-{2972364,3855511,3855278,0.0990428571428571,1000000},
-{2972365,3855278,3854623,0.340737931034483,0.30879375},
-{2972366,3858317,3858787,0.329165217391304,1000000},
-{2972367,3856857,3857202,0.154683870967742,0.171257142857143},
-{2972368,3857202,3857394,0.0893111111111111,0.083151724137931},
-{2972369,3857394,3857832,0.286745454545455,0.274278260869565},
-{2972370,3857832,3858531,0.473181818181818,0.547894736842105},
-{2972371,3861509,3861019,0.3502,0.306425},
-{2972372,3861019,3860520,0.265872,0.214412903225806},
-{2972373,3860888,3860990,0.08735,0.10482},
-{2972374,3860520,3860888,0.3012,0.28865},
-{2972375,3860520,3859759,0.369154838709677,0.309291891891892},
-{2972376,3859759,3859689,0.1088,0.1088},
-{2972377,3859522,3859759,0.135923076923077,0.135923076923077},
-{2972378,3859522,3859689,0.100610526315789,0.0831130434782609},
-{2972379,3858843,3859522,0.72936,0.792782608695652},
-{2972380,3859689,3858659,0.80235652173913,0.768925},
-{2972381,3858659,3858531,0.0822,0.0786260869565217},
-{2972382,3859689,3860063,0.2764,0.287030769230769},
-{2972383,3857082,3856798,0.20778,0.17315},
-{2972384,3857394,3857082,0.201228571428571,0.192081818181818},
-{2972385,3857727,3857394,0.1961,0.23532},
-{2972386,3857974,3857727,0.1572,0.190294736842105},
-{2972387,3858787,3857974,0.54404347826087,1000000},
-{2972394,3852335,3852426,0.09784,0.09784},
-{2972395,3852426,3853418,0.49586,0.619825},
-{2972396,3853418,3853717,0.2375,0.219230769230769},
-{2972397,3855491,3855537,0.0459230769230769,0.0459230769230769},
-{2972398,3855537,3856684,0.683875,1000000},
-{2972399,3855491,3855180,0.49092,1000000},
-{2972400,3855208,3854897,0.2755875,1000000},
-{2972401,3854897,3854467,0.323842105263158,1000000},
-{2972402,3855180,3855091,1000000,0.149057142857143},
-{2972403,3855208,3856228,1000000,0.744490909090909},
-{2972404,3854785,3854897,0.0692222222222222,0.0692222222222222},
-{2972405,3854897,3855944,0.699336,1000000},
-{2972406,3854299,3854467,1000000,0.19696},
-{2972407,3854467,3855705,1000000,0.579264705882353},
-{2972408,3857043,3856684,0.115426666666667,0.120795348837209},
-{2972409,3855705,3856329,1000000,0.34565},
-{2972410,3856329,3856676,1000000,0.204244444444444},
-{2972411,3856676,3856059,0.3279,0.39348},
-{2972412,3856059,3855547,0.265523076923077,0.276144},
-{2972413,3855134,3854524,0.29312,0.283664516129032},
-{2972414,3854524,3853797,0.347335714285714,0.374053846153846},
-{2972428,3858531,3857906,0.434428571428571,0.414681818181818},
-{2972429,3857994,3856899,1000000,0.764618181818182},
-{2972430,3856899,3856756,1000000,0.1059},
-{2972431,3862124,3862722,0.464657142857143,0.5421},
-{2972432,3862722,3862988,0.267821052631579,0.22124347826087},
-{2972433,3864110,3863132,0.498528,1000000},
-{2972434,3863132,3862506,0.302488888888889,1000000},
-{2972435,3862506,3861321,0.818742857142857,1000000},
-{2972436,3861321,3860863,1000000,0.397453846153846},
-{2972437,3864122,3862899,1000000,0.537744827586207},
-{2972438,3862899,3862152,1000000,0.269290909090909},
-{2972439,3862152,3861682,1000000,0.272765217391304},
-{2972440,3861682,3860805,1000000,0.662428571428571},
-{2972441,3860987,3860805,0.30266,0.313096551724138},
-{2972442,3860805,3860443,0.220779310344828,0.237133333333333},
-{2972443,3866360,3864963,1000000,0.866355555555556},
-{2972451,3864913,3865169,0.249766666666667,0.249766666666667},
-{2972452,3865479,3865598,0.30176,0.266258823529412},
-{2972462,3863773,3863680,1000000,0.287660869565217},
-{2972572,3859948,3859869,1000000,1000000},
-{2972573,3860081,3860611,0.344488888888889,0.372048},
-{2972574,3857537,3856564,1000000,1000000},
-{2972575,3857938,3857537,1000000,1000000},
-{2972576,3857003,3855686,0.5046,0.523288888888889},
-{2972577,3855807,3855686,0.396031578947368,0.32715652173913},
-{2972578,3855487,3854916,0.195565714285714,0.195565714285714},
-{2972579,3854916,3854586,0.117070588235294,0.13268},
-{2972580,3855686,3855487,0.0749225806451613,0.07742},
-{2972581,3854111,3854267,0.435442105263158,0.55156},
-{2972582,3854046,3854062,0.277448275862069,0.33525},
-{2972583,3854233,3854046,0.1506,0.198792},
-{2972584,3854586,3854233,0.25141875,0.287335714285714},
-{2972585,3854155,3853608,0.241427586206897,0.304408695652174},
-{2972623,3918265,3918514,0.130176923076923,1000000},
-{2972624,3895018,3895146,1000000,0.10192},
-{2972625,3895566,3895308,0.0868363636363636,1000000},
-{2972626,3894631,3894748,0.2673,1000000},
-{2972627,3894906,3895180,0.178924137931034,1000000},
-{2972628,3895103,3895532,0.344838461538462,1000000},
-{2972629,3897312,3897786,0.21534,0.280878260869565},
-{2972631,3895226,3894168,0.766533333333333,0.766533333333333},
-{2972632,3894941,3895024,0.0532137931034483,0.0593538461538461},
-{2972633,3896109,3895336,1000000,0.85875},
-{2972634,3895457,3896109,1000000,0.55602},
-{2972635,3895744,3895536,0.294046153846154,0.131813793103448},
-{2972636,3895882,3895744,0.0764545454545455,0.0764545454545455},
-{2972637,3896226,3895882,0.148133333333333,0.14412972972973},
-{2972638,3896348,3896226,0.0929,0.123866666666667},
-{2972639,3899987,3900403,1000000,0.330485714285714},
-{2972640,3900403,3900779,1000000,0.152260465116279},
-{2972641,3900779,3901362,1000000,0.22659512195122},
-{2972642,3901362,3901947,1000000,0.227655},
-{2972643,3901947,3902607,1000000,0.26125},
-{2972644,3902418,3902708,0.137086956521739,0.137086956521739},
-{2972645,3902708,3903270,0.3286,0.3286},
-{2972646,3902607,3902708,0.0566,0.0566},
-{2972647,3902660,3902958,1000000,0.730885714285714},
-{2972648,3915530,3915700,0.124736842105263,0.131666666666667},
-{2972649,3896965,3897324,1000000,1000000},
-{2972650,3897324,3897576,1000000,1000000},
-{2972651,3897532,3897659,0.12339,0.117514285714286},
-{2972652,3898065,3898862,0.534333333333333,0.424323529411765},
-{2972653,3902737,3902793,0.0973578947368421,1000000},
-{2972654,3902101,3902793,0.288115384615385,0.258310344827586},
-{2972655,3902737,3902876,1000000,0.0871423728813559},
-{2972656,3903090,3902723,0.2521125,0.2521125},
-{2972657,3902793,3903021,0.19608,1000000},
-{2972658,3903655,3903510,0.324969230769231,0.28164},
-{2972659,3902876,3903111,1000000,0.197252631578947},
-{2972660,3903251,3904090,0.401561538461538,1000000},
-{2972670,3885789,3885724,0.445272,1000000},
-{2972671,3892663,3892803,0.07315,0.07315},
-{2972675,3860063,3860259,0.195711111111111,0.220175},
-{2972676,3860990,3861313,0.266376,0.277475},
-{2972677,3857125,3857003,0.3683,1000000},
-{2972678,3853608,3853104,0.312365217391304,0.312365217391304},
-{2972679,3853855,3854267,0.215592857142857,0.194729032258065},
-{2973106,3876803,3878320,0.5195,0.77925},
-{2973107,3875862,3876693,0.6831,0.31878},
-{2973108,3876693,3876803,0.0505636363636364,0.065435294117647},
-{2973109,3876803,3877047,0.2548,1000000},
-{2973110,3876970,3876693,0.314721951219512,1000000},
-{2973111,3876970,3877047,0.0307241379310345,0.0405},
-{2973112,3877047,3877749,0.22678064516129,0.390566666666667},
-{2973113,3874807,3875436,0.301453846153846,0.252832258064516},
-{2973114,3875436,3876121,0.25784,0.297507692307692},
-{2973115,3877749,3878347,0.3642,0.213496551724138},
-{2973116,3878386,3878372,0.0235173913043478,1000000},
-{2973117,3882613,3882636,0.08166,1000000},
-{2973118,3886563,3886659,0.0566,0.0625578947368421},
-{2973119,3888729,3888545,1000000,0.439753846153846},
-{2973120,3888730,3889043,1000000,0.2088},
-{2973121,3888545,3888730,0.044148,0.0817555555555556},
-{2973122,3888730,3890267,0.740192307692308,0.506447368421053},
-{2973123,3889043,3889738,1000000,0.127596610169492},
-{2973124,3889967,3891343,0.482046153846154,0.671421428571429},
-{2973125,3890704,3890774,0.0571548387096774,0.070872},
-{2973126,3889387,3890267,0.594793548387097,0.542311764705882},
-{2973127,3891579,3892152,1000000,0.129932142857143},
-{2973128,3892482,3892497,0.0531545454545454,0.05847},
-{2973129,3894253,3895064,0.453631578947368,0.383066666666667},
-{2973130,3895064,3895137,0.087825,0.0401485714285714},
-{2973131,3887450,3887585,1000000,0.0301542857142857},
-{2973132,3887041,3887179,1000000,0.0542448979591837},
-{2973145,3856534,3855427,0.424785,0.414424390243902},
-{2973146,3856809,3856534,0.117866666666667,0.1326},
-{2973147,3853762,3854135,0.63725,0.566444444444444},
-{2973161,3853762,3853401,0.310664516129032,0.332089655172414},
-{2973165,3875936,3876023,1000000,0.0307384615384615},
-{2973166,3876377,3877058,0.21084,0.204983333333333},
-{2973167,3877058,3877202,1000000,0.0532235294117647},
-{2973168,3877058,3877011,0.203742857142857,1000000},
-{2973169,3877071,3877011,0.0201,1000000},
-{2973170,3877011,3876875,0.211569230769231,1000000},
-{2973171,3877071,3876970,0.2007,1000000},
-{2973172,3876121,3876875,0.448066666666667,0.298711111111111},
-{2973173,3876875,3876970,0.0399652173913043,0.0278545454545455},
-{2973174,3876377,3876121,0.386524137931034,0.533771428571429},
-{2973175,3877859,3877749,1000000,0.550957894736842},
-{2973176,3880625,3880746,1000000,0.0532971428571429},
-{2973177,3882238,3882385,0.0271913043478261,1000000},
-{2973178,3885520,3885679,0.0241217391304348,1000000},
-{2973179,3885551,3885804,1000000,0.0405088235294118},
-{2973180,3882752,3882769,1000000,0.061725},
-{2973181,3882712,3882766,0.0438230769230769,1000000},
-{2973182,3881949,3882116,0.0973081967213115,0.0973081967213115},
-{2973183,3882541,3882613,0.1845625,1000000},
-{2973184,3886761,3886563,0.22395,0.0995333333333333},
-{2973185,3886761,3886875,0.0427371428571429,0.0650347826086956},
-{2973186,3886875,3887774,0.251916279069767,0.27081},
-{2973187,3886659,3886944,0.14455,0.150834782608696},
-{2973188,3886944,3887041,0.0519625,0.0479653846153846},
-{2973189,3887179,3887312,1000000,0.060096},
-{2973190,3887412,3887585,0.117636363636364,1000000},
-{2973191,3887179,3887156,1000000,0.0376928571428571},
-{2973192,3887059,3887002,1000000,0.067875},
-{2973193,3885804,3887134,1000000,0.228363636363636},
-{2973194,3887134,3887239,1000000,0.0166246153846154},
-{2973195,3887156,3887147,1000000,0.01275},
-{2973196,3887147,3887059,1000000,0.0797294117647059},
-{2973197,3887312,3887059,1000000,0.0385457142857143},
-{2973198,3887147,3887235,0.0530553191489362,1000000},
-{2973199,3887002,3887235,0.164025,1000000},
-{2973200,3888856,3889250,0.0731207547169811,1000000},
-{2973201,3889250,3889352,0.0229018867924528,1000000},
-{2973202,3896483,3896401,0.0389785714285714,1000000},
-{2973203,3896192,3896271,0.0456133333333333,1000000},
-{2973204,3896322,3896390,0.0305823529411765,1000000},
-{2973205,3895080,3895892,1000000,0.259848},
-{2973206,3896390,3897968,0.410094117647059,1000000},
-{2973207,3895875,3895811,1000000,0.09564},
-{2973208,3895974,3895986,1000000,0.00512941176470588},
-{2973209,3895986,3896003,1000000,0.01335},
-{2973210,3896003,3896019,1000000,0.0308571428571429},
-{2973211,3896019,3895984,1000000,0.22164},
-{2973212,3895876,3896019,1000000,0.0635379310344828},
-{2973213,3895984,3896091,0.0700736842105263,1000000},
-{2973214,3896091,3896105,0.00842857142857143,1000000},
-{2973215,3896019,3896091,1000000,0.0347357142857143},
-{2973216,3896091,3896148,1000000,0.0240461538461538},
-{2973217,3895371,3895478,0.0740487804878049,1000000},
-{2973218,3895478,3895709,0.1377,1000000},
-{2973297,3859527,3859644,0.137775,0.157457142857143},
-{2973298,3860352,3859644,0.751615384615385,1000000},
-{2973299,3860656,3860494,1000000,1000000},
-{2973354,3851305,3850986,0.290057142857143,0.243648},
-{2973355,3848906,3850839,1.06171111111111,1.06171111111111},
-{2974288,3874713,3874561,0.251089655172414,0.234890322580645},
-{2974339,3853454,3853797,1000000,0.565015384615385},
-{2974351,3856270,3856541,0.27,0.27},
-{2974352,3857402,3857767,0.207688888888889,0.207688888888889},
-{2974353,3855547,3856270,1000000,1000000},
-{2974354,3856059,3856707,0.459738461538462,0.543327272727273},
-{2974355,3858390,3858703,0.162822222222222,0.162822222222222},
-{2974357,3854524,3855019,1000000,1000000},
-{2974489,3851949,3853322,1000000,0.8346},
-{2974490,3851949,3851625,0.406928571428571,1000000},
-{2974491,3852426,3851949,0.333627272727273,0.305825},
-{2974492,3854088,3854524,0.408218181818182,0.44904},
-{2974493,3854566,3855134,1000000,1000000},
-{2974494,3854892,3855066,1000000,0.167285714285714},
-{2974495,3855066,3855125,0.0368903225806452,0.0408428571428571},
-{2974496,3855769,3856059,0.230086956521739,0.278526315789474},
-{2974497,3855301,3855769,0.316721739130435,1000000},
-{2974498,3856377,3856899,0.392025,1000000},
-{2974499,3858538,3857311,0.699276923076923,0.727248},
-{2974500,3859316,3857953,0.547412903225806,0.808085714285714},
-{2974501,3854467,3854095,0.247009090909091,0.201266666666667},
-{2974502,3855865,3857043,1000000,0.525464516129032},
-{2974503,3855865,3855537,0.306,1000000},
-{2974504,3856232,3855865,0.263494736842105,1000000},
-{2974505,3855684,3855865,1000000,0.16604},
-{2974506,3860459,3860322,1000000,0.615965217391304},
-{2974507,3862152,3862506,0.3474,0.3474},
-{2974508,3862238,3862710,0.51728,0.51728},
-{2974509,3863132,3862238,0.6708,1000000},
-{2974512,3867069,3865169,1.34837142857143,1000000},
-{2974513,3867227,3865479,0.914968421052632,0.914968421052632},
-{2974514,3862899,3863132,1000000,0.537388235294118},
-{2974516,3866457,3867344,0.56202,1000000},
-{2974522,3868981,3867998,0.295863157894737,0.3513375},
-{2974523,3869488,3868981,0.229092857142857,0.246715384615385},
-{2974540,3879377,3879823,1000000,0.289057142857143},
-{2974551,3879823,3880224,1000000,0.286314285714286},
-{2974552,3881159,3880279,0.443952,1000000},
-{2974555,3882167,3882624,0.3804,0.336507692307692},
-{2974568,3852082,3851485,0.163507692307692,0.172345945945946},
-{2974569,3852293,3852082,1000000,1000000},
-{2974570,3853172,3852082,0.321483333333333,0.340394117647059},
-{2974571,3853556,3852966,0.5647875,1000000},
-{2974572,3853556,3853317,1000000,0.170828571428571},
-{2974573,3853317,3852944,0.290869565217391,1000000},
-{2974574,3853947,3853317,0.314657142857143,1000000},
-{2974575,3852082,3851986,1000000,1000000},
-{2974576,3854353,3853947,0.21888,1000000},
-{2974577,3854353,3854007,0.271577777777778,0.271577777777778},
-{2974578,3857082,3857529,0.257712,0.3068},
-{2974579,3856911,3857082,0.0940153846153846,0.111109090909091},
-{2974580,3856593,3856911,0.161834482758621,0.213327272727273},
-{2974581,3856593,3856271,0.195027272727273,0.195027272727273},
-{2974582,3856857,3856593,0.199857142857143,0.2798},
-{2974583,3856911,3857202,0.154,0.154},
-{2974584,3857727,3858161,0.32184,0.32184},
-{2974585,3857974,3858404,0.300913043478261,0.27684},
-{2974586,3857476,3856857,0.336876923076923,0.58392},
-{2974587,3857476,3857974,0.2763,0.2763},
-{2974588,3860082,3860698,1000000,0.621757894736842},
-{2974589,3858659,3859234,1000000,0.430433333333333},
-{2974590,3861273,3861926,0.456911111111111,0.474484615384615},
-{2974591,3862219,3862536,1000000,1000000},
-{2974592,3862060,3862219,0.126222222222222,0.148173913043478},
-{2974593,3860566,3861064,0.45729,0.5716125},
-{2974594,3860990,3860063,0.518355555555556,0.518355555555556},
-{2974595,3861639,3862385,0.49395,0.515426086956522},
-{2974596,3862703,3862219,0.23451724137931,0.2267},
-{2974597,3862385,3862703,0.283733333333333,0.283733333333333},
-{2974598,3858933,3858497,0.240844444444444,0.240844444444444},
-{2974599,3863836,3862713,1000000,0.607464},
-{2974600,3865191,3863851,1000000,1000000},
-{2974601,3863237,3862703,0.264411428571429,0.2892},
-{2974602,3864481,3863237,1.23873333333333,1.23873333333333},
-{2974603,3866365,3865892,0.371575,1000000},
-{2974604,3865268,3865892,0.261244444444444,0.261244444444444},
-{2974605,3868778,3868346,0.134818181818182,0.261705882352941},
-{2974606,3868949,3868778,0.0582387096774194,0.078495652173913},
-{2974607,3867537,3867018,0.225432,0.296621052631579},
-{2974608,3867243,3867537,1000000,0.610157142857143},
-{2974609,3868346,3867537,0.225324324324324,0.347375},
-{2974610,3867939,3868346,0.533566666666667,1000000},
-{2974611,3868883,3868981,0.350685714285714,0.283246153846154},
-{2974612,3868778,3868883,0.25655,0.30786},
-{2974613,3869823,3869488,1.01558823529412,0.784772727272727},
-{2974614,3869457,3869823,0.233861538461538,0.217157142857143},
-{2974615,3869323,3869939,0.229511111111111,0.229511111111111},
-{2974616,3870342,3870448,0.194888888888889,0.194888888888889},
-{2974617,3868265,3868695,0.32385,1000000},
-{2974618,3867531,3867839,0.203084210526316,0.175390909090909},
-{2974619,3868967,3868265,1000000,0.500433333333333},
-{2974620,3868967,3869332,1000000,0.236088},
-{2974621,3868174,3867903,0.53652,0.53652},
-{2974622,3867903,3867839,0.0388909090909091,1000000},
-{2974623,3868585,3867903,0.366260869565217,1000000},
-{2974624,3871420,3870832,0.336,0.248347826086957},
-{2974625,3871867,3871420,0.13506,0.192942857142857},
-{2974626,3871867,3871697,0.387666666666667,0.4652},
-{2974627,3871687,3872273,1.0448,1000000},
-{2974628,3871985,3871421,0.442636363636364,0.442636363636364},
-{2974629,3872053,3872166,0.0543142857142857,1000000},
-{2974630,3871697,3872078,0.183733333333333,1000000},
-{2974631,3878285,3877742,0.3528,1000000},
-{2974632,3877972,3877428,1000000,0.38204},
-{2974633,3876990,3877492,1000000,1000000},
-{2974634,3877665,3877137,1000000,0.28728},
-{2974635,3878931,3878445,1000000,0.4308},
-{2974636,3879476,3878960,0.3749625,1000000},
-{2974637,3877249,3876741,0.3262,1000000},
-{2974638,3877649,3877249,1000000,0.207947368421053},
-{2974639,3878067,3877649,1000000,0.245431578947368},
-{2974640,3877864,3877564,0.20475,1000000},
-{2974641,3878167,3877864,0.167715789473684,1000000},
-{2974642,3883888,3883123,0.507525,0.641084210526316},
-{2974643,3881459,3881905,0.340844444444444,0.340844444444444},
-{2974644,3883331,3883182,0.0962444444444445,0.0962444444444445},
-{2974645,3877610,3877864,1000000,1000000},
-{2974646,3878794,3879030,0.472028571428571,1000000},
-{2974656,3851390,3849629,0.665735294117647,0.7545},
-{2974657,3851986,3851753,1000000,1000000},
-{2974658,3853003,3851986,0.363103448275862,0.2925},
-{2974659,3851753,3851390,0.143733333333333,0.149261538461538},
-{2974660,3852696,3851753,0.293245714285714,0.366557142857143},
-{2974661,3851092,3851935,0.544942857142857,0.602305263157895},
-{2974662,3853171,3852711,1000000,1000000},
-{2974663,3853476,3853003,0.50068,0.50068},
-{2974665,3854483,3854578,0.14847,0.114207692307692},
-{2974666,3854483,3854680,0.617475,0.617475},
-{2974667,3854322,3854483,0.136130769230769,0.11798},
-{2974668,3854097,3854322,0.499745454545455,0.499745454545455},
-{2974669,3854680,3854322,0.205707692307692,0.205707692307692},
-{2974670,3855025,3854680,0.154741935483871,0.208565217391304},
-{2974671,3854680,3854190,0.308,0.308},
-{2974672,3854316,3853721,0.290955555555556,0.290955555555556},
-{2974673,3856553,3856041,0.474771428571429,0.398808},
-{2974674,3858675,3858773,1000000,0.136090909090909},
-{2974675,3859781,3860470,0.67856,0.67856},
-{2974676,3861704,3860888,1.68915,1.50146666666667},
-{2974677,3860470,3860587,0.3329,0.3329},
-{2974678,3858317,3857476,0.5788,1000000},
-{2974679,3862722,3861992,0.513286956521739,0.621347368421053},
-{2974680,3859774,3859913,0.1346,0.1346},
-{2974681,3861790,3861459,0.278463157894737,0.278463157894737},
-{2974682,3859735,3859276,0.260973913043478,0.272836363636364},
-{2974683,3860081,3859735,0.186,0.193153846153846},
-{2974684,3865670,3865959,1000000,0.2959875},
-{2974685,3865725,3865670,0.0208714285714286,0.023376},
-{2974686,3864663,3864126,1000000,0.338314285714286},
-{2974687,3864616,3864887,0.264388235294118,1000000},
-{2974688,3865364,3864887,1000000,1000000},
-{2974689,3864887,3864576,0.3366,1000000},
-{2974690,3865626,3865872,0.20889,1000000},
-{2974691,3866168,3866359,1000000,1000000},
-{2974692,3865974,3866168,0.112777777777778,0.112777777777778},
-{2974693,3866168,3866323,0.0642888888888889,0.0642888888888889},
-{2974694,3867065,3867228,0.2254,1000000},
-{2974695,3866916,3867065,0.194542857142857,0.226966666666667},
-{2974696,3867228,3867563,0.450654545454545,1000000},
-{2974697,3867772,3867065,0.524014285714286,1000000},
-{2974698,3868053,3868552,0.374086956521739,0.374086956521739},
-{2974699,3867772,3867846,1000000,0.234066666666667},
-{2974700,3867929,3867861,0.1955,1000000},
-{2974701,3867993,3867929,0.195114285714286,1000000},
-{2974702,3867584,3867494,0.101822222222222,0.101822222222222},
-{2974703,3867929,3868544,0.216844444444444,0.216844444444444},
-{2974704,3869625,3869451,1000000,0.690847058823529},
-{2974705,3870701,3870108,1000000,0.26967},
-{2974706,3870691,3870061,0.2412,0.275657142857143},
-{2974707,3869412,3869625,1000000,0.261545454545455},
-{2974708,3869412,3868791,1000000,1000000},
-{2974709,3872184,3872078,0.302256,1000000},
-{2974710,3872184,3871867,0.111792,1000000},
-{2974711,3872184,3872466,1000000,0.1026},
-{2974712,3871315,3871318,0.2861625,0.327042857142857},
-{2974713,3870451,3871315,0.351026086956522,0.351026086956522},
-{2974714,3871861,3871315,0.183377777777778,0.183377777777778},
-{2974715,3872459,3872010,1000000,0.181252173913043},
-{2974716,3871350,3870701,1000000,0.291485714285714},
-{2974717,3872052,3871350,1000000,0.37965},
-{2974718,3872455,3872045,1000000,0.2475},
-{2974719,3871356,3870698,0.30639,0.30639},
-{2974720,3870630,3870691,1000000,0.42861},
-{2974721,3871356,3871350,0.299571428571429,0.273521739130435},
-{2974722,3872064,3871356,1000000,0.320684210526316},
-{2974723,3872453,3872064,0.235275,0.209133333333333},
-{2974724,3872044,3872458,1000000,0.2452125},
-{2974725,3867881,3867993,0.352371428571429,1000000},
-{2974726,3868976,3869127,0.227684210526316,1000000},
-{2974727,3871344,3871356,0.172125,0.12909375},
-{2974728,3871338,3871344,0.192623076923077,0.208675},
-{2974729,3871344,3872022,0.29445,0.25604347826087},
-{2974739,3852779,3853023,0.1983,0.180272727272727},
-{2974740,3853023,3852450,1000000,0.47688},
-{2974741,3853590,3852712,1000000,0.543177777777778},
-{2974742,3852450,3853384,0.5235,0.58632},
-{2974743,3853023,3854053,0.8286,0.8286},
-{2974744,3855526,3855641,0.1406,0.1406},
-{2974745,3856268,3856041,0.0886666666666667,0.0886666666666667},
-{2974746,3857332,3857523,0.371057142857143,0.371057142857143},
-{2974747,3853793,3853590,1000000,0.234257142857143},
-{2974748,3855206,3853793,1.1447,1.1447},
-{2974749,3855206,3855520,0.60996,0.4692},
-{2974750,3854740,3855206,1.077525,0.615728571428571},
-{2974751,3857566,3855520,0.959784,1.04324347826087},
-{2974752,3858544,3857566,0.395688888888889,0.323745454545455},
-{2974753,3857090,3857566,0.306321428571429,1000000},
-{2974754,3857090,3855206,0.854066666666667,0.922392},
-{2974755,3855520,3855153,0.160355555555556,0.160355555555556},
-{2974756,3857091,3857332,0.167266666666667,0.167266666666667},
-{2974757,3853376,3853590,1000000,1000000},
-{2974758,3858862,3858544,0.193933333333333,0.218175},
-{2974759,3862732,3861553,0.608329411764706,0.827328},
-{2974760,3859249,3860319,0.619468965517241,0.641592857142857},
-{2974761,3861341,3860993,1000000,1000000},
-{2974762,3858862,3858795,0.409022222222222,0.48015652173913},
-{2974763,3858141,3858795,0.317139130434783,0.36471},
-{2974764,3858795,3859034,0.249314285714286,0.193911111111111},
-{2974765,3859034,3859592,0.2554,0.2554},
-{2974766,3857939,3858948,0.414288888888889,0.414288888888889},
-{2974767,3864346,3863294,0.730266666666667,0.730266666666667},
-{2974768,3862765,3861790,0.537925,0.561313043478261},
-{2974769,3863915,3862765,0.5754,1000000},
-{2974770,3862765,3862517,0.241090909090909,1000000},
-{2974771,3865109,3864258,1000000,0.8295},
-{2974772,3862323,3862149,1000000,0.1392375},
-{2974773,3866913,3865845,0.45825,1000000},
-{2974774,3867433,3866913,0.2616,1000000},
-{2974775,3868086,3868145,1000000,1000000},
-{2974776,3868645,3867433,0.469476923076923,1000000},
-{2974777,3868781,3867452,0.53825,0.561652173913044},
-{2974778,3868229,3867740,0.580615384615385,1000000},
-{2974779,3866368,3865890,1000000,0.26218064516129},
-{2974780,3868976,3868790,0.0695111111111111,0.0695111111111111},
-{2974781,3866998,3867248,1000000,1000000},
-{2974782,3867248,3867513,1000000,1000000},
-{2974783,3867513,3867208,1000000,1000000},
-{2974784,3867592,3867248,1000000,1000000},
-{2974785,3867917,3867513,1000000,1000000},
-{2974786,3867882,3867513,1000000,1000000},
-{2974787,3868237,3868248,1000000,1000000},
-{2974788,3868248,3867917,1000000,1000000},
-{2974789,3868248,3868186,1000000,1000000},
-{2974790,3868210,3867882,1000000,1000000},
-{2974791,3867592,3867389,1000000,1000000},
-{2974792,3868984,3868210,1000000,1000000},
-{2974793,3866933,3866368,1000000,0.317731034482759},
-{2974794,3870421,3870613,1000000,0.328736842105263},
-{2974795,3869258,3868781,0.188616,0.196475},
-{2974796,3869813,3869258,0.216575,0.207912},
-{2974797,3870519,3869813,0.453461538461538,0.436666666666667},
-{2974798,3870815,3870519,0.363408,0.349430769230769},
-{2974799,3868312,3868922,1000000,1000000},
-{2974800,3868922,3869144,1000000,1000000},
-{2974801,3869263,3868689,1000000,1000000},
-{2974802,3869938,3869110,0.382866666666667,0.382866666666667},
-{2974803,3869263,3869426,1000000,1000000},
-{2974804,3868581,3867882,1000000,1000000},
-{2974805,3868984,3868581,1000000,1000000},
-{2974806,3868289,3867592,1000000,1000000},
-{2974807,3868700,3868581,1000000,1000000},
-{2974808,3870815,3871099,0.30189375,0.3578},
-{2974809,3871347,3871322,0.314258823529412,1000000},
-{2974810,3871347,3871386,1000000,0.4584375},
-{2974811,3872489,3871929,1000000,0.3208125},
-{2974812,3869109,3868984,1000000,1000000},
-{2974813,3869263,3869109,1000000,1000000},
-{2974834,3852369,3853384,1.8913875,1.8913875},
-{2974835,3851702,3852369,0.373711111111111,1000000},
-{2974836,3852569,3852369,0.119689655172414,0.119689655172414},
-{2974837,3852898,3852569,0.176464285714286,0.176464285714286},
-{2974838,3852569,3851909,1000000,1000000},
-{2974840,3850940,3850749,0.2248,0.2248},
-{2974842,3850358,3849439,0.281151219512195,1000000},
-{2974843,3851171,3850358,0.40746,0.40746},
-{2974845,3854053,3855222,0.934718181818182,1000000},
-{2974846,3855249,3855222,0.3636,0.390533333333333},
-{2974847,3854238,3854155,0.230688,0.3204},
-{2974848,3855222,3855304,0.2346,0.1938},
-{2974849,3855304,3855686,0.411625,0.411625},
-{2974850,3855367,3855807,0.470806451612903,0.503275862068965},
-{2974851,3857836,3857491,0.162666666666667,0.162666666666667},
-{2974852,3857003,3856818,0.22365,0.22365},
-{2974853,3856818,3856426,0.176844444444444,0.217036363636364},
-{2974854,3854233,3854420,0.0840888888888889,0.0840888888888889},
-{2974855,3854420,3854612,0.117777777777778,0.117777777777778},
-{2974856,3854825,3854916,1000000,1000000},
-{2974857,3854825,3854420,0.201511111111111,0.201511111111111},
-{2974858,3855369,3854825,0.241822222222222,0.241822222222222},
-{2974859,3855369,3855487,1000000,1000000},
-{2974860,3854825,3854937,1000000,1000000},
-{2974861,3854937,3854612,0.153022222222222,0.153022222222222},
-{2974862,3854937,3855369,0.265533333333333,0.265533333333333},
-{2974863,3854937,3855023,1000000,1000000},
-{2974864,3855690,3855626,0.0481333333333333,0.0481333333333333},
-{2974865,3856426,3855690,0.288422222222222,0.288422222222222},
-{2974866,3856389,3855427,1000000,0.347477419354839},
-{2974867,3856823,3856389,1000000,0.151158620689655},
-{2974868,3859002,3857604,0.61485,0.662146153846154},
-{2974869,3858679,3859034,1000000,0.279988235294118},
-{2974870,3859034,3860265,0.606138461538462,0.606138461538462},
-{2974871,3860265,3861168,0.473025,0.454104},
-{2974872,3860458,3861168,0.335555555555556,0.335555555555556},
-{2974873,3860890,3861168,0.435688888888889,0.435688888888889},
-{2974874,3861244,3861168,0.165385714285714,0.185232},
-{2974875,3861315,3860737,0.266355555555556,0.266355555555556},
-{2974876,3861821,3861680,0.160938461538462,0.181930434782609},
-{2974877,3862190,3862002,0.18675,0.18675},
-{2974878,3862149,3862190,1000000,0.405844444444444},
-{2974879,3861568,3861191,0.355608,1000000},
-{2974880,3863055,3862428,0.41256,1000000},
-{2974881,3862785,3862731,0.291020689655172,1000000},
-{2974882,3859824,3859086,0.590928,0.703485714285714},
-{2974883,3861191,3860714,0.449575,1000000},
-{2974884,3861612,3861209,1000000,0.437064},
-{2974885,3863137,3862952,1000000,0.263717647058824},
-{2974886,3865031,3864383,1000000,0.4366125},
-{2974887,3865026,3864145,0.438490909090909,1000000},
-{2974888,3867657,3866933,1000000,0.4048},
-{2974889,3869423,3868700,1000000,1000000},
-{2974890,3868674,3868289,1000000,1000000},
-{2974891,3868674,3868443,1000000,1000000},
-{2974892,3869423,3869695,1000000,1000000},
-{2974893,3869701,3869695,1000000,1000000},
-{2974894,3869586,3869423,1000000,1000000},
-{2974895,3869186,3868674,1000000,1000000},
-{2974896,3869435,3869186,1000000,1000000},
-{2974897,3869844,3869701,1000000,1000000},
-{2974898,3869951,3869844,1000000,1000000},
-{2974899,3870141,3869951,1000000,1000000},
-{2974900,3869653,3869435,1000000,1000000},
-{2974901,3869918,3869653,1000000,1000000},
-{2974902,3870205,3869918,1000000,1000000},
-{2974903,3869844,3869435,1000000,1000000},
-{2974904,3869951,3869653,1000000,1000000},
-{2974905,3869918,3870141,1000000,1000000},
-{2974906,3871015,3870721,0.39558,1000000},
-{2974907,3868995,3868060,0.56721,1000000},
-{2974908,3869221,3868995,0.218682352941176,1000000},
-{2974909,3868995,3868760,0.1968,0.1968},
-{2974910,3869461,3868995,1000000,0.314305263157895},
-{2974911,3871561,3871209,0.235888888888889,0.235888888888889},
-{2974912,3871313,3871414,0.149111111111111,0.149111111111111},
-{2974913,3871570,3871784,1000000,0.41364},
-{2974914,3872118,3871570,0.25038,0.294564705882353},
-{2974915,3872428,3872118,0.15429,0.220414285714286},
-{2974916,3871504,3871570,1000000,0.203633333333333},
-{2974917,3871463,3871504,0.134953846153846,0.08772},
-{2974918,3871829,3871504,1000000,0.2358},
-{2974919,3872231,3872118,0.3414375,1000000},
-{2974920,3872231,3871829,1000000,0.213366666666667},
-{2974921,3872906,3872579,1000000,1000000},
-{2974922,3872447,3872231,0.315388235294118,1000000},
-{2974923,3872771,3872447,0.168529411764706,0.168529411764706},
-{2974924,3871561,3871990,1000000,1000000},
-{2974925,3871660,3871561,1000000,1000000},
-{2974926,3873215,3873446,1000000,0.24372},
-{2974927,3873215,3873486,0.433244444444444,0.433244444444444},
-{2974928,3874329,3874482,0.120525,1000000},
-{2974929,3874482,3874694,0.199227272727273,1000000},
-{2974930,3874694,3874485,0.12003,0.12003},
-{2974931,3874948,3874833,0.11044,0.11044},
-{2974932,3874974,3875207,0.25305,1000000},
-{2974933,3871039,3871568,0.244823076923077,1000000},
-{2974934,3871568,3871461,1000000,1000000},
-{2974935,3871822,3872683,0.40212,0.40212},
-{2974936,3872683,3873819,0.511444444444444,1000000},
-{2974937,3868578,3870250,1000000,0.96351},
-{2974938,3868761,3869260,1000000,0.348808695652174},
-{2974939,3869260,3869800,0.281904,0.281904},
-{2974940,3869800,3870307,0.330314285714286,0.239193103448276},
-{2974941,3870896,3870307,0.23195,1000000},
-{2974942,3870307,3869447,0.393031578947368,1000000},
-{2974943,3867673,3867552,0.0605357142857143,1000000},
-{2974944,3867552,3866777,0.33024,1000000},
-{2974945,3867454,3867464,1000000,0.204033333333333},
-{2974946,3867464,3868321,0.468766666666667,0.468766666666667},
-{2974947,3869260,3868418,0.643421052631579,0.643421052631579},
-{2974948,3867464,3867814,1000000,0.26031},
-{2974949,3868418,3867814,0.3408,0.30672},
-{2974950,3870307,3870579,0.181539130434783,0.189790909090909},
-{2974951,3870579,3871130,0.365976,0.365976},
-{2974952,3870579,3869976,0.513514285714286,0.422894117647059},
-{2974953,3869976,3869483,0.3065,0.324529411764706},
-{2974954,3866421,3865040,0.693694736842105,1000000},
-{2974955,3866421,3866464,0.417514285714286,0.40311724137931},
-{2974956,3866915,3866464,0.156466666666667,0.156466666666667},
-{2974957,3866464,3866474,0.2774,0.24966},
-{2974958,3867117,3866474,0.340010526315789,0.340010526315789},
-{2974959,3864937,3863845,0.527921739130435,1000000},
-{2974960,3864959,3864279,0.336545454545455,1000000},
-{2974961,3863530,3862752,0.7356,0.630514285714286},
-{2974962,3864279,3864404,0.446008695652174,1000000},
-{2974963,3863379,3863050,0.2294,0.2294},
-{2974964,3862088,3861638,0.447825,0.421482352941176},
-{2974965,3862553,3862088,1000000,0.417233333333333},
-{2974966,3862395,3862088,0.324917647058824,1000000},
-{2974967,3862553,3862395,0.114133333333333,1000000},
-{2974968,3862941,3862553,0.316,0.334588235294118},
-{2974969,3864216,3863281,1000000,0.7010625},
-{2974970,3864200,3864216,1000000,0.252857142857143},
-{2974971,3861909,3861655,0.239813793103448,0.278184},
-{2974972,3864499,3864206,1000000,1000000},
-{2974973,3864505,3864499,1000000,1000000},
-{2974974,3864769,3864505,0.30324,0.30324},
-{2974975,3864499,3864769,1000000,1000000},
-{2974976,3858587,3858073,1000000,1000000},
-{2974977,3859086,3858587,0.250714285714286,0.219375},
-{2974978,3860412,3859647,0.424,0.565333333333333},
-{2974979,3861036,3860412,0.326765217391304,0.326765217391304},
-{2974980,3859383,3859086,0.126488888888889,0.148486956521739},
-{2974981,3859953,3859383,0.284225,0.272856},
-{2974982,3859383,3858742,0.612518181818182,0.44918},
-{2974983,3857751,3856687,1000000,0.388821428571429},
-{2974984,3859085,3858959,0.170481818181818,0.2344125},
-{2974985,3858959,3858708,0.315933333333333,0.355425},
-{2974986,3860027,3858959,0.62895,0.62895},
-{2974987,3861655,3860786,0.62454,0.462622222222222},
-{2974988,3857806,3856818,1000000,0.41676},
-{2974989,3857806,3856823,1000000,0.49945},
-{2974990,3854691,3855274,1000000,0.386833333333333},
-{2974991,3855198,3855460,0.281866666666667,0.281866666666667},
-{2974992,3855303,3855198,0.314288888888889,0.314288888888889},
-{2974993,3856063,3855303,0.41025,0.41025},
-{2974994,3855743,3856515,0.32395,0.32395},
-{2974995,3853178,3852842,1000000,1000000},
-{2974996,3855084,3855345,0.450066666666667,0.450066666666667},
-{2974997,3854895,3855186,0.42918,0.3732},
-{2974998,3851746,3851649,0.108733333333333,0.108733333333333},
-{2974999,3850218,3850755,1000000,1000000},
-{2975000,3850755,3851565,1000000,1000000},
-{2975001,3851565,3851634,0.135128571428571,0.140133333333333},
-{2975002,3849752,3850249,0.422112,0.458817391304348},
-{2975003,3850249,3851175,0.635866666666667,0.635866666666667},
-{2975006,3850249,3849696,0.4236,0.4236},
-{2975007,3849109,3849696,0.438333333333333,0.438333333333333},
-{2975021,3851361,3850502,0.426288888888889,0.426288888888889},
-{2975022,3852691,3852472,0.320377777777778,0.320377777777778},
-{2975023,3852855,3852691,0.0705111111111111,0.0705111111111111},
-{2975024,3852632,3852184,0.131897142857143,0.139890909090909},
-{2975026,3850839,3850487,0.176733333333333,0.176733333333333},
-{2975027,3855708,3854895,0.335828571428571,0.284945454545455},
-{2975028,3856013,3855708,0.155688888888889,0.17515},
-{2975029,3856613,3856761,0.289107692307692,0.341672727272727},
-{2975030,3857162,3856613,0.302129032258065,0.346888888888889},
-{2975031,3857120,3857372,1.62432857142857,1.62432857142857},
-{2975032,3854486,3854610,0.346263157894737,0.4111875},
-{2975033,3856013,3854622,0.695422222222222,0.670585714285714},
-{2975034,3857372,3857141,0.143223529411765,0.115942857142857},
-{2975035,3858278,3858470,0.176625,0.148736842105263},
-{2975036,3858708,3857948,1.43796,0.653618181818182},
-{2975037,3860494,3859767,1000000,1000000},
-{2975038,3859226,3858578,1000000,1.2522},
-{2975039,3860530,3859644,1000000,0.840366666666667},
-{2975040,3860352,3860117,0.383060869565217,0.383060869565217},
-{2975041,3860117,3859761,0.303313043478261,0.3171},
-{2975042,3860549,3860117,0.240081818181818,0.22964347826087},
-{2975043,3860530,3861551,0.7133,1000000},
-{2975044,3862878,3861412,0.745707692307692,0.80785},
-{2975045,3862217,3861115,0.793061538461538,0.589131428571429},
-{2975046,3862721,3862419,0.201208695652174,0.201208695652174},
-{2975047,3863200,3862721,0.41268,0.41268},
-{2975048,3861961,3860900,0.745567741935484,0.924504},
-{2975049,3861604,3861278,0.442171428571428,0.442171428571428},
-{2975050,3862419,3862070,0.373831578947368,0.373831578947368},
-{2975051,3862073,3861961,0.154852173913043,1000000},
-{2975052,3863012,3862702,1000000,1000000},
-{2975053,3863200,3863012,1000000,1000000},
-{2975054,3858578,3859105,0.396766666666667,0.35709},
-{2975055,3859105,3859555,0.376228571428572,0.303876923076923},
-{2975056,3859761,3859105,0.503034782608696,0.503034782608696},
-{2975057,3859105,3858588,0.65901,0.65901},
-{2975058,3863559,3863989,0.704504347826087,0.648144},
-{2975059,3863989,3863200,1000000,0.390111111111111},
-{2975060,3863989,3864245,0.175153846153846,0.162642857142857},
-{2975061,3864350,3863989,1000000,1000000},
-{2975062,3866179,3865790,0.292909090909091,0.280173913043478},
-{2975063,3866474,3866179,0.199915384615385,0.167670967741935},
-{2975064,3867501,3866179,1000000,0.979753846153846},
-{2975065,3867730,3865790,0.6988,1.10985882352941},
-{2975066,3868650,3868907,1000000,0.602742857142857},
-{2975067,3866373,3866859,0.568957894736842,0.491372727272727},
-{2975068,3866859,3867658,0.281731034482759,0.281731034482759},
-{2975069,3867406,3867658,0.461526315789474,0.461526315789474},
-{2975070,3867658,3868384,1000000,0.312208695652174},
-{2975071,3871406,3871260,1000000,1000000},
-{2975072,3871406,3872205,0.320318181818182,0.370894736842105},
-{2975073,3872199,3871626,0.3853875,0.440442857142857},
-{2975074,3869920,3870404,1000000,1000000},
-{2975075,3869724,3869783,0.1394,0.1394},
-{2975076,3870566,3871210,1000000,0.517472727272727},
-{2975077,3872546,3871812,0.290060869565217,0.266856},
-{2975078,3873119,3872912,0.347855172413793,0.403512},
-{2975079,3873283,3872546,0.289569230769231,0.268885714285714},
-{2975080,3873178,3873119,0.0493071428571429,0.0531},
-{2975081,3873544,3873178,0.1524,0.1778},
-{2975082,3872568,3871775,1000000,0.452672727272727},
-{2975083,3874457,3873283,0.487355555555556,0.487355555555556},
-{2975084,3874352,3873544,0.3552,0.3552},
-{2975085,3866373,3866449,0.637324137931035,0.61608},
-{2975086,3868688,3868404,0.267864,0.478328571428571},
-{2975087,3849627,3849376,0.287557894736842,0.287557894736842},
-{2975088,3849715,3849627,0.0646857142857143,0.0646857142857143},
-{2975089,3850282,3849627,0.402177777777778,0.402177777777778},
-{2975090,3850394,3850282,0.0891818181818182,0.115411764705882},
-{2975091,3850032,3849715,0.29379,0.29379},
-{2975092,3850282,3849985,0.220155555555556,0.220155555555556},
-{2975093,3852301,3851770,0.256755555555556,0.256755555555556},
-{2975094,3852011,3852301,1000000,1000000},
-{2975095,3852301,3852629,0.225366666666667,0.225366666666667},
-{2975096,3851453,3850212,0.578177777777778,0.578177777777778},
-{2975097,3852407,3853170,0.439622222222222,0.439622222222222},
-{2975098,3852359,3852156,0.0761777777777778,0.0761777777777778},
-{2975099,3852359,3852728,0.311822222222222,1000000},
-{2975100,3854134,3852359,0.757933333333333,0.757933333333333},
-{2975101,3856906,3855255,0.7152,0.7152},
-{2975102,3857349,3856906,0.2271,0.252333333333333},
-{2975103,3858578,3858202,1000000,0.641446153846154},
-{2975104,3858202,3858093,1000000,0.562875},
-{2975105,3854371,3853150,0.764072727272727,0.509381818181818},
-{2975106,3856906,3855814,1000000,0.71328},
-{2975107,3858122,3857349,0.38615,0.38615},
-{2975108,3858549,3858122,0.295010526315789,0.295010526315789},
-{2975109,3859555,3860120,0.33005,0.3444},
-{2975110,3860267,3860973,0.5828,0.5828},
-{2975111,3859151,3859674,0.334757142857143,0.446342857142857},
-{2975112,3861494,3861437,0.393184615384615,0.538042105263158},
-{2975113,3861215,3861723,0.278,0.278},
-{2975114,3850032,3849809,0.15759,0.15759},
-{2975115,3849809,3850198,0.2622,0.2622},
-{2975116,3850198,3850270,0.0618521739130435,0.056904},
-{2975117,3850599,3850270,0.274090909090909,0.287142857142857},
-{2975118,3850561,3850032,0.332921739130435,0.332921739130435},
-{2975119,3850645,3850394,0.320809090909091,0.35289},
-{2975120,3850645,3850561,0.0789333333333333,0.07104},
-{2975121,3851274,3850645,0.43761,0.43761},
-{2975122,3850394,3850951,0.264711111111111,0.264711111111111},
-{2975123,3851274,3850951,0.251114285714286,0.277547368421053},
-{2975124,3851741,3851274,0.484476923076923,0.484476923076923},
-{2975438,3884286,3883627,0.630466666666667,1000000},
-{2975439,3886372,3885663,1000000,0.528381818181818},
-{2975440,3886896,3886372,0.475,1000000},
-{2975441,3887221,3886896,0.2822,1000000},
-{2975442,3887339,3887278,0.0647625,0.0314},
-{2975443,3886270,3886896,0.452452173913043,1000000},
-{2975444,3885264,3885952,0.351422222222222,0.412539130434783},
-{2975445,3889561,3890065,1000000,1000000},
-{2975446,3875393,3875476,0.0324,0.0324},
-{2975447,3877956,3878102,0.24888,1000000},
-{2975448,3877854,3877956,0.211114285714286,1000000},
-{2975449,3880703,3880471,0.233933333333333,1000000},
-{2975450,3880703,3880965,1000000,0.191563636363636},
-{2975451,3880492,3880703,1000000,0.261214285714286},
-{2975452,3883451,3882763,1000000,0.515971428571429},
-{2975453,3884003,3883451,1000000,0.459757894736842},
-{2975454,3883730,3884003,1000000,0.236576470588235},
-{2975455,3884707,3884286,0.396663157894737,1000000},
-{2975456,3885141,3884707,0.35496,1000000},
-{2975457,3884707,3885264,1000000,0.359372727272727},
-{2975458,3884306,3884707,1000000,0.331768421052632},
-{2975459,3884003,3884306,1000000,0.2511},
-{2975460,3884389,3884003,1000000,0.320305263157895},
-{2975461,3885630,3886270,1000000,1000000},
-{2975462,3886977,3886701,1000000,0.256989473684211},
-{2975463,3886376,3886977,1000000,0.418982608695652},
-{2975464,3887217,3886977,1000000,0.20583},
-{2975465,3888066,3887691,0.264914285714286,1000000},
-{2975466,3885377,3885695,1000000,0.291882352941177},
-{2975467,3884557,3885031,0.305863636363636,1000000},
-{2975468,3886085,3885755,1000000,1000000},
-{2975469,3891335,3892550,1000000,1000000},
-{2975470,3892550,3892708,1000000,1000000},
-{2975471,3892510,3891335,1000000,1000000},
-{2975472,3893406,3892855,1000000,1000000},
-{2975473,3890844,3890883,0.0501454545454545,0.0501454545454545},
-{2975474,3890883,3891006,0.270545454545455,0.270545454545455},
-{2975475,3893278,3893249,0.06656,0.0768},
-{2975476,3893173,3893605,0.6421,0.6421},
-{2975477,3893782,3894341,0.45549,1000000},
-{2975478,3889416,3889797,0.228190909090909,1000000},
-{2975479,3875315,3875535,0.124936363636364,0.119504347826087},
-{2975480,3875535,3876163,0.3654,0.315572727272727},
-{2975481,3877045,3876821,0.14058,1000000},
-{2975482,3877332,3877045,0.148028571428571,1000000},
-{2975483,3877491,3877332,1000000,1000000},
-{2975484,3877545,3877491,1000000,1000000},
-{2975485,3877165,3877672,1000000,1000000},
-{2975486,3877672,3878154,1000000,1000000},
-{2975487,3881773,3882079,0.4511,1000000},
-{2975488,3881803,3882112,0.322482352941176,0.322482352941176},
-{2975489,3884852,3885377,1000000,0.36591},
-{2975490,3885433,3885761,1000000,0.258157894736842},
-{2975491,3884891,3885433,1000000,0.317660869565217},
-{2975492,3885957,3886348,1000000,0.234133333333333},
-{2975493,3888621,3889416,0.47343,1000000},
-{2975494,3888065,3888621,0.287921739130435,1000000},
-{2975495,3889307,3890011,0.352444444444444,1000000},
-{2975496,3888733,3889307,0.273648,1000000},
-{2975497,3887142,3887617,0.2916,1000000},
-{2975498,3886806,3887142,0.2532,1000000},
-{2975499,3890362,3891359,0.742863157894737,1000000},
-{2975500,3890011,3890362,0.227918181818182,1000000},
-{2975501,3891851,3891563,1000000,0.281191304347826},
-{2975502,3892124,3892857,0.463707692307692,0.6698},
-{2975503,3891873,3892150,1000000,0.4584},
-{2975504,3892150,3892439,0.3892875,1000000},
-{2975505,3892118,3891851,1000000,0.327221052631579},
-{2975506,3891851,3892150,1000000,0.187488},
-{2975507,3891450,3891851,1000000,0.242208},
-{2975508,3891093,3891450,1000000,0.222681818181818},
-{2975509,3890416,3891093,1000000,0.389688},
-{2975510,3893657,3893907,0.250581818181818,0.196885714285714},
-{2975511,3893400,3893657,0.226275,0.164563636363636},
-{2975512,3892857,3893400,0.45795652173913,0.405115384615385},
-{2975513,3893815,3893546,0.953785714285714,0.8345625},
-{2975514,3893907,3893318,1000000,0.439246153846154},
-{2975515,3894567,3893907,1000000,0.406489655172414},
-{2975516,3894286,3893657,0.420921428571429,0.7366125},
-{2975517,3894011,3893400,0.514095652173913,0.492675},
-{2975518,3893815,3894317,0.24495,0.236503448275862},
-{2975519,3895085,3893800,0.827657142857143,1000000},
-{2975520,3895163,3894863,0.1968,0.1968},
-{2975521,3889889,3889572,1000000,0.32667},
-{2975522,3889889,3890416,0.403421052631579,1000000},
-{2975523,3890181,3889889,1000000,1000000},
-{2975524,3876834,3876961,1000000,1000000},
-{2975525,3876961,3876716,1000000,1000000},
-{2975526,3876716,3876311,1000000,1000000},
-{2975527,3876311,3876011,0.128777777777778,0.128777777777778},
-{2975528,3879728,3879534,0.2200875,1000000},
-{2975529,3879924,3879583,0.433892307692308,1000000},
-{2975530,3880197,3879924,0.1684,0.1684},
-{2975531,3878226,3878270,0.156022222222222,0.156022222222222},
-{2975532,3885412,3884938,1000000,0.34947},
-{2975533,3886201,3886676,1000000,0.311060869565217},
-{2975534,3887332,3888033,0.35421,1000000},
-{2975535,3886077,3886904,0.458895652173913,1000000},
-{2975536,3887157,3887833,0.281544,0.391033333333333},
-{2975537,3890395,3890400,0.217333333333333,0.217333333333333},
-{2975538,3891410,3891408,0.278488888888889,0.278488888888889},
-{2975539,3876992,3876730,1000000,1000000},
-{2975540,3877478,3877845,1000000,1000000},
-{2975541,3879146,3878484,1000000,1000000},
-{2975542,3879416,3879146,1000000,1000000},
-{2975543,3878771,3879146,1000000,1000000},
-{2975544,3879521,3879756,1000000,1000000},
-{2975545,3879521,3879592,1000000,1000000},
-{2975546,3879506,3879521,1000000,1000000},
-{2975547,3879592,3880015,1000000,1000000},
-{2975548,3880015,3879756,1000000,1000000},
-{2975549,3879578,3879416,1000000,1000000},
-{2975550,3879693,3879578,1000000,1000000},
-{2975551,3880246,3880015,1000000,1000000},
-{2975552,3880506,3880246,1000000,1000000},
-{2975553,3884456,3884891,1000000,0.278181818181818},
-{2975554,3885761,3885926,1000000,0.0950857142857143},
-{2975555,3885865,3885926,1000000,0.1542375},
-{2975556,3885926,3886251,1000000,0.292457142857143},
-{2975557,3876961,3877220,1000000,1000000},
-{2975558,3877220,3877264,1000000,1000000},
-{2975559,3877220,3877112,1000000,1000000},
-{2975560,3874483,3874239,1000000,1000000},
-{2975561,3874886,3874483,0.206022222222222,0.206022222222222},
-{2975562,3873819,3874044,0.272025,1000000},
-{2975563,3867298,3867239,1000000,0.1113},
-{2975564,3870989,3870953,0.298955555555556,0.298955555555556},
-{2975565,3871099,3871171,0.0804857142857143,0.107314285714286},
-{2975566,3857591,3857349,0.280581818181818,1000000},
-{2975571,3868634,3868791,1000000,1000000},
-{2975572,3868791,3868846,1000000,1000000},
-{2975573,3865096,3865162,0.241266666666667,0.241266666666667},
-{2975574,3886231,3886444,1000000,0.540913043478261},
-{2975575,3886591,3886890,0.399624,1000000},
-{2975576,3887040,3887251,1000000,0.3678},
-{2975577,3887371,3887568,0.256863157894737,1000000},
-{2975578,3886444,3886524,1000000,0.173366666666667},
-{2975579,3886524,3886686,1000000,0.263628571428571},
-{2975580,3886153,3886524,0.272766666666667,1000000},
-{2975581,3885502,3885875,0.173890909090909,1000000},
-{2975582,3885760,3885875,0.152458064516129,1000000},
-{2975583,3886686,3886963,1000000,0.429},
-{2975584,3886890,3887116,0.378234782608696,1000000},
-{2975585,3887251,3887524,1000000,0.3535},
-{2975586,3887568,3887872,0.3285,1000000},
-{2975587,3887116,3887402,0.431590909090909,1000000},
-{2975588,3887872,3888178,0.388486956521739,1000000},
-{2975589,3888897,3889189,0.4514,1000000},
-{2975590,3889189,3889895,0.443810526315789,0.42162},
-{2975591,3889260,3889486,0.174833333333333,1000000},
-{2975592,3888569,3889260,0.367278260869565,1000000},
-{2975593,3889260,3889666,1000000,0.379673684210526},
-{2975594,3879724,3879737,1000000,1000000},
-{2975595,3879737,3879747,1000000,1000000},
-{2975596,3885875,3886029,0.220448275862069,1000000},
-{2975597,3887213,3887577,1000000,0.4248},
-{2975598,3887979,3888245,0.382547368421053,1000000},
-{2975599,3888486,3888555,0.265244444444444,0.265244444444444},
-{2975600,3888555,3888574,0.24528,1000000},
-{2975601,3888555,3888811,1000000,0.1404},
-{2975602,3888811,3888789,1000000,1000000},
-{2975603,3886380,3886371,1000000,0.1896},
-{2975604,3885966,3886371,1000000,0.262764705882353},
-{2975605,3886371,3886868,1000000,0.285542857142857},
-{2975606,3886371,3886599,1000000,0.510027272727273},
-{2975607,3887107,3887112,0.0664702702702703,0.0702685714285714},
-{2975608,3886871,3887329,0.26205,1000000},
-{2975609,3887329,3887444,0.142376470588235,1000000},
-{2975610,3887329,3887518,1000000,1000000},
-{2975611,3887847,3888243,0.204109090909091,1000000},
-{2975612,3886599,3886564,1000000,0.3518625},
-{2975613,3888811,3889502,1000000,0.275446153846154},
-{2975614,3885469,3885424,1000000,1000000},
-{2975615,3885874,3885469,1000000,1000000},
-{2975616,3885392,3885469,1000000,1000000},
-{2975617,3888225,3888876,0.594155555555556,0.594155555555556},
-{2975622,3891006,3890902,0.267945454545455,0.267945454545455},
-{2975623,3897916,3897504,0.34256,0.25692},
-{2975624,3899518,3899628,0.61,0.665454545454545},
-{2975625,3899258,3899628,0.141270967741935,0.156407142857143},
-{2975626,3899961,3900519,0.496515789473684,1000000},
-{2975627,3900940,3900359,0.467536363636364,1000000},
-{2975628,3896454,3897827,0.400814634146341,0.421369230769231},
-{2975629,3897827,3898183,0.0996166666666667,0.089655},
-{2975630,3898183,3898535,0.100578947368421,0.093219512195122},
-{2975631,3898535,3898867,0.100105263157895,0.0951},
-{2975632,3898867,3899258,0.14576,0.141058064516129},
-{2975633,3898721,3898951,0.202870588235294,0.202870588235294},
-{2975634,3898951,3899273,0.267375,1000000},
-{2975635,3898244,3898646,0.380964705882353,0.380964705882353},
-{2975636,3889466,3890277,1000000,1000000},
-{2975637,3890277,3890557,0.223684615384615,1000000},
-{2975638,3890557,3890996,0.307264285714286,1000000},
-{2975639,3890996,3891310,0.220371428571429,1000000},
-{2975640,3891310,3890290,0.581975,1000000},
-{2975641,3892343,3892093,0.1392,0.1392},
-{2975642,3889780,3890615,0.4297875,0.45844},
-{2975643,3890615,3891200,0.323554838709677,0.33434},
-{2975644,3891200,3891153,0.25528,0.15955},
-{2975645,3891819,3891200,1000000,0.6308},
-{2975646,3892294,3891819,1000000,1000000},
-{2975647,3892294,3893118,1000000,0.733661538461539},
-{2975648,3890332,3890418,1000000,0.360490909090909},
-{2975649,3891208,3891763,0.23288275862069,1000000},
-{2975650,3891763,3892295,0.259938461538462,1000000},
-{2975651,3892295,3893054,0.344136,1000000},
-{2975652,3893002,3893054,1000000,0.324825},
-{2975653,3893054,3893101,1000000,0.273466666666667},
-{2975654,3891763,3891870,1000000,0.381886956521739},
-{2975655,3891870,3891942,1000000,0.191784},
-{2975656,3898472,3899847,0.462811764705882,0.629424},
-{2975657,3899847,3899947,0.204422222222222,0.204422222222222},
-{2975658,3898771,3898472,0.276662068965517,0.40116},
-{2975659,3899622,3898819,0.337755555555556,0.337755555555556},
-{2975660,3899654,3899622,0.116088888888889,0.116088888888889},
-{2975661,3899608,3899622,0.0898666666666667,0.0898666666666667},
-{2975662,3899608,3899128,0.212555555555556,0.212555555555556},
-{2975663,3899696,3899847,0.303925714285714,0.35458},
-{2975664,3900213,3900410,1000000,0.22614},
-{2975665,3900410,3900418,1000000,0.0949555555555555},
-{2975666,3900410,3900448,0.0969333333333333,0.0969333333333333},
-{2975667,3900448,3901537,0.530822222222222,0.530822222222222},
-{2975668,3900418,3901001,0.263844444444444,0.263844444444444},
-{2975669,3901001,3901436,0.177155555555556,0.177155555555556},
-{2975670,3900410,3901035,0.584169230769231,0.584169230769231},
-{2975671,3900448,3901075,0.281088888888889,0.281088888888889},
-{2975672,3901035,3901001,0.0871111111111111,0.0871111111111111},
-{2975673,3901035,3901075,0.0910444444444444,0.0910444444444444},
-{2975674,3901479,3901035,0.377953846153846,0.223336363636364},
-{2975675,3901075,3901511,0.183688888888889,0.183688888888889},
-{2975676,3901436,3901402,0.074,0.074},
-{2975677,3901436,3901479,0.0919333333333333,0.0919333333333333},
-{2975678,3901479,3901511,0.0910444444444444,0.0910444444444444},
-{2975679,3901511,3901537,0.0834666666666667,0.0834666666666667},
-{2975680,3901436,3902307,0.343088888888889,0.343088888888889},
-{2975681,3901479,3902340,0.350330769230769,0.350330769230769},
-{2975682,3901511,3902389,0.340311111111111,0.340311111111111},
-{2975683,3901537,3902416,0.339577777777778,0.339577777777778},
-{2975684,3902273,3902307,0.11577,0.15436},
-{2975685,3902307,3902340,0.113809090909091,0.131778947368421},
-{2975686,3902340,3902389,0.104832,0.104832},
-{2975687,3902389,3902416,0.126252631578947,0.126252631578947},
-{2975688,3900439,3900250,0.1372875,0.129211764705882},
-{2975689,3900718,3900724,1000000,1000000},
-{2975690,3900444,3900439,1000000,1000000},
-{2975691,3900769,3900718,1000000,1000000},
-{2975692,3900769,3900444,1000000,1000000},
-{2975693,3900424,3900444,1000000,1000000},
-{2975694,3902255,3902273,0.0742645161290322,0.100095652173913},
-{2975695,3882242,3882646,1000000,0.340835294117647},
-{2975696,3886770,3887003,1000000,0.378081818181818},
-{2975697,3887153,3887463,0.484129411764706,1000000},
-{2975698,3887773,3888141,1000000,0.395571428571429},
-{2975699,3885036,3885322,1000000,0.732642857142857},
-{2975700,3886539,3886770,1000000,0.390457142857143},
-{2975701,3886900,3887153,0.400894736842105,1000000},
-{2975702,3886900,3886539,0.31088,1000000},
-{2975703,3886445,3886539,1000000,0.15669},
-{2975704,3886763,3886900,0.185481818181818,1000000},
-{2975705,3886338,3886445,1000000,0.20478},
-{2975706,3886664,3886763,0.150571428571429,1000000},
-{2975707,3886338,3886664,0.225852631578947,1000000},
-{2975708,3887257,3887773,1000000,0.535330434782609},
-{2975709,3888803,3889417,1000000,0.386966666666667},
-{2975710,3889417,3890064,1000000,0.37617},
-{2975711,3889959,3890064,0.546128571428572,1000000},
-{2975712,3889686,3889689,0.1176,0.1176},
-{2975713,3890050,3890055,0.118933333333333,0.118933333333333},
-{2975714,3889426,3889689,0.110066666666667,0.1143},
-{2975715,3889689,3890055,0.145944827586207,0.145944827586207},
-{2975716,3890587,3890648,1000000,0.203422222222222},
-{2975717,3889424,3890648,1000000,0.534955555555556},
-{2975718,3890648,3890689,1000000,0.17355},
-{2975719,3891942,3892011,1000000,0.296928},
-{2975720,3891535,3892011,0.255541935483871,0.282921428571429},
-{2975721,3892011,3892860,0.366766666666667,0.471557142857143},
-{2975722,3891349,3891267,0.370772727272727,0.370772727272727},
-{2975723,3889882,3890563,0.5961,1000000},
-{2975724,3888043,3889010,0.460338461538462,1000000},
-{2975725,3889010,3889565,0.351371428571429,1000000},
-{2975726,3890313,3891148,1000000,0.569423076923077},
-{2975727,3889565,3890016,0.373058823529412,1000000},
-{2975728,3890016,3890313,1000000,0.2137},
-{2975729,3895393,3895463,0.331270588235294,0.331270588235294},
-{2975730,3895463,3896445,0.624354545454545,0.624354545454545},
-{2975731,3896445,3896314,0.344428571428571,0.314478260869565},
-{2975732,3894192,3895279,0.737563636363636,0.81132},
-{2975733,3895279,3896149,0.733,0.573652173913043},
-{2975734,3894259,3895191,0.633272727272727,0.87075},
-{2975735,3895191,3895279,0.53724,0.424136842105263},
-{2975736,3896149,3897039,0.7792875,0.6927},
-{2975737,3896761,3897039,0.354085714285714,0.354085714285714},
-{2975738,3895191,3895987,0.61668,0.560618181818182},
-{2975739,3895987,3896761,0.7881,0.649023529411765},
-{2975740,3894325,3895007,0.473228571428571,0.523042105263158},
-{2975741,3895007,3895191,0.523036363636364,0.261518181818182},
-{2975742,3894794,3895007,1000000,0.4089},
-{2975743,3895007,3895762,0.529721739130435,0.641242105263158},
-{2975744,3898821,3898305,1000000,1000000},
-{2975745,3898740,3899521,1000000,1000000},
-{2975746,3898821,3898740,1000000,1000000},
-{2975747,3899621,3898821,1000000,1000000},
-{2975748,3901875,3899621,1000000,1000000},
-{2975749,3902480,3899521,1000000,1000000},
-{2975750,3902480,3901875,0.522266666666667,0.522266666666667},
-{2975751,3897601,3897128,1000000,1000000},
-{2975752,3897128,3896789,1000000,1000000},
-{2975753,3899621,3900346,1000000,1000000},
-{2975754,3884527,3884808,1000000,0.427114285714286},
-{2975755,3884531,3885459,0.500372727272727,1000000},
-{2975756,3885459,3886288,0.396264,1000000},
-{2975757,3886048,3886338,1000000,0.492252631578947},
-{2975758,3886288,3886664,0.515485714285714,1000000},
-{2975759,3886707,3887257,1000000,0.692072727272727},
-{2975760,3887358,3888112,1000000,0.390052173913044},
-{2975761,3888112,3888703,1000000,0.3068},
-{2975762,3889303,3889565,0.24003,1000000},
-{2975763,3888703,3889303,0.410191304347826,1000000},
-{2975764,3888703,3889148,1000000,0.216816},
-{2975765,3889148,3889774,1000000,0.383376923076923},
-{2975766,3889774,3890016,1000000,0.199309090909091},
-{2975767,3890890,3891804,1000000,0.733982608695652},
-{2975768,3891829,3892114,0.150235714285714,1000000},
-{2975769,3891446,3891829,0.19086,1000000},
-{2975770,3891032,3891446,0.219346153846154,1000000},
-{2975771,3890957,3891032,0.0503454545454545,0.069225},
-{2975772,3891446,3891630,0.157977777777778,0.157977777777778},
-{2975773,3891630,3892002,0.208155555555556,0.208155555555556},
-{2975774,3891829,3892002,0.153466666666667,0.153466666666667},
-{2975775,3895762,3896562,0.652976470588235,0.6167},
-{2975776,3896305,3896562,0.364233333333333,0.385658823529412},
-{2975777,3896051,3896305,0.384733333333333,0.329771428571429},
-{2975778,3894544,3894794,1000000,0.29475},
-{2975779,3894437,3894544,1000000,0.164866666666667},
-{2975780,3894808,3894437,0.3550875,0.315633333333333},
-{2975781,3895204,3894808,0.30297,1000000},
-{2975782,3894808,3895172,0.33824,1000000},
-{2975783,3896562,3896761,0.316326315789474,0.316326315789474},
-{2975784,3896562,3897026,0.348157894736842,0.348157894736842},
-{2975785,3885835,3885976,0.31695,1000000},
-{2975786,3885493,3885976,0.218375,0.291166666666667},
-{2975787,3885976,3886721,0.557717647058824,1000000},
-{2975788,3885920,3887082,0.426051428571429,0.5142},
-{2975789,3887082,3887481,0.16455,0.14398125},
-{2975790,3887481,3887887,0.1220625,0.1302},
-{2975791,3887887,3888715,0.344815384615385,0.344815384615385},
-{2975792,3887481,3887776,0.194955555555556,0.194955555555556},
-{2975793,3887887,3888549,0.64719,1000000},
-{2975794,3890417,3891196,0.489648648648649,0.6039},
-{2975795,3891528,3891896,0.344088888888889,0.344088888888889},
-{2975796,3892047,3892411,0.355844444444444,0.355844444444444},
-{2975797,3893762,3893863,0.133925,0.139747826086957},
-{2975798,3893863,3895760,0.684570731707317,0.684570731707317},
-{2975799,3896789,3899053,1000000,1000000},
-{2975800,3895097,3895818,0.3798,0.3798},
-{2975801,3895818,3896239,0.2007,0.193779310344828},
-{2975802,3897430,3896857,0.308555555555556,0.308555555555556},
-{2975803,3896857,3896484,0.181645161290323,0.181645161290323},
-{2975804,3895905,3895818,0.108514285714286,0.119936842105263},
-{2975805,3895771,3895905,0.11652,0.137082352941177},
-{2975806,3895618,3895771,0.0872666666666667,0.0872666666666667},
-{2975807,3895523,3895618,0.0739333333333333,0.0739333333333333},
-{2975808,3895422,3895523,0.0716222222222222,0.0716222222222222},
-{2975809,3895267,3895422,0.0877777777777778,0.0877777777777778},
-{2975810,3895422,3895804,0.357311111111111,0.357311111111111},
-{2975811,3896484,3896344,0.0534714285714286,0.0534714285714286},
-{2975812,3896344,3896202,0.0511304347826087,0.0511304347826087},
-{2975813,3896202,3896062,0.0444954545454545,0.0444954545454545},
-{2975814,3896062,3895904,0.0626,0.0626},
-{2975815,3895904,3895761,0.0798,0.0798},
-{2975816,3895761,3896127,0.297889655172414,0.297889655172414},
-{2975817,3896127,3896002,0.426955555555556,0.426955555555556},
-{2975818,3896127,3896417,0.194775,0.194775},
-{2975819,3896417,3896002,0.2354,0.2354},
-{2975820,3897025,3897332,0.282272727272727,0.326842105263158},
-{2975821,3897945,3897332,1000000,1000000},
-{2975822,3897332,3897660,0.255072,0.255072},
-{2975823,3900196,3900811,0.335977777777778,0.335977777777778},
-{2975824,3900277,3900811,0.243177777777778,0.243177777777778},
-{2975825,3900357,3900811,0.293555555555556,0.293555555555556},
-{2975826,3900423,3901163,0.329888888888889,0.329888888888889},
-{2975827,3901163,3900492,0.364422222222222,0.364422222222222},
-{2975828,3900723,3901957,1.911,1000000},
-{2975829,3900544,3901680,0.514128,0.514128},
-{2975830,3900260,3900892,0.342822222222222,0.342822222222222},
-{2975831,3901522,3902117,1000000,0.79525},
-{2975832,3902117,3902287,1000000,0.358227272727273},
-{2975833,3902117,3901802,0.279533333333333,0.279533333333333},
-{2975834,3903915,3904004,0.2545,0.234923076923077},
-{2975835,3904847,3904911,0.189913043478261,0.256941176470588},
-{2975836,3903915,3904847,0.67108,1000000},
-{2975837,3903103,3905138,1.67192,1.19422857142857},
-{2975838,3903033,3903452,1000000,1000000},
-{2975839,3903452,3903804,1000000,1000000},
-{2975840,3904369,3904530,1000000,1000000},
-{2975841,3904369,3904711,1000000,1000000},
-{2975842,3904711,3904916,1000000,1000000},
-{2975843,3903848,3903915,0.36429,0.36429},
-{2975844,3904847,3905067,0.15468,0.143222222222222},
-{2975845,3905192,3905067,0.06385,0.06385},
-{2975846,3905067,3905008,0.168620689655172,0.139714285714286},
-{2975847,3905392,3905884,1000000,1000000},
-{2975848,3904800,3905351,0.597,0.597},
-{2975849,3886759,3887013,0.153081818181818,0.153081818181818},
-{2975850,3887013,3887090,1000000,1000000},
-{2975851,3887090,3888051,1000000,1000000},
-{2975852,3890221,3891460,1000000,0.950576470588235},
-{2975853,3896002,3896283,0.252244444444444,0.252244444444444},
-{2975854,3896710,3896283,0.251777777777778,0.251777777777778},
-{2975855,3897332,3896710,0.532588235294118,0.532588235294118},
-{2975856,3896283,3896692,0.301755555555556,0.301755555555556},
-{2975857,3902029,3902051,1000000,0.142466666666667},
-{2975858,3901591,3902029,0.1708,0.1708},
-{2975859,3903675,3903265,0.293044444444444,1000000},
-{2975860,3901339,3901167,0.245977777777778,0.245977777777778},
-{2975861,3901616,3901339,0.1188,0.1188},
-{2975862,3901559,3901532,0.111914285714286,1000000},
-{2975863,3903048,3903265,1000000,0.336244444444444},
-{2975864,3901616,3902051,0.173177777777778,0.173177777777778},
-{2975865,3902051,3902645,1000000,0.216866666666667},
-{2975866,3902641,3902970,1000000,1000000},
-{2975867,3903714,3902970,1000000,1000000},
-{2975868,3902960,3902970,1000000,1000000},
-{2975869,3902645,3903756,1000000,1000000},
-{2975870,3906043,3906804,0.370418181818182,0.370418181818182},
-{2975871,3909651,3909963,0.218,0.218},
-{2975872,3909970,3910510,0.374113043478261,1000000},
-{2975873,3910440,3911022,1000000,0.4431},
-{2975874,3907558,3906959,1000000,0.4046},
-{2975875,3906959,3906488,1000000,0.32862},
-{2975876,3906488,3906133,1000000,0.255725},
-{2975877,3906133,3905699,1000000,0.27245},
-{2975878,3905699,3905266,1000000,0.285886956521739},
-{2975879,3906177,3906488,0.218111111111111,0.218111111111111},
-{2975880,3906488,3906958,0.249555555555556,0.249555555555556},
-{2975881,3905744,3906133,1000000,0.30837},
-{2975882,3906133,3906520,0.34758947368421,0.2446},
-{2975883,3906520,3906968,0.295827272727273,0.295827272727273},
-{2975884,3908995,3908470,0.257977777777778,0.257977777777778},
-{2975885,3908470,3907908,0.384031578947368,0.384031578947368},
-{2975886,3907980,3908470,0.2468,0.2468},
-{2975887,3908470,3908941,0.594,0.3267},
-{2975888,3908941,3908442,0.256435714285714,1000000},
-{2975889,3913861,3914275,0.319475,0.38337},
-{2975890,3911625,3911283,0.349246153846154,0.267070588235294},
-{2975891,3912355,3911625,0.68136,0.51102},
-{2975892,3911625,3911768,0.11022,0.122466666666667},
-{2975893,3911592,3911494,0.0667826086956522,0.0698181818181818},
-{2975894,3911768,3911592,0.147252631578947,0.13989},
-{2975895,3912546,3912934,0.209060869565217,0.218563636363636},
-{2975896,3912020,3911915,0.0698842105263158,0.055325},
-{2975897,3912256,3912020,0.217542857142857,0.217542857142857},
-{2975898,3912256,3912458,0.2793,0.2443875},
-{2975899,3912458,3912686,0.2434,0.2434},
-{2975900,3913400,3912458,0.54825,0.54825},
-{2975901,3912934,3912280,0.307057142857143,0.32241},
-{2975902,3913573,3912934,0.293686956521739,0.355515789473684},
-{2975903,3914181,3913573,0.4088625,0.363433333333333},
-{2975904,3911592,3912020,0.33072,0.314971428571429},
-{2975905,3912020,3912514,0.228514285714286,0.2666},
-{2975906,3911166,3911592,0.218777777777778,0.218777777777778},
-{2975907,3914075,3913194,0.539342857142857,0.596115789473684},
-{2975908,3913194,3913046,0.15305,0.131185714285714},
-{2975909,3913046,3912887,0.0883,0.0883},
-{2975910,3912514,3913046,0.264547826086957,0.289742857142857},
-{2975911,3913046,3914437,1.1140875,1.37118461538462},
-{2975912,3913194,3913561,0.323957142857143,0.323957142857143},
-{2975913,3914334,3913561,0.8501,0.8501},
-{2975914,3913561,3914437,0.7000125,0.7000125},
-{2975915,3914437,3914695,0.181285714285714,0.165521739130435},
-{2975916,3914928,3914075,0.63321,0.666536842105263},
-{2975917,3914928,3914475,0.307955555555556,0.307955555555556},
-{2975918,3914928,3915334,0.31011,0.229711111111111},
-{2975919,3914359,3914453,0.0321567567567567,0.0626210526315789},
-{2975920,3914453,3914785,0.274153846153846,0.274153846153846},
-{2975921,3914699,3914785,0.0472888888888889,0.0472888888888889},
-{2975922,3915833,3915876,0.0728666666666667,0.0570260869565217},
-{2975923,3915603,3915833,0.24666,0.274066666666667},
-{2975924,3914453,3914831,0.202292307692308,0.210384},
-{2975925,3915365,3915830,1000000,1000000},
-{2975926,3915830,3916115,1000000,1000000},
-{2975927,3915603,3916115,1000000,1000000},
-{2975928,3915833,3916411,0.291775,0.389033333333333},
-{2975929,3916421,3916411,0.694,0.567818181818182},
-{2975930,3916905,3917310,0.2634,0.2634},
-{2975931,3916322,3916551,0.217885714285714,0.269152941176471},
-{2975932,3916322,3915862,0.303244444444444,0.303244444444444},
-{2975933,3916126,3916322,0.213704347826087,0.258694736842105},
-{2975934,3915862,3916126,0.184894736842105,1000000},
-{2975935,3916432,3916126,1000000,0.326914285714286},
-{2975936,3915862,3915530,1000000,0.397623529411765},
-{2975937,3915365,3915530,0.150075,0.1334},
-{2975938,3916905,3917117,1000000,0.161288888888889},
-{2975939,3916698,3917203,1000000,0.46365},
-{2975940,3918658,3919450,0.617454545454545,0.54336},
-{2975941,3919299,3920365,0.483923076923077,0.483923076923077},
-{2975942,3920365,3920862,0.21945,0.21945},
-{2975943,3919856,3920365,0.503333333333333,1000000},
-{2975944,3920149,3920862,0.460153846153846,0.460153846153846},
-{2975945,3920505,3921157,0.421288888888889,0.421288888888889},
-{2975946,3921157,3921265,0.0688,0.0688},
-{2975947,3920749,3921600,0.523244444444444,0.523244444444444},
-{2975948,3920959,3921744,0.459911111111111,0.459911111111111},
-{2975949,3921215,3921812,0.362311111111111,0.362311111111111},
-{2975950,3921971,3922669,0.431155555555556,0.431155555555556},
-{2975951,3921971,3922014,0.167311111111111,0.167311111111111},
-{2975952,3922014,3922892,0.59,0.59},
-{2975953,3919262,3920073,0.595747826086957,0.622827272727273},
-{2975954,3919616,3920423,0.569775,0.621572727272727},
-{2975955,3921440,3921857,0.243222222222222,0.243222222222222},
-{2975956,3921562,3921851,0.176133333333333,0.176133333333333},
-{2975957,3921992,3922014,0.204355555555556,0.204355555555556},
-{2975958,3922060,3923076,0.7812,0.7812},
-{2975959,3922404,3923460,0.839266666666667,0.839266666666667},
-{2975961,3922063,3922404,0.2168,0.2168},
-{2975981,3903049,3902402,0.252777777777778,0.252777777777778},
-{2975982,3903049,3902899,0.113481818181818,0.1387},
-{2975983,3903539,3903049,0.298777777777778,0.32268},
-{2975984,3903962,3903539,0.34065,1000000},
-{2975985,3904427,3903962,0.216174193548387,1000000},
-{2975986,3904835,3904427,0.3003,1000000},
-{2975987,3905266,3904835,0.268361538461538,1000000},
-{2975988,3904460,3904835,0.227911111111111,0.227911111111111},
-{2975989,3904835,3905248,0.247733333333333,0.247733333333333},
-{2975990,3904024,3904427,1000000,0.343133333333333},
-{2975991,3904427,3904810,0.283721739130435,0.283721739130435},
-{2975992,3903589,3903962,0.229155555555556,0.229155555555556},
-{2975993,3903962,3904407,0.243044444444444,0.243044444444444},
-{2975994,3904810,3905237,0.356557894736842,0.376366666666667},
-{2975995,3902899,3902671,0.120022222222222,0.120022222222222},
-{2975996,3902899,3903288,0.302171428571429,0.302171428571429},
-{2975997,3903497,3903885,0.242177777777778,0.242177777777778},
-{2975998,3904382,3903885,0.4746,0.547615384615385},
-{2975999,3905432,3904814,0.2626,0.2626},
-{2976000,3906063,3905432,0.247088888888889,0.247088888888889},
-{2976001,3905478,3905432,0.241511111111111,0.241511111111111},
-{2976002,3905466,3905478,0.239066666666667,0.239066666666667},
-{2976003,3906130,3906079,0.584781818181818,0.584781818181818},
-{2976004,3906079,3906063,0.347314285714286,0.347314285714286},
-{2976005,3906063,3906096,0.147808695652174,0.147808695652174},
-{2976006,3905316,3905699,0.226377777777778,0.226377777777778},
-{2976007,3905699,3906145,0.255311111111111,0.255311111111111},
-{2976008,3902354,3902596,0.10775625,1000000},
-{2976009,3907367,3906680,0.243822222222222,0.243822222222222},
-{2976010,3907973,3907367,0.29295,0.29295},
-{2976011,3908014,3907973,0.256888888888889,0.256888888888889},
-{2976012,3907973,3907959,0.252555555555556,0.252555555555556},
-{2976013,3909287,3909128,0.304092857142857,0.304092857142857},
-{2976014,3909287,3909955,0.530233333333333,0.530233333333333},
-{2976015,3907277,3906130,0.4524,0.4524},
-{2976016,3907959,3907277,0.240488888888889,0.240488888888889},
-{2976017,3908340,3907959,0.162704347826087,0.2079},
-{2976018,3908340,3908397,0.150216,0.150216},
-{2976019,3908397,3908379,0.256084615384615,0.256084615384615},
-{2976020,3909099,3908397,0.239622222222222,0.239622222222222},
-{2976021,3909801,3909099,0.265866666666667,0.265866666666667},
-{2976022,3909099,3909091,0.340966666666667,0.340966666666667},
-{2976023,3909091,3909090,0.302018181818182,0.302018181818182},
-{2976024,3909955,3909808,0.394254545454545,0.510211764705882},
-{2976025,3910526,3909955,0.315866666666667,0.315866666666667},
-{2976026,3910429,3909808,0.24594,0.254420689655172},
-{2976027,3910873,3910429,0.260125,0.231222222222222},
-{2976028,3908379,3908368,0.4672,0.4672},
-{2976029,3906459,3906096,0.198163636363636,0.161466666666667},
-{2976030,3907101,3906459,0.26028,0.26028},
-{2976031,3908368,3907101,0.50695,0.50695},
-{2976032,3910429,3910911,0.366433333333333,0.366433333333333},
-{2976033,3910911,3910370,0.346914285714286,0.331145454545455},
-{2976034,3911494,3910911,0.2852,0.2852},
-{2976035,3911915,3911377,1000000,0.350481818181818},
-{2976036,3910911,3911377,0.244288888888889,0.244288888888889},
-{2976037,3911377,3910989,1000000,0.230607692307692},
-{2976038,3910350,3910816,0.293608695652174,0.2251},
-{2976039,3910350,3909823,0.236088888888889,0.219806896551724},
-{2976040,3910350,3910822,0.245888888888889,0.245888888888889},
-{2976041,3910822,3911265,0.221844444444444,0.221844444444444},
-{2976042,3912887,3911711,0.552955555555556,0.552955555555556},
-{2976043,3911711,3911265,0.27245,0.284295652173913},
-{2976044,3913330,3912104,1000000,0.673472727272727},
-{2976045,3909823,3909278,0.246870967741936,0.273321428571429},
-{2976046,3909278,3909211,0.03184,0.0341142857142857},
-{2976047,3917899,3918320,0.342,0.342},
-{2976048,3918320,3918428,0.0704285714285714,0.07395},
-{2976049,3917569,3918320,0.78496,0.78496},
-{2976050,3917395,3917536,0.47788,1000000},
-{2976051,3916926,3917010,0.056,0.106909090909091},
-{2976052,3916755,3917010,0.171733333333333,0.171733333333333},
-{2976053,3917010,3917261,0.200828571428571,0.221968421052632},
-{2976054,3917502,3917569,0.147766666666667,0.1209},
-{2976055,3916935,3917502,0.51816,0.51816},
-{2976056,3916935,3917378,0.269784,0.269784},
-{2976057,3918409,3918473,0.0515181818181818,0.0515181818181818},
-{2976058,3917751,3918409,0.333735483870968,0.413832},
-{2976059,3917378,3917751,0.183868965517241,0.205084615384615},
-{2976060,3918409,3918728,0.18645,0.18645},
-{2976061,3918728,3918806,0.0597157894736842,0.0630333333333333},
-{2976062,3918728,3919160,0.236044444444444,0.236044444444444},
-{2976063,3917751,3918071,0.21084,0.183339130434783},
-{2976064,3918071,3918728,0.492371428571429,0.492371428571429},
-{2976065,3917921,3918071,0.238569230769231,0.25845},
-{2976066,3918071,3918484,0.219576,0.211130769230769},
-{2976067,3918484,3919160,1000000,1000000},
-{2976068,3918473,3919262,0.504866666666667,0.504866666666667},
-{2976069,3918806,3919616,0.488207142857143,0.68349},
-{2976070,3919927,3920749,0.8052,0.488871428571429},
-{2976071,3919117,3919927,0.486385714285714,0.486385714285714},
-{2976072,3919453,3920236,1.13185,1.13185},
-{2976073,3919786,3920578,0.5024,0.5024},
-{2976074,3918320,3918797,0.66474,0.66474},
-{2976075,3917378,3918045,1000000,1000000},
-{2976076,3918045,3918409,0.168511111111111,0.168511111111111},
-{2976077,3919097,3919625,0.438488888888889,0.438488888888889},
-{2976078,3918484,3919097,0.379486956521739,0.300972413793103},
-{2976079,3919097,3919396,0.223547368421053,0.176975},
-{2976080,3916577,3917101,0.50648,0.422066666666667},
-{2976081,3916140,3916434,0.231939130434783,0.254028571428571},
-{2976082,3916434,3916370,0.0671333333333333,0.0710823529411765},
-{2976083,3916822,3916434,0.3688125,0.327833333333333},
-{2976084,3916822,3917121,0.191133333333333,0.191133333333333},
-{2976085,3917338,3916822,0.63568,0.529733333333333},
-{2976086,3917101,3917434,0.254571428571429,0.281368421052632},
-{2976087,3917434,3917338,0.126070588235294,0.126070588235294},
-{2976088,3917690,3917338,0.433061538461538,0.28149},
-{2976089,3917434,3917875,0.283371428571429,0.258730434782609},
-{2976090,3916434,3916786,0.208266666666667,0.208266666666667},
-{2976091,3918044,3917004,1000000,1000000},
-{2976092,3917981,3918044,0.0989111111111111,0.0989111111111111},
-{2976093,3918126,3918044,0.0334222222222222,0.0334222222222222},
-{2976094,3914779,3914953,0.131177777777778,0.131177777777778},
-{2976095,3916786,3917097,0.199355555555556,0.199355555555556},
-{2976096,3915611,3915268,0.2192,0.2192},
-{2976097,3915268,3915370,0.0737333333333333,0.0737333333333333},
-{2976098,3915932,3915596,0.205266666666667,0.205266666666667},
-{2976099,3916370,3915932,0.364171428571429,0.364171428571429},
-{2976100,3915932,3915499,0.387133333333333,0.29035},
-{2976101,3917047,3917097,0.0529714285714286,0.0529714285714286},
-{2976102,3917457,3917097,1000000,1000000},
-{2976103,3917660,3917457,0.194,0.1746},
-{2976104,3917660,3917881,0.1939,0.1939},
-{2976105,3918196,3917881,0.343254545454545,0.37758},
-{2976106,3917881,3918237,0.312233333333333,0.3512625},
-{2976107,3918373,3918490,0.113047058823529,0.106766666666667},
-{2976108,3918722,3918373,0.480955555555556,0.480955555555556},
-{2976109,3918153,3918373,0.245828571428571,0.1912},
-{2976110,3917660,3917994,1000000,1000000},
-{2976111,3917457,3917770,0.3331125,0.313517647058823},
-{2976112,3917398,3917710,0.197333333333333,0.197333333333333},
-{2976113,3917710,3918029,0.291633333333333,0.291633333333333},
-{2976114,3918029,3917963,0.0713,0.08556},
-{2976115,3918200,3918029,0.136966666666667,0.1540875},
-{2976116,3918513,3918200,0.244228571428571,0.2137},
-{2976117,3918517,3918200,0.19,0.19},
-{2976118,3918517,3918284,0.1893,0.219189473684211},
-{2976119,3918513,3918835,0.188288888888889,0.188288888888889},
-{2976120,3918835,3918517,0.16944,0.181542857142857},
-{2976121,3919159,3918835,0.18864,0.2096},
-{2976122,3919159,3919475,0.278684210526316,0.311470588235294},
-{2976123,3916720,3915818,0.567969230769231,0.5274},
-{2976124,3917047,3916145,0.74298,0.479341935483871},
-{2976125,3915908,3915611,0.298270588235294,0.362185714285714},
-{2976126,3916577,3915908,0.669347368421053,0.578072727272727},
-{2976127,3920236,3921063,0.8544,0.8544},
-{2976128,3920578,3921379,0.504377777777778,0.504377777777778},
-{2976129,3920884,3921727,0.588052173913043,0.56355},
-{2976130,3921218,3921956,0.446422222222222,0.446422222222222},
-{2976131,3920420,3921218,0.618572727272727,0.618572727272727},
-{2976132,3921556,3921985,0.254355555555556,0.254355555555556},
-{2976133,3922100,3922677,0.3628,0.3628},
-{2976134,3919558,3920420,0.771568421052632,0.771568421052632},
-{2976135,3920720,3921046,0.172823076923077,0.172823076923077},
-{2976136,3921046,3921879,0.501666666666667,0.501666666666667},
-{2976137,3921046,3921305,0.182018181818182,0.13348},
-{2976138,3922100,3922129,0.15036,0.15036},
-{2976139,3921305,3921383,0.0377806451612903,0.0366},
-{2976140,3921383,3922056,0.403511111111111,0.403511111111111},
-{2976141,3921383,3921610,0.0969085714285714,0.121135714285714},
-{2976142,3922056,3922092,0.21801,0.21801},
-{2976143,3922092,3922133,0.27726,0.27726},
-{2976144,3921610,3922092,0.301177777777778,0.301177777777778},
-{2976145,3921879,3922030,0.090825,0.10899},
-{2976146,3922030,3922056,0.251175,0.251175},
-{2976147,3922756,3922959,0.165266666666667,0.165266666666667},
-{2976148,3922959,3923382,0.510377777777778,0.510377777777778},
-{2976151,3922765,3923502,0.510945454545455,0.510945454545455},
-{2976152,3922584,3923382,0.523090909090909,0.822},
-{2976153,3922242,3922584,0.249075,0.229915384615385},
-{2976154,3922584,3922765,0.19648,0.1842},
-{2976155,3922765,3923082,0.2666,0.2666},
-{2976160,3922350,3923082,0.5208,1000000},
-{2976164,3920730,3921610,0.547272,0.547272},
-{2976165,3921610,3921842,0.16935,0.140151724137931},
-{2976166,3921842,3922133,0.170866666666667,0.170866666666667},
-{2976167,3921119,3921842,0.41242,0.651189473684211},
-{2976168,3901128,3901394,0.2804625,0.2804625},
-{2976169,3901394,3901636,0.135085714285714,0.135085714285714},
-{2976170,3901636,3901886,0.13815,0.13815},
-{2976171,3901886,3902163,0.201821052631579,0.147484615384615},
-{2976172,3902163,3902470,0.1614,0.1614},
-{2976173,3902470,3902692,0.126733333333333,0.126733333333333},
-{2976174,3902692,3902903,0.113524137931034,0.113524137931034},
-{2976175,3902903,3903167,0.205571428571429,0.1439},
-{2976176,3903167,3903415,0.1335,0.1335},
-{2976177,3903415,3903592,0.152454545454545,0.119785714285714},
-{2976178,3903592,3903813,0.128464285714286,0.128464285714286},
-{2976179,3903813,3904132,0.19604347826087,0.14090625},
-{2976180,3904132,3904410,0.2795625,0.194478260869565},
-{2976181,3904410,3904707,0.20275,0.231714285714286},
-{2976182,3904707,3904960,0.150528,0.129765517241379},
-{2976183,3904960,3905193,0.12922,0.114017647058824},
-{2976184,3905193,3905287,0.0778173913043478,0.0526411764705882},
-{2976185,3905287,3905405,0.0853090909090909,0.0536228571428571},
-{2976186,3905405,3905505,0.06432,0.0472941176470588},
-{2976187,3905505,3905678,0.0797571428571428,0.0656823529411765},
-{2976188,3905678,3905881,0.1141,0.1141},
-{2976189,3905881,3906104,0.196326315789474,0.143469230769231},
-{2976190,3901394,3901693,0.23515,0.28218},
-{2976191,3900502,3901394,0.434127272727273,0.573048},
-{2976192,3899550,3900502,0.483754838709677,0.483754838709677},
-{2976193,3901636,3902354,0.41855,0.41855},
-{2976194,3900727,3901636,0.534044444444444,0.534044444444444},
-{2976195,3901886,3902749,0.584857142857143,0.534},
-{2976196,3902163,3903113,0.514933333333333,0.514933333333333},
-{2976197,3902470,3903434,0.533533333333333,0.533533333333333},
-{2976198,3902692,3903606,0.539866666666667,0.539866666666667},
-{2976199,3902903,3903824,0.665809090909091,0.665809090909091},
-{2976200,3903167,3904121,0.538,0.538},
-{2976201,3903415,3904370,0.72795,0.72795},
-{2976202,3903592,3904571,0.585648,0.6972},
-{2976203,3903813,3904787,0.544822222222222,0.544822222222222},
-{2976204,3904132,3905082,0.503875862068966,0.503875862068966},
-{2976205,3904707,3905668,0.663218181818182,0.663218181818182},
-{2976206,3904960,3905902,0.543555555555555,0.543555555555555},
-{2976207,3905193,3906150,0.97424,0.97424},
-{2976208,3905405,3906373,0.538933333333333,0.538933333333333},
-{2976209,3905678,3906601,0.858882352941176,0.858882352941176},
-{2976210,3905881,3906847,0.645313043478261,0.645313043478261},
-{2976211,3901187,3902163,0.534133333333333,0.534133333333333},
-{2976212,3901440,3902470,0.547066666666667,0.547066666666667},
-{2976213,3901675,3902692,0.5362,0.5362},
-{2976214,3901857,3902903,0.780252631578947,0.780252631578947},
-{2976215,3902176,3903167,0.545377777777778,0.545377777777778},
-{2976216,3902434,3903415,0.567946153846154,0.567946153846154},
-{2976217,3902667,3903592,0.544866666666667,0.544866666666667},
-{2976218,3902887,3903813,0.61775,0.61775},
-{2976219,3903175,3904132,0.520328571428571,0.520328571428571},
-{2976220,3903726,3904707,0.585264,0.585264},
-{2976221,3903972,3904960,0.6954,0.6954},
-{2976222,3904365,3905287,0.641504347826087,0.641504347826087},
-{2976223,3904581,3905505,0.546,0.546},
-{2976224,3904925,3905881,0.73317,0.563976923076923},
-{2976225,3905149,3906104,0.815933333333333,0.63855652173913},
-{2976226,3899736,3900663,0.5494,0.5494},
-{2976227,3899952,3900851,0.58656,0.58656},
-{2976228,3900176,3901059,0.548022222222222,0.548022222222222},
-{2976229,3900349,3901242,0.554066666666667,0.554066666666667},
-{2976230,3900522,3901440,1.06902857142857,1.06902857142857},
-{2976231,3900715,3901675,0.47274375,0.47274375},
-{2976232,3900922,3901857,0.543555555555555,0.543555555555555},
-{2976233,3901190,3902219,0.714685714285714,0.714685714285714},
-{2976234,3901405,3902434,0.555111111111111,0.555111111111111},
-{2976235,3901614,3902667,0.553511111111111,0.553511111111111},
-{2976236,3901834,3902887,0.479032258064516,0.479032258064516},
-{2976237,3902181,3903175,0.718885714285714,0.718885714285714},
-{2976238,3902725,3903661,0.529735714285714,1000000},
-{2976239,3902946,3903864,0.59652,0.59652},
-{2976240,3903140,3904101,0.448909090909091,0.448909090909091},
-{2976241,3903396,3904365,0.516372413793104,0.483058064516129},
-{2976242,3899325,3899550,0.183409090909091,0.175434782608696},
-{2976243,3899550,3899641,0.0649,0.0458117647058824},
-{2976244,3899641,3899736,0.0546413793103448,0.039615},
-{2976245,3899736,3899848,0.0590785714285714,0.041355},
-{2976246,3899848,3899952,0.0624923076923077,0.0439135135135135},
-{2976247,3899952,3900084,0.096325,0.0660514285714286},
-{2976248,3900084,3900176,0.0383142857142857,0.0298},
-{2976249,3900176,3900349,0.116328,0.09694},
-{2976250,3900349,3900522,0.148090909090909,0.120666666666667},
-{2976251,3900522,3900715,0.16842,0.129553846153846},
-{2976252,3900715,3900922,0.132761538461538,0.127844444444444},
-{2976253,3900922,3901009,0.065256,0.065256},
-{2976254,3901009,3901190,0.12845,0.1101},
-{2976255,3901190,3901405,0.148063636363636,0.135725},
-{2976256,3901405,3901614,0.1344,0.16128},
-{2976257,3901614,3901834,0.154747826086957,0.161781818181818},
-{2976258,3901834,3902181,0.20195,0.20195},
-{2976259,3902181,3902456,0.238764705882353,0.193285714285714},
-{2976260,3902456,3902725,0.167321739130435,0.202547368421053},
-{2976261,3902725,3902946,0.16653,0.144808695652174},
-{2976262,3902946,3903140,0.152771428571429,0.128328},
-{2976263,3903140,3903396,0.152330769230769,0.146688888888889},
-{2976264,3898718,3899641,0.73293,0.73293},
-{2976265,3898925,3899848,0.545622222222222,0.545622222222222},
-{2976266,3899190,3900084,1.8264,1.8264},
-{2976267,3899434,3900349,0.543755555555556,0.543755555555556},
-{2976268,3899605,3900522,0.96924,0.96924},
-{2976269,3899820,3900715,0.907125,0.907125},
-{2976270,3900134,3901009,0.541911111111111,0.541911111111111},
-{2976271,3900340,3901190,1.2101,0.500731034482759},
-{2976272,3900525,3901405,0.537044444444444,0.537044444444444},
-{2976273,3900714,3901614,0.96944,0.96944},
-{2976274,3901177,3902181,0.637486956521739,0.637486956521739},
-{2976275,3898018,3898562,0.312046153846154,0.507075},
-{2976276,3898562,3898866,0.247326315789474,0.2937},
-{2976277,3899010,3899315,0.272329411764706,0.272329411764706},
-{2976278,3898562,3899010,0.2706,0.2706},
-{2976279,3897701,3898243,0.386514285714286,0.386514285714286},
-{2976280,3898243,3898707,0.271022222222222,0.271022222222222},
-{2976281,3898243,3898562,0.216027272727273,0.198025},
-{2976282,3897870,3898243,0.266747368421053,0.22035652173913},
-{2976283,3898707,3899010,0.175266666666667,0.175266666666667},
-{2976284,3898386,3898707,0.265042105263158,0.265042105263158},
-{2976285,3896899,3897667,0.467022222222222,0.467022222222222},
-{2976286,3896653,3896899,0.205745454545455,0.266258823529412},
-{2976287,3897120,3897870,1.14081818181818,1.14081818181818},
-{2976288,3897338,3898129,0.464355555555556,0.464355555555556},
-{2976289,3897544,3898386,0.467644444444444,0.467644444444444},
-{2976290,3896899,3897120,0.163609090909091,0.17997},
-{2976291,3897120,3897198,0.0594,0.0803647058823529},
-{2976292,3897198,3897338,0.112771428571429,0.124642105263158},
-{2976293,3897338,3897544,0.23992,0.23992},
-{2976294,3896838,3897198,0.296033333333333,0.296033333333333},
-{2976295,3896577,3896838,0.205527272727273,0.265976470588235},
-{2976296,3896838,3897245,0.291807692307692,0.281},
-{2976297,3897245,3897544,0.332672727272727,0.457425},
-{2976298,3897245,3897429,0.1272,0.122307692307692},
-{2976299,3897429,3897674,0.26496,0.19872},
-{2976300,3897674,3898172,0.519471428571429,0.519471428571429},
-{2976301,3898172,3898655,0.32715652173913,0.300984},
-{2976302,3898655,3899605,0.8149,0.97788},
-{2976303,3899006,3899923,0.535555555555556,1000000},
-{2976304,3899301,3900230,1.1993,1.1993},
-{2976305,3899516,3900436,0.531022222222222,0.531022222222222},
-{2976306,3899747,3900638,0.89415,0.89415},
-{2976307,3900941,3901886,0.515421428571429,0.515421428571429},
-{2976308,3903885,3904341,0.249911111111111,0.249911111111111},
-{2976309,3904813,3904341,0.35904,0.398933333333333},
-{2976310,3904813,3904798,0.407368421052632,0.407368421052632},
-{2976311,3904341,3904044,0.286566666666667,0.286566666666667},
-{2976312,3904798,3904044,0.363417391304348,0.363417391304348},
-{2976313,3905394,3904798,0.363442105263158,0.363442105263158},
-{2976314,3905432,3905395,0.343244444444444,0.343244444444444},
-{2976315,3905395,3905290,0.0493333333333333,0.0444},
-{2976316,3905395,3905497,0.04342,0.0566347826086957},
-{2976317,3905497,3905567,0.0710285714285714,0.0552444444444444},
-{2976318,3905567,3905508,0.0619909090909091,0.056825},
-{2976319,3904798,3904777,0.1146,0.1146},
-{2976320,3904777,3905187,0.333536842105263,0.333536842105263},
-{2976321,3906054,3905294,0.388685714285714,0.388685714285714},
-{2976322,3905294,3905187,0.0837666666666667,0.10052},
-{2976323,3905187,3904625,0.234244444444444,0.234244444444444},
-{2976324,3905588,3906002,0.357566666666667,0.357566666666667},
-{2976325,3906424,3906002,0.5666,0.5666},
-{2976326,3906466,3905567,0.355564285714286,0.414825},
-{2976327,3906459,3906466,0.250044444444444,0.250044444444444},
-{2976328,3906466,3906464,0.253733333333333,0.253733333333333},
-{2976329,3907067,3906466,0.277990909090909,0.291228571428571},
-{2976330,3907676,3907067,1000000,0.221155555555556},
-{2976331,3908839,3909278,0.236955555555556,0.236955555555556},
-{2976332,3908530,3907841,0.328044444444444,0.305420689655172},
-{2976333,3907841,3907389,0.290236363636364,0.277617391304348},
-{2976334,3907389,3906970,0.224347826086957,0.198461538461538},
-{2976335,3907389,3907836,0.241688888888889,0.241688888888889},
-{2976336,3907836,3908262,0.217355555555556,0.217355555555556},
-{2976337,3907749,3906875,0.365511111111111,0.365511111111111},
-{2976338,3908262,3907749,0.530907692307692,0.313718181818182},
-{2976339,3908789,3908262,0.277175,0.302372727272727},
-{2976340,3908853,3909267,0.220488888888889,0.220488888888889},
-{2976341,3909211,3909667,0.243466666666667,0.243466666666667},
-{2976342,3909267,3908789,0.274925,0.274925},
-{2976343,3909815,3910292,0.221022222222222,0.221022222222222},
-{2976344,3911265,3910786,0.226328571428571,0.234711111111111},
-{2976345,3910786,3910292,0.236244444444444,0.303742857142857},
-{2976346,3910292,3909735,0.261253846153846,0.283025},
-{2976347,3909735,3909267,0.196011428571429,0.254088888888889},
-{2976348,3911202,3910178,0.630628571428571,0.630628571428571},
-{2976349,3910178,3909182,0.617072727272727,1000000},
-{2976350,3909182,3908168,0.4958,0.582026086956522},
-{2976351,3906002,3906420,0.4333125,0.4333125},
-{2976352,3906854,3906420,0.366821052631579,0.366821052631579},
-{2976353,3906964,3906899,0.2556,0.285092307692308},
-{2976354,3907337,3906899,0.22632,0.22632},
-{2976355,3906899,3906875,0.166938461538462,0.166938461538462},
-{2976356,3908530,3909011,0.44036,0.44036},
-{2976357,3912104,3911202,0.5772,0.5772},
-{2976358,3912827,3911783,0.488822222222222,0.41244375},
-{2976359,3913875,3912827,0.3980625,0.4246},
-{2976360,3914572,3913875,1000000,1000000},
-{2976361,3914572,3914188,1000000,1000000},
-{2976362,3914572,3914892,1000000,1000000},
-{2976363,3914572,3914884,1000000,1000000},
-{2976364,3914653,3913729,0.465422222222222,0.465422222222222},
-{2976365,3915499,3914653,0.49926,1000000},
-{2976366,3914957,3914168,0.5238,0.5238},
-{2976367,3915818,3914957,1000000,0.514137931034483},
-{2976368,3915250,3914528,0.532725,0.532725},
-{2976369,3916145,3915250,0.668918181818182,1000000},
-{2976370,3916931,3916615,0.200066666666667,0.200066666666667},
-{2976371,3916970,3917279,0.200866666666667,0.200866666666667},
-{2976372,3918284,3917383,0.6043,0.517971428571429},
-{2976373,3921982,3921696,1000000,0.300485714285714},
-{2976374,3921696,3921967,0.19881,0.19881},
-{2976375,3921967,3922971,0.575044444444444,0.419627027027027},
-{2976379,3921696,3921329,0.241,0.241},
-{2976380,3921329,3921644,0.147733333333333,0.147733333333333},
-{2976381,3921329,3921034,0.216688888888889,0.216688888888889},
-{2976382,3921034,3921330,0.149422222222222,0.149422222222222},
-{2976383,3896385,3896838,0.386791304347826,0.370675},
-{2976384,3896966,3897245,0.22371,0.213057142857143},
-{2976385,3896102,3895930,0.151928571428571,0.193363636363636},
-{2976386,3896102,3896088,0.50301,0.50301},
-{2976387,3897373,3897476,0.10098,0.0748},
-{2976388,3896798,3896807,0.0625555555555556,0.0625555555555556},
-{2976389,3896959,3896798,0.1274625,0.0971142857142857},
-{2976390,3897166,3897373,0.48168,0.8028},
-{2976391,3897429,3897884,0.35184,0.2932},
-{2976392,3897674,3897983,0.203739130434783,0.203739130434783},
-{2976393,3898172,3898471,0.167711111111111,0.167711111111111},
-{2976394,3897983,3898471,0.261266666666667,0.261266666666667},
-{2976395,3897983,3898234,0.167863636363636,0.167863636363636},
-{2976396,3900895,3901834,0.49062,0.73593},
-{2976397,3899997,3900895,0.577896,0.72237},
-{2976398,3898471,3898714,0.1454,0.1454},
-{2976399,3898234,3898714,0.268733333333333,0.268733333333333},
-{2976400,3898714,3898904,0.111422222222222,0.111422222222222},
-{2976401,3898444,3898904,0.266533333333333,0.266533333333333},
-{2976402,3898904,3899388,0.375,0.375},
-{2976403,3901709,3902725,0.8126,1.46268},
-{2976404,3901920,3902946,0.6645,0.6645},
-{2976405,3903665,3904654,0.575676923076923,0.575676923076923},
-{2976406,3903396,3903665,0.16448,0.197376},
-{2976407,3903665,3903919,0.1373,0.152555555555556},
-{2976408,3903919,3904925,0.553755555555555,0.553755555555555},
-{2976409,3910815,3909706,0.416029411764706,0.589375},
-{2976410,3911257,3910107,0.579312,0.689657142857143},
-{2976411,3907847,3908692,0.477573913043478,0.477573913043478},
-{2976412,3909004,3909148,0.10269,0.0933545454545454},
-{2976413,3908692,3909004,0.137979310344828,0.142907142857143},
-{2976414,3906795,3907549,1000000,1000000},
-{2976415,3907549,3908352,0.400244444444445,0.400244444444445},
-{2976416,3908352,3908692,0.146442857142857,0.132270967741935},
-{2976417,3909745,3909953,0.132433333333333,0.19865},
-{2976418,3909004,3909745,0.53352,0.53352},
-{2976419,3906245,3906782,0.316511111111111,0.356075},
-{2976420,3906962,3907122,0.0711642857142857,0.0711642857142857},
-{2976421,3905999,3906635,0.6074,0.45555},
-{2976422,3906635,3906962,0.178434782608696,0.178434782608696},
-{2976423,3911783,3910815,0.5644,0.467089655172414},
-{2976424,3912199,3911257,0.535656,0.582234782608696},
-{2976425,3913729,3912649,0.579365217391304,0.579365217391304},
-{2976426,3912649,3911621,0.541632,0.541632},
-{2976427,3911621,3910600,0.593025,0.593025},
-{2976428,3914168,3913120,0.606109090909091,0.606109090909091},
-{2976429,3913120,3911998,0.5868,0.5868},
-{2976430,3911998,3910992,0.71808,0.574464},
-{2976431,3914528,3913529,0.489,0.507807692307692},
-{2976432,3913529,3912422,0.614945454545455,0.541152},
-{2976433,3912422,3911363,0.532688888888889,0.532688888888889},
-{2976434,3915439,3914701,0.487777777777778,0.487777777777778},
-{2976435,3914701,3914021,0.356777777777778,0.356777777777778},
-{2976436,3914021,3913703,0.1941,0.1941},
-{2976437,3915747,3914997,0.424451612903226,0.424451612903226},
-{2976438,3914997,3914145,0.611181818181818,0.517153846153846},
-{2976439,3916206,3915439,0.472688888888889,0.472688888888889},
-{2976440,3917383,3916515,0.620375,0.620375},
-{2976441,3916515,3915747,0.553486956521739,0.553486956521739},
-{2976442,3913703,3912557,0.835694117647059,0.835694117647059},
-{2976443,3914145,3913016,0.5292,0.5292},
-{2976444,3908692,3909482,0.453525,0.453525},
-{2976445,3909745,3910681,0.521971428571429,0.521971428571429},
-{2976446,3908048,3908352,0.153155555555556,0.159046153846154},
-{2976447,3908352,3909165,0.388135714285714,0.388135714285714},
-{2976448,3909482,3909745,0.152838461538462,0.209147368421053},
-{2976449,3909165,3909482,0.155711111111111,0.175175},
-{2976450,3908862,3909165,0.17115,0.164304},
-{2976451,3909482,3910284,0.494918181818182,0.494918181818182},
-{2976452,3909165,3909952,0.4102,0.4102},
-{2976453,3918315,3918611,0.215592,0.26949},
-{2976454,3918611,3918929,0.17398064516129,0.16854375},
-{2976455,3918611,3918048,0.823909090909091,0.6042},
-{2976456,3918929,3918398,0.338066666666667,0.338066666666667},
-{2976457,3917016,3917346,0.241513043478261,0.326752941176471},
-{2976458,3918048,3917346,0.457823076923077,0.425121428571429},
-{2976459,3918398,3917676,0.798171428571429,0.798171428571429},
-{2976460,3917346,3917676,0.283547368421053,0.224475},
-{2976461,3917346,3917055,0.1942,0.1942},
-{2976462,3917676,3917382,0.193622222222222,0.193622222222222},
-{2976463,3918702,3918043,0.582866666666667,0.45615652173913},
-{2976464,3917676,3918043,0.244527272727273,0.244527272727273},
-{2976465,3918043,3918447,0.215232,0.233947826086957},
-{2976466,3919012,3918447,0.4092,0.392832},
-{2976467,3916594,3916900,0.206044444444444,0.252872727272727},
-{2976468,3916900,3917210,0.203111111111111,0.249272727272727},
-{2976469,3917210,3917501,0.199546153846154,0.216175},
-{2976470,3918043,3917501,0.5064,0.5064},
-{2976471,3916900,3916398,0.303066666666667,0.303066666666667},
-{2976472,3918929,3919222,0.16910625,0.16910625},
-{2976473,3919222,3919575,0.191614285714286,0.185006896551724},
-{2976474,3919575,3919787,0.2652,1000000},
-{2976475,3919222,3918702,0.336444444444444,0.336444444444444},
-{2976476,3919575,3919012,0.579675,0.579675},
-{2976477,3918447,3918794,0.244145454545455,0.214848},
-{2976478,3918794,3918872,0.0644666666666667,0.046416},
-{2976479,3917210,3916749,0.740836363636364,0.740836363636364},
-{2976480,3917501,3917042,0.300644444444444,0.300644444444444},
-{2976481,3917501,3917819,0.191892857142857,0.26865},
-{2976482,3918447,3917819,0.32208,0.32208},
-{2976483,3918794,3918140,0.392377777777778,0.392377777777778},
-{2976484,3917819,3918140,0.17041875,0.302966666666667},
-{2976485,3918140,3918314,0.124636363636364,0.210923076923077},
-{2976486,3917819,3917348,0.328056,0.328056},
-{2976487,3916749,3916485,0.1308375,0.1308375},
-{2976488,3916485,3916226,0.162955555555556,0.162955555555556},
-{2976489,3921330,3921913,0.311088,0.235672727272727},
-{2976490,3921913,3922038,0.0687777777777778,0.0422045454545455},
-{2976491,3922038,3922384,0.215321739130435,0.126984615384615},
-{2976492,3922384,3922531,0.0783,0.0727071428571429},
-{2976497,3922384,3921881,0.490147826086956,0.256213636363636},
-{2976498,3921881,3921743,0.0970181818181818,0.0604075471698113},
-{2976499,3921743,3921531,0.13472,0.080832},
-{2976500,3922638,3922006,0.532066666666667,0.532066666666667},
-{2976501,3921743,3922006,0.1434,0.1434},
-{2976502,3921531,3921822,0.173582608695652,0.210126315789474},
-{2976503,3922006,3921822,0.243847058823529,0.243847058823529},
-{2976507,3922459,3922181,0.233488888888889,0.233488888888889},
-{2976508,3921822,3922181,0.20655,0.198288},
-{2976509,3921034,3920759,0.2098,0.2098},
-{2976510,3920759,3920479,0.217911111111111,0.217911111111111},
-{2976511,3920479,3920100,0.264711111111111,0.264711111111111},
-{2976512,3920759,3921019,0.148955555555556,0.148955555555556},
-{2976513,3920479,3920722,0.141533333333333,0.141533333333333},
-{2976514,3920100,3920382,0.140911111111111,0.140911111111111},
-{2976521,3922181,3922747,0.333830769230769,0.299296551724138},
-{2976522,3922181,3921958,0.191330769230769,0.191330769230769},
-{2976523,3921958,3921699,0.271114285714286,0.271114285714286},
-{2976524,3921958,3922252,0.149288888888889,0.149288888888889},
-{2976529,3921531,3921188,0.2239125,0.174760975609756},
-{2976530,3921188,3921041,0.132488888888889,0.0941368421052632},
-{2976531,3921041,3920820,0.226129411764706,0.142377777777778},
-{2976532,3921822,3921309,0.393333333333333,0.393333333333333},
-{2976533,3921041,3921309,0.155725,0.18687},
-{2976534,3921309,3921699,0.15615,0.16656},
-{2976535,3894597,3894633,0.0879103448275862,0.09105},
-{2976536,3895288,3895259,0.218256,0.341025},
-{2976537,3895084,3895359,0.202885714285714,0.21303},
-{2976538,3895359,3895735,0.291342857142857,0.2266},
-{2976539,3896027,3895887,1000000,1000000},
-{2976540,3895887,3896012,0.184511111111111,0.184511111111111},
-{2976541,3895887,3895833,0.159777777777778,0.159777777777778},
-{2976542,3895383,3895427,0.225888888888889,0.225888888888889},
-{2976543,3895518,3895383,0.0737555555555555,0.0737555555555555},
-{2976544,3895099,3895383,0.145844444444444,0.145844444444444},
-{2976545,3895722,3895938,1000000,1000000},
-{2976546,3895938,3895941,0.236933333333333,0.236933333333333},
-{2976547,3895308,3895809,0.294984,0.294984},
-{2976548,3896588,3896767,0.2237,0.2237},
-{2976549,3897432,3897626,0.182125,0.257117647058824},
-{2976550,3897626,3897379,0.284723076923077,0.284723076923077},
-{2976551,3898741,3899676,0.643121739130435,0.643121739130435},
-{2976552,3897834,3898569,0.453742857142857,0.433118181818182},
-{2976553,3898088,3898816,0.51761052631579,1000000},
-{2976554,3899083,3899997,0.61355,0.7012},
-{2976555,3899382,3900353,0.783284210526316,0.875435294117647},
-{2976556,3899045,3898848,0.114555555555556,0.114555555555556},
-{2976557,3899132,3899965,0.494060869565217,0.494060869565217},
-{2976558,3899866,3900750,0.659345454545454,0.659345454545454},
-{2976559,3900122,3900996,0.537266666666667,0.537266666666667},
-{2976560,3899399,3900303,0.449538461538462,0.46752},
-{2976561,3900374,3901254,1.46256,1000000},
-{2976562,3900541,3901482,0.583464,0.583464},
-{2976563,3900793,3901701,0.526511111111111,0.526511111111111},
-{2976564,3899846,3900793,0.581590909090909,0.556304347826087},
-{2976565,3900311,3901177,0.537066666666667,0.537066666666667},
-{2976566,3900898,3901105,0.176563636363636,0.2988},
-{2976567,3901084,3901326,1000000,1000000},
-{2976568,3901450,3901420,1000000,0.541309090909091},
-{2976569,3900548,3901043,0.239475,1000000},
-{2976570,3901326,3901420,0.104657142857143,0.104657142857143},
-{2976571,3901105,3901043,0.125727272727273,0.0864375},
-{2976572,3901043,3901391,0.416485714285714,1000000},
-{2976573,3901111,3901391,1000000,0.2762},
-{2976574,3901391,3901513,0.0767111111111111,0.0767111111111111},
-{2976575,3901799,3901420,0.3613875,1000000},
-{2976576,3901799,3902067,1000000,0.173425},
-{2976577,3901391,3901799,1000000,1000000},
-{2976578,3901513,3901655,0.0796444444444444,0.0796444444444444},
-{2976579,3901799,3901917,0.0694444444444444,0.0694444444444444},
-{2976580,3901917,3902090,0.0895777777777778,0.0895777777777778},
-{2976581,3902710,3902996,0.203628571428571,0.185921739130435},
-{2976582,3902285,3902710,0.175976470588235,0.161708108108108},
-{2976583,3901992,3902285,0.178475,0.186234782608696},
-{2976584,3902154,3903140,1.4718,1.4718},
-{2976585,3902410,3903396,1.12029230769231,1.12029230769231},
-{2976586,3902738,3903665,0.543444444444445,1.22275},
-{2976587,3902996,3903919,0.59328,0.570461538461538},
-{2976588,3901369,3901992,0.384792,0.310316129032258},
-{2976589,3901021,3901369,0.218060869565217,0.227972727272727},
-{2976590,3903919,3904193,0.134742857142857,0.150912},
-{2976591,3904193,3904483,0.22995,0.219},
-{2976592,3903257,3904193,1000000,0.505241379310345},
-{2976593,3902582,3903307,1000000,0.321051428571429},
-{2976594,3902338,3902582,1000000,0.120288888888889},
-{2976595,3902582,3902805,0.209894117647059,0.209894117647059},
-{2976596,3901369,3901557,0.116232,0.116232},
-{2976597,3901557,3901881,0.211176,0.211176},
-{2976598,3901557,3901798,0.136688888888889,0.136688888888889},
-{2976599,3902805,3903314,0.333666666666667,0.391695652173913},
-{2976600,3903314,3904244,0.529022222222222,0.751768421052632},
-{2976601,3898318,3898457,0.136366666666667,0.12918947368421},
-{2976602,3896306,3896871,1000000,1000000},
-{2976603,3904193,3905149,0.553022222222222,0.553022222222222},
-{2976604,3904552,3904758,0.15786,0.1754},
-{2976605,3904758,3904939,0.128672727272727,0.113232},
-{2976606,3904043,3904939,1000000,0.548832},
-{2976607,3904939,3905281,0.308873684210526,0.308873684210526},
-{2976608,3904415,3905281,0.578175,0.578175},
-{2976609,3904703,3905024,0.226657142857143,0.226657142857143},
-{2976610,3905713,3906391,0.4362,0.419423076923077},
-{2976611,3906155,3906391,0.155808,0.19476},
-{2976612,3904758,3905622,0.506644444444444,0.506644444444444},
-{2976613,3904939,3905814,0.5136,0.5136},
-{2976614,3905281,3906193,0.507222222222222,0.507222222222222},
-{2976615,3905560,3906439,0.45262,0.45262},
-{2976616,3905281,3905560,0.22032,0.22032},
-{2976617,3905024,3905560,0.476336842105263,0.476336842105263},
-{2976618,3905024,3905304,0.177222222222222,0.177222222222222},
-{2976619,3905560,3905920,0.307094117647059,0.307094117647059},
-{2976620,3905304,3905920,0.282075,0.282075},
-{2976621,3905030,3905304,0.191353846153846,0.226145454545455},
-{2976622,3905920,3906226,0.2433,0.2433},
-{2976623,3906226,3906350,0.0759333333333333,0.0759333333333333},
-{2976624,3906109,3906350,0.209115789473684,0.128167741935484},
-{2976625,3905861,3906109,0.148266666666667,0.148266666666667},
-{2976626,3905434,3905861,0.243288,0.217221428571429},
-{2976627,3906391,3907125,0.6820875,0.496063636363636},
-{2976628,3906391,3906635,0.20517,0.186518181818182},
-{2976629,3906635,3907420,0.4536,0.351174193548387},
-{2976630,3907122,3907725,0.310628571428571,0.347904},
-{2976631,3907725,3908048,0.17015,0.145842857142857},
-{2976632,3907420,3907725,0.151022222222222,0.151022222222222},
-{2976633,3907125,3907420,0.152022222222222,0.157869230769231},
-{2976634,3906830,3907125,0.155123076923077,0.16805},
-{2976635,3905920,3906779,0.4201125,0.480128571428571},
-{2976636,3906226,3907136,0.493088888888889,0.493088888888889},
-{2976637,3906901,3907273,0.211968,0.203815384615385},
-{2976638,3906620,3906901,0.134678571428571,0.101918918918919},
-{2976639,3906350,3906620,0.18065,0.154842857142857},
-{2976640,3907125,3907897,0.401266666666667,0.492463636363636},
-{2976641,3907420,3908219,0.388971428571429,0.388971428571429},
-{2976642,3907725,3908546,0.404377777777778,0.404377777777778},
-{2976643,3908546,3908862,0.163872,0.157569230769231},
-{2976644,3908219,3908546,0.175591304347826,0.155330769230769},
-{2976645,3907897,3908219,0.187527272727273,0.1719},
-{2976646,3907596,3907897,0.180027272727273,0.1886},
-{2976647,3908546,3909347,0.409377777777778,0.409377777777778},
-{2976648,3908219,3909051,0.381041379310345,0.381041379310345},
-{2976649,3907897,3908750,0.426092307692308,0.481669565217391},
-{2976650,3906901,3907970,0.547533333333333,0.547533333333333},
-{2976651,3906620,3907647,0.544888888888889,0.544888888888889},
-{2976652,3906350,3907365,0.556377777777778,0.556377777777778},
-{2976653,3907970,3908283,0.161266666666667,0.161266666666667},
-{2976654,3908283,3908725,0.26448,0.240436363636364},
-{2976655,3906109,3907032,0.542466666666667,0.542466666666667},
-{2976656,3905861,3906727,0.539355555555556,0.539355555555556},
-{2976657,3907647,3907987,0.208828571428571,0.208828571428571},
-{2976658,3906727,3907033,0.2622,0.247633333333333},
-{2976659,3907987,3908283,0.160272,0.174208695652174},
-{2976660,3907675,3907987,0.142220689655172,0.158630769230769},
-{2976661,3907390,3907675,0.151546153846154,0.171313043478261},
-{2976662,3907033,3907390,0.1896,0.156910344827586},
-{2976663,3908283,3909023,0.365066666666667,0.365066666666667},
-{2976664,3907987,3908720,0.364466666666667,0.364466666666667},
-{2976665,3907675,3908363,1.38282857142857,1.38282857142857},
-{2976666,3909023,3909420,0.254228571428571,0.254228571428571},
-{2976667,3908720,3909023,0.169675,0.169675},
-{2976668,3908363,3908720,0.187017391304348,0.187017391304348},
-{2976669,3908720,3909433,0.370733333333333,0.370733333333333},
-{2976670,3909023,3909712,0.366755555555556,0.366755555555556},
-{2976671,3909098,3909638,0.293133333333333,0.293133333333333},
-{2976672,3909098,3909524,0.249511111111111,0.249511111111111},
-{2976673,3909638,3909910,0.143822222222222,0.143822222222222},
-{2976674,3909635,3909910,0.19737,0.179427272727273},
-{2976675,3910284,3910616,0.208957894736842,0.208957894736842},
-{2976676,3910729,3911034,0.148846153846154,0.175909090909091},
-{2976677,3909910,3910252,0.174417391304348,0.174417391304348},
-{2976678,3910252,3910616,0.194536363636364,0.194536363636364},
-{2976679,3910616,3911034,0.205088888888889,0.205088888888889},
-{2976680,3909638,3910063,0.263977777777778,0.263977777777778},
-{2976681,3909222,3909524,0.20445,0.20445},
-{2976682,3909524,3910063,0.273,0.273},
-{2976683,3909910,3910824,0.495260869565217,0.35596875},
-{2976684,3910252,3911112,0.401066666666667,0.401066666666667},
-{2976685,3910616,3911402,0.6203,0.6203},
-{2976686,3910824,3911112,0.12075,0.1288},
-{2976687,3911112,3911402,0.0960878048780488,0.119381818181818},
-{2976688,3911587,3911580,0.257710344827586,0.257710344827586},
-{2976689,3911580,3912357,0.33744375,0.830630769230769},
-{2976690,3911580,3911455,0.247129411764706,0.247129411764706},
-{2976691,3911455,3911370,0.153987096774194,0.153987096774194},
-{2976692,3911455,3912052,0.319155555555556,0.319155555555556},
-{2976693,3911370,3911778,0.2164,0.2164},
-{2976694,3913016,3912447,0.32388,0.32388},
-{2976695,3914381,3914722,0.197355555555556,0.197355555555556},
-{2976696,3913795,3913966,0.0993714285714286,0.0907304347826087},
-{2976697,3912447,3912954,0.443446153846154,0.443446153846154},
-{2976698,3914787,3914381,0.349266666666667,0.392925},
-{2976699,3914722,3914335,0.210488888888889,0.210488888888889},
-{2976700,3913966,3913374,0.425611764705882,0.344542857142857},
-{2976701,3913966,3914207,0.13005,0.13005},
-{2976702,3914335,3914207,0.0702666666666667,0.0702666666666667},
-{2976703,3914207,3914529,0.175269230769231,0.1519},
-{2976704,3914529,3914843,0.211617391304348,0.2028},
-{2976705,3914722,3914980,0.169466666666667,0.169466666666667},
-{2976706,3914980,3914529,0.445658823529412,0.3294},
-{2976707,3915307,3914980,0.3132,0.261},
-{2976708,3915607,3914843,0.478928571428571,0.478928571428571},
-{2976709,3914843,3914465,0.277314285714286,0.200813793103448},
-{2976710,3913374,3914465,0.474461538461538,0.474461538461538},
-{2976711,3911844,3912704,0.401688888888889,0.401688888888889},
-{2976712,3912103,3913079,0.423288888888889,0.423288888888889},
-{2976713,3912353,3913396,1.02765,0.493272},
-{2976714,3912682,3913777,0.484222222222222,0.484222222222222},
-{2976715,3912052,3912353,0.163225,0.163225},
-{2976716,3911778,3912052,0.138688888888889,0.138688888888889},
-{2976717,3912052,3912671,0.294022222222222,0.294022222222222},
-{2976718,3911778,3912329,0.278866666666667,0.278866666666667},
-{2976719,3916229,3915449,0.486488888888889,0.486488888888889},
-{2977132,3896234,3895226,0.475156097560976,0.572982352941176},
-{2977133,3896234,3895988,0.187145454545455,1000000},
-{2977148,3899326,3899037,0.147537931034483,0.164561538461538},
-{2977149,3899587,3899326,0.163152,0.145671428571429},
-{2977150,3899686,3899587,0.073,0.0589615384615385},
-{2977151,3900069,3899686,0.250718181818182,0.204288888888889},
-{2977153,3899289,3899706,0.47596,0.310408695652174},
-{2977155,3899587,3899706,0.101621052631579,0.09654},
-{2977156,3899706,3900323,0.439114285714286,0.439114285714286},
-{2977157,3899706,3900069,0.358023529411765,0.338133333333333},
-{2977158,3900069,3900664,0.46338,0.487768421052632},
-{2977160,3902463,3901734,0.479018181818182,0.390311111111111},
-{2977162,3898921,3899326,0.404485714285714,0.2574},
-{2977163,3899208,3898921,0.229010526315789,0.2072},
-{2977164,3899208,3899587,0.207642857142857,0.223615384615385},
-{2977165,3899686,3899680,0.08896,0.116034782608696},
-{2977166,3899691,3899680,0.23328,0.208285714285714},
-{2977167,3900269,3899680,0.316,0.316},
-{2977168,3898920,3899208,0.163823076923077,0.163823076923077},
-{2977169,3899439,3898920,0.853466666666667,0.853466666666667},
-{2977170,3899691,3899439,0.140866666666667,0.152136},
-{2977171,3899439,3899214,0.151226086956522,0.1581},
-{2977172,3899911,3899691,0.170345454545455,0.15615},
-{2977173,3900963,3900592,0.385835294117647,1000000},
-{2977178,3898921,3898398,0.5451,0.346881818181818},
-{2977179,3898249,3898921,0.4389,0.4389},
-{2977180,3897693,3898249,0.4178,0.358114285714286},
-{2977181,3898559,3898920,0.207384,0.192022222222222},
-{2977184,3903356,3902463,0.517984615384615,0.517984615384615},
-{2977194,3905502,3905056,0.294688888888889,0.294688888888889},
-{2977195,3904397,3905075,0.366377777777778,0.366377777777778},
-{2977199,3906044,3905891,0.240911111111111,0.240911111111111},
-{2977267,3894795,3894171,1000000,0.4114},
-{2977268,3895336,3894795,1000000,0.485808},
-{2977269,3894795,3895103,0.3888,0.416571428571429},
-{2977270,3896594,3897215,1000000,0.414485714285714},
-{2977271,3896109,3896594,1000000,0.4338},
-{2977272,3895625,3895433,0.146066666666667,0.146066666666667},
-{2977273,3897675,3897991,0.29988,1000000},
-{2977274,3897335,3897675,0.26625,1000000},
-{2977275,3898514,3897675,0.488925,0.510182608695652},
-{2977276,3899323,3898854,0.34494,0.34494},
-{2977277,3898932,3898514,0.314154545454545,0.300495652173913},
-{2977278,3899454,3898932,0.294728571428571,0.2578875},
-{2977279,3898715,3898285,0.287225,0.287225},
-{2977280,3899228,3898715,1.62408,0.624646153846154},
-{2977281,3899412,3899606,0.140904,0.135484615384615},
-{2977282,3899606,3900141,0.278192307692308,0.267888888888889},
-{2977283,3900141,3899911,0.17105,0.17105},
-{2977284,3900495,3900141,0.1668,0.160384615384615},
-{2977285,3900495,3900963,0.312168,0.289044444444444},
-{2977286,3899670,3899606,0.193936363636364,0.147124137931034},
-{2977287,3900589,3900495,0.0769384615384615,0.0740888888888889},
-{2977288,3900753,3900589,0.109177777777778,0.105278571428571},
-{2977289,3900144,3900589,0.278448,0.267738461538462},
-{2977290,3899774,3900144,0.229636363636364,0.229636363636364},
-{2977291,3900144,3900546,0.343768421052632,0.296890909090909},
-{2977292,3899774,3899670,0.0837272727272727,0.07368},
-{2977293,3900154,3899774,0.292581818181818,0.279860869565217},
-{2977294,3900279,3900546,0.190278260869565,0.18235},
-{2977295,3900154,3900279,0.0808909090909091,0.071184},
-{2977296,3899454,3900154,1000000,1000000},
-{2977297,3899228,3899454,0.153542857142857,0.16122},
-{2977298,3898932,3899323,0.201755555555556,0.18158},
-{2977299,3898715,3898932,0.142486956521739,0.131088},
-{2977300,3898503,3898715,0.177633333333333,0.21316},
-{2977301,3898423,3897856,0.34335,0.2289},
-{2977302,3901301,3900963,0.200844444444444,1000000},
-{2977303,3901301,3901487,0.11415652173913,0.11415652173913},
-{2977304,3900753,3901301,0.343121739130435,0.328825},
-{2977305,3901461,3901257,0.126225,0.1377},
-{2977306,3901729,3901461,0.243564705882353,0.295757142857143},
-{2977307,3900546,3900725,0.141757894736842,0.128257142857143},
-{2977308,3900725,3901461,0.462954545454546,0.7275},
-{2977309,3899817,3899454,0.31587,0.263225},
-{2977310,3900279,3900684,1000000,1000000},
-{2977311,3898343,3898559,0.115155555555556,0.115155555555556},
-{2977312,3901487,3901730,1000000,0.168425},
-{2977313,3901257,3901730,0.236871428571429,0.236871428571429},
-{2977314,3901730,3901897,0.112822222222222,0.112822222222222},
-{2977315,3904022,3903356,0.488454545454545,0.488454545454545},
-{2977316,3902864,3903928,0.646357894736842,0.646357894736842},
-{2977317,3903928,3904022,0.09075,0.08712},
-{2977318,3903846,3903928,0.10728,0.0957857142857143},
-{2977319,3903568,3903846,0.2444,0.279314285714286},
-{2977320,3904117,3903846,0.1104,0.123648},
-{2977321,3904638,3904117,0.219716129032258,0.34056},
-{2977322,3904232,3904117,1000000,1000000},
-{2977323,3902439,3901729,0.312688235294118,0.279773684210526},
-{2977324,3903263,3902439,0.334894736842105,0.343945945945946},
-{2977325,3904773,3905110,0.35096,0.277073684210526},
-{2977326,3905509,3905110,0.238056,0.270518181818182},
-{2977327,3906066,3905509,0.2488,0.257379310344828},
-{2977329,3905143,3904773,0.194828571428571,0.2273},
-{2977330,3905143,3905509,0.218088888888889,0.218088888888889},
-{2977331,3905526,3905143,0.2187375,0.2187375},
-{2977332,3905663,3905825,1000000,1000000},
-{2977428,3896741,3896109,1000000,0.541275},
-{2977429,3896741,3897235,0.36909,1000000},
-{2977430,3896175,3896741,0.338644444444444,1000000},
-{2977431,3897181,3896741,1000000,0.33835},
-{2977432,3898266,3897881,0.438284210526316,1000000},
-{2977433,3897617,3897644,1000000,0.312525},
-{2977434,3897617,3898266,0.348257142857143,0.348257142857143},
-{2977435,3898451,3898266,0.178745454545455,1000000},
-{2977436,3898646,3898451,0.19476,1000000},
-{2977437,3898951,3898646,0.299147368421053,1000000},
-{2977438,3898451,3898896,0.322833333333333,0.29055},
-{2977439,3897729,3898451,0.421657142857143,0.354192},
-{2977440,3897699,3897729,0.05922,0.074025},
-{2977441,3897294,3897614,0.187377777777778,0.187377777777778},
-{2977442,3899341,3899094,0.58662,0.58662},
-{2977443,3898961,3899341,0.209836363636364,0.19235},
-{2977444,3899868,3899341,0.257897142857143,0.347169230769231},
-{2977445,3899352,3899868,0.416858823529412,0.272561538461538},
-{2977446,3900359,3899868,0.263571428571429,0.351428571428571},
-{2977447,3903012,3901967,1000000,0.736771428571429},
-{2977448,3903475,3902566,0.675409090909091,1000000},
-{2977451,3903513,3903475,0.068175,0.0389571428571429},
-{2977452,3903513,3903954,0.194861538461538,0.220278260869565},
-{2977453,3903954,3903889,0.42624,0.202971428571429},
-{2977454,3904053,3903954,0.179825,0.172632},
-{2977455,3903954,3904344,0.234,0.221},
-{2977456,3904344,3904746,0.23217,0.244389473684211},
-{2977457,3904409,3904344,0.646714285714286,0.646714285714286},
-{2977458,3904811,3904746,0.163511111111111,0.163511111111111},
-{2977459,3904409,3904053,0.176618181818182,0.176618181818182},
-{2977460,3904811,3904409,0.1809,0.213790909090909},
-{2977461,3905403,3904811,0.662466666666667,0.6276},
-{2977465,3905295,3905197,1000000,1000000},
-{2977467,3904282,3904421,0.25215,0.25215},
-{2977468,3904421,3904712,0.2606,0.300692307692308},
-{2977469,3904712,3904565,0.198133333333333,0.274338461538462},
-{2977470,3904746,3904712,0.357857142857143,0.357857142857143},
-{2977471,3904858,3904931,0.194777777777778,0.194777777777778},
-{2977586,3918140,3917638,0.290022222222222,0.290022222222222},
-{2977587,3917191,3917627,0.291822222222222,0.291822222222222},
-{2977588,3917627,3918274,0.418375,0.6694},
-{2977589,3917348,3917192,0.0956222222222222,0.0956222222222222},
-{2977590,3916226,3916841,0.389044444444444,0.389044444444444},
-{2977591,3916841,3917155,0.1982,0.1982},
-{2977592,3917155,3917207,0.247758620689655,0.247758620689655},
-{2977593,3916485,3917023,0.331066666666667,0.331066666666667},
-{2977594,3917023,3917018,0.101355555555556,0.101355555555556},
-{2977595,3917018,3916841,0.101711111111111,0.101711111111111},
-{2977596,3916841,3916587,0.158044444444444,0.158044444444444},
-{2977597,3916587,3915768,0.501466666666667,0.501466666666667},
-{2977598,3916912,3916093,0.504044444444444,0.504044444444444},
-{2977599,3917411,3917155,0.193107692307692,0.193107692307692},
-{2977600,3917207,3917449,0.210365217391304,0.2304},
-{2977601,3917449,3917740,0.154529032258065,0.154529032258065},
-{2977602,3917449,3917258,0.166577777777778,0.166577777777778},
-{2977603,3917258,3917009,0.230371428571429,0.230371428571429},
-{2977604,3917042,3917102,0.203755555555556,0.203755555555556},
-{2977605,3917102,3917192,0.0468888888888889,0.0468888888888889},
-{2977606,3917191,3917192,0.109688888888889,0.109688888888889},
-{2977607,3917122,3917191,0.0432,0.0432},
-{2977608,3917018,3917122,0.0462222222222222,0.0462222222222222},
-{2977609,3917102,3917023,0.0358444444444444,0.0358444444444444},
-{2977610,3917122,3917155,0.151941176470588,0.151941176470588},
-{2977611,3917880,3918540,0.607866666666667,0.521028571428571},
-{2977612,3918540,3918274,0.156444444444444,0.156444444444444},
-{2977613,3918148,3918849,1.25273333333333,1.25273333333333},
-{2977614,3918314,3919021,0.475968,0.475968},
-{2977615,3918476,3919466,0.613955555555555,0.613955555555555},
-{2977616,3917740,3917486,0.186755555555556,0.186755555555556},
-{2977617,3917486,3917268,0.206242105263158,0.206242105263158},
-{2977618,3917740,3917928,0.121878260869565,0.133485714285714},
-{2977619,3917928,3918006,0.114789473684211,0.114789473684211},
-{2977620,3917928,3918207,0.154488888888889,0.154488888888889},
-{2977621,3918207,3918655,0.286771428571429,0.286771428571429},
-{2977622,3918006,3917749,0.147111111111111,0.147111111111111},
-{2977623,3917749,3917533,0.152222222222222,0.152222222222222},
-{2977624,3917486,3917749,0.189104347826087,0.189104347826087},
-{2977625,3918006,3918496,0.342314285714286,0.342314285714286},
-{2977626,3889636,3890557,0.431844444444444,0.353327272727273},
-{2977627,3891036,3891401,0.237457142857143,0.191792307692308},
-{2977628,3886153,3886302,1000000,1000000},
-{2977629,3885480,3885966,0.2589,1000000},
-{2977630,3890420,3891272,1000000,1000000},
-{2977631,3891244,3890420,1000000,1000000},
-{2977632,3880453,3880675,0.134422222222222,0.134422222222222},
-{2977633,3880883,3880986,0.1742,1000000},
-{2977634,3880761,3880883,1000000,0.1814},
-{2977635,3921699,3921989,0.1338,0.2007},
-{2977636,3921989,3922325,0.222057142857143,0.222057142857143},
-{2977639,3922252,3921989,0.191266666666667,0.191266666666667},
-{2977643,3922265,3920935,0.881688888888889,0.881688888888889},
-{2977645,3921963,3921208,0.489244444444444,0.489244444444444},
-{2977652,3918655,3918496,0.200428571428571,0.21045},
-{2977653,3918496,3918329,0.126690909090909,0.149314285714286},
-{2977654,3918329,3918119,0.20685,0.197},
-{2977655,3917749,3918329,0.27732,0.27732},
-{2977656,3918958,3918452,0.6546,1.45466666666667},
-{2977657,3918958,3919226,0.152488888888889,0.117634285714286},
-{2977658,3919226,3918721,0.479822222222222,0.479822222222222},
-{2977659,3919226,3919509,0.106866666666667,0.0874363636363636},
-{2977660,3919509,3919793,0.108566666666667,0.0930571428571429},
-{2977661,3919793,3920060,0.164424,0.146807142857143},
-{2977662,3919509,3918997,0.481977777777778,0.481977777777778},
-{2977663,3919793,3919248,0.483511111111111,0.483511111111111},
-{2977664,3920935,3920379,0.570704347826087,2.1877},
-{2977665,3921208,3920648,0.557181818181818,0.557181818181818},
-{2977670,3913361,3914521,0.515089655172414,0.515089655172414},
-{2977671,3913728,3914826,0.569488888888889,0.569488888888889},
-{2977672,3914090,3915101,0.479145454545454,0.52706},
-{2977673,3914369,3915330,0.575142857142857,0.575142857142857},
-{2977674,3914648,3915569,0.650256,0.650256},
-{2977675,3914870,3915811,0.866747368421053,0.633392307692308},
-{2977676,3915085,3916068,0.522774193548387,0.463028571428571},
-{2977677,3914090,3914369,0.1824,0.161353846153846},
-{2977678,3914369,3914648,0.133567741935484,0.106169230769231},
-{2977679,3914648,3914870,0.125670967741935,0.105291891891892},
-{2977680,3914870,3915085,0.137935714285714,0.133179310344828},
-{2977681,3914833,3915085,0.158076923076923,0.146785714285714},
-{2977682,3920648,3920011,0.5186,0.5186},
-{2977683,3920379,3919769,0.497311111111111,0.497311111111111},
-{2977684,3921461,3920907,0.431066666666667,0.431066666666667},
-{2977685,3921758,3921207,0.533342857142857,0.533342857142857},
-{2977686,3922051,3921508,1.87,1.87},
-{2977690,3920907,3920274,0.528711111111111,0.528711111111111},
-{2977691,3921207,3920546,0.554355555555556,0.554355555555556},
-{2977692,3921508,3920793,0.580511111111111,0.580511111111111},
-{2977696,3922109,3921378,0.568955555555555,0.568955555555555},
-{2977700,3919541,3919769,0.147790909090909,0.180633333333333},
-{2977701,3919769,3919834,0.0430846153846154,0.03734},
-{2977702,3919834,3920011,0.0954967741935484,0.0925125},
-{2977703,3920011,3920085,0.0357352941176471,0.0368181818181818},
-{2977704,3920085,3920274,0.0762171428571429,0.0808363636363636},
-{2977705,3920274,3920372,0.03945,0.0405771428571429},
-{2977706,3920372,3920546,0.0773666666666667,0.0819176470588235},
-{2977707,3920546,3920793,0.11688,0.11688},
-{2977708,3920793,3921039,0.116329411764706,0.1236},
-{2977709,3921378,3921754,0.131152941176471,0.135127272727273},
-{2977712,3919834,3919629,0.154266666666667,0.154266666666667},
-{2977713,3920085,3919925,0.128066666666667,0.128066666666667},
-{2977714,3920372,3920191,0.0953555555555556,0.0953555555555556},
-{2977715,3919629,3919925,1000000,1000000},
-{2977716,3919925,3920191,1000000,1000000},
-{2977818,3902059,3902191,0.686013333333333,0.735014285714286},
-{2977819,3902191,3902255,0.260022857142857,0.2528},
-{2977822,3903384,3903428,0.2322,0.259517647058824},
-{2977823,3903482,3903428,0.153761538461538,0.159912},
-{2977824,3903534,3903482,0.181875,0.167884615384615},
-{2977825,3903987,3904039,0.276923076923077,0.2},
-{2977826,3904039,3904042,0.0654,0.04905},
-{2977827,3904042,3904107,0.193870588235294,0.1831},
-{2977828,3904128,3904107,0.0429157894736842,0.05436},
-{2977829,3904190,3904128,0.2712,0.2712},
-{2977830,3903428,3904042,0.258466666666667,0.258466666666667},
-{2977831,3903482,3904107,0.8718,0.8718},
-{2977832,3903534,3904190,0.28956,0.28956},
-{2977834,3902416,3902458,0.0722222222222222,0.0722222222222222},
-{2977835,3902458,3903534,0.60153,0.60153},
-{2977837,3898183,3898224,0.14421,0.1802625},
-{2977838,3898224,3898290,0.202176,0.229745454545455},
-{2977839,3898290,3898345,0.112118181818182,0.16444},
-{2977840,3897986,3898345,0.133755555555556,0.133755555555556},
-{2977841,3898345,3898679,0.1818,0.2121},
-{2977842,3898679,3899011,0.143284615384615,0.161973913043478},
-{2977843,3899011,3899393,0.159,0.178875},
-{2977844,3898535,3898679,0.479263636363636,0.620223529411765},
-{2977845,3898867,3899011,1000000,1000000},
-{2977846,3898679,3898818,0.4575,1000000},
-{2977847,3899011,3899173,1000000,1000000},
-{2977848,3898669,3898818,0.0640444444444445,0.0640444444444445},
-{2977849,3899173,3899543,0.2328,0.201054545454545},
-{2977850,3898224,3898290,0.3104,0.3104},
-{2978074,3898347,3900553,1000000,1000000},
-{2978075,3900553,3901122,0.534333333333333,0.534333333333333},
-{2978076,3899053,3900878,1000000,1000000},
-{2978078,3902332,3902071,0.1281,0.1281},
-{2978079,3902608,3902332,0.143936842105263,1000000},
-{2978080,3902608,3903138,1000000,1000000},
-{2978081,3902071,3902904,0.659778947368421,0.659778947368421},
-{2978082,3902806,3902904,0.0784434782608696,0.0644357142857143},
-{2978083,3902904,3903036,1000000,1000000},
-{2978084,3902332,3903036,1000000,1000000},
-{2978085,3902608,3903364,1000000,0.861214285714286},
-{2978086,3903138,3903249,1000000,1000000},
-{2978087,3903249,3903708,1000000,0.74604},
-{2978088,3903249,3903438,0.2331,0.2331},
-{2978089,3903860,3903708,0.08468,0.0940888888888889},
-{2978090,3903438,3903708,0.217868571428571,0.24598064516129},
-{2978091,3903438,3903364,0.0756,0.061425},
-{2978092,3903364,3903308,0.0722608695652174,0.0615555555555555},
-{2978093,3902574,3903044,0.3028,0.24224},
-{2978094,3903258,3903479,0.162872727272727,0.23888},
-{2978095,3903479,3903633,0.1578,0.1578},
-{2978096,3903711,3903933,0.160309090909091,0.195933333333333},
-{2978097,3903933,3904175,0.128232,0.133575},
-{2978098,3903479,3903933,0.272688888888889,0.272688888888889},
-{2978099,3903457,3903633,0.137568,0.181010526315789},
-{2978100,3903633,3904175,0.210891428571429,0.263614285714286},
-{2978101,3904175,3904719,0.316533333333333,0.305228571428571},
-{2978102,3905124,3904667,0.258955555555555,0.258955555555555},
-{2978103,3905351,3905991,0.636234782608696,0.48778},
-{2978211,3907068,3907801,0.413975,0.382130769230769},
-{2978212,3905351,3906621,0.848305263157895,0.848305263157895},
-{2978213,3909727,3911178,0.626288888888889,0.626288888888889},
-{2978214,3908279,3910214,0.790222222222222,0.790222222222222},
-{2978215,3911414,3911718,0.392426086956522,0.392426086956522},
-{2978216,3912006,3911718,0.2315,0.264571428571429},
-{2978217,3911718,3911807,0.1032,0.1032},
-{2978218,3911807,3912502,0.530333333333333,0.530333333333333},
-{2978219,3911807,3913018,0.4414,0.4414},
-{2978220,3913018,3913364,0.242822222222222,0.242822222222222},
-{2978221,3913018,3913548,0.201466666666667,0.201466666666667},
-{2978222,3912502,3913018,0.307333333333333,0.307333333333333},
-{2978224,3914167,3914679,0.478854545454546,0.478854545454546},
-{2978226,3915408,3915715,0.269807142857143,0.4197},
-{2978231,3915715,3916464,0.450192857142857,0.484823076923077},
-{2978232,3915906,3916712,0.469721739130435,0.469721739130435},
-{2978233,3915648,3916452,0.407866666666667,0.407866666666667},
-{2978238,3923628,3924024,0.483505263157895,0.483505263157895},
-{2978240,3922675,3922709,0.603133333333334,0.603133333333334},
-{2978241,3922033,3922329,0.281844444444444,0.281844444444444},
-{2978242,3922329,3922227,0.0674888888888889,0.0674888888888889},
-{2978244,3921771,3922020,0.264847058823529,0.264847058823529},
-{2978245,3921771,3921938,0.39424,0.39424},
-{2978246,3922020,3921938,0.10012,0.10012},
-{2978247,3922918,3923520,0.536888888888889,0.536888888888889},
-{2978248,3922841,3923398,0.83324,0.83324},
-{2978249,3923041,3923320,0.315872727272727,0.315872727272727},
-{2978250,3921559,3921678,0.388,0.388},
-{2978251,3922244,3921763,0.2746,0.2746},
-{2978252,3921763,3921975,0.152044444444444,0.152044444444444},
-{2978253,3921975,3922168,0.124,0.239142857142857},
-{2978254,3922168,3922257,0.0606521739130435,0.0775},
-{2978255,3922345,3922556,0.343244444444444,1000000},
-{2978256,3921111,3921291,0.191964705882353,0.1554},
-{2978257,3921194,3921291,0.0826,0.0874588235294118},
-{2978258,3921194,3920842,0.29691,0.6598},
-{2978259,3920755,3920636,0.110929411764706,0.110929411764706},
-{2978364,3859221,3858420,0.56448,0.56448},
-{2978365,3857672,3858477,0.366652173913043,0.383318181818182},
-{2978366,3858477,3858825,0.143133333333333,0.143133333333333},
-{2978367,3858825,3858815,0.0874666666666667,0.0874666666666667},
-{2978368,3858825,3858972,0.100022222222222,0.100022222222222},
-{2978369,3858815,3858792,0.164844444444444,0.164844444444444},
-{2978370,3864715,3864281,1000000,0.256246153846154},
-{2978371,3865232,3864715,1000000,0.36255},
-{2978372,3864715,3865417,1.37145882352941,0.932592},
-{2978373,3864281,3863872,1000000,1000000},
-{2978374,3865923,3865417,0.191688888888889,0.191688888888889},
-{2978375,3866283,3865825,0.2619,0.428563636363636},
-{2978376,3865417,3865459,0.19205,0.19205},
-{2978377,3865905,3865459,0.208745454545455,0.255133333333333},
-{2978378,3865459,3865078,1000000,1000000},
-{2978379,3864453,3863923,0.441623076923077,0.410078571428571},
-{2978380,3863397,3863171,0.183504,0.254866666666667},
-{2978381,3863171,3863165,0.04743,0.07905},
-{2978382,3863898,3863397,0.306888888888889,0.306888888888889},
-{2978383,3864018,3863898,0.084984,0.0786888888888889},
-{2978384,3863898,3863165,0.5058,0.684317647058823},
-{2978385,3865300,3865063,0.27147,0.246790909090909},
-{2978386,3863490,3863181,0.174933333333333,0.174933333333333},
-{2978387,3869865,3868713,1000000,1.71036923076923},
-{2978388,3869421,3868258,0.692557894736842,1000000},
-{2978389,3871944,3870419,0.9498,0.904571428571429},
-{2978390,3871539,3869421,1.12785,1000000},
-{2978391,3867564,3867354,0.217226086956522,0.3122625},
-{2978392,3866487,3867354,1000000,0.7579},
-{2978393,3867788,3867450,0.1926,0.4066},
-{2978394,3867450,3866503,0.555795,0.555795},
-{2978395,3867450,3867835,0.567533333333333,0.547264285714286},
-{2978396,3868458,3867835,0.27085,0.250015384615385},
-{2978397,3872921,3872568,1000000,0.428742857142857},
-{2978398,3874738,3875430,0.641444444444444,0.641444444444444},
-{2978399,3876195,3876267,0.338715789473684,0.32178},
-{2978400,3876195,3875347,1.01621052631579,1.20675},
-{2978401,3878307,3877054,0.654709090909091,1000000},
-{2978403,3851558,3850581,0.632975,0.632975},
-{2978404,3850917,3851402,0.317333333333333,0.317333333333333},
-{2978405,3851322,3851558,0.1712,0.1712},
-{2978406,3851558,3851717,0.0927857142857143,0.0787272727272727},
-{2978407,3851717,3851923,0.117222222222222,0.117222222222222},
-{2978408,3851717,3852219,0.237444444444444,0.221068965517241},
-{2978409,3852219,3851969,0.156888,0.170530434782609},
-{2978410,3852219,3852755,0.2037,0.197129032258065},
-{2978411,3852517,3852755,0.155866666666667,0.155866666666667},
-{2978412,3853628,3853251,0.219022222222222,0.219022222222222},
-{2978413,3854673,3854371,0.175778571428571,0.182288888888889},
-{2978414,3856584,3854673,0.773225806451613,0.647837837837838},
-{2978415,3857349,3856768,0.603069230769231,1000000},
-{2978416,3854520,3854282,0.26841,0.282536842105263},
-{2978417,3854801,3854282,0.251622222222222,0.251622222222222},
-{2978418,3856030,3854801,0.601177777777778,0.601177777777778},
-{2978419,3854801,3854561,0.204866666666667,0.204866666666667},
-{2978420,3854561,3853990,0.24858,0.225981818181818},
-{2978421,3855889,3854561,0.564165517241379,0.4812},
-{2978422,3856181,3855870,0.548781818181818,0.482928},
-{2978423,3856692,3856181,0.280896,0.270092307692308},
-{2978424,3856873,3856692,0.119222222222222,0.119222222222222},
-{2978425,3858477,3858444,0.358976470588235,0.30513},
-{2978426,3858444,3858373,1000000,0.156966666666667},
-{2978427,3858716,3858383,0.335538461538462,0.335538461538462},
-{2978428,3860073,3859918,0.183814285714286,0.270884210526316},
-{2978429,3859411,3859199,0.519564705882353,0.519564705882353},
-{2978430,3859199,3858716,0.54675652173913,0.54675652173913},
-{2978431,3861228,3860962,0.192327272727273,0.222694736842105},
-{2978432,3861677,3861228,0.282688235294118,0.32038},
-{2978433,3859033,3858716,0.239937931034483,0.23194},
-{2978434,3859918,3859033,1.039575,1.039575},
-{2978435,3860895,3860471,0.324378947368421,0.3424},
-{2978436,3860471,3859571,0.755622222222222,0.755622222222222},
-{2978437,3859571,3859236,0.15828,0.164875},
-{2978438,3860962,3860598,0.2308,0.2885},
-{2978439,3860598,3860237,0.19861875,0.2354},
-{2978440,3860237,3859798,0.246507692307692,0.291327272727273},
-{2978441,3859798,3859571,0.206311111111111,0.206311111111111},
-{2978442,3863171,3862741,0.201977777777778,0.201977777777778},
-{2978443,3862055,3862744,0.977133333333333,0.977133333333333},
-{2978444,3862653,3862744,0.0822666666666667,0.0822666666666667},
-{2978445,3862744,3863025,0.243988235294118,0.243988235294118},
-{2978446,3863025,3863184,0.125345454545455,0.17235},
-{2978447,3862568,3862324,0.15414,0.12845},
-{2978448,3863184,3862946,0.256095652173913,0.280485714285714},
-{2978449,3865816,3866058,1000000,1000000},
-{2978450,3866058,3866150,0.122177777777778,0.122177777777778},
-{2978451,3866150,3865659,0.201,0.201},
-{2978452,3865662,3865659,0.0864727272727273,0.0679428571428571},
-{2978453,3866150,3866232,0.11355,0.0973285714285714},
-{2978454,3866232,3865662,0.231192,0.3211},
-{2978455,3868655,3868754,1000000,0.12048},
-{2978456,3869689,3869066,0.769771428571429,1000000},
-{2978457,3867869,3867474,1000000,0.207885714285714},
-{2978458,3868268,3867869,1000000,0.1686},
-{2978459,3868402,3868268,1000000,0.0691090909090909},
-{2978460,3868211,3868402,0.323060869565217,1000000},
-{2978461,3869032,3868402,1000000,0.294457142857143},
-{2978462,3869873,3869190,1000000,0.394366666666667},
-{2978463,3870878,3870540,1000000,0.5268},
-{2978464,3867613,3867017,0.4268,0.376588235294118},
-{2978465,3867869,3867613,0.332217391304348,0.272892857142857},
-{2978466,3867613,3867688,0.172338461538462,0.106685714285714},
-{2978467,3868268,3867968,0.587584615384615,1000000},
-{2978468,3868402,3868567,0.283105263157895,1000000},
-{2978469,3871291,3870878,1000000,0.740505882352941},
-{2978470,3867017,3867170,0.473723076923077,0.473723076923077},
-{2978471,3870285,3870098,1000000,0.56502},
-{2978472,3871395,3870973,0.522978947368421,1000000},
-{2978473,3873412,3874448,0.515363636363636,0.515363636363636},
-{2978474,3874448,3874419,0.270385714285714,0.164582608695652},
-{2978475,3876052,3875960,0.225044444444444,0.225044444444444},
-{2978476,3875501,3874123,0.874042105263158,1000000},
-{2978477,3878655,3877969,1000000,0.346963636363636},
-{2978478,3877092,3876748,1000000,0.484275},
-{2978479,3878243,3877920,1000000,0.621},
-{2978480,3878155,3877902,1000000,0.423366666666667},
-{2978481,3879484,3878586,0.654675,1000000},
-{2978482,3878967,3878975,0.0939111111111111,0.0939111111111111},
-{2978483,3876276,3876371,0.0663,0.0663},
-{2978484,3876371,3876323,1000000,1000000},
-{2978485,3876323,3876192,1000000,1000000},
-{2978486,3878897,3878882,0.22825,1000000},
-{2978487,3878950,3878882,1000000,0.06046},
-{2978488,3879195,3879226,0.18651,1000000},
-{2978489,3880277,3879222,1000000,1000000},
-{2978491,3850208,3850006,0.17565,0.17565},
-{2978492,3850541,3850208,0.25815652173913,0.269890909090909},
-{2978493,3851228,3851969,0.50984347826087,0.4886},
-{2978494,3851015,3851495,0.270576923076923,0.260555555555556},
-{2978495,3850934,3851015,0.051888,0.0564},
-{2978496,3855362,3855298,0.78084705882353,0.78084705882353},
-{2978497,3855362,3855608,0.457942857142857,0.457942857142857},
-{2978498,3855579,3855362,0.50673,0.460663636363636},
-{2978499,3856351,3856255,0.705670588235294,0.705670588235294},
-{2978500,3856351,3856537,0.3006,0.3006},
-{2978501,3857560,3857715,0.0725333333333333,0.0725333333333333},
-{2978502,3857715,3857393,0.191177777777778,0.191177777777778},
-{2978503,3857021,3856746,0.160355555555556,0.160355555555556},
-{2978504,3856723,3856351,0.38565,0.30852},
-{2978505,3856618,3856723,0.12033,0.141564705882353},
-{2978506,3854709,3854202,0.35048,0.328575},
-{2978507,3856692,3856434,0.208444444444444,0.208444444444444},
-{2978508,3857826,3856692,0.670075,0.730990909090909},
-{2978509,3858294,3857826,0.28885,0.266630769230769},
-{2978510,3856525,3856172,0.239084210526316,0.239084210526316},
-{2978511,3858107,3857678,0.245918181818182,0.245918181818182},
-{2978512,3859798,3859478,0.187485714285714,0.16405},
-{2978513,3859914,3859615,0.151511111111111,0.151511111111111},
-{2978514,3859914,3859798,0.1184,0.1184},
-{2978515,3859166,3858294,0.85028,0.85028},
-{2978516,3859150,3859323,0.148355555555556,0.148355555555556},
-{2978517,3858692,3858294,0.247328571428571,0.364484210526316},
-{2978518,3859423,3858692,0.429704347826087,0.429704347826087},
-{2978519,3859654,3858692,0.496142857142857,0.473590909090909},
-{2978520,3859806,3859166,0.300048,0.326139130434783},
-{2978521,3860059,3859654,0.297,0.297},
-{2978522,3860477,3860059,0.197822222222222,0.197822222222222},
-{2978523,3860899,3860059,0.434,0.434},
-{2978524,3860154,3859914,0.221333333333333,0.221333333333333},
-{2978525,3859806,3860154,0.184069565217391,0.162830769230769},
-{2978526,3860421,3859914,0.251288888888889,0.251288888888889},
-{2978527,3860421,3860237,0.229418181818182,0.229418181818182},
-{2978528,3860425,3860421,0.232375,0.232375},
-{2978529,3860154,3860425,0.142220689655172,0.187472727272727},
-{2978530,3860853,3860425,0.239345454545455,0.315936},
-{2978531,3861345,3861746,0.514427586206897,0.481238709677419},
-{2978532,3860598,3860960,0.353488888888889,0.353488888888889},
-{2978533,3859836,3859273,0.352930434782609,0.352930434782609},
-{2978534,3860258,3860066,0.16935,0.16935},
-{2978535,3860066,3859836,0.186436363636364,0.124290909090909},
-{2978536,3859836,3859581,0.23406,0.180046153846154},
-{2978537,3860465,3860066,0.255777777777778,0.255777777777778},
-{2978538,3861452,3860475,0.513311111111111,0.513311111111111},
-{2978539,3859836,3860226,0.340447058823529,0.2756},
-{2978540,3860769,3860465,0.166017391304348,0.200968421052632},
-{2978541,3861658,3860769,0.578478260869565,0.578478260869565},
-{2978542,3861746,3861960,0.259607142857143,0.29076},
-{2978543,3861960,3861984,0.0314444444444444,0.0303214285714286},
-{2978544,3862691,3861960,0.539866666666667,0.539866666666667},
-{2978545,3862286,3861984,0.295008,0.295008},
-{2978546,3862991,3862568,0.355777777777778,0.355777777777778},
-{2978547,3862991,3862691,1000000,1000000},
-{2978548,3863417,3862991,0.267666666666667,0.267666666666667},
-{2978549,3863417,3862946,1000000,0.40815652173913},
-{2978550,3863243,3862991,1000000,0.4000875},
-{2978551,3862814,3863243,0.253375,0.253375},
-{2978552,3862432,3862286,0.186366666666667,0.197329411764706},
-{2978553,3862286,3863015,0.468,0.468},
-{2978554,3863243,3863460,1000000,0.125355555555556},
-{2978555,3863460,3863681,1000000,0.250476923076923},
-{2978556,3863681,3863417,1000000,0.20742},
-{2978557,3863681,3864039,0.284888888888889,0.284888888888889},
-{2978558,3863668,3864039,0.179822222222222,0.179822222222222},
-{2978559,3865703,3865662,0.09468,0.0860727272727273},
-{2978560,3865804,3865703,0.167666666666667,0.2515},
-{2978561,3866232,3866318,0.1202,0.0874181818181818},
-{2978562,3866318,3866416,0.18492,0.132085714285714},
-{2978563,3866318,3865703,1000000,0.357705882352941},
-{2978564,3866683,3866318,1000000,0.115333333333333},
-{2978565,3866600,3866683,0.0895777777777778,0.0895777777777778},
-{2978566,3866683,3866748,0.0946444444444444,1000000},
-{2978567,3865072,3864444,0.3014,0.3014},
-{2978568,3865773,3865072,0.270038709677419,0.380509090909091},
-{2978569,3865400,3865072,0.405866666666667,0.405866666666667},
-{2978570,3866943,3865661,0.564977777777778,0.564977777777778},
-{2978571,3865072,3864768,0.368035714285714,0.429375},
-{2978572,3867633,3867214,0.203977777777778,0.203977777777778},
-{2978573,3867644,3867622,1000000,0.168657142857143},
-{2978574,3867538,3867909,1000000,0.734115789473684},
-{2978575,3867928,3868337,1000000,1000000},
-{2978576,3868254,3868649,1000000,0.74307},
-{2978577,3868583,3868780,0.2742,0.380833333333333},
-{2978578,3868780,3869013,0.369626086956522,0.404828571428571},
-{2978579,3869405,3868780,0.284373913043478,0.344242105263158},
-{2978580,3870670,3870098,0.232375,1000000},
-{2978581,3870472,3869492,1000000,0.395921739130435},
-{2978582,3871016,3870472,1000000,0.244460869565217},
-{2978583,3871184,3871016,0.194475,0.194475},
-{2978584,3868264,3867769,0.306177777777778,0.306177777777778},
-{2978585,3871216,3871016,1000000,0.225190909090909},
-{2978586,3870122,3870244,0.151147826086957,0.14485},
-{2978587,3870244,3870618,0.2842,0.2842},
-{2978588,3870618,3870862,0.182472,0.162921428571429},
-{2978589,3869169,3869395,0.652705263157895,0.62007},
-{2978590,3868278,3868342,0.296125,0.338428571428571},
-{2978591,3868342,3867622,0.263630769230769,0.311563636363636},
-{2978592,3868902,3868342,0.180289655172414,0.201092307692308},
-{2978593,3870618,3869624,0.35808,0.35808},
-{2978594,3870862,3869531,0.37785,0.345462857142857},
-{2978595,3871206,3870862,0.108658064516129,0.0935666666666667},
-{2978596,3871489,3871206,0.394992,0.394992},
-{2978597,3871978,3871206,0.270888,0.282175},
-{2978598,3869726,3870098,0.131288888888889,0.131288888888889},
-{2978599,3872864,3872781,1000000,1000000},
-{2978600,3873046,3872974,1000000,1000000},
-{2978601,3872781,3872513,1000000,0.328090909090909},
-{2978602,3872974,3872740,0.2939,1000000},
-{2978603,3872740,3872513,0.0918545454545455,0.0918545454545455},
-{2978604,3872910,3872740,0.10132,0.0660782608695652},
-{2978605,3872513,3872275,1000000,0.2},
-{2978606,3872910,3872747,1000000,0.23523},
-{2978607,3873780,3872910,1000000,0.414704347826087},
-{2978608,3873685,3872747,0.473628571428571,1000000},
-{2978609,3873889,3873780,0.281372727272727,1000000},
-{2978610,3873780,3873685,0.210763636363636,1000000},
-{2978611,3875160,3873780,1000000,0.611511111111111},
-{2978612,3876012,3875816,0.536925,0.613628571428571},
-{2978613,3875816,3875916,0.4032,0.4032},
-{2978614,3875974,3875916,0.152557894736842,1000000},
-{2978615,3875916,3875733,0.281290909090909,1000000},
-{2978616,3876325,3876822,1000000,0.50736},
-{2978617,3876454,3875733,0.28791724137931,0.28791724137931},
-{2978618,3876630,3876454,1000000,0.387495652173913},
-{2978619,3871978,3871324,0.4782,0.498125},
-{2978620,3872687,3871978,0.303365217391304,0.317154545454545},
-{2978621,3873104,3872687,0.340888888888889,0.354},
-{2978622,3872687,3872314,0.305634782608696,0.334742857142857},
-{2978623,3873584,3873352,0.367666666666667,0.381807692307692},
-{2978624,3873352,3872687,0.283523076923077,0.30715},
-{2978625,3874265,3874065,1000000,0.347078571428571},
-{2978626,3873286,3872314,0.3454,0.490831578947369},
-{2978627,3873352,3873286,0.107555555555556,0.107555555555556},
-{2978628,3873878,3873352,0.196924137931034,0.1784625},
-{2978629,3874065,3873878,0.108272727272727,0.09528},
-{2978630,3876822,3876841,0.167733333333333,0.0794526315789474},
-{2978631,3876822,3876919,1000000,0.695625},
-{2978632,3877686,3877793,0.324685714285714,1000000},
-{2978633,3877793,3877615,0.23997,1000000},
-{2978634,3877793,3878114,1000000,0.200541176470588},
-{2978635,3877218,3876454,0.304822222222222,0.265490322580645},
-{2978636,3879076,3878492,1000000,0.456190909090909},
-{2978637,3878492,3878730,0.263810526315789,0.227836363636364},
-{2978638,3879397,3878730,0.316933333333333,0.316933333333333},
-{2978639,3878730,3878875,0.58419,0.486825},
-{2978640,3852836,3852976,2.18416666666667,2.18416666666667},
-{2978641,3858107,3857747,0.267313043478261,0.219578571428571},
-{2978642,3858232,3857747,1000000,0.354033333333333},
-{2978643,3858969,3858232,0.490577777777778,0.473057142857143},
-{2978644,3855679,3856031,0.246577777777778,0.246577777777778},
-{2978645,3856618,3856031,0.297469565217391,0.402458823529412},
-{2978646,3860465,3860310,0.086376,0.0744620689655172},
-{2978647,3860310,3860226,0.048375,0.048375},
-{2978648,3860226,3859995,0.272166666666667,0.222681818181818},
-{2978649,3861002,3860310,0.463118181818182,0.463118181818182},
-{2978650,3861511,3861208,0.257084210526316,0.187869230769231},
-{2978651,3861208,3861002,0.157609090909091,0.15075652173913},
-{2978652,3861002,3860597,0.274172727272727,0.251325},
-{2978653,3861813,3861511,0.206688888888889,0.206688888888889},
-{2978654,3861813,3861564,0.429257142857143,0.222577777777778},
-{2978655,3861564,3861201,0.328252173913043,0.37749},
-{2978656,3859877,3859268,0.411933333333333,0.37074},
-{2978657,3860408,3860730,0.12915,0.133316129032258},
-{2978658,3860730,3861136,0.223992857142857,0.223992857142857},
-{2978659,3861935,3861813,0.333253846153846,0.361025},
-{2978660,3862069,3861813,0.193536,0.193536},
-{2978661,3862481,3862069,0.4318875,0.4318875},
-{2978662,3862069,3861770,0.32106,0.256848},
-{2978663,3860579,3859877,1000000,0.358135714285714},
-{2978664,3858303,3858131,0.113008695652174,0.123771428571429},
-{2978665,3858303,3859268,0.598036363636364,0.626514285714286},
-{2978666,3858361,3858303,0.0394,0.0454615384615385},
-{2978667,3859877,3858683,0.805114285714286,0.805114285714286},
-{2978668,3862960,3862723,0.1254,0.1254},
-{2978669,3863038,3862319,0.362328,0.335488888888889},
-{2978670,3863198,3863038,0.0960521739130435,0.0960521739130435},
-{2978671,3863699,3863198,0.255,0.255},
-{2978672,3865311,3865689,0.262955555555556,0.262955555555556},
-{2978673,3865689,3865226,0.3157875,0.3157875},
-{2978674,3865907,3865689,0.0953454545454545,0.0953454545454545},
-{2978675,3866118,3865907,0.109542857142857,0.104563636363636},
-{2978676,3866517,3866118,0.156730434782609,0.1502},
-{2978677,3866733,3866517,0.088875,0.0820384615384615},
-{2978678,3865181,3865714,0.280457142857143,0.346447058823529},
-{2978679,3865907,3865714,0.473823529411765,0.423947368421053},
-{2978680,3865714,3865605,0.280961538461538,0.811666666666667},
-{2978681,3865714,3865855,0.0567461538461538,0.0776526315789474},
-{2978682,3865855,3866463,0.235107692307692,0.277854545454545},
-{2978683,3865855,3865605,0.263666666666667,0.263666666666667},
-{2978684,3865014,3865468,0.250658823529412,0.250658823529412},
-{2978685,3865605,3865468,0.1621125,0.12969},
-{2978686,3865605,3866394,0.296622222222222,0.296622222222222},
-{2978687,3866439,3866118,0.2837,0.486342857142857},
-{2978688,3866439,3866463,0.267947368421053,0.212125},
-{2978689,3866463,3866394,0.25122,0.279133333333333},
-{2978690,3866439,3867004,0.199888888888889,0.199888888888889},
-{2978691,3866517,3867119,0.241622222222222,0.241622222222222},
-{2978692,3867119,3867223,0.157066666666667,0.157066666666667},
-{2978693,3867119,3867004,1000000,1000000},
-{2978694,3867296,3867004,0.112466666666667,0.112466666666667},
-{2978695,3865468,3866303,0.3475,0.417},
-{2978696,3866394,3866303,0.1695,0.1582},
-{2978697,3867523,3867223,0.130904347826087,0.103820689655172},
-{2978698,3867684,3867523,0.075525,0.0697153846153846},
-{2978699,3867508,3867684,0.352264285714286,0.379361538461538},
-{2978700,3867508,3867296,0.21717,0.28956},
-{2978701,3867296,3867086,0.468,0.468},
-{2978702,3866962,3867086,0.0538,0.0561391304347826},
-{2978703,3867722,3867508,0.155052631578947,0.1473},
-{2978704,3867086,3867335,0.128147368421053,0.128147368421053},
-{2978705,3868196,3867684,0.217390909090909,0.183946153846154},
-{2978706,3866394,3866833,0.153888888888889,0.153888888888889},
-{2978707,3866833,3866962,0.154,0.154},
-{2978708,3867004,3866833,0.369511111111111,0.369511111111111},
-{2978709,3868447,3868196,0.10905,0.100661538461538},
-{2978710,3868677,3868447,0.11097,0.105685714285714},
-{2978711,3869029,3868677,0.129715384615385,0.134904},
-{2978712,3869379,3869029,0.158018181818182,0.158018181818182},
-{2978713,3869636,3869379,0.101754545454545,0.1599},
-{2978714,3867622,3867523,0.465092307692308,0.431871428571429},
-{2978715,3868342,3868447,0.459626086956522,0.406592307692308},
-{2978716,3868902,3869029,0.409025,0.426808695652174},
-{2978717,3868156,3868196,0.4011,0.431953846153846},
-{2978718,3868653,3868677,0.521342857142857,0.437928},
-{2978719,3871324,3871373,0.293035714285714,0.2735},
-{2978720,3871373,3871181,0.603575,0.536511111111111},
-{2978721,3870360,3869762,0.485288888888889,0.485288888888889},
-{2978722,3871589,3871972,0.125244444444444,0.125244444444444},
-{2978723,3871972,3871816,1000000,0.23217},
-{2978724,3871972,3872311,0.133825,1000000},
-{2978725,3872314,3872311,0.269178947368421,1000000},
-{2978726,3872311,3873149,0.608492307692308,1000000},
-{2978727,3873286,3873218,0.0852387096774193,1000000},
-{2978728,3873218,3873149,0.10085625,0.10085625},
-{2978729,3873149,3872986,0.278192307692308,0.278192307692308},
-{2978730,3873878,3873218,0.331422222222222,1000000},
-{2978731,3874065,3873948,1000000,0.229315384615385},
-{2978732,3874477,3874065,0.280226086956522,0.280226086956522},
-{2978733,3874477,3874418,0.158269565217391,0.202233333333333},
-{2978734,3874418,3873948,0.2448,0.28152},
-{2978735,3874667,3874418,0.13008,0.17344},
-{2978736,3873948,3873754,1000000,0.446345454545455},
-{2978737,3875436,3875204,0.618,1000000},
-{2978738,3872200,3871805,0.73866,0.73866},
-{2978739,3872986,3872572,0.63192,1000000},
-{2978740,3875204,3875006,0.342744,1000000},
-{2978741,3874337,3875006,0.26092,0.372742857142857},
-{2978742,3875006,3875679,0.3337,0.296622222222222},
-{2978743,3875862,3875679,1000000,0.3667},
-{2978744,3871805,3871181,1000000,0.277685714285714},
-{2978745,3873370,3872572,1000000,0.341925},
-{2978746,3873754,3873370,1000000,0.764018181818182},
-{2978747,3874228,3874923,0.3284,0.342678260869565},
-{2978748,3875006,3874923,0.18625,1000000},
-{2978749,3875679,3875599,1000000,0.168104347826087},
-{2978750,3874923,3874840,0.187824,1000000},
-{2978751,3874120,3874840,0.331725,0.361881818181818},
-{2978752,3874840,3875475,0.303784615384615,0.292533333333333},
-{2978753,3871181,3871120,1000000,0.103512},
-{2978754,3871120,3871004,1000000,0.313254545454545},
-{2978755,3871869,3871120,1000000,1000000},
-{2978756,3871918,3871869,1000000,1000000},
-{2978757,3871869,3871659,1000000,1000000},
-{2978758,3871659,3871004,0.3361,1000000},
-{2978759,3872348,3871659,0.279573913043478,1000000},
-{2978760,3873169,3872348,0.40659,1000000},
-{2978761,3872547,3871869,0.234911111111111,0.234911111111111},
-{2978762,3872572,3872547,0.0666631578947368,0.0575727272727273},
-{2978763,3872547,3872427,0.206372727272727,0.206372727272727},
-{2978764,3872427,3872348,0.133371428571429,0.112032},
-{2978765,3873370,3873169,1000000,0.286114285714286},
-{2978766,3870402,3870368,0.210911111111111,0.210911111111111},
-{2978767,3870368,3870327,0.0888666666666667,0.114257142857143},
-{2978768,3873087,3870368,0.958977777777778,0.958977777777778},
-{2978769,3873169,3873087,1000000,0.180457142857143},
-{2978770,3873087,3873001,0.39654,0.165225},
-{2978771,3873602,3873169,0.164121428571429,1000000},
-{2978772,3873923,3873602,0.151425,1000000},
-{2978773,3873602,3873087,0.4344,0.4344},
-{2978774,3878375,3880278,0.853711111111111,0.853711111111111},
-{2978775,3880241,3880405,1000000,1000000},
-{2978776,3880405,3882602,1000000,1000000},
-{2978777,3878346,3879499,0.4936,0.4936},
-{2978778,3882602,3880440,1000000,1000000},
-{2978779,3857718,3858361,0.77772,0.77772},
-{2978780,3854970,3856892,0.839236363636364,0.839236363636364},
-{2978781,3855431,3854970,0.225763636363636,0.225763636363636},
-{2978782,3858996,3858683,0.21295,0.222208695652174},
-{2978783,3860128,3860434,0.178333333333333,0.178333333333333},
-{2978784,3859809,3859177,0.529073684210526,0.529073684210526},
-{2978785,3859565,3858717,0.461333333333333,0.461333333333333},
-{2978786,3860234,3860032,0.272033333333333,0.3060375},
-{2978787,3860032,3859809,0.160655172413793,0.150290322580645},
-{2978788,3859809,3859565,0.186553846153846,0.186553846153846},
-{2978789,3860758,3860373,0.320139130434783,0.334690909090909},
-{2978790,3860373,3860078,0.2438,0.263304},
-{2978791,3860961,3860078,0.5093,0.81488},
-{2978792,3861339,3860373,0.504044444444444,0.504044444444444},
-{2978793,3861552,3861339,0.292036363636364,1000000},
-{2978794,3861331,3861339,1000000,0.0835363636363636},
-{2978795,3860961,3861331,0.272942857142857,0.272942857142857},
-{2978796,3861469,3861743,0.4422,1000000},
-{2978797,3861469,3861331,1000000,0.147954545454545},
-{2978798,3861886,3862255,1000000,0.2301},
-{2978799,3861701,3861733,0.777763636363636,1000000},
-{2978800,3862293,3862255,0.276535714285714,1000000},
-{2978801,3862322,3862293,0.135417391304348,1000000},
-{2978802,3861941,3862293,1000000,1000000},
-{2978803,3862255,3863042,0.733311111111111,0.733311111111111},
-{2978804,3862198,3862257,0.345511111111111,0.345511111111111},
-{2978805,3862545,3862244,0.224288888888889,0.224288888888889},
-{2978806,3862797,3862244,0.288977777777778,0.288977777777778},
-{2978807,3862797,3862738,0.0766666666666667,0.0766666666666667},
-{2978808,3862940,3862797,0.0730222222222222,0.0730222222222222},
-{2978809,3863221,3863097,0.0881684210526316,0.0698},
-{2978810,3863488,3863221,0.186678260869565,0.1789},
-{2978811,3863299,3860961,2.15565,2.15565},
-{2978812,3867675,3866223,0.531111111111111,1000000},
-{2978813,3867675,3868155,1000000,0.200536363636364},
-{2978814,3868155,3868592,1000000,0.200536363636364},
-{2978815,3868592,3869056,1000000,0.2226},
-{2978816,3869056,3869604,1000000,0.274136842105263},
-{2978817,3867675,3867555,0.285466666666667,0.285466666666667},
-{2978818,3868155,3868018,0.283755555555556,0.283755555555556},
-{2978819,3868592,3868467,0.284266666666667,0.284266666666667},
-{2978820,3869056,3868924,0.291933333333333,0.291933333333333},
-{2978821,3867188,3867446,0.399177777777778,0.399177777777778},
-{2978822,3867715,3867813,0.184866666666667,0.184866666666667},
-{2978823,3867167,3867473,0.23268,0.202330434782609},
-{2978824,3867473,3868038,0.312042857142857,0.336046153846154},
-{2978825,3867473,3867145,0.488066666666667,0.516776470588235},
-{2978826,3867145,3866147,0.325427586206897,0.31458},
-{2978827,3868151,3867473,0.357971428571429,0.357971428571429},
-{2978828,3868617,3868151,0.219457142857143,0.23043},
-{2978829,3869060,3868617,0.191263636363636,0.168312},
-{2978830,3869574,3869060,0.249126315789474,0.278435294117647},
-{2978831,3868195,3868151,0.272788235294118,0.244073684210526},
-{2978832,3868151,3868038,0.45537,0.337311111111111},
-{2978833,3868008,3867145,0.295551724137931,0.329653846153846},
-{2978834,3868038,3868008,0.107645454545455,0.102965217391304},
-{2978835,3868617,3868596,0.0947333333333333,0.0947333333333333},
-{2978836,3869063,3869060,0.0963555555555556,0.0963555555555556},
-{2978837,3868596,3869063,0.164311111111111,0.164311111111111},
-{2978838,3868596,3868566,0.1746,0.1746},
-{2978839,3869063,3869048,0.181666666666667,0.181666666666667},
-{2978840,3868566,3868235,0.306915789473684,0.323966666666667},
-{2978841,3869048,3868566,0.245336842105263,0.245336842105263},
-{2978842,3869540,3869048,0.244736842105263,0.31},
-{2978843,3868008,3868235,0.0887739130434783,0.0928090909090909},
-{2978844,3868235,3868460,0.0792620689655173,0.0884076923076923},
-{2978845,3869576,3868460,0.4406,0.391644444444444},
-{2978846,3869677,3870992,0.558709090909091,0.682866666666667},
-{2978847,3870992,3872020,0.45906,0.399182608695652},
-{2978848,3872073,3872944,0.40209,0.382942857142857},
-{2978849,3872944,3873494,0.341233333333333,0.279190909090909},
-{2978850,3870992,3871109,0.4018,0.4018},
-{2978851,3872944,3872776,0.33435,0.351947368421053},
-{2978852,3872776,3872622,0.287433333333333,0.246371428571429},
-{2978853,3872776,3871883,1000000,1000000},
-{2978854,3873336,3872776,0.30354,0.30354},
-{2978855,3873494,3873336,0.365494736842105,0.330685714285714},
-{2978856,3873336,3873233,0.23799,0.264433333333333},
-{2978857,3871109,3871366,0.280444444444444,0.280444444444444},
-{2978858,3870242,3870148,0.279688888888889,0.279688888888889},
-{2978859,3870757,3870642,0.383936842105263,1000000},
-{2978860,3870148,3869628,0.177138461538462,1000000},
-{2978861,3870642,3870148,0.157593103448276,1000000},
-{2978862,3871366,3870642,0.291860869565217,1000000},
-{2978863,3871573,3871366,0.0824571428571429,0.0824571428571429},
-{2978864,3870642,3870578,0.26937,1000000},
-{2978865,3870578,3870525,0.164755555555556,1000000},
-{2978866,3871419,3870578,1000000,0.291866666666667},
-{2978867,3870525,3869576,0.3168,0.328984615384615},
-{2978868,3871301,3870525,0.252496551724138,0.281630769230769},
-{2978869,3869556,3868955,0.327733333333333,0.39328},
-{2978870,3869556,3870460,0.35115652173913,0.367118181818182},
-{2978871,3870525,3870460,0.1998,0.183816},
-{2978872,3872622,3872451,0.26424,0.314571428571429},
-{2978873,3872451,3872320,0.193846153846154,0.21},
-{2978874,3872320,3872204,0.231314285714286,0.285741176470588},
-{2978875,3872204,3871301,0.301422222222222,0.35384347826087},
-{2978876,3872204,3872966,0.260311111111111,0.260311111111111},
-{2978877,3872320,3873064,0.262977777777778,0.262977777777778},
-{2978878,3872451,3873184,0.265533333333333,0.265533333333333},
-{2978879,3873896,3874068,1000000,0.140664},
-{2978880,3874000,3874678,0.357081818181818,0.561128571428572},
-{2978881,3874678,3875321,1000000,1000000},
-{2978882,3874840,3874678,0.343390909090909,1000000},
-{2978883,3874678,3874508,0.29864347826087,1000000},
-{2978884,3875321,3875200,1000000,0.278475},
-{2978885,3874498,3874188,0.651818181818182,0.623478260869565},
-{2978886,3873506,3874188,0.287078571428571,0.334925},
-{2978887,3875185,3874901,0.4908,0.47444},
-{2978888,3874188,3874901,0.313368,0.340617391304348},
-{2978889,3873314,3874025,0.343382608695652,0.358990909090909},
-{2978890,3874025,3874707,0.356072727272727,0.290133333333333},
-{2978891,3873151,3873900,0.321888,0.298044444444445},
-{2978892,3873900,3874577,0.2802,0.217933333333333},
-{2978893,3874025,3873900,0.388129411764706,0.388129411764706},
-{2978894,3874901,3874707,0.300077419354839,0.281890909090909},
-{2978895,3874707,3874577,0.230266666666667,0.222042857142857},
-{2978896,3874707,3875581,0.386888888888889,0.386888888888889},
-{2978897,3856892,3856551,0.297618181818182,0.297618181818182},
-{2978898,3856892,3858718,0.90614,0.84950625},
-{2978899,3858718,3859193,0.3149625,0.3149625},
-{2978900,3859193,3859828,0.327418181818182,0.327418181818182},
-{2978901,3861601,3859828,0.890981818181818,0.890981818181818},
-{2978902,3859193,3859091,0.128690909090909,0.128690909090909},
-{2978903,3865530,3864968,0.269028571428571,0.201771428571429},
-{2978904,3866380,3865530,0.365608695652174,0.323423076923077},
-{2978905,3865429,3865530,0.247166666666667,0.247166666666667},
-{2978906,3865530,3866288,0.353466666666667,0.353466666666667},
-{2978907,3865603,3865826,0.177155555555556,0.177155555555556},
-{2978908,3866322,3865603,0.2616,0.2616},
-{2978909,3866263,3865826,0.164466666666667,0.164466666666667},
-{2978910,3864739,3864228,0.229444444444444,0.229444444444444},
-{2978911,3864236,3864335,0.164111111111111,0.164111111111111},
-{2978912,3868008,3867933,0.2466,0.305784},
-{2978913,3868460,3868410,0.0927,0.132428571428571},
-{2978914,3868206,3868410,0.0791333333333333,0.0791333333333333},
-{2978915,3868206,3868150,0.206377777777778,0.206377777777778},
-{2978916,3867933,3868150,0.09516,0.105733333333333},
-{2978917,3868150,3868409,0.13473,0.112275},
-{2978918,3868410,3868657,0.20811,0.20811},
-{2978919,3868657,3868409,0.154885714285714,1000000},
-{2978920,3868955,3868657,0.178547368421053,1000000},
-{2978921,3868409,3868539,0.0760857142857143,1000000},
-{2978922,3868539,3868798,0.142885714285714,1000000},
-{2978923,3868798,3868955,0.106,1000000},
-{2978924,3868798,3869537,0.529866666666667,0.529866666666667},
-{2978925,3868539,3868861,0.225222222222222,0.225222222222222},
-{2978926,3867874,3866314,0.75684,0.75684},
-{2978927,3868425,3867874,1000000,0.197177777777778},
-{2978928,3869291,3869088,1000000,1000000},
-{2978929,3867754,3866644,0.454176,0.493669565217391},
-{2978930,3868425,3868396,0.24465,0.24465},
-{2978931,3868396,3868405,0.171992307692308,0.2794875},
-{2978932,3869036,3868396,0.224511111111111,0.224511111111111},
-{2978933,3869088,3869036,0.1268,0.1268},
-{2978934,3869036,3869076,0.136844444444444,0.136844444444444},
-{2978935,3868405,3867754,0.282872727272727,0.296342857142857},
-{2978936,3868946,3868405,0.185222222222222,0.192346153846154},
-{2978937,3869076,3868946,0.0593739130434783,0.0525230769230769},
-{2978938,3869278,3869076,0.10161,0.0883565217391304},
-{2978939,3869514,3869278,0.1154,0.159784615384615},
-{2978940,3867754,3867662,0.65235,0.497028571428571},
-{2978941,3868946,3868948,0.12576,0.147952941176471},
-{2978942,3869009,3869005,0.21616,0.180133333333333},
-{2978943,3868948,3867936,0.48537,0.64716},
-{2978944,3869009,3867936,1.57933333333333,1.57933333333333},
-{2978945,3868948,3869009,0.421305882352941,0.3979},
-{2978946,3867645,3867662,0.0358363636363636,0.03285},
-{2978947,3869005,3867662,0.374735294117647,0.455035714285714},
-{2978948,3869250,3869005,0.0927461538461538,0.114828571428571},
-{2978949,3869473,3869250,0.106171428571429,0.14864},
-{2978950,3870070,3869529,0.181176923076923,0.2617},
-{2978951,3870070,3870031,0.79692,1000000},
-{2978952,3870749,3870070,0.181129411764706,0.181129411764706},
-{2978953,3871139,3872049,0.621369230769231,0.621369230769231},
-{2978954,3871021,3871901,0.40362,0.33635},
-{2978955,3872204,3872049,0.238733333333333,0.257832},
-{2978956,3872049,3871966,0.125295652173913,0.130990909090909},
-{2978957,3871966,3871901,0.113435294117647,0.0876545454545455},
-{2978958,3871901,3871839,0.1896,0.11376},
-{2978959,3871755,3871658,0.17652,0.22065},
-{2978960,3871658,3871312,0.408367741935484,0.506376},
-{2978961,3871966,3872511,0.236288888888889,0.236288888888889},
-{2978962,3872633,3871755,0.493941176470588,0.493941176470588},
-{2978963,3871658,3870749,0.245523529411765,0.287855172413793},
-{2978964,3872550,3871658,0.264483870967742,0.32796},
-{2978965,3870460,3870345,0.384991304347826,0.327955555555556},
-{2978966,3878656,3878246,0.435044444444444,0.435044444444444},
-{2978967,3871312,3870979,0.428565517241379,0.478015384615385},
-{2978968,3870979,3870147,1000000,0.295066666666667},
-{2978969,3872328,3873176,0.323496,1000000},
-{2978970,3873176,3873915,0.290733333333333,1000000},
-{2978971,3873176,3873022,0.425858823529412,0.425858823529412},
-{2978972,3873022,3872937,0.145733333333333,0.145733333333333},
-{2978973,3873765,3873022,0.31236,0.31236},
-{2978974,3873915,3873765,0.337017391304348,0.337017391304348},
-{2978975,3873765,3873655,0.165444444444444,0.165444444444444},
-{2978976,3861924,3861034,0.5204,0.5204},
-{2978977,3862098,3861765,0.2244,0.2244},
-{2978978,3862098,3862464,0.464177777777778,0.464177777777778},
-{2978979,3862007,3862098,0.241366666666667,0.241366666666667},
-{2978980,3861942,3862007,0.116366666666667,0.116366666666667},
-{2978981,3862951,3863098,0.287355555555556,0.287355555555556},
-{2978982,3864128,3863653,0.27831,0.27831},
-{2978983,3863224,3863653,0.740686956521739,0.740686956521739},
-{2978984,3864069,3863737,0.217305882352941,0.175914285714286},
-{2978985,3864069,3864456,0.520875,0.520875},
-{2978986,3864521,3864069,0.302188235294118,0.233509090909091},
-{2978987,3865911,3864862,0.514472727272727,0.514472727272727},
-{2978988,3863861,3864069,0.253342857142857,0.253342857142857},
-{2978989,3863861,3863599,0.153654545454545,0.14085},
-{2978990,3864408,3863861,0.257304,0.238244444444444},
-{2978991,3863521,3863861,0.389622222222222,0.389622222222222},
-{2978992,3864862,3864745,0.148010526315789,0.133914285714286},
-{2978993,3864745,3864521,0.184285714285714,0.16125},
-{2978994,3864275,3864861,0.474063157894737,0.474063157894737},
-{2978995,3862337,3862746,0.477955555555556,0.477955555555556},
-{2978996,3862618,3863047,0.498866666666667,0.498866666666667},
-{2978997,3862736,3863190,0.516511111111111,0.516511111111111},
-{2978998,3862337,3862098,0.113815384615385,0.1233},
-{2978999,3862618,3862337,0.136272,0.11356},
-{2979000,3862736,3862618,0.0851739130434783,0.0851739130434783},
-{2979001,3862861,3862736,0.113766666666667,0.13652},
-{2979002,3863521,3863130,0.55788,0.55788},
-{2979003,3862753,3862007,0.339266666666667,0.339266666666667},
-{2979004,3863130,3862861,0.166422222222222,0.166422222222222},
-{2979005,3863819,3863993,0.145244444444444,0.145244444444444},
-{2979006,3864315,3864568,0.105556097560976,0.127288235294118},
-{2979007,3866989,3866322,0.2586,0.2586},
-{2979008,3867253,3866989,0.232421052631579,0.232421052631579},
-{2979009,3866989,3867468,0.405,0.405},
-{2979010,3867645,3867468,0.171317647058824,0.19416},
-{2979011,3867468,3867401,0.101511111111111,0.101511111111111},
-{2979012,3866858,3866989,0.235433333333333,0.235433333333333},
-{2979013,3866814,3866237,0.235527272727273,0.235527272727273},
-{2979014,3867307,3866814,0.1422,0.16671724137931},
-{2979015,3867694,3867307,0.156,0.16848},
-{2979016,3868203,3867694,0.154877419354839,0.165558620689655},
-{2979017,3868444,3868203,0.0882827586206897,0.08534},
-{2979018,3866858,3866234,0.218307692307692,0.218307692307692},
-{2979019,3867301,3866814,0.551192307692308,0.551192307692308},
-{2979020,3867551,3867307,0.297351724137931,0.297351724137931},
-{2979021,3867856,3867694,0.213977777777778,0.213977777777778},
-{2979022,3867301,3866874,0.211554545454545,0.211554545454545},
-{2979023,3867660,3867301,0.164533333333333,0.164533333333333},
-{2979024,3867551,3867856,0.133977777777778,0.133977777777778},
-{2979025,3867660,3867551,0.0748,0.0748},
-{2979026,3868032,3867856,0.0997333333333333,0.0997333333333333},
-{2979027,3868327,3868203,0.171977777777778,0.171977777777778},
-{2979028,3868032,3868327,0.130488888888889,0.130488888888889},
-{2979029,3868958,3868327,0.331266666666667,0.331266666666667},
-{2979030,3867800,3867660,0.07196,0.134925},
-{2979031,3868159,3868032,0.0707555555555556,0.0707555555555556},
-{2979032,3867918,3867301,0.550690909090909,0.550690909090909},
-{2979033,3867800,3868159,0.140911111111111,0.140911111111111},
-{2979034,3867800,3868344,0.477333333333333,0.318222222222222},
-{2979035,3868636,3868159,0.279422222222222,0.279422222222222},
-{2979036,3869245,3868958,0.154022222222222,0.159946153846154},
-{2979037,3868958,3868751,0.09358,0.08773125},
-{2979038,3868751,3868636,0.0481928571428571,0.0499777777777778},
-{2979039,3868636,3868344,0.152955555555556,0.13321935483871},
-{2979040,3868344,3867918,0.221328,0.197614285714286},
-{2979041,3869455,3868751,0.3446,0.3446},
-{2979042,3868880,3868344,0.234662068965517,0.22684},
-{2979043,3869911,3869455,1000000,1000000},
-{2979044,3870038,3869911,1000000,1000000},
-{2979045,3867918,3868330,0.230630769230769,0.230630769230769},
-{2979046,3868330,3868438,0.139266666666667,0.139266666666667},
-{2979047,3869357,3868880,0.2102625,0.269136},
-{2979048,3868880,3868330,0.242777777777778,0.242777777777778},
-{2979049,3868438,3867810,0.238688888888889,0.238688888888889},
-{2979050,3869357,3868438,0.382025,0.416754545454545},
-{2979051,3869357,3869471,0.08168,0.0556909090909091},
-{2979052,3869911,3870044,1000000,1000000},
-{2979053,3870547,3870648,0.394466666666667,0.394466666666667},
-{2979054,3873309,3873297,0.212,0.212},
-{2979055,3850176,3850314,0.098,0.098},
-{2979056,3851828,3852455,0.556869230769231,0.658118181818182},
-{2979057,3852455,3852762,0.263854545454545,0.263854545454545},
-{2979058,3852455,3853105,0.202872727272727,0.202872727272727},
-{2979059,3853055,3853105,0.124145454545455,0.124145454545455},
-{2979060,3853105,3853705,0.302545454545455,0.302545454545455},
-{2979061,3850314,3849947,0.183272727272727,0.183272727272727},
-{2979062,3861518,3861145,0.252285714285714,0.240818181818182},
-{2979063,3861692,3860944,0.548557894736842,0.548557894736842},
-{2979064,3861942,3861933,1000000,0.409088888888889},
-{2979065,3862327,3861933,0.334606451612903,0.334606451612903},
-{2979066,3861933,3861518,0.302177777777778,0.291385714285714},
-{2979067,3861933,3862248,1000000,1000000},
-{2979068,3862670,3862248,0.455815384615385,0.59256},
-{2979069,3862248,3861996,0.240675,0.28881},
-{2979070,3861836,3861518,0.120331578947368,0.138563636363636},
-{2979071,3861996,3861836,0.0635351351351351,0.07836},
-{2979072,3862211,3861996,0.102977142857143,0.109218181818182},
-{2979073,3862552,3862211,0.13032972972973,0.13395},
-{2979074,3861836,3861692,0.235088888888889,0.235088888888889},
-{2979075,3861692,3861566,0.341454545454545,0.278222222222222},
-{2979076,3862735,3861692,0.630939130434783,0.630939130434783},
-{2979077,3862644,3862735,0.218836363636364,0.218836363636364},
-{2979078,3863130,3863023,0.176368421052632,0.159571428571429},
-{2979079,3863066,3863023,0.246552,0.267991304347826},
-{2979080,3862211,3863066,0.528155555555556,0.528155555555556},
-{2979081,3863242,3863066,0.142009090909091,0.142009090909091},
-{2979082,3864315,3863897,0.301711111111111,0.301711111111111},
-{2979083,3863897,3863628,1000000,1000000},
-{2979084,3864223,3863897,0.175288888888889,0.175288888888889},
-{2979085,3864568,3864223,0.256044444444444,0.256044444444444},
-{2979086,3865404,3864762,0.305511111111111,0.305511111111111},
-{2979087,3865673,3865051,0.287533333333333,0.287533333333333},
-{2979088,3864474,3864223,0.112711111111111,0.112711111111111},
-{2979089,3864797,3864474,0.191466666666667,0.191466666666667},
-{2979090,3864797,3865051,0.0987789473684211,0.134057142857143},
-{2979091,3865051,3865735,0.307418181818182,0.307418181818182},
-{2979092,3865418,3864474,0.507955555555555,0.507955555555555},
-{2979093,3862552,3863242,0.532,0.532},
-{2979094,3862873,3862552,0.156411428571429,0.156411428571429},
-{2979095,3863543,3863242,0.177666666666667,0.177666666666667},
-{2979096,3863543,3863871,0.229955555555556,0.229955555555556},
-{2979097,3863151,3863543,0.303533333333333,0.303533333333333},
-{2979098,3862873,3863151,0.296034782608696,0.296034782608696},
-{2979099,3863151,3863416,0.152844444444444,0.152844444444444},
-{2979100,3863416,3863543,0.445977777777778,0.445977777777778},
-{2979101,3863416,3863803,0.204822222222222,0.204822222222222},
-{2979102,3865999,3866752,0.309822222222222,0.309822222222222},
-{2979103,3866972,3866752,0.132555555555556,0.132555555555556},
-{2979104,3866371,3866972,0.283622222222222,0.283622222222222},
-{2979105,3866012,3866371,0.162046153846154,0.150471428571429},
-{2979106,3865735,3866012,0.12266,0.12266},
-{2979107,3865634,3865735,0.0505125,0.0734727272727273},
-{2979108,3865418,3865634,0.137454545454545,0.116307692307692},
-{2979109,3864756,3865418,0.382390909090909,0.442768421052632},
-{2979110,3863353,3862873,0.249745945945946,0.318641379310345},
-{2979111,3864109,3864615,0.37236,0.404739130434783},
-{2979112,3863928,3864109,0.191025,0.183384},
-{2979113,3865751,3865634,0.190017391304348,0.190017391304348},
-{2979114,3865216,3864940,0.162757894736842,0.162757894736842},
-{2979115,3865751,3865216,0.252088888888889,0.252088888888889},
-{2979116,3865995,3865751,0.112577777777778,0.112577777777778},
-{2979117,3866309,3866012,0.168133333333333,0.168133333333333},
-{2979118,3866309,3865995,0.141111111111111,0.141111111111111},
-{2979119,3866710,3866309,0.214657142857143,0.214657142857143},
-{2979120,3866872,3866309,0.322044444444444,0.322044444444444},
-{2979121,3867277,3866872,0.2427,0.285529411764706},
-{2979122,3866442,3865995,0.253755555555556,0.253755555555556},
-{2979123,3866872,3866442,0.158888888888889,0.158888888888889},
-{2979124,3866671,3866872,0.178733333333333,0.178733333333333},
-{2979125,3867083,3866671,0.2528,0.2528},
-{2979126,3865837,3865751,0.292177777777778,0.292177777777778},
-{2979127,3865837,3865216,0.268022222222222,0.268022222222222},
-{2979128,3865937,3865837,0.0786260869565217,0.0822},
-{2979129,3865576,3865937,0.168888888888889,0.168888888888889},
-{2979130,3865937,3866199,0.116066666666667,0.116066666666667},
-{2979131,3866442,3866199,0.145422222222222,0.145422222222222},
-{2979132,3866199,3866671,0.1524,0.1524},
-{2979133,3866033,3865937,0.0816947368421053,0.0739142857142857},
-{2979134,3866838,3866033,0.4435,0.4435},
-{2979135,3866207,3866033,0.64845,0.51876},
-{2979136,3864109,3865237,0.521955555555556,0.521955555555556},
-{2979137,3867410,3866872,0.329422222222222,0.329422222222222},
-{2979138,3868438,3868658,0.188537142857143,0.188537142857143},
-{2979139,3868818,3868242,0.265714285714286,0.265714285714286},
-{2979140,3868658,3868818,0.157822222222222,0.157822222222222},
-{2979141,3868818,3869041,0.507035294117647,0.507035294117647},
-{2979142,3869041,3869307,0.335577777777778,0.335577777777778},
-{2979143,3869528,3868658,0.316755555555556,0.316755555555556},
-{2979144,3869600,3868818,0.314725,0.314725},
-{2979145,3869041,3868595,0.164066666666667,0.164066666666667},
-{2979146,3869668,3869041,0.3198,0.3198},
-{2979147,3870256,3869528,0.381282352941176,0.308657142857143},
-{2979148,3870332,3870256,0.1442,0.157309090909091},
-{2979149,3870256,3870216,0.359968421052632,0.359968421052632},
-{2979150,3870830,3870658,0.369857142857143,0.383555555555556},
-{2979151,3869582,3869779,0.0789,0.0826571428571429},
-{2979152,3869779,3869978,0.08799,0.0799909090909091},
-{2979153,3869978,3870216,0.0977454545454546,0.074151724137931},
-{2979154,3870216,3870658,0.20454,0.1461},
-{2979155,3869978,3869889,0.348736363636364,0.426233333333333},
-{2979156,3869889,3869786,0.286377777777778,0.286377777777778},
-{2979157,3870096,3869889,0.164618181818182,0.164618181818182},
-{2979158,3870096,3869992,0.299422222222222,0.299422222222222},
-{2979159,3870561,3870096,0.155511111111111,0.155511111111111},
-{2979160,3870658,3870625,0.189542857142857,0.189542857142857},
-{2979161,3870625,3870603,1000000,0.065895652173913},
-{2979162,3870603,3870561,1000000,0.10419},
-{2979163,3870561,3870416,1000000,0.362488888888889},
-{2979164,3870625,3870810,1000000,0.0630692307692308},
-{2979165,3870603,3870787,0.0603333333333333,0.0603333333333333},
-{2979166,3870810,3870787,0.0532222222222222,0.0532222222222222},
-{2979167,3870787,3870779,0.0788222222222222,0.0788222222222222},
-{2979168,3870779,3870675,0.355555555555556,0.355555555555556},
-{2979169,3871156,3871054,0.357444444444444,0.357444444444444},
-{2979170,3872056,3871931,0.333066666666667,0.333066666666667},
-{2979171,3871931,3871804,1000000,1000000},
-{2979172,3871804,3871689,0.376955555555556,0.376955555555556},
-{2979173,3872248,3872146,1000000,0.45426},
-{2979174,3871931,3872146,1000000,1000000},
-{2979175,3872146,3872112,1000000,0.153703448275862},
-{2979176,3871804,3872034,1000000,1000000},
-{2979177,3872112,3872034,1000000,0.14341935483871},
-{2979178,3872034,3871912,1000000,0.6354375},
-{2979179,3872112,3872480,0.269261538461538,0.269261538461538},
-{2979180,3872480,3872582,0.0585882352941176,0.0664},
-{2979181,3872775,3872631,0.477234782608696,0.439056},
-{2979182,3873207,3873158,0.455325,0.455325},
-{2979183,3872631,3873158,0.191888888888889,0.191888888888889},
-{2979184,3872631,3872582,0.139042105263158,0.120081818181818},
-{2979185,3872582,3872919,0.14376,0.14376},
-{2979186,3872919,3873153,0.1152,0.1152},
-{2979187,3873158,3873153,0.0988444444444444,0.0988444444444444},
-{2979188,3872480,3872329,0.900975,0.900975},
-{2979189,3872919,3872801,0.779233333333333,0.779233333333333},
-{2979190,3870416,3870326,0.461952,0.412457142857143},
-{2979191,3870326,3871011,0.237755555555556,0.237755555555556},
-{2979192,3869857,3870172,0.107928,0.117313043478261},
-{2979193,3869857,3870267,0.519733333333333,0.519733333333333},
-{2979194,3870267,3870172,0.429333333333333,0.429333333333333},
-{2979195,3870326,3870310,0.120978947368421,0.11493},
-{2979196,3870310,3870296,0.06984,0.0455478260869565},
-{2979197,3870172,3870296,0.047025,0.0594},
-{2979198,3870296,3870293,0.0405333333333333,0.0420923076923077},
-{2979199,3870293,3870266,0.177461538461538,0.096125},
-{2979200,3870266,3870941,0.233955555555556,0.233955555555556},
-{2979201,3870310,3870293,0.5446,0.5446},
-{2979202,3871912,3871746,0.4314,0.449375},
-{2979203,3871746,3872436,0.294142857142857,0.30885},
-{2979204,3872436,3872721,0.0746129032258064,0.110142857142857},
-{2979205,3872801,3872721,0.332909090909091,0.422538461538461},
-{2979206,3872721,3872955,0.118642105263158,0.093925},
-{2979207,3873576,3873552,0.497530434782609,0.4768},
-{2979208,3872436,3872384,0.34122,0.359178947368421},
-{2979209,3872913,3872955,0.324657142857143,0.4261125},
-{2979210,3871429,3871038,0.196666666666667,0.131111111111111},
-{2979211,3871429,3871634,0.0649354838709677,0.0774230769230769},
-{2979212,3871634,3872384,0.2512,0.260861538461538},
-{2979213,3872384,3872913,0.160055172413793,0.185664},
-{2979214,3871656,3871634,0.0484444444444444,0.0484444444444444},
-{2979215,3873153,3873271,0.0473555555555556,0.0473555555555556},
-{2979216,3873271,3873607,0.127244444444444,0.127244444444444},
-{2979217,3873271,3873190,0.514777777777778,0.514777777777778},
-{2979218,3885991,3886317,0.119172413793103,1000000},
-{2979219,3886005,3886317,0.135036363636364,1000000},
-{2979220,3861011,3859859,1.72033846153846,1.06497142857143},
-{2979221,3862720,3861492,0.513154838709677,0.513154838709677},
-{2979222,3862828,3862720,0.278918181818182,0.322957894736842},
-{2979223,3862300,3861318,0.534666666666667,0.534666666666667},
-{2979224,3862300,3862112,0.425266666666667,0.425266666666667},
-{2979225,3862204,3861430,0.7184,0.7184},
-{2979226,3861492,3861357,0.174288888888889,0.174288888888889},
-{2979227,3863665,3863928,0.301539130434783,0.256866666666667},
-{2979228,3866036,3863928,1.7666,1.7666},
-{2979229,3866036,3866367,0.29079,0.29079},
-{2979230,3865759,3866036,0.255628571428571,0.255628571428571},
-{2979231,3865641,3865759,0.0788222222222222,0.0788222222222222},
-{2979232,3866775,3866036,0.299733333333333,0.299733333333333},
-{2979233,3863557,3863262,0.33265,0.33265},
-{2979234,3864151,3863821,0.6074,0.6074},
-{2979235,3863262,3862720,0.322272,0.322272},
-{2979236,3863821,3863262,0.309807692307692,0.309807692307692},
-{2979237,3864139,3863821,0.18366,0.18366},
-{2979238,3865612,3864139,0.665822222222222,0.665822222222222},
-{2979239,3865914,3865612,0.41448,0.41448},
-{2979240,3865612,3865492,0.185711111111111,0.185711111111111},
-{2979241,3863542,3862934,0.312511111111111,0.312511111111111},
-{2979242,3863754,3863542,0.106466666666667,0.106466666666667},
-{2979243,3863918,3863754,0.138046153846154,0.138046153846154},
-{2979244,3863821,3863542,0.283844444444444,0.283844444444444},
-{2979245,3863754,3863627,0.314955555555556,0.314955555555556},
-{2979246,3863627,3863937,0.137733333333333,0.137733333333333},
-{2979247,3865857,3865612,0.0961111111111111,0.0961111111111111},
-{2979248,3865857,3865548,0.242155555555556,0.242155555555556},
-{2979249,3866137,3865857,0.224133333333333,0.224133333333333},
-{2979250,3868109,3866285,0.763533333333333,0.763533333333333},
-{2979251,3868313,3866602,0.740222222222222,0.740222222222222},
-{2979252,3866983,3867557,0.265133333333333,0.265133333333333},
-{2979253,3867557,3868134,0.248844444444444,0.248844444444444},
-{2979254,3867713,3867557,0.1094,0.1094},
-{2979255,3868297,3867713,0.236111111111111,0.236111111111111},
-{2979256,3868297,3868134,0.113444444444444,0.113444444444444},
-{2979257,3868741,3868297,0.186755555555556,0.186755555555556},
-{2979258,3869012,3867595,0.599422222222222,0.599422222222222},
-{2979259,3868074,3868827,0.312577777777778,0.312577777777778},
-{2979260,3868827,3869325,0.272791304347826,0.241315384615385},
-{2979261,3868827,3869497,0.5412,0.5412},
-{2979262,3872141,3871656,0.316977777777778,0.316977777777778},
-{2979263,3868056,3867628,0.308,0.308},
-{2979264,3869321,3868298,1000000,1000000},
-{2979265,3882075,3882641,0.36318,0.36318},
-{2979266,3882641,3882903,0.16479,0.16479},
-{2979267,3884580,3885174,0.1879875,0.146721951219512},
-{2979268,3885174,3885462,0.126576923076923,0.0997272727272727},
-{2979269,3882987,3882641,0.40665,0.40665},
-{2979270,3882987,3882289,0.39381,0.39381},
-{2979271,3883208,3882987,0.11277,0.11277},
-{2979272,3883605,3884066,0.24543,0.24543},
-{2979273,3884028,3884066,0.388377777777778,0.388377777777778},
-{2979274,3885143,3884628,0.26421,0.26421},
-{2979275,3883107,3882903,0.152688888888889,0.152688888888889},
-{2979276,3887762,3887788,0.0400888888888889,0.0400888888888889},
-{2979277,3887788,3887828,0.21987,0.21987},
-{2979278,3861592,3860922,0.451272,0.451272},
-{2979279,3861617,3861592,0.060312,0.0558444444444444},
-{2979280,3861781,3861592,0.118009090909091,0.136642105263158},
-{2979281,3861781,3861614,0.282422222222222,0.282422222222222},
-{2979282,3862207,3862204,0.199725,0.152171428571429},
-{2979283,3860324,3859430,0.409468965517241,0.424092857142857},
-{2979284,3861212,3861617,0.552714285714286,0.552714285714286},
-{2979285,3862730,3861781,0.546485714285714,0.7172625},
-{2979286,3864314,3861617,1.485216,1.3752},
-{2979287,3863354,3862730,0.445642105263158,0.6048},
-{2979288,3863354,3862974,0.731,0.731},
-{2979289,3863969,3863354,0.387694736842105,0.433305882352941},
-{2979290,3864540,3865410,0.418963636363636,0.418963636363636},
-{2979291,3864541,3864101,0.195333333333333,0.195333333333333},
-{2979292,3863914,3864188,0.154955555555556,0.154955555555556},
-{2979293,3866355,3866014,0.135977777777778,0.135977777777778},
-{2979294,3866744,3866355,0.21168,0.249035294117647},
-{2979295,3866885,3866509,0.133269230769231,0.182368421052632},
-{2979296,3866885,3866707,0.131133333333333,0.131133333333333},
-{2979297,3866707,3866304,0.178009090909091,0.19581},
-{2979298,3866980,3866707,0.1663,0.173530434782609},
-{2979299,3866370,3866304,0.297022222222222,0.297022222222222},
-{2979300,3866370,3866582,0.133333333333333,0.133333333333333},
-{2979301,3866740,3866370,0.145088888888889,0.145088888888889},
-{2979302,3866642,3866740,0.222755555555556,0.222755555555556},
-{2979303,3866740,3866846,0.109644444444444,0.109644444444444},
-{2979304,3866980,3866846,0.0944666666666667,0.0944666666666667},
-{2979305,3867317,3866980,0.169153846153846,0.18325},
-{2979306,3866846,3867317,0.205244444444444,0.205244444444444},
-{2979307,3867317,3867759,0.234111111111111,0.234111111111111},
-{2979308,3867516,3867317,0.147222222222222,0.19875},
-{2979309,3867143,3867516,0.284815384615385,0.3366},
-{2979310,3867516,3867759,0.104088888888889,0.104088888888889},
-{2979311,3867678,3866885,0.302690322580645,0.375336},
-{2979312,3868152,3867678,0.219268965517241,0.21196},
-{2979313,3867759,3868152,1000000,1000000},
-{2979314,3868516,3868152,0.190071428571429,0.231391304347826},
-{2979315,3867656,3868784,0.470933333333333,0.470933333333333},
-{2979316,3870201,3869321,1000000,1000000},
-{2979317,3867628,3867150,0.208533333333333,0.208533333333333},
-{2979318,3869159,3868764,0.42033,0.42033},
-{2979319,3869739,3869159,0.3165,0.3165},
-{2979320,3869374,3869248,0.117644444444444,0.117644444444444},
-{2979321,3869326,3869374,0.167311111111111,0.167311111111111},
-{2979322,3869479,3869326,0.247155555555556,0.247155555555556},
-{2979323,3870055,3869374,0.279133333333333,0.279133333333333},
-{2979324,3870386,3870490,0.35943,0.35943},
-{2979325,3869980,3870237,0.243511111111111,0.243511111111111},
-{2979326,3870313,3870237,0.0281777777777778,0.0281777777777778},
-{2979327,3870248,3870313,0.195244444444444,0.195244444444444},
-{2979328,3870237,3869479,0.356355555555556,0.356355555555556},
-{2979329,3870313,3870605,0.0982222222222222,0.0982222222222222},
-{2979330,3870597,3870605,0.189646153846154,0.182622222222222},
-{2979331,3871880,3872269,0.151069565217391,0.165457142857143},
-{2979332,3873858,3873874,0.0947555555555556,0.0882206896551724},
-{2979333,3879696,3878822,1000000,1000000},
-{2979334,3880181,3879717,0.240777777777778,0.240777777777778},
-{2979335,3879700,3879716,0.101577777777778,0.101577777777778},
-{2979336,3879696,3879700,0.0674666666666667,0.0674666666666667},
-{2979337,3879696,3879717,0.153711111111111,0.153711111111111},
-{2979338,3880226,3880289,0.4752375,0.4752375},
-{2979339,3880226,3880213,0.1084,0.1084},
-{2979340,3880181,3880213,0.3018,0.3018},
-{2979341,3880163,3880181,0.1341375,0.165092307692308},
-{2979342,3880144,3880163,0.14535,0.184990909090909},
-{2979343,3880642,3880181,0.218044444444444,0.218044444444444},
-{2979344,3880610,3880289,0.2650875,0.21207},
-{2979345,3880610,3880712,1000000,1000000},
-{2979346,3880687,3880712,1000000,1000000},
-{2979347,3880687,3880642,1000000,1000000},
-{2979348,3880576,3880642,0.6961,0.6961},
-{2979349,3880984,3880610,0.203685714285714,0.194427272727273},
-{2979350,3881478,3880642,0.357511111111111,0.357511111111111},
-{2979351,3881737,3880984,0.487729411764706,0.41457},
-{2979352,3881588,3881737,0.389057142857143,0.40851},
-{2979353,3881588,3881512,0.276138461538461,0.276138461538461},
-{2979354,3882136,3882134,0.59528,0.59528},
-{2979355,3881463,3880338,1000000,1000000},
-{2979356,3882731,3882817,1000000,1000000},
-{2979357,3882134,3882114,1.07383636363636,1.07383636363636},
-{2979358,3881512,3881478,0.140725,0.14684347826087},
-{2979359,3883605,3883642,0.404733333333333,0.404733333333333},
-{2979360,3884066,3884128,1000000,0.429777777777778},
-{2979361,3884687,3884628,0.75612,0.75612},
-{2979362,3884715,3884687,0.197188235294118,0.197188235294118},
-{2979363,3887571,3888042,0.259914285714286,0.237313043478261},
-{2979364,3885015,3885020,0.0905714285714286,0.1585},
-{2979365,3887571,3889116,0.74877,0.74877},
-{2979366,3889116,3889095,0.35996,0.3374625},
-{2979367,3884680,3885085,0.151288888888889,0.151288888888889},
-{2979368,3885862,3885789,0.595177777777778,0.595177777777778},
-{2979369,3885535,3886315,0.2978,0.2978},
-{2979370,3889116,3890497,0.78933,0.78933},
-{2979371,3890497,3890481,1000000,1000000},
-{2979372,3890497,3890847,0.148022222222222,0.148022222222222},
-{2979373,3893806,3894088,0.189371428571429,0.152953846153846},
-{2979374,3894088,3894120,0.44505,0.547753846153846},
-{2979375,3894088,3894564,1000000,0.263256},
-{2979376,3893941,3893806,1000000,0.263234482758621},
-{2979377,3894088,3894240,0.386494736842105,0.349685714285714},
-{2979378,3894826,3895423,0.233451428571429,0.2476},
-{2979379,3894131,3894252,1000000,1000000},
-{2979380,3894430,3894261,0.141,0.1498125},
-{2979381,3895744,3895637,0.0918818181818182,0.0918818181818182},
-{2979382,3895637,3895464,0.158311111111111,0.158311111111111},
-{2979383,3895637,3896112,0.287911111111111,0.287911111111111},
-{2979384,3895874,3896112,0.197863636363636,0.229105263157895},
-{2979385,3896112,3896226,0.1295625,0.109105263157895},
-{2979386,3895882,3896614,0.638739130434782,0.58764},
-{2979387,3896614,3897327,0.680714285714286,0.71475},
-{2979388,3897327,3897913,0.36125625,0.502617391304348},
-{2979389,3897913,3898460,0.274961538461538,0.297875},
-{2979390,3896614,3897066,0.421866666666667,0.33015652173913},
-{2979391,3896260,3896844,1000000,0.882327272727273},
-{2979392,3896990,3897059,1000000,0.053325},
-{2979393,3897059,3897199,1000000,0.0998444444444444},
-{2979394,3897199,3897550,1000000,0.324518181818182},
-{2979395,3897066,3897550,0.31575,0.344454545454545},
-{2979396,3897059,3897532,1000000,0.344971428571429},
-{2979397,3897199,3897659,0.344885714285714,1000000},
-{2979398,3897532,3897848,1000000,1000000},
-{2979399,3897550,3898065,1000000,0.338018181818182},
-{2979400,3897576,3897700,1000000,1000000},
-{2979401,3898966,3899288,0.285175,1000000},
-{2979402,3898065,3898187,0.0719714285714286,0.0839666666666667},
-{2979403,3898187,3898397,0.171176470588235,0.161666666666667},
-{2979404,3898397,3898549,0.0784571428571429,0.06865},
-{2979405,3898706,3899188,0.248622222222222,0.248622222222222},
-{2979406,3898853,3899188,0.3672375,0.267081818181818},
-{2979407,3898187,3898597,0.317008695652174,0.317008695652174},
-{2979408,3898597,3898706,0.0820285714285714,0.0820285714285714},
-{2979409,3898549,3898597,0.3882,0.3882},
-{2979410,3899288,3899528,0.131590909090909,0.131590909090909},
-{2979411,3899528,3899778,0.24879,0.24879},
-{2979412,3899188,3899262,0.0590608695652174,0.0522461538461538},
-{2979413,3899262,3899778,0.274,0.274},
-{2979414,3899528,3899812,0.161232,0.16795},
-{2979415,3899812,3899982,0.142452631578947,0.13533},
-{2979416,3899812,3900120,0.197666666666667,0.197666666666667},
-{2979417,3899808,3900120,0.159333333333333,0.159333333333333},
-{2979418,3899262,3899485,0.207266666666667,0.15545},
-{2979419,3897550,3898349,0.90135,0.554676923076923},
-{2979420,3897700,3898457,1000000,0.4858},
-{2979421,3900071,3901021,0.479888888888889,0.46275},
-{2979422,3900312,3901244,0.40918125,0.503607692307692},
-{2979423,3898349,3898790,0.374563636363636,0.433705263157895},
-{2979424,3899153,3899562,0.352095652173913,0.352095652173913},
-{2979425,3898790,3899312,0.470325,0.37626},
-{2979426,3899312,3899562,0.207410526315789,0.231811764705882},
-{2979427,3899562,3899984,0.20788,0.20788},
-{2979428,3899688,3900108,0.32325,0.32325},
-{2979429,3899984,3900108,0.0869454545454545,0.0869454545454545},
-{2979430,3900108,3900403,0.165844444444444,0.165844444444444},
-{2979431,3899984,3900345,0.246711111111111,1000000},
-{2979432,3900108,3900488,0.297954545454545,0.297954545454545},
-{2979433,3900345,3900488,0.0920666666666667,0.0920666666666667},
-{2979434,3900488,3900779,0.25275,0.25275},
-{2979435,3900779,3901252,0.35757,0.286056},
-{2979436,3900869,3901535,0.355064516129032,0.423346153846154},
-{2979437,3901252,3901535,0.210314285714286,0.184025},
-{2979438,3901205,3901821,0.370844444444444,0.400512},
-{2979439,3901535,3901821,0.192130434782609,0.163666666666667},
-{2979440,3899562,3900421,0.671575,0.671575},
-{2979441,3901535,3902151,0.341911111111111,0.341911111111111},
-{2979442,3901821,3902460,0.3291,0.3291},
-{2979443,3898276,3898790,0.492,0.351428571428571},
-{2979444,3898790,3899170,0.262638461538462,0.325171428571429},
-{2979445,3898650,3899170,0.299952,0.299952},
-{2979446,3899170,3899645,0.335863636363636,0.307875},
-{2979447,3899170,3899392,0.163688888888889,0.163688888888889},
-{2979448,3902151,3902754,0.469263157894737,0.469263157894737},
-{2979449,3901821,3902156,0.182904,0.175869230769231},
-{2979450,3902156,3902289,0.135642857142857,0.135642857142857},
-{2979451,3902289,3903314,0.635775,0.76293},
-{2979452,3902565,3902873,0.155844444444444,0.155844444444444},
-{2979453,3902873,3903105,0.172088888888889,0.172088888888889},
-{2979454,3902460,3903050,0.334533333333333,0.334533333333333},
-{2979455,3901947,3902453,0.3093,0.3093},
-{2979456,3902453,3902754,0.27945,0.263011764705882},
-{2979457,3902754,3903050,0.2862,0.195136363636364},
-{2979458,3903050,3903373,0.2659,0.217554545454545},
-{2979459,3902754,3903346,0.345311111111111,0.345311111111111},
-{2979460,3903050,3903593,0.343355555555556,0.343355555555556},
-{2979461,3903373,3903761,0.34248,0.34248},
-{2979462,3904147,3904312,0.135314285714286,0.135314285714286},
-{2979463,3903314,3903770,0.365208,0.351161538461538},
-{2979464,3903770,3904152,0.246375,0.203896551724138},
-{2979465,3904152,3904312,0.13455,0.129168},
-{2979466,3904152,3905204,0.589244444444444,1000000},
-{2979467,3904312,3904574,0.20136,0.20136},
-{2979468,3904312,3904817,0.332378571428572,0.387775},
-{2979469,3904817,3905206,0.320542857142857,0.269256},
-{2979470,3904574,3905076,0.334377777777778,0.334377777777778},
-{2979471,3904564,3905177,0.407244444444444,0.407244444444444},
-{2979472,3904243,3904740,0.345622222222222,0.345622222222222},
-{2979473,3904574,3905353,0.500376,0.500376},
-{2979474,3905206,3906356,0.95261052631579,0.670355555555556},
-{2979475,3903593,3903985,0.229,0.229},
-{2979476,3903985,3904439,1000000,0.216575},
-{2979477,3904439,3904740,0.167504347826087,0.167504347826087},
-{2979478,3904740,3905177,0.162218181818182,0.162218181818182},
-{2979479,3905177,3905484,0.147814285714286,0.159184615384615},
-{2979480,3904417,3904617,0.133622222222222,0.133622222222222},
-{2979481,3902873,3903132,0.153311111111111,0.153311111111111},
-{2979482,3906606,3907033,0.245530434782609,0.256690909090909},
-{2979483,3905865,3906108,0.123174193548387,0.141422222222222},
-{2979484,3906108,3906378,0.135561290322581,0.144910344827586},
-{2979485,3906378,3906606,0.185113043478261,0.193527272727273},
-{2979486,3907033,3907745,0.363822222222222,0.363822222222222},
-{2979487,3907745,3908507,0.374088888888889,0.374088888888889},
-{2979488,3907390,3908069,0.358288888888889,0.358288888888889},
-{2979489,3908069,3908816,0.371555555555556,0.371555555555556},
-{2979490,3908363,3909135,0.530242105263158,0.530242105263158},
-{2979491,3906378,3906984,0.356488888888889,0.356488888888889},
-{2979492,3906984,3907328,0.282675,0.22614},
-{2979493,3907328,3907745,0.28077,0.4011},
-{2979494,3907745,3908069,0.162888,0.162888},
-{2979495,3908069,3908363,0.170725,0.241023529411765},
-{2979496,3909135,3909384,0.168026086956522,0.19323},
-{2979497,3908799,3909384,0.341688888888889,0.341688888888889},
-{2979498,3909384,3909717,0.222057142857143,0.222057142857143},
-{2979499,3909717,3910051,0.158911111111111,0.158911111111111},
-{2979500,3910051,3910139,0.230844444444444,0.230844444444444},
-{2979501,3909384,3910166,0.381407142857143,0.368255172413793},
-{2979502,3909717,3910567,0.384533333333333,0.384533333333333},
-{2979503,3910051,3910865,0.376111111111111,0.376111111111111},
-{2979504,3909800,3910166,0.185492307692308,0.141847058823529},
-{2979505,3910166,3910567,0.23181,0.210736363636364},
-{2979506,3910567,3910865,0.22575,0.196304347826087},
-{2979507,3910865,3911011,0.37276,0.243104347826087},
-{2979508,3908799,3909474,0.357444444444444,0.357444444444444},
-{2979509,3909474,3909800,0.133327272727273,0.129405882352941},
-{2979510,3910949,3910837,0.20444347826087,0.20444347826087},
-{2979511,3911290,3911218,0.171038709677419,0.171038709677419},
-{2979512,3911218,3911099,0.326034782608696,0.357085714285714},
-{2979513,3911290,3912035,0.384422222222222,0.384422222222222},
-{2979514,3911218,3911730,0.35292,0.35292},
-{2979515,3904699,3905513,0.557165217391304,0.441889655172414},
-{2979516,3905513,3905601,0.0597333333333333,0.0896},
-{2979517,3905601,3905516,0.0629684210526316,0.0629684210526316},
-{2979518,3905944,3905601,0.225182608695652,0.235418181818182},
-{2979519,3905516,3905865,0.200423076923077,0.20844},
-{2979520,3906108,3906718,0.361955555555556,0.361955555555556},
-{2979521,3906718,3906984,0.207966666666667,0.207966666666667},
-{2979522,3904999,3905880,0.585981818181818,0.460414285714286},
-{2979523,3905880,3905944,0.0711666666666667,0.04575},
-{2979524,3905880,3906088,0.199231578947368,0.199231578947368},
-{2979525,3905226,3906088,0.460888888888889,0.460888888888889},
-{2979526,3905457,3906299,0.452444444444444,0.452444444444444},
-{2979527,3906088,3906299,0.134511111111111,0.134511111111111},
-{2979528,3906299,3906534,0.196663636363636,0.196663636363636},
-{2979529,3905944,3906170,0.123782608695652,0.101678571428571},
-{2979530,3906170,3906307,0.0939391304347826,0.0771642857142857},
-{2979531,3906170,3906889,0.514434782608696,0.514434782608696},
-{2979532,3905865,3906307,0.336272727272727,0.336272727272727},
-{2979533,3906307,3906609,0.153875,0.14772},
-{2979534,3906609,3906893,0.177977777777778,0.177977777777778},
-{2979535,3906893,3907203,0.169888888888889,0.169888888888889},
-{2979536,3906609,3906718,0.132830769230769,0.132830769230769},
-{2979537,3906893,3907255,0.277233333333333,0.277233333333333},
-{2979538,3906984,3907376,0.188711111111111,0.188711111111111},
-{2979539,3907376,3907689,0.23538,0.276917647058823},
-{2979540,3907376,3907684,0.3643,1000000},
-{2979541,3912329,3912685,0.170622222222222,0.170622222222222},
-{2979542,3911597,3912685,0.534577777777778,0.534577777777778},
-{2979543,3912685,3912833,0.0818526315789474,0.0818526315789474},
-{2979544,3912833,3913098,0.19935,0.1772},
-{2979545,3910949,3911776,0.308066666666667,0.308066666666667},
-{2979546,3911897,3913098,1.5954,1.5954},
-{2979547,3913182,3912833,0.238575,0.238575},
-{2979548,3913448,3913182,0.20478947368421,0.20478947368421},
-{2979549,3913182,3913759,0.285866666666667,0.285866666666667},
-{2979550,3913098,3913428,0.216771428571429,0.239589473684211},
-{2979551,3913428,3913755,0.1617,0.168168},
-{2979552,3912542,3913755,0.534133333333333,0.534133333333333},
-{2979604,3859969,3859631,0.54468,0.54468},
-{2979616,3865495,3865623,0.48159,0.48159},
-{2979626,3866085,3864868,0.41522,0.461355555555556},
-{2979627,3867323,3866085,0.3644625,0.402165517241379},
-{2979628,3867008,3866576,0.50072,0.357657142857143},
-{2979629,3866828,3866576,0.15591,0.15591},
-{2979630,3866828,3867352,0.302022222222222,0.302022222222222},
-{2979631,3867133,3866828,0.133103225806452,0.171925},
-{2979632,3867133,3867656,0.306422222222222,0.306422222222222},
-{2979633,3867436,3867133,0.13089375,0.13089375},
-{2979634,3867653,3867436,0.122091891891892,0.122091891891892},
-{2979635,3867807,3867653,1000000,1000000},
-{2979636,3868540,3868131,0.191844444444444,0.191844444444444},
-{2979637,3868338,3868540,0.117644444444444,0.117644444444444},
-{2979638,3868901,3868540,0.373688888888889,0.373688888888889},
-{2979639,3869018,3867653,0.521733333333333,0.521733333333333},
-{2979640,3867436,3866928,0.229555555555556,0.229555555555556},
-{2979641,3870984,3870571,0.145688888888889,0.145688888888889},
-{2979642,3870158,3870135,1000000,1000000},
-{2979643,3870894,3870135,0.29335,0.306104347826087},
-{2979644,3868972,3869053,0.121933333333333,0.121933333333333},
-{2979645,3869155,3868972,1000000,1000000},
-{2979646,3869336,3869155,1000000,1000000},
-{2979647,3870072,3869336,0.253288888888889,0.253288888888889},
-{2979648,3869336,3869387,0.0579111111111111,0.0579111111111111},
-{2979649,3869387,3869442,0.0559777777777778,0.0559777777777778},
-{2979650,3869442,3869583,0.100155555555556,0.100155555555556},
-{2979651,3870682,3870877,0.132444444444444,0.132444444444444},
-{2979652,3870072,3870129,0.124511111111111,0.124511111111111},
-{2979653,3870909,3871535,1000000,0.45312},
-{2979654,3871721,3872367,0.253147826086957,0.215644444444444},
-{2979655,3872269,3872254,0.0893555555555556,0.0893555555555556},
-{2979656,3872815,3872666,0.246555555555556,0.246555555555556},
-{2979657,3872367,3872269,0.211485714285714,0.193095652173913},
-{2979658,3872367,3872815,0.186485714285714,0.139864285714286},
-{2979659,3873858,3873872,0.1248,0.12064},
-{2979660,3873872,3874017,0.331232432432432,0.314246153846154},
-{2979661,3872417,3872367,0.155575,0.143607692307692},
-{2979662,3872417,3872879,0.241552941176471,0.241552941176471},
-{2979663,3872879,3872815,0.235585714285714,0.235585714285714},
-{2979664,3872499,3872417,0.141,0.135964285714286},
-{2979665,3871946,3872499,0.249942857142857,0.26244},
-{2979666,3872557,3872499,0.168625,0.183954545454545},
-{2979667,3872385,3872557,0.0586222222222222,0.0586222222222222},
-{2979668,3872385,3872739,1000000,1000000},
-{2979669,3872739,3872557,0.141124137931034,0.177939130434783},
-{2979670,3871334,3871256,1000000,1000000},
-{2979671,3871535,3871615,0.0432,0.0412363636363636},
-{2979672,3872283,3872767,1000000,0.3651},
-{2979673,3872767,3872739,0.0561333333333333,0.07578},
-{2979674,3872856,3872767,0.214554545454545,0.214554545454545},
-{2979675,3871535,3871494,0.20724,0.287833333333333},
-{2979676,3871615,3872067,0.468141176470588,0.468141176470588},
-{2979677,3872856,3873195,1000000,0.592090909090909},
-{2979678,3872905,3872856,0.16971,0.28285},
-{2979679,3872574,3872905,0.17685,1000000},
-{2979680,3872905,3873195,0.21592,1000000},
-{2979681,3872101,3872574,0.329742857142857,1000000},
-{2979682,3878615,3878777,1000000,1000000},
-{2979683,3878359,3878615,1000000,1000000},
-{2979684,3879716,3879708,0.153266666666667,0.153266666666667},
-{2979685,3878770,3878518,1000000,1000000},
-{2979686,3879708,3880180,0.2884,0.2884},
-{2979687,3880099,3880793,0.388958823529412,0.400745454545455},
-{2979688,3881862,3881458,0.521307692307692,0.322714285714286},
-{2979689,3881483,3881344,0.160777777777778,0.131545454545455},
-{2979690,3881344,3881117,0.123947368421053,0.120769230769231},
-{2979691,3881458,3881344,0.08373,0.08373},
-{2979692,3881117,3881274,0.12705,0.112933333333333},
-{2979693,3881458,3881274,0.239633333333333,0.2054},
-{2979694,3881274,3881093,0.415661538461538,0.337725},
-{2979695,3880424,3880877,0.414,0.414},
-{2979696,3881093,3880877,0.235341176470588,0.235341176470588},
-{2979697,3878076,3877880,1000000,1000000},
-{2979698,3878518,3878076,1000000,1000000},
-{2979699,3878188,3878076,1000000,1000000},
-{2979700,3878188,3878057,1000000,1000000},
-{2979701,3878908,3879202,0.1548,0.1548},
-{2979702,3879636,3879202,0.3528,0.373552941176471},
-{2979703,3879202,3879471,0.227977777777778,0.227977777777778},
-{2979704,3879471,3879864,0.292257142857143,0.245496},
-{2979705,3880424,3880091,0.257444444444444,0.210636363636364},
-{2979706,3880091,3879792,0.305972727272727,0.217141935483871},
-{2979707,3880486,3880091,0.251622222222222,0.251622222222222},
-{2979708,3880864,3880486,0.286022222222222,0.286022222222222},
-{2979709,3880486,3880135,0.234488888888889,0.234488888888889},
-{2979710,3880644,3880326,0.230444444444444,0.345666666666667},
-{2979711,3880644,3880486,0.0988,0.0988},
-{2979712,3880163,3879696,0.243311111111111,0.243311111111111},
-{2979713,3881478,3881487,0.073075,0.0923052631578947},
-{2979714,3881483,3881487,0.401929411764706,0.401929411764706},
-{2979715,3882097,3882114,0.46308,0.46308},
-{2979716,3880180,3880576,0.336466666666667,0.336466666666667},
-{2979717,3881896,3881458,0.206133333333333,0.206133333333333},
-{2979718,3882308,3881896,0.225177777777778,0.225177777777778},
-{2979719,3881582,3880877,0.344511111111111,0.344511111111111},
-{2979720,3881794,3881582,0.173589473684211,0.157057142857143},
-{2979721,3881582,3881094,0.64348,0.567776470588235},
-{2979722,3881869,3882235,0.481044444444444,0.481044444444444},
-{2979723,3880644,3881094,0.2826,0.3297},
-{2979724,3884598,3884572,0.495,0.495},
-{2979725,3886220,3886355,0.07872,0.0874666666666667},
-{2979726,3886355,3887360,0.460246153846154,0.4432},
-{2979727,3886355,3886327,0.296911111111111,0.296911111111111},
-{2979728,3886327,3886291,0.300333333333333,0.300333333333333},
-{2979729,3886134,3886291,0.0659777777777778,0.08907},
-{2979730,3886291,3887281,0.39094,0.316978378378378},
-{2979731,3886291,3886307,0.215244444444444,0.215244444444444},
-{2979732,3887360,3889299,0.697044444444444,0.697044444444444},
-{2979733,3887281,3889963,1.00644444444444,1.00644444444444},
-{2979734,3886648,3886605,0.45696,0.45696},
-{2979735,3889963,3890236,0.21676,0.16257},
-{2979736,3889963,3890085,0.52888,0.52888},
-{2979737,3885197,3885419,1000000,1000000},
-{2979738,3885419,3885395,1000000,1000000},
-{2979739,3885419,3885652,1000000,1000000},
-{2979740,3885652,3885620,1000000,1000000},
-{2979741,3884585,3884413,0.564022222222222,0.564022222222222},
-{2979742,3884766,3885036,1000000,0.577094117647059},
-{2979788,3882361,3882167,0.148408695652174,0.200788235294118},
-{2979789,3882167,3882069,0.0751153846153846,0.0673448275862069},
-{2979790,3881905,3882069,0.09448,0.109015384615385},
-{2979795,3894041,3894295,1000000,1000000},
-{2979796,3894295,3894587,1000000,1000000},
-{2979797,3898295,3898789,0.4596,0.40215},
-{2979798,3899043,3900231,0.525763636363636,0.49572},
-{2979799,3899877,3900181,0.187022222222222,0.187022222222222},
-{2979800,3899490,3900181,0.462954545454546,1000000},
-{2979801,3900181,3900620,0.263333333333333,1000000},
-{2979802,3899692,3900834,0.86214,0.86214},
-{2979803,3901189,3901529,0.159977777777778,0.159977777777778},
-{2979804,3900620,3901529,0.524244444444444,0.524244444444444},
-{2979805,3901529,3901838,0.183044444444444,0.183044444444444},
-{2979806,3900834,3901838,0.547333333333333,0.547333333333333},
-{2979807,3900102,3901235,0.641622222222222,0.641622222222222},
-{2979808,3898295,3898937,0.435488888888889,0.435488888888889},
-{2979809,3901838,3902144,0.142055172413793,0.142055172413793},
-{2979810,3903346,3903610,0.175155555555556,0.175155555555556},
-{2979811,3903270,3903610,0.20195,0.2308},
-{2979812,3903610,3903985,0.177336,0.13854375},
-{2979813,3902116,3901811,0.170733333333333,0.170733333333333},
-{2979814,3902144,3902436,0.221236363636364,0.221236363636364},
-{2979815,3902116,3902436,0.20229,0.20229},
-{2979816,3901319,3902039,0.372133333333333,0.372133333333333},
-{2979817,3902039,3902116,0.060312,0.060312},
-{2979818,3902436,3902786,0.246088888888889,0.246088888888889},
-{2979819,3902708,3903187,0.5856,0.421632},
-{2979820,3903187,3903701,0.58332,0.58332},
-{2979821,3903519,3904154,0.347688888888889,0.347688888888889},
-{2979822,3903985,3904154,0.1399125,0.1399125},
-{2979823,3904154,3904377,0.135577777777778,0.135577777777778},
-{2979824,3903698,3904377,0.368177777777778,0.397632},
-{2979825,3904377,3904699,0.236085714285714,0.206575},
-{2979826,3903892,3904999,0.5748,0.5748},
-{2979827,3904129,3905226,0.604155555555556,0.604155555555556},
-{2979828,3902786,3902990,0.146111111111111,0.146111111111111},
-{2979829,3902990,3903173,0.1416,0.1416},
-{2979830,3904290,3905457,0.593379310344827,0.593379310344827},
-{2979831,3901660,3902039,0.641778947368421,0.641778947368421},
-{2979832,3901866,3902990,0.554466666666667,0.554466666666667},
-{2979833,3902104,3903173,0.548533333333333,0.548533333333333},
-{2979834,3903173,3903395,0.148177777777778,0.148177777777778},
-{2979835,3903395,3903574,0.153555555555556,0.153555555555556},
-{2979836,3903395,3903701,0.214152,0.214152},
-{2979837,3903701,3903924,0.158644444444444,0.158644444444444},
-{2979838,3903924,3904077,0.107955555555556,0.107955555555556},
-{2979839,3903701,3904290,0.33745,0.33745},
-{2979840,3904077,3904650,0.33612,0.33612},
-{2979841,3904727,3906041,0.6253,0.6253},
-{2979842,3900281,3901413,0.6408,0.6408},
-{2979843,3900687,3901866,0.53986875,0.664453846153846},
-{2979844,3902351,3903395,0.524335714285714,0.524335714285714},
-{2979845,3906041,3906600,0.330355555555556,0.330355555555556},
-{2979846,3906276,3906860,0.326622222222222,0.326622222222222},
-{2979847,3906813,3907484,0.3709,0.387026086956522},
-{2979848,3907716,3907672,0.333022222222222,0.333022222222222},
-{2979849,3907716,3908217,0.3935625,0.3935625},
-{2979850,3907170,3907672,0.24,0.24},
-{2979851,3907672,3908000,0.20439,0.20439},
-{2979852,3907689,3908000,0.165375,0.233470588235294},
-{2979853,3907672,3908217,0.259511111111111,0.259511111111111},
-{2979854,3907484,3908138,0.448854545454545,0.429339130434783},
-{2979855,3908000,3908522,0.195908571428571,0.195908571428571},
-{2979856,3908217,3908522,0.143977777777778,0.143977777777778},
-{2979857,3908522,3908821,0.1704,0.1704},
-{2979858,3908138,3908821,0.331546153846154,0.307864285714286},
-{2979859,3908095,3909153,0.56796,1000000},
-{2979860,3908821,3909153,0.155544827586207,0.145509677419355},
-{2979861,3909153,3909474,0.151965517241379,0.1469},
-{2979862,3908821,3909097,0.139666666666667,0.139666666666667},
-{2979863,3909153,3909670,0.281244444444444,0.281244444444444},
-{2979864,3908616,3909097,0.242177777777778,0.242177777777778},
-{2979865,3908863,3909322,0.212622222222222,0.212622222222222},
-{2979866,3909097,3909322,0.119955555555556,0.119955555555556},
-{2979867,3909322,3909913,0.3076,0.3076},
-{2979868,3909703,3909913,0.118685714285714,0.138466666666667},
-{2979869,3909322,3909670,0.1662,0.1662},
-{2979870,3909670,3910358,0.309288888888889,0.309288888888889},
-{2979871,3909913,3910358,0.19885,0.216927272727273},
-{2979872,3909348,3909517,1000000,1000000},
-{2979873,3909517,3909609,1000000,1000000},
-{2979874,3907690,3908603,0.417311111111111,0.417311111111111},
-{2979875,3905343,3906813,0.879675,0.781933333333333},
-{2979876,3905551,3907113,1.09149,0.873192},
-{2979877,3905986,3907690,0.973625,0.93468},
-{2979878,3908908,3909180,0.182514285714286,0.201726315789474},
-{2979879,3911207,3911497,0.155466666666667,0.155466666666667},
-{2979880,3911497,3911732,0.138,0.138},
-{2979881,3911354,3911497,0.14072,0.14072},
-{2979882,3911354,3911732,0.148488888888889,0.148488888888889},
-{2979883,3911207,3911701,0.2546,0.2546},
-{2979884,3911701,3912221,0.4300125,0.4300125},
-{2979885,3911701,3912009,0.165222222222222,0.165222222222222},
-{2979886,3911497,3911882,0.194022222222222,0.194022222222222},
-{2979887,3911882,3912009,0.0616551724137931,0.0616551724137931},
-{2979888,3912009,3912227,0.114860869565217,0.110075},
-{2979889,3912227,3912605,0.230333333333333,0.218210526315789},
-{2979890,3911732,3912440,0.247977777777778,0.247977777777778},
-{2979891,3911882,3912440,0.299822222222222,0.299822222222222},
-{2979892,3912227,3913038,0.386155555555556,0.386155555555556},
-{2979893,3912440,3913038,0.180488888888889,0.180488888888889},
-{2979894,3914836,3915258,0.343121739130435,0.328825},
-{2979895,3915447,3915166,1000000,1000000},
-{2979896,3915166,3915161,1000000,1000000},
-{2979897,3915166,3915495,1000000,1000000},
-{2979940,3866085,3866032,0.256955555555556,0.256955555555556},
-{2979941,3865839,3865450,0.632533333333333,0.632533333333333},
-{2979955,3865354,3864647,0.251688888888889,0.251688888888889},
-{2979956,3865235,3864632,0.29904,0.29904},
-{2979959,3865450,3865354,0.18305,0.231221052631579},
-{2979960,3865354,3865235,0.164746153846154,0.203971428571429},
-{2979961,3866526,3866024,0.664355555555556,0.664355555555556},
-{2979962,3866336,3865354,0.366155555555556,0.366155555555556},
-{2979967,3864988,3865235,0.380968421052632,0.314713043478261},
-{2979975,3866949,3866289,0.827034782608696,0.827034782608696},
-{2979976,3865846,3865235,0.235444444444444,0.235444444444444},
-{2979977,3866395,3865846,0.189622222222222,0.189622222222222},
-{2979978,3866695,3866611,0.263711111111111,0.263711111111111},
-{2979980,3865690,3864988,0.208129411764706,0.202182857142857},
-{2979981,3869053,3868712,0.247114285714286,0.247114285714286},
-{2979982,3868712,3868619,0.0720666666666667,0.0720666666666667},
-{2979983,3868712,3869091,0.618366666666667,0.618366666666667},
-{2979984,3868619,3867870,0.2668,0.2668},
-{2979985,3867806,3867870,0.265257142857143,0.293178947368421},
-{2979986,3868619,3868503,0.375028571428571,0.342417391304348},
-{2979987,3869053,3869206,0.151304347826087,0.145},
-{2979988,3867291,3866949,0.148644444444444,1000000},
-{2979989,3867705,3867291,0.235314285714286,1000000},
-{2979990,3867806,3867705,0.166894736842105,0.15855},
-{2979991,3868301,3867705,0.25904347826087,0.25904347826087},
-{2979992,3868647,3868301,0.177133333333333,0.177133333333333},
-{2979993,3868879,3868874,0.121547368421053,0.121547368421053},
-{2979994,3868777,3868301,0.182666666666667,0.182666666666667},
-{2979995,3867291,3866796,0.546444444444445,0.546444444444445},
-{2979996,3867705,3867383,0.392048275862069,0.392048275862069},
-{2979997,3868874,3868777,0.0938444444444444,0.0938444444444444},
-{2979998,3869206,3869231,0.0311612903225806,0.0292727272727273},
-{2979999,3869231,3869577,0.337311111111111,0.337311111111111},
-{2980000,3869583,3869755,0.119911111111111,0.119911111111111},
-{2980001,3869888,3869755,0.07665,0.07665},
-{2980002,3870129,3870134,0.0995777777777778,0.0995777777777778},
-{2980003,3870134,3869888,0.126882352941176,0.126882352941176},
-{2980004,3870284,3870134,0.0530444444444444,0.059675},
-{2980005,3871106,3870284,0.3675,0.310961538461539},
-{2980006,3869888,3869832,0.5058,0.5058},
-{2980007,3870297,3869990,0.1395,0.1395},
-{2980008,3870239,3870297,0.0857777777777778,0.0857777777777778},
-{2980009,3870297,3870227,0.117577777777778,0.117577777777778},
-{2980010,3870358,3870444,0.159366666666667,0.220661538461538},
-{2980011,3869927,3868874,0.390222222222222,0.390222222222222},
-{2980012,3870074,3869927,0.120866666666667,0.120866666666667},
-{2980013,3869927,3869776,0.126222222222222,0.126222222222222},
-{2980014,3869776,3868777,0.387177777777778,0.387177777777778},
-{2980015,3870204,3869776,0.154622222222222,0.154622222222222},
-{2980016,3870487,3870204,1000000,1000000},
-{2980017,3866796,3866730,0.0743111111111111,0.0743111111111111},
-{2980018,3866730,3866695,1000000,1000000},
-{2980019,3867235,3866796,0.190486956521739,0.190486956521739},
-{2980020,3867383,3867235,0.09378,0.09378},
-{2980021,3867961,3867383,0.454828571428571,0.415278260869565},
-{2980022,3867961,3867752,0.0968222222222222,0.0968222222222222},
-{2980023,3869174,3868191,0.362311111111111,0.362311111111111},
-{2980024,3869007,3868191,0.340066666666667,0.340066666666667},
-{2980025,3869007,3869017,0.0398666666666667,0.0398666666666667},
-{2980026,3869904,3869571,1000000,1000000},
-{2980027,3869904,3870073,1000000,1000000},
-{2980028,3870956,3870350,1000000,0.59856},
-{2980029,3871269,3870444,0.397,0.378954545454545},
-{2980030,3871337,3871541,0.0952666666666667,0.0952666666666667},
-{2980031,3871164,3871666,0.161777777777778,0.161777777777778},
-{2980032,3870999,3871592,0.344622222222222,1000000},
-{2980033,3871820,3871666,1000000,1000000},
-{2980034,3871666,3872018,0.169844444444444,0.169844444444444},
-{2980035,3872018,3871676,0.117777777777778,0.117777777777778},
-{2980036,3871820,3872178,1000000,1000000},
-{2980037,3872018,3872178,0.0635333333333333,0.0635333333333333},
-{2980038,3870977,3871119,1000000,1000000},
-{2980039,3871119,3871592,0.191888888888889,0.191888888888889},
-{2980040,3871119,3871104,0.133111111111111,0.133111111111111},
-{2980041,3870524,3869904,1000000,1000000},
-{2980042,3871104,3870929,0.0638444444444444,0.0638444444444444},
-{2980043,3871592,3871553,0.0866888888888889,0.0866888888888889},
-{2980044,3871553,3871540,0.0846,0.0846},
-{2980045,3871906,3871553,0.22128,0.22128},
-{2980046,3871906,3871824,0.0677111111111111,0.0677111111111111},
-{2980047,3871247,3871104,0.0701368421052632,0.0701368421052632},
-{2980048,3871553,3871247,0.12843,0.12843},
-{2980049,3872181,3871906,0.144352941176471,0.144352941176471},
-{2980050,3872088,3871824,0.1556625,0.1556625},
-{2980051,3872668,3872088,0.260295652173913,0.352164705882353},
-{2980052,3872088,3872059,0.030768,0.0452470588235294},
-{2980053,3871494,3871716,0.120046153846154,0.15606},
-{2980054,3871716,3871820,0.237022222222222,0.237022222222222},
-{2980055,3872181,3872438,0.165177777777778,0.165177777777778},
-{2980056,3872876,3872668,0.157822222222222,0.157822222222222},
-{2980057,3869523,3869676,0.167644444444444,0.167644444444444},
-{2980058,3870113,3869523,0.200377777777778,0.200377777777778},
-{2980059,3870113,3870324,0.229955555555556,0.229955555555556},
-{2980060,3870243,3870113,0.0910714285714286,0.0910714285714286},
-{2980061,3872877,3873175,0.177094736842105,0.2103},
-{2980062,3872810,3873246,0.176555555555556,0.176555555555556},
-{2980063,3879933,3879221,1000000,1000000},
-{2980064,3880135,3879621,0.444888888888889,0.462},
-{2980065,3879496,3879621,0.12774,0.12774},
-{2980066,3877493,3878068,0.411422222222222,0.411422222222222},
-{2980067,3878885,3878068,0.425611764705882,0.425611764705882},
-{2980068,3878031,3878605,0.3958,0.3958},
-{2980069,3878605,3879152,0.288931034482759,0.288931034482759},
-{2980070,3879152,3879384,0.17355,0.204176470588235},
-{2980071,3878605,3879782,0.697133333333333,0.697133333333333},
-{2980072,3879221,3878654,1000000,1000000},
-{2980073,3881523,3880980,0.365355555555556,0.365355555555556},
-{2980074,3881364,3880980,0.223666666666667,0.223666666666667},
-{2980075,3881652,3881364,0.326133333333333,0.326133333333333},
-{2980076,3881364,3881229,0.171733333333333,0.171733333333333},
-{2980077,3883596,3883371,0.37425,0.415833333333333},
-{2980078,3883371,3883105,0.282622222222222,0.282622222222222},
-{2980079,3883371,3883326,0.286644444444444,0.286644444444444},
-{2980080,3883105,3883326,0.0888888888888889,0.0888888888888889},
-{2980081,3883105,3882858,0.3882,0.3882},
-{2980082,3883275,3882858,0.138370588235294,1000000},
-{2980083,3883326,3883275,0.384275,0.384275},
-{2980084,3882858,3882558,0.419571428571428,0.518294117647059},
-{2980085,3882853,3883275,0.5394,0.5394},
-{2980086,3882558,3882382,0.255366666666667,0.255366666666667},
-{2980087,3882853,3882558,0.2104125,1000000},
-{2980088,3883242,3882853,0.3007875,1000000},
-{2980089,3884413,3884391,0.34188,0.25641},
-{2980090,3884920,3884391,0.299305263157895,0.334517647058824},
-{2980091,3884195,3883677,1000000,0.554628571428571},
-{2980092,3880673,3880868,0.123777777777778,0.123777777777778},
-{2980093,3887603,3887607,0.151022222222222,1000000},
-{2980094,3887922,3887909,0.155155555555556,0.155155555555556},
-{2980095,3888075,3888050,1000000,0.148},
-{2980096,3887202,3887607,1000000,0.147888888888889},
-{2980097,3888050,3888568,1000000,0.188155555555556},
-{2980098,3887570,3887171,1000000,0.1452},
-{2980099,3887523,3887570,1000000,0.137644444444444},
-{2980100,3887841,3887871,0.141,0.141},
-{2980101,3888159,3888169,0.136311111111111,1000000},
-{2980102,3886582,3886509,0.40756875,0.43474},
-{2980103,3887841,3887752,0.419883870967742,0.419883870967742},
-{2980104,3884806,3885014,0.179353846153846,0.137152941176471},
-{2980105,3884784,3884413,0.177954545454545,0.206052631578947},
-{2980106,3884984,3884784,0.102409090909091,0.18775},
-{2980107,3884784,3884806,0.314446153846154,0.4542},
-{2980108,3885014,3885546,0.289831578947368,0.393342857142857},
-{2980109,3885546,3885524,0.490733333333333,0.464905263157895},
-{2980110,3885524,3885918,0.309230769230769,0.268},
-{2980111,3885816,3885759,0.98688,0.98688},
-{2980112,3889274,3889228,0.429666666666667,0.429666666666667},
-{2980113,3889927,3889874,0.316133333333333,0.316133333333333},
-{2980114,3889874,3889842,0.6577,0.6577},
-{2980115,3889758,3889842,0.486644444444444,0.486644444444444},
-{2980116,3885604,3885545,0.67374,0.67374},
-{2980117,3885269,3885545,0.111688888888889,0.111688888888889},
-{2980118,3885545,3885553,0.28554,0.28554},
-{2980119,3886509,3886428,0.646733333333333,0.48505},
-{2980120,3887752,3887661,0.539527272727273,0.539527272727273},
-{2980121,3889133,3889018,0.649755555555556,0.649755555555556},
-{2980122,3889758,3889650,0.89118,0.89118},
-{2980123,3890476,3890438,0.301303448275862,0.416085714285714},
-{2980124,3890438,3890375,0.5796,0.5796},
-{2980125,3890375,3890321,0.568460869565217,0.568460869565217},
-{2980126,3890321,3890225,0.942284210526316,0.89517},
-{2980127,3891553,3891513,0.442155555555556,0.37306875},
-{2980128,3890945,3891513,0.29475652173913,0.322828571428571},
-{2980129,3891513,3891508,0.101775,0.116314285714286},
-{2980130,3891508,3891492,0.13035,0.125855172413793},
-{2980131,3891492,3891467,0.2838,0.272448},
-{2980132,3891467,3891358,0.577316129032258,0.59656},
-{2980133,3884763,3884117,0.524,0.524},
-{2980134,3884117,3884528,0.274418181818182,0.274418181818182},
-{2980135,3884877,3884958,0.321866666666667,0.321866666666667},
-{2980136,3885164,3884877,0.24595,0.24595},
-{2980137,3885124,3885450,0.19945,0.19945},
-{2980138,3885124,3885483,0.211222222222222,0.211222222222222},
-{2980139,3884877,3885011,0.127835294117647,0.127835294117647},
-{2980140,3885011,3885124,0.0409741935483871,0.0438},
-{2980141,3885011,3884734,0.154509677419355,0.154509677419355},
-{2980142,3884734,3884528,0.1368,0.146933333333333},
-{2980143,3884734,3885481,0.367779310344828,0.367779310344828},
-{2980144,3884528,3884482,0.0420923076923077,0.043776},
-{2980145,3892149,3892332,0.0806444444444444,0.0806444444444444},
-{2980146,3892148,3892149,0.0808,0.0808},
-{2980147,3891645,3891508,0.11168,1000000},
-{2980148,3891492,3891626,0.0678,0.0941666666666667},
-{2980149,3891626,3891787,0.0890347826086957,0.0930818181818182},
-{2980150,3891787,3892004,0.153866666666667,0.131885714285714},
-{2980151,3892004,3891985,0.384733333333333,0.46168},
-{2980152,3892148,3892189,1000000,0.388888888888889},
-{2980153,3892332,3892638,0.5352,1000000},
-{2980154,3892189,3892290,1000000,0.0797625},
-{2980155,3892290,3892638,1000000,0.28908},
-{2980156,3892290,3892263,1000000,0.405276923076923},
-{2980157,3892263,3892240,1000000,0.377314285714286},
-{2980158,3892263,3892898,0.265,1000000},
-{2980159,3892638,3892898,1000000,0.376168421052632},
-{2980160,3892898,3893055,0.170688888888889,0.170688888888889},
-{2980161,3891985,3891964,0.2568,0.321},
-{2980162,3891964,3892293,0.157711111111111,0.157711111111111},
-{2980163,3899407,3900339,0.606133333333333,0.606133333333333},
-{2980164,3899215,3899407,1000000,0.154566666666667},
-{2980165,3899407,3899591,1000000,0.133663636363636},
-{2980166,3898902,3899344,0.267266666666667,0.36081},
-{2980167,3901103,3902351,0.748852173913043,0.615128571428571},
-{2980168,3901568,3902837,0.639422222222222,0.639422222222222},
-{2980169,3902837,3903788,0.532888888888889,0.532888888888889},
-{2980170,3903574,3903720,0.190835294117647,0.190835294117647},
-{2980171,3903720,3903788,0.05795,0.06954},
-{2980172,3903720,3904077,0.25215,0.25215},
-{2980173,3901781,3903064,0.642822222222222,0.642822222222222},
-{2980174,3903064,3904023,0.525822222222222,0.525822222222222},
-{2980175,3903788,3904023,0.154577777777778,0.154577777777778},
-{2980176,3904023,3904252,0.20931,0.20931},
-{2980177,3905184,3904252,0.493377777777778,0.493377777777778},
-{2980178,3904252,3904444,0.20571,0.20571},
-{2980179,3904444,3904653,0.243733333333333,0.243733333333333},
-{2980180,3904653,3904862,0.308261538461538,0.308261538461538},
-{2980181,3904862,3905087,0.28428,0.193827272727273},
-{2980182,3905087,3905265,0.252975,0.16865},
-{2980183,3904444,3905343,0.463427586206897,0.433529032258065},
-{2980184,3903489,3904444,0.553512,0.44638064516129},
-{2980185,3903682,3904653,0.549672,0.572575},
-{2980186,3900483,3900694,0.168207692307692,0.168207692307692},
-{2980187,3900694,3900891,0.11852,0.11852},
-{2980188,3900694,3901568,0.58635,0.58635},
-{2980189,3900891,3901781,0.514222222222222,0.514222222222222},
-{2980190,3904653,3905551,0.496533333333333,0.496533333333333},
-{2980191,3905087,3905986,0.57764347826087,0.492066666666667},
-{2980192,3905265,3906199,0.607309090909091,0.607309090909091},
-{2980193,3904701,3905265,0.305121428571429,0.305121428571429},
-{2980194,3904385,3904701,0.2484,1000000},
-{2980195,3905265,3905496,0.3043125,0.3043125},
-{2980196,3902284,3901711,0.2876,0.2876},
-{2980197,3901463,3901711,0.126311111111111,0.126311111111111},
-{2980198,3904447,3905087,0.278254545454545,0.278254545454545},
-{2980199,3904174,3904447,1000000,0.222284210526316},
-{2980200,3906199,3908004,1.001975,0.80158},
-{2980201,3909180,3909609,0.209866666666667,0.209866666666667},
-{2980202,3908272,3909180,0.55779,0.55779},
-{2980203,3909609,3909859,0.135022222222222,0.135022222222222},
-{2980204,3909180,3909353,0.1002,0.1002},
-{2980205,3909353,3909531,0.0806222222222222,0.0806222222222222},
-{2980206,3908518,3909353,0.402733333333333,0.402733333333333},
-{2980207,3909859,3909531,0.208755555555556,0.208755555555556},
-{2980208,3909531,3908743,0.412911111111111,0.412911111111111},
-{2980209,3906774,3907233,0.215807142857143,0.30213},
-{2980210,3907233,3907736,0.204774193548387,0.186705882352941},
-{2980211,3907736,3908296,0.227148387096774,0.185305263157895},
-{2980212,3908296,3908889,0.284424,0.25395},
-{2980213,3907233,3908017,0.4989,0.577673684210526},
-{2980214,3907736,3908599,0.415044444444444,0.415044444444444},
-{2980215,3908296,3909163,0.422711111111111,0.422711111111111},
-{2980216,3905553,3906885,0.678835714285714,1.26716},
-{2980217,3905774,3907082,0.93537,0.93537},
-{2980218,3908017,3909397,1.43065714285714,1.43065714285714},
-{2980219,3908599,3910029,0.588017647058824,0.588017647058824},
-{2980220,3909163,3910831,0.661676470588235,0.661676470588235},
-{2980322,3865183,3864876,0.131426086956522,0.131426086956522},
-{2980323,3865170,3864703,0.1666,0.1666},
-{2980324,3865170,3865183,0.183111111111111,0.183111111111111},
-{2980325,3865132,3865170,0.190755555555556,0.190755555555556},
-{2980326,3864906,3864181,0.390886956521739,0.390886956521739},
-{2980327,3864907,3864584,0.19797,0.19797},
-{2980328,3864907,3864906,0.171369230769231,0.171369230769231},
-{2980329,3864906,3864914,0.15092,0.15092},
-{2980330,3864914,3864664,0.109622222222222,0.109622222222222},
-{2980331,3865132,3864907,0.0987545454545455,0.0987545454545455},
-{2980332,3865607,3865132,0.224657142857143,0.224657142857143},
-{2980333,3865776,3864914,0.595371428571428,0.595371428571428},
-{2980334,3865665,3865183,0.174021428571429,0.174021428571429},
-{2980335,3865690,3865665,0.2014,0.2014},
-{2980336,3865665,3865643,0.1743,0.1743},
-{2980337,3865643,3865607,0.192311111111111,0.192311111111111},
-{2980338,3865643,3865170,0.175844444444444,0.175844444444444},
-{2980339,3865607,3865754,0.121975,0.133063636363636},
-{2980340,3865754,3865776,0.057,0.0619565217391304},
-{2980341,3865776,3865814,0.201685714285714,0.176475},
-{2980346,3865224,3864135,0.478755555555556,0.478755555555556},
-{2980347,3865640,3865893,0.6828375,0.376737931034483},
-{2980348,3866198,3866397,0.340822222222222,0.340822222222222},
-{2980349,3866525,3865690,0.292288888888889,0.292288888888889},
-{2980350,3866471,3865690,0.31145,0.219847058823529},
-{2980351,3866339,3865665,0.222579310344828,0.21516},
-{2980352,3867215,3866339,0.361930434782609,0.308311111111111},
-{2980353,3866275,3865643,0.223688888888889,0.223688888888889},
-{2980354,3866525,3866471,0.0695142857142857,0.0695142857142857},
-{2980355,3866471,3866339,0.129511111111111,0.129511111111111},
-{2980356,3866339,3866275,0.167616,0.2328},
-{2980357,3866545,3866684,0.212977777777778,0.212977777777778},
-{2980358,3866239,3865754,0.174622222222222,0.174622222222222},
-{2980359,3866275,3866239,0.285333333333333,0.285333333333333},
-{2980360,3867571,3866525,0.379,0.379},
-{2980361,3868320,3867753,0.205153846153846,0.205153846153846},
-{2980362,3868853,3868320,0.214575,0.214575},
-{2980363,3867333,3866851,0.173777777777778,0.173777777777778},
-{2980364,3867460,3867333,0.339755555555556,0.339755555555556},
-{2980365,3868391,3867333,0.392377777777778,0.392377777777778},
-{2980366,3868492,3867811,0.238088888888889,0.238088888888889},
-{2980367,3868453,3867568,0.321355555555556,0.321355555555556},
-{2980368,3869284,3869523,0.249133333333333,0.249133333333333},
-{2980369,3868607,3868492,0.265828571428571,0.27912},
-{2980370,3868492,3868453,0.03748,0.0624666666666667},
-{2980371,3868453,3868391,0.136846153846154,0.14825},
-{2980372,3868391,3868374,0.120257142857143,0.114790909090909},
-{2980373,3868374,3868279,0.1802,0.300333333333333},
-{2980374,3868279,3868199,0.209509090909091,0.209509090909091},
-{2980375,3866830,3868279,0.526511111111111,0.526511111111111},
-{2980376,3870511,3870907,0.200885714285714,0.21093},
-{2980377,3869185,3868808,0.457777777777778,0.457777777777778},
-{2980378,3868279,3868807,0.190444444444444,0.190444444444444},
-{2980379,3868684,3869016,0.122955555555556,0.122955555555556},
-{2980380,3869016,3869353,0.123444444444444,0.123444444444444},
-{2980381,3869539,3869933,0.131866666666667,0.131866666666667},
-{2980382,3870907,3870997,0.550984615384615,0.550984615384615},
-{2980383,3869015,3869388,0.178172727272727,0.19599},
-{2980384,3869388,3869728,0.225694736842105,0.2680125},
-{2980385,3869933,3870590,0.220777777777778,0.220777777777778},
-{2980386,3870637,3870590,0.1338375,0.1338375},
-{2980387,3870590,3870496,0.163466666666667,0.163466666666667},
-{2980388,3871037,3870496,0.197955555555556,0.197955555555556},
-{2980389,3869728,3870212,0.174222222222222,0.174222222222222},
-{2980390,3870212,3870390,0.0908666666666667,0.0908666666666667},
-{2980391,3870390,3870299,0.106822222222222,0.106822222222222},
-{2980392,3870907,3871789,0.319666666666667,0.319666666666667},
-{2980393,3870997,3871631,0.210644444444444,0.210644444444444},
-{2980394,3871631,3871789,0.145711111111111,0.145711111111111},
-{2980395,3872079,3871789,0.221733333333333,0.221733333333333},
-{2980396,3871278,3871179,0.172288888888889,0.172288888888889},
-{2980397,3871838,3871278,1000000,1000000},
-{2980398,3867023,3867799,0.301755555555556,0.301755555555556},
-{2980399,3869420,3869621,0.394747826086956,0.56745},
-{2980400,3869621,3869728,0.19548,0.154326315789474},
-{2980401,3870081,3869621,0.279633333333333,0.201336},
-{2980402,3870081,3870212,0.152577777777778,0.152577777777778},
-{2980403,3870793,3870081,0.42129,0.312066666666667},
-{2980404,3871186,3870523,0.287577777777778,0.287577777777778},
-{2980405,3870793,3871186,0.209977777777778,0.209977777777778},
-{2980406,3868320,3868441,0.231555555555556,0.231555555555556},
-{2980407,3871789,3872214,0.147111111111111,0.147111111111111},
-{2980408,3872214,3872604,0.138088888888889,0.138088888888889},
-{2980409,3872604,3872991,0.140288888888889,0.140288888888889},
-{2980410,3872991,3873308,0.130533333333333,0.130533333333333},
-{2980411,3872214,3872412,0.186111111111111,0.186111111111111},
-{2980412,3872412,3872832,0.136688888888889,0.136688888888889},
-{2980413,3872604,3872832,0.187177777777778,0.187177777777778},
-{2980414,3871631,3872831,0.426577777777778,0.426577777777778},
-{2980415,3872831,3872991,0.170955555555556,0.170955555555556},
-{2980416,3872741,3872831,0.19692,0.19692},
-{2980417,3872607,3872741,0.293245161290323,0.363624},
-{2980418,3872741,3873117,0.156688888888889,0.156688888888889},
-{2980419,3879384,3878760,0.299576470588235,0.308654545454545},
-{2980420,3878241,3878041,0.0544833333333333,0.0544833333333333},
-{2980421,3878460,3878241,0.149005714285714,0.149005714285714},
-{2980422,3879782,3880245,0.319844444444444,0.319844444444444},
-{2980423,3880062,3879591,1000000,1000000},
-{2980424,3878460,3879501,1000000,1000000},
-{2980425,3878241,3879275,0.5192,0.5192},
-{2980426,3881570,3880784,0.498288888888889,0.498288888888889},
-{2980427,3881894,3881033,0.698044444444444,0.698044444444444},
-{2980428,3883677,3883209,0.689371428571429,0.689371428571429},
-{2980429,3882443,3881919,0.369977777777778,0.369977777777778},
-{2980430,3881919,3881996,0.0492888888888889,0.0492888888888889},
-{2980431,3884482,3885196,0.395844444444444,0.395844444444444},
-{2980432,3884482,3884210,0.11916,0.1324},
-{2980433,3884210,3885004,0.437044444444444,0.437044444444444},
-{2980434,3883606,3883402,0.17376,0.193066666666667},
-{2980435,3883220,3883048,0.161972727272727,0.169685714285714},
-{2980436,3883402,3883890,0.498888888888889,1000000},
-{2980437,3884798,3885337,0.596,1000000},
-{2980438,3886593,3886649,0.05844,0.0859411764705882},
-{2980439,3887522,3887479,0.173652631578947,0.149972727272727},
-{2980440,3887479,3888023,0.184177777777778,0.184177777777778},
-{2980441,3887136,3887354,0.1635,0.218},
-{2980442,3887354,3887479,0.0869777777777778,0.11742},
-{2980443,3887354,3887779,0.1974,0.1974},
-{2980444,3887779,3887818,0.246622222222222,0.246622222222222},
-{2980445,3887818,3887206,0.37971,0.37971},
-{2980446,3889018,3888912,0.669644444444444,0.669644444444444},
-{2980447,3889650,3889527,1.18041,1.18041},
-{2980448,3886570,3886969,0.455905263157895,0.455905263157895},
-{2980449,3887206,3888218,0.57954,1000000},
-{2980450,3888480,3888218,0.256061538461538,0.20805},
-{2980451,3887206,3886969,0.24339,0.24339},
-{2980452,3886326,3886579,0.30132,0.30132},
-{2980453,3886548,3886321,0.249733333333333,0.249733333333333},
-{2980454,3886579,3886548,0.139976470588235,0.139976470588235},
-{2980455,3886969,3886579,0.23277,0.23277},
-{2980456,3886548,3887550,0.65472,0.65472},
-{2980457,3886969,3887778,0.66927,0.66927},
-{2980458,3888218,3888160,0.0819428571428572,0.0521454545454546},
-{2980459,3888160,3887877,0.2179,0.186771428571429},
-{2980460,3887877,3887778,0.0498666666666667,0.04488},
-{2980461,3887778,3887550,0.155652631578947,0.140828571428571},
-{2980462,3891964,3891952,0.114735483870968,0.114735483870968},
-{2980463,3891952,3891891,0.254930769230769,0.194947058823529},
-{2980464,3891952,3892831,0.396044444444444,0.396044444444444},
-{2980465,3892831,3892807,0.243266666666667,0.243266666666667},
-{2980466,3890225,3890157,0.481635,0.55044},
-{2980467,3891358,3891304,0.294042857142857,0.283903448275862},
-{2980468,3892403,3892344,0.820866666666667,0.547244444444444},
-{2980469,3893007,3892928,0.637022222222222,0.637022222222222},
-{2980470,3890989,3891950,0.532244444444445,0.532244444444445},
-{2980471,3891950,3892344,0.220711111111111,0.220711111111111},
-{2980472,3890157,3890399,0.172666666666667,0.172666666666667},
-{2980473,3890399,3890925,0.54632,0.455266666666667},
-{2980474,3889639,3889922,0.211690909090909,0.211690909090909},
-{2980475,3889922,3890261,0.35136,0.3294},
-{2980476,3890261,3890399,0.186507692307692,0.1515375},
-{2980477,3890399,3890953,0.277755555555556,0.277755555555556},
-{2980478,3890953,3891204,0.234444444444444,0.234444444444444},
-{2980479,3891950,3892027,0.140488888888889,0.140488888888889},
-{2980480,3891782,3892027,0.131244444444444,0.131244444444444},
-{2980481,3892027,3892566,0.254177777777778,0.254177777777778},
-{2980482,3892566,3893198,0.280355555555556,0.280355555555556},
-{2980483,3893513,3893376,0.493589189189189,0.652242857142857},
-{2980484,3893683,3894124,0.260288888888889,0.260288888888889},
-{2980485,3893178,3893449,0.174391304347826,0.174391304347826},
-{2980486,3893449,3893624,0.165633333333333,0.114669230769231},
-{2980487,3893837,3894302,0.2604,0.2604},
-{2980488,3894032,3894354,0.174533333333333,0.174533333333333},
-{2980489,3894354,3894495,0.0892222222222222,0.0892222222222222},
-{2980490,3894354,3894599,0.301088888888889,0.301088888888889},
-{2980491,3894599,3894265,0.174822222222222,0.174822222222222},
-{2980492,3894599,3894869,0.23757,0.23757},
-{2980493,3896711,3897434,0.45333,0.45333},
-{2980494,3900325,3899786,0.269333333333333,0.269333333333333},
-{2980495,3897434,3899134,1.17774,1.17774},
-{2980496,3900807,3900288,0.419885714285714,0.489866666666667},
-{2980497,3897434,3898364,1000000,1000000},
-{2980498,3899134,3898364,1000000,1000000},
-{2980499,3901106,3901459,0.231577777777778,0.231577777777778},
-{2980500,3903444,3902783,0.364711111111111,0.364711111111111},
-{2980501,3903741,3904001,0.148422222222222,0.148422222222222},
-{2980502,3905255,3905878,0.3888,0.3888},
-{2980503,3904786,3905017,0.15912,0.1326},
-{2980504,3904592,3904786,0.153342857142857,0.134175},
-{2980505,3904592,3905109,0.4193,0.4792},
-{2980506,3904786,3905365,0.477327272727273,0.477327272727273},
-{2980507,3905365,3905624,0.24408,0.215364705882353},
-{2980508,3905109,3905365,0.218533333333333,0.24585},
-{2980509,3905109,3905846,0.824084210526316,0.6524},
-{2980510,3905365,3906253,0.559355555555555,0.559355555555555},
-{2980511,3902769,3903084,0.284525,0.206927272727273},
-{2980512,3905624,3906493,0.689045454545455,0.659086956521739},
-{2980513,3905878,3906736,0.562488888888889,0.562488888888889},
-{2980514,3902769,3902620,0.136866666666667,0.136866666666667},
-{2980515,3904701,3904447,0.21456,1000000},
-{2980516,3906091,3906419,0.28137,0.28137},
-{2980517,3906419,3906975,0.287435294117647,0.375876923076923},
-{2980518,3905846,3906253,0.258125,0.258125},
-{2980519,3906253,3906493,0.19155,0.182428571428571},
-{2980520,3906493,3906736,0.17094,0.1554},
-{2980521,3906736,3906975,0.14427,0.125452173913044},
-{2980522,3906419,3906831,0.29106,0.3234},
-{2980523,3906831,3907321,0.231715384615385,0.231715384615385},
-{2980524,3907321,3907808,0.291027272727273,0.32013},
-{2980525,3906831,3907290,0.254866666666667,0.254866666666667},
-{2980526,3907290,3907762,0.272844444444444,0.272844444444444},
-{2980527,3906975,3907293,0.170488888888889,0.1918},
-{2980528,3907293,3907762,0.212764285714286,0.170211428571429},
-{2980529,3907762,3908226,0.152194736842105,0.144585},
-{2980530,3908226,3908767,0.292963636363636,0.280226086956522},
-{2980531,3907321,3907751,0.247844444444444,0.247844444444444},
-{2980532,3907751,3908226,0.267622222222222,0.267622222222222},
-{2980533,3907290,3907751,0.29079,0.29079},
-{2980534,3907751,3908265,0.31866,0.31866},
-{2980535,3908767,3909397,0.477247058823529,0.368781818181818},
-{2980536,3909397,3910029,0.334275,0.334275},
-{2980537,3910029,3910276,0.105115384615385,0.0976071428571429},
-{2980538,3910276,3910831,0.296945454545455,0.296945454545455},
-{2980539,3910831,3911380,0.279,0.268269230769231},
-{2980540,3909397,3910187,0.597536842105263,0.37844},
-{2980541,3910276,3910907,0.338261538461539,0.351792},
-{2980542,3909790,3910333,0.257977777777778,0.257977777777778},
-{2980543,3906493,3906692,0.122222222222222,0.122222222222222},
-{2980544,3910187,3910714,0.256466666666667,0.256466666666667},
-{2980545,3910562,3911033,0.258222222222222,0.258222222222222},
-{2980546,3910831,3911436,0.308755555555556,0.308755555555556},
-{2980547,3911436,3911943,0.296034782608696,0.261876923076923},
-{2980548,3910907,3911436,0.270276923076923,0.260266666666667},
-{2980549,3911436,3912638,0.654096,0.743290909090909},
-{2980550,3912638,3912974,0.150644444444444,0.150644444444444},
-{2980551,3912974,3913190,0.09,0.09},
-{2980552,3909982,3910333,0.160704,0.211452631578947},
-{2980553,3910333,3910714,0.140883870967742,0.189886956521739},
-{2980554,3910714,3911033,0.155256,0.155256},
-{2980555,3911033,3911427,0.194333333333333,0.194333333333333},
-{2980556,3910333,3910666,0.2791125,0.2791125},
-{2980557,3910666,3911315,0.9278,0.9278},
-{2980558,3911033,3911315,0.21345,0.194045454545455},
-{2980629,3864585,3864396,0.155155555555556,0.155155555555556},
-{2980630,3864594,3864231,0.177377777777778,0.177377777777778},
-{2980631,3865062,3864585,0.205133333333333,0.205133333333333},
-{2980632,3864309,3864673,0.161866666666667,0.161866666666667},
-{2980635,3864446,3864673,0.410175,0.410175},
-{2980636,3864673,3864987,0.3094,0.3094},
-{2980637,3864987,3864828,0.1139625,0.0868285714285714},
-{2980638,3864716,3865369,0.580422222222222,0.580422222222222},
-{2980639,3865369,3864987,0.138864,0.11572},
-{2980640,3865676,3865369,0.127303448275862,0.108582352941176},
-{2980641,3865057,3865676,0.573444444444444,0.573444444444444},
-{2980642,3865452,3865748,0.510085714285714,0.510085714285714},
-{2980643,3865748,3866063,0.286288888888889,0.286288888888889},
-{2980646,3864780,3864585,0.148955555555556,0.148955555555556},
-{2980647,3865303,3864780,0.289642105263158,0.289642105263158},
-{2980648,3864432,3863274,1.09338260869565,1.09338260869565},
-{2980652,3865017,3864780,0.257905263157895,0.257905263157895},
-{2980653,3865893,3866477,0.6927,0.6927},
-{2980654,3866477,3866063,0.1593,0.147046153846154},
-{2980655,3866992,3866477,0.247392857142857,0.314863636363636},
-{2980656,3866431,3866992,0.474266666666667,0.474266666666667},
-{2980657,3867898,3868473,0.200444444444444,0.200444444444444},
-{2980658,3868627,3868049,0.217844444444444,0.217844444444444},
-{2980659,3869661,3869266,0.130866666666667,0.130866666666667},
-{2980660,3868580,3868708,0.178914285714286,0.221011764705882},
-{2980661,3868708,3869202,0.174377777777778,0.174377777777778},
-{2980662,3869187,3869841,0.218644444444444,0.218644444444444},
-{2980663,3869429,3868852,0.216266666666667,0.216266666666667},
-{2980664,3869661,3869596,0.16935,0.176713043478261},
-{2980665,3869841,3869661,0.27718064516129,0.343704},
-{2980666,3869969,3869841,0.233822222222222,0.286963636363636},
-{2980667,3867591,3866992,0.27588,0.2299},
-{2980668,3868049,3867591,0.2457,0.258631578947368},
-{2980669,3872699,3869193,2.17257777777778,2.17257777777778},
-{2980670,3878283,3877685,0.493728,0.474738461538462},
-{2980671,3879032,3878283,0.400584,0.357664285714286},
-{2980672,3880076,3879032,0.416016666666667,0.49922},
-{2980673,3877685,3877353,0.37476,0.37476},
-{2980674,3878082,3877896,0.219022222222222,0.219022222222222},
-{2980675,3877620,3877353,0.14406,0.14406},
-{2980676,3877856,3877620,0.0807483870967742,0.0807483870967742},
-{2980677,3878312,3877856,0.182955555555556,0.182955555555556},
-{2980678,3879475,3878312,0.538176923076923,0.736452631578947},
-{2980679,3877620,3877550,0.138466666666667,0.138466666666667},
-{2980680,3877856,3877693,0.152333333333333,0.152333333333333},
-{2980681,3878312,3878192,0.175075,0.175075},
-{2980682,3877693,3877550,0.0662444444444445,0.0662444444444445},
-{2980683,3878192,3877693,0.1854,0.1854},
-{2980684,3881954,3881909,0.0405130434782609,0.0517666666666667},
-{2980685,3881954,3882323,0.60498,0.60498},
-{2980686,3882278,3882323,0.0882923076923077,0.0882923076923077},
-{2980687,3882323,3882949,0.99198,0.99198},
-{2980688,3882949,3883251,0.19089,0.224576470588235},
-{2980689,3882949,3883425,0.777866666666667,0.777866666666667},
-{2980690,3883290,3883425,0.136833333333333,0.136833333333333},
-{2980691,3883425,3883548,0.0789333333333333,0.0789333333333333},
-{2980692,3882310,3882999,0.568066666666667,0.568066666666667},
-{2980693,3882323,3882999,0.561458823529412,1000000},
-{2980694,3883041,3883548,0.305755555555556,1000000},
-{2980695,3883548,3883871,0.2655,1000000},
-{2980696,3883290,3883594,0.167733333333333,0.167733333333333},
-{2980697,3883594,3883857,0.202729411764706,0.181389473684211},
-{2980698,3883594,3883468,0.140357142857143,0.1228125},
-{2980699,3884104,3883871,0.174884210526316,0.174884210526316},
-{2980700,3884104,3883857,0.21012,0.21012},
-{2980701,3884104,3884431,0.29115,0.29115},
-{2980702,3881874,3881690,0.144085714285714,0.1681},
-{2980703,3881690,3881538,0.0741157894736842,0.0741157894736842},
-{2980704,3881538,3881401,0.0797833333333333,0.0755842105263158},
-{2980705,3881401,3881282,0.10595,0.0941777777777778},
-{2980706,3881108,3880571,0.27658125,0.2682},
-{2980707,3881308,3881108,0.122606896551724,0.142224},
-{2980708,3881467,3881108,0.192933333333333,0.192933333333333},
-{2980709,3881643,3881467,0.1452,0.122861538461538},
-{2980710,3881643,3881802,0.09225,0.0952258064516129},
-{2980711,3881802,3881921,0.09163125,0.0888545454545454},
-{2980712,3881921,3882078,0.156657142857143,0.143034782608696},
-{2980713,3881401,3881643,1000000,1000000},
-{2980714,3881538,3881802,1000000,1000000},
-{2980715,3881690,3881921,1000000,1000000},
-{2980716,3882278,3881755,0.562325,0.562325},
-{2980717,3880751,3881051,0.152,0.152},
-{2980718,3882691,3882391,0.21963,0.244033333333333},
-{2980719,3882391,3882177,0.1474,0.1474},
-{2980720,3881708,3881946,0.111555555555556,0.111555555555556},
-{2980721,3882037,3882331,0.183311111111111,0.183311111111111},
-{2980722,3882177,3882331,0.0992666666666667,0.0992666666666667},
-{2980723,3882331,3883298,0.5278,0.5278},
-{2980724,3882391,3883663,0.65288275862069,0.65288275862069},
-{2980725,3883857,3884167,0.340569230769231,0.260435294117647},
-{2980726,3880605,3880751,1000000,0.225288},
-{2980727,3880916,3880605,1000000,0.44652},
-{2980728,3881174,3881346,1000000,0.139066666666667},
-{2980729,3882269,3881406,0.466666666666667,0.466666666666667},
-{2980730,3882504,3881675,0.471444444444444,0.471444444444444},
-{2980731,3884547,3883871,0.402955555555556,0.402955555555556},
-{2980732,3885210,3884547,0.348733333333333,1000000},
-{2980733,3884412,3884104,0.222975,0.254828571428571},
-{2980734,3884693,3884412,0.293166666666667,0.293166666666667},
-{2980735,3884693,3884547,0.1468,0.1468},
-{2980736,3884779,3884693,0.05805,0.0546352941176471},
-{2980737,3885044,3884779,0.161930769230769,0.161930769230769},
-{2980738,3885210,3885044,0.09274,0.09274},
-{2980739,3885337,3885210,0.0863368421052632,0.0863368421052632},
-{2980740,3884412,3884767,0.181577777777778,0.181577777777778},
-{2980741,3884779,3885082,0.249494117647059,0.249494117647059},
-{2980742,3885044,3885348,0.149822222222222,0.149822222222222},
-{2980743,3885337,3885619,0.26484,0.209084210526316},
-{2980744,3885791,3886110,0.154555555555556,0.154555555555556},
-{2980745,3885348,3885628,0.180365217391304,0.180365217391304},
-{2980746,3885915,3885619,0.153933333333333,0.153933333333333},
-{2980747,3885861,3885628,0.18078,0.18078},
-{2980748,3885915,3885861,0.0335555555555556,0.0335555555555556},
-{2980749,3886110,3885915,0.106733333333333,0.106733333333333},
-{2980750,3885628,3886328,0.334634482758621,0.334634482758621},
-{2980751,3886110,3886729,0.357488888888889,0.357488888888889},
-{2980752,3885861,3886531,0.353555555555556,0.353555555555556},
-{2980753,3884847,3885808,0.505577777777778,0.505577777777778},
-{2980754,3887550,3887263,0.196333333333333,0.160636363636364},
-{2980755,3887263,3886973,0.246075,0.218733333333333},
-{2980756,3887877,3888888,0.62598,0.62598},
-{2980757,3887550,3888607,0.65766,0.65766},
-{2980758,3888567,3888970,0.40203,0.40203},
-{2980759,3886973,3886729,0.252141176470588,0.28576},
-{2980760,3886729,3886531,0.1997,0.211447058823529},
-{2980761,3886531,3886328,0.215533333333333,0.19398},
-{2980762,3886328,3886104,0.2144,0.227011764705882},
-{2980763,3886104,3885808,0.247164705882353,0.221147368421053},
-{2980764,3885808,3885573,0.221766666666667,0.17355652173913},
-{2980765,3885573,3885312,0.237866666666667,0.18615652173913},
-{2980766,3886729,3887761,0.555992307692308,0.555992307692308},
-{2980767,3886531,3887488,0.534444444444444,0.534444444444444},
-{2980768,3886328,3887262,0.542066666666667,0.542066666666667},
-{2980769,3887263,3888367,0.68838,0.68838},
-{2980770,3888970,3888674,0.15336,0.15336},
-{2980771,3888160,3889128,0.6219,0.6219},
-{2980772,3885808,3886804,0.535333333333333,0.535333333333333},
-{2980773,3884576,3885573,0.505311111111111,0.505311111111111},
-{2980774,3885573,3886547,0.519288888888889,0.519288888888889},
-{2980775,3884324,3885312,0.570675,0.570675},
-{2980776,3885312,3885024,0.307,0.2878125},
-{2980777,3889065,3889208,0.141094736842105,0.141094736842105},
-{2980778,3889208,3889332,0.4098,0.4098},
-{2980779,3889332,3888970,0.196848,0.189276923076923},
-{2980780,3888970,3889301,0.357777777777778,0.357777777777778},
-{2980781,3889332,3889785,0.314918181818182,0.2566},
-{2980782,3889785,3889746,0.278172413793103,0.2689},
-{2980783,3888870,3887729,0.507555555555556,0.507555555555556},
-{2980784,3889207,3888008,0.539244444444444,0.539244444444444},
-{2980785,3887729,3888008,0.160622222222222,0.160622222222222},
-{2980786,3888008,3888273,0.149488888888889,0.149488888888889},
-{2980787,3890047,3889785,0.108329032258065,0.10494375},
-{2980788,3885312,3885908,0.301511111111111,0.301511111111111},
-{2980789,3887729,3887262,0.263422222222222,0.263422222222222},
-{2980790,3887729,3887505,0.102066666666667,0.102066666666667},
-{2980791,3884675,3884447,0.198628571428571,0.245364705882353},
-{2980792,3889208,3890329,0.621266666666667,0.621266666666667},
-{2980793,3890329,3890047,0.134866666666667,0.13005},
-{2980794,3889378,3889922,0.246222222222222,0.3324},
-{2980795,3889922,3890423,0.45124,0.45124},
-{2980796,3890261,3890423,0.34086,0.34086},
-{2980797,3890423,3890926,0.450852631578947,0.450852631578947},
-{2980798,3890906,3890926,0.0318631578947368,0.0356117647058823},
-{2980799,3890926,3891539,0.448,0.4032},
-{2980800,3890953,3891405,0.299622222222222,0.299622222222222},
-{2980801,3891405,3891638,0.372044444444444,0.372044444444444},
-{2980802,3891405,3891539,0.149742857142857,0.149742857142857},
-{2980803,3891539,3891803,0.239329411764706,0.226033333333333},
-{2980804,3891803,3892178,0.411933333333333,0.411933333333333},
-{2980805,3891392,3891984,0.463389473684211,0.463389473684211},
-{2980806,3891803,3891984,0.2085,0.2085},
-{2980807,3891984,3892505,0.33207,0.33207},
-{2980808,3891627,3892509,0.58281,0.58281},
-{2980809,3892352,3892566,0.348711111111111,0.348711111111111},
-{2980810,3892505,3892667,0.2532,0.2532},
-{2980811,3892509,3892505,0.18579,0.18579},
-{2980812,3892373,3892509,0.23379,0.23379},
-{2980813,3892103,3892347,0.189,0.2016},
-{2980814,3890675,3890618,0.113955555555556,0.123072},
-{2980815,3890618,3890329,0.2186,0.2049375},
-{2980816,3890618,3891264,0.6429,0.6429},
-{2980817,3891627,3891264,0.32613,0.32613},
-{2980818,3890047,3890378,1000000,0.307133333333333},
-{2980819,3890378,3889902,0.601753846153846,0.601753846153846},
-{2980820,3890499,3890378,0.0650888888888889,0.0650888888888889},
-{2980821,3890329,3890602,0.18976,0.271085714285714},
-{2980822,3890499,3890602,0.1417,0.1417},
-{2980823,3891264,3890602,0.360888888888889,0.360888888888889},
-{2980824,3891264,3891908,0.49728,0.49728},
-{2980825,3892667,3892747,0.235694117647059,0.235694117647059},
-{2980826,3892373,3892747,0.22806,0.22806},
-{2980827,3892390,3892373,0.1552,0.1552},
-{2980828,3892347,3892390,0.1434,0.0882461538461538},
-{2980829,3892390,3893062,0.4749375,0.4749375},
-{2980830,3892684,3892667,0.622305882352941,0.622305882352941},
-{2980831,3892747,3893062,0.336814285714286,0.336814285714286},
-{2980832,3892347,3893047,0.359444444444444,0.359444444444444},
-{2980833,3893062,3893333,0.234141176470588,0.209494736842105},
-{2980834,3892340,3891908,0.359936842105263,0.325657142857143},
-{2980835,3890499,3891399,0.49731724137931,0.49731724137931},
-{2980836,3891399,3891505,0.0856153846153846,0.101181818181818},
-{2980837,3891908,3891505,0.292009090909091,0.4015125},
-{2980838,3891958,3891505,0.29361,0.29361},
-{2980839,3892111,3891958,0.16988,0.21235},
-{2980840,3891908,3892052,0.194964705882353,0.194964705882353},
-{2980841,3892052,3892111,0.0876,0.08322},
-{2980842,3892111,3892187,0.051936,0.0590181818181818},
-{2980843,3892532,3892052,0.304425,0.4566375},
-{2980844,3892712,3892187,0.243222222222222,0.243222222222222},
-{2980845,3893062,3893047,0.38769,0.38769},
-{2980846,3893047,3893166,0.203177777777778,0.203177777777778},
-{2980847,3893333,3893662,0.74484,0.74484},
-{2980848,3889356,3889955,0.64941,0.683589473684211},
-{2980849,3893334,3894063,0.4344,0.4344},
-{2980850,3894063,3894293,0.1234,0.1234},
-{2980851,3894293,3894601,0.152266666666667,0.152266666666667},
-{2980852,3894601,3894712,0.235357894736842,0.235357894736842},
-{2980853,3894063,3894214,0.35175,0.35175},
-{2980854,3894293,3894921,0.6165,0.6165},
-{2980855,3894601,3894921,0.410866666666667,0.410866666666667},
-{2980856,3894921,3895046,0.303266666666667,0.303266666666667},
-{2980857,3893604,3894327,1.17912,1.17912},
-{2980858,3893333,3893927,0.491514285714286,0.34406},
-{2980859,3893927,3894003,0.0826235294117647,0.0520222222222222},
-{2980860,3894003,3893867,0.285023076923077,0.308775},
-{2980861,3894003,3894122,0.18148,0.18148},
-{2980862,3894300,3894331,0.0300444444444444,0.0300444444444444},
-{2980863,3894331,3894570,0.131111111111111,0.131111111111111},
-{2980864,3894570,3895094,0.415955555555556,0.415955555555556},
-{2980865,3894003,3894367,0.220090909090909,0.1614},
-{2980866,3894327,3894367,0.0558,0.0558},
-{2980867,3894367,3894461,0.0372666666666667,0.0432774193548387},
-{2980868,3894461,3895069,0.241145454545455,0.24868125},
-{2980869,3894461,3895242,0.92841,0.92841},
-{2980870,3895444,3895698,0.29019,0.29019},
-{2980871,3892712,3893369,0.334153846153846,0.413714285714286},
-{2980872,3893369,3893933,0.41127,0.41127},
-{2980873,3893369,3893537,0.192763636363636,0.2232},
-{2980874,3893537,3893710,0.25152,0.25152},
-{2980875,3893537,3893933,0.303190909090909,0.370566666666667},
-{2980876,3893933,3894234,0.43041,0.43041},
-{2980877,3893710,3894234,0.37464,0.37464},
-{2980878,3894754,3895094,0.224945454545455,0.215165217391304},
-{2980879,3895094,3895242,0.117652173913043,0.159176470588235},
-{2980880,3895242,3895490,0.170342857142857,0.170342857142857},
-{2980881,3902550,3902769,0.184636363636364,0.131032258064516},
-{2980882,3902335,3902550,0.124577777777778,0.124577777777778},
-{2980883,3902335,3902172,0.0888888888888889,0.0888888888888889},
-{2980884,3902172,3902592,0.28236,0.28236},
-{2980885,3903339,3904068,0.316377777777778,0.316377777777778},
-{2980886,3901961,3902035,0.0426444444444445,0.0426444444444445},
-{2980887,3901827,3901961,0.0679333333333333,0.0679333333333333},
-{2980888,3901718,3901827,0.0965714285714286,0.0965714285714286},
-{2980889,3901827,3902085,0.264286956521739,0.264286956521739},
-{2980890,3902085,3902132,0.08728125,0.08728125},
-{2980891,3902132,3902185,0.0824666666666667,0.0824666666666667},
-{2980892,3902085,3902642,0.211733333333333,0.211733333333333},
-{2980893,3902132,3902943,0.308755555555556,0.308755555555556},
-{2980894,3902185,3903112,0.362688888888889,0.362688888888889},
-{2980895,3902550,3902314,0.153044444444444,0.153044444444444},
-{2980896,3902335,3902028,0.169266666666667,0.169266666666667},
-{2980897,3901827,3901428,0.238622222222222,0.238622222222222},
-{2980898,3901718,3901851,0.178,0.178},
-{2980899,3901144,3901718,0.317169230769231,0.317169230769231},
-{2980900,3901088,3901144,0.232844444444444,0.232844444444444},
-{2980901,3901961,3902118,0.0870666666666667,0.0870666666666667},
-{2980902,3901144,3901222,1000000,0.281110344827586},
-{2980903,3902185,3902217,0.115755555555556,0.1953375},
-{2980904,3901222,3902217,0.555252631578947,0.555252631578947},
-{2980905,3902217,3903192,0.387088888888889,0.387088888888889},
-{2980906,3902217,3902254,0.120975,0.223338461538462},
-{2980907,3902254,3902290,0.128225,0.146542857142857},
-{2980908,3901334,3902290,0.471409090909091,0.471409090909091},
-{2980909,3902254,3903237,0.387888888888889,0.387888888888889},
-{2980910,3902290,3903274,0.3862,0.3862},
-{2980911,3903192,3903237,0.215861538461538,0.215861538461538},
-{2980912,3903237,3903274,0.107133333333333,0.107133333333333},
-{2980913,3903516,3904135,0.251466666666667,0.251466666666667},
-{2980914,3903687,3904181,0.191755555555556,0.191755555555556},
-{2980915,3904135,3905325,0.69786,0.69786},
-{2980916,3904181,3905336,0.504911111111111,1000000},
-{2980917,3904257,3905041,1000000,0.503633333333333},
-{2980918,3905325,3905471,0.16023,0.16023},
-{2980919,3904297,3904776,0.29088,0.252939130434783},
-{2980920,3904348,3904972,0.272630769230769,0.272630769230769},
-{2980921,3904972,3905172,0.18438,0.127158620689655},
-{2980922,3904776,3904972,0.143975,0.111464516129032},
-{2980923,3904776,3905041,0.18723,0.197084210526316},
-{2980924,3905041,3905336,0.175938461538462,0.22872},
-{2980925,3905336,3905471,0.109275,0.102847058823529},
-{2980926,3911650,3911909,0.21345,0.224684210526316},
-{2980927,3911909,3912211,0.161330769230769,0.161330769230769},
-{2980928,3912211,3912539,0.1368,0.1368},
-{2980929,3912539,3912896,0.122172972972973,0.122172972972973},
-{2980930,3911355,3911909,0.30715,0.567046153846154},
-{2980931,3912211,3912771,0.229422222222222,0.229422222222222},
-{2980932,3912539,3913158,0.242666666666667,0.242666666666667},
-{2980933,3912896,3913478,0.306490909090909,1000000},
-{2980934,3911799,3912138,0.21453,0.252388235294118},
-{2980935,3912138,3912896,0.338136,0.469633333333333},
-{2981027,3875889,3874945,0.612327272727273,0.612327272727273},
-{2981028,3877550,3877469,0.163244444444444,0.163244444444444},
-{2981029,3877556,3877469,0.0391111111111111,0.0391111111111111},
-{2981030,3877693,3877556,0.160777777777778,0.160777777777778},
-{2981031,3877469,3877463,0.175888888888889,0.175888888888889},
-{2981032,3877556,3877463,0.153377777777778,0.153377777777778},
-{2981033,3878036,3877556,0.185622222222222,0.185622222222222},
-{2981034,3877889,3877463,0.165822222222222,0.165822222222222},
-{2981035,3879321,3878192,0.501733333333333,0.501733333333333},
-{2981036,3879198,3878036,0.504688888888889,0.504688888888889},
-{2981037,3879052,3877889,0.505733333333333,0.505733333333333},
-{2981038,3878192,3878036,0.159911111111111,0.159911111111111},
-{2981039,3878036,3877889,0.13194375,0.13194375},
-{2981040,3877463,3877778,0.233133333333333,0.233133333333333},
-{2981041,3877889,3877778,0.127083870967742,0.127083870967742},
-{2981042,3878921,3877778,0.494511111111111,0.494511111111111},
-{2981043,3877778,3877671,0.149420689655172,0.149420689655172},
-{2981044,3877671,3877519,0.162066666666667,0.162066666666667},
-{2981045,3877519,3877246,0.227844444444444,0.227844444444444},
-{2981046,3878805,3877671,1.8702,1.8702},
-{2981047,3878462,3877519,0.401584615384615,0.336812903225806},
-{2981048,3878683,3878462,0.118142857142857,0.12405},
-{2981049,3878462,3878354,0.125,0.125},
-{2981050,3878354,3878215,0.176044444444444,0.176044444444444},
-{2981051,3878215,3878221,0.4772,0.4772},
-{2981052,3878221,3878354,0.0658,0.0658},
-{2981053,3877246,3877032,0.232111111111111,0.232111111111111},
-{2981054,3877032,3878197,0.458933333333333,0.458933333333333},
-{2981055,3878215,3878197,0.237822222222222,0.237822222222222},
-{2981056,3880605,3880159,0.601536,1000000},
-{2981057,3878821,3879179,0.19587,0.178063636363636},
-{2981058,3879179,3879866,0.267411428571429,0.275276470588235},
-{2981059,3879856,3879861,0.35496,0.35496},
-{2981060,3879856,3879630,0.243977777777778,0.243977777777778},
-{2981061,3880168,3879856,0.164721428571429,0.170822222222222},
-{2981062,3879630,3879965,0.190377777777778,0.190377777777778},
-{2981063,3879965,3880168,0.223288888888889,0.223288888888889},
-{2981064,3881537,3881138,0.52215,1000000},
-{2981065,3880718,3881464,0.627085714285714,0.598581818181818},
-{2981066,3881343,3880929,0.208133333333333,0.208133333333333},
-{2981067,3882277,3881944,0.58296,1000000},
-{2981068,3881511,3881944,1000000,0.279463636363636},
-{2981069,3880301,3880168,0.075875,0.0700384615384615},
-{2981070,3880417,3880476,0.0834,0.0834},
-{2981071,3880417,3880701,0.144377777777778,0.144377777777778},
-{2981072,3880476,3880578,0.170022222222222,0.170022222222222},
-{2981073,3882474,3883306,0.428133333333333,0.428133333333333},
-{2981074,3883555,3882194,0.680644444444444,0.680644444444444},
-{2981075,3883663,3884134,0.2418,0.2325},
-{2981076,3884134,3884447,0.196036363636364,0.1797},
-{2981077,3884134,3883306,0.527928,0.43994},
-{2981078,3884447,3883555,0.740052631578947,0.740052631578947},
-{2981079,3884108,3884663,0.352911111111111,0.352911111111111},
-{2981080,3880706,3880396,0.393066666666667,0.393066666666667},
-{2981081,3884949,3885827,1000000,0.447311111111111},
-{2981082,3885827,3886433,0.316955555555556,0.316955555555556},
-{2981083,3884819,3885655,1000000,0.435488888888889},
-{2981084,3886260,3885655,0.308311111111111,0.308311111111111},
-{2981085,3885655,3884886,1.01787,1000000},
-{2981086,3886260,3886284,0.19488,0.19488},
-{2981087,3886284,3885815,0.288725,0.288725},
-{2981088,3887025,3886284,0.445977777777778,0.445977777777778},
-{2981089,3887025,3887161,0.082776,0.082776},
-{2981090,3887367,3887161,0.1731,0.1731},
-{2981091,3887446,3887367,0.0632727272727273,0.0632727272727273},
-{2981092,3888172,3887367,0.371022222222222,0.371022222222222},
-{2981093,3887161,3888012,0.379777777777778,0.379777777777778},
-{2981094,3888172,3888012,0.166457142857143,0.15536},
-{2981095,3886804,3887070,0.245033333333333,0.245033333333333},
-{2981096,3887070,3887381,0.244733333333333,0.244733333333333},
-{2981097,3887662,3887381,0.146888888888889,0.146888888888889},
-{2981098,3887381,3887320,0.0905571428571429,0.0905571428571429},
-{2981099,3887070,3886631,0.41049,0.41049},
-{2981100,3886308,3886631,0.26556,0.26556},
-{2981101,3886631,3886912,0.22194,0.22194},
-{2981102,3886912,3886634,0.267757894736842,0.25437},
-{2981103,3887320,3886912,0.412552941176471,0.412552941176471},
-{2981104,3885827,3885655,0.164333333333333,0.164333333333333},
-{2981105,3885959,3885827,0.084825,0.084825},
-{2981106,3886912,3887324,0.225644444444444,0.225644444444444},
-{2981107,3887320,3887696,0.235577777777778,0.235577777777778},
-{2981108,3887324,3887696,0.27303,0.27303},
-{2981109,3887324,3887501,0.0916,0.0916},
-{2981110,3887696,3887843,0.1284,0.1284},
-{2981111,3887501,3888090,0.345844444444444,0.345844444444444},
-{2981112,3888144,3888688,0.425192307692308,0.614166666666667},
-{2981113,3887849,3888090,0.184870588235294,0.196425},
-{2981114,3888090,3888519,0.255177777777778,0.255177777777778},
-{2981115,3889074,3888493,0.29445,1000000},
-{2981116,3889605,3889074,0.301609090909091,1000000},
-{2981117,3889074,3889771,0.510096,0.510096},
-{2981118,3888688,3889130,1000000,0.161222222222222},
-{2981119,3888688,3888911,0.400581818181818,0.400581818181818},
-{2981120,3888911,3889425,0.44958,0.44958},
-{2981121,3889113,3889425,0.226957894736842,0.21561},
-{2981122,3888252,3888172,0.0828,0.100542857142857},
-{2981123,3888172,3888863,0.3374,0.3374},
-{2981124,3890083,3889771,0.3896625,0.3896625},
-{2981125,3889771,3890151,0.299975,0.299975},
-{2981126,3890151,3889969,0.123469565217391,0.123469565217391},
-{2981127,3890525,3890151,0.292933333333333,0.277515789473684},
-{2981128,3890758,3890215,0.3894,0.3894},
-{2981129,3889969,3890215,0.163157142857143,0.163157142857143},
-{2981130,3890215,3890426,0.151848,0.12654},
-{2981131,3890450,3890191,0.120992307692308,0.131075},
-{2981132,3890426,3890450,0.0750818181818182,0.0750818181818182},
-{2981133,3890942,3890426,0.304125,0.317347826086957},
-{2981134,3891194,3890450,0.358536,0.320121428571429},
-{2981135,3889425,3889850,0.236208,0.236208},
-{2981136,3888012,3888081,0.0774,0.0663428571428571},
-{2981137,3888081,3886872,1000000,1.78789090909091},
-{2981138,3888081,3889174,1.29556363636364,1000000},
-{2981139,3889955,3889658,0.2421,0.2421},
-{2981140,3890168,3889955,0.104888888888889,0.104888888888889},
-{2981141,3890490,3890168,0.27192,0.27192},
-{2981142,3889955,3890323,0.326975,0.326975},
-{2981143,3890168,3890511,0.275377777777778,0.275377777777778},
-{2981144,3890511,3890323,0.154058823529412,0.154058823529412},
-{2981145,3890735,3890511,0.19275,0.19275},
-{2981146,3890323,3890535,0.214057142857143,0.214057142857143},
-{2981147,3890944,3890535,0.213422222222222,0.213422222222222},
-{2981148,3890535,3890846,0.247155555555556,0.247155555555556},
-{2981149,3890846,3890525,0.152284615384615,0.152284615384615},
-{2981150,3890745,3890703,0.16698,0.16698},
-{2981151,3890703,3890735,0.189688888888889,0.189688888888889},
-{2981152,3890735,3890944,0.165288888888889,0.165288888888889},
-{2981153,3890703,3891243,0.36795,0.36795},
-{2981154,3890944,3891474,0.42336,0.42336},
-{2981155,3891135,3890846,0.114617647058824,0.114617647058824},
-{2981156,3891474,3891135,0.167664,0.161215384615385},
-{2981157,3891474,3891558,0.0793411764705882,0.0642285714285714},
-{2981158,3890846,3891293,0.4662,0.4662},
-{2981159,3891293,3890998,0.299538461538462,0.299538461538462},
-{2981160,3891565,3891293,0.1392,0.1392},
-{2981161,3891135,3891565,0.44496,0.44496},
-{2981162,3891505,3891525,0.83181,0.83181},
-{2981163,3891958,3892234,0.5122,0.5122},
-{2981164,3892187,3892835,0.586661538461538,0.586661538461538},
-{2981165,3891965,3891584,0.3155625,0.3155625},
-{2981166,3892234,3891965,0.237141176470588,0.237141176470588},
-{2981167,3892123,3891632,0.34725,0.34725},
-{2981168,3892835,3892234,0.34395,0.34395},
-{2981169,3891965,3892123,0.16008,0.16008},
-{2981170,3892257,3892123,0.09057,0.09057},
-{2981171,3892445,3892257,0.12102,0.12102},
-{2981172,3892234,3892445,0.1324,0.1324},
-{2981173,3892445,3892801,0.1932,0.1932},
-{2981174,3892835,3893095,0.234763636363636,0.234763636363636},
-{2981175,3892123,3892252,0.259577777777778,0.259577777777778},
-{2981176,3892252,3891888,0.25137,0.25137},
-{2981177,3893095,3892801,0.150577777777778,0.150577777777778},
-{2981178,3892252,3892418,0.122755555555556,0.122755555555556},
-{2981179,3891399,3891085,1000000,1000000},
-{2981180,3892257,3892582,0.69906,0.69906},
-{2981181,3892418,3891945,0.33414,0.33414},
-{2981182,3891293,3891779,0.3916,0.3916},
-{2981183,3892418,3892582,0.110422222222222,0.110422222222222},
-{2981184,3892582,3892822,0.133533333333333,0.133533333333333},
-{2981185,3892801,3893108,0.356533333333333,0.356533333333333},
-{2981186,3893095,3893187,0.49929,0.49929},
-{2981187,3893108,3893187,0.09366,0.09366},
-{2981188,3893187,3893373,0.127714285714286,0.127714285714286},
-{2981189,3893435,3893095,0.239345454545455,0.239345454545455},
-{2981190,3893710,3893772,0.13122,0.13122},
-{2981191,3894085,3894234,0.299463157894737,0.299463157894737},
-{2981192,3894234,3894970,0.53982,0.53982},
-{2981193,3893435,3894145,0.381774193548387,0.408103448275862},
-{2981194,3895094,3895454,0.45435,0.45435},
-{2981195,3895454,3895572,0.14526,0.14526},
-{2981196,3895454,3895786,0.31584,0.31584},
-{2981197,3895572,3895888,0.291821052631579,0.291821052631579},
-{2981198,3893399,3893679,0.2079,0.2079},
-{2981199,3893679,3893935,0.19494,0.19494},
-{2981200,3893935,3894174,0.16815,0.16815},
-{2981201,3893679,3893653,0.28707,0.28707},
-{2981202,3893373,3893653,0.155676923076923,0.16865},
-{2981203,3894174,3894145,0.162571428571429,0.155181818181818},
-{2981204,3894145,3894379,0.156533333333333,0.156533333333333},
-{2981205,3894727,3895203,0.49419,0.49419},
-{2981206,3895203,3895261,0.10122,0.10122},
-{2981207,3893368,3893755,0.266057142857143,0.266057142857143},
-{2981208,3893935,3893909,1000000,0.215133333333333},
-{2981209,3894174,3894659,0.386918181818182,0.370095652173913},
-{2981210,3893909,3894481,0.244072727272727,0.244072727272727},
-{2981211,3894481,3894659,0.158936842105263,0.131295652173913},
-{2981212,3894659,3894925,0.223688888888889,0.20132},
-{2981213,3895203,3895501,0.295911111111111,0.295911111111111},
-{2981214,3893653,3893743,0.0471103448275862,0.03795},
-{2981215,3893743,3893909,0.0755117647058823,0.0626195121951219},
-{2981216,3893743,3893755,0.192644444444444,0.192644444444444},
-{2981217,3893755,3894000,0.20889,0.20889},
-{2981218,3898563,3898919,0.21816,0.21816},
-{2981219,3897994,3897839,0.08292,0.08292},
-{2981220,3899716,3900153,0.224008695652174,0.224008695652174},
-{2981221,3900291,3899746,0.293444444444444,0.293444444444444},
-{2981222,3900153,3900291,0.0809181818181818,0.0659333333333333},
-{2981223,3900605,3901283,0.323625,0.298730769230769},
-{2981224,3900605,3900629,0.647533333333333,0.647533333333333},
-{2981225,3900629,3900647,0.134777777777778,0.134777777777778},
-{2981226,3900629,3900932,1000000,1000000},
-{2981227,3899396,3899716,0.146666666666667,0.146666666666667},
-{2981228,3899396,3899636,0.199444444444444,0.199444444444444},
-{2981229,3899716,3899999,0.278288888888889,0.278288888888889},
-{2981230,3900153,3900198,0.3146,0.3146},
-{2981231,3900932,3900979,0.0612,0.0612},
-{2981232,3900979,3900978,0.0859411764705882,0.0503793103448276},
-{2981233,3900979,3901516,0.355588235294118,0.318157894736842},
-{2981234,3900613,3900605,0.212022222222222,0.212022222222222},
-{2981235,3900855,3900932,0.316155555555556,0.316155555555556},
-{2981236,3900245,3898563,3.02883157894737,2.61580909090909},
-{2981237,3902290,3902323,0.113072727272727,0.113072727272727},
-{2981238,3902323,3902357,0.138208695652174,0.151371428571429},
-{2981239,3902357,3902378,0.106875,0.0855},
-{2981240,3903274,3903302,0.136772727272727,0.136772727272727},
-{2981241,3903302,3903345,0.0977793103448276,0.0977793103448276},
-{2981242,3903345,3903390,0.311541176470588,0.311541176470588},
-{2981243,3902323,3903302,0.384844444444444,0.384844444444444},
-{2981244,3902357,3903345,0.387955555555556,0.387955555555556},
-{2981245,3903345,3903815,0.211266666666667,0.211266666666667},
-{2981246,3902515,3902809,0.70505,0.70505},
-{2981247,3902804,3903062,0.554333333333333,0.554333333333333},
-{2981248,3903047,3903293,0.486977777777778,0.486977777777778},
-{2981249,3903989,3904253,0.193581818181818,1000000},
-{2981250,3903588,3904231,0.2626,0.2626},
-{2981251,3902809,3903386,0.792445161290323,0.792445161290323},
-{2981252,3903202,3903984,0.714,0.714},
-{2981253,3904253,3905012,0.429137142857143,1000000},
-{2981254,3905471,3906538,1.10127,1.10127},
-{2981255,3901334,3901368,1000000,0.174},
-{2981256,3901368,3901657,1000000,1.26353333333333},
-{2981257,3901657,3902098,1000000,0.79888},
-{2981258,3905653,3905811,0.44952,0.44952},
-{2981259,3909494,3911280,0.521909090909091,0.521909090909091},
-{2981304,3863556,3863888,0.404,0.440727272727273},
-{2981305,3863888,3866912,1.33095555555556,1.33095555555556},
-{2981307,3874945,3874356,0.394236363636364,0.394236363636364},
-{2981308,3877032,3876213,0.589355555555556,0.589355555555556},
-{2981309,3878197,3878004,0.443311111111111,0.443311111111111},
-{2981310,3886465,3885404,0.463644444444444,0.463644444444444},
-{2981311,3884205,3885404,0.755066666666667,0.755066666666667},
-{2981312,3891140,3891542,0.528933333333333,0.528933333333333},
-{2981313,3891779,3892133,0.66849,0.66849},
-{2981314,3891966,3891342,0.301555555555556,1000000},
-{2981315,3892133,3892481,0.48366,0.48366},
-{2981316,3891917,3891637,0.141688888888889,0.141688888888889},
-{2981317,3892196,3891917,0.185113043478261,0.185113043478261},
-{2981318,3892481,3892196,0.20619,0.242576470588235},
-{2981319,3892414,3892848,0.396022222222222,0.396022222222222},
-{2981320,3892481,3892688,0.10925,0.145666666666667},
-{2981321,3892848,3892688,0.0886333333333333,0.0886333333333333},
-{2981322,3893075,3892848,0.158652631578947,0.131060869565217},
-{2981323,3892462,3892962,0.329044444444444,0.329044444444444},
-{2981324,3892651,3892962,0.398177777777778,0.398177777777778},
-{2981325,3892962,3892657,0.221223529411765,0.18804},
-{2981326,3892962,3893243,0.269895652173913,0.31038},
-{2981327,3893639,3893243,0.409554545454545,0.360408},
-{2981328,3893243,3893344,0.0610615384615385,0.06615},
-{2981329,3893344,3893685,0.41889,0.41889},
-{2981330,3893685,3893303,0.275514285714286,0.275514285714286},
-{2981331,3892481,3893186,0.618444444444444,0.618444444444444},
-{2981332,3891917,3892546,0.607466666666667,0.607466666666667},
-{2981333,3893781,3894000,0.29193,0.29193},
-{2981334,3894000,3894450,0.3822,0.3822},
-{2981335,3894096,3893344,0.375496551724138,0.388907142857143},
-{2981336,3894095,3894456,0.468272727272727,0.468272727272727},
-{2981337,3894481,3894747,0.46056,0.46056},
-{2981338,3894450,3894456,0.40416,0.40416},
-{2981339,3894450,3894747,0.19839,0.19839},
-{2981340,3894747,3895043,0.19512,0.19512},
-{2981341,3895043,3895247,0.14928,0.14928},
-{2981342,3894925,3895247,0.21624375,0.197708571428571},
-{2981343,3895501,3895927,0.317777777777778,0.317777777777778},
-{2981344,3895968,3895927,0.46062,0.46062},
-{2981345,3895927,3896268,0.2102,0.2102},
-{2981346,3894747,3895354,0.66948,0.66948},
-{2981347,3895043,3895448,0.56058,0.56058},
-{2981348,3895247,3895466,0.12262,0.102183333333333},
-{2981349,3895466,3895989,0.336022222222222,0.312848275862069},
-{2981350,3894456,3895056,0.48525,0.48525},
-{2981351,3895056,3895354,0.2643,0.2643},
-{2981352,3895354,3895448,0.08418,0.08418},
-{2981353,3895448,3895628,0.14781,0.14781},
-{2981354,3893685,3893913,0.21984,0.21984},
-{2981355,3893913,3894237,0.4536,0.4536},
-{2981356,3894188,3894885,0.53742,0.53742},
-{2981357,3894885,3895322,0.32691,0.32691},
-{2981358,3895056,3895322,0.209333333333333,0.209333333333333},
-{2981359,3895354,3896106,0.75375,0.75375},
-{2981360,3895628,3896163,0.60129,0.60129},
-{2981361,3895628,3895776,0.12519,0.12519},
-{2981362,3895776,3895989,0.17709,0.17709},
-{2981363,3895466,3895776,0.4209,0.4209},
-{2981364,3895989,3896321,0.268248,0.22354},
-{2981365,3895989,3896268,0.327214285714286,0.327214285714286},
-{2981366,3896268,3896321,0.44253,0.44253},
-{2981367,3896321,3896537,0.204046153846154,0.196488888888889},
-{2981368,3896268,3896733,0.31341,0.31341},
-{2981369,3896850,3897225,1000000,1000000},
-{2981370,3896645,3897124,0.4203,0.4203},
-{2981371,3895322,3895898,0.61935,0.61935},
-{2981372,3897124,3896870,0.23523,0.23523},
-{2981373,3893523,3893695,0.185577777777778,0.185577777777778},
-{2981374,3894017,3893695,0.230478260869565,0.240954545454545},
-{2981375,3894316,3895116,0.59325,0.59325},
-{2981376,3897374,3897415,0.20305,0.20305},
-{2981377,3897415,3897583,0.548815384615385,0.548815384615385},
-{2981378,3897583,3897631,0.10656,0.10656},
-{2981379,3897077,3897631,0.32667,0.32667},
-{2981380,3897583,3897718,0.07944,0.07944},
-{2981381,3897718,3898091,0.34765,0.34765},
-{2981382,3900647,3900828,1000000,1000000},
-{2981383,3900978,3901329,1.09582857142857,0.885092307692308},
-{2981384,3900828,3901329,1000000,1000000},
-{2981385,3902098,3902932,0.36295,0.335030769230769},
-{2981386,3900828,3901081,1000000,1000000},
-{2981387,3901329,3901724,0.983634782608696,0.904944},
-{2981388,3900038,3899793,0.31272,0.2606},
-{2981389,3900477,3900038,0.219763636363636,0.20145},
-{2981390,3901081,3901393,1000000,1000000},
-{2981391,3901393,3901769,0.230033333333333,0.230033333333333},
-{2981392,3902098,3902589,1000000,1.25373333333333},
-{2981393,3902589,3902660,1000000,0.64632},
-{2981394,3903411,3903749,1000000,0.2668},
-{2981395,3903693,3903749,0.103036363636364,0.09445},
-{2981396,3905012,3904844,0.133694117647059,1000000},
-{2981397,3903984,3904816,0.589755555555555,0.589755555555555},
-{2981398,3904816,3905107,0.200044444444444,0.200044444444444},
-{2981399,3904850,3905283,0.225933333333333,0.225933333333333},
-{2981400,3903386,3903468,0.153521739130435,0.1605},
-{2981401,3903468,3903992,0.61058,0.61058},
-{2981402,3903468,3904660,0.755844444444444,0.755844444444444},
-{2981403,3904816,3905240,0.229,0.229},
-{2981404,3905529,3905690,0.0594,0.066825},
-{2981405,3906089,3905690,0.184584,0.177484615384615},
-{2981406,3905066,3905599,1000000,0.271888888888889},
-{2981407,3905240,3905694,0.211777777777778,1000000},
-{2981408,3905599,3905694,0.183311111111111,0.183311111111111},
-{2981409,3905694,3905529,0.323955555555556,0.323955555555556},
-{2981410,3906089,3905830,0.284688888888889,0.284688888888889},
-{2981411,3906643,3910530,2.94318,2.94318},
-{2981412,3905811,3908638,2.3625,2.3625},
-{2981413,3905690,3906498,0.730266666666667,0.730266666666667},
-{2981414,3906840,3906089,0.728333333333333,0.728333333333333},
-{2981415,3904660,3905616,0.6422,0.6422},
-{2981416,3907998,3906595,0.891133333333333,0.891133333333333},
-{2981483,3892546,3892927,0.304488888888889,0.304488888888889},
-{2981484,3892927,3893259,0.348444444444444,0.348444444444444},
-{2981485,3893259,3893674,0.436933333333333,0.436933333333333},
-{2981486,3892927,3892588,0.19383,0.19383},
-{2981487,3893209,3892927,0.2088,0.2088},
-{2981488,3893340,3893104,0.206,0.206},
-{2981489,3893695,3893340,0.223707692307692,0.24235},
-{2981490,3893209,3893861,0.448095652173913,0.448095652173913},
-{2981491,3893259,3893025,0.137844444444444,0.137844444444444},
-{2981492,3893520,3893259,0.156577777777778,0.156577777777778},
-{2981493,3893735,3893520,0.17382,0.158018181818182},
-{2981494,3893340,3893963,0.499711111111111,0.499711111111111},
-{2981495,3893861,3893963,0.0519230769230769,0.0519230769230769},
-{2981496,3893963,3893735,0.142523076923077,0.132342857142857},
-{2981497,3893695,3894274,0.49068,0.49068},
-{2981498,3894215,3893963,0.129942857142857,0.117367741935484},
-{2981499,3894493,3894215,0.146592,0.140953846153846},
-{2981500,3894719,3894493,0.156518181818182,0.143475},
-{2981501,3894905,3894719,0.197236363636364,0.160711111111111},
-{2981502,3893735,3894139,0.433533333333333,0.433533333333333},
-{2981503,3893963,3894377,0.430933333333333,0.430933333333333},
-{2981504,3894215,3894627,0.4036,0.4036},
-{2981505,3894719,3895113,0.50877,0.50877},
-{2981506,3893674,3893949,0.311111111111111,0.311111111111111},
-{2981507,3894139,3894447,0.308355555555556,0.308355555555556},
-{2981508,3894377,3894695,0.311866666666667,0.311866666666667},
-{2981509,3894627,3894910,0.3138,0.3138},
-{2981510,3895113,3895388,0.41346,0.41346},
-{2981511,3893949,3893703,0.20385,0.20385},
-{2981512,3894207,3893949,0.27656,0.27656},
-{2981513,3894447,3894207,0.155836363636364,0.201670588235294},
-{2981514,3894695,3894447,0.143376,0.170685714285714},
-{2981515,3894910,3894695,0.1276,0.1276},
-{2981516,3895160,3894910,0.1505,0.1505},
-{2981517,3895388,3895160,0.18255,0.18255},
-{2981518,3894910,3895258,0.363044444444444,0.363044444444444},
-{2981519,3895388,3895769,0.38715,0.38715},
-{2981520,3895570,3895258,0.235628571428571,0.190315384615385},
-{2981521,3895769,3895570,0.297423529411765,0.297423529411765},
-{2981522,3894928,3895176,0.169666666666667,0.147774193548387},
-{2981523,3895116,3894928,1000000,1000000},
-{2981524,3895344,3895176,0.0937384615384615,0.0786193548387097},
-{2981525,3895176,3895438,0.36846,0.36846},
-{2981526,3895116,3895344,0.228641379310345,0.245577777777778},
-{2981527,3895803,3895116,0.5604,0.5604},
-{2981528,3896108,3895344,0.470191304347826,0.33795},
-{2981529,3895898,3896227,0.61287,0.61287},
-{2981530,3895898,3896518,0.53694,0.53694},
-{2981531,3895252,3895599,0.42477,0.42477},
-{2981532,3895599,3895388,0.18975,0.18975},
-{2981533,3895599,3895967,0.27558,0.27558},
-{2981534,3895562,3895967,0.59715,0.59715},
-{2981535,3896032,3895769,0.2406,0.253263157894737},
-{2981536,3895967,3896032,0.0453777777777778,0.0453777777777778},
-{2981537,3896032,3896649,0.64449,0.64449},
-{2981538,3896033,3896486,0.47331,0.47331},
-{2981539,3896554,3896032,0.331914285714286,0.387233333333333},
-{2981540,3896518,3897130,0.43875,0.43875},
-{2981541,3896518,3897289,0.69333,0.69333},
-{2981542,3896801,3897047,0.26688,0.26688},
-{2981543,3896553,3897047,0.31314,0.31314},
-{2981544,3896553,3897151,0.62907,0.62907},
-{2981545,3897047,3897151,0.52299,0.52299},
-{2981546,3897151,3897230,0.10062,0.10062},
-{2981547,3897230,3897556,0.20772,0.20772},
-{2981548,3896108,3896257,0.176353846153846,0.176353846153846},
-{2981549,3896187,3896257,0.0412666666666667,0.0412666666666667},
-{2981550,3896257,3896553,0.35755,0.35755},
-{2981551,3897718,3898592,0.87396,0.87396},
-{2981552,3897631,3898147,0.71814,0.71814},
-{2981553,3897586,3898147,0.34149,0.34149},
-{2981554,3898147,3898592,0.24114,0.24114},
-{2981555,3898147,3898326,0.13506,0.13506},
-{2981556,3898326,3899077,0.46353,0.46353},
-{2981557,3897551,3898062,0.62679,0.62679},
-{2981558,3897556,3898062,0.27903,0.27903},
-{2981559,3897941,3898326,0.29907,0.29907},
-{2981560,3897941,3898924,0.59553,0.59553},
-{2981561,3898924,3899077,0.221444444444444,0.221444444444444},
-{2981562,3898924,3899493,0.36951,0.36951},
-{2981563,3898941,3898924,0.33438,0.33438},
-{2981564,3897230,3897733,0.490658823529412,0.490658823529412},
-{2981565,3897526,3897733,0.270830769230769,0.251485714285714},
-{2981566,3897733,3897818,0.0909428571428571,0.0909428571428571},
-{2981567,3897818,3898040,0.248528571428571,0.248528571428571},
-{2981568,3897556,3897876,0.26925,0.26925},
-{2981569,3897876,3898040,0.1429875,0.1429875},
-{2981570,3897876,3898175,0.20841,0.20841},
-{2981571,3898062,3898175,0.10194,0.10194},
-{2981572,3898175,3898505,1000000,1000000},
-{2981573,3898175,3898735,0.42354,0.42354},
-{2981574,3898735,3898941,0.25014,0.25014},
-{2981575,3898040,3898537,0.35949,0.35949},
-{2981576,3898537,3898735,0.21624,0.21624},
-{2981577,3901243,3901273,0.262044444444444,0.262044444444444},
-{2981578,3901393,3901637,0.654192857142857,0.654192857142857},
-{2981579,3901243,3901637,0.15376,0.159062068965517},
-{2981580,3901637,3902101,0.167109677419355,0.185014285714286},
-{2981581,3903749,3904323,0.494296551724138,0.494296551724138},
-{2981582,3904260,3904702,0.259303448275862,0.259303448275862},
-{2981583,3904702,3905060,0.253090909090909,0.22272},
-{2981584,3904260,3904636,0.24363,0.24363},
-{2981585,3904702,3905078,0.26757,0.26757},
-{2981586,3902958,3903510,1000000,0.5565},
-{2981587,3904145,3904463,0.234438461538462,0.243816},
-{2981588,3905060,3905275,0.188504347826087,0.18065},
-{2981589,3905275,3905422,0.110688,0.106430769230769},
-{2981590,3905422,3905709,0.184511111111111,0.191607692307692},
-{2981591,3905275,3905709,0.675377777777778,0.675377777777778},
-{2981592,3905709,3906082,0.209088888888889,0.209088888888889},
-{2981593,3902101,3902114,1000000,1000000},
-{2981594,3908239,3909558,0.868866666666667,0.868866666666667},
-{2981595,3905422,3906476,0.450711111111111,0.450711111111111},
-{2981596,3906302,3906476,0.2186,0.2186},
-{2981597,3906355,3907149,0.531133333333333,0.531133333333333},
-{2981598,3908239,3908832,0.208866666666667,0.208866666666667},
-{2981629,3869593,3869874,0.108977777777778,0.108977777777778},
-{2981630,3869874,3870381,0.233111111111111,0.233111111111111},
-{2981631,3870881,3870381,0.37748,0.37748},
-{2981632,3893949,3894504,0.567044444444444,0.567044444444444},
-{2981633,3894504,3894228,0.186028571428571,0.162775},
-{2981634,3894504,3894914,0.60414,0.60414},
-{2981635,3894447,3894821,0.368155555555556,0.368155555555556},
-{2981636,3894821,3894578,0.161263636363636,0.1314},
-{2981637,3894695,3895053,0.360844444444444,0.360844444444444},
-{2981638,3895053,3894821,0.142368,0.104682352941176},
-{2981639,3895258,3895053,0.124533333333333,0.105075},
-{2981640,3894821,3895157,0.4743,0.4743},
-{2981641,3895157,3895455,0.43959,0.43959},
-{2981642,3895157,3894785,0.209328,0.209328},
-{2981643,3894785,3894504,0.177125,0.17004},
-{2981644,3895053,3895271,0.250066666666667,0.250066666666667},
-{2981645,3895504,3895157,0.195577777777778,0.195577777777778},
-{2981646,3895271,3895504,0.34584,0.34584},
-{2981647,3895455,3895234,0.211425,0.241628571428571},
-{2981648,3895656,3895455,0.262542857142857,0.229725},
-{2981649,3895504,3895656,0.23955,0.23955},
-{2981650,3895258,3895491,0.33033,0.33033},
-{2981651,3895491,3895271,0.16941,0.16941},
-{2981652,3895859,3895491,0.29643,0.29643},
-{2981653,3895769,3896475,0.63267,0.63267},
-{2981654,3896649,3896475,0.14532,0.14532},
-{2981655,3896570,3895859,0.43617,0.43617},
-{2981656,3895491,3895680,0.29517,0.29517},
-{2981657,3895680,3895907,0.29637,0.29637},
-{2981658,3895907,3895656,0.270323076923077,0.2196375},
-{2981659,3896118,3895680,0.31218,0.31218},
-{2981660,3896399,3895907,0.46396,0.46396},
-{2981661,3895907,3896189,0.28539,0.28539},
-{2981662,3896654,3896189,0.31974,0.31974},
-{2981663,3896635,3896654,0.063,0.063},
-{2981664,3896189,3896512,0.26622,0.26622},
-{2981665,3896475,3896570,0.12564,0.12564},
-{2981666,3895656,3895853,0.26313,0.26313},
-{2981667,3895853,3895437,0.34077,0.34077},
-{2981668,3896859,3896834,0.437766666666667,0.437766666666667},
-{2981669,3896649,3896834,0.19116,0.19116},
-{2981670,3897021,3896570,0.28359,0.28359},
-{2981671,3896570,3896998,0.4761,0.4761},
-{2981672,3896998,3896399,0.36354,0.36354},
-{2981673,3895853,3896448,0.56025,0.56025},
-{2981674,3896512,3896448,0.33627,0.33627},
-{2981675,3896512,3896913,0.28848,0.28848},
-{2981676,3896913,3897016,0.06816,0.06816},
-{2981677,3896913,3896812,0.33939,0.33939},
-{2981678,3897818,3898378,0.40215,0.40215},
-{2981679,3898378,3899220,0.6447,0.6447},
-{2981680,3898537,3899346,0.647684210526316,0.647684210526316},
-{2981681,3898735,3899433,0.52602,0.52602},
-{2981682,3896834,3897021,0.1199,0.1199},
-{2981683,3897021,3897838,0.55899,0.55899},
-{2981684,3897838,3896998,0.50334,0.50334},
-{2981685,3896998,3897826,0.67884,0.67884},
-{2981686,3898378,3898537,0.18315,0.18315},
-{2981687,3898208,3898378,0.17886,0.17886},
-{2981688,3898499,3898132,0.451447058823529,0.403926315789474},
-{2981689,3898132,3897826,0.5102,0.680266666666667},
-{2981690,3897826,3897707,0.20308,0.160326315789474},
-{2981691,3897838,3898132,0.442885714285714,0.442885714285714},
-{2981692,3898132,3898433,0.385363636363636,0.385363636363636},
-{2981693,3898433,3898726,0.2799,0.29856},
-{2981694,3898770,3898433,0.38202,0.38202},
-{2981695,3898433,3898044,0.579257142857143,0.579257142857143},
-{2981696,3897296,3897358,0.1122,0.136242857142857},
-{2981697,3897358,3897450,0.0441333333333333,0.0441333333333333},
-{2981698,3897358,3897838,0.687726315789474,0.725933333333333},
-{2981699,3897400,3897132,0.34323,0.34323},
-{2981700,3897016,3897132,0.07233,0.07233},
-{2981701,3897132,3897582,0.29694,0.29694},
-{2981702,3897582,3897768,0.1161,0.1161},
-{2981703,3897768,3898159,0.22038,0.22038},
-{2981704,3897582,3897830,0.44085,0.44085},
-{2981705,3898044,3897768,0.29589,0.29589},
-{2981706,3900646,3900997,0.210688888888889,0.210688888888889},
-{2981707,3900330,3900646,0.641666666666667,0.641666666666667},
-{2981708,3900330,3900566,0.15834,0.15834},
-{2981709,3900633,3900566,0.101288888888889,0.101288888888889},
-{2981710,3900997,3900633,0.455955555555556,0.455955555555556},
-{2981711,3900633,3901434,0.3594,0.3594},
-{2981712,3900566,3901008,0.193542857142857,0.193542857142857},
-{2981713,3901008,3901341,0.154944,0.1614},
-{2981714,3901246,3901008,0.212,0.212},
-{2981715,3901246,3901341,0.0804444444444445,0.0804444444444445},
-{2981716,3901341,3901434,0.123285714285714,0.107875},
-{2981717,3901434,3901526,0.1117,0.141094736842105},
-{2981718,3901651,3900997,0.285288888888889,0.285288888888889},
-{2981719,3901651,3901238,0.482133333333333,0.482133333333333},
-{2981720,3901238,3901526,0.131711111111111,0.131711111111111},
-{2981721,3901526,3901656,0.0641739130434783,0.082},
-{2981722,3901651,3902114,1000000,1000000},
-{2981723,3902114,3902069,0.133933333333333,0.133933333333333},
-{2981724,3902069,3901656,0.346135714285714,0.372761538461538},
-{2981725,3901656,3902358,0.3884,0.313707692307692},
-{2981726,3902069,3902723,0.362427272727273,0.318936},
-{2981727,3902449,3902701,0.119022222222222,0.119022222222222},
-{2981728,3902701,3903393,0.355177777777778,0.355177777777778},
-{2981729,3903393,3903154,0.116066666666667,0.116066666666667},
-{2981730,3903393,3903709,0.2486,0.2486},
-{2981731,3902319,3902766,0.478133333333333,0.478133333333333},
-{2981732,3901873,3902766,0.355311111111111,0.355311111111111},
-{2981733,3902701,3903199,0.569,0.569},
-{2981734,3903601,3903784,0.215052631578947,0.215052631578947},
-{2981735,3904222,3903784,0.211,0.211},
-{2981736,3904127,3904295,0.1497,0.1497},
-{2981737,3904295,3904468,0.0821555555555556,0.0821555555555556},
-{2981738,3904127,3904429,0.406711111111111,0.406711111111111},
-{2981739,3904429,3904484,0.227509090909091,0.227509090909091},
-{2981740,3904295,3904794,0.451088888888889,0.451088888888889},
-{2981741,3904429,3904794,0.158155555555556,0.158155555555556},
-{2981742,3904794,3904923,0.172772727272727,0.172772727272727},
-{2981743,3904923,3905104,0.168024,0.168024},
-{2981744,3905104,3905267,0.110452173913043,0.149435294117647},
-{2981745,3905267,3904587,0.541175,0.43294},
-{2981746,3904899,3905557,0.322846153846154,0.322846153846154},
-{2981747,3905557,3905727,0.157155555555556,0.157155555555556},
-{2981748,3905267,3906461,0.569333333333333,0.569333333333333},
-{2981749,3905557,3906461,0.408311111111111,0.408311111111111},
-{2981750,3905727,3906597,0.402488888888889,0.402488888888889},
-{2981751,3906461,3906714,0.122155555555556,0.122155555555556},
-{2981752,3905727,3905992,0.2532,0.2532},
-{2981753,3905468,3905557,0.0803555555555556,0.0803555555555556},
-{2981780,3902766,3902965,0.153755555555556,0.153755555555556},
-{2981781,3903199,3903403,0.144155555555556,0.144155555555556},
-{2981782,3902778,3902922,0.14958947368421,0.1579},
-{2981783,3904222,3904684,0.364266666666667,0.364266666666667},
-{2981784,3903784,3904296,0.371288888888889,0.371288888888889},
-{2981785,3903403,3903863,0.3858,0.3858},
-{2981786,3902922,3903437,0.6484125,0.6484125},
-{2981787,3902356,3903029,0.584781818181818,0.584781818181818},
-{2981788,3901863,3902690,0.570096,1000000},
-{2981789,3901347,3902296,0.66095,0.66095},
-{2981790,3900961,3901905,0.662765217391304,0.662765217391304},
-{2981791,3900666,3901395,0.474311111111111,0.5568},
-{2981792,3903784,3903403,0.220032,0.220032},
-{2981793,3903403,3902922,0.28407,0.28407},
-{2981794,3902922,3902356,0.328957894736842,0.328957894736842},
-{2981795,3904296,3903863,0.197533333333333,0.197533333333333},
-{2981796,3903863,3903496,0.196022222222222,0.196022222222222},
-{2981797,3903437,3903496,0.0612,0.0612},
-{2981798,3903437,3903029,0.330063157894737,0.330063157894737},
-{2981799,3903029,3902690,0.248747368421053,0.248747368421053},
-{2981800,3902690,3902296,0.179777777777778,0.179777777777778},
-{2981801,3902296,3901905,0.1614,0.1614},
-{2981803,3901704,3902778,0.445977777777778,0.445977777777778},
-{2981804,3901527,3902450,0.386311111111111,0.386311111111111},
-{2981805,3901367,3902119,0.328066666666667,0.328066666666667},
-{2981806,3904296,3905190,0.673777777777778,0.673777777777778},
-{2981807,3903496,3904635,0.885866666666667,0.885866666666667},
-{2983258,3876371,3877167,1000000,0.507282352941176},
-{2983261,3904469,3904773,0.191448,0.208095652173913},
-{2983262,3905222,3905526,0.2319,0.220857142857143},
-{2983263,3900963,3901469,0.397333333333333,0.510857142857143},
-{2983264,3901469,3901553,0.08744,0.119236363636364},
-{2983265,3901487,3901803,0.273847058823529,0.211609090909091},
-{2983266,3901803,3901884,0.0715411764705882,0.0715411764705882},
-{2983268,3903381,3903131,0.252,0.252},
-{2983269,3903381,3902983,0.210733333333333,0.210733333333333},
-{2986618,3880172,3880391,1000000,1000000},
-{2986638,3853853,3854046,0.0896888888888889,0.0896888888888889},
-{2986642,3912280,3912370,0.0938823529411765,0.0886666666666667},
-{2986649,3864194,3863681,0.249622222222222,0.249622222222222},
-{2986650,3865063,3864450,0.253088888888889,0.253088888888889},
-{2986651,3865636,3865063,0.258860869565217,0.3721125},
-{2986652,3867608,3867604,0.5064,0.384864},
-{2986653,3866449,3866140,0.3652875,0.3438},
-{2986654,3868939,3868098,0.529517647058823,1000000},
-{2986655,3866646,3866373,0.147939130434783,0.130869230769231},
-{2986656,3866766,3866859,0.4028,0.4028},
-{2986657,3854486,3854218,0.1172,0.1172},
-{2986658,3854487,3854857,0.405444444444444,0.405444444444444},
-{2986659,3880307,3880603,1000000,1000000},
-{2986660,3878103,3878233,0.0989555555555555,0.0989555555555555},
-{2986661,3877254,3877293,0.146044444444444,0.146044444444444},
-{2986662,3876852,3877136,1000000,0.102492857142857},
-{2986663,3877326,3877956,1000000,0.267339130434783},
-{2986664,3876284,3876433,0.286866666666667,0.286866666666667},
-{2986665,3876575,3876840,1000000,1000000},
-{2986674,3861655,3861562,0.265371428571429,0.161530434782609},
-{2986676,3893836,3894594,0.401555555555556,0.401555555555556},
-{2986680,3914640,3914833,0.135392307692308,0.113554838709677},
-{2986681,3914388,3914640,0.108811764705882,0.108811764705882},
-{2986682,3914128,3914388,0.17679,0.17679},
-{2986683,3913830,3914128,0.20292,0.20292},
-{2986687,3858664,3858781,0.0803307692307692,0.10443},
-{2986688,3859176,3858781,0.144814285714286,0.150177777777778},
-{2986689,3859766,3859176,0.267214285714286,0.29928},
-{2986690,3861683,3860070,0.843066666666667,0.843066666666667},
-{2986691,3861193,3861384,0.106711111111111,0.106711111111111},
-{2986692,3858888,3858903,0.0397454545454545,0.0397454545454545},
-{2986693,3858903,3859091,0.149618181818182,0.149618181818182},
-{2986694,3859940,3860696,0.330466666666667,0.330466666666667},
-{2986695,3861900,3861601,0.129036363636364,0.129036363636364},
-{2986701,3859084,3858733,0.187377777777778,0.187377777777778},
-{2986703,3860815,3860611,0.118933333333333,0.118933333333333},
-{2986704,3861043,3860954,0.0730888888888889,0.0730888888888889},
-{2986705,3857593,3857751,0.172111111111111,0.172111111111111},
-{2986719,3903497,3903288,0.1924,0.1924},
-{2986720,3903926,3903497,0.504857142857143,0.8835},
-{2986721,3903288,3903134,0.0935333333333333,0.0935333333333333},
-{2986722,3906420,3906298,0.0726666666666667,0.0726666666666667},
-{2986723,3896441,3896723,0.2006,0.3009},
-{2986724,3905206,3905423,0.194475,0.245652631578947},
-{2986725,3905446,3905516,0.0769125,0.0769125},
-{2986726,3876195,3875833,0.1596,0.1596},
-{2986729,3891647,3891565,0.0522,0.0522},
-{2986730,3891140,3890795,0.100688372093023,0.103085714285714},
-{2986732,3891477,3891140,0.1197,0.147323076923077},
-{2986787,3874577,3875580,0.5642,0.348476470588235},
-{2986788,3875475,3876252,1000000,1000000},
-{2986789,3875599,3876381,0.328733333333333,0.328733333333333},
-{2986790,3875679,3876500,0.345311111111111,0.345311111111111},
-{2986791,3876500,3876381,1000000,1000000},
-{2986792,3876381,3876252,1000000,1000000},
-{2986793,3876738,3878297,0.578133333333333,0.578133333333333},
-{2986794,3885302,3885520,0.0355391304347826,1000000},
-{2986795,3885290,3885551,1000000,0.0416205882352941},
-{2986796,3891172,3892538,0.649888888888889,0.649888888888889},
-{2986797,3892497,3892538,0.25345,0.5069},
-{2986798,3892538,3893863,0.701568,0.6496},
-{2986799,3892696,3893762,0.516555555555556,0.516555555555556},
-{2986800,3895346,3895760,0.615104347826087,1000000},
-{2986801,3895201,3895346,0.0583076923076923,1000000},
-{2986860,3853401,3853086,0.4154,0.29078},
-{2986861,3855389,3854867,0.276342857142857,0.266813793103448},
-{2986862,3856172,3855389,0.387777777777778,0.455217391304348},
-{2986865,3907374,3907602,0.101825,0.12219},
-{2986866,3907602,3907935,0.121152,0.131686956521739},
-{2986867,3907602,3907558,0.24535,0.24535},
-{2986886,3853086,3853644,0.250422222222222,0.250422222222222},
-{2986887,3886659,3886791,0.0665785714285714,1000000},
-{2986888,3895709,3896323,1000000,1000000},
-{2986896,3869611,3868809,0.295177777777778,0.295177777777778},
-{2986911,3875890,3875935,0.0688736842105263,0.0688736842105263},
-{2986912,3876311,3876072,0.261860869565217,0.261860869565217},
-{2986913,3876072,3875851,0.107955555555556,0.107955555555556},
-{2986914,3882502,3882562,0.115486956521739,0.115486956521739},
-{2986915,3883341,3883435,1000000,0.222733333333333},
-{2986916,3883435,3883458,1000000,0.1248},
-{2986917,3883435,3883630,1000000,1000000},
-{2986918,3887107,3886909,0.0956222222222222,0.0956222222222222},
-{2986919,3898651,3899654,0.418644444444444,0.418644444444444},
-{2986923,3856054,3856182,0.0472222222222222,0.0472222222222222},
-{2986924,3856695,3856054,0.252888888888889,0.252888888888889},
-{2986925,3859717,3859221,0.265755555555556,0.265755555555556},
-{2986926,3862073,3862154,1000000,1000000},
-{2986927,3866419,3866096,0.0994888888888889,0.0994888888888889},
-{2986928,3865417,3865011,0.133,0.133},
-{2986929,3873600,3873415,0.137888888888889,0.137888888888889},
-{2986930,3872144,3871563,0.347377777777778,0.347377777777778},
-{2986931,3874858,3874804,0.184066666666667,0.184066666666667},
-{2986932,3873823,3873412,0.2862,0.2862},
-{2986933,3896149,3896272,0.268511111111111,0.268511111111111},
-{2986934,3898347,3898632,1000000,1000000},
-{2986935,3898305,3898632,0.0951428571428571,0.108},
-{2986936,3898632,3901386,0.651155555555556,0.639316363636364},
-{2986937,3901386,3901828,0.105129411764706,0.101162264150943},
-{2986938,3897727,3897969,0.208971428571429,0.0886545454545454},
-{2986939,3897559,3897851,1000000,0.1182},
-{2986940,3898213,3898099,1000000,1000000},
-{2986941,3898305,3898213,0.0575555555555556,0.0575555555555556},
-{2986942,3898213,3898347,1000000,1000000},
-{2986943,3898347,3898170,1000000,1000000},
-{2986944,3898170,3898099,1000000,1000000},
-{2986945,3898170,3897601,1000000,1000000},
-{2986956,3849376,3849125,0.250644444444444,0.250644444444444},
-{2986957,3855814,3855306,0.243333333333333,0.243333333333333},
-{2986958,3858972,3859540,0.256577777777778,0.256577777777778},
-{2986959,3858122,3858043,0.0733333333333333,0.0733333333333333},
-{2986960,3867474,3866847,0.383294117647059,0.250615384615385},
-{2986961,3875571,3875443,0.342644444444444,0.342644444444444},
-{2986962,3877822,3877102,0.265577777777778,0.265577777777778},
-{2986963,3880356,3880277,1000000,1000000},
-{2986964,3896470,3896390,1000000,0.128},
-{2986965,3901612,3901386,0.291085714285714,0.218314285714286},
-{2986966,3901612,3901828,0.155266666666667,0.155266666666667},
-{2986967,3901122,3901612,0.27295,0.350935714285714},
-{2986968,3869814,3869573,1000000,0.1550625},
-{2986969,3869573,3869766,0.09985,1000000},
-{2986970,3866882,3866210,0.273339130434783,0.273339130434783},
-{2986971,3866210,3864928,0.472177777777778,0.472177777777778},
-{2986972,3866882,3866231,0.130557446808511,0.1278375},
-{2986973,3866210,3866231,0.266914285714286,1000000},
-{2986974,3872207,3872117,0.113022222222222,0.113022222222222},
-{2986975,3872061,3871978,0.119444444444444,0.119444444444444},
-{2986976,3872779,3872413,0.133288888888889,0.133288888888889},
-{2986977,3872267,3871978,0.158222222222222,0.158222222222222},
-{2986978,3878421,3878107,1000000,0.0968714285714286},
-{2986979,3878492,3878421,1000000,0.0556153846153846},
-{2986980,3878882,3878562,0.280305882352941,1000000},
-{2986981,3890539,3890879,0.598757142857143,0.441189473684211},
-{2986984,3857715,3858171,1000000,1000000},
-{2986985,3860579,3859530,0.255665454545455,1000000},
-{2986986,3859530,3858996,0.124458823529412,1000000},
-{2986987,3859530,3859782,0.1796,0.1796},
-{2986988,3880405,3880539,0.183155555555556,0.183155555555556},
-{2986989,3862617,3863073,0.275377777777778,0.275377777777778},
-{2986990,3862135,3862314,0.0888,0.0888},
-{2986991,3868867,3869623,0.3752,0.3752},
-{2986992,3873225,3872961,0.301,0.301},
-{2986993,3871697,3871564,0.206511111111111,0.206511111111111},
-{2986994,3877811,3878067,1000000,0.260657142857143},
-{2986995,3887723,3887949,0.129111111111111,0.129111111111111},
-{2986996,3897675,3897208,0.275133333333333,0.275133333333333},
-{2987005,3851124,3850876,0.325452631578947,0.363741176470588},
-{2987006,3851093,3850588,0.215755555555556,0.215755555555556},
-{2987007,3850588,3850804,0.489882352941177,0.5552},
-{2987008,3856998,3857131,0.143822222222222,0.143822222222222},
-{2987009,3854053,3854400,0.199333333333333,0.199333333333333},
-{2987010,3859276,3858569,0.389755555555556,0.389755555555556},
-{2987011,3859509,3859249,0.189133333333333,0.189133333333333},
-{2987012,3861790,3861699,0.0766222222222222,0.0766222222222222},
-{2987013,3860688,3860398,0.2752,0.2752},
-{2987014,3865716,3865566,0.0659111111111111,0.0659111111111111},
-{2987015,3874890,3874819,0.240761538461538,0.240761538461538},
-{2987016,3890590,3890896,0.275336842105263,0.26157},
-{2987017,3894326,3894011,0.29345,0.29345},
-{2987029,3851048,3850637,0.593822222222222,1000000},
-{2987030,3853608,3853417,0.256422222222222,0.256422222222222},
-{2987031,3860204,3860265,0.083,0.083},
-{2987032,3861618,3861343,0.251688888888889,0.251688888888889},
-{2987033,3864645,3863664,0.4742,0.4742},
-{2987034,3870208,3869701,1000000,1000000},
-{2987035,3870205,3869903,1000000,1000000},
-{2987036,3871015,3871041,1000000,0.13064},
-{2987037,3871015,3871209,1000000,0.1235625},
-{2987038,3870995,3871237,1000000,1000000},
-{2987039,3869958,3869667,0.144333333333333,0.144333333333333},
-{2987040,3872889,3872703,0.04284,0.04284},
-{2987041,3872476,3872315,1000000,1000000},
-{2987042,3890964,3890491,0.195964285714286,0.195964285714286},
-{2987043,3897414,3897520,1000000,0.0924666666666667},
-{2987057,3850240,3851575,0.8236,0.8236},
-{2987058,3870771,3870895,0.0646888888888889,0.0646888888888889},
-{2987059,3868398,3868162,0.0980444444444444,0.0980444444444444},
-{2987060,3873819,3873946,0.0858888888888889,0.0858888888888889},
-{2987061,3874297,3874253,1000000,0.05865},
-{2987062,3897827,3897927,0.315844444444444,0.315844444444444},
-{2987063,3898345,3898463,0.309088888888889,0.309088888888889},
-{2987064,3855743,3855572,0.0707777777777778,0.0707777777777778},
-{2987065,3855950,3855928,1000000,0.214823076923077},
-{2987066,3855928,3855645,0.114155555555556,0.114155555555556},
-{2987067,3856343,3855946,0.207355555555556,0.207355555555556},
-{2987068,3855303,3855160,0.0660444444444444,0.0660444444444444},
-{2987069,3856169,3856013,0.105136363636364,0.11565},
-{2987070,3856613,3856169,0.180696,0.173746153846154},
-{2987071,3856169,3855802,0.228155555555556,0.228155555555556},
-{2987072,3860530,3860488,0.103911111111111,0.103911111111111},
-{2987073,3860706,3860352,0.163777777777778,0.163777777777778},
-{2987074,3862712,3862554,0.121044444444444,0.121044444444444},
-{2987075,3863082,3862835,0.210422222222222,0.210422222222222},
-{2987076,3869008,3868828,0.114555555555556,0.114555555555556},
-{2987077,3869672,3869123,0.310355555555556,0.310355555555556},
-{2987078,3870110,3869559,0.305377777777778,0.305377777777778},
-{2987079,3869559,3869082,0.114246153846154,0.120421621621622},
-{2987080,3869082,3868858,0.0613263157894737,0.0896307692307692},
-{2987081,3869160,3869082,0.067175,0.0895666666666667},
-{2987082,3872546,3873007,0.360088888888889,0.360088888888889},
-{2987117,3857767,3857541,0.108488888888889,0.108488888888889},
-{2987120,3853754,3853390,0.308577777777778,0.308577777777778},
-{2987121,3860698,3861053,0.235422222222222,0.235422222222222},
-{2987122,3864559,3864913,0.264822222222222,0.264822222222222},
-{2987123,3868371,3867227,0.444955555555556,0.444955555555556},
-{2987124,3871128,3870015,0.413644444444444,0.413644444444444},
-{2987125,3869332,3869071,0.141484615384615,0.136244444444444},
-{2987126,3870342,3869290,0.271628571428571,1000000},
-{2987154,3852743,3852696,0.0196,1000000},
-{2987155,3853476,3852743,0.2148,1000000},
-{2987157,3853164,3852696,0.206466666666667,0.206466666666667},
-{2987158,3853602,3853101,0.221088888888889,0.221088888888889},
-{2987159,3859475,3859332,0.0905333333333333,0.0452666666666667},
-{2987160,3859475,3859315,0.0704709677419355,1000000},
-{2987161,3861761,3861459,0.3214,0.3214},
-{2987162,3863414,3863294,0.107822222222222,0.107822222222222},
-{2987164,3865801,3866713,0.612666666666667,0.612666666666667},
-{2987167,3875902,3877505,0.696846428571429,0.696846428571429},
-{2987169,3852812,3852378,0.288222222222222,0.288222222222222},
-{2987170,3852375,3851943,0.293422222222222,0.293422222222222},
-{2987191,3858717,3858737,0.0485111111111111,0.0485111111111111},
-{2987192,3859828,3859282,0.601454545454545,0.601454545454545},
-{2987193,3859282,3859438,0.206114285714286,0.254611764705882},
-{2987194,3859690,3860078,1000000,0.559145454545455},
-{2987195,3859670,3859477,0.0570179104477612,0.0578818181818182},
-{2987196,3860467,3859670,0.296844827586207,0.441461538461538},
-{2987197,3862244,3861700,0.309022222222222,0.309022222222222},
-{2987198,3861640,3861700,0.0714888888888889,0.0714888888888889},
-{2987199,3861700,3861846,0.152622222222222,0.152622222222222},
-{2987200,3869250,3869261,0.1572,0.1572},
-{2987201,3893008,3894694,0.922628571428571,0.759811764705882},
-{2987203,3859014,3859083,0.195163636363636,1000000},
-{2987204,3870706,3870498,0.319888888888889,0.319888888888889},
-{2987205,3871928,3871707,0.323288888888889,0.323288888888889},
-{2987206,3870706,3870427,0.0777272727272727,0.07125},
-{2987207,3871140,3870706,0.116183333333333,0.119502857142857},
-{2987208,3871436,3871312,0.0367741935483871,0.038},
-{2987209,3871928,3871436,0.13464375,0.130563636363636},
-{2987210,3872227,3871928,0.100555555555556,0.129285714285714},
-{2987211,3851828,3852662,0.254436363636364,0.254436363636364},
-{2987212,3860526,3859793,0.342163636363636,0.4182},
-{2987213,3860526,3860260,0.127022222222222,0.127022222222222},
-{2987214,3859550,3859257,0.146515384615385,0.146515384615385},
-{2987215,3858621,3858859,1000000,1000000},
-{2987216,3870228,3870991,0.315022222222222,0.315022222222222},
-{2987217,3870991,3870520,0.172488888888889,0.172488888888889},
-{2987218,3871391,3870942,0.526616666666667,1000000},
-{2987219,3871327,3871160,0.265473913043478,0.283995348837209},
-{2987220,3875808,3875273,0.226333333333333,0.226333333333333},
-{2987221,3885369,3885643,0.112555555555556,0.112555555555556},
-{2987222,3887788,3888306,0.38907,0.38907},
-{2987225,3886563,3886427,0.0950857142857143,0.0868173913043478},
-{2987226,3886629,3886807,0.11926,0.108418181818182},
-{2987227,3885289,3885713,1000000,1000000},
-{2987228,3886174,3886162,1000000,1000000},
-{2987229,3886944,3886888,0.2525625,1000000},
-{2987230,3893762,3893565,0.3545,0.3545},
-{2987231,3899322,3898746,0.258376470588235,0.24862641509434},
-{2987232,3899623,3899322,0.158013333333333,0.158013333333333},
-{2987233,3898482,3899693,0.644377777777778,0.644377777777778},
-{2987234,3899693,3899322,0.726222222222222,0.726222222222222},
-{2987235,3900989,3900974,0.0357483870967742,0.046175},
-{2987236,3901080,3900989,0.0857538461538462,0.0857538461538462},
-{2987237,3900462,3900989,1000000,0.601870588235294},
-{2987238,3901080,3900462,1000000,0.462733333333333},
-{2987239,3900462,3900391,1000000,0.0374},
-{2987240,3901181,3901080,0.10365,0.118457142857143},
-{2987241,3901198,3901181,0.0187125,0.0230307692307692},
-{2987242,3903117,3903103,0.05288,0.063456},
-{2987243,3903121,3903117,0.0224142857142857,0.03138},
-{2987244,3900974,3901686,0.467933333333333,0.467933333333333},
-{2987245,3901686,3902065,0.239047058823529,0.239047058823529},
-{2987246,3902065,3902408,0.25372,0.25372},
-{2987247,3902408,3902732,0.204063157894737,0.204063157894737},
-{2987248,3902732,3902997,0.131488888888889,0.131488888888889},
-{2987249,3902732,3902868,0.24492,0.24492},
-{2987250,3902408,3902552,0.18645,0.18645},
-{2987251,3902065,3902204,1000000,1000000},
-{2987252,3901686,3901826,0.29332,0.29332},
-{2987253,3901181,3901826,0.390057142857143,1000000},
-{2987254,3901826,3902204,0.1781,1000000},
-{2987255,3902204,3902552,0.169617391304348,1000000},
-{2987256,3902552,3902868,0.140544827586207,1000000},
-{2987257,3902868,3903117,0.232333333333333,1000000},
-{2987258,3860128,3859534,0.287581818181818,0.287581818181818},
-{2987259,3866223,3866172,0.0551162790697674,0.0564285714285714},
-{2987260,3866172,3867432,0.443533333333333,0.443533333333333},
-{2987261,3872427,3871847,0.198377777777778,0.198377777777778},
-{2987262,3886759,3886185,0.443644444444444,0.443644444444444},
-{2987263,3896942,3897395,0.275288888888889,0.275288888888889},
-{2987264,3912180,3912081,0.0535111111111111,0.0535111111111111},
-{2987265,3911758,3910733,1000000,1000000},
-{2987266,3917379,3917989,0.412571428571429,1000000},
-{2987267,3917724,3917628,0.0674285714285714,1000000},
-{2987268,3917234,3917135,0.101325,1000000},
-{2987269,3916551,3916657,1000000,0.10635},
-{2987527,3914312,3915006,0.217813953488372,0.2926875},
-{2987528,3915006,3915382,0.150615789473684,0.130077272727273},
-{2987529,3914950,3914181,0.388315384615385,0.388315384615385},
-{2987530,3915006,3914950,0.051768,0.0562695652173913},
-{2987531,3914950,3915390,0.248755555555556,0.248755555555556},
-{2987532,3916182,3916530,1000000,1000000},
-{2987533,3916530,3916621,1000000,1000000},
-{2987534,3916530,3916813,1000000,1000000},
-{2987535,3916432,3916813,1000000,0.277633333333333},
-{2987536,3916813,3916926,1000000,0.0677333333333333},
-{2987537,3916346,3916621,0.152937931034483,1000000},
-{2987538,3916621,3916926,0.123306666666667,1000000},
-{2987544,3903885,3903538,0.213444444444444,0.213444444444444},
-{2987545,3901964,3902262,0.1962,0.1962},
-{2987546,3902858,3903382,0.130675471698113,1000000},
-{2987547,3902858,3902939,0.0628235294117647,1000000},
-{2987548,3903113,3903434,0.0917375,1000000},
-{2987549,3902749,3902858,1000000,0.073704},
-{2987550,3906002,3905636,0.214088888888889,0.214088888888889},
-{2987551,3915486,3915233,0.161822222222222,0.161822222222222},
-{2987552,3918373,3918083,0.162466666666667,0.162466666666667},
-{2987553,3922133,3922149,0.34059,0.34059},
-{2987554,3870779,3871156,1000000,1000000},
-{2987555,3871156,3871288,0.135288888888889,0.135288888888889},
-{2987556,3870810,3871288,1000000,0.178292307692308},
-{2987557,3871288,3871438,1000000,0.0488785714285714},
-{2987558,3871636,3871438,0.338918181818182,0.3468},
-{2987559,3871438,3871296,0.316843902439024,0.3093},
-{2987560,3867932,3868114,0.0620888888888889,0.0620888888888889},
-{2987561,3906875,3906841,0.0678444444444444,0.0678444444444444},
-{2987562,3906841,3906810,0.120755555555556,0.120755555555556},
-{2987563,3906841,3906653,0.0868444444444444,0.0868444444444444},
-{2987564,3907135,3907280,0.0303042253521127,1000000},
-{2987565,3905103,3907135,0.436525,1000000},
-{2987566,3907212,3907847,0.332733333333333,0.332733333333333},
-{2987567,3907297,3907355,0.109111111111111,0.109111111111111},
-{2987568,3909706,3908935,0.402266666666667,0.402266666666667},
-{2987569,3910107,3909376,0.375866666666667,0.375866666666667},
-{2987570,3910600,3909757,0.375933333333333,0.375933333333333},
-{2987571,3910992,3910211,0.356911111111111,0.356911111111111},
-{2987583,3863262,3862975,0.297555555555556,0.297555555555556},
-{2987584,3869272,3869317,0.308511111111111,0.308511111111111},
-{2987585,3870266,3870272,0.0559741935483871,0.0559741935483871},
-{2987586,3897734,3897626,0.0660888888888889,0.0660888888888889},
-{2987587,3907095,3906954,0.09639,0.09639},
-{2987588,3907258,3907424,0.16195,0.077736},
-{2987589,3911363,3910676,0.360488888888889,0.360488888888889},
-{2987590,3911735,3911074,0.361666666666667,0.361666666666667},
-{2987591,3912141,3911500,0.339822222222222,0.339822222222222},
-{2987592,3912447,3912261,0.0850888888888889,0.0850888888888889},
-{2987593,3905129,3907186,1000000,0.51892131147541},
-{2987594,3918195,3917740,0.282577777777778,0.282577777777778},
-{2987595,3918849,3919021,0.228184615384615,0.228184615384615},
-{2987606,3869159,3868820,0.20649,0.20649},
-{2987607,3867628,3868360,0.290577777777778,0.290577777777778},
-{2987608,3867628,3867579,0.169533333333333,0.169533333333333},
-{2987609,3867043,3866885,0.30408,0.30408},
-{2987610,3868546,3868052,0.328118181818182,0.343742857142857},
-{2987611,3895744,3896378,1000000,0.598490322580645},
-{2987612,3897045,3897327,0.105675,0.0983023255813953},
-{2987613,3896174,3896378,1000000,0.123955555555556},
-{2987614,3893671,3893791,0.064,0.064},
-{2987615,3896880,3896990,1000000,0.0903272727272727},
-{2987616,3896514,3896910,0.232022222222222,0.232022222222222},
-{2987617,3906609,3907255,0.279573913043478,0.221731034482759},
-{2987618,3907255,3907376,0.09252,0.0816352941176471},
-{2987619,3913935,3913887,1000000,0.02228},
-{2987637,3869479,3869210,0.102111111111111,0.102111111111111},
-{2987638,3867306,3867305,0.0664888888888889,0.0664888888888889},
-{2987639,3866576,3866469,0.0930444444444444,0.0930444444444444},
-{2987640,3872589,3872666,0.0812666666666667,0.0812666666666667},
-{2987641,3872254,3872187,0.0794444444444444,0.0794444444444444},
-{2987642,3873558,3873874,0.124711111111111,0.124711111111111},
-{2987643,3871880,3871825,0.173977777777778,0.173977777777778},
-{2987644,3871451,3871979,0.253755555555556,0.253755555555556},
-{2987645,3884780,3884744,0.173133333333333,0.173133333333333},
-{2987646,3896829,3897045,1000000,0.0691945945945946},
-{2987647,3896829,3896905,1000000,0.0519461538461539},
-{2987648,3896905,3896961,1000000,0.0405428571428571},
-{2987649,3896695,3896905,0.0662,1000000},
-{2987650,3896905,3896986,0.0249666666666667,1000000},
-{2987651,3896961,3896986,0.0383357142857143,1000000},
-{2987652,3897652,3898703,0.509731034482759,0.509731034482759},
-{2987653,3896961,3897652,1000000,0.428960869565217},
-{2987654,3897652,3897821,1000000,0.145356},
-{2987655,3897821,3898295,0.415628571428571,0.415628571428571},
-{2987656,3898789,3898871,0.0986709677419355,0.0955875},
-{2987657,3910806,3910820,0.0762521739130435,0.0762521739130435},
-{2987658,3910820,3910837,0.188228571428571,0.179672727272727},
-{2987659,3910166,3910671,0.264875,0.264875},
-{2987660,3910358,3910450,0.207644444444444,0.207644444444444},
-{2987661,3909474,3910450,0.462066666666667,0.462066666666667},
-{2987662,3910820,3911701,0.323933333333333,0.323933333333333},
-{2987667,3870485,3870072,0.143866666666667,0.143866666666667},
-{2987668,3869571,3869174,0.145044444444444,0.145044444444444},
-{2987669,3869174,3869007,0.0621555555555555,0.0621555555555555},
-{2987670,3872502,3872181,0.113888888888889,0.113888888888889},
-{2987671,3872545,3872856,0.0980444444444444,0.0980444444444444},
-{2987672,3892379,3892332,0.16904,0.16904},
-{2987673,3892169,3892379,0.0774545454545454,0.079875},
-{2987674,3892379,3892477,0.0529615384615385,0.0529615384615385},
-{2987675,3898232,3898677,1000000,0.390924324324324},
-{2987676,3910563,3909791,1000000,1000000},
-{2987677,3909791,3909224,0.396171428571429,1000000},
-{2987690,3884026,3883928,0.0492782608695652,0.0809571428571429},
-{2987691,3883928,3883677,0.132913043478261,0.1910625},
-{2987692,3883928,3884164,0.191088888888889,0.191088888888889},
-{2987693,3882443,3882537,0.0446516129032258,0.0446516129032258},
-{2987694,3883315,3883209,0.0545739130434783,0.0545739130434783},
-{2987695,3912172,3913052,1000000,1000000},
-{2987697,3868257,3868389,0.0588444444444444,0.0588444444444444},
-{2987698,3869266,3868844,0.1568,0.1568},
-{2987699,3869266,3869257,0.0828444444444444,0.0828444444444444},
-{2987700,3873010,3873302,0.227630769230769,1000000},
-{2987701,3873302,3872888,0.09544,0.09544},
-{2987702,3903099,3903986,0.383,0.383},
-{2987703,3903241,3904037,0.340555555555556,0.340555555555556},
-{2987704,3903165,3903999,0.355444444444444,0.355444444444444},
-{2987705,3902592,3902907,0.25596,0.25596},
-{2987706,3902592,3902886,0.20148,0.20148},
-{2987707,3912138,3911659,0.397533333333333,0.397533333333333},
-{2987708,3911984,3912211,0.28524,0.28524},
-{2987714,3863323,3865772,1.1786,1.1786},
-{2987715,3865772,3866325,0.28932972972973,0.28932972972973},
-{2987716,3886634,3886749,0.0364705882352941,0.0357692307692308},
-{2987717,3886749,3887173,0.126992307692308,0.126992307692308},
-{2987718,3886749,3886513,0.159777777777778,0.159777777777778},
-{2987719,3888519,3888866,0.204866666666667,0.204866666666667},
-{2987720,3900291,3900605,0.149807142857143,0.123370588235294},
-{2987729,3864644,3864713,0.0748363636363636,1000000},
-{2987730,3864400,3864713,0.0779866666666667,1000000},
-{2987731,3864713,3865039,0.09045,1000000},
-{2987732,3878208,3877874,0.347813333333333,0.326075},
-{2987733,3896279,3896537,0.1452,0.1452},
-{2987748,3896334,3896518,0.17187,0.17187},
-{2987749,3898592,3898879,0.15885,0.15885},
-{2987750,3896971,3897038,1000000,1000000},
-{2987751,3902589,3903380,0.336484615384615,0.460452631578947},
-{2987752,3903380,3903411,0.039227027027027,0.0403166666666667},
-{2987753,3903353,3903380,0.0410333333333333,0.0447636363636364},
-{2987755,3902889,3904075,0.736222222222222,0.736222222222222},
-{2987756,3904305,3904075,0.101528571428571,0.109338461538462},
-{2987757,3904305,3904509,0.116791304347826,1000000},
-{2987758,3904509,3904587,0.033924,0.0332588235294118},
-{2987759,3904315,3904305,0.111981818181818,1000000},
-{2987760,3904090,3904305,0.186622222222222,1000000},
-{2987761,3904172,3905104,1000000,0.534142857142857},
-{2987762,3903710,3904014,0.11067,0.11067},
-{2987763,3904014,3904172,0.0554896551724138,0.0574714285714286},
-{2987764,3904014,3904062,0.0167111111111111,1000000},
-{2987765,3904062,3904484,0.239085714285714,1000000},
-{2987766,3903278,3904062,1000000,0.361419230769231},
-{2987767,3903111,3903090,1000000,0.1018},
-{2987768,3903278,3903251,0.0450893617021277,1000000},
-{2987769,3902572,3902449,0.0938666666666667,0.0938666666666667},
-{2987770,3901367,3900961,0.454488888888889,0.454488888888889},
-{2987771,3901527,3901367,0.122644444444444,0.122644444444444},
-{2987772,3901704,3901527,0.151022222222222,0.151022222222222},
-{2987773,3901873,3901704,0.145644444444444,0.145644444444444},
-{2987774,3904478,3904222,0.167933333333333,0.167933333333333},
-{2987775,3904899,3904935,0.00936842105263158,0.00953571428571428},
-{2987776,3904935,3905140,1000000,0.0882},
-{2987777,3904935,3905088,0.1008,0.1008},
-{2987778,3905140,3905727,0.36705,0.36705},
-{2987781,3905196,3905695,0.165409523809524,0.168077419354839},
-{2987782,3905886,3906450,0.183797014925373,0.1924125},
-{2987783,3906880,3906739,0.202088888888889,0.202088888888889},
-{2987784,3906560,3906739,0.0454090909090909,0.0454090909090909},
-{2987785,3906880,3906560,0.209544,0.194022222222222},
-{2987786,3906560,3906025,0.322913513513513,0.306353846153846},
-{2987814,3849376,3848873,0.592466666666667,0.592466666666667},
-{2987815,3874848,3875270,0.372358064516129,1000000},
-{2987816,3876916,3874848,0.807558620689655,0.6888},
-{2987817,3873650,3874390,0.3552,0.224336842105263},
-{2987818,3873576,3874033,0.3201375,0.150652941176471},
-{2987819,3874110,3875093,0.408733333333333,0.580831578947368},
-{2987820,3874110,3874470,0.507403846153846,1000000},
-{2987821,3872913,3873988,0.77692,0.485575},
-{2987822,3874058,3874110,0.340328571428571,1000000},
-{2987823,3874475,3874542,0.0194052631578947,1000000},
-{2987824,3874351,3874275,1000000,0.102815094339623},
-{2987825,3874542,3874612,0.0180461538461538,1000000},
-{2987826,3874393,3874348,0.114583333333333,1000000},
-{2987827,3874348,3874067,0.15873488372093,1000000},
-{2987828,3874542,3874348,0.117414285714286,1000000},
-{2987829,3874348,3874275,0.023115,1000000},
-{2987830,3874888,3874673,0.1176,0.152188235294118},
-{2987831,3874673,3874254,0.731957142857143,1000000},
-{2987832,3874673,3874786,0.288763636363636,0.288763636363636},
-{2987833,3874058,3874786,0.27136,0.581485714285714},
-{2987865,3903926,3903049,0.391246153846154,0.391246153846154},
-{2987866,3850898,3851082,1000000,0.1316},
-{2987867,3850910,3851116,0.0708171428571429,1000000},
-{2987868,3851076,3851268,0.0726406779661017,0.087465306122449},
-{2987869,3850712,3851268,0.234716129032258,1000000},
-{2987870,3850712,3851959,0.222688235294118,1000000},
-{2987871,3851268,3851959,0.1632,0.17408},
-{2987872,3858060,3858034,1000000,0.11848},
-{2987873,3860260,3859550,0.2348,0.2348},
-{2987874,3856551,3857279,0.37,0.37},
-{2987875,3858697,3857279,0.503072727272727,0.503072727272727},
-{2987876,3857279,3854944,0.883745454545455,0.883745454545455},
-{2987877,3853446,3854944,1.05412727272727,1.05412727272727},
-{2987878,3865908,3864954,1000000,0.664058823529412},
-{2987879,3864770,3864815,0.212731914893617,0.2083},
-{2987880,3864815,3865255,0.269378571428571,0.163969565217391},
-{2987881,3866345,3865744,0.214733333333333,0.214733333333333},
-{2987882,3866379,3865515,0.310866666666667,0.310866666666667},
-{2987883,3866404,3865423,0.391176,0.391176},
-{2987884,3866403,3865419,0.358044444444444,0.358044444444444},
-{2987885,3865744,3866314,0.227266666666667,0.227266666666667},
-{2987886,3865515,3865744,0.130577777777778,0.130577777777778},
-{2987887,3865423,3865515,0.1487,0.1487},
-{2987888,3865419,3865423,0.266857142857143,0.266857142857143},
-{2987889,3865419,3865603,0.208911111111111,0.208911111111111},
-{2987890,3864739,3864815,0.1398,0.0668608695652174},
-{2987891,3864531,3864739,0.276222222222222,0.276222222222222},
-{2987892,3864531,3864984,0.194333333333333,0.194333333333333},
-{2987893,3864824,3865429,1000000,0.360211764705882},
-{2987894,3866334,3865429,0.312,1000000},
-{2987895,3863087,3863517,0.218577777777778,0.218577777777778},
-{2987896,3862276,3862066,1000000,0.0571358490566038},
-{2987897,3862276,3862285,0.0483,0.0399724137931034},
-{2987898,3862360,3862285,1000000,0.0439034482758621},
-{2987899,3851082,3850904,0.113333333333333,1000000},
-{2987900,3851047,3851076,0.0230222222222222,0.024864},
-{2987905,3849621,3848885,0.538371428571429,0.491556521739131},
-{2987906,3848885,3848641,0.1772,0.148848},
-{2987907,3850405,3850208,0.176975,0.184669565217391},
-{2987908,3850621,3850405,0.12495,0.1428},
-{2987909,3850842,3850621,0.1265,0.145961538461538},
-{2987910,3850842,3851015,0.150730434782609,0.119544827586207},
-{2987911,3849788,3849858,0.128817391304348,0.128817391304348},
-{2987912,3849984,3850085,0.125710344827586,0.101266666666667},
-{2987913,3850085,3850207,0.216432,0.208107692307692},
-{2987914,3849858,3849953,0.0461,0.044256},
-{2987915,3849953,3850405,0.258244444444444,0.258244444444444},
-{2987916,3849953,3850251,0.247133333333333,0.193408695652174},
-{2987917,3850251,3850531,0.227966666666667,0.227966666666667},
-{2987918,3850531,3850772,0.2256375,0.190010526315789},
-{2987919,3850772,3850207,0.362928,0.37805},
-{2987920,3850251,3849984,0.19191,0.19191},
-{2987921,3850531,3850085,0.235755555555556,0.235755555555556},
-{2987922,3850531,3850842,0.291825,0.424472727272727},
-{2987923,3850772,3850934,0.0958909090909091,0.0879},
-{2987924,3850251,3850621,0.212622222222222,0.212622222222222},
-{2987956,3871494,3871541,1000000,1000000},
-{2987957,3870997,3871129,0.280452631578947,0.3330375},
-{2987958,3871129,3871179,0.137325,0.0998727272727273},
-{2987959,3904684,3904296,0.216422222222222,0.216422222222222},
-{2987960,3905088,3904684,0.207044444444444,0.207044444444444},
-{2987962,3878766,3879080,1000000,1000000},
-{2987963,3880209,3880377,0.233028571428571,1000000},
-{2987964,3880377,3880536,0.2144,1000000},
-{2987970,3898105,3897660,0.166229268292683,0.400905882352941},
-{2987971,3898166,3898330,1000000,0.0671076923076923},
-{2987972,3898458,3898413,0.0330461538461538,0.0330461538461538},
-{2987973,3898166,3898190,0.2112,0.0918260869565217},
-{2987974,3898190,3898105,0.0385818181818182,0.0748941176470588},
-{2987975,3898413,3898330,0.0473111111111111,0.0672315789473684},
-{2987976,3898190,3898217,0.0441461538461538,0.0604105263157895},
-{2987977,3895285,3895346,0.02304,1000000},
-{2987978,3868516,3868673,0.254526315789474,0.219818181818182},
-{2987979,3869326,3868673,0.253656,0.2439},
-{2987980,3868673,3868546,0.1454,0.153952941176471},
-{2988036,3881469,3881586,0.0499411764705882,1000000},
-{2988037,3881732,3881723,0.0664838709677419,1000000},
-{2988038,3882412,3882244,0.0961363636363636,0.1175},
-{2988039,3882412,3882454,1000000,0.141461538461538},
-{2988040,3882572,3882412,0.231642857142857,0.147409090909091},
-{2988041,3865014,3864949,0.04225,0.04225},
-{2988042,3864872,3864915,0.0523885714285714,0.0470153846153846},
-{2988043,3865894,3865810,0.0436301886792453,0.0453411764705882},
-{2988044,3866172,3866094,0.0446553191489362,0.04664},
-{2988045,3866094,3866029,0.0898857142857143,0.0877953488372093},
-{2988046,3866305,3865103,0.329216666666667,1000000},
-{2988047,3866029,3865894,0.140976,0.135553846153846},
-{2988048,3866029,3866481,0.242618181818182,0.254171428571429},
-{2988049,3864949,3864472,0.239863636363636,1000000},
-{2988050,3864472,3864249,0.1628,1000000},
-{2988051,3864249,3864166,0.217111111111111,0.217111111111111},
-{2988052,3864626,3864360,0.117205714285714,0.117205714285714},
-{2988053,3865894,3866481,0.262453846153846,0.262453846153846},
-{2988142,3880269,3879974,0.18748,1000000},
-{2988143,3879112,3879127,1000000,0.152935135135135},
-{2988144,3879809,3879927,1000000,0.073155},
-{2988145,3879158,3879112,1000000,0.039},
-{2988146,3879279,3879452,1000000,0.0847777777777778},
-{2988147,3878672,3879127,1000000,0.219225},
-{2988148,3878565,3879112,1000000,0.31428},
-{2988149,3879566,3879056,1000000,0.352266666666667},
-{2988150,3879809,3879331,0.32895,1000000},
-{2988152,3865806,3866507,0.2092,1000000},
-{2988153,3866507,3866942,0.1071,1000000},
-{2988154,3866000,3865806,1000000,1000000},
-{2988155,3866000,3866507,0.222685714285714,0.222685714285714},
-{2988156,3888883,3889033,0.0403692307692308,1000000},
-{2988157,3889531,3889609,0.0198585365853659,1000000},
-{2988158,3888586,3888514,0.0382216216216216,0.0328883720930233},
-{2988159,3888586,3888806,0.117105,1000000},
-{2988160,3888995,3889066,1000000,0.101571428571429},
-{2988161,3889438,3889770,0.15741,1000000},
-{2988162,3889770,3889996,0.0795260869565217,1000000},
-{2988163,3889996,3889899,0.0525957446808511,1000000},
-{2988164,3889609,3889899,1000000,0.493866666666667},
-{2988165,3889241,3889167,1000000,0.0240769230769231},
-{2988166,3888909,3888586,0.166548387096774,1000000},
-{2988167,3889960,3890400,1000000,0.295733333333333},
-{2988168,3889092,3889669,0.229303448275862,0.214509677419355},
-{2988169,3888949,3889889,1000000,0.53264347826087},
-{2988170,3879127,3879264,1000000,0.15074},
-{2988171,3879346,3879445,0.06645,1000000},
-{2988172,3879264,3879295,1000000,0.02235},
-{2988173,3879334,3879360,1000000,0.01174},
-{2988174,3880204,3879711,1000000,0.373592307692308},
-{2988175,3879360,3879410,1000000,0.02086},
-{2988176,3879410,3879540,1000000,0.0918},
-{2988177,3879445,3879410,1000000,0.0656086956521739},
-{2988178,3879410,3879403,1000000,0.0128608695652174},
-{2988179,3879427,3879394,0.0140727272727273,1000000},
-{2988180,3879394,3879279,0.0339771428571429,1000000},
-{2988181,3879394,3879452,1000000,0.121628571428571},
-{2988182,3880021,3879711,1000000,0.675952941176471},
-{2988183,3879359,3879330,1000000,0.00818571428571429},
-{2988184,3879303,3879334,1000000,0.0170322580645161},
-{2988185,3879330,3879303,1000000,0.00984285714285714},
-{2988186,3879303,3879199,1000000,0.04296},
-{2988187,3879199,3879297,0.0424615384615385,1000000},
-{2988188,3879297,3879326,0.0108888888888889,1000000},
-{2988189,3879379,3879394,1000000,0.0234947368421053},
-{2988190,3879540,3879442,0.0537642857142857,1000000},
-{2988191,3879442,3879427,0.00678181818181818,1000000},
-{2988192,3879417,3879442,0.0117103448275862,1000000},
-{2988193,3879442,3879510,0.03648,1000000},
-{2988194,3879540,3879510,0.060816,1000000},
-{2988203,3852011,3851830,0.0391866666666667,0.0678230769230769},
-{2988204,3860609,3861604,0.441018181818182,0.4548},
-{2988205,3861723,3861825,0.0920666666666667,0.0920666666666667},
-{2988206,3861723,3862965,0.705155555555556,0.705155555555556},
-{2988207,3890689,3890722,0.104155555555556,0.104155555555556},
-{2988208,3901875,3901829,1000000,1000000},
-{2988209,3853338,3853251,0.201503225806452,0.19520625},
-{2988210,3853477,3853338,0.2123,0.19903125},
-{2988211,3853899,3853477,0.257668965517241,0.241045161290323},
-{2988212,3853849,3853338,0.340866666666667,0.340866666666667},
-{2988213,3854240,3853849,0.20532,0.23954},
-{2988214,3854240,3853477,0.440288888888889,0.440288888888889},
-{2988215,3854256,3854394,0.0646666666666667,0.0646666666666667},
-{2988221,3857474,3857132,0.120625531914894,0.120625531914894},
-{2988222,3857132,3856626,0.204984,0.209167346938776},
-{2988223,3856626,3856413,0.0768576923076923,0.0815632653061225},
-{2988224,3857474,3857326,0.0980823529411765,0.069475},
-{2988225,3857326,3857080,0.1808,0.1808},
-{2988226,3857326,3857051,0.2286,0.155121428571429},
-{2988227,3857051,3856759,0.177288888888889,0.177288888888889},
-{2988228,3857051,3856786,0.184608,0.23076},
-{2988229,3856786,3856557,0.224921739130435,0.235145454545455},
-{2988230,3856626,3856557,0.0510642857142857,0.0461225806451613},
-{2988231,3856537,3856786,0.22878,0.22878},
-{2988232,3856255,3856557,0.281505882352941,0.281505882352941},
-{2988233,3856557,3855954,0.424666666666667,0.4095},
-{2988234,3855608,3855954,0.37404,0.37404},
-{2988235,3857747,3857132,0.5298,0.504571428571429},
-{2988236,3856840,3856525,0.223371428571429,0.223371428571429},
-{2988237,3857269,3856840,0.225933333333333,0.244008},
-{2988238,3857269,3857263,0.092928,0.0801103448275862},
-{2988239,3857678,3857263,0.186644444444444,0.186644444444444},
-{2988240,3857747,3856887,1000000,0.425955555555556},
-{2988241,3857263,3856887,0.159832258064516,0.133913513513514},
-{2988242,3856887,3856413,0.228511111111111,0.186963636363636},
-{2988243,3856172,3855682,0.281318181818182,0.269086956521739},
-{2988244,3855954,3855687,0.22998947368421,0.22998947368421},
-{2988245,3854176,3854052,0.0418212765957447,0.0531243243243243},
-{2988246,3854709,3854176,0.247533333333333,0.238692857142857},
-{2988247,3855687,3855124,0.311192307692308,0.288964285714286},
-{2988248,3855124,3854903,0.17928,0.17928},
-{2988249,3854903,3854947,0.039275,0.04713},
-{2988250,3854903,3854236,0.49692,0.382246153846154},
-{2988251,3854236,3853986,0.229275,0.146736},
-{2988252,3854052,3853986,0.050825,0.0580857142857143},
-{2988253,3853675,3854236,1.07385882352941,1.82556},
-{2988254,3853675,3853986,1.16731578947368,2.01627272727273},
-{2988255,3854551,3855124,1.36370769230769,1.36370769230769},
-{2988256,3855298,3855687,0.521435294117647,0.521435294117647},
-{2988257,3854052,3852900,0.341476595744681,0.3489},
-{2988258,3852373,3852753,0.128804081632653,0.121373076923077},
-{2988259,3863309,3863194,0.07335,0.0851806451612903},
-{2988260,3863566,3863309,0.143288888888889,0.143288888888889},
-{2988261,3863566,3863666,0.0751777777777778,0.0751777777777778},
-{2988262,3895278,3895273,0.10614,1000000},
-{2988263,3895273,3895285,0.03075,1000000},
-{2988264,3895193,3895273,1000000,0.047232},
-{2988265,3895327,3895371,0.0208434782608696,1000000},
-{2988266,3895273,3895327,1000000,0.0375157894736842},
-{2988267,3895327,3895434,1000000,0.1286},
-{2988269,3923738,3924198,0.280984615384615,0.254846511627907},
-{2988280,3880539,3880568,0.0283741935483871,0.0517411764705882},
-{2988281,3920536,3920636,0.0443684210526316,0.0411219512195122},
-{2988282,3920057,3920536,0.189097297297297,0.199902857142857},
-{2988283,3920189,3920536,0.277666666666667,0.277666666666667},
-{2988284,3920057,3920189,0.0888222222222222,0.0888222222222222},
-{2988285,3861281,3861303,0.2298,0.2298},
-{2988286,3874069,3873370,0.54904,0.358069565217391},
-{2988287,3854442,3854263,0.06717,0.06717},
-{2988288,3854970,3854442,0.311436363636364,0.311436363636364},
-{2988289,3854442,3856551,0.917163636363636,0.917163636363636},
-{2988290,3895434,3895371,0.0911684210526316,1000000},
-{2988291,3852800,3851836,0.298263157894737,0.28335},
-{2988292,3851836,3851640,0.077325,0.0759684210526316},
-{2988293,3861034,3860070,0.442133333333333,0.442133333333333},
-{2988294,3861570,3859873,0.82993125,0.88526},
-{2988295,3862229,3861034,0.493,0.493},
-{2988296,3861323,3860526,0.454384615384615,0.407379310344828},
-{2988374,3868864,3868741,0.0387488372093023,0.0362217391304348},
-{2988375,3869012,3868864,0.0638926829268293,0.0623714285714286},
-{2988376,3868074,3866775,0.523644444444444,0.523644444444444},
-{2988377,3914048,3913716,0.0884086956521739,1000000},
-{2988378,3914381,3914098,0.148533333333333,0.148533333333333},
-{2988379,3867678,3867833,0.0709111111111111,0.0709111111111111},
-{2988380,3866304,3866509,0.119,0.0973636363636364},
-{2988383,3912605,3912914,0.127386206896552,0.108652941176471},
-{2988384,3912914,3913169,0.0862666666666667,0.0862666666666667},
-{2988385,3913755,3914089,0.172575,0.172575},
-{2988386,3914128,3913502,0.283333333333333,0.283333333333333},
-{2988387,3913254,3913830,0.288733333333333,0.288733333333333},
-{2988388,3913831,3914089,0.16941,0.2117625},
-{2988389,3913502,3913831,0.117464516129032,0.117464516129032},
-{2988390,3913254,3913502,0.124903448275862,0.124903448275862},
-{2988391,3912914,3913254,0.18552,0.176685714285714},
-{2988392,3913522,3913830,0.178326315789474,0.178326315789474},
-{2988393,3913169,3913522,0.147193548387097,0.157344827586207},
-{2988395,3884331,3884195,0.04944375,0.0586},
-{2988396,3884569,3884331,0.114288,0.19048},
-{2988397,3894587,3895293,1000000,1000000},
-{2988401,3871186,3871767,0.263022222222222,0.263022222222222},
-{2988402,3870390,3871425,0.393533333333333,0.393533333333333},
-{2988403,3869193,3866325,0.776595348837209,0.795085714285714},
-{2988404,3882419,3883271,0.253983333333333,0.253983333333333},
-{2988405,3881031,3882681,1.36275555555556,1.36275555555556},
-{2988414,3877381,3876129,0.5634,0.5634},
-{2988415,3879963,3879254,0.696857142857143,0.562846153846154},
-{2988416,3880664,3881335,0.368309090909091,0.368309090909091},
-{2988417,3880664,3880648,0.290363636363636,0.290363636363636},
-{2988418,3877338,3877547,0.0411294117647059,0.0437},
-{2988419,3878422,3878792,0.0979914893617021,0.092112},
-{2988420,3878844,3878434,0.270993103448276,0.270993103448276},
-{2988421,3876171,3876400,0.108925,0.104568},
-{2988422,3876849,3877193,0.286984615384615,0.24872},
-{2988423,3877193,3877942,0.33135652173913,0.544371428571429},
-{2988424,3877942,3878111,0.100658823529412,0.122228571428571},
-{2988425,3878111,3878434,0.3079,0.284215384615385},
-{2988426,3877109,3876171,1.16257777777778,1.16257777777778},
-{2988427,3877338,3876400,1.15246666666667,1.15246666666667},
-{2988428,3877858,3876849,1.13637777777778,1.13637777777778},
-{2988429,3878792,3877942,1.12284444444444,1.12284444444444},
-{2988430,3878911,3878111,1.11826666666667,1.11826666666667},
-{2988433,3871415,3873471,1.20164444444444,1.20164444444444},
-{2988435,3870723,3872709,1.22611111111111,1.22611111111111},
-{2988442,3875675,3876017,1000000,0.0905744680851064},
-{2988443,3875663,3875718,0.03754,0.03519375},
-{2988444,3875761,3875896,0.0851828571428571,1000000},
-{2988445,3875761,3875827,1000000,0.102},
-{2988449,3897628,3896422,1000000,1000000},
-{2988470,3860921,3861050,1000000,1000000},
-{2988471,3862314,3862617,1000000,1000000},
-{2988472,3853101,3852940,1000000,1000000},
-{2988473,3852770,3851487,1000000,1000000},
-{2988474,3852770,3853721,1000000,1000000},
-{2988475,3852579,3851536,0.343164705882353,0.307042105263158},
-{2988476,3852940,3852579,0.12514,0.129455172413793},
-{2988477,3858948,3858673,1000000,1000000},
-{2988478,3878244,3878247,1000000,1000000},
-{2988479,3877995,3878244,1000000,1000000},
-{2988480,3877678,3877978,1000000,1000000},
-{2988481,3877995,3878458,1000000,1000000},
-{2988482,3878244,3878771,1000000,1000000},
-{2988483,3877284,3877573,1000000,1000000},
-{2988484,3878276,3878938,1000000,1000000},
-{2988485,3878339,3878930,1000000,1000000},
-{2988486,3877339,3877478,1000000,1000000},
-{2988487,3877285,3877339,1000000,1000000},
-{2988488,3877478,3877264,1000000,1000000},
-{2988489,3876992,3877285,1000000,1000000},
-{2988490,3875851,3876011,1000000,1000000},
-{2988491,3878938,3879416,1000000,1000000},
-{2988492,3859735,3859509,1000000,1000000},
-{2988493,3858108,3857939,1000000,1000000},
-{2988494,3860954,3860815,1000000,1000000},
-{2988495,3859869,3859735,1000000,1000000},
-{2988496,3860398,3860319,1000000,1000000},
-{2988497,3861699,3861631,1000000,1000000},
-{2988498,3861459,3861043,1000000,1000000},
-{2988499,3862732,3862323,1000000,1000000},
-{2988500,3869938,3870178,1000000,1000000},
-{2988501,3870178,3870519,1000000,1000000},
-{2988502,3871403,3870884,1000000,1000000},
-{2988503,3855304,3855807,1000000,1000000},
-{2988504,3855807,3856794,1000000,1000000},
-{2988505,3856794,3857125,1000000,1000000},
-{2988506,3860056,3860204,1000000,1000000},
-{2988507,3861856,3861680,1000000,1000000},
-{2988508,3861343,3861168,1000000,1000000},
-{2988509,3882079,3882425,1000000,1000000},
-{2988510,3885812,3885965,1000000,1000000},
-{2988511,3856389,3856426,1000000,1000000},
-{2988512,3856965,3856823,1000000,1000000},
-{2988513,3867031,3866777,0.0724307692307692,0.0763459459459459},
-{2988514,3867302,3867031,0.0796263157894737,0.0817783783783784},
-{2988515,3865550,3865196,0.17864347826087,1000000},
-{2988516,3865196,3865085,1000000,0.292928571428571},
-{2988517,3870019,3869800,1000000,1000000},
-{2988518,3870250,3870019,1000000,1000000},
-{2988519,3870513,3870291,1000000,1000000},
-{2988520,3873946,3874181,1000000,1000000},
-{2988521,3860488,3860352,1000000,1000000},
-{2988522,3869483,3869008,1000000,1000000},
-{2988523,3869840,3869672,1000000,1000000},
-{2988524,3870196,3870110,1000000,1000000},
-{2988525,3868889,3868735,1000000,1000000},
-{2988526,3868735,3868398,1000000,1000000},
-{2988527,3878989,3878621,1000000,1000000},
-{2988528,3859674,3859221,1000000,1000000},
-{2988529,3858805,3859199,1000000,1000000},
-{2988530,3867017,3866058,1000000,1000000},
-{2988531,3874060,3873823,1000000,1000000},
-{2988532,3874804,3874787,1000000,1000000},
-{2988533,3875960,3875145,1000000,1000000},
-{2988534,3875960,3876069,1000000,1000000},
-{2988535,3890443,3890539,0.0985777777777778,0.0985777777777778},
-{2988538,3920189,3920611,1000000,1000000},
-{2988539,3921180,3920611,1000000,1000000},
-{2988540,3921678,3921908,1000000,1000000},
-{2988541,3921908,3922302,1000000,1000000},
-{2988542,3922513,3922611,1000000,1000000},
-{2988543,3922611,3922709,1000000,1000000},
-{2988544,3922709,3922862,1000000,1000000},
-{2988545,3922862,3923096,1000000,1000000},
-{2988546,3858741,3858469,0.18012,0.128657142857143},
-{2988547,3859599,3858741,0.31625625,0.297652941176471},
-{2988548,3859430,3858579,0.422110344827586,0.422110344827586},
-{2988549,3858579,3858741,0.30801,0.267834782608696},
-{2988550,3858352,3858579,0.387654545454545,0.341136},
-{2988551,3858344,3858352,0.3288,0.34524},
-{2988552,3858352,3859118,0.315355555555556,0.315355555555556},
-{2988573,3867480,3867306,1000000,1000000},
-{2988575,3890739,3891023,0.118820689655172,0.123064285714286},
-{2988576,3871129,3872741,1.20818571428571,1.20818571428571},
-{2988577,3869257,3869202,1000000,1000000},
-{2988578,3868844,3868627,1000000,1000000},
-{2988592,3851185,3851108,0.0759931034482759,0.0958173913043478},
-{2988593,3851361,3851575,0.123348387096774,0.11949375},
-{2988594,3851361,3851282,0.0867428571428571,0.083751724137931},
-{2988595,3851185,3851342,0.0709,1000000},
-{2988596,3851342,3851282,0.05422,1000000},
-{2988597,3851527,3851342,0.0607411764705882,0.0666193548387097},
-{2988598,3852184,3851527,0.251806451612903,0.236545454545455},
-{2988599,3851108,3850839,0.207633333333333,0.207633333333333},
-{2988623,3863888,3863323,0.467111111111111,0.467111111111111},
-{2988624,3866916,3866510,0.14289375,0.207845454545455},
-{2988625,3866510,3865974,0.187954838709677,0.2158},
-{2988626,3864027,3864126,1000000,1000000},
-{2988629,3877505,3877257,0.2734,0.210307692307692},
-{2988630,3877650,3877257,0.164025,0.160677551020408},
-{2988655,3853390,3853272,1000000,1000000},
-{2988656,3852378,3852293,1000000,1000000},
-{2988657,3851943,3851857,1000000,1000000},
-{2988668,3878037,3877665,1000000,1000000},
-{2988669,3878467,3878069,1000000,1000000},
-{2988670,3856451,3856530,0.1057,0.100136842105263},
-{2988671,3856588,3856451,0.188016,0.174088888888889},
-{2988672,3856639,3856588,0.054096,0.0483},
-{2988673,3856451,3856376,0.0354315789473684,0.0354315789473684},
-{2988674,3856376,3856398,0.123088888888889,0.123088888888889},
-{2988675,3856376,3856131,0.0941333333333333,0.0941333333333333},
-{2988676,3856131,3856099,0.1086,0.1086},
-{2988677,3856131,3856157,0.0601555555555556,0.0601555555555556},
-{2988678,3856588,3856293,0.189444444444444,0.189444444444444},
-{2988679,3870010,3869623,1000000,1000000},
-{2988680,3868229,3868722,1000000,1000000},
-{2988681,3868722,3868781,1000000,1000000},
-{2988682,3868781,3868790,1000000,1000000},
-{2988683,3869110,3869450,1000000,1000000},
-{2988684,3869813,3869450,1000000,1000000},
-{2988685,3869813,3870078,1000000,1000000},
-{2988686,3867664,3867208,1000000,1000000},
-{2988687,3867208,3866454,1000000,1000000},
-{2988688,3866998,3866454,1000000,1000000},
-{2988689,3866998,3867389,1000000,1000000},
-{2988690,3868443,3867389,1000000,1000000},
-{2988691,3871012,3869903,1000000,1000000},
-{2988692,3871829,3871652,1000000,1000000},
-{2988693,3872579,3872231,1000000,1000000},
-{2988694,3871701,3872135,1000000,1000000},
-{2988695,3872447,3872135,1000000,1000000},
-{2988696,3868968,3868742,1000000,1000000},
-{2988697,3868938,3868443,1000000,1000000},
-{2988698,3869903,3868938,1000000,1000000},
-{2988699,3868938,3868968,1000000,1000000},
-{2988700,3869186,3868938,1000000,1000000},
-{2988701,3867657,3867404,1000000,1000000},
-{2988702,3867922,3867657,1000000,1000000},
-{2988703,3866270,3865890,1000000,1000000},
-{2988704,3865890,3865716,1000000,1000000},
-{2988705,3866653,3866368,1000000,1000000},
-{2988706,3867160,3866933,1000000,1000000},
-{2988707,3866933,3866618,1000000,1000000},
-{2988708,3871234,3871209,0.108733333333333,1000000},
-{2988709,3870985,3871234,0.146255172413793,1000000},
-{2988710,3870989,3871228,1000000,1000000},
-{2988711,3871249,3870989,1000000,1000000},
-{2988712,3871508,3871228,1000000,1000000},
-{2988713,3871228,3871392,1000000,1000000},
-{2988714,3871392,3871701,1000000,1000000},
-{2988715,3871701,3872281,1000000,1000000},
-{2988716,3872281,3872701,1000000,1000000},
-{2988717,3872281,3872284,1000000,1000000},
-{2988718,3872284,3872210,1000000,1000000},
-{2988719,3872284,3871234,1000000,1000000},
-{2988720,3872210,3871769,1000000,1000000},
-{2988721,3871769,3871660,1000000,1000000},
-{2988722,3872281,3872315,1000000,1000000},
-{2988723,3871652,3871392,1000000,1000000},
-{2988724,3872703,3872476,1000000,1000000},
-{2988725,3871570,3871056,1000000,1000000},
-{2988726,3870953,3870650,1000000,1000000},
-{2988727,3870733,3871099,1000000,1000000},
-{2988728,3870815,3871053,1000000,1000000},
-{2988729,3868700,3868289,1000000,1000000},
-{2988730,3871699,3871325,1000000,1000000},
-{2988731,3868689,3868922,1000000,1000000},
-{2988732,3869253,3869258,1000000,1000000},
-{2988733,3869258,3869270,1000000,1000000},
-{2988734,3859303,3859078,0.248172413793103,0.248172413793103},
-{2988735,3859078,3858859,1000000,1000000},
-{2988736,3859375,3859078,0.126666666666667,0.126666666666667},
-{2988737,3859505,3859375,0.0550222222222222,0.0550222222222222},
-{2988738,3860095,3859505,0.364628571428571,0.364628571428571},
-{2988739,3859303,3859613,0.160063636363636,0.160063636363636},
-{2988740,3861175,3859823,0.824314285714286,0.824314285714286},
-{2988741,3861430,3861318,1000000,1000000},
-{2988742,3859257,3858750,0.207675,1000000},
-{2988743,3859582,3859257,0.156690909090909,1000000},
-{2988744,3860205,3859582,0.282545454545455,1000000},
-{2988745,3858510,3858410,0.291910344827586,0.325592307692308},
-{2988746,3860099,3859883,0.300311111111111,0.300311111111111},
-{2988747,3860763,3859883,0.44805,0.467530434782609},
-{2988748,3859100,3858410,0.308977777777778,0.320861538461538},
-{2988749,3859100,3859420,0.284452173913044,0.384847058823529},
-{2988750,3858510,3859420,0.541936363636364,0.458561538461538},
-{2988751,3859420,3859582,1000000,1000000},
-{2988752,3863627,3863716,0.216755555555556,0.216755555555556},
-{2988753,3864101,3863716,0.202666666666667,0.202666666666667},
-{2988757,3897737,3897850,0.0832046511627907,0.0616862068965517},
-{2988789,3870895,3871039,1000000,1000000},
-{2988790,3871039,3871244,1000000,1000000},
-{2988791,3870604,3870727,1000000,1000000},
-{2988792,3870727,3871236,1000000,1000000},
-{2988793,3874184,3874485,1000000,1000000},
-{2988794,3872404,3872683,1000000,1000000},
-{2988795,3871277,3871643,0.0866125,1000000},
-{2988796,3871643,3871916,0.0609176470588235,1000000},
-{2988797,3871063,3871102,1000000,1000000},
-{2988798,3871369,3871639,1000000,1000000},
-{2988799,3871063,3871323,1000000,0.264545454545455},
-{2988800,3871916,3872305,0.0861056603773585,1000000},
-{2988801,3872229,3872194,1000000,1000000},
-{2988802,3872194,3871832,1000000,1000000},
-{2988803,3871832,3871639,1000000,1000000},
-{2988804,3871832,3871639,1000000,1000000},
-{2988805,3871369,3871323,1000000,1000000},
-{2988806,3872194,3871941,1000000,1000000},
-{2988807,3871323,3871321,1000000,0.0897724137931034},
-{2988808,3871323,3871683,1000000,1000000},
-{2988809,3871683,3871437,1000000,1000000},
-{2988810,3873130,3873334,1000000,1000000},
-{2988811,3873387,3873757,0.161155555555556,1000000},
-{2988812,3874174,3874524,0.181555555555556,0.181555555555556},
-{2988813,3874044,3874131,1000000,1000000},
-{2988814,3877845,3878270,1000000,1000000},
-{2988815,3878270,3878599,1000000,1000000},
-{2988816,3878599,3878724,1000000,1000000},
-{2988817,3878724,3878668,1000000,1000000},
-{2988818,3878724,3878658,1000000,1000000},
-{2988892,3851487,3851093,1000000,1000000},
-{2988893,3851186,3850804,1000000,1000000},
-{2988894,3874448,3874585,1000000,1000000},
-{2988895,3876192,3876030,1000000,1000000},
-{2988896,3875078,3873685,0.612533333333333,0.612533333333333},
-{2988897,3872747,3872119,1000000,1000000},
-{2988898,3872119,3871748,1000000,1000000},
-{2988899,3871748,3870714,1000000,1000000},
-{2988900,3872275,3872119,1000000,1000000},
-{2989062,3865162,3865193,1000000,1000000},
-{2989063,3865193,3865240,1000000,1000000},
-{2989064,3891457,3892592,1000000,1000000},
-{2989065,3890883,3891454,1000000,1000000},
-{2989066,3891454,3891991,1000000,1000000},
-{2989067,3891991,3891925,1000000,1000000},
-{2989068,3891006,3891925,1000000,1000000},
-{2989069,3890902,3890183,1000000,1000000},
-{2989070,3892623,3892855,1000000,1000000},
-{2989071,3892708,3892623,1000000,1000000},
-{2989072,3890924,3891210,1000000,1000000},
-{2989073,3891210,3891335,1000000,1000000},
-{2989077,3905498,3905735,1000000,0.0626666666666667},
-{2989078,3905735,3905897,1000000,0.0415698113207547},
-{2989081,3905414,3904360,0.614958620689655,0.660511111111111},
-{2989082,3904360,3903947,0.3704,0.241565217391304},
-{2989100,3904360,3904473,0.0773555555555556,0.0773555555555556},
-{2989101,3901217,3901671,1000000,0.125207547169811},
-{2989102,3901671,3902140,1000000,0.131952},
-{2989103,3901967,3901628,0.18001935483871,0.214638461538462},
-{2989104,3902430,3902081,1000000,1000000},
-{2989124,3903021,3903090,0.0911076923076923,1000000},
-{2989125,3902986,3903078,0.0721258064516129,0.07453},
-{2989126,3903021,3903111,0.0547615384615385,1000000},
-{2989127,3896018,3896695,0.267938181818182,1000000},
-{2989128,3893726,3893322,1000000,0.137371428571429},
-{2989130,3888113,3888736,0.27345,1000000},
-{2989131,3888033,3888113,0.05964,1000000},
-{2989141,3861298,3861682,1000000,1000000},
-{2989142,3861053,3861394,1000000,1000000},
-{2989143,3917395,3917569,0.20572,0.20572},
-{2989144,3917261,3917502,0.238033333333333,0.2677875},
-{2989145,3917261,3917395,0.10827,0.10827},
-{2989146,3875558,3875698,0.0338478260869565,0.0346},
-{2989147,3874524,3874723,0.0681631578947368,1000000},
-{2989148,3874723,3874905,0.0748666666666667,1000000},
-{2989149,3874902,3874723,0.0620823529411765,1000000},
-{2989150,3875010,3874771,0.0863294117647059,1000000},
-{2989151,3874771,3874259,0.228783333333333,1000000},
-{2989152,3874902,3874771,0.0500869565217391,1000000},
-{2989159,3900206,3900177,1000000,0.0483054545454545},
-{2989160,3864954,3864770,1000000,0.09831},
-{2989161,3864961,3864926,0.127933333333333,0.127933333333333},
-{2989162,3865554,3864926,0.231555555555556,0.231555555555556},
-{2989163,3865353,3864961,0.131622222222222,0.131622222222222},
-{2989172,3877464,3877004,1000000,0.256495081967213},
-{2989174,3877102,3876865,1000000,1000000},
-{2989175,3878618,3878624,0.0606,1000000},
-{2989176,3878618,3878430,1000000,0.123484615384615},
-{2989178,3864926,3864954,0.150844444444444,0.150844444444444},
-{2989179,3865008,3865002,0.0454864864864865,1000000},
-{2989180,3865002,3864934,0.0260117647058824,1000000},
-{2989182,3866161,3866068,0.113653846153846,1000000},
-{2989183,3866073,3865993,0.08016,0.0572571428571428},
-{2989184,3863081,3862763,0.12504,1000000},
-{2989185,3854609,3854263,0.282506896551724,0.287463157894737},
-{2989186,3918609,3919497,0.199511111111111,0.203275471698113},
-{2989187,3918700,3918455,0.17348275862069,1000000},
-{2989188,3918455,3918946,0.161133333333333,1000000},
-{2989192,3920913,3919855,0.316015384615385,1000000},
-{2989193,3919649,3919884,0.0578588235294118,0.0602204081632653},
-{2989194,3919884,3920047,0.0436666666666667,0.0453461538461538},
-{2989195,3920330,3919855,0.24579512195122,1000000},
-{2989196,3919430,3919808,0.183014117647059,1000000},
-{2989197,3919430,3919649,0.421210344827586,1000000},
-{2989198,3918700,3918752,0.0305025,1000000},
-{2989199,3918752,3918946,0.1254075,1000000},
-{2989200,3919137,3918941,0.132,1000000},
-{2989201,3918941,3918867,0.0561375,1000000},
-{2989202,3918867,3918555,0.215772972972973,1000000},
-{2989203,3918943,3918589,0.0870244897959184,0.085284},
-{2989204,3918589,3918378,0.0510941176470588,0.0491660377358491},
-{2989205,3918378,3917292,0.315714893617021,0.3091375},
-{2989206,3918387,3918609,0.0487777777777778,0.0496981132075472},
-{2989207,3918367,3918700,0.236732432432432,1000000},
-{2989208,3917704,3918035,0.242305263157895,1000000},
-{2989209,3918035,3918367,0.209212987012987,1000000},
-{2989210,3918555,3918247,0.204280519480519,1000000},
-{2989211,3918035,3917503,0.275818867924528,1000000},
-{2989212,3917503,3917319,0.0725625,1000000},
-{2989213,3919497,3919192,0.145991489361702,1000000},
-{2989214,3917245,3916335,0.876027272727273,0.8964},
-{2989215,3917162,3917292,0.0539454545454546,1000000},
-{2989216,3917319,3917245,0.0457875,1000000},
-{2989217,3917245,3917118,0.075825,1000000},
-{2989218,3917118,3917162,0.0503625,1000000},
-{2989219,3920062,3919797,0.218654545454545,0.218654545454545},
-{2989220,3918943,3919192,0.107514893617021,1000000},
-{2989221,3918943,3918555,1000000,0.390875},
-{2989225,3857511,3857952,0.125033333333333,1000000},
-{2989226,3859191,3858718,0.420727272727273,0.420727272727273},
-{2989227,3859282,3859191,0.059328,0.0478451612903226},
-{2989228,3859177,3859445,0.0639333333333333,1000000},
-{2989229,3860691,3860665,0.169745454545455,1000000},
-{2989230,3860622,3860512,0.0782780487804878,1000000},
-{2989231,3860512,3860467,0.0176869565217391,0.0246545454545455},
-{2989232,3860844,3860851,1000000,0.0607058823529412},
-{2989233,3860851,3860876,1000000,0.0262384615384615},
-{2989234,3860754,3860851,1000000,0.122672727272727},
-{2989235,3860876,3860964,1000000,0.0521823529411765},
-{2989236,3860865,3860964,0.0343783783783784,1000000},
-{2989237,3860876,3860865,1000000,0.03951},
-{2989238,3862075,3861882,0.0626516129032258,1000000},
-{2989239,3861136,3861084,0.0164705882352941,1000000},
-{2989240,3866231,3865304,0.226554545454545,0.207675},
-{2989241,3865304,3865217,0.136466666666667,1000000},
-{2989242,3865822,3865217,1000000,0.147279069767442},
-{2989243,3865217,3865048,1000000,0.0424},
-{2989244,3865217,3865174,0.0334857142857143,1000000},
-{2989245,3866067,3865993,0.0325058823529412,1000000},
-{2989246,3866067,3865903,0.0911428571428571,1000000},
-{2989247,3865903,3865779,0.0662210526315789,0.0699},
-{2989248,3865133,3865282,1000000,0.0388216216216216},
-{2989249,3866437,3865822,1000000,0.107018181818182},
-{2989250,3865822,3865804,0.0430125,0.028675},
-{2989251,3866416,3866437,0.0298857142857143,0.0285272727272727},
-{2989252,3869196,3868567,0.117,1000000},
-{2989253,3869196,3869216,0.0195942857142857,1000000},
-{2989254,3869267,3869279,1000000,0.0223},
-{2989255,3869216,3869405,0.1656,1000000},
-{2989256,3869492,3869405,0.0365181818181818,0.0382571428571429},
-{2989257,3869839,3869749,0.0381,0.0331304347826087},
-{2989258,3870973,3870540,0.0973090909090909,1000000},
-{2989259,3870481,3869716,0.15631914893617,1000000},
-{2989260,3870384,3870181,1000000,0.0478046511627907},
-{2989261,3869716,3869660,0.0744,0.053568},
-{2989262,3868927,3869038,0.0434333333333333,1000000},
-{2989263,3868994,3869038,1000000,0.0371489361702128},
-{2989264,3868641,3868994,1000000,0.233297872340426},
-{2989265,3868994,3868927,0.0341555555555556,1000000},
-{2989266,3868994,3868904,0.0410076923076923,1000000},
-{2989267,3868549,3868641,1000000,0.07475},
-{2989268,3868641,3868577,1000000,0.03882},
-{2989269,3868458,3868549,1000000,0.0381714285714286},
-{2989270,3867982,3868458,0.310432653061225,1000000},
-{2989271,3867788,3867982,0.181455,1000000},
-{2989272,3867982,3868098,0.04539,0.0534},
-{2989273,3871459,3870910,1000000,0.143351351351351},
-{2989274,3872085,3871538,0.1069,1000000},
-{2989275,3871538,3871459,1000000,0.0471},
-{2989276,3872653,3872036,1000000,0.141842857142857},
-{2989277,3872085,3872036,0.0718875,1000000},
-{2989278,3873217,3873091,1000000,0.0451333333333333},
-{2989279,3873108,3872978,0.0399,1000000},
-{2989280,3874015,3873475,1000000,0.139373333333333},
-{2989281,3869573,3869169,1000000,0.1317375},
-{2989282,3869812,3869814,0.0300166666666667,1000000},
-{2989283,3869886,3869867,1000000,0.13164},
-{2989284,3869766,3869836,0.0502736842105263,1000000},
-{2989285,3869867,3869836,1000000,0.0412875},
-{2989286,3869886,3869814,1000000,0.0366521739130435},
-{2989287,3870035,3870122,1000000,0.06438},
-{2989288,3869531,3869452,0.02892,0.0262909090909091},
-{2989289,3869452,3869636,0.191375,1000000},
-{2989290,3869707,3869896,1000000,0.268135135135135},
-{2989291,3869707,3869636,0.038175,0.0436285714285714},
-{2989292,3873475,3873518,0.0825230769230769,1000000},
-{2989293,3874258,3874175,1000000,0.0217066666666667},
-{2989294,3874199,3874175,0.0375677419354839,1000000},
-{2989295,3875297,3875293,0.07832,1000000},
-{2989296,3876147,3875796,1000000,0.107618181818182},
-{2989297,3875819,3875784,0.0119846153846154,1000000},
-{2989298,3876147,3876097,0.0594,1000000},
-{2989299,3876180,3876147,0.152618181818182,1000000},
-{2989300,3876771,3876147,1000000,0.176386363636364},
-{2989301,3875746,3875859,0.0499555555555556,1000000},
-{2989302,3876130,3876180,0.032325,1000000},
-{2989303,3876130,3876498,0.10551,1000000},
-{2989304,3872378,3872222,1000000,0.0744},
-{2989305,3872781,3872388,0.18081,0.139084615384615},
-{2989306,3872388,3872378,0.0799411764705882,1000000},
-{2989307,3872222,3871651,1000000,0.28872},
-{2989308,3870343,3870168,0.08763,0.0449384615384615},
-{2989309,3874035,3874015,0.0648,1000000},
-{2989310,3876012,3876841,0.206832558139535,1000000},
-{2989311,3875776,3875721,0.0352105263157895,0.0352105263157895},
-{2989312,3875390,3875486,1000000,0.0252571428571429},
-{2989313,3875374,3875453,0.0265421052631579,1000000},
-{2989314,3875374,3875257,0.2142,1000000},
-{2989315,3875390,3875374,0.0400875,1000000},
-{2989316,3875257,3875160,0.112144186046512,1000000},
-{2989317,3876867,3876841,0.0647181818181818,0.0678},
-{2989318,3872222,3872125,0.0457304347826087,0.0553578947368421},
-{2989319,3877707,3878139,1000000,0.0962790697674419},
-{2989320,3877707,3876867,0.28392,1000000},
-{2989321,3878139,3878107,0.048825,0.0558},
-{2989322,3877707,3878205,1000000,1000000},
-{2989323,3879801,3879148,1000000,0.285768},
-{2989324,3878875,3878910,0.0860727272727273,1000000},
-{2989325,3878875,3879088,1000000,0.0622378378378378},
-{2989326,3879148,3878941,1000000,0.0433888888888889},
-{2989327,3879088,3878910,0.0430415094339623,1000000},
-{2989328,3879088,3879148,0.0215032258064516,0.0215032258064516},
-{2989329,3878910,3878941,0.0350666666666667,0.02104},
-{2989330,3879222,3879603,1000000,0.126437837837838},
-{2989331,3878916,3879222,1000000,0.0888615384615385},
-{2989332,3878916,3878897,0.0360947368421053,0.0263769230769231},
-{2989333,3878416,3878916,1000000,0.305514285714286},
-{2989334,3877902,3878416,1000000,0.186929032258065},
-{2989335,3877266,3877902,1000000,0.192158823529412},
-{2989336,3878416,3878393,0.02226,0.027825},
-{2989337,3876720,3877270,0.20736,1000000},
-{2989338,3877266,3877270,0.0394736842105263,0.0340909090909091},
-{2989339,3876535,3876748,1000000,0.0794689655172414},
-{2989340,3879536,3879622,0.0247527272727273,1000000},
-{2989341,3879464,3879536,0.054575,1000000},
-{2989342,3879464,3879603,1000000,0.072075},
-{2989343,3880977,3880680,0.0771396226415094,1000000},
-{2989344,3881291,3881329,0.01532,0.0160325581395349},
-{2989345,3881399,3881370,0.0113678571428571,0.0115745454545455},
-{2989346,3880911,3880713,1000000,0.0907555555555556},
-{2989347,3880911,3881000,0.0983032258064516,1000000},
-{2989348,3880680,3880678,1000000,0.10545},
-{2989349,3880977,3880678,0.108794117647059,1000000},
-{2989350,3876742,3876771,0.0384,0.0301714285714286},
-{2989351,3877377,3876742,0.234697297297297,1000000},
-{2989352,3877377,3877371,0.09268,1000000},
-{2989353,3878105,3877822,0.241885714285714,1000000},
-{2989354,3878307,3878145,0.297888888888889,1000000},
-{2989355,3878408,3878377,0.00978947368421053,0.00978947368421053},
-{2989356,3878377,3878290,0.0624,1000000},
-{2989357,3878334,3878290,0.0371555555555556,1000000},
-{2989358,3878667,3878412,1000000,1000000},
-{2989359,3878884,3878815,1000000,0.0476181818181818},
-{2989360,3880055,3879996,1000000,0.0479428571428571},
-{2989361,3880206,3880243,1000000,0.0266516129032258},
-{2989362,3880149,3880243,0.0344117647058824,1000000},
-{2989363,3870464,3870343,0.0519428571428571,0.0259714285714286},
-{2989364,3867406,3867195,1000000,0.0413872340425532},
-{2989365,3868261,3868143,0.0819666666666667,1000000},
-{2989366,3869299,3869269,1000000,0.1455},
-{2989367,3869549,3869269,1000000,0.163742857142857},
-{2989368,3869920,3869549,1000000,0.0706775510204082},
-{2989369,3871007,3871032,1000000,0.0328105263157895},
-{2989370,3875471,3875558,0.0281866666666667,1000000},
-{2989371,3876341,3876587,0.102088235294118,1000000},
-{2989372,3876341,3876529,1000000,0.0716727272727273},
-{2989373,3876529,3876661,1000000,0.059064},
-{2989374,3876587,3876529,1000000,0.0302684210526316},
-{2989375,3876529,3876426,1000000,0.0671454545454545},
-{2989376,3869286,3869299,1000000,0.02589},
-{2989377,3865149,3865283,0.07312,0.0406222222222222},
-{2989378,3865275,3865149,0.069725,1000000},
-{2989379,3865275,3865283,0.030216,1000000},
-{2989380,3865203,3865213,0.0424595744680851,1000000},
-{2989381,3865119,3865203,0.129293023255814,1000000},
-{2989382,3865236,3865342,1000000,0.1479},
-{2989383,3865236,3865119,1000000,0.0337928571428571},
-{2989384,3864959,3865119,0.306980487804878,1000000},
-{2989385,3864981,3864990,1000000,0.0718875},
-{2989386,3864981,3864946,0.0178285714285714,1000000},
-{2989387,3864946,3864889,0.0280090909090909,1000000},
-{2989388,3865069,3865015,1000000,0.016258064516129},
-{2989389,3865531,3865309,0.331527272727273,1000000},
-{2989390,3865339,3865309,1000000,0.0484235294117647},
-{2989391,3865566,3865528,0.02251875,0.0156652173913043},
-{2989392,3865144,3865212,0.0718883720930233,1000000},
-{2989393,3866507,3866595,0.0411931034482759,1000000},
-{2989394,3866595,3867005,1000000,0.110374468085106},
-{2989395,3867005,3867435,1000000,0.118453333333333},
-{2989396,3867005,3866942,0.0580333333333333,0.0652875},
-{2989397,3867435,3867376,1000000,0.0494526315789474},
-{2989398,3867435,3867690,1000000,0.0834976744186047},
-{2989399,3867690,3867631,0.0349153846153846,0.037825},
-{2989400,3867690,3868760,1000000,0.318789473684211},
-{2989401,3868869,3869049,0.0614117647058824,1000000},
-{2989402,3868869,3868757,0.0886173913043478,1000000},
-{2989403,3868757,3868578,0.044925,0.105705882352941},
-{2989404,3869093,3869049,0.010935,0.018225},
-{2989405,3874171,3874186,0.0667953488372093,1000000},
-{2989406,3874171,3874297,1000000,0.0887666666666667},
-{2989407,3874253,3874373,0.0728333333333333,1000000},
-{2989408,3874297,3874329,1000000,0.0171076923076923},
-{2989409,3874329,3874373,1000000,0.03},
-{2989410,3871321,3871437,0.0875538461538461,0.0875538461538461},
-{2989411,3865309,3865298,1000000,0.0125617021276596},
-{2989412,3865175,3865298,0.0474666666666667,1000000},
-{2989413,3865260,3865265,1000000,0.008},
-{2989414,3865038,3865278,0.07542,1000000},
-{2989415,3865278,3865362,0.02694,1000000},
-{2989416,3865133,3865281,1000000,0.0399290322580645},
-{2989417,3865281,3865362,1000000,0.0231103448275862},
-{2989418,3865278,3865281,1000000,0.0232864864864865},
-{2989419,3865281,3865282,1000000,0.0169411764705882},
-{2989420,3875486,3875453,1000000,0.0507111111111111},
-{2989421,3875511,3875486,1000000,0.0596785714285714},
-{2989422,3879464,3879539,0.0427,1000000},
-{2989423,3879539,3879622,0.0304941176470588,1000000},
-{2989424,3879536,3879539,1000000,0.0223636363636364},
-{2989425,3879539,3879656,1000000,0.110869565217391},
-{2989426,3879419,3879536,0.0367132075471698,1000000},
-{2989427,3879419,3879582,0.105417391304348,1000000},
-{2989428,3879536,3879582,0.0558631578947368,1000000},
-{2989429,3879582,3879633,0.0429571428571429,1000000},
-{2989430,3879676,3879633,0.01798125,0.0359625},
-{2989431,3877270,3877870,0.221635714285714,1000000},
-{2989432,3877902,3877870,0.0241111111111111,0.0241111111111111},
-{2989433,3865131,3864850,0.1473,1000000},
-{2989434,3867995,3867780,0.12363,0.12363},
-{2989435,3868229,3868140,0.05832,0.0624857142857143},
-{2989436,3868790,3868645,0.0437555555555556,0.0437555555555556},
-{2989437,3868662,3868645,0.0451636363636364,1000000},
-{2989438,3868662,3868558,1000000,0.0352764705882353},
-{2989439,3870078,3870163,0.0410222222222222,1000000},
-{2989440,3869946,3869416,0.12385,1000000},
-{2989441,3870630,3869946,0.2316,1000000},
-{2989442,3871338,3870630,0.160287804878049,1000000},
-{2989443,3869940,3869944,0.008775,0.011232},
-{2989444,3869944,3869946,0.00984375,0.013125},
-{2989445,3870613,3870621,1000000,0.010475},
-{2989446,3870621,3870630,1000000,0.0123},
-{2989447,3871914,3871322,1000000,0.373371428571429},
-{2989448,3871322,3871326,0.0141,1000000},
-{2989449,3871326,3871338,0.0133142857142857,1000000},
-{2989450,3871914,3871922,1000000,0.00767368421052632},
-{2989451,3871922,3871930,1000000,0.00685945945945946},
-{2989452,3871877,3871887,1000000,0.0190864864864865},
-{2989453,3872008,3872000,1000000,0.0167571428571429},
-{2989454,3868454,3868408,0.0126,0.0186967741935484},
-{2989455,3870721,3870673,0.1244,0.1244},
-{2989456,3869665,3869543,1000000,1000000},
-{2989457,3869695,3869665,1000000,1000000},
-{2989458,3872889,3872814,0.0898645161290322,0.0819352941176471},
-{2989459,3872900,3872814,1000000,0.0621461538461538},
-{2989460,3872961,3872900,1000000,0.0264},
-{2989461,3873047,3872911,0.321504,0.26792},
-{2989462,3873047,3872834,0.306949090909091,0.312633333333333},
-{2989463,3869047,3869010,1000000,0.0422896551724138},
-{2989464,3872022,3872044,1000000,0.022815},
-{2989465,3872052,3872045,1000000,0.0139317073170732},
-{2989466,3872440,3872529,0.0469058823529412,0.0469058823529412},
-{2989467,3865245,3865118,1000000,0.050725},
-{2989468,3864768,3864874,1000000,0.0790285714285714},
-{2989469,3864874,3864714,0.0730666666666667,1000000},
-{2989470,3865267,3865118,1000000,0.0466258064516129},
-{2989471,3865267,3865245,0.0365351351351351,1000000},
-{2989472,3865245,3865256,0.0131513513513513,1000000},
-{2989473,3865280,3865256,1000000,0.0125846153846154},
-{2989474,3865280,3865311,1000000,0.0141428571428571},
-{2989475,3865375,3865267,1000000,0.03658},
-{2989476,3864714,3864626,0.04356,1000000},
-{2989477,3864708,3864626,1000000,0.0243243243243243},
-{2989478,3864768,3864714,0.103835294117647,0.103835294117647},
-{2989479,3865142,3865100,0.0596869565217391,0.0584170212765957},
-{2989480,3865142,3865226,0.0381176470588235,0.0381176470588235},
-{2989481,3865100,3865181,0.0387176470588235,0.0387176470588235},
-{2989482,3871122,3870759,1000000,0.143256},
-{2989483,3870832,3871064,0.233566666666667,1000000},
-{2989484,3871420,3871221,1000000,0.398275},
-{2989485,3871221,3871064,1000000,0.0775363636363636},
-{2989486,3872708,3872711,1000000,0.0191684210526316},
-{2989487,3872053,3872040,0.0505,1000000},
-{2989488,3872166,3872040,0.0595,1000000},
-{2989489,3872613,3872708,1000000,0.013863829787234},
-{2989490,3872618,3872711,0.0142826086956522,1000000},
-{2989491,3872613,3872618,0.02372,1000000},
-{2989492,3872292,3872335,0.0637928571428571,1000000},
-{2989493,3872335,3872346,0.0146545454545455,1000000},
-{2989494,3868695,3868738,0.0388285714285714,0.0247090909090909},
-{2989495,3866321,3866360,1000000,0.025425},
-{2989496,3866390,3866436,0.039096,1000000},
-{2989497,3866360,3866436,1000000,0.0246692307692308},
-{2989498,3866321,3866390,0.0285913043478261,1000000},
-{2989499,3866112,3866365,0.1722,1000000},
-{2989500,3866560,3866365,0.1073,1000000},
-{2989501,3861454,3861315,0.089875,0.0980454545454546},
-{2989502,3866943,3865773,0.287533333333333,1000000},
-{2989503,3865818,3865773,0.0250846153846154,0.0362333333333333},
-{2989504,3867093,3866943,0.0425285714285714,1000000},
-{2989505,3866966,3866943,0.0349826086956522,0.0447},
-{2989506,3867146,3867093,1000000,0.0426333333333333},
-{2989507,3867644,3867633,0.0438333333333333,1000000},
-{2989508,3868264,3867633,0.163116279069767,1000000},
-{2989509,3869149,3868264,0.232186363636364,1000000},
-{2989510,3869149,3869169,0.03222,0.0339157894736842},
-{2989511,3868278,3868264,0.0387666666666667,0.0303391304347826},
-{2989512,3869896,3869825,0.029625,0.0374210526315789},
-{2989513,3869762,3869900,0.446304545454546,1000000},
-{2989514,3868439,3867244,0.259473913043478,1000000},
-{2989515,3868428,3867226,1000000,0.238632},
-{2989516,3868439,3868428,0.0469125,0.0469125},
-{2989517,3869694,3869613,0.0230689655172414,1000000},
-{2989518,3869693,3869608,1000000,0.0257777777777778},
-{2989519,3867244,3867226,0.0344181818181818,0.0236625},
-{2989520,3866305,3866294,0.0269538461538462,0.0333714285714286},
-{2989521,3869608,3869604,0.123405882352941,1000000},
-{2989522,3869613,3869608,0.0237103448275862,1000000},
-{2989523,3869694,3869693,1000000,0.0238},
-{2989524,3870327,3870692,1000000,0.0714765957446809},
-{2989525,3872140,3870692,0.271065306122449,1000000},
-{2989526,3872140,3872127,0.03474,0.0302086956521739},
-{2989527,3872127,3872987,0.173234042553191,1000000},
-{2989528,3864915,3864949,0.0606620689655172,0.0418857142857143},
-{2989529,3865103,3864915,0.102138461538462,1000000},
-{2989530,3873001,3872987,0.0316090909090909,0.0198685714285714},
-{2989531,3873861,3874068,1000000,0.1209},
-{2989532,3873861,3873852,1000000,0.02385},
-{2989533,3874063,3874498,0.10995652173913,1000000},
-{2989534,3874068,3874063,0.021951724137931,0.0454714285714286},
-{2989535,3874498,3875185,0.161816326530612,1000000},
-{2989536,3874508,3874498,0.0346105263157895,0.04384},
-{2989537,3878386,3878438,1000000,0.0643384615384615},
-{2989538,3878288,3878386,1000000,0.0754928571428571},
-{2989539,3878353,3878418,1000000,0.0114276923076923},
-{2989540,3878350,3878414,0.0120491803278689,1000000},
-{2989541,3878406,3878404,1000000,0.0889384615384615},
-{2989542,3878404,3878395,1000000,0.197907692307692},
-{2989543,3878347,3878395,0.022536,0.022536},
-{2989544,3878395,3878375,1000000,0.235524},
-{2989545,3878320,3878297,0.0673071428571429,1000000},
-{2989546,3878320,3878371,0.03735,0.0249},
-{2989547,3880568,3880746,1000000,0.05598},
-{2989548,3880625,3880568,1000000,0.0429},
-{2989549,3882522,3882548,0.0347333333333333,0.0302516129032258},
-{2989550,3882766,3882752,1000000,0.137708571428571},
-{2989551,3882752,3882724,0.1768,1000000},
-{2989552,3882724,3882712,0.0189529411764706,1000000},
-{2989553,3882766,3882724,0.0624,1000000},
-{2989554,3882636,3882656,0.0674903225806451,1000000},
-{2989555,3878232,3878138,0.186623529411765,1000000},
-{2989556,3878278,3878209,1000000,0.170689285714286},
-{2989557,3878138,3878079,0.211034482758621,1000000},
-{2989558,3878209,3878162,1000000,0.121141176470588},
-{2989559,3875200,3875185,0.0289304347826087,0.0369666666666667},
-{2989560,3876805,3877580,1000000,0.19119512195122},
-{2989561,3876793,3877560,0.180418604651163,1000000},
-{2989562,3878079,3878162,1000000,0.0289384615384615},
-{2989563,3878066,3878150,0.0255310344827586,1000000},
-{2989564,3878232,3878278,0.0213214285714286,0.0314210526315789},
-{2989565,3878138,3878209,0.0213705882352941,0.04844},
-{2989566,3877580,3877560,0.0353142857142857,0.0412},
-{2989567,3876805,3876793,0.0237677419354839,0.0320347826086956},
-{2989568,3878150,3878346,0.0797586206896552,1000000},
-{2989569,3878162,3878346,1000000,0.303225},
-{2989570,3875312,3875257,0.0383454545454546,0.0496235294117647},
-{2989571,3875124,3875078,0.05365,0.0247615384615385},
-{2989572,3875035,3874980,0.0332285714285714,0.0387666666666667},
-{2989573,3874433,3874514,0.0386307692307692,0.0478285714285714},
-{2989574,3874069,3873923,0.158478260869565,1000000},
-{2989575,3874000,3873923,0.0334222222222222,0.0243891891891892},
-{2989576,3873781,3873861,1000000,0.0333},
-{2989577,3873763,3873852,0.0393,1000000},
-{2989578,3873781,3873763,0.0262846153846154,1000000},
-{2989579,3876231,3875677,1000000,0.564611538461538},
-{2989580,3876178,3875580,0.545055555555556,1000000},
-{2989581,3875580,3875677,0.0514571428571429,0.0514571428571429},
-{2989582,3875305,3875415,0.0496344827586207,0.0685428571428571},
-{2989583,3873445,3873221,0.203413333333333,1000000},
-{2989584,3873221,3873314,0.0336222222222222,0.0336222222222222},
-{2989585,3872746,3872863,0.0230533333333333,0.0280378378378378},
-{2989586,3872648,3872550,0.0312923076923077,0.0428210526315789},
-{2989587,3872648,3872328,1000000,0.275795454545455},
-{2989588,3872328,3872227,0.0382384615384615,0.0552333333333333},
-{2989589,3872227,3872071,0.240424390243902,1000000},
-{2989590,3872071,3871913,0.258028571428571,0.12315},
-{2989591,3877943,3878017,0.04788,0.04788},
-{2989592,3877812,3877888,0.044175,0.04712},
-{2989593,3877681,3877765,0.04011,0.05348},
-{2989594,3877765,3877701,1000000,0.0893020408163265},
-{2989595,3877681,3877628,0.0697967213114754,1000000},
-{2989596,3877577,3877464,1000000,0.0835838709677419},
-{2989597,3877701,3877628,0.0426,0.0497},
-{2989598,3877628,3877474,0.124877419354839,1000000},
-{2989599,3877701,3877577,1000000,0.131125423728814},
-{2989600,3877474,3877363,0.0820571428571429,1000000},
-{2989601,3877363,3877464,0.0220714285714286,0.0220714285714286},
-{2989602,3877004,3876916,0.0518333333333333,0.0444285714285714},
-{2989603,3877004,3876858,1000000,0.0486654545454545},
-{2989604,3876916,3876804,0.0340631578947368,1000000},
-{2989605,3876858,3876804,0.0408,0.07072},
-{2989606,3875869,3875828,0.02945625,0.02945625},
-{2989607,3875217,3875278,1000000,0.03875},
-{2989608,3875180,3875110,0.05732,0.05732},
-{2989609,3875180,3875164,1000000,0.06644},
-{2989610,3875110,3875093,0.0635714285714286,1000000},
-{2989611,3875093,3875164,0.05492,0.04119},
-{2989612,3875093,3875089,0.051196875,1000000},
-{2989613,3875164,3875150,1000000,0.05554},
-{2989614,3875150,3875089,0.0150117647058824,0.0150117647058824},
-{2989615,3875150,3875125,1000000,0.09183},
-{2989616,3875089,3875066,0.0872190476190476,1000000},
-{2989617,3875125,3875066,0.0191052631578947,0.03025},
-{2989618,3874999,3875076,0.0414,0.0462705882352941},
-{2989619,3874936,3874888,0.0337636363636364,0.0337636363636364},
-{2989620,3869677,3869649,1000000,0.220902127659574},
-{2989621,3869649,3869580,0.040275,0.0280173913043478},
-{2989622,3869649,3869635,1000000,0.0878884615384615},
-{2989623,3869635,3869574,0.037875,0.0432857142857143},
-{2989624,3869612,3869540,0.03063,0.03063},
-{2989625,3869612,3869568,1000000,0.0945169811320755},
-{2989626,3869568,3869576,0.0103125,0.00951923076923077},
-{2989627,3879420,3879017,0.120306976744186,1000000},
-{2989628,3875332,3875449,0.160947169811321,0.160947169811321},
-{2989629,3875449,3875462,0.00606666666666667,0.00606666666666667},
-{2989630,3875650,3875663,0.0147931034482759,0.01340625},
-{2989631,3875650,3875989,0.0945733333333333,1000000},
-{2989632,3878360,3878583,0.163571428571429,1000000},
-{2989633,3877324,3877216,0.16236,1000000},
-{2989634,3877216,3876915,0.1638,0.2268},
-{2989635,3879400,3879348,0.0217135135135135,1000000},
-{2989636,3879348,3878938,0.19130625,1000000},
-{2989637,3878930,3879348,1000000,0.140329411764706},
-{2989638,3879348,3879473,1000000,0.039555},
-{2989639,3878339,3878497,1000000,0.215325},
-{2989640,3878881,3878930,1000000,0.0236045454545455},
-{2989641,3878497,3878530,1000000,0.0157153846153846},
-{2989642,3879871,3879815,0.0314341463414634,1000000},
-{2989643,3879829,3879815,1000000,0.0252},
-{2989644,3881085,3881042,0.00921176470588235,1000000},
-{2989645,3881085,3881088,0.0111219512195122,1000000},
-{2989646,3881088,3881106,0.00993488372093023,1000000},
-{2989647,3880001,3879766,0.11075,1000000},
-{2989648,3879924,3879824,0.2469,0.2469},
-{2989649,3879174,3879011,1000000,0.0803111111111111},
-{2989650,3875549,3875729,0.278014285714286,0.169226086956522},
-{2989651,3875729,3875769,0.0504,0.0296470588235294},
-{2989652,3875769,3875890,0.114490909090909,1000000},
-{2989653,3875769,3875804,1000000,0.11672},
-{2989654,3875797,3875804,0.0432,1000000},
-{2989655,3875804,3875890,0.0579913043478261,1000000},
-{2989656,3875890,3875981,0.111814285714286,1000000},
-{2989657,3875797,3875981,0.0964285714285714,1000000},
-{2989658,3875935,3876072,0.15372,0.13251724137931},
-{2989659,3875935,3876158,1000000,1000000},
-{2989660,3876047,3876158,0.0632571428571428,1000000},
-{2989661,3876158,3876222,0.0311142857142857,1000000},
-{2989662,3876222,3876368,0.0683478260869565,1000000},
-{2989663,3876047,3876135,0.0906260869565217,1000000},
-{2989664,3876135,3876368,1000000,0.105046153846154},
-{2989665,3875740,3875352,0.182295652173913,0.322523076923077},
-{2989666,3875687,3875582,1000000,0.0536068965517241},
-{2989667,3875687,3875797,0.131554838709677,1000000},
-{2989668,3877875,3877739,0.5628,1000000},
-{2989669,3876422,3876852,1000000,0.195782608695652},
-{2989670,3874890,3874960,0.05955,0.0529333333333333},
-{2989671,3875800,3876053,1000000,0.167192307692308},
-{2989672,3875800,3876055,0.14865,0.110111111111111},
-{2989673,3876053,3876041,0.224193103448276,0.2322},
-{2989674,3876105,3876137,0.059075,1000000},
-{2989675,3876216,3876105,0.104628571428571,1000000},
-{2989676,3876398,3876216,0.0912857142857143,1000000},
-{2989677,3877782,3877654,0.089825,0.0937304347826087},
-{2989678,3877782,3877988,0.14084,0.0960272727272727},
-{2989679,3877398,3877654,0.07792,0.0899076923076923},
-{2989680,3877962,3877906,0.25875,1000000},
-{2989681,3878088,3877988,0.25596,1000000},
-{2989682,3879140,3879220,0.0925,1000000},
-{2989683,3879220,3879376,0.0903111111111111,1000000},
-{2989684,3879147,3879376,1000000,0.111025},
-{2989685,3879220,3879147,0.0816947368421053,0.0674869565217391},
-{2989686,3875264,3875324,1000000,0.348138461538462},
-{2989687,3875559,3875264,0.157513043478261,0.172514285714286},
-{2989688,3875324,3875622,0.23076,0.23076},
-{2989689,3875324,3875387,1000000,0.236530434782609},
-{2989690,3875387,3875748,1000000,1000000},
-{2989691,3875387,3875476,1000000,0.276457142857143},
-{2989692,3875476,3875560,1000000,1000000},
-{2989693,3875476,3875848,1000000,1000000},
-{2989694,3876145,3876475,1000000,0.135161538461538},
-{2989695,3876041,3876458,0.167577777777778,0.180984},
-{2989696,3877242,3877268,1000000,0.0145846153846154},
-{2989697,3877268,3877289,1000000,0.012425},
-{2989698,3877860,3877876,0.0171461538461538,1000000},
-{2989699,3877876,3877893,0.0110689655172414,1000000},
-{2989700,3877860,3878389,0.148671428571429,1000000},
-{2989701,3880021,3880204,0.180933333333333,0.116314285714286},
-{2989702,3880451,3880676,0.286753846153846,1000000},
-{2989703,3881781,3881830,0.0384818181818182,1000000},
-{2989704,3880994,3880948,1000000,0.0350086956521739},
-{2989705,3882107,3881781,1000000,0.197458064516129},
-{2989706,3882107,3882152,1000000,0.06595},
-{2989707,3882396,3882358,1000000,0.0441176470588235},
-{2989708,3882422,3882396,1000000,0.158957142857143},
-{2989709,3882152,3882317,1000000,0.119775},
-{2989710,3882881,3882358,1000000,0.2494},
-{2989711,3882422,3882714,0.220989473684211,1000000},
-{2989712,3882317,3882598,1000000,0.327342857142857},
-{2989713,3883362,3882714,0.52308,1000000},
-{2989714,3882650,3882598,0.0446086956521739,1000000},
-{2989715,3882714,3883077,0.253336363636364,1000000},
-{2989716,3882598,3882971,1000000,0.246469565217391},
-{2989717,3883373,3883077,1000000,0.180312},
-{2989718,3883025,3882971,1000000,0.051},
-{2989719,3883077,3883462,0.206777777777778,1000000},
-{2989720,3882971,3883356,1000000,0.18252},
-{2989721,3883765,3883462,0.3103125,1000000},
-{2989722,3883413,3883356,0.0495714285714286,1000000},
-{2989723,3883356,3883778,1000000,0.42888},
-{2989724,3883462,3883905,0.32955,1000000},
-{2989725,3883905,3884245,0.242657142857143,1000000},
-{2989726,3883778,3884144,1000000,0.370842857142857},
-{2989727,3884606,3883905,0.47375,0.334411764705882},
-{2989728,3883835,3883778,0.03984,0.0415},
-{2989729,3884245,3884641,0.1903875,1000000},
-{2989730,3884144,3884512,1000000,0.207707142857143},
-{2989731,3884557,3884245,1000000,0.236290909090909},
-{2989732,3884184,3884144,1000000,0.0531157894736842},
-{2989733,3884641,3884892,0.173,1000000},
-{2989734,3884512,3884772,1000000,0.202610526315789},
-{2989735,3885031,3884641,0.281842105263158,1000000},
-{2989736,3884559,3884512,0.0419727272727273,1000000},
-{2989737,3884892,3885258,0.2642,1000000},
-{2989738,3884867,3884772,0.29484,1000000},
-{2989739,3885208,3886017,1000000,0.427355555555556},
-{2989740,3885339,3886128,0.405492857142857,1000000},
-{2989741,3885208,3884867,0.2357625,1000000},
-{2989742,3885339,3885287,0.061275,1000000},
-{2989743,3886128,3886701,0.369392307692308,1000000},
-{2989744,3886017,3886598,1000000,0.352933333333333},
-{2989745,3886376,3886128,0.240566666666667,1000000},
-{2989746,3886073,3886017,0.0325862068965517,1000000},
-{2989747,3886701,3887339,0.378333333333333,1000000},
-{2989748,3886598,3887221,1000000,0.379844444444444},
-{2989749,3886598,3886270,1000000,0.255975},
-{2989750,3886701,3886651,0.0297090909090909,0.0445636363636364},
-{2989751,3887691,3887339,0.253057142857143,1000000},
-{2989752,3887278,3887221,0.0510631578947368,0.03465},
-{2989753,3885992,3885965,1000000,1000000},
-{2989754,3885460,3885922,1000000,0.187429411764706},
-{2989755,3886403,3886778,0.185345454545455,1000000},
-{2989756,3886705,3886448,0.274733333333333,0.149854545454545},
-{2989757,3886812,3886705,0.433382608695652,1000000},
-{2989758,3882425,3882469,1000000,1000000},
-{2989759,3883181,3882881,1000000,0.226121739130435},
-{2989760,3883866,3883181,1000000,0.3412},
-{2989761,3884487,3883866,1000000,0.295389473684211},
-{2989762,3883866,3883924,0.0438947368421053,1000000},
-{2989763,3884097,3884487,1000000,0.217384615384615},
-{2989764,3885098,3885070,1000000,0.0352181818181818},
-{2989765,3885070,3885127,0.0424909090909091,1000000},
-{2989766,3884942,3885098,0.119169230769231,1000000},
-{2989767,3884942,3885070,0.0889,1000000},
-{2989768,3885253,3885098,1000000,0.269325},
-{2989769,3885108,3885248,0.04952,1000000},
-{2989770,3885345,3885638,1000000,0.0962914285714286},
-{2989771,3885253,3885251,0.0101351351351351,1000000},
-{2989772,3885251,3885248,0.0109459459459459,1000000},
-{2989773,3885345,3885357,1000000,0.00764210526315789},
-{2989774,3885357,3885372,1000000,0.0115459459459459},
-{2989775,3885242,3885320,0.0669,1000000},
-{2989776,3885320,3885488,0.468153846153846,1000000},
-{2989777,3884950,3885051,0.2563,0.320375},
-{2989778,3884991,3885038,0.0230526315789474,1000000},
-{2989779,3884935,3885488,1000000,0.280742857142857},
-{2989780,3885488,3885501,0.108874285714286,1000000},
-{2989781,3885501,3885487,0.083475,1000000},
-{2989782,3885487,3885457,0.120628571428571,1000000},
-{2989783,3885457,3885376,0.2004,1000000},
-{2989784,3885171,3885376,0.182890909090909,1000000},
-{2989785,3885291,3885383,0.0239294117647059,0.0262451612903226},
-{2989786,3885187,3885237,0.0249,1000000},
-{2989787,3884540,3884198,1000000,0.3451},
-{2989788,3884339,3884540,1000000,0.188176744186047},
-{2989789,3884339,3884398,1000000,0.0310965517241379},
-{2989790,3884401,3884531,0.128021739130435,0.128021739130435},
-{2989791,3884370,3884404,1000000,0.03756},
-{2989792,3884227,3884370,1000000,0.0540142857142857},
-{2989793,3884227,3884258,0.0356432432432432,1000000},
-{2989794,3884148,3884258,0.0376857142857143,1000000},
-{2989795,3884107,3884227,1000000,0.0351},
-{2989796,3883280,3883321,0.0268846153846154,0.0258888888888889},
-{2989797,3882431,3882727,0.0913375,0.0996409090909091},
-{2989798,3881114,3881183,0.0266666666666667,0.0282352941176471},
-{2989799,3880892,3880883,1000000,0.12648},
-{2989800,3875718,3875902,0.34734375,1000000},
-{2989801,3875896,3875827,1000000,0.0492947368421053},
-{2989802,3875827,3875977,1000000,0.164},
-{2989803,3876031,3875977,0.0470117647058824,1000000},
-{2989804,3875977,3876352,1000000,0.232773333333333},
-{2989805,3876420,3876352,1000000,0.0399714285714286},
-{2989806,3876533,3876488,1000000,1000000},
-{2989807,3889033,3889241,0.0560108108108108,1000000},
-{2989808,3889370,3889345,0.00944081632653061,0.00889615384615385},
-{2989809,3889389,3889370,0.0349125,1000000},
-{2989810,3889389,3889531,0.044055,1000000},
-{2989811,3891275,3891411,0.0338478260869565,1000000},
-{2989812,3891275,3891287,0.06625,1000000},
-{2989813,3892441,3892432,1000000,1000000},
-{2989814,3894155,3894157,0.08562,1000000},
-{2989815,3896024,3896146,1000000,0.0797454545454545},
-{2989816,3897504,3897316,0.0585538461538462,1000000},
-{2989817,3897504,3897487,0.01848,1000000},
-{2989818,3897487,3897482,0.0142090909090909,1000000},
-{2989819,3897523,3897557,0.0382,1000000},
-{2989820,3897557,3897605,0.0457384615384615,1000000},
-{2989821,3897520,3897523,1000000,0.0198923076923077},
-{2989822,3897588,3897615,0.0568909090909091,1000000},
-{2989823,3897615,3897605,0.01002,1000000},
-{2989824,3897552,3897572,0.0171,1000000},
-{2989825,3897414,3897552,1000000,0.0380936170212766},
-{2989826,3897552,3897579,1000000,0.00669333333333333},
-{2989827,3898991,3899009,1000000,0.0159483870967742},
-{2989828,3899009,3899016,1000000,0.00982758620689655},
-{2989829,3899638,3899772,1000000,0.0398769230769231},
-{2989830,3899772,3899880,1000000,0.0415935483870968},
-{2989831,3899791,3899853,0.0231483870967742,1000000},
-{2989832,3899853,3899891,0.0161294117647059,1000000},
-{2989833,3899880,3900011,1000000,0.057432},
-{2989834,3899891,3900030,0.03873,1000000},
-{2989835,3899791,3899780,1000000,0.0113560975609756},
-{2989836,3899780,3899772,1000000,0.0115609756097561},
-{2989837,3899891,3899885,0.0117257142857143,1000000},
-{2989838,3899885,3899880,0.0122571428571429,1000000},
-{2989839,3900008,3899937,0.06676,1000000},
-{2989840,3899937,3899888,0.0294,1000000},
-{2989841,3902495,3902709,1000000,0.134228571428571},
-{2989842,3902375,3902468,1000000,0.0214536585365854},
-{2989843,3902468,3902693,1000000,0.0601894736842105},
-{2989844,3903541,3904021,1000000,0.108832653061224},
-{2989845,3903554,3904040,0.0944631578947368,1000000},
-{2989846,3903554,3903547,1000000,0.0204},
-{2989847,3903547,3903541,1000000,0.0200571428571429},
-{2989848,3904040,3904029,0.0210461538461538,1000000},
-{2989849,3904029,3904021,0.0296571428571429,1000000},
-{2989867,3871954,3872002,0.0500888888888889,1000000},
-{2989868,3872032,3872086,1000000,0.0507555555555556},
-{2990009,3895024,3895226,0.18065,0.333507692307692},
-{2990010,3898324,3898464,0.08019,0.0486},
-{2990011,3898896,3898324,1000000,0.233139622641509},
-{2990012,3899273,3898896,1000000,0.183117647058824},
-{2990013,3899542,3899273,1000000,0.237308571428571},
-{2990014,3900158,3900222,0.0283111111111111,0.0347454545454545},
-{2990015,3900222,3900296,0.0266785714285714,0.0393157894736842},
-{2990016,3900047,3900046,0.0389125,1000000},
-{2990017,3898771,3899912,0.595527272727273,0.297763636363636},
-{2990018,3900132,3900232,0.0277170731707317,0.0598105263157895},
-{2990019,3899972,3899622,0.145088888888889,0.145088888888889},
-{2990020,3899557,3899616,0.0382434782608696,0.0274875},
-{2990021,3899616,3899683,0.0254222222222222,0.0245142857142857},
-{2990022,3897969,3898042,0.03325,0.0306923076923077},
-{2990023,3898042,3898090,0.0168967741935484,0.021825},
-{2990024,3896841,3896791,0.0281714285714286,0.0219111111111111},
-{2990025,3896791,3896752,0.021696,0.0258285714285714},
-{2990026,3896401,3896289,0.0630692307692308,1000000},
-{2990027,3896152,3896322,0.0905142857142857,1000000},
-{2990028,3896323,3896322,1000000,1000000},
-{2990029,3896323,3896390,1000000,1000000},
-{2990030,3887179,3887450,1000000,0.124684615384615},
-{2990031,3894469,3894585,1000000,0.0327206896551724},
-{2990032,3893688,3893705,0.0154758620689655,1000000},
-{2990033,3892950,3892988,0.022725,1000000},
-{2990034,3892988,3893049,0.0301111111111111,1000000},
-{2990035,3892849,3892884,1000000,0.0146615384615385},
-{2990036,3892884,3892945,1000000,0.0204529411764706},
-{2990037,3900383,3900041,1000000,0.280326315789474},
-{2990038,3900506,3900528,1000000,0.0101833333333333},
-{2990039,3900528,3900565,1000000,0.02023125},
-{2990040,3900597,3900628,0.00962790697674419,1000000},
-{2990041,3900628,3900670,0.0134266666666667,1000000},
-{2990042,3900846,3900780,0.02505,0.0159409090909091},
-{2990043,3903129,3903121,0.092525,0.158614285714286},
-{2990044,3903273,3903121,1000000,0.14812},
-{2990045,3903129,3903273,0.0310758620689655,1000000},
-{2990046,3903122,3903133,1000000,0.023808},
-{2990047,3903133,3903129,1000000,0.0164086956521739},
-{2990048,3906691,3905679,1000000,0.408825},
-{2990049,3905679,3905192,0.252542857142857,0.279126315789474},
-{2990050,3905370,3905610,0.0425333333333333,1000000},
-{2990051,3905311,3905610,1000000,0.0604909090909091},
-{2990052,3905311,3905750,1000000,0.0861934426229508},
-{2990053,3906805,3906761,1000000,0.0272},
-{2990054,3906761,3906700,1000000,0.029352},
-{2990055,3906986,3906877,1000000,0.11754},
-{2990056,3907184,3907451,1000000,0.129288888888889},
-{2990057,3906805,3906913,1000000,0.0265375},
-{2990058,3906877,3907016,0.0340897959183673,1000000},
-{2990059,3907074,3906691,1000000,0.203933333333333},
-{2990060,3908136,3908257,0.028932,1000000},
-{2990061,3908123,3908136,1000000,0.0335571428571429},
-{2990062,3908136,3908130,1000000,0.0586},
-{2990063,3908257,3908441,0.0384734693877551,1000000},
-{2990070,3898604,3898746,0.06875,0.0515625},
-{2990071,3898223,3898604,1000000,0.160552941176471},
-{2990072,3898346,3898604,0.187296,1000000},
-{2990073,3898223,3898346,1000000,0.108294736842105},
-{2990074,3898260,3898413,0.0919772727272727,1000000},
-{2990075,3898346,3898458,1000000,0.0747191489361702},
-{2990076,3898482,3898458,0.01635,0.012658064516129},
-{2990077,3899517,3900103,0.176805882352941,1000000},
-{2990078,3902545,3902475,0.042672,1000000},
-{2990079,3902475,3902535,0.040224,1000000},
-{2990080,3902535,3902614,0.0401769230769231,1000000},
-{2990081,3902614,3902545,0.0413,1000000},
-{2990082,3901057,3901416,1000000,0.1494375},
-{2990083,3901057,3901351,1000000,0.112605633802817},
-{2990084,3901956,3901933,0.135707142857143,1000000},
-{2990085,3901933,3902021,0.2344875,1000000},
-{2990086,3894748,3894906,0.11094,1000000},
-{2990087,3894890,3894748,0.113541176470588,1000000},
-{2990088,3893726,3894476,0.272257894736842,0.32330625},
-{2990089,3893322,3893266,0.01686,0.01686},
-{2990090,3894912,3894956,0.0198222222222222,1000000},
-{2990091,3896174,3896190,1000000,0.01074},
-{2990092,3896986,3897045,0.0282166666666667,1000000},
-{2990093,3896190,3896743,0.170729577464789,0.173168571428571},
-{2990094,3896743,3896755,0.00466285714285714,0.0048},
-{2990095,3896695,3896829,0.0807692307692308,1000000},
-{2990097,3881704,3881424,0.0860181818181818,1000000},
-{2990098,3881333,3881424,0.22388,1000000},
-{2990119,3874535,3874483,0.0924222222222222,0.0924222222222222},
-{2990151,3851453,3851305,0.0684230769230769,0.0936315789473684},
-{2990152,3852205,3851527,0.22014,0.22014},
-{2990155,3915657,3915615,1000000,0.0495642857142857},
-{2990156,3915721,3915752,1000000,0.0463846153846154},
-{2990157,3915752,3915657,1000000,0.0465214285714286},
-{2990158,3914399,3915404,1000000,0.215391666666667},
-{2990171,3881156,3880474,1.04592,1.04592},
-{2990172,3881156,3881472,0.50532,0.50532},
-{2990173,3881362,3881176,1000000,0.145778571428571},
-{2990174,3881530,3881472,0.11082,0.11082},
-{2990175,3881616,3881800,0.2103,0.2103},
-{2990176,3881472,3881564,0.04911,0.0377769230769231},
-{2990177,3881564,3881362,0.329184,0.27432},
-{2990178,3881564,3881800,0.0646641509433962,0.0646641509433962},
-{2990179,3891581,3892152,1000000,0.392838461538462},
-{2990180,3891581,3891579,0.188536363636364,1000000},
-{2990181,3891581,3891196,0.30198,0.30198},
-{2990182,3890431,3891196,0.472527272727273,0.577533333333333},
-{2990183,3890431,3890267,0.23118,0.110085714285714},
-{2990185,3872006,3871483,0.174046153846154,1000000},
-{2990186,3871483,3871398,0.0244071428571429,1000000},
-{2990187,3875943,3875777,0.0610775510204082,1000000},
-{2990188,3875891,3875487,1000000,1000000},
-{2990189,3875943,3875891,1000000,1000000},
-{2990192,3855370,3855491,0.101929411764706,0.1444},
-{2990193,3855208,3855180,0.0287368421052632,0.0287368421052632},
-{2990194,3856798,3856758,0.0256090909090909,0.0216692307692308},
-{2990195,3856271,3856232,0.033,1000000},
-{2990196,3857327,3857350,0.0175428571428571,0.0160173913043478},
-{2990197,3856069,3856027,0.0138153846153846,0.0141789473684211},
-{2990198,3867861,3867639,1000000,0.08182},
-{2990199,3867639,3867585,1000000,0.0456857142857143},
-{2990200,3880641,3880554,0.16195,0.138814285714286},
-{2990201,3879801,3880554,0.375511111111111,0.405552},
-{2990202,3879676,3879801,1000000,0.12405},
-{2990203,3880796,3879613,0.747248275862069,0.833469230769231},
-{2990204,3882116,3882529,0.340033846153846,0.334881818181818},
-{2990205,3882529,3882541,0.0308275862068966,0.0288387096774194},
-{2990206,3881243,3880796,1000000,1000000},
-{2990207,3872513,3872275,0.425127272727273,1000000},
-{2990208,3917578,3917655,1000000,0.0375857142857143},
-{2990209,3877765,3878656,0.3504,0.3504},
-{2990210,3878656,3880024,1.57264444444444,1.57264444444444},
-{2990211,3878145,3878105,0.0346064516129032,1000000},
-{2990212,3878214,3878145,0.03045,1000000},
-{2990213,3878179,3877969,1000000,0.16051914893617},
-{2990214,3878179,3878105,1000000,0.0311},
-{2990215,3877822,3877530,0.233421428571429,1000000},
-{2990216,3877623,3877530,0.06285,1000000},
-{2990217,3882358,3882221,1000000,0.0628628571428571},
-{2990218,3882396,3882280,0.07272,1000000},
-{2990219,3882280,3882379,0.0482615384615385,0.0553588235294118},
-{2990220,3882221,3882280,0.0220628571428571,0.02145},
-{2990221,3865391,3865408,1000000,0.0099},
-{2990222,3865444,3865416,1000000,0.01364},
-{2990223,3865416,3865392,1000000,0.0127285714285714},
-{2990224,3865391,3865416,1000000,0.0113318181818182},
-{2990225,3865489,3865491,1000000,0.0081},
-{2990226,3865491,3865497,1000000,0.0240714285714286},
-{2990227,3865416,3865491,1000000,0.0377692307692308},
-{2990228,3865491,3865536,1000000,0.0255085714285714},
-{2990229,3864562,3863590,1.15272857142857,0.896566666666667},
-{2990230,3864562,3864362,0.1172,0.1172},
-{2990231,3865180,3865313,0.1103,0.1103},
-{2990232,3865189,3865180,0.276177777777778,0.276177777777778},
-{2990233,3865180,3865149,0.230425,0.230425},
-{2990234,3872621,3872716,0.0366,1000000},
-{2990235,3881042,3881073,0.0290571428571429,0.00904},
-{2990237,3871461,3871272,0.0952444444444444,0.0952444444444444},
-{2990245,3884148,3884221,0.145844444444444,0.187514285714286},
-{2990246,3883779,3884221,0.3136,0.3136},
-{2990249,3874848,3874768,0.0297724137931034,0.035975},
-{2990250,3874390,3874470,0.038225,0.038225},
-{2990251,3874033,3874390,1000000,0.42152380952381},
-{2990252,3874033,3874110,0.05325,0.05325},
-{2990253,3873988,3874033,1000000,0.326689655172414},
-{2990254,3873988,3874058,0.0498315789473684,0.059175},
-{2990255,3873998,3874067,0.0346615384615385,0.0321857142857143},
-{2990256,3874351,3874393,0.03588,1000000},
-{2990298,3853972,3854095,1000000,0.140894117647059},
-{2990299,3858141,3858104,0.05205,0.0268645161290323},
-{2990300,3858221,3858141,0.1625,0.132954545454545},
-{2990301,3858221,3857984,0.149152941176471,0.120742857142857},
-{2990303,3869071,3868695,1000000,0.214325},
-{2990304,3869139,3869071,1000000,0.04653},
-{2990305,3865974,3865725,0.10314,0.106696551724138},
-{2990306,3864973,3864549,0.317634782608696,0.317634782608696},
-{2990307,3865872,3865952,0.0395111111111111,0.0395111111111111},
-{2990313,3899542,3899450,0.0360375,1000000},
-{2990314,3899542,3899648,1000000,0.0783789473684211},
-{2990315,3899669,3899648,0.0159130434782609,1000000},
-{2990316,3899554,3899542,1000000,0.0167842105263158},
-{2990317,3899678,3899669,0.0144272727272727,1000000},
-{2990318,3899554,3899611,0.0318214285714286,1000000},
-{2990319,3899611,3899669,0.01976,1000000},
-{2990320,3899542,3899611,1000000,0.0333857142857143},
-{2990321,3899611,3899678,1000000,0.028125},
-{2990322,3899554,3899447,1000000,0.0686842105263158},
-{2990323,3899580,3899447,1000000,0.086525},
-{2990324,3898678,3898721,0.0610421052631579,0.0724875},
-{2990325,3898678,3898308,0.155528571428571,0.120966666666667},
-{2990326,3896734,3896864,1000000,0.0738782608695652},
-{2990327,3896799,3896864,0.06148,1000000},
-{2990328,3896744,3896799,0.053856,1000000},
-{2990329,3896799,3896734,0.113492307692308,1000000},
-{2990330,3896701,3896734,1000000,0.1056},
-{2990331,3896644,3896734,1000000,0.05364},
-{2990332,3896644,3896175,0.193089473684211,1000000},
-{2990333,3896601,3896122,0.157289361702128,0.184815},
-{2990334,3896744,3896701,0.0250344827586207,0.0191052631578947},
-{2990335,3896601,3896644,1000000,0.0211588235294118},
-{2990336,3896175,3896122,0.0143433962264151,0.0262137931034483},
-{2990337,3868970,3868738,0.0896129032258064,0.0896129032258064},
-{2990338,3869139,3868970,1000000,1000000},
-{2990342,3881939,3882281,0.1422,0.15642},
-{2990345,3859562,3859531,0.017544,0.0125314285714286},
-{2990346,3859531,3859485,0.04705,0.0342181818181818},
-{2990347,3902196,3902275,0.0169756097560976,1000000},
-{2990358,3895323,3895485,0.0492,1000000},
-{2990359,3895328,3895430,1000000,0.0281875},
-{2990360,3871319,3871404,0.02454,0.0261063829787234},
-{2990367,3851171,3851140,0.019056,0.019056},
-{2990368,3851140,3851048,0.0565153846153846,0.0544222222222222},
-{2990369,3851477,3851226,0.132925,0.187658823529412},
-{2990371,3907801,3907914,0.0888461538461539,0.0888461538461539},
-{2990374,3869839,3869879,1000000,0.141484615384615},
-{2990375,3870117,3870035,1000000,0.079825},
-{2990378,3899102,3899302,1000000,0.04202},
-{2990391,3879131,3879242,1000000,0.0862125},
-{2990392,3879475,3879861,0.326427272727273,0.377968421052632},
-{2990393,3880331,3880422,0.0649555555555555,0.0649555555555555},
-{2990394,3880422,3880571,0.116488888888889,0.116488888888889},
-{2990395,3880881,3880993,0.07385,0.08862},
-{2990396,3881441,3881540,0.07434,0.0550666666666667},
-{2990397,3881824,3881688,1000000,1000000},
-{2990398,3883845,3884413,0.337966666666667,0.289685714285714},
-{2990399,3883975,3884185,0.0846666666666667,1000000},
-{2990400,3884010,3884071,1000000,0.0239111111111111},
-{2990401,3884071,3884185,1000000,0.308333333333333},
-{2990402,3884039,3884115,1000000,0.0278769230769231},
-{2990403,3884115,3884598,1000000,0.183},
-{2990404,3884106,3884655,0.216857142857143,1000000},
-{2990405,3884186,3884680,0.246518181818182,0.216936},
-{2990406,3884715,3884234,0.211176,0.159981818181818},
-{2990407,3884234,3884208,0.01254,0.0078375},
-{2990408,3858386,3858326,0.0826241379310345,0.0904188679245283},
-{2990409,3859873,3859816,0.0879473684210526,0.0618888888888889},
-{2990410,3859816,3859766,0.0610636363636364,0.055975},
-{2990418,3901250,3901306,0.0209307692307692,0.0209307692307692},
-{2990419,3898645,3898677,0.01784,0.0254857142857143},
-{2990420,3904346,3904420,0.042275,0.0563666666666667},
-{2990421,3900862,3900866,0.005240625,0.00588421052631579},
-{2990422,3915583,3915662,0.04132,0.0387375},
-{2990423,3915662,3916477,0.261466666666667,0.231462295081967},
-{2990433,3864642,3865357,0.267705882352941,0.243803571428571},
-{2990434,3866430,3865860,0.421533333333333,0.421533333333333},
-{2990435,3872353,3872667,0.143911111111111,0.24285},
-{2990436,3902521,3902587,0.0331142857142857,0.0434625},
-{2990437,3902587,3902629,0.02451,0.0350142857142857},
-{2990438,3907116,3906840,0.071172972972973,0.065835},
-{2990439,3907488,3907587,0.1082,0.1082},
-{2990440,3907587,3908464,0.605777777777778,0.605777777777778},
-{2990441,3907884,3908052,0.145073684210526,0.153133333333333},
-{2990442,3908052,3908239,0.132933333333333,0.14955},
-{2990443,3905695,3905770,0.0265015384615385,0.0273428571428571},
-{2990447,3907205,3907137,0.01984,1000000},
-{2990448,3894969,3895018,0.025225,1000000},
-{2990449,3894989,3895005,1000000,0.0119},
-{2990450,3895005,3895018,1000000,0.00953142857142857},
-{2990451,3920868,3920950,0.0230425531914894,0.0225625},
-{2990452,3920950,3921863,0.232640816326531,0.227988},
-{2990453,3913529,3913981,0.256685714285714,0.283705263157895},
-{2990457,3911395,3912354,0.4728,0.509169230769231},
-{2990459,3912557,3911859,0.334155555555556,0.334155555555556},
-{2990460,3880854,3880920,0.0192,0.0168},
-{2990470,3907164,3907184,1000000,0.0579},
-{2990472,3907025,3906986,1000000,0.02735},
-{2990473,3907025,3907022,0.0130222222222222,1000000},
-{2990474,3907029,3907025,0.0103615384615385,1000000},
-{2990475,3906913,3907029,1000000,0.027504},
-{2990476,3907164,3907062,1000000,0.0817125},
-{2990477,3907062,3907025,1000000,0.0270923076923077},
-{2990478,3907029,3907062,1000000,0.00611020408163265},
-{2990479,3907062,3907137,1000000,0.0156127659574468},
-{2990486,3869940,3869416,1000000,0.1839},
-{2990487,3864956,3864912,1000000,0.0145714285714286},
-{2990489,3915404,3915500,1000000,0.0212547945205479},
-{2990490,3915513,3915696,0.037648,1000000},
-{2990493,3864936,3865037,0.0889384615384615,1000000},
-{2990494,3865037,3865076,0.021375,1000000},
-{2990496,3894607,3894704,0.0517846153846154,0.0561},
-{2990500,3874902,3875102,1000000,0.08718},
-{2990502,3918160,3918808,0.329472,1000000},
-{2990503,3918808,3918999,0.100211650485437,1000000},
-{2990504,3919068,3918883,0.0957844660194175,1000000},
-{2990505,3873120,3873168,0.0204461538461538,0.0166125},
-{2990507,3870544,3870385,0.0317632653061225,1000000},
-{2990508,3869299,3869116,1000000,0.035988},
-{2990509,3876661,3876443,0.0895914893617021,1000000},
-{2990510,3876443,3875943,0.19785,1000000},
-{2990511,3876661,3876715,1000000,0.0197318181818182},
-{2990512,3907186,3907325,1000000,0.0316838709677419},
-{2990513,3908391,3908543,1000000,0.0266117647058824},
-{2990514,3907280,3907523,0.0462676056338028,1000000},
-{2990515,3907325,3907437,1000000,0.0233809523809524},
-{2990516,3907437,3907573,1000000,0.0326857142857143},
-{2990517,3908287,3908391,1000000,0.0176597014925373},
-{2990518,3907523,3908322,0.150777464788732,1000000},
-{2990519,3908322,3908476,0.0242281690140845,1000000},
-{2990520,3907590,3907573,0.006192,0.00631836734693878},
-{2990521,3867631,3868716,0.321063157894737,1000000},
-{2990522,3868716,3868869,0.0496838709677419,1000000},
-{2990523,3868760,3868851,1000000,0.0303529411764706},
-{2990524,3868851,3869093,1000000,0.0877875},
-{2990525,3921931,3922117,0.0387387096774194,0.0363909090909091},
-{2990526,3865745,3865880,1000000,0.0629692307692308},
-{2990527,3865880,3866595,1000000,0.224342857142857},
-{2990529,3896096,3896156,1000000,0.0257066666666667},
-{2990530,3896156,3896496,1000000,0.17238},
-{2990531,3896578,3896841,0.135677777777778,1000000},
-{2990532,3896841,3897083,0.110775,1000000},
-{2990533,3897083,3897337,0.110357142857143,1000000},
-{2990534,3897337,3897637,0.139673076923077,1000000},
-{2990535,3897637,3897931,0.1356,1000000},
-{2990536,3901933,3902078,0.0362228571428571,1000000},
-{2990537,3902078,3902106,0.00520285714285714,1000000},
-{2990538,3901968,3902138,1000000,0.0393617647058823},
-{2990539,3902138,3902160,1000000,0.00547058823529412},
-{2990548,3902106,3903093,0.19935,1000000},
-{2990549,3903093,3903382,0.0587753424657534,1000000},
-{2990558,3908123,3908284,1000000,0.06944},
-{2990559,3908284,3908441,1000000,0.0666214285714286},
-{2990560,3906761,3907331,0.0960310344827586,0.0960310344827586},
-{2990561,3896047,3896174,1000000,0.0381138461538462},
-{2990562,3896018,3896138,0.0331521126760563,1000000},
-{2990563,3896138,3896190,0.0101666666666667,1000000},
-{2990564,3865415,3865430,1000000,0.03688},
-{2990565,3865005,3865040,1000000,0.0847170731707317},
-{2990566,3865211,3865154,1000000,0.114386666666667},
-{2990567,3865154,3865152,1000000,0.0565173913043478},
-{2990571,3902618,3902462,1000000,0.0464823529411765},
-{2990572,3878770,3879087,1000000,1000000},
-{2990573,3896755,3896773,0.00481714285714286,0.00495882352941177},
-{2990574,3896773,3896794,0.00676285714285714,0.00696176470588235},
-{2990575,3896090,3896091,0.0111724137931034,1000000},
-{2990576,3896152,3896091,1000000,0.04168},
-{2990577,3865251,3865370,0.0536,1000000},
-{2990578,3865497,3865500,1000000,0.01881},
-{2990579,3865499,3865563,0.0192218181818182,0.0199471698113208},
-{2990580,3865408,3865426,1000000,0.0137333333333333},
-{2990581,3865426,3865496,1000000,0.1472625},
-{2990582,3865500,3865426,1000000,0.0207142857142857},
-{2990583,3865372,3865367,1000000,0.00554634146341463},
-{2990584,3865426,3865372,1000000,0.0215675675675676},
-{2990585,3865260,3865319,1000000,0.0228418604651163},
-{2990586,3865319,3865327,1000000,0.00547317073170732},
-{2990587,3865372,3865319,1000000,0.0130727272727273},
-{2990588,3865319,3865293,1000000,0.00778064516129032},
-{2990589,3865265,3865272,1000000,0.00775714285714286},
-{2990590,3865272,3865278,1000000,0.014055},
-{2990591,3865293,3865272,1000000,0.00848571428571429},
-{2990592,3865362,3865392,0.0149414634146341,1000000},
-{2990593,3865362,3865391,1000000,0.0119586206896552},
-{2990594,3865327,3865365,1000000,0.0126439024390244},
-{2990595,3865365,3865391,1000000,0.0122093023255814},
-{2990596,3865367,3865365,1000000,0.00560487804878049},
-{2990597,3865365,3865362,1000000,0.0145105263157895},
-{2990598,3865362,3865355,1000000,0.0289235294117647},
-{2990601,3896322,3896341,1000000,0.114525},
-{2990609,3879251,3879740,0.20174347826087,0.220957142857143},
-{2990610,3879740,3879754,0.00767058823529412,0.00815},
-{2990611,3879799,3879855,0.0354413793103448,1000000},
-{2990616,3902468,3902424,1000000,0.024625},
-{2990617,3902424,3902377,1000000,0.02335},
-{2990618,3902375,3902424,0.0209586206896552,1000000},
-{2990619,3902424,3902462,0.014325,1000000},
-{2990643,3879771,3879815,1000000,0.0211833333333333},
-{2990645,3880333,3880497,1000000,0.0759454545454546},
-{2990646,3881106,3881135,0.0143538461538462,1000000},
-{2990647,3881135,3881469,0.151588235294118,1000000},
-{2990648,3889060,3889459,0.117685714285714,0.12357},
-{2990649,3881175,3881412,0.223540540540541,1000000},
-{2990650,3877242,3877575,0.0839853658536585,1000000},
-{2990651,3877575,3877860,0.0758285714285714,1000000},
-{2990652,3900296,3900136,0.197275471698113,1000000},
-{2990653,3900136,3900008,0.139925,1000000},
-{2990654,3900252,3900250,0.131443636363636,1000000},
-{2990655,3885070,3884747,1000000,0.272892857142857},
-{2990656,3884747,3884487,1000000,0.190581818181818},
-{2990657,3904040,3906426,0.48816,1000000},
-{2990659,3879959,3879682,1000000,0.124516666666667},
-{2990660,3880367,3880329,1000000,0.01640625},
-{2990661,3880329,3880032,1000000,0.148236363636364},
-{2990662,3884455,3884566,1000000,0.0363488372093023},
-{2990663,3884745,3885064,0.11184375,1000000},
-{2990664,3885064,3885108,0.0174387096774194,1000000},
-{2990665,3885188,3885127,0.0769448275862069,1000000},
-{2990666,3865341,3865345,0.0516692307692308,1000000},
-{2990667,3866646,3865827,1000000,0.159502040816326},
-{2990668,3865370,3865376,1000000,0.0337826086956522},
-{2990669,3865376,3865372,1000000,0.021293023255814},
-{2990670,3865334,3865499,0.0697714285714286,0.0737207547169811},
-{2990671,3865518,3866037,1000000,0.263762790697674},
-{2990675,3865152,3865147,1000000,0.0816558139534884},
-{2990676,3865147,3865143,1000000,0.0450473684210526},
-{2990677,3879746,3879803,0.0380454545454545,1000000},
-{2990678,3902777,3902609,1000000,0.0839818181818182},
-{2990679,3903956,3903486,1000000,0.332425},
-{2990680,3903486,3902777,1000000,0.231096},
-{2990693,3899707,3899678,0.0421463414634146,1000000},
-{2990694,3898324,3897666,1000000,0.229716},
-{2990695,3897666,3897215,1000000,0.14446779661017},
-{2990696,3897215,3896258,1000000,0.324894736842105},
-{2990697,3896258,3896128,1000000,0.05275},
-{2990698,3895988,3895580,0.146755555555556,1000000},
-{2990699,3895580,3895024,0.220835294117647,1000000},
-{2990700,3895024,3894419,0.20592,1000000},
-{2990701,3894419,3893890,0.18585,1000000},
-{2990713,3878431,3878807,1000000,0.19932},
-{2990714,3878807,3879279,1000000,0.167135294117647},
-{2990715,3875989,3876854,0.302735294117647,1000000},
-{2990716,3876854,3877242,0.119036842105263,1000000},
-{2990782,3866303,3866962,0.241152,0.262121739130435},
-{2990786,3920209,3919762,0.188360377358491,1000000},
-{2990787,3919762,3919068,0.316965714285714,1000000},
-{2990788,3918999,3919494,0.237102857142857,1000000},
-{2990789,3919808,3920411,0.292965,1000000},
-{2990796,3919855,3919637,0.1200525,1000000},
-{2990826,3881817,3882238,0.0791217391304348,1000000},
-{2990827,3880539,3880747,0.0418615384615385,1000000},
-{2990828,3880747,3882548,0.3396,1000000},
-{2990829,3882659,3882851,1000000,0.0275558823529412},
-{2990830,3882675,3882854,0.0256628571428571,1000000},
-{2990848,3915752,3915866,0.0894774193548387,0.102733333333333},
-{2990849,3915866,3916589,0.276279069767442,0.282857142857143},
-{2990850,3917533,3917885,0.11654347826087,0.119133333333333},
-{2990851,3917885,3918119,0.0808883720930233,0.0828142857142857},
-{2990857,3908448,3908550,0.0216292682926829,0.0197066666666667},
-{2990858,3908550,3909963,0.289152,0.272784905660377},
-{2990859,3873683,3873677,0.123552,0.125221621621622},
-{2990860,3921479,3921931,0.0829475409836066,0.079059375},
-{2990861,3869593,3869856,0.352955555555556,0.352955555555556},
-{2990862,3869856,3870381,0.177377777777778,0.177377777777778},
-{2990863,3872757,3871965,0.160536842105263,0.160536842105263},
-{2990864,3871965,3871845,0.0192310344827586,0.0192310344827586},
-{2990865,3876213,3875732,0.406444444444444,0.406444444444444},
-{2990866,3876982,3876508,0.146163636363636,0.146163636363636},
-{2990867,3873221,3873066,0.153417391304348,1000000},
-{2990868,3873066,3872746,0.45184,1000000},
-{2990869,3872863,3872735,1000000,0.230147368421053},
-{2990870,3872735,3872648,1000000,0.07765},
-{2990871,3882668,3882656,1000000,0.0380634146341463},
-{2990872,3879982,3880413,0.118944827586207,1000000},
-{2990873,3879923,3880356,1000000,0.135011538461538},
-{2990874,3879633,3879749,0.1128,1000000},
-{2990875,3879749,3879088,0.276204,1000000},
-{2990876,3879510,3879637,0.114290909090909,1000000},
-{2990877,3879637,3879746,0.0776487804878049,1000000},
-{2990878,3879803,3879845,0.0319021276595745,1000000},
-{2990879,3879845,3879927,0.0683142857142857,1000000},
-{2990880,3879566,3879722,1000000,0.118954285714286},
-{2990881,3879722,3879809,1000000,0.0631846153846154},
-{2990882,3879160,3879193,0.113546341463415,1000000},
-{2990883,3879193,3879212,0.128010810810811,1000000},
-{2990884,3878438,3878428,1000000,0.0088304347826087},
-{2990885,3875923,3876014,0.0474230769230769,1000000},
-{2990886,3878371,3878349,1000000,0.0632847457627119},
-{2990887,3878349,3878278,1000000,0.196067796610169},
-{2990888,3878347,3878324,0.223788679245283,1000000},
-{2990889,3878324,3878320,0.0315,1000000},
-{2990895,3878333,3878344,0.0651157894736842,1000000},
-{2990896,3878344,3878347,0.181367441860465,1000000},
-{2990897,3877047,3877153,0.106488888888889,1000000},
-{2990898,3874152,3874069,0.0974204081632653,1000000},
-{2990899,3874433,3874250,0.220105263157895,1000000},
-{2990900,3874250,3874152,0.0978510638297872,1000000},
-{2990901,3874807,3874731,1000000,0.08601},
-{2990902,3874731,3874514,1000000,0.2685},
-{2990903,3879226,3879401,1000000,0.0528933333333333},
-{2990904,3879401,3879464,1000000,0.0276},
-{2990905,3879619,3879676,1000000,0.0819103448275862},
-{2990906,3879076,3879278,0.0465849056603774,1000000},
-{2990907,3879278,3879419,0.0363509433962264,1000000},
-{2990908,3878364,3878139,0.0705906976744186,1000000},
-{2990909,3879711,3879519,1000000,0.109422222222222},
-{2990910,3879519,3879445,1000000,0.0334875},
-{2990911,3879761,3879581,0.145942857142857,1000000},
-{2990912,3880676,3880454,1000000,0.100624390243902},
-{2990913,3880454,3880204,1000000,0.119368421052632},
-{2990914,3881043,3880738,0.125261538461538,1000000},
-{2990915,3881830,3881320,0.187214634146341,1000000},
-{2990916,3881320,3881043,0.104637209302326,1000000},
-{2990917,3875297,3874836,0.124258823529412,1000000},
-{2990918,3875796,3875742,1000000,0.01653},
-{2990919,3875742,3875293,1000000,0.17221935483871},
-{2990921,3870311,3870674,0.0720382978723404,1000000},
-{2990922,3869574,3869566,0.063611320754717,1000000},
-{2990923,3869566,3869540,0.0817615384615385,1000000},
-{2990924,3869685,3869828,1000000,0.4057375},
-{2990925,3869828,3869825,1000000,0.0291574468085106},
-{2990926,3865628,3865054,0.168307692307692,1000000},
-{2990927,3865054,3864874,0.07272,1000000},
-{2990928,3865773,3865712,0.0140428571428571,1000000},
-{2990929,3865712,3865628,0.0229609756097561,1000000},
-{2990930,3865118,3864877,1000000,0.0847818181818182},
-{2990931,3864877,3864708,1000000,0.0522705882352941},
-{2990932,3865020,3864900,1000000,0.0494275862068966},
-{2990933,3865103,3864900,0.116788235294118,1000000},
-{2990934,3864900,3864872,0.021,0.01125},
-{2990935,3862165,3861969,1000000,0.0698360655737705},
-{2990936,3862763,3862672,0.035025,1000000},
-{2990937,3862672,3862475,0.0632285714285714,1000000},
-{2990938,3862821,3862723,1000000,0.0398163934426229},
-{2990939,3863138,3862821,1000000,0.132551612903226},
-{2990940,3910759,3911354,0.39116,0.39116},
-{2990942,3875453,3875564,0.0313736842105263,1000000},
-{2990943,3875501,3875429,0.11925,1000000},
-{2990944,3875429,3875390,0.068025,1000000},
-{2990945,3896545,3896700,0.150985714285714,0.150985714285714},
-{2990946,3896700,3896798,0.0767294117647059,0.0931714285714286},
-{2990947,3896707,3896700,0.446533333333333,0.446533333333333},
-{2990948,3875390,3874988,0.116386363636364,1000000},
-{2990949,3874988,3874569,0.124843902439024,1000000},
-{2990950,3874569,3874035,0.151271428571429,1000000},
-{2990951,3875213,3875124,1000000,0.100061538461538},
-{2990952,3875776,3875668,1000000,0.256827272727273},
-{2990953,3875585,3875511,1000000,0.110712},
-{2990954,3872671,3872323,0.0741130434782609,1000000},
-{2990955,3872323,3872125,0.0480125,1000000},
-{2990956,3872125,3871620,0.101338775510204,1000000},
-{2990957,3871620,3871184,0.085908,1000000},
-{2990958,3871651,3871219,1000000,0.0999767441860465},
-{2990959,3871219,3870464,1000000,0.180886363636364},
-{2990960,3878624,3878522,0.06134,1000000},
-{2990961,3878522,3878334,0.131269565217391,1000000},
-{2990962,3878430,3878268,1000000,0.09834},
-{2990963,3878268,3878230,1000000,0.0309333333333333},
-{2990964,3897579,3897609,1000000,0.00718666666666667},
-{2990965,3897609,3897647,0.0220545454545455,1000000},
-{2990966,3897647,3897670,0.0138166666666667,1000000},
-{2990967,3867604,3866284,0.332386046511628,1000000},
-{2990968,3866284,3866140,0.0351130434782609,1000000},
-{2990969,3866247,3866082,1000000,0.0425162790697674},
-{2990970,3866082,3866017,1000000,0.0221692307692308},
-{2990971,3866161,3866340,1000000,0.08775},
-{2990972,3866340,3866425,1000000,0.041784},
-{2990973,3866283,3866348,0.0367222222222222,1000000},
-{2990974,3866348,3866419,0.110444444444444,1000000},
-{2990975,3866425,3866492,1000000,0.118835294117647},
-{2990976,3866492,3866487,1000000,0.0356653846153846},
-{2990977,3866419,3866413,0.0328641509433962,1000000},
-{2990978,3866413,3866067,0.325934693877551,1000000},
-{2990979,3896072,3896068,1000000,0.0101769230769231},
-{2990980,3896072,3896053,1000000,0.00915555555555556},
-{2990981,3895876,3895961,1000000,0.0375692307692308},
-{2990982,3895961,3895974,1000000,0.00441176470588235},
-{2990983,3896003,3895961,1000000,0.0197454545454545},
-{2990984,3894631,3894618,1000000,0.00777735849056604},
-{2990985,3895178,3895180,1000000,0.145015384615385},
-{2990986,3894878,3894989,1000000,0.07764},
-{2990993,3894848,3894756,0.0261673469387755,0.0261673469387755},
-{2990994,3894756,3894733,0.005364,0.005364},
-{2990995,3901000,3901293,0.105287671232877,1000000},
-{2990998,3885187,3885106,0.135861538461538,1000000},
-{2990999,3885106,3885060,0.0788666666666667,1000000},
-{2991000,3885383,3885300,1000000,0.243642857142857},
-{2991001,3885300,3885237,1000000,0.16247027027027},
-{2991002,3885449,3885408,1000000,0.131125714285714},
-{2991003,3885408,3885383,1000000,0.0824294117647059},
-{2991004,3887312,3887350,1000000,0.0142875},
-{2991005,3887350,3887412,1000000,0.026725},
-{2991006,3891287,3891414,1000000,0.03834},
-{2991007,3891414,3891772,1000000,0.113061538461538},
-{2991008,3887041,3887147,0.0840954545454546,1000000},
-{2991009,3887447,3887404,1000000,0.00577714285714286},
-{2991010,3887477,3887561,1000000,0.008821875},
-{2991012,3909029,3909914,0.172227692307692,0.167086567164179},
-{2991013,3909914,3910535,0.10512,0.103527272727273},
-{2991014,3888856,3888743,1000000,0.0159085714285714},
-{2991015,3888743,3887447,1000000,0.173256338028169},
-{2991016,3889738,3890294,1000000,0.123545454545455},
-{2991017,3892497,3892168,1000000,0.081276},
-{2991018,3892168,3891573,1000000,0.135685714285714},
-{2991019,3892482,3893529,1000000,0.328714285714286},
-{2991020,3893529,3895137,1000000,0.422054237288136},
-{2991021,3885060,3885026,0.0380363636363636,1000000},
-{2991022,3885026,3884978,0.04855,1000000},
-{2991045,3883361,3883449,1000000,0.0192724137931034},
-{2991046,3883430,3883504,0.0203236363636364,1000000},
-{2991047,3884540,3884796,1000000,0.262046153846154},
-{2991048,3883449,3883603,1000000,0.0370821428571429},
-{2991049,3883603,3883843,1000000,0.0635207547169811},
-{2991050,3884206,3884398,0.185053846153846,1000000},
-{2991051,3883610,3884148,0.179657142857143,1000000},
-{2991052,3884348,3884401,0.0198782608695652,1000000},
-{2991065,3872930,3872807,0.0386322580645161,0.0544363636363636},
-{2991066,3870251,3870193,0.0212275862068966,0.0171},
-{2991067,3880104,3879977,1000000,0.07333125},
-{2991068,3879977,3879855,1000000,0.0642193548387097},
-{2991069,3889855,3889293,1000000,0.102777049180328},
-{2991070,3854769,3854466,0.0859866666666667,0.117254545454545},
-{2991071,3869541,3869286,0.0552585365853659,1000000},
-{2991151,3882851,3883947,1000000,0.170434782608696},
-{2991152,3882854,3883941,0.164585915492958,1000000},
-{2991153,3881432,3882192,0.185793103448276,1000000},
-{2991154,3881411,3882161,1000000,0.174531147540984},
-{2991155,3879053,3878408,1000000,0.25427027027027},
-{2991156,3879017,3878377,0.347911111111111,1000000},
-{2991157,3874383,3873464,0.290302702702703,0.261980487804878},
-{2991158,3873464,3873430,0.0132642857142857,0.0106114285714286},
-{2991164,3875412,3875299,0.0435705882352941,0.0423257142857143},
-{2991165,3875299,3874383,0.281553846153846,0.255362790697674},
-{2991166,3879420,3879718,1000000,0.1135},
-{2991167,3876530,3877533,0.198747368421053,0.198747368421053},
-{2991168,3879675,3879740,0.0409384615384615,1000000},
-{2991169,3882161,3883044,1000000,0.200537704918033},
-{2991170,3882192,3883089,0.208706896551724,1000000},
-{2991171,3895622,3895876,1000000,0.138097959183673},
-{2991172,3895400,3895622,1000000,0.13932},
-{2991173,3893688,3894066,0.11028,1000000},
-{2991174,3894066,3894435,0.09285,1000000},
-{2991175,3894435,3894689,0.0612967741935484,1000000},
-{2991176,3900391,3900454,0.05049,1000000},
-{2991177,3900454,3900597,0.09955,1000000},
-{2991178,3900383,3900333,0.03942,1000000},
-{2991179,3900333,3900248,0.0663076923076923,1000000},
-{2991180,3900597,3900865,0.069264,1000000},
-{2991181,3900865,3901198,0.0820690909090909,1000000},
-{2991182,3899087,3899210,0.0269016393442623,1000000},
-{2991183,3903122,3903369,1000000,0.0605755102040816},
-{2991184,3902923,3903129,0.0464315789473684,1000000},
-{2991185,3902482,3902923,0.0919578947368421,1000000},
-{2991186,3902091,3902482,0.0820666666666667,1000000},
-{2991187,3901198,3902091,0.19275,1000000},
-{2991188,3881563,3881611,1000000,0.0314545454545455},
-{2991189,3858246,3858172,0.00917045454545455,1000000},
-{2991190,3858415,3858348,1000000,0.00913695652173913},
-{2991191,3890859,3890913,1000000,1000000},
-{2991192,3890913,3891006,1000000,1000000},
-{2991193,3889707,3890069,1000000,1000000},
-{2991194,3890069,3890154,1000000,1000000},
-{2991195,3873536,3873951,0.0995739130434783,1000000},
-{2991196,3874281,3875650,0.383347826086957,1000000},
-{2991197,3873526,3873935,1000000,0.0910408163265306},
-{2991198,3890491,3890776,0.118581818181818,1000000},
-{2991214,3908585,3907691,0.238738775510204,0.238738775510204},
-{2991215,3907691,3907590,0.023952,0.0244408163265306},
-{2991216,3878993,3879010,1000000,0.0902},
-{2991236,3903007,3903248,1000000,0.0672},
-{2991237,3903248,3903541,1000000,0.0757173913043478},
-{2991242,3881234,3881476,1000000,0.226264864864865},
-{2991253,3872707,3872718,0.0880758620689655,1000000},
-{2991254,3872718,3872716,0.0552486486486487,1000000},
-{2991255,3872400,3872435,1000000,0.035856},
-{2991256,3872086,3872362,1000000,0.210136842105263},
-{2991257,3872362,3872400,1000000,0.0293222222222222},
-{2991258,3874532,3872043,1000000,0.444203389830508},
-{2991259,3865056,3865046,0.116157142857143,1000000},
-{2991260,3865046,3865031,0.110869565217391,1000000},
-{2991261,3865212,3865179,0.0586695652173913,1000000},
-{2991262,3865179,3865109,0.0800790697674419,1000000},
-{2991263,3865290,3865227,1000000,0.0771681818181818},
-{2991264,3868213,3868143,1000000,0.0181297297297297},
-{2991270,3897969,3898096,1000000,0.0536042553191489},
-{2991271,3900073,3900099,1000000,0.136188888888889},
-{2991272,3900099,3900114,1000000,0.0707307692307692},
-{2991273,3867538,3867187,1000000,0.0686490566037736},
-{2991274,3867187,3866765,1000000,0.0778714285714286},
-{2991275,3866765,3866437,1000000,0.0557052631578947},
-{2991276,3867928,3867687,1000000,0.0454754716981132},
-{2991277,3867687,3867538,1000000,0.0332884615384615},
-{2991278,3868567,3868236,0.0618222222222222,1000000},
-{2991279,3868236,3867968,0.0469698113207547,1000000},
-{2991280,3867890,3867763,0.04935,1000000},
-{2991281,3867853,3868098,1000000,0.409705263157895},
-{2991282,3869812,3869465,0.113648275862069,1000000},
-{2991283,3869465,3869149,0.09408,1000000},
-{2991284,3869814,3869787,0.0487609756097561,1000000},
-{2991285,3869787,3869766,0.0162,1000000},
-{2991286,3870464,3870117,1000000,0.1316},
-{2991287,3870343,3870097,0.0777272727272727,1000000},
-{2991288,3870097,3869879,0.0819692307692308,1000000},
-{2991289,3865304,3865093,1000000,0.0726514285714286},
-{2991290,3865093,3865048,1000000,0.02378},
-{2991291,3865804,3865582,0.0458875,1000000},
-{2991292,3865582,3865174,0.0963466666666667,1000000},
-{2991293,3863783,3863563,0.0806095238095238,1000000},
-{2991294,3864699,3864514,1000000,0.0838},
-{2991295,3864529,3864376,0.0747875,1000000},
-{2991296,3863983,3863616,1000000,0.120845901639344},
-{2991297,3869038,3869107,1000000,0.0490565217391304},
-{2991298,3866487,3866135,1000000,0.308919230769231},
-{2991299,3866135,3866073,1000000,0.0372244897959184},
-{2991300,3866659,3865766,0.193172727272727,1000000},
-{2991301,3866996,3866843,0.029076,1000000},
-{2991302,3866843,3866659,0.0368352941176471,1000000},
-{2991303,3867395,3866996,0.078204,1000000},
-{2991304,3864724,3864699,1000000,0.0124761904761905},
-{2991305,3869766,3869563,0.162305882352941,1000000},
-{2991306,3869563,3869452,0.0928384615384615,1000000},
-{2991307,3860703,3860639,0.00973972602739726,1000000},
-{2991308,3860639,3859838,0.143432,1000000},
-{2991309,3860691,3860641,1000000,0.00755844155844156},
-{2991310,3897345,3897382,0.00928636363636363,1000000},
-{2991327,3881291,3881332,1000000,0.0088448275862069},
-{2991328,3881332,3881411,1000000,0.0193862068965517},
-{2991329,3881329,3881357,0.00797586206896552,1000000},
-{2991330,3881357,3881432,0.019448275862069,1000000},
-{2991331,3897568,3897588,0.0103548387096774,1000000},
-{2991332,3897572,3897588,0.0127428571428571,1000000},
-{2991341,3873283,3873544,1000000,1000000},
-{2991342,3868408,3868370,0.0131466666666667,0.0179272727272727},
-{2991343,3868370,3867404,0.305491304347826,0.351315},
-{2991344,3868742,3868667,1000000,0.04584},
-{2991345,3868667,3867657,1000000,0.505542857142857},
-{2991346,3868370,3868667,1000000,0.295430769230769},
-{2991347,3868500,3868454,0.0120697674418605,0.016741935483871},
-{2991348,3868849,3868813,0.0273,0.0287368421052632},
-{2991349,3868813,3868742,0.0396705882352941,0.0306545454545455},
-{2991350,3868454,3868813,0.229058823529412,1000000},
-{2991351,3869110,3868766,0.135864,0.178768421052632},
-{2991352,3868766,3868229,0.285821052631579,0.36204},
-{2991353,3869858,3870184,1000000,1000000},
-{2991354,3872930,3873093,0.098225,1000000},
-{2991355,3873093,3873215,0.137218181818182,0.205827272727273},
-{2991356,3873093,3873179,0.0800666666666667,1000000},
-{2991357,3872463,3872382,1000000,0.0243290322580645},
-{2991358,3872382,3871914,1000000,0.234233333333333},
-{2991359,3872098,3871942,1000000,0.0579272727272727},
-{2991360,3871887,3872109,1000000,0.12516},
-{2991361,3872098,3872109,1000000,1000000},
-{2991362,3872468,3872349,1000000,0.0468272727272727},
-{2991363,3872349,3872098,1000000,0.12474},
-{2991364,3872349,3872347,1000000,1000000},
-{2991365,3872109,3872347,1000000,0.11583},
-{2991366,3872347,3872467,1000000,0.0839368421052632},
-{2991367,3870404,3870409,0.1794,0.1794},
-{2991368,3870409,3870382,0.0263777777777778,0.0263777777777778},
-{2991369,3895931,3895895,1000000,0.0146533333333333},
-{2991370,3896128,3896155,0.0139058823529412,1000000},
-{2991371,3896155,3896217,0.03776,1000000},
-{2991372,3872468,3872463,0.189083333333333,1000000},
-{2991373,3872463,3872465,0.00686666666666667,1000000},
-{2991374,3872465,3872469,0.00681666666666667,1000000},
-{2991375,3872469,3872458,0.1283,1000000},
-{2991376,3872469,3872331,0.0443555555555556,1000000},
-{2991377,3872331,3871930,0.127241379310345,1000000},
-{2991378,3896030,3895988,0.0145058823529412,1000000},
-{2991393,3900424,3900700,1000000,1000000},
-{2991394,3900700,3900760,1000000,1000000},
-{2991395,3900769,3900762,1000000,1000000},
-{2991396,3900762,3900760,1000000,1000000},
-{2991397,3866920,3866857,1000000,0.0199285714285714},
-{2991398,3872309,3872724,0.195,0.195},
-{2991399,3872724,3871955,0.316942105263158,0.316942105263158},
-{2991400,3872921,3872860,0.0239172413793103,0.0187459459459459},
-{2991401,3872860,3872317,0.195192857142857,0.18218},
-{2991402,3872724,3872860,1000000,1000000},
-{2991403,3867433,3867180,0.27308,1000000},
-{2991404,3867180,3867239,0.113929411764706,1000000},
-{2991405,3866857,3866823,1000000,0.0139333333333333},
-{2991406,3866823,3866734,1000000,0.0363230769230769},
-{2991407,3866420,3866538,0.0419571428571428,1000000},
-{2991408,3870015,3869823,1000000,1000000},
-{2991409,3868127,3867847,1000000,0.0838333333333333},
-{2991410,3867847,3867714,1000000,0.0409588235294118},
-{2991411,3867890,3867847,0.0575428571428571,0.0464769230769231},
-{2991412,3867847,3867788,0.0433071428571429,1000000},
-{2991413,3867788,3867714,1000000,0.077544},
-{2991417,3876821,3876707,1000000,0.0787333333333333},
-{2991418,3876707,3876345,0.258852631578947,0.258852631578947},
-{2991421,3878768,3878754,1000000,1000000},
-{2991422,3878754,3878714,1000000,1000000},
-{2991423,3879096,3878754,1000000,1000000},
-{2991424,3867034,3866875,1000000,0.0678782608695652},
-{2991431,3866875,3867034,0.164022222222222,0.164022222222222},
-{2991432,3866875,3866784,1000000,0.0393130434782609},
-{2991433,3866784,3866425,1000000,0.149427272727273},
-{2991434,3867354,3867106,1000000,0.138866666666667},
-{2991435,3867106,3867034,1000000,0.0370636363636364},
-{2991436,3888064,3888278,0.229533333333333,0.229533333333333},
-{2991441,3865300,3864162,0.445427586206896,0.478422222222222},
-{2991442,3864162,3864018,0.0906461538461538,0.094272},
-{2991443,3864450,3864162,1000000,1000000},
-{2991448,3865993,3865949,0.0222452830188679,1000000},
-{2991449,3865949,3865636,0.133488888888889,1000000},
-{2991450,3865903,3865949,0.112305882352941,1000000},
-{2991453,3880453,3880834,1000000,0.233622222222222},
-{2991454,3862149,3861856,1000000,1000000},
-{2991460,3867239,3866945,1000000,0.107979310344828},
-{2991461,3866945,3866920,1000000,0.00996428571428572},
-{2991462,3867009,3866945,0.052925,1000000},
-{2991463,3885501,3885566,0.0382941176470588,1000000},
-{2991464,3877606,3877634,1000000,0.0897428571428572},
-{2991465,3877606,3877741,0.0441375,0.0403542857142857},
-{2991466,3877741,3878091,0.10618125,0.10618125},
-{2991467,3877634,3877741,0.165,1000000},
-{2991468,3868904,3868212,0.256044444444444,1000000},
-{2991469,3868927,3868214,1000000,0.563169230769231},
-{2991470,3862279,3862190,0.0388888888888889,0.0388888888888889},
-{2991471,3862851,3862511,0.1632,0.1632},
-{2991472,3862511,3862421,1000000,1000000},
-{2991473,3862421,3862279,1000000,1000000},
-{2991474,3881952,3881990,1000000,1000000},
-{2991475,3881281,3881952,1000000,1000000},
-{2991476,3884737,3884683,0.0797052631578947,0.0841333333333333},
-{2991477,3884584,3884745,0.0402,1000000},
-{2991478,3884584,3884683,0.0792315789473684,1000000},
-{2991479,3879502,3879296,0.200435294117647,0.1262},
-{2991480,3879296,3879220,0.07628,0.03814},
-{2991481,3879135,3879296,0.139633333333333,1000000},
-{2991482,3879578,3879889,1000000,1000000},
-{2991483,3879889,3880246,1000000,1000000},
-{2991484,3884566,3884716,1000000,0.0366},
-{2991485,3884716,3884953,1000000,0.0599727272727273},
-{2991486,3863664,3863525,1000000,1000000},
-{2991487,3867716,3867683,0.0400173913043478,1000000},
-{2991488,3867683,3867474,0.33906,1000000},
-{2991497,3880971,3880913,0.03969375,1000000},
-{2991498,3880913,3880545,0.334585714285714,1000000},
-{2991499,3864497,3864470,0.0181826086956522,1000000},
-{2991500,3880854,3880781,1000000,0.0593117647058823},
-{2991506,3864511,3864417,0.0237285714285714,0.0243073170731707},
-{2991507,3864559,3864417,1000000,1000000},
-{2991522,3877789,3877691,0.11715,1000000},
-{2991523,3877691,3877668,0.07164,1000000},
-{2991526,3878799,3878033,1000000,0.568930434782609},
-{2991527,3878033,3877881,1000000,0.103527272727273},
-{2991528,3877766,3877871,0.0554608695652174,1000000},
-{2991529,3877691,3877871,0.38124,1000000},
-{2991530,3877871,3878033,0.35496,1000000},
-{2991531,3881730,3881732,0.00755294117647059,1000000},
-{2991532,3881710,3881722,0.00772941176470588,1000000},
-{2991533,3881722,3881730,0.0188470588235294,1000000},
-{2991534,3881722,3881634,1000000,0.069408},
-{2991535,3881634,3881599,1000000,0.23395},
-{2991536,3881475,3881461,0.0144,1000000},
-{2991537,3881611,3881475,0.1048875,1000000},
-{2991538,3881461,3881448,0.01176,1000000},
-{2991539,3881448,3881436,0.010141935483871,1000000},
-{2991540,3881436,3881393,0.03399375,1000000},
-{2991541,3881393,3881385,0.00765454545454545,1000000},
-{2991542,3881385,3881085,0.160290909090909,1000000},
-{2991543,3881461,3881385,0.21594,1000000},
-{2991544,3875774,3875608,1000000,0.0793363636363636},
-{2991545,3875608,3874858,1000000,0.27819375},
-{2991546,3875571,3875608,1000000,1000000},
-{2991547,3863836,3863698,0.0961756097560976,0.101107692307692},
-{2991548,3863698,3863691,0.04422,0.03685},
-{2991549,3863851,3863758,0.0284470588235294,0.0312},
-{2991550,3863758,3863691,0.03612,0.0387},
-{2991551,3863691,3863667,0.0123,0.00933103448275862},
-{2991552,3863667,3862713,0.334215789473684,0.295353488372093},
-{2991553,3881628,3881710,0.0560647058823529,1000000},
-{2991567,3865052,3865056,0.0381767441860465,1000000},
-{2991568,3865002,3865028,0.0601317073170732,1000000},
-{2991569,3865028,3865052,0.0540585365853659,1000000},
-{2991578,3865056,3865137,0.0334909090909091,1000000},
-{2991579,3865137,3865175,0.00980769230769231,1000000},
-{2991580,3865137,3865163,0.0178090909090909,1000000},
-{2991583,3881127,3881159,0.0198555555555556,0.0223375},
-{2991584,3865161,3865190,0.00601578947368421,1000000},
-{2991585,3865190,3865273,0.0256166666666667,1000000},
-{2991586,3865190,3865163,1000000,0.0183692307692308},
-{2991587,3880766,3880813,0.103377272727273,0.12635},
-{2991588,3881022,3880992,0.011151724137931,1000000},
-{2991589,3880992,3880951,0.01538,1000000},
-{2991590,3881028,3880183,1000000,0.469486956521739},
-{2991591,3881028,3881127,1000000,0.0591818181818182},
-{2991592,3881022,3880924,1000000,0.0885},
-{2991593,3880924,3880813,1000000,0.0462235294117647},
-{2991594,3880924,3881209,0.1292625,1000000},
-{2991595,3881083,3881022,0.0256071428571429,1000000},
-{2991596,3881063,3881022,1000000,0.033036},
-{2991597,3881083,3881063,0.069288,1000000},
-{2991598,3878624,3878762,1000000,0.123245454545455},
-{2991599,3878762,3878884,1000000,0.12018},
-{2991600,3878618,3878696,0.0435214285714286,1000000},
-{2991601,3878762,3878696,0.085425,1000000},
-{2991602,3878884,3879210,1000000,0.208246153846154},
-{2991603,3879210,3879616,1000000,0.186920930232558},
-{2991606,3864216,3864209,0.0546,0.0546},
-{2991607,3864209,3864206,1000000,1000000},
-{2991608,3864507,3864503,0.267545454545455,1000000},
-{2991609,3864503,3864505,0.1784,1000000},
-{2991610,3864778,3864774,1000000,0.25616},
-{2991611,3864774,3864769,1000000,0.0472714285714286},
-{2991612,3879452,3879472,0.02745,1000000},
-{2991623,3878815,3878797,0.0104142857142857,0.01215},
-{2991624,3879510,3879472,1000000,0.0318545454545455},
-{2991625,3879558,3879996,0.24033,1000000},
-{2991626,3881276,3881468,1000000,0.111954545454545},
-{2991627,3863763,3863322,0.9074625,0.392416216216216},
-{2991628,3864040,3863968,0.02338125,0.02494},
-{2991629,3863855,3863679,0.0547846153846154,1000000},
-{2991644,3863679,3863605,0.0408882352941177,1000000},
-{2991645,3863605,3863561,0.0159257142857143,0.02787},
-{2991651,3865670,3865045,0.265157142857143,0.285553846153846},
-{2991652,3865045,3864973,0.0455294117647059,0.048375},
-{2991653,3865096,3865045,0.0542,0.03252},
-{2991654,3869225,3869293,0.1837,0.239608695652174},
-{2991655,3869293,3869323,0.0385578947368421,0.0457875},
-{2991656,3869208,3869293,1000000,1000000},
-{2991657,3869139,3869191,0.190371428571429,0.183806896551724},
-{2991658,3869191,3868970,0.160869230769231,0.149378571428571},
-{2991659,3869208,3869191,1000000,1000000},
-{2991660,3866209,3865562,0.25132,0.269271428571429},
-{2991661,3865562,3865374,0.0810882352941177,1000000},
-{2991662,3865191,3865373,0.0699846153846154,0.0718263157894737},
-{2991663,3865373,3865374,0.04795,0.04795},
-{2991664,3865562,3865373,0.117915789473684,0.0722709677419355},
-{2991665,3863845,3863600,0.141857142857143,1000000},
-{2991666,3863600,3863475,1000000,1000000},
-{2991667,3863621,3863475,1000000,0.0574344827586207},
-{2991668,3863600,3863621,0.0604173913043478,1000000},
-{2991669,3857994,3858289,0.0801681818181818,0.0839857142857143},
-{2991670,3858289,3858538,0.0737875,0.0787066666666667},
-{2991671,3858538,3858574,0.0119875,0.0127866666666667},
-{2991672,3858574,3858619,0.0140125,0.0149466666666667},
-{2991673,3858289,3858574,0.44046,1000000},
-{2991674,3879376,3879402,0.0165454545454545,0.0202222222222222},
-{2991675,3879402,3880021,0.350452941176471,0.350452941176471},
-{2991676,3879150,3879402,1000000,0.152371428571429},
-{2991677,3858619,3858676,0.01775,0.0189333333333333},
-{2991678,3858676,3859048,0.10095652173913,0.110571428571429},
-{2991679,3859048,3859213,0.0718857142857143,0.0794526315789474},
-{2991680,3858676,3859048,0.49644,1000000},
-{2991684,3862731,3862709,0.0348,1000000},
-{2991685,3862709,3862264,0.348672,1000000},
-{2991686,3862842,3862815,0.0335454545454546,0.0320869565217391},
-{2991687,3862815,3862428,0.254232,0.264825},
-{2991688,3862709,3862815,1000000,0.0918521739130435},
-{2991722,3865227,3865305,1000000,0.158412},
-{2991723,3863855,3863683,1000000,0.155},
-{2991724,3863683,3863605,1000000,0.08136},
-{2991725,3881543,3881536,0.0074625,1000000},
-{2991729,3868143,3868088,1000000,0.0158823529411765},
-{2991730,3868088,3867406,1000000,0.249088888888889},
-{2991749,3881496,3881475,0.0145542857142857,1000000},
-{2991751,3880898,3880951,1000000,0.0538923076923077},
-{2991752,3880813,3880835,1000000,0.0509023255813953},
-{2991753,3880835,3880898,1000000,0.047553488372093},
-{2991780,3897382,3897577,0.0558837209302326,1000000},
-{2991781,3897577,3897670,0.0240266666666667,1000000},
-{2991786,3900330,3898857,1.43826666666667,1.43826666666667},
-{2991792,3915513,3915369,1000000,0.030584},
-{2991793,3873488,3873541,0.524822222222222,0.545007692307692},
-{2991794,3870377,3869740,0.135072,1000000},
-{2991795,3866073,3866003,1000000,0.0292285714285714},
-{2991796,3866003,3865687,1000000,0.141367346938776},
-{2991797,3875796,3875788,0.01285,1000000},
-{2991798,3875788,3875783,0.01455,1000000},
-{2991799,3875783,3875746,0.10415,1000000},
-{2991802,3870978,3870315,1000000,0.18219},
-{2991803,3870315,3870221,1000000,0.0216},
-{2991804,3860844,3860796,1000000,0.0296093023255814},
-{2991805,3860796,3860754,1000000,0.018175},
-{2991806,3860665,3860796,0.0958421052631579,1000000},
-{2991807,3864568,3864762,0.0862378378378378,0.113957142857143},
-{2991808,3864762,3864797,0.0191,0.02292},
-{2991809,3875120,3875110,0.0782190476190476,1000000},
-{2991810,3875195,3875180,1000000,0.0808819672131147},
-{2991811,3875120,3875195,0.0165529411764706,0.0165529411764706},
-{2991812,3875143,3875131,0.0681049180327869,1000000},
-{2991813,3875131,3875120,0.0686761904761905,1000000},
-{2991814,3875222,3875211,1000000,0.0650262295081967},
-{2991815,3875211,3875195,1000000,0.070672131147541},
-{2991835,3868708,3868721,0.0550444444444445,1000000},
-{2991836,3868721,3868708,0.169911111111111,1000000},
-{2991853,3867799,3867661,0.164448,0.152266666666667},
-{2991854,3867661,3867743,0.093564705882353,0.0611769230769231},
-{2991855,3867743,3867626,0.05225,0.05016},
-{2991856,3867626,3867194,0.190747826086957,0.175488},
-{2991857,3867661,3867626,0.0498222222222222,0.0498222222222222},
-{2991858,3868737,3868299,0.193745454545455,0.157866666666667},
-{2991859,3868299,3868204,0.037775,0.03022},
-{2991860,3868479,3868417,1000000,1000000},
-{2991861,3868417,3868204,0.284488888888889,0.284488888888889},
-{2991862,3869016,3868933,1000000,1000000},
-{2991863,3868933,3868737,0.2716,0.2716},
-{2991864,3871838,3871736,0.0414,0.0365294117647059},
-{2991865,3871736,3871179,0.221458064516129,0.236731034482759},
-{2991866,3865988,3865724,0.10711875,0.11426},
-{2991867,3866125,3865988,0.0374666666666667,0.04496},
-{2991868,3866282,3866484,0.0603103448275862,0.0603103448275862},
-{2991869,3865619,3866143,0.293155555555556,0.293155555555556},
-{2991870,3866125,3866169,0.0294888888888889,1000000},
-{2991871,3866169,3866282,0.0384666666666667,1000000},
-{2991872,3866129,3866169,0.0349333333333333,0.0349333333333333},
-{2991873,3866125,3866181,1000000,0.0382},
-{2991874,3866181,3866282,1000000,0.0658888888888889},
-{2991875,3866143,3866181,0.101333333333333,0.101333333333333},
-{2991881,3870135,3870004,0.0410129032258065,0.0438413793103448},
-{2991882,3870004,3869876,0.03356,0.0347172413793103},
-{2991883,3869876,3868557,0.42934,0.495392307692308},
-{2991884,3868557,3867807,0.2296125,0.272133333333333},
-{2991885,3868535,3868557,0.0367578947368421,0.0367578947368421},
-{2991886,3868535,3867760,0.273622222222222,0.273622222222222},
-{2991887,3870004,3869963,0.0412888888888889,0.0412888888888889},
-{2991888,3869963,3868535,0.661285714285714,0.69435},
-{2991889,3869963,3870372,0.173018181818182,0.181257142857143},
-{2991898,3871060,3870886,1000000,0.09455},
-{2991899,3870886,3870894,0.0447652173913044,0.0447652173913044},
-{2991900,3871060,3870860,1000000,0.0940857142857143},
-{2991901,3870860,3870828,0.01662,0.0151090909090909},
-{2991946,3887138,3887089,0.0258,1000000},
-{2991947,3887089,3886522,0.356571428571429,1000000},
-{2991948,3887184,3887138,0.0251612903225806,0.0251612903225806},
-{2991979,3851974,3851665,0.227066666666667,0.227066666666667},
-{2991980,3851665,3851517,1000000,1000000},
-{2991981,3854353,3854823,1000000,1000000},
-{2991987,3853003,3853167,0.132792857142857,0.161660869565217},
-{2991988,3854086,3853304,0.340285714285714,0.330833333333333},
-{2991989,3853307,3853272,0.0281793103448276,1000000},
-{2991990,3853272,3853197,0.0284,1000000},
-{2991991,3853197,3852293,0.346490909090909,0.38114},
-{2991992,3853172,3853197,1000000,0.016575},
-{2992001,3850814,3851083,0.19075,0.176076923076923},
-{2992002,3864781,3864827,0.148927272727273,0.148927272727273},
-{2992003,3864740,3864827,0.14196,0.14196},
-{2992004,3864872,3864776,1000000,1000000},
-{2992005,3864776,3864740,1000000,1000000},
-{2992006,3864740,3864776,1000000,1000000},
-{2992016,3862454,3862360,0.0284142857142857,0.0306},
-{2992017,3862832,3862454,0.155732142857143,0.1938},
-{2992018,3862454,3862832,0.90144,1000000},
-{2992028,3851226,3850578,0.26042,0.26042},
-{2992029,3850578,3850392,0.0716823529411765,0.0658702702702703},
-{2992030,3850559,3850392,0.0891724137931034,0.0891724137931034},
-{2992031,3850578,3850559,0.02868,0.02868},
-{2992032,3859084,3859594,0.333827586206897,0.312290322580645},
-{2992033,3859594,3859627,0.0290470588235294,0.0290470588235294},
-{2992034,3859213,3859594,0.238028571428571,0.24993},
-{2992035,3857718,3857682,0.0333714285714286,0.03504},
-{2992039,3857950,3858131,0.0803428571428572,0.0749866666666667},
-{2992040,3857734,3857950,0.0835565217391304,1000000},
-{2992041,3857718,3857734,0.00503478260869565,0.00492765957446808},
-{2992042,3857734,3857950,1000000,0.0814978723404255},
-{2992043,3851212,3851217,0.0143636363636364,0.0148125},
-{2992044,3851217,3851390,0.166577142857143,0.176672727272727},
-{2992045,3851986,3851246,0.2582625,0.236125714285714},
-{2992046,3851246,3851212,0.0132827586206897,0.0124258064516129},
-{2992047,3886005,3885990,1000000,0.0215898305084746},
-{2992048,3850824,3851092,0.131976,0.157114285714286},
-{2992049,3851092,3851536,0.896678571428571,0.896678571428571},
-{2992050,3885991,3885945,1000000,0.0181846153846154},
-{2992051,3885945,3885941,1000000,0.0137678571428571},
-{2992052,3887096,3891202,1.06855609756098,1000000},
-{2992053,3885941,3885988,1000000,0.0284470588235294},
-{2992054,3885988,3886214,1000000,0.11631},
-{2992055,3885949,3885982,1000000,0.07054},
-{2992056,3885982,3885988,1000000,0.07123},
-{2992057,3886214,3885982,0.143505882352941,1000000},
-{2992058,3886214,3886553,1000000,0.1315125},
-{2992059,3886317,3886555,0.0836666666666667,1000000},
-{2992060,3886555,3887096,0.173336842105263,1000000},
-{2992061,3886553,3886555,0.0563538461538462,0.0563538461538462},
-{2992062,3885951,3885441,0.379887804878049,0.362218604651163},
-{2992063,3885951,3885989,0.0329823529411765,0.0273512195121951},
-{2992066,3859200,3859178,0.0133333333333333,1000000},
-{2992067,3859243,3859200,0.0242,0.0257612903225806},
-{2992068,3859243,3859274,0.022056,1000000},
-{2992069,3859332,3859274,0.027325,0.0198727272727273},
-{2992070,3859274,3859200,0.0229241379310345,0.0214451612903226},
-{2992071,3862596,3863038,0.249244444444444,0.249244444444444},
-{2992072,3859485,3859390,0.1099,0.0799272727272727},
-{2992073,3864249,3864291,0.352285714285714,1000000},
-{2992074,3864291,3864360,0.19325,0.19325},
-{2992075,3865256,3865244,0.00983684210526316,0.009345},
-{2992076,3859390,3859342,0.0656857142857143,0.0405705882352941},
-{2992077,3859342,3859243,0.1236,0.0811125},
-{2992078,3864708,3864701,1000000,0.060888},
-{2992079,3865244,3864701,0.220177777777778,1000000},
-{2992080,3859485,3859251,0.157416,0.2811},
-{2992081,3859342,3859251,0.6765,1000000},
-{2992082,3865244,3865168,0.101720930232558,0.0994090909090909},
-{2992083,3865168,3865142,0.0250695652173913,0.024536170212766},
-{2992084,3864701,3864684,1000000,0.0517777777777778},
-{2992085,3864684,3864472,1000000,0.792884210526316},
-{2992087,3872572,3871918,1000000,0.289390909090909},
-{2992088,3871918,3871805,0.0364384615384615,0.0364384615384615},
-{2992089,3856698,3855511,0.285612765957447,0.305086363636364},
-{2992090,3856928,3856698,0.052008,0.054175},
-{2992091,3857308,3857140,0.0397276595744681,0.0414933333333333},
-{2992092,3857140,3856928,0.0544125,0.0567782608695652},
-{2992093,3857631,3857308,0.08625,0.0880851063829787},
-{2992094,3871181,3871004,1.11756,1000000},
-{2992095,3876657,3876803,0.14925652173913,1000000},
-{2992096,3876188,3876569,1000000,0.469246153846154},
-{2992097,3876569,3876693,1000000,0.13451320754717},
-{2992112,3892093,3893118,0.692772413793103,1000000},
-{2992113,3893118,3893119,0.0661826086956522,1000000},
-{2992114,3878821,3878805,0.0114,0.0111673469387755},
-{2992115,3878805,3878732,0.0460875,0.0460875},
-{2992123,3869382,3869409,1000000,0.303533333333333},
-{2992124,3869379,3869366,0.0818142857142857,0.0818142857142857},
-{2992125,3869366,3869382,0.42264,0.325107692307692},
-{2992127,3875211,3875131,0.0518625,0.0296357142857143},
-{2992135,3892959,3897728,1.91785454545455,1.91785454545455},
-{2992136,3892586,3892804,0.0750612244897959,0.0782553191489362},
-{2992137,3892804,3893621,0.650422222222222,0.399122727272727},
-{2992151,3869452,3869395,0.0214,0.0321},
-{2992152,3869395,3868902,0.1570875,0.193338461538462},
-{2992153,3884391,3884355,0.211227272727273,0.193625},
-{2992154,3884355,3884331,0.174128571428571,0.128305263157895},
-{2992155,3884783,3884355,0.168022222222222,0.168022222222222},
-{2992156,3883606,3884099,0.213475862068966,0.229288888888889},
-{2992157,3884099,3884210,0.0423636363636364,0.0388333333333333},
-{2992158,3884026,3883683,0.165995454545455,0.1739},
-{2992159,3883683,3883315,0.20674,0.167627027027027},
-{2992160,3883683,3883722,1000000,1000000},
-{2992161,3883722,3884099,1000000,1000000},
-{2992162,3883315,3883393,0.04212,0.0702},
-{2992163,3883393,3883606,0.100220689655172,0.2422},
-{2992164,3883393,3883722,0.228088888888889,0.228088888888889},
-{2992165,3883890,3883756,0.148414285714286,1000000},
-{2992166,3883756,3883512,1000000,1000000},
-{2992167,3897728,3897774,0.0157272727272727,0.0157272727272727},
-{2992171,3883173,3883251,0.0707333333333333,0.079575},
-{2992172,3883251,3883290,0.0316588235294118,0.0299},
-{2992178,3879965,3879866,1000000,1000000},
-{2992179,3879242,3879188,1000000,0.689576470588235},
-{2992180,3879188,3879179,0.0315142857142857,0.0315142857142857},
-{2992181,3879188,3879630,1000000,1000000},
-{2992182,3878491,3878394,0.120244444444444,0.120244444444444},
-{2992183,3885989,3886558,0.231227027027027,0.182029787234043},
-{2992184,3885589,3885250,0.268666666666667,0.268666666666667},
-{2992185,3885544,3885589,1000000,0.0324413793103448},
-{2992187,3892736,3892849,0.0226133333333333,1000000},
-{2992188,3892950,3892996,0.0126734693877551,1000000},
-{2992189,3886553,3887094,1000000,0.1694},
-{2992190,3887094,3887096,0.0261555555555556,0.0261555555555556},
-{2992191,3891202,3887094,1.2240972972973,1000000},
-{2992192,3901257,3900985,0.1632,0.156672},
-{2992193,3900985,3900753,0.155769230769231,0.15},
-{2992194,3900546,3900985,1000000,1000000},
-{2992195,3893049,3893268,1000000,0.0879073170731707},
-{2992196,3893268,3893723,1000000,0.206333333333333},
-{2992203,3892996,3893688,0.220704,1000000},
-{2992207,3885990,3885960,1000000,0.0211358490566038},
-{2992208,3885960,3885945,1000000,0.0593333333333333},
-{2992209,3885941,3885929,1000000,0.0737389830508475},
-{2992210,3885929,3885949,1000000,0.0692852459016393},
-{2992214,3891717,3891728,0.147327272727273,1000000},
-{2992215,3891796,3892080,0.130991489361702,0.143176744186047},
-{2992216,3891717,3891796,1000000,0.09748},
-{2992217,3862004,3861935,0.0451565217391304,0.043275},
-{2992218,3861935,3861511,0.230864516129032,0.230864516129032},
-{2992219,3861984,3861970,0.822882352941177,0.518111111111111},
-{2992220,3861970,3861925,0.03615,0.02892},
-{2992221,3884715,3884872,0.0461823529411765,0.0506516129032258},
-{2992222,3884872,3885015,0.04944375,0.0452057142857143},
-{2992223,3862432,3862185,0.124622222222222,0.124622222222222},
-{2992224,3862185,3861970,1000000,1000000},
-{2992225,3863081,3863024,0.04075,0.0514736842105263},
-{2992226,3863024,3862432,0.452953846153846,0.512034782608696},
-{2992227,3862185,3863024,0.521155555555556,0.521155555555556},
-{2992228,3884128,3883642,0.262168421052632,0.262168421052632},
-{2992235,3885942,3885950,0.0592243902439024,0.0592243902439024},
-{2992237,3885787,3885899,0.0397542857142857,0.0515333333333333},
-{2992238,3885899,3886015,0.0359,0.062825},
-{2992239,3885942,3885899,0.0416052631578947,0.0416052631578947},
-{2992240,3865168,3864684,0.176755555555556,0.176755555555556},
-{2992241,3886275,3886193,0.0369,0.0436090909090909},
-{2992242,3886193,3885950,0.0926222222222222,0.0961846153846154},
-{2992243,3886015,3886223,0.0609652173913044,0.09348},
-{2992244,3886223,3886275,0.01895,0.02274},
-{2992245,3886193,3886223,0.0595846153846154,0.0249870967741935},
-{2992246,3864827,3864860,0.0549942857142857,0.0469463414634146},
-{2992247,3864860,3864872,0.0472235294117647,0.0411692307692308},
-{2992248,3866294,3865108,1000000,0.5301},
-{2992249,3865108,3865020,1000000,0.023475},
-{2992250,3864860,3865020,0.0746888888888889,1000000},
-{2992251,3866294,3866223,0.124747058823529,0.14138},
-{2992252,3867226,3866294,1000000,0.236005263157895},
-{2992253,3867244,3866327,0.2919,1000000},
-{2992254,3866327,3866305,0.00756428571428571,1000000},
-{2992255,3877792,3877765,1000000,0.057984},
-{2992256,3877713,3877681,0.0513724137931034,1000000},
-{2992257,3877792,3877713,0.0372857142857143,0.0372857142857143},
-{2992258,3889899,3889960,1000000,0.0431625},
-{2992259,3876014,3876178,0.0968842105263158,1000000},
-{2992260,3876178,3876231,0.0218142857142857,1000000},
-{2992261,3893108,3893126,0.0501157894736842,0.0501157894736842},
-{2992262,3876023,3876188,1000000,0.05788125},
-{2992263,3876188,3876245,1000000,0.0236307692307692},
-{2992264,3875305,3875349,1000000,0.0405368421052632},
-{2992265,3874651,3875221,0.310036363636364,0.155018181818182},
-{2992266,3875221,3875305,0.0671,0.0345085714285714},
-{2992267,3875349,3875221,0.07788,1000000},
-{2992268,3875270,3875398,0.153384905660377,1000000},
-{2992269,3875398,3875415,0.0181153846153846,1000000},
-{2992270,3875415,3875508,0.0287166666666667,0.0738428571428571},
-{2992271,3875398,3875508,0.04464375,1000000},
-{2992272,3875415,3875439,0.0301466666666667,1000000},
-{2992273,3875508,3875439,0.0628615384615385,1000000},
-{2992274,3874768,3875290,1000000,0.510059016393443},
-{2992275,3875290,3875305,1000000,0.0174103448275862},
-{2992276,3874170,3874046,0.1382,0.1382},
-{2992277,3874351,3874220,0.0931821428571429,0.08697},
-{2992278,3874220,3874170,0.04005,0.0361741935483871},
-{2992279,3874046,3874220,1000000,0.0834909090909091},
-{2992280,3874170,3874126,0.0361932203389831,0.0338952380952381},
-{2992281,3874046,3874126,0.111675,1000000},
-{2992282,3868864,3868919,0.0318,0.053},
-{2992283,3868919,3868400,0.47826,0.47826},
-{2992284,3868919,3869012,0.133355555555556,0.133355555555556},
-{2992285,3890299,3890327,0.0213677419354839,0.0135183673469388},
-{2992286,3871636,3871819,0.0658153846153846,0.0900631578947368},
-{2992287,3871819,3872056,0.0550764705882353,0.0604064516129032},
-{2992288,3871665,3871636,0.0571621621621622,0.0503571428571429},
-{2992289,3871819,3871665,0.103915384615385,1000000},
-{2992290,3863993,3864275,0.118723076923077,0.149361290322581},
-{2992291,3864275,3864315,0.0138769230769231,0.0200444444444444},
-{2992292,3866380,3866473,0.120434482758621,0.124735714285714},
-{2992293,3866473,3866502,0.202725,0.0600666666666667},
-{2992294,3865908,3866267,0.0635689655172414,0.0709038461538462},
-{2992295,3866267,3866502,0.0338896551724138,0.0378},
-{2992296,3866473,3866334,0.0526714285714286,1000000},
-{2992297,3866334,3866267,0.0357230769230769,1000000},
-{2992298,3890277,3890308,1000000,0.0502173913043478},
-{2992299,3890180,3890308,0.129866666666667,1000000},
-{2992300,3890299,3890408,1000000,0.138728571428571},
-{2992301,3860754,3860818,0.053328,1000000},
-{2992302,3860818,3860865,0.0274545454545455,1000000},
-{2992303,3860758,3860772,0.118994117647059,0.109345945945946},
-{2992304,3860772,3860865,0.076875,1000000},
-{2992305,3860818,3860772,0.0679548387096774,1000000},
-{2992306,3857901,3857868,0.0123642857142857,0.0164857142857143},
-{2992307,3869366,3869382,0.43614,0.43614},
-{2992313,3889669,3890054,0.75396,0.75396},
-{2992314,3869694,3869778,1000000,0.03084},
-{2992315,3869778,3870327,1000000,0.180235714285714},
-{2992316,3869762,3869702,1000000,0.166358823529412},
-{2992317,3869702,3869694,1000000,0.0276529411764706},
-{2992318,3869778,3869702,0.0519923076923077,1000000},
-{2992319,3869685,3869616,0.20631724137931,1000000},
-{2992320,3869616,3869613,0.0224142857142857,1000000},
-{2992321,3869613,3869547,0.0175875,1000000},
-{2992322,3869547,3868439,0.259360975609756,1000000},
-{2992323,3869616,3869547,0.0311111111111111,1000000},
-{2992324,3869608,3869481,1000000,0.04995},
-{2992325,3869481,3868428,1000000,0.395353846153846},
-{2992326,3869693,3869777,0.0278785714285714,1000000},
-{2992327,3869777,3870311,0.127863157894737,1000000},
-{2992328,3871373,3871252,0.0354620689655172,0.0331741935483871},
-{2992329,3871252,3870844,0.115474285714286,0.112266666666667},
-{2992330,3870844,3870176,0.189981818181818,0.184394117647059},
-{2992331,3870176,3869896,0.191630769230769,0.113236363636364},
-{2992332,3867622,3867325,1000000,0.170305263157895},
-{2992333,3867325,3867146,1000000,0.0789789473684211},
-{2992334,3867633,3867245,0.114951219512195,1000000},
-{2992335,3867245,3867093,0.0480473684210526,1000000},
-{2992336,3867644,3867270,1000000,0.112917073170732},
-{2992337,3867270,3867146,1000000,0.03261},
-{2992338,3871252,3870840,1000000,0.47976},
-{2992339,3870840,3870176,0.69906,1000000},
-{2992340,3870844,3870840,0.07386,0.07386},
-{2992341,3865810,3865891,0.0503225806451613,0.0678260869565217},
-{2992342,3865891,3866147,0.342272727272727,0.332205882352941},
-{2992343,3865810,3865746,0.0265111111111111,0.0275307692307692},
-{2992344,3865891,3865746,1000000,0.07107},
-{2992345,3865746,3865176,0.240760714285714,0.249677777777778},
-{2992346,3865176,3864980,0.0675333333333333,0.0688075471698113},
-{2992347,3878450,3878582,0.0593571428571429,1000000},
-{2992348,3878582,3879613,0.324507692307692,0.308678048780488},
-{2992349,3878941,3878483,1000000,0.198634615384615},
-{2992350,3878582,3878483,0.09585,1000000},
-{2992351,3878910,3878429,0.213929411764706,1000000},
-{2992352,3878429,3878280,0.100909090909091,1000000},
-{2992353,3862797,3862633,0.156822222222222,0.156822222222222},
-{2992354,3862329,3862059,0.167466666666667,0.167466666666667},
-{2992355,3862738,3863097,0.202695652173913,0.2331},
-{2992356,3863097,3863036,0.0551111111111111,0.0551111111111111},
-{2992357,3863036,3862840,0.112244444444444,0.112244444444444},
-{2992358,3863036,3863304,0.162066666666667,0.162066666666667},
-{2992359,3862738,3862708,0.0225272727272727,0.0215478260869565},
-{2992360,3862708,3862329,0.21405,0.186130434782609},
-{2992361,3862708,3862818,0.112333333333333,0.112333333333333},
-{2992362,3862329,3861936,0.261884210526316,0.184288888888889},
-{2992363,3861936,3861469,0.353904,0.402163636363636},
-{2992364,3861936,3862033,0.110066666666667,0.110066666666667},
-{2992389,3852367,3850520,1000000,0.711658064516129},
-{2992394,3852306,3852224,0.0253255813953488,0.02178},
-{2992401,3852224,3852076,0.054893023255814,0.047208},
-{2992402,3852224,3851987,1000000,0.183317647058824},
-{2992403,3851987,3851122,0.455136,1000000},
-{2992404,3851987,3852076,1000000,0.05283},
-{2992407,3852076,3851362,0.498136363636364,0.273975},
-{2992415,3855066,3855404,1000000,0.180874285714286},
-{2992416,3855404,3855547,1000000,0.136476923076923},
-{2992417,3855547,3855450,0.048576,0.03795},
-{2992418,3855450,3855134,0.147367741935484,0.157531034482759},
-{2992419,3855404,3855450,1000000,0.09417},
-{2992440,3856676,3857052,1000000,0.18484},
-{2992441,3857052,3857114,1000000,0.0328965517241379},
-{2992442,3858217,3857495,0.240016216216216,0.227707692307692},
-{2992443,3857495,3857402,0.0288954545454545,0.031785},
-{2992444,3859259,3858916,0.109030434782609,0.122326829268293},
-{2992445,3858916,3858787,0.0595571428571429,0.0641384615384615},
-{2992446,3858787,3858788,0.057219512195122,0.057219512195122},
-{2992447,3858916,3858788,0.46926,1000000},
-{2992455,3872877,3873396,0.35144,1000000},
-{2992483,3864432,3864304,0.04183125,0.0304227272727273},
-{2992484,3864304,3863815,0.214758620689655,0.1557},
-{2992487,3864432,3864553,0.139171428571429,0.171917647058824},
-{2992488,3864553,3864642,0.05823,0.05823},
-{2992489,3864304,3864553,0.106425,1000000},
-{2992490,3865017,3864658,0.09105,0.0817591836734694},
-{2992491,3864658,3864432,0.073654054054054,0.0579829787234043},
-{2992492,3864553,3864658,0.131341935483871,1000000},
-{2992511,3859839,3860413,0.269967567567568,0.32221935483871},
-{2992512,3860413,3860443,0.0159692307692308,0.0173},
-{2992513,3860443,3860393,0.0756,0.110492307692308},
-{2992514,3860443,3860583,0.0529538461538462,0.0573666666666667},
-{2992515,3860583,3861321,0.245370731707317,0.264742105263158},
-{2992516,3860393,3860459,1000000,0.0474},
-{2992517,3860459,3860583,1000000,0.056304},
-{2992523,3860524,3860327,0.0455411764705882,0.1106},
-{2992524,3860396,3859896,0.186286363636364,0.372572727272727},
-{2992528,3872340,3872588,0.0932888888888889,0.0932888888888889},
-{2992529,3872588,3872810,0.0795333333333333,0.0795333333333333},
-{2992530,3853972,3854069,0.07475,0.0381702127659574},
-{2992531,3854069,3854177,0.0670645161290323,0.0495},
-{2992532,3854069,3854005,0.0278842105263158,1000000},
-{2992533,3873246,3873371,0.621244444444444,0.621244444444444},
-{2992534,3858926,3858706,1000000,0.16608},
-{2992535,3858706,3858675,0.0118533333333333,0.0161636363636364},
-{2992536,3859178,3859115,0.0478894736842105,1000000},
-{2992537,3859035,3858926,1000000,0.0758210526315789},
-{2992538,3858994,3858929,0.02005,0.0515571428571429},
-{2992539,3858929,3857631,0.3732,0.41052},
-{2992540,3859035,3858929,0.0805578947368421,1000000},
-{2992554,3871642,3871547,0.0316125,0.0316125},
-{2992555,3871547,3870915,0.212755555555556,1000000},
-{2992556,3871482,3871524,0.0464042553191489,1000000},
-{2992557,3871524,3871547,0.0381446808510638,1000000},
-{2992558,3871648,3871524,1000000,0.0795473684210526},
-{2992559,3871648,3871711,0.0368470588235294,0.0284727272727273},
-{2992560,3871711,3871880,0.075,0.0652173913043478},
-{2992561,3871642,3871711,0.0334636363636364,0.0334636363636364},
-{2992562,3871351,3871327,0.0259538461538462,0.0241},
-{2992563,3871051,3871363,0.157566666666667,0.113448},
-{2992564,3871363,3871485,0.0485181818181818,1000000},
-{2992565,3871482,3871363,1000000,0.250186046511628},
-{2992566,3903527,3903617,0.0604928571428571,0.05293125},
-{2992567,3903617,3903646,0.0118864864864865,0.0151655172413793},
-{2992568,3903646,3903821,0.0832941176470588,0.236},
-{2992569,3903821,3904043,0.0871783783783784,0.0896},
-{2992571,3871256,3871669,1000000,1000000},
-{2992572,3871632,3871669,0.0269869565217391,1000000},
-{2992573,3900312,3900435,0.108991304347826,0.0677513513513514},
-{2992574,3900435,3900532,0.114388235294118,0.077784},
-{2992575,3899987,3900427,0.159466666666667,0.14352},
-{2992576,3900427,3900532,0.0448628571428571,0.0424378378378378},
-{2992577,3857984,3857281,0.181772727272727,0.190428571428571},
-{2992578,3857281,3857106,0.0400227272727273,0.0391333333333333},
-{2992579,3857090,3857281,0.159,0.0908571428571429},
-{2992580,3859399,3859592,0.378333333333333,0.378333333333333},
-{2992581,3894740,3894776,0.0389379310344828,0.045168},
-{2992582,3894776,3894782,0.0129375,0.0138},
-{2992583,3894669,3894776,0.0436588235294118,1000000},
-{2992584,3894291,3894332,0.0617653846153846,0.0573535714285714},
-{2992585,3894473,3894291,0.102016216216216,1000000},
-{2992586,3917419,3917496,0.0336444444444444,0.030793220338983},
-{2992587,3917419,3917368,0.0245842105263158,0.0359307692307692},
-{2992588,3917368,3917162,0.351476923076923,0.34269},
-{2992589,3917496,3917368,0.0430340425531915,1000000},
-{2992590,3917394,3917419,0.0168339622641509,0.0168339622641509},
-{2992591,3917368,3917394,0.0450181818181818,1000000},
-{2992592,3917183,3917243,0.032948275862069,0.0424666666666667},
-{2992593,3917243,3917394,0.403137931034483,0.403137931034483},
-{2992594,3917299,3917243,0.0799928571428571,1000000},
-{2992595,3872178,3872872,0.5228,0.5228},
-{2992596,3872872,3872876,0.0225111111111111,0.0225111111111111},
-{2992597,3872502,3872876,1000000,1000000},
-{2992598,3870893,3870885,0.0249714285714286,0.0228},
-{2992599,3870885,3870527,1000000,0.25588},
-{2992600,3870527,3870511,0.00937714285714286,0.00965294117647059},
-{2992601,3870527,3870885,1000000,0.23326875},
-{2992603,3861680,3861542,1000000,1000000},
-{2992604,3861542,3861244,1000000,1000000},
-{2992612,3849715,3849345,0.230866666666667,0.230866666666667},
-{2992613,3849345,3849205,1000000,1000000},
-{2992614,3849809,3849628,0.113,0.113},
-{2992616,3849479,3849025,0.259869230769231,0.241307142857143},
-{2992619,3857938,3858895,0.401875862068966,0.38848},
-{2992620,3859085,3858889,0.10686,0.10686},
-{2992621,3858889,3857751,1000000,0.637254545454545},
-{2992622,3858895,3858889,0.0449333333333333,0.0449333333333333},
-{2992623,3856463,3856454,0.0302285714285714,0.03174},
-{2992624,3856454,3856013,0.401424,0.401424},
-{2992625,3861638,3861584,0.02442,0.0271333333333333},
-{2992627,3863458,3863353,0.10928,0.16392},
-{2992628,3863353,3863487,0.0688666666666667,0.0688666666666667},
-{2992629,3863487,3863803,0.313377777777778,0.313377777777778},
-{2992630,3863458,3863487,0.113466666666667,0.113466666666667},
-{2992631,3852134,3852632,0.42009,0.336072},
-{2992632,3852632,3852675,0.04935,0.0448636363636364},
-{2992633,3863473,3863458,0.0292384615384615,0.0543},
-{2992634,3852855,3852837,0.0100971428571429,0.0114},
-{2992635,3852632,3852837,0.104507142857143,0.0943935483870968},
-{2992636,3854194,3854297,0.09681,0.0744692307692308},
-{2992637,3854297,3853762,0.442452631578947,0.431107692307692},
-{2992639,3862363,3862313,0.0728666666666667,0.0728666666666667},
-{2992640,3862313,3862300,0.0193555555555556,0.0193555555555556},
-{2992641,3862934,3862611,0.205581818181818,0.205581818181818},
-{2992642,3862611,3862363,0.204471428571429,0.204471428571429},
-{2992643,3862313,3862611,0.127822222222222,0.127822222222222},
-{2992644,3862730,3862601,0.68505,0.68505},
-{2992645,3862601,3862491,0.146,0.146},
-{2992646,3861614,3862601,0.445022222222222,0.445022222222222},
-{2992648,3865914,3864589,0.328296,0.321858823529412},
-{2992649,3864589,3864538,0.0194933333333333,0.0194933333333333},
-{2992653,3856253,3856021,0.0491739130434783,0.0526046511627907},
-{2992654,3856021,3854789,0.3518875,0.359374468085106},
-{2992655,3856530,3856261,0.163835294117647,1000000},
-{2992656,3856261,3856253,0.0836625,1000000},
-{2992657,3856021,3856261,0.192685714285714,0.192685714285714},
-{2992658,3859825,3859335,0.312866666666667,0.191986363636364},
-{2992659,3859335,3859344,0.110929411764706,1000000},
-{2992660,3859110,3859335,0.10006875,0.168536842105263},
-{2992661,3861163,3861036,0.0711702127659574,0.0743333333333333},
-{2992662,3861584,3861262,0.122755102040816,0.130760869565217},
-{2992663,3861262,3861163,0.0293125,0.0305869565217391},
-{2992664,3871363,3871342,1000000,0.0615724137931035},
-{2992678,3861163,3861584,0.79338,1000000},
-{2992679,3871621,3871632,0.0194347826086957,1000000},
-{2992685,3871700,3871408,1000000,0.147776470588235},
-{2992686,3871408,3871334,1000000,0.0265153846153846},
-{2992687,3871276,3871380,0.182925,1000000},
-{2992688,3871380,3871615,0.4359,0.36325},
-{2992689,3871408,3871380,1000000,0.19172},
-{2992690,3871334,3871276,1000000,0.0202615384615385},
-{2992691,3871276,3871060,1000000,0.0798923076923077},
-{2992692,3871700,3871729,0.05916,1000000},
-{2992693,3871729,3871939,0.187706666666667,1000000},
-{2992694,3871846,3871946,1000000,0.0567866666666667},
-{2992724,3865000,3864901,0.127371428571429,1000000},
-{2992741,3872707,3872628,0.05456,0.0355826086956522},
-{2992802,3907030,3908171,0.355240909090909,0.355240909090909},
-{2992803,3909507,3908411,0.316247058823529,0.288010714285714},
-{2992804,3908411,3908279,0.0663724137931034,0.0377411764705882},
-{2992805,3908188,3908411,1000000,0.07063125},
-{2992808,3890400,3890404,0.180031578947368,0.126688888888889},
-{2992809,3890404,3890408,0.1449,0.06624},
-{2992844,3895130,3895072,0.039696,0.0522315789473684},
-{2992845,3895130,3895162,0.0317647058823529,1000000},
-{2992846,3895072,3894553,0.253910526315789,0.275674285714286},
-{2992847,3894553,3894167,0.219,0.2263},
-{2992848,3919647,3919879,0.156181818181818,0.122714285714286},
-{2992849,3919459,3919476,1000000,0.106392},
-{2992850,3919228,3919298,0.0974470588235294,0.0502},
-{2992851,3919647,3919626,1000000,0.0327692307692308},
-{2992852,3858326,3858315,0.0147559322033898,0.0155464285714286},
-{2992853,3857983,3857959,0.0137225806451613,0.0146689655172414},
-{2992859,3919459,3919326,1000000,0.0703862068965517},
-{2992860,3919326,3919298,0.0133542857142857,0.018696},
-{2992864,3919232,3919267,0.0286125,0.01308},
-{2992865,3919171,3919228,0.051912,0.0309},
-{2992866,3919232,3919171,0.109841379310345,1000000},
-{2992867,3919298,3919376,0.0542285714285714,0.0392689655172414},
-{2992868,3919376,3919476,0.0371612903225806,0.0411428571428571},
-{2992869,3919228,3919376,0.0655161290322581,1000000},
-{2992870,3873001,3873689,1000000,0.169632558139535},
-{2992871,3873689,3873781,1000000,0.0283941176470588},
-{2992872,3873923,3873810,0.208,1000000},
-{2992873,3873810,3873781,0.05526,1000000},
-{2992874,3873689,3873810,1000000,0.0580888888888889},
-{2992875,3872987,3873646,0.2197875,1000000},
-{2992876,3873646,3873763,0.06099,1000000},
-{2992877,3873763,3873727,0.0511125,1000000},
-{2992878,3873727,3873445,0.295479069767442,1000000},
-{2992879,3873646,3873727,0.063375,1000000},
-{2992884,3873852,3873805,1000000,0.117733333333333},
-{2992885,3873805,3873506,1000000,0.350245714285714},
-{2992886,3886427,3886332,1000000,1000000},
-{2992887,3886332,3886162,1000000,1000000},
-{2992888,3886427,3886523,0.0977076923076923,0.158775},
-{2992889,3886523,3886629,0.06924,0.0712764705882353},
-{2992896,3905124,3905863,0.235236,0.230623529411765},
-{2992897,3905863,3905991,0.043375,0.0424897959183674},
-{2992898,3903936,3905715,0.438346666666667,0.419693617021277},
-{2992899,3905715,3905991,0.108844444444444,0.0864352941176471},
-{2992900,3905863,3905715,0.1332,1000000},
-{2992901,3905991,3906172,0.10416,0.16275},
-{2992902,3905991,3906171,0.0909428571428571,0.0909428571428571},
-{2992903,3906172,3906171,0.123728571428571,0.123728571428571},
-{2992911,3899695,3899718,0.0691764705882353,0.0712727272727273},
-{2992912,3899718,3899992,0.244028571428571,0.277005405405405},
-{2992913,3899623,3899718,0.0552,0.0966},
-{2992914,3878718,3878667,0.033075,0.0378},
-{2992915,3878722,3878718,0.005952,0.00676363636363636},
-{2992916,3878696,3878815,0.090768,1000000},
-{2992921,3908279,3908215,0.0471,0.0334933333333333},
-{2992922,3908215,3907243,0.539692307692308,0.467733333333333},
-{2992923,3908171,3908215,0.0736125,1000000},
-{2992924,3879996,3880029,0.0221806451612903,1000000},
-{2992925,3880029,3880149,0.116269565217391,1000000},
-{2992926,3880055,3880084,1000000,0.0160390243902439},
-{2992927,3880084,3880206,1000000,0.0850058823529412},
-{2992928,3880029,3880084,1000000,0.0643875},
-{2992937,3880678,3880914,0.353060869565217,0.2537625},
-{2992938,3880914,3881082,0.105533333333333,0.0904571428571428},
-{2992939,3880902,3880943,0.02415,0.0173384615384615},
-{2992940,3880943,3881082,0.0713142857142857,0.0713142857142857},
-{2992941,3880914,3880943,1000000,0.0786},
-{2992970,3887167,3887109,0.02,0.02},
-{2992971,3887109,3885331,0.6340125,0.67628},
-{2992973,3885331,3886209,0.5444,0.441405405405405},
-{2992974,3886067,3886209,0.215577777777778,0.253069565217391},
-{2992975,3881329,3881491,0.078,0.085609756097561},
-{2992976,3881491,3881589,0.0368769230769231,0.0661241379310345},
-{2992977,3881633,3881758,0.055668,1000000},
-{2992982,3880413,3880542,0.0345052631578947,1000000},
-{2992985,3881122,3880641,0.307333333333333,0.307333333333333},
-{2992986,3881014,3881122,0.0915555555555556,0.0915555555555556},
-{2992987,3881758,3881936,0.0854947368421053,1000000},
-{2992988,3881936,3881949,0.00736271186440678,0.00775714285714286},
-{2992989,3880680,3880601,0.0211924528301887,1000000},
-{2992990,3850939,3850774,0.0562645161290323,0.02907},
-{2992991,3850939,3850931,0.06915,0.113894117647059},
-{2992992,3850774,3850931,0.0817166666666667,1000000},
-{2992993,3851512,3851038,0.117957446808511,0.126},
-{2992994,3851038,3850939,0.0330473684210526,0.0205868852459016},
-{2992995,3850925,3851038,0.101592857142857,1000000},
-{2992996,3854873,3854805,0.018432,0.017388679245283},
-{2992997,3854652,3854764,0.0529885714285714,1000000},
-{2992998,3854764,3854873,0.0607777777777778,1000000},
-{2992999,3854805,3854745,0.015204,0.0143433962264151},
-{2993000,3854764,3854745,0.0681,1000000},
-{2993009,3854648,3854643,0.0392470588235294,1000000},
-{2993010,3854643,3854652,0.0360473684210526,1000000},
-{2993035,3849037,3848853,0.0509333333333333,0.0528923076923077},
-{2993036,3848853,3848419,0.125556,0.1307875},
-{2993037,3848851,3848853,0.254444444444444,1000000},
-{2993038,3849521,3849861,0.401752941176471,0.487842857142857},
-{2993039,3848910,3849101,0.306666666666667,0.306666666666667},
-{2993040,3849861,3850182,0.68193,0.568275},
-{2993043,3849147,3849101,0.0286,0.0286},
-{2993044,3874067,3874109,0.0186882352941176,0.0244384615384615},
-{2993045,3874254,3874109,0.0731478260869565,1000000},
-{2993046,3874639,3874612,1000000,0.0149853658536585},
-{2993047,3874556,3874542,0.0124875,1000000},
-{2993048,3874639,3874556,0.0379894736842105,1000000},
-{2993049,3874786,3874920,0.05236,0.0561},
-{2993050,3874920,3874999,0.0477818181818182,0.0553263157894737},
-{2993051,3875016,3874999,0.0610263157894737,1000000},
-{2993052,3874920,3875016,1000000,0.08666},
-{2993053,3875076,3875057,1000000,0.041628},
-{2993054,3875057,3874936,1000000,0.0952981132075472},
-{2993055,3875076,3875153,0.04572,0.0435428571428571},
-{2993056,3875153,3875808,1.50835714285714,1.45634482758621},
-{2993057,3875057,3875153,0.0827785714285714,1000000},
-{2993058,3874999,3874987,0.0277636363636364,1000000},
-{2993059,3874987,3874888,0.111294117647059,1000000},
-{2993060,3874920,3874987,0.0554689655172414,1000000},
-{2993061,3875087,3875076,1000000,0.0351529411764706},
-{2993062,3875153,3875087,0.146657142857143,1000000},
-{2993086,3848473,3848765,0.173844444444444,0.173844444444444},
-{2993087,3849889,3849920,0.0726176470588235,0.0685833333333333},
-{2993088,3849889,3850348,0.228688888888889,0.228688888888889},
-{2993089,3851556,3851716,0.0447375,0.0447375},
-{2993090,3852132,3852373,0.0989727272727273,0.101274418604651},
-{2993091,3851716,3851988,0.07845,1000000},
-{2993092,3852104,3852103,1000000,0.0158785714285714},
-{2993093,3852103,3852115,1000000,0.072},
-{2993094,3852115,3852132,1000000,0.0203142857142857},
-{2993095,3852103,3852137,0.0104816326530612,1000000},
-{2993096,3852137,3852480,0.0720979591836735,1000000},
-{2993097,3852115,3852137,0.076975,1000000},
-{2993098,3852046,3852104,1000000,0.0153230769230769},
-{2993099,3851988,3852045,0.0343333333333333,1000000},
-{2993100,3851988,3852041,0.0110875,1000000},
-{2993101,3852046,3852041,0.0186222222222222,1000000},
-{2993102,3852041,3852045,0.0352222222222222,1000000},
-{2993108,3851716,3851995,1000000,0.0744418604651163},
-{2993109,3851995,3852046,1000000,0.01329},
-{2993110,3852480,3852140,0.0644423076923077,1000000},
-{2993111,3852140,3852104,0.010776,1000000},
-{2993112,3852045,3852132,0.05605,1000000},
-{2993139,3852753,3853235,0.179105882352941,0.160252631578947},
-{2993140,3853986,3853746,0.1203375,0.142622222222222},
-{2993141,3853746,3852373,1.3808,1.15066666666667},
-{2993145,3853514,3853746,1000000,1000000},
-{2993147,3852753,3853157,1000000,1000000},
-{2993148,3853157,3853514,1000000,1000000},
-{2993149,3853473,3853514,1000000,1000000},
-{2993150,3853157,3853473,1000000,1000000},
-{2993153,3858527,3858478,0.0533666666666667,0.0565058823529412},
-{2993154,3858478,3858107,0.261528,0.242155555555556},
-{2993155,3856976,3856893,0.0612315789473684,0.0612315789473684},
-{2993156,3856893,3856502,0.2747,0.253569230769231},
-{2993157,3856434,3856352,0.0349333333333333,0.0349333333333333},
-{2993158,3856352,3855876,1000000,1000000},
-{2993159,3857416,3857355,0.0486,0.0486},
-{2993160,3857355,3856840,0.461914285714286,0.461914285714286},
-{2993161,3857816,3857748,0.07136,0.07136},
-{2993162,3857748,3857269,0.264225,0.253656},
-{2993163,3857678,3858029,0.264733333333333,0.264733333333333},
-{2993164,3858029,3858101,0.0594,0.0594},
-{2993165,3856352,3856893,0.338616,0.338616},
-{2993166,3856893,3857355,0.3733,0.33597},
-{2993167,3857355,3857748,0.311368421052632,0.2958},
-{2993168,3857748,3858029,0.28232,0.28232},
-{2993169,3858029,3858478,1000000,1000000},
-{2993170,3856699,3856742,0.0216,0.0348},
-{2993171,3856742,3856768,0.113727272727273,0.139},
-{2993172,3856808,3856742,0.08628,0.0958666666666667},
-{2993194,3857868,3857777,0.0395612903225806,0.0681333333333333},
-{2993195,3857764,3857847,0.142872,1000000},
-{2993196,3857847,3857868,0.0340736842105263,1000000},
-{2993197,3857777,3857847,1000000,0.04708},
-{2993198,3857764,3857792,1000000,0.020025},
-{2993199,3857792,3857901,1000000,0.120688888888889},
-{2993200,3858230,3858117,0.03912,1000000},
-{2993201,3857792,3858077,1000000,0.1371},
-{2993202,3857868,3857896,0.0208090909090909,1000000},
-{2993203,3857896,3857952,0.041112,1000000},
-{2993204,3858117,3858077,0.01562,1000000},
-{2993205,3858077,3857901,0.10269,1000000},
-{2993206,3857896,3858077,1000000,0.0742181818181818},
-{2993228,3851959,3852484,0.0829217391304348,0.0880246153846154},
-{2993229,3853163,3852800,0.156345,0.156345},
-{2993230,3853094,3853163,0.0742333333333333,1000000},
-{2993231,3853273,3853239,0.0414352941176471,0.0335428571428571},
-{2993232,3853239,3853163,0.05898,0.0561714285714286},
-{2993233,3853094,3853239,0.0635142857142857,1000000},
-{2993234,3853239,3853290,0.0284307692307692,1000000},
-{2993235,3853290,3853410,0.0383347826086957,1000000},
-{2993236,3853163,3853290,0.048225,1000000},
-{2993237,3853223,3853273,1000000,0.0168117647058824},
-{2993238,3853469,3853324,0.0995555555555555,0.0672},
-{2993239,3853324,3853273,0.0566470588235294,0.0356666666666667},
-{2993240,3853223,3853324,1000000,0.052095652173913},
-{2993241,3853273,3853367,1000000,0.0331875},
-{2993242,3853367,3853410,1000000,0.030192},
-{2993243,3853324,3853367,1000000,0.0594857142857143},
-{2993246,3849782,3849689,0.0405846153846154,0.0416526315789474},
-{2993247,3849689,3849827,1000000,1000000},
-{2993248,3849827,3849860,0.0282230769230769,0.0333545454545455},
-{2993249,3849782,3849827,0.0548888888888889,0.0741},
-{2993250,3870038,3869510,1000000,0.136268571428571},
-{2993251,3869510,3869449,0.0157111111111111,0.01414},
-{2993252,3871913,3871787,0.0552947368421053,0.0618},
-{2993253,3871787,3871456,1000000,0.19832},
-{2993254,3870979,3870936,0.134431578947368,0.12771},
-{2993255,3869510,3870057,1000000,0.14720625},
-{2993256,3870057,3870936,1000000,0.186259090909091},
-{2993259,3858327,3858417,0.0491714285714286,1000000},
-{2993260,3858450,3858417,0.0419785714285714,0.0452076923076923},
-{2993261,3858327,3858450,1000000,0.06452},
-{2993262,3858417,3858406,0.0126526315789474,0.0136075471698113},
-{2993263,3858327,3858406,0.0549789473684211,1000000},
-{2993301,3895757,3895452,0.13411914893617,0.131325},
-{2993302,3895452,3895407,0.018930612244898,0.0206133333333333},
-{2993305,3896235,3895920,0.222432,0.213876923076923},
-{2993307,3895452,3895920,0.342288,1000000},
-{2993316,3888327,3887962,0.19795,1000000},
-{2993334,3895014,3895085,0.033,0.0337674418604651},
-{2993335,3894798,3894813,0.0121111111111111,0.00883783783783784},
-{2993336,3894813,3895014,1000000,0.1303},
-{2993337,3894813,3895014,0.118672727272727,1000000},
-{2993338,3900789,3901140,1000000,0.0880978723404255},
-{2993339,3901687,3901991,1000000,0.0711652173913044},
-{2993423,3888736,3888806,0.0384,1000000},
-{2993424,3888909,3888949,1000000,0.0187636363636364},
-{2993435,3915102,3915173,0.140442857142857,0.0756230769230769},
-{2993436,3915173,3915357,0.0913846153846154,0.0678857142857143},
-{2993437,3915357,3915876,0.150643902439024,0.137253333333333},
-{2993438,3915102,3915357,0.1161375,1000000},
-{2993455,3916905,3916657,0.284086956521739,1000000},
-{2993465,3892782,3893021,0.102175,0.272466666666667},
-{2993466,3893021,3893815,0.402985714285714,0.451344},
-{2993467,3892960,3893021,0.1194,1000000},
-{2993468,3892782,3892929,0.074544,0.07765},
-{2993469,3892929,3893546,0.377382352941176,0.40096875},
-{2993470,3893021,3892929,0.11106,1000000},
-{2993480,3917340,3918265,1000000,1000000},
-{2993481,3917117,3917409,0.1494,0.118641176470588},
-{2993482,3917409,3917467,0.024216,0.0195290322580645},
-{2993514,3916594,3916574,0.00617333333333333,0.00661428571428571},
-{2993515,3916574,3916078,0.172330434782609,1000000},
-{2993516,3916078,3916118,0.0364571428571429,0.0546857142857143},
-{2993517,3916118,3916398,0.202776923076923,0.202776923076923},
-{2993518,3916574,3916118,1000000,0.188057142857143},
-{2993519,3915273,3915313,0.0459529411764706,0.048825},
-{2993520,3915313,3915616,0.199711111111111,0.199711111111111},
-{2993521,3914504,3914562,0.0276545454545455,0.0325928571428571},
-{2993522,3914562,3914787,0.0930307692307692,0.103662857142857},
-{2993523,3915313,3914562,1000000,0.407127272727273},
-{2993524,3914562,3914115,1000000,0.2672},
-{2993525,3914048,3914115,0.0444571428571429,0.0444571428571429},
-{2993526,3914115,3914381,0.3711,0.3711},
-{2993527,3900776,3901165,0.0883411764705882,1000000},
-{2993528,3913425,3913491,0.0347181818181818,0.0363714285714286},
-{2993529,3913491,3913795,0.153275,0.167209090909091},
-{2993530,3914115,3913802,1000000,0.0945627906976744},
-{2993531,3912673,3912749,1000000,0.00978},
-{2993532,3913491,3913015,1000000,0.160969230769231},
-{2993533,3912954,3913015,0.0350842105263158,0.026664},
-{2993540,3912621,3912665,0.00819428571428571,1000000},
-{2993541,3912665,3913887,0.182005714285714,1000000},
-{2993548,3889669,3889770,0.05733,0.04095},
-{2993577,3900925,3900957,0.0104780487804878,0.00914042553191489},
-{2993578,3900957,3901217,1000000,0.0967531914893617},
-{2993579,3901628,3901280,0.24475,0.189483870967742},
-{2993580,3901280,3901217,0.04437,0.0268909090909091},
-{2993581,3900957,3901280,0.100591304347826,1000000},
-{2993582,3901671,3901722,0.0465529411764706,0.0465529411764706},
-{2993583,3901722,3902081,1000000,1000000},
-{2993584,3901280,3901722,0.125649056603774,1000000},
-{2993585,3902542,3902198,0.199915384615385,0.157509090909091},
-{2993586,3902198,3902140,0.06508,0.0443727272727273},
-{2993587,3901722,3902198,0.129047058823529,1000000},
-{2993588,3904389,3904028,1000000,0.152633333333333},
-{2993589,3904469,3904146,0.2418,1000000},
-{2993590,3904028,3904146,0.0496344827586207,1000000},
-{2993591,3905110,3904720,0.229254545454545,0.201744},
-{2993592,3904720,3904638,0.0541,0.0374538461538462},
-{2993593,3905663,3905357,0.205172727272727,0.205172727272727},
-{2993594,3905825,3905540,1000000,1000000},
-{2993595,3905540,3905793,0.072252,1000000},
-{2993597,3853071,3853437,0.313333333333333,0.313333333333333},
-{2993598,3853437,3853882,0.618923076923077,0.618923076923077},
-{2993599,3852755,3853412,0.26448,0.26448},
-{2993600,3853412,3854202,0.387646153846154,0.359957142857143},
-{2993601,3853437,3853412,0.091776,0.0740129032258064},
-{2993602,3903336,3904028,0.3577,1000000},
-{2993603,3903263,3903336,0.0514,0.0402260869565217},
-{2993604,3902140,3902634,1000000,0.129952941176471},
-{2993605,3902634,3903263,1000000,0.175311111111111},
-{2993606,3902198,3902686,0.127557692307692,1000000},
-{2993607,3902686,3903336,0.176844444444444,1000000},
-{2993608,3902634,3902686,0.0449368421052632,0.0656769230769231},
-{2993609,3903336,3903451,0.213541935483871,0.275825},
-{2993610,3903139,3903451,0.168444444444444,0.168444444444444},
-{2993611,3854371,3854107,1000000,1000000},
-{2993612,3854107,3853628,0.228866666666667,0.228866666666667},
-{2993613,3905357,3905475,0.035484,1000000},
-{2993614,3905475,3905540,0.0187882352941177,1000000},
-{2993615,3905414,3905475,0.0291642857142857,0.0371181818181818},
-{2993616,3854827,3854730,0.3192,0.3192},
-{2993617,3850093,3850172,0.0719727272727273,0.05655},
-{2993618,3850193,3850172,0.00773571428571429,0.0103142857142857},
-{2993619,3850193,3850254,0.0390285714285714,0.0292714285714286},
-{2993620,3850257,3850272,0.02744,0.0294},
-{2993621,3853251,3853228,0.0176068965517241,0.0196384615384615},
-{2993622,3853228,3852914,0.171490909090909,1000000},
-{2993623,3852914,3852468,0.299571428571429,1000000},
-{2993624,3852456,3852869,0.226825,1000000},
-{2993625,3852869,3853228,0.189641379310345,1000000},
-{2993626,3852914,3852869,0.0203485714285714,0.0203485714285714},
-{2993627,3864980,3864968,0.00591923076923077,0.00603529411764706},
-{2993628,3864968,3864824,0.0807428571428571,0.082425},
-{2993629,3865255,3865463,1000000,0.250155555555556},
-{2993630,3865463,3865908,0.103624137931034,0.122657142857143},
-{2993631,3861213,3861312,0.0160971428571429,0.0165705882352941},
-{2993632,3862360,3862338,0.00608571428571429,0.00655384615384615},
-{2993633,3862338,3862276,1000000,0.0246235294117647},
-{2993634,3862263,3862338,1000000,0.01536},
-{2993635,3862276,3862263,0.04032,0.0448},
-{2993636,3862077,3862263,1000000,0.0485357142857143},
-{2993647,3887287,3886988,0.1349625,0.208974193548387},
-{2993648,3886988,3886843,1000000,0.0776153846153846},
-{2993649,3886671,3886934,0.140076923076923,0.117483870967742},
-{2993650,3886934,3887702,0.254715789473684,0.24198},
-{2993654,3886988,3886836,0.100755,1000000},
-{2993655,3886836,3886934,0.124354838709677,1000000},
-{2993656,3886843,3886836,0.0814714285714286,1000000},
-{2993657,3887880,3887212,1000000,0.635652631578947},
-{2993658,3887212,3887184,0.0199862068965517,0.0186967741935484},
-{2993659,3887880,3887948,0.0218275862068966,0.0234444444444444},
-{2993660,3887948,3888263,0.112954285714286,0.208073684210526},
-{2993661,3887212,3887948,1000000,0.432878571428571},
-{2993704,3895072,3895162,0.0627,1000000},
-{2993705,3893477,3893562,0.10665,0.1422},
-{2993706,3893562,3893836,0.275685714285714,0.257306666666667},
-{2993707,3893477,3893687,0.104090322580645,0.169831578947368},
-{2993708,3893687,3895900,0.598707692307692,0.610447058823529},
-{2993709,3893562,3893687,0.134504347826087,0.162821052631579},
-{2993716,3867362,3866738,0.558755555555556,0.50288},
-{2993717,3866738,3866493,0.23628,0.23628},
-{2993718,3874390,3874415,1000000,0.0277071428571429},
-{2993719,3874415,3874650,1000000,0.187903448275862},
-{2993720,3874415,3874650,0.416777777777778,0.416777777777778},
-{2993722,3906852,3906880,0.02166,0.0240666666666667},
-{2993723,3906876,3907692,0.217457142857143,0.22833},
-{2993724,3906852,3906789,1000000,0.067425},
-{2993725,3906852,3906734,0.06909,1000000},
-{2993726,3906596,3906625,0.01752,0.0181241379310345},
-{2993727,3906734,3906596,0.07428,1000000},
-{2993728,3906625,3906648,0.0127783783783784,0.01576},
-{2993729,3906648,3907333,0.31728,0.453257142857143},
-{2993730,3906789,3906876,0.0240830769230769,0.02609},
-{2993731,3906648,3906789,0.0555384615384615,1000000},
-{2993741,3874621,3874556,0.0398816326530612,1000000},
-{2993742,3874556,3874481,0.04122,1000000},
-{2993743,3874481,3874254,0.0890689655172414,1000000},
-{2993744,3874621,3874481,0.0634545454545455,1000000},
-{2993745,3873998,3873887,0.0392742857142857,0.06873},
-{2993746,3873998,3873972,1000000,0.0367674418604651},
-{2993747,3873887,3873972,1000000,0.06804375},
-{2993760,3874067,3874037,0.0354,1000000},
-{2993761,3874037,3874058,0.224431034482759,1000000},
-{2993764,3874109,3874235,0.0429315789473684,1000000},
-{2993765,3874235,3874475,0.067365,1000000},
-{2993766,3874936,3874686,1000000,0.136442307692308},
-{2993767,3874686,3874639,1000000,0.0416454545454545},
-{2993784,3901222,3901318,1000000,0.192235714285714},
-{2993785,3901318,3901334,1000000,0.043128},
-{2993799,3901250,3901169,0.0255090909090909,0.0290275862068965},
-{2993800,3901169,3901121,1000000,0.074235},
-{2993801,3901169,3901225,0.0536653846153846,1000000},
-{2993811,3901005,3901030,0.0402818181818182,0.0402818181818182},
-{2993812,3901250,3901271,1000000,0.119535483870968},
-{2993813,3901225,3901271,0.0148947368421053,1000000},
-{2993819,3901271,3901278,0.0107275862068965,0.0141409090909091},
-{2993820,3901278,3901283,0.00597931034482759,0.00770666666666667},
-{2993836,3901516,3901584,0.070110447761194,0.070110447761194},
-{2993837,3902213,3902445,0.266953846153846,0.2169},
-{2993838,3901329,3901921,0.4528,0.3396},
-{2993839,3901921,3901981,1000000,0.0400588235294118},
-{2993840,3901921,3902213,0.19498064516129,1000000},
-{2993847,3901584,3901814,0.224408955223881,1000000},
-{2993848,3901814,3901921,0.0693545454545455,1000000},
-{2993849,3901916,3901584,0.2464,1000000},
-{2993850,3902213,3901981,0.198203225806452,1000000},
-{2993851,3901981,3901916,0.0480184615384615,1000000},
-{2993855,3903510,3903389,0.0626933333333333,0.0641181818181818},
-{2993856,3903389,3903234,0.0773581395348837,0.0792},
-{2993857,3903278,3903533,0.22743,0.22743},
-{2993858,3903533,3904127,0.4217,0.330026086956522},
-{2993859,3903389,3903533,0.170242105263158,0.154028571428571},
-{2993860,3867462,3867570,0.0760090909090909,0.0760090909090909},
-{2993861,3867570,3867810,0.291652173913043,0.291652173913043},
-{2993862,3867918,3867581,0.1997,0.1997},
-{2993863,3867581,3867462,0.0868,0.0868},
-{2993864,3867570,3867581,0.0349333333333333,0.0349333333333333},
-{2993865,3903976,3903950,0.0408214285714286,0.047625},
-{2993866,3903950,3903709,0.123135483870968,0.12724},
-{2993928,3880571,3880665,0.08245,0.0706714285714286},
-{2993929,3880665,3880751,0.0678642857142857,0.0575818181818182},
-{2993930,3880665,3880162,0.420533333333333,0.420533333333333},
-{2993934,3898330,3898303,0.0169384615384615,0.0231789473684211},
-{2993935,3898303,3898190,0.07575,0.101},
-{2993936,3898413,3898494,0.0364528301886792,1000000},
-{2993937,3898303,3898494,0.0887739130434783,1000000},
-{2993939,3898458,3898539,1000000,0.0565666666666667},
-{2993950,3905676,3905267,0.207866666666667,0.207866666666667},
-{2993951,3904463,3904373,0.470977777777778,0.470977777777778},
-{2993952,3904373,3904468,0.093,0.093},
-{2993953,3892725,3892335,0.134128571428571,1000000},
-{2993956,3905709,3906009,0.21725,0.21725},
-{2993957,3905539,3905798,0.103777777777778,0.103777777777778},
-{2993958,3905798,3906355,0.33009,0.33009},
-{2993963,3896556,3896666,0.11174693877551,0.114075},
-{2993964,3896666,3896682,0.01098,0.0114375},
-{2993968,3896238,3896461,1000000,1000000},
-{2993969,3896461,3896666,1000000,1000000},
-{2993970,3889601,3889989,0.343909090909091,1000000},
-{2993971,3889148,3889344,0.168917647058824,0.130527272727273},
-{2993972,3889217,3889344,1000000,0.0333136363636364},
-{2993973,3889344,3889601,1000000,0.0676090909090909},
-{2993974,3890974,3891528,0.7206,0.526592307692308},
-{2993975,3890287,3890974,0.23412,1000000},
-{2993976,3888120,3888353,0.141,1000000},
-{2993977,3887088,3887261,0.0429804878048781,1000000},
-{2993978,3888509,3889266,0.173059090909091,1000000},
-{2993979,3885835,3886111,0.0628883720930233,1000000},
-{2993980,3886467,3886721,0.226915384615385,0.453830769230769},
-{2993981,3886111,3886467,0.108405,1000000},
-{2993982,3886467,3887088,0.19074,1000000},
-{2993983,3886345,3886438,0.233290909090909,1000000},
-{2993984,3886438,3887071,1000000,0.173293333333333},
-{2993985,3887607,3887909,1000000,1000000},
-{2993986,3887909,3888050,1000000,1000000},
-{2993987,3888030,3888169,0.0524,0.0524},
-{2993988,3888030,3887871,1000000,1000000},
-{2993989,3887871,3887570,1000000,1000000},
-{2993990,3888169,3888216,0.0188222222222222,0.0188222222222222},
-{2993991,3883671,3883242,0.262637837837838,0.373753846153846},
-{2993992,3883706,3883275,0.154606451612903,1000000},
-{2993993,3892725,3892778,1000000,0.0127894736842105},
-{2993996,3883671,3883706,1000000,0.0404275862068965},
-{2993997,3883766,3883820,0.0240230769230769,0.0231333333333333},
-{2993998,3883820,3884195,0.14358,0.253376470588235},
-{2994001,3883798,3883766,1000000,0.03348},
-{2994002,3883820,3883798,0.0474,1000000},
-{2994009,3889989,3890192,0.2786,1000000},
-{2994010,3890192,3890226,0.0732428571428571,1000000},
-{2994011,3889601,3890114,1000000,0.13515},
-{2994031,3904315,3904398,0.0351490909090909,0.0364754716981132},
-{2994032,3904398,3904509,0.04512,0.049632},
-{2994033,3904305,3904398,0.07864,0.0453692307692308},
-{2994040,3917292,3917333,0.0423529411764706,1000000},
-{2994041,3917333,3917319,0.00954705882352941,1000000},
-{2994042,3875241,3875217,0.0141918367346939,1000000},
-{2994043,3874470,3874931,0.1631625,0.326325},
-{2994044,3875030,3875217,1000000,0.0529142857142857},
-{2994045,3875828,3875348,0.113315789473684,1000000},
-{2994046,3875348,3875241,0.038316,1000000},
-{2994047,3875177,3875143,0.107811111111111,1000000},
-{2994048,3875869,3875433,1000000,0.0979928571428571},
-{2994049,3875247,3875222,1000000,0.102905454545455},
-{2994050,3875177,3875247,0.04173,1000000},
-{2994051,3875247,3875433,0.59766,1000000},
-{2994052,3875433,3875348,0.07808,1000000},
-{2994053,3875241,3875030,0.06996,1000000},
-{2994054,3875030,3874931,0.0288558139534884,1000000},
-{2994055,3874931,3875072,0.06232,1000000},
-{2994056,3875072,3875177,0.0832,1000000},
-{2994057,3875278,3875261,1000000,0.0069},
-{2994058,3875261,3875247,1000000,0.0138588235294118},
-{2994059,3875072,3875196,0.0765789473684211,1000000},
-{2994066,3875433,3875303,1000000,0.0429576923076923},
-{2994067,3875303,3875278,1000000,0.014556},
-{2994086,3917333,3917522,0.0623142857142857,1000000},
-{2994087,3917522,3918367,0.223119230769231,1000000},
-{2994096,3887514,3887964,0.1821,0.130071428571429},
-{2994097,3888353,3888439,0.0371414634146341,1000000},
-{2994098,3888439,3888715,0.111146666666667,0.128246153846154},
-{2994099,3888150,3888703,1000000,1000000},
-{2994100,3888509,3888427,1000000,1000000},
-{2994101,3888284,3888509,0.0548048780487805,1000000},
-{2994102,3887964,3888150,1000000,0.0646666666666667},
-{2994103,3888150,3888223,1000000,0.0323636363636364},
-{2994104,3888223,3888284,1000000,0.039104347826087},
-{2994105,3888284,3888427,1000000,0.2323125},
-{2994106,3888427,3888439,1000000,0.0646666666666667},
-{2994107,3888091,3888120,0.0257225806451613,1000000},
-{2994110,3873721,3873594,0.07107,0.0804566037735849},
-{2994112,3873305,3873411,0.0804537313432836,1000000},
-{2994115,3883596,3883865,0.160533333333333,0.115584},
-{2994116,3883793,3883865,1000000,0.31528},
-{2994117,3883865,3883887,1000000,0.128414634146341},
-{2994119,3905973,3906025,0.143113043478261,0.10972},
-{2994120,3905088,3905630,0.312183333333333,1000000},
-{2994121,3905630,3905751,0.09147,1000000},
-{2994122,3905140,3905660,1000000,0.277723076923077},
-{2994123,3905660,3905751,1000000,0.0556545454545454},
-{2994132,3887071,3887232,1000000,0.03744},
-{2994136,3900961,3900859,0.070775,0.0585724137931034},
-{2994137,3900604,3900200,0.2646,0.257448648648649},
-{2994138,3900653,3900666,0.0110526315789474,0.013125},
-{2994139,3887964,3888036,0.0640105263157895,1000000},
-{2994140,3888036,3888091,0.07398,1000000},
-{2994141,3888223,3888490,1000000,0.0760764705882353},
-{2994142,3888490,3889217,1000000,0.181245},
-{2994143,3900593,3900578,0.00640434782608696,0.0061375},
-{2994144,3900578,3900501,0.0419632653061225,0.0501512195121951},
-{2994145,3900610,3900578,1000000,0.0282947368421053},
-{2994146,3900606,3900593,0.00730666666666667,0.00671020408163265},
-{2994147,3900859,3900681,0.18696,0.107861538461538},
-{2994148,3900653,3900604,0.0534461538461538,0.0496285714285714},
-{2994151,3900681,3900649,1000000,0.0162},
-{2994152,3900649,3900610,1000000,0.0231},
-{2994153,3900681,3900669,0.0372260869565217,0.0389181818181818},
-{2994154,3900669,3900653,0.01895,0.0197739130434783},
-{2994155,3900649,3900669,0.0424333333333333,1000000},
-{2994158,3883766,3883741,1000000,0.0176076923076923},
-{2994159,3883741,3883671,1000000,0.0375130434782609},
-{2994160,3883766,3883731,0.00906666666666667,1000000},
-{2994161,3883731,3883706,0.00991578947368421,1000000},
-{2994163,3889620,3890152,0.2936,1000000},
-{2994173,3892358,3892769,0.137473170731707,1000000},
-{2994194,3890774,3890874,0.0637833333333333,0.15308},
-{2994195,3890874,3890951,0.054195,0.0802888888888889},
-{2994196,3890860,3890774,1000000,0.0248093023255814},
-{2994197,3890874,3890860,0.0827793103448276,1000000},
-{2994198,3890704,3890813,1000000,0.0341675675675676},
-{2994199,3890813,3891579,1000000,0.256215789473684},
-{2994210,3883865,3883891,1000000,1000000},
-{2994211,3883891,3883917,1000000,1000000},
-{2994214,3883480,3883991,0.237104347826087,0.18178},
-{2994215,3891206,3891355,0.0610390243902439,1000000},
-{2994216,3891355,3891460,0.0748758620689655,1000000},
-{2994217,3891460,3891562,0.0778333333333333,0.07005},
-{2994218,3891355,3891562,0.0630818181818182,1000000},
-{2994219,3891562,3891746,0.0555913043478261,1000000},
-{2994220,3891597,3891746,1000000,0.080205},
-{2994221,3891562,3891597,0.0795157894736842,0.0487354838709677},
-{2994222,3891515,3891597,1000000,0.04955},
-{2994223,3891515,3891757,0.122007692307692,0.109386206896552},
-{2994224,3891746,3891968,0.102216,0.102216},
-{2994225,3891968,3893008,0.557822222222222,0.568347169811321},
-{2994226,3891460,3891968,1.05222,1.05222},
-{2994227,3883991,3884014,0.02748,0.00947586206896552},
-{2994228,3884014,3884039,0.02418,0.00863571428571429},
-{2994229,3891206,3891360,1000000,0.0695586206896552},
-{2994230,3891360,3891515,1000000,0.07192},
-{2994231,3891230,3891360,0.131466666666667,0.131466666666667},
-{2994232,3883913,3883934,1000000,0.1052125},
-{2994233,3883742,3883792,1000000,0.287961290322581},
-{2994234,3883792,3883793,1000000,0.0137375},
-{2994235,3895900,3895932,0.00971052631578948,0.00753061224489796},
-{2994236,3895932,3896591,0.163608,1000000},
-{2994237,3896591,3897564,0.1908,1000000},
-{2994238,3897564,3898228,0.117796721311475,0.133066666666667},
-{2994239,3895932,3896587,1000000,0.151876363636364},
-{2994240,3896587,3897564,1000000,0.20167868852459},
-{2994241,3883542,3884043,0.275115789473684,0.275115789473684},
-{2994242,3884096,3884043,0.318522580645161,1000000},
-{2994243,3884043,3883991,0.375911111111111,1000000},
-{2994244,3901647,3901770,0.1038,0.0481928571428571},
-{2994245,3901756,3901770,0.0347333333333333,0.02605},
-{2994246,3901647,3901756,1000000,0.0550838709677419},
-{2994247,3901207,3901613,0.136909090909091,0.110195121951219},
-{2994248,3901613,3901647,0.0252,0.0118588235294118},
-{2994249,3901808,3901956,0.154764705882353,0.1754},
-{2994250,3884043,3884069,0.0137142857142857,0.0144},
-{2994251,3884069,3884106,0.0161428571428571,0.01695},
-{2994252,3884177,3884153,1000000,1000000},
-{2994257,3884128,3884130,0.18668275862069,1000000},
-{2994258,3884130,3884096,0.150763636363636,1000000},
-{2994259,3883845,3883808,1000000,0.226545},
-{2994260,3883808,3883798,1000000,0.0158307692307692},
-{2994261,3883706,3883726,1000000,0.0340695652173913},
-{2994262,3883726,3883742,1000000,0.0152454545454545},
-{2994263,3902336,3901578,0.579955555555556,0.579955555555556},
-{2994264,3902336,3902426,1000000,0.07078125},
-{2994265,3902426,3902393,1000000,0.067725},
-{2994277,3901435,3901525,0.275348571428571,1000000},
-{2994278,3901493,3901503,0.01569375,0.0152181818181818},
-{2994279,3901525,3901508,0.0498222222222222,1000000},
-{2994280,3901508,3901503,0.0567111111111111,1000000},
-{2994281,3901416,3901449,1000000,0.0138444444444444},
-{2994282,3901449,3901493,1000000,0.0215793103448276},
-{2994283,3901508,3901449,0.0258,1000000},
-{2994311,3912055,3912638,0.161106976744186,0.164942857142857},
-{2994312,3911427,3911913,0.259628571428571,0.259628571428571},
-{2994313,3911913,3912055,0.108176470588235,0.1149375},
-{2994314,3911979,3911650,1000000,0.133508108108108},
-{2994315,3912055,3911979,0.02244,0.0236210526315789},
-{2994316,3911979,3911846,0.038295,1000000},
-{2994317,3911315,3911611,0.243466666666667,0.230652631578947},
-{2994318,3911611,3911650,0.0582,0.0623571428571429},
-{2994319,3911846,3911611,0.0961028571428572,1000000},
-{2994330,3857952,3858139,0.05844,1000000},
-{2994331,3858139,3858737,0.141159183673469,1000000},
-{2994332,3910308,3910609,0.0858127659574468,0.084025},
-{2994333,3910609,3910653,0.015306976744186,0.0137125},
-{2994334,3911611,3910609,0.501696,1000000},
-{2994335,3904146,3904275,0.0512926829268293,1000000},
-{2994336,3904275,3904720,0.135492,1000000},
-{2994339,3904720,3904875,0.0421584905660377,1000000},
-{2994340,3904875,3905357,0.141894339622642,1000000},
-{2994350,3884107,3884148,1000000,0.0312486486486486},
-{2994379,3870938,3870942,0.0774,0.06966},
-{2994381,3904777,3904625,0.222644444444444,0.222644444444444},
-{2994383,3884153,3884128,1000000,1000000},
-{2994384,3884208,3884177,1000000,1000000},
-{2994385,3872807,3872731,0.0206909090909091,0.02276},
-{2994386,3872731,3872701,0.00853333333333333,0.00903529411764706},
-{2994387,3870864,3870382,1000000,1000000},
-{2994388,3901975,3902036,0.0132615384615385,1000000},
-{2994391,3902789,3902934,0.0286867924528302,1000000},
-{2994393,3874905,3875155,0.12312,1000000},
-{2994395,3894912,3894969,0.0320727272727273,1000000},
-{2994396,3894956,3894969,1000000,0.025175},
-{2994398,3878406,3878333,0.0201285714285714,0.0301928571428571},
-{2994399,3868904,3868927,0.0326228571428571,1000000},
-{2994400,3878230,3878290,1000000,0.0502137931034483},
-{2994402,3872435,3872346,1000000,0.0408222222222222},
-{2994403,3858895,3859085,0.0651428571428571,0.0675555555555555},
-{2994404,3864470,3864463,0.0974857142857143,1000000},
-{2994407,3875196,3875261,0.0423428571428571,1000000},
-{2994408,3886299,3886466,0.22206,0.22206},
-{2994409,3886466,3886476,0.23574,0.23574},
-{2994410,3887443,3887457,0.18606,0.18606},
-{2994411,3886466,3887294,1000000,1000000},
-{2994412,3887294,3887457,1000000,1000000},
-{2994413,3886248,3887238,0.302738461538462,0.327966666666667},
-{2994414,3887238,3887418,0.0554756756756757,0.0488714285714286},
-{2994415,3887294,3887238,1000000,1000000},
-{2994416,3888841,3889095,0.0462888888888889,0.0480692307692308},
-{2994417,3887457,3888797,1000000,1000000},
-{2994418,3888797,3888786,1000000,1000000},
-{2994419,3882469,3882501,1000000,1000000},
-{2994420,3882501,3882881,1000000,0.26193},
-{2994423,3900565,3900670,1000000,0.0347230769230769},
-{2994425,3885988,3885991,1000000,0.0144305084745763},
-{2994426,3869267,3869196,0.0143555555555556,1000000},
-{2994427,3869279,3869216,1000000,0.01756},
-{2994428,3873091,3872978,1000000,0.02908},
-{2994429,3873217,3873108,0.0267782608695652,1000000},
-{2994430,3876231,3876245,0.016275,1000000},
-{2994431,3876178,3876188,1000000,0.015588},
-{2994432,3878079,3878066,0.019425,1000000},
-{2994433,3878162,3878150,1000000,0.0166978723404255},
-{2994434,3852041,3852103,0.0126122448979592,1000000},
-{2994435,3875217,3875196,0.009775,1000000},
-{2994436,3875196,3875177,0.012734693877551,1000000},
-{2994438,3904028,3903956,1000000,0.0327},
-{2994439,3904146,3904066,0.0362516129032258,1000000},
-{2994444,3885248,3885372,0.0362057142857143,1000000},
-{2994445,3892945,3893049,1000000,0.0310266666666667},
-{2994446,3900506,3900597,0.0304565217391304,1000000},
-{2994447,3892849,3892950,0.0247659574468085,1000000},
-{2994448,3888091,3888223,1000000,0.0345},
-{2994449,3888120,3888284,0.0425692307692308,1000000},
-{2994450,3885253,3885345,1000000,0.0252585365853659},
-{3014035,3891449,3891796,0.16048,0.138876923076923},
-{3014036,3891310,3891717,0.27231724137931,0.376057142857143},
-{3014039,3915615,3915646,1000000,0.02604},
-{3014040,3915646,3915721,1000000,0.0398608695652174},
-{3014041,3915287,3915176,0.0660222222222222,0.0660222222222222},
-{3014042,3915224,3915615,1000000,0.167258823529412},
-{3014043,3915287,3915224,0.1119375,1000000},
-{3014044,3915646,3915619,0.0267461538461538,1000000},
-{3014131,3886587,3886700,0.1491,0.156947368421053},
-{3014132,3915619,3915287,0.279473684210526,1000000},
-{3014139,3886737,3886784,0.07782,0.07782},
-{3014140,3886587,3887275,0.434318181818182,0.415434782608696},
-{3014141,3887275,3887109,0.2371,0.218861538461538},
-{3014142,3887275,3887507,0.149444444444444,0.149444444444444},
-{3014143,3902634,3902496,0.0788888888888889,0.0788888888888889},
-{3014969,3847751,3847735,0.2982,0.2982},
-{3014970,3848117,3848096,0.259577777777778,0.259577777777778},
-{3014986,3853318,3853473,1000000,1000000},
-{3015067,3854520,3854256,0.174969230769231,0.168488888888889},
-{3015068,3854256,3854240,0.0121111111111111,0.0112758620689655},
-{3015069,3854202,3853944,0.387860869565217,0.356832},
-{3015070,3853944,3853882,0.12012,0.1092},
-{3015071,3854282,3854041,0.24492,0.233257142857143},
-{3015072,3854041,3853990,0.0797076923076923,0.0609529411764706},
-{3015073,3853990,3853899,0.0577826086956522,0.055375},
-{3015074,3853944,3853990,0.0754,0.05655},
-{3015084,3859150,3856982,1.02944444444444,1.02944444444444},
-{3015085,3856982,3856808,0.165371428571429,0.157854545454545},
-{3015102,3876121,3875862,0.5841,0.676326315789474},
-{3015380,3883054,3883650,0.464223529411765,0.464223529411765},
-{3015480,3886784,3887208,1.1694,1.1694},
-{3015481,3887208,3886784,1.6302,1.6302},
-{3015750,3849212,3848433,0.370883333333333,0.351363157894737},
-{3015756,3888915,3888872,0.0169615384615385,0.018375},
-{3015757,3865463,3865318,1000000,0.127748275862069},
-{3015758,3865318,3865279,1000000,0.0280392857142857},
-{3015759,3865255,3865318,1000000,0.0271428571428571},
-{3015760,3888665,3888850,1000000,0.0946071428571429},
-{3015801,3877798,3877709,1000000,0.996138461538462},
-{3015894,3849849,3849889,0.1499625,0.145418181818182},
-{3015895,3850172,3849999,0.112704,0.122504347826087},
-{3015896,3849999,3849844,0.09745,0.09745},
-{3015897,3849849,3849999,0.23196,0.23196},
-{3015926,3850257,3850254,0.00809032258064516,0.00836},
-{3015930,3848675,3848473,0.227688888888889,0.227688888888889},
-{3015973,3875312,3875228,1000000,0.117692307692308},
-{3015974,3875228,3875213,1000000,0.0218857142857143},
-{3015975,3887059,3885943,1000000,0.187697142857143},
-{3015976,3885943,3885679,1000000,0.0365828571428571},
-{3016009,3891623,3891760,0.0938896551724138,0.0878322580645161},
-{3016212,3864222,3864236,0.0251333333333333,0.0357157894736842},
-{3016249,3860665,3860628,0.0562166666666667,1000000},
-{3016250,3860628,3860622,0.0191842105263158,1000000},
-{3016251,3860628,3860754,1000000,0.0967285714285714},
-{3016289,3848797,3848851,0.22674,0.22674},
-{3016290,3848869,3848910,0.0924,0.0924},
-{3016293,3848830,3848869,0.0792222222222222,0.0792222222222222},
-{3016294,3848670,3848830,0.157933333333333,0.157933333333333},
-{3016297,3848705,3848792,0.0494,0.0494},
-{3016298,3848792,3848830,0.0559111111111111,0.0559111111111111},
-{3016299,3848792,3848797,0.22176,0.22176},
-{3016348,3900103,3900128,0.0212769230769231,1000000},
-{3016456,3868552,3868585,1000000,0.0251307692307692},
-{3016457,3868585,3868967,1000000,0.227030769230769},
-{3016577,3887239,3887327,1000000,0.01488},
-{3016578,3887327,3887477,1000000,0.0249230769230769},
-{3016579,3887404,3887366,1000000,0.00679714285714286},
-{3016580,3887366,3887312,1000000,0.00823714285714286},
-{3016595,3894969,3895005,1000000,0.0258285714285714},
-{3016596,3866123,3866170,1000000,0.0169371428571429},
-{3016597,3866170,3866208,1000000,0.0103885714285714},
-{3016762,3864204,3864270,0.105252631578947,0.0571371428571429},
-{3016763,3864270,3864310,0.0397285714285714,0.0347625},
-{3016769,3864753,3864696,0.0164647058823529,1000000},
-{3017032,3850017,3850353,0.102326086956522,0.112071428571429},
-{3017033,3850634,3850663,0.00898235294117647,0.00954375},
-{3017034,3850663,3850814,0.0504352941176471,0.0553161290322581},
-{3017096,3852648,3853016,0.266288888888889,0.266288888888889},
-{3017097,3853016,3853692,0.377044444444444,0.377044444444444},
-{3017098,3853692,3853293,0.190240909090909,0.186013333333333},
-{3017099,3853293,3852629,0.238346666666667,0.238346666666667},
-{3017100,3853016,3853293,1000000,1000000},
-{3017106,3851989,3852613,0.37435,0.408381818181818},
-{3017107,3852613,3852633,0.0206,0.02124375},
-{3017113,3852613,3852528,1000000,1000000},
-{3017123,3853853,3853368,1000000,1000000},
-{3017125,3853417,3853368,0.0792,0.0792},
-{3017142,3854228,3854102,0.245123076923077,0.245123076923077},
-{3017143,3854102,3853916,0.258133333333333,0.258133333333333},
-{3017144,3854586,3854228,0.155742857142857,0.167723076923077},
-{3017145,3854228,3854155,0.03056,0.036672},
-{3017148,3854838,3854857,0.201177777777778,0.201177777777778},
-{3017149,3855160,3854838,1000000,1000000},
-{3017150,3854838,3854267,1000000,1000000},
-{3017182,3852393,3852637,0.14655,0.154263157894737},
-{3017183,3852637,3852558,0.0918666666666667,0.0918666666666667},
-{3017184,3852907,3852578,0.1725,0.20125},
-{3017185,3852578,3852219,0.210744,0.210744},
-{3017186,3855946,3855663,0.199133333333333,0.199133333333333},
-{3017187,3855663,3855614,0.0423777777777778,0.0423777777777778},
-{3017188,3854717,3854818,0.283992857142857,0.283992857142857},
-{3017190,3855663,3855198,1000000,1000000},
-{3017191,3855198,3854818,1000000,1000000},
-{3017192,3855296,3855194,0.09925,0.0882222222222222},
-{3017193,3855194,3855186,0.0212769230769231,0.0190758620689655},
-{3017194,3855186,3855660,0.268722580645161,0.260325},
-{3017213,3899136,3899054,0.0188571428571429,0.0203076923076923},
-{3017214,3899054,3898678,0.106492682926829,0.103957142857143},
-{3017215,3899226,3898721,0.212378571428571,1000000},
-{3017307,3854316,3854504,0.145111111111111,0.145111111111111},
-{3017311,3854504,3854231,0.121622222222222,0.121622222222222},
-{3017317,3857090,3857106,0.164815384615385,1000000},
-{3017322,3858587,3857779,0.308290909090909,0.322971428571429},
-{3017323,3857779,3857510,0.06531,0.06531},
-{3017324,3858742,3857956,0.30484,0.295006451612903},
-{3017325,3857956,3856809,0.417064285714286,0.417064285714286},
-{3017326,3857779,3857956,1000000,1000000},
-{3017332,3853167,3853172,1000000,0.053},
-{3017333,3853307,3853304,1000000,0.0104275862068966},
-{3017334,3853304,3853167,1000000,0.06604},
-{3017639,3864686,3865008,0.391285714285714,0.148054054054054},
-{3017815,3895201,3895260,0.0302428571428571,1000000},
-{3017816,3895260,3895285,0.0128863636363636,1000000},
-{3017817,3895285,3895327,0.0214636363636364,1000000},
-{3018024,3893119,3893536,0.166388571428571,0.142039024390244},
-{3018025,3893536,3893621,0.0371828571428571,0.04066875},
-{3018026,3893536,3893623,1000000,0.162514285714286},
-{3018027,3906025,3905762,0.131377777777778,0.12231724137931},
-{3018028,3905762,3906596,0.527876470588235,0.527876470588235},
-{3018029,3905762,3904793,0.553116279069767,0.609846153846154},
-{3018039,3854095,3853165,1000000,0.536958620689655},
-{3018040,3853972,3853069,0.30174,0.486677419354839},
-{3018041,3853069,3852367,0.199376470588235,0.221047826086957},
-{3018042,3853165,3853069,1000000,0.106114285714286},
-{3018043,3853165,3853234,0.0433333333333333,0.0433333333333333},
-{3018132,3853086,3852457,0.569111111111111,0.569111111111111},
-{3018133,3852457,3852430,0.0300666666666667,0.0300666666666667},
-{3018134,3855660,3855708,1000000,1000000},
-{3018135,3855345,3855572,1000000,1000000},
-{3018136,3855761,3855743,1000000,0.49984},
-{3018137,3856428,3856870,0.58536,0.509008695652174},
-{3018138,3856870,3857120,0.086341935483871,0.086341935483871},
-{3018139,3856515,3856446,0.179664,0.21910243902439},
-{3018140,3856446,3856428,0.207976744186047,0.218121951219512},
-{3018141,3855795,3856446,1000000,1000000},
-{3018142,3856446,3856870,1000000,1000000},
-{3018148,3851476,3852150,0.400105263157895,0.475125},
-{3018149,3852150,3852450,0.139281818181818,0.133226086956522},
-{3018150,3852533,3852150,0.4556,0.4556},
-{3018151,3850986,3850179,0.371222222222222,0.3855},
-{3018152,3850179,3850077,0.0651130434782609,0.0680727272727273},
-{3018153,3851305,3850192,0.496711111111111,0.496711111111111},
-{3018154,3850192,3850123,0.0336444444444444,0.0336444444444444},
-{3018155,3850179,3850192,1000000,1000000},
-{3018156,3850717,3851017,1000000,1000000},
-{3018157,3851480,3851017,0.297666666666667,0.297666666666667},
-{3018158,3851017,3850986,0.019,0.019},
-{3018159,3850788,3851159,0.1802,0.1802},
-{3018160,3851614,3851565,0.0238444444444444,0.0292636363636364},
-{3018161,3851393,3851879,1000000,1000000},
-{3018162,3851879,3852134,1000000,1000000},
-{3018163,3852079,3851879,0.251711111111111,0.251711111111111},
-{3018164,3852134,3852213,0.28125,0.28125},
-{3018165,3852213,3852079,0.136338461538462,0.122234482758621},
-{3018166,3852079,3851614,0.535525,0.535525},
-{3018177,3852528,3852430,1000000,1000000},
-{3018182,3851480,3851830,1000000,1000000},
-{3018186,3852407,3851602,0.292675862068966,0.292675862068966},
-{3018187,3851602,3850434,0.511288888888889,0.511288888888889},
-{3018188,3851830,3851561,0.282235714285714,0.282235714285714},
-{3018189,3851561,3851453,0.0388551724137931,0.0512181818181818},
-{3018190,3851602,3851561,1000000,1000000},
-{3018191,3852675,3853678,0.388548387096774,0.4015},
-{3018192,3853678,3854194,0.322575,0.3519},
-{3018193,3853404,3853678,0.393088888888889,0.393088888888889},
-{3018194,3853401,3853080,0.210041379310345,0.20304},
-{3018195,3853080,3852855,0.274524324324324,0.290211428571429},
-{3018196,3852747,3853080,0.350644444444444,0.350644444444444},
-{3018197,3856745,3856639,0.3366,0.3366},
-{3018198,3856362,3856745,0.310933333333333,0.310933333333333},
-{3018199,3856740,3856745,0.0706,0.0706},
-{3018204,3854622,3854828,0.24501,0.24501},
-{3018205,3854828,3854895,0.3229,0.38748},
-{3018206,3854514,3854565,0.0536,0.0536},
-{3018207,3854565,3854828,0.3681,0.3681},
-{3018208,3854565,3854468,0.136938461538462,0.136938461538462},
-{3018209,3854093,3854468,0.174133333333333,0.174133333333333},
-{3018210,3854468,3854485,0.0541090909090909,0.0541090909090909},
-{3018211,3854779,3854485,0.1842,0.1842},
-{3018212,3854425,3854485,0.0816444444444444,0.0816444444444444},
-{3018213,3854156,3854425,0.120866666666667,0.120866666666667},
-{3018214,3854437,3854425,0.0479555555555555,0.0479555555555555},
-{3018215,3854895,3854706,0.144725,0.151017391304348},
-{3018216,3854437,3854656,0.146511111111111,0.146511111111111},
-{3018217,3854412,3854437,0.158,0.158},
-{3018218,3854706,3854628,0.05856,0.061},
-{3018219,3854628,3854486,0.105965217391304,0.128273684210526},
-{3018220,3854412,3854628,0.130933333333333,0.130933333333333},
-{3018221,3858278,3858223,0.03966,0.0344869565217391},
-{3018222,3858223,3857372,0.418173913043478,0.4809},
-{3018223,3906403,3907173,0.375192857142857,0.375192857142857},
-{3018224,3907173,3908272,0.47374,0.418005882352941},
-{3018225,3906662,3907479,0.314945454545455,0.3247875},
-{3018226,3907479,3908743,0.396707692307692,0.429766666666667},
-{3018227,3907173,3907479,0.298863157894737,0.298863157894737},
-{3018228,3901655,3902090,1000000,1000000},
-{3018229,3902090,3902410,0.162577777777778,0.162577777777778},
-{3018230,3899545,3900150,1000000,0.195232258064516},
-{3018231,3900165,3899545,0.389177777777778,0.389177777777778},
-{3018234,3860098,3860366,0.178695652173913,0.178695652173913},
-{3018235,3860366,3860408,0.033792,0.033792},
-{3018236,3860867,3860366,0.286933333333333,0.286933333333333},
-{3018237,3869530,3869525,0.0347625,0.0505636363636364},
-{3018238,3869525,3869514,0.141,0.235},
-{3018239,3871755,3870887,0.626953846153846,0.354365217391304},
-{3018240,3870887,3870875,0.020592,0.0270947368421053},
-{3018247,3885372,3885401,1000000,0.05255625},
-{3018248,3885401,3885456,1000000,0.169220689655172},
-{3018255,3871799,3871846,1000000,0.0331692307692308},
-{3018256,3871700,3871846,0.0651714285714286,1000000},
-{3018264,3890061,3890174,0.048727868852459,0.0540436363636364},
-{3018265,3890174,3890221,0.015984375,0.0200588235294118},
-{3018266,3885054,3885162,0.0483365853658537,0.0460883720930233},
-{3018267,3885162,3885493,0.144,0.171428571428571},
-{3018268,3885054,3885445,0.152076923076923,1000000},
-{3018269,3885445,3885835,0.111876923076923,1000000},
-{3018270,3885162,3885445,0.132765517241379,1000000},
-{3018271,3883321,3883414,1000000,0.0380428571428571},
-{3018272,3883414,3883658,1000000,0.108342857142857},
-{3018273,3883414,3883419,0.0599657142857143,1000000},
-{3018274,3883280,3883355,0.0396,1000000},
-{3018275,3883355,3883610,0.101586666666667,1000000},
-{3018276,3885737,3886427,0.6133,0.525685714285714},
-{3018277,3885920,3885737,0.078075,0.074952},
-{3018278,3885737,3885410,1000000,1000000},
-{3018280,3859200,3859167,0.01034,0.01034},
-{3018281,3859167,3859035,1000000,0.075925},
-{3018282,3899403,3899363,0.0186333333333333,1000000},
-{3018283,3899307,3899557,1000000,0.126758490566038},
-{3018284,3899363,3899307,0.01848,1000000},
-{3018285,3899683,3899852,0.0618727272727273,0.10209},
-{3018286,3899852,3900171,0.0936923076923077,0.126},
-{3018314,3864463,3864646,0.07168,1000000},
-{3018315,3859115,3858706,0.1169,1000000},
-{3018320,3859258,3859115,0.0403692307692308,1000000},
-{3018321,3859315,3859258,0.0204166666666667,1000000},
-{3018322,3884683,3884745,0.0829578947368421,1000000},
-{3018452,3864015,3864032,0.0397636363636364,1000000},
-{3018453,3864032,3864380,0.338028571428571,1000000},
-{3018462,3865144,3865247,0.046944,0.0335314285714286},
-{3018463,3865247,3865328,0.0332647058823529,0.039},
-{3018464,3865247,3865285,1000000,0.071},
-{3018465,3865285,3865315,1000000,0.0424384615384615},
-{3018466,3865213,3865021,0.15804,0.15804},
-{3018467,3864470,3864328,0.0934363636363636,1000000},
-{3018468,3864328,3864310,0.0144,1000000},
-{3018469,3864270,3864328,0.0400636363636364,1000000},
-{3018470,3864328,3864463,0.0534461538461538,1000000},
-{3018471,3871934,3872032,1000000,0.171765957446809},
-{3018472,3871954,3872032,1000000,0.0326181818181818},
-{3020208,3900337,3900448,0.0639555555555556,0.0639555555555556},
-{3020447,3889293,3889152,1000000,0.022065671641791},
-{3020448,3889152,3888856,1000000,0.0423130434782609},
-{3020469,3881451,3881476,1000000,0.0138285714285714},
-{3020529,3913573,3913159,0.27618,0.27618},
-{3020530,3913159,3913104,0.0290526315789474,0.0262857142857143},
-{3020531,3913104,3913061,0.0233052631578947,0.0210857142857143},
-{3020532,3913057,3912256,0.47151,0.554717647058824},
-{3020533,3913057,3913099,0.0348428571428571,0.0304875},
-{3020927,3905947,3906538,0.34737,0.34737},
-{3020928,3903785,3903828,0.0220888888888889,0.0220888888888889},
-{3020929,3903828,3904253,0.207644444444444,0.207644444444444},
-{3020990,3867763,3867847,1000000,0.08365},
-{3020991,3867847,3867853,1000000,0.0289636363636364},
-{3021002,3848123,3848831,0.412927272727273,0.412927272727273},
-{3021003,3848831,3848980,0.0723272727272727,0.0723272727272727},
-{3021021,3873008,3873018,0.116674285714286,0.163344},
-{3021022,3873018,3873359,0.135977777777778,0.135977777777778},
-{3021023,3874046,3873251,0.3734,0.289083870967742},
-{3021024,3873018,3872804,0.122511111111111,0.122511111111111},
-{3021025,3872804,3873279,0.6194,0.6194},
-{3021026,3873279,3873251,0.135675,0.127694117647059},
-{3021027,3872804,3873279,0.661328571428571,0.661328571428571},
-{3021031,3858011,3857983,0.0740380952380952,1000000},
-{3021032,3855897,3856249,0.2764,1000000},
-{3021033,3855897,3855140,1000000,0.314711111111111},
-{3021034,3855140,3854739,0.2114,0.1812},
-{3021035,3853749,3854211,0.170072727272727,0.170072727272727},
-{3021036,3853763,3853241,0.2046,0.2046},
-{3021037,3853428,3853749,0.131872727272727,0.131872727272727},
-{3021038,3853241,3852830,0.142527272727273,0.142527272727273},
-{3021039,3852822,3853428,0.202272727272727,0.202272727272727},
-{3021040,3852830,3852268,0.174818181818182,0.174818181818182},
-{3021041,3852256,3852822,0.167854545454545,0.167854545454545},
-{3021042,3852268,3851730,0.177309090909091,0.177309090909091},
-{3021043,3851816,3852256,0.134964705882353,0.134964705882353},
-{3021044,3850999,3851081,0.122018181818182,0.122018181818182},
-{3021045,3851081,3851816,0.257945454545455,0.257945454545455},
-{3021055,3863075,3862960,0.0731333333333333,0.0731333333333333},
-{3021067,3871704,3872103,0.121037837837838,0.135709090909091},
-{3021068,3871092,3871280,0.0767142857142857,0.0639285714285714},
-{3021124,3858565,3858278,0.130066666666667,0.130066666666667},
-{3021125,3919957,3919866,0.066525,0.0939176470588235},
-{3021126,3919866,3919159,0.480456,0.60057},
-{3021127,3919866,3919457,0.320166666666667,0.274428571428571},
-{3021128,3902036,3902123,0.021945,1000000},
-{3021129,3914199,3914359,0.133826086956522,0.219857142857143},
-{3021130,3914359,3914699,0.171131707317073,0.17541},
-{3021132,3908441,3908999,0.125748,0.1497},
-{3021133,3908999,3908744,0.160622222222222,0.160622222222222},
-{3021139,3907205,3907326,1000000,0.0333219512195122},
-{3021140,3907326,3907159,0.260657142857143,1000000},
-{3021141,3907159,3907057,0.14754,1000000},
-{3021148,3870743,3870883,0.108166666666667,1000000},
-{3021149,3870771,3870378,0.123512195121951,1000000},
-{3021150,3870378,3870278,0.039454054054054,0.0317347826086956},
-{3021151,3870508,3870743,1000000,0.228347368421053},
-{3021152,3870743,3870718,1000000,0.00657},
-{3021153,3870718,3870378,1000000,0.113790697674419},
-{3021154,3897298,3897345,0.0124636363636364,1000000},
-{3021155,3897259,3897298,0.11196,1000000},
-{3021156,3897259,3897496,0.28278,0.28278},
-{3021176,3864541,3864669,0.246069230769231,0.236955555555556},
-{3021177,3864669,3865619,0.5163,0.501548571428571},
-{3021178,3864669,3864415,0.4542,0.4542},
-{3021179,3871451,3871391,0.100033333333333,1000000},
-{3021180,3871391,3871351,0.0368368421052632,1000000},
-{3021181,3871342,3871310,1000000,0.0985875},
-{3021182,3871310,3871351,1000000,0.0481609756097561},
-{3021184,3891411,3891414,1000000,0.0427894736842105},
-{3021200,3898149,3898223,1000000,0.0868524590163934},
-{3021201,3898149,3897857,0.772707692307692,1000000},
-{3021202,3900549,3900721,0.041796,1000000},
-{3021203,3900721,3900776,0.0134588235294118,1000000},
-{3021204,3900721,3900720,0.01767,0.0126214285714286},
-{3021214,3900539,3900719,1000000,0.0526142857142857},
-{3021215,3900719,3900789,1000000,0.0193333333333333},
-{3021216,3900720,3900719,0.0278117647058824,0.01576},
-{3021219,3898083,3898145,0.0852090909090909,1000000},
-{3021220,3898145,3898156,0.014053125,1000000},
-{3021221,3897835,3898145,0.579026086956522,1000000},
-{3021224,3901991,3902048,1000000,0.0149727272727273},
-{3021225,3902048,3902200,1000000,0.0345906976744186},
-{3021237,3883641,3883929,0.0684888888888889,1000000},
-{3021238,3883929,3884206,0.12441,1000000},
-{3021239,3883966,3884061,0.034858064516129,1000000},
-{3021240,3884061,3884227,0.357939130434783,1000000},
-{3021291,3890881,3891507,0.236982352941176,0.161148},
-{3021292,3891507,3891569,0.100971428571429,0.02945},
-{3021293,3891569,3891723,0.037968,0.037968},
-{3021294,3891723,3892260,0.138788235294118,0.141564},
-{3021295,3891507,3891723,1000000,0.0711473684210526},
-{3021296,3887667,3887710,0.0185863636363636,1000000},
-{3021297,3887990,3887893,1000000,0.0314470588235294},
-{3021298,3887990,3888003,0.00478666666666667,1000000},
-{3021299,3887710,3887749,0.0163428571428571,1000000},
-{3021300,3888003,3888071,0.0169914893617021,1000000},
-{3021304,3890881,3890861,0.054888,0.0762333333333333},
-{3021305,3890861,3890847,0.24315,0.24315},
-{3021309,3890861,3891046,0.460457142857143,0.460457142857143},
-{3021325,3887749,3887860,0.045978947368421,1000000},
-{3021326,3887860,3887842,0.0575538461538462,1000000},
-{3021346,3888061,3888071,1000000,0.0234510638297872},
-{3021347,3887990,3888061,0.02445,1000000},
-{3021350,3897794,3897793,0.0193636363636364,0.0193636363636364},
-{3021351,3897609,3897788,1000000,0.0504731707317073},
-{3021352,3897788,3897793,0.0250909090909091,0.0250909090909091},
-{3021356,3897334,3897414,1000000,0.0194625},
-{3021357,3896024,3896211,1000000,0.0454040816326531},
-{3021367,3887316,3887690,0.165024,1000000},
-{3021368,3887690,3887893,0.06824,1000000},
-{3021384,3885856,3885864,0.0189677419354839,0.0189677419354839},
-{3021385,3885864,3885949,0.191645901639344,0.191645901639344},
-{3021386,3885864,3886956,0.61935,0.61935},
-{3021390,3906608,3907074,0.198763636363636,1000000},
-{3021487,3885597,3885710,0.145865625,0.137285294117647},
-{3021488,3885963,3886082,0.305424,0.331982608695652},
-{3021489,3885710,3885911,1000000,0.165486956521739},
-{3021576,3907297,3907187,0.0623777777777778,0.0623777777777778},
-{3022379,3885345,3885272,0.102633333333333,1000000},
-{3022380,3885272,3885188,0.1310625,1000000},
-{3022381,3880854,3880893,0.02626,1000000},
-{3022388,3872283,3871939,0.200775,1000000},
-{3022389,3895278,3895333,1000000,0.0365},
-{3022390,3895333,3895400,1000000,0.0349170731707317},
-{3022468,3897646,3897762,1000000,0.0236173913043478},
-{3022469,3898191,3899087,0.174290625,1000000},
-{3023424,3893801,3894269,0.601930434782609,0.314645454545455},
-{3023425,3894269,3894307,0.0260538461538462,0.0233586206896552},
-{3023426,3893831,3894190,0.167022857142857,1000000},
-{3023427,3894190,3894307,0.0863307692307692,1000000},
-{3023428,3894307,3894380,0.03688,0.0502909090909091},
-{3023429,3894380,3894794,0.177771428571429,0.282818181818182},
-{3023430,3894190,3894380,0.10645,1000000},
-{3023431,3894147,3894269,1000000,0.056445},
-{3023432,3893801,3894187,0.266542857142857,0.243365217391304},
-{3023433,3894187,3894259,0.053,0.0477},
-{3023434,3894238,3894187,1000000,0.140534693877551},
-{3023435,3894187,3894136,1000000,0.168117647058824},
-{3023436,3894136,3894077,1000000,0.226614285714286},
-{3023437,3892616,3894004,0.624827586206896,0.549090909090909},
-{3023438,3894004,3894065,0.042675,0.0296869565217391},
-{3023439,3894004,3893972,1000000,0.0923590909090909},
-{3023440,3893289,3894077,1000000,0.61581},
-{3023441,3894077,3894125,0.0288666666666667,0.06495},
-{3023442,3893101,3893972,1000000,0.458355555555556},
-{3023443,3893972,3894022,1000000,0.0374},
-{3023444,3893921,3893811,0.0609230769230769,1000000},
-{3023445,3893811,3893724,0.0837111111111111,0.0538142857142857},
-{3023446,3894022,3893978,0.0870418604651163,1000000},
-{3023447,3893978,3893921,0.0374857142857143,1000000},
-{3023448,3893961,3893921,0.0610666666666667,0.07328},
-{3023449,3893978,3893961,0.0709354838709677,1000000},
-{3023450,3893891,3893811,1000000,0.06},
-{3023451,3893921,3893891,0.0336857142857143,0.0277411764705882},
-{3023452,3893972,3893939,1000000,0.0790243902439024},
-{3023453,3893939,3893891,1000000,0.0430578947368421},
-{3023455,3849886,3849626,0.29688,0.30925},
-{3023812,3899580,3899554,1000000,0.0425076923076923},
-{3023813,3900171,3899551,0.4786,0.499408695652174},
-{3023814,3899551,3899403,0.0847090909090909,0.0716769230769231},
-{3023817,3865328,3865401,0.103726829268293,1000000},
-{3024256,3883929,3883935,1000000,0.0415304347826087},
-{3024257,3884285,3884345,1000000,0.1299},
-{3024258,3884345,3884370,1000000,0.0325058823529412},
-{3024259,3883935,3884229,1000000,0.259907142857143},
-{3024260,3884229,3884345,1000000,0.168768},
-{3024261,3884229,3884285,1000000,0.04314},
-{3038793,3909340,3908941,0.215688,1000000},
-{3038794,3909412,3909287,0.291133333333333,0.291133333333333},
-{3038812,3862735,3862873,0.204352941176471,0.204352941176471},
-{3038814,3871777,3871799,1000000,0.0231076923076923},
-{3038815,3871669,3871777,1000000,0.0569052631578947},
-{3038816,3871669,3871700,0.0485866666666667,1000000},
-{3038824,3909368,3909449,0.0568,0.0426},
-{3038825,3909449,3909567,0.11676,0.08757},
-{3038828,3909567,3909485,0.0362,0.047784},
-{3038829,3909485,3908585,0.265865217391304,0.321836842105263},
-{3038830,3909449,3909485,0.117284210526316,1000000},
-{3038839,3908442,3909010,0.255754838709677,0.2477625},
-{3038840,3909010,3909128,0.0476,0.0541655172413793},
-{3038841,3908977,3907973,0.346488888888889,0.346488888888889},
-{3038842,3909010,3908977,0.0566,0.0566},
-{3038843,3909012,3908340,0.27136875,0.27136875},
-{3038844,3908977,3909012,0.050295652173913,0.050295652173913},
-{3038845,3909123,3909099,0.39105,0.39105},
-{3038846,3909012,3909123,0.0535090909090909,0.0511826086956522},
-{3038847,3909128,3909204,0.0401225806451613,0.0460666666666667},
-{3038848,3909204,3909808,0.308078571428571,0.319488888888889},
-{3038849,3909123,3909204,0.0551181818181818,0.0551181818181818},
-{3038862,3885850,3886162,1000000,1000000},
-{3038881,3900760,3900902,1000000,1000000},
-{3038882,3900902,3900910,0.0636,0.05088},
-{3038883,3900724,3900902,0.99738947368421,1.11472941176471},
-{3038884,3900234,3900235,0.0144,1000000},
-{3038885,3900235,3900252,0.16811320754717,1000000},
-{3038889,3900220,3900213,1000000,0.0539234042553191},
-{3038901,3900428,3900919,0.1371,0.194593548387097},
-{3038902,3900919,3901376,0.104811764705882,0.1113625},
-{3038903,3900910,3900919,0.0834782608695652,0.0533333333333333},
-{3038904,3900910,3901484,1000000,1000000},
-{3038905,3901484,3902255,1000000,1000000},
-{3038906,3901376,3901496,0.0237396226415094,0.0267702127659574},
-{3038907,3901496,3902273,0.219061538461538,0.244097142857143},
-{3038908,3901484,3901496,0.048,0.048},
-{3038970,3899302,3899859,1000000,0.130746428571429},
-{3038975,3900382,3900455,1000000,0.022004347826087},
-{3038976,3900981,3901239,0.1108,0.1108},
-{3038977,3900068,3900381,0.3409,0.3409},
-{3038981,3901019,3900981,0.142778571428571,0.148066666666667},
-{3038982,3901019,3902574,0.478145454545455,0.478145454545455},
-{3039003,3883271,3883676,0.179733333333333,0.179733333333333},
-{3039004,3883010,3883397,0.110473469387755,0.106141176470588},
-{3039005,3883397,3883271,0.101175,0.1349},
-{3039006,3883794,3883839,0.0257307692307692,0.0318571428571429},
-{3039007,3883839,3884108,0.143957142857143,0.223933333333333},
-{3039008,3883397,3883839,0.215032258064516,0.162585365853659},
-{3039009,3883010,3881387,0.461292857142857,0.478377777777778},
-{3039010,3879866,3881301,0.797266666666667,0.768792857142857},
-{3039011,3881301,3881387,0.07772,0.0529909090909091},
-{3039012,3881511,3881301,0.222347368421053,0.176025},
-{3039013,3877491,3877637,1000000,1000000},
-{3039014,3877637,3878088,1000000,1000000},
-{3039015,3878530,3878800,0.0641222222222222,0.0678941176470588},
-{3039016,3878800,3879324,0.130702040816327,0.128088},
-{3039019,3884920,3885522,0.230555555555556,0.230555555555556},
-{3039020,3885522,3885524,0.09,1000000},
-{3039021,3884783,3885503,0.2380125,0.282088888888889},
-{3039022,3885503,3885604,0.0288882352941177,0.0338689655172414},
-{3039023,3885522,3885503,1000000,0.49698},
-{3039024,3898818,3898860,0.0225789473684211,0.0225789473684211},
-{3039025,3898860,3899173,0.16887,0.241242857142857},
-{3039026,3898733,3899092,0.117635294117647,0.1111},
-{3039027,3899092,3899696,0.268269230769231,0.249107142857143},
-{3039028,3898860,3899092,0.4755,0.4755},
-{3039033,3900232,3900380,0.05004375,0.0942},
-{3039034,3900380,3900428,0.0184166666666667,0.039},
-{3039035,3900235,3900577,1000000,0.200085714285714},
-{3039036,3900577,3900910,0.144488888888889,0.139328571428571},
-{3039037,3900380,3900577,0.136338461538462,0.2532},
-{3039085,3899497,3899615,0.0701777777777778,0.0701777777777778},
-{3039086,3899244,3899497,0.128818181818182,0.1417},
-{3039087,3899615,3899244,0.256755555555556,0.256755555555556},
-{3039088,3899095,3899287,0.133406896551724,0.09672},
-{3039089,3899287,3899526,0.1371,0.112172727272727},
-{3039090,3899615,3900356,0.400955555555556,0.400955555555556},
-{3039091,3900064,3900356,0.175644444444444,0.175644444444444},
-{3039092,3899988,3900064,0.0450222222222222,0.0450222222222222},
-{3039093,3899988,3900332,0.134955555555556,0.134955555555556},
-{3039094,3900332,3901120,0.439111111111111,0.439111111111111},
-{3039095,3900356,3900579,0.113711111111111,0.113711111111111},
-{3039096,3900579,3901158,0.273577777777778,0.273577777777778},
-{3039097,3900332,3900579,0.207555555555556,0.207555555555556},
-{3039099,3900049,3900039,0.0259714285714286,1000000},
-{3039100,3900039,3899983,0.0920526315789474,1000000},
-{3039101,3900000,3900041,0.01338,1000000},
-{3039121,3860494,3861326,1000000,1000000},
-{3039122,3861326,3861558,0.122511111111111,0.122511111111111},
-{3039283,3859420,3859564,0.12004,0.105917647058824},
-{3039284,3859564,3859929,0.284485714285714,0.3319},
-{3039285,3859929,3860099,0.16188,0.186784615384615},
-{3039286,3859564,3859929,0.2222,0.2222},
-{3039287,3861013,3860371,0.28438,1000000},
-{3039288,3860371,3860205,0.0660810810810811,1000000},
-{3039289,3860371,3860099,1000000,1000000},
-{3039292,3860099,3860884,1000000,1000000},
-{3039346,3868140,3868179,1000000,1000000},
-{3039347,3868179,3868237,1000000,1000000},
-{3039432,3900455,3900515,1000000,0.0189545454545455},
-{3039433,3900515,3900565,1000000,0.0202},
-{3039438,3895137,3895193,1000000,0.0340772727272727},
-{3040236,3861321,3862136,0.322287804878049,0.35712972972973},
-{3040345,3868192,3868211,0.01836,1000000},
-{3040354,3867716,3867453,0.117133333333333,0.121638461538462},
-{3040355,3867453,3867230,0.0751241379310345,0.0702774193548387},
-{3040428,3884747,3884813,0.0256451612903226,0.0361363636363636},
-{3040654,3888353,3888427,0.04542,1000000},
-{3040660,3890957,3891082,0.154690909090909,0.121542857142857},
-{3040661,3891082,3891146,1000000,0.0624692307692308},
-{3040662,3891031,3891146,1000000,0.037095},
-{3040663,3891082,3891031,0.113470588235294,1000000},
-{3040664,3890974,3891052,0.0267,1000000},
-{3040665,3891052,3891160,0.0407513513513513,1000000},
-{3041935,3898020,3898046,0.0168,0.01848},
-{3041936,3898046,3898318,0.20793,0.20793},
-{3041937,3895180,3895338,0.0468979591836735,0.0441923076923077},
-{3041938,3895338,3895566,1000000,0.0673591836734694},
-{3041939,3895978,3896005,0.0212129032258065,0.0274},
-{3041940,3896005,3896260,0.1804125,0.3396},
-{3041941,3895199,3895547,0.22432,1000000},
-{3041942,3896735,3896844,0.129070588235294,0.129070588235294},
-{3041943,3896735,3896005,1000000,0.261757894736842},
-{3041944,3895547,3895338,1000000,0.0614553191489362},
-{3041945,3898046,3897537,1000000,0.224854545454545},
-{3041946,3897522,3897537,0.022968,0.0261},
-{3041947,3880838,3880912,0.02374,1000000},
-{3041948,3881006,3880912,0.0923333333333333,0.0923333333333333},
-{3041951,3895663,3896075,0.329947826086957,0.216822857142857},
-{3041952,3896075,3896128,0.0236068965517241,1000000},
-{3041953,3896471,3896563,0.0444,1000000},
-{3041954,3896437,3896234,0.1395,0.172714285714286},
-{3041955,3896128,3896092,1000000,0.0136173913043478},
-{3041956,3896092,3895931,1000000,0.0706604651162791},
-{3041957,3895931,3896119,0.217928571428571,1000000},
-{3041958,3896119,3896155,0.02068,1000000},
-{3041959,3896217,3896181,0.0149720930232558,1000000},
-{3041960,3896181,3896030,0.0629086956521739,1000000},
-{3041961,3896075,3896092,1000000,0.025125},
-{3041962,3896092,3896119,1000000,0.01494375},
-{3041963,3896119,3896181,1000000,0.0418444444444444},
-{3041964,3896181,3896437,1000000,0.244166666666667},
-{3041965,3896437,3896563,1000000,0.0494647058823529},
-{3042484,3890457,3890562,1000000,0.0389272727272727},
-{3042486,3892862,3892945,1000000,0.0178408163265306},
-{3042490,3885150,3885118,1000000,0.0470903225806452},
-{3042491,3885118,3885097,1000000,0.0456882352941176},
-{3042495,3885118,3885255,1000000,0.159635294117647},
-{3042496,3885026,3884809,0.120627272727273,1000000},
-{3042497,3884796,3884947,1000000,0.23278},
-{3042498,3884947,3884978,1000000,0.0488057142857143},
-{3042499,3884809,3884947,0.159157894736842,1000000},
-{3042543,3895346,3895643,0.119222727272727,1000000},
-{3042544,3895434,3895450,1000000,0.01422},
-{3042545,3893565,3895158,0.416937931034483,1000000},
-{3042546,3895158,3895201,0.0244909090909091,1000000},
-{3042549,3898746,3898640,0.0601736842105263,0.0476375},
-{3042550,3898494,3898557,0.0257379310344828,1000000},
-{3042552,3869824,3869680,0.04308,0.0349297297297297},
-{3042553,3869680,3869461,0.05076,0.05076},
-{3042554,3870193,3869981,0.09621,0.0549771428571429},
-{3042555,3869981,3869824,0.0628173913043478,0.0437818181818182},
-{3042556,3870041,3869824,0.1904,0.068},
-{3042567,3865015,3864643,0.115005882352941,0.162925},
-{3042568,3864643,3864040,0.211747058823529,0.232238709677419},
-{3042569,3864629,3864863,0.107651162790698,0.125108108108108},
-{3042570,3864863,3865144,0.136962162162162,0.120657142857143},
-{3042571,3864473,3864560,0.0601714285714286,0.0815225806451613},
-{3042572,3864560,3864629,0.0371581395348837,0.0469941176470588},
-{3042577,3866009,3865767,0.109241379310345,0.111157894736842},
-{3042578,3865767,3865334,0.270703448275862,0.280371428571429},
-{3042579,3865015,3865004,0.0477733333333333,1000000},
-{3042580,3865004,3864890,0.269433962264151,1000000},
-{3042581,3864890,3864889,0.0688188679245283,1000000},
-{3042582,3865079,3864986,1000000,0.28164},
-{3042583,3864986,3864981,1000000,0.0906470588235294},
-{3042584,3865196,3865128,0.0336375,1000000},
-{3042585,3865128,3864981,0.087675,1000000},
-{3042586,3863953,3863322,0.26925,1000000},
-{3042587,3864912,3864819,1000000,0.038875},
-{3042588,3864819,3863621,1000000,0.5268},
-{3042589,3864990,3864998,1000000,0.044775},
-{3042590,3864998,3865005,1000000,0.0536615384615385},
-{3042592,3877871,3878020,0.0833052631578947,1000000},
-{3042596,3865309,3865261,0.181690909090909,1000000},
-{3042597,3865261,3865186,0.07065,1000000},
-{3042600,3884871,3885029,0.30921,1000000},
-{3042601,3885029,3885097,0.0886384615384615,1000000},
-{3042602,3864784,3864931,0.0736434782608696,1000000},
-{3042603,3864931,3865056,0.0654,1000000},
-{3042604,3864934,3864869,0.0722903225806452,1000000},
-{3042605,3864869,3864784,0.0793846153846154,1000000},
-{3042613,3890664,3890704,0.047295652173913,0.03626},
-{3042614,3890494,3890585,0.0835928571428571,0.0866888888888889},
-{3042615,3887585,3887706,0.0323210526315789,0.0314923076923077},
-{3042616,3887706,3888545,0.20673488372093,0.216819512195122},
-{3042617,3871961,3871968,0.0653189189189189,1000000},
-{3042618,3872452,3872484,1000000,0.026796},
-{3042619,3886816,3887002,0.08265,1000000},
-{3042620,3869774,3869498,0.0636714285714286,1000000},
-{3042621,3870062,3869924,1000000,0.0441},
-{3042622,3870079,3870062,0.19684,0.109355555555556},
-{3042623,3870092,3870079,0.11802,0.0931736842105263},
-{3042624,3887842,3887750,0.0243428571428571,1000000},
-{3042625,3887750,3887556,0.0554571428571429,1000000},
-{3042626,3875102,3875100,0.0988941176470588,1000000},
-{3042627,3887592,3887531,0.0229609756097561,1000000},
-{3042630,3850774,3850566,0.0602428571428571,0.0486576923076923},
-{3042631,3850566,3850165,0.1,0.0910714285714286},
-{3042632,3878140,3878360,0.0592285714285714,0.051825},
-{3042647,3899648,3899733,1000000,0.0731625},
-{3042648,3899733,3899819,1000000,0.07845},
-{3042649,3899669,3899757,0.0398470588235294,1000000},
-{3042650,3899757,3899819,0.0283945945945946,1000000},
-{3042654,3853410,3853523,0.0428678571428571,0.0436472727272727},
-{3042655,3853523,3853685,0.0733142857142857,0.0744967741935484},
-{3042656,3852484,3853012,0.110684210526316,1000000},
-{3042657,3853012,3853094,0.0257318181818182,1000000},
-{3042663,3899450,3899282,0.0796153846153846,1000000},
-{3042664,3899282,3899226,0.021825,1000000},
-{3042665,3899447,3899276,1000000,0.0863478260869565},
-{3042666,3899276,3899136,1000000,0.0561428571428571},
-{3042667,3899450,3899279,0.0533513513513513,1000000},
-{3042668,3899282,3899279,1000000,0.0182166666666667},
-{3042669,3899279,3899276,0.0470769230769231,0.034},
-{3042670,3899276,3899263,0.0729555555555556,0.0729555555555556},
-{3042677,3875582,3875549,0.121515789473684,0.112624390243902},
-{3042678,3875380,3875499,0.0639,0.0594418604651163},
-{3042679,3875499,3875582,0.0590368421052632,0.056085},
-{3042684,3872414,3872456,0.046575,1000000},
-{3042685,3872664,3872707,0.08505,1000000},
-{3042688,3872065,3872053,0.0474285714285714,1000000},
-{3042689,3872456,3872510,0.06072,1000000},
-{3042690,3872510,3872569,0.06845,1000000},
-{3042691,3872524,3872623,1000000,0.0935333333333333},
-{3042694,3872006,3872381,1000000,0.0922421052631579},
-{3042695,3897924,3898140,1000000,0.051615},
-{3042696,3880951,3880770,0.0720642857142857,1000000},
-{3042697,3880770,3880536,0.0887333333333333,1000000},
-{3042700,3899698,3899660,1000000,0.0690648648648649},
-{3042701,3899660,3899580,1000000,0.136231578947368},
-{3042702,3899763,3899723,1000000,0.054227027027027},
-{3042703,3899723,3899698,1000000,0.0592421052631579},
-{3042706,3912518,3912673,1000000,0.0255217391304348},
-{3042707,3912749,3912967,1000000,0.0314},
-{3042708,3912967,3913638,1000000,0.104031428571429},
-{3042718,3854745,3854648,0.0218823529411765,0.0206666666666667},
-{3042736,3875508,3875661,0.039,0.1092},
-{3042737,3875661,3877681,0.6648,0.506514285714286},
-{3042738,3875349,3875408,1000000,0.0665192307692308},
-{3042739,3875408,3875580,1000000,0.157835294117647},
-{3042740,3872863,3873916,0.207316363636364,0.316733333333333},
-{3042741,3865102,3865039,0.0186171428571429,0.013575},
-{3042742,3864838,3865075,0.0527236363636364,0.0475377049180328},
-{3042743,3865680,3865656,0.0394301886792453,0.0401884615384615},
-{3042744,3865656,3865102,0.160285714285714,0.148188679245283},
-{3042745,3865526,3868434,0.5184,0.480834782608696},
-{3042746,3874519,3874393,1000000,0.1026},
-{3042747,3874669,3874621,0.0233884615384615,1000000},
-{3042748,3874888,3874800,0.0388254545454545,1000000},
-{3042749,3874800,3874669,0.0687888888888889,1000000},
-{3042750,3873972,3873944,1000000,0.0739066666666667},
-{3042751,3873944,3873988,1000000,0.185088888888889},
-{3042752,3873887,3873729,0.0484578947368421,0.076725},
-{3042753,3873729,3873407,0.0727148936170213,0.0813714285714286},
-{3042754,3873407,3873008,0.0843622641509434,0.089424},
-{3042755,3874275,3873998,1000000,0.14778},
-{3042766,3864480,3864442,0.011175,0.01396875},
-{3042767,3864442,3864362,0.023535,0.0268971428571429},
-{3042802,3865496,3865503,1000000,0.02863125},
-{3042803,3865503,3865518,1000000,0.154976470588235},
-{3042810,3901293,3901385,0.0374630136986301,1000000},
-{3042811,3901385,3901531,0.0544816901408451,1000000},
-{3042812,3900150,3900864,1000000,0.23747619047619},
-{3042813,3901351,3901439,1000000,0.0367114285714286},
-{3042814,3901439,3901585,1000000,0.0581485714285714},
-{3042815,3901503,3901590,0.0882,0.0774439024390244},
-{3042816,3878315,3878177,0.05828,1000000},
-{3042817,3877873,3877789,0.04203,1000000},
-{3042818,3877668,3877344,1000000,0.255266666666667},
-{3042819,3857745,3857764,0.0304,0.0304},
-{3042820,3858996,3858360,0.160884,1000000},
-{3042821,3858360,3858230,0.0366976744186047,1000000},
-{3042822,3855029,3854873,0.0379882352941176,0.0412212765957447},
-{3042823,3855338,3855029,0.0682846153846154,0.0696235294117647},
-{3042824,3856827,3855938,0.176049056603774,0.166617857142857},
-{3042825,3854652,3854641,0.0214325581395349,0.0214325581395349},
-{3042826,3854641,3854609,0.04385,0.0429551020408163},
-{3042836,3901233,3901470,1000000,0.0614},
-{3042837,3901470,3901689,1000000,0.0516905660377358},
-{3042838,3870278,3870130,0.06172,0.0402521739130435},
-{3042839,3870130,3870041,0.061,0.0284666666666667},
-{3042840,3879195,3879355,0.177,1000000},
-{3042841,3879355,3879464,0.11485,1000000},
-{3042846,3880809,3880826,0.0299217391304348,0.0264692307692308},
-{3042847,3902309,3902164,0.0986769230769231,0.0874636363636364},
-{3042848,3902164,3902129,0.0336692307692308,0.0236594594594595},
-{3042849,3902883,3902930,0.0222545454545455,0.0288},
-{3042850,3902930,3902983,0.0291652173913043,0.0353052631578947},
-{3042851,3899872,3899831,0.092505,1000000},
-{3042852,3899831,3899816,0.0332590909090909,1000000},
-{3042853,3900372,3900539,1000000,0.0600315789473684},
-{3042854,3899888,3899858,1000000,0.0492},
-{3042855,3899858,3899813,1000000,0.0693428571428572},
-{3042856,3900030,3900286,0.0634428571428571,1000000},
-{3042857,3900286,3900549,0.070425,1000000},
-{3042858,3899279,3899136,0.0431414634146341,1000000},
-{3042859,3901196,3901250,1000000,0.0858878048780488},
-{3042862,3868288,3868213,1000000,0.01782},
-{3042863,3871317,3871272,0.01236,1000000},
-{3042864,3871272,3870771,0.156068181818182,1000000},
-{3043195,3881829,3881683,0.0932052631578947,1000000},
-{3043196,3881683,3882318,0.209925,1000000},
-{3043197,3878418,3881336,1000000,0.4966},
-{3043198,3881506,3882238,0.1348,1000000},
-{3043199,3878414,3881323,0.523014705882353,1000000},
-{3043200,3881323,3881817,0.0776417910447761,1000000},
-{3043201,3858492,3858450,0.0595963636363636,0.0607},
-{3043205,3903195,3903443,1000000,0.0592354838709677},
-{3043206,3903443,3903853,1000000,0.118170491803279},
-{3043210,3915727,3915764,1000000,0.00875},
-{3043278,3853685,3857169,0.713214084507042,0.6843},
-{3043279,3857169,3857587,0.072346875,0.063427397260274},
-{3043284,3894825,3894868,0.029412,1000000},
-{3043285,3894868,3894912,0.029868,1000000},
-{3043296,3895566,3895724,1000000,0.0536142857142857},
-{3043297,3895724,3895978,1000000,0.105522580645161},
-{3043298,3896005,3895616,1000000,0.287894117647059},
-{3043299,3895616,3895547,1000000,0.0330769230769231},
-{3043336,3895770,3895811,0.032975,1000000},
-{3043341,3895961,3895811,1000000,0.117525},
-{3043342,3895984,3896152,0.12087,1000000},
-{3043343,3895709,3895960,0.135272727272727,1000000},
-{3043344,3895960,3895984,0.0142702702702703,1000000},
-{3043345,3900691,3900814,0.0842947368421053,0.12012},
-{3043346,3901121,3901083,1000000,0.125},
-{3043347,3901083,3901030,1000000,0.138714285714286},
-{3043348,3880601,3880503,0.0301444444444444,1000000},
-{3043349,3880503,3880356,0.04,1000000},
-{3043353,3880977,3881111,1000000,0.0348555555555556},
-{3043354,3881000,3881139,0.0348535714285714,1000000},
-{3043355,3881480,3881402,0.0384857142857143,0.0612272727272727},
-{3043356,3881402,3880911,0.190645714285714,0.20851875},
-{3043357,3878789,3879143,0.122057142857143,1000000},
-{3043358,3879143,3879199,0.0268258064516129,1000000},
-{3043362,3879581,3879561,0.011208,1000000},
-{3043363,3879561,3879540,0.0126,1000000},
-{3043364,3879452,3879507,1000000,0.063912},
-{3043365,3879507,3879566,1000000,0.05786},
-{3043366,3879212,3879284,0.106737931034483,1000000},
-{3043367,3879284,3879346,0.0518086956521739,1000000},
-{3043374,3901030,3901143,1000000,0.1518},
-{3043375,3901143,3901196,1000000,0.0854836363636364},
-{3043376,3900881,3901005,0.253418181818182,0.2613375},
-{3043377,3884150,3884243,1000000,0.0501061224489796},
-{3043378,3884243,3884339,1000000,0.0531191489361702},
-{3043379,3900814,3900862,0.0488571428571429,0.0580754716981132},
-{3043380,3883419,3883585,0.07714,0.105190909090909},
-{3043381,3883585,3883732,0.0743785714285714,0.06942},
-{3043384,3902514,3902558,0.03885,0.0481},
-{3043385,3902558,3902737,0.149493103448276,0.160566666666667},
-{3043386,3882727,3883000,0.1129375,1000000},
-{3043387,3882727,3883029,1000000,0.107514893617021},
-{3043388,3883029,3883067,1000000,0.0132382978723404},
-{3043389,3902737,3902882,0.111267692307692,0.12054},
-{3043390,3902882,3902986,0.078196875,0.0820426229508197},
-{3043397,3903267,3903405,0.05181,0.05181},
-{3043398,3903405,3903710,0.141747540983607,0.139461290322581},
-{3043401,3904172,3904224,0.0227368421052632,0.0235636363636364},
-{3043402,3904224,3904315,0.0336321428571429,0.0348777777777778},
-{3043414,3904935,3905196,0.09717,0.0988169491525424},
-{3043415,3896378,3896559,1000000,0.0884052631578948},
-{3043416,3896559,3896829,1000000,0.14613488372093},
-{3237937,3918946,3919430,0.32504,1000000},
-{3237938,3919137,3919637,1000000,0.298875},
-{3237950,3920010,3920106,0.0622137931034483,0.100233333333333},
-{3237951,3919497,3919921,0.1176,0.112486956521739},
-{3237952,3919921,3920010,0.0429375,0.0381666666666667},
-{3237953,3920106,3919921,1000000,0.0750333333333333},
-{3237954,3920010,3920211,0.0767117647058824,0.08150625},
-{3237955,3920106,3920211,0.0692571428571429,1000000},
-{3237956,3920106,3920364,0.128883870967742,0.121072727272727},
-{3237957,3920364,3920499,0.131625,0.100285714285714},
-{3237958,3920364,3920434,0.0849555555555556,1000000},
-{3237959,3920602,3920364,0.0879942857142857,1000000},
-{3237981,3866769,3866733,0.0583909090909091,0.0583909090909091},
-{3237984,3922038,3921841,0.152222222222222,0.152222222222222},
-{3238645,3881842,3881653,0.1898,1000000},
-{3238646,3881653,3881386,0.28212,1000000},
-{3238678,3873482,3873462,0.0344454545454545,1000000},
-{3238718,3870910,3870973,1000000,1000000},
-{3239077,3875837,3876264,0.13842,0.13842},
-{3239090,3886907,3886885,0.2874,0.2874},
-{3239093,3891272,3891295,0.0298378378378378,0.0306666666666667},
-{3239132,3891160,3891146,0.05144,1000000},
-{3239429,3902199,3902237,0.147111111111111,1000000},
-{3239430,3902237,3902029,1000000,0.1206},
-{3239431,3902641,3902237,1000000,0.26492},
-{3239681,3871406,3871091,0.201545454545455,0.2217},
-{3239682,3871124,3871091,0.0387375,0.0387375},
-{3239683,3871091,3870864,0.0816888888888889,0.0816888888888889},
-{3239685,3858791,3857712,0.443444444444444,0.443444444444444},
-{3239687,3858825,3858968,1000000,1000000},
-{3239688,3858968,3859221,0.1268,0.1268},
-{3239689,3854670,3854250,0.231222222222222,0.231222222222222},
-{3239690,3854250,3853817,0.201644444444444,0.201644444444444},
-{3239691,3854734,3854670,0.0454,0.0454},
-{3239707,3848834,3848365,0.4738,0.4738},
-{3239721,3851556,3852198,0.355622222222222,0.355622222222222},
-{3239722,3852198,3852517,0.125622222222222,0.125622222222222},
-{3239723,3852198,3852317,0.138266666666667,0.138266666666667},
-{3239726,3854867,3854709,0.108025,0.12963},
-{3239727,3855823,3856352,0.3238,0.3238},
-{3239728,3854202,3855366,0.573738461538462,0.573738461538462},
-{3239729,3855366,3855876,0.2614,0.2614},
-{3239730,3854867,3855366,0.567969230769231,1000000},
-{3239731,3855366,3855823,0.343421052631579,1000000},
-{3239742,3857682,3857691,0.0370325581395349,0.0388390243902439},
-{3239743,3857691,3857745,0.0947466666666667,0.099153488372093},
-{3239744,3858683,3858591,0.0518647058823529,0.05878},
-{3239745,3858591,3858361,0.123051428571429,0.153814285714286},
-{3239746,3857691,3857778,0.0318444444444444,0.0318444444444444},
-{3239747,3857778,3858591,0.340311111111111,0.340311111111111},
-{3239782,3850091,3850612,1000000,1000000},
-{3239783,3851186,3851132,1000000,1000000},
-{3239784,3851132,3850663,1000000,1000000},
-{3239788,3851132,3851557,1000000,1000000},
-{3239789,3851557,3851657,1000000,1000000},
-{3239790,3921330,3921155,0.08379,0.0713106382978723},
-{3239791,3921155,3921019,0.0530936170212766,0.0519875},
-{3239792,3921155,3921246,0.199644444444444,0.199644444444444},
-{3239795,3851083,3851031,0.174064864864865,0.149776744186047},
-{3239796,3851031,3851477,0.182751219512195,0.182751219512195},
-{3239797,3850966,3851031,1000000,1000000},
-{3239801,3859594,3860080,1000000,1000000},
-{3239802,3863237,3863022,0.141911111111111,0.141911111111111},
-{3239803,3863022,3862893,1000000,1000000},
-{3239821,3859869,3860019,1000000,1000000},
-{3239822,3860019,3860081,0.0830444444444444,0.0830444444444444},
-{3239829,3859276,3859230,1000000,1000000},
-{3239830,3859251,3859184,0.02768,0.02768},
-{3239831,3859184,3858457,0.21027,0.21027},
-{3239832,3859230,3859184,1000000,1000000},
-{3239833,3849472,3849452,0.224155555555556,0.224155555555556},
-{3239836,3857939,3857119,1000000,1000000},
-{3239837,3857119,3856944,1000000,1000000},
-{3239838,3858673,3858039,1000000,1000000},
-{3239840,3857119,3857919,1000000,1000000},
-{3239841,3857919,3858039,1000000,1000000},
-{3239842,3857939,3857919,1000000,1000000},
-{3239843,3867223,3866808,0.228631578947368,0.188869565217391},
-{3239844,3866808,3866733,0.0343565217391304,0.0303923076923077},
-{3239845,3866966,3866769,1000000,0.870471428571429},
-{3239846,3866808,3866769,0.0637411764705882,0.0637411764705882},
-{3239848,3868287,3868595,0.31116,0.31116},
-{3239851,3852900,3852480,0.0931882352941176,0.0990125},
-{3239855,3854263,3853530,0.254915789473684,0.246274576271186},
-{3239856,3853530,3853469,0.0210954545454545,0.0189428571428571},
-{3239860,3866449,3866798,0.138461538461538,0.138461538461538},
-{3239861,3866798,3867608,0.30228,0.30228},
-{3239862,3866798,3867007,1000000,1000000},
-{3239865,3867854,3867608,1000000,1000000},
-{3239869,3858673,3858803,1000000,1000000},
-{3239878,3859470,3859399,0.0344,0.0344},
-{3239879,3859399,3858862,0.218244444444444,0.218244444444444},
-{3239913,3880554,3880580,0.222471428571429,0.183211764705882},
-{3239914,3880580,3880796,0.17795625,0.138892682926829},
-{3239915,3880580,3881456,1000000,1000000},
-{3239916,3875599,3875553,1000000,0.0605538461538462},
-{3239917,3875553,3875475,1000000,0.128577777777778},
-{3239918,3850353,3850593,0.0930333333333333,0.0985058823529412},
-{3239919,3850593,3850634,0.0191142857142857,0.0202727272727273},
-{3239920,3850593,3850338,1000000,1000000},
-{3239922,3864952,3864829,0.207818181818182,0.0788275862068966},
-{3239923,3864944,3865113,0.186466666666667,1000000},
-{3239924,3865113,3865251,0.138342857142857,0.12105},
-{3239925,3865113,3865115,0.05095,0.05095},
-{3239926,3865115,3864952,0.179353846153846,1000000},
-{3239927,3865232,3865066,0.101746153846154,0.08266875},
-{3239928,3865066,3864952,0.08853,0.0571161290322581},
-{3239929,3865115,3865066,0.129911111111111,1000000},
-{3239937,3865091,3864862,0.262422222222222,0.262422222222222},
-{3239938,3861228,3861756,0.35769,0.35769},
-{3239943,3861228,3861004,0.265246153846154,0.2463},
-{3239944,3861004,3860895,0.106820689655172,0.134686956521739},
-{3239946,3861004,3861083,0.04785,0.04785},
-{3239947,3861083,3861151,0.05475,0.05475},
-{3239948,3861677,3862105,0.227304,0.218561538461538},
-{3239949,3862105,3862025,1000000,1000000},
-{3239950,3862025,3861894,1000000,1000000},
-{3239953,3863165,3863018,0.102666666666667,0.102666666666667},
-{3239979,3864840,3864830,1000000,0.3336},
-{3239980,3864830,3864845,0.0786923076923077,0.066},
-{3239981,3850637,3850627,0.01018125,1000000},
-{3239982,3850627,3850559,0.0394071428571429,1000000},
-{3239983,3850417,3850376,1000000,1000000},
-{3239984,3850311,3850275,0.00841304347826087,0.00758823529411765},
-{3239985,3850275,3850033,0.0730173913043478,0.067176},
-{3239986,3850376,3850275,1000000,1000000},
-{3239987,3864830,3864758,0.367390909090909,0.577328571428571},
-{3239988,3864758,3864479,0.201266666666667,0.201266666666667},
-{3239989,3864758,3864840,1000000,1000000},
-{3239990,3850627,3850540,1000000,1000000},
-{3239991,3850540,3850376,1000000,1000000},
-{3239994,3859674,3860550,0.513955555555556,0.513955555555556},
-{3239995,3851904,3852111,1000000,1000000},
-{3240020,3861036,3861762,0.505257142857143,0.408092307692308},
-{3240021,3861762,3861675,0.20382,0.20382},
-{3240025,3859850,3860298,0.260672727272727,0.220569230769231},
-{3240026,3860592,3860274,1000000,0.40008},
-{3240027,3860274,3859211,1000000,0.481244444444444},
-{3240028,3859085,3859810,0.310022222222222,0.29895},
-{3240029,3859810,3859850,0.021216,0.0171096774193548},
-{3240031,3859870,3859810,0.0902222222222222,0.0902222222222222},
-{3240033,3859870,3859432,0.197111111111111,0.197111111111111},
-{3240034,3859870,3860224,0.168822222222222,0.168822222222222},
-{3240044,3860032,3859579,0.283044444444444,0.283044444444444},
-{3240045,3859579,3859534,0.0229111111111111,0.0229111111111111},
-{3240084,3858826,3858496,0.164424,0.1612},
-{3240085,3858578,3858496,0.0963428571428571,0.103753846153846},
-{3240088,3879603,3879656,1000000,0.0241818181818182},
-{3240089,3879656,3879923,1000000,0.132794117647059},
-{3240090,3879622,3879982,0.112866666666667,1000000},
-{3240094,3871651,3871763,0.309355555555556,0.309355555555556},
-{3240100,3877615,3877773,0.0699230769230769,0.0699230769230769},
-{3240101,3877773,3878029,0.099888,0.0891857142857143},
-{3240102,3878029,3878193,0.0884,0.0663},
-{3240103,3877773,3878029,1.40406,1.40406},
-{3240104,3849788,3849555,0.173660869565217,0.147933333333333},
-{3240105,3849555,3849644,0.1914,0.1914},
-{3240106,3849644,3849670,0.0592222222222222,0.0592222222222222},
-{3240107,3849858,3849948,0.113006896551724,0.1024125},
-{3240108,3849948,3849984,0.03988,0.0362545454545455},
-{3240109,3849644,3849948,0.151844444444444,0.151844444444444},
-{3240110,3853622,3853229,1000000,0.27195},
-{3240111,3853229,3853171,1000000,0.0378},
-{3240112,3853229,3852590,0.309377777777778,0.309377777777778},
-{3240113,3877322,3877382,1000000,0.06516},
-{3240114,3877382,3877859,0.224771428571429,0.14750625},
-{3240115,3877382,3877248,0.188955555555556,0.188955555555556},
-{3240119,3867716,3868027,1000000,0.114822222222222},
-{3240120,3868027,3868148,1000000,0.03902},
-{3240121,3867835,3868176,1000000,0.38878064516129},
-{3240122,3868132,3867869,1000000,0.297163636363636},
-{3240123,3868122,3867683,1000000,0.170304},
-{3240124,3868148,3868176,1000000,0.01},
-{3240125,3868176,3868212,1000000,0.021216},
-{3240126,3868212,3868214,1000000,0.027768},
-{3240127,3868132,3868122,1000000,0.01605},
-{3240128,3868122,3868148,1000000,0.03096},
-{3240156,3866094,3866015,0.02805,0.031416},
-{3240157,3866015,3864781,0.351116666666667,0.341627027027027},
-{3240158,3866015,3865981,0.29964,0.29964},
-{3240193,3851485,3851468,0.00297,0.00321081081081081},
-{3240194,3851468,3850360,0.429193548387097,0.492777777777778},
-{3240195,3851468,3851535,1000000,1000000},
-{3240196,3851535,3851703,1000000,1000000},
-{3240197,3877322,3878101,0.176165217391304,1000000},
-{3240198,3878101,3878350,0.0479898305084746,1000000},
-{3240199,3853384,3853439,0.0280125,0.0344769230769231},
-{3240200,3853439,3854238,0.4165,0.4685625},
-{3240201,3854053,3853439,0.50592,0.50592},
-{3240204,3863058,3863078,0.0655125,0.0748714285714286},
-{3240205,3863058,3863196,1000000,0.0515027027027027},
-{3240206,3862999,3862832,0.058152,0.07269},
-{3240207,3863058,3863037,0.04125,1000000},
-{3240213,3921161,3921186,1000000,0.0230857142857143},
-{3240214,3921186,3921425,1000000,0.248177777777778},
-{3240215,3921425,3921407,1000000,0.0224347826086957},
-{3240216,3921186,3921425,1000000,0.37476},
-{3240232,3858496,3858096,0.160064150943396,0.163142307692308},
-{3240233,3858096,3857762,0.232540909090909,0.227373333333333},
-{3240234,3858202,3858096,0.0475555555555556,0.0475555555555556},
-{3240235,3852579,3852692,0.122533333333333,0.122533333333333},
-{3240236,3852692,3852770,1000000,1000000},
-{3240241,3871280,3871361,0.032625,0.0267692307692308},
-{3240242,3871248,3871361,0.195428571428571,1000000},
-{3240247,3871263,3871248,0.00998709677419355,0.00814736842105263},
-{3240248,3871361,3871488,0.0481588235294118,0.0380790697674419},
-{3240249,3871263,3871488,0.1242,1000000},
-{3240259,3851935,3852258,0.141208695652174,0.154657142857143},
-{3240260,3852258,3852435,0.0911428571428571,0.106333333333333},
-{3240261,3851907,3852258,0.464630769230769,0.464630769230769},
-{3240262,3872321,3872370,0.0207310344827586,0.0146634146341463},
-{3240263,3872990,3872806,0.52386,0.52386},
-{3240264,3872354,3872694,0.32244,0.32244},
-{3240265,3872694,3872806,0.1122,0.1122},
-{3240266,3872354,3872925,0.77298,1000000},
-{3240267,3872925,3872990,0.21,0.21},
-{3240268,3872694,3872925,0.6171,0.6171},
-{3240269,3872806,3872983,0.19998,0.19998},
-{3240270,3872983,3873516,0.61374,0.61374},
-{3240271,3872983,3872847,0.38574,0.38574},
-{3240272,3873928,3873667,0.31596,0.31596},
-{3240273,3873516,3873667,0.6435,0.6435},
-{3240274,3873667,3873928,0.57054,0.57054},
-{3240275,3873696,3873897,0.47844,0.47844},
-{3240276,3873897,3873928,0.8295,0.8295},
-{3240277,3873928,3873786,0.67908,0.67908},
-{3240278,3873786,3873696,0.3201,0.3201},
-{3240279,3873516,3873786,0.29382,0.29382},
-{3240280,3873786,3873897,0.15096,0.15096},
-{3240281,3873043,3872990,0.06708,0.06708},
-{3240282,3873155,3872103,0.3298125,0.5277},
-{3240283,3873043,3873155,1000000,0.30096},
-{3240284,3873667,3873100,0.59934,0.59934},
-{3240285,3873100,3873043,0.05778,0.05778},
-{3240286,3873251,3873192,0.0381666666666667,0.028625},
-{3240287,3873192,3873155,0.0178,0.0138444444444444},
-{3240288,3873100,3873192,0.29922,1000000},
-{3240289,3872847,3873450,0.67434,0.67434},
-{3240290,3873450,3873696,0.27438,0.27438},
-{3240291,3873516,3873450,0.32964,0.32964},
-{3240292,3872523,3872354,0.55212,0.55212},
-{3240293,3872562,3872847,0.23532,0.23532},
-{3240294,3872523,3872562,0.07872,0.07872},
-{3240297,3851074,3851035,0.0288,0.0368},
-{3240298,3851035,3850541,0.325275,0.354845454545455},
-{3240299,3851035,3851278,0.19341,0.19341},
-{3240300,3850541,3850926,0.218565517241379,0.198075},
-{3240301,3851278,3850926,1000000,0.315088888888889},
-{3240308,3863530,3863343,1000000,0.098341935483871},
-{3240309,3863343,3863348,1000000,0.0298114285714286},
-{3240310,3863116,3862158,1000000,0.404014285714286},
-{3240311,3862835,3862721,1000000,1000000},
-{3240312,3862419,3862275,0.108094736842105,0.0662516129032258},
-{3240313,3862275,3862217,0.0294571428571429,0.0187454545454545},
-{3240314,3862554,3862275,1000000,1000000},
-{3240315,3863559,3863383,0.0629647058823529,0.0611657142857143},
-{3240316,3863383,3863082,0.117466666666667,0.114291891891892},
-{3240317,3860900,3860879,0.00774146341463415,0.00881666666666667},
-{3240318,3860879,3860549,0.221682352941176,0.2284},
-{3240319,3860706,3860879,1000000,1000000},
-{3240320,3861288,3861224,0.03105,0.03493125},
-{3240321,3861224,3861115,0.0555833333333333,0.06253125},
-{3240322,3861224,3860800,0.239177777777778,0.239177777777778},
-{3240323,3856998,3856268,1000000,1000000},
-{3240324,3856268,3856251,1000000,1000000},
-{3240325,3856041,3855323,0.466666666666667,0.4},
-{3240326,3855323,3854316,0.90532,0.754433333333333},
-{3240327,3855323,3855231,0.1148,0.1148},
-{3240328,3854504,3854669,0.126733333333333,0.126733333333333},
-{3240329,3873790,3873769,0.016932,0.0192409090909091},
-{3240330,3873769,3873721,0.0362716981132075,0.0457714285714286},
-{3240331,3873693,3873790,0.06924,0.0577},
-{3240332,3873769,3873693,1000000,0.0459636363636364},
-{3240333,3874126,3873818,0.292243636363636,0.26789},
-{3240334,3873818,3873790,0.0249875,0.0255191489361702},
-{3240335,3873693,3873818,1000000,0.040427027027027},
-{3240336,3858410,3858091,0.131688888888889,0.131688888888889},
-{3240337,3858037,3858011,0.0334571428571429,1000000},
-{3240338,3858315,3858251,1000000,0.126189473684211},
-{3240339,3858750,3858534,0.177575,0.21309},
-{3240340,3858534,3858524,0.0454,0.05675},
-{3240341,3858524,3858510,0.0521,0.0822631578947368},
-{3240342,3857593,3857537,1000000,1000000},
-{3240343,3858251,3858197,1000000,0.064448275862069},
-{3240344,3858197,3858091,1000000,0.141263157894737},
-{3240345,3858524,3858431,0.112707692307692,1000000},
-{3240346,3858431,3858197,1000000,0.145930434782609},
-{3240347,3858251,3858467,1000000,0.213323076923077},
-{3240348,3858467,3858534,0.0534,1000000},
-{3240349,3858431,3858467,0.03645,0.03645},
-{3240350,3858315,3858211,0.118052459016393,1000000},
-{3240351,3858211,3858147,0.0611225806451613,1000000},
-{3240352,3858718,3858697,0.0149428571428571,0.0142636363636364},
-{3240353,3858697,3858611,0.119874193548387,0.114341538461538},
-{3240354,3861711,3861630,1000000,0.0578769230769231},
-{3240355,3862127,3862054,0.0496181818181818,0.0454833333333333},
-{3240356,3861630,3861783,0.0734222222222222,1000000},
-{3240357,3861783,3862054,0.198311111111111,1000000},
-{3240358,3862054,3861859,0.132783333333333,0.132783333333333},
-{3240359,3861859,3861687,0.155525,0.11664375},
-{3240360,3861783,3861859,1000000,0.0518888888888889},
-{3240361,3861680,3861149,0.442666666666667,0.442666666666667},
-{3240362,3861149,3860993,0.120096,0.120096},
-{3240371,3870844,3870645,0.710470588235294,1000000},
-{3240372,3870645,3869900,1.07155714285714,1000000},
-{3240382,3851741,3852415,1000000,1000000},
-{3240418,3895892,3895975,1000000,0.0371769230769231},
-{3240419,3895975,3896096,1000000,0.0751034482758621},
-{3240426,3895876,3895811,1000000,0.131223529411765},
-{3240439,3861756,3861883,0.09447,0.09447},
-{3240440,3861883,3861756,0.14133,0.14133},
-{3240449,3865313,3865330,0.1118,1000000},
-{3240450,3865330,3865341,0.07205625,1000000},
-{3240451,3899683,3899864,0.118889361702128,1000000},
-{3240452,3899864,3900025,0.0853368421052632,1000000},
-{3240458,3899557,3899724,1000000,0.116629787234043},
-{3240468,3874181,3874164,0.0423857142857143,1000000},
-{3240469,3874164,3874131,0.106,1000000},
-{3240478,3898156,3898206,0.0412819672131148,1000000},
-{3240479,3898206,3898260,0.0470716981132075,1000000},
-{3240485,3898260,3898176,0.05518,1000000},
-{3240486,3898176,3898054,0.0848571428571429,1000000},
-{3240487,3866361,3866393,1000000,0.00927428571428571},
-{3240488,3866393,3866433,1000000,0.0166},
-{3240496,3898640,3898560,0.0819545454545455,0.0419302325581395},
-{3240497,3898560,3898482,0.1114125,0.0524294117647059},
-{3240541,3889066,3889020,1000000,0.036312},
-{3240542,3889020,3888806,1000000,0.13460625},
-{3240543,3889609,3889715,0.0267384615384615,1000000},
-{3240544,3889715,3889751,0.009675,1000000},
-{3240545,3889979,3890169,0.0621666666666667,1000000},
-{3240548,3895308,3895096,0.082665,1000000},
-{3240549,3895096,3894890,0.0997333333333333,1000000},
-{3240557,3877257,3876488,0.387095454545455,0.3548375},
-{3240561,3900248,3900319,0.0270162162162162,1000000},
-{3240562,3900319,3900391,0.0440516129032258,1000000},
-{3240575,3850015,3850459,0.0863076923076923,1000000},
-{3240576,3850459,3850712,0.0526338461538462,1000000},
-{3240577,3851040,3851047,0.00696,0.007656},
-{3240578,3850921,3850907,0.0638290909090909,0.0626892857142857},
-{3240579,3850907,3850898,0.0407263157894737,0.0393457627118644},
-{3240582,3849499,3848471,0.174534782608696,1000000},
-{3240616,3859469,3859926,0.0767014925373134,0.0790615384615385},
-{3240617,3859926,3860588,0.111980281690141,0.116920588235294},
-{3240618,3860588,3861213,0.104825,0.109382608695652},
-{3240957,3872560,3872613,1000000,0.00924255319148936},
-{3240958,3872019,3872576,0.13161,1000000},
-{3240959,3872576,3872618,0.00672,1000000},
-{3240965,3868214,3868192,1000000,0.0132461538461538},
-{3240966,3868192,3868132,1000000,0.0287739130434783},
-{3240967,3874228,3874152,0.0402571428571429,0.0301928571428571},
-{3240968,3855889,3855823,0.05496,0.05496},
-{3240989,3854734,3854655,1000000,1000000},
-{3240990,3854730,3854732,0.0531333333333333,0.0531333333333333},
-{3240991,3854732,3854734,0.0485076923076923,0.0485076923076923},
-{3240993,3860759,3861082,0.21375,0.244285714285714},
-{3240994,3861082,3861244,0.35131875,0.387662068965517},
-{3240995,3898539,3898631,1000000,0.0583945945945946},
-{3240998,3876352,3876478,1000000,0.0781909090909091},
-{3240999,3876478,3876488,0.00958536585365854,0.00836170212765957},
-{3241180,3898026,3898348,1000000,1000000},
-{3241181,3898026,3898016,0.0156882352941176,0.01524},
-{3241182,3898016,3897916,0.119914285714286,0.108309677419355},
-{3241183,3897916,3897897,0.08716,0.04085625},
-{3241184,3897897,3897842,1000000,0.0906},
-{3241185,3898016,3898023,1000000,0.48018},
-{3241186,3898023,3897897,1000000,0.11754},
-{3241187,3898023,3898342,0.31512,0.31512},
-{3241202,3900539,3900530,1000000,1000000},
-{3241205,3901126,3900940,0.439422222222222,0.439422222222222},
-{3241207,3892054,3892117,0.0275866666666667,0.0326684210526316},
-{3241208,3890896,3891214,0.509953846153846,0.189411428571429},
-{3241209,3891214,3891497,1000000,0.21475},
-{3241210,3891214,3891018,0.26185,1000000},
-{3241254,3901044,3900908,1000000,0.0487787234042553},
-{3241255,3900908,3900664,1000000,0.0868897959183673},
-{3241256,3901127,3900983,0.057306976744186,1000000},
-{3241257,3900983,3900739,0.0880595744680851,1000000},
-{3241258,3900908,3900983,0.0942,0.0942},
-{3241284,3880122,3880273,1000000,1000000},
-{3241285,3880273,3879621,1000000,1000000},
-{3241293,3890134,3890336,0.0530042553191489,0.0593142857142857},
-{3241294,3890336,3890481,0.0435,0.0424883720930233},
-{3241295,3890129,3890335,0.149052631578947,0.104888888888889},
-{3241296,3890335,3891566,0.518361290322581,0.595155555555556},
-{3241297,3890336,3890335,0.02941875,0.037656},
-{3241301,3882748,3882537,0.0773066666666667,0.0756260869565217},
-{3241302,3883209,3882665,0.328444444444444,0.328444444444444},
-{3241303,3882665,3882443,0.132822222222222,0.132822222222222},
-{3241304,3882748,3882665,0.0506666666666667,0.0506666666666667},
-{3241388,3895234,3895356,0.0950228571428571,0.127915384615385},
-{3241389,3895356,3895361,1000000,0.0554181818181818},
-{3241390,3895361,3895356,1000000,0.0530608695652174},
-{3241462,3874311,3874500,1000000,0.0631783783783784},
-{3241463,3874500,3875675,1000000,0.3193375},
-{3241482,3903508,3902320,0.294982978723404,0.308093333333333},
-{3241483,3902320,3901384,0.184915789473684,0.184915789473684},
-{3241495,3903508,3903287,0.252853846153846,0.469585714285714},
-{3241496,3903287,3902480,0.323612903225806,0.3344},
-{3241532,3858619,3858733,1000000,1000000},
-{3241543,3876713,3876779,0.0347478260869565,0.04995},
-{3241544,3877381,3876774,0.233386046511628,0.244770731707317},
-{3241545,3876774,3876713,0.0214975609756098,0.02754375},
-{3241546,3876779,3876774,0.0472571428571429,1000000},
-{3241548,3914399,3914994,1000000,0.150452830188679},
-{3241549,3914994,3915224,1000000,0.079152},
-{3241554,3916494,3916218,0.17025,0.194571428571429},
-{3241555,3916218,3915721,0.296163636363636,0.264145945945946},
-{3241556,3914994,3916218,0.72262,0.72262},
-{3241564,3877737,3877723,0.00983076923076923,0.0100235294117647},
-{3241565,3877723,3877381,0.170916,0.1780375},
-{3241573,3877874,3877844,0.0263222222222222,0.0278705882352941},
-{3241574,3877844,3877737,0.0882,0.0916588235294118},
-{3241575,3877737,3877874,1000000,0.852923076923077},
-{3241588,3857953,3857749,0.0766363636363636,0.0766363636363636},
-{3241589,3857749,3857114,0.297085714285714,0.297085714285714},
-{3241590,3857311,3857309,0.103133333333333,0.126572727272727},
-{3241591,3857309,3857052,0.351365217391304,0.351365217391304},
-{3241592,3857749,3857533,0.0872222222222222,0.0872222222222222},
-{3241593,3857533,3857309,1000000,1000000},
-{3241594,3857953,3858022,1000000,1000000},
-{3241595,3858022,3858235,0.1378,0.1378},
-{3241606,3879752,3879898,0.0827777777777778,0.0827777777777778},
-{3241607,3859213,3859265,0.027705,0.0307833333333333},
-{3241608,3859265,3859316,0.0237076923076923,0.0264171428571429},
-{3241609,3859316,3859543,0.0783891891891892,0.0805666666666667},
-{3241610,3859543,3859655,0.0391875,0.0338918918918919},
-{3241611,3859265,3859543,0.147244444444444,1000000},
-{3241612,3916346,3916420,0.0254341463414634,0.0359586206896552},
-{3241613,3916420,3917167,0.255160975609756,0.4359},
-{3241627,3880331,3880194,0.0711183673469388,0.0968},
-{3241628,3880194,3880076,0.071028,0.11098125},
-{3241629,3880488,3880331,0.0915658536585366,0.0816130434782609},
-{3241632,3879504,3879778,0.2546,0.2546},
-{3241633,3880109,3879778,0.134882926829268,1000000},
-{3241634,3879859,3879504,1000000,0.169127272727273},
-{3241635,3880109,3879956,0.175225,0.175225},
-{3241636,3879956,3879859,0.126190909090909,0.126190909090909},
-{3241637,3880488,3880341,0.08745,1000000},
-{3241638,3880341,3880109,0.09444,1000000},
-{3241639,3879956,3880079,0.0768,0.0768},
-{3241640,3880079,3880341,0.50142,0.50142},
-{3241641,3880194,3879975,1000000,0.269215384615385},
-{3241642,3879975,3879859,1000000,0.0625935483870968},
-{3241643,3880079,3879975,0.1681125,0.1681125},
-{3241644,3902402,3902279,1000000,1000000},
-{3241645,3883302,3884205,0.601688888888889,0.601688888888889},
-{3241688,3879778,3879439,0.1596,1000000},
-{3241746,3881996,3881805,0.155347826086957,0.09925},
-{3241747,3881805,3881659,0.119647058823529,0.08136},
-{3241749,3881540,3881605,0.0450947368421053,0.04284},
-{3241750,3881605,3881659,0.0428857142857143,0.0562875},
-{3241751,3881805,3881605,0.19525,1000000},
-{3241775,3883052,3883300,0.38136,0.38136},
-{3241776,3883315,3882977,0.134953846153846,0.187971428571429},
-{3241777,3882977,3882748,0.0902,0.0966428571428572},
-{3241778,3883052,3882977,0.1293,0.1293},
-{3241779,3882612,3882537,0.11256,0.11256},
-{3241780,3881942,3882056,0.2088,0.2088},
-{3241781,3881996,3882056,0.12354,0.12354},
-{3241786,3882160,3881954,0.191028571428571,0.211136842105263},
-{3241788,3882056,3882154,0.21564,0.21564},
-{3241789,3882154,3882612,0.80166,0.80166},
-{3241836,3922650,3922707,0.0492666666666667,0.0492666666666667},
-{3241846,3922239,3921983,0.194936842105263,0.18519},
-{3241847,3922239,3922326,0.0691111111111111,0.0691111111111111},
-{3241856,3921504,3921697,1000000,1000000},
-{3241857,3921697,3921983,1000000,1000000},
-{3241858,3921983,3922033,0.0324230769230769,0.0383181818181818},
-{3241864,3883058,3882206,0.400625,0.400625},
-{3241865,3882206,3882119,0.0394269230769231,0.0372763636363636},
-{3241866,3921938,3922046,0.158914285714286,0.171138461538462},
-{3241867,3922046,3921787,0.336046153846154,0.43686},
-{3241868,3922046,3922130,0.0584888888888889,0.0584888888888889},
-{3241871,3882119,3882343,1000000,0.141775},
-{3241872,3882343,3882443,1000000,0.05322},
-{3241873,3882206,3882343,0.180577777777778,1000000},
-{3241874,3922033,3922227,0.336911111111111,0.336911111111111},
-{3241875,3922227,3922302,1000000,1000000},
-{3241876,3889225,3889711,0.294272727272727,0.294272727272727},
-{3241877,3922302,3922395,1000000,1000000},
-{3241878,3922395,3922513,1000000,1000000},
-{3241879,3922329,3922395,1000000,1000000},
-{3241881,3888770,3888502,1000000,0.129422222222222},
-{3241882,3888850,3888908,1000000,0.141992307692308},
-{3241883,3888908,3888770,1000000,0.0595161290322581},
-{3241890,3890065,3890183,1000000,1000000},
-{3241891,3890183,3891335,1000000,1000000},
-{3241892,3922841,3922878,0.0281555555555556,0.0281555555555556},
-{3241893,3922878,3922918,0.0299777777777778,0.0299777777777778},
-{3241894,3922878,3922806,0.128911111111111,0.128911111111111},
-{3241895,3922806,3922918,0.101911111111111,0.101911111111111},
-{3241896,3922841,3922751,0.0673111111111111,0.0673111111111111},
-{3241897,3922751,3922611,1000000,1000000},
-{3241898,3923041,3922974,0.0597142857142857,0.057},
-{3241899,3922974,3922737,0.1912,0.1912},
-{3241900,3922737,3922974,0.193133333333333,0.193133333333333},
-{3241901,3922737,3922570,0.134844444444444,0.134844444444444},
-{3241915,3923243,3923178,0.0535333333333333,0.0535333333333333},
-{3241916,3923178,3923071,0.100711111111111,0.100711111111111},
-{3241917,3923071,3922862,1000000,1000000},
-{3241918,3923178,3923375,0.177266666666667,0.177266666666667},
-{3241919,3923375,3923515,1000000,1000000},
-{3241923,3882139,3878649,1000000,1000000},
-{3241924,3922732,3922831,0.0947111111111111,0.0947111111111111},
-{3241925,3922732,3922831,0.182844444444444,0.182844444444444},
-{3241926,3922831,3922882,0.0406222222222222,0.0406222222222222},
-{3241927,3922882,3923123,0.205666666666667,0.205666666666667},
-{3241928,3923002,3923102,0.0515846153846154,0.050295},
-{3241929,3923102,3923123,0.0127538461538462,0.0121317073170732},
-{3241930,3922882,3923102,0.571866666666667,0.571866666666667},
-{3241931,3883124,3883327,0.093495652173913,0.0896},
-{3241932,3883327,3883480,0.063816,0.0569785714285714},
-{3241933,3881869,3881997,0.07899,0.063192},
-{3241934,3881997,3882066,0.0598941176470588,0.0442695652173913},
-{3241937,3922505,3922377,0.0826444444444445,0.0826444444444445},
-{3241938,3922809,3923002,0.161155555555556,0.161155555555556},
-{3241939,3922505,3922742,0.172866666666667,0.172866666666667},
-{3241940,3922742,3922809,0.191475,0.191475},
-{3241941,3922377,3922643,0.177866666666667,0.177866666666667},
-{3241942,3922643,3922731,0.0751777777777778,0.0751777777777778},
-{3241943,3922742,3922643,0.0784,0.0784},
-{3241944,3885132,3885078,0.265,0.240348837209302},
-{3241945,3885078,3885073,0.00967692307692308,0.0102},
-{3241947,3883917,3884579,1000000,1000000},
-{3241948,3884585,3884579,0.0227333333333333,0.0227333333333333},
-{3241949,3922244,3922556,0.168989189189189,0.156315},
-{3241975,3890902,3891400,0.358672727272727,0.358672727272727},
-{3241976,3891400,3891335,1000000,1000000},
-{3242033,3890844,3891217,0.1386,0.1386},
-{3242034,3891217,3891457,1000000,1000000},
-{3242043,3920997,3921200,0.263711111111111,0.263711111111111},
-{3242044,3921200,3921311,0.085608,0.085608},
-{3242045,3920997,3921293,0.194,0.194},
-{3242046,3921293,3921200,0.0578222222222222,0.0578222222222222},
-{3242049,3885816,3885796,0.0730888888888889,0.0598},
-{3242050,3885796,3885787,0.0304444444444444,0.0293571428571429},
-{3242051,3885553,3885731,0.0878,0.0711891891891892},
-{3242052,3885731,3885787,0.0252774193548387,0.0230470588235294},
-{3242053,3885796,3885731,0.02736,1000000},
-{3242059,3921311,3921224,0.057264,0.0795333333333333},
-{3242060,3921224,3921111,0.0847043478260869,0.102536842105263},
-{3242061,3921284,3921224,0.07768,0.07768},
-{3242062,3921284,3921364,0.1674,0.1674},
-{3242063,3921364,3921291,0.0510666666666667,0.0510666666666667},
-{3242064,3921364,3921405,0.0321333333333333,0.0321333333333333},
-{3242065,3921311,3921356,0.0399555555555556,0.0399555555555556},
-{3242066,3921356,3921284,0.0523111111111111,0.0523111111111111},
-{3242073,3921059,3921111,0.05736,0.0318666666666667},
-{3242085,3921059,3921180,1000000,1000000},
-{3242086,3921180,3921194,1000000,1000000},
-{3242095,3859258,3859179,1000000,1000000},
-{3242096,3859179,3858773,0.218111111111111,0.218111111111111},
-{3242103,3917234,3917628,1000000,0.23976},
-{3242104,3920842,3920901,0.05493,0.0646235294117647},
-{3242105,3920901,3920755,0.136371428571429,0.168458823529412},
-{3242106,3917310,3917379,0.04265,1000000},
-{3242107,3920901,3921402,1000000,1000000},
-{3242108,3921402,3921678,1000000,1000000},
-{3242109,3921291,3921402,1000000,1000000},
-{3242110,3921402,3921763,1000000,1000000},
-{3242114,3886042,3886037,0.0126558139534884,0.0129571428571429},
-{3242115,3886037,3885971,0.04206,0.0647076923076923},
-{3242116,3921975,3921846,0.103377777777778,0.103377777777778},
-{3242117,3921980,3922168,0.105666666666667,0.105666666666667},
-{3242125,3885971,3885601,0.251645454545455,0.3460125},
-{3242126,3885601,3885546,0.303521739130435,0.317318181818182},
-{3242127,3886037,3886021,0.0634133333333333,0.0663627906976744},
-{3242128,3886021,3885978,0.19886511627907,0.190026666666667},
-{3242129,3885601,3886021,0.300557142857143,1000000},
-{3242136,3857094,3857327,1000000,0.101110344827586},
-{3242137,3857116,3857327,0.160452631578947,1000000},
-{3242138,3857094,3857116,0.0348,0.0348},
-{3242151,3898941,3899354,0.213364285714286,0.19914},
-{3242152,3899354,3899466,0.0654444444444445,0.0654444444444445},
-{3242153,3899493,3899472,0.111517647058824,0.101560714285714},
-{3242154,3899472,3899466,0.04365,0.0398210526315789},
-{3242155,3899354,3899472,0.0983333333333333,0.0885},
-{3242159,3921424,3921146,0.186155555555556,0.186155555555556},
-{3242160,3921559,3921597,0.0255333333333333,0.0265153846153846},
-{3242161,3921597,3921424,0.2146,0.2146},
-{3242162,3921424,3921597,0.0995333333333333,0.0995333333333333},
-{3242163,3921597,3921789,0.125088888888889,0.125088888888889},
-{3242165,3921875,3922258,0.175006451612903,0.187075862068966},
-{3242166,3922258,3922392,0.0510285714285714,0.0465913043478261},
-{3242167,3921642,3922003,1000000,0.2386},
-{3242168,3922003,3922258,1000000,0.1656},
-{3242169,3922003,3922146,0.0936666666666667,0.0936666666666667},
-{3242176,3870701,3870622,1000000,0.19968},
-{3242177,3870622,3870451,0.162023076923077,0.162023076923077},
-{3242178,3869939,3869995,0.0993555555555556,0.0993555555555556},
-{3242179,3869995,3869823,0.139066666666667,0.139066666666667},
-{3242180,3869995,3870171,0.0781111111111111,0.0781111111111111},
-{3242181,3919012,3919219,0.0977560975609756,0.102769230769231},
-{3242182,3919219,3919281,0.0308057142857143,0.0326727272727273},
-{3242183,3922650,3922371,0.207860869565217,0.207860869565217},
-{3242184,3919281,3919236,0.0389739130434783,0.0689538461538461},
-{3242185,3919236,3918872,0.214508108108108,0.256025806451613},
-{3242186,3922611,3922547,1000000,1000000},
-{3242187,3922547,3922371,0.143488888888889,0.143488888888889},
-{3242188,3922371,3922455,0.194222222222222,0.194222222222222},
-{3242189,3922455,3922513,1000000,1000000},
-{3242190,3922547,3922455,0.0625333333333333,0.0625333333333333},
-{3242191,3899220,3899069,0.104966666666667,0.107965714285714},
-{3242192,3898770,3898995,0.102383333333333,0.11518125},
-{3242193,3899069,3898995,0.0317189189189189,1000000},
-{3242194,3899029,3898726,0.183742105263158,0.183742105263158},
-{3242195,3898995,3899029,0.039,1000000},
-{3242196,3899029,3899069,0.0298928571428571,1000000},
-{3242200,3920606,3920914,0.325766666666667,0.308621052631579},
-{3242201,3920914,3921059,0.15264,0.0880615384615385},
-{3242202,3920864,3920914,0.08304,0.08304},
-{3242203,3920864,3920814,0.09426,0.09426},
-{3242204,3920605,3920864,0.4182,0.4182},
-{3242205,3920605,3920542,0.13446,0.13446},
-{3242206,3920814,3920658,0.4686,0.4686},
-{3242207,3920658,3920605,0.11334,0.11334},
-{3242208,3920542,3920603,0.10656,0.10656},
-{3242209,3920658,3920603,0.1173,0.1173},
-{3242210,3920603,3920473,0.25464,0.25464},
-{3242211,3920473,3920542,0.34752,0.34752},
-{3242212,3921119,3921362,0.1025,0.0838636363636364},
-{3242213,3921362,3921539,0.0577736842105263,0.0562923076923077},
-{3242217,3896505,3896952,0.270192,0.28145},
-{3242218,3896952,3897055,0.0645428571428572,0.0645428571428572},
-{3242219,3897055,3897101,0.0332423076923077,0.0314290909090909},
-{3242220,3897101,3897103,0.00204230769230769,0.00196666666666667},
-{3242221,3896952,3897101,0.14468,0.14468},
-{3242238,3884687,3884231,1000000,0.3886875},
-{3242239,3884231,3884208,1000000,0.0338285714285714},
-{3242240,3884628,3884587,0.2343,0.2343},
-{3242241,3884231,3884449,0.8316,0.8316},
-{3242247,3920606,3920784,0.078446511627907,0.0822731707317073},
-{3242248,3920784,3920983,0.102920930232558,0.100581818181818},
-{3242249,3919445,3919211,0.4299,0.4299},
-{3242250,3919721,3919445,1.35816,1.35816},
-{3242251,3919445,3919721,0.81012,0.81012},
-{3242252,3920784,3920705,0.11382,0.11382},
-{3242253,3920705,3920128,2.08032,2.08032},
-{3242254,3920128,3920705,2.01936,2.01936},
-{3242255,3920413,3920606,0.096153488372093,0.133374193548387},
-{3242256,3920128,3920089,0.16704,0.16704},
-{3242257,3920413,3920089,0.45036,0.45036},
-{3242258,3920089,3919911,0.30192,0.30192},
-{3242259,3919911,3919319,0.86328,0.86328},
-{3242260,3885020,3885087,0.319278260869565,0.319278260869565},
-{3242261,3885087,3885143,0.4857,0.4857},
-{3242262,3919911,3919843,0.27312,0.27312},
-{3242263,3919843,3919720,1.31424,1.31424},
-{3242264,3919720,3919440,0.78636,0.78636},
-{3242265,3919843,3919720,0.4656,0.4656},
-{3242266,3920089,3919938,0.7134,0.7134},
-{3242267,3919938,3919782,0.501,0.501},
-{3242268,3919938,3919782,1.34916,1.34916},
-{3242269,3919782,3919755,0.11184,0.11184},
-{3242270,3919755,3919721,0.13536,0.13536},
-{3242271,3920053,3920413,0.160275,0.156365853658537},
-{3242273,3919211,3919695,0.164657142857143,0.17289},
-{3242274,3919755,3920029,1000000,0.45696},
-{3242275,3920029,3920053,1000000,0.0150692307692308},
-{3242283,3881799,3878878,1000000,1000000},
-{3242286,3878878,3878855,1000000,1000000},
-{3242287,3878855,3880429,1000000,1000000},
-{3242288,3880408,3880839,1000000,1000000},
-{3242289,3880429,3880839,1000000,1000000},
-{3242301,3889019,3889088,0.40026,0.40026},
-{3242302,3885834,3887715,1.03494,1.03494},
-{3242303,3887715,3889019,0.63141,0.63141},
-{3242304,3887351,3887340,0.19704,0.19704},
-{3242306,3887351,3889654,1.20468,1.20468},
-{3242309,3903138,3903559,1000000,1000000},
-{3242310,3903559,3903036,1000000,1000000},
-{3242318,3913400,3913589,0.121533333333333,0.10938},
-{3242319,3913589,3913602,0.00619090909090909,0.00681},
-{3242324,3913591,3913625,0.0156705882352941,0.0111},
-{3242325,3913625,3914075,0.322833333333333,0.242125},
-{3242328,3923213,3923239,0.0227333333333333,0.0227333333333333},
-{3242329,3923239,3923686,1000000,1000000},
-{3242333,3921362,3921441,0.144415384615385,0.234675},
-{3242337,3921578,3921964,0.328088888888889,0.328088888888889},
-{3242338,3921441,3921448,0.01848,0.0462},
-{3242339,3921441,3921738,1.47385714285714,1000000},
-{3242340,3921738,3921578,0.190909090909091,1000000},
-{3242341,3921448,3921476,0.0317454545454545,0.0582},
-{3242344,3921448,3921653,0.15392,0.23088},
-{3242345,3921476,3921653,0.22092,0.22092},
-{3242347,3921476,3921513,0.0298666666666667,0.03584},
-{3242348,3921513,3921578,0.0496105263157895,0.0496105263157895},
-{3242350,3921653,3921686,0.0204,0.0204},
-{3242351,3921686,3921738,0.0436222222222222,1000000},
-{3242352,3921513,3921686,0.2127,0.2127},
-{3242364,3893648,3893806,0.0918222222222222,0.0854896551724138},
-{3242365,3882361,3882426,0.0231647058823529,0.0319297297297297},
-{3242366,3882426,3883123,0.1874,1000000},
-{3242369,3882426,3883031,1000000,0.21816},
-{3242380,3911768,3912513,0.536433333333333,0.4598},
-{3242381,3912513,3913061,0.3788625,0.336766666666667},
-{3242383,3912355,3912519,0.0914086956521739,0.10512},
-{3242384,3912519,3912546,0.00694838709677419,0.00936521739130435},
-{3242385,3893210,3893266,0.013104,0.013104},
-{3242386,3893219,3893718,0.313118181818182,0.287025},
-{3242396,3909590,3909633,0.01185,0.0116081632653061},
-{3242399,3900345,3900783,0.293777777777778,0.293777777777778},
-{3242400,3900783,3900886,1000000,1000000},
-{3242401,3919957,3920158,0.0733813953488372,0.0717136363636364},
-{3242402,3920158,3920353,0.060465,0.0620153846153846},
-{3242405,3920816,3920925,0.79974,0.79974},
-{3242406,3920925,3920816,0.1647,0.1647},
-{3242410,3920158,3920271,0.18216,0.18216},
-{3242411,3920271,3920816,1.1019,1.1019},
-{3242412,3920482,3920610,0.214636363636364,0.214636363636364},
-{3242413,3920271,3920610,0.46188,0.46188},
-{3242414,3920610,3920628,1000000,0.0177272727272727},
-{3242415,3920628,3921305,1000000,0.47875},
-{3242418,3917921,3918321,0.12942,0.136231578947368},
-{3242419,3918321,3918821,0.178584615384615,0.17412},
-{3242420,3918484,3918321,1000000,1000000},
-{3242421,3901248,3900846,0.120661538461538,0.104573333333333},
-{3242422,3901248,3901284,0.114975,0.18396},
-{3242423,3901284,3901209,0.0648,0.0891},
-{3242424,3901284,3901327,0.0246666666666667,0.0246666666666667},
-{3242425,3896012,3895938,1000000,1000000},
-{3242426,3917875,3917981,0.0756315789473684,0.0898125},
-{3242427,3917981,3918196,0.154642105263158,0.163233333333333},
-{3242442,3916601,3916420,1000000,1000000},
-{3242451,3899210,3899646,0.0983586206896552,1000000},
-{3242452,3910572,3910757,1000000,1000000},
-{3242453,3918837,3919232,0.220569230769231,0.136542857142857},
-{3242454,3918837,3919471,1000000,0.329888888888889},
-{3242455,3919326,3919360,1000000,0.03996},
-{3242456,3919360,3919471,1000000,0.0543257142857143},
-{3242457,3919232,3919360,1000000,0.0885818181818182},
-{3242458,3913103,3914483,1000000,1000000},
-{3242459,3919695,3919879,0.168317647058824,0.130063636363636},
-{3242461,3919879,3920053,0.0967538461538461,0.0898428571428572},
-{3242462,3919695,3920029,1000000,0.283628571428571},
-{3242465,3914483,3912088,1000000,1000000},
-{3242466,3915906,3916007,0.0953357142857143,0.0651073170731707},
-{3242467,3916007,3916164,0.2355375,0.139577777777778},
-{3242468,3916164,3916368,0.0592528301886793,0.0570981818181818},
-{3242469,3916368,3916961,0.146116981132075,0.140803636363636},
-{3242470,3916007,3916368,0.546323076923077,0.5073},
-{3242520,3873951,3874082,0.0402439024390244,1000000},
-{3242521,3874082,3874281,0.06,1000000},
-{3242522,3897268,3897418,0.22584,0.22584},
-{3242531,3901655,3901874,0.126288888888889,0.126288888888889},
-{3242532,3901874,3902285,0.214955555555556,0.214955555555556},
-{3242540,3917137,3917299,0.0671657142857143,1000000},
-{3242634,3910675,3911082,0.337213953488372,0.45313125},
-{3242635,3911082,3911220,0.226689473684211,0.297041379310345},
-{3242636,3911370,3911361,0.02502,0.02502},
-{3242637,3911361,3911290,0.14916,0.14916},
-{3242638,3911082,3911361,0.14874,0.14874},
-{3242661,3910865,3910970,0.0557714285714286,0.0557714285714286},
-{3242662,3910970,3910949,0.0789652173913044,0.0672666666666667},
-{3242668,3911011,3911099,0.02724,0.0360529411764706},
-{3242669,3911099,3911282,0.0643285714285714,0.08443125},
-{3242670,3910970,3910988,0.0230275862068966,0.0230275862068966},
-{3242671,3910988,3911282,0.19851,0.19851},
-{3242672,3911099,3910988,0.29745,0.29745},
-{3242683,3891497,3891822,1000000,0.147317647058824},
-{3242684,3891760,3891915,0.0749842105263158,0.0814114285714286},
-{3242685,3891915,3892054,0.0665714285714286,0.0735789473684211},
-{3242686,3907016,3907159,0.0275877551020408,1000000},
-{3242687,3906700,3906856,0.0367304347826087,1000000},
-{3242688,3906856,3906877,0.00473333333333333,1000000},
-{3242691,3919626,3919532,1000000,0.0514461538461538},
-{3242692,3919532,3919459,1000000,0.0373058823529412},
-{3242694,3892977,3892193,0.273365217391304,1000000},
-{3242695,3893024,3893037,0.0196875,0.0196875},
-{3242696,3893037,3893563,0.487133333333333,0.487133333333333},
-{3242697,3893024,3892977,0.0145565217391304,1000000},
-{3242698,3893138,3893024,0.0498954545454546,1000000},
-{3242699,3894487,3894506,0.012227027027027,0.0137090909090909},
-{3242700,3894506,3894941,0.315488888888889,0.37035652173913},
-{3242702,3894171,3894470,0.140571428571429,0.1476},
-{3242703,3894470,3894487,0.0082054054054054,0.0092},
-{3242704,3894443,3894470,0.0173777777777778,1000000},
-{3242707,3893307,3893782,1000000,0.226960975609756},
-{3242708,3893138,3893173,1000000,0.020565},
-{3242709,3893173,3893307,1000000,0.0831090909090909},
-{3242710,3893143,3893278,0.0808666666666667,1000000},
-{3242711,3895950,3895930,1000000,1000000},
-{3242712,3896104,3896113,0.126266666666667,0.126266666666667},
-{3242716,3893143,3892983,1000000,0.0701857142857143},
-{3242717,3892983,3892156,1000000,0.279510638297872},
-{3242718,3893024,3892983,0.0278526315789474,0.02646},
-{3242724,3893278,3893742,0.223360975609756,1000000},
-{3242725,3893782,3893742,0.05116,0.0403894736842105},
-{3242726,3896356,3896534,0.0740666666666667,0.0740666666666667},
-{3242727,3896329,3896393,0.08048,0.08048},
-{3242728,3896393,3896534,0.104733333333333,0.104733333333333},
-{3242729,3896356,3896393,0.0941111111111111,0.0941111111111111},
-{3242759,3888283,3888378,0.172177777777778,0.172177777777778},
-{3242760,3888131,3888283,0.0693,0.0693},
-{3242761,3888378,3888131,0.197666666666667,1000000},
-{3242762,3903889,3903467,0.267321428571429,0.440294117647059},
-{3242763,3903467,3903057,0.178389473684211,0.178389473684211},
-{3242765,3916335,3916387,0.821109090909091,0.821109090909091},
-{3242766,3904282,3904520,0.0607854545454545,0.0726782608695652},
-{3242767,3904520,3904565,0.0121178571428571,0.0138489795918367},
-{3242768,3903467,3903572,0.0968210526315789,0.108211764705882},
-{3242769,3904283,3904520,0.135830769230769,0.1308},
-{3242770,3903572,3904283,0.793542857142857,0.793542857142857},
-{3242771,3915447,3916261,1000000,1000000},
-{3242772,3903572,3903822,0.40552,0.40552},
-{3242773,3903935,3904283,0.283357894736842,0.26919},
-{3242774,3903822,3903935,0.0887428571428571,0.109623529411765},
-{3242775,3916387,3916261,0.127863157894737,0.127863157894737},
-{3242776,3916282,3916261,0.0162333333333333,0.0153789473684211},
-{3242777,3916762,3917118,0.17472,0.1248},
-{3242778,3916659,3916387,0.428966666666667,0.428966666666667},
-{3242779,3916282,3916659,0.309663157894737,0.255808695652174},
-{3242780,3916659,3916762,0.0608086956521739,0.04995},
-{3242781,3916261,3916659,0.594,0.565714285714286},
-{3242783,3905120,3905293,0.0684130434782609,1000000},
-{3242784,3905293,3905882,0.43233,1000000},
-{3242785,3904858,3904943,0.0172363636363636,0.0185882352941176},
-{3242786,3904943,3905162,0.0623555555555555,0.0647538461538461},
-{3242787,3905162,3905225,0.0192905660377359,0.020448},
-{3242788,3905162,3905005,0.162233333333333,1000000},
-{3242789,3904819,3904610,0.187333333333333,0.187333333333333},
-{3242790,3904610,3904666,0.11046,0.11046},
-{3242791,3859613,3859823,0.0878689655172414,0.106175},
-{3242792,3905293,3904946,0.209914285714286,0.217688888888889},
-{3242793,3904946,3904819,0.0477724137931034,1000000},
-{3242794,3904666,3904846,0.115486956521739,0.126485714285714},
-{3242795,3904846,3904946,0.0621096774193548,1000000},
-{3242796,3904778,3904846,0.0344,1000000},
-{3242797,3904666,3904738,0.0748125,0.0748125},
-{3242798,3904686,3904943,0.268058823529412,1000000},
-{3242799,3904738,3904686,0.142511111111111,0.142511111111111},
-{3242800,3905005,3904854,0.101858823529412,0.101858823529412},
-{3242801,3904854,3904686,0.13635,0.13635},
-{3242802,3904738,3904854,0.13695,0.128894117647059},
-{3242803,3904738,3905005,0.335022222222222,1000000},
-{3242804,3904819,3904778,0.04096,1000000},
-{3242805,3904778,3904610,0.127515789473684,0.127515789473684},
-{3242816,3910695,3910757,0.178032,0.178032},
-{3242817,3910695,3910759,0.04275,0.04275},
-{3242825,3910671,3910820,0.0852,0.0852},
-{3242826,3910757,3910787,0.0881142857142857,0.0881142857142857},
-{3242827,3910787,3910806,0.0568888888888889,0.0568888888888889},
-{3242828,3910806,3910917,0.0551777777777778,0.0551777777777778},
-{3242829,3910917,3911207,0.141977777777778,0.141977777777778},
-{3242830,3910787,3910917,0.0508,0.0508},
-{3242832,3851899,3852127,0.208222222222222,0.208222222222222},
-{3242833,3852215,3852127,0.0440222222222222,0.0440222222222222},
-{3242834,3852127,3852019,0.0541333333333333,0.0541333333333333},
-{3242849,3860500,3860640,0.0681913043478261,0.0667404255319149},
-{3242850,3860640,3860922,0.156516279069767,0.152959090909091},
-{3242851,3860640,3861065,0.219955555555556,0.219955555555556},
-{3242852,3860922,3861044,0.158356097560976,0.150990697674419},
-{3242853,3861044,3861059,0.0211434782608696,0.0226186046511628},
-{3242854,3861044,3861373,0.168511111111111,0.168511111111111},
-{3242892,3863053,3862584,0.514755555555556,0.514755555555556},
-{3242893,3862584,3862204,0.2538,0.2538},
-{3242894,3862720,3862525,0.239290909090909,0.210576},
-{3242895,3862525,3862363,0.225221052631579,0.225221052631579},
-{3242896,3862525,3862097,0.176666666666667,0.176666666666667},
-{3242902,3866430,3865737,0.579458823529412,0.579458823529412},
-{3242903,3865737,3865622,0.0677666666666667,0.0451777777777778},
-{3242904,3865831,3865708,0.0486,0.0271255813953488},
-{3242905,3865708,3865622,0.0255096774193548,0.0188285714285714},
-{3242906,3865737,3865708,0.0238166666666667,1000000},
-{3242908,3864109,3863803,0.142377777777778,0.142377777777778},
-{3242913,3864983,3865979,0.443288888888889,0.443288888888889},
-{3242914,3867566,3866633,0.265954285714286,0.358015384615385},
-{3242915,3866633,3866114,0.14218064516129,0.14692},
-{3242916,3866633,3866590,0.0987111111111111,0.0987111111111111},
-{3242918,3867150,3866914,0.1082,0.1082},
-{3242922,3866579,3866355,0.202444444444444,0.202444444444444},
-{3242923,3866954,3866719,0.220133333333333,0.220133333333333},
-{3242924,3866719,3866579,1000000,1000000},
-{3242925,3867698,3867760,1000000,1000000},
-{3242926,3867760,3867547,0.0854444444444445,0.0854444444444445},
-{3242927,3867566,3867547,1000000,1000000},
-{3242928,3867547,3867480,0.211066666666667,0.211066666666667},
-{3242935,3867305,3867747,0.182884615384615,0.182884615384615},
-{3242936,3867747,3868048,0.129913043478261,0.129913043478261},
-{3242937,3869759,3869388,0.213111111111111,0.213111111111111},
-{3242938,3873479,3873488,0.01075,0.010530612244898},
-{3242939,3873358,3872059,0.354384615384615,0.383916666666667},
-{3242940,3873485,3873484,0.016475,0.0175733333333333},
-{3242941,3873484,3873479,0.012465306122449,0.0132782608695652},
-{3242942,3873479,3873413,0.042,0.035},
-{3242943,3873413,3873358,0.03096,0.0281454545454545},
-{3242946,3869583,3869329,0.10905,0.10905},
-{3242947,3869329,3869206,1000000,1000000},
-{3242957,3850077,3849921,0.078576,0.0677379310344828},
-{3242958,3849921,3849479,0.211244444444444,0.183987096774194},
-{3242959,3849921,3849299,0.760177777777778,0.760177777777778},
-{3242960,3870284,3870239,1000000,1000000},
-{3242961,3869755,3869700,0.36006,0.36006},
-{3242962,3860120,3860261,0.180469565217391,0.180469565217391},
-{3242963,3860261,3860267,0.0157333333333333,0.0157333333333333},
-{3242964,3860261,3860438,1000000,1000000},
-{3242965,3860261,3860021,0.128066666666667,0.128066666666667},
-{3242966,3860021,3860007,0.0831777777777778,0.0831777777777778},
-{3242967,3859769,3860021,1000000,1000000},
-{3242970,3870681,3870682,0.00153333333333333,0.00153333333333333},
-{3242971,3870485,3870681,0.0686,0.0686},
-{3242974,3858791,3858968,1000000,1000000},
-{3242975,3858825,3858925,0.0431777777777778,0.0431777777777778},
-{3242976,3858925,3859000,1000000,1000000},
-{3242979,3859353,3859326,0.0106227272727273,0.0106227272727273},
-{3242980,3859326,3859155,0.05848,0.05848},
-{3242981,3859644,3859436,1000000,0.21918},
-{3242982,3859436,3859226,1000000,0.1803},
-{3242983,3859326,3859436,1000000,1000000},
-{3242984,3862158,3862038,0.28191724137931,0.291985714285714},
-{3242985,3862038,3862018,0.0694636363636364,0.0727714285714286},
-{3242986,3862148,3862038,0.098664,1000000},
-{3242987,3863120,3862449,0.221545945945946,0.2561625},
-{3242988,3870971,3871035,0.0415555555555556,0.0415555555555556},
-{3242989,3870971,3870788,0.10863,0.10863},
-{3242990,3870788,3870129,0.244577777777778,0.244577777777778},
-{3242991,3878230,3878137,1000000,0.2116},
-{3242992,3877159,3878137,0.363327272727273,0.32625306122449},
-{3242993,3878137,3878290,1000000,0.0920823529411765},
-{3242997,3876894,3876587,1000000,0.114457894736842},
-{3242998,3876715,3876894,1000000,0.0723782608695652},
-{3242999,3876894,3877159,0.101804347826087,0.09366},
-{3243000,3870909,3870752,0.0971333333333333,0.1457},
-{3243001,3870752,3870747,0.00246315789473684,0.0036},
-{3243002,3870752,3870602,1000000,1000000},
-{3243003,3870602,3870681,0.0924222222222222,0.0924222222222222},
-{3243005,3850376,3849162,1000000,1000000},
-{3243007,3851283,3851306,0.029736,0.0391263157894737},
-{3243008,3851306,3851746,0.212181818181818,0.241448275862069},
-{3243010,3850876,3850510,0.216222222222222,0.216222222222222},
-{3243016,3871900,3872417,1000000,1000000},
-{3243017,3871607,3871621,0.0249260869565217,1000000},
-{3243018,3871721,3871607,0.0655764705882353,0.07432},
-{3243019,3871642,3871682,1000000,0.0693},
-{3243020,3871682,3871721,1000000,0.0551526315789474},
-{3243021,3871547,3871582,0.0458625,1000000},
-{3243022,3871582,3871607,0.0442851063829787,1000000},
-{3243023,3871682,3871582,0.0189411764705882,0.0189411764705882},
-{3243024,3878496,3878364,0.0385826086956522,1000000},
-{3243025,3878950,3878922,0.0107,1000000},
-{3243026,3879076,3878919,1000000,0.0420566037735849},
-{3243027,3878919,3878689,1000000,0.0689192307692308},
-{3243028,3878689,3878919,0.2511,1000000},
-{3243029,3878562,3878407,0.10833,1000000},
-{3243030,3878407,3878205,0.156433333333333,1000000},
-{3243031,3878496,3878471,1000000,0.0838235294117647},
-{3243032,3878471,3878922,1000000,0.341647058823529},
-{3243033,3878407,3878471,1000000,0.0624},
-{3243035,3878689,3878525,1000000,0.040665306122449},
-{3243036,3878525,3878421,1000000,0.03315},
-{3243037,3878922,3878646,0.08725,1000000},
-{3243038,3878646,3878496,0.0418085106382979,1000000},
-{3243039,3859948,3859774,0.059115,0.0563},
-{3243040,3859774,3859562,0.0931655172413793,0.0711},
-{3243044,3851701,3849923,0.547442857142857,0.489204255319149},
-{3243049,3861944,3861652,0.0763764705882353,0.0721333333333333},
-{3243050,3861652,3861568,0.0243411764705882,0.023422641509434},
-{3243051,3862428,3861715,0.481822222222222,0.481822222222222},
-{3243052,3861715,3861652,1000000,1000000},
-{3243054,3886888,3886782,0.0569181818181818,1000000},
-{3243055,3886782,3885804,0.275707317073171,1000000},
-{3243056,3886782,3886726,0.1218,1000000},
-{3243057,3886726,3886802,0.0750857142857143,0.10512},
-{3243058,3886802,3886807,0.0429,0.0449428571428571},
-{3243059,3886807,3886847,0.0514105263157895,1000000},
-{3243060,3886847,3886888,0.129860869565217,1000000},
-{3243061,3886802,3886847,0.01746,1000000},
-{3243062,3877560,3878066,0.279933333333333,1000000},
-{3243063,3877560,3877542,0.05058,0.06744},
-{3243064,3878066,3878052,0.0475813953488372,1000000},
-{3243065,3878052,3877943,0.234860377358491,1000000},
-{3243066,3877930,3878052,1000000,0.114572727272727},
-{3243067,3877321,3877314,0.0502421052631579,0.0502421052631579},
-{3243068,3877930,3877321,1000000,1.30152},
-{3243069,3877898,3877812,0.168294545454545,1000000},
-{3243070,3877980,3877888,1000000,0.213559090909091},
-{3243071,3877898,3877980,0.0488,0.0305},
-{3243072,3877542,3877427,0.296715789473684,0.296715789473684},
-{3243073,3889464,3889544,0.0473733333333333,0.0435061224489796},
-{3243074,3889544,3889872,0.19185,0.1438875},
-{3243075,3888450,3889544,0.49569375,1000000},
-{3243076,3889352,3890607,0.272830188679245,1000000},
-{3243078,3877775,3877898,0.07788,0.0449307692307692},
-{3243079,3877943,3877919,0.0553473684210526,1000000},
-{3243080,3877919,3877898,0.0314275862068965,1000000},
-{3243081,3877775,3877919,1000000,0.0783931034482759},
-{3243082,3890694,3890815,1000000,0.0312279069767442},
-{3243083,3890815,3890952,1000000,0.0423627906976744},
-{3243084,3890952,3891031,1000000,0.0243571428571429},
-{3243088,3877314,3877417,0.0290181818181818,0.02394},
-{3243089,3877417,3877775,0.141825,0.10636875},
-{3243090,3877321,3877417,1000000,0.0408},
-{3243091,3893439,3893501,0.0492375,0.0477454545454545},
-{3243092,3893439,3893284,1000000,0.53424},
-{3243093,3893284,3893501,1000000,0.52752},
-{3243094,3877580,3877621,1000000,0.00878918918918919},
-{3243095,3877621,3878079,1000000,0.158958620689655},
-{3243096,3878150,3878135,1000000,0.0429260869565217},
-{3243097,3878135,3878017,1000000,0.264970212765957},
-{3243098,3878017,3877991,1000000,0.0690666666666667},
-{3243099,3877991,3877980,1000000,0.0354875},
-{3243100,3901522,3901670,0.332311111111111,0.332311111111111},
-{3243101,3901670,3901719,0.0268888888888889,0.0268888888888889},
-{3243102,3901670,3901597,0.0272,0.0272},
-{3243103,3883658,3883610,0.0290076923076923,1000000},
-{3243104,3885289,3886276,0.270505263157895,0.302329411764706},
-{3243105,3886276,3886726,0.240782608695652,0.23075},
-{3243106,3886103,3886276,1000000,1000000},
-{3243107,3886045,3886174,1000000,1000000},
-{3243108,3875733,3875323,0.19235,0.15388},
-{3243109,3875323,3875124,0.145447058823529,0.107504347826087},
-{3243110,3875323,3875373,0.115044444444444,0.115044444444444},
-{3243112,3887860,3887953,0.0321857142857143,1000000},
-{3243113,3887953,3887990,0.0233428571428571,1000000},
-{3243114,3887842,3887953,1000000,0.0231076923076923},
-{3243115,3887957,3888028,1000000,0.0349363636363636},
-{3243116,3888028,3888061,1000000,0.0156818181818182},
-{3243117,3887953,3888028,1000000,0.0289875},
-{3243118,3884812,3885013,0.194,0.127756097560976},
-{3243119,3885013,3885054,0.0276909090909091,0.0198652173913043},
-{3243120,3889387,3889598,0.105876923076923,0.161929411764706},
-{3243121,3889598,3890417,0.251944186046512,0.300933333333333},
-{3243122,3889598,3889508,0.248733333333333,0.248733333333333},
-{3243123,3875553,3875772,0.0915692307692308,0.140047058823529},
-{3243124,3875772,3875735,0.0748444444444444,0.0748444444444444},
-{3243125,3875772,3876140,0.236273684210526,0.236273684210526},
-{3243126,3876140,3876263,0.0492666666666667,0.0492666666666667},
-{3243127,3876140,3876117,0.0650666666666667,0.0650666666666667},
-{3243130,3886438,3886467,0.0468352941176471,0.06635},
-{3243131,3885811,3886438,1000000,0.157883720930233},
-{3243132,3885013,3885497,1000000,0.21145},
-{3243133,3885497,3885811,1000000,0.0823857142857143},
-{3243134,3887261,3887232,0.0464,0.0464},
-{3243136,3889344,3889361,0.0419428571428571,0.0326222222222222},
-{3243137,3900187,3899672,0.318418181818182,0.269430769230769},
-{3243138,3899672,3899241,0.190059574468085,0.194191304347826},
-{3243139,3899672,3899539,0.0658384615384615,1000000},
-{3243140,3899539,3900093,1000000,0.373606451612903},
-{3243141,3899539,3899420,0.0690782608695652,1000000},
-{3243142,3900093,3900293,1000000,0.111363636363636},
-{3243143,3899420,3899345,0.043392,1000000},
-{3243144,3899345,3898876,0.245911111111111,0.245911111111111},
-{3243145,3899420,3900174,1.02636,1000000},
-{3243146,3900174,3900293,0.0786,0.0786},
-{3243147,3899345,3900174,0.630444444444444,1000000},
-{3243148,3911532,3911961,0.147014285714286,1000000},
-{3243149,3911899,3912621,0.123402857142857,1000000},
-{3243150,3911532,3911899,0.109213636363636,1000000},
-{3243151,3900128,3900295,0.231890322580645,1000000},
-{3243152,3900295,3900187,0.0782117647058823,0.0738666666666667},
-{3243153,3900103,3900843,0.222102857142857,1000000},
-{3243154,3900843,3901000,0.0573833333333333,1000000},
-{3243155,3910193,3911899,0.311966197183099,1000000},
-{3243156,3909953,3910320,0.107655,1000000},
-{3243157,3910320,3910848,0.162965853658537,1000000},
-{3243158,3910193,3910320,0.040836,1000000},
-{3243159,3900295,3900654,0.353647058823529,0.353647058823529},
-{3243160,3900452,3900187,0.3380625,0.154542857142857},
-{3243161,3900654,3900452,0.162631578947368,1000000},
-{3243162,3900654,3900735,0.0484888888888889,1000000},
-{3243163,3900735,3900843,0.0413117647058824,1000000},
-{3243164,3900500,3900452,1000000,0.0286604651162791},
-{3243165,3900735,3900500,1000000,0.137822222222222},
-{3243166,3900864,3900896,1000000,0.0107538461538462},
-{3243167,3900896,3901057,1000000,0.0617090909090909},
-{3243168,3896942,3897057,0.1074,0.0835333333333333},
-{3243169,3916895,3916925,0.0139235294117647,0.0182076923076923},
-{3243170,3916896,3916895,0.0170487804878049,1000000},
-{3243171,3898217,3898849,0.296757142857143,0.519325},
-{3243172,3898849,3899241,0.1654,0.158784},
-{3243173,3916895,3916952,0.0137268292682927,1000000},
-{3243174,3897057,3897545,0.199753846153846,0.199753846153846},
-{3243175,3897545,3898849,0.476042857142857,0.434647826086957},
-{3243176,3897395,3897545,0.0910666666666667,0.0910666666666667},
-{3243177,3880834,3880792,0.0197379310344828,1000000},
-{3243178,3880792,3880565,0.0933483870967742,1000000},
-{3243179,3880792,3880912,1000000,0.0728666666666667},
-{3243180,3880834,3880909,1000000,0.0234},
-{3243181,3880912,3880909,1000000,0.0475714285714286},
-{3243182,3894345,3894418,0.137542857142857,1000000},
-{3243225,3891032,3891189,0.213466666666667,0.19212},
-{3243226,3891189,3891630,0.2622,0.251275},
-{3243227,3892335,3892022,0.0947375,1000000},
-{3243228,3889185,3889337,0.0701478260869565,1000000},
-{3243229,3889237,3889249,0.00809230769230769,0.0116888888888889},
-{3243230,3889249,3889337,0.0425560975609756,0.0562838709677419},
-{3243231,3889185,3889249,0.068592,1000000},
-{3243232,3888028,3889059,1000000,0.4731},
-{3243233,3887854,3887660,0.0920526315789474,1000000},
-{3243234,3887660,3887592,0.0291,1000000},
-{3243235,3889059,3887660,1000000,0.442747058823529},
-{3243237,3887232,3887978,1000000,0.160053333333333},
-{3243238,3887978,3888091,1000000,0.02896},
-{3243239,3888036,3887978,0.0951157894736842,1000000},
-{3243240,3893557,3894694,0.399814925373134,0.4252},
-{3243241,3895900,3896440,0.611066666666667,0.611066666666667},
-{3243242,3880912,3881114,0.0679764705882353,1000000},
-{3243243,3883321,3883384,0.037695652173913,0.0456315789473684},
-{3243244,3883384,3883419,0.0157111111111111,0.0192818181818182},
-{3243245,3883067,3883178,1000000,0.0378},
-{3243246,3883178,3883321,1000000,0.0642954545454545},
-{3243247,3883384,3883178,0.09896,1000000},
-{3243248,3883000,3883113,0.0508536585365854,1000000},
-{3243249,3883113,3883280,0.0763166666666667,1000000},
-{3243250,3887854,3887933,1000000,0.0278590909090909},
-{3243251,3887933,3887957,1000000,0.00827727272727273},
-{3243252,3887261,3887993,0.211288235294118,1000000},
-{3243253,3887993,3888120,0.0407225806451613,1000000},
-{3243254,3911025,3911705,1000000,0.133411267605634},
-{3243255,3911705,3912518,1000000,0.149434782608696},
-{3243256,3908543,3910257,1000000,0.3258},
-{3243257,3910257,3911025,1000000,0.134117142857143},
-{3243258,3894332,3894345,0.0365672727272727,0.0365672727272727},
-{3243259,3894345,3894349,0.00417966101694915,0.00474230769230769},
-{3243261,3887326,3887580,0.098835,1000000},
-{3243262,3887580,3887667,0.0358883720930233,1000000},
-{3243263,3888061,3889075,0.27624,1000000},
-{3243264,3889075,3889185,0.0499241379310345,1000000},
-{3243310,3856054,3855397,0.271555555555556,0.271555555555556},
-{3243311,3855397,3855414,0.0410666666666667,0.0410666666666667},
-{3243312,3858469,3858129,0.442690909090909,1000000},
-{3243313,3858129,3858259,0.429342857142857,0.429342857142857},
-{3243314,3858129,3858253,0.179866666666667,0.179866666666667},
-{3243315,3858253,3858465,0.227218181818182,0.227218181818182},
-{3243316,3868242,3868270,0.0248727272727273,0.02736},
-{3243317,3868270,3868287,0.0209454545454545,0.02304},
-{3243318,3867959,3867935,0.0358,0.03759},
-{3243319,3867935,3867362,0.4486875,0.4486875},
-{3243320,3867962,3867935,1000000,1000000},
-{3243321,3868270,3868226,1000000,1000000},
-{3243322,3869325,3869302,0.0167571428571429,0.0138},
-{3243323,3869302,3869012,0.130714285714286,0.111585365853659},
-{3243324,3869302,3869340,1000000,1000000},
-{3243325,3869827,3869882,1000000,1000000},
-{3243326,3870038,3870057,0.03306,0.03306},
-{3243327,3870922,3870936,0.0307304347826087,0.044175},
-{3243328,3871814,3871762,0.0222,0.0191166666666667},
-{3243329,3871762,3871704,0.0827333333333333,0.07446},
-{3243330,3871488,3871757,0.120445161290323,0.128751724137931},
-{3243331,3871757,3871814,0.0410275862068965,0.0626210526315789},
-{3243332,3871762,3871757,1000000,0.050775},
-{3243333,3871898,3871814,0.0272896551724138,0.0208263157894737},
-{3243334,3871757,3871898,1000000,0.0340923076923077},
-{3243335,3860366,3860075,0.170933333333333,0.170933333333333},
-{3243336,3860075,3859877,1000000,1000000},
-{3243337,3870936,3871462,1000000,0.143223529411765},
-{3243338,3871462,3871787,1000000,0.122184},
-{3243339,3875475,3875365,1000000,0.163529032258065},
-{3243340,3875365,3875321,1000000,0.0819483870967742},
-{3243341,3875365,3875567,0.334355555555556,0.334355555555556},
-{3243342,3875200,3875541,1000000,0.0955733333333333},
-{3243343,3875541,3875936,1000000,0.0916933333333333},
-{3243344,3875541,3875793,1000000,1000000},
-{3243345,3875793,3875826,1000000,1000000},
-{3243346,3875500,3875793,1000000,1000000},
-{3243347,3875793,3876019,1000000,1000000},
-{3243348,3876102,3876019,0.0772222222222222,0.0772222222222222},
-{3243349,3876252,3876159,0.195088888888889,0.195088888888889},
-{3243350,3876019,3876159,0.170155555555556,0.170155555555556},
-{3243351,3876159,3876124,0.0815777777777778,0.0786642857142857},
-{3243352,3876124,3875847,0.136466666666667,0.136466666666667},
-{3243353,3876124,3876099,0.0628363636363636,0.0628363636363636},
-{3243354,3876099,3875767,0.146377777777778,0.146377777777778},
-{3243355,3876099,3876068,0.0596322580645161,0.0596322580645161},
-{3243356,3876068,3876023,0.0911307692307692,0.0764322580645161},
-{3243357,3876068,3875695,0.1644,0.1644},
-{3243358,3875185,3875531,0.0922085106382979,1000000},
-{3243359,3875531,3875923,0.0997756097560976,1000000},
-{3243360,3881476,3881709,1000000,0.284707317073171},
-{3243361,3881709,3881723,1000000,0.0105081081081081},
-{3243362,3884472,3884471,0.1247625,1000000},
-{3243363,3884471,3884493,0.3933,1000000},
-{3243364,3884137,3884270,1000000,0.111557142857143},
-{3243365,3884270,3884472,1000000,0.168461538461538},
-{3243366,3884471,3884270,1000000,1000000},
-{3243367,3889686,3889986,1000000,0.1074375},
-{3243368,3889986,3890050,1000000,0.0234363636363636},
-{3243369,3891295,3891321,0.0649166666666667,0.07303125},
-{3243370,3891321,3891332,0.0238181818181818,0.0271034482758621},
-{3243371,3877690,3877375,0.138225,0.135404081632653},
-{3243372,3877375,3876915,0.295133333333333,0.22135},
-{3243373,3900046,3900045,0.013752,1000000},
-{3243374,3900045,3900049,0.0685038461538462,1000000},
-{3243375,3892875,3892804,0.0540545454545455,0.0349764705882353},
-{3243376,3880146,3880333,1000000,0.0973},
-{3243377,3866270,3867044,0.327558620689655,1000000},
-{3243378,3867044,3867995,0.456163636363636,0.456163636363636},
-{3243379,3890547,3890617,0.0182780487804878,1000000},
-{3243380,3890617,3891275,0.187342857142857,1000000},
-{3243381,3890562,3890621,1000000,0.01716},
-{3243382,3890621,3891287,1000000,0.212108108108108},
-{3243383,3890617,3890621,0.029648275862069,0.0505764705882353},
-{3243384,3891285,3890635,0.77088,1000000},
-{3243385,3890635,3890457,0.23388,1000000},
-{3243386,3870733,3870577,0.4964,1000000},
-{3243387,3897246,3897334,1000000,0.0197142857142857},
-{3243388,3897242,3897246,1000000,0.07866},
-{3243389,3897242,3897394,0.40692,0.40692},
-{3243390,3869426,3869511,1000000,1000000},
-{3243391,3897394,3897231,0.18474,0.18474},
-{3243392,3897231,3897242,0.33234,0.33234},
-{3243393,3869938,3869652,1000000,1000000},
-{3243394,3869652,3869858,1000000,1000000},
-{3243395,3869652,3869705,1000000,1000000},
-{3243396,3869705,3869511,1000000,1000000},
-{3243397,3897150,3897298,0.0388304347826087,1000000},
-{3243398,3881412,3881584,0.275072727272727,1000000},
-{3243399,3900232,3900227,1000000,0.0232173913043478},
-{3243400,3900227,3900220,1000000,0.0403333333333333},
-{3243401,3900258,3900278,0.164488888888889,1000000},
-{3243402,3900278,3900296,0.212105882352941,1000000},
-{3243403,3870721,3870403,1000000,1000000},
-{3243404,3870403,3870141,1000000,1000000},
-{3243405,3870205,3870241,1000000,1000000},
-{3243406,3870241,3870673,1000000,1000000},
-{3243407,3870403,3870241,1000000,1000000},
-{3243408,3890621,3890635,1000000,0.12966},
-{3243409,3891287,3891285,0.13746,1000000},
-{3243410,3890635,3891285,1000000,0.94722},
-{3243411,3868689,3868536,1000000,1000000},
-{3243412,3868536,3868248,1000000,1000000},
-{3243416,3869109,3869300,1000000,1000000},
-{3243417,3869300,3869543,1000000,1000000},
-{3243418,3869543,3869384,1000000,1000000},
-{3243419,3869384,3869263,1000000,1000000},
-{3243420,3869300,3869384,1000000,1000000},
-{3243421,3872912,3872917,0.0133935483870968,0.0143172413793103},
-{3243422,3872917,3872931,0.0521785714285714,0.0541111111111111},
-{3243423,3872917,3873400,1000000,1000000},
-{3243424,3871234,3871249,1000000,1000000},
-{3243425,3871249,3871701,1000000,1000000},
-{3243444,3919797,3919836,1000000,0.0415028571428571},
-{3243445,3919930,3919960,1000000,0.0550888888888889},
-{3243446,3920135,3919930,0.201,0.201},
-{3243447,3920135,3920177,1000000,0.0344545454545454},
-{3243448,3920177,3919960,0.119981818181818,1000000},
-{3243449,3919960,3920012,1000000,0.09361875},
-{3243450,3920177,3920012,1000000,0.426018181818182},
-{3243451,3920012,3920031,1000000,0.034741935483871},
-{3243452,3920031,3920773,1000000,0.556125},
-{3243454,3920031,3921008,0.621835714285714,1000000},
-{3243555,3919797,3919614,0.118436363636364,1000000},
-{3243556,3919614,3920552,0.625291304347826,1000000},
-{3243557,3919614,3919624,1000000,0.319782352941176},
-{3243558,3919624,3919674,0.03438,0.03438},
-{3243559,3919674,3919797,1000000,0.197125714285714},
-{3243560,3919624,3919675,0.0299823529411765,0.0299823529411765},
-{3243561,3919675,3919763,0.145728,0.107152941176471},
-{3243562,3919674,3919675,0.0407785714285714,0.0407785714285714},
-{3243563,3919887,3919860,1000000,0.0400928571428571},
-{3243564,3919686,3919667,1000000,0.02461875},
-{3243565,3919137,3919686,0.37044,1000000},
-{3243566,3919860,3919763,1000000,0.0517777777777778},
-{3243567,3919763,3919686,1000000,0.0434888888888889},
-{3243568,3922335,3920056,1000000,1.30087741935484},
-{3243569,3920056,3919860,1000000,0.14038064516129},
-{3243570,3919887,3920099,1000000,0.183415384615385},
-{3243571,3920099,3922335,1000000,1.06708421052632},
-{3243572,3920056,3920099,0.035184,0.035184},
-{3243573,3919823,3919859,1000000,0.01475},
-{3243574,3919859,3919887,1000000,0.04516},
-{3243575,3919919,3919859,0.0394457142857143,0.0418363636363636},
-{3243576,3919667,3919823,1000000,0.0824571428571429},
-{3243577,3901328,3900756,0.37962,0.37962},
-{3243578,3900756,3900343,0.3357,0.3357},
-{3243579,3900756,3900986,0.37983,0.37983},
-{3243580,3900986,3901094,0.1302,0.1302},
-{3243581,3900986,3900636,0.23787,0.23787},
-{3243582,3900477,3901004,0.209090322580645,0.175183783783784},
-{3243583,3901004,3901081,1000000,1000000},
-{3243584,3901069,3901243,0.443458536585366,0.422832558139535},
-{3243585,3901004,3901069,0.0219081081081081,0.0219081081081081},
-{3243591,3899793,3899174,0.690552,0.784718181818182},
-{3243595,3899174,3899362,0.203142857142857,0.203142857142857},
-{3243596,3899174,3898978,0.24903,0.24903},
-{3243597,3899177,3899362,0.236021052631579,0.236021052631579},
-{3243598,3898978,3899177,0.11787,0.11787},
-{3243599,3898978,3898710,0.40326,0.40326},
-{3243600,3898898,3899177,0.39573,0.39573},
-{3243601,3898710,3898898,0.11475,0.11475},
-{3243602,3898710,3898515,0.35307,0.35307},
-{3243603,3898690,3898898,0.33807,0.33807},
-{3243604,3898515,3898690,0.10812,0.10812},
-{3243605,3898169,3897994,0.09321,0.09321},
-{3243606,3898034,3897839,0.41574,0.41574},
-{3243607,3898169,3898368,0.40695,0.40695},
-{3243608,3898034,3898368,0.17841,0.17841},
-{3243609,3898515,3898263,0.45699,0.45699},
-{3243610,3898263,3898034,0.38073,0.38073},
-{3243611,3898368,3898555,0.38358,0.38358},
-{3243612,3898555,3898690,0.46632,0.46632},
-{3243613,3898263,3898555,0.16665,0.16665},
-{3243614,3897839,3897585,0.47574,0.47574},
-{3243615,3897994,3897750,0.47298,0.47298},
-{3243616,3897750,3897625,0.28086,0.28086},
-{3243617,3897585,3897750,0.10209,0.10209},
-{3243618,3897750,3898106,0.19269,0.19269},
-{3243619,3898106,3898005,0.108133333333333,0.108133333333333},
-{3243620,3898005,3897819,0.20739,0.20739},
-{3243621,3898235,3898322,0.0882,0.0882},
-{3243622,3898005,3898322,0.19089,0.19089},
-{3243623,3898209,3898106,0.087625,0.087625},
-{3243624,3898322,3898533,0.1986,0.1986},
-{3243625,3898209,3898533,0.2097,0.2097},
-{3243626,3898563,3898392,0.09891,0.09891},
-{3243627,3898392,3898169,0.11793,0.11793},
-{3243628,3898533,3898719,0.20244,0.20244},
-{3243629,3898719,3898919,0.24681,0.24681},
-{3243630,3898563,3898387,0.25904,0.19428},
-{3243631,3898387,3898209,0.163675,0.2455125},
-{3243632,3898392,3898387,0.23316,0.23316},
-{3243633,3898387,3898719,0.22119,0.22119},
-{3243634,3897585,3897354,0.49329,0.49329},
-{3243635,3897354,3897108,0.51177,0.51177},
-{3243636,3897354,3897521,0.10308,0.10308},
-{3243637,3897521,3897625,0.20934,0.20934},
-{3243638,3897521,3897445,0.16782,0.16782},
-{3243639,3897445,3897280,0.33894,0.33894},
-{3243640,3897445,3897819,0.43224,0.43224},
-{3243641,3897819,3898134,0.18354,0.18354},
-{3243642,3898134,3898235,0.10341,0.10341},
-{3243643,3898134,3897778,0.33315,0.33315},
-{3243644,3900245,3900477,0.419634782608696,0.438709090909091},
-{3243645,3898977,3899126,0.0577836734693878,0.0555176470588235},
-{3243646,3899126,3899364,0.136908,0.134223529411765},
-{3243647,3919836,3919881,1000000,0.0624545454545455},
-{3243648,3919881,3919930,1000000,0.0993230769230769},
-{3243649,3919836,3920020,1000000,0.296618181818182},
-{3243650,3920020,3920135,1000000,0.0733272727272727},
-{3243651,3919881,3920020,0.0763636363636364,0.0763636363636364},
-{3243658,3910530,3910724,0.0266454545454545,0.0254869565217391},
-{3243659,3906476,3907041,0.486333333333333,0.486333333333333},
-{3244226,3886020,3886301,0.29564,1000000},
-{3244227,3887184,3886301,1000000,0.591845454545454},
-{3244228,3886205,3886085,1000000,0.0921714285714286},
-{3244229,3887089,3886413,0.6874125,1000000},
-{3244272,3909105,3909174,0.037272,0.0358384615384615},
-{3244273,3909174,3909224,0.0235548387096774,0.0317478260869565},
-{3244274,3909669,3909732,0.058275,0.0358615384615385},
-{3244275,3909732,3909791,0.0288782608695652,0.0288782608695652},
-{3244276,3909174,3909732,1000000,0.169261224489796},
-{3244277,3910416,3910503,0.0384260869565217,0.0465157894736842},
-{3244278,3910503,3910563,0.0284608695652174,0.03273},
-{3244279,3909732,3910503,1000000,0.193714285714286},
-{3244280,3910503,3910878,1000000,0.114988235294118},
-{3244338,3895950,3896113,0.0739555555555556,0.0739555555555556},
-{3244516,3905959,3905378,0.2526,1000000},
-{3244517,3905378,3905222,0.0615191489361702,1000000},
-{3244518,3888521,3888689,1000000,0.064646511627907},
-{3244519,3888689,3888972,1000000,0.1114},
-{3244522,3893782,3894372,1000000,0.28116},
-{3244713,3889059,3889169,1000000,0.0407230769230769},
-{3244714,3889169,3889237,1000000,0.02705},
-{3245170,3877342,3877890,0.315320689655172,0.30481},
-{3245344,3884909,3885968,0.65979,0.65979},
-{3245345,3885753,3884696,0.66348,0.66348},
-{3245346,3885753,3885968,0.16716,0.16716},
-{3245347,3884909,3884696,0.18498,0.18498},
-{3245350,3884696,3883258,1.43691,1.43691},
-{3245351,3884250,3885753,1.26513913043478,1.26513913043478},
-{3245352,3884250,3883258,0.65262,0.65262},
-{3245353,3884250,3883777,0.370392,0.370392},
-{3245354,3882743,3883258,0.48903,0.48903},
-{3245355,3882743,3883777,0.65802,0.65802},
-{3245356,3886537,3883777,1.82445,1.82445},
-{3245358,3892238,3893424,0.847945454545455,0.847945454545455},
-{3245359,3894321,3894181,0.138511111111111,0.138511111111111},
-{3245360,3892443,3893681,0.97371,0.97371},
-{3245361,3892443,3892066,0.41022,0.41022},
-{3245362,3892066,3893452,1.01826,1.01826},
-{3245363,3892066,3891806,0.25065,0.25065},
-{3245364,3886537,3888287,1.64799,1.64799},
-{3245365,3886537,3888083,0.96726,0.96726},
-{3245366,3888021,3888476,0.26889,0.26889},
-{3245367,3888476,3888953,0.27147,0.27147},
-{3245368,3888561,3889129,0.32964,0.32964},
-{3245369,3889973,3888083,1.16898,1.16898},
-{3245437,3882516,3883777,0.826510344827586,0.826510344827586},
-{3245438,3889129,3888659,0.370772727272727,0.313730769230769},
-{3245439,3893452,3893984,0.43698,0.43698},
-{3245440,3893681,3894201,0.44196,0.44196},
-{3245601,3893681,3893452,0.3642,0.3642},
-{3245602,3893681,3893958,0.26205,0.26205},
-{3245603,3888083,3888021,0.43533,0.43533},
-{3245706,3898189,3897864,0.18963,0.18963},
-{3245707,3897990,3898189,0.18402,0.18402},
-{3245708,3897990,3897648,0.2202,0.2202},
-{3245709,3897801,3897990,0.18465,0.18465},
-{3245710,3897801,3897501,0.21228,0.21228},
-{3245711,3897638,3897801,0.18285,0.18285},
-{3245712,3897638,3897347,0.20865,0.20865},
-{3245713,3897456,3897638,0.18198,0.18198},
-{3246979,3896593,3897623,0.637702702702703,0.637702702702703},
-{3247238,3889174,3888627,0.130242857142857,0.118917391304348},
-{3247240,3888627,3888659,0.02247,0.0204272727272727},
-{3247243,3888627,3887587,0.233481818181818,0.228293333333333},
-{3247244,3887587,3887605,0.0259384615384615,0.0240857142857143},
-{3247245,3887587,3887048,0.146292307692308,0.158483333333333},
-{3247246,3887048,3886872,0.0709,0.0750705882352941},
-{3247247,3887048,3887057,0.01305,0.01305},
-{3247248,3886872,3886695,0.0652578947368421,0.07749375},
-{3247249,3886695,3886465,0.0889833333333333,0.103335483870968},
-{3247250,3886732,3886695,0.0297652173913044,0.0297652173913044},
-{3251885,3876852,3876847,0.0258428571428571,0.0258428571428571},
-{3251886,3876847,3876743,0.620357142857143,0.620357142857143},
-{3251887,3876743,3876734,0.0559714285714286,0.0559714285714286},
-{3251931,3892623,3891210,1000000,1000000},
-{3251972,3891925,3892510,1000000,1000000},
-{3251975,3891454,3891457,1000000,1000000},
-{3251976,3892592,3891991,1000000,1000000},
-{3252061,3873130,3873387,1000000,1000000},
-{3252085,3871102,3871369,1000000,1000000},
-{3252087,3871102,3871277,1000000,1000000},
-{3252111,3870896,3871063,1000000,1000000},
-{3252165,3852381,3853238,0.351355555555556,0.351355555555556},
-{3252166,3854496,3854194,0.668976923076923,0.668976923076923},
-{3252167,3854518,3854496,0.355007142857143,0.355007142857143},
-{3252168,3854543,3854518,0.209647058823529,0.209647058823529},
-{3252169,3862025,3862741,1000000,1000000},
-{3252170,3861756,3861548,1000000,1000000},
-{3252172,3861083,3861597,0.54261,0.54261},
-{3252173,3847896,3847766,0.0788,0.0788},
-{3252180,3850314,3852072,1.0116,1.0116},
-{3252186,3847766,3847689,0.0987555555555556,0.0987555555555556},
-{3252191,3879982,3880012,1000000,1000000},
-{3252192,3880012,3880077,1000000,1000000},
-{3252377,3865259,3865983,1000000,1000000},
-{3252379,3865259,3865725,1000000,1000000},
-{3252380,3865259,3864549,1000000,1000000},
-{3252381,3865259,3864943,1000000,1000000},
-{3252616,3904048,3905300,1.26813,1.26813},
-{3252617,3905300,3905325,0.0194,0.0194},
-{3252618,3885965,3885961,1000000,1000000},
-{3252619,3885961,3885957,1000000,1000000},
-{3252620,3885478,3885773,0.26559,1000000},
-{3252621,3885938,3885922,0.050295652173913,1000000},
-{3252622,3882570,3882754,1000000,0.119557894736842},
-{3252623,3882754,3882819,1000000,0.0402947368421053},
-{3252624,3882570,3882383,0.148575,1000000},
-{3252625,3882383,3882349,0.0333333333333333,1000000},
-{3252696,3870350,3870352,0.00926666666666667,1000000},
-{3252697,3870352,3870353,0.147222222222222,1000000},
-{3252725,3873845,3874561,0.352177777777778,0.352177777777778},
-{3252726,3874338,3874311,0.147218181818182,0.0899666666666667},
-{3252741,3874980,3874751,0.0969310344827586,0.23425},
-{3252742,3874751,3874265,0.122946666666667,0.14952972972973},
-{3252743,3874980,3874922,0.1032,1000000},
-{3252744,3874922,3874734,0.2352,1000000},
-{3252745,3874751,3874922,0.168155555555556,0.168155555555556},
-{3252754,3918883,3918622,0.136944,1000000},
-{3252755,3862105,3862788,0.351730434782609,0.351730434782609},
-{3252756,3862788,3863025,0.12292,0.167618181818182},
-{3252757,3862788,3862305,0.229822222222222,0.229822222222222},
-{3252760,3918622,3918269,0.189189795918367,1000000},
-{3252761,3918269,3917929,0.164212903225806,1000000},
-{3252762,3862324,3862137,0.102565714285714,0.1158},
-{3252763,3862137,3862055,0.0656294117647059,0.06973125},
-{3252766,3862055,3861888,0.125422222222222,0.125422222222222},
-{3252767,3861888,3861831,0.0386888888888889,0.0386888888888889},
-{3252768,3862137,3861888,0.188311111111111,0.188311111111111},
-{3252769,3862946,3862620,0.215791304347826,0.198528},
-{3252770,3862620,3862568,0.0211071428571429,0.01846875},
-{3252771,3862540,3862620,0.066,0.066},
-{3252776,3849790,3849521,0.0680423076923077,0.0667584905660377},
-{3252777,3849521,3849313,0.0549529411764706,0.0549529411764706},
-{3252784,3854655,3854371,0.134444444444444,0.134444444444444},
-{3252785,3917773,3917929,1000000,0.0715011235955056},
-{3252786,3917704,3917831,0.0561133333333333,1000000},
-{3252787,3917831,3918160,0.165032258064516,1000000},
-{3252794,3858043,3857904,1000000,1000000},
-{3252807,3854551,3854298,0.20361,0.193914285714286},
-{3252808,3854298,3854903,0.90531,0.90531},
-{3252828,3917151,3917773,1000000,0.221944186046512},
-{3252860,3916187,3916254,1000000,0.0180311688311688},
-{3252861,3866237,3866233,0.0365647058823529,0.0296},
-{3252862,3866233,3866234,0.0326666666666667,0.0267272727272727},
-{3252863,3864128,3864183,0.146123076923077,0.0904571428571428},
-{3252866,3871913,3871747,0.261307692307692,0.248560975609756},
-{3252870,3871747,3871740,0.0205066666666667,0.0205066666666667},
-{3252875,3852800,3851509,2.01785454545455,2.01785454545455},
-{3252876,3851509,3851640,0.0543473684210526,0.0480279069767442},
-{3252877,3851509,3850248,0.576654545454545,0.576654545454545},
-{3252901,3875808,3874680,1.33146666666667,1.33146666666667},
-{3252902,3874680,3873874,0.349355555555556,0.349355555555556},
-{3252903,3873874,3873970,0.398292307692308,0.388335},
-{3252904,3873970,3873790,0.12267,0.106669565217391},
-{3252905,3873970,3874880,0.753066666666667,0.753066666666667},
-{3252913,3915369,3913887,1000000,0.289548648648649},
-{3252915,3915500,3915521,1000000,0.00663243243243243},
-{3252916,3915521,3915727,1000000,0.0426081081081081},
-{3252917,3915696,3915797,0.024152,1000000},
-{3252918,3913638,3914399,1000000,0.1272},
-{3252921,3901839,3901249,0.492761538461538,0.492761538461538},
-{3252922,3901412,3901687,1000000,0.0628775510204082},
-{3252933,3907573,3907865,1000000,0.058959375},
-{3252934,3907865,3908287,1000000,0.0840272727272727},
-{3252971,3875035,3874973,1000000,0.08628},
-{3252972,3874973,3874807,1000000,0.2751},
-{3253009,3898631,3898825,1000000,0.0816625},
-{3253010,3898825,3899545,1000000,0.2401},
-{3253027,3897857,3898095,1000000,0.0960738461538461},
-{3253028,3898095,3898149,1000000,0.0451741935483871},
-{3253031,3895450,3895915,1000000,0.213372972972973},
-{3253066,3898557,3898624,0.022,1000000},
-{3253206,3866488,3866510,0.0191368421052632,1000000},
-{3253207,3865983,3866203,0.136107692307692,1000000},
-{3253208,3866203,3866488,0.179825,1000000},
-{3253274,3901421,3901975,0.162552631578947,1000000},
-{3253365,3871888,3872292,1000000,0.16449375},
-{3254727,3881657,3882743,0.89718,0.89718},
-{3254729,3881841,3882017,0.68439,0.68439},
-{3254730,3881841,3882017,1.12674,1.12674},
-{3254820,3877890,3878216,0.201355555555556,0.201355555555556},
-{3255181,3865305,3865312,1000000,0.0264566037735849},
-{3255182,3874771,3874744,0.0068,1000000},
-{3255183,3873710,3873991,1000000,0.235885714285714},
-{3255184,3873991,3874044,1000000,0.0887076923076923},
-{3255282,3886977,3887691,1000000,0.386007692307692},
-{3255283,3887691,3888381,1000000,0.372675},
-{3255333,3889246,3889237,0.0189833333333333,0.0253111111111111},
-{3255528,3881657,3881841,0.19584,0.19584},
-{3255583,3894228,3894549,0.475125,0.584769230769231},
-{3255584,3894549,3894914,0.397757142857143,0.397757142857143},
-{3255585,3894532,3894549,0.0335538461538462,0.0242333333333333},
-{3255589,3894743,3894825,0.0425345454545455,1000000},
-{3255626,3881767,3882011,1000000,1000000},
-{3255627,3916771,3916791,0.00646153846153846,1000000},
-{3255628,3916801,3916824,1000000,0.0055425},
-{3255629,3916824,3917151,1000000,0.0941341463414634},
-{3255630,3897605,3897842,0.123678260869565,1000000},
-{3255677,3912954,3912886,0.018,1000000},
-{3255678,3912886,3912673,0.0732705882352941,1000000},
-{3255679,3913015,3912957,1000000,0.0183},
-{3255680,3912957,3912749,1000000,0.0861428571428571},
-{3255682,3870108,3870107,0.0391272727272727,0.0416516129032258},
-{3255683,3870107,3870092,0.126716666666667,0.130337142857143},
-{3255684,3869924,3869627,1000000,0.108985714285714},
-{3255685,3869627,3869451,1000000,0.0451666666666667},
-{3255686,3870551,3870814,0.17315,1000000},
-{3255687,3870814,3870832,0.0182,1000000},
-{3255688,3871318,3871246,1000000,0.0142461538461538},
-{3255689,3871246,3870551,1000000,0.161546341463415},
-{3255690,3872078,3872074,0.011895652173913,1000000},
-{3255691,3872074,3872065,0.0431181818181818,1000000},
-{3255713,3875100,3875615,0.199545,1000000},
-{3255742,3895478,3895553,1000000,1000000},
-{3255743,3895553,3895773,1000000,1000000},
-{3256819,3850997,3851116,0.178657894736842,1000000},
-{3256855,3850997,3851006,0.00699642857142857,0.0081625},
-{3256856,3851006,3851012,0.00555,0.00634285714285714},
-{3256877,3852861,3850696,0.254935483870968,1000000},
-{3256878,3851012,3851040,0.0203571428571429,0.023265306122449},
-{3258289,3906450,3906554,0.0344735294117647,0.036628125},
-{3258320,3893726,3893718,0.0158076923076923,0.0178695652173913},
-{3258321,3893718,3893721,0.0345555555555556,0.038875},
-{3258322,3892585,3892452,0.348622222222222,0.348622222222222},
-{3258564,3858506,3858376,1000000,0.0770545454545455},
-{3258565,3858376,3858060,1000000,0.100062857142857},
-{3258578,3880826,3880897,0.0723652173913043,0.0616444444444444},
-{3258579,3880897,3880905,0.01779,0.0127071428571429},
-{3258585,3859690,3859670,0.039,0.0455},
-{3258591,3895193,3895223,1000000,0.0221162790697674},
-{3258592,3895223,3895278,1000000,0.0334975609756098},
-{3258599,3862066,3862288,0.09084,1000000},
-{3258600,3862285,3862288,0.0251625,0.0277655172413793},
-{3258603,3897482,3897421,1000000,0.0566666666666667},
-{3258604,3897421,3897316,1000000,0.0722470588235294},
-{3258605,3864376,3864277,0.0428338983050847,1000000},
-{3258608,3897523,3897503,1000000,0.0380869565217391},
-{3258609,3897503,3897482,1000000,0.0255714285714286},
-{3258615,3861084,3860898,0.0636857142857143,1000000},
-{3258616,3860898,3860691,0.166869230769231,1000000},
-{3258635,3858010,3858393,0.0650584615384615,0.0650584615384615},
-{3258638,3855377,3858010,0.38718,0.38172676056338},
-{3258639,3854860,3855377,0.0936090909090909,0.0922119402985075},
-{3258644,3857731,3856967,0.145298360655738,0.145298360655738},
-{3258645,3897968,3898191,0.0369784615384615,1000000},
-{3258647,3858091,3858037,1000000,0.03808},
-{3258812,3863037,3862999,0.0187733333333333,1000000},
-{3258815,3863196,3863078,0.0368634146341463,1000000},
-{3258816,3863078,3863037,0.0155581395348837,1000000},
-{3258821,3863078,3863093,0.0225111111111111,0.04052},
-{3258823,3863093,3863203,0.036645,1000000},
-{3258824,3862999,3863056,0.0209230769230769,1000000},
-{3258825,3863056,3863093,0.0136615384615385,1000000},
-{3258838,3898063,3898083,0.0184029850746269,1000000},
-{3258839,3916791,3917103,0.0877139240506329,1000000},
-{3258840,3917103,3917704,0.233887058823529,1000000},
-{3258885,3865075,3865310,0.041272131147541,0.0375761194029851},
-{3258886,3865310,3865526,0.04674375,0.0427371428571429},
-{3258915,3874612,3874519,1000000,0.0753073170731707},
-{3258950,3858091,3858072,1000000,0.0380842105263158},
-{3258951,3858072,3857983,1000000,0.0793684210526316},
-{3258952,3858011,3858072,0.041,0.025448275862069},
-{3258953,3858621,3858568,1000000,1000000},
-{3258954,3887561,3887939,1000000,0.054534375},
-{3258955,3887939,3888729,1000000,0.130347540983607},
-{3258960,3881829,3882237,1000000,0.0797076923076923},
-{3258961,3882237,3882406,1000000,0.031934328358209},
-{3258962,3881336,3881566,1000000,0.0351666666666667},
-{3258963,3881566,3881829,1000000,0.0381166666666667},
-{3258964,3877642,3878303,1000000,0.122368965517241},
-{3258965,3878303,3878353,1000000,0.008596875},
-{3258988,3865174,3865024,0.03129,1000000},
-{3258989,3864277,3863812,0.195764516129032,1000000},
-{3258990,3863812,3863783,0.00650476190476191,1000000},
-{3259153,3865816,3866117,0.172660465116279,0.148488},
-{3259154,3865659,3865750,0.110902702702703,0.082068},
-{3259155,3869221,3869443,1000000,1000000},
-{3259156,3870427,3870147,0.4112,0.4112},
-{3259157,3870147,3870057,0.16844347826087,0.16844347826087},
-{3259158,3863097,3863143,0.179111111111111,0.179111111111111},
-{3259159,3863221,3863239,0.0357111111111111,0.0357111111111111},
-{3259163,3866134,3866319,1000000,0.268121739130435},
-{3259168,3860070,3859873,0.122589473684211,0.110914285714286},
-{3259169,3859873,3859120,1000000,1000000},
-{3259170,3859262,3859120,0.073,0.073},
-{3259171,3859793,3859365,0.249066666666667,0.249066666666667},
-{3259172,3859262,3859365,0.105622222222222,1000000},
-{3259173,3859365,3859262,0.114355555555556,1000000},
-{3259178,3866886,3865807,0.517875,1000000},
-{3259179,3865890,3865869,1000000,0.013025},
-{3259180,3865869,3865684,1000000,0.0996387096774193},
-{3259181,3865807,3865869,0.11535,1000000},
-{3259182,3871312,3871175,0.0370645161290323,0.0396206896551724},
-{3259183,3871175,3871140,0.00978181818181818,0.0104129032258065},
-{3259184,3871175,3871170,0.0491454545454545,0.03604},
-{3259185,3871170,3870966,1000000,0.322133333333333},
-{3259186,3870966,3871170,1000000,0.8664},
-{3259193,3921504,3921522,0.237771428571429,0.2628},
-{3259194,3921522,3921414,0.0688222222222222,0.0688222222222222},
-{3259195,3921522,3921643,0.0926,0.0926},
-{3259196,3921643,3921771,0.134652631578947,0.12792},
-{3259202,3918582,3919049,0.209722222222222,0.202232142857143},
-{3259203,3919049,3919171,0.0934166666666667,0.0715531914893617},
-{3259204,3918647,3919049,0.433478571428571,1000000},
-{3259205,3918497,3918647,1000000,0.14816},
-{3259206,3919049,3918497,0.40818,1000000},
-{3259211,3874239,3874259,1000000,0.0695785714285714},
-{3259212,3874744,3874368,0.132382978723404,1000000},
-{3259213,3874368,3874300,0.0231714285714286,1000000},
-{3259232,3889996,3890180,0.089955,0.0705529411764706},
-{3259233,3890180,3890299,0.0764709677419355,0.0483795918367347},
-{3259234,3893901,3893981,0.063552,1000000},
-{3259235,3893981,3893961,0.137052631578947,0.1085},
-{3259236,3893901,3894031,0.034608,0.0455368421052632},
-{3259237,3894031,3898728,1.22264081632653,1.27466808510638},
-{3259238,3893981,3894031,0.0425727272727273,0.04683},
-{3259253,3890676,3890905,0.0882489795918367,0.0920042553191489},
-{3259254,3890557,3890676,1000000,1000000},
-{3259260,3888066,3888724,0.3226,1000000},
-{3259263,3894125,3894204,0.0406,0.0553636363636364},
-{3259265,3895279,3895391,0.42759,1000000},
-{3259266,3895391,3895393,0.0363142857142857,1000000},
-{3259267,3897851,3897929,1000000,0.0355333333333333},
-{3259268,3897929,3897969,1000000,0.0130730769230769},
-{3259269,3897039,3897391,0.419285714285714,0.419285714285714},
-{3259270,3897391,3897419,0.0408352941176471,0.0330571428571429},
-{3259271,3895393,3895614,1000000,0.0822382978723404},
-{3259283,3920047,3920613,0.127483636363636,0.129844444444444},
-{3259294,3882245,3882686,1000000,1000000},
-{3259299,3919649,3919485,0.30696,1000000},
-{3259300,3919485,3919808,0.112579591836735,1000000},
-{3259314,3894820,3894890,1000000,0.0461333333333333},
-{3259317,3895484,3895345,0.105915789473684,0.105915789473684},
-{3259318,3895345,3895135,0.115733333333333,0.115733333333333},
-{3259319,3895135,3895115,0.0945789473684211,0.105705882352941},
-{3259320,3909800,3910479,0.300911111111111,0.300911111111111},
-{3259321,3910572,3910581,0.0135157894736842,0.0135157894736842},
-{3259322,3910581,3910671,0.171144,0.171144},
-{3259323,3910479,3910581,0.0356222222222222,0.0356222222222222},
-{3259324,3910450,3910557,0.14245,0.14245},
-{3259325,3910557,3910572,0.0133105263157895,0.0133105263157895},
-{3259326,3910479,3910557,0.0404222222222222,0.0404222222222222},
-{3259381,3883606,3884321,0.214413333333333,0.224386046511628},
-{3259382,3884321,3884726,0.128328571428571,0.128328571428571},
-{3259473,3897216,3896483,0.263036842105263,1000000},
-{3259484,3892152,3892370,1000000,0.0505698113207547},
-{3259485,3892370,3892482,1000000,0.0306875},
-{3259554,3877153,3877170,0.0292754716981132,1000000},
-{3259555,3877170,3877322,0.09445,1000000},
-{3259561,3898630,3899176,0.208450909090909,1000000},
-{3259562,3899176,3899403,0.125595,1000000},
-{3259587,3899859,3900092,1000000,0.0550730769230769},
-{3259588,3900092,3900382,1000000,0.0712040816326531},
-{3259593,3900041,3900375,0.12932,1000000},
-{3259595,3900375,3900413,0.0187945945945946,1000000},
-{3259596,3865000,3865208,0.105952941176471,1000000},
-{3259597,3865208,3865251,0.0186,1000000},
-{3259603,3858835,3858246,0.0826235294117647,1000000},
-{3259620,3854609,3854154,0.05735,1000000},
-{3259621,3854154,3852861,0.166818947368421,1000000},
-{3259625,3851082,3851520,1000000,0.1131625},
-{3259628,3851076,3851089,0.0693066666666667,1000000},
-{3259629,3852663,3852148,1000000,0.0531489795918367},
-{3259630,3852148,3850854,1000000,0.149248484848485},
-{3259631,3853169,3852663,1000000,0.0565469387755102},
-{3259633,3854600,3854471,1000000,0.0169175257731959},
-{3259634,3854471,3853169,1000000,0.163620618556701},
-{3259659,3870386,3870436,0.20679,0.20679},
-{3259660,3870386,3870556,0.11262,0.11262},
-{3259670,3897931,3898090,0.0591882352941177,1000000},
-{3259678,3900726,3900691,0.0121411764705882,0.02064},
-{3259679,3900657,3900691,0.0276905660377359,0.0312255319148936},
-{3259680,3900726,3900657,0.0446571428571429,1000000},
-{3259681,3898566,3898590,0.0130838709677419,0.00965714285714286},
-{3259682,3898590,3898645,0.0214645161290323,0.02218},
-{3259683,3898590,3898554,0.01495,1000000},
-{3259684,3898590,3898575,1000000,0.0187818181818182},
-{3259685,3921643,3921771,0.180911111111111,0.180911111111111},
-{3259686,3892022,3891756,0.080064,1000000},
-{3259687,3891756,3891146,0.212815384615385,1000000},
-{3259688,3891160,3891788,0.185647826086957,1000000},
-{3259689,3891788,3892358,0.178251063829787,1000000},
-{3259690,3891756,3891788,0.0279777777777778,0.0279777777777778},
-{3259691,3889266,3889361,0.0246558139534884,1000000},
-{3259692,3889361,3889620,0.0727857142857143,1000000},
-{3259693,3888715,3889414,1000000,1000000},
-{3259694,3889414,3890443,1000000,1000000},
-{3259695,3889361,3889380,0.128485714285714,0.13491},
-{3259696,3889380,3889414,0.0861555555555556,0.0861555555555556},
-{3259697,3890152,3890242,0.044375,1000000},
-{3259698,3890242,3890287,0.0196344827586207,1000000},
-{3259699,3883658,3883850,1000000,0.092775},
-{3259700,3883850,3883966,1000000,0.122664},
-{3259702,3912951,3921618,1.74692658227848,1000000},
-{3259705,3880909,3880950,1000000,0.01534},
-{3259706,3880950,3881114,1000000,0.0654967741935484},
-{3259717,3851520,3851718,1000000,0.0405684210526316},
-{3259718,3851718,3852861,1000000,0.19507},
-{3259727,3871436,3871416,0.04428,0.04428},
-{3259728,3871416,3871214,0.355133333333333,1000000},
-{3259729,3871416,3871214,1000000,0.341644444444444},
-{3259767,3865687,3865292,1000000,0.187690909090909},
-{3259768,3865292,3864724,1000000,0.215990322580645},
-{3259769,3864514,3863983,1000000,0.215154098360656},
-{3259770,3892497,3892675,0.0443411764705882,1000000},
-{3259771,3892675,3893565,0.213,1000000},
-{3259792,3866780,3866422,1000000,0.180644444444444},
-{3259796,3872888,3869246,0.530336842105263,0.537408},
-{3259805,3906554,3906734,0.0520208955223881,0.0562161290322581},
-{3259806,3906734,3906789,0.0108636363636364,0.0117540983606557},
-{3259871,3862127,3862737,0.2988,0.2988},
-{3259876,3892875,3892938,0.0247272727272727,0.0354782608695652},
-{3259877,3892938,3893379,0.367311111111111,0.33058},
-{3259878,3894694,3895900,0.614717647058824,0.614717647058824},
-{3259988,3886274,3886148,1000000,0.13554375},
-{3259989,3886274,3886060,0.132313846153846,1000000},
-{3259992,3890114,3890226,1000000,0.0327857142857143},
-{3259994,3880905,3881114,0.283071428571429,1000000},
-{3259995,3880905,3880834,0.15688,1000000},
-{3259996,3880905,3881183,1000000,0.162331034482759},
-{3260035,3881584,3881592,0.0320869565217391,1000000},
-{3260302,3895139,3895135,0.110466666666667,0.110466666666667},
-{3260303,3895345,3895139,0.215844444444444,0.215844444444444},
-{3260329,3849512,3848589,1000000,0.147658064516129},
-{3260330,3848589,3848476,1000000,0.0246574468085106},
-{3260331,3848476,3848248,1000000,0.0344273684210526},
-{3260332,3848248,3847374,1000000,0.136124210526316},
-{3260433,3896707,3896550,0.17724,0.17724},
-{3260434,3896550,3896545,0.325311111111111,0.325311111111111},
-{3260435,3896550,3896183,0.247,0.247},
-{3260458,3873358,3873485,1000000,0.0362372093023256},
-{3260666,3881536,3881496,0.0283941176470588,1000000},
-{3260667,3881563,3881543,0.0152903225806452,1000000},
-{3260781,3901283,3901309,0.0266033898305085,0.0327},
-{3260782,3901309,3901516,0.264440625,0.272970967741935},
-{3260935,3894056,3894167,0.0851803278688524,0.0851803278688524},
-{3260947,3891812,3891926,1000000,0.0674836363636364},
-{3260948,3891926,3892016,0.0632,0.0741913043478261},
-{3260953,3891926,3891745,1000000,0.0778375},
-{3260954,3891745,3891406,1000000,0.208214285714286},
-{3260955,3891812,3891745,0.0423692307692308,0.06885},
-{3260960,3891406,3891704,1000000,0.0946761904761905},
-{3260961,3891704,3891812,1000000,0.0493448275862069},
-{3260995,3888710,3888964,0.0919888888888889,0.105689361702128},
-{3260996,3888964,3889406,0.15714,0.171425454545455},
-{3260997,3888450,3888675,0.091476,0.0933428571428572},
-{3260998,3888675,3888710,0.01962,0.0204375},
-{3261046,3889406,3889551,0.0568451612903226,0.0629357142857143},
-{3261047,3889551,3890061,0.185070967741935,0.194481355932203},
-{3261059,3890221,3890341,0.0488861538461539,0.0676085106382979},
-{3261060,3890341,3891406,0.383,0.414393442622951},
-{3261067,3892740,3892891,0.0647311475409836,0.0598272727272727},
-{3261068,3892891,3894056,0.680281818181818,0.650704347826087},
-{3261072,3894618,3894508,1000000,0.131421052631579},
-{3261076,3894956,3895101,0.0566142857142857,1000000},
-{3261151,3895822,3896024,1000000,0.0490408163265306},
-{3261370,3875698,3876057,0.091524,0.0880038461538461},
-{3261371,3876057,3876530,0.10632,0.104421428571429},
-{3261405,3916743,3917078,1000000,1000000},
-{3261406,3915671,3916743,1000000,1000000},
-{3261418,3899187,3899307,1000000,0.0493368421052632},
-{3261429,3850898,3850904,0.0915428571428571,0.0723483870967742},
-{3261430,3860641,3860394,1000000,0.0424},
-{3261454,3864644,3864504,0.038821052631579,0.0514604651162791},
-{3261455,3864504,3864400,0.0200285714285714,0.0257510204081633},
-{3261456,3898510,3898991,1000000,0.12746511627907},
-{3261457,3898991,3899361,1000000,0.103107692307692},
-{3261458,3899361,3899638,1000000,0.0871692307692308},
-{3261459,3897391,3897671,0.127427586206897,1000000},
-{3261460,3897419,3897671,1000000,0.0979230769230769},
-{3261461,3897671,3897727,0.0342,0.0201692307692308},
-{3263519,3876508,3876074,0.146472727272727,0.146472727272727},
-{3263520,3876074,3875930,0.0544909090909091,0.0544909090909091},
-{3264021,3889671,3889734,0.0349,0.0465333333333333},
-{3264056,3889664,3889734,1000000,0.0319317073170732},
-{3264058,3889734,3889849,1000000,0.0563027027027027},
-{3264059,3889849,3890415,1000000,0.253922727272727},
-{3264068,3890351,3890415,0.0366521739130435,0.0526875},
-{3264069,3890415,3890590,0.15864,0.2644},
-{3264077,3891003,3890759,0.113272340425532,1000000},
-{3264078,3890759,3890415,0.156687804878049,1000000},
-{3264088,3894204,3895038,0.283758139534884,1000000},
-{3264089,3895038,3895391,0.118408695652174,1000000},
-{3264090,3895038,3895047,0.02388,0.02388},
-{3264093,3894204,3895047,1000000,0.319736842105263},
-{3264094,3895047,3895393,1000000,0.107522448979592},
-{3265429,3865536,3865489,0.0254076923076923,1000000},
-{3265430,3864023,3863237,0.437945454545455,0.535266666666667},
-{3265431,3863636,3864023,0.292428571428571,0.24564},
-{3265432,3864023,3864025,0.0208222222222222,0.0208222222222222},
-{3265433,3864244,3864122,0.08013,0.103393548387097},
-{3265434,3867998,3867421,0.233688,0.216377777777778},
-{3265435,3867421,3867378,0.0180230769230769,0.0203739130434783},
-{3265436,3864913,3864903,0.00584,0.00515294117647059},
-{3265437,3864903,3864284,0.353177777777778,0.340564285714286},
-{3265438,3866809,3864963,0.7234,1000000},
-{3265439,3864963,3864913,0.0201642857142857,0.0171090909090909},
-{3265440,3865892,3866209,0.205341176470588,0.205341176470588},
-{3265441,3866209,3866257,0.0191181818181818,0.0145034482758621},
-{3265442,3871421,3871204,0.429709090909091,0.429709090909091},
-{3265443,3871204,3871141,0.0621777777777778,0.08394},
-{3265444,3869457,3869392,0.035625,0.035625},
-{3265445,3869392,3869308,0.0458,0.0437181818181818},
-{3265446,3869290,3869225,0.035751724137931,0.035751724137931},
-{3265447,3869225,3869139,0.03555,0.0366967741935484},
-{3265448,3867839,3868174,0.251431578947368,1000000},
-{3265449,3868174,3868265,0.0663142857142857,1000000},
-{3265450,3868197,3867916,1000000,0.113530434782609},
-{3265451,3867916,3867846,1000000,0.0378857142857143},
-{3265452,3868053,3868041,0.0124181818181818,0.0124181818181818},
-{3265453,3868041,3867790,0.267771428571429,0.267771428571429},
-{3265454,3871867,3871963,0.3621,1000000},
-{3265455,3871963,3871981,0.0161111111111111,1000000},
-{3265456,3872440,3872466,1000000,0.0199454545454545},
-{3265457,3870691,3870698,1000000,0.04749},
-{3265458,3870698,3870701,1000000,0.275166666666667},
-{3265459,3869625,3869557,1000000,0.0338666666666667},
-{3265460,3869557,3869200,1000000,0.179242105263158},
-{3265461,3868846,3868039,1000000,0.334513043478261},
-{3265462,3868039,3867993,1000000,0.0197714285714286},
-{3265463,3871410,3871199,1000000,0.0592125},
-{3265464,3871199,3871122,1000000,0.0209272727272727},
-{3265465,3871193,3871116,0.0254666666666667,1000000},
-{3265466,3871116,3870812,0.133226086956522,1000000},
-{3265467,3871398,3871287,0.0364344827586207,1000000},
-{3265468,3871287,3871193,0.0274137931034483,1000000},
-{3265469,3868831,3868631,0.0391866666666667,1000000},
-{3265470,3868631,3867784,0.207245454545455,1000000},
-{3265471,3863490,3863474,0.01308,0.0148636363636364},
-{3265472,3863474,3863397,0.07902,0.112885714285714},
-{3265473,3864710,3864662,0.0401833333333333,1000000},
-{3265474,3864662,3864611,0.040845,1000000},
-{3265475,3869405,3869419,0.0104297872340426,1000000},
-{3265476,3869419,3869749,0.493357894736842,1000000},
-{3265477,3867740,3867452,0.365914285714286,1000000},
-{3265478,3867452,3867433,0.0256153846153846,1000000},
-{3265479,3872314,3872230,0.035625,0.0475},
-{3265480,3872230,3871324,0.33425,0.364636363636364},
-{3265481,3874466,3874419,0.0159636363636364,1000000},
-{3265482,3874419,3874386,0.0119314285714286,1000000},
-{3265483,3877615,3877581,0.024432,0.0234923076923077},
-{3265484,3877581,3877218,0.319777777777778,0.297724137931035},
-{3265485,3868210,3868186,1000000,1000000},
-{3265486,3868186,3867917,1000000,1000000},
-{3265487,3893787,3894147,1000000,0.12105306122449},
-{3265488,3894269,3894247,1000000,0.1840125},
-{3265489,3894247,3894238,1000000,0.02444},
-{3265490,3890300,3890587,1000000,0.101381818181818},
-{3265491,3890587,3890609,1000000,0.00728571428571429},
-{3265492,3890609,3890627,1000000,0.006},
-{3265493,3869701,3869586,1000000,1000000},
-{3265494,3869586,3869186,1000000,1000000},
-{3265495,3892241,3892315,0.0175857142857143,0.0180146341463415},
-{3265496,3892315,3892464,0.0440454545454545,0.0472682926829268},
-{3265497,3879974,3879779,0.184539130434783,1000000},
-{3265498,3879779,3879761,0.0145846153846154,1000000},
-{3265499,3878488,3878554,0.0211941176470588,0.0343142857142857},
-{3265500,3878554,3878778,0.0801272727272727,0.120190909090909},
-{3265501,3889101,3889699,0.21656,0.209574193548387},
-{3265502,3889699,3889780,0.0338,0.0480315789473684},
-{3265503,3888849,3888880,0.02445,0.0201352941176471},
-{3265504,3888880,3889101,0.151593103448276,0.13738125},
-{3265505,3878483,3878450,1000000,0.0435882352941176},
-{3265506,3878450,3878438,1000000,0.022944},
-{3265507,3887371,3888040,0.32271,0.2082},
-{3265508,3888040,3888116,0.02786,0.033432},
-{3265509,3887524,3887552,1000000,0.017425},
-{3265510,3887552,3887866,1000000,0.36825},
-{3265511,3880951,3880995,1000000,0.0499666666666667},
-{3265512,3880995,3881028,1000000,0.0368526315789474},
-{3265513,3881127,3881090,1000000,0.0496415094339623},
-{3265514,3881090,3881063,1000000,0.0243882352941176},
-{3265515,3887577,3887545,0.0405333333333333,0.0405333333333333},
-{3265516,3887545,3887107,0.171553846153846,0.22302},
-{3265517,3878714,3878751,0.0281333333333333,0.0266526315789474},
-{3265518,3878751,3879100,0.297092307692308,0.2413875},
-{3265519,3879416,3879506,1000000,1000000},
-{3265520,3879506,3879592,1000000,1000000},
-{3265521,3881904,3882163,1000000,1000000},
-{3265522,3877339,3877573,1000000,1000000},
-{3265523,3877573,3877636,1000000,1000000},
-{3265524,3877636,3877978,1000000,1000000},
-{3265525,3877978,3877995,1000000,1000000},
-{3265526,3872154,3871552,0.1487625,1000000},
-{3265527,3870250,3870291,1000000,0.0188608695652174},
-{3265528,3870291,3871063,1000000,0.297212903225806},
-{3265529,3881182,3881196,1000000,0.0116285714285714},
-{3265530,3881196,3881276,1000000,0.0471272727272727},
-{3265531,3868965,3869360,1000000,0.208539130434783},
-{3265532,3868418,3868965,0.255914285714286,0.282852631578947},
-{3265533,3869376,3869021,1000000,0.147761538461538},
-{3265534,3869021,3868889,0.0843777777777778,0.0843777777777778},
-{3265535,3881599,3881574,0.051025,1000000},
-{3265536,3880104,3880199,0.0525090909090909,1000000},
-{3265537,3882562,3882595,1000000,0.0172},
-{3265538,3882595,3883341,1000000,0.40191},
-{3265539,3879040,3879122,1000000,0.0666545454545455},
-{3265540,3879122,3879171,1000000,0.02556},
-{3265541,3869559,3869160,0.123754838709677,0.123754838709677},
-{3265542,3869160,3869123,0.0230526315789474,0.0365},
-{3265543,3871235,3871210,0.0127125,0.0113},
-{3265544,3861562,3861887,0.1713,0.123716666666667},
-{3265545,3861887,3862018,1000000,0.0565034482758621},
-{3265546,3862967,3862530,0.158271428571429,0.166185},
-{3265547,3862530,3862222,0.125967567567568,1000000},
-{3265548,3862222,3862148,0.0445071428571429,1000000},
-{3265549,3862148,3862018,0.0702,1000000},
-{3265550,3861887,3861997,0.059136,1000000},
-{3265551,3862018,3861997,0.0268,0.0268},
-{3265552,3861997,3862109,0.0546,1000000},
-{3265553,3862205,3862530,0.10280487804878,1000000},
-{3265554,3894372,3894463,1000000,0.0582620689655172},
-{3265555,3894463,3894506,1000000,0.0303692307692308},
-{3265556,3862582,3862659,0.110314285714286,1000000},
-{3265557,3862952,3862750,0.0998785714285714,1000000},
-{3265558,3862750,3862582,0.0546461538461539,1000000},
-{3265559,3862659,3862750,0.0518307692307692,0.053904},
-{3265560,3862659,3862864,0.162218181818182,1000000},
-{3265561,3862864,3863249,0.371541176470588,1000000},
-{3265568,3864013,3864015,0.01665,1000000},
-{3265569,3884258,3884273,0.007,1000000},
-{3265570,3884273,3884348,0.04755,1000000},
-{3265571,3881193,3881680,1000000,0.204144827586207},
-{3265572,3881680,3881716,1000000,0.0118444444444444},
-{3265576,3872529,3872537,0.0170926829268293,1000000},
-{3265577,3869492,3869517,1000000,0.0118857142857143},
-{3265578,3869517,3869839,1000000,0.232756097560976},
-{3265579,3874444,3874402,1000000,0.0225130434782609},
-{3265582,3870673,3871012,0.319671428571429,1000000},
-{3265583,3871012,3871041,0.0181333333333333,1000000},
-{3265584,3871941,3871858,1000000,1000000},
-{3265585,3871858,3871683,1000000,1000000},
-{3265586,3871210,3872199,0.2959875,1000000},
-{3265587,3872199,3872246,0.015375,1000000},
-{3265588,3863525,3862764,0.510844444444445,0.510844444444445},
-{3265589,3862764,3862732,0.0168666666666667,0.0168666666666667},
-{3265590,3870384,3870285,1000000,0.0273473684210526},
-{3265591,3870181,3870082,0.0196723404255319,1000000},
-{3265592,3878429,3878400,0.029075,1000000},
-{3265593,3878400,3878386,0.00817021276595745,1000000},
-{3265817,3865251,3865233,0.07884,1000000},
-{3265818,3880542,3880623,0.0252857142857143,1000000},
-{3265819,3880623,3880713,0.0235333333333333,1000000},
-{3265820,3867052,3866720,0.157658823529412,1000000},
-{3265821,3865872,3865964,0.068375,1000000},
-{3265822,3865964,3865983,0.015792,1000000},
-{3265823,3908130,3907855,1000000,0.13056},
-{3265824,3908999,3909078,0.0142235294117647,0.0154340425531915},
-{3265825,3909078,3909590,0.120408,0.133786666666667},
-{3265826,3875629,3875764,1000000,0.0365513513513513},
-{3265827,3875764,3876030,1000000,0.0856421052631579},
-{3265828,3875668,3875613,1000000,0.09148125},
-{3265829,3875613,3875585,1000000,0.0406071428571428},
-{3265990,3890154,3890185,1000000,1000000},
-{3265991,3890185,3890198,1000000,1000000},
-{3265992,3890198,3890859,1000000,1000000},
-{3265993,3865133,3864978,0.0473142857142857,1000000},
-{3265994,3864978,3864901,0.0290057142857143,1000000},
-{3265995,3879581,3879803,1000000,1.104},
-{3266021,3878288,3878338,0.0558972972972973,1000000},
-{3266022,3878338,3878372,0.0284,1000000},
-{3266023,3878193,3878280,0.127409302325581,0.161135294117647},
-{3266024,3878280,3878288,0.0130390243902439,0.0157235294117647},
-{3266025,3865272,3865178,1000000,0.0442695652173913},
-{3266026,3865178,3865038,1000000,0.07512},
-{3266027,3865355,3865322,0.00619459459459459,1000000},
-{3266028,3865827,3865549,1000000,0.0790186046511628},
-{3266029,3865549,3865500,1000000,0.0183384615384615},
-{3266030,3865322,3865282,0.0119526315789474,1000000},
-{3266112,3899297,3899126,0.0627454545454545,0.0627454545454545},
-{3266113,3885911,3885919,1000000,0.00466764705882353},
-{3266114,3885919,3885972,1000000,0.0315176470588235},
-{3266115,3886060,3886050,0.0125090909090909,1000000},
-{3266116,3886148,3886116,1000000,0.0108276923076923},
-{3266117,3892691,3892958,0.0492692307692308,0.0492692307692308},
-{3266118,3899839,3899914,0.0304909090909091,0.0304909090909091},
-{3266189,3869049,3869120,0.0288,1000000},
-{3266190,3869120,3870513,0.377585714285714,1000000},
-{3266650,3866482,3866524,0.018885,1000000},
-{3266651,3866524,3866619,0.0379,1000000},
-{3266652,3866720,3866521,0.0962689655172414,1000000},
-{3266653,3866521,3866433,0.04325625,1000000},
-{3266667,3894706,3894720,0.010464,1000000},
-{3266668,3894720,3894743,0.011088,1000000},
-{3266669,3894810,3894831,1000000,0.00967826086956522},
-{3266670,3894831,3894878,1000000,0.0343826086956522},
-{3266677,3861176,3861175,0.0259,0.0227414634146341},
-{3266678,3861175,3861011,0.244663636363636,0.250353488372093},
-{3266681,3860500,3860218,0.13746,0.13746},
-{3266682,3860218,3859599,0.3834,1000000},
-{3266714,3881894,3881570,0.1766,0.12788275862069},
-{3266715,3881894,3881970,0.0286909090909091,1000000},
-{3266716,3881970,3882382,0.148994594594595,1000000},
-{3266734,3878031,3878068,0.0197793103448276,0.0197793103448276},
-{3266737,3877316,3877441,0.0671142857142857,0.081704347826087},
-{3266738,3877441,3878031,0.365275,0.337176923076923},
-{3266739,3877316,3877053,0.7934,0.7934},
-{3266740,3877316,3877331,0.132290322580645,0.110837837837838},
-{3266741,3878605,3878269,0.168422222222222,0.168422222222222},
-{3266742,3877869,3877795,0.116621739130435,0.114140425531915},
-{3266744,3877795,3877579,0.143566666666667,0.143566666666667},
-{3266745,3877685,3877315,0.124655172413793,0.150625},
-{3266746,3877579,3877315,0.357804545454545,0.357804545454545},
-{3266747,3878283,3877955,0.1516,0.1516},
-{3266748,3879450,3878435,0.649992857142857,0.649992857142857},
-{3266749,3878435,3877795,0.24052,0.232761290322581},
-{3266750,3878435,3878602,0.0853111111111111,0.0853111111111111},
-{3266752,3880849,3881093,0.27085,0.27085},
-{3266757,3860325,3860273,0.0319894736842105,0.0289428571428571},
-{3266758,3860273,3859969,0.1607,0.12856},
-{3266759,3880993,3881282,0.190307142857143,0.197355555555556},
-{3266760,3881282,3881308,0.0183652173913043,0.0201142857142857},
-{3266764,3870348,3870254,0.0654585365853659,1000000},
-{3266765,3870254,3870126,0.08817,1000000},
-{3266965,3907480,3907456,0.00624489795918367,0.00624489795918367},
-{3266966,3907456,3907118,0.0975061224489796,0.0975061224489796},
-{3267084,3860394,3860195,1000000,0.034605},
-{3267085,3860195,3859890,1000000,0.0519585365853659},
-{3267164,3908476,3910193,0.318912676056338,1000000},
-{3267165,3898624,3899517,0.269236363636364,1000000},
-{3267200,3865283,3865313,0.1002,1000000},
-{3267264,3896211,3896307,1000000,0.027134693877551},
-{3267265,3896146,3896307,1000000,0.177876923076923},
-{3267281,3891411,3891628,0.0531795918367347,1000000},
-{3267282,3891628,3891710,0.0184470588235294,1000000},
-{3267889,3895895,3895691,1000000,0.0875617021276596},
-{3267890,3895691,3895532,1000000,0.0744122448979592},
-{3267948,3865636,3864509,0.46515,1000000},
-{3267997,3899646,3899759,0.0267692307692308,1000000},
-{3267998,3885679,3886173,0.0820677966101695,1000000},
-{3267999,3886173,3886500,0.0708842105263158,1000000},
-{3268000,3886500,3886816,0.0774244897959184,1000000},
-{3268321,3900418,3900261,0.0709111111111111,0.0709111111111111},
-{3268417,3882819,3882448,1000000,0.262344},
-{3268418,3882448,3882394,1000000,0.0492444444444444},
-{3268419,3882394,3882357,1000000,0.0634588235294118},
-{3268420,3882357,3881910,1000000,0.469114285714286},
-{3268421,3885947,3885993,0.0245379310344828,0.02965},
-{3268422,3885993,3886448,0.34805,0.363182608695652},
-{3268423,3886256,3886092,1000000,0.26154},
-{3268424,3886092,3885993,1000000,0.138711111111111},
-{3268425,3891055,3891531,0.297469565217391,1000000},
-{3268429,3900807,3900812,0.02504,0.0197684210526316},
-{3268430,3900812,3900863,0.0185777777777778,0.0185777777777778},
-{3268435,3897700,3897769,0.0779666666666667,0.0779666666666667},
-{3268436,3897769,3897848,1000000,0.0773333333333333},
-{3268437,3898457,3898528,0.0503217391304348,0.0723375},
-{3268438,3898528,3898966,0.308328,1000000},
-{3268439,3897769,3898528,0.5712,1000000},
-{3268440,3859913,3859941,0.0274222222222222,0.0274222222222222},
-{3268441,3854777,3854688,0.207222857142857,0.278953846153846},
-{3268442,3854688,3854691,0.018975,0.0207},
-{3268443,3854062,3854101,0.06234375,0.0867391304347826},
-{3268444,3854101,3854111,0.00991875,0.0122076923076923},
-{3268445,3854688,3854101,0.255355555555556,0.299765217391304},
-{3268446,3854818,3854871,0.0580444444444444,0.0580444444444444},
-{3268447,3854871,3854869,1000000,0.0240444444444444},
-{3268448,3854869,3854910,1000000,0.0296666666666667},
-{3268449,3854910,3854871,1000000,0.122355555555556},
-{3268485,3850338,3850353,0.295175,0.262377777777778},
-{3268486,3850534,3850695,0.0836222222222222,0.0836222222222222},
-{3268487,3850695,3850814,0.0713428571428572,0.0516620689655172},
-{3268488,3850695,3850878,1000000,1000000},
-{3268489,3850878,3850966,1000000,1000000},
-{3268490,3853368,3853345,0.0149333333333333,0.0149333333333333},
-{3268491,3853345,3853140,0.271269230769231,0.190621621621622},
-{3268541,3852696,3852703,1000000,1000000},
-{3268542,3852703,3853003,1000000,1000000},
-{3268543,3852779,3852712,0.0128266666666667,0.0125478260869565},
-{3268544,3854789,3855249,0.563014285714286,0.52548},
-{3268545,3855249,3855367,0.113492307692308,0.118032},
-{3268558,3851634,3851393,0.238605882352941,0.25351875},
-{3268559,3851393,3851280,0.131030769230769,0.154854545454545},
-{3268560,3849696,3850019,0.206644444444444,0.206644444444444},
-{3268561,3851879,3851221,0.278133333333333,0.278133333333333},
-{3268562,3855928,3855795,1000000,0.199841379310345},
-{3268563,3855795,3855761,1000000,0.0505},
-{3268564,3861551,3861558,0.0991384615384615,0.0758117647058824},
-{3268565,3861558,3861562,0.0632,0.0474},
-{3268713,3861016,3861297,0.250242857142857,0.259511111111111},
-{3268714,3861297,3861437,0.0973454545454545,0.103625806451613},
-{3268715,3861297,3860822,0.290911111111111,0.290911111111111},
-{3268716,3858202,3858153,0.0286222222222222,0.0286222222222222},
-{3268947,3881117,3880849,0.120107692307692,0.141945454545455},
-{3268948,3880849,3880793,0.02634,0.0270153846153846},
-{3269188,3896880,3896824,0.0659333333333333,1000000},
-{3269191,3888729,3888832,1000000,0.0152285714285714},
-{3269192,3888832,3889043,1000000,0.0343645161290323},
-{3269258,3850904,3850910,0.0161351351351351,0.00978688524590164},
-{3269259,3850910,3850997,0.1245,0.119888888888889},
-{3269287,3861711,3861161,1000000,0.134256338028169},
-{3269288,3861530,3861504,1000000,0.0162489795918367},
-{3269289,3861504,3860844,1000000,0.291484615384615},
-{3269290,3861161,3861302,0.1845,1000000},
-{3269291,3861302,3861554,1.53744,1000000},
-{3269292,3861647,3861134,0.14058,1000000},
-{3269293,3861134,3860703,0.093,1000000},
-{3269302,3861630,3861554,1000000,0.0538363636363636},
-{3269303,3861554,3861530,1000000,0.0112875},
-{3269307,3850740,3850854,0.159702857142857,1000000},
-{3269347,3920211,3920518,0.086415,0.0934216216216216},
-{3269348,3920518,3920868,0.101413333333333,0.0992086956521739},
-{3269364,3881858,3882281,0.465507692307692,0.550145454545455},
-{3269365,3867968,3867914,0.0103811320754717,1000000},
-{3269366,3867914,3867688,0.0428716981132075,1000000},
-{3269367,3868254,3867984,1000000,0.0478415094339623},
-{3269368,3867984,3867928,1000000,0.00990566037735849},
-{3269382,3879613,3881097,1000000,0.611322580645161},
-{3269383,3881097,3882022,1000000,0.38056},
-{3269393,3873916,3874272,0.0739448275862069,0.0809207547169811},
-{3269394,3874272,3874651,0.0739444444444444,0.0753396226415094},
-{3269424,3858232,3857657,0.3309,0.319489655172414},
-{3269434,3855682,3855175,0.147024489795918,0.144084},
-{3269435,3855175,3854947,0.0719125,0.0750391304347826},
-{3269436,3856413,3856094,0.116955555555556,0.123835294117647},
-{3269437,3856094,3855682,0.122736,0.12785},
-{3269438,3854947,3854279,0.21055,0.219704347826087},
-{3269439,3854279,3854176,0.0329428571428571,0.0373945945945946},
-{3269457,3857341,3858938,0.88275652173913,1.84576363636364},
-{3269458,3858938,3858984,0.0296903225806452,0.036816},
-{3269459,3858984,3859236,0.11829375,0.151416},
-{3269511,3890712,3891206,0.230710344827586,0.196782352941176},
-{3269512,3890061,3890625,0.220994117647059,0.288992307692308},
-{3269513,3890625,3890712,0.0265395348837209,0.02536},
-{3269514,3898308,3897661,0.18456,0.263657142857143},
-{3269515,3897661,3896744,0.3987,0.23922},
-{3269516,3880986,3881134,1000000,0.1746},
-{3269517,3881134,3881292,1000000,0.247326315789474},
-{3269541,3884402,3884749,1000000,0.178514285714286},
-{3269542,3884749,3885230,1000000,0.193015384615385},
-{3269543,3867718,3867992,1000000,0.25375},
-{3269544,3867992,3868373,1000000,0.21987},
-{3269545,3874006,3874116,0.0429538461538462,1000000},
-{3269546,3874116,3874524,0.149059459459459,1000000},
-{3269547,3871784,3872025,0.186818181818182,1000000},
-{3269548,3872025,3872265,0.15,1000000},
-{3269575,3874131,3874014,0.216,1000000},
-{3269576,3879992,3880089,1000000,0.266169230769231},
-{3269577,3880089,3880208,1000000,0.25248},
-{3269578,3879914,3880078,0.0973333333333333,0.0973333333333333},
-{3269579,3880078,3880265,0.4568,0.4568},
-{3269580,3877636,3877816,1000000,1000000},
-{3269581,3877816,3878045,1000000,1000000},
-{3269582,3878313,3878659,1000000,1000000},
-{3269583,3878659,3879057,1000000,1000000},
-{3269584,3876476,3876481,0.15140625,1000000},
-{3269585,3876481,3876475,0.19659,1000000},
-{3269588,3876494,3876746,1000000,1000000},
-{3269589,3876746,3876992,1000000,1000000},
-{3269590,3879323,3879469,0.0734888888888889,0.0734888888888889},
-{3269591,3879469,3879588,0.0650222222222222,0.0650222222222222},
-{3269592,3880031,3880185,0.238254545454545,1000000},
-{3269593,3880185,3880366,0.18048,1000000},
-{3269594,3877892,3878339,1000000,1000000},
-{3269595,3877200,3877129,1000000,0.128884615384615},
-{3269596,3879482,3879611,1000000,1000000},
-{3269597,3879611,3879737,1000000,1000000},
-{3269598,3878190,3878484,0.23336,0.269261538461538},
-{3269599,3877849,3878166,0.1126,0.1126},
-{3269600,3878658,3878674,1000000,1000000},
-{3269601,3875740,3876096,1000000,0.27116},
-{3269602,3876096,3876600,1000000,0.3490125},
-{3269603,3876024,3875990,0.2044,1000000},
-{3269604,3875990,3875958,0.13101,1000000},
-{3269605,3876494,3876570,0.0824444444444445,0.0824444444444445},
-{3269606,3876570,3876692,0.104146153846154,0.104146153846154},
-{3269607,3850358,3850234,1000000,1000000},
-{3269608,3850234,3850218,1000000,1000000},
-{3269609,3880263,3880430,0.240494117647059,1000000},
-{3269610,3880430,3880603,0.2646,1000000},
-{3269611,3880732,3880934,1000000,1000000},
-{3269612,3880934,3881182,1000000,1000000},
-{3269613,3878315,3878463,1000000,0.296871428571429},
-{3269614,3877616,3877241,0.156081818181818,1000000},
-{3269615,3877241,3876995,0.124281818181818,1000000},
-{3269616,3875614,3875535,0.188375,0.4521},
-{3269617,3878045,3878337,1000000,1000000},
-{3269618,3878337,3878658,1000000,1000000},
-{3269619,3877264,3877510,1000000,1000000},
-{3269620,3877510,3877753,1000000,1000000},
-{3269621,3877740,3877504,1000000,1000000},
-{3269622,3877678,3877496,1000000,1000000},
-{3269623,3877496,3877284,1000000,1000000},
-{3269624,3880310,3880655,0.193888888888889,0.193888888888889},
-{3269625,3880655,3881075,0.800485714285714,0.329611764705882},
-{3269626,3879139,3879311,0.16052,0.185215384615385},
-{3269627,3879311,3879489,0.0926888888888889,0.0926888888888889},
-{3269628,3889996,3889808,0.0700111111111111,0.0741294117647059},
-{3269629,3889808,3889370,0.142675471698113,0.142675471698113},
-{3269630,3882163,3882181,1000000,1000000},
-{3270067,3878388,3878434,0.0207,0.0207},
-{3270068,3878065,3878388,0.19172,0.188577049180328},
-{3270140,3869127,3869292,1000000,0.1863},
-{3270141,3869292,3869412,1000000,0.0949448275862069},
-{3270270,3919494,3919847,0.145681132075472,1000000},
-{3270271,3919847,3920837,0.358531428571429,1000000},
-{3270299,3903863,3904599,0.560911111111111,0.560911111111111},
-{3270302,3903029,3903695,0.490066666666667,0.490066666666667},
-{3270323,3865100,3864955,0.2364,0.2364},
-{3270324,3864955,3864949,0.0203853658536585,0.0203853658536585},
-{3270325,3901328,3900928,0.146958620689655,0.149536842105263},
-{3270326,3899986,3900928,0.564266666666667,0.564266666666667},
-{3270328,3899625,3899406,0.438666666666667,0.438666666666667},
-{3270329,3906881,3906840,0.0470666666666667,0.0470666666666667},
-{3270330,3906881,3907051,0.123511111111111,0.123511111111111},
-{3270331,3907051,3907450,0.3504,0.3504},
-{3270332,3904373,3904900,0.2188,0.2188},
-{3270333,3904468,3905676,1.13466,1.13466},
-{3270334,3907149,3907190,0.0264,0.0264},
-{3270335,3904900,3905131,0.105822222222222,0.105822222222222},
-{3270336,3904463,3905330,0.40156,0.50195},
-{3270337,3905330,3905539,0.091,0.091},
-{3270338,3905131,3905330,0.43592,0.5449},
-{3270339,3906120,3906290,0.16005,0.16005},
-{3270340,3905131,3905683,0.54705,0.54705},
-{3270341,3905683,3907190,1.06191,1.06191},
-{3270342,3906120,3905683,0.28821,0.28821},
-{3270343,3905330,3905667,0.28605,0.28605},
-{3270344,3905667,3906120,0.44496,0.44496},
-{3270345,3905667,3905798,0.17979,0.17979},
-{3270346,3905798,3906009,0.182266666666667,0.182266666666667},
-{3270467,3850534,3850342,0.0964666666666667,0.0964666666666667},
-{3270468,3850342,3850174,1000000,1000000},
-{3270469,3862449,3862374,0.029151724137931,0.0313111111111111},
-{3270470,3862374,3862222,0.08586,0.07155},
-{3270471,3862374,3862148,0.110672727272727,1000000},
-{3270472,3863343,3863283,1000000,0.0310258064516129},
-{3270473,3863283,3863116,1000000,0.0846888888888889},
-{3270474,3863348,3863283,1000000,0.06027},
-{3270476,3854543,3854390,0.0704368421052632,0.0686307692307692},
-{3270477,3854390,3853692,0.280102325581395,0.267653333333333},
-{3270478,3850060,3850292,1000000,1000000},
-{3270479,3850292,3851280,0.764822222222222,0.764822222222222},
-{3270481,3862890,3862842,1000000,0.0256344827586207},
-{3270482,3862842,3862731,1000000,0.080328},
-{3270483,3851753,3851569,0.1842,0.1842},
-{3270484,3863968,3863893,0.023172972972973,0.0317555555555556},
-{3270485,3863893,3863855,0.00955263157894737,0.0139615384615385},
-{3270486,3863763,3863909,1000000,0.15234375},
-{3270487,3863909,3863968,1000000,0.0358384615384615},
-{3270488,3863893,3863909,0.012855,1000000},
-{3270489,3864040,3863951,1000000,0.065976},
-{3270490,3863951,3863763,1000000,0.31024},
-{3270491,3851185,3851159,1000000,0.0271862068965517},
-{3270492,3851159,3851282,1000000,0.0724888888888889},
-{3270493,3854134,3853566,0.483339130434783,0.505309090909091},
-{3270494,3853139,3852407,0.289022222222222,0.339286956521739},
-{3270495,3853566,3853139,0.223248,0.223248},
-{3270496,3853470,3853220,0.0810818181818182,0.108109090909091},
-{3270497,3853220,3852011,0.418772727272727,0.5758125},
-{3270498,3853139,3853220,0.06117,0.050975},
-{3270499,3853527,3853470,0.0134266666666667,0.0183090909090909},
-{3270506,3895262,3895130,0.101485714285714,1000000},
-{3270507,3895717,3895262,0.213284210526316,1000000},
-{3270508,3895262,3895384,1000000,0.113921739130435},
-{3270509,3895445,3895330,1000000,0.0923368421052631},
-{3270510,3895384,3895632,0.261847058823529,0.261847058823529},
-{3270511,3895632,3895717,0.0788,0.0417176470588235},
-{3270512,3894383,3895264,0.490155555555555,0.490155555555555},
-{3270513,3893134,3893557,0.159838235294118,0.17252380952381},
-{3270514,3891757,3893134,0.574958823529412,0.501246153846154},
-{3270515,3891488,3893134,0.563274193548387,0.572508196721311},
-{3270516,3891394,3891488,0.0264941176470588,0.0241285714285714},
-{3270517,3891343,3891394,0.03225,0.0258},
-{3270518,3890607,3890875,0.0894315789473684,0.161828571428571},
-{3270519,3890875,3890951,0.0537391304347826,0.0588571428571429},
-{3270520,3890369,3889855,1000000,0.155657142857143},
-{3270521,3890447,3890394,1000000,0.0197032258064516},
-{3270522,3890394,3890369,1000000,0.0114},
-{3270523,3890470,3890394,0.0964666666666667,0.069456},
-{3270524,3890607,3890548,0.0452769230769231,0.0692470588235294},
-{3270525,3890548,3890470,0.076904347826087,0.076904347826087},
-{3270526,3890875,3890852,1000000,0.0268},
-{3270527,3890852,3890470,1000000,0.466523076923077},
-{3270528,3890548,3890852,0.195966666666667,0.2204625},
-{3270529,3890226,3890242,0.032232,1000000},
-{3270530,3889380,3889626,0.106355555555556,0.106355555555556},
-{3270531,3889626,3890163,1000000,1000000},
-{3270532,3890163,3890242,1000000,1000000},
-{3270533,3902336,3902393,0.0217153846153846,0.0217153846153846},
-{3270534,3901756,3902250,1000000,0.540105882352941},
-{3270535,3902250,3902336,1000000,0.0685894736842105},
-{3270536,3902393,3902304,1000000,0.0725230769230769},
-{3270537,3902304,3901770,1000000,0.352842857142857},
-{3270538,3902250,3902304,0.03108,0.03108},
-{3270539,3902535,3902429,0.297696774193548,0.329592857142857},
-{3270540,3902429,3902426,0.0144222222222222,0.0144222222222222},
-{3270541,3902304,3902429,0.316444444444444,0.316444444444444},
-{3270542,3902627,3902960,0.1477,0.1688},
-{3270543,3902960,3903048,0.03402,0.03189375},
-{3270544,3902147,3902199,0.02943,0.02943},
-{3270545,3902199,3902627,0.2127,0.2127},
-{3270546,3901559,3902108,0.263345454545455,0.3408},
-{3270547,3902108,3902147,0.0173052631578947,0.0173052631578947},
-{3270548,3902108,3902100,1000000,0.0528947368421053},
-{3270549,3902100,3901532,1000000,0.860266666666667},
-{3270550,3901339,3901300,0.0751777777777778,0.0751777777777778},
-{3270551,3901802,3902046,1000000,0.0855257142857143},
-{3270552,3902046,3902551,1000000,0.159066666666667},
-{3270553,3902031,3902046,0.0286285714285714,0.0261391304347826},
-{3270554,3903273,3904050,0.16611,1000000},
-{3270555,3904050,3905370,0.278065573770492,1000000},
-{3270556,3905679,3905189,1000000,0.2592},
-{3270557,3905189,3905138,0.0511090909090909,0.0535428571428571},
-{3270558,3904050,3905189,1.51326,1000000},
-{3270559,3903848,3903333,0.179485714285714,0.1963125},
-{3270560,3903333,3902975,0.0956651162790698,0.117531428571429},
-{3270561,3902975,3902758,0.0732909090909091,0.0780193548387097},
-{3270562,3903333,3902975,0.60912,1000000},
-{3270563,3887261,3887373,0.15237,0.15237},
-{3270564,3887373,3887887,0.301122580645161,1000000},
-{3270565,3903369,3904063,1000000,0.1611},
-{3270566,3904063,3905311,1000000,0.253914285714286},
-{3270690,3909309,3909060,0.165572727272727,0.145704},
-{3270691,3909970,3910149,0.0418772727272727,0.0409466666666667},
-{3270692,3910149,3910440,0.0629590909090909,0.0629590909090909},
-{3270693,3909309,3909890,0.78534,1000000},
-{3270694,3909907,3909691,0.116256,0.14532},
-{3270695,3909691,3909309,0.169181818181818,0.159514285714286},
-{3270696,3909890,3909691,0.25056,1000000},
-{3270697,3909890,3910061,0.23832,0.23832},
-{3270698,3910061,3910149,1000000,0.11274},
-{3270699,3910588,3910422,0.108157894736842,0.158076923076923},
-{3270700,3910422,3909523,0.498275,0.459946153846154},
-{3270701,3910061,3910422,0.41022,1000000},
-{3270711,3908887,3908737,0.10104,0.106357894736842},
-{3270712,3908737,3908530,0.0864,0.0923586206896552},
-{3270713,3908368,3908751,0.177555555555556,0.208434782608696},
-{3270714,3908751,3908887,0.080025,0.0738692307692308},
-{3270715,3908737,3908751,0.156633333333333,0.156633333333333},
-{3270716,3909211,3909035,0.0942666666666667,0.0978923076923077},
-{3270717,3909035,3908887,0.1133,0.107336842105263},
-{3270718,3908751,3909035,0.102355555555556,0.102355555555556},
-{3270748,3894252,3894121,1000000,1000000},
-{3270749,3894121,3894261,0.133844444444444,0.133844444444444},
-{3270754,3897537,3897119,1000000,0.143786666666667},
-{3270755,3897119,3897263,0.121111111111111,0.121111111111111},
-{3270756,3897522,3897090,0.141665217391304,1000000},
-{3270757,3897090,3896767,0.107,1000000},
-{3270758,3897659,3897942,0.16771875,0.153342857142857},
-{3270759,3897942,3898065,0.0697615384615385,0.0490216216216216},
-{3270760,3897848,3898279,1000000,0.341628571428571},
-{3270761,3913802,3913671,1000000,0.0374318181818182},
-{3270762,3913671,3913491,1000000,0.0507142857142857},
-{3270763,3914098,3913958,0.0725111111111111,0.0725111111111111},
-{3270764,3913958,3913795,0.0743555555555556,0.0743555555555556},
-{3270765,3913671,3913958,0.134355555555556,0.134355555555556},
-{3270766,3913716,3913621,0.0323608695652174,1000000},
-{3270767,3913621,3913425,0.05236,1000000},
-{3270768,3916118,3915609,1000000,0.191631818181818},
-{3270769,3915609,3915313,1000000,0.114823255813953},
-{3270770,3916078,3915567,0.175965957446809,1000000},
-{3270771,3915567,3915273,0.11008085106383,1000000},
-{3270772,3915609,3915567,0.019935,0.019935},
-{3270773,3909416,3909412,0.0096,0.0096},
-{3270774,3909523,3909427,0.05799,1000000},
-{3270775,3909427,3909340,0.058,1000000},
-{3270776,3909416,3909427,0.0243333333333333,0.0243333333333333},
-{3270777,3916755,3916691,0.11238,0.11238},
-{3270778,3916691,3916601,1000000,1000000},
-{3270779,3916601,3916690,1000000,1000000},
-{3270780,3916690,3916935,0.34596,0.34596},
-{3270781,3897377,3897490,1000000,1000000},
-{3270782,3897490,3897532,0.0487875,0.0354818181818182},
-{3270783,3897769,3897490,0.2958,0.316928571428571},
-{3270972,3904592,3904279,0.21963,0.21963},
-{3271028,3895267,3895726,0.412733333333333,0.412733333333333},
-{3271029,3895726,3895761,1000000,1000000},
-{3271030,3895942,3895908,0.0246444444444444,0.0246444444444444},
-{3271031,3895908,3895523,0.334977777777778,0.334977777777778},
-{3271032,3895618,3896044,0.3316,0.3316},
-{3271033,3895908,3896044,0.10395,0.10395},
-{3271034,3896044,3896143,0.0706666666666667,0.0706666666666667},
-{3271035,3895771,3896292,0.404666666666667,0.404666666666667},
-{3271036,3895905,3896443,0.410577777777778,0.410577777777778},
-{3271037,3896443,3896484,1000000,1000000},
-{3271038,3900603,3900500,0.0723882352941176,0.053504347826087},
-{3271039,3900787,3900810,0.02102,0.020341935483871},
-{3271040,3900810,3900603,0.185496774193548,0.159733333333333},
-{3271041,3895097,3894823,0.141428571428571,0.165},
-{3271042,3896473,3896540,0.07635,0.0832909090909091},
-{3271043,3896753,3896876,0.115166666666667,0.10365},
-{3271044,3896540,3896876,1000000,1000000},
-{3271045,3896540,3896610,0.0695478260869565,0.0761714285714286},
-{3271046,3896876,3896974,0.0680454545454545,0.05988},
-{3271047,3896610,3896974,1000000,1000000},
-{3271048,3896610,3896660,0.0545769230769231,0.059125},
-{3271049,3896974,3897050,0.0700857142857143,0.0474774193548387},
-{3271050,3896660,3897050,1000000,1000000},
-{3271051,3896660,3896722,0.0716608695652174,0.0749181818181818},
-{3271052,3897050,3897144,0.0682909090909091,0.0682909090909091},
-{3271053,3896722,3897144,1000000,1000000},
-{3271054,3896722,3896771,0.0571714285714286,0.048024},
-{3271055,3897144,3897220,0.08,0.08},
-{3271056,3896771,3897220,1000000,1000000},
-{3271057,3896771,3896839,0.0549,0.04460625},
-{3271058,3896839,3896942,0.0646551724137931,0.0646551724137931},
-{3271059,3897220,3897306,0.0519333333333333,0.0519333333333333},
-{3271060,3897306,3897395,0.0571555555555556,0.0571555555555556},
-{3271061,3896839,3897306,1000000,1000000},
-{3271362,3877427,3877411,1000000,0.08628},
-{3271363,3877374,3877034,0.495547826086957,0.495547826086957},
-{3271364,3877411,3877374,0.0266769230769231,0.0266769230769231},
-{3271367,3871271,3871725,0.201251612903226,0.201251612903226},
-{3271380,3887153,3887773,1000000,0.286575},
-{3271735,3906692,3907439,0.57453,0.57453},
-{3271736,3905846,3906566,0.77604,0.77604},
-{3271737,3906566,3907464,0.79668,0.79668},
-{3271738,3907439,3906566,0.60081,0.60081},
-{3271740,3910955,3911327,0.23169,0.356446153846154},
-{3271741,3911327,3911355,0.019848,0.0275666666666667},
-{3271744,3903211,3903668,0.72564,0.72564},
-{3271745,3903457,3903286,0.0766333333333333,0.0726},
-{3271746,3903286,3903145,0.08748,0.0624857142857143},
-{3271747,3903211,3903286,0.12846,0.12846},
-{3271748,3903114,3903211,0.16134,0.16134},
-{3271749,3900068,3900447,0.1134,0.131789189189189},
-{3271750,3900447,3900616,0.051648,0.0527020408163265},
-{3271751,3900616,3901019,0.113304,0.111082352941176},
-{3271752,3900447,3900616,0.57636,0.57636},
-{3271753,3902806,3902916,0.0347466666666667,0.0363627906976744},
-{3271754,3902916,3903044,0.0435272727272727,0.05472},
-{3271755,3902916,3903145,0.0906206896551724,1000000},
-{3271756,3901715,3901792,0.0226695652173913,0.0237},
-{3271757,3901792,3902806,0.296865306122449,0.285223529411765},
-{3271758,3901715,3901615,0.0269428571428571,0.0251466666666667},
-{3271759,3901615,3901248,0.0915333333333333,0.0876382978723404},
-{3271760,3902095,3901735,0.158764285714286,0.134709090909091},
-{3271761,3901735,3901715,0.0153,0.0116068965517241},
-{3271762,3902071,3901872,0.126675,0.0965142857142857},
-{3271763,3901872,3901792,0.069,0.0345},
-{3271764,3903176,3903308,0.057384,0.057384},
-{3271765,3902891,3902937,0.0123567567567568,0.01143},
-{3271766,3902937,3903176,0.0966882352941176,0.0939257142857143},
-{3271767,3903176,3902937,0.61518,1000000},
-{3271768,3910811,3909727,0.291461538461538,0.30930612244898},
-{3271769,3910811,3911367,1000000,1000000},
-{3271771,3910850,3910811,0.0161608695652174,0.0218647058823529},
-{3271772,3907914,3910854,1.04484444444444,1.04484444444444},
-{3271788,3910786,3911023,0.161336842105263,0.161336842105263},
-{3271789,3911023,3911202,0.187242857142857,0.187242857142857},
-{3271790,3915616,3915290,0.191875862068966,0.191875862068966},
-{3271791,3915290,3914876,0.280088888888889,0.280088888888889},
-{3271792,3915969,3915581,0.174866666666667,0.174866666666667},
-{3271793,3915581,3915167,0.232916129032258,0.232916129032258},
-{3271794,3915290,3915581,0.2088,0.2088},
-{3271795,3916398,3915799,0.376311111111111,0.376311111111111},
-{3271796,3915799,3915616,0.123644444444444,0.123644444444444},
-{3271797,3916226,3916152,0.0441882352941177,0.0441882352941177},
-{3271798,3916152,3915969,0.097575,0.097575},
-{3271799,3921950,3922000,0.05388,0.06735},
-{3271800,3922000,3922765,0.416763636363636,0.443651612903226},
-{3271801,3922000,3922001,0.0434823529411765,0.0462},
-{3271802,3913190,3913283,0.0467111111111111,0.0467111111111111},
-{3271803,3913851,3913283,0.3432,0.3432},
-{3271804,3913283,3913307,0.0130222222222222,0.0130222222222222},
-{3271805,3913307,3913336,0.0173333333333333,0.0173333333333333},
-{3271806,3903503,3904048,0.231404347826087,0.231404347826087},
-{3271807,3903503,3903144,0.41502,0.41502},
-{3271808,3903277,3903334,0.0236684210526316,0.022485},
-{3271809,3903334,3903503,0.0840418604651163,0.0803066666666667},
-{3271810,3903334,3903046,0.3318,0.3318},
-{3271811,3904528,3904627,1000000,0.091551724137931},
-{3271812,3904627,3904844,1000000,0.095545945945946},
-{3271813,3905283,3904882,0.296422222222222,0.296422222222222},
-{3271814,3904627,3904882,0.18021,0.18021},
-{3271815,3903992,3904072,0.0521142857142857,0.0684},
-{3271816,3904072,3904260,0.115128,0.115128},
-{3271817,3904072,3903749,0.152688888888889,0.152688888888889},
-{3271818,3911984,3911614,0.3204,1000000},
-{3271819,3911614,3911327,0.341271428571429,1000000},
-{3271820,3911659,3911614,0.0697058823529412,0.0697058823529412},
-{3271821,3910028,3911423,0.520163636363636,0.520163636363636},
-{3271822,3910028,3909914,0.0682736842105263,0.05405},
-{3271823,3894227,3894284,1000000,1000000},
-{3271824,3894284,3894295,1000000,1000000},
-{3271825,3894284,3895027,0.52764,0.52764},
-{3271826,3894070,3894227,1000000,1000000},
-{3271827,3894070,3894440,0.2595,0.2595},
-{3271828,3894440,3894676,0.28743,0.28743},
-{3271829,3895293,3895701,0.311288888888889,0.311288888888889},
-{3271830,3905876,3905676,0.0883333333333333,0.0883333333333333},
-{3271831,3914021,3913781,0.1072,0.1072},
-{3271832,3912081,3911496,0.486317647058823,0.635953846153846},
-{3271833,3911496,3911283,0.157433333333333,0.1771125},
-{3271834,3911496,3911118,0.194177777777778,0.194177777777778},
-{3271835,3911118,3910956,0.0780666666666667,0.0780666666666667},
-{3271836,3910956,3911118,0.0745333333333333,0.0745333333333333},
-{3271843,3913099,3913311,0.17024,0.1596},
-{3271844,3913311,3913400,0.08,0.0847058823529412},
-{3271845,3913400,3913311,0.357355555555556,0.357355555555556},
-{3271846,3915390,3915335,0.20058,0.20058},
-{3271851,3914699,3914955,0.132025,0.140826666666667},
-{3271852,3914955,3915102,0.08988,0.0921846153846154},
-{3271853,3914785,3915043,0.228133333333333,0.228133333333333},
-{3271854,3915043,3915833,0.479544,0.79924},
-{3271855,3914955,3915043,0.0877875,0.0877875},
-{3271856,3914924,3915603,0.5546,0.5546},
-{3271857,3914831,3914872,0.0652125,0.0652125},
-{3271858,3914872,3914924,0.1001,0.0858},
-{3271859,3914924,3914872,0.5853,0.5853},
-{3271860,3915309,3915509,0.192017647058824,0.225124137931035},
-{3271861,3915509,3915531,1000000,1000000},
-{3271868,3922616,3922556,0.0334444444444444,0.0334444444444444},
-{3271869,3922244,3922356,0.0800666666666667,0.0800666666666667},
-{3271870,3922356,3922616,0.192688888888889,0.192688888888889},
-{3271904,3864105,3864458,0.29458064516129,1000000},
-{3271905,3864105,3864513,1000000,0.332089655172414},
-{3271906,3864458,3864159,0.203481818181818,1000000},
-{3271907,3864159,3863266,0.401903225806452,1000000},
-{3271908,3863279,3864167,0.41498,1000000},
-{3271909,3864167,3864513,0.215608695652174,1000000},
-{3271910,3863940,3864178,1.0998,1.0998},
-{3271911,3864167,3864178,0.07086,0.07086},
-{3271912,3864178,3863940,1.55832,1.55832},
-{3271943,3864458,3864513,0.022992,0.0302526315789474},
-{3271944,3864159,3864167,0.0399,0.0399},
-{3271945,3864513,3864637,1000000,1000000},
-{3271946,3864642,3864132,0.282286956521739,0.240466666666667},
-{3271950,3849689,3849169,0.155152173913043,0.162204545454545},
-{3271954,3879445,3879388,1000000,0.0199024390243902},
-{3271955,3879388,3879359,1000000,0.00588571428571429},
-{3272083,3868554,3868500,0.017706976744186,0.02379375},
-{3272084,3869221,3868804,0.137127272727273,0.18855},
-{3272085,3868804,3868554,0.0756,0.0924},
-{3272086,3868554,3868804,0.199073684210526,1000000},
-{3272088,3873215,3873256,0.0259,0.0282545454545455},
-{3272089,3873256,3873446,0.3258,1000000},
-{3272092,3870513,3870623,0.0322304347826087,1000000},
-{3272093,3870623,3870730,0.0269106382978723,1000000},
-{3272094,3870730,3870854,0.0306127659574468,1000000},
-{3272095,3870854,3871000,0.0413875,1000000},
-{3272096,3870623,3870854,0.126177777777778,1000000},
-{3272104,3871652,3871508,0.0544137931034483,1000000},
-{3272105,3871508,3871463,0.0130137931034483,1000000},
-{3272120,3871141,3871018,0.14412,0.156652173913043},
-{3272121,3871018,3870943,0.2862,0.24645},
-{3272122,3870943,3871006,0.01662,0.0369333333333333},
-{3272123,3871006,3871627,1000000,1000000},
-{3272124,3871018,3871006,0.59304,0.306744827586207},
-{3272307,3901122,3901085,0.101777777777778,0.101777777777778},
-{3272308,3901085,3900878,1000000,1000000},
-{3272309,3897128,3897336,0.0900888888888889,0.0900888888888889},
-{3272310,3897336,3897601,1000000,1000000},
-{3272315,3901384,3901862,0.187834285714286,1000000},
-{3272316,3901862,3902320,0.216704347826087,1000000},
-{3272321,3901828,3901829,1000000,1000000},
-{3272339,3900439,3900563,0.114225,0.114225},
-{3272340,3900563,3900724,0.1798,0.202275},
-{3272341,3900718,3900563,1000000,1000000},
-{3272347,3904281,3904333,0.0212538461538462,0.0212538461538462},
-{3272348,3904333,3904985,0.302423076923077,0.302423076923077},
-{3272349,3904333,3904985,1.70076,1.70076},
-{3272353,3905897,3905742,0.0771111111111111,0.0771111111111111},
-{3272354,3905742,3905684,0.0381555555555556,0.0381555555555556},
-{3272355,3905735,3905617,0.0621333333333333,0.0621333333333333},
-{3272356,3905617,3905500,0.0532888888888889,0.0532888888888889},
-{3272400,3920883,3921875,0.251757692307692,0.256694117647059},
-{3272401,3919476,3920519,0.299272340425532,0.351645},
-{3272402,3920519,3920883,0.101282352941176,0.129135},
-{3272403,3920584,3920519,0.155018181818182,0.100305882352941},
-{3272404,3920636,3920869,0.0859609756097561,0.0927473684210526},
-{3272405,3920869,3921642,0.287842105263158,0.280461538461538},
-{3272406,3920584,3920801,0.3651,0.3651},
-{3272407,3920801,3920869,0.103341176470588,0.0836571428571428},
-{3272408,3920514,3920584,0.135054545454545,0.09904},
-{3272409,3920514,3919626,0.794181818181818,0.69888},
-{3272412,3920883,3920584,0.58326,1000000},
-{3272413,3920801,3920514,0.41924,0.41924},
-{3272414,3919471,3919586,1000000,0.0460857142857143},
-{3272415,3919586,3919647,1000000,0.0265066666666667},
-{3272430,3919209,3919036,0.130475,0.20876},
-{3272431,3919036,3919124,0.0786352941176471,0.0786352941176471},
-{3272432,3919124,3919317,0.0984,0.0984},
-{3272433,3919124,3919457,0.263084210526316,0.263084210526316},
-{3272435,3919457,3919316,0.104590909090909,0.095875},
-{3272436,3919316,3918513,0.677314285714286,1.1853},
-{3272437,3919036,3918979,0.042432,0.0482181818181818},
-{3272438,3918979,3918950,0.02379,0.0176222222222222},
-{3272439,3919316,3918979,0.191352,0.191352},
-{3272453,3886440,3886274,0.163448275862069,0.225714285714286},
-{3272454,3886067,3886451,0.498461538461538,0.216},
-{3272455,3886451,3886470,0.0185,0.01332},
-{3272456,3886440,3886451,1000000,0.0372375},
-{3272457,3886740,3886901,0.193028571428571,0.162144},
-{3272458,3886451,3886901,1000000,0.211066666666667},
-{3272459,3887556,3887007,0.121577777777778,1000000},
-{3272460,3886901,3887007,1000000,0.0384},
-{3272461,3886519,3886470,0.025375,0.03045},
-{3272462,3886440,3886519,0.05656,1000000},
-{3272463,3887189,3887316,0.0428487804878049,1000000},
-{3272471,3886519,3886935,0.199914285714286,1000000},
-{3272476,3886791,3886959,0.0977,1000000},
-{3272477,3886959,3886875,0.10572,0.124376470588235},
-{3272478,3887450,3887103,0.471026086956522,0.6771},
-{3272479,3886959,3887103,0.180704347826087,0.197914285714286},
-{3272502,3886657,3886688,0.05724,0.05724},
-{3272505,3886657,3886488,1.16544,1.16544},
-{3272506,3886488,3886657,0.67488,0.67488},
-{3272510,3886209,3886254,0.0894206896551724,0.0894206896551724},
-{3272511,3886254,3886587,0.1467375,0.173911111111111},
-{3272548,3886519,3887013,0.580525,0.480434482758621},
-{3272555,3886759,3891654,2.34946285714286,2.16397894736842},
-{3272556,3891731,3890270,1.1998,1.1998},
-{3272558,3891731,3893069,1.60584444444444,1.60584444444444},
-{3272741,3901326,3901197,0.0575555555555556,0.0575555555555556},
-{3272742,3901197,3901105,0.0534222222222222,0.0534222222222222},
-{3272743,3919123,3918976,0.0837272727272727,0.0837272727272727},
-{3272744,3918655,3918826,0.0816444444444444,0.0816444444444444},
-{3272745,3921039,3921073,0.0085741935483871,0.00886},
-{3272746,3921073,3921378,0.124236363636364,0.13666},
-{3272747,3921819,3921097,0.5774,0.5774},
-{3272748,3921097,3921073,0.032925,0.032925},
-{3272749,3916555,3914836,1.03863243243243,1.13027647058824},
-{3273239,3915453,3915382,0.19662,0.115658823529412},
-{3273240,3915453,3915400,1000000,0.08118},
-{3273241,3915530,3915506,0.0271826086956522,0.0347333333333333},
-{3273242,3915506,3915453,0.0621176470588235,0.0621176470588235},
-{3273243,3915400,3915445,0.1041,0.1041},
-{3273244,3915506,3915445,0.08898,1000000},
-{3273245,3915365,3915319,0.03561,0.03561},
-{3273246,3915319,3914831,0.294384,0.283061538461538},
-{3273247,3915445,3915321,0.2289,0.2289},
-{3273248,3915321,3915400,0.34932,0.34932},
-{3273249,3915319,3915321,0.0167666666666667,0.0167666666666667},
-{3273339,3852484,3853092,1000000,0.116095081967213},
-{3273340,3853092,3853223,1000000,0.0351666666666667},
-{3273501,3903567,3903946,0.08605,1000000},
-{3273502,3903946,3905103,0.246341666666667,1000000},
-{3273503,3877202,3877125,0.0868533333333333,1000000},
-{3273504,3877125,3877071,0.0583,1000000},
-{3273505,3861312,3861384,0.0140695652173913,1000000},
-{3273506,3861312,3861378,1000000,0.0142029850746269},
-{3273507,3861384,3861876,0.105987692307692,1000000},
-{3273508,3861876,3861991,0.0281898305084746,1000000},
-{3273519,3859408,3859191,0.0847432835820895,0.0834970588235294},
-{3273530,3857587,3857659,0.01136,0.00973714285714286},
-{3273531,3857659,3857812,0.0272105263157895,0.0224782608695652},
-{3273534,3858147,3858140,0.00788571428571429,1000000},
-{3273535,3858140,3858037,0.120038709677419,1000000},
-{3273608,3861882,3861718,0.0471818181818182,1000000},
-{3273609,3861718,3861647,0.0247764705882353,1000000},
-{3273703,3858529,3858506,0.0367967213114754,0.0367967213114754},
-{3273816,3858611,3858728,1000000,0.0707027027027027},
-{3273817,3858728,3858888,1000000,0.0410093023255814},
-{3273865,3900325,3900535,0.107259375,0.11071935483871},
-{3273866,3900535,3900657,0.0721052631578947,0.0747272727272727},
-{3273887,3869246,3868604,0.11704347826087,0.120537313432836},
-{3273888,3868604,3868434,0.031940625,0.0329709677419355},
-{3273889,3875439,3875465,0.0248553191489362,1000000},
-{3273890,3875465,3875677,0.250786666666667,1000000},
-{3273893,3876245,3876657,0.438075,1000000},
-{3273939,3891573,3890956,1000000,0.147769811320755},
-{3273940,3890956,3890860,1000000,0.0284425531914894},
-{3274460,3871839,3872232,0.0778533333333333,0.0686941176470588},
-{3274461,3872232,3872746,0.110371428571429,0.105354545454545},
-{3274588,3897835,3897995,0.0540088235294118,1000000},
-{3274589,3897995,3898063,0.0411705882352941,1000000},
-{3274623,3861969,3861837,1000000,0.046078125},
-{3274624,3861837,3861711,1000000,0.0381818181818182},
-{3274663,3860835,3860730,1000000,1000000},
-{3274664,3861201,3860989,1000000,1000000},
-{3274665,3860098,3860597,0.386208,0.386208},
-{3274666,3860098,3859603,0.339436363636364,0.339436363636364},
-{3274667,3859567,3859995,0.412421052631579,0.412421052631579},
-{3274676,3856280,3856502,0.117888888888889,0.117888888888889},
-{3274680,3856746,3857294,0.136117647058824,0.150913043478261},
-{3274681,3857294,3857322,0.00618367346938776,0.00704651162790698},
-{3274682,3855913,3855335,0.381688888888889,0.381688888888889},
-{3274685,3856031,3856185,0.12228,0.12228},
-{3274688,3856839,3857322,0.715730769230769,0.715730769230769},
-{3274689,3856185,3856839,0.707533333333333,0.707533333333333},
-{3274693,3857560,3857393,0.130111111111111,0.130111111111111},
-{3274694,3857393,3857322,0.09616,0.0801333333333333},
-{3274697,3854802,3855348,0.411576,0.411576},
-{3274698,3855348,3855650,0.125927272727273,0.125927272727273},
-{3274705,3851495,3851630,0.0538434782608696,0.0562909090909091},
-{3274706,3851630,3851706,0.0872,0.0826105263157895},
-{3274707,3851630,3851971,0.2734,0.2734},
-{3274708,3850926,3851161,0.134018181818182,0.12636},
-{3274709,3851161,3851495,0.200035714285714,0.215423076923077},
-{3274710,3851278,3851605,0.24843,0.24843},
-{3274711,3851605,3851854,0.20331,0.20331},
-{3274712,3851161,3851605,1000000,0.314911111111111},
-{3274717,3858038,3857754,0.137911111111111,0.137911111111111},
-{3274721,3858171,3858099,0.0713666666666667,0.0626634146341463},
-{3274722,3858099,3858038,0.0315666666666667,0.0307135135135135},
-{3274723,3858479,3859268,0.432371428571429,0.412718181818182},
-{3274724,3857657,3857638,0.0120782608695652,0.011112},
-{3274725,3857638,3857474,0.1364,0.0909333333333334},
-{3274726,3858479,3857638,0.52008,0.4728},
-{3274727,3858099,3858239,0.1514,1000000},
-{3274728,3858239,3858479,0.28048,0.28048},
-{3274732,3860895,3860369,0.425255172413793,0.536191304347826},
-{3274733,3855306,3854907,0.2276,0.2276},
-{3274739,3860073,3860228,0.20352,0.164129032258065},
-{3274740,3860228,3860369,0.128068965517241,0.109235294117647},
-{3274745,3874470,3874510,0.051468,1000000},
-{3274746,3874510,3874706,0.1628,1000000},
-{3274747,3874706,3874820,0.09893,1000000},
-{3274748,3874820,3874848,0.0208131147540984,1000000},
-{3274749,3874510,3874820,0.5824,1000000},
-{3274756,3874650,3874742,1000000,0.09445},
-{3274757,3874742,3874768,1000000,0.0172881355932203},
-{3274760,3862545,3862442,0.0283695652173913,0.0261},
-{3274761,3862442,3862116,0.0929347826086956,0.0872448979591837},
-{3274762,3862469,3862532,0.27414,0.255013953488372},
-{3274763,3862532,3862545,0.105885714285714,0.0600972972972973},
-{3274764,3862442,3862532,1000000,0.0599},
-{3274776,3872927,3872926,0.00405,0.00405},
-{3274777,3872926,3872493,0.43038,0.43038},
-{3274791,3869576,3869572,0.0226,0.021696},
-{3274792,3869572,3869558,0.0586375,0.0574408163265306},
-{3274793,3869558,3869556,0.0180125,0.0180125},
-{3274794,3869572,3869558,1000000,1000000},
-{3274795,3872955,3873143,0.0820153846153846,0.0969272727272727},
-{3274796,3873143,3873552,0.195572727272727,0.21513},
-{3274797,3873190,3873143,0.418355555555556,0.418355555555556},
-{3274798,3869600,3869639,0.109417021276596,0.111795652173913},
-{3274799,3869639,3869668,0.0662808510638298,0.0692266666666667},
-{3274800,3869779,3869639,1000000,0.243511111111111},
-{3275067,3915447,3916335,0.49595625,0.511954838709677},
-{3275074,3896440,3896596,0.168622222222222,0.168622222222222},
-{3275083,3867579,3867076,1000000,1000000},
-{3275084,3867076,3867043,0.0642,0.0998666666666667},
-{3275085,3868052,3867076,0.420807692307692,0.475695652173913},
-{3275086,3866014,3865944,0.0333333333333333,0.0333333333333333},
-{3275087,3900293,3900342,0.0446857142857143,0.0260666666666667},
-{3275088,3900342,3900787,0.330771428571429,0.264617142857143},
-{3275089,3900342,3898876,0.885777777777778,0.885777777777778},
-{3275093,3880881,3880741,0.057744,0.0555230769230769},
-{3275094,3880741,3880488,0.17712,0.121552941176471},
-{3275095,3879275,3880741,1000000,1000000},
-{3275096,3885250,3884631,1000000,1000000},
-{3275097,3884631,3881799,1000000,1000000},
-{3275098,3884426,3884631,1000000,1000000},
-{3275099,3852868,3852930,0.117528,0.14691},
-{3275100,3852930,3852836,0.108175,0.136642105263158},
-{3275101,3853879,3854276,0.133134782608696,0.130302127659574},
-{3275102,3854276,3854795,0.1581125,0.151788},
-{3275103,3852930,3854276,0.576206896551724,0.539032258064516},
-{3275117,3894083,3894065,0.0891954545454545,1000000},
-{3275118,3894155,3894830,0.18,1000000},
-{3275119,3894830,3895323,0.1614,1000000},
-{3275454,3894157,3894816,1000000,0.17292},
-{3275455,3894816,3895328,1000000,0.131422641509434},
-{3275460,3894004,3894042,0.0912391304347826,1000000},
-{3275462,3875594,3874428,1000000,0.791233333333333},
-{3275463,3874428,3874258,0.09145,0.09145},
-{3275476,3899297,3899839,0.13,0.13},
-{3275820,3855140,3855305,1000000,0.30051},
-{3275821,3856249,3855305,0.32278125,0.313},
-{3275822,3873008,3872887,0.0265333333333333,0.0275538461538462},
-{3275823,3872887,3871898,0.239569230769231,0.198791489361702},
-{3275824,3872887,3872488,1000000,1000000},
-{3276497,3890881,3891009,0.54714,0.54714},
-{3276498,3888797,3888837,1000000,1000000},
-{3276499,3888837,3888841,1000000,1000000},
-{3276500,3889095,3889864,0.157992452830189,0.161030769230769},
-{3276501,3889864,3890134,0.06528,0.06528},
-{3276502,3888837,3889864,1.18614,1.18614},
-{3276503,3888837,3888552,0.27522,0.27522},
-{3276504,3887512,3888163,0.133186956521739,0.153165},
-{3276505,3888163,3888841,0.124584905660377,0.134755102040816},
-{3276506,3887502,3888158,0.61272,0.61272},
-{3276507,3888158,3888163,0.10134,0.10134},
-{3276508,3887457,3887489,1000000,1000000},
-{3276509,3887489,3887502,0.17514,0.17514},
-{3276510,3888158,3887489,0.78318,0.78318},
-{3276511,3888158,3888552,0.38646,0.38646},
-{3276512,3886331,3886931,0.214570588235294,0.235335483870968},
-{3276513,3886931,3886929,0.1023,0.1023},
-{3276514,3886929,3887502,0.63552,0.63552},
-{3276515,3883859,3884154,0.152422222222222,0.152422222222222},
-{3276516,3884154,3884547,0.206933333333333,0.206933333333333},
-{3276517,3884154,3884403,0.40944,0.40944},
-{3276518,3883041,3882999,0.0611538461538462,0.0611538461538462},
-{3276519,3883512,3883222,1000000,1000000},
-{3276520,3883222,3883041,0.26355,0.26355},
-{3276521,3883222,3883649,0.73704,0.73704},
-{3276522,3882310,3882180,0.0802,0.0886421052631579},
-{3276523,3882180,3882160,0.0137714285714286,0.015221052631579},
-{3276524,3883890,3884508,1000000,0.310444444444444},
-{3276525,3886929,3886434,0.77904,0.77904},
-{3276526,3886434,3886929,0.77466,0.77466},
-{3277158,3860853,3860919,0.0588,0.0464210526315789},
-{3277159,3860919,3861027,0.44985,0.346038461538462},
-{3277160,3861027,3860919,0.362711111111111,0.362711111111111},
-{3277996,3883402,3883392,0.161590909090909,0.17775},
-{3277997,3883392,3883220,0.17265,0.159369230769231},
-{3277998,3883775,3883807,0.0177555555555556,0.0177555555555556},
-{3277999,3883775,3883681,0.0601555555555556,0.0601555555555556},
-{3278000,3883392,3883450,0.042,0.0532},
-{3278001,3883450,3883775,0.169466666666667,0.169466666666667},
-{3278002,3883756,3883282,0.366466666666667,0.366466666666667},
-{3278003,3883282,3883220,0.02868,0.0325909090909091},
-{3278004,3883450,3883282,0.216473684210526,0.241941176470588},
-{3278082,3883402,3882941,0.262266666666667,0.262266666666667},
-{3278094,3882612,3882861,0.39216,0.39216},
-{3278095,3882861,3883052,0.3345,0.3345},
-{3278096,3882861,3882941,1000000,0.17934},
-{3278097,3883048,3883036,0.00984705882352941,0.00881052631578947},
-{3278098,3882941,3882904,1000000,0.336092307692308},
-{3278099,3882904,3883036,1000000,0.0843333333333333},
-{3278100,3882904,3882941,0.193066666666667,0.193066666666667},
-{3278104,3883036,3882725,0.26214,0.238309090909091},
-{3278105,3882725,3882310,0.282757894736842,0.233582608695652},
-{3278106,3882252,3882154,0.16015,0.16015},
-{3278107,3882904,3882583,1000000,0.34888},
-{3278108,3882583,3882725,0.0827333333333333,1000000},
-{3278109,3882252,3882279,0.0356571428571429,0.0453818181818182},
-{3278110,3882279,3882583,0.2507625,0.2507625},
-{3278111,3882180,3882247,0.11256,0.129876923076923},
-{3278112,3882279,3882247,0.0329571428571429,0.0271411764705882},
-{3278134,3884508,3884523,0.74076,0.74076},
-{3278137,3884508,3884639,0.15756,0.1477125},
-{3278138,3884639,3884798,0.121342857142857,0.12741},
-{3278140,3884940,3884869,0.0727894736842105,0.0922},
-{3278141,3884869,3884798,0.0628736842105263,0.0543},
-{3278143,3884639,3884869,1.37442,1.37442},
-{3278206,3889665,3890191,0.444052173913044,0.408528},
-{3278207,3889467,3889481,0.0114444444444444,0.0134347826086957},
-{3278208,3889481,3889665,0.124153846153846,0.140347826086957},
-{3278209,3889665,3889481,0.184285714285714,1000000},
-{3278210,3888774,3888882,0.125164285714286,0.125164285714286},
-{3278211,3888882,3889074,0.195114285714286,0.195114285714286},
-{3278212,3888635,3888765,0.113431578947368,0.10776},
-{3278213,3888765,3888774,0.0136,0.0136},
-{3278214,3888882,3888765,0.359444444444444,1000000},
-{3278233,3892688,3893156,0.30483,0.30483},
-{3278234,3893156,3893523,0.357066666666667,0.357066666666667},
-{3278235,3893985,3894905,0.411567567567568,0.461454545454546},
-{3278236,3894905,3894928,0.01168,0.0106181818181818},
-{3278279,3894659,3894841,0.116777777777778,0.116777777777778},
-{3278280,3894925,3895392,0.31575,0.31575},
-{3278802,3894885,3895056,1000000,1000000},
-{3278803,3894634,3894838,0.256023529411765,0.256023529411765},
-{3278804,3894838,3894964,0.0706222222222222,0.0706222222222222},
-{3278805,3894885,3894838,0.0597,0.0597},
-{3278806,3896279,3896224,1000000,1000000},
-{3278807,3897124,3897331,0.0934444444444444,0.0934444444444444},
-{3278808,3897331,3897415,1000000,1000000},
-{3278810,3886593,3886853,0.0867,0.084930612244898},
-{3278811,3886853,3887032,0.0653877551020408,0.0728181818181818},
-{3278812,3887032,3887136,0.0415914893617021,0.0528324324324324},
-{3278813,3886853,3887032,0.968657142857143,1000000},
-{3278814,3887902,3888305,1000000,1000000},
-{3278819,3896227,3896285,0.04656,0.04656},
-{3278820,3896285,3896301,0.01098,0.01098},
-{3278821,3896334,3896285,1000000,1000000},
-{3278822,3893980,3894164,0.105377777777778,0.105377777777778},
-{3278865,3894122,3894113,0.02682,0.02682},
-{3278866,3894113,3894331,0.40878,0.40878},
-{3278867,3894122,3894177,0.0559263157894737,0.0559263157894737},
-{3278868,3894177,3894570,0.277333333333333,0.277333333333333},
-{3278896,3893867,3894300,0.1892,0.21285},
-{3278897,3894300,3894406,0.0393846153846154,0.0451764705882353},
-{3278923,3896654,3896917,0.36225,0.36225},
-{3278924,3896917,3896913,0.0906222222222222,0.0906222222222222},
-{3278962,3861027,3860998,0.053895652173913,0.0476769230769231},
-{3278963,3860998,3860960,0.127,0.103909090909091},
-{3278964,3860998,3861063,0.157936363636364,0.144775},
-{3278965,3861345,3861301,0.071575,0.071575},
-{3278966,3861301,3861291,0.0166615384615385,0.01805},
-{3278967,3861063,3861301,0.2392,0.2808},
-{3278968,3861368,3861677,0.172577777777778,0.172577777777778},
-{3278969,3861301,3861368,0.045312,0.0404571428571429},
-{3278972,3848765,3849784,0.845294117647059,0.798333333333333},
-{3278973,3849844,3849829,0.0156,0.0156},
-{3278974,3849829,3849849,0.0868153846153846,0.0836},
-{3278975,3849784,3849829,0.0358941176470588,0.03051},
-{3279938,3868681,3868600,0.069063829787234,0.0705652173913043},
-{3279939,3868600,3868570,0.017748,0.0188808510638298},
-{3279941,3869795,3868699,0.422335714285714,0.422335714285714},
-{3279942,3868600,3868699,0.0654,0.073575},
-{3279943,3868570,3868534,0.015408,0.0163914893617021},
-{3279944,3868534,3868258,0.1243625,0.129769565217391},
-{3279945,3868699,3868534,0.1010625,0.0621923076923077},
-{3282206,3895163,3894917,0.168929032258064,0.11384347826087},
-{3282207,3894917,3894798,0.2311,0.089458064516129},
-{3282356,3875564,3875921,0.092865,1000000},
-{3282357,3875921,3876012,0.0295428571428571,1000000},
-{3282367,3880568,3878685,0.470611764705882,1000000},
-{3282368,3878685,3878406,0.0965636363636364,1000000},
-{3282376,3890128,3890573,0.202142307692308,0.198328301886792},
-{3282377,3889872,3889911,0.0589034482758621,1000000},
-{3282378,3889911,3890128,0.115784615384615,1000000},
-{3282379,3890128,3889967,0.138072727272727,1000000},
-{3282380,3889967,3889872,0.0466285714285714,1000000},
-{3282381,3889911,3889967,0.04008,0.0445333333333333},
-{3282382,3890951,3891025,0.0526727272727273,0.0404232558139535},
-{3282383,3891343,3891341,1000000,0.0469655172413793},
-{3282384,3891284,3891341,0.024756,0.030190243902439},
-{3282385,3891341,3891394,0.0203345454545455,0.0294315789473684},
-{3282406,3896121,3895993,0.094368,0.214472727272727},
-{3282407,3895162,3895244,0.07100625,1000000},
-{3282479,3908085,3907859,0.0892758620689655,1000000},
-{3282480,3907859,3907558,0.146466666666667,1000000},
-{3282538,3917496,3917546,0.0213535714285714,0.0202677966101695},
-{3282539,3917546,3918387,0.2102,0.2102},
-{3282555,3914294,3914860,0.104381818181818,0.10764375},
-{3282556,3914860,3915583,0.195470588235294,0.226568181818182},
-{3282557,3913101,3914294,0.1788,0.1788},
-{3282558,3906615,3906805,1000000,0.0388705882352941},
-{3282559,3902723,3902714,0.00894418604651163,0.00818297872340426},
-{3282560,3902714,3902534,1000000,0.107059090909091},
-{3282561,3902534,3902521,0.01056,0.0108307692307692},
-{3282562,3902714,3902534,0.131016666666667,1000000},
-{3282565,3902358,3902195,0.0785142857142857,0.0874363636363636},
-{3282566,3902195,3901328,0.32148,0.344442857142857},
-{3282567,3900928,3900786,0.0643529411764706,0.0596727272727273},
-{3282568,3900786,3900606,0.112712195121951,0.0906117647058823},
-{3282615,3916477,3917493,0.2589,0.255253521126761},
-{3282761,3918086,3920081,0.527298591549296,0.519975},
-{3282773,3894938,3895770,0.289386666666667,1000000},
-{3282774,3906471,3906608,0.0381183673469388,1000000},
-{3282775,3906608,3906700,0.0203020408163265,1000000},
-{3282776,3892274,3892321,0.013656,1000000},
-{3282777,3892274,3892327,1000000,0.0107},
-{3282778,3876449,3875310,0.275871428571429,0.343306666666667},
-{3282779,3875310,3873927,0.347431578947368,0.353635714285714},
-{3282780,3873927,3873764,0.041751724137931,0.041751724137931},
-{3282781,3873764,3872757,0.224389473684211,0.220520689655172},
-{3282839,3885710,3885830,0.051,1000000},
-{3282840,3885830,3886002,0.120972727272727,1000000},
-{3282939,3882753,3882766,0.0978521739130435,0.056265},
-{3282940,3881589,3881617,0.00807777777777778,0.0111846153846154},
-{3282941,3881617,3881633,0.0149781818181818,1000000},
-{3282942,3881847,3881936,1000000,0.0636},
-{3282943,3881617,3881660,1000000,0.0236322580645161},
-{3282944,3881660,3881847,1000000,0.120486486486486},
-{3283029,3850931,3850925,0.0209692307692308,0.0233657142857143},
-{3283030,3850925,3850921,0.0559531914893617,0.0571695652173913},
-{3283035,3854173,3854802,1.07692727272727,1.07692727272727},
-{3283036,3854802,3854805,0.0315818181818182,0.013896},
-{3283041,3857777,3857511,0.07374,0.113446153846154},
-{3283042,3855938,3855555,0.0789735849056604,0.0775111111111111},
-{3283043,3855555,3855338,0.0439846153846154,0.0431547169811321},
-{3283044,3857330,3856827,0.106812,0.104717647058824},
-{3283045,3864445,3864213,1000000,0.126484210526316},
-{3283046,3864213,3863983,1000000,0.0942387096774193},
-{3283327,3895420,3895427,0.0170553191489362,0.0178133333333333},
-{3283328,3895427,3895518,0.127902127659574,0.127902127659574},
-{3283329,3901384,3900533,0.192338181818182,0.188903571428571},
-{3283330,3900533,3900171,0.116535,0.103586666666667},
-{3283331,3912596,3912864,0.0588452830188679,0.0567054545454545},
-{3283332,3912864,3913440,0.113705084745763,0.11181},
-{3283333,3914082,3914347,0.058871186440678,0.0598862068965517},
-{3283334,3914347,3914574,0.0507254237288136,0.0516},
-{3283347,3871354,3871687,1000000,0.12824347826087},
-{3283348,3871204,3871354,1000000,0.0657142857142857},
-{3283349,3870734,3870774,1000000,0.03025},
-{3283350,3870774,3870821,1000000,0.08067},
-{3283351,3870821,3870872,1000000,0.0787826086956522},
-{3283352,3870872,3871128,1000000,0.2368875},
-{3283355,3870598,3870552,0.0344833333333333,1000000},
-{3283356,3870552,3870465,0.0549243243243243,1000000},
-{3283357,3870699,3870631,0.0468363636363636,1000000},
-{3283358,3870631,3870598,0.024,1000000},
-{3283359,3870465,3870438,0.0171157894736842,1000000},
-{3283360,3870438,3870383,0.0309947368421053,1000000},
-{3283361,3870383,3870348,0.0218769230769231,1000000},
-{3283362,3869842,3869774,0.016845,1000000},
-{3283363,3869112,3869010,0.0267348837209302,1000000},
-{3283364,3869498,3869298,0.0488790697674419,1000000},
-{3283365,3869298,3869112,0.0486418604651163,1000000},
-{3283422,3873396,3873467,0.0458142857142857,1000000},
-{3283423,3873467,3873485,0.0119086956521739,1000000},
-{3283508,3877890,3877961,0.0346271186440678,0.0334918032786885},
-{3283509,3877961,3878065,0.0573762711864407,0.0554950819672131},
-{3283514,3878956,3878844,0.0852981818181818,0.0852981818181818},
-{3283515,3878995,3878956,0.0223471698113208,0.0219333333333333},
-{3283516,3879254,3879145,0.110367567567568,0.107463157894737},
-{3283517,3879145,3878995,0.0824941176470588,0.084144},
-{3283522,3880944,3880968,0.00876315789473684,0.01332},
-{3283523,3880968,3881176,0.0812318181818182,0.10212},
-{3283565,3871038,3871022,0.0821875,0.0896590909090909},
-{3283566,3871022,3871092,0.212938775510204,0.226826086956522},
-{3283567,3877888,3877829,1000000,0.177394736842105},
-{3283568,3877829,3877792,1000000,0.0735692307692308},
-{3283569,3878375,3878324,0.024825,0.024825},
-{3283570,3878404,3878585,0.0807483870967742,1000000},
-{3283571,3878585,3880539,0.474011538461538,1000000},
-{3283572,3874836,3874245,0.139517647058824,1000000},
-{3283573,3874245,3874199,0.0116588235294118,1000000},
-{3283581,3885539,3885525,1000000,0.08724},
-{3283582,3885525,3885502,1000000,0.0938142857142857},
-{3283586,3875819,3875796,0.0361625,1000000},
-{3283587,3894477,3893542,0.230657142857143,0.24371320754717},
-{3283588,3893542,3893322,0.061368,0.0590076923076923},
-{3283589,3850254,3850416,0.0931941176470588,0.0856378378378378},
-{3283590,3850416,3850581,0.0571466666666667,0.053575},
-{3283614,3871296,3871187,0.187628571428571,0.2388},
-{3283615,3871187,3871038,0.2492375,0.265853333333333},
-{3283639,3865380,3865479,0.0834222222222222,0.0834222222222222},
-{3283640,3865169,3865264,0.0555111111111111,0.0555111111111111},
-{3283641,3865264,3865380,1000000,1000000},
-{3283642,3864248,3864110,0.1116,0.105035294117647},
-{3283643,3864253,3864244,0.00645789473684211,0.00876428571428571},
-{3283644,3864248,3864253,0.03616875,1000000},
-{3283645,3864253,3864284,0.0243777777777778,1000000},
-{3283646,3864248,3864288,1000000,0.0270857142857143},
-{3283647,3864916,3864288,0.31305,0.282754838709677},
-{3283648,3864288,3864284,1000000,0.0237777777777778},
-{3283658,3865818,3865639,1000000,0.0474681818181818},
-{3283659,3865639,3865375,1000000,0.0967578947368421},
-{3283660,3865375,3865288,1000000,0.0509},
-{3283661,3865288,3865280,1000000,0.0098},
-{3283670,3881370,3881078,0.108711111111111,0.110762264150943},
-{3283671,3881399,3882713,0.816558620689655,0.802718644067797},
-{3283672,3882713,3882753,0.121953191489362,0.108147169811321},
-{3283696,3847752,3847542,0.148751020408163,0.15508085106383},
-{3283700,3846633,3847029,0.1228375,0.131026666666667},
-{3283747,3878800,3878881,1000000,0.0348818181818182},
-{3283748,3878881,3879324,1000000,0.123439024390244},
-{3283749,3877812,3877779,0.0683464285714286,1000000},
-{3283750,3877779,3877713,0.112891525423729,1000000},
-{3283751,3876804,3875972,0.19018,1000000},
-{3283752,3875972,3875828,0.0377016393442623,1000000},
-{3283762,3877244,3877501,0.065655737704918,0.06675},
-{3283763,3877501,3878377,0.24355,0.251948275862069},
-{3283769,3873408,3873146,0.185196428571429,0.185196428571429},
-{3283770,3873146,3873047,0.115652830188679,0.117876923076923},
-{3283771,3872625,3872635,0.0656111111111111,0.0656111111111111},
-{3283779,3878408,3878690,0.0881068965517241,0.0896526315789474},
-{3283780,3878690,3879786,0.368275862068965,0.374736842105263},
-{3283781,3879786,3880030,0.102044444444444,0.103969811320755},
-{3283834,3858788,3858830,0.0720285714285714,0.07563},
-{3283835,3858830,3858843,0.0632769230769231,0.06855},
-{3283836,3858843,3858661,0.0774,0.0815837837837838},
-{3283837,3858661,3858497,0.0733116279069767,0.0750571428571429},
-{3283849,3871704,3871670,0.0873428571428571,0.0797478260869565},
-{3283850,3879682,3879299,1000000,0.161763636363636},
-{3283853,3901911,3901933,0.00620869565217391,1000000},
-{3283854,3901943,3901968,1000000,0.00821470588235294},
-{3283957,3856271,3856408,0.0534666666666667,1000000},
-{3283958,3856232,3856374,1000000,0.0727285714285714},
-{3283959,3856408,3856374,0.013575,0.013575},
-{3283960,3856408,3856670,0.0881142857142857,1000000},
-{3283961,3856374,3856651,1000000,0.0974368421052632},
-{3283962,3856670,3856651,0.01404,0.01404},
-{3283963,3856670,3856737,0.0168545454545455,1000000},
-{3283964,3856737,3856798,0.0191590909090909,1000000},
-{3283965,3856651,3856704,1000000,0.0187142857142857},
-{3283966,3856704,3856758,1000000,0.0172714285714286},
-{3283967,3856737,3856704,0.014325,0.014325},
-{3283968,3856798,3856984,0.0648142857142857,1000000},
-{3283969,3856984,3857116,0.0491837837837838,1000000},
-{3283970,3856758,3856958,1000000,0.0675951219512195},
-{3283971,3856958,3857094,1000000,0.045675},
-{3283972,3856984,3856958,0.01242,0.01242},
-{3284218,3874259,3874014,0.114193548387097,1000000},
-{3284223,3861631,3861491,0.0599538461538461,0.0556714285714286},
-{3284224,3861491,3861043,0.153083720930233,0.153083720930233},
-{3284252,3901207,3900934,0.164745,0.21966},
-{3284253,3900934,3900787,0.108092307692308,0.1171},
-{3285118,3893831,3894064,0.17811,0.1979},
-{3285119,3894064,3894544,0.297425,0.297425},
-{3285128,3896761,3896984,0.103288888888889,0.103288888888889},
-{3285129,3896984,3897275,0.145822222222222,0.145822222222222},
-{3285133,3897039,3897274,0.113311111111111,0.113311111111111},
-{3285134,3897274,3897559,0.1506,0.1506},
-{3285142,3896272,3896300,1000000,1000000},
-{3285144,3896300,3896314,0.03567,0.029725},
-{3285145,3895391,3895689,0.101244,1000000},
-{3285146,3895689,3896300,0.17094,1000000},
-{3285147,3895614,3895706,1000000,0.0265102040816327},
-{3285148,3895706,3896314,1000000,0.175555102040816},
-{3285149,3895689,3895706,0.020445,0.020445},
-{3285159,3895463,3894471,0.653345454545455,1000000},
-{3285161,3894471,3894200,0.18174,1000000},
-{3285162,3894200,3894083,0.1302,1000000},
-{3285163,3894471,3894162,1000000,1.05192},
-{3285164,3894162,3894200,1000000,0.0672888888888889},
-{3285165,3894125,3894107,0.0678,1000000},
-{3285166,3894107,3894083,0.0627446808510638,1000000},
-{3285167,3894162,3894107,1000000,0.0380869565217391},
-{3285173,3890627,3891035,1000000,0.146909090909091},
-{3285174,3891035,3891332,1000000,0.131711111111111},
-{3285175,3890822,3891030,0.36192,0.36192},
-{3285176,3891035,3891030,0.28482,0.28482},
-{3285177,3891030,3890822,0.36648,0.36648},
-{3285179,3890627,3890623,0.28728,0.28728},
-{3285180,3890623,3890619,0.09702,0.09702},
-{3285181,3890623,3890619,0.64692,0.64692},
-{3285191,3890055,3890304,0.160642105263158,0.160642105263158},
-{3285192,3890304,3890300,0.239353846153846,0.239353846153846},
-{3285197,3890050,3890213,1000000,0.0586545454545454},
-{3285198,3890213,3890300,1000000,0.0348774193548387},
-{3285201,3890213,3890214,0.27348,0.27348},
-{3285202,3890214,3889987,0.27012,0.27012},
-{3285203,3889987,3889794,0.32928,0.32928},
-{3285204,3890214,3889795,0.6054,0.6054},
-{3285205,3889795,3889796,0.42324,0.42324},
-{3285206,3889794,3889795,0.00852,0.00852},
-{3285213,3889404,3889418,0.183408,0.169822222222222},
-{3285214,3889057,3889052,1000000,1000000},
-{3285215,3889052,3889047,0.258571428571429,0.2172},
-{3285218,3894042,3894057,0.0666418604651163,1000000},
-{3285219,3894057,3894077,0.0768,1000000},
-{3285305,3919450,3919612,0.0551166666666667,0.049605},
-{3285306,3919612,3919794,0.0663658536585366,0.0632790697674419},
-{3285310,3921992,3922060,0.022335,0.0229076923076923},
-{3285313,3922794,3922906,0.049815,0.06226875},
-{3285314,3922906,3923753,0.32304,0.329632653061225},
-{3285316,3896300,3896907,0.1704,1000000},
-{3285317,3896907,3897391,0.136136170212766,1000000},
-{3285341,3908171,3908188,0.00965,0.0072375},
-{3285342,3908188,3908279,0.0618631578947368,0.0405310344827586},
-{3285429,3875077,3875332,0.424848,0.416517647058824},
-{3285433,3874819,3874821,0.0403846153846154,0.0403846153846154},
-{3285522,3889082,3889058,1000000,1000000},
-{3285523,3889058,3889057,1000000,1000000},
-{3285524,3889183,3889052,0.0436285714285714,0.0349028571428571},
-{3285525,3889393,3889397,0.126553846153846,0.253107692307692},
-{3285526,3889397,3889400,0.185823529411765,0.191454545454545},
-{3285527,3889183,3889285,0.0457,0.0645176470588235},
-{3285528,3889400,3889402,0.0383272727272727,0.039525},
-{3285529,3889402,3889404,0.02660625,0.02660625},
-{3285530,3889285,3889402,0.05004,0.0735882352941176},
-{3285533,3889058,3889183,0.89028,0.89028},
-{3285534,3889397,3889285,0.88506,0.88506},
-{3285567,3887643,3887634,1000000,0.0785428571428571},
-{3285568,3887634,3887624,1000000,0.244},
-{3285569,3888230,3888228,0.09303,1000000},
-{3285570,3888228,3888225,0.09192,0.127666666666667},
-{3285571,3887634,3888228,0.2205,0.3583125},
-{3285572,3889524,3889591,0.0168,0.0164181818181818},
-{3285573,3889591,3890026,0.107882608695652,0.107882608695652},
-{3285574,3890036,3890026,1000000,1000000},
-{3285575,3889591,3890036,1000000,1000000},
-{3285578,3890435,3890383,1000000,1000000},
-{3285579,3890383,3890036,1000000,1000000},
-{3285580,3890418,3890439,1000000,1000000},
-{3285581,3890439,3890435,1000000,1000000},
-{3285589,3890864,3890865,1000000,1000000},
-{3285590,3890435,3890865,1000000,1000000},
-{3285601,3887396,3887528,1000000,0.101668965517241},
-{3285602,3888064,3887711,0.120206896551724,0.112451612903226},
-{3285603,3887711,3887528,0.0848608695652174,0.0848608695652174},
-{3285604,3887680,3887711,0.09942,0.09942},
-{3285605,3887396,3887451,0.05712,0.05712},
-{3285606,3887451,3887680,0.34986,0.34986},
-{3285607,3887680,3887451,0.33312,0.33312},
-{3285643,3902542,3902859,1000000,1000000},
-{3285644,3902859,3903139,1000000,1000000},
-{3285648,3902686,3902755,0.0663666666666667,0.09955},
-{3285649,3902493,3902755,0.3576375,0.3576375},
-{3285650,3902755,3902555,0.3081,0.32864},
-{3285651,3902555,3902493,0.0628285714285714,0.0628285714285714},
-{3285652,3902493,3902555,0.167377777777778,0.167377777777778},
-{3285659,3900685,3900080,0.54423,0.54423},
-{3285660,3900080,3899120,1000000,1000000},
-{3285661,3901902,3901839,0.0361111111111111,0.0361111111111111},
-{3285834,3887418,3887632,0.0533294117647059,0.04533},
-{3285835,3887443,3887632,0.86322,0.86322},
-{3285836,3887632,3887844,0.0507,0.0450666666666667},
-{3285837,3887844,3887955,0.0193255813953488,0.0180652173913043},
-{3285838,3887844,3887975,0.280066666666667,0.280066666666667},
-{3285839,3887955,3888032,0.0204,0.0199466666666667},
-{3285840,3887975,3888032,0.2806,0.2806},
-{3285841,3888032,3888222,0.0423574468085106,0.0462976744186047},
-{3285842,3888222,3888337,0.0239733333333333,0.0263121951219512},
-{3285843,3888222,3888364,0.290288888888889,0.290288888888889},
-{3285844,3888337,3888413,0.0187714285714286,0.0202153846153846},
-{3285845,3888413,3888751,0.111124137931034,0.10070625},
-{3285846,3888364,3888413,0.281355555555556,0.281355555555556},
-{3285847,3891566,3892266,0.415090909090909,0.434857142857143},
-{3285848,3892266,3892351,0.119888888888889,0.119888888888889},
-{3285849,3892266,3891519,0.790444444444445,0.790444444444445},
-{3285865,3891566,3891842,0.872444444444444,0.872444444444444},
-{3285866,3892997,3893253,0.108,0.108},
-{3285881,3894032,3894160,0.0834588235294118,0.0834588235294118},
-{3285882,3894160,3894265,0.0943263157894737,0.0814636363636364},
-{3285883,3894265,3894279,0.0163714285714286,0.01146},
-{3285884,3894324,3894335,0.0125142857142857,0.00947027027027027},
-{3285885,3894279,3894324,1000000,0.0404052631578947},
-{3285886,3894246,3894279,1000000,0.0171111111111111},
-{3285887,3894242,3894246,1000000,0.0177923076923077},
-{3285888,3894242,3894211,0.01478,0.017736},
-{3285889,3894242,3894324,0.0429923076923077,1000000},
-{3285892,3894160,3894123,0.0226666666666667,0.0226666666666667},
-{3285893,3894123,3894246,1000000,1000000},
-{3285895,3892017,3892039,0.00808421052631579,0.0083027027027027},
-{3285896,3892039,3892169,0.0413384615384615,0.0413384615384615},
-{3285897,3892149,3892026,0.0662086956521739,0.0662086956521739},
-{3285898,3892039,3892026,0.120694736842105,0.1092},
-{3285899,3892020,3892148,0.0617111111111111,0.0617111111111111},
-{3285900,3892026,3892020,0.0795777777777778,0.0795777777777778},
-{3285901,3891553,3891979,0.151062857142857,0.135569230769231},
-{3285902,3891979,3892017,0.0157263157894737,0.0161513513513514},
-{3285903,3891979,3891937,0.441666666666667,0.441666666666667},
-{3285906,3892020,3891992,0.279177777777778,0.279177777777778},
-{3285907,3891992,3891937,0.0558,0.0558},
-{3285908,3892189,3891982,0.1677,1000000},
-{3285909,3891992,3891982,0.0819111111111111,1000000},
-{3285910,3891982,3891928,0.0485294117647059,1000000},
-{3285911,3891928,3891797,0.0814666666666667,1000000},
-{3285912,3891937,3891928,0.0844222222222222,1000000},
-{3285916,3891739,3891769,0.0252,0.0252},
-{3285917,3891769,3891937,0.1234125,0.0940285714285714},
-{3285918,3891797,3891765,0.0233684210526316,1000000},
-{3285919,3891769,3891765,0.0914222222222222,1000000},
-{3285920,3891513,3891696,0.140325,0.118168421052632},
-{3285921,3891696,3891739,0.02097,0.0199714285714286},
-{3285922,3891765,3891691,0.0519333333333333,1000000},
-{3285923,3891691,3891645,0.0350823529411765,1000000},
-{3285924,3891696,3891691,0.0926888888888889,1000000},
-{3285925,3891645,3891626,1000000,0.132666666666667},
-{3285926,3891797,3891787,1000000,0.132533333333333},
-{3285930,3889903,3889890,0.0392785714285714,0.0392785714285714},
-{3285931,3889890,3889963,0.2634,0.2634},
-{3285932,3889862,3889903,0.0190188679245283,0.0190188679245283},
-{3285933,3889903,3890236,0.140861538461538,0.140861538461538},
-{3285939,3888786,3889036,0.0810727272727273,0.07644},
-{3285940,3889036,3889204,0.04497,0.0418325581395349},
-{3285941,3889036,3889204,0.469888888888889,0.469888888888889},
-{3285947,3888786,3888759,0.126158823529412,0.138367741935484},
-{3285948,3888759,3888751,0.04788,0.0507818181818182},
-{3285949,3888786,3888759,0.249555555555556,0.249555555555556},
-{3285954,3886605,3886834,0.0630139534883721,0.058904347826087},
-{3285955,3886834,3886887,0.0142636363636364,0.013075},
-{3285956,3886834,3886860,0.2198,1000000},
-{3285957,3886887,3886914,0.00943255813953488,0.00845},
-{3285958,3886914,3887222,0.0899384615384615,0.0779466666666667},
-{3285959,3886860,3886914,0.214111111111111,1000000},
-{3285960,3886042,3886452,0.164813793103448,0.19915},
-{3285961,3886452,3886468,0.006675,0.00684615384615385},
-{3285962,3886452,3886446,0.3838875,1000000},
-{3285963,3886468,3886512,0.012409756097561,0.0130461538461538},
-{3285964,3886512,3886605,0.0264,0.0234666666666667},
-{3285965,3886446,3886512,0.2356,1000000},
-{3285966,3886098,3886049,0.189091304347826,0.193293333333333},
-{3285967,3886049,3886042,0.0224,0.0218790697674419},
-{3285968,3887570,3887588,1000000,1000000},
-{3285969,3887588,3887607,1000000,1000000},
-{3285970,3888050,3888044,1000000,1000000},
-{3285971,3888044,3888030,1000000,1000000},
-{3285972,3888216,3888295,0.0251555555555556,0.0251555555555556},
-{3285973,3888295,3888564,0.0988888888888889,0.0988888888888889},
-{3285974,3888216,3888295,0.3206,0.3206},
-{3285975,3885620,3885995,0.572777777777778,0.572777777777778},
-{3285976,3885995,3886049,0.03348,0.020925},
-{3285977,3884780,3885022,0.0985555555555556,0.0985555555555556},
-{3285978,3885022,3885167,0.1125,0.0964285714285714},
-{3285979,3885132,3884997,0.0688105263157895,0.118854545454545},
-{3285980,3884997,3884744,0.1726125,0.197271428571429},
-{3285981,3885022,3884997,0.179466666666667,0.179466666666667},
-{3285982,3884550,3884572,0.255688888888889,0.255688888888889},
-{3285983,3884744,3884719,0.0210315789473684,0.0285428571428571},
-{3285984,3884719,3884550,0.0661777777777778,0.0661777777777778},
-{3285985,3884719,3884709,0.0706333333333333,0.115581818181818},
-{3285986,3884709,3884701,0.0766666666666667,0.0985714285714286},
-{3285987,3884709,3884701,0.194377777777778,0.194377777777778},
-{3285988,3884701,3884695,0.0605,0.0605},
-{3285989,3884695,3884689,0.0462,0.0462},
-{3285990,3884695,3884689,0.196533333333333,0.196533333333333},
-{3285991,3884689,3884681,0.0610666666666667,0.0610666666666667},
-{3285992,3884681,3884673,0.205733333333333,0.205733333333333},
-{3285993,3884673,3884681,0.0526,0.0526},
-{3285994,3884579,3884668,1000000,1000000},
-{3285995,3884668,3885078,1000000,1000000},
-{3285996,3884673,3884668,0.0617111111111111,0.0617111111111111},
-{3285997,3885167,3885263,0.0526736842105263,0.0556},
-{3285998,3885132,3885247,0.0605052631578947,0.0676235294117647},
-{3285999,3885263,3885247,0.49164,0.49164},
-{3286000,3885263,3885359,0.051,0.0655714285714286},
-{3286001,3885359,3885395,0.0237230769230769,0.0237230769230769},
-{3286002,3885247,3885342,0.0554470588235294,0.0523666666666667},
-{3286003,3885359,3885342,0.49062,0.49062},
-{3286004,3885395,3885342,0.248976,0.248976},
-{3286006,3884699,3884706,1000000,1000000},
-{3286007,3884706,3884715,0.0369555555555556,0.0369555555555556},
-{3286008,3884418,3884706,0.3225,0.3225},
-{3286009,3884699,3884868,1000000,1000000},
-{3286010,3884868,3884872,0.0379555555555555,0.0379555555555555},
-{3286011,3884706,3884868,0.15486,0.15486},
-{3286012,3884868,3885183,0.32532,0.32532},
-{3286015,3883505,3883721,0.543923076923077,0.517390243902439},
-{3286016,3883721,3884580,0.22004,0.225040909090909},
-{3286017,3883721,3882903,0.52416,0.52416},
-{3286018,3883558,3883581,0.111755555555556,0.111755555555556},
-{3286019,3883581,3883605,0.0813111111111111,0.0813111111111111},
-{3286020,3883208,3883311,0.05082,0.05082},
-{3286025,3906782,3906803,0.00785625,0.00810967741935484},
-{3286026,3906803,3906962,0.0835285714285714,0.080648275862069},
-{3286027,3906954,3906803,0.115866666666667,0.115866666666667},
-{3286028,3907258,3907122,0.0863181818181818,0.111705882352941},
-{3286029,3881737,3881859,0.112114285714286,0.120738461538462},
-{3286030,3881859,3882138,0.174371428571429,0.174371428571429},
-{3286031,3882586,3882458,1.52128235294118,1.36114736842105},
-{3286032,3882601,3882586,0.1359,0.100136842105263},
-{3286033,3882601,3882608,0.110314285714286,1000000},
-{3286034,3882138,3882321,0.0983142857142857,0.086025},
-{3286035,3882321,3882601,0.172484210526316,1000000},
-{3286036,3882608,3882321,0.257621052631579,1000000},
-{3286037,3883478,3883412,0.0377142857142857,0.0495},
-{3286038,3883411,3883478,0.0709846153846154,0.0419454545454545},
-{3286039,3883411,3883293,1000000,0.0924},
-{3286040,3882608,3882937,0.18012,0.18012},
-{3286041,3882937,3883042,1000000,0.0640421052631579},
-{3286042,3883293,3883191,1000000,0.0395307692307692},
-{3286043,3883191,3882937,1000000,0.13371},
-{3286044,3883191,3883190,0.588444444444445,0.588444444444445},
-{3286045,3881737,3881787,0.0857555555555556,0.0857555555555556},
-{3286050,3880289,3879529,0.380355555555556,0.380355555555556},
-{3286051,3879529,3879470,1000000,1000000},
-{3286052,3880226,3879470,0.380711111111111,0.380711111111111},
-{3286053,3879513,3880213,0.351977777777778,0.351977777777778},
-{3286054,3879470,3878774,0.584111111111111,0.584111111111111},
-{3286055,3878774,3879717,0.401355555555556,0.401355555555556},
-{3286056,3878774,3878767,0.107955555555556,0.107955555555556},
-{3286057,3878767,3878822,1000000,1000000},
-{3286058,3878767,3878761,0.107955555555556,0.107955555555556},
-{3286059,3878761,3879700,0.400088888888889,0.400088888888889},
-{3286060,3878761,3878777,0.0948,0.0948},
-{3286061,3878981,3879087,1000000,1000000},
-{3286062,3878183,3878376,0.387111111111111,0.387111111111111},
-{3286063,3878376,3878649,1000000,1000000},
-{3286064,3878112,3878127,0.0209333333333333,0.0209333333333333},
-{3286065,3878127,3878183,0.194717647058824,0.236442857142857},
-{3286066,3878777,3878127,0.414566666666667,0.355342857142857},
-{3286067,3878127,3877738,0.550466666666667,0.41285},
-{3286068,3883042,3883169,1000000,0.0728823529411765},
-{3286069,3883169,3883411,1000000,0.139136842105263},
-{3286070,3877738,3877087,0.779972727272727,0.490268571428571},
-{3286071,3877087,3877298,0.119328,0.0962322580645161},
-{3286072,3877298,3877997,0.48405,0.455576470588235},
-{3286073,3878469,3878537,0.061,0.0508333333333333},
-{3286074,3878537,3878606,0.0572470588235294,0.0463428571428571},
-{3286075,3878793,3878537,0.221955555555556,0.221955555555556},
-{3286076,3878793,3878680,0.0950470588235294,0.1009875},
-{3286077,3878680,3878572,0.0771555555555556,0.0771555555555556},
-{3286078,3878572,3878409,0.129911111111111,0.129911111111111},
-{3286079,3878409,3878401,0.01131,0.01131},
-{3286080,3878401,3878469,0.06692,0.0590470588235294},
-{3286081,3878908,3878809,0.06837,0.0759666666666667},
-{3286082,3878809,3878776,0.0211714285714286,0.02223},
-{3286083,3879471,3879103,0.187869230769231,0.2326},
-{3286084,3879103,3878793,0.159475,0.212633333333333},
-{3286085,3878809,3879103,0.243644444444444,0.243644444444444},
-{3286086,3879103,3879281,0.336642857142857,0.336642857142857},
-{3286087,3879281,3879271,0.0665555555555556,0.0665555555555556},
-{3286088,3879557,3879440,1000000,1000000},
-{3286089,3879440,3879281,0.0688666666666667,0.0688666666666667},
-{3286090,3879648,3879893,0.216666666666667,0.216666666666667},
-{3286091,3879893,3880180,1000000,1000000},
-{3286092,3877053,3877021,0.0125555555555556,0.0125555555555556},
-{3286093,3877021,3876942,1000000,1000000},
-{3286094,3876942,3877087,1000000,1000000},
-{3286095,3877997,3877826,0.116333333333333,0.116333333333333},
-{3286096,3877997,3878311,0.4203,0.309694736842105},
-{3286097,3878311,3878401,0.0718941176470588,0.0763875},
-{3286098,3878908,3878693,0.25884,0.25884},
-{3286099,3878693,3879413,0.345822222222222,0.345822222222222},
-{3286101,3878776,3878723,0.03591,0.03591},
-{3286102,3878723,3878606,0.0841714285714286,0.0982},
-{3286103,3878323,3877826,0.229666666666667,0.229666666666667},
-{3286104,3878723,3878323,0.7412,0.59296},
-{3286105,3878071,3877744,0.134022222222222,0.134022222222222},
-{3286106,3878323,3878071,0.25524,0.464072727272727},
-{3286107,3878071,3877735,0.324221052631579,0.324221052631579},
-{3286108,3877735,3877493,0.206222222222222,0.206222222222222},
-{3286117,3878148,3878071,0.0827333333333333,0.0827333333333333},
-{3286120,3878770,3879132,1000000,1000000},
-{3286121,3879132,3879281,0.0730888888888889,0.0730888888888889},
-{3286161,3854740,3854395,0.0984130434782609,0.105279069767442},
-{3286162,3854395,3852779,0.451302127659575,0.4419},
-{3286175,3852712,3852428,0.0667363636363636,0.0652533333333333},
-{3286176,3852428,3851657,0.25124347826087,0.25124347826087},
-{3286177,3851657,3851650,0.0906125,0.0906125},
-{3286178,3851650,3851476,0.0949787234042553,0.0875294117647059},
-{3286201,3903486,3903568,0.0718857142857143,0.0539142857142857},
-{3286207,3910681,3910729,0.0248222222222222,0.026808},
-{3286208,3910729,3910848,0.0812181818181818,0.0687230769230769},
-{3286209,3911034,3911273,0.213494117647059,0.1578},
-{3286210,3910848,3911409,0.179663414634146,1000000},
-{3286211,3911409,3911532,0.0366585365853659,1000000},
-{3286212,3911273,3911409,0.0725111111111111,0.0889909090909091},
-{3286213,3911273,3911292,0.016272,0.0226},
-{3286214,3911402,3911477,0.0256457142857143,0.030951724137931},
-{3286215,3911477,3911549,0.0322645161290323,0.0285771428571429},
-{3286216,3911292,3911309,0.0387,0.0602},
-{3286217,3911309,3911477,0.240309677419355,1000000},
-{3286218,3911549,3911587,0.0179454545454545,0.0174176470588235},
-{3286219,3911587,3911961,0.199711111111111,0.215688},
-{3286220,3911309,3911587,1000000,0.2503},
-{3286221,3911535,3911580,0.0194,0.0187071428571429},
-{3286222,3911580,3911844,0.125275862068966,0.0981891891891892},
-{3286223,3913396,3913777,0.09075,1000000},
-{3286224,3913777,3913935,0.0275678571428571,1000000},
-{3286225,3915258,3915351,0.0499818181818182,0.0499818181818182},
-{3286226,3915351,3915447,1000000,1000000},
-{3286227,3915258,3914888,0.206127272727273,0.206127272727273},
-{3286228,3914888,3914483,1000000,1000000},
-{3286229,3914388,3914141,0.132488888888889,0.132488888888889},
-{3286230,3914141,3913831,0.154244444444444,0.154244444444444},
-{3286231,3914375,3914640,0.213211764705882,0.213211764705882},
-{3286232,3914141,3914375,1000000,1000000},
-{3286233,3903761,3903812,0.0279,0.0279},
-{3286234,3903812,3904057,0.130592307692308,0.130592307692308},
-{3286235,3904057,3904147,0.0452,0.0452},
-{3286236,3903812,3904057,0.421511111111111,0.421511111111111},
-{3286237,3900120,3900224,0.0523333333333333,0.0523333333333333},
-{3286238,3900224,3900312,1000000,1000000},
-{3286239,3899778,3899808,0.0262421052631579,0.0216782608695652},
-{3286240,3899808,3899987,0.292984615384615,0.19044},
-{3286241,3903741,3904005,0.152008695652174,0.11654},
-{3286242,3904005,3904174,0.154071428571429,0.126882352941176},
-{3286243,3904001,3904233,0.0908294117647059,0.0908294117647059},
-{3286244,3904233,3904385,0.116336842105263,0.11052},
-{3286245,3904005,3904233,0.40914,1000000},
-{3286246,3905496,3905535,1000000,1000000},
-{3286247,3905535,3905738,0.143844444444444,0.143844444444444},
-{3286248,3905880,3905725,0.0891555555555555,0.0891555555555555},
-{3286249,3908616,3908824,0.06105,0.0666},
-{3286250,3908824,3908863,0.0115818181818182,0.0106166666666667},
-{3286321,3908381,3908510,0.0668,0.0825176470588235},
-{3286322,3908510,3908750,0.0997928571428571,0.107469230769231},
-{3286323,3908523,3908510,0.0510171428571429,1000000},
-{3286325,3908523,3908621,0.05301,1000000},
-{3286326,3908621,3909098,0.166466666666667,0.1362},
-{3286327,3908510,3908621,0.0740571428571429,0.0740571428571429},
-{3286356,3905423,3905446,0.010536,0.0146333333333333},
-{3286357,3905446,3905484,0.0257478260869565,0.0423},
-{3286358,3905484,3905513,0.0250571428571429,0.04385},
-{3286359,3915101,3915237,0.0500941176470588,1000000},
-{3286360,3915237,3915330,0.0290150943396226,1000000},
-{3286362,3910450,3910695,0.112539130434783,0.112539130434783},
-{3286562,3903218,3902933,0.172333333333333,0.172333333333333},
-{3286563,3903006,3902762,0.129444444444444,0.129444444444444},
-{3286564,3902771,3902525,0.127466666666667,0.127466666666667},
-{3286565,3902529,3902278,0.129733333333333,0.129733333333333},
-{3286742,3892419,3892997,1.29162,1.29162},
-{3286743,3892419,3895841,6.01659,6.01659},
-{3286766,3901590,3901756,0.2966,0.138413333333333},
-{3286770,3864417,3864041,0.122892307692308,0.11982},
-{3286771,3864041,3863851,0.0543405405405405,0.0574457142857143},
-{3286773,3864888,3864511,0.100271428571429,0.102717073170732},
-{3286775,3865374,3865343,0.0154166666666667,0.015},
-{3286776,3865343,3864888,0.1404,1000000},
-{3286777,3864888,3865343,0.14055,1000000},
-{3286789,3893825,3894091,1000000,0.152155555555556},
-{3286790,3866112,3865591,0.123083720930233,1000000},
-{3286791,3865591,3865521,0.0158727272727273,0.01746},
-{3286792,3866560,3866248,0.0644372093023256,0.0659714285714286},
-{3286793,3866248,3866112,0.0306837209302326,1000000},
-{3286798,3865591,3866099,0.125971428571429,1000000},
-{3286799,3866099,3866248,0.0311162790697674,1000000},
-{3287320,3919541,3919407,0.204,0.204},
-{3287428,3904618,3903126,0.666,0.678109090909091},
-{3288519,3904484,3904837,0.162888888888889,0.162888888888889},
-{3288520,3904837,3904923,1000000,1000000},
-{3289019,3864889,3864652,0.08142,1000000},
-{3289020,3864652,3863953,0.211342105263158,1000000},
-{3289023,3875155,3875331,0.0926,1000000},
-{3289024,3875331,3875410,0.0361227272727273,1000000},
-{3290715,3848675,3848819,0.273022222222222,0.273022222222222},
-{3290716,3848819,3848831,0.0188363636363636,0.0188363636363636},
-{3290721,3848563,3848327,0.117127272727273,0.117127272727273},
-{3290723,3848838,3848650,0.475309090909091,0.387288888888889},
-{3290724,3848650,3848563,0.209228571428571,0.209228571428571},
-{3290725,3848838,3849293,0.260955555555556,0.260955555555556},
-{3290726,3849293,3849705,0.177927272727273,0.177927272727273},
-{3290727,3851640,3849850,0.6023625,0.6023625},
-{3290728,3849850,3849782,0.0339681818181818,0.0347581395348837},
-{3290729,3849452,3849451,1000000,1000000},
-{3290730,3848362,3847896,1000000,1000000},
-{3291805,3895100,3895166,1000000,1000000},
-{3291806,3895166,3895808,1000000,1000000},
-{3291807,3898884,3898977,0.0401632653061224,0.0385882352941176},
-{3291812,3893424,3893277,0.16194,0.16194},
-{3291813,3893277,3892443,0.84375,0.84375},
-{3291814,3890171,3891792,1.13007,1.13007},
-{3291815,3891792,3891806,0.01092,0.01092},
-{3291816,3891806,3889773,1.99464,1.99464},
-{3291817,3889773,3888287,0.91194,0.91194},
-{3291818,3889973,3890093,0.08145,0.08145},
-{3291819,3890093,3891213,0.78906,0.78906},
-{3291820,3889973,3889884,0.10644,0.10644},
-{3291821,3888476,3887886,0.314690909090909,0.314690909090909},
-{3291822,3887886,3887057,0.550688888888889,0.550688888888889},
-{3291823,3888953,3888646,0.156,0.156},
-{3291824,3888646,3887605,0.680222222222222,0.680222222222222},
-{3291825,3888021,3887151,0.466981818181818,0.466981818181818},
-{3291826,3887151,3886732,0.458028571428571,0.458028571428571},
-{3291827,3886537,3885063,1.46361,1.46361},
-{3291828,3885063,3884961,0.09129,0.09129},
-{3291829,3885404,3884632,0.48552,0.48552},
-{3291830,3879963,3881318,1.62582,1.62582},
-{3291831,3881318,3881614,0.31503,0.31503},
-{3291832,3880606,3881940,0.79782,0.79782},
-{3291833,3878844,3879705,0.377377777777778,0.377377777777778},
-{3291834,3879705,3880664,0.431763636363636,0.431763636363636},
-{3291846,3868565,3866110,0.8654,0.8654},
-{3291847,3874356,3868613,2.75465454545455,2.75465454545455},
-{3291848,3868613,3868565,0.0272666666666667,0.0272666666666667},
-{3291849,3875732,3875384,0.146955555555556,0.146955555555556},
-{3291850,3875384,3874356,0.412436363636364,0.412436363636364},
-{3291851,3876213,3875963,0.113955555555556,0.113955555555556},
-{3291852,3875963,3874945,0.4116,0.4116},
-{3291853,3877246,3877031,0.0927333333333333,0.0927333333333333},
-{3291854,3877031,3875889,0.409690909090909,0.409690909090909},
-{3292519,3872708,3873526,1000000,0.169356},
-{3292520,3872711,3873536,0.1772875,1000000},
-{3292521,3872716,3872848,0.309432,0.38679},
-{3292522,3872848,3872657,0.168925,0.176269565217391},
-{3292540,3873935,3874311,1000000,0.107473170731707},
-{3292541,3869912,3869859,0.0148263157894737,1000000},
-{3292542,3869859,3869842,0.00784615384615384,1000000},
-{3292543,3867784,3867783,1000000,0.0251076923076923},
-{3292544,3867141,3866976,1000000,0.0750923076923077},
-{3292545,3866741,3866619,1000000,0.0505395348837209},
-{3292546,3865076,3865036,0.0082054054054054,1000000},
-{3292547,3865036,3864753,0.07965,1000000},
-{3292548,3860327,3860229,0.021816,0.0404},
-{3292549,3858773,3858784,1000000,0.01652},
-{3292550,3858784,3859259,1000000,0.286121739130435},
-{3292551,3855710,3855684,0.00996279069767442,0.0104487804878049},
-{3292557,3916068,3916123,0.0486,0.0897230769230769},
-{3292558,3916123,3916555,0.279127659574468,0.291533333333333},
-{3292559,3913522,3913572,0.02568,0.02568},
-{3292560,3913572,3914836,0.468092307692308,0.521588571428571},
-{3292561,3915764,3916187,1000000,0.0963405405405405},
-{3292562,3915797,3916195,0.089152,1000000},
-{3292566,3907702,3907789,0.0411391304347826,1000000},
-{3292567,3907789,3907875,0.066768,0.066768},
-{3292568,3904108,3904176,0.03328,0.039936},
-{3292569,3904176,3904920,0.640966666666667,0.427311111111111},
-{3292570,3901770,3901788,0.0170129032258064,0.0181862068965517},
-{3292571,3901788,3901808,0.0204685714285714,0.0265333333333333},
-{3292572,3922677,3922767,0.0581586206896552,0.0544064516129032},
-{3292573,3922767,3922794,0.01835,0.0227793103448276},
-{3292574,3919402,3919477,0.0287142857142857,0.025125},
-{3292577,3902229,3902546,1000000,0.217772727272727},
-{3292578,3902546,3902640,1000000,0.0273391304347826},
-{3292579,3915173,3915212,0.053856,0.08976},
-{3292580,3915212,3915309,0.1198,0.163363636363636},
-{3292581,3917655,3917688,0.0268875,0.0220615384615385},
-{3292582,3917688,3917708,0.0138171428571429,0.0124},
-{3292583,3917789,3917727,0.048725,1000000},
-{3292584,3917727,3917708,0.0195,1000000},
-{3292585,3918265,3917996,0.162514285714286,0.162514285714286},
-{3292586,3917996,3917936,0.0459913043478261,0.0364758620689655},
-{3292587,3920794,3921287,0.0989809523809524,0.0989809523809524},
-{3292588,3921287,3921416,0.0278065573770492,0.0269238095238095},
-{3292623,3912088,3910563,0.5257875,0.5257875},
-{3292624,3895871,3895912,0.0564,0.0564},
-{3292625,3896422,3896402,0.01119,0.01119},
-{3292626,3896402,3895871,0.41877,0.41877},
-{3292627,3892958,3892986,0.00589615384615385,0.00589615384615385},
-{3292628,3892260,3892392,0.0281207547169811,0.0292235294117647},
-{3292629,3892392,3892691,0.0721132075471698,0.0749411764705882},
-{3292630,3891842,3892402,0.54588,0.54588},
-{3292631,3892402,3892419,0.0426,0.0426},
-{3292632,3891842,3892560,0.53343,0.53343},
-{3292633,3892560,3892577,0.02721,0.02721},
-{3292634,3902771,3902827,0.0331894736842105,0.03153},
-{3292635,3903218,3903275,0.030704347826087,0.0371684210526316},
-{3292636,3903444,3903485,1000000,0.0470117647058824},
-{3292637,3903713,3903762,0.02144,0.0292363636363636},
-{3292638,3899134,3897713,1000000,1000000},
-{3292639,3897713,3897628,1000000,1000000},
-{3292640,3896604,3897434,1000000,1000000},
-{3292641,3895912,3896034,0.17292,0.17292},
-{3292642,3896034,3896711,0.89682,0.89682},
-{3292643,3899786,3899650,0.0950444444444444,0.0950444444444444},
-{3292644,3901531,3901608,0.0283714285714286,1000000},
-{3292645,3901608,3901911,0.109105714285714,1000000},
-{3292646,3897604,3897471,0.0882888888888889,0.0882888888888889},
-{3292647,3895731,3895717,0.00830232558139535,1000000},
-{3292648,3895445,3895640,0.46181052631579,0.46181052631579},
-{3292649,3895640,3895632,0.0193058823529412,0.0105870967741935},
-{3292650,3895384,3895380,0.114914285714286,0.114914285714286},
-{3292651,3895380,3895445,0.1193,0.1193},
-{3292652,3895244,3895275,0.0236666666666667,1000000},
-{3292653,3895275,3895330,0.0463333333333333,1000000},
-{3292654,3894167,3894235,0.107882352941176,0.0965263157894737},
-{3292655,3894235,3894262,0.043604347826087,0.0385730769230769},
-{3292656,3894534,3894477,0.0142188679245283,0.0147764705882353},
-{3292657,3894476,3894559,0.0345818181818182,0.03804},
-{3292658,3894559,3894607,0.022448275862069,0.02325},
-{3292659,3894751,3894737,0.00745454545454545,0.00745454545454545},
-{3292660,3894737,3894430,0.183933333333333,0.183933333333333},
-{3292661,3895423,3896281,0.402886956521739,0.3861},
-{3292702,3874249,3874238,1000000,1000000},
-{3292703,3873609,3873827,0.113689285714286,0.113689285714286},
-{3292704,3873827,3875169,0.651377777777778,0.651377777777778},
-{3292705,3875313,3875723,0.155296153846154,0.149544444444444},
-{3292706,3875723,3875837,0.0355894736842105,0.0349758620689655},
-{3292707,3875777,3875672,0.0344816326530612,1000000},
-{3292708,3875672,3875138,0.258411428571429,1000000},
-{3292709,3875615,3875633,0.00861333333333333,1000000},
-{3292710,3875633,3875891,0.09596,1000000},
-{3292711,3875558,3875519,0.00978571428571428,1000000},
-{3292712,3875519,3875444,0.0211384615384615,1000000},
-{3292713,3875444,3875383,0.0196263157894737,1000000},
-{3292714,3875383,3875366,0.00611351351351351,1000000},
-{3292715,3875366,3875102,0.117476923076923,1000000},
-{3292716,3875208,3875471,0.0834954545454546,1000000},
-{3292717,3875155,3875208,0.0155714285714286,1000000},
-{3292718,3875155,3874896,1000000,0.0841578947368421},
-{3292719,3874896,3874818,1000000,0.0223170731707317},
-{3292720,3874905,3874705,0.17685,1000000},
-{3292721,3874705,3874461,0.123771428571429,1000000},
-{3292722,3874723,3874534,0.132727272727273,1000000},
-{3292723,3874534,3874461,0.0273483870967742,1000000},
-{3292724,3873408,3873443,0.0220947368421053,0.0224892857142857},
-{3292725,3873443,3873609,0.0926947368421053,0.09435},
-{3292726,3878020,3878181,0.0826285714285714,1000000},
-{3292727,3877905,3877873,0.012325,1000000},
-{3292728,3877533,3877767,0.0462763636363636,0.0446526315789474},
-{3292729,3877283,3877358,1000000,0.06115},
-{3292730,3877358,3877740,1000000,0.39354},
-{3292731,3877283,3877231,1000000,0.1066},
-{3292732,3877231,3877200,1000000,0.050448},
-{3292733,3876915,3876033,0.51656,0.6457},
-{3292734,3876033,3875734,0.242031818181818,0.266235},
-{3292735,3875734,3875706,0.014780487804878,0.014780487804878},
-{3292736,3875706,3875665,0.0594,0.101329411764706},
-{3292737,3875665,3875729,0.12945,0.1726},
-{3292738,3875549,3875545,0.00558571428571429,0.00521333333333333},
-{3292739,3875545,3875706,0.166771428571429,0.155653333333333},
-{3292740,3875539,3875431,0.0494129032258065,1000000},
-{3292741,3875431,3875412,0.0102,1000000},
-{3292742,3875307,3875380,0.0605853658536585,0.0577674418604651},
-{3292743,3875114,3875307,0.215133333333333,0.21045652173913},
-{3292744,3874913,3875114,0.2474,0.2474},
-{3292745,3874890,3874929,0.311481818181818,0.207654545454545},
-{3292746,3874929,3874913,0.0169333333333333,0.00635},
-{3292747,3874913,3874845,0.123911111111111,0.126249056603774},
-{3292748,3874845,3874819,0.123509433962264,0.123509433962264},
-{3292749,3865500,3865444,1000000,0.0219454545454545},
-{3292750,3869286,3869147,0.0331116279069767,1000000},
-{3292751,3869147,3869108,0.00895909090909091,1000000},
-{3292752,3871062,3871007,0.0151783783783784,1000000},
-{3292753,3868261,3868166,0.0221466666666667,1000000},
-{3292754,3868166,3868107,0.0111521739130435,1000000},
-{3292755,3868107,3868047,0.010395652173913,1000000},
-{3292756,3866226,3866108,0.0355928571428571,0.0369111111111111},
-{3292757,3865143,3865079,1000000,0.380329411764706},
-{3292758,3865143,3865069,1000000,0.0281117647058823},
-{3292759,3865056,3865161,0.0344909090909091,1000000},
-{3292760,3865427,3865401,1000000,0.010032},
-{3292761,3865648,3865507,0.123128571428571,0.0594413793103448},
-{3292762,3865648,3865583,0.15152,1000000},
-{3292763,3873598,3873643,0.0694714285714286,0.0784354838709677},
-{3292764,3873643,3873657,0.02125,0.0228358208955224},
-{3292765,3873458,3873598,0.122269565217391,0.129793846153846},
-{3292766,3873390,3873402,1000000,0.0226628571428571},
-{3292767,3873402,3873411,1000000,0.0510857142857143},
-{3292768,3873594,3873339,0.144775384615385,1000000},
-{3292769,3873339,3873305,0.0550909090909091,1000000},
-{3292770,3872370,3872562,0.25104,1000000},
-{3292771,3872321,3872523,1000000,0.26724},
-{3292772,3872103,3872321,0.501324324324324,0.529971428571429},
-{3292773,3871670,3871404,0.1094,0.100469387755102},
-{3292774,3871248,3871280,1000000,0.101963636363636},
-{3292775,3869882,3870272,0.155361290322581,0.155361290322581},
-{3292776,3869857,3869882,0.0989333333333333,0.0989333333333333},
-{3292777,3869822,3869524,0.17144,0.17144},
-{3292778,3869524,3869422,0.05336,0.05336},
-{3292779,3868993,3869031,0.0492571428571429,0.0492571428571429},
-{3292780,3869031,3869422,0.323627586206897,0.323627586206897},
-{3292781,3849860,3850324,0.147907692307692,0.140692682926829},
-{3292782,3850273,3849626,0.323088,0.323088},
-{3292783,3849886,3850185,0.137022222222222,0.137022222222222},
-{3292784,3850176,3850097,0.1474125,0.15724},
-{3292785,3850097,3849886,0.200244444444444,0.216264},
-{3292786,3850176,3850035,0.0632181818181818,0.0632181818181818},
-{3292787,3850176,3850010,0.171485714285714,0.171485714285714},
-{3292794,3866384,3866738,0.150822222222222,0.150822222222222},
-{3292795,3868093,3867959,0.118593103448276,0.118593103448276},
-{3292796,3871306,3871319,0.004452,0.00473617021276596},
-{3292797,3873371,3873510,1000000,0.174697959183673},
-{3292798,3873510,3873522,1000000,0.0393829787234043},
-{3292799,3873522,3873396,1000000,0.0951473684210526},
-{3292800,3873522,3873485,1000000,0.0571565217391304},
-{3292801,3873541,3873369,0.0776,0.0886857142857143},
-{3292802,3873369,3872607,0.278258823529412,0.286690909090909},
-{3292803,3873541,3873341,0.0927058823529412,0.0909230769230769},
-{3292804,3873341,3872353,0.283524,0.277964705882353},
-{3292864,3858439,3858522,0.0355454545454545,0.0355454545454545},
-{3292865,3858906,3860427,0.810666666666667,0.810666666666667},
-{3292866,3856967,3856545,0.0685107692307692,0.0654882352941176},
-{3292867,3856545,3854813,0.286627272727273,0.278197058823529},
-{3292868,3857568,3858011,0.167515384615385,0.106229268292683},
-{3292882,3896090,3896072,1000000,0.0239142857142857},
-{3292883,3896207,3896289,1000000,0.05601},
-{3292884,3899115,3899102,1000000,1000000},
-{3292885,3899859,3899901,0.0474,0.0778714285714286},
-{3292886,3900387,3900382,1000000,0.0516782608695652},
-{3292887,3900536,3900455,0.17085,0.0471310344827586},
-{3292888,3900780,3900680,0.0671052631578948,1000000},
-{3292889,3900680,3900565,0.07089,1000000},
-{3292890,3900846,3900819,1000000,0.0392769230769231},
-{3292891,3900819,3900831,1000000,0.04708},
-{3292892,3900780,3900742,1000000,0.0152428571428571},
-{3292893,3900742,3900670,1000000,0.0301421052631579},
-{3292894,3905019,3905392,1000000,1000000},
-{3292895,3901613,3901755,0.064975,1000000},
-{3292896,3901755,3901808,0.02592,1000000},
-{3292897,3896053,3896003,1000000,0.027528},
-{3292898,3896522,3896578,0.0274333333333333,1000000},
-{3292899,3896866,3896841,0.0114857142857143,0.0104869565217391},
-{3292900,3897371,3897337,1000000,1000000},
-{3292901,3898090,3898119,0.00795483870967742,0.010275},
-{3292902,3898182,3898185,1000000,0.014904},
-{3292903,3900114,3900173,0.0261818181818182,0.0261818181818182},
-{3292904,3900114,3900124,1000000,0.0981058823529412},
-{3292905,3900082,3900135,0.0296625,0.01582},
-{3292906,3899628,3899818,0.0641090909090909,0.07052},
-{3292907,3899748,3899518,0.09236,1000000},
-{3292908,3899629,3899677,0.0168,1000000},
-{3292909,3902618,3902719,0.04488,1000000},
-{3292914,3897670,3897794,0.0304173913043478,1000000},
-{3292915,3897520,3897568,0.0535714285714286,1000000},
-{3292916,3897394,3897421,0.0633,1000000},
-{3292917,3897219,3897231,0.11244,1000000},
-{3292918,3898437,3898468,0.00848333333333333,0.00783076923076923},
-{3292919,3898468,3898771,0.08376,0.0779162790697674},
-{3292920,3897499,3897709,0.125816326530612,0.125816326530612},
-{3292921,3897709,3898437,0.303286363636364,0.296546666666667},
-{3292922,3895323,3895517,0.507085714285714,0.5916},
-{3292923,3895517,3895650,0.107866666666667,0.107866666666667},
-{3292924,3896146,3896145,0.035575,0.0449368421052632},
-{3292925,3896247,3896333,0.17286,1000000},
-{3292926,3896333,3897259,1.1193,1000000},
-{3292927,3897382,3897552,0.1515,1000000},
-{3292970,3866493,3866382,0.09384,0.09384},
-{3292971,3866382,3866254,0.081,0.0964285714285714},
-{3292972,3866254,3866240,0.0132666666666667,0.0140470588235294},
-{3292973,3866240,3866051,0.164571428571429,0.1728},
-{3292974,3900038,3899953,0.0376222222222222,0.0376222222222222},
-{3292975,3899953,3899914,0.0103454545454545,0.0103454545454545},
-{3292976,3886116,3886113,1000000,0.00382153846153846},
-{3292977,3886113,3886072,1000000,0.0335538461538462},
-{3292978,3886050,3886038,0.00407272727272727,1000000},
-{3292979,3886038,3885972,0.0340567164179104,1000000},
-{3292980,3898879,3898936,1000000,1000000},
-{3292981,3898936,3898977,1000000,1000000},
-{3292982,3899077,3899233,0.09207,0.09207},
-{3292983,3899233,3899364,0.1229,0.1229},
-{3292984,3899364,3899489,0.134470588235294,0.122464285714286},
-{3292985,3899489,3899493,0.0384823529411765,0.0344315789473684},
-{3292986,3877353,3877181,0.0774888888888889,0.0774888888888889},
-{3292987,3877181,3875889,0.924654545454546,0.924654545454546},
-{3292988,3877315,3877080,0.0939555555555556,0.110295652173913},
-{3292989,3877080,3876982,0.0340645161290323,0.0391111111111111},
-{3292990,3886002,3886016,0.00971818181818182,1000000},
-{3292991,3886016,3886072,0.0311181818181818,1000000},
-{3292992,3898364,3897654,0.4998,0.4998},
-{3292993,3897654,3897567,0.06051,0.06051},
-{3292994,3899062,3898842,0.12627,0.12627},
-{3292995,3899428,3899062,0.36174,0.36174},
-{3292996,3899535,3899428,0.0800222222222222,0.0800222222222222},
-{3292997,3898364,3899746,1000000,1000000},
-{3292998,3899746,3899535,0.0999777777777778,0.0999777777777778},
-{3292999,3876193,3876199,0.0653272727272727,0.0653272727272727},
-{3293000,3876199,3876195,0.12735,0.12735},
-{3293001,3879740,3879760,0.0139153846153846,1000000},
-{3293002,3879760,3879799,0.0221076923076923,1000000},
-{3293003,3879718,3879738,1000000,0.00926842105263158},
-{3293004,3879738,3879771,1000000,0.0187945945945946},
-{3293005,3879392,3879276,0.0908210526315789,0.0663692307692308},
-{3293006,3875077,3875225,0.21448,0.2681},
-{3293007,3875225,3875266,0.0429230769230769,0.0265714285714286},
-{3293008,3875334,3875379,0.101471428571429,0.0947066666666667},
-{3293009,3875379,3875393,0.0358857142857143,0.0342545454545455},
-{3293010,3875560,3875522,0.026475,0.00814615384615384},
-{3293011,3875522,3875481,0.0290625,0.0103333333333333},
-{3293012,3875560,3875632,0.15844,1000000},
-{3293013,3875632,3875623,0.00703636363636364,1000000},
-{3293014,3879379,3879417,0.0184285714285714,1000000},
-{3293015,3879403,3879379,1000000,0.0215454545454545},
-{3293016,3879326,3879379,0.0204,1000000},
-{3293017,3879855,3879829,1000000,0.0313714285714286},
-{3293018,3880679,3881106,0.25245,1000000},
-{3293019,3881628,3881611,0.178971428571429,1000000},
-{3293020,3881412,3881451,1000000,0.020328},
-{3293021,3879295,3879346,1000000,0.0330666666666667},
-{3293022,3879171,3879010,0.106324137931034,1000000},
-{3293023,3880781,3880590,1000000,0.226730769230769},
-{3293024,3880590,3880570,1000000,0.01724},
-{3293025,3879018,3879559,1000000,1000000},
-{3293026,3879559,3879583,1000000,0.0343},
-{3293027,3863045,3863058,0.0475304347826087,0.0341625},
-{3293028,3863087,3861496,0.807422222222222,0.807422222222222},
-{3293029,3861496,3859438,0.855454545454545,0.855454545454545},
-{3293030,3859438,3859520,0.128576470588235,0.156128571428571},
-{3293031,3859520,3859690,0.31416,0.31416},
-{3293032,3859477,3859417,0.0200776119402985,0.0200776119402985},
-{3293033,3859417,3859408,0.00375223880597015,0.00375223880597015},
-{3293034,3859191,3858507,0.676381818181818,0.676381818181818},
-{3293035,3858507,3858717,0.128133333333333,0.128133333333333},
-{3293036,3858348,3858314,1000000,0.00435652173913043},
-{3293037,3858314,3854600,1000000,0.430774468085106},
-{3293038,3858172,3858080,0.0117954545454545,1000000},
-{3293039,3858080,3854609,0.404806451612903,1000000},
-{3293040,3857511,3857480,0.00869333333333333,0.00931428571428571},
-{3293041,3857480,3857330,0.0387702127659574,0.0404933333333333},
-{3293042,3856793,3856839,0.024624,0.024624},
-{3293043,3855913,3856649,0.39246,0.39246},
-{3293044,3855348,3855659,0.25464,0.25464},
-{3293045,3855659,3855913,0.1314,0.1314},
-{3293046,3854795,3854896,0.0318489795918367,0.031212},
-{3293047,3854896,3855579,0.196035294117647,0.199956},
-{3293048,3854795,3854812,0.0131636363636364,0.0188869565217391},
-{3293049,3854812,3854551,0.474518181818182,0.497114285714286},
-{3293050,3853675,3853904,0.511263157894737,0.539666666666667},
-{3293051,3853904,3853879,0.0341647058823529,0.0200275862068966},
-{3293052,3853235,3853638,0.18264,0.169111111111111},
-{3293053,3853638,3853879,0.0985043478260869,0.0924734693877551},
-{3293054,3851549,3852836,0.840023076923077,1.09203},
-{3293055,3850207,3850404,0.447917647058824,0.400768421052632},
-{3293056,3850404,3849705,1.1376,1.1376},
-{3293057,3849555,3849242,0.178866666666667,0.146345454545455},
-{3293058,3849242,3849212,0.0149454545454545,0.0133297297297297},
-{3293059,3878430,3878480,0.0935357142857143,1000000},
-{3293060,3878480,3878307,0.12752,1000000},
-{3293061,3878618,3878561,1000000,0.03673125},
-{3293062,3878797,3878733,0.0285111111111111,0.0334695652173913},
-{3293063,3878733,3878722,0.005856,0.00665454545454545},
-{3293064,3879616,3879886,1000000,0.127213333333333},
-{3293065,3879886,3880055,1000000,0.0883363636363636},
-{3293066,3880030,3880239,0.169977777777778,1000000},
-{3293067,3880239,3880206,0.0458608695652174,1000000},
-{3293068,3880030,3880498,0.206533333333333,0.189673469387755},
-{3293069,3880498,3880704,0.158689655172414,0.121105263157895},
-{3293070,3881078,3880798,0.143237837837838,0.108159183673469},
-{3293071,3880798,3880704,0.0753777777777778,0.0484571428571429},
-{3293072,3881082,3881178,0.0458341463414634,0.0536914285714286},
-{3293073,3881178,3881291,0.0536590909090909,0.0575853658536585},
-{3293074,3881111,3881268,1000000,0.0398571428571429},
-{3293075,3881268,3881291,1000000,0.0052448275862069},
-{3293076,3881139,3881295,0.0424551724137931,1000000},
-{3293077,3881295,3881329,0.0067551724137931,1000000},
-{3293078,3881491,3881494,0.04843125,1000000},
-{3293079,3881494,3881480,0.0302,1000000},
-{3293080,3881589,3881533,0.04784,0.04485},
-{3293081,3881533,3881480,0.0260347826086957,0.037425},
-{3293082,3881480,3881550,0.0301909090909091,1000000},
-{3293083,3881550,3881633,0.04146,1000000},
-{3293084,3881949,3881920,0.01893,0.02524},
-{3293085,3882493,3882529,1000000,1000000},
-{3293086,3882657,3882597,0.11594693877551,1000000},
-{3293087,3882597,3882541,0.04586,1000000},
-{3293088,3882712,3882693,0.02428,1000000},
-{3293089,3882693,3882657,0.0562285714285714,1000000},
-{3293090,3882636,3882712,0.0305769230769231,1000000},
-{3293091,3882724,3882656,0.05145,1000000},
-{3293092,3882522,3882654,1000000,0.0554153846153846},
-{3293093,3882652,3882548,1000000,0.03375},
-{3293094,3882548,3882631,1000000,1000000},
-{3293095,3882631,3882629,1000000,1000000},
-{3293096,3882629,3882602,1000000,1000000},
-{3293097,3849705,3850080,0.501163636363636,0.501163636363636},
-{3293098,3850080,3850119,0.260933333333333,0.260933333333333},
-{3293099,3850119,3850164,0.270363636363636,0.270363636363636},
-{3293100,3849313,3849305,0.02205,0.0363176470588235},
-{3293101,3849305,3848838,0.736605405405405,0.736605405405405},
-{3293102,3849313,3849247,0.0149660377358491,0.0149660377358491},
-{3293103,3849247,3849037,0.0551,0.0561396226415094},
-{3293104,3848851,3849042,0.106022222222222,0.106022222222222},
-{3293105,3849042,3849861,0.334163636363636,0.334163636363636},
-{3293106,3848910,3849105,1000000,1000000},
-{3293107,3849105,3850182,1000000,1000000},
-{3293108,3850182,3849578,0.543363636363636,0.543363636363636},
-{3293109,3849578,3849147,0.2154,0.2154},
-{3293110,3850696,3850043,0.0957438202247191,1000000},
-{3293111,3850043,3849499,0.07976,1000000},
-{3293112,3850854,3850168,1000000,0.0881755102040816},
-{3293113,3850168,3849512,1000000,0.0920273684210526},
-{3293114,3857991,3858327,0.108323076923077,0.084492},
-{3293115,3858060,3857977,1000000,0.0206571428571429},
-{3293116,3857977,3857587,1000000,0.0802723404255319},
-{3293117,3857812,3857976,0.0330679245283019,0.0257735294117647},
-{3293118,3857976,3858034,0.0123,0.00976764705882353},
-{3293119,3858611,3858302,0.114272727272727,1000000},
-{3293120,3858302,3858180,0.0261807692307692,1000000},
-{3293121,3858180,3857973,0.0431892857142857,1000000},
-{3293122,3857973,3857812,0.0362947368421053,1000000},
-{3293123,3858611,3858572,0.0530322580645161,0.051375},
-{3293124,3858572,3858558,0.0161806451612903,0.0159238095238095},
-{3293125,3858888,3859189,1000000,0.0591807692307692},
-{3293126,3859189,3859469,1000000,0.0581571428571429},
-{3293127,3858903,3859776,0.285672727272727,0.285672727272727},
-{3293128,3859776,3859940,0.0720888888888889,0.0720888888888889},
-{3293129,3859091,3859910,0.3434,0.3434},
-{3293130,3859910,3859940,0.0165333333333333,0.0165333333333333},
-{3293131,3860696,3861255,0.2564,0.2564},
-{3293132,3861255,3861601,0.151836363636364,0.151836363636364},
-{3293133,3860696,3861776,0.517133333333333,0.517133333333333},
-{3293134,3861776,3861900,0.0549818181818182,0.0549818181818182},
-{3293135,3861378,3861953,1000000,0.126140625},
-{3293136,3862066,3862042,1000000,0.00643636363636364},
-{3293137,3862042,3861991,1000000,0.0144214285714286},
-{3293138,3862288,3862284,0.0144206896551724,0.0134903225806452},
-{3293139,3862284,3862280,0.0248625,0.0241090909090909},
-{3293142,3883089,3883430,0.0713678571428571,1000000},
-{3293143,3883044,3883361,1000000,0.0665389830508474},
-{3293144,3864183,3864211,0.0595125,0.0453428571428571},
-{3293145,3864211,3864222,0.009,0.009},
-{3293146,3849628,3849526,1000000,1000000},
-{3293147,3849526,3849505,1000000,1000000},
-{3293148,3852316,3852304,0.0138666666666667,0.0138666666666667},
-{3293149,3852304,3851741,0.614263636363636,0.643514285714286},
-{3293150,3853628,3852737,0.512422222222222,0.628881818181818},
-{3293151,3852737,3852728,0.004525,0.00638823529411765},
-{3293152,3854250,3854134,0.167576470588235,0.167576470588235},
-{3293153,3854870,3854543,0.194379310344828,0.28185},
-{3293154,3855397,3855247,0.0929111111111111,0.0929111111111111},
-{3293155,3861596,3861603,0.00920869565217391,0.01412},
-{3293156,3861603,3861723,0.118281818181818,0.17348},
-{3293161,3892857,3892128,0.462225,1000000},
-{3293162,3892128,3892117,0.0128,1000000},
-{3293163,3893982,3894313,1000000,1000000},
-{3293164,3893249,3893329,0.1431,0.1431},
-{3293165,3893249,3893222,1000000,1000000},
-{3293166,3892592,3892823,0.0774181818181818,0.0774181818181818},
-{3293167,3892823,3893249,0.55285,0.510323076923077},
-{3293168,3891457,3891611,1000000,1000000},
-{3293171,3890771,3890844,0.227025,0.12108},
-{3293172,3890612,3890844,0.209446153846154,1000000},
-{3293173,3890112,3890283,0.112566666666667,1000000},
-{3293174,3890283,3890612,0.295476923076923,1000000},
-{3293175,3889316,3888950,0.15214,0.147232258064516},
-{3293176,3888950,3888915,0.0136153846153846,0.01416},
-{3293177,3888988,3889455,0.371366666666667,0.33423},
-{3293178,3889455,3889561,0.129642857142857,0.129642857142857},
-{3293179,3888972,3889664,1000000,0.303495},
-{3293180,3888972,3888893,0.0406571428571429,0.0449368421052632},
-{3293181,3888320,3888521,1000000,0.060195652173913},
-{3293188,3891710,3892318,0.154848,1000000},
-{3293189,3889167,3889132,1000000,0.0169894736842105},
-{3293190,3889132,3889066,1000000,0.0277542857142857},
-{3293191,3889462,3889443,0.008856,1000000},
-{3293192,3889443,3888909,0.286555555555556,1000000},
-{3293193,3883989,3883954,0.0193272727272727,0.0193272727272727},
-{3293194,3883954,3883686,0.178333333333333,0.178333333333333},
-{3293195,3881362,3880930,0.360325,1000000},
-{3293196,3880766,3880944,0.0824108108108108,0.160484210526316},
-{3293197,3880667,3880800,0.0632,1000000},
-{3293275,3893705,3893723,0.0131837837837838,1000000},
-{3293276,3894585,3894802,1000000,0.05469375},
-{3293277,3895892,3895875,1000000,0.0656},
-{3293278,3895892,3895986,1000000,0.0469666666666667},
-{3293279,3892586,3892942,0.139176,1000000},
-{3293280,3892942,3892959,0.0121333333333333,1000000},
-{3293281,3892959,3892953,0.00984,0.00984},
-{3293282,3892953,3892875,0.0654521739130435,0.07527},
-{3293283,3894830,3894835,1000000,1000000},
-{3293357,3883941,3884899,0.143492957746479,1000000},
-{3293358,3884899,3885302,0.0588608695652174,1000000},
-{3293359,3883947,3884913,1000000,0.149713043478261},
-{3293360,3884913,3885290,1000000,0.0549739130434783},
-{3293361,3901585,3901643,1000000,0.0236914285714286},
-{3293362,3901643,3901943,1000000,0.108855882352941},
-{3293363,3913336,3914556,0.85332,0.85332},
-{3293364,3914556,3914574,0.01272,0.01272},
-{3293365,3913478,3914063,0.23175,0.218117647058824},
-{3293366,3914063,3914082,0.0140117647058824,0.00882222222222222},
-{3293367,3912896,3913416,0.271977777777778,0.22948125},
-{3293368,3913416,3913440,0.02432,0.0110545454545455},
-{3293369,3911799,3912300,0.19607027027027,0.186015384615385},
-{3293370,3912300,3912334,0.0241428571428571,0.0144857142857143},
-{3293371,3909648,3910535,0.6268,0.65814},
-{3293372,3906538,3906590,0.02322,0.02322},
-{3293373,3906590,3906752,0.05528,0.05528},
-{3293374,3906752,3907156,0.230842105263158,0.230842105263158},
-{3293375,3910724,3913000,0.330286567164179,0.325429411764706},
-{3293376,3907041,3907251,0.23928,0.23928},
-{3293377,3906009,3906278,0.1946,0.1946},
-{3293378,3906278,3906335,0.0395111111111111,0.0395111111111111},
-{3293379,3906335,3906355,0.0584222222222222,0.0584222222222222},
-{3293380,3907251,3907220,0.78063,0.78063},
-{3293381,3907220,3907149,0.05064,0.05064},
-{3293382,3907190,3907336,0.0978444444444444,0.0978444444444444},
-{3293383,3907336,3907394,0.0896545454545454,0.0896545454545454},
-{3293384,3907394,3907183,0.0919818181818182,0.0919818181818182},
-{3293385,3907183,3906690,0.172888888888889,0.172888888888889},
-{3293386,3905968,3905876,0.0399777777777778,0.0399777777777778},
-{3331546,3879171,3879185,1000000,0.0143769230769231},
-{3331547,3879185,3879217,1000000,0.0194666666666667},
-{3331548,3879299,3879174,1000000,0.0507454545454545},
-{3331771,3898987,3899228,0.153381818181818,0.16872},
-{3331772,3899323,3899506,0.100577777777778,0.0798705882352941},
-{3331773,3899506,3899670,0.095575,0.0849555555555556},
-{3331774,3899506,3899617,0.240288888888889,0.240288888888889},
-{3331775,3904818,3904311,0.331513043478261,0.346581818181818},
-{3331776,3904311,3904022,0.147921428571429,0.165672},
-{3331777,3903928,3904311,0.2483625,1000000},
-{3331962,3881680,3881661,0.0151,1000000},
-{3331963,3881661,3881237,0.431325,1000000},
-{3331966,3850772,3851044,0.28254,0.269085714285714},
-{3331967,3851706,3851874,0.144312,0.144312},
-{3331968,3851874,3852372,0.316872727272727,0.360579310344828},
-{3331969,3852766,3852868,0.0742,0.0933483870967742},
-{3331970,3852766,3851906,0.266127272727273,0.266127272727273},
-{3331971,3851044,3851454,0.216644444444444,0.216644444444444},
-{3331972,3851454,3851874,0.209622222222222,0.209622222222222},
-{3331973,3852372,3852547,0.0669681818181818,0.0685255813953488},
-{3331974,3852547,3852766,0.12508,0.137282926829268},
-{3331975,3852485,3852547,0.0152727272727273,0.0152727272727273},
-{3331976,3851454,3852027,0.411044444444444,0.411044444444444},
-{3331977,3852027,3852485,0.174333333333333,0.174333333333333},
-{3331978,3851840,3851652,0.0699636363636364,0.0699636363636364},
-{3332140,3849205,3848556,0.457336363636364,0.591847058823529},
-{3332362,3898091,3898852,0.299588235294118,0.2778},
-{3332363,3898852,3898884,0.011669387755102,0.0109961538461538},
-{3332497,3864009,3864013,0.06005,1000000},
-{3332498,3863854,3864015,1000000,0.0953052631578947},
-{3332499,3863465,3863472,1000000,0.00842222222222222},
-{3332500,3863472,3864027,1000000,0.771988235294118},
-{3332501,3862791,3862824,1000000,0.0445411764705882},
-{3332502,3862824,3863615,1000000,0.796857142857143},
-{3332503,3862616,3862587,0.0426,1000000},
-{3332504,3862587,3862535,0.0979909090909091,1000000},
-{3332505,3860787,3860810,0.0389333333333333,0.0368842105263158},
-{3332506,3860810,3860921,0.120444444444444,0.120444444444444},
-{3332507,3860524,3860396,0.04836,0.101810526315789},
-{3332508,3860327,3860396,1000000,0.08097},
-{3332509,3860229,3859961,0.071075,0.100341176470588},
-{3332510,3859315,3859328,0.0297157894736842,1000000},
-{3332511,3859961,3859563,0.141754838709677,0.107180487804878},
-{3332512,3859563,3859475,0.0340714285714286,0.0244615384615385},
-{3332513,3859328,3859350,0.0174571428571429,1000000},
-{3332514,3859350,3859781,0.2868,1000000},
-{3332515,3858773,3858317,0.31135,0.298896},
-{3332516,3858245,3858317,0.0544090909090909,0.0323513513513514},
-{3332517,3866450,3866346,1000000,0.052875},
-{3332518,3866346,3866217,1000000,0.0831428571428571},
-{3332519,3866307,3866405,0.0483545454545454,1000000},
-{3332520,3866538,3866734,0.0652071428571429,1000000},
-{3332521,3866755,3866619,0.14696,1000000},
-{3332522,3867408,3867210,1000000,0.199133333333333},
-{3332523,3867639,3867426,1000000,0.110616},
-{3332524,3867426,3867141,1000000,0.12252},
-{3332525,3867784,3867668,0.0266,1000000},
-{3332526,3867668,3867585,0.0245066666666667,1000000},
-{3332527,3869010,3868831,0.0470590909090909,1000000},
-{3332528,3870062,3869912,0.0524275862068966,0.0460727272727273},
-{3332529,3870832,3870375,0.26805,1000000},
-{3332530,3871064,3871123,0.129161538461538,1000000},
-{3332531,3871123,3871122,0.00783529411764706,1000000},
-{3332532,3871221,3871207,1000000,0.17676},
-{3332533,3871207,3871199,1000000,0.0141789473684211},
-{3332534,3871496,3871465,1000000,0.00754545454545455},
-{3332535,3871465,3871410,1000000,0.0136909090909091},
-{3332536,3872019,3871496,1000000,0.125616666666667},
-{3332537,3872381,3872560,1000000,0.03788},
-{3332538,3872628,3872630,1000000,0.0462714285714286},
-{3332539,3872657,3872632,0.0391888888888889,0.0384763636363636},
-{3332540,3872632,3872625,0.438621818181818,0.423231578947368},
-{3332545,3872878,3872866,0.0243762711864407,0.0282},
-{3332546,3872866,3872855,0.03205,0.0369807692307692},
-{3332547,3872669,3872700,1000000,0.0766829268292683},
-{3332548,3872700,3872708,1000000,0.0194},
-{3332549,3872569,3872608,0.1146,1000000},
-{3332550,3872608,3872613,0.02484,1000000},
-{3332551,3872006,3872003,0.016551724137931,1000000},
-{3332552,3872003,3871985,0.112525,1000000},
-{3332553,3871483,3871468,1000000,1000000},
-{3332554,3871468,3871421,1000000,1000000},
-{3332555,3870812,3870766,0.01378,1000000},
-{3332556,3870766,3870734,0.00687096774193548,1000000},
-{3332557,3870759,3870726,1000000,0.00826153846153846},
-{3332558,3870726,3870699,1000000,0.011016},
-{3332559,3870126,3870101,0.0201538461538462,1000000},
-{3332560,3870101,3870058,0.0384486486486487,1000000},
-{3332561,3870058,3870014,0.0248833333333333,1000000},
-{3332562,3870014,3869965,0.018372972972973,1000000},
-{3332563,3869965,3869912,0.0160702702702703,1000000},
-{3332564,3869010,3868867,0.0712222222222222,0.09615},
-{3332565,3867783,3867779,1000000,0.0658714285714286},
-{3332566,3867779,3867772,1000000,0.261505263157895},
-{3332567,3867585,3867554,0.0210461538461538,0.0304},
-{3332568,3867554,3866916,0.288535714285714,0.577071428571428},
-{3332569,3867585,3867366,0.0646266666666667,1000000},
-{3332570,3867366,3867052,0.0985813953488372,1000000},
-{3332571,3866482,3866208,0.07788,1000000},
-{3332572,3866420,3866122,1000000,0.0746},
-{3332573,3865076,3865082,0.0237882352941176,0.0139448275862069},
-{3332574,3865082,3865105,0.163094117647059,0.163094117647059},
-{3332575,3864550,3864520,0.0174642857142857,1000000},
-{3332576,3864520,3864475,0.0132342857142857,1000000},
-{3332577,3864475,3864435,0.0110470588235294,1000000},
-{3332619,3864435,3864386,0.01515,1000000},
-{3332620,3856069,3856271,0.0984222222222222,1000000},
-{3332621,3856027,3855787,0.08817,0.103729411764706},
-{3332622,3855787,3855710,0.024,0.0258461538461538},
-{3332623,3852289,3851945,1000000,0.310517647058824},
-{3332624,3851901,3851945,0.01872,1000000},
-{3332625,3851901,3851878,1000000,0.014328},
-{3332626,3851878,3849591,1000000,1.41927},
-{3332627,3855684,3855644,0.0173571428571429,0.0177804878048781},
-{3332628,3855644,3855370,0.108230769230769,0.1005},
-{3332631,3918119,3918327,0.0768,0.0861090909090909},
-{3332632,3918327,3918370,0.0194294117647059,0.02202},
-{3332633,3920820,3920285,0.329688888888889,0.342369230769231},
-{3332634,3911732,3911914,0.13758,0.13758},
-{3332635,3911914,3913103,0.72675,0.72675},
-{3332636,3909224,3909338,0.18,0.187826086956522},
-{3332637,3909338,3910835,0.685866666666667,0.685866666666667},
-{3332638,3908743,3908768,0.00487659574468085,0.00545714285714286},
-{3332639,3906662,3906679,0.00901395348837209,0.00880909090909091},
-{3332640,3906679,3906735,0.0253,0.0247116279069767},
-{3332641,3907855,3907682,1000000,0.07604},
-{3332642,3907682,3907642,1000000,0.01336},
-{3332643,3908083,3908136,0.0124897959183673,1000000},
-{3332644,3908270,3908448,0.0465789473684211,0.0421428571428571},
-{3332653,3905869,3905884,0.00968275862068966,0.011232},
-{3332654,3907215,3907128,0.0503032258064516,1000000},
-{3332655,3907128,3907106,0.00755172413793103,1000000},
-{3332656,3907215,3907191,1000000,0.0699652173913043},
-{3332657,3907191,3907164,1000000,0.0417},
-{3332658,3907593,3907629,0.1337,1000000},
-{3332659,3907629,3907702,0.0301909090909091,1000000},
-{3332660,3907875,3907907,0.0287571428571429,0.0298222222222222},
-{3332662,3923205,3924137,0.616118918918919,0.735367741935484},
-{3332669,3922922,3923485,0.142490909090909,0.142490909090909},
-{3332670,3921275,3921370,0.0871272727272727,0.0871272727272727},
-{3332671,3921370,3921875,0.464533333333333,0.464533333333333},
-{3332672,3918426,3918582,0.0712714285714286,0.0700210526315789},
-{3332673,3918141,3917296,0.515171428571429,0.450775},
-{3332674,3917296,3915952,0.5439375,0.511941176470588},
-{3332675,3915952,3916028,0.083775,0.0957428571428571},
-{3332676,3916028,3916452,0.27387,0.3222},
-{3332677,3915096,3915208,0.153914285714286,0.153914285714286},
-{3332678,3915208,3915648,0.329735294117647,0.249133333333333},
-{3332679,3910214,3910245,0.00857777777777778,0.00857777777777778},
-{3332680,3910245,3909473,0.353618181818182,0.353618181818182},
-{3332681,3907732,3907270,0.376615384615385,0.188307692307692},
-{3332682,3907270,3907243,0.0127909090909091,0.011256},
-{3332683,3907243,3907230,0.00913548387096774,0.00944},
-{3332684,3907230,3907215,0.0115935483870968,0.0128357142857143},
-{3332685,3905884,3905922,0.0371225806451613,0.0396827586206897},
-{3332686,3905922,3906139,0.166552941176471,0.166552941176471},
-{3332687,3907907,3908028,0.04426,0.04426},
-{3332688,3908028,3908270,0.0779647058823529,0.0736333333333333},
-{3332689,3907593,3907860,1000000,0.0705},
-{3332690,3907860,3908123,1000000,0.0710594594594594},
-{3332691,3907579,3907821,0.050256,1000000},
-{3332692,3907821,3908083,0.0538408163265306,1000000},
-{3332694,3922243,3921624,0.367345945945946,0.37755},
-{3332695,3921624,3921604,0.0108818181818182,0.0082551724137931},
-{3332736,3895293,3895276,0.0281333333333333,0.0281333333333333},
-{3332737,3895276,3896312,0.874327272727273,0.874327272727273},
-{3332738,3894049,3894070,1000000,1000000},
-{3332739,3895701,3896280,0.374825,0.2726},
-{3332740,3896280,3896652,0.136271428571429,0.136271428571429},
-{3332741,3901914,3901924,0.004464,0.00465},
-{3332742,3901924,3902016,0.031596,0.0329125},
-{3332743,3902016,3902099,0.0410307692307692,0.0508},
-{3332744,3903208,3903918,0.597618181818182,0.597618181818182},
-{3332745,3904871,3904914,0.01878,0.0165705882352941},
-{3332746,3904914,3904971,0.03494,0.0291166666666667},
-{3332747,3904010,3904069,0.0379333333333333,0.0379333333333333},
-{3332748,3903918,3903993,0.150776470588235,0.11144347826087},
-{3332749,3903993,3904010,0.0322285714285714,0.03008},
-{3332750,3903762,3903816,0.02406,0.028872},
-{3332751,3903816,3904010,0.0761470588235294,0.0739714285714286},
-{3332752,3903485,3903525,1000000,0.0316090909090909},
-{3332753,3903525,3904603,1000000,0.465781818181818},
-{3332754,3903275,3903329,0.0282,0.0250666666666667},
-{3332755,3903329,3904001,0.308236363636364,0.308236363636364},
-{3332756,3903006,3903094,0.0585391304347826,0.0792},
-{3332757,3903094,3903741,0.302927272727273,0.302927272727273},
-{3332758,3902827,3902867,0.0336315789473684,0.0304285714285714},
-{3332759,3902867,3903905,0.605746153846154,0.54308275862069},
-{3332760,3902529,3902625,0.0983,0.073725},
-{3332761,3902625,3903682,0.721090909090909,0.721090909090909},
-{3332762,3902361,3903489,0.889933333333333,0.53396},
-{3332763,3902099,3902115,0.0105,0.0121578947368421},
-{3332764,3902115,3903269,0.70424347826087,0.70424347826087},
-{3332765,3901781,3901903,0.049404,0.0504122448979592},
-{3332766,3901903,3901914,0.0036,0.00375},
-{3332767,3900891,3901049,0.119888888888889,0.119888888888889},
-{3332768,3901049,3901106,0.052584,0.052584},
-{3332769,3900288,3900271,0.00991363636363636,0.0106390243902439},
-{3332770,3900271,3900107,0.0715116279069767,0.0809210526315789},
-{3332771,3900107,3899526,0.2457,0.292183783783784},
-{3332772,3900483,3899553,0.421594285714286,0.409883333333333},
-{3332773,3899553,3899526,0.0220090909090909,0.0172928571428571},
-{3332774,3899287,3899317,0.0122181818181818,0.0122181818181818},
-{3332775,3899317,3899988,0.432933333333333,0.432933333333333},
-{3332776,3899095,3899124,0.0147130434782609,0.02256},
-{3332777,3899124,3899244,0.087264,0.0991636363636364},
-{3332778,3898902,3898914,0.0221625,0.00933157894736842},
-{3332779,3898914,3899095,0.15815,0.0925756097560975},
-{3332780,3898677,3898891,1000000,0.208224},
-{3332781,3898891,3898902,1000000,0.00934736842105263},
-{3332782,3898677,3898750,0.03748,0.07496},
-{3332783,3898750,3898970,0.105859459459459,0.186514285714286},
-{3332784,3898232,3898374,0.0577454545454546,0.0577454545454546},
-{3332785,3898374,3898937,0.437288888888889,0.437288888888889},
-{3332786,3897821,3897877,1000000,0.043272},
-{3332787,3897877,3898232,1000000,0.2411375},
-{3332788,3897549,3897571,0.0148885714285714,0.015104347826087},
-{3332789,3895502,3895733,0.0917619047619048,1000000},
-{3332790,3895733,3896018,0.0918727272727273,1000000},
-{3332791,3895536,3895502,0.01922,1000000},
-{3332792,3895146,3895439,1000000,0.155530434782609},
-{3332793,3895439,3895536,1000000,0.051625},
-{3332794,3895146,3895150,0.0233625,1000000},
-{3332795,3895150,3895199,0.0850838709677419,1000000},
-{3332796,3895018,3895059,0.0228230769230769,1000000},
-{3332797,3895059,3895199,0.0730758620689655,1000000},
-{3332798,3895005,3895020,1000000,0.00710322580645161},
-{3332799,3895020,3895054,1000000,0.0186},
-{3332800,3894748,3894787,1000000,0.0292723404255319},
-{3332801,3894787,3894810,1000000,0.0170869565217391},
-{3332802,3894701,3894721,1000000,0.0227076923076923},
-{3332803,3894721,3894748,1000000,0.0204734693877551},
-{3332804,3894349,3894584,1000000,0.343955172413793},
-{3332805,3894584,3894701,1000000,0.114993103448276},
-{3332806,3894508,3894429,1000000,0.136609523809524},
-{3332807,3894429,3894349,1000000,0.1572375},
-{3332808,3894262,3894281,0.0391714285714286,0.0376352941176471},
-{3332809,3894281,3894291,0.0137884615384615,0.0140588235294118},
-{3332810,3895330,3895453,0.0787714285714286,1000000},
-{3332811,3895453,3895993,0.430408695652174,1000000},
-{3332812,3895993,3895959,0.0185314285714286,1000000},
-{3332813,3895959,3895731,0.107839024390244,1000000},
-{3332814,3898018,3897879,0.1036,0.143446153846154},
-{3332815,3897879,3897604,0.253523076923077,0.253523076923077},
-{3332816,3894021,3894030,1000000,1000000},
-{3332817,3894030,3894049,1000000,1000000},
-{3332834,3868525,3868598,0.0494666666666667,1000000},
-{3332835,3869116,3868908,1000000,0.044016},
-{3332836,3868908,3868650,1000000,0.0481959183673469},
-{3332837,3869549,3869299,1000000,0.0437411764705882},
-{3332838,3869897,3869704,0.0432272727272727,1000000},
-{3332839,3869704,3869541,0.0330142857142857,1000000},
-{3332840,3871032,3870627,1000000,0.108892682926829},
-{3332841,3870627,3870566,1000000,0.0137875},
-{3332842,3871032,3871058,0.019176,0.0282},
-{3332843,3871058,3871271,0.0922444444444444,0.226418181818182},
-{3332844,3865186,3865008,0.0789777777777778,1000000},
-{3332845,3865186,3865002,0.0735714285714286,1000000},
-{3332846,3865052,3865137,0.1329,1000000},
-{3332847,3878799,3878886,1000000,0.1101},
-{3332848,3878886,3879093,1000000,0.186166666666667},
-{3332849,3878181,3878186,0.00225714285714286,1000000},
-{3332850,3878186,3878233,0.0273142857142857,1000000},
-{3332851,3878177,3877946,0.0851785714285714,1000000},
-{3332852,3877946,3877905,0.018504,1000000},
-{3332853,3877767,3877803,0.00672222222222222,0.00636842105263158},
-{3332854,3877803,3878140,0.0646846153846154,0.0590105263157895},
-{3332855,3877502,3877613,1000000,1000000},
-{3332856,3877613,3877892,1000000,1000000},
-{3332857,3876011,3876324,1000000,1000000},
-{3332858,3875582,3875464,1000000,0.042951724137931},
-{3332859,3865328,3865315,1000000,0.0482232558139535},
-{3332860,3865528,3865328,0.253425,0.0942976744186047},
-{3332861,3865684,3865524,1000000,0.0979034482758621},
-{3332862,3865524,3865427,1000000,0.065736},
-{3332863,3865845,3865715,0.048816,0.0381375},
-{3332864,3865715,3865648,0.0309,0.0219290322580645},
-{3332865,3872035,3871995,0.00716470588235294,1000000},
-{3332866,3870801,3870988,0.301371428571429,0.290979310344828},
-{3332867,3870988,3870994,0.00942857142857143,0.01056},
-{3332868,3870196,3870820,0.342168,0.329007692307692},
-{3332869,3870820,3870831,0.00957692307692308,0.00996},
-{3332870,3870831,3870238,0.168617142857143,0.163933333333333},
-{3332871,3870238,3869559,0.159252631578947,0.144085714285714},
-{3332872,3868858,3869083,0.259257142857143,0.247472727272727},
-{3332873,3869083,3869108,0.027,0.027},
-{3332874,3869108,3868747,0.0882439024390244,1000000},
-{3332875,3868747,3868632,0.024555,1000000},
-{3332876,3868632,3868525,0.0309512195121951,1000000},
-{3332877,3868858,3868490,0.125155555555556,0.1024},
-{3332878,3868490,3868255,0.100382608695652,0.07696},
-{3332879,3868448,3868144,0.25495,1000000},
-{3332880,3868125,3868350,0.1122,0.1122},
-{3332881,3868162,3868215,0.144272727272727,0.0961818181818182},
-{3332882,3868215,3868350,0.112406896551724,0.135825},
-{3332883,3868139,3868162,1000000,0.0119351351351351},
-{3332884,3867814,3868102,1000000,0.174338461538462},
-{3332885,3868102,3868139,1000000,0.0280216216216216},
-{3332886,3867598,3868125,0.324046153846154,0.324046153846154},
-{3332887,3866777,3866673,0.0353076923076923,0.0353076923076923},
-{3332888,3866673,3866319,0.1224,0.126348387096774},
-{3332889,3867168,3866398,0.5124,1000000},
-{3332890,3866398,3866319,0.04592,1000000},
-{3332891,3866422,3866227,1000000,0.08146},
-{3332892,3866227,3866134,1000000,0.0495692307692308},
-{3332893,3865601,3865752,0.0493756097560976,1000000},
-{3332894,3865752,3865806,0.0186279069767442,1000000},
-{3332895,3865745,3865601,0.1182,1000000},
-{3332896,3865531,3865745,1000000,0.0856736842105263},
-{3332897,3865315,3865290,1000000,0.0486292682926829},
-{3332898,3867195,3866792,1000000,0.0766867924528302},
-{3332899,3868047,3867395,0.134155102040816,1000000},
-{3332901,3865834,3866213,0.181844444444444,0.181844444444444},
-{3332902,3866213,3866384,0.0704888888888889,0.0704888888888889},
-{3332903,3866972,3867283,0.2581875,0.2581875},
-{3332904,3867283,3867362,0.0481428571428571,0.0481428571428571},
-{3332905,3867205,3867891,0.294733333333333,0.294733333333333},
-{3332906,3867891,3867959,0.0467368421052632,0.0467368421052632},
-{3332907,3868400,3868247,0.153967741935484,0.153967741935484},
-{3332908,3868247,3868093,0.113882926829268,0.113882926829268},
-{3332909,3871704,3871263,0.175615384615385,0.185108108108108},
-{3332910,3868595,3868985,0.3312,0.357696},
-{3332911,3868985,3868993,0.0132272727272727,0.01164},
-{3332914,3902159,3902125,0.0270272727272727,1000000},
-{3332915,3902537,3902512,1000000,0.0254076923076923},
-{3332916,3903033,3902978,0.0703764705882353,0.0520173913043478},
-{3332917,3902978,3902952,0.05025,0.03216},
-{3332918,3905392,3905442,1000000,1000000},
-{3332919,3905442,3905700,1000000,1000000},
-{3332920,3905019,3905057,1000000,1000000},
-{3332921,3905057,3905276,1000000,1000000},
-{3332922,3904711,3904637,1000000,1000000},
-{3332923,3904637,3905019,1000000,1000000},
-{3332924,3903804,3904270,1000000,1000000},
-{3332925,3904270,3904369,1000000,1000000},
-{3332926,3903804,3903836,1000000,1000000},
-{3332927,3903836,3904150,1000000,1000000},
-{3332928,3903452,3903470,1000000,1000000},
-{3332929,3903470,3903688,1000000,1000000},
-{3332930,3903308,3903059,0.261469565217391,0.214778571428571},
-{3332931,3903059,3903033,0.0259636363636364,0.022848},
-{3332932,3902891,3902630,1000000,0.236169230769231},
-{3332933,3902630,3902537,1000000,0.072624},
-{3332934,3902528,3902235,0.24816,1000000},
-{3332935,3902235,3902159,0.1032,1000000},
-{3332936,3901327,3901285,1000000,1000000},
-{3332937,3901285,3901221,1000000,1000000},
-{3332938,3901236,3901209,0.0638444444444444,0.0638444444444444},
-{3332939,3901209,3901011,0.0883555555555555,0.0883555555555555},
-{3332940,3901011,3901236,0.102563636363636,0.102563636363636},
-{3332941,3900981,3900601,0.52917,0.52917},
-{3332942,3900601,3900536,0.1272,0.0442434782608696},
-{3332943,3900381,3900396,1000000,0.1818},
-{3332944,3900396,3900387,1000000,0.0717375},
-{3332945,3899901,3899936,0.0365379310344828,0.0883},
-{3332946,3899936,3900068,0.0684324324324324,0.133263157894737},
-{3332947,3899053,3899119,1000000,1000000},
-{3332948,3899119,3899115,1000000,1000000},
-{3332949,3896483,3896476,1000000,0.05118},
-{3332950,3896476,3896470,1000000,0.02928},
-{3332951,3896401,3896353,0.0706666666666667,1000000},
-{3332952,3896353,3896341,0.0243,1000000},
-{3332953,3896145,3896144,0.0290769230769231,0.04725},
-{3332954,3896144,3896454,0.34452,0.43065},
-{3332955,3899016,3899019,0.0143142857142857,0.0107357142857143},
-{3332956,3899019,3899144,0.228407142857143,0.2907},
-{3332957,3899818,3899863,0.0213555555555556,0.01922},
-{3332958,3899795,3899748,0.0189555555555556,1000000},
-{3332959,3899393,3899966,0.301118181818182,0.245355555555556},
-{3332960,3899543,3900018,0.238617391304348,0.27441},
-{3332961,3900018,3900082,0.0388125,0.0207},
-{3332962,3899696,3900081,0.314614285714286,0.231821052631579},
-{3332963,3900081,3900114,0.00950322580645161,0.0133909090909091},
-{3332964,3900004,3899972,0.0146444444444444,0.0146444444444444},
-{3332965,3899968,3899972,0.0747777777777778,0.0747777777777778},
-{3332966,3899608,3899946,0.167822222222222,0.167822222222222},
-{3332967,3899946,3899968,0.0361818181818182,0.0361818181818182},
-{3332968,3898728,3899462,0.416914285714286,0.198981818181818},
-{3332969,3898096,3898810,1000000,0.275477777777778},
-{3332970,3898090,3898111,0.00467547169811321,1000000},
-{3332971,3898111,3898182,0.0245433962264151,1000000},
-{3332972,3896903,3896866,0.0292875,0.0213},
-{3332973,3896288,3896271,1000000,1000000},
-{3332974,3896192,3896194,1000000,0.0198428571428571},
-{3332975,3896105,3896151,0.0186,1000000},
-{3332976,3896151,3896192,0.018195652173913,1000000},
-{3332977,3896192,3896116,1000000,0.03204},
-{3332978,3896116,3896072,1000000,0.0219777777777778},
-{3332979,3896068,3896064,1000000,0.014184},
-{3332980,3896064,3896096,1000000,0.0928173913043478},
-{3332981,3895986,3896025,1000000,0.018564},
-{3332982,3896025,3896096,1000000,0.0413625},
-{3332985,3902693,3902639,0.0247846153846154,1000000},
-{3332986,3902639,3902538,0.0618260869565217,1000000},
-{3332987,3902538,3902489,1000000,0.0469714285714286},
-{3332988,3902489,3902468,1000000,0.0133846153846154},
-{3332989,3902375,3902399,1000000,0.013392},
-{3332990,3902399,3902495,1000000,0.1267875},
-{3332991,3902375,3902352,0.01055625,0.0125111111111111},
-{3332992,3902352,3902259,0.0426387096774194,0.0629428571428571},
-{3332993,3902259,3902212,0.10995,1000000},
-{3332994,3902212,3902200,0.0155142857142857,1000000},
-{3332995,3901991,3901962,1000000,1000000},
-{3332996,3901962,3901902,1000000,1000000},
-{3332997,3901839,3901408,0.318884210526316,1000000},
-{3332998,3901408,3901412,0.04668,1000000},
-{3332999,3901140,3901131,1000000,1000000},
-{3333000,3901131,3901126,1000000,1000000},
-{3333001,3900530,3900529,0.00889090909090909,0.00889090909090909},
-{3333002,3900529,3900415,0.322377777777778,0.322377777777778},
-{3333003,3900011,3899895,0.0739363636363636,1000000},
-{3333004,3899895,3899872,0.016875,1000000},
-{3333005,3899880,3899873,0.0317513513513513,1000000},
-{3333006,3899873,3899872,0.00819,1000000},
-{3333007,3899742,3899763,1000000,0.0311217391304348},
-{3333008,3899772,3899767,1000000,0.0289609756097561},
-{3333009,3899767,3899763,1000000,0.0169024390243902},
-{3333010,3899638,3899732,1000000,0.0697826086956522},
-{3333011,3899732,3899742,1000000,0.0168},
-{3333012,3898140,3898510,1000000,0.0880363636363636},
-{3333013,3896148,3896185,1000000,0.01932},
-{3333014,3896185,3896207,1000000,0.00980869565217391},
-{3333015,3896194,3896203,1000000,0.0100888888888889},
-{3333016,3896203,3896289,1000000,0.0571285714285714},
-{3333017,3896789,3896304,1000000,1000000},
-{3333018,3896304,3896288,1000000,1000000},
-{3333019,3897128,3896936,0.166341176470588,0.166341176470588},
-{3333020,3896936,3896903,0.0240857142857143,0.0160571428571429},
-{3333021,3897601,3897431,1000000,1000000},
-{3333022,3898119,3898143,0.00998709677419355,0.0140727272727273},
-{3333023,3898143,3898305,0.0522,0.110925},
-{3333024,3898185,3898200,1000000,0.0110769230769231},
-{3333025,3898200,3898305,1000000,0.0678620689655172},
-{3333026,3898740,3898274,1000000,1000000},
-{3333027,3898182,3898595,0.156884210526316,1000000},
-{3333028,3898810,3899038,1000000,0.07904},
-{3333029,3899038,3899187,1000000,0.0490677966101695},
-{3333030,3899462,3899503,0.0273714285714286,0.0159666666666667},
-{3333031,3899503,3899557,0.027,0.0182647058823529},
-{3333032,3899724,3899829,1000000,0.0573381818181818},
-{3333033,3899829,3899865,1000000,0.0229137931034483},
-{3333034,3900046,3900132,0.0192146341463415,0.02461875},
-{3333035,3900173,3900195,0.0116307692307692,0.0116307692307692},
-{3333036,3900195,3900258,0.0271846153846154,0.0271846153846154},
-{3333037,3900135,3900140,1000000,0.0191127272727273},
-{3333038,3900140,3900158,1000000,0.189672},
-{3333039,3899966,3900022,0.07008,0.0259555555555556},
-{3333040,3900022,3900158,0.120163636363636,0.0508384615384615},
-{3333041,3899863,3899910,0.0291,0.0207857142857143},
-{3333042,3899910,3900003,0.0596470588235294,0.0349655172413793},
-{3333043,3899888,3899841,0.0278869565217391,1000000},
-{3333044,3899841,3899795,0.020256,1000000},
-{3333045,3899813,3899787,1000000,0.0198},
-{3333046,3899787,3899730,1000000,0.0314},
-{3333047,3899813,3899805,1000000,0.00953181818181818},
-{3333048,3899805,3899791,1000000,0.0266142857142857},
-{3333049,3899933,3899908,0.05754,1000000},
-{3333050,3899908,3899891,0.0356,1000000},
-{3333051,3899933,3899957,0.0558,1000000},
-{3333052,3899957,3900030,0.0630923076923077,1000000},
-{3333053,3902129,3902111,0.0185714285714286,0.0114705882352941},
-{3333054,3902111,3902036,0.146676923076923,0.0681},
-{3333055,3902129,3902139,0.0183,1000000},
-{3333056,3902139,3902123,0.117741176470588,1000000},
-{3333057,3902719,3902756,0.026775,1000000},
-{3333058,3902756,3902883,0.0695684210526316,1000000},
-{3333059,3902934,3902847,1000000,0.0931090909090909},
-{3333060,3902847,3902838,1000000,0.015425},
-{3333061,3902789,3902831,1000000,0.12945},
-{3333062,3902831,3902838,1000000,0.0206117647058824},
-{3333067,3866051,3865815,0.152311111111111,0.13708},
-{3333068,3865815,3865134,0.245574193548387,0.217508571428571},
-{3333069,3866051,3865958,0.0359333333333333,0.0359333333333333},
-{3333070,3865958,3865222,0.283688888888889,0.283688888888889},
-{3333071,3865911,3866159,0.13685,0.13685},
-{3333072,3866159,3866254,0.0700875,0.0801},
-{3333073,3865124,3866372,0.613311111111111,0.613311111111111},
-{3333074,3866372,3866493,0.0541555555555556,0.0541555555555556},
-{3333075,3880528,3880654,0.0649090909090909,1000000},
-{3333076,3880654,3880679,0.009225,1000000},
-{3333077,3880470,3880565,0.0486333333333333,0.0500228571428571},
-{3333078,3879855,3879883,1000000,0.0146571428571429},
-{3333079,3879883,3880453,1000000,0.345257142857143},
-{3333080,3879754,3880470,0.306685714285714,0.341536363636364},
-{3333081,3880104,3880114,0.0128823529411765,1000000},
-{3333082,3880114,3880707,0.495975,1000000},
-{3333083,3881073,3881106,0.0282,0.0100266666666667},
-{3333084,3879217,3879257,1000000,0.0183},
-{3333085,3879257,3879408,1000000,0.0615272727272727},
-{3333086,3880368,3880383,0.00816,1000000},
-{3333087,3880383,3880528,0.06384,1000000},
-{3333088,3879871,3880038,1000000,0.0780947368421053},
-{3333089,3879871,3879842,0.0225,1000000},
-{3333090,3879815,3879790,1000000,0.0366},
-{3333091,3879790,3879726,1000000,0.111507692307692},
-{3333092,3879634,3879414,0.153533333333333,0.133722580645161},
-{3333093,3879414,3879392,0.0178434782608696,0.014151724137931},
-{3333094,3879276,3879302,0.0220421052631579,1000000},
-{3333095,3879302,3879524,0.21304,1000000},
-{3333096,3881472,3880988,1000000,0.329511111111111},
-{3333097,3880988,3880968,1000000,0.0365636363636364},
-{3333098,3881176,3881515,0.108633962264151,0.11995},
-{3333099,3881515,3881564,0.013,0.0135},
-{3333100,3863689,3863489,1000000,1000000},
-{3333101,3852475,3852415,0.0204909090909091,0.0375666666666667},
-{3333102,3859753,3859590,0.142228571428571,0.09956},
-{3333103,3859590,3859555,0.0228545454545455,0.0157125},
-{3333104,3879365,3879558,0.102815384615385,1000000},
-{3333105,3882654,3882668,1000000,0.11089756097561},
-{3333106,3863087,3863043,0.0872333333333333,0.0805230769230769},
-{3333107,3863043,3863045,0.0132642857142857,0.0109235294117647},
-{3333108,3856649,3856668,0.0103111111111111,0.0103111111111111},
-{3333109,3856668,3856793,0.0490222222222222,0.0490222222222222},
-{3333110,3851044,3851528,0.390860869565217,0.408627272727273},
-{3333111,3851528,3851549,0.016575,0.0189428571428571},
-{3333112,3852027,3851860,0.0618666666666667,0.0618666666666667},
-{3333113,3851860,3851840,0.00678181818181818,0.00678181818181818},
-{3333114,3848765,3848958,0.467155555555556,0.467155555555556},
-{3333115,3848958,3848972,0.03405,0.03405},
-{3333118,3851322,3851304,0.0128608695652174,1000000},
-{3333119,3851304,3850561,0.565085714285714,1000000},
-{3333120,3891772,3892359,1000000,0.171251162790698},
-{3333121,3892359,3892432,1000000,0.0272833333333333},
-{3333122,3892318,3892369,0.01248,1000000},
-{3333123,3892369,3892441,0.018528,1000000},
-{3333124,3889273,3889224,0.0167625,0.0157764705882353},
-{3333125,3889224,3888586,0.259542857142857,0.213741176470588},
-{3333126,3885663,3886420,0.302072727272727,0.262326315789474},
-{3333127,3886420,3886501,0.0576,0.0512},
-{3333128,3886372,3887051,0.551589473684211,0.317581818181818},
-{3333129,3887051,3887076,0.0186521739130435,0.01716},
-{3333130,3886896,3887604,1000000,1000000},
-{3333131,3887604,3887631,1000000,1000000},
-{3333132,3887221,3887892,1000000,0.42708},
-{3333133,3887892,3887895,1000000,0.0346285714285714},
-{3333134,3887278,3888037,0.559133333333333,0.264852631578947},
-{3333135,3888037,3888068,0.0195230769230769,0.0163741935483871},
-{3333136,3887339,3888177,0.6514875,1000000},
-{3333137,3888177,3888231,0.0365647058823529,1000000},
-{3333138,3891822,3891886,1000000,0.04045},
-{3333139,3891886,3891915,1000000,0.014775},
-{3333140,3891822,3892005,1000000,0.0749806451612903},
-{3333141,3892005,3892054,1000000,0.0206545454545455},
-{3333142,3893406,3893488,1000000,1000000},
-{3333143,3889225,3889158,0.0480923076923077,0.0329052631578947},
-{3333144,3889158,3889068,0.11064,0.0790285714285714},
-{3333145,3889068,3888972,0.10425,0.0893571428571429},
-{3333146,3888599,3888651,0.0264222222222222,0.0264222222222222},
-{3333147,3888651,3889225,0.28176,0.270923076923077},
-{3333148,3888521,3888464,0.110544,1000000},
-{3333149,3888464,3888502,0.0607090909090909,1000000},
-{3333150,3888502,3888412,1000000,0.0393333333333333},
-{3333151,3888412,3888294,1000000,0.064728},
-{3333152,3887962,3887911,0.0179777777777778,1000000},
-{3333153,3887962,3887926,0.0303,1000000},
-{3333154,3887926,3887747,0.116625,1000000},
-{3333155,3887911,3887874,0.0112615384615385,1000000},
-{3333156,3887874,3887664,0.0729310344827586,1000000},
-{3333157,3887076,3887227,0.0707538461538462,0.07665},
-{3333158,3892042,3893114,0.76059,1000000},
-{3333159,3893114,3893128,0.0187285714285714,1000000},
-{3333160,3891885,3892968,1000000,0.77007},
-{3333161,3892968,3892991,1000000,0.0105230769230769},
-{3333162,3892439,3892731,0.28508,0.158377777777778},
-{3333163,3892731,3892782,0.0207,0.0175153846153846},
-{3333164,3892150,3892416,1000000,0.168},
-{3333165,3892416,3892442,1000000,0.0128454545454545},
-{3333166,3891873,3892102,0.279553846153846,1000000},
-{3333167,3892102,3892124,0.0227333333333333,1000000},
-{3333168,3891531,3891623,0.0985058823529412,1000000},
-{3333169,3880800,3880827,0.01572,1000000},
-{3333170,3880827,3880944,0.0428444444444444,1000000},
-{3333181,3892480,3892527,1000000,1000000},
-{3333182,3894873,3894888,0.011048275862069,0.0145636363636364},
-{3333183,3894888,3895204,0.287941935483871,0.405736363636364},
-{3333184,3893723,3893825,1000000,0.075},
-{3333208,3907404,3908392,0.367088888888889,0.367088888888889},
-{3333209,3908392,3909494,0.412177777777778,0.412177777777778},
-{3333210,3909494,3910260,0.37,0.37},
-{3333211,3906690,3905968,0.267581818181818,0.267581818181818},
-{3342162,3856027,3856232,1000000,0.188571428571429},
-{3342165,3856367,3856593,0.144442105263158,0.161435294117647},
-{3342167,3856681,3856857,0.140273684210526,0.2221},
-{3342170,3857387,3857476,0.0718090909090909,0.0987375},
-{3342189,3864386,3864320,0.0204967741935484,1000000},
-{3342190,3864320,3864204,0.0491806451612903,1000000},
-{3342207,3904021,3906539,1000000,0.546011538461538},
-{3342237,3885713,3886045,1000000,1000000},
-{3342238,3886045,3886103,1000000,1000000},
-{3342239,3878561,3878412,1000000,0.0950516129032258},
-{3342240,3878412,3878214,1000000,0.2608875},
-{3342255,3849152,3849920,0.473452173913044,0.473452173913044},
-{3342675,3882138,3882136,0.01665,0.01665},
-{3342850,3854466,3854430,1000000,0.0843},
-{3342851,3854430,3853947,1000000,0.468834782608696},
-{3342861,3866996,3866792,0.0388588235294118,1000000},
-{3342867,3851899,3851892,0.0161666666666667,0.0223846153846154},
-{3342868,3851892,3851274,0.54104347826087,0.6222},
-{3342873,3898857,3898317,1.00745454545455,1.00745454545455},
-{3342877,3895027,3894700,0.4326,0.4326},
-{3342878,3894700,3894676,0.03912,0.03912},
-{3342879,3895701,3895050,1.51941,1.51941},
-{3342880,3895050,3895027,0.0273,0.0273},
-{3342887,3902284,3902361,0.0482,0.0632625},
-{3342905,3907464,3907992,0.43362,0.43362},
-{3342906,3907992,3909029,0.89388,0.89388},
-{3343320,3898595,3898612,0.00493220338983051,1000000},
-{3343321,3898612,3898630,0.00693559322033898,1000000},
-{3343322,3897431,3897371,1000000,1000000},
-{3343323,3898089,3897284,0.180783050847458,1000000},
-{3343324,3897284,3897216,0.0139034482758621,1000000},
-{3343360,3870385,3870007,0.0821632653061224,1000000},
-{3343361,3870007,3869897,0.0214173913043478,1000000},
-{3343362,3871995,3871062,0.2334,1000000},
-{3343363,3874461,3872035,0.50886,1000000},
-{3343366,3872635,3872649,0.131665384615385,0.129181132075472},
-{3343369,3872649,3872784,0.368917647058823,0.354996226415094},
-{3343370,3872784,3872834,0.0612,0.0624},
-{3343521,3899457,3899629,0.0757285714285714,1000000},
-{3343522,3899677,3899791,0.0465,1000000},
-{3343632,3880199,3880284,0.03636,1000000},
-{3343633,3880284,3880368,0.0375891891891892,1000000},
-{3343634,3880368,3880388,1000000,0.027},
-{3343635,3880388,3880761,1000000,0.428966666666667},
-{3343646,3880565,3880584,0.0181741935483871,1000000},
-{3343647,3880584,3880838,0.147365217391304,1000000},
-{3343885,3906172,3906227,0.0413307692307692,0.0413307692307692},
-{3343886,3906227,3907068,0.476376923076923,0.516075},
-{3343887,3906171,3906321,0.0598064516129032,0.0579375},
-{3343888,3906321,3907739,0.426811764705882,0.372092307692308},
-{3343889,3906227,3906321,0.19455,0.19455},
-{3344074,3908768,3908889,0.033,0.0360697674418605},
-{3344076,3916195,3916249,0.0146368421052632,1000000},
-{3344077,3904069,3904279,0.12855,0.12855},
-{3344078,3895180,3894865,0.0925066666666667,0.0925066666666667},
-{3344079,3894865,3894848,0.00449387755102041,0.00449387755102041},
-{3344080,3894810,3894819,0.00867,1000000},
-{3344081,3894819,3894906,0.0552,1000000},
-{3344084,3875464,3875437,1000000,0.00856875},
-{3344085,3875437,3875412,1000000,0.0101454545454545},
-{3344086,3874821,3874915,0.201655555555556,0.209411538461538},
-{3344087,3874915,3875077,0.211846153846154,0.216},
-{3344165,3887715,3887709,0.05154,0.05154},
-{3344166,3887709,3887351,2.30055,2.30055},
-{3344335,3874272,3874185,0.129876923076923,0.129876923076923},
-{3344336,3874185,3873915,0.457548387096774,0.44325},
-{3344729,3908946,3909174,1000000,0.0587217391304348},
-{3344789,3884455,3884427,0.00934090909090909,1000000},
-{3344790,3884379,3884427,0.0120818181818182,0.0120818181818182},
-{3345169,3897762,3898031,1000000,0.0455130434782609},
-{3345170,3898031,3898089,1000000,0.00796521739130435},
-{3345171,3898089,3898824,1000000,0.142885714285714},
-{3345172,3898824,3899102,1000000,0.0561344262295082},
-{3345219,3876231,3876555,0.0983833333333333,1000000},
-{3345220,3876555,3876793,0.0560454545454546,1000000},
-{3345221,3876555,3876184,1000000,1000000},
-{3345222,3875677,3876037,0.1272,0.214231578947368},
-{3345223,3876037,3877812,0.656057142857143,0.496475675675676},
-{3345224,3876037,3876109,1000000,1000000},
-{3345225,3876109,3876156,1000000,1000000},
-{3345226,3876109,3876409,1000000,1000000},
-{3345227,3876245,3876564,1000000,0.23548},
-{3345228,3876564,3876805,1000000,0.0709411764705882},
-{3345230,3894748,3894731,0.0217565217391304,1000000},
-{3345231,3894731,3894706,0.0285461538461538,1000000},
-{3345254,3897842,3897895,1000000,0.0970363636363636},
-{3345255,3897895,3897924,1000000,0.0132230769230769},
-{3345256,3897852,3897803,0.0179625,1000000},
-{3345257,3897803,3897615,0.09026,1000000},
-{3345258,3897588,3897597,0.0073125,1000000},
-{3345259,3897597,3897609,0.00735,1000000},
-{3345260,3888381,3888429,1000000,0.0346666666666667},
-{3345261,3888429,3888453,1000000,0.01581},
-{3345262,3888724,3888858,0.144818181818182,0.144818181818182},
-{3345263,3888858,3888893,0.0276,0.0345},
-{3345264,3889615,3889588,0.0235894736842105,1000000},
-{3345265,3889797,3890677,0.566809090909091,1000000},
-{3345266,3890677,3890702,0.0240375,1000000},
-{3345267,3889459,3890328,0.5096,0.370618181818182},
-{3345268,3890328,3890351,0.0154571428571429,0.0147545454545455},
-{3345269,3889712,3889688,1000000,0.0245076923076923},
-{3345279,3899730,3899717,1000000,0.009048},
-{3345280,3899717,3899677,1000000,0.0234692307692308},
-{3345292,3900124,3900125,1000000,0.0166555555555556},
-{3345293,3900125,3900135,1000000,0.0601090909090909},
-{3345299,3899654,3900015,0.155511111111111,0.155511111111111},
-{3345300,3900015,3900045,0.0198,0.0198},
-{3345301,3899912,3900017,0.0850714285714286,0.0384193548387097},
-{3345302,3900017,3900046,0.0102,0.0091448275862069},
-{3345303,3899847,3900050,0.11715,0.111571428571429},
-{3345304,3900050,3900073,0.00747272727272727,0.010275},
-{3345305,3900049,3900027,0.00701818181818182,0.00701818181818182},
-{3345306,3900027,3900004,0.00888888888888889,0.00888888888888889},
-{3345312,3873411,3873416,0.00465217391304348,0.00458571428571428},
-{3345313,3873416,3873458,0.0304086956521739,0.0299742857142857},
-{3345314,3873594,3873380,1000000,0.17430447761194},
-{3345315,3873380,3873390,1000000,0.0183085714285714},
-{3345316,3894585,3894629,1000000,0.00898928571428572},
-{3345317,3894629,3894873,1000000,0.0640842105263158},
-{3345318,3894469,3894482,0.0091125,1000000},
-{3345319,3894482,3894808,0.309103448275862,1000000},
-{3345320,3894091,3894098,1000000,0.0117652173913043},
-{3345321,3894098,3894437,1000000,0.5715},
-{3345322,3892114,3892312,0.15327,1000000},
-{3345323,3892312,3892321,0.0141157894736842,1000000},
-{3345324,3892736,3892777,0.0160838709677419,1000000},
-{3345325,3892777,3892725,0.0295548387096774,1000000},
-{3345326,3892778,3892824,1000000,0.0128666666666667},
-{3345327,3892824,3892849,1000000,0.00848571428571429},
-{3345328,3892769,3892919,0.1042875,1000000},
-{3345329,3892919,3892950,0.0179368421052632,1000000},
-{3345330,3892769,3892967,0.0646125,1000000},
-{3345331,3892967,3892996,0.01148,1000000},
-{3345332,3893501,3893672,0.3097125,0.16518},
-{3345333,3893672,3893688,0.0163565217391304,0.0129724137931034},
-{3345334,3894689,3894707,0.00851785714285714,1000000},
-{3345335,3894707,3894938,0.0675321428571429,1000000},
-{3345336,3893000,3892947,0.0226965517241379,1000000},
-{3345337,3892947,3892862,0.02728,1000000},
-{3345338,3892945,3892964,1000000,0.0104823529411765},
-{3345339,3892964,3893000,1000000,0.0244421052631579},
-{3345340,3893049,3893073,0.0143625,1000000},
-{3345341,3893073,3893141,0.0302914285714286,1000000},
-{3345342,3893141,3893153,1000000,0.0456428571428571},
-{3345343,3893153,3893233,1000000,0.0472941176470588},
-{3345344,3893233,3893268,1000000,0.0144307692307692},
-{3345347,3882560,3882635,1000000,0.0129223880597015},
-{3345348,3882635,3882659,1000000,0.00398507462686567},
-{3345349,3882640,3882675,0.00465428571428571,1000000},
-{3345350,3861953,3861928,0.0122222222222222,0.0122222222222222},
-{3345351,3861928,3861900,0.0126,0.0126},
-{3345352,3861953,3861977,1000000,0.00561639344262295},
-{3345353,3861977,3862077,1000000,0.02565},
-{3345360,3884427,3884584,0.0435348837209302,1000000},
-{3345361,3865871,3866069,1000000,0.0567666666666667},
-{3345362,3866069,3866123,1000000,0.0163333333333333},
-{3345363,3864696,3864653,0.0149090909090909,1000000},
-{3345364,3865471,3865766,1000000,0.161112},
-{3345365,3865471,3865488,1000000,0.0690652173913043},
-{3345366,3865345,3865355,0.126627272727273,1000000},
-{3345367,3865345,3865282,0.13295,1000000},
-{3345368,3864879,3864480,0.117681081081081,1000000},
-{3345369,3864710,3864480,1000000,0.1875},
-{3345370,3864662,3864578,0.0447142857142857,0.0426818181818182},
-{3345371,3864578,3863559,0.368382857142857,0.368382857142857},
-{3345372,3871007,3870612,0.105,1000000},
-{3345373,3870612,3870544,0.0160875,1000000},
-{3345374,3866433,3866385,0.03018,0.0503},
-{3345375,3866393,3866195,0.0898333333333333,1000000},
-{3345376,3866195,3865131,0.6600375,1000000},
-{3345377,3871564,3871513,1000000,1000000},
-{3345378,3871513,3871496,1000000,1000000},
-{3345379,3872040,3872021,0.276709090909091,1000000},
-{3345380,3872021,3872019,0.01124,1000000},
-{3345381,3872618,3872621,0.02672,1000000},
-{3345386,3895536,3895750,1000000,0.111982978723404},
-{3345387,3895750,3896047,1000000,0.105629508196721},
-{3345388,3895101,3895404,0.11917,1000000},
-{3345389,3895404,3895502,0.0372096774193548,1000000},
-{3345390,3875623,3875642,0.0177111111111111,0.0144909090909091},
-{3345391,3875642,3875650,0.00786428571428571,0.00667272727272727},
-{3345392,3875997,3875989,1000000,0.0122307692307692},
-{3345393,3877110,3877226,1000000,0.241846153846154},
-{3345394,3877226,3877242,1000000,0.0266608695652174},
-{3345395,3877719,3877831,0.287775,1000000},
-{3345396,3877831,3877860,0.023895652173913,1000000},
-{3345397,3878316,3878382,0.24715,1000000},
-{3345398,3878382,3878389,0.0230608695652174,1000000},
-{3345399,3878672,3878782,0.391042105263158,1000000},
-{3345400,3878782,3878789,0.0192285714285714,1000000},
-{3345401,3879264,3879235,1000000,0.0415714285714286},
-{3345402,3879235,3879199,1000000,0.0392571428571429},
-{3345403,3879264,3879286,1000000,0.0177375},
-{3345404,3879286,3879303,1000000,0.01119375},
-{3345407,3880031,3880130,1000000,1000000},
-{3345408,3880130,3880146,1000000,1000000},
-{3345409,3880366,3880477,0.22565,0.13539},
-{3345410,3880477,3880497,0.0313714285714286,0.02196},
-{3345411,3880815,3881018,0.514,1000000},
-{3345412,3881018,3881042,0.02736,1000000},
-{3345413,3881468,3881501,1000000,0.0159545454545455},
-{3345414,3881501,3881563,1000000,0.0271714285714286},
-{3345415,3880923,3881157,1000000,0.182475},
-{3345416,3881157,3881175,1000000,0.018},
-{3345417,3880617,3880823,0.08918,0.0723081081081081},
-{3345418,3880823,3880854,0.0092,0.00843333333333333},
-{3345419,3879756,3879945,1000000,1000000},
-{3345420,3879945,3879959,1000000,1000000},
-{3345421,3878780,3879159,1000000,0.387933333333333},
-{3345422,3879159,3879174,1000000,0.02408},
-{3345423,3878724,3878971,1000000,1000000},
-{3345424,3878971,3879011,1000000,1000000},
-{3345425,3878962,3878993,0.0157578947368421,0.0103241379310345},
-{3345426,3881106,3881120,0.01576,0.0139058823529412},
-{3345427,3881120,3881281,0.2067375,0.300709090909091},
-{3345428,3881469,3881518,1000000,1000000},
-{3345429,3881586,3881671,0.045425,1000000},
-{3345430,3881671,3881852,0.1327125,1000000},
-{3345432,3881476,3881507,1000000,0.0160421052631579},
-{3345433,3881507,3882332,1000000,0.65596},
-{3345434,3881709,3881759,0.03284,1000000},
-{3345435,3881759,3882562,0.523736842105263,1000000},
-{3345436,3881754,3881743,0.0254625,0.01358},
-{3345437,3881743,3881722,0.0172588235294118,0.0101172413793103},
-{3345438,3881212,3880997,0.0977769230769231,1000000},
-{3345439,3880997,3880913,0.05541,1000000},
-{3345440,3880545,3880572,0.0211090909090909,1000000},
-{3345441,3880572,3880730,0.0840260869565218,1000000},
-{3345442,3880499,3880532,1000000,0.020895652173913},
-{3345443,3880532,3880730,1000000,0.194871428571429},
-{3345444,3880499,3880485,0.0394941176470588,1000000},
-{3345445,3880485,3880863,0.5244,1000000},
-{3345446,3879824,3879787,1000000,0.11178},
-{3345447,3879787,3879766,1000000,0.0224181818181818},
-{3345459,3895054,3895178,1000000,0.0998842105263158},
-{3345468,3872446,3872616,1000000,0.07132},
-{3345469,3872616,3872630,1000000,0.00714545454545455},
-{3345470,3872628,3872598,0.0133058823529412,0.01131},
-{3345471,3872598,3872446,0.0728210526315789,0.1153},
-{3345472,3872466,3872617,1000000,0.23079512195122},
-{3345473,3872617,3872628,1000000,0.0126714285714286},
-{3345474,3872537,3872615,0.125414634146341,1000000},
-{3345475,3872615,3872664,0.0555166666666667,1000000},
-{3345476,3864520,3864497,0.012552,1000000},
-{3345477,3864653,3864610,0.013725,1000000},
-{3345478,3864610,3864550,0.02252,1000000},
-{3345479,3863203,3863769,0.165293617021277,1000000},
-{3345480,3863769,3864222,0.116173333333333,1000000},
-{3345481,3864236,3863788,0.0919821428571428,1000000},
-{3345527,3877331,3877821,0.435255319148936,0.40914},
-{3345528,3877821,3877869,0.068985,0.0627136363636364},
-{3345529,3878041,3877821,0.0842222222222222,0.0733548387096774},
-{3345530,3878460,3878617,0.103432258064516,0.114514285714286},
-{3345531,3878617,3878760,0.117484615384615,0.109092857142857},
-{3345532,3878617,3879079,0.231985714285714,0.223986206896552},
-{3345533,3879504,3879439,1000000,0.507078260869565},
-{3345534,3879439,3879450,1000000,0.018024},
-{3345535,3878693,3878566,0.0969555555555556,0.0969555555555556},
-{3345536,3879413,3879268,0.0909724137931034,0.065955},
-{3345537,3879268,3878885,0.253285714285714,0.2364},
-{3345538,3878566,3879268,0.342111111111111,0.342111111111111},
-{3345539,3889989,3890263,0.217330434782609,1000000},
-{3345540,3890263,3890551,0.233018181818182,1000000},
-{3345541,3890226,3890288,1000000,0.018075},
-{3345542,3890288,3890694,1000000,0.1272},
-{3345543,3890288,3890514,1000000,1000000},
-{3345544,3890514,3890770,1000000,1000000},
-{3345545,3890263,3890514,1000000,1000000},
-{3345548,3880817,3880717,0.0763555555555556,0.0763555555555556},
-{3345549,3881418,3881185,0.279654545454545,0.25635},
-{3345550,3881185,3880817,0.195511111111111,0.195511111111111},
-{3345551,3880717,3880659,0.0421777777777778,0.0421777777777778},
-{3345552,3880659,3880631,0.0149307692307692,0.0149307692307692},
-{3345553,3895864,3895945,0.0820875,0.0820875},
-{3345554,3880631,3880242,0.240111111111111,0.240111111111111},
-{3345555,3880659,3881052,0.267771428571429,0.224928},
-{3345556,3881052,3881185,0.16035,0.150917647058824},
-{3345557,3881052,3880434,0.451666666666667,0.451666666666667},
-{3345558,3895864,3895945,0.95364,0.95364},
-{3345559,3895945,3896115,0.2934,0.2934},
-{3345560,3896115,3896113,0.197,0.197},
-{3345561,3896115,3896329,0.19132,0.19132},
-{3345562,3895484,3895620,0.323261538461538,0.323261538461538},
-{3345563,3895620,3895707,0.0672521739130435,0.0672521739130435},
-{3345564,3895707,3895864,0.134209090909091,0.134209090909091},
-{3345565,3895620,3895707,1.01478,1.01478},
-{3345566,3881869,3881778,0.0638,0.0638},
-{3345567,3881778,3881652,0.0450888888888889,0.0450888888888889},
-{3345568,3895930,3895832,0.0887142857142857,0.077625},
-{3345569,3895832,3895661,0.1179,0.101057142857143},
-{3345570,3895832,3895830,1000000,1000000},
-{3345571,3892986,3893084,0.0256352941176471,0.0251423076923077},
-{3345572,3893084,3893210,0.036288,0.0355764705882353},
-{3345573,3893096,3893079,0.0941777777777778,0.0941777777777778},
-{3345574,3893096,3893219,0.100033333333333,0.1125375},
-{3345575,3892585,3893096,1.11348888888889,1.15631538461538},
-{3345576,3880180,3880327,0.0928666666666667,0.0928666666666667},
-{3345577,3880327,3880793,0.259955555555556,0.259955555555556},
-{3345578,3881483,3880804,0.297138461538462,0.3219},
-{3345579,3880804,3880576,0.14025,0.1275},
-{3345580,3880327,3880804,0.400266666666667,0.400266666666667},
-{3345581,3882547,3882848,0.191555555555556,0.191555555555556},
-{3345582,3882235,3882424,0.0975111111111111,0.0975111111111111},
-{3345583,3882424,3882547,0.0617555555555556,0.0617555555555556},
-{3345592,3878989,3879083,1000000,1000000},
-{3345593,3879083,3879139,0.0290444444444444,0.0290444444444444},
-{3345594,3879747,3880129,0.207244444444444,0.207244444444444},
-{3345595,3880129,3880310,1000000,1000000},
-{3345659,3897567,3898842,1.14606,1.14606},
-{3345672,3896711,3896566,0.18483,0.18483},
-{3345673,3896566,3896420,0.09651,0.09651},
-{3345674,3897567,3896420,1.28124,1.28124},
-{3345675,3896420,3895568,1.09407,1.09407},
-{3345676,3895568,3895871,0.34284,0.34284},
-{3345678,3896312,3896340,0.0176444444444444,0.0176444444444444},
-{3345679,3896340,3896422,1000000,1000000},
-{3345680,3896422,3896604,1000000,1000000},
-{3345683,3881794,3881190,0.4826625,0.594046153846154},
-{3345684,3881190,3881093,0.09876,0.113953846153846},
-{3345685,3882108,3881446,0.6122,0.6122},
-{3345686,3881446,3881274,0.132133333333333,0.132133333333333},
-{3345687,3881190,3881446,0.198955555555556,0.198955555555556},
-{3345688,3882235,3881886,0.482890909090909,0.482890909090909},
-{3345689,3881886,3881794,0.143727272727273,0.121615384615385},
-{3345690,3882108,3881886,0.192155555555556,0.192155555555556},
-{3345691,3882308,3882202,0.0802,0.0802},
-{3345692,3882202,3882108,0.0875777777777778,0.0875777777777778},
-{3345693,3882308,3882622,0.161355555555556,0.161355555555556},
-{3345694,3882622,3882812,0.0839333333333333,0.0839333333333333},
-{3345695,3882409,3882108,0.165244444444444,0.165244444444444},
-{3345696,3882959,3882805,0.133311111111111,0.133311111111111},
-{3345697,3883124,3883112,0.10245,0.10245},
-{3345698,3883112,3883057,1000000,1000000},
-{3345699,3883934,3883945,1000000,0.0308553191489362},
-{3345700,3883945,3883991,1000000,0.219891428571429},
-{3345701,3883480,3883456,0.190133333333333,0.190133333333333},
-{3345702,3883422,3883377,0.374511111111111,0.374511111111111},
-{3345703,3883887,3883910,1000000,0.0987521739130435},
-{3345704,3883910,3883913,1000000,0.0135829787234043},
-{3345705,3883422,3883910,1000000,1000000},
-{3345706,3883456,3883406,0.0952222222222222,0.0952222222222222},
-{3345707,3883406,3883945,1000000,1000000},
-{3345712,3883975,3883971,1000000,0.0117918367346939},
-{3345713,3883971,3883917,1000000,0.226576744186047},
-{3345714,3883406,3883337,1000000,1000000},
-{3345715,3883337,3883422,1000000,1000000},
-{3345716,3883337,3883097,1000000,1000000},
-{3345719,3883097,3883082,1000000,1000000},
-{3345720,3882990,3883039,0.021456,0.0206307692307692},
-{3345721,3883039,3883377,0.117786206896552,0.110187096774194},
-{3345722,3883082,3883039,1000000,1000000},
-{3345724,3883103,3882959,0.1746,0.1746},
-{3345725,3882817,3882610,0.0778888888888889,0.0778888888888889},
-{3345726,3882610,3881463,1000000,1000000},
-{3345747,3881075,3881224,0.539294117647059,1000000},
-{3345748,3881224,3881182,0.2194125,0.2194125},
-{3345762,3899850,3899859,0.0250333333333333,1000000},
-{3345763,3899759,3899832,0.0189428571428571,1000000},
-{3345764,3899832,3900000,0.0478133333333333,1000000},
-{3345765,3899850,3899832,1000000,0.0244333333333333},
-{3345766,3894782,3894479,0.201827586206897,0.254478260869565},
-{3345767,3894479,3894462,0.0347368421052632,0.0425806451612903},
-{3345768,3894479,3894462,0.4416,0.4416},
-{3345772,3894462,3894472,0.0629090909090909,0.0715862068965517},
-{3345773,3894472,3894488,0.0430263157894737,0.05109375},
-{3345774,3894472,3894488,0.58176,0.58176},
-{3345775,3894488,3894510,0.0566368421052632,0.0614914285714286},
-{3345776,3894510,3894528,0.0371230769230769,0.0438727272727273},
-{3345777,3894510,3894528,0.5841,0.5841},
-{3345778,3894528,3894555,0.0587414634146342,0.0688114285714286},
-{3345779,3894555,3894569,0.030195,0.0326432432432432},
-{3345780,3894569,3894597,0.0802833333333333,0.0825771428571429},
-{3345781,3894555,3894569,0.41034,0.41034},
-{3345782,3894597,3894845,0.121644444444444,0.121644444444444},
-{3345783,3894845,3894993,0.127933333333333,0.127933333333333},
-{3345784,3894887,3894993,0.04494,0.0408545454545455},
-{3345785,3894845,3894887,0.0879555555555556,0.0879555555555556},
-{3345786,3894633,3894833,0.101711111111111,0.0980785714285714},
-{3345787,3894833,3894887,0.0249677419354839,0.0266896551724138},
-{3345788,3894633,3894650,0.0758888888888889,0.0788076923076923},
-{3345789,3894833,3894650,0.184844444444444,0.184844444444444},
-{3345790,3894650,3894680,0.0593090909090909,0.08155},
-{3345791,3894680,3894702,0.0589071428571428,0.0568758620689655},
-{3345792,3894680,3894702,0.62082,0.62082},
-{3345793,3894702,3894757,0.0935111111111111,0.0935111111111111},
-{3345794,3894757,3894781,0.0501857142857143,0.0501857142857143},
-{3345795,3894781,3894820,0.057275,0.057275},
-{3345796,3894757,3894781,1000000,0.56952},
-{3345797,3893542,3894357,1000000,0.26685},
-{3345798,3894357,3894477,0.0721,0.0721},
-{3345799,3894357,3894224,0.0707777777777778,0.0707777777777778},
-{3345800,3893721,3893677,0.02757,0.0306333333333333},
-{3345801,3893718,3893677,0.0351230769230769,0.0480631578947368},
-{3345802,3893677,3893651,0.0232666666666667,0.0273130434782609},
-{3345803,3893651,3893599,0.588046153846154,0.546042857142857},
-{3345804,3893574,3893648,0.113983333333333,0.105215384615385},
-{3345805,3894489,3894376,0.359576470588235,0.38205},
-{3345806,3894376,3894489,0.800742857142857,0.800742857142857},
-{3345807,3894376,3894400,0.432525,0.432525},
-{3345808,3894240,3894285,0.108352941176471,0.0969473684210526},
-{3345809,3893715,3894285,0.311622222222222,0.311622222222222},
-{3345810,3894285,3894872,0.298755555555556,0.298755555555556},
-{3345811,3894285,3894348,0.148366666666667,0.148366666666667},
-{3345812,3894348,3894489,0.346389473684211,0.365633333333333},
-{3345813,3893773,3894348,0.305377777777778,0.305377777777778},
-{3345814,3894348,3894948,0.309777777777778,0.309777777777778},
-{3345815,3893599,3894006,0.665490909090909,0.593545945945946},
-{3345816,3894006,3894021,0.0207555555555556,0.0207555555555556},
-{3345817,3894006,3894400,0.413584615384615,0.384042857142857},
-{3345818,3894826,3894872,0.1287,0.105988235294118},
-{3345819,3894872,3894948,0.119536363636364,0.114339130434783},
-{3345820,3894948,3895418,0.645777777777778,0.645777777777778},
-{3345821,3895418,3895500,0.12468,0.12468},
-{3345822,3896281,3897105,0.347188888888889,0.340876363636364},
-{3345823,3897105,3897302,0.509679069767442,0.509679069767442},
-{3345824,3895500,3897105,1.48542,1.48542},
-{3345825,3894400,3894955,0.3876,0.3876},
-{3345826,3894955,3895418,0.241933333333333,0.241933333333333},
-{3345827,3895464,3895509,0.0302222222222222,0.0302222222222222},
-{3345828,3895509,3895874,0.252555555555556,0.252555555555556},
-{3345829,3895464,3895509,0.73032,0.73032},
-{3345834,3899288,3899175,0.0734086956521739,0.07035},
-{3345835,3899175,3898853,0.162876923076923,0.192490909090909},
-{3345836,3899188,3899175,0.356666666666667,0.356666666666667},
-{3345837,3898549,3898717,0.0878454545454546,0.080525},
-{3345838,3898717,3898853,0.0645,0.06192},
-{3345839,3898717,3899036,0.58086,0.58086},
-{3345840,3897942,3898038,0.12186,0.12186},
-{3345841,3898038,3898279,0.3291,0.3291},
-{3345842,3898279,3898327,1000000,0.0422842105263158},
-{3345843,3898327,3898397,1000000,0.0609},
-{3345844,3898038,3898327,0.40158,0.40158},
-{3345845,3896764,3896871,0.0605076923076923,0.0605076923076923},
-{3345846,3896871,3896912,0.06624,0.06624},
-{3345847,3896912,3896884,0.25122,0.25122},
-{3345848,3896884,3896912,0.24948,0.24948},
-{3345849,3897626,3898009,0.322028571428571,0.322028571428571},
-{3345850,3898009,3898084,0.05625,0.05625},
-{3345851,3898009,3897781,0.32586,0.32586},
-{3345852,3896871,3897024,0.100881818181818,0.100881818181818},
-{3345853,3897024,3897048,0.0244105263157895,0.019325},
-{3345854,3897048,3897301,0.2346,0.170618181818182},
-{3345855,3896782,3896992,0.55158,0.55158},
-{3345856,3896782,3896992,0.31164,0.31164},
-{3345857,3896885,3896782,0.18552,0.18552},
-{3345858,3896992,3897079,0.17364,0.17364},
-{3345859,3896885,3897079,0.3126,0.3126},
-{3345860,3897024,3896969,1000000,0.11058},
-{3345861,3896969,3896885,0.14418,0.14418},
-{3345862,3897079,3897161,0.1494,0.1494},
-{3345863,3897161,3897048,1000000,0.38112},
-{3345864,3896969,3897161,0.30804,0.30804},
-{3345867,3895420,3895611,0.115955555555556,0.13045},
-{3345868,3895611,3895722,0.042975,0.0509333333333333},
-{3345869,3895596,3895722,0.249555555555556,0.249555555555556},
-{3345870,3895611,3895596,0.217488888888889,0.217488888888889},
-{3345871,3895567,3895596,0.0521555555555556,0.0521555555555556},
-{3345872,3895288,3895567,0.176644444444444,0.176644444444444},
-{3345873,3895084,3895144,0.0330933333333333,0.0323739130434783},
-{3345874,3895144,3895288,0.118630434782609,0.121266666666667},
-{3345875,3895144,3895095,0.66738,0.66738},
-{3345876,3896104,3896346,1000000,1000000},
-{3345877,3896346,3896356,0.171777777777778,0.171777777777778},
-{3345878,3896104,3896103,0.367892307692308,0.367892307692308},
-{3345879,3896103,3896102,0.101294117647059,0.1148},
-{3345880,3896183,3896103,0.0639428571428571,0.0639428571428571},
-{3345881,3895359,3895498,0.147466666666667,0.147466666666667},
-{3345882,3895498,3895567,0.0900888888888889,0.0900888888888889},
-{3345883,3896534,3896567,0.02415,0.02415},
-{3345884,3896567,3896672,0.0845538461538461,0.0845538461538461},
-{3345885,3896567,3896672,0.79314,0.79314},
-{3345886,3896672,3896788,0.0991777777777778,0.0991777777777778},
-{3345887,3896788,3896934,0.0867333333333333,0.0867333333333333},
-{3345888,3896788,3896934,0.76092,0.76092},
-{3345889,3896934,3897068,0.1116,0.1116},
-{3345890,3897068,3897194,0.0819777777777778,0.0819777777777778},
-{3345891,3897194,3897373,0.126333333333333,0.131192307692308},
-{3345892,3897068,3897194,0.75252,0.75252},
-{3346101,3891654,3891731,0.179266666666667,0.179266666666667},
-{3346104,3909360,3908514,0.345218181818182,0.37974},
-{3346105,3908514,3908391,0.0761333333333333,0.0489428571428571},
-{3346171,3901401,3900367,0.407818181818182,0.407818181818182},
-{3346177,3897471,3897438,1000000,1000000},
-{3346180,3897438,3897060,1000000,1000000},
-{3346200,3876882,3876867,0.031025,0.0338454545454545},
-{3346201,3877270,3877189,0.17105,0.241482352941176},
-{3346202,3877189,3877167,0.0344888888888889,0.037248},
-{3346203,3876882,3877189,1000000,1000000},
-{3346212,3877134,3877049,0.109483333333333,0.119436363636364},
-{3346213,3877049,3876882,0.251148387096774,0.288355555555556},
-{3346214,3877049,3876752,0.113933333333333,0.113933333333333},
-{3346252,3870375,3870348,0.266861538461538,1000000},
-{3346630,3921875,3923177,0.385064150943396,0.385064150943396},
-{3346631,3923177,3923334,0.0502581818181818,0.0493607142857143},
-{3346632,3923177,3923641,0.343622222222222,0.343622222222222},
-{3346652,3886688,3886700,1000000,0.032},
-{3346653,3886740,3886688,1000000,0.0332857142857143},
-{3346654,3886700,3886737,1000000,0.0229578947368421},
-{3346655,3886737,3886740,1000000,0.0309},
-{3346686,3920542,3920413,0.1863,0.1863},
-{3346687,3920473,3920634,0.24462,0.24462},
-{3346688,3920814,3920634,1000000,1000000},
-{3346702,3922730,3923205,0.406311111111111,0.378289655172414},
-{3346703,3922734,3923002,0.156,0.160588235294118},
-{3346704,3922730,3922734,0.03582,1000000},
-{3346705,3922556,3922674,0.0759111111111111,0.05856},
-{3346706,3922734,3922674,0.0369642857142857,1000000},
-{3346707,3922345,3922670,0.150670588235294,0.1423},
-{3346708,3922674,3922670,0.03612,1000000},
-{3346709,3922670,3922730,0.0359612903225806,1000000},
-{3346722,3918497,3918288,0.122525,1000000},
-{3346723,3918288,3918141,0.0842666666666667,1000000},
-{3346724,3918647,3918293,1000000,0.186931034482759},
-{3346725,3918293,3918141,1000000,0.06228},
-{3346726,3918288,3918293,0.0406173913043478,1000000},
-{3346731,3915096,3915518,0.418328571428571,0.325366666666667},
-{3346732,3915518,3915952,0.2298,0.211416},
-{3346733,3907039,3907029,0.0253,1000000},
-{3346734,3907106,3907048,0.0411,1000000},
-{3346735,3907048,3907039,0.009225,1000000},
-{3346736,3907001,3906913,0.0301161290322581,1000000},
-{3346737,3907048,3907001,0.01273125,1000000},
-{3347453,3877796,3878226,0.233133333333333,0.233133333333333},
-{3347454,3877745,3877753,1000000,1000000},
-{3347455,3877796,3877745,0.0423333333333333,1000000},
-{3347457,3877845,3877760,0.3016,1000000},
-{3347458,3877760,3877753,1000000,1000000},
-{3347459,3877796,3877760,1000000,0.0361},
-{3347473,3858640,3858827,1000000,1000000},
-{3347474,3858827,3859100,1000000,1000000},
-{3347475,3859281,3858640,0.245977777777778,0.245977777777778},
-{3347476,3859883,3859607,0.178036363636364,0.1632},
-{3347477,3859607,3859100,0.39021,0.312168},
-{3347478,3859281,3859607,0.239025,0.224964705882353},
-{3347521,3894321,3895210,0.490355555555556,0.490355555555556},
-{3347522,3895210,3894181,0.6242,0.6242},
-{3347523,3894321,3894428,0.0900222222222222,0.097224},
-{3347524,3894428,3894532,0.174466666666667,0.15702},
-{3347525,3894428,3893838,0.371022222222222,0.371022222222222},
-{3347765,3872530,3872485,1000000,0.0561076923076923},
-{3347766,3872485,3872398,1000000,0.150284210526316},
-{3347767,3872398,3872500,1000000,0.106152941176471},
-{3347768,3872500,3872551,1000000,0.0593181818181818},
-{3347769,3872485,3872500,0.00869268292682927,1000000},
-{3347770,3872398,3872341,0.0499525423728814,0.0556075471698113},
-{3347771,3872341,3872188,0.209266666666667,0.21973},
-{3347773,3872844,3872656,0.150701694915254,1000000},
-{3347774,3872844,3872624,1000000,0.169958490566038},
-{3347775,3872084,3872303,0.1998,1000000},
-{3347776,3872303,3872414,0.100984615384615,1000000},
-{3347777,3872594,3872485,0.23766,0.35649},
-{3347778,3872346,3872394,0.0509837837837838,1000000},
-{3347779,3872394,3872414,0.0258428571428571,1000000},
-{3347780,3872484,3872490,1000000,0.00444489795918367},
-{3347781,3872490,3872524,1000000,0.0318409090909091},
-{3347782,3872303,3872394,0.0323769230769231,1000000},
-{3347783,3872394,3872490,0.0738461538461539,0.0436363636363636},
-{3347784,3872490,3872538,0.04098,0.0482117647058823},
-{3347785,3872538,3872594,0.0423818181818182,0.0717230769230769},
-{3347788,3872624,3872530,1000000,0.089925},
-{3347789,3872656,3872551,0.0899,1000000},
-{3348171,3847694,3846821,0.33440625,0.324272727272727},
-{3348172,3846700,3846821,0.341,0.341},
-{3348489,3848689,3848099,1000000,1000000},
-{3349230,3848569,3853483,1000000,1000000},
-{3349231,3847766,3848569,1000000,1000000},
-{3349232,3849451,3848362,1000000,1000000},
-{3349280,3851142,3850951,0.1456,0.1456},
-{3350290,3854813,3854860,0.388996363636364,0.38205},
-{3350291,3858719,3858906,0.0618,0.0618},
-{3350292,3858393,3859169,0.203585454545455,0.211267924528302},
-{3350293,3858253,3858439,0.950444444444444,0.950444444444444},
-{3350299,3850035,3848439,1.15786666666667,1.15786666666667},
-{3350300,3850010,3849472,0.26508,0.26508},
-{3350301,3857996,3855897,1000000,1000000},
-{3350302,3856249,3856523,0.159872727272727,0.138836842105263},
-{3350303,3856523,3857568,0.358725,0.326113636363636},
-{3350304,3855305,3855176,0.2877,0.309830769230769},
-{3350305,3854220,3854212,0.44084347826087,0.44084347826087},
-{3350306,3854212,3854211,0.030552,0.030552},
-{3350307,3853763,3853750,0.258254545454545,0.258254545454545},
-{3350308,3853750,3853749,0.0311090909090909,0.0311090909090909},
-{3350309,3853241,3853374,0.201581818181818,0.201581818181818},
-{3350310,3853374,3853428,0.0681818181818182,0.0681818181818182},
-{3350311,3852830,3852823,0.150454545454545,0.150454545454545},
-{3350312,3852823,3852822,0.0771636363636364,0.0771636363636364},
-{3350313,3852268,3852256,0.165890909090909,0.165890909090909},
-{3350314,3851730,3851745,0.0237272727272727,0.0237272727272727},
-{3350315,3851745,3851816,0.107381818181818,0.107381818181818},
-{3350316,3851730,3850999,0.259290909090909,0.259290909090909},
-{3350317,3850324,3854647,0.795447619047619,0.759290909090909},
-{3350318,3851836,3854759,2.16264,2.16264},
-{3350322,3858326,3857996,1000000,1000000},
-{3350323,3858506,3858492,0.0222218181818182,0.0207152542372881},
-{3350324,3858492,3858664,0.0719265306122449,1000000},
-{3350327,3849531,3848840,0.303324324324324,0.267214285714286},
-{3350328,3852415,3851695,0.292605,0.325116666666667},
-{3350329,3851695,3849531,0.737723076923077,0.701736585365854},
-{3350330,3851741,3851276,0.244888888888889,0.244888888888889},
-{3350331,3851276,3851142,0.0971111111111111,0.0971111111111111},
-{3350412,3920856,3915583,3.93036,3.93036},
-{3359922,3883021,3882955,0.0757058823529412,1000000},
-{3359923,3884105,3883330,1000000,0.578714285714286},
-{3359924,3883330,3883267,1000000,0.05847},
-{3359925,3883021,3883330,1000000,1000000},
-{3361616,3846821,3844192,0.715513636363636,0.850881081081081},
-{3361622,3889450,3889129,0.30834,0.30834},
-{3361623,3889450,3888936,0.32184,0.32184},
-{3361624,3889884,3889760,0.12858,0.12858},
-{3361625,3889760,3889450,0.31098,0.31098},
-{3361626,3889760,3889536,0.13506,0.13506},
-{3361627,3889536,3889277,0.18624,0.18624},
-{3361631,3885968,3886258,0.27591,0.27591},
-{3361632,3889165,3888287,0.81453,0.81453},
-{3361633,3889504,3889165,0.34032,0.34032},
-{3361634,3886258,3886560,0.346042105263158,0.346042105263158},
-{3361638,3889830,3889504,0.32241,0.32241},
-{3361639,3888847,3889830,0.61137,0.61137},
-{3361640,3889212,3888847,0.32724,0.32724},
-{3361641,3889504,3888475,0.62061,0.62061},
-{3361642,3888847,3888475,0.32493,0.32493},
-{3361643,3888109,3889165,0.62385,0.62385},
-{3361644,3888475,3888109,0.32604,0.32604},
-{3361646,3886865,3887827,0.60423,0.60423},
-{3361647,3888189,3887827,0.32598,0.32598},
-{3361648,3887827,3887997,0.09075,0.09075},
-{3361649,3887997,3888847,0.49566,0.49566},
-{3361650,3888475,3887612,0.49311,0.49311},
-{3361651,3887997,3887612,0.33003,0.33003},
-{3361652,3887612,3887415,0.09774,0.09774},
-{3361653,3887415,3886560,0.5961,0.5961},
-{3361654,3886258,3887098,0.60759,0.60759},
-{3361655,3887098,3888109,0.58539,0.58539},
-{3361656,3887415,3887098,0.32304,0.32304},
-{3361660,3894181,3893714,0.465488888888889,0.465488888888889},
-{3361661,3893714,3893424,0.306555555555556,0.306555555555556},
-{3361662,3893714,3893976,0.999022222222222,0.999022222222222},
-{3361663,3890171,3890130,0.04344,0.04344},
-{3361664,3890130,3889830,0.32457,0.32457},
-{3361665,3890130,3889497,0.42789,0.42789},
-{3361666,3889497,3889212,0.18834,0.18834},
-{3361667,3889497,3889837,0.32964,0.32964},
-{3361668,3889837,3890144,0.34284,0.34284},
-{3361671,3889212,3888335,0.50892,0.50892},
-{3361675,3889837,3888758,0.66771,0.66771},
-{3361737,3871350,3871315,0.327514285714286,0.299034782608696},
-{3362217,3890281,3890312,0.124688888888889,0.124688888888889},
-{3362225,3882011,3882065,1000000,1000000},
-{3362226,3882065,3882743,1000000,1000000},
-{3362227,3882065,3881940,0.08082,0.08082},
-{3362259,3890795,3890303,0.128372727272727,0.131358139534884},
-{3362260,3890303,3889886,0.134178947368421,0.124360975609756},
-{3362261,3890303,3890312,0.0180888888888889,0.0180888888888889},
-{3362317,3872701,3873465,1000000,1000000},
-{3362318,3873465,3873204,1000000,1000000},
-{3362319,3873287,3873716,1000000,1000000},
-{3362320,3873716,3873825,1000000,1000000},
-{3362321,3873716,3873819,1000000,1000000},
-{3362322,3873465,3873503,1000000,1000000},
-{3362323,3873045,3873503,1000000,1000000},
-{3362324,3873503,3873719,1000000,1000000},
-{3362327,3871568,3871798,0.1488,0.1488},
-{3362328,3871798,3871822,0.0123157894736842,0.0123157894736842},
-{3362329,3872009,3871244,0.209045454545455,0.2555},
-{3362330,3871798,3872009,1000000,1000000},
-{3362331,3871798,3871552,1000000,1000000},
-{3362333,3871237,3871495,1000000,1000000},
-{3362334,3871495,3872308,1000000,1000000},
-{3362335,3871769,3871575,1000000,1000000},
-{3362336,3871495,3871575,1000000,1000000},
-{3362339,3872308,3872816,1000000,1000000},
-{3362340,3872816,3872867,1000000,1000000},
-{3362341,3871769,3872816,1000000,1000000},
-{3362342,3872816,3872882,1000000,1000000},
-{3362343,3872308,3872772,1000000,1000000},
-{3362350,3892896,3892710,1000000,1000000},
-{3362351,3892710,3892510,1000000,1000000},
-{3362352,3892710,3892878,1000000,1000000},
-{3362353,3893440,3893436,1000000,1000000},
-{3362354,3892878,3893440,1000000,1000000},
-{3362355,3893492,3893440,1000000,1000000},
-{3362356,3893759,3893982,0.178309090909091,0.178309090909091},
-{3362357,3893492,3893602,1000000,1000000},
-{3362358,3893602,3893759,1000000,1000000},
-{3362359,3893982,3893733,1000000,1000000},
-{3362360,3893602,3893733,1000000,1000000},
-{3362361,3892878,3893352,1000000,1000000},
-{3362362,3893352,3893492,1000000,1000000},
-{3362363,3893329,3893497,0.1938,0.162792},
-{3362364,3893497,3893759,0.264,0.276},
-{3362365,3893222,3893154,1000000,1000000},
-{3362366,3893154,3892896,1000000,1000000},
-{3362367,3893352,3893422,1000000,1000000},
-{3362368,3893422,3893497,1000000,1000000},
-{3362369,3893154,3893422,1000000,1000000},
-{3362370,3893422,3893602,1000000,1000000},
-{3362371,3892726,3892550,1000000,1000000},
-{3362372,3893982,3893455,1000000,1000000},
-{3362373,3893455,3893406,1000000,1000000},
-{3362374,3892708,3892779,1000000,1000000},
-{3362375,3892779,3893406,1000000,1000000},
-{3362376,3892726,3893083,1000000,1000000},
-{3362377,3892779,3893083,1000000,1000000},
-{3362378,3893733,3893436,1000000,1000000},
-{3362379,3893083,3893428,1000000,1000000},
-{3362380,3893428,3893436,1000000,1000000},
-{3362381,3893083,3893430,1000000,1000000},
-{3362382,3893430,3893455,1000000,1000000},
-{3362383,3893428,3893430,1000000,1000000},
-{3362384,3889711,3889747,1000000,1000000},
-{3362385,3889747,3890088,1000000,1000000},
-{3362386,3890065,3890031,1000000,1000000},
-{3362391,3890031,3890469,1000000,1000000},
-{3362392,3890469,3890924,1000000,1000000},
-{3362393,3890031,3890469,1000000,1000000},
-{3362394,3890088,3890156,0.0407454545454545,0.0407454545454545},
-{3362395,3890156,3890590,0.52545,0.52545},
-{3362402,3873733,3873486,1000000,1000000},
-{3362405,3873733,3873766,0.0145285714285714,0.0141906976744186},
-{3362415,3883331,3883349,1000000,1000000},
-{3362416,3884023,3884123,1000000,1000000},
-{3362467,3846404,3846522,0.247866666666667,0.247866666666667},
-{3362509,3874818,3874633,1000000,0.0491727272727273},
-{3362510,3874633,3874532,1000000,0.018734693877551},
-{3362511,3874633,3874994,1000000,1000000},
-{3362512,3875410,3875446,0.0130772727272727,0.01644},
-{3362513,3875446,3875487,0.0120409090909091,0.0143189189189189},
-{3362514,3875446,3875230,1000000,1000000},
-{3362515,3875230,3874994,1000000,1000000},
-{3362516,3875338,3875230,1000000,1000000},
-{3362517,3874277,3874930,1000000,1000000},
-{3362518,3875338,3875218,1000000,1000000},
-{3362519,3875218,3874930,1000000,1000000},
-{3362520,3875218,3875028,1000000,1000000},
-{3362521,3875288,3875028,1000000,1000000},
-{3362522,3875288,3875338,1000000,1000000},
-{3362523,3875028,3874632,1000000,1000000},
-{3362524,3874632,3874277,1000000,1000000},
-{3362525,3874137,3874076,1000000,1000000},
-{3362526,3874632,3874213,1000000,1000000},
-{3362527,3874213,3874137,1000000,1000000},
-{3362528,3874367,3874213,1000000,1000000},
-{3362529,3874420,3874367,1000000,1000000},
-{3362530,3874576,3874420,1000000,1000000},
-{3362531,3874571,3874457,1000000,1000000},
-{3362532,3874457,3874420,1000000,1000000},
-{3362533,3874571,3874964,1000000,1000000},
-{3362534,3875724,3875477,1000000,1000000},
-{3362535,3875477,3875288,1000000,1000000},
-{3362536,3876677,3875950,1000000,1000000},
-{3362538,3875477,3875950,1000000,1000000},
-{3362539,3875950,3875724,1000000,1000000},
-{3362540,3876504,3875724,1000000,1000000},
-{3362543,3875477,3875353,1000000,1000000},
-{3362544,3875353,3874576,1000000,1000000},
-{3362545,3875724,3875459,1000000,1000000},
-{3362546,3875459,3875353,1000000,1000000},
-{3362547,3875459,3874964,1000000,1000000},
-{3362549,3875051,3875052,1000000,1000000},
-{3362550,3874725,3874964,1000000,1000000},
-{3362551,3874725,3874515,1000000,1000000},
-{3362552,3874515,3874471,1000000,1000000},
-{3362553,3874725,3874531,1000000,1000000},
-{3362554,3874531,3874424,1000000,1000000},
-{3362555,3875525,3875459,1000000,1000000},
-{3362556,3874795,3874725,1000000,1000000},
-{3362557,3875525,3874795,1000000,1000000},
-{3362558,3875058,3874795,1000000,1000000},
-{3362565,3874642,3874445,1000000,1000000},
-{3362566,3874795,3874572,1000000,1000000},
-{3362567,3874445,3874572,1000000,1000000},
-{3362568,3875052,3875053,1000000,1000000},
-{3362569,3875053,3875058,1000000,1000000},
-{3362570,3874572,3874914,1000000,1000000},
-{3362571,3874914,3874642,1000000,1000000},
-{3362572,3875053,3874914,1000000,1000000},
-{3362575,3875525,3875275,1000000,1000000},
-{3362576,3875275,3875058,1000000,1000000},
-{3362577,3875669,3875572,1000000,1000000},
-{3362578,3875572,3875275,1000000,1000000},
-{3362579,3875572,3875191,1000000,1000000},
-{3362580,3875191,3875053,1000000,1000000},
-{3362581,3875900,3875191,1000000,1000000},
-{3362582,3875900,3876004,1000000,1000000},
-{3362601,3872043,3871083,1000000,0.1766},
-{3362602,3871083,3871032,1000000,0.0128266666666667},
-{3362603,3871105,3871083,1000000,1000000},
-{3362604,3871194,3871105,1000000,1000000},
-{3362605,3871346,3871194,1000000,1000000},
-{3362606,3872790,3871105,1000000,1000000},
-{3362610,3872487,3872107,1000000,1000000},
-{3362611,3872197,3872107,1000000,1000000},
-{3362612,3872107,3871733,1000000,1000000},
-{3362613,3871733,3871346,1000000,1000000},
-{3362614,3872197,3871733,1000000,1000000},
-{3362615,3872242,3872197,1000000,1000000},
-{3362616,3872242,3871992,1000000,1000000},
-{3362617,3871725,3871766,0.029125,0.0183947368421053},
-{3362618,3871766,3871812,0.0337304347826087,0.0204157894736842},
-{3362619,3871992,3871766,1000000,1000000},
-{3362620,3873283,3873249,1000000,1000000},
-{3362621,3873067,3872626,1000000,1000000},
-{3362622,3872642,3872300,1000000,1000000},
-{3362623,3872300,3872242,1000000,1000000},
-{3362624,3872626,3872300,1000000,1000000},
-{3362625,3873249,3873229,1000000,1000000},
-{3362626,3873229,3873067,1000000,1000000},
-{3362628,3872790,3872318,1000000,1000000},
-{3362629,3872318,3872107,1000000,1000000},
-{3362630,3873139,3872318,1000000,1000000},
-{3362631,3872928,3872790,1000000,1000000},
-{3362632,3874277,3873712,1000000,1000000},
-{3362633,3873712,3873229,1000000,1000000},
-{3362634,3873229,3873258,1000000,1000000},
-{3362635,3873258,3873139,1000000,1000000},
-{3362636,3873712,3873392,1000000,1000000},
-{3362637,3873392,3873258,1000000,1000000},
-{3362638,3873392,3873180,1000000,1000000},
-{3362639,3873180,3873139,1000000,1000000},
-{3362640,3873139,3872970,1000000,1000000},
-{3362641,3872970,3872928,1000000,1000000},
-{3362642,3873180,3873203,1000000,1000000},
-{3362643,3873203,3872970,1000000,1000000},
-{3362644,3874930,3873565,1000000,1000000},
-{3362645,3873565,3872928,1000000,1000000},
-{3362646,3873565,3873203,1000000,1000000},
-{3362647,3873565,3873392,1000000,1000000},
-{3362648,3873334,3872940,0.15404,0.149070967741935},
-{3362649,3872940,3872142,0.273268965517241,0.240145454545455},
-{3362650,3872069,3872075,1000000,1000000},
-{3362651,3872115,3872075,1000000,1000000},
-{3362652,3872106,3872142,0.0216,0.02},
-{3362653,3872115,3872106,1000000,1000000},
-{3362654,3872047,3872035,1000000,1000000},
-{3362655,3871884,3871437,1000000,1000000},
-{3362656,3872069,3871884,1000000,1000000},
-{3362657,3872075,3871959,1000000,1000000},
-{3362658,3871959,3871884,1000000,1000000},
-{3362659,3871437,3871817,0.248530434782609,0.219853846153846},
-{3362660,3872115,3871959,1000000,1000000},
-{3362661,3872305,3872981,0.135266666666667,1000000},
-{3362662,3872981,3873387,0.09822,1000000},
-{3362663,3873130,3872840,1000000,1000000},
-{3362664,3872840,3872981,1000000,1000000},
-{3362665,3872940,3872563,1000000,1000000},
-{3362666,3872563,3872115,1000000,1000000},
-{3362667,3872777,3873130,1000000,1000000},
-{3362668,3872777,3872840,1000000,1000000},
-{3362669,3872777,3872563,1000000,1000000},
-{3362670,3872350,3872777,1000000,1000000},
-{3362671,3872057,3872069,1000000,1000000},
-{3362672,3872350,3872057,1000000,1000000},
-{3362673,3872057,3871683,1000000,1000000},
-{3362674,3871858,3872023,1000000,1000000},
-{3362675,3872023,3872057,1000000,1000000},
-{3362676,3871941,3871989,1000000,1000000},
-{3362677,3871989,3872350,1000000,1000000},
-{3362678,3872023,3871989,1000000,1000000},
-{3362679,3871941,3871832,1000000,1000000},
-{3362683,3869175,3868849,0.136384615384615,0.126642857142857},
-{3362684,3869443,3869057,0.18372,0.177793548387097},
-{3362685,3869057,3868849,0.142625,0.148826086956522},
-{3362686,3869175,3869057,1000000,1000000},
-{3362687,3869792,3869664,0.0546642857142857,0.0463818181818182},
-{3362688,3869664,3869175,0.169858064516129,0.146266666666667},
-{3362689,3869601,3870504,0.706061538461538,0.7649},
-{3362690,3870504,3870995,0.210432,0.26304},
-{3362691,3869956,3869975,0.0110545454545455,0.0130285714285714},
-{3362692,3869975,3869601,0.431485714285714,0.635873684210526},
-{3362693,3870504,3869975,1000000,1000000},
-{3362722,3862546,3862566,0.0113555555555556,0.0113555555555556},
-{3362723,3862566,3862596,0.0165333333333333,0.0165333333333333},
-{3362724,3862546,3862381,1000000,0.0514576271186441},
-{3362725,3862381,3862165,1000000,0.0700372881355932},
-{3362726,3862566,3862381,1000000,1000000},
-{3362727,3862475,3862320,0.0456387096774193,1000000},
-{3362728,3862320,3862075,0.0713322580645161,1000000},
-{3362729,3862381,3862320,1000000,1000000},
-{3362730,3862475,3862455,1000000,0.0202875},
-{3362731,3862455,3862069,1000000,0.310231578947368},
-{3362732,3862320,3862455,1000000,1000000},
-{3362733,3863539,3863563,0.015,0.01},
-{3362734,3863464,3863081,0.160378125,1000000},
-{3362735,3863532,3863138,1000000,0.164862295081967},
-{3362736,3878815,3879133,0.161823529411765,1000000},
-{3362737,3879133,3879365,0.120247058823529,1000000},
-{3362738,3879133,3879091,1000000,1000000},
-{3362739,3880149,3879822,0.202986206896552,1000000},
-{3362740,3879822,3879461,0.182941935483871,1000000},
-{3362741,3878667,3878662,0.1745625,0.22344},
-{3362742,3878662,3878665,0.0805263157894737,0.0765},
-{3362743,3878737,3878662,1000000,1000000},
-{3362744,3878737,3878736,1000000,1000000},
-{3362745,3879091,3878917,1000000,1000000},
-{3362746,3878917,3878737,1000000,1000000},
-{3362747,3878736,3878917,1000000,1000000},
-{3362748,3878736,3878735,1000000,1000000},
-{3362749,3878665,3878663,0.0172615384615385,0.0172615384615385},
-{3362750,3878663,3878655,0.195746341463415,0.191085714285714},
-{3362751,3878735,3878663,1000000,1000000},
-{3362752,3878655,3879016,1000000,1000000},
-{3362753,3879016,3879074,1000000,1000000},
-{3362754,3879074,3879073,1000000,1000000},
-{3362755,3878735,3879154,1000000,1000000},
-{3362756,3879154,3879016,1000000,1000000},
-{3362757,3879154,3879168,1000000,1000000},
-{3362758,3879074,3879313,1000000,1000000},
-{3362759,3879461,3879300,0.0602516129032258,1000000},
-{3362760,3879300,3878635,0.37482,1000000},
-{3362761,3879313,3879300,1000000,1000000},
-{3362762,3879154,3879327,1000000,1000000},
-{3362763,3879327,3879313,1000000,1000000},
-{3362764,3879313,3879514,1000000,1000000},
-{3362765,3879327,3879514,1000000,1000000},
-{3362766,3879514,3879537,1000000,1000000},
-{3362767,3879537,3879305,1000000,1000000},
-{3362768,3879305,3879309,1000000,1000000},
-{3362769,3879305,3879194,1000000,1000000},
-{3362770,3879537,3879627,1000000,1000000},
-{3362771,3879627,3879785,1000000,1000000},
-{3362772,3879785,3879704,1000000,1000000},
-{3362773,3879785,3879836,1000000,1000000},
-{3362774,3879627,3879692,1000000,1000000},
-{3362775,3879692,3879822,1000000,1000000},
-{3362776,3879692,3879853,1000000,1000000},
-{3362777,3880902,3880218,1000000,0.496314285714286},
-{3362778,3880218,3879549,1000000,0.328694117647059},
-{3362779,3880218,3880503,1000000,1000000},
-{3362780,3879822,3879802,1000000,1000000},
-{3362781,3879802,3880034,1000000,1000000},
-{3362782,3880034,3880218,1000000,1000000},
-{3362783,3880034,3880504,1000000,1000000},
-{3362784,3879802,3879555,1000000,1000000},
-{3362785,3879555,3879484,1000000,1000000},
-{3362786,3879891,3880034,1000000,1000000},
-{3362787,3879555,3879891,1000000,1000000},
-{3362788,3879555,3879596,1000000,1000000},
-{3362789,3879596,3879891,1000000,1000000},
-{3362790,3879596,3879520,1000000,1000000},
-{3362791,3879627,3879628,1000000,1000000},
-{3362792,3873751,3872938,0.384171428571429,0.384171428571429},
-{3362793,3873751,3873587,1000000,1000000},
-{3362794,3874096,3873697,1000000,1000000},
-{3362795,3874238,3874298,1000000,1000000},
-{3362796,3874298,3875050,1000000,1000000},
-{3362797,3874303,3874298,1000000,1000000},
-{3362798,3874096,3874144,1000000,1000000},
-{3362799,3874144,3874303,1000000,1000000},
-{3362800,3874307,3874144,1000000,1000000},
-{3362801,3874303,3874307,1000000,1000000},
-{3362802,3874323,3874307,1000000,1000000},
-{3362803,3873945,3874096,1000000,1000000},
-{3362804,3874323,3874160,1000000,1000000},
-{3362805,3874160,3873945,1000000,1000000},
-{3362806,3874497,3874323,1000000,1000000},
-{3362807,3874160,3874446,1000000,1000000},
-{3362808,3874446,3874497,1000000,1000000},
-{3362809,3874224,3873945,1000000,1000000},
-{3362810,3874446,3874295,1000000,1000000},
-{3362811,3874295,3874224,1000000,1000000},
-{3362812,3874770,3874688,1000000,1000000},
-{3362813,3874688,3874497,1000000,1000000},
-{3362814,3874307,3874688,1000000,1000000},
-{3362815,3874718,3874770,1000000,1000000},
-{3362816,3874946,3874770,1000000,1000000},
-{3362817,3874295,3874674,1000000,1000000},
-{3362818,3874674,3874770,1000000,1000000},
-{3362819,3874946,3875132,1000000,1000000},
-{3362820,3875425,3874946,1000000,1000000},
-{3362821,3875425,3875812,1000000,1000000},
-{3362822,3875812,3875132,1000000,1000000},
-{3362823,3874718,3875341,1000000,1000000},
-{3362824,3875341,3875425,1000000,1000000},
-{3362825,3875568,3875341,1000000,1000000},
-{3362826,3875568,3876131,1000000,1000000},
-{3362827,3876064,3875050,1000000,1000000},
-{3362828,3876131,3876176,1000000,1000000},
-{3362829,3876176,3876064,1000000,1000000},
-{3362830,3876176,3876242,1000000,1000000},
-{3362831,3876061,3876085,1000000,1000000},
-{3362832,3876085,3876064,1000000,1000000},
-{3362833,3876190,3876085,1000000,1000000},
-{3362834,3875132,3875073,1000000,1000000},
-{3362835,3875073,3874674,1000000,1000000},
-{3362836,3875727,3875716,1000000,1000000},
-{3362837,3875812,3876050,1000000,1000000},
-{3362838,3876187,3876050,1000000,1000000},
-{3362839,3875952,3876187,1000000,1000000},
-{3362840,3876050,3875982,1000000,1000000},
-{3362841,3875982,3875568,1000000,1000000},
-{3362842,3875982,3876028,1000000,1000000},
-{3362843,3876093,3875952,1000000,1000000},
-{3362844,3876215,3876093,1000000,1000000},
-{3362845,3876187,3876556,1000000,1000000},
-{3362846,3876265,3876650,1000000,1000000},
-{3362847,3876242,3876257,1000000,1000000},
-{3362848,3876257,3876190,1000000,1000000},
-{3362850,3876257,3876490,1000000,1000000},
-{3362851,3876490,3876524,1000000,1000000},
-{3362852,3876556,3876526,1000000,1000000},
-{3362853,3876526,3876093,1000000,1000000},
-{3362854,3876215,3876526,1000000,1000000},
-{3362855,3876490,3876576,1000000,1000000},
-{3362856,3876576,3876504,1000000,1000000},
-{3362857,3876755,3876576,1000000,1000000},
-{3362858,3876755,3876820,1000000,1000000},
-{3362859,3876820,3876843,1000000,1000000},
-{3362860,3876028,3876705,1000000,1000000},
-{3362861,3876705,3876755,1000000,1000000},
-{3362862,3876028,3876724,1000000,1000000},
-{3362863,3876724,3876705,1000000,1000000},
-{3362864,3876820,3876813,1000000,1000000},
-{3362865,3876813,3876677,1000000,1000000},
-{3362866,3876724,3876813,1000000,1000000},
-{3362867,3876187,3876428,1000000,1000000},
-{3362868,3876428,3876615,1000000,1000000},
-{3362869,3876615,3876556,1000000,1000000},
-{3362870,3876724,3876737,1000000,1000000},
-{3362871,3876737,3876428,1000000,1000000},
-{3362872,3876935,3876737,1000000,1000000},
-{3362873,3876615,3876964,1000000,1000000},
-{3362874,3876964,3876935,1000000,1000000},
-{3362875,3876935,3876945,1000000,1000000},
-{3362876,3876945,3876943,1000000,1000000},
-{3362877,3876945,3877237,1000000,1000000},
-{3362878,3877237,3876964,1000000,1000000},
-{3362879,3877237,3877149,1000000,1000000},
-{3362880,3877149,3877138,1000000,1000000},
-{3362881,3877237,3877186,1000000,1000000},
-{3362882,3877149,3877051,1000000,1000000},
-{3362883,3877051,3876964,1000000,1000000},
-{3362884,3877074,3877051,1000000,1000000},
-{3362885,3876556,3876770,1000000,1000000},
-{3362886,3876770,3877074,1000000,1000000},
-{3362887,3876785,3876770,1000000,1000000},
-{3362888,3876526,3876785,1000000,1000000},
-{3362889,3877111,3877074,1000000,1000000},
-{3362890,3876785,3877111,1000000,1000000},
-{3362891,3876650,3876838,1000000,1000000},
-{3362892,3876838,3876785,1000000,1000000},
-{3362893,3877142,3877111,1000000,1000000},
-{3362894,3876838,3877082,1000000,1000000},
-{3362895,3877082,3877142,1000000,1000000},
-{3362896,3876650,3876762,1000000,1000000},
-{3362897,3877082,3877225,1000000,1000000},
-{3362898,3877225,3876762,1000000,1000000},
-{3362899,3877480,3877142,1000000,1000000},
-{3362900,3877237,3877473,1000000,1000000},
-{3362901,3877473,3877480,1000000,1000000},
-{3362902,3877473,3877430,1000000,1000000},
-{3362903,3877549,3877480,1000000,1000000},
-{3362904,3877549,3877526,1000000,1000000},
-{3362905,3877337,3877549,1000000,1000000},
-{3362906,3877225,3877243,1000000,1000000},
-{3362907,3877243,3877337,1000000,1000000},
-{3362908,3877337,3877206,1000000,1000000},
-{3362909,3877206,3877243,1000000,1000000},
-{3362910,3876762,3877039,1000000,1000000},
-{3362911,3877206,3877039,1000000,1000000},
-{3362912,3877039,3877251,1000000,1000000},
-{3362913,3877251,3877484,1000000,1000000},
-{3362914,3877251,3877663,1000000,1000000},
-{3362915,3877894,3877950,1000000,1000000},
-{3362916,3877950,3877957,1000000,1000000},
-{3362917,3877950,3878018,1000000,1000000},
-{3362918,3877484,3877599,1000000,1000000},
-{3362919,3878151,3877633,0.201177777777778,0.258657142857143},
-{3362920,3877599,3877633,1000000,1000000},
-{3362921,3877663,3877736,1000000,1000000},
-{3362922,3877736,3877894,1000000,1000000},
-{3362923,3877599,3877736,1000000,1000000},
-{3362924,3877736,3878128,1000000,1000000},
-{3362925,3878230,3878168,0.0292695652173913,0.0396},
-{3362926,3878168,3878151,0.0091304347826087,0.0123529411764706},
-{3362927,3878128,3878160,1000000,1000000},
-{3362928,3878160,3878168,1000000,1000000},
-{3362929,3878160,3878080,1000000,1000000},
-{3362930,3873587,3874224,1000000,1000000},
-{3362931,3874303,3874718,1000000,1000000},
-{3362932,3881122,3881456,1000000,1000000},
-{3362933,3880796,3881426,0.255763636363636,0.228113513513513},
-{3362934,3881426,3881837,0.175075,0.120051428571429},
-{3362935,3881456,3881638,1000000,1000000},
-{3362936,3881638,3881426,1000000,1000000},
-{3362937,3882051,3881920,1000000,1000000},
-{3362938,3881456,3881857,1000000,1000000},
-{3362939,3881638,3881957,1000000,1000000},
-{3362940,3881857,3881957,1000000,1000000},
-{3362941,3882306,3882336,1000000,1000000},
-{3362942,3882336,3882051,1000000,1000000},
-{3362943,3882336,3882413,1000000,1000000},
-{3362944,3882463,3882493,1000000,1000000},
-{3362945,3882413,3882463,1000000,1000000},
-{3362946,3881837,3882198,1000000,1000000},
-{3362947,3882198,3882463,1000000,1000000},
-{3362948,3882225,3882306,1000000,1000000},
-{3362949,3881957,3882143,1000000,1000000},
-{3362950,3882143,3882225,1000000,1000000},
-{3362951,3882299,3882225,1000000,1000000},
-{3362952,3882143,3882299,1000000,1000000},
-{3362953,3882198,3882187,1000000,1000000},
-{3362954,3882187,3882299,1000000,1000000},
-{3362955,3882187,3881514,1000000,1000000},
-{3362956,3882225,3882049,1000000,1000000},
-{3362957,3882049,3882143,1000000,1000000},
-{3362958,3881857,3882045,1000000,1000000},
-{3362959,3882045,3882126,1000000,1000000},
-{3362960,3882049,3882045,1000000,1000000},
-{3362961,3881920,3881863,0.0380285714285714,0.0499125},
-{3362962,3881863,3881122,0.325177777777778,0.325177777777778},
-{3362963,3882045,3881863,1000000,1000000},
-{3362976,3847383,3846884,0.190275,0.179082352941176},
-{3362977,3846884,3845033,0.86,0.86},
-{3362978,3846884,3846862,0.154066666666667,0.154066666666667},
-{3363018,3854739,3854220,0.335733333333333,0.2518},
-{3363019,3854220,3853763,0.172563636363636,0.172563636363636},
-{3363020,3854647,3854759,0.02106,0.0229745454545455},
-{3363021,3854759,3857991,0.530918181818182,0.5562},
-{3363025,3854739,3854686,0.434111111111111,0.434111111111111},
-{3363026,3854211,3854694,0.221184,0.240417391304348},
-{3363027,3854694,3855176,0.265669565217391,0.210703448275862},
-{3363028,3854686,3854694,0.0351545454545455,0.0336260869565217},
-{3363043,3865750,3865816,0.0416727272727273,0.0359529411764706},
-{3363044,3866117,3866503,0.201969230769231,0.1641},
-{3363062,3847029,3847227,0.0654558139534884,0.070365},
-{3363063,3847227,3847265,0.011175,0.0117631578947368},
-{3363064,3847308,3847227,0.202333333333333,0.173428571428571},
-{3363065,3849169,3847054,0.527574545454545,0.558011538461539},
-{3363066,3847418,3847447,0.0536222222222222,0.0536222222222222},
-{3363255,3882181,3882400,1000000,1000000},
-{3363301,3864828,3864600,0.102,0.102},
-{3363302,3864600,3864396,0.12915,0.12915},
-{3363320,3885895,3885885,1000000,1000000},
-{3363321,3885885,3885874,1000000,1000000},
-{3363322,3885885,3886532,1000000,1000000},
-{3363323,3886985,3886953,0.368485714285714,1000000},
-{3363324,3886532,3886953,1000000,1000000},
-{3363325,3887624,3887606,1000000,0.267218181818182},
-{3363326,3886953,3887606,1000000,1000000},
-{3363327,3888215,3888202,0.31818,1000000},
-{3363328,3888202,3888181,0.35865,1000000},
-{3363329,3887606,3888202,1000000,1000000},
-{3363330,3888807,3888805,1000000,0.3762},
-{3363331,3888805,3888798,1000000,0.293431578947368},
-{3363332,3888202,3888805,1000000,1000000},
-{3363365,3866063,3865925,0.064392,0.0487818181818182},
-{3363366,3865925,3865676,0.0906,0.07248},
-{3363369,3865925,3866080,0.35664,0.35664},
-{3363396,3884221,3884516,0.353916666666667,0.344351351351351},
-{3363397,3884516,3884323,0.0880888888888889,0.0880888888888889},
-{3363398,3884516,3884654,0.149857894736842,0.138892682926829},
-{3363399,3884654,3884501,0.0710222222222222,0.0710222222222222},
-{3363435,3908887,3909017,0.082904347826087,0.0706222222222222},
-{3363436,3909017,3909343,0.160324137931034,0.185976},
-{3363437,3908737,3909017,1000000,1000000},
-{3363438,3909017,3909035,1000000,1000000},
-{3363439,3913759,3914484,0.418675,0.418675},
-{3363440,3914484,3914833,0.2114,0.2114},
-{3363441,3914089,3914213,0.0731478260869565,0.0731478260869565},
-{3363442,3914213,3914375,0.0850714285714286,0.103565217391304},
-{3363443,3914484,3914213,1000000,1000000},
-{3363447,3865442,3865410,0.0156,0.0193142857142857},
-{3363448,3865944,3865749,0.0832444444444445,0.0832444444444445},
-{3363449,3865749,3864722,0.64866,0.64866},
-{3363450,3865442,3865749,1000000,1000000},
-{3363451,3880338,3878856,1000000,1000000},
-{3363467,3848779,3849838,0.5624,0.5624},
-{3363567,3884654,3884851,0.130508108108108,0.112297674418605},
-{3363568,3885410,3885370,1000000,1000000},
-{3363569,3885370,3885850,1000000,1000000},
-{3363570,3884851,3885047,0.112615384615385,0.1098},
-{3363571,3884758,3885047,1000000,1000000},
-{3363572,3884758,3884967,1000000,1000000},
-{3363573,3885047,3885349,0.133,0.145975609756098},
-{3363574,3885349,3885737,0.280954838709677,0.235394594594595},
-{3363575,3884967,3885349,1000000,1000000},
-{3363831,3859375,3858882,1000000,1000000},
-{3363832,3858741,3858882,0.1545,0.1545},
-{3363833,3858882,3859078,0.1687,0.178623529411765},
-{3363910,3899482,3900270,0.470711111111111,0.470711111111111},
-{3363911,3900270,3900501,0.2746,0.143269565217391},
-{3363914,3900255,3900290,1000000,0.0628545454545455},
-{3363915,3900501,3900376,0.0577090909090909,0.0835263157894737},
-{3363916,3900376,3900255,0.042651724137931,0.0549733333333333},
-{3363917,3900290,3900376,1000000,0.0356888888888889},
-{3363918,3900290,3900257,0.04248,0.04248},
-{3363919,3900257,3900217,0.49848,0.49848},
-{3363920,3900217,3900270,0.0511058823529412,0.0394909090909091},
-{3363921,3900257,3900217,0.47964,0.47964},
-{3363930,3900270,3900373,0.0971,0.0971},
-{3363931,3900373,3900471,0.44442,0.44442},
-{3363932,3900471,3900373,0.8451,0.8451},
-{3363933,3900373,3900471,0.21972,0.21972},
-{3363966,3884851,3884622,1000000,1000000},
-{3363967,3884622,3884758,1000000,1000000},
-{3364717,3881574,3881559,0.0559153846153846,1000000},
-{3364718,3881559,3881563,0.00813103448275862,1000000},
-{3364719,3881586,3881618,0.0170647058823529,1000000},
-{3364720,3881618,3881628,0.00732352941176471,1000000},
-{3364721,3881592,3881596,0.0178857142857143,1000000},
-{3364722,3881596,3881599,0.01185,1000000},
-{3364911,3893742,3894432,0.4359,1000000},
-{3364912,3894432,3894443,0.0161217391304348,1000000},
-{3364913,3888770,3888988,0.127835294117647,1000000},
-{3364914,3890924,3890590,1000000,1000000},
-{3364915,3889561,3889225,0.3746,1000000},
-{3364916,3890924,3890896,1000000,1000000},
-{3364917,3891497,3892855,1000000,1000000},
-{3364918,3893488,3893554,1000000,1000000},
-{3364919,3894313,3894443,1000000,1000000},
-{3364920,3889747,3890031,1000000,1000000},
-{3364921,3890469,3890156,1000000,1000000},
-{3364922,3888327,3888283,1000000,1000000},
-{3364923,3888872,3888850,1000000,0.0759130434782609},
-{3364924,3888908,3888988,1000000,0.104733333333333},
-{3364925,3887227,3887834,0.222225,0.35556},
-{3364926,3887834,3888131,0.139542857142857,0.0888},
-{3364927,3885460,3885478,0.0245647058823529,1000000},
-{3364928,3885946,3885938,0.24513,1000000},
-{3364929,3885957,3885946,0.0503,1000000},
-{3364930,3885773,3885812,0.0438631578947368,1000000},
-{3364931,3882082,3882394,0.2611,1000000},
-{3364932,3887133,3887355,1000000,0.182372727272727},
-{3364933,3887355,3887668,1000000,0.186364285714286},
-{3364934,3887668,3887688,1000000,0.0129},
-{3364935,3886153,3886088,1000000,0.0345714285714286},
-{3364936,3886088,3885649,1000000,0.19755652173913},
-{3364937,3885649,3885566,1000000,0.0401714285714286},
-{3364938,3851765,3851985,0.1528,0.1528},
-{3364939,3851985,3852111,0.0810666666666667,0.0810666666666667},
-{3364940,3851306,3851400,0.0864705882352941,0.0773684210526316},
-{3364941,3851400,3851904,0.2574,0.2574},
-{3364942,3863001,3862781,0.178466666666667,0.178466666666667},
-{3364943,3862781,3862765,0.0184333333333333,0.0255230769230769},
-{3364944,3862223,3861804,1000000,1000000},
-{3364945,3861804,3861790,1000000,1000000},
-{3364946,3863294,3863284,1000000,1000000},
-{3364947,3863284,3863001,1000000,1000000},
-{3364950,3873776,3873845,0.1254,0.1254},
-{3364953,3881900,3881964,1000000,1000000},
-{3364954,3881964,3882469,1000000,1000000},
-{3364955,3881842,3881898,1000000,0.1203},
-{3364956,3881898,3882079,1000000,0.34374},
-{3364957,3882545,3882705,0.18404,1000000},
-{3364958,3882501,3882545,0.0732666666666667,1000000},
-{3364959,3881837,3882022,0.456190909090909,0.477914285714286},
-{3364960,3873482,3873217,1000000,0.0739571428571429},
-{3364961,3872978,3872653,1000000,0.0777285714285714},
-{3364962,3873108,3872714,0.101344186046512,1000000},
-{3364963,3873462,3873108,0.142365517241379,1000000},
-{3364964,3879729,3879997,0.354646153846154,1000000},
-{3364965,3879997,3880031,0.0604666666666667,1000000},
-{3364966,3879634,3879678,0.0471,0.0538285714285714},
-{3364967,3879678,3879729,0.0585,0.06825},
-{3364968,3879842,3879726,0.08979,1000000},
-{3364969,3880038,3880146,1000000,0.0495428571428571},
-{3364970,3876324,3877324,1000000,1000000},
-{3364971,3876821,3876731,0.121421052631579,1000000},
-{3364972,3876731,3876734,0.0483333333333333,1000000},
-{3364973,3876239,3876719,0.33824,0.267031578947368},
-{3364974,3876719,3876734,0.0119142857142857,0.00834},
-{3364975,3877219,3877367,1000000,1000000},
-{3364976,3877645,3877629,0.0389333333333333,0.0269538461538462},
-{3364977,3877629,3877545,0.165866666666667,0.165866666666667},
-{3364978,3877545,3877598,0.0173777777777778,0.0173777777777778},
-{3364979,3877598,3877849,0.0944888888888889,0.0944888888888889},
-{3364980,3877136,3877009,1000000,1000000},
-{3364981,3869093,3870083,1000000,0.404378571428571},
-{3364982,3870083,3870508,1000000,0.12467027027027},
-{3364983,3872062,3872249,1000000,0.105},
-{3364984,3872249,3872507,1000000,0.112342857142857},
-{3364985,3872507,3872555,1000000,0.0206},
-{3364986,3872305,3872229,0.042264,0.042264},
-{3364987,3871643,3872229,0.291777777777778,0.291777777777778},
-{3364988,3873757,3873334,0.17708275862069,0.270284210526316},
-{3364989,3872106,3872047,1000000,1000000},
-{3364990,3871817,3872106,0.148244444444444,0.14295},
-{3364991,3871959,3871817,1000000,1000000},
-{3364992,3870094,3870699,0.54448,0.302488888888889},
-{3364993,3869290,3870094,0.626111111111111,0.582931034482759},
-{3364996,3869022,3868552,0.215044444444444,0.215044444444444},
-{3364997,3866976,3866935,1000000,0.0152511627906977},
-{3364998,3866935,3866741,1000000,0.0704045454545455},
-{3364999,3867210,3867141,1000000,0.03876},
-{3365019,3917493,3917508,0.00333529411764706,0.00324},
-{3365020,3917508,3918086,0.143330434782609,0.139292957746479},
-{3365021,3883360,3883383,0.0277578947368421,1000000},
-{3365022,3883717,3883976,0.25272,1000000},
-{3365023,3883976,3884002,0.02805,1000000},
-{3365024,3883543,3883559,0.0168,1000000},
-{3365025,3883559,3883918,0.482863636363636,1000000},
-{3365194,3870289,3870184,1000000,1000000},
-{3365195,3870577,3870554,1000000,1000000},
-{3365196,3870554,3870387,1000000,1000000},
-{3365197,3870554,3870289,1000000,1000000},
-{3365200,3870289,3870245,1000000,1000000},
-{3365201,3870245,3869705,1000000,1000000},
-{3365203,3870245,3869973,1000000,1000000},
-{3365214,3870953,3871056,0.0758666666666667,0.06828},
-{3365215,3871056,3871159,0.100094117647059,0.0945333333333333},
-{3365216,3869667,3869515,0.0804,0.0665379310344827},
-{3365217,3869515,3869443,0.0272,0.0236903225806452},
-{3365218,3869515,3869792,1000000,1000000},
-{3365220,3870577,3870531,0.118870588235294,1000000},
-{3365221,3870531,3870650,0.257492307692308,1000000},
-{3365222,3869665,3870043,1000000,1000000},
-{3365223,3870043,3870223,1000000,1000000},
-{3365224,3870223,3870208,1000000,1000000},
-{3365225,3870531,3870277,1000000,1000000},
-{3365226,3870277,3870043,1000000,1000000},
-{3365227,3870223,3870277,1000000,1000000},
-{3365228,3870650,3870440,1000000,1000000},
-{3365229,3870208,3870440,1000000,1000000},
-{3365230,3869660,3869594,1000000,0.013965},
-{3365231,3869594,3869038,1000000,0.137025},
-{3365232,3869594,3869545,1000000,1000000},
-{3365233,3869585,3869545,1000000,1000000},
-{3365234,3870181,3869585,1000000,1000000},
-{3365235,3869545,3869463,1000000,1000000},
-{3365236,3869107,3869194,1000000,0.0614093023255814},
-{3365237,3869194,3869267,1000000,0.0709714285714286},
-{3365238,3869463,3869194,1000000,1000000},
-{3365239,3869463,3869482,1000000,1000000},
-{3365240,3869482,3869585,1000000,1000000},
-{3365241,3870082,3869297,0.144230769230769,1000000},
-{3365242,3869297,3869267,0.00692222222222222,1000000},
-{3365243,3869482,3869297,1000000,1000000},
-{3365244,3869716,3869634,0.0143466666666667,1000000},
-{3365245,3869634,3868994,0.177216666666667,1000000},
-{3365246,3870285,3869318,1000000,0.214428571428571},
-{3365247,3869318,3869279,1000000,0.00738666666666667},
-{3365248,3869032,3869114,0.0810705882352941,1000000},
-{3365249,3869114,3869196,0.0901777777777778,1000000},
-{3365250,3874402,3873803,1000000,0.220090909090909},
-{3365251,3873803,3873006,1000000,0.2199},
-{3365252,3873782,3873745,1000000,1000000},
-{3365253,3874199,3873917,0.0814163265306122,1000000},
-{3365254,3873917,3873462,0.207,1000000},
-{3365255,3874444,3874210,0.6027,1000000},
-{3365256,3874210,3874199,0.0252260869565217,1000000},
-{3365257,3873782,3873903,1000000,1000000},
-{3365258,3873903,3873917,1000000,1000000},
-{3365259,3874210,3873903,1000000,1000000},
-{3365260,3873794,3873782,1000000,1000000},
-{3365261,3873903,3873794,1000000,1000000},
-{3365262,3873745,3873633,1000000,1000000},
-{3365263,3873633,3873794,1000000,1000000},
-{3365264,3872927,3872755,0.273666666666667,1000000},
-{3365265,3872755,3872714,0.0653076923076923,1000000},
-{3365266,3873006,3872595,0.327042857142857,0.3522},
-{3365267,3872595,3872493,0.0757111111111111,0.085175},
-{3365268,3873633,3873103,1000000,1000000},
-{3365269,3873103,3872755,1000000,1000000},
-{3365270,3872595,3872939,1000000,1000000},
-{3365271,3872939,3873118,1000000,1000000},
-{3365272,3873118,3873103,1000000,1000000},
-{3365273,3872939,3873245,1000000,1000000},
-{3365274,3873245,3873118,1000000,1000000},
-{3365275,3873803,3873828,1000000,1000000},
-{3365276,3873828,3873815,1000000,1000000},
-{3365277,3873815,3873771,1000000,1000000},
-{3365278,3873771,3873815,1000000,1000000},
-{3365279,3873245,3873546,1000000,1000000},
-{3365280,3873546,3873828,1000000,1000000},
-{3365281,3873771,3873755,1000000,1000000},
-{3365282,3873755,3873745,1000000,1000000},
-{3365283,3873546,3873755,1000000,1000000},
-{3365284,3873766,3873839,0.0348279069767442,0.0348279069767442},
-{3365285,3873839,3874161,0.27488,0.28766511627907},
-{3365286,3873256,3873628,0.185385,0.190138461538462},
-{3365287,3873628,3873733,0.0510714285714286,0.0510714285714286},
-{3365289,3873091,3872865,1000000,0.0811764705882353},
-{3365290,3872865,3872729,1000000,0.03996},
-{3365291,3873475,3873364,1000000,0.0276266666666667},
-{3365292,3873364,3873091,1000000,0.0647217391304348},
-{3365293,3872865,3873364,1000000,1000000},
-{3365296,3874386,3873841,0.179610810810811,1000000},
-{3365297,3873841,3873042,0.234745945945946,1000000},
-{3365298,3874175,3873924,1000000,0.0775066666666667},
-{3365299,3873924,3873482,1000000,0.121426666666667},
-{3365300,3872978,3872811,0.0433733333333333,1000000},
-{3365301,3872811,3872671,0.0288521739130435,1000000},
-{3365302,3873518,3873399,0.0317302325581395,1000000},
-{3365303,3873399,3873217,0.04184,1000000},
-{3365307,3863309,3863477,0.176285714285714,0.137111111111111},
-{3365308,3863477,3863539,0.0456375,0.0260785714285714},
-{3365309,3863563,3863464,0.030352380952381,1000000},
-{3365310,3863616,3863532,1000000,0.0339639344262295},
-{3365311,3863477,3863467,1000000,1000000},
-{3365312,3863467,3863485,1000000,1000000},
-{3365313,3863485,3863573,1000000,1000000},
-{3365314,3863573,3863534,1000000,1000000},
-{3365318,3872317,3872286,0.0575,0.06},
-{3365319,3872286,3872309,0.014328,0.0137769230769231},
-{3365320,3872144,3872286,1000000,1000000},
-{3365323,3873808,3873788,0.00668333333333333,0.00729090909090909},
-{3365324,3873788,3873751,0.0114833333333333,0.0125272727272727},
-{3365325,3873600,3873788,1000000,1000000},
-{3365326,3879622,3879612,1000000,0.0320322580645161},
-{3365327,3879612,3879619,1000000,0.0403928571428571},
-{3365328,3879612,3879649,1000000,1000000},
-{3365329,3879649,3879673,1000000,1000000},
-{3365330,3879673,3880641,1000000,1000000},
-{3365331,3879673,3880077,1000000,1000000},
-{3365332,3880623,3880633,1000000,1000000},
-{3365333,3880633,3881014,1000000,1000000},
-{3365334,3880077,3880633,1000000,1000000},
-{3365337,3882406,3882523,1000000,0.0173194029850746},
-{3365338,3882523,3882560,1000000,0.00638507462686567},
-{3365339,3882022,3882592,1000000,0.232703225806452},
-{3365340,3882592,3882613,1000000,0.0260571428571429},
-{3365341,3882318,3882606,0.1844,1000000},
-{3365342,3882606,3882636,0.0156,1000000},
-{3365343,3882463,3882592,1000000,1000000},
-{3365344,3882592,3882606,1000000,1000000},
-{3365345,3882606,3882523,1000000,1000000},
-{3365350,3871822,3872492,0.282088888888889,0.362685714285714},
-{3365351,3872492,3872009,0.236845161290323,0.271933333333333},
-{3365352,3872492,3873287,1000000,1000000},
-{3365353,3873503,3873579,1000000,1000000},
-{3365354,3873579,3873716,1000000,1000000},
-{3365355,3873287,3873579,1000000,1000000},
-{3365357,3873579,3873719,1000000,1000000},
-{3365359,3873719,3873717,1000000,1000000},
-{3365360,3865290,3865383,0.0516272727272727,1000000},
-{3365361,3865383,3865528,0.09207,1000000},
-{3365363,3868454,3868401,0.027225,0.0297},
-{3365364,3868401,3868060,0.15622,0.213027272727273},
-{3365365,3867845,3868401,1000000,1000000},
-{3365366,3866788,3866595,1000000,1000000},
-{3365369,3865531,3865440,0.0659052631578947,1000000},
-{3365370,3865440,3865339,0.09645,1000000},
-{3365371,3865730,3865440,1000000,1000000},
-{3365372,3865730,3866292,1000000,1000000},
-{3365373,3866292,3866618,1000000,1000000},
-{3365374,3866788,3866518,1000000,1000000},
-{3365375,3866518,3865730,1000000,1000000},
-{3365376,3866292,3867082,1000000,1000000},
-{3365377,3866518,3867082,1000000,1000000},
-{3365378,3867404,3867365,0.0124933333333333,0.0119617021276596},
-{3365379,3867365,3866618,0.235533333333333,0.230413043478261},
-{3365380,3867082,3867365,1000000,1000000},
-{3365381,3867082,3867120,1000000,1000000},
-{3365382,3867120,3867845,1000000,1000000},
-{3365383,3867404,3867120,1000000,1000000},
-{3365384,3867845,3866803,1000000,1000000},
-{3365385,3866803,3866788,1000000,1000000},
-{3365386,3867120,3866803,1000000,1000000},
-{3365387,3865383,3865437,1000000,1000000},
-{3365388,3865437,3866292,1000000,1000000},
-{3365389,3865312,3865316,1000000,0.00658867924528302},
-{3365390,3865316,3865339,1000000,0.0506769230769231},
-{3365391,3865437,3865316,1000000,1000000},
-{3366056,3864861,3865352,0.26285,0.2253},
-{3366057,3865352,3865911,0.225066666666667,0.279393103448276},
-{3366058,3865352,3864975,0.180333333333333,0.180333333333333},
-{3366073,3866404,3866392,0.0769153846153846,0.0769153846153846},
-{3366074,3866392,3866379,0.0606230769230769,0.065675},
-{3366075,3867874,3867815,0.26322,0.26322},
-{3366076,3867815,3867754,0.217771428571429,0.217771428571429},
-{3366077,3866392,3866946,0.191022222222222,0.191022222222222},
-{3366078,3866946,3867815,0.330244444444444,0.330244444444444},
-{3366079,3866345,3866946,0.340711111111111,0.340711111111111},
-{3366224,3849152,3848980,0.1829625,0.1829625},
-{3366225,3848980,3848972,0.0358615384615385,0.0358615384615385},
-{3366226,3874966,3874841,0.2559,1000000},
-{3366227,3874841,3874774,0.0813923076923077,1000000},
-{3366228,3874533,3874396,1000000,0.365957142857143},
-{3366229,3874396,3874345,1000000,0.085425},
-{3366230,3874841,3874396,0.187733333333333,0.187733333333333},
-{3366231,3875073,3875441,1000000,1000000},
-{3366232,3875441,3875716,0.144690909090909,0.144690909090909},
-{3366233,3875430,3875447,0.0386666666666667,0.0386666666666667},
-{3366234,3875447,3875441,0.0226363636363636,0.0226363636363636},
-{3366235,3875132,3875357,1000000,1000000},
-{3366236,3875357,3875727,1000000,1000000},
-{3366237,3877633,3877594,0.0105,0.012},
-{3366238,3877594,3877054,0.176545454545455,0.215777777777778},
-{3366239,3877251,3877233,1000000,1000000},
-{3366240,3877233,3877197,1000000,1000000},
-{3366241,3877233,3877446,1000000,1000000},
-{3366242,3877446,3877594,1000000,1000000},
-{3366243,3875727,3875762,1000000,1000000},
-{3366244,3875727,3875952,1000000,1000000},
-{3366245,3876193,3876189,0.0221272727272727,0.0221272727272727},
-{3366246,3875909,3876189,1000000,1000000},
-{3366247,3876215,3876265,1000000,1000000},
-{3366248,3876189,3876215,1000000,1000000},
-{3366249,3876265,3877233,1000000,1000000},
-{3366250,3875532,3875747,1000000,1000000},
-{3366251,3875747,3875762,1000000,1000000},
-{3366252,3875762,3875909,1000000,1000000},
-{3366253,3863618,3863585,0.023295652173913,0.0255142857142857},
-{3366254,3863585,3863490,0.0490173913043478,0.05637},
-{3366255,3863585,3864479,1000000,1000000},
-{3366267,3897945,3898004,1000000,1000000},
-{3366268,3898004,3898054,1000000,1000000},
-{3366269,3898054,3898103,0.0379894736842105,0.0379894736842105},
-{3366270,3898103,3898166,0.0829714285714286,0.0829714285714286},
-{3366927,3881611,3881648,1000000,0.026175},
-{3366928,3881648,3881710,1000000,0.0616285714285714},
-{3366929,3881648,3881631,0.0198631578947368,1000000},
-{3366930,3881631,3881563,0.04806,1000000},
-{3366983,3882385,3882510,0.0192434782608696,1000000},
-{3366984,3882510,3882640,0.0207826086956522,1000000},
-{3367621,3866378,3866336,0.115485714285714,0.115485714285714},
-{3367622,3866336,3866395,0.185288888888889,0.185288888888889},
-{3367839,3870350,3869994,1000000,0.319090909090909},
-{3367840,3869994,3869885,0.0407555555555556,0.0407555555555556},
-{3367841,3870073,3869971,0.0406181818181818,1000000},
-{3367842,3869971,3869885,0.0269612903225806,1000000},
-{3367843,3869994,3869971,1000000,0.106690909090909},
-{3367853,3870353,3870346,0.0214,1000000},
-{3367854,3870346,3870204,0.0516888888888889,0.0516888888888889},
-{3367967,3866333,3866289,0.0099063829787234,0.0099063829787234},
-{3367968,3866289,3866024,0.0568851063829787,0.0581217391304348},
-{3367970,3866695,3866378,0.058524,0.0609625},
-{3367971,3866378,3866333,0.00677872340425532,0.00677872340425532},
-{3368013,3872879,3873059,0.0764222222222222,0.0764222222222222},
-{3368018,3873657,3873666,0.0110547945205479,0.0118676470588235},
-{3368019,3873666,3873683,0.0834,0.0881657142857143},
-{3368020,3873598,3873881,0.115915384615385,0.273981818181818},
-{3368021,3873881,3874017,0.0639,0.0755181818181818},
-{3368022,3873666,3873688,0.04428,1000000},
-{3368023,3873688,3873785,0.29208,1000000},
-{3368024,3873785,3874017,0.6174,0.6174},
-{3368025,3873881,3873785,1000000,0.47196},
-{3368700,3859682,3859517,1000000,1000000},
-{3368701,3859517,3859303,1000000,1000000},
-{3368702,3859517,3860297,1000000,1000000},
-{3368843,3905770,3905886,0.0306923076923077,0.0316666666666667},
-{3368928,3865357,3865397,0.0183927272727273,0.0177473684210526},
-{3369009,3921416,3921453,0.0066,0.00639047619047619},
-{3369010,3921453,3921479,0.00378688524590164,0.00366666666666667},
-{3369011,3921930,3921960,0.012190243902439,0.0128153846153846},
-{3369012,3921960,3921992,0.012945,0.0136263157894737},
-{3369013,3921780,3921831,0.0249,0.0256545454545455},
-{3369014,3921831,3921950,0.0412971428571429,0.0425117647058824},
-{3369015,3918370,3918388,0.00767272727272727,0.00844},
-{3369016,3918388,3918452,0.0190058823529412,0.0208451612903226},
-{3369017,3918014,3918426,0.161770909090909,0.156094736842105},
-{3369035,3900812,3900773,0.0529666666666667,0.0529666666666667},
-{3369036,3900773,3900726,0.0272,0.0386526315789474},
-{3369037,3896794,3896955,0.04602,0.0473735294117647},
-{3369038,3896955,3897549,0.252197260273973,0.266817391304348},
-{3369039,3894704,3894738,0.0184857142857143,1000000},
-{3369040,3894738,3894825,0.0625,1000000},
-{3369041,3894704,3894715,1000000,0.0219},
-{3369042,3894715,3894743,1000000,0.058632},
-{3369043,3890174,3890115,0.0462631578947368,0.0976666666666667},
-{3369044,3894733,3894534,0.0532705882352941,0.054336},
-{3369045,3899650,3899227,0.227272727272727,0.227272727272727},
-{3369046,3899227,3899134,0.0371818181818182,0.0371818181818182},
-{3369047,3900866,3900872,0.009571875,0.0105620689655172},
-{3369048,3900872,3900881,0.010584375,0.0114813559322034},
-{3369056,3868404,3868368,0.0197714285714286,0.0230666666666667},
-{3369057,3868368,3867854,0.246377777777778,0.246377777777778},
-{3369058,3868598,3868379,1000000,0.0466565217391304},
-{3369059,3868379,3868288,1000000,0.0260142857142857},
-{3369060,3868525,3868363,0.036,1000000},
-{3369061,3868363,3868261,0.0263581395348837,1000000},
-{3369062,3866319,3866250,0.02688,0.028},
-{3369063,3866250,3866226,0.00881538461538462,0.009168},
-{3369071,3865860,3865922,0.0429333333333333,0.0429333333333333},
-{3369072,3865922,3867199,0.509933333333333,0.509933333333333},
-{3369075,3865397,3865680,0.177452830188679,0.174166666666667},
-{3369076,3872667,3873010,0.209296551724138,0.2529},
-{3369077,3872815,3873090,0.20044,0.111355555555556},
-{3369078,3873090,3873120,0.015575,0.01168125},
-{3369079,3871160,3871270,0.0352163265306122,0.0375130434782609},
-{3369080,3871270,3871306,0.009084,0.00966382978723404},
-{3369081,3869340,3869827,1000000,1000000},
-{3369082,3867959,3868097,1000000,1000000},
-{3369083,3868097,3868287,1000000,1000000},
-{3369084,3868226,3867962,1000000,1000000},
-{3369085,3849626,3849614,0.0708315789473684,0.06729},
-{3369086,3849614,3849860,0.20439,0.215147368421053},
-{3369087,3854739,3854675,0.0870444444444445,0.097925},
-{3369088,3854675,3854647,0.06204,0.0517},
-{3369089,3900123,3900177,0.0254210526315789,1000000},
-{3369094,3909727,3909551,0.0542631578947368,0.0542631578947368},
-{3369095,3909551,3909507,0.0136421052631579,0.0136421052631579},
-{3369098,3895760,3896021,1000000,1000000},
-{3369099,3896021,3896239,1000000,1000000},
-{3369100,3895643,3896691,0.262054838709677,1000000},
-{3369101,3896691,3897835,0.277028571428571,1000000},
-{3369102,3895915,3896748,1000000,0.21851},
-{3369103,3896748,3897857,1000000,0.278843076923077},
-{3369104,3901828,3903179,0.312152941176471,0.30037358490566},
-{3369105,3903179,3903378,0.04855,0.0456941176470588},
-{3369107,3900025,3900123,0.0435413793103448,1000000},
-{3369108,3899865,3899983,1000000,0.0710068965517241},
-{3369110,3902123,3902196,0.0190243902439024,1000000},
-{3369111,3901249,3901380,1000000,1000000},
-{3369112,3901380,3901497,1000000,1000000},
-{3369113,3900685,3900925,0.085935,0.073136170212766},
-{3369114,3899120,3899374,0.101417647058824,0.10775625},
-{3369124,3885699,3885856,0.15372,0.096075},
-{3369125,3866233,3865469,1000000,1000000},
-{3369126,3865469,3863689,1000000,1000000},
-{3369127,3864222,3865279,0.273741818181818,1000000},
-{3369128,3890115,3889735,0.275715789473684,0.476236363636364},
-{3369129,3889735,3890270,0.605555555555556,0.605555555555556},
-{3369130,3865255,3864236,0.316905882352941,1000000},
-{3369131,3864166,3863639,1000000,1000000},
-{3369132,3863639,3862737,1000000,1000000},
-{3369133,3865048,3864445,1000000,0.248610810810811},
-{3369134,3865024,3864529,0.163153846153846,1000000},
-{3369135,3867714,3867564,1000000,0.0678206896551724},
-{3369136,3867763,3867604,0.0537085714285714,1000000},
-{3369137,3869749,3869812,0.185127272727273,1000000},
-{3369138,3869879,3869812,0.0265548387096774,1000000},
-{3369139,3869879,3869886,1000000,0.0400444444444444},
-{3369140,3870117,3869886,1000000,0.09564},
-{3369141,3875078,3874980,0.201463636363636,1000000},
-{3369142,3875124,3875035,1000000,0.136163636363636},
-{3369143,3877202,3877642,1000000,0.10788},
-{3369144,3878372,3878333,0.2125,1000000},
-{3369145,3878428,3878406,1000000,0.14304},
-{3369146,3880625,3881506,0.277004651162791,1000000},
-{3369147,3882769,3882652,1000000,0.107925},
-{3369148,3858406,3858389,0.0253392857142857,0.0267735849056604},
-{3369149,3858389,3858386,0.00544210526315789,0.00585283018867925},
-{3369150,3862280,3862229,0.0423833333333333,0.0423833333333333},
-{3369151,3863788,3863196,0.157003846153846,1000000},
-{3369152,3895430,3895608,1000000,0.058825},
-{3369153,3895608,3895822,1000000,0.0574530612244898},
-{3369154,3895485,3895657,0.0632,1000000},
-{3369155,3895657,3896146,0.14844,1000000},
-{3369156,3896563,3896657,0.0483692307692308,0.0483692307692308},
-{3369157,3895226,3895452,1000000,1000000},
-{3369172,3883349,3883702,1000000,1000000},
-{3369173,3883702,3884023,1000000,1000000},
-{3369174,3881800,3881903,0.0418961538461538,0.0427176470588235},
-{3369175,3881903,3881939,0.011568,0.011568},
-{3369189,3886067,3885548,0.225278571428571,0.242607692307692},
-{3369190,3885548,3885191,0.212044444444444,0.212044444444444},
-{3369191,3889337,3889432,0.0414545454545455,0.0456},
-{3369192,3889432,3889464,0.0187333333333333,0.0183260869565217},
-{3369193,3888071,3888359,0.117624,0.133663636363636},
-{3369194,3888359,3888450,0.0342452830188679,0.0378125},
-{3369195,3891025,3891107,0.0644926829268293,1000000},
-{3369196,3891107,3891284,0.066725,1000000},
-{3369197,3891025,3891184,1000000,0.0694304347826087},
-{3369198,3891184,3891284,1000000,0.0595733333333333},
-{3369199,3885331,3885303,0.08358,0.0759818181818182},
-{3369200,3885303,3885289,0.161151724137931,0.166907142857143},
-{3369201,3887235,3887293,0.0307538461538461,1000000},
-{3369202,3887293,3887326,0.017055,1000000},
-{3369203,3887531,3887431,0.0331813953488372,1000000},
-{3369204,3887431,3887412,0.0123,1000000},
-{3369205,3889738,3889232,0.212142857142857,1000000},
-{3369206,3889232,3889246,0.00807428571428571,1000000},
-{3369207,3890369,3889255,1000000,0.379492307692308},
-{3369208,3889255,3889246,1000000,0.0096},
-{3369209,3894823,3894268,0.327575,0.327575},
-{3369210,3894268,3894198,0.0356222222222222,0.0356222222222222},
-{3369211,3900606,3900644,1000000,0.0265263157894737},
-{3369212,3900644,3900681,1000000,0.0506625},
-{3369213,3903078,3903267,0.10351,0.105264406779661},
-{3369214,3902445,3902536,0.0449727272727273,0.041225},
-{3369215,3902536,3902589,0.02352,0.0276705882352941},
-{3369216,3901306,3901333,0.00934615384615385,0.00972},
-{3369217,3901333,3901368,0.0211846153846154,0.0262285714285714},
-{3369218,3903989,3904334,0.14856,0.171415384615385},
-{3369219,3904334,3904346,0.005064,0.00602857142857143},
-{3369220,3907488,3907177,0.0869189189189189,0.0804},
-{3369221,3907177,3907116,0.0144342857142857,0.0129538461538462},
-{3369222,3905751,3905907,0.0876631578947368,0.0489882352941177},
-{3369223,3905907,3905973,0.0373428571428571,0.02614},
-{3372867,3870605,3870782,0.292,0.292},
-{3372868,3870782,3871051,1000000,1000000},
-{3372911,3883889,3883177,1000000,1000000},
-{3372912,3883177,3883345,1000000,1000000},
-{3372913,3882564,3883030,0.269034782608696,1000000},
-{3372914,3883030,3883054,0.00936428571428571,1000000},
-{3372915,3883177,3883030,1000000,1000000},
-{3372916,3884967,3885354,1000000,1000000},
-{3372917,3885354,3885370,1000000,1000000},
-{3372918,3885713,3885781,1000000,1000000},
-{3372919,3885781,3885850,1000000,1000000},
-{3372920,3885317,3885781,1000000,1000000},
-{3372921,3885354,3885318,1000000,1000000},
-{3372922,3885318,3885317,1000000,1000000},
-{3372923,3885012,3885318,1000000,1000000},
-{3372924,3885317,3885012,1000000,1000000},
-{3372925,3885354,3885384,1000000,1000000},
-{3372926,3885317,3885012,1000000,1000000},
-{3372927,3889368,3889882,1000000,0.306675},
-{3372928,3889565,3889599,0.02832,1000000},
-{3372929,3889599,3889882,0.24393,1000000},
-{3372930,3889882,3889662,1000000,1000000},
-{3372931,3889662,3889470,1000000,1000000},
-{3372932,3889470,3889599,1000000,1000000},
-{3372933,3889662,3889475,1000000,1000000},
-{3372934,3889475,3889470,1000000,1000000},
-{3372935,3889338,3889368,1000000,0.0246272727272727},
-{3372936,3889475,3889338,1000000,1000000},
-{3372937,3889010,3889028,1000000,0.0174315789473684},
-{3372938,3889028,3889338,1000000,0.225027272727273},
-{3372939,3889475,3889028,1000000,1000000},
-{3372940,3891395,3891349,0.1968,0.1968},
-{3372941,3891086,3891097,1000000,1000000},
-{3372942,3891097,3891266,1000000,1000000},
-{3372943,3891266,3891395,1000000,1000000},
-{3372944,3890541,3890899,0.1554,0.1554},
-{3372945,3890899,3891349,0.218577777777778,0.218577777777778},
-{3372946,3891266,3890899,1000000,1000000},
-{3372947,3891485,3891444,0.0676222222222222,0.0676222222222222},
-{3372948,3891444,3891395,0.0808888888888889,0.0808888888888889},
-{3372949,3893100,3893592,1000000,1000000},
-{3372950,3893000,3893309,1000000,0.216725},
-{3372951,3893309,3893787,1000000,0.177790909090909},
-{3372952,3893100,3893309,1000000,1000000},
-{3372953,3893141,3893362,0.150066666666667,1000000},
-{3372954,3893362,3893831,0.218333333333333,1000000},
-{3372955,3891444,3891831,1000000,1000000},
-{3372956,3892851,3893100,1000000,1000000},
-{3372957,3891831,3892697,1000000,1000000},
-{3372958,3892697,3892851,1000000,1000000},
-{3372959,3891831,3892873,1000000,1000000},
-{3372960,3892873,3892851,1000000,1000000},
-{3372961,3892697,3892873,1000000,1000000},
-{3372962,3889636,3889627,0.0147428571428571,0.012384},
-{3372963,3889627,3889466,0.224496,0.23385},
-{3372964,3889092,3889055,0.01125,0.013125},
-{3372965,3889055,3888330,0.216377142857143,0.270471428571429},
-{3372966,3888330,3888266,0.0213483870967742,0.0194647058823529},
-{3372967,3888266,3888064,0.0673875,0.0673875},
-{3372968,3889627,3888722,1000000,1000000},
-{3372969,3888722,3888677,1000000,1000000},
-{3372970,3888677,3889055,1000000,1000000},
-{3372971,3888266,3888530,1000000,1000000},
-{3372972,3888530,3888722,1000000,1000000},
-{3372973,3888677,3888530,1000000,1000000},
-{3372974,3878668,3878890,0.203957142857143,0.158633333333333},
-{3372975,3878890,3878962,0.0525176470588235,0.0469894736842105},
-{3372976,3878778,3878918,0.08667,1000000},
-{3372977,3878918,3879034,0.08136,1000000},
-{3372978,3878890,3878918,1000000,1000000},
-{3372979,3878554,3878563,1000000,1000000},
-{3372980,3878563,3878668,1000000,1000000},
-{3372981,3878668,3878540,0.07215,0.103071428571429},
-{3372982,3878540,3878226,0.1822,0.2733},
-{3372983,3878563,3878266,1000000,1000000},
-{3372984,3878266,3878540,1000000,1000000},
-{3372985,3878266,3878106,1000000,1000000},
-{3372986,3878106,3877634,1000000,1000000},
-{3372987,3877634,3877726,1000000,0.50064},
-{3372988,3877726,3877745,1000000,0.0528947368421053},
-{3372989,3878106,3877726,1000000,1000000},
-{3372990,3875527,3875483,1000000,1000000},
-{3372991,3875483,3875236,1000000,1000000},
-{3372992,3875483,3875236,1000000,1000000},
-{3372993,3875948,3875649,0.13585,1000000},
-{3372994,3875649,3875560,0.0479052631578947,1000000},
-{3372995,3875948,3876015,1000000,0.110475},
-{3372996,3876015,3875997,1000000,0.06655},
-{3372997,3875649,3876015,1000000,1000000},
-{3372998,3876017,3876154,1000000,0.14012},
-{3372999,3876154,3876266,1000000,0.22568},
-{3373000,3875755,3876154,1000000,1000000},
-{3373002,3879206,3879069,0.138733333333333,0.138733333333333},
-{3373003,3879377,3879206,1000000,1000000},
-{3373004,3881424,3881125,0.147664285714286,1000000},
-{3373005,3881125,3881083,0.0164444444444444,1000000},
-{3373006,3881125,3881391,1000000,1000000},
-{3373007,3881391,3881459,1000000,1000000},
-{3373008,3881459,3881391,1000000,1000000},
-{3373009,3875718,3875755,0.0333454545454545,0.0333454545454545},
-{3373010,3875755,3875761,0.00637714285714286,0.00656470588235294},
-{3373011,3874416,3874357,0.136069565217391,0.136069565217391},
-{3373012,3874357,3874338,0.0793846153846154,0.0469090909090909},
-{3373013,3873845,3874357,1000000,1000000},
-{3373015,3876002,3874467,1.5442,1.5442},
-{3373016,3874357,3874806,1000000,1000000},
-{3373017,3874806,3876002,1000000,1000000},
-{3373018,3874561,3874557,0.8596,0.7368},
-{3373019,3874557,3874416,0.567969230769231,0.3516},
-{3373020,3874806,3874557,1000000,1000000},
-{3373021,3870448,3870467,0.0794666666666667,0.0794666666666667},
-{3373022,3870467,3870497,0.113466666666667,0.113466666666667},
-{3373023,3870171,3870467,1000000,1000000},
-{3373024,3871985,3871984,0.012,1000000},
-{3373025,3871984,3871961,0.142388571428571,1000000},
-{3373026,3871984,3872569,1000000,1000000},
-{3373027,3872855,3872844,0.045472131147541,0.0523358490566038},
-{3373028,3872623,3872655,1000000,0.0454173913043478},
-{3373029,3872655,3872669,1000000,0.0184046511627907},
-{3373030,3869308,3869064,0.0973714285714286,0.09088},
-{3373031,3869064,3868949,0.0421548387096774,0.0396},
-{3373032,3869308,3869230,0.227844444444444,0.227844444444444},
-{3373033,3869230,3869208,0.0297777777777778,0.0297777777777778},
-{3373034,3869293,3869230,1000000,1000000},
-{3373035,3869230,3869064,1000000,1000000},
-{3373036,3865507,3865314,0.137242105263158,0.162975},
-{3373037,3865314,3864948,0.201845454545455,0.170792307692308},
-{3373038,3866027,3865514,1000000,1000000},
-{3373039,3865514,3865314,1000000,1000000},
-{3373040,3865214,3864948,1000000,1000000},
-{3373041,3864936,3865198,0.06588,1000000},
-{3373042,3865198,3866122,0.31222,1000000},
-{3373043,3865214,3865187,1000000,1000000},
-{3373044,3865187,3865198,1000000,1000000},
-{3373045,3865514,3865405,1000000,1000000},
-{3373046,3865405,3865214,1000000,1000000},
-{3373047,3865187,3865405,1000000,1000000},
-{3373048,3865076,3865201,1000000,0.02928},
-{3373049,3865201,3865871,1000000,0.194108571428571},
-{3373050,3888327,3888444,1000000,0.03968},
-{3373051,3888444,3888665,1000000,0.07172},
-{3373054,3889707,3889340,0.138462857142857,0.134616666666667},
-{3373055,3889340,3889316,0.00845142857142857,0.00799459459459459},
-{3373057,3888665,3888819,1000000,0.0591777777777778},
-{3373058,3888819,3888872,1000000,0.021336},
-{3373059,3888444,3888642,1000000,1000000},
-{3373060,3888819,3888642,1000000,1000000},
-{3373061,3888642,3888679,1000000,1000000},
-{3373062,3888679,3888773,1000000,1000000},
-{3373063,3888937,3889003,1000000,1000000},
-{3373064,3889003,3889340,1000000,1000000},
-{3373065,3889003,3889748,1000000,1000000},
-{3373072,3890112,3890158,0.0146341463414634,0.0162162162162162},
-{3373073,3890158,3890207,0.0180585365853659,0.0200108108108108},
-{3373074,3890094,3890158,1000000,1000000},
-{3373088,3888642,3888820,1000000,1000000},
-{3374548,3919281,3919382,0.04689375,0.037515},
-{3375004,3919192,3918598,0.189188888888889,1000000},
-{3375005,3918598,3918247,0.129790476190476,1000000},
-{3375007,3918247,3918202,0.0248958904109589,1000000},
-{3375008,3918202,3917929,0.127566233766234,1000000},
-{3375018,3851089,3850826,0.0878195121951219,1000000},
-{3375019,3850826,3850740,0.0284057142857143,1000000},
-{3375020,3858867,3858415,1000000,0.05962},
-{3375021,3861161,3860782,1000000,0.0801081081081081},
-{3375022,3860782,3860691,1000000,0.0173922077922078},
-{3375148,3916249,3916583,0.0751324675324675,1000000},
-{3375149,3916583,3916771,0.0490538461538462,1000000},
-{3375189,3922117,3922706,0.12103125,0.117363636363636},
-{3375190,3922706,3922922,0.0573969230769231,0.0556835820895522},
-{3375236,3902011,3901991,0.0240461538461538,0.0271826086956522},
-{3375263,3851116,3851245,0.0384166666666667,1000000},
-{3375264,3851245,3850696,0.27205,1000000},
-{3375316,3850015,3849512,1000000,0.0942347826086957},
-{3375321,3887209,3887343,1000000,0.266185714285714},
-{3375322,3887343,3887396,1000000,0.0711428571428571},
-{3375323,3887209,3887030,0.089275,1000000},
-{3375324,3887030,3886676,0.276993103448276,1000000},
-{3375325,3890408,3890379,1000000,0.081825},
-{3375326,3890327,3890379,0.02592,0.0189},
-{3375327,3890379,3890676,0.126177272727273,0.118123404255319},
-{3375328,3890308,3890327,1000000,0.02544},
-{3375341,3893307,3893278,0.0353333333333333,0.0334736842105263},
-{3375395,3919354,3919263,0.0236808510638298,1000000},
-{3375396,3919263,3918867,0.141980769230769,1000000},
-{3375435,3890393,3890494,0.0620625,0.0763846153846154},
-{3375436,3890267,3890370,0.0769111111111111,0.06489375},
-{3375437,3890370,3890393,0.02002,0.02002},
-{3375438,3890370,3890515,0.243423529411765,1000000},
-{3375439,3890294,3890515,1000000,0.0583224489795918},
-{3375440,3890515,3890704,1000000,0.0540585365853659},
-{3375441,3890431,3890534,1000000,0.1681875},
-{3375442,3890534,3890393,0.0669771428571429,1000000},
-{3375443,3890585,3890647,0.0810857142857143,0.0532125},
-{3375444,3890647,3890664,0.0159,0.0123096774193548},
-{3375445,3890534,3890647,1000000,0.110982857142857},
-{3375446,3890774,3890544,1000000,0.0895354838709677},
-{3375447,3890544,3890447,1000000,0.0453642857142857},
-{3375522,3901140,3901256,1000000,0.0231183673469388},
-{3375523,3901256,3901412,1000000,0.0368571428571429},
-{3375524,3900011,3900284,1000000,0.124486956521739},
-{3375525,3900284,3900372,1000000,0.0274764705882353},
-{3375527,3897788,3897852,1000000,0.01896},
-{3375528,3897852,3897924,1000000,0.0215538461538462},
-{3375529,3897794,3897858,0.0164297872340426,1000000},
-{3375530,3897858,3897939,0.0194625,1000000},
-{3375531,3896533,3897246,1000000,0.168092307692308},
-{3375532,3893382,3894155,0.207703846153846,1000000},
-{3375533,3893188,3893386,1000000,0.05634},
-{3375534,3893386,3894157,1000000,0.211294117647059},
-{3375540,3907326,3907451,1000000,0.0412540540540541},
-{3375541,3907451,3907593,1000000,0.0480972972972973},
-{3375542,3907159,3907427,0.0602705882352941,1000000},
-{3375543,3907427,3907579,0.0367176470588235,1000000},
-{3375544,3905750,3905895,1000000,0.02739},
-{3375545,3905895,3906615,1000000,0.168052631578947},
-{3375546,3905750,3905815,1000000,0.0432},
-{3375547,3905815,3905869,0.0340071428571429,0.0453428571428571},
-{3375548,3905895,3905815,0.0449032258064516,1000000},
-{3375549,3905707,3905852,0.02794,1000000},
-{3375550,3905852,3906471,0.144760714285714,1000000},
-{3375551,3903369,3903200,0.127938461538462,1000000},
-{3375552,3903200,3903129,0.0544941176470588,1000000},
-{3375553,3900670,3900831,1000000,0.073741935483871},
-{3375554,3900831,3900885,1000000,0.0164625},
-{3375555,3900885,3900944,1000000,0.0298909090909091},
-{3375556,3900944,3900990,1000000,0.0151},
-{3375557,3900990,3901233,1000000,0.07797},
-{3375558,3900680,3900515,0.0365068965517241,1000000},
-{3375559,3900413,3900473,0.018495,1000000},
-{3375560,3900473,3900506,0.011553488372093,1000000},
-{3375561,3896271,3896371,0.0689234042553191,1000000},
-{3375562,3896371,3896522,0.0850163265306123,1000000},
-{3375564,3899403,3899547,0.0943230769230769,1000000},
-{3375565,3899547,3899683,0.0912,1000000},
-{3375568,3900008,3899976,0.0500318181818182,1000000},
-{3375569,3899976,3899933,0.0625333333333333,1000000},
-{3375713,3897798,3897794,0.0213272727272727,0.0213272727272727},
-{3375719,3901165,3901356,0.039504,1000000},
-{3375720,3901356,3901421,0.0159918367346939,1000000},
-{3375783,3902275,3902403,0.029504347826087,1000000},
-{3375784,3902403,3902618,0.0442212765957447,1000000},
-{3376135,3916555,3916628,0.0248341463414634,0.0248341463414634},
-{3376136,3916628,3916895,0.165308108108108,0.156830769230769},
-{3376137,3916583,3916628,1000000,1000000},
-{3376138,3916254,3916517,1000000,0.0611844155844156},
-{3376139,3916517,3916801,1000000,0.0687721518987342},
-{3376169,3850858,3850273,0.25086,0.25086},
-{3376170,3850185,3850933,0.276781818181818,0.276781818181818},
-{3376171,3850933,3850858,0.1332,0.1332},
-{3376177,3858750,3858648,0.05396,0.0899333333333333},
-{3376178,3858648,3858326,0.215185714285714,1000000},
-{3376179,3858648,3858629,0.02166,0.02166},
-{3376180,3858629,3858601,0.62982,0.62982},
-{3376181,3858601,3858629,0.07644,0.07644},
-{3376187,3903822,3904577,0.462244444444444,0.462244444444444},
-{3376188,3904577,3903935,0.413181818181818,0.37875},
-{3376189,3904666,3904577,0.0749052631578947,0.0677714285714286},
-{3376190,3898308,3898066,0.333428571428571,0.376451612903226},
-{3376191,3898066,3898026,0.0441567567567568,0.0441567567567568},
-{3376192,3898066,3896599,1000000,1000000},
-{3376193,3866260,3866241,0.143688888888889,0.143688888888889},
-{3376197,3869088,3868890,1000000,1000000},
-{3376198,3868890,3868425,1000000,0.153578571428571},
-{3376199,3869530,3868891,0.135939130434783,0.164557894736842},
-{3376200,3868891,3867887,0.166768421052632,0.182803846153846},
-{3376201,3868890,3868891,0.0242647058823529,1000000},
-{3376202,3867933,3867889,0.200155555555556,0.200155555555556},
-{3376203,3872370,3872890,0.14283,0.150347368421053},
-{3376204,3872890,3873693,0.276668571428571,0.261713513513514},
-{3376205,3872890,3872984,1000000,1000000},
-{3376206,3872984,3872943,1000000,1000000},
-{3376207,3872943,3872984,1000000,1000000},
-{3376209,3871455,3871368,0.319755555555556,0.319755555555556},
-{3376210,3871456,3871364,0.323088888888889,0.323088888888889},
-{3376213,3871740,3871727,0.0204818181818182,0.0200266666666667},
-{3376214,3871727,3871665,0.112112195121951,0.106897674418605},
-{3376215,3872279,3872248,0.2498,0.2498},
-{3376216,3871727,3872279,0.346714285714286,0.346714285714286},
-{3376217,3872282,3872279,1000000,1000000},
-{3376218,3874768,3872374,0.647615384615385,0.935444444444444},
-{3376219,3872374,3871913,0.322753846153846,0.14985},
-{3376220,3872282,3872374,1000000,1000000},
-{3376922,3885372,3885510,0.0456,1000000},
-{3376923,3885510,3885638,0.041553488372093,1000000},
-{3376939,3892441,3892551,0.028896,1000000},
-{3376941,3892441,3892448,1000000,1000000},
-{3376942,3892448,3892480,1000000,1000000},
-{3376943,3892551,3892448,1000000,1000000},
-{3376945,3892432,3892547,1000000,0.0460645161290323},
-{3376960,3896146,3896247,0.0282533333333333,1000000},
-{3376961,3896307,3896368,1000000,0.016524},
-{3376962,3896368,3896533,1000000,0.0355058823529412},
-{3376963,3896247,3896624,0.0927061224489796,1000000},
-{3376964,3896624,3897150,0.126588235294118,1000000},
-{3377003,3899016,3899368,0.110897142857143,1000000},
-{3377004,3899368,3899457,0.0306352941176471,1000000},
-{3377005,3899816,3899728,0.113,1000000},
-{3377006,3899728,3899707,0.0487609756097561,1000000},
-{3377009,3898464,3898074,0.128364,1000000},
-{3377010,3898074,3897856,0.0653035714285714,1000000},
-{3377011,3897312,3896632,0.245811111111111,1000000},
-{3377012,3896632,3896441,0.0747063829787234,1000000},
-{3378858,3893382,3893386,1000000,0.09138},
-{3378859,3890028,3890371,1000000,0.134825806451613},
-{3378860,3890371,3890457,1000000,0.03506},
-{3378881,3885589,3885784,1000000,0.17738},
-{3378882,3885462,3885523,1000000,0.0639555555555556},
-{3378883,3885523,3885544,1000000,0.0224785714285714},
-{3378884,3885462,3885547,0.0434769230769231,1000000},
-{3378885,3885523,3885547,0.0739384615384615,1000000},
-{3378886,3885143,3885174,0.2598,0.2598},
-{3378887,3883642,3883505,0.1289,0.096675},
-{3378888,3883505,3883478,0.0146347826086957,0.02244},
-{3378889,3882411,3882914,0.223025,0.205869230769231},
-{3378890,3882914,3882990,0.034536,0.034536},
-{3378891,3882914,3882892,0.0392181818181818,0.0392181818181818},
-{3378892,3882892,3882928,1000000,0.0459777777777778},
-{3378893,3881894,3881908,0.0423428571428571,0.0342},
-{3378894,3881908,3882012,0.0466666666666667,1000000},
-{3378895,3882928,3882370,1000000,0.662688888888889},
-{3378896,3882228,3882012,1000000,0.317466666666667},
-{3378897,3882172,3881908,0.258214285714286,0.309857142857143},
-{3378898,3882228,3882172,0.0725333333333333,1000000},
-{3378899,3882231,3882172,0.0536918918918919,0.0484536585365854},
-{3378900,3882231,3882858,1000000,0.215505882352941},
-{3378901,3882892,3882267,0.438026666666667,0.4584},
-{3378902,3882267,3882231,0.02095,0.0271783783783784},
-{3378903,3882370,3882267,1000000,0.0542888888888889},
-{3378904,3883505,3883405,0.568107692307692,0.568107692307692},
-{3378905,3883405,3883327,0.31501875,0.31501875},
-{3378906,3883405,3883542,0.05094375,0.05094375},
-{3378907,3885997,3885998,1000000,0.0388909090909091},
-{3378908,3885784,3885997,1000000,0.0483625},
-{3378909,3885784,3885996,1000000,0.125133333333333},
-{3378910,3885990,3885996,0.0504,0.0425793103448276},
-{3378911,3885996,3885997,1000000,0.0811368421052632},
-{3378912,3885989,3886012,0.059925,1000000},
-{3378913,3886012,3885998,0.0945183673469388,1000000},
-{3378914,3885547,3885802,0.0998068965517241,1000000},
-{3378915,3885802,3885989,0.04935,1000000},
-{3378916,3886012,3885802,1000000,0.1513},
-{3378917,3883327,3882914,0.652168421052632,0.652168421052632},
-{3378920,3909163,3909654,0.207270967741935,0.178483333333333},
-{3378921,3909654,3909669,0.0172875,0.011064},
-{3378922,3893382,3894155,2.19252,1000000},
-{3378923,3894835,3894837,1000000,1000000},
-{3378924,3894837,3894853,1000000,1000000},
-{3378925,3894837,3894722,1000000,1000000},
-{3378926,3894722,3894155,1000000,1000000},
-{3379727,3871954,3871794,0.0944769230769231,1000000},
-{3379728,3871794,3871741,0.5229375,1000000},
-{3379729,3871627,3871830,0.1822,0.1822},
-{3379730,3871830,3872002,0.0994714285714286,0.0994714285714286},
-{3379731,3871794,3871830,0.310666666666667,0.310666666666667},
-{3379738,3867394,3867495,0.046296,0.0723375},
-{3379739,3867495,3868865,0.66912,0.514707692307692},
-{3379740,3868865,3867495,1.44702,1.44702},
-{3379741,3868865,3869046,0.0710444444444444,0.0710444444444444},
-{3379742,3869046,3869685,1000000,1000000},
-{3379743,3872568,3872423,1000000,1000000},
-{3379744,3872423,3872317,0.0728222222222222,0.0728222222222222},
-{3379807,3877034,3877027,0.0290129032258064,0.035976},
-{3379808,3877027,3877314,0.154006451612903,0.140417647058824},
-{3379809,3877321,3877027,0.1468,1000000},
-{3379810,3877411,3877034,1000000,0.626873684210526},
-{3379811,3877542,3877928,0.305769230769231,0.305769230769231},
-{3379812,3877928,3877930,1000000,0.185614285714286},
-{3379813,3867230,3867077,0.0547935483870968,0.0471833333333333},
-{3379814,3867077,3866503,0.279057142857143,0.18313125},
-{3379815,3866847,3866190,0.228911111111111,0.228911111111111},
-{3379816,3866190,3866117,1000000,1000000},
-{3379817,3867077,3866190,1000000,1000000},
-{3379820,3875313,3875207,0.116025,1000000},
-{3379821,3875207,3875138,0.03888,1000000},
-{3379827,3871210,3871158,1000000,0.0186909090909091},
-{3379828,3871158,3870404,1000000,0.252317647058824},
-{3379944,3880499,3880448,0.0219529411764706,1000000},
-{3379945,3880448,3880075,0.173770588235294,1000000},
-{3379946,3880441,3880448,0.06308,1000000},
-{3379947,3880441,3880367,1000000,0.0661714285714286},
-{3379948,3859890,3858867,1000000,0.141557647058824},
-{3379949,3859838,3858835,0.150744303797468,1000000},
-{3380089,3862109,3862160,0.0230117647058823,1000000},
-{3380090,3862160,3862205,0.0197189189189189,1000000},
-{3380091,3862160,3862222,0.0376909090909091,1000000},
-{3380103,3880570,3880505,1000000,0.05584},
-{3380104,3880505,3880367,1000000,0.06538125},
-{3380126,3874694,3874974,0.205552941176471,1000000},
-{3380127,3874974,3874948,0.03476,1000000},
-{3380152,3892527,3892734,1000000,1000000},
-{3380155,3894853,3894858,1000000,1000000},
-{3380156,3894858,3892734,1000000,1000000},
-{3380157,3892734,3894858,1000000,1000000},
-{3380210,3859603,3859512,0.10985,1000000},
-{3380211,3859512,3859567,0.08956,1000000},
-{3380212,3878993,3879040,1000000,0.0193448275862069},
-{3380213,3879040,3878990,0.0716,1000000},
-{3380214,3879011,3878990,1000000,0.0556846153846154},
-{3380215,3878990,3878993,1000000,0.0234},
-{3380364,3886564,3886540,0.141888888888889,0.141888888888889},
-{3380365,3886540,3886532,1000000,1000000},
-{3380366,3886532,3886514,1000000,1000000},
-{3380367,3886514,3886461,0.260955555555556,0.260955555555556},
-{3380368,3886953,3886913,0.322833333333333,1000000},
-{3380369,3886913,3886907,0.0474,0.0474},
-{3380370,3885874,3885848,1000000,1000000},
-{3380371,3885848,3885813,1000000,1000000},
-{3380642,3896767,3896714,0.02188,1000000},
-{3380643,3896714,3895978,0.429991304347826,1000000},
-{3380644,3896735,3896714,1000000,0.030375},
-{3380645,3897119,3896784,1000000,0.109786363636364},
-{3380646,3896784,3896735,1000000,0.0206133333333333},
-{3380719,3860319,3860729,0.22158,0.265896},
-{3380720,3860729,3860759,0.0144774193548387,0.0166222222222222},
-{3380721,3860993,3860729,0.249352941176471,0.249352941176471},
-{3380747,3922392,3922585,0.0669954545454546,0.0627191489361702},
-{3380748,3922585,3922631,0.0107466666666667,0.010075},
-{3380749,3922585,3923081,0.403622222222222,0.403622222222222},
-{3380750,3914022,3915509,0.394317391304348,1000000},
-{3380751,3915531,3915540,1000000,1000000},
-{3380752,3915540,3915671,1000000,1000000},
-{3380755,3889345,3889325,0.00764081632653061,0.00734117647058823},
-{3380756,3889325,3889273,0.017265306122449,0.0165882352941176},
-{3380757,3889462,3889408,0.0652434782608696,1000000},
-{3380758,3889408,3889389,0.0594,1000000},
-{3380759,3889241,3889408,0.051219512195122,1000000},
-{3380760,3889531,3889447,1000000,0.0400578947368421},
-{3380761,3889447,3889462,1000000,0.0190838709677419},
-{3380762,3889408,3889447,0.011565,1000000},
-{3380764,3900113,3899630,0.254577777777778,0.254577777777778},
-{3380765,3868048,3868923,0.350712,0.350712},
-{3380766,3868923,3868972,0.0264,0.0264},
-{3380767,3868923,3867751,0.469577777777778,0.469577777777778},
-{3380768,3890491,3890412,1000000,0.0408},
-{3380776,3889751,3889931,0.0560368421052632,1000000},
-{3380777,3889931,3889979,0.0154864864864865,1000000},
-{3380778,3890028,3889931,1000000,0.0440297872340426},
-{3380779,3890028,3889901,0.0402765957446809,1000000},
-{3380780,3889901,3889885,0.0417375,1000000},
-{3380781,3889885,3889831,1000000,0.035775},
-{3380782,3889901,3889831,0.0226363636363636,1000000},
-{3380783,3889831,3889696,0.0273214285714286,1000000},
-{3380784,3889241,3889318,0.0244540540540541,1000000},
-{3380785,3889318,3889389,0.0199846153846154,1000000},
-{3380786,3889370,3889394,0.0375,1000000},
-{3380787,3889394,3889438,0.0218625,1000000},
-{3380789,3889885,3890235,0.149505882352941,1000000},
-{3380790,3890235,3890412,0.0891272727272727,1000000},
-{3380791,3889831,3889447,1000000,0.0960576923076923},
-{3380820,3889318,3889394,0.04100625,1000000},
-{3380890,3877504,3877448,1000000,1000000},
-{3380891,3877448,3877372,1000000,1000000},
-{3381934,3916494,3916776,0.168936,0.248435294117647},
-{3381935,3916776,3917264,0.300888888888889,0.300888888888889},
-{3381936,3916776,3916723,0.09156,0.09156},
-{3381937,3916723,3916651,0.65148,0.65148},
-{3381938,3916651,3916723,0.11604,0.11604},
-{3381939,3915049,3914976,0.73944,0.73944},
-{3381940,3915049,3914976,0.11556,0.11556},
-{3381941,3914772,3914861,0.16176,0.16176},
-{3381942,3914861,3915049,0.3324,0.3324},
-{3381943,3914976,3914861,0.2109,0.2109},
-{3381986,3867048,3866744,0.1746,0.184870588235294},
-{3381987,3867048,3867076,0.0202,0.0178235294117647},
-{3381992,3866007,3866506,0.342955555555556,0.342955555555556},
-{3381993,3865944,3865883,0.0783333333333333,0.0783333333333333},
-{3381996,3893379,3893682,0.2368,0.2368},
-{3382287,3885459,3885764,0.284025,1000000},
-{3382288,3885764,3886025,0.201469565217391,1000000},
-{3382289,3885764,3886320,0.234422222222222,0.234422222222222},
-{3382632,3915852,3916061,0.0830444444444444,0.0773172413793103},
-{3382633,3916061,3916742,0.246545454545455,0.246545454545455},
-{3382634,3916061,3916039,0.22938,0.22938},
-{3382635,3915509,3915787,0.154857142857143,0.191294117647059},
-{3382636,3915787,3915852,0.035472,0.0316714285714286},
-{3382637,3915787,3915767,0.20748,0.20748},
-{3382640,3917578,3917542,1000000,0.07287},
-{3382643,3917542,3917515,1000000,0.015925},
-{3382644,3917515,3917467,0.02134,0.0278347826086957},
-{3382645,3917716,3918389,1000000,0.29672},
-{3382646,3917716,3917661,0.0626608695652174,1000000},
-{3382647,3917661,3917655,0.0380068965517241,1000000},
-{3382648,3917661,3917578,0.0466571428571428,1000000},
-{3382652,3917708,3917791,0.0516166666666667,0.046455},
-{3382653,3917791,3917912,0.0557860465116279,0.0533066666666667},
-{3382654,3917791,3917626,0.103071428571429,1000000},
-{3382655,3917515,3917572,0.0366,0.0261428571428571},
-{3382656,3917572,3917655,0.0463428571428571,0.0360444444444444},
-{3382657,3917626,3917572,0.0340285714285714,1000000},
-{3382719,3876683,3876499,1000000,1000000},
-{3382720,3876499,3876222,0.225133333333333,0.225133333333333},
-{3382726,3876730,3876716,1000000,1000000},
-{3382727,3876716,3876683,1000000,1000000},
-{3382764,3897729,3897616,0.0794210526315789,0.0794210526315789},
-{3382765,3897616,3897617,1000000,0.213507692307692},
-{3382947,3903113,3902939,1000000,0.0490434782608696},
-{3382948,3902939,3902749,1000000,0.0464347826086957},
-{3383000,3903860,3903936,0.052416,1000000},
-{3383001,3903936,3903852,0.03496,1000000},
-{3383002,3903852,3903860,0.0388444444444444,1000000},
-{3383506,3886935,3886961,0.0113529411764706,1000000},
-{3383507,3886961,3887189,0.078536170212766,1000000},
-{3383624,3882872,3883053,0.253578947368421,1000000},
-{3383625,3883053,3883360,0.342,1000000},
-{3383626,3883053,3883136,0.10092,0.10092},
-{3383627,3882157,3882579,1000000,0.251634782608696},
-{3383628,3882579,3882872,1000000,0.163434782608696},
-{3383629,3882579,3882567,0.02394,0.02394},
-{3383634,3881518,3881808,1000000,1000000},
-{3383635,3881808,3881952,1000000,1000000},
-{3383639,3885792,3885891,0.0350647058823529,0.0340628571428571},
-{3383640,3885891,3886048,0.0560117647058823,0.0577090909090909},
-{3383641,3885891,3885912,0.02676,0.02676},
-{3383644,3884263,3884197,0.09948,0.09948},
-{3383645,3862469,3862586,0.0454444444444444,0.0454444444444444},
-{3383646,3862586,3863042,0.2082,0.2082},
-{3383647,3862586,3862571,0.55806,0.55806},
-{3383695,3883635,3883092,0.65985,1000000},
-{3383696,3883092,3883021,0.0680842105263158,1000000},
-{3383697,3883092,3883045,0.06156,0.06156},
-{3383714,3886157,3885870,1000000,0.35765},
-{3383715,3885870,3885412,1000000,0.302664},
-{3383716,3885870,3885906,0.0459,0.0459},
-{3383722,3881359,3880811,0.5288625,1000000},
-{3383723,3880811,3880530,0.3177375,1000000},
-{3383725,3880811,3880822,0.03192,0.03192},
-{3383770,3884381,3883818,0.359712,1000000},
-{3383771,3883818,3883587,0.199231578947368,1000000},
-{3383772,3883818,3883854,0.04854,0.04854},
-{3383782,3887606,3887534,1000000,0.207235714285714},
-{3383783,3887534,3887433,1000000,0.121938461538462},
-{3383784,3887534,3887495,0.02592,0.02592},
-{3383823,3882400,3882441,0.0196,0.0196},
-{3383824,3882441,3882572,0.14238,0.109523076923077},
-{3383825,3882441,3882439,0.02112,0.02112},
-{3383850,3880971,3881100,1000000,0.166133333333333},
-{3383851,3881100,3881234,1000000,0.306525},
-{3383852,3881100,3881153,0.0531,0.0531},
-{3383870,3885748,3885845,0.13737,1000000},
-{3383871,3885845,3886077,0.233352,1000000},
-{3383883,3881224,3881261,0.04206,0.04206},
-{3383962,3866320,3866065,1000000,0.257592857142857},
-{3383963,3866065,3866000,1000000,0.100663636363636},
-{3383964,3866065,3866156,0.0972,0.0972},
-{3384018,3878091,3877974,0.407775,1000000},
-{3384019,3877974,3877918,0.159410526315789,1000000},
-{3384020,3877974,3878007,0.03612,0.03612},
-{3384036,3877739,3877687,0.1491,0.1677375},
-{3384037,3877687,3877672,0.0772857142857143,0.08115},
-{3384041,3877687,3877827,0.13122,0.13122},
-{3384057,3877367,3877235,0.053295652173913,1000000},
-{3384058,3877235,3877136,0.046368,1000000},
-{3384059,3877235,3877222,0.09618,0.09618},
-{3384084,3866385,3866104,0.16794,0.3732},
-{3384085,3866104,3866138,0.03462,0.03462},
-{3384101,3866104,3865996,0.07602,0.0724},
-{3384102,3865996,3865626,0.3216,0.303733333333333},
-{3384104,3865996,3865963,0.05316,0.05316},
-{3384149,3878488,3878490,0.02394,0.02394},
-{3384214,3881830,3882053,0.197147368421053,1000000},
-{3384215,3882053,3882201,0.126514285714286,1000000},
-{3384216,3882053,3882035,0.04182,0.04182},
-{3384219,3879092,3879575,0.336054545454545,1000000},
-{3384220,3879575,3879875,0.301010526315789,1000000},
-{3384224,3879575,3879590,0.03144,0.03144},
-{3384225,3879225,3879667,1000000,0.380778947368421},
-{3384226,3879667,3880056,1000000,0.36951},
-{3384227,3879667,3879655,0.02964,0.02964},
-{3384228,3880893,3881019,0.112605882352941,1000000},
-{3384229,3881019,3881175,0.134183333333333,1000000},
-{3384234,3876891,3877098,0.282105882352941,1000000},
-{3384235,3877098,3877376,0.355433333333333,1000000},
-{3384236,3877098,3877056,0.04818,0.04818},
-{3384237,3879577,3879620,1000000,0.0603391304347826},
-{3384238,3879620,3879844,1000000,0.28515},
-{3384239,3879620,3879645,0.03396,0.03396},
-{3384273,3878484,3878597,0.1524,0.1524},
-{3384274,3878597,3878674,0.0866526315789474,0.0866526315789474},
-{3384275,3878597,3878539,0.0855,0.0855},
-{3384276,3887025,3886752,0.223747826086957,1000000},
-{3384277,3886752,3886197,1.57990909090909,1000000},
-{3384278,3886752,3886785,0.06174,0.06174},
-{3384679,3879381,3884090,2.76844444444444,2.76844444444444},
-{3384680,3884090,3885699,1.8728,1.77423157894737},
-{3384681,3884090,3882131,0.844266666666667,0.844266666666667},
-{3384682,3886082,3885937,0.43743,0.448646153846154},
-{3384683,3885937,3885597,0.271846153846154,0.1767},
-{3384684,3885937,3885326,0.51841935483871,0.51841935483871},
-{3384685,3885326,3884873,0.656742857142857,0.417927272727273},
-{3384686,3885623,3885834,0.911408219178082,0.924066666666667},
-{3384687,3885597,3885618,0.112097142857143,0.124552380952381},
-{3384688,3885618,3885623,0.0374083333333333,0.0396088235294118},
-{3384689,3885963,3885452,4.49804444444444,4.49804444444444},
-{3384690,3883434,3882191,0.494555555555556,0.494555555555556},
-{3384691,3884032,3883434,0.385822222222222,0.385822222222222},
-{3384692,3884032,3884022,0.148133333333333,0.148133333333333},
-{3384693,3883434,3884022,0.234911111111111,0.234911111111111},
-{3384694,3884022,3884462,0.174111111111111,0.174111111111111},
-{3384695,3884873,3884757,0.0451333333333333,0.0451333333333333},
-{3384696,3884757,3884032,0.288933333333333,0.288933333333333},
-{3384697,3884757,3884462,0.200844444444444,0.200844444444444},
-{3384698,3884462,3884457,0.136511111111111,0.136511111111111},
-{3384699,3884457,3884435,0.288577777777778,0.288577777777778},
-{3384700,3884873,3884457,0.454866666666667,0.454866666666667},
-{3384701,3873927,3875356,0.89022,0.847828571428571},
-{3384702,3872757,3874717,1.59723333333333,1.59723333333333},
-{3384703,3874717,3875597,0.804388235294118,0.719715789473684},
-{3384704,3874717,3875356,1.17264,1.17264},
-{3384708,3881335,3881657,0.209054545454545,0.209054545454545},
-{3384709,3880648,3880436,0.244836363636364,0.244836363636364},
-{3384716,3879254,3879629,0.345557142857143,0.537533333333333},
-{3384717,3879629,3880606,0.69003,0.69003},
-{3384729,3878732,3881031,1.55582727272727,1.55582727272727},
-{3384730,3882314,3882516,0.186,0.144},
-{3384731,3880421,3882096,1.52110434782609,1.399416},
-{3384732,3882096,3882314,0.202695652173913,0.1665},
-{3384733,3884632,3882681,0.955711111111111,0.955711111111111},
-{3384734,3882681,3882096,0.320755555555556,0.320755555555556},
-{3384735,3878792,3878911,0.0419076923076923,0.0380093023255814},
-{3384736,3878911,3879254,0.18999,0.135707142857143},
-{3384737,3877193,3877585,0.59517,0.59517},
-{3384738,3877547,3877858,0.0615396226415094,0.0639529411764706},
-{3384739,3877858,3878422,0.119083018867925,0.119083018867925},
-{3384740,3876779,3877109,0.109145454545455,0.163718181818182},
-{3384741,3877109,3877338,0.0543702127659575,0.0594279069767442},
-{3384742,3876400,3876578,0.08305,0.0866608695652174},
-{3384743,3876578,3876849,0.19432,0.19432},
-{3384744,3876578,3877547,1.14084444444444,1.14084444444444},
-{3384745,3876713,3876612,0.0293347826086956,0.0499777777777778},
-{3384746,3876612,3876449,0.044832,0.0862153846153846},
-{3384747,3875356,3875803,0.208275,0.238028571428571},
-{3384748,3875803,3876171,0.2112,0.22176},
-{3384749,3875803,3876612,1.54137,1.54137},
-{3384750,3917126,3917442,0.126041860465116,0.129042857142857},
-{3384751,3917805,3917728,0.0508444444444444,0.0508444444444444},
-{3384752,3917442,3917600,0.109822222222222,0.109822222222222},
-{3384753,3917600,3917805,0.5176,0.5176},
-{3384754,3917805,3917600,0.114911111111111,0.114911111111111},
-{3384755,3917442,3917861,0.125571428571429,0.1281875},
-{3384756,3917861,3918181,0.201933333333333,0.201933333333333},
-{3384757,3918181,3918581,0.239688888888889,0.239688888888889},
-{3384758,3918181,3918451,0.1422,0.1422},
-{3384759,3917861,3918215,0.105091304347826,0.109868181818182},
-{3384760,3918215,3919211,0.309097959183673,0.32925652173913},
-{3384761,3916961,3917301,0.09465,0.0911444444444444},
-{3384762,3917301,3918837,0.389307692307692,0.374888888888889},
-{3384763,3917301,3917721,0.602957142857143,0.29108275862069},
-{3384764,3917721,3918215,0.380742857142857,0.4442},
-{3384765,3917721,3917280,0.263977777777778,0.263977777777778},
-{3384766,3883264,3883083,0.205885714285714,1000000},
-{3384767,3883083,3882744,0.351692307692308,1000000},
-{3384768,3875066,3875016,0.18168679245283,1000000},
-{3384769,3875125,3875087,1000000,0.172413559322034},
-{3384771,3893054,3893585,0.419115789473684,1000000},
-{3384772,3893585,3893623,0.0915176470588235,1000000},
-{3384773,3893585,3893584,0.03066,0.03066},
-{3384774,3866942,3866812,0.158446153846154,0.121164705882353},
-{3384775,3866812,3866479,0.190333333333333,0.190333333333333},
-{3384776,3866812,3866722,0.11886,0.11886},
-{3384777,3880302,3880098,1000000,0.261952941176471},
-{3384778,3880098,3879946,1000000,0.1944},
-{3384779,3880098,3880053,0.10368,0.10368},
-{3384780,3880896,3880745,1000000,0.146894117647059},
-{3384781,3880745,3880394,1000000,0.33327},
-{3384782,3880745,3880799,0.11346,0.11346},
-{3384783,3883348,3883551,0.114626086956522,1000000},
-{3384784,3883551,3883672,0.0750285714285714,1000000},
-{3384785,3883551,3883598,0.06822,0.06822},
-{3384803,3882332,3882410,1000000,0.232695652173913},
-{3384804,3882410,3882502,1000000,0.171022222222222},
-{3384805,3882410,3882462,0.06036,0.06036},
-{3384816,3876692,3876968,0.118133333333333,0.118133333333333},
-{3384817,3876968,3877285,0.146511111111111,0.146511111111111},
-{3384818,3876968,3876908,0.14796,0.14796},
-{3384819,3877129,3877014,0.2112,0.2112},
-{3384824,3892551,3892936,0.0764,1000000},
-{3384825,3892936,3893382,0.120741176470588,1000000},
-{3384826,3892936,3892933,0.05484,0.05484},
-{3384827,3892547,3892916,1000000,0.124412903225806},
-{3384828,3892916,3893188,1000000,0.0814186046511628},
-{3384829,3879793,3880105,0.229304347826087,1000000},
-{3384830,3880105,3880208,0.0629217391304348,1000000},
-{3384831,3880105,3880113,0.03606,0.03606},
-{3384875,3880954,3881156,1000000,1000000},
-{3384876,3885845,3885901,0.05916,0.05916},
-{3384877,3884097,3883841,1000000,0.184609090909091},
-{3384878,3883841,3883348,1000000,0.26868},
-{3384879,3883841,3883787,0.10002,0.10002},
-{3384880,3865342,3865361,1000000,0.0195375},
-{3384881,3865361,3865415,1000000,0.100327659574468},
-{3384882,3884490,3884263,0.192566666666667,1000000},
-{3384883,3884263,3883632,0.448581818181818,1000000},
-{3385099,3899382,3898642,1000000,0.338225806451613},
-{3385128,3902296,3903551,0.948666666666667,0.948666666666667},
-{3385129,3902690,3903717,1.28935555555556,1.28935555555556},
-{3385171,3896599,3896408,0.0935555555555555,0.0935555555555555},
-{3385181,3896408,3895184,1.30435714285714,1.30435714285714},
-{3385182,3895184,3896408,0.887836363636364,0.887836363636364},
-{3385183,3895184,3894317,0.539427272727273,0.6246},
-{3385184,3894317,3894326,0.4196625,1000000},
-{3385214,3910260,3912177,1.33218,1.33218},
-{3385215,3913000,3913081,0.0100153846153846,0.00986363636363636},
-{3385216,3913081,3913101,0.00337846153846154,0.00327761194029851},
-{3385217,3912177,3913081,0.58674,0.58674},
-{3385227,3917508,3916042,1.21371,1.21371},
-{3385228,3916042,3913656,1.96335,1.96335},
-{3385229,3916042,3918013,1.74981,1.74981},
-{3385230,3900721,3900737,1000000,1000000},
-{3385231,3900737,3900781,1000000,1000000},
-{3385258,3903131,3904259,0.546936,0.581846808510638},
-{3385259,3904259,3904281,0.0156576923076923,0.0156576923076923},
-{3385265,3904259,3906310,0.9856,0.9856},
-{3385287,3913283,3912723,0.30957,0.30957},
-{3385307,3909516,3909819,0.103442553191489,0.105691304347826},
-{3385308,3909819,3909982,0.0470571428571429,0.0480375},
-{3385309,3909516,3909819,1000000,1000000},
-{3385336,3910666,3910308,0.19962,0.19962},
-{3385337,3909574,3909982,0.26463,0.26463},
-{3385338,3910308,3909780,0.29271,0.29271},
-{3385339,3909780,3909574,0.21417,0.21417},
-{3385340,3908880,3909780,0.59457,0.59457},
-{3385341,3908761,3909648,0.80847,0.80847},
-{3385342,3908880,3908761,0.19374,0.19374},
-{3385343,3909574,3908623,0.60459,0.60459},
-{3385344,3908623,3908880,0.21447,0.21447},
-{3385345,3907293,3908373,0.91914,0.91914},
-{3385346,3908373,3908761,0.31158,0.31158},
-{3385347,3908623,3908373,0.13233,0.13233},
-{3385395,3920048,3920554,0.246545454545455,0.246545454545455},
-{3385419,3921005,3920376,0.309781818181818,0.309781818181818},
-{3385425,3920704,3921230,0.90912,1000000},
-{3385440,3907986,3910043,0.892133333333333,0.892133333333333},
-{3385550,3894018,3893992,0.15168,0.15168},
-{3385552,3890905,3890967,0.02706,0.0287872340425532},
-{3385553,3890967,3891124,0.0684352941176471,0.0811674418604651},
-{3385556,3890967,3891080,0.113228571428571,0.10568},
-{3385557,3891080,3891108,0.0222857142857143,0.024},
-{3385560,3891080,3891430,0.2314,0.2314},
-{3385561,3891108,3892007,0.520914285714286,0.497236363636364},
-{3385562,3892007,3892723,0.269309090909091,0.269309090909091},
-{3385563,3891430,3892007,0.347290909090909,0.347290909090909},
-{3385564,3891714,3891726,0.04422,0.04422},
-{3385565,3891726,3892503,1.33938,1.33938},
-{3385566,3892327,3892493,1000000,0.0416555555555556},
-{3385567,3892493,3892862,1000000,0.086256},
-{3385568,3892503,3892493,0.02358,0.02358},
-{3385572,3892321,3892470,0.0447428571428571,1000000},
-{3385573,3892470,3892736,0.08028,1000000},
-{3385624,3897057,3897867,0.620180487804878,0.5297375},
-{3385626,3897867,3898059,0.115482352941176,0.140228571428571},
-{3385627,3898059,3899080,0.621109090909091,0.621109090909091},
-{3385628,3899080,3898059,1.49406,1.49406},
-{3385629,3897867,3897935,0.0513545454545455,0.047075},
-{3385630,3897935,3898228,0.226583333333333,0.214657894736842},
-{3385631,3897894,3897935,0.0237375,0.0172636363636364},
-{3385632,3897131,3897233,0.1692,0.1692},
-{3385633,3897233,3897853,0.371914285714286,0.371914285714286},
-{3385634,3897853,3897894,0.0428142857142857,0.0285428571428571},
-{3385635,3897233,3897853,2.12933333333333,2.12933333333333},
-{3385807,3879270,3879257,0.0126333333333333,1000000},
-{3385808,3879559,3879270,0.339461538461538,1000000},
-{3385809,3879618,3879559,0.0636375,1000000},
-{3385825,3870251,3870279,0.00865714285714286,1000000},
-{3385826,3870279,3871039,0.453,1000000},
-{3385827,3870604,3870279,1000000,1000000},
-{3385828,3870251,3870280,0.00625,0.00661764705882353},
-{3385829,3870280,3872701,0.64872,0.597505263157895},
-{3385830,3870251,3870050,1000000,1000000},
-{3385831,3870050,3869958,0.0423333333333333,0.0423333333333333},
-{3385836,3869668,3869715,0.130904347826087,0.15054},
-{3385837,3869715,3869732,0.0688702702702703,0.07963125},
-{3385838,3869786,3869715,0.0253111111111111,0.0253111111111111},
-{3385839,3871839,3871755,0.1182,0.185742857142857},
-{3385840,3870947,3870887,0.0712615384615385,0.0842181818181818},
-{3385841,3870345,3869791,0.120071428571429,0.0988823529411765},
-{3385842,3869791,3869530,0.0611837837837838,0.052646511627907},
-{3385843,3870947,3870717,0.0417622641509434,0.0425653846153846},
-{3385844,3870717,3870345,0.0684,0.0645283018867925},
-{3385845,3869791,3870717,0.353866666666667,1000000},
-{3385862,3893436,3892770,1000000,1000000},
-{3385863,3892770,3892510,1000000,1000000},
-{3385864,3892760,3892726,1000000,1000000},
-{3385865,3892770,3892760,1000000,1000000},
-{3388770,3881808,3881856,1000000,1000000},
-{3390039,3903451,3904299,0.42336,0.42336},
-{3390040,3904299,3904389,0.0609428571428571,0.0581727272727273},
-{3390042,3904039,3904855,0.500166666666667,0.500166666666667},
-{3390044,3904128,3904926,0.3342,0.3342},
-{3390055,3886931,3887183,0.0663681818181818,0.0663681818181818},
-{3390056,3887183,3887512,0.0826285714285714,0.0826285714285714},
-{3390057,3885441,3887228,0.543632432432432,0.718371428571429},
-{3390058,3887228,3887572,0.1182,0.11426},
-{3390059,3887183,3887228,0.8316,0.8316},
-{3390413,3890865,3891020,1000000,1000000},
-{3390414,3891020,3891208,1000000,1000000},
-{3390418,3891188,3891223,1000000,0.03171},
-{3390419,3891340,3891013,1000000,0.287357142857143},
-{3390420,3891013,3890964,1000000,0.0411529411764706},
-{3390421,3891223,3891013,0.5111,1000000},
-{3390422,3890776,3890922,0.06168,1000000},
-{3390423,3890922,3891127,0.104083333333333,1000000},
-{3390424,3890922,3890895,1000000,0.01825},
-{3390425,3891188,3891053,0.14,0.075},
-{3390426,3891053,3890964,0.0567692307692308,0.0508965517241379},
-{3390427,3890922,3891053,0.103984615384615,1000000},
-{3390428,3891188,3891253,0.167034782608696,1000000},
-{3390429,3891253,3891256,0.0089,1000000},
-{3390430,3891253,3891390,0.0797142857142857,1000000},
-{3390431,3891223,3891337,1000000,0.0998210526315789},
-{3390432,3891337,3891340,1000000,0.0279230769230769},
-{3390433,3891337,3891390,1000000,0.288410526315789},
-{3390434,3891190,3891227,0.0143657142857143,0.0162193548387097},
-{3390435,3891227,3891396,0.07685625,0.08198},
-{3390436,3891227,3891256,1000000,0.042875},
-{3390709,3888019,3887982,0.019695,0.019695},
-{3390712,3887982,3887947,0.0373894736842105,0.0373894736842105},
-{3390713,3888019,3887628,1000000,0.168507692307692},
-{3390714,3887628,3887184,1000000,0.197733333333333},
-{3390715,3887628,3887590,0.0424105263157895,0.0424105263157895},
-{3390716,3887947,3887554,0.122485714285714,1000000},
-{3390717,3887554,3887089,0.248590909090909,1000000},
-{3390718,3887554,3887590,0.0189473684210526,0.0189473684210526},
-{3390721,3889588,3888485,0.502155555555555,1000000},
-{3390722,3888485,3887947,0.185382857142857,1000000},
-{3390723,3888485,3888520,0.0231290322580645,0.0231290322580645},
-{3390726,3889688,3888835,1000000,0.5628},
-{3390727,3888835,3888019,1000000,0.330289655172414},
-{3390728,3888835,3888791,0.0318,0.0318},
-{3392886,3912552,3921535,1000000,1.65925813953488},
-{3393722,3855153,3854731,0.257777777777778,0.257777777777778},
-{3393724,3849985,3849595,0.180955555555556,0.180955555555556},
-{3393725,3851923,3852019,0.0412222222222222,0.0412222222222222},
-{3393726,3852637,3852733,0.139933333333333,0.134935714285714},
-{3393727,3852733,3852907,0.197133333333333,0.204715384615385},
-{3393728,3852215,3852657,0.29214,0.29214},
-{3393729,3852657,3852733,1000000,1000000},
-{3393732,3902267,3902324,0.0863142857142857,0.0863142857142857},
-{3393733,3902463,3902187,0.144533333333333,0.144533333333333},
-{3393734,3902187,3902267,0.0528222222222222,0.0528222222222222},
-{3393735,3902268,3902077,0.0964666666666667,0.0964666666666667},
-{3393736,3902077,3901927,0.0835555555555556,0.0835555555555556},
-{3393737,3902187,3902077,0.0472222222222222,0.0472222222222222},
-{3393738,3902297,3902268,0.0200888888888889,0.0200888888888889},
-{3393739,3902324,3902360,0.0323647058823529,0.0323647058823529},
-{3393740,3902360,3902610,0.138333333333333,0.138333333333333},
-{3393741,3902297,3902360,0.0431052631578947,0.0431052631578947},
-{3393742,3902705,3901980,0.304376470588235,1000000},
-{3393743,3901980,3901884,0.0308739130434783,1000000},
-{3393744,3901980,3902297,0.2812875,0.2812875},
-{3393745,3899094,3898953,0.111822222222222,0.111822222222222},
-{3393746,3863198,3863222,0.0956666666666667,0.0956666666666667},
-{3393747,3863222,3863075,0.0849111111111111,0.0849111111111111},
-{3393748,3866752,3866587,0.0861555555555556,0.0861555555555556},
-{3393749,3861492,3861300,0.0805764705882353,0.0805764705882353},
-{3393750,3861300,3860672,0.286692857142857,0.286692857142857},
-{3393751,3861300,3861177,0.1208,0.1208},
-{3393752,3867752,3867316,0.193777777777778,0.193777777777778},
-{3393761,3850612,3850850,1000000,1000000},
-{3393762,3850804,3850632,0.152244444444444,0.152244444444444},
-{3393763,3858569,3858108,0.210155555555556,0.210155555555556},
-{3393764,3858108,3857644,0.179511111111111,0.179511111111111},
-{3393765,3858108,3858118,1000000,1000000},
-{3393766,3858457,3858152,0.5643375,0.60196},
-{3393767,3858152,3857332,0.500752941176471,0.500752941176471},
-{3393768,3858118,3858152,1000000,1000000},
-{3393769,3884717,3884604,0.126333333333333,0.126333333333333},
-{3393770,3884717,3884686,0.2166,0.2166},
-{3393771,3884686,3884655,0.374178947368421,0.374178947368421},
-{3393772,3884686,3884593,0.260133333333333,0.260133333333333},
-{3393774,3868820,3868569,0.1623,0.1623},
-{3393775,3866469,3866513,0.430444444444444,0.430444444444444},
-{3393776,3866129,3865926,0.1002,0.0858857142857143},
-{3393777,3865926,3865495,0.189503225806452,0.178018181818182},
-{3393778,3866576,3866214,0.160844444444444,0.160844444444444},
-{3393779,3866214,3865926,0.151755555555556,0.151755555555556},
-{3393780,3866214,3865982,0.0912888888888889,0.0912888888888889},
-{3393792,3863716,3863168,0.405130434782609,0.405130434782609},
-{3393793,3863168,3863413,0.428025,0.428025},
-{3393794,3863168,3862800,0.231533333333333,0.231533333333333},
-{3393817,3860458,3859592,1000000,1000000},
-{3393880,3865724,3864734,0.275554285714286,0.292254545454545},
-{3393881,3864734,3863969,0.263254545454545,0.28958},
-{3393882,3864734,3864592,0.149533333333333,0.149533333333333},
-{3393883,3866304,3865832,0.244584,0.30573},
-{3393884,3865832,3865442,0.177921428571429,0.199272},
-{3393885,3865832,3865534,0.2186,0.2186},
-{3394326,3902609,3901896,1000000,0.461318181818182},
-{3394327,3901896,3901803,1000000,0.0318857142857143},
-{3394354,3867752,3867304,0.181977777777778,0.181977777777778},
-{3394355,3867304,3867213,0.0282222222222222,0.0282222222222222},
-{3394356,3867316,3867304,0.0235555555555556,0.0235555555555556},
-{3394359,3859674,3859769,1000000,1000000},
-{3394414,3850019,3850240,1000000,1000000},
-{3394461,3852134,3852014,1.06704444444444,1.06704444444444},
-{3394462,3852014,3851562,0.497644444444444,0.497644444444444},
-{3680770,3902763,3902758,9999.99,9999.99},
-{3680771,3902758,3902685,9999.99,9999.99},
-{3680772,3902438,3902551,9999.99,9999.99},
-{3680773,3902438,3902685,9999.99,9999.99},
-{3680774,3902551,3902763,9999.99,9999.99},
-{3680779,3847666,3847694,0.16503829787234,0.1616},
-{3680780,3847387,3847264,0.314172972972973,0.415157142857143},
-{3680781,3847391,3847387,0.06722,0.080664},
-{3680783,3848229,3848419,0.325992,0.25468125},
-{3680785,3848014,3848229,0.271057894736842,0.257505},
-{3680795,3848633,3848557,0.177247058823529,0.20088},
-{3680796,3848557,3848452,0.283533333333333,0.283533333333333},
-{3680839,3847265,3847618,0.55425,0.542938775510204},
-{3680840,3847418,3847308,0.234777777777778,0.234777777777778},
-{3680841,3847424,3847391,0.06946,0.10419},
-{3680843,3848419,3848550,0.228754838709677,0.23638},
-{3680915,3880187,3880474,0.226552941176471,0.160475},
-{3680916,3884380,3885609,0.770285714285714,0.64704},
-{3680932,3883686,3883888,0.09555,1000000},
-{3680933,3883888,3884380,0.231889655172414,0.268992},
-{3680941,3852966,3852289,0.14085306122449,0.1437875},
-{3680942,3854299,3854177,0.0373463414634146,0.0464},
-{3680943,3854466,3854299,0.0481772727272727,0.0623470588235294},
-{3680944,3861845,3860787,0.28284,0.328883720930233},
-{3680945,3862616,3862321,0.0633882352941176,0.0979636363636364},
-{3680946,3862791,3862616,0.0481625,0.07224375},
-{3680947,3867881,3868145,1000000,0.0581121951219512},
-{3680948,3868145,3868634,1000000,0.119692682926829},
-{3680949,3867298,3867881,1000000,0.153153846153846},
-{3680950,3866755,3866804,1000000,0.03504},
-{3680951,3863854,3863465,0.122138461538462,0.132316666666667},
-{3680953,3887895,3888068,0.104955555555556,0.0629733333333333},
-{3680954,3888068,3888231,0.0939724137931034,0.056775},
-{3680955,3888453,3888893,0.15428,1000000},
-{3680956,3891018,3891359,0.150418604651163,0.154},
-{3680957,3888231,3888294,0.02353125,0.0160212765957447},
-{3680958,3887747,3887895,0.078312,0.0444954545454545},
-{3680959,3879147,3879140,0.0657384615384615,0.08011875},
-{3680960,3879123,3879116,0.083125,0.0927906976744186},
-{3680961,3879116,3879110,0.136952941176471,0.139692},
-{3680962,3879110,3879099,0.138368181818182,0.121764},
-{3680963,3883691,3883587,0.0466181818181818,0.0496258064516129},
-{3680964,3882737,3882276,0.213496551724138,0.238130769230769},
-{3680965,3885903,3885343,0.24553125,0.291},
-{3680966,3879057,3879055,0.0528681818181818,0.0505695652173913},
-{3680967,3879055,3879049,0.103665,0.0942409090909091},
-{3680968,3879034,3879029,0.0314117647058824,0.0410769230769231},
-{3680969,3879029,3879018,0.17436,0.13621875},
-{3680970,3879160,3879157,0.1179375,0.0428863636363636},
-{3680971,3866108,3865550,0.162257142857143,0.162257142857143},
-{3680972,3869697,3869280,0.139292307692308,0.116825806451613},
-{3680973,3872982,3872931,0.0680454545454545,0.0650869565217391},
-{3680974,3872931,3872205,0.2826,0.295445454545455},
-{3680975,3865085,3864990,1000000,0.0296307692307692},
-{3680976,3865550,3865085,1000000,0.14205},
-{3680977,3857762,3858093,0.133130769230769,0.2163375},
-{3680978,3858588,3859151,0.1316875,0.123941176470588},
-{3680979,3849071,3849205,0.0803818181818182,0.0780176470588235},
-{3680980,3887733,3887209,0.134385714285714,0.125426666666667},
-{3680981,3886592,3886157,0.166535294117647,0.123091304347826},
-{3680982,3883510,3883205,0.07928,0.0964216216216216},
-{3680983,3882723,3882642,0.0186954545454545,0.0178826086956522},
-{3680984,3892042,3891993,0.02885,0.0314727272727273},
-{3680985,3888883,3888844,0.0096,0.00983414634146341},
-{3680986,3889462,3889167,0.0937297297297297,1000000},
-{3680987,3891993,3891390,0.3079,0.295584},
-{3680988,3886653,3886592,0.0192923076923077,0.01672},
-{3681004,3909556,3908794,0.116316923076923,0.118134375},
-{3681010,3861942,3861570,0.195822222222222,0.195822222222222},
-{3681011,3862327,3861942,0.132291891891892,0.135966666666667},
-{3681012,3862670,3862327,0.161725,0.138621428571429},
-{3681013,3863023,3862670,0.20016,0.238285714285714},
-{3681014,3863628,3863023,0.2755875,0.284477419354839},
-{3681015,3863871,3863628,0.104435294117647,0.104435294117647},
-{3681016,3867595,3866983,0.231072727272727,0.262944827586207},
-{3681017,3868074,3867595,0.17690625,0.1665},
-{3681018,3869272,3869035,0.112257142857143,0.138670588235294},
-{3681019,3869497,3869272,0.0948260869565217,0.121166666666667},
-{3681027,3859859,3859682,0.142422222222222,0.142422222222222},
-{3681028,3859682,3859459,1000000,1000000},
-{3681030,3882454,3882244,0.128175,0.08545},
-{3681031,3883650,3883498,0.0592666666666667,0.0889},
-{3681032,3885813,3885362,0.1566,0.119948936170213},
-{3681033,3886246,3885813,0.102268085106383,0.104491304347826},
-{3681034,3886461,3886246,0.0634163265306122,0.0817736842105263},
-{3681035,3887003,3886885,0.03594,0.0417906976744186},
-{3681036,3887336,3887003,0.0829836734693877,0.0945627906976744},
-{3681037,3887463,3887336,0.033375,0.0356},
-{3681038,3887879,3887463,0.0843795918367347,0.0898826086956522},
-{3681039,3891439,3891148,0.0699807692307692,0.0791086956521739},
-{3681040,3892245,3891804,0.118,0.124941176470588},
-{3681041,3907374,3906804,0.1587875,0.18589756097561},
-{3681042,3906177,3905744,0.113705454545455,0.117996226415094},
-{3681043,3905744,3905316,0.12262641509434,0.124984615384615},
-{3681044,3904460,3904024,0.1217,0.128858823529412},
-{3681045,3903589,3903160,0.137652,0.137652},
-{3681046,3899325,3898357,0.353157142857143,0.315587234042553},
-{3681047,3898357,3898018,0.105066666666667,0.135085714285714},
-{3681048,3898018,3897701,0.0927692307692308,0.104869565217391},
-{3681049,3897701,3897409,0.0944150943396227,0.0962307692307692},
-{3681050,3897409,3896653,0.246847058823529,0.246847058823529},
-{3681051,3896653,3896385,0.107553488372093,0.0984},
-{3681052,3895300,3895115,0.0805469387755102,0.078936},
-{3681053,3895115,3894740,0.1429125,0.15244},
-{3681054,3885097,3884978,0.0441333333333333,0.0350470588235294},
-{3681055,3892274,3892245,0.00611111111111111,0.00647058823529412},
-{3681057,3921208,3920935,0.103419512195122,0.124711764705882},
-{3681058,3921604,3921461,0.051,0.0483846153846154},
-{3681059,3921758,3921604,0.0682058823529412,0.0748064516129032},
-{3681071,3922129,3922794,0.551536363636364,0.551536363636364},
-{3681073,3909669,3909105,1000000,0.165072},
-{3681074,3911943,3911380,0.154988888888889,0.15791320754717},
-{3681075,3912172,3911943,0.0575510204081633,0.0552941176470588},
-{3681076,3913809,3913258,0.141242307692308,0.136011111111111},
-{3681077,3903208,3903084,0.0689172413793103,0.0740222222222222},
-{3681078,3903084,3903713,0.453457142857143,0.47613},
-{3681079,3903218,3903006,0.084465306122449,0.100946341463415},
-{3681080,3902016,3901463,0.298521428571429,0.298521428571429},
-{3681081,3901463,3901106,0.200088888888889,0.200088888888889},
-{3681092,3921055,3920868,0.0973235294117647,0.143869565217391},
-{3681096,3913258,3912172,0.250732075471698,0.250732075471698},
-{3681098,3918406,3918014,0.0812,0.08265},
-{3681099,3918014,3917078,0.215536842105263,0.227511111111111},
-{3681100,3908794,3907765,0.1520625,0.1520625},
-{3681101,3898713,3898589,0.0605538461538462,0.0562285714285714},
-{3681102,3896121,3895300,0.36999512195122,0.47405625},
-{3681103,3896385,3896121,0.162765517241379,0.121030769230769},
-{3681104,3900265,3899325,0.271766666666667,0.287752941176471},
-{3681105,3902229,3902201,0.0136137931034483,0.0116117647058824},
-{3681106,3906804,3906550,0.0663666666666667,0.071676},
-{3681107,3905610,3906761,0.233177419354839,0.225890625},
-{3681108,3896041,3895875,0.0326823529411765,0.0326823529411765},
-{3681109,3895875,3894802,0.252689552238806,0.252689552238806},
-{3681113,3852289,3849498,0.716321739130435,0.672465306122449},
-{3681118,3880971,3880920,0.01467,0.0158594594594595},
-{3681124,3907022,3907016,0.0244071428571429,1000000},
-{3681125,3864990,3864956,1000000,0.0149379310344828},
-{3681127,3864448,3863871,0.378555555555556,0.3407},
-{3681128,3865576,3864940,0.246634285714286,0.239783333333333},
-{3681129,3858568,3858469,0.0674065573770492,0.06853},
-{3681130,3864615,3864448,0.1641,0.156965217391304},
-{3681131,3864756,3864615,0.0826344827586207,0.0773032258064516},
-{3681132,3864940,3864756,0.107651612903226,0.1042875},
-{3681133,3860345,3859859,0.373863157894737,0.417847058823529},
-{3681134,3860748,3860659,0.175017391304348,0.161016},
-{3681135,3861013,3860944,0.0727102040816327,0.0828558139534884},
-{3681136,3861145,3861013,0.0889148936170213,0.0889148936170213},
-{3681137,3861323,3861145,0.11156170212766,0.11156170212766},
-{3681138,3861570,3861323,0.221811764705882,0.226248},
-{3681139,3873305,3873168,0.0484928571428571,0.04526},
-{3681140,3903277,3903208,0.0284,0.0300705882352941},
-{3681141,3896341,3896470,0.0264088235294118,0.0264088235294118},
-{3681142,3870128,3869497,0.312166666666667,0.3511875},
-{3681143,3869035,3868074,0.60995,0.60995},
-{3681144,3866983,3866602,0.127566666666667,0.148141935483871},
-{3681145,3866602,3866367,0.0752594594594595,0.0898258064516129},
-{3681146,3866367,3866285,0.03994,0.03744375},
-{3681147,3866285,3866207,0.130007142857143,0.134822222222222},
-{3681148,3866207,3865576,0.311057142857143,0.322577777777778},
-{3681149,3910416,3909669,1000000,0.1966875},
-{3681151,3848873,3849071,0.127890909090909,0.120582857142857},
-{3681152,3853150,3853817,0.179582608695652,0.165216},
-{3681153,3864964,3865000,0.02165,1000000},
-{3681158,3882361,3883159,0.447471428571429,1000000},
-{3681164,3872205,3871626,0.344863636363636,0.344863636363636},
-{3681165,3871626,3871124,0.3346125,0.297433333333333},
-{3681168,3865401,3865507,0.111805714285714,1000000},
-{3681169,3866915,3866421,1000000,1000000},
-{3681170,3867501,3867117,0.373714285714286,1000000},
-{3681171,3867117,3866915,1000000,1000000},
-{3681172,3866421,3866108,0.315975,0.3447},
-{3681180,3866307,3866420,0.0520838709677419,1000000},
-{3681181,3902284,3902016,0.0805959183673469,0.077435294117647},
-{3681182,3902771,3902529,0.0897063829787234,0.0826705882352941},
-{3681183,3903444,3903218,0.0935581395348837,0.0838125},
-{3681187,3879980,3880187,0.119929411764706,0.122328},
-{3681188,3886501,3886768,0.132553846153846,0.16155},
-{3681189,3886768,3887076,0.21312,0.155941463414634},
-{3681192,3920661,3921984,0.70074705882353,0.567271428571429},
-{3681193,3864587,3864611,0.01245,0.00905454545454545},
-{3681194,3868384,3868143,1000000,0.243422222222222},
-{3681195,3866862,3866941,1000000,0.0375473684210526},
-{3681196,3879096,3879090,0.0189521739130435,0.0202744186046512},
-{3681199,3866941,3867009,1000000,0.0302727272727273},
-{3681200,3867009,3867298,1000000,0.109176923076923},
-{3681201,3879135,3879123,0.0370133333333333,0.05205},
-{3681202,3880930,3881209,0.0983318181818182,1000000},
-{3681203,3879446,3879462,0.00622909090909091,0.00634444444444444},
-{3681204,3879462,3879472,0.00496363636363636,0.00505555555555556},
-{3681205,3889468,3889615,0.0808216216216216,1000000},
-{3681206,3889615,3889671,0.0205578947368421,1000000},
-{3681207,3889671,3889712,0.0180428571428571,1000000},
-{3681208,3889712,3889832,0.0462681818181818,1000000},
-{3681215,3854177,3854005,1000000,0.111428571428571},
-{3681216,3894740,3894669,0.0299142857142857,0.0292186046511628},
-{3681217,3894669,3894645,0.00810731707317073,0.00810731707317073},
-{3681218,3894645,3894473,0.0905636363636364,0.0853885714285714},
-{3681219,3918455,3917299,0.326826923076923,0.361595744680851},
-{3681220,3917299,3917183,0.0915882352941176,0.06228},
-{3681224,3848550,3848591,0.0726,0.06435},
-{3681225,3848591,3848653,0.08403,0.0800285714285714},
-{3681226,3848654,3848633,0.0588307692307692,0.0603789473684211},
-{3681227,3860763,3860748,0.0208216216216216,0.0202736842105263},
-{3681228,3887631,3887664,0.0113318181818182,0.0127846153846154},
-{3681229,3887664,3887747,0.0310604651162791,0.0290347826086957},
-{3681230,3888408,3888453,0.0161466666666667,1000000},
-{3681234,3918514,3918406,0.0253344827586207,0.0253344827586207},
-{3681235,3849621,3850093,0.27088,0.262141935483871},
-{3681236,3873390,3873305,0.0334222222222222,0.0265411764705882},
-{3681243,3907765,3907709,0.00918,0.00918},
-{3681261,3848653,3848705,0.0668487804878049,0.0702769230769231},
-{3681262,3848670,3848654,0.0174571428571429,0.0192947368421053},
-{3681263,3907016,3907057,0.05761875,1000000},
-{3681264,3907057,3907074,0.0155272727272727,1000000},
-{3681265,3901156,3901128,0.00956470588235294,0.0157354838709677},
-{3681266,3901128,3900265,0.285057692307692,0.361536585365854},
-{3681267,3901282,3901156,0.0345918367346939,0.0546774193548387},
-{3681270,3866420,3866482,0.0282473684210526,1000000},
-{3681271,3860944,3860884,0.032124,0.0365045454545455},
-{3681272,3860884,3860763,0.110133333333333,0.118},
-{3681273,3885255,3885097,0.0863714285714286,0.045345},
-{3681274,3884978,3884809,0.06631875,0.0757928571428571},
-{3681275,3884809,3884739,0.0225081081081081,0.02776},
-{3681307,3903160,3902464,0.276584615384615,0.220138775510204},
-{3681567,3920499,3920434,0.0244666666666667,0.0400363636363636},
-{3681568,3920602,3920499,0.057658064516129,0.0616344827586207},
-{3681576,3855414,3856182,0.18315652173913,0.18315652173913},
-{3681579,3921407,3921161,0.08564,0.08564},
-{3681581,3889641,3889462,0.0500235294117647,1000000},
-{3681582,3889912,3889861,0.0274137931034483,1000000},
-{3681583,3888844,3888804,0.00948571428571429,0.00971707317073171},
-{3681584,3888804,3888762,0.0101441860465116,0.0103857142857143},
-{3681592,3884739,3884399,0.124097142857143,0.127747058823529},
-{3681593,3884399,3884244,0.0607636363636364,0.0557},
-{3681604,3917183,3917137,0.0246107142857143,0.024178947368421},
-{3681609,3916925,3916896,0.00978,0.007824},
-{3681610,3916896,3916589,0.126946666666667,0.1190125},
-{3681611,3917549,3916952,0.247038461538462,0.285466666666667},
-{3681612,3916952,3916925,0.00722352941176471,0.00722352941176471},
-{3681613,3894473,3894418,0.0582,0.0353357142857143},
-{3681614,3894418,3894332,0.0604571428571429,0.0470222222222222},
-{3681615,3854827,3854870,0.03408,0.02272},
-{3681616,3855190,3855247,0.0238875,0.02548},
-{3681617,3858469,3858259,0.114790476190476,0.122572881355932},
-{3681618,3919667,3919354,0.110057142857143,1000000},
-{3681619,3909105,3908946,1000000,0.0541},
-{3681620,3908946,3908889,0.01876,0.0183521739130435},
-{3681621,3911380,3910878,0.136753846153846,0.131688888888889},
-{3681622,3910878,3910416,1000000,0.115292307692308},
-{3681623,3888294,3888320,0.0115609756097561,0.0100851063829787},
-{3681624,3888320,3888408,0.0524714285714286,1000000},
-{3681625,3889168,3889468,0.114954545454545,1000000},
-{3681626,3888893,3889126,0.0787404255319149,1000000},
-{3681627,3889126,3889168,0.018775,1000000},
-{3681634,3847694,3847693,0.0596125,0.0596125},
-{3681635,3847693,3847689,0.0490595744680851,0.0480375},
-{3681636,3847689,3847692,0.0929489361702128,0.0891551020408163},
-{3681637,3847692,3847538,0.195474418604651,0.182726086956522},
-{3681642,3866804,3866831,1000000,0.0158117647058824},
-{3681643,3866831,3866862,1000000,0.0166},
-{3681646,3920794,3920477,0.0671076923076923,0.06815625},
-{3681647,3920477,3918514,0.380838095238095,0.38698064516129},
-{3681648,3859169,3858974,0.121686206896552,0.126032142857143},
-{3681651,3870436,3870128,0.175313513513514,0.190782352941176},
-{3681652,3870938,3870556,0.214065,0.225331578947368},
-{3681653,3870556,3870436,0.0622,0.0706054054054054},
-{3681654,3898566,3898554,0.00754909090909091,0.00783396226415094},
-{3681655,3898589,3898575,0.00812307692307692,0.00782222222222222},
-{3681656,3898575,3898566,0.0073811320754717,0.00752307692307692},
-{3681660,3898554,3898336,0.106901694915254,0.114676363636364},
-{3681661,3898336,3897850,0.27478064516129,0.288752542372881},
-{3681665,3889832,3890032,0.0842297872340426,1000000},
-{3681666,3890032,3890351,0.152442857142857,1000000},
-{3681667,3891003,3891018,0.0124,0.0115733333333333},
-{3681668,3864611,3864732,0.08586,1000000},
-{3681669,3869127,3869189,0.01872,0.0111428571428571},
-{3681670,3869189,3869416,0.097,0.0554285714285714},
-{3681671,3883159,3883182,0.009168,1000000},
-{3681672,3883182,3883686,0.263884615384615,1000000},
-{3681673,3887209,3887097,0.0276418604651163,0.0276418604651163},
-{3681674,3887076,3887584,0.201424390243902,0.217326315789474},
-{3681675,3887584,3887631,0.01695,0.018645},
-{3681676,3892155,3892190,0.0166578947368421,0.0154390243902439},
-{3681677,3892190,3892442,0.135852631578947,0.12906},
-{3681678,3892124,3892155,0.0171891891891892,0.0151428571428571},
-{3681679,3870382,3869783,0.179787096774194,0.179787096774194},
-{3681680,3869783,3869697,0.0335217391304348,0.0275357142857143},
-{3681681,3864944,3864964,0.010392,1000000},
-{3681684,3894021,3893814,0.110022222222222,0.110022222222222},
-{3681693,3886205,3885903,0.151022222222222,0.127425},
-{3681694,3868634,3868786,1000000,0.0326368421052632},
-{3681695,3868786,3869127,1000000,0.0941675675675676},
-{3681696,3913851,3913809,0.00745555555555556,0.00732},
-{3681697,3920868,3919123,0.605153571428571,0.639407547169811},
-{3681698,3919123,3917549,0.490357894736842,0.5176},
-{3681711,3858070,3857756,0.17896,0.195229090909091},
-{3681712,3858974,3858686,0.136734375,0.138904761904762},
-{3681713,3858686,3858568,0.069752380952381,0.0708774193548387},
-{3681714,3858259,3858098,0.0834290322580645,0.0847967213114754},
-{3681715,3858098,3858070,0.0127451612903226,0.0129540983606557},
-{3681718,3860659,3860427,0.0940758620689655,0.109128},
-{3681719,3860427,3860345,0.0436378378378378,0.0461314285714286},
-{3681733,3917137,3916852,0.0969966101694915,0.104050909090909},
-{3681734,3852393,3852434,0.111097959183673,0.111097959183673},
-{3681735,3879165,3879162,0.0205846153846154,0.0151471698113208},
-{3681736,3879162,3879158,0.00901621621621622,0.00641538461538462},
-{3681737,3879158,3879160,0.1118,0.053664},
-{3681738,3847538,3847466,0.117642857142857,0.117642857142857},
-{3681739,3847466,3847424,0.0506461538461539,0.04938},
-{3681740,3893610,3893934,0.103174468085106,0.0989632653061224},
-{3681787,3866307,3866251,1000000,0.0295363636363636},
-{3681788,3866251,3866122,1000000,0.0525545454545455},
-{3681789,3864009,3863964,0.0170153846153846,0.0201090909090909},
-{3681790,3863964,3863854,0.032865,0.0386647058823529},
-{3681791,3863465,3862954,0.156533333333333,0.207176470588235},
-{3681792,3862954,3862830,0.030225,0.038178947368421},
-{3681793,3862830,3862791,0.0092875,0.0123833333333333},
-{3681794,3853819,3853742,0.02697,0.03596},
-{3681795,3866127,3866184,0.0310965517241379,1000000},
-{3681796,3866184,3866217,0.0135724137931034,1000000},
-{3681797,3907578,3907642,0.0452538461538462,1000000},
-{3681798,3922001,3922242,0.272466666666667,0.262735714285714},
-{3681799,3919754,3919477,0.102492307692308,0.105189473684211},
-{3681800,3921843,3921407,0.151571428571429,0.176833333333333},
-{3681801,3920935,3920924,0.00434594594594595,0.005025},
-{3681802,3921226,3921208,0.00597,0.00682285714285714},
-{3681805,3922269,3922180,0.0399870967741935,0.0326210526315789},
-{3681813,3904024,3903746,0.0723222222222222,0.0751038461538462},
-{3681814,3903746,3903589,0.0518111111111111,0.0538038461538462},
-{3681815,3904920,3904460,0.1464,0.17139512195122},
-{3681816,3905316,3905200,0.042468,0.0416352941176471},
-{3681817,3905200,3904920,0.107023255813953,0.10004347826087},
-{3681818,3906550,3906221,0.0980509090909091,0.105741176470588},
-{3681837,3874249,3874077,0.0859333333333333,0.0859333333333333},
-{3681838,3873622,3872982,0.262671428571429,0.24516},
-{3681839,3864829,3864944,0.063888,1000000},
-{3681843,3879927,3879947,0.0123115384615385,0.012804},
-{3681844,3879947,3879980,0.0240807692307692,0.025044},
-{3681845,3879472,3879508,0.0181963636363636,0.0185333333333333},
-{3681846,3881286,3881212,0.0230571428571429,0.0220090909090909},
-{3681847,3879157,3879155,0.11724,0.073275},
-{3681848,3879155,3879150,0.0214114285714286,0.018735},
-{3681849,3879150,3879149,0.0164432432432432,0.0148390243902439},
-{3681850,3879140,3879135,0.0126545454545455,0.0174},
-{3681851,3879099,3879101,0.0352744186046512,0.0316},
-{3681852,3879101,3879100,0.0120933333333333,0.0115787234042553},
-{3681853,3879100,3879097,0.0274851063829787,0.0300418604651163},
-{3681854,3879097,3879092,0.0541375,0.0590590909090909},
-{3681855,3879092,3879094,0.00919148936170213,0.010046511627907},
-{3681856,3879094,3879096,0.0199695652173913,0.0213627906976744},
-{3681857,3879090,3879089,0.0022,0.00225},
-{3681858,3879089,3879084,0.0146,0.0152790697674419},
-{3681859,3879084,3879082,0.0289304347826087,0.0309488372093023},
-{3681860,3879063,3879061,0.0182808510638298,0.0182808510638298},
-{3681861,3879049,3879048,0.00990857142857143,0.00806511627906977},
-{3681862,3879048,3879047,0.229421052631579,0.108975},
-{3681863,3879047,3879045,0.0139565217391304,0.00891666666666667},
-{3681864,3879045,3879044,0.034344,0.0252529411764706},
-{3681865,3879044,3879041,0.01044,0.0111857142857143},
-{3681866,3879041,3879036,0.04685625,0.0681545454545455},
-{3681867,3881910,3881902,0.0100875,1000000},
-{3681868,3881902,3881639,0.231126315789474,1000000},
-{3681869,3881639,3881498,0.1055,1000000},
-{3681870,3881425,3881381,0.0508736842105263,0.0508736842105263},
-{3681871,3880039,3879884,0.161329411764706,1000000},
-{3681872,3879884,3879869,0.00952,1000000},
-{3681873,3879869,3879769,0.1155,1000000},
-{3681874,3849205,3849348,0.0906387096774193,0.0826411764705882},
-{3681875,3849348,3849505,0.0906882352941176,0.0906882352941176},
-{3681876,3851188,3851293,0.0292085106382979,0.0280163265306122},
-{3681877,3851293,3851322,0.00709787234042553,0.00680816326530612},
-{3681878,3852434,3852452,0.0492391304347826,0.0481914893617021},
-{3681879,3852452,3852456,0.00834545454545455,0.00816},
-{3681880,3853089,3853150,0.0143162790697674,0.012825},
-{3681881,3853817,3854134,0.0920590909090909,0.0861829787234043},
-{3681882,3854463,3854827,0.153107142857143,0.119083333333333},
-{3681883,3854870,3855190,0.179044444444444,0.2302},
-{3681884,3855247,3855414,0.0549257142857143,0.0565411764705882},
-{3681885,3857712,3857720,0.0193021276595745,0.0185142857142857},
-{3681886,3857720,3857740,0.0597681818181818,0.0571695652173913},
-{3681887,3857740,3857761,0.03738,0.0364682926829268},
-{3681888,3857761,3857762,0.0425666666666667,0.0425666666666667},
-{3681889,3858093,3858100,0.000874285714285714,0.000927272727272727},
-{3681890,3858100,3858420,0.0898461538461538,0.0922105263157895},
-{3681891,3858420,3858511,0.0253227272727273,0.02476},
-{3681892,3858511,3858588,0.0239478260869565,0.0234382978723404},
-{3681893,3859151,3859501,0.0871531914893617,0.081924},
-{3681894,3859501,3859555,0.0152133333333333,0.0148826086956522},
-{3681895,3859897,3860428,0.302818181818182,1000000},
-{3681896,3860428,3860438,0.0024,1000000},
-{3681897,3859555,3859821,0.0695466666666667,0.0680347826086957},
-{3681898,3859821,3859897,0.0161617021276596,0.0161617021276596},
-{3681899,3882887,3882788,0.0344108108108108,0.0276782608695652},
-{3681900,3883498,3882979,0.156014285714286,0.192723529411765},
-{3681901,3882979,3882887,0.0366,0.0318260869565217},
-{3681904,3891666,3891680,0.0101666666666667,0.0114375},
-{3681905,3889861,3889844,0.0115655172413793,1000000},
-{3681906,3889844,3889696,0.0665586206896552,1000000},
-{3681907,3889696,3889641,0.0119018181818182,1000000},
-{3681908,3890181,3890080,0.0432545454545454,1000000},
-{3681909,3890828,3890731,0.0333166666666667,1000000},
-{3681910,3889510,3888913,0.182941463414634,0.23439375},
-{3681911,3887819,3887590,0.0630714285714286,0.0563617021276596},
-{3681912,3887284,3887138,0.0703615384615385,0.0538058823529412},
-{3681913,3886889,3886622,0.09264,0.09264},
-{3681914,3886622,3886585,0.0142054054054054,0.0122232558139535},
-{3681915,3886585,3886495,0.0373411764705882,0.0302285714285714},
-{3681916,3882085,3882361,0.0882,0.1071},
-{3681917,3882025,3882085,0.0198230769230769,0.021475},
-{3681918,3881704,3881720,0.00208235294117647,0.00272307692307692},
-{3681919,3881720,3882025,0.0906692307692308,0.107154545454545},
-{3681920,3881333,3881627,0.0770875,1000000},
-{3681921,3881627,3881704,0.019668,1000000},
-{3681922,3881209,3881333,0.0383478260869565,1000000},
-{3681923,3885692,3885664,0.00975789473684211,0.00862325581395349},
-{3681924,3885664,3885638,0.00762631578947369,0.00673953488372093},
-{3681925,3887097,3887035,0.0186136363636364,0.019046511627907},
-{3681926,3886794,3886653,0.0450878048780488,0.04108},
-{3681927,3888038,3887998,0.00890232558139535,0.00832173913043478},
-{3681928,3887998,3887733,0.0575045454545455,0.055004347826087},
-{3681929,3888249,3888175,0.0227842105263158,0.0188217391304348},
-{3681930,3888175,3888038,0.03723,0.0323739130434783},
-{3681931,3886495,3886413,0.0493285714285714,0.03453},
-{3681932,3886413,3886243,0.110045454545455,0.0691714285714286},
-{3681933,3886243,3886205,0.0208285714285714,0.0176727272727273},
-{3681934,3884966,3884922,0.0256173913043478,0.02946},
-{3681935,3884922,3884480,0.21412,0.256944},
-{3681936,3884480,3884444,0.0154216216216216,0.01585},
-{3681937,3884444,3884083,0.144416666666667,0.144416666666667},
-{3681938,3884083,3883768,0.123548571428571,0.120116666666667},
-{3681939,3883768,3883691,0.0313588235294118,0.0304628571428571},
-{3681940,3883247,3883181,0.036275,0.0378521739130435},
-{3681941,3882939,3882841,0.0553333333333333,0.0574615384615385},
-{3681942,3882841,3882737,0.0429692307692308,0.0429692307692308},
-{3681943,3882244,3882111,0.0694551724137931,0.06294375},
-{3681944,3882111,3881892,0.142875,0.0979714285714286},
-{3681945,3881892,3881852,0.028875,0.0203823529411765},
-{3681946,3882788,3882486,0.147456,0.0877714285714286},
-{3681947,3882486,3882454,0.02067,0.010335},
-{3681948,3885362,3885295,0.0268,0.01608},
-{3681949,3885295,3885255,0.0161076923076923,0.00951818181818182},
-{3681950,3889247,3888996,0.0513169811320755,0.0555061224489796},
-{3681951,3890015,3889692,0.0805471698113208,0.08538},
-{3681952,3889692,3889640,0.0101547169811321,0.0105529411764706},
-{3681953,3890216,3890097,0.0323265306122449,0.03168},
-{3681954,3890097,3890015,0.0203176470588235,0.0211469387755102},
-{3681955,3882642,3882404,0.0657714285714286,0.0600521739130435},
-{3681956,3882404,3882243,0.0532307692307692,0.0451304347826087},
-{3681957,3883915,3883824,0.0252,0.0230086956521739},
-{3682002,3866217,3866307,0.0513310344827586,1000000},
-{3682003,3862163,3862130,0.00707547169811321,0.00872093023255814},
-{3682004,3862130,3861845,0.0753735849056604,0.0868434782608696},
-{3682005,3862321,3862234,0.0168230769230769,0.02187},
-{3682006,3862234,3862163,0.0162,0.0200571428571429},
-{3682007,3864204,3864140,0.0311833333333333,0.046775},
-{3682008,3864140,3864009,0.0562540540540541,0.0717724137931035},
-{3682009,3866482,3866755,1000000,0.16928},
-{3682010,3853426,3853363,0.01719,0.01719},
-{3682011,3853363,3852966,0.107575609756098,0.113092307692308},
-{3682012,3853742,3853696,0.015790243902439,0.0196181818181818},
-{3682013,3853696,3853478,0.0703463414634146,0.0801166666666667},
-{3682014,3853478,3853426,0.0193756097560976,0.01986},
-{3682015,3854005,3853819,0.059985,0.109063636363636},
-{3682026,3920924,3920709,0.133466666666667,0.1287},
-{3682027,3920709,3920661,0.0446666666666667,0.03216},
-{3682028,3920820,3919754,0.378,0.378},
-{3682029,3921161,3920820,0.117545454545455,0.117545454545455},
-{3682030,3902201,3902021,0.0678857142857143,0.07425},
-{3682031,3922242,3922129,1.17994285714286,1.07733913043478},
-{3682032,3902464,3902272,0.1571,0.0689707317073171},
-{3682033,3902272,3902229,0.01665,0.0126},
-{3682034,3906221,3906200,0.00870545454545455,0.00920769230769231},
-{3682035,3906200,3906177,0.00872727272727273,0.00905660377358491},
-{3682036,3907642,3907374,0.119181818181818,0.2458125},
-{3682037,3907709,3907481,0.0379830508474576,0.0379830508474576},
-{3682038,3907481,3907331,0.0260896551724138,0.0260896551724138},
-{3682039,3907074,3907494,0.214916666666667,1000000},
-{3682040,3907494,3907578,0.074895652173913,1000000},
-{3682056,3922022,3921758,0.115018181818182,0.0973230769230769},
-{3682057,3921461,3921418,0.0141157894736842,0.0141157894736842},
-{3682058,3921418,3921226,0.0835578947368421,0.0882},
-{3682059,3921984,3921912,0.0384545454545454,0.047},
-{3682060,3921912,3921843,0.0231567567567568,0.0329538461538462},
-{3682070,3897302,3896652,0.2443375,0.249536170212766},
-{3682071,3902529,3902520,0.00562978723404255,0.00518823529411765},
-{3682072,3902520,3902284,0.0841125,0.0791647058823529},
-{3682073,3903006,3902785,0.0884454545454545,0.077832},
-{3682074,3902785,3902771,0.00531063829787234,0.0048},
-{3682075,3903713,3903694,0.0148695652173913,0.0148695652173913},
-{3682076,3903694,3903444,0.158109090909091,0.168309677419355},
-{3682077,3902021,3901867,0.0513658536585366,0.0513658536585366},
-{3682078,3901867,3901699,0.056504347826087,0.056504347826087},
-{3682103,3865507,3865583,0.0483352941176471,1000000},
-{3682104,3867730,3867709,0.0196758620689655,1000000},
-{3682105,3867709,3867501,0.26305,1000000},
-{3682106,3867884,3867730,0.139258064516129,1000000},
-{3682107,3868047,3868028,0.0101769230769231,1000000},
-{3682108,3896470,3897558,0.212802857142857,0.215886956521739},
-{3682109,3897558,3897646,0.0153652173913043,0.0151457142857143},
-{3682110,3897219,3897316,0.0427111111111111,0.0256266666666667},
-{3682111,3897114,3897219,0.0378352941176471,0.0268},
-{3682112,3896041,3896200,0.0315794117647059,0.0315794117647059},
-{3682113,3896200,3896341,0.0313411764705882,0.0313411764705882},
-{3682114,3881212,3881058,0.0470634146341463,0.0459428571428571},
-{3682115,3879391,3879330,0.0225283018867924,0.0217090909090909},
-{3682116,3879295,3879252,0.0222923076923077,0.0214666666666667},
-{3682117,3879252,3879176,0.064596,0.0609396226415094},
-{3682118,3879176,3879165,0.124069565217391,0.105688888888889},
-{3682119,3879149,3879147,0.0185368421052632,0.0171804878048781},
-{3682120,3879082,3879081,0.0046468085106383,0.00496363636363636},
-{3682121,3879081,3879071,0.0537829787234043,0.0561733333333333},
-{3682122,3879071,3879067,0.0101375,0.0105782608695652},
-{3682123,3879067,3879063,0.0255063829787234,0.0260608695652174},
-{3682124,3879061,3879058,0.0136826086956522,0.0133914893617021},
-{3682125,3879058,3879057,0.00234782608695652,0.00229787234042553},
-{3682126,3879036,3879035,0.00888,0.0148},
-{3682127,3879035,3879034,0.0331333333333333,0.0568},
-{3682128,3881498,3881477,0.0174,0.0174},
-{3682129,3881477,3881425,0.05,0.05},
-{3682130,3881381,3881356,0.02082,1000000},
-{3682131,3881356,3881267,0.0779052631578947,1000000},
-{3682132,3881267,3881228,0.0358235294117647,1000000},
-{3682133,3881228,3881166,0.0585666666666667,1000000},
-{3682134,3881166,3880940,0.203466666666667,1000000},
-{3682135,3880940,3880932,0.0099375,1000000},
-{3682136,3880932,3880896,0.029925,1000000},
-{3682137,3880896,3880842,0.041475,1000000},
-{3682138,3880842,3880824,0.0177882352941176,1000000},
-{3682139,3880824,3880722,0.0909666666666667,1000000},
-{3682140,3880722,3880607,0.0967,1000000},
-{3682141,3880607,3880530,0.09236,1000000},
-{3682142,3880530,3880493,0.0384857142857143,1000000},
-{3682143,3880493,3880458,0.03572,1000000},
-{3682144,3880458,3880359,0.09728,1000000},
-{3682145,3880359,3880302,0.0725571428571429,1000000},
-{3682146,3880302,3880285,0.0226,1000000},
-{3682147,3880285,3880175,0.100305882352941,1000000},
-{3682148,3880175,3880133,0.0263368421052632,1000000},
-{3682149,3880133,3880095,0.03567,1000000},
-{3682150,3880095,3880039,0.0605684210526316,1000000},
-{3682151,3879769,3879736,0.0366352941176471,1000000},
-{3682152,3879736,3879618,0.113435294117647,1000000},
-{3682153,3879391,3879446,0.0304036363636364,0.0309666666666667},
-{3682154,3879508,3879605,0.0484285714285714,0.0493090909090909},
-{3682155,3879605,3879927,0.168814285714286,0.168814285714286},
-{3682156,3880474,3880551,0.0567631578947368,0.0501627906976744},
-{3682157,3880551,3880667,0.0852972972972973,0.0717272727272727},
-{3682158,3850272,3850317,0.0233032258064516,0.02408},
-{3682159,3850317,3850599,0.123075,0.120073170731707},
-{3682160,3852316,3852344,0.0129136363636364,0.0129136363636364},
-{3682161,3852344,3852354,0.00913636363636364,0.00913636363636364},
-{3682162,3852354,3852393,0.0727866666666667,0.0727866666666667},
-{3682163,3852231,3852236,0.00129333333333333,0.00132272727272727},
-{3682164,3852236,3852316,0.0203866666666667,0.02085},
-{3682165,3852468,3852469,0.007875,0.00768292682926829},
-{3682166,3852469,3852475,0.020355,0.020355},
-{3682167,3852475,3852667,0.0754421052631579,0.0735076923076923},
-{3682168,3852667,3852728,0.0253538461538462,0.0253538461538462},
-{3682169,3852728,3852786,0.0155846153846154,0.0155846153846154},
-{3682170,3852786,3853089,0.0810878048780488,0.0773162790697674},
-{3682171,3854134,3854363,0.0605121951219512,0.0590714285714286},
-{3682172,3854363,3854463,0.0311076923076923,0.029590243902439},
-{3682173,3856182,3857392,0.277826086956522,0.277826086956522},
-{3682174,3857392,3857431,0.01644,0.0151421052631579},
-{3682175,3857431,3857561,0.100524324324324,0.0978789473684211},
-{3682176,3857561,3857610,0.047535,0.0513891891891892},
-{3682177,3857610,3857692,0.108666666666667,0.108666666666667},
-{3682178,3857692,3857712,0.029463829787234,0.0282612244897959},
-{3682179,3860438,3860826,0.151927272727273,1000000},
-{3682180,3860826,3860923,0.0351529411764706,1000000},
-{3682181,3860923,3861215,0.123794117647059,1000000},
-{3682182,3861215,3861229,0.00745454545454545,1000000},
-{3682183,3861229,3861329,0.0306176470588235,1000000},
-{3682184,3861329,3861587,0.152807142857143,1000000},
-{3682185,3861587,3861596,0.0155052631578947,1000000},
-{3682186,3861596,3861625,0.029832,1000000},
-{3682187,3861625,3861849,0.139324137931034,1000000},
-{3682188,3861849,3861908,0.0319542857142857,1000000},
-{3682189,3861908,3862154,0.0890914285714286,1000000},
-{3682190,3862154,3862341,0.0566666666666667,1000000},
-{3682191,3862341,3862492,0.0435789473684211,1000000},
-{3682192,3862492,3862591,0.0288157894736842,1000000},
-{3682193,3862591,3863028,0.212676923076923,1000000},
-{3682194,3863028,3863095,0.0235421052631579,1000000},
-{3682195,3863095,3863100,0.00241578947368421,1000000},
-{3682196,3863100,3863368,0.109885714285714,1000000},
-{3682197,3863368,3863400,0.0366,1000000},
-{3682198,3863400,3863406,0.0117230769230769,1000000},
-{3682199,3863406,3863079,0.191914285714286,1000000},
-{3682200,3863079,3862509,0.33118,1000000},
-{3682201,3862509,3862499,0.00759130434782609,1000000},
-{3682202,3862499,3862477,0.0167217391304348,1000000},
-{3682203,3862477,3862702,0.0539739130434783,0.0551733333333333},
-{3682204,3862702,3863544,0.259261224489796,0.254076},
-{3682205,3863544,3863575,0.00827547169811321,0.00843461538461538},
-{3682206,3863575,3863872,0.0974076923076923,0.0993176470588235},
-{3682207,3863872,3864333,0.1813625,0.193453333333333},
-{3682208,3864333,3864358,0.00452195121951219,0.00487894736842105},
-{3682209,3864358,3864522,0.0438947368421053,0.0450810810810811},
-{3682210,3864522,3864570,0.0215090909090909,0.0197166666666667},
-{3682211,3864570,3864660,0.05268,0.0439},
-{3682212,3864660,3864648,0.0135724137931034,0.0112457142857143},
-{3682213,3864648,3864634,0.010258064516129,0.00908571428571429},
-{3682214,3864634,3864281,0.215604545454545,0.206230434782609},
-{3682215,3864281,3864250,0.068376,0.0697714285714286},
-{3682216,3864250,3864247,0.004548,0.0047375},
-{3682217,3864247,3864245,0.0045,0.0046875},
-{3682218,3864245,3864289,0.100126530612245,0.100126530612245},
-{3682219,3864289,3864300,0.0083375,0.00851489361702128},
-{3682220,3864300,3864350,0.0338042553191489,0.0345391304347826},
-{3682221,3864350,3864401,0.019095652173913,0.019095652173913},
-{3682222,3864401,3864449,0.0151772727272727,0.01484},
-{3682223,3864732,3864805,0.0625125,1000000},
-{3682224,3864805,3864829,0.0168666666666667,1000000},
-{3682225,3851086,3851188,0.031,0.0291764705882353},
-{3682226,3851322,3851352,0.00738666666666667,0.00738666666666667},
-{3682227,3851352,3851383,0.0120681818181818,0.0120681818181818},
-{3682228,3851899,3851965,0.0128608695652174,0.0140857142857143},
-{3682229,3851965,3852231,0.06488,0.0695142857142857},
-{3682230,3851383,3851866,0.12792,0.130827272727273},
-{3682231,3851866,3851899,0.00944347826086956,0.00987272727272727},
-{3682232,3852456,3852468,0.0299581395348837,0.0306714285714286},
-{3682233,3890080,3890037,0.0200727272727273,1000000},
-{3682234,3890037,3889991,0.0202545454545455,1000000},
-{3682235,3889991,3889912,0.0338181818181818,1000000},
-{3682236,3890201,3890181,0.0101636363636364,1000000},
-{3682237,3890436,3890282,0.0736,1000000},
-{3682238,3890282,3890201,0.0404689655172414,1000000},
-{3682239,3890731,3890684,0.0201567567567568,1000000},
-{3682240,3890684,3890505,0.0675166666666667,1000000},
-{3682241,3890505,3890436,0.0289090909090909,1000000},
-{3682242,3891127,3891083,0.0151272727272727,1000000},
-{3682243,3890867,3890828,0.0177166666666667,1000000},
-{3682244,3893569,3893610,0.0207409090909091,0.0194170212765957},
-{3682245,3893610,3892785,0.3944,0.3944},
-{3682246,3892785,3892108,0.297733333333333,0.2772},
-{3682247,3892108,3892042,0.0284275862068966,0.032976},
-{3682248,3887590,3887559,0.00987,0.00858260869565217},
-{3682249,3887559,3887419,0.034572972972973,0.0290727272727273},
-{3682250,3887419,3887284,0.0651310344827586,0.04722},
-{3682251,3887138,3886889,0.098772972972973,0.117890322580645},
-{3682252,3890351,3890434,0.03436,1000000},
-{3682253,3890434,3890508,0.0322595744680851,1000000},
-{3682254,3890508,3890669,0.0599375,1000000},
-{3682255,3890669,3890686,0.005275,1000000},
-{3682256,3890686,3890702,0.006375,1000000},
-{3682257,3890702,3890912,0.0938590909090909,1000000},
-{3682258,3890912,3890960,0.0179,1000000},
-{3682259,3890960,3891003,0.0138285714285714,1000000},
-{3682260,3891359,3891476,0.0544578947368421,0.0470318181818182},
-{3682261,3891476,3891599,0.08720625,0.069765},
-{3682262,3891599,3891623,0.0123771428571429,0.0111076923076923},
-{3682263,3891623,3891649,0.0164909090909091,0.01700625},
-{3682264,3891649,3891666,0.0108705882352941,0.01155},
-{3682265,3891680,3892057,0.211484210526316,0.243527272727273},
-{3682266,3892057,3892088,0.0174810810810811,0.0143733333333333},
-{3682267,3892088,3892124,0.0233513513513514,0.020093023255814},
-{3682268,3892442,3892489,0.024465,0.0271833333333333},
-{3682269,3892489,3892519,0.0126615384615385,0.0137166666666667},
-{3682270,3892519,3892742,0.14472,0.140051612903226},
-{3682271,3892742,3892782,0.0130833333333333,0.0181153846153846},
-{3682272,3892782,3892960,0.073275,0.172411764705882},
-{3682273,3892960,3892978,0.00655909090909091,0.012025},
-{3682274,3892978,3892991,0.00610666666666667,0.010992},
-{3682275,3892991,3893009,0.00592173913043478,0.0100888888888889},
-{3682276,3893009,3893066,0.0282510638297872,0.04149375},
-{3682277,3893066,3893102,0.0161125,0.0209027027027027},
-{3682278,3893102,3893128,0.011775,0.01413},
-{3682279,3893490,3893569,0.0399627906976744,0.0373565217391304},
-{3682280,3893412,3893482,0.032504347826087,0.0318127659574468},
-{3682281,3893482,3893490,0.00614666666666667,0.00601304347826087},
-{3682282,3885748,3885714,0.00769230769230769,0.00697674418604651},
-{3682283,3885714,3885692,0.00983076923076923,0.00891627906976744},
-{3682284,3886157,3885841,0.0876972972972973,0.0737454545454545},
-{3682285,3885841,3885748,0.0260368421052632,0.0224863636363636},
-{3682286,3887035,3886991,0.0128045454545455,0.0131023255813954},
-{3682287,3886991,3886819,0.0516818181818182,0.0516818181818182},
-{3682288,3886819,3886794,0.00703255813953488,0.00672},
-{3682289,3888762,3888438,0.0791428571428571,0.0773023255813954},
-{3682290,3888438,3888298,0.0394578947368421,0.03332},
-{3682291,3888298,3888249,0.0112263157894737,0.00927391304347826},
-{3682292,3885343,3885007,0.260011764705882,0.163711111111111},
-{3682293,3885007,3884966,0.02976,0.0283428571428571},
-{3682294,3883587,3883447,0.0915130434782609,0.0637818181818182},
-{3682295,3883447,3883247,0.18496,0.102755555555556},
-{3682296,3883181,3882988,0.095825,0.121042105263158},
-{3682297,3882988,3882939,0.0245333333333333,0.026496},
-{3682298,3882276,3882251,0.00956129032258065,0.0128869565217391},
-{3682299,3882251,3882176,0.03436,0.0468545454545455},
-{3682300,3882176,3882060,0.0741111111111111,0.0741111111111111},
-{3682301,3882060,3881910,0.117442105263158,0.092975},
-{3682302,3880766,3880930,0.060375,1000000},
-{3682303,3890563,3890456,0.0312510638297872,0.0282461538461538},
-{3682304,3890456,3890216,0.0716936170212766,0.0660705882352941},
-{3682305,3890608,3890563,0.009425,0.0087},
-{3682306,3889640,3889509,0.0302666666666667,0.0320470588235294},
-{3682307,3889509,3889280,0.0522444444444444,0.056424},
-{3682308,3889280,3889247,0.00956666666666667,0.010332},
-{3682309,3888996,3888824,0.035977358490566,0.039725},
-{3682310,3888824,3888712,0.0215207547169811,0.0237625},
-{3682311,3888712,3888581,0.0286528301886792,0.0316375},
-{3682312,3888581,3888401,0.0374264150943396,0.0422042553191489},
-{3682313,3888401,3888238,0.0315396226415094,0.0355659574468085},
-{3682314,3888238,3888141,0.0238615384615385,0.0264},
-{3682315,3888141,3888103,0.00613846153846154,0.00679148936170213},
-{3682316,3888103,3887960,0.037356,0.040604347826087},
-{3682317,3887960,3887930,0.004608,0.00500869565217391},
-{3682318,3887930,3887879,0.009012,0.00979565217391304},
-{3682319,3886885,3886727,0.0414367346938775,0.0483428571428571},
-{3682320,3886727,3886595,0.0363673469387755,0.0456923076923077},
-{3682321,3886595,3886571,0.00762857142857143,0.00983684210526316},
-{3682322,3886571,3886461,0.0274897959183673,0.0384857142857143},
-{3682323,3884244,3884199,0.0147081081081081,0.0143210526315789},
-{3682324,3884199,3884157,0.0147076923076923,0.0155027027027027},
-{3682325,3881971,3881880,0.025493023255814,0.0267365853658537},
-{3682326,3881880,3881286,0.157581818181818,0.165085714285714},
-{3682327,3882120,3882009,0.0419707317073171,0.0400186046511628},
-{3682328,3882009,3881971,0.0103674418604651,0.0106142857142857},
-{3682329,3882145,3882120,0.00651,0.00578666666666667},
-{3682330,3882243,3882166,0.0252307692307692,0.0218666666666667},
-{3682331,3882166,3882145,0.007125,0.00633333333333333},
-{3682332,3882756,3882723,0.00766666666666667,0.0075},
-{3682333,3882830,3882756,0.0171130434782609,0.0174933333333333},
-{3682334,3883154,3882830,0.0815869565217391,0.0915365853658537},
-{3682335,3883205,3883188,0.00577021276595745,0.00713684210526316},
-{3682336,3883188,3883154,0.00877021276595745,0.0108473684210526},
-{3682337,3883634,3883510,0.036975,0.0343953488372093},
-{3682338,3883824,3883669,0.0439230769230769,0.0380666666666667},
-{3682339,3883669,3883634,0.00981,0.00872},
-{3682340,3884160,3883915,0.0654136363636364,0.0625695652173913},
-{3682341,3884379,3884337,0.0122590909090909,0.0119866666666667},
-{3682342,3884337,3884160,0.0451333333333333,0.0451333333333333},
-{3682359,3849505,3849536,0.0160588235294118,0.0165454545454545},
-{3682360,3849536,3849621,0.0712,0.0689032258064516},
-{3682363,3865563,3866792,0.227432727272727,0.236015094339623},
-{3682364,3850599,3851063,0.1328125,0.1275},
-{3682365,3851063,3851086,0.00697959183673469,0.00670588235294118},
-{3682366,3900113,3899184,0.31978,0.290709090909091},
-{3682367,3899184,3898713,0.172778947368421,0.161449180327869},
-{3682368,3893128,3893387,0.130625,0.136304347826087},
-{3682369,3893387,3893412,0.00864255319148936,0.00864255319148936},
-{3682370,3880667,3880725,0.0498342857142857,0.0396409090909091},
-{3682371,3880725,3880766,0.0302432432432432,0.0266428571428571},
-{3682374,3889671,3889634,0.01665,0.01998},
-{3682375,3889634,3889510,0.0648,0.1404},
-{3682376,3873858,3873420,0.192275,0.15382},
-{3682377,3873420,3873390,0.0108923076923077,0.00809142857142857},
-{3682378,3868028,3867884,0.156514285714286,1000000},
-{3682379,3864449,3864567,0.05229,0.0475363636363636},
-{3682380,3864567,3864587,0.00848571428571429,0.00675},
-{3682381,3879330,3879317,0.00528679245283019,0.00518888888888889},
-{3682382,3879317,3879295,0.00985384615384615,0.00948888888888889},
-{3682383,3879018,3879012,0.01985,0.0144363636363636},
-{3682384,3879012,3879010,0.0135,0.010125},
-{3682385,3881852,3881768,0.0581,0.0422545454545454},
-{3682386,3881768,3881754,0.01952,0.00944516129032258},
-{3682387,3881058,3881007,0.01392,0.0142769230769231},
-{3682388,3881007,3880971,0.012045,0.0126789473684211},
-{3682401,3901699,3901401,0.098595652173913,0.098595652173913},
-{3682402,3901401,3901282,0.0438279069767442,0.0509351351351351},
-{3682425,3916852,3915020,0.5187,0.528130909090909},
-{3682455,3848705,3848689,0.105994736842105,0.108859459459459},
-{3682456,3848689,3848670,0.01836,0.0188307692307692},
-{3682551,3875051,3874249,1000000,1000000},
-{3682552,3876061,3876004,1000000,1000000},
-{3682553,3876004,3875051,1000000,1000000},
-{3682556,3874077,3873697,0.325825,0.300761538461538},
-{3682557,3873697,3873622,0.047341935483871,0.0444727272727273},
-{3682558,3847618,3847649,0.031475,0.0321446808510638},
-{3682559,3847649,3847666,0.0267829787234043,0.0267829787234043},
-{3682577,3881754,3881736,0.01165,1000000},
-{3682578,3881736,3881710,0.0170571428571429,1000000},
-{3682598,3897850,3897719,0.0697363636363636,0.139472727272727},
-{3682599,3897719,3897302,0.1998,0.31968},
-{3682601,3868688,3868486,1000000,0.126833333333333},
-{3682602,3868486,3868384,1000000,0.0609},
-{3682604,3886340,3886501,0.0891891891891892,0.0891891891891892},
-{3682611,3884157,3883889,0.087135,0.0968166666666667},
-{3682612,3883889,3883650,0.0810333333333333,0.09724},
-{3682613,3891148,3891086,0.0148,0.0173739130434783},
-{3682614,3891086,3890608,0.128952941176471,0.134216326530612},
-{3682615,3865583,3866027,0.197043243243243,1000000},
-{3682616,3866027,3866127,0.04779375,1000000},
-{3682623,3919382,3919402,0.00656363636363636,0.005415},
-{3682662,3915531,3914022,0.265835294117647,0.278104615384615},
-{3682663,3914022,3909556,0.608828571428571,0.645727272727273},
-{3682664,3917078,3915550,0.297590163934426,0.31298275862069},
-{3682665,3915550,3915531,0.003534375,0.00370819672131148},
-{3682666,3889167,3888995,0.0468439024390244,1000000},
-{3682667,3888995,3888883,0.0352769230769231,1000000},
-{3682668,3915020,3914772,0.125513513513514,0.211090909090909},
-{3682669,3914772,3913851,0.266082352941176,0.260965384615385},
-{3682687,3920434,3920048,0.151405263157895,0.19178},
-{3682688,3920048,3919919,0.0642769230769231,0.0677513513513514},
-{3682691,3921055,3920704,0.2262,0.201964285714286},
-{3682692,3920704,3920602,0.052725,0.0482057142857143},
-{3682693,3893934,3894018,0.0217698113207547,0.0213666666666667},
-{3682694,3894018,3897114,0.745134545454545,0.706593103448276},
-{3682695,3891804,3891714,0.0277245283018868,0.029388},
-{3682696,3891714,3891439,0.0724384615384615,0.0768734693877551},
-{3682700,3891083,3890895,0.0904285714285714,1000000},
-{3682701,3890895,3890867,0.0109166666666667,1000000},
-{3682705,3888520,3887982,0.137246808510638,0.1343875},
-{3682706,3887982,3887819,0.0371866666666667,0.0341510204081633},
-{3682707,3888913,3888791,0.0277787234042553,0.0277787234042553},
-{3682708,3888791,3888520,0.0698217391304348,0.068336170212766}
-};
-
diff --git a/src/trsp/tester/postgres.h b/src/trsp/tester/postgres.h
deleted file mode 100644
index 3840e7f..0000000
--- a/src/trsp/tester/postgres.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-typedef double float8;
diff --git a/src/trsp/tester/testit.cpp b/src/trsp/tester/testit.cpp
deleted file mode 100644
index 263a8f5..0000000
--- a/src/trsp/tester/testit.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-#include <stdio.h>
-#include <vector>
-
-#include "GraphDefinition.h"
-#include "utils.h"
-
-#include "issue191-bad-m1.h"
-//#include "issue191-bad.h"
-//#include "issue191-good.h"
-
-int main(void) {
-    path_element_t *path;
-    int path_count;
-    char *err_msg;
-
-    std::vector<PDVI> ruleTable;
-    ruleTable.clear();
-
-    GraphDefinition gdef;
-    int res = gdef.my_dijkstra(edges, NEDGE, 2963487, 0.5, 3345813, 0.5, &path, &path_count, &err_msg, ruleTable);
-
-    if (res < 0) {
-        printf("error: res: %d\n", res);
-        printf("%s\n", err_msg);
-        return 1;
-    }
-
-    printf("Path count: %d\n", path_count);
-
-    float8 tcost = 0.0;
-    for (int i=0; i<path_count; i++) {
-        printf("%4d: %7d, %7d, %.4f\n", i+1, path[i].vertex_id, path[i].edge_id, path[i].cost);
-        tcost += path[i].cost;
-    }
-    printf("\nTotal cost = %.4f\n", tcost);
-
-    return 0;
-}
diff --git a/src/trsp/trsp.c b/src/trsp/trsp.c
new file mode 100644
index 0000000..7bae65c
--- /dev/null
+++ b/src/trsp/trsp.c
@@ -0,0 +1,884 @@
+/*PGR-GNU*****************************************************************
+
+File: trsp.c
+
+Generated with Template by:
+Copyright (c) 2013 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+
+#include "c_common/postgres_connection.h"
+#include "catalog/pg_type.h"
+#include "c_common/debug_macro.h"
+
+
+#if 0
+#include "utils/array.h"
+#include "postgres.h"
+#include "executor/spi.h"
+#include "funcapi.h"
+#if PGSQL_VERSION > 92
+#include "access/htup_details.h"
+#endif
+
+#include "fmgr.h"
+#endif
+
+#include "c_types/trsp/trsp.h"
+
+#if 0
+PGDLLEXPORT Datum turn_restrict_shortest_path_vertex(PG_FUNCTION_ARGS);
+#endif
+PGDLLEXPORT Datum turn_restrict_shortest_path_edge(PG_FUNCTION_ARGS);
+
+#if 0
+#undef DEBUG
+// #define DEBUG 1
+
+#ifdef DEBUG
+#define DBG(format, arg...)                     \
+    elog(NOTICE, format , ## arg)
+#else
+#define DBG(format, ...) do { ; } while (0)
+#endif
+#endif
+
+#if 0
+// The number of tuples to fetch from the SPI cursor at each iteration
+#define TUPLIMIT 1000
+
+// #ifdef PG_MODULE_MAGIC
+// PG_MODULE_MAGIC;
+// #endif
+#endif
+
+typedef struct edge_columns {
+  int id;
+  int source;
+  int target;
+  int cost;
+  int reverse_cost;
+} edge_columns_t;
+
+typedef struct restrict_columns {
+  int target_id;
+  int via_path;
+  int to_cost;
+} restrict_columns_t;
+
+
+
+#if 0
+static char *
+text2char(text *in) {
+  char *out = palloc(VARSIZE(in));
+
+  memcpy(out, VARDATA(in), VARSIZE(in) - VARHDRSZ);
+  out[VARSIZE(in) - VARHDRSZ] = '\0';
+  return out;
+}
+#endif
+
+static int
+finish(int code, int ret) {
+  PGR_DBG("In finish, trying to disconnect from spi %d", ret);
+  code = SPI_finish();
+  if (code != SPI_OK_FINISH) {
+    elog(ERROR, "couldn't disconnect from SPI");
+    return -1;
+  }
+  return ret;
+}
+
+/*
+ * This function fetches the resturction columns from an SPITupleTable..
+ *
+*/
+static int
+fetch_restrict_columns(SPITupleTable *tuptable,
+                       restrict_columns_t *restrict_columns) {
+  restrict_columns->target_id = SPI_fnumber(tuptable->tupdesc, "target_id");
+  restrict_columns->via_path = SPI_fnumber(tuptable->tupdesc, "via_path");
+  restrict_columns->to_cost =  SPI_fnumber(tuptable->tupdesc, "to_cost");
+  if (restrict_columns->target_id == SPI_ERROR_NOATTRIBUTE ||
+      restrict_columns->via_path == SPI_ERROR_NOATTRIBUTE ||
+      restrict_columns->to_cost == SPI_ERROR_NOATTRIBUTE) {
+    elog(ERROR, "Error, restriction query must return columns "
+        "'target_id', 'via_path' and 'to_cost'");
+    return -1;
+  }
+
+  if (SPI_gettypeid(tuptable->tupdesc,
+       restrict_columns->target_id) != INT4OID ||
+     SPI_gettypeid(tuptable->tupdesc, restrict_columns->via_path) != TEXTOID ||
+     SPI_gettypeid(tuptable->tupdesc, restrict_columns->to_cost) != FLOAT8OID) {
+    elog(ERROR, "Error, restriction columns 'target_id' must be of type int4,"
+     "'via_path' must be of type text, 'to_cost' must be of type float8");
+    return -1;
+  }
+
+  return 0;
+}
+
+/*
+ * This function fetches the edge columns from the SPITupleTable.
+ *
+*/
+static int
+fetch_edge_columns(SPITupleTable *tuptable, edge_columns_t *edge_columns,
+                   bool has_reverse_cost) {
+  edge_columns->id = SPI_fnumber(tuptable->tupdesc, "id");
+  edge_columns->source = SPI_fnumber(tuptable->tupdesc, "source");
+  edge_columns->target = SPI_fnumber(tuptable->tupdesc, "target");
+  edge_columns->cost = SPI_fnumber(tuptable->tupdesc, "cost");
+  if (edge_columns->id == SPI_ERROR_NOATTRIBUTE ||
+      edge_columns->source == SPI_ERROR_NOATTRIBUTE ||
+      edge_columns->target == SPI_ERROR_NOATTRIBUTE ||
+      edge_columns->cost == SPI_ERROR_NOATTRIBUTE) {
+      elog(ERROR, "Error, query must return columns "
+           "'id', 'source', 'target' and 'cost'");
+      return -1;
+    }
+
+  if (SPI_gettypeid(tuptable->tupdesc, edge_columns->source) != INT4OID ||
+      SPI_gettypeid(tuptable->tupdesc, edge_columns->target) != INT4OID ||
+      SPI_gettypeid(tuptable->tupdesc, edge_columns->cost) != FLOAT8OID) {
+      elog(ERROR, "Error, columns 'source', 'target' must be of type int4, "
+      "'cost' must be of type float8");
+      return -1;
+    }
+
+  PGR_DBG("columns: id %i source %i target %i cost %i",
+      edge_columns->id, edge_columns->source,
+      edge_columns->target, edge_columns->cost);
+
+  if (has_reverse_cost) {
+      edge_columns->reverse_cost = SPI_fnumber(tuptable->tupdesc,
+                                               "reverse_cost");
+
+      if (edge_columns->reverse_cost == SPI_ERROR_NOATTRIBUTE) {
+          elog(ERROR, "Error, reverse_cost is used, but query did't return "
+               "'reverse_cost' column");
+          return -1;
+        }
+
+      if (SPI_gettypeid(tuptable->tupdesc, edge_columns->reverse_cost)
+          != FLOAT8OID) {
+          elog(ERROR, "Error, columns 'reverse_cost' must be of type float8");
+          return -1;
+        }
+
+      PGR_DBG("columns: reverse_cost cost %i", edge_columns->reverse_cost);
+    }
+
+  return 0;
+}
+
+/*
+ * To fetch a edge from Tuple.
+ *
+ */
+
+static void
+fetch_edge(HeapTuple *tuple, TupleDesc *tupdesc,
+           edge_columns_t *edge_columns, edge_t *target_edge) {
+  Datum binval;
+  bool isnull;
+
+  binval = SPI_getbinval(*tuple, *tupdesc, edge_columns->id, &isnull);
+  if (isnull)
+    elog(ERROR, "id contains a null value");
+  target_edge->id = DatumGetInt32(binval);
+
+  binval = SPI_getbinval(*tuple, *tupdesc, edge_columns->source, &isnull);
+  if (isnull)
+    elog(ERROR, "source contains a null value");
+  target_edge->source = DatumGetInt32(binval);
+
+  binval = SPI_getbinval(*tuple, *tupdesc, edge_columns->target, &isnull);
+  if (isnull)
+    elog(ERROR, "target contains a null value");
+  target_edge->target = DatumGetInt32(binval);
+
+  binval = SPI_getbinval(*tuple, *tupdesc, edge_columns->cost, &isnull);
+  if (isnull)
+    elog(ERROR, "cost contains a null value");
+  target_edge->cost = DatumGetFloat8(binval);
+
+  if (edge_columns->reverse_cost != -1) {
+      binval = SPI_getbinval(*tuple, *tupdesc, edge_columns->reverse_cost,
+                             &isnull);
+      if (isnull)
+        elog(ERROR, "reverse_cost contains a null value");
+      target_edge->reverse_cost =  DatumGetFloat8(binval);
+    }
+
+  /*
+  PGR_DBG("edge: %i, %i, %i, %f, %f", target_edge->id, target_edge->source,
+    target_edge->target, target_edge->cost, target_edge->reverse_cost);
+  */
+}
+
+
+/*
+ * To fetch a edge from Tuple.
+ *
+ */
+
+static void
+fetch_restrict(HeapTuple *tuple, TupleDesc *tupdesc,
+           restrict_columns_t *restrict_columns, restrict_t *rest) {
+  Datum binval;
+  bool isnull;
+  int t;
+
+  for (t = 0; t < MAX_RULE_LENGTH; ++t)
+    rest->via[t] = -1;
+
+  binval = SPI_getbinval(*tuple, *tupdesc, restrict_columns->target_id,
+       &isnull);
+  if (isnull)
+    elog(ERROR, "target_id contains a null value");
+  rest->target_id = DatumGetInt32(binval);
+
+  binval = SPI_getbinval(*tuple, *tupdesc, restrict_columns->to_cost, &isnull);
+  if (isnull)
+    elog(ERROR, "to_cost contains a null value");
+  rest->to_cost = DatumGetFloat8(binval);
+  char *str = DatumGetCString(SPI_getvalue(*tuple, *tupdesc,
+       restrict_columns->via_path));
+
+  // PGR_DBG("restriction: %f, %i, %s", rest->to_cost, rest->target_id, str);
+
+  if (str != NULL) {
+    char* pch = NULL;
+    int ci = 0;
+
+    pch = (char *)strtok(str, " ,");
+
+    while (pch != NULL && ci < MAX_RULE_LENGTH) {
+      rest->via[ci] = atoi(pch);
+      // PGR_DBG("    rest->via[%i]=%i", ci, rest->via[ci]);
+      ci++;
+      pch = (char *)strtok(NULL, " ,");
+    }
+  }
+}
+
+
+
+static int compute_trsp(
+    char* sql,
+    int dovertex,
+    int64_t start_id,
+    double start_pos,
+    int64_t end_id,
+    double end_pos,
+    bool directed,
+    bool has_reverse_cost,
+    char* restrict_sql,
+    path_element_tt **path,
+    size_t *path_count) {
+
+  int SPIcode;
+  SPIPlanPtr SPIplan;
+  Portal SPIportal;
+  bool moredata = true;
+  uint32_t TUPLIMIT = 1000;
+  uint32_t ntuples;
+
+  edge_t *edges = NULL;
+  uint32_t total_tuples = 0;
+#ifndef _MSC_VER
+  edge_columns_t edge_columns = {.id = -1, .source = -1, .target = -1,
+                                 .cost = -1, .reverse_cost = -1};
+#else  // _MSC_VER
+  edge_columns_t edge_columns = {-1, -1, -1, -1, -1};
+#endif  // _MSC_VER
+  restrict_t *restricts = NULL;
+  uint32_t total_restrict_tuples = 0;
+  restrict_columns_t restrict_columns = {.target_id = -1, .via_path = -1,
+                                 .to_cost = -1};
+  int64_t v_max_id = 0;
+  int64_t v_min_id = INT_MAX;
+
+  /* track if start and end are both in edge tuples */
+  int s_count = 0;
+  int t_count = 0;
+
+  char *err_msg;
+  int ret = -1;
+  uint32_t z;
+
+  PGR_DBG("start turn_restrict_shortest_path\n");
+
+  SPIcode = SPI_connect();
+  if (SPIcode  != SPI_OK_CONNECT) {
+      elog(ERROR, "turn_restrict_shortest_path: "
+      "couldn't open a connection to SPI");
+      return -1;
+  }
+
+  SPIplan = SPI_prepare(sql, 0, NULL);
+  if (SPIplan  == NULL) {
+      elog(ERROR, "turn_restrict_shortest_path: "
+      "couldn't create query plan via SPI");
+      return -1;
+  }
+
+  if ((SPIportal = SPI_cursor_open(NULL, SPIplan, NULL, NULL, true)) == NULL) {
+      elog(ERROR, "turn_restrict_shortest_path: "
+      "SPI_cursor_open('%s') returns NULL", sql);
+      return -1;
+  }
+
+  while (moredata == true) {
+      // PGR_DBG("calling SPI_cursor_fetch");
+      SPI_cursor_fetch(SPIportal, true, TUPLIMIT);
+
+      if (SPI_tuptable == NULL) {
+          elog(ERROR, "SPI_tuptable is NULL");
+          return finish(SPIcode, -1);
+      }
+
+      if (edge_columns.id == -1) {
+          if (fetch_edge_columns(SPI_tuptable, &edge_columns,
+                                 has_reverse_cost) == -1)
+                return finish(SPIcode, ret);
+      }
+
+      ntuples = SPI_processed;
+
+      // PGR_DBG("Reading edges: %i - %i", total_tuples, total_tuples+ntuples);
+
+      total_tuples += ntuples;
+
+      if (ntuples > 0) {
+          if (!edges)
+            edges = palloc(total_tuples * sizeof(edge_t));
+          else
+            edges = repalloc(edges, total_tuples * sizeof(edge_t));
+
+          if (edges == NULL) {
+              elog(ERROR, "Out of memory");
+              return finish(SPIcode, ret);
+          }
+
+          uint32_t t;
+          SPITupleTable *tuptable = SPI_tuptable;
+          TupleDesc tupdesc = SPI_tuptable->tupdesc;
+
+          for (t = 0; t < ntuples; t++) {
+              // if (t%100 == 0) { PGR_DBG("    t: %i", t); }
+              HeapTuple tuple = tuptable->vals[t];
+              fetch_edge(&tuple, &tupdesc, &edge_columns,
+                         &edges[total_tuples - ntuples + t]);
+          }
+          // PGR_DBG("calling SPI_freetuptable");
+          SPI_freetuptable(tuptable);
+          // PGR_DBG("back from SPI_freetuptable");
+      } else {
+          moredata = false;
+      }
+  }
+  SPI_cursor_close(SPIportal);
+
+  // defining min and max vertex id
+
+  // DBG("Total %i edge tuples", total_tuples);
+
+  for (z = 0; z < total_tuples; z++) {
+    if (edges[z].source < v_min_id)
+      v_min_id = edges[z].source;
+
+    if (edges[z].source > v_max_id)
+      v_max_id = edges[z].source;
+
+    if (edges[z].target < v_min_id)
+      v_min_id = edges[z].target;
+
+    if (edges[z].target > v_max_id)
+      v_max_id = edges[z].target;
+
+    // DBG("%i <-> %i", v_min_id, v_max_id);
+  }
+
+  // ::::::::::::::::::::::::::::::::::::
+  // :: reducing vertex id (renumbering)
+  // ::::::::::::::::::::::::::::::::::::
+  for (z = 0; z < total_tuples; z++) {
+    // check if edges[] contains source and target
+    if (dovertex) {
+        if (edges[z].source == start_id || edges[z].target == start_id)
+          ++s_count;
+        if (edges[z].source == end_id || edges[z].target == end_id)
+          ++t_count;
+    } else {
+        if (edges[z].id == start_id)
+          ++s_count;
+        if (edges[z].id == end_id)
+          ++t_count;
+    }
+
+    edges[z].source -= v_min_id;
+    edges[z].target -= v_min_id;
+    edges[z].cost = edges[z].cost;
+    // PGR_DBG("edgeID: %i SRc:%i - %i, cost: %f",
+    // edges[z].id,edges[z].source, edges[z].target,edges[z].cost);
+  }
+
+  PGR_DBG("Min vertex id: %ld , Max vid: %ld", v_min_id, v_max_id);
+  PGR_DBG("Total %i edge tuples", total_tuples);
+
+  if (s_count == 0) {
+    elog(ERROR, "Start id was not found.");
+    return -1;
+  }
+
+  if (t_count == 0) {
+    elog(ERROR, "Target id was not found.");
+    return -1;
+  }
+
+  if (dovertex) {
+      start_id -= v_min_id;
+      end_id   -= v_min_id;
+  }
+
+  PGR_DBG("Fetching restriction tuples\n");
+
+  if (restrict_sql == NULL) {
+      PGR_DBG("Sql for restrictions is null.");
+  } else {
+      SPIplan = SPI_prepare(restrict_sql, 0, NULL);
+      if (SPIplan  == NULL) {
+          elog(ERROR, "turn_restrict_shortest_path: "
+          "couldn't create query plan via SPI");
+          return -1;
+      }
+
+      if ((SPIportal = SPI_cursor_open(NULL, SPIplan, NULL, NULL, true)) \
+       == NULL) {
+          elog(ERROR, "turn_restrict_shortest_path:"
+          " SPI_cursor_open('%s') returns NULL", restrict_sql);
+          return -1;
+      }
+
+      moredata = true;
+      while (moredata == true) {
+          SPI_cursor_fetch(SPIportal, true, TUPLIMIT);
+
+          if (restrict_columns.target_id == -1) {
+              if (fetch_restrict_columns(SPI_tuptable, &restrict_columns) \
+              == -1) {
+                PGR_DBG("fetch_restrict_columns failed!");
+                return finish(SPIcode, ret);
+              }
+          }
+
+          ntuples = SPI_processed;
+          total_restrict_tuples += ntuples;
+
+          // DBG("Reading Restrictions: %i", total_restrict_tuples);
+
+          if (ntuples > 0) {
+              if (!restricts)
+                restricts = palloc(total_restrict_tuples * sizeof(restrict_t));
+              else
+                restricts = repalloc(restricts,
+                    total_restrict_tuples * sizeof(restrict_t));
+
+              if (restricts == NULL) {
+                  elog(ERROR, "Out of memory");
+                  return finish(SPIcode, ret);
+              }
+
+              uint32_t t;
+              SPITupleTable *tuptable = SPI_tuptable;
+              TupleDesc tupdesc = SPI_tuptable->tupdesc;
+
+              for (t = 0; t < ntuples; t++) {
+                  HeapTuple tuple = tuptable->vals[t];
+                  fetch_restrict(&tuple, &tupdesc, &restrict_columns,
+                             &restricts[total_restrict_tuples - ntuples + t]);
+              }
+              SPI_freetuptable(tuptable);
+          } else {
+              moredata = false;
+          }
+      }
+      SPI_cursor_close(SPIportal);
+  }
+
+#ifdef DEBUG_OFF
+    int t;
+    for (t=0; t < total_restrict_tuples; t++) {
+        PGR_DBG("restricts: %.2f, %i, %i, %i, %i, %i, %i",
+        restricts[t].to_cost, restricts[t].target_id, restricts[t].via[0],
+        restricts[t].via[1], restricts[t].via[2], restricts[t].via[3],
+        restricts[t].via[4]);
+    }
+#endif
+
+  PGR_DBG("Total %i restriction tuples", total_restrict_tuples);
+
+  if (dovertex) {
+      PGR_DBG("Calling trsp_node_wrapper\n");
+      /** hack always returns 0 -1 when
+      installed on EDB VC++ 64-bit without this **/
+      #if defined(__MINGW64__)
+        // elog(NOTICE,"Calling trsp_node_wrapper\n");
+      #endif
+      ret = trsp_node_wrapper(edges, total_tuples,
+                        restricts, total_restrict_tuples,
+                        start_id, end_id,
+                        directed, has_reverse_cost,
+                        path, path_count, &err_msg);
+  } else {
+      PGR_DBG("Calling trsp_edge_wrapper\n");
+      ret = trsp_edge_wrapper(edges, total_tuples,
+                        restricts, total_restrict_tuples,
+                        start_id, start_pos, end_id, end_pos,
+                        directed, has_reverse_cost,
+                        path, path_count, &err_msg);
+  }
+
+  PGR_DBG("Message received from inside:");
+  PGR_DBG("%s", err_msg);
+
+  // DBG("SIZE %i\n",*path_count);
+
+  // ::::::::::::::::::::::::::::::::
+  // :: restoring original vertex id
+  // ::::::::::::::::::::::::::::::::
+  for (z = 0; z < *path_count; z++) {
+    // PGR_DBG("vetex %i\n",(*path)[z].vertex_id);
+    if (z || (*path)[z].vertex_id != -1)
+        (*path)[z].vertex_id += v_min_id;
+  }
+
+  PGR_DBG("ret = %i\n", ret);
+
+  PGR_DBG("*path_count = %ld\n", *path_count);
+
+  if (ret < 0) {
+      // elog(ERROR, "Error computing path: %s", err_msg);
+      ereport(ERROR, (errcode(ERRCODE_E_R_E_CONTAINING_SQL_NOT_PERMITTED),
+        errmsg("Error computing path: %s", err_msg)));
+    }
+
+  return finish(SPIcode, ret);
+}
+
+
+#if 0
+PG_FUNCTION_INFO_V1(turn_restrict_shortest_path_vertex);
+PGDLLEXPORT Datum
+turn_restrict_shortest_path_vertex(PG_FUNCTION_ARGS) {
+  FuncCallContext     *funcctx;
+#if 0
+  uint32_t             call_cntr;
+  int                  max_calls;
+#endif
+  TupleDesc            tuple_desc;
+  path_element_tt      *path;
+  char *               sql;
+
+
+  // stuff done only on the first call of the function
+  if (SRF_IS_FIRSTCALL()) {
+      MemoryContext   oldcontext;
+      size_t path_count = 0;
+
+      int ret = -1;
+      if (ret == -1) {}  // to avoid warning set but not used
+
+      int i;
+
+      // create a function context for cross-call persistence
+      funcctx = SRF_FIRSTCALL_INIT();
+
+      // switch to memory context appropriate for multiple function calls
+      oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
+
+      // verify that the first 5 args are not NULL
+      for (i = 0; i < 5; i++)
+        if (PG_ARGISNULL(i)) {
+            elog(ERROR, "turn_restrict_shortest_path(): "
+            "Argument %i may not be NULL", i+1);
+        }
+
+      if (PG_ARGISNULL(5)) {
+        sql = NULL;
+      } else {
+        sql = text_to_cstring(PG_GETARG_TEXT_P(5));
+        if (strlen(sql) == 0)
+            sql = NULL;
+      }
+
+      PGR_DBG("Calling compute_trsp");
+
+
+      ret = compute_trsp(text_to_cstring(PG_GETARG_TEXT_P(0)),
+                                   1,  // do vertex
+                                   PG_GETARG_INT32(1),
+                                   0.5,
+                                   PG_GETARG_INT32(2),
+                                   0.5,
+                                   PG_GETARG_BOOL(3),
+                                   PG_GETARG_BOOL(4),
+                                   sql,
+                                   &path, &path_count);
+#ifdef DEBUG
+      double total_cost = 0;
+      PGR_DBG("Ret is %i", ret);
+      if (ret >= 0) {
+          int i;
+          for (i = 0; i < path_count; i++) {
+         // PGR_DBG("Step %i vertex_id  %i ", i, path[i].vertex_id);
+           // PGR_DBG("        edge_id    %i ", path[i].edge_id);
+             // PGR_DBG("        cost       %f ", path[i].cost);
+              total_cost += path[i].cost;
+            }
+        }
+        PGR_DBG("Total cost is: %f", total_cost);
+#endif
+
+      // total number of tuples to be returned
+#if 1
+#if PGSQL_VERSION > 95
+        funcctx->max_calls = path_count;
+#else
+        funcctx->max_calls = (uint32_t)path_count;
+#endif
+#else
+      funcctx->max_calls = path_count;
+#endif
+      funcctx->user_fctx = path;
+
+      funcctx->tuple_desc =
+        BlessTupleDesc(RelationNameGetTupleDesc("pgr_costResult"));
+
+      MemoryContextSwitchTo(oldcontext);
+    }
+
+  // stuff done on every call of the function
+  funcctx = SRF_PERCALL_SETUP();
+
+#if 0
+  call_cntr = funcctx->call_cntr;
+  max_calls = funcctx->max_calls;
+#endif
+  tuple_desc = funcctx->tuple_desc;
+  path = (path_element_tt*) funcctx->user_fctx;
+
+  if (funcctx->call_cntr < funcctx->max_calls) {
+      // do when there is more left to send
+      HeapTuple    tuple;
+      Datum        result;
+      Datum *values;
+      bool* nulls;
+
+      values = palloc(4 * sizeof(Datum));
+      nulls = palloc(4 * sizeof(char));
+
+      values[0] = Int32GetDatum(funcctx->call_cntr);
+      nulls[0] = false;
+      values[1] = Int32GetDatum(path[funcctx->call_cntr].vertex_id);
+      nulls[1] = false;
+      values[2] = Int32GetDatum(path[funcctx->call_cntr].edge_id);
+      nulls[2] = false;
+      values[3] = Float8GetDatum(path[funcctx->call_cntr].cost);
+      nulls[3] = false;
+
+      tuple = heap_form_tuple(tuple_desc, values, nulls);
+
+      // make the tuple into a datum
+      result = HeapTupleGetDatum(tuple);
+
+      // clean up (this is not really necessary)
+      pfree(values);
+      pfree(nulls);
+
+      SRF_RETURN_NEXT(funcctx, result);
+  } else {  // do when there is no more left
+      PGR_DBG("Going to free path");
+      if (path) free(path);
+      SRF_RETURN_DONE(funcctx);
+    }
+}
+#endif
+
+PG_FUNCTION_INFO_V1(turn_restrict_shortest_path_edge);
+PGDLLEXPORT Datum
+turn_restrict_shortest_path_edge(PG_FUNCTION_ARGS) {
+  FuncCallContext     *funcctx;
+#if 0
+  uint32_t             call_cntr;
+  uint32_t             max_calls;
+#endif
+  TupleDesc            tuple_desc;
+  path_element_tt      *path;
+  char *               sql;
+
+  // stuff done only on the first call of the function
+  if (SRF_IS_FIRSTCALL()) {
+      MemoryContext   oldcontext;
+      size_t path_count = 0;
+#ifdef DEBUG
+      int ret = -1;
+#endif
+      int i;
+      double s_pos;
+      double e_pos;
+
+      // create a function context for cross-call persistence
+      funcctx = SRF_FIRSTCALL_INIT();
+
+      // switch to memory context appropriate for multiple function calls
+      oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
+
+      // verify that the first 5 args are not NULL
+      for (i = 0; i < 7; i++) {
+        if (i == 2 || i == 4) continue;
+        if (PG_ARGISNULL(i)) {
+            elog(ERROR, "turn_restrict_shortest_path(): "
+            "Argument %i may not be NULL", i+1);
+        }
+      }
+
+      if (PG_ARGISNULL(2)) {
+        s_pos = 0.5;
+      } else {
+        s_pos = PG_GETARG_FLOAT8(2);
+        if (s_pos < 0.0) s_pos = 0.5;
+        if (s_pos > 1.0) s_pos = 0.5;
+      }
+
+      if (PG_ARGISNULL(4)) {
+        e_pos = 0.5;
+      } else {
+        e_pos = PG_GETARG_FLOAT8(4);
+        if (e_pos < 0.0) e_pos = 0.5;
+        if (e_pos > 1.0) e_pos = 0.5;
+      }
+
+      if (PG_ARGISNULL(7)) {
+        sql = NULL;
+      } else {
+        sql = text_to_cstring(PG_GETARG_TEXT_P(7));
+        if (strlen(sql) == 0)
+            sql = NULL;
+      }
+
+      PGR_DBG("Calling compute_trsp");
+
+#ifdef DEBUG
+      ret =
+#endif
+         compute_trsp(text_to_cstring(PG_GETARG_TEXT_P(0)),
+                                   0,  // sdo edge
+                                   PG_GETARG_INT32(1),
+                                   s_pos,
+                                   PG_GETARG_INT32(3),
+                                   e_pos,
+                                   PG_GETARG_BOOL(5),
+                                   PG_GETARG_BOOL(6),
+                                   sql,
+                                   &path, &path_count);
+#ifdef DEBUG
+      double total_cost = 0;
+      PGR_DBG("Ret is %i", ret);
+      if (ret >= 0) {
+          int i;
+          for (i = 0; i < path_count; i++) {
+         //     PGR_DBG("Step %i vertex_id  %i ", i, path[i].vertex_id);
+           //   PGR_DBG("        edge_id    %i ", path[i].edge_id);
+             // PGR_DBG("        cost       %f ", path[i].cost);
+              total_cost+=path[i].cost;
+            }
+        }
+        PGR_DBG("Total cost is: %f", total_cost);
+#endif
+
+      // total number of tuples to be returned
+#if 1
+#if PGSQL_VERSION > 95
+        funcctx->max_calls = path_count;
+#else
+        funcctx->max_calls = (uint32_t)path_count;
+#endif
+#else
+      funcctx->max_calls = path_count;
+#endif
+      funcctx->user_fctx = path;
+
+      funcctx->tuple_desc =
+        BlessTupleDesc(RelationNameGetTupleDesc("pgr_costResult"));
+
+      MemoryContextSwitchTo(oldcontext);
+    }
+
+  // stuff done on every call of the function
+  funcctx = SRF_PERCALL_SETUP();
+
+#if 0
+  call_cntr = funcctx->call_cntr;
+  max_calls = funcctx->max_calls;
+#endif
+  tuple_desc = funcctx->tuple_desc;
+  path = (path_element_tt*) funcctx->user_fctx;
+
+  if (funcctx->call_cntr < funcctx->max_calls) {
+      // do when there is more left to send
+      HeapTuple    tuple;
+      Datum        result;
+      Datum *values;
+      bool* nulls;
+
+      values = palloc(4 * sizeof(Datum));
+      nulls = palloc(4 * sizeof(char));
+
+      values[0] = Int32GetDatum(funcctx->call_cntr);
+      nulls[0] = false;
+      values[1] = Int32GetDatum(path[funcctx->call_cntr].vertex_id);
+      nulls[1] = false;
+      values[2] = Int32GetDatum(path[funcctx->call_cntr].edge_id);
+      nulls[2] = false;
+      values[3] = Float8GetDatum(path[funcctx->call_cntr].cost);
+      nulls[3] = false;
+
+      tuple = heap_form_tuple(tuple_desc, values, nulls);
+
+      // make the tuple into a datum
+      result = HeapTupleGetDatum(tuple);
+
+      // clean up (this is not really necessary)
+      pfree(values);
+      pfree(nulls);
+
+      SRF_RETURN_NEXT(funcctx, result);
+    } else {  // do when there is no more left
+      PGR_DBG("Going to free path");
+      if (path) free(path);
+      SRF_RETURN_DONE(funcctx);
+    }
+}
diff --git a/src/trsp/trsp_core.cpp b/src/trsp/trsp_core.cpp
new file mode 100644
index 0000000..60fd28c
--- /dev/null
+++ b/src/trsp/trsp_core.cpp
@@ -0,0 +1,132 @@
+/*PGR-GNU*****************************************************************
+
+File: trsp_core.cpp
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#ifdef __MINGW32__
+#include <winsock2.h>
+#include <windows.h>
+#endif
+
+#include "trsp/GraphDefinition.h"
+
+
+int trsp_node_wrapper(
+    edge_t *edges,
+    size_t edge_count,
+    restrict_t *restricts,
+    size_t restrict_count,
+    int64_t start_vertex,
+    int64_t end_vertex,
+    bool directed,
+    bool has_reverse_cost,
+    path_element_tt **path,
+    size_t *path_count,
+    char **err_msg
+    ) {
+    try {
+        std::vector<PDVI> ruleTable;
+
+        size_t i, j;
+        ruleTable.clear();
+        for (i = 0; i < restrict_count; i++) {
+            std::vector<long> seq;
+            seq.clear();
+            seq.push_back(restricts[i].target_id);
+            for (j = 0; j < MAX_RULE_LENGTH && restricts[i].via[j] > -1; j++) {
+                seq.push_back(restricts[i].via[j]);
+            }
+            ruleTable.push_back(make_pair(restricts[i].to_cost, seq));
+        }
+
+        GraphDefinition gdef;
+        int res = gdef.my_dijkstra(edges, edge_count, start_vertex, end_vertex,
+            directed, has_reverse_cost, path, path_count, err_msg, ruleTable);
+
+
+        if (res < 0)
+            return res;
+        else
+            return EXIT_SUCCESS;
+    }
+    catch(std::exception& e) {
+        *err_msg = (char *) e.what();
+        return -1;
+    }
+    catch(...) {
+        *err_msg = (char *) "Caught unknown exception!";
+        return -1;
+    }
+}
+
+int trsp_edge_wrapper(
+    edge_t *edges,
+    size_t edge_count,
+    restrict_t *restricts,
+    size_t restrict_count,
+    int64_t start_edge,
+    double start_pos,
+    int64_t end_edge,
+    double end_pos,
+    bool directed,
+    bool has_reverse_cost,
+    path_element_tt **path,
+    size_t *path_count,
+    char **err_msg
+    ) {
+    try {
+        std::vector<PDVI> ruleTable;
+
+        size_t i, j;
+        ruleTable.clear();
+        for (i = 0; i < restrict_count; i++) {
+            std::vector<long> seq;
+            seq.clear();
+            seq.push_back(restricts[i].target_id);
+            for (j = 0; j < MAX_RULE_LENGTH && restricts[i].via[j] >- 1; j++) {
+                seq.push_back(restricts[i].via[j]);
+            }
+            ruleTable.push_back(make_pair(restricts[i].to_cost, seq));
+        }
+
+        GraphDefinition gdef;
+        auto res = gdef.my_dijkstra(edges, edge_count, start_edge, start_pos,
+            end_edge, end_pos, directed, has_reverse_cost, path, path_count,
+            err_msg, ruleTable);
+
+
+        if (res < 0)
+            return res;
+        else
+            return EXIT_SUCCESS;
+    }
+    catch(std::exception& e) {
+        *err_msg = (char *) e.what();
+        return -1;
+    }
+    catch(...) {
+        *err_msg = (char *) "Caught unknown exception!";
+        return -1;
+    }
+}
diff --git a/src/trsp/trsp_driver.cpp b/src/trsp/trsp_driver.cpp
new file mode 100644
index 0000000..3606da9
--- /dev/null
+++ b/src/trsp/trsp_driver.cpp
@@ -0,0 +1,145 @@
+/*PGR-GNU*****************************************************************
+
+File: trsp_driver.cpp
+
+Copyright (c) 2017 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+
+#include "drivers/trsp/trsp_driver.h"
+#include <utility>
+#include <vector>
+#include <cstdint>
+#include <sstream>
+#include <algorithm>
+#include "trsp/pgr_trspHandler.h"
+#include "trsp/rule.h"
+#include "cpp_common/pgr_assert.h"
+#include "cpp_common/pgr_alloc.hpp"
+
+
+
+void
+do_trsp(
+        pgr_edge_t *edges,
+        size_t total_edges,
+
+        Restriction_t *restrictions,
+        size_t restrictions_size,
+
+        int64_t  *start_vidsArr,
+        size_t size_start_vidsArr,
+
+        int64_t  *end_vidsArr,
+        size_t size_end_vidsArr,
+
+        bool directed,
+
+        General_path_element_t **return_tuples,
+        size_t *return_count,
+        char **log_msg,
+        char **notice_msg,
+        char **err_msg) {
+    std::ostringstream log;
+    std::ostringstream err;
+    std::ostringstream notice;
+    try {
+        pgassert(*return_tuples == NULL);
+        pgassert(*return_count == 0);
+        pgassert(*log_msg == NULL);
+        pgassert(*notice_msg == NULL);
+        pgassert(*err_msg == NULL);
+
+
+        std::vector<pgrouting::trsp::Rule> ruleList;
+        for (size_t i = 0; i < restrictions_size; ++i) {
+            ruleList.push_back(pgrouting::trsp::Rule(*(restrictions + i)));
+        }
+
+        /*
+         * Inserting vertices into a c++ vector structure
+         */
+        std::vector<int64_t>
+            sources(start_vidsArr, start_vidsArr + size_start_vidsArr);
+        std::vector< int64_t >
+            targets(end_vidsArr, end_vidsArr + size_end_vidsArr);
+
+        /*
+         * ordering and removing duplicates
+         */
+        std::sort(sources.begin(), sources.end());
+        sources.erase(
+                std::unique(sources.begin(), sources.end()),
+                sources.end());
+
+        std::sort(targets.begin(), targets.end());
+        targets.erase(
+                std::unique(targets.begin(), targets.end()),
+                targets.end());
+
+
+
+        pgrouting::trsp::Pgr_trspHandler gdef(
+                edges,
+                total_edges,
+                directed,
+                ruleList);
+
+        auto paths = gdef.process(
+                sources,
+                targets);
+
+
+        size_t count(0);
+        count = count_tuples(paths);
+
+        if (count == 0) {
+            (*return_tuples) = NULL;
+            (*return_count) = 0;
+            return;
+        }
+
+        (*return_tuples) = pgr_alloc(count, (*return_tuples));
+        (*return_count) = collapse_paths(return_tuples, paths);
+
+
+        return;
+    } catch (AssertFailedException &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch (std::exception &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch(...) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << "Caught unknown exception!";
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    }
+}
+
diff --git a/src/tsp/src/CMakeLists.txt b/src/tsp/CMakeLists.txt
similarity index 100%
rename from src/tsp/src/CMakeLists.txt
rename to src/tsp/CMakeLists.txt
diff --git a/src/tsp/Dmatrix.cpp b/src/tsp/Dmatrix.cpp
new file mode 100644
index 0000000..b15b17c
--- /dev/null
+++ b/src/tsp/Dmatrix.cpp
@@ -0,0 +1,222 @@
+/*PGR-GNU*****************************************************************
+
+FILE: Dmatrix.cpp
+
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ ********************************************************************PGR-GNU*/
+
+#include "cpp_common/Dmatrix.h"
+
+#include <string.h>
+#include <sstream>
+#include <algorithm>
+#include <limits>
+#include <vector>
+#include <cmath>
+
+#include "tsp/tour.h"
+#include "cpp_common/pgr_assert.h"
+
+
+namespace pgrouting {
+namespace tsp {
+
+double
+Dmatrix::tourCost(const Tour &tour) const {
+    double total_cost(0);
+    if (tour.cities.empty()) return total_cost;
+
+    auto prev_id = tour.cities.front();
+    for (const auto &id : tour.cities) {
+        if (id == tour.cities.front()) continue;
+
+        pgassert(distance(prev_id, id) != (std::numeric_limits<double>::max)());
+
+        total_cost += costs[prev_id][id];
+        prev_id = id;
+    }
+    total_cost += costs[prev_id][tour.cities.front()];
+    return total_cost;
+}
+
+
+
+void
+Dmatrix::set_ids(const std::vector < Matrix_cell_t > &data_costs) {
+    ids.reserve(data_costs.size() * 2);
+    for (const auto &cost : data_costs) {
+        ids.push_back(cost.from_vid);
+        ids.push_back(cost.to_vid);
+    }
+    std::sort(ids.begin(), ids.end());
+    ids.erase(std::unique(ids.begin(), ids.end()), ids.end());
+    /*
+     * freeing up unused space
+     */
+    ids.shrink_to_fit();
+}
+
+bool
+Dmatrix::has_id(int64_t id) const {
+    auto pos = std::lower_bound(ids.begin(), ids.end(), id);
+    return *pos == id;
+}
+
+
+/*! given a users id returns the internal index
+ *
+ * in[] id
+ * returns index
+ */
+size_t
+Dmatrix::get_index(int64_t id) const {
+    auto pos = std::lower_bound(ids.begin(), ids.end(), id);
+    return pos - ids.begin();
+}
+
+int64_t
+Dmatrix::get_id(size_t id) const {
+    return ids[id];
+}
+
+/*
+ * Transforms the input data to a matrix
+ */
+Dmatrix::Dmatrix(const std::vector < Matrix_cell_t > &data_costs) {
+    set_ids(data_costs);
+    costs.resize(
+            ids.size(),
+            std::vector<double>(
+                ids.size(),
+                (std::numeric_limits<double>::max)()));
+
+    for (const auto &data : data_costs) {
+        costs[get_index(data.from_vid)][get_index(data.to_vid)] = data.cost;
+    }
+
+    for (size_t i = 0; i < costs.size(); ++i) {
+        costs[i][i] = 0;
+    }
+}
+
+bool
+Dmatrix::has_no_infinity() const {
+    for (const auto &row : costs) {
+        for (const auto &val : row) {
+            if (val == (std::numeric_limits<double>::infinity)()) return false;
+            if (val == (std::numeric_limits<double>::max)()) return false;
+        }
+    }
+    return true;
+}
+
+
+/*!
+ * Triangle Inequality Theorem.
+ *  The sum of the lengths of any two sides of a triangle is greater than the length of the third side.
+ *  NOTE: can also be equal for streets
+ * costs[i][k] != inf
+ * costs[i][k] <= costs[i][j] + costs[j][k] 
+ */
+bool
+Dmatrix::obeys_triangle_inequality() const {
+    for (size_t i = 0; i < costs.size(); ++i) {
+        for (size_t j = 0; j < costs.size(); ++j) {
+            for (size_t k = 0; k < costs.size(); ++k) {
+                if (!(costs[i][k] <= (costs[i][j] + costs[j][k]))) return false;
+            }
+        }
+    }
+    return true;
+}
+
+bool
+Dmatrix::is_symmetric() const {
+    for (size_t i = 0; i < costs.size(); ++i) {
+        for (size_t j = 0; j < costs.size(); ++j) {
+            if (0.000001 < std::fabs(costs[i][j] - costs[j][i])) {
+                std::ostringstream log;
+                log << "i \t" << i
+                    << "j \t" << j
+                    << "costs[i][j] \t" << costs[i][j]
+                    << "costs[j][i] \t" << costs[j][i]
+                    << "\n";
+                log << (*this);
+                pgassertwm(false, log.str());
+                return false;
+            }
+        }
+    }
+    return true;
+}
+
+
+/**
+ * 
+ */
+std::ostream& operator<<(std::ostream &log, const Dmatrix &matrix) {
+    for (const auto id : matrix.ids) {
+        log << "\t" << id;
+    }
+    log << "\n";
+    size_t i = 0;
+    for (const auto row : matrix.costs) {
+        size_t j = 0;
+        for (const auto cost : row) {
+            log << "Internal(" << i << "," << j << ")"
+                << "\tUsers(" << matrix.ids[i] << "," << matrix.ids[j] << ")"
+                << "\t = " << cost
+#if 0
+                << "\t(" << matrix.get_index(matrix.ids[i])
+                << "," << matrix.get_index(matrix.ids[j]) << ")"
+                << "\t = " << matrix.costs[i][j]
+                << "\t = " << matrix.costs[j][i]
+                << "=inf:"
+                <<  (matrix.costs[i][j] ==
+                        (std::numeric_limits<double>::infinity)())
+                << "=inf:"
+                <<  (matrix.costs[j][i] ==
+                        (std::numeric_limits<double>::infinity)())
+#endif
+                << "\n";
+            ++j;
+        }
+        ++i;
+    }
+#if 0
+    for (size_t i = 0; i < matrix.costs.size(); ++i) {
+        for (size_t j = 0; j < matrix.costs.size(); ++j) {
+            for (size_t k = 0; k < matrix.costs.size(); ++k) {
+                log << matrix.costs[i][k] << " <= ("
+                    << matrix.costs[i][j] << " + "  << matrix.costs[j][k] << ")"
+                    << (matrix.costs[i][k]
+                            <= (matrix.costs[i][j] + matrix.costs[j][k]))
+                    << "\n";
+            }
+        }
+    }
+#endif
+    return log;
+}
+
+
+}  // namespace tsp
+}  // namespace pgrouting
diff --git a/src/tsp/src/eucledianDmatrix.cpp b/src/tsp/eucledianDmatrix.cpp
similarity index 100%
rename from src/tsp/src/eucledianDmatrix.cpp
rename to src/tsp/eucledianDmatrix.cpp
diff --git a/src/tsp/src/eucledianTSP.c b/src/tsp/eucledianTSP.c
similarity index 100%
rename from src/tsp/src/eucledianTSP.c
rename to src/tsp/eucledianTSP.c
diff --git a/src/tsp/src/eucledianTSP_driver.cpp b/src/tsp/eucledianTSP_driver.cpp
similarity index 100%
rename from src/tsp/src/eucledianTSP_driver.cpp
rename to src/tsp/eucledianTSP_driver.cpp
diff --git a/src/tsp/src/newTSP.c b/src/tsp/newTSP.c
similarity index 100%
rename from src/tsp/src/newTSP.c
rename to src/tsp/newTSP.c
diff --git a/src/tsp/src/newTSP_driver.cpp b/src/tsp/newTSP_driver.cpp
similarity index 100%
rename from src/tsp/src/newTSP_driver.cpp
rename to src/tsp/newTSP_driver.cpp
diff --git a/src/tsp/src/Dmatrix.cpp b/src/tsp/src/Dmatrix.cpp
deleted file mode 100644
index 7c147c3..0000000
--- a/src/tsp/src/Dmatrix.cpp
+++ /dev/null
@@ -1,218 +0,0 @@
-/*PGR-GNU*****************************************************************
-
-FILE: Dmatrix.cpp
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
- ********************************************************************PGR-GNU*/
-
-#include "cpp_common/Dmatrix.h"
-
-#include <string.h>
-#include <sstream>
-#include <algorithm>
-#include <limits>
-#include <vector>
-#include <cmath>
-
-#include "tsp/tour.h"
-#include "cpp_common/pgr_assert.h"
-
-
-namespace pgrouting {
-namespace tsp {
-
-double
-Dmatrix::tourCost(const Tour &tour) const {
-    double total_cost(0);
-    if (tour.cities.empty()) return total_cost;
-
-    auto prev_id = tour.cities.front();
-    for (const auto &id : tour.cities) {
-        if (id == tour.cities.front()) continue;
-
-        pgassert(distance(prev_id, id) != (std::numeric_limits<double>::max)());
-
-        total_cost += costs[prev_id][id];
-        prev_id = id;
-    }
-    total_cost += costs[prev_id][tour.cities.front()];
-    return total_cost;
-}
-
-
-
-void
-Dmatrix::set_ids(const std::vector < Matrix_cell_t > &data_costs) {
-    ids.reserve(data_costs.size() * 2);
-    for (const auto &cost : data_costs) {
-        ids.push_back(cost.from_vid);
-        ids.push_back(cost.to_vid);
-    }
-    std::sort(ids.begin(), ids.end());
-    ids.erase(std::unique(ids.begin(), ids.end()), ids.end());
-    /*
-     * freeing up unused space
-     */
-    ids.shrink_to_fit();
-}
-
-bool
-Dmatrix::has_id(int64_t id) const {
-    auto pos = std::lower_bound(ids.begin(), ids.end(), id);
-    return *pos == id;
-}
-
-
-/*! given a users id returns the internal index
- *
- * in[] id
- * returns index
- */
-size_t
-Dmatrix::get_index(int64_t id) const {
-    auto pos = std::lower_bound(ids.begin(), ids.end(), id);
-    return pos - ids.begin();
-}
-
-int64_t
-Dmatrix::get_id(size_t id) const {
-    return ids[id];
-}
-
-/*
- * Transforms the input data to a matrix
- */
-Dmatrix::Dmatrix(const std::vector < Matrix_cell_t > &data_costs) {
-    set_ids(data_costs);
-    costs.resize(
-            ids.size(),
-            std::vector<double>(
-                ids.size(),
-                (std::numeric_limits<double>::max)()));
-
-    for (const auto &data : data_costs) {
-        costs[get_index(data.from_vid)][get_index(data.to_vid)] = data.cost;
-    }
-
-    for (size_t i = 0; i < costs.size(); ++i) {
-        costs[i][i] = 0;
-    }
-}
-
-bool
-Dmatrix::has_no_infinity() const {
-    for (const auto &row : costs) {
-        for (const auto &val : row) {
-            if (val == (std::numeric_limits<double>::infinity)()) return false;
-            if (val == (std::numeric_limits<double>::max)()) return false;
-        }
-    }
-    return true;
-}
-
-
-/*!
- * Triangle Inequality Theorem.
- *  The sum of the lengths of any two sides of a triangle is greater than the length of the third side.
- *  NOTE: can also be equal for streets
- * costs[i][k] != inf
- * costs[i][k] <= costs[i][j] + costs[j][k] 
- */
-bool
-Dmatrix::obeys_triangle_inequality() const {
-    for (size_t i = 0; i < costs.size(); ++i) {
-        for (size_t j = 0; j < costs.size(); ++j) {
-            for (size_t k = 0; k < costs.size(); ++k) {
-                if (!(costs[i][k] <= (costs[i][j] + costs[j][k]))) return false;
-            }
-        }
-    }
-    return true;
-}
-
-bool
-Dmatrix::is_symmetric() const {
-    for (size_t i = 0; i < costs.size(); ++i) {
-        for (size_t j = 0; j < costs.size(); ++j) {
-            if (0.000001 < std::fabs(costs[i][j] - costs[j][i])) {
-                std::ostringstream log;
-                log << "i \t" << i
-                    << "j \t" << j
-                    << "costs[i][j] \t" << costs[i][j]
-                    << "costs[j][i] \t" << costs[j][i]
-                    << "\n";
-                log << (*this);
-                pgassertwm(false, log.str());
-                return false;
-            }
-        }
-    }
-    return true;
-}
-
-
-/**
- * 
- */
-std::ostream& operator<<(std::ostream &log, const Dmatrix &matrix) {
-    for (const auto id : matrix.ids) {
-        log << "\t" << id;
-    }
-    log << "\n";
-    size_t i = 0;
-    for (const auto row : matrix.costs) {
-        size_t j = 0;
-        for (const auto cost : row) {
-            log << "Internal(" << i << "," << j << ")"
-                << "\tUsers(" << matrix.ids[i] << "," << matrix.ids[j] << ")"
-                << "\t = " << cost
-#if 0
-                << "\t(" << matrix.get_index(matrix.ids[i])
-                << "," << matrix.get_index(matrix.ids[j]) << ")"
-                << "\t = " << matrix.costs[i][j]
-                << "\t = " << matrix.costs[j][i]
-                << "=inf:" <<  (matrix.costs[i][j] == (std::numeric_limits<double>::infinity)())
-                << "=inf:" <<  (matrix.costs[j][i] == (std::numeric_limits<double>::infinity)())
-#endif
-                << "\n";
-            ++j;
-        }
-        ++i;
-    }
-#if 0
-    for (size_t i = 0; i < matrix.costs.size(); ++i) {
-        for (size_t j = 0; j < matrix.costs.size(); ++j) {
-            for (size_t k = 0; k < matrix.costs.size(); ++k) {
-                log << matrix.costs[i][k] << " <= ("
-                    << matrix.costs[i][j] << " + "  << matrix.costs[j][k] << ")"
-                    << (matrix.costs[i][k]
-                            <= (matrix.costs[i][j] + matrix.costs[j][k]))
-                    << "\n";
-            }
-        }
-    }
-#endif
-    return log;
-}
-
-
-}  // namespace tsp
-}  // namespace pgrouting
diff --git a/src/tsp/test/development/qa194-tsp.test.sql b/src/tsp/test/development/qa194-tsp.test.sql
deleted file mode 100644
index 6e67342..0000000
--- a/src/tsp/test/development/qa194-tsp.test.sql
+++ /dev/null
@@ -1,272 +0,0 @@
--- http://www.math.uwaterloo.ca/tsp/world/qa194.tsp
-
--- NAME : qa194
--- COMMENT : 194 locations in Qatar
--- COMMENT : Derived from National Imagery and Mapping Agency data
--- TYPE : TSP
--- DIMENSION : 194
--- EDGE_WEIGHT_TYPE : EUC_2D
--- NODE_COORD_SECTION
-
-
-
-CREATE TABLE qa194 (id BIGINT, x FLOAT, y FLOAT, the_geom geometry);
-COPY qa194 (id, x, y) FROM stdin WITH DELIMITER ' ';
-1 24748.3333 50840.0000
-2 24758.8889 51211.9444
-3 24827.2222 51394.7222
-4 24904.4444 51175.0000
-5 24996.1111 51548.8889
-6 25010.0000 51039.4444
-7 25030.8333 51275.2778
-8 25067.7778 51077.5000
-9 25100.0000 51516.6667
-10 25103.3333 51521.6667
-11 25121.9444 51218.3333
-12 25150.8333 51537.7778
-13 25158.3333 51163.6111
-14 25162.2222 51220.8333
-15 25167.7778 51606.9444
-16 25168.8889 51086.3889
-17 25173.8889 51269.4444
-18 25210.8333 51394.1667
-19 25211.3889 51619.1667
-20 25214.1667 50807.2222
-21 25214.4444 51378.8889
-22 25223.3333 51451.6667
-23 25224.1667 51174.4444
-24 25233.3333 51333.3333
-25 25234.1667 51203.0556
-26 25235.5556 51330.0000
-27 25235.5556 51495.5556
-28 25242.7778 51428.8889
-29 25243.0556 51452.5000
-30 25252.5000 51559.1667
-31 25253.8889 51535.2778
-32 25253.8889 51549.7222
-33 25256.9444 51398.8889
-34 25263.6111 51516.3889
-35 25265.8333 51545.2778
-36 25266.6667 50969.1667
-37 25266.6667 51483.3333
-38 25270.5556 51532.7778
-39 25270.8333 51505.8333
-40 25270.8333 51523.0556
-41 25275.8333 51533.6111
-42 25277.2222 51547.7778
-43 25278.3333 51525.5556
-44 25278.3333 51541.3889
-45 25279.1667 51445.5556
-46 25281.1111 51535.0000
-47 25281.3889 51512.5000
-48 25283.3333 51533.3333
-49 25283.6111 51546.6667
-50 25284.7222 51555.2778
-51 25286.1111 51504.1667
-52 25286.1111 51534.1667
-53 25286.6667 51533.3333
-54 25287.5000 51537.7778
-55 25288.0556 51546.6667
-56 25290.8333 51528.3333
-57 25291.9444 51424.4444
-58 25292.5000 51520.8333
-59 25298.6111 51001.6667
-60 25300.8333 51394.4444
-61 25306.9444 51507.7778
-62 25311.9444 51003.0556
-63 25313.8889 50883.3333
-64 25315.2778 51438.6111
-65 25316.6667 50766.6667
-66 25320.5556 51495.5556
-67 25322.5000 51507.7778
-68 25325.2778 51470.0000
-69 25326.6667 51350.2778
-70 25337.5000 51425.0000
-71 25339.1667 51173.3333
-72 25340.5556 51293.6111
-73 25341.9444 51507.5000
-74 25358.8889 51333.6111
-75 25363.6111 51281.1111
-76 25368.6111 51226.3889
-77 25374.4444 51436.6667
-78 25377.7778 51294.7222
-79 25396.9444 51422.5000
-80 25400.0000 51183.3333
-81 25400.0000 51425.0000
-82 25404.7222 51073.0556
-83 25416.9444 51403.8889
-84 25416.9444 51457.7778
-85 25419.4444 50793.6111
-86 25429.7222 50785.8333
-87 25433.3333 51220.0000
-88 25440.8333 51378.0556
-89 25444.4444 50958.3333
-90 25451.3889 50925.0000
-91 25459.1667 51316.6667
-92 25469.7222 51397.5000
-93 25478.0556 51362.5000
-94 25480.5556 50938.8889
-95 25483.3333 51383.3333
-96 25490.5556 51373.6111
-97 25492.2222 51400.2778
-98 25495.0000 50846.6667
-99 25495.0000 50965.2778
-100 25497.5000 51485.2778
-101 25500.8333 50980.5556
-102 25510.5556 51242.2222
-103 25531.9444 51304.4444
-104 25533.3333 50977.2222
-105 25538.8889 51408.3333
-106 25545.8333 51387.5000
-107 25549.7222 51431.9444
-108 25550.0000 51433.3333
-109 25560.2778 51158.6111
-110 25566.9444 51484.7222
-111 25567.5000 50958.8889
-112 25574.7222 51486.3889
-113 25585.5556 51151.3889
-114 25609.4444 51092.2222
-115 25610.2778 51475.2778
-116 25622.5000 51454.4444
-117 25645.8333 51450.0000
-118 25650.0000 51372.2222
-119 25666.9444 51174.4444
-120 25683.8889 51505.8333
-121 25686.3889 51468.8889
-122 25696.1111 51260.8333
-123 25700.8333 51584.7222
-124 25708.3333 51591.6667
-125 25716.6667 51050.0000
-126 25717.5000 51057.7778
-127 25723.0556 51004.1667
-128 25734.7222 51547.5000
-129 25751.1111 51449.1667
-130 25751.9444 50920.8333
-131 25758.3333 51395.8333
-132 25765.2778 51019.7222
-133 25772.2222 51483.3333
-134 25775.8333 51023.0556
-135 25779.1667 51449.7222
-136 25793.3333 51409.4444
-137 25808.3333 51060.5556
-138 25816.6667 51133.3333
-139 25823.6111 51152.5000
-140 25826.6667 51043.8889
-141 25829.7222 51245.2778
-142 25833.3333 51072.2222
-143 25839.1667 51465.2778
-144 25847.7778 51205.8333
-145 25850.0000 51033.3333
-146 25856.6667 51083.3333
-147 25857.5000 51298.8889
-148 25857.5000 51441.3889
-149 25866.6667 51066.6667
-150 25867.7778 51205.5556
-151 25871.9444 51354.7222
-152 25872.5000 51258.3333
-153 25880.8333 51221.3889
-154 25883.0556 51185.2778
-155 25888.0556 51386.3889
-156 25900.0000 51000.0000
-157 25904.1667 51201.6667
-158 25928.3333 51337.5000
-159 25937.5000 51313.3333
-160 25944.7222 51456.3889
-161 25950.0000 51066.6667
-162 25951.6667 51349.7222
-163 25957.7778 51075.2778
-164 25958.3333 51099.4444
-165 25966.6667 51283.3333
-166 25983.3333 51400.0000
-167 25983.6111 51328.0556
-168 26000.2778 51294.4444
-169 26008.6111 51083.6111
-170 26016.6667 51333.3333
-171 26021.6667 51366.9444
-172 26033.3333 51116.6667
-173 26033.3333 51166.6667
-174 26033.6111 51163.8889
-175 26033.6111 51200.2778
-176 26048.8889 51056.9444
-177 26050.0000 51250.0000
-178 26050.2778 51297.5000
-179 26050.5556 51135.8333
-180 26055.0000 51316.1111
-181 26067.2222 51258.6111
-182 26074.7222 51083.6111
-183 26076.6667 51166.9444
-184 26077.2222 51222.2222
-185 26078.0556 51361.6667
-186 26083.6111 51147.2222
-187 26099.7222 51161.1111
-188 26108.0556 51244.7222
-189 26116.6667 51216.6667
-190 26123.6111 51169.1667
-191 26123.6111 51222.7778
-192 26133.3333 51216.6667
-193 26133.3333 51300.0000
-194 26150.2778 51108.0556
-\.
-
-
-UPDATE qa194 SET the_geom = ST_makePoint(x,y);
--- SELECT * from pgr_tsp('SELECT id::integer, x, y from qa194', 1);
-
-SET client_min_messages TO DEBUG1;
-SELECT * from pgr_eucledianTSP($$SELECT id::integer, x, y from qa194$$);
-SELECT * from pgr_eucledianTSP($$SELECT id::integer, x, y from qa194$$, max_processing_time := 3);
-
-/*
-CREATE VIEW qa194_path AS
-WITH
-results AS (
-    SELECT seq, node, cost, agg_cost from pgr_xydtsp($$select * from pgr_eucledianDmatrix('qa194'::regclass)$$, 1)
-),
-geoms AS (
-    SELECT seq, node, cost, agg_cost, the_geom AS second  FROM results JOIN qa194 ON (node = id)
-),
-edges AS (
-    SELECT seq, node, ST_MakeLine(lag(second) over(), second) AS line, cost, agg_cost FROM geoms
-)
-SELECT * FROM edges;
-
-WITH
-results AS (
-    SELECT * from pgr_xydtsp($$select * from 
-        pgr_eucledianDmatrix('SELECT id::integer, st_x(the_geom) as x, st_y(the_geom) as y FROM edge_table_vertices_pgr')$$, 6, 5)
-),
-geoms AS (
-    SELECT seq, node, cost, agg_cost, the_geom AS second  FROM results JOIN edge_table_vertices_pgr ON (node = id) order by seq
-),
-edges AS (
-    SELECT seq, node, ST_MakeLine(lag(second) over(), second) AS line, cost, agg_cost FROM geoms
-)
-SELECT * INTO newtsp FROM edges;
-
-
-WITH
-results AS (
-    SELECT * from pgr_tsp(
-        'SELECT id::integer, st_x(the_geom) as x, st_y(the_geom) as y FROM edge_table_vertices_pgr', 6, 5)
-),
-geoms AS (
-    SELECT results.*, the_geom AS second  FROM results JOIN edge_table_vertices_pgr ON (id2 = id)
-),
-edges AS (
-    SELECT seq, id1, id2, cost, ST_MakeLine(lag(second) over(), second) AS line FROM geoms order by seq
-)
-SELECT * INTO oldtsp FROM edges;
-
-
-WITH
-results AS (
-    select * from pgr_xydtsp($$SELECT * from pgr_dijkstraDmatrix('SELECT id, source, target, cost, reverse_cost from edge_table', array[1,2,3,4,5,6,7,8,9,10,11,12,13], false)$$, 6,5)
-),
-geoms AS (
-    SELECT seq, node, cost, agg_cost, the_geom AS second  FROM results JOIN edge_table_vertices_pgr ON (node = id) order by seq
-),
-edges AS (
-    SELECT seq, node, ST_MakeLine(lag(second) over(), second) AS line, cost, agg_cost FROM geoms
-)
-SELECT * INTO newtspWdijkstra FROM edges;
-*/
diff --git a/src/tsp/test/development/wi29-tsp.result b/src/tsp/test/development/wi29-tsp.result
deleted file mode 100644
index b03f698..0000000
--- a/src/tsp/test/development/wi29-tsp.result
+++ /dev/null
@@ -1,226 +0,0 @@
-NOTICE:  table "wi29" does not exist, skipping
-NOTICE:  Deprecated Signature pgr_tsp(sql, integer, integer)
-0|17|17|683.333268292684
-1|18|18|432.691873944705
-2|19|19|772.082339448903
-3|15|15|2250.24689953989
-4|12|12|1411.95293791574
-5|11|11|106.718669615254
-6|10|10|2113.77757765045
-7|6|6|900.617093380362
-8|2|2|74.535614157127
-9|1|1|2266.91173136004
-10|5|5|1188.01888359478
-11|8|8|994.708187806297
-12|4|4|1172.36699411442
-13|3|3|891.004385199336
-14|7|7|650.85409697993
-15|9|9|1576.30022027673
-16|13|13|1321.76283931305
-17|14|14|2073.38319366628
-18|16|16|1243.87392358622
-19|24|24|559.016994374947
-20|27|27|74.535658878487
-21|25|25|1330.83095428717
-22|20|20|509.901951359278
-23|26|26|648.288376333318
-24|28|28|592.939989005405
-25|29|29|374.139344477991
-26|23|23|220.141999627513
-27|22|22|370.56056393417
-28|21|21|795.67721237329
-NOTICE:  pgr_eucledianTSP Processing Information 
-Initializing tsp class ---> tsp.greedyInitial ---> tsp.annealing ---> OK
-
-Cycle(100)    total changes =13       8 were because  delta energy < 0
-Cycle(90)     total changes =7        3 were because  delta energy < 0
-Cycle(81)     total changes =6        2 were because  delta energy < 0
-Cycle(72.9)   total changes =3        1 were because  delta energy < 0
-Cycle(65.61)  total changes =6        3 were because  delta energy < 0
-Cycle(59.049)         total changes =6        2 were because  delta energy < 0
-Cycle(53.1441)        total changes =7        2 were because  delta energy < 0
-Cycle(47.8297)        total changes =5        2 were because  delta energy < 0
-Cycle(43.0467)        total changes =5        2 were because  delta energy < 0
-Cycle(38.742)         total changes =6        2 were because  delta energy < 0
-Cycle(34.8678)        total changes =6        2 were because  delta energy < 0
-Cycle(31.3811)        total changes =2        0 were because  delta energy < 0
-Cycle(28.243)         total changes =2        0 were because  delta energy < 0
-Cycle(25.4187)        total changes =5        0 were because  delta energy < 0
-Cycle(22.8768)        total changes =0        0 were because  delta energy < 0
-Total swaps: 28
-Total slides: 21
-Total reverses: 58
-Times best tour changed: 22
-Best cost reached = 27601.2
-1|17|683.333268292684|0
-2|18|432.691873944705|683.333268292684
-3|19|772.082339448903|1116.02514223739
-4|15|2250.24689953989|1888.10748168629
-5|12|1411.95293791574|4138.35438122618
-6|11|106.718669615254|5550.30731914192
-7|10|2113.77757765045|5657.02598875718
-8|6|900.617093380362|7770.80356640762
-9|2|74.535614157127|8671.42065978798
-10|1|2266.91173136004|8745.95627394511
-11|5|1188.01888359478|11012.8680053052
-12|8|994.708187806297|12200.8868888999
-13|4|1172.36699411442|13195.5950767062
-14|3|891.004385199336|14367.9620708206
-15|7|650.85409697993|15258.96645602
-16|9|1576.30022027673|15909.8205529999
-17|13|1321.76283931305|17486.1207732766
-18|14|2073.38319366628|18807.8836125897
-19|16|1243.87392358622|20881.266806256
-20|24|559.016994374947|22125.1407298422
-21|27|74.535658878487|22684.1577242171
-22|25|1330.83095428717|22758.6933830956
-23|20|509.901951359278|24089.5243373828
-24|26|648.288376333318|24599.4262887421
-25|28|592.939989005405|25247.7146650754
-26|29|374.139344477991|25840.6546540808
-27|23|220.141999627513|26214.7939985588
-28|22|370.56056393417|26434.9359981863
-29|21|795.67721237329|26805.4965621205
-30|17|0|27601.1737744938
-NOTICE:  pgr_eucledianTSP Processing Information 
-Initializing tsp class ---> tsp.greedyInitial ---> tsp.annealing ---> OK
-
-Cycle(100)    total changes =9        5 were because  delta energy < 0
-Cycle(90)     total changes =8        3 were because  delta energy < 0
-Cycle(81)     total changes =4        2 were because  delta energy < 0
-Cycle(72.9)   total changes =1        0 were because  delta energy < 0
-Cycle(65.61)  total changes =4        2 were because  delta energy < 0
-Cycle(59.049)         total changes =1        0 were because  delta energy < 0
-Cycle(53.1441)        total changes =2        0 were because  delta energy < 0
-Cycle(47.8297)        total changes =2        0 were because  delta energy < 0
-Cycle(43.0467)        total changes =1        1 were because  delta energy < 0
-Cycle(38.742)         total changes =2        0 were because  delta energy < 0
-Cycle(34.8678)        total changes =0        0 were because  delta energy < 0
-Total swaps: 19
-Total slides: 5
-Total reverses: 29
-Times best tour changed: 19
-Best cost reached = 29243
-1|17|1202.91366735569|0
-2|14|2490.66626249105|1202.91366735569
-3|9|650.85409697993|3693.57992984674
-4|7|891.004385199336|4344.43402682667
-5|3|1172.36699411442|5235.438412026
-6|4|994.708187806297|6407.80540614043
-7|8|1188.01888359478|7402.51359394673
-8|5|2266.91173136004|8590.5324775415
-9|1|74.535614157127|10857.4442089015
-10|2|900.617093380362|10931.9798230587
-11|6|2113.77757765045|11832.596916439
-12|10|106.718669615254|13946.3744940895
-13|11|1411.95293791574|14053.0931637047
-14|12|1314.23824873744|15465.0461016205
-15|13|2330.29558544738|16779.2843503579
-16|15|772.082339448903|19109.5799358053
-17|19|432.691873944705|19881.6622752542
-18|18|663.008794943808|20314.3541491989
-19|22|220.141999627513|20977.3629441427
-20|23|197.926372783442|21197.5049437702
-21|21|440.456596290771|21395.4313165537
-22|29|592.939989005405|21835.8879128444
-23|28|648.288376333318|22428.8279018498
-24|26|509.901951359278|23077.1162781832
-25|20|1274.64587544062|23587.0182295424
-26|16|1243.87392358622|24861.6641049831
-27|24|559.016994374947|26105.5380285693
-28|27|74.535658878487|26664.5550229442
-29|25|2503.88589973443|26739.0906818227
-30|17|0|29242.9765815571
-NOTICE:  pgr_eucledianTSP Processing Information 
-Initializing tsp class ---> tsp.greedyInitial ---> tsp.annealing ---> OK
-
-Cycle(100)    total changes =9        5 were because  delta energy < 0
-Cycle(90)     total changes =8        3 were because  delta energy < 0
-Cycle(81)     total changes =4        2 were because  delta energy < 0
-Cycle(72.9)   total changes =1        0 were because  delta energy < 0
-Cycle(65.61)  total changes =4        2 were because  delta energy < 0
-Cycle(59.049)         total changes =1        0 were because  delta energy < 0
-Cycle(53.1441)        total changes =2        0 were because  delta energy < 0
-Cycle(47.8297)        total changes =2        0 were because  delta energy < 0
-Cycle(43.0467)        total changes =1        1 were because  delta energy < 0
-Cycle(38.742)         total changes =2        0 were because  delta energy < 0
-Cycle(34.8678)        total changes =0        0 were because  delta energy < 0
-Total swaps: 19
-Total slides: 5
-Total reverses: 29
-Times best tour changed: 19
-Best cost reached = 29243
-1|117|1202.91366735569|0
-2|114|2490.66626249105|1202.91366735569
-3|109|650.85409697993|3693.57992984674
-4|107|891.004385199336|4344.43402682667
-5|103|1172.36699411442|5235.438412026
-6|104|994.708187806297|6407.80540614043
-7|108|1188.01888359478|7402.51359394673
-8|105|2266.91173136004|8590.5324775415
-9|101|74.535614157127|10857.4442089015
-10|102|900.617093380362|10931.9798230587
-11|106|2113.77757765045|11832.596916439
-12|110|106.718669615254|13946.3744940895
-13|111|1411.95293791574|14053.0931637047
-14|112|1314.23824873744|15465.0461016205
-15|113|2330.29558544738|16779.2843503579
-16|115|772.082339448903|19109.5799358053
-17|119|432.691873944705|19881.6622752542
-18|118|663.008794943808|20314.3541491989
-19|122|220.141999627513|20977.3629441427
-20|123|197.926372783442|21197.5049437702
-21|121|440.456596290771|21395.4313165537
-22|129|592.939989005405|21835.8879128444
-23|128|648.288376333318|22428.8279018498
-24|126|509.901951359278|23077.1162781832
-25|120|1274.64587544062|23587.0182295424
-26|116|1243.87392358622|24861.6641049831
-27|124|559.016994374947|26105.5380285693
-28|127|74.535658878487|26664.5550229442
-29|125|2503.88589973443|26739.0906818227
-30|117|0|29242.9765815571
-NOTICE:  pgr_eucledianTSP Processing Information 
-Initializing tsp class ---> tsp.greedyInitial ---> tsp.annealing ---> OK
-
-Cycle(100)    total changes =11       6 were because  delta energy < 0
-Cycle(90)     total changes =7        2 were because  delta energy < 0
-Cycle(81)     total changes =4        1 were because  delta energy < 0
-Cycle(72.9)   total changes =7        3 were because  delta energy < 0
-Cycle(65.61)  total changes =2        1 were because  delta energy < 0
-Cycle(59.049)         total changes =0        0 were because  delta energy < 0
-Total swaps: 19
-Total slides: 4
-Total reverses: 27
-Times best tour changed: 25
-Best cost reached = 28189.8
-1|101|2266.91173136004|0
-2|105|816.6667|2266.91173136004
-3|104|1172.36699411442|3083.57843136004
-4|103|891.004385199336|4255.94542547447
-5|107|650.85409697993|5146.9498106738
-6|109|1586.48805192125|5797.80390765373
-7|108|1320.77417785513|7384.29195957498
-8|112|1314.23824873744|8705.06613743011
-9|113|1321.76283931305|10019.3043861676
-10|114|1202.91366735569|11341.0672254806
-11|117|1173.07768521763|12543.9808928363
-12|120|1274.64587544062|13717.0585780539
-13|116|1243.87392358622|14991.7044534945
-14|124|559.016994374947|16235.5783770808
-15|127|74.535658878487|16794.5953714557
-16|125|1333.3333|16869.1310303342
-17|126|648.288376333318|18202.4643303342
-18|128|592.939989005405|18850.7527066675
-19|129|440.456596290771|19443.6926956729
-20|121|197.926372783442|19884.1492919637
-21|123|220.141999627513|20082.0756647471
-22|122|663.008794943808|20302.2176643746
-23|118|432.691873944705|20965.2264593185
-24|119|772.082339448903|21397.9183332632
-25|115|2824.10256502447|22170.0006727121
-26|111|106.718669615254|24994.1032377365
-27|110|2113.77757765045|25100.8219073518
-28|106|900.617093380362|27214.5994850022
-29|102|74.535614157127|28115.2165783826
-30|101|0|28189.7521925397
diff --git a/src/tsp/test/doc-pgr_TSP-windows.result b/src/tsp/test/doc-pgr_TSP-windows.result
deleted file mode 100644
index b64f782..0000000
--- a/src/tsp/test/doc-pgr_TSP-windows.result
+++ /dev/null
@@ -1,77 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- q1
-WITH
-query AS (
-    SELECT * FROM pgr_TSP(
-        $$
-        SELECT * FROM pgr_dijkstraCostMatrix(
-            'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-            (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 14),
-            directed := false
-        )
-        $$
-    )
-)
-SELECT agg_cost < 20 AS under_20 FROM query WHERE seq = 14;
- under_20 
-----------
-t
-(1 row)
-
--- q2
-SELECT * FROM pgr_TSP(
-    $$
-    SELECT * FROM pgr_dijkstraCostMatrix(
-        'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-        (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 14),
-        directed := false
-    )
-    $$,
-    start_id := 7,
-    randomize := false
-);
- seq | node | cost | agg_cost 
------+------+------+----------
-1|7|1|0
-2|8|1|1
-3|5|1|2
-4|2|1|3
-5|1|2|4
-6|3|1|6
-7|4|1|7
-8|9|1|8
-9|12|1|9
-10|11|1|10
-11|10|1|11
-12|13|3|12
-13|6|3|15
-14|7|0|18
-(14 rows)
-
--- q3
-SELECT * FROM pgr_TSP(
-    $$
-    SELECT * FROM pgr_withPointsCostMatrix(
-        'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-        'SELECT pid, edge_id, fraction from pointsOfInterest',
-        array[-1, 3, 5, 6, -6], directed := false);
-    $$,
-    start_id := 5,
-    randomize := false
-);
- seq | node | cost | agg_cost 
------+------+------+----------
-1|5|0.3|0
-2|-6|1.3|0.3
-3|-1|1.6|1.6
-4|3|1|3.2
-5|6|1|4.2
-6|5|0|5.2
-(6 rows)
-
--- q4
-ROLLBACK;
-ROLLBACK
diff --git a/src/tsp/test/doc-pgr_TSP.result b/src/tsp/test/doc-pgr_TSP.result
deleted file mode 100644
index 374dd6b..0000000
--- a/src/tsp/test/doc-pgr_TSP.result
+++ /dev/null
@@ -1,77 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- q1
-WITH
-query AS (
-    SELECT * FROM pgr_TSP(
-        $$
-        SELECT * FROM pgr_dijkstraCostMatrix(
-            'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-            (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 14),
-            directed := false
-        )
-        $$
-    )
-)
-SELECT agg_cost < 20 AS under_20 FROM query WHERE seq = 14;
- under_20 
-----------
- t
-(1 row)
-
--- q2
-SELECT * FROM pgr_TSP(
-    $$
-    SELECT * FROM pgr_dijkstraCostMatrix(
-        'SELECT id, source, target, cost, reverse_cost FROM edge_table',
-        (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 14),
-        directed := false
-    )
-    $$,
-    start_id := 7,
-    randomize := false
-);
- seq | node | cost | agg_cost 
------+------+------+----------
-   1 |    7 |    1 |        0
-   2 |    8 |    1 |        1
-   3 |    5 |    1 |        2
-   4 |    2 |    1 |        3
-   5 |    1 |    2 |        4
-   6 |    3 |    1 |        6
-   7 |    4 |    1 |        7
-   8 |    9 |    1 |        8
-   9 |   12 |    1 |        9
-  10 |   11 |    1 |       10
-  11 |   10 |    1 |       11
-  12 |   13 |    3 |       12
-  13 |    6 |    3 |       15
-  14 |    7 |    0 |       18
-(14 rows)
-
--- q3
-SELECT * FROM pgr_TSP(
-    $$
-    SELECT * FROM pgr_withPointsCostMatrix(
-        'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-        'SELECT pid, edge_id, fraction from pointsOfInterest',
-        array[-1, 3, 5, 6, -6], directed := false);
-    $$,
-    start_id := 5,
-    randomize := false
-);
- seq | node | cost | agg_cost 
------+------+------+----------
-   1 |    5 |    1 |        0
-   2 |    6 |    1 |        1
-   3 |    3 |  1.6 |        2
-   4 |   -1 |  1.3 |      3.6
-   5 |   -6 |  0.3 |      4.9
-   6 |    5 |    0 |      5.2
-(6 rows)
-
--- q4
-ROLLBACK;
-ROLLBACK
diff --git a/src/tsp/test/doc-pgr_eucledianTSP.result b/src/tsp/test/doc-pgr_eucledianTSP.result
deleted file mode 100644
index 8067930..0000000
--- a/src/tsp/test/doc-pgr_eucledianTSP.result
+++ /dev/null
@@ -1,94 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
--- q1
-WITH
-query AS (
-    SELECT * FROM pgr_eucledianTSP(
-        $$
-        SELECT id, st_X(the_geom) AS x, st_Y(the_geom)AS y  FROM edge_table_vertices_pgr
-        $$
-    )
-)
-SELECT agg_cost < 20 AS under_20 FROM query WHERE seq = 18;
- under_20 
-----------
- t
-(1 row)
-
--- q2
-SELECT* from pgr_eucledianTSP(
-    $$
-    SELECT id, st_X(the_geom) AS x, st_Y(the_geom) AS y FROM edge_table_vertices_pgr
-    $$,
-    tries_per_temperature := 3,
-    cooling_factor := 0.5,
-    randomize := false
-);
- seq | node |       cost       |     agg_cost     
------+------+------------------+------------------
-   1 |    1 |  1.4142135623731 |                0
-   2 |    3 |                1 |  1.4142135623731
-   3 |    4 |                1 | 2.41421356237309
-   4 |    9 | 0.58309518948453 | 3.41421356237309
-   5 |   16 | 0.58309518948453 | 3.99730875185762
-   6 |    6 |                1 | 4.58040394134215
-   7 |    5 |                1 | 5.58040394134215
-   8 |    8 |                1 | 6.58040394134215
-   9 |    7 | 1.58113883008419 | 7.58040394134215
-  10 |   14 |   1.499999999999 | 9.16154277142634
-  11 |   15 |              0.5 | 10.6615427714253
-  12 |   13 |              1.5 | 11.1615427714253
-  13 |   17 | 1.11803398874989 | 12.6615427714253
-  14 |   12 |                1 | 13.7795767601752
-  15 |   11 |                1 | 14.7795767601752
-  16 |   10 |                2 | 15.7795767601752
-  17 |    2 |                1 | 17.7795767601752
-  18 |    1 |                0 | 18.7795767601752
-(18 rows)
-
--- q3
-SET client_min_messages TO DEBUG1;
-SET
-SELECT* from pgr_eucledianTSP(
-    $$
-    SELECT id, st_X(the_geom) AS x, st_Y(the_geom) AS y FROM edge_table_vertices_pgr
-    $$,
-    tries_per_temperature := 0,
-    randomize := false
-);
-DEBUG:  pgr_eucledianTSP Processing Information
-Initializing tsp class ---> tsp.greedyInitial ---> tsp.annealing ---> OK
-
-Cycle(100) 	total changes =0	0 were because  delta energy < 0
-Total swaps: 3
-Total slides: 0
-Total reverses: 0
-Times best tour changed: 4
-Best cost reached = 18.7796
- seq | node |       cost       |     agg_cost     
------+------+------------------+------------------
-   1 |    1 |  1.4142135623731 |                0
-   2 |    3 |                1 |  1.4142135623731
-   3 |    4 |                1 | 2.41421356237309
-   4 |    9 | 0.58309518948453 | 3.41421356237309
-   5 |   16 | 0.58309518948453 | 3.99730875185762
-   6 |    6 |                1 | 4.58040394134215
-   7 |    5 |                1 | 5.58040394134215
-   8 |    8 |                1 | 6.58040394134215
-   9 |    7 | 1.58113883008419 | 7.58040394134215
-  10 |   14 |   1.499999999999 | 9.16154277142634
-  11 |   15 |              0.5 | 10.6615427714253
-  12 |   13 |              1.5 | 11.1615427714253
-  13 |   17 | 1.11803398874989 | 12.6615427714253
-  14 |   12 |                1 | 13.7795767601752
-  15 |   11 |                1 | 14.7795767601752
-  16 |   10 |                2 | 15.7795767601752
-  17 |    2 |                1 | 17.7795767601752
-  18 |    1 |                0 | 18.7795767601752
-(18 rows)
-
--- q4
-ROLLBACK;
-ROLLBACK
diff --git a/src/tsp/src/tour.cpp b/src/tsp/tour.cpp
similarity index 100%
rename from src/tsp/src/tour.cpp
rename to src/tsp/tour.cpp
diff --git a/src/vrp_basic/test/doc-pgr_vrpOneDepot.result b/src/vrp_basic/test/doc-pgr_vrpOneDepot.result
deleted file mode 100644
index 2631800..0000000
--- a/src/vrp_basic/test/doc-pgr_vrpOneDepot.result
+++ /dev/null
@@ -1,256 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
-SELECT * FROM pgr_vrpOneDepot(
-    'SELECT * FROM vrp_orders',
-    'SELECT * FROM vrp_vehicles',
-    'SELECT * FROM vrp_distance',
-    1);
- oid | opos | vid | tarrival | tdepart 
------+------+-----+----------+---------
-  -1 |    1 |   5 |        0 |       0
-  66 |    2 |   5 |        0 |       0
-  25 |    3 |   5 |        0 |       0
-  21 |    4 |   5 |        0 |       0
-  84 |    5 |   5 |        0 |       0
-  50 |    6 |   5 |        0 |       0
-  49 |    7 |   5 |        0 |       0
-  24 |    8 |   5 |        0 |       0
-  22 |    9 |   5 |        0 |       0
-  20 |   10 |   5 |        0 |       0
-  19 |   11 |   5 |        0 |       0
-  66 |   12 |   5 |       11 |      21
-  84 |   13 |   5 |       30 |      45
-  24 |   14 |   5 |       71 |      81
-  22 |   15 |   5 |       83 |      93
-  20 |   16 |   5 |       98 |     108
-  19 |   17 |   5 |      114 |     124
-  50 |   18 |   5 |      131 |     141
-  21 |   19 |   5 |      144 |     154
-  25 |   20 |   5 |      158 |     168
-  49 |   21 |   5 |      179 |     189
-  -1 |   22 |   5 |      234 |     234
-  -1 |    1 |   6 |        0 |       0
-  31 |    2 |   6 |        0 |       0
-  32 |    3 |   6 |        0 |       0
-  81 |    4 |   6 |        0 |       0
-  94 |    5 |   6 |        0 |       0
-  93 |    6 |   6 |        0 |       0
-  35 |    7 |   6 |        0 |       0
-  33 |    8 |   6 |        0 |       0
-  28 |    9 |   6 |        0 |       0
-  27 |   10 |   6 |        0 |       0
-  93 |   11 |   6 |       15 |      25
-  32 |   12 |   6 |       61 |      71
-  28 |   13 |   6 |       78 |      88
-  31 |   14 |   6 |       97 |     107
-  35 |   15 |   6 |      112 |     122
-  27 |   16 |   6 |      134 |     144
-  33 |   17 |   6 |      152 |     162
-  94 |   18 |   6 |      196 |     206
-  81 |   19 |   6 |      221 |     231
-  -1 |   20 |   6 |      238 |     238
-  -1 |    1 |   3 |        0 |       0
-  16 |    2 |   3 |        0 |       0
-  14 |    3 |   3 |        0 |       0
-  48 |    4 |   3 |        0 |       0
-  18 |    5 |   3 |        0 |       0
-  17 |    6 |   3 |        0 |       0
-  15 |    7 |   3 |        0 |       0
-  13 |    8 |   3 |        0 |       0
-  11 |    9 |   3 |        0 |       0
-  10 |   10 |   3 |        0 |       0
-  15 |   11 |   3 |       35 |      45
-  48 |   12 |   3 |       48 |      58
-  13 |   13 |   3 |       64 |      74
-  16 |   14 |   3 |       82 |      92
-  17 |   15 |   3 |       94 |     104
-  10 |   16 |   3 |      115 |     125
-  11 |   17 |   3 |      130 |     140
-  14 |   18 |   3 |      147 |     157
-  18 |   19 |   3 |      169 |     179
-  -1 |   20 |   3 |      219 |     219
-  -1 |    1 |   8 |        0 |       0
-  71 |    2 |   8 |        0 |       0
-  55 |    3 |   8 |        0 |       0
-  44 |    4 |   8 |        0 |       0
-  43 |    5 |   8 |        0 |       0
-  42 |    6 |   8 |        0 |       0
-  41 |    7 |   8 |        0 |       0
-  40 |    8 |   8 |        0 |       0
-  39 |    9 |   8 |        0 |       0
-  43 |   10 |   8 |       34 |      44
-  40 |   11 |   8 |       49 |      59
-  39 |   12 |   8 |       61 |      85
-  41 |   13 |   8 |       90 |     100
-  42 |   14 |   8 |      111 |     121
-  44 |   15 |   8 |      131 |     141
-  55 |   16 |   8 |      166 |     176
-  71 |   17 |   8 |      198 |     208
-  -1 |   18 |   8 |      228 |     228
-  -1 |    1 |   1 |        0 |       0
-   4 |    2 |   1 |        0 |       0
- 101 |    3 |   1 |        0 |       0
-  46 |    4 |   1 |        0 |       0
-   5 |    5 |   1 |        0 |       0
-   3 |    6 |   1 |        0 |       0
-  46 |    7 |   1 |       38 |      48
-   3 |    8 |   1 |       55 |      65
-   2 |    9 |   1 |       96 |      96
-   4 |   10 |   1 |      135 |     145
-   2 |   11 |   1 |      148 |     158
-   5 |   12 |   1 |      165 |     175
- 101 |   13 |   1 |      192 |     202
-  -1 |   14 |   1 |      222 |     222
-  -1 |    1 |  13 |        0 |       0
-  92 |    2 |  13 |        0 |       0
-  52 |    3 |  13 |        0 |       0
-  57 |    4 |  13 |        0 |       0
-  85 |    5 |  13 |        0 |       0
-  68 |    6 |  13 |        0 |       0
-  63 |    7 |  13 |        0 |       0
-  63 |    8 |  13 |       29 |      62
-  68 |    9 |  13 |       69 |      80
-  52 |   10 |  13 |      104 |     114
-  85 |   11 |  13 |      123 |     133
-  57 |   12 |  13 |      142 |     152
-  92 |   13 |  13 |      159 |     177
-  -1 |   14 |  13 |      189 |     189
-  -1 |    1 |   7 |        0 |       0
-  30 |    2 |   7 |        0 |       0
-  29 |    3 |   7 |        0 |       0
-  38 |    4 |   7 |        0 |       0
-  36 |    5 |   7 |        0 |       0
-  34 |    6 |   7 |        0 |       0
-  34 |    7 |   7 |       51 |      61
-  29 |    8 |   7 |       70 |      80
-  30 |    9 |   7 |       85 |      95
-  38 |   10 |   7 |      149 |     159
-  36 |   11 |   7 |      162 |     172
-  -1 |   12 |   7 |      217 |     217
-  -1 |    1 |   2 |        0 |       0
-  89 |    2 |   2 |        0 |       0
-  47 |    3 |   2 |        0 |       0
-  61 |    4 |   2 |        0 |       0
-   9 |    5 |   2 |        0 |       0
-   8 |    6 |   2 |        0 |       0
-  89 |    7 |   2 |       18 |      77
-   8 |    8 |   2 |       96 |     106
-   9 |    9 |   2 |      111 |     121
-  47 |   10 |   2 |      124 |     134
-  61 |   11 |   2 |      154 |     165
-  -1 |   12 |   2 |      192 |     192
-  -1 |    1 |  14 |        0 |       0
-  97 |    2 |  14 |        0 |       0
-  64 |    3 |  14 |        0 |       0
-  51 |    4 |  14 |        0 |       0
-  96 |    5 |  14 |        0 |       0
-  77 |    6 |  14 |        0 |       0
-  96 |    7 |  14 |       21 |      44
-  64 |    8 |  14 |       63 |      73
-  77 |    9 |  14 |       83 |      93
-  51 |   10 |  14 |      119 |     129
-  97 |   11 |  14 |      154 |     164
-  -1 |   12 |  14 |      180 |     180
-  -1 |    1 |  15 |        0 |       0
-  67 |    2 |  15 |        0 |       0
-  73 |    3 |  15 |        0 |       0
-  95 |    4 |  15 |        0 |       0
-  82 |    5 |  15 |        0 |       0
-  72 |    6 |  15 |        0 |       0
-  73 |    7 |  15 |       27 |      40
-  72 |    8 |  15 |       50 |      75
-  82 |    9 |  15 |       91 |     101
-  95 |   10 |  15 |      114 |     124
-  67 |   11 |  15 |      144 |     154
-  -1 |   12 |  15 |      167 |     167
-  -1 |    1 |  11 |        0 |       0
-  78 |    2 |  11 |        0 |       0
-  26 |    3 |  11 |        0 |       0
-  87 |    4 |  11 |        0 |       0
-  23 |    5 |  11 |        0 |       0
-  87 |    6 |  11 |       32 |      97
-  23 |    7 |  11 |      118 |     128
-  78 |    8 |  11 |      149 |     160
-  26 |    9 |  11 |      172 |     182
-  -1 |   10 |  11 |      227 |     227
-  -1 |    1 |   4 |        0 |       0
-  60 |    2 |   4 |        0 |       0
-  59 |    3 |   4 |        0 |       0
- 100 |    4 |   4 |        0 |       0
-  54 |    5 |   4 |        0 |       0
-  60 |    6 |   4 |       42 |      52
- 100 |    7 |   4 |       74 |      87
-  54 |    8 |   4 |      103 |     113
-  59 |    9 |   4 |      153 |     163
-  -1 |   10 |   4 |      211 |     211
-  -1 |    1 |  10 |        0 |       0
-  86 |    2 |  10 |        0 |       0
-  90 |    3 |  10 |        0 |       0
-  65 |    4 |  10 |        0 |       0
-  53 |    5 |  10 |        0 |       0
-  53 |    6 |  10 |       25 |      62
-  65 |    7 |  10 |       82 |      92
-  86 |    8 |  10 |      111 |     121
-  90 |    9 |  10 |      140 |     154
-  -1 |   10 |  10 |      206 |     206
-  -1 |    1 |  12 |        0 |       0
-   6 |    2 |  12 |        0 |       0
-  80 |    3 |  12 |        0 |       0
-   7 |    4 |  12 |        0 |       0
-  56 |    5 |  12 |        0 |       0
-   6 |    6 |  12 |       40 |      51
-  80 |    7 |  12 |       73 |      99
-   7 |    8 |  12 |      113 |     123
-  56 |    9 |  12 |      142 |     152
-  -1 |   10 |  12 |      166 |     166
-  -1 |    1 |  19 |        0 |       0
-  88 |    2 |  19 |        0 |       0
-  70 |    3 |  19 |        0 |       0
-  58 |    4 |  19 |        0 |       0
-  99 |    5 |  19 |        0 |       0
-  70 |    6 |  19 |        9 |      51
-  99 |    7 |  19 |       56 |      66
-  88 |    8 |  19 |       97 |     107
-  58 |    9 |  19 |      125 |     135
-  -1 |   10 |  19 |      162 |     162
-  -1 |    1 |  17 |        0 |       0
-  75 |    2 |  17 |        0 |       0
-  98 |    3 |  17 |        0 |       0
-  76 |    4 |  17 |        0 |       0
-  76 |    5 |  17 |       57 |      84
-  98 |    6 |  17 |       97 |     130
-  75 |    7 |  17 |      146 |     156
-  -1 |    8 |  17 |      192 |     192
-  -1 |    1 |  16 |        0 |       0
-  69 |    2 |  16 |        0 |       0
-  79 |    3 |  16 |        0 |       0
-  74 |    4 |  16 |        0 |       0
-  74 |    5 |  16 |       39 |      87
-  79 |    6 |  16 |       94 |     104
-  69 |    7 |  16 |      136 |     154
-  -1 |    8 |  16 |      164 |     164
-  -1 |    1 |   9 |        0 |       0
-  62 |    2 |   9 |        0 |       0
-  37 |    3 |   9 |        0 |       0
-  45 |    4 |   9 |        0 |       0
-  37 |    5 |   9 |       43 |      53
-  45 |    6 |   9 |       63 |      74
-  62 |    7 |   9 |       94 |     104
-  -1 |    8 |   9 |      120 |     120
-  -1 |    1 |  18 |        0 |       0
-  91 |    2 |  18 |        0 |       0
-  12 |    3 |  18 |        0 |       0
-  12 |    4 |  18 |       34 |      69
-  91 |    5 |  18 |       99 |     109
-  -1 |    6 |  18 |      113 |     113
-  -1 |    1 |  20 |        0 |       0
-  83 |    2 |  20 |        0 |       0
-  83 |    3 |  20 |       15 |      52
-  -1 |    4 |  20 |       67 |      67
-  -1 |    0 |   0 |       -1 |    3712
-(241 rows)
-
-ROLLBACK;
-ROLLBACK
diff --git a/src/vrp_basic/test/oneDepotWrapper.result b/src/vrp_basic/test/oneDepotWrapper.result
deleted file mode 100644
index 8c24c83..0000000
--- a/src/vrp_basic/test/oneDepotWrapper.result
+++ /dev/null
@@ -1,256 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
-SELECT * FROM _pgr_vrpOneDepot(
-    'SELECT * FROM vrp_orders',
-    'SELECT * FROM vrp_vehicles',
-    'SELECT src_id AS start_vid, dest_id AS end_vid, traveltime AS agg_cost FROM vrp_distance',
-    1);
- seq | vehicle_seq | vehicle_id | stop_seq | stop_type | stop_id | order_id | cargo | travel_time | arrival_time |     wait_time     | service_time | departure_time 
------+-------------+------------+----------+-----------+---------+----------+-------+-------------+--------------+-------------------+--------------+----------------
-   1 |           1 |          5 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
-   2 |           1 |          5 |        2 |         2 |       1 |       66 |    16 |           0 |            0 |                 0 |            0 |              0
-   3 |           1 |          5 |        3 |         2 |       1 |       25 |    26 |           0 |            0 |                 0 |            0 |              0
-   4 |           1 |          5 |        4 |         2 |       1 |       21 |    36 |           0 |            0 |                 0 |            0 |              0
-   5 |           1 |          5 |        5 |         2 |       1 |       84 |    50 |           0 |            0 |                 0 |            0 |              0
-   6 |           1 |          5 |        6 |         2 |       1 |       50 |    60 |           0 |            0 |                 0 |            0 |              0
-   7 |           1 |          5 |        7 |         2 |       1 |       49 |    70 |           0 |            0 |                 0 |            0 |              0
-   8 |           1 |          5 |        8 |         2 |       1 |       24 |   100 |           0 |            0 |                 0 |            0 |              0
-   9 |           1 |          5 |        9 |         2 |       1 |       22 |   110 |           0 |            0 |                 0 |            0 |              0
-  10 |           1 |          5 |       10 |         2 |       1 |       20 |   150 |           0 |            0 |                 0 |            0 |              0
-  11 |           1 |          5 |       11 |         2 |       1 |       19 |   170 |           0 |            0 |                 0 |            0 |              0
-  12 |           1 |          5 |       12 |         3 |      66 |       66 |   154 |    11.18034 |     11.18034 |                 0 |           10 |       21.18034
-  13 |           1 |          5 |       13 |         3 |      84 |       84 |   140 |    9.219544 |    30.399884 |          4.600116 |           10 |             45
-  14 |           1 |          5 |       14 |         3 |      24 |       24 |   110 |   26.019224 |    71.019224 |                 0 |           10 |      81.019224
-  15 |           1 |          5 |       15 |         3 |      22 |       22 |   100 |           2 |    83.019224 |                 0 |           10 |      93.019224
-  16 |           1 |          5 |       16 |         3 |      20 |       20 |    60 |    5.385165 |    98.404389 |                 0 |           10 |     108.404389
-  17 |           1 |          5 |       17 |         3 |      19 |       19 |    40 |    5.385165 |   113.789554 |                 0 |           10 |     123.789554
-  18 |           1 |          5 |       18 |         3 |      50 |       50 |    30 |     7.28011 |   131.069664 |                 0 |           10 |     141.069664
-  19 |           1 |          5 |       19 |         3 |      21 |       21 |    20 |           3 |   144.069664 |                 0 |           10 |     154.069664
-  20 |           1 |          5 |       20 |         3 |      25 |       25 |    10 |           4 |   158.069664 |                 0 |           10 |     168.069664
-  21 |           1 |          5 |       21 |         3 |      49 |       49 |     0 |    10.77033 |   178.839994 |                 0 |           10 |     188.839994
-  22 |           1 |          5 |       22 |         6 |       1 |       -1 |     0 |   45.044423 |   233.884417 |                 0 |            0 |     233.884417
-  23 |           2 |          6 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
-  24 |           2 |          6 |        2 |         2 |       1 |       31 |    10 |           0 |            0 |                 0 |            0 |              0
-  25 |           2 |          6 |        3 |         2 |       1 |       32 |    30 |           0 |            0 |                 0 |            0 |              0
-  26 |           2 |          6 |        4 |         2 |       1 |       81 |    43 |           0 |            0 |                 0 |            0 |              0
-  27 |           2 |          6 |        5 |         2 |       1 |       94 |    46 |           0 |            0 |                 0 |            0 |              0
-  28 |           2 |          6 |        6 |         2 |       1 |       93 |    60 |           0 |            0 |                 0 |            0 |              0
-  29 |           2 |          6 |        7 |         2 |       1 |       35 |    90 |           0 |            0 |                 0 |            0 |              0
-  30 |           2 |          6 |        8 |         2 |       1 |       33 |   100 |           0 |            0 |                 0 |            0 |              0
-  31 |           2 |          6 |        9 |         2 |       1 |       28 |   120 |           0 |            0 |                 0 |            0 |              0
-  32 |           2 |          6 |       10 |         2 |       1 |       27 |   150 |           0 |            0 |                 0 |            0 |              0
-  33 |           2 |          6 |       11 |         3 |      93 |       93 |   136 |   14.764823 |    14.764823 |                 0 |           10 |      24.764823
-  34 |           2 |          6 |       12 |         3 |      32 |       32 |   116 |   35.902646 |    60.667469 | 0.332531000000003 |           10 |             71
-  35 |           2 |          6 |       13 |         3 |      28 |       28 |    96 |           7 |           78 |                 0 |           10 |             88
-  36 |           2 |          6 |       14 |         3 |      31 |       31 |    86 |    8.602325 |    96.602325 |                 0 |           10 |     106.602325
-  37 |           2 |          6 |       15 |         3 |      35 |       35 |    56 |    5.830952 |   112.433277 |                 0 |           10 |     122.433277
-  38 |           2 |          6 |       16 |         3 |      27 |       27 |    26 |    11.18034 |   133.613617 |                 0 |           10 |     143.613617
-  39 |           2 |          6 |       17 |         3 |      33 |       33 |    16 |           8 |   151.613617 |                 0 |           10 |     161.613617
-  40 |           2 |          6 |       18 |         3 |      94 |       94 |    13 |   34.058773 |    195.67239 |                 0 |           10 |      205.67239
-  41 |           2 |          6 |       19 |         3 |      81 |       81 |     0 |   14.866069 |   220.538459 |                 0 |           10 |     230.538459
-  42 |           2 |          6 |       20 |         6 |       1 |       -1 |     0 |    7.615773 |   238.154232 |                 0 |            0 |     238.154232
-  43 |           3 |          3 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
-  44 |           3 |          3 |        2 |         2 |       1 |       16 |    20 |           0 |            0 |                 0 |            0 |              0
-  45 |           3 |          3 |        3 |         2 |       1 |       14 |    30 |           0 |            0 |                 0 |            0 |              0
-  46 |           3 |          3 |        4 |         2 |       1 |       48 |    40 |           0 |            0 |                 0 |            0 |              0
-  47 |           3 |          3 |        5 |         2 |       1 |       18 |    60 |           0 |            0 |                 0 |            0 |              0
-  48 |           3 |          3 |        6 |         2 |       1 |       17 |    80 |           0 |            0 |                 0 |            0 |              0
-  49 |           3 |          3 |        7 |         2 |       1 |       15 |    90 |           0 |            0 |                 0 |            0 |              0
-  50 |           3 |          3 |        8 |         2 |       1 |       13 |   110 |           0 |            0 |                 0 |            0 |              0
-  51 |           3 |          3 |        9 |         2 |       1 |       11 |   140 |           0 |            0 |                 0 |            0 |              0
-  52 |           3 |          3 |       10 |         2 |       1 |       10 |   160 |           0 |            0 |                 0 |            0 |              0
-  53 |           3 |          3 |       11 |         3 |      15 |       15 |   150 |   35.355339 |    35.355339 |                 0 |           10 |      45.355339
-  54 |           3 |          3 |       12 |         3 |      48 |       48 |   140 |           3 |    48.355339 |                 0 |           10 |      58.355339
-  55 |           3 |          3 |       13 |         3 |      13 |       13 |   120 |           6 |    64.355339 |                 0 |           10 |      74.355339
-  56 |           3 |          3 |       14 |         3 |      16 |       16 |   100 |     7.81025 |    82.165589 |                 0 |           10 |      92.165589
-  57 |           3 |          3 |       15 |         3 |      17 |       17 |    80 |           2 |    94.165589 |                 0 |           10 |     104.165589
-  58 |           3 |          3 |       16 |         3 |      10 |       10 |    60 |    11.18034 |   115.345929 |                 0 |           10 |     125.345929
-  59 |           3 |          3 |       17 |         3 |      11 |       11 |    30 |           5 |   130.345929 |                 0 |           10 |     140.345929
-  60 |           3 |          3 |       18 |         3 |      14 |       14 |    20 |    7.071068 |   147.416997 |                 0 |           10 |     157.416997
-  61 |           3 |          3 |       19 |         3 |      18 |       18 |     0 |    11.18034 |   168.597337 |                 0 |           10 |     178.597337
-  62 |           3 |          3 |       20 |         6 |       1 |       -1 |     0 |   40.311289 |   218.908626 |                 0 |            0 |     218.908626
-  63 |           4 |          8 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
-  64 |           4 |          8 |        2 |         2 |       1 |       71 |    23 |           0 |            0 |                 0 |            0 |              0
-  65 |           4 |          8 |        3 |         2 |       1 |       55 |    39 |           0 |            0 |                 0 |            0 |              0
-  66 |           4 |          8 |        4 |         2 |       1 |       44 |    59 |           0 |            0 |                 0 |            0 |              0
-  67 |           4 |          8 |        5 |         2 |       1 |       43 |    69 |           0 |            0 |                 0 |            0 |              0
-  68 |           4 |          8 |        6 |         2 |       1 |       42 |    89 |           0 |            0 |                 0 |            0 |              0
-  69 |           4 |          8 |        7 |         2 |       1 |       41 |   119 |           0 |            0 |                 0 |            0 |              0
-  70 |           4 |          8 |        8 |         2 |       1 |       40 |   129 |           0 |            0 |                 0 |            0 |              0
-  71 |           4 |          8 |        9 |         2 |       1 |       39 |   159 |           0 |            0 |                 0 |            0 |              0
-  72 |           4 |          8 |       10 |         3 |      43 |       43 |   149 |    33.54102 |     33.54102 |                 0 |           10 |       43.54102
-  73 |           4 |          8 |       11 |         3 |      40 |       40 |   139 |           5 |     48.54102 |                 0 |           10 |       58.54102
-  74 |           4 |          8 |       12 |         3 |      39 |       39 |   109 |           2 |     60.54102 |          14.45898 |           10 |             85
-  75 |           4 |          8 |       13 |         3 |      41 |       41 |    79 |    5.385165 |    90.385165 |                 0 |           10 |     100.385165
-  76 |           4 |          8 |       14 |         3 |      42 |       42 |    59 |   10.198039 |   110.583204 |                 0 |           10 |     120.583204
-  77 |           4 |          8 |       15 |         3 |      44 |       44 |    39 |   10.440307 |   131.023511 |                 0 |           10 |     141.023511
-  78 |           4 |          8 |       16 |         3 |      55 |       55 |    23 |          25 |   166.023511 |                 0 |           10 |     176.023511
-  79 |           4 |          8 |       17 |         3 |      71 |       71 |     0 |   21.931712 |   197.955223 |                 0 |           10 |     207.955223
-  80 |           4 |          8 |       18 |         6 |       1 |       -1 |     0 |   19.646883 |   227.602106 |                 0 |            0 |     227.602106
-  81 |           5 |          1 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
-  82 |           5 |          1 |        2 |         2 |       1 |        4 |    10 |           0 |            0 |                 0 |            0 |              0
-  83 |           5 |          1 |        3 |         2 |       1 |      101 |    13 |           0 |            0 |                 0 |            0 |              0
-  84 |           5 |          1 |        4 |         2 |       1 |       46 |    23 |           0 |            0 |                 0 |            0 |              0
-  85 |           5 |          1 |        5 |         2 |       1 |        5 |    63 |           0 |            0 |                 0 |            0 |              0
-  86 |           5 |          1 |        6 |         2 |       1 |        3 |    93 |           0 |            0 |                 0 |            0 |              0
-  87 |           5 |          1 |        7 |         3 |      46 |       46 |    83 |   37.735925 |    37.735925 |                 0 |           10 |      47.735925
-  88 |           5 |          1 |        8 |         3 |       3 |        3 |    53 |     7.28011 |    55.016035 |                 0 |           10 |      65.016035
-  89 |           5 |          1 |        9 |         2 |       1 |        2 |    73 |   30.805844 |    95.821879 |                 0 |            0 |      95.821879
-  90 |           5 |          1 |       10 |         3 |       4 |        4 |    63 |   39.357337 |   135.179216 |                 0 |           10 |     145.179216
-  91 |           5 |          1 |       11 |         3 |       2 |        2 |    43 |           3 |   148.179216 |                 0 |           10 |     158.179216
-  92 |           5 |          1 |       12 |         3 |       5 |        5 |     3 |    7.071068 |   165.250284 |                 0 |           10 |     175.250284
-  93 |           5 |          1 |       13 |         3 |     101 |      101 |     0 |   17.029386 |    192.27967 |                 0 |           10 |      202.27967
-  94 |           5 |          1 |       14 |         6 |       1 |       -1 |     0 |   19.235384 |   221.515054 |                 0 |            0 |     221.515054
-  95 |           6 |         13 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
-  96 |           6 |         13 |        2 |         2 |       1 |       92 |    13 |           0 |            0 |                 0 |            0 |              0
-  97 |           6 |         13 |        3 |         2 |       1 |       52 |    32 |           0 |            0 |                 0 |            0 |              0
-  98 |           6 |         13 |        4 |         2 |       1 |       57 |    51 |           0 |            0 |                 0 |            0 |              0
-  99 |           6 |         13 |        5 |         2 |       1 |       85 |    69 |           0 |            0 |                 0 |            0 |              0
- 100 |           6 |         13 |        6 |         2 |       1 |       68 |    78 |           0 |            0 |                 0 |            0 |              0
- 101 |           6 |         13 |        7 |         2 |       1 |       63 |    81 |           0 |            0 |                 0 |            0 |              0
- 102 |           6 |         13 |        8 |         3 |      63 |       63 |    78 |   29.154759 |    29.154759 |         22.845241 |           10 |             62
- 103 |           6 |         13 |        9 |         3 |      68 |       68 |    69 |    7.071068 |    69.071068 | 0.928932000000003 |           10 |             80
- 104 |           6 |         13 |       10 |         3 |      52 |       52 |    50 |   23.769729 |   103.769729 |                 0 |           10 |     113.769729
- 105 |           6 |         13 |       11 |         3 |      85 |       85 |    32 |    9.219544 |   122.989273 |                 0 |           10 |     132.989273
- 106 |           6 |         13 |       12 |         3 |      57 |       57 |    13 |    9.219544 |   142.208817 |                 0 |           10 |     152.208817
- 107 |           6 |         13 |       13 |         3 |      92 |       92 |     0 |    7.071068 |   159.279885 |  7.72011499999999 |           10 |            177
- 108 |           6 |         13 |       14 |         6 |       1 |       -1 |     0 |   12.041595 |   189.041595 |                 0 |            0 |     189.041595
- 109 |           7 |          7 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
- 110 |           7 |          7 |        2 |         2 |       1 |       30 |    10 |           0 |            0 |                 0 |            0 |              0
- 111 |           7 |          7 |        3 |         2 |       1 |       29 |    20 |           0 |            0 |                 0 |            0 |              0
- 112 |           7 |          7 |        4 |         2 |       1 |       38 |    30 |           0 |            0 |                 0 |            0 |              0
- 113 |           7 |          7 |        5 |         2 |       1 |       36 |    50 |           0 |            0 |                 0 |            0 |              0
- 114 |           7 |          7 |        6 |         2 |       1 |       34 |    60 |           0 |            0 |                 0 |            0 |              0
- 115 |           7 |          7 |        7 |         3 |      34 |       34 |    50 |   51.478151 |    51.478151 |                 0 |           10 |      61.478151
- 116 |           7 |          7 |        8 |         3 |      29 |       29 |    40 |    8.602325 |    70.080476 |                 0 |           10 |      80.080476
- 117 |           7 |          7 |        9 |         3 |      30 |       30 |    30 |    5.385165 |    85.465641 |                 0 |           10 |      95.465641
- 118 |           7 |          7 |       10 |         3 |      38 |       38 |    20 |   53.235327 |   148.700968 |                 0 |           10 |     158.700968
- 119 |           7 |          7 |       11 |         3 |      36 |       36 |     0 |    3.605551 |   162.306519 |                 0 |           10 |     172.306519
- 120 |           7 |          7 |       12 |         6 |       1 |       -1 |     0 |   44.204072 |   216.510591 |                 0 |            0 |     216.510591
- 121 |           8 |          2 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
- 122 |           8 |          2 |        2 |         2 |       1 |       89 |    19 |           0 |            0 |                 0 |            0 |              0
- 123 |           8 |          2 |        3 |         2 |       1 |       47 |    29 |           0 |            0 |                 0 |            0 |              0
- 124 |           8 |          2 |        4 |         2 |       1 |       61 |    46 |           0 |            0 |                 0 |            0 |              0
- 125 |           8 |          2 |        5 |         2 |       1 |        9 |    56 |           0 |            0 |                 0 |            0 |              0
- 126 |           8 |          2 |        6 |         2 |       1 |        8 |    76 |           0 |            0 |                 0 |            0 |              0
- 127 |           8 |          2 |        7 |         3 |      89 |       89 |    57 |   17.888544 |    17.888544 |         49.111456 |           10 |             77
- 128 |           8 |          2 |        8 |         3 |       8 |        8 |    37 |   19.235384 |    96.235384 |                 0 |           10 |     106.235384
- 129 |           8 |          2 |        9 |         3 |       9 |        9 |    27 |           5 |   111.235384 |                 0 |           10 |     121.235384
- 130 |           8 |          2 |       10 |         3 |      47 |       47 |    17 |           3 |   124.235384 |                 0 |           10 |     134.235384
- 131 |           8 |          2 |       11 |         3 |      61 |       61 |     0 |   20.223748 |   154.459132 | 0.540867999999989 |           10 |            165
- 132 |           8 |          2 |       12 |         6 |       1 |       -1 |     0 |   26.925824 |   191.925824 |                 0 |            0 |     191.925824
- 133 |           9 |         14 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
- 134 |           9 |         14 |        2 |         2 |       1 |       97 |    26 |           0 |            0 |                 0 |            0 |              0
- 135 |           9 |         14 |        3 |         2 |       1 |       64 |    32 |           0 |            0 |                 0 |            0 |              0
- 136 |           9 |         14 |        4 |         2 |       1 |       51 |    62 |           0 |            0 |                 0 |            0 |              0
- 137 |           9 |         14 |        5 |         2 |       1 |       96 |    68 |           0 |            0 |                 0 |            0 |              0
- 138 |           9 |         14 |        6 |         2 |       1 |       77 |    99 |           0 |            0 |                 0 |            0 |              0
- 139 |           9 |         14 |        7 |         3 |      96 |       96 |    93 |   20.615528 |    20.615528 |         13.384472 |           10 |             44
- 140 |           9 |         14 |        8 |         3 |      64 |       64 |    87 |   19.235384 |    63.235384 |                 0 |           10 |      73.235384
- 141 |           9 |         14 |        9 |         3 |      77 |       77 |    56 |    9.433981 |    82.669365 |                 0 |           10 |      92.669365
- 142 |           9 |         14 |       10 |         3 |      51 |       51 |    26 |   25.942244 |   118.611609 |                 0 |           10 |     128.611609
- 143 |           9 |         14 |       11 |         3 |      97 |       97 |     0 |   25.495098 |   154.106707 |                 0 |           10 |     164.106707
- 144 |           9 |         14 |       12 |         6 |       1 |       -1 |     0 |   15.524175 |   179.630882 |                 0 |            0 |     179.630882
- 145 |          10 |         15 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
- 146 |          10 |         15 |        2 |         2 |       1 |       67 |    16 |           0 |            0 |                 0 |            0 |              0
- 147 |          10 |         15 |        3 |         2 |       1 |       73 |    24 |           0 |            0 |                 0 |            0 |              0
- 148 |          10 |         15 |        4 |         2 |       1 |       95 |    47 |           0 |            0 |                 0 |            0 |              0
- 149 |          10 |         15 |        5 |         2 |       1 |       82 |    57 |           0 |            0 |                 0 |            0 |              0
- 150 |          10 |         15 |        6 |         2 |       1 |       72 |    71 |           0 |            0 |                 0 |            0 |              0
- 151 |          10 |         15 |        7 |         3 |      73 |       73 |    63 |    27.45906 |     27.45906 |           2.54094 |           10 |             40
- 152 |          10 |         15 |        8 |         3 |      72 |       72 |    49 |   10.198039 |    50.198039 |         14.801961 |           10 |             75
- 153 |          10 |         15 |        9 |         3 |      82 |       82 |    39 |   16.278821 |    91.278821 |                 0 |           10 |     101.278821
- 154 |          10 |         15 |       10 |         3 |      95 |       95 |    16 |   12.806248 |   114.085069 |                 0 |           10 |     124.085069
- 155 |          10 |         15 |       11 |         3 |      67 |       67 |     0 |   19.416488 |   143.501557 |                 0 |           10 |     153.501557
- 156 |          10 |         15 |       12 |         6 |       1 |       -1 |     0 |   13.038405 |   166.539962 |                 0 |            0 |     166.539962
- 157 |          11 |         11 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
- 158 |          11 |         11 |        2 |         2 |       1 |       78 |     7 |           0 |            0 |                 0 |            0 |              0
- 159 |          11 |         11 |        3 |         2 |       1 |       26 |    27 |           0 |            0 |                 0 |            0 |              0
- 160 |          11 |         11 |        4 |         2 |       1 |       87 |    55 |           0 |            0 |                 0 |            0 |              0
- 161 |          11 |         11 |        5 |         2 |       1 |       23 |    95 |           0 |            0 |                 0 |            0 |              0
- 162 |          11 |         11 |        6 |         3 |      87 |       87 |    67 |   32.202484 |    32.202484 |         54.797516 |           10 |             97
- 163 |          11 |         11 |        7 |         3 |      23 |       23 |    27 |   21.023796 |   118.023796 |                 0 |           10 |     128.023796
- 164 |          11 |         11 |        8 |         3 |      78 |       78 |    20 |   20.808652 |   148.832448 |          1.167552 |           10 |            160
- 165 |          11 |         11 |        9 |         3 |      26 |       26 |     0 |   12.165525 |   172.165525 |                 0 |           10 |     182.165525
- 166 |          11 |         11 |       10 |         6 |       1 |       -1 |     0 |   45.276926 |   227.442451 |                 0 |            0 |     227.442451
- 167 |          12 |          4 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
- 168 |          12 |          4 |        2 |         2 |       1 |       60 |    19 |           0 |            0 |                 0 |            0 |              0
- 169 |          12 |          4 |        3 |         2 |       1 |       59 |    39 |           0 |            0 |                 0 |            0 |              0
- 170 |          12 |          4 |        4 |         2 |       1 |      100 |    54 |           0 |            0 |                 0 |            0 |              0
- 171 |          12 |          4 |        5 |         2 |       1 |       54 |    59 |           0 |            0 |                 0 |            0 |              0
- 172 |          12 |          4 |        6 |         3 |      60 |       60 |    40 |   42.426407 |    42.426407 |                 0 |           10 |      52.426407
- 173 |          12 |          4 |        7 |         3 |     100 |      100 |    25 |   21.931712 |    74.358119 |          2.641881 |           10 |             87
- 174 |          12 |          4 |        8 |         3 |      54 |       54 |    20 |   16.155494 |   103.155494 |                 0 |           10 |     113.155494
- 175 |          12 |          4 |        9 |         3 |      59 |       59 |     0 |   40.311289 |   153.466783 |                 0 |           10 |     163.466783
- 176 |          12 |          4 |       10 |         6 |       1 |       -1 |     0 |   47.169906 |   210.636689 |                 0 |            0 |     210.636689
- 177 |          13 |         10 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
- 178 |          13 |         10 |        2 |         2 |       1 |       86 |     2 |           0 |            0 |                 0 |            0 |              0
- 179 |          13 |         10 |        3 |         2 |       1 |       90 |    27 |           0 |            0 |                 0 |            0 |              0
- 180 |          13 |         10 |        4 |         2 |       1 |       65 |    44 |           0 |            0 |                 0 |            0 |              0
- 181 |          13 |         10 |        5 |         2 |       1 |       53 |    47 |           0 |            0 |                 0 |            0 |              0
- 182 |          13 |         10 |        6 |         3 |      53 |       53 |    44 |          25 |           25 |                27 |           10 |             62
- 183 |          13 |         10 |        7 |         3 |      65 |       65 |    27 |          20 |           82 |                 0 |           10 |             92
- 184 |          13 |         10 |        8 |         3 |      86 |       86 |    25 |   19.313208 |   111.313208 |                 0 |           10 |     121.313208
- 185 |          13 |         10 |        9 |         3 |      90 |       90 |     0 |   18.439089 |   139.752297 |          4.247703 |           10 |            154
- 186 |          13 |         10 |       10 |         6 |       1 |       -1 |     0 |   52.478567 |   206.478567 |                 0 |            0 |     206.478567
- 187 |          14 |         12 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
- 188 |          14 |         12 |        2 |         2 |       1 |        6 |    20 |           0 |            0 |                 0 |            0 |              0
- 189 |          14 |         12 |        3 |         2 |       1 |       80 |    50 |           0 |            0 |                 0 |            0 |              0
- 190 |          14 |         12 |        4 |         2 |       1 |        7 |    70 |           0 |            0 |                 0 |            0 |              0
- 191 |          14 |         12 |        5 |         2 |       1 |       56 |    86 |           0 |            0 |                 0 |            0 |              0
- 192 |          14 |         12 |        6 |         3 |       6 |        6 |    66 |   40.311289 |    40.311289 | 0.688710999999998 |           10 |             51
- 193 |          14 |         12 |        7 |         3 |      80 |       80 |    36 |   22.022716 |    73.022716 |         15.977284 |           10 |             99
- 194 |          14 |         12 |        8 |         3 |       7 |        7 |    16 |   13.892444 |   112.892444 |                 0 |           10 |     122.892444
- 195 |          14 |         12 |        9 |         3 |      56 |       56 |     0 |   19.209373 |   142.101817 |                 0 |           10 |     152.101817
- 196 |          14 |         12 |       10 |         6 |       1 |       -1 |     0 |   14.142136 |   166.243953 |                 0 |            0 |     166.243953
- 197 |          15 |         19 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
- 198 |          15 |         19 |        2 |         2 |       1 |       88 |    13 |           0 |            0 |                 0 |            0 |              0
- 199 |          15 |         19 |        3 |         2 |       1 |       70 |    40 |           0 |            0 |                 0 |            0 |              0
- 200 |          15 |         19 |        4 |         2 |       1 |       58 |    63 |           0 |            0 |                 0 |            0 |              0
- 201 |          15 |         19 |        5 |         2 |       1 |       99 |    72 |           0 |            0 |                 0 |            0 |              0
- 202 |          15 |         19 |        6 |         3 |      70 |       70 |    45 |    9.219544 |     9.219544 |         31.780456 |           10 |             51
- 203 |          15 |         19 |        7 |         3 |      99 |       99 |    36 |           5 |           56 |                 0 |           10 |             66
- 204 |          15 |         19 |        8 |         3 |      88 |       88 |    23 |   31.304952 |    97.304952 |                 0 |           10 |     107.304952
- 205 |          15 |         19 |        9 |         3 |      58 |       58 |     0 |   18.027756 |   125.332708 |                 0 |           10 |     135.332708
- 206 |          15 |         19 |       10 |         6 |       1 |       -1 |     0 |   26.925824 |   162.258532 |                 0 |            0 |     162.258532
- 207 |          16 |         17 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
- 208 |          16 |         17 |        2 |         2 |       1 |       75 |     8 |           0 |            0 |                 0 |            0 |              0
- 209 |          16 |         17 |        3 |         2 |       1 |       98 |    43 |           0 |            0 |                 0 |            0 |              0
- 210 |          16 |         17 |        4 |         2 |       1 |       76 |    59 |           0 |            0 |                 0 |            0 |              0
- 211 |          16 |         17 |        5 |         3 |      76 |       76 |    43 |   57.008771 |    57.008771 |         16.991229 |           10 |             84
- 212 |          16 |         17 |        6 |         3 |      98 |       98 |     8 |   13.038405 |    97.038405 |         22.961595 |           10 |            130
- 213 |          16 |         17 |        7 |         3 |      75 |       75 |     0 |   16.124515 |   146.124515 |                 0 |           10 |     156.124515
- 214 |          16 |         17 |        8 |         6 |       1 |       -1 |     0 |   36.055513 |   192.180028 |                 0 |            0 |     192.180028
- 215 |          17 |         16 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
- 216 |          17 |         16 |        2 |         2 |       1 |       69 |    21 |           0 |            0 |                 0 |            0 |              0
- 217 |          17 |         16 |        3 |         2 |       1 |       79 |    48 |           0 |            0 |                 0 |            0 |              0
- 218 |          17 |         16 |        4 |         2 |       1 |       74 |    53 |           0 |            0 |                 0 |            0 |              0
- 219 |          17 |         16 |        5 |         3 |      74 |       74 |    48 |   39.293765 |    39.293765 |         37.706235 |           10 |             87
- 220 |          17 |         16 |        6 |         3 |      79 |       79 |    21 |    7.211103 |    94.211103 |                 0 |           10 |     104.211103
- 221 |          17 |         16 |        7 |         3 |      69 |       69 |     0 |   32.249031 |   136.460134 |  7.53986600000002 |           10 |            154
- 222 |          17 |         16 |        8 |         6 |       1 |       -1 |     0 |          10 |          164 |                 0 |            0 |            164
- 223 |          18 |          9 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
- 224 |          18 |          9 |        2 |         2 |       1 |       62 |     9 |           0 |            0 |                 0 |            0 |              0
- 225 |          18 |          9 |        3 |         2 |       1 |       37 |    49 |           0 |            0 |                 0 |            0 |              0
- 226 |          18 |          9 |        4 |         2 |       1 |       45 |    59 |           0 |            0 |                 0 |            0 |              0
- 227 |          18 |          9 |        5 |         3 |      37 |       37 |    19 |   43.011626 |    43.011626 |                 0 |           10 |      53.011626
- 228 |          18 |          9 |        6 |         3 |      45 |       45 |     9 |   10.440307 |    63.451933 | 0.548067000000003 |           10 |             74
- 229 |          18 |          9 |        7 |         3 |      62 |       62 |     0 |   19.723083 |    93.723083 |                 0 |           10 |     103.723083
- 230 |          18 |          9 |        8 |         6 |       1 |       -1 |     0 |   15.811388 |   119.534471 |                 0 |            0 |     119.534471
- 231 |          19 |         18 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
- 232 |          19 |         18 |        2 |         2 |       1 |       91 |     6 |           0 |            0 |                 0 |            0 |              0
- 233 |          19 |         18 |        3 |         2 |       1 |       12 |    46 |           0 |            0 |                 0 |            0 |              0
- 234 |          19 |         18 |        4 |         3 |      12 |       12 |     6 |   33.526109 |    33.526109 |         25.473891 |           10 |             69
- 235 |          19 |         18 |        5 |         3 |      91 |       91 |     0 |   29.832868 |    98.832868 |                 0 |           10 |     108.832868
- 236 |          19 |         18 |        6 |         6 |       1 |       -1 |     0 |    4.242641 |   113.075509 |                 0 |            0 |     113.075509
- 237 |          20 |         20 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
- 238 |          20 |         20 |        2 |         2 |       1 |       83 |     9 |           0 |            0 |                 0 |            0 |              0
- 239 |          20 |         20 |        3 |         3 |      83 |       83 |     0 |   14.764823 |    14.764823 |         27.235177 |           10 |             52
- 240 |          20 |         20 |        4 |         6 |       1 |       -1 |     0 |   14.764823 |    66.764823 |                 0 |            0 |      66.764823
- 241 |          -2 |          0 |        0 |        -1 |      -1 |       -1 |    -1 | 2304.305537 |           -1 |        408.022775 |         1000 |    3712.328312
-(241 rows)
-
-ROLLBACK;
-ROLLBACK
diff --git a/src/vrp_basic/test/test.conf b/src/vrp_basic/test/test.conf
deleted file mode 100644
index 30df1be..0000000
--- a/src/vrp_basic/test/test.conf
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/perl -w
-
-%main::tests = (
-    'any' => {
-        'comment' => 'VRP Single depot test for any versions.',
-        'data' => ['../../../tools/testers/vrpOneDepot.data'],
-        'tests' => [qw(
-            oneDepotWrapper
-            doc-pgr_vrpOneDepot
-            )],
-        'documentation' => [qw(
-            doc-pgr_vrpOneDepot
-            )]
-        },
-);
-
-1;
diff --git a/src/vrppdtw/test/doc-gsoc_vrppdtw.result b/src/vrppdtw/test/doc-gsoc_vrppdtw.result
deleted file mode 100644
index eed8a37..0000000
--- a/src/vrppdtw/test/doc-gsoc_vrppdtw.result
+++ /dev/null
@@ -1,79 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
---q1
-SELECT DISTINCT(id1) FROM pgr_gsoc_vrppdtw(
-    'SELECT * FROM customer ORDER BY id', 25, 200)
-ORDER BY id1;
- id1 
------
-   1
-   2
-   3
-   4
-   5
-   6
-   7
-   8
-   9
-  10
-(10 rows)
-
---q2
-SELECT count(*) FROM pgr_gsoc_vrppdtw(
-    'SELECT * FROM customer ORDER BY id', 25, 200);
- count 
--------
-   126
-(1 row)
-
---q3
-SELECT * FROM pgr_gsoc_vrppdtw(
-    'SELECT * FROM customer ORDER BY id', 25, 200)
-    WHERE id1 in (1, 5, 9);
- seq | id1 | id2 |       cost       
------+-----+-----+------------------
-   1 |   1 |   0 |                0
-   2 |   1 |  13 | 120.805843601499
-   3 |   1 |  17 | 214.805843601499
-   4 |   1 |  18 | 307.805843601499
-   5 |   1 |  19 | 402.805843601499
-   6 |   1 |  15 | 497.805843601499
-   7 |   1 |  16 | 592.805843601499
-   8 |   1 |  14 | 684.805843601499
-   9 |   1 |  12 | 777.805843601499
-  10 |   1 |  50 | 920.815276724293
-  11 |   1 |  52 | 1013.97755438446
-  12 |   1 |  49 | 1106.97755438446
-  13 |   1 |  47 | 1198.97755438446
-  14 |   1 |   0 | 1217.00531076178
-  57 |   5 |   0 |                0
-  58 |   5 |  90 | 110.615528128088
-  59 |   5 |  87 | 205.615528128088
-  60 |   5 |  86 | 296.615528128088
-  61 |   5 |  83 | 392.615528128088
-  62 |   5 |  82 | 485.615528128088
-  63 |   5 |  84 | 581.446480022934
-  64 |   5 |  85 |  674.27490714768
-  65 |   5 |  88 |  767.27490714768
-  66 |   5 |  89 | 860.103334272426
-  67 |   5 |  91 |  953.70888554789
-  68 |   5 |   0 | 976.069565322888
- 105 |   9 |   0 |                0
- 106 |   9 |  67 | 102.206555615734
- 107 |   9 |  65 | 193.206555615734
- 108 |   9 |  63 | 285.206555615734
- 109 |   9 |  62 | 380.206555615734
- 110 |   9 |  74 | 473.206555615734
- 111 |   9 |  72 | 568.206555615734
- 112 |   9 |  61 | 661.206555615734
- 113 |   9 |  64 | 663.206555615734
- 114 |   9 | 102 | 753.206555615734
- 115 |   9 |  68 | 846.206555615734
- 116 |   9 |   0 | 866.822083743822
-(38 rows)
-
---q4
-ROLLBACK;
-ROLLBACK
diff --git a/src/vrppdtw/test/test.conf b/src/vrppdtw/test/test.conf
deleted file mode 100644
index 068bb2b..0000000
--- a/src/vrppdtw/test/test.conf
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/perl -w
-
-%main::tests = (
-    'any' => {
-        'comment' => 'Function test for any versions.',
-        'data' => ['../../../tools/testers/vrppdtw_data.sql'],
-        'tests' => [qw(
-            )],
-        'windows' => [qw(
-            )],
-        'linux' => [qw(
-            doc-gsoc_vrppdtw
-            )],
-        'documentation' => [qw(
-            doc-gsoc_vrppdtw
-            )]
-    },
-);
-
-1;
diff --git a/src/withPoints/src/CMakeLists.txt b/src/withPoints/CMakeLists.txt
similarity index 100%
rename from src/withPoints/src/CMakeLists.txt
rename to src/withPoints/CMakeLists.txt
diff --git a/src/withPoints/get_new_queries.cpp b/src/withPoints/get_new_queries.cpp
new file mode 100644
index 0000000..1c5f4c8
--- /dev/null
+++ b/src/withPoints/get_new_queries.cpp
@@ -0,0 +1,68 @@
+/*PGR-GNU*****************************************************************
+File: get_new_queries.cpp
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer:
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+Mail:
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "drivers/withPoints/get_new_queries.h"
+#include <string.h>
+#include <sstream>
+#include "cpp_common/pgr_alloc.hpp"
+
+char
+estimate_drivingSide(char driving_side) {
+    char d_side = static_cast<char>(tolower(driving_side));
+    if (!((d_side == 'r')
+                || (d_side == 'l'))) {
+        d_side = 'b';
+    }
+    return d_side;
+}
+
+void
+get_new_queries(
+        char *edges_sql,
+        char *points_sql,
+        char **edges_of_points_query,
+        char **edges_no_points_query) {
+    std::ostringstream edges_of_points_sql;
+    std::ostringstream edges_no_points_sql;
+
+    edges_of_points_sql << "WITH "
+        << " edges AS (" << edges_sql << "), "
+        << " points AS (" << points_sql << ")"
+        << " SELECT DISTINCT edges.* FROM edges JOIN points ON (id = edge_id)";
+    *edges_of_points_query = pgr_msg(edges_of_points_sql.str().c_str());
+
+    edges_no_points_sql << "WITH "
+        << " edges AS (" << edges_sql << "), "
+        << " points AS (" << points_sql << ")"
+        << " SELECT edges.*"
+        << " FROM edges"
+        << " WHERE NOT EXISTS (SELECT edge_id FROM points WHERE id = edge_id)";
+    *edges_no_points_query = pgr_msg(edges_no_points_sql.str().c_str());
+}
+
diff --git a/src/withPoints/pgr_withPoints.cpp b/src/withPoints/pgr_withPoints.cpp
new file mode 100644
index 0000000..edf501b
--- /dev/null
+++ b/src/withPoints/pgr_withPoints.cpp
@@ -0,0 +1,552 @@
+/*PGR-GNU*****************************************************************
+File: pgr_withPoints.cpp
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer:
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+Mail:
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+
+#include "withPoints/pgr_withPoints.hpp"
+
+#include <sstream>
+#include <deque>
+#include <set>
+#include <vector>
+#include <string>
+#include <algorithm>
+#include <cassert>
+
+#include "cpp_common/pgr_assert.h"
+
+namespace pgrouting {
+
+
+std::ostream& operator<<(
+        std::ostream &os, const Pg_points_graph &g) {
+    for (const auto p : g.m_points) {
+        os << p.pid << "\t"
+            << p.edge_id << "\t"
+            << p.fraction << "\t"
+            << p.side << "\n";
+    }
+    return os;
+}
+
+
+
+std::vector<Point_on_edge_t>
+Pg_points_graph::points() const {
+    return m_points;
+}
+
+std::vector<pgr_edge_t>
+Pg_points_graph::edges_of_points() const {
+    return m_edges_of_points;
+}
+
+
+
+Pg_points_graph::Pg_points_graph(
+        std::vector<Point_on_edge_t> p_points,
+        std::vector<pgr_edge_t>      p_edges_of_points,
+        bool p_normal,
+        char p_driving_side,
+        bool p_directed) :
+    m_points(p_points),
+    m_o_points(p_points),
+    m_edges_of_points(p_edges_of_points),
+    m_normal(p_normal),
+    m_driving_side(p_driving_side),
+    m_directed(p_directed) {
+    if (!p_normal) {
+        reverse_sides();
+    }
+    if (!m_directed) {
+        m_driving_side = 'b';
+    }
+    check_points();
+    create_new_edges();
+    log << "constructor";
+}
+
+void
+Pg_points_graph::reverse_sides() {
+    for (auto &point : m_points) {
+        if (point.side == 'r') {
+            point.side = 'l';
+        } else if (point.side == 'l') {
+            point.side = 'r';
+        }
+        point.fraction = 1 - point.fraction;
+    }
+    if (m_driving_side == 'r') {
+        m_driving_side = 'l';
+    } else if (m_driving_side == 'l') {
+        m_driving_side = 'r';
+    }
+}
+
+
+void
+Pg_points_graph::check_points() {
+    log << "original points" << *this;
+    /*
+     * deleting duplicate points
+     */
+    std::sort(m_points.begin(), m_points.end(),
+            [](const Point_on_edge_t &a, const Point_on_edge_t &b)
+            -> bool {
+            if (a.pid != b.pid) return a.pid < b.pid;
+            if (a.edge_id != b.edge_id) return a.edge_id < b.edge_id;
+            if (a.fraction != b.fraction) return a.fraction < b.fraction;
+            return a.side < b.side;
+            });
+    log << "after sorting" << *this;
+    auto last = std::unique(m_points.begin(), m_points.end(),
+            [](const Point_on_edge_t &a, const Point_on_edge_t &b) {
+            return a.pid == b.pid &&
+            a.edge_id == b.edge_id &&
+            a.fraction == b.fraction &&
+            a.side == b.side;
+            });
+    m_points.erase(last, m_points.end());
+    size_t total_points = m_points.size();
+
+    log << "after deleting repetitions" << *this;
+    log << "We have " << total_points << " different points";
+
+    last = std::unique(m_points.begin(), m_points.end(),
+            [](const Point_on_edge_t &a, const Point_on_edge_t &b) {
+            return a.pid == b.pid;
+            });
+    m_points.erase(last, m_points.end());
+    log << "after deleting points with same id" << *this;
+
+    if (m_points.size() != total_points) {
+        error << "Unexpected point(s) with same pid"
+            << " but different edge/fraction/side combination found.";
+    }
+}
+
+
+int64_t
+Pg_points_graph::get_edge_id(int64_t pid) const {
+    auto point_ptr = std::find_if(
+            m_points.begin(), m_points.end(),
+            [&pid](const Point_on_edge_t &point)
+            {return pid == -point.pid;});
+    return point_ptr != m_points.end() ?
+        point_ptr->edge_id :
+        -1;
+}
+
+const pgr_edge_t*
+Pg_points_graph::get_edge_data(int64_t eid) const {
+    auto e_itr = std::find_if(
+            m_edges_of_points.begin(), m_edges_of_points.end(),
+            [&eid](const pgr_edge_t &edge)
+            {return eid == edge.id;});
+    return e_itr ==  m_edges_of_points.end()?
+       nullptr : &(*e_itr);
+}
+
+
+void
+Pg_points_graph::eliminate_details_dd(
+        Path &path) const {
+    /*
+     * There is no path nothing to do
+     */
+    if (path.empty()) return;
+
+    Path newPath(path.start_id(), path.end_id());
+    auto edge_id = path.start_id() < 0?
+        get_edge_id(path.start_id()) :
+        -1;
+
+    for (auto pathstop : path) {
+        /*
+         * skip points (no details)
+         *  except if ithe point its the starting point
+         */
+        if (!((pathstop.node == path.start_id())
+                || (pathstop.node > 0))) {
+            continue;
+        }
+
+        /*
+         * Change costs only when the node is not:
+         * - start_id
+         * - directly connected to start_id
+         */
+        if (pathstop.node != path.start_id()) {
+            auto edge_ptr = get_edge_data(pathstop.edge);
+            /*
+             * edge found
+             * and its not the edge directly connected to start_id()
+             */
+            if (edge_ptr
+                    && edge_ptr->id != edge_id) {
+                pathstop.cost = pathstop.node == edge_ptr->source?
+                    edge_ptr->cost :
+                        edge_ptr->reverse_cost;
+                }
+        }
+
+        /*
+         * add to the new path
+         */
+        newPath.push_back(pathstop);
+    }
+
+    path = newPath;
+}
+
+
+
+Path
+Pg_points_graph::eliminate_details(
+        Path path) const {
+    /*
+     * There is no path nothing to do
+     */
+    if (path.empty()) return path;
+
+    Path newPath(path.start_id(), path.end_id());
+    double cost = 0.0;
+    for (const auto &pathstop : path) {
+        if ((pathstop.node == path.start_id())
+                || (pathstop.node == path.end_id())
+                || (pathstop.node > 0)) {
+            newPath.push_back(pathstop);
+            if (pathstop.node != path.end_id()) cost = 0.0;
+            continue;
+        }
+        cost += pathstop.cost;
+    }
+
+    newPath[0].cost = newPath[1].agg_cost;
+    for (unsigned int i = 1; i < newPath.size() - 2; ++i) {
+        /* newPath[i] has: node, edge, cost, agg_cost
+         * pgr_type_t has: id, source, target, cost, reverse_cost
+         *
+         * find the edge where the pathstop.edge == edge.id */
+
+        int64_t edge_to_find = newPath[i].edge;
+        auto edge_ptr = std::find_if(
+                m_edges_of_points.begin(), m_edges_of_points.end(),
+                [&edge_to_find](const pgr_edge_t &edge)
+                {return edge_to_find == edge.id;});
+        if (edge_ptr != m_edges_of_points.end()) {
+            newPath[i].cost = edge_ptr->target == newPath[i+1].node ?
+                edge_ptr->cost : edge_ptr->reverse_cost;
+        }
+    }
+    newPath[newPath.size()-2].cost += cost;
+
+    return newPath;
+}
+
+
+void
+Pg_points_graph::adjust_pids(
+        const std::vector< Point_on_edge_t > &points,
+        const int64_t &start_pid,
+        const int64_t &end_pid,
+        Path &path) {
+    if (path.empty()) return;
+    path.start_id(start_pid);
+    path.end_id(end_pid);
+
+    for (auto &path_stop : path) {
+        for (const auto point : points) {
+            if (point.vertex_id == path_stop.node) {
+                path_stop.node = -point.pid;
+                break;
+            }
+        }
+    }
+}
+
+void
+Pg_points_graph::adjust_pids(
+        const std::vector< Point_on_edge_t > &points,
+        Path &path) {
+    /*
+     * There is no path nothing to do
+     */
+    if (path.empty()) return;
+    /* from, to:
+     *      * are constant along the path
+     *           */
+    int64_t start_vid = path.start_id();
+    int64_t end_vid = path.end_id();
+
+    int64_t start_pid = 0;
+    int64_t end_pid = 0;
+
+    for (auto &p : points) {
+        if (p.vertex_id == start_vid) {
+            start_pid = -p.pid;
+        }
+        if (p.vertex_id == end_vid) {
+            end_pid = -p.pid;
+        }
+    }
+    adjust_pids(points, start_pid, end_pid, path);
+}
+
+
+
+std::vector<pgr_edge_t>
+Pg_points_graph::new_edges() const {
+    return m_new_edges;
+}
+
+void
+Pg_points_graph::create_new_edges() {
+    for (const auto &point : m_points) {
+        log << "point: "
+            << point.pid << "\t"
+            << point.edge_id << "\t"
+            << point.fraction << "\t"
+            << point.side << "\t"
+            << point.vertex_id << "\n";
+    }
+
+    int64_t vertex_id = 1;
+    std::vector< Point_on_edge_t > new_points;
+    for (const auto edge : m_edges_of_points) {
+        std::set< Point_on_edge_t, pointCompare> points_on_edge;
+        for (const auto point : m_points) {
+            if (edge.id == point.edge_id) {
+                points_on_edge.insert(point);
+                log << "working points: "
+                    << point.pid << "\t"
+                    << point.edge_id << "\t"
+                    << point.fraction << "\t"
+                    << point.side << "\t"
+                    << point.vertex_id << "\n";
+            }
+        }
+        if (points_on_edge.empty()) {
+            error << "For some reason didn't find a point belonging to the edge"
+                << ", must be an error\n";
+            return;
+        }
+#if 0
+        log << "breaking: \n"
+            << edge.id << "\t"
+            << edge.source << "\t"
+            << edge.target << "\t"
+            << edge.cost << "\t"
+            << edge.reverse_cost << "\n";
+#endif
+        int64_t prev_target = edge.source;
+        int64_t prev_rtarget = edge.source;
+        double prev_fraction = 0;
+        double prev_rfraction = 0;
+        double agg_cost = 0;
+        double agg_rcost = 0;
+        double last_cost = 0;
+        double last_rcost = 0;
+        std::vector<Point_on_edge_t> the_points(
+                points_on_edge.begin(), points_on_edge.end());
+
+        for (auto &point : the_points) {
+            /* the point either has
+             * vertex_id = source
+             * vertex_id = target
+             * vertex_id = -newnumber
+             */
+            log << "\npid"
+                << point.pid
+                << "\teid" << point.edge_id
+                << "/t" << point.fraction
+                << "\t" << point.side << "\n";
+            if (point.fraction < 0 ||  point.fraction > 1) {
+                error << "For some reason an invalid fraction was accepted,"
+                    << " must be an error\n";
+                return;
+            }
+            if (point.fraction == 0) {
+                log << "Point's vertex_id = source" << edge.source << "\n";
+                point.vertex_id = edge.source;
+            }
+            if (point.fraction == 1) {
+                log << "point's vertex_id = target" << edge.target << "\n";
+                point.vertex_id = edge.target;
+            }
+            if (point.fraction > 0 &&  point.fraction < 1) {
+                log << "vertex_id of the point is " << -point.pid << "\n";
+                point.vertex_id = -point.pid;
+                ++vertex_id;
+            }
+            new_points.push_back(point);
+
+            double deltaFraction = point.fraction - prev_fraction;
+            double deltarFraction = point.fraction - prev_rfraction;
+            if ((edge.cost < 0 ||  edge.reverse_cost < 0)
+                    || m_driving_side == 'b'
+                    || point.side == 'b') {
+                log << "Edge is one way "
+                    << " or driving side is both or point side is both\n";
+                log << "Edge is one way: "
+                    << (edge.cost < 0 || edge.reverse_cost < 0)
+                    << "\n";
+                log << "driving side: " << m_driving_side << "\n";
+                log << "point side: " << point.side << "\n";
+                if (point.fraction > 0 &&  point.fraction < 1) {
+                    if (edge.cost >= 0) {
+                        last_cost = deltaFraction * edge.cost;
+                        pgr_edge_t new_edge = {
+                            edge.id,
+                            prev_target,
+                            point.vertex_id,
+                            last_cost,
+                            -1};
+                        m_new_edges.push_back(new_edge);
+                        log << "new_edge("
+                            << "id, source, target, cost, reverse_cost) = ("
+                            << new_edge.id << "\t"
+                            << new_edge.source << "\t"
+                            << new_edge.target << "\t"
+                            << new_edge.cost << "\t"
+                            << new_edge.reverse_cost << ")\n";
+                    }
+                    if (edge.reverse_cost >= 0) {
+                        last_rcost = deltarFraction * edge.reverse_cost;
+                        pgr_edge_t new_edge = {
+                            edge.id,
+                            prev_target,
+                            point.vertex_id,
+                            -1,
+                            last_rcost};
+                        m_new_edges.push_back(new_edge);
+                        log << "new_edge("
+                            << "id, source, target, cost, reverse_cost) = ("
+                            << new_edge.id << "\t"
+                            << new_edge.source << "\t"
+                            << new_edge.target << "\t"
+                            << new_edge.cost << "\t"
+                            << new_edge.reverse_cost << ")\n";
+                    }
+                }
+                prev_target = point.vertex_id;
+                prev_fraction = point.fraction;
+                agg_cost += last_cost;
+
+                prev_rtarget = point.vertex_id;
+                prev_rfraction = point.fraction;
+                agg_rcost += last_rcost;
+                continue;
+            }
+
+            pgassert(edge.cost > 0 &&  edge.reverse_cost > 0);
+            pgassert(point.side != 'b');
+
+            if (m_driving_side == point.side) {
+                log << "two way and driving side == the side of the point\n";
+                log << "Breaking (source, target) when its not the extreme\n";
+                if (point.fraction > 0 &&  point.fraction < 1) {
+                    last_cost = deltaFraction * edge.cost;
+                    pgr_edge_t new_edge = {
+                        edge.id, prev_target, point.vertex_id, last_cost, -1};
+                    m_new_edges.push_back(new_edge);
+                    log << "new_edge("
+                        << "id, source, target, cost, reverse_cost) = ("
+                        << new_edge.id << "\t"
+                        << new_edge.source << "\t"
+                        << new_edge.target << "\t"
+                        << new_edge.cost << "\t"
+                        << new_edge.reverse_cost << ")\n";
+                }
+                prev_target = point.vertex_id;
+                prev_fraction = point.fraction;
+                agg_cost += last_cost;
+                continue;
+            }
+
+            log << "\ntwo way and driving side != the side of the point";
+            if (point.fraction > 0 &&  point.fraction < 1) {
+                last_rcost = deltarFraction * edge.reverse_cost;
+                pgr_edge_t new_edge = {
+                    edge.id,
+                    prev_rtarget,
+                    point.vertex_id,
+                    -1,
+                    last_rcost};
+                m_new_edges.push_back(new_edge);
+                log << "\nnew_edge(id, source, target, cost, reverse_cost) = ("
+                    << new_edge.id << "\t"
+                    << new_edge.source << "\t"
+                    << new_edge.target << "\t"
+                    << new_edge.cost << "\t"
+                    << new_edge.reverse_cost << ")\n";
+            }
+            prev_rtarget = point.vertex_id;
+            prev_rfraction = point.fraction;
+            agg_rcost += last_rcost;
+        }
+
+        {  //  the last segments
+            pgr_edge_t new_edge = {
+                edge.id,
+                prev_target,
+                edge.target,
+                (edge.cost - agg_cost),
+                -1};
+            m_new_edges.push_back(new_edge);
+            log << "last edge: (id, source, target, cost, reverse_cost) = ("
+                << new_edge.id << "\t"
+                << new_edge.source << "\t"
+                << new_edge.target << "\t"
+                << new_edge.cost << "\t"
+                << new_edge.reverse_cost << ")\n";
+
+            new_edge = {edge.id , prev_rtarget, edge.target,
+                -1, (edge.reverse_cost - agg_rcost)};
+            m_new_edges.push_back(new_edge);
+            log << "last edge: (id, source, target, cost, reverse_cost) = ("
+                << new_edge.id << "\t"
+                << new_edge.source << "\t"
+                << new_edge.target << "\t"
+                << new_edge.cost << "\t"
+                << new_edge.reverse_cost << ")\n";
+        }
+    }
+
+    m_points = new_points;
+    for (const auto &point : m_points) {
+        log << "point: "
+            << point.pid << "\t"
+            << point.edge_id << "\t"
+            << point.fraction << "\t"
+            << point.side << "\t"
+            << point.vertex_id << "\n";
+    }
+}
+
+}  // namespace pgrouting
diff --git a/src/withPoints/src/get_new_queries.cpp b/src/withPoints/src/get_new_queries.cpp
deleted file mode 100644
index 85ba686..0000000
--- a/src/withPoints/src/get_new_queries.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: get_new_queries.cpp
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer:
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-Mail:
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "drivers/withPoints/get_new_queries.h"
-#include <string.h>
-#include <sstream>
-
-char
-estimate_drivingSide(char driving_side) {
-    char d_side = static_cast<char>(tolower(driving_side));
-    if (!((d_side == 'r')
-                || (d_side == 'l'))) {
-        d_side = 'b';
-    }
-    return d_side;
-}
-
-void
-get_new_queries(
-        char *edges_sql,
-        char *points_sql,
-        char **edges_of_points_query,
-        char **edges_no_points_query) {
-    std::ostringstream edges_of_points_sql;
-    std::ostringstream edges_no_points_sql;
-
-    edges_of_points_sql << "WITH "
-        << " edges AS (" << edges_sql << "), "
-        << " points AS (" << points_sql << ")"
-        << " SELECT DISTINCT edges.* FROM edges JOIN points ON (id = edge_id)";
-    *edges_of_points_query = strdup(edges_of_points_sql.str().c_str());
-
-    edges_no_points_sql << "WITH "
-        << " edges AS (" << edges_sql << "), "
-        << " points AS (" << points_sql << ")"
-        << " SELECT edges.*"
-        << " FROM edges"
-        << " WHERE NOT EXISTS (SELECT edge_id FROM points WHERE id = edge_id)";
-    *edges_no_points_query = strdup(edges_no_points_sql.str().c_str());
-}
-
diff --git a/src/withPoints/src/pgr_withPoints.cpp b/src/withPoints/src/pgr_withPoints.cpp
deleted file mode 100644
index 8395f50..0000000
--- a/src/withPoints/src/pgr_withPoints.cpp
+++ /dev/null
@@ -1,467 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: pgr_withPoints.cpp
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer:
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-Mail:
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-
-#include "./pgr_withPoints.hpp"
-
-#include <sstream>
-#include <deque>
-#include <set>
-#include <vector>
-#include <string>
-#include <algorithm>
-#include <cassert>
-
-#include "cpp_common/pgr_assert.h"
-
-static
-void
-PGR_LOG_POINTS(
-        std::ostringstream &log,
-        const std::vector< Point_on_edge_t > &points,
-        const std::string &title) {
-    log << title << "\n";
-    for (const auto &p : points) {
-        log << p.pid << "\t"
-            << p.edge_id << "\t"
-            << p.fraction << "\t"
-            << p.side << "\n";
-    }
-}
-
-/*
- * 0 = success
- * non 0 = error code
- */
-
-int check_points(std::vector< Point_on_edge_t > &points,
-        std::ostringstream &log) {
-    PGR_LOG_POINTS(log, points, "original points");
-    /*
-     * deleting duplicate points
-     */
-    std::sort(points.begin(), points.end(),
-            [](const Point_on_edge_t &a, const Point_on_edge_t &b)
-            -> bool {
-            if (a.pid != b.pid) return a.pid < b.pid;
-            if (a.edge_id != b.edge_id) return a.edge_id < b.edge_id;
-            if (a.fraction != b.fraction) return a.fraction < b.fraction;
-            return a.side < b.side;
-            });
-    PGR_LOG_POINTS(log, points, "after sorting");
-    auto last = std::unique(points.begin(), points.end(),
-            [](const Point_on_edge_t &a, const Point_on_edge_t &b) {
-            return a.pid == b.pid &&
-            a.edge_id == b.edge_id &&
-            a.fraction == b.fraction &&
-            a.side == b.side;
-            });
-    points.erase(last, points.end());
-    size_t total_points = points.size();
-
-    PGR_LOG_POINTS(log, points, "after deleting repetitions");
-    log << "We have " << total_points << " different points";
-
-    last = std::unique(points.begin(), points.end(),
-            [](const Point_on_edge_t &a, const Point_on_edge_t &b) {
-            return a.pid == b.pid;
-            });
-    points.erase(last, points.end());
-    PGR_LOG_POINTS(log, points, "after deleting points with same id");
-
-    if (points.size() != total_points) {
-        return 1;
-    }
-    return 0;
-}
-
-
-void
-eliminate_details_dd(
-        Path &path) {
-    /*
-     * There is no path nothing to do
-     */
-    if (path.empty()) return;
-
-    Path newPath(path.start_id(), path.end_id());
-    for (const auto &pathstop : path) {
-        if ((pathstop.node == path.start_id())
-                || (pathstop.node == path.end_id())
-                || (pathstop.node > 0)) {
-            newPath.push_back(pathstop);
-        }
-    }
-
-    path = newPath;
-}
-
-
-void
-eliminate_details(
-        Path &path,
-        const std::vector< pgr_edge_t > &point_edges) {
-    /*
-     * There is no path nothing to do
-     */
-    if (path.empty()) return;
-
-    Path newPath(path.start_id(), path.end_id());
-    double cost = 0.0;
-    for (const auto &pathstop : path) {
-        if ((pathstop.node == path.start_id())
-                || (pathstop.node == path.end_id())
-                || (pathstop.node > 0)) {
-            newPath.push_back(pathstop);
-            if (pathstop.node != path.end_id()) cost = 0.0;
-            continue;
-        }
-        cost += pathstop.cost;
-    }
-
-    newPath[0].cost = newPath[1].agg_cost;
-    for (unsigned int i = 1; i < newPath.size() - 2; ++i) {
-        /* newPath[i] has: node, edge, cost, agg_cost
-         * pgr_type_t has: id, source, target, cost, reverse_cost
-         *
-         * find the edge where the pathstop.edge == edge.id */
-
-        int64_t edge_to_find = newPath[i].edge;
-        auto edge_ptr = std::find_if(point_edges.begin(), point_edges.end(),
-                [&edge_to_find](const pgr_edge_t &edge)
-                {return edge_to_find == edge.id;});
-        if (edge_ptr != point_edges.end()) {
-            newPath[i].cost = edge_ptr->target == newPath[i+1].node ?
-                edge_ptr->cost : edge_ptr->reverse_cost;
-        }
-    }
-    newPath[newPath.size()-2].cost += cost;
-
-
-    path = newPath;
-}
-
-
-static void
-adjust_pids(
-        const std::vector< Point_on_edge_t > &points,
-        const int64_t &start_pid,
-        const int64_t &end_pid,
-        Path &path) {
-    if (path.empty()) return;
-    path.start_id(start_pid);
-    path.end_id(end_pid);
-
-    for (auto &path_stop : path) {
-        for (const auto point : points) {
-            if (point.vertex_id == path_stop.node) {
-                path_stop.node = -point.pid;
-                break;
-            }
-        }
-    }
-}
-
-void
-adjust_pids(
-        const std::vector< Point_on_edge_t > &points,
-        Path &path) {
-    /*
-     * There is no path nothing to do
-     */
-    if (path.empty()) return;
-    /* from, to:
-     *      * are constant along the path
-     *           */
-    int64_t start_vid = path.start_id();
-    int64_t end_vid = path.end_id();
-
-    int64_t start_pid = 0;
-    int64_t end_pid = 0;
-
-    for (auto &p : points) {
-        if (p.vertex_id == start_vid) {
-            start_pid = -p.pid;
-        }
-        if (p.vertex_id == end_vid) {
-            end_pid = -p.pid;
-        }
-    }
-    adjust_pids(points, start_pid, end_pid, path);
-}
-
-
-struct pointCompare {
-    bool operator() (
-            const Point_on_edge_t& lhs,
-            const Point_on_edge_t& rhs) const
-    {return lhs.fraction < rhs.fraction? true : lhs.pid < rhs.pid;}
-};
-
-bool
-create_new_edges(
-        std::vector< Point_on_edge_t > &points,
-        const std::vector< pgr_edge_t > &edges,
-        char driving_side,
-        std::vector< pgr_edge_t > &new_edges) {
-    std::ostringstream log;
-    return create_new_edges( points, edges, driving_side, new_edges, log);
-}
-
-
-
-bool
-create_new_edges(
-        std::vector< Point_on_edge_t > &points,
-        const std::vector< pgr_edge_t > &edges,
-        char driving_side,
-        std::vector< pgr_edge_t > &new_edges,
-        std::ostringstream &log) {
-    for (const auto &point : points) {
-        log << "point: "
-            << point.pid << "\t"
-            << point.edge_id << "\t"
-            << point.fraction << "\t"
-            << point.side << "\t"
-            << point.vertex_id << "\n";
-    }
-
-    int64_t vertex_id = 1;
-    std::vector< Point_on_edge_t > new_points;
-    for (const auto edge : edges) {
-        std::set< Point_on_edge_t, pointCompare> points_on_edge;
-        for (const auto point : points) {
-            if (edge.id == point.edge_id) {
-                points_on_edge.insert(point);
-                log << "working points: "
-                    << point.pid << "\t"
-                    << point.edge_id << "\t"
-                    << point.fraction << "\t"
-                    << point.side << "\t"
-                    << point.vertex_id << "\n";
-            }
-        }
-        if (points_on_edge.empty()) {
-            log << "For some reason didn't find a point belonging to the edge"
-                << ", must be an error\n";
-            return false;
-        }
-#if 0
-        log << "breaking: \n"
-            << edge.id << "\t"
-            << edge.source << "\t"
-            << edge.target << "\t"
-            << edge.cost << "\t"
-            << edge.reverse_cost << "\n";
-#endif
-        int64_t prev_target = edge.source;
-        int64_t prev_rtarget = edge.source;
-        double prev_fraction = 0;
-        double prev_rfraction = 0;
-        double agg_cost = 0;
-        double agg_rcost = 0;
-        double last_cost = 0;
-        double last_rcost = 0;
-        std::vector<Point_on_edge_t> the_points(
-                points_on_edge.begin(), points_on_edge.end());
-
-        for (auto &point : the_points) {
-            /* the point either has
-             * vertex_id = source
-             * vertex_id = target
-             * vertex_id = -newnumber
-             */
-            log << "\npid"
-                << point.pid
-                << "\teid" << point.edge_id
-                << "/t" << point.fraction
-                << "\t" << point.side << "\n";
-            if (point.fraction <= 0 ||  point.fraction >= 1) {
-                log << "For some reason an invalid fraction was accepted,"
-                    << " must be an error\n";
-                return false;
-            }
-            if (point.fraction == 0) {
-                log << "Point's vertex_id = source" << edge.source << "\n";
-                point.vertex_id = edge.source;
-            }
-            if (point.fraction == 1) {
-                log << "point's vertex_id = target" << edge.target << "\n";
-                point.vertex_id = edge.target;
-            }
-            if (point.fraction > 0 &&  point.fraction < 1) {
-                log << "vertex_id of the point is " << -point.pid << "\n";
-                point.vertex_id = -point.pid;
-                ++vertex_id;
-            }
-            new_points.push_back(point);
-
-            double deltaFraction = point.fraction - prev_fraction;
-            double deltarFraction = point.fraction - prev_rfraction;
-            if ((edge.cost < 0 ||  edge.reverse_cost < 0)
-                    || driving_side == 'b'
-                    || point.side == 'b') {
-                log << "Edge is one way "
-                    << " or driving side is both or point side is both\n";
-                log << "Edge is one way: "
-                    << (edge.cost < 0 || edge.reverse_cost < 0)
-                    << "\n";
-                log << "driving side: " << driving_side << "\n";
-                log << "point side: " << point.side << "\n";
-                if (point.fraction > 0 &&  point.fraction < 1) {
-                    if (edge.cost >= 0) {
-                        last_cost = deltaFraction * edge.cost;
-                        pgr_edge_t new_edge = {
-                            edge.id,
-                            prev_target,
-                            point.vertex_id,
-                            last_cost,
-                            -1};
-                        new_edges.push_back(new_edge);
-                        log << "new_edge("
-                            << "id, source, target, cost, reverse_cost) = ("
-                            << new_edge.id << "\t"
-                            << new_edge.source << "\t"
-                            << new_edge.target << "\t"
-                            << new_edge.cost << "\t"
-                            << new_edge.reverse_cost << ")\n";
-                    }
-                    if (edge.reverse_cost >= 0) {
-                        last_rcost = deltarFraction * edge.reverse_cost;
-                        pgr_edge_t new_edge = {
-                            edge.id,
-                            prev_target,
-                            point.vertex_id,
-                            -1,
-                            last_rcost};
-                        new_edges.push_back(new_edge);
-                        log << "new_edge("
-                            << "id, source, target, cost, reverse_cost) = ("
-                            << new_edge.id << "\t"
-                            << new_edge.source << "\t"
-                            << new_edge.target << "\t"
-                            << new_edge.cost << "\t"
-                            << new_edge.reverse_cost << ")\n";
-                    }
-                }
-                prev_target = point.vertex_id;
-                prev_fraction = point.fraction;
-                agg_cost += last_cost;
-
-                prev_rtarget = point.vertex_id;
-                prev_rfraction = point.fraction;
-                agg_rcost += last_rcost;
-                continue;
-            }
-
-            pgassert(edge.cost > 0 &&  edge.reverse_cost > 0);
-            pgassert(point.side != 'b');
-
-            if (driving_side == point.side) {
-                log << "two way and driving side == the side of the point\n";
-                log << "Breaking (source, target) when its not the extreme\n";
-                if (point.fraction > 0 &&  point.fraction < 1) {
-                    last_cost = deltaFraction * edge.cost;
-                    pgr_edge_t new_edge = {
-                        edge.id, prev_target, point.vertex_id, last_cost, -1};
-                    new_edges.push_back(new_edge);
-                    log << "new_edge("
-                        << "id, source, target, cost, reverse_cost) = ("
-                        << new_edge.id << "\t"
-                        << new_edge.source << "\t"
-                        << new_edge.target << "\t"
-                        << new_edge.cost << "\t"
-                        << new_edge.reverse_cost << ")\n";
-                }
-                prev_target = point.vertex_id;
-                prev_fraction = point.fraction;
-                agg_cost += last_cost;
-                continue;
-            }
-
-            log << "\ntwo way and driving side != the side of the point";
-            if (point.fraction > 0 &&  point.fraction < 1) {
-                last_rcost = deltarFraction * edge.reverse_cost;
-                pgr_edge_t new_edge = {
-                    edge.id,
-                    prev_rtarget,
-                    point.vertex_id,
-                    -1,
-                    last_rcost};
-                new_edges.push_back(new_edge);
-                log << "\nnew_edge(id, source, target, cost, reverse_cost) = ("
-                    << new_edge.id << "\t"
-                    << new_edge.source << "\t"
-                    << new_edge.target << "\t"
-                    << new_edge.cost << "\t"
-                    << new_edge.reverse_cost << ")\n";
-            }
-            prev_rtarget = point.vertex_id;
-            prev_rfraction = point.fraction;
-            agg_rcost += last_rcost;
-        }
-
-        {  //  the last segments
-            pgr_edge_t new_edge = {
-                edge.id,
-                prev_target,
-                edge.target,
-                (edge.cost - agg_cost),
-                -1};
-            new_edges.push_back(new_edge);
-            log << "last edge: (id, source, target, cost, reverse_cost) = ("
-                << new_edge.id << "\t"
-                << new_edge.source << "\t"
-                << new_edge.target << "\t"
-                << new_edge.cost << "\t"
-                << new_edge.reverse_cost << ")\n";
-
-            new_edge = {edge.id , prev_rtarget, edge.target,
-                -1, (edge.reverse_cost - agg_rcost)};
-            new_edges.push_back(new_edge);
-            log << "last edge: (id, source, target, cost, reverse_cost) = ("
-                << new_edge.id << "\t"
-                << new_edge.source << "\t"
-                << new_edge.target << "\t"
-                << new_edge.cost << "\t"
-                << new_edge.reverse_cost << ")\n";
-        }
-    }
-
-    points = new_points;
-    for (const auto &point : points) {
-        log << "point: "
-            << point.pid << "\t"
-            << point.edge_id << "\t"
-            << point.fraction << "\t"
-            << point.side << "\t"
-            << point.vertex_id << "\n";
-    }
-    return true;
-}
diff --git a/src/withPoints/src/pgr_withPoints.hpp b/src/withPoints/src/pgr_withPoints.hpp
deleted file mode 100644
index 6558c7f..0000000
--- a/src/withPoints/src/pgr_withPoints.hpp
+++ /dev/null
@@ -1,72 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: withPoints_driver.h
-
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer:
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-Mail:
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#ifndef SRC_WITHPOINTS_SRC_PGR_WITHPOINTS_HPP_
-#define SRC_WITHPOINTS_SRC_PGR_WITHPOINTS_HPP_
-#pragma once
-#include <vector>
-
-#include "c_types/point_on_edge_t.h"
-#include "cpp_common/basePath_SSEC.hpp"
-
-int
-check_points(
-        std::vector< Point_on_edge_t > &points,
-        std::ostringstream &log);
-
-void
-eliminate_details_dd(
-        Path &path);
-
-void
-eliminate_details(
-        Path &path,
-        const std::vector< pgr_edge_t > &point_edges);
-
-void
-adjust_pids(
-        const std::vector< Point_on_edge_t > &points,
-        Path &path);
-
-
-bool
-create_new_edges(
-        std::vector< Point_on_edge_t > &points,
-        const std::vector< pgr_edge_t > &edges,
-        char driving_side,
-        std::vector< pgr_edge_t > &new_edges);
-
-bool
-create_new_edges(
-        std::vector< Point_on_edge_t > &points,
-        const std::vector< pgr_edge_t > &edges,
-        char driving_side,
-        std::vector< pgr_edge_t > &new_edges,
-        std::ostringstream &log);
-
-#endif  // SRC_WITHPOINTS_SRC_PGR_WITHPOINTS_HPP_
diff --git a/src/withPoints/src/withPoints.c b/src/withPoints/src/withPoints.c
deleted file mode 100644
index edeba0e..0000000
--- a/src/withPoints/src/withPoints.c
+++ /dev/null
@@ -1,281 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: withPoints.c
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer:
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-Mail:
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "c_common/postgres_connection.h"
-#include "utils/array.h"
-
-#include "c_common/debug_macro.h"
-#include "c_common/e_report.h"
-#include "c_common/time_msg.h"
-
-#include "c_common/edges_input.h"
-#include "c_common/arrays_input.h"
-#include "c_common/points_input.h"
-#include "drivers/withPoints/get_new_queries.h"
-#include "drivers/withPoints/withPoints_driver.h"
-
-PGDLLEXPORT Datum withPoints(PG_FUNCTION_ARGS);
-PG_FUNCTION_INFO_V1(withPoints);
-
-
-static
-void
-process(
-        char* edges_sql,
-        char* points_sql,
-
-        ArrayType *starts,
-        ArrayType *ends,
-
-        bool directed,
-        char *driving_side,
-        bool details,
-        bool only_cost,
-        bool normal,
-
-        General_path_element_t **result_tuples,
-        size_t *result_count) {
-    driving_side[0] = estimate_drivingSide(driving_side[0]);
-
-    pgr_SPI_connect();
-
-    size_t size_start_pidsArr = 0;
-    int64_t* start_pidsArr = NULL;
-
-    size_t size_end_pidsArr = 0;
-    int64_t* end_pidsArr = NULL;
-
-    Point_on_edge_t *points = NULL;
-    size_t total_points = 0;
-    pgr_get_points(points_sql, &points, &total_points);
-
-
-    char *edges_of_points_query = NULL;
-    char *edges_no_points_query = NULL;
-    get_new_queries(
-            edges_sql, points_sql,
-            &edges_of_points_query,
-            &edges_no_points_query);
-
-
-    pgr_edge_t *edges_of_points = NULL;
-    size_t total_edges_of_points = 0;
-
-    pgr_edge_t *edges = NULL;
-    size_t total_edges = 0;
-
-    PGR_DBG("normal = %d", normal);
-    if (normal) {
-        pgr_get_edges(
-                edges_of_points_query, &edges_of_points, &total_edges_of_points);
-        pgr_get_edges(edges_no_points_query, &edges, &total_edges);
-
-        start_pidsArr = (int64_t*)
-            pgr_get_bigIntArray(&size_start_pidsArr, starts);
-        end_pidsArr = (int64_t*)
-            pgr_get_bigIntArray(&size_end_pidsArr, ends);
-    } else {
-
-        pgr_get_edges_reversed(
-                edges_of_points_query, &edges_of_points, &total_edges_of_points);
-        pgr_get_edges_reversed(edges_no_points_query, &edges, &total_edges);
-
-        end_pidsArr = (int64_t*)
-            pgr_get_bigIntArray(&size_end_pidsArr, starts);
-        start_pidsArr = (int64_t*)
-            pgr_get_bigIntArray(&size_start_pidsArr, ends);
-    }
-
-
-    free(edges_of_points_query);
-    free(edges_no_points_query);
-
-    if ((total_edges + total_edges_of_points) == 0) {
-        pgr_SPI_finish();
-        return;
-    }
-
-    clock_t start_t = clock();
-    char* log_msg = NULL;
-    char* notice_msg = NULL;
-    char* err_msg = NULL;
-
-    do_pgr_withPoints(
-            edges, total_edges,
-            points, total_points,
-            edges_of_points, total_edges_of_points,
-            start_pidsArr, size_start_pidsArr,
-            end_pidsArr, size_end_pidsArr,
-
-            driving_side[0],
-            details,
-            directed,
-            only_cost,
-            normal,
-
-            result_tuples, result_count,
-            &log_msg,
-            &notice_msg,
-            &err_msg);
-
-    if (only_cost) {
-        time_msg("processing pgr_withPointsCost(one to one)", start_t, clock());
-    } else {
-        time_msg("processing pgr_withPoints(one to one)", start_t, clock());
-    }
-
-    if (err_msg && (*result_tuples)) {
-        pfree(*result_tuples);
-        (*result_count) = 0;
-        (*result_tuples) = NULL;
-    }
-
-    pgr_global_report(log_msg, notice_msg, err_msg);
-
-#if 0
-    if (log_msg) pfree(log_msg);
-    if (notice_msg) pfree(notice_msg);
-    if (err_msg) pfree(err_msg);
-    if (edges) pfree(edges);
-    if (points) pfree(points);
-    if (edges_of_points) pfree(edges_of_points);
-    if (start_pidsArr) pfree(start_pidsArr);
-    if (end_pidsArr) pfree(end_pidsArr);
-#endif
-    pgr_SPI_finish();
-}
-
-
-PGDLLEXPORT Datum
-withPoints(PG_FUNCTION_ARGS) {
-    FuncCallContext     *funcctx;
-    TupleDesc            tuple_desc;
-
-    /**********************************************************************/
-    General_path_element_t *result_tuples = 0;
-    size_t result_count = 0;
-    /**********************************************************************/
-
-    if (SRF_IS_FIRSTCALL()) {
-        MemoryContext   oldcontext;
-        funcctx = SRF_FIRSTCALL_INIT();
-        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
-
-
-        /**********************************************************************/
-        // CREATE OR REPLACE FUNCTION pgr_withPoint(
-        // edges_sql TEXT,
-        // points_sql TEXT,
-        // start_pid ANYARRAY,
-        // end_pids ANYARRAY,
-        // driving_side CHAR -- DEFAULT 'b',
-        // details BOOLEAN -- DEFAULT false,
-        // directed BOOLEAN -- DEFAULT true,
-        // only_cost BOOLEAN DEFAULT false,
-        // normal BOOLEAN DEFAULT true,
-
-
-        process(
-                text_to_cstring(PG_GETARG_TEXT_P(0)),
-                text_to_cstring(PG_GETARG_TEXT_P(1)),
-                PG_GETARG_ARRAYTYPE_P(2),
-                PG_GETARG_ARRAYTYPE_P(3),
-                PG_GETARG_BOOL(4),
-                text_to_cstring(PG_GETARG_TEXT_P(5)),
-                PG_GETARG_BOOL(6),
-                PG_GETARG_BOOL(7),
-                PG_GETARG_BOOL(8),
-                &result_tuples,
-                &result_count);
-
-        /**********************************************************************/
-
-#if PGSQL_VERSION > 95
-        funcctx->max_calls = result_count;
-#else
-        funcctx->max_calls = (uint32_t)result_count;
-#endif
-        funcctx->user_fctx = result_tuples;
-        if (get_call_result_type(fcinfo, NULL, &tuple_desc)
-                != TYPEFUNC_COMPOSITE)
-            ereport(ERROR,
-                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                     errmsg("function returning record called in context "
-                         "that cannot accept type record")));
-
-        funcctx->tuple_desc = tuple_desc;
-        MemoryContextSwitchTo(oldcontext);
-    }
-
-    funcctx = SRF_PERCALL_SETUP();
-    tuple_desc = funcctx->tuple_desc;
-    result_tuples = (General_path_element_t*) funcctx->user_fctx;
-
-    if (funcctx->call_cntr < funcctx->max_calls) {
-        HeapTuple    tuple;
-        Datum        result;
-        Datum        *values;
-        bool*        nulls;
-
-        /**********************************************************************/
-        // OUT seq BIGINT,
-        // OUT path_seq,
-        // OUT node BIGINT,
-        // OUT edge BIGINT,
-        // OUT cost FLOAT,
-        // OUT agg_cost FLOAT)
-
-
-        values = palloc(8 * sizeof(Datum));
-        nulls = palloc(8 * sizeof(bool));
-
-        size_t i;
-        for (i = 0; i < 8; ++i) {
-            nulls[i] = false;
-        }
-
-
-        values[0] = Int32GetDatum(funcctx->call_cntr + 1);
-        values[1] = Int32GetDatum(result_tuples[funcctx->call_cntr].seq);
-        values[2] = Int64GetDatum(result_tuples[funcctx->call_cntr].start_id);
-        values[3] = Int64GetDatum(result_tuples[funcctx->call_cntr].end_id);
-        values[4] = Int64GetDatum(result_tuples[funcctx->call_cntr].node);
-        values[5] = Int64GetDatum(result_tuples[funcctx->call_cntr].edge);
-        values[6] = Float8GetDatum(result_tuples[funcctx->call_cntr].cost);
-        values[7] = Float8GetDatum(result_tuples[funcctx->call_cntr].agg_cost);
-        /**********************************************************************/
-
-        tuple = heap_form_tuple(tuple_desc, values, nulls);
-        result = HeapTupleGetDatum(tuple);
-        SRF_RETURN_NEXT(funcctx, result);
-    } else {
-        SRF_RETURN_DONE(funcctx);
-    }
-}
-
diff --git a/src/withPoints/src/withPoints_driver.cpp b/src/withPoints/src/withPoints_driver.cpp
deleted file mode 100644
index dd77cc7..0000000
--- a/src/withPoints/src/withPoints_driver.cpp
+++ /dev/null
@@ -1,251 +0,0 @@
-/*PGR-GNU*****************************************************************
-File: one_to_many_withPoints_driver.cpp
-
-Generated with Template by:
-Copyright (c) 2015 pgRouting developers
-Mail: project at pgrouting.org
-
-Function's developer:
-Copyright (c) 2015 Celia Virginia Vergara Castillo
-Mail:
-
-------
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-********************************************************************PGR-GNU*/
-
-#include "drivers/withPoints/withPoints_driver.h"
-
-#include <algorithm>
-#include <sstream>
-#include <deque>
-#include <vector>
-#include <cassert>
-
-
-#include "dijkstra/pgr_dijkstra.hpp"
-#include "./pgr_withPoints.hpp"
-
-#include "cpp_common/pgr_alloc.hpp"
-#include "cpp_common/pgr_assert.h"
-
-template < class G >
-std::deque< Path >
-pgr_dijkstra(
-        G &graph,
-        std::vector < int64_t > sources,
-        std::vector < int64_t > targets,
-        bool only_cost,
-        bool normal) {
-    std::sort(sources.begin(), sources.end());
-    sources.erase(
-            std::unique(sources.begin(), sources.end()),
-            sources.end());
-
-    std::sort(targets.begin(), targets.end());
-    targets.erase(
-            std::unique(targets.begin(), targets.end()),
-            targets.end());
-
-    Pgr_dijkstra< G > fn_dijkstra;
-    auto paths = fn_dijkstra.dijkstra(graph, sources, targets, only_cost);
-
-    if (!normal) {
-        for (auto &path : paths) {
-            path.reverse();
-        }
-    }
-    return paths;
-}
-
-
-// CREATE OR REPLACE FUNCTION pgr_withPoint(
-// edges_sql TEXT,
-// points_sql TEXT,
-// start_pid ANYARRAY,
-// end_pid BIGINT,
-// directed BOOLEAN DEFAULT true
-
-void
-do_pgr_withPoints(
-        pgr_edge_t *edges, size_t total_edges,
-        Point_on_edge_t *points_p, size_t total_points,
-        pgr_edge_t *edges_of_points, size_t total_edges_of_points,
-        int64_t *start_pidsArr, size_t size_start_pidsArr,
-        int64_t *end_pidsArr, size_t size_end_pidsArr,
-
-        char driving_side,
-        bool details,
-        bool directed,
-        bool only_cost,
-        bool normal,
-
-        General_path_element_t **return_tuples, size_t *return_count,
-
-        char** log_msg,
-        char** notice_msg,
-        char** err_msg) {
-    std::ostringstream log;
-    std::ostringstream notice;
-    std::ostringstream err;
-    try {
-        pgassert(!(*log_msg));
-        pgassert(!(*notice_msg));
-        pgassert(!(*err_msg));
-        pgassert(!(*return_tuples));
-        pgassert((*return_count) == 0);
-        pgassert(edges || edges_of_points);
-        pgassert(points_p);
-        pgassert(start_pidsArr);
-        pgassert(end_pidsArr);
-
-        std::vector< Point_on_edge_t >
-            points(points_p, points_p + total_points);
-
-        if (!normal) {
-            for (auto &point : points) {
-                if (point.side == 'r') {
-                    point.side = 'l';
-                } else if (point.side == 'l') {
-                    point.side = 'r';
-                }
-                point.fraction = 1 - point.fraction;
-            }
-            if (driving_side == 'r') {
-                driving_side = 'l';
-            } else if (driving_side == 'l') {
-                driving_side = 'r';
-            }
-        }
-
-        int errcode = check_points(points, log);
-        if (errcode) {
-            *log_msg = strdup(log.str().c_str());
-            err << "Unexpected point(s) with same pid"
-                << " but different edge/fraction/side combination found.";
-            *err_msg = pgr_msg(err.str().c_str());
-            return;
-        }
-
-
-        std::vector< pgr_edge_t >
-            edges_to_modify(
-                    edges_of_points, edges_of_points + total_edges_of_points);
-
-        std::vector< pgr_edge_t > new_edges;
-        create_new_edges(
-                points,
-                edges_to_modify,
-                driving_side,
-                new_edges, log);
-
-
-        std::vector<int64_t>
-            start_vertices(start_pidsArr, start_pidsArr + size_start_pidsArr);
-        std::vector< int64_t >
-            end_vertices(end_pidsArr, end_pidsArr + size_end_pidsArr);
-
-        auto vertices(pgrouting::extract_vertices(edges, total_edges));
-        vertices = pgrouting::extract_vertices(vertices, new_edges);
-
-        graphType gType = directed? DIRECTED: UNDIRECTED;
-
-        std::deque< Path > paths;
-
-        if (directed) {
-            log << "Working with directed Graph\n";
-            pgrouting::DirectedGraph digraph(vertices, gType);
-            digraph.insert_edges(edges, total_edges);
-            digraph.insert_edges(new_edges);
-
-            paths = pgr_dijkstra(
-                    digraph,
-                    start_vertices, end_vertices,
-                    only_cost, normal);
-        } else {
-            log << "Working with Undirected Graph\n";
-            pgrouting::UndirectedGraph undigraph(vertices, gType);
-            undigraph.insert_edges(edges, total_edges);
-            undigraph.insert_edges(new_edges);
-            paths = pgr_dijkstra(
-                    undigraph,
-                    start_vertices, end_vertices,
-                    only_cost, normal);
-        }
-
-        if (!details) {
-            for (auto &path : paths) {
-                eliminate_details(path, edges_to_modify);
-            }
-        }
-
-        /*
-         * order paths based on the start_pid, end_pid
-         */
-        std::sort(paths.begin(), paths.end(),
-                [](const Path &a, const Path &b)
-                -> bool {
-                if (b.start_id() != a.start_id()) {
-                return a.start_id() < b.start_id();
-                }
-                return a.end_id() < b.end_id();
-                });
-
-        size_t count(0);
-        count = count_tuples(paths);
-
-
-        if (count == 0) {
-            (*return_tuples) = NULL;
-            (*return_count) = 0;
-#if 0
-            log <<
-                "No paths found";
-            *err_msg = pgr_msg(log.str().c_str());
-#endif
-            return;
-        }
-
-        (*return_tuples) = pgr_alloc(count, (*return_tuples));
-        log << "Converting a set of paths into the tuples\n";
-        (*return_count) = (collapse_paths(return_tuples, paths));
-
-        *log_msg = log.str().empty()?
-            *log_msg :
-            pgr_msg(log.str().c_str());
-        *notice_msg = notice.str().empty()?
-            *notice_msg :
-            pgr_msg(notice.str().c_str());
-    } catch (AssertFailedException &except) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << except.what();
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    } catch (std::exception &except) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << except.what();
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    } catch(...) {
-        (*return_tuples) = pgr_free(*return_tuples);
-        (*return_count) = 0;
-        err << "Caught unknown exception!";
-        *err_msg = pgr_msg(err.str().c_str());
-        *log_msg = pgr_msg(log.str().c_str());
-    }
-}
diff --git a/src/withPoints/test/doc-pgr_withPoints.result b/src/withPoints/test/doc-pgr_withPoints.result
deleted file mode 100644
index 9ae373b..0000000
--- a/src/withPoints/test/doc-pgr_withPoints.result
+++ /dev/null
@@ -1,208 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
---e1
-SELECT * FROM pgr_withPoints(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -1, -3);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |   -1 |    1 |  0.6 |        0
-   2 |        2 |    2 |    4 |    1 |      0.6
-   3 |        3 |    5 |   10 |    1 |      1.6
-   4 |        4 |   10 |   12 |  0.6 |      2.6
-   5 |        5 |   -3 |   -1 |    0 |      3.2
-(5 rows)
-
---e2
-SELECT * FROM pgr_withPoints(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -1, 3,
-    details := true);
- seq | path_seq | node | edge | cost | agg_cost 
------+----------+------+------+------+----------
-   1 |        1 |   -1 |    1 |  0.6 |        0
-   2 |        2 |    2 |    4 |  0.7 |      0.6
-   3 |        3 |   -6 |    4 |  0.3 |      1.3
-   4 |        4 |    5 |    8 |    1 |      1.6
-   5 |        5 |    6 |    9 |    1 |      2.6
-   6 |        6 |    9 |   16 |    1 |      3.6
-   7 |        7 |    4 |    3 |    1 |      4.6
-   8 |        8 |    3 |   -1 |    0 |      5.6
-(8 rows)
-
---e3
-SELECT * FROM pgr_withPoints(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -1, ARRAY[-3,5]);
- seq | path_seq | end_pid | node | edge | cost | agg_cost 
------+----------+---------+------+------+------+----------
-   1 |        1 |      -3 |   -1 |    1 |  0.6 |        0
-   2 |        2 |      -3 |    2 |    4 |    1 |      0.6
-   3 |        3 |      -3 |    5 |   10 |    1 |      1.6
-   4 |        4 |      -3 |   10 |   12 |  0.6 |      2.6
-   5 |        5 |      -3 |   -3 |   -1 |    0 |      3.2
-   6 |        1 |       5 |   -1 |    1 |  0.6 |        0
-   7 |        2 |       5 |    2 |    4 |    1 |      0.6
-   8 |        3 |       5 |    5 |   -1 |    0 |      1.6
-(8 rows)
-
---e4
-SELECT * FROM pgr_withPoints(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    ARRAY[-1,2], -3);
- seq | path_seq | start_pid | node | edge | cost | agg_cost 
------+----------+-----------+------+------+------+----------
-   1 |        1 |        -1 |   -1 |    1 |  0.6 |        0
-   2 |        2 |        -1 |    2 |    4 |    1 |      0.6
-   3 |        3 |        -1 |    5 |   10 |    1 |      1.6
-   4 |        4 |        -1 |   10 |   12 |  0.6 |      2.6
-   5 |        5 |        -1 |   -3 |   -1 |    0 |      3.2
-   6 |        1 |         2 |    2 |    4 |    1 |        0
-   7 |        2 |         2 |    5 |   10 |    1 |        1
-   8 |        3 |         2 |   10 |   12 |  0.6 |        2
-   9 |        4 |         2 |   -3 |   -1 |    0 |      2.6
-(9 rows)
-
---e5
-SELECT * FROM pgr_withPoints(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    ARRAY[-1,2], ARRAY[-3,7]);
- seq | path_seq | start_pid | end_pid | node | edge | cost | agg_cost 
------+----------+-----------+---------+------+------+------+----------
-   1 |        1 |        -1 |      -3 |   -1 |    1 |  0.6 |        0
-   2 |        2 |        -1 |      -3 |    2 |    4 |    1 |      0.6
-   3 |        3 |        -1 |      -3 |    5 |   10 |    1 |      1.6
-   4 |        4 |        -1 |      -3 |   10 |   12 |  0.6 |      2.6
-   5 |        5 |        -1 |      -3 |   -3 |   -1 |    0 |      3.2
-   6 |        1 |        -1 |       7 |   -1 |    1 |  0.6 |        0
-   7 |        2 |        -1 |       7 |    2 |    4 |    1 |      0.6
-   8 |        3 |        -1 |       7 |    5 |    7 |    1 |      1.6
-   9 |        4 |        -1 |       7 |    8 |    6 |    1 |      2.6
-  10 |        5 |        -1 |       7 |    7 |   -1 |    0 |      3.6
-  11 |        1 |         2 |      -3 |    2 |    4 |    1 |        0
-  12 |        2 |         2 |      -3 |    5 |   10 |    1 |        1
-  13 |        3 |         2 |      -3 |   10 |   12 |  0.6 |        2
-  14 |        4 |         2 |      -3 |   -3 |   -1 |    0 |      2.6
-  15 |        1 |         2 |       7 |    2 |    4 |    1 |        0
-  16 |        2 |         2 |       7 |    5 |    7 |    1 |        1
-  17 |        3 |         2 |       7 |    8 |    6 |    1 |        2
-  18 |        4 |         2 |       7 |    7 |   -1 |    0 |        3
-(18 rows)
-
---q2
-SELECT ('(' || start_pid || ' => ' || end_pid ||') at ' || path_seq || 'th step:')::TEXT AS path_at,
-        CASE WHEN edge = -1 THEN ' visits'
-            ELSE ' passes in front of'
-        END as status,
-        CASE WHEN node < 0 THEN 'Point'
-            ELSE 'Vertex'
-        END as is_a,
-        abs(node) as id
-    FROM pgr_withPoints(
-        'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-        'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-        ARRAY[1,-1], ARRAY[-2,-3,-6,3,6],
-        driving_side := 'r',
-        details := true)
-    WHERE node IN (-6,6);
-         path_at         |       status        |  is_a  | id 
--------------------------+---------------------+--------+----
- (-1 => -6) at 4th step: |  visits             | Point  |  6
- (-1 => -3) at 4th step: |  passes in front of | Point  |  6
- (-1 => -2) at 4th step: |  passes in front of | Point  |  6
- (-1 => -2) at 6th step: |  passes in front of | Vertex |  6
- (-1 => 3) at 4th step:  |  passes in front of | Point  |  6
- (-1 => 3) at 6th step:  |  passes in front of | Vertex |  6
- (-1 => 6) at 4th step:  |  passes in front of | Point  |  6
- (-1 => 6) at 6th step:  |  visits             | Vertex |  6
- (1 => -6) at 3th step:  |  visits             | Point  |  6
- (1 => -3) at 3th step:  |  passes in front of | Point  |  6
- (1 => -2) at 3th step:  |  passes in front of | Point  |  6
- (1 => -2) at 5th step:  |  passes in front of | Vertex |  6
- (1 => 3) at 3th step:   |  passes in front of | Point  |  6
- (1 => 3) at 5th step:   |  passes in front of | Vertex |  6
- (1 => 6) at 3th step:   |  passes in front of | Point  |  6
- (1 => 6) at 5th step:   |  visits             | Vertex |  6
-(16 rows)
-
---q3
-SELECT ('(' || start_pid || ' => ' || end_pid ||') at ' || path_seq || 'th step:')::TEXT AS path_at,
-        CASE WHEN edge = -1 THEN ' visits'
-            ELSE ' passes in front of'
-        END as status,
-        CASE WHEN node < 0 THEN 'Point'
-            ELSE 'Vertex'
-        END as is_a,
-        abs(node) as id
-    FROM pgr_withPoints(
-        'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-        'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-        ARRAY[1,-1], ARRAY[-2,-3,-6,3,6],
-        driving_side := 'l',
-        details := true)
-    WHERE node IN (-6,6);
-         path_at         |       status        |  is_a  | id 
--------------------------+---------------------+--------+----
- (-1 => -6) at 3th step: |  visits             | Point  |  6
- (-1 => -3) at 3th step: |  passes in front of | Point  |  6
- (-1 => -2) at 3th step: |  passes in front of | Point  |  6
- (-1 => -2) at 5th step: |  passes in front of | Vertex |  6
- (-1 => 3) at 3th step:  |  passes in front of | Point  |  6
- (-1 => 3) at 5th step:  |  passes in front of | Vertex |  6
- (-1 => 6) at 3th step:  |  passes in front of | Point  |  6
- (-1 => 6) at 5th step:  |  visits             | Vertex |  6
- (1 => -6) at 4th step:  |  visits             | Point  |  6
- (1 => -3) at 4th step:  |  passes in front of | Point  |  6
- (1 => -2) at 4th step:  |  passes in front of | Point  |  6
- (1 => -2) at 6th step:  |  passes in front of | Vertex |  6
- (1 => 3) at 4th step:   |  passes in front of | Point  |  6
- (1 => 3) at 6th step:   |  passes in front of | Vertex |  6
- (1 => 6) at 4th step:   |  passes in front of | Point  |  6
- (1 => 6) at 6th step:   |  visits             | Vertex |  6
-(16 rows)
-
---q4
-SELECT * FROM pgr_withPoints(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    ARRAY[-1,2], ARRAY[-3,7],
-    directed := false,
-    details := true);
- seq | path_seq | start_pid | end_pid | node | edge | cost | agg_cost 
------+----------+-----------+---------+------+------+------+----------
-   1 |        1 |        -1 |      -3 |   -1 |    1 |  0.6 |        0
-   2 |        2 |        -1 |      -3 |    2 |    4 |  0.7 |      0.6
-   3 |        3 |        -1 |      -3 |   -6 |    4 |  0.3 |      1.3
-   4 |        4 |        -1 |      -3 |    5 |   10 |    1 |      1.6
-   5 |        5 |        -1 |      -3 |   10 |   12 |  0.6 |      2.6
-   6 |        6 |        -1 |      -3 |   -3 |   -1 |    0 |      3.2
-   7 |        1 |        -1 |       7 |   -1 |    1 |  0.6 |        0
-   8 |        2 |        -1 |       7 |    2 |    4 |  0.7 |      0.6
-   9 |        3 |        -1 |       7 |   -6 |    4 |  0.3 |      1.3
-  10 |        4 |        -1 |       7 |    5 |    7 |    1 |      1.6
-  11 |        5 |        -1 |       7 |    8 |    6 |  0.7 |      2.6
-  12 |        6 |        -1 |       7 |   -4 |    6 |  0.3 |      3.3
-  13 |        7 |        -1 |       7 |    7 |   -1 |    0 |      3.6
-  14 |        1 |         2 |      -3 |    2 |    4 |  0.7 |        0
-  15 |        2 |         2 |      -3 |   -6 |    4 |  0.3 |      0.7
-  16 |        3 |         2 |      -3 |    5 |   10 |    1 |        1
-  17 |        4 |         2 |      -3 |   10 |   12 |  0.6 |        2
-  18 |        5 |         2 |      -3 |   -3 |   -1 |    0 |      2.6
-  19 |        1 |         2 |       7 |    2 |    4 |  0.7 |        0
-  20 |        2 |         2 |       7 |   -6 |    4 |  0.3 |      0.7
-  21 |        3 |         2 |       7 |    5 |    7 |    1 |        1
-  22 |        4 |         2 |       7 |    8 |    6 |  0.7 |        2
-  23 |        5 |         2 |       7 |   -4 |    6 |  0.3 |      2.7
-  24 |        6 |         2 |       7 |    7 |   -1 |    0 |        3
-(24 rows)
-
---q5
-ROLLBACK;
-ROLLBACK
diff --git a/src/withPoints/test/doc-pgr_withPointsCost.result b/src/withPoints/test/doc-pgr_withPointsCost.result
deleted file mode 100644
index 7930644..0000000
--- a/src/withPoints/test/doc-pgr_withPointsCost.result
+++ /dev/null
@@ -1,105 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
---e1
-SELECT * FROM pgr_withPointsCost(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -1, -3);
- start_pid | end_pid | agg_cost 
------------+---------+----------
-        -1 |      -3 |      3.2
-(1 row)
-
---e2
-SELECT * FROM pgr_withPointsCost(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -1, 3,
-    directed := false);
- start_pid | end_pid | agg_cost 
------------+---------+----------
-        -1 |       3 |      1.6
-(1 row)
-
---e3
-SELECT * FROM pgr_withPointsCost(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -1, ARRAY[-3,5]);
- start_pid | end_pid | agg_cost 
------------+---------+----------
-        -1 |      -3 |      3.2
-        -1 |       5 |      1.6
-(2 rows)
-
---e4
-SELECT * FROM pgr_withPointsCost(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    ARRAY[-1,2], -3);
- start_pid | end_pid | agg_cost 
------------+---------+----------
-        -1 |      -3 |      3.2
-         2 |      -3 |      2.6
-(2 rows)
-
---e5
-SELECT * FROM pgr_withPointsCost(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    ARRAY[-1,2], ARRAY[-3,7]);
- start_pid | end_pid | agg_cost 
------------+---------+----------
-        -1 |      -3 |      3.2
-        -1 |       7 |      3.6
-         2 |      -3 |      2.6
-         2 |       7 |        3
-(4 rows)
-
---q2
-SELECT * FROM pgr_withPointsCost(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    ARRAY[-1,2], ARRAY[-3,7],
-    driving_side := 'l');
- start_pid | end_pid | agg_cost 
------------+---------+----------
-        -1 |      -3 |      3.2
-        -1 |       7 |      3.6
-         2 |      -3 |      2.6
-         2 |       7 |        3
-(4 rows)
-
---q3
-SELECT * FROM pgr_withPointsCost(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    ARRAY[-1,2], ARRAY[-3,7],
-    driving_side := 'r');
- start_pid | end_pid | agg_cost 
------------+---------+----------
-        -1 |      -3 |        4
-        -1 |       7 |      4.4
-         2 |      -3 |      2.6
-         2 |       7 |        3
-(4 rows)
-
---q4
-SELECT * FROM pgr_withPointsCost(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    ARRAY[-1,2], ARRAY[-3,7],
-    driving_side := 'b');
- start_pid | end_pid | agg_cost 
------------+---------+----------
-        -1 |      -3 |      3.2
-        -1 |       7 |      3.6
-         2 |      -3 |      2.6
-         2 |       7 |        3
-(4 rows)
-
---q5
-ROLLBACK;
-ROLLBACK
diff --git a/src/withPoints/test/doc-pgr_withPointsDD.result b/src/withPoints/test/doc-pgr_withPointsDD.result
deleted file mode 100644
index 6435a0f..0000000
--- a/src/withPoints/test/doc-pgr_withPointsDD.result
+++ /dev/null
@@ -1,96 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
---q1
-SELECT * FROM pgr_withPointsDD(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -1, 3.8);
- seq | node | edge | cost | agg_cost 
------+------+------+------+----------
-   1 |   -1 |   -1 |    0 |        0
-   2 |    1 |    1 |  0.4 |      0.4
-   3 |    2 |    1 |  0.6 |      0.6
-   4 |    5 |    4 |  0.3 |      1.6
-   5 |    6 |    8 |    1 |      2.6
-   6 |    8 |    7 |    1 |      2.6
-   7 |   10 |   10 |    1 |      2.6
-   8 |    7 |    6 |  0.3 |      3.6
-   9 |    9 |    9 |    1 |      3.6
-  10 |   11 |   11 |    1 |      3.6
-  11 |   13 |   14 |    1 |      3.6
-(11 rows)
-
---q2
-SELECT * FROM pgr_withPointsDD(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -1, 3.8,
-    driving_side := 'r',
-    details := true);
- seq | node | edge | cost | agg_cost 
------+------+------+------+----------
-   1 |   -1 |   -1 |    0 |        0
-   2 |    1 |    1 |  0.4 |      0.4
-   3 |    2 |    1 |    1 |      1.4
-   4 |   -6 |    4 |  0.7 |      2.1
-   5 |    5 |    4 |  0.3 |      2.4
-   6 |    6 |    8 |    1 |      3.4
-   7 |    8 |    7 |    1 |      3.4
-   8 |   10 |   10 |    1 |      3.4
-(8 rows)
-
---q3
-SELECT * FROM pgr_withPointsDD(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -1, 3.8,
-    driving_side := 'l',
-    details := true);
- seq | node | edge | cost | agg_cost 
------+------+------+------+----------
-   1 |   -1 |   -1 |    0 |        0
-   2 |    2 |    1 |  0.6 |      0.6
-   3 |   -6 |    4 |  0.7 |      1.3
-   4 |    5 |    4 |  0.3 |      1.6
-   5 |    1 |    1 |    1 |      1.6
-   6 |    6 |    8 |    1 |      2.6
-   7 |    8 |    7 |    1 |      2.6
-   8 |   10 |   10 |    1 |      2.6
-   9 |   -3 |   12 |  0.6 |      3.2
-  10 |   -4 |    6 |  0.7 |      3.3
-  11 |    7 |    6 |  0.3 |      3.6
-  12 |    9 |    9 |    1 |      3.6
-  13 |   11 |   11 |    1 |      3.6
-  14 |   13 |   14 |    1 |      3.6
-(14 rows)
-
---q4
-SELECT * FROM pgr_withPointsDD(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -1, 3.8,
-    driving_side := 'b',
-    details := true);
- seq | node | edge | cost | agg_cost 
------+------+------+------+----------
-   1 |   -1 |   -1 |    0 |        0
-   2 |    1 |    1 |  0.4 |      0.4
-   3 |    2 |    1 |  0.6 |      0.6
-   4 |   -6 |    4 |  0.7 |      1.3
-   5 |    5 |    4 |  0.3 |      1.6
-   6 |    6 |    8 |    1 |      2.6
-   7 |    8 |    7 |    1 |      2.6
-   8 |   10 |   10 |    1 |      2.6
-   9 |   -3 |   12 |  0.6 |      3.2
-  10 |   -4 |    6 |  0.7 |      3.3
-  11 |    7 |    6 |  0.3 |      3.6
-  12 |    9 |    9 |    1 |      3.6
-  13 |   11 |   11 |    1 |      3.6
-  14 |   13 |   14 |    1 |      3.6
-(14 rows)
-
---q5
-ROLLBACK;
-ROLLBACK
diff --git a/src/withPoints/test/doc-pgr_withPointsKSP.result b/src/withPoints/test/doc-pgr_withPointsKSP.result
deleted file mode 100644
index 965c8dc..0000000
--- a/src/withPoints/test/doc-pgr_withPointsKSP.result
+++ /dev/null
@@ -1,119 +0,0 @@
-BEGIN;
-BEGIN
-SET client_min_messages TO NOTICE;
-SET
---q1
-SELECT * FROM pgr_withPointsKSP(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -1, -2, 2);
- seq | path_id | path_seq | node | edge | cost | agg_cost 
------+---------+----------+------+------+------+----------
-   1 |       1 |        1 |   -1 |    1 |  0.6 |        0
-   2 |       1 |        2 |    2 |    4 |    1 |      0.6
-   3 |       1 |        3 |    5 |    8 |    1 |      1.6
-   4 |       1 |        4 |    6 |    9 |    1 |      2.6
-   5 |       1 |        5 |    9 |   15 |  0.4 |      3.6
-   6 |       1 |        6 |   -2 |   -1 |    0 |        4
-   7 |       2 |        1 |   -1 |    1 |  0.6 |        0
-   8 |       2 |        2 |    2 |    4 |    1 |      0.6
-   9 |       2 |        3 |    5 |    8 |    1 |      1.6
-  10 |       2 |        4 |    6 |   11 |    1 |      2.6
-  11 |       2 |        5 |   11 |   13 |    1 |      3.6
-  12 |       2 |        6 |   12 |   15 |  0.6 |      4.6
-  13 |       2 |        7 |   -2 |   -1 |    0 |      5.2
-(13 rows)
-
---q2
-SELECT * FROM pgr_withPointsKSP(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -1, 6, 2, details := true);
- seq | path_id | path_seq | node | edge | cost | agg_cost 
------+---------+----------+------+------+------+----------
-   1 |       1 |        1 |   -1 |    1 |  0.6 |        0
-   2 |       1 |        2 |    2 |    4 |  0.7 |      0.6
-   3 |       1 |        3 |   -6 |    4 |  0.3 |      1.3
-   4 |       1 |        4 |    5 |    8 |    1 |      1.6
-   5 |       1 |        5 |    6 |   -1 |    0 |      2.6
-   6 |       2 |        1 |   -1 |    1 |  0.6 |        0
-   7 |       2 |        2 |    2 |    4 |  0.7 |      0.6
-   8 |       2 |        3 |   -6 |    4 |  0.3 |      1.3
-   9 |       2 |        4 |    5 |   10 |    1 |      1.6
-  10 |       2 |        5 |   10 |   12 |  0.6 |      2.6
-  11 |       2 |        6 |   -3 |   12 |  0.4 |      3.2
-  12 |       2 |        7 |   11 |   13 |    1 |      3.6
-  13 |       2 |        8 |   12 |   15 |  0.6 |      4.6
-  14 |       2 |        9 |   -2 |   15 |  0.4 |      5.2
-  15 |       2 |       10 |    9 |    9 |    1 |      5.6
-  16 |       2 |       11 |    6 |   -1 |    0 |      6.6
-(16 rows)
-
---q3
-SELECT * FROM pgr_withPointsKSP(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -1, -2, 2,
-    driving_side := 'l', details := true);
- seq | path_id | path_seq | node | edge | cost | agg_cost 
------+---------+----------+------+------+------+----------
-   1 |       1 |        1 |   -1 |    1 |  0.6 |        0
-   2 |       1 |        2 |    2 |    4 |  0.7 |      0.6
-   3 |       1 |        3 |   -6 |    4 |  0.3 |      1.3
-   4 |       1 |        4 |    5 |    8 |    1 |      1.6
-   5 |       1 |        5 |    6 |    9 |    1 |      2.6
-   6 |       1 |        6 |    9 |   15 |    1 |      3.6
-   7 |       1 |        7 |   12 |   15 |  0.6 |      4.6
-   8 |       1 |        8 |   -2 |   -1 |    0 |      5.2
-   9 |       2 |        1 |   -1 |    1 |  0.6 |        0
-  10 |       2 |        2 |    2 |    4 |  0.7 |      0.6
-  11 |       2 |        3 |   -6 |    4 |  0.3 |      1.3
-  12 |       2 |        4 |    5 |    8 |    1 |      1.6
-  13 |       2 |        5 |    6 |   11 |    1 |      2.6
-  14 |       2 |        6 |   11 |   13 |    1 |      3.6
-  15 |       2 |        7 |   12 |   15 |  0.6 |      4.6
-  16 |       2 |        8 |   -2 |   -1 |    0 |      5.2
-(16 rows)
-
---q4
-SELECT * FROM pgr_withPointsKSP(
-    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
-    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-    -1, -2, 2,
-    heap_paths := true, driving_side := 'r', details := true);
- seq | path_id | path_seq | node | edge | cost | agg_cost 
------+---------+----------+------+------+------+----------
-   1 |       1 |        1 |   -1 |    1 |  0.4 |        0
-   2 |       1 |        2 |    1 |    1 |    1 |      0.4
-   3 |       1 |        3 |    2 |    4 |  0.7 |      1.4
-   4 |       1 |        4 |   -6 |    4 |  0.3 |      2.1
-   5 |       1 |        5 |    5 |    8 |    1 |      2.4
-   6 |       1 |        6 |    6 |    9 |    1 |      3.4
-   7 |       1 |        7 |    9 |   15 |  0.4 |      4.4
-   8 |       1 |        8 |   -2 |   -1 |    0 |      4.8
-   9 |       2 |        1 |   -1 |    1 |  0.4 |        0
-  10 |       2 |        2 |    1 |    1 |    1 |      0.4
-  11 |       2 |        3 |    2 |    4 |  0.7 |      1.4
-  12 |       2 |        4 |   -6 |    4 |  0.3 |      2.1
-  13 |       2 |        5 |    5 |    8 |    1 |      2.4
-  14 |       2 |        6 |    6 |   11 |    1 |      3.4
-  15 |       2 |        7 |   11 |   13 |    1 |      4.4
-  16 |       2 |        8 |   12 |   15 |    1 |      5.4
-  17 |       2 |        9 |    9 |   15 |  0.4 |      6.4
-  18 |       2 |       10 |   -2 |   -1 |    0 |      6.8
-  19 |       3 |        1 |   -1 |    1 |  0.4 |        0
-  20 |       3 |        2 |    1 |    1 |    1 |      0.4
-  21 |       3 |        3 |    2 |    4 |  0.7 |      1.4
-  22 |       3 |        4 |   -6 |    4 |  0.3 |      2.1
-  23 |       3 |        5 |    5 |   10 |    1 |      2.4
-  24 |       3 |        6 |   10 |   12 |  0.6 |      3.4
-  25 |       3 |        7 |   -3 |   12 |  0.4 |        4
-  26 |       3 |        8 |   11 |   13 |    1 |      4.4
-  27 |       3 |        9 |   12 |   15 |    1 |      5.4
-  28 |       3 |       10 |    9 |   15 |  0.4 |      6.4
-  29 |       3 |       11 |   -2 |   -1 |    0 |      6.8
-(29 rows)
-
---q5
-ROLLBACK;
-ROLLBACK
diff --git a/src/withPoints/withPoints.c b/src/withPoints/withPoints.c
new file mode 100644
index 0000000..345ead5
--- /dev/null
+++ b/src/withPoints/withPoints.c
@@ -0,0 +1,290 @@
+/*PGR-GNU*****************************************************************
+File: withPoints.c
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer:
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+Mail:
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "c_common/postgres_connection.h"
+#include "utils/array.h"
+
+#include "c_common/debug_macro.h"
+#include "c_common/e_report.h"
+#include "c_common/time_msg.h"
+
+#include "c_common/edges_input.h"
+#include "c_common/arrays_input.h"
+#include "c_common/points_input.h"
+#include "drivers/withPoints/get_new_queries.h"
+#include "drivers/withPoints/withPoints_driver.h"
+
+PGDLLEXPORT Datum withPoints(PG_FUNCTION_ARGS);
+PG_FUNCTION_INFO_V1(withPoints);
+
+
+static
+void
+process(
+        char* edges_sql,
+        char* points_sql,
+
+        ArrayType *starts,
+        ArrayType *ends,
+
+        bool directed,
+        char *driving_side,
+        bool details,
+        bool only_cost,
+        bool normal,
+
+        General_path_element_t **result_tuples,
+        size_t *result_count) {
+    driving_side[0] = estimate_drivingSide(driving_side[0]);
+
+    pgr_SPI_connect();
+
+    size_t size_start_pidsArr = 0;
+    int64_t* start_pidsArr = NULL;
+
+    size_t size_end_pidsArr = 0;
+    int64_t* end_pidsArr = NULL;
+
+    Point_on_edge_t *points = NULL;
+    size_t total_points = 0;
+    pgr_get_points(points_sql, &points, &total_points);
+
+#ifndef NDEBUG
+    size_t i;
+    for (i = 0; i< total_points; i++) {
+        PGR_DBG("%ld ", points[i].pid);
+    }
+#endif
+    char *edges_of_points_query = NULL;
+    char *edges_no_points_query = NULL;
+    get_new_queries(
+            edges_sql, points_sql,
+            &edges_of_points_query,
+            &edges_no_points_query);
+
+
+    pgr_edge_t *edges_of_points = NULL;
+    size_t total_edges_of_points = 0;
+
+    pgr_edge_t *edges = NULL;
+    size_t total_edges = 0;
+
+    if (normal) {
+        pgr_get_edges(
+                edges_of_points_query,
+                &edges_of_points,
+                &total_edges_of_points);
+        pgr_get_edges(edges_no_points_query, &edges, &total_edges);
+
+        start_pidsArr = (int64_t*)
+            pgr_get_bigIntArray(&size_start_pidsArr, starts);
+        end_pidsArr = (int64_t*)
+            pgr_get_bigIntArray(&size_end_pidsArr, ends);
+    } else {
+        pgr_get_edges_reversed(
+                edges_of_points_query,
+                &edges_of_points,
+                &total_edges_of_points);
+        pgr_get_edges_reversed(edges_no_points_query, &edges, &total_edges);
+
+        end_pidsArr = (int64_t*)
+            pgr_get_bigIntArray(&size_end_pidsArr, starts);
+        start_pidsArr = (int64_t*)
+            pgr_get_bigIntArray(&size_start_pidsArr, ends);
+    }
+
+
+    pfree(edges_of_points_query);
+    pfree(edges_no_points_query);
+    edges_of_points_query = NULL;
+    edges_no_points_query = NULL;
+
+    if ((total_edges + total_edges_of_points) == 0) {
+        pgr_SPI_finish();
+        return;
+    }
+
+    clock_t start_t = clock();
+    char* log_msg = NULL;
+    char* notice_msg = NULL;
+    char* err_msg = NULL;
+
+    do_pgr_withPoints(
+            edges, total_edges,
+            points, total_points,
+            edges_of_points, total_edges_of_points,
+            start_pidsArr, size_start_pidsArr,
+            end_pidsArr, size_end_pidsArr,
+
+            driving_side[0],
+            details,
+            directed,
+            only_cost,
+            normal,
+
+            result_tuples, result_count,
+            &log_msg,
+            &notice_msg,
+            &err_msg);
+
+    if (only_cost) {
+        time_msg("processing pgr_withPointsCost(one to one)", start_t, clock());
+    } else {
+        time_msg("processing pgr_withPoints(one to one)", start_t, clock());
+    }
+
+    if (err_msg && (*result_tuples)) {
+        pfree(*result_tuples);
+        (*result_count) = 0;
+        (*result_tuples) = NULL;
+    }
+
+    pgr_global_report(log_msg, notice_msg, err_msg);
+
+#if 0
+    if (log_msg) pfree(log_msg);
+    if (notice_msg) pfree(notice_msg);
+    if (err_msg) pfree(err_msg);
+    if (edges) pfree(edges);
+    if (points) pfree(points);
+    if (edges_of_points) pfree(edges_of_points);
+    if (start_pidsArr) pfree(start_pidsArr);
+    if (end_pidsArr) pfree(end_pidsArr);
+#endif
+    pgr_SPI_finish();
+}
+
+
+PGDLLEXPORT Datum
+withPoints(PG_FUNCTION_ARGS) {
+    FuncCallContext     *funcctx;
+    TupleDesc            tuple_desc;
+
+    /**********************************************************************/
+    General_path_element_t *result_tuples = 0;
+    size_t result_count = 0;
+    /**********************************************************************/
+
+    if (SRF_IS_FIRSTCALL()) {
+        MemoryContext   oldcontext;
+        funcctx = SRF_FIRSTCALL_INIT();
+        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
+
+
+        /**********************************************************************/
+        // CREATE OR REPLACE FUNCTION pgr_withPoint(
+        // edges_sql TEXT,
+        // points_sql TEXT,
+        // start_pid ANYARRAY,
+        // end_pids ANYARRAY,
+        // driving_side CHAR -- DEFAULT 'b',
+        // details BOOLEAN -- DEFAULT false,
+        // directed BOOLEAN -- DEFAULT true,
+        // only_cost BOOLEAN DEFAULT false,
+        // normal BOOLEAN DEFAULT true,
+
+
+        process(
+                text_to_cstring(PG_GETARG_TEXT_P(0)),
+                text_to_cstring(PG_GETARG_TEXT_P(1)),
+                PG_GETARG_ARRAYTYPE_P(2),
+                PG_GETARG_ARRAYTYPE_P(3),
+                PG_GETARG_BOOL(4),
+                text_to_cstring(PG_GETARG_TEXT_P(5)),
+                PG_GETARG_BOOL(6),
+                PG_GETARG_BOOL(7),
+                PG_GETARG_BOOL(8),
+                &result_tuples,
+                &result_count);
+
+        /**********************************************************************/
+
+#if PGSQL_VERSION > 95
+        funcctx->max_calls = result_count;
+#else
+        funcctx->max_calls = (uint32_t)result_count;
+#endif
+        funcctx->user_fctx = result_tuples;
+        if (get_call_result_type(fcinfo, NULL, &tuple_desc)
+                != TYPEFUNC_COMPOSITE)
+            ereport(ERROR,
+                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+                     errmsg("function returning record called in context "
+                         "that cannot accept type record")));
+
+        funcctx->tuple_desc = tuple_desc;
+        MemoryContextSwitchTo(oldcontext);
+    }
+
+    funcctx = SRF_PERCALL_SETUP();
+    tuple_desc = funcctx->tuple_desc;
+    result_tuples = (General_path_element_t*) funcctx->user_fctx;
+
+    if (funcctx->call_cntr < funcctx->max_calls) {
+        HeapTuple    tuple;
+        Datum        result;
+        Datum        *values;
+        bool*        nulls;
+
+        /**********************************************************************/
+        // OUT seq BIGINT,
+        // OUT path_seq,
+        // OUT node BIGINT,
+        // OUT edge BIGINT,
+        // OUT cost FLOAT,
+        // OUT agg_cost FLOAT)
+
+
+        values = palloc(8 * sizeof(Datum));
+        nulls = palloc(8 * sizeof(bool));
+
+        size_t i;
+        for (i = 0; i < 8; ++i) {
+            nulls[i] = false;
+        }
+
+
+        values[0] = Int32GetDatum(funcctx->call_cntr + 1);
+        values[1] = Int32GetDatum(result_tuples[funcctx->call_cntr].seq);
+        values[2] = Int64GetDatum(result_tuples[funcctx->call_cntr].start_id);
+        values[3] = Int64GetDatum(result_tuples[funcctx->call_cntr].end_id);
+        values[4] = Int64GetDatum(result_tuples[funcctx->call_cntr].node);
+        values[5] = Int64GetDatum(result_tuples[funcctx->call_cntr].edge);
+        values[6] = Float8GetDatum(result_tuples[funcctx->call_cntr].cost);
+        values[7] = Float8GetDatum(result_tuples[funcctx->call_cntr].agg_cost);
+        /**********************************************************************/
+
+        tuple = heap_form_tuple(tuple_desc, values, nulls);
+        result = HeapTupleGetDatum(tuple);
+        SRF_RETURN_NEXT(funcctx, result);
+    } else {
+        SRF_RETURN_DONE(funcctx);
+    }
+}
+
diff --git a/src/withPoints/withPoints_driver.cpp b/src/withPoints/withPoints_driver.cpp
new file mode 100644
index 0000000..7dde764
--- /dev/null
+++ b/src/withPoints/withPoints_driver.cpp
@@ -0,0 +1,229 @@
+/*PGR-GNU*****************************************************************
+File: one_to_many_withPoints_driver.cpp
+
+Generated with Template by:
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+Function's developer:
+Copyright (c) 2015 Celia Virginia Vergara Castillo
+Mail:
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+#include "drivers/withPoints/withPoints_driver.h"
+
+#include <algorithm>
+#include <sstream>
+#include <deque>
+#include <vector>
+#include <cassert>
+
+
+#include "dijkstra/pgr_dijkstra.hpp"
+#include "withPoints/pgr_withPoints.hpp"
+
+#include "cpp_common/pgr_alloc.hpp"
+#include "cpp_common/pgr_assert.h"
+
+template < class G >
+std::deque< Path >
+pgr_dijkstra(
+        G &graph,
+        std::vector < int64_t > sources,
+        std::vector < int64_t > targets,
+        bool only_cost,
+        bool normal) {
+    std::sort(sources.begin(), sources.end());
+    sources.erase(
+            std::unique(sources.begin(), sources.end()),
+            sources.end());
+
+    std::sort(targets.begin(), targets.end());
+    targets.erase(
+            std::unique(targets.begin(), targets.end()),
+            targets.end());
+
+    Pgr_dijkstra< G > fn_dijkstra;
+    auto paths = fn_dijkstra.dijkstra(graph, sources, targets, only_cost);
+
+    if (!normal) {
+        for (auto &path : paths) {
+            path.reverse();
+        }
+    }
+    return paths;
+}
+
+
+// CREATE OR REPLACE FUNCTION pgr_withPoint(
+// edges_sql TEXT,
+// points_sql TEXT,
+// start_pid ANYARRAY,
+// end_pid BIGINT,
+// directed BOOLEAN DEFAULT true
+
+void
+do_pgr_withPoints(
+        pgr_edge_t *edges, size_t total_edges,
+        Point_on_edge_t *points_p, size_t total_points,
+        pgr_edge_t *edges_of_points, size_t total_edges_of_points,
+        int64_t *start_pidsArr, size_t size_start_pidsArr,
+        int64_t *end_pidsArr, size_t size_end_pidsArr,
+
+        char driving_side,
+        bool details,
+        bool directed,
+        bool only_cost,
+        bool normal,
+
+        General_path_element_t **return_tuples, size_t *return_count,
+
+        char** log_msg,
+        char** notice_msg,
+        char** err_msg) {
+    std::ostringstream log;
+    std::ostringstream notice;
+    std::ostringstream err;
+    try {
+        pgassert(!(*log_msg));
+        pgassert(!(*notice_msg));
+        pgassert(!(*err_msg));
+        pgassert(!(*return_tuples));
+        pgassert((*return_count) == 0);
+        pgassert(edges || edges_of_points);
+        pgassert(points_p);
+        pgassert(start_pidsArr);
+        pgassert(end_pidsArr);
+
+        pgrouting::Pg_points_graph pg_graph(
+                std::vector<Point_on_edge_t>(
+                    points_p,
+                    points_p + total_points),
+                std::vector< pgr_edge_t >(
+                    edges_of_points,
+                    edges_of_points + total_edges_of_points),
+                normal,
+                driving_side,
+                directed);
+
+        if (pg_graph.has_error()) {
+            log << pg_graph.get_log();
+            err << pg_graph.get_error();
+            *log_msg = pgr_msg(log.str().c_str());
+            *err_msg = pgr_msg(err.str().c_str());
+            return;
+        }
+
+
+        std::vector<int64_t>
+            start_vertices(start_pidsArr, start_pidsArr + size_start_pidsArr);
+        std::vector< int64_t >
+            end_vertices(end_pidsArr, end_pidsArr + size_end_pidsArr);
+
+        auto vertices(pgrouting::extract_vertices(edges, total_edges));
+        vertices = pgrouting::extract_vertices(vertices, pg_graph.new_edges());
+
+        graphType gType = directed? DIRECTED: UNDIRECTED;
+
+        std::deque< Path > paths;
+
+        if (directed) {
+            log << "Working with directed Graph\n";
+            pgrouting::DirectedGraph digraph(vertices, gType);
+            digraph.insert_edges(edges, total_edges);
+            digraph.insert_edges(pg_graph.new_edges());
+
+            paths = pgr_dijkstra(
+                    digraph,
+                    start_vertices, end_vertices,
+                    only_cost, normal);
+        } else {
+            log << "Working with Undirected Graph\n";
+            pgrouting::UndirectedGraph undigraph(vertices, gType);
+            undigraph.insert_edges(edges, total_edges);
+            undigraph.insert_edges(pg_graph.new_edges());
+            paths = pgr_dijkstra(
+                    undigraph,
+                    start_vertices, end_vertices,
+                    only_cost, normal);
+        }
+
+        if (!details) {
+            for (auto &path : paths) {
+                path = pg_graph.eliminate_details(path);
+            }
+        }
+
+        /*
+         * order paths based on the start_pid, end_pid
+         */
+        std::sort(paths.begin(), paths.end(),
+                [](const Path &a, const Path &b)
+                -> bool {
+                if (b.start_id() != a.start_id()) {
+                return a.start_id() < b.start_id();
+                }
+                return a.end_id() < b.end_id();
+                });
+
+        size_t count(0);
+        count = count_tuples(paths);
+
+
+        if (count == 0) {
+            (*return_tuples) = NULL;
+            (*return_count) = 0;
+            return;
+        }
+
+        (*return_tuples) = pgr_alloc(count, (*return_tuples));
+        log << "Converting a set of paths into the tuples\n";
+        (*return_count) = (collapse_paths(return_tuples, paths));
+
+        log << "************************************************";
+        log << pg_graph.get_log();
+        log << "************************************************";
+
+        *log_msg = log.str().empty()?
+            *log_msg :
+            pgr_msg(log.str().c_str());
+        *notice_msg = notice.str().empty()?
+            *notice_msg :
+            pgr_msg(notice.str().c_str());
+    } catch (AssertFailedException &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch (std::exception &except) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << except.what();
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    } catch(...) {
+        (*return_tuples) = pgr_free(*return_tuples);
+        (*return_count) = 0;
+        err << "Caught unknown exception!";
+        *err_msg = pgr_msg(err.str().c_str());
+        *log_msg = pgr_msg(log.str().c_str());
+    }
+}
diff --git a/test/allpairs/doc-floydWarshall.result b/test/allpairs/doc-floydWarshall.result
new file mode 100644
index 0000000..19dba63
--- /dev/null
+++ b/test/allpairs/doc-floydWarshall.result
@@ -0,0 +1,33 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- q1
+SELECT * FROM pgr_floydWarshall(
+    'SELECT id, source, target, cost FROM edge_table where id < 5'
+);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         1 |       2 |        1
+         1 |       5 |        2
+         2 |       5 |        1
+(3 rows)
+
+-- q2
+SELECT * FROM pgr_floydWarshall(
+    'SELECT id, source, target, cost FROM edge_table where id < 5',
+    false
+);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         1 |       2 |        1
+         1 |       5 |        2
+         2 |       1 |        1
+         2 |       5 |        1
+         5 |       1 |        2
+         5 |       2 |        1
+(6 rows)
+
+-- q3
+ROLLBACK;
+ROLLBACK
diff --git a/src/allpairs/test/doc-floydWarshall.test.sql b/test/allpairs/doc-floydWarshall.test.sql
similarity index 100%
rename from src/allpairs/test/doc-floydWarshall.test.sql
rename to test/allpairs/doc-floydWarshall.test.sql
diff --git a/test/allpairs/doc-johnson.result b/test/allpairs/doc-johnson.result
new file mode 100644
index 0000000..6bcbafc
--- /dev/null
+++ b/test/allpairs/doc-johnson.result
@@ -0,0 +1,35 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- q1
+SELECT * FROM pgr_johnson(
+    'SELECT source, target, cost FROM edge_table WHERE id < 5
+         ORDER BY id'
+);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         1 |       2 |        1
+         1 |       5 |        2
+         2 |       5 |        1
+(3 rows)
+
+-- q2
+SELECT * FROM pgr_johnson(
+    'SELECT source, target, cost FROM edge_table WHERE id < 5
+         ORDER BY id',
+    false
+);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         1 |       2 |        1
+         1 |       5 |        2
+         2 |       1 |        1
+         2 |       5 |        1
+         5 |       1 |        2
+         5 |       2 |        1
+(6 rows)
+
+-- q3
+ROLLBACK;
+ROLLBACK
diff --git a/src/allpairs/test/doc-johnson.test.sql b/test/allpairs/doc-johnson.test.sql
similarity index 100%
rename from src/allpairs/test/doc-johnson.test.sql
rename to test/allpairs/doc-johnson.test.sql
diff --git a/test/allpairs/test.conf b/test/allpairs/test.conf
new file mode 100644
index 0000000..9c7a414
--- /dev/null
+++ b/test/allpairs/test.conf
@@ -0,0 +1,25 @@
+#!/usr/bin/perl -w
+
+%main::tests = (
+    'any' => {
+        'comment' => 'All pairs tests.',
+        'data' => [''],
+        'tests' => [qw(
+            doc-johnson
+            doc-floydWarshall
+            )],
+
+        'documentation' => [qw(
+            doc-johnson
+            doc-floydWarshall
+            )]
+    },
+# I don't know what this are for or how to use them.
+#  TODO ask Steve
+#    'vpg-vpgis' => {}, # for version specific tests
+#    '8-1' => {},       # for pg 8.x and postgis 1.x
+#    '9.2-2.1' => {},   # for pg 9.2 and postgis 2.1
+
+);
+
+1;
diff --git a/test/alpha_shape/doc-pgr_alphashape.result b/test/alpha_shape/doc-pgr_alphashape.result
new file mode 100644
index 0000000..61484a1
--- /dev/null
+++ b/test/alpha_shape/doc-pgr_alphashape.result
@@ -0,0 +1,39 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- q1
+SELECT * FROM pgr_alphaShape(
+    'SELECT id::integer, ST_X(the_geom)::float AS x, ST_Y(the_geom)::float AS y
+    FROM edge_table_vertices_pgr') ORDER BY x, y;
+  x  |  y
+-----+-----
+   0 |   2
+ 0.5 | 3.5
+   2 |   0
+   2 |   4
+ 3.5 |   4
+   4 |   1
+   4 |   2
+   4 |   3
+(8 rows)
+
+-- q2
+SELECT round(ST_Area(ST_MakePolygon(ST_AddPoint(foo.openline, ST_StartPoint(foo.openline))))::numeric, 2) AS st_area
+FROM (
+    SELECT ST_MakeLine(points ORDER BY id) AS openline
+    FROM (
+        SELECT ST_MakePoint(x, y) AS points, row_number() over() AS id
+        FROM pgr_alphaShape(
+            'SELECT id::integer, ST_X(the_geom)::float AS x, ST_Y(the_geom)::float AS y
+            FROM edge_table_vertices_pgr')
+        ) AS a
+   ) AS foo;
+ st_area
+---------
+   11.75
+(1 row)
+
+-- q3
+ROLLBACK;
+ROLLBACK
diff --git a/src/alpha_shape/test/doc-pgr_alphashape.test.sql b/test/alpha_shape/doc-pgr_alphashape.test.sql
similarity index 100%
rename from src/alpha_shape/test/doc-pgr_alphashape.test.sql
rename to test/alpha_shape/doc-pgr_alphashape.test.sql
diff --git a/test/alpha_shape/doc-pgr_pointsAsPolygon.result b/test/alpha_shape/doc-pgr_pointsAsPolygon.result
new file mode 100644
index 0000000..35a5974
--- /dev/null
+++ b/test/alpha_shape/doc-pgr_pointsAsPolygon.result
@@ -0,0 +1,15 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+--q1
+SELECT ST_AsText(pgr_pointsAsPolygon('SELECT id::integer, ST_X(the_geom)::float AS x, ST_Y(the_geom)::float AS y
+        FROM edge_table_vertices_pgr'));
+                      st_astext
+------------------------------------------------------
+ POLYGON((2 4,3.5 4,4 3,4 2,4 1,2 0,0 2,0.5 3.5,2 4))
+(1 row)
+
+--q2
+ROLLBACK;
+ROLLBACK
diff --git a/src/alpha_shape/test/doc-pgr_pointsAsPolygon.test.sql b/test/alpha_shape/doc-pgr_pointsAsPolygon.test.sql
similarity index 100%
rename from src/alpha_shape/test/doc-pgr_pointsAsPolygon.test.sql
rename to test/alpha_shape/doc-pgr_pointsAsPolygon.test.sql
diff --git a/src/alpha_shape/test/test.conf b/test/alpha_shape/test.conf
similarity index 100%
rename from src/alpha_shape/test/test.conf
rename to test/alpha_shape/test.conf
diff --git a/test/astar/doc-aStarCost.result b/test/astar/doc-aStarCost.result
new file mode 100644
index 0000000..bc1a339
--- /dev/null
+++ b/test/astar/doc-aStarCost.result
@@ -0,0 +1,58 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+--q1
+SELECT * FROM pgr_aStarCost(
+    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
+    2, 12);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         2 |      12 |        4
+(1 row)
+
+--q2
+SELECT * FROM pgr_aStarCost(
+    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
+    2, 12,
+    directed := false, heuristic := 2);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         2 |      12 |        4
+(1 row)
+
+--q3
+SELECT * FROM pgr_aStarCost(
+    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
+    2, ARRAY[3, 12], heuristic := 2);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         2 |       3 |        5
+         2 |      12 |        4
+(2 rows)
+
+--q4
+SELECT * FROM pgr_aStarCost(
+    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
+    ARRAY[7, 2], 12, heuristic := 0);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         2 |      12 |        4
+         7 |      12 |        5
+(2 rows)
+
+--q5
+SELECT * FROM pgr_aStarCost(
+    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
+    ARRAY[7, 2], ARRAY[3, 12], heuristic := 2);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         2 |       3 |        5
+         2 |      12 |        4
+         7 |       3 |        6
+         7 |      12 |        5
+(4 rows)
+
+--q6
+ROLLBACK;
+ROLLBACK
diff --git a/src/astar/test/doc-aStarCost.test.sql b/test/astar/doc-aStarCost.test.sql
similarity index 100%
rename from src/astar/test/doc-aStarCost.test.sql
rename to test/astar/doc-aStarCost.test.sql
diff --git a/test/astar/doc-astar.result b/test/astar/doc-astar.result
new file mode 100644
index 0000000..fb733e3
--- /dev/null
+++ b/test/astar/doc-astar.result
@@ -0,0 +1,104 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+--q1
+SELECT * FROM pgr_astar(
+    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
+    2, 12);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    2 |    4 |    1 |        0
+   2 |        2 |    5 |   10 |    1 |        1
+   3 |        3 |   10 |   12 |    1 |        2
+   4 |        4 |   11 |   13 |    1 |        3
+   5 |        5 |   12 |   -1 |    0 |        4
+(5 rows)
+
+--q2
+SELECT * FROM pgr_astar(
+    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
+    2, 12,
+    directed := false, heuristic := 2);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    2 |    2 |    1 |        0
+   2 |        2 |    3 |    3 |    1 |        1
+   3 |        3 |    4 |   16 |    1 |        2
+   4 |        4 |    9 |   15 |    1 |        3
+   5 |        5 |   12 |   -1 |    0 |        4
+(5 rows)
+
+--q3
+SELECT * FROM pgr_astar(
+    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
+    2, ARRAY[3, 12], heuristic := 2);
+ seq | path_seq | end_vid | node | edge | cost | agg_cost
+-----+----------+---------+------+------+------+----------
+   1 |        1 |       3 |    2 |    4 |    1 |        0
+   2 |        2 |       3 |    5 |    8 |    1 |        1
+   3 |        3 |       3 |    6 |    9 |    1 |        2
+   4 |        4 |       3 |    9 |   16 |    1 |        3
+   5 |        5 |       3 |    4 |    3 |    1 |        4
+   6 |        6 |       3 |    3 |   -1 |    0 |        5
+   7 |        1 |      12 |    2 |    4 |    1 |        0
+   8 |        2 |      12 |    5 |   10 |    1 |        1
+   9 |        3 |      12 |   10 |   12 |    1 |        2
+  10 |        4 |      12 |   11 |   13 |    1 |        3
+  11 |        5 |      12 |   12 |   -1 |    0 |        4
+(11 rows)
+
+--q4
+SELECT * FROM pgr_astar(
+    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
+    ARRAY[7, 2], 12, heuristic := 0);
+ seq | path_seq | start_vid | node | edge | cost | agg_cost
+-----+----------+-----------+------+------+------+----------
+   1 |        1 |         2 |    2 |    4 |    1 |        0
+   2 |        2 |         2 |    5 |   10 |    1 |        1
+   3 |        3 |         2 |   10 |   12 |    1 |        2
+   4 |        4 |         2 |   11 |   13 |    1 |        3
+   5 |        5 |         2 |   12 |   -1 |    0 |        4
+   6 |        1 |         7 |    7 |    6 |    1 |        0
+   7 |        2 |         7 |    8 |    7 |    1 |        1
+   8 |        3 |         7 |    5 |   10 |    1 |        2
+   9 |        4 |         7 |   10 |   12 |    1 |        3
+  10 |        5 |         7 |   11 |   13 |    1 |        4
+  11 |        6 |         7 |   12 |   -1 |    0 |        5
+(11 rows)
+
+--q5
+SELECT * FROM pgr_astar(
+    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
+    ARRAY[7, 2], ARRAY[3, 12], heuristic := 2);
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
+-----+----------+-----------+---------+------+------+------+----------
+   1 |        1 |         2 |       3 |    2 |    4 |    1 |        0
+   2 |        2 |         2 |       3 |    5 |    8 |    1 |        1
+   3 |        3 |         2 |       3 |    6 |    9 |    1 |        2
+   4 |        4 |         2 |       3 |    9 |   16 |    1 |        3
+   5 |        5 |         2 |       3 |    4 |    3 |    1 |        4
+   6 |        6 |         2 |       3 |    3 |   -1 |    0 |        5
+   7 |        1 |         7 |       3 |    7 |    6 |    1 |        0
+   8 |        2 |         7 |       3 |    8 |    7 |    1 |        1
+   9 |        3 |         7 |       3 |    5 |    8 |    1 |        2
+  10 |        4 |         7 |       3 |    6 |    9 |    1 |        3
+  11 |        5 |         7 |       3 |    9 |   16 |    1 |        4
+  12 |        6 |         7 |       3 |    4 |    3 |    1 |        5
+  13 |        7 |         7 |       3 |    3 |   -1 |    0 |        6
+  14 |        1 |         2 |      12 |    2 |    4 |    1 |        0
+  15 |        2 |         2 |      12 |    5 |   10 |    1 |        1
+  16 |        3 |         2 |      12 |   10 |   12 |    1 |        2
+  17 |        4 |         2 |      12 |   11 |   13 |    1 |        3
+  18 |        5 |         2 |      12 |   12 |   -1 |    0 |        4
+  19 |        1 |         7 |      12 |    7 |    6 |    1 |        0
+  20 |        2 |         7 |      12 |    8 |    7 |    1 |        1
+  21 |        3 |         7 |      12 |    5 |   10 |    1 |        2
+  22 |        4 |         7 |      12 |   10 |   12 |    1 |        3
+  23 |        5 |         7 |      12 |   11 |   13 |    1 |        4
+  24 |        6 |         7 |      12 |   12 |   -1 |    0 |        5
+(24 rows)
+
+--q6
+ROLLBACK;
+ROLLBACK
diff --git a/src/astar/test/doc-astar.test.sql b/test/astar/doc-astar.test.sql
similarity index 100%
rename from src/astar/test/doc-astar.test.sql
rename to test/astar/doc-astar.test.sql
diff --git a/src/astar/test/test.conf b/test/astar/test.conf
similarity index 100%
rename from src/astar/test/test.conf
rename to test/astar/test.conf
diff --git a/test/bdAstar/doc-pgr_bdAstar.result b/test/bdAstar/doc-pgr_bdAstar.result
new file mode 100644
index 0000000..c547f6d
--- /dev/null
+++ b/test/bdAstar/doc-pgr_bdAstar.result
@@ -0,0 +1,112 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- q1
+SELECT * FROM pgr_bdAstar(
+    'SELECT id, source, target, cost, reverse_cost, x1,y1,x2,y2
+    FROM edge_table',
+    2, 3
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    2 |    4 |    1 |        0
+   2 |        2 |    5 |    8 |    1 |        1
+   3 |        3 |    6 |    9 |    1 |        2
+   4 |        4 |    9 |   16 |    1 |        3
+   5 |        5 |    4 |    3 |    1 |        4
+   6 |        6 |    3 |   -1 |    0 |        5
+(6 rows)
+
+-- q2
+SELECT * FROM pgr_bdAstar(
+    'SELECT id, source, target, cost, reverse_cost, x1,y1,x2,y2
+    FROM edge_table',
+    2, 3,
+    true, heuristic := 2
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    2 |    4 |    1 |        0
+   2 |        2 |    5 |    8 |    1 |        1
+   3 |        3 |    6 |    9 |    1 |        2
+   4 |        4 |    9 |   16 |    1 |        3
+   5 |        5 |    4 |    3 |    1 |        4
+   6 |        6 |    3 |   -1 |    0 |        5
+(6 rows)
+
+-- q3
+SELECT * FROM pgr_bdAstar(
+    'SELECT id, source, target, cost, reverse_cost, x1,y1,x2,y2
+    FROM edge_table',
+    2, ARRAY[3, 11],
+    heuristic := 3, factor := 3.5
+);
+ seq | path_seq | end_vid | node | edge | cost | agg_cost
+-----+----------+---------+------+------+------+----------
+   1 |        1 |       3 |    2 |    4 |    1 |        0
+   2 |        2 |       3 |    5 |    8 |    1 |        1
+   3 |        3 |       3 |    6 |    9 |    1 |        2
+   4 |        4 |       3 |    9 |   16 |    1 |        3
+   5 |        5 |       3 |    4 |    3 |    1 |        4
+   6 |        6 |       3 |    3 |   -1 |    0 |        5
+   7 |        1 |      11 |    2 |    4 |    1 |        0
+   8 |        2 |      11 |    5 |    8 |    1 |        1
+   9 |        3 |      11 |    6 |   11 |    1 |        2
+  10 |        4 |      11 |   11 |   -1 |    0 |        3
+(10 rows)
+
+-- q4
+SELECT * FROM pgr_bdAstar(
+    'SELECT id, source, target, cost, reverse_cost, x1,y1,x2,y2
+    FROM edge_table',
+    ARRAY[2, 7], 3,
+    false, heuristic := 4
+);
+ seq | path_seq | start_vid | node | edge | cost | agg_cost
+-----+----------+-----------+------+------+------+----------
+   1 |        1 |         2 |    2 |    2 |    1 |        0
+   2 |        2 |         2 |    3 |   -1 |    0 |        1
+   3 |        1 |         7 |    7 |    6 |    1 |        0
+   4 |        2 |         7 |    8 |    7 |    1 |        1
+   5 |        3 |         7 |    5 |    4 |    1 |        2
+   6 |        4 |         7 |    2 |    2 |    1 |        3
+   7 |        5 |         7 |    3 |   -1 |    0 |        4
+(7 rows)
+
+-- q5
+SELECT * FROM pgr_bdAstar(
+    'SELECT id, source, target, cost, reverse_cost, x1,y1,x2,y2
+    FROM edge_table',
+    ARRAY[2, 7], ARRAY[3, 11],
+    factor := 0.5
+);
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
+-----+----------+-----------+---------+------+------+------+----------
+   1 |        1 |         2 |       3 |    2 |    4 |    1 |        0
+   2 |        2 |         2 |       3 |    5 |    8 |    1 |        1
+   3 |        3 |         2 |       3 |    6 |    9 |    1 |        2
+   4 |        4 |         2 |       3 |    9 |   16 |    1 |        3
+   5 |        5 |         2 |       3 |    4 |    3 |    1 |        4
+   6 |        6 |         2 |       3 |    3 |   -1 |    0 |        5
+   7 |        1 |         2 |      11 |    2 |    4 |    1 |        0
+   8 |        2 |         2 |      11 |    5 |    8 |    1 |        1
+   9 |        3 |         2 |      11 |    6 |   11 |    1 |        2
+  10 |        4 |         2 |      11 |   11 |   -1 |    0 |        3
+  11 |        1 |         7 |       3 |    7 |    6 |    1 |        0
+  12 |        2 |         7 |       3 |    8 |    7 |    1 |        1
+  13 |        3 |         7 |       3 |    5 |    8 |    1 |        2
+  14 |        4 |         7 |       3 |    6 |    9 |    1 |        3
+  15 |        5 |         7 |       3 |    9 |   16 |    1 |        4
+  16 |        6 |         7 |       3 |    4 |    3 |    1 |        5
+  17 |        7 |         7 |       3 |    3 |   -1 |    0 |        6
+  18 |        1 |         7 |      11 |    7 |    6 |    1 |        0
+  19 |        2 |         7 |      11 |    8 |    7 |    1 |        1
+  20 |        3 |         7 |      11 |    5 |   10 |    1 |        2
+  21 |        4 |         7 |      11 |   10 |   12 |    1 |        3
+  22 |        5 |         7 |      11 |   11 |   -1 |    0 |        4
+(22 rows)
+
+-- q6
+ROLLBACK;
+ROLLBACK
diff --git a/src/bdAstar/test/doc-pgr_bdAstar.test.sql b/test/bdAstar/doc-pgr_bdAstar.test.sql
similarity index 100%
rename from src/bdAstar/test/doc-pgr_bdAstar.test.sql
rename to test/bdAstar/doc-pgr_bdAstar.test.sql
diff --git a/test/bdAstar/doc-pgr_bdAstarCost.result b/test/bdAstar/doc-pgr_bdAstarCost.result
new file mode 100644
index 0000000..eeaa0fc
--- /dev/null
+++ b/test/bdAstar/doc-pgr_bdAstarCost.result
@@ -0,0 +1,71 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- q1
+SELECT * FROM pgr_bdAstarCost(
+    'SELECT id, source, target, cost, reverse_cost, x1,y1,x2,y2
+    FROM edge_table',
+    2, 3
+);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         2 |       3 |        5
+(1 row)
+
+-- q2
+SELECT * FROM pgr_bdAstarCost(
+    'SELECT id, source, target, cost, reverse_cost, x1,y1,x2,y2
+    FROM edge_table',
+    2, 3,
+    true, heuristic := 2
+);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         2 |       3 |        5
+(1 row)
+
+-- q3
+SELECT * FROM pgr_bdAstarCost(
+    'SELECT id, source, target, cost, reverse_cost, x1,y1,x2,y2
+    FROM edge_table',
+    2, ARRAY[3, 11],
+    heuristic := 3, factor := 3.5
+);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         2 |       3 |        5
+         2 |      11 |        3
+(2 rows)
+
+-- q4
+SELECT * FROM pgr_bdAstarCost(
+    'SELECT id, source, target, cost, reverse_cost, x1,y1,x2,y2
+    FROM edge_table',
+    ARRAY[2, 7], 3,
+    false, heuristic := 4
+);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         2 |       3 |        1
+         7 |       3 |        4
+(2 rows)
+
+-- q5
+SELECT * FROM pgr_bdAstarCost(
+    'SELECT id, source, target, cost, reverse_cost, x1,y1,x2,y2
+    FROM edge_table',
+    ARRAY[2, 7], ARRAY[3, 11],
+    factor := 0.5
+);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         2 |       3 |        5
+         2 |      11 |        3
+         7 |       3 |        6
+         7 |      11 |        4
+(4 rows)
+
+-- q6
+ROLLBACK;
+ROLLBACK
diff --git a/src/bdAstar/test/doc-pgr_bdAstarCost.test.sql b/test/bdAstar/doc-pgr_bdAstarCost.test.sql
similarity index 100%
rename from src/bdAstar/test/doc-pgr_bdAstarCost.test.sql
rename to test/bdAstar/doc-pgr_bdAstarCost.test.sql
diff --git a/src/bdAstar/test/test.conf b/test/bdAstar/test.conf
similarity index 100%
rename from src/bdAstar/test/test.conf
rename to test/bdAstar/test.conf
diff --git a/test/bdDijkstra/bdDijkstra-large.result b/test/bdDijkstra/bdDijkstra-large.result
new file mode 100644
index 0000000..b516fef
--- /dev/null
+++ b/test/bdDijkstra/bdDijkstra-large.result
@@ -0,0 +1,396 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+--q1
+/*PGR-GNU*****************************************************************
+
+Copyright (c) 2016 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+SELECT seq, node, edge, round(cost::numeric, 6)  FROM
+  pgr_bdDijkstra('SELECT * FROM bdd_ways', 5700, 6733, true);
+ seq | node  | edge  |  round
+-----+-------+-------+----------
+   1 |  5700 | 20787 | 0.006774
+   2 | 10932 | 20756 | 0.040876
+   3 | 10931 | 20797 | 0.002564
+   4 |  7661 | 20796 | 0.002581
+   5 | 10943 | 20776 | 0.040800
+   6 | 10941 | 20772 | 0.005720
+   7 |  3415 | 20771 | 0.007463
+   8 | 10940 | 20841 | 0.187594
+   9 | 10952 | 20812 | 0.005045
+  10 |  7034 | 20811 | 0.004532
+  11 | 10951 | 20833 | 0.177477
+  12 | 10944 | 20779 | 0.008539
+  13 |  8910 | 20778 | 0.006447
+  14 | 10929 | 20835 | 0.071114
+  15 | 10948 | 20794 | 0.013276
+  16 |  8908 | 12990 | 0.013157
+  17 |  8325 | 13831 | 0.009169
+  18 |  3753 | 13830 | 0.196045
+  19 |  6774 | 13829 | 0.032840
+  20 |  8304 | 13828 | 0.117213
+  21 |  9205 | 13827 | 0.010639
+  22 |  8994 | 13165 | 0.012931
+  23 |  8977 | 13164 | 0.008029
+  24 |  8976 | 13163 | 0.069895
+  25 |  8993 | 13162 | 0.009638
+  26 |  8351 | 13161 | 0.099016
+  27 |  8992 | 13160 | 0.187353
+  28 |  8991 | 13159 | 0.018649
+  29 |  2962 | 13158 | 0.071931
+  30 |  1285 | 13157 | 0.118340
+  31 |  8989 | 13156 | 0.006317
+  32 |  8988 | 13155 | 0.079185
+  33 |    21 | 13154 | 0.057101
+  34 |  6436 | 13153 | 0.083288
+  35 |   637 | 13152 | 0.099744
+  36 |  8987 | 13151 | 0.057786
+  37 |   398 | 13150 | 0.120005
+  38 |  8496 | 13149 | 0.069498
+  39 |  8986 | 13148 | 0.014323
+  40 |  8985 | 13167 | 0.070884
+  41 |  8451 | 11869 | 0.006925
+  42 |   476 | 11868 | 0.196533
+  43 |   529 | 11867 | 0.005677
+  44 |  8450 | 11871 | 0.118857
+  45 |  8452 | 11878 | 0.083250
+  46 |  8455 | 11880 | 0.048821
+  47 |  8456 | 11883 | 0.064572
+  48 |  1807 | 11882 | 0.101185
+  49 |  8457 | 11894 | 0.046805
+  50 |  8465 | 15481 | 0.180992
+  51 |  8522 | 15480 | 0.016198
+  52 |  9621 | 15479 | 0.209882
+  53 |  2808 | 15478 | 0.019312
+  54 |  8311 | 15477 | 0.113487
+  55 |  8583 | 16981 | 0.045667
+  56 | 10046 | 16982 | 0.022635
+  57 |  8467 | 16983 | 0.022924
+  58 |  9624 | 15487 | 0.034042
+  59 |  8468 | 11899 | 0.018103
+  60 |  3170 | 19357 | 0.047698
+  61 |  9949 | 19358 | 0.059093
+  62 | 10479 | 19359 | 0.051651
+  63 |  9948 | 19360 | 0.051709
+  64 |  8509 | 19374 | 0.106794
+  65 |  9595 | 19375 | 0.102428
+  66 |  8634 | 19376 | 0.107643
+  67 | 10174 | 19377 | 0.096140
+  68 | 10482 | 19378 | 0.009782
+  69 |  9194 | 19379 | 0.102702
+  70 |  4397 | 19380 | 0.108243
+  71 |  3002 | 19381 | 0.098919
+  72 | 10484 | 19382 | 0.006171
+  73 |  5962 | 19383 | 0.005429
+  74 | 10485 | 19384 | 0.047276
+  75 | 10459 | 19385 | 0.052864
+  76 |  7579 | 19386 | 0.052378
+  77 | 10455 | 19387 | 0.052414
+  78 |  5805 | 19388 | 0.081956
+  79 | 10462 | 19389 | 0.016974
+  80 |  8768 | 12598 | 0.059630
+  81 |  8767 | 19290 | 0.117748
+  82 | 10470 | 19289 | 0.065769
+  83 | 10469 | 19288 | 0.066230
+  84 | 10468 | 19287 | 0.111281
+  85 |  9967 | 16642 | 0.029056
+  86 |  9956 | 16621 | 0.014614
+  87 |  9938 | 16626 | 0.007036
+  88 |  9960 | 16649 | 0.081206
+  89 |  9968 | 16650 | 0.012230
+  90 |  9969 | 16647 | 0.012368
+  91 |  5457 |  6266 | 0.055134
+  92 |  5458 |  6267 | 0.053860
+  93 |  5459 |  6268 | 0.109859
+  94 |  5460 |  6269 | 0.104952
+  95 |  5461 |  6270 | 0.053766
+  96 |  5462 |  6271 | 0.046800
+  97 |  5463 | 12897 | 0.170300
+  98 |  8880 | 15060 | 0.049014
+  99 |  7101 | 15059 | 0.047811
+ 100 |  9313 | 15058 | 0.044674
+ 101 |  6733 |    -1 | 0.000000
+(101 rows)
+
+--q2
+SELECT seq, node, edge, round(cost::numeric, 6)  FROM
+  pgr_bdDijkstra('SELECT * FROM bdd_ways', 6585, 8247, true);
+ seq | node  | edge  |  round
+-----+-------+-------+----------
+   1 |  6585 | 17975 | 0.200230
+   2 |  5367 | 17976 | 0.155428
+   3 |  7125 | 17977 | 0.178581
+   4 |   613 | 17978 | 0.175712
+   5 | 10025 | 17979 | 0.173776
+   6 |  5802 |  6758 | 0.013489
+   7 |  5803 |  6759 | 0.065176
+   8 |  5804 |  6760 | 0.008679
+   9 |  5805 |  6761 | 0.145097
+  10 |  5806 |  6762 | 0.146807
+  11 |  5807 |  6763 | 0.097186
+  12 |  5808 |  6764 | 0.050569
+  13 |  5809 | 20663 | 0.169650
+  14 |  4620 | 20662 | 0.023243
+  15 |  5774 | 20661 | 0.120390
+  16 |  6482 | 20660 | 0.002769
+  17 |  5957 | 20659 | 0.087952
+  18 |  8289 | 20658 | 0.048701
+  19 | 10884 | 20657 | 0.009212
+  20 | 10883 | 20656 | 0.080500
+  21 |  9954 | 20655 | 0.075280
+  22 |  4390 | 16876 | 0.147691
+  23 |  9203 | 17805 | 0.063931
+  24 |  7892 | 17804 | 0.015429
+  25 |  8417 | 17803 | 0.069119
+  26 | 10171 | 17802 | 0.075825
+  27 |  9953 | 17801 | 0.045079
+  28 |  8859 | 17800 | 0.029389
+  29 |  8536 | 17799 | 0.072658
+  30 | 10180 | 17798 | 0.076558
+  31 |  9592 | 17797 | 0.027637
+  32 |  9318 | 17796 | 0.114755
+  33 | 10179 | 17795 | 0.007150
+  34 | 10178 | 17794 | 0.087467
+  35 |  8402 | 17793 | 0.062258
+  36 |  6179 | 17792 | 0.109483
+  37 |  8508 | 17791 | 0.036248
+  38 |  3305 | 17790 | 0.069816
+  39 |  8512 | 17789 | 0.064158
+  40 |   998 | 17807 | 0.471312
+  41 |  2698 |  2743 | 0.102019
+  42 |  2563 |  9039 | 0.341756
+  43 |  2043 |  9040 | 0.587619
+  44 |  4280 |  9041 | 0.145996
+  45 |  2317 |  9042 | 0.268754
+  46 |  7135 |  9043 | 0.121251
+  47 |  4276 |  9044 | 0.145396
+  48 |  6167 |  9045 | 0.583394
+  49 |  7136 |  9046 | 0.043099
+  50 |  7137 | 19345 | 0.053510
+  51 | 10475 | 19344 | 0.015153
+  52 | 10142 | 19343 | 0.064475
+  53 | 10140 | 17566 | 0.135370
+  54 |  8539 | 17565 | 0.057338
+  55 | 10138 | 17558 | 0.064893
+  56 |  6943 | 17559 | 0.201703
+  57 |  8140 | 17560 | 0.469613
+  58 | 10139 | 20189 | 0.060217
+  59 | 10705 | 20185 | 0.055053
+  60 |  8247 |    -1 | 0.000000
+(60 rows)
+
+--q3
+SELECT seq, node, edge, round(cost::numeric, 6)  FROM
+  pgr_bdDijkstra('SELECT * FROM bdd_ways', 9426, 3606, true);
+ seq | node | edge  |  round
+-----+------+-------+----------
+   1 | 9426 | 14822 | 0.060319
+   2 | 3606 |    -1 | 0.000000
+(2 rows)
+
+--q4
+SELECT seq, node, edge, round(cost::numeric, 6)  FROM
+  pgr_bdDijkstra('SELECT * FROM bdd_ways', 3606, 9426, true);
+ seq | node | edge  |  round
+-----+------+-------+----------
+   1 | 3606 | 14822 | 0.060319
+   2 | 9426 |    -1 | 0.000000
+(2 rows)
+
+--q5
+SELECT seq, node, edge, round(cost::numeric, 6)  FROM
+  pgr_bdDijkstra('SELECT * FROM bdd_ways', 6733, 5700, true);
+ seq | node  | edge  |  round
+-----+-------+-------+----------
+   1 |  6733 | 15058 | 0.044674
+   2 |  9313 | 15059 | 0.047811
+   3 |  7101 | 15060 | 0.049014
+   4 |  8880 | 12897 | 0.170300
+   5 |  5463 |  6271 | 0.046800
+   6 |  5462 |  6270 | 0.053766
+   7 |  5461 |  6269 | 0.104952
+   8 |  5460 |  6268 | 0.109859
+   9 |  5459 |  6267 | 0.053860
+  10 |  5458 |  6266 | 0.055134
+  11 |  5457 | 16647 | 0.012368
+  12 |  9969 | 16650 | 0.012230
+  13 |  9968 | 16649 | 0.081206
+  14 |  9960 | 16626 | 0.007036
+  15 |  9938 | 16621 | 0.014614
+  16 |  9956 | 16642 | 0.029056
+  17 |  9967 | 19287 | 0.111281
+  18 | 10468 | 19288 | 0.066230
+  19 | 10469 | 19289 | 0.065769
+  20 | 10470 | 19290 | 0.117748
+  21 |  8767 | 12598 | 0.059630
+  22 |  8768 | 19389 | 0.016974
+  23 | 10462 | 19388 | 0.081956
+  24 |  5805 | 19387 | 0.052414
+  25 | 10455 | 19386 | 0.052378
+  26 |  7579 | 19385 | 0.052864
+  27 | 10459 | 19384 | 0.047276
+  28 | 10485 | 19383 | 0.005429
+  29 |  5962 | 19382 | 0.006171
+  30 | 10484 | 19381 | 0.098919
+  31 |  3002 | 19380 | 0.108243
+  32 |  4397 | 19379 | 0.102702
+  33 |  9194 | 19378 | 0.009782
+  34 | 10482 | 19377 | 0.096140
+  35 | 10174 | 19376 | 0.107643
+  36 |  8634 | 19375 | 0.102428
+  37 |  9595 | 19374 | 0.106794
+  38 |  8509 | 19360 | 0.051709
+  39 |  9948 | 19359 | 0.051651
+  40 | 10479 | 19358 | 0.059093
+  41 |  9949 | 19357 | 0.047698
+  42 |  3170 | 11899 | 0.018103
+  43 |  8468 | 15487 | 0.034042
+  44 |  9624 | 16983 | 0.022924
+  45 |  8467 | 16982 | 0.022635
+  46 | 10046 | 16981 | 0.045667
+  47 |  8583 | 15477 | 0.113487
+  48 |  8311 | 15478 | 0.019312
+  49 |  2808 | 15479 | 0.209882
+  50 |  9621 | 15480 | 0.016198
+  51 |  8522 | 15481 | 0.180992
+  52 |  8465 | 11894 | 0.046805
+  53 |  8457 | 11882 | 0.101185
+  54 |  1807 | 11883 | 0.064572
+  55 |  8456 | 11880 | 0.048821
+  56 |  8455 | 11878 | 0.083250
+  57 |  8452 | 11871 | 0.118857
+  58 |  8450 | 11867 | 0.005677
+  59 |   529 | 11868 | 0.196533
+  60 |   476 | 11869 | 0.006925
+  61 |  8451 | 13167 | 0.070884
+  62 |  8985 | 13148 | 0.014323
+  63 |  8986 | 13149 | 0.069498
+  64 |  8496 | 13150 | 0.120005
+  65 |   398 | 13151 | 0.057786
+  66 |  8987 | 13152 | 0.099744
+  67 |   637 | 13153 | 0.083288
+  68 |  6436 | 13154 | 0.057101
+  69 |    21 | 13155 | 0.079185
+  70 |  8988 | 13156 | 0.006317
+  71 |  8989 | 13157 | 0.118340
+  72 |  1285 | 13158 | 0.071931
+  73 |  2962 | 13159 | 0.018649
+  74 |  8991 | 13160 | 0.187353
+  75 |  8992 | 13161 | 0.099016
+  76 |  8351 | 13162 | 0.009638
+  77 |  8993 | 13163 | 0.069895
+  78 |  8976 | 13164 | 0.008029
+  79 |  8977 | 13165 | 0.012931
+  80 |  8994 | 13827 | 0.010639
+  81 |  9205 | 13828 | 0.117213
+  82 |  8304 | 13829 | 0.032840
+  83 |  6774 | 13830 | 0.196045
+  84 |  3753 | 13831 | 0.009169
+  85 |  8325 | 12990 | 0.013157
+  86 |  8908 | 20794 | 0.013276
+  87 | 10948 | 20835 | 0.071114
+  88 | 10929 | 20778 | 0.006447
+  89 |  8910 | 20779 | 0.008539
+  90 | 10944 | 20833 | 0.177477
+  91 | 10951 | 20811 | 0.004532
+  92 |  7034 | 20812 | 0.005045
+  93 | 10952 | 20841 | 0.187594
+  94 | 10940 | 20771 | 0.007463
+  95 |  3415 | 20772 | 0.005720
+  96 | 10941 | 20776 | 0.040800
+  97 | 10943 | 20796 | 0.002581
+  98 |  7661 | 20797 | 0.002564
+  99 | 10931 | 20756 | 0.040876
+ 100 | 10932 | 20787 | 0.006774
+ 101 |  5700 |    -1 | 0.000000
+(101 rows)
+
+--q6
+SELECT seq, node, edge, round(cost::numeric, 6)  FROM
+  pgr_bdDijkstra('SELECT * FROM bdd_ways', 8247, 6585, true);
+ seq | node  | edge  |  round
+-----+-------+-------+----------
+   1 |  8247 | 20185 | 0.055053
+   2 | 10705 | 20189 | 0.060217
+   3 | 10139 | 17560 | 0.469613
+   4 |  8140 | 17559 | 0.201703
+   5 |  6943 | 17558 | 0.064893
+   6 | 10138 | 17565 | 0.057338
+   7 |  8539 | 17566 | 0.135370
+   8 | 10140 | 19343 | 0.064475
+   9 | 10142 | 19344 | 0.015153
+  10 | 10475 | 19345 | 0.053510
+  11 |  7137 |  9046 | 0.043099
+  12 |  7136 |  9045 | 0.583394
+  13 |  6167 |  9044 | 0.145396
+  14 |  4276 |  9043 | 0.121251
+  15 |  7135 |  9042 | 0.268754
+  16 |  2317 |  9041 | 0.145996
+  17 |  4280 |  9040 | 0.587619
+  18 |  2043 |  9039 | 0.341756
+  19 |  2563 |  2743 | 0.102019
+  20 |  2698 | 17807 | 0.471312
+  21 |   998 | 17789 | 0.064158
+  22 |  8512 | 17790 | 0.069816
+  23 |  3305 | 17791 | 0.036248
+  24 |  8508 | 17792 | 0.109483
+  25 |  6179 | 17793 | 0.062258
+  26 |  8402 | 17794 | 0.087467
+  27 | 10178 | 17795 | 0.007150
+  28 | 10179 | 17796 | 0.114755
+  29 |  9318 | 17797 | 0.027637
+  30 |  9592 | 17798 | 0.076558
+  31 | 10180 | 17799 | 0.072658
+  32 |  8536 | 17800 | 0.029389
+  33 |  8859 | 17801 | 0.045079
+  34 |  9953 | 17802 | 0.075825
+  35 | 10171 | 17803 | 0.069119
+  36 |  8417 | 17804 | 0.015429
+  37 |  7892 | 17805 | 0.063931
+  38 |  9203 | 16876 | 0.147691
+  39 |  4390 | 20655 | 0.075280
+  40 |  9954 | 20656 | 0.080500
+  41 | 10883 | 20657 | 0.009212
+  42 | 10884 | 20658 | 0.048701
+  43 |  8289 | 20659 | 0.087952
+  44 |  5957 | 20660 | 0.002769
+  45 |  6482 | 20661 | 0.120390
+  46 |  5774 | 20662 | 0.023243
+  47 |  4620 | 20663 | 0.169650
+  48 |  5809 |  6764 | 0.050569
+  49 |  5808 |  6763 | 0.097186
+  50 |  5807 |  6762 | 0.146807
+  51 |  5806 |  6761 | 0.145097
+  52 |  5805 |  6760 | 0.008679
+  53 |  5804 |  6759 | 0.065176
+  54 |  5803 |  6758 | 0.013489
+  55 |  5802 | 17979 | 0.173776
+  56 | 10025 | 17978 | 0.175712
+  57 |   613 | 17977 | 0.178581
+  58 |  7125 | 17976 | 0.155428
+  59 |  5367 | 17975 | 0.200230
+  60 |  6585 |    -1 | 0.000000
+(60 rows)
+
+ROLLBACK;
+ROLLBACK
diff --git a/src/bdDijkstra/test/bdDijkstra-large.test.sql b/test/bdDijkstra/bdDijkstra-large.test.sql
similarity index 100%
rename from src/bdDijkstra/test/bdDijkstra-large.test.sql
rename to test/bdDijkstra/bdDijkstra-large.test.sql
diff --git a/test/bdDijkstra/doc-pgr_bdDijkstra.result b/test/bdDijkstra/doc-pgr_bdDijkstra.result
new file mode 100644
index 0000000..9df672f
--- /dev/null
+++ b/test/bdDijkstra/doc-pgr_bdDijkstra.result
@@ -0,0 +1,119 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- q1
+SELECT * FROM pgr_bdDijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, 3
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    2 |    4 |    1 |        0
+   2 |        2 |    5 |    8 |    1 |        1
+   3 |        3 |    6 |    9 |    1 |        2
+   4 |        4 |    9 |   16 |    1 |        3
+   5 |        5 |    4 |    3 |    1 |        4
+   6 |        6 |    3 |   -1 |    0 |        5
+(6 rows)
+
+-- q2
+SELECT * FROM pgr_bdDijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, 3,
+    false
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    2 |    2 |    1 |        0
+   2 |        2 |    3 |   -1 |    0 |        1
+(2 rows)
+
+-- q3
+SELECT * FROM pgr_bdDijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, ARRAY[3, 11]);
+ seq | path_seq | end_vid | node | edge | cost | agg_cost
+-----+----------+---------+------+------+------+----------
+   1 |        1 |       3 |    2 |    4 |    1 |        0
+   2 |        2 |       3 |    5 |    8 |    1 |        1
+   3 |        3 |       3 |    6 |    9 |    1 |        2
+   4 |        4 |       3 |    9 |   16 |    1 |        3
+   5 |        5 |       3 |    4 |    3 |    1 |        4
+   6 |        6 |       3 |    3 |   -1 |    0 |        5
+   7 |        1 |      11 |    2 |    4 |    1 |        0
+   8 |        2 |      11 |    5 |    8 |    1 |        1
+   9 |        3 |      11 |    6 |   11 |    1 |        2
+  10 |        4 |      11 |   11 |   -1 |    0 |        3
+(10 rows)
+
+-- q4
+SELECT * FROM pgr_bdDijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[2, 7], 3);
+ seq | path_seq | start_vid | node | edge | cost | agg_cost
+-----+----------+-----------+------+------+------+----------
+   1 |        1 |         2 |    2 |    4 |    1 |        0
+   2 |        2 |         2 |    5 |    8 |    1 |        1
+   3 |        3 |         2 |    6 |    9 |    1 |        2
+   4 |        4 |         2 |    9 |   16 |    1 |        3
+   5 |        5 |         2 |    4 |    3 |    1 |        4
+   6 |        6 |         2 |    3 |   -1 |    0 |        5
+   7 |        1 |         7 |    7 |    6 |    1 |        0
+   8 |        2 |         7 |    8 |    7 |    1 |        1
+   9 |        3 |         7 |    5 |    8 |    1 |        2
+  10 |        4 |         7 |    6 |    9 |    1 |        3
+  11 |        5 |         7 |    9 |   16 |    1 |        4
+  12 |        6 |         7 |    4 |    3 |    1 |        5
+  13 |        7 |         7 |    3 |   -1 |    0 |        6
+(13 rows)
+
+-- q5
+SELECT * FROM pgr_bdDijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[2, 7], ARRAY[3, 11]);
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
+-----+----------+-----------+---------+------+------+------+----------
+   1 |        1 |         2 |       3 |    2 |    4 |    1 |        0
+   2 |        2 |         2 |       3 |    5 |    8 |    1 |        1
+   3 |        3 |         2 |       3 |    6 |    9 |    1 |        2
+   4 |        4 |         2 |       3 |    9 |   16 |    1 |        3
+   5 |        5 |         2 |       3 |    4 |    3 |    1 |        4
+   6 |        6 |         2 |       3 |    3 |   -1 |    0 |        5
+   7 |        1 |         2 |      11 |    2 |    4 |    1 |        0
+   8 |        2 |         2 |      11 |    5 |    8 |    1 |        1
+   9 |        3 |         2 |      11 |    6 |   11 |    1 |        2
+  10 |        4 |         2 |      11 |   11 |   -1 |    0 |        3
+  11 |        1 |         7 |       3 |    7 |    6 |    1 |        0
+  12 |        2 |         7 |       3 |    8 |    7 |    1 |        1
+  13 |        3 |         7 |       3 |    5 |    8 |    1 |        2
+  14 |        4 |         7 |       3 |    6 |    9 |    1 |        3
+  15 |        5 |         7 |       3 |    9 |   16 |    1 |        4
+  16 |        6 |         7 |       3 |    4 |    3 |    1 |        5
+  17 |        7 |         7 |       3 |    3 |   -1 |    0 |        6
+  18 |        1 |         7 |      11 |    7 |    6 |    1 |        0
+  19 |        2 |         7 |      11 |    8 |    7 |    1 |        1
+  20 |        3 |         7 |      11 |    5 |   10 |    1 |        2
+  21 |        4 |         7 |      11 |   10 |   12 |    1 |        3
+  22 |        5 |         7 |      11 |   11 |   -1 |    0 |        4
+(22 rows)
+
+-- q6
+SELECT * FROM pgr_bdDijkstra(
+    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost::FLOAT FROM edge_table',
+    2, 3,
+    false,
+    false
+);
+NOTICE:  Deprecated Signature of pgr_bdDijkstra
+ seq | id1 | id2 | cost
+-----+-----+-----+------
+   0 |   2 |   4 |    1
+   1 |   5 |   8 |    1
+   2 |   6 |   5 |    1
+   3 |   3 |  -1 |    0
+(4 rows)
+
+-- q7
+ROLLBACK;
+ROLLBACK
diff --git a/src/bdDijkstra/test/doc-pgr_bdDijkstra.test.sql b/test/bdDijkstra/doc-pgr_bdDijkstra.test.sql
similarity index 100%
rename from src/bdDijkstra/test/doc-pgr_bdDijkstra.test.sql
rename to test/bdDijkstra/doc-pgr_bdDijkstra.test.sql
diff --git a/test/bdDijkstra/doc-pgr_bdDijkstraCost.result b/test/bdDijkstra/doc-pgr_bdDijkstraCost.result
new file mode 100644
index 0000000..abc3a6e
--- /dev/null
+++ b/test/bdDijkstra/doc-pgr_bdDijkstraCost.result
@@ -0,0 +1,60 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- q1
+SELECT * FROM pgr_bdDijkstraCost(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, 3
+);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         2 |       3 |        5
+(1 row)
+
+-- q2
+SELECT * FROM pgr_bdDijkstraCost(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, 3,
+    false
+);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         2 |       3 |        1
+(1 row)
+
+-- q3
+SELECT * FROM pgr_bdDijkstraCost(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, ARRAY[3, 11]);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         2 |       3 |        5
+         2 |      11 |        3
+(2 rows)
+
+-- q4
+SELECT * FROM pgr_bdDijkstraCost(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[2, 7], 3);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         2 |       3 |        5
+         7 |       3 |        6
+(2 rows)
+
+-- q5
+SELECT * FROM pgr_bdDijkstraCost(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[2, 7], ARRAY[3, 11]);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         2 |       3 |        5
+         2 |      11 |        3
+         7 |       3 |        6
+         7 |      11 |        4
+(4 rows)
+
+-- q6
+ROLLBACK;
+ROLLBACK
diff --git a/src/bdDijkstra/test/doc-pgr_bdDijkstraCost.test.sql b/test/bdDijkstra/doc-pgr_bdDijkstraCost.test.sql
similarity index 100%
rename from src/bdDijkstra/test/doc-pgr_bdDijkstraCost.test.sql
rename to test/bdDijkstra/doc-pgr_bdDijkstraCost.test.sql
diff --git a/src/bdDijkstra/test/large.data b/test/bdDijkstra/large.data
similarity index 100%
rename from src/bdDijkstra/test/large.data
rename to test/bdDijkstra/large.data
diff --git a/src/bdDijkstra/test/test.conf b/test/bdDijkstra/test.conf
similarity index 100%
rename from src/bdDijkstra/test/test.conf
rename to test/bdDijkstra/test.conf
diff --git a/test/common/doc-pgr_version.result b/test/common/doc-pgr_version.result
new file mode 100644
index 0000000..75427ec
--- /dev/null
+++ b/test/common/doc-pgr_version.result
@@ -0,0 +1,14 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- q1
+SELECT version FROM pgr_version();
+ version
+---------
+ 2.6.0
+(1 row)
+
+-- q2
+ROLLBACK;
+ROLLBACK
diff --git a/test/common/doc-pgr_version.test.sql b/test/common/doc-pgr_version.test.sql
new file mode 100644
index 0000000..d1cacd9
--- /dev/null
+++ b/test/common/doc-pgr_version.test.sql
@@ -0,0 +1,7 @@
+
+--------------------------------------------------------------------------------
+--                pgr_version
+--------------------------------------------------------------------------------
+\echo -- q1
+SELECT version FROM pgr_version();
+\echo -- q2
diff --git a/test/common/test.conf b/test/common/test.conf
new file mode 100644
index 0000000..ff1a042
--- /dev/null
+++ b/test/common/test.conf
@@ -0,0 +1,25 @@
+#!/usr/bin/perl -w
+
+%main::tests = (
+    'any' => {
+        'comment' => 'pgr_createTopology, pgr_analyzegraph, and pgr_analyzeOneway tests for any versions.',
+        'data' => ['sampledata.data'],
+        'tests' => [qw(
+            versionless-any-01
+            doc-pgr_version
+            )],
+
+        'documentation' => [qw(
+            doc-pgr_version
+            )],
+
+        'dummyStorage' => [qw(
+            )]
+
+    },
+# 'vpg-vpgis' => {}, # for version specific tests
+# '8-1' => {}, # for pg 8.x and postgis 1.x
+# '9.2-2.1' => {}, # for pg 9.2 and postgis 2.1
+);
+
+1;
diff --git a/test/common/versionless-any-01.result b/test/common/versionless-any-01.result
new file mode 100644
index 0000000..e81d08e
--- /dev/null
+++ b/test/common/versionless-any-01.result
@@ -0,0 +1,395 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+/*PGR-GNU*****************************************************************
+
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+select _pgr_versionless('2.1.0foobar23', '2.1');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('2.1.0foobar23', '2.1-rc1');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('2.1.0foobar23', '2.1-beta');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('2.1.0foobar23', '2.1-alpha');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('2.1.0foobar23', '2.1-dev');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('2.1.0foobar23', '2.1rc1');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('2.1.0foobar23', '2.1beta');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('2.1.0foobar23', '2.1alpha');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('2.1.0foobar23', '2.1dev');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('2.1.0-dev', '2.1');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('2.1.0-dev', '2.1-rc1');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('2.1.0-dev', '2.1-beta');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('2.1.0-dev', '2.1-alpha');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('2.1.0-dev', '2.1rc1');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('2.1.0-dev', '2.1beta');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('2.1.0-dev', '2.1alpha');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('2.1.0-alpha', '2.1');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('2.1.0-alpha', '2.1-rc1');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('2.1.0-alpha', '2.1-beta');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('2.1.0-alpha', '2.1rc1');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('2.1.0-alpha', '2.1beta');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('2.1.0-beta', '2.1');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('2.1.0-beta', '2.1-rc1');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('2.1.0-beta', '2.1rc1');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('2.0.0', '2.1');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('2.1', '2.1.3');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('1.05', '2.0.0');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('1.05', '2.0');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('1.05', '2');
+ _pgr_versionless
+------------------
+ t
+(1 row)
+
+select _pgr_versionless('2.1', '2.1.0foobar23');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.1-rc1', '2.1.0foobar23');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.1-beta', '2.1.0foobar23');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.1-alpha', '2.1.0foobar23');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.1-dev', '2.1.0foobar23');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.1rc1', '2.1.0foobar23');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.1beta', '2.1.0foobar23');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.1alpha', '2.1.0foobar23');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.1dev', '2.1.0foobar23');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.1', '2.1.0-dev');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.1-rc1', '2.1.0-dev');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.1-beta', '2.1.0-dev');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.1-alpha', '2.1.0-dev');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.1rc1', '2.1.0-dev');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.1beta', '2.1.0-dev');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.1alpha', '2.1.0-dev');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.1', '2.1.0-alpha');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.1-rc1', '2.1.0-alpha');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.1-beta', '2.1.0-alpha');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.1rc1', '2.1.0-alpha');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.1beta', '2.1.0-alpha');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.1', '2.1.0-beta');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.1-rc1', '2.1.0-beta');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.1rc1', '2.1.0-beta');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.1', '2.0.0');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.1.3', '2.1');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.0.0', '1.05');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.0', '1.05');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2', '1.05');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2', '2.0.0foobar');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.1', '2.1.0');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+select _pgr_versionless('2.1.0beta3dev', '2.1.0beta1dev');
+ _pgr_versionless
+------------------
+ f
+(1 row)
+
+ROLLBACK;
+ROLLBACK
diff --git a/src/common/test/versionless-any-01.test.sql b/test/common/versionless-any-01.test.sql
similarity index 100%
rename from src/common/test/versionless-any-01.test.sql
rename to test/common/versionless-any-01.test.sql
diff --git a/test/components/doc-pgr_articulationPoints.result b/test/components/doc-pgr_articulationPoints.result
new file mode 100644
index 0000000..1e8a60f
--- /dev/null
+++ b/test/components/doc-pgr_articulationPoints.result
@@ -0,0 +1,30 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- q1
+SELECT * FROM pgr_articulationPoints(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table'
+);
+ seq | node
+-----+------
+   1 |    2
+   2 |    5
+   3 |    8
+   4 |   10
+(4 rows)
+
+-- q2
+SELECT * FROM pgr_articulationPoints(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table'
+);
+ seq | node
+-----+------
+   1 |    2
+   2 |    5
+   3 |    8
+   4 |   10
+(4 rows)
+
+ROLLBACK;
+ROLLBACK
diff --git a/src/components/test/doc-pgr_articulationPoints.test.sql b/test/components/doc-pgr_articulationPoints.test.sql
similarity index 100%
rename from src/components/test/doc-pgr_articulationPoints.test.sql
rename to test/components/doc-pgr_articulationPoints.test.sql
diff --git a/test/components/doc-pgr_biconnectedComponents.result b/test/components/doc-pgr_biconnectedComponents.result
new file mode 100644
index 0000000..183b2e7
--- /dev/null
+++ b/test/components/doc-pgr_biconnectedComponents.result
@@ -0,0 +1,58 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- q1
+SELECT * FROM pgr_biconnectedComponents(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table'
+);
+ seq | component | n_seq | edge
+-----+-----------+-------+------
+   1 |         1 |     1 |    1
+   2 |         2 |     1 |    2
+   3 |         2 |     2 |    3
+   4 |         2 |     3 |    4
+   5 |         2 |     4 |    5
+   6 |         2 |     5 |    8
+   7 |         2 |     6 |    9
+   8 |         2 |     7 |   10
+   9 |         2 |     8 |   11
+  10 |         2 |     9 |   12
+  11 |         2 |    10 |   13
+  12 |         2 |    11 |   15
+  13 |         2 |    12 |   16
+  14 |         6 |     1 |    6
+  15 |         7 |     1 |    7
+  16 |        14 |     1 |   14
+  17 |        17 |     1 |   17
+  18 |        18 |     1 |   18
+(18 rows)
+
+-- q2
+SELECT * FROM pgr_biconnectedComponents(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table'
+);
+ seq | component | n_seq | edge
+-----+-----------+-------+------
+   1 |         1 |     1 |    1
+   2 |         2 |     1 |    2
+   3 |         2 |     2 |    3
+   4 |         2 |     3 |    4
+   5 |         2 |     4 |    5
+   6 |         2 |     5 |    8
+   7 |         2 |     6 |    9
+   8 |         2 |     7 |   10
+   9 |         2 |     8 |   11
+  10 |         2 |     9 |   12
+  11 |         2 |    10 |   13
+  12 |         2 |    11 |   15
+  13 |         2 |    12 |   16
+  14 |         6 |     1 |    6
+  15 |         7 |     1 |    7
+  16 |        14 |     1 |   14
+  17 |        17 |     1 |   17
+  18 |        18 |     1 |   18
+(18 rows)
+
+ROLLBACK;
+ROLLBACK
diff --git a/src/components/test/doc-pgr_biconnectedComponents.test.sql b/test/components/doc-pgr_biconnectedComponents.test.sql
similarity index 100%
rename from src/components/test/doc-pgr_biconnectedComponents.test.sql
rename to test/components/doc-pgr_biconnectedComponents.test.sql
diff --git a/test/components/doc-pgr_bridges.result b/test/components/doc-pgr_bridges.result
new file mode 100644
index 0000000..fd7b907
--- /dev/null
+++ b/test/components/doc-pgr_bridges.result
@@ -0,0 +1,34 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- q1
+SELECT * FROM pgr_bridges(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table'
+);
+ seq | edge
+-----+------
+   1 |    1
+   2 |    6
+   3 |    7
+   4 |   14
+   5 |   17
+   6 |   18
+(6 rows)
+
+-- q2
+SELECT * FROM pgr_bridges(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table'
+);
+ seq | edge
+-----+------
+   1 |    1
+   2 |    6
+   3 |    7
+   4 |   14
+   5 |   17
+   6 |   18
+(6 rows)
+
+ROLLBACK;
+ROLLBACK
diff --git a/src/components/test/doc-pgr_bridges.test.sql b/test/components/doc-pgr_bridges.test.sql
similarity index 100%
rename from src/components/test/doc-pgr_bridges.test.sql
rename to test/components/doc-pgr_bridges.test.sql
diff --git a/test/components/doc-pgr_connectedComponents.result b/test/components/doc-pgr_connectedComponents.result
new file mode 100644
index 0000000..3636e0a
--- /dev/null
+++ b/test/components/doc-pgr_connectedComponents.result
@@ -0,0 +1,56 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- q1
+SELECT * FROM pgr_connectedComponents(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table'
+);
+ seq | component | n_seq | node
+-----+-----------+-------+------
+   1 |         1 |     1 |    1
+   2 |         1 |     2 |    2
+   3 |         1 |     3 |    3
+   4 |         1 |     4 |    4
+   5 |         1 |     5 |    5
+   6 |         1 |     6 |    6
+   7 |         1 |     7 |    7
+   8 |         1 |     8 |    8
+   9 |         1 |     9 |    9
+  10 |         1 |    10 |   10
+  11 |         1 |    11 |   11
+  12 |         1 |    12 |   12
+  13 |         1 |    13 |   13
+  14 |        14 |     1 |   14
+  15 |        14 |     2 |   15
+  16 |        16 |     1 |   16
+  17 |        16 |     2 |   17
+(17 rows)
+
+-- q2
+SELECT * FROM pgr_connectedComponents(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table'
+);
+ seq | component | n_seq | node
+-----+-----------+-------+------
+   1 |         1 |     1 |    1
+   2 |         1 |     2 |    2
+   3 |         1 |     3 |    3
+   4 |         1 |     4 |    4
+   5 |         1 |     5 |    5
+   6 |         1 |     6 |    6
+   7 |         1 |     7 |    7
+   8 |         1 |     8 |    8
+   9 |         1 |     9 |    9
+  10 |         1 |    10 |   10
+  11 |         1 |    11 |   11
+  12 |         1 |    12 |   12
+  13 |         1 |    13 |   13
+  14 |        14 |     1 |   14
+  15 |        14 |     2 |   15
+  16 |        16 |     1 |   16
+  17 |        16 |     2 |   17
+(17 rows)
+
+ROLLBACK;
+ROLLBACK
diff --git a/src/components/test/doc-pgr_connectedComponents.test.sql b/test/components/doc-pgr_connectedComponents.test.sql
similarity index 100%
rename from src/components/test/doc-pgr_connectedComponents.test.sql
rename to test/components/doc-pgr_connectedComponents.test.sql
diff --git a/test/components/doc-pgr_strongComponents.result b/test/components/doc-pgr_strongComponents.result
new file mode 100644
index 0000000..a78b576
--- /dev/null
+++ b/test/components/doc-pgr_strongComponents.result
@@ -0,0 +1,56 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- q1
+SELECT * FROM pgr_strongComponents(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table'
+);
+ seq | component | n_seq | node
+-----+-----------+-------+------
+   1 |         1 |     1 |    1
+   2 |         1 |     2 |    2
+   3 |         1 |     3 |    3
+   4 |         1 |     4 |    4
+   5 |         1 |     5 |    5
+   6 |         1 |     6 |    6
+   7 |         1 |     7 |    7
+   8 |         1 |     8 |    8
+   9 |         1 |     9 |    9
+  10 |         1 |    10 |   10
+  11 |         1 |    11 |   11
+  12 |         1 |    12 |   12
+  13 |         1 |    13 |   13
+  14 |        14 |     1 |   14
+  15 |        14 |     2 |   15
+  16 |        16 |     1 |   16
+  17 |        16 |     2 |   17
+(17 rows)
+
+-- q2
+SELECT * FROM pgr_strongComponents(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table'
+);
+ seq | component | n_seq | node
+-----+-----------+-------+------
+   1 |         1 |     1 |    1
+   2 |         1 |     2 |    2
+   3 |         1 |     3 |    3
+   4 |         1 |     4 |    4
+   5 |         1 |     5 |    5
+   6 |         1 |     6 |    6
+   7 |         1 |     7 |    7
+   8 |         1 |     8 |    8
+   9 |         1 |     9 |    9
+  10 |         1 |    10 |   10
+  11 |         1 |    11 |   11
+  12 |         1 |    12 |   12
+  13 |         1 |    13 |   13
+  14 |        14 |     1 |   14
+  15 |        14 |     2 |   15
+  16 |        16 |     1 |   16
+  17 |        16 |     2 |   17
+(17 rows)
+
+ROLLBACK;
+ROLLBACK
diff --git a/src/components/test/doc-pgr_strongComponents.test.sql b/test/components/doc-pgr_strongComponents.test.sql
similarity index 100%
rename from src/components/test/doc-pgr_strongComponents.test.sql
rename to test/components/doc-pgr_strongComponents.test.sql
diff --git a/src/components/test/pgtap/connectedComponentsV-compare-dijkstra.sql b/test/components/pgtap/connectedComponentsV-compare-dijkstra.sql
similarity index 100%
rename from src/components/test/pgtap/connectedComponentsV-compare-dijkstra.sql
rename to test/components/pgtap/connectedComponentsV-compare-dijkstra.sql
diff --git a/src/components/test/pgtap/connectedComponentsV-innerQuery.sql b/test/components/pgtap/connectedComponentsV-innerQuery.sql
similarity index 100%
rename from src/components/test/pgtap/connectedComponentsV-innerQuery.sql
rename to test/components/pgtap/connectedComponentsV-innerQuery.sql
diff --git a/src/components/test/pgtap/connectedComponentsV-typesCheck.sql b/test/components/pgtap/connectedComponentsV-typesCheck.sql
similarity index 100%
rename from src/components/test/pgtap/connectedComponentsV-typesCheck.sql
rename to test/components/pgtap/connectedComponentsV-typesCheck.sql
diff --git a/src/components/test/test.conf b/test/components/test.conf
similarity index 100%
rename from src/components/test/test.conf
rename to test/components/test.conf
diff --git a/test/contraction/directed-deadend.result b/test/contraction/directed-deadend.result
new file mode 100644
index 0000000..8e0a367
--- /dev/null
+++ b/test/contraction/directed-deadend.result
@@ -0,0 +1,61 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+--q1 Checking dead end contraction for single edge
+/*
+\echo --q0 Checking for valid contraction
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1',
+    ARRAY[-1]::integer[], 1, ARRAY[]::BIGINT[], true);
+*/
+
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1',
+    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+   1 | v    |  2 | {1}                 |     -1 |     -1 |   -1
+(1 row)
+
+--q2 Checking dead end contraction for two edges
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id < 3',
+    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+   1 | v    |  3 | {1,2}               |     -1 |     -1 |   -1
+(1 row)
+
+--q3 Checking dead end contraction for sample data
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+   1 | v    |  2 | {1}                 |     -1 |     -1 |   -1
+   2 | v    |  5 | {7,8}               |     -1 |     -1 |   -1
+   3 | v    | 10 | {13}                |     -1 |     -1 |   -1
+   4 | v    | 15 | {14}                |     -1 |     -1 |   -1
+   5 | v    | 17 | {16}                |     -1 |     -1 |   -1
+(5 rows)
+
+--q5 Checking dead end contraction for a graph with no dead end vertex
+/*
+-- this test fails becuse parameter is wrong
+\echo --q4 Checking that forbidden vertices can only be one dimensional or empty
+SELECT * FROM pgr_contractGraph(
+	'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1',
+	ARRAY[ [2,3,4,5], [4,5,6,7] ]::BIGINT[][], ARRAY[0]::integer[], 1, true);
+-- \echo --q4 -------------------------------------------
+*/
+SELECT * FROM pgr_contractGraph(
+	'SELECT id, source, target, cost, reverse_cost FROM edge_table
+	WHERE id = 2 OR id = 4 OR id = 5 OR id = 8',
+	ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+(0 rows)
+
+ROLLBACK;
+ROLLBACK
diff --git a/test/contraction/directed-deadend.test.sql b/test/contraction/directed-deadend.test.sql
new file mode 100644
index 0000000..926d68c
--- /dev/null
+++ b/test/contraction/directed-deadend.test.sql
@@ -0,0 +1,44 @@
+
+
+/*
+\echo --q0 Checking for valid contraction
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1',
+    ARRAY[-1]::integer[], 1, ARRAY[]::BIGINT[], true);
+*/
+-- \echo --q0 -------------------------------------------
+
+\echo --q1 Checking dead end contraction for single edge
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1',
+    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
+-- \echo --q1 -------------------------------------------
+
+\echo --q2 Checking dead end contraction for two edges
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id < 3',
+    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
+-- \echo --q2 -------------------------------------------
+
+\echo --q3 Checking dead end contraction for sample data
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
+-- \echo --q3 -------------------------------------------
+
+/*
+-- this test fails becuse parameter is wrong
+\echo --q4 Checking that forbidden vertices can only be one dimensional or empty
+SELECT * FROM pgr_contractGraph(
+	'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1',
+	ARRAY[ [2,3,4,5], [4,5,6,7] ]::BIGINT[][], ARRAY[0]::integer[], 1, true);
+-- \echo --q4 -------------------------------------------
+*/
+
+\echo --q5 Checking dead end contraction for a graph with no dead end vertex
+SELECT * FROM pgr_contractGraph(
+	'SELECT id, source, target, cost, reverse_cost FROM edge_table
+	WHERE id = 2 OR id = 4 OR id = 5 OR id = 8',
+	ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
+-- \echo --q5 -------------------------------------------
+
diff --git a/test/contraction/directed-development.result b/test/contraction/directed-development.result
new file mode 100644
index 0000000..23d130d
--- /dev/null
+++ b/test/contraction/directed-development.result
@@ -0,0 +1,165 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+--q1 Checking dead end contraction for single edge
+/*
+-- this test fails becuse parameter is wrong
+\echo --q0 Checking for valid contraction
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1',
+    ARRAY[-1]::integer[], 1, ARRAY[]::BIGINT[], true);
+*/
+
+
+
+
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1',
+    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+   1 | v    |  2 | {1}                 |     -1 |     -1 |   -1
+(1 row)
+
+--q2 Checking dead end contraction for two edges
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id < 3',
+    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+   1 | v    |  3 | {1,2}               |     -1 |     -1 |   -1
+(1 row)
+
+--q3 Checking dead end contraction for sample data
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+   1 | v    |  2 | {1}                 |     -1 |     -1 |   -1
+   2 | v    |  5 | {7,8}               |     -1 |     -1 |   -1
+   3 | v    | 10 | {13}                |     -1 |     -1 |   -1
+   4 | v    | 15 | {14}                |     -1 |     -1 |   -1
+   5 | v    | 17 | {16}                |     -1 |     -1 |   -1
+(5 rows)
+
+--q5 Checking dead end contraction for a graph with no dead end vertex
+SELECT * FROM pgr_contractGraph(
+	'SELECT id, source, target, cost, reverse_cost FROM edge_table
+	WHERE id = 2 OR id = 4 OR id = 5 OR id = 8',
+	ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+(0 rows)
+
+--q6 Checking for linear vertices case 1
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table
+    WHERE id = 3 OR id = 5',
+    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+   1 | e    | -1 | {3}                 |      4 |      6 |    2
+(1 row)
+
+--q7 Checking for linear vertices case 2
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table
+    WHERE id = 8 OR id = 10',
+    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+   1 | e    | -1 | {5}                 |      6 |     10 |    2
+   2 | e    | -2 | {5}                 |     10 |      6 |    2
+(2 rows)
+
+--q8 Checking for linear vertices case 3
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table
+    WHERE id = 2 OR id = 4',
+    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+   1 | e    | -1 | {2}                 |      3 |      5 |    2
+(1 row)
+
+--q9 Checking for linear vertices case 4
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table
+    WHERE id = 5 OR id = 9',
+    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+   1 | e    | -1 | {6}                 |      3 |      9 |    2
+(1 row)
+
+--q10 Checking linear contraction for sample data
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table' ,
+    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+   1 | e    | -1 | {4}                 |      9 |      3 |    2
+   2 | e    | -2 | {8}                 |      5 |      7 |    2
+   3 | e    | -3 | {8}                 |      7 |      5 |    2
+   4 | e    | -4 | {12}                |     11 |      9 |    2
+(4 rows)
+
+--q11 Checking dead end, linear contraction for sample data
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table' ,
+    ARRAY[1, 2]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+   1 | v    |  5 | {7,8}               |     -1 |     -1 |   -1
+   2 | v    | 15 | {14}                |     -1 |     -1 |   -1
+   3 | v    | 17 | {16}                |     -1 |     -1 |   -1
+   4 | e    | -1 | {1,2}               |      3 |      5 |    2
+   5 | e    | -2 | {4}                 |      9 |      3 |    2
+   6 | e    | -3 | {10,13}             |      5 |     11 |    2
+   7 | e    | -4 | {12}                |     11 |      9 |    2
+(7 rows)
+
+--q12 Checking linear contraction, dead end for sample data
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table' ,
+     ARRAY[2, 1]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+   1 | v    |  2 | {1}                 |     -1 |     -1 |   -1
+   2 | v    |  5 | {7,8}               |     -1 |     -1 |   -1
+   3 | v    | 10 | {13}                |     -1 |     -1 |   -1
+   4 | v    | 15 | {14}                |     -1 |     -1 |   -1
+   5 | v    | 17 | {16}                |     -1 |     -1 |   -1
+   6 | e    | -1 | {4}                 |      9 |      3 |    2
+   7 | e    | -2 | {8}                 |      5 |      7 |    2
+   8 | e    | -3 | {8}                 |      7 |      5 |    2
+   9 | e    | -4 | {12}                |     11 |      9 |    2
+(9 rows)
+
+--q13 Checking linear contraction for a square like graph
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table
+    WHERE id = 2 OR id = 4 OR id = 5 OR id = 8',
+    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+   1 | e    | -1 | {2}                 |      3 |      5 |    2
+   2 | e    | -2 | {2,5}               |      3 |      6 |    3
+(2 rows)
+
+--q14 Checking linear contraction, dead end for a square like graph
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table
+    WHERE id = 2 OR id = 4 OR id = 5 OR id = 8',
+    ARRAY[2, 1]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+   1 | v    |  3 | {2,5,6}             |     -1 |     -1 |   -1
+   2 | e    | -1 | {2}                 |      3 |      5 |    2
+   3 | e    | -2 | {2,5}               |      3 |      6 |    3
+(3 rows)
+
+ROLLBACK;
+ROLLBACK
diff --git a/test/contraction/directed-development.test.sql b/test/contraction/directed-development.test.sql
new file mode 100644
index 0000000..fad41e8
--- /dev/null
+++ b/test/contraction/directed-development.test.sql
@@ -0,0 +1,149 @@
+
+/*
+-- this test fails becuse parameter is wrong
+\echo --q0 Checking for valid contraction
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1',
+    ARRAY[-1]::integer[], 1, ARRAY[]::BIGINT[], true);
+*/
+-- \echo --q0 -------------------------------------------
+
+\echo --q1 Checking dead end contraction for single edge
+-- GRAPH: 1 <=> 2
+-- EXPECTED
+--    1 | v    |  2 | {1}                 |     -1 |     -1 |   -1
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1',
+    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
+
+
+-- \echo --q1 -------------------------------------------
+
+\echo --q2 Checking dead end contraction for two edges
+--GRAPH: 1 <=> 2 <- 3
+-- EXPECTED
+--   1 | v    |  3 | {1,2}               |     -1 |     -1 |   -1
+
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id < 3',
+    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
+
+
+-- \echo --q2 -------------------------------------------
+
+\echo --q3 Checking dead end contraction for sample data
+
+-- EXPECTED
+--   1 | v    |  2 | {1}                 |     -1 |     -1 |   -1
+--   2 | v    |  5 | {7,8}               |     -1 |     -1 |   -1
+--   3 | v    | 10 | {13}                |     -1 |     -1 |   -1
+--   4 | v    | 15 | {14}                |     -1 |     -1 |   -1
+--   5 | v    | 17 | {16}                |     -1 |     -1 |   -1
+
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
+
+
+-- \echo --q3 -------------------------------------------
+
+\echo --q5 Checking dead end contraction for a graph with no dead end vertex
+-- 5 <- 6
+-- "    ^
+-- 2 <- 3
+
+-- EXPECTED
+-- (empty)
+
+SELECT * FROM pgr_contractGraph(
+	'SELECT id, source, target, cost, reverse_cost FROM edge_table
+	WHERE id = 2 OR id = 4 OR id = 5 OR id = 8',
+	ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
+
+-- \echo --q5 -------------------------------------------
+
+\echo --q6 Checking for linear vertices case 1
+-- GRPAH 1 <=> 2
+-- EXPECTED
+--   1 | e    | -1 | {3}                 |      4 |      6 |    2
+
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table
+    WHERE id = 3 OR id = 5',
+    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
+
+-- \echo --q6 -------------------------------------------
+
+
+\echo --q7 Checking for linear vertices case 2
+-- GRAPH 10 <=> 5 <=> 6
+-- EXPECTED
+--   1 | e    | -1 | {5}                 |      6 |     10 |    2
+--   2 | e    | -2 | {5}                 |     10 |      6 |    2
+-- New edges:  6 <=> 10
+
+
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table
+    WHERE id = 8 OR id = 10',
+    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
+
+-- \echo --q7 -------------------------------------------
+
+
+\echo --q8 Checking for linear vertices case 3
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table
+    WHERE id = 2 OR id = 4',
+    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
+-- \echo --q8 -------------------------------------------
+
+\echo --q9 Checking for linear vertices case 4
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table
+    WHERE id = 5 OR id = 9',
+    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
+-- \echo --q9 -------------------------------------------
+
+\echo --q10 Checking linear contraction for sample data
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table' ,
+    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
+-- \echo --q10 -------------------------------------------
+
+\echo --q11 Checking dead end, linear contraction for sample data
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table' ,
+    ARRAY[1, 2]::integer[], 1, ARRAY[]::BIGINT[], true);
+-- \echo --q11 -------------------------------------------
+
+\echo --q12 Checking linear contraction, dead end for sample data
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table' ,
+     ARRAY[2, 1]::integer[], 1, ARRAY[]::BIGINT[], true);
+-- \echo --q12 -------------------------------------------
+\echo --q13 Checking linear contraction for a square like graph
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table
+    WHERE id = 2 OR id = 4 OR id = 5 OR id = 8',
+    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
+-- \echo --q13 -------------------------------------------
+
+\echo --q14 Checking linear contraction, dead end for a square like graph
+-- GRAPH
+-- 5 <- 6
+-- "    ^
+-- 2 <- 3
+-- 1|v|3|{2,5,6}|-1|-1|-1
+-- 2|e|-1|{2}|3|5|2
+-- 3|e|-2|{2,5}|3|6|3
+
+-- 3 -> 5
+
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table
+    WHERE id = 2 OR id = 4 OR id = 5 OR id = 8',
+    ARRAY[2, 1]::integer[], 1, ARRAY[]::BIGINT[], true);
+
+
+
diff --git a/test/contraction/directed-linear.result b/test/contraction/directed-linear.result
new file mode 100644
index 0000000..70bf729
--- /dev/null
+++ b/test/contraction/directed-linear.result
@@ -0,0 +1,70 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+--q6 Checking for linear vertices case 1
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table
+    WHERE id = 3 OR id = 5',
+    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+   1 | e    | -1 | {3}                 |      4 |      6 |    2
+(1 row)
+
+--q7 Checking for linear vertices case 2
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table
+    WHERE id = 8 OR id = 10',
+    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+   1 | e    | -1 | {5}                 |      6 |     10 |    2
+   2 | e    | -2 | {5}                 |     10 |      6 |    2
+(2 rows)
+
+--q8 Checking for linear vertices case 3
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table
+    WHERE id = 2 OR id = 4',
+    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+   1 | e    | -1 | {2}                 |      3 |      5 |    2
+(1 row)
+
+--q9 Checking for linear vertices case 4
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table
+    WHERE id = 5 OR id = 9',
+    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+   1 | e    | -1 | {6}                 |      3 |      9 |    2
+(1 row)
+
+--q10 Checking linear contraction for sample data
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table' ,
+    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+   1 | e    | -1 | {4}                 |      9 |      3 |    2
+   2 | e    | -2 | {8}                 |      5 |      7 |    2
+   3 | e    | -3 | {8}                 |      7 |      5 |    2
+   4 | e    | -4 | {12}                |     11 |      9 |    2
+(4 rows)
+
+--q13 Checking linear contraction for a square like graph
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table
+    WHERE id = 2 OR id = 4 OR id = 5 OR id = 8',
+    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+   1 | e    | -1 | {2}                 |      3 |      5 |    2
+   2 | e    | -2 | {2,5}               |      3 |      6 |    3
+(2 rows)
+
+ROLLBACK;
+ROLLBACK
diff --git a/test/contraction/directed-linear.test.sql b/test/contraction/directed-linear.test.sql
new file mode 100644
index 0000000..15b3476
--- /dev/null
+++ b/test/contraction/directed-linear.test.sql
@@ -0,0 +1,45 @@
+
+\echo --q6 Checking for linear vertices case 1
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table
+    WHERE id = 3 OR id = 5',
+    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
+-- \echo --q6 -------------------------------------------
+
+
+\echo --q7 Checking for linear vertices case 2
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table
+    WHERE id = 8 OR id = 10',
+    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
+-- \echo --q7 -------------------------------------------
+
+
+\echo --q8 Checking for linear vertices case 3
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table
+    WHERE id = 2 OR id = 4',
+    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
+-- \echo --q8 -------------------------------------------
+
+\echo --q9 Checking for linear vertices case 4
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table
+    WHERE id = 5 OR id = 9',
+    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
+-- \echo --q9 -------------------------------------------
+
+\echo --q10 Checking linear contraction for sample data
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table' ,
+    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
+-- \echo --q10 -------------------------------------------
+
+
+\echo --q13 Checking linear contraction for a square like graph
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table
+    WHERE id = 2 OR id = 4 OR id = 5 OR id = 8',
+    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
+-- \echo --q13 -------------------------------------------
+
diff --git a/test/contraction/doc-contractGraph.result b/test/contraction/doc-contractGraph.result
new file mode 100644
index 0000000..530acfd
--- /dev/null
+++ b/test/contraction/doc-contractGraph.result
@@ -0,0 +1,62 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- q1
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[1, 2]);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+   1 | v    |  5 | {7,8}               |     -1 |     -1 |   -1
+   2 | v    | 15 | {14}                |     -1 |     -1 |   -1
+   3 | v    | 17 | {16}                |     -1 |     -1 |   -1
+   4 | e    | -1 | {1,2}               |      3 |      5 |    2
+   5 | e    | -2 | {4}                 |      9 |      3 |    2
+   6 | e    | -3 | {10,13}             |      5 |     11 |    2
+   7 | e    | -4 | {12}                |     11 |      9 |    2
+(7 rows)
+
+-- q2
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+ARRAY[1, 2], forbidden_vertices:=ARRAY[2]);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+   1 | v    |  2 | {1}                 |     -1 |     -1 |   -1
+   2 | v    |  5 | {7,8}               |     -1 |     -1 |   -1
+   3 | v    | 15 | {14}                |     -1 |     -1 |   -1
+   4 | v    | 17 | {16}                |     -1 |     -1 |   -1
+   5 | e    | -1 | {4}                 |      9 |      3 |    2
+   6 | e    | -2 | {10,13}             |      5 |     11 |    2
+   7 | e    | -3 | {12}                |     11 |      9 |    2
+(7 rows)
+
+-- q3
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+ARRAY[1]);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+   1 | v    |  2 | {1}                 |     -1 |     -1 |   -1
+   2 | v    |  5 | {7,8}               |     -1 |     -1 |   -1
+   3 | v    | 10 | {13}                |     -1 |     -1 |   -1
+   4 | v    | 15 | {14}                |     -1 |     -1 |   -1
+   5 | v    | 17 | {16}                |     -1 |     -1 |   -1
+(5 rows)
+
+-- q4
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+ARRAY[2]);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+   1 | e    | -1 | {4}                 |      9 |      3 |    2
+   2 | e    | -2 | {8}                 |      5 |      7 |    2
+   3 | e    | -3 | {8}                 |      7 |      5 |    2
+   4 | e    | -4 | {12}                |     11 |      9 |    2
+(4 rows)
+
+-- q5
+ROLLBACK;
+ROLLBACK
diff --git a/src/contraction/test/doc-contractGraph.test.sql b/test/contraction/doc-contractGraph.test.sql
similarity index 100%
rename from src/contraction/test/doc-contractGraph.test.sql
rename to test/contraction/doc-contractGraph.test.sql
diff --git a/test/contraction/doc-contraction.result b/test/contraction/doc-contraction.result
new file mode 100644
index 0000000..9c8cd27
--- /dev/null
+++ b/test/contraction/doc-contraction.result
@@ -0,0 +1,339 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- q00
+-- q01
+SET client_min_messages TO ERROR;
+SET
+-- q1
+ALTER TABLE edge_table ADD contracted_vertices BIGINT[];
+ALTER TABLE
+ALTER TABLE edge_table_vertices_pgr ADD contracted_vertices BIGINT[];
+ALTER TABLE
+ALTER TABLE edge_table ADD is_contracted BOOLEAN DEFAULT false;
+ALTER TABLE
+ALTER TABLE edge_table_vertices_pgr ADD is_contracted BOOLEAN DEFAULT false;
+ALTER TABLE
+SET client_min_messages TO NOTICE;
+SET
+-- q2
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    array[1,2], directed:=true);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+   1 | v    |  5 | {7,8}               |     -1 |     -1 |   -1
+   2 | v    | 15 | {14}                |     -1 |     -1 |   -1
+   3 | v    | 17 | {16}                |     -1 |     -1 |   -1
+   4 | e    | -1 | {1,2}               |      3 |      5 |    2
+   5 | e    | -2 | {4}                 |      9 |      3 |    2
+   6 | e    | -3 | {10,13}             |      5 |     11 |    2
+   7 | e    | -4 | {12}                |     11 |      9 |    2
+(7 rows)
+
+-- q3
+SELECT * INTO contraction_results
+FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    array[1,2], directed:=true);
+SELECT 7
+-- q4
+UPDATE edge_table_vertices_pgr
+SET is_contracted = true
+WHERE id IN (SELECT  unnest(contracted_vertices) FROM  contraction_results);
+UPDATE 10
+-- q5
+SELECT id, is_contracted
+FROM edge_table_vertices_pgr
+ORDER BY id;
+ id | is_contracted
+----+---------------
+  1 | t
+  2 | t
+  3 | f
+  4 | t
+  5 | f
+  6 | f
+  7 | t
+  8 | t
+  9 | f
+ 10 | t
+ 11 | f
+ 12 | t
+ 13 | t
+ 14 | t
+ 15 | f
+ 16 | t
+ 17 | f
+(17 rows)
+
+-- q6
+UPDATE edge_table_vertices_pgr
+SET contracted_vertices = contraction_results.contracted_vertices
+FROM contraction_results
+WHERE type = 'v' AND edge_table_vertices_pgr.id = contraction_results.id;
+UPDATE 3
+-- q7
+SELECT id, contracted_vertices, is_contracted
+FROM edge_table_vertices_pgr
+ORDER BY id;
+ id | contracted_vertices | is_contracted
+----+---------------------+---------------
+  1 |                     | t
+  2 |                     | t
+  3 |                     | f
+  4 |                     | t
+  5 | {7,8}               | f
+  6 |                     | f
+  7 |                     | t
+  8 |                     | t
+  9 |                     | f
+ 10 |                     | t
+ 11 |                     | f
+ 12 |                     | t
+ 13 |                     | t
+ 14 |                     | t
+ 15 | {14}                | f
+ 16 |                     | t
+ 17 | {16}                | f
+(17 rows)
+
+-- q8
+INSERT INTO edge_table(source, target, cost, reverse_cost, contracted_vertices, is_contracted)
+SELECT source, target, cost, -1, contracted_vertices, true
+FROM contraction_results
+WHERE type = 'e';
+INSERT 0 4
+-- q9
+SELECT id, source, target, cost, reverse_cost, contracted_vertices, is_contracted
+FROM edge_table
+ORDER BY id;
+ id | source | target | cost | reverse_cost | contracted_vertices | is_contracted
+----+--------+--------+------+--------------+---------------------+---------------
+  1 |      1 |      2 |    1 |            1 |                     | f
+  2 |      2 |      3 |   -1 |            1 |                     | f
+  3 |      3 |      4 |   -1 |            1 |                     | f
+  4 |      2 |      5 |    1 |            1 |                     | f
+  5 |      3 |      6 |    1 |           -1 |                     | f
+  6 |      7 |      8 |    1 |            1 |                     | f
+  7 |      8 |      5 |    1 |            1 |                     | f
+  8 |      5 |      6 |    1 |            1 |                     | f
+  9 |      6 |      9 |    1 |            1 |                     | f
+ 10 |      5 |     10 |    1 |            1 |                     | f
+ 11 |      6 |     11 |    1 |           -1 |                     | f
+ 12 |     10 |     11 |    1 |           -1 |                     | f
+ 13 |     11 |     12 |    1 |           -1 |                     | f
+ 14 |     10 |     13 |    1 |            1 |                     | f
+ 15 |      9 |     12 |    1 |            1 |                     | f
+ 16 |      4 |      9 |    1 |            1 |                     | f
+ 17 |     14 |     15 |    1 |            1 |                     | f
+ 18 |     16 |     17 |    1 |            1 |                     | f
+ 19 |      3 |      5 |    2 |           -1 | {1,2}               | t
+ 20 |      9 |      3 |    2 |           -1 | {4}                 | t
+ 21 |      5 |     11 |    2 |           -1 | {10,13}             | t
+ 22 |     11 |      9 |    2 |           -1 | {12}                | t
+(22 rows)
+
+-- q10
+SELECT id  FROM edge_table_vertices_pgr
+WHERE is_contracted = false
+ORDER BY id;
+ id
+----
+  3
+  5
+  6
+  9
+ 11
+ 15
+ 17
+(7 rows)
+
+-- case1
+SELECT * FROM pgr_dijkstra(
+    $$
+    WITH
+    vertices_in_graph AS (
+        SELECT id  FROM edge_table_vertices_pgr WHERE is_contracted = false)
+    SELECT id, source, target, cost, reverse_cost
+    FROM edge_table
+    WHERE source IN (SELECT * FROM vertices_in_graph)
+    AND target IN (SELECT * FROM vertices_in_graph)
+    $$,
+    3, 11, false);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    3 |    5 |    1 |        0
+   2 |        2 |    6 |   11 |    1 |        1
+   3 |        3 |   11 |   -1 |    0 |        2
+(3 rows)
+
+-- case2
+SELECT * FROM pgr_dijkstra(
+    $$
+    WITH
+    expand_edges AS (SELECT id, unnest(contracted_vertices) AS vertex FROM edge_table),
+    expand1 AS (SELECT contracted_vertices FROM edge_table
+        WHERE id IN (SELECT id FROM expand_edges WHERE vertex = 1)),
+    vertices_in_graph AS (
+        SELECT id  FROM edge_table_vertices_pgr WHERE is_contracted = false
+        UNION
+        SELECT unnest(contracted_vertices) FROM expand1)
+    SELECT id, source, target, cost, reverse_cost
+    FROM edge_table
+    WHERE source IN (SELECT * FROM vertices_in_graph)
+    AND target IN (SELECT * FROM vertices_in_graph)
+    $$,
+    3, 1, false);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    3 |    2 |    1 |        0
+   2 |        2 |    2 |    1 |    1 |        1
+   3 |        3 |    1 |   -1 |    0 |        2
+(3 rows)
+
+-- case3
+SELECT * FROM pgr_dijkstra(
+    $$
+    WITH
+
+    expand_vertices AS (SELECT id, unnest(contracted_vertices) AS vertex FROM edge_table_vertices_pgr),
+    expand7 AS (SELECT contracted_vertices FROM edge_table_vertices_pgr
+        WHERE id IN (SELECT id FROM expand_vertices WHERE vertex = 7)),
+
+    expand_edges AS (SELECT id, unnest(contracted_vertices) AS vertex FROM edge_table),
+    expand13 AS (SELECT contracted_vertices FROM edge_table
+        WHERE id IN (SELECT id FROM expand_edges WHERE vertex = 13)),
+
+    vertices_in_graph AS (
+        SELECT id  FROM edge_table_vertices_pgr WHERE is_contracted = false
+        UNION
+        SELECT unnest(contracted_vertices) FROM expand13
+        UNION
+        SELECT unnest(contracted_vertices) FROM expand7)
+
+    SELECT id, source, target, cost, reverse_cost
+    FROM edge_table
+    WHERE source IN (SELECT * FROM vertices_in_graph)
+    AND target IN (SELECT * FROM vertices_in_graph)
+    $$,
+    7, 13, false);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    7 |    6 |    1 |        0
+   2 |        2 |    8 |    7 |    1 |        1
+   3 |        3 |    5 |   10 |    1 |        2
+   4 |        4 |   10 |   14 |    1 |        3
+   5 |        5 |   13 |   -1 |    0 |        4
+(5 rows)
+
+-- case4
+SELECT * FROM  pgr_dijkstra(
+    $$
+    WITH
+    expand_vertices AS (SELECT id, unnest(contracted_vertices) AS vertex FROM edge_table_vertices_pgr),
+    expand7 AS (SELECT contracted_vertices FROM edge_table_vertices_pgr
+        WHERE id IN (SELECT id FROM expand_vertices WHERE vertex = 7)),
+    vertices_in_graph AS (
+        SELECT id  FROM edge_table_vertices_pgr WHERE is_contracted = false
+        UNION
+        SELECT unnest(contracted_vertices) FROM expand7)
+    SELECT id, source, target, cost, reverse_cost
+    FROM edge_table
+    WHERE source IN (SELECT * FROM vertices_in_graph)
+    AND target IN (SELECT * FROM vertices_in_graph)
+    $$,
+    3, 7, false);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    3 |   19 |    2 |        0
+   2 |        2 |    5 |    7 |    1 |        2
+   3 |        3 |    8 |    6 |    1 |        3
+   4 |        4 |    7 |   -1 |    0 |        4
+(4 rows)
+
+-- case5q1
+WITH
+first_dijkstra AS (
+    SELECT * FROM  pgr_dijkstra(
+        $$
+        WITH
+        expand_vertices AS (SELECT id, unnest(contracted_vertices) AS vertex FROM edge_table_vertices_pgr),
+        expand7 AS (SELECT contracted_vertices FROM edge_table_vertices_pgr
+            WHERE id IN (SELECT id FROM expand_vertices WHERE vertex = 7)),
+        vertices_in_graph AS (
+            SELECT id  FROM edge_table_vertices_pgr WHERE is_contracted = false
+            UNION
+            SELECT unnest(contracted_vertices) FROM expand7)
+        SELECT id, source, target, cost, reverse_cost
+        FROM edge_table
+        WHERE source IN (SELECT * FROM vertices_in_graph)
+        AND target IN (SELECT * FROM vertices_in_graph)
+        $$,
+        3, 7, false))
+SELECT edge, contracted_vertices
+    FROM first_dijkstra JOIN edge_table
+    ON (edge = id)
+    WHERE is_contracted = true;
+ edge | contracted_vertices
+------+---------------------
+   19 | {1,2}
+(1 row)
+
+-- case5q2
+SELECT * FROM pgr_dijkstra($$
+    WITH
+    -- This returns the results from case 2
+    first_dijkstra AS (
+        SELECT * FROM  pgr_dijkstra(
+            '
+            WITH
+            expand_vertices AS (SELECT id, unnest(contracted_vertices) AS vertex FROM edge_table_vertices_pgr),
+            expand7 AS (SELECT contracted_vertices FROM edge_table_vertices_pgr
+                WHERE id IN (SELECT id FROM expand_vertices WHERE vertex = 7)),
+            vertices_in_graph AS (
+                SELECT id  FROM edge_table_vertices_pgr WHERE is_contracted = false
+                UNION
+                SELECT unnest(contracted_vertices) FROM expand7)
+            SELECT id, source, target, cost, reverse_cost
+            FROM edge_table
+            WHERE source IN (SELECT * FROM vertices_in_graph)
+            AND target IN (SELECT * FROM vertices_in_graph)
+            ',
+            3, 7, false)),
+
+    -- edges that need expansion and the vertices to be expanded.
+    edges_to_expand AS (
+        SELECT edge, contracted_vertices
+        FROM first_dijkstra JOIN edge_table
+        ON (edge = id)
+        WHERE is_contracted = true),
+
+    vertices_in_graph AS (
+        -- the nodes of the contracted solution
+        SELECT node FROM first_dijkstra
+        UNION
+        -- the nodes of the expanding sections
+        SELECT unnest(contracted_vertices) FROM edges_to_expand)
+
+    SELECT id, source, target, cost, reverse_cost
+    FROM edge_table
+    WHERE source IN (SELECT * FROM vertices_in_graph)
+    AND target IN (SELECT * FROM vertices_in_graph)
+    -- not including the expanded edges
+    AND id NOT IN (SELECT edge FROM edges_to_expand)
+    $$,
+    3, 7, false);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    3 |    2 |    1 |        0
+   2 |        2 |    2 |    4 |    1 |        1
+   3 |        3 |    5 |    7 |    1 |        2
+   4 |        4 |    8 |    6 |    1 |        3
+   5 |        5 |    7 |   -1 |    0 |        4
+(5 rows)
+
+-- end
+ROLLBACK;
+ROLLBACK
diff --git a/test/contraction/doc-contraction.test.sql b/test/contraction/doc-contraction.test.sql
new file mode 100644
index 0000000..a77701e
--- /dev/null
+++ b/test/contraction/doc-contraction.test.sql
@@ -0,0 +1,212 @@
+\echo -- q00
+\echo -- q01
+
+SET client_min_messages TO ERROR;
+\echo -- q1
+ALTER TABLE edge_table ADD contracted_vertices BIGINT[];
+ALTER TABLE edge_table_vertices_pgr ADD contracted_vertices BIGINT[];
+ALTER TABLE edge_table ADD is_contracted BOOLEAN DEFAULT false;
+ALTER TABLE edge_table_vertices_pgr ADD is_contracted BOOLEAN DEFAULT false;
+
+SET client_min_messages TO NOTICE;
+\echo -- q2
+-- showing original results
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    array[1,2], directed:=true);
+
+\echo -- q3
+SELECT * INTO contraction_results
+FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    array[1,2], directed:=true);
+
+\echo -- q4
+UPDATE edge_table_vertices_pgr
+SET is_contracted = true
+WHERE id IN (SELECT  unnest(contracted_vertices) FROM  contraction_results);
+
+\echo -- q5
+SELECT id, is_contracted
+FROM edge_table_vertices_pgr
+ORDER BY id;
+
+\echo -- q6
+UPDATE edge_table_vertices_pgr
+SET contracted_vertices = contraction_results.contracted_vertices
+FROM contraction_results
+WHERE type = 'v' AND edge_table_vertices_pgr.id = contraction_results.id;
+
+\echo -- q7
+SELECT id, contracted_vertices, is_contracted
+FROM edge_table_vertices_pgr
+ORDER BY id;
+
+\echo -- q8
+INSERT INTO edge_table(source, target, cost, reverse_cost, contracted_vertices, is_contracted)
+SELECT source, target, cost, -1, contracted_vertices, true
+FROM contraction_results
+WHERE type = 'e';
+
+\echo -- q9
+SELECT id, source, target, cost, reverse_cost, contracted_vertices, is_contracted
+FROM edge_table
+ORDER BY id;
+
+\echo -- q10
+SELECT id  FROM edge_table_vertices_pgr
+WHERE is_contracted = false
+ORDER BY id;
+
+\echo -- case1
+SELECT * FROM pgr_dijkstra(
+    $$
+    WITH
+    vertices_in_graph AS (
+        SELECT id  FROM edge_table_vertices_pgr WHERE is_contracted = false)
+    SELECT id, source, target, cost, reverse_cost
+    FROM edge_table
+    WHERE source IN (SELECT * FROM vertices_in_graph)
+    AND target IN (SELECT * FROM vertices_in_graph)
+    $$,
+    3, 11, false);
+
+
+\echo -- case2
+SELECT * FROM pgr_dijkstra(
+    $$
+    WITH
+    expand_edges AS (SELECT id, unnest(contracted_vertices) AS vertex FROM edge_table),
+    expand1 AS (SELECT contracted_vertices FROM edge_table
+        WHERE id IN (SELECT id FROM expand_edges WHERE vertex = 1)),
+    vertices_in_graph AS (
+        SELECT id  FROM edge_table_vertices_pgr WHERE is_contracted = false
+        UNION
+        SELECT unnest(contracted_vertices) FROM expand1)
+    SELECT id, source, target, cost, reverse_cost
+    FROM edge_table
+    WHERE source IN (SELECT * FROM vertices_in_graph)
+    AND target IN (SELECT * FROM vertices_in_graph)
+    $$,
+    3, 1, false);
+
+\echo -- case3
+SELECT * FROM pgr_dijkstra(
+    $$
+    WITH
+
+    expand_vertices AS (SELECT id, unnest(contracted_vertices) AS vertex FROM edge_table_vertices_pgr),
+    expand7 AS (SELECT contracted_vertices FROM edge_table_vertices_pgr
+        WHERE id IN (SELECT id FROM expand_vertices WHERE vertex = 7)),
+
+    expand_edges AS (SELECT id, unnest(contracted_vertices) AS vertex FROM edge_table),
+    expand13 AS (SELECT contracted_vertices FROM edge_table
+        WHERE id IN (SELECT id FROM expand_edges WHERE vertex = 13)),
+
+    vertices_in_graph AS (
+        SELECT id  FROM edge_table_vertices_pgr WHERE is_contracted = false
+        UNION
+        SELECT unnest(contracted_vertices) FROM expand13
+        UNION
+        SELECT unnest(contracted_vertices) FROM expand7)
+
+    SELECT id, source, target, cost, reverse_cost
+    FROM edge_table
+    WHERE source IN (SELECT * FROM vertices_in_graph)
+    AND target IN (SELECT * FROM vertices_in_graph)
+    $$,
+    7, 13, false);
+
+\echo -- case4
+
+SELECT * FROM  pgr_dijkstra(
+    $$
+    WITH
+    expand_vertices AS (SELECT id, unnest(contracted_vertices) AS vertex FROM edge_table_vertices_pgr),
+    expand7 AS (SELECT contracted_vertices FROM edge_table_vertices_pgr
+        WHERE id IN (SELECT id FROM expand_vertices WHERE vertex = 7)),
+    vertices_in_graph AS (
+        SELECT id  FROM edge_table_vertices_pgr WHERE is_contracted = false
+        UNION
+        SELECT unnest(contracted_vertices) FROM expand7)
+    SELECT id, source, target, cost, reverse_cost
+    FROM edge_table
+    WHERE source IN (SELECT * FROM vertices_in_graph)
+    AND target IN (SELECT * FROM vertices_in_graph)
+    $$,
+    3, 7, false);
+
+
+\echo -- case5q1
+-- Edges that need expansion and the vertices to be expanded.
+WITH
+first_dijkstra AS (
+    SELECT * FROM  pgr_dijkstra(
+        $$
+        WITH
+        expand_vertices AS (SELECT id, unnest(contracted_vertices) AS vertex FROM edge_table_vertices_pgr),
+        expand7 AS (SELECT contracted_vertices FROM edge_table_vertices_pgr
+            WHERE id IN (SELECT id FROM expand_vertices WHERE vertex = 7)),
+        vertices_in_graph AS (
+            SELECT id  FROM edge_table_vertices_pgr WHERE is_contracted = false
+            UNION
+            SELECT unnest(contracted_vertices) FROM expand7)
+        SELECT id, source, target, cost, reverse_cost
+        FROM edge_table
+        WHERE source IN (SELECT * FROM vertices_in_graph)
+        AND target IN (SELECT * FROM vertices_in_graph)
+        $$,
+        3, 7, false))
+
+SELECT edge, contracted_vertices
+    FROM first_dijkstra JOIN edge_table
+    ON (edge = id)
+    WHERE is_contracted = true;
+
+\echo -- case5q2
+
+SELECT * FROM pgr_dijkstra($$
+    WITH
+    -- This returns the results from case 2
+    first_dijkstra AS (
+        SELECT * FROM  pgr_dijkstra(
+            '
+            WITH
+            expand_vertices AS (SELECT id, unnest(contracted_vertices) AS vertex FROM edge_table_vertices_pgr),
+            expand7 AS (SELECT contracted_vertices FROM edge_table_vertices_pgr
+                WHERE id IN (SELECT id FROM expand_vertices WHERE vertex = 7)),
+            vertices_in_graph AS (
+                SELECT id  FROM edge_table_vertices_pgr WHERE is_contracted = false
+                UNION
+                SELECT unnest(contracted_vertices) FROM expand7)
+            SELECT id, source, target, cost, reverse_cost
+            FROM edge_table
+            WHERE source IN (SELECT * FROM vertices_in_graph)
+            AND target IN (SELECT * FROM vertices_in_graph)
+            ',
+            3, 7, false)),
+
+    -- edges that need expansion and the vertices to be expanded.
+    edges_to_expand AS (
+        SELECT edge, contracted_vertices
+        FROM first_dijkstra JOIN edge_table
+        ON (edge = id)
+        WHERE is_contracted = true),
+
+    vertices_in_graph AS (
+        -- the nodes of the contracted solution
+        SELECT node FROM first_dijkstra
+        UNION
+        -- the nodes of the expanding sections
+        SELECT unnest(contracted_vertices) FROM edges_to_expand)
+
+    SELECT id, source, target, cost, reverse_cost
+    FROM edge_table
+    WHERE source IN (SELECT * FROM vertices_in_graph)
+    AND target IN (SELECT * FROM vertices_in_graph)
+    -- not including the expanded edges
+    AND id NOT IN (SELECT edge FROM edges_to_expand)
+    $$,
+    3, 7, false);
+
+\echo -- end
diff --git a/test/contraction/expand_graph.result b/test/contraction/expand_graph.result
new file mode 100644
index 0000000..c5b3c58
--- /dev/null
+++ b/test/contraction/expand_graph.result
@@ -0,0 +1,242 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+step 1: Initial edge table
+SELECT id, source, target, cost, reverse_cost FROM edge_table;
+ id | source | target | cost | reverse_cost
+----+--------+--------+------+--------------
+  1 |      1 |      2 |    1 |            1
+  2 |      2 |      3 |   -1 |            1
+  3 |      3 |      4 |   -1 |            1
+  4 |      2 |      5 |    1 |            1
+  5 |      3 |      6 |    1 |           -1
+  6 |      7 |      8 |    1 |            1
+  7 |      8 |      5 |    1 |            1
+  8 |      5 |      6 |    1 |            1
+  9 |      6 |      9 |    1 |            1
+ 10 |      5 |     10 |    1 |            1
+ 11 |      6 |     11 |    1 |           -1
+ 12 |     10 |     11 |    1 |           -1
+ 13 |     11 |     12 |    1 |           -1
+ 14 |     10 |     13 |    1 |            1
+ 15 |      9 |     12 |    1 |            1
+ 16 |      4 |      9 |    1 |            1
+ 17 |     14 |     15 |    1 |            1
+ 18 |     16 |     17 |    1 |            1
+(18 rows)
+
+step 2: Initial vertex table
+SELECT id FROM edge_table_vertices_pgr;
+ id
+----
+  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+(17 rows)
+
+step 3: Adding is_contracted column to edge_table......
+ALTER TABLE edge_table ADD is_contracted BOOLEAN DEFAULT false;
+ALTER TABLE
+step 4: Adding contracted_vertices column to edge_table.....
+ALTER TABLE edge_table ADD contracted_vertices integer[];
+ALTER TABLE
+step 5: Adding is_contracted column to edge_table......
+ALTER TABLE edge_table_vertices_pgr ADD is_contracted BOOLEAN DEFAULT false;
+ALTER TABLE
+step 6: Adding contracted_vertices column to edge_table.....
+ALTER TABLE edge_table_vertices_pgr ADD contracted_vertices integer[];
+ALTER TABLE
+step 7: Edge table after adding columns
+SELECT id, source, target, cost, reverse_cost, is_contracted, contracted_vertices FROM edge_table;
+ id | source | target | cost | reverse_cost | is_contracted | contracted_vertices
+----+--------+--------+------+--------------+---------------+---------------------
+  1 |      1 |      2 |    1 |            1 | f             |
+  2 |      2 |      3 |   -1 |            1 | f             |
+  3 |      3 |      4 |   -1 |            1 | f             |
+  4 |      2 |      5 |    1 |            1 | f             |
+  5 |      3 |      6 |    1 |           -1 | f             |
+  6 |      7 |      8 |    1 |            1 | f             |
+  7 |      8 |      5 |    1 |            1 | f             |
+  8 |      5 |      6 |    1 |            1 | f             |
+  9 |      6 |      9 |    1 |            1 | f             |
+ 10 |      5 |     10 |    1 |            1 | f             |
+ 11 |      6 |     11 |    1 |           -1 | f             |
+ 12 |     10 |     11 |    1 |           -1 | f             |
+ 13 |     11 |     12 |    1 |           -1 | f             |
+ 14 |     10 |     13 |    1 |            1 | f             |
+ 15 |      9 |     12 |    1 |            1 | f             |
+ 16 |      4 |      9 |    1 |            1 | f             |
+ 17 |     14 |     15 |    1 |            1 | f             |
+ 18 |     16 |     17 |    1 |            1 | f             |
+(18 rows)
+
+step 8: Vertex table after adding columns
+SELECT id, is_contracted, contracted_vertices FROM edge_table_vertices_pgr;
+ id | is_contracted | contracted_vertices
+----+---------------+---------------------
+  1 | f             |
+  2 | f             |
+  3 | f             |
+  4 | f             |
+  5 | f             |
+  6 | f             |
+  7 | f             |
+  8 | f             |
+  9 | f             |
+ 10 | f             |
+ 11 | f             |
+ 12 | f             |
+ 13 | f             |
+ 14 | f             |
+ 15 | f             |
+ 16 | f             |
+ 17 | f             |
+(17 rows)
+
+CREATE OR REPLACE FUNCTION pgr_update_contraction_columns(
+	edge_table text,
+	forbidden_vertices BIGINT[],
+	contraction_order integer[],
+	max_cycles integer,
+	directed BOOLEAN
+)
+RETURNS integer AS $total$
+declare
+total integer;
+contracted_vertex integer;
+query text;
+update_query text;
+split_query text;
+insert_query text;
+row record;
+split_row record;
+BEGIN
+total := 0;
+query := 'SELECT * FROM pgr_contractGraph('|| quote_literal(edge_table)||', ' || quote_literal(forbidden_vertices)||', ' || quote_literal(contraction_order)||', ' || quote_literal(max_cycles)||', ' || quote_literal(directed) || ')';
+    FOR row IN EXECUTE(query)
+    LOOP
+
+        -- contracted_vertices_array := row.contracted_vertices;
+        -- If it is a vertex we update the two columns of the vertex table
+        IF row.type = 'v' THEN
+            total := total + 1;
+            -- raise notice 'vertex';
+            update_query := 'UPDATE edge_table_vertices_pgr SET contracted_vertices = array_append(contracted_vertices, ';
+            FOREACH contracted_vertex IN ARRAY row.contracted_vertices
+            LOOP
+                EXECUTE update_query || quote_literal(contracted_vertex)
+                || ') WHERE id = ' || quote_literal(row.id);
+                EXECUTE 'UPDATE edge_table_vertices_pgr SET is_contracted = true WHERE id = '
+                || quote_literal(contracted_vertex);
+                -- raise notice 'cv: %', contracted_vertex;
+            END LOOP;
+        -- If it is an edge we insert a new entry to the edge table
+        ELSEIF row.type = 'e' THEN
+            total := total + 1;
+            -- raise notice 'edge';
+            insert_query := 'INSERT INTO edge_table(id, source, target, cost, reverse_cost, is_contracted, contracted_vertices) VALUES ('
+            || quote_literal(row.id)|| ', '
+            || quote_literal(row.source)|| ', '
+            || quote_literal(row.target)|| ', '
+            || quote_literal(row.cost)|| ', '
+            || quote_literal(-1)|| ', '
+            || quote_literal(true)|| ', '
+            || quote_literal(row.contracted_vertices)
+            || ')';
+            EXECUTE insert_query;
+            FOREACH contracted_vertex IN ARRAY row.contracted_vertices
+            LOOP
+            EXECUTE 'UPDATE edge_table_vertices_pgr SET is_contracted = true WHERE id = '
+                || quote_literal(contracted_vertex);
+            END LOOP;
+        END IF;
+        -- raise notice 'id: %, type: %, cv: %',row.id, row.type, row.contracted_vertices;
+    END LOOP;
+
+   RETURN total;
+   END;
+   $total$ LANGUAGE plpgsql;
+CREATE FUNCTION
+CREATE OR REPLACE FUNCTION pgr_expand_contracted_graph(
+    original_edge_table text,
+    original_vertex_table text,
+    contracted_edge_table text,
+    contracted_vertex_table text
+)
+RETURNS integer AS $total$
+declare
+total integer;
+contracted_vertex integer;
+query text;
+row record;
+BEGIN
+    total := 0;
+    query := 'SELECT * FROM '
+    || quote_ident(contracted_edge_table)
+    ||' WHERE id < 0 ';
+    FOR row IN EXECUTE(query)
+    LOOP
+        -- Inserting the contracted vertices into the vertex table
+        FOREACH contracted_vertex IN ARRAY row.contracted_vertices
+        LOOP
+            EXECUTE 'INSERT INTO ' || quote_ident(contracted_vertex_table) || '(id, is_contracted)' ||' VALUES ('
+            || quote_literal(contracted_vertex) || ', false);';
+        END LOOP;
+        -- Adding the edges(id < 0) between these vertices to the edge table
+        EXECUTE 'INSERT INTO '
+        || quote_ident(contracted_edge_table)
+        || ' SELECT * FROM ' || quote_ident(original_edge_table)
+        || ' WHERE source = ANY(' || quote_literal(row.contracted_vertices) || ')'
+        || ' OR target = ANY(' || quote_literal(row.contracted_vertices) || ')'
+        || ' AND id > 0';
+
+    END LOOP;
+
+    -- Removing all those edges with id < 0
+    EXECUTE 'DELETE FROM '
+    || quote_ident(contracted_edge_table)
+    || ' WHERE id < 0';
+
+    query := 'SELECT * FROM '|| quote_ident(contracted_vertex_table)||' WHERE array_length(contracted_vertices, 1) > 0';
+    FOR row IN EXECUTE(query)
+    LOOP
+        -- Inserting the contracted vertices into the vertex table
+        FOREACH contracted_vertex IN ARRAY row.contracted_vertices
+        LOOP
+            EXECUTE 'INSERT INTO ' || quote_ident(contracted_vertex_table) || '(id, is_contracted)' ||' VALUES ('
+            || quote_literal(contracted_vertex) || ', false);';
+        END LOOP;
+        -- Adding the edges(id < 0) between these vertices to the edge table
+        EXECUTE 'INSERT INTO '
+        || quote_ident(contracted_edge_table)
+        || ' SELECT * FROM ' || quote_ident(original_edge_table)
+        || ' WHERE source = ANY(' || quote_literal(row.contracted_vertices) || ')'
+        || ' OR target = ANY(' || quote_literal(row.contracted_vertices) || ')'
+        || ' AND id > 0';
+    EXECUTE 'UPDATE '
+    || quote_ident(contracted_vertex_table)
+    || ' SET contracted_vertices = NULL'
+    || ' WHERE array_length(contracted_vertices, 1) > 0 ';
+    END LOOP;
+
+RETURN total;
+END;
+   $total$ LANGUAGE plpgsql;
+CREATE FUNCTION
+ROLLBACK;
+ROLLBACK
diff --git a/test/contraction/expand_graph.test.sql b/test/contraction/expand_graph.test.sql
new file mode 100644
index 0000000..b8deaae
--- /dev/null
+++ b/test/contraction/expand_graph.test.sql
@@ -0,0 +1,169 @@
+
+\echo 'step 1: Initial edge table'
+
+SELECT id, source, target, cost, reverse_cost FROM edge_table;
+
+\echo 'step 2: Initial vertex table'
+
+SELECT id FROM edge_table_vertices_pgr;
+
+
+-- add extra columns to the edges and vertices table
+\echo 'step 3: Adding is_contracted column to edge_table......'
+
+ALTER TABLE edge_table ADD is_contracted BOOLEAN DEFAULT false;
+
+\echo 'step 4: Adding contracted_vertices column to edge_table.....'
+
+ALTER TABLE edge_table ADD contracted_vertices integer[];
+
+\echo 'step 5: Adding is_contracted column to edge_table......'
+
+ALTER TABLE edge_table_vertices_pgr ADD is_contracted BOOLEAN DEFAULT false;
+
+\echo 'step 6: Adding contracted_vertices column to edge_table.....'
+
+ALTER TABLE edge_table_vertices_pgr ADD contracted_vertices integer[];
+
+\echo 'step 7: Edge table after adding columns'
+
+SELECT id, source, target, cost, reverse_cost, is_contracted, contracted_vertices FROM edge_table;
+
+\echo 'step 8: Vertex table after adding columns'
+
+SELECT id, is_contracted, contracted_vertices FROM edge_table_vertices_pgr;
+
+
+-- update the added columns to the above tables
+-- based on the results of contraction query
+CREATE OR REPLACE FUNCTION pgr_update_contraction_columns(
+	edge_table text,
+	forbidden_vertices BIGINT[],
+	contraction_order integer[],
+	max_cycles integer,
+	directed BOOLEAN
+)
+RETURNS integer AS $total$
+declare
+total integer;
+contracted_vertex integer;
+query text;
+update_query text;
+split_query text;
+insert_query text;
+row record;
+split_row record;
+BEGIN
+total := 0;
+query := 'SELECT * FROM pgr_contractGraph('|| quote_literal(edge_table)||', ' || quote_literal(forbidden_vertices)||', ' || quote_literal(contraction_order)||', ' || quote_literal(max_cycles)||', ' || quote_literal(directed) || ')';
+    FOR row IN EXECUTE(query)
+    LOOP
+
+        -- contracted_vertices_array := row.contracted_vertices;
+        -- If it is a vertex we update the two columns of the vertex table
+        IF row.type = 'v' THEN
+            total := total + 1;
+            -- raise notice 'vertex';
+            update_query := 'UPDATE edge_table_vertices_pgr SET contracted_vertices = array_append(contracted_vertices, ';
+            FOREACH contracted_vertex IN ARRAY row.contracted_vertices
+            LOOP
+                EXECUTE update_query || quote_literal(contracted_vertex)
+                || ') WHERE id = ' || quote_literal(row.id);
+                EXECUTE 'UPDATE edge_table_vertices_pgr SET is_contracted = true WHERE id = '
+                || quote_literal(contracted_vertex);
+                -- raise notice 'cv: %', contracted_vertex;
+            END LOOP;
+        -- If it is an edge we insert a new entry to the edge table
+        ELSEIF row.type = 'e' THEN
+            total := total + 1;
+            -- raise notice 'edge';
+            insert_query := 'INSERT INTO edge_table(id, source, target, cost, reverse_cost, is_contracted, contracted_vertices) VALUES ('
+            || quote_literal(row.id)|| ', '
+            || quote_literal(row.source)|| ', '
+            || quote_literal(row.target)|| ', '
+            || quote_literal(row.cost)|| ', '
+            || quote_literal(-1)|| ', '
+            || quote_literal(true)|| ', '
+            || quote_literal(row.contracted_vertices)
+            || ')';
+            EXECUTE insert_query;
+            FOREACH contracted_vertex IN ARRAY row.contracted_vertices
+            LOOP
+            EXECUTE 'UPDATE edge_table_vertices_pgr SET is_contracted = true WHERE id = '
+                || quote_literal(contracted_vertex);
+            END LOOP;
+        END IF;
+        -- raise notice 'id: %, type: %, cv: %',row.id, row.type, row.contracted_vertices;
+    END LOOP;
+
+   RETURN total;
+   END;
+   $total$ LANGUAGE plpgsql;
+
+CREATE OR REPLACE FUNCTION pgr_expand_contracted_graph(
+    original_edge_table text,
+    original_vertex_table text,
+    contracted_edge_table text,
+    contracted_vertex_table text
+)
+RETURNS integer AS $total$
+declare
+total integer;
+contracted_vertex integer;
+query text;
+row record;
+BEGIN
+    total := 0;
+    query := 'SELECT * FROM '
+    || quote_ident(contracted_edge_table)
+    ||' WHERE id < 0 ';
+    FOR row IN EXECUTE(query)
+    LOOP
+        -- Inserting the contracted vertices into the vertex table
+        FOREACH contracted_vertex IN ARRAY row.contracted_vertices
+        LOOP
+            EXECUTE 'INSERT INTO ' || quote_ident(contracted_vertex_table) || '(id, is_contracted)' ||' VALUES ('
+            || quote_literal(contracted_vertex) || ', false);';
+        END LOOP;
+        -- Adding the edges(id < 0) between these vertices to the edge table
+        EXECUTE 'INSERT INTO '
+        || quote_ident(contracted_edge_table)
+        || ' SELECT * FROM ' || quote_ident(original_edge_table)
+        || ' WHERE source = ANY(' || quote_literal(row.contracted_vertices) || ')'
+        || ' OR target = ANY(' || quote_literal(row.contracted_vertices) || ')'
+        || ' AND id > 0';
+
+    END LOOP;
+
+    -- Removing all those edges with id < 0
+    EXECUTE 'DELETE FROM '
+    || quote_ident(contracted_edge_table)
+    || ' WHERE id < 0';
+
+    query := 'SELECT * FROM '|| quote_ident(contracted_vertex_table)||' WHERE array_length(contracted_vertices, 1) > 0';
+    FOR row IN EXECUTE(query)
+    LOOP
+        -- Inserting the contracted vertices into the vertex table
+        FOREACH contracted_vertex IN ARRAY row.contracted_vertices
+        LOOP
+            EXECUTE 'INSERT INTO ' || quote_ident(contracted_vertex_table) || '(id, is_contracted)' ||' VALUES ('
+            || quote_literal(contracted_vertex) || ', false);';
+        END LOOP;
+        -- Adding the edges(id < 0) between these vertices to the edge table
+        EXECUTE 'INSERT INTO '
+        || quote_ident(contracted_edge_table)
+        || ' SELECT * FROM ' || quote_ident(original_edge_table)
+        || ' WHERE source = ANY(' || quote_literal(row.contracted_vertices) || ')'
+        || ' OR target = ANY(' || quote_literal(row.contracted_vertices) || ')'
+        || ' AND id > 0';
+    EXECUTE 'UPDATE '
+    || quote_ident(contracted_vertex_table)
+    || ' SET contracted_vertices = NULL'
+    || ' WHERE array_length(contracted_vertices, 1) > 0 ';
+    END LOOP;
+
+RETURN total;
+END;
+   $total$ LANGUAGE plpgsql;
+
+
diff --git a/test/contraction/expand_graph_without_function.result b/test/contraction/expand_graph_without_function.result
new file mode 100644
index 0000000..db6371f
--- /dev/null
+++ b/test/contraction/expand_graph_without_function.result
@@ -0,0 +1,152 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+SELECT 'step 1: Initial edge table';
+          ?column?
+----------------------------
+ step 1: Initial edge table
+(1 row)
+
+SELECT id, source, target, cost, reverse_cost FROM edge_table;
+ id | source | target | cost | reverse_cost
+----+--------+--------+------+--------------
+  1 |      1 |      2 |    1 |            1
+  2 |      2 |      3 |   -1 |            1
+  3 |      3 |      4 |   -1 |            1
+  4 |      2 |      5 |    1 |            1
+  5 |      3 |      6 |    1 |           -1
+  6 |      7 |      8 |    1 |            1
+  7 |      8 |      5 |    1 |            1
+  8 |      5 |      6 |    1 |            1
+  9 |      6 |      9 |    1 |            1
+ 10 |      5 |     10 |    1 |            1
+ 11 |      6 |     11 |    1 |           -1
+ 12 |     10 |     11 |    1 |           -1
+ 13 |     11 |     12 |    1 |           -1
+ 14 |     10 |     13 |    1 |            1
+ 15 |      9 |     12 |    1 |            1
+ 16 |      4 |      9 |    1 |            1
+ 17 |     14 |     15 |    1 |            1
+ 18 |     16 |     17 |    1 |            1
+(18 rows)
+
+SELECT 'step 2: Initial vertex table';
+           ?column?
+------------------------------
+ step 2: Initial vertex table
+(1 row)
+
+SELECT id FROM edge_table_vertices_pgr;
+ id
+----
+  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+(17 rows)
+
+SELECT 'step 3: Adding is_contracted column to edge_table......';
+                        ?column?
+---------------------------------------------------------
+ step 3: Adding is_contracted column to edge_table......
+(1 row)
+
+ALTER TABLE edge_table ADD is_contracted BOOLEAN DEFAULT false;
+ALTER TABLE
+SELECT 'step 4: Adding contracted_vertices column to edge_table.....';
+                           ?column?
+--------------------------------------------------------------
+ step 4: Adding contracted_vertices column to edge_table.....
+(1 row)
+
+ALTER TABLE edge_table ADD contracted_vertices integer[];
+ALTER TABLE
+SELECT 'step 5: Adding is_contracted column to edge_table......';
+                        ?column?
+---------------------------------------------------------
+ step 5: Adding is_contracted column to edge_table......
+(1 row)
+
+ALTER TABLE edge_table_vertices_pgr ADD is_contracted BOOLEAN DEFAULT false;
+ALTER TABLE
+SELECT 'step 6: Adding contracted_vertices column to edge_table.....';
+                           ?column?
+--------------------------------------------------------------
+ step 6: Adding contracted_vertices column to edge_table.....
+(1 row)
+
+ALTER TABLE edge_table_vertices_pgr ADD contracted_vertices integer[];
+ALTER TABLE
+SELECT 'step 7: Edge table after adding columns';
+                ?column?
+-----------------------------------------
+ step 7: Edge table after adding columns
+(1 row)
+
+SELECT id, source, target, cost, reverse_cost, is_contracted, contracted_vertices FROM edge_table;
+ id | source | target | cost | reverse_cost | is_contracted | contracted_vertices
+----+--------+--------+------+--------------+---------------+---------------------
+  1 |      1 |      2 |    1 |            1 | f             |
+  2 |      2 |      3 |   -1 |            1 | f             |
+  3 |      3 |      4 |   -1 |            1 | f             |
+  4 |      2 |      5 |    1 |            1 | f             |
+  5 |      3 |      6 |    1 |           -1 | f             |
+  6 |      7 |      8 |    1 |            1 | f             |
+  7 |      8 |      5 |    1 |            1 | f             |
+  8 |      5 |      6 |    1 |            1 | f             |
+  9 |      6 |      9 |    1 |            1 | f             |
+ 10 |      5 |     10 |    1 |            1 | f             |
+ 11 |      6 |     11 |    1 |           -1 | f             |
+ 12 |     10 |     11 |    1 |           -1 | f             |
+ 13 |     11 |     12 |    1 |           -1 | f             |
+ 14 |     10 |     13 |    1 |            1 | f             |
+ 15 |      9 |     12 |    1 |            1 | f             |
+ 16 |      4 |      9 |    1 |            1 | f             |
+ 17 |     14 |     15 |    1 |            1 | f             |
+ 18 |     16 |     17 |    1 |            1 | f             |
+(18 rows)
+
+SELECT 'step 8: Vertex table after adding columns';
+                 ?column?
+-------------------------------------------
+ step 8: Vertex table after adding columns
+(1 row)
+
+SELECT id, is_contracted, contracted_vertices FROM edge_table_vertices_pgr;
+ id | is_contracted | contracted_vertices
+----+---------------+---------------------
+  1 | f             |
+  2 | f             |
+  3 | f             |
+  4 | f             |
+  5 | f             |
+  6 | f             |
+  7 | f             |
+  8 | f             |
+  9 | f             |
+ 10 | f             |
+ 11 | f             |
+ 12 | f             |
+ 13 | f             |
+ 14 | f             |
+ 15 | f             |
+ 16 | f             |
+ 17 | f             |
+(17 rows)
+
+ROLLBACK;
+ROLLBACK
diff --git a/src/contraction/test/expand_graph_without_function.test.sql b/test/contraction/expand_graph_without_function.test.sql
similarity index 100%
rename from src/contraction/test/expand_graph_without_function.test.sql
rename to test/contraction/expand_graph_without_function.test.sql
diff --git a/test/contraction/proof_of_concept.result b/test/contraction/proof_of_concept.result
new file mode 100644
index 0000000..51709dd
--- /dev/null
+++ b/test/contraction/proof_of_concept.result
@@ -0,0 +1,137 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+Adding an additional column to store if its part of the contracted graph
+ALTER TABLE edge_table ADD is_contracted BOOLEAN DEFAULT false;
+ALTER TABLE
+Adding a new edge joining vertices 3 and 5 with cost=2 to the edge table
+INSERT INTO edge_table(id, source, target, cost, reverse_cost, is_contracted)
+VALUES (19, 3, 5, 2, 2, true);
+INSERT 0 1
+Adding a new edge joining vertices 3 and 9 with cost=2 to the edge table
+INSERT INTO edge_table(id, source, target, cost, reverse_cost, is_contracted)
+VALUES (20, 3, 9, 2, 2, true);
+INSERT 0 1
+Adding a new edge joining vertices 5 and 11 with cost=2 to the edge table
+INSERT INTO edge_table(id, source, target, cost, reverse_cost, is_contracted)
+VALUES (21, 5, 11, 2, 2, true);
+INSERT 0 1
+Adding a new edge joining vertices 9 and 11 with cost=2 to the edge table
+INSERT INTO edge_table(id, source, target, cost, reverse_cost, is_contracted)
+VALUES (22, 9, 11, 2, 2, true);
+INSERT 0 1
+Case 1: Both source and target belong to the contracted graph.
+We are going to route from 3 to 11
+Since 3 and 11 both are in the contracted graph we need not add any vertices.
+SELECT * FROM
+pgr_dijkstra($$
+    SELECT id, source, target, cost, reverse_cost
+    FROM edge_table
+    WHERE source IN (3, 5, 6, 9, 11, 15, 17)
+        AND target IN (3, 5, 6, 9, 11, 15, 17)$$,
+    3, 11, false);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    3 |    5 |    1 |        0
+   2 |        2 |    6 |   11 |    1 |        1
+   3 |        3 |   11 |   -1 |    0 |        2
+(3 rows)
+
+Case 2: source belongs to a contracted graph, while target belongs to a vertex subgraph.
+We are going to route from 3 to 7
+Since 7 is in the contracted subgraph of vertex 5 we add {7, 8} to the vertex set, so the vertex set becomes (3, 5, 6, 7, 8, 9, 11, 15, 17)
+SELECT * FROM pgr_dijkstra($$
+    SELECT id, source, target, cost, reverse_cost
+    FROM edge_table
+    WHERE source IN (3, 5, 6, 9, 11, 15, 17,   7, 8)
+        AND target IN (3, 5, 6, 9, 11, 15, 17,   7, 8)$$,
+    3, 7, false);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    3 |   19 |    2 |        0
+   2 |        2 |    5 |    7 |    1 |        2
+   3 |        3 |    8 |    6 |    1 |        3
+   4 |        4 |    7 |   -1 |    0 |        4
+(4 rows)
+
+Case 3: source belongs to a contracted graph, while target belongs to a edge subgraph.
+We are going to route from 3 to 13
+Since 13 is in the contracted subgraph of edge (5, 11) we add {10, 13} to the vertex set, so the vertex set becomes (3, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17)
+SELECT * FROM pgr_dijkstra($$
+    SELECT id, source, target, cost, reverse_cost
+    FROM edge_table
+    WHERE source IN (3, 5, 6, 9, 11, 15, 17,    10, 13)
+        AND target IN (3, 5, 6, 9, 11, 15, 17,    10, 13)$$,
+    3, 13, false);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    3 |    5 |    1 |        0
+   2 |        2 |    6 |   11 |    1 |        1
+   3 |        3 |   11 |   12 |    1 |        2
+   4 |        4 |   10 |   14 |    1 |        3
+   5 |        5 |   13 |   -1 |    0 |        4
+(5 rows)
+
+Case 4: source belongs to a vertex subgraph, while target belongs to a edge subgraph.
+We are going to route from 7 to 13
+Since 13 is in the contracted subgraph of edge (5, 11) we add {10, 13} to the vertex set, and since 7 is in the contracted subgraph of vertex 5 we add {7, 8} to the vertex sets (3, 5, 6, 7, 8, 9, 11, 15, 17)
+SELECT * FROM pgr_dijkstra($$
+    SELECT id, source, target, cost, reverse_cost
+    FROM edge_table
+    WHERE source IN (3, 5, 6, 9, 11, 15, 17,    7, 8,   10, 13)
+        AND target IN (3, 5, 6, 9, 11, 15, 17,   7, 8,   10, 13)$$,
+    7, 13, false);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    7 |    6 |    1 |        0
+   2 |        2 |    8 |    7 |    1 |        1
+   3 |        3 |    5 |   10 |    1 |        2
+   4 |        4 |   10 |   14 |    1 |        3
+   5 |        5 |   13 |   -1 |    0 |        4
+(5 rows)
+
+Case 5: The path contains a shortcut.
+We are going to route from 3 to 9
+Since 3 and 9 both are in the contracted graph we need not add any vertices.
+SELECT * FROM pgr_dijkstra($$
+    SELECT id, source, target, cost, reverse_cost
+    FROM edge_table
+    WHERE source IN (3, 5, 6, 7, 8, 9, 11, 15, 17)
+        AND target IN (3, 5, 6, 7, 8, 9, 11, 15, 17)$$,
+    3, 9, false);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    3 |   20 |    2 |        0
+   2 |        2 |    9 |   -1 |    0 |        2
+(2 rows)
+
+SELECT id, source, target, cost, reverse_cost, is_contracted
+FROM edge_table
+WHERE is_contracted = true
+ORDER BY id;
+ id | source | target | cost | reverse_cost | is_contracted
+----+--------+--------+------+--------------+---------------
+ 19 |      3 |      5 |    2 |            2 | t
+ 20 |      3 |      9 |    2 |            2 | t
+ 21 |      5 |     11 |    2 |            2 | t
+ 22 |      9 |     11 |    2 |            2 | t
+(4 rows)
+
+This implies that it is a shortcut and should be expanded
+SELECT * FROM pgr_dijkstra($$
+    SELECT id, source, target, cost, reverse_cost
+    FROM edge_table
+    WHERE source IN (3, 5, 6, 7, 8, 9, 11, 15, 17)
+        AND target IN (3, 5, 6, 7, 8, 9, 11, 15, 17)
+        AND is_contracted=false$$,
+    3, 9, false);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    3 |    5 |    1 |        0
+   2 |        2 |    6 |    9 |    1 |        1
+   3 |        3 |    9 |   -1 |    0 |        2
+(3 rows)
+
+ROLLBACK;
+ROLLBACK
diff --git a/src/contraction/test/proof_of_concept.test.sql b/test/contraction/proof_of_concept.test.sql
similarity index 100%
rename from src/contraction/test/proof_of_concept.test.sql
rename to test/contraction/proof_of_concept.test.sql
diff --git a/test/contraction/proof_of_concept_1.result b/test/contraction/proof_of_concept_1.result
new file mode 100644
index 0000000..53d46c6
--- /dev/null
+++ b/test/contraction/proof_of_concept_1.result
@@ -0,0 +1,135 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+Adding an additional column to store if its part of the contracted graph
+ALTER TABLE edge_table ADD is_contracted BOOLEAN DEFAULT false;
+ALTER TABLE
+Adding a new edges joining vertices 3 and 5 with cost=2 to the edge table
+INSERT INTO edge_table(source, target, cost, reverse_cost, is_contracted)
+VALUES (3, 5, 2, 2, true);
+INSERT 0 1
+Adding a new edges joining vertices 3 and 9 with cost=2 to the edge table
+INSERT INTO edge_table(source, target, cost, reverse_cost, is_contracted)
+VALUES (3, 9, 2, 2, true);
+INSERT 0 1
+Adding a new edges joining vertices 5 and 11 with cost=2 to the edge table
+INSERT INTO edge_table(source, target, cost, reverse_cost, is_contracted)
+VALUES (5, 11, 2, 2, true);
+INSERT 0 1
+Adding a new edges joining vertices 9 and 11 with cost=2 to the edge table
+INSERT INTO edge_table(source, target, cost, reverse_cost, is_contracted)
+VALUES (9, 11, 2, 2, true);
+INSERT 0 1
+Case 1: Both source and target belong to the contracted graph.
+We are going to route from 3 to 11
+Since 3 and 11 both are in the contracted graph we need not add any vertices.
+SELECT * FROM
+pgr_dijkstra('SELECT id, source, target, cost, reverse_cost FROM edge_table where source IN (3, 5, 6, 9, 11, 15, 17) AND target IN (3, 5, 6, 9, 11, 15, 17) AND is_contracted=false',
+3, 11, false);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    3 |    5 |    1 |        0
+   2 |        2 |    6 |   11 |    1 |        1
+   3 |        3 |   11 |   -1 |    0 |        2
+(3 rows)
+
+Case 2: source belongs to a contracted graph, while target belongs to a vertex subgraph.
+We are going to route from 3 to 7
+Since 7 is in the contracted subgraph of vertex 5 we add {7, 8} to the vertex set, so the vertex set becomes (3, 5, 6, 7, 8, 9, 11, 15, 17)
+SELECT * FROM
+pgr_dijkstra('SELECT id, source, target, cost, reverse_cost FROM edge_table where source IN (3, 5, 6, 9, 11, 15, 17,   7, 8)	 AND target IN (3, 5, 6, 9, 11, 15, 17,   7, 8) AND is_contracted=false',
+3, 7, false);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    3 |    5 |    1 |        0
+   2 |        2 |    6 |    8 |    1 |        1
+   3 |        3 |    5 |    7 |    1 |        2
+   4 |        4 |    8 |    6 |    1 |        3
+   5 |        5 |    7 |   -1 |    0 |        4
+(5 rows)
+
+Case 3: source belongs to a contracted graph, while target belongs to a edge subgraph.
+We are going to route from 3 to 13
+Since 13 is in the contracted subgraph of edge (5, 11) we add {10, 13} to the vertex set, so the vertex set becomes (3, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17)
+SELECT * FROM
+pgr_dijkstra('SELECT id, source, target, cost, reverse_cost FROM edge_table where source IN (3, 5, 6, 9, 11, 15, 17,    10, 13) AND target IN (3, 5, 6, 9, 11, 15, 17,    10, 13) AND is_contracted=false',
+3, 13, false);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    3 |    5 |    1 |        0
+   2 |        2 |    6 |    8 |    1 |        1
+   3 |        3 |    5 |   10 |    1 |        2
+   4 |        4 |   10 |   14 |    1 |        3
+   5 |        5 |   13 |   -1 |    0 |        4
+(5 rows)
+
+Case 4: source belongs to a vertex subgraph, while target belongs to a edge subgraph.
+We are going to route from 7 to 13
+Since 13 is in the contracted subgraph of edge (5, 11) we add {10, 13} to the vertex set, and since 7 is in the contracted subgraph of vertex 5 we add {7, 8} to the vertex sets (3, 5, 6, 7, 8, 9, 11, 15, 17)
+SELECT * FROM
+pgr_dijkstra('SELECT id, source, target, cost, reverse_cost FROM edge_table where source IN (3, 5, 6, 9, 11, 15, 17,    7, 8,   10, 13) AND target IN (3, 5, 6, 9, 11, 15, 17,    7, 8,   10, 13) AND is_contracted=false',
+7, 13, false);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    7 |    6 |    1 |        0
+   2 |        2 |    8 |    7 |    1 |        1
+   3 |        3 |    5 |   10 |    1 |        2
+   4 |        4 |   10 |   14 |    1 |        3
+   5 |        5 |   13 |   -1 |    0 |        4
+(5 rows)
+
+Case 5: The path contains a shortcut.
+
+We are going to route from 3 to 9
+Since 3 and 9 both are in the contracted graph we need not add any vertices.
+SELECT * FROM
+pgr_dijkstra('SELECT id, source, target, cost, reverse_cost FROM edge_table where source IN (3, 5, 6, 7, 8, 9, 11, 15, 17) AND target IN (3, 5, 6, 7, 8, 9, 11, 15, 17) AND is_contracted=false',
+3, 9, false);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    3 |    5 |    1 |        0
+   2 |        2 |    6 |    9 |    1 |        1
+   3 |        3 |    9 |   -1 |    0 |        2
+(3 rows)
+
+SELECT id, source, target, cost, reverse_cost, is_contracted FROM edge_table ORDER BY id;
+ id | source | target | cost | reverse_cost | is_contracted
+----+--------+--------+------+--------------+---------------
+  1 |      1 |      2 |    1 |            1 | f
+  2 |      2 |      3 |   -1 |            1 | f
+  3 |      3 |      4 |   -1 |            1 | f
+  4 |      2 |      5 |    1 |            1 | f
+  5 |      3 |      6 |    1 |           -1 | f
+  6 |      7 |      8 |    1 |            1 | f
+  7 |      8 |      5 |    1 |            1 | f
+  8 |      5 |      6 |    1 |            1 | f
+  9 |      6 |      9 |    1 |            1 | f
+ 10 |      5 |     10 |    1 |            1 | f
+ 11 |      6 |     11 |    1 |           -1 | f
+ 12 |     10 |     11 |    1 |           -1 | f
+ 13 |     11 |     12 |    1 |           -1 | f
+ 14 |     10 |     13 |    1 |            1 | f
+ 15 |      9 |     12 |    1 |            1 | f
+ 16 |      4 |      9 |    1 |            1 | f
+ 17 |     14 |     15 |    1 |            1 | f
+ 18 |     16 |     17 |    1 |            1 | f
+ 23 |      3 |      5 |    2 |            2 | t
+ 24 |      3 |      9 |    2 |            2 | t
+ 25 |      5 |     11 |    2 |            2 | t
+ 26 |      9 |     11 |    2 |            2 | t
+(22 rows)
+
+This implies that it is a shortcut and should be expanded
+SELECT * FROM
+pgr_dijkstra('SELECT id, source, target, cost, reverse_cost FROM edge_table where source IN (3, 5, 6, 7, 8, 9, 11, 15, 17) AND target IN (3, 5, 6, 7, 8, 9, 11, 15, 17) AND is_contracted=false',
+3, 9, false);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    3 |    5 |    1 |        0
+   2 |        2 |    6 |    9 |    1 |        1
+   3 |        3 |    9 |   -1 |    0 |        2
+(3 rows)
+
+ROLLBACK;
+ROLLBACK
diff --git a/test/contraction/proof_of_concept_1.test.sql b/test/contraction/proof_of_concept_1.test.sql
new file mode 100644
index 0000000..cba3f59
--- /dev/null
+++ b/test/contraction/proof_of_concept_1.test.sql
@@ -0,0 +1,68 @@
+
+\echo Adding an additional column to store if its part of the contracted graph
+ALTER TABLE edge_table ADD is_contracted BOOLEAN DEFAULT false;
+
+\echo Adding a new edges joining vertices 3 and 5 with cost=2 to the edge table
+INSERT INTO edge_table(source, target, cost, reverse_cost, is_contracted)
+VALUES (3, 5, 2, 2, true);
+
+\echo Adding a new edges joining vertices 3 and 9 with cost=2 to the edge table
+INSERT INTO edge_table(source, target, cost, reverse_cost, is_contracted)
+VALUES (3, 9, 2, 2, true);
+
+\echo Adding a new edges joining vertices 5 and 11 with cost=2 to the edge table
+INSERT INTO edge_table(source, target, cost, reverse_cost, is_contracted)
+VALUES (5, 11, 2, 2, true);
+
+\echo Adding a new edges joining vertices 9 and 11 with cost=2 to the edge table
+INSERT INTO edge_table(source, target, cost, reverse_cost, is_contracted)
+VALUES (9, 11, 2, 2, true);
+
+--\echo --q1
+--SELECT id, source, target, cost, reverse_cost, is_contracted FROM edge_table;
+--select id, source, target, cost, reverse_cost  from edge_table where source in (3,5,6,9,11,15,17) and target in (3,5,6,9,11,15,17);
+
+
+\echo Case 1: Both source and target belong to the contracted graph.
+\echo We are going to route from 3 to 11
+\echo  Since 3 and 11 both are in the contracted graph we need not add any vertices.
+SELECT * FROM
+pgr_dijkstra('SELECT id, source, target, cost, reverse_cost FROM edge_table where source IN (3, 5, 6, 9, 11, 15, 17) AND target IN (3, 5, 6, 9, 11, 15, 17) AND is_contracted=false',
+3, 11, false);
+
+
+\echo Case 2: source belongs to a contracted graph, while target belongs to a vertex subgraph.
+\echo We are going to route from 3 to 7
+\echo  Since 7 is in the contracted subgraph of vertex 5 we add {7, 8} to the vertex set, so the vertex set becomes (3, 5, 6, 7, 8, 9, 11, 15, 17)
+SELECT * FROM
+pgr_dijkstra('SELECT id, source, target, cost, reverse_cost FROM edge_table where source IN (3, 5, 6, 9, 11, 15, 17,   7, 8)	 AND target IN (3, 5, 6, 9, 11, 15, 17,   7, 8) AND is_contracted=false',
+3, 7, false);
+
+\echo Case 3: source belongs to a contracted graph, while target belongs to a edge subgraph.
+\echo We are going to route from 3 to 13
+\echo  Since 13 is in the contracted subgraph of edge (5, 11) we add {10, 13} to the vertex set, so the vertex set becomes (3, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17)
+SELECT * FROM
+pgr_dijkstra('SELECT id, source, target, cost, reverse_cost FROM edge_table where source IN (3, 5, 6, 9, 11, 15, 17,    10, 13) AND target IN (3, 5, 6, 9, 11, 15, 17,    10, 13) AND is_contracted=false',
+3, 13, false);
+
+\echo Case 4: source belongs to a vertex subgraph, while target belongs to a edge subgraph.
+\echo We are going to route from 7 to 13
+\echo Since 13 is in the contracted subgraph of edge (5, 11) we add {10, 13} to the vertex set, and since 7 is in the contracted subgraph of vertex 5 we add {7, 8} to the vertex sets (3, 5, 6, 7, 8, 9, 11, 15, 17)
+SELECT * FROM
+pgr_dijkstra('SELECT id, source, target, cost, reverse_cost FROM edge_table where source IN (3, 5, 6, 9, 11, 15, 17,    7, 8,   10, 13) AND target IN (3, 5, 6, 9, 11, 15, 17,    7, 8,   10, 13) AND is_contracted=false',
+7, 13, false);
+
+\echo Case 5: The path contains a shortcut.
+\echo \echo We are going to route from 3 to 9
+\echo Since 3 and 9 both are in the contracted graph we need not add any vertices.
+SELECT * FROM
+pgr_dijkstra('SELECT id, source, target, cost, reverse_cost FROM edge_table where source IN (3, 5, 6, 7, 8, 9, 11, 15, 17) AND target IN (3, 5, 6, 7, 8, 9, 11, 15, 17) AND is_contracted=false',
+3, 9, false);
+
+SELECT id, source, target, cost, reverse_cost, is_contracted FROM edge_table ORDER BY id;
+
+\echo This implies that it is a shortcut and should be expanded
+SELECT * FROM
+pgr_dijkstra('SELECT id, source, target, cost, reverse_cost FROM edge_table where source IN (3, 5, 6, 7, 8, 9, 11, 15, 17) AND target IN (3, 5, 6, 7, 8, 9, 11, 15, 17) AND is_contracted=false',
+3, 9, false);
+
diff --git a/test/contraction/return_types.result b/test/contraction/return_types.result
new file mode 100644
index 0000000..c32b2e1
--- /dev/null
+++ b/test/contraction/return_types.result
@@ -0,0 +1,121 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+--q1
+/*
+bigint (-9,223,372,036,854,775,808) to (9,223,372,036,854,775,807)
+int	(-2,147,483,648) to (2,147,483,647)
+*/
+/*
+Testing for ids > 10^8
+*/
+UPDATE edge_table
+SET id = id + POWER(10, 8),
+	source = source + POWER(10, 8),
+	target = target + POWER(10, 8);
+UPDATE 18
+--q2
+UPDATE edge_table_vertices_pgr
+SET id = id + POWER(10, 8);
+UPDATE 17
+--q3
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type |    id     |  contracted_vertices  | source | target | cost
+-----+------+-----------+-----------------------+--------+--------+------
+   1 | v    | 100000002 | {100000001}           |     -1 |     -1 |   -1
+   2 | v    | 100000005 | {100000007,100000008} |     -1 |     -1 |   -1
+   3 | v    | 100000010 | {100000013}           |     -1 |     -1 |   -1
+   4 | v    | 100000015 | {100000014}           |     -1 |     -1 |   -1
+   5 | v    | 100000017 | {100000016}           |     -1 |     -1 |   -1
+(5 rows)
+
+--q4
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type | id | contracted_vertices |  source   |  target   | cost
+-----+------+----+---------------------+-----------+-----------+------
+   1 | e    | -1 | {100000004}         | 100000009 | 100000003 |    2
+   2 | e    | -2 | {100000008}         | 100000005 | 100000007 |    2
+   3 | e    | -3 | {100000008}         | 100000007 | 100000005 |    2
+   4 | e    | -4 | {100000012}         | 100000011 | 100000009 |    2
+(4 rows)
+
+--q5
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[1, 2]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type |    id     |  contracted_vertices  |  source   |  target   | cost
+-----+------+-----------+-----------------------+-----------+-----------+------
+   1 | v    | 100000005 | {100000007,100000008} |        -1 |        -1 |   -1
+   2 | v    | 100000015 | {100000014}           |        -1 |        -1 |   -1
+   3 | v    | 100000017 | {100000016}           |        -1 |        -1 |   -1
+   4 | e    |        -1 | {100000001,100000002} | 100000003 | 100000005 |    2
+   5 | e    |        -2 | {100000004}           | 100000009 | 100000003 |    2
+   6 | e    |        -3 | {100000010,100000013} | 100000005 | 100000011 |    2
+   7 | e    |        -4 | {100000012}           | 100000011 | 100000009 |    2
+(7 rows)
+
+ROLLBACK;
+ROLLBACK
+/*
+Testing for ids > 10^12
+*/
+BEGIN;
+BEGIN
+--q6
+UPDATE edge_table
+SET id = id + POWER(10, 12),
+	source = source + POWER(10, 12),
+	target = target + POWER(10, 12);
+UPDATE 18
+--q7
+UPDATE edge_table_vertices_pgr
+SET id = id + POWER(10, 12);
+UPDATE 17
+--q8
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type |      id       |      contracted_vertices      | source | target | cost
+-----+------+---------------+-------------------------------+--------+--------+------
+   1 | v    | 1000000000002 | {1000000000001}               |     -1 |     -1 |   -1
+   2 | v    | 1000000000005 | {1000000000007,1000000000008} |     -1 |     -1 |   -1
+   3 | v    | 1000000000010 | {1000000000013}               |     -1 |     -1 |   -1
+   4 | v    | 1000000000015 | {1000000000014}               |     -1 |     -1 |   -1
+   5 | v    | 1000000000017 | {1000000000016}               |     -1 |     -1 |   -1
+(5 rows)
+
+--q9
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[2]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type | id | contracted_vertices |    source     |    target     | cost
+-----+------+----+---------------------+---------------+---------------+------
+   1 | e    | -1 | {1000000000004}     | 1000000000009 | 1000000000003 |    2
+   2 | e    | -2 | {1000000000008}     | 1000000000005 | 1000000000007 |    2
+   3 | e    | -3 | {1000000000008}     | 1000000000007 | 1000000000005 |    2
+   4 | e    | -4 | {1000000000012}     | 1000000000011 | 1000000000009 |    2
+(4 rows)
+
+--q10
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[1, 2]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type |      id       |      contracted_vertices      |    source     |    target     | cost
+-----+------+---------------+-------------------------------+---------------+---------------+------
+   1 | v    | 1000000000005 | {1000000000007,1000000000008} |            -1 |            -1 |   -1
+   2 | v    | 1000000000015 | {1000000000014}               |            -1 |            -1 |   -1
+   3 | v    | 1000000000017 | {1000000000016}               |            -1 |            -1 |   -1
+   4 | e    |            -1 | {1000000000001,1000000000002} | 1000000000003 | 1000000000005 |    2
+   5 | e    |            -2 | {1000000000004}               | 1000000000009 | 1000000000003 |    2
+   6 | e    |            -3 | {1000000000010,1000000000013} | 1000000000005 | 1000000000011 |    2
+   7 | e    |            -4 | {1000000000012}               | 1000000000011 | 1000000000009 |    2
+(7 rows)
+
+--q11
+ROLLBACK;
+ROLLBACK
diff --git a/src/contraction/test/return_types.test.sql b/test/contraction/return_types.test.sql
similarity index 100%
rename from src/contraction/test/return_types.test.sql
rename to test/contraction/return_types.test.sql
diff --git a/test/contraction/sampleData.result b/test/contraction/sampleData.result
new file mode 100644
index 0000000..7417b48
--- /dev/null
+++ b/test/contraction/sampleData.result
@@ -0,0 +1,19 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+--q0 Checking dead end contraction for workshop data
+SELECT * FROM pgr_contractGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[1]::integer[], 1, ARRAY[]::BIGINT[], true);
+ seq | type | id | contracted_vertices | source | target | cost
+-----+------+----+---------------------+--------+--------+------
+   1 | v    |  2 | {1}                 |     -1 |     -1 |   -1
+   2 | v    |  5 | {7,8}               |     -1 |     -1 |   -1
+   3 | v    | 10 | {13}                |     -1 |     -1 |   -1
+   4 | v    | 15 | {14}                |     -1 |     -1 |   -1
+   5 | v    | 17 | {16}                |     -1 |     -1 |   -1
+(5 rows)
+
+ROLLBACK;
+ROLLBACK
diff --git a/src/contraction/test/sampleData.test.sql b/test/contraction/sampleData.test.sql
similarity index 100%
rename from src/contraction/test/sampleData.test.sql
rename to test/contraction/sampleData.test.sql
diff --git a/src/contraction/test/test.conf b/test/contraction/test.conf
similarity index 100%
rename from src/contraction/test/test.conf
rename to test/contraction/test.conf
diff --git a/src/costMatrix/test/doc-pgr_fooDmatrix-mac.result b/test/costMatrix/doc-pgr_fooDmatrix-mac.result
similarity index 100%
rename from src/costMatrix/test/doc-pgr_fooDmatrix-mac.result
rename to test/costMatrix/doc-pgr_fooDmatrix-mac.result
diff --git a/src/costMatrix/test/doc-pgr_fooDmatrix-mac.test.sql b/test/costMatrix/doc-pgr_fooDmatrix-mac.test.sql
similarity index 100%
rename from src/costMatrix/test/doc-pgr_fooDmatrix-mac.test.sql
rename to test/costMatrix/doc-pgr_fooDmatrix-mac.test.sql
diff --git a/test/costMatrix/doc-pgr_fooDmatrix-windows.result b/test/costMatrix/doc-pgr_fooDmatrix-windows.result
new file mode 100644
index 0000000..cc5f76b
--- /dev/null
+++ b/test/costMatrix/doc-pgr_fooDmatrix-windows.result
@@ -0,0 +1,324 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- dijkstra q1
+SELECT * FROM pgr_dijkstraCostMatrix(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5)
+);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         1 |       2 |        1
+         1 |       3 |        6
+         1 |       4 |        5
+         2 |       1 |        1
+         2 |       3 |        5
+         2 |       4 |        4
+         3 |       1 |        2
+         3 |       2 |        1
+         3 |       4 |        3
+         4 |       1 |        3
+         4 |       2 |        2
+         4 |       3 |        1
+(12 rows)
+
+-- dijkstra q2
+SELECT * FROM pgr_dijkstraCostMatrix(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
+    false
+);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         1 |       2 |        1
+         1 |       3 |        2
+         1 |       4 |        3
+         2 |       1 |        1
+         2 |       3 |        1
+         2 |       4 |        2
+         3 |       1 |        2
+         3 |       2 |        1
+         3 |       4 |        1
+         4 |       1 |        3
+         4 |       2 |        2
+         4 |       3 |        1
+(12 rows)
+
+-- dijkstra q3
+SELECT * FROM pgr_TSP(
+    $$
+    SELECT * FROM pgr_dijkstraCostMatrix(
+        'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+        (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
+        false
+    )
+    $$,
+    randomize := false
+);
+ seq | node | cost | agg_cost
+-----+------+------+----------
+   1 |    1 |    1 |        0
+   2 |    2 |    1 |        1
+   3 |    3 |    1 |        2
+   4 |    4 |    3 |        3
+   5 |    1 |    0 |        6
+(5 rows)
+
+-- dijkstra q4
+-- withPoints q1
+SELECT * FROM pgr_withPointsCostMatrix(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction from pointsOfInterest',
+    array[-1, 3, 6, -6]);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+        -6 |      -1 |      1.3
+        -6 |       3 |      4.3
+        -6 |       6 |      1.3
+        -1 |      -6 |      1.3
+        -1 |       3 |      5.6
+        -1 |       6 |      2.6
+         3 |      -6 |      1.7
+         3 |      -1 |      1.6
+         3 |       6 |        1
+         6 |      -6 |      1.3
+         6 |      -1 |      2.6
+         6 |       3 |        3
+(12 rows)
+
+-- withPoints q2
+SELECT * FROM pgr_withPointsCostMatrix(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction from pointsOfInterest',
+    array[-1, 3, 6, -6], directed := false);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+        -6 |      -1 |      1.3
+        -6 |       3 |      1.7
+        -6 |       6 |      1.3
+        -1 |      -6 |      1.3
+        -1 |       3 |      1.6
+        -1 |       6 |      2.6
+         3 |      -6 |      1.7
+         3 |      -1 |      1.6
+         3 |       6 |        1
+         6 |      -6 |      1.3
+         6 |      -1 |      2.6
+         6 |       3 |        1
+(12 rows)
+
+-- withPoints q3
+SELECT * FROM pgr_TSP(
+    $$
+    SELECT * FROM pgr_withPointsCostMatrix(
+        'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+        'SELECT pid, edge_id, fraction from pointsOfInterest',
+        array[-1, 3, 6, -6], directed := false);
+    $$,
+    randomize := false
+);
+ seq | node | cost | agg_cost
+-----+------+------+----------
+   1 |   -6 |  1.3 |        0
+   2 |    6 |    1 |      1.3
+   3 |    3 |  1.6 |      2.3
+   4 |   -1 |  1.3 |      3.9
+   5 |   -6 |    0 |      5.2
+(5 rows)
+
+-- withPoints q4
+-- astar q1
+SELECT * FROM pgr_aStarCostMatrix(
+    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
+    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5)
+);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         2 |       1 |        1
+         3 |       1 |        2
+         4 |       1 |        3
+         1 |       2 |        1
+         3 |       2 |        1
+         4 |       2 |        2
+         1 |       3 |        6
+         2 |       3 |        5
+         4 |       3 |        1
+         1 |       4 |        5
+         2 |       4 |        4
+         3 |       4 |        3
+(12 rows)
+
+-- astar q2
+SELECT * FROM pgr_aStarCostMatrix(
+    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
+    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
+    directed := false, heuristic := 2
+);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         2 |       1 |        1
+         3 |       1 |        2
+         4 |       1 |        3
+         1 |       2 |        1
+         3 |       2 |        1
+         4 |       2 |        2
+         1 |       3 |        2
+         2 |       3 |        1
+         4 |       3 |        1
+         1 |       4 |        3
+         2 |       4 |        2
+         3 |       4 |        1
+(12 rows)
+
+-- astar q3
+SELECT * FROM pgr_TSP(
+    $$
+    SELECT * FROM pgr_aStarCostMatrix(
+        'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
+        (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
+        directed:= false, heuristic := 2
+    )
+    $$,
+    randomize := false
+);
+ seq | node | cost | agg_cost
+-----+------+------+----------
+   1 |    1 |    1 |        0
+   2 |    2 |    1 |        1
+   3 |    3 |    1 |        2
+   4 |    4 |    3 |        3
+   5 |    1 |    0 |        6
+(5 rows)
+
+-- astar q4
+-- bdDijkstra q1
+SELECT * FROM pgr_bdDijkstraCostMatrix(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5)
+);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         1 |       2 |        1
+         1 |       3 |        6
+         1 |       4 |        5
+         2 |       1 |        1
+         2 |       3 |        5
+         2 |       4 |        4
+         3 |       1 |        2
+         3 |       2 |        1
+         3 |       4 |        3
+         4 |       1 |        3
+         4 |       2 |        2
+         4 |       3 |        1
+(12 rows)
+
+-- bdDijkstra q2
+SELECT * FROM pgr_bdDijkstraCostMatrix(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
+    false
+);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         1 |       2 |        1
+         1 |       3 |        2
+         1 |       4 |        3
+         2 |       1 |        1
+         2 |       3 |        1
+         2 |       4 |        2
+         3 |       1 |        2
+         3 |       2 |        1
+         3 |       4 |        1
+         4 |       1 |        3
+         4 |       2 |        2
+         4 |       3 |        1
+(12 rows)
+
+-- bdDijkstra q3
+SELECT * FROM pgr_TSP(
+    $$
+    SELECT * FROM pgr_bdDijkstraCostMatrix(
+        'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+        (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
+        false
+    )
+    $$,
+    randomize := false
+);
+ seq | node | cost | agg_cost
+-----+------+------+----------
+   1 |    1 |    1 |        0
+   2 |    2 |    1 |        1
+   3 |    3 |    1 |        2
+   4 |    4 |    3 |        3
+   5 |    1 |    0 |        6
+(5 rows)
+
+-- bdDijkstra q4
+-- bdAstar q1
+SELECT * FROM pgr_bdAstarCostMatrix(
+    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
+    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5)
+);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         1 |       2 |        1
+         1 |       3 |        6
+         1 |       4 |        5
+         2 |       1 |        1
+         2 |       3 |        5
+         2 |       4 |        4
+         3 |       1 |        2
+         3 |       2 |        1
+         3 |       4 |        3
+         4 |       1 |        3
+         4 |       2 |        2
+         4 |       3 |        1
+(12 rows)
+
+-- bdAstar q2
+SELECT * FROM pgr_bdAstarCostMatrix(
+    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
+    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
+    false
+);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         1 |       2 |        1
+         1 |       3 |        2
+         1 |       4 |        3
+         2 |       1 |        1
+         2 |       3 |        1
+         2 |       4 |        2
+         3 |       1 |        2
+         3 |       2 |        1
+         3 |       4 |        1
+         4 |       1 |        3
+         4 |       2 |        2
+         4 |       3 |        1
+(12 rows)
+
+-- bdAstar q3
+SELECT * FROM pgr_TSP(
+    $$
+    SELECT * FROM pgr_bdAstarCostMatrix(
+        'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
+        (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
+        false
+    )
+    $$,
+    randomize := false
+);
+ seq | node | cost | agg_cost
+-----+------+------+----------
+   1 |    1 |    1 |        0
+   2 |    2 |    1 |        1
+   3 |    3 |    1 |        2
+   4 |    4 |    3 |        3
+   5 |    1 |    0 |        6
+(5 rows)
+
+-- bdAstar q4
+ROLLBACK;
+ROLLBACK
diff --git a/src/costMatrix/test/doc-pgr_fooDmatrix-windows.test.sql b/test/costMatrix/doc-pgr_fooDmatrix-windows.test.sql
similarity index 100%
rename from src/costMatrix/test/doc-pgr_fooDmatrix-windows.test.sql
rename to test/costMatrix/doc-pgr_fooDmatrix-windows.test.sql
diff --git a/test/costMatrix/doc-pgr_fooDmatrix.result b/test/costMatrix/doc-pgr_fooDmatrix.result
new file mode 100644
index 0000000..de343a1
--- /dev/null
+++ b/test/costMatrix/doc-pgr_fooDmatrix.result
@@ -0,0 +1,324 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- dijkstra q1
+SELECT * FROM pgr_dijkstraCostMatrix(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5)
+);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         1 |       2 |        1
+         1 |       3 |        6
+         1 |       4 |        5
+         2 |       1 |        1
+         2 |       3 |        5
+         2 |       4 |        4
+         3 |       1 |        2
+         3 |       2 |        1
+         3 |       4 |        3
+         4 |       1 |        3
+         4 |       2 |        2
+         4 |       3 |        1
+(12 rows)
+
+-- dijkstra q2
+SELECT * FROM pgr_dijkstraCostMatrix(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
+    false
+);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         1 |       2 |        1
+         1 |       3 |        2
+         1 |       4 |        3
+         2 |       1 |        1
+         2 |       3 |        1
+         2 |       4 |        2
+         3 |       1 |        2
+         3 |       2 |        1
+         3 |       4 |        1
+         4 |       1 |        3
+         4 |       2 |        2
+         4 |       3 |        1
+(12 rows)
+
+-- dijkstra q3
+SELECT * FROM pgr_TSP(
+    $$
+    SELECT * FROM pgr_dijkstraCostMatrix(
+        'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+        (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
+        false
+    )
+    $$,
+    randomize := false
+);
+ seq | node | cost | agg_cost
+-----+------+------+----------
+   1 |    1 |    1 |        0
+   2 |    2 |    1 |        1
+   3 |    3 |    1 |        2
+   4 |    4 |    3 |        3
+   5 |    1 |    0 |        6
+(5 rows)
+
+-- dijkstra q4
+-- withPoints q1
+SELECT * FROM pgr_withPointsCostMatrix(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction from pointsOfInterest',
+    array[-1, 3, 6, -6]);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+        -6 |      -1 |      1.3
+        -6 |       3 |      4.3
+        -6 |       6 |      1.3
+        -1 |      -6 |      1.3
+        -1 |       3 |      5.6
+        -1 |       6 |      2.6
+         3 |      -6 |      1.7
+         3 |      -1 |      1.6
+         3 |       6 |        1
+         6 |      -6 |      1.3
+         6 |      -1 |      2.6
+         6 |       3 |        3
+(12 rows)
+
+-- withPoints q2
+SELECT * FROM pgr_withPointsCostMatrix(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction from pointsOfInterest',
+    array[-1, 3, 6, -6], directed := false);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+        -6 |      -1 |      1.3
+        -6 |       3 |      1.7
+        -6 |       6 |      1.3
+        -1 |      -6 |      1.3
+        -1 |       3 |      1.6
+        -1 |       6 |      2.6
+         3 |      -6 |      1.7
+         3 |      -1 |      1.6
+         3 |       6 |        1
+         6 |      -6 |      1.3
+         6 |      -1 |      2.6
+         6 |       3 |        1
+(12 rows)
+
+-- withPoints q3
+SELECT * FROM pgr_TSP(
+    $$
+    SELECT * FROM pgr_withPointsCostMatrix(
+        'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+        'SELECT pid, edge_id, fraction from pointsOfInterest',
+        array[-1, 3, 6, -6], directed := false);
+    $$,
+    randomize := false
+);
+ seq | node | cost | agg_cost
+-----+------+------+----------
+   1 |   -6 |  1.3 |        0
+   2 |   -1 |  1.6 |      1.3
+   3 |    3 |    1 |      2.9
+   4 |    6 |  1.3 |      3.9
+   5 |   -6 |    0 |      5.2
+(5 rows)
+
+-- withPoints q4
+-- astar q1
+SELECT * FROM pgr_aStarCostMatrix(
+    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
+    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5)
+);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         2 |       1 |        1
+         3 |       1 |        2
+         4 |       1 |        3
+         1 |       2 |        1
+         3 |       2 |        1
+         4 |       2 |        2
+         1 |       3 |        6
+         2 |       3 |        5
+         4 |       3 |        1
+         1 |       4 |        5
+         2 |       4 |        4
+         3 |       4 |        3
+(12 rows)
+
+-- astar q2
+SELECT * FROM pgr_aStarCostMatrix(
+    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
+    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
+    directed := false, heuristic := 2
+);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         2 |       1 |        1
+         3 |       1 |        2
+         4 |       1 |        3
+         1 |       2 |        1
+         3 |       2 |        1
+         4 |       2 |        2
+         1 |       3 |        2
+         2 |       3 |        1
+         4 |       3 |        1
+         1 |       4 |        3
+         2 |       4 |        2
+         3 |       4 |        1
+(12 rows)
+
+-- astar q3
+SELECT * FROM pgr_TSP(
+    $$
+    SELECT * FROM pgr_aStarCostMatrix(
+        'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
+        (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
+        directed:= false, heuristic := 2
+    )
+    $$,
+    randomize := false
+);
+ seq | node | cost | agg_cost
+-----+------+------+----------
+   1 |    1 |    1 |        0
+   2 |    2 |    1 |        1
+   3 |    3 |    1 |        2
+   4 |    4 |    3 |        3
+   5 |    1 |    0 |        6
+(5 rows)
+
+-- astar q4
+-- bdDijkstra q1
+SELECT * FROM pgr_bdDijkstraCostMatrix(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5)
+);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         1 |       2 |        1
+         1 |       3 |        6
+         1 |       4 |        5
+         2 |       1 |        1
+         2 |       3 |        5
+         2 |       4 |        4
+         3 |       1 |        2
+         3 |       2 |        1
+         3 |       4 |        3
+         4 |       1 |        3
+         4 |       2 |        2
+         4 |       3 |        1
+(12 rows)
+
+-- bdDijkstra q2
+SELECT * FROM pgr_bdDijkstraCostMatrix(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
+    false
+);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         1 |       2 |        1
+         1 |       3 |        2
+         1 |       4 |        3
+         2 |       1 |        1
+         2 |       3 |        1
+         2 |       4 |        2
+         3 |       1 |        2
+         3 |       2 |        1
+         3 |       4 |        1
+         4 |       1 |        3
+         4 |       2 |        2
+         4 |       3 |        1
+(12 rows)
+
+-- bdDijkstra q3
+SELECT * FROM pgr_TSP(
+    $$
+    SELECT * FROM pgr_bdDijkstraCostMatrix(
+        'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+        (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
+        false
+    )
+    $$,
+    randomize := false
+);
+ seq | node | cost | agg_cost
+-----+------+------+----------
+   1 |    1 |    1 |        0
+   2 |    2 |    1 |        1
+   3 |    3 |    1 |        2
+   4 |    4 |    3 |        3
+   5 |    1 |    0 |        6
+(5 rows)
+
+-- bdDijkstra q4
+-- bdAstar q1
+SELECT * FROM pgr_bdAstarCostMatrix(
+    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
+    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5)
+);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         1 |       2 |        1
+         1 |       3 |        6
+         1 |       4 |        5
+         2 |       1 |        1
+         2 |       3 |        5
+         2 |       4 |        4
+         3 |       1 |        2
+         3 |       2 |        1
+         3 |       4 |        3
+         4 |       1 |        3
+         4 |       2 |        2
+         4 |       3 |        1
+(12 rows)
+
+-- bdAstar q2
+SELECT * FROM pgr_bdAstarCostMatrix(
+    'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
+    (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
+    false
+);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         1 |       2 |        1
+         1 |       3 |        2
+         1 |       4 |        3
+         2 |       1 |        1
+         2 |       3 |        1
+         2 |       4 |        2
+         3 |       1 |        2
+         3 |       2 |        1
+         3 |       4 |        1
+         4 |       1 |        3
+         4 |       2 |        2
+         4 |       3 |        1
+(12 rows)
+
+-- bdAstar q3
+SELECT * FROM pgr_TSP(
+    $$
+    SELECT * FROM pgr_bdAstarCostMatrix(
+        'SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edge_table',
+        (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 5),
+        false
+    )
+    $$,
+    randomize := false
+);
+ seq | node | cost | agg_cost
+-----+------+------+----------
+   1 |    1 |    1 |        0
+   2 |    2 |    1 |        1
+   3 |    3 |    1 |        2
+   4 |    4 |    3 |        3
+   5 |    1 |    0 |        6
+(5 rows)
+
+-- bdAstar q4
+ROLLBACK;
+ROLLBACK
diff --git a/src/costMatrix/test/doc-pgr_fooDmatrix.test.sql b/test/costMatrix/doc-pgr_fooDmatrix.test.sql
similarity index 100%
rename from src/costMatrix/test/doc-pgr_fooDmatrix.test.sql
rename to test/costMatrix/doc-pgr_fooDmatrix.test.sql
diff --git a/src/costMatrix/test/test.conf b/test/costMatrix/test.conf
similarity index 100%
rename from src/costMatrix/test/test.conf
rename to test/costMatrix/test.conf
diff --git a/test/dijkstra/doc-pgr_dijkstra.result b/test/dijkstra/doc-pgr_dijkstra.result
new file mode 100644
index 0000000..4a3741d
--- /dev/null
+++ b/test/dijkstra/doc-pgr_dijkstra.result
@@ -0,0 +1,590 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- q1
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, 3
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    2 |    4 |    1 |        0
+   2 |        2 |    5 |    8 |    1 |        1
+   3 |        3 |    6 |    9 |    1 |        2
+   4 |        4 |    9 |   16 |    1 |        3
+   5 |        5 |    4 |    3 |    1 |        4
+   6 |        6 |    3 |   -1 |    0 |        5
+(6 rows)
+
+-- q2
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, 3,
+    FALSE
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    2 |    2 |    1 |        0
+   2 |        2 |    3 |   -1 |    0 |        1
+(2 rows)
+
+-- q3
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    2, ARRAY[3,5],
+    FALSE
+);
+ seq | path_seq | end_vid | node | edge | cost | agg_cost
+-----+----------+---------+------+------+------+----------
+   1 |        1 |       3 |    2 |    4 |    1 |        0
+   2 |        2 |       3 |    5 |    8 |    1 |        1
+   3 |        3 |       3 |    6 |    5 |    1 |        2
+   4 |        4 |       3 |    3 |   -1 |    0 |        3
+   5 |        1 |       5 |    2 |    4 |    1 |        0
+   6 |        2 |       5 |    5 |   -1 |    0 |        1
+(6 rows)
+
+-- q4
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[2,11], 5
+);
+ seq | path_seq | start_vid | node | edge | cost | agg_cost
+-----+----------+-----------+------+------+------+----------
+   1 |        1 |         2 |    2 |    4 |    1 |        0
+   2 |        2 |         2 |    5 |   -1 |    0 |        1
+   3 |        1 |        11 |   11 |   13 |    1 |        0
+   4 |        2 |        11 |   12 |   15 |    1 |        1
+   5 |        3 |        11 |    9 |    9 |    1 |        2
+   6 |        4 |        11 |    6 |    8 |    1 |        3
+   7 |        5 |        11 |    5 |   -1 |    0 |        4
+(7 rows)
+
+-- q5
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[2,11], ARRAY[3,5],
+    FALSE
+);
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
+-----+----------+-----------+---------+------+------+------+----------
+   1 |        1 |         2 |       3 |    2 |    2 |    1 |        0
+   2 |        2 |         2 |       3 |    3 |   -1 |    0 |        1
+   3 |        1 |         2 |       5 |    2 |    4 |    1 |        0
+   4 |        2 |         2 |       5 |    5 |   -1 |    0 |        1
+   5 |        1 |        11 |       3 |   11 |   11 |    1 |        0
+   6 |        2 |        11 |       3 |    6 |    5 |    1 |        1
+   7 |        3 |        11 |       3 |    3 |   -1 |    0 |        2
+   8 |        1 |        11 |       5 |   11 |   11 |    1 |        0
+   9 |        2 |        11 |       5 |    6 |    8 |    1 |        1
+  10 |        3 |        11 |       5 |    5 |   -1 |    0 |        2
+(10 rows)
+
+-- q6
+-- q7
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, 3
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    2 |    4 |    1 |        0
+   2 |        2 |    5 |    8 |    1 |        1
+   3 |        3 |    6 |    9 |    1 |        2
+   4 |        4 |    9 |   16 |    1 |        3
+   5 |        5 |    4 |    3 |    1 |        4
+   6 |        6 |    3 |   -1 |    0 |        5
+(6 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, 5
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    2 |    4 |    1 |        0
+   2 |        2 |    5 |   -1 |    0 |        1
+(2 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, ARRAY[3,5]
+);
+ seq | path_seq | end_vid | node | edge | cost | agg_cost
+-----+----------+---------+------+------+------+----------
+   1 |        1 |       3 |    2 |    4 |    1 |        0
+   2 |        2 |       3 |    5 |    8 |    1 |        1
+   3 |        3 |       3 |    6 |    9 |    1 |        2
+   4 |        4 |       3 |    9 |   16 |    1 |        3
+   5 |        5 |       3 |    4 |    3 |    1 |        4
+   6 |        6 |       3 |    3 |   -1 |    0 |        5
+   7 |        1 |       5 |    2 |    4 |    1 |        0
+   8 |        2 |       5 |    5 |   -1 |    0 |        1
+(8 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    11, 3
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |   11 |   13 |    1 |        0
+   2 |        2 |   12 |   15 |    1 |        1
+   3 |        3 |    9 |   16 |    1 |        2
+   4 |        4 |    4 |    3 |    1 |        3
+   5 |        5 |    3 |   -1 |    0 |        4
+(5 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    11, 5
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |   11 |   13 |    1 |        0
+   2 |        2 |   12 |   15 |    1 |        1
+   3 |        3 |    9 |    9 |    1 |        2
+   4 |        4 |    6 |    8 |    1 |        3
+   5 |        5 |    5 |   -1 |    0 |        4
+(5 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[2,11], 5
+);
+ seq | path_seq | start_vid | node | edge | cost | agg_cost
+-----+----------+-----------+------+------+------+----------
+   1 |        1 |         2 |    2 |    4 |    1 |        0
+   2 |        2 |         2 |    5 |   -1 |    0 |        1
+   3 |        1 |        11 |   11 |   13 |    1 |        0
+   4 |        2 |        11 |   12 |   15 |    1 |        1
+   5 |        3 |        11 |    9 |    9 |    1 |        2
+   6 |        4 |        11 |    6 |    8 |    1 |        3
+   7 |        5 |        11 |    5 |   -1 |    0 |        4
+(7 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[2, 11], ARRAY[3,5]
+);
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
+-----+----------+-----------+---------+------+------+------+----------
+   1 |        1 |         2 |       3 |    2 |    4 |    1 |        0
+   2 |        2 |         2 |       3 |    5 |    8 |    1 |        1
+   3 |        3 |         2 |       3 |    6 |    9 |    1 |        2
+   4 |        4 |         2 |       3 |    9 |   16 |    1 |        3
+   5 |        5 |         2 |       3 |    4 |    3 |    1 |        4
+   6 |        6 |         2 |       3 |    3 |   -1 |    0 |        5
+   7 |        1 |         2 |       5 |    2 |    4 |    1 |        0
+   8 |        2 |         2 |       5 |    5 |   -1 |    0 |        1
+   9 |        1 |        11 |       3 |   11 |   13 |    1 |        0
+  10 |        2 |        11 |       3 |   12 |   15 |    1 |        1
+  11 |        3 |        11 |       3 |    9 |   16 |    1 |        2
+  12 |        4 |        11 |       3 |    4 |    3 |    1 |        3
+  13 |        5 |        11 |       3 |    3 |   -1 |    0 |        4
+  14 |        1 |        11 |       5 |   11 |   13 |    1 |        0
+  15 |        2 |        11 |       5 |   12 |   15 |    1 |        1
+  16 |        3 |        11 |       5 |    9 |    9 |    1 |        2
+  17 |        4 |        11 |       5 |    6 |    8 |    1 |        3
+  18 |        5 |        11 |       5 |    5 |   -1 |    0 |        4
+(18 rows)
+
+-- q8
+-- q9
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, 3,
+    FALSE
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    2 |    2 |    1 |        0
+   2 |        2 |    3 |   -1 |    0 |        1
+(2 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, 5,
+    FALSE
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    2 |    4 |    1 |        0
+   2 |        2 |    5 |   -1 |    0 |        1
+(2 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    11, 3,
+    FALSE
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |   11 |   11 |    1 |        0
+   2 |        2 |    6 |    5 |    1 |        1
+   3 |        3 |    3 |   -1 |    0 |        2
+(3 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    11, 5,
+    FALSE
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |   11 |   11 |    1 |        0
+   2 |        2 |    6 |    8 |    1 |        1
+   3 |        3 |    5 |   -1 |    0 |        2
+(3 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[2,11], 5,
+    FALSE
+);
+ seq | path_seq | start_vid | node | edge | cost | agg_cost
+-----+----------+-----------+------+------+------+----------
+   1 |        1 |         2 |    2 |    4 |    1 |        0
+   2 |        2 |         2 |    5 |   -1 |    0 |        1
+   3 |        1 |        11 |   11 |   12 |    1 |        0
+   4 |        2 |        11 |   10 |   10 |    1 |        1
+   5 |        3 |        11 |    5 |   -1 |    0 |        2
+(5 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, ARRAY[3,5],
+    FALSE
+);
+ seq | path_seq | end_vid | node | edge | cost | agg_cost
+-----+----------+---------+------+------+------+----------
+   1 |        1 |       3 |    2 |    2 |    1 |        0
+   2 |        2 |       3 |    3 |   -1 |    0 |        1
+   3 |        1 |       5 |    2 |    4 |    1 |        0
+   4 |        2 |       5 |    5 |   -1 |    0 |        1
+(4 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[2, 11], ARRAY[3,5],
+    FALSE
+);
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
+-----+----------+-----------+---------+------+------+------+----------
+   1 |        1 |         2 |       3 |    2 |    2 |    1 |        0
+   2 |        2 |         2 |       3 |    3 |   -1 |    0 |        1
+   3 |        1 |         2 |       5 |    2 |    4 |    1 |        0
+   4 |        2 |         2 |       5 |    5 |   -1 |    0 |        1
+   5 |        1 |        11 |       3 |   11 |   11 |    1 |        0
+   6 |        2 |        11 |       3 |    6 |    5 |    1 |        1
+   7 |        3 |        11 |       3 |    3 |   -1 |    0 |        2
+   8 |        1 |        11 |       5 |   11 |   11 |    1 |        0
+   9 |        2 |        11 |       5 |    6 |    8 |    1 |        1
+  10 |        3 |        11 |       5 |    5 |   -1 |    0 |        2
+(10 rows)
+
+-- q10
+-- q11
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    2, 3
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+(0 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    2, 5
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    2 |    4 |    1 |        0
+   2 |        2 |    5 |   -1 |    0 |        1
+(2 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    11, 3
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+(0 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    11, 5
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+(0 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    ARRAY[2,11], 5
+);
+ seq | path_seq | start_vid | node | edge | cost | agg_cost
+-----+----------+-----------+------+------+------+----------
+   1 |        1 |         2 |    2 |    4 |    1 |        0
+   2 |        2 |         2 |    5 |   -1 |    0 |        1
+(2 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    2, ARRAY[3,5]
+);
+ seq | path_seq | end_vid | node | edge | cost | agg_cost
+-----+----------+---------+------+------+------+----------
+   1 |        1 |       5 |    2 |    4 |    1 |        0
+   2 |        2 |       5 |    5 |   -1 |    0 |        1
+(2 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    ARRAY[2, 11], ARRAY[3,5]
+);
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
+-----+----------+-----------+---------+------+------+------+----------
+   1 |        1 |         2 |       5 |    2 |    4 |    1 |        0
+   2 |        2 |         2 |       5 |    5 |   -1 |    0 |        1
+(2 rows)
+
+-- q12
+-- q13
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    2, 3,
+    FALSE
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    2 |    4 |    1 |        0
+   2 |        2 |    5 |    8 |    1 |        1
+   3 |        3 |    6 |    5 |    1 |        2
+   4 |        4 |    3 |   -1 |    0 |        3
+(4 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    2, 5,
+    FALSE
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    2 |    4 |    1 |        0
+   2 |        2 |    5 |   -1 |    0 |        1
+(2 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    11, 3,
+    FALSE
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |   11 |   11 |    1 |        0
+   2 |        2 |    6 |    5 |    1 |        1
+   3 |        3 |    3 |   -1 |    0 |        2
+(3 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    11, 5,
+    FALSE
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |   11 |   11 |    1 |        0
+   2 |        2 |    6 |    8 |    1 |        1
+   3 |        3 |    5 |   -1 |    0 |        2
+(3 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    ARRAY[2,11], 5,
+    FALSE
+);
+ seq | path_seq | start_vid | node | edge | cost | agg_cost
+-----+----------+-----------+------+------+------+----------
+   1 |        1 |         2 |    2 |    4 |    1 |        0
+   2 |        2 |         2 |    5 |   -1 |    0 |        1
+   3 |        1 |        11 |   11 |   12 |    1 |        0
+   4 |        2 |        11 |   10 |   10 |    1 |        1
+   5 |        3 |        11 |    5 |   -1 |    0 |        2
+(5 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    2, ARRAY[3,5],
+    FALSE
+);
+ seq | path_seq | end_vid | node | edge | cost | agg_cost
+-----+----------+---------+------+------+------+----------
+   1 |        1 |       3 |    2 |    4 |    1 |        0
+   2 |        2 |       3 |    5 |    8 |    1 |        1
+   3 |        3 |       3 |    6 |    5 |    1 |        2
+   4 |        4 |       3 |    3 |   -1 |    0 |        3
+   5 |        1 |       5 |    2 |    4 |    1 |        0
+   6 |        2 |       5 |    5 |   -1 |    0 |        1
+(6 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    ARRAY[2, 11], ARRAY[3,5],
+    FALSE
+);
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
+-----+----------+-----------+---------+------+------+------+----------
+   1 |        1 |         2 |       3 |    2 |    4 |    1 |        0
+   2 |        2 |         2 |       3 |    5 |    8 |    1 |        1
+   3 |        3 |         2 |       3 |    6 |    5 |    1 |        2
+   4 |        4 |         2 |       3 |    3 |   -1 |    0 |        3
+   5 |        1 |         2 |       5 |    2 |    4 |    1 |        0
+   6 |        2 |         2 |       5 |    5 |   -1 |    0 |        1
+   7 |        1 |        11 |       3 |   11 |   11 |    1 |        0
+   8 |        2 |        11 |       3 |    6 |    5 |    1 |        1
+   9 |        3 |        11 |       3 |    3 |   -1 |    0 |        2
+  10 |        1 |        11 |       5 |   11 |   11 |    1 |        0
+  11 |        2 |        11 |       5 |    6 |    8 |    1 |        1
+  12 |        3 |        11 |       5 |    5 |   -1 |    0 |        2
+(12 rows)
+
+-- q14
+-- q15
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, 3,
+    TRUE
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    2 |    4 |    1 |        0
+   2 |        2 |    5 |    8 |    1 |        1
+   3 |        3 |    6 |    9 |    1 |        2
+   4 |        4 |    9 |   16 |    1 |        3
+   5 |        5 |    4 |    3 |    1 |        4
+   6 |        6 |    3 |   -1 |    0 |        5
+(6 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2,3
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    2 |    4 |    1 |        0
+   2 |        2 |    5 |    8 |    1 |        1
+   3 |        3 |    6 |    9 |    1 |        2
+   4 |        4 |    9 |   16 |    1 |        3
+   5 |        5 |    4 |    3 |    1 |        4
+   6 |        6 |    3 |   -1 |    0 |        5
+(6 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, ARRAY[3],
+    TRUE
+);
+ seq | path_seq | end_vid | node | edge | cost | agg_cost
+-----+----------+---------+------+------+------+----------
+   1 |        1 |       3 |    2 |    4 |    1 |        0
+   2 |        2 |       3 |    5 |    8 |    1 |        1
+   3 |        3 |       3 |    6 |    9 |    1 |        2
+   4 |        4 |       3 |    9 |   16 |    1 |        3
+   5 |        5 |       3 |    4 |    3 |    1 |        4
+   6 |        6 |       3 |    3 |   -1 |    0 |        5
+(6 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, ARRAY[3]
+);
+ seq | path_seq | end_vid | node | edge | cost | agg_cost
+-----+----------+---------+------+------+------+----------
+   1 |        1 |       3 |    2 |    4 |    1 |        0
+   2 |        2 |       3 |    5 |    8 |    1 |        1
+   3 |        3 |       3 |    6 |    9 |    1 |        2
+   4 |        4 |       3 |    9 |   16 |    1 |        3
+   5 |        5 |       3 |    4 |    3 |    1 |        4
+   6 |        6 |       3 |    3 |   -1 |    0 |        5
+(6 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[2], ARRAY[3],
+    TRUE
+);
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
+-----+----------+-----------+---------+------+------+------+----------
+   1 |        1 |         2 |       3 |    2 |    4 |    1 |        0
+   2 |        2 |         2 |       3 |    5 |    8 |    1 |        1
+   3 |        3 |         2 |       3 |    6 |    9 |    1 |        2
+   4 |        4 |         2 |       3 |    9 |   16 |    1 |        3
+   5 |        5 |         2 |       3 |    4 |    3 |    1 |        4
+   6 |        6 |         2 |       3 |    3 |   -1 |    0 |        5
+(6 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[2], ARRAY[3]
+);
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
+-----+----------+-----------+---------+------+------+------+----------
+   1 |        1 |         2 |       3 |    2 |    4 |    1 |        0
+   2 |        2 |         2 |       3 |    5 |    8 |    1 |        1
+   3 |        3 |         2 |       3 |    6 |    9 |    1 |        2
+   4 |        4 |         2 |       3 |    9 |   16 |    1 |        3
+   5 |        5 |         2 |       3 |    4 |    3 |    1 |        4
+   6 |        6 |         2 |       3 |    3 |   -1 |    0 |        5
+(6 rows)
+
+-- q16
+-- q17
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, 3,
+    FALSE
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    2 |    2 |    1 |        0
+   2 |        2 |    3 |   -1 |    0 |        1
+(2 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, ARRAY[3],
+    FALSE
+);
+ seq | path_seq | end_vid | node | edge | cost | agg_cost
+-----+----------+---------+------+------+------+----------
+   1 |        1 |       3 |    2 |    2 |    1 |        0
+   2 |        2 |       3 |    3 |   -1 |    0 |        1
+(2 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[2], 3,
+    FALSE
+);
+ seq | path_seq | start_vid | node | edge | cost | agg_cost
+-----+----------+-----------+------+------+------+----------
+   1 |        1 |         2 |    2 |    2 |    1 |        0
+   2 |        2 |         2 |    3 |   -1 |    0 |        1
+(2 rows)
+
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[2], ARRAY[3],
+    FALSE
+);
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
+-----+----------+-----------+---------+------+------+------+----------
+   1 |        1 |         2 |       3 |    2 |    2 |    1 |        0
+   2 |        2 |         2 |       3 |    3 |   -1 |    0 |        1
+(2 rows)
+
+-- q18
+ROLLBACK;
+ROLLBACK
diff --git a/test/dijkstra/doc-pgr_dijkstra.test.sql b/test/dijkstra/doc-pgr_dijkstra.test.sql
new file mode 100644
index 0000000..18adfb3
--- /dev/null
+++ b/test/dijkstra/doc-pgr_dijkstra.test.sql
@@ -0,0 +1,252 @@
+
+\echo -- q1
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, 3
+);
+\echo -- q2
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, 3,
+    FALSE
+);
+\echo -- q3
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    2, ARRAY[3,5],
+    FALSE
+);
+\echo -- q4
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[2,11], 5
+);
+\echo -- q5
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[2,11], ARRAY[3,5],
+    FALSE
+);
+\echo -- q6
+
+
+-- Examples for :ref:`fig1-direct-Cost-Reverse`
+-------------------------------------------------------------------------------
+
+\echo -- q7
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, 3
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, 5
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, ARRAY[3,5]
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    11, 3
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    11, 5
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[2,11], 5
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[2, 11], ARRAY[3,5]
+);
+\echo -- q8
+
+
+-- Examples for :ref:`fig2-undirect-Cost-Reverse`
+-------------------------------------------------------------------------------
+
+
+\echo -- q9
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, 3,
+    FALSE
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, 5,
+    FALSE
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    11, 3,
+    FALSE
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    11, 5,
+    FALSE
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[2,11], 5,
+    FALSE
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, ARRAY[3,5],
+    FALSE
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[2, 11], ARRAY[3,5],
+    FALSE
+);
+\echo -- q10
+
+
+-- Examples for :ref:`fig3-direct-Cost`
+-------------------------------------------------------------------------------
+
+
+\echo -- q11
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    2, 3
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    2, 5
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    11, 3
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    11, 5
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    ARRAY[2,11], 5
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    2, ARRAY[3,5]
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    ARRAY[2, 11], ARRAY[3,5]
+);
+\echo -- q12
+
+
+-- Examples for :ref:`fig4-undirect-Cost`
+-------------------------------------------------------------------------------
+
+\echo -- q13
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    2, 3,
+    FALSE
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    2, 5,
+    FALSE
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    11, 3,
+    FALSE
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    11, 5,
+    FALSE
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    ARRAY[2,11], 5,
+    FALSE
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    2, ARRAY[3,5],
+    FALSE
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost FROM edge_table',
+    ARRAY[2, 11], ARRAY[3,5],
+    FALSE
+);
+\echo -- q14
+
+
+
+
+-- Equivalences for :ref:`fig1-direct-Cost-Reverse`
+-------------------------------------------------------------------------------
+
+\echo -- q15
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, 3,
+    TRUE     -- directed flag
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2,3
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, ARRAY[3],
+    TRUE
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, ARRAY[3]
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[2], ARRAY[3],
+    TRUE
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[2], ARRAY[3]
+);
+
+\echo -- q16
+
+
+-- Equivalences for :ref:`fig2-undirect-Cost-Reverse`
+-------------------------------------------------------------------------------
+
+
+\echo -- q17
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, 3,
+    FALSE     -- directed flag
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    2, ARRAY[3],
+    FALSE
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[2], 3,
+    FALSE
+);
+SELECT * FROM pgr_dijkstra(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[2], ARRAY[3],
+    FALSE
+);
+
+\echo -- q18
diff --git a/test/dijkstra/doc-pgr_dijkstraCost.result b/test/dijkstra/doc-pgr_dijkstraCost.result
new file mode 100644
index 0000000..d7b9d77
--- /dev/null
+++ b/test/dijkstra/doc-pgr_dijkstraCost.result
@@ -0,0 +1,85 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+--q1
+SELECT * FROM pgr_dijkstraCost(
+    'select id, source, target, cost, reverse_cost from edge_table',
+    2, 3);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         2 |       3 |        5
+(1 row)
+
+--q2
+SELECT * FROM pgr_dijkstraCost(
+    'select id, source, target, cost, reverse_cost from edge_table',
+    2, 3, false);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         2 |       3 |        1
+(1 row)
+
+--q3
+SELECT * FROM pgr_dijkstraCost(
+    'select id, source, target, cost, reverse_cost from edge_table',
+    ARRAY[2, 7], 3);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         2 |       3 |        5
+         7 |       3 |        6
+(2 rows)
+
+--q4
+SELECT * FROM pgr_dijkstraCost(
+    'select id, source, target, cost, reverse_cost from edge_table',
+    2, ARRAY[3, 11]);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         2 |       3 |        5
+         2 |      11 |        3
+(2 rows)
+
+--q5
+SELECT * FROM pgr_dijkstraCost(
+    'select id, source, target, cost, reverse_cost from edge_table',
+    ARRAY[2, 7], ARRAY[3, 11]);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         2 |       3 |        5
+         2 |      11 |        3
+         7 |       3 |        6
+         7 |      11 |        4
+(4 rows)
+
+--q6
+SELECT * FROM pgr_dijkstraCost(
+        'select id, source, target, cost, reverse_cost from edge_table',
+            ARRAY[5, 3, 4, 3, 3, 4], ARRAY[3, 5, 3, 4]);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         3 |       4 |        3
+         3 |       5 |        2
+         4 |       3 |        1
+         4 |       5 |        3
+         5 |       3 |        4
+         5 |       4 |        3
+(6 rows)
+
+--q7
+SELECT * FROM pgr_dijkstraCost(
+        'select id, source, target, cost, reverse_cost from edge_table',
+            ARRAY[5, 3, 4], ARRAY[5, 3, 4]);
+ start_vid | end_vid | agg_cost
+-----------+---------+----------
+         3 |       4 |        3
+         3 |       5 |        2
+         4 |       3 |        1
+         4 |       5 |        3
+         5 |       3 |        4
+         5 |       4 |        3
+(6 rows)
+
+--q8
+ROLLBACK;
+ROLLBACK
diff --git a/src/dijkstra/test/doc-pgr_dijkstraCost.test.sql b/test/dijkstra/doc-pgr_dijkstraCost.test.sql
similarity index 100%
rename from src/dijkstra/test/doc-pgr_dijkstraCost.test.sql
rename to test/dijkstra/doc-pgr_dijkstraCost.test.sql
diff --git a/test/dijkstra/doc-pgr_dijkstraVia.result b/test/dijkstra/doc-pgr_dijkstraVia.result
new file mode 100644
index 0000000..8b8add1
--- /dev/null
+++ b/test/dijkstra/doc-pgr_dijkstraVia.result
@@ -0,0 +1,134 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+--q00
+SELECT * FROM pgr_dijkstraVia(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
+    ARRAY[1, 3, 9]
+);
+ seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost
+-----+---------+----------+-----------+---------+------+------+------+----------+----------------
+   1 |       1 |        1 |         1 |       3 |    1 |    1 |    1 |        0 |              0
+   2 |       1 |        2 |         1 |       3 |    2 |    4 |    1 |        1 |              1
+   3 |       1 |        3 |         1 |       3 |    5 |    8 |    1 |        2 |              2
+   4 |       1 |        4 |         1 |       3 |    6 |    9 |    1 |        3 |              3
+   5 |       1 |        5 |         1 |       3 |    9 |   16 |    1 |        4 |              4
+   6 |       1 |        6 |         1 |       3 |    4 |    3 |    1 |        5 |              5
+   7 |       1 |        7 |         1 |       3 |    3 |   -1 |    0 |        6 |              6
+   8 |       2 |        1 |         3 |       9 |    3 |    5 |    1 |        0 |              6
+   9 |       2 |        2 |         3 |       9 |    6 |    9 |    1 |        1 |              7
+  10 |       2 |        3 |         3 |       9 |    9 |   -2 |    0 |        2 |              8
+(10 rows)
+
+-- q0
+SELECT * FROM pgr_dijkstraVia(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
+    ARRAY[1, 3, 9], false, strict:=true, U_turn_on_edge:=false
+);
+ seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost
+-----+---------+----------+-----------+---------+------+------+------+----------+----------------
+   1 |       1 |        1 |         1 |       3 |    1 |    1 |    1 |        0 |              0
+   2 |       1 |        2 |         1 |       3 |    2 |    2 |    1 |        1 |              1
+   3 |       1 |        3 |         1 |       3 |    3 |   -1 |    0 |        2 |              2
+   4 |       2 |        1 |         3 |       9 |    3 |    5 |    1 |        0 |              2
+   5 |       2 |        2 |         3 |       9 |    6 |    9 |    1 |        1 |              3
+   6 |       2 |        3 |         3 |       9 |    9 |   -2 |    0 |        2 |              4
+(6 rows)
+
+-- q1
+SELECT * FROM pgr_dijkstraVia(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
+    ARRAY[1, 5, 3, 9, 4]
+);
+ seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost
+-----+---------+----------+-----------+---------+------+------+------+----------+----------------
+   1 |       1 |        1 |         1 |       5 |    1 |    1 |    1 |        0 |              0
+   2 |       1 |        2 |         1 |       5 |    2 |    4 |    1 |        1 |              1
+   3 |       1 |        3 |         1 |       5 |    5 |   -1 |    0 |        2 |              2
+   4 |       2 |        1 |         5 |       3 |    5 |    8 |    1 |        0 |              2
+   5 |       2 |        2 |         5 |       3 |    6 |    9 |    1 |        1 |              3
+   6 |       2 |        3 |         5 |       3 |    9 |   16 |    1 |        2 |              4
+   7 |       2 |        4 |         5 |       3 |    4 |    3 |    1 |        3 |              5
+   8 |       2 |        5 |         5 |       3 |    3 |   -1 |    0 |        4 |              6
+   9 |       3 |        1 |         3 |       9 |    3 |    5 |    1 |        0 |              6
+  10 |       3 |        2 |         3 |       9 |    6 |    9 |    1 |        1 |              7
+  11 |       3 |        3 |         3 |       9 |    9 |   -1 |    0 |        2 |              8
+  12 |       4 |        1 |         9 |       4 |    9 |   16 |    1 |        0 |              8
+  13 |       4 |        2 |         9 |       4 |    4 |   -2 |    0 |        1 |              9
+(13 rows)
+
+-- q2
+SELECT agg_cost FROM  pgr_dijkstraVia(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
+    ARRAY[1, 5, 3, 9, 4]
+)
+WHERE path_id = 3 AND edge <0;
+ agg_cost
+----------
+        2
+(1 row)
+
+-- q3
+SELECT route_agg_cost FROM  pgr_dijkstraVia(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
+    ARRAY[1, 5, 3, 9, 4]
+)
+WHERE path_id = 3 AND edge < 0;
+ route_agg_cost
+----------------
+              8
+(1 row)
+
+-- q4
+SELECT row_number() over () as node_seq, node
+FROM  pgr_dijkstraVia(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
+    ARRAY[1, 5, 3, 9, 4]
+)
+WHERE edge <> -1 ORDER BY seq;
+ node_seq | node
+----------+------
+        1 |    1
+        2 |    2
+        3 |    5
+        4 |    6
+        5 |    9
+        6 |    4
+        7 |    3
+        8 |    6
+        9 |    9
+       10 |    4
+(10 rows)
+
+-- q5
+SELECT path_id, route_agg_cost FROM  pgr_dijkstraVia(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
+    ARRAY[1, 5, 3, 9, 4]
+)
+WHERE edge < 0;
+ path_id | route_agg_cost
+---------+----------------
+       1 |              2
+       2 |              6
+       3 |              8
+       4 |              9
+(4 rows)
+
+-- q6
+SELECT seq, route_agg_cost, node, agg_cost ,
+CASE WHEN edge = -1 THEN 'visits'
+ELSE 'passes in front'
+END as status
+FROM  pgr_dijkstraVia(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
+    ARRAY[1, 5, 3, 9, 4])
+WHERE node = 9 and (agg_cost  <> 0 or seq = 1);
+ seq | route_agg_cost | node | agg_cost |     status
+-----+----------------+------+----------+-----------------
+   6 |              4 |    9 |        2 | passes in front
+  11 |              8 |    9 |        2 | visits
+(2 rows)
+
+ROLLBACK;
+ROLLBACK
diff --git a/test/dijkstra/doc-pgr_dijkstraVia.test.sql b/test/dijkstra/doc-pgr_dijkstraVia.test.sql
new file mode 100644
index 0000000..9133326
--- /dev/null
+++ b/test/dijkstra/doc-pgr_dijkstraVia.test.sql
@@ -0,0 +1,61 @@
+-- documentation queries
+\echo --q00
+SELECT * FROM pgr_dijkstraVia(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
+    ARRAY[1, 3, 9]
+);
+\echo -- q0
+SELECT * FROM pgr_dijkstraVia(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
+    ARRAY[1, 3, 9], false, strict:=true, U_turn_on_edge:=false
+);
+
+\echo -- q1
+SELECT * FROM pgr_dijkstraVia(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
+    ARRAY[1, 5, 3, 9, 4]
+);
+
+\echo -- q2
+SELECT agg_cost FROM  pgr_dijkstraVia(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
+    ARRAY[1, 5, 3, 9, 4]
+)
+WHERE path_id = 3 AND edge <0;
+
+
+\echo -- q3
+SELECT route_agg_cost FROM  pgr_dijkstraVia(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
+    ARRAY[1, 5, 3, 9, 4]
+)
+WHERE path_id = 3 AND edge < 0;
+
+
+\echo -- q4
+SELECT row_number() over () as node_seq, node
+FROM  pgr_dijkstraVia(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
+    ARRAY[1, 5, 3, 9, 4]
+)
+WHERE edge <> -1 ORDER BY seq;
+
+
+\echo -- q5
+SELECT path_id, route_agg_cost FROM  pgr_dijkstraVia(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
+    ARRAY[1, 5, 3, 9, 4]
+)
+WHERE edge < 0;
+
+
+\echo -- q6
+SELECT seq, route_agg_cost, node, agg_cost ,
+CASE WHEN edge = -1 THEN 'visits'
+ELSE 'passes in front'
+END as status
+FROM  pgr_dijkstraVia(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table order by id',
+    ARRAY[1, 5, 3, 9, 4])
+WHERE node = 9 and (agg_cost  <> 0 or seq = 1);
+
diff --git a/src/dijkstra/test/test.conf b/test/dijkstra/test.conf
similarity index 100%
rename from src/dijkstra/test/test.conf
rename to test/dijkstra/test.conf
diff --git a/src/dijkstraTRSP/test/custom.result b/test/dijkstraTRSP/custom.result
similarity index 100%
rename from src/dijkstraTRSP/test/custom.result
rename to test/dijkstraTRSP/custom.result
diff --git a/src/dijkstraTRSP/test/custom.test.sql b/test/dijkstraTRSP/custom.test.sql
similarity index 100%
rename from src/dijkstraTRSP/test/custom.test.sql
rename to test/dijkstraTRSP/custom.test.sql
diff --git a/src/dijkstraTRSP/test/doc-dijkstraTRSP.result b/test/dijkstraTRSP/doc-dijkstraTRSP.result
similarity index 100%
rename from src/dijkstraTRSP/test/doc-dijkstraTRSP.result
rename to test/dijkstraTRSP/doc-dijkstraTRSP.result
diff --git a/src/dijkstraTRSP/test/doc-dijkstraTRSP.test.sql b/test/dijkstraTRSP/doc-dijkstraTRSP.test.sql
similarity index 100%
rename from src/dijkstraTRSP/test/doc-dijkstraTRSP.test.sql
rename to test/dijkstraTRSP/doc-dijkstraTRSP.test.sql
diff --git a/test/dijkstraTRSP/pgtap/custom.sql b/test/dijkstraTRSP/pgtap/custom.sql
new file mode 100644
index 0000000..f74226a
--- /dev/null
+++ b/test/dijkstraTRSP/pgtap/custom.sql
@@ -0,0 +1,163 @@
+\i setup.sql
+
+SELECT plan(7);
+
+SET client_min_messages TO WARNING;
+
+UPDATE edge_table SET cost = cost + 0.001 * id * id, reverse_cost = reverse_cost + 0.001 * id * id;
+
+SELECT todo_start();
+
+
+PREPARE q1 AS
+SELECT seq,
+       edge
+FROM pgr_dijkstraTRSP('SELECT id, source, target, cost, reverse_cost
+FROM edge_table', 'SELECT * FROM restrict WHERE id in (1)', 2, 8);
+
+PREPARE q2 AS
+SELECT seq, edge FROM ( VALUES
+	(1, 4),
+	(2, 8),
+	(3, 11),
+	(4, 12),
+	(5, 10),
+	(6, 7),
+	(7, -1) )
+AS t(seq, edge);
+
+SELECT set_eq('q1', 'q2', 'Testing from source 2 to target 8 with restriction on edges as follows 4 -> 7');
+
+
+
+PREPARE q3 AS
+SELECT seq,
+       edge
+FROM pgr_dijkstraTRSP('SELECT id, source, target, cost, reverse_cost
+FROM edge_table', 'SELECT * FROM restrict WHERE id in (2)', 8, 11);
+
+PREPARE q4 AS
+SELECT seq, edge FROM ( VALUES
+	(1, 7),
+	(2, 10),
+	(3, 12),
+	(4, -1) )
+AS t(seq, edge);
+
+SELECT set_eq('q3', 'q4', 'Testing from source 8 to target 11 with restriction on edges as follows 7 -> 8 -> 11');
+
+
+
+PREPARE q5 AS
+SELECT seq,
+       edge
+FROM pgr_dijkstraTRSP('SELECT id, source, target, cost, reverse_cost
+FROM edge_table', 'SELECT * FROM restrict WHERE id in (2, 3)', 7, 3);
+
+PREPARE q6 AS
+SELECT seq, edge FROM ( VALUES
+	(1, 6),
+	(2, 7),
+	(3, 8),
+	(4, 9),
+	(5, 16),
+	(6, 3),
+	(7, -1) )
+AS t(seq, edge);
+
+SELECT set_eq('q5', 'q6', 'Testing from source 7 to target 3 with restriction on edges as follows 7 -> 8 -> 11 and 7 -> 8 -> 5');
+
+
+
+PREPARE q7 AS
+SELECT seq,
+       edge
+FROM pgr_dijkstraTRSP('SELECT id, source, target, cost, reverse_cost
+FROM edge_table', 'SELECT * FROM restrict WHERE id in (4)', 7, 1);
+
+PREPARE q8 AS
+SELECT seq, edge FROM ( VALUES
+	(1, 6),
+	(2, 7),
+	(3, 8),
+	(4, 5),
+	(5, 2),
+	(6, 1),
+	(7, -1) )
+AS t(seq, edge);
+
+SELECT set_eq('q7', 'q8', 'Testing from source 7 to target 1 with restriction on edges as follows 7 -> 4');
+
+
+
+PREPARE q9 AS
+SELECT seq,
+       edge
+FROM pgr_dijkstraTRSP('SELECT id, source, target, cost, reverse_cost
+FROM edge_table', 'SELECT * FROM restrict WHERE id in (4, 5)', 8, 4);
+
+PREPARE q10 AS
+SELECT seq, edge FROM ( VALUES
+	(1, 7),
+	(2, 10),
+	(3, 12),
+	(4, 13),
+	(5, 15),
+	(6, 16),
+	(7, -1) )
+AS t(seq, edge);
+
+SELECT set_eq('q9', 'q10', 'Testing from source 8 to target 4 with restriction on edges as follows 7 -> 8 and 7 -> 4');
+
+
+
+PREPARE q11 AS
+SELECT seq,
+       edge
+FROM pgr_dijkstraTRSP('SELECT id, source, target, cost, reverse_cost
+FROM edge_table', 'SELECT * FROM restrict WHERE id in (4, 5)', 7, 1);
+
+PREPARE q12 AS
+SELECT seq, edge FROM ( VALUES
+	(1, 6),
+	(2, 7),
+	(3, 10),
+	(4, 12),
+	(5, 13),
+	(6, 15),
+	(7, 9),
+	(8, 5),
+	(9, 2),
+	(10, 1),
+	(11, -1) )
+AS t(seq, edge);
+
+SELECT set_eq('q11', 'q12', 'Testing from source 7 to target 1 with restriction on edges as follows 7 -> 8 and 7 -> 4');
+
+
+
+PREPARE q13 AS
+SELECT seq,
+       edge
+FROM pgr_dijkstraTRSP('SELECT id, source, target, cost, reverse_cost
+FROM edge_table', 'SELECT * FROM restrict WHERE id in (6, 7)', 12, 7);
+
+PREPARE q14 AS
+SELECT seq, edge FROM ( VALUES
+	(1, 15),
+	(2, 9),
+	(3, 5),
+	(4, 2),
+	(5, 4),
+	(6, 7),
+	(7, 6),
+	(8, -1) )
+AS t(seq, edge);
+
+SELECT set_eq('q13', 'q14', 'Testing from source 12 to target 7 with restriction on edges as follows 9 -> 11 and 9 -> 8');
+
+
+SELECT todo_end();
+
+SELECT finish();
+ROLLBACK;
diff --git a/src/dijkstraTRSP/test/pgtap/dijkstraTRSP-compare-dijkstra.sql b/test/dijkstraTRSP/pgtap/dijkstraTRSP-compare-dijkstra.sql
similarity index 100%
rename from src/dijkstraTRSP/test/pgtap/dijkstraTRSP-compare-dijkstra.sql
rename to test/dijkstraTRSP/pgtap/dijkstraTRSP-compare-dijkstra.sql
diff --git a/src/dijkstraTRSP/test/pgtap/dijkstraTRSP-innerQuery.sql b/test/dijkstraTRSP/pgtap/dijkstraTRSP-innerQuery.sql
similarity index 100%
rename from src/dijkstraTRSP/test/pgtap/dijkstraTRSP-innerQuery.sql
rename to test/dijkstraTRSP/pgtap/dijkstraTRSP-innerQuery.sql
diff --git a/src/dijkstraTRSP/test/pgtap/dijkstraTRSP-typesCheck.sql b/test/dijkstraTRSP/pgtap/dijkstraTRSP-typesCheck.sql
similarity index 100%
rename from src/dijkstraTRSP/test/pgtap/dijkstraTRSP-typesCheck.sql
rename to test/dijkstraTRSP/pgtap/dijkstraTRSP-typesCheck.sql
diff --git a/src/dijkstraTRSP/test/pgtap/empty_set_NO_default_strict.sql b/test/dijkstraTRSP/pgtap/empty_set_NO_default_strict.sql
similarity index 100%
rename from src/dijkstraTRSP/test/pgtap/empty_set_NO_default_strict.sql
rename to test/dijkstraTRSP/pgtap/empty_set_NO_default_strict.sql
diff --git a/src/dijkstraTRSP/test/pgtap/empty_set_default_strict.sql b/test/dijkstraTRSP/pgtap/empty_set_default_strict.sql
similarity index 100%
rename from src/dijkstraTRSP/test/pgtap/empty_set_default_strict.sql
rename to test/dijkstraTRSP/pgtap/empty_set_default_strict.sql
diff --git a/src/dijkstraTRSP/test/pgtap_design.result b/test/dijkstraTRSP/pgtap_design.result
similarity index 100%
rename from src/dijkstraTRSP/test/pgtap_design.result
rename to test/dijkstraTRSP/pgtap_design.result
diff --git a/src/dijkstraTRSP/test/pgtap_design.test.sql b/test/dijkstraTRSP/pgtap_design.test.sql
similarity index 100%
rename from src/dijkstraTRSP/test/pgtap_design.test.sql
rename to test/dijkstraTRSP/pgtap_design.test.sql
diff --git a/src/dijkstraTRSP/test/test.conf b/test/dijkstraTRSP/test.conf
similarity index 100%
rename from src/dijkstraTRSP/test/test.conf
rename to test/dijkstraTRSP/test.conf
diff --git a/src/driving_distance/test/dijksraDD-issue729.result b/test/driving_distance/dijksraDD-issue729.result
similarity index 100%
rename from src/driving_distance/test/dijksraDD-issue729.result
rename to test/driving_distance/dijksraDD-issue729.result
diff --git a/src/driving_distance/test/dijksraDD-issue729.test.sql b/test/driving_distance/dijksraDD-issue729.test.sql
similarity index 100%
rename from src/driving_distance/test/dijksraDD-issue729.test.sql
rename to test/driving_distance/dijksraDD-issue729.test.sql
diff --git a/test/driving_distance/doc-pgr_drivingDistance.result b/test/driving_distance/doc-pgr_drivingDistance.result
new file mode 100644
index 0000000..8758273
--- /dev/null
+++ b/test/driving_distance/doc-pgr_drivingDistance.result
@@ -0,0 +1,312 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+--q1
+SELECT * FROM pgr_drivingDistance(
+        'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+        2, 3
+      );
+ seq | node | edge | cost | agg_cost
+-----+------+------+------+----------
+   1 |    2 |   -1 |    0 |        0
+   2 |    1 |    1 |    1 |        1
+   3 |    5 |    4 |    1 |        1
+   4 |    6 |    8 |    1 |        2
+   5 |    8 |    7 |    1 |        2
+   6 |   10 |   10 |    1 |        2
+   7 |    7 |    6 |    1 |        3
+   8 |    9 |    9 |    1 |        3
+   9 |   11 |   12 |    1 |        3
+  10 |   13 |   14 |    1 |        3
+(10 rows)
+
+SELECT * FROM pgr_drivingDistance(
+        'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+        13, 3
+      );
+ seq | node | edge | cost | agg_cost
+-----+------+------+------+----------
+   1 |   13 |   -1 |    0 |        0
+   2 |   10 |   14 |    1 |        1
+   3 |    5 |   10 |    1 |        2
+   4 |   11 |   12 |    1 |        2
+   5 |    2 |    4 |    1 |        3
+   6 |    6 |    8 |    1 |        3
+   7 |    8 |    7 |    1 |        3
+   8 |   12 |   13 |    1 |        3
+(8 rows)
+
+SELECT * FROM pgr_drivingDistance(
+        'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+        array[2,13], 3
+      );
+ seq | from_v | node | edge | cost | agg_cost
+-----+--------+------+------+------+----------
+   1 |      2 |    2 |   -1 |    0 |        0
+   2 |      2 |    1 |    1 |    1 |        1
+   3 |      2 |    5 |    4 |    1 |        1
+   4 |      2 |    6 |    8 |    1 |        2
+   5 |      2 |    8 |    7 |    1 |        2
+   6 |      2 |   10 |   10 |    1 |        2
+   7 |      2 |    7 |    6 |    1 |        3
+   8 |      2 |    9 |    9 |    1 |        3
+   9 |      2 |   11 |   12 |    1 |        3
+  10 |      2 |   13 |   14 |    1 |        3
+  11 |     13 |   13 |   -1 |    0 |        0
+  12 |     13 |   10 |   14 |    1 |        1
+  13 |     13 |    5 |   10 |    1 |        2
+  14 |     13 |   11 |   12 |    1 |        2
+  15 |     13 |    2 |    4 |    1 |        3
+  16 |     13 |    6 |    8 |    1 |        3
+  17 |     13 |    8 |    7 |    1 |        3
+  18 |     13 |   12 |   13 |    1 |        3
+(18 rows)
+
+SELECT * FROM pgr_drivingDistance(
+        'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+        array[2,13], 3, equicost:=true
+      );
+ seq | from_v | node | edge | cost | agg_cost
+-----+--------+------+------+------+----------
+   1 |      2 |    2 |   -1 |    0 |        0
+   2 |      2 |    1 |    1 |    1 |        1
+   3 |      2 |    5 |    4 |    1 |        1
+   4 |      2 |    6 |    8 |    1 |        2
+   5 |      2 |    8 |    7 |    1 |        2
+   6 |      2 |    7 |    6 |    1 |        3
+   7 |      2 |    9 |    9 |    1 |        3
+   8 |     13 |   13 |   -1 |    0 |        0
+   9 |     13 |   10 |   14 |    1 |        1
+  10 |     13 |   11 |   12 |    1 |        2
+  11 |     13 |   12 |   13 |    1 |        3
+(11 rows)
+
+--q2
+SELECT * FROM pgr_drivingDistance(
+        'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+        2, 3, false
+      );
+ seq | node | edge | cost | agg_cost
+-----+------+------+------+----------
+   1 |    2 |   -1 |    0 |        0
+   2 |    1 |    1 |    1 |        1
+   3 |    3 |    2 |    1 |        1
+   4 |    5 |    4 |    1 |        1
+   5 |    4 |    3 |    1 |        2
+   6 |    6 |    8 |    1 |        2
+   7 |    8 |    7 |    1 |        2
+   8 |   10 |   10 |    1 |        2
+   9 |    7 |    6 |    1 |        3
+  10 |    9 |   16 |    1 |        3
+  11 |   11 |   12 |    1 |        3
+  12 |   13 |   14 |    1 |        3
+(12 rows)
+
+SELECT * FROM pgr_drivingDistance(
+        'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+        13, 3, false
+      );
+ seq | node | edge | cost | agg_cost
+-----+------+------+------+----------
+   1 |   13 |   -1 |    0 |        0
+   2 |   10 |   14 |    1 |        1
+   3 |    5 |   10 |    1 |        2
+   4 |   11 |   12 |    1 |        2
+   5 |    2 |    4 |    1 |        3
+   6 |    6 |    8 |    1 |        3
+   7 |    8 |    7 |    1 |        3
+   8 |   12 |   13 |    1 |        3
+(8 rows)
+
+SELECT * FROM pgr_drivingDistance(
+        'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+        array[2,13], 3, false
+      );
+ seq | from_v | node | edge | cost | agg_cost
+-----+--------+------+------+------+----------
+   1 |      2 |    2 |   -1 |    0 |        0
+   2 |      2 |    1 |    1 |    1 |        1
+   3 |      2 |    3 |    2 |    1 |        1
+   4 |      2 |    5 |    4 |    1 |        1
+   5 |      2 |    4 |    3 |    1 |        2
+   6 |      2 |    6 |    8 |    1 |        2
+   7 |      2 |    8 |    7 |    1 |        2
+   8 |      2 |   10 |   10 |    1 |        2
+   9 |      2 |    7 |    6 |    1 |        3
+  10 |      2 |    9 |   16 |    1 |        3
+  11 |      2 |   11 |   12 |    1 |        3
+  12 |      2 |   13 |   14 |    1 |        3
+  13 |     13 |   13 |   -1 |    0 |        0
+  14 |     13 |   10 |   14 |    1 |        1
+  15 |     13 |    5 |   10 |    1 |        2
+  16 |     13 |   11 |   12 |    1 |        2
+  17 |     13 |    2 |    4 |    1 |        3
+  18 |     13 |    6 |    8 |    1 |        3
+  19 |     13 |    8 |    7 |    1 |        3
+  20 |     13 |   12 |   13 |    1 |        3
+(20 rows)
+
+SELECT * FROM pgr_drivingDistance(
+        'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+        array[2,13], 3, false, equicost:=true
+      );
+ seq | from_v | node | edge | cost | agg_cost
+-----+--------+------+------+------+----------
+   1 |      2 |    2 |   -1 |    0 |        0
+   2 |      2 |    1 |    1 |    1 |        1
+   3 |      2 |    3 |    2 |    1 |        1
+   4 |      2 |    5 |    4 |    1 |        1
+   5 |      2 |    4 |    3 |    1 |        2
+   6 |      2 |    6 |    8 |    1 |        2
+   7 |      2 |    8 |    7 |    1 |        2
+   8 |      2 |    7 |    6 |    1 |        3
+   9 |      2 |    9 |   16 |    1 |        3
+  10 |     13 |   13 |   -1 |    0 |        0
+  11 |     13 |   10 |   14 |    1 |        1
+  12 |     13 |   11 |   12 |    1 |        2
+  13 |     13 |   12 |   13 |    1 |        3
+(13 rows)
+
+--q3
+SELECT * FROM pgr_drivingDistance(
+        'SELECT id, source, target, cost FROM edge_table',
+        2, 3
+      );
+ seq | node | edge | cost | agg_cost
+-----+------+------+------+----------
+   1 |    2 |   -1 |    0 |        0
+   2 |    5 |    4 |    1 |        1
+   3 |    6 |    8 |    1 |        2
+   4 |   10 |   10 |    1 |        2
+   5 |    9 |    9 |    1 |        3
+   6 |   11 |   11 |    1 |        3
+   7 |   13 |   14 |    1 |        3
+(7 rows)
+
+SELECT * FROM pgr_drivingDistance(
+        'SELECT id, source, target, cost FROM edge_table',
+        13, 3
+      );
+ seq | node | edge | cost | agg_cost
+-----+------+------+------+----------
+   1 |   13 |   -1 |    0 |        0
+(1 row)
+
+SELECT * FROM pgr_drivingDistance(
+        'SELECT id, source, target, cost FROM edge_table',
+        array[2,13], 3
+      );
+ seq | from_v | node | edge | cost | agg_cost
+-----+--------+------+------+------+----------
+   1 |      2 |    2 |   -1 |    0 |        0
+   2 |      2 |    5 |    4 |    1 |        1
+   3 |      2 |    6 |    8 |    1 |        2
+   4 |      2 |   10 |   10 |    1 |        2
+   5 |      2 |    9 |    9 |    1 |        3
+   6 |      2 |   11 |   11 |    1 |        3
+   7 |      2 |   13 |   14 |    1 |        3
+   8 |     13 |   13 |   -1 |    0 |        0
+(8 rows)
+
+SELECT * FROM pgr_drivingDistance(
+        'SELECT id, source, target, cost FROM edge_table',
+        array[2,13], 3, equicost:=true
+      );
+ seq | from_v | node | edge | cost | agg_cost
+-----+--------+------+------+------+----------
+   1 |      2 |    2 |   -1 |    0 |        0
+   2 |      2 |    5 |    4 |    1 |        1
+   3 |      2 |    6 |    8 |    1 |        2
+   4 |      2 |   10 |   10 |    1 |        2
+   5 |      2 |    9 |    9 |    1 |        3
+   6 |      2 |   11 |   11 |    1 |        3
+   7 |     13 |   13 |   -1 |    0 |        0
+(7 rows)
+
+--q4
+SELECT * FROM pgr_drivingDistance(
+        'SELECT id, source, target, cost FROM edge_table',
+        2, 3, false
+      );
+ seq | node | edge | cost | agg_cost
+-----+------+------+------+----------
+   1 |    2 |   -1 |    0 |        0
+   2 |    1 |    1 |    1 |        1
+   3 |    5 |    4 |    1 |        1
+   4 |    6 |    8 |    1 |        2
+   5 |    8 |    7 |    1 |        2
+   6 |   10 |   10 |    1 |        2
+   7 |    3 |    5 |    1 |        3
+   8 |    7 |    6 |    1 |        3
+   9 |    9 |    9 |    1 |        3
+  10 |   11 |   12 |    1 |        3
+  11 |   13 |   14 |    1 |        3
+(11 rows)
+
+SELECT * FROM pgr_drivingDistance(
+        'SELECT id, source, target, cost FROM edge_table',
+        13, 3, false
+      );
+ seq | node | edge | cost | agg_cost
+-----+------+------+------+----------
+   1 |   13 |   -1 |    0 |        0
+   2 |   10 |   14 |    1 |        1
+   3 |    5 |   10 |    1 |        2
+   4 |   11 |   12 |    1 |        2
+   5 |    2 |    4 |    1 |        3
+   6 |    6 |    8 |    1 |        3
+   7 |    8 |    7 |    1 |        3
+   8 |   12 |   13 |    1 |        3
+(8 rows)
+
+SELECT * FROM pgr_drivingDistance(
+        'SELECT id, source, target, cost FROM edge_table',
+        array[2,13], 3, false
+      );
+ seq | from_v | node | edge | cost | agg_cost
+-----+--------+------+------+------+----------
+   1 |      2 |    2 |   -1 |    0 |        0
+   2 |      2 |    1 |    1 |    1 |        1
+   3 |      2 |    5 |    4 |    1 |        1
+   4 |      2 |    6 |    8 |    1 |        2
+   5 |      2 |    8 |    7 |    1 |        2
+   6 |      2 |   10 |   10 |    1 |        2
+   7 |      2 |    3 |    5 |    1 |        3
+   8 |      2 |    7 |    6 |    1 |        3
+   9 |      2 |    9 |    9 |    1 |        3
+  10 |      2 |   11 |   12 |    1 |        3
+  11 |      2 |   13 |   14 |    1 |        3
+  12 |     13 |   13 |   -1 |    0 |        0
+  13 |     13 |   10 |   14 |    1 |        1
+  14 |     13 |    5 |   10 |    1 |        2
+  15 |     13 |   11 |   12 |    1 |        2
+  16 |     13 |    2 |    4 |    1 |        3
+  17 |     13 |    6 |    8 |    1 |        3
+  18 |     13 |    8 |    7 |    1 |        3
+  19 |     13 |   12 |   13 |    1 |        3
+(19 rows)
+
+SELECT * FROM pgr_drivingDistance(
+        'SELECT id, source, target, cost FROM edge_table',
+        array[2,13], 3, false, equicost:=true
+      );
+ seq | from_v | node | edge | cost | agg_cost
+-----+--------+------+------+------+----------
+   1 |      2 |    2 |   -1 |    0 |        0
+   2 |      2 |    1 |    1 |    1 |        1
+   3 |      2 |    5 |    4 |    1 |        1
+   4 |      2 |    6 |    8 |    1 |        2
+   5 |      2 |    8 |    7 |    1 |        2
+   6 |      2 |    3 |    5 |    1 |        3
+   7 |      2 |    7 |    6 |    1 |        3
+   8 |      2 |    9 |    9 |    1 |        3
+   9 |     13 |   13 |   -1 |    0 |        0
+  10 |     13 |   10 |   14 |    1 |        1
+  11 |     13 |   11 |   12 |    1 |        2
+  12 |     13 |   12 |   13 |    1 |        3
+(12 rows)
+
+--q5
+ROLLBACK;
+ROLLBACK
diff --git a/src/driving_distance/test/doc-pgr_drivingDistance.test.sql b/test/driving_distance/doc-pgr_drivingDistance.test.sql
similarity index 100%
rename from src/driving_distance/test/doc-pgr_drivingDistance.test.sql
rename to test/driving_distance/doc-pgr_drivingDistance.test.sql
diff --git a/src/driving_distance/test/test.conf b/test/driving_distance/test.conf
similarity index 100%
rename from src/driving_distance/test/test.conf
rename to test/driving_distance/test.conf
diff --git a/src/internalQueryTests/test/XYedge.result b/test/internalQueryTests/XYedge.result
similarity index 100%
rename from src/internalQueryTests/test/XYedge.result
rename to test/internalQueryTests/XYedge.result
diff --git a/src/internalQueryTests/test/XYedge.test.sql b/test/internalQueryTests/XYedge.test.sql
similarity index 100%
rename from src/internalQueryTests/test/XYedge.test.sql
rename to test/internalQueryTests/XYedge.test.sql
diff --git a/test/internalQueryTests/pgtap/matrixRows_types_check.sql b/test/internalQueryTests/pgtap/matrixRows_types_check.sql
new file mode 100644
index 0000000..03ff2a9
--- /dev/null
+++ b/test/internalQueryTests/pgtap/matrixRows_types_check.sql
@@ -0,0 +1,94 @@
+
+\i setup.sql
+
+SELECT plan(17);
+
+SELECT has_function('_pgr_test_matrixrows', ARRAY['text']);
+SELECT function_returns('_pgr_test_matrixrows', ARRAY['text'],'boolean');
+
+CREATE TEMP TABLE matrix AS
+SELECT * FROM pgr_dijkstracostMatrix('
+    SELECT id, source, target, cost, reverse_cost
+    FROM edge_table',
+    (SELECT array_agg(id) FROM edge_table_vertices_pgr));
+
+CREATE OR REPLACE FUNCTION test_anyInteger(fn TEXT, params TEXT[], parameter TEXT)
+RETURNS SETOF TEXT AS
+$BODY$
+DECLARE
+start_sql TEXT;
+end_sql TEXT;
+query TEXT;
+p TEXT;
+BEGIN
+    start_sql = 'select * from ' || fn || '($$ SELECT ';
+    FOREACH  p IN ARRAY params LOOP
+        IF p = parameter THEN CONTINUE;
+        END IF;
+        start_sql = start_sql || p || ', ';
+    END LOOP;
+    end_sql = ' FROM matrix $$ )';
+
+    query := start_sql || parameter || '::SMALLINT ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::INTEGER ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::BIGINT ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::REAL ' || end_sql;
+    RETURN query SELECT throws_ok(query);
+
+    query := start_sql || parameter || '::FLOAT8 ' || end_sql;
+    RETURN query SELECT throws_ok(query);
+END;
+$BODY$ LANGUAGE plpgsql;
+
+CREATE OR REPLACE FUNCTION test_anyNumerical(fn TEXT, params TEXT[], parameter TEXT)
+RETURNS SETOF TEXT AS
+$BODY$
+DECLARE
+start_sql TEXT;
+end_sql TEXT;
+query TEXT;
+p TEXT;
+BEGIN
+    start_sql = 'select * from ' || fn || '($$ SELECT ';
+    FOREACH  p IN ARRAY params LOOP
+        IF p = parameter THEN CONTINUE;
+        END IF;
+        start_sql = start_sql || p || ', ';
+    END LOOP;
+    end_sql = ' FROM matrix $$ )';
+
+    query := start_sql || parameter || '::SMALLINT ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::INTEGER ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::BIGINT ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::REAL ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::FLOAT8 ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+END;
+$BODY$ LANGUAGE plpgsql;
+
+SELECT test_anyInteger('_pgr_test_matrixrows',
+    ARRAY['start_vid', 'end_vid', 'agg_cost'],
+    'start_vid');
+SELECT test_anyInteger('_pgr_test_matrixrows',
+    ARRAY['start_vid', 'end_vid', 'agg_cost'],
+    'end_vid');
+SELECT test_anyNumerical('_pgr_test_matrixrows',
+    ARRAY['start_vid', 'end_vid', 'agg_cost'],
+    'agg_cost');
+
+SELECT finish();
+ROLLBACK;
diff --git a/test/internalQueryTests/pgtap/testXYedges_types_check.sql b/test/internalQueryTests/pgtap/testXYedges_types_check.sql
new file mode 100644
index 0000000..eec4192
--- /dev/null
+++ b/test/internalQueryTests/pgtap/testXYedges_types_check.sql
@@ -0,0 +1,133 @@
+
+\i setup.sql
+
+SELECT plan(87);
+
+SELECT has_function('_pgr_testxyedges', ARRAY['text']);
+SELECT function_returns('_pgr_testxyedges', ARRAY['text'],'boolean');
+
+CREATE OR REPLACE FUNCTION test_anyInteger(fn TEXT, params TEXT[], parameter TEXT)
+RETURNS SETOF TEXT AS
+$BODY$
+DECLARE
+start_sql TEXT;
+end_sql TEXT;
+query TEXT;
+p TEXT;
+BEGIN
+    start_sql = 'select * from ' || fn || '($$ SELECT ';
+    FOREACH  p IN ARRAY params LOOP
+        IF p = parameter THEN CONTINUE;
+        END IF;
+        start_sql = start_sql || p || ', ';
+    END LOOP;
+    end_sql = ' FROM edge_table $$ )';
+
+    query := start_sql || parameter || '::SMALLINT ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::INTEGER ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::BIGINT ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::REAL ' || end_sql;
+    RETURN query SELECT throws_ok(query);
+
+    query := start_sql || parameter || '::FLOAT8 ' || end_sql;
+    RETURN query SELECT throws_ok(query);
+END;
+$BODY$ LANGUAGE plpgsql;
+
+CREATE OR REPLACE FUNCTION test_anyNumerical(fn TEXT, params TEXT[], parameter TEXT)
+RETURNS SETOF TEXT AS
+$BODY$
+DECLARE
+start_sql TEXT;
+end_sql TEXT;
+query TEXT;
+p TEXT;
+BEGIN
+    start_sql = 'select * from ' || fn || '($$ SELECT ';
+    FOREACH  p IN ARRAY params LOOP
+        IF p = parameter THEN CONTINUE;
+        END IF;
+        start_sql = start_sql || p || ', ';
+    END LOOP;
+    end_sql = ' FROM edge_table $$ )';
+
+    query := start_sql || parameter || '::SMALLINT ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::INTEGER ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::BIGINT ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::REAL ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::FLOAT8 ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+END;
+$BODY$ LANGUAGE plpgsql;
+
+SELECT test_anyInteger('_pgr_testxyedges',
+    ARRAY['id', 'source', 'target', 'cost', 'reverse_cost', 'x1', 'y1', 'x2', 'y2'],
+    'id');
+SELECT test_anyInteger('_pgr_testxyedges',
+    ARRAY['id', 'source', 'target', 'cost', 'reverse_cost', 'x1', 'y1', 'x2', 'y2'],
+    'source');
+SELECT test_anyInteger('_pgr_testxyedges',
+    ARRAY['id', 'source', 'target', 'cost', 'reverse_cost', 'x1', 'y1', 'x2', 'y2'],
+    'target');
+SELECT test_anyNumerical('_pgr_testxyedges',
+    ARRAY['id', 'source', 'target', 'cost', 'reverse_cost', 'x1', 'y1', 'x2', 'y2'],
+    'cost');
+SELECT test_anyNumerical('_pgr_testxyedges',
+    ARRAY['id', 'source', 'target', 'cost', 'reverse_cost', 'x1', 'y1', 'x2', 'y2'],
+    'reverse_cost');
+SELECT test_anyNumerical('_pgr_testxyedges',
+    ARRAY['id', 'source', 'target', 'cost', 'reverse_cost', 'x1', 'y1', 'x2', 'y2'],
+    'x1');
+SELECT test_anyNumerical('_pgr_testxyedges',
+    ARRAY['id', 'source', 'target', 'cost', 'reverse_cost', 'x1', 'y1', 'x2', 'y2'],
+    'y1');
+SELECT test_anyNumerical('_pgr_testxyedges',
+    ARRAY['id', 'source', 'target', 'cost', 'reverse_cost', 'x1', 'y1', 'x2', 'y2'],
+    'x2');
+SELECT test_anyNumerical('_pgr_testxyedges',
+    ARRAY['id', 'source', 'target', 'cost', 'reverse_cost', 'x1', 'y1', 'x2', 'y2'],
+    'y2');
+
+
+SELECT test_anyInteger('_pgr_testxyedges',
+    ARRAY['id', 'source', 'target', 'cost', 'x1', 'y1', 'x2', 'y2'],
+    'id');
+SELECT test_anyInteger('_pgr_testxyedges',
+    ARRAY['id', 'source', 'target', 'cost', 'x1', 'y1', 'x2', 'y2'],
+    'source');
+SELECT test_anyInteger('_pgr_testxyedges',
+    ARRAY['id', 'source', 'target', 'cost', 'x1', 'y1', 'x2', 'y2'],
+    'target');
+SELECT test_anyNumerical('_pgr_testxyedges',
+    ARRAY['id', 'source', 'target', 'cost', 'x1', 'y1', 'x2', 'y2'],
+    'cost');
+SELECT test_anyNumerical('_pgr_testxyedges',
+    ARRAY['id', 'source', 'target', 'cost', 'x1', 'y1', 'x2', 'y2'],
+    'x1');
+SELECT test_anyNumerical('_pgr_testxyedges',
+    ARRAY['id', 'source', 'target', 'cost', 'x1', 'y1', 'x2', 'y2'],
+    'y1');
+SELECT test_anyNumerical('_pgr_testxyedges',
+    ARRAY['id', 'source', 'target', 'cost', 'x1', 'y1', 'x2', 'y2'],
+    'x2');
+SELECT test_anyNumerical('_pgr_testxyedges',
+    ARRAY['id', 'source', 'target', 'cost', 'x1', 'y1', 'x2', 'y2'],
+    'y2');
+
+
+SELECT finish();
+ROLLBACK;
diff --git a/src/internalQueryTests/test/test.conf b/test/internalQueryTests/test.conf
similarity index 100%
rename from src/internalQueryTests/test/test.conf
rename to test/internalQueryTests/test.conf
diff --git a/src/internalQueryTests/test/testCHedges.result b/test/internalQueryTests/testCHedges.result
similarity index 100%
rename from src/internalQueryTests/test/testCHedges.result
rename to test/internalQueryTests/testCHedges.result
diff --git a/src/internalQueryTests/test/testCHedges.test.sql b/test/internalQueryTests/testCHedges.test.sql
similarity index 100%
rename from src/internalQueryTests/test/testCHedges.test.sql
rename to test/internalQueryTests/testCHedges.test.sql
diff --git a/test/ksp/doc-ksp.result b/test/ksp/doc-ksp.result
new file mode 100644
index 0000000..1e78392
--- /dev/null
+++ b/test/ksp/doc-ksp.result
@@ -0,0 +1,274 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+--q1
+SELECT * FROM pgr_KSP(
+     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+      2, 12, 2,
+      directed:=true
+   );
+ seq | path_id | path_seq | node | edge | cost | agg_cost
+-----+---------+----------+------+------+------+----------
+   1 |       1 |        1 |    2 |    4 |    1 |        0
+   2 |       1 |        2 |    5 |    8 |    1 |        1
+   3 |       1 |        3 |    6 |    9 |    1 |        2
+   4 |       1 |        4 |    9 |   15 |    1 |        3
+   5 |       1 |        5 |   12 |   -1 |    0 |        4
+   6 |       2 |        1 |    2 |    4 |    1 |        0
+   7 |       2 |        2 |    5 |    8 |    1 |        1
+   8 |       2 |        3 |    6 |   11 |    1 |        2
+   9 |       2 |        4 |   11 |   13 |    1 |        3
+  10 |       2 |        5 |   12 |   -1 |    0 |        4
+(10 rows)
+
+SELECT * FROM pgr_KSP(
+     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+      2, 12, 2
+   );
+ seq | path_id | path_seq | node | edge | cost | agg_cost
+-----+---------+----------+------+------+------+----------
+   1 |       1 |        1 |    2 |    4 |    1 |        0
+   2 |       1 |        2 |    5 |    8 |    1 |        1
+   3 |       1 |        3 |    6 |    9 |    1 |        2
+   4 |       1 |        4 |    9 |   15 |    1 |        3
+   5 |       1 |        5 |   12 |   -1 |    0 |        4
+   6 |       2 |        1 |    2 |    4 |    1 |        0
+   7 |       2 |        2 |    5 |    8 |    1 |        1
+   8 |       2 |        3 |    6 |   11 |    1 |        2
+   9 |       2 |        4 |   11 |   13 |    1 |        3
+  10 |       2 |        5 |   12 |   -1 |    0 |        4
+(10 rows)
+
+--q2
+SELECT * FROM pgr_KSP(
+     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+      2, 12, 2
+   );
+ seq | path_id | path_seq | node | edge | cost | agg_cost
+-----+---------+----------+------+------+------+----------
+   1 |       1 |        1 |    2 |    4 |    1 |        0
+   2 |       1 |        2 |    5 |    8 |    1 |        1
+   3 |       1 |        3 |    6 |    9 |    1 |        2
+   4 |       1 |        4 |    9 |   15 |    1 |        3
+   5 |       1 |        5 |   12 |   -1 |    0 |        4
+   6 |       2 |        1 |    2 |    4 |    1 |        0
+   7 |       2 |        2 |    5 |    8 |    1 |        1
+   8 |       2 |        3 |    6 |   11 |    1 |        2
+   9 |       2 |        4 |   11 |   13 |    1 |        3
+  10 |       2 |        5 |   12 |   -1 |    0 |        4
+(10 rows)
+
+SELECT * FROM pgr_KSP(
+     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+      2, 12, 2, heap_paths:=true
+   );
+ seq | path_id | path_seq | node | edge | cost | agg_cost
+-----+---------+----------+------+------+------+----------
+   1 |       1 |        1 |    2 |    4 |    1 |        0
+   2 |       1 |        2 |    5 |    8 |    1 |        1
+   3 |       1 |        3 |    6 |    9 |    1 |        2
+   4 |       1 |        4 |    9 |   15 |    1 |        3
+   5 |       1 |        5 |   12 |   -1 |    0 |        4
+   6 |       2 |        1 |    2 |    4 |    1 |        0
+   7 |       2 |        2 |    5 |    8 |    1 |        1
+   8 |       2 |        3 |    6 |   11 |    1 |        2
+   9 |       2 |        4 |   11 |   13 |    1 |        3
+  10 |       2 |        5 |   12 |   -1 |    0 |        4
+  11 |       3 |        1 |    2 |    4 |    1 |        0
+  12 |       3 |        2 |    5 |   10 |    1 |        1
+  13 |       3 |        3 |   10 |   12 |    1 |        2
+  14 |       3 |        4 |   11 |   13 |    1 |        3
+  15 |       3 |        5 |   12 |   -1 |    0 |        4
+(15 rows)
+
+SELECT * FROM pgr_KSP(
+     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+      2, 12, 2, true, true
+   );
+ seq | path_id | path_seq | node | edge | cost | agg_cost
+-----+---------+----------+------+------+------+----------
+   1 |       1 |        1 |    2 |    4 |    1 |        0
+   2 |       1 |        2 |    5 |    8 |    1 |        1
+   3 |       1 |        3 |    6 |    9 |    1 |        2
+   4 |       1 |        4 |    9 |   15 |    1 |        3
+   5 |       1 |        5 |   12 |   -1 |    0 |        4
+   6 |       2 |        1 |    2 |    4 |    1 |        0
+   7 |       2 |        2 |    5 |    8 |    1 |        1
+   8 |       2 |        3 |    6 |   11 |    1 |        2
+   9 |       2 |        4 |   11 |   13 |    1 |        3
+  10 |       2 |        5 |   12 |   -1 |    0 |        4
+  11 |       3 |        1 |    2 |    4 |    1 |        0
+  12 |       3 |        2 |    5 |   10 |    1 |        1
+  13 |       3 |        3 |   10 |   12 |    1 |        2
+  14 |       3 |        4 |   11 |   13 |    1 |        3
+  15 |       3 |        5 |   12 |   -1 |    0 |        4
+(15 rows)
+
+--q3
+SELECT * FROM pgr_KSP(
+     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+      2, 12, 2, directed:=false
+   );
+ seq | path_id | path_seq | node | edge | cost | agg_cost
+-----+---------+----------+------+------+------+----------
+   1 |       1 |        1 |    2 |    2 |    1 |        0
+   2 |       1 |        2 |    3 |    3 |    1 |        1
+   3 |       1 |        3 |    4 |   16 |    1 |        2
+   4 |       1 |        4 |    9 |   15 |    1 |        3
+   5 |       1 |        5 |   12 |   -1 |    0 |        4
+   6 |       2 |        1 |    2 |    4 |    1 |        0
+   7 |       2 |        2 |    5 |    8 |    1 |        1
+   8 |       2 |        3 |    6 |   11 |    1 |        2
+   9 |       2 |        4 |   11 |   13 |    1 |        3
+  10 |       2 |        5 |   12 |   -1 |    0 |        4
+(10 rows)
+
+SELECT * FROM pgr_KSP(
+     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+      2, 12, 2, false, true
+   );
+ seq | path_id | path_seq | node | edge | cost | agg_cost
+-----+---------+----------+------+------+------+----------
+   1 |       1 |        1 |    2 |    2 |    1 |        0
+   2 |       1 |        2 |    3 |    3 |    1 |        1
+   3 |       1 |        3 |    4 |   16 |    1 |        2
+   4 |       1 |        4 |    9 |   15 |    1 |        3
+   5 |       1 |        5 |   12 |   -1 |    0 |        4
+   6 |       2 |        1 |    2 |    4 |    1 |        0
+   7 |       2 |        2 |    5 |    8 |    1 |        1
+   8 |       2 |        3 |    6 |   11 |    1 |        2
+   9 |       2 |        4 |   11 |   13 |    1 |        3
+  10 |       2 |        5 |   12 |   -1 |    0 |        4
+  11 |       3 |        1 |    2 |    4 |    1 |        0
+  12 |       3 |        2 |    5 |   10 |    1 |        1
+  13 |       3 |        3 |   10 |   12 |    1 |        2
+  14 |       3 |        4 |   11 |   13 |    1 |        3
+  15 |       3 |        5 |   12 |   -1 |    0 |        4
+  16 |       4 |        1 |    2 |    4 |    1 |        0
+  17 |       4 |        2 |    5 |   10 |    1 |        1
+  18 |       4 |        3 |   10 |   12 |    1 |        2
+  19 |       4 |        4 |   11 |   11 |    1 |        3
+  20 |       4 |        5 |    6 |    9 |    1 |        4
+  21 |       4 |        6 |    9 |   15 |    1 |        5
+  22 |       4 |        7 |   12 |   -1 |    0 |        6
+(22 rows)
+
+--q4
+SELECT  * FROM pgr_KSP(
+     'SELECT id, source, target, cost FROM edge_table',
+      2, 3, 2
+   );
+ seq | path_id | path_seq | node | edge | cost | agg_cost
+-----+---------+----------+------+------+------+----------
+(0 rows)
+
+SELECT  * FROM pgr_KSP(
+     'SELECT id, source, target, cost FROM edge_table',
+      2, 12, 2
+   );
+ seq | path_id | path_seq | node | edge | cost | agg_cost
+-----+---------+----------+------+------+------+----------
+   1 |       1 |        1 |    2 |    4 |    1 |        0
+   2 |       1 |        2 |    5 |    8 |    1 |        1
+   3 |       1 |        3 |    6 |    9 |    1 |        2
+   4 |       1 |        4 |    9 |   15 |    1 |        3
+   5 |       1 |        5 |   12 |   -1 |    0 |        4
+   6 |       2 |        1 |    2 |    4 |    1 |        0
+   7 |       2 |        2 |    5 |    8 |    1 |        1
+   8 |       2 |        3 |    6 |   11 |    1 |        2
+   9 |       2 |        4 |   11 |   13 |    1 |        3
+  10 |       2 |        5 |   12 |   -1 |    0 |        4
+(10 rows)
+
+SELECT   * FROM pgr_KSP(
+     'SELECT id, source, target, cost FROM edge_table',
+      2, 12, 2, heap_paths:=true
+   );
+ seq | path_id | path_seq | node | edge | cost | agg_cost
+-----+---------+----------+------+------+------+----------
+   1 |       1 |        1 |    2 |    4 |    1 |        0
+   2 |       1 |        2 |    5 |    8 |    1 |        1
+   3 |       1 |        3 |    6 |    9 |    1 |        2
+   4 |       1 |        4 |    9 |   15 |    1 |        3
+   5 |       1 |        5 |   12 |   -1 |    0 |        4
+   6 |       2 |        1 |    2 |    4 |    1 |        0
+   7 |       2 |        2 |    5 |    8 |    1 |        1
+   8 |       2 |        3 |    6 |   11 |    1 |        2
+   9 |       2 |        4 |   11 |   13 |    1 |        3
+  10 |       2 |        5 |   12 |   -1 |    0 |        4
+  11 |       3 |        1 |    2 |    4 |    1 |        0
+  12 |       3 |        2 |    5 |   10 |    1 |        1
+  13 |       3 |        3 |   10 |   12 |    1 |        2
+  14 |       3 |        4 |   11 |   13 |    1 |        3
+  15 |       3 |        5 |   12 |   -1 |    0 |        4
+(15 rows)
+
+SELECT  * FROM pgr_KSP(
+     'SELECT id, source, target, cost FROM edge_table',
+      2, 12, 2, true, true
+   );
+ seq | path_id | path_seq | node | edge | cost | agg_cost
+-----+---------+----------+------+------+------+----------
+   1 |       1 |        1 |    2 |    4 |    1 |        0
+   2 |       1 |        2 |    5 |    8 |    1 |        1
+   3 |       1 |        3 |    6 |    9 |    1 |        2
+   4 |       1 |        4 |    9 |   15 |    1 |        3
+   5 |       1 |        5 |   12 |   -1 |    0 |        4
+   6 |       2 |        1 |    2 |    4 |    1 |        0
+   7 |       2 |        2 |    5 |    8 |    1 |        1
+   8 |       2 |        3 |    6 |   11 |    1 |        2
+   9 |       2 |        4 |   11 |   13 |    1 |        3
+  10 |       2 |        5 |   12 |   -1 |    0 |        4
+  11 |       3 |        1 |    2 |    4 |    1 |        0
+  12 |       3 |        2 |    5 |   10 |    1 |        1
+  13 |       3 |        3 |   10 |   12 |    1 |        2
+  14 |       3 |        4 |   11 |   13 |    1 |        3
+  15 |       3 |        5 |   12 |   -1 |    0 |        4
+(15 rows)
+
+--q5
+SELECT  * FROM pgr_KSP(
+     'SELECT id, source, target, cost FROM edge_table',
+      2, 12, 2, directed:=false
+   );
+ seq | path_id | path_seq | node | edge | cost | agg_cost
+-----+---------+----------+------+------+------+----------
+   1 |       1 |        1 |    2 |    4 |    1 |        0
+   2 |       1 |        2 |    5 |    8 |    1 |        1
+   3 |       1 |        3 |    6 |    9 |    1 |        2
+   4 |       1 |        4 |    9 |   15 |    1 |        3
+   5 |       1 |        5 |   12 |   -1 |    0 |        4
+   6 |       2 |        1 |    2 |    4 |    1 |        0
+   7 |       2 |        2 |    5 |    8 |    1 |        1
+   8 |       2 |        3 |    6 |   11 |    1 |        2
+   9 |       2 |        4 |   11 |   13 |    1 |        3
+  10 |       2 |        5 |   12 |   -1 |    0 |        4
+(10 rows)
+
+SELECT  * FROM pgr_KSP(
+     'SELECT id, source, target, cost FROM edge_table',
+      2, 12, 2, directed:=false, heap_paths:=true
+   );
+ seq | path_id | path_seq | node | edge | cost | agg_cost
+-----+---------+----------+------+------+------+----------
+   1 |       1 |        1 |    2 |    4 |    1 |        0
+   2 |       1 |        2 |    5 |    8 |    1 |        1
+   3 |       1 |        3 |    6 |    9 |    1 |        2
+   4 |       1 |        4 |    9 |   15 |    1 |        3
+   5 |       1 |        5 |   12 |   -1 |    0 |        4
+   6 |       2 |        1 |    2 |    4 |    1 |        0
+   7 |       2 |        2 |    5 |    8 |    1 |        1
+   8 |       2 |        3 |    6 |   11 |    1 |        2
+   9 |       2 |        4 |   11 |   13 |    1 |        3
+  10 |       2 |        5 |   12 |   -1 |    0 |        4
+  11 |       3 |        1 |    2 |    4 |    1 |        0
+  12 |       3 |        2 |    5 |   10 |    1 |        1
+  13 |       3 |        3 |   10 |   12 |    1 |        2
+  14 |       3 |        4 |   11 |   13 |    1 |        3
+  15 |       3 |        5 |   12 |   -1 |    0 |        4
+(15 rows)
+
+--q6
+ROLLBACK;
+ROLLBACK
diff --git a/test/ksp/doc-ksp.test.sql b/test/ksp/doc-ksp.test.sql
new file mode 100644
index 0000000..571f7c4
--- /dev/null
+++ b/test/ksp/doc-ksp.test.sql
@@ -0,0 +1,87 @@
+--------------------------------------------------------------------------------
+--              PGR_KSP V3
+--------------------------------------------------------------------------------
+
+\echo --q1
+
+   SELECT * FROM pgr_KSP(
+     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+      2, 12, 2,
+      directed:=true   -- takes the new signature
+   );
+
+   SELECT * FROM pgr_KSP(
+     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+      2, 12, 2
+   );
+
+\echo --q2
+
+   SELECT * FROM pgr_KSP(
+     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+      2, 12, 2
+   );
+
+
+   SELECT * FROM pgr_KSP(
+     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+      2, 12, 2, heap_paths:=true
+   );
+
+   SELECT * FROM pgr_KSP(
+     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+      2, 12, 2, true, true
+   );
+
+
+\echo --q3
+
+  SELECT * FROM pgr_KSP(
+     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+      2, 12, 2, directed:=false
+   );
+
+  SELECT * FROM pgr_KSP(
+     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+      2, 12, 2, false, true
+   );
+
+
+\echo --q4
+
+  SELECT  * FROM pgr_KSP(
+     'SELECT id, source, target, cost FROM edge_table',
+      2, 3, 2
+   );
+
+
+  SELECT  * FROM pgr_KSP(
+     'SELECT id, source, target, cost FROM edge_table',
+      2, 12, 2
+   );
+
+  SELECT   * FROM pgr_KSP(
+     'SELECT id, source, target, cost FROM edge_table',
+      2, 12, 2, heap_paths:=true
+   );
+
+  SELECT  * FROM pgr_KSP(
+     'SELECT id, source, target, cost FROM edge_table',
+      2, 12, 2, true, true
+   );
+
+
+\echo --q5
+
+  SELECT  * FROM pgr_KSP(
+     'SELECT id, source, target, cost FROM edge_table',
+      2, 12, 2, directed:=false
+   );
+
+  SELECT  * FROM pgr_KSP(
+     'SELECT id, source, target, cost FROM edge_table',
+      2, 12, 2, directed:=false, heap_paths:=true
+   );
+
+
+\echo --q6
diff --git a/src/ksp/test/test.conf b/test/ksp/test.conf
similarity index 100%
rename from src/ksp/test/test.conf
rename to test/ksp/test.conf
diff --git a/test/label_graph/doc-pgr_labelGraph.result b/test/label_graph/doc-pgr_labelGraph.result
new file mode 100644
index 0000000..6ddccba
--- /dev/null
+++ b/test/label_graph/doc-pgr_labelGraph.result
@@ -0,0 +1,24 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+--q1
+SET client_min_messages TO WARNING;
+SET
+SELECT pgr_labelGraph('edge_table', 'id', 'source', 'target', 'subgraph');
+ pgr_labelgraph
+----------------
+ OK
+(1 row)
+
+SELECT DISTINCT subgraph FROM edge_table ORDER BY subgraph;
+ subgraph
+----------
+        1
+        2
+        3
+(3 rows)
+
+--q2
+ROLLBACK;
+ROLLBACK
diff --git a/src/label_graph/test/doc-pgr_labelGraph.test.sql b/test/label_graph/doc-pgr_labelGraph.test.sql
similarity index 100%
rename from src/label_graph/test/doc-pgr_labelGraph.test.sql
rename to test/label_graph/doc-pgr_labelGraph.test.sql
diff --git a/src/label_graph/test/pgrouting_labelgraph.data b/test/label_graph/pgrouting_labelgraph.data
similarity index 100%
rename from src/label_graph/test/pgrouting_labelgraph.data
rename to test/label_graph/pgrouting_labelgraph.data
diff --git a/src/label_graph/test/pgrouting_labelgraph.result b/test/label_graph/pgrouting_labelgraph.result
similarity index 100%
rename from src/label_graph/test/pgrouting_labelgraph.result
rename to test/label_graph/pgrouting_labelgraph.result
diff --git a/test/label_graph/pgrouting_labelgraph.test.sql b/test/label_graph/pgrouting_labelgraph.test.sql
new file mode 100644
index 0000000..ce69291
--- /dev/null
+++ b/test/label_graph/pgrouting_labelgraph.test.sql
@@ -0,0 +1,72 @@
+/*PGR-GNU*****************************************************************
+
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+drop table if exists "ways";
+
+-- The following should be OK
+
+	select pgr_labelGraph('ways');
+	select pgr_labelGraph('Ways');
+	select pgr_labelGraph('ways', 'id');
+	select pgr_labelGraph('ways', 'id', 'source');
+	select pgr_labelGraph('ways', 'id', 'source', 'target');
+	select pgr_labelGraph('ways', 'id', 'source', 'target', 'subgraph');
+	select pgr_labelGraph('ways', 'id', 'source', 'target', 'subgraph', 'id<100');
+
+	-- When table located in another schema e03
+	select pgr_labelGraph('e03.ways');
+	select pgr_labelGraph('e03.Ways');
+	select pgr_labelGraph('e03.ways', 'id');
+	select pgr_labelGraph('e03.ways', 'id', 'source');
+	select pgr_labelGraph('e03.ways', 'id', 'source', 'target');
+	select pgr_labelGraph('e03.ways', 'id', 'source', 'target', 'subgraph');
+	select pgr_labelGraph('e03.ways', 'id', 'source', 'target', 'subgraph', 'id<100');
+
+	-- When using the named notation
+	select pgr_labelGraph('e03.calles', target:='destino', subgraph:='subgraph', id:='gido', source:='salida');
+	select pgr_labelGraph('e03.calles', rows_where:='gido<100', id:='gido', source:='salida', target:='destino', subgraph:='subgraph');
+
+-- The following should FAIL
+
+	select pgr_labelGraph('id', 'ways');
+	select pgr_labelGraph('ways', 'id', 'sourc', 'target');
+	select pgr_labelGraph('ways', 'id', 'source', 'Target');
+	select pgr_labelGraph('ways', 'id', 'source', 'target', 'subgraph', 'id<');
+
+	-- When table located in another schema e03
+	select pgr_labelGraph('e03.calles');
+	select pgr_labelGraph('e03.Calles');
+	select pgr_labelGraph('id', 'e03.calles');
+	select pgr_labelGraph('e03.calles', 'id', 'sourc', 'target');
+	select pgr_labelGraph('e03.calles', 'gido', 'source', 'target', 'subgraph', 'id<');
+	select pgr_labelGraph('e03.calles', 'gid', 'salida', 'target', 'subgraph', 'id<10');
+	select pgr_labelGraph('e03.calles', 'gid', 'salida', 'destino', 'subgraph', 'id<10 AND id>100');
+
+	-- When using the named notation
+	select pgr_labelGraph('e03.calles', target:='destino', subgraph:='subgraph', id:='gido');
+	select pgr_labelGraph('e03.calles', target:='destino', subgraph:='subgraph', id:='gido', source:='salido');
+	select pgr_labelGraph(rows_where:='gido<100', id:='gido', source:='salida', 'e03.calles', target:='destino', subgraph:='subgraph');
+
+-- The following should return "rows_where condition generated 0 rows"
+
+	select pgr_labelGraph('ways', 'id', 'source', 'target', 'subgraph', 'id<10 AND id>100');
+	select pgr_labelGraph('e03.calles', id:='gido', rows_where:='gido<100 AND gido>200', source:='salida', target:='destino', subgraph:='subgraph');
diff --git a/test/label_graph/test.conf b/test/label_graph/test.conf
new file mode 100644
index 0000000..add7c0b
--- /dev/null
+++ b/test/label_graph/test.conf
@@ -0,0 +1,21 @@
+#!/usr/bin/perl -w
+
+%main::tests = (
+    'any' => {
+        'comment' => 'pgr_labelGraph tests for any versions.',
+        'data' => [' '],
+        'tests' => [qw(
+            doc-pgr_labelGraph
+)],
+        'documentation' => [qw(
+            doc-pgr_labelGraph
+)],
+
+
+        },
+# 'vpg-vpgis' => {}, # for version specific tests
+# '8-1' => {}, # for pg 8.x and postgis 1.x
+# '9.2-2.1' => {}, # for pg 9.2 and postgis 2.1
+);
+
+1;
diff --git a/test/lineGraph/doc-pgr_lineGraph.result b/test/lineGraph/doc-pgr_lineGraph.result
new file mode 100644
index 0000000..7f5831d
--- /dev/null
+++ b/test/lineGraph/doc-pgr_lineGraph.result
@@ -0,0 +1,83 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- q1
+SELECT * FROM pgr_lineGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table'
+);
+ seq | source | target | cost | reverse_cost
+-----+--------+--------+------+--------------
+   1 |    -18 |     18 |    1 |            1
+   2 |    -17 |     17 |    1 |            1
+   3 |    -16 |     -3 |    1 |           -1
+   4 |    -16 |     16 |    1 |            1
+   5 |    -15 |     -9 |    1 |            1
+   6 |    -15 |     15 |    1 |            1
+   7 |    -14 |    -10 |    1 |            1
+   8 |    -14 |     12 |    1 |           -1
+   9 |    -14 |     14 |    1 |            1
+  10 |    -10 |     -7 |    1 |            1
+  11 |    -10 |     -4 |    1 |            1
+  12 |    -10 |      8 |    1 |            1
+  13 |    -10 |     10 |    1 |            1
+  14 |     -9 |     -8 |    1 |            1
+  15 |     -9 |      9 |    1 |            1
+  16 |     -9 |     11 |    1 |           -1
+  17 |     -8 |     -7 |    1 |            1
+  18 |     -8 |     -4 |    1 |            1
+  19 |     -8 |      8 |    1 |            1
+  20 |     -7 |     -6 |    1 |            1
+  21 |     -6 |      6 |    1 |            1
+  22 |     -4 |     -1 |    1 |            1
+  23 |     -4 |      4 |    1 |            1
+  24 |     -3 |     -2 |    1 |           -1
+  25 |     -3 |      5 |    1 |           -1
+  26 |     -2 |     -1 |    1 |           -1
+  27 |     -2 |      4 |    1 |           -1
+  28 |     -1 |      1 |    1 |            1
+  29 |      5 |     -8 |    1 |           -1
+  30 |      5 |      9 |    1 |           -1
+  31 |      5 |     11 |    1 |           -1
+  32 |      7 |     -7 |    1 |            1
+  33 |      7 |     -4 |    1 |            1
+  34 |      8 |     11 |    1 |           -1
+  35 |     10 |     12 |    1 |           -1
+  36 |     11 |     13 |    1 |           -1
+  37 |     12 |     13 |    1 |           -1
+  38 |     13 |    -15 |    1 |           -1
+  39 |     16 |     -9 |    1 |            1
+  40 |     16 |     15 |    1 |            1
+(40 rows)
+
+-- q2
+SELECT * FROM pgr_lineGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    FALSE
+);
+ seq | source | target | cost | reverse_cost
+-----+--------+--------+------+--------------
+   1 |     -3 |     -2 |    1 |           -1
+   2 |     -3 |      5 |    1 |           -1
+   3 |     -2 |      4 |    1 |           -1
+   4 |      1 |      4 |    1 |           -1
+   5 |      4 |      8 |    1 |           -1
+   6 |      4 |     10 |    1 |           -1
+   7 |      5 |      9 |    1 |           -1
+   8 |      5 |     11 |    1 |           -1
+   9 |      6 |      7 |    1 |           -1
+  10 |      7 |      8 |    1 |           -1
+  11 |      7 |     10 |    1 |           -1
+  12 |      8 |      9 |    1 |           -1
+  13 |      8 |     11 |    1 |           -1
+  14 |      9 |     15 |    1 |           -1
+  15 |     10 |     12 |    1 |           -1
+  16 |     10 |     14 |    1 |           -1
+  17 |     11 |     13 |    1 |           -1
+  18 |     12 |     13 |    1 |           -1
+  19 |     16 |     15 |    1 |           -1
+(19 rows)
+
+-- q3
+ROLLBACK;
+ROLLBACK
diff --git a/src/lineGraph/test/doc-pgr_lineGraph.test.sql b/test/lineGraph/doc-pgr_lineGraph.test.sql
similarity index 100%
rename from src/lineGraph/test/doc-pgr_lineGraph.test.sql
rename to test/lineGraph/doc-pgr_lineGraph.test.sql
diff --git a/test/lineGraph/doc-pgr_lineGraphFull.result b/test/lineGraph/doc-pgr_lineGraphFull.result
new file mode 100644
index 0000000..c6734c6
--- /dev/null
+++ b/test/lineGraph/doc-pgr_lineGraphFull.result
@@ -0,0 +1,208 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- q1
+SELECT * FROM pgr_lineGraphFull(
+    'SELECT id, source, target, cost, reverse_cost
+      FROM edge_table
+      WHERE id IN (4,7,8,10)'
+);
+ seq | source | target | cost | edge
+-----+--------+--------+------+------
+   1 |     -1 |      5 |    1 |    4
+   2 |      2 |     -1 |    0 |    0
+   3 |     -2 |      2 |    1 |   -4
+   4 |     -3 |      8 |    1 |   -7
+   5 |     -4 |      6 |    1 |    8
+   6 |     -5 |     10 |    1 |   10
+   7 |      5 |     -2 |    0 |    0
+   8 |      5 |     -3 |    0 |    0
+   9 |      5 |     -4 |    0 |    0
+  10 |      5 |     -5 |    0 |    0
+  11 |     -6 |     -2 |    0 |    0
+  12 |     -6 |     -3 |    0 |    0
+  13 |     -6 |     -4 |    0 |    0
+  14 |     -6 |     -5 |    0 |    0
+  15 |     -7 |     -2 |    0 |    0
+  16 |     -7 |     -3 |    0 |    0
+  17 |     -7 |     -4 |    0 |    0
+  18 |     -7 |     -5 |    0 |    0
+  19 |     -8 |     -2 |    0 |    0
+  20 |     -8 |     -3 |    0 |    0
+  21 |     -8 |     -4 |    0 |    0
+  22 |     -8 |     -5 |    0 |    0
+  23 |     -9 |     -6 |    1 |    7
+  24 |      8 |     -9 |    0 |    0
+  25 |    -10 |     -7 |    1 |   -8
+  26 |      6 |    -10 |    0 |    0
+  27 |    -11 |     -8 |    1 |  -10
+  28 |     10 |    -11 |    0 |    0
+(28 rows)
+
+-- q2
+CREATE TABLE lineGraph_edges AS SELECT * FROM pgr_lineGraphFull(
+    $$SELECT id, source, target, cost, reverse_cost
+    FROM edge_table WHERE id IN (4,7,8,10)$$
+);
+SELECT 28
+CREATE TABLE lineGraph_vertices AS
+SELECT *, NULL::BIGINT AS original_id
+FROM (SELECT source AS id FROM lineGraph_edges
+    UNION
+    SELECT target FROM lineGraph_edges) as foo
+ORDER BY id;
+SELECT 16
+-- q3
+UPDATE lineGraph_vertices AS r
+  SET original_id = v.id
+  FROM edge_table_vertices_pgr AS v
+  WHERE v.id = r.id;
+UPDATE 5
+-- q4
+WITH
+unassignedVertices
+  AS (SELECT e.id, e.original_id
+       FROM lineGraph_vertices AS e
+       WHERE original_id IS NOT NULL),
+edgesWithUnassignedSource
+  AS (SELECT *
+        FROM lineGraph_edges
+        WHERE cost = 0 and source IN (SELECT id FROM unassignedVertices)),
+edgesWithUnassignedSourcePlusVertices
+  AS (SELECT *
+        FROM edgesWithUnassignedSource
+        JOIN lineGraph_vertices
+        ON(source = id)),
+verticesFromEdgesWithUnassignedSource
+  AS (SELECT DISTINCT edgesWithUnassignedSourcePlusVertices.target,
+                      edgesWithUnassignedSourcePlusVertices.original_id
+        FROM edgesWithUnassignedSourcePlusVertices
+        JOIN lineGraph_vertices AS r
+        ON(target = r.id AND r.original_id IS NULL))
+UPDATE lineGraph_vertices
+  SET original_id = verticesFromEdgesWithUnassignedSource.original_id
+  FROM verticesFromEdgesWithUnassignedSource
+  WHERE verticesFromEdgesWithUnassignedSource.target = id;
+UPDATE 8
+WITH
+unassignedVertices
+  AS (SELECT e.id, e.original_id
+        FROM lineGraph_vertices AS e
+        WHERE original_id IS NOT NULL),
+edgesWithUnassignedTarget
+  AS (SELECT *
+        FROM lineGraph_edges
+        WHERE cost = 0 and target IN (SELECT id FROM unassignedVertices)),
+edgesWithUnassignedTargetPlusVertices
+  AS (SELECT *
+        FROM edgesWithUnassignedTarget
+        JOIN lineGraph_vertices
+        ON(target = id)),
+verticesFromEdgesWithUnassignedTarget
+  AS (SELECT DISTINCT edgesWithUnassignedTargetPlusVertices.source,
+                     edgesWithUnassignedTargetPlusVertices.original_id
+        FROM edgesWithUnassignedTargetPlusVertices
+        JOIN lineGraph_vertices AS r
+        ON(source = r.id AND r.original_id IS NULL))
+UPDATE lineGraph_vertices
+  SET original_id = verticesFromEdgesWithUnassignedTarget.original_id
+  FROM verticesFromEdgesWithUnassignedTarget
+  WHERE verticesFromEdgesWithUnassignedTarget.source = id;
+UPDATE 3
+-- q5
+WITH
+unassignedVertexIds
+  AS (SELECT id
+        FROM lineGraph_vertices
+        WHERE original_id IS NULL),
+edgesWithUnassignedSource
+  AS (SELECT source,edge
+        FROM lineGraph_edges
+        WHERE source IN (SELECT id FROM unassignedVertexIds)),
+originalEdgesWithUnassignedSource
+  AS (SELECT id,source
+        FROM edge_table
+        WHERE id IN (SELECT edge FROM edgesWithUnassignedSource))
+UPDATE lineGraph_vertices AS d
+  SET original_id = (SELECT source
+                       FROM originalEdgesWithUnassignedSource
+                       WHERE originalEdgesWithUnassignedSource.id =
+                         (SELECT edge
+                            FROM edgesWithUnassignedSource
+                            WHERE edgesWithUnassignedSource.source = d.id))
+  WHERE id IN (SELECT id FROM unassignedVertexIds);
+UPDATE 0
+WITH
+unassignedVertexIds
+  AS (SELECT id
+        FROM lineGraph_vertices
+        WHERE original_id IS NULL),
+edgesWithUnassignedTarget
+  AS (SELECT target,edge
+        FROM lineGraph_edges
+        WHERE target IN (SELECT id FROM unassignedVertexIds)),
+originalEdgesWithUnassignedTarget
+  AS (SELECT id,target
+        FROM edge_table
+        WHERE id IN (SELECT edge FROM edgesWithUnassignedTarget))
+UPDATE lineGraph_vertices AS d
+  SET original_id = (SELECT target
+                       FROM originalEdgesWithUnassignedTarget
+                       WHERE originalEdgesWithUnassignedTarget.id =
+                         (SELECT edge
+                            FROM edgesWithUnassignedTarget
+                            WHERE edgesWithUnassignedTarget.target = d.id))
+  WHERE id IN (SELECT id FROM unassignedVertexIds);
+UPDATE 0
+-- q6
+SELECT * FROM lineGraph_vertices;
+ id  | original_id
+-----+-------------
+   2 |           2
+   5 |           5
+   6 |           6
+   8 |           8
+  10 |          10
+ -11 |          10
+ -10 |           6
+  -9 |           8
+  -5 |           5
+  -4 |           5
+  -3 |           5
+  -2 |           5
+  -1 |           2
+  -8 |           5
+  -7 |           5
+  -6 |           5
+(16 rows)
+
+-- q7
+UPDATE lineGraph_edges
+  SET cost = 100
+  WHERE source IN (SELECT target
+                     FROM lineGraph_edges
+                     WHERE edge = 4) AND target IN (SELECT source
+                                                      FROM lineGraph_edges
+                                                      WHERE edge = -7);
+UPDATE 1
+-- q8
+SELECT * FROM
+  (SELECT * FROM
+    (SELECT * FROM pgr_dijkstra($$SELECT seq AS id, * FROM lineGraph_edges$$,
+      (SELECT array_agg(id) FROM lineGraph_vertices where original_id = 2),
+      (SELECT array_agg(id) FROM lineGraph_vertices where original_id = 8)
+    )) as shortestPaths
+  WHERE start_vid = 2 AND end_vid = 8 AND (cost != 0 OR edge = -1)) as b;
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
+-----+----------+-----------+---------+------+------+------+----------
+  29 |        2 |         2 |       8 |   -1 |    1 |    1 |        0
+  31 |        4 |         2 |       8 |   -4 |    5 |    1 |        1
+  33 |        6 |         2 |       8 |  -10 |   25 |    1 |        2
+  35 |        8 |         2 |       8 |   -3 |    4 |    1 |        3
+  36 |        9 |         2 |       8 |    8 |   -1 |    0 |        4
+(5 rows)
+
+-- q9
+ROLLBACK;
+ROLLBACK
diff --git a/test/lineGraph/doc-pgr_lineGraphFull.test.sql b/test/lineGraph/doc-pgr_lineGraphFull.test.sql
new file mode 100644
index 0000000..109cea2
--- /dev/null
+++ b/test/lineGraph/doc-pgr_lineGraphFull.test.sql
@@ -0,0 +1,146 @@
+
+\echo -- q1
+SELECT * FROM pgr_lineGraphFull(
+    'SELECT id, source, target, cost, reverse_cost
+      FROM edge_table
+      WHERE id IN (4,7,8,10)'
+);
+
+\echo -- q2
+CREATE TABLE lineGraph_edges AS SELECT * FROM pgr_lineGraphFull(
+    $$SELECT id, source, target, cost, reverse_cost
+    FROM edge_table WHERE id IN (4,7,8,10)$$
+);
+
+CREATE TABLE lineGraph_vertices AS
+SELECT *, NULL::BIGINT AS original_id
+FROM (SELECT source AS id FROM lineGraph_edges
+    UNION
+    SELECT target FROM lineGraph_edges) as foo
+ORDER BY id;
+
+\echo -- q3
+UPDATE lineGraph_vertices AS r
+  SET original_id = v.id
+  FROM edge_table_vertices_pgr AS v
+  WHERE v.id = r.id;
+
+\echo -- q4
+WITH
+unassignedVertices
+  AS (SELECT e.id, e.original_id
+       FROM lineGraph_vertices AS e
+       WHERE original_id IS NOT NULL),
+edgesWithUnassignedSource
+  AS (SELECT *
+        FROM lineGraph_edges
+        WHERE cost = 0 and source IN (SELECT id FROM unassignedVertices)),
+edgesWithUnassignedSourcePlusVertices
+  AS (SELECT *
+        FROM edgesWithUnassignedSource
+        JOIN lineGraph_vertices
+        ON(source = id)),
+verticesFromEdgesWithUnassignedSource
+  AS (SELECT DISTINCT edgesWithUnassignedSourcePlusVertices.target, 
+                      edgesWithUnassignedSourcePlusVertices.original_id
+        FROM edgesWithUnassignedSourcePlusVertices
+        JOIN lineGraph_vertices AS r
+        ON(target = r.id AND r.original_id IS NULL))
+UPDATE lineGraph_vertices
+  SET original_id = verticesFromEdgesWithUnassignedSource.original_id
+  FROM verticesFromEdgesWithUnassignedSource
+  WHERE verticesFromEdgesWithUnassignedSource.target = id;
+
+WITH
+unassignedVertices
+  AS (SELECT e.id, e.original_id
+        FROM lineGraph_vertices AS e
+        WHERE original_id IS NOT NULL),
+edgesWithUnassignedTarget
+  AS (SELECT *
+        FROM lineGraph_edges
+        WHERE cost = 0 and target IN (SELECT id FROM unassignedVertices)),
+edgesWithUnassignedTargetPlusVertices
+  AS (SELECT *
+        FROM edgesWithUnassignedTarget
+        JOIN lineGraph_vertices
+        ON(target = id)),
+verticesFromEdgesWithUnassignedTarget
+  AS (SELECT DISTINCT edgesWithUnassignedTargetPlusVertices.source, 
+                     edgesWithUnassignedTargetPlusVertices.original_id
+        FROM edgesWithUnassignedTargetPlusVertices
+        JOIN lineGraph_vertices AS r
+        ON(source = r.id AND r.original_id IS NULL))
+UPDATE lineGraph_vertices
+  SET original_id = verticesFromEdgesWithUnassignedTarget.original_id
+  FROM verticesFromEdgesWithUnassignedTarget
+  WHERE verticesFromEdgesWithUnassignedTarget.source = id;
+
+\echo -- q5
+WITH
+unassignedVertexIds
+  AS (SELECT id
+        FROM lineGraph_vertices
+        WHERE original_id IS NULL),
+edgesWithUnassignedSource
+  AS (SELECT source,edge
+        FROM lineGraph_edges
+        WHERE source IN (SELECT id FROM unassignedVertexIds)),
+originalEdgesWithUnassignedSource
+  AS (SELECT id,source
+        FROM edge_table
+        WHERE id IN (SELECT edge FROM edgesWithUnassignedSource))
+UPDATE lineGraph_vertices AS d
+  SET original_id = (SELECT source
+                       FROM originalEdgesWithUnassignedSource
+                       WHERE originalEdgesWithUnassignedSource.id = 
+                         (SELECT edge
+                            FROM edgesWithUnassignedSource
+                            WHERE edgesWithUnassignedSource.source = d.id))
+  WHERE id IN (SELECT id FROM unassignedVertexIds);
+
+WITH
+unassignedVertexIds
+  AS (SELECT id
+        FROM lineGraph_vertices
+        WHERE original_id IS NULL),
+edgesWithUnassignedTarget
+  AS (SELECT target,edge
+        FROM lineGraph_edges
+        WHERE target IN (SELECT id FROM unassignedVertexIds)),
+originalEdgesWithUnassignedTarget
+  AS (SELECT id,target
+        FROM edge_table
+        WHERE id IN (SELECT edge FROM edgesWithUnassignedTarget))
+UPDATE lineGraph_vertices AS d
+  SET original_id = (SELECT target
+                       FROM originalEdgesWithUnassignedTarget
+                       WHERE originalEdgesWithUnassignedTarget.id = 
+                         (SELECT edge
+                            FROM edgesWithUnassignedTarget
+                            WHERE edgesWithUnassignedTarget.target = d.id))
+  WHERE id IN (SELECT id FROM unassignedVertexIds);
+
+\echo -- q6
+SELECT * FROM lineGraph_vertices;
+
+\echo -- q7
+UPDATE lineGraph_edges
+  SET cost = 100
+  WHERE source IN (SELECT target
+                     FROM lineGraph_edges
+                     WHERE edge = 4) AND target IN (SELECT source
+                                                      FROM lineGraph_edges
+                                                      WHERE edge = -7);
+
+\echo -- q8
+SELECT * FROM
+  (SELECT * FROM
+    (SELECT * FROM pgr_dijkstra($$SELECT seq AS id, * FROM lineGraph_edges$$,
+      (SELECT array_agg(id) FROM lineGraph_vertices where original_id = 2),
+      (SELECT array_agg(id) FROM lineGraph_vertices where original_id = 8)
+    )) as shortestPaths
+  WHERE start_vid = 2 AND end_vid = 8 AND (cost != 0 OR edge = -1)) as b;
+
+\echo -- q9
+
diff --git a/test/lineGraph/pgtap_design.result b/test/lineGraph/pgtap_design.result
new file mode 100644
index 0000000..5caf90a
--- /dev/null
+++ b/test/lineGraph/pgtap_design.result
@@ -0,0 +1,58 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- one edge graph
+SELECT * FROM pgr_lineGraph(
+    'SELECT id, source, target, cost FROM edge_table WHERE id = 1'
+);
+NOTICE:  Only vertices graph
+HINT:  0:  out_edges_of(1): 1=(1, 2) = 1
+1:  out_edges_of(2):
+
+
+ seq | source | target | cost | reverse_cost
+-----+--------+--------+------+--------------
+(0 rows)
+
+-- two edge graphs
+SELECT * FROM pgr_lineGraph($$
+    SELECT -id AS id, target, source, reverse_cost AS cost FROM edge_table WHERE id = 1
+    UNION
+    SELECT id, source, target, cost FROM edge_table WHERE id = 1
+    $$
+);
+ seq | source | target | cost | reverse_cost
+-----+--------+--------+------+--------------
+   1 |      1 |     -1 |    1 |            1
+(1 row)
+
+SELECT * FROM pgr_lineGraph($$
+    SELECT id, target, source, reverse_cost AS cost FROM edge_table WHERE id = 1
+    UNION
+    SELECT -id AS id, source, target, cost FROM edge_table WHERE id = 1
+    $$
+);
+ seq | source | target | cost | reverse_cost
+-----+--------+--------+------+--------------
+   1 |      1 |     -1 |    1 |            1
+(1 row)
+
+SELECT * FROM pgr_lineGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1'
+);
+ seq | source | target | cost | reverse_cost
+-----+--------+--------+------+--------------
+   1 |     -1 |      1 |    1 |            1
+(1 row)
+
+SELECT * FROM pgr_lineGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 17'
+);
+ seq | source | target | cost | reverse_cost
+-----+--------+--------+------+--------------
+   1 |    -17 |     17 |    1 |            1
+(1 row)
+
+ROLLBACK;
+ROLLBACK
diff --git a/test/lineGraph/pgtap_design.test.sql b/test/lineGraph/pgtap_design.test.sql
new file mode 100644
index 0000000..82c8087
--- /dev/null
+++ b/test/lineGraph/pgtap_design.test.sql
@@ -0,0 +1,26 @@
+
+\echo -- one edge graph
+SELECT * FROM pgr_lineGraph(
+    'SELECT id, source, target, cost FROM edge_table WHERE id = 1'
+);
+
+\echo -- two edge graphs
+SELECT * FROM pgr_lineGraph($$
+    SELECT -id AS id, target, source, reverse_cost AS cost FROM edge_table WHERE id = 1
+    UNION
+    SELECT id, source, target, cost FROM edge_table WHERE id = 1
+    $$
+);
+SELECT * FROM pgr_lineGraph($$
+    SELECT id, target, source, reverse_cost AS cost FROM edge_table WHERE id = 1
+    UNION
+    SELECT -id AS id, source, target, cost FROM edge_table WHERE id = 1
+    $$
+);
+SELECT * FROM pgr_lineGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 1'
+);
+SELECT * FROM pgr_lineGraph(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table WHERE id = 17'
+);
+
diff --git a/test/lineGraph/pgtap_design_lineGraphFull.result b/test/lineGraph/pgtap_design_lineGraphFull.result
new file mode 100644
index 0000000..23f4c32
--- /dev/null
+++ b/test/lineGraph/pgtap_design_lineGraphFull.result
@@ -0,0 +1,174 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+UPDATE edge_table SET id = id * 100, source = 1000 * source, target = 1000 * target;
+UPDATE 18
+UPDATE edge_table_vertices_pgr SET id = id * 1000;
+UPDATE 17
+SELECT id, source, target, cost, reverse_cost FROM edge_table;
+  id  | source | target | cost | reverse_cost
+------+--------+--------+------+--------------
+  100 |   1000 |   2000 |    1 |            1
+  200 |   2000 |   3000 |   -1 |            1
+  300 |   3000 |   4000 |   -1 |            1
+  400 |   2000 |   5000 |    1 |            1
+  500 |   3000 |   6000 |    1 |           -1
+  600 |   7000 |   8000 |    1 |            1
+  700 |   8000 |   5000 |    1 |            1
+  800 |   5000 |   6000 |    1 |            1
+  900 |   6000 |   9000 |    1 |            1
+ 1000 |   5000 |  10000 |    1 |            1
+ 1100 |   6000 |  11000 |    1 |           -1
+ 1200 |  10000 |  11000 |    1 |           -1
+ 1300 |  11000 |  12000 |    1 |           -1
+ 1400 |  10000 |  13000 |    1 |            1
+ 1500 |   9000 |  12000 |    1 |            1
+ 1600 |   4000 |   9000 |    1 |            1
+ 1700 |  14000 |  15000 |    1 |            1
+ 1800 |  16000 |  17000 |    1 |            1
+(18 rows)
+
+SELECT id FROM edge_table_vertices_pgr;
+  id
+-------
+  1000
+  2000
+  3000
+  4000
+  5000
+  6000
+  7000
+  8000
+  9000
+ 10000
+ 11000
+ 12000
+ 13000
+ 14000
+ 15000
+ 16000
+ 17000
+(17 rows)
+
+SELECT  *  FROM pgr_lineGraphFull(
+    $$SELECT id, source, target, cost FROM edge_table WHERE id = 1$$
+);
+ seq | source | target | cost | edge
+-----+--------+--------+------+------
+(0 rows)
+
+SELECT  *  FROM pgr_lineGraphFull(
+    $$SELECT id, source, target, cost, reverse_cost
+    FROM edge_table
+    WHERE id = 200$$
+);
+ seq | source | target | cost | edge
+-----+--------+--------+------+------
+   1 |   3000 |   2000 |    1 | -200
+(1 row)
+
+SELECT  *  FROM pgr_lineGraphFull(
+    $$SELECT id, source, target, cost, reverse_cost
+    FROM edge_table
+    WHERE id = 1100$$
+);
+ seq | source | target | cost | edge
+-----+--------+--------+------+------
+   1 |   6000 |  11000 |    1 | 1100
+(1 row)
+
+SELECT  *  FROM pgr_lineGraphFull(
+    $$SELECT id, source, target, cost, reverse_cost
+    FROM edge_table
+    WHERE id = 100$$
+);
+ seq | source | target | cost | edge
+-----+--------+--------+------+------
+   1 |     -1 |   2000 |    1 |  100
+   2 |   1000 |     -1 |    0 |    0
+   3 |     -2 |   1000 |    1 | -100
+   4 |   2000 |     -2 |    0 |    0
+(4 rows)
+
+SELECT  *  FROM pgr_lineGraphFull($$
+    SELECT id AS id, target, source, reverse_cost AS cost FROM edge_table WHERE id = 100
+    UNION
+    SELECT id, source, target, cost FROM edge_table WHERE id = 100
+    $$
+);
+ seq | source | target | cost | edge
+-----+--------+--------+------+------
+   1 |   2000 |   2000 |    1 |  100
+   2 |   2000 |   1000 |    1 |  100
+   3 |   1000 |   2000 |    1 |  100
+   4 |   1000 |   1000 |    1 |  100
+(4 rows)
+
+SELECT  *  FROM pgr_lineGraphFull($$
+    SELECT id, target, source, reverse_cost AS cost FROM edge_table WHERE id = 100
+    UNION
+    SELECT -id AS id, source, target, cost FROM edge_table WHERE id = 100
+    $$
+);
+ seq | source | target | cost | edge
+-----+--------+--------+------+------
+   1 |     -1 |   1000 |    1 | -100
+   2 |   2000 |     -1 |    0 |    0
+   3 |     -2 |   2000 |    1 |  100
+   4 |   1000 |     -2 |    0 |    0
+(4 rows)
+
+SELECT  *  FROM pgr_lineGraphFull(
+    $$SELECT id, source, target, cost, reverse_cost
+    FROM edge_table
+    WHERE id IN (200, 300)$$
+);
+ seq | source | target | cost | edge
+-----+--------+--------+------+------
+   1 |     -1 |   2000 |    1 | -200
+   2 |   3000 |     -1 |    0 |    0
+   3 |   4000 |   3000 |    1 | -300
+(3 rows)
+
+SELECT  *  FROM pgr_lineGraphFull(
+    $$SELECT id * 100 AS id, source * 1000 AS source, target * 1000 AS target,
+        cost, reverse_cost
+    FROM edge_table
+    WHERE id in (600, 700)$$
+);
+ seq | source  | target  | cost |  edge
+-----+---------+---------+------+--------
+   1 |      -1 | 8000000 |    1 |  60000
+   2 | 7000000 |      -1 |    0 |      0
+   3 |      -2 | 7000000 |    1 | -60000
+   4 |      -3 | 5000000 |    1 |  70000
+   5 | 8000000 |      -2 |    0 |      0
+   6 | 8000000 |      -3 |    0 |      0
+   7 |      -4 |      -2 |    0 |      0
+   8 |      -4 |      -3 |    0 |      0
+   9 |      -5 |      -4 |    1 | -70000
+  10 | 5000000 |      -5 |    0 |      0
+(10 rows)
+
+SELECT  *  FROM pgr_lineGraphFull(
+    $$SELECT id * 100 AS id, source * 1000 AS source, target * 1000 AS target,
+        cost, reverse_cost
+    FROM edge_table
+    where id in (500, 900, 1100)$$
+);
+ seq | source  |  target  | cost |  edge
+-----+---------+----------+------+--------
+   1 | 3000000 |  6000000 |    1 |  50000
+   2 |      -1 |  9000000 |    1 |  90000
+   3 |      -2 | 11000000 |    1 | 110000
+   4 | 6000000 |       -1 |    0 |      0
+   5 | 6000000 |       -2 |    0 |      0
+   6 |      -3 |       -1 |    0 |      0
+   7 |      -3 |       -2 |    0 |      0
+   8 |      -4 |       -3 |    1 | -90000
+   9 | 9000000 |       -4 |    0 |      0
+(9 rows)
+
+ROLLBACK;
+ROLLBACK
diff --git a/test/lineGraph/pgtap_design_lineGraphFull.test.sql b/test/lineGraph/pgtap_design_lineGraphFull.test.sql
new file mode 100644
index 0000000..b116f5a
--- /dev/null
+++ b/test/lineGraph/pgtap_design_lineGraphFull.test.sql
@@ -0,0 +1,61 @@
+UPDATE edge_table SET id = id * 100, source = 1000 * source, target = 1000 * target;
+UPDATE edge_table_vertices_pgr SET id = id * 1000;
+
+SELECT id, source, target, cost, reverse_cost FROM edge_table;
+SELECT id FROM edge_table_vertices_pgr;
+
+SELECT  *  FROM pgr_lineGraphFull(
+    $$SELECT id, source, target, cost FROM edge_table WHERE id = 1$$
+);
+
+SELECT  *  FROM pgr_lineGraphFull(
+    $$SELECT id, source, target, cost, reverse_cost
+    FROM edge_table
+    WHERE id = 200$$
+);
+SELECT  *  FROM pgr_lineGraphFull(
+    $$SELECT id, source, target, cost, reverse_cost
+    FROM edge_table
+    WHERE id = 1100$$
+);
+
+SELECT  *  FROM pgr_lineGraphFull(
+    $$SELECT id, source, target, cost, reverse_cost
+    FROM edge_table
+    WHERE id = 100$$
+);
+
+SELECT  *  FROM pgr_lineGraphFull($$
+    SELECT id AS id, target, source, reverse_cost AS cost FROM edge_table WHERE id = 100
+    UNION
+    SELECT id, source, target, cost FROM edge_table WHERE id = 100
+    $$
+);
+
+SELECT  *  FROM pgr_lineGraphFull($$
+    SELECT id, target, source, reverse_cost AS cost FROM edge_table WHERE id = 100
+    UNION
+    SELECT -id AS id, source, target, cost FROM edge_table WHERE id = 100
+    $$
+);
+
+SELECT  *  FROM pgr_lineGraphFull(
+    $$SELECT id, source, target, cost, reverse_cost
+    FROM edge_table
+    WHERE id IN (200, 300)$$
+);
+
+SELECT  *  FROM pgr_lineGraphFull(
+    $$SELECT id * 100 AS id, source * 1000 AS source, target * 1000 AS target,
+        cost, reverse_cost
+    FROM edge_table
+    WHERE id in (600, 700)$$
+);
+
+SELECT  *  FROM pgr_lineGraphFull(
+    $$SELECT id * 100 AS id, source * 1000 AS source, target * 1000 AS target,
+        cost, reverse_cost
+    FROM edge_table
+    where id in (500, 900, 1100)$$
+);
+
diff --git a/test/lineGraph/proofOfConcept1.result b/test/lineGraph/proofOfConcept1.result
new file mode 100644
index 0000000..6022b83
--- /dev/null
+++ b/test/lineGraph/proofOfConcept1.result
@@ -0,0 +1,597 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+UPDATE edge_table SET id = id * 100, source = 1000 * source, target = 1000 * target;
+UPDATE 18
+UPDATE edge_table_vertices_pgr SET id = id * 1000;
+UPDATE 17
+DROP TABLE IF EXISTS result2;
+NOTICE:  table "result2" does not exist, skipping
+DROP TABLE
+SELECT  * INTO result2 FROM pgr_lineGraphFull(
+    $$SELECT id, source, target, cost, reverse_cost
+    FROM edge_table$$
+);
+SELECT 95
+SELECT * FROM result2;
+ seq | source | target | cost | edge
+-----+--------+--------+------+-------
+   1 |     -1 |   2000 |    1 |   100
+   2 |   1000 |     -1 |    0 |     0
+   3 |     -2 |   1000 |    1 |  -100
+   4 |     -3 |   5000 |    1 |   400
+   5 |   2000 |     -2 |    0 |     0
+   6 |   2000 |     -3 |    0 |     0
+   7 |     -4 |     -2 |    0 |     0
+   8 |     -4 |     -3 |    0 |     0
+   9 |     -5 |     -2 |    0 |     0
+  10 |     -5 |     -3 |    0 |     0
+  11 |     -6 |     -4 |    1 |  -200
+  12 |     -7 |   6000 |    1 |   500
+  13 |   3000 |     -6 |    0 |     0
+  14 |   3000 |     -7 |    0 |     0
+  15 |     -8 |   3000 |    1 |  -300
+  16 |     -9 |    -30 |    1 |  1600
+  17 |   4000 |     -8 |    0 |     0
+  18 |   4000 |     -9 |    0 |     0
+  19 |    -10 |     -5 |    1 |  -400
+  20 |    -11 |    -25 |    1 |  -700
+  21 |    -12 |    -20 |    1 |   800
+  22 |    -13 |  10000 |    1 |  1000
+  23 |   5000 |    -10 |    0 |     0
+  24 |   5000 |    -11 |    0 |     0
+  25 |   5000 |    -12 |    0 |     0
+  26 |   5000 |    -13 |    0 |     0
+  27 |    -14 |    -10 |    0 |     0
+  28 |    -14 |    -11 |    0 |     0
+  29 |    -14 |    -12 |    0 |     0
+  30 |    -14 |    -13 |    0 |     0
+  31 |    -15 |    -10 |    0 |     0
+  32 |    -15 |    -11 |    0 |     0
+  33 |    -15 |    -12 |    0 |     0
+  34 |    -15 |    -13 |    0 |     0
+  35 |    -16 |    -10 |    0 |     0
+  36 |    -16 |    -11 |    0 |     0
+  37 |    -16 |    -12 |    0 |     0
+  38 |    -16 |    -13 |    0 |     0
+  39 |    -17 |    -15 |    1 |  -800
+  40 |    -18 |   9000 |    1 |   900
+  41 |    -19 |  11000 |    1 |  1100
+  42 |   6000 |    -17 |    0 |     0
+  43 |   6000 |    -18 |    0 |     0
+  44 |   6000 |    -19 |    0 |     0
+  45 |    -20 |    -17 |    0 |     0
+  46 |    -20 |    -18 |    0 |     0
+  47 |    -20 |    -19 |    0 |     0
+  48 |    -21 |    -17 |    0 |     0
+  49 |    -21 |    -18 |    0 |     0
+  50 |    -21 |    -19 |    0 |     0
+  51 |    -22 |   8000 |    1 |   600
+  52 |   7000 |    -22 |    0 |     0
+  53 |    -23 |   7000 |    1 |  -600
+  54 |    -24 |    -14 |    1 |   700
+  55 |   8000 |    -23 |    0 |     0
+  56 |   8000 |    -24 |    0 |     0
+  57 |    -25 |    -23 |    0 |     0
+  58 |    -25 |    -24 |    0 |     0
+  59 |    -26 |    -21 |    1 |  -900
+  60 |    -27 |    -38 |    1 |  1500
+  61 |    -28 |   4000 |    1 | -1600
+  62 |   9000 |    -26 |    0 |     0
+  63 |   9000 |    -27 |    0 |     0
+  64 |   9000 |    -28 |    0 |     0
+  65 |    -29 |    -26 |    0 |     0
+  66 |    -29 |    -27 |    0 |     0
+  67 |    -29 |    -28 |    0 |     0
+  68 |    -30 |    -26 |    0 |     0
+  69 |    -30 |    -27 |    0 |     0
+  70 |    -30 |    -28 |    0 |     0
+  71 |    -31 |    -16 |    1 | -1000
+  72 |    -32 |    -36 |    1 |  1200
+  73 |    -33 |  13000 |    1 |  1400
+  74 |  10000 |    -31 |    0 |     0
+  75 |  10000 |    -32 |    0 |     0
+  76 |  10000 |    -33 |    0 |     0
+  77 |    -34 |    -31 |    0 |     0
+  78 |    -34 |    -32 |    0 |     0
+  79 |    -34 |    -33 |    0 |     0
+  80 |    -35 |  12000 |    1 |  1300
+  81 |  11000 |    -35 |    0 |     0
+  82 |    -36 |    -35 |    0 |     0
+  83 |    -37 |    -29 |    1 | -1500
+  84 |  12000 |    -37 |    0 |     0
+  85 |    -38 |    -37 |    0 |     0
+  86 |    -39 |    -34 |    1 | -1400
+  87 |  13000 |    -39 |    0 |     0
+  88 |    -40 |  15000 |    1 |  1700
+  89 |  14000 |    -40 |    0 |     0
+  90 |    -41 |  14000 |    1 | -1700
+  91 |  15000 |    -41 |    0 |     0
+  92 |    -42 |  17000 |    1 |  1800
+  93 |  16000 |    -42 |    0 |     0
+  94 |    -43 |  16000 |    1 | -1800
+  95 |  17000 |    -43 |    0 |     0
+(95 rows)
+
+DROP TABLE IF EXISTS result2_vertices_pgr;
+NOTICE:  table "result2_vertices_pgr" does not exist, skipping
+DROP TABLE
+WITH foo AS (SELECT source AS id FROM result2
+    UNION
+    SELECT target FROM result2)
+SELECT *, NULL::BIGINT AS original_id
+INTO result2_vertices_pgr
+FROM foo
+ORDER BY id;
+SELECT 60
+SELECT * FROM result2_vertices_pgr;
+  id   | original_id
+-------+-------------
+   -43 |
+   -42 |
+   -41 |
+   -40 |
+   -39 |
+   -38 |
+   -37 |
+   -36 |
+   -35 |
+   -34 |
+   -33 |
+   -32 |
+   -31 |
+   -30 |
+   -29 |
+   -28 |
+   -27 |
+   -26 |
+   -25 |
+   -24 |
+   -23 |
+   -22 |
+   -21 |
+   -20 |
+   -19 |
+   -18 |
+   -17 |
+   -16 |
+   -15 |
+   -14 |
+   -13 |
+   -12 |
+   -11 |
+   -10 |
+    -9 |
+    -8 |
+    -7 |
+    -6 |
+    -5 |
+    -4 |
+    -3 |
+    -2 |
+    -1 |
+  1000 |
+  2000 |
+  3000 |
+  4000 |
+  5000 |
+  6000 |
+  7000 |
+  8000 |
+  9000 |
+ 10000 |
+ 11000 |
+ 12000 |
+ 13000 |
+ 14000 |
+ 15000 |
+ 16000 |
+ 17000 |
+(60 rows)
+
+UPDATE result2_vertices_pgr AS r SET original_id = v.id
+FROM edge_table_vertices_pgr AS v WHERE v.id = r.id;
+UPDATE 17
+WITH a AS (SELECT e.id, e.original_id FROM result2_vertices_pgr AS e WHERE original_id IS NOT NULL),
+b AS (SELECT * FROM result2 WHERE cost = 0 and source IN (SELECT id FROM a)),
+c AS (SELECT * FROM b JOIN result2_vertices_pgr ON(source = id)),
+d AS (SELECT c.source, v.original_id FROM c JOIN result2_vertices_pgr as v ON (target=v.id)),
+e AS (SELECT DISTINCT c.target, c.original_id FROM c JOIN result2_vertices_pgr AS r ON(target = r.id AND r.original_id IS NULL))
+UPDATE result2_vertices_pgr SET original_id = e.original_id FROM e WHERE e.target = id;
+UPDATE 30
+WITH a AS (SELECT e.id, e.original_id FROM result2_vertices_pgr AS e WHERE original_id IS NOT NULL),
+b AS (SELECT * FROM result2 WHERE cost = 0 and target IN (SELECT id FROM a)),
+c AS (SELECT * FROM b JOIN result2_vertices_pgr ON(target = id)),
+d AS (SELECT c.target, v.original_id FROM c JOIN result2_vertices_pgr as v ON (source=v.id)),
+e AS (SELECT DISTINCT c.source, c.original_id FROM c JOIN result2_vertices_pgr AS r ON(source = r.id AND r.original_id IS NULL))
+UPDATE result2_vertices_pgr SET original_id = e.original_id FROM e WHERE e.source = id;
+UPDATE 13
+WITH a AS (SELECT id FROM result2_vertices_pgr WHERE original_id IS NULL),
+b AS (SELECT source,edge FROM result2 WHERE source IN (SELECT id FROM a)),
+c AS (SELECT id,source FROM edge_table WHERE id IN (SELECT edge FROM b))
+UPDATE result2_vertices_pgr AS d SET original_id = (SELECT source FROM c WHERE c.id = (SELECT edge FROM b WHERE b.source = d.id)) WHERE id IN (SELECT id FROM a);
+UPDATE 0
+WITH a AS (SELECT id FROM result2_vertices_pgr WHERE original_id IS NULL),
+b AS (SELECT target,edge FROM result2 WHERE target IN (SELECT id FROM a)),
+c AS (SELECT id,target FROM edge_table WHERE id IN (SELECT edge FROM b))
+UPDATE result2_vertices_pgr AS d SET original_id = (SELECT target FROM c WHERE c.id = (SELECT edge FROM b WHERE b.target = d.id)) WHERE id IN (SELECT id FROM a);
+UPDATE 0
+SELECT * FROM result2_vertices_pgr;
+  id   | original_id
+-------+-------------
+  1000 |        1000
+  2000 |        2000
+  3000 |        3000
+  4000 |        4000
+  5000 |        5000
+  6000 |        6000
+  7000 |        7000
+  8000 |        8000
+  9000 |        9000
+ 10000 |       10000
+ 11000 |       11000
+ 12000 |       12000
+ 13000 |       13000
+ 14000 |       14000
+ 15000 |       15000
+ 16000 |       16000
+ 17000 |       17000
+   -43 |       17000
+   -42 |       16000
+   -41 |       15000
+   -40 |       14000
+   -39 |       13000
+   -37 |       12000
+   -35 |       11000
+   -33 |       10000
+   -32 |       10000
+   -31 |       10000
+   -28 |        9000
+   -27 |        9000
+   -26 |        9000
+   -24 |        8000
+   -23 |        8000
+   -22 |        7000
+   -19 |        6000
+   -18 |        6000
+   -17 |        6000
+   -13 |        5000
+   -12 |        5000
+   -11 |        5000
+   -10 |        5000
+    -9 |        4000
+    -8 |        4000
+    -7 |        3000
+    -6 |        3000
+    -3 |        2000
+    -2 |        2000
+    -1 |        1000
+   -38 |       12000
+   -36 |       11000
+   -34 |       10000
+   -30 |        9000
+   -29 |        9000
+   -25 |        8000
+   -21 |        6000
+   -20 |        6000
+   -16 |        5000
+   -15 |        5000
+   -14 |        5000
+    -5 |        2000
+    -4 |        2000
+(60 rows)
+
+ALTER TABLE result2 ADD COLUMN original_source_vertex BIGINT;
+ALTER TABLE
+ALTER TABLE result2 ADD COLUMN original_target_vertex BIGINT;
+ALTER TABLE
+ALTER TABLE result2 ADD COLUMN original_source_edge BIGINT;
+ALTER TABLE
+ALTER TABLE result2 ADD COLUMN original_target_edge BIGINT;
+ALTER TABLE
+UPDATE result2 AS edges SET original_source_vertex = vertices.original_id
+FROM result2_vertices_pgr AS vertices WHERE edges.source = vertices.id;
+UPDATE 95
+UPDATE result2 AS edges SET original_target_vertex = vertices.original_id
+FROM result2_vertices_pgr AS vertices WHERE edges.target = vertices.id;
+UPDATE 95
+UPDATE result2
+SET original_source_edge = edge,
+    original_target_edge = edge
+WHERE edge != 0;
+UPDATE 30
+UPDATE  result2 AS a
+SET original_source_edge = b.edge
+FROM result2 AS b
+WHERE
+    a.original_source_edge IS NULL AND
+    b.original_source_edge IS NOT NULL AND
+    a.source = b.target;
+UPDATE 65
+UPDATE  result2 AS a
+SET original_target_edge = b.edge
+FROM result2 AS b
+WHERE
+    a.original_target_edge IS NULL AND
+    b.original_target_edge IS NOT NULL AND
+    a.target = b.source;
+UPDATE 65
+DROP TABLE IF EXISTS q_result_1;
+NOTICE:  table "q_result_1" does not exist, skipping
+DROP TABLE
+SELECT * INTO q_result_1
+FROM pgr_dijkstra($$SELECT seq AS id, * FROM result2$$,
+    (SELECT array_agg(id) FROM result2_vertices_pgr where original_id = 2000),
+    (SELECT array_agg(id) FROM result2_vertices_pgr where original_id = 3000)
+);
+SELECT 181
+SELECT * FROM q_result_1;
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
+-----+----------+-----------+---------+------+------+------+----------
+   1 |        1 |        -5 |      -7 |   -5 |   10 |    0 |        0
+   2 |        2 |        -5 |      -7 |   -3 |    4 |    1 |        0
+   3 |        3 |        -5 |      -7 | 5000 |   25 |    0 |        1
+   4 |        4 |        -5 |      -7 |  -12 |   21 |    1 |        1
+   5 |        5 |        -5 |      -7 |  -20 |   46 |    0 |        2
+   6 |        6 |        -5 |      -7 |  -18 |   40 |    1 |        2
+   7 |        7 |        -5 |      -7 | 9000 |   64 |    0 |        3
+   8 |        8 |        -5 |      -7 |  -28 |   61 |    1 |        3
+   9 |        9 |        -5 |      -7 | 4000 |   17 |    0 |        4
+  10 |       10 |        -5 |      -7 |   -8 |   15 |    1 |        4
+  11 |       11 |        -5 |      -7 | 3000 |   14 |    0 |        5
+  12 |       12 |        -5 |      -7 |   -7 |   -1 |    0 |        5
+  13 |        1 |        -5 |      -6 |   -5 |   10 |    0 |        0
+  14 |        2 |        -5 |      -6 |   -3 |    4 |    1 |        0
+  15 |        3 |        -5 |      -6 | 5000 |   25 |    0 |        1
+  16 |        4 |        -5 |      -6 |  -12 |   21 |    1 |        1
+  17 |        5 |        -5 |      -6 |  -20 |   46 |    0 |        2
+  18 |        6 |        -5 |      -6 |  -18 |   40 |    1 |        2
+  19 |        7 |        -5 |      -6 | 9000 |   64 |    0 |        3
+  20 |        8 |        -5 |      -6 |  -28 |   61 |    1 |        3
+  21 |        9 |        -5 |      -6 | 4000 |   17 |    0 |        4
+  22 |       10 |        -5 |      -6 |   -8 |   15 |    1 |        4
+  23 |       11 |        -5 |      -6 | 3000 |   13 |    0 |        5
+  24 |       12 |        -5 |      -6 |   -6 |   -1 |    0 |        5
+  25 |        1 |        -5 |    3000 |   -5 |   10 |    0 |        0
+  26 |        2 |        -5 |    3000 |   -3 |    4 |    1 |        0
+  27 |        3 |        -5 |    3000 | 5000 |   25 |    0 |        1
+  28 |        4 |        -5 |    3000 |  -12 |   21 |    1 |        1
+  29 |        5 |        -5 |    3000 |  -20 |   46 |    0 |        2
+  30 |        6 |        -5 |    3000 |  -18 |   40 |    1 |        2
+  31 |        7 |        -5 |    3000 | 9000 |   64 |    0 |        3
+  32 |        8 |        -5 |    3000 |  -28 |   61 |    1 |        3
+  33 |        9 |        -5 |    3000 | 4000 |   17 |    0 |        4
+  34 |       10 |        -5 |    3000 |   -8 |   15 |    1 |        4
+  35 |       11 |        -5 |    3000 | 3000 |   -1 |    0 |        5
+  36 |        1 |        -4 |      -7 |   -4 |    8 |    0 |        0
+  37 |        2 |        -4 |      -7 |   -3 |    4 |    1 |        0
+  38 |        3 |        -4 |      -7 | 5000 |   25 |    0 |        1
+  39 |        4 |        -4 |      -7 |  -12 |   21 |    1 |        1
+  40 |        5 |        -4 |      -7 |  -20 |   46 |    0 |        2
+  41 |        6 |        -4 |      -7 |  -18 |   40 |    1 |        2
+  42 |        7 |        -4 |      -7 | 9000 |   64 |    0 |        3
+  43 |        8 |        -4 |      -7 |  -28 |   61 |    1 |        3
+  44 |        9 |        -4 |      -7 | 4000 |   17 |    0 |        4
+  45 |       10 |        -4 |      -7 |   -8 |   15 |    1 |        4
+  46 |       11 |        -4 |      -7 | 3000 |   14 |    0 |        5
+  47 |       12 |        -4 |      -7 |   -7 |   -1 |    0 |        5
+  48 |        1 |        -4 |      -6 |   -4 |    8 |    0 |        0
+  49 |        2 |        -4 |      -6 |   -3 |    4 |    1 |        0
+  50 |        3 |        -4 |      -6 | 5000 |   25 |    0 |        1
+  51 |        4 |        -4 |      -6 |  -12 |   21 |    1 |        1
+  52 |        5 |        -4 |      -6 |  -20 |   46 |    0 |        2
+  53 |        6 |        -4 |      -6 |  -18 |   40 |    1 |        2
+  54 |        7 |        -4 |      -6 | 9000 |   64 |    0 |        3
+  55 |        8 |        -4 |      -6 |  -28 |   61 |    1 |        3
+  56 |        9 |        -4 |      -6 | 4000 |   17 |    0 |        4
+  57 |       10 |        -4 |      -6 |   -8 |   15 |    1 |        4
+  58 |       11 |        -4 |      -6 | 3000 |   13 |    0 |        5
+  59 |       12 |        -4 |      -6 |   -6 |   -1 |    0 |        5
+  60 |        1 |        -4 |    3000 |   -4 |    8 |    0 |        0
+  61 |        2 |        -4 |    3000 |   -3 |    4 |    1 |        0
+  62 |        3 |        -4 |    3000 | 5000 |   25 |    0 |        1
+  63 |        4 |        -4 |    3000 |  -12 |   21 |    1 |        1
+  64 |        5 |        -4 |    3000 |  -20 |   46 |    0 |        2
+  65 |        6 |        -4 |    3000 |  -18 |   40 |    1 |        2
+  66 |        7 |        -4 |    3000 | 9000 |   64 |    0 |        3
+  67 |        8 |        -4 |    3000 |  -28 |   61 |    1 |        3
+  68 |        9 |        -4 |    3000 | 4000 |   17 |    0 |        4
+  69 |       10 |        -4 |    3000 |   -8 |   15 |    1 |        4
+  70 |       11 |        -4 |    3000 | 3000 |   -1 |    0 |        5
+  71 |        1 |        -3 |      -7 |   -3 |    4 |    1 |        0
+  72 |        2 |        -3 |      -7 | 5000 |   25 |    0 |        1
+  73 |        3 |        -3 |      -7 |  -12 |   21 |    1 |        1
+  74 |        4 |        -3 |      -7 |  -20 |   46 |    0 |        2
+  75 |        5 |        -3 |      -7 |  -18 |   40 |    1 |        2
+  76 |        6 |        -3 |      -7 | 9000 |   64 |    0 |        3
+  77 |        7 |        -3 |      -7 |  -28 |   61 |    1 |        3
+  78 |        8 |        -3 |      -7 | 4000 |   17 |    0 |        4
+  79 |        9 |        -3 |      -7 |   -8 |   15 |    1 |        4
+  80 |       10 |        -3 |      -7 | 3000 |   14 |    0 |        5
+  81 |       11 |        -3 |      -7 |   -7 |   -1 |    0 |        5
+  82 |        1 |        -3 |      -6 |   -3 |    4 |    1 |        0
+  83 |        2 |        -3 |      -6 | 5000 |   25 |    0 |        1
+  84 |        3 |        -3 |      -6 |  -12 |   21 |    1 |        1
+  85 |        4 |        -3 |      -6 |  -20 |   46 |    0 |        2
+  86 |        5 |        -3 |      -6 |  -18 |   40 |    1 |        2
+  87 |        6 |        -3 |      -6 | 9000 |   64 |    0 |        3
+  88 |        7 |        -3 |      -6 |  -28 |   61 |    1 |        3
+  89 |        8 |        -3 |      -6 | 4000 |   17 |    0 |        4
+  90 |        9 |        -3 |      -6 |   -8 |   15 |    1 |        4
+  91 |       10 |        -3 |      -6 | 3000 |   13 |    0 |        5
+  92 |       11 |        -3 |      -6 |   -6 |   -1 |    0 |        5
+  93 |        1 |        -3 |    3000 |   -3 |    4 |    1 |        0
+  94 |        2 |        -3 |    3000 | 5000 |   25 |    0 |        1
+  95 |        3 |        -3 |    3000 |  -12 |   21 |    1 |        1
+  96 |        4 |        -3 |    3000 |  -20 |   46 |    0 |        2
+  97 |        5 |        -3 |    3000 |  -18 |   40 |    1 |        2
+  98 |        6 |        -3 |    3000 | 9000 |   64 |    0 |        3
+  99 |        7 |        -3 |    3000 |  -28 |   61 |    1 |        3
+ 100 |        8 |        -3 |    3000 | 4000 |   17 |    0 |        4
+ 101 |        9 |        -3 |    3000 |   -8 |   15 |    1 |        4
+ 102 |       10 |        -3 |    3000 | 3000 |   -1 |    0 |        5
+ 103 |        1 |        -2 |      -7 |   -2 |    3 |    1 |        0
+ 104 |        2 |        -2 |      -7 | 1000 |    2 |    0 |        1
+ 105 |        3 |        -2 |      -7 |   -1 |    1 |    1 |        1
+ 106 |        4 |        -2 |      -7 | 2000 |    6 |    0 |        2
+ 107 |        5 |        -2 |      -7 |   -3 |    4 |    1 |        2
+ 108 |        6 |        -2 |      -7 | 5000 |   25 |    0 |        3
+ 109 |        7 |        -2 |      -7 |  -12 |   21 |    1 |        3
+ 110 |        8 |        -2 |      -7 |  -20 |   46 |    0 |        4
+ 111 |        9 |        -2 |      -7 |  -18 |   40 |    1 |        4
+ 112 |       10 |        -2 |      -7 | 9000 |   64 |    0 |        5
+ 113 |       11 |        -2 |      -7 |  -28 |   61 |    1 |        5
+ 114 |       12 |        -2 |      -7 | 4000 |   17 |    0 |        6
+ 115 |       13 |        -2 |      -7 |   -8 |   15 |    1 |        6
+ 116 |       14 |        -2 |      -7 | 3000 |   14 |    0 |        7
+ 117 |       15 |        -2 |      -7 |   -7 |   -1 |    0 |        7
+ 118 |        1 |        -2 |      -6 |   -2 |    3 |    1 |        0
+ 119 |        2 |        -2 |      -6 | 1000 |    2 |    0 |        1
+ 120 |        3 |        -2 |      -6 |   -1 |    1 |    1 |        1
+ 121 |        4 |        -2 |      -6 | 2000 |    6 |    0 |        2
+ 122 |        5 |        -2 |      -6 |   -3 |    4 |    1 |        2
+ 123 |        6 |        -2 |      -6 | 5000 |   25 |    0 |        3
+ 124 |        7 |        -2 |      -6 |  -12 |   21 |    1 |        3
+ 125 |        8 |        -2 |      -6 |  -20 |   46 |    0 |        4
+ 126 |        9 |        -2 |      -6 |  -18 |   40 |    1 |        4
+ 127 |       10 |        -2 |      -6 | 9000 |   64 |    0 |        5
+ 128 |       11 |        -2 |      -6 |  -28 |   61 |    1 |        5
+ 129 |       12 |        -2 |      -6 | 4000 |   17 |    0 |        6
+ 130 |       13 |        -2 |      -6 |   -8 |   15 |    1 |        6
+ 131 |       14 |        -2 |      -6 | 3000 |   13 |    0 |        7
+ 132 |       15 |        -2 |      -6 |   -6 |   -1 |    0 |        7
+ 133 |        1 |        -2 |    3000 |   -2 |    3 |    1 |        0
+ 134 |        2 |        -2 |    3000 | 1000 |    2 |    0 |        1
+ 135 |        3 |        -2 |    3000 |   -1 |    1 |    1 |        1
+ 136 |        4 |        -2 |    3000 | 2000 |    6 |    0 |        2
+ 137 |        5 |        -2 |    3000 |   -3 |    4 |    1 |        2
+ 138 |        6 |        -2 |    3000 | 5000 |   25 |    0 |        3
+ 139 |        7 |        -2 |    3000 |  -12 |   21 |    1 |        3
+ 140 |        8 |        -2 |    3000 |  -20 |   46 |    0 |        4
+ 141 |        9 |        -2 |    3000 |  -18 |   40 |    1 |        4
+ 142 |       10 |        -2 |    3000 | 9000 |   64 |    0 |        5
+ 143 |       11 |        -2 |    3000 |  -28 |   61 |    1 |        5
+ 144 |       12 |        -2 |    3000 | 4000 |   17 |    0 |        6
+ 145 |       13 |        -2 |    3000 |   -8 |   15 |    1 |        6
+ 146 |       14 |        -2 |    3000 | 3000 |   -1 |    0 |        7
+ 147 |        1 |      2000 |      -7 | 2000 |    6 |    0 |        0
+ 148 |        2 |      2000 |      -7 |   -3 |    4 |    1 |        0
+ 149 |        3 |      2000 |      -7 | 5000 |   25 |    0 |        1
+ 150 |        4 |      2000 |      -7 |  -12 |   21 |    1 |        1
+ 151 |        5 |      2000 |      -7 |  -20 |   46 |    0 |        2
+ 152 |        6 |      2000 |      -7 |  -18 |   40 |    1 |        2
+ 153 |        7 |      2000 |      -7 | 9000 |   64 |    0 |        3
+ 154 |        8 |      2000 |      -7 |  -28 |   61 |    1 |        3
+ 155 |        9 |      2000 |      -7 | 4000 |   17 |    0 |        4
+ 156 |       10 |      2000 |      -7 |   -8 |   15 |    1 |        4
+ 157 |       11 |      2000 |      -7 | 3000 |   14 |    0 |        5
+ 158 |       12 |      2000 |      -7 |   -7 |   -1 |    0 |        5
+ 159 |        1 |      2000 |      -6 | 2000 |    6 |    0 |        0
+ 160 |        2 |      2000 |      -6 |   -3 |    4 |    1 |        0
+ 161 |        3 |      2000 |      -6 | 5000 |   25 |    0 |        1
+ 162 |        4 |      2000 |      -6 |  -12 |   21 |    1 |        1
+ 163 |        5 |      2000 |      -6 |  -20 |   46 |    0 |        2
+ 164 |        6 |      2000 |      -6 |  -18 |   40 |    1 |        2
+ 165 |        7 |      2000 |      -6 | 9000 |   64 |    0 |        3
+ 166 |        8 |      2000 |      -6 |  -28 |   61 |    1 |        3
+ 167 |        9 |      2000 |      -6 | 4000 |   17 |    0 |        4
+ 168 |       10 |      2000 |      -6 |   -8 |   15 |    1 |        4
+ 169 |       11 |      2000 |      -6 | 3000 |   13 |    0 |        5
+ 170 |       12 |      2000 |      -6 |   -6 |   -1 |    0 |        5
+ 171 |        1 |      2000 |    3000 | 2000 |    6 |    0 |        0
+ 172 |        2 |      2000 |    3000 |   -3 |    4 |    1 |        0
+ 173 |        3 |      2000 |    3000 | 5000 |   25 |    0 |        1
+ 174 |        4 |      2000 |    3000 |  -12 |   21 |    1 |        1
+ 175 |        5 |      2000 |    3000 |  -20 |   46 |    0 |        2
+ 176 |        6 |      2000 |    3000 |  -18 |   40 |    1 |        2
+ 177 |        7 |      2000 |    3000 | 9000 |   64 |    0 |        3
+ 178 |        8 |      2000 |    3000 |  -28 |   61 |    1 |        3
+ 179 |        9 |      2000 |    3000 | 4000 |   17 |    0 |        4
+ 180 |       10 |      2000 |    3000 |   -8 |   15 |    1 |        4
+ 181 |       11 |      2000 |    3000 | 3000 |   -1 |    0 |        5
+(181 rows)
+
+SELECT min(agg_cost) FROM q_result_1 WHERE edge = -1;
+ min
+-----
+   5
+(1 row)
+
+SELECT path_seq, start_vid, end_vid FROM q_result_1 WHERE edge = -1 and agg_cost = 5;
+ path_seq | start_vid | end_vid
+----------+-----------+---------
+       12 |        -5 |      -7
+       12 |        -5 |      -6
+       11 |        -5 |    3000
+       12 |        -4 |      -7
+       12 |        -4 |      -6
+       11 |        -4 |    3000
+       11 |        -3 |      -7
+       11 |        -3 |      -6
+       10 |        -3 |    3000
+       12 |      2000 |      -7
+       12 |      2000 |      -6
+       11 |      2000 |    3000
+(12 rows)
+
+SELECT * FROM q_result_1 WHERE start_vid = -3 AND end_vid = 3000;
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
+-----+----------+-----------+---------+------+------+------+----------
+  93 |        1 |        -3 |    3000 |   -3 |    4 |    1 |        0
+  94 |        2 |        -3 |    3000 | 5000 |   25 |    0 |        1
+  95 |        3 |        -3 |    3000 |  -12 |   21 |    1 |        1
+  96 |        4 |        -3 |    3000 |  -20 |   46 |    0 |        2
+  97 |        5 |        -3 |    3000 |  -18 |   40 |    1 |        2
+  98 |        6 |        -3 |    3000 | 9000 |   64 |    0 |        3
+  99 |        7 |        -3 |    3000 |  -28 |   61 |    1 |        3
+ 100 |        8 |        -3 |    3000 | 4000 |   17 |    0 |        4
+ 101 |        9 |        -3 |    3000 |   -8 |   15 |    1 |        4
+ 102 |       10 |        -3 |    3000 | 3000 |   -1 |    0 |        5
+(10 rows)
+
+SELECT * FROM q_result_1 WHERE start_vid = -3 AND end_vid = 3000 AND (cost != 0 OR edge = -1);
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
+-----+----------+-----------+---------+------+------+------+----------
+  93 |        1 |        -3 |    3000 |   -3 |    4 |    1 |        0
+  95 |        3 |        -3 |    3000 |  -12 |   21 |    1 |        1
+  97 |        5 |        -3 |    3000 |  -18 |   40 |    1 |        2
+  99 |        7 |        -3 |    3000 |  -28 |   61 |    1 |        3
+ 101 |        9 |        -3 |    3000 |   -8 |   15 |    1 |        4
+ 102 |       10 |        -3 |    3000 | 3000 |   -1 |    0 |        5
+(6 rows)
+
+WITH a AS (
+    SELECT * FROM q_result_1
+    WHERE start_vid = -3 AND end_vid = 3000 AND (cost != 0 OR edge = -1))
+SELECT
+    a.seq, a.path_seq,
+    (SELECT original_id FROM result2_vertices_pgr AS b WHERE a.start_vid = b.id) AS start_vid,
+    (SELECT original_id FROM result2_vertices_pgr AS b WHERE a.end_vid = b.id) AS end_vid,
+    (SELECT original_id FROM result2_vertices_pgr AS b WHERE a.node = b.id) AS node,
+    edge, cost, agg_cost
+FROM a;
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
+-----+----------+-----------+---------+------+------+------+----------
+  93 |        1 |      2000 |    3000 | 2000 |    4 |    1 |        0
+  95 |        3 |      2000 |    3000 | 5000 |   21 |    1 |        1
+  97 |        5 |      2000 |    3000 | 6000 |   40 |    1 |        2
+  99 |        7 |      2000 |    3000 | 9000 |   61 |    1 |        3
+ 101 |        9 |      2000 |    3000 | 4000 |   15 |    1 |        4
+ 102 |       10 |      2000 |    3000 | 3000 |   -1 |    0 |        5
+(6 rows)
+
+SELECT * from pgr_dijkstra($$SELECT id, * FROM edge_table$$,
+    ARRAY[2000], ARRAY[3000]);
+ seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
+-----+----------+-----------+---------+------+------+------+----------
+   1 |        1 |      2000 |    3000 | 2000 |  400 |    1 |        0
+   2 |        2 |      2000 |    3000 | 5000 |  800 |    1 |        1
+   3 |        3 |      2000 |    3000 | 6000 |  900 |    1 |        2
+   4 |        4 |      2000 |    3000 | 9000 | 1600 |    1 |        3
+   5 |        5 |      2000 |    3000 | 4000 |  300 |    1 |        4
+   6 |        6 |      2000 |    3000 | 3000 |   -1 |    0 |        5
+(6 rows)
+
+ROLLBACK;
+ROLLBACK
diff --git a/test/lineGraph/proofOfConcept1.test.sql b/test/lineGraph/proofOfConcept1.test.sql
new file mode 100644
index 0000000..040f9f6
--- /dev/null
+++ b/test/lineGraph/proofOfConcept1.test.sql
@@ -0,0 +1,115 @@
+
+-- this is a hand made test
+UPDATE edge_table SET id = id * 100, source = 1000 * source, target = 1000 * target;
+UPDATE edge_table_vertices_pgr SET id = id * 1000;
+
+DROP TABLE IF EXISTS result2;
+SELECT  * INTO result2 FROM pgr_lineGraphFull(
+    $$SELECT id, source, target, cost, reverse_cost
+    FROM edge_table$$
+);
+SELECT * FROM result2;
+
+DROP TABLE IF EXISTS result2_vertices_pgr;
+WITH foo AS (SELECT source AS id FROM result2
+    UNION
+    SELECT target FROM result2)
+SELECT *, NULL::BIGINT AS original_id
+INTO result2_vertices_pgr
+FROM foo
+ORDER BY id;
+
+SELECT * FROM result2_vertices_pgr;
+
+UPDATE result2_vertices_pgr AS r SET original_id = v.id
+FROM edge_table_vertices_pgr AS v WHERE v.id = r.id;
+
+WITH a AS (SELECT e.id, e.original_id FROM result2_vertices_pgr AS e WHERE original_id IS NOT NULL),
+b AS (SELECT * FROM result2 WHERE cost = 0 and source IN (SELECT id FROM a)),
+c AS (SELECT * FROM b JOIN result2_vertices_pgr ON(source = id)),
+d AS (SELECT c.source, v.original_id FROM c JOIN result2_vertices_pgr as v ON (target=v.id)),
+e AS (SELECT DISTINCT c.target, c.original_id FROM c JOIN result2_vertices_pgr AS r ON(target = r.id AND r.original_id IS NULL))
+UPDATE result2_vertices_pgr SET original_id = e.original_id FROM e WHERE e.target = id;
+
+WITH a AS (SELECT e.id, e.original_id FROM result2_vertices_pgr AS e WHERE original_id IS NOT NULL),
+b AS (SELECT * FROM result2 WHERE cost = 0 and target IN (SELECT id FROM a)),
+c AS (SELECT * FROM b JOIN result2_vertices_pgr ON(target = id)),
+d AS (SELECT c.target, v.original_id FROM c JOIN result2_vertices_pgr as v ON (source=v.id)),
+e AS (SELECT DISTINCT c.source, c.original_id FROM c JOIN result2_vertices_pgr AS r ON(source = r.id AND r.original_id IS NULL))
+UPDATE result2_vertices_pgr SET original_id = e.original_id FROM e WHERE e.source = id;
+
+WITH a AS (SELECT id FROM result2_vertices_pgr WHERE original_id IS NULL),
+b AS (SELECT source,edge FROM result2 WHERE source IN (SELECT id FROM a)),
+c AS (SELECT id,source FROM edge_table WHERE id IN (SELECT edge FROM b))
+UPDATE result2_vertices_pgr AS d SET original_id = (SELECT source FROM c WHERE c.id = (SELECT edge FROM b WHERE b.source = d.id)) WHERE id IN (SELECT id FROM a);
+
+WITH a AS (SELECT id FROM result2_vertices_pgr WHERE original_id IS NULL),
+b AS (SELECT target,edge FROM result2 WHERE target IN (SELECT id FROM a)),
+c AS (SELECT id,target FROM edge_table WHERE id IN (SELECT edge FROM b))
+UPDATE result2_vertices_pgr AS d SET original_id = (SELECT target FROM c WHERE c.id = (SELECT edge FROM b WHERE b.target = d.id)) WHERE id IN (SELECT id FROM a);
+
+SELECT * FROM result2_vertices_pgr;
+
+ALTER TABLE result2 ADD COLUMN original_source_vertex BIGINT;
+ALTER TABLE result2 ADD COLUMN original_target_vertex BIGINT;
+ALTER TABLE result2 ADD COLUMN original_source_edge BIGINT;
+ALTER TABLE result2 ADD COLUMN original_target_edge BIGINT;
+
+-- restoring the original_foo_vertex
+UPDATE result2 AS edges SET original_source_vertex = vertices.original_id
+FROM result2_vertices_pgr AS vertices WHERE edges.source = vertices.id;
+
+UPDATE result2 AS edges SET original_target_vertex = vertices.original_id
+FROM result2_vertices_pgr AS vertices WHERE edges.target = vertices.id;
+
+-- restoring the original_foo_edges
+UPDATE result2
+SET original_source_edge = edge,
+    original_target_edge = edge
+WHERE edge != 0;
+
+UPDATE  result2 AS a
+SET original_source_edge = b.edge
+FROM result2 AS b
+WHERE
+    a.original_source_edge IS NULL AND
+    b.original_source_edge IS NOT NULL AND
+    a.source = b.target;
+
+UPDATE  result2 AS a
+SET original_target_edge = b.edge
+FROM result2 AS b
+WHERE
+    a.original_target_edge IS NULL AND
+    b.original_target_edge IS NOT NULL AND
+    a.target = b.source;
+
+-- all the results
+DROP TABLE IF EXISTS q_result_1;
+SELECT * INTO q_result_1
+FROM pgr_dijkstra($$SELECT seq AS id, * FROM result2$$,
+    (SELECT array_agg(id) FROM result2_vertices_pgr where original_id = 2000),
+    (SELECT array_agg(id) FROM result2_vertices_pgr where original_id = 3000)
+);
+SELECT * FROM q_result_1;
+-- choosing the best many to many
+SELECT min(agg_cost) FROM q_result_1 WHERE edge = -1;
+SELECT path_seq, start_vid, end_vid FROM q_result_1 WHERE edge = -1 and agg_cost = 5;
+SELECT * FROM q_result_1 WHERE start_vid = -3 AND end_vid = 3000;
+-- not showing the 0 cost edges
+SELECT * FROM q_result_1 WHERE start_vid = -3 AND end_vid = 3000 AND (cost != 0 OR edge = -1);
+-- not showing the 0 cost edges and showing the original edges
+WITH a AS (
+    SELECT * FROM q_result_1
+    WHERE start_vid = -3 AND end_vid = 3000 AND (cost != 0 OR edge = -1))
+SELECT
+    a.seq, a.path_seq,
+    (SELECT original_id FROM result2_vertices_pgr AS b WHERE a.start_vid = b.id) AS start_vid,
+    (SELECT original_id FROM result2_vertices_pgr AS b WHERE a.end_vid = b.id) AS end_vid,
+    (SELECT original_id FROM result2_vertices_pgr AS b WHERE a.node = b.id) AS node,
+    edge, cost, agg_cost
+FROM a;
+
+-- A Dijkstra
+SELECT * from pgr_dijkstra($$SELECT id, * FROM edge_table$$,
+    ARRAY[2000], ARRAY[3000]);
diff --git a/test/lineGraph/proofOfConcept2.result b/test/lineGraph/proofOfConcept2.result
new file mode 100644
index 0000000..e23ae73
--- /dev/null
+++ b/test/lineGraph/proofOfConcept2.result
@@ -0,0 +1,147 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+DROP TABLE edge_table;
+DROP TABLE
+DROP TABLE edge_table_vertices_pgr;
+DROP TABLE
+CREATE TABLE edge_table (
+    id integer,
+    source integer,
+    target integer,
+    cost integer,
+    the_geom geometry(MultiLineString)
+);
+CREATE TABLE
+COPY edge_table (id, source, target, cost, the_geom) FROM stdin;
+COPY 302
+WITH a AS (SELECT source FROM edge_table UNION select target FROM edge_table)
+SELECT source AS id INTO edge_table_vertices_pgr FROM a;
+SELECT 256
+DROP TABLE IF EXISTS result2;
+NOTICE:  table "result2" does not exist, skipping
+DROP TABLE
+SELECT  * INTO result2 FROM pgr_lineGraphFull(
+    $$SELECT id, source, target, cost
+    FROM edge_table$$
+);
+SELECT 638
+SELECT count(*) FROM result2;
+ count
+-------
+   638
+(1 row)
+
+DROP TABLE IF EXISTS result2_vertices_pgr;
+NOTICE:  table "result2_vertices_pgr" does not exist, skipping
+DROP TABLE
+WITH foo AS (SELECT source AS id FROM result2
+    UNION
+    SELECT target FROM result2)
+SELECT *, NULL::BIGINT AS original_id
+INTO result2_vertices_pgr
+FROM foo
+ORDER BY id;
+SELECT 604
+SELECT count(*) FROM result2_vertices_pgr WHERE original_id IS NOT NULL;
+ count
+-------
+     0
+(1 row)
+
+SELECT count(*) FROM result2_vertices_pgr WHERE original_id IS NULL;
+ count
+-------
+   604
+(1 row)
+
+UPDATE result2_vertices_pgr AS r SET original_id = v.id
+FROM edge_table_vertices_pgr AS v WHERE v.id = r.id;
+UPDATE 256
+SELECT count(*) FROM result2_vertices_pgr WHERE original_id IS NOT NULL;
+ count
+-------
+   256
+(1 row)
+
+SELECT count(*) FROM result2_vertices_pgr WHERE original_id IS NULL;
+ count
+-------
+   348
+(1 row)
+
+WITH a AS (SELECT e.id, e.original_id FROM result2_vertices_pgr AS e WHERE original_id IS NOT NULL),
+b AS (SELECT * FROM result2 WHERE cost = 0 and source IN (SELECT id FROM a)),
+c AS (SELECT * FROM b JOIN result2_vertices_pgr ON(source = id)),
+d AS (SELECT c.source, v.original_id FROM c JOIN result2_vertices_pgr as v ON (target=v.id)),
+e AS (SELECT DISTINCT c.target, c.original_id FROM c JOIN result2_vertices_pgr AS r ON(target = r.id AND r.original_id IS NULL))
+UPDATE result2_vertices_pgr SET original_id = e.original_id FROM e WHERE e.target = id;
+UPDATE 240
+SELECT count(*) FROM result2_vertices_pgr WHERE original_id IS NOT NULL;
+ count
+-------
+   496
+(1 row)
+
+SELECT count(*) FROM result2_vertices_pgr WHERE original_id IS NULL;
+ count
+-------
+   108
+(1 row)
+
+WITH a AS (SELECT e.id, e.original_id FROM result2_vertices_pgr AS e WHERE original_id IS NOT NULL),
+b AS (SELECT * FROM result2 WHERE cost = 0 and target IN (SELECT id FROM a)),
+c AS (SELECT * FROM b JOIN result2_vertices_pgr ON(target = id)),
+d AS (SELECT c.target, v.original_id FROM c JOIN result2_vertices_pgr as v ON (source=v.id)),
+e AS (SELECT DISTINCT c.source, c.original_id FROM c JOIN result2_vertices_pgr AS r ON(source = r.id AND r.original_id IS NULL))
+UPDATE result2_vertices_pgr SET original_id = e.original_id FROM e WHERE e.source = id;
+UPDATE 78
+SELECT count(*) FROM result2_vertices_pgr WHERE original_id IS NOT NULL;
+ count
+-------
+   574
+(1 row)
+
+SELECT count(*) FROM result2_vertices_pgr WHERE original_id IS NULL;
+ count
+-------
+    30
+(1 row)
+
+WITH a AS (SELECT id FROM result2_vertices_pgr WHERE original_id IS NULL),
+b AS (SELECT source,edge FROM result2 WHERE source IN (SELECT id FROM a)),
+c AS (SELECT id,source FROM edge_table WHERE id IN (SELECT edge FROM b))
+UPDATE result2_vertices_pgr AS d SET original_id = (SELECT source FROM c WHERE c.id = (SELECT edge FROM b WHERE b.source = d.id)) WHERE id IN (SELECT id FROM a);
+UPDATE 30
+SELECT count(*) FROM result2_vertices_pgr WHERE original_id IS NOT NULL;
+ count
+-------
+   589
+(1 row)
+
+SELECT count(*) FROM result2_vertices_pgr WHERE original_id IS NULL;
+ count
+-------
+    15
+(1 row)
+
+WITH a AS (SELECT id FROM result2_vertices_pgr WHERE original_id IS NULL),
+b AS (SELECT target,edge FROM result2 WHERE target IN (SELECT id FROM a)),
+c AS (SELECT id,target FROM edge_table WHERE id IN (SELECT edge FROM b))
+UPDATE result2_vertices_pgr AS d SET original_id = (SELECT target FROM c WHERE c.id = (SELECT edge FROM b WHERE b.target = d.id)) WHERE id IN (SELECT id FROM a);
+UPDATE 15
+SELECT count(*) FROM result2_vertices_pgr WHERE original_id IS NOT NULL;
+ count
+-------
+   604
+(1 row)
+
+SELECT count(*) FROM result2_vertices_pgr WHERE original_id IS NULL;
+ count
+-------
+     0
+(1 row)
+
+ROLLBACK;
+ROLLBACK
diff --git a/test/lineGraph/proofOfConcept2.test.sql b/test/lineGraph/proofOfConcept2.test.sql
new file mode 100644
index 0000000..3da11f8
--- /dev/null
+++ b/test/lineGraph/proofOfConcept2.test.sql
@@ -0,0 +1,383 @@
+
+DROP TABLE edge_table;
+DROP TABLE edge_table_vertices_pgr;
+CREATE TABLE edge_table (
+    id integer,
+    source integer,
+    target integer,
+    cost integer,
+    the_geom geometry(MultiLineString)
+);
+
+
+
+COPY edge_table (id, source, target, cost, the_geom) FROM stdin;
+664	75242	13078	1	01050000000100000001020000000500000006BB5C440B595D413FE94F59BAA125410134DD6412595D41A025BB1FD6A125413849F7A815595D41640C555DEBA12541336449FE18595D41899CBB7916A225418F8280C419595D412B03161742A22541
+700	41613	6810	1	010500000001000000010200000004000000E44CC814E05C5D41C9DAE107B8AB254139C51DD7E25C5D41B9326524F9AB25415226091BE65C5D415F2F44630EAC25414C05189BEA5C5D411C439CCD14AC2541
+716	45339	41613	1	01050000000100000001020000000500000064F3864EEB5C5D410656760257AB254164869F7DE75C5D41AB83AD0C5FAB25414810CFBDE35C5D4189D7B9F57CAB2541EA0FD53FE15C5D41DA0C855493AB2541E44CC814E05C5D41C9DAE107B8AB2541
+729	63998	71809	1	010500000001000000010200000005000000C15382C3F4595D41541258A89298254182F9F3AAEF595D411F9411F49A982541A93E045CE9595D4117D3F75EB9982541CB2C54BCE3595D4194343A3EE6982541D013470AE2595D41E91170852F992541
+774	58520	17561	1	0105000000010000000102000000020000006146E653205C5D41042E827257AF25412548EA461B5C5D415341AA516EAF2541
+812	18110	11146	1	010500000001000000010200000003000000F6962046275C5D41D7CC99B77EA925418DD83F109B5C5D41C0DC291368A9254144A59163EA5C5D41A9AF309358A92541
+813	5165	11146	1	010500000001000000010200000003000000F6962046275C5D41D7CC99B77EA925418DD83F109B5C5D41C0DC291368A9254144A59163EA5C5D41A9AF309358A92541
+961	16837	52078	1	010500000001000000010200000003000000B150FCDA2E595D4137257F2B449925417658D79C1F595D41166D6DA46B9925416045BCF119595D41052B9CEF89992541
+962	6869	52078	1	010500000001000000010200000003000000B150FCDA2E595D4137257F2B449925417658D79C1F595D41166D6DA46B9925416045BCF119595D41052B9CEF89992541
+1214	16837	30525	1	010500000001000000010200000002000000B150FCDA2E595D4137257F2B449925416697657D3F595D41404D85E540992541
+1215	6869	30525	1	010500000001000000010200000002000000B150FCDA2E595D4137257F2B449925416697657D3F595D41404D85E540992541
+1297	31425	41133	1	010500000001000000010200000002000000062AD9566F5B5D41D18BD5FBC1A625410AA3ACE8705B5D41F4F6CFD493A92541
+1298	19402	41133	1	010500000001000000010200000002000000062AD9566F5B5D41D18BD5FBC1A625410AA3ACE8705B5D41F4F6CFD493A92541
+736	45624	12545	1	01050000000100000001020000000900000007DBC451CB575D4194DDC9238FA72541BA3E82B9CA575D41A30CA3D89DA725416D718B6ECB575D411DA91A97B3A725416BCC59C7CC575D41EEF43F35C9A72541E9DE3811D0575D41A135B2BCE5A7254199821F97D4575D41CF01FB6EF3A72541234EF9C9D7575D41434662CDF2A725414F7761E2DC575D413B0B9380EAA725411CF6F365DF575D41684AC76ADBA72541
+859	24891	10550	1	01050000000100000001020000000E000000A0155A97095C5D4184299F5CEC9C2541F3F5F406FF5B5D4103FD3A8D549D2541380BDFEEF65B5D41891898149F9D2541D16F992BE95B5D411E2F8EE5079E2541BB5E34F0CC5B5D417CD3F4C8C39E2541024B71269F5B5D419A8801D3F79F2541FF5C3C5F965B5D41149037E633A02541009FF24C8E5B5D41B73331B885A02541D80472DE865B5D41CC271D6AD7A0254157EFCAB1805B5D418FE29F9121A1254126B6DB8A7A5B5D418ADA6B0373A125411B83E8B6755B5D416A1B9BC9D2A12541936B27BD725B5D413CCCBB501CA22541F34B87FF705B5D41173727 [...]
+1633	10550	19402	1	010500000001000000010200000006000000F34B87FF705B5D411737270357A22541010A9E476F5B5D41314BD8FF98A225415D4F8FA66D5B5D41BAE19E25F8A22541BF9BB4B46C5B5D416967DABF65A32541BED33E496D5B5D41739AE44A23A42541062AD9566F5B5D41D18BD5FBC1A62541
+1639	10550	31425	1	010500000001000000010200000006000000F34B87FF705B5D411737270357A22541010A9E476F5B5D41314BD8FF98A225415D4F8FA66D5B5D41BAE19E25F8A22541BF9BB4B46C5B5D416967DABF65A32541BED33E496D5B5D41739AE44A23A42541062AD9566F5B5D41D18BD5FBC1A62541
+1664	47608	5165	1	010500000001000000010200000002000000D9912A6FF35B5D4184BF089181A92541F6962046275C5D41D7CC99B77EA92541
+1845	11146	35635	1	01050000000100000001020000000300000044A59163EA5C5D41A9AF309358A92541E71DED03145D5D415F64C0085FA925414783C1C9295D5D41333BD41362A92541
+1861	11146	64473	1	01050000000100000001020000000300000044A59163EA5C5D41A9AF309358A92541E71DED03145D5D415F64C0085FA925414783C1C9295D5D41333BD41362A92541
+43627	75308	7312	1	010500000001000000010200000006000000DABDD22A19575D41BCC43DC78BAA2541C66C4C5C19575D4176134FA399AB2541CE0E380919575D414A3759D3FFAB2541A640074C17575D41FEC58C863AAC254171598B4114575D41EB213A306EAC2541088ED1260E575D415CB25439CEAC2541
+43674	7312	54278	1	010500000001000000010200000008000000088ED1260E575D415CB25439CEAC25412817B3D819575D41CEFBCB4406AD254199E3665520575D41854B2F2A22AD25410D7765BD28575D41CEB37FAE3DAD25415C1591902E575D415D2F066A52AD254154E863C331575D417F9437C851AD2541387762673B575D41E69B58775EAD2541C76ABCA155575D41800CC84859AD2541
+43748	8369	62998	1	01050000000100000001020000000B0000008EC3155AC1575D41AF53EFAA5D9D2541D29043DDA5575D41B5BB4D636A9D2541C257683B9E575D4194D1D07B7A9D2541A2777E8D8E575D41576ADAB3E39D2541647C9F2981575D41CF4A7FEFF49D2541E81CBE7079575D41921314DFE79D25418B65F56165575D41E6662EE3A29D2541655D9D2434575D41EF2DB6E8B39D2541B4F5D9B128575D41051D010ECC9D25417B66861015575D41AD59AE95119E2541F5DB04EE00575D418DF770FB829E2541
+2483	25021	17561	1	0105000000010000000102000000050000000627ABFE0A5C5D41B24734AD12AF254153B6E6110D5C5D41B39AFC5445AF2541A1D8C6B70F5C5D419C0DE7FD61AF25418E7800F6125C5D41F14F3AF26FAF25412548EA461B5C5D415341AA516EAF2541
+1654	7177	58358	1	010500000001000000010200000016000000D3232A15885C5D415F32A3CF7D8F2541E68BE926825C5D416517732718902541EDE4CF89785C5D417D014647E690254121711E12705C5D41B99C7A698891254135A58CE0605C5D41AA5EC0FB919225411A010C374C5C5D415817E473FB932541D6D501113D5C5D41AC86EF9A1395254154CB802C325C5D4192281FFBE1952541A580ABC52C5C5D41C215C6BF5796254192DF7E39265C5D4181192382F9962541A84DB750235C5D41E394D8E7589725415D6D6E11215C5D4181D5C977BF9725417EA4EF751F5C5D41F850B1E725982541EBE936C61C5C5D4151401D [...]
+3725	19613	14977	1	010500000001000000010200000003000000D367748CA5595D41DACBD4063A9B2541C5017C9CA9595D413813462C829B25415ED2A46DAB595D41789F3CE2309C2541
+3734	18596	19613	1	0105000000010000000102000000040000000949C204AB595D41464214563A992541BFE105A2AB595D41A13A1CB5D29A2541FAC1DA7CAA595D419AE919B3FE9A2541D367748CA5595D41DACBD4063A9B2541
+4309	23765	46445	1	010500000001000000010200000002000000F7EED850E2595D41AF48B557C0A52541CD6FD5E0CC595D4154BCE2AD2AA62541
+4331	18596	71809	1	0105000000010000000102000000020000000949C204AB595D41464214563A992541D013470AE2595D41E91170852F992541
+3721	19613	11736	1	01050000000100000001020000000B000000D367748CA5595D41DACBD4063A9B2541B65242F09D595D4125660F68519B25418683A5E696595D413ACB4FCA529B25410B8EFDD27F595D41C8C749BD489B254108A660C978595D4111AC9F1F4A9B25410C7D22FC66595D4116C7FA18729B25411147FF2541595D418B0F0D5D5C9B25414CA861AD35595D416771B2356D9B254111DDF0A729595D41522CAF579B9B254150366BFC1A595D4141BD9ED1AC9B25411448CDD103595D4139CEAC9C859B2541
+43510	55040	37174	1	010500000001000000010200000002000000EE07D0F919575D413FCD069CE6A52541BC09BFD51B575D41E0486BEF0FA92541
+43639	55041	22534	1	010500000001000000010200000002000000EF2FE13AF5575D41B982815260AA2541DB72458C54585D41EA34E6854DAA2541
+43646	58868	28506	1	0105000000010000000102000000020000002984B2D0F6575D41ADE6FB2A32AD25412558D3A2FC575D41C18FB44D92B42541
+43652	74969	29224	1	0105000000010000000102000000020000001EE947AC6F575D4161AAD2D185AF254190A2BD1FDF565D413A5244AEA9AF2541
+43656	7312	30149	1	010500000001000000010200000003000000088ED1260E575D415CB25439CEAC25415859ED06F4565D416E7BAB1BC4AD25416E06E5F9E6565D419BFE12B242AE2541
+43658	64813	34773	1	010500000001000000010200000005000000A5F28F94C5575D414611AE2D43AD2541622CB583B1575D41D059DE70CAAD254105254E7E93575D410F3C05F5DEAD254198B21F958A575D413664454EEFAD25412E47E7BB7C575D410FC664FC3AAE2541
+43660	54278	34773	1	010500000001000000010200000004000000C76ABCA155575D41800CC84859AD25413C15C06268575D41C0AC033B97AD254162E785E770575D41DDE4E232D7AD25412E47E7BB7C575D410FC664FC3AAE2541
+43672	42892	54278	1	01050000000100000001020000000500000074241EB762575D4103E37FBD15AC2541A857D9A65F575D41CD9CD21C42AC2541B05A5AD85D575D41E9CD2FF166AC254188EF9C715B575D4102BF6D7A9AAC2541C76ABCA155575D41800CC84859AD2541
+43676	55041	58868	1	010500000001000000010200000002000000EF2FE13AF5575D41B982815260AA25412984B2D0F6575D41ADE6FB2A32AD2541
+43678	11530	64813	1	01050000000100000001020000000300000089077111C0575D416B24CEB7F4AB2541CAD678DEBD575D41E90C54DD69AC2541A5F28F94C5575D414611AE2D43AD2541
+43682	74969	65458	1	0105000000010000000102000000040000001EE947AC6F575D4161AAD2D185AF2541268247B472575D412622FC671EB025410020AFBE76575D4104F84B425FB02541F21269077E575D41BAF46E0FAEB02541
+43692	7303	74220	1	01050000000100000001020000000400000042ACE5A5BE575D41ECFD030ED5AF2541F5FFBCCBBD575D41ADD1B1D15FB025414E484214BC575D4150DD0DCFA1B02541CB124177B8575D415EF1A877EBB02541
+43694	34773	74969	1	0105000000010000000102000000060000002E47E7BB7C575D410FC664FC3AAE254105B3544875575D41EC51256785AE2541EFF20FFC70575D41C38EAA9BC0AE25417C7DD8A06E575D41DFAC6BB902AF2541426A66256E575D4175C19CE135AF25411EE947AC6F575D4161AAD2D185AF2541
+43696	9427	75308	1	010500000001000000010200000007000000D675C8D4FB555D41C426E6F0BCAA2541D8C311E450565D4103349CCDA4AA2541212DD05A75565D416E110C969DAA25416E0E068A98565D411D73CF9F96AA2541D246543DD0565D41100A29329AAA254176588A6CF3565D4151CE303D93AA2541DABDD22A19575D41BCC43DC78BAA2541
+43698	46917	8175	1	01050000000100000001020000000400000013BE0D7BB5575D410BDF88B03F9725412621E9CAE6575D41BC22451F849A2541F82266FAF7575D41A16C4857039C2541CEC48C3604585D419D31155AEA9C2541
+43700	8175	8369	1	010500000001000000010200000003000000CEC48C3604585D419D31155AEA9C25416A906ABED7575D41784AAC3F599D25418EC3155AC1575D41AF53EFAA5D9D2541
+43704	62043	10871	1	010500000001000000010200000002000000D96E508975575D41B7AB3A26279825417D205F1E41575D41195F7C1740982541
+43706	46917	10871	1	01050000000100000001020000000A00000013BE0D7BB5575D410BDF88B03F97254150F90AB2A7575D410544B3730196254164CD04B3A3575D41B9D8DF2DCF95254158E1D49D9C575D41EBDF04FDC1952541E16832D172575D41769D54D65496254132DAB7DE4A575D4112D77E70D19625419ED375D745575D41485C5F9CEF962541CF9BCB9041575D412F2C321B32972541A4FD8B7140575D41C7A6B863659725417D205F1E41575D41195F7C1740982541
+43708	60251	15590	1	01050000000100000001020000000200000046A3729573575D41AE46C17EE3A525418DDB97CF75575D414949B836B5A82541
+43714	48344	37263	1	0105000000010000000102000000060000004269057842575D417EBC077FF59925418F052DDE11575D41CA34DF64069A254129A4F5EE08575D41475450740F9A25414E45FF7F04575D41A1456FEB1E9A2541FA82A3D100575D4114BC7BB5529A2541DA12D42E00575D411A095C9FF29B2541
+43720	860	39668	1	010500000001000000010200000005000000DA62F82B2D585D416B47B963F5A025414A91A4A848585D41DBF3D3ACE8A02541EBC6CC4C52585D415587045DF5A02541F494B53456585D419B2D157A0AA12541627663D75A585D4139B6EB9F3CA12541
+43722	37263	41334	1	010500000001000000010200000003000000DA12D42E00575D411A095C9FF29B25417E3F05ED3E575D41AE1F0CD0F49B2541222D65396E575D41C70381E1DC9B2541
+43724	37653	48344	1	010500000001000000010200000002000000F48E801B7A575D41A2655836E39925414269057842575D417EBC077FF5992541
+43726	10871	48344	1	0105000000010000000102000000020000007D205F1E41575D41195F7C17409825414269057842575D417EBC077FF5992541
+43730	15683	55040	1	010500000001000000010200000004000000981A104011575D41688F813EC5A325417228463916575D419EA9A9BD64A425410E31189218575D412A6084DFEEA42541EE07D0F919575D413FCD069CE6A52541
+43732	75308	55041	1	010500000001000000010200000005000000DABDD22A19575D41BCC43DC78BAA254131E6819456575D41CDCABBA47FAA25412CB816A07D575D415AA5D8397FAA25410640A1699A575D41CE71A18A79AA2541EF2FE13AF5575D41B982815260AA2541
+43734	72321	56012	1	010500000001000000010200000002000000E53D393B9B585D41B068AD2366A725414641F2E754585D419B7FD19682A72541
+43736	43444	56012	1	010500000001000000010200000005000000C428B4715F585D4127795D4E73A525410CB1EBD860585D4161C00F0B6BA62541C01F9CD05F585D41BE7C897CBBA6254123DE35505C585D41E809369829A725414641F2E754585D419B7FD19682A72541
+43738	31906	56012	1	01050000000100000001020000000400000055D3C501FB575D4151CBA9E626A72541CC674E6231585D41D760E62C1CA72541409E448C3F585D41369C7A8F36A725414641F2E754585D419B7FD19682A72541
+43740	55040	60251	1	010500000001000000010200000002000000EE07D0F919575D413FCD069CE6A5254146A3729573575D41AE46C17EE3A52541
+43742	5392	60251	1	0105000000010000000102000000020000003CA306F299575D41551A20A0D4A5254146A3729573575D41AE46C17EE3A52541
+43752	32238	67891	1	010500000001000000010200000009000000ABB306D609575D416113183C27972541575AB8E90E575D41A3C7146EB79825417C6A83680E575D412B9C004CE39825414D693B320D575D414AB1846BF99825419B0A9EAE0A575D41AD90848108992541814BD698E5565D41C6CB8F211799254152C70B4ADF565D41DEDA678E35992541AA818919DE565D41E5DF33F85299254164B180E5E0565D412C71CBB97A9E2541
+43754	38708	72735	1	0105000000010000000102000000020000000B9F4AC051585D41E022893952A42541772F0FF69B585D4121F8379943A42541
+43758	15683	73188	1	010500000001000000010200000004000000981A104011575D41688F813EC5A32541EF02CDD003575D4160C84BE6C7A3254186B74D67F6565D41D5FC6AD8D1A32541285669AFCD565D41CB246BD722A42541
+43764	26765	74349	1	01050000000100000001020000000500000093AA82C975575D4135DD548662A125416619C75B58575D4146EA505668A12541846B85BD05575D4123B1EE7B5BA1254196BF853BF3565D41713150BB6DA12541BE242DF2E3565D419C1A2FA386A12541
+43766	72489	74409	1	010500000001000000010200000002000000BDC939E53C585D4164C3A1F7FA9E2541E36F6E2210585D415F4BD2160B9F2541
+43768	8175	74409	1	010500000001000000010200000004000000CEC48C3604585D419D31155AEA9C2541A6664AD20D585D4177B461FFBB9D254111A2E6FC0F585D41C0E158CF0B9E2541E36F6E2210585D415F4BD2160B9F2541
+43772	37174	75308	1	010500000001000000010200000002000000BC09BFD51B575D41E0486BEF0FA92541DABDD22A19575D41BCC43DC78BAA2541
+75722	46425	13526	1	010500000001000000010200000006000000837FBA50C4595D41E267BC3829A02541D7ACDE8DB6595D415956C50C92A02541BD6FCE6EA9595D41794EAEC0FAA025417057F2D4A3595D411DB75BEA2EA12541CBAB3D68A1595D4186FEC3285BA125415AA9A48AA1595D41DFD65CE686A12541
+75726	46425	20870	1	010500000001000000010200000008000000837FBA50C4595D41E267BC3829A02541EFD887CBD1595D41AFA43A2935A02541E96B7566DD595D414FBEE30E50A025414CC7E443E7595D414FAB4AA7A5A0254185F13DD1EE595D41107066F14BA12541B4E53A87F5595D413C0150BFB0A125415AFAC7A70F5A5D4194E197AE5AA22541A8003269165A5D4170812111CEA22541
+75728	8278	20870	1	010500000001000000010200000004000000C0531FD0425A5D4105D9D85649A22541AE69411A3A5A5D41EE7D134A9BA22541AAF17469345A5D415B205D4AB2A22541A8003269165A5D4170812111CEA22541
+75730	33950	22534	1	0105000000010000000102000000020000003055908953585D41DF45FC7705A92541DB72458C54585D41EA34E6854DAA2541
+75732	22646	22534	1	01050000000100000001020000000D0000009F0FEA09FF595D41E81DEEEDB7A925410C746C7EDC595D410B9FD7B7BEA9254176276218A6595D410A86221EC2A925412727337885595D41AB3FA288C8A925416DE629F669595D411D45D0F1CDA92541D2F0F60A4A595D41DA70AA1BEAA92541567CEB3D2F595D41E7CE0F4405AA25418C64498919595D41795F922018AA2541A0DEE33003595D4115EE821D2BAA25411DF99CB4E7585D410BA260D237AA2541CD7EAF70C6585D410B9C985F3EAA2541D6081018A7585D417915748C44AA2541DB72458C54585D41EA34E6854DAA2541
+75734	23765	22646	1	010500000001000000010200000005000000F7EED850E2595D41AF48B557C0A525412E89A381F4595D41D516B7D7E7A625415D2B1920FC595D417118B200A4A7254107AE6CEBFD595D41369F816C4BA825419F0FEA09FF595D41E81DEEEDB7A92541
+75736	75907	23765	1	0105000000010000000102000000020000007BDB6889055A5D41BF044A78F4A42541F7EED850E2595D41AF48B557C0A52541
+75740	75907	28324	1	0105000000010000000102000000040000007BDB6889055A5D41BF044A78F4A42541A295F6830E5A5D41C6601600FAA42541DEDB91151C5A5D4133F80C1A23A52541DE5209C62B5A5D412D12FF6F8DA52541
+75742	20870	28457	1	010500000001000000010200000005000000A8003269165A5D4170812111CEA22541311D79E8125A5D4125942F2C3CA32541A728E19B0E5A5D41388E8C5F77A32541E51BAE09025A5D41DBC2C2C9C2A325412F422A46F7595D4103872760E9A32541
+75744	13526	28457	1	01050000000100000001020000000C0000005AA9A48AA1595D41DFD65CE686A125412466DDEEA2595D415ACE4919ABA1254186F220F1A4595D41361ABFE1C7A12541C8A7F042AA595D41E259887C08A22541D45DFF50B5595D415ECD46AB40A225415CDE7379BE595D410DFFEB8480A225413631C4D8CF595D415C1AB3D26DA32541D8278C2AD5595D412F40946DAEA325410DB4B005DD595D41D258733DE7A325414F456620E4595D411A4332BAFBA32541DCE7F71AED595D417924E04101A425412F422A46F7595D4103872760E9A32541
+75746	51217	28520	1	010500000001000000010200000002000000A6244826C8585D41068D61E809A1254128B472ECDD585D417DB0F7E90CA12541
+75750	56012	33950	1	0105000000010000000102000000030000004641F2E754585D419B7FD19682A72541A405D24452585D4132B4DD7839A825413055908953585D41DF45FC7705A92541
+75752	39221	33950	1	0105000000010000000102000000020000005E6CFEFB37585D4192A0F84FFCA825413055908953585D41DF45FC7705A92541
+75758	52625	51217	1	0105000000010000000102000000040000003EF84E3CCC585D413B132D8EB99F25416B64E02BC9585D41A5DA0BEDE59F2541D2DFC706C8585D412C4A25EB11A02541A6244826C8585D41068D61E809A12541
+75764	70733	52625	1	010500000001000000010200000005000000D3473EF6F9585D4197B02122439F25410CEB6730ED585D41BDDB55F14C9F25413BEB57F4D6585D414DBDFB61849F254128739043D1585D4103E111639B9F25413EF84E3CCC585D413B132D8EB99F2541
+75774	44829	65599	1	010500000001000000010200000004000000C30C637658585D416A32C13C17A325416F4A97628A585D41113A2EB114A32541D81A502A90585D414605FDD81AA32541E4E0F9B594585D41331AE1D52FA32541
+75780	65599	72735	1	010500000001000000010200000005000000E4E0F9B594585D41331AE1D52FA32541B525214D99585D4130894E6753A32541A27DED5A9B585D41244215C47EA325413329B2CA9C585D419FF2648BB1A32541772F0FF69B585D4121F8379943A42541
+75784	70733	75242	1	010500000001000000010200000004000000D3473EF6F9585D4197B02122439F2541FACEED9305595D4101CFB59031A0254109D72F1709595D41125834FF96A0254106BB5C440B595D413FE94F59BAA12541
+75786	28457	75907	1	0105000000010000000102000000020000002F422A46F7595D4103872760E9A325417BDB6889055A5D41BF044A78F4A42541
+75823	5541	43444	1	010500000001000000010200000007000000A621B57E3B585D41C3D04B6182A42541BE16BB4A3C585D419DF5D848B5A4254146A952133F585D412FB34FAEFDA425418A7DFBB543585D412FB81CD42FA525413293AF9449585D417C50D02453A5254156DB2EB550585D413735B0EA6EA52541C428B4715F585D4127795D4E73A52541
+75889	7303	36118	1	01050000000100000001020000000200000042ACE5A5BE575D41ECFD030ED5AF2541DB21C6B4EC575D416AD403F7CBAF2541
+75919	64813	58471	1	010500000001000000010200000002000000A5F28F94C5575D414611AE2D43AD2541A80D36DAD6575D413EEF00C53FAD2541
+75921	58868	58471	1	0105000000010000000102000000020000002984B2D0F6575D41ADE6FB2A32AD2541A80D36DAD6575D413EEF00C53FAD2541
+75932	58471	72609	1	010500000001000000010200000002000000A80D36DAD6575D413EEF00C53FAD2541024E1A5CD6575D41F175E52C3FAE2541
+89377	70107	49762	1	01050000000100000001020000000B000000B8D91D6E9C585D415ACA78011F912541A3FC757981585D41EC04196147912541D935154262585D412C785F4C799125416D9ACC8C40585D41E684FB97C19125413C7A59EE2A585D411A46939FF1912541BEC7A95515585D4143F49CF128922541026DD5A2F5575D41269C5A068E922541A49FA8A6DB575D41FD7A1B64E392254142ECD4D5AA575D41E74B3FEA7E93254116B236476F575D417BDEBB54489425412F3777AD48575D41DC3F038DDA942541
+91046	54304	20514	1	010500000001000000010200000007000000D46D84A24E595D417842C4E36DA825417C889DD55A595D41ED5D13147AA8254175C825C575595D412510BFA98AA8254196834632A8595D4185A402465CA825416934C5D4CA595D41973174A472A82541357AB296D0595D41C58DBA8271A82541A7BD1E5CD4595D41E42FC8E25AA82541
+91048	1573	20514	1	0105000000010000000102000000060000000F62D628C2595D41210C0BD95FA625415E9FA7BECA595D4103BEBCB1B5A625416A0C0B35D2595D41E55BB7D23EA72541C9E610CFD5595D410614966AC1A7254191739DB7D6595D4145909CC518A82541A7BD1E5CD4595D41E42FC8E25AA82541
+91056	27628	31330	1	0105000000010000000102000000060000000FA0C8E748595D4174172CF396A325411A3E777B44595D41FF9638F379A42541FB2D3D3944595D41C610F801F6A4254180D421E149595D412E888CF6A3A5254184F1EF3C4A595D41370ECF9A18A625411571152C48595D41AFC0917DB9A62541
+91058	1573	31330	1	0105000000010000000102000000040000000F62D628C2595D41210C0BD95FA62541969C13CDB6595D41619E712495A6254197A379E9AD595D4137C606C6ACA625411571152C48595D41AFC0917DB9A62541
+91092	39908	75438	1	010500000001000000010200000003000000F8232D138E595D41751184C472A4254163F6F04E7B595D41AFDAE20D01A52541755B6A0277595D41659882413CA52541
+93066	28324	4055	1	010500000001000000010200000003000000DE5209C62B5A5D412D12FF6F8DA52541775F5E83225A5D4187088EACFCA525418412BFEB1E5A5D41AB7A879E4DA62541
+93068	19179	4055	1	010500000001000000010200000002000000170294740F5A5D41407F572F2CA625418412BFEB1E5A5D41AB7A879E4DA62541
+93077	70733	15914	1	010500000001000000010200000006000000D3473EF6F9585D4197B02122439F25418F2691623C595D4167C22A96119F25418F65B5754A595D41C5C32DD10E9F2541991BD73D59595D41B7C8D7CA219F2541EBD8DE7E67595D41742B2358599F2541ACB1676976595D411372900F989F2541
+93079	51263	16405	1	0105000000010000000102000000080000006DDCBB125F5A5D41958861607BA62541C442EF00605A5D41F1D1B805DAA625415B1355C1605A5D41DE87E958FEA62541F12F8025625A5D41BEDFF28B22A72541BF74B020685A5D41297C42516AA725411C34A0286A5A5D41390926648EA7254156D8BEEE6A5A5D41AF9C9C01BAA72541385A8B1C6B5A5D41FFFDC353F4A72541
+93083	13078	23765	1	0105000000010000000102000000080000008F8280C419595D412B03161742A2254141912E1D30595D41516A591A2FA2254164E43F074B595D41C3764B6538A2254176B5A4CF62595D4153A86A3058A2254192056B6779595D415AAE406595A22541ECA280DD8C595D412EFC201AE9A22541F6DEFE23A5595D410389BC47A9A32541F7EED850E2595D41AF48B557C0A52541
+93085	16405	26483	1	010500000001000000010200000007000000385A8B1C6B5A5D41FFFDC353F4A725412D915106685A5D41396BDF6719A82541716D9946645A5D410B33DE5137A82541D91EE4335F5A5D4181C2A3E746A825413678BB71325A5D41E65824FD56A8254129BBD84D2D5A5D41D22435B450A82541BF5F0B66295A5D41AEB768963BA82541
+93087	4055	26483	1	0105000000010000000102000000070000008412BFEB1E5A5D41AB7A879E4DA6254171B72B451D5A5D413F2C437AA5A6254152BE524A1E5A5D418426A74821A725412D163E46215A5D41A5FC114BABA7254121B2D56A235A5D4108C93ED1F3A7254190238E16265A5D4157F1E8C317A82541BF5F0B66295A5D41AEB768963BA82541
+93091	44230	28324	1	010500000001000000010200000005000000DA5A7E1E575A5D41900114DD51A5254186767FC54C5A5D41BB28446C2FA5254122742189425A5D417EAED66E31A525415B4A201C375A5D412CECDADA50A52541DE5209C62B5A5D412D12FF6F8DA52541
+93097	10252	44230	1	010500000001000000010200000002000000114316D8685A5D41CE9EA87C40A42541DA5A7E1E575A5D41900114DD51A52541
+93105	15914	46425	1	010500000001000000010200000009000000ACB1676976595D411372900F989F25418A38F0D97F595D41EB4D8424639F2541E0A7CCA48F595D411643E4621E9F254196A066BB9B595D41EFD82E20069F2541A4FCD8ACA6595D41609B87DB199F2541E9ACEE67B0595D414F981EB6439F2541C05EE59BB9595D412A1A4624929F2541D5123A97BF595D415AA62BE9D99F2541837FBA50C4595D41E267BC3829A02541
+93109	44230	51263	1	010500000001000000010200000005000000DA5A7E1E575A5D41900114DD51A5254194C77A6A5C5A5D410C42FA2D8BA5254111936C725E5A5D41A3EDDA40AFA52541975D5F275F5A5D4188A481FFC4A525416DDCBB125F5A5D41958861607BA62541
+93111	43498	51263	1	01050000000100000001020000000200000038041B0D7D5A5D4140D6345058A625416DDCBB125F5A5D41958861607BA62541
+93118	16405	64640	1	010500000001000000010200000002000000385A8B1C6B5A5D41FFFDC353F4A7254115C94F38815A5D4109B202B364A82541
+104257	13916	18194	1	01050000000100000001020000000A0000002B0CE26B985A5D41094F4E682D9D25412A3B4B76905A5D41759D6CAEA39D2541267174F58C5A5D41988F4BC9119E25412E80DA3F8D5A5D41D469C68E709E25415087973E915A5D41B92ACBD5A29E25413937D7559A5A5D41875E6DD1CC9E2541B9BC4147A55A5D41ECBCE08DE09E2541611181D4AE5A5D419AE94D17D09E254153674065B65A5D4126205C22AA9E2541B34A8F97BC5A5D4196A2A044679E2541
+94486	11146	45339	1	01050000000100000001020000000200000044A59163EA5C5D41A9AF309358A9254164F3864EEB5C5D410656760257AB2541
+95095	31330	54304	1	0105000000010000000102000000040000001571152C48595D41AFC0917DB9A625411AEAE7D247595D41F428426318A725415D4AE5B14B595D41CA272176F2A72541D46D84A24E595D417842C4E36DA82541
+99135	66572	9117	1	010500000001000000010200000009000000CE839E0D835A5D41D6BFFB61879525410107D2AE955A5D4139F47B266D962541A60A7E92A85A5D4125E675DCD6962541DEC10D35AD5A5D411385600309972541177DB1F7AF5A5D41A4E63C1F4A9725413941A489B15A5D4143CD6FA4A8972541B2DA92C8B15A5D4120095FD5F8972541835493D4AE5A5D41753CFAA649982541379440BEAB5A5D41CC99FCBA6E982541
+99137	62271	9117	1	0105000000010000000102000000070000008FB9F1495C5A5D41107CD24F86972541A8EAE2247A5A5D4139DDE50B0B982541B9ABD031895A5D411DE7888275982541449E1258905A5D413ABA4A949898254161844BCD9D5A5D4159EB9A3B9D982541974E37D1A45A5D412DE4D18F94982541379440BEAB5A5D41CC99FCBA6E982541
+99139	74659	10396	1	010500000001000000010200000003000000BFE6DBC6275A5D417AC411D221992541041B3D1E395A5D41C7095E4C34992541739C29A1485A5D413572545064992541
+99141	62271	10396	1	0105000000010000000102000000020000008FB9F1495C5A5D41107CD24F86972541739C29A1485A5D413572545064992541
+99159	10396	41528	1	010500000001000000010200000002000000739C29A1485A5D41357254506499254157DDB4AC675A5D41EDE5CEA2CB992541
+99179	66572	58219	1	010500000001000000010200000007000000CE839E0D835A5D41D6BFFB61879525410C4CDC606E5A5D41258356CA499525418EC8B87A635A5D411B7BA9A2449525419ABAA5124F5A5D41F9D475865E9525410A74DE45305A5D41609F36654795254156F7A276255A5D4110A4DD665F952541CB0F74380A5A5D4135C57A49BC952541
+99185	24144	62271	1	010500000001000000010200000005000000D13EEFA6175A5D410A5E456F599725418FB9DB7B225A5D41B0DAD2B748972541B4F6CFA32E5A5D41E3859E5446972541C01E53BD455A5D41E35F81AD579725418FB9F1495C5A5D41107CD24F86972541
+99187	24984	66572	1	0105000000010000000102000000060000008B78D87BAC5A5D4180A0FD304C9525414D7C1FCCA25A5D419FFAF8E9309525419F1D3242975A5D414DF935E22B95254112ABA8F68E5A5D41737551CE349525418E9583E9895A5D41E64143AE4B952541CE839E0D835A5D41D6BFFB6187952541
+99201	14902	6851	1	010500000001000000010200000006000000B61E5F07B3585D412DBBF560BB992541F338E36AB7585D417DF911569D992541F04E58B6BF585D41518D69689499254173CCD962E0585D41EEF1E18F9C992541BA7F2336E6585D413459694CB19925419494333EE8585D41F4EBF95ED5992541
+99209	5717	11736	1	0105000000010000000102000000020000008A156D7DE7585D41894669D5509B25411448CDD103595D4139CEAC9C859B2541
+99303	66810	43444	1	010500000001000000010200000004000000BFE00D7B99585D41E32F07832DA525416BB2587F94585D419059C7425AA52541333305968B585D41445C1E9B6AA52541C428B4715F585D4127795D4E73A52541
+99327	72735	66810	1	010500000001000000010200000003000000772F0FF69B585D4121F8379943A425410740F47F9C585D41F49A908FF2A42541BFE00D7B99585D41E32F07832DA52541
+99810	45715	14275	1	010500000001000000010200000004000000AE9DD26A53595D418043A7941A962541C3B1546F6D595D41A12FE20EA09625417823E52070595D410C3A9A4BCB9625411A01C60371595D4146BA495C1B972541
+99822	30525	18596	1	0105000000010000000102000000020000006697657D3F595D41404D85E5409925410949C204AB595D41464214563A992541
+99831	55231	30525	1	0105000000010000000102000000030000009587AD7B47595D41E7AE02A905982541AF36794C40595D410C53878DA79825416697657D3F595D41404D85E540992541
+99847	62262	45715	1	010500000001000000010200000005000000BBB4CDB46D595D41170C98C057952541C93A7EA961595D417B440B987E95254140D6CF095C595D4184119A77AB952541D064F9AB57595D41DF2F77CCD0952541AE9DD26A53595D418043A7941A962541
+99849	46463	48062	1	010500000001000000010200000004000000EA3CA2A927595D41ACCFBCBC72972541822322C31D595D41C8FB711AE2972541E97EE07D1E595D4168FE4223FF9725419694EDD01F595D413DF250770D982541
+99873	44943	69693	1	0105000000010000000102000000050000005C03BC3BFF595D41CD93FC15AD992541CCF8D7B30B5A5D41F8F254C2109A25419CB5C212165A5D4195CA217D3A9A25415975B4BC1F5A5D41E31159794E9A254141E66B9A3E5A5D41581432797B9A2541
+99875	10396	69693	1	010500000001000000010200000002000000739C29A1485A5D41357254506499254141E66B9A3E5A5D41581432797B9A2541
+99979	55231	30924	1	0105000000010000000102000000030000009587AD7B47595D41E7AE02A905982541489C3A494D595D41B34B831B13982541935F6E6B59595D412B95046D09982541
+99999	36049	45715	1	010500000001000000010200000002000000ED76A4BB3C595D4128832037C0952541AE9DD26A53595D418043A7941A962541
+100001	36049	46463	1	010500000001000000010200000007000000ED76A4BB3C595D4128832037C0952541BB858BF936595D41FE813059C1952541375E3D9032595D414B6D9719D89525414C608D6321595D41775ECC32CC962541DE85ADED20595D41283D23A5069725410141BDAA23595D41732B4D7640972541EA3CA2A927595D41ACCFBCBC72972541
+100856	6810	6395	1	0105000000010000000102000000040000004C05189BEA5C5D411C439CCD14AC2541C994EF0AE95C5D41F64EFED189AC25416C2541FDE15C5D419D589C7157AD25415AC2401EDA5C5D4155A009DFEAAD2541
+100858	6834	11395	1	01050000000100000001020000000400000006750647945C5D413D1E472E8DAA254161F44E14B85C5D41D7159CE37EAA25417F65D83DBD5C5D413C2C25788CAA254153D04FC9C15C5D418064F776A1AA2541
+100870	66776	24628	1	010500000001000000010200000009000000708B6AEB375C5D419D08978A22AB2541E05DE909315C5D41C0FAE6F256AB2541E4FF0D90295C5D415BEFD10F9AAB25412590F4721E5C5D4161D178891FAC254134486B001C5C5D414740027D44AC2541BBEE9693195C5D419977D2BA70AC254147E42C5D185C5D417ED1BAD986AC2541D143D16E155C5D41DA143CF5DEAC254132B59482145C5D414B26B5D953AD2541
+100873	32198	25021	1	01050000000100000001020000000A000000A581B33B725B5D41F36C8DD088AE25412FCB04B6A65B5D41FCE364D485AE2541548AECD7BB5B5D41161E63FC88AE2541D25FFA57C05B5D41D62433668FAE2541039A4425C65B5D419F862ADA9CAE25414888079CCC5B5D412F775B78B1AE2541B0B4D683D95B5D410CFC836AD3AE2541035E96CDE55B5D4152D811C7FCAE2541594C4186F65B5D419150C5AE16AF25410627ABFE0A5C5D41B24734AD12AF2541
+100875	58520	28437	1	0105000000010000000102000000050000006146E653205C5D41042E827257AF25418B7D209C305C5D4144931B17B3AF2541987403E8475C5D41101D301106B02541CF5B5344505C5D41B39D590513B0254100F7B1AD665C5D41EC7EB7EE15B02541
+100877	53024	28437	1	0105000000010000000102000000040000003E2E4C57B75C5D41ED5BE98148AF254184B7DFEE9A5C5D41283FE210CAAF25414EB584CD825C5D41A4B5942309B0254100F7B1AD665C5D41EC7EB7EE15B02541
+100879	24628	28437	1	01050000000100000001020000000800000032B59482145C5D414B26B5D953AD25410477B017325C5D411044C71F81AD25413E2DAB9F415C5D41659D2571B8AD254112486DF5535C5D41A78885733FAE254139993BFA5D5C5D41ACD65816C8AE2541CEE0B4BE625C5D41C021C0FB25AF2541F03BE397655C5D411DC03B4184AF254100F7B1AD665C5D41EC7EB7EE15B02541
+100884	6834	35357	1	01050000000100000001020000000500000006750647945C5D413D1E472E8DAA2541A034B14B955C5D41F107F0FC08AB254153D86CC4945C5D414BBD52902DAB2541288C39EA925C5D4153CA2ECF43AB2541860E64B78F5C5D41F08B3E6F44AB2541
+100886	23508	41613	1	01050000000100000001020000000200000058005DDAC55C5D411F63B427BDAB2541E44CC814E05C5D41C9DAE107B8AB2541
+100890	23508	45197	1	01050000000100000001020000000700000058005DDAC55C5D411F63B427BDAB2541F4E042CCC15C5D41983AEF8A48AC25413404A62EBE5C5D419333B13192AC254190970BA0B85C5D4154B92FEED4AC25415DADFB67B25C5D41B3F36B8010AD254173023A2AAC5C5D41E8AB65C844AD25416E94659A955C5D411A737B60E2AD2541
+100902	24628	52723	1	01050000000100000001020000000300000032B59482145C5D414B26B5D953AD25412251D114135C5D41C82FDF9BF4AD2541ADD4E0AE135C5D41872F4771B9AE2541
+100904	45197	53024	1	0105000000010000000102000000040000006E94659A955C5D411A737B60E2AD2541871682F19A5C5D4119F826472AAE25413D69D3409E5C5D41AE887B1A4EAE25413E2E4C57B75C5D41ED5BE98148AF2541
+100906	6395	53024	1	0105000000010000000102000000040000005AC2401EDA5C5D4155A009DFEAAD25412AEAFC62CE5C5D41947831C277AE254139FDB634C35C5D416D3B4D5CE7AE25413E2E4C57B75C5D41ED5BE98148AF2541
+100915	50250	68455	1	01050000000100000001020000000200000033B81F89295D5D410D802714CCAE2541B294350F225D5D41A79F57300FAF2541
+100917	6395	68455	1	0105000000010000000102000000030000005AC2401EDA5C5D4155A009DFEAAD254157B758E91A5D5D41562DB31CECAE2541B294350F225D5D41A79F57300FAF2541
+100919	2217	72610	1	010500000001000000010200000003000000DE0AAB5D115D5D41F794F01AD0AF2541844B5E0D215D5D41B833A0753AB0254113F63FB5255D5D41431004E873B02541
+100921	14331	72627	1	010500000001000000010200000002000000F4BB7AAFF45C5D41CA81DDC5DFAB25415F9DF1A9245D5D41688C4967D6AB2541
+100923	11991	72627	1	0105000000010000000102000000020000004DC271F9235D5D4185C2B968F4AA25415F9DF1A9245D5D41688C4967D6AB2541
+100872	52723	25021	1	010500000001000000010200000005000000ADD4E0AE135C5D41872F4771B9AE254178597987105C5D41CFB20CA6C8AE2541B02D8A090E5C5D41C7C40D05DFAE2541770150910B5C5D4192B755AEFCAE25410627ABFE0A5C5D41B24734AD12AF2541
+100908	52723	58520	1	010500000001000000010200000005000000ADD4E0AE135C5D41872F4771B9AE25412C8C276D1B5C5D41B74E95CFCDAE25415A3D16B11E5C5D4136A3320EE3AE25418A593179215C5D418E7EC7742BAF25416146E653205C5D41042E827257AF2541
+100931	45339	14331	1	01050000000100000001020000000500000064F3864EEB5C5D410656760257AB25410442FACAF15C5D41B2A4ADEB72AB25419CC08576F45C5D415C681BDF96AB25416A541231F55C5D41A12339E8B3AB2541F4BB7AAFF45C5D41CA81DDC5DFAB2541
+102010	72489	66204	1	010500000001000000010200000002000000BDC939E53C585D4164C3A1F7FA9E2541D4CD77803D585D41F28BB8CCBF9F2541
+102014	47085	72489	1	010500000001000000010200000002000000E2B0B3C83B585D41E7216A00629E2541BDC939E53C585D4164C3A1F7FA9E2541
+104189	37174	21350	1	010500000001000000010200000005000000BC09BFD51B575D41E0486BEF0FA9254182FE60B5F6565D4117E7B0FA0FA92541C4287455F0565D414665B88818A92541841E98AAEA565D4195B22BD536A92541C57CAEA8D3565D4113932EAD42A92541
+104253	32083	13916	1	0105000000010000000102000000020000007483E21C815A5D41DF9B5BE8069C25412B0CE26B985A5D41094F4E682D9D2541
+104255	45162	18194	1	01050000000100000001020000000300000057AD2C64BE5A5D41DF70FDE66E9D2541AFB94F2FC05A5D4190E0E452169E2541B34A8F97BC5A5D4196A2A044679E2541
+104261	69693	32083	1	01050000000100000001020000000500000041E66B9A3E5A5D41581432797B9A2541C42738CF595A5D4102E47C8CE39A2541566C7F126A5A5D418CD5D5E3379B254172053C90765A5D41FBCBFADAA29B25417483E21C815A5D41DF9B5BE8069C2541
+104263	52	32083	1	0105000000010000000102000000050000004A5B2AC6BC5A5D418AAAD2798E9A2541BD69FB3FA35A5D41F25CFF5DA99A25415485188F9D5A5D4110230B5EC09A2541ABD060EF975A5D41CC5DE73CED9A25417483E21C815A5D41DF9B5BE8069C2541
+104265	41133	32198	1	0105000000010000000102000000020000000AA3ACE8705B5D41F4F6CFD493A92541A581B33B725B5D41F36C8DD088AE2541
+104285	13916	45162	1	0105000000010000000102000000030000002B0CE26B985A5D41094F4E682D9D2541FFC5E79DA85A5D41A64342E16B9D254157AD2C64BE5A5D41DF70FDE66E9D2541
+104287	52	45162	1	0105000000010000000102000000020000004A5B2AC6BC5A5D418AAAD2798E9A254157AD2C64BE5A5D41DF70FDE66E9D2541
+105585	3604	6342	1	01050000000100000001020000000600000053B6DCB0835C5D41B5B3E11E0E892541DCCA09E38B5C5D4162EBABD4878A2541C9AE671F915C5D411679B6D17E8B254153E390CC935C5D41460DD14E768C2541F5D67080955C5D416385E791008D254159812032955C5D4157B0F30B6E8D2541
+105704	72627	62746	1	0105000000010000000102000000040000005F9DF1A9245D5D41688C4967D6AB254107F5E2B9255D5D41290E90CA60AC254194734AAB245D5D4189C546F1A9AC25417ACCA20D215D5D41CBB4E497F3AC2541
+108251	47849	3604	1	010500000001000000010200000004000000625966BB795C5D41EFE480718E872541089E25487A5C5D41B5EFF887AA87254146B874217D5C5D41830B62CD0888254153B6DCB0835C5D41B5B3E11E0E892541
+108273	15237	38826	1	010500000001000000010200000006000000F466FF93D55C5D41D0AC5576248725416BD51954D05C5D418C0DF94C2C872541089E25487A5C5D41B5EFF887AA8725412F388186585C5D41F7DB0831E4872541B56B84B8215C5D41C80C9ADA37882541328B7DDBE75B5D41A44EE61991882541
+108276	23267	48536	1	010500000001000000010200000006000000BE980C6D765D5D41DFBEE2EA88862541B3178580465D5D41CA3D0094D3862541DEE677CBD35C5D41F12437288387254146B874217D5C5D41830B62CD08882541A0BAB47B085C5D417741A080B18825417B244C35E85B5D410561082BE1882541
+108282	46301	6834	1	010500000001000000010200000002000000CBB247528B5C5D41AF9D74EE8EAA254106750647945C5D413D1E472E8DAA2541
+108305	46301	35357	1	010500000001000000010200000004000000CBB247528B5C5D41AF9D74EE8EAA2541B0CB5A628C5C5D417C47A95119AB25413E4AEC1C8D5C5D413534BF5A36AB2541860E64B78F5C5D41F08B3E6F44AB2541
+108318	61399	48062	1	010500000001000000010200000004000000F920E2DE2C595D414BE4ECE38E97254117956E4B24595D411379AB950C982541A3EFCF6522595D41763DA340149825419694EDD01F595D413DF250770D982541
+108324	61399	55231	1	010500000001000000010200000002000000F920E2DE2C595D414BE4ECE38E9725419587AD7B47595D41E7AE02A905982541
+108331	46463	61399	1	010500000001000000010200000002000000EA3CA2A927595D41ACCFBCBC72972541F920E2DE2C595D414BE4ECE38E972541
+108902	58688	2882	1	010500000001000000010200000003000000166B9AB7AE575D41217DA051C3A32541938BCE19B8575D41B5D003104CA42541EE5CA0E9BF575D41AB70AD4976A42541
+108904	67042	5541	1	010500000001000000010200000004000000D61EFEE4F8575D41ED59ECA179A42541F27D03F806585D41488421DB76A42541A50F328D12585D41EAE26B748AA42541A621B57E3B585D41C3D04B6182A42541
+108912	61113	15420	1	01050000000100000001020000000400000024FD63C6F1575D410ADF770952A025411C7437E4ED575D41A334D23644A02541F5291845BD575D41ABF619CF4DA02541E76E2338B8575D413F117FB064A02541
+108926	67042	31906	1	010500000001000000010200000002000000D61EFEE4F8575D41ED59ECA179A4254155D3C501FB575D4151CBA9E626A72541
+108968	2882	67042	1	010500000001000000010200000003000000EE5CA0E9BF575D41AB70AD4976A4254125F6BD8DC9575D41859F58F982A42541D61EFEE4F8575D41ED59ECA179A42541
+109062	2791	12545	1	01050000000100000001020000000300000056AAB479E0575D41EE5BC68D99A7254183087A96E0575D41E0681701BEA725411CF6F365DF575D41684AC76ADBA72541
+109119	12545	55041	1	0105000000010000000102000000030000001CF6F365DF575D41684AC76ADBA725411F3A7C43F4575D41386828D926A92541EF2FE13AF5575D41B982815260AA2541
+113486	17855	2145	1	0105000000010000000102000000060000000E08780EEF5C5D414F2C425EABA4254161166174E95C5D41C5241586DFA4254127DA62F7E95C5D41EF26653287A52541130C6CCEEA5C5D415C59E0AEC8A52541AAF0E2E1025D5D418AAD46D21AA725413B44E9B8035D5D418BB5C44E5CA72541
+113488	64320	6481	1	0105000000010000000102000000040000008DD335CABC5C5D418E1A1943E0A52541560228A3CB5C5D416BDDC12009A6254133A14987D15C5D41AAC06EBE33A62541A26A4538E45C5D41B7B538662FA72541
+113490	57573	6706	1	010500000001000000010200000004000000C4A2C0671B5D5D41482A5C0871A22541924567241E5D5D4148BDA5DAAAA22541C2A5BDB21E5D5D419899821B61A325417CC930C41B5D5D410288B036B9A32541
+113494	2145	13659	1	0105000000010000000102000000030000003B44E9B8035D5D418BB5C44E5CA7254184D8F7D9045D5D4199CDD690FCA72541B19073D8085D5D4170F4DED82EA82541
+113500	41434	17855	1	0105000000010000000102000000020000003986B1741C5D5D4107A034359BA425410E08780EEF5C5D414F2C425EABA42541
+113510	23536	31681	1	010500000001000000010200000004000000009E7D59055B5D415037904B05A325416EB3A8B00D5B5D414910EF477EA5254172CF1280135B5D4104A06F455FA625413BE0D4D5135B5D41F55C7E9FCCA62541
+113512	64789	40295	1	010500000001000000010200000005000000C687958F1B5B5D4167850D4253A02541C6530B32205B5D415F81316985A025417E8CBCDD225B5D41A85A1E5CA9A025419C4DE5CA375B5D41F1ED27B00AA2254115BF7CA63C5B5D4123240DBE85A22541
+113514	6706	41434	1	0105000000010000000102000000020000007CC930C41B5D5D410288B036B9A325413986B1741C5D5D4107A034359BA42541
+113516	41434	43214	1	0105000000010000000102000000030000003986B1741C5D5D4107A034359BA4254128AB9EB21F5D5D4110706B07F0A725414479C7651B5D5D41C5F775392BA82541
+113518	13659	43214	1	010500000001000000010200000002000000B19073D8085D5D4170F4DED82EA825414479C7651B5D5D41C5F775392BA82541
+113533	6481	51789	1	010500000001000000010200000005000000A26A4538E45C5D41B7B538662FA72541D65C3309E85C5D414D79005C27A7254137DF37EBEB5C5D41F5CE9C3035A72541351CDB34EF5C5D41C678C4B951A7254106C5B6E9EF5C5D419F949A7867A72541
+113534	2145	51789	1	0105000000010000000102000000020000003B44E9B8035D5D418BB5C44E5CA7254106C5B6E9EF5C5D419F949A7867A72541
+113544	1260	64320	1	01050000000100000001020000000300000061A30645905C5D413B5DEBF46CA52541805BB08E935C5D413A18F47D89A525418DD335CABC5C5D418E1A1943E0A52541
+113532	51789	50466	1	01050000000100000001020000000400000006C5B6E9EF5C5D419F949A7867A72541ADF2B95CEF5C5D418428B1C184A725412050BBDEEC5C5D4131D778209BA725418BC7086AE85C5D41AAB4AC4AA3A72541
+113565	40295	23536	1	01050000000100000001020000000200000015BF7CA63C5B5D4123240DBE85A22541009E7D59055B5D415037904B05A32541
+113567	33979	23536	1	010500000001000000010200000002000000F89B2725FF5A5D410C48319F74A22541009E7D59055B5D415037904B05A32541
+113571	66852	31681	1	0105000000010000000102000000020000004F91ABEFE15A5D41986D7D68D6A625413BE0D4D5135B5D41F55C7E9FCCA62541
+113573	58488	31425	1	0105000000010000000102000000020000009DE48903475B5D41E59E4A97C2A62541062AD9566F5B5D41D18BD5FBC1A62541
+113599	40295	58488	1	01050000000100000001020000000400000015BF7CA63C5B5D4123240DBE85A225411743B664425B5D411549D5DC50A3254166FFE359465B5D41AB178B1948A425419DE48903475B5D41E59E4A97C2A62541
+113601	31681	58488	1	0105000000010000000102000000020000003BE0D4D5135B5D41F55C7E9FCCA625419DE48903475B5D41E59E4A97C2A62541
+145783	9440	22438	1	010500000001000000010200000005000000E51F052D7C585D419FC3F3368D9725410D48B63180585D41739362C7C6972541BBCCC5908A585D413B998E80F09725416DB319D394585D41124D76C6F5972541220C1CC89D585D41BE1CAF02F4972541
+118233	66852	32404	1	0105000000010000000102000000080000004F91ABEFE15A5D41986D7D68D6A62541C97B6089E35A5D41620AFDC10FA825410E04ACFEE45A5D4112CDE8D349A8254150B76E70E85A5D41453D486499A8254107305678EA5A5D41AD8A4677BDA82541A2538B27EB5A5D417F7FB2EBCBA825410583FB32EB5A5D4153083D80DAA825418963592FEB5A5D4177A4EFBFA6A92541
+118235	22646	32404	1	0105000000010000000102000000020000009F0FEA09FF595D41E81DEEEDB7A925418963592FEB5A5D4177A4EFBFA6A92541
+118240	32404	41133	1	0105000000010000000102000000020000008963592FEB5A5D4177A4EFBFA6A925410AA3ACE8705B5D41F4F6CFD493A92541
+124885	6342	63826	1	01050000000100000001020000000200000059812032955C5D4157B0F30B6E8D2541E4C78096C45C5D41E9CF1860738D2541
+125659	64473	59551	1	0105000000010000000102000000020000004783C1C9295D5D41333BD41362A9254140F7D2A7365D5D4119B65CEF65A92541
+125988	71607	30924	1	010500000001000000010200000002000000B1F18F165F595D41249FFA21EB972541935F6E6B59595D412B95046D09982541
+126006	36984	53057	1	01050000000100000001020000000300000084EFF45FA7595D41C9B851600997254127CFD9B1AC595D41DD8317FB49972541200EFB83B6595D4199EEC0FE90972541
+126016	53057	63435	1	010500000001000000010200000005000000200EFB83B6595D4199EEC0FE909725419B8F487BC1595D41530E7A04AC97254121F23558CE595D41AC5B685FBF97254189603F37E9595D41BEB88117BA972541F5841A6EF3595D41C59B4ECAB0972541
+126018	53057	71607	1	010500000001000000010200000006000000200EFB83B6595D4199EEC0FE90972541EDB11863A4595D4101E992271F9825411F1821C19C595D416F468A3E2F9825416F00A61B6C595D417E784184319825416EE8194E66595D41DFB3AE1124982541B1F18F165F595D41249FFA21EB972541
+126020	14275	71607	1	0105000000010000000102000000020000001A01C60371595D4146BA495C1B972541B1F18F165F595D41249FFA21EB972541
+126263	6342	7177	1	01050000000100000001020000000400000059812032955C5D4157B0F30B6E8D2541814AEBFA915C5D414F3B8FEB3A8E2541D429EF598D5C5D4178EC954DDC8E2541D3232A15885C5D415F32A3CF7D8F2541
+126267	30110	9440	1	010500000001000000010200000003000000084DA5A978585D417AA139FF87952541F73C72027A585D41CB49E8663D972541E51F052D7C585D419FC3F3368D972541
+126271	52078	11736	1	0105000000010000000102000000040000006045BCF119595D41052B9CEF899925412EC83C7212595D41CE6893C4C59925411934959E0D595D41A21CEB8B259A25411448CDD103595D4139CEAC9C859B2541
+126277	9440	13665	1	010500000001000000010200000002000000E51F052D7C585D419FC3F3368D972541ACE3801A6B585D41D6B4D93AD2972541
+126283	42315	27158	1	0105000000010000000102000000030000007B41623958585D41ADB107133C982541967D23A086585D4182923F22409A254187C4879F93585D41B57126397F9A2541
+126287	16195	30674	1	010500000001000000010200000004000000077FCB83F4585D418DD62B11189525410DCA03A5ED585D41AAE59505209625413509DFFBEA585D415DBB209DCF962541368CA54CE9585D41B7AD5D6EEC972541
+126293	30364	39668	1	0105000000010000000102000000040000004B0A20DCA6585D417579C02B09A1254148F3AF3C6D585D41DA44DCEF05A125417AAABF0B63585D41CE77E78816A12541627663D75A585D4139B6EB9F3CA12541
+126304	71223	42315	1	010500000001000000010200000009000000A95E4F020C585D419E3D27E4C1952541D6D610F624585D413AE75AF8BC9525416C2D167C29585D41BCDDC8AACA952541142EA5AB2E585D41A2982F87DF952541B25ACBE146585D4168A892D289962541500379484A585D41445978CDCA9625414E45C41F4C585D414C156BCD80972541C37554954D585D41ABF0EDDEBA9725417B41623958585D41ADB107133C982541
+126306	13665	42315	1	010500000001000000010200000002000000ACE3801A6B585D41D6B4D93AD29725417B41623958585D41ADB107133C982541
+126312	30364	51217	1	0105000000010000000102000000030000004B0A20DCA6585D417579C02B09A1254146987B60BB585D41CF57D6B713A12541A6244826C8585D41068D61E809A12541
+126316	30674	52078	1	010500000001000000010200000003000000368CA54CE9585D41B7AD5D6EEC9725416313881CF1585D41638CF5A8169825416045BCF119595D41052B9CEF89992541
+126326	3724	64789	1	010500000001000000010200000005000000B9B2029A365B5D415658F0C5B49F2541E25ABF9D285B5D41918F42B1D49F25413B918B54225B5D4196FCA665FA9F25412D1AAEF61D5B5D41FE84BDB91FA02541C687958F1B5B5D4167850D4253A02541
+135353	50466	11146	1	0105000000010000000102000000020000008BC7086AE85C5D41AAB4AC4AA3A7254144A59163EA5C5D41A9AF309358A92541
+135393	41133	47608	1	0105000000010000000102000000020000000AA3ACE8705B5D41F4F6CFD493A92541D9912A6FF35B5D4184BF089181A92541
+135371	47608	18110	1	010500000001000000010200000002000000D9912A6FF35B5D4184BF089181A92541F6962046275C5D41D7CC99B77EA92541
+136730	51632	9492	1	0105000000010000000102000000090000001471639D9C585D41FCA8C43985912541A4271D2681585D41924B0591AD9125417F8390346A585D4115481A44CF9125419FD559BF50585D41E1BB100D00922541B3E44D681B585D4120B986DE8D9225419E9E6633FE575D418BD42C93DC92254169291D7BD2575D4109FCD1CB6F932541061896F5B5575D412D5481F5CC9325419DF5C2CE58575D416EFEBB2103952541
+136764	49762	60393	1	0105000000010000000102000000020000002F3777AD48575D41DC3F038DDA94254164118F65C7565D4164DCFF4C85962541
+136765	9492	60441	1	0105000000010000000102000000020000009DF5C2CE58575D416EFEBB2103952541470D801FCC565D4100DE1E9BD4962541
+98919	58219	24144	1	010500000001000000010200000002000000CB0F74380A5A5D4135C57A49BC952541D13EEFA6175A5D410A5E456F59972541
+98953	24144	63435	1	010500000001000000010200000003000000D13EEFA6175A5D410A5E456F599725417CA60443FE595D419744B412A0972541F5841A6EF3595D41C59B4ECAB0972541
+98957	63435	63998	1	010500000001000000010200000002000000F5841A6EF3595D41C59B4ECAB0972541C15382C3F4595D41541258A892982541
+142278	22534	51659	1	010500000001000000010200000005000000DB72458C54585D41EA34E6854DAA2541BA9441E854585D418F57232AC2AA2541F028128E58585D41E355015653AB2541995627B55C585D41F6CB00A4B8AB254190F485DE62585D41B8F737BA3AAC2541
+142332	22646	35278	1	0105000000010000000102000000020000009F0FEA09FF595D41E81DEEEDB7A92541A637E472005A5D41374FDD3483AB2541
+142826	35278	28581	1	010500000001000000010200000008000000A637E472005A5D41374FDD3483AB25415B93980D015A5D413607210A48AC25411220DE55FF595D41768916078AAC2541DB8BF934F9595D415BEF1DC4E2AC25410D75F8F5ED595D4109D89F823CAD2541CD96A8D0E3595D41AD55A8AE5BAD2541CA94DCAED7595D41B1C77D5C65AD2541E4952B9A82595D41F452151776AD2541
+142945	35278	55384	1	010500000001000000010200000004000000A637E472005A5D41374FDD3483AB2541C2D21AD5565A5D41F091788879AB254135C838465D5A5D41BA1073DB86AB2541FCB97239615A5D41FEB6DE8DAAAB2541
+142966	51659	70832	1	01050000000100000001020000000500000090F485DE62585D41B8F737BA3AAC25418B2423B253585D411E03321378AC25411DBF122647585D41FD2FE5C9CAAC25413AB4253435585D4103748D4793AD2541DCCEBF6F2E585D41250EFE25ECAD2541
+156481	53153	52	1	010500000001000000010200000002000000F8E8E964BC5A5D41EF25478B129A25414A5B2AC6BC5A5D418AAAD2798E9A2541
+99199	6851	5717	1	0105000000010000000102000000070000009494333EE8585D41F4EBF95ED59925419AA77AA2E9585D41DCCCCA91F9992541111530BFE9585D41098E1B051E9A254114184508E5585D419136D83FA29A2541196BDDFFE3585D4175C13DB1F29A2541880B5E75E5585D41297ED8C22C9B25418A156D7DE7585D41894669D5509B2541
+145699	10119	15683	1	01050000000100000001020000000300000092B1C1F9F3565D41182AE54D5EA225418735CCCE09575D41A824E36943A32541981A104011575D41688F813EC5A32541
+145738	15420	41004	1	010500000001000000010200000003000000E76E2338B8575D413F117FB064A02541F8F40CC0B5575D4162FBD95A82A02541EA8D3A64B7575D4169B6F58796A22541
+145770	41004	9721	1	010500000001000000010200000002000000EA8D3A64B7575D4169B6F58796A225410095D5CBB7575D419B16ADC019A32541
+145792	45162	28660	1	01050000000100000001020000000300000057AD2C64BE5A5D41DF70FDE66E9D254143F0B162CE5A5D41FF1BC6C36B9D25418D59AE81E55A5D4183DD6468849D2541
+145794	27732	30364	1	01050000000100000001020000000700000055CE3DED92585D41655991977C9E2541282728D596585D41D23EBBB4919E25416C83091F9A585D41AE1B6F3CAE9E25417E7F5FD69C585D41972833C3E09E2541FCF2E44B9E585D4182E4C4D41A9F2541DDE06270A1585D41D6E78BDED79F25414B0A20DCA6585D417579C02B09A12541
+145796	22438	30674	1	010500000001000000010200000003000000220C1CC89D585D41BE1CAF02F4972541857FF61EDD585D4138EFDF88E7972541368CA54CE9585D41B7AD5D6EEC972541
+145804	59890	44829	1	0105000000010000000102000000020000000A06272657585D41555E23A93CA22541C30C637658585D416A32C13C17A32541
+145814	27427	58029	1	0105000000010000000102000000020000001B24E9A8E95A5D41327CE50A5DA025410E759C23E25A5D4130083A9491A02541
+145816	9721	58688	1	0105000000010000000102000000030000000095D5CBB7575D419B16ADC019A32541D2A7F903B3575D41B8803A1D88A32541166B9AB7AE575D41217DA051C3A32541
+145818	39668	59890	1	010500000001000000010200000003000000627663D75A585D4139B6EB9F3CA1254107D8E70356585D415DFFA1679CA125410A06272657585D41555E23A93CA22541
+145824	27427	64789	1	0105000000010000000102000000030000001B24E9A8E95A5D41327CE50A5DA02541AD7733D4F35A5D4153E4312A45A02541C687958F1B5B5D4167850D4253A02541
+145826	61113	65830	1	01050000000100000001020000000300000024FD63C6F1575D410ADF770952A025413C6693BFF5575D413A7A2B057DA0254190E55197F7575D417FEBAECED2A22541
+145828	65830	67042	1	01050000000100000001020000000200000090E55197F7575D417FEBAECED2A22541D61EFEE4F8575D41ED59ECA179A42541
+75718	71244	8278	1	0105000000010000000102000000020000005D7578C0345A5D4174CBCADA7FA12541C0531FD0425A5D4105D9D85649A22541
+75788	44829	5541	1	010500000001000000010200000005000000C30C637658585D416A32C13C17A325418D8C550344585D41973C439022A3254162E18E163D585D41F395CB6648A32541B10AEF223A585D4115F1283999A32541A621B57E3B585D41C3D04B6182A42541
+99923	71809	44943	1	010500000001000000010200000006000000D013470AE2595D41E91170852F992541D806F679E3595D416DE2EB4C6299254133284C22E8595D419A95BEBD9B992541EC4FD942EF595D4111ECC784B7992541662FC799F7595D41E4C4AD2CBD9925415C03BC3BFF595D41CD93FC15AD992541
+153498	40083	70452	1	01050000000100000001020000000C000000D74C0F579A585D4115B141860F8D25411E16C06659585D41A0A815678C8D25412FBD241F1E585D418086FA08E18D2541D42949B1FD575D41C677DF14298E2541A1691FB59E575D41C18C71C87C8F2541EE7ECAD88E575D410A6860AEAB8F2541059E6F9961575D41904FCDF8EE8F25417069DA692F575D41AA0FFC986D9025412D88AC1918575D41008996EAE69025417B00CD90FD565D416F34059459912541410624EBE2565D4140E772CAA79125415771464571565D413D3939C1DA922541
+153465	21445	24021	1	010500000001000000010200000002000000ABE4D42BE65D5D413EF2E7BC7F862541BD23BFFDD15D5D4159262F5FB8862541
+100866	11395	23508	1	01050000000100000001020000000400000053D04FC9C15C5D418064F776A1AA254130D067CBC35C5D4162581140BEAA25415AC88540C55C5D419B564552F8AA254158005DDAC55C5D411F63B427BDAB2541
+100911	189	66776	1	010500000001000000010200000007000000C49EF160145C5D41C25461C8B4AA2541983B82A61C5C5D41F1584693A4AA2541A8D62E0C235C5D410833DD52A3AA25416F5134DF285C5D416A625411B8AA25410C32B25B2F5C5D41D59A0BFAD3AA25416F503C4B355C5D4169C2E82B0DAB2541708B6AEB375C5D419D08978A22AB2541
+156154	23267	3604	1	010500000001000000010200000006000000C7FB7DDCA75D5D4162D8DFC8598625413353B1228C5D5D41205E4785A1862541FB52279B665D5D41ABBE3BC9F186254135CA5D91375D5D4193D55B166187254143013389015D5D41656AB658E087254153B6DCB0835C5D41B5B3E11E0E892541
+113546	58029	66852	1	0105000000010000000102000000100000000E759C23E25A5D4130083A9491A025414E6A4AEADF5A5D414388BF6EFFA02541F499C0E5D95A5D4196D98C9E7CA12541FA3522ACCE5A5D4146994CA6DDA125410BFEF862C85A5D4185DCEA5A03A225410B832405C45A5D41C8B729AF28A225411B2E79D4C25A5D41835C7F1846A22541BAAB13F1C25A5D41ACA0D78B6AA2254151473B55C45A5D41D4B6EDBE8EA225411F667578CA5A5D4117F8588C09A3254190CA0418CE5A5D41D1BDD36E93A32541759A71E7D15A5D414B97692D2BA52541A0B93068D35A5D41C6ADDBD373A52541FB047B30D65A5D41DE3 [...]
+158389	15914	1204	1	010500000001000000010200000008000000ACB1676976595D411372900F989F2541EE6D81EE72595D41ECDB18750DA02541C9C923686F595D41A0E71A4674A02541426AA4FF67595D41CBCBE343CDA0254119F3A1F262595D4101666E24E4A025413D9DED7D5E595D41DB5E3B50ECA025410C5D00AD5A595D413FCDD15BF4A025412BD1D86239595D41BBEF419DF3A02541
+158473	57573	1260	1	010500000001000000010200000008000000C4A2C0671B5D5D41482A5C0871A22541E58F86E5145D5D41600AC5D44DA22541AB23067DE55C5D419EB7D53441A2254164BA20D9CF5C5D41DC71FDE769A2254122DC6D9DAA5C5D41DF1C5AF418A32541677EB0EB995C5D41DECDADDFD9A32541DA615A798F5C5D41042E040D3AA5254161A30645905C5D413B5DEBF46CA52541
+158834	46445	1573	1	010500000001000000010200000002000000CD6FD5E0CC595D4154BCE2AD2AA625410F62D628C2595D41210C0BD95FA62541
+158836	39908	1573	1	010500000001000000010200000002000000F8232D138E595D41751184C472A425410F62D628C2595D41210C0BD95FA62541
+159490	68455	2217	1	010500000001000000010200000002000000B294350F225D5D41A79F57300FAF2541DE0AAB5D115D5D41F794F01AD0AF2541
+159492	53024	2217	1	0105000000010000000102000000080000003E2E4C57B75C5D41ED5BE98148AF2541488B9332C55C5D412C432365D0AF2541DFA671ADCF5C5D41DF1B36961EB0254104620959DB5C5D419A5F3C5E4FB0254153095C35E85C5D41142A3ABD62B0254132729700F55C5D412737743D60B0254138FF694D025D5D41CAD519E031B02541DE0AAB5D115D5D41F794F01AD0AF2541
+159973	45624	2791	1	01050000000100000001020000000800000007DBC451CB575D4194DDC9238FA72541D70896CFCD575D411F50B6C378A72541ACA62853D0575D41A1C2E6AD69A725415FEC4180D3575D41AC4609C261A7254195C3E156D7575D41F57E1E0061A72541F00A08D7DB575D417731276867A72541432CACC4DF575D411C404DCF83A7254156AAB479E0575D41EE5BC68D99A72541
+159974	31906	2791	1	01050000000100000001020000000200000055D3C501FB575D4151CBA9E626A7254156AAB479E0575D41EE5BC68D99A72541
+160607	28660	3724	1	0105000000010000000102000000070000008D59AE81E55A5D4183DD6468849D2541D6A6E611035B5D41BB589F60AA9D254133D2DFDD185B5D41CE2467B1B49D2541C84D3A31235B5D41638EC6D8CF9D25410192F6C62B5B5D41E8C4A6B2259E2541BDD696A2305B5D41DFC782C0A09E2541B9B2029A365B5D415658F0C5B49F2541
+161973	14331	6810	1	010500000001000000010200000003000000F4BB7AAFF45C5D41CA81DDC5DFAB25410177C20FEF5C5D41B22A69A30CAC25414C05189BEA5C5D411C439CCD14AC2541
+162441	46917	8369	1	01050000000100000001020000000D00000013BE0D7BB5575D410BDF88B03F972541215F58E89F575D414B13D84D7E9725413D5C682E9C575D41B9B82483A39725410EDDD45F9A575D4185BD7157C8972541938B9D7C9A575D413713BECAEC9725418997BBBDAA575D413B81285D0D992541273129EDB0575D413C4F22BD96992541C0BE496EB2575D416B351463DF992541B661A9E4B1575D415EA45336D09A254165188469BB575D4126EB41B2849B25410D480DA2BF575D41116CBCDEFF9B25416D9EB4CCC1575D413971A1AE4F9C25418EC3155AC1575D41AF53EFAA5D9D2541
+162966	58358	10550	1	01050000000100000001020000000E000000A0155A97095C5D4184299F5CEC9C2541F3F5F406FF5B5D4103FD3A8D549D2541380BDFEEF65B5D41891898149F9D2541D16F992BE95B5D411E2F8EE5079E2541BB5E34F0CC5B5D417CD3F4C8C39E2541024B71269F5B5D419A8801D3F79F2541FF5C3C5F965B5D41149037E633A02541009FF24C8E5B5D41B73331B885A02541D80472DE865B5D41CC271D6AD7A0254157EFCAB1805B5D418FE29F9121A1254126B6DB8A7A5B5D418ADA6B0373A125411B83E8B6755B5D416A1B9BC9D2A12541936B27BD725B5D413CCCBB501CA22541F34B87FF705B5D41173 [...]
+162967	3724	10550	1	010500000001000000010200000005000000B9B2029A365B5D415658F0C5B49F25415B352EA7425B5D41B023A27A61A02541FB8A70115B5B5D41A6EAFCF320A22541F885F842625B5D410FCBE39A52A22541F34B87FF705B5D411737270357A22541
+163423	53021	13078	1	0105000000010000000102000000080000006ABD08B3FB585D41120A6B0248A225415198FF7EFC585D41310007EA7AA225414F48197800595D41DECD26E6A5A225417B8613EF06595D41D3838482BAA22541C9B4619C0E595D4144DB9FFFB8A2254167655DA913595D41DCC8E91EA2A225419B07180718595D417265EBC97CA225418F8280C419595D412B03161742A22541
+163601	36984	14275	1	01050000000100000001020000000400000084EFF45FA7595D41C9B8516009972541DB5882FF8B595D4182A2B6863A97254164429B7580595D415AD63980359725411A01C60371595D4146BA495C1B972541
+164057	35635	17490	1	0105000000010000000102000000020000004783C1C9295D5D41333BD41362A9254140F7D2A7365D5D4119B65CEF65A92541
+165005	7177	24891	1	010500000001000000010200000016000000D3232A15885C5D415F32A3CF7D8F2541E68BE926825C5D416517732718902541EDE4CF89785C5D417D014647E690254121711E12705C5D41B99C7A698891254135A58CE0605C5D41AA5EC0FB919225411A010C374C5C5D415817E473FB932541D6D501113D5C5D41AC86EF9A1395254154CB802C325C5D4192281FFBE1952541A580ABC52C5C5D41C215C6BF5796254192DF7E39265C5D4181192382F9962541A84DB750235C5D41E394D8E7589725415D6D6E11215C5D4181D5C977BF9725417EA4EF751F5C5D41F850B1E725982541EBE936C61C5C5D415140 [...]
+166607	58219	36984	1	01050000000100000001020000000A000000CB0F74380A5A5D4135C57A49BC952541812B2850F1595D41847902C5CF952541D9FF3173E4595D415AD4E669BC952541C4EB9A9CCA595D41EAAF8F40719525410C0184B2B8595D411B9503C67495254148AAFA1BB1595D41FC24727193952541B9BADAC3AC595D41B42A6D10C09525410A2CB820A9595D418976016E02962541C09518DCA6595D41D65A3EB46196254184EFF45FA7595D41C9B8516009972541
+166910	27628	39908	1	0105000000010000000102000000060000000FA0C8E748595D4174172CF396A32541976654874E595D416E438E136AA3254150AB3B8260595D41C4B8256C7CA32541F669524373595D4115DF3F62BAA3254162FC1FAA7F595D410B81212F08A42541F8232D138E595D41751184C472A42541
+167460	63998	44943	1	010500000001000000010200000007000000C15382C3F4595D41541258A892982541923D2082FC595D41A15DF804A79825411D7C0EBD015A5D41A015DD76CA98254151C8D01D055A5D41B4B9182804992541F5956EEF055A5D416CF80A5A3E99254104FC2D2C045A5D4140356FC2719925415C03BC3BFF595D41CD93FC15AD992541
+167486	66776	45197	1	01050000000100000001020000000B000000708B6AEB375C5D419D08978A22AB2541F969123A4E5C5D4183FF598AD4AB25414424E4E75B5C5D411E87CA1A22AC2541EAB1494E715C5D41982199BF7CAC25416EFFAD0E7B5C5D4136FB3BE7ADAC2541FB0BC6F2805C5D410EACBA84D8AC25414D9E558F855C5D41EFAD446203AD254112EF49288C5C5D41B29199BE43AD254180132E32905C5D41CA8DFF9A84AD254130BAAC3F925C5D41F1ED9CF8AFAD25416E94659A955C5D411A737B60E2AD2541
+168064	6481	50466	1	010500000001000000010200000006000000A26A4538E45C5D41B7B538662FA725412FE15958E25C5D4150E6BE5A3EA725413E4D8589E05C5D41817D182E63A7254166BC1344E15C5D4167E9333780A72541BD18B78DE45C5D415F1458C09CA725418BC7086AE85C5D41AAB4AC4AA3A72541
+168168	55384	51659	1	010500000001000000010200000011000000FCB97239615A5D41FEB6DE8DAAAB2541ED51377E685A5D410C41E2D7EBB425413AD4BFC0665A5D416710848A26B5254160A41463625A5D4176E4F2DE4BB52541016DF7085C5A5D41EE4F0AB55BB525413EEB5AC525595D41DFAD4F6991B525415592DF700D595D4109B10FE88EB52541A8509283B5585D417ABC096541B5254114063890A8585D410E5273E210B525410164EB05A0585D41B8F03E9FC9B425411127EAF59B585D4107B22E7A81B425419EBF6F1699585D416D2A84EB1BB42541BAD0402897585D418F7B8AF8A8B12541FA278DBE94585D41649 [...]
+168170	35278	51659	1	01050000000100000001020000000C000000A637E472005A5D41374FDD3483AB254185F3287EF7595D41B74662F784AB254159AED55FE9595D41FE9FDE2679AB2541B4B23F77C1595D41F9C1ADC130AB2541D3D6ECDD93595D41A126C65DFFAA25414378377064595D418FF66A84EBAA2541DB21CBD34A595D41CEDE0343E9AA2541B881DCAF1E595D41EAA7EAF2F1AA25414E314CCCEE585D417B68248E18AB2541599E5A74C3585D416AAD412754AB2541B7194B1593585D415E4B58ECADAB254190F485DE62585D41B8F737BA3AAC2541
+168309	75242	53021	1	01050000000100000001020000000500000006BB5C440B595D413FE94F59BAA125413A4814EA04595D4169784230CAA12541EAC19B8600595D41BF5A053BE8A125410AD465D2FC585D41062513BA14A225416ABD08B3FB585D41120A6B0248A22541
+168904	15683	58688	1	010500000001000000010200000003000000981A104011575D41688F813EC5A325413AAC48F3A6575D41BDDA8AACA7A32541166B9AB7AE575D41217DA051C3A32541
+169347	32198	62879	1	010500000001000000010200000010000000A581B33B725B5D41F36C8DD088AE2541AAF6E487725B5D4143A01A20BBAF2541280A647E725B5D416AC7901580B02541EE8EB0DE735B5D41898A808870B12541096706CE775B5D41C0061C7B60B22541DCCEBFDA7A5B5D412197CC5C00B32541F77AAF25815B5D41007BA232AEB3254103AE8EF3835B5D410A6053E3FDB32541042F2F65875B5D4119CFF0734DB42541399F521E8C5B5D41C25467C49CB425414BA3BED1905B5D411F0A9ACAE4B42541FE5CBD56BC5B5D416C40D8E356B7254104BDCC2CED5B5D4190E0ED9909BA2541E3B3AF8BF45B5D4165B [...]
+169503	6706	64320	1	0105000000010000000102000000060000007CC930C41B5D5D410288B036B9A32541E7415D94EF5C5D414376F440B3A325411C4F5103DF5C5D4103E1875FCCA325414A63D5AECC5C5D416ED51FE618A42541A4DF1004C45C5D413EC4A96B79A425418DD335CABC5C5D418E1A1943E0A52541
+170322	49762	72591	1	0105000000010000000102000000100000002F3777AD48575D41DC3F038DDA942541D0C115DE28575D411A270A311B9525413E76780704575D41C79179017A952541D5B92EB1E3565D41A45D093ADF95254158B41B88C6565D41BD2CD0863C962541E1D2E6C22D565D418895374F269825414AC54B0DFB555D4159D04389C9982541231B0A5DD4555D41CD833A9E3E9925413D25A35BBA555D41A86D5AB78C9925417576425AA0555D41E413BFD0DA992541AEB000F578555D41667BCF283A9A2541A2C901EC50555D41A81CF9A1999A2541EA0C8D0441555D41FD701DF7B99A2541BF1CE25E32555D412DF [...]
+170522	62998	74409	1	010500000001000000010200000009000000F5DB04EE00575D418DF770FB829E2541E7F35BD903575D41E2401A1EF79E25417B715D3A07575D4100A351CE309F254164BF83660E575D417B3DCC275B9F25416659D4D714575D414E40A078689F2541A3088DE782575D41E99AEE055A9F2541359DBB7F98575D4191AA9FB2229F2541AB71C7A1A4575D41160F0702199F2541E36F6E2210585D415F4BD2160B9F2541
+105620	3604	48536	1	01050000000100000001020000000800000053B6DCB0835C5D41B5B3E11E0E892541C11572B27C5C5D41B0DB99131E89254124A285D7715C5D410EC8307E278925413E4148495F5C5D416EDDD81E2B892541E153BB5A465C5D415579364A37892541778ED3730D5C5D41B41B2D0251892541D7485FAAE95B5D416580869966892541127684CBE85B5D418C96891867892541
+108938	2882	45624	1	010500000001000000010200000007000000EE5CA0E9BF575D41AB70AD4976A42541C03E0CDFBC575D41AF2224F3A9A425410D1CC3FCB9575D41072572A410A52541F3BE2884BB575D41628F4E5E00A7254189892A8BC1575D41EDB288B656A725419CED1BC6C6575D41DD0442277AA7254107DBC451CB575D4194DDC9238FA72541
+108339	46301	66776	1	010500000001000000010200000007000000CBB247528B5C5D41AF9D74EE8EAA25412870F7026A5C5D41D060D8DA86AA254148FD20D0665C5D415A68F57A87AA25418BDCB0B7615C5D41FB396CC58FAA2541ABC56B5D5B5C5D41131C399A9FAA254192686D74465C5D418BB4A257E5AA2541708B6AEB375C5D419D08978A22AB2541
+161543	14902	5717	1	010500000001000000010200000011000000B61E5F07B3585D412DBBF560BB992541C0650D86B2585D41C870CC3EE7992541A9CC0B52B3585D4104935F261A9A25417DFE596BB5585D41907AAF17549A25413E0CD542B6585D412D82C993959A2541CF70475AB4585D41C69B757E699B2541C4EB8037B5585D418F56D344B29B25418D822053B9585D41D36268FE089C2541BEF21D43BF585D41C1DA292E429C25413BAF90D4C3585D41700566755E9C2541EBE1DE45CA585D41FCA157C76B9C2541112EFC43D1585D41B558FECF5B9C2541DD01454BD6585D410E61E6A43D9C25415133F1B7D8585D414CB5 [...]
+165332	71223	27732	1	010500000001000000010200000015000000A95E4F020C585D419E3D27E4C195254190CDD85404585D41A747D567C3952541A410DE8300585D419C24F173CB9525413381C822DD575D418EF2AC5264962541488309C5D8575D4190C033A889962541595E9FB4D5575D41CE6D5B07B69625413F9BD5A0D4575D41920856E4F7962541E7A5BCC5D6575D419A5FFA6940972541F1A3BA7EEA575D418C7154D6B7982541932B1981EC575D41C8266E9ED4982541AEF21480F0575D41CD2360E406992541058129A903585D41D5AD6B10C89925419EFD21A807585D412A636756FA99254137EDC7590A585D41B09 [...]
+169454	24021	63826	1	010500000001000000010200000017000000BD23BFFDD15D5D4159262F5FB8862541E9B9D8CEAD5D5D4182EB07411E872541A5F82FB7955D5D419DEA93E56B872541783CD8EC7E5D5D41D785B894C08725417AE9A9266F5D5D419909469A0C882541CB237BB3605D5D4106AE8BF466882541A0384395585D5D417A217730AA8825419AC5BD7C505D5D41BE7BAEB6F488254133271439475D5D41DFC134F06389254159E5F07E405D5D41F97A9F5FCB892541FAB7B8063B5D5D411298D9442B8A25417EC26407325D5D416868B2F9F18A254170E3939A2C5D5D41D68D7F73608B2541C663AE3C255D5D41D65 [...]
+170151	11736	70733	1	0105000000010000000102000000050000001448CDD103595D4139CEAC9C859B254144BF53FFF9585D4192F23763DE9C2541B3737717F5585D41E289758BF49D254130783A6DF6585D4183DA6569D69E2541D3473EF6F9585D4197B02122439F2541
+\.
+
+
+WITH a AS (SELECT source FROM edge_table UNION select target FROM edge_table)
+SELECT source AS id INTO edge_table_vertices_pgr FROM a;
+
+DROP TABLE IF EXISTS result2;
+SELECT  * INTO result2 FROM pgr_lineGraphFull(
+    $$SELECT id, source, target, cost
+    FROM edge_table$$
+);
+SELECT count(*) FROM result2;
+
+
+DROP TABLE IF EXISTS result2_vertices_pgr;
+WITH foo AS (SELECT source AS id FROM result2
+    UNION
+    SELECT target FROM result2)
+SELECT *, NULL::BIGINT AS original_id
+INTO result2_vertices_pgr
+FROM foo
+ORDER BY id;
+
+SELECT count(*) FROM result2_vertices_pgr WHERE original_id IS NOT NULL;
+SELECT count(*) FROM result2_vertices_pgr WHERE original_id IS NULL;
+
+UPDATE result2_vertices_pgr AS r SET original_id = v.id
+FROM edge_table_vertices_pgr AS v WHERE v.id = r.id;
+
+SELECT count(*) FROM result2_vertices_pgr WHERE original_id IS NOT NULL;
+SELECT count(*) FROM result2_vertices_pgr WHERE original_id IS NULL;
+
+WITH a AS (SELECT e.id, e.original_id FROM result2_vertices_pgr AS e WHERE original_id IS NOT NULL),
+b AS (SELECT * FROM result2 WHERE cost = 0 and source IN (SELECT id FROM a)),
+c AS (SELECT * FROM b JOIN result2_vertices_pgr ON(source = id)),
+d AS (SELECT c.source, v.original_id FROM c JOIN result2_vertices_pgr as v ON (target=v.id)),
+e AS (SELECT DISTINCT c.target, c.original_id FROM c JOIN result2_vertices_pgr AS r ON(target = r.id AND r.original_id IS NULL))
+UPDATE result2_vertices_pgr SET original_id = e.original_id FROM e WHERE e.target = id;
+
+SELECT count(*) FROM result2_vertices_pgr WHERE original_id IS NOT NULL;
+SELECT count(*) FROM result2_vertices_pgr WHERE original_id IS NULL;
+
+WITH a AS (SELECT e.id, e.original_id FROM result2_vertices_pgr AS e WHERE original_id IS NOT NULL),
+b AS (SELECT * FROM result2 WHERE cost = 0 and target IN (SELECT id FROM a)),
+c AS (SELECT * FROM b JOIN result2_vertices_pgr ON(target = id)),
+d AS (SELECT c.target, v.original_id FROM c JOIN result2_vertices_pgr as v ON (source=v.id)),
+e AS (SELECT DISTINCT c.source, c.original_id FROM c JOIN result2_vertices_pgr AS r ON(source = r.id AND r.original_id IS NULL))
+UPDATE result2_vertices_pgr SET original_id = e.original_id FROM e WHERE e.source = id;
+
+SELECT count(*) FROM result2_vertices_pgr WHERE original_id IS NOT NULL;
+SELECT count(*) FROM result2_vertices_pgr WHERE original_id IS NULL;
+
+WITH a AS (SELECT id FROM result2_vertices_pgr WHERE original_id IS NULL),
+b AS (SELECT source,edge FROM result2 WHERE source IN (SELECT id FROM a)),
+c AS (SELECT id,source FROM edge_table WHERE id IN (SELECT edge FROM b))
+UPDATE result2_vertices_pgr AS d SET original_id = (SELECT source FROM c WHERE c.id = (SELECT edge FROM b WHERE b.source = d.id)) WHERE id IN (SELECT id FROM a);
+
+SELECT count(*) FROM result2_vertices_pgr WHERE original_id IS NOT NULL;
+SELECT count(*) FROM result2_vertices_pgr WHERE original_id IS NULL;
+
+WITH a AS (SELECT id FROM result2_vertices_pgr WHERE original_id IS NULL),
+b AS (SELECT target,edge FROM result2 WHERE target IN (SELECT id FROM a)),
+c AS (SELECT id,target FROM edge_table WHERE id IN (SELECT edge FROM b))
+UPDATE result2_vertices_pgr AS d SET original_id = (SELECT target FROM c WHERE c.id = (SELECT edge FROM b WHERE b.target = d.id)) WHERE id IN (SELECT id FROM a);
+
+SELECT count(*) FROM result2_vertices_pgr WHERE original_id IS NOT NULL;
+SELECT count(*) FROM result2_vertices_pgr WHERE original_id IS NULL;
diff --git a/test/lineGraph/test.conf b/test/lineGraph/test.conf
new file mode 100644
index 0000000..e587df4
--- /dev/null
+++ b/test/lineGraph/test.conf
@@ -0,0 +1,23 @@
+#!/usr/bin/perl -w
+
+%main::tests = (
+    'any' => {
+        'comment' => 'LineGrpah test for any versions.',
+        'data' => [ ],
+        'tests' => [qw(
+            doc-pgr_lineGraphFull
+            doc-pgr_lineGraph
+            pgtap_design_lineGraphFull
+            pgtap_design
+            proofOfConcept1
+            proofOfConcept2
+            )],
+        'documentation' => [qw(
+            doc-pgr_lineGraphFull
+            doc-pgr_lineGraph
+            )]
+    },
+
+);
+
+1;
diff --git a/test/max_flow/doc-pgr_boykovKolmogorov.result b/test/max_flow/doc-pgr_boykovKolmogorov.result
new file mode 100644
index 0000000..c9475f2
--- /dev/null
+++ b/test/max_flow/doc-pgr_boykovKolmogorov.result
@@ -0,0 +1,90 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- q1
+SELECT * FROM pgr_boykovKolmogorov(
+    'SELECT id,
+            source,
+            target,
+            capacity,
+            reverse_capacity
+    FROM edge_table'
+    , 6, 11
+);
+ seq | edge | start_vid | end_vid | flow | residual_capacity
+-----+------+-----------+---------+------+-------------------
+   1 |   10 |         5 |      10 |  100 |                30
+   2 |    8 |         6 |       5 |  100 |                30
+   3 |   11 |         6 |      11 |  130 |                 0
+   4 |   12 |        10 |      11 |  100 |                 0
+(4 rows)
+
+-- q2
+SELECT * FROM pgr_boykovKolmogorov(
+    'SELECT id,
+            source,
+            target,
+            capacity,
+            reverse_capacity
+    FROM edge_table'
+    , 6, ARRAY[1, 3, 11]
+);
+ seq | edge | start_vid | end_vid | flow | residual_capacity
+-----+------+-----------+---------+------+-------------------
+   1 |    1 |         2 |       1 |   50 |                80
+   2 |    3 |         4 |       3 |   80 |                50
+   3 |    4 |         5 |       2 |   50 |                 0
+   4 |   10 |         5 |      10 |   80 |                50
+   5 |    8 |         6 |       5 |  130 |                 0
+   6 |    9 |         6 |       9 |   80 |                50
+   7 |   11 |         6 |      11 |  130 |                 0
+   8 |   16 |         9 |       4 |   80 |                 0
+   9 |   12 |        10 |      11 |   80 |                20
+(9 rows)
+
+-- q3
+SELECT * FROM pgr_boykovKolmogorov(
+    'SELECT id,
+            source,
+            target,
+            capacity,
+            reverse_capacity
+    FROM edge_table'
+    , ARRAY[6, 8, 12], 11
+);
+ seq | edge | start_vid | end_vid | flow | residual_capacity
+-----+------+-----------+---------+------+-------------------
+   1 |   10 |         5 |      10 |  100 |                30
+   2 |    8 |         6 |       5 |  100 |                30
+   3 |   11 |         6 |      11 |  130 |                 0
+   4 |   12 |        10 |      11 |  100 |                 0
+(4 rows)
+
+-- q4
+SELECT * FROM pgr_boykovKolmogorov(
+    'SELECT id,
+            source,
+            target,
+            capacity,
+            reverse_capacity
+    FROM edge_table'
+    , ARRAY[6, 8, 12], ARRAY[1, 3, 11]
+);
+ seq | edge | start_vid | end_vid | flow | residual_capacity
+-----+------+-----------+---------+------+-------------------
+   1 |    1 |         2 |       1 |   50 |                80
+   2 |    3 |         4 |       3 |   80 |                50
+   3 |    4 |         5 |       2 |   50 |                 0
+   4 |   10 |         5 |      10 |  100 |                30
+   5 |    8 |         6 |       5 |  130 |                 0
+   6 |    9 |         6 |       9 |   80 |                50
+   7 |   11 |         6 |      11 |  130 |                 0
+   8 |    7 |         8 |       5 |   20 |                30
+   9 |   16 |         9 |       4 |   80 |                 0
+  10 |   12 |        10 |      11 |  100 |                 0
+(10 rows)
+
+-- q5
+ROLLBACK;
+ROLLBACK
diff --git a/src/max_flow/test/doc-pgr_boykovKolmogorov.test.sql b/test/max_flow/doc-pgr_boykovKolmogorov.test.sql
similarity index 100%
rename from src/max_flow/test/doc-pgr_boykovKolmogorov.test.sql
rename to test/max_flow/doc-pgr_boykovKolmogorov.test.sql
diff --git a/test/max_flow/doc-pgr_edgeDisjointPaths.result b/test/max_flow/doc-pgr_edgeDisjointPaths.result
new file mode 100644
index 0000000..3f9b3a6
--- /dev/null
+++ b/test/max_flow/doc-pgr_edgeDisjointPaths.result
@@ -0,0 +1,128 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- q1
+SELECT * FROM pgr_edgeDisjointPaths(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    3, 5
+);
+ seq | path_id | path_seq | node | edge | cost | agg_cost
+-----+---------+----------+------+------+------+----------
+   1 |       1 |        1 |    3 |    2 |    1 |        0
+   2 |       1 |        2 |    2 |    4 |    1 |        1
+   3 |       1 |        3 |    5 |   -1 |    0 |        2
+   4 |       2 |        1 |    3 |    5 |    1 |        0
+   5 |       2 |        2 |    6 |    8 |    1 |        1
+   6 |       2 |        3 |    5 |   -1 |    0 |        2
+(6 rows)
+
+-- q2
+SELECT * FROM pgr_edgeDisjointPaths(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    3, 5,
+    directed := false
+);
+ seq | path_id | path_seq | node | edge | cost | agg_cost
+-----+---------+----------+------+------+------+----------
+   1 |       1 |        1 |    3 |    2 |    1 |        0
+   2 |       1 |        2 |    2 |    4 |    1 |        1
+   3 |       1 |        3 |    5 |   -1 |    0 |        2
+   4 |       2 |        1 |    3 |    3 |   -1 |        0
+   5 |       2 |        2 |    4 |   16 |    1 |       -1
+   6 |       2 |        3 |    9 |    9 |    1 |        0
+   7 |       2 |        4 |    6 |    8 |    1 |        1
+   8 |       2 |        5 |    5 |   -1 |    0 |        2
+   9 |       3 |        1 |    3 |    5 |    1 |        0
+  10 |       3 |        2 |    6 |   11 |    1 |        1
+  11 |       3 |        3 |   11 |   12 |   -1 |        2
+  12 |       3 |        4 |   10 |   10 |    1 |        1
+  13 |       3 |        5 |    5 |   -1 |    0 |        2
+(13 rows)
+
+-- q3
+SELECT * FROM pgr_edgeDisjointPaths(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    3, ARRAY[4, 5, 10]
+);
+ seq | path_id | path_seq | end_vid | node | edge | cost | agg_cost
+-----+---------+----------+---------+------+------+------+----------
+   1 |       1 |        1 |       4 |    3 |    5 |    1 |        0
+   2 |       1 |        2 |       4 |    6 |    9 |    1 |        1
+   3 |       1 |        3 |       4 |    9 |   16 |    1 |        2
+   4 |       1 |        4 |       4 |    4 |   -1 |    0 |        3
+   5 |       2 |        1 |       5 |    3 |    2 |    1 |        0
+   6 |       2 |        2 |       5 |    2 |    4 |    1 |        1
+   7 |       2 |        3 |       5 |    5 |   -1 |    0 |        2
+   8 |       3 |        1 |       5 |    3 |    5 |    1 |        0
+   9 |       3 |        2 |       5 |    6 |    8 |    1 |        1
+  10 |       3 |        3 |       5 |    5 |   -1 |    0 |        2
+  11 |       4 |        1 |      10 |    3 |    2 |    1 |        0
+  12 |       4 |        2 |      10 |    2 |    4 |    1 |        1
+  13 |       4 |        3 |      10 |    5 |   10 |    1 |        2
+  14 |       4 |        4 |      10 |   10 |   -1 |    0 |        3
+(14 rows)
+
+-- q4
+SELECT * FROM pgr_edgeDisjointPaths(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[3, 6], 5
+);
+ seq | path_id | path_seq | start_vid | node | edge | cost | agg_cost
+-----+---------+----------+-----------+------+------+------+----------
+   1 |       1 |        1 |         0 |    3 |    2 |    1 |        0
+   2 |       1 |        2 |         0 |    2 |    4 |    1 |        1
+   3 |       1 |        3 |         0 |    5 |   -1 |    0 |        2
+   4 |       2 |        1 |         1 |    3 |    5 |    1 |        0
+   5 |       2 |        2 |         1 |    6 |    8 |    1 |        1
+   6 |       2 |        3 |         1 |    5 |   -1 |    0 |        2
+   7 |       3 |        1 |         2 |    6 |    8 |    1 |        0
+   8 |       3 |        2 |         2 |    5 |   -1 |    0 |        1
+   9 |       4 |        1 |         3 |    6 |    9 |    1 |        0
+  10 |       4 |        2 |         3 |    9 |   16 |    1 |        1
+  11 |       4 |        3 |         3 |    4 |    3 |    1 |        2
+  12 |       4 |        4 |         3 |    3 |    2 |    1 |        3
+  13 |       4 |        5 |         3 |    2 |    4 |    1 |        4
+  14 |       4 |        6 |         3 |    5 |   -1 |    0 |        5
+(14 rows)
+
+-- q5
+SELECT * FROM pgr_edgeDisjointPaths(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+    ARRAY[3, 6], ARRAY[4, 5, 10]
+);
+ seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost
+-----+---------+----------+-----------+---------+------+------+------+----------
+   1 |       1 |        1 |         0 |       4 |    3 |    5 |    1 |        0
+   2 |       1 |        2 |         0 |       4 |    6 |    9 |    1 |        1
+   3 |       1 |        3 |         0 |       4 |    9 |   16 |    1 |        2
+   4 |       1 |        4 |         0 |       4 |    4 |   -1 |    0 |        3
+   5 |       2 |        1 |         1 |       5 |    3 |    2 |    1 |        0
+   6 |       2 |        2 |         1 |       5 |    2 |    4 |    1 |        1
+   7 |       2 |        3 |         1 |       5 |    5 |   -1 |    0 |        2
+   8 |       3 |        1 |         2 |       5 |    3 |    5 |    1 |        0
+   9 |       3 |        2 |         2 |       5 |    6 |    8 |    1 |        1
+  10 |       3 |        3 |         2 |       5 |    5 |   -1 |    0 |        2
+  11 |       4 |        1 |         3 |      10 |    3 |    2 |    1 |        0
+  12 |       4 |        2 |         3 |      10 |    2 |    4 |    1 |        1
+  13 |       4 |        3 |         3 |      10 |    5 |   10 |    1 |        2
+  14 |       4 |        4 |         3 |      10 |   10 |   -1 |    0 |        3
+  15 |       5 |        1 |         4 |       4 |    6 |    9 |    1 |        0
+  16 |       5 |        2 |         4 |       4 |    9 |   16 |    1 |        1
+  17 |       5 |        3 |         4 |       4 |    4 |   -1 |    0 |        2
+  18 |       6 |        1 |         5 |       5 |    6 |    8 |    1 |        0
+  19 |       6 |        2 |         5 |       5 |    5 |   -1 |    0 |        1
+  20 |       7 |        1 |         6 |       5 |    6 |    9 |    1 |        0
+  21 |       7 |        2 |         6 |       5 |    9 |   16 |    1 |        1
+  22 |       7 |        3 |         6 |       5 |    4 |    3 |    1 |        2
+  23 |       7 |        4 |         6 |       5 |    3 |    2 |    1 |        3
+  24 |       7 |        5 |         6 |       5 |    2 |    4 |    1 |        4
+  25 |       7 |        6 |         6 |       5 |    5 |   -1 |    0 |        5
+  26 |       8 |        1 |         7 |      10 |    6 |    8 |    1 |        0
+  27 |       8 |        2 |         7 |      10 |    5 |   10 |    1 |        1
+  28 |       8 |        3 |         7 |      10 |   10 |   -1 |    0 |        2
+(28 rows)
+
+-- q6
+ROLLBACK;
+ROLLBACK
diff --git a/src/max_flow/test/doc-pgr_edgeDisjointPaths.test.sql b/test/max_flow/doc-pgr_edgeDisjointPaths.test.sql
similarity index 100%
rename from src/max_flow/test/doc-pgr_edgeDisjointPaths.test.sql
rename to test/max_flow/doc-pgr_edgeDisjointPaths.test.sql
diff --git a/test/max_flow/doc-pgr_edmondsKarp.result b/test/max_flow/doc-pgr_edmondsKarp.result
new file mode 100644
index 0000000..4a5aff5
--- /dev/null
+++ b/test/max_flow/doc-pgr_edmondsKarp.result
@@ -0,0 +1,90 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- q1
+SELECT * FROM pgr_edmondsKarp(
+    'SELECT id,
+            source,
+            target,
+            capacity,
+            reverse_capacity
+    FROM edge_table'
+    , 6, 11
+);
+ seq | edge | start_vid | end_vid | flow | residual_capacity
+-----+------+-----------+---------+------+-------------------
+   1 |   10 |         5 |      10 |  100 |                30
+   2 |    8 |         6 |       5 |  100 |                30
+   3 |   11 |         6 |      11 |  130 |                 0
+   4 |   12 |        10 |      11 |  100 |                 0
+(4 rows)
+
+-- q2
+SELECT * FROM pgr_edmondsKarp(
+    'SELECT id,
+            source,
+            target,
+            capacity,
+            reverse_capacity
+    FROM edge_table'
+   , 6, ARRAY[1, 3, 11]
+);
+ seq | edge | start_vid | end_vid | flow | residual_capacity
+-----+------+-----------+---------+------+-------------------
+   1 |    1 |         2 |       1 |   50 |                80
+   2 |    3 |         4 |       3 |   80 |                50
+   3 |    4 |         5 |       2 |   50 |                 0
+   4 |   10 |         5 |      10 |   80 |                50
+   5 |    8 |         6 |       5 |  130 |                 0
+   6 |    9 |         6 |       9 |   80 |                50
+   7 |   11 |         6 |      11 |  130 |                 0
+   8 |   16 |         9 |       4 |   80 |                 0
+   9 |   12 |        10 |      11 |   80 |                20
+(9 rows)
+
+-- q3
+SELECT * FROM pgr_edmondsKarp(
+    'SELECT id,
+            source,
+            target,
+            capacity,
+            reverse_capacity
+    FROM edge_table'
+   , ARRAY[6, 8, 12], 11
+);
+ seq | edge | start_vid | end_vid | flow | residual_capacity
+-----+------+-----------+---------+------+-------------------
+   1 |   10 |         5 |      10 |  100 |                30
+   2 |    8 |         6 |       5 |  100 |                30
+   3 |   11 |         6 |      11 |  130 |                 0
+   4 |   12 |        10 |      11 |  100 |                 0
+(4 rows)
+
+-- q4
+SELECT * FROM pgr_edmondsKarp(
+    'SELECT id,
+            source,
+            target,
+            capacity,
+            reverse_capacity
+    FROM edge_table'
+   , ARRAY[6, 8, 12], ARRAY[1, 3, 11]
+);
+ seq | edge | start_vid | end_vid | flow | residual_capacity
+-----+------+-----------+---------+------+-------------------
+   1 |    1 |         2 |       1 |   50 |                80
+   2 |    3 |         4 |       3 |   80 |                50
+   3 |    4 |         5 |       2 |   50 |                 0
+   4 |   10 |         5 |      10 |  100 |                30
+   5 |    8 |         6 |       5 |  130 |                 0
+   6 |    9 |         6 |       9 |   80 |                50
+   7 |   11 |         6 |      11 |  130 |                 0
+   8 |    7 |         8 |       5 |   20 |                30
+   9 |   16 |         9 |       4 |   80 |                 0
+  10 |   12 |        10 |      11 |  100 |                 0
+(10 rows)
+
+-- q5
+ROLLBACK;
+ROLLBACK
diff --git a/src/max_flow/test/doc-pgr_edmondsKarp.test.sql b/test/max_flow/doc-pgr_edmondsKarp.test.sql
similarity index 100%
rename from src/max_flow/test/doc-pgr_edmondsKarp.test.sql
rename to test/max_flow/doc-pgr_edmondsKarp.test.sql
diff --git a/test/max_flow/doc-pgr_maxCardinalityMatch.result b/test/max_flow/doc-pgr_maxCardinalityMatch.result
new file mode 100644
index 0000000..cafd899
--- /dev/null
+++ b/test/max_flow/doc-pgr_maxCardinalityMatch.result
@@ -0,0 +1,40 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- q1
+SELECT * FROM pgr_maxCardinalityMatch(
+    'SELECT id, source, target, cost AS going, reverse_cost AS coming FROM edge_table'
+);
+ seq | edge | source | target
+-----+------+--------+--------
+   1 |    1 |      1 |      2
+   2 |    3 |      4 |      3
+   3 |    9 |      6 |      9
+   4 |    6 |      7 |      8
+   5 |   14 |     10 |     13
+   6 |   13 |     11 |     12
+   7 |   17 |     14 |     15
+   8 |   18 |     16 |     17
+(8 rows)
+
+-- q2
+SELECT * FROM pgr_maxCardinalityMatch(
+    'SELECT id, source, target, cost AS going, reverse_cost AS coming FROM edge_table',
+    directed := false
+);
+ seq | edge | source | target
+-----+------+--------+--------
+   1 |    1 |      1 |      2
+   2 |    3 |      3 |      4
+   3 |    9 |      6 |      9
+   4 |    6 |      7 |      8
+   5 |   14 |     10 |     13
+   6 |   13 |     11 |     12
+   7 |   17 |     14 |     15
+   8 |   18 |     16 |     17
+(8 rows)
+
+-- q3
+ROLLBACK;
+ROLLBACK
diff --git a/src/max_flow/test/doc-pgr_maxCardinalityMatch.test.sql b/test/max_flow/doc-pgr_maxCardinalityMatch.test.sql
similarity index 100%
rename from src/max_flow/test/doc-pgr_maxCardinalityMatch.test.sql
rename to test/max_flow/doc-pgr_maxCardinalityMatch.test.sql
diff --git a/test/max_flow/doc-pgr_maxFlow.result b/test/max_flow/doc-pgr_maxFlow.result
new file mode 100644
index 0000000..24d2798
--- /dev/null
+++ b/test/max_flow/doc-pgr_maxFlow.result
@@ -0,0 +1,67 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- q1
+SELECT * FROM pgr_maxFlow(
+    'SELECT id,
+            source,
+            target,
+            capacity,
+            reverse_capacity
+    FROM edge_table'
+    , 6, 11
+);
+ pgr_maxflow
+-------------
+         230
+(1 row)
+
+-- q2
+SELECT * FROM pgr_maxFlow(
+    'SELECT id,
+            source,
+            target,
+            capacity,
+            reverse_capacity
+    FROM edge_table'
+    , 6, ARRAY[11, 1, 13]
+);
+ pgr_maxflow
+-------------
+         340
+(1 row)
+
+-- q3
+SELECT * FROM pgr_maxFlow(
+    'SELECT id,
+            source,
+            target,
+            capacity,
+            reverse_capacity
+    FROM edge_table'
+    , ARRAY[6, 8, 12], 11
+);
+ pgr_maxflow
+-------------
+         230
+(1 row)
+
+-- q4
+SELECT * FROM pgr_maxFlow(
+    'SELECT id,
+            source,
+            target,
+            capacity,
+            reverse_capacity
+    FROM edge_table'
+    , ARRAY[6, 8, 12], ARRAY[1, 3, 11]
+);
+ pgr_maxflow
+-------------
+         360
+(1 row)
+
+-- q5
+ROLLBACK;
+ROLLBACK
diff --git a/src/max_flow/test/doc-pgr_maxFlow.test.sql b/test/max_flow/doc-pgr_maxFlow.test.sql
similarity index 100%
rename from src/max_flow/test/doc-pgr_maxFlow.test.sql
rename to test/max_flow/doc-pgr_maxFlow.test.sql
diff --git a/test/max_flow/doc-pgr_pushRelabel.result b/test/max_flow/doc-pgr_pushRelabel.result
new file mode 100644
index 0000000..bc9a77a
--- /dev/null
+++ b/test/max_flow/doc-pgr_pushRelabel.result
@@ -0,0 +1,96 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- q1
+SELECT * FROM pgr_pushRelabel(
+    'SELECT id,
+            source,
+            target,
+            capacity,
+            reverse_capacity
+    FROM edge_table'
+    , 6, 11
+);
+ seq | edge | start_vid | end_vid | flow | residual_capacity
+-----+------+-----------+---------+------+-------------------
+   1 |   10 |         5 |      10 |  100 |                30
+   2 |    8 |         6 |       5 |  100 |                30
+   3 |   11 |         6 |      11 |  130 |                 0
+   4 |   12 |        10 |      11 |  100 |                 0
+(4 rows)
+
+-- q2
+SELECT * FROM pgr_pushRelabel(
+    'SELECT id,
+            source,
+            target,
+            capacity,
+            reverse_capacity
+    FROM edge_table'
+    , 6, ARRAY[11, 1, 13]
+);
+ seq | edge | start_vid | end_vid | flow | residual_capacity
+-----+------+-----------+---------+------+-------------------
+   1 |    1 |         2 |       1 |  130 |                 0
+   2 |    2 |         3 |       2 |   80 |                20
+   3 |    3 |         4 |       3 |   80 |                50
+   4 |    4 |         5 |       2 |   50 |                 0
+   5 |    7 |         5 |       8 |   50 |                80
+   6 |   10 |         5 |      10 |   80 |                50
+   7 |    8 |         6 |       5 |  130 |                 0
+   8 |    9 |         6 |       9 |   80 |                50
+   9 |   11 |         6 |      11 |  130 |                 0
+  10 |    6 |         7 |       8 |   50 |                 0
+  11 |    6 |         8 |       7 |   50 |                50
+  12 |    7 |         8 |       5 |   50 |                 0
+  13 |   16 |         9 |       4 |   80 |                 0
+  14 |   12 |        10 |      11 |   80 |                20
+(14 rows)
+
+-- q3
+SELECT * FROM pgr_pushRelabel(
+    'SELECT id,
+            source,
+            target,
+            capacity,
+            reverse_capacity
+    FROM edge_table'
+    , ARRAY[6, 8, 12], 11
+);
+ seq | edge | start_vid | end_vid | flow | residual_capacity
+-----+------+-----------+---------+------+-------------------
+   1 |   10 |         5 |      10 |  100 |                30
+   2 |    8 |         6 |       5 |  100 |                30
+   3 |   11 |         6 |      11 |  130 |                 0
+   4 |   12 |        10 |      11 |  100 |                 0
+(4 rows)
+
+-- q4
+SELECT * FROM pgr_pushRelabel(
+    'SELECT id,
+            source,
+            target,
+            capacity,
+            reverse_capacity
+    FROM edge_table'
+    , ARRAY[6, 8, 12], ARRAY[1, 3, 11]
+);
+ seq | edge | start_vid | end_vid | flow | residual_capacity
+-----+------+-----------+---------+------+-------------------
+   1 |    1 |         2 |       1 |   50 |                80
+   2 |    3 |         4 |       3 |   80 |                50
+   3 |    4 |         5 |       2 |   50 |                 0
+   4 |   10 |         5 |      10 |  100 |                30
+   5 |    8 |         6 |       5 |  130 |                 0
+   6 |    9 |         6 |       9 |   30 |               100
+   7 |   11 |         6 |      11 |  130 |                 0
+   8 |    7 |         8 |       5 |   20 |                30
+   9 |   16 |         9 |       4 |   80 |                 0
+  10 |   12 |        10 |      11 |  100 |                 0
+  11 |   15 |        12 |       9 |   50 |                 0
+(11 rows)
+
+-- q5
+ROLLBACK;
+ROLLBACK
diff --git a/src/max_flow/test/doc-pgr_pushRelabel.test.sql b/test/max_flow/doc-pgr_pushRelabel.test.sql
similarity index 100%
rename from src/max_flow/test/doc-pgr_pushRelabel.test.sql
rename to test/max_flow/doc-pgr_pushRelabel.test.sql
diff --git a/src/max_flow/test/test.conf b/test/max_flow/test.conf
similarity index 100%
rename from src/max_flow/test/test.conf
rename to test/max_flow/test.conf
diff --git a/src/pickDeliver/test/bencharkTest/README.vrpdptw-testdata b/test/pickDeliver/bencharkTest/README.vrpdptw-testdata
similarity index 100%
rename from src/pickDeliver/test/bencharkTest/README.vrpdptw-testdata
rename to test/pickDeliver/bencharkTest/README.vrpdptw-testdata
diff --git a/src/pickDeliver/test/bencharkTest/lc101_test.sql b/test/pickDeliver/bencharkTest/lc101_test.sql
similarity index 100%
rename from src/pickDeliver/test/bencharkTest/lc101_test.sql
rename to test/pickDeliver/bencharkTest/lc101_test.sql
diff --git a/src/pickDeliver/test/bencharkTest/vrpdptw-testdata.sql.gz b/test/pickDeliver/bencharkTest/vrpdptw-testdata.sql.gz
similarity index 100%
rename from src/pickDeliver/test/bencharkTest/vrpdptw-testdata.sql.gz
rename to test/pickDeliver/bencharkTest/vrpdptw-testdata.sql.gz
diff --git a/test/pickDeliver/book_from_query.result b/test/pickDeliver/book_from_query.result
new file mode 100644
index 0000000..2788613
--- /dev/null
+++ b/test/pickDeliver/book_from_query.result
@@ -0,0 +1,186 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+DROP TABLE IF EXISTS jet_stops;
+NOTICE:  table "jet_stops" does not exist, skipping
+DROP TABLE
+DROP TABLE IF EXISTS jet_flyers;
+NOTICE:  table "jet_flyers" does not exist, skipping
+DROP TABLE
+DROP TABLE IF EXISTS jet_orders;
+NOTICE:  table "jet_orders" does not exist, skipping
+DROP TABLE
+DROP TABLE IF EXISTS jet_airplane;
+NOTICE:  table "jet_airplane" does not exist, skipping
+DROP TABLE
+DROP TABLE IF EXISTS jet_trips;
+NOTICE:  table "jet_trips" does not exist, skipping
+DROP TABLE
+DROP TABLE IF EXISTS vrp_solution;
+NOTICE:  table "vrp_solution" does not exist, skipping
+DROP TABLE
+CREATE TABLE jet_stops (
+    id SERIAL,
+    iata_faa TEXT,
+    city TEXT,
+    x integer,
+    y integer,
+    longitude double precision,
+    latitude double precision
+);
+CREATE TABLE
+INSERT INTO jet_stops (iata_faa, city, longitude, latitude) VALUES
+('BOS',  'Boston', -71.005180999999993, 42.364347000000002),
+('BGR',  'Bangor', -68.828138999999993, 44.807443999999997),
+('MIA',  'Miami',  -80.290555999999995, 25.79325),
+('TEB',  'Teterboro NJ', -74.060837000000006, 40.850102999999997),
+('MVY',  'Martha''s Vineyard', -70.615278000000004, 41.391666999999998),
+('ABE',  'Lehigh Valley', -75.440805999999995, 40.652082999999998),
+('BKW',  'Raleigh County Memorial', -81.124200000000002, 37.787300000000002),
+('BGE',  'Decatur County Industrial', -84.636927799999995, 30.971598100000001);
+INSERT 0 8
+UPDATE jet_stops SET
+x = ST_X(ST_Transform(ST_SetSRID(ST_point(longitude, latitude)::geometry,4326),2163)),
+y = ST_Y(ST_Transform(ST_SetSRID(ST_point(longitude, longitude)::geometry,4326),2163));
+UPDATE 8
+CREATE TABLE jet_flyers AS
+    SELECT
+    row_number() over() AS id,
+    s1.iata_faa  AS from_airport,
+    s2.iata_faa  AS to_airport,
+    (1 + mod(s1.id, 5))::integer AS num_passengers,
+
+    mod(s1.id,7)*60 AS departureFromTime,
+
+    (mod(s1.id,7) + 4) * 60 AS arrivalToTime
+    FROM
+
+    (SELECT * FROM jet_stops WHERE id < 4) AS s1,
+
+    (SELECT * FROM jet_stops WHERE id >= 4) AS s2
+    WHERE s1.id <> s2.id;
+SELECT 15
+CREATE TABLE jet_orders AS
+    SELECT
+    id,
+    num_passengers AS demand,
+    (SELECT x FROM jet_stops WHERE iata_faa = jet_flyers.from_airport) AS p_x,
+    (SELECT y FROM jet_stops WHERE iata_faa = jet_flyers.from_airport) AS p_y,
+
+    departureFromTime AS p_open,
+    arrivalToTime AS p_close,
+    (SELECT x FROM jet_stops WHERE iata_faa = jet_flyers.to_airport) AS d_x,
+    (SELECT y FROM jet_stops WHERE iata_faa = jet_flyers.to_airport) AS d_y,
+    departureFromTime AS d_open,
+    arrivalToTime AS d_close,
+    from_airport, to_airport
+    FROM jet_flyers;
+SELECT 15
+CREATE TABLE jet_airplane AS
+SELECT
+    1 AS id,
+
+    5 AS capacity,
+
+    10000 AS speed,
+    20 as "number",
+    x AS start_x, y AS start_y,
+    0 AS start_open,
+    300 AS start_close,
+    0 AS start_service
+    FROM jet_stops
+    WHERE iata_faa = 'TEB';
+SELECT 1
+CREATE TABLE vrp_solution AS
+SELECT * FROM _pgr_pickDeliverEuclidean(
+    $$ SELECT * FROM jet_orders $$,
+    $$ SELECT * FROM jet_airplane $$
+);
+SELECT 47
+CREATE TABLE jet_trips AS
+WITH the_results AS (
+SELECT vrp_solution.*,  from_airport, to_airport,
+CASE WHEN stop_type = 1 THEN ST_POINT(p_x, p_y)
+        WHEN stop_type = 2 THEN ST_POINT(d_x, d_y)
+        WHEN stop_type = 0 THEN  ST_POINT(start_x, start_y)
+    END AS geom
+FROM vrp_solution LEFT JOIN  jet_orders on (order_id = jet_orders.id)
+LEFT JOIN jet_airplane on (vehicle_id = jet_airplane.id)
+)
+SELECT *, ST_SetSRID(ST_MakeLine(geom, lead(geom) over(order by seq)),2163) AS lines from the_results;
+SELECT 47
+SELECT * FROM jet_orders;
+ id | demand |   p_x   |    p_y    | p_open | p_close |   d_x   |    d_y    | d_open | d_close | from_airport | to_airport
+----+--------+---------+-----------+--------+---------+---------+-----------+--------+---------+--------------+------------
+  1 |      2 | 2320738 | -10738754 |     60 |     300 | 2138410 | -10946747 |     60 |     300 | BOS          | TEB
+  2 |      2 | 2320738 | -10738754 |     60 |     300 | 2387491 | -10710759 |     60 |     300 | BOS          | MVY
+  3 |      2 | 2320738 | -10738754 |     60 |     300 | 2035311 | -11034361 |     60 |     300 | BOS          | ABE
+  4 |      2 | 2320738 | -10738754 |     60 |     300 | 1644577 | -11358423 |     60 |     300 | BOS          | BKW
+  5 |      2 | 2320738 | -10738754 |     60 |     300 | 1466239 | -11533361 |     60 |     300 | BOS          | BGE
+  6 |      3 | 2383186 | -10578021 |    120 |     360 | 2138410 | -10946747 |    120 |     360 | BGR          | TEB
+  7 |      3 | 2383186 | -10578021 |    120 |     360 | 2387491 | -10710759 |    120 |     360 | BGR          | MVY
+  8 |      3 | 2383186 | -10578021 |    120 |     360 | 2035311 | -11034361 |    120 |     360 | BGR          | ABE
+  9 |      3 | 2383186 | -10578021 |    120 |     360 | 1644577 | -11358423 |    120 |     360 | BGR          | BKW
+ 10 |      3 | 2383186 | -10578021 |    120 |     360 | 1466239 | -11533361 |    120 |     360 | BGR          | BGE
+ 11 |      4 | 1981145 | -11314287 |    180 |     420 | 2138410 | -10946747 |    180 |     420 | MIA          | TEB
+ 12 |      4 | 1981145 | -11314287 |    180 |     420 | 2387491 | -10710759 |    180 |     420 | MIA          | MVY
+ 13 |      4 | 1981145 | -11314287 |    180 |     420 | 2035311 | -11034361 |    180 |     420 | MIA          | ABE
+ 14 |      4 | 1981145 | -11314287 |    180 |     420 | 1644577 | -11358423 |    180 |     420 | MIA          | BKW
+ 15 |      4 | 1981145 | -11314287 |    180 |     420 | 1466239 | -11533361 |    180 |     420 | MIA          | BGE
+(15 rows)
+
+SELECT * FROM jet_trips;
+ seq | vehicle_number | vehicle_id | vehicle_seq | order_id | stop_type | cargo |   travel_time    |   arrival_time   |    wait_time     | service_time |  departure_time  | from_airport | to_airport |                    geom                    |                                           lines
+-----+----------------+------------+-------------+----------+-----------+-------+------------------+------------------+------------------+--------------+------------------+--------------+------------+--------------------------------------------+--------------------------------------------------------------------------------------------
+   1 |              1 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |                0 |            0 |                0 |              |            |                                            |
+   2 |              1 |          1 |           2 |        7 |         2 |     3 | 44.2576720187585 | 44.2576720187585 | 75.7423279812415 |            0 |              120 | BGR          | MVY        | 01010000000000008011374241000000E0DC6D64C1 |
+   3 |              1 |          1 |           3 |        7 |         3 |     0 | 13.2807792199855 | 133.280779219986 |                0 |            0 | 133.280779219986 | BGR          | MVY        |                                            |
+   4 |              1 |          1 |           4 |        8 |         2 |     3 | 13.2807792199855 | 146.561558439971 |                0 |            0 | 146.561558439971 | BGR          | ABE        | 0101000000000000006F0E3F4100000020DF0B65C1 | 01020000207308000002000000000000006F0E3F4100000020DF0B65C100000000955040410000006017E164C1
+   5 |              1 |          1 |           5 |        1 |         2 |     5 | 17.2437959837734 | 163.805354423745 |                0 |            0 | 163.805354423745 | BOS          | TEB        | 010100000000000000955040410000006017E164C1 |
+   6 |              1 |          1 |           6 |       12 |         3 |     1 | 7.23856548910072 | 171.043919912845 | 8.95608008715473 |            0 |              180 | MIA          | MVY        |                                            |
+   7 |              1 |          1 |           7 |       12 |         2 |     5 | 72.7573445433518 | 252.757344543352 |                0 |            0 | 252.757344543352 | MIA          | MVY        | 01010000000000008011374241000000E0DC6D64C1 |
+   8 |              1 |          1 |           8 |        8 |         3 |     2 | 28.5118433343058 | 281.269187877658 |                0 |            0 | 281.269187877658 | BGR          | ABE        |                                            |
+   9 |              1 |          1 |           9 |        1 |         3 |     0 | 13.5298251271035 | 294.799013004761 |                0 |            0 | 294.799013004761 | BOS          | TEB        |                                            |
+  10 |              1 |          1 |          10 |       -1 |         6 |     0 |                0 | 294.799013004761 |                0 |            0 | 294.799013004761 |              |            |                                            |
+  11 |              2 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |                0 |            0 |                0 |              |            |                                            |
+  12 |              2 |          1 |           2 |        4 |         2 |     2 | 27.6594626905513 | 27.6594626905513 | 32.3405373094487 |            0 |               60 | BOS          | BKW        | 01010000000000000021183941000000E01AAA65C1 | 010200002073080000020000000000000021183941000000E01AAA65C10000000021183941000000E01AAA65C1
+  13 |              2 |          1 |           3 |        9 |         2 |     5 | 17.2437959837734 | 77.2437959837734 | 42.7562040162266 |            0 |              120 | BGR          | BKW        | 01010000000000000021183941000000E01AAA65C1 |
+  14 |              2 |          1 |           4 |        9 |         3 |     2 | 107.450943992363 | 227.450943992363 |                0 |            0 | 227.450943992363 | BGR          | BKW        |                                            |
+  15 |              2 |          1 |           5 |        4 |         3 |     0 |                0 | 227.450943992363 |                0 |            0 | 227.450943992363 | BOS          | BKW        |                                            |
+  16 |              2 |          1 |           6 |       -1 |         6 |     0 | 64.2921582205015 | 291.743102212865 |                0 |            0 | 291.743102212865 |              |            |                                            |
+  17 |              3 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |                0 |            0 |                0 |              |            |                                            |
+  18 |              3 |          1 |           2 |        3 |         2 |     2 | 27.6594626905513 | 27.6594626905513 | 32.3405373094487 |            0 |               60 | BOS          | ABE        | 0101000000000000006F0E3F4100000020DF0B65C1 | 01020000207308000002000000000000006F0E3F4100000020DF0B65C1000000007F5F36410000002086FF65C1
+  19 |              3 |          1 |           3 |        5 |         2 |     4 |                0 |               60 |                0 |            0 |               60 | BOS          | BGE        | 0101000000000000007F5F36410000002086FF65C1 |
+  20 |              3 |          1 |           4 |        3 |         3 |     2 | 41.0916135942603 |  101.09161359426 |                0 |            0 |  101.09161359426 | BOS          | ABE        |                                            |
+  21 |              3 |          1 |           5 |        5 |         3 |     0 |  75.686454612698 | 176.778068206958 |                0 |            0 | 176.778068206958 | BOS          | BGE        |                                            |
+  22 |              3 |          1 |           6 |       11 |         2 |     4 | 55.9572699755805 | 232.735338182539 |                0 |            0 | 232.735338182539 | MIA          | TEB        | 010100000000000000955040410000006017E164C1 |
+  23 |              3 |          1 |           7 |       11 |         3 |     0 | 39.9772350000597 | 272.712573182599 |                0 |            0 | 272.712573182599 | MIA          | TEB        |                                            |
+  24 |              3 |          1 |           8 |       -1 |         6 |     0 |                0 | 272.712573182599 |                0 |            0 | 272.712573182599 |              |            |                                            |
+  25 |              4 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |                0 |            0 |                0 |              |            |                                            |
+  26 |              4 |          1 |           2 |       13 |         2 |     4 | 39.9772350000597 | 39.9772350000597 |  140.02276499994 |            0 |              180 | MIA          | ABE        | 0101000000000000006F0E3F4100000020DF0B65C1 |
+  27 |              4 |          1 |           3 |       13 |         3 |     0 | 28.5118433343058 | 208.511843334306 |                0 |            0 | 208.511843334306 | MIA          | ABE        |                                            |
+  28 |              4 |          1 |           4 |       -1 |         6 |     0 | 13.5298251271035 | 222.041668461409 |                0 |            0 | 222.041668461409 |              |            |                                            |
+  29 |              5 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |                0 |            0 |                0 |              |            |                                            |
+  30 |              5 |          1 |           2 |       14 |         2 |     4 | 39.9772350000597 | 39.9772350000597 |  140.02276499994 |            0 |              180 | MIA          | BKW        | 01010000000000000021183941000000E01AAA65C1 |
+  31 |              5 |          1 |           3 |       14 |         3 |     0 | 33.9449561967607 | 213.944956196761 |                0 |            0 | 213.944956196761 | MIA          | BKW        |                                            |
+  32 |              5 |          1 |           4 |       -1 |         6 |     0 | 64.2921582205015 | 278.237114417262 |                0 |            0 | 278.237114417262 |              |            |                                            |
+  33 |              6 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |                0 |            0 |                0 |              |            |                                            |
+  34 |              6 |          1 |           2 |        6 |         2 |     3 | 44.2576720187585 | 44.2576720187585 | 75.7423279812415 |            0 |              120 | BGR          | TEB        | 010100000000000000955040410000006017E164C1 |
+  35 |              6 |          1 |           3 |        6 |         3 |     0 | 44.2576720187585 | 164.257672018759 |                0 |            0 | 164.257672018759 | BGR          | TEB        |                                            |
+  36 |              6 |          1 |           4 |       -1 |         6 |     0 |                0 | 164.257672018759 |                0 |            0 | 164.257672018759 |              |            |                                            |
+  37 |              7 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |                0 |            0 |                0 |              |            |                                            |
+  38 |              7 |          1 |           2 |        2 |         2 |     2 | 27.6594626905513 | 27.6594626905513 | 32.3405373094487 |            0 |               60 | BOS          | MVY        | 01010000000000008011374241000000E0DC6D64C1 |
+  39 |              7 |          1 |           3 |        2 |         3 |     0 | 7.23856548910072 | 67.2385654891007 |                0 |            0 | 67.2385654891007 | BOS          | MVY        |                                            |
+  40 |              7 |          1 |           4 |       -1 |         6 |     0 | 34.3120504640862 | 101.550615953187 |                0 |            0 | 101.550615953187 |              |            |                                            |
+  41 |              8 |         -1 |           1 |       -1 |         1 |     0 |                0 |                0 |                0 |            0 |                0 |              |            |                                            |
+  42 |              8 |         -1 |           2 |       10 |         2 |     3 | 44.2576720187585 | 44.2576720187585 | 75.7423279812415 |            0 |              120 | BGR          | BGE        | 0101000000000000007F5F36410000002086FF65C1 | 01020000207308000002000000000000007F5F36410000002086FF65C1000000007F5F36410000002086FF65C1
+  43 |              8 |         -1 |           3 |       15 |         2 |     7 | 83.8882940842761 | 203.888294084276 |                0 |            0 | 203.888294084276 | MIA          | BGE        | 0101000000000000007F5F36410000002086FF65C1 |
+  44 |              8 |         -1 |           4 |       15 |         3 |     3 | 55.9572699755805 | 259.845564059857 |                0 |            0 | 259.845564059857 | MIA          | BGE        |                                            |
+  45 |              8 |         -1 |           5 |       10 |         3 |     0 |                0 | 259.845564059857 |                0 |            0 | 259.845564059857 | BGR          | BGE        |                                            |
+  46 |              8 |         -1 |           6 |       -1 |         6 |     0 | 89.2149000020176 | 349.060464061874 |                0 |            0 | 349.060464061874 |              |            |                                            |
+  47 |             -2 |          0 |           0 |       -1 |        -1 |    -1 | 1318.39581333738 |               -1 | 656.006409975332 |            0 | 1974.40222331272 |              |            |                                            |
+(47 rows)
+
+ROLLBACK;
+ROLLBACK
diff --git a/test/pickDeliver/book_from_query.test.sql b/test/pickDeliver/book_from_query.test.sql
new file mode 100644
index 0000000..566db76
--- /dev/null
+++ b/test/pickDeliver/book_from_query.test.sql
@@ -0,0 +1,115 @@
+DROP TABLE IF EXISTS jet_stops;
+DROP TABLE IF EXISTS jet_flyers;
+DROP TABLE IF EXISTS jet_orders;
+DROP TABLE IF EXISTS jet_airplane;
+DROP TABLE IF EXISTS jet_trips;
+DROP TABLE IF EXISTS vrp_solution;
+
+CREATE TABLE jet_stops (
+    id SERIAL,
+    iata_faa TEXT,
+    city TEXT,
+    x integer,
+    y integer,
+    longitude double precision,
+    latitude double precision
+);
+
+
+INSERT INTO jet_stops (iata_faa, city, longitude, latitude) VALUES
+('BOS',  'Boston', -71.005180999999993, 42.364347000000002),
+('BGR',  'Bangor', -68.828138999999993, 44.807443999999997),
+('MIA',  'Miami',  -80.290555999999995, 25.79325),
+('TEB',  'Teterboro NJ', -74.060837000000006, 40.850102999999997),
+('MVY',  'Martha''s Vineyard', -70.615278000000004, 41.391666999999998),
+('ABE',  'Lehigh Valley', -75.440805999999995, 40.652082999999998),
+('BKW',  'Raleigh County Memorial', -81.124200000000002, 37.787300000000002),
+('BGE',  'Decatur County Industrial', -84.636927799999995, 30.971598100000001);
+
+
+UPDATE jet_stops SET
+x = ST_X(ST_Transform(ST_SetSRID(ST_point(longitude, latitude)::geometry,4326),2163)),
+y = ST_Y(ST_Transform(ST_SetSRID(ST_point(longitude, longitude)::geometry,4326),2163));
+
+
+CREATE TABLE jet_flyers AS
+    SELECT
+    row_number() over() AS id,
+    s1.iata_faa  AS from_airport,
+    s2.iata_faa  AS to_airport,
+    (1 + mod(s1.id, 5))::integer AS num_passengers,
+    -- the passengers don't want to depart before this time
+    mod(s1.id,7)*60 AS departureFromTime,
+    -- the passengers don't want to arrive after this time
+    (mod(s1.id,7) + 4) * 60 AS arrivalToTime
+    FROM
+    -- people departing from BOS BGR MIA TEB
+    (SELECT * FROM jet_stops WHERE id < 4) AS s1,
+    -- people want to go to MVY ABE BKW BGE
+    (SELECT * FROM jet_stops WHERE id >= 4) AS s2
+    WHERE s1.id <> s2.id;
+
+
+-- Listing Create jet_orders table to be used in pgr_pickDeliverEuclidean
+CREATE TABLE jet_orders AS
+    SELECT
+    id,
+    num_passengers AS demand,
+    (SELECT x FROM jet_stops WHERE iata_faa = jet_flyers.from_airport) AS p_x,
+    (SELECT y FROM jet_stops WHERE iata_faa = jet_flyers.from_airport) AS p_y,
+
+    departureFromTime AS p_open,
+    arrivalToTime AS p_close,
+
+    (SELECT x FROM jet_stops WHERE iata_faa = jet_flyers.to_airport) AS d_x,
+    (SELECT y FROM jet_stops WHERE iata_faa = jet_flyers.to_airport) AS d_y,
+
+    departureFromTime AS d_open,
+    arrivalToTime AS d_close,
+
+    from_airport, to_airport
+
+    FROM jet_flyers;
+
+
+--
+CREATE TABLE jet_airplane AS
+SELECT
+    1 AS id,
+    -- small plane
+    5 AS capacity,
+    -- not so fast
+    10000 AS speed, -- mts/min
+    20 as "number",
+    x AS start_x, y AS start_y,
+    0 AS start_open,
+    300 AS start_close,
+    0 AS start_service
+    FROM jet_stops
+    WHERE iata_faa = 'TEB';
+
+CREATE TABLE vrp_solution AS
+SELECT * FROM _pgr_pickDeliverEuclidean(
+    $$ SELECT * FROM jet_orders $$,
+    $$ SELECT * FROM jet_airplane $$
+);
+
+
+CREATE TABLE jet_trips AS
+WITH the_results AS (
+SELECT vrp_solution.*,  from_airport, to_airport,
+CASE WHEN stop_type = 1 THEN ST_POINT(p_x, p_y)
+        WHEN stop_type = 2 THEN ST_POINT(d_x, d_y)
+        WHEN stop_type = 0 THEN  ST_POINT(start_x, start_y)
+    END AS geom
+FROM vrp_solution LEFT JOIN  jet_orders on (order_id = jet_orders.id)
+LEFT JOIN jet_airplane on (vehicle_id = jet_airplane.id)
+)
+SELECT *, ST_SetSRID(ST_MakeLine(geom, lead(geom) over(order by seq)),2163) AS lines from the_results;
+
+
+SELECT * FROM jet_orders;
+
+SELECT * FROM jet_trips;
+
+
diff --git a/src/pickDeliver/test/book_vrp.result b/test/pickDeliver/book_vrp.result
similarity index 100%
rename from src/pickDeliver/test/book_vrp.result
rename to test/pickDeliver/book_vrp.result
diff --git a/test/pickDeliver/book_vrp.test.sql b/test/pickDeliver/book_vrp.test.sql
new file mode 100644
index 0000000..d2a1810
--- /dev/null
+++ b/test/pickDeliver/book_vrp.test.sql
@@ -0,0 +1,664 @@
+DROP TABLE IF EXISTS jet_customers;
+
+
+/*
+CREATE TABLE trucks(id integer primary key, truck_name varchar(75), capacity integer );
+INSERT INTO trucks(id, truck_name, capacity)
+VALUES (1, 'Hardy Truck', 800),
+    (2, 'Laurel Truck', 400);
+
+CREATE TABLE restaurants_99(id integer primary key,  loc_name varchar(150), lon float, lat float);
+INSERT INTO restaurants_99(id, loc_name, lon, lat)
+VALUES (1, 'Bristol, CT', -72.8924, 41.66892),
+     (2, 'Cromwell, CT', -72.67615, 41.60165),
+     (3, 'Danbury, CT', -73.41376, 41.41008),
+     (4, 'Enfield, CT', -72.57634, 41.98837),
+     (5, 'Glastonbury, CT', -72.61592, 41.72646),
+     (6, 'Groton, CT', -72.06683, 41.36298),
+     (7, 'Dayville, CT', -71.8824882, 41.8425568),
+     (8, 'Norwich, CT', -72.10508, 41.51431),
+     (9, 'Stratford, CT',  -73.12182, 41.19878),
+     (10, 'Torrington, CT',  -73.12131, 41.79984),
+     (11, 'Vernon, CT', -72.49305, 41.82647),
+     (12, 'Wallingford, CT', -72.8092, 41.4835);
+*/
+
+CREATE TABLE jet_customers (
+    airport character varying,
+    id integer,
+    x double precision,
+    y double precision,
+    pindex integer,
+    dindex integer,
+    demand integer,
+    opentime double precision,
+    closetime double precision,
+    servicetime double precision
+);
+
+
+/*
+--
+-- TOC entry 290 (class 1259 OID 6616043)
+-- Name: vrp1_cost; Type: TABLE; Schema: public; Owner: postgres
+--
+
+CREATE TABLE vrp1_cost (
+    src_id integer,
+    dest_id integer,
+    cost double precision,
+    distance double precision,
+    traveltime double precision
+);
+
+
+
+--
+-- TOC entry 291 (class 1259 OID 6616046)
+-- Name: vrp1_gdist; Type: TABLE; Schema: public; Owner: postgres
+--
+
+CREATE TABLE vrp1_gdist (
+    src_id integer,
+    dest_id integer,
+    cost double precision,
+    distance double precision,
+    traveltime double precision
+);
+
+
+--
+-- TOC entry 285 (class 1259 OID 6607823)
+-- Name: vrp1_orders; Type: TABLE; Schema: public; Owner: postgres
+--
+
+CREATE TABLE vrp1_orders (
+    id integer,
+    x numeric,
+    y numeric,
+    order_unit integer,
+    open_time integer,
+    close_time integer,
+    service_time integer
+);
+
+
+
+--
+-- TOC entry 289 (class 1259 OID 6616034)
+-- Name: vrp1_points; Type: TABLE; Schema: public; Owner: postgres
+--
+
+CREATE TABLE vrp1_points (
+    id integer,
+    pid integer,
+    geom geometry(Point,4326),
+    edge_id integer,
+    fraction double precision,
+    closest_node integer
+);
+
+
+--
+-- TOC entry 297 (class 1259 OID 8777648)
+-- Name: vrpdtw_beer; Type: TABLE; Schema: public; Owner: postgres
+--
+
+CREATE TABLE vrpdtw_beer (
+    rid integer,
+    id integer,
+    x double precision,
+    y double precision,
+    opentime integer,
+    closetime integer,
+    servicetime integer,
+    demand integer,
+    pindex integer,
+    dindex integer
+);
+*/
+
+--
+
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 1, 2320738.4688434978, 126348.38967116659, 0, 2, 4, 3448, 2853448, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 3, 2320738.4688434978, 126348.38967116659, 0, 4, 4, 3448, 2853448, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 5, 2320738.4688434978, 126348.38967116659, 0, 6, 4, 3448, 2853448, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 7, 2320738.4688434978, 126348.38967116659, 0, 8, 4, 3448, 2853448, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 9, 2320738.4688434978, 126348.38967116659, 0, 10, 4, 3448, 2853448, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 11, 2320738.4688434978, 126348.38967116659, 0, 12, 4, 3448, 2853448, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 13, 2383186.1525343237, 448251.25888828852, 0, 14, 4, 3463, 2853463, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 15, 2383186.1525343237, 448251.25888828852, 0, 16, 4, 3463, 2853463, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 17, 2383186.1525343237, 448251.25888828852, 0, 18, 4, 3463, 2853463, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 19, 2383186.1525343237, 448251.25888828852, 0, 20, 4, 3463, 2853463, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 21, 2383186.1525343237, 448251.25888828852, 0, 22, 4, 3463, 2853463, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 23, 2383186.1525343237, 448251.25888828852, 0, 24, 4, 3463, 2853463, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 25, 1981144.5525029898, -1903041.2384292425, 0, 26, 2, 3576, 2853576, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 27, 1981144.5525029898, -1903041.2384292425, 0, 28, 2, 3576, 2853576, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 29, 1981144.5525029898, -1903041.2384292425, 0, 30, 2, 3576, 2853576, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 31, 1981144.5525029898, -1903041.2384292425, 0, 32, 2, 3576, 2853576, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 33, 1981144.5525029898, -1903041.2384292425, 0, 34, 2, 3576, 2853576, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 35, 1981144.5525029898, -1903041.2384292425, 0, 36, 2, 3576, 2853576, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 37, 2138409.5568088419, -119451.50568778868, 0, 38, 5, 3624, 2853624, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 39, 2138409.5568088419, -119451.50568778868, 0, 40, 5, 3624, 2853624, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 41, 2138409.5568088419, -119451.50568778868, 0, 42, 5, 3624, 2853624, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 43, 2138409.5568088419, -119451.50568778868, 0, 44, 5, 3624, 2853624, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 45, 2138409.5568088419, -119451.50568778868, 0, 46, 5, 3624, 2853624, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 47, 2138409.5568088419, -119451.50568778868, 0, 48, 5, 3624, 2853624, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 49, 2387491.1007072991, 34459.351848672632, 0, 50, 1, 4265, 2854265, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 51, 2387491.1007072991, 34459.351848672632, 0, 52, 1, 4265, 2854265, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 53, 2387491.1007072991, 34459.351848672632, 0, 54, 1, 4265, 2854265, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 55, 2387491.1007072991, 34459.351848672632, 0, 56, 1, 4265, 2854265, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 57, 2387491.1007072991, 34459.351848672632, 0, 58, 1, 4265, 2854265, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 59, 2387491.1007072991, 34459.351848672632, 0, 60, 1, 4265, 2854265, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 61, 2035310.7411768832, -176076.78362264115, 0, 62, 1, 4355, 2854355, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 63, 2035310.7411768832, -176076.78362264115, 0, 64, 1, 4355, 2854355, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 65, 2035310.7411768832, -176076.78362264115, 0, 66, 1, 4355, 2854355, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 67, 2035310.7411768832, -176076.78362264115, 0, 68, 1, 4355, 2854355, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 69, 2035310.7411768832, -176076.78362264115, 0, 70, 1, 4355, 2854355, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 71, 2035310.7411768832, -176076.78362264115, 0, 72, 1, 4355, 2854355, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 2, 2320738.4688434978, 126348.38967116659, 1, 0, -4, 3448, 6903448, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 4, 2383186.1525343237, 448251.25888828852, 3, 0, -4, 3448, 6903448, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 6, 1981144.5525029898, -1903041.2384292425, 5, 0, -4, 3448, 6903448, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 8, 2138409.5568088419, -119451.50568778868, 7, 0, -4, 3448, 6903448, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 10, 2387491.1007072991, 34459.351848672632, 9, 0, -4, 3448, 6903448, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 12, 2035310.7411768832, -176076.78362264115, 11, 0, -4, 3448, 6903448, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 14, 2320738.4688434978, 126348.38967116659, 13, 0, -4, 3463, 6903463, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 16, 2383186.1525343237, 448251.25888828852, 15, 0, -4, 3463, 6903463, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 18, 1981144.5525029898, -1903041.2384292425, 17, 0, -4, 3463, 6903463, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 20, 2138409.5568088419, -119451.50568778868, 19, 0, -4, 3463, 6903463, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 22, 2387491.1007072991, 34459.351848672632, 21, 0, -4, 3463, 6903463, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 24, 2035310.7411768832, -176076.78362264115, 23, 0, -4, 3463, 6903463, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 26, 2320738.4688434978, 126348.38967116659, 25, 0, -2, 3576, 6903576, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 28, 2383186.1525343237, 448251.25888828852, 27, 0, -2, 3576, 6903576, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 30, 1981144.5525029898, -1903041.2384292425, 29, 0, -2, 3576, 6903576, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 32, 2138409.5568088419, -119451.50568778868, 31, 0, -2, 3576, 6903576, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 34, 2387491.1007072991, 34459.351848672632, 33, 0, -2, 3576, 6903576, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 36, 2035310.7411768832, -176076.78362264115, 35, 0, -2, 3576, 6903576, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 38, 2320738.4688434978, 126348.38967116659, 37, 0, -5, 3624, 6903624, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 40, 2383186.1525343237, 448251.25888828852, 39, 0, -5, 3624, 6903624, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 42, 1981144.5525029898, -1903041.2384292425, 41, 0, -5, 3624, 6903624, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 44, 2138409.5568088419, -119451.50568778868, 43, 0, -5, 3624, 6903624, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 46, 2387491.1007072991, 34459.351848672632, 45, 0, -5, 3624, 6903624, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 48, 2035310.7411768832, -176076.78362264115, 47, 0, -5, 3624, 6903624, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 50, 2320738.4688434978, 126348.38967116659, 49, 0, -1, 4265, 6904265, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 52, 2383186.1525343237, 448251.25888828852, 51, 0, -1, 4265, 6904265, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 54, 1981144.5525029898, -1903041.2384292425, 53, 0, -1, 4265, 6904265, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 56, 2138409.5568088419, -119451.50568778868, 55, 0, -1, 4265, 6904265, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 58, 2387491.1007072991, 34459.351848672632, 57, 0, -1, 4265, 6904265, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 60, 2035310.7411768832, -176076.78362264115, 59, 0, -1, 4265, 6904265, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 62, 2320738.4688434978, 126348.38967116659, 61, 0, -1, 4355, 6904355, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 64, 2383186.1525343237, 448251.25888828852, 63, 0, -1, 4355, 6904355, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 66, 1981144.5525029898, -1903041.2384292425, 65, 0, -1, 4355, 6904355, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 68, 2138409.5568088419, -119451.50568778868, 67, 0, -1, 4355, 6904355, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 70, 2387491.1007072991, 34459.351848672632, 69, 0, -1, 4355, 6904355, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 72, 2035310.7411768832, -176076.78362264115, 71, 0, -1, 4355, 6904355, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 0, 2138409.5568088419, -119451.50568778868, 0, 0, 0, 0, 7200000, 0);
+
+/*
+--
+-- TOC entry 4292 (class 0 OID 6616043)
+-- Dependencies: 290
+-- Data for Name: vrp1_cost; Type: TABLE DATA; Schema: public; Owner: postgres
+--
+
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (12, 13, 2953.093354567417, 60557.741467469998, 49.218222576123615);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (1, 13, 2951.4358855784913, 46704.633074669997, 49.190598092974852);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (5, 13, 1933.2635307127596, 29674.281907879998, 32.22105884521266);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (6, 13, 4891.243355445933, 78590.388493249993, 81.520722590765544);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (7, 13, 4564.0248344551255, 55146.744125789999, 76.067080574252088);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (4, 13, 358.9916907880604, 4717.2985756400003, 5.983194846467673);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (8, 13, 5126.2324354788034, 62516.944979489999, 85.437207257980063);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (3, 13, 6000.6726547073304, 97970.007298349999, 100.01121091178884);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (9, 13, 4755.4348034907207, 100603.89591172, 79.257246724845345);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (10, 13, 4138.1137957014362, 53942.09578946, 68.968563261690605);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (2, 13, 2224.3765052979202, 44388.04507498, 37.072941754965335);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (11, 13, 1469.4570414749417, 17611.434113070001, 24.490950691249029);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (7, 12, 6552.1443518080496, 86875.647316550007, 109.20240586346749);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (6, 12, 3675.7683635329909, 63485.069269129999, 61.262806058883179);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (1, 12, 1826.0827112688785, 21731.213745190002, 30.434711854481307);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (11, 12, 2681.3122972236029, 46309.024619509997, 44.688538287060048);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (2, 12, 1020.3947307304589, 17188.5257222, 17.006578845507651);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (10, 12, 2827.6100244902282, 43710.459317699999, 47.126833741503802);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (3, 12, 3888.0148463653441, 51173.467957710003, 64.800247439422407);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (9, 12, 2302.9311138070507, 41043.449335719997, 38.382185230117514);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (8, 12, 4463.5497447224634, 58891.64477087, 74.39249574537439);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (4, 12, 2647.2156693505872, 59326.863049970001, 44.120261155843117);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (13, 12, 2983.3734066886564, 60557.741467469998, 49.722890111477604);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (5, 12, 1517.9735472205105, 31428.651624779999, 25.29955912034184);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (1, 11, 2745.3112518799626, 37544.1375137, 45.755187531332709);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (9, 11, 4471.1319444284782, 87264.291763329995, 74.518865740474638);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (10, 11, 4229.3311896072573, 52287.419420220001, 70.488853160120954);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (6, 11, 4506.8776151690954, 62551.773221880001, 75.11462691948492);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (3, 11, 5716.3697956450824, 89593.452941569994, 95.272829927418044);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (5, 11, 1358.6096137713382, 15091.14100876, 22.643493562855635);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (4, 11, 1654.544693329585, 19264.633366329999, 27.575744888826417);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (12, 11, 2668.7904955051708, 46309.024619509997, 44.479841591752844);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (2, 11, 1940.0736462356747, 29252.344344699999, 32.334560770594578);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (13, 11, 1469.4570414749414, 17611.434113070001, 24.490950691249022);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (7, 11, 4064.8414892363171, 50747.73846031, 67.74735815393862);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (8, 11, 3895.6963212041123, 47391.047207520001, 64.928272020068533);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (5, 10, 3368.9527734188123, 42809.778697560003, 56.149212890313535);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (7, 10, 8182.3826173823836, 103032.57156053001, 136.37304362303973);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (11, 10, 4258.7560110340182, 52287.419420220001, 70.979266850566972);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (2, 10, 2839.6114198410569, 43099.30820806, 47.326856997350951);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (1, 10, 1802.3572076471451, 23960.724915679999, 30.039286794119086);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (3, 10, 3599.4301883137537, 49681.572728439998, 59.990503138562559);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (9, 10, 4341.7812292867338, 66755.884535439996, 72.363020488112227);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (4, 10, 3856.5004779654537, 49838.427136099999, 64.275007966090897);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (8, 10, 6294.2596511785378, 90390.880059980002, 104.90432751964229);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (6, 10, 5506.4782699890657, 100431.42119920001, 91.77463783315109);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (12, 10, 2855.7053715208308, 43710.459317699999, 47.595089525347177);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (13, 10, 4192.6582153035215, 53942.09578946, 69.877636921725355);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (10, 9, 4325.4261283707883, 66755.884535439996, 72.090435472846465);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (5, 9, 3398.8938935332781, 72255.826813129999, 56.648231558887964);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (2, 9, 2901.3150770432248, 58231.554459619998, 48.35525128405375);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (4, 9, 4528.1360156633564, 98787.207065139999, 75.46893359438927);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (1, 9, 3788.1003008742573, 55624.35354348, 63.135005014570957);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (11, 9, 4562.232643536373, 87264.291763329995, 76.037210725606215);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (8, 9, 4821.657825336647, 92014.350547320006, 80.360963755610783);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (7, 9, 8117.448634400117, 125749.52752643, 135.29081057333528);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (13, 9, 4864.293753001426, 100603.89591172, 81.071562550023771);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (6, 9, 4033.8764441471735, 90244.940354680002, 67.231274069119564);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (12, 9, 2328.9720943505417, 41043.449335719997, 38.81620157250903);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (3, 9, 2403.8510779993576, 33888.802388440003, 40.064184633322625);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (3, 8, 6769.2775240040783, 109943.3259573, 112.82129206673464);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (1, 8, 5019.7492752187654, 67853.964925620006, 83.662487920312756);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (7, 8, 3295.7908090634696, 40898.252999240001, 54.929846817724496);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (2, 8, 3571.0503376979805, 48617.072219770002, 59.517505628299674);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (9, 8, 4729.9553726845033, 92014.350547320006, 78.832589544741722);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (13, 8, 5123.9825769607578, 62516.944979489999, 85.399709616012629);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (6, 8, 1419.3370493081236, 17108.384354760001, 23.655617488468728);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (12, 8, 4462.5946410243814, 58891.64477087, 74.37657735040635);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (5, 8, 3906.5702317981809, 48659.42172359, 65.109503863303019);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (4, 8, 5406.1709302501031, 65640.18822928, 90.102848837501725);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (10, 8, 6449.5678543462845, 90390.880059980002, 107.49279757243808);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (11, 8, 3903.2468943918611, 47391.047207520001, 65.054114906531012);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (12, 7, 6541.7293294122628, 86875.647316550007, 109.02882215687104);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (3, 7, 9589.308629552168, 136345.04018709, 159.82181049253614);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (10, 7, 8189.9389451185689, 103032.57156053001, 136.49898241864281);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (8, 7, 3295.7035800954918, 40898.252999240001, 54.92839300159153);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (11, 7, 4082.2196582153956, 50747.73846031, 68.036994303589921);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (5, 7, 5106.1634678476485, 62318.437049, 85.102724464127476);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (6, 7, 4426.6022183180712, 55437.00628994, 73.776703638634515);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (2, 7, 5813.0124801427592, 71255.008476129995, 96.88354133571265);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (9, 7, 8025.6589527799933, 125749.52752643, 133.76098254633322);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (13, 7, 4565.7908933697781, 55146.744125789999, 76.096514889496305);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (1, 7, 6646.402085744041, 86176.316629309993, 110.77336809573401);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (4, 7, 4924.7825841578369, 59797.006035819999, 82.079709735963945);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (7, 6, 4433.5593311775692, 55437.00628994, 73.89265551962616);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (13, 6, 4943.220062989687, 78590.388493249993, 82.387001049828115);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (12, 6, 3663.4860364258975, 63485.069269129999, 61.058100607098289);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (11, 6, 4496.7745274249164, 62551.773221880001, 74.946242123748604);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (10, 6, 5650.4592497478006, 100431.42119920001, 94.174320829130011);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (9, 6, 3930.8467680860199, 90244.940354680002, 65.514112801433669);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (8, 6, 1427.2238809627568, 17108.384354760001, 23.787064682712614);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (5, 6, 3477.8202035215431, 61063.323590389999, 57.963670058692387);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (4, 6, 4607.0623256516183, 81392.253960899994, 76.784372094193643);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (3, 6, 5970.1689194055944, 112779.81503285001, 99.502815323426574);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (2, 6, 2771.9417330994952, 57379.320287560004, 46.199028884991584);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (1, 6, 4220.6406706202815, 76835.995936859996, 70.344011177004688);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (1, 5, 1958.2616125989289, 23885.506073140001, 32.637693543315478);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (12, 5, 1532.4187981313769, 31428.651624779999, 25.540313302189613);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (8, 5, 3929.4957334296996, 48659.42172359, 65.491595557161659);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (13, 5, 1958.1139397295849, 29674.281907879998, 32.635232328826412);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (7, 5, 5107.3400430688225, 62318.437049, 85.122334051147035);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (10, 5, 3519.5932763961732, 42809.778697560003, 58.659887939936219);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (9, 5, 3334.7602470546817, 72255.826813129999, 55.57933745091136);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (4, 5, 1621.9562023915164, 29275.540332420002, 27.03260337319194);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (2, 5, 803.70194886187926, 14741.93432463, 13.39503248103132);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (3, 5, 4579.9980982712887, 75253.614561519993, 76.333301637854817);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (11, 5, 1337.554729509015, 15091.14100876, 22.292578825150251);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (6, 5, 3470.5687990098932, 61063.323590389999, 57.842813316831553);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (12, 4, 2616.215006867988, 59326.863049970001, 43.603583447799799);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (11, 4, 1655.8289719890095, 19264.633366329999, 27.597149533150159);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (2, 4, 1887.4981575984907, 43746.497693609999, 31.458302626641512);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (7, 4, 4923.0165252431843, 59797.006035819999, 82.050275420719743);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (8, 4, 5342.146388935982, 65640.18822928, 89.035773148933032);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (9, 4, 4418.556455791293, 98787.207065139999, 73.642607596521557);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (13, 4, 358.9916907880604, 4717.2985756400003, 5.983194846467673);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (10, 4, 3801.2354480020076, 49838.427136099999, 63.353924133366796);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (1, 4, 2614.5575378790622, 44139.442491629998, 43.575958964651036);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (3, 4, 5663.7943070079027, 94785.168599109995, 94.396571783465049);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (6, 4, 4554.3650077465054, 81392.253960899994, 75.906083462441757);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (5, 4, 1596.3851830133301, 29275.540332420002, 26.606419716888833);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (12, 3, 4354.0799478841718, 51173.467957710003, 72.567999131402857);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (13, 3, 6464.3892097938715, 97970.007298349999, 107.73982016323119);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (7, 3, 10033.160154913267, 136345.04018709, 167.21933591522111);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (10, 3, 4016.3136218536224, 49681.572728439998, 66.938560364227044);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (11, 3, 6162.3281003288175, 89593.452941569994, 102.70546833881363);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (9, 3, 2746.7160740841282, 33888.802388440003, 45.778601234735468);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (5, 3, 4998.9893503257272, 75253.614561519993, 83.316489172095459);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (8, 3, 7276.4598265076593, 109943.3259573, 121.27433044179432);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (1, 3, 4325.3148995953306, 52145.170245989997, 72.088581659922184);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (4, 3, 6128.2314724558018, 94785.168599109995, 102.1371912075967);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (6, 3, 6488.6784453181817, 112779.81503285001, 108.14464075530303);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (2, 3, 4501.4105338356794, 65153.684267479999, 75.023508897261323);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (1, 2, 1536.6099447776205, 19506.03254122, 25.610165746293674);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (7, 2, 5827.9602822664219, 71255.008476129995, 97.132671371107037);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (8, 2, 3571.4879476634851, 48617.072219770002, 59.524799127724755);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (5, 2, 793.78947767888133, 14741.93432463, 13.229824627981355);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (9, 2, 2787.0688014921589, 58231.554459619998, 46.451146691535982);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (4, 2, 1923.0315998089593, 43746.497693609999, 32.050526663482657);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (10, 2, 2971.9018308336504, 43099.30820806, 49.53169718056084);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (3, 2, 4032.3066527087663, 65153.684267479999, 67.205110878479431);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (11, 2, 1957.1282276819745, 29252.344344699999, 32.618803794699573);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (12, 2, 984.72735256885392, 17188.5257222, 16.412122542814231);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (13, 2, 2259.1893371470278, 44388.04507498, 37.653155619117129);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (6, 2, 2783.7065664740117, 57379.320287560004, 46.395109441233529);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (3, 1, 3909.9615503187342, 52145.170245989997, 65.166025838645567);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (11, 1, 2796.4128490759304, 37544.1375137, 46.606880817932172);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (13, 1, 3063.0403515469643, 46704.633074669997, 51.050672525782737);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (6, 1, 3770.599595643097, 76835.995936859996, 62.843326594051618);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (10, 1, 1806.0013795626483, 23960.724915679999, 30.100022992710805);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (4, 1, 2726.8826142088951, 44139.442491629998, 45.448043570148251);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (9, 1, 3680.3813452318182, 55624.35354348, 61.339689087196966);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (5, 1, 1633.0740990728355, 23885.506073140001, 27.217901651213925);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (7, 1, 6667.2449036603712, 86176.316629309993, 111.12074839433951);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (8, 1, 4558.3809768325664, 67853.964925620006, 75.97301628054278);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (12, 1, 1833.1811824131848, 21731.213745190002, 30.553019706886413);
+INSERT INTO vrp1_cost (src_id, dest_id, cost, distance, traveltime) VALUES (2, 1, 1103.7327454950807, 19506.03254122, 18.395545758251345);
+
+
+--
+-- TOC entry 4293 (class 0 OID 6616046)
+-- Dependencies: 291
+-- Data for Name: vrp1_gdist; Type: TABLE DATA; Schema: public; Owner: postgres
+--
+
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (1, 2, 19506.03254122, 19506.03254122, 0.0065020108470733333);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (1, 3, 52145.170245989997, 52145.170245989997, 0.017381723415329998);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (1, 4, 44139.442491629998, 44139.442491629998, 0.01471314749721);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (1, 5, 23885.506073140001, 23885.506073140001, 0.0079618353577133334);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (1, 6, 76835.995936859996, 76835.995936859996, 0.025611998645620002);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (1, 7, 86176.316629309993, 86176.316629309993, 0.028725438876436662);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (1, 8, 67853.964925620006, 67853.964925620006, 0.022617988308540001);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (1, 9, 55624.35354348, 55624.35354348, 0.018541451181160001);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (1, 10, 23960.724915679999, 23960.724915679999, 0.0079869083052266678);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (1, 11, 37544.1375137, 37544.1375137, 0.012514712504566667);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (1, 12, 21731.213745190002, 21731.213745190002, 0.0072437379150633334);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (1, 13, 46704.633074669997, 46704.633074669997, 0.01556821102489);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (2, 1, 19506.03254122, 19506.03254122, 0.0065020108470733333);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (2, 3, 65153.684267479999, 65153.684267479999, 0.02171789475582667);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (2, 4, 43746.497693609999, 43746.497693609999, 0.01458216589787);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (2, 5, 14741.93432463, 14741.93432463, 0.0049139781082099994);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (2, 6, 57379.320287560004, 57379.320287560004, 0.019126440095853337);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (2, 7, 71255.008476129995, 71255.008476129995, 0.023751669492043333);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (2, 8, 48617.072219770002, 48617.072219770002, 0.016205690739923333);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (2, 9, 58231.554459619998, 58231.554459619998, 0.019410518153206668);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (2, 10, 43099.30820806, 43099.30820806, 0.014366436069353334);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (2, 11, 29252.344344699999, 29252.344344699999, 0.0097507814482333324);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (2, 12, 17188.5257222, 17188.5257222, 0.0057295085740666669);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (2, 13, 44388.04507498, 44388.04507498, 0.014796015024993333);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (3, 1, 52145.170245989997, 52145.170245989997, 0.017381723415329998);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (3, 2, 65153.684267479999, 65153.684267479999, 0.02171789475582667);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (3, 4, 94785.168599109995, 94785.168599109995, 0.031595056199703334);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (3, 5, 75253.614561519993, 75253.614561519993, 0.025084538187173332);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (3, 6, 112779.81503285001, 112779.81503285001, 0.037593271677616676);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (3, 7, 136345.04018709, 136345.04018709, 0.045448346729030004);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (3, 8, 109943.3259573, 109943.3259573, 0.036647775319099997);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (3, 9, 33888.802388440003, 33888.802388440003, 0.011296267462813335);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (3, 10, 49681.572728439998, 49681.572728439998, 0.016560524242813332);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (3, 11, 89593.452941569994, 89593.452941569994, 0.029864484313856667);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (3, 12, 51173.467957710003, 51173.467957710003, 0.017057822652570002);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (3, 13, 97970.007298349999, 97970.007298349999, 0.032656669099449996);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (4, 1, 44139.442491629998, 44139.442491629998, 0.01471314749721);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (4, 2, 43746.497693609999, 43746.497693609999, 0.01458216589787);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (4, 3, 94785.168599109995, 94785.168599109995, 0.031595056199703334);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (4, 5, 29275.540332420002, 29275.540332420002, 0.0097585134441400007);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (4, 6, 81392.253960899994, 81392.253960899994, 0.0271307513203);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (4, 7, 59797.006035819999, 59797.006035819999, 0.019932335345273333);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (4, 8, 65640.18822928, 65640.18822928, 0.021880062743093332);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (4, 9, 98787.207065139999, 98787.207065139999, 0.032929069021713331);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (4, 10, 49838.427136099999, 49838.427136099999, 0.016612809045366668);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (4, 11, 19264.633366329999, 19264.633366329999, 0.0064215444554433336);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (4, 12, 59326.863049970001, 59326.863049970001, 0.019775621016656666);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (4, 13, 4717.2985756400003, 4717.2985756400003, 0.0015724328585466666);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (5, 1, 23885.506073140001, 23885.506073140001, 0.0079618353577133334);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (5, 2, 14741.93432463, 14741.93432463, 0.0049139781082099994);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (5, 3, 75253.614561519993, 75253.614561519993, 0.025084538187173332);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (5, 4, 29275.540332420002, 29275.540332420002, 0.0097585134441400007);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (5, 6, 61063.323590389999, 61063.323590389999, 0.020354441196796667);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (5, 7, 62318.437049, 62318.437049, 0.020772812349666669);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (5, 8, 48659.42172359, 48659.42172359, 0.016219807241196666);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (5, 9, 72255.826813129999, 72255.826813129999, 0.024085275604376667);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (5, 10, 42809.778697560003, 42809.778697560003, 0.014269926232520002);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (5, 11, 15091.14100876, 15091.14100876, 0.0050303803362533334);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (5, 12, 31428.651624779999, 31428.651624779999, 0.010476217208259999);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (5, 13, 29674.281907879998, 29674.281907879998, 0.0098914273026266646);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (6, 1, 76835.995936859996, 76835.995936859996, 0.025611998645620002);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (6, 2, 57379.320287560004, 57379.320287560004, 0.019126440095853337);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (6, 3, 112779.81503285001, 112779.81503285001, 0.037593271677616676);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (6, 4, 81392.253960899994, 81392.253960899994, 0.0271307513203);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (6, 5, 61063.323590389999, 61063.323590389999, 0.020354441196796667);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (6, 7, 55437.00628994, 55437.00628994, 0.018479002096646668);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (6, 8, 17108.384354760001, 17108.384354760001, 0.0057027947849200003);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (6, 9, 90244.940354680002, 90244.940354680002, 0.030081646784893331);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (6, 10, 100431.42119920001, 100431.42119920001, 0.033477140399733339);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (6, 11, 62551.773221880001, 62551.773221880001, 0.020850591073959999);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (6, 12, 63485.069269129999, 63485.069269129999, 0.021161689756376667);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (6, 13, 78590.388493249993, 78590.388493249993, 0.026196796164416662);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (7, 1, 86176.316629309993, 86176.316629309993, 0.028725438876436662);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (7, 2, 71255.008476129995, 71255.008476129995, 0.023751669492043333);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (7, 3, 136345.04018709, 136345.04018709, 0.045448346729030004);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (7, 4, 59797.006035819999, 59797.006035819999, 0.019932335345273333);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (7, 5, 62318.437049, 62318.437049, 0.020772812349666669);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (7, 6, 55437.00628994, 55437.00628994, 0.018479002096646668);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (7, 8, 40898.252999240001, 40898.252999240001, 0.013632750999746666);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (7, 9, 125749.52752643, 125749.52752643, 0.041916509175476666);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (7, 10, 103032.57156053001, 103032.57156053001, 0.034344190520176669);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (7, 11, 50747.73846031, 50747.73846031, 0.016915912820103334);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (7, 12, 86875.647316550007, 86875.647316550007, 0.028958549105516665);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (7, 13, 55146.744125789999, 55146.744125789999, 0.018382248041930001);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (8, 1, 67853.964925620006, 67853.964925620006, 0.022617988308540001);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (8, 2, 48617.072219770002, 48617.072219770002, 0.016205690739923333);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (8, 3, 109943.3259573, 109943.3259573, 0.036647775319099997);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (8, 4, 65640.18822928, 65640.18822928, 0.021880062743093332);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (8, 5, 48659.42172359, 48659.42172359, 0.016219807241196666);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (8, 6, 17108.384354760001, 17108.384354760001, 0.0057027947849200003);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (8, 7, 40898.252999240001, 40898.252999240001, 0.013632750999746666);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (8, 9, 92014.350547320006, 92014.350547320006, 0.030671450182440003);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (8, 10, 90390.880059980002, 90390.880059980002, 0.030130293353326669);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (8, 11, 47391.047207520001, 47391.047207520001, 0.015797015735840001);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (8, 12, 58891.64477087, 58891.64477087, 0.019630548256956665);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (8, 13, 62516.944979489999, 62516.944979489999, 0.020838981659829999);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (9, 1, 55624.35354348, 55624.35354348, 0.018541451181160001);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (9, 2, 58231.554459619998, 58231.554459619998, 0.019410518153206668);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (9, 3, 33888.802388440003, 33888.802388440003, 0.011296267462813335);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (9, 4, 98787.207065139999, 98787.207065139999, 0.032929069021713331);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (9, 5, 72255.826813129999, 72255.826813129999, 0.024085275604376667);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (9, 6, 90244.940354680002, 90244.940354680002, 0.030081646784893331);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (9, 7, 125749.52752643, 125749.52752643, 0.041916509175476666);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (9, 8, 92014.350547320006, 92014.350547320006, 0.030671450182440003);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (9, 10, 66755.884535439996, 66755.884535439996, 0.022251961511813335);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (9, 11, 87264.291763329995, 87264.291763329995, 0.029088097254443331);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (9, 12, 41043.449335719997, 41043.449335719997, 0.013681149778573333);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (9, 13, 100603.89591172, 100603.89591172, 0.033534631970573339);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (10, 1, 23960.724915679999, 23960.724915679999, 0.0079869083052266678);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (10, 2, 43099.30820806, 43099.30820806, 0.014366436069353334);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (10, 3, 49681.572728439998, 49681.572728439998, 0.016560524242813332);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (10, 4, 49838.427136099999, 49838.427136099999, 0.016612809045366668);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (10, 5, 42809.778697560003, 42809.778697560003, 0.014269926232520002);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (10, 6, 100431.42119920001, 100431.42119920001, 0.033477140399733339);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (10, 7, 103032.57156053001, 103032.57156053001, 0.034344190520176669);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (10, 8, 90390.880059980002, 90390.880059980002, 0.030130293353326669);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (10, 9, 66755.884535439996, 66755.884535439996, 0.022251961511813335);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (10, 11, 52287.419420220001, 52287.419420220001, 0.017429139806740001);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (10, 12, 43710.459317699999, 43710.459317699999, 0.014570153105900001);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (10, 13, 53942.09578946, 53942.09578946, 0.017980698596486665);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (11, 1, 37544.1375137, 37544.1375137, 0.012514712504566667);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (11, 2, 29252.344344699999, 29252.344344699999, 0.0097507814482333324);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (11, 3, 89593.452941569994, 89593.452941569994, 0.029864484313856667);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (11, 4, 19264.633366329999, 19264.633366329999, 0.0064215444554433336);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (11, 5, 15091.14100876, 15091.14100876, 0.0050303803362533334);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (11, 6, 62551.773221880001, 62551.773221880001, 0.020850591073959999);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (11, 7, 50747.73846031, 50747.73846031, 0.016915912820103334);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (11, 8, 47391.047207520001, 47391.047207520001, 0.015797015735840001);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (11, 9, 87264.291763329995, 87264.291763329995, 0.029088097254443331);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (11, 10, 52287.419420220001, 52287.419420220001, 0.017429139806740001);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (11, 12, 46309.024619509997, 46309.024619509997, 0.015436341539836666);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (11, 13, 17611.434113070001, 17611.434113070001, 0.0058704780376900006);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (12, 1, 21731.213745190002, 21731.213745190002, 0.0072437379150633334);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (12, 2, 17188.5257222, 17188.5257222, 0.0057295085740666669);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (12, 3, 51173.467957710003, 51173.467957710003, 0.017057822652570002);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (12, 4, 59326.863049970001, 59326.863049970001, 0.019775621016656666);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (12, 5, 31428.651624779999, 31428.651624779999, 0.010476217208259999);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (12, 6, 63485.069269129999, 63485.069269129999, 0.021161689756376667);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (12, 7, 86875.647316550007, 86875.647316550007, 0.028958549105516665);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (12, 8, 58891.64477087, 58891.64477087, 0.019630548256956665);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (12, 9, 41043.449335719997, 41043.449335719997, 0.013681149778573333);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (12, 10, 43710.459317699999, 43710.459317699999, 0.014570153105900001);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (12, 11, 46309.024619509997, 46309.024619509997, 0.015436341539836666);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (12, 13, 60557.741467469998, 60557.741467469998, 0.020185913822489999);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (13, 1, 46704.633074669997, 46704.633074669997, 0.01556821102489);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (13, 2, 44388.04507498, 44388.04507498, 0.014796015024993333);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (13, 3, 97970.007298349999, 97970.007298349999, 0.032656669099449996);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (13, 4, 4717.2985756400003, 4717.2985756400003, 0.0015724328585466666);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (13, 5, 29674.281907879998, 29674.281907879998, 0.0098914273026266646);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (13, 6, 78590.388493249993, 78590.388493249993, 0.026196796164416662);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (13, 7, 55146.744125789999, 55146.744125789999, 0.018382248041930001);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (13, 8, 62516.944979489999, 62516.944979489999, 0.020838981659829999);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (13, 9, 100603.89591172, 100603.89591172, 0.033534631970573339);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (13, 10, 53942.09578946, 53942.09578946, 0.017980698596486665);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (13, 11, 17611.434113070001, 17611.434113070001, 0.0058704780376900006);
+INSERT INTO vrp1_gdist (src_id, dest_id, cost, distance, traveltime) VALUES (13, 12, 60557.741467469998, 60557.741467469998, 0.020185913822489999);
+
+
+--
+-- TOC entry 4290 (class 0 OID 6607823)
+-- Dependencies: 285
+-- Data for Name: vrp1_orders; Type: TABLE DATA; Schema: public; Owner: postgres
+--
+
+INSERT INTO vrp1_orders (id, x, y, order_unit, open_time, close_time, service_time) VALUES (1, -72.892400, 41.668920, 25, 60, 780, 20);
+INSERT INTO vrp1_orders (id, x, y, order_unit, open_time, close_time, service_time) VALUES (2, -72.676150, 41.601650, 25, 60, 780, 20);
+INSERT INTO vrp1_orders (id, x, y, order_unit, open_time, close_time, service_time) VALUES (3, -73.413760, 41.410080, 25, 60, 780, 20);
+INSERT INTO vrp1_orders (id, x, y, order_unit, open_time, close_time, service_time) VALUES (4, -72.576340, 41.988370, 25, 60, 780, 20);
+INSERT INTO vrp1_orders (id, x, y, order_unit, open_time, close_time, service_time) VALUES (5, -72.615920, 41.726460, 25, 60, 780, 20);
+INSERT INTO vrp1_orders (id, x, y, order_unit, open_time, close_time, service_time) VALUES (6, -72.066830, 41.362980, 25, 60, 780, 20);
+INSERT INTO vrp1_orders (id, x, y, order_unit, open_time, close_time, service_time) VALUES (7, -71.882488, 41.842557, 25, 60, 780, 20);
+INSERT INTO vrp1_orders (id, x, y, order_unit, open_time, close_time, service_time) VALUES (8, -72.105080, 41.514310, 25, 60, 780, 20);
+INSERT INTO vrp1_orders (id, x, y, order_unit, open_time, close_time, service_time) VALUES (9, -73.121820, 41.198780, 25, 60, 780, 20);
+INSERT INTO vrp1_orders (id, x, y, order_unit, open_time, close_time, service_time) VALUES (10, -73.121310, 41.799840, 25, 60, 780, 20);
+INSERT INTO vrp1_orders (id, x, y, order_unit, open_time, close_time, service_time) VALUES (11, -72.493050, 41.826470, 250, 60, 780, 20);
+INSERT INTO vrp1_orders (id, x, y, order_unit, open_time, close_time, service_time) VALUES (12, -72.809200, 41.483500, 25, 60, 780, 20);
+INSERT INTO vrp1_orders (id, x, y, order_unit, open_time, close_time, service_time) VALUES (13, -72.51975, 41.98377, 0, 0, 800, 0);
+
+
+--
+-- TOC entry 4291 (class 0 OID 6616034)
+-- Dependencies: 289
+-- Data for Name: vrp1_points; Type: TABLE DATA; Schema: public; Owner: postgres
+--
+
+INSERT INTO vrp1_points (id, pid, geom, edge_id, fraction, closest_node) VALUES (1, -1, '0101000020E6100000D3BCE3141D3952C0F6D1A92B9FD54440', 134983, 0.38479479629572311, 69021);
+INSERT INTO vrp1_points (id, pid, geom, edge_id, fraction, closest_node) VALUES (2, -2, '0101000020E6100000304CA60A462B52C0B7D100DE02CD4440', 156235, 0.60081527076326913, 174662);
+INSERT INTO vrp1_points (id, pid, geom, edge_id, fraction, closest_node) VALUES (3, -3, '0101000020E61000002619390B7B5A52C0315F5E807DB44440', 155907, 0.60929293991596534, 127670);
+INSERT INTO vrp1_points (id, pid, geom, edge_id, fraction, closest_node) VALUES (4, -4, '0101000020E61000001BD82AC1E22452C07C2C7DE882FE4440', 82159, 0.1088234404534253, 56829);
+INSERT INTO vrp1_points (id, pid, geom, edge_id, fraction, closest_node) VALUES (5, -5, '0101000020E6100000F33CB83B6B2752C014ED2AA4FCDC4440', 226752, 0.87665768706747127, 129246);
+INSERT INTO vrp1_points (id, pid, geom, edge_id, fraction, closest_node) VALUES (6, -6, '0101000020E6100000111956F1460452C0118DEE2076AE4440', 133685, 0.91338793111615413, 28564);
+INSERT INTO vrp1_points (id, pid, geom, edge_id, fraction, closest_node) VALUES (7, -7, '0101000020E610000032C7F2AE7AF851C0080264E8D8EB4440', 263400, 0.83072231921053108, 196779);
+INSERT INTO vrp1_points (id, pid, geom, edge_id, fraction, closest_node) VALUES (8, -8, '0101000020E6100000ADDD76A1B90652C0BD00FBE8D4C14440', 47970, 0.21514413450004088, 25658);
+INSERT INTO vrp1_points (id, pid, geom, edge_id, fraction, closest_node) VALUES (9, -9, '0101000020E6100000EBFF1CE6CB4752C0A88C7F9F71994440', 30632, 0.85391427066903536, 20036);
+INSERT INTO vrp1_points (id, pid, geom, edge_id, fraction, closest_node) VALUES (10, -10, '0101000020E610000060AB048BC34752C02E04392861E64440', 231149, 0.50999310422417587, 153595);
+INSERT INTO vrp1_points (id, pid, geom, edge_id, fraction, closest_node) VALUES (11, -11, '0101000020E6100000BD5296218E1F52C00490DAC4C9E94440', 152917, 0.70955464807036772, 159294);
+INSERT INTO vrp1_points (id, pid, geom, edge_id, fraction, closest_node) VALUES (12, -12, '0101000020E610000016FBCBEEC93352C0D9CEF753E3BD4440', 235710, 0.44298119784627749, 124069);
+INSERT INTO vrp1_points (id, pid, geom, edge_id, fraction, closest_node) VALUES (13, -13, '0101000020E610000025068195432152C09964E42CECFD4440', 220656, 0.77224957554563523, 120633);
+
+
+--
+-- TOC entry 4295 (class 0 OID 8777648)
+-- Dependencies: 297
+-- Data for Name: vrpdtw_beer; Type: TABLE DATA; Schema: public; Owner: postgres
+--
+
+INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (0, 0, 2219223.0599095495, 43261.330613416343, 0, 780, 0, 0, 0, 0);
+INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (0, 1, 2219223.0599095495, 43261.330613416343, 0, 780, 0, 50, 0, 2);
+INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (0, 3, 2219223.0599095495, 43261.330613416343, 0, 780, 0, 50, 0, 4);
+INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (0, 5, 2219223.0599095495, 43261.330613416343, 0, 780, 0, 50, 0, 6);
+INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (0, 7, 2219223.0599095495, 43261.330613416343, 0, 780, 0, 50, 0, 8);
+INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (0, 9, 2219223.0599095495, 43261.330613416343, 0, 780, 0, 50, 0, 10);
+INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (0, 11, 2219223.0599095495, 43261.330613416343, 0, 780, 0, 50, 0, 12);
+INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (0, 13, 2219223.0599095495, 43261.330613416343, 0, 780, 0, 50, 0, 14);
+INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (0, 15, 2219223.0599095495, 43261.330613416343, 0, 780, 0, 50, 0, 16);
+INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (0, 17, 2219223.0599095495, 43261.330613416343, 0, 780, 0, 50, 0, 18);
+INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (0, 19, 2219223.0599095495, 43261.330613416343, 0, 780, 0, 50, 0, 20);
+INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (0, 21, 2219223.0599095495, 43261.330613416343, 0, 780, 0, 200, 0, 22);
+INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (0, 23, 2219223.0599095495, 43261.330613416343, 0, 780, 0, 50, 0, 24);
+INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (1, 2, 2201674.04542425, -537.96920408041944, 0, 780, 0, -50, 1, 0);
+INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (2, 4, 2220804.1661061305, -1824.0976658091467, 0, 780, 0, -50, 3, 0);
+INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (3, 6, 2170182.7454079189, -42278.887298092624, 0, 780, 0, -50, 5, 0);
+INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (4, 8, 2214706.3217116385, 42201.317464497493, 0, 780, 0, -50, 7, 0);
+INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (5, 10, 2221020.0081376741, 13156.086760460585, 0, 780, 0, -50, 9, 0);
+INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (6, 12, 2276566.54710769, -10390.65374555897, 0, 780, 0, -50, 11, 0);
+INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (7, 14, 2273317.2298506126, 45902.567392510609, 0, 780, 0, -50, 13, 0);
+INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (8, 16, 2268126.8554679737, 4674.1135220944607, 0, 780, 0, -50, 15, 0);
+INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (9, 18, 2200293.6413550111, -57036.325719941706, 0, 780, 0, -50, 17, 0);
+INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (10, 20, 2179348.5807632855, 7268.5531586333609, 0, 780, 0, -50, 19, 0);
+INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (11, 22, 2226924.5635206043, 27207.476487862386, 0, 780, 0, -200, 21, 0);
+INSERT INTO vrpdtw_beer (rid, id, x, y, opentime, closetime, servicetime, demand, pindex, dindex) VALUES (12, 24, 2214670.8347013257, -18087.138344661518, 0, 780, 0, -50, 23, 0);
+*/
+
+/*
+SELECT * FROM pgr_gsoc_vrppdtw(
+    $$ SELECT * FROM jet_customers $$,
+    2, 5);
+
+SELECT * FROM _pgr_pickDeliver(
+    $$ SELECT * FROM jet_customers $$,
+    2, 5);
+
+SELECT * FROM _pgr_pickDeliver(
+    $$ SELECT * FROM jet_customers $$,
+    max_vehicles := 2, capacity :=5, speed := 1);
+*/
+
+/*
+-- converting data to use euclidean
+UPDATE jet_customers SET opentime = 9*60 WHERE opentime = 3448;
+UPDATE jet_customers SET opentime = 9.5*60 WHERE opentime = 3463;
+UPDATE jet_customers SET opentime = 10*60 WHERE opentime = 3576;
+UPDATE jet_customers SET opentime = 10.5*60 WHERE opentime = 3624;
+UPDATE jet_customers SET opentime = 11*60 WHERE opentime = 4265;
+UPDATE jet_customers SET opentime = 11.5*60 WHERE opentime = 4355;
+
+UPDATE jet_customers SET closetime = 11*60 WHERE closetime = 2853448;
+UPDATE jet_customers SET closetime = 11.5*60 WHERE closetime = 2853463;
+UPDATE jet_customers SET closetime = 12*60 WHERE closetime = 2853576;
+UPDATE jet_customers SET closetime = 12.5*60 WHERE closetime = 2853624;
+UPDATE jet_customers SET closetime = 13*60 WHERE closetime = 2854265;
+UPDATE jet_customers SET closetime = 13.5*60 WHERE closetime = 2854355;
+UPDATE jet_customers SET closetime = 14*60 WHERE closetime = 6903448;
+UPDATE jet_customers SET closetime = 14.5*60 WHERE closetime = 6903463;
+UPDATE jet_customers SET closetime = 15*60 WHERE closetime = 6903576;
+UPDATE jet_customers SET closetime = 15.5*60 WHERE closetime = 6903624;
+UPDATE jet_customers SET closetime = 16*60 WHERE closetime = 6904265;
+UPDATE jet_customers SET closetime = 16.5*60 WHERE closetime = 6904355;
+
+UPDATE jet_customers SET servicetime = 2 WHERE servicetime != 0;
+
+WITH
+customer_data AS (SELECT * FROM jet_customers),
+pickups AS (
+    SELECT id, demand, x as pick_x, y as pick_y, opentime as pick_open, closetime as pick_close, servicetime as pick_service
+    FROM  customer_data WHERE pindex = 0 AND id != 0
+),
+deliveries AS (
+    SELECT pindex AS id, x as deliver_x, y as deliver_y, opentime as deliver_open, closetime as deliver_close, servicetime as deliver_service
+    FROM  customer_data WHERE dindex = 0 AND id != 0
+)
+SELECT * INTO jet_orders FROM pickups JOIN deliveries USING(id) ORDER BY pickups.id;
+
+WITH
+customer_data AS (select * from jet_customers)
+SELECT id, x AS start_x, y AS start_y,
+opentime AS start_open, closetime AS start_close,
+2 AS capacity,  5  AS number INTO jet_vehicles
+FROM customer_data WHERE id = 0 LIMIT 1;
+
+SELECT *
+FROM _pgr_pickDeliverEuclidean(
+    $$ SELECT * from jet_orders $$,
+    $$ SELECT * FROM jet_vehicles$$
+);
+*/
+
diff --git a/test/pickDeliver/design_pgtap.result b/test/pickDeliver/design_pgtap.result
new file mode 100644
index 0000000..64513af
--- /dev/null
+++ b/test/pickDeliver/design_pgtap.result
@@ -0,0 +1,23 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+UPDATE vehicles SET start_open = 5, start_close = 4 WHERE id = 1;
+UPDATE 1
+SELECT * FROM _pgr_pickDeliverEuclidean(
+    $$SELECT * FROM orders$$,
+    $$SELECT * FROM vehicles$$);
+ERROR:  Illegal values found on vehicle
+HINT:  Illegal values found on vehicleOn vehicle 1 a condition is not met:
+starting_site.is_start: NO
+ending_site.is_end: NO
+verify that:
+-  start_open <= start_close: 5<4
+-  end_open <= end_close: 5<4
+-  capacity > 0
+--> pgrouting::vrp::Pgr_pickDeliver::Pgr_pickDeliver(const std::vector<PickDeliveryOrders_t>&, const std::vector<Vehicle_t>&, double, size_t, int)
+
+UPDATE vehicles SET start_open = 0, start_close = 50 WHERE id = 1;
+ERROR:  current transaction is aborted, commands ignored until end of transaction block
+ROLLBACK;
+ROLLBACK
diff --git a/src/pickDeliver/test/design_pgtap.test.sql b/test/pickDeliver/design_pgtap.test.sql
similarity index 100%
rename from src/pickDeliver/test/design_pgtap.test.sql
rename to test/pickDeliver/design_pgtap.test.sql
diff --git a/src/pickDeliver/test/differentVechiles-cygwin.result b/test/pickDeliver/differentVechiles-cygwin.result
similarity index 100%
rename from src/pickDeliver/test/differentVechiles-cygwin.result
rename to test/pickDeliver/differentVechiles-cygwin.result
diff --git a/test/pickDeliver/differentVechiles-cygwin.test.sql b/test/pickDeliver/differentVechiles-cygwin.test.sql
new file mode 100644
index 0000000..5b29692
--- /dev/null
+++ b/test/pickDeliver/differentVechiles-cygwin.test.sql
@@ -0,0 +1,37 @@
+
+
+INSERT into vehicles(start_x, start_y, start_open, start_close, capacity, number)
+VALUES (40, 50, 0, 400, 200, 1);
+
+UPDATE vehicles SET number = 1;
+
+ALTER TABLE vehicles DROP COLUMN number;
+
+SELECT * INTO results
+FROM _pgr_pickDeliverEuclidean(
+    'SELECT * FROM orders ORDER BY id',
+    'SELECT * FROM vehicles',
+    30);
+
+
+WITH
+orders_id AS (
+    SELECT id FROM orders
+),
+results_id AS (
+    SELECT DISTINCT order_id AS id
+    FROM results
+    WHERE stop_type NOT IN (1, 6, -1)
+    ORDER BY order_id
+)
+SELECT count(*)=53 FROM orders_id LEFT JOIN results_id USING(ID);
+
+WITH
+the_results AS (
+    SELECT *
+    FROM results
+)
+SELECT ((SELECT max(vehicle_number) FROM results) * 2 + 53 * 2 + 1) =
+    (SELECT count(*) from the_results) AS correct_value;
+
+-- SELECT * FROM results;
diff --git a/test/pickDeliver/differentVechiles.result b/test/pickDeliver/differentVechiles.result
new file mode 100644
index 0000000..d643efc
--- /dev/null
+++ b/test/pickDeliver/differentVechiles.result
@@ -0,0 +1,230 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+INSERT into vehicles(start_x, start_y, start_open, start_close, capacity, number)
+VALUES (40, 50, 0, 400, 200, 25);
+INSERT 0 1
+SELECT * FROM _pgr_pickDeliverEuclidean(
+    'SELECT * FROM orders ORDER BY id',
+    'SELECT * FROM vehicles',
+    30);
+ seq | vehicle_number | vehicle_id | vehicle_seq | order_id | stop_type | cargo |   travel_time    |   arrival_time   | wait_time | service_time |  departure_time
+-----+----------------+------------+-------------+----------+-----------+-------+------------------+------------------+-----------+--------------+------------------
+   1 |              1 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
+   2 |              1 |          1 |           2 |        5 |         2 |    10 | 15.1327459504216 | 15.1327459504216 |         0 |           90 | 105.132745950422
+   3 |              1 |          1 |           3 |        3 |         2 |    20 |                1 | 106.132745950422 |         0 |           90 | 196.132745950422
+   4 |              1 |          1 |           4 |        5 |         3 |    10 |                2 | 198.132745950422 |         0 |           90 | 288.132745950422
+   5 |              1 |          1 |           5 |        8 |         2 |    30 | 2.82842712474619 | 290.961173075168 |         0 |           90 | 380.961173075168
+   6 |              1 |          1 |           6 |        8 |         3 |    10 | 3.60555127546399 | 384.566724350632 |         0 |           90 | 474.566724350632
+   7 |              1 |          1 |           7 |       11 |         2 |    20 |                3 | 477.566724350632 |         0 |           90 | 567.566724350632
+   8 |              1 |          1 |           8 |        9 |         2 |    30 | 3.16227766016838 |   570.7290020108 |         0 |           90 |   660.7290020108
+   9 |              1 |          1 |           9 |        6 |         2 |    50 | 2.23606797749979 |   662.9650699883 |         0 |           90 |   752.9650699883
+  10 |              1 |          1 |          10 |        9 |         3 |    40 | 2.23606797749979 |   755.2011379658 |         0 |           90 |   845.2011379658
+  11 |              1 |          1 |          11 |        6 |         3 |    20 | 3.60555127546399 | 848.806689241264 |         0 |           90 | 938.806689241264
+  12 |              1 |          1 |          12 |       11 |         3 |    10 |                2 | 940.806689241264 |         0 |           90 | 1030.80668924126
+  13 |              1 |          1 |          13 |        3 |         3 |     0 |                3 | 1033.80668924126 |         0 |           90 | 1123.80668924126
+  14 |              1 |          1 |          14 |       -1 |         6 |     0 | 15.8113883008419 | 1139.61807754211 |         0 |            0 | 1139.61807754211
+  15 |              2 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
+  16 |              2 |          1 |           2 |       13 |         2 |    30 | 30.8058436014987 | 30.8058436014987 |         0 |           90 | 120.805843601499
+  17 |              2 |          1 |           3 |       13 |         3 |     0 |                4 | 124.805843601499 |         0 |           90 | 214.805843601499
+  18 |              2 |          1 |           4 |       18 |         2 |    20 |                3 | 217.805843601499 |         0 |           90 | 307.805843601499
+  19 |              2 |          1 |           5 |       19 |         2 |    30 |                5 | 312.805843601499 |         0 |           90 | 402.805843601499
+  20 |              2 |          1 |           6 |       19 |         3 |    20 |                5 | 407.805843601499 |         0 |           90 | 497.805843601499
+  21 |              2 |          1 |           7 |       16 |         2 |    60 |                5 | 502.805843601499 |         0 |           90 | 592.805843601499
+  22 |              2 |          1 |           8 |       16 |         3 |    20 |                2 | 594.805843601499 |         0 |           90 | 684.805843601499
+  23 |              2 |          1 |           9 |       18 |         3 |     0 |                3 | 687.805843601499 |         0 |           90 | 777.805843601499
+  24 |              2 |          1 |          10 |       50 |         2 |    10 | 53.0094331227943 | 830.815276724293 |         0 |           90 | 920.815276724293
+  25 |              2 |          1 |          11 |       50 |         3 |     0 | 3.16227766016838 | 923.977554384461 |         0 |           90 | 1013.97755438446
+  26 |              2 |          1 |          12 |       49 |         2 |    10 |                3 | 1016.97755438446 |         0 |           90 | 1106.97755438446
+  27 |              2 |          1 |          13 |       49 |         3 |     0 |                2 | 1108.97755438446 |         0 |           90 | 1198.97755438446
+  28 |              2 |          1 |          14 |       -1 |         6 |     0 | 18.0277563773199 | 1217.00531076178 |         0 |            0 | 1217.00531076178
+  29 |              3 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
+  30 |              3 |          1 |           2 |       20 |         2 |    10 |               10 |               10 |         0 |           90 |              100
+  31 |              3 |          1 |           3 |       20 |         3 |     0 |                5 |              105 |         0 |           90 |              195
+  32 |              3 |          1 |           4 |       25 |         2 |    40 |                2 |              197 |         0 |           90 |              287
+  33 |              3 |          1 |           5 |       25 |         3 |     0 |                2 |              289 |         0 |           90 |              379
+  34 |              3 |          1 |           6 |       29 |         2 |    10 | 3.60555127546399 | 382.605551275464 |         0 |           90 | 472.605551275464
+  35 |              3 |          1 |           7 |       30 |         2 |    20 |                5 | 477.605551275464 |         0 |           90 | 567.605551275464
+  36 |              3 |          1 |           8 |       28 |         2 |    40 |                3 | 570.605551275464 |         0 |           90 | 660.605551275464
+  37 |              3 |          1 |           9 |       29 |         3 |    30 |                2 | 662.605551275464 |         0 |           90 | 752.605551275464
+  38 |              3 |          1 |          10 |       23 |         2 |    40 |                3 | 755.605551275464 |         0 |            0 | 755.605551275464
+  39 |              3 |          1 |          11 |       23 |         3 |    30 |                0 | 755.605551275464 |         0 |           90 | 845.605551275464
+  40 |              3 |          1 |          12 |       28 |         3 |    10 |                3 | 848.605551275464 |         0 |           90 | 938.605551275464
+  41 |              3 |          1 |          13 |       30 |         3 |     0 |                2 | 940.605551275464 |         0 |           90 | 1030.60555127546
+  42 |              3 |          1 |          14 |       -1 |         6 |     0 | 10.1980390271856 | 1040.80359030265 |         0 |            0 | 1040.80359030265
+  43 |              4 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
+  44 |              4 |          1 |           2 |       32 |         2 |    30 | 31.6227766016838 | 31.6227766016838 |         0 |           90 | 121.622776601684
+  45 |              4 |          1 |           3 |       33 |         2 |    70 |                2 | 123.622776601684 |         0 |           90 | 213.622776601684
+  46 |              4 |          1 |           4 |       32 |         3 |    40 |  5.3851648071345 | 219.007941408818 |         0 |           90 | 309.007941408818
+  47 |              4 |          1 |           5 |       35 |         2 |    50 |                5 | 314.007941408818 |         0 |           90 | 404.007941408818
+  48 |              4 |          1 |           6 |       33 |         3 |    10 |  5.8309518948453 | 409.838893303664 |         0 |           90 | 499.838893303664
+  49 |              4 |          1 |           7 |       38 |         2 |    40 |                2 | 501.838893303664 |         0 |           90 | 591.838893303664
+  50 |              4 |          1 |           8 |       35 |         3 |    30 |                5 | 596.838893303664 |         0 |           90 | 686.838893303664
+  51 |              4 |          1 |           9 |       36 |         2 |    40 |                5 | 691.838893303664 |         0 |            0 | 691.838893303664
+  52 |              4 |          1 |          10 |       36 |         3 |    30 |                0 | 691.838893303664 |         0 |           90 | 781.838893303664
+  53 |              4 |          1 |          11 |       38 |         3 |     0 |                3 | 784.838893303664 |         0 |           90 | 874.838893303664
+  54 |              4 |          1 |          12 |       -1 |         6 |     0 | 32.3882694814033 | 907.227162785067 |         0 |            0 | 907.227162785067
+  55 |              5 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
+  56 |              5 |          1 |           2 |       43 |         2 |    10 | 16.5529453572468 | 16.5529453572468 |         0 |           90 | 106.552945357247
+  57 |              5 |          1 |           3 |       42 |         2 |    30 |                3 | 109.552945357247 |         0 |           90 | 199.552945357247
+  58 |              5 |          1 |           4 |       43 |         3 |    20 |                2 | 201.552945357247 |         0 |           90 | 291.552945357247
+  59 |              5 |          1 |           5 |       42 |         3 |     0 |                2 | 293.552945357247 |         0 |           90 | 383.552945357247
+  60 |              5 |          1 |           6 |       44 |         2 |    10 |                3 | 386.552945357247 |         0 |           90 | 476.552945357247
+  61 |              5 |          1 |           7 |       44 |         3 |     0 | 2.82842712474619 | 479.381372481993 |         0 |           90 | 569.381372481993
+  62 |              5 |          1 |           8 |       45 |         2 |    10 |                2 | 571.381372481993 |         0 |           90 | 661.381372481993
+  63 |              5 |          1 |           9 |       45 |         3 |     0 |                2 | 663.381372481993 |         0 |           90 | 753.381372481993
+  64 |              5 |          1 |          10 |       51 |         2 |    10 |                3 | 756.381372481993 |         0 |            0 | 756.381372481993
+  65 |              5 |          1 |          11 |       51 |         3 |     0 |                0 | 756.381372481993 |         0 |           90 | 846.381372481993
+  66 |              5 |          1 |          12 |       66 |         2 |    10 |  22.561028345357 |  868.94240082735 |         0 |           90 |  958.94240082735
+  67 |              5 |          1 |          13 |       66 |         3 |     0 |                2 |  960.94240082735 |         0 |           90 | 1050.94240082735
+  68 |              5 |          1 |          14 |       -1 |         6 |     0 | 15.8113883008419 | 1066.75378912819 |         0 |            0 | 1066.75378912819
+  69 |              6 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
+  70 |              6 |          1 |           2 |       57 |         2 |    40 |               35 |               35 |         0 |           90 |              125
+  71 |              6 |          1 |           3 |       57 |         3 |     0 |                2 |              127 |         0 |           90 |              217
+  72 |              6 |          1 |           4 |       54 |         2 |    40 |                5 |              222 |         0 |           90 |              312
+  73 |              6 |          1 |           5 |       53 |         2 |    60 |  5.3851648071345 | 317.385164807135 |         0 |           90 | 407.385164807135
+  74 |              6 |          1 |           6 |       56 |         2 |    90 |                4 | 411.385164807135 |         0 |           90 | 501.385164807135
+  75 |              6 |          1 |           7 |       53 |         3 |    70 |                2 | 503.385164807135 |         0 |           90 | 593.385164807135
+  76 |              6 |          1 |           8 |       54 |         3 |    30 |                3 | 596.385164807135 |         0 |           90 | 686.385164807135
+  77 |              6 |          1 |           9 |       56 |         3 |     0 | 10.4403065089106 | 696.825471316045 |         0 |           90 | 786.825471316045
+  78 |              6 |          1 |          10 |       -1 |         6 |     0 | 35.0570962859162 | 821.882567601961 |         0 |            0 | 821.882567601961
+  79 |              7 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
+  80 |              7 |          1 |           2 |       67 |         2 |    10 | 12.2065556157337 | 12.2065556157337 |         0 |           90 | 102.206555615734
+  81 |              7 |          1 |           3 |       65 |         2 |    20 |                1 | 103.206555615734 |         0 |           90 | 193.206555615734
+  82 |              7 |          1 |           4 |       63 |         2 |    70 |                2 | 195.206555615734 |         0 |           90 | 285.206555615734
+  83 |              7 |          1 |           5 |       62 |         2 |    90 |                5 | 290.206555615734 |         0 |           90 | 380.206555615734
+  84 |              7 |          1 |           6 |       63 |         3 |    40 |                3 | 383.206555615734 |         0 |           90 | 473.206555615734
+  85 |              7 |          1 |           7 |       65 |         3 |    30 |                5 | 478.206555615734 |         0 |           90 | 568.206555615734
+  86 |              7 |          1 |           8 |       67 |         3 |    20 |                3 | 571.206555615734 |         0 |           90 | 661.206555615734
+  87 |              7 |          1 |           9 |       64 |         2 |    30 |                2 | 663.206555615734 |         0 |            0 | 663.206555615734
+  88 |              7 |          1 |          10 |       64 |         3 |    20 |                0 | 663.206555615734 |         0 |           90 | 753.206555615734
+  89 |              7 |          1 |          11 |       62 |         3 |     0 |                3 | 756.206555615734 |         0 |           90 | 846.206555615734
+  90 |              7 |          1 |          12 |       -1 |         6 |     0 | 20.6155281280883 | 866.822083743822 |         0 |            0 | 866.822083743822
+  91 |              8 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
+  92 |              8 |          1 |           2 |       81 |         2 |    30 | 47.4341649025257 | 47.4341649025257 |         0 |           90 | 137.434164902526
+  93 |              8 |          1 |           3 |       78 |         2 |    50 |                3 | 140.434164902526 |         0 |            0 | 140.434164902526
+  94 |              8 |          1 |           4 |       78 |         3 |    30 |                0 | 140.434164902526 |         0 |           90 | 230.434164902526
+  95 |              8 |          1 |           5 |       76 |         2 |    40 |                2 | 232.434164902526 |         0 |           90 | 322.434164902526
+  96 |              8 |          1 |           6 |       71 |         2 |    60 |                5 | 327.434164902526 |         0 |           90 | 417.434164902526
+  97 |              8 |          1 |           7 |       81 |         3 |    30 |                5 | 422.434164902526 |         0 |           90 | 512.434164902526
+  98 |              8 |          1 |           8 |       76 |         3 |    20 |                3 | 515.434164902526 |         0 |           90 | 605.434164902526
+  99 |              8 |          1 |           9 |       71 |         3 |     0 |                4 | 609.434164902526 |         0 |           90 | 699.434164902526
+ 100 |              8 |          1 |          10 |       79 |         2 |    10 |                1 | 700.434164902526 |         0 |           90 | 790.434164902526
+ 101 |              8 |          1 |          11 |       79 |         3 |     0 |  5.3851648071345 |  795.81932970966 |         0 |           90 |  885.81932970966
+ 102 |              8 |          1 |          12 |       -1 |         6 |     0 |  51.478150704935 | 937.297480414595 |         0 |            0 | 937.297480414595
+ 103 |              9 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
+ 104 |              9 |          1 |           2 |       90 |         2 |    10 | 20.6155281280883 | 20.6155281280883 |         0 |           90 | 110.615528128088
+ 105 |              9 |          1 |           3 |       87 |         2 |    30 |                5 | 115.615528128088 |         0 |           90 | 205.615528128088
+ 106 |              9 |          1 |           4 |       86 |         2 |    40 |                1 | 206.615528128088 |         0 |           90 | 296.615528128088
+ 107 |              9 |          1 |           5 |       87 |         3 |    20 |                6 | 302.615528128088 |         0 |           90 | 392.615528128088
+ 108 |              9 |          1 |           6 |       82 |         2 |    40 |                3 | 395.615528128088 |         0 |           90 | 485.615528128088
+ 109 |              9 |          1 |           7 |       84 |         2 |    60 |  5.8309518948453 | 491.446480022934 |         0 |           90 | 581.446480022934
+ 110 |              9 |          1 |           8 |       82 |         3 |    40 | 2.82842712474619 |  584.27490714768 |         0 |           90 |  674.27490714768
+ 111 |              9 |          1 |           9 |       90 |         3 |    30 |                3 |  677.27490714768 |         0 |           90 |  767.27490714768
+ 112 |              9 |          1 |          10 |       84 |         3 |    10 | 2.82842712474619 | 770.103334272426 |         0 |           90 | 860.103334272426
+ 113 |              9 |          1 |          11 |       86 |         3 |     0 | 3.60555127546399 |  863.70888554789 |         0 |           90 |  953.70888554789
+ 114 |              9 |          1 |          12 |       -1 |         6 |     0 | 22.3606797749979 | 976.069565322888 |         0 |            0 | 976.069565322888
+ 115 |             10 |          1 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
+ 116 |             10 |          1 |           2 |       98 |         2 |    20 | 30.8058436014987 | 30.8058436014987 |         0 |           90 | 120.805843601499
+ 117 |             10 |          1 |           3 |       96 |         2 |    30 |  5.3851648071345 | 126.191008408633 |         0 |           90 | 216.191008408633
+ 118 |             10 |          1 |           4 |       98 |         3 |    10 |                2 | 218.191008408633 |         0 |           90 | 308.191008408633
+ 119 |             10 |          1 |           5 |       96 |         3 |     0 | 3.60555127546399 | 311.796559684097 |         0 |           90 | 401.796559684097
+ 120 |             10 |          1 |           6 |       92 |         2 |    20 | 3.60555127546399 | 405.402110959561 |         0 |           90 | 495.402110959561
+ 121 |             10 |          1 |           7 |       92 |         3 |     0 |                2 | 497.402110959561 |         0 |           90 | 587.402110959561
+ 122 |             10 |          1 |           8 |       97 |         2 |    30 |                5 | 592.402110959561 |         0 |            0 | 592.402110959561
+ 123 |             10 |          1 |           9 |       97 |         3 |     0 |                0 | 592.402110959561 |         0 |           90 | 682.402110959561
+ 124 |             10 |          1 |          10 |      100 |         2 |    20 |                5 | 687.402110959561 |         0 |           90 | 777.402110959561
+ 125 |             10 |          1 |          11 |      100 |         3 |     0 |                5 | 782.402110959561 |         0 |           90 | 872.402110959561
+ 126 |             10 |          1 |          12 |       -1 |         6 |     0 | 33.5410196624968 | 905.943130622058 |         0 |            0 | 905.943130622058
+ 127 |             -2 |          0 |           0 |       -1 |        -1 |    -1 |  879.42275822512 |               -1 |         0 |         9000 | 9879.42275822512
+(127 rows)
+
+WITH
+orders_id AS (
+    SELECT id FROM orders
+),
+results_id AS (
+    SELECT DISTINCT order_id AS id
+    FROM _pgr_pickDeliverEuclidean(
+        'SELECT * FROM orders ORDER BY id',
+        'SELECT * FROM vehicles',
+        30)
+    WHERE stop_type NOT IN (0, 5, -1)
+    ORDER BY order_id
+)
+SELECT * FROM orders_id LEFT JOIN results_id USING(ID);
+ id
+-----
+   3
+   5
+   6
+   8
+   9
+  11
+  13
+  16
+  18
+  19
+  20
+  23
+  25
+  28
+  29
+  30
+  32
+  33
+  35
+  36
+  38
+  42
+  43
+  44
+  45
+  49
+  50
+  51
+  53
+  54
+  56
+  57
+  62
+  63
+  64
+  65
+  66
+  67
+  71
+  76
+  78
+  79
+  81
+  82
+  84
+  86
+  87
+  90
+  92
+  96
+  97
+  98
+ 100
+(53 rows)
+
+WITH
+results AS (
+    SELECT *
+    FROM _pgr_pickDeliverEuclidean(
+        'SELECT * FROM orders ORDER BY id',
+        'SELECT * FROM vehicles',
+        30)
+)
+SELECT ((1 + (SELECT max(vehicle_id) FROM results) * 2 + 53 * 2) =
+    (SELECT count(*) from results)) AS correct_value;
+ correct_value
+---------------
+ f
+(1 row)
+
+ROLLBACK;
+ROLLBACK
diff --git a/test/pickDeliver/differentVechiles.test.sql b/test/pickDeliver/differentVechiles.test.sql
new file mode 100644
index 0000000..a6efc67
--- /dev/null
+++ b/test/pickDeliver/differentVechiles.test.sql
@@ -0,0 +1,34 @@
+
+INSERT into vehicles(start_x, start_y, start_open, start_close, capacity, number)
+VALUES (40, 50, 0, 400, 200, 25);
+
+SELECT * FROM _pgr_pickDeliverEuclidean(
+    'SELECT * FROM orders ORDER BY id',
+    'SELECT * FROM vehicles',
+    30);
+
+WITH
+orders_id AS (
+    SELECT id FROM orders
+),
+results_id AS (
+    SELECT DISTINCT order_id AS id
+    FROM _pgr_pickDeliverEuclidean(
+        'SELECT * FROM orders ORDER BY id',
+        'SELECT * FROM vehicles',
+        30)
+    WHERE stop_type NOT IN (0, 5, -1)
+    ORDER BY order_id
+)
+SELECT * FROM orders_id LEFT JOIN results_id USING(ID);
+
+WITH
+results AS (
+    SELECT *
+    FROM _pgr_pickDeliverEuclidean(
+        'SELECT * FROM orders ORDER BY id',
+        'SELECT * FROM vehicles',
+        30)
+)
+SELECT ((1 + (SELECT max(vehicle_id) FROM results) * 2 + 53 * 2) =
+    (SELECT count(*) from results)) AS correct_value;
diff --git a/test/pickDeliver/doc-pickDeliver.result b/test/pickDeliver/doc-pickDeliver.result
new file mode 100644
index 0000000..8c469b2
--- /dev/null
+++ b/test/pickDeliver/doc-pickDeliver.result
@@ -0,0 +1,61 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+--q1
+SELECT * FROM _pgr_pickDeliver(
+    'SELECT * FROM orders ORDER BY id',
+    'SELECT * from vehicles',
+
+    'WITH
+    A AS (
+        SELECT p_node_id AS id, p_x AS x, p_y AS y FROM orders
+        UNION
+        SELECT d_node_id AS id, d_x, d_y FROM orders
+        UNION
+        SELECT start_node_id, start_x, start_y FROM vehicles
+    )
+    SELECT A.id AS start_vid, B.id AS end_vid, sqrt( (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y)) AS agg_cost
+    FROM A, A AS B WHERE A.id != B.id'
+    );
+ seq | vehicle_seq | vehicle_id | stop_seq | stop_type | stop_id | order_id | cargo |   travel_time    |   arrival_time   | wait_time | service_time |  departure_time
+-----+-------------+------------+----------+-----------+---------+----------+-------+------------------+------------------+-----------+--------------+------------------
+   1 |           1 |          1 |        1 |         1 |       6 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
+   2 |           1 |          1 |        2 |         2 |       5 |        3 |    30 |                1 |                1 |         1 |            3 |                5
+   3 |           1 |          1 |        3 |         3 |      11 |        3 |     0 |  1.4142135623731 | 6.41421356237309 |         0 |            3 |  9.4142135623731
+   4 |           1 |          1 |        4 |         2 |       9 |        2 |    20 |  1.4142135623731 | 10.8284271247462 |         0 |            2 | 12.8284271247462
+   5 |           1 |          1 |        5 |         3 |       4 |        2 |     0 |                1 | 13.8284271247462 |         0 |            3 | 16.8284271247462
+   6 |           1 |          1 |        6 |         6 |       6 |       -1 |     0 |  1.4142135623731 | 18.2426406871193 |         0 |            0 | 18.2426406871193
+   7 |           2 |          1 |        1 |         1 |       6 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
+   8 |           2 |          1 |        2 |         2 |       3 |        1 |    10 |                1 |                1 |         1 |            3 |                5
+   9 |           2 |          1 |        3 |         3 |       8 |        1 |     0 | 2.23606797749979 | 7.23606797749979 |         0 |            3 | 10.2360679774998
+  10 |           2 |          1 |        4 |         6 |       6 |       -1 |     0 |                2 | 12.2360679774998 |         0 |            0 | 12.2360679774998
+  11 |          -2 |          0 |        0 |        -1 |      -1 |       -1 |    -1 | 11.4787086646191 |               -1 |         2 |           17 | 30.4787086646191
+(11 rows)
+
+--q2
+SELECT * FROM _pgr_pickDeliver(
+    $$ SELECT * FROM orders ORDER BY id $$,
+    $$ SELECT * FROM vehicles $$,
+    $$ SELECT * from pgr_dijkstraCostMatrix(
+        ' SELECT * FROM edge_table ', ARRAY[3, 4, 5, 8, 9, 11])
+    $$
+);
+ seq | vehicle_seq | vehicle_id | stop_seq | stop_type | stop_id | order_id | cargo | travel_time | arrival_time | wait_time | service_time | departure_time
+-----+-------------+------------+----------+-----------+---------+----------+-------+-------------+--------------+-----------+--------------+----------------
+   1 |           1 |          1 |        1 |         1 |       6 |       -1 |     0 |           0 |            0 |         0 |            0 |              0
+   2 |           1 |          1 |        2 |         2 |       5 |        3 |    30 |           1 |            1 |         1 |            3 |              5
+   3 |           1 |          1 |        3 |         3 |      11 |        3 |     0 |           2 |            7 |         0 |            3 |             10
+   4 |           1 |          1 |        4 |         2 |       9 |        2 |    20 |           2 |           12 |         0 |            2 |             14
+   5 |           1 |          1 |        5 |         3 |       4 |        2 |     0 |           1 |           15 |         0 |            3 |             18
+   6 |           1 |          1 |        6 |         6 |       6 |       -1 |     0 |           4 |           22 |         0 |            0 |             22
+   7 |           2 |          1 |        1 |         1 |       6 |       -1 |     0 |           0 |            0 |         0 |            0 |              0
+   8 |           2 |          1 |        2 |         2 |       3 |        1 |    10 |           5 |            5 |         0 |            3 |              8
+   9 |           2 |          1 |        3 |         3 |       8 |        1 |     0 |           3 |           11 |         0 |            3 |             14
+  10 |           2 |          1 |        4 |         6 |       6 |       -1 |     0 |           0 |           14 |         0 |            0 |             14
+  11 |          -2 |          0 |        0 |        -1 |      -1 |       -1 |    -1 |          18 |           -1 |         1 |           17 |             36
+(11 rows)
+
+--q3
+ROLLBACK;
+ROLLBACK
diff --git a/test/pickDeliver/doc-pickDeliver.test.sql b/test/pickDeliver/doc-pickDeliver.test.sql
new file mode 100644
index 0000000..749cac0
--- /dev/null
+++ b/test/pickDeliver/doc-pickDeliver.test.sql
@@ -0,0 +1,28 @@
+\echo --q1
+SELECT * FROM _pgr_pickDeliver(
+    'SELECT * FROM orders ORDER BY id',
+    'SELECT * from vehicles',
+    -- matrix query
+    'WITH
+    A AS (
+        SELECT p_node_id AS id, p_x AS x, p_y AS y FROM orders
+        UNION
+        SELECT d_node_id AS id, d_x, d_y FROM orders
+        UNION
+        SELECT start_node_id, start_x, start_y FROM vehicles
+    )
+    SELECT A.id AS start_vid, B.id AS end_vid, sqrt( (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y)) AS agg_cost
+    FROM A, A AS B WHERE A.id != B.id'
+    );
+
+\echo --q2
+
+SELECT * FROM _pgr_pickDeliver(
+    $$ SELECT * FROM orders ORDER BY id $$,
+    $$ SELECT * FROM vehicles $$,
+    $$ SELECT * from pgr_dijkstraCostMatrix(
+        ' SELECT * FROM edge_table ', ARRAY[3, 4, 5, 8, 9, 11])
+    $$
+);
+
+\echo --q3
diff --git a/test/pickDeliver/doc-pickDeliverEuclidean.result b/test/pickDeliver/doc-pickDeliverEuclidean.result
new file mode 100644
index 0000000..df109a2
--- /dev/null
+++ b/test/pickDeliver/doc-pickDeliverEuclidean.result
@@ -0,0 +1,27 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+--q1
+SELECT * FROM _pgr_pickDeliverEuclidean(
+    'SELECT * FROM orders ORDER BY id',
+    'SELECT * from vehicles'
+);
+ seq | vehicle_seq | vehicle_id | stop_seq | stop_type | order_id | cargo |   travel_time    |   arrival_time   | wait_time | service_time |  departure_time
+-----+-------------+------------+----------+-----------+----------+-------+------------------+------------------+-----------+--------------+------------------
+   1 |           1 |          1 |        1 |         1 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
+   2 |           1 |          1 |        2 |         2 |        3 |    30 |                1 |                1 |         1 |            3 |                5
+   3 |           1 |          1 |        3 |         3 |        3 |     0 |  1.4142135623731 | 6.41421356237309 |         0 |            3 |  9.4142135623731
+   4 |           1 |          1 |        4 |         2 |        2 |    20 |  1.4142135623731 | 10.8284271247462 |         0 |            2 | 12.8284271247462
+   5 |           1 |          1 |        5 |         3 |        2 |     0 |                1 | 13.8284271247462 |         0 |            3 | 16.8284271247462
+   6 |           1 |          1 |        6 |         6 |       -1 |     0 |  1.4142135623731 | 18.2426406871193 |         0 |            0 | 18.2426406871193
+   7 |           2 |          1 |        1 |         1 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
+   8 |           2 |          1 |        2 |         2 |        1 |    10 |                1 |                1 |         1 |            3 |                5
+   9 |           2 |          1 |        3 |         3 |        1 |     0 | 2.23606797749979 | 7.23606797749979 |         0 |            3 | 10.2360679774998
+  10 |           2 |          1 |        4 |         6 |       -1 |     0 |                2 | 12.2360679774998 |         0 |            0 | 12.2360679774998
+  11 |          -2 |          0 |        0 |        -1 |       -1 |    -1 | 11.4787086646191 |               -1 |         2 |           17 | 30.4787086646191
+(11 rows)
+
+--q2
+ROLLBACK;
+ROLLBACK
diff --git a/src/pickDeliver/test/doc-pickDeliverEuclidean.test.sql b/test/pickDeliver/doc-pickDeliverEuclidean.test.sql
similarity index 100%
rename from src/pickDeliver/test/doc-pickDeliverEuclidean.test.sql
rename to test/pickDeliver/doc-pickDeliverEuclidean.test.sql
diff --git a/src/pickDeliver/test/jet_customers-cygwin.result b/test/pickDeliver/jet_customers-cygwin.result
similarity index 100%
rename from src/pickDeliver/test/jet_customers-cygwin.result
rename to test/pickDeliver/jet_customers-cygwin.result
diff --git a/src/pickDeliver/test/jet_customers-cygwin.test.sql b/test/pickDeliver/jet_customers-cygwin.test.sql
similarity index 100%
rename from src/pickDeliver/test/jet_customers-cygwin.test.sql
rename to test/pickDeliver/jet_customers-cygwin.test.sql
diff --git a/test/pickDeliver/jet_customers.result b/test/pickDeliver/jet_customers.result
new file mode 100644
index 0000000..aa9ba6d
--- /dev/null
+++ b/test/pickDeliver/jet_customers.result
@@ -0,0 +1,122 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+CREATE TABLE jet_customers (
+    id integer,
+    x integer,
+    y integer,
+    pindex integer,
+    dindex integer,
+    demand integer,
+    opentime double precision,
+    closetime double precision,
+    servicetime double precision
+);
+CREATE TABLE
+CREATE TABLE stops (
+    iata_faa character varying(20),
+    x integer,
+    y integer,
+    longitude double precision,
+    latitude double precision
+);
+CREATE TABLE
+COPY jet_customers (id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) FROM stdin;
+COPY 29
+COPY stops (iata_faa, x, y, longitude, latitude) FROM stdin;
+COPY 8
+WITH
+pickups AS (
+    SELECT id, demand, x as p_x, y as p_y, opentime as p_open, closetime as p_close, servicetime as p_service
+    FROM  jet_customers WHERE pindex = 0 AND id != 0
+),
+deliveries AS (
+    SELECT pindex AS id, x as d_x, y as d_y, opentime as d_open, closetime as d_close, servicetime as d_service
+    FROM  jet_customers WHERE dindex = 0 AND id != 0
+)
+SELECT * INTO jet_orders
+FROM pickups JOIN deliveries USING(id) ORDER BY pickups.id;
+SELECT 14
+SELECT * FROM _pgr_pickDeliver(
+    'SELECT id, x, y, demand, opentime, closetime, servicetime, pindex, dindex
+     FROM jet_customers ORDER BY id', max_vehicles := 20, capacity:= 100, speed := 1000);
+ seq | vehicle_id | vehicle_seq | stop_id |    travel_time    |   arrival_time    | wait_time | service_time |  departure_time
+-----+------------+-------------+---------+-------------------+-------------------+-----------+--------------+------------------
+   1 |          1 |           1 |       0 |                 0 |                 0 |         0 |            0 |                0
+   2 |          1 |           2 |      27 | 0.617668195716762 | 0.617668195716762 |         0 |           30 | 30.6176681957168
+   3 |          1 |           3 |      25 |                 0 |  30.6176681957168 |         0 |           30 | 60.6176681957168
+   4 |          1 |           4 |      23 |                 0 |  60.6176681957168 |         0 |           30 | 90.6176681957168
+   5 |          1 |           5 |      26 | 0.714478831037001 |  91.3321470267538 |         0 |           30 | 121.332147026754
+   6 |          1 |           6 |      19 |                 0 |  121.332147026754 |         0 |           30 | 151.332147026754
+   7 |          1 |           7 |       7 | 0.587132864009502 |  151.919279890763 |         0 |           30 | 181.919279890763
+   8 |          1 |           8 |       5 |                 0 |  181.919279890763 |         0 |           30 | 211.919279890763
+   9 |          1 |           9 |       3 |                 0 |  211.919279890763 |         0 |           30 | 241.919279890763
+  10 |          1 |          10 |       1 |                 0 |  241.919279890763 |         0 |           30 | 271.919279890763
+  11 |          1 |          11 |      24 |  1.33232503541741 |  273.251604926181 |         0 |           30 | 303.251604926181
+  12 |          1 |          12 |      20 |                 0 |  303.251604926181 |         0 |           30 | 333.251604926181
+  13 |          1 |          13 |      12 |                 0 |  333.251604926181 |         0 |           30 | 363.251604926181
+  14 |          1 |          14 |       4 |                 0 |  363.251604926181 |         0 |           30 | 393.251604926181
+  15 |          1 |          15 |      21 |   1.7278440323131 |  394.979448958494 |         0 |           30 | 424.979448958494
+  16 |          1 |          16 |      17 |                 0 |  424.979448958494 |         0 |           30 | 454.979448958494
+  17 |          1 |          17 |       6 |                 0 |  454.979448958494 |         0 |           30 | 484.979448958494
+  18 |          1 |          18 |      15 | 0.415245710393256 |  485.394694668887 |         0 |           30 | 515.394694668887
+  19 |          1 |          19 |      13 |                 0 |  515.394694668887 |         0 |           30 | 545.394694668887
+  20 |          1 |          20 |      11 |                 0 |  545.394694668887 |         0 |           30 | 575.394694668887
+  21 |          1 |          21 |       9 |                 0 |  575.394694668887 |         0 |           30 | 605.394694668887
+  22 |          1 |          22 |      18 | 0.328105166067223 |  605.722799834954 |         0 |           30 | 635.722799834954
+  23 |          1 |          23 |      10 |                 0 |  635.722799834954 |         0 |           30 | 665.722799834954
+  24 |          1 |          24 |       2 |                 0 |  665.722799834954 |         0 |           30 | 695.722799834954
+  25 |          1 |          25 |      28 | 0.414019323220547 |  696.136819158175 |         0 |           30 | 726.136819158175
+  26 |          1 |          26 |      22 |                 0 |  726.136819158175 |         0 |           30 | 756.136819158175
+  27 |          1 |          27 |      16 |                 0 |  756.136819158175 |         0 |           30 | 786.136819158175
+  28 |          1 |          28 |       8 |                 0 |  786.136819158175 |         0 |           30 | 816.136819158175
+  29 |          1 |          29 |      14 | 0.409882910109704 |  816.546702068285 |         0 |           30 | 846.546702068285
+  30 |          1 |          30 |       0 | 0.117720006795786 |   846.66442207508 |         0 |            0 |  846.66442207508
+  31 |         -2 |           0 |       0 |  6.66442207508029 |                -1 |         0 |          840 |  846.66442207508
+(31 rows)
+
+SELECT * FROM _pgr_pickDeliverEuclidean(
+    'SELECT * FROM jet_orders ORDER BY id',
+    'SELECT 0 AS id,
+    2138 AS start_x, -119 AS start_y,
+    0 AS start_open, 60000 AS start_close,
+    100 AS capacity, 20 AS number, 1000 as speed',
+    30);
+ seq | vehicle_number | vehicle_id | vehicle_seq | order_id | stop_type | cargo |    travel_time    |   arrival_time    | wait_time | service_time |  departure_time
+-----+----------------+------------+-------------+----------+-----------+-------+-------------------+-------------------+-----------+--------------+------------------
+   1 |              1 |          0 |           1 |       -1 |         1 |     0 |                 0 |                 0 |         0 |            0 |                0
+   2 |              1 |          0 |           2 |       27 |         2 |     6 | 0.617668195716762 | 0.617668195716762 |         0 |           30 | 30.6176681957168
+   3 |              1 |          0 |           3 |       25 |         2 |    26 |                 0 |  30.6176681957168 |         0 |           30 | 60.6176681957168
+   4 |              1 |          0 |           4 |       23 |         2 |    40 |                 0 |  60.6176681957168 |         0 |           30 | 90.6176681957168
+   5 |              1 |          0 |           5 |       25 |         3 |    20 | 0.714478831037001 |  91.3321470267538 |         0 |           30 | 121.332147026754
+   6 |              1 |          0 |           6 |       19 |         2 |    36 |                 0 |  121.332147026754 |         0 |           30 | 151.332147026754
+   7 |              1 |          0 |           7 |        7 |         2 |    41 | 0.587132864009502 |  151.919279890763 |         0 |           30 | 181.919279890763
+   8 |              1 |          0 |           8 |        5 |         2 |    51 |                 0 |  181.919279890763 |         0 |           30 | 211.919279890763
+   9 |              1 |          0 |           9 |        3 |         2 |    68 |                 0 |  211.919279890763 |         0 |           30 | 241.919279890763
+  10 |              1 |          0 |          10 |        1 |         2 |    75 |                 0 |  241.919279890763 |         0 |           30 | 271.919279890763
+  11 |              1 |          0 |          11 |       23 |         3 |    61 |  1.33232503541741 |  273.251604926181 |         0 |           30 | 303.251604926181
+  12 |              1 |          0 |          12 |       19 |         3 |    45 |                 0 |  303.251604926181 |         0 |           30 | 333.251604926181
+  13 |              1 |          0 |          13 |       11 |         3 |    33 |                 0 |  333.251604926181 |         0 |           30 | 363.251604926181
+  14 |              1 |          0 |          14 |        3 |         3 |    16 |                 0 |  363.251604926181 |         0 |           30 | 393.251604926181
+  15 |              1 |          0 |          15 |       21 |         2 |    22 |   1.7278440323131 |  394.979448958494 |         0 |           30 | 424.979448958494
+  16 |              1 |          0 |          16 |       17 |         2 |    28 |                 0 |  424.979448958494 |         0 |           30 | 454.979448958494
+  17 |              1 |          0 |          17 |        5 |         3 |    18 |                 0 |  454.979448958494 |         0 |           30 | 484.979448958494
+  18 |              1 |          0 |          18 |       15 |         2 |    20 | 0.415245710393256 |  485.394694668887 |         0 |           30 | 515.394694668887
+  19 |              1 |          0 |          19 |       13 |         2 |    29 |                 0 |  515.394694668887 |         0 |           30 | 545.394694668887
+  20 |              1 |          0 |          20 |       11 |         2 |    41 |                 0 |  545.394694668887 |         0 |           30 | 575.394694668887
+  21 |              1 |          0 |          21 |        9 |         2 |    54 |                 0 |  575.394694668887 |         0 |           30 | 605.394694668887
+  22 |              1 |          0 |          22 |       17 |         3 |    48 | 0.328105166067223 |  605.722799834954 |         0 |           30 | 635.722799834954
+  23 |              1 |          0 |          23 |        9 |         3 |    35 |                 0 |  635.722799834954 |         0 |           30 | 665.722799834954
+  24 |              1 |          0 |          24 |        1 |         3 |    28 |                 0 |  665.722799834954 |         0 |           30 | 695.722799834954
+  25 |              1 |          0 |          25 |       27 |         3 |    22 | 0.414019323220547 |  696.136819158175 |         0 |           30 | 726.136819158175
+  26 |              1 |          0 |          26 |       21 |         3 |    16 |                 0 |  726.136819158175 |         0 |           30 | 756.136819158175
+  27 |              1 |          0 |          27 |       15 |         3 |    14 |                 0 |  756.136819158175 |         0 |           30 | 786.136819158175
+  28 |              1 |          0 |          28 |        7 |         3 |     9 |                 0 |  786.136819158175 |         0 |           30 | 816.136819158175
+  29 |              1 |          0 |          29 |       13 |         3 |     0 | 0.409882910109704 |  816.546702068285 |         0 |           30 | 846.546702068285
+  30 |              1 |          0 |          30 |       -1 |         6 |     0 | 0.117720006795786 |   846.66442207508 |         0 |            0 |  846.66442207508
+  31 |             -2 |          0 |           0 |       -1 |        -1 |    -1 |  6.66442207508029 |                -1 |         0 |          840 |  846.66442207508
+(31 rows)
+
+ROLLBACK;
+ROLLBACK
diff --git a/src/pickDeliver/test/jet_customers.test.sql b/test/pickDeliver/jet_customers.test.sql
similarity index 100%
rename from src/pickDeliver/test/jet_customers.test.sql
rename to test/pickDeliver/jet_customers.test.sql
diff --git a/test/pickDeliver/jet_customers1.result b/test/pickDeliver/jet_customers1.result
new file mode 100644
index 0000000..b07ad6f
--- /dev/null
+++ b/test/pickDeliver/jet_customers1.result
@@ -0,0 +1,291 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+CREATE TABLE jet_customers (
+    airport character varying,
+    id integer,
+    x double precision,
+    y double precision,
+    pindex integer,
+    dindex integer,
+    demand integer,
+    opentime double precision,
+    closetime double precision,
+    servicetime double precision
+);
+CREATE TABLE
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 1, 2320738.4688434978, 126348.38967116659, 0, 2, 4, 3448, 2853448, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 3, 2320738.4688434978, 126348.38967116659, 0, 4, 4, 3448, 2853448, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 5, 2320738.4688434978, 126348.38967116659, 0, 6, 4, 3448, 2853448, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 7, 2320738.4688434978, 126348.38967116659, 0, 8, 4, 3448, 2853448, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 9, 2320738.4688434978, 126348.38967116659, 0, 10, 4, 3448, 2853448, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 11, 2320738.4688434978, 126348.38967116659, 0, 12, 4, 3448, 2853448, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 13, 2383186.1525343237, 448251.25888828852, 0, 14, 4, 3463, 2853463, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 15, 2383186.1525343237, 448251.25888828852, 0, 16, 4, 3463, 2853463, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 17, 2383186.1525343237, 448251.25888828852, 0, 18, 4, 3463, 2853463, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 19, 2383186.1525343237, 448251.25888828852, 0, 20, 4, 3463, 2853463, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 21, 2383186.1525343237, 448251.25888828852, 0, 22, 4, 3463, 2853463, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 23, 2383186.1525343237, 448251.25888828852, 0, 24, 4, 3463, 2853463, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 25, 1981144.5525029898, -1903041.2384292425, 0, 26, 2, 3576, 2853576, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 27, 1981144.5525029898, -1903041.2384292425, 0, 28, 2, 3576, 2853576, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 29, 1981144.5525029898, -1903041.2384292425, 0, 30, 2, 3576, 2853576, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 31, 1981144.5525029898, -1903041.2384292425, 0, 32, 2, 3576, 2853576, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 33, 1981144.5525029898, -1903041.2384292425, 0, 34, 2, 3576, 2853576, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 35, 1981144.5525029898, -1903041.2384292425, 0, 36, 2, 3576, 2853576, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 37, 2138409.5568088419, -119451.50568778868, 0, 38, 5, 3624, 2853624, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 39, 2138409.5568088419, -119451.50568778868, 0, 40, 5, 3624, 2853624, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 41, 2138409.5568088419, -119451.50568778868, 0, 42, 5, 3624, 2853624, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 43, 2138409.5568088419, -119451.50568778868, 0, 44, 5, 3624, 2853624, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 45, 2138409.5568088419, -119451.50568778868, 0, 46, 5, 3624, 2853624, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 47, 2138409.5568088419, -119451.50568778868, 0, 48, 5, 3624, 2853624, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 49, 2387491.1007072991, 34459.351848672632, 0, 50, 1, 4265, 2854265, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 51, 2387491.1007072991, 34459.351848672632, 0, 52, 1, 4265, 2854265, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 53, 2387491.1007072991, 34459.351848672632, 0, 54, 1, 4265, 2854265, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 55, 2387491.1007072991, 34459.351848672632, 0, 56, 1, 4265, 2854265, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 57, 2387491.1007072991, 34459.351848672632, 0, 58, 1, 4265, 2854265, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 59, 2387491.1007072991, 34459.351848672632, 0, 60, 1, 4265, 2854265, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 61, 2035310.7411768832, -176076.78362264115, 0, 62, 1, 4355, 2854355, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 63, 2035310.7411768832, -176076.78362264115, 0, 64, 1, 4355, 2854355, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 65, 2035310.7411768832, -176076.78362264115, 0, 66, 1, 4355, 2854355, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 67, 2035310.7411768832, -176076.78362264115, 0, 68, 1, 4355, 2854355, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 69, 2035310.7411768832, -176076.78362264115, 0, 70, 1, 4355, 2854355, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 71, 2035310.7411768832, -176076.78362264115, 0, 72, 1, 4355, 2854355, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 2, 2320738.4688434978, 126348.38967116659, 1, 0, -4, 3448, 6903448, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 4, 2383186.1525343237, 448251.25888828852, 3, 0, -4, 3448, 6903448, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 6, 1981144.5525029898, -1903041.2384292425, 5, 0, -4, 3448, 6903448, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 8, 2138409.5568088419, -119451.50568778868, 7, 0, -4, 3448, 6903448, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 10, 2387491.1007072991, 34459.351848672632, 9, 0, -4, 3448, 6903448, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 12, 2035310.7411768832, -176076.78362264115, 11, 0, -4, 3448, 6903448, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 14, 2320738.4688434978, 126348.38967116659, 13, 0, -4, 3463, 6903463, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 16, 2383186.1525343237, 448251.25888828852, 15, 0, -4, 3463, 6903463, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 18, 1981144.5525029898, -1903041.2384292425, 17, 0, -4, 3463, 6903463, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 20, 2138409.5568088419, -119451.50568778868, 19, 0, -4, 3463, 6903463, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 22, 2387491.1007072991, 34459.351848672632, 21, 0, -4, 3463, 6903463, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 24, 2035310.7411768832, -176076.78362264115, 23, 0, -4, 3463, 6903463, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 26, 2320738.4688434978, 126348.38967116659, 25, 0, -2, 3576, 6903576, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 28, 2383186.1525343237, 448251.25888828852, 27, 0, -2, 3576, 6903576, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 30, 1981144.5525029898, -1903041.2384292425, 29, 0, -2, 3576, 6903576, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 32, 2138409.5568088419, -119451.50568778868, 31, 0, -2, 3576, 6903576, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 34, 2387491.1007072991, 34459.351848672632, 33, 0, -2, 3576, 6903576, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 36, 2035310.7411768832, -176076.78362264115, 35, 0, -2, 3576, 6903576, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 38, 2320738.4688434978, 126348.38967116659, 37, 0, -5, 3624, 6903624, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 40, 2383186.1525343237, 448251.25888828852, 39, 0, -5, 3624, 6903624, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 42, 1981144.5525029898, -1903041.2384292425, 41, 0, -5, 3624, 6903624, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 44, 2138409.5568088419, -119451.50568778868, 43, 0, -5, 3624, 6903624, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 46, 2387491.1007072991, 34459.351848672632, 45, 0, -5, 3624, 6903624, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 48, 2035310.7411768832, -176076.78362264115, 47, 0, -5, 3624, 6903624, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 50, 2320738.4688434978, 126348.38967116659, 49, 0, -1, 4265, 6904265, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 52, 2383186.1525343237, 448251.25888828852, 51, 0, -1, 4265, 6904265, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 54, 1981144.5525029898, -1903041.2384292425, 53, 0, -1, 4265, 6904265, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 56, 2138409.5568088419, -119451.50568778868, 55, 0, -1, 4265, 6904265, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 58, 2387491.1007072991, 34459.351848672632, 57, 0, -1, 4265, 6904265, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 60, 2035310.7411768832, -176076.78362264115, 59, 0, -1, 4265, 6904265, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 62, 2320738.4688434978, 126348.38967116659, 61, 0, -1, 4355, 6904355, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 64, 2383186.1525343237, 448251.25888828852, 63, 0, -1, 4355, 6904355, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 66, 1981144.5525029898, -1903041.2384292425, 65, 0, -1, 4355, 6904355, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 68, 2138409.5568088419, -119451.50568778868, 67, 0, -1, 4355, 6904355, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 70, 2387491.1007072991, 34459.351848672632, 69, 0, -1, 4355, 6904355, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 72, 2035310.7411768832, -176076.78362264115, 71, 0, -1, 4355, 6904355, 450000);
+INSERT 0 1
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 0, 2138409.5568088419, -119451.50568778868, 0, 0, 0, 0, 7200000, 0);
+INSERT 0 1
+WITH
+customer_data AS (SELECT * FROM jet_customers),
+pickups AS (
+    SELECT id, demand, x as p_x, y as p_y, opentime as p_open, closetime as p_close, servicetime as p_service
+    FROM  customer_data WHERE pindex = 0 AND id != 0
+),
+deliveries AS (
+    SELECT pindex AS id, x as d_x, y as d_y, opentime as d_open, closetime as d_close, servicetime as d_service
+    FROM  customer_data WHERE dindex = 0 AND id != 0
+)
+SELECT * INTO jet_orders FROM pickups JOIN deliveries USING(id) ORDER BY pickups.id;
+SELECT 36
+WITH
+customer_data AS (select * from jet_customers)
+SELECT id, x AS start_x, y AS start_y,
+    opentime AS start_open, closetime AS start_close,
+    5 AS capacity,  10  AS number INTO jet_vehicles
+FROM customer_data WHERE id = 0 LIMIT 1;
+SELECT 1
+SELECT *
+FROM _pgr_pickDeliverEuclidean(
+    $$ SELECT * from jet_orders $$,
+    $$ SELECT * FROM jet_vehicles $$
+)
+ROLLBACK;
+ seq | vehicle_number | vehicle_id | vehicle_seq | order_id | stop_type | cargo |   travel_time    |   arrival_time   | wait_time | service_time |  departure_time
+-----+----------------+------------+-------------+----------+-----------+-------+------------------+------------------+-----------+--------------+------------------
+   1 |              1 |          0 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
+   2 |              1 |          0 |           2 |       43 |         2 |     5 |                0 |                0 |      3624 |       450000 |           453624
+   3 |              1 |          0 |           3 |       43 |         3 |     0 |                0 |           453624 |         0 |       450000 |           903624
+   4 |              1 |          0 |           4 |       47 |         2 |     5 |                0 |           903624 |         0 |       450000 |          1353624
+   5 |              1 |          0 |           5 |       67 |         3 |     4 |                0 |          1353624 |         0 |       450000 |          1803624
+   6 |              1 |          0 |           6 |       67 |         2 |     5 |  117625.62597458 | 1921249.62597458 |         0 |       450000 | 2371249.62597458
+   7 |              1 |          0 |           7 |       47 |         3 |     0 |                0 | 2371249.62597458 |         0 |       450000 | 2821249.62597458
+   8 |              1 |          0 |           8 |       -1 |         6 |     0 |  117625.62597458 | 2938875.25194916 |         0 |            0 | 2938875.25194916
+   9 |              2 |          0 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
+  10 |              2 |          0 |           2 |       21 |         2 |     4 | 618224.886851279 | 618224.886851279 |         0 |       450000 | 1068224.88685128
+  11 |              2 |          0 |           3 |       51 |         3 |     3 |                0 | 1068224.88685128 |         0 |       450000 | 1518224.88685128
+  12 |              2 |          0 |           4 |       55 |         2 |     4 |  413814.30003113 | 1932039.18688241 |         0 |       450000 | 2382039.18688241
+  13 |              2 |          0 |           5 |       51 |         2 |     5 |                0 | 2382039.18688241 |         0 |       450000 | 2832039.18688241
+  14 |              2 |          0 |           6 |       21 |         3 |     1 |                0 | 2832039.18688241 |         0 |       450000 | 3282039.18688241
+  15 |              2 |          0 |           7 |       55 |         3 |     0 | 292797.144074952 | 3574836.33095736 |         0 |       450000 | 4024836.33095736
+  16 |              2 |          0 |           8 |       -1 |         6 |     0 |                0 | 4024836.33095736 |         0 |            0 | 4024836.33095736
+  17 |              3 |          0 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
+  18 |              3 |          0 |           2 |        3 |         2 |     4 | 306041.534309013 | 306041.534309013 |         0 |       450000 | 756041.534309013
+  19 |              3 |          0 |           3 |       13 |         3 |     0 |                0 | 756041.534309013 |         0 |       450000 | 1206041.53430901
+  20 |              3 |          0 |           4 |       13 |         2 |     4 | 327904.209196169 | 1533945.74350518 |         0 |       450000 | 1983945.74350518
+  21 |              3 |          0 |           5 |        3 |         3 |     0 |                0 | 1983945.74350518 |         0 |       450000 | 2433945.74350518
+  22 |              3 |          0 |           6 |        7 |         2 |     4 | 327904.209196169 | 2761849.95270135 |         0 |       450000 | 3211849.95270135
+  23 |              3 |          0 |           7 |        7 |         3 |     0 | 306041.534309013 | 3517891.48701036 |         0 |       450000 | 3967891.48701036
+  24 |              3 |          0 |           8 |       -1 |         6 |     0 |                0 | 3967891.48701036 |         0 |            0 | 3967891.48701036
+  25 |              4 |          0 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
+  26 |              4 |          0 |           2 |       39 |         2 |     5 |                0 |                0 |      3624 |       450000 |           453624
+  27 |              4 |          0 |           3 |       15 |         3 |     1 | 618224.886851279 | 1071848.88685128 |         0 |       450000 | 1521848.88685128
+  28 |              4 |          0 |           4 |       15 |         2 |     5 |                0 | 1521848.88685128 |         0 |       450000 | 1971848.88685128
+  29 |              4 |          0 |           5 |       39 |         3 |     0 |                0 | 1971848.88685128 |         0 |       450000 | 2421848.88685128
+  30 |              4 |          0 |           6 |       -1 |         6 |     0 | 618224.886851279 | 3040073.77370256 |         0 |            0 | 3040073.77370256
+  31 |              5 |          0 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
+  32 |              5 |          0 |           2 |       37 |         2 |     5 |                0 |                0 |      3624 |       450000 |           453624
+  33 |              5 |          0 |           3 |        9 |         3 |     1 | 292797.144074952 | 746421.144074952 |         0 |       450000 | 1196421.14407495
+  34 |              5 |          0 |           4 |        9 |         2 |     5 | 113576.005972599 | 1309997.15004755 |         0 |       450000 | 1759997.15004755
+  35 |              5 |          0 |           5 |        1 |         3 |     1 |                0 | 1759997.15004755 |         0 |       450000 | 2209997.15004755
+  36 |              5 |          0 |           6 |        1 |         2 |     5 |                0 | 2209997.15004755 |         0 |       450000 | 2659997.15004755
+  37 |              5 |          0 |           7 |       37 |         3 |     0 |                0 | 2659997.15004755 |         0 |       450000 | 3109997.15004755
+  38 |              5 |          0 |           8 |       -1 |         6 |     0 | 306041.534309013 | 3416038.68435656 |         0 |            0 | 3416038.68435656
+  39 |              6 |          0 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
+  40 |              6 |          0 |           2 |       45 |         2 |     5 |                0 |                0 |      3624 |       450000 |           453624
+  41 |              6 |          0 |           3 |       57 |         3 |     4 | 292797.144074952 | 746421.144074952 |         0 |       450000 | 1196421.14407495
+  42 |              6 |          0 |           4 |       57 |         2 |     5 |                0 | 1196421.14407495 |         0 |       450000 | 1646421.14407495
+  43 |              6 |          0 |           5 |       45 |         3 |     0 |                0 | 1646421.14407495 |         0 |       450000 | 2096421.14407495
+  44 |              6 |          0 |           6 |       -1 |         6 |     0 | 292797.144074952 |  2389218.2881499 |         0 |            0 |  2389218.2881499
+  45 |              7 |          0 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
+  46 |              7 |          0 |           2 |       31 |         2 |     2 | 1790509.59682434 | 1790509.59682434 |         0 |       450000 | 2240509.59682434
+  47 |              7 |          0 |           3 |       27 |         2 |     4 |                0 | 2240509.59682434 |         0 |       450000 | 2690509.59682434
+  48 |              7 |          0 |           4 |       27 |         3 |     2 | 2385416.91452406 | 5075926.51134839 |         0 |       450000 | 5525926.51134839
+  49 |              7 |          0 |           5 |       31 |         3 |     0 | 618224.886851279 | 6144151.39819967 |         0 |       450000 | 6594151.39819967
+  50 |              7 |          0 |           6 |       -1 |         6 |     0 |                0 | 6594151.39819967 |         0 |            0 | 6594151.39819967
+  51 |              8 |          0 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
+  52 |              8 |          0 |           2 |       65 |         2 |     1 |  117625.62597458 |  117625.62597458 |         0 |       450000 |  567625.62597458
+  53 |              8 |          0 |           3 |       29 |         2 |     3 | 1727813.70643971 | 2295439.33241429 |         0 |       450000 | 2745439.33241429
+  54 |              8 |          0 |           4 |       35 |         2 |     5 |                0 | 2745439.33241429 |         0 |       450000 | 3195439.33241429
+  55 |              8 |          0 |           5 |       29 |         3 |     3 |                0 | 3195439.33241429 |         0 |       450000 | 3645439.33241429
+  56 |              8 |          0 |           6 |       65 |         3 |     2 |                0 | 3645439.33241429 |         0 |       450000 | 4095439.33241429
+  57 |              8 |          0 |           7 |       35 |         3 |     0 | 1727813.70643971 | 5823253.03885399 |         0 |       450000 | 6273253.03885399
+  58 |              8 |          0 |           8 |       -1 |         6 |     0 |  117625.62597458 | 6390878.66482857 |         0 |            0 | 6390878.66482857
+  59 |              9 |          0 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
+  60 |              9 |          0 |           2 |       61 |         2 |     1 |  117625.62597458 |  117625.62597458 |         0 |       450000 |  567625.62597458
+  61 |              9 |          0 |           3 |       33 |         2 |     3 | 1727813.70643971 | 2295439.33241429 |         0 |       450000 | 2745439.33241429
+  62 |              9 |          0 |           4 |       25 |         2 |     5 |                0 | 2745439.33241429 |         0 |       450000 | 3195439.33241429
+  63 |              9 |          0 |           5 |       33 |         3 |     3 | 1979653.01367811 |  5175092.3460924 |         0 |       450000 |  5625092.3460924
+  64 |              9 |          0 |           6 |       25 |         3 |     1 | 113576.005972599 |   5738668.352065 |         0 |       450000 |   6188668.352065
+  65 |              9 |          0 |           7 |       61 |         3 |     0 |                0 |   6188668.352065 |         0 |       450000 |   6638668.352065
+  66 |              9 |          0 |           8 |       -1 |         6 |     0 | 306041.534309013 | 6944709.88637401 |         0 |            0 | 6944709.88637401
+  67 |             10 |          0 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
+  68 |             10 |          0 |           2 |       63 |         2 |     1 |  117625.62597458 |  117625.62597458 |         0 |       450000 |  567625.62597458
+  69 |             10 |          0 |           3 |       59 |         3 |     0 |                0 |  567625.62597458 |         0 |       450000 | 1017625.62597458
+  70 |             10 |          0 |           4 |       59 |         2 |     1 | 410312.649059432 | 1427938.27503401 |         0 |       450000 | 1877938.27503401
+  71 |             10 |          0 |           5 |       19 |         2 |     5 |  413814.30003113 | 2291752.57506514 |         0 |       450000 | 2741752.57506514
+  72 |             10 |          0 |           6 |       63 |         3 |     4 |                0 | 2741752.57506514 |         0 |       450000 | 3191752.57506514
+  73 |             10 |          0 |           7 |       19 |         3 |     0 | 618224.886851279 | 3809977.46191642 |         0 |       450000 | 4259977.46191642
+  74 |             10 |          0 |           8 |       -1 |         6 |     0 |                0 | 4259977.46191642 |         0 |            0 | 4259977.46191642
+  75 |             11 |         -1 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
+  76 |             11 |         -1 |           2 |        5 |         2 |     4 | 306041.534309013 | 306041.534309013 |         0 |       450000 | 756041.534309013
+  77 |             11 |         -1 |           3 |       49 |         3 |     3 |                0 | 756041.534309013 |         0 |       450000 | 1206041.53430901
+  78 |             11 |         -1 |           4 |       49 |         2 |     4 | 113576.005972599 | 1319617.54028161 |         0 |       450000 | 1769617.54028161
+  79 |             11 |         -1 |           5 |       53 |         2 |     5 |                0 | 1769617.54028161 |         0 |       450000 | 2219617.54028161
+  80 |             11 |         -1 |           6 |        5 |         3 |     1 | 1979653.01367811 | 4199270.55395972 |         0 |       450000 | 4649270.55395972
+  81 |             11 |         -1 |           7 |       53 |         3 |     0 |                0 | 4649270.55395972 |         0 |       450000 | 5099270.55395972
+  82 |             11 |         -1 |           8 |       -1 |         6 |     0 | 1790509.59682434 | 6889780.15078406 |         0 |            0 | 6889780.15078406
+  83 |             12 |         -1 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
+  84 |             12 |         -1 |           2 |       71 |         2 |     1 |  117625.62597458 |  117625.62597458 |         0 |       450000 |  567625.62597458
+  85 |             12 |         -1 |           3 |       71 |         3 |     0 |                0 |  567625.62597458 |         0 |       450000 | 1017625.62597458
+  86 |             12 |         -1 |           4 |       69 |         2 |     1 |                0 | 1017625.62597458 |         0 |       450000 | 1467625.62597458
+  87 |             12 |         -1 |           5 |       69 |         3 |     0 | 410312.649059432 | 1877938.27503401 |         0 |       450000 | 2327938.27503401
+  88 |             12 |         -1 |           6 |       -1 |         6 |     0 | 292797.144074952 | 2620735.41910896 |         0 |            0 | 2620735.41910896
+  89 |             13 |         -1 |           1 |       -1 |         1 |     0 |                0 |                0 |         0 |            0 |                0
+  90 |             13 |         -1 |           2 |       41 |         2 |     5 |                0 |                0 |      3624 |       450000 |           453624
+  91 |             13 |         -1 |           3 |       11 |         2 |     9 | 306041.534309013 | 759665.534309013 |         0 |       450000 | 1209665.53430901
+  92 |             13 |         -1 |           4 |       23 |         2 |    13 | 327904.209196169 | 1537569.74350518 |         0 |       450000 | 1987569.74350518
+  93 |             13 |         -1 |           5 |       17 |         2 |    17 |                0 | 1987569.74350518 |         0 |       450000 | 2437569.74350518
+  94 |             13 |         -1 |           6 |       23 |         3 |    13 | 714704.698804085 | 3152274.44230927 |         0 |       450000 | 3602274.44230927
+  95 |             13 |         -1 |           7 |       11 |         3 |     9 |                0 | 3602274.44230927 |         0 |       450000 | 4052274.44230927
+  96 |             13 |         -1 |           8 |       41 |         3 |     4 | 1727813.70643971 | 5780088.14874897 |         0 |       450000 | 6230088.14874897
+  97 |             13 |         -1 |           9 |       17 |         3 |     0 |                0 | 6230088.14874897 |         0 |       450000 | 6680088.14874897
+  98 |             13 |         -1 |          10 |       -1 |         6 |     0 | 1790509.59682434 | 8470597.74557331 |         0 |            0 | 8470597.74557331
+  99 |             -2 |          0 |           0 |       -1 |        -1 |    -1 | 29529644.5429109 |               -1 |     18120 |     32400000 | 61947764.5429109
+(99 rows)
+
diff --git a/test/pickDeliver/jet_customers1.test.sql b/test/pickDeliver/jet_customers1.test.sql
new file mode 100644
index 0000000..50275c3
--- /dev/null
+++ b/test/pickDeliver/jet_customers1.test.sql
@@ -0,0 +1,120 @@
+
+-- drop table if exists jet_customers;
+-- drop table if exists jet_orders;
+-- drop table if exists jet_vehicles;
+
+
+CREATE TABLE jet_customers (
+    airport character varying,
+    id integer,
+    x double precision,
+    y double precision,
+    pindex integer,
+    dindex integer,
+    demand integer,
+    opentime double precision,
+    closetime double precision,
+    servicetime double precision
+);
+
+
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 1, 2320738.4688434978, 126348.38967116659, 0, 2, 4, 3448, 2853448, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 3, 2320738.4688434978, 126348.38967116659, 0, 4, 4, 3448, 2853448, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 5, 2320738.4688434978, 126348.38967116659, 0, 6, 4, 3448, 2853448, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 7, 2320738.4688434978, 126348.38967116659, 0, 8, 4, 3448, 2853448, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 9, 2320738.4688434978, 126348.38967116659, 0, 10, 4, 3448, 2853448, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 11, 2320738.4688434978, 126348.38967116659, 0, 12, 4, 3448, 2853448, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 13, 2383186.1525343237, 448251.25888828852, 0, 14, 4, 3463, 2853463, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 15, 2383186.1525343237, 448251.25888828852, 0, 16, 4, 3463, 2853463, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 17, 2383186.1525343237, 448251.25888828852, 0, 18, 4, 3463, 2853463, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 19, 2383186.1525343237, 448251.25888828852, 0, 20, 4, 3463, 2853463, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 21, 2383186.1525343237, 448251.25888828852, 0, 22, 4, 3463, 2853463, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 23, 2383186.1525343237, 448251.25888828852, 0, 24, 4, 3463, 2853463, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 25, 1981144.5525029898, -1903041.2384292425, 0, 26, 2, 3576, 2853576, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 27, 1981144.5525029898, -1903041.2384292425, 0, 28, 2, 3576, 2853576, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 29, 1981144.5525029898, -1903041.2384292425, 0, 30, 2, 3576, 2853576, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 31, 1981144.5525029898, -1903041.2384292425, 0, 32, 2, 3576, 2853576, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 33, 1981144.5525029898, -1903041.2384292425, 0, 34, 2, 3576, 2853576, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 35, 1981144.5525029898, -1903041.2384292425, 0, 36, 2, 3576, 2853576, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 37, 2138409.5568088419, -119451.50568778868, 0, 38, 5, 3624, 2853624, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 39, 2138409.5568088419, -119451.50568778868, 0, 40, 5, 3624, 2853624, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 41, 2138409.5568088419, -119451.50568778868, 0, 42, 5, 3624, 2853624, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 43, 2138409.5568088419, -119451.50568778868, 0, 44, 5, 3624, 2853624, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 45, 2138409.5568088419, -119451.50568778868, 0, 46, 5, 3624, 2853624, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 47, 2138409.5568088419, -119451.50568778868, 0, 48, 5, 3624, 2853624, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 49, 2387491.1007072991, 34459.351848672632, 0, 50, 1, 4265, 2854265, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 51, 2387491.1007072991, 34459.351848672632, 0, 52, 1, 4265, 2854265, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 53, 2387491.1007072991, 34459.351848672632, 0, 54, 1, 4265, 2854265, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 55, 2387491.1007072991, 34459.351848672632, 0, 56, 1, 4265, 2854265, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 57, 2387491.1007072991, 34459.351848672632, 0, 58, 1, 4265, 2854265, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 59, 2387491.1007072991, 34459.351848672632, 0, 60, 1, 4265, 2854265, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 61, 2035310.7411768832, -176076.78362264115, 0, 62, 1, 4355, 2854355, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 63, 2035310.7411768832, -176076.78362264115, 0, 64, 1, 4355, 2854355, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 65, 2035310.7411768832, -176076.78362264115, 0, 66, 1, 4355, 2854355, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 67, 2035310.7411768832, -176076.78362264115, 0, 68, 1, 4355, 2854355, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 69, 2035310.7411768832, -176076.78362264115, 0, 70, 1, 4355, 2854355, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 71, 2035310.7411768832, -176076.78362264115, 0, 72, 1, 4355, 2854355, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 2, 2320738.4688434978, 126348.38967116659, 1, 0, -4, 3448, 6903448, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 4, 2383186.1525343237, 448251.25888828852, 3, 0, -4, 3448, 6903448, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 6, 1981144.5525029898, -1903041.2384292425, 5, 0, -4, 3448, 6903448, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 8, 2138409.5568088419, -119451.50568778868, 7, 0, -4, 3448, 6903448, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 10, 2387491.1007072991, 34459.351848672632, 9, 0, -4, 3448, 6903448, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 12, 2035310.7411768832, -176076.78362264115, 11, 0, -4, 3448, 6903448, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 14, 2320738.4688434978, 126348.38967116659, 13, 0, -4, 3463, 6903463, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 16, 2383186.1525343237, 448251.25888828852, 15, 0, -4, 3463, 6903463, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 18, 1981144.5525029898, -1903041.2384292425, 17, 0, -4, 3463, 6903463, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 20, 2138409.5568088419, -119451.50568778868, 19, 0, -4, 3463, 6903463, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 22, 2387491.1007072991, 34459.351848672632, 21, 0, -4, 3463, 6903463, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 24, 2035310.7411768832, -176076.78362264115, 23, 0, -4, 3463, 6903463, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 26, 2320738.4688434978, 126348.38967116659, 25, 0, -2, 3576, 6903576, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 28, 2383186.1525343237, 448251.25888828852, 27, 0, -2, 3576, 6903576, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 30, 1981144.5525029898, -1903041.2384292425, 29, 0, -2, 3576, 6903576, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 32, 2138409.5568088419, -119451.50568778868, 31, 0, -2, 3576, 6903576, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 34, 2387491.1007072991, 34459.351848672632, 33, 0, -2, 3576, 6903576, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 36, 2035310.7411768832, -176076.78362264115, 35, 0, -2, 3576, 6903576, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 38, 2320738.4688434978, 126348.38967116659, 37, 0, -5, 3624, 6903624, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 40, 2383186.1525343237, 448251.25888828852, 39, 0, -5, 3624, 6903624, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 42, 1981144.5525029898, -1903041.2384292425, 41, 0, -5, 3624, 6903624, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 44, 2138409.5568088419, -119451.50568778868, 43, 0, -5, 3624, 6903624, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 46, 2387491.1007072991, 34459.351848672632, 45, 0, -5, 3624, 6903624, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 48, 2035310.7411768832, -176076.78362264115, 47, 0, -5, 3624, 6903624, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 50, 2320738.4688434978, 126348.38967116659, 49, 0, -1, 4265, 6904265, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 52, 2383186.1525343237, 448251.25888828852, 51, 0, -1, 4265, 6904265, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 54, 1981144.5525029898, -1903041.2384292425, 53, 0, -1, 4265, 6904265, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 56, 2138409.5568088419, -119451.50568778868, 55, 0, -1, 4265, 6904265, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 58, 2387491.1007072991, 34459.351848672632, 57, 0, -1, 4265, 6904265, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 60, 2035310.7411768832, -176076.78362264115, 59, 0, -1, 4265, 6904265, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BOS', 62, 2320738.4688434978, 126348.38967116659, 61, 0, -1, 4355, 6904355, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('BGR', 64, 2383186.1525343237, 448251.25888828852, 63, 0, -1, 4355, 6904355, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MIA', 66, 1981144.5525029898, -1903041.2384292425, 65, 0, -1, 4355, 6904355, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 68, 2138409.5568088419, -119451.50568778868, 67, 0, -1, 4355, 6904355, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('MVY', 70, 2387491.1007072991, 34459.351848672632, 69, 0, -1, 4355, 6904355, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('ABE', 72, 2035310.7411768832, -176076.78362264115, 71, 0, -1, 4355, 6904355, 450000);
+INSERT INTO jet_customers (airport, id, x, y, pindex, dindex, demand, opentime, closetime, servicetime) VALUES ('TEB', 0, 2138409.5568088419, -119451.50568778868, 0, 0, 0, 0, 7200000, 0);
+
+
+-- converting data to use euclidean
+WITH
+customer_data AS (SELECT * FROM jet_customers),
+pickups AS (
+    SELECT id, demand, x as p_x, y as p_y, opentime as p_open, closetime as p_close, servicetime as p_service
+    FROM  customer_data WHERE pindex = 0 AND id != 0
+),
+deliveries AS (
+    SELECT pindex AS id, x as d_x, y as d_y, opentime as d_open, closetime as d_close, servicetime as d_service
+    FROM  customer_data WHERE dindex = 0 AND id != 0
+)
+SELECT * INTO jet_orders FROM pickups JOIN deliveries USING(id) ORDER BY pickups.id;
+
+WITH
+customer_data AS (select * from jet_customers)
+SELECT id, x AS start_x, y AS start_y,
+    opentime AS start_open, closetime AS start_close,
+    5 AS capacity,  10  AS number INTO jet_vehicles
+FROM customer_data WHERE id = 0 LIMIT 1;
+
+SELECT *
+FROM _pgr_pickDeliverEuclidean(
+    $$ SELECT * from jet_orders $$,
+    $$ SELECT * FROM jet_vehicles $$
+)
diff --git a/test/pickDeliver/notTestingYet/pickDeliver-innerquery.sql b/test/pickDeliver/notTestingYet/pickDeliver-innerquery.sql
new file mode 100644
index 0000000..1b03ee6
--- /dev/null
+++ b/test/pickDeliver/notTestingYet/pickDeliver-innerquery.sql
@@ -0,0 +1,391 @@
+\i setup.sql
+
+SELECT plan(122);
+
+SELECT todo_start('not ready yet');
+
+/* A call looks like this
+SELECT * INTO pickDeliverResults FROM _pgr_pickdeliver(
+    $$SELECT * FROM orders ORDER BY id$$,
+    $$SELECT * FROM vehicles ORDER BY id$$,
+    $$SELECT * FROM dist_matrix$$,
+    30);
+*/
+
+SELECT has_function('_pgr_pickdeliver',
+    ARRAY['text', 'text', 'text', 'integer']);
+
+SELECT function_returns('_pgr_pickdeliver',
+    ARRAY['text', 'text', 'text', 'integer'],
+    'setof record');
+
+/* testing the pick/deliver orders*/
+CREATE OR REPLACE FUNCTION test_anyInteger_orders(fn TEXT, params TEXT[], parameter TEXT)
+RETURNS SETOF TEXT AS
+$BODY$
+DECLARE
+start_sql TEXT;
+end_sql TEXT;
+query TEXT;
+p TEXT;
+BEGIN
+    start_sql = 'select * from ' || fn || '($$ SELECT ';
+    FOREACH  p IN ARRAY params LOOP
+        IF p = parameter THEN CONTINUE;
+        END IF;
+        start_sql = start_sql || p || ', ';
+    END LOOP;
+    end_sql = ' FROM orders WHERE id = 11$$,
+        $$SELECT * FROM vehicles ORDER BY id$$,
+        $$SELECT * FROM dist_matrix$$,
+        30)';
+
+    query := start_sql || parameter || '::SMALLINT ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::INTEGER ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::BIGINT ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::REAL ' || end_sql;
+    RETURN query SELECT throws_ok(query);
+
+    query := start_sql || parameter || '::FLOAT8 ' || end_sql;
+    RETURN query SELECT throws_ok(query);
+END;
+$BODY$ LANGUAGE plpgsql;
+
+/* testing the pick/deliver orders*/
+CREATE OR REPLACE FUNCTION test_anyNumerical_orders(fn TEXT, params TEXT[], parameter TEXT)
+RETURNS SETOF TEXT AS
+$BODY$
+DECLARE
+start_sql TEXT;
+end_sql TEXT;
+query TEXT;
+p TEXT;
+BEGIN
+    start_sql = 'select * from ' || fn || '($$ SELECT ';
+    FOREACH  p IN ARRAY params LOOP
+        IF p = parameter THEN CONTINUE;
+        END IF;
+        start_sql = start_sql || p || ', ';
+    END LOOP;
+    end_sql = ' FROM orders WHERE id = 11$$,
+        $$SELECT * FROM vehicles ORDER BY id$$,
+        $$SELECT * FROM dist_matrix$$,
+        30)';
+
+    query := start_sql || parameter || '::SMALLINT ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::INTEGER ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::BIGINT ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::REAL ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::FLOAT8 ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+END;
+$BODY$ LANGUAGE plpgsql;
+
+/*
+testing the pick/deliver vehicles
+*/
+CREATE OR REPLACE FUNCTION test_anyInteger_vehicles(fn TEXT, params TEXT[], parameter TEXT)
+RETURNS SETOF TEXT AS
+$BODY$
+DECLARE
+start_sql TEXT;
+end_sql TEXT;
+query TEXT;
+p TEXT;
+BEGIN
+    start_sql = 'SELECT * FROM ' || fn || '($$ SELECT * FROM orders WHERE id = 11$$, $$SELECT ';
+
+    FOREACH  p IN ARRAY params LOOP
+        IF p = parameter THEN CONTINUE;
+        END IF;
+        start_sql = start_sql || p || ', ';
+    END LOOP;
+    end_sql = ' FROM vehicles $$,
+        $$SELECT * FROM dist_matrix$$,
+        30)';
+
+    query := start_sql || parameter || '::SMALLINT ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::INTEGER ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::BIGINT ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::REAL ' || end_sql;
+    RETURN query SELECT throws_ok(query);
+
+    query := start_sql || parameter || '::FLOAT8 ' || end_sql;
+    RETURN query SELECT throws_ok(query);
+END;
+$BODY$ LANGUAGE plpgsql;
+
+/*
+testing the pick/deliver vehicles
+ */
+CREATE OR REPLACE FUNCTION test_anyNumerical_vehicles(fn TEXT, params TEXT[], parameter TEXT)
+RETURNS SETOF TEXT AS
+$BODY$
+DECLARE
+start_sql TEXT;
+end_sql TEXT;
+query TEXT;
+p TEXT;
+BEGIN
+    start_sql = 'SELECT * FROM ' || fn || '($$ SELECT * FROM orders WHERE id = 11$$, $$ SELECT ';
+    FOREACH  p IN ARRAY params LOOP
+        IF p = parameter THEN CONTINUE;
+        END IF;
+        start_sql = start_sql || p || ', ';
+    END LOOP;
+    end_sql = ' FROM vehicles $$,
+        $$SELECT * FROM dist_matrix$$,
+        30)';
+
+    query := start_sql || parameter || '::SMALLINT ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::INTEGER ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::BIGINT ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::REAL ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::FLOAT8 ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+END;
+$BODY$ LANGUAGE plpgsql;
+
+
+/*
+testing the pick/deliver matrix
+*/
+CREATE OR REPLACE FUNCTION test_anyInteger_matrix(fn TEXT, params TEXT[], parameter TEXT)
+RETURNS SETOF TEXT AS
+$BODY$
+DECLARE
+start_sql TEXT;
+end_sql TEXT;
+query TEXT;
+p TEXT;
+BEGIN
+    start_sql = 'SELECT * FROM ' || fn || '(
+        $$ SELECT * FROM orders WHERE id = 11$$,
+        $$ SELECT * FROM vehicles $$,
+        $$ SELECT ';
+
+    FOREACH  p IN ARRAY params LOOP
+        IF p = parameter THEN CONTINUE;
+        END IF;
+        start_sql = start_sql || p || ', ';
+    END LOOP;
+    end_sql = ' FROM dist_matrix $$,
+        30)';
+
+    query := start_sql || parameter || '::SMALLINT ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::INTEGER ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::BIGINT ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::REAL ' || end_sql;
+    RETURN query SELECT throws_ok(query);
+
+    query := start_sql || parameter || '::FLOAT8 ' || end_sql;
+    RETURN query SELECT throws_ok(query);
+END;
+$BODY$ LANGUAGE plpgsql;
+
+/*
+testing the pick/deliver vehicles
+ */
+CREATE OR REPLACE FUNCTION test_anyNumerical_matrix(fn TEXT, params TEXT[], parameter TEXT)
+RETURNS SETOF TEXT AS
+$BODY$
+DECLARE
+start_sql TEXT;
+end_sql TEXT;
+query TEXT;
+p TEXT;
+BEGIN
+    start_sql = 'SELECT * FROM ' || fn || '(
+        $$ SELECT * FROM orders WHERE id = 11$$,
+        $$ SELECT * FROM vehicles $$,
+        $$ SELECT ';
+
+    FOREACH  p IN ARRAY params LOOP
+        IF p = parameter THEN CONTINUE;
+        END IF;
+        start_sql = start_sql || p || ', ';
+    END LOOP;
+    end_sql = ' FROM dist_matrix $$,
+        30)';
+
+    query := start_sql || parameter || '::SMALLINT ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::INTEGER ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::BIGINT ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::REAL ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+
+    query := start_sql || parameter || '::FLOAT8 ' || end_sql;
+    RETURN query SELECT lives_ok(query);
+END;
+$BODY$ LANGUAGE plpgsql;
+
+
+SELECT test_anyInteger_orders('_pgr_pickdeliver',
+    ARRAY['id', 'demand',
+    'pick_node_id', 'pick_open', 'pick_close', 'pick_service',
+    'deliver_node_id', 'deliver_open', 'deliver_close', 'deliver_service'],
+    'id');
+SELECT test_anynumerical_orders('_pgr_pickdeliver',
+    ARRAY['id', 'demand',
+    'pick_node_id', 'pick_open', 'pick_close', 'pick_service',
+    'deliver_node_id', 'deliver_open', 'deliver_close', 'deliver_service'],
+    'demand');
+
+SELECT test_anyInteger_orders('_pgr_pickdeliver',
+    ARRAY['id', 'demand',
+    'pick_node_id', 'pick_open', 'pick_close', 'pick_service',
+    'deliver_node_id', 'deliver_open', 'deliver_close', 'deliver_service'],
+    'pick_node_id');
+SELECT test_anynumerical_orders('_pgr_pickdeliver',
+    ARRAY['id', 'demand',
+    'pick_node_id', 'pick_open', 'pick_close', 'pick_service',
+    'deliver_node_id', 'deliver_open', 'deliver_close', 'deliver_service'],
+    'pick_open');
+SELECT test_anynumerical_orders('_pgr_pickdeliver',
+    ARRAY['id', 'demand',
+    'pick_node_id', 'pick_open', 'pick_close', 'pick_service',
+    'deliver_node_id', 'deliver_open', 'deliver_close', 'deliver_service'],
+    'pick_close');
+SELECT test_anynumerical_orders('_pgr_pickdeliver',
+    ARRAY['id', 'demand',
+    'pick_node_id', 'pick_open', 'pick_close', 'pick_service',
+    'deliver_node_id', 'deliver_open', 'deliver_close', 'deliver_service'],
+    'pick_service');
+
+SELECT test_anyInteger_orders('_pgr_pickdeliver',
+    ARRAY['id', 'demand',
+    'pick_node_id', 'pick_open', 'pick_close', 'pick_service',
+    'deliver_node_id', 'deliver_open', 'deliver_close', 'deliver_service'],
+    'deliver_node_id');
+SELECT test_anynumerical_orders('_pgr_pickdeliver',
+    ARRAY['id', 'demand',
+    'pick_node_id', 'pick_open', 'pick_close', 'pick_service',
+    'deliver_node_id', 'deliver_open', 'deliver_close', 'deliver_service'],
+    'deliver_open');
+SELECT test_anynumerical_orders('_pgr_pickdeliver',
+    ARRAY['id', 'demand',
+    'pick_node_id', 'pick_open', 'pick_close', 'pick_service',
+    'deliver_node_id', 'deliver_open', 'deliver_close', 'deliver_service'],
+    'deliver_close');
+SELECT test_anynumerical_orders('_pgr_pickdeliver',
+    ARRAY['id', 'demand',
+    'pick_node_id', 'pick_open', 'pick_close', 'pick_service',
+    'deliver_node_id', 'deliver_open', 'deliver_close', 'deliver_service'],
+    'deliver_service');
+
+/* Currently this are not used TODO add when they are used
+    'end_x', 'end_y', 'end_open', 'end_close', 'end_service'],
+    'speed' is optional defaults to 1
+    'start_service' is optional defaults to 0
+*/
+/*
+without optional: number
+*/
+SELECT test_anyInteger_vehicles('_pgr_pickdeliver',
+    ARRAY['id', 'capacity',
+    'start_node_id', 'start_open', 'start_close'],
+    'id');
+SELECT test_anyNumerical_vehicles('_pgr_pickdeliver',
+    ARRAY['id', 'capacity',
+    'start_node_id', 'start_open', 'start_close'],
+    'capacity');
+SELECT test_anyInteger_vehicles('_pgr_pickdeliver',
+    ARRAY['id', 'capacity',
+    'start_node_id', 'start_open', 'start_close'],
+    'start_node_id');
+SELECT test_anyNumerical_vehicles('_pgr_pickdeliver',
+    ARRAY['id', 'capacity',
+    'start_node_id', 'start_open', 'start_close'],
+    'start_open');
+SELECT test_anyNumerical_vehicles('_pgr_pickdeliver',
+    ARRAY['id', 'capacity',
+    'start_node_id', 'start_open', 'start_close'],
+    'start_close');
+
+
+/*
+with optional: number
+*/
+SELECT test_anyInteger_vehicles('_pgr_pickdeliver',
+    ARRAY['id', 'capacity', 'number',
+    'start_node_id', 'start_open', 'start_close'],
+    'id');
+SELECT test_anyNumerical_vehicles('_pgr_pickdeliver',
+    ARRAY['id', 'capacity', 'number',
+    'start_node_id', 'start_open', 'start_close'],
+    'capacity');
+SELECT test_anyInteger_vehicles('_pgr_pickdeliver',
+    ARRAY['id', 'capacity', 'number',
+    'start_node_id', 'start_open', 'start_close'],
+    'number');
+SELECT test_anyInteger_vehicles('_pgr_pickdeliver',
+    ARRAY['id', 'capacity', 'number',
+    'start_node_id', 'start_open', 'start_close'],
+    'start_node_id');
+SELECT test_anyNumerical_vehicles('_pgr_pickdeliver',
+    ARRAY['id', 'capacity', 'number',
+    'start_node_id', 'start_open', 'start_close'],
+    'start_open');
+SELECT test_anyNumerical_vehicles('_pgr_pickdeliver',
+    ARRAY['id', 'capacity', 'number',
+    'start_node_id', 'start_open', 'start_close'],
+    'start_close');
+
+
+/*
+Testing the matrix
+*/
+SELECT test_anyInteger_matrix('_pgr_pickdeliver',
+    ARRAY['start_vid', 'end_vid', 'agg_cost'],
+    'start_vid');
+SELECT test_anyInteger_matrix('_pgr_pickdeliver',
+    ARRAY['start_vid', 'end_vid', 'agg_cost'],
+    'end_vid');
+SELECT test_anyNumerical_matrix('_pgr_pickdeliver',
+    ARRAY['start_vid', 'end_vid', 'agg_cost'],
+    'agg_cost');
+
+SELECT todo_end();
+
+SELECT finish();
+ROLLBACK;
diff --git a/src/pickDeliver/test/notTestingYet/pickDeliver-types_check.sql b/test/pickDeliver/notTestingYet/pickDeliver-types_check.sql
similarity index 100%
rename from src/pickDeliver/test/notTestingYet/pickDeliver-types_check.sql
rename to test/pickDeliver/notTestingYet/pickDeliver-types_check.sql
diff --git a/src/pickDeliver/test/notTestingYet/pickDeliver_types_check.sql b/test/pickDeliver/notTestingYet/pickDeliver_types_check.sql
similarity index 100%
rename from src/pickDeliver/test/notTestingYet/pickDeliver_types_check.sql
rename to test/pickDeliver/notTestingYet/pickDeliver_types_check.sql
diff --git a/test/pickDeliver/past_example.result b/test/pickDeliver/past_example.result
new file mode 100644
index 0000000..7cfc562
--- /dev/null
+++ b/test/pickDeliver/past_example.result
@@ -0,0 +1,266 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+DROP TABLE IF EXISTS orders CASCADE;
+DROP TABLE
+DROP TABLE IF EXISTS vehicles CASCADE;
+DROP TABLE
+DROP TABLE IF EXISTS dist_matrix CASCADE;
+psql:tools/testers/pickDeliver_pgtap_data.sql:4: NOTICE:  table "dist_matrix" does not exist, skipping
+DROP TABLE
+CREATE TABLE orders (
+      id BIGINT PRIMARY KEY,
+      demand FLOAT,
+      p_node_id BIGINT,
+      p_x FLOAT,
+      p_y FLOAT,
+      p_open FLOAT,
+      p_close FLOAT,
+      p_service FLOAT,
+      d_node_id BIGINT,
+      d_x FLOAT,
+      d_y FLOAT,
+      d_open FLOAT,
+      d_close FLOAT,
+      d_service FLOAT
+);
+CREATE TABLE
+CREATE TABLE vehicles (
+  id BIGSERIAL PRIMARY KEY,
+  start_node_id BIGINT,
+  start_x FLOAT,
+  start_y FLOAT,
+  start_open FLOAT,
+  start_close FLOAT,
+  "number" integer,
+  capacity FLOAT
+);
+CREATE TABLE
+INSERT INTO orders (id,  demand,
+p_x,  p_y ,  p_open,  p_close,  p_service,
+d_x,  d_y ,  d_open,  d_close,  d_service)
+VALUES
+(3,  10, 42, 66,   65,  146, 90, 45, 65, 997, 1068, 90),
+(5,  10, 42, 65,   15,   67, 90, 40, 66, 170,  225, 90),
+(6,  20, 40, 69,  621,  702, 90, 45, 70, 825,  870, 90),
+(8,  20, 38, 68,  255,  324, 90, 35, 66, 357,  410, 90),
+(9,  10, 38, 70,  534,  605, 90, 42, 68, 727,  782, 90),
+(11, 10, 35, 69,  448,  505, 90, 45, 68, 912,  967, 90),
+(13, 30, 22, 75,   30,   92, 90, 18, 75,  99,  148, 90),
+(16, 40, 20, 85,  475,  528, 90, 22, 85, 567,  620, 90),
+(18, 20, 15, 75,  179,  254, 90, 25, 85, 652,  721, 90),
+(19, 10, 15, 80,  278,  345, 90, 20, 80, 384,  429, 90),
+(20, 10, 30, 50,   10,   73, 90, 25, 50,  65,  144, 90),
+(23, 10, 28, 55,  732,  777,  0, 28, 55, 732,  777, 90),
+(25, 40, 25, 52,  169,  224, 90, 23, 52, 261,  316, 90),
+(28, 20, 23, 55,  546,  593, 90, 28, 52, 812,  883, 90),
+(29, 10, 20, 50,  358,  405, 90, 25, 55, 622,  701, 90),
+(30, 10, 20, 55,  449,  504, 90, 30, 52, 914,  965, 90),
+(32, 30, 10, 40,   31,  100, 90, 10, 35, 200,  237, 90),
+(33, 40,  8, 40,   87,  158, 90,  2, 40, 383,  434, 90),
+(35, 10,  5, 35,  283,  344, 90,  0, 45, 567,  624, 90),
+(36, 10,  5, 45,  665,  716,  0,  5, 45, 665,  716, 90),
+(38, 30,  0, 40,  479,  522, 90,  8, 45, 751,  816, 90),
+(42, 20, 33, 32,   68,  149, 90, 35, 30, 264,  321, 90),
+(43, 10, 33, 35,   16,   80, 90, 35, 32, 166,  235, 90),
+(44, 10, 32, 30,  359,  412, 90, 30, 32, 448,  509, 90),
+(45, 10, 30, 30,  541,  600, 90, 28, 30, 632,  693, 90),
+(49, 10, 28, 35, 1001, 1066, 90, 30, 35,1054, 1127, 90),
+(50, 10, 26, 32,  815,  880, 90, 25, 35, 912,  969, 90),
+(51, 10, 25, 30,  725,  786,  0, 25, 30, 725,  786, 90),
+(53, 20, 44,  5,  286,  347, 90, 38,  5, 471,  534, 90),
+(54, 40, 42, 10,  186,  257, 90, 35,  5, 562,  629, 90),
+(56, 30, 40,  5,  385,  436, 90, 38, 15, 651,  740, 90),
+(57, 40, 40, 15,   35,   87, 90, 42, 15,  95,  158, 90),
+(62, 20, 50, 35,  262,  317, 90, 45, 30, 734,  777, 90),
+(63, 50, 50, 40,  171,  218, 90, 53, 35, 353,  412, 90),
+(64, 10, 48, 30,  632,  693,  0, 48, 30, 632,  693, 90),
+(65, 10, 48, 40,   76,  129, 90, 53, 30, 450,  505, 90),
+(66, 10, 47, 35,  826,  875, 90, 45, 35, 916,  969, 90),
+(67, 10, 47, 40,   12,   77, 90, 50, 30, 531,  610, 90),
+(71, 20, 95, 35,  293,  360, 90, 88, 30, 574,  643, 90),
+(76, 10, 90, 35,  203,  260, 90, 92, 30, 478,  551, 90),
+(78, 20, 88, 35,  109,  170,  0, 88, 35, 109,  170, 90),
+(79, 10, 87, 30,  668,  731, 90, 85, 25, 769,  820, 90),
+(81, 30, 85, 35,   47,  124, 90, 95, 30, 387,  456, 90),
+(82, 20, 75, 55,  369,  420, 90, 68, 60, 555,  612, 90),
+(84, 20, 70, 58,  458,  523, 90, 63, 58, 737,  802, 90),
+(86, 10, 66, 55,  173,  238, 90, 60, 60, 836,  889, 90),
+(87, 20, 65, 55,   85,  144, 90, 72, 55, 265,  338, 90),
+(90, 10, 60, 55,   20,   84, 90, 65, 60, 645,  708, 90),
+(92, 20, 67, 85,  368,  441, 90, 65, 85, 475,  518, 90),
+(96, 10, 60, 80,   95,  156, 90, 65, 82, 285,  336, 90),
+(97, 30, 60, 85,  561,  622,  0, 60, 85, 561,  622, 90),
+(98, 20, 58, 75,   30,   84, 90, 62, 80, 196,  239, 90),
+(100,20, 55, 85,  647,  726, 90, 55, 80, 743,  820, 90);
+INSERT 0 53
+INSERT INTO vehicles (start_x,  start_y,  start_open,  start_close,  "number",  capacity)
+VALUES (40,  50,  0,  1236,  25,  200);
+INSERT 0 1
+WITH points AS (
+    SELECT DISTINCT p_x AS x, p_y AS y FROM orders
+    UNION
+    SELECT DISTINCT d_x, d_y FROM orders),
+t_points AS (SELECT row_number() over() AS id, x, y FROM points),
+first  AS (SELECT orders.id AS id , t_points.id AS p_node_id from orders JOIN t_points ON (x = p_x AND y = p_y)),
+second AS (SELECT orders.id AS id , t_points.id AS d_node_id from orders JOIN t_points ON (x = d_x AND y = d_y)),
+third  AS (SELECT id, p_node_id, d_node_id from first JOIN second USING (id))
+UPDATE orders SET p_node_id = third.p_node_id, d_node_id = third.d_node_id
+FROM third WHERE third.id = orders.id;
+UPDATE 53
+WITH
+the_ids AS (SELECT p_node_id AS id FROM orders UNION SELECT d_node_id FROM orders),
+the_max AS (SELECT max(id) FROM the_ids)
+UPDATE vehicles SET start_node_id = max+1 FROM the_max;
+UPDATE 1
+/*
+WITH
+A AS (
+    SELECT p_node_id AS id, p_x AS x, p_y AS y FROM orders
+    UNION
+    SELECT d_node_id, d_x, d_y FROM orders
+    UNION
+    SELECT start_node_id, start_x, start_y FROM vehicles
+)
+SELECT A.id AS start_vid, B.id AS end_vid, sqrt( (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y)) AS agg_cost
+INTO dist_matrix
+FROM A, A AS B WHERE A.id != B.id;
+*/
+SELECT * FROM _pgr_pickDeliverEuclidean(
+    'SELECT * FROM orders ORDER BY id',
+    'SELECT * from vehicles'
+);
+ seq | vehicle_seq | vehicle_id | stop_seq | stop_type | order_id | cargo |   travel_time    |   arrival_time   | wait_time | service_time |  departure_time
+-----+-------------+------------+----------+-----------+----------+-------+------------------+------------------+-----------+--------------+------------------
+   1 |           1 |          1 |        1 |         1 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
+   2 |           1 |          1 |        2 |         2 |       13 |    30 | 30.8058436014987 | 30.8058436014987 |         0 |           90 | 120.805843601499
+   3 |           1 |          1 |        3 |         3 |       13 |     0 |                4 | 124.805843601499 |         0 |           90 | 214.805843601499
+   4 |           1 |          1 |        4 |         2 |       18 |    20 |                3 | 217.805843601499 |         0 |           90 | 307.805843601499
+   5 |           1 |          1 |        5 |         2 |       19 |    30 |                5 | 312.805843601499 |         0 |           90 | 402.805843601499
+   6 |           1 |          1 |        6 |         3 |       19 |    20 |                5 | 407.805843601499 |         0 |           90 | 497.805843601499
+   7 |           1 |          1 |        7 |         2 |       16 |    60 |                5 | 502.805843601499 |         0 |           90 | 592.805843601499
+   8 |           1 |          1 |        8 |         3 |       16 |    20 |                2 | 594.805843601499 |         0 |           90 | 684.805843601499
+   9 |           1 |          1 |        9 |         3 |       18 |     0 |                3 | 687.805843601499 |         0 |           90 | 777.805843601499
+  10 |           1 |          1 |       10 |         2 |       50 |    10 | 53.0094331227943 | 830.815276724293 |         0 |           90 | 920.815276724293
+  11 |           1 |          1 |       11 |         3 |       50 |     0 | 3.16227766016838 | 923.977554384461 |         0 |           90 | 1013.97755438446
+  12 |           1 |          1 |       12 |         2 |       49 |    10 |                3 | 1016.97755438446 |         0 |           90 | 1106.97755438446
+  13 |           1 |          1 |       13 |         3 |       49 |     0 |                2 | 1108.97755438446 |         0 |           90 | 1198.97755438446
+  14 |           1 |          1 |       14 |         6 |       -1 |     0 | 18.0277563773199 | 1217.00531076178 |         0 |            0 | 1217.00531076178
+  15 |           2 |          1 |        1 |         1 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
+  16 |           2 |          1 |        2 |         2 |        5 |    10 | 15.1327459504216 | 15.1327459504216 |         0 |           90 | 105.132745950422
+  17 |           2 |          1 |        3 |         2 |        3 |    20 |                1 | 106.132745950422 |         0 |           90 | 196.132745950422
+  18 |           2 |          1 |        4 |         3 |        5 |    10 |                2 | 198.132745950422 |         0 |           90 | 288.132745950422
+  19 |           2 |          1 |        5 |         2 |        8 |    30 | 2.82842712474619 | 290.961173075168 |         0 |           90 | 380.961173075168
+  20 |           2 |          1 |        6 |         3 |        8 |    10 | 3.60555127546399 | 384.566724350632 |         0 |           90 | 474.566724350632
+  21 |           2 |          1 |        7 |         2 |       11 |    20 |                3 | 477.566724350632 |         0 |           90 | 567.566724350632
+  22 |           2 |          1 |        8 |         2 |        9 |    30 | 3.16227766016838 |   570.7290020108 |         0 |           90 |   660.7290020108
+  23 |           2 |          1 |        9 |         2 |        6 |    50 | 2.23606797749979 |   662.9650699883 |         0 |           90 |   752.9650699883
+  24 |           2 |          1 |       10 |         3 |        9 |    40 | 2.23606797749979 |   755.2011379658 |         0 |           90 |   845.2011379658
+  25 |           2 |          1 |       11 |         3 |        6 |    20 | 3.60555127546399 | 848.806689241264 |         0 |           90 | 938.806689241264
+  26 |           2 |          1 |       12 |         3 |       11 |    10 |                2 | 940.806689241264 |         0 |           90 | 1030.80668924126
+  27 |           2 |          1 |       13 |         3 |        3 |     0 |                3 | 1033.80668924126 |         0 |           90 | 1123.80668924126
+  28 |           2 |          1 |       14 |         6 |       -1 |     0 | 15.8113883008419 | 1139.61807754211 |         0 |            0 | 1139.61807754211
+  29 |           3 |          1 |        1 |         1 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
+  30 |           3 |          1 |        2 |         2 |       43 |    10 | 16.5529453572468 | 16.5529453572468 |         0 |           90 | 106.552945357247
+  31 |           3 |          1 |        3 |         2 |       42 |    30 |                3 | 109.552945357247 |         0 |           90 | 199.552945357247
+  32 |           3 |          1 |        4 |         3 |       43 |    20 |                2 | 201.552945357247 |         0 |           90 | 291.552945357247
+  33 |           3 |          1 |        5 |         3 |       42 |     0 |                2 | 293.552945357247 |         0 |           90 | 383.552945357247
+  34 |           3 |          1 |        6 |         2 |       44 |    10 |                3 | 386.552945357247 |         0 |           90 | 476.552945357247
+  35 |           3 |          1 |        7 |         3 |       44 |     0 | 2.82842712474619 | 479.381372481993 |         0 |           90 | 569.381372481993
+  36 |           3 |          1 |        8 |         2 |       45 |    10 |                2 | 571.381372481993 |         0 |           90 | 661.381372481993
+  37 |           3 |          1 |        9 |         3 |       45 |     0 |                2 | 663.381372481993 |         0 |           90 | 753.381372481993
+  38 |           3 |          1 |       10 |         2 |       51 |    10 |                3 | 756.381372481993 |         0 |            0 | 756.381372481993
+  39 |           3 |          1 |       11 |         3 |       51 |     0 |                0 | 756.381372481993 |         0 |           90 | 846.381372481993
+  40 |           3 |          1 |       12 |         2 |       66 |    10 |  22.561028345357 |  868.94240082735 |         0 |           90 |  958.94240082735
+  41 |           3 |          1 |       13 |         3 |       66 |     0 |                2 |  960.94240082735 |         0 |           90 | 1050.94240082735
+  42 |           3 |          1 |       14 |         6 |       -1 |     0 | 15.8113883008419 | 1066.75378912819 |         0 |            0 | 1066.75378912819
+  43 |           4 |          1 |        1 |         1 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
+  44 |           4 |          1 |        2 |         2 |       20 |    10 |               10 |               10 |         0 |           90 |              100
+  45 |           4 |          1 |        3 |         3 |       20 |     0 |                5 |              105 |         0 |           90 |              195
+  46 |           4 |          1 |        4 |         2 |       25 |    40 |                2 |              197 |         0 |           90 |              287
+  47 |           4 |          1 |        5 |         3 |       25 |     0 |                2 |              289 |         0 |           90 |              379
+  48 |           4 |          1 |        6 |         2 |       29 |    10 | 3.60555127546399 | 382.605551275464 |         0 |           90 | 472.605551275464
+  49 |           4 |          1 |        7 |         2 |       30 |    20 |                5 | 477.605551275464 |         0 |           90 | 567.605551275464
+  50 |           4 |          1 |        8 |         2 |       28 |    40 |                3 | 570.605551275464 |         0 |           90 | 660.605551275464
+  51 |           4 |          1 |        9 |         3 |       29 |    30 |                2 | 662.605551275464 |         0 |           90 | 752.605551275464
+  52 |           4 |          1 |       10 |         2 |       23 |    40 |                3 | 755.605551275464 |         0 |            0 | 755.605551275464
+  53 |           4 |          1 |       11 |         3 |       23 |    30 |                0 | 755.605551275464 |         0 |           90 | 845.605551275464
+  54 |           4 |          1 |       12 |         3 |       28 |    10 |                3 | 848.605551275464 |         0 |           90 | 938.605551275464
+  55 |           4 |          1 |       13 |         3 |       30 |     0 |                2 | 940.605551275464 |         0 |           90 | 1030.60555127546
+  56 |           4 |          1 |       14 |         6 |       -1 |     0 | 10.1980390271856 | 1040.80359030265 |         0 |            0 | 1040.80359030265
+  57 |           5 |          1 |        1 |         1 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
+  58 |           5 |          1 |        2 |         2 |       90 |    10 | 20.6155281280883 | 20.6155281280883 |         0 |           90 | 110.615528128088
+  59 |           5 |          1 |        3 |         2 |       87 |    30 |                5 | 115.615528128088 |         0 |           90 | 205.615528128088
+  60 |           5 |          1 |        4 |         2 |       86 |    40 |                1 | 206.615528128088 |         0 |           90 | 296.615528128088
+  61 |           5 |          1 |        5 |         3 |       87 |    20 |                6 | 302.615528128088 |         0 |           90 | 392.615528128088
+  62 |           5 |          1 |        6 |         2 |       82 |    40 |                3 | 395.615528128088 |         0 |           90 | 485.615528128088
+  63 |           5 |          1 |        7 |         2 |       84 |    60 |  5.8309518948453 | 491.446480022934 |         0 |           90 | 581.446480022934
+  64 |           5 |          1 |        8 |         3 |       82 |    40 | 2.82842712474619 |  584.27490714768 |         0 |           90 |  674.27490714768
+  65 |           5 |          1 |        9 |         3 |       90 |    30 |                3 |  677.27490714768 |         0 |           90 |  767.27490714768
+  66 |           5 |          1 |       10 |         3 |       84 |    10 | 2.82842712474619 | 770.103334272426 |         0 |           90 | 860.103334272426
+  67 |           5 |          1 |       11 |         3 |       86 |     0 | 3.60555127546399 |  863.70888554789 |         0 |           90 |  953.70888554789
+  68 |           5 |          1 |       12 |         6 |       -1 |     0 | 22.3606797749979 | 976.069565322888 |         0 |            0 | 976.069565322888
+  69 |           6 |          1 |        1 |         1 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
+  70 |           6 |          1 |        2 |         2 |       81 |    30 | 47.4341649025257 | 47.4341649025257 |         0 |           90 | 137.434164902526
+  71 |           6 |          1 |        3 |         2 |       78 |    50 |                3 | 140.434164902526 |         0 |            0 | 140.434164902526
+  72 |           6 |          1 |        4 |         3 |       78 |    30 |                0 | 140.434164902526 |         0 |           90 | 230.434164902526
+  73 |           6 |          1 |        5 |         2 |       76 |    40 |                2 | 232.434164902526 |         0 |           90 | 322.434164902526
+  74 |           6 |          1 |        6 |         2 |       71 |    60 |                5 | 327.434164902526 |         0 |           90 | 417.434164902526
+  75 |           6 |          1 |        7 |         3 |       81 |    30 |                5 | 422.434164902526 |         0 |           90 | 512.434164902526
+  76 |           6 |          1 |        8 |         3 |       76 |    20 |                3 | 515.434164902526 |         0 |           90 | 605.434164902526
+  77 |           6 |          1 |        9 |         3 |       71 |     0 |                4 | 609.434164902526 |         0 |           90 | 699.434164902526
+  78 |           6 |          1 |       10 |         2 |       79 |    10 |                1 | 700.434164902526 |         0 |           90 | 790.434164902526
+  79 |           6 |          1 |       11 |         3 |       79 |     0 |  5.3851648071345 |  795.81932970966 |         0 |           90 |  885.81932970966
+  80 |           6 |          1 |       12 |         6 |       -1 |     0 |  51.478150704935 | 937.297480414595 |         0 |            0 | 937.297480414595
+  81 |           7 |          1 |        1 |         1 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
+  82 |           7 |          1 |        2 |         2 |       32 |    30 | 31.6227766016838 | 31.6227766016838 |         0 |           90 | 121.622776601684
+  83 |           7 |          1 |        3 |         2 |       33 |    70 |                2 | 123.622776601684 |         0 |           90 | 213.622776601684
+  84 |           7 |          1 |        4 |         3 |       32 |    40 |  5.3851648071345 | 219.007941408818 |         0 |           90 | 309.007941408818
+  85 |           7 |          1 |        5 |         2 |       35 |    50 |                5 | 314.007941408818 |         0 |           90 | 404.007941408818
+  86 |           7 |          1 |        6 |         3 |       33 |    10 |  5.8309518948453 | 409.838893303664 |         0 |           90 | 499.838893303664
+  87 |           7 |          1 |        7 |         2 |       38 |    40 |                2 | 501.838893303664 |         0 |           90 | 591.838893303664
+  88 |           7 |          1 |        8 |         3 |       35 |    30 |                5 | 596.838893303664 |         0 |           90 | 686.838893303664
+  89 |           7 |          1 |        9 |         2 |       36 |    40 |                5 | 691.838893303664 |         0 |            0 | 691.838893303664
+  90 |           7 |          1 |       10 |         3 |       36 |    30 |                0 | 691.838893303664 |         0 |           90 | 781.838893303664
+  91 |           7 |          1 |       11 |         3 |       38 |     0 |                3 | 784.838893303664 |         0 |           90 | 874.838893303664
+  92 |           7 |          1 |       12 |         6 |       -1 |     0 | 32.3882694814033 | 907.227162785067 |         0 |            0 | 907.227162785067
+  93 |           8 |          1 |        1 |         1 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
+  94 |           8 |          1 |        2 |         2 |       98 |    20 | 30.8058436014987 | 30.8058436014987 |         0 |           90 | 120.805843601499
+  95 |           8 |          1 |        3 |         2 |       96 |    30 |  5.3851648071345 | 126.191008408633 |         0 |           90 | 216.191008408633
+  96 |           8 |          1 |        4 |         3 |       98 |    10 |                2 | 218.191008408633 |         0 |           90 | 308.191008408633
+  97 |           8 |          1 |        5 |         3 |       96 |     0 | 3.60555127546399 | 311.796559684097 |         0 |           90 | 401.796559684097
+  98 |           8 |          1 |        6 |         2 |       92 |    20 | 3.60555127546399 | 405.402110959561 |         0 |           90 | 495.402110959561
+  99 |           8 |          1 |        7 |         3 |       92 |     0 |                2 | 497.402110959561 |         0 |           90 | 587.402110959561
+ 100 |           8 |          1 |        8 |         2 |       97 |    30 |                5 | 592.402110959561 |         0 |            0 | 592.402110959561
+ 101 |           8 |          1 |        9 |         3 |       97 |     0 |                0 | 592.402110959561 |         0 |           90 | 682.402110959561
+ 102 |           8 |          1 |       10 |         2 |      100 |    20 |                5 | 687.402110959561 |         0 |           90 | 777.402110959561
+ 103 |           8 |          1 |       11 |         3 |      100 |     0 |                5 | 782.402110959561 |         0 |           90 | 872.402110959561
+ 104 |           8 |          1 |       12 |         6 |       -1 |     0 | 33.5410196624968 | 905.943130622058 |         0 |            0 | 905.943130622058
+ 105 |           9 |          1 |        1 |         1 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
+ 106 |           9 |          1 |        2 |         2 |       67 |    10 | 12.2065556157337 | 12.2065556157337 |         0 |           90 | 102.206555615734
+ 107 |           9 |          1 |        3 |         2 |       65 |    20 |                1 | 103.206555615734 |         0 |           90 | 193.206555615734
+ 108 |           9 |          1 |        4 |         2 |       63 |    70 |                2 | 195.206555615734 |         0 |           90 | 285.206555615734
+ 109 |           9 |          1 |        5 |         2 |       62 |    90 |                5 | 290.206555615734 |         0 |           90 | 380.206555615734
+ 110 |           9 |          1 |        6 |         3 |       63 |    40 |                3 | 383.206555615734 |         0 |           90 | 473.206555615734
+ 111 |           9 |          1 |        7 |         3 |       65 |    30 |                5 | 478.206555615734 |         0 |           90 | 568.206555615734
+ 112 |           9 |          1 |        8 |         3 |       67 |    20 |                3 | 571.206555615734 |         0 |           90 | 661.206555615734
+ 113 |           9 |          1 |        9 |         2 |       64 |    30 |                2 | 663.206555615734 |         0 |            0 | 663.206555615734
+ 114 |           9 |          1 |       10 |         3 |       64 |    20 |                0 | 663.206555615734 |         0 |           90 | 753.206555615734
+ 115 |           9 |          1 |       11 |         3 |       62 |     0 |                3 | 756.206555615734 |         0 |           90 | 846.206555615734
+ 116 |           9 |          1 |       12 |         6 |       -1 |     0 | 20.6155281280883 | 866.822083743822 |         0 |            0 | 866.822083743822
+ 117 |          10 |          1 |        1 |         1 |       -1 |     0 |                0 |                0 |         0 |            0 |                0
+ 118 |          10 |          1 |        2 |         2 |       57 |    40 |               35 |               35 |         0 |           90 |              125
+ 119 |          10 |          1 |        3 |         3 |       57 |     0 |                2 |              127 |         0 |           90 |              217
+ 120 |          10 |          1 |        4 |         2 |       54 |    40 |                5 |              222 |         0 |           90 |              312
+ 121 |          10 |          1 |        5 |         2 |       53 |    60 |  5.3851648071345 | 317.385164807135 |         0 |           90 | 407.385164807135
+ 122 |          10 |          1 |        6 |         2 |       56 |    90 |                4 | 411.385164807135 |         0 |           90 | 501.385164807135
+ 123 |          10 |          1 |        7 |         3 |       53 |    70 |                2 | 503.385164807135 |         0 |           90 | 593.385164807135
+ 124 |          10 |          1 |        8 |         3 |       54 |    30 |                3 | 596.385164807135 |         0 |           90 | 686.385164807135
+ 125 |          10 |          1 |        9 |         3 |       56 |     0 | 10.4403065089106 | 696.825471316045 |         0 |           90 | 786.825471316045
+ 126 |          10 |          1 |       10 |         6 |       -1 |     0 | 35.0570962859162 | 821.882567601961 |         0 |            0 | 821.882567601961
+ 127 |          -2 |          0 |        0 |        -1 |       -1 |    -1 |  879.42275822512 |               -1 |         0 |         9000 | 9879.42275822512
+(127 rows)
+
+ROLLBACK;
+ROLLBACK
diff --git a/src/pickDeliver/test/past_example.test.sql b/test/pickDeliver/past_example.test.sql
similarity index 100%
rename from src/pickDeliver/test/past_example.test.sql
rename to test/pickDeliver/past_example.test.sql
diff --git a/src/pickDeliver/test/pickDeliver.result b/test/pickDeliver/pickDeliver.result
similarity index 100%
rename from src/pickDeliver/test/pickDeliver.result
rename to test/pickDeliver/pickDeliver.result
diff --git a/src/pickDeliver/test/pickDeliver.test.sql b/test/pickDeliver/pickDeliver.test.sql
similarity index 100%
rename from src/pickDeliver/test/pickDeliver.test.sql
rename to test/pickDeliver/pickDeliver.test.sql
diff --git a/src/pickDeliver/test/test.conf b/test/pickDeliver/test.conf
similarity index 100%
rename from src/pickDeliver/test/test.conf
rename to test/pickDeliver/test.conf
diff --git a/test/topology/analyzeOneway-any.result b/test/topology/analyzeOneway-any.result
new file mode 100644
index 0000000..89ac5e7
--- /dev/null
+++ b/test/topology/analyzeOneway-any.result
@@ -0,0 +1,25 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+SELECT pgr_analyzeOneway('edge_table',
+ARRAY['', 'B', 'TF'],
+ARRAY['', 'B', 'FT'],
+ARRAY['', 'B', 'FT'],
+ARRAY['', 'B', 'TF'],
+oneway:='dir');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeOneway('edge_table','{"",B,TF}','{"",B,FT}','{"",B,FT}','{"",B,TF}','dir','source','target',t)
+NOTICE:  Analyzing graph for one way street errors.
+NOTICE:  Analysis 25% complete ...
+NOTICE:  Analysis 50% complete ...
+NOTICE:  Analysis 75% complete ...
+NOTICE:  Analysis 100% complete ...
+NOTICE:  Found 0 potential problems in directionality
+ pgr_analyzeoneway
+-------------------
+ OK
+(1 row)
+
+ROLLBACK;
+ROLLBACK
diff --git a/src/topology/test/analyzeOneway-any.test.sql b/test/topology/analyzeOneway-any.test.sql
similarity index 100%
rename from src/topology/test/analyzeOneway-any.test.sql
rename to test/topology/analyzeOneway-any.test.sql
diff --git a/test/topology/createVertTab-any.result b/test/topology/createVertTab-any.result
new file mode 100644
index 0000000..fa62a55
--- /dev/null
+++ b/test/topology/createVertTab-any.result
@@ -0,0 +1,306 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+SELECT  pgr_createVerticesTable('edge_table');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createVerticesTable('edge_table','the_geom','source','target','true')
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Populating public.edge_table_vertices_pgr, please wait...
+NOTICE:    ----->   VERTICES TABLE CREATED WITH  17 VERTICES
+NOTICE:                                         FOR   18  EDGES
+NOTICE:    Edges with NULL geometry,source or target: 0
+NOTICE:                              Edges processed: 18
+NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createverticestable
+-------------------------
+ OK
+(1 row)
+
+SELECT  pgr_createVerticesTable('edge_table','the_geom','source','target');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createVerticesTable('edge_table','the_geom','source','target','true')
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Populating public.edge_table_vertices_pgr, please wait...
+NOTICE:    ----->   VERTICES TABLE CREATED WITH  17 VERTICES
+NOTICE:                                         FOR   18  EDGES
+NOTICE:    Edges with NULL geometry,source or target: 0
+NOTICE:                              Edges processed: 18
+NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createverticestable
+-------------------------
+ OK
+(1 row)
+
+SELECT  pgr_createVerticesTable('edge_table',the_geom:='the_geom',source:='source',target:='target');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createVerticesTable('edge_table','the_geom','source','target','true')
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Populating public.edge_table_vertices_pgr, please wait...
+NOTICE:    ----->   VERTICES TABLE CREATED WITH  17 VERTICES
+NOTICE:                                         FOR   18  EDGES
+NOTICE:    Edges with NULL geometry,source or target: 0
+NOTICE:                              Edges processed: 18
+NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createverticestable
+-------------------------
+ OK
+(1 row)
+
+SELECT  pgr_createVerticesTable('edge_table',source:='source',target:='target',the_geom:='the_geom');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createVerticesTable('edge_table','the_geom','source','target','true')
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Populating public.edge_table_vertices_pgr, please wait...
+NOTICE:    ----->   VERTICES TABLE CREATED WITH  17 VERTICES
+NOTICE:                                         FOR   18  EDGES
+NOTICE:    Edges with NULL geometry,source or target: 0
+NOTICE:                              Edges processed: 18
+NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createverticestable
+-------------------------
+ OK
+(1 row)
+
+SELECT  pgr_createVerticesTable('edge_table',source:='source');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createVerticesTable('edge_table','the_geom','source','target','true')
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Populating public.edge_table_vertices_pgr, please wait...
+NOTICE:    ----->   VERTICES TABLE CREATED WITH  17 VERTICES
+NOTICE:                                         FOR   18  EDGES
+NOTICE:    Edges with NULL geometry,source or target: 0
+NOTICE:                              Edges processed: 18
+NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createverticestable
+-------------------------
+ OK
+(1 row)
+
+SELECT  pgr_createVerticesTable('edge_table',rows_where:='id < 10');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createVerticesTable('edge_table','the_geom','source','target','id < 10')
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Populating public.edge_table_vertices_pgr, please wait...
+NOTICE:    ----->   VERTICES TABLE CREATED WITH  9 VERTICES
+NOTICE:                                         FOR   10  EDGES
+NOTICE:    Edges with NULL geometry,source or target: 0
+NOTICE:                              Edges processed: 10
+NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createverticestable
+-------------------------
+ OK
+(1 row)
+
+SELECT  pgr_createVerticesTable('edge_table',rows_where:='the_geom && (select st_buffer(the_geom,0.5) FROM edge_table WHERE id=5)');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createVerticesTable('edge_table','the_geom','source','target','the_geom && (select st_buffer(the_geom,0.5) FROM edge_table WHERE id=5)')
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Populating public.edge_table_vertices_pgr, please wait...
+NOTICE:    ----->   VERTICES TABLE CREATED WITH  9 VERTICES
+NOTICE:                                         FOR   9  EDGES
+NOTICE:    Edges with NULL geometry,source or target: 0
+NOTICE:                              Edges processed: 9
+NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createverticestable
+-------------------------
+ OK
+(1 row)
+
+CREATE TABLE otherTable AS  (SELECT 100 AS gid, st_point(2.5,2.5) AS other_geom) ;
+SELECT 1
+SELECT  pgr_createVerticesTable('edge_table',rows_where:='the_geom && (select st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createVerticesTable('edge_table','the_geom','source','target','the_geom && (select st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)')
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Populating public.edge_table_vertices_pgr, please wait...
+NOTICE:    ----->   VERTICES TABLE CREATED WITH  10 VERTICES
+NOTICE:                                         FOR   12  EDGES
+NOTICE:    Edges with NULL geometry,source or target: 0
+NOTICE:                              Edges processed: 12
+NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createverticestable
+-------------------------
+ OK
+(1 row)
+
+CREATE TABLE mytable AS (SELECT id AS gid, the_geom AS mygeom,source AS src ,target AS tgt FROM edge_table) ;
+SELECT 18
+SELECT  pgr_createVerticesTable('mytable','mygeom','src','tgt');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createVerticesTable('mytable','mygeom','src','tgt','true')
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Populating public.mytable_vertices_pgr, please wait...
+NOTICE:    ----->   VERTICES TABLE CREATED WITH  17 VERTICES
+NOTICE:                                         FOR   18  EDGES
+NOTICE:    Edges with NULL geometry,source or target: 0
+NOTICE:                              Edges processed: 18
+NOTICE:  Vertices table for table public.mytable is: public.mytable_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createverticestable
+-------------------------
+ OK
+(1 row)
+
+SELECT  pgr_createVerticesTable('mytable',the_geom:='mygeom',source:='src',target:='tgt');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createVerticesTable('mytable','mygeom','src','tgt','true')
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Populating public.mytable_vertices_pgr, please wait...
+NOTICE:    ----->   VERTICES TABLE CREATED WITH  17 VERTICES
+NOTICE:                                         FOR   18  EDGES
+NOTICE:    Edges with NULL geometry,source or target: 0
+NOTICE:                              Edges processed: 18
+NOTICE:  Vertices table for table public.mytable is: public.mytable_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createverticestable
+-------------------------
+ OK
+(1 row)
+
+SELECT  pgr_createVerticesTable('mytable',source:='src',target:='tgt',the_geom:='mygeom');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createVerticesTable('mytable','mygeom','src','tgt','true')
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Populating public.mytable_vertices_pgr, please wait...
+NOTICE:    ----->   VERTICES TABLE CREATED WITH  17 VERTICES
+NOTICE:                                         FOR   18  EDGES
+NOTICE:    Edges with NULL geometry,source or target: 0
+NOTICE:                              Edges processed: 18
+NOTICE:  Vertices table for table public.mytable is: public.mytable_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createverticestable
+-------------------------
+ OK
+(1 row)
+
+SELECT  pgr_createVerticesTable('mytable','mygeom','src','tgt',rows_where:='gid < 10');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createVerticesTable('mytable','mygeom','src','tgt','gid < 10')
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Populating public.mytable_vertices_pgr, please wait...
+NOTICE:    ----->   VERTICES TABLE CREATED WITH  9 VERTICES
+NOTICE:                                         FOR   10  EDGES
+NOTICE:    Edges with NULL geometry,source or target: 0
+NOTICE:                              Edges processed: 10
+NOTICE:  Vertices table for table public.mytable is: public.mytable_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createverticestable
+-------------------------
+ OK
+(1 row)
+
+SELECT  pgr_createVerticesTable('mytable',source:='src',target:='tgt',the_geom:='mygeom',rows_where:='gid < 10');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createVerticesTable('mytable','mygeom','src','tgt','gid < 10')
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Populating public.mytable_vertices_pgr, please wait...
+NOTICE:    ----->   VERTICES TABLE CREATED WITH  9 VERTICES
+NOTICE:                                         FOR   10  EDGES
+NOTICE:    Edges with NULL geometry,source or target: 0
+NOTICE:                              Edges processed: 10
+NOTICE:  Vertices table for table public.mytable is: public.mytable_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createverticestable
+-------------------------
+ OK
+(1 row)
+
+SELECT  pgr_createVerticesTable('mytable','mygeom','src','tgt',
+	                            rows_where:='mygeom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE gid=5)');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createVerticesTable('mytable','mygeom','src','tgt','mygeom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE gid=5)')
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Populating public.mytable_vertices_pgr, please wait...
+NOTICE:    ----->   VERTICES TABLE CREATED WITH  9 VERTICES
+NOTICE:                                         FOR   9  EDGES
+NOTICE:    Edges with NULL geometry,source or target: 0
+NOTICE:                              Edges processed: 9
+NOTICE:  Vertices table for table public.mytable is: public.mytable_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createverticestable
+-------------------------
+ OK
+(1 row)
+
+SELECT  pgr_createVerticesTable('mytable',source:='src',target:='tgt',the_geom:='mygeom',
+	                            rows_where:='mygeom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE gid=5)');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createVerticesTable('mytable','mygeom','src','tgt','mygeom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE gid=5)')
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Populating public.mytable_vertices_pgr, please wait...
+NOTICE:    ----->   VERTICES TABLE CREATED WITH  9 VERTICES
+NOTICE:                                         FOR   9  EDGES
+NOTICE:    Edges with NULL geometry,source or target: 0
+NOTICE:                              Edges processed: 9
+NOTICE:  Vertices table for table public.mytable is: public.mytable_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createverticestable
+-------------------------
+ OK
+(1 row)
+
+DROP TABLE IF EXISTS otherTable;
+DROP TABLE
+CREATE TABLE otherTable AS  (SELECT 100 AS gid, st_point(2.5,2.5) AS other_geom) ;
+SELECT 1
+SELECT  pgr_createVerticesTable('mytable','mygeom','src','tgt',
+	                            rows_where:='mygeom && (SELECT st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createVerticesTable('mytable','mygeom','src','tgt','mygeom && (SELECT st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)')
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Populating public.mytable_vertices_pgr, please wait...
+NOTICE:    ----->   VERTICES TABLE CREATED WITH  10 VERTICES
+NOTICE:                                         FOR   12  EDGES
+NOTICE:    Edges with NULL geometry,source or target: 0
+NOTICE:                              Edges processed: 12
+NOTICE:  Vertices table for table public.mytable is: public.mytable_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createverticestable
+-------------------------
+ OK
+(1 row)
+
+SELECT  pgr_createVerticesTable('mytable',source:='src',target:='tgt',the_geom:='mygeom',
+	                            rows_where:='mygeom && (SELECT st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createVerticesTable('mytable','mygeom','src','tgt','mygeom && (SELECT st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)')
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Populating public.mytable_vertices_pgr, please wait...
+NOTICE:    ----->   VERTICES TABLE CREATED WITH  10 VERTICES
+NOTICE:                                         FOR   12  EDGES
+NOTICE:    Edges with NULL geometry,source or target: 0
+NOTICE:                              Edges processed: 12
+NOTICE:  Vertices table for table public.mytable is: public.mytable_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createverticestable
+-------------------------
+ OK
+(1 row)
+
+SELECT pgr_createVerticesTable('edge_table');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createVerticesTable('edge_table','the_geom','source','target','true')
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Populating public.edge_table_vertices_pgr, please wait...
+NOTICE:    ----->   VERTICES TABLE CREATED WITH  17 VERTICES
+NOTICE:                                         FOR   18  EDGES
+NOTICE:    Edges with NULL geometry,source or target: 0
+NOTICE:                              Edges processed: 18
+NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createverticestable
+-------------------------
+ OK
+(1 row)
+
+ROLLBACK;
+ROLLBACK
diff --git a/test/topology/createVertTab-any.test.sql b/test/topology/createVertTab-any.test.sql
new file mode 100644
index 0000000..df62f43
--- /dev/null
+++ b/test/topology/createVertTab-any.test.sql
@@ -0,0 +1,38 @@
+------------------------------------------------------------------------------------------------------
+------------------------------------------------------------------------------------------------------
+--                  PGR_createVerticesTable
+------------------------------------------------------------------------------------------------------
+------------------------------------------------------------------------------------------------------
+
+--    SELECT pgr_createTopology('edge_table',0.001);
+	 SELECT  pgr_createVerticesTable('edge_table');
+	 SELECT  pgr_createVerticesTable('edge_table','the_geom','source','target');
+	-- SELECT  pgr_createVerticesTable('edge_table','source','the_geom','target');
+	 SELECT  pgr_createVerticesTable('edge_table',the_geom:='the_geom',source:='source',target:='target');
+	 SELECT  pgr_createVerticesTable('edge_table',source:='source',target:='target',the_geom:='the_geom');
+	 SELECT  pgr_createVerticesTable('edge_table',source:='source');
+	 SELECT  pgr_createVerticesTable('edge_table',rows_where:='id < 10');
+	 SELECT  pgr_createVerticesTable('edge_table',rows_where:='the_geom && (select st_buffer(the_geom,0.5) FROM edge_table WHERE id=5)');
+	CREATE TABLE otherTable AS  (SELECT 100 AS gid, st_point(2.5,2.5) AS other_geom) ;
+	 SELECT  pgr_createVerticesTable('edge_table',rows_where:='the_geom && (select st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)');
+	CREATE TABLE mytable AS (SELECT id AS gid, the_geom AS mygeom,source AS src ,target AS tgt FROM edge_table) ;
+	 SELECT  pgr_createVerticesTable('mytable','mygeom','src','tgt');
+	-- SELECT  pgr_createVerticesTable('mytable','src','mygeom','tgt');
+	 SELECT  pgr_createVerticesTable('mytable',the_geom:='mygeom',source:='src',target:='tgt');
+	 SELECT  pgr_createVerticesTable('mytable',source:='src',target:='tgt',the_geom:='mygeom');
+	 SELECT  pgr_createVerticesTable('mytable','mygeom','src','tgt',rows_where:='gid < 10');
+	 SELECT  pgr_createVerticesTable('mytable',source:='src',target:='tgt',the_geom:='mygeom',rows_where:='gid < 10');
+	 SELECT  pgr_createVerticesTable('mytable','mygeom','src','tgt',
+	                            rows_where:='mygeom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE gid=5)');
+	 SELECT  pgr_createVerticesTable('mytable',source:='src',target:='tgt',the_geom:='mygeom',
+	                            rows_where:='mygeom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE gid=5)');
+	DROP TABLE IF EXISTS otherTable;
+	CREATE TABLE otherTable AS  (SELECT 100 AS gid, st_point(2.5,2.5) AS other_geom) ;
+	 SELECT  pgr_createVerticesTable('mytable','mygeom','src','tgt',
+	                            rows_where:='mygeom && (SELECT st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)');
+	 SELECT  pgr_createVerticesTable('mytable',source:='src',target:='tgt',the_geom:='mygeom',
+	                            rows_where:='mygeom && (SELECT st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)');
+
+-------------------------------------
+	SELECT pgr_createVerticesTable('edge_table');
+
diff --git a/test/topology/doc-pgr_analyzeGraph.result b/test/topology/doc-pgr_analyzeGraph.result
new file mode 100644
index 0000000..16c762f
--- /dev/null
+++ b/test/topology/doc-pgr_analyzeGraph.result
@@ -0,0 +1,536 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+SELECT  pgr_createTopology('edge_table',0.001, clean := true);
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createTopology('edge_table', 0.001, 'the_geom', 'id', 'source', 'target', rows_where := 'true', clean := t)
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Creating Topology, Please wait...
+NOTICE:  -------------> TOPOLOGY CREATED FOR  18 edges
+NOTICE:  Rows with NULL geometry or NULL id: 0
+NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createtopology
+--------------------
+ OK
+(1 row)
+
+SELECT  pgr_analyzeGraph('edge_table',0.001);
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','true')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Analyzing for dead ends. Please wait...
+NOTICE:  Analyzing for gaps. Please wait...
+NOTICE:  Analyzing for isolated edges. Please wait...
+NOTICE:  Analyzing for ring geometries. Please wait...
+NOTICE:  Analyzing for intersections. Please wait...
+NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
+NOTICE:                    Isolated segments: 2
+NOTICE:                            Dead ends: 7
+NOTICE:  Potential gaps found near dead ends: 1
+NOTICE:               Intersections detected: 1
+NOTICE:                      Ring geometries: 0
+ pgr_analyzegraph
+------------------
+ OK
+(1 row)
+
+SELECT  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','true')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Analyzing for dead ends. Please wait...
+NOTICE:  Analyzing for gaps. Please wait...
+NOTICE:  Analyzing for isolated edges. Please wait...
+NOTICE:  Analyzing for ring geometries. Please wait...
+NOTICE:  Analyzing for intersections. Please wait...
+NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
+NOTICE:                    Isolated segments: 2
+NOTICE:                            Dead ends: 7
+NOTICE:  Potential gaps found near dead ends: 1
+NOTICE:               Intersections detected: 1
+NOTICE:                      Ring geometries: 0
+ pgr_analyzegraph
+------------------
+ OK
+(1 row)
+
+SELECT  pgr_analyzeGraph('edge_table',0.001,'id','the_geom','source','target');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('edge_table',0.001,'id','the_geom','source','target','true')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Got function st_srid(bigint) does not exist
+NOTICE:  ERROR: something went wrong when checking for SRID of id in table public.edge_table
+ pgr_analyzegraph
+------------------
+ FAIL
+(1 row)
+
+SELECT  pgr_analyzeGraph('edge_table',0.001,the_geom:='the_geom',id:='id',source:='source',target:='target');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','true')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Analyzing for dead ends. Please wait...
+NOTICE:  Analyzing for gaps. Please wait...
+NOTICE:  Analyzing for isolated edges. Please wait...
+NOTICE:  Analyzing for ring geometries. Please wait...
+NOTICE:  Analyzing for intersections. Please wait...
+NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
+NOTICE:                    Isolated segments: 2
+NOTICE:                            Dead ends: 7
+NOTICE:  Potential gaps found near dead ends: 1
+NOTICE:               Intersections detected: 1
+NOTICE:                      Ring geometries: 0
+ pgr_analyzegraph
+------------------
+ OK
+(1 row)
+
+SELECT  pgr_analyzeGraph('edge_table',0.001,source:='source',id:='id',target:='target',the_geom:='the_geom');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','true')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Analyzing for dead ends. Please wait...
+NOTICE:  Analyzing for gaps. Please wait...
+NOTICE:  Analyzing for isolated edges. Please wait...
+NOTICE:  Analyzing for ring geometries. Please wait...
+NOTICE:  Analyzing for intersections. Please wait...
+NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
+NOTICE:                    Isolated segments: 2
+NOTICE:                            Dead ends: 7
+NOTICE:  Potential gaps found near dead ends: 1
+NOTICE:               Intersections detected: 1
+NOTICE:                      Ring geometries: 0
+ pgr_analyzegraph
+------------------
+ OK
+(1 row)
+
+SELECT  pgr_analyzeGraph('edge_table',0.001,source:='source');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','true')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Analyzing for dead ends. Please wait...
+NOTICE:  Analyzing for gaps. Please wait...
+NOTICE:  Analyzing for isolated edges. Please wait...
+NOTICE:  Analyzing for ring geometries. Please wait...
+NOTICE:  Analyzing for intersections. Please wait...
+NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
+NOTICE:                    Isolated segments: 2
+NOTICE:                            Dead ends: 7
+NOTICE:  Potential gaps found near dead ends: 1
+NOTICE:               Intersections detected: 1
+NOTICE:                      Ring geometries: 0
+ pgr_analyzegraph
+------------------
+ OK
+(1 row)
+
+SELECT  pgr_analyzeGraph('edge_table',0.001,rows_where:='id < 10');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','id < 10')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Analyzing for dead ends. Please wait...
+NOTICE:  Analyzing for gaps. Please wait...
+NOTICE:  Analyzing for isolated edges. Please wait...
+NOTICE:  Analyzing for ring geometries. Please wait...
+NOTICE:  Analyzing for intersections. Please wait...
+NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
+NOTICE:                    Isolated segments: 0
+NOTICE:                            Dead ends: 4
+NOTICE:  Potential gaps found near dead ends: 0
+NOTICE:               Intersections detected: 0
+NOTICE:                      Ring geometries: 0
+ pgr_analyzegraph
+------------------
+ OK
+(1 row)
+
+SELECT  pgr_analyzeGraph('edge_table',0.001,rows_where:='the_geom && (SELECT st_buffer(the_geom,0.05) FROM edge_table WHERE id=5)');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','the_geom && (SELECT st_buffer(the_geom,0.05) FROM edge_table WHERE id=5)')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Analyzing for dead ends. Please wait...
+NOTICE:  Analyzing for gaps. Please wait...
+NOTICE:  Analyzing for isolated edges. Please wait...
+NOTICE:  Analyzing for ring geometries. Please wait...
+NOTICE:  Analyzing for intersections. Please wait...
+NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
+NOTICE:                    Isolated segments: 0
+NOTICE:                            Dead ends: 5
+NOTICE:  Potential gaps found near dead ends: 0
+NOTICE:               Intersections detected: 0
+NOTICE:                      Ring geometries: 0
+ pgr_analyzegraph
+------------------
+ OK
+(1 row)
+
+CREATE TABLE otherTable AS  (SELECT 100 AS gid, st_point(2.5,2.5) AS other_geom) ;
+SELECT 1
+SELECT  pgr_analyzeGraph('edge_table',0.001,rows_where:='the_geom && (SELECT st_buffer(other_geom,1) FROM otherTable WHERE gid=100)');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','the_geom && (SELECT st_buffer(other_geom,1) FROM otherTable WHERE gid=100)')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Analyzing for dead ends. Please wait...
+NOTICE:  Analyzing for gaps. Please wait...
+NOTICE:  Analyzing for isolated edges. Please wait...
+NOTICE:  Analyzing for ring geometries. Please wait...
+NOTICE:  Analyzing for intersections. Please wait...
+NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
+NOTICE:                    Isolated segments: 2
+NOTICE:                            Dead ends: 10
+NOTICE:  Potential gaps found near dead ends: 1
+NOTICE:               Intersections detected: 1
+NOTICE:                      Ring geometries: 0
+ pgr_analyzegraph
+------------------
+ OK
+(1 row)
+
+CREATE TABLE mytable AS (SELECT id AS gid, source AS src ,target AS tgt , the_geom AS mygeom FROM edge_table);
+SELECT 18
+SELECT pgr_createTopology('mytable',0.001,'mygeom','gid','src','tgt', clean := true);
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createTopology('mytable', 0.001, 'mygeom', 'gid', 'src', 'tgt', rows_where := 'true', clean := t)
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Creating Topology, Please wait...
+NOTICE:  -------------> TOPOLOGY CREATED FOR  18 edges
+NOTICE:  Rows with NULL geometry or NULL id: 0
+NOTICE:  Vertices table for table public.mytable is: public.mytable_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createtopology
+--------------------
+ OK
+(1 row)
+
+SELECT  pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt','true')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Analyzing for dead ends. Please wait...
+NOTICE:  Analyzing for gaps. Please wait...
+NOTICE:  Analyzing for isolated edges. Please wait...
+NOTICE:  Analyzing for ring geometries. Please wait...
+NOTICE:  Analyzing for intersections. Please wait...
+NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
+NOTICE:                    Isolated segments: 2
+NOTICE:                            Dead ends: 7
+NOTICE:  Potential gaps found near dead ends: 1
+NOTICE:               Intersections detected: 1
+NOTICE:                      Ring geometries: 0
+ pgr_analyzegraph
+------------------
+ OK
+(1 row)
+
+SELECT  pgr_analyzeGraph('mytable',0.0001,'gid','mygeom','src','tgt');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('mytable',0.0001,'gid','mygeom','src','tgt','true')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Got function st_srid(bigint) does not exist
+NOTICE:  ERROR: something went wrong when checking for SRID of gid in table public.mytable
+ pgr_analyzegraph
+------------------
+ FAIL
+(1 row)
+
+SELECT  pgr_analyzeGraph('mytable',0.001,the_geom:='mygeom',id:='gid',source:='src',target:='tgt');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt','true')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Analyzing for dead ends. Please wait...
+NOTICE:  Analyzing for gaps. Please wait...
+NOTICE:  Analyzing for isolated edges. Please wait...
+NOTICE:  Analyzing for ring geometries. Please wait...
+NOTICE:  Analyzing for intersections. Please wait...
+NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
+NOTICE:                    Isolated segments: 2
+NOTICE:                            Dead ends: 7
+NOTICE:  Potential gaps found near dead ends: 1
+NOTICE:               Intersections detected: 1
+NOTICE:                      Ring geometries: 0
+ pgr_analyzegraph
+------------------
+ OK
+(1 row)
+
+SELECT  pgr_analyzeGraph('mytable',0.001,source:='src',id:='gid',target:='tgt',the_geom:='mygeom');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt','true')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Analyzing for dead ends. Please wait...
+NOTICE:  Analyzing for gaps. Please wait...
+NOTICE:  Analyzing for isolated edges. Please wait...
+NOTICE:  Analyzing for ring geometries. Please wait...
+NOTICE:  Analyzing for intersections. Please wait...
+NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
+NOTICE:                    Isolated segments: 2
+NOTICE:                            Dead ends: 7
+NOTICE:  Potential gaps found near dead ends: 1
+NOTICE:               Intersections detected: 1
+NOTICE:                      Ring geometries: 0
+ pgr_analyzegraph
+------------------
+ OK
+(1 row)
+
+SELECT  pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt',rows_where:='gid < 10');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt','gid < 10')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Analyzing for dead ends. Please wait...
+NOTICE:  Analyzing for gaps. Please wait...
+NOTICE:  Analyzing for isolated edges. Please wait...
+NOTICE:  Analyzing for ring geometries. Please wait...
+NOTICE:  Analyzing for intersections. Please wait...
+NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
+NOTICE:                    Isolated segments: 0
+NOTICE:                            Dead ends: 4
+NOTICE:  Potential gaps found near dead ends: 0
+NOTICE:               Intersections detected: 0
+NOTICE:                      Ring geometries: 0
+ pgr_analyzegraph
+------------------
+ OK
+(1 row)
+
+SELECT  pgr_analyzeGraph('mytable',0.001,source:='src',id:='gid',target:='tgt',the_geom:='mygeom',rows_where:='gid < 10');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt','gid < 10')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Analyzing for dead ends. Please wait...
+NOTICE:  Analyzing for gaps. Please wait...
+NOTICE:  Analyzing for isolated edges. Please wait...
+NOTICE:  Analyzing for ring geometries. Please wait...
+NOTICE:  Analyzing for intersections. Please wait...
+NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
+NOTICE:                    Isolated segments: 0
+NOTICE:                            Dead ends: 4
+NOTICE:  Potential gaps found near dead ends: 0
+NOTICE:               Intersections detected: 0
+NOTICE:                      Ring geometries: 0
+ pgr_analyzegraph
+------------------
+ OK
+(1 row)
+
+SELECT  pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt',
+    rows_where:='mygeom && (SELECT st_buffer(mygeom,1) FROM mytable WHERE gid=5)');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt','mygeom && (SELECT st_buffer(mygeom,1) FROM mytable WHERE gid=5)')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Analyzing for dead ends. Please wait...
+NOTICE:  Analyzing for gaps. Please wait...
+NOTICE:  Analyzing for isolated edges. Please wait...
+NOTICE:  Analyzing for ring geometries. Please wait...
+NOTICE:  Analyzing for intersections. Please wait...
+NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
+NOTICE:                    Isolated segments: 1
+NOTICE:                            Dead ends: 5
+NOTICE:  Potential gaps found near dead ends: 0
+NOTICE:               Intersections detected: 1
+NOTICE:                      Ring geometries: 0
+ pgr_analyzegraph
+------------------
+ OK
+(1 row)
+
+SELECT  pgr_analyzeGraph('mytable',0.001,source:='src',id:='gid',target:='tgt',the_geom:='mygeom',
+    rows_where:='mygeom && (SELECT st_buffer(mygeom,1) FROM mytable WHERE gid=5)');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt','mygeom && (SELECT st_buffer(mygeom,1) FROM mytable WHERE gid=5)')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Analyzing for dead ends. Please wait...
+NOTICE:  Analyzing for gaps. Please wait...
+NOTICE:  Analyzing for isolated edges. Please wait...
+NOTICE:  Analyzing for ring geometries. Please wait...
+NOTICE:  Analyzing for intersections. Please wait...
+NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
+NOTICE:                    Isolated segments: 1
+NOTICE:                            Dead ends: 5
+NOTICE:  Potential gaps found near dead ends: 0
+NOTICE:               Intersections detected: 1
+NOTICE:                      Ring geometries: 0
+ pgr_analyzegraph
+------------------
+ OK
+(1 row)
+
+DROP TABLE IF EXISTS otherTable;
+DROP TABLE
+CREATE TABLE otherTable AS  (SELECT 'myhouse'::text AS place, st_point(2.5,2.5) AS other_geom) ;
+SELECT 1
+SELECT  pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt',
+    rows_where:='mygeom && (SELECT st_buffer(other_geom,1) FROM otherTable WHERE place='||quote_literal('myhouse')||')');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt','mygeom && (SELECT st_buffer(other_geom,1) FROM otherTable WHERE place='myhouse')')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Analyzing for dead ends. Please wait...
+NOTICE:  Analyzing for gaps. Please wait...
+NOTICE:  Analyzing for isolated edges. Please wait...
+NOTICE:  Analyzing for ring geometries. Please wait...
+NOTICE:  Analyzing for intersections. Please wait...
+NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
+NOTICE:                    Isolated segments: 2
+NOTICE:                            Dead ends: 10
+NOTICE:  Potential gaps found near dead ends: 1
+NOTICE:               Intersections detected: 1
+NOTICE:                      Ring geometries: 0
+ pgr_analyzegraph
+------------------
+ OK
+(1 row)
+
+SELECT  pgr_analyzeGraph('mytable',0.001,source:='src',id:='gid',target:='tgt',the_geom:='mygeom',
+    rows_where:='mygeom && (SELECT st_buffer(other_geom,1) FROM otherTable WHERE place='||quote_literal('myhouse')||')');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt','mygeom && (SELECT st_buffer(other_geom,1) FROM otherTable WHERE place='myhouse')')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Analyzing for dead ends. Please wait...
+NOTICE:  Analyzing for gaps. Please wait...
+NOTICE:  Analyzing for isolated edges. Please wait...
+NOTICE:  Analyzing for ring geometries. Please wait...
+NOTICE:  Analyzing for intersections. Please wait...
+NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
+NOTICE:                    Isolated segments: 2
+NOTICE:                            Dead ends: 10
+NOTICE:  Potential gaps found near dead ends: 1
+NOTICE:               Intersections detected: 1
+NOTICE:                      Ring geometries: 0
+ pgr_analyzegraph
+------------------
+ OK
+(1 row)
+
+SELECT  pgr_createTopology('edge_table',0.001, clean := true);
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createTopology('edge_table', 0.001, 'the_geom', 'id', 'source', 'target', rows_where := 'true', clean := t)
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Creating Topology, Please wait...
+NOTICE:  -------------> TOPOLOGY CREATED FOR  18 edges
+NOTICE:  Rows with NULL geometry or NULL id: 0
+NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createtopology
+--------------------
+ OK
+(1 row)
+
+SELECT pgr_analyzeGraph('edge_table', 0.001);
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','true')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Analyzing for dead ends. Please wait...
+NOTICE:  Analyzing for gaps. Please wait...
+NOTICE:  Analyzing for isolated edges. Please wait...
+NOTICE:  Analyzing for ring geometries. Please wait...
+NOTICE:  Analyzing for intersections. Please wait...
+NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
+NOTICE:                    Isolated segments: 2
+NOTICE:                            Dead ends: 7
+NOTICE:  Potential gaps found near dead ends: 1
+NOTICE:               Intersections detected: 1
+NOTICE:                      Ring geometries: 0
+ pgr_analyzegraph
+------------------
+ OK
+(1 row)
+
+SELECT  pgr_analyzeGraph('edge_table',0.001,rows_where:='id < 10');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','id < 10')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Analyzing for dead ends. Please wait...
+NOTICE:  Analyzing for gaps. Please wait...
+NOTICE:  Analyzing for isolated edges. Please wait...
+NOTICE:  Analyzing for ring geometries. Please wait...
+NOTICE:  Analyzing for intersections. Please wait...
+NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
+NOTICE:                    Isolated segments: 0
+NOTICE:                            Dead ends: 4
+NOTICE:  Potential gaps found near dead ends: 0
+NOTICE:               Intersections detected: 0
+NOTICE:                      Ring geometries: 0
+ pgr_analyzegraph
+------------------
+ OK
+(1 row)
+
+SELECT  pgr_analyzeGraph('edge_table',0.001,rows_where:='id >= 10');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','id >= 10')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Analyzing for dead ends. Please wait...
+NOTICE:  Analyzing for gaps. Please wait...
+NOTICE:  Analyzing for isolated edges. Please wait...
+NOTICE:  Analyzing for ring geometries. Please wait...
+NOTICE:  Analyzing for intersections. Please wait...
+NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
+NOTICE:                    Isolated segments: 2
+NOTICE:                            Dead ends: 8
+NOTICE:  Potential gaps found near dead ends: 1
+NOTICE:               Intersections detected: 1
+NOTICE:                      Ring geometries: 0
+ pgr_analyzegraph
+------------------
+ OK
+(1 row)
+
+SELECT  pgr_analyzeGraph('edge_table',0.001,rows_where:='id < 17');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','id < 17')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Analyzing for dead ends. Please wait...
+NOTICE:  Analyzing for gaps. Please wait...
+NOTICE:  Analyzing for isolated edges. Please wait...
+NOTICE:  Analyzing for ring geometries. Please wait...
+NOTICE:  Analyzing for intersections. Please wait...
+NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
+NOTICE:                    Isolated segments: 0
+NOTICE:                            Dead ends: 3
+NOTICE:  Potential gaps found near dead ends: 0
+NOTICE:               Intersections detected: 0
+NOTICE:                      Ring geometries: 0
+ pgr_analyzegraph
+------------------
+ OK
+(1 row)
+
+SELECT pgr_createTopology('edge_table', 0.001,rows_where:='id <17', clean := true);
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createTopology('edge_table', 0.001, 'the_geom', 'id', 'source', 'target', rows_where := 'id <17', clean := t)
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Creating Topology, Please wait...
+NOTICE:  -------------> TOPOLOGY CREATED FOR  16 edges
+NOTICE:  Rows with NULL geometry or NULL id: 0
+NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createtopology
+--------------------
+ OK
+(1 row)
+
+SELECT pgr_analyzeGraph('edge_table', 0.001);
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','true')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Analyzing for dead ends. Please wait...
+NOTICE:  Analyzing for gaps. Please wait...
+NOTICE:  Analyzing for isolated edges. Please wait...
+NOTICE:  Analyzing for ring geometries. Please wait...
+NOTICE:  Analyzing for intersections. Please wait...
+NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
+NOTICE:                    Isolated segments: 0
+NOTICE:                            Dead ends: 3
+NOTICE:  Potential gaps found near dead ends: 0
+NOTICE:               Intersections detected: 0
+NOTICE:                      Ring geometries: 0
+ pgr_analyzegraph
+------------------
+ OK
+(1 row)
+
+ROLLBACK;
+ROLLBACK
diff --git a/src/topology/test/doc-pgr_analyzeGraph.test.sql b/test/topology/doc-pgr_analyzeGraph.test.sql
similarity index 100%
rename from src/topology/test/doc-pgr_analyzeGraph.test.sql
rename to test/topology/doc-pgr_analyzeGraph.test.sql
diff --git a/test/topology/doc-pgr_createTopology.result b/test/topology/doc-pgr_createTopology.result
new file mode 100644
index 0000000..4f42f8f
--- /dev/null
+++ b/test/topology/doc-pgr_createTopology.result
@@ -0,0 +1,262 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+DROP TABLE edge_table_vertices_pgr;
+DROP TABLE
+UPDATE edge_table SET source = NULL,  target = NULL;
+UPDATE 18
+--q1
+SELECT  pgr_createTopology('edge_table', 0.001);
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createTopology('edge_table', 0.001, 'the_geom', 'id', 'source', 'target', rows_where := 'true', clean := f)
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Creating Topology, Please wait...
+NOTICE:  -------------> TOPOLOGY CREATED FOR  18 edges
+NOTICE:  Rows with NULL geometry or NULL id: 0
+NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createtopology
+--------------------
+ OK
+(1 row)
+
+--q1.1
+DROP TABLE edge_table_vertices_pgr;
+DROP TABLE
+UPDATE edge_table SET source = NULL,  target = NULL;
+UPDATE 18
+--q2
+SELECT  pgr_createTopology('edge_table', 0.001,
+    'the_geom', 'id', 'source', 'target');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createTopology('edge_table', 0.001, 'the_geom', 'id', 'source', 'target', rows_where := 'true', clean := f)
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Creating Topology, Please wait...
+NOTICE:  -------------> TOPOLOGY CREATED FOR  18 edges
+NOTICE:  Rows with NULL geometry or NULL id: 0
+NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createtopology
+--------------------
+ OK
+(1 row)
+
+--q2.1
+SET client_min_messages TO NOTICE;
+SET
+--q3
+SELECT  pgr_createTopology('edge_table', 0.001,
+    'id', 'the_geom');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createTopology('edge_table', 0.001, 'id', 'the_geom', 'source', 'target', rows_where := 'true', clean := f)
+NOTICE:  Performing checks, please wait .....
+NOTICE:  ----> PGR ERROR in pgr_createTopology: Wrong type of Column id:the_geom
+NOTICE:  Unexpected error raise_exception
+ pgr_createtopology
+--------------------
+ FAIL
+(1 row)
+
+--q3.1
+SET client_min_messages TO WARNING;
+SET
+DROP TABLE edge_table_vertices_pgr;
+DROP TABLE
+UPDATE edge_table SET source = NULL,  target = NULL;
+UPDATE 18
+--q4
+SELECT  pgr_createTopology('edge_table', 0.001,
+    the_geom:='the_geom', id:='id', source:='source', target:='target');
+ pgr_createtopology
+--------------------
+ OK
+(1 row)
+
+--q4.1
+DROP TABLE edge_table_vertices_pgr;
+DROP TABLE
+UPDATE edge_table SET source = NULL,  target = NULL;
+UPDATE 18
+--q5
+SELECT  pgr_createTopology('edge_table', 0.001,
+    source:='source', id:='id', target:='target', the_geom:='the_geom');
+ pgr_createtopology
+--------------------
+ OK
+(1 row)
+
+--q5.1
+DROP TABLE edge_table_vertices_pgr;
+DROP TABLE
+UPDATE edge_table SET source = NULL,  target = NULL;
+UPDATE 18
+--q6
+SELECT  pgr_createTopology('edge_table', 0.001, source:='source');
+ pgr_createtopology
+--------------------
+ OK
+(1 row)
+
+--q6.1
+--q7
+SELECT  pgr_createTopology('edge_table', 0.001, rows_where:='id < 10');
+ pgr_createtopology
+--------------------
+ OK
+(1 row)
+
+--q7.1
+--q8
+SELECT  pgr_createTopology('edge_table', 0.001,
+    rows_where:='the_geom && (SELECT st_buffer(the_geom, 0.05) FROM edge_table WHERE id=5)');
+ pgr_createtopology
+--------------------
+ OK
+(1 row)
+
+--q8.1
+--q9
+CREATE TABLE otherTable AS  (SELECT 100 AS gid,  st_point(2.5, 2.5) AS other_geom);
+SELECT 1
+SELECT  pgr_createTopology('edge_table', 0.001,
+    rows_where:='the_geom && (SELECT st_buffer(other_geom, 1) FROM otherTable WHERE gid=100)');
+ pgr_createtopology
+--------------------
+ OK
+(1 row)
+
+--q9.1
+--q10
+CREATE TABLE mytable AS (SELECT id AS gid,  the_geom AS mygeom, source AS src , target AS tgt FROM edge_table) ;
+SELECT 18
+--q10.1
+--q11
+SELECT  pgr_createTopology('mytable', 0.001, 'mygeom', 'gid', 'src', 'tgt', clean := TRUE);
+ pgr_createtopology
+--------------------
+ OK
+(1 row)
+
+--q11.1
+DROP TABLE mytable_vertices_pgr;
+DROP TABLE
+UPDATE mytable SET src = NULL,  tgt = NULL;
+UPDATE 18
+SET client_min_messages TO NOTICE;
+SET
+--q12
+SELECT  pgr_createTopology('mytable', 0.001, 'gid', 'mygeom', 'src', 'tgt');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createTopology('mytable', 0.001, 'gid', 'mygeom', 'src', 'tgt', rows_where := 'true', clean := f)
+NOTICE:  Performing checks, please wait .....
+NOTICE:  ----> PGR ERROR in pgr_createTopology: Wrong type of Column id:mygeom
+NOTICE:  Unexpected error raise_exception
+ pgr_createtopology
+--------------------
+ FAIL
+(1 row)
+
+--q12.1
+SET client_min_messages TO WARNING;
+SET
+--q13
+SELECT  pgr_createTopology('mytable', 0.001, the_geom:='mygeom', id:='gid', source:='src', target:='tgt');
+ pgr_createtopology
+--------------------
+ OK
+(1 row)
+
+--q13.1
+DROP TABLE mytable_vertices_pgr;
+DROP TABLE
+UPDATE mytable SET src = NULL,  tgt = NULL;
+UPDATE 18
+--q14
+SELECT  pgr_createTopology('mytable', 0.001, source:='src', id:='gid', target:='tgt', the_geom:='mygeom');
+ pgr_createtopology
+--------------------
+ OK
+(1 row)
+
+--q14.1
+--q15
+SELECT  pgr_createTopology('mytable', 0.001, 'mygeom', 'gid', 'src', 'tgt', rows_where:='gid < 10');
+ pgr_createtopology
+--------------------
+ OK
+(1 row)
+
+SELECT  pgr_createTopology('mytable', 0.001, source:='src', id:='gid', target:='tgt', the_geom:='mygeom', rows_where:='gid < 10');
+ pgr_createtopology
+--------------------
+ OK
+(1 row)
+
+SELECT  pgr_createTopology('mytable', 0.001, 'mygeom', 'gid', 'src', 'tgt',
+    rows_where:='mygeom && (SELECT st_buffer(mygeom, 1) FROM mytable WHERE gid=5)');
+ pgr_createtopology
+--------------------
+ OK
+(1 row)
+
+SELECT  pgr_createTopology('mytable', 0.001, source:='src', id:='gid', target:='tgt', the_geom:='mygeom',
+    rows_where:='mygeom && (SELECT st_buffer(mygeom, 1) FROM mytable WHERE gid=5)');
+ pgr_createtopology
+--------------------
+ OK
+(1 row)
+
+--q15.1
+--q16
+SELECT  pgr_createTopology('mytable', 0.001, 'mygeom', 'gid', 'src', 'tgt',
+    rows_where:='mygeom && (SELECT st_buffer(other_geom, 1) FROM otherTable WHERE gid=100)');
+ pgr_createtopology
+--------------------
+ OK
+(1 row)
+
+SELECT  pgr_createTopology('mytable', 0.001, source:='src', id:='gid', target:='tgt', the_geom:='mygeom',
+    rows_where:='mygeom && (SELECT st_buffer(other_geom, 1) FROM otherTable WHERE gid=100)');
+ pgr_createtopology
+--------------------
+ OK
+(1 row)
+
+--q16.1
+SET client_min_messages TO NOTICE;
+SET
+--q17
+SELECT pgr_createTopology('edge_table',  0.001, rows_where:='id < 6', clean := true);
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createTopology('edge_table', 0.001, 'the_geom', 'id', 'source', 'target', rows_where := 'id < 6', clean := t)
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Creating Topology, Please wait...
+NOTICE:  -------------> TOPOLOGY CREATED FOR  5 edges
+NOTICE:  Rows with NULL geometry or NULL id: 0
+NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createtopology
+--------------------
+ OK
+(1 row)
+
+SELECT pgr_createTopology('edge_table',  0.001);
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createTopology('edge_table', 0.001, 'the_geom', 'id', 'source', 'target', rows_where := 'true', clean := f)
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Creating Topology, Please wait...
+NOTICE:  -------------> TOPOLOGY CREATED FOR  13 edges
+NOTICE:  Rows with NULL geometry or NULL id: 0
+NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createtopology
+--------------------
+ OK
+(1 row)
+
+--q17.1
+SET client_min_messages TO NOTICE;
+SET
+ROLLBACK;
+ROLLBACK
diff --git a/src/topology/test/doc-pgr_createTopology.test.sql b/test/topology/doc-pgr_createTopology.test.sql
similarity index 100%
rename from src/topology/test/doc-pgr_createTopology.test.sql
rename to test/topology/doc-pgr_createTopology.test.sql
diff --git a/test/topology/issue900.result b/test/topology/issue900.result
new file mode 100644
index 0000000..4ec8578
--- /dev/null
+++ b/test/topology/issue900.result
@@ -0,0 +1,25 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+ALTER TABLE edge_table RENAME TO mbta_arc;
+ALTER TABLE
+CREATE TABLE edge_table AS SELECT * FROM mbta_arc;
+SELECT 18
+;
+SELECT pgr_CreateTopology('edge_table', 0.001, 'the_geom', 'id', clean := true);
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createTopology('edge_table', 0.001, 'the_geom', 'id', 'source', 'target', rows_where := 'true', clean := t)
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Creating Topology, Please wait...
+NOTICE:  -------------> TOPOLOGY CREATED FOR  18 edges
+NOTICE:  Rows with NULL geometry or NULL id: 0
+NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createtopology
+--------------------
+OK
+(1 row)
+
+ROLLBACK;
+ROLLBACK
diff --git a/src/topology/test/issue900.test.sql b/test/topology/issue900.test.sql
similarity index 100%
rename from src/topology/test/issue900.test.sql
rename to test/topology/issue900.test.sql
diff --git a/test/topology/nodeNetwork-any.result b/test/topology/nodeNetwork-any.result
new file mode 100644
index 0000000..5599ade
--- /dev/null
+++ b/test/topology/nodeNetwork-any.result
@@ -0,0 +1,204 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+SELECT pgr_createTopology('edge_table', 0.001, clean := TRUE);
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createTopology('edge_table', 0.001, 'the_geom', 'id', 'source', 'target', rows_where := 'true', clean := t)
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Creating Topology, Please wait...
+NOTICE:  -------------> TOPOLOGY CREATED FOR  18 edges
+NOTICE:  Rows with NULL geometry or NULL id: 0
+NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createtopology
+--------------------
+ OK
+(1 row)
+
+SELECT pgr_analyzegraph('edge_table', 0.001);
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','true')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Analyzing for dead ends. Please wait...
+NOTICE:  Analyzing for gaps. Please wait...
+NOTICE:  Analyzing for isolated edges. Please wait...
+NOTICE:  Analyzing for ring geometries. Please wait...
+NOTICE:  Analyzing for intersections. Please wait...
+NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
+NOTICE:                    Isolated segments: 2
+NOTICE:                            Dead ends: 7
+NOTICE:  Potential gaps found near dead ends: 1
+NOTICE:               Intersections detected: 1
+NOTICE:                      Ring geometries: 0
+ pgr_analyzegraph
+------------------
+ OK
+(1 row)
+
+SELECT pgr_nodeNetwork('edge_table', 0.001);
+NOTICE:  PROCESSING:
+NOTICE:  pgr_nodeNetwork('edge_table', 0.001, 'id', 'the_geom', 'noded', '<NULL>',  f)
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Processing, please wait .....
+NOTICE:    Split Edges: 3
+NOTICE:   Untouched Edges: 15
+NOTICE:       Total original Edges: 18
+NOTICE:   Edges generated: 6
+NOTICE:   Untouched Edges: 15
+NOTICE:         Total New segments: 21
+NOTICE:   New Table: public.edge_table_noded
+NOTICE:  ----------------------------------
+ pgr_nodenetwork
+-----------------
+ OK
+(1 row)
+
+SELECT old_id,sub_id FROM edge_table_noded ORDER BY old_id,sub_id;
+ old_id | sub_id
+--------+--------
+      1 |      1
+      2 |      1
+      3 |      1
+      4 |      1
+      5 |      1
+      6 |      1
+      7 |      1
+      8 |      1
+      9 |      1
+     10 |      1
+     11 |      1
+     12 |      1
+     13 |      1
+     13 |      2
+     14 |      1
+     14 |      2
+     15 |      1
+     16 |      1
+     17 |      1
+     18 |      1
+     18 |      2
+(21 rows)
+
+SELECT pgr_createTopology('edge_table_noded', 0.001);
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createTopology('edge_table_noded', 0.001, 'the_geom', 'id', 'source', 'target', rows_where := 'true', clean := f)
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Creating Topology, Please wait...
+NOTICE:  -------------> TOPOLOGY CREATED FOR  21 edges
+NOTICE:  Rows with NULL geometry or NULL id: 0
+NOTICE:  Vertices table for table public.edge_table_noded is: public.edge_table_noded_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createtopology
+--------------------
+ OK
+(1 row)
+
+SELECT pgr_analyzegraph('edge_table_noded', 0.001);
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('edge_table_noded',0.001,'the_geom','id','source','target','true')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Analyzing for dead ends. Please wait...
+NOTICE:  Analyzing for gaps. Please wait...
+NOTICE:  Analyzing for isolated edges. Please wait...
+NOTICE:  Analyzing for ring geometries. Please wait...
+NOTICE:  Analyzing for intersections. Please wait...
+NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
+NOTICE:                    Isolated segments: 0
+NOTICE:                            Dead ends: 6
+NOTICE:  Potential gaps found near dead ends: 0
+NOTICE:               Intersections detected: 0
+NOTICE:                      Ring geometries: 0
+ pgr_analyzegraph
+------------------
+ OK
+(1 row)
+
+alter table edge_table drop column if exists old_id;
+NOTICE:  column "old_id" of relation "edge_table" does not exist, skipping
+ALTER TABLE
+alter table edge_table add column old_id integer;
+ALTER TABLE
+insert into edge_table (old_id,dir,cost,reverse_cost,the_geom)
+   (with
+       segmented as (select old_id,count(*) as i from edge_table_noded group by old_id)
+   select  segments.old_id,dir,cost,reverse_cost,segments.the_geom
+       from edge_table as edges join edge_table_noded as segments on (edges.id = segments.old_id)
+       where edges.id in (select old_id from segmented where i>1) );
+INSERT 0 6
+SELECT pgr_createTopology('edge_table', 0.001);
+NOTICE:  PROCESSING:
+NOTICE:  pgr_createTopology('edge_table', 0.001, 'the_geom', 'id', 'source', 'target', rows_where := 'true', clean := f)
+NOTICE:  Performing checks, please wait .....
+NOTICE:  Creating Topology, Please wait...
+NOTICE:  -------------> TOPOLOGY CREATED FOR  6 edges
+NOTICE:  Rows with NULL geometry or NULL id: 0
+NOTICE:  Vertices table for table public.edge_table is: public.edge_table_vertices_pgr
+NOTICE:  ----------------------------------------------
+ pgr_createtopology
+--------------------
+ OK
+(1 row)
+
+SELECT pgr_analyzegraph('edge_table', 0.001,rows_where:='id not in (select old_id from edge_table where old_id is not null)');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','id not in (select old_id from edge_table where old_id is not null)')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Analyzing for dead ends. Please wait...
+NOTICE:  Analyzing for gaps. Please wait...
+NOTICE:  Analyzing for isolated edges. Please wait...
+NOTICE:  Analyzing for ring geometries. Please wait...
+NOTICE:  Analyzing for intersections. Please wait...
+NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
+NOTICE:                    Isolated segments: 0
+NOTICE:                            Dead ends: 6
+NOTICE:  Potential gaps found near dead ends: 0
+NOTICE:               Intersections detected: 0
+NOTICE:                      Ring geometries: 0
+ pgr_analyzegraph
+------------------
+ OK
+(1 row)
+
+SELECT pgr_analyzegraph('edge_table', 0.001,rows_where:='old_id is null');
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','old_id is null')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Analyzing for dead ends. Please wait...
+NOTICE:  Analyzing for gaps. Please wait...
+NOTICE:  Analyzing for isolated edges. Please wait...
+NOTICE:  Analyzing for ring geometries. Please wait...
+NOTICE:  Analyzing for intersections. Please wait...
+NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
+NOTICE:                    Isolated segments: 2
+NOTICE:                            Dead ends: 7
+NOTICE:  Potential gaps found near dead ends: 1
+NOTICE:               Intersections detected: 1
+NOTICE:                      Ring geometries: 0
+ pgr_analyzegraph
+------------------
+ OK
+(1 row)
+
+SELECT pgr_analyzegraph('edge_table', 0.001);
+NOTICE:  PROCESSING:
+NOTICE:  pgr_analyzeGraph('edge_table',0.001,'the_geom','id','source','target','true')
+NOTICE:  Performing checks, please wait ...
+NOTICE:  Analyzing for dead ends. Please wait...
+NOTICE:  Analyzing for gaps. Please wait...
+NOTICE:  Analyzing for isolated edges. Please wait...
+NOTICE:  Analyzing for ring geometries. Please wait...
+NOTICE:  Analyzing for intersections. Please wait...
+NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:
+NOTICE:                    Isolated segments: 0
+NOTICE:                            Dead ends: 3
+NOTICE:  Potential gaps found near dead ends: 0
+NOTICE:               Intersections detected: 5
+NOTICE:                      Ring geometries: 0
+ pgr_analyzegraph
+------------------
+ OK
+(1 row)
+
+ROLLBACK;
+ROLLBACK
diff --git a/test/topology/nodeNetwork-any.test.sql b/test/topology/nodeNetwork-any.test.sql
new file mode 100644
index 0000000..d340401
--- /dev/null
+++ b/test/topology/nodeNetwork-any.test.sql
@@ -0,0 +1,24 @@
+--                pgr_nodeNetwork
+--------------------------------------------------------------------------------
+
+
+SELECT pgr_createTopology('edge_table', 0.001, clean := TRUE);
+SELECT pgr_analyzegraph('edge_table', 0.001);
+SELECT pgr_nodeNetwork('edge_table', 0.001);
+SELECT old_id,sub_id FROM edge_table_noded ORDER BY old_id,sub_id;
+SELECT pgr_createTopology('edge_table_noded', 0.001);
+SELECT pgr_analyzegraph('edge_table_noded', 0.001);
+alter table edge_table drop column if exists old_id;
+alter table edge_table add column old_id integer;
+insert into edge_table (old_id,dir,cost,reverse_cost,the_geom)
+   (with
+       segmented as (select old_id,count(*) as i from edge_table_noded group by old_id)
+   select  segments.old_id,dir,cost,reverse_cost,segments.the_geom
+       from edge_table as edges join edge_table_noded as segments on (edges.id = segments.old_id)
+       where edges.id in (select old_id from segmented where i>1) );
+
+SELECT pgr_createTopology('edge_table', 0.001);
+SELECT pgr_analyzegraph('edge_table', 0.001,rows_where:='id not in (select old_id from edge_table where old_id is not null)');
+SELECT pgr_analyzegraph('edge_table', 0.001,rows_where:='old_id is null');
+SELECT pgr_analyzegraph('edge_table', 0.001);
+
diff --git a/test/topology/test.conf b/test/topology/test.conf
new file mode 100644
index 0000000..12a93e5
--- /dev/null
+++ b/test/topology/test.conf
@@ -0,0 +1,30 @@
+#!/usr/bin/perl -w
+
+%main::tests = (
+    'any' => {
+        'comment' => 'pgr_createTopology, pgr_analyzegraph, and pgr_analyzeOneway tests for any versions.',
+        'data' => [ ],
+        'tests' => [qw(
+            issue900
+            analyzeOneway-any
+            createVertTab-any
+            doc-pgr_createTopology
+            doc-pgr_analyzeGraph
+            nodeNetwork-any
+            )],
+
+        'documentation' => [qw(
+            doc-pgr_analyzeGraph
+            doc-pgr_createTopology
+            )],
+
+        'dummyStorage' => [qw(
+            )]
+
+    },
+# 'vpg-vpgis' => {}, # for version specific tests
+# '8-1' => {}, # for pg 8.x and postgis 1.x
+# '9.2-2.1' => {}, # for pg 9.2 and postgis 2.1
+);
+
+1;
diff --git a/test/trsp/doc-trsp.result b/test/trsp/doc-trsp.result
new file mode 100644
index 0000000..4e0a774
--- /dev/null
+++ b/test/trsp/doc-trsp.result
@@ -0,0 +1,115 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+--q1
+SELECT * FROM pgr_trsp(
+        'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edge_table',
+        7, 12, false, false
+    );
+ seq | id1 | id2 | cost
+-----+-----+-----+------
+   0 |   7 |   6 |    1
+   1 |   8 |   7 |    1
+   2 |   5 |   8 |    1
+   3 |   6 |   9 |    1
+   4 |   9 |  15 |    1
+   5 |  12 |  -1 |    0
+(6 rows)
+
+--q2
+--q3
+SELECT * FROM pgr_trsp(
+        'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edge_table',
+        2, 7, false, false,
+        'SELECT to_cost, target_id::int4,
+        from_edge || coalesce('','' || via_path, '''') AS via_path
+        FROM restrictions'
+    );
+ seq | id1 | id2 | cost
+-----+-----+-----+------
+   0 |   2 |   4 |    1
+   1 |   5 |  10 |    1
+   2 |  10 |  12 |    1
+   3 |  11 |  11 |    1
+   4 |   6 |   8 |    1
+   5 |   5 |   7 |    1
+   6 |   8 |   6 |    1
+   7 |   7 |  -1 |    0
+(8 rows)
+
+SELECT * FROM pgr_trsp(
+        'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edge_table',
+        7, 11, false, false,
+        'SELECT to_cost, target_id::int4,
+        from_edge || coalesce('','' || via_path, '''') AS via_path
+        FROM restrictions'
+    );
+ seq | id1 | id2 | cost
+-----+-----+-----+------
+   0 |   7 |   6 |    1
+   1 |   8 |   7 |    1
+   2 |   5 |   8 |    1
+   3 |   6 |   9 |    1
+   4 |   9 |  15 |    1
+   5 |  12 |  13 |    1
+   6 |  11 |  -1 |    0
+(7 rows)
+
+--q4
+SELECT * FROM pgr_trspViaVertices(
+        'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edge_table',
+        ARRAY[2,7,11]::INTEGER[],
+        false,  false,
+        'SELECT to_cost, target_id::int4, from_edge ||
+        coalesce('',''||via_path,'''') AS via_path FROM restrictions');
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |   1 |   2 |   4 |    1
+   2 |   1 |   5 |  10 |    1
+   3 |   1 |  10 |  12 |    1
+   4 |   1 |  11 |  11 |    1
+   5 |   1 |   6 |   8 |    1
+   6 |   1 |   5 |   7 |    1
+   7 |   1 |   8 |   6 |    1
+   8 |   2 |   7 |   6 |    1
+   9 |   2 |   8 |   7 |    1
+  10 |   2 |   5 |   8 |    1
+  11 |   2 |   6 |   9 |    1
+  12 |   2 |   9 |  15 |    1
+  13 |   2 |  12 |  13 |    1
+  14 |   2 |  11 |  -1 |    0
+(14 rows)
+
+--q5
+SELECT * FROM pgr_trspViaEdges(
+        'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost,
+        reverse_cost FROM edge_table',
+        ARRAY[2,7,11]::INTEGER[],
+        ARRAY[0.5, 0.5, 0.5]::FLOAT[],
+        true,
+        true,
+        'SELECT to_cost, target_id::int4, FROM_edge ||
+        coalesce('',''||via_path,'''') AS via_path FROM restrictions');
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |   1 |  -1 |   2 |  0.5
+   2 |   1 |   2 |   4 |    1
+   3 |   1 |   5 |   8 |    1
+   4 |   1 |   6 |   9 |    1
+   5 |   1 |   9 |  16 |    1
+   6 |   1 |   4 |   3 |    1
+   7 |   1 |   3 |   5 |    1
+   8 |   1 |   6 |   8 |    1
+   9 |   1 |   5 |   7 |    1
+  10 |   2 |   5 |   8 |    1
+  11 |   2 |   6 |   9 |    1
+  12 |   2 |   9 |  16 |    1
+  13 |   2 |   4 |   3 |    1
+  14 |   2 |   3 |   5 |    1
+  15 |   2 |   6 |  11 |  0.5
+(15 rows)
+
+--q6
+ROLLBACK;
+ROLLBACK
diff --git a/test/trsp/doc-trsp.test.sql b/test/trsp/doc-trsp.test.sql
new file mode 100644
index 0000000..ebb58d4
--- /dev/null
+++ b/test/trsp/doc-trsp.test.sql
@@ -0,0 +1,54 @@
+
+
+    ------------------------------------------------------------------------------------------------------
+    ------------------------------------------------------------------------------------------------------
+    --              PGR_pgr_trsp
+    ------------------------------------------------------------------------------------------------------
+    ------------------------------------------------------------------------------------------------------
+
+\echo --q1
+    SELECT * FROM pgr_trsp(
+        'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edge_table',
+        7, 12, false, false
+    );
+
+\echo --q2
+
+\echo --q3
+    SELECT * FROM pgr_trsp(
+        'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edge_table',
+        2, 7, false, false,
+        'SELECT to_cost, target_id::int4,
+        from_edge || coalesce('','' || via_path, '''') AS via_path
+        FROM restrictions'
+    );
+    SELECT * FROM pgr_trsp(
+        'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edge_table',
+        7, 11, false, false,
+        'SELECT to_cost, target_id::int4,
+        from_edge || coalesce('','' || via_path, '''') AS via_path
+        FROM restrictions'
+    );
+
+
+\echo --q4
+    SELECT * FROM pgr_trspViaVertices(
+        'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edge_table',
+        ARRAY[2,7,11]::INTEGER[],
+        false,  false,
+        'SELECT to_cost, target_id::int4, from_edge ||
+        coalesce('',''||via_path,'''') AS via_path FROM restrictions');
+
+
+\echo --q5
+    SELECT * FROM pgr_trspViaEdges(
+        'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost,
+        reverse_cost FROM edge_table',
+        ARRAY[2,7,11]::INTEGER[],
+        ARRAY[0.5, 0.5, 0.5]::FLOAT[],
+        true,
+        true,
+        'SELECT to_cost, target_id::int4, FROM_edge ||
+        coalesce('',''||via_path,'''') AS via_path FROM restrictions');
+
+\echo --q6
diff --git a/test/trsp/four_edges.result b/test/trsp/four_edges.result
new file mode 100644
index 0000000..001e4f0
--- /dev/null
+++ b/test/trsp/four_edges.result
@@ -0,0 +1,224 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+CREATE TABLE four_edges (
+    id BIGINT,
+    source BIGINT,
+    target BIGINT,
+    cost FLOAT,
+    reverse_cost FLOAT);
+CREATE TABLE
+INSERT INTO four_edges (id, source, target, cost, reverse_cost) VALUES
+( 719 ,  52163 , -56570 , 179.400001 ,   179.400001),
+( 717 ,  52222 ,  52163 , 977.000001 ,   977.000001),
+( 718 ,  52220 ,  52222 , 961.000001 ,   961.000001),
+( 716 , -21019 ,  52220 , 992.000001 ,   992.000001);
+INSERT 0 4
+SELECT * FROM pgr_trsp(
+  $$SELECT
+    id::int, source::int, target::int, cost::float, reverse_cost::float
+  FROM
+    (VALUES
+      (719, 52163, -56570, 179.400001, 179.400001),
+      (717, 52222, 52163, 977.000001, 977.000001),
+      (718, 52220, 52222, 961.000001, 961.000001),
+      (716, -21019, 52220, 992.000001, 992.000001)
+    ) AS t (id, source, target, cost, reverse_cost)$$,
+  719, 0,
+  718, 0,
+  true, true, NULL);
+ seq |  id1  | id2 |    cost    
+-----+-------+-----+------------
+   0 | 52163 | 717 | 977.000001
+   1 | 52222 | 718 | 961.000001
+   2 | 52220 |  -1 |          0
+(3 rows)
+
+SELECT * FROM pgr_trsp(
+  $$SELECT
+    id::int, source::int, target::int, cost::float, reverse_cost::float
+  FROM
+    (VALUES
+      (719, 52163, -56570, 179.40000, 179.40000),
+      (717, 52222, 52163, 977.00000, 977.00000),
+      (718, 52220, 52222, 961.00000, 961.00000),
+      (716, -21019, 52220, 992.00000, 992.00000)
+    ) AS t (id, source, target, cost, reverse_cost)$$,
+  (SELECT source::int  FROM four_edges WHERE id = 719),
+  (SELECT source::int  FROM four_edges WHERE id = 718),
+  true, true, NULL);
+ seq |  id1  | id2 | cost 
+-----+-------+-----+------
+   0 | 52163 | 717 |  977
+   1 | 52222 | 718 |  961
+   2 | 52220 |  -1 |    0
+(3 rows)
+
+SELECT * FROM pgr_trsp(
+  $$SELECT
+    id::int, source::int, target::int, cost::float, reverse_cost::float
+  FROM four_edges$$,
+  719, 0,
+  718, 0,
+  true, true, NULL);
+ seq |  id1  | id2 |    cost    
+-----+-------+-----+------------
+   0 | 52163 | 717 | 977.000001
+   1 | 52222 | 718 | 961.000001
+   2 | 52220 |  -1 |          0
+(3 rows)
+
+SELECT * FROM pgr_dijkstra(
+  $$SELECT
+    id::int, source::int, target::int, cost::float, reverse_cost::float
+  FROM four_edges$$,
+  52163,
+  52220,
+  false);
+ seq | path_seq | node  | edge |    cost    |  agg_cost   
+-----+----------+-------+------+------------+-------------
+   1 |        1 | 52163 |  717 | 977.000001 |           0
+   2 |        2 | 52222 |  718 | 961.000001 |  977.000001
+   3 |        3 | 52220 |   -1 |          0 | 1938.000002
+(3 rows)
+
+SELECT * FROM pgr_dijkstra(
+  $$SELECT
+    id, source, target, cost, reverse_cost
+  FROM four_edges$$,
+  (SELECT source  FROM four_edges WHERE id = 719),
+  (SELECT source  FROM four_edges WHERE id = 718),
+  true);
+ seq | path_seq | node  | edge |    cost    |  agg_cost   
+-----+----------+-------+------+------------+-------------
+   1 |        1 | 52163 |  717 | 977.000001 |           0
+   2 |        2 | 52222 |  718 | 961.000001 |  977.000001
+   3 |        3 | 52220 |   -1 |          0 | 1938.000002
+(3 rows)
+
+/* Comparing withPoints and trsp*/
+SELECT * FROM pgr_trsp(
+  $$SELECT
+    id::int, source::int, target::int, cost::float, reverse_cost::float
+  FROM four_edges$$,
+  719, 0.5,
+  718, 0,
+  true, true, NULL);
+ seq |  id1  | id2 |       cost       
+-----+-------+-----+------------------
+   0 |    -1 | 719 | 89.7000005000001
+   1 | 52163 | 717 |       977.000001
+   2 | 52222 | 718 |       961.000001
+   3 | 52220 |  -1 |                0
+(4 rows)
+
+SELECT * FROM pgr_withPoints(
+  $$SELECT
+    id, source, target, cost, reverse_cost
+  FROM four_edges$$,
+  $$SELECT 719 AS edge_id, 0.5::float AS fraction$$,
+  -1,
+  /* selecting source because we have 0 */
+  (SELECT source  FROM four_edges WHERE id = 718),
+  true);
+ seq | path_seq | node  | edge |       cost       |     agg_cost     
+-----+----------+-------+------+------------------+------------------
+   1 |        1 |    -1 |  719 | 89.7000005000001 |                0
+   2 |        2 | 52163 |  717 |       977.000001 | 89.7000005000001
+   3 |        3 | 52222 |  718 |       961.000001 |     1066.7000015
+   4 |        4 | 52220 |   -1 |                0 |     2027.7000025
+(4 rows)
+
+/* TODO should give result more or less the same as above*/
+SELECT * FROM pgr_withPoints(
+  $$SELECT
+    id, source, target, cost, reverse_cost
+  FROM four_edges$$,
+  $$(SELECT 719 AS edge_id, 0.5::float AS fraction)
+    UNION
+  (SELECT 718, 0)$$,
+  -1, -2,
+  true);
+ seq | path_seq | node | edge | cost | agg_cost 
+-----+----------+------+------+------+----------
+(0 rows)
+
+SELECT * FROM pgr_trsp(
+  $$SELECT
+    id::int, source::int, target::int, cost::float, reverse_cost::float
+  FROM four_edges$$,
+  719, 0,
+  718, 0.5,
+  true, true, NULL);
+ seq |  id1  | id2 |    cost     
+-----+-------+-----+-------------
+   0 | 52163 | 717 |  977.000001
+   1 | 52222 | 718 | 480.5000005
+   2 |    -2 |  -1 |           0
+(3 rows)
+
+SELECT * FROM pgr_withPoints(
+  $$SELECT
+    id, source, target, cost, reverse_cost
+  FROM four_edges$$,
+  $$SELECT 718 AS edge_id, 0.5::float AS fraction$$,
+  /* selecting source because we have 0 */
+  (SELECT source  FROM four_edges WHERE id = 719),
+  -1,
+  true);
+ seq | path_seq | node  | edge |    cost     |   agg_cost   
+-----+----------+-------+------+-------------+--------------
+   1 |        1 | 52163 |  717 |  977.000001 |            0
+   2 |        2 | 52222 |  718 | 480.5000005 |   977.000001
+   3 |        3 |    -1 |   -1 |           0 | 1457.5000015
+(3 rows)
+
+/* TODO should give result more or less the same as above*/
+SELECT * FROM pgr_withPoints(
+  $$SELECT
+    id, source, target, cost, reverse_cost
+  FROM four_edges$$,
+  $$(SELECT 719 AS edge_id, 0::float AS fraction)
+    UNION
+  (SELECT 718, 0.5)$$,
+  -1, -2,
+  true);
+ seq | path_seq | node | edge | cost | agg_cost 
+-----+----------+------+------+------+----------
+(0 rows)
+
+SELECT * FROM pgr_trsp(
+  $$SELECT
+    id::int, source::int, target::int, cost::float, reverse_cost::float
+  FROM four_edges$$,
+  719, 0.5,
+  718, 0.5,
+  true, true, NULL);
+ seq |  id1  | id2 |       cost       
+-----+-------+-----+------------------
+   0 |    -1 | 719 | 89.7000005000001
+   1 | 52163 | 717 |       977.000001
+   2 | 52222 | 718 |      480.5000005
+   3 |    -2 |  -1 |                0
+(4 rows)
+
+SELECT * FROM pgr_withPoints(
+  $$SELECT
+    id, source, target, cost, reverse_cost
+  FROM four_edges$$,
+  $$(SELECT 719 AS edge_id, 0.5::float AS fraction)
+    UNION
+  (SELECT 718, 0.5)$$,
+  -1, -2,
+  true);
+ seq | path_seq | node  | edge |    cost     |   agg_cost   
+-----+----------+-------+------+-------------+--------------
+   1 |        1 |    -1 |  718 | 480.5000005 |            0
+   2 |        2 | 52222 |  717 |  977.000001 |  480.5000005
+   3 |        3 | 52163 |  719 |  89.7000005 | 1457.5000015
+   4 |        4 |    -2 |   -1 |           0 |  1547.200002
+(4 rows)
+
+ROLLBACK;
+ROLLBACK
diff --git a/test/trsp/four_edges.test.sql b/test/trsp/four_edges.test.sql
new file mode 100644
index 0000000..f3adf99
--- /dev/null
+++ b/test/trsp/four_edges.test.sql
@@ -0,0 +1,146 @@
+
+CREATE TABLE four_edges (
+    id BIGINT,
+    source BIGINT,
+    target BIGINT,
+    cost FLOAT,
+    reverse_cost FLOAT);
+
+INSERT INTO four_edges (id, source, target, cost, reverse_cost) VALUES
+( 719 ,  52163 , -56570 , 179.400001 ,   179.400001),
+( 717 ,  52222 ,  52163 , 977.000001 ,   977.000001),
+( 718 ,  52220 ,  52222 , 961.000001 ,   961.000001),
+( 716 , -21019 ,  52220 , 992.000001 ,   992.000001);
+
+SELECT * FROM pgr_trsp(
+  $$SELECT
+    id::int, source::int, target::int, cost::float, reverse_cost::float
+  FROM
+    (VALUES
+      (719, 52163, -56570, 179.400001, 179.400001),
+      (717, 52222, 52163, 977.000001, 977.000001),
+      (718, 52220, 52222, 961.000001, 961.000001),
+      (716, -21019, 52220, 992.000001, 992.000001)
+    ) AS t (id, source, target, cost, reverse_cost)$$,
+  719, 0,
+  718, 0,
+  true, true, NULL);
+
+ 
+SELECT * FROM pgr_trsp(
+  $$SELECT
+    id::int, source::int, target::int, cost::float, reverse_cost::float
+  FROM
+    (VALUES
+      (719, 52163, -56570, 179.40000, 179.40000),
+      (717, 52222, 52163, 977.00000, 977.00000),
+      (718, 52220, 52222, 961.00000, 961.00000),
+      (716, -21019, 52220, 992.00000, 992.00000)
+    ) AS t (id, source, target, cost, reverse_cost)$$,
+  (SELECT source::int  FROM four_edges WHERE id = 719),
+  (SELECT source::int  FROM four_edges WHERE id = 718),
+  true, true, NULL);
+
+ 
+SELECT * FROM pgr_trsp(
+  $$SELECT
+    id::int, source::int, target::int, cost::float, reverse_cost::float
+  FROM four_edges$$,
+  719, 0,
+  718, 0,
+  true, true, NULL);
+
+SELECT * FROM pgr_dijkstra(
+  $$SELECT
+    id::int, source::int, target::int, cost::float, reverse_cost::float
+  FROM four_edges$$,
+  52163,
+  52220,
+  false);
+
+SELECT * FROM pgr_dijkstra(
+  $$SELECT
+    id, source, target, cost, reverse_cost
+  FROM four_edges$$,
+  (SELECT source  FROM four_edges WHERE id = 719),
+  (SELECT source  FROM four_edges WHERE id = 718),
+  true);
+
+/* Comparing withPoints and trsp*/
+
+SELECT * FROM pgr_trsp(
+  $$SELECT
+    id::int, source::int, target::int, cost::float, reverse_cost::float
+  FROM four_edges$$,
+  719, 0.5,
+  718, 0,
+  true, true, NULL);
+
+SELECT * FROM pgr_withPoints(
+  $$SELECT
+    id, source, target, cost, reverse_cost
+  FROM four_edges$$,
+  $$SELECT 719 AS edge_id, 0.5::float AS fraction$$,
+  -1,
+  /* selecting source because we have 0 */
+  (SELECT source  FROM four_edges WHERE id = 718),
+  true);
+
+/* TODO should give result more or less the same as above*/
+SELECT * FROM pgr_withPoints(
+  $$SELECT
+    id, source, target, cost, reverse_cost
+  FROM four_edges$$,
+  $$(SELECT 719 AS edge_id, 0.5::float AS fraction)
+    UNION
+  (SELECT 718, 0)$$,
+  -1, -2,
+  true);
+
+SELECT * FROM pgr_trsp(
+  $$SELECT
+    id::int, source::int, target::int, cost::float, reverse_cost::float
+  FROM four_edges$$,
+  719, 0,
+  718, 0.5,
+  true, true, NULL);
+
+SELECT * FROM pgr_withPoints(
+  $$SELECT
+    id, source, target, cost, reverse_cost
+  FROM four_edges$$,
+  $$SELECT 718 AS edge_id, 0.5::float AS fraction$$,
+  /* selecting source because we have 0 */
+  (SELECT source  FROM four_edges WHERE id = 719),
+  -1,
+  true);
+
+/* TODO should give result more or less the same as above*/
+SELECT * FROM pgr_withPoints(
+  $$SELECT
+    id, source, target, cost, reverse_cost
+  FROM four_edges$$,
+  $$(SELECT 719 AS edge_id, 0::float AS fraction)
+    UNION
+  (SELECT 718, 0.5)$$,
+  -1, -2,
+  true);
+
+SELECT * FROM pgr_trsp(
+  $$SELECT
+    id::int, source::int, target::int, cost::float, reverse_cost::float
+  FROM four_edges$$,
+  719, 0.5,
+  718, 0.5,
+  true, true, NULL);
+
+SELECT * FROM pgr_withPoints(
+  $$SELECT
+    id, source, target, cost, reverse_cost
+  FROM four_edges$$,
+  $$(SELECT 719 AS edge_id, 0.5::float AS fraction)
+    UNION
+  (SELECT 718, 0.5)$$,
+  -1, -2,
+  true);
+
diff --git a/test/trsp/four_edges_v2-0.result b/test/trsp/four_edges_v2-0.result
new file mode 100644
index 0000000..02eaa4d
--- /dev/null
+++ b/test/trsp/four_edges_v2-0.result
@@ -0,0 +1,103 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+CREATE TABLE four_edges (
+    id BIGINT,
+    source BIGINT,
+    target BIGINT,
+    cost FLOAT,
+    reverse_cost FLOAT);
+CREATE TABLE
+INSERT INTO four_edges (id, source, target, cost, reverse_cost) VALUES
+( 719 ,  52163 , -56570 , 179.400001 ,   179.400001),
+( 717 ,  52222 ,  52163 , 977.000001 ,   977.000001),
+( 718 ,  52220 ,  52222 , 961.000001 ,   961.000001),
+( 716 , -21019 ,  52220 , 992.000001 ,   992.000001);
+INSERT 0 4
+SELECT * FROM pgr_trsp(
+  $$SELECT
+    id::int, source::int, target::int, cost::float, reverse_cost::float
+  FROM
+    (VALUES
+      (719, 52163, -56570, 179.400001, 179.400001),
+      (717, 52222, 52163, 977.000001, 977.000001),
+      (718, 52220, 52222, 961.000001, 961.000001),
+      (716, -21019, 52220, 992.000001, 992.000001)
+    ) AS t (id, source, target, cost, reverse_cost)$$,
+  719, 0,
+  718, 0,
+  true, true, NULL);
+ seq |  id1  | id2 |    cost    
+-----+-------+-----+------------
+   0 | 52163 | 717 | 977.000001
+   1 | 52222 | 718 | 961.000001
+   2 | 52220 |  -1 |          0
+(3 rows)
+
+SELECT * FROM pgr_trsp(
+  $$SELECT
+    id::int, source::int, target::int, cost::float, reverse_cost::float
+  FROM
+    (VALUES
+      (719, 52163, -56570, 179.40000, 179.40000),
+      (717, 52222, 52163, 977.00000, 977.00000),
+      (718, 52220, 52222, 961.00000, 961.00000),
+      (716, -21019, 52220, 992.00000, 992.00000)
+    ) AS t (id, source, target, cost, reverse_cost)$$,
+  (SELECT source::int  FROM four_edges WHERE id = 719),
+  (SELECT source::int  FROM four_edges WHERE id = 718),
+  true, true, NULL);
+ seq |  id1  | id2 | cost 
+-----+-------+-----+------
+   0 | 52163 | 717 |  977
+   1 | 52222 | 718 |  961
+   2 | 52220 |  -1 |    0
+(3 rows)
+
+SELECT * FROM pgr_trsp(
+  $$SELECT
+    id::int, source::int, target::int, cost::float, reverse_cost::float
+  FROM four_edges$$,
+  719, 0,
+  718, 0,
+  true, true, NULL);
+ seq |  id1  | id2 |    cost    
+-----+-------+-----+------------
+   0 | 52163 | 717 | 977.000001
+   1 | 52222 | 718 | 961.000001
+   2 | 52220 |  -1 |          0
+(3 rows)
+
+SELECT * FROM pgr_dijkstra(
+  $$SELECT
+    id::int, source::int, target::int, cost::float, reverse_cost::float
+  FROM four_edges$$,
+  52163,
+  52220,
+  true, true);
+NOTICE:  Deprecated function
+ seq |  id1  | id2 |    cost    
+-----+-------+-----+------------
+   0 | 52163 | 717 | 977.000001
+   1 | 52222 | 718 | 961.000001
+   2 | 52220 |  -1 |          0
+(3 rows)
+
+SELECT * FROM pgr_dijkstra(
+  $$SELECT
+    id::int, source::int, target::int, cost::float, reverse_cost::float
+  FROM four_edges$$,
+  (SELECT source::int  FROM four_edges WHERE id = 719),
+  (SELECT source::int  FROM four_edges WHERE id = 718),
+  true, true);
+NOTICE:  Deprecated function
+ seq |  id1  | id2 |    cost    
+-----+-------+-----+------------
+   0 | 52163 | 717 | 977.000001
+   1 | 52222 | 718 | 961.000001
+   2 | 52220 |  -1 |          0
+(3 rows)
+
+ROLLBACK;
+ROLLBACK
diff --git a/test/trsp/four_edges_v2-0.test.sql b/test/trsp/four_edges_v2-0.test.sql
new file mode 100644
index 0000000..061952c
--- /dev/null
+++ b/test/trsp/four_edges_v2-0.test.sql
@@ -0,0 +1,69 @@
+
+
+CREATE TABLE four_edges (
+    id BIGINT,
+    source BIGINT,
+    target BIGINT,
+    cost FLOAT,
+    reverse_cost FLOAT);
+
+INSERT INTO four_edges (id, source, target, cost, reverse_cost) VALUES
+( 719 ,  52163 , -56570 , 179.400001 ,   179.400001),
+( 717 ,  52222 ,  52163 , 977.000001 ,   977.000001),
+( 718 ,  52220 ,  52222 , 961.000001 ,   961.000001),
+( 716 , -21019 ,  52220 , 992.000001 ,   992.000001);
+
+SELECT * FROM pgr_trsp(
+  $$SELECT
+    id::int, source::int, target::int, cost::float, reverse_cost::float
+  FROM
+    (VALUES
+      (719, 52163, -56570, 179.400001, 179.400001),
+      (717, 52222, 52163, 977.000001, 977.000001),
+      (718, 52220, 52222, 961.000001, 961.000001),
+      (716, -21019, 52220, 992.000001, 992.000001)
+    ) AS t (id, source, target, cost, reverse_cost)$$,
+  719, 0,
+  718, 0,
+  true, true, NULL);
+
+ 
+SELECT * FROM pgr_trsp(
+  $$SELECT
+    id::int, source::int, target::int, cost::float, reverse_cost::float
+  FROM
+    (VALUES
+      (719, 52163, -56570, 179.40000, 179.40000),
+      (717, 52222, 52163, 977.00000, 977.00000),
+      (718, 52220, 52222, 961.00000, 961.00000),
+      (716, -21019, 52220, 992.00000, 992.00000)
+    ) AS t (id, source, target, cost, reverse_cost)$$,
+  (SELECT source::int  FROM four_edges WHERE id = 719),
+  (SELECT source::int  FROM four_edges WHERE id = 718),
+  true, true, NULL);
+
+ 
+SELECT * FROM pgr_trsp(
+  $$SELECT
+    id::int, source::int, target::int, cost::float, reverse_cost::float
+  FROM four_edges$$,
+  719, 0,
+  718, 0,
+  true, true, NULL);
+
+SELECT * FROM pgr_dijkstra(
+  $$SELECT
+    id::int, source::int, target::int, cost::float, reverse_cost::float
+  FROM four_edges$$,
+  52163,
+  52220,
+  true, true);
+
+SELECT * FROM pgr_dijkstra(
+  $$SELECT
+    id::int, source::int, target::int, cost::float, reverse_cost::float
+  FROM four_edges$$,
+  (SELECT source::int  FROM four_edges WHERE id = 719),
+  (SELECT source::int  FROM four_edges WHERE id = 718),
+  true, true);
+
diff --git a/test/trsp/issue693.result b/test/trsp/issue693.result
new file mode 100644
index 0000000..5b35676
--- /dev/null
+++ b/test/trsp/issue693.result
@@ -0,0 +1,28 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+CREATE TABLE routing (gid serial, length integer, source integer, target integer, reverse_cost integer);
+CREATE TABLE
+INSERT INTO routing (length, source, target, reverse_cost) VALUES
+     (10000, 1, 2, 10000),
+     (5, 3, 1, 5),
+     (10, 4, 3, 10),
+     (10, 2, 4, 10);
+INSERT 0 4
+SELECT pgr_trsp(
+          'SELECT gid as id, source::int4, target::int4, length::float8 as cost, length::float8 as reverse_cost FROM routing',
+          1, 0.1, 1, 0.9, false, true
+    );
+   pgr_trsp
+---------------
+ (0,-1,1,1000)
+ (1,1,2,5)
+ (2,3,3,10)
+ (3,4,4,10)
+ (4,2,1,1000)
+ (5,-2,-1,0)
+(6 rows)
+
+ROLLBACK;
+ROLLBACK
diff --git a/test/trsp/issue693.test.sql b/test/trsp/issue693.test.sql
new file mode 100644
index 0000000..0b5a94c
--- /dev/null
+++ b/test/trsp/issue693.test.sql
@@ -0,0 +1,14 @@
+
+
+    CREATE TABLE routing (gid serial, length integer, source integer, target integer, reverse_cost integer);
+    INSERT INTO routing (length, source, target, reverse_cost) VALUES
+     (10000, 1, 2, 10000),
+     (5, 3, 1, 5),
+     (10, 4, 3, 10),
+     (10, 2, 4, 10);
+
+    SELECT pgr_trsp(
+          'SELECT gid as id, source::int4, target::int4, length::float8 as cost, length::float8 as reverse_cost FROM routing',
+          1, 0.1, 1, 0.9, false, true
+    );
+
diff --git a/test/trsp/issue704.result b/test/trsp/issue704.result
new file mode 100644
index 0000000..8c4f7c5
--- /dev/null
+++ b/test/trsp/issue704.result
@@ -0,0 +1,95 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+CREATE TABLE maptest as
+SELECT  671222::integer as id, 318255::integer as  source, 222698::integer as target, 14.02::float8 as cost, 14.02::float8 as reverse_cost UNION ALL
+SELECT  671223, 222698, 36655, 197.16, 197.16 UNION ALL
+SELECT  582877, 408918, 5556, 458.09, 458.09 UNION ALL
+SELECT  582876, 318255, 408918, 3.89, 3.89 UNION ALL
+SELECT  585280, 5556, 454424, 54.84, 54.84;
+SELECT 5
+SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4)
+FROM pgr_trsp(
+    'select * from maptest',
+    582877,
+    0,
+    582877,
+    0.5,
+    true,
+    true,
+    null
+) PG ;
+ seq |   node |  edge  |   cost   
+-----+--------+--------+----------
+   0 | 408918 | 582877 | 229.0450
+   1 |     -2 |     -1 |   0.0000
+(2 rows)
+
+SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4)
+FROM pgr_trsp(
+    'select * from maptest',
+    582877,
+    0.0000000001,
+    582877,
+    0.5,
+    true,
+    true,
+    null
+) PG ;
+ seq | node |  edge  |   cost
+-----+------+--------+----------
+   0 |   -1 | 582877 | 229.0450
+   1 |   -2 |     -1 |   0.0000
+(2 rows)
+
+SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4)
+FROM pgr_trsp(
+    'select * from maptest',
+    582877,
+    0,
+    582877,
+    0.5,
+    true,
+    true,
+    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+) PG ;
+ seq | node |  edge  |   cost
+-----+------+--------+----------
+   0 |   -1 | 582877 | 229.0450
+(1 row)
+
+SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4)
+FROM pgr_trsp(
+    'select * from maptest',
+    582877,
+    0.0000000001,
+    582877,
+    0.5,
+    true,
+    true,
+    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+) PG ;
+ seq | node |  edge  |   cost
+-----+------+--------+----------
+   0 |   -1 | 582877 | 229.0450
+(1 row)
+
+SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4)
+FROM pgr_trsp(
+    'select * from maptest',
+    582877,
+    0,
+    582877,
+    1,
+    true,
+    true
+);
+ seq |  node  |  edge  |   cost   
+-----+--------+--------+----------
+   0 | 408918 | 582877 | 458.0900
+   1 |   5556 |     -1 |   0.0000
+(2 rows)
+
+ROLLBACK;
+ROLLBACK
diff --git a/test/trsp/issue704.test.sql b/test/trsp/issue704.test.sql
new file mode 100644
index 0000000..a8e05b4
--- /dev/null
+++ b/test/trsp/issue704.test.sql
@@ -0,0 +1,67 @@
+
+
+CREATE TABLE maptest as
+SELECT  671222::integer as id, 318255::integer as  source, 222698::integer as target, 14.02::float8 as cost, 14.02::float8 as reverse_cost UNION ALL
+SELECT  671223, 222698, 36655, 197.16, 197.16 UNION ALL
+SELECT  582877, 408918, 5556, 458.09, 458.09 UNION ALL
+SELECT  582876, 318255, 408918, 3.89, 3.89 UNION ALL
+SELECT  585280, 5556, 454424, 54.84, 54.84;
+SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4)
+FROM pgr_trsp(
+    'select * from maptest',
+    582877,     -- edge_id for start
+    0,          -- ini_offset
+    582877,     -- edge_id of route end
+    0.5,        -- end_offset
+    true,        -- directed graph?
+    true,      -- has_reverse_cost?
+    null -- include the turn restrictions
+) PG ;
+
+SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4)
+FROM pgr_trsp(
+    'select * from maptest',
+    582877,     -- edge_id for start
+    0.0000000001,          -- ini_offset
+    582877,     -- edge_id of route end
+    0.5,        -- end_offset
+    true,        -- directed graph?
+    true,      -- has_reverse_cost?
+    null -- include the turn restrictions
+) PG ;
+
+SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4)
+FROM pgr_trsp(
+    'select * from maptest',
+    582877,     -- edge_id for start
+    0,         -- ini_offset
+    582877,     -- edge_id of route end
+    0.5,        -- end_offset
+    true,        -- directed graph?
+    true,      -- has_reverse_cost?
+    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+) PG ;
+
+SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4)
+FROM pgr_trsp(
+    'select * from maptest',
+    582877,     -- edge_id for start
+    0.0000000001,          -- ini_offset
+    582877,     -- edge_id of route end
+    0.5,        -- end_offset
+    true,        -- directed graph?
+    true,      -- has_reverse_cost?
+    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+) PG ;
+
+SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4)
+FROM pgr_trsp(
+    'select * from maptest',
+    582877,     -- edge_id for start
+    0,          -- ini_offset
+    582877,     -- edge_id of route end
+    1,        -- end_offset
+    true,        -- directed graph?
+    true      -- has_reverse_cost?
+);
+
diff --git a/test/trsp/issue717.result b/test/trsp/issue717.result
new file mode 100644
index 0000000..d8236aa
--- /dev/null
+++ b/test/trsp/issue717.result
@@ -0,0 +1,359 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- tests to without restrictions
+-- directed with reverse_cost
+/*PGR-GNU*****************************************************************
+
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License AS published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+
+
+
+
+
+
+SELECT * FROM pgr_trspViaVertices(
+    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
+    ARRAY[2, 7, 11]::INTEGER[],
+    true,
+    true
+);
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |   1 |   2 |   4 |    1
+   2 |   1 |   5 |   7 |    1
+   3 |   1 |   8 |   6 |    1
+   4 |   2 |   7 |   6 |    1
+   5 |   2 |   8 |   7 |    1
+   6 |   2 |   5 |  10 |    1
+   7 |   2 |  10 |  12 |    1
+   8 |   2 |  11 |  -1 |    0
+(8 rows)
+
+---------------------------
+SELECT * FROM pgr_trspViaEdges(
+    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
+    ARRAY[4,6,11]::INTEGER[],
+    ARRAY[0.5, 0.5, 0.5]::float8[],
+    true,
+    true
+);
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |   1 |  -1 |   4 |  0.5
+   2 |   1 |   5 |   7 |    1
+   3 |   1 |   8 |   6 |  0.5
+   4 |   1 |  -2 |  -1 |    0
+   5 |   2 |  -2 |   6 |  0.5
+   6 |   2 |   8 |   7 |    1
+   7 |   2 |   5 |   8 |    1
+   8 |   2 |   6 |  11 |  0.5
+   9 |   2 |  -3 |  -2 |    0
+(9 rows)
+
+---------------------------
+SELECT * FROM pgr_trspViaEdges(
+    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
+    ARRAY[1,11,6]::INTEGER[],
+    ARRAY[0.5, 0.5, 0.5]::float8[],
+    true,
+    true
+);
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |   1 |  -1 |   1 |  0.5
+   2 |   1 |   2 |   4 |    1
+   3 |   1 |   5 |   8 |    1
+   4 |   1 |   6 |  11 |  0.5
+   5 |   1 |  -2 |  -1 |    0
+   6 |   2 |  -2 |  11 |  0.5
+   7 |   2 |  11 |  13 |    1
+   8 |   2 |  12 |  15 |    1
+   9 |   2 |   9 |   9 |    1
+  10 |   2 |   6 |   8 |    1
+  11 |   2 |   5 |   7 |    1
+  12 |   2 |   8 |   6 |  0.5
+  13 |   2 |  -3 |  -2 |    0
+(13 rows)
+
+---------------------------
+SELECT * FROM pgr_trspViaEdges(
+    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
+    ARRAY[1,11,6]::INTEGER[],
+    ARRAY[0.5, 0.5, 0.5]::float8[],
+    true,
+    true
+);
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |   1 |  -1 |   1 |  0.5
+   2 |   1 |   2 |   4 |    1
+   3 |   1 |   5 |   8 |    1
+   4 |   1 |   6 |  11 |  0.5
+   5 |   1 |  -2 |  -1 |    0
+   6 |   2 |  -2 |  11 |  0.5
+   7 |   2 |  11 |  13 |    1
+   8 |   2 |  12 |  15 |    1
+   9 |   2 |   9 |   9 |    1
+  10 |   2 |   6 |   8 |    1
+  11 |   2 |   5 |   7 |    1
+  12 |   2 |   8 |   6 |  0.5
+  13 |   2 |  -3 |  -2 |    0
+(13 rows)
+
+---------------------------
+-- directed without reverse_cost
+SELECT * FROM pgr_trspViaVertices(
+    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
+    ARRAY[2, 7, 11]::INTEGER[],
+    true,
+    false
+);
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+(0 rows)
+
+---------------------------
+SELECT * FROM pgr_trspViaEdges(
+    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
+    ARRAY[4,6,11]::INTEGER[],
+    ARRAY[0.5, 0.5, 0.5]::float8[],
+    true,
+    false
+);
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |   2 |  -2 |   6 |  0.5
+   2 |   2 |   8 |   7 |    1
+   3 |   2 |   5 |   8 |    1
+   4 |   2 |   6 |  11 |  0.5
+   5 |   2 |  -3 |  -2 |    0
+(5 rows)
+
+---------------------------
+SELECT * FROM pgr_trspViaEdges(
+    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
+    ARRAY[1,11,6]::INTEGER[],
+    ARRAY[0.5, 0.5, 0.5]::float8[],
+    true,
+    false
+);
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |   1 |  -1 |   1 |  0.5
+   2 |   1 |   2 |   4 |    1
+   3 |   1 |   5 |   8 |    1
+   4 |   1 |   6 |  11 |  0.5
+   5 |   1 |  -2 |  -2 |    0
+(5 rows)
+
+---------------------------
+SELECT * FROM pgr_trspViaEdges(
+    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
+    ARRAY[1,11,6]::INTEGER[],
+    ARRAY[0.5, 0.5, 0.5]::float8[],
+    true,
+    false
+);
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |   1 |  -1 |   1 |  0.5
+   2 |   1 |   2 |   4 |    1
+   3 |   1 |   5 |   8 |    1
+   4 |   1 |   6 |  11 |  0.5
+   5 |   1 |  -2 |  -2 |    0
+(5 rows)
+
+---------------------------
+-- undirected with reverse_cost
+SELECT * FROM pgr_trspViaVertices(
+    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
+    ARRAY[2, 7, 11]::INTEGER[],
+    false,
+    true
+);
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |   1 |   2 |   4 |    1
+   2 |   1 |   5 |   7 |    1
+   3 |   1 |   8 |   6 |    1
+   4 |   2 |   7 |   6 |    1
+   5 |   2 |   8 |   7 |    1
+   6 |   2 |   5 |  10 |    1
+   7 |   2 |  10 |  12 |    1
+   8 |   2 |  11 |  -1 |    0
+(8 rows)
+
+---------------------------
+SELECT * FROM pgr_trspViaEdges(
+    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
+    ARRAY[4,6,11]::INTEGER[],
+    ARRAY[0.5, 0.5, 0.5]::float8[],
+    false,
+    true
+);
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |   1 |  -1 |   4 |  0.5
+   2 |   1 |   5 |   7 |    1
+   3 |   1 |   8 |   6 |  0.5
+   4 |   1 |  -2 |  -1 |    0
+   5 |   2 |  -2 |   6 |  0.5
+   6 |   2 |   8 |   7 |    1
+   7 |   2 |   5 |   8 |    1
+   8 |   2 |   6 |  11 |  0.5
+   9 |   2 |  -3 |  -2 |    0
+(9 rows)
+
+---------------------------
+SELECT * FROM pgr_trspViaEdges(
+    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
+    ARRAY[1,11,6]::INTEGER[],
+    ARRAY[0.5, 0.5, 0.5]::float8[],
+    false,
+    true
+);
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |   1 |  -1 |   1 |  0.5
+   2 |   1 |   2 |   2 |    1
+   3 |   1 |   3 |   5 |    1
+   4 |   1 |   6 |  11 |  0.5
+   5 |   1 |  -2 |  -1 |    0
+   6 |   2 |  -2 |  11 |  0.5
+   7 |   2 |   6 |   8 |    1
+   8 |   2 |   5 |   7 |    1
+   9 |   2 |   8 |   6 |  0.5
+  10 |   2 |  -3 |  -2 |    0
+(10 rows)
+
+---------------------------
+SELECT * FROM pgr_trspViaEdges(
+    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
+    ARRAY[1,11,6]::INTEGER[],
+    ARRAY[0.5, 0.5, 0.5]::float8[],
+    false,
+    true
+);
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |   1 |  -1 |   1 |  0.5
+   2 |   1 |   2 |   2 |    1
+   3 |   1 |   3 |   5 |    1
+   4 |   1 |   6 |  11 |  0.5
+   5 |   1 |  -2 |  -1 |    0
+   6 |   2 |  -2 |  11 |  0.5
+   7 |   2 |   6 |   8 |    1
+   8 |   2 |   5 |   7 |    1
+   9 |   2 |   8 |   6 |  0.5
+  10 |   2 |  -3 |  -2 |    0
+(10 rows)
+
+---------------------------
+-- undirected without reverse_cost
+SELECT * FROM pgr_trspViaVertices(
+    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
+    ARRAY[2, 7, 11]::INTEGER[],
+    false,
+    false
+);
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |   1 |   2 |   4 |    1
+   2 |   1 |   5 |   7 |    1
+   3 |   1 |   8 |   6 |    1
+   4 |   2 |   7 |   6 |    1
+   5 |   2 |   8 |   7 |    1
+   6 |   2 |   5 |  10 |    1
+   7 |   2 |  10 |  12 |    1
+   8 |   2 |  11 |  -1 |    0
+(8 rows)
+
+---------------------------
+SELECT * FROM pgr_trspViaEdges(
+    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
+    ARRAY[4,6,11]::INTEGER[],
+    ARRAY[0.5, 0.5, 0.5]::float8[],
+    false,
+    false
+);
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |   1 |  -1 |   4 |  0.5
+   2 |   1 |   5 |   7 |    1
+   3 |   1 |   8 |   6 |  0.5
+   4 |   1 |  -2 |  -1 |    0
+   5 |   2 |  -2 |   6 |  0.5
+   6 |   2 |   8 |   7 |    1
+   7 |   2 |   5 |   8 |    1
+   8 |   2 |   6 |  11 |  0.5
+   9 |   2 |  -3 |  -2 |    0
+(9 rows)
+
+---------------------------
+SELECT * FROM pgr_trspViaEdges(
+    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
+    ARRAY[1,11,6]::INTEGER[],
+    ARRAY[0.5, 0.5, 0.5]::float8[],
+    false,
+    false
+);
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |   1 |  -1 |   1 |  0.5
+   2 |   1 |   2 |   4 |    1
+   3 |   1 |   5 |   8 |    1
+   4 |   1 |   6 |  11 |  0.5
+   5 |   1 |  -2 |  -1 |    0
+   6 |   2 |  -2 |  11 |  0.5
+   7 |   2 |   6 |   8 |    1
+   8 |   2 |   5 |   7 |    1
+   9 |   2 |   8 |   6 |  0.5
+  10 |   2 |  -3 |  -2 |    0
+(10 rows)
+
+---------------------------
+SELECT * FROM pgr_trspViaEdges(
+    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table',
+    ARRAY[1,11,6]::INTEGER[],
+    ARRAY[0.5, 0.5, 0.5]::float8[],
+    false,
+    false
+);
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |   1 |  -1 |   1 |  0.5
+   2 |   1 |   2 |   4 |    1
+   3 |   1 |   5 |   8 |    1
+   4 |   1 |   6 |  11 |  0.5
+   5 |   1 |  -2 |  -1 |    0
+   6 |   2 |  -2 |  11 |  0.5
+   7 |   2 |   6 |   8 |    1
+   8 |   2 |   5 |   7 |    1
+   9 |   2 |   8 |   6 |  0.5
+  10 |   2 |  -3 |  -2 |    0
+(10 rows)
+
+---------------------------
+ROLLBACK;
+ROLLBACK
diff --git a/src/trsp/test/issue717.test.sql b/test/trsp/issue717.test.sql
similarity index 100%
rename from src/trsp/test/issue717.test.sql
rename to test/trsp/issue717.test.sql
diff --git a/test/trsp/test.conf b/test/trsp/test.conf
new file mode 100644
index 0000000..5097fd3
--- /dev/null
+++ b/test/trsp/test.conf
@@ -0,0 +1,29 @@
+#!/usr/bin/perl -w
+
+%main::tests = (
+    'any' => {
+        'comment' => 'TRSP test for any versions.',
+        'data' => ['trsp-issue244.data'],
+        'tests' => [qw(
+            trsp-renumber
+            doc-trsp
+            trsp-any-02
+            trsp_vias-any-04
+            issue693
+            issue704
+            issue717
+            trsp_notes_v2.6.0
+            four_edges
+            four_edges_v2-0
+            )],
+        'documentation' => [qw(
+            doc-trsp
+            )]
+    },
+
+#    'vpg-vpgis' => {}, # for version specific tests
+#    '8-1' => {},       # for pg 8.x and postgis 1.x
+#    '9.2-2.1' => {},   # for pg 9.2 and postgis 2.1
+);
+
+1;
diff --git a/test/trsp/trsp-any-02.result b/test/trsp/trsp-any-02.result
new file mode 100644
index 0000000..4e3a058
--- /dev/null
+++ b/test/trsp/trsp-any-02.result
@@ -0,0 +1,42 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+CREATE TABLE restrictions2 (
+    rid integer NOT NULL,
+    to_cost double precision,
+    teid integer,
+    feid integer,
+    via text
+);
+CREATE TABLE
+COPY restrictions2 (rid, to_cost, teid, feid, via) FROM stdin WITH NULL '__NULL__' DELIMITER ',';
+COPY 3
+UPDATE edge_table SET cost = cost + 0.001 * id * id, reverse_cost = reverse_cost + 0.001 * id * id;
+UPDATE 18
+select * from pgr_trsp(
+    'select id::integer, source::integer, target::integer,cost, reverse_cost from edge_table ORDER BY ID',
+    1,
+    0.5,
+    6,
+    0.5,
+    true,
+    true,
+
+    'select to_cost, teid as target_id, feid||coalesce('',''||via,'''') as via_path from restrictions2');
+ seq | id1 | id2 |       cost
+-----+-----+-----+-------------------
+   0 |  -1 |   1 |            0.5005
+   1 |   2 |   4 |             1.016
+   2 |   5 |   8 |             1.064
+   3 |   6 |   9 |             1.081
+   4 |   9 |  16 |             1.256
+   5 |   4 |   3 |             1.009
+   6 |   3 |   5 |             1.025
+   7 |   6 |   8 |             1.064
+   8 |   5 |   7 |             1.049
+   9 |   8 |   6 | 0.518000000000001
+(10 rows)
+
+ROLLBACK;
+ROLLBACK
diff --git a/src/trsp/test/trsp-any-02.test.sql b/test/trsp/trsp-any-02.test.sql
similarity index 100%
rename from src/trsp/test/trsp-any-02.test.sql
rename to test/trsp/trsp-any-02.test.sql
diff --git a/test/trsp/trsp-renumber.result b/test/trsp/trsp-renumber.result
new file mode 100644
index 0000000..72ccf51
--- /dev/null
+++ b/test/trsp/trsp-renumber.result
@@ -0,0 +1,86 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+SELECT * FROM pgr_trsp(
+        'SELECT id::INTEGER, (source+10)::INTEGER AS source, (target+10)::INTEGER AS target, cost::FLOAT FROM edge_table',
+        17, 22, false, false
+    );
+ seq | id1 | id2 | cost
+-----+-----+-----+------
+   0 |   17 |   6 |    1
+   1 |   18 |   7 |    1
+   2 |   15 |   8 |    1
+   3 |   16 |   9 |    1
+   4 |   19 |  15 |    1
+   5 |  22 |  -1 |    0
+(6 rows)
+
+CREATE TABLE new_restrictions (
+    id SERIAL PRIMARY KEY,
+    path BIGINT[],
+    cost float);
+CREATE TABLE
+INSERT INTO new_restrictions (path, cost) VALUES
+ (ARRAY[4,7],   100),
+ (ARRAY[8,11],  100),
+ (ARRAY[7,01],  100),
+ (ARRAY[3,8],     4),
+ (ARRAY[61,9],  100),
+ (ARRAY[3,5,8],   4);
+INSERT 0 6
+SELECT * FROM _pgr_trsp(
+    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edge_table',
+    $$ SELECT 1 AS id, ARRAY[4,7] AS path, 100 AS cost $$,
+    2, 7, false
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    2 |    4 |    1 |        0
+   2 |        2 |    5 |   10 |    1 |        1
+   3 |        3 |   10 |   12 |    1 |        2
+   4 |        4 |   11 |   11 |    1 |        3
+   5 |        5 |    6 |    8 |    1 |        4
+   6 |        6 |    5 |    7 |    1 |        5
+   7 |        7 |    8 |    6 |    1 |        6
+   8 |        8 |    7 |   -1 |    0 |        7
+(8 rows)
+
+SELECT * FROM _pgr_trsp(
+    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edge_table',
+    $$ SELECT * FROM new_restrictions $$,
+    2, 7, false
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    2 |    4 |    1 |        0
+   2 |        2 |    5 |   10 |    1 |        1
+   3 |        3 |   10 |   12 |    1 |        2
+   4 |        4 |   11 |   11 |    1 |        3
+   5 |        5 |    6 |    8 |    1 |        4
+   6 |        6 |    5 |    7 |    1 |        5
+   7 |        7 |    8 |    6 |    1 |        6
+   8 |        8 |    7 |   -1 |    0 |        7
+(8 rows)
+
+SELECT * FROM pgr_trsp(
+        'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edge_table',
+        2, 7, false, false,
+        'SELECT to_cost, target_id::int4,
+        from_edge || coalesce('','' || via_path, '''') AS via_path
+        FROM restrictions'
+    );
+ seq | id1 | id2 | cost
+-----+-----+-----+------
+   0 |   2 |   4 |    1
+   1 |   5 |  10 |    1
+   2 |  10 |  12 |    1
+   3 |  11 |  11 |    1
+   4 |   6 |   8 |    1
+   5 |   5 |   7 |    1
+   6 |   8 |   6 |    1
+   7 |   7 |  -1 |    0
+(8 rows)
+
+ROLLBACK;
+ROLLBACK
diff --git a/test/trsp/trsp-renumber.test.sql b/test/trsp/trsp-renumber.test.sql
new file mode 100644
index 0000000..3825c48
--- /dev/null
+++ b/test/trsp/trsp-renumber.test.sql
@@ -0,0 +1,46 @@
+
+
+
+SELECT * FROM pgr_trsp(
+    'SELECT id::INTEGER, (source+10)::INTEGER AS source, (target+10)::INTEGER AS target, cost::FLOAT FROM edge_table',
+    17, 22, false, false
+);
+
+-- select string_to_array(reverse(array_to_string(array_prepend(target_id, ('{'||(via_path)||'}')::integer[]),',')),',') as via, to_cost as cost from old_restriction;
+CREATE TABLE new_restrictions (
+    id SERIAL PRIMARY KEY,
+    path BIGINT[],
+    cost float);
+
+INSERT INTO new_restrictions (path, cost) VALUES
+ (ARRAY[4,7],   100),
+ (ARRAY[8,11],  100),
+ (ARRAY[7,01],  100),
+ (ARRAY[3,8],     4),
+ (ARRAY[61,9],  100),
+ (ARRAY[3,5,8],   4);
+
+SELECT * FROM _pgr_trsp(
+    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edge_table',
+    $$ SELECT 1 AS id, ARRAY[4,7] AS path, 100 AS cost $$,
+    2, 7, false
+);
+
+SELECT * FROM _pgr_trsp(
+    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edge_table',
+    $$ SELECT * FROM new_restrictions $$,
+    2, 7, false
+);
+
+
+SELECT * FROM pgr_trsp(
+    'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edge_table',
+    2, 7, false, false,
+    'SELECT to_cost, target_id::int4,
+    from_edge || coalesce('','' || via_path, '''') AS via_path
+    FROM restrictions'
+);
+
+
+
+
diff --git a/test/trsp/trsp_notes_v2.6.0.result b/test/trsp/trsp_notes_v2.6.0.result
new file mode 100644
index 0000000..87a7d68
--- /dev/null
+++ b/test/trsp/trsp_notes_v2.6.0.result
@@ -0,0 +1,1005 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+ROLLBACK;
+ROLLBACK
+# Notes on pgr_trsp for version 2.6.0
+Table of contents
+* [Introduction](#introduction)
+  * [The restriction](#the-restriction)
+* [The Vertices Signature Version](#the-vertices-signature-version)
+  * [No path representation differences](#vertices-no-path-representation-differences)
+  * [Routing from/to same location](#routing-fromto-same-location)
+  * [Undirected graph](#vertices-undirected-graph)
+* [The Edges Signature Version](#the-edges-signature-version)
+  * [No path representation differences](#edges-no-path-representation-differences)
+  * [Definition of a path](#definition-of-a-path)
+  * [Points on the same edge](#points-on-the-same-edge)
+  * [Undirected graph](#edges-undirected-graph)
+  * [Using a points of interest table](#using-a-points-of-interest-table)
+  * [Routing from/to the same point](#routing-fromto-the-same-point)
+  * [Passing in front of other points](#passing-in-front-of-other-points)
+  * [Routing from a vertex to a point](#edges-routing-from-a-vertex-to-a-point)
+* [pgr_trspViaVertices](#pgr_trspviavertices)
+  * [pgr_trspViaVertices No path representation differences](#pgr_trspviavertices-no-path-representation-differences)
+  * [when a path does not exist on the route](#when-a-path-does-not-exist-on-the-route)
+  * [from 2 to 3 to 2](#from-2-to-3-to-2)
+* [pgr_trspViaEdges](#pgr_trspviaedges)
+  * [pgr_trspViaEdges No path representation differences](#pgr_trspviaedges-no-path-representation-differences)
+  * [Using a points of interest table](#pgr_trspviaedges-using-the-pointsofinterest-table)
+
+# Introduction
+pgr_trsp code has issues that are not being fixed yet, but as time passes and new functionality is added to pgRouting with wrappers to **hide** the issues, not to fix them.
+
+For clarity on the queries:
+* _pgr_trsp (with underscore) is the original code
+* pgr_trsp (lower case) represents the wrapper calling the original code
+* pgr_TRSP (upper case) represents the wrapper calling the replacement function, depending on the function, it can be:
+  * pgr_dijkstra
+  * pgr_dijkstraVia
+  * pgr_withPoints
+  * _pgr_withPointsVia
+
+This page intentions is to compare the original code with the wrapped version of the trsp group of functions.
+## The restriction
+The restriction used in the examples does not have to do anything with the graph:
+* No vertex has id: 25, 32 or 33
+* No edge has id: 25, 32 or 33
+```
+SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path;
+ to_cost | target_id | via_path
+---------+-----------+----------
+     100 |        25 | 32, 33
+(1 row)
+
+```
+The new back end code has the restrictions as follows
+```
+SELECT 1 AS id, 100::float AS cost, 25::INTEGER AS target_id, ARRAY[33, 32, 25] AS path;
+ id | cost | target_id |    path
+----+------+-----------+------------
+  1 |  100 |        25 | {33,32,25}
+(1 row)
+
+```
+therefore the shortest path expected are as if there was no restriction involved
+# The Vertices signature version
+## (Vertices) No path representation differences
+Original function code
+* Sometimes it crasses the server when no path was found
+* Sometimes represents with Error a no path found
+* Forcing the user to use the wrapper or the replacement function
+
+Calls to the original function of is no longer allowed without restrictions
+```
+SELECT * FROM _pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    1, 15, true, true
+);
+ERROR:  function _pgr_trsp(unknown, integer, integer, boolean, boolean) does not exist
+LINE 1: SELECT * FROM _pgr_trsp(
+                      ^
+HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
+```
+dijkstra returns EMPTY SET to represent no path found
+```
+SELECT * FROM pgr_dijkstra(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    1, 15
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+(0 rows)
+
+```
+pgr_trsp use the pgr_dijkstra when there are no restrictions
+therefore returns EMPTY SET to represent no path found
+```
+SELECT * FROM pgr_TRSP(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    1, 15, true, true
+);
+ seq | id1 | id2 | cost
+-----+-----+-----+------
+(0 rows)
+
+```
+pgr_trsp use the original code when there are restrictions
+therefore throws Error to represent no path found
+```
+SELECT * FROM pgr_trsp(
+     $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+     1, 15, true, true,
+     $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+);
+ERROR:  Error computing path: Path Not Found
+```
+## routing from/to same location
+using dijkstra to verify (1 to 1)
+```
+SELECT * FROM pgr_dijkstra(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    1, 1
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+(0 rows)
+
+```
+This call uses the replacement function because there are no restrictions (1 to 1)
+therefore is expected to return EMPTY SET to represent no path found
+```
+SELECT * FROM pgr_TRSP(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    1, 1,  true, true
+);
+ seq | id1 | id2 | cost
+-----+-----+-----+------
+(0 rows)
+
+```
+call forcing the use of the original code (1 to 1)
+* not longer allowed without restrictions
+
+```
+SELECT * FROM _pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    1, 1,  true, true
+);
+ERROR:  function _pgr_trsp(unknown, integer, integer, boolean, boolean) does not exist
+LINE 1: SELECT * FROM _pgr_trsp(
+                      ^
+HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
+```
+trsp with restrictions (1 to 1) use the original code
+is expected to return Error to represent no path found
+```
+SELECT * FROM pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    1, 1,
+    true,
+    true,
+    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+);
+ seq | id1 | id2 | cost
+-----+-----+-----+------
+   0 |   1 |   1 |    1
+   1 |   2 |   4 |    1
+   2 |   5 |   8 |    1
+   3 |   6 |   9 |    1
+   4 |   9 |  16 |    1
+   5 |   4 |   3 |    1
+   6 |   3 |   2 |    1
+   7 |   2 |   1 |    1
+   8 |   1 |  -1 |    0
+(9 rows)
+
+```
+trsp calling the original code with restrictions (1 to 1)
+is expected to return Error to represent no path found
+but "finds" a path when there should be no path.
+```
+SELECT * FROM _pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    $$SELECT 1 AS id, 100::float AS cost, 25::INTEGER AS target_id, ARRAY[33, 32, 25] AS path$$,
+    1, 1,
+    true
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    1 |    1 |    1 |        0
+   2 |        2 |    2 |    4 |    1 |        1
+   3 |        3 |    5 |    8 |    1 |        2
+   4 |        4 |    6 |    9 |    1 |        3
+   5 |        5 |    9 |   16 |    1 |        4
+   6 |        6 |    4 |    3 |    1 |        5
+   7 |        7 |    3 |    2 |    1 |        6
+   8 |        8 |    2 |    1 |    1 |        7
+   9 |        9 |    1 |   -1 |    0 |        8
+(9 rows)
+
+```
+## (vertices) Undirected graph
+using Dijkstra to verify the shortest path from (2 to 3) on undirected graph
+```
+SELECT * FROM pgr_dijkstra(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    2, 3, false
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    2 |    2 |    1 |        0
+   2 |        2 |    3 |   -1 |    0 |        1
+(2 rows)
+
+```
+using the replacement function because there are no restrictions (2 to 3)
+```
+SELECT * FROM pgr_TRSP(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    2, 3,
+    false,
+    true
+);
+ seq | id1 | id2 | cost
+-----+-----+-----+------
+   0 |   2 |   2 |    1
+   1 |   3 |  -1 |    0
+(2 rows)
+
+```
+call forcing the use of the original code
+* not longer allowed without restrictions
+
+```
+SELECT * FROM _pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    2, 3,
+    false, true
+);
+ERROR:  function _pgr_trsp(unknown, integer, integer, boolean, boolean) does not exist
+LINE 1: SELECT * FROM _pgr_trsp(
+                      ^
+HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
+```
+trsp with restrictions (2 to 3)
+does not find the shortest path
+```
+SELECT * FROM pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    2, 3,
+    false, true,
+    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+);
+ seq | id1 | id2 | cost
+-----+-----+-----+------
+   0 |   2 |   2 |    1
+   1 |   3 |  -1 |    0
+(2 rows)
+
+```
+calling the original code with restrictions (2 to 3)
+does not find the shortest path
+```
+SELECT * FROM _pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    $$SELECT 1 AS id, 100::float AS cost, 25::INTEGER AS target_id, ARRAY[33, 32, 25] AS path$$,
+    2, 3,
+    false
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    2 |    2 |    1 |        0
+   2 |        2 |    3 |   -1 |    0 |        1
+(2 rows)
+
+```
+# The Edges signature version
+## (Edges) No path representation differences
+Original function code
+* Sometimes it crasses the server when no path was found
+* Sometimes represents with Error a no path found
+* Forcing the user to use the wrapper or the replacement function
+
+Calls to the original function of is no longer allowed without restrictions
+```
+SELECT * FROM _pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    1, 0.5, 17, 0.5, true, true
+);
+ERROR:  Error computing path: Path Not Found
+```
+pgr_withPoints returns EMPTY SET to represent no path found
+```
+SELECT * FROM pgr_withPoints(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    $$(SELECT 1 as pid, 1 as edge_id, 0.5::float as fraction)
+    UNION
+    (SELECT 2, 17, 0.5)$$,
+    -1, -2
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+(0 rows)
+
+```
+## Definition of a path
+Remember that one characteristic of a path is that for a path of N edges it has N+1 vertices.
+
+For this example, suppose points, where the pid are different even if the edge and fraction are different.
+One point might be on the left side other on the right side, pgr_trsp does not take into account
+the side of the point
+calls forcing the use of the original code
+* not longer allowed without restrictions
+
+```
+SELECT * FROM _pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    1, 0.5, 1, 0.5, true, true
+);
+ seq | id1 | id2 | cost
+-----+-----+-----+------
+   0 |  -1 |   1 |    0
+(1 row)
+
+```
+* with restrictions
+```
+SELECT * FROM _pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    1, 0.5, 1, 0.5, true, true,
+    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+);
+ seq | id1 | id2 | cost
+-----+-----+-----+------
+   0 |  -1 |   1 |    0
+(1 row)
+
+```
+Using the *pgr_withPoints* it returns a path of N edge and N+1 vertices
+```
+SELECT * FROM pgr_withPoints(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    $$(SELECT 1 as pid, 1 as edge_id, 0.5::float as fraction)
+    UNION
+    (SELECT 2, 1, 0.5)$$,
+    -1, -2
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |   -1 |    1 |    0 |        0
+   2 |        2 |   -2 |   -1 |    0 |        0
+(2 rows)
+
+```
+The *pgr_withPoints* is used when there are no restrictions
+```
+SELECT * FROM pgr_TRSP(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    1, 0.5, 1, 0.5, true, true
+);
+ seq | id1 | id2 | cost
+-----+-----+-----+------
+   0 |  -1 |   1 |    0
+   1 |  -2 |  -1 |    0
+(2 rows)
+
+```
+The original *_pgr_trsp* code is used when there are restrictions
+```
+SELECT * FROM pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    1, 0.5, 1, 0.5, true, true,
+    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+);
+ seq | id1 | id2 | cost
+-----+-----+-----+------
+   0 |  -1 |   1 |    0
+(1 row)
+
+```
+note that pgr_withPoints returns an EMPTY SET when the point is the same
+```
+SELECT * FROM pgr_withPoints(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    $$(SELECT 1 as pid, 1 as edge_id, 0.5::float as fraction)
+    UNION
+    (SELECT 2, 1, 0.5)$$,
+    -1, -1
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+(0 rows)
+
+```
+## Points on the same edge
+The *pgr_withPoints* is used when there are no restrictions
+* it returns a path of N edges and N+1 vertices
+```
+SELECT * FROM pgr_TRSP(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    1, 0.5, 1, 0.8, true, true
+);
+ seq | id1 | id2 | cost
+-----+-----+-----+------
+   0 |  -1 |   1 |  0.3
+   1 |  -2 |  -1 |    0
+(2 rows)
+
+```
+The original *_pgr_trsp* is used when there are restrictions
+* it returns a path of N edges and N vertex instead of N edge and N+1 vertices
+```
+SELECT * FROM pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    1, 0.5, 1, 0.8, true, true,
+    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+);
+ seq | id1 | id2 | cost
+-----+-----+-----+------
+   0 |  -1 |   1 |  0.3
+(1 row)
+
+```
+## (Edges) Undirected graph
+the shortest path obtained with *pgr_withPoints*
+```
+SELECT * FROM pgr_withPoints(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    $$(SELECT 1 as pid, 4 as edge_id, 0.5::float as fraction)
+    UNION
+    (SELECT 2, 2, 0.8)$$,
+    -1, -2, directed:=false
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |   -1 |    4 |  0.5 |        0
+   2 |        2 |    2 |    2 |  0.8 |      0.5
+   3 |        3 |   -2 |   -1 |    0 |      1.3
+(3 rows)
+
+```
+The original *_pgr_trsp* is used when there are restrictions
+
+```
+SELECT * FROM pgr_TRSP(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    4, 0.5, 2, 0.8, false, true
+);
+ seq | id1 | id2 | cost
+-----+-----+-----+------
+   0 |  -1 |   4 |  0.5
+   1 |   2 |   2 |  0.8
+   2 |  -2 |  -1 |    0
+(3 rows)
+
+```
+when using restrictions the original *_pgr_trsp* is used internally
+* it returns a path of N edges and N vertex instead of N edge and N+1 vertices
+* it does not return the shortest path.
+
+```
+SELECT * FROM pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    4, 0.5, 2, 0.8, false, true,
+    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+);
+ seq | id1 | id2 | cost
+-----+-----+-----+------
+   0 |  -1 |   4 |  0.5
+   1 |   5 |   8 |    1
+   2 |   6 |   9 |    1
+   3 |   9 |  16 |    1
+   4 |   4 |   3 |    1
+   5 |   3 |   2 |  0.2
+(6 rows)
+
+```
+## Using a points of interest table
+The points of interest
+```
+SELECT * FROM pointsOfInterest;
+ pid |  x  |  y  | edge_id | side | fraction |                  the_geom                  |                  newpoint
+-----+-----+-----+---------+------+----------+--------------------------------------------+--------------------------------------------
+   1 | 1.8 | 0.4 |       1 | l    |      0.4 | 0101000000CDCCCCCCCCCCFC3F9A9999999999D93F | 010100000000000000000000409A9999999999D93F
+   2 | 4.2 | 2.4 |      15 | r    |      0.4 | 0101000000CDCCCCCCCCCC10403333333333330340 | 010100000000000000000010403333333333330340
+   3 | 2.6 | 3.2 |      12 | l    |      0.6 | 0101000000CDCCCCCCCCCC04409A99999999990940 | 0101000000CDCCCCCCCCCC04400000000000000840
+   4 | 0.3 | 1.8 |       6 | r    |      0.3 | 0101000000333333333333D33FCDCCCCCCCCCCFC3F | 0101000000333333333333D33F0000000000000040
+   5 | 2.9 | 1.8 |       5 | l    |      0.8 | 01010000003333333333330740CDCCCCCCCCCCFC3F | 01010000000000000000000840CDCCCCCCCCCCFC3F
+   6 | 2.2 | 1.7 |       4 | b    |      0.7 | 01010000009A99999999990140333333333333FB3F | 01010000000000000000000040333333333333FB3F
+(6 rows)
+
+```
+On *pgr_trsp*, to be able to use the table information:
+* Each parameter has to be extracted explicitly from the table
+* Regardles of the point pid original value
+  * will always be -1 for the first point
+  * will always be -2 for the second point
+```
+SELECT * FROM pgr_TRSP(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
+    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
+    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 6),
+    (SELECT fraction  FROM pointsOfInterest WHERE pid = 6),
+    true, true
+);
+ seq | id1 | id2 | cost
+-----+-----+-----+------
+   0 |  -1 |   1 |  0.6
+   1 |   2 |   4 |  0.7
+   2 |  -2 |  -1 |    0
+(3 rows)
+
+```
+On *pgr_withPoints*, to be able to use the table information:
+* select statement on the *pointsOfInterest* table
+* *Negative* the id to represent the id is a pid
+* The points pids in the result are not renumbered
+* The points pids in the result are represented with negative sign
+```
+SELECT * FROM pgr_withPoints(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
+    -1, -6
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |   -1 |    1 |  0.6 |        0
+   2 |        2 |    2 |    4 |  0.7 |      0.6
+   3 |        3 |   -6 |   -1 |    0 |      1.3
+(3 rows)
+
+```
+## routing from/to the same point
+using pgr_withPoints to check results
+expecting EMPTY SET to represent no path found
+```
+SELECT * FROM pgr_withPoints(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
+    -1, -1
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+(0 rows)
+
+```
+This call uses the replacement function because there are no restrictions
+* Because the pid is not involved the points are considered different
+* it returns a path
+
+```
+SELECT * FROM pgr_TRSP(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
+    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
+    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
+    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
+    true, true
+);
+ seq | id1 | id2 | cost
+-----+-----+-----+------
+   0 |  -1 |   1 |    0
+   1 |  -2 |  -1 |    0
+(2 rows)
+
+```
+pgr_trsp with restrictions use the original code
+* it returns a path of N edges and N vertex instead of N edge and N+1 vertices
+
+```
+SELECT * FROM pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
+    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
+    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
+    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
+    true, true,
+    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+);
+ seq | id1 | id2 | cost
+-----+-----+-----+------
+   0 |  -1 |   1 |    0
+(1 row)
+
+```
+## passing in front of other points
+using pgr_withPoints to verify the shortest path from pids (1 to 3)
+```
+SELECT * FROM pgr_withPoints(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
+    -1, -3
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |   -1 |    1 |  0.6 |        0
+   2 |        2 |    2 |    4 |    1 |      0.6
+   3 |        3 |    5 |   10 |    1 |      1.6
+   4 |        4 |   10 |   12 |  0.6 |      2.6
+   5 |        5 |   -3 |   -1 |    0 |      3.2
+(5 rows)
+
+```
+**pgr_withPoints** can be used to see when the route passes in front of other points
+In this example point pid=6 is passed in front of
+```
+SELECT * FROM pgr_withPoints(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
+    -1, -3, details:=true
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |   -1 |    1 |  0.6 |        0
+   2 |        2 |    2 |    4 |  0.7 |      0.6
+   3 |        3 |   -6 |    4 |  0.3 |      1.3
+   4 |        4 |    5 |   10 |    1 |      1.6
+   5 |        5 |   10 |   12 |  0.6 |      2.6
+   6 |        6 |   -3 |   -1 |    0 |      3.2
+(6 rows)
+
+```
+Can not be used to see if other points are passed in front of.
+The pointsOfInterest table is not part of the parameter
+```
+SELECT * FROM pgr_TRSP(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
+    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
+    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 3),
+    (SELECT fraction  FROM pointsOfInterest WHERE pid = 3),
+    true, true
+);
+ seq | id1 | id2 | cost
+-----+-----+-----+------
+   0 |  -1 |   1 |  0.6
+   1 |   2 |   4 |    1
+   2 |   5 |  10 |    1
+   3 |  10 |  12 |  0.6
+   4 |  -2 |  -1 |    0
+(5 rows)
+
+```
+## (edges) Routing from a vertex to a point
+Showing *pgr_withPoints* results of the shortest path from vid 6 to pid 1
+```
+SELECT * FROM pgr_withPoints(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
+    6, -1
+);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |    6 |    8 |    1 |        0
+   2 |        2 |    5 |    4 |    1 |        1
+   3 |        3 |    2 |    1 |  0.6 |        2
+   4 |        4 |   -1 |   -1 |    0 |      2.6
+(4 rows)
+
+```
+* Vertex 6 is on edge 8 at 1 fraction
+* Vertex 6 is also edge 11 at 0 fraction
+* Undefined behaviour when at least one of the "points" is an actual vertex
+
+```
+SELECT * FROM pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    8, 1,
+    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
+    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
+    true, true
+);
+ seq | id1 | id2 | cost
+-----+-----+-----+------
+   0 |  -1 |   8 |    1
+   1 |   5 |   4 |    1
+   2 |   2 |   1 |  0.6
+   3 |  -2 |  -1 |    0
+(4 rows)
+
+SELECT * FROM pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    11, 0,
+    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
+    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
+    true, true
+);
+ seq | id1 | id2 | cost
+-----+-----+-----+------
+   0 |   6 |   8 |    1
+   1 |   5 |   4 |    1
+   2 |   2 |   1 |  0.6
+   3 |  -2 |  -1 |    0
+(4 rows)
+
+```
+# pgr_trspViaVertices
+## pgr_trspViaVertices No path representation differences
+pgr_trspViaVertices uses:
+"* When there are restrictions: `_pgr_trsp(one to one)`"
+"* When there are no restrictions: `pgr_dijkstraVia`"
+
+**PLEASE: Use pgr_dijstraVia when there are no restrictions**
+
+Representation of **no path found**:
+"* Sometimes represents with Error a no path found"
+"* Sometimes represents with EMPTY SET when no path found"
+"* Forcing the user to use the wrapper or the replacement function"
+
+Calls to the original function of is no longer allowed without restrictions
+```
+SELECT * FROM _pgr_trspViaVertices(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    ARRAY[1, 15, 2],
+    false, true
+);
+ERROR:  Restrictions Missing
+```
+Calls to the wrapper function allowed without restrictions
+```
+SELECT * FROM pgr_trspViaVertices(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    ARRAY[2, 3, 2],
+    false, true
+);
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |   1 |   2 |   2 |    1
+   2 |   2 |   3 |   2 |    1
+   3 |   2 |   2 |  -1 |    0
+(3 rows)
+
+```
+But it uses pgr_dijkstraVia that gives more information on the result
+```
+SELECT * FROM pgr_dijkstraVia(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    ARRAY[2, 3, 2],
+    false
+);
+ seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost
+-----+---------+----------+-----------+---------+------+------+------+----------+----------------
+   1 |       1 |        1 |         2 |       3 |    2 |    2 |    1 |        0 |              0
+   2 |       1 |        2 |         2 |       3 |    3 |   -1 |    0 |        1 |              1
+   3 |       2 |        1 |         3 |       2 |    3 |    2 |    1 |        0 |              1
+   4 |       2 |        2 |         3 |       2 |    2 |   -2 |    0 |        1 |              2
+(4 rows)
+
+```
+## when a path does not exist on the route
+pgr_TRSPViaVertices gives different results even if restrictions are nt involved on the
+shortest path(s) when restrictions are used VS when restrictions are not used:
+
+Because there is no path from 1 to 1 then there is no complete route 1 to 1 to 2
+therefore the expected result is EMPTY SET to represent no route was found
+"* without restrictions"
+```
+SELECT * FROM pgr_TRSPViaVertices(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    ARRAY[1, 1, 2],
+    false, true
+);
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+(0 rows)
+
+```
+"* with restrictions"
+Restrictions on the wrapper function, is the last parameter and its the old style:
+```
+SELECT * FROM pgr_trspViaVertices(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    ARRAY[1, 1, 2],
+    false, true,
+    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+);
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |   1 |   1 |   1 |    1
+   2 |   1 |   2 |   4 |    1
+   3 |   1 |   5 |   8 |    1
+   4 |   1 |   6 |   5 |    1
+   5 |   1 |   3 |   2 |    1
+   6 |   1 |   2 |   1 |    1
+   7 |   2 |   1 |   1 |    1
+   8 |   2 |   2 |  -1 |    0
+(8 rows)
+
+```
+# pgr_trspViaEdges
+*pgr_trspViaEdges* will use the original code when
+* There are restrictions
+* A point is a vertex in disguise (with pcts value of 0)
+
+What it returns
+* Error to represent no route
+* the points are renumbered to -1, -2 .. -N
+* if a point is part of a path it will **not** show on the path
+
+Exaple execution
+```
+SELECT * FROM pgr_trspViaEdges(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    ARRAY[1, 2, 1], ARRAY[0.1,0.5,0.5],
+    false, true,
+    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+);
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |   1 |  -1 |   1 |  0.9
+   2 |   1 |   2 |   4 |    1
+   3 |   1 |   5 |   8 |    1
+   4 |   1 |   6 |   9 |    1
+   5 |   1 |   9 |  16 |    1
+   6 |   1 |   4 |   3 |    1
+   7 |   1 |   3 |   2 |    1
+   8 |   2 |   2 |   1 |  0.5
+(8 rows)
+
+```
+A temporay wraper function is used when:
+* There are no restrictions
+* Before: No point is a vertex in disguise (with pcts value of 0)
+* Now: c$Undefined behaviour when a point is a vertex in disguise (with pcts value of 0)
+
+Internaly:
+* builds a new graph and calls pgr_dijkstraVia
+
+What it returns
+* returns EMPTY SET to represent no route
+* edge = -1 in the result to represent the end of a intermediate path
+* edge = -2 in the result to represent the end of the last path & route
+* the points are renumbered to -1, -2 .. -N
+* if a point is part of a path it will show on the path
+
+Note: I do not mention the wrapper name due to the fact that this is not official documentation
+Note: I will use *_pgr_withPointsVia* as the wrapper name just for sake of this notes
+Example excution
+```
+SELECT * FROM _pgr_withPointsVia(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    ARRAY[1, 2, 1], ARRAY[0.1,0.5,0.5],
+    directed := false
+);
+ seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost
+-----+---------+----------+-----------+---------+------+------+------+----------+----------------
+   1 |       1 |        1 |        -1 |      -2 |   -1 |    1 |  0.1 |        0 |              0
+   2 |       1 |        2 |        -1 |      -2 |    2 |    2 |  0.5 |      0.1 |            0.1
+   3 |       1 |        3 |        -1 |      -2 |   -2 |   -1 |    0 |      0.6 |            0.6
+   4 |       2 |        1 |        -2 |      -3 |   -2 |    2 |  0.5 |        0 |            0.6
+   5 |       2 |        2 |        -2 |      -3 |    2 |    1 |  0.5 |      0.5 |            1.1
+   6 |       2 |        3 |        -2 |      -3 |   -3 |   -2 |    0 |        1 |            1.6
+(6 rows)
+
+```
+## pgr_trspViaEdges No path representation differences
+This example no path is found (edge 17 is disconnected) from the big graph.
+* There is a vertex in disguise (fraction 0 or 1)
+* Undefined behaviour
+
+```
+SELECT * FROM pgr_trspViaEdges(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    ARRAY[1, 17, 1], ARRAY[0,0.5,0.5],
+    false, true
+);
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |     |     |     |
+(1 row)
+
+```
+This example no path is found (edge 17 is disconnected) from the big graph.
+* Has a restriction
+* *pgr_trspViaEdges* original code is used
+* throws error to represent no route was not found
+
+```
+SELECT * FROM pgr_trspViaEdges(
+$$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+ARRAY[1, 17, 1], ARRAY[0.5,0.5,0.5],
+false, true,
+$$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, 32, 33::TEXT AS via_path$$
+);
+server closed the connection unexpectedly
+This probably means the server terminated abnormally
+before or while processing the request.
+The connection to the server was lost. Attempting reset: Failed.
+```
+This example no path is found (edge 17 is disconnected) from the big graph.
+* *_pgr_withPointsVia* is used
+* returns EMPTY SET to represent no route
+
+```
+SELECT * FROM pgr_trspViaEdges(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    ARRAY[1, 17, 1], ARRAY[0.1,0.5,0.5],
+    false,
+    true
+);
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+(0 rows)
+
+```
+## (pgr_trspViaEdges) Using the pointsOfInterest table
+Only routing points
+when *_pgr_withPointsVia* is used
+* the renumbering still takes place
+
+```
+SELECT * FROM pgr_trspViaEdges(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    ARRAY[
+        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
+        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 3),
+        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 6)],
+    ARRAY[
+        (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
+        (SELECT fraction  FROM pointsOfInterest WHERE pid = 3),
+        (SELECT fraction  FROM pointsOfInterest WHERE pid = 6)],
+    false,
+    true
+);
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |   1 |  -1 |   1 |  0.4
+   2 |   1 |   2 |   4 |  0.3
+   3 |   1 |  -3 |   4 |  0.3
+   4 |   1 |   5 |  10 |    1
+   5 |   1 |  10 |  12 |  0.6
+   6 |   1 |  -2 |  -1 |    0
+   7 |   2 |  -2 |  12 |  0.6
+   8 |   2 |  10 |  10 |    1
+   9 |   2 |   5 |   4 |  0.3
+  10 |   2 |  -3 |  -2 |    0
+(10 rows)
+
+```
+Only routing points
+when originalcode is used (because there is a restriction)
+
+```
+SELECT * FROM pgr_trspViaEdges(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    ARRAY[
+        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
+        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 3),
+        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 6)],
+    ARRAY[
+        (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
+        (SELECT fraction  FROM pointsOfInterest WHERE pid = 3),
+        (SELECT fraction  FROM pointsOfInterest WHERE pid = 6)],
+    false, true,
+    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+);
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |   1 |  -1 |   1 |  0.6
+   2 |   1 |   2 |   4 |    1
+   3 |   1 |   5 |  10 |    1
+   4 |   1 |  10 |  12 |    1
+   5 |   2 |  11 |  13 |    1
+   6 |   2 |  12 |  15 |    1
+   7 |   2 |   9 |   9 |    1
+   8 |   2 |   6 |   8 |    1
+   9 |   2 |   5 |   4 |  0.3
+(9 rows)
+
+```
+Routing points & vertices
+* vertex 6 is on edge 11 with fraction 0
+* Undefined behavior
+```
+SELECT * FROM pgr_trspViaEdges(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    ARRAY[
+        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
+        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 3),
+        11],
+    ARRAY[
+        (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
+        (SELECT fraction  FROM pointsOfInterest WHERE pid = 3),
+        0],
+    false,
+    true
+);
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |   1 |  -1 |   1 |  0.6
+   2 |   1 |   2 |   4 |    1
+   3 |   1 |   5 |  10 |    1
+   4 |   1 |  10 |  12 |  0.6
+   5 |   2 |  -1 |  12 |  0.4
+   6 |   2 |  11 |  11 |    1
+   7 |   2 |   6 |  -1 |    0
+(7 rows)
+
+```
+BEGIN;
+BEGIN
+ROLLBACK;
+ROLLBACK
diff --git a/test/trsp/trsp_notes_v2.6.0.test.sql b/test/trsp/trsp_notes_v2.6.0.test.sql
new file mode 100644
index 0000000..8555e88
--- /dev/null
+++ b/test/trsp/trsp_notes_v2.6.0.test.sql
@@ -0,0 +1,762 @@
+ROLLBACK;
+\echo # Notes on pgr_trsp for version 2.6.0
+
+\echo Table of contents
+
+\echo * [Introduction](#introduction)
+\echo '  * [The restriction](#the-restriction)'
+\echo * [The Vertices Signature Version](#the-vertices-signature-version)
+\echo '  * [No path representation differences](#vertices-no-path-representation-differences)'
+\echo '  * [Routing from/to same location](#routing-fromto-same-location)'
+\echo '  * [Undirected graph](#vertices-undirected-graph)'
+\echo * [The Edges Signature Version](#the-edges-signature-version)
+\echo '  * [No path representation differences](#edges-no-path-representation-differences)'
+\echo '  * [Definition of a path](#definition-of-a-path)'
+\echo '  * [Points on the same edge](#points-on-the-same-edge)'
+\echo '  * [Undirected graph](#edges-undirected-graph)'
+\echo '  * [Using a points of interest table](#using-a-points-of-interest-table)'
+\echo '  * [Routing from/to the same point](#routing-fromto-the-same-point)'
+\echo '  * [Passing in front of other points](#passing-in-front-of-other-points)'
+\echo '  * [Routing from a vertex to a point](#edges-routing-from-a-vertex-to-a-point)'
+\echo * [pgr_trspViaVertices](#pgr_trspviavertices)
+\echo '  * [pgr_trspViaVertices No path representation differences](#pgr_trspviavertices-no-path-representation-differences)'
+\echo '  * [when a path does not exist on the route](#when-a-path-does-not-exist-on-the-route)'
+\echo '  * [from 2 to 3 to 2](#from-2-to-3-to-2)'
+\echo * [pgr_trspViaEdges](#pgr_trspviaedges)
+\echo '  * [pgr_trspViaEdges No path representation differences](#pgr_trspviaedges-no-path-representation-differences)'
+\echo '  * [Using a points of interest table](#pgr_trspviaedges-using-the-pointsofinterest-table)'
+\echo
+
+
+
+\echo # Introduction
+\echo pgr_trsp code has issues that are not being fixed yet, but as time passes and new functionality is added to pgRouting with wrappers to **hide** the issues, not to fix them.
+\echo
+\echo For clarity on the queries:
+\echo * _pgr_trsp (with underscore) is the original code
+\echo * pgr_trsp (lower case) represents the wrapper calling the original code
+\echo * pgr_TRSP (upper case) represents the wrapper calling the replacement function, depending on the function, it can be:
+\echo '  * pgr_dijkstra'
+\echo '  * pgr_dijkstraVia'
+\echo '  * pgr_withPoints'
+\echo '  * _pgr_withPointsVia'
+\echo
+
+\echo This page intentions is to compare the original code with the wrapped version of the trsp group of functions.
+\echo ## The restriction
+
+\echo The restriction used in the examples does not have to do anything with the graph:
+\echo * No vertex has id: 25, 32 or 33
+\echo * No edge has id: 25, 32 or 33
+\echo '\`\`\`'
+SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path;
+\echo '\`\`\`'
+\echo The new back end code has the restrictions as follows
+\echo '\`\`\`'
+SELECT 1 AS id, 100::float AS cost, 25::INTEGER AS target_id, ARRAY[33, 32, 25] AS path;
+\echo '\`\`\`'
+
+\echo therefore the shortest path expected are as if there was no restriction involved
+
+
+-------------------------------------------------------------------------------------------
+\echo # The Vertices signature version
+------------------
+\echo ## (Vertices) No path representation differences
+\echo Original function code
+\echo  * Sometimes it crasses the server when no path was found
+\echo  * Sometimes represents with Error a no path found
+\echo  * Forcing the user to use the wrapper or the replacement function
+\echo
+\echo Calls to the original function of is no longer allowed without restrictions
+\echo '\`\`\`'
+SELECT * FROM _pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    1, 15, true, true
+);
+\echo '\`\`\`'
+
+\echo dijkstra returns EMPTY SET to represent no path found
+\echo '\`\`\`'
+SELECT * FROM pgr_dijkstra(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    1, 15
+);
+\echo '\`\`\`'
+
+\echo pgr_trsp use the pgr_dijkstra when there are no restrictions
+\echo therefore returns EMPTY SET to represent no path found
+\echo '\`\`\`'
+SELECT * FROM pgr_TRSP(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    1, 15, true, true
+);
+\echo '\`\`\`'
+
+\echo pgr_trsp use the original code  when there are restrictions
+\echo therefore throws Error to represent no path found
+\echo '\`\`\`'
+\set VERBOSITY terse
+SELECT * FROM pgr_trsp(
+     $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+     1, 15, true, true,
+     $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+);
+\set VERBOSITY default
+\echo '\`\`\`'
+
+
+------------------
+\echo ## routing from/to same location
+
+\echo using dijkstra to verify (1 to 1)
+\echo '\`\`\`'
+SELECT * FROM pgr_dijkstra(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    1, 1
+);
+\echo '\`\`\`'
+
+
+\echo This call uses the replacement function because there are no restrictions (1 to 1)
+\echo therefore is expected to return EMPTY SET to represent no path found
+\echo '\`\`\`'
+SELECT * FROM pgr_TRSP(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    1, 1,  true, true
+);
+\echo '\`\`\`'
+
+
+\echo call forcing the use of the original code (1 to 1)
+\echo * not longer allowed without restrictions
+\echo
+\echo '\`\`\`'
+SELECT * FROM _pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    1, 1,  true, true
+);
+\echo '\`\`\`'
+
+
+\echo trsp with restrictions (1 to 1) use the original code
+\echo is expected to return Error to represent no path found
+\echo '\`\`\`'
+SELECT * FROM pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    1, 1,
+    true,
+    true,
+    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+);
+\echo '\`\`\`'
+
+\echo trsp calling the original code with restrictions (1 to 1)
+\echo is expected to return Error to represent no path found
+\echo but "finds" a path when there should be no path.
+\echo '\`\`\`'
+SELECT * FROM _pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    $$SELECT 1 AS id, 100::float AS cost, 25::INTEGER AS target_id, ARRAY[33, 32, 25] AS path$$,
+    1, 1,
+    true
+);
+\echo '\`\`\`'
+
+
+------------------
+\echo ## (vertices) Undirected graph
+
+\echo using Dijkstra to verify the shortest path from (2 to 3) on undirected graph
+\echo '\`\`\`'
+SELECT * FROM pgr_dijkstra(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    2, 3, false
+);
+\echo '\`\`\`'
+
+\echo using the replacement function because there are no restrictions (2 to 3)
+\echo '\`\`\`'
+SELECT * FROM pgr_TRSP(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    2, 3,
+    false,
+    true
+);
+\echo '\`\`\`'
+
+\echo call forcing the use of the original code
+\echo * not longer allowed without restrictions
+\echo
+\echo '\`\`\`'
+SELECT * FROM _pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    2, 3,
+    false, true
+);
+\echo '\`\`\`'
+
+\echo trsp with restrictions (2 to 3)
+\echo does not find the shortest path
+\echo '\`\`\`'
+SELECT * FROM pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    2, 3,
+    false, true,
+    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+);
+\echo '\`\`\`'
+
+\echo calling the original code with restrictions (2 to 3)
+\echo does not find the shortest path
+\echo '\`\`\`'
+SELECT * FROM _pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    $$SELECT 1 AS id, 100::float AS cost, 25::INTEGER AS target_id, ARRAY[33, 32, 25] AS path$$,
+    2, 3,
+    false
+);
+\echo '\`\`\`'
+
+-----------------------------------------------------------------------------------------------
+\echo # The Edges signature version
+
+------------------HERE
+\echo ## (Edges) No path representation differences
+\echo Original function code
+\echo  * Sometimes it crasses the server when no path was found
+\echo  * Sometimes represents with Error a no path found
+\echo  * Forcing the user to use the wrapper or the replacement function
+\echo
+\echo Calls to the original function of is no longer allowed without restrictions
+\echo '\`\`\`'
+SELECT * FROM _pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    1, 0.5, 17, 0.5, true, true
+);
+\echo '\`\`\`'
+\echo pgr_withPoints returns EMPTY SET to represent no path found
+\echo '\`\`\`'
+SELECT * FROM pgr_withPoints(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    $$(SELECT 1 as pid, 1 as edge_id, 0.5::float as fraction)
+    UNION
+    (SELECT 2, 17, 0.5)$$,
+    -1, -2
+);
+\echo '\`\`\`'
+
+
+------------------
+\echo ## Definition of a path
+\echo Remember that one characteristic of a path is that for a path of N edges it has N+1 vertices.
+\echo
+\echo For this example, suppose points, where the pid are different even if the edge and fraction are different.
+\echo One point might be on the left side other on the right side, pgr_trsp does not take into account
+\echo the side of the point
+
+\echo calls forcing the use of the original code
+\echo * not longer allowed without restrictions
+\echo
+\echo '\`\`\`'
+SELECT * FROM _pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    1, 0.5, 1, 0.5, true, true
+);
+\echo '\`\`\`'
+\echo * with restrictions
+\echo '\`\`\`'
+SELECT * FROM _pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    1, 0.5, 1, 0.5, true, true,
+    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+);
+\echo '\`\`\`'
+
+\echo Using the *pgr_withPoints* it returns a path of N edge and N+1 vertices
+\echo '\`\`\`'
+SELECT * FROM pgr_withPoints(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    $$(SELECT 1 as pid, 1 as edge_id, 0.5::float as fraction)
+    UNION
+    (SELECT 2, 1, 0.5)$$,
+    -1, -2
+);
+\echo '\`\`\`'
+
+\echo The *pgr_withPoints* is used when there are no restrictions
+\echo '\`\`\`'
+SELECT * FROM pgr_TRSP(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    1, 0.5, 1, 0.5, true, true
+);
+\echo '\`\`\`'
+
+\echo The original *_pgr_trsp* code is used when there are restrictions
+\echo '\`\`\`'
+SELECT * FROM pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    1, 0.5, 1, 0.5, true, true,
+    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+);
+\echo '\`\`\`'
+
+\echo note that pgr_withPoints returns an EMPTY SET when the point is the same
+\echo '\`\`\`'
+SELECT * FROM pgr_withPoints(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    $$(SELECT 1 as pid, 1 as edge_id, 0.5::float as fraction)
+    UNION
+    (SELECT 2, 1, 0.5)$$,
+    -1, -1
+);
+\echo '\`\`\`'
+
+------------------
+\echo ## Points on the same edge
+
+\echo The *pgr_withPoints* is used when there are no restrictions
+\echo * it returns a path of N edges and N+1 vertices
+\echo '\`\`\`'
+SELECT * FROM pgr_TRSP(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    1, 0.5, 1, 0.8, true, true
+);
+\echo '\`\`\`'
+
+\echo The original *_pgr_trsp* is used when there are restrictions
+\echo * it returns a path of N edges and N vertex instead of N edge and N+1 vertices
+\echo '\`\`\`'
+SELECT * FROM pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    1, 0.5, 1, 0.8, true, true,
+    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+
+);
+\echo '\`\`\`'
+
+------------------
+\echo ## (Edges) Undirected graph
+\echo the shortest path obtained with *pgr_withPoints*
+\echo '\`\`\`'
+SELECT * FROM pgr_withPoints(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    $$(SELECT 1 as pid, 4 as edge_id, 0.5::float as fraction)
+    UNION
+    (SELECT 2, 2, 0.8)$$,
+    -1, -2, directed:=false
+);
+\echo '\`\`\`'
+
+\echo The original *_pgr_trsp* is used when there are restrictions
+\echo
+\echo '\`\`\`'
+SELECT * FROM pgr_TRSP(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    4, 0.5, 2, 0.8, false, true
+);
+\echo '\`\`\`'
+
+\echo when using restrictions the original *_pgr_trsp* is used internally
+\echo * it returns a path of N edges and N vertex instead of N edge and N+1 vertices
+\echo * it does not return the shortest path.
+\echo
+\echo '\`\`\`'
+SELECT * FROM pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    4, 0.5, 2, 0.8, false, true,
+    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+);
+\echo '\`\`\`'
+
+
+----------------
+\echo ## Using a points of interest table
+\echo The points of interest
+\echo '\`\`\`'
+SELECT * FROM pointsOfInterest;
+\echo '\`\`\`'
+
+\echo On *pgr_trsp*, to be able to use the table information:
+\echo * Each parameter has to be extracted explicitly from the table
+\echo * Regardles of the point pid original value
+\echo '  * will always be -1 for the first point'
+\echo '  * will always be -2 for the second point'
+\echo '\`\`\`'
+SELECT * FROM pgr_TRSP(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
+    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
+    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 6),
+    (SELECT fraction  FROM pointsOfInterest WHERE pid = 6),
+    true, true
+);
+\echo '\`\`\`'
+
+\echo On *pgr_withPoints*, to be able to use the table information:
+\echo * select statement on the *pointsOfInterest* table
+\echo * *Negative* the id to represent the id is a pid
+\echo * The points pids in the result are not renumbered
+\echo * The points pids in the result are represented with negative sign
+\echo '\`\`\`'
+SELECT * FROM pgr_withPoints(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
+    -1, -6
+);
+\echo '\`\`\`'
+
+
+----------------
+\echo ## routing from/to the same point
+
+\echo using pgr_withPoints to check results
+\echo expecting EMPTY SET to represent no path found
+\echo '\`\`\`'
+SELECT * FROM pgr_withPoints(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
+    -1, -1
+);
+\echo '\`\`\`'
+
+
+\echo This call uses the replacement function because there are no restrictions
+\echo * Because the pid is not involved the points are considered different
+\echo * it returns a path
+\echo
+\echo '\`\`\`'
+SELECT * FROM pgr_TRSP(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
+    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
+    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
+    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
+    true, true
+);
+\echo '\`\`\`'
+
+
+\echo pgr_trsp with restrictions use the original code
+\echo * it returns a path of N edges and N vertex instead of N edge and N+1 vertices
+\echo
+\echo '\`\`\`'
+SELECT * FROM pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
+    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
+    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
+    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
+    true, true,
+    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+);
+\echo '\`\`\`'
+
+
+----------------
+\echo ## passing in front of other points
+
+\echo using pgr_withPoints to verify the shortest path from pids (1 to 3)
+\echo '\`\`\`'
+SELECT * FROM pgr_withPoints(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
+    -1, -3
+);
+\echo '\`\`\`'
+
+\echo **pgr_withPoints** can be used to see when the route passes in front of other points
+\echo In this example point pid=6 is passed in front of
+\echo '\`\`\`'
+SELECT * FROM pgr_withPoints(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
+    -1, -3, details:=true
+);
+\echo '\`\`\`'
+
+\echo Can not be used to see if other points are passed in front of.
+\echo The pointsOfInterest table is not part of the parameter
+\echo '\`\`\`'
+SELECT * FROM pgr_TRSP(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
+    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
+    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 3),
+    (SELECT fraction  FROM pointsOfInterest WHERE pid = 3),
+    true, true
+);
+\echo '\`\`\`'
+
+----------------
+\echo ## (edges) Routing from a vertex to a point
+
+\echo Showing *pgr_withPoints* results of the shortest path from vid 6 to pid 1
+\echo '\`\`\`'
+SELECT * FROM pgr_withPoints(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost  FROM edge_table$$,
+    $$SELECT pid, edge_id, fraction FROM pointsOfInterest$$,
+    6, -1
+);
+\echo '\`\`\`'
+
+\echo * Vertex 6 is on edge 8 at 1 fraction
+\echo * Vertex 6 is also edge 11 at 0 fraction
+\echo * Undefined behaviour when at least one of the "points" is an actual vertex
+\echo
+\echo '\`\`\`'
+SELECT * FROM pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    8, 1,
+    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
+    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
+    true, true
+);
+SELECT * FROM pgr_trsp(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    11, 0,
+    (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
+    (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
+    true, true
+);
+\echo '\`\`\`'
+
+---------------------------------------------------------------
+
+\echo # pgr_trspViaVertices
+------------------
+\echo ## pgr_trspViaVertices No path representation differences
+
+\echo pgr_trspViaVertices uses:
+\echo "* When there are restrictions: `_pgr_trsp(one to one)`"
+\echo "* When there are no restrictions: `pgr_dijkstraVia`"
+\echo
+\echo **PLEASE: Use pgr_dijstraVia when there are no restrictions**
+\echo
+\echo Representation of **no path found**:
+\echo "* Sometimes represents with Error a no path found"
+\echo "* Sometimes represents with EMPTY SET when no path found"
+\echo "* Forcing the user to use the wrapper or the replacement function"
+\echo
+\echo Calls to the original function of is no longer allowed without restrictions
+\echo '\`\`\`'
+\set VERBOSITY terse
+SELECT * FROM _pgr_trspViaVertices(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    ARRAY[1, 15, 2],
+    false, true
+);
+\set VERBOSITY default
+\echo '\`\`\`'
+
+\echo Calls to the wrapper function allowed without restrictions
+\echo '\`\`\`'
+SELECT * FROM pgr_trspViaVertices(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    ARRAY[2, 3, 2],
+    false, true
+);
+\echo '\`\`\`'
+
+\echo But it uses pgr_dijkstraVia that gives more information on the result
+\echo '\`\`\`'
+SELECT * FROM pgr_dijkstraVia(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    ARRAY[2, 3, 2],
+    false
+);
+\echo '\`\`\`'
+
+
+\echo ## when a path does not exist on the route
+
+\echo pgr_TRSPViaVertices gives different results even if restrictions are nt involved on the
+\echo shortest path(s) when restrictions are used VS when restrictions are not used:
+\echo
+\echo Because there is no path from 1 to 1 then there is no complete route 1 to 1 to 2
+\echo therefore the expected result is EMPTY SET to represent no route was found
+\echo "* without restrictions"
+\echo '\`\`\`'
+SELECT * FROM pgr_TRSPViaVertices(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    ARRAY[1, 1, 2],
+    false, true
+);
+\echo '\`\`\`'
+
+\echo "* with restrictions"
+\echo Restrictions on the wrapper function, is the last parameter and its the old style:
+\echo '\`\`\`'
+SELECT * FROM pgr_trspViaVertices(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    ARRAY[1, 1, 2],
+    false, true,
+    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+);
+\echo '\`\`\`'
+
+
+
+
+
+---------------------------------------------------------------
+
+\echo # pgr_trspViaEdges
+------------------
+
+\echo *pgr_trspViaEdges* will use the original code when
+\echo * There are restrictions
+\echo * A point is a vertex in disguise (with pcts value of 0)
+\echo
+\echo What it returns
+\echo * Error to represent no route
+\echo * the points are renumbered to -1, -2 .. -N
+\echo * if a point is part of a path it will **not** show on the path
+\echo
+
+\echo Exaple execution
+\echo '\`\`\`'
+SELECT * FROM pgr_trspViaEdges(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    ARRAY[1, 2, 1], ARRAY[0.1,0.5,0.5],
+    false, true,
+    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+);
+
+\echo '\`\`\`'
+\echo A temporay wraper function is used when:
+\echo * There are no restrictions
+\echo * Before: No point is a vertex in disguise (with pcts value of 0)
+\echo * Now: c$Undefined behaviour when a point is a vertex in disguise (with pcts value of 0)
+\echo
+\echo Internaly:
+\echo * builds a new graph and calls pgr_dijkstraVia
+\echo
+\echo What it returns
+\echo * returns EMPTY SET to represent no route
+\echo * edge = -1 in the result to represent the end of a intermediate path
+\echo * edge = -2 in the result to represent the end of the last path & route
+\echo * the points are renumbered to -1, -2 .. -N
+\echo * if a point is part of a path it will show on the path
+\echo
+\echo Note: I do not mention the wrapper name due to the fact that this is not official documentation
+\echo Note: I will use *_pgr_withPointsVia* as the wrapper name just for sake of this notes
+
+\echo Example excution
+\echo '\`\`\`'
+SELECT * FROM _pgr_withPointsVia(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    ARRAY[1, 2, 1], ARRAY[0.1,0.5,0.5],
+    directed := false
+);
+\echo '\`\`\`'
+
+
+\echo ## pgr_trspViaEdges No path representation differences
+----------------
+
+\echo This example no path is found (edge 17 is disconnected) from the big graph.
+\echo * There is a vertex in disguise (fraction 0 or 1)
+\echo * Undefined behaviour
+\echo
+\echo '\`\`\`'
+SELECT * FROM pgr_trspViaEdges(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    ARRAY[1, 17, 1], ARRAY[0,0.5,0.5],
+    false, true
+);
+\echo '\`\`\`'
+
+
+\echo This example no path is found (edge 17 is disconnected) from the big graph.
+\echo * Has a restriction
+\echo * *pgr_trspViaEdges* original code is used
+\echo * throws error to represent no route was not found
+\echo
+\echo '\`\`\`'
+\echo SELECT * FROM pgr_trspViaEdges(
+\echo     $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+\echo     ARRAY[1, 17, 1], ARRAY[0.5,0.5,0.5],
+\echo     false, true,
+\echo     $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+\echo );
+\echo server closed the connection unexpectedly
+\echo This probably means the server terminated abnormally
+\echo before or while processing the request.
+\echo The connection to the server was lost. Attempting reset: Failed.
+\echo '\`\`\`'
+
+\echo This example no path is found (edge 17 is disconnected) from the big graph.
+\echo * *_pgr_withPointsVia* is used
+\echo * returns EMPTY SET to represent no route
+\echo
+\echo '\`\`\`'
+SELECT * FROM pgr_trspViaEdges(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    ARRAY[1, 17, 1], ARRAY[0.1,0.5,0.5],
+    false,
+    true
+);
+\echo '\`\`\`'
+
+----------------
+\echo ## (pgr_trspViaEdges) Using the pointsOfInterest table
+
+\echo Only routing points
+\echo when *_pgr_withPointsVia* is used
+\echo * the renumbering still takes place
+\echo
+\echo '\`\`\`'
+SELECT * FROM pgr_trspViaEdges(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    ARRAY[
+        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
+        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 3),
+        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 6)],
+    ARRAY[
+        (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
+        (SELECT fraction  FROM pointsOfInterest WHERE pid = 3),
+        (SELECT fraction  FROM pointsOfInterest WHERE pid = 6)],
+    false,
+    true
+);
+\echo '\`\`\`'
+
+\echo Only routing points
+\echo when originalcode is used (because there is a restriction)
+\echo
+\echo '\`\`\`'
+SELECT * FROM pgr_trspViaEdges(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    ARRAY[
+        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
+        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 3),
+        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 6)],
+    ARRAY[
+        (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
+        (SELECT fraction  FROM pointsOfInterest WHERE pid = 3),
+        (SELECT fraction  FROM pointsOfInterest WHERE pid = 6)],
+    false, true,
+    $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$
+);
+\echo '\`\`\`'
+
+\echo Routing points & vertices
+\echo * vertex 6 is on edge 11 with fraction 0
+\echo  * Undefined behavior
+\echo '\`\`\`'
+SELECT * FROM pgr_trspViaEdges(
+    $$SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edge_table$$,
+    ARRAY[
+        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 1),
+        (SELECT edge_id::INTEGER  FROM pointsOfInterest WHERE pid = 3),
+        11],
+    ARRAY[
+        (SELECT fraction  FROM pointsOfInterest WHERE pid = 1),
+        (SELECT fraction  FROM pointsOfInterest WHERE pid = 3),
+        0],
+    false,
+    true
+);
+\echo '\`\`\`'
+BEGIN;
diff --git a/test/trsp/trsp_vias-any-04.result b/test/trsp/trsp_vias-any-04.result
new file mode 100644
index 0000000..c7a69a4
--- /dev/null
+++ b/test/trsp/trsp_vias-any-04.result
@@ -0,0 +1,141 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+/*PGR-GNU*****************************************************************
+
+Copyright (c) 2015 pgRouting developers
+Mail: project at pgrouting.org
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License AS published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+********************************************************************PGR-GNU*/
+    SELECT * FROM pgr_trspViaVertices(
+        'SELECT id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost FROM edge_table',
+        ARRAY[2, 7, 11]::INTEGER[],
+        true,
+        true,
+
+        'SELECT to_cost, target_id::INTEGER, from_edge||coalesce('',''||via_path,'''') AS via_path FROM restrictions');
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |   1 |   2 |   4 |    1
+   2 |   1 |   5 |   8 |    1
+   3 |   1 |   6 |   9 |    1
+   4 |   1 |   9 |  16 |    1
+   5 |   1 |   4 |   3 |    1
+   6 |   1 |   3 |   5 |    1
+   7 |   1 |   6 |   8 |    1
+   8 |   1 |   5 |   7 |    1
+   9 |   1 |   8 |   6 |    1
+  10 |   2 |   7 |   6 |    1
+  11 |   2 |   8 |   7 |    1
+  12 |   2 |   5 |   8 |    1
+  13 |   2 |   6 |   9 |    1
+  14 |   2 |   9 |  16 |    1
+  15 |   2 |   4 |   3 |    1
+  16 |   2 |   3 |   5 |    1
+  17 |   2 |   6 |  11 |    1
+  18 |   2 |  11 |  -1 |    0
+(18 rows)
+
+---------------------------
+SELECT * FROM pgr_trspViaEdges(
+        'SELECT id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost FROM edge_table',
+        ARRAY[4,6,11]::INTEGER[],
+        ARRAY[0.5, 0.5, 0.5]::float8[],
+        true,
+        true,
+
+        'SELECT to_cost, target_id::INTEGER, from_edge||coalesce('',''||via_path,'''') AS via_path FROM restrictions');
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |   1 |  -1 |   4 |  0.5
+   2 |   1 |   5 |   8 |    1
+   3 |   1 |   6 |   9 |    1
+   4 |   1 |   9 |  16 |    1
+   5 |   1 |   4 |   3 |    1
+   6 |   1 |   3 |   5 |    1
+   7 |   1 |   6 |   8 |    1
+   8 |   1 |   5 |   7 |    1
+   9 |   1 |   8 |   6 |    1
+  10 |   2 |   8 |   7 |    1
+  11 |   2 |   5 |   8 |    1
+  12 |   2 |   6 |   9 |    1
+  13 |   2 |   9 |  16 |    1
+  14 |   2 |   4 |   3 |    1
+  15 |   2 |   3 |   5 |    1
+  16 |   2 |   6 |  11 |  0.5
+(16 rows)
+
+---------------------------
+SELECT * FROM pgr_trspViaEdges(
+        'SELECT id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost FROM edge_table',
+        ARRAY[1,11,6]::INTEGER[],
+        ARRAY[0.5, 0.5, 0.5]::float8[],
+        true,
+        true,
+
+        'SELECT to_cost, target_id::INTEGER, from_edge||coalesce('',''||via_path,'''') AS via_path FROM restrictions');
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |   1 |  -1 |   1 |  0.5
+   2 |   1 |   2 |   4 |    1
+   3 |   1 |   5 |   8 |    1
+   4 |   1 |   6 |   9 |    1
+   5 |   1 |   9 |  16 |    1
+   6 |   1 |   4 |   3 |    1
+   7 |   1 |   3 |   5 |    1
+   8 |   1 |   6 |  11 |    1
+   9 |   2 |  11 |  13 |    1
+  10 |   2 |  12 |  15 |    1
+  11 |   2 |   9 |   9 |    1
+  12 |   2 |   6 |   8 |    1
+  13 |   2 |   5 |   7 |    1
+  14 |   2 |   8 |   6 |  0.5
+(14 rows)
+
+---------------------------
+SELECT * FROM pgr_trspViaEdges(
+        'SELECT id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost FROM edge_table',
+        ARRAY[1,11,6]::INTEGER[],
+        ARRAY[0.5, 0.5, 0.5]::float8[],
+        true,
+        true,
+
+        'SELECT to_cost, target_id::INTEGER, from_edge||coalesce('',''||via_path,'''') AS via_path FROM restrictions');
+ seq | id1 | id2 | id3 | cost
+-----+-----+-----+-----+------
+   1 |   1 |  -1 |   1 |  0.5
+   2 |   1 |   2 |   4 |    1
+   3 |   1 |   5 |   8 |    1
+   4 |   1 |   6 |   9 |    1
+   5 |   1 |   9 |  16 |    1
+   6 |   1 |   4 |   3 |    1
+   7 |   1 |   3 |   5 |    1
+   8 |   1 |   6 |  11 |    1
+   9 |   2 |  11 |  13 |    1
+  10 |   2 |  12 |  15 |    1
+  11 |   2 |   9 |   9 |    1
+  12 |   2 |   6 |   8 |    1
+  13 |   2 |   5 |   7 |    1
+  14 |   2 |   8 |   6 |  0.5
+(14 rows)
+
+---------------------------
+ROLLBACK;
+ROLLBACK
diff --git a/src/trsp/test/trsp_vias-any-04.test.sql b/test/trsp/trsp_vias-any-04.test.sql
similarity index 100%
rename from src/trsp/test/trsp_vias-any-04.test.sql
rename to test/trsp/trsp_vias-any-04.test.sql
diff --git a/src/tsp/test/development/gr9882-tsp.test.sql b/test/tsp/development/gr9882-tsp.test.sql
similarity index 100%
rename from src/tsp/test/development/gr9882-tsp.test.sql
rename to test/tsp/development/gr9882-tsp.test.sql
diff --git a/src/tsp/test/development/qa194-tsp.result b/test/tsp/development/qa194-tsp.result
similarity index 100%
rename from src/tsp/test/development/qa194-tsp.result
rename to test/tsp/development/qa194-tsp.result
diff --git a/test/tsp/development/qa194-tsp.test.sql b/test/tsp/development/qa194-tsp.test.sql
new file mode 100644
index 0000000..4d5a231
--- /dev/null
+++ b/test/tsp/development/qa194-tsp.test.sql
@@ -0,0 +1,272 @@
+-- http://www.math.uwaterloo.ca/tsp/world/qa194.tsp
+
+-- NAME : qa194
+-- COMMENT : 194 locations in Qatar
+-- COMMENT : Derived from National Imagery and Mapping Agency data
+-- TYPE : TSP
+-- DIMENSION : 194
+-- EDGE_WEIGHT_TYPE : EUC_2D
+-- NODE_COORD_SECTION
+
+
+
+CREATE TABLE qa194 (id BIGINT, x FLOAT, y FLOAT, the_geom geometry);
+COPY qa194 (id, x, y) FROM stdin WITH DELIMITER ' ';
+1 24748.3333 50840.0000
+2 24758.8889 51211.9444
+3 24827.2222 51394.7222
+4 24904.4444 51175.0000
+5 24996.1111 51548.8889
+6 25010.0000 51039.4444
+7 25030.8333 51275.2778
+8 25067.7778 51077.5000
+9 25100.0000 51516.6667
+10 25103.3333 51521.6667
+11 25121.9444 51218.3333
+12 25150.8333 51537.7778
+13 25158.3333 51163.6111
+14 25162.2222 51220.8333
+15 25167.7778 51606.9444
+16 25168.8889 51086.3889
+17 25173.8889 51269.4444
+18 25210.8333 51394.1667
+19 25211.3889 51619.1667
+20 25214.1667 50807.2222
+21 25214.4444 51378.8889
+22 25223.3333 51451.6667
+23 25224.1667 51174.4444
+24 25233.3333 51333.3333
+25 25234.1667 51203.0556
+26 25235.5556 51330.0000
+27 25235.5556 51495.5556
+28 25242.7778 51428.8889
+29 25243.0556 51452.5000
+30 25252.5000 51559.1667
+31 25253.8889 51535.2778
+32 25253.8889 51549.7222
+33 25256.9444 51398.8889
+34 25263.6111 51516.3889
+35 25265.8333 51545.2778
+36 25266.6667 50969.1667
+37 25266.6667 51483.3333
+38 25270.5556 51532.7778
+39 25270.8333 51505.8333
+40 25270.8333 51523.0556
+41 25275.8333 51533.6111
+42 25277.2222 51547.7778
+43 25278.3333 51525.5556
+44 25278.3333 51541.3889
+45 25279.1667 51445.5556
+46 25281.1111 51535.0000
+47 25281.3889 51512.5000
+48 25283.3333 51533.3333
+49 25283.6111 51546.6667
+50 25284.7222 51555.2778
+51 25286.1111 51504.1667
+52 25286.1111 51534.1667
+53 25286.6667 51533.3333
+54 25287.5000 51537.7778
+55 25288.0556 51546.6667
+56 25290.8333 51528.3333
+57 25291.9444 51424.4444
+58 25292.5000 51520.8333
+59 25298.6111 51001.6667
+60 25300.8333 51394.4444
+61 25306.9444 51507.7778
+62 25311.9444 51003.0556
+63 25313.8889 50883.3333
+64 25315.2778 51438.6111
+65 25316.6667 50766.6667
+66 25320.5556 51495.5556
+67 25322.5000 51507.7778
+68 25325.2778 51470.0000
+69 25326.6667 51350.2778
+70 25337.5000 51425.0000
+71 25339.1667 51173.3333
+72 25340.5556 51293.6111
+73 25341.9444 51507.5000
+74 25358.8889 51333.6111
+75 25363.6111 51281.1111
+76 25368.6111 51226.3889
+77 25374.4444 51436.6667
+78 25377.7778 51294.7222
+79 25396.9444 51422.5000
+80 25400.0000 51183.3333
+81 25400.0000 51425.0000
+82 25404.7222 51073.0556
+83 25416.9444 51403.8889
+84 25416.9444 51457.7778
+85 25419.4444 50793.6111
+86 25429.7222 50785.8333
+87 25433.3333 51220.0000
+88 25440.8333 51378.0556
+89 25444.4444 50958.3333
+90 25451.3889 50925.0000
+91 25459.1667 51316.6667
+92 25469.7222 51397.5000
+93 25478.0556 51362.5000
+94 25480.5556 50938.8889
+95 25483.3333 51383.3333
+96 25490.5556 51373.6111
+97 25492.2222 51400.2778
+98 25495.0000 50846.6667
+99 25495.0000 50965.2778
+100 25497.5000 51485.2778
+101 25500.8333 50980.5556
+102 25510.5556 51242.2222
+103 25531.9444 51304.4444
+104 25533.3333 50977.2222
+105 25538.8889 51408.3333
+106 25545.8333 51387.5000
+107 25549.7222 51431.9444
+108 25550.0000 51433.3333
+109 25560.2778 51158.6111
+110 25566.9444 51484.7222
+111 25567.5000 50958.8889
+112 25574.7222 51486.3889
+113 25585.5556 51151.3889
+114 25609.4444 51092.2222
+115 25610.2778 51475.2778
+116 25622.5000 51454.4444
+117 25645.8333 51450.0000
+118 25650.0000 51372.2222
+119 25666.9444 51174.4444
+120 25683.8889 51505.8333
+121 25686.3889 51468.8889
+122 25696.1111 51260.8333
+123 25700.8333 51584.7222
+124 25708.3333 51591.6667
+125 25716.6667 51050.0000
+126 25717.5000 51057.7778
+127 25723.0556 51004.1667
+128 25734.7222 51547.5000
+129 25751.1111 51449.1667
+130 25751.9444 50920.8333
+131 25758.3333 51395.8333
+132 25765.2778 51019.7222
+133 25772.2222 51483.3333
+134 25775.8333 51023.0556
+135 25779.1667 51449.7222
+136 25793.3333 51409.4444
+137 25808.3333 51060.5556
+138 25816.6667 51133.3333
+139 25823.6111 51152.5000
+140 25826.6667 51043.8889
+141 25829.7222 51245.2778
+142 25833.3333 51072.2222
+143 25839.1667 51465.2778
+144 25847.7778 51205.8333
+145 25850.0000 51033.3333
+146 25856.6667 51083.3333
+147 25857.5000 51298.8889
+148 25857.5000 51441.3889
+149 25866.6667 51066.6667
+150 25867.7778 51205.5556
+151 25871.9444 51354.7222
+152 25872.5000 51258.3333
+153 25880.8333 51221.3889
+154 25883.0556 51185.2778
+155 25888.0556 51386.3889
+156 25900.0000 51000.0000
+157 25904.1667 51201.6667
+158 25928.3333 51337.5000
+159 25937.5000 51313.3333
+160 25944.7222 51456.3889
+161 25950.0000 51066.6667
+162 25951.6667 51349.7222
+163 25957.7778 51075.2778
+164 25958.3333 51099.4444
+165 25966.6667 51283.3333
+166 25983.3333 51400.0000
+167 25983.6111 51328.0556
+168 26000.2778 51294.4444
+169 26008.6111 51083.6111
+170 26016.6667 51333.3333
+171 26021.6667 51366.9444
+172 26033.3333 51116.6667
+173 26033.3333 51166.6667
+174 26033.6111 51163.8889
+175 26033.6111 51200.2778
+176 26048.8889 51056.9444
+177 26050.0000 51250.0000
+178 26050.2778 51297.5000
+179 26050.5556 51135.8333
+180 26055.0000 51316.1111
+181 26067.2222 51258.6111
+182 26074.7222 51083.6111
+183 26076.6667 51166.9444
+184 26077.2222 51222.2222
+185 26078.0556 51361.6667
+186 26083.6111 51147.2222
+187 26099.7222 51161.1111
+188 26108.0556 51244.7222
+189 26116.6667 51216.6667
+190 26123.6111 51169.1667
+191 26123.6111 51222.7778
+192 26133.3333 51216.6667
+193 26133.3333 51300.0000
+194 26150.2778 51108.0556
+\.
+
+
+UPDATE qa194 SET the_geom = ST_makePoint(x,y);
+-- SELECT * from pgr_tsp('SELECT id::integer, x, y from qa194', 1);
+
+SET client_min_messages TO DEBUG1;
+SELECT * from pgr_eucledianTSP($$SELECT id::integer, x, y from qa194$$);
+SELECT * from pgr_eucledianTSP($$SELECT id::integer, x, y from qa194$$, max_processing_time := 3);
+
+/*
+CREATE VIEW qa194_path AS
+WITH
+results AS (
+    SELECT seq, node, cost, agg_cost from pgr_xydtsp($$select * from pgr_eucledianDmatrix('qa194'::regclass)$$, 1)
+),
+geoms AS (
+    SELECT seq, node, cost, agg_cost, the_geom AS second  FROM results JOIN qa194 ON (node = id)
+),
+edges AS (
+    SELECT seq, node, ST_MakeLine(lag(second) over(), second) AS line, cost, agg_cost FROM geoms
+)
+SELECT * FROM edges;
+
+WITH
+results AS (
+    SELECT * from pgr_xydtsp($$select * from
+        pgr_eucledianDmatrix('SELECT id::integer, st_x(the_geom) as x, st_y(the_geom) as y FROM edge_table_vertices_pgr')$$, 6, 5)
+),
+geoms AS (
+    SELECT seq, node, cost, agg_cost, the_geom AS second  FROM results JOIN edge_table_vertices_pgr ON (node = id) order by seq
+),
+edges AS (
+    SELECT seq, node, ST_MakeLine(lag(second) over(), second) AS line, cost, agg_cost FROM geoms
+)
+SELECT * INTO newtsp FROM edges;
+
+
+WITH
+results AS (
+    SELECT * from pgr_tsp(
+        'SELECT id::integer, st_x(the_geom) as x, st_y(the_geom) as y FROM edge_table_vertices_pgr', 6, 5)
+),
+geoms AS (
+    SELECT results.*, the_geom AS second  FROM results JOIN edge_table_vertices_pgr ON (id2 = id)
+),
+edges AS (
+    SELECT seq, id1, id2, cost, ST_MakeLine(lag(second) over(), second) AS line FROM geoms order by seq
+)
+SELECT * INTO oldtsp FROM edges;
+
+
+WITH
+results AS (
+    select * from pgr_xydtsp($$SELECT * from pgr_dijkstraDmatrix('SELECT id, source, target, cost, reverse_cost from edge_table', array[1,2,3,4,5,6,7,8,9,10,11,12,13], false)$$, 6,5)
+),
+geoms AS (
+    SELECT seq, node, cost, agg_cost, the_geom AS second  FROM results JOIN edge_table_vertices_pgr ON (node = id) order by seq
+),
+edges AS (
+    SELECT seq, node, ST_MakeLine(lag(second) over(), second) AS line, cost, agg_cost FROM geoms
+)
+SELECT * INTO newtspWdijkstra FROM edges;
+*/
diff --git a/test/tsp/development/wi29-tsp.result b/test/tsp/development/wi29-tsp.result
new file mode 100644
index 0000000..0809e12
--- /dev/null
+++ b/test/tsp/development/wi29-tsp.result
@@ -0,0 +1,226 @@
+NOTICE:  table "wi29" does not exist, skipping
+NOTICE:  Deprecated Signature pgr_tsp(sql, integer, integer)
+0|17|17|683.333268292684
+1|18|18|432.691873944705
+2|19|19|772.082339448903
+3|15|15|2250.24689953989
+4|12|12|1411.95293791574
+5|11|11|106.718669615254
+6|10|10|2113.77757765045
+7|6|6|900.617093380362
+8|2|2|74.535614157127
+9|1|1|2266.91173136004
+10|5|5|1188.01888359478
+11|8|8|994.708187806297
+12|4|4|1172.36699411442
+13|3|3|891.004385199336
+14|7|7|650.85409697993
+15|9|9|1576.30022027673
+16|13|13|1321.76283931305
+17|14|14|2073.38319366628
+18|16|16|1243.87392358622
+19|24|24|559.016994374947
+20|27|27|74.535658878487
+21|25|25|1330.83095428717
+22|20|20|509.901951359278
+23|26|26|648.288376333318
+24|28|28|592.939989005405
+25|29|29|374.139344477991
+26|23|23|220.141999627513
+27|22|22|370.56056393417
+28|21|21|795.67721237329
+NOTICE:  pgr_eucledianTSP Processing Information
+Initializing tsp class ---> tsp.greedyInitial ---> tsp.annealing ---> OK
+
+Cycle(100)    total changes =13       8 were because  delta energy < 0
+Cycle(90)     total changes =7        3 were because  delta energy < 0
+Cycle(81)     total changes =6        2 were because  delta energy < 0
+Cycle(72.9)   total changes =3        1 were because  delta energy < 0
+Cycle(65.61)  total changes =6        3 were because  delta energy < 0
+Cycle(59.049)         total changes =6        2 were because  delta energy < 0
+Cycle(53.1441)        total changes =7        2 were because  delta energy < 0
+Cycle(47.8297)        total changes =5        2 were because  delta energy < 0
+Cycle(43.0467)        total changes =5        2 were because  delta energy < 0
+Cycle(38.742)         total changes =6        2 were because  delta energy < 0
+Cycle(34.8678)        total changes =6        2 were because  delta energy < 0
+Cycle(31.3811)        total changes =2        0 were because  delta energy < 0
+Cycle(28.243)         total changes =2        0 were because  delta energy < 0
+Cycle(25.4187)        total changes =5        0 were because  delta energy < 0
+Cycle(22.8768)        total changes =0        0 were because  delta energy < 0
+Total swaps: 28
+Total slides: 21
+Total reverses: 58
+Times best tour changed: 22
+Best cost reached = 27601.2
+1|17|683.333268292684|0
+2|18|432.691873944705|683.333268292684
+3|19|772.082339448903|1116.02514223739
+4|15|2250.24689953989|1888.10748168629
+5|12|1411.95293791574|4138.35438122618
+6|11|106.718669615254|5550.30731914192
+7|10|2113.77757765045|5657.02598875718
+8|6|900.617093380362|7770.80356640762
+9|2|74.535614157127|8671.42065978798
+10|1|2266.91173136004|8745.95627394511
+11|5|1188.01888359478|11012.8680053052
+12|8|994.708187806297|12200.8868888999
+13|4|1172.36699411442|13195.5950767062
+14|3|891.004385199336|14367.9620708206
+15|7|650.85409697993|15258.96645602
+16|9|1576.30022027673|15909.8205529999
+17|13|1321.76283931305|17486.1207732766
+18|14|2073.38319366628|18807.8836125897
+19|16|1243.87392358622|20881.266806256
+20|24|559.016994374947|22125.1407298422
+21|27|74.535658878487|22684.1577242171
+22|25|1330.83095428717|22758.6933830956
+23|20|509.901951359278|24089.5243373828
+24|26|648.288376333318|24599.4262887421
+25|28|592.939989005405|25247.7146650754
+26|29|374.139344477991|25840.6546540808
+27|23|220.141999627513|26214.7939985588
+28|22|370.56056393417|26434.9359981863
+29|21|795.67721237329|26805.4965621205
+30|17|0|27601.1737744938
+NOTICE:  pgr_eucledianTSP Processing Information
+Initializing tsp class ---> tsp.greedyInitial ---> tsp.annealing ---> OK
+
+Cycle(100)    total changes =9        5 were because  delta energy < 0
+Cycle(90)     total changes =8        3 were because  delta energy < 0
+Cycle(81)     total changes =4        2 were because  delta energy < 0
+Cycle(72.9)   total changes =1        0 were because  delta energy < 0
+Cycle(65.61)  total changes =4        2 were because  delta energy < 0
+Cycle(59.049)         total changes =1        0 were because  delta energy < 0
+Cycle(53.1441)        total changes =2        0 were because  delta energy < 0
+Cycle(47.8297)        total changes =2        0 were because  delta energy < 0
+Cycle(43.0467)        total changes =1        1 were because  delta energy < 0
+Cycle(38.742)         total changes =2        0 were because  delta energy < 0
+Cycle(34.8678)        total changes =0        0 were because  delta energy < 0
+Total swaps: 19
+Total slides: 5
+Total reverses: 29
+Times best tour changed: 19
+Best cost reached = 29243
+1|17|1202.91366735569|0
+2|14|2490.66626249105|1202.91366735569
+3|9|650.85409697993|3693.57992984674
+4|7|891.004385199336|4344.43402682667
+5|3|1172.36699411442|5235.438412026
+6|4|994.708187806297|6407.80540614043
+7|8|1188.01888359478|7402.51359394673
+8|5|2266.91173136004|8590.5324775415
+9|1|74.535614157127|10857.4442089015
+10|2|900.617093380362|10931.9798230587
+11|6|2113.77757765045|11832.596916439
+12|10|106.718669615254|13946.3744940895
+13|11|1411.95293791574|14053.0931637047
+14|12|1314.23824873744|15465.0461016205
+15|13|2330.29558544738|16779.2843503579
+16|15|772.082339448903|19109.5799358053
+17|19|432.691873944705|19881.6622752542
+18|18|663.008794943808|20314.3541491989
+19|22|220.141999627513|20977.3629441427
+20|23|197.926372783442|21197.5049437702
+21|21|440.456596290771|21395.4313165537
+22|29|592.939989005405|21835.8879128444
+23|28|648.288376333318|22428.8279018498
+24|26|509.901951359278|23077.1162781832
+25|20|1274.64587544062|23587.0182295424
+26|16|1243.87392358622|24861.6641049831
+27|24|559.016994374947|26105.5380285693
+28|27|74.535658878487|26664.5550229442
+29|25|2503.88589973443|26739.0906818227
+30|17|0|29242.9765815571
+NOTICE:  pgr_eucledianTSP Processing Information
+Initializing tsp class ---> tsp.greedyInitial ---> tsp.annealing ---> OK
+
+Cycle(100)    total changes =9        5 were because  delta energy < 0
+Cycle(90)     total changes =8        3 were because  delta energy < 0
+Cycle(81)     total changes =4        2 were because  delta energy < 0
+Cycle(72.9)   total changes =1        0 were because  delta energy < 0
+Cycle(65.61)  total changes =4        2 were because  delta energy < 0
+Cycle(59.049)         total changes =1        0 were because  delta energy < 0
+Cycle(53.1441)        total changes =2        0 were because  delta energy < 0
+Cycle(47.8297)        total changes =2        0 were because  delta energy < 0
+Cycle(43.0467)        total changes =1        1 were because  delta energy < 0
+Cycle(38.742)         total changes =2        0 were because  delta energy < 0
+Cycle(34.8678)        total changes =0        0 were because  delta energy < 0
+Total swaps: 19
+Total slides: 5
+Total reverses: 29
+Times best tour changed: 19
+Best cost reached = 29243
+1|117|1202.91366735569|0
+2|114|2490.66626249105|1202.91366735569
+3|109|650.85409697993|3693.57992984674
+4|107|891.004385199336|4344.43402682667
+5|103|1172.36699411442|5235.438412026
+6|104|994.708187806297|6407.80540614043
+7|108|1188.01888359478|7402.51359394673
+8|105|2266.91173136004|8590.5324775415
+9|101|74.535614157127|10857.4442089015
+10|102|900.617093380362|10931.9798230587
+11|106|2113.77757765045|11832.596916439
+12|110|106.718669615254|13946.3744940895
+13|111|1411.95293791574|14053.0931637047
+14|112|1314.23824873744|15465.0461016205
+15|113|2330.29558544738|16779.2843503579
+16|115|772.082339448903|19109.5799358053
+17|119|432.691873944705|19881.6622752542
+18|118|663.008794943808|20314.3541491989
+19|122|220.141999627513|20977.3629441427
+20|123|197.926372783442|21197.5049437702
+21|121|440.456596290771|21395.4313165537
+22|129|592.939989005405|21835.8879128444
+23|128|648.288376333318|22428.8279018498
+24|126|509.901951359278|23077.1162781832
+25|120|1274.64587544062|23587.0182295424
+26|116|1243.87392358622|24861.6641049831
+27|124|559.016994374947|26105.5380285693
+28|127|74.535658878487|26664.5550229442
+29|125|2503.88589973443|26739.0906818227
+30|117|0|29242.9765815571
+NOTICE:  pgr_eucledianTSP Processing Information
+Initializing tsp class ---> tsp.greedyInitial ---> tsp.annealing ---> OK
+
+Cycle(100)    total changes =11       6 were because  delta energy < 0
+Cycle(90)     total changes =7        2 were because  delta energy < 0
+Cycle(81)     total changes =4        1 were because  delta energy < 0
+Cycle(72.9)   total changes =7        3 were because  delta energy < 0
+Cycle(65.61)  total changes =2        1 were because  delta energy < 0
+Cycle(59.049)         total changes =0        0 were because  delta energy < 0
+Total swaps: 19
+Total slides: 4
+Total reverses: 27
+Times best tour changed: 25
+Best cost reached = 28189.8
+1|101|2266.91173136004|0
+2|105|816.6667|2266.91173136004
+3|104|1172.36699411442|3083.57843136004
+4|103|891.004385199336|4255.94542547447
+5|107|650.85409697993|5146.9498106738
+6|109|1586.48805192125|5797.80390765373
+7|108|1320.77417785513|7384.29195957498
+8|112|1314.23824873744|8705.06613743011
+9|113|1321.76283931305|10019.3043861676
+10|114|1202.91366735569|11341.0672254806
+11|117|1173.07768521763|12543.9808928363
+12|120|1274.64587544062|13717.0585780539
+13|116|1243.87392358622|14991.7044534945
+14|124|559.016994374947|16235.5783770808
+15|127|74.535658878487|16794.5953714557
+16|125|1333.3333|16869.1310303342
+17|126|648.288376333318|18202.4643303342
+18|128|592.939989005405|18850.7527066675
+19|129|440.456596290771|19443.6926956729
+20|121|197.926372783442|19884.1492919637
+21|123|220.141999627513|20082.0756647471
+22|122|663.008794943808|20302.2176643746
+23|118|432.691873944705|20965.2264593185
+24|119|772.082339448903|21397.9183332632
+25|115|2824.10256502447|22170.0006727121
+26|111|106.718669615254|24994.1032377365
+27|110|2113.77757765045|25100.8219073518
+28|106|900.617093380362|27214.5994850022
+29|102|74.535614157127|28115.2165783826
+30|101|0|28189.7521925397
diff --git a/src/tsp/test/development/wi29-tsp.test.sql b/test/tsp/development/wi29-tsp.test.sql
similarity index 100%
rename from src/tsp/test/development/wi29-tsp.test.sql
rename to test/tsp/development/wi29-tsp.test.sql
diff --git a/src/tsp/test/doc-pgr_TSP-mac.result b/test/tsp/doc-pgr_TSP-mac.result
similarity index 100%
rename from src/tsp/test/doc-pgr_TSP-mac.result
rename to test/tsp/doc-pgr_TSP-mac.result
diff --git a/src/tsp/test/doc-pgr_TSP-mac.test.sql b/test/tsp/doc-pgr_TSP-mac.test.sql
similarity index 100%
rename from src/tsp/test/doc-pgr_TSP-mac.test.sql
rename to test/tsp/doc-pgr_TSP-mac.test.sql
diff --git a/test/tsp/doc-pgr_TSP-windows.result b/test/tsp/doc-pgr_TSP-windows.result
new file mode 100644
index 0000000..72bfcdf
--- /dev/null
+++ b/test/tsp/doc-pgr_TSP-windows.result
@@ -0,0 +1,77 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- q1
+WITH
+query AS (
+    SELECT * FROM pgr_TSP(
+        $$
+        SELECT * FROM pgr_dijkstraCostMatrix(
+            'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+            (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 14),
+            directed := false
+        )
+        $$
+    )
+)
+SELECT agg_cost < 20 AS under_20 FROM query WHERE seq = 14;
+ under_20
+----------
+t
+(1 row)
+
+-- q2
+SELECT * FROM pgr_TSP(
+    $$
+    SELECT * FROM pgr_dijkstraCostMatrix(
+        'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+        (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 14),
+        directed := false
+    )
+    $$,
+    start_id := 7,
+    randomize := false
+);
+ seq | node | cost | agg_cost
+-----+------+------+----------
+1|7|1|0
+2|8|1|1
+3|5|1|2
+4|2|1|3
+5|1|2|4
+6|3|1|6
+7|4|1|7
+8|9|1|8
+9|12|1|9
+10|11|1|10
+11|10|1|11
+12|13|3|12
+13|6|3|15
+14|7|0|18
+(14 rows)
+
+-- q3
+SELECT * FROM pgr_TSP(
+    $$
+    SELECT * FROM pgr_withPointsCostMatrix(
+        'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+        'SELECT pid, edge_id, fraction from pointsOfInterest',
+        array[-1, 3, 5, 6, -6], directed := false);
+    $$,
+    start_id := 5,
+    randomize := false
+);
+ seq | node | cost | agg_cost
+-----+------+------+----------
+1|5|0.3|0
+2|-6|1.3|0.3
+3|-1|1.6|1.6
+4|3|1|3.2
+5|6|1|4.2
+6|5|0|5.2
+(6 rows)
+
+-- q4
+ROLLBACK;
+ROLLBACK
diff --git a/src/tsp/test/doc-pgr_TSP-windows.test.sql b/test/tsp/doc-pgr_TSP-windows.test.sql
similarity index 100%
rename from src/tsp/test/doc-pgr_TSP-windows.test.sql
rename to test/tsp/doc-pgr_TSP-windows.test.sql
diff --git a/test/tsp/doc-pgr_TSP.result b/test/tsp/doc-pgr_TSP.result
new file mode 100644
index 0000000..35bed9e
--- /dev/null
+++ b/test/tsp/doc-pgr_TSP.result
@@ -0,0 +1,77 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- q1
+WITH
+query AS (
+    SELECT * FROM pgr_TSP(
+        $$
+        SELECT * FROM pgr_dijkstraCostMatrix(
+            'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+            (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 14),
+            directed := false
+        )
+        $$
+    )
+)
+SELECT agg_cost < 20 AS under_20 FROM query WHERE seq = 14;
+ under_20
+----------
+ t
+(1 row)
+
+-- q2
+SELECT * FROM pgr_TSP(
+    $$
+    SELECT * FROM pgr_dijkstraCostMatrix(
+        'SELECT id, source, target, cost, reverse_cost FROM edge_table',
+        (SELECT array_agg(id) FROM edge_table_vertices_pgr WHERE id < 14),
+        directed := false
+    )
+    $$,
+    start_id := 7,
+    randomize := false
+);
+ seq | node | cost | agg_cost
+-----+------+------+----------
+   1 |    7 |    1 |        0
+   2 |    8 |    1 |        1
+   3 |    5 |    1 |        2
+   4 |    2 |    1 |        3
+   5 |    1 |    2 |        4
+   6 |    3 |    1 |        6
+   7 |    4 |    1 |        7
+   8 |    9 |    1 |        8
+   9 |   12 |    1 |        9
+  10 |   11 |    1 |       10
+  11 |   10 |    1 |       11
+  12 |   13 |    3 |       12
+  13 |    6 |    3 |       15
+  14 |    7 |    0 |       18
+(14 rows)
+
+-- q3
+SELECT * FROM pgr_TSP(
+    $$
+    SELECT * FROM pgr_withPointsCostMatrix(
+        'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+        'SELECT pid, edge_id, fraction from pointsOfInterest',
+        array[-1, 3, 5, 6, -6], directed := false);
+    $$,
+    start_id := 5,
+    randomize := false
+);
+ seq | node | cost | agg_cost
+-----+------+------+----------
+   1 |    5 |    1 |        0
+   2 |    6 |    1 |        1
+   3 |    3 |  1.6 |        2
+   4 |   -1 |  1.3 |      3.6
+   5 |   -6 |  0.3 |      4.9
+   6 |    5 |    0 |      5.2
+(6 rows)
+
+-- q4
+ROLLBACK;
+ROLLBACK
diff --git a/src/tsp/test/doc-pgr_TSP.test.sql b/test/tsp/doc-pgr_TSP.test.sql
similarity index 100%
rename from src/tsp/test/doc-pgr_TSP.test.sql
rename to test/tsp/doc-pgr_TSP.test.sql
diff --git a/test/tsp/doc-pgr_eucledianTSP.result b/test/tsp/doc-pgr_eucledianTSP.result
new file mode 100644
index 0000000..3e8d3c6
--- /dev/null
+++ b/test/tsp/doc-pgr_eucledianTSP.result
@@ -0,0 +1,94 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+-- q1
+WITH
+query AS (
+    SELECT * FROM pgr_eucledianTSP(
+        $$
+        SELECT id, st_X(the_geom) AS x, st_Y(the_geom)AS y  FROM edge_table_vertices_pgr
+        $$
+    )
+)
+SELECT agg_cost < 20 AS under_20 FROM query WHERE seq = 18;
+ under_20
+----------
+ t
+(1 row)
+
+-- q2
+SELECT* from pgr_eucledianTSP(
+    $$
+    SELECT id, st_X(the_geom) AS x, st_Y(the_geom) AS y FROM edge_table_vertices_pgr
+    $$,
+    tries_per_temperature := 3,
+    cooling_factor := 0.5,
+    randomize := false
+);
+ seq | node |       cost       |     agg_cost
+-----+------+------------------+------------------
+   1 |    1 |  1.4142135623731 |                0
+   2 |    3 |                1 |  1.4142135623731
+   3 |    4 |                1 | 2.41421356237309
+   4 |    9 | 0.58309518948453 | 3.41421356237309
+   5 |   16 | 0.58309518948453 | 3.99730875185762
+   6 |    6 |                1 | 4.58040394134215
+   7 |    5 |                1 | 5.58040394134215
+   8 |    8 |                1 | 6.58040394134215
+   9 |    7 | 1.58113883008419 | 7.58040394134215
+  10 |   14 |   1.499999999999 | 9.16154277142634
+  11 |   15 |              0.5 | 10.6615427714253
+  12 |   13 |              1.5 | 11.1615427714253
+  13 |   17 | 1.11803398874989 | 12.6615427714253
+  14 |   12 |                1 | 13.7795767601752
+  15 |   11 |                1 | 14.7795767601752
+  16 |   10 |                2 | 15.7795767601752
+  17 |    2 |                1 | 17.7795767601752
+  18 |    1 |                0 | 18.7795767601752
+(18 rows)
+
+-- q3
+SET client_min_messages TO DEBUG1;
+SET
+SELECT* from pgr_eucledianTSP(
+    $$
+    SELECT id, st_X(the_geom) AS x, st_Y(the_geom) AS y FROM edge_table_vertices_pgr
+    $$,
+    tries_per_temperature := 0,
+    randomize := false
+);
+DEBUG:  pgr_eucledianTSP Processing Information
+Initializing tsp class ---> tsp.greedyInitial ---> tsp.annealing ---> OK
+
+Cycle(100) 	total changes =0	0 were because  delta energy < 0
+Total swaps: 3
+Total slides: 0
+Total reverses: 0
+Times best tour changed: 4
+Best cost reached = 18.7796
+ seq | node |       cost       |     agg_cost
+-----+------+------------------+------------------
+   1 |    1 |  1.4142135623731 |                0
+   2 |    3 |                1 |  1.4142135623731
+   3 |    4 |                1 | 2.41421356237309
+   4 |    9 | 0.58309518948453 | 3.41421356237309
+   5 |   16 | 0.58309518948453 | 3.99730875185762
+   6 |    6 |                1 | 4.58040394134215
+   7 |    5 |                1 | 5.58040394134215
+   8 |    8 |                1 | 6.58040394134215
+   9 |    7 | 1.58113883008419 | 7.58040394134215
+  10 |   14 |   1.499999999999 | 9.16154277142634
+  11 |   15 |              0.5 | 10.6615427714253
+  12 |   13 |              1.5 | 11.1615427714253
+  13 |   17 | 1.11803398874989 | 12.6615427714253
+  14 |   12 |                1 | 13.7795767601752
+  15 |   11 |                1 | 14.7795767601752
+  16 |   10 |                2 | 15.7795767601752
+  17 |    2 |                1 | 17.7795767601752
+  18 |    1 |                0 | 18.7795767601752
+(18 rows)
+
+-- q4
+ROLLBACK;
+ROLLBACK
diff --git a/src/tsp/test/doc-pgr_eucledianTSP.test.sql b/test/tsp/doc-pgr_eucledianTSP.test.sql
similarity index 100%
rename from src/tsp/test/doc-pgr_eucledianTSP.test.sql
rename to test/tsp/doc-pgr_eucledianTSP.test.sql
diff --git a/src/tsp/test/doc-tsp-mac.result b/test/tsp/doc-tsp-mac.result
similarity index 100%
rename from src/tsp/test/doc-tsp-mac.result
rename to test/tsp/doc-tsp-mac.result
diff --git a/src/tsp/test/doc-tsp-mac.test.sql b/test/tsp/doc-tsp-mac.test.sql
similarity index 100%
rename from src/tsp/test/doc-tsp-mac.test.sql
rename to test/tsp/doc-tsp-mac.test.sql
diff --git a/src/tsp/test/doc-tsp-windows.result b/test/tsp/doc-tsp-windows.result
similarity index 100%
rename from src/tsp/test/doc-tsp-windows.result
rename to test/tsp/doc-tsp-windows.result
diff --git a/src/tsp/test/doc-tsp-windows.test.sql b/test/tsp/doc-tsp-windows.test.sql
similarity index 100%
rename from src/tsp/test/doc-tsp-windows.test.sql
rename to test/tsp/doc-tsp-windows.test.sql
diff --git a/src/tsp/test/performance/dj38.sql b/test/tsp/performance/dj38.sql
similarity index 100%
rename from src/tsp/test/performance/dj38.sql
rename to test/tsp/performance/dj38.sql
diff --git a/src/tsp/test/performance/qa194.sql b/test/tsp/performance/qa194.sql
similarity index 100%
rename from src/tsp/test/performance/qa194.sql
rename to test/tsp/performance/qa194.sql
diff --git a/src/tsp/test/performance/wi29.sql b/test/tsp/performance/wi29.sql
similarity index 100%
rename from src/tsp/test/performance/wi29.sql
rename to test/tsp/performance/wi29.sql
diff --git a/src/tsp/test/test.conf b/test/tsp/test.conf
similarity index 100%
rename from src/tsp/test/test.conf
rename to test/tsp/test.conf
diff --git a/test/vrp_basic/doc-pgr_vrpOneDepot.result b/test/vrp_basic/doc-pgr_vrpOneDepot.result
new file mode 100644
index 0000000..d53f929
--- /dev/null
+++ b/test/vrp_basic/doc-pgr_vrpOneDepot.result
@@ -0,0 +1,256 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+SELECT * FROM pgr_vrpOneDepot(
+    'SELECT * FROM vrp_orders',
+    'SELECT * FROM vrp_vehicles',
+    'SELECT * FROM vrp_distance',
+    1);
+ oid | opos | vid | tarrival | tdepart
+-----+------+-----+----------+---------
+  -1 |    1 |   5 |        0 |       0
+  66 |    2 |   5 |        0 |       0
+  25 |    3 |   5 |        0 |       0
+  21 |    4 |   5 |        0 |       0
+  84 |    5 |   5 |        0 |       0
+  50 |    6 |   5 |        0 |       0
+  49 |    7 |   5 |        0 |       0
+  24 |    8 |   5 |        0 |       0
+  22 |    9 |   5 |        0 |       0
+  20 |   10 |   5 |        0 |       0
+  19 |   11 |   5 |        0 |       0
+  66 |   12 |   5 |       11 |      21
+  84 |   13 |   5 |       30 |      45
+  24 |   14 |   5 |       71 |      81
+  22 |   15 |   5 |       83 |      93
+  20 |   16 |   5 |       98 |     108
+  19 |   17 |   5 |      114 |     124
+  50 |   18 |   5 |      131 |     141
+  21 |   19 |   5 |      144 |     154
+  25 |   20 |   5 |      158 |     168
+  49 |   21 |   5 |      179 |     189
+  -1 |   22 |   5 |      234 |     234
+  -1 |    1 |   6 |        0 |       0
+  31 |    2 |   6 |        0 |       0
+  32 |    3 |   6 |        0 |       0
+  81 |    4 |   6 |        0 |       0
+  94 |    5 |   6 |        0 |       0
+  93 |    6 |   6 |        0 |       0
+  35 |    7 |   6 |        0 |       0
+  33 |    8 |   6 |        0 |       0
+  28 |    9 |   6 |        0 |       0
+  27 |   10 |   6 |        0 |       0
+  93 |   11 |   6 |       15 |      25
+  32 |   12 |   6 |       61 |      71
+  28 |   13 |   6 |       78 |      88
+  31 |   14 |   6 |       97 |     107
+  35 |   15 |   6 |      112 |     122
+  27 |   16 |   6 |      134 |     144
+  33 |   17 |   6 |      152 |     162
+  94 |   18 |   6 |      196 |     206
+  81 |   19 |   6 |      221 |     231
+  -1 |   20 |   6 |      238 |     238
+  -1 |    1 |   3 |        0 |       0
+  16 |    2 |   3 |        0 |       0
+  14 |    3 |   3 |        0 |       0
+  48 |    4 |   3 |        0 |       0
+  18 |    5 |   3 |        0 |       0
+  17 |    6 |   3 |        0 |       0
+  15 |    7 |   3 |        0 |       0
+  13 |    8 |   3 |        0 |       0
+  11 |    9 |   3 |        0 |       0
+  10 |   10 |   3 |        0 |       0
+  15 |   11 |   3 |       35 |      45
+  48 |   12 |   3 |       48 |      58
+  13 |   13 |   3 |       64 |      74
+  16 |   14 |   3 |       82 |      92
+  17 |   15 |   3 |       94 |     104
+  10 |   16 |   3 |      115 |     125
+  11 |   17 |   3 |      130 |     140
+  14 |   18 |   3 |      147 |     157
+  18 |   19 |   3 |      169 |     179
+  -1 |   20 |   3 |      219 |     219
+  -1 |    1 |   8 |        0 |       0
+  71 |    2 |   8 |        0 |       0
+  55 |    3 |   8 |        0 |       0
+  44 |    4 |   8 |        0 |       0
+  43 |    5 |   8 |        0 |       0
+  42 |    6 |   8 |        0 |       0
+  41 |    7 |   8 |        0 |       0
+  40 |    8 |   8 |        0 |       0
+  39 |    9 |   8 |        0 |       0
+  43 |   10 |   8 |       34 |      44
+  40 |   11 |   8 |       49 |      59
+  39 |   12 |   8 |       61 |      85
+  41 |   13 |   8 |       90 |     100
+  42 |   14 |   8 |      111 |     121
+  44 |   15 |   8 |      131 |     141
+  55 |   16 |   8 |      166 |     176
+  71 |   17 |   8 |      198 |     208
+  -1 |   18 |   8 |      228 |     228
+  -1 |    1 |   1 |        0 |       0
+   4 |    2 |   1 |        0 |       0
+ 101 |    3 |   1 |        0 |       0
+  46 |    4 |   1 |        0 |       0
+   5 |    5 |   1 |        0 |       0
+   3 |    6 |   1 |        0 |       0
+  46 |    7 |   1 |       38 |      48
+   3 |    8 |   1 |       55 |      65
+   2 |    9 |   1 |       96 |      96
+   4 |   10 |   1 |      135 |     145
+   2 |   11 |   1 |      148 |     158
+   5 |   12 |   1 |      165 |     175
+ 101 |   13 |   1 |      192 |     202
+  -1 |   14 |   1 |      222 |     222
+  -1 |    1 |  13 |        0 |       0
+  92 |    2 |  13 |        0 |       0
+  52 |    3 |  13 |        0 |       0
+  57 |    4 |  13 |        0 |       0
+  85 |    5 |  13 |        0 |       0
+  68 |    6 |  13 |        0 |       0
+  63 |    7 |  13 |        0 |       0
+  63 |    8 |  13 |       29 |      62
+  68 |    9 |  13 |       69 |      80
+  52 |   10 |  13 |      104 |     114
+  85 |   11 |  13 |      123 |     133
+  57 |   12 |  13 |      142 |     152
+  92 |   13 |  13 |      159 |     177
+  -1 |   14 |  13 |      189 |     189
+  -1 |    1 |   7 |        0 |       0
+  30 |    2 |   7 |        0 |       0
+  29 |    3 |   7 |        0 |       0
+  38 |    4 |   7 |        0 |       0
+  36 |    5 |   7 |        0 |       0
+  34 |    6 |   7 |        0 |       0
+  34 |    7 |   7 |       51 |      61
+  29 |    8 |   7 |       70 |      80
+  30 |    9 |   7 |       85 |      95
+  38 |   10 |   7 |      149 |     159
+  36 |   11 |   7 |      162 |     172
+  -1 |   12 |   7 |      217 |     217
+  -1 |    1 |   2 |        0 |       0
+  89 |    2 |   2 |        0 |       0
+  47 |    3 |   2 |        0 |       0
+  61 |    4 |   2 |        0 |       0
+   9 |    5 |   2 |        0 |       0
+   8 |    6 |   2 |        0 |       0
+  89 |    7 |   2 |       18 |      77
+   8 |    8 |   2 |       96 |     106
+   9 |    9 |   2 |      111 |     121
+  47 |   10 |   2 |      124 |     134
+  61 |   11 |   2 |      154 |     165
+  -1 |   12 |   2 |      192 |     192
+  -1 |    1 |  14 |        0 |       0
+  97 |    2 |  14 |        0 |       0
+  64 |    3 |  14 |        0 |       0
+  51 |    4 |  14 |        0 |       0
+  96 |    5 |  14 |        0 |       0
+  77 |    6 |  14 |        0 |       0
+  96 |    7 |  14 |       21 |      44
+  64 |    8 |  14 |       63 |      73
+  77 |    9 |  14 |       83 |      93
+  51 |   10 |  14 |      119 |     129
+  97 |   11 |  14 |      154 |     164
+  -1 |   12 |  14 |      180 |     180
+  -1 |    1 |  15 |        0 |       0
+  67 |    2 |  15 |        0 |       0
+  73 |    3 |  15 |        0 |       0
+  95 |    4 |  15 |        0 |       0
+  82 |    5 |  15 |        0 |       0
+  72 |    6 |  15 |        0 |       0
+  73 |    7 |  15 |       27 |      40
+  72 |    8 |  15 |       50 |      75
+  82 |    9 |  15 |       91 |     101
+  95 |   10 |  15 |      114 |     124
+  67 |   11 |  15 |      144 |     154
+  -1 |   12 |  15 |      167 |     167
+  -1 |    1 |  11 |        0 |       0
+  78 |    2 |  11 |        0 |       0
+  26 |    3 |  11 |        0 |       0
+  87 |    4 |  11 |        0 |       0
+  23 |    5 |  11 |        0 |       0
+  87 |    6 |  11 |       32 |      97
+  23 |    7 |  11 |      118 |     128
+  78 |    8 |  11 |      149 |     160
+  26 |    9 |  11 |      172 |     182
+  -1 |   10 |  11 |      227 |     227
+  -1 |    1 |   4 |        0 |       0
+  60 |    2 |   4 |        0 |       0
+  59 |    3 |   4 |        0 |       0
+ 100 |    4 |   4 |        0 |       0
+  54 |    5 |   4 |        0 |       0
+  60 |    6 |   4 |       42 |      52
+ 100 |    7 |   4 |       74 |      87
+  54 |    8 |   4 |      103 |     113
+  59 |    9 |   4 |      153 |     163
+  -1 |   10 |   4 |      211 |     211
+  -1 |    1 |  10 |        0 |       0
+  86 |    2 |  10 |        0 |       0
+  90 |    3 |  10 |        0 |       0
+  65 |    4 |  10 |        0 |       0
+  53 |    5 |  10 |        0 |       0
+  53 |    6 |  10 |       25 |      62
+  65 |    7 |  10 |       82 |      92
+  86 |    8 |  10 |      111 |     121
+  90 |    9 |  10 |      140 |     154
+  -1 |   10 |  10 |      206 |     206
+  -1 |    1 |  12 |        0 |       0
+   6 |    2 |  12 |        0 |       0
+  80 |    3 |  12 |        0 |       0
+   7 |    4 |  12 |        0 |       0
+  56 |    5 |  12 |        0 |       0
+   6 |    6 |  12 |       40 |      51
+  80 |    7 |  12 |       73 |      99
+   7 |    8 |  12 |      113 |     123
+  56 |    9 |  12 |      142 |     152
+  -1 |   10 |  12 |      166 |     166
+  -1 |    1 |  19 |        0 |       0
+  88 |    2 |  19 |        0 |       0
+  70 |    3 |  19 |        0 |       0
+  58 |    4 |  19 |        0 |       0
+  99 |    5 |  19 |        0 |       0
+  70 |    6 |  19 |        9 |      51
+  99 |    7 |  19 |       56 |      66
+  88 |    8 |  19 |       97 |     107
+  58 |    9 |  19 |      125 |     135
+  -1 |   10 |  19 |      162 |     162
+  -1 |    1 |  17 |        0 |       0
+  75 |    2 |  17 |        0 |       0
+  98 |    3 |  17 |        0 |       0
+  76 |    4 |  17 |        0 |       0
+  76 |    5 |  17 |       57 |      84
+  98 |    6 |  17 |       97 |     130
+  75 |    7 |  17 |      146 |     156
+  -1 |    8 |  17 |      192 |     192
+  -1 |    1 |  16 |        0 |       0
+  69 |    2 |  16 |        0 |       0
+  79 |    3 |  16 |        0 |       0
+  74 |    4 |  16 |        0 |       0
+  74 |    5 |  16 |       39 |      87
+  79 |    6 |  16 |       94 |     104
+  69 |    7 |  16 |      136 |     154
+  -1 |    8 |  16 |      164 |     164
+  -1 |    1 |   9 |        0 |       0
+  62 |    2 |   9 |        0 |       0
+  37 |    3 |   9 |        0 |       0
+  45 |    4 |   9 |        0 |       0
+  37 |    5 |   9 |       43 |      53
+  45 |    6 |   9 |       63 |      74
+  62 |    7 |   9 |       94 |     104
+  -1 |    8 |   9 |      120 |     120
+  -1 |    1 |  18 |        0 |       0
+  91 |    2 |  18 |        0 |       0
+  12 |    3 |  18 |        0 |       0
+  12 |    4 |  18 |       34 |      69
+  91 |    5 |  18 |       99 |     109
+  -1 |    6 |  18 |      113 |     113
+  -1 |    1 |  20 |        0 |       0
+  83 |    2 |  20 |        0 |       0
+  83 |    3 |  20 |       15 |      52
+  -1 |    4 |  20 |       67 |      67
+  -1 |    0 |   0 |       -1 |    3712
+(241 rows)
+
+ROLLBACK;
+ROLLBACK
diff --git a/src/vrp_basic/test/doc-pgr_vrpOneDepot.test.sql b/test/vrp_basic/doc-pgr_vrpOneDepot.test.sql
similarity index 100%
rename from src/vrp_basic/test/doc-pgr_vrpOneDepot.test.sql
rename to test/vrp_basic/doc-pgr_vrpOneDepot.test.sql
diff --git a/test/vrp_basic/oneDepotWrapper.result b/test/vrp_basic/oneDepotWrapper.result
new file mode 100644
index 0000000..c590f98
--- /dev/null
+++ b/test/vrp_basic/oneDepotWrapper.result
@@ -0,0 +1,256 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+SELECT * FROM _pgr_vrpOneDepot(
+    'SELECT * FROM vrp_orders',
+    'SELECT * FROM vrp_vehicles',
+    'SELECT src_id AS start_vid, dest_id AS end_vid, traveltime AS agg_cost FROM vrp_distance',
+    1);
+ seq | vehicle_seq | vehicle_id | stop_seq | stop_type | stop_id | order_id | cargo | travel_time | arrival_time |     wait_time     | service_time | departure_time
+-----+-------------+------------+----------+-----------+---------+----------+-------+-------------+--------------+-------------------+--------------+----------------
+   1 |           1 |          5 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
+   2 |           1 |          5 |        2 |         2 |       1 |       66 |    16 |           0 |            0 |                 0 |            0 |              0
+   3 |           1 |          5 |        3 |         2 |       1 |       25 |    26 |           0 |            0 |                 0 |            0 |              0
+   4 |           1 |          5 |        4 |         2 |       1 |       21 |    36 |           0 |            0 |                 0 |            0 |              0
+   5 |           1 |          5 |        5 |         2 |       1 |       84 |    50 |           0 |            0 |                 0 |            0 |              0
+   6 |           1 |          5 |        6 |         2 |       1 |       50 |    60 |           0 |            0 |                 0 |            0 |              0
+   7 |           1 |          5 |        7 |         2 |       1 |       49 |    70 |           0 |            0 |                 0 |            0 |              0
+   8 |           1 |          5 |        8 |         2 |       1 |       24 |   100 |           0 |            0 |                 0 |            0 |              0
+   9 |           1 |          5 |        9 |         2 |       1 |       22 |   110 |           0 |            0 |                 0 |            0 |              0
+  10 |           1 |          5 |       10 |         2 |       1 |       20 |   150 |           0 |            0 |                 0 |            0 |              0
+  11 |           1 |          5 |       11 |         2 |       1 |       19 |   170 |           0 |            0 |                 0 |            0 |              0
+  12 |           1 |          5 |       12 |         3 |      66 |       66 |   154 |    11.18034 |     11.18034 |                 0 |           10 |       21.18034
+  13 |           1 |          5 |       13 |         3 |      84 |       84 |   140 |    9.219544 |    30.399884 |          4.600116 |           10 |             45
+  14 |           1 |          5 |       14 |         3 |      24 |       24 |   110 |   26.019224 |    71.019224 |                 0 |           10 |      81.019224
+  15 |           1 |          5 |       15 |         3 |      22 |       22 |   100 |           2 |    83.019224 |                 0 |           10 |      93.019224
+  16 |           1 |          5 |       16 |         3 |      20 |       20 |    60 |    5.385165 |    98.404389 |                 0 |           10 |     108.404389
+  17 |           1 |          5 |       17 |         3 |      19 |       19 |    40 |    5.385165 |   113.789554 |                 0 |           10 |     123.789554
+  18 |           1 |          5 |       18 |         3 |      50 |       50 |    30 |     7.28011 |   131.069664 |                 0 |           10 |     141.069664
+  19 |           1 |          5 |       19 |         3 |      21 |       21 |    20 |           3 |   144.069664 |                 0 |           10 |     154.069664
+  20 |           1 |          5 |       20 |         3 |      25 |       25 |    10 |           4 |   158.069664 |                 0 |           10 |     168.069664
+  21 |           1 |          5 |       21 |         3 |      49 |       49 |     0 |    10.77033 |   178.839994 |                 0 |           10 |     188.839994
+  22 |           1 |          5 |       22 |         6 |       1 |       -1 |     0 |   45.044423 |   233.884417 |                 0 |            0 |     233.884417
+  23 |           2 |          6 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
+  24 |           2 |          6 |        2 |         2 |       1 |       31 |    10 |           0 |            0 |                 0 |            0 |              0
+  25 |           2 |          6 |        3 |         2 |       1 |       32 |    30 |           0 |            0 |                 0 |            0 |              0
+  26 |           2 |          6 |        4 |         2 |       1 |       81 |    43 |           0 |            0 |                 0 |            0 |              0
+  27 |           2 |          6 |        5 |         2 |       1 |       94 |    46 |           0 |            0 |                 0 |            0 |              0
+  28 |           2 |          6 |        6 |         2 |       1 |       93 |    60 |           0 |            0 |                 0 |            0 |              0
+  29 |           2 |          6 |        7 |         2 |       1 |       35 |    90 |           0 |            0 |                 0 |            0 |              0
+  30 |           2 |          6 |        8 |         2 |       1 |       33 |   100 |           0 |            0 |                 0 |            0 |              0
+  31 |           2 |          6 |        9 |         2 |       1 |       28 |   120 |           0 |            0 |                 0 |            0 |              0
+  32 |           2 |          6 |       10 |         2 |       1 |       27 |   150 |           0 |            0 |                 0 |            0 |              0
+  33 |           2 |          6 |       11 |         3 |      93 |       93 |   136 |   14.764823 |    14.764823 |                 0 |           10 |      24.764823
+  34 |           2 |          6 |       12 |         3 |      32 |       32 |   116 |   35.902646 |    60.667469 | 0.332531000000003 |           10 |             71
+  35 |           2 |          6 |       13 |         3 |      28 |       28 |    96 |           7 |           78 |                 0 |           10 |             88
+  36 |           2 |          6 |       14 |         3 |      31 |       31 |    86 |    8.602325 |    96.602325 |                 0 |           10 |     106.602325
+  37 |           2 |          6 |       15 |         3 |      35 |       35 |    56 |    5.830952 |   112.433277 |                 0 |           10 |     122.433277
+  38 |           2 |          6 |       16 |         3 |      27 |       27 |    26 |    11.18034 |   133.613617 |                 0 |           10 |     143.613617
+  39 |           2 |          6 |       17 |         3 |      33 |       33 |    16 |           8 |   151.613617 |                 0 |           10 |     161.613617
+  40 |           2 |          6 |       18 |         3 |      94 |       94 |    13 |   34.058773 |    195.67239 |                 0 |           10 |      205.67239
+  41 |           2 |          6 |       19 |         3 |      81 |       81 |     0 |   14.866069 |   220.538459 |                 0 |           10 |     230.538459
+  42 |           2 |          6 |       20 |         6 |       1 |       -1 |     0 |    7.615773 |   238.154232 |                 0 |            0 |     238.154232
+  43 |           3 |          3 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
+  44 |           3 |          3 |        2 |         2 |       1 |       16 |    20 |           0 |            0 |                 0 |            0 |              0
+  45 |           3 |          3 |        3 |         2 |       1 |       14 |    30 |           0 |            0 |                 0 |            0 |              0
+  46 |           3 |          3 |        4 |         2 |       1 |       48 |    40 |           0 |            0 |                 0 |            0 |              0
+  47 |           3 |          3 |        5 |         2 |       1 |       18 |    60 |           0 |            0 |                 0 |            0 |              0
+  48 |           3 |          3 |        6 |         2 |       1 |       17 |    80 |           0 |            0 |                 0 |            0 |              0
+  49 |           3 |          3 |        7 |         2 |       1 |       15 |    90 |           0 |            0 |                 0 |            0 |              0
+  50 |           3 |          3 |        8 |         2 |       1 |       13 |   110 |           0 |            0 |                 0 |            0 |              0
+  51 |           3 |          3 |        9 |         2 |       1 |       11 |   140 |           0 |            0 |                 0 |            0 |              0
+  52 |           3 |          3 |       10 |         2 |       1 |       10 |   160 |           0 |            0 |                 0 |            0 |              0
+  53 |           3 |          3 |       11 |         3 |      15 |       15 |   150 |   35.355339 |    35.355339 |                 0 |           10 |      45.355339
+  54 |           3 |          3 |       12 |         3 |      48 |       48 |   140 |           3 |    48.355339 |                 0 |           10 |      58.355339
+  55 |           3 |          3 |       13 |         3 |      13 |       13 |   120 |           6 |    64.355339 |                 0 |           10 |      74.355339
+  56 |           3 |          3 |       14 |         3 |      16 |       16 |   100 |     7.81025 |    82.165589 |                 0 |           10 |      92.165589
+  57 |           3 |          3 |       15 |         3 |      17 |       17 |    80 |           2 |    94.165589 |                 0 |           10 |     104.165589
+  58 |           3 |          3 |       16 |         3 |      10 |       10 |    60 |    11.18034 |   115.345929 |                 0 |           10 |     125.345929
+  59 |           3 |          3 |       17 |         3 |      11 |       11 |    30 |           5 |   130.345929 |                 0 |           10 |     140.345929
+  60 |           3 |          3 |       18 |         3 |      14 |       14 |    20 |    7.071068 |   147.416997 |                 0 |           10 |     157.416997
+  61 |           3 |          3 |       19 |         3 |      18 |       18 |     0 |    11.18034 |   168.597337 |                 0 |           10 |     178.597337
+  62 |           3 |          3 |       20 |         6 |       1 |       -1 |     0 |   40.311289 |   218.908626 |                 0 |            0 |     218.908626
+  63 |           4 |          8 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
+  64 |           4 |          8 |        2 |         2 |       1 |       71 |    23 |           0 |            0 |                 0 |            0 |              0
+  65 |           4 |          8 |        3 |         2 |       1 |       55 |    39 |           0 |            0 |                 0 |            0 |              0
+  66 |           4 |          8 |        4 |         2 |       1 |       44 |    59 |           0 |            0 |                 0 |            0 |              0
+  67 |           4 |          8 |        5 |         2 |       1 |       43 |    69 |           0 |            0 |                 0 |            0 |              0
+  68 |           4 |          8 |        6 |         2 |       1 |       42 |    89 |           0 |            0 |                 0 |            0 |              0
+  69 |           4 |          8 |        7 |         2 |       1 |       41 |   119 |           0 |            0 |                 0 |            0 |              0
+  70 |           4 |          8 |        8 |         2 |       1 |       40 |   129 |           0 |            0 |                 0 |            0 |              0
+  71 |           4 |          8 |        9 |         2 |       1 |       39 |   159 |           0 |            0 |                 0 |            0 |              0
+  72 |           4 |          8 |       10 |         3 |      43 |       43 |   149 |    33.54102 |     33.54102 |                 0 |           10 |       43.54102
+  73 |           4 |          8 |       11 |         3 |      40 |       40 |   139 |           5 |     48.54102 |                 0 |           10 |       58.54102
+  74 |           4 |          8 |       12 |         3 |      39 |       39 |   109 |           2 |     60.54102 |          14.45898 |           10 |             85
+  75 |           4 |          8 |       13 |         3 |      41 |       41 |    79 |    5.385165 |    90.385165 |                 0 |           10 |     100.385165
+  76 |           4 |          8 |       14 |         3 |      42 |       42 |    59 |   10.198039 |   110.583204 |                 0 |           10 |     120.583204
+  77 |           4 |          8 |       15 |         3 |      44 |       44 |    39 |   10.440307 |   131.023511 |                 0 |           10 |     141.023511
+  78 |           4 |          8 |       16 |         3 |      55 |       55 |    23 |          25 |   166.023511 |                 0 |           10 |     176.023511
+  79 |           4 |          8 |       17 |         3 |      71 |       71 |     0 |   21.931712 |   197.955223 |                 0 |           10 |     207.955223
+  80 |           4 |          8 |       18 |         6 |       1 |       -1 |     0 |   19.646883 |   227.602106 |                 0 |            0 |     227.602106
+  81 |           5 |          1 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
+  82 |           5 |          1 |        2 |         2 |       1 |        4 |    10 |           0 |            0 |                 0 |            0 |              0
+  83 |           5 |          1 |        3 |         2 |       1 |      101 |    13 |           0 |            0 |                 0 |            0 |              0
+  84 |           5 |          1 |        4 |         2 |       1 |       46 |    23 |           0 |            0 |                 0 |            0 |              0
+  85 |           5 |          1 |        5 |         2 |       1 |        5 |    63 |           0 |            0 |                 0 |            0 |              0
+  86 |           5 |          1 |        6 |         2 |       1 |        3 |    93 |           0 |            0 |                 0 |            0 |              0
+  87 |           5 |          1 |        7 |         3 |      46 |       46 |    83 |   37.735925 |    37.735925 |                 0 |           10 |      47.735925
+  88 |           5 |          1 |        8 |         3 |       3 |        3 |    53 |     7.28011 |    55.016035 |                 0 |           10 |      65.016035
+  89 |           5 |          1 |        9 |         2 |       1 |        2 |    73 |   30.805844 |    95.821879 |                 0 |            0 |      95.821879
+  90 |           5 |          1 |       10 |         3 |       4 |        4 |    63 |   39.357337 |   135.179216 |                 0 |           10 |     145.179216
+  91 |           5 |          1 |       11 |         3 |       2 |        2 |    43 |           3 |   148.179216 |                 0 |           10 |     158.179216
+  92 |           5 |          1 |       12 |         3 |       5 |        5 |     3 |    7.071068 |   165.250284 |                 0 |           10 |     175.250284
+  93 |           5 |          1 |       13 |         3 |     101 |      101 |     0 |   17.029386 |    192.27967 |                 0 |           10 |      202.27967
+  94 |           5 |          1 |       14 |         6 |       1 |       -1 |     0 |   19.235384 |   221.515054 |                 0 |            0 |     221.515054
+  95 |           6 |         13 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
+  96 |           6 |         13 |        2 |         2 |       1 |       92 |    13 |           0 |            0 |                 0 |            0 |              0
+  97 |           6 |         13 |        3 |         2 |       1 |       52 |    32 |           0 |            0 |                 0 |            0 |              0
+  98 |           6 |         13 |        4 |         2 |       1 |       57 |    51 |           0 |            0 |                 0 |            0 |              0
+  99 |           6 |         13 |        5 |         2 |       1 |       85 |    69 |           0 |            0 |                 0 |            0 |              0
+ 100 |           6 |         13 |        6 |         2 |       1 |       68 |    78 |           0 |            0 |                 0 |            0 |              0
+ 101 |           6 |         13 |        7 |         2 |       1 |       63 |    81 |           0 |            0 |                 0 |            0 |              0
+ 102 |           6 |         13 |        8 |         3 |      63 |       63 |    78 |   29.154759 |    29.154759 |         22.845241 |           10 |             62
+ 103 |           6 |         13 |        9 |         3 |      68 |       68 |    69 |    7.071068 |    69.071068 | 0.928932000000003 |           10 |             80
+ 104 |           6 |         13 |       10 |         3 |      52 |       52 |    50 |   23.769729 |   103.769729 |                 0 |           10 |     113.769729
+ 105 |           6 |         13 |       11 |         3 |      85 |       85 |    32 |    9.219544 |   122.989273 |                 0 |           10 |     132.989273
+ 106 |           6 |         13 |       12 |         3 |      57 |       57 |    13 |    9.219544 |   142.208817 |                 0 |           10 |     152.208817
+ 107 |           6 |         13 |       13 |         3 |      92 |       92 |     0 |    7.071068 |   159.279885 |  7.72011499999999 |           10 |            177
+ 108 |           6 |         13 |       14 |         6 |       1 |       -1 |     0 |   12.041595 |   189.041595 |                 0 |            0 |     189.041595
+ 109 |           7 |          7 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
+ 110 |           7 |          7 |        2 |         2 |       1 |       30 |    10 |           0 |            0 |                 0 |            0 |              0
+ 111 |           7 |          7 |        3 |         2 |       1 |       29 |    20 |           0 |            0 |                 0 |            0 |              0
+ 112 |           7 |          7 |        4 |         2 |       1 |       38 |    30 |           0 |            0 |                 0 |            0 |              0
+ 113 |           7 |          7 |        5 |         2 |       1 |       36 |    50 |           0 |            0 |                 0 |            0 |              0
+ 114 |           7 |          7 |        6 |         2 |       1 |       34 |    60 |           0 |            0 |                 0 |            0 |              0
+ 115 |           7 |          7 |        7 |         3 |      34 |       34 |    50 |   51.478151 |    51.478151 |                 0 |           10 |      61.478151
+ 116 |           7 |          7 |        8 |         3 |      29 |       29 |    40 |    8.602325 |    70.080476 |                 0 |           10 |      80.080476
+ 117 |           7 |          7 |        9 |         3 |      30 |       30 |    30 |    5.385165 |    85.465641 |                 0 |           10 |      95.465641
+ 118 |           7 |          7 |       10 |         3 |      38 |       38 |    20 |   53.235327 |   148.700968 |                 0 |           10 |     158.700968
+ 119 |           7 |          7 |       11 |         3 |      36 |       36 |     0 |    3.605551 |   162.306519 |                 0 |           10 |     172.306519
+ 120 |           7 |          7 |       12 |         6 |       1 |       -1 |     0 |   44.204072 |   216.510591 |                 0 |            0 |     216.510591
+ 121 |           8 |          2 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
+ 122 |           8 |          2 |        2 |         2 |       1 |       89 |    19 |           0 |            0 |                 0 |            0 |              0
+ 123 |           8 |          2 |        3 |         2 |       1 |       47 |    29 |           0 |            0 |                 0 |            0 |              0
+ 124 |           8 |          2 |        4 |         2 |       1 |       61 |    46 |           0 |            0 |                 0 |            0 |              0
+ 125 |           8 |          2 |        5 |         2 |       1 |        9 |    56 |           0 |            0 |                 0 |            0 |              0
+ 126 |           8 |          2 |        6 |         2 |       1 |        8 |    76 |           0 |            0 |                 0 |            0 |              0
+ 127 |           8 |          2 |        7 |         3 |      89 |       89 |    57 |   17.888544 |    17.888544 |         49.111456 |           10 |             77
+ 128 |           8 |          2 |        8 |         3 |       8 |        8 |    37 |   19.235384 |    96.235384 |                 0 |           10 |     106.235384
+ 129 |           8 |          2 |        9 |         3 |       9 |        9 |    27 |           5 |   111.235384 |                 0 |           10 |     121.235384
+ 130 |           8 |          2 |       10 |         3 |      47 |       47 |    17 |           3 |   124.235384 |                 0 |           10 |     134.235384
+ 131 |           8 |          2 |       11 |         3 |      61 |       61 |     0 |   20.223748 |   154.459132 | 0.540867999999989 |           10 |            165
+ 132 |           8 |          2 |       12 |         6 |       1 |       -1 |     0 |   26.925824 |   191.925824 |                 0 |            0 |     191.925824
+ 133 |           9 |         14 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
+ 134 |           9 |         14 |        2 |         2 |       1 |       97 |    26 |           0 |            0 |                 0 |            0 |              0
+ 135 |           9 |         14 |        3 |         2 |       1 |       64 |    32 |           0 |            0 |                 0 |            0 |              0
+ 136 |           9 |         14 |        4 |         2 |       1 |       51 |    62 |           0 |            0 |                 0 |            0 |              0
+ 137 |           9 |         14 |        5 |         2 |       1 |       96 |    68 |           0 |            0 |                 0 |            0 |              0
+ 138 |           9 |         14 |        6 |         2 |       1 |       77 |    99 |           0 |            0 |                 0 |            0 |              0
+ 139 |           9 |         14 |        7 |         3 |      96 |       96 |    93 |   20.615528 |    20.615528 |         13.384472 |           10 |             44
+ 140 |           9 |         14 |        8 |         3 |      64 |       64 |    87 |   19.235384 |    63.235384 |                 0 |           10 |      73.235384
+ 141 |           9 |         14 |        9 |         3 |      77 |       77 |    56 |    9.433981 |    82.669365 |                 0 |           10 |      92.669365
+ 142 |           9 |         14 |       10 |         3 |      51 |       51 |    26 |   25.942244 |   118.611609 |                 0 |           10 |     128.611609
+ 143 |           9 |         14 |       11 |         3 |      97 |       97 |     0 |   25.495098 |   154.106707 |                 0 |           10 |     164.106707
+ 144 |           9 |         14 |       12 |         6 |       1 |       -1 |     0 |   15.524175 |   179.630882 |                 0 |            0 |     179.630882
+ 145 |          10 |         15 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
+ 146 |          10 |         15 |        2 |         2 |       1 |       67 |    16 |           0 |            0 |                 0 |            0 |              0
+ 147 |          10 |         15 |        3 |         2 |       1 |       73 |    24 |           0 |            0 |                 0 |            0 |              0
+ 148 |          10 |         15 |        4 |         2 |       1 |       95 |    47 |           0 |            0 |                 0 |            0 |              0
+ 149 |          10 |         15 |        5 |         2 |       1 |       82 |    57 |           0 |            0 |                 0 |            0 |              0
+ 150 |          10 |         15 |        6 |         2 |       1 |       72 |    71 |           0 |            0 |                 0 |            0 |              0
+ 151 |          10 |         15 |        7 |         3 |      73 |       73 |    63 |    27.45906 |     27.45906 |           2.54094 |           10 |             40
+ 152 |          10 |         15 |        8 |         3 |      72 |       72 |    49 |   10.198039 |    50.198039 |         14.801961 |           10 |             75
+ 153 |          10 |         15 |        9 |         3 |      82 |       82 |    39 |   16.278821 |    91.278821 |                 0 |           10 |     101.278821
+ 154 |          10 |         15 |       10 |         3 |      95 |       95 |    16 |   12.806248 |   114.085069 |                 0 |           10 |     124.085069
+ 155 |          10 |         15 |       11 |         3 |      67 |       67 |     0 |   19.416488 |   143.501557 |                 0 |           10 |     153.501557
+ 156 |          10 |         15 |       12 |         6 |       1 |       -1 |     0 |   13.038405 |   166.539962 |                 0 |            0 |     166.539962
+ 157 |          11 |         11 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
+ 158 |          11 |         11 |        2 |         2 |       1 |       78 |     7 |           0 |            0 |                 0 |            0 |              0
+ 159 |          11 |         11 |        3 |         2 |       1 |       26 |    27 |           0 |            0 |                 0 |            0 |              0
+ 160 |          11 |         11 |        4 |         2 |       1 |       87 |    55 |           0 |            0 |                 0 |            0 |              0
+ 161 |          11 |         11 |        5 |         2 |       1 |       23 |    95 |           0 |            0 |                 0 |            0 |              0
+ 162 |          11 |         11 |        6 |         3 |      87 |       87 |    67 |   32.202484 |    32.202484 |         54.797516 |           10 |             97
+ 163 |          11 |         11 |        7 |         3 |      23 |       23 |    27 |   21.023796 |   118.023796 |                 0 |           10 |     128.023796
+ 164 |          11 |         11 |        8 |         3 |      78 |       78 |    20 |   20.808652 |   148.832448 |          1.167552 |           10 |            160
+ 165 |          11 |         11 |        9 |         3 |      26 |       26 |     0 |   12.165525 |   172.165525 |                 0 |           10 |     182.165525
+ 166 |          11 |         11 |       10 |         6 |       1 |       -1 |     0 |   45.276926 |   227.442451 |                 0 |            0 |     227.442451
+ 167 |          12 |          4 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
+ 168 |          12 |          4 |        2 |         2 |       1 |       60 |    19 |           0 |            0 |                 0 |            0 |              0
+ 169 |          12 |          4 |        3 |         2 |       1 |       59 |    39 |           0 |            0 |                 0 |            0 |              0
+ 170 |          12 |          4 |        4 |         2 |       1 |      100 |    54 |           0 |            0 |                 0 |            0 |              0
+ 171 |          12 |          4 |        5 |         2 |       1 |       54 |    59 |           0 |            0 |                 0 |            0 |              0
+ 172 |          12 |          4 |        6 |         3 |      60 |       60 |    40 |   42.426407 |    42.426407 |                 0 |           10 |      52.426407
+ 173 |          12 |          4 |        7 |         3 |     100 |      100 |    25 |   21.931712 |    74.358119 |          2.641881 |           10 |             87
+ 174 |          12 |          4 |        8 |         3 |      54 |       54 |    20 |   16.155494 |   103.155494 |                 0 |           10 |     113.155494
+ 175 |          12 |          4 |        9 |         3 |      59 |       59 |     0 |   40.311289 |   153.466783 |                 0 |           10 |     163.466783
+ 176 |          12 |          4 |       10 |         6 |       1 |       -1 |     0 |   47.169906 |   210.636689 |                 0 |            0 |     210.636689
+ 177 |          13 |         10 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
+ 178 |          13 |         10 |        2 |         2 |       1 |       86 |     2 |           0 |            0 |                 0 |            0 |              0
+ 179 |          13 |         10 |        3 |         2 |       1 |       90 |    27 |           0 |            0 |                 0 |            0 |              0
+ 180 |          13 |         10 |        4 |         2 |       1 |       65 |    44 |           0 |            0 |                 0 |            0 |              0
+ 181 |          13 |         10 |        5 |         2 |       1 |       53 |    47 |           0 |            0 |                 0 |            0 |              0
+ 182 |          13 |         10 |        6 |         3 |      53 |       53 |    44 |          25 |           25 |                27 |           10 |             62
+ 183 |          13 |         10 |        7 |         3 |      65 |       65 |    27 |          20 |           82 |                 0 |           10 |             92
+ 184 |          13 |         10 |        8 |         3 |      86 |       86 |    25 |   19.313208 |   111.313208 |                 0 |           10 |     121.313208
+ 185 |          13 |         10 |        9 |         3 |      90 |       90 |     0 |   18.439089 |   139.752297 |          4.247703 |           10 |            154
+ 186 |          13 |         10 |       10 |         6 |       1 |       -1 |     0 |   52.478567 |   206.478567 |                 0 |            0 |     206.478567
+ 187 |          14 |         12 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
+ 188 |          14 |         12 |        2 |         2 |       1 |        6 |    20 |           0 |            0 |                 0 |            0 |              0
+ 189 |          14 |         12 |        3 |         2 |       1 |       80 |    50 |           0 |            0 |                 0 |            0 |              0
+ 190 |          14 |         12 |        4 |         2 |       1 |        7 |    70 |           0 |            0 |                 0 |            0 |              0
+ 191 |          14 |         12 |        5 |         2 |       1 |       56 |    86 |           0 |            0 |                 0 |            0 |              0
+ 192 |          14 |         12 |        6 |         3 |       6 |        6 |    66 |   40.311289 |    40.311289 | 0.688710999999998 |           10 |             51
+ 193 |          14 |         12 |        7 |         3 |      80 |       80 |    36 |   22.022716 |    73.022716 |         15.977284 |           10 |             99
+ 194 |          14 |         12 |        8 |         3 |       7 |        7 |    16 |   13.892444 |   112.892444 |                 0 |           10 |     122.892444
+ 195 |          14 |         12 |        9 |         3 |      56 |       56 |     0 |   19.209373 |   142.101817 |                 0 |           10 |     152.101817
+ 196 |          14 |         12 |       10 |         6 |       1 |       -1 |     0 |   14.142136 |   166.243953 |                 0 |            0 |     166.243953
+ 197 |          15 |         19 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
+ 198 |          15 |         19 |        2 |         2 |       1 |       88 |    13 |           0 |            0 |                 0 |            0 |              0
+ 199 |          15 |         19 |        3 |         2 |       1 |       70 |    40 |           0 |            0 |                 0 |            0 |              0
+ 200 |          15 |         19 |        4 |         2 |       1 |       58 |    63 |           0 |            0 |                 0 |            0 |              0
+ 201 |          15 |         19 |        5 |         2 |       1 |       99 |    72 |           0 |            0 |                 0 |            0 |              0
+ 202 |          15 |         19 |        6 |         3 |      70 |       70 |    45 |    9.219544 |     9.219544 |         31.780456 |           10 |             51
+ 203 |          15 |         19 |        7 |         3 |      99 |       99 |    36 |           5 |           56 |                 0 |           10 |             66
+ 204 |          15 |         19 |        8 |         3 |      88 |       88 |    23 |   31.304952 |    97.304952 |                 0 |           10 |     107.304952
+ 205 |          15 |         19 |        9 |         3 |      58 |       58 |     0 |   18.027756 |   125.332708 |                 0 |           10 |     135.332708
+ 206 |          15 |         19 |       10 |         6 |       1 |       -1 |     0 |   26.925824 |   162.258532 |                 0 |            0 |     162.258532
+ 207 |          16 |         17 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
+ 208 |          16 |         17 |        2 |         2 |       1 |       75 |     8 |           0 |            0 |                 0 |            0 |              0
+ 209 |          16 |         17 |        3 |         2 |       1 |       98 |    43 |           0 |            0 |                 0 |            0 |              0
+ 210 |          16 |         17 |        4 |         2 |       1 |       76 |    59 |           0 |            0 |                 0 |            0 |              0
+ 211 |          16 |         17 |        5 |         3 |      76 |       76 |    43 |   57.008771 |    57.008771 |         16.991229 |           10 |             84
+ 212 |          16 |         17 |        6 |         3 |      98 |       98 |     8 |   13.038405 |    97.038405 |         22.961595 |           10 |            130
+ 213 |          16 |         17 |        7 |         3 |      75 |       75 |     0 |   16.124515 |   146.124515 |                 0 |           10 |     156.124515
+ 214 |          16 |         17 |        8 |         6 |       1 |       -1 |     0 |   36.055513 |   192.180028 |                 0 |            0 |     192.180028
+ 215 |          17 |         16 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
+ 216 |          17 |         16 |        2 |         2 |       1 |       69 |    21 |           0 |            0 |                 0 |            0 |              0
+ 217 |          17 |         16 |        3 |         2 |       1 |       79 |    48 |           0 |            0 |                 0 |            0 |              0
+ 218 |          17 |         16 |        4 |         2 |       1 |       74 |    53 |           0 |            0 |                 0 |            0 |              0
+ 219 |          17 |         16 |        5 |         3 |      74 |       74 |    48 |   39.293765 |    39.293765 |         37.706235 |           10 |             87
+ 220 |          17 |         16 |        6 |         3 |      79 |       79 |    21 |    7.211103 |    94.211103 |                 0 |           10 |     104.211103
+ 221 |          17 |         16 |        7 |         3 |      69 |       69 |     0 |   32.249031 |   136.460134 |  7.53986600000002 |           10 |            154
+ 222 |          17 |         16 |        8 |         6 |       1 |       -1 |     0 |          10 |          164 |                 0 |            0 |            164
+ 223 |          18 |          9 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
+ 224 |          18 |          9 |        2 |         2 |       1 |       62 |     9 |           0 |            0 |                 0 |            0 |              0
+ 225 |          18 |          9 |        3 |         2 |       1 |       37 |    49 |           0 |            0 |                 0 |            0 |              0
+ 226 |          18 |          9 |        4 |         2 |       1 |       45 |    59 |           0 |            0 |                 0 |            0 |              0
+ 227 |          18 |          9 |        5 |         3 |      37 |       37 |    19 |   43.011626 |    43.011626 |                 0 |           10 |      53.011626
+ 228 |          18 |          9 |        6 |         3 |      45 |       45 |     9 |   10.440307 |    63.451933 | 0.548067000000003 |           10 |             74
+ 229 |          18 |          9 |        7 |         3 |      62 |       62 |     0 |   19.723083 |    93.723083 |                 0 |           10 |     103.723083
+ 230 |          18 |          9 |        8 |         6 |       1 |       -1 |     0 |   15.811388 |   119.534471 |                 0 |            0 |     119.534471
+ 231 |          19 |         18 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
+ 232 |          19 |         18 |        2 |         2 |       1 |       91 |     6 |           0 |            0 |                 0 |            0 |              0
+ 233 |          19 |         18 |        3 |         2 |       1 |       12 |    46 |           0 |            0 |                 0 |            0 |              0
+ 234 |          19 |         18 |        4 |         3 |      12 |       12 |     6 |   33.526109 |    33.526109 |         25.473891 |           10 |             69
+ 235 |          19 |         18 |        5 |         3 |      91 |       91 |     0 |   29.832868 |    98.832868 |                 0 |           10 |     108.832868
+ 236 |          19 |         18 |        6 |         6 |       1 |       -1 |     0 |    4.242641 |   113.075509 |                 0 |            0 |     113.075509
+ 237 |          20 |         20 |        1 |         1 |       1 |       -1 |     0 |           0 |            0 |                 0 |            0 |              0
+ 238 |          20 |         20 |        2 |         2 |       1 |       83 |     9 |           0 |            0 |                 0 |            0 |              0
+ 239 |          20 |         20 |        3 |         3 |      83 |       83 |     0 |   14.764823 |    14.764823 |         27.235177 |           10 |             52
+ 240 |          20 |         20 |        4 |         6 |       1 |       -1 |     0 |   14.764823 |    66.764823 |                 0 |            0 |      66.764823
+ 241 |          -2 |          0 |        0 |        -1 |      -1 |       -1 |    -1 | 2304.305537 |           -1 |        408.022775 |         1000 |    3712.328312
+(241 rows)
+
+ROLLBACK;
+ROLLBACK
diff --git a/src/vrp_basic/test/oneDepotWrapper.test.sql b/test/vrp_basic/oneDepotWrapper.test.sql
similarity index 100%
rename from src/vrp_basic/test/oneDepotWrapper.test.sql
rename to test/vrp_basic/oneDepotWrapper.test.sql
diff --git a/src/vrp_basic/test/solomon100-optimal.png b/test/vrp_basic/solomon100-optimal.png
similarity index 100%
rename from src/vrp_basic/test/solomon100-optimal.png
rename to test/vrp_basic/solomon100-optimal.png
diff --git a/test/vrp_basic/test.conf b/test/vrp_basic/test.conf
new file mode 100644
index 0000000..f28ed3f
--- /dev/null
+++ b/test/vrp_basic/test.conf
@@ -0,0 +1,19 @@
+#!/usr/bin/perl -w
+
+%main::tests = (
+    'any' => {
+        'comment' => 'VRP Single depot test for any versions.',
+        'data' => ['../../tools/testers/vrpOneDepot.data'],
+        'tests' => [qw(
+            doc-pgr_vrpOneDepot
+            )],
+        'nottested' => [qw(
+            oneDepotWrapper
+            )],
+        'documentation' => [qw(
+            doc-pgr_vrpOneDepot
+            )]
+        },
+);
+
+1;
diff --git a/test/vrppdtw/doc-gsoc_vrppdtw.result b/test/vrppdtw/doc-gsoc_vrppdtw.result
new file mode 100644
index 0000000..c5b6e65
--- /dev/null
+++ b/test/vrppdtw/doc-gsoc_vrppdtw.result
@@ -0,0 +1,79 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+--q1
+SELECT DISTINCT(id1) FROM pgr_gsoc_vrppdtw(
+    'SELECT * FROM customer ORDER BY id', 25, 200)
+ORDER BY id1;
+ id1
+-----
+   1
+   2
+   3
+   4
+   5
+   6
+   7
+   8
+   9
+  10
+(10 rows)
+
+--q2
+SELECT count(*) FROM pgr_gsoc_vrppdtw(
+    'SELECT * FROM customer ORDER BY id', 25, 200);
+ count
+-------
+   126
+(1 row)
+
+--q3
+SELECT * FROM pgr_gsoc_vrppdtw(
+    'SELECT * FROM customer ORDER BY id', 25, 200)
+    WHERE id1 in (1, 5, 9);
+ seq | id1 | id2 |       cost
+-----+-----+-----+------------------
+   1 |   1 |   0 |                0
+   2 |   1 |  13 | 120.805843601499
+   3 |   1 |  17 | 214.805843601499
+   4 |   1 |  18 | 307.805843601499
+   5 |   1 |  19 | 402.805843601499
+   6 |   1 |  15 | 497.805843601499
+   7 |   1 |  16 | 592.805843601499
+   8 |   1 |  14 | 684.805843601499
+   9 |   1 |  12 | 777.805843601499
+  10 |   1 |  50 | 920.815276724293
+  11 |   1 |  52 | 1013.97755438446
+  12 |   1 |  49 | 1106.97755438446
+  13 |   1 |  47 | 1198.97755438446
+  14 |   1 |   0 | 1217.00531076178
+  57 |   5 |   0 |                0
+  58 |   5 |  90 | 110.615528128088
+  59 |   5 |  87 | 205.615528128088
+  60 |   5 |  86 | 296.615528128088
+  61 |   5 |  83 | 392.615528128088
+  62 |   5 |  82 | 485.615528128088
+  63 |   5 |  84 | 581.446480022934
+  64 |   5 |  85 |  674.27490714768
+  65 |   5 |  88 |  767.27490714768
+  66 |   5 |  89 | 860.103334272426
+  67 |   5 |  91 |  953.70888554789
+  68 |   5 |   0 | 976.069565322888
+ 105 |   9 |   0 |                0
+ 106 |   9 |  67 | 102.206555615734
+ 107 |   9 |  65 | 193.206555615734
+ 108 |   9 |  63 | 285.206555615734
+ 109 |   9 |  62 | 380.206555615734
+ 110 |   9 |  74 | 473.206555615734
+ 111 |   9 |  72 | 568.206555615734
+ 112 |   9 |  61 | 661.206555615734
+ 113 |   9 |  64 | 663.206555615734
+ 114 |   9 | 102 | 753.206555615734
+ 115 |   9 |  68 | 846.206555615734
+ 116 |   9 |   0 | 866.822083743822
+(38 rows)
+
+--q4
+ROLLBACK;
+ROLLBACK
diff --git a/src/vrppdtw/test/doc-gsoc_vrppdtw.test.sql b/test/vrppdtw/doc-gsoc_vrppdtw.test.sql
similarity index 100%
rename from src/vrppdtw/test/doc-gsoc_vrppdtw.test.sql
rename to test/vrppdtw/doc-gsoc_vrppdtw.test.sql
diff --git a/test/vrppdtw/test.conf b/test/vrppdtw/test.conf
new file mode 100644
index 0000000..83bb64c
--- /dev/null
+++ b/test/vrppdtw/test.conf
@@ -0,0 +1,20 @@
+#!/usr/bin/perl -w
+
+%main::tests = (
+    'any' => {
+        'comment' => 'Function test for any versions.',
+        'data' => ['../../tools/testers/vrppdtw_data.sql'],
+        'tests' => [qw(
+            )],
+        'windows' => [qw(
+            )],
+        'linux' => [qw(
+            doc-gsoc_vrppdtw
+            )],
+        'documentation' => [qw(
+            doc-gsoc_vrppdtw
+            )]
+    },
+);
+
+1;
diff --git a/test/withPoints/doc-pgr_withPoints.result b/test/withPoints/doc-pgr_withPoints.result
new file mode 100644
index 0000000..09a4218
--- /dev/null
+++ b/test/withPoints/doc-pgr_withPoints.result
@@ -0,0 +1,208 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+--e1
+SELECT * FROM pgr_withPoints(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    -1, -3);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |   -1 |    1 |  0.6 |        0
+   2 |        2 |    2 |    4 |    1 |      0.6
+   3 |        3 |    5 |   10 |    1 |      1.6
+   4 |        4 |   10 |   12 |  0.6 |      2.6
+   5 |        5 |   -3 |   -1 |    0 |      3.2
+(5 rows)
+
+--e2
+SELECT * FROM pgr_withPoints(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    -1, 3,
+    details := true);
+ seq | path_seq | node | edge | cost | agg_cost
+-----+----------+------+------+------+----------
+   1 |        1 |   -1 |    1 |  0.6 |        0
+   2 |        2 |    2 |    4 |  0.7 |      0.6
+   3 |        3 |   -6 |    4 |  0.3 |      1.3
+   4 |        4 |    5 |    8 |    1 |      1.6
+   5 |        5 |    6 |    9 |    1 |      2.6
+   6 |        6 |    9 |   16 |    1 |      3.6
+   7 |        7 |    4 |    3 |    1 |      4.6
+   8 |        8 |    3 |   -1 |    0 |      5.6
+(8 rows)
+
+--e3
+SELECT * FROM pgr_withPoints(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    -1, ARRAY[-3,5]);
+ seq | path_seq | end_pid | node | edge | cost | agg_cost
+-----+----------+---------+------+------+------+----------
+   1 |        1 |      -3 |   -1 |    1 |  0.6 |        0
+   2 |        2 |      -3 |    2 |    4 |    1 |      0.6
+   3 |        3 |      -3 |    5 |   10 |    1 |      1.6
+   4 |        4 |      -3 |   10 |   12 |  0.6 |      2.6
+   5 |        5 |      -3 |   -3 |   -1 |    0 |      3.2
+   6 |        1 |       5 |   -1 |    1 |  0.6 |        0
+   7 |        2 |       5 |    2 |    4 |    1 |      0.6
+   8 |        3 |       5 |    5 |   -1 |    0 |      1.6
+(8 rows)
+
+--e4
+SELECT * FROM pgr_withPoints(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    ARRAY[-1,2], -3);
+ seq | path_seq | start_pid | node | edge | cost | agg_cost
+-----+----------+-----------+------+------+------+----------
+   1 |        1 |        -1 |   -1 |    1 |  0.6 |        0
+   2 |        2 |        -1 |    2 |    4 |    1 |      0.6
+   3 |        3 |        -1 |    5 |   10 |    1 |      1.6
+   4 |        4 |        -1 |   10 |   12 |  0.6 |      2.6
+   5 |        5 |        -1 |   -3 |   -1 |    0 |      3.2
+   6 |        1 |         2 |    2 |    4 |    1 |        0
+   7 |        2 |         2 |    5 |   10 |    1 |        1
+   8 |        3 |         2 |   10 |   12 |  0.6 |        2
+   9 |        4 |         2 |   -3 |   -1 |    0 |      2.6
+(9 rows)
+
+--e5
+SELECT * FROM pgr_withPoints(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    ARRAY[-1,2], ARRAY[-3,7]);
+ seq | path_seq | start_pid | end_pid | node | edge | cost | agg_cost
+-----+----------+-----------+---------+------+------+------+----------
+   1 |        1 |        -1 |      -3 |   -1 |    1 |  0.6 |        0
+   2 |        2 |        -1 |      -3 |    2 |    4 |    1 |      0.6
+   3 |        3 |        -1 |      -3 |    5 |   10 |    1 |      1.6
+   4 |        4 |        -1 |      -3 |   10 |   12 |  0.6 |      2.6
+   5 |        5 |        -1 |      -3 |   -3 |   -1 |    0 |      3.2
+   6 |        1 |        -1 |       7 |   -1 |    1 |  0.6 |        0
+   7 |        2 |        -1 |       7 |    2 |    4 |    1 |      0.6
+   8 |        3 |        -1 |       7 |    5 |    7 |    1 |      1.6
+   9 |        4 |        -1 |       7 |    8 |    6 |    1 |      2.6
+  10 |        5 |        -1 |       7 |    7 |   -1 |    0 |      3.6
+  11 |        1 |         2 |      -3 |    2 |    4 |    1 |        0
+  12 |        2 |         2 |      -3 |    5 |   10 |    1 |        1
+  13 |        3 |         2 |      -3 |   10 |   12 |  0.6 |        2
+  14 |        4 |         2 |      -3 |   -3 |   -1 |    0 |      2.6
+  15 |        1 |         2 |       7 |    2 |    4 |    1 |        0
+  16 |        2 |         2 |       7 |    5 |    7 |    1 |        1
+  17 |        3 |         2 |       7 |    8 |    6 |    1 |        2
+  18 |        4 |         2 |       7 |    7 |   -1 |    0 |        3
+(18 rows)
+
+--q2
+SELECT ('(' || start_pid || ' => ' || end_pid ||') at ' || path_seq || 'th step:')::TEXT AS path_at,
+        CASE WHEN edge = -1 THEN ' visits'
+            ELSE ' passes in front of'
+        END as status,
+        CASE WHEN node < 0 THEN 'Point'
+            ELSE 'Vertex'
+        END as is_a,
+        abs(node) as id
+    FROM pgr_withPoints(
+        'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+        'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+        ARRAY[1,-1], ARRAY[-2,-3,-6,3,6],
+        driving_side := 'r',
+        details := true)
+    WHERE node IN (-6,6);
+         path_at         |       status        |  is_a  | id
+-------------------------+---------------------+--------+----
+ (-1 => -6) at 4th step: |  visits             | Point  |  6
+ (-1 => -3) at 4th step: |  passes in front of | Point  |  6
+ (-1 => -2) at 4th step: |  passes in front of | Point  |  6
+ (-1 => -2) at 6th step: |  passes in front of | Vertex |  6
+ (-1 => 3) at 4th step:  |  passes in front of | Point  |  6
+ (-1 => 3) at 6th step:  |  passes in front of | Vertex |  6
+ (-1 => 6) at 4th step:  |  passes in front of | Point  |  6
+ (-1 => 6) at 6th step:  |  visits             | Vertex |  6
+ (1 => -6) at 3th step:  |  visits             | Point  |  6
+ (1 => -3) at 3th step:  |  passes in front of | Point  |  6
+ (1 => -2) at 3th step:  |  passes in front of | Point  |  6
+ (1 => -2) at 5th step:  |  passes in front of | Vertex |  6
+ (1 => 3) at 3th step:   |  passes in front of | Point  |  6
+ (1 => 3) at 5th step:   |  passes in front of | Vertex |  6
+ (1 => 6) at 3th step:   |  passes in front of | Point  |  6
+ (1 => 6) at 5th step:   |  visits             | Vertex |  6
+(16 rows)
+
+--q3
+SELECT ('(' || start_pid || ' => ' || end_pid ||') at ' || path_seq || 'th step:')::TEXT AS path_at,
+        CASE WHEN edge = -1 THEN ' visits'
+            ELSE ' passes in front of'
+        END as status,
+        CASE WHEN node < 0 THEN 'Point'
+            ELSE 'Vertex'
+        END as is_a,
+        abs(node) as id
+    FROM pgr_withPoints(
+        'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+        'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+        ARRAY[1,-1], ARRAY[-2,-3,-6,3,6],
+        driving_side := 'l',
+        details := true)
+    WHERE node IN (-6,6);
+         path_at         |       status        |  is_a  | id
+-------------------------+---------------------+--------+----
+ (-1 => -6) at 3th step: |  visits             | Point  |  6
+ (-1 => -3) at 3th step: |  passes in front of | Point  |  6
+ (-1 => -2) at 3th step: |  passes in front of | Point  |  6
+ (-1 => -2) at 5th step: |  passes in front of | Vertex |  6
+ (-1 => 3) at 3th step:  |  passes in front of | Point  |  6
+ (-1 => 3) at 5th step:  |  passes in front of | Vertex |  6
+ (-1 => 6) at 3th step:  |  passes in front of | Point  |  6
+ (-1 => 6) at 5th step:  |  visits             | Vertex |  6
+ (1 => -6) at 4th step:  |  visits             | Point  |  6
+ (1 => -3) at 4th step:  |  passes in front of | Point  |  6
+ (1 => -2) at 4th step:  |  passes in front of | Point  |  6
+ (1 => -2) at 6th step:  |  passes in front of | Vertex |  6
+ (1 => 3) at 4th step:   |  passes in front of | Point  |  6
+ (1 => 3) at 6th step:   |  passes in front of | Vertex |  6
+ (1 => 6) at 4th step:   |  passes in front of | Point  |  6
+ (1 => 6) at 6th step:   |  visits             | Vertex |  6
+(16 rows)
+
+--q4
+SELECT * FROM pgr_withPoints(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    ARRAY[-1,2], ARRAY[-3,7],
+    directed := false,
+    details := true);
+ seq | path_seq | start_pid | end_pid | node | edge | cost | agg_cost
+-----+----------+-----------+---------+------+------+------+----------
+   1 |        1 |        -1 |      -3 |   -1 |    1 |  0.6 |        0
+   2 |        2 |        -1 |      -3 |    2 |    4 |  0.7 |      0.6
+   3 |        3 |        -1 |      -3 |   -6 |    4 |  0.3 |      1.3
+   4 |        4 |        -1 |      -3 |    5 |   10 |    1 |      1.6
+   5 |        5 |        -1 |      -3 |   10 |   12 |  0.6 |      2.6
+   6 |        6 |        -1 |      -3 |   -3 |   -1 |    0 |      3.2
+   7 |        1 |        -1 |       7 |   -1 |    1 |  0.6 |        0
+   8 |        2 |        -1 |       7 |    2 |    4 |  0.7 |      0.6
+   9 |        3 |        -1 |       7 |   -6 |    4 |  0.3 |      1.3
+  10 |        4 |        -1 |       7 |    5 |    7 |    1 |      1.6
+  11 |        5 |        -1 |       7 |    8 |    6 |  0.7 |      2.6
+  12 |        6 |        -1 |       7 |   -4 |    6 |  0.3 |      3.3
+  13 |        7 |        -1 |       7 |    7 |   -1 |    0 |      3.6
+  14 |        1 |         2 |      -3 |    2 |    4 |  0.7 |        0
+  15 |        2 |         2 |      -3 |   -6 |    4 |  0.3 |      0.7
+  16 |        3 |         2 |      -3 |    5 |   10 |    1 |        1
+  17 |        4 |         2 |      -3 |   10 |   12 |  0.6 |        2
+  18 |        5 |         2 |      -3 |   -3 |   -1 |    0 |      2.6
+  19 |        1 |         2 |       7 |    2 |    4 |  0.7 |        0
+  20 |        2 |         2 |       7 |   -6 |    4 |  0.3 |      0.7
+  21 |        3 |         2 |       7 |    5 |    7 |    1 |        1
+  22 |        4 |         2 |       7 |    8 |    6 |  0.7 |        2
+  23 |        5 |         2 |       7 |   -4 |    6 |  0.3 |      2.7
+  24 |        6 |         2 |       7 |    7 |   -1 |    0 |        3
+(24 rows)
+
+--q5
+ROLLBACK;
+ROLLBACK
diff --git a/src/withPoints/test/doc-pgr_withPoints.test.sql b/test/withPoints/doc-pgr_withPoints.test.sql
similarity index 100%
rename from src/withPoints/test/doc-pgr_withPoints.test.sql
rename to test/withPoints/doc-pgr_withPoints.test.sql
diff --git a/test/withPoints/doc-pgr_withPointsCost.result b/test/withPoints/doc-pgr_withPointsCost.result
new file mode 100644
index 0000000..966aea0
--- /dev/null
+++ b/test/withPoints/doc-pgr_withPointsCost.result
@@ -0,0 +1,105 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+--e1
+SELECT * FROM pgr_withPointsCost(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    -1, -3);
+ start_pid | end_pid | agg_cost
+-----------+---------+----------
+        -1 |      -3 |      3.2
+(1 row)
+
+--e2
+SELECT * FROM pgr_withPointsCost(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    -1, 3,
+    directed := false);
+ start_pid | end_pid | agg_cost
+-----------+---------+----------
+        -1 |       3 |      1.6
+(1 row)
+
+--e3
+SELECT * FROM pgr_withPointsCost(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    -1, ARRAY[-3,5]);
+ start_pid | end_pid | agg_cost
+-----------+---------+----------
+        -1 |      -3 |      3.2
+        -1 |       5 |      1.6
+(2 rows)
+
+--e4
+SELECT * FROM pgr_withPointsCost(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    ARRAY[-1,2], -3);
+ start_pid | end_pid | agg_cost
+-----------+---------+----------
+        -1 |      -3 |      3.2
+         2 |      -3 |      2.6
+(2 rows)
+
+--e5
+SELECT * FROM pgr_withPointsCost(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    ARRAY[-1,2], ARRAY[-3,7]);
+ start_pid | end_pid | agg_cost
+-----------+---------+----------
+        -1 |      -3 |      3.2
+        -1 |       7 |      3.6
+         2 |      -3 |      2.6
+         2 |       7 |        3
+(4 rows)
+
+--q2
+SELECT * FROM pgr_withPointsCost(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    ARRAY[-1,2], ARRAY[-3,7],
+    driving_side := 'l');
+ start_pid | end_pid | agg_cost
+-----------+---------+----------
+        -1 |      -3 |      3.2
+        -1 |       7 |      3.6
+         2 |      -3 |      2.6
+         2 |       7 |        3
+(4 rows)
+
+--q3
+SELECT * FROM pgr_withPointsCost(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    ARRAY[-1,2], ARRAY[-3,7],
+    driving_side := 'r');
+ start_pid | end_pid | agg_cost
+-----------+---------+----------
+        -1 |      -3 |        4
+        -1 |       7 |      4.4
+         2 |      -3 |      2.6
+         2 |       7 |        3
+(4 rows)
+
+--q4
+SELECT * FROM pgr_withPointsCost(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    ARRAY[-1,2], ARRAY[-3,7],
+    driving_side := 'b');
+ start_pid | end_pid | agg_cost
+-----------+---------+----------
+        -1 |      -3 |      3.2
+        -1 |       7 |      3.6
+         2 |      -3 |      2.6
+         2 |       7 |        3
+(4 rows)
+
+--q5
+ROLLBACK;
+ROLLBACK
diff --git a/src/withPoints/test/doc-pgr_withPointsCost.test.sql b/test/withPoints/doc-pgr_withPointsCost.test.sql
similarity index 100%
rename from src/withPoints/test/doc-pgr_withPointsCost.test.sql
rename to test/withPoints/doc-pgr_withPointsCost.test.sql
diff --git a/test/withPoints/doc-pgr_withPointsDD.result b/test/withPoints/doc-pgr_withPointsDD.result
new file mode 100644
index 0000000..3dc93e0
--- /dev/null
+++ b/test/withPoints/doc-pgr_withPointsDD.result
@@ -0,0 +1,96 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+--q1
+SELECT * FROM pgr_withPointsDD(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    -1, 3.8);
+ seq | node | edge | cost | agg_cost
+-----+------+------+------+----------
+   1 |   -1 |   -1 |    0 |        0
+   2 |    1 |    1 |  0.4 |      0.4
+   3 |    2 |    1 |  0.6 |      0.6
+   4 |    5 |    4 |    1 |      1.6
+   5 |    6 |    8 |    1 |      2.6
+   6 |    8 |    7 |    1 |      2.6
+   7 |   10 |   10 |    1 |      2.6
+   8 |    7 |    6 |    1 |      3.6
+   9 |    9 |    9 |    1 |      3.6
+  10 |   11 |   11 |    1 |      3.6
+  11 |   13 |   14 |    1 |      3.6
+(11 rows)
+
+--q2
+SELECT * FROM pgr_withPointsDD(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    -1, 3.8,
+    driving_side := 'r',
+    details := true);
+ seq | node | edge | cost | agg_cost
+-----+------+------+------+----------
+   1 |   -1 |   -1 |    0 |        0
+   2 |    1 |    1 |  0.4 |      0.4
+   3 |    2 |    1 |    1 |      1.4
+   4 |   -6 |    4 |  0.7 |      2.1
+   5 |    5 |    4 |  0.3 |      2.4
+   6 |    6 |    8 |    1 |      3.4
+   7 |    8 |    7 |    1 |      3.4
+   8 |   10 |   10 |    1 |      3.4
+(8 rows)
+
+--q3
+SELECT * FROM pgr_withPointsDD(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    -1, 3.8,
+    driving_side := 'l',
+    details := true);
+ seq | node | edge | cost | agg_cost
+-----+------+------+------+----------
+   1 |   -1 |   -1 |    0 |        0
+   2 |    2 |    1 |  0.6 |      0.6
+   3 |   -6 |    4 |  0.7 |      1.3
+   4 |    5 |    4 |  0.3 |      1.6
+   5 |    1 |    1 |    1 |      1.6
+   6 |    6 |    8 |    1 |      2.6
+   7 |    8 |    7 |    1 |      2.6
+   8 |   10 |   10 |    1 |      2.6
+   9 |   -3 |   12 |  0.6 |      3.2
+  10 |   -4 |    6 |  0.7 |      3.3
+  11 |    7 |    6 |  0.3 |      3.6
+  12 |    9 |    9 |    1 |      3.6
+  13 |   11 |   11 |    1 |      3.6
+  14 |   13 |   14 |    1 |      3.6
+(14 rows)
+
+--q4
+SELECT * FROM pgr_withPointsDD(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    -1, 3.8,
+    driving_side := 'b',
+    details := true);
+ seq | node | edge | cost | agg_cost
+-----+------+------+------+----------
+   1 |   -1 |   -1 |    0 |        0
+   2 |    1 |    1 |  0.4 |      0.4
+   3 |    2 |    1 |  0.6 |      0.6
+   4 |   -6 |    4 |  0.7 |      1.3
+   5 |    5 |    4 |  0.3 |      1.6
+   6 |    6 |    8 |    1 |      2.6
+   7 |    8 |    7 |    1 |      2.6
+   8 |   10 |   10 |    1 |      2.6
+   9 |   -3 |   12 |  0.6 |      3.2
+  10 |   -4 |    6 |  0.7 |      3.3
+  11 |    7 |    6 |  0.3 |      3.6
+  12 |    9 |    9 |    1 |      3.6
+  13 |   11 |   11 |    1 |      3.6
+  14 |   13 |   14 |    1 |      3.6
+(14 rows)
+
+--q5
+ROLLBACK;
+ROLLBACK
diff --git a/src/withPoints/test/doc-pgr_withPointsDD.test.sql b/test/withPoints/doc-pgr_withPointsDD.test.sql
similarity index 100%
rename from src/withPoints/test/doc-pgr_withPointsDD.test.sql
rename to test/withPoints/doc-pgr_withPointsDD.test.sql
diff --git a/src/withPoints/test/doc-pgr_withPointsKSP-cygwin.result b/test/withPoints/doc-pgr_withPointsKSP-cygwin.result
similarity index 100%
rename from src/withPoints/test/doc-pgr_withPointsKSP-cygwin.result
rename to test/withPoints/doc-pgr_withPointsKSP-cygwin.result
diff --git a/src/withPoints/test/doc-pgr_withPointsKSP-cygwin.test.sql b/test/withPoints/doc-pgr_withPointsKSP-cygwin.test.sql
similarity index 100%
rename from src/withPoints/test/doc-pgr_withPointsKSP-cygwin.test.sql
rename to test/withPoints/doc-pgr_withPointsKSP-cygwin.test.sql
diff --git a/test/withPoints/doc-pgr_withPointsKSP.result b/test/withPoints/doc-pgr_withPointsKSP.result
new file mode 100644
index 0000000..095d4c9
--- /dev/null
+++ b/test/withPoints/doc-pgr_withPointsKSP.result
@@ -0,0 +1,119 @@
+BEGIN;
+BEGIN
+SET client_min_messages TO NOTICE;
+SET
+--q1
+SELECT * FROM pgr_withPointsKSP(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    -1, -2, 2);
+ seq | path_id | path_seq | node | edge | cost | agg_cost
+-----+---------+----------+------+------+------+----------
+   1 |       1 |        1 |   -1 |    1 |  0.6 |        0
+   2 |       1 |        2 |    2 |    4 |    1 |      0.6
+   3 |       1 |        3 |    5 |    8 |    1 |      1.6
+   4 |       1 |        4 |    6 |    9 |    1 |      2.6
+   5 |       1 |        5 |    9 |   15 |  0.4 |      3.6
+   6 |       1 |        6 |   -2 |   -1 |    0 |        4
+   7 |       2 |        1 |   -1 |    1 |  0.6 |        0
+   8 |       2 |        2 |    2 |    4 |    1 |      0.6
+   9 |       2 |        3 |    5 |    8 |    1 |      1.6
+  10 |       2 |        4 |    6 |   11 |    1 |      2.6
+  11 |       2 |        5 |   11 |   13 |    1 |      3.6
+  12 |       2 |        6 |   12 |   15 |  0.6 |      4.6
+  13 |       2 |        7 |   -2 |   -1 |    0 |      5.2
+(13 rows)
+
+--q2
+SELECT * FROM pgr_withPointsKSP(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    -1, 6, 2, details := true);
+ seq | path_id | path_seq | node | edge | cost | agg_cost
+-----+---------+----------+------+------+------+----------
+   1 |       1 |        1 |   -1 |    1 |  0.6 |        0
+   2 |       1 |        2 |    2 |    4 |  0.7 |      0.6
+   3 |       1 |        3 |   -6 |    4 |  0.3 |      1.3
+   4 |       1 |        4 |    5 |    8 |    1 |      1.6
+   5 |       1 |        5 |    6 |   -1 |    0 |      2.6
+   6 |       2 |        1 |   -1 |    1 |  0.6 |        0
+   7 |       2 |        2 |    2 |    4 |  0.7 |      0.6
+   8 |       2 |        3 |   -6 |    4 |  0.3 |      1.3
+   9 |       2 |        4 |    5 |   10 |    1 |      1.6
+  10 |       2 |        5 |   10 |   12 |  0.6 |      2.6
+  11 |       2 |        6 |   -3 |   12 |  0.4 |      3.2
+  12 |       2 |        7 |   11 |   13 |    1 |      3.6
+  13 |       2 |        8 |   12 |   15 |  0.6 |      4.6
+  14 |       2 |        9 |   -2 |   15 |  0.4 |      5.2
+  15 |       2 |       10 |    9 |    9 |    1 |      5.6
+  16 |       2 |       11 |    6 |   -1 |    0 |      6.6
+(16 rows)
+
+--q3
+SELECT * FROM pgr_withPointsKSP(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    -1, -2, 2,
+    driving_side := 'l', details := true);
+ seq | path_id | path_seq | node | edge | cost | agg_cost
+-----+---------+----------+------+------+------+----------
+   1 |       1 |        1 |   -1 |    1 |  0.6 |        0
+   2 |       1 |        2 |    2 |    4 |  0.7 |      0.6
+   3 |       1 |        3 |   -6 |    4 |  0.3 |      1.3
+   4 |       1 |        4 |    5 |    8 |    1 |      1.6
+   5 |       1 |        5 |    6 |    9 |    1 |      2.6
+   6 |       1 |        6 |    9 |   15 |    1 |      3.6
+   7 |       1 |        7 |   12 |   15 |  0.6 |      4.6
+   8 |       1 |        8 |   -2 |   -1 |    0 |      5.2
+   9 |       2 |        1 |   -1 |    1 |  0.6 |        0
+  10 |       2 |        2 |    2 |    4 |  0.7 |      0.6
+  11 |       2 |        3 |   -6 |    4 |  0.3 |      1.3
+  12 |       2 |        4 |    5 |    8 |    1 |      1.6
+  13 |       2 |        5 |    6 |   11 |    1 |      2.6
+  14 |       2 |        6 |   11 |   13 |    1 |      3.6
+  15 |       2 |        7 |   12 |   15 |  0.6 |      4.6
+  16 |       2 |        8 |   -2 |   -1 |    0 |      5.2
+(16 rows)
+
+--q4
+SELECT * FROM pgr_withPointsKSP(
+    'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
+    'SELECT pid, edge_id, fraction, side from pointsOfInterest',
+    -1, -2, 2,
+    heap_paths := true, driving_side := 'r', details := true);
+ seq | path_id | path_seq | node | edge | cost | agg_cost
+-----+---------+----------+------+------+------+----------
+   1 |       1 |        1 |   -1 |    1 |  0.4 |        0
+   2 |       1 |        2 |    1 |    1 |    1 |      0.4
+   3 |       1 |        3 |    2 |    4 |  0.7 |      1.4
+   4 |       1 |        4 |   -6 |    4 |  0.3 |      2.1
+   5 |       1 |        5 |    5 |    8 |    1 |      2.4
+   6 |       1 |        6 |    6 |    9 |    1 |      3.4
+   7 |       1 |        7 |    9 |   15 |  0.4 |      4.4
+   8 |       1 |        8 |   -2 |   -1 |    0 |      4.8
+   9 |       2 |        1 |   -1 |    1 |  0.4 |        0
+  10 |       2 |        2 |    1 |    1 |    1 |      0.4
+  11 |       2 |        3 |    2 |    4 |  0.7 |      1.4
+  12 |       2 |        4 |   -6 |    4 |  0.3 |      2.1
+  13 |       2 |        5 |    5 |    8 |    1 |      2.4
+  14 |       2 |        6 |    6 |   11 |    1 |      3.4
+  15 |       2 |        7 |   11 |   13 |    1 |      4.4
+  16 |       2 |        8 |   12 |   15 |    1 |      5.4
+  17 |       2 |        9 |    9 |   15 |  0.4 |      6.4
+  18 |       2 |       10 |   -2 |   -1 |    0 |      6.8
+  19 |       3 |        1 |   -1 |    1 |  0.4 |        0
+  20 |       3 |        2 |    1 |    1 |    1 |      0.4
+  21 |       3 |        3 |    2 |    4 |  0.7 |      1.4
+  22 |       3 |        4 |   -6 |    4 |  0.3 |      2.1
+  23 |       3 |        5 |    5 |   10 |    1 |      2.4
+  24 |       3 |        6 |   10 |   12 |  0.6 |      3.4
+  25 |       3 |        7 |   -3 |   12 |  0.4 |        4
+  26 |       3 |        8 |   11 |   13 |    1 |      4.4
+  27 |       3 |        9 |   12 |   15 |    1 |      5.4
+  28 |       3 |       10 |    9 |   15 |  0.4 |      6.4
+  29 |       3 |       11 |   -2 |   -1 |    0 |      6.8
+(29 rows)
+
+--q5
+ROLLBACK;
+ROLLBACK
diff --git a/src/withPoints/test/doc-pgr_withPointsKSP.test.sql b/test/withPoints/doc-pgr_withPointsKSP.test.sql
similarity index 100%
rename from src/withPoints/test/doc-pgr_withPointsKSP.test.sql
rename to test/withPoints/doc-pgr_withPointsKSP.test.sql
diff --git a/src/withPoints/test/doc-pgr_withPointsVia.result b/test/withPoints/doc-pgr_withPointsVia.result
similarity index 100%
rename from src/withPoints/test/doc-pgr_withPointsVia.result
rename to test/withPoints/doc-pgr_withPointsVia.result
diff --git a/src/withPoints/test/doc-pgr_withPointsVia.test.sql b/test/withPoints/doc-pgr_withPointsVia.test.sql
similarity index 100%
rename from src/withPoints/test/doc-pgr_withPointsVia.test.sql
rename to test/withPoints/doc-pgr_withPointsVia.test.sql
diff --git a/src/withPoints/test/test.conf b/test/withPoints/test.conf
similarity index 100%
rename from src/withPoints/test/test.conf
rename to test/withPoints/test.conf
diff --git a/tools/NOTES.txt b/tools/NOTES.txt
index 34eeb53..5a2ac3a 100644
--- a/tools/NOTES.txt
+++ b/tools/NOTES.txt
@@ -110,7 +110,7 @@ cd gaul-devel-0.1849-0
 # Edit "util/gaul/gaul_config.h" and "util/gaul/gaul_config_win.h"
 # define FUNCPROTO __declspec (dllimport)
 #        -> # define FUNCPROTO
-                    
+
 make
 #*** If "values.h: No such file or directory" error occurred, execute as follows.
 #*** $ touch /mingw/x86_64-w64-mingw32/include/values.h
@@ -162,4 +162,4 @@ BINDIR=`pg_config --bindir`
 echo "run --single -E -d 3 -D /etc/postgresql/9.2/main/ test_apsp"
 echo "select (r).vertex_id, (r).edge_id, round((r).cost::numeric, 6) from ( select pgr_bd_dijkstra('select * from bdd_ways'::text, 6585, 8247, true, true) as r ) as foo;"
 
-sudo -u postgres gdb $BINDIR/postgres 
+sudo -u postgres gdb $BINDIR/postgres
diff --git a/tools/clean/clean.sh b/tools/clean/clean.sh
deleted file mode 100644
index c9567eb..0000000
--- a/tools/clean/clean.sh
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/bin/sh
-# ------------------------------------------------------------------------------
-#
-# Basic common coding style errors cleaning
-# Copyright(c) pgRouting Contributors
-#
-# -------- USE
-#
-# ./path/to/here/clean <extension>
-#
-# Example
-# ./path/to/here/clean cpp
-# ------------------------------------------------------------------------------
-
-
-EXTENSION=$1
-
-echo $EXTENSION
-# remove trailing spaces
-perl -pi -e 's/\s+$//' *.$EXTENSION
-
-# " )" -> ")"
-perl -pi -e 's/\s\+\)/)/g' *.$EXTENSION
-# " (" -> "("
-perl -pi -e 's/(\S)\s\+\(/$1(/g' *.$EXTENSION
-
-# add a space before & after =
-perl -pi -e 's/(\S)=/$1 = /g' *.$EXTENSION
-
-#fix >= == <= != += -= *=
-perl -pi -e 's/(\*|!|\+|-|<|=|>) =/$1=/g' *.$EXTENSION
-
-# add a space after: , << 
-perl -pi -e 's/(,|<<)(\S)/$1 $2/g' *.$EXTENSION
-perl -pi -e 's/(,|<<|=)[ ]+$/$1/' *.$EXTENSION
-perl -pi -e 's/(,|<<|=) +/$1 /g' *.$EXTENSION
-
-# add a space around: && ||
-perl -pi -e 's/(&&|\|\|)/ $1 /g' *.$EXTENSION
-
-# "( " -> "("
-perl -pi -e 's/\(\s\+/(/g' *.$EXTENSION
-
-# Missing space before {
-perl -pi -e 's/(\S){/$1 {/g' *.$EXTENSION
-
-
-# add a space before: <<, ==, <=, >=
-perl -pi -e 's/(\S)(<<|<=|==|>=)/$1 $2/g' *.$EXTENSION
-
-# 2 spaces -> 1 space
-perl -pi -e 's/(\S+)  (\S+)/$1 $2/g' *.$EXTENSION
-
-# At least two spaces is best between code and comments
-perl -pi -e 's/(\S+) \/\//$1  \/\/ /g' *.$EXTENSION
-
-# if( for(
-perl -pi -e 's/\s(if|for|while)\(/ $1 \(/g' *.$EXTENSION
-
-# "( " -> "("
-perl -pi -e 's/\(\s\+/(/g' *.$EXTENSION
-
-# remove trailing spaces
-perl -pi -e 's/\s\+$//' *.$EXTENSION
-perl -pi -e 's/ +$//' *.$EXTENSION
-
diff --git a/tools/developer/run.sh b/tools/developer/run.sh
index 7514469..eb42398 100755
--- a/tools/developer/run.sh
+++ b/tools/developer/run.sh
@@ -1,48 +1,95 @@
 #!/bin/bash
 
-#
-# base script for developers
-# copy to the root of the repository
-# 
-
 set -e
 
+
+# This run.sh is intended for 2.6.0
 if [ -z $1 ]; then
-    echo "version missing"
-    exit 1;
+    VERSION="2.6.0"
+else
+    VERSION=$1
 fi
 
-VERSION=$1
-
+# when more than one postgres version is installed on the computer
+PGSQL_VER="9.5"
+PGPORT=5432
 
-function test_compile {                                                                                                                                                                                                          
+function test_compile {
 
 echo ------------------------------------
 echo ------------------------------------
 echo Compiling with $1
 echo ------------------------------------
 
-sudo update-alternatives --set gcc /usr/bin/gcc-$1
+#sudo update-alternatives --set gcc /usr/bin/gcc-$1
 
 cd build/
-# Release RelWithDebInfo MinSizeRel Debug
-cmake  -DDOC_USE_BOOTSTRAP=ON -DWITH_DOC=ON -DBUILD_DOXY=ON -DCMAKE_BUILD_TYPE=Debug ..
 
+# Using all defaults
+#cmake ..
+
+# Options Release RelWithDebInfo MinSizeRel Debug
+#cmake  -DCMAKE_BUILD_TYPE=Debug ..
+
+# with documentation
+#cmake  -DDOC_USE_BOOTSTRAP=ON -DWITH_DOC=ON -DBUILD_DOXY=ON -DPgRouting_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug ..
+
+# when more than one postgres version is installed on the computer
+cmake  -DPOSTGRESQL_BIN=/usr/lib/postgresql/$PGSQL_VER/bin -DDOC_USE_BOOTSTRAP=ON -DWITH_DOC=ON -DBUILD_DOXY=ON  -DBUILD_LATEX=ON  -DCMAKE_BUILD_TYPE=Debug ..  
 
-#cmake  -DWITH_DOC=ON -DBUILD_DOXY=ON ..
-#cmake -DCMAKE_VERBOSE_MAKEFILE=ON ..
-make doxy
-make doc
 make
 sudo make install
 cd ..
 
 
-#tools/testers/algorithm-tester.pl -alg dijkstra
-#tools/testers/algorithm-tester.pl -alg dijkstra -debug1 >result.txt
+echo
+echo --------------------------------------------
+echo  Execute documentation queries for a particular directory
+echo --------------------------------------------
+
+# - when one postgres version is installed on the computer
+tools/testers/algorithm-tester.pl  -alg withPoints -documentation
+
+# - when more than one postgres version is installed on the computer
+tools/testers/algorithm-tester.pl  -alg withPoints -documentation  -pgport $PGPORT 
+
+
+echo
+echo --------------------------------------------
+echo  Execute pgTap test  particular directory
+echo --------------------------------------------
 
-#  Verify with git diff that signatures did not change
-#sh tools/release-scripts/get_signatures.sh $VERSION ____sigs_routing____ sql/sigs
+# - when one postgres version is installed on the computer
+tools/developer/taptest.sh  withPoints/*
+
+# - when more than one postgres version is installed on the computer
+tools/developer/taptest.sh  withPoints/* -p $PGPORT
+
+echo
+echo --------------------------------------------
+echo  Execute pgTap test  particular file
+echo --------------------------------------------
+
+# - when one postgres version is installed on the computer
+tools/developer/taptest.sh  withPoints/undirected_equalityDD.sql
+
+# - when more than one postgres version is installed on the computer
+tools/developer/taptest.sh  withPoints/undirected_equalityDD.sql  -p $PGPORT
+
+
+
+echo
+echo --------------------------------------------
+echo  Verify with signatures did not change
+echo --------------------------------------------
+
+# - when one postgres version is installed on the computer
+sh tools/release-scripts/get_signatures.sh $VERSION ____sigs_routing____ sql/sigs
+
+# when more than one postgres version is installed on the computer
+sh tools/release-scripts/get_signatures.sh $VERSION ____sigs_routing____ sql/sigs -p $PGPORT
+
+# this is for version <2.6.0
 #cp build/sql/pgrouting--*.sql tools/sql-update-scripts
 if [[ $(git status | grep 'pgrouting--') ]]; then
     echo "**************************************************"
@@ -53,48 +100,82 @@ if [[ $(git status | grep 'pgrouting--') ]]; then
     git diff
 fi
 
+exit 0
+
+################################
+################################
+## checks all the repository
+#
+#  the rest of the script use PGPORT variable
+################################
+################################
+echo
+echo --------------------------------------------
+echo  Verify NEWS
+echo --------------------------------------------
+release-scripts/notes2news.pl
+if [[ $(git status | grep 'NEWS') ]]; then
+    echo "**************************************************"
+    echo "           WARNING"
+    echo "the signatures changed, copying generated files"
+    echo "Plese verify the changes are minimal"
+    echo "**************************************************"
+    git diff NEWS
+fi
+
+########################################################
+#  Execute documentation queries for the whole project
+########################################################
+tools/testers/algorithm-tester.pl  -documentation  -pgport $PGPORT 
+
+# update the trsp README.md file
+mv doc/queries/trsp_notes_v${VERSION}.queries doc/doc/trsp/README.md
+cp test/trsp/trsp_notes_v${VERSION}.result doc/trsp/README.md
+
+if [[ $(git status | grep 'trsp_notes') ]]; then
+    echo "**************************************************"
+    echo "           WARNING"
+    echo "The trsp notes changed"
+    echo "Plese verify the changes are OK"
+    echo "**************************************************"
+    git diff
+fi
+
+
+
+
+tools/testers/algorithm-tester.pl -documentation  -pgport $PGPORT 
+tools/testers/algorithm-tester.pl -pgport $PGPORT
 
-tools/testers/algorithm-tester.pl -documentation
 cd build
 rm -rf doc/*
 make doc
+rm -rf doxygen/*
+make doxy
 cd ..
 
+########################################################
+# pgTap testing only a particular directory and on a particular file:
+########################################################
 
-tools/testers/algorithm-tester.pl
-
-dropdb --if-exists ___pgr___test___
-createdb  ___pgr___test___
-sh ./tools/testers/pg_prove_tests.sh vicky 
-dropdb  ___pgr___test___
+dropdb --if-exists -p $PGPORT ___pgr___test___
+createdb  -p $PGPORT ___pgr___test___
+echo $PGPORT
+sh ./tools/testers/pg_prove_tests.sh vicky $PGPORT
+dropdb  -p $PGPORT ___pgr___test___
 
 #tools/testers/update-tester.sh 
 
 }
 
-#test_compile 4.4
+# Uncomment what you need
 #rm -rf build/*
-#test_compile 5
+#test_compile 4.8
 #rm -rf build/*
 #test_compile 4.9
 #rm -rf build/*
-#test_compile 4.6
-#sudo rm -f /usr/lib/postgresql/9.3/lib/libpgrouting-2.5.so
-#sudo rm -f /usr/share/postgresql/9.3/extension/pgrouting*2.5.0*
+test_compile 5
 #rm -rf build/*
-test_compile 4.8
-
-exit 0
-
-gource --seconds-per-day 0.1 \
-    --auto-skip-seconds 0.3 \
-    --max-file-lag 0.1 \
-    --logo doc/static/images/pgrouting-logo.png ---date-format "%B %Y" \
-    --hide filenames,dirnames \
-    --start-position 0.1 \
-    --disable-auto-rotate \
-    ----file-idle-time 10 \
-    -f -1280x720 \
-    --output-ppm-stream release-2.4.ppm 
-
-ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i release-2.4.ppm -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 release-2.4.mp4
+#test_compile 6
+#rm -rf build/*
+#test_compile 7
diff --git a/tools/developer/taptest.sh b/tools/developer/taptest.sh
new file mode 100755
index 0000000..4f128fb
--- /dev/null
+++ b/tools/developer/taptest.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+set -e
+
+if [[ -z  $1 ]]; then
+    echo "Directory missing";
+    echo "Usage"
+    echo "tools/developer/taptest.sh <pgtap directory> [<postgresql options>]";
+    echo "Examples:"
+    echo "tools/developer/taptest.sh withPoints/undirected_equalityDD.sql -p 5433"
+    exit 1;
+fi
+
+DIR=$1
+shift
+PGFLAGS=$*
+
+PGDATABASE="___pgr___test___"
+
+dropdb $PGFLAGS --if-exists ___pgr___test___
+createdb  $PGFLAGS  ___pgr___test___
+
+
+cd tools/testers/
+psql $PGFLAGS  -f setup_db.sql -d ___pgr___test___
+pg_prove $PGFLAGS  -d ___pgr___test___ ../../pgtap/$DIR
+dropdb $PGFLAGS  ___pgr___test___
diff --git a/tools/developer/translate.sh b/tools/developer/translate.sh
index 68523cf..d7560b0 100755
--- a/tools/developer/translate.sh
+++ b/tools/developer/translate.sh
@@ -30,6 +30,6 @@ gource --seconds-per-day 0.1 \
     --disable-auto-rotate \
     ----file-idle-time 10 \
     -f -1280x720 \
-    --output-ppm-stream release-2.4.ppm 
+    --output-ppm-stream release-2.4.ppm
 
 ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i release-2.4.ppm -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 release-2.4.mp4
diff --git a/tools/git-tools/pre-commit b/tools/git-tools/pre-commit
index 1eb5ec3..0f42932 100755
--- a/tools/git-tools/pre-commit
+++ b/tools/git-tools/pre-commit
@@ -38,9 +38,6 @@ fi
 
 COMMITS=`git rev-list HEAD --count`
 HASH=`git rev-parse --short HEAD`
-BRANCH=`git branch | grep '*' | awk '{print $2}'`
-if [[ $BRANCH == "develop" ]] 
-then 
-    echo $COMMITS-$HASH $BRANCH > $GIT_DIR/../VERSION
-    git add $GIT_DIR/../VERSION
-fi
+BRANCH="release/2.6"
+echo $COMMITS-$HASH $BRANCH > $GIT_DIR/../VERSION
+git add $GIT_DIR/../VERSION
diff --git a/tools/licences/add-licenses b/tools/licences/add-licenses
index 9a7f2e1..35e481c 100755
--- a/tools/licences/add-licenses
+++ b/tools/licences/add-licenses
@@ -91,7 +91,7 @@ sub loadLicense {
 # generated license.
 # The generated license has to be added
 # And Manually fixed.
-# 
+#
 # When the first line is equal, then we skip up to find
 # The "-------" line in both files
 # The rest of the license must be equal
@@ -152,12 +152,12 @@ sub get_task{
 
 # task = 0 Do nothing
 # task = 1 Insert complete license
-# task = 2 Update license body 
+# task = 2 Update license body
 sub update_license {
     my $task = shift;
     my $file_name = shift;
 
-    return if $task == 0; 
+    return if $task == 0;
 
     # read the file
     my @file = ();
@@ -176,7 +176,7 @@ sub update_license {
         $license_type = 3;
         @LICENSE = @CCM_LICENSE;
         @LICENSE_BODY = @CCM_BODY;
-    } 
+    }
 
 
 
diff --git a/tools/performanceQueries/allPairs-performance.sql b/tools/performanceQueries/allPairs-performance.sql
index 1f09835..871adbe 100644
--- a/tools/performanceQueries/allPairs-performance.sql
+++ b/tools/performanceQueries/allPairs-performance.sql
@@ -1,4 +1,4 @@
-/* 
+/*
 Performance for pgr_floydWarshall & pgr_Johnson
 
 Using a bounding box
@@ -51,9 +51,9 @@ DECLARE
 BEGIN
     lim := low;
     seq := 1;
-    LOOP 
+    LOOP
         EXIT WHEN lim > max;
-        
+
         sql =
             'WITH  buffer AS (SELECT ST_Buffer(ST_Centroid(ST_Extent(the_geom)),' || lim || ') as geom FROM ways),
                 bbox AS (SELECT ST_Envelope(ST_Extent(geom)) as box from buffer),
@@ -78,11 +78,11 @@ BEGIN
                 t_vertices AS (SELECT DISTINCT target AS vertex FROM query),
                 vertices AS ( SELECT vertex FROM (
                     (SELECT * FROM s_vertices)
-                    UNION 
+                    UNION
                     (SELECT * FROM t_vertices)) AS a)
             SELECT count(*) AS cnt FROM vertices';
         EXECUTE sql INTO info;
-        density := density / (info.cnt * (info.cnt - 1)); 
+        density := density / (info.cnt * (info.cnt - 1));
 
         sql = 'SELECT count(*) as cnt from ' || fn || '(
             ''WITH  buffer AS (SELECT ST_Buffer(ST_Centroid(ST_Extent(the_geom)),' || lim || ') as geom FROM ways),
@@ -121,7 +121,7 @@ $body$ language plpgsql volatile strict   cost 100 rows 100;
 
 
 
-/* 
+/*
 Performance for pgr_floydWarshall & pgr_Johnson
 
 Not using a bounding box
@@ -174,7 +174,7 @@ select * from fw_j_statsQuery(100 , 100, 200, 1,
     BEGIN
         lim := low;
         seq := 1;
-        LOOP 
+        LOOP
             EXIT WHEN lim > max;
 
             sql := '
@@ -193,7 +193,7 @@ select * from fw_j_statsQuery(100 , 100, 200, 1,
                 SELECT cnt1 + cnt2 AS cnt FROM edges1 , edges2';
             EXECUTE sql INTO info;
             density := info.cnt;
-                    
+
             sql := '
                 WITH
                     edges AS (' || query_sql || '),
@@ -202,12 +202,12 @@ select * from fw_j_statsQuery(100 , 100, 200, 1,
                     t_vertices AS ( SELECT DISTINCT target AS vertex FROM edges),
                     vertices AS ( SELECT vertex FROM (
                         (SELECT * FROM s_vertices)
-                        UNION 
+                        UNION
                         (SELECT * FROM t_vertices)) AS a)
                 SELECT count(*) AS cnt FROM vertices';
             EXECUTE sql INTO info;
-            density := density / (info.cnt * (info.cnt - 1)); 
-            
+            density := density / (info.cnt * (info.cnt - 1));
+
             sql := '
                 SELECT count(*) as cnt from ' || fn || '(
                     ''WITH
diff --git a/tools/publish-doc.sh b/tools/publish-doc.sh
index 8a5f983..7e60ea7 100755
--- a/tools/publish-doc.sh
+++ b/tools/publish-doc.sh
@@ -21,7 +21,7 @@ if test ! -d build ; then
 fi
 
 # Switch branch
-git checkout gh-pages && rm -Rf "$1" 
+git checkout gh-pages && rm -Rf "$1"
 
 # Copy files and directories
 mkdir "$1"
@@ -31,7 +31,7 @@ cp build/doc/latex/en/pgRoutingDocumentation.pdf "$1"/en/
 gzip -c build/doc/man/en/pgrouting.7 > "$1"/en/pgrouting.7.gz
 
 # Commit changes
-git add "$1" 
+git add "$1"
 git add index.html
 git commit -m "Updated to commit $VERSION" . && git push origin gh-pages
 
diff --git a/tools/release-scripts/check-release.sh b/tools/release-scripts/check-release.sh
index e2da1fe..77406b0 100755
--- a/tools/release-scripts/check-release.sh
+++ b/tools/release-scripts/check-release.sh
@@ -36,7 +36,7 @@ fi
 
 }
 
-function test_file {                                                                                                                                                        
+function test_file {
 
 if [ -f sql/sigs/pgrouting--$1.sig ]
 then
@@ -54,27 +54,27 @@ fi
 if [[ -z  $1 ]]; then
     echo "Mayor missing";
     echo "Usage"
-    echo "tools/release-scripts/release-check.sh Mayor Minor Micro Last branch RC DEBUG";
+    echo "tools/release-scripts/release-check.sh Mayor Minor Micro Last branch DEBUG RC";
     exit 1;
 fi
 if [[ -z  $2 ]]; then
     echo "Minor missing";
     echo "Usage"
-    echo "tools/release-scripts/release-check.sh Mayor Minor Micro Last branch RC DEBUG";
+    echo "tools/release-scripts/release-check.sh Mayor Minor Micro Last branch DEBUG RC";
     exit 1;
 fi
 
 if [[ -z  $3 ]]; then
     echo "Micro missing";
     echo "Usage"
-    echo "tools/release-scripts/release-check.sh Mayor Minor Micro Last branch RC DEBUG";
+    echo "tools/release-scripts/release-check.sh Mayor Minor Micro Last branch DEBUG RC";
     exit 1;
 fi
 
 if [[ -z  $4 ]]; then
     echo "Last Micro missing";
     echo "Usage"
-    echo "tools/release-scripts/release-check.sh Mayor Minor Micro Last branch RC DEBUG";
+    echo "tools/release-scripts/release-check.sh Mayor Minor Micro Last branch DEBUG RC";
     exit 1;
 fi
 
@@ -82,7 +82,7 @@ fi
 if [[ -z  $5 ]]; then
     echo "branch missing";
     echo "Usage"
-    echo "tools/release-scripts/release-check.sh Mayor Minor Micro Last branch RC DEBUG";
+    echo "tools/release-scripts/release-check.sh Mayor Minor Micro Last branch DEBUG RC";
     exit 1;
 fi
 
@@ -109,11 +109,11 @@ echo
 
 GIT_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
 
-if [[ "$GIT_BRANCH" == "$BRANCH" ]]; then
-    echo "- [x] Already in branch $BRANCH";
+if [[ "${GIT_BRANCH}" == "${BRANCH}" ]]; then
+    echo "- [x] Already in branch $BRANCH"
     echo
 else
-    error_msg "Current Branch is not: $BRANCH"
+    error_msg "Current Branch is not: $BRANCH,  found $GIT_BRANCH"
     exit 1
 fi
 
@@ -145,7 +145,7 @@ echo
 echo "### Verify release_notes.rst & NEWS"
 echo
 #---------------------------------------------------------------------
- 
+
 if [[ -n $DEBUG ]]; then
     echo
     echo "\`\`\`"
@@ -187,7 +187,7 @@ echo "- [x] NEWS is up to date"
 #---------------------------------------------------------------------
 echo
 echo "## Check version information"
-echo 
+echo
 #---------------------------------------------------------------------
 #---------------------------------------------------------------------
 echo
@@ -241,12 +241,12 @@ echo "- src/common/test/doc-pgr_version.result"
 
 if [[ -n $DEBUG ]]; then
     echo "\`\`\`"
-    echo "cat src/common/test/doc-pgr_version.result | grep \"$MAYOR.$MINOR.$MICRO\""
+    echo "cat test/common/doc-pgr_version.result | grep \"$MAYOR.$MINOR.$MICRO\""
     echo "\`\`\`"
 fi
 
-if [[ $(cat src/common/test/doc-pgr_version.result | grep "$MAYOR.$MINOR.$MICRO") != " $MAYOR.$MINOR.$MICRO" ]]; then
-    error_msg "src/common/test/doc-pgr_version.result is not $MAYOR.$MINOR.$MICRO"
+if [[ $(cat test/common/doc-pgr_version.result | grep "$MAYOR.$MINOR.$MICRO") != " $MAYOR.$MINOR.$MICRO" ]]; then
+    error_msg "test/common/doc-pgr_version.result is not $MAYOR.$MINOR.$MICRO"
     exit 1
 else
     echo "  - [x]  src/common/test/doc-pgr_version.result"
@@ -282,6 +282,7 @@ echo
 echo "### Checking signature files exist"
 echo
 #---------------------------------------------------------------------
+test_file 2.6.0
 test_file 2.5.3
 test_file 2.5.2
 test_file 2.5.1
@@ -324,7 +325,7 @@ if [[ "$BRANCH" == "develop" || $BRANCH == "master" || $BRANCH == "release/$MAYO
         bash tools/release-scripts/compile-release.sh 5 $MAYOR.$MINOR $MICRO
     fi
 fi
-bash tools/release-scripts/compile-release.sh 4.8   $MAYOR.$MINOR $MICRO
+bash tools/release-scripts/compile-release.sh 4.8 $MAYOR.$MINOR $MICRO
 
 echo - [x] completed local builds
 
@@ -332,23 +333,11 @@ echo - [x] completed local builds
 echo "### checking the signature files dont change"
 #---------------------------------------------------------------------
 
-sh tools/release-scripts/get_signatures.sh 2.5.2 ___sig_generate___ sql/sigs >> build/tmp_sigs.txt
-test_file 2.5.1
-test_file 2.5.0
-test_file 2.4.2
-test_file 2.4.1
-test_file 2.4.0
-test_file 2.3.2
-test_file 2.3.1
-test_file 2.3.0
-test_file 2.2.4
-test_file 2.2.3
-test_file 2.2.2
-test_file 2.2.1
-test_file 2.2.0
-test_file 2.1.0
-test_file 2.0.1
-test_file 2.0.0
+sh tools/release-scripts/get_signatures.sh $MAYOR.$MINOR.$MICRO ___sig_generate___ sql/sigs >> build/tmp_sigs.txt
+
+if [[ -z  "$DEBUG" ]]; then
+    git_no_change
+fi
 
 echo
 echo - [x] completed check: OK
@@ -381,8 +370,10 @@ if [[ $? != 0 ]]; then
     exit 1
 fi
 
-if [[ $(git status | grep 'Changes not staged for commit:') ]]; then
-    echo "FATAL: at least one result file changed"
+if [[ -z  "$DEBUG" ]]; then
+    git_no_change
+elif [[ $(git status | grep 'Changes not staged for commit:') ]]; then
+    echo "DEBUG WARNING: at least one file changed"
     git status
     exit 1
 fi
diff --git a/tools/release-scripts/compile-release.sh b/tools/release-scripts/compile-release.sh
index 922dbc2..81d0a17 100755
--- a/tools/release-scripts/compile-release.sh
+++ b/tools/release-scripts/compile-release.sh
@@ -5,30 +5,36 @@ set -e
 if [[ -z  $1 ]]; then
     echo "Cpp version missing";
     echo "Usage:"
-    echo "tools/release-scripts/compile-release.sh Cpp Minor Micro";
+    echo "tools/release-scripts/compile-release.sh Cpp Minor Micro [Debug]";
     exit 1;
 fi
 
-if [[ -z  $1 ]]; then
+if [[ -z  $2 ]]; then
     echo "Minor missing";
     echo "Usage:"
-    echo "tools/release-scripts/compile-release.sh Cpp Minor Micro";
+    echo "tools/release-scripts/compile-release.sh Cpp Minor Micro [Debug]";
     exit 1;
 fi
 
-if [[ -z  $1 ]]; then
+if [[ -z  $3 ]]; then
     echo "Micro missing";
     echo "Usage:"
-    echo "tools/release-scripts/compile-release.sh Cpp Minor Micro";
+    echo "tools/release-scripts/compile-release.sh Cpp Minor Micro [Debug]";
     exit 1;
 fi
 
+if [[ -z  $4 ]]; then
+    DEBUG="Release"
+else
+    DEBUG="Debug"
+fi
+
 CPPVERSION=$1
 MINOR=$2
 MICRO=$3
 FULL_VER="$MINOR.$MICRO"
 
-function test_compile {                                                                                                                                                                                                          
+function test_compile {
 
 echo
 echo
@@ -41,14 +47,14 @@ echo
 cd build/
 touch tmp_make.txt
 touch tmp_make_err.txt
-cmake  -DDOC_USE_BOOTSTRAP=ON -DWITH_DOC=ON -DBUILD_DOXY=ON -DCMAKE_BUILD_TYPE=Release .. >> tmp_make.txt
+cmake  -DDOC_USE_BOOTSTRAP=ON -DWITH_DOC=ON -DBUILD_DOXY=ON -DCMAKE_BUILD_TYPE=$DEBUG .. >> tmp_make.txt
 
-if [[ "$1" == "4.8" ]]; then
-    make doc >> tmp_make.txt 
-    echo "  - [x] Build Users documentation"
-    make doxy >> tmp_make.txt
-    echo "  - [x] Build developers documentation"
-fi
+#if [[ "$1" == "4.8" ]]; then
+#    make doc >> tmp_make.txt
+#    echo "  - [x] Build Users documentation"
+#    make doxy >> tmp_make.txt
+#    echo "  - [x] Build developers documentation"
+#fi
 
 make >> tmp_make.txt 2>>tmp_make_err.txt
 
@@ -72,7 +78,7 @@ if [[ "$1" == "4.8" ]]; then
     tools/testers/algorithm-tester.pl -documentation >> build/tmp_make.txt
     echo "  - [x] Regenerating Users documentation queries OK"
     cd build
-    make doc >> tmp_make.txt 
+    make doc >> tmp_make.txt
     echo "  - [x] Build Users documentation OK"
     make doxy >> tmp_make.txt
     echo "  - [x] Build developers documentation OK"
diff --git a/tools/scripts/code_checker.sh b/tools/scripts/code_checker.sh
index b4dd3fb..696875c 100644
--- a/tools/scripts/code_checker.sh
+++ b/tools/scripts/code_checker.sh
@@ -44,27 +44,20 @@ if test -z "$DIRECTORY"; then
     echo --------------------
     echo ------   *.c  ------
     echo --------------------
-    python code_linter/styleguide/cpplint/cpplint.py --extensions=c src/*/src/*.c
+    python code_linter/styleguide/cpplint/cpplint.py --extensions=c --filter=-readability/casting src/*/*.c
     echo --------------------
     echo ------ *.cpp  ------
     echo --------------------
-    python code_linter/styleguide/cpplint/cpplint.py --filter=-runtime/references src/*/src/*.cpp
+    python code_linter/styleguide/cpplint/cpplint.py --filter=-runtime/references src/*/*.cpp
     echo --------------------
     echo ------ HEADERS  ------
     echo --------------------
     python code_linter/styleguide/cpplint/cpplint.py --extensions=hpp,h --headers=hpp,h --filter=-runtime/references \
-        src/*/src/*.h \
-        src/*/src/*.hpp \
         include/*/*.h* \
         include/*/*/*.h*
 
 else
     if [ "$DIRECTORY" = "h" ]; then
-    echo --------------------
-    echo ------ OUT OF PLACE HEADERS  ------
-    echo --------------------
-    python code_linter/styleguide/cpplint/cpplint.py --extensions=hpp,h --headers=hpp,h --filter=-runtime/references \
-        src/*/src/*.h* 
 
     echo --------------------
     echo ------ IN PLACE HEADERS  ------
@@ -77,11 +70,11 @@ else
         echo --------------------
         echo ------   *.c  ------
         echo --------------------
-        python code_linter/styleguide/cpplint/cpplint.py --extensions=c --filter=-readability/casting src/$DIRECTORY/src/*.c
+        python code_linter/styleguide/cpplint/cpplint.py --extensions=c --filter=-readability/casting src/$DIRECTORY/*.c
         echo --------------------
         echo ------ *.cpp  ------
         echo --------------------
-        python code_linter/styleguide/cpplint/cpplint.py --filter=-runtime/references src/$DIRECTORY/src/*.cpp
+        python code_linter/styleguide/cpplint/cpplint.py --filter=-runtime/references src/$DIRECTORY/*.cpp
         echo --------------------
         echo ------   C HEADER  ------
         echo --------------------
diff --git a/tools/scripts/fix_typos.sh b/tools/scripts/fix_typos.sh
index 6ab4f2f..9c3ba98 100644
--- a/tools/scripts/fix_typos.sh
+++ b/tools/scripts/fix_typos.sh
@@ -47,11 +47,9 @@ if ! test -d fix_typos; then
 fi
 
 EXCLUDED_FILES="*/doc/i18n/*"
-EXCLUDED_FILES="$EXCLUDED_FILES,*/src/*/test/pgtap/*"
 EXCLUDED_FILES="$EXCLUDED_FILES,*/pgtap/*"
 EXCLUDED_FILES="$EXCLUDED_FILES,*/fix_typos/*"
 EXCLUDED_FILES="$EXCLUDED_FILES,*/build/*"
-EXCLUDED_FILES="$EXCLUDED_FILES,*/src/trsp/tester/*"
 EXCLUDED_FILES="$EXCLUDED_FILES,*/code_linter/*"
 EXCLUDED_FILES="$EXCLUDED_FILES,*/.git/*"
 EXCLUDED_FILES="$EXCLUDED_FILES,*/tools/*"
@@ -59,7 +57,7 @@ EXCLUDED_FILES="$EXCLUDED_FILES,*/locale/*"
 EXCLUDED_FILES="$EXCLUDED_FILES,*/doc/*.queries"
 EXCLUDED_FILES="$EXCLUDED_FILES,*/test/*.result"
 EXCLUDED_FILES="$EXCLUDED_FILES,*/test/*.data"
-EXCLUDED_FILES="$EXCLUDED_FILES,*/src/tsp/test/development/*"
+EXCLUDED_FILES="$EXCLUDED_FILES,*/test/tsp/development/*"
 
 
 #WORDS_WHITE_LIST="poSession,FIDN,TRAFIC,HTINK,repID,oCurr,INTREST,oPosition"
diff --git a/tools/scripts/typos_whitelist.txt b/tools/scripts/typos_whitelist.txt
index 2812cb9..63e99fc 100644
--- a/tools/scripts/typos_whitelist.txt
+++ b/tools/scripts/typos_whitelist.txt
@@ -6,7 +6,7 @@
    /* 165 */ {"Top_St_Wol", "Obergrenze strat. Bew|lkung", "hPa", UC_NONE},
               "Icing Regime 1.Guess(1=gen,2=conv,3=strat,4=freez)", "1",
               "Icing Regime(1=general,2=convect,3=strat,4=freez)", "1",
- * The generated swig_type_info structures are assigned staticly to an initial 
+ * The generated swig_type_info structures are assigned staticly to an initial
  * The generated swig_type_info structures are assigned staticly to an initial
             YUR = 0.0;
             YUR = oES.YUR;
@@ -14,7 +14,7 @@
     l_segment->YUR = seg_data.GetDouble(nPos+215, 22);
     seg_data.Put(psOrbit->YUR,nPos+215,22,"%22.14f");
 /* Putting statics in headers is trouble. */
-See COMMITERS file. 
+See COMMITERS file.
   /* When multiple interpeters are used, a module could have already been initialized in
     const char* pszNAM = record->GetStringSubfield("DSI", 0, "NAM", 0);
                     const char* pszNAM = record->GetStringSubfield("FDR", iFDRFieldInstance++, "NAM", 0);
diff --git a/tools/sql-update-scripts/pgrouting--2.0.0--2.5.2.sql b/tools/sql-update-scripts/pgrouting--2.0.0--2.5.2.sql
deleted file mode 100644
index 354b208..0000000
--- a/tools/sql-update-scripts/pgrouting--2.0.0--2.5.2.sql
+++ /dev/null
@@ -1,6575 +0,0 @@
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- pgRouting extension upgrade from 2.0.0 to 2.5.2
--- generated by tools/build-extension-update-files
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-\echo Use "ALTER extension pgrouting update to '2.5.2'" to load this file. \quit
-
-
--------------------------------------
--- remove functions no longer in the 2.5.2 extension
--------------------------------------
-
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_alphashape(text);
-DROP FUNCTION IF EXISTS pgr_alphashape(text);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_createtopology(text,double precision,text,text,text,text,text);
-DROP FUNCTION IF EXISTS pgr_createtopology(text,double precision,text,text,text,text,text);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_drivingdistance(text,integer,double precision,boolean,boolean);
-DROP FUNCTION IF EXISTS pgr_drivingdistance(text,integer,double precision,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_makedistancematrix(text);
-DROP FUNCTION IF EXISTS pgr_makedistancematrix(text);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_nodenetwork(text,double precision,text,text,text);
-DROP FUNCTION IF EXISTS pgr_nodenetwork(text,double precision,text,text,text);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_pointsaspolygon(character varying);
-DROP FUNCTION IF EXISTS pgr_pointsaspolygon(character varying);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_pointtoid(geometry,double precision,text,integer);
-DROP FUNCTION IF EXISTS pgr_pointtoid(geometry,double precision,text,integer);
-
-
- ------------------------------------------
---    New functions:  2.0
--- Signature change:  2.1
---       Deprecated:  2.1
-------------------------------------------
--- pgr_dijkstra:
--- 2.0.0: {      sql, source_id, target_id, directed, has_reverse_cost}
--- 2.5.2: {edges_sql, start_vid,   end_vid, directed, has_rcost}
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_dijkstra(text,integer,integer,boolean,boolean);
-DROP FUNCTION IF EXISTS pgr_dijkstra(text,integer,integer,boolean,boolean);
-
-
-
-
-------------------------------------------
---    New functions:  2.0
---       Deprecated:  2.1
---       Deprecated:  2.1 & 2.2
-------------------------------------------
--- pgr_ksp
--- 2.0.0: {      sql, source_id, target_id, no_paths,has_reverse_cost}
--- 2.5.2: {edges_sql, start_vid,   end_vid, k,       has_rcost}
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_ksp(text,integer,integer,integer,boolean);
-DROP FUNCTION IF EXISTS pgr_ksp(text,integer,integer,integer,boolean);
-
-
-
-
-------------------------------------------
---    New functions:  2.0
--- Signature change:  2.2
---       Deprecated:  2.2
-------------------------------------------
--- pgr_apspjohnson
--- 2.0.0: {      sql}
--- 2.5.2: {edges_sql}
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_apspjohnson(text);
-DROP FUNCTION IF EXISTS pgr_apspjohnson(text);
-
-
--- pgr_apspwarshall
--- 2.0.0: {      sql, directed, has_reverse_cost}
--- 2.5.2: {edges_sql, directed, has_rcost}
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_apspwarshall(text,boolean,boolean);
-DROP FUNCTION IF EXISTS pgr_apspwarshall(text,boolean,boolean);
-
-
--- pgr_kdijkstrapath
--- 2.0.0: {sql,source_vid, target_vid, directed, has_reverse_cost}
--- 2.5.2: {sql,    source,    targets, directed, has_rcost} 
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_kdijkstrapath(text,integer,integer[],boolean,boolean);
-DROP FUNCTION IF EXISTS pgr_kdijkstrapath(text,integer,integer[],boolean,boolean);
-
-
--- pgr_kdijkstracost
--- 2.0.0: {sql,source_vid, target_vid, directed, has_reverse_cost}
--- 2.5.2: {sql,    source,    targets, directed, has_rcost} 
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_kdijkstracost(text,integer,integer[],boolean,boolean);
-DROP FUNCTION IF EXISTS pgr_kdijkstracost(text,integer,integer[],boolean,boolean);
-
-
-
-
-------------------------------------------
---    New functions:  2.0
--- Signature change:  2.2
-------------------------------------------
--- pgr_version
--- 2.0.0:  {version,tag,build,hash,branch,boost}
--- 2.5.2:  {version,tag,hash,branch,boost}
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_version();
-DROP FUNCTION IF EXISTS pgr_version();
-
-
-
-
-------------------------------------------
---    New functions:  2.0
--- Signature change:  2.2
-------------------------------------------
--- pgr_trsp
--- 2.0.0:  {      sql, source_vid, target_vid, directed, has_reverse_cost, turn_restrict_sql}
--- 2.5.2:  {edges_sql,  start_vid,    end_vid, directed, has_rcost,        restrictions_sql}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vid","end_vid","directed","has_rcost","restrictions_sql"}'
-WHERE proname = 'pgr_trsp'
-    AND proargnames = '{"sql","source_vid","target_vid","directed","has_reverse_cost","turn_restrict_sql"}';
-
-
-------------------------------------------
---    New functions:  2.0
--- Signature change:  2.4
---       Deprecated:  2.4
-------------------------------------------
--- pgr_bddijkstra
--- 2.0.0: {      sql, source_vid, target_vid, directed, has_reverse_cost}   
--- 2.5.2: {edges_sql,  start_vid,    end_vid, directed, has_rcost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vid","end_vid","directed","has_rcost"}'
-WHERE proname = 'pgr_bddijkstra'
-    AND proargnames = '{"sql","source_vid","target_vid","directed","has_reverse_cost"}';
-
-
-------------------------------------------
--- New functions on 2.0
--- Signature change on 2.3
--- Deprecated on 2.4
-------------------------------------------
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_astar(text,integer,integer,boolean,boolean);
-DROP FUNCTION IF EXISTS pgr_astar(text,integer,integer,boolean,boolean);
-
-
-
-
-
-
-
-
-
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
---- pgRouting provides geospatial routing functionality.
---- http://pgrouting.org
---- copyright
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
----
---- This is free software; you can redistribute and/or modify it:
---- the terms of the GNU General Public Licence. See the COPYING file.
---- the terms of the MIT-X Licence. See the COPYING file.
----
---- The following functions have MIT-X licence:
----     pgr_version()
----     pgr_tsp(matrix float8[][], startpt integer, endpt integer DEFAULT -1, OUT seq integer, OUT id integer)
----     _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
----     pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
----
----
---- All other functions are under GNU General Public Licence.
----
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
--- WARNING: Any change in this file must be evaluated for compatibility.
---          Changes cleanly handled by postgis_upgrade.sql are fine,
---          other changes will require a bump in Major version.
---          Currently only function replaceble by CREATE OR REPLACE
---          are cleanly handled.
---
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
---  pgRouting 2.0 types
-
-
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_version()
-RETURNS TABLE(
-        "version" varchar,
-        tag varchar,
-        hash varchar,
-        branch varchar,
-        boost varchar
-    ) AS
-$BODY$
-    SELECT '2.5.2'::varchar AS version,
-        'v2.5.2'::varchar AS tag,
-        '60585f1f7'::varchar AS hash,
-        'master'::varchar AS branch,
-        '1.54.0'::varchar AS boost;
-$BODY$
-LANGUAGE sql IMMUTABLE;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getTableName(IN tab text, IN reportErrs int default 0, IN fnName text default '_pgr_getTableName', OUT sname text,OUT tname text)
-  RETURNS RECORD AS
-$$
-DECLARE
-        naming record;
-        i integer;
-        query text;
-        sn text; -- schema name
-        tn text; -- table name
-        ttype text; --table type for future use
-        err boolean;
-        debuglevel text;
-        var_types text[] = ARRAY['BASE TABLE', 'VIEW'];
-BEGIN
-
-    execute 'show client_min_messages' into debuglevel;
-
-
-    perform _pgr_msg( 0, fnName, 'Checking table ' || tab || ' exists');
-    --RAISE DEBUG 'Checking % exists',tab;
-
-    i := strpos(tab,'.');
-    IF (i <> 0) THEN
-        sn := split_part(tab, '.',1);
-        tn := split_part(tab, '.',2);
-    ELSE
-        sn := current_schema;
-        tn := tab;
-    END IF;
-
-
-   SELECT schema_name INTO sname
-   FROM information_schema.schemata WHERE schema_name = sn;
-
-    IF sname IS NOT NULL THEN -- found schema (as is)
-       SELECT table_name, table_type INTO tname, ttype
-       FROM information_schema.tables
-       WHERE
-                table_type = ANY(var_types) and
-                table_schema = sname and
-                table_name = tn ;
-        IF tname is NULL THEN
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  = ANY(var_types) and
-                table_schema = sname and
-                table_name = lower(tn) ORDER BY table_name;
-        END IF;
-    END IF;
-    IF sname is NULL or tname is NULL THEN --schema not found or table not found
-        SELECT schema_name INTO sname
-        FROM information_schema.schemata
-        WHERE schema_name = lower(sn) ;
-
-        IF sname IS NOT NULL THEN -- found schema (with lower caps)
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  =  ANY(var_types) and
-                table_schema = sname and
-                table_name= tn ;
-
-           IF tname IS NULL THEN
-                SELECT table_name, table_type INTO tname, ttype
-                FROM information_schema.tables
-                WHERE
-                    table_type  =  ANY(var_types) and
-                    table_schema = sname and
-                    table_name= lower(tn) ;
-           END IF;
-        END IF;
-    END IF;
-   err = (sname IS NULL OR tname IS NULL);
-   perform _pgr_onError(err, reportErrs, fnName, 'Table ' || tab ||' not found',' Check your table name', 'Table '|| tab || ' found');
-
-END;
-$$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(sname text, tname text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(col) into cname;
-
-    IF cname is null  THEN
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(lower(col))  into cname;
-    END if;
-
-    err = cname is null;
-
-    perform _pgr_onError(err, reportErrs, fnName,  'Column '|| col ||' not found', ' Check your column name','Column '|| col || ' found');
-    RETURN cname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(tab text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-
-    select * into cname from _pgr_getColumnName(sname,tname,col,reportErrs, fnName);
-    RETURN cname;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    select * from _pgr_getColumnName(tab,col,0, '_pgr_isColumnInTable') into cname;
-    return cname is not null;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(sname text, tname text, cname text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    pkey text;
-BEGIN
-    SELECT
-          pg_attribute.attname into pkey
-         --  format_type(pg_attribute.atttypid, pg_attribute.atttypmod)
-          FROM pg_index, pg_class, pg_attribute
-          WHERE
-                  pg_class.oid = _pgr_quote_ident(sname||'.'||tname)::regclass AND
-                  indrelid = pg_class.oid AND
-                  pg_attribute.attrelid = pg_class.oid AND
-                  pg_attribute.attnum = any(pg_index.indkey)
-                  AND indisprimary;
-
-    IF pkey=cname then
-          RETURN TRUE;
-    END IF;
-
-    SELECT a.index_name,
-           b.attname,
-           b.attnum,
-           a.indisunique,
-           a.indisprimary
-      INTO rec
-      FROM ( SELECT a.indrelid,
-                    a.indisunique,
-                    a.indisprimary,
-                    c.relname index_name,
-                    unnest(a.indkey) index_num
-               FROM pg_index a,
-                    pg_class b,
-                    pg_class c,
-                    pg_namespace d
-              WHERE b.relname=tname
-                AND b.relnamespace=d.oid
-                AND d.nspname=sname
-                AND b.oid=a.indrelid
-                AND a.indexrelid=c.oid
-           ) a,
-           pg_attribute b
-     WHERE a.indrelid = b.attrelid
-       AND a.index_num = b.attnum
-       AND b.attname = cname
-  ORDER BY a.index_name,
-           a.index_num;
-
-  RETURN FOUND;
-  EXCEPTION WHEN OTHERS THEN
-    perform _pgr_onError( true, reportErrs, fnName,
-    'Error when checking for the postgres system attributes', SQLERR);
-    RETURN FALSE;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(tab text, col text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    sname text;
-    tname text;
-    cname text;
-    pkey text;
-    value boolean;
-BEGIN
-    SELECT * into naming FROM _pgr_getTableName(tab, 0, fnName);
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    SELECT * into cname from _pgr_getColumnName(sname, tname, col, 0, fnName) ;
-    IF cname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    select * into value  from _pgr_isColumnIndexed(sname, tname, cname, reportErrs, fnName);
-    return value;
-END
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-create or replace function _pgr_quote_ident(idname text)
-    returns text as
-$body$
-declare
-    t text[];
-    pgver text;
-
-begin
-    pgver := regexp_replace(version(), E'^PostgreSQL ([^ ]+)[ ,].*$', E'\\1');
-
-    if _pgr_versionless(pgver, '9.2') then
-        select into t array_agg(quote_ident(term)) from
-            (select nullif(unnest, '') as term
-               from unnest(string_to_array(idname, '.'))) as foo;
-    else
-        select into t array_agg(quote_ident(term)) from
-            (select unnest(string_to_array(idname, '.', '')) as term) as foo;
-    end if;
-    return array_to_string(t, '.');
-end;
-$body$
-language plpgsql immutable;
-
-
-CREATE OR REPLACE FUNCTION _pgr_versionless(v1 text, v2 text)
-  RETURNS boolean AS
-$BODY$
-
-
-declare
-    v1a text[];
-    v2a text[];
-    nv1 integer;
-    nv2 integer;
-    ne1 integer;
-    ne2 integer;
-
-begin
-    -- separate components into an array, like:
-    -- '2.1.0-beta3dev'  =>  {2,1,0,beta3dev}
-    v1a := regexp_matches(v1, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-    v2a := regexp_matches(v2, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-
-    -- convert modifiers to numbers for comparison
-    -- we do not delineate between alpha1, alpha2, alpha3, etc
-    ne1 := case when v1a[4] is null or v1a[4]='' then 5
-                when v1a[4] ilike 'rc%' then 4
-                when v1a[4] ilike 'beta%' then 3
-                when v1a[4] ilike 'alpha%' then 2
-                when v1a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    ne2 := case when v2a[4] is null or v2a[4]='' then 5
-                when v2a[4] ilike 'rc%' then 4
-                when v2a[4] ilike 'beta%' then 3
-                when v2a[4] ilike 'alpha%' then 2
-                when v2a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    nv1 := v1a[1]::integer * 10000 +
-           coalesce(v1a[2], '0')::integer * 1000 +
-           coalesce(v1a[3], '0')::integer *  100 + ne1;
-    nv2 := v2a[1]::integer * 10000 +
-           coalesce(v2a[2], '0')::integer * 1000 +
-           coalesce(v2a[3], '0')::integer *  100 + ne2;
-
-    --raise notice 'nv1: %, nv2: %, ne1: %, ne2: %', nv1, nv2, ne1, ne2;
-
-    return nv1 < nv2;
-end;
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-create or replace function _pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_startpoint(st_geometryn(g,1));
-    else
-        return st_startpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function _pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_endpoint(st_geometryn(g,1));
-    else
-        return st_endpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_parameter_check(fn text, sql text, big boolean default false)
-  RETURNS bool AS
-  $BODY$
-
-  DECLARE
-  rec record;
-  rec1 record;
-  has_rcost boolean;
-  safesql text;
-  BEGIN
-    IF (big) THEN
-       RAISE EXCEPTION 'This function is for old style functions';
-    END IF;
-
-    -- checking query is executable
-    BEGIN
-      safesql =  'select * from ('||sql||' ) AS __a__ limit 1';
-      execute safesql into rec;
-      EXCEPTION
-        WHEN OTHERS THEN
-            RAISE EXCEPTION 'Could not execute query please verify syntax of: '
-              USING HINT = sql;
-    END;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('dijkstra','astar') THEN
-        BEGIN
-          execute 'select id,source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: id, source, target, cost';
-        END;
-        execute 'select pg_typeof(id)::text as id_type, pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.id_type in ('integer'::text))
-              AND (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Error, columns ''source'', ''target'' must be of type int4, ''cost'' must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    IF fn IN ('astar') THEN
-        BEGIN
-          execute 'select x1,y1,x2,y2  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: x1,y1, x2,y2';
-        END;
-        execute 'select pg_typeof(x1)::text as x1_type, pg_typeof(y1)::text as y1_type, pg_typeof(x2)::text as x2_type, pg_typeof(y2)::text as y2_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.x1_type = 'double precision'::text)
-              AND (rec.y1_type = 'double precision'::text)
-              AND (rec.x2_type = 'double precision'::text)
-              AND (rec.y2_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Columns: x1, y1, x2, y2 must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('johnson') THEN
-        BEGIN
-          execute 'select source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING HINT = 'Please veryfy the column names: id, source, target, cost',
-                         ERRCODE = 'XX000';
-        END;
-
-        execute 'select pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Support for source,target columns only of type: integer. Support for Cost: double precision'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    -- Checking the data types of the optional reverse_cost";
-    has_rcost := false;
-    IF fn IN ('johnson','dijkstra','astar') THEN
-      BEGIN
-        execute 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||safesql||' ) AS __b__ limit 1 ' into rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-            return has_rcost;
-      END;
-      if (has_rcost) then
-        IF (big) then
-           IF  not (rec1.rev_type in ('bigint'::text, 'integer'::text, 'smallint'::text, 'double precision'::text, 'real'::text)) then
-             RAISE EXCEPTION 'Illegar type in optional parameter reverse_cost.'
-             USING ERRCODE = 'XX000';
-           END IF;
-        ELSE -- Version 2.0.0 is more restrictive
-           IF (rec1.rev_type != 'double precision') then
-             RAISE EXCEPTION 'Illegal type in optional parameter reverse_cost, must be of type float8'
-             USING ERRCODE = 'XX000';
-           END IF;
-        END IF;
-      end if;
-      return true;
-    END IF;
-    -- just for keeps
-    return true;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_onError(
-  IN errCond boolean,  -- true there is an error
-  IN reportErrs int,   -- 0, 1 or 2
-  IN fnName text,      -- function name that generates the error
-  IN msgerr text,      -- error message
-  IN hinto text default 'No hint', -- hint help
-  IN msgok text default 'OK')      -- message if everything is ok
-  RETURNS void AS
-$BODY$
-BEGIN
-  if errCond=true then
-     if reportErrs=0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-     else
-       if reportErrs = 2 then
-         raise notice '----> PGR ERROR in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-         raise raise_exception;
-       else
-         raise notice '----> PGR NOTICE in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-       end if;
-     end if;
-  else
-       raise debug 'PGR ----> %: %',fnName,msgok;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_msg(IN msgKind int, IN fnName text, IN msg text default '---->OK')
-  RETURNS void AS
-$BODY$
-BEGIN
-  if msgKind = 0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msg;
-  else
-       raise notice '----> PGR NOTICE in %: %',fnName,msg;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(sname text, tname text, cname text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    EXECUTE 'select data_type  from information_schema.columns '
-            || 'where table_name = '||quote_literal(tname)
-                 || ' and table_schema=' || quote_literal(sname)
-                 || ' and column_name='||quote_literal(cname)
-       into ctype;
-    err = ctype is null;
-    perform _pgr_onError(err, reportErrs, fnName,
-            'Type of Column '|| cname ||' not found',
-            'Check your column name',
-            'OK: Type of Column '|| cname || ' is ' || ctype);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(tab text, col text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-    select * into cname from _pgr_getColumnName(tab,col,reportErrs, fnName) ;
-    select * into ctype from _pgr_getColumnType(sname,tname,cname,reportErrs, fnName);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_get_statement(o_sql text)
-RETURNS text AS
-$BODY$
-DECLARE
-sql TEXT;
-BEGIN
-    EXECUTE 'SELECT statement FROM pg_prepared_statements WHERE name ='  || quote_literal(o_sql) || ' limit 1 ' INTO sql;
-    IF (sql IS NULL) THEN
-      RETURN   o_sql;
-    ELSE
-      RETURN  regexp_replace(sql, '(.)* as ', '', 'i');
-    END IF;
-END
-$BODY$
-LANGUAGE plpgsql STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_checkVertTab(vertname text, columnsArr  text[],
-    IN reportErrs int default 1, IN fnName text default '_pgr_checkVertTab',
-    OUT sname text,OUT vname text)
-RETURNS record AS
-$BODY$
-DECLARE
-    cname text;
-    colname text;
-    naming record;
-    debuglevel text;
-    err  boolean;
-    msgKind int;
-
-BEGIN
-    msgKind = 0; -- debug_
-    execute 'show client_min_messages' into debuglevel;
-
-    perform _pgr_msg(msgKind, fnName, 'Checking table ' || vertname || ' exists');
-       select * from _pgr_getTableName(vertname, 0, fnName) into naming;
-       sname=naming.sname;
-       vname=naming.tname;
-       err = sname is NULL or vname is NULL;
-    perform _pgr_onError( err, 2, fnName,
-          'Vertex Table: ' || vertname || ' not found',
-          'Please create ' || vertname || ' using  _pgr_createTopology() or pgr_createVerticesTable()',
-          'Vertex Table: ' || vertname || ' found');
-
-
-    perform _pgr_msg(msgKind, fnName, 'Checking columns of ' || vertname);
-      FOREACH cname IN ARRAY columnsArr
-      loop
-         select _pgr_getcolumnName(vertname, cname, 0, fnName) into colname;
-         if colname is null then
-           perform _pgr_msg(msgKind, fnName, 'Adding column ' || cname || ' in ' || vertname);
-           set client_min_messages  to warning;
-                execute 'ALTER TABLE '||_pgr_quote_ident(vertname)||' ADD COLUMN '||cname|| ' integer';
-           execute 'set client_min_messages  to '|| debuglevel;
-           perform _pgr_msg(msgKind, fnName);
-         end if;
-      end loop;
-    perform _pgr_msg(msgKind, fnName, 'Finished checking columns of ' || vertname);
-
-    perform _pgr_createIndex(vertname , 'id' , 'btree', reportErrs, fnName);
- END
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(
-    sname text, tname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    debuglevel text;
-    naming record;
-    tabname text;
-    query text;
-    msgKind int;
-BEGIN
-  msgKind = 0; -- debug_
-
-  execute 'show client_min_messages' into debuglevel;
-  tabname=_pgr_quote_ident(sname||'.'||tname);
-  perform _pgr_msg(msgKind, fnName, 'Checking ' || colname || ' column in ' || tabname || ' is indexed');
-    IF (_pgr_isColumnIndexed(sname,tname,colname, 0, fnName)) then
-       perform _pgr_msg(msgKind, fnName);
-    else
-      if indext = 'gist' then
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using gist('||quote_ident(colname)||')';
-      else
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using btree('||quote_ident(colname)||')';
-      end if;
-      perform _pgr_msg(msgKind, fnName, 'Adding index ' || tabname || '_' ||  colname || '_idx');
-      perform _pgr_msg(msgKind, fnName, ' Using ' ||  query);
-      set client_min_messages  to warning;
-      BEGIN
-        execute query;
-        EXCEPTION WHEN others THEN
-          perform _pgr_onError( true, reportErrs, fnName,
-            'Could not create index on:' || colname, SQLERRM);
-      END;
-      execute 'set client_min_messages  to '|| debuglevel;
-      perform _pgr_msg(msgKind, fnName);
-    END IF;
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(tabname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    naming record;
-    sname text;
-    tname text;
-
-BEGIN
-    select * from _pgr_getTableName(tabname, 2, fnName)  into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    execute _pgr_createIndex(sname, tname, colname, indext, reportErrs, fnName);
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pointToId(
-    point geometry,
-    tolerance double precision,
-    vertname text,
-    srid integer)
-
-  RETURNS bigint AS
-$BODY$
-DECLARE
-    rec record;
-    pid bigint;
-
-BEGIN
-    EXECUTE 'SELECT ST_Distance(
-        the_geom,
-        ST_GeomFromText(ST_AsText('
-                || quote_literal(point::text)
-                || '),'
-            || srid ||')) AS d, id, the_geom
-    FROM '||_pgr_quote_ident(vertname)||'
-    WHERE ST_DWithin(
-        the_geom,
-        ST_GeomFromText(
-            ST_AsText(' || quote_literal(point::text) ||'),
-            ' || srid || '),' || tolerance||')
-    ORDER BY d
-    LIMIT 1' INTO rec ;
-    IF rec.id IS NOT NULL THEN
-        pid := rec.id;
-    ELSE
-        execute 'INSERT INTO '||_pgr_quote_ident(vertname)||' (the_geom) VALUES ('||quote_literal(point::text)||')';
-        pid := lastval();
-END IF;
-
-RETURN pid;
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'many_to_many_dijkstra'
-LANGUAGE c VOLATILE;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer, OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstra(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(Many to Many)';
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraVia(
-    edges_sql TEXT,
-    via_vertices ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    strict BOOLEAN DEFAULT FALSE,
-    U_turn_on_edge BOOLEAN DEFAULT TRUE,
-
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'dijkstraVia'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_johnson(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'johnson'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_floydWarshall(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'floydWarshall'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'astarManyToMany'
-LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, normal:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to Many)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true, normal:=false) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to Many)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid ANYARRAY,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-    equicost BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'many_withPointsDD'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_withPointsDD($1, $2, ARRAY[$3]::BIGINT[], $4, $5, $6, $7, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vids anyarray,
-    distance FLOAT,
-    directed BOOLEAN DEFAULT TRUE,
-    equicost BOOLEAN DEFAULT FALSE,
-    OUT seq integer,
-    OUT from_v  bigint,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'driving_many_to_dist'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vid bigint,
-    distance FLOAT8,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq integer,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer, directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'kshortest_path'
-    LANGUAGE c STABLE STRICT;
-
--- V2 the graph is directed and there are no heap paths
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid integer, end_vid integer, k integer, has_rcost boolean)
-  RETURNS SETOF pgr_costresult3 AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated signature of pgr_ksp';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql::text, false);
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_rcost) THEN
-           -- user says that it has reverse_cost but its not true
-           RAISE EXCEPTION 'has_reverse_cost set to true but reverse_cost not found';
-         ELSE
-           -- user says that it does not have reverse_cost but it does have it
-           -- to ignore we remove reverse_cost from the query
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         END IF;
-      END IF;
-
-      RETURN query SELECT ((row_number() over()) -1)::integer  AS seq,  (path_id - 1)::integer AS id1, node::integer AS id2, edge::integer AS id3, cost
-            FROM _pgr_ksp(sql::text, start_vid, end_vid, k, TRUE, FALSE) WHERE path_id <= k;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer,
-  directed boolean default true, heap_paths boolean default false,
-  --directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  BEGIN
-         RETURN query SELECT *
-                FROM _pgr_ksp(edges_sql::text, start_vid, end_vid, k, directed, heap_paths);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsKSP(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    k INTEGER,
-
-    directed BOOLEAN DEFAULT TRUE,
-    heap_paths BOOLEAN DEFAULT FALSE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER, OUT path_id INTEGER, OUT path_seq INTEGER,
-    OUT node BIGINT, OUT edge BIGINT,
-    OUT cost FLOAT, OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'withPoints_ksp'
-    LANGUAGE c STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_unnest_matrix(matrix float8[][], OUT start_vid integer, OUT end_vid integer, out agg_cost float8)
-RETURNS SETOF record AS
-
-$body$
-DECLARE
-
-m float8[];
-
-BEGIN
-    start_vid = 1;
-    foreach m slice 1 in  ARRAY matrix
-    LOOP
-        end_vid = 1;
-        foreach agg_cost in  ARRAY m
-        LOOP
-            RETURN next;
-            end_vid = end_vid + 1;
-        END LOOP;
-        start_vid = start_vid + 1;
-    END LOOP;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_tsp(
-    matrix float8[][],
-    startpt INTEGER,
-    endpt INTEGER DEFAULT -1,
-    OUT seq INTEGER,
-    OUT id INTEGER)
-RETURNS SETOF record AS
-$body$
-DECLARE
-table_sql TEXT;
-debuglevel TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(float8[][], integer, integer)';
-
-    CREATE TEMP TABLE ___tmp2 ON COMMIT DROP AS SELECT * FROM _pgr_unnest_matrix( matrix );
-
-
-    startpt := startpt + 1;
-    IF endpt = -1 THEN endpt := startpt;
-    END IF;
-
-
-    RETURN QUERY
-    WITH
-    result AS (
-        SELECT * FROM pgr_TSP(
-        $$SELECT * FROM ___tmp2 $$,
-        startpt, endpt,
-
-        tries_per_temperature :=  500 :: INTEGER,
-        max_changes_per_temperature := 30 :: INTEGER,
-        max_consecutive_non_changes := 500 :: INTEGER,
-
-        randomize:=false)
-    )
-    SELECT (row_number() over(ORDER BY result.seq) - 1)::INTEGER AS seq, (result.node - 1)::INTEGER AS id
-
-    FROM result WHERE NOT(result.node = startpt AND result.seq != 1);
-
-    DROP TABLE ___tmp2;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-
-
-CREATE OR  REPLACE FUNCTION pgr_tsp(sql text, start_id INTEGER, end_id INTEGER default (-1))
-returns setof pgr_costResult as
-$body$
-DECLARE
-table_sql TEXT;
-rec RECORD;
-debuglevel TEXT;
-n BIGINT;
-
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(sql, integer, integer)';
-
-    table_sql := 'CREATE TEMP TABLE ___tmp ON COMMIT DROP AS ' || sql ;
-    EXECUTE table_sql;
-
-
-    BEGIN
-        EXECUTE 'SELECT id, x, y FROM ___tmp' INTO rec;
-        EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                USING ERRCODE = 'XX000',
-                HINT = 'Please verify the column names: id, x, y';
-    END;
-
-    EXECUTE
-    'SELECT
-        pg_typeof(id)::text as id_type,
-        pg_typeof(x)::text as x_type,
-        pg_typeof(y)::text as y_type FROM ___tmp' INTO rec;
-
-
-    IF NOT((rec.id_type in ('integer'::text))
-        AND (rec.x_type = 'double precision'::text)
-        AND (rec.y_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION '''id'' must be of type INTEGER, ''x'' ad ''y'' must be of type FLOAT'
-            USING ERRCODE = 'XX000';
-    END IF;
-
-    EXECUTE 'SELECT count(*) AS n FROM (' || sql || ') AS __a__' INTO rec;
-    n = rec.n;
-
-    RETURN query
-        SELECT (seq - 1)::INTEGER AS seq, node::INTEGER AS id1, node::INTEGER AS id2, cost
-        FROM pgr_eucledianTSP(sql, start_id, end_id,
-
-            tries_per_temperature :=  500 * n :: INTEGER,
-            max_changes_per_temperature := 60 * n :: INTEGER,
-            max_consecutive_non_changes := 500 * n :: INTEGER,
-
-            randomize := false) WHERE seq <= n;
-    DROP TABLE ___tmp;
-
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-create or replace function _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
-  as
-$body$
-declare
-    sql text;
-    r record;
-
-begin
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    sql := 'with nodes as (' || sqlin || ')
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j, st_distance(st_makepoint(a.x, a.y), st_makepoint(b.x, b.y)) as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i';
-
-    for r in execute sql loop
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-
-end;
-$body$
-language plpgsql stable cost 10;
-
-
-CREATE OR REPLACE FUNCTION pgr_TSP(
-    matrix_row_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'newTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_eucledianTSP(
-    coordinates_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'eucledianTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_alphashape(sql text, alpha float8 DEFAULT 0, OUT x float8, OUT y float8)
-    RETURNS SETOF record
-    AS '$libdir/libpgrouting-2.5', 'alphashape'
-    LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pointsAsPolygon(query varchar, alpha float8 DEFAULT 0)
-	RETURNS geometry AS
-	$$
-	DECLARE
-		r record;
-		geoms geometry[];
-		vertex_result record;
-		i int;
-		n int;
-		spos int;
-		q text;
-		x float8[];
-		y float8[];
-
-	BEGIN
-		geoms := array[]::geometry[];
-		i := 1;
-
-		FOR vertex_result IN EXECUTE 'SELECT x, y FROM pgr_alphashape('''|| query || ''', ' || alpha || ')'
-		LOOP
-			x[i] = vertex_result.x;
-			y[i] = vertex_result.y;
-			i := i+1;
-		END LOOP;
-
-		n := i;
-		IF n = 1 THEN
-			RAISE NOTICE 'n = 1';
-			RETURN NULL;
-		END IF;
-
-		spos := 1;
-		q := 'SELECT ST_GeometryFromText(''POLYGON((';
-		FOR i IN 1..n LOOP
-			IF x[i] IS NULL AND y[i] IS NULL THEN
-				q := q || ', ' || x[spos] || ' ' || y[spos] || '))'',0) AS geom;';
-				EXECUTE q INTO r;
-				geoms := geoms || array[r.geom];
-				q := '';
-			ELSE
-				IF q = '' THEN
-					spos := i;
-					q := 'SELECT ST_GeometryFromText(''POLYGON((';
-				END IF;
-				IF i = spos THEN
-					q := q || x[spos] || ' ' || y[spos];
-				ELSE
-					q := q || ', ' || x[i] || ' ' || y[i];
-				END IF;
-			END IF;
-		END LOOP;
-
-		RETURN ST_BuildArea(ST_Collect(geoms));
-	END;
-	$$
-	LANGUAGE 'plpgsql' VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'bd_astar'
-LANGUAGE C VOLATILE;
-
-
-
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed:=true, only_cost:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    BOOLEAN,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false);
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to Many)';
-
-
-
--- one to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to Many)';
-
-
--- bdDijkstra MANY TO MANY
-CREATE OR REPLACE FUNCTION _pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bdDijkstra'
-LANGUAGE c VOLATILE;
-
-
-
--- ONE TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- TODO directed BOOLEAN DEFAULT TRUE,  on version 3
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, false) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, true) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_vid integer,
-    target_vid integer,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_vertex'
-LANGUAGE 'c' IMMUTABLE;
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_edge'
-LANGUAGE 'c' IMMUTABLE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || edges_sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        -- no restrictions then its a dijkstra
-        RETURN query SELECT a.seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_dijkstra(new_sql, start_vid, end_vid, directed) a;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, start_vid, end_vid, directed, has_rcost, restrictions_sql);
-    RETURN;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trspViaVertices(
-    edges_sql TEXT,
-    via_vids ANYARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult3 AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            new_sql :=
-               'WITH old_sql AS (' || edges_sql || ')' ||
-                '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        RETURN query SELECT (row_number() over())::INTEGER, path_id:: INTEGER, node::INTEGER,
-            (CASE WHEN edge = -2 THEN -1 ELSE edge END)::INTEGER, cost
-            FROM pgr_dijkstraVia(new_sql, via_vids, directed, strict:=true) WHERE edge != -1;
-        RETURN;
-    END IF;
-
-
-    -- make the call without contradiction from part of the user
-    RETURN query SELECT * FROM _pgr_trspViaVertices(new_sql, via_vids::INTEGER[], directed, has_rcost, restrictions_sql);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-
-    new_sql := sql;
-    IF (has_reverse != has_reverse_cost) THEN  -- user contradiction
-        IF (has_reverse) THEN
-            -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) THEN
-        -- no restrictions then its a with points
-        RETURN query SELECT a.seq-1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_withpoints(new_sql,
-            '(SELECT 1 as pid, ' || source_eid || 'as edge_id, ' || source_pos || '::float8 as fraction)'
-            || ' UNION '
-            || '(SELECT 2, ' || target_eid || ', ' || target_pos || ')' ::TEXT,
-            -1, -2, directed) a;
-        -- WHERE node != -2;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, source_eid, source_pos, target_eid, target_pos, directed, has_reverse_cost, turn_restrict_sql);
-    RETURN;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-create or replace function _pgr_trspViaVertices(sql text, vids integer[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    lrra boolean := false;
-    seq integer := 0;
-    seq2 integer := 0;
-
-begin
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(vids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from _pgr_trsp(sql, vids[i], vids[i+1], directed, has_rcost, turn_restrict_sql) as a loop
-            -- filter out the individual path ends except the last one
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --raise notice 'rr: %', rr;
-            if rr.id3 = -1 then
-                lrr := rr;
-                lrra := true;
-            else
-                seq := seq + 1;
-                rr.seq := seq;
-                return next rr;
-            end if;
-        end loop;
-    end loop;
-
-    if lrra then
-        seq := seq + 1;
-        lrr.seq := seq;
-        return next lrr;
-    end if;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-
-----------------------------------------------------------------------------------------------------------
-
-create or replace function pgr_trspViaEdges(sql text, eids integer[], pcts float8[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    first boolean := true;
-    seq integer := 0;
-    seq2 integer :=0;
-    has_reverse BOOLEAN;
-    point_is_vertex BOOLEAN := false;
-    edges_sql TEXT;
-    f float;
-
-begin
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql := sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (NOT has_rcost) THEN
-            -- user does not want to use reverse cost column
-            edges_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    FOREACH f IN ARRAY pcts LOOP
-        IF f in (0,1) THEN
-           point_is_vertex := true;
-        END IF;
-    END LOOP;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) AND NOT point_is_vertex THEN
-        -- no restrictions then its a _pgr_withPointsVia
-        RETURN query SELECT a.seq::INTEGER, path_id::INTEGER AS id1, node::INTEGER AS id2, edge::INTEGER AS id3, cost
-        FROM _pgr_withPointsVia(edges_sql, eids, pcts, directed) a;
-        RETURN;
-    END IF;
-
-    if array_length(eids, 1) != array_length(pcts, 1) then
-        raise exception 'The length of arrays eids and pcts must be the same!';
-    end if;
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(eids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from pgr_trsp(edges_sql,
-                                  eids[i], pcts[i],
-                                  eids[i+1], pcts[i+1],
-                                  directed,
-                                  has_rcost,
-                                  turn_restrict_sql) as a loop
-            -- combine intermediate via costs when cost is split across
-            -- two parts of a segment because it stops it and
-            -- restarts the next leg also on it
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --
-            -- there are multiple condition we have to deal with
-            -- between the end of one leg and start of the next
-            -- 1. same vertex_id. edge_id=-1; drop record with edge_id=-1
-            -- means: path ends on vertex
-            -- NOTICE:  rr: (19,1,44570022,-1,0)
-            -- NOTICE:  rr: (0,2,44570022,1768045,2.89691196717448)
-            -- 2. vertex_id=-1; sum cost components
-            -- means: path end/starts with the segment
-            -- NOTICE:  rr: (11,2,44569628,1775909,9.32885885148532)
-            -- NOTICE:  rr: (0,3,-1,1775909,0.771386350984395)
-
-            --raise notice 'rr: %', rr;
-            if first then
-                lrr := rr;
-                first := false;
-            else
-                if lrr.id3 = -1 then
-                    lrr := rr;
-                elsif lrr.id3 = rr.id3 then
-                    lrr.cost := lrr.cost + rr.cost;
-                    if rr.id2 = -1 then
-                        rr.id2 := lrr.id2;
-                    end if;
-                else
-                    seq := seq + 1;
-                    lrr.seq := seq;
-                    return next lrr;
-                    lrr := rr;
-                end if;
-            end if;
-        end loop;
-    end loop;
-
-    seq := seq + 1;
-    lrr.seq := seq;
-    return next lrr;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-----------------------------
---    MANY TO MANY
-----------------------------
-
-
-CREATE OR REPLACE FUNCTION _pgr_maxflow(
-    edges_sql TEXT,
-    sources ANYARRAY,
-    targets ANYARRAY,
-    algorithm INTEGER DEFAULT 1,
-    only_flow BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'max_flow_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-
-------------------------------------
--- 3 pgr_edmondsKarp
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 2 boykov_kolmogorov
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 1 pgr_pushRelabel
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT flow
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], algorithm := 1, only_flow := true);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], $3::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, $2::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxCardinalityMatch(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'edge_disjoint_paths_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    bigint,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    IN directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_contractGraph(
-    edges_sql TEXT,
-    contraction_order BIGINT[],
-    max_cycles integer DEFAULT 1,
-    forbidden_vertices BIGINT[] DEFAULT ARRAY[]::BIGINT[],
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT type TEXT,
-    OUT id BIGINT,
-    OUT contracted_vertices BIGINT[],
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost float)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'contractGraph'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliver(
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_cell_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliver'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliverEuclidean (
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliverEuclidean'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_vrpOneDepot(
-    TEXT, -- customers_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_sql
-    INTEGER, -- depot_id
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-orders_sql TEXT;
-trucks_sql TEXT;
-matrix_sql TEXT;
-final_sql TEXT;
-BEGIN
-
-    orders_sql = $$WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    pickups AS (
-        SELECT id, x AS p_x, y AS p_y, open_time AS p_open, close_time AS p_close, service_time AS p_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vrp_orders.id AS id, order_unit AS demand, pickups.id AS p_node_id, p_x, p_y, p_open, p_close, p_service,
-    vrp_orders.id AS d_node_id, x AS d_x, y AS d_y, open_time AS d_open, close_time AS d_close, service_time AS d_service
-    FROM vrp_orders, pickups
-    WHERE vrp_orders.id != $$ || $4;
-
-
-    trucks_sql = $$ WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    vrp_vehicles AS ($$ || $2 || $$ ),
-    starts AS (
-        SELECT id AS start_node_id, x AS start_x, y AS start_y, open_time AS start_open, close_time AS start_close, service_time AS start_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vehicle_id AS id, capacity, starts.* FROM vrp_vehicles, starts;
-    $$;
-
-    final_sql = '
-    SELECT * FROM _pgr_pickDeliver(
-            $$' || orders_sql || '$$,
-            $$' || trucks_sql || '$$,
-            $$' || $3 || '$$,
-            max_cycles := 2,
-            initial_sol := 4 ); ';
-
-    RAISE DEBUG '%', orders_sql;
-    RAISE DEBUG '%', trucks_sql;
-    RAISE DEBUG '%', $3;
-    RAISE DEBUG '%', final_sql;
-
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
------------------------------------------------------------------------
--- Core function for vrp with sigle depot computation
--- See README for description
------------------------------------------------------------------------
---
---
-
-create or replace function pgr_vrpOneDepot(
-	order_sql text,
-	vehicle_sql text,
-	cost_sql text,
-	depot_id integer,
-
-	OUT oid integer,
-	OUT opos integer,
-	OUT vid integer,
-	OUT tarrival integer,
-	OUT tdepart integer)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT order_id::INTEGER, stop_seq::INTEGER, vehicle_id::INTEGER, arrival_time::INTEGER, departure_time::INTEGER
-    FROM _pgr_vrpOneDepot($1, $2,
-       '
-            SELECT src_id AS start_vid, dest_id AS end_vid, traveltime AS agg_cost FROM ('||$3||') AS a
-       ',
-        $4
-    ) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_gsoc_vrppdtw(
-    customers_sql TEXT,
-    max_vehicles INTEGER,
-    capacity FLOAT,
-    speed FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-
-    OUT seq INTEGER,
-    OUT vehicle_id INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT stop_id BIGINT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-    orders_sql TEXT;
-    vehicles_sql TEXT;
-    final_sql TEXT;
-BEGIN
-    orders_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        pickups AS (
-            SELECT id, demand, x as p_x, y as p_y, opentime as p_open, closetime as p_close, servicetime as p_service
-            FROM  customer_data WHERE pindex = 0 AND id != 0
-        ),
-        deliveries AS (
-            SELECT pindex AS id, x as d_x, y as d_y, opentime as d_open, closetime as d_close, servicetime as d_service
-            FROM  customer_data WHERE dindex = 0 AND id != 0
-        )
-        SELECT * FROM pickups JOIN deliveries USING(id) ORDER BY pickups.id
-    $$;
-
-    vehicles_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ )
-        SELECT id, x AS start_x, y AS start_y,
-            opentime AS start_open, closetime AS start_close, $$ ||
-            capacity || $$ AS capacity, $$ || max_vehicles || $$ AS number, $$ || speed || $$ AS speed
-            FROM customer_data WHERE id = 0 LIMIT 1
-        $$;
---  seq | vehicle_id | vehicle_seq | stop_id | travel_time | arrival_time | wait_time | service_time | departure_time
-    final_sql = $$ WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        p_deliver AS (SELECT * FROM _pgr_pickDeliverEuclidean('$$ || orders_sql || $$',  '$$ || vehicles_sql || $$',  1, $$ || max_cycles || $$ )),
-        picks AS (SELECT p_deliver.*, pindex, dindex, id AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 2)),
-        delivers AS (SELECT p_deliver.*, pindex, dindex, dindex AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 3)),
-        depots AS (SELECT p_deliver.*, 0 as pindex, 0 as dindex, 0 AS the_id FROM p_deliver WHERE (stop_type IN (-1,1,6))),
-        the_union AS (SELECT * FROM picks UNION SELECT * FROM delivers UNION SELECT * from depots)
-
-        SELECT (row_number() over(ORDER BY a.seq))::INTEGER, vehicle_seq, a.stop_seq, the_id::BIGINT, a.travel_time, a.arrival_time, a.wait_time, a.service_time, a.departure_time
-        FROM (SELECT * FROM the_union) AS a ORDER BY a.seq
-        $$;
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-CREATE OR REPLACE FUNCTION pgr_gsoc_vrppdtw(
-    sql text,
-    vehicle_num INTEGER,
-    capacity INTEGER
-)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-customers_sql TEXT;
-BEGIN
-    RETURN query
-         SELECT a.seq, vehicle_id::INTEGER AS id1, stop_id::INTEGER AS id2, departure_time AS cost
-        FROM _pgr_gsoc_vrppdtw($1, $2, $3, 1, 30) AS a WHERE vehicle_id NOT IN (-2);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION _pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN,
-    driving_side CHAR,
-    details BOOLEAN,
-
-    only_cost BOOLEAN DEFAULT false, -- gets path
-    normal BOOLEAN DEFAULT true, -- false for many to onu
-
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'withPoints'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], ARRAY[$4]::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], ARRAY[$4]::bigint[], $5, $6, $7, FALSE, FALSE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], $4::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], $4::BIGINT[], $5,  $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION  _pgr_withPointsVia(
-    sql text,
-    via_edges bigint[],
-    fraction float[],
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  has_rcost boolean;
-  sql_new_vertices text := ' ';
-  sql_on_vertex text;
-  v_union text := ' ';
-  dummyrec record;
-  rec1 record;
-  via_vertices int[];
-  sql_safe text;
-  new_edges text;
-  BEGIN
-     BEGIN
-        sql_safe = 'SELECT id, source, target, cost, reverse_cost FROM ('|| sql || ') AS __a';
-
-        EXECUTE 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||sql_safe||' ) AS __b__ limit 1 ' INTO rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-     END;
-
-
-      IF array_length(via_edges, 1) != array_length(fraction, 1) then
-        RAISE EXCEPTION 'The length of via_edges is different of length of via_edges';
-      END IF;
-
-      FOR i IN 1 .. array_length(via_edges, 1)
-      LOOP
-          IF fraction[i] = 0 THEN
-              sql_on_vertex := 'SELECT source FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.source;
-          ELSE IF fraction[i] = 1 THEN
-              sql_on_vertex := 'SELECT target FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.target;
-          ELSE
-              via_vertices[i] = -i;
-              IF has_rcost THEN
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost,
-                              reverse_cost * (1 - ' || fraction[i] || ')  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost,
-                              reverse_cost *  ' || fraction[i] || '  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' where id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               ELSE
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               END IF;
-          END IF;
-          END IF;
-     END LOOP;
-
-     IF sql_new_vertices = ' ' THEN
-         new_edges := sql;
-     ELSE
-         IF has_rcost THEN
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost,
-                         lead(cost) OVER w  - cost AS reverse_cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL),
-                   second_part AS ( SELECT * FROM (SELECT id, lead(source) OVER w  AS source, source as target,
-                         reverse_cost - lead(reverse_cost) OVER w  AS cost,
-                         reverse_cost - lead(reverse_cost) OVER w  AS reverse_cost
-                      FROM  the_union  WHERE target > 0 and reverse_cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY reverse_cost ASC) ) as n2
-                      WHERE source IS NOT NULL),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part)
-                             UNION
-                       (SELECT * FROM second_part) ) _union )
-                  SELECT *  FROM more_union';
-         ELSE
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL ),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part) ) _union )
-                  SELECT *  FROM more_union';
-          END IF;
-      END IF;
-
- -- raise notice '%', new_edges;
-     sql_new_vertices := sql_new_vertices || v_union || ' (' || sql || ')';
-     RETURN query SELECT *
-         FROM pgr_dijkstraVia(new_edges, via_vertices, directed, has_rcost);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_lineGraph(
-    TEXT, -- edges_sql
-    directed BOOLEAN DEFAULT true,
-    OUT seq INTEGER,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost FLOAT,
-    OUT reverse_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'lineGraph'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_connectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'connectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_strongComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'strongComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_biconnectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the edge in the component
-    OUT n_seq INTEGER,          -- nth_seq of the edge in the component
-    OUT edge BIGINT)            -- the number of the edge
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'biconnectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_articulationPoints(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'articulationPoints'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bridges(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT edge BIGINT)            -- the number of the edge 
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bridges'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createtopology(edge_table text, tolerance double precision,
-		   the_geom text default 'the_geom', id text default 'id',
-		   source text default 'source', target text default 'target',rows_where text default 'true',
-		   clean boolean default FALSE)
-RETURNS VARCHAR AS
-$BODY$
-
-DECLARE
-    points record;
-    sridinfo record;
-    source_id bigint;
-    target_id bigint;
-    totcount bigint;
-    rowcount bigint;
-    srid integer;
-    sql text;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    notincluded integer;
-    i integer;
-    naming record;
-    info record;
-    flag boolean;
-    query text;
-    idtype text;
-    gtype text;
-    sourcetype text;
-    targettype text;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-    msgKind int;
-    emptied BOOLEAN;
-
-BEGIN
-    msgKind = 1; -- notice
-    fnName = 'pgr_createTopology';
-    raise notice 'PROCESSING:';
-    raise notice 'pgr_createTopology(''%'', %, ''%'', ''%'', ''%'', ''%'', rows_where := ''%'', clean := %)',edge_table,tolerance,the_geom,id,source,target,rows_where, clean;
-    execute 'show client_min_messages' into debuglevel;
-
-
-    raise notice 'Performing checks, please wait .....';
-
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-        sname=naming.sname;
-        tname=naming.tname;
-        tabname=sname||'.'||tname;
-        vname=tname||'_vertices_pgr';
-        vertname= sname||'.'||vname;
-        rows_where = ' AND ('||rows_where||')';
-      raise DEBUG '     --> OK';
-
-
-      raise debug 'Checking column names in edge table';
-        select * into idname     from _pgr_getColumnName(sname, tname,id,2,fnName);
-        select * into sourcename from _pgr_getColumnName(sname, tname,source,2,fnName);
-        select * into targetname from _pgr_getColumnName(sname, tname,target,2,fnName);
-        select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2,fnName);
-
-
-        err = sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname;
-        perform _pgr_onError( err, 2, fnName,
-               'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-	       'Column names are OK');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking column types in edge table';
-        select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-        select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-        select * into idtype from _pgr_getColumnType(sname,tname,idname,1, fnName);
-
-        err = idtype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column id:'|| idname, ' Expected type of '|| idname || ' is integer,smallint or bigint but '||idtype||' was found');
-
-        err = sourcetype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column source:'|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-        err = targettype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column target:'|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or bigint but '||targettype||' was found');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         raise debug '%',query;
-         EXECUTE query INTO sridinfo;
-
-         err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-         perform _pgr_onError(err, 2, fnName,
-	     'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-
-         srid := sridinfo.srid;
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking and creating indices in edge table';
-        perform _pgr_createIndex(sname, tname , idname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-
-        gname=quote_ident(gname);
-        idname=quote_ident(idname);
-        sourcename=quote_ident(sourcename);
-        targetname=quote_ident(targetname);
-      raise DEBUG '     --> OK';
-
-
-
-
-
-    BEGIN
-        -- issue #193 & issue #210 & #213
-        -- this sql is for trying out the where clause
-        -- the select * is to avoid any column name conflicts
-        -- limit 1, just try on first record
-        -- if the where clasuse is ill formed it will be caught in the exception
-        sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-        EXECUTE sql into dummyRec;
-        -- end
-
-        -- if above where clasue works this one should work
-        -- any error will be caught by the exception also
-        sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NOT NULL AND '||
-	    idname||' IS NOT NULL)=false '||rows_where;
-        EXECUTE SQL  into notincluded;
-
-        if clean then
-            raise debug 'Cleaning previous Topology ';
-               execute 'UPDATE ' || _pgr_quote_ident(tabname) ||
-               ' SET '||sourcename||' = NULL,'||targetname||' = NULL';
-        else
-            raise debug 'Creating topology for edges with non assigned topology';
-            if rows_where=' AND (true)' then
-                rows_where=  ' and ('||quote_ident(sourcename)||' is null or '||quote_ident(targetname)||' is  null)';
-            end if;
-        end if;
-        -- my thoery is that the select Count(*) will never go through here
-        EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-             RAISE NOTICE '%',sql;
-             RETURN 'FAIL';
-    END;
-
-    BEGIN
-         raise DEBUG 'initializing %',vertname;
-         execute 'select * from _pgr_getTableName('||quote_literal(vertname)
-                                                  || ',0,' || quote_literal(fnName) ||' )' into naming;
-         emptied = false;
-         set client_min_messages  to warning;
-         IF sname=naming.sname AND vname=naming.tname  THEN
-            if clean then
-                execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-                execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-                emptied = true;
-            end if;
-         ELSE -- table doesn't exist
-            execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-            emptied = true;
-         END IF;
-         IF (emptied) THEN
-             execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-	         quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-             perform _pgr_createIndex(vertname , 'the_geom'::text , 'gist'::text);
-         END IF;
-         execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id"}''::text[])' into naming;
-         execute 'set client_min_messages  to '|| debuglevel;
-         raise DEBUG  '  ------>OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: something went wrong when initializing the verties table';
-             RETURN 'FAIL';
-    END;
-
-
-
-    raise notice 'Creating Topology, Please wait...';
-        rowcount := 0;
-        FOR points IN EXECUTE 'SELECT ' || idname || '::bigint AS id,'
-            || ' _pgr_StartPoint(' || gname || ') AS source,'
-            || ' _pgr_EndPoint('   || gname || ') AS target'
-            || ' FROM '  || _pgr_quote_ident(tabname)
-            || ' WHERE ' || gname || ' IS NOT NULL AND ' || idname||' IS NOT NULL '||rows_where
-        LOOP
-
-            rowcount := rowcount + 1;
-            IF rowcount % 1000 = 0 THEN
-                RAISE NOTICE '% edges processed', rowcount;
-            END IF;
-
-
-            source_id := _pgr_pointToId(points.source, tolerance,vertname,srid);
-            target_id := _pgr_pointToId(points.target, tolerance,vertname,srid);
-            BEGIN
-                sql := 'UPDATE ' || _pgr_quote_ident(tabname) ||
-                    ' SET '||sourcename||' = '|| source_id::text || ','||targetname||' = ' || target_id::text ||
-                    ' WHERE ' || idname || ' =  ' || points.id::text;
-
-                IF sql IS NULL THEN
-                    RAISE NOTICE 'WARNING: UPDATE % SET source = %, target = % WHERE % = % ', tabname, source_id::text, target_id::text, idname,  points.id::text;
-                ELSE
-                    EXECUTE sql;
-                END IF;
-                EXCEPTION WHEN OTHERS THEN
-                    RAISE NOTICE '%', SQLERRM;
-                    RAISE NOTICE '%',sql;
-                    RETURN 'FAIL';
-            end;
-        END LOOP;
-        raise notice '-------------> TOPOLOGY CREATED FOR  % edges', rowcount;
-        RAISE NOTICE 'Rows with NULL geometry or NULL id: %',notincluded;
-        Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname), _pgr_quote_ident(vertname);
-        raise notice '----------------------------------------------';
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_createTopology(text, double precision,text,text,text,text,text,boolean)
-IS 'args: edge_table,tolerance, the_geom:=''the_geom'',source:=''source'', target:=''target'',rows_where:=''true'' - fills columns source and target in the geometry table and creates a vertices table for selected rows';
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
-RETURNS character varying AS
-$BODY$
-
-DECLARE
-    points record;
-    seg record;
-    naming record;
-    sridinfo record;
-    srid integer;
-    ecnt integer;
-    vertname text;
-    sname text;
-    tname text;
-    vname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    geotype text;
-    gname text;
-    tabName text;
-    flag boolean ;
-    query text;
-    selectionquery text;
-    i integer;
-    tot integer;
-    NumIsolated integer;
-    numdeadends integer;
-    numgaps integer;
-    NumCrossing integer;
-    numRings integer;
-    debuglevel text;
-
-
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeGraph(''%'',%,''%'',''%'',''%'',''%'',''%'')',edge_table,tolerance,the_geom,id,source,target,rows_where;
-  raise notice 'Performing checks, please wait ...';
-  execute 'show client_min_messages' into debuglevel;
-
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-    raise DEBUG '     --> OK';
-
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","cnt","chk"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET cnt=0 ,chk=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into idname     from _pgr_getColumnName(sname, tname,id,2);
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname, 2,
-                       'pgr_analyzeGraph',  'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-                       'Column names are OK');
-
-        raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-   BEGIN
-       raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         EXECUTE QUERY INTO sridinfo;
-
-         perform _pgr_onError( sridinfo IS NULL OR sridinfo.srid IS NULL,2,
-                 'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname,
-                 'SRID of '||gname||' is '||sridinfo.srid);
-
-         IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-             RAISE NOTICE ' Can not determine the srid of the geometry "%" in table %', the_geom,tabname;
-             RETURN 'FAIL';
-         END IF;
-         srid := sridinfo.srid;
-         raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM;--issue 210,211,213
-             RAISE NOTICE 'ERROR: something went wrong when checking for SRID of % in table %', the_geom,tabname;
-             RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-       raise debug 'Checking  indices in edge table';
-       perform _pgr_createIndex(tabname , idname , 'btree');
-       perform _pgr_createIndex(tabname , sourcename , 'btree');
-       perform _pgr_createIndex(tabname , targetname , 'btree');
-       perform _pgr_createIndex(tabname , gname , 'gist');
-
-       gname=quote_ident(gname);
-       sourcename=quote_ident(sourcename);
-       targetname=quote_ident(targetname);
-       idname=quote_ident(idname);
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking indices';
-          RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-        query='select count(*) from '||_pgr_quote_ident(tabname)||' where true  '||rows_where;
-        EXECUTE query into ecnt;
-        raise DEBUG '-->Rows Where condition: OK';
-        raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-            RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-            RAISE NOTICE 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-            RAISE NOTICE '%',query;
-            RETURN 'FAIL';
-    END;
-
-    selectionquery ='with
-           selectedRows as( (select '||sourcename||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||')
-                           union
-                           (select '||targetname||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||'))';
-
-
-
-
-
-   BEGIN
-       RAISE NOTICE 'Analyzing for dead ends. Please wait...';
-       query= 'with countingsource as (select a.'||sourcename||' as id,count(*) as cnts
-               from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||sourcename||')
-                     ,countingtarget as (select a.'||targetname||' as id,count(*) as cntt
-                    from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||targetname||')
-                   ,totalcount as (select id,case when cnts is null and cntt is null then 0
-                                                   when cnts is null then cntt
-                                                   when cntt is null then cnts
-                                                   else cnts+cntt end as totcnt
-                                   from ('||_pgr_quote_ident(vertname)||' as a left
-                                   join countingsource as t using(id) ) left join countingtarget using(id))
-               update '||_pgr_quote_ident(vertname)||' as a set cnt=totcnt from totalcount as b where a.id=b.id';
-       raise debug '%',query;
-       execute query;
-       query=selectionquery||'
-              SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE cnt=1 and id in (select id from selectedRows)';
-       raise debug '%',query;
-       execute query  INTO numdeadends;
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-          RAISE NOTICE 'ERROR: something went wrong when analizing for dead ends';
-          RETURN 'FAIL';
-   END;
-
-
-
-    BEGIN
-          RAISE NOTICE 'Analyzing for gaps. Please wait...';
-          query = 'with
-                   buffer as (select id,st_buffer(the_geom,'||tolerance||') as buff from '||_pgr_quote_ident(vertname)||' where cnt=1)
-                   ,veryclose as (select b.id,st_crosses(a.'||gname||',b.buff) as flag
-                   from  (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) as a
-                   join buffer as b on (a.'||gname||'&&b.buff)
-                   where '||sourcename||'!=b.id and '||targetname||'!=b.id )
-                   update '||_pgr_quote_ident(vertname)||' set chk=1 where id in (select distinct id from veryclose where flag=true)';
-          raise debug '%' ,query;
-          execute query;
-          GET DIAGNOSTICS  numgaps= ROW_COUNT;
-          raise DEBUG '     --> OK';
-          EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for gaps';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for isolated edges. Please wait...';
-        query=selectionquery|| ' SELECT count(*) FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' )  as a,
-                                                 '||_pgr_quote_ident(vertname)||' as b,
-                                                 '||_pgr_quote_ident(vertname)||' as c
-                            WHERE b.id in (select id from selectedRows) and a.'||sourcename||' =b.id
-                            AND b.cnt=1 AND a.'||targetname||' =c.id
-                            AND c.cnt=1';
-        raise debug '%' ,query;
-        execute query  INTO NumIsolated;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for isolated edges';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for ring geometries. Please wait...';
-        execute 'SELECT geometrytype('||gname||')  FROM '||_pgr_quote_ident(tabname) limit 1 into geotype;
-        IF (geotype='MULTILINESTRING') THEN
-            query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                 WHERE true  '||rows_where||' and st_isRing(st_linemerge('||gname||'))';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        ELSE query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                  WHERE true  '||rows_where||' and st_isRing('||gname||')';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        END IF;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for ring geometries';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for intersections. Please wait...';
-        query = 'select count(*) from (select distinct case when a.'||idname||' < b.'||idname||' then a.'||idname||'
-                                                        else b.'||idname||' end,
-                                                   case when a.'||idname||' < b.'||idname||' then b.'||idname||'
-                                                        else a.'||idname||' end
-                                    FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as a
-                                    JOIN (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as b
-                                    ON (a.'|| gname||' && b.'||gname||')
-                                    WHERE a.'||idname||' != b.'||idname|| '
-                                        and (a.'||sourcename||' in (b.'||sourcename||',b.'||targetname||')
-                                              or a.'||targetname||' in (b.'||sourcename||',b.'||targetname||')) = false
-                                        and st_intersects(a.'||gname||', b.'||gname||')=true) as d ';
-        raise debug '%' ,query;
-        execute query  INTO numCrossing;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for intersections';
-            RETURN 'FAIL';
-    END;
-
-
-
-
-    RAISE NOTICE '            ANALYSIS RESULTS FOR SELECTED EDGES:';
-    RAISE NOTICE '                  Isolated segments: %', NumIsolated;
-    RAISE NOTICE '                          Dead ends: %', numdeadends;
-    RAISE NOTICE 'Potential gaps found near dead ends: %', numgaps;
-    RAISE NOTICE '             Intersections detected: %',numCrossing;
-    RAISE NOTICE '                    Ring geometries: %',numRings;
-
-
-    RETURN 'OK';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_analyzeGraph(text,double precision,text,text,text,text,text) IS 'args: edge_table, tolerance,the_geom:=''the_geom'',id:=''id'',source column:=''source'', target column:=''target'' rows_where:=''true'' - creates a vertices table based on the geometry for selected rows';
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzeOneway(
-   edge_table text,
-   s_in_rules TEXT[],
-   s_out_rules TEXT[],
-   t_in_rules TEXT[],
-   t_out_rules TEXT[],
-   two_way_if_null boolean default true,
-   oneway text default 'oneway',
-   source text default 'source',
-   target text default 'target')
-  RETURNS text AS
-$BODY$
-
-
-DECLARE
-    rule text;
-    ecnt integer;
-    instr text;
-    naming record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    owname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    vertname text;
-    debuglevel text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeOneway(''%'',''%'',''%'',''%'',''%'',''%'',''%'',''%'',%)',
-		edge_table, s_in_rules , s_out_rules, t_in_rules, t_out_rules, oneway, source ,target,two_way_if_null ;
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    raise DEBUG '     --> OK';
-    EXCEPTION WHEN raise_exception THEN
-      RAISE NOTICE 'ERROR: something went wrong checking the table name';
-      RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","ein","eout"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET eout=0 ,ein=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into owname from _pgr_getColumnName(sname, tname,oneway,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,owname) or  targetname=owname, 2,
-                       '_pgr_createToplogy',  'Two columns share the same name', 'Parameter names for oneway,source and target  must be different',
-                       'Column names are OK');
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-
-
-    RAISE NOTICE 'Analyzing graph for one way street errors.';
-
-    rule := CASE WHEN two_way_if_null
-            THEN owname || ' IS NULL OR '
-            ELSE '' END;
-
-    instr := '''' || array_to_string(s_in_rules, ''',''') || '''';
-       EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-      from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-     where a.id=b.'|| sourcename;
-
-    RAISE NOTICE 'Analysis 25%% complete ...';
-
-    instr := '''' || array_to_string(t_in_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 50%% complete ...';
-
-    instr := '''' || array_to_string(s_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-        where a.id=b.'|| sourcename;
-    RAISE NOTICE 'Analysis 75%% complete ...';
-
-    instr := '''' || array_to_string(t_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 100%% complete ...';
-
-    EXECUTE 'SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE ein=0 or eout=0' INTO ecnt;
-
-    RAISE NOTICE 'Found % potential problems in directionality' ,ecnt;
-
-    RETURN 'OK';
-
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_analyzeOneway(text,TEXT[],TEXT[], TEXT[],TEXT[],boolean,text,text,text)
-IS 'args:edge_table , s_in_rules , s_out_rules, t_in_rules , t_out_rules, two_way_if_null:= true, oneway:=''oneway'',source:= ''source'',target:=''target'' - Analizes the directionality of the edges based on the rules';
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createverticestable(
-   edge_table text,
-   the_geom text DEFAULT 'the_geom'::text,
-   source text DEFAULT 'source'::text,
-   target text DEFAULT 'target'::text,
-    rows_where text DEFAULT 'true'::text
-)
-  RETURNS text AS
-$BODY$
-DECLARE
-    naming record;
-    sridinfo record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    sourcename text;
-    targetname text;
-    query text;
-    ecnt bigint;
-    srid integer;
-    sourcetype text;
-    targettype text;
-    sql text;
-    totcount integer;
-    i integer;
-    notincluded integer;
-    included integer;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-
-
-BEGIN
-  fnName = 'pgr_createVerticesTable';
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_createVerticesTable(''%'',''%'',''%'',''%'',''%'')',edge_table,the_geom,source,target,rows_where;
-  execute 'show client_min_messages' into debuglevel;
-
-  raise notice 'Performing checks, please wait .....';
-
-  RAISE DEBUG 'Checking % exists',edge_table;
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-  raise debug '--> Edge table exists: OK';
-
-  raise debug 'Checking column names';
-    select * into sourcename from _pgr_getColumnName(sname, tname,source,2, fnName);
-    select * into targetname from _pgr_getColumnName(sname, tname,target,2, fnName);
-    select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2, fnName);
-
-
-    err = sourcename in (targetname,gname) or  targetname=gname;
-    perform _pgr_onError(err, 2, fnName,
-        'Two columns share the same name', 'Parameter names for the_geom,source and target  must be different');
-  raise debug '--> Column names: OK';
-
-  raise debug 'Checking column types in edge table';
-    select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-    select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-
-
-    err = sourcetype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column source: '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-    err = targettype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column target: '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found');
-
-  raise debug '-->Column types:OK';
-
-  raise debug 'Checking SRID of geometry column';
-     query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-        || ' FROM ' || _pgr_quote_ident(tabname)
-        || ' WHERE ' || quote_ident(gname)
-        || ' IS NOT NULL LIMIT 1';
-     raise debug '%',query;
-     EXECUTE query INTO sridinfo;
-
-     err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-     perform _pgr_onError(err, 2, fnName,
-         'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-     srid := sridinfo.srid;
-  raise DEBUG '     --> OK';
-
-  raise debug 'Checking and creating Indices';
-     perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-  raise DEBUG '-->Check and create indices: OK';
-
-     gname=quote_ident(gname);
-     sourcename=quote_ident(sourcename);
-     targetname=quote_ident(targetname);
-
-
-  BEGIN
-  raise debug 'Checking Condition';
-    -- issue #193 & issue #210 & #213
-    -- this sql is for trying out the where clause
-    -- the select * is to avoid any column name conflicts
-    -- limit 1, just try on first record
-    -- if the where clasuse is ill formed it will be caught in the exception
-    sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-    EXECUTE sql into dummyRec;
-    -- end
-
-    -- if above where clasue works this one should work
-    -- any error will be caught by the exception also
-    sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NULL or '||
-		sourcename||' is null or '||targetname||' is null)=true '||rows_where;
-    raise debug '%',sql;
-    EXECUTE SQL  into notincluded;
-    EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-
-
-
-  BEGIN
-     raise DEBUG 'initializing %',vertname;
-       execute 'select * from _pgr_getTableName('||quote_literal(vertname)||',0)' into naming;
-       IF sname=naming.sname  AND vname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-       ELSE
-           set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-       END IF;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-                quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-       execute 'CREATE INDEX '||quote_ident(vname||'_the_geom_idx')||' ON '||_pgr_quote_ident(vertname)||'  USING GIST (the_geom)';
-       execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-       EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Initializing vertex table';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise notice 'Populating %, please wait...',vertname;
-       sql= 'with
-		lines as ((select distinct '||sourcename||' as id, _pgr_startpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-		                  ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||')
-			union (select distinct '||targetname||' as id,_pgr_endpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-			          ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||'))
-		,numberedLines as (select row_number() OVER (ORDER BY id) AS i,* from lines )
-		,maxid as (select id,max(i) as maxi from numberedLines group by id)
-		insert into '||_pgr_quote_ident(vertname)||'(id,the_geom)  (select id,the_geom  from numberedLines join maxid using(id) where i=maxi order by id)';
-       RAISE debug '%',sql;
-       execute sql;
-       GET DIAGNOSTICS totcount = ROW_COUNT;
-
-       sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' a, '||_pgr_quote_ident(vertname)||' b
-            where '||sourcename||'=b.id and '|| targetname||' in (select id from '||_pgr_quote_ident(vertname)||')';
-       RAISE debug '%',sql;
-       execute sql into included;
-
-
-
-       execute 'select max(id) from '||_pgr_quote_ident(vertname) into ecnt;
-       execute 'SELECT setval('||quote_literal(vertname||'_id_seq')||','||coalesce(ecnt,1)||' , false)';
-       raise notice '  ----->   VERTICES TABLE CREATED WITH  % VERTICES', totcount;
-       raise notice '                                       FOR   %  EDGES', included+notincluded;
-       RAISE NOTICE '  Edges with NULL geometry,source or target: %',notincluded;
-       RAISE NOTICE '                            Edges processed: %',included;
-       Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname),_pgr_quote_ident(vertname);
-       raise notice '----------------------------------------------';
-    END;
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_createVerticesTable(text,text,text,text,text)
-IS 'args: edge_table, the_geom:=''the_geom'',source:=''source'', target:=''target'' rows_where:=''true'' - creates a vertices table based on the source and target identifiers for selected rows';
-
-
-CREATE OR REPLACE FUNCTION pgr_nodeNetwork(edge_table text, tolerance double precision,
-			id text default 'id', the_geom text default 'the_geom', table_ending text default 'noded',
-            rows_where text DEFAULT ''::text, outall boolean DEFAULT false) RETURNS text AS
-$BODY$
-DECLARE
-	
-	p_num int := 0;
-	p_ret text := '';
-    pgis_ver_old boolean := _pgr_versionless(postgis_lib_version(), '2.1.0.0');
-    vst_line_substring text;
-    vst_line_locate_point text;
-    intab text;
-    outtab text;
-    n_pkey text;
-    n_geom text;
-    naming record;
-    sname text;
-    tname text;
-    outname text;
-    srid integer;
-    sridinfo record;
-    splits bigint;
-    touched bigint;
-    untouched bigint;
-    geomtype text;
-    debuglevel text;
-    rows_where text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_nodeNetwork(''%'', %, ''%'', ''%'', ''%'', ''%'',  %)',
-    edge_table, tolerance, id,  the_geom, table_ending, rows_where, outall;
-  raise notice 'Performing checks, please wait .....';
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',0)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-	RAISE NOTICE '-------> % not found',edge_table;
-        RETURN 'FAIL';
-    ELSE
-	RAISE DEBUG '  -----> OK';
-    END IF;
-
-    intab=sname||'.'||tname;
-    outname=tname||'_'||table_ending;
-    outtab= sname||'.'||outname;
-    rows_where = CASE WHEN length(rows_where) > 2 and not outall THEN ' AND (' || rows_where || ')' ELSE '' END;
-    rows_where = CASE WHEN length(rows_where) > 2 THEN ' WHERE (' || rows_where || ')' ELSE '' END;
-  END;
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',id,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(id)||')' INTO n_pkey;
-       IF n_pkey is NULL then
-          raise notice  'ERROR: id column "%"  not found in %',id,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',the_geom,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(the_geom)||')' INTO n_geom;
-       IF n_geom is NULL then
-          raise notice  'ERROR: the_geom  column "%"  not found in %',the_geom,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-  IF n_pkey=n_geom THEN
-	raise notice  'ERROR: id and the_geom columns have the same name "%" in %',n_pkey,intab;
-        RETURN 'FAIL';
-  END IF;
-
-  BEGIN
-       	raise DEBUG 'Checking the SRID of the geometry "%"', n_geom;
-       	EXECUTE 'SELECT ST_SRID(' || quote_ident(n_geom) || ') as srid '
-          		|| ' FROM ' || _pgr_quote_ident(intab)
-          		|| ' WHERE ' || quote_ident(n_geom)
-          		|| ' IS NOT NULL LIMIT 1' INTO sridinfo;
-       	IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-        	RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           	RETURN 'FAIL';
-       	END IF;
-       	srid := sridinfo.srid;
-       	raise DEBUG '  -----> SRID found %',srid;
-       	EXCEPTION WHEN OTHERS THEN
-           		RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           		RETURN 'FAIL';
-  END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_pkey,intab;
-      if (_pgr_isColumnIndexed(intab,n_pkey)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding  index "%_%_idx".',n_pkey,intab;
-
-	set client_min_messages  to warning;
-        execute 'create  index '||tname||'_'||n_pkey||'_idx on '||_pgr_quote_ident(intab)||' using btree('||quote_ident(n_pkey)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_geom,intab;
-      if (_pgr_iscolumnindexed(intab,n_geom)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding unique index "%_%_gidx".',intab,n_geom;
-	set client_min_messages  to warning;
-        execute 'CREATE INDEX '
-            || quote_ident(tname || '_' || n_geom || '_gidx' )
-            || ' ON ' || _pgr_quote_ident(intab)
-            || ' USING gist (' || quote_ident(n_geom) || ')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
----------------
-    BEGIN
-       raise DEBUG 'initializing %',outtab;
-       execute 'select * from _pgr_getTableName('||quote_literal(outtab)||',0)' into naming;
-       IF sname=naming.sname  AND outname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(outtab)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(outname)||','||quote_literal(n_geom)||')';
-       ELSE
-	   set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(outtab)||' (id bigserial PRIMARY KEY,old_id integer,sub_id integer,
-								source bigint,target bigint)';
-       END IF;
-       execute 'select geometrytype('||quote_ident(n_geom)||') from  '||_pgr_quote_ident(intab)||' limit 1' into geomtype;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(outname)||','||
-                quote_literal(n_geom)||','|| srid||', '||quote_literal(geomtype)||', 2)';
-       execute 'CREATE INDEX '||quote_ident(outname||'_'||n_geom||'_idx')||' ON '||_pgr_quote_ident(outtab)||'  USING GIST ('||quote_ident(n_geom)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-    END;
-----------------
-
-
-  raise notice 'Processing, please wait .....';
-
-
-    if pgis_ver_old then
-        vst_line_substring    := 'st_line_substring';
-        vst_line_locate_point := 'st_line_locate_point';
-    else
-        vst_line_substring    := 'st_linesubstring';
-        vst_line_locate_point := 'st_linelocatepoint';
-    end if;
-
---    -- First creates temp table with intersection points
-    p_ret = 'create temp table intergeom on commit drop as (
-        select l1.' || quote_ident(n_pkey) || ' as l1id,
-               l2.' || quote_ident(n_pkey) || ' as l2id,
-	       l1.' || quote_ident(n_geom) || ' as line,
-	       _pgr_startpoint(l2.' || quote_ident(n_geom) || ') as source,
-	       _pgr_endpoint(l2.' || quote_ident(n_geom) || ') as target,
-               st_intersection(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ') as geom
-        from (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l1
-             join (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l2
-             on (st_dwithin(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ', ' || tolerance || '))'||
-        'where l1.' || quote_ident(n_pkey) || ' <> l2.' || quote_ident(n_pkey)||' and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false  )';
-    raise debug '%',p_ret;
-    EXECUTE p_ret;
-
-    -- second temp table with locus (index of intersection point on the line)
-    -- to avoid updating the previous table
-    -- we keep only intersection points occurring onto the line, not at one of its ends
---    drop table if exists inter_loc;
-
---HAD TO CHANGE THIS QUERY
--- p_ret= 'create temp table inter_loc on commit drop as (
---        select l1id, l2id, ' || vst_line_locate_point || '(line,point) as locus from (
---        select DISTINCT l1id, l2id, line, (ST_DumpPoints(geom)).geom as point from intergeom) as foo
---        where ' || vst_line_locate_point || '(line,point)<>0 and ' || vst_line_locate_point || '(line,point)<>1)';
-    p_ret= 'create temp table inter_loc on commit drop as ( select * from (
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,source) as locus from intergeom)
-         union
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,target) as locus from intergeom)) as foo
-        where locus<>0 and locus<>1)';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-
-    -- index on l1id
-    create index inter_loc_id_idx on inter_loc(l1id);
-
-    -- Then computes the intersection on the lines subset, which is much smaller than full set
-    -- as there are very few intersection points
-
---- outab needs to be formally created with id, old_id, subid,the_geom, source,target
----  so it can be inmediatly be used with createTopology
-
---   EXECUTE 'drop table if exists ' || _pgr_quote_ident(outtab);
---   EXECUTE 'create table ' || _pgr_quote_ident(outtab) || ' as
-     P_RET = 'insert into '||_pgr_quote_ident(outtab)||' (old_id,sub_id,'||quote_ident(n_geom)||') (  with cut_locations as (
-           select l1id as lid, locus
-           from inter_loc
-           -- then generates start and end locus for each line that have to be cut buy a location point
-           UNION ALL
-           select i.l1id  as lid, 0 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           UNION ALL
-           select i.l1id  as lid, 1 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           order by lid, locus
-       ),
-       -- we generate a row_number index column for each input line
-       -- to be able to self-join the table to cut a line between two consecutive locations
-       loc_with_idx as (
-           select lid, locus, row_number() over (partition by lid order by locus) as idx
-           from cut_locations
-       )
-       -- finally, each original line is cut with consecutive locations using linear referencing functions
-       select l.' || quote_ident(n_pkey) || ', loc1.idx as sub_id, ' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus) as ' || quote_ident(n_geom) || '
-       from loc_with_idx loc1 join loc_with_idx loc2 using (lid) join ' || _pgr_quote_ident(intab) || ' l on (l.' || quote_ident(n_pkey) || ' = loc1.lid)
-       where loc2.idx = loc1.idx+1
-           -- keeps only linestring geometries
-           and geometryType(' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus)) = ''LINESTRING'') ';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-	GET DIAGNOSTICS splits = ROW_COUNT;
-        execute 'with diff as (select distinct old_id from '||_pgr_quote_ident(outtab)||' )
-                 select count(*) from diff' into touched;
-	-- here, it misses all original line that did not need to be cut by intersection points: these lines
-	-- are already clean
-	-- inserts them in the final result: all lines which gid is not in the res table.
-	EXECUTE 'insert into ' || _pgr_quote_ident(outtab) || ' (old_id , sub_id, ' || quote_ident(n_geom) || ')
-                ( with used as (select distinct old_id from '|| _pgr_quote_ident(outtab)||')
-		select ' ||  quote_ident(n_pkey) || ', 1 as sub_id, ' ||  quote_ident(n_geom) ||
-		' from '|| _pgr_quote_ident(intab) ||' where  '||quote_ident(n_pkey)||' not in (select * from used)' || rows_where || ')';
-	GET DIAGNOSTICS untouched = ROW_COUNT;
-
-	raise NOTICE '  Split Edges: %', touched;
-	raise NOTICE ' Untouched Edges: %', untouched;
-	raise NOTICE '     Total original Edges: %', touched+untouched;
-        RAISE NOTICE ' Edges generated: %', splits;
-	raise NOTICE ' Untouched Edges: %',untouched;
-	raise NOTICE '       Total New segments: %', splits+untouched;
-        RAISE NOTICE ' New Table: %', outtab;
-        RAISE NOTICE '----------------------------------';
-
-    drop table  if exists intergeom;
-    drop table if exists inter_loc;
-    RETURN 'OK';
-END;
-$BODY$
-    LANGUAGE 'plpgsql' VOLATILE STRICT COST 100;
-
-
-COMMENT ON FUNCTION pgr_nodeNetwork(text, double precision, text, text, text, text, boolean )
- IS  'edge_table, tolerance, id:=''id'', the_geom:=''the_geom'', table_ending:=''noded'' ';
-
-
-CREATE OR REPLACE FUNCTION pgr_labelGraph(
-                edge_table text,
-                id text default 'id',
-                source text default 'source',
-                target text default 'target',
-                subgraph text default 'subgraph',
-                rows_where text default 'true'
-        )
-        RETURNS character varying AS
-$BODY$
-
-DECLARE
-        naming record;
-        schema_name text;
-        table_name text;
-        garbage text;
-        incre integer;
-        table_schema_name text;
-        query text;
-        ecnt integer;
-        sql1 text;
-        rec1 record;
-        sql2 text;
-        rec2 record;
-        rec_count record;
-        rec_single record;
-        graph_id integer;
-        gids int [];
-
-BEGIN
-        raise notice 'Processing:';
-        raise notice 'pgr_brokenGraph(''%'',''%'',''%'',''%'',''%'',''%'')', edge_table,id,source,target,subgraph,rows_where;
-        raise notice 'Performing initial checks, please hold on ...';
-
-        Raise Notice 'Starting - Checking table ...';
-        BEGIN
-                raise debug 'Checking % table existance', edge_table;
-                execute 'select * from pgr_getTableName('|| quote_literal(edge_table) ||')' into naming;
-                schema_name = naming.sname;
-                table_name = naming.tname;
-                table_schema_name = schema_name||'.'||table_name;
-                IF schema_name is null then
-                        raise notice 'no schema';
-                        return 'FAIL';
-                else
-                        if table_name is null then
-                                raise notice 'no table';
-                                return 'FAIL';
-                        end if;
-                end if;
-        END;
-        Raise Notice 'Ending - Checking table';
-
-        Raise Notice 'Starting - Checking columns';
-        BEGIN
-                raise debug 'Checking exitance of necessary columns inside % table', edge_table;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(id) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no id column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(source) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no source column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(target) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no target column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(subgraph) ||')' into naming;
-                if naming.pgr_iscolumnintable = 't' then
-                        raise notice 'subgraph column already in the table';
-                        return 'FAIL';
-                end if;
-        END;
-        Raise Notice 'Ending - Checking columns';
-
-        Raise Notice 'Starting - Checking rows_where condition';
-        BEGIN
-                raise debug 'Checking rows_where condition';
-                query='select count(*) from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where;
-                execute query into ecnt;
-                raise debug '-->Rows where condition: OK';
-                raise debug '    --> OK';
-                EXCEPTION WHEN OTHERS THEN
-                        raise notice 'Got %', SQLERRM;
-                        Raise notice 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-                        Raise notice '%', query;
-                        return 'FAIL';
-        END;
-        Raise Notice 'Ending - Checking rows_where condition';
-
-        garbage := 'garbage001';
-        incre := 1;
-        Raise Notice 'Starting - Checking temporary column';
-        Begin
-                raise debug 'Checking Checking temporary columns existance';
-
-                While True
-                        Loop
-                                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(garbage) ||')' into naming;
-                                If naming.pgr_iscolumnintable = 't' THEN
-                                        incre := incre + 1;
-                                        garbage := 'garbage00'||incre||'';
-                                ELSE
-                                        EXIT;
-                                END IF;
-                        End Loop;
-        End;
-        Raise Notice 'Ending - Checking temporary column';
-
-        Raise Notice 'Starting - Calculating subgraphs';
-        BEGIN
-                --------- Add necessary columns ----------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(subgraph) || ' INTEGER DEFAULT -1';
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(garbage) || ' INTEGER DEFAULT 0';
-                graph_id := 1;
-
-                EXECUTE 'select count(*) as count from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where ||'' into rec_count;
-                if rec_count.count = 0 then
-                        RETURN 'rows_where condition generated 0 rows';
-                end if;
-
-                WHILE TRUE
-                        LOOP
-                                ---------- Assign the very first -1 row graph_id ----------
-                                EXECUTE 'SELECT ' || pgr_quote_ident(id) || ' AS gid FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1 LIMIT 1' INTO rec_single;
-                                EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec_single.gid || '';
-
-                                --------- Search other rows with that particular graph_id -----------
-                                WHILE TRUE
-                                        LOOP
-                                                EXECUTE 'SELECT COUNT(*) FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0' into rec_count;
-                                                ----------- The following if else will check those rows which already have entertained ------------
-                                                IF (rec_count.count > 0) THEN
-                                                        sql1 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0';
-                                                        FOR rec1 IN EXECUTE sql1
-                                                                LOOP
-                                                                        sql2 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| pgr_quote_ident(source) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(source) ||' = '|| rec1.target ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.target ||'';
-                                                                        FOR rec2 IN EXECUTE sql2
-                                                                                LOOP
-                                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec2.gid || '';
-                                                                                END LOOP;
-                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(garbage) || ' = 1 WHERE ' || pgr_quote_ident(id) || ' = ' || rec1.gid || '';
-                                                                END LOOP;
-                                                ELSE
-                                                        EXIT;
-                                                END IF;
-                                        END LOOP;
-
-                                ------ Following is to exit the while loop. 0 means no more -1 id.
-                                EXECUTE 'SELECT COUNT(*) AS count FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1' INTO rec_count;
-                                If (rec_count.count = 0) THEN
-                                        EXIT;
-                                ELSE
-                                        graph_id := graph_id + 1;
-                                END IF;
-                        END LOOP;
-
-                ----------- Drop garbage column ------------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' DROP COLUMN ' || pgr_quote_ident(garbage) ||'';
-                Raise Notice 'Successfully complicated calculating subgraphs';
-        END;
-        Raise Notice 'Ending - Calculating subgraphs';
-
-        RETURN 'OK';
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCostMatrix(
-    edges_sql TEXT,
-    points_sql TEXT,
-    pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_pid, a.end_pid, a.agg_cost
-        FROM _pgr_withPoints($1, $2, $3, $3, $4,  $5, TRUE, TRUE) AS a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
---  DIJKSTRA DMatrix
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2, $2, $3, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
---  BIDIRECTIONAL DIJKSTRA Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_astarCostMatrix(
-    edges_sql TEXT, -- XY edges sql
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2, $2, $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
---  BIDIRECTIONAL ASTAR Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdAstarCostMatrix(
-    edges_sql TEXT,
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_bdAstarCostMatrix(TEXT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCostMatrix';
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_getTableName(IN tab text,OUT sname text,OUT tname text)
-RETURNS RECORD AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getTableName: This function will no longer be soported';
-    select * from _pgr_getTableName(tab, 0, 'pgr_getTableName') into sname,tname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_getColumnName(tab text, col text)
-RETURNS text AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getColumnName: This function will no longer be soported';
-    return _pgr_getColumnName(tab,col, 0, 'pgr_getColumnName');
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    select * from _pgr_getColumnName(tab,col,0, 'pgr_isColumnInTable') into cname;
-    return  cname IS not NULL;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnIndexed(tab text, col text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnIndexed: This function will no longer be soported';
-    return  _pgr_isColumnIndexed(tab,col);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-create or replace function pgr_quote_ident(idname text)
-returns text as
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    return  _pgr_quote_ident(idname);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_versionless(v1 text, v2 text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_versionless: This function will no longer be soported';
-    return  _pgr_versionless(v1,v2);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-create or replace function pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_startPoint: This function will no longer be soported';
-    return  _pgr_startPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_endPoint: This function will no longer be soported';
-    return  _pgr_endPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspJohnson(edges_sql text)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_johnson instead';
-      has_reverse =_pgr_parameter_check('johnson', edges_sql, false);
-      sql = edges_sql;
-      IF (has_reverse) THEN
-           RAISE NOTICE 'reverse_cost column found, removing.';
-           sql = 'SELECT source, target, cost FROM (' || edges_sql || ') a';
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () - 1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_johnson(sql, TRUE);
-  END
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspWarshall(edges_sql text, directed boolean, has_rcost boolean)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_floydWarshall instead';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-      sql := edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         ELSE raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () -1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_floydWarshall(sql, directed);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_astar(edges_sql TEXT, source_id INTEGER, target_id INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated signature pgr_astar(text, integer, integer, boolean, boolean)';
-    has_reverse =_pgr_parameter_check('astar', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost, x1,y1, x2, y2 FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-    FROM pgr_astar(sql, ARRAY[$2], ARRAY[$3], directed);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    sql TEXT,
-    source_vid INTEGER,
-    target_vid INTEGER,
-    directed BOOLEAN,
-    has_reverse_cost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdAstar';
-    has_reverse =_pgr_parameter_check('astar', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdAstar(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(edges_sql TEXT, start_vid INTEGER, end_vid INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdDijkstra';
-    has_reverse =_pgr_parameter_check('dijkstra', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdDijkstra(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstraPath(
-    sql text,
-    source INTEGER,
-    targets INTEGER ARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-    RETURNS SETOF pgr_costResult3 AS
-    $BODY$
-    DECLARE
-    has_reverse BOOLEAN;
-    new_sql TEXT;
-    result pgr_costResult3;
-    tmp pgr_costResult3;
-    sseq INTEGER;
-    i INTEGER;
-    BEGIN
-        RAISE NOTICE 'Deprecated function: Use pgr_dijkstra instead.';
-        has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-        new_sql = sql;
-        IF (array_ndims(targets) != 1) THEN
-            raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-
-        IF (has_reverse != has_rcost) THEN
-            IF (has_reverse) THEN
-                new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-            ELSE
-                raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-                USING ERRCODE = 'XX000';
-            END IF;
-        END IF;
-        SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-        sseq = 0; i = 1;
-        FOR result IN
-            SELECT seq, a.end_vid::INTEGER AS id1, a.node::INTEGER AS i2, a.edge::INTEGER AS id3, cost
-            FROM pgr_dijkstra(new_sql, source, targets, directed) a ORDER BY a.end_vid, seq LOOP
-            WHILE (result.id1 != targets[i]) LOOP
-                tmp.seq = sseq;
-                tmp.id1 = targets[i];
-                IF (targets[i] = source) THEN
-                    tmp.id2 = source;
-                    tmp.cost =0;
-                ELSE
-                    tmp.id2 = 0;
-                    tmp.cost = -1;
-                END IF;
-                tmp.id3 = -1;
-                RETURN next tmp;
-                i = i + 1;
-                sseq = sseq + 1;
-            END LOOP;
-        IF (result.id1 = targets[i] AND result.id3 != -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-        IF (result.id1 = targets[i] AND result.id3 = -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.id2 = source;
-            tmp.cost = 0;
-        ELSE
-            tmp.id2 = 0;
-            tmp.cost = -1;
-        END IF;
-        tmp.id3 = -1;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstracost(
-    sql text,
-    source INTEGER,
-    targets INTEGER array,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-result pgr_costResult;
-tmp pgr_costResult;
-sseq INTEGER;
-i INTEGER;
-BEGIN
-    RAISE NOTICE 'Deprecated function. Use pgr_dijkstraCost instead.';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    new_sql = sql;
-    IF (array_ndims(targets) != 1) THEN
-        raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-        USING ERRCODE = 'XX000';
-    END IF;
-
-
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-    sseq = 0; i = 1;
-    FOR result IN
-        SELECT ((row_number() over()) -1)::INTEGER, a.start_vid::INTEGER, a.end_vid::INTEGER, agg_cost
-        FROM pgr_dijkstraCost(new_sql, source, targets, directed) a ORDER BY end_vid LOOP
-        WHILE (result.id2 != targets[i]) LOOP
-            tmp.seq = sseq;
-            tmp.id1 = source;
-            tmp.id2 = targets[i];
-            IF (targets[i] = source) THEN
-                tmp.cost = 0;
-            ELSE
-                tmp.cost = -1;
-            END IF;
-            RETURN next tmp;
-            i = i + 1;
-            sseq = sseq + 1;
-        END LOOP;
-        IF (result.id2 = targets[i]) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = source;
-        tmp.id2 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.cost = 0;
-        ELSE
-            tmp.cost = -1;
-        END IF;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-create or replace function pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    returns integer as
-$body$
-
-declare
-    rr record;
-    pct float;
-    debuglevel text;
-
-begin
-    -- find the closest edge within tol distance
-    execute 'select * from ' || _pgr_quote_ident(edges) ||
-            ' where st_dwithin(''' || pnt::text ||
-            '''::geometry, the_geom, ' || tol || ') order by st_distance(''' || pnt::text ||
-            '''::geometry, the_geom) asc limit 1' into rr;
-
-    if rr.the_geom is not null then
-        -- deal with MULTILINESTRINGS
-        if geometrytype(rr.the_geom)='MULTILINESTRING' THEN
-            rr.the_geom := ST_GeometryN(rr.the_geom, 1);
-        end if;
-
-        -- project the point onto the linestring
-        execute 'show client_min_messages' into debuglevel;
-        SET client_min_messages='ERROR';
-        pct := st_line_locate_point(rr.the_geom, pnt);
-        execute 'set client_min_messages  to '|| debuglevel;
-
-        -- return the node we are closer to
-        if pct < 0.5 then
-            return rr.source;
-        else
-            return rr.target;
-        end if;
-    else
-        -- return a failure to find an edge within tol distance
-        return -1;
-    end if;
-end;
-$body$
-  language plpgsql volatile
-  cost 5;
-
-
-----------------------------------------------------------------------------
-
-create or replace function pgr_flipedges(ga geometry[])
-    returns geometry[] as
-$body$
-
-declare
-    nn integer;
-    i integer;
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_flipEdges';
-    -- get the count of edges, and return if only one edge
-    nn := array_length(ga, 1);
-    if nn=1 then
-        return ga;
-    end if;
-
-    -- determine if first needs to be flipped
-    g := _pgr_startpoint(ga[1]);
-
-    -- if the start of the first is connected to the second then it needs to be flipped
-    if _pgr_startpoint(ga[2])=g or _pgr_endpoint(ga[2])=g then
-        ga[1] := st_reverse(ga[1]);
-    end if;
-    g := _pgr_endpoint(ga[1]);
-
-    -- now if  the end of the last edge matchs the end of the current edge we need to flip it
-    for i in 2 .. nn loop
-        if _pgr_endpoint(ga[i])=g then
-            ga[i] := st_reverse(ga[i]);
-        end if;
-        -- save the end of this edge into the last end for the next cycle
-        g := _pgr_endpoint(ga[i]);
-    end loop;
-
-    return ga;
-end;
-$body$
-    language plpgsql immutable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_texttopoints(pnts text, srid integer DEFAULT(4326))
-    returns geometry[] as
-$body$
-
-declare
-    a text[];
-    t text;
-    p geometry;
-    g geometry[];
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_textToPoints';
-    -- convert commas to space and split on ';'
-    a := string_to_array(replace(pnts, ',', ' '), ';');
-    -- convert each 'x y' into a point geometry and concattenate into a new array
-    for t in select unnest(a) loop
-        p := st_pointfromtext('POINT(' || t || ')', srid);
-        g := g || p;
-    end loop;
-
-    return g;
-end;
-$body$
-    language plpgsql immutable;
-
------------------------------------------------------------------------
-
-create or replace function pgr_pointstovids(pnts geometry[], edges text, tol float8 DEFAULT(0.01))
-    returns integer[] as
-$body$
-
-declare
-    v integer[];
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_pointsToVids';
-    -- cycle through each point and locate the nearest edge and vertex on that edge
-    for g in select unnest(pnts) loop
-        v := v || pgr_pointtoedgenode(edges, g, tol);
-    end loop;
-
-    return v;
-end;
-$body$
-    language plpgsql stable;
-
-
-create or replace function pgr_pointstodmatrix(pnts geometry[], mode integer default (0), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    r record;
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_pointsToDMatrix';
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    -- create an id for each point in the array and unnest it into a table nodes in the with clause
-    for r in with nodes as (select row_number() over()::integer as id, p from (select unnest(pnts) as p) as foo)
-        -- compute a row of distances
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j,
-                case when mode=0
-                    then st_distance(a.p, b.p)
-                    else st_distance_sphere(a.p, b.p)
-                end as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i loop
-
-        -- you must concat an array[array[]] to make dmatrix[][]
-        -- concat the row of distances to the dmatrix
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-end;
-$body$
-    language plpgsql stable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_vidstodmatrix(IN vids integer[], IN pnts geometry[], IN edges text, tol float8 DEFAULT(0.1), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    i integer;
-    j integer;
-    nn integer;
-    rr record;
-    bbox geometry;
-    t float8[];
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    -- check if the input arrays has any -1 values, maybe this whould be a raise exception
-    if vids @> ARRAY[-1] then
-    raise notice 'Some vids are undefined (-1)!';
-    dmatrix := null;
-    ids := null;
-    return;
-    end if;
-
-    ids := vids;
-
-    -- get the count of nodes
-    nn := array_length(vids,1);
-
-    -- zero out a dummy row
-    for i in 1 .. nn loop
-        t := t || 0.0::float8;
-    end loop;
-
-    -- using the dummy row, zero out the whole matrix
-    for i in 1 .. nn loop
-    dmatrix := dmatrix || ARRAY[t];
-    end loop;
-
-    for i in 1 .. nn-1 loop
-        j := i;
-        -- compute the bbox for the point needed for this row
-        select st_expand(st_collect(pnts[id]), tol) into bbox
-          from (select generate_series as id from generate_series(i, nn)) as foo;
-
-        -- compute kdijkstra() for this row
-        for rr in execute 'select * from pgr_dijkstracost($1, $2, $3, false)'
-                  using 'select id, source, target, cost from ' || edges ||
-                        ' where the_geom && ''' || bbox::text || '''::geometry'::text, vids[i], vids[i+1:nn] loop
-
-            -- TODO need to check that all node were reachable from source
-            -- I think unreachable paths between nodes returns cost=-1.0
-
-            -- populate the matrix with the cost values, remember this is symmetric
-            j := j + 1;
-            -- raise notice 'cost(%,%)=%', i, j, rr.agg_cost;
-            dmatrix[i][j] := rr.agg_cost;
-            dmatrix[j][i] := rr.agg_cost;
-        end loop;
-    end loop;
-
-end;
-$body$
-    language plpgsql stable cost 200;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_vidsToDMatrix(sql TEXT, vids  INTEGER[], dir BOOLEAN, has_rcost BOOLEAN, want_symmetric BOOLEAN)
-RETURNS float8[] AS
-$BODY$
-DECLARE
-directed BOOLEAN;
-has_reverse BOOLEAN;
-edges_sql TEXT;
-dmatrix_row float8[];
-dmatrix float8[];
-cell RECORD;
-unique_vids INTEGER[];
-total BIGINT;
-from_v BIGINT;
-to_v BIGINT;
-BEGIN
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql = sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    unique_vids :=  ARRAY(SELECT DISTINCT UNNEST(vids) ORDER BY 1);
-
-    IF want_symmetric THEN
-        directed = false;
-    ELSE
-        directed = dir;
-    END IF;
-
-    total := array_length(unique_vids, 1);
-
-    -- initializing dmatrix
-    FOR i in 1 .. total LOOP
-        dmatrix_row := dmatrix_row || '+Infinity'::float8;
-    END LOOP;
-    FOR i in 1 .. total LOOP
-    dmatrix := dmatrix || ARRAY[dmatrix_row];
-    dmatrix[i][i] = 0;
-    END LOOP;
-
-    CREATE TEMP TABLE __x___y____temp AS
-        WITH result AS
-            (SELECT unnest(unique_vids) AS vid)
-        SELECT row_number() OVER() AS idx, vid FROM result;
-
-    FOR cell IN SELECT * FROM pgr_dijkstraCostMatrix(sql, unique_vids, directed) LOOP
-        SELECT idx INTO from_v FROM __x___y____temp WHERE vid =  cell.start_vid;
-        SELECT idx INTO to_v FROM __x___y____temp WHERE vid =  cell.end_vid;
-
-        dmatrix[from_v][to_v] = cell.agg_cost;
-        dmatrix[to_v][from_v] = cell.agg_cost;
-    END LOOP;
-
-    DROP TABLE IF EXISTS __x___y____temp;
-    RETURN dmatrix;
-
-    EXCEPTION WHEN others THEN
-       DROP TABLE IF EXISTS __x___y____temp;
-       raise exception '% %', SQLERRM, SQLSTATE;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated function';
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_dijkstra(sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_dijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN) IS 'pgr_dijkstra(Deprecated signature)';
-
-
-
-
-
--- OLD SIGNATURE
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(edges_sql text, source BIGINT, distance FLOAT, directed BOOLEAN, has_rcost BOOLEAN)
-  RETURNS SETOF pgr_costresult AS
-  $BODY$
-  DECLARE
-  has_reverse BOOLEAN;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function';
-
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, FALSE);
-
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-             -- the user says it doesn't have reverse cost but its false
-             -- removing from query
-             RAISE NOTICE 'Contradiction found: has_rcost set to false but reverse_cost column found';
-             sql = 'SELECT id, source, target, cost, -1 as reverse_cost FROM (' || edges_sql || ') __q ';
-         ELSE
-             -- the user says it has reverse cost but its false
-             -- can't do anything
-             RAISE EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query SELECT seq - 1 AS seq, node::integer AS id1, edge::integer AS id2, agg_cost AS cost
-                FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maximumcardinalitymatching(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---INTERNAL FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
-------------------------
--- deprecated signatures
------------------------
-
-COMMENT ON FUNCTION pgr_astar(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_astar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdAstar( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdAstar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdDijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdDijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_dijkstra(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_dijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_drivingDistance(text,  BIGINT,  FLOAT8,  BOOLEAN,  BOOLEAN)
-    IS 'pgr_drivingDistance(Deprecated signature)';
-
-------------------------
--- Renamed /deprecated
------------------------
-COMMENT ON FUNCTION pgr_apspJohnson(TEXT)
-    IS 'pgr_apspJohnson(Renamed function) use pgr_Johnson instead';
-
-COMMENT ON FUNCTION pgr_apspWarshall(text, boolean, boolean)
-    IS 'pgr_apspWarshall(Renamed function) use pgr_floydWarshall instead';
-
-COMMENT ON FUNCTION pgr_kdijkstraPath( text, INTEGER, INTEGER ARRAY, BOOLEAN, BOOLEAN)
-    IS 'pgr_kdijkstraPath(Renamed function) use pgr_dijkstra instead';
-
-COMMENT ON FUNCTION pgr_kdijkstracost( text, INTEGER, INTEGER array, BOOLEAN, BOOLEAN)
-    IS 'pgr_kDijkstraCost(Renamed function) use pgr_dijkstraCost instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-
-
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-
-
-COMMENT ON FUNCTION pgr_gsoc_vrppdtw( text, INTEGER, INTEGER)
-    IS 'pgr_gsoc_vrppdtw(Renamed function) use pgr_pickDeliverEuclidean instead';
-
-------------------------
--- Deprecated functions
------------------------
-
-COMMENT ON FUNCTION pgr_flipedges(geometry[])
-    IS 'pgr_flipedges(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_texttopoints(text,  integer)
-    IS 'pgr_texttopoints(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstovids(pnts geometry[], edges text, tol float8)
-    IS 'pgr_pointstovids(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    IS 'pgr_pointtoedgenode(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstodmatrix(geometry[], integer)
-    IS 'pgr_pointstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidstodmatrix( integer[],  geometry[],  text, float8)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidsToDMatrix(TEXT,  INTEGER[], BOOLEAN, BOOLEAN, BOOLEAN)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-
-
-
-COMMENT ON FUNCTION pgr_getTableName(IN tab text)
-    IS 'pgr_getTableName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_getColumnName(tab text, col text)
-    IS 'pgr_getColumnName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnInTable(tab text, col text)
-    IS 'pgr_isColumnInTable(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnIndexed(tab text, col text)
-    IS 'pgr_isColumnIndexed(Deprecated function)';
-
-
-COMMENT ON FUNCTION pgr_quote_ident(idname text)
-    IS 'pgr_quote_ident(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_versionless(v1 text, v2 text)
-    IS 'pgr_versionless(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_startPoint(g geometry)
-    IS 'pgr_startPoint(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_endPoint(g geometry)
-    IS 'pgr_endPoint(Deprecated function)';
-
-
diff --git a/tools/sql-update-scripts/pgrouting--2.0.1--2.5.2.sql b/tools/sql-update-scripts/pgrouting--2.0.1--2.5.2.sql
deleted file mode 100644
index 6098a5f..0000000
--- a/tools/sql-update-scripts/pgrouting--2.0.1--2.5.2.sql
+++ /dev/null
@@ -1,6575 +0,0 @@
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- pgRouting extension upgrade from 2.0.1 to 2.5.2
--- generated by tools/build-extension-update-files
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-\echo Use "ALTER extension pgrouting update to '2.5.2'" to load this file. \quit
-
-
--------------------------------------
--- remove functions no longer in the 2.5.2 extension
--------------------------------------
-
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_alphashape(text);
-DROP FUNCTION IF EXISTS pgr_alphashape(text);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_createtopology(text,double precision,text,text,text,text,text);
-DROP FUNCTION IF EXISTS pgr_createtopology(text,double precision,text,text,text,text,text);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_drivingdistance(text,integer,double precision,boolean,boolean);
-DROP FUNCTION IF EXISTS pgr_drivingdistance(text,integer,double precision,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_makedistancematrix(text);
-DROP FUNCTION IF EXISTS pgr_makedistancematrix(text);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_nodenetwork(text,double precision,text,text,text);
-DROP FUNCTION IF EXISTS pgr_nodenetwork(text,double precision,text,text,text);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_pointsaspolygon(character varying);
-DROP FUNCTION IF EXISTS pgr_pointsaspolygon(character varying);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_pointtoid(geometry,double precision,text,integer);
-DROP FUNCTION IF EXISTS pgr_pointtoid(geometry,double precision,text,integer);
-
-
- ------------------------------------------
---    New functions:  2.0
--- Signature change:  2.1
---       Deprecated:  2.1
-------------------------------------------
--- pgr_dijkstra:
--- 2.0.1: {      sql, source_id, target_id, directed, has_reverse_cost}
--- 2.5.2: {edges_sql, start_vid,   end_vid, directed, has_rcost}
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_dijkstra(text,integer,integer,boolean,boolean);
-DROP FUNCTION IF EXISTS pgr_dijkstra(text,integer,integer,boolean,boolean);
-
-
-
-
-------------------------------------------
---    New functions:  2.0
---       Deprecated:  2.1
---       Deprecated:  2.1 & 2.2
-------------------------------------------
--- pgr_ksp
--- 2.0.1: {      sql, source_id, target_id, no_paths,has_reverse_cost}
--- 2.5.2: {edges_sql, start_vid,   end_vid, k,       has_rcost}
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_ksp(text,integer,integer,integer,boolean);
-DROP FUNCTION IF EXISTS pgr_ksp(text,integer,integer,integer,boolean);
-
-
-
-
-------------------------------------------
---    New functions:  2.0
--- Signature change:  2.2
---       Deprecated:  2.2
-------------------------------------------
--- pgr_apspjohnson
--- 2.0.1: {      sql}
--- 2.5.2: {edges_sql}
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_apspjohnson(text);
-DROP FUNCTION IF EXISTS pgr_apspjohnson(text);
-
-
--- pgr_apspwarshall
--- 2.0.1: {      sql, directed, has_reverse_cost}
--- 2.5.2: {edges_sql, directed, has_rcost}
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_apspwarshall(text,boolean,boolean);
-DROP FUNCTION IF EXISTS pgr_apspwarshall(text,boolean,boolean);
-
-
--- pgr_kdijkstrapath
--- 2.0.1: {sql,source_vid, target_vid, directed, has_reverse_cost}
--- 2.5.2: {sql,    source,    targets, directed, has_rcost} 
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_kdijkstrapath(text,integer,integer[],boolean,boolean);
-DROP FUNCTION IF EXISTS pgr_kdijkstrapath(text,integer,integer[],boolean,boolean);
-
-
--- pgr_kdijkstracost
--- 2.0.1: {sql,source_vid, target_vid, directed, has_reverse_cost}
--- 2.5.2: {sql,    source,    targets, directed, has_rcost} 
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_kdijkstracost(text,integer,integer[],boolean,boolean);
-DROP FUNCTION IF EXISTS pgr_kdijkstracost(text,integer,integer[],boolean,boolean);
-
-
-
-
-------------------------------------------
---    New functions:  2.0
--- Signature change:  2.2
-------------------------------------------
--- pgr_version
--- 2.0.1:  {version,tag,build,hash,branch,boost}
--- 2.5.2:  {version,tag,hash,branch,boost}
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_version();
-DROP FUNCTION IF EXISTS pgr_version();
-
-
-
-
-------------------------------------------
---    New functions:  2.0
--- Signature change:  2.2
-------------------------------------------
--- pgr_trsp
--- 2.0.1:  {      sql, source_vid, target_vid, directed, has_reverse_cost, turn_restrict_sql}
--- 2.5.2:  {edges_sql,  start_vid,    end_vid, directed, has_rcost,        restrictions_sql}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vid","end_vid","directed","has_rcost","restrictions_sql"}'
-WHERE proname = 'pgr_trsp'
-    AND proargnames = '{"sql","source_vid","target_vid","directed","has_reverse_cost","turn_restrict_sql"}';
-
-
-------------------------------------------
---    New functions:  2.0
--- Signature change:  2.4
---       Deprecated:  2.4
-------------------------------------------
--- pgr_bddijkstra
--- 2.0.1: {      sql, source_vid, target_vid, directed, has_reverse_cost}   
--- 2.5.2: {edges_sql,  start_vid,    end_vid, directed, has_rcost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vid","end_vid","directed","has_rcost"}'
-WHERE proname = 'pgr_bddijkstra'
-    AND proargnames = '{"sql","source_vid","target_vid","directed","has_reverse_cost"}';
-
-
-------------------------------------------
--- New functions on 2.0
--- Signature change on 2.3
--- Deprecated on 2.4
-------------------------------------------
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_astar(text,integer,integer,boolean,boolean);
-DROP FUNCTION IF EXISTS pgr_astar(text,integer,integer,boolean,boolean);
-
-
-
-
-
-
-
-
-
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
---- pgRouting provides geospatial routing functionality.
---- http://pgrouting.org
---- copyright
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
----
---- This is free software; you can redistribute and/or modify it:
---- the terms of the GNU General Public Licence. See the COPYING file.
---- the terms of the MIT-X Licence. See the COPYING file.
----
---- The following functions have MIT-X licence:
----     pgr_version()
----     pgr_tsp(matrix float8[][], startpt integer, endpt integer DEFAULT -1, OUT seq integer, OUT id integer)
----     _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
----     pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
----
----
---- All other functions are under GNU General Public Licence.
----
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
--- WARNING: Any change in this file must be evaluated for compatibility.
---          Changes cleanly handled by postgis_upgrade.sql are fine,
---          other changes will require a bump in Major version.
---          Currently only function replaceble by CREATE OR REPLACE
---          are cleanly handled.
---
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
---  pgRouting 2.0 types
-
-
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_version()
-RETURNS TABLE(
-        "version" varchar,
-        tag varchar,
-        hash varchar,
-        branch varchar,
-        boost varchar
-    ) AS
-$BODY$
-    SELECT '2.5.2'::varchar AS version,
-        'v2.5.2'::varchar AS tag,
-        '60585f1f7'::varchar AS hash,
-        'master'::varchar AS branch,
-        '1.54.0'::varchar AS boost;
-$BODY$
-LANGUAGE sql IMMUTABLE;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getTableName(IN tab text, IN reportErrs int default 0, IN fnName text default '_pgr_getTableName', OUT sname text,OUT tname text)
-  RETURNS RECORD AS
-$$
-DECLARE
-        naming record;
-        i integer;
-        query text;
-        sn text; -- schema name
-        tn text; -- table name
-        ttype text; --table type for future use
-        err boolean;
-        debuglevel text;
-        var_types text[] = ARRAY['BASE TABLE', 'VIEW'];
-BEGIN
-
-    execute 'show client_min_messages' into debuglevel;
-
-
-    perform _pgr_msg( 0, fnName, 'Checking table ' || tab || ' exists');
-    --RAISE DEBUG 'Checking % exists',tab;
-
-    i := strpos(tab,'.');
-    IF (i <> 0) THEN
-        sn := split_part(tab, '.',1);
-        tn := split_part(tab, '.',2);
-    ELSE
-        sn := current_schema;
-        tn := tab;
-    END IF;
-
-
-   SELECT schema_name INTO sname
-   FROM information_schema.schemata WHERE schema_name = sn;
-
-    IF sname IS NOT NULL THEN -- found schema (as is)
-       SELECT table_name, table_type INTO tname, ttype
-       FROM information_schema.tables
-       WHERE
-                table_type = ANY(var_types) and
-                table_schema = sname and
-                table_name = tn ;
-        IF tname is NULL THEN
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  = ANY(var_types) and
-                table_schema = sname and
-                table_name = lower(tn) ORDER BY table_name;
-        END IF;
-    END IF;
-    IF sname is NULL or tname is NULL THEN --schema not found or table not found
-        SELECT schema_name INTO sname
-        FROM information_schema.schemata
-        WHERE schema_name = lower(sn) ;
-
-        IF sname IS NOT NULL THEN -- found schema (with lower caps)
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  =  ANY(var_types) and
-                table_schema = sname and
-                table_name= tn ;
-
-           IF tname IS NULL THEN
-                SELECT table_name, table_type INTO tname, ttype
-                FROM information_schema.tables
-                WHERE
-                    table_type  =  ANY(var_types) and
-                    table_schema = sname and
-                    table_name= lower(tn) ;
-           END IF;
-        END IF;
-    END IF;
-   err = (sname IS NULL OR tname IS NULL);
-   perform _pgr_onError(err, reportErrs, fnName, 'Table ' || tab ||' not found',' Check your table name', 'Table '|| tab || ' found');
-
-END;
-$$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(sname text, tname text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(col) into cname;
-
-    IF cname is null  THEN
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(lower(col))  into cname;
-    END if;
-
-    err = cname is null;
-
-    perform _pgr_onError(err, reportErrs, fnName,  'Column '|| col ||' not found', ' Check your column name','Column '|| col || ' found');
-    RETURN cname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(tab text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-
-    select * into cname from _pgr_getColumnName(sname,tname,col,reportErrs, fnName);
-    RETURN cname;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    select * from _pgr_getColumnName(tab,col,0, '_pgr_isColumnInTable') into cname;
-    return cname is not null;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(sname text, tname text, cname text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    pkey text;
-BEGIN
-    SELECT
-          pg_attribute.attname into pkey
-         --  format_type(pg_attribute.atttypid, pg_attribute.atttypmod)
-          FROM pg_index, pg_class, pg_attribute
-          WHERE
-                  pg_class.oid = _pgr_quote_ident(sname||'.'||tname)::regclass AND
-                  indrelid = pg_class.oid AND
-                  pg_attribute.attrelid = pg_class.oid AND
-                  pg_attribute.attnum = any(pg_index.indkey)
-                  AND indisprimary;
-
-    IF pkey=cname then
-          RETURN TRUE;
-    END IF;
-
-    SELECT a.index_name,
-           b.attname,
-           b.attnum,
-           a.indisunique,
-           a.indisprimary
-      INTO rec
-      FROM ( SELECT a.indrelid,
-                    a.indisunique,
-                    a.indisprimary,
-                    c.relname index_name,
-                    unnest(a.indkey) index_num
-               FROM pg_index a,
-                    pg_class b,
-                    pg_class c,
-                    pg_namespace d
-              WHERE b.relname=tname
-                AND b.relnamespace=d.oid
-                AND d.nspname=sname
-                AND b.oid=a.indrelid
-                AND a.indexrelid=c.oid
-           ) a,
-           pg_attribute b
-     WHERE a.indrelid = b.attrelid
-       AND a.index_num = b.attnum
-       AND b.attname = cname
-  ORDER BY a.index_name,
-           a.index_num;
-
-  RETURN FOUND;
-  EXCEPTION WHEN OTHERS THEN
-    perform _pgr_onError( true, reportErrs, fnName,
-    'Error when checking for the postgres system attributes', SQLERR);
-    RETURN FALSE;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(tab text, col text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    sname text;
-    tname text;
-    cname text;
-    pkey text;
-    value boolean;
-BEGIN
-    SELECT * into naming FROM _pgr_getTableName(tab, 0, fnName);
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    SELECT * into cname from _pgr_getColumnName(sname, tname, col, 0, fnName) ;
-    IF cname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    select * into value  from _pgr_isColumnIndexed(sname, tname, cname, reportErrs, fnName);
-    return value;
-END
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-create or replace function _pgr_quote_ident(idname text)
-    returns text as
-$body$
-declare
-    t text[];
-    pgver text;
-
-begin
-    pgver := regexp_replace(version(), E'^PostgreSQL ([^ ]+)[ ,].*$', E'\\1');
-
-    if _pgr_versionless(pgver, '9.2') then
-        select into t array_agg(quote_ident(term)) from
-            (select nullif(unnest, '') as term
-               from unnest(string_to_array(idname, '.'))) as foo;
-    else
-        select into t array_agg(quote_ident(term)) from
-            (select unnest(string_to_array(idname, '.', '')) as term) as foo;
-    end if;
-    return array_to_string(t, '.');
-end;
-$body$
-language plpgsql immutable;
-
-
-CREATE OR REPLACE FUNCTION _pgr_versionless(v1 text, v2 text)
-  RETURNS boolean AS
-$BODY$
-
-
-declare
-    v1a text[];
-    v2a text[];
-    nv1 integer;
-    nv2 integer;
-    ne1 integer;
-    ne2 integer;
-
-begin
-    -- separate components into an array, like:
-    -- '2.1.0-beta3dev'  =>  {2,1,0,beta3dev}
-    v1a := regexp_matches(v1, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-    v2a := regexp_matches(v2, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-
-    -- convert modifiers to numbers for comparison
-    -- we do not delineate between alpha1, alpha2, alpha3, etc
-    ne1 := case when v1a[4] is null or v1a[4]='' then 5
-                when v1a[4] ilike 'rc%' then 4
-                when v1a[4] ilike 'beta%' then 3
-                when v1a[4] ilike 'alpha%' then 2
-                when v1a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    ne2 := case when v2a[4] is null or v2a[4]='' then 5
-                when v2a[4] ilike 'rc%' then 4
-                when v2a[4] ilike 'beta%' then 3
-                when v2a[4] ilike 'alpha%' then 2
-                when v2a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    nv1 := v1a[1]::integer * 10000 +
-           coalesce(v1a[2], '0')::integer * 1000 +
-           coalesce(v1a[3], '0')::integer *  100 + ne1;
-    nv2 := v2a[1]::integer * 10000 +
-           coalesce(v2a[2], '0')::integer * 1000 +
-           coalesce(v2a[3], '0')::integer *  100 + ne2;
-
-    --raise notice 'nv1: %, nv2: %, ne1: %, ne2: %', nv1, nv2, ne1, ne2;
-
-    return nv1 < nv2;
-end;
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-create or replace function _pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_startpoint(st_geometryn(g,1));
-    else
-        return st_startpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function _pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_endpoint(st_geometryn(g,1));
-    else
-        return st_endpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_parameter_check(fn text, sql text, big boolean default false)
-  RETURNS bool AS
-  $BODY$
-
-  DECLARE
-  rec record;
-  rec1 record;
-  has_rcost boolean;
-  safesql text;
-  BEGIN
-    IF (big) THEN
-       RAISE EXCEPTION 'This function is for old style functions';
-    END IF;
-
-    -- checking query is executable
-    BEGIN
-      safesql =  'select * from ('||sql||' ) AS __a__ limit 1';
-      execute safesql into rec;
-      EXCEPTION
-        WHEN OTHERS THEN
-            RAISE EXCEPTION 'Could not execute query please verify syntax of: '
-              USING HINT = sql;
-    END;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('dijkstra','astar') THEN
-        BEGIN
-          execute 'select id,source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: id, source, target, cost';
-        END;
-        execute 'select pg_typeof(id)::text as id_type, pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.id_type in ('integer'::text))
-              AND (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Error, columns ''source'', ''target'' must be of type int4, ''cost'' must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    IF fn IN ('astar') THEN
-        BEGIN
-          execute 'select x1,y1,x2,y2  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: x1,y1, x2,y2';
-        END;
-        execute 'select pg_typeof(x1)::text as x1_type, pg_typeof(y1)::text as y1_type, pg_typeof(x2)::text as x2_type, pg_typeof(y2)::text as y2_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.x1_type = 'double precision'::text)
-              AND (rec.y1_type = 'double precision'::text)
-              AND (rec.x2_type = 'double precision'::text)
-              AND (rec.y2_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Columns: x1, y1, x2, y2 must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('johnson') THEN
-        BEGIN
-          execute 'select source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING HINT = 'Please veryfy the column names: id, source, target, cost',
-                         ERRCODE = 'XX000';
-        END;
-
-        execute 'select pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Support for source,target columns only of type: integer. Support for Cost: double precision'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    -- Checking the data types of the optional reverse_cost";
-    has_rcost := false;
-    IF fn IN ('johnson','dijkstra','astar') THEN
-      BEGIN
-        execute 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||safesql||' ) AS __b__ limit 1 ' into rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-            return has_rcost;
-      END;
-      if (has_rcost) then
-        IF (big) then
-           IF  not (rec1.rev_type in ('bigint'::text, 'integer'::text, 'smallint'::text, 'double precision'::text, 'real'::text)) then
-             RAISE EXCEPTION 'Illegar type in optional parameter reverse_cost.'
-             USING ERRCODE = 'XX000';
-           END IF;
-        ELSE -- Version 2.0.0 is more restrictive
-           IF (rec1.rev_type != 'double precision') then
-             RAISE EXCEPTION 'Illegal type in optional parameter reverse_cost, must be of type float8'
-             USING ERRCODE = 'XX000';
-           END IF;
-        END IF;
-      end if;
-      return true;
-    END IF;
-    -- just for keeps
-    return true;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_onError(
-  IN errCond boolean,  -- true there is an error
-  IN reportErrs int,   -- 0, 1 or 2
-  IN fnName text,      -- function name that generates the error
-  IN msgerr text,      -- error message
-  IN hinto text default 'No hint', -- hint help
-  IN msgok text default 'OK')      -- message if everything is ok
-  RETURNS void AS
-$BODY$
-BEGIN
-  if errCond=true then
-     if reportErrs=0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-     else
-       if reportErrs = 2 then
-         raise notice '----> PGR ERROR in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-         raise raise_exception;
-       else
-         raise notice '----> PGR NOTICE in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-       end if;
-     end if;
-  else
-       raise debug 'PGR ----> %: %',fnName,msgok;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_msg(IN msgKind int, IN fnName text, IN msg text default '---->OK')
-  RETURNS void AS
-$BODY$
-BEGIN
-  if msgKind = 0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msg;
-  else
-       raise notice '----> PGR NOTICE in %: %',fnName,msg;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(sname text, tname text, cname text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    EXECUTE 'select data_type  from information_schema.columns '
-            || 'where table_name = '||quote_literal(tname)
-                 || ' and table_schema=' || quote_literal(sname)
-                 || ' and column_name='||quote_literal(cname)
-       into ctype;
-    err = ctype is null;
-    perform _pgr_onError(err, reportErrs, fnName,
-            'Type of Column '|| cname ||' not found',
-            'Check your column name',
-            'OK: Type of Column '|| cname || ' is ' || ctype);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(tab text, col text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-    select * into cname from _pgr_getColumnName(tab,col,reportErrs, fnName) ;
-    select * into ctype from _pgr_getColumnType(sname,tname,cname,reportErrs, fnName);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_get_statement(o_sql text)
-RETURNS text AS
-$BODY$
-DECLARE
-sql TEXT;
-BEGIN
-    EXECUTE 'SELECT statement FROM pg_prepared_statements WHERE name ='  || quote_literal(o_sql) || ' limit 1 ' INTO sql;
-    IF (sql IS NULL) THEN
-      RETURN   o_sql;
-    ELSE
-      RETURN  regexp_replace(sql, '(.)* as ', '', 'i');
-    END IF;
-END
-$BODY$
-LANGUAGE plpgsql STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_checkVertTab(vertname text, columnsArr  text[],
-    IN reportErrs int default 1, IN fnName text default '_pgr_checkVertTab',
-    OUT sname text,OUT vname text)
-RETURNS record AS
-$BODY$
-DECLARE
-    cname text;
-    colname text;
-    naming record;
-    debuglevel text;
-    err  boolean;
-    msgKind int;
-
-BEGIN
-    msgKind = 0; -- debug_
-    execute 'show client_min_messages' into debuglevel;
-
-    perform _pgr_msg(msgKind, fnName, 'Checking table ' || vertname || ' exists');
-       select * from _pgr_getTableName(vertname, 0, fnName) into naming;
-       sname=naming.sname;
-       vname=naming.tname;
-       err = sname is NULL or vname is NULL;
-    perform _pgr_onError( err, 2, fnName,
-          'Vertex Table: ' || vertname || ' not found',
-          'Please create ' || vertname || ' using  _pgr_createTopology() or pgr_createVerticesTable()',
-          'Vertex Table: ' || vertname || ' found');
-
-
-    perform _pgr_msg(msgKind, fnName, 'Checking columns of ' || vertname);
-      FOREACH cname IN ARRAY columnsArr
-      loop
-         select _pgr_getcolumnName(vertname, cname, 0, fnName) into colname;
-         if colname is null then
-           perform _pgr_msg(msgKind, fnName, 'Adding column ' || cname || ' in ' || vertname);
-           set client_min_messages  to warning;
-                execute 'ALTER TABLE '||_pgr_quote_ident(vertname)||' ADD COLUMN '||cname|| ' integer';
-           execute 'set client_min_messages  to '|| debuglevel;
-           perform _pgr_msg(msgKind, fnName);
-         end if;
-      end loop;
-    perform _pgr_msg(msgKind, fnName, 'Finished checking columns of ' || vertname);
-
-    perform _pgr_createIndex(vertname , 'id' , 'btree', reportErrs, fnName);
- END
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(
-    sname text, tname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    debuglevel text;
-    naming record;
-    tabname text;
-    query text;
-    msgKind int;
-BEGIN
-  msgKind = 0; -- debug_
-
-  execute 'show client_min_messages' into debuglevel;
-  tabname=_pgr_quote_ident(sname||'.'||tname);
-  perform _pgr_msg(msgKind, fnName, 'Checking ' || colname || ' column in ' || tabname || ' is indexed');
-    IF (_pgr_isColumnIndexed(sname,tname,colname, 0, fnName)) then
-       perform _pgr_msg(msgKind, fnName);
-    else
-      if indext = 'gist' then
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using gist('||quote_ident(colname)||')';
-      else
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using btree('||quote_ident(colname)||')';
-      end if;
-      perform _pgr_msg(msgKind, fnName, 'Adding index ' || tabname || '_' ||  colname || '_idx');
-      perform _pgr_msg(msgKind, fnName, ' Using ' ||  query);
-      set client_min_messages  to warning;
-      BEGIN
-        execute query;
-        EXCEPTION WHEN others THEN
-          perform _pgr_onError( true, reportErrs, fnName,
-            'Could not create index on:' || colname, SQLERRM);
-      END;
-      execute 'set client_min_messages  to '|| debuglevel;
-      perform _pgr_msg(msgKind, fnName);
-    END IF;
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(tabname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    naming record;
-    sname text;
-    tname text;
-
-BEGIN
-    select * from _pgr_getTableName(tabname, 2, fnName)  into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    execute _pgr_createIndex(sname, tname, colname, indext, reportErrs, fnName);
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pointToId(
-    point geometry,
-    tolerance double precision,
-    vertname text,
-    srid integer)
-
-  RETURNS bigint AS
-$BODY$
-DECLARE
-    rec record;
-    pid bigint;
-
-BEGIN
-    EXECUTE 'SELECT ST_Distance(
-        the_geom,
-        ST_GeomFromText(ST_AsText('
-                || quote_literal(point::text)
-                || '),'
-            || srid ||')) AS d, id, the_geom
-    FROM '||_pgr_quote_ident(vertname)||'
-    WHERE ST_DWithin(
-        the_geom,
-        ST_GeomFromText(
-            ST_AsText(' || quote_literal(point::text) ||'),
-            ' || srid || '),' || tolerance||')
-    ORDER BY d
-    LIMIT 1' INTO rec ;
-    IF rec.id IS NOT NULL THEN
-        pid := rec.id;
-    ELSE
-        execute 'INSERT INTO '||_pgr_quote_ident(vertname)||' (the_geom) VALUES ('||quote_literal(point::text)||')';
-        pid := lastval();
-END IF;
-
-RETURN pid;
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'many_to_many_dijkstra'
-LANGUAGE c VOLATILE;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer, OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstra(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(Many to Many)';
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraVia(
-    edges_sql TEXT,
-    via_vertices ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    strict BOOLEAN DEFAULT FALSE,
-    U_turn_on_edge BOOLEAN DEFAULT TRUE,
-
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'dijkstraVia'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_johnson(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'johnson'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_floydWarshall(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'floydWarshall'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'astarManyToMany'
-LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, normal:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to Many)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true, normal:=false) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to Many)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid ANYARRAY,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-    equicost BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'many_withPointsDD'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_withPointsDD($1, $2, ARRAY[$3]::BIGINT[], $4, $5, $6, $7, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vids anyarray,
-    distance FLOAT,
-    directed BOOLEAN DEFAULT TRUE,
-    equicost BOOLEAN DEFAULT FALSE,
-    OUT seq integer,
-    OUT from_v  bigint,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'driving_many_to_dist'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vid bigint,
-    distance FLOAT8,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq integer,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer, directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'kshortest_path'
-    LANGUAGE c STABLE STRICT;
-
--- V2 the graph is directed and there are no heap paths
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid integer, end_vid integer, k integer, has_rcost boolean)
-  RETURNS SETOF pgr_costresult3 AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated signature of pgr_ksp';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql::text, false);
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_rcost) THEN
-           -- user says that it has reverse_cost but its not true
-           RAISE EXCEPTION 'has_reverse_cost set to true but reverse_cost not found';
-         ELSE
-           -- user says that it does not have reverse_cost but it does have it
-           -- to ignore we remove reverse_cost from the query
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         END IF;
-      END IF;
-
-      RETURN query SELECT ((row_number() over()) -1)::integer  AS seq,  (path_id - 1)::integer AS id1, node::integer AS id2, edge::integer AS id3, cost
-            FROM _pgr_ksp(sql::text, start_vid, end_vid, k, TRUE, FALSE) WHERE path_id <= k;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer,
-  directed boolean default true, heap_paths boolean default false,
-  --directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  BEGIN
-         RETURN query SELECT *
-                FROM _pgr_ksp(edges_sql::text, start_vid, end_vid, k, directed, heap_paths);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsKSP(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    k INTEGER,
-
-    directed BOOLEAN DEFAULT TRUE,
-    heap_paths BOOLEAN DEFAULT FALSE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER, OUT path_id INTEGER, OUT path_seq INTEGER,
-    OUT node BIGINT, OUT edge BIGINT,
-    OUT cost FLOAT, OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'withPoints_ksp'
-    LANGUAGE c STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_unnest_matrix(matrix float8[][], OUT start_vid integer, OUT end_vid integer, out agg_cost float8)
-RETURNS SETOF record AS
-
-$body$
-DECLARE
-
-m float8[];
-
-BEGIN
-    start_vid = 1;
-    foreach m slice 1 in  ARRAY matrix
-    LOOP
-        end_vid = 1;
-        foreach agg_cost in  ARRAY m
-        LOOP
-            RETURN next;
-            end_vid = end_vid + 1;
-        END LOOP;
-        start_vid = start_vid + 1;
-    END LOOP;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_tsp(
-    matrix float8[][],
-    startpt INTEGER,
-    endpt INTEGER DEFAULT -1,
-    OUT seq INTEGER,
-    OUT id INTEGER)
-RETURNS SETOF record AS
-$body$
-DECLARE
-table_sql TEXT;
-debuglevel TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(float8[][], integer, integer)';
-
-    CREATE TEMP TABLE ___tmp2 ON COMMIT DROP AS SELECT * FROM _pgr_unnest_matrix( matrix );
-
-
-    startpt := startpt + 1;
-    IF endpt = -1 THEN endpt := startpt;
-    END IF;
-
-
-    RETURN QUERY
-    WITH
-    result AS (
-        SELECT * FROM pgr_TSP(
-        $$SELECT * FROM ___tmp2 $$,
-        startpt, endpt,
-
-        tries_per_temperature :=  500 :: INTEGER,
-        max_changes_per_temperature := 30 :: INTEGER,
-        max_consecutive_non_changes := 500 :: INTEGER,
-
-        randomize:=false)
-    )
-    SELECT (row_number() over(ORDER BY result.seq) - 1)::INTEGER AS seq, (result.node - 1)::INTEGER AS id
-
-    FROM result WHERE NOT(result.node = startpt AND result.seq != 1);
-
-    DROP TABLE ___tmp2;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-
-
-CREATE OR  REPLACE FUNCTION pgr_tsp(sql text, start_id INTEGER, end_id INTEGER default (-1))
-returns setof pgr_costResult as
-$body$
-DECLARE
-table_sql TEXT;
-rec RECORD;
-debuglevel TEXT;
-n BIGINT;
-
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(sql, integer, integer)';
-
-    table_sql := 'CREATE TEMP TABLE ___tmp ON COMMIT DROP AS ' || sql ;
-    EXECUTE table_sql;
-
-
-    BEGIN
-        EXECUTE 'SELECT id, x, y FROM ___tmp' INTO rec;
-        EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                USING ERRCODE = 'XX000',
-                HINT = 'Please verify the column names: id, x, y';
-    END;
-
-    EXECUTE
-    'SELECT
-        pg_typeof(id)::text as id_type,
-        pg_typeof(x)::text as x_type,
-        pg_typeof(y)::text as y_type FROM ___tmp' INTO rec;
-
-
-    IF NOT((rec.id_type in ('integer'::text))
-        AND (rec.x_type = 'double precision'::text)
-        AND (rec.y_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION '''id'' must be of type INTEGER, ''x'' ad ''y'' must be of type FLOAT'
-            USING ERRCODE = 'XX000';
-    END IF;
-
-    EXECUTE 'SELECT count(*) AS n FROM (' || sql || ') AS __a__' INTO rec;
-    n = rec.n;
-
-    RETURN query
-        SELECT (seq - 1)::INTEGER AS seq, node::INTEGER AS id1, node::INTEGER AS id2, cost
-        FROM pgr_eucledianTSP(sql, start_id, end_id,
-
-            tries_per_temperature :=  500 * n :: INTEGER,
-            max_changes_per_temperature := 60 * n :: INTEGER,
-            max_consecutive_non_changes := 500 * n :: INTEGER,
-
-            randomize := false) WHERE seq <= n;
-    DROP TABLE ___tmp;
-
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-create or replace function _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
-  as
-$body$
-declare
-    sql text;
-    r record;
-
-begin
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    sql := 'with nodes as (' || sqlin || ')
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j, st_distance(st_makepoint(a.x, a.y), st_makepoint(b.x, b.y)) as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i';
-
-    for r in execute sql loop
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-
-end;
-$body$
-language plpgsql stable cost 10;
-
-
-CREATE OR REPLACE FUNCTION pgr_TSP(
-    matrix_row_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'newTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_eucledianTSP(
-    coordinates_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'eucledianTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_alphashape(sql text, alpha float8 DEFAULT 0, OUT x float8, OUT y float8)
-    RETURNS SETOF record
-    AS '$libdir/libpgrouting-2.5', 'alphashape'
-    LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pointsAsPolygon(query varchar, alpha float8 DEFAULT 0)
-	RETURNS geometry AS
-	$$
-	DECLARE
-		r record;
-		geoms geometry[];
-		vertex_result record;
-		i int;
-		n int;
-		spos int;
-		q text;
-		x float8[];
-		y float8[];
-
-	BEGIN
-		geoms := array[]::geometry[];
-		i := 1;
-
-		FOR vertex_result IN EXECUTE 'SELECT x, y FROM pgr_alphashape('''|| query || ''', ' || alpha || ')'
-		LOOP
-			x[i] = vertex_result.x;
-			y[i] = vertex_result.y;
-			i := i+1;
-		END LOOP;
-
-		n := i;
-		IF n = 1 THEN
-			RAISE NOTICE 'n = 1';
-			RETURN NULL;
-		END IF;
-
-		spos := 1;
-		q := 'SELECT ST_GeometryFromText(''POLYGON((';
-		FOR i IN 1..n LOOP
-			IF x[i] IS NULL AND y[i] IS NULL THEN
-				q := q || ', ' || x[spos] || ' ' || y[spos] || '))'',0) AS geom;';
-				EXECUTE q INTO r;
-				geoms := geoms || array[r.geom];
-				q := '';
-			ELSE
-				IF q = '' THEN
-					spos := i;
-					q := 'SELECT ST_GeometryFromText(''POLYGON((';
-				END IF;
-				IF i = spos THEN
-					q := q || x[spos] || ' ' || y[spos];
-				ELSE
-					q := q || ', ' || x[i] || ' ' || y[i];
-				END IF;
-			END IF;
-		END LOOP;
-
-		RETURN ST_BuildArea(ST_Collect(geoms));
-	END;
-	$$
-	LANGUAGE 'plpgsql' VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'bd_astar'
-LANGUAGE C VOLATILE;
-
-
-
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed:=true, only_cost:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    BOOLEAN,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false);
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to Many)';
-
-
-
--- one to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to Many)';
-
-
--- bdDijkstra MANY TO MANY
-CREATE OR REPLACE FUNCTION _pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bdDijkstra'
-LANGUAGE c VOLATILE;
-
-
-
--- ONE TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- TODO directed BOOLEAN DEFAULT TRUE,  on version 3
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, false) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, true) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_vid integer,
-    target_vid integer,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_vertex'
-LANGUAGE 'c' IMMUTABLE;
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_edge'
-LANGUAGE 'c' IMMUTABLE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || edges_sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        -- no restrictions then its a dijkstra
-        RETURN query SELECT a.seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_dijkstra(new_sql, start_vid, end_vid, directed) a;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, start_vid, end_vid, directed, has_rcost, restrictions_sql);
-    RETURN;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trspViaVertices(
-    edges_sql TEXT,
-    via_vids ANYARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult3 AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            new_sql :=
-               'WITH old_sql AS (' || edges_sql || ')' ||
-                '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        RETURN query SELECT (row_number() over())::INTEGER, path_id:: INTEGER, node::INTEGER,
-            (CASE WHEN edge = -2 THEN -1 ELSE edge END)::INTEGER, cost
-            FROM pgr_dijkstraVia(new_sql, via_vids, directed, strict:=true) WHERE edge != -1;
-        RETURN;
-    END IF;
-
-
-    -- make the call without contradiction from part of the user
-    RETURN query SELECT * FROM _pgr_trspViaVertices(new_sql, via_vids::INTEGER[], directed, has_rcost, restrictions_sql);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-
-    new_sql := sql;
-    IF (has_reverse != has_reverse_cost) THEN  -- user contradiction
-        IF (has_reverse) THEN
-            -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) THEN
-        -- no restrictions then its a with points
-        RETURN query SELECT a.seq-1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_withpoints(new_sql,
-            '(SELECT 1 as pid, ' || source_eid || 'as edge_id, ' || source_pos || '::float8 as fraction)'
-            || ' UNION '
-            || '(SELECT 2, ' || target_eid || ', ' || target_pos || ')' ::TEXT,
-            -1, -2, directed) a;
-        -- WHERE node != -2;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, source_eid, source_pos, target_eid, target_pos, directed, has_reverse_cost, turn_restrict_sql);
-    RETURN;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-create or replace function _pgr_trspViaVertices(sql text, vids integer[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    lrra boolean := false;
-    seq integer := 0;
-    seq2 integer := 0;
-
-begin
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(vids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from _pgr_trsp(sql, vids[i], vids[i+1], directed, has_rcost, turn_restrict_sql) as a loop
-            -- filter out the individual path ends except the last one
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --raise notice 'rr: %', rr;
-            if rr.id3 = -1 then
-                lrr := rr;
-                lrra := true;
-            else
-                seq := seq + 1;
-                rr.seq := seq;
-                return next rr;
-            end if;
-        end loop;
-    end loop;
-
-    if lrra then
-        seq := seq + 1;
-        lrr.seq := seq;
-        return next lrr;
-    end if;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-
-----------------------------------------------------------------------------------------------------------
-
-create or replace function pgr_trspViaEdges(sql text, eids integer[], pcts float8[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    first boolean := true;
-    seq integer := 0;
-    seq2 integer :=0;
-    has_reverse BOOLEAN;
-    point_is_vertex BOOLEAN := false;
-    edges_sql TEXT;
-    f float;
-
-begin
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql := sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (NOT has_rcost) THEN
-            -- user does not want to use reverse cost column
-            edges_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    FOREACH f IN ARRAY pcts LOOP
-        IF f in (0,1) THEN
-           point_is_vertex := true;
-        END IF;
-    END LOOP;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) AND NOT point_is_vertex THEN
-        -- no restrictions then its a _pgr_withPointsVia
-        RETURN query SELECT a.seq::INTEGER, path_id::INTEGER AS id1, node::INTEGER AS id2, edge::INTEGER AS id3, cost
-        FROM _pgr_withPointsVia(edges_sql, eids, pcts, directed) a;
-        RETURN;
-    END IF;
-
-    if array_length(eids, 1) != array_length(pcts, 1) then
-        raise exception 'The length of arrays eids and pcts must be the same!';
-    end if;
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(eids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from pgr_trsp(edges_sql,
-                                  eids[i], pcts[i],
-                                  eids[i+1], pcts[i+1],
-                                  directed,
-                                  has_rcost,
-                                  turn_restrict_sql) as a loop
-            -- combine intermediate via costs when cost is split across
-            -- two parts of a segment because it stops it and
-            -- restarts the next leg also on it
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --
-            -- there are multiple condition we have to deal with
-            -- between the end of one leg and start of the next
-            -- 1. same vertex_id. edge_id=-1; drop record with edge_id=-1
-            -- means: path ends on vertex
-            -- NOTICE:  rr: (19,1,44570022,-1,0)
-            -- NOTICE:  rr: (0,2,44570022,1768045,2.89691196717448)
-            -- 2. vertex_id=-1; sum cost components
-            -- means: path end/starts with the segment
-            -- NOTICE:  rr: (11,2,44569628,1775909,9.32885885148532)
-            -- NOTICE:  rr: (0,3,-1,1775909,0.771386350984395)
-
-            --raise notice 'rr: %', rr;
-            if first then
-                lrr := rr;
-                first := false;
-            else
-                if lrr.id3 = -1 then
-                    lrr := rr;
-                elsif lrr.id3 = rr.id3 then
-                    lrr.cost := lrr.cost + rr.cost;
-                    if rr.id2 = -1 then
-                        rr.id2 := lrr.id2;
-                    end if;
-                else
-                    seq := seq + 1;
-                    lrr.seq := seq;
-                    return next lrr;
-                    lrr := rr;
-                end if;
-            end if;
-        end loop;
-    end loop;
-
-    seq := seq + 1;
-    lrr.seq := seq;
-    return next lrr;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-----------------------------
---    MANY TO MANY
-----------------------------
-
-
-CREATE OR REPLACE FUNCTION _pgr_maxflow(
-    edges_sql TEXT,
-    sources ANYARRAY,
-    targets ANYARRAY,
-    algorithm INTEGER DEFAULT 1,
-    only_flow BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'max_flow_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-
-------------------------------------
--- 3 pgr_edmondsKarp
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 2 boykov_kolmogorov
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 1 pgr_pushRelabel
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT flow
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], algorithm := 1, only_flow := true);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], $3::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, $2::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxCardinalityMatch(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'edge_disjoint_paths_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    bigint,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    IN directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_contractGraph(
-    edges_sql TEXT,
-    contraction_order BIGINT[],
-    max_cycles integer DEFAULT 1,
-    forbidden_vertices BIGINT[] DEFAULT ARRAY[]::BIGINT[],
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT type TEXT,
-    OUT id BIGINT,
-    OUT contracted_vertices BIGINT[],
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost float)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'contractGraph'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliver(
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_cell_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliver'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliverEuclidean (
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliverEuclidean'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_vrpOneDepot(
-    TEXT, -- customers_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_sql
-    INTEGER, -- depot_id
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-orders_sql TEXT;
-trucks_sql TEXT;
-matrix_sql TEXT;
-final_sql TEXT;
-BEGIN
-
-    orders_sql = $$WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    pickups AS (
-        SELECT id, x AS p_x, y AS p_y, open_time AS p_open, close_time AS p_close, service_time AS p_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vrp_orders.id AS id, order_unit AS demand, pickups.id AS p_node_id, p_x, p_y, p_open, p_close, p_service,
-    vrp_orders.id AS d_node_id, x AS d_x, y AS d_y, open_time AS d_open, close_time AS d_close, service_time AS d_service
-    FROM vrp_orders, pickups
-    WHERE vrp_orders.id != $$ || $4;
-
-
-    trucks_sql = $$ WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    vrp_vehicles AS ($$ || $2 || $$ ),
-    starts AS (
-        SELECT id AS start_node_id, x AS start_x, y AS start_y, open_time AS start_open, close_time AS start_close, service_time AS start_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vehicle_id AS id, capacity, starts.* FROM vrp_vehicles, starts;
-    $$;
-
-    final_sql = '
-    SELECT * FROM _pgr_pickDeliver(
-            $$' || orders_sql || '$$,
-            $$' || trucks_sql || '$$,
-            $$' || $3 || '$$,
-            max_cycles := 2,
-            initial_sol := 4 ); ';
-
-    RAISE DEBUG '%', orders_sql;
-    RAISE DEBUG '%', trucks_sql;
-    RAISE DEBUG '%', $3;
-    RAISE DEBUG '%', final_sql;
-
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
------------------------------------------------------------------------
--- Core function for vrp with sigle depot computation
--- See README for description
------------------------------------------------------------------------
---
---
-
-create or replace function pgr_vrpOneDepot(
-	order_sql text,
-	vehicle_sql text,
-	cost_sql text,
-	depot_id integer,
-
-	OUT oid integer,
-	OUT opos integer,
-	OUT vid integer,
-	OUT tarrival integer,
-	OUT tdepart integer)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT order_id::INTEGER, stop_seq::INTEGER, vehicle_id::INTEGER, arrival_time::INTEGER, departure_time::INTEGER
-    FROM _pgr_vrpOneDepot($1, $2,
-       '
-            SELECT src_id AS start_vid, dest_id AS end_vid, traveltime AS agg_cost FROM ('||$3||') AS a
-       ',
-        $4
-    ) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_gsoc_vrppdtw(
-    customers_sql TEXT,
-    max_vehicles INTEGER,
-    capacity FLOAT,
-    speed FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-
-    OUT seq INTEGER,
-    OUT vehicle_id INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT stop_id BIGINT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-    orders_sql TEXT;
-    vehicles_sql TEXT;
-    final_sql TEXT;
-BEGIN
-    orders_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        pickups AS (
-            SELECT id, demand, x as p_x, y as p_y, opentime as p_open, closetime as p_close, servicetime as p_service
-            FROM  customer_data WHERE pindex = 0 AND id != 0
-        ),
-        deliveries AS (
-            SELECT pindex AS id, x as d_x, y as d_y, opentime as d_open, closetime as d_close, servicetime as d_service
-            FROM  customer_data WHERE dindex = 0 AND id != 0
-        )
-        SELECT * FROM pickups JOIN deliveries USING(id) ORDER BY pickups.id
-    $$;
-
-    vehicles_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ )
-        SELECT id, x AS start_x, y AS start_y,
-            opentime AS start_open, closetime AS start_close, $$ ||
-            capacity || $$ AS capacity, $$ || max_vehicles || $$ AS number, $$ || speed || $$ AS speed
-            FROM customer_data WHERE id = 0 LIMIT 1
-        $$;
---  seq | vehicle_id | vehicle_seq | stop_id | travel_time | arrival_time | wait_time | service_time | departure_time
-    final_sql = $$ WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        p_deliver AS (SELECT * FROM _pgr_pickDeliverEuclidean('$$ || orders_sql || $$',  '$$ || vehicles_sql || $$',  1, $$ || max_cycles || $$ )),
-        picks AS (SELECT p_deliver.*, pindex, dindex, id AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 2)),
-        delivers AS (SELECT p_deliver.*, pindex, dindex, dindex AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 3)),
-        depots AS (SELECT p_deliver.*, 0 as pindex, 0 as dindex, 0 AS the_id FROM p_deliver WHERE (stop_type IN (-1,1,6))),
-        the_union AS (SELECT * FROM picks UNION SELECT * FROM delivers UNION SELECT * from depots)
-
-        SELECT (row_number() over(ORDER BY a.seq))::INTEGER, vehicle_seq, a.stop_seq, the_id::BIGINT, a.travel_time, a.arrival_time, a.wait_time, a.service_time, a.departure_time
-        FROM (SELECT * FROM the_union) AS a ORDER BY a.seq
-        $$;
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-CREATE OR REPLACE FUNCTION pgr_gsoc_vrppdtw(
-    sql text,
-    vehicle_num INTEGER,
-    capacity INTEGER
-)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-customers_sql TEXT;
-BEGIN
-    RETURN query
-         SELECT a.seq, vehicle_id::INTEGER AS id1, stop_id::INTEGER AS id2, departure_time AS cost
-        FROM _pgr_gsoc_vrppdtw($1, $2, $3, 1, 30) AS a WHERE vehicle_id NOT IN (-2);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION _pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN,
-    driving_side CHAR,
-    details BOOLEAN,
-
-    only_cost BOOLEAN DEFAULT false, -- gets path
-    normal BOOLEAN DEFAULT true, -- false for many to onu
-
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'withPoints'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], ARRAY[$4]::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], ARRAY[$4]::bigint[], $5, $6, $7, FALSE, FALSE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], $4::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], $4::BIGINT[], $5,  $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION  _pgr_withPointsVia(
-    sql text,
-    via_edges bigint[],
-    fraction float[],
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  has_rcost boolean;
-  sql_new_vertices text := ' ';
-  sql_on_vertex text;
-  v_union text := ' ';
-  dummyrec record;
-  rec1 record;
-  via_vertices int[];
-  sql_safe text;
-  new_edges text;
-  BEGIN
-     BEGIN
-        sql_safe = 'SELECT id, source, target, cost, reverse_cost FROM ('|| sql || ') AS __a';
-
-        EXECUTE 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||sql_safe||' ) AS __b__ limit 1 ' INTO rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-     END;
-
-
-      IF array_length(via_edges, 1) != array_length(fraction, 1) then
-        RAISE EXCEPTION 'The length of via_edges is different of length of via_edges';
-      END IF;
-
-      FOR i IN 1 .. array_length(via_edges, 1)
-      LOOP
-          IF fraction[i] = 0 THEN
-              sql_on_vertex := 'SELECT source FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.source;
-          ELSE IF fraction[i] = 1 THEN
-              sql_on_vertex := 'SELECT target FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.target;
-          ELSE
-              via_vertices[i] = -i;
-              IF has_rcost THEN
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost,
-                              reverse_cost * (1 - ' || fraction[i] || ')  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost,
-                              reverse_cost *  ' || fraction[i] || '  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' where id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               ELSE
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               END IF;
-          END IF;
-          END IF;
-     END LOOP;
-
-     IF sql_new_vertices = ' ' THEN
-         new_edges := sql;
-     ELSE
-         IF has_rcost THEN
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost,
-                         lead(cost) OVER w  - cost AS reverse_cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL),
-                   second_part AS ( SELECT * FROM (SELECT id, lead(source) OVER w  AS source, source as target,
-                         reverse_cost - lead(reverse_cost) OVER w  AS cost,
-                         reverse_cost - lead(reverse_cost) OVER w  AS reverse_cost
-                      FROM  the_union  WHERE target > 0 and reverse_cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY reverse_cost ASC) ) as n2
-                      WHERE source IS NOT NULL),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part)
-                             UNION
-                       (SELECT * FROM second_part) ) _union )
-                  SELECT *  FROM more_union';
-         ELSE
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL ),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part) ) _union )
-                  SELECT *  FROM more_union';
-          END IF;
-      END IF;
-
- -- raise notice '%', new_edges;
-     sql_new_vertices := sql_new_vertices || v_union || ' (' || sql || ')';
-     RETURN query SELECT *
-         FROM pgr_dijkstraVia(new_edges, via_vertices, directed, has_rcost);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_lineGraph(
-    TEXT, -- edges_sql
-    directed BOOLEAN DEFAULT true,
-    OUT seq INTEGER,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost FLOAT,
-    OUT reverse_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'lineGraph'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_connectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'connectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_strongComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'strongComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_biconnectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the edge in the component
-    OUT n_seq INTEGER,          -- nth_seq of the edge in the component
-    OUT edge BIGINT)            -- the number of the edge
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'biconnectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_articulationPoints(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'articulationPoints'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bridges(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT edge BIGINT)            -- the number of the edge 
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bridges'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createtopology(edge_table text, tolerance double precision,
-		   the_geom text default 'the_geom', id text default 'id',
-		   source text default 'source', target text default 'target',rows_where text default 'true',
-		   clean boolean default FALSE)
-RETURNS VARCHAR AS
-$BODY$
-
-DECLARE
-    points record;
-    sridinfo record;
-    source_id bigint;
-    target_id bigint;
-    totcount bigint;
-    rowcount bigint;
-    srid integer;
-    sql text;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    notincluded integer;
-    i integer;
-    naming record;
-    info record;
-    flag boolean;
-    query text;
-    idtype text;
-    gtype text;
-    sourcetype text;
-    targettype text;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-    msgKind int;
-    emptied BOOLEAN;
-
-BEGIN
-    msgKind = 1; -- notice
-    fnName = 'pgr_createTopology';
-    raise notice 'PROCESSING:';
-    raise notice 'pgr_createTopology(''%'', %, ''%'', ''%'', ''%'', ''%'', rows_where := ''%'', clean := %)',edge_table,tolerance,the_geom,id,source,target,rows_where, clean;
-    execute 'show client_min_messages' into debuglevel;
-
-
-    raise notice 'Performing checks, please wait .....';
-
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-        sname=naming.sname;
-        tname=naming.tname;
-        tabname=sname||'.'||tname;
-        vname=tname||'_vertices_pgr';
-        vertname= sname||'.'||vname;
-        rows_where = ' AND ('||rows_where||')';
-      raise DEBUG '     --> OK';
-
-
-      raise debug 'Checking column names in edge table';
-        select * into idname     from _pgr_getColumnName(sname, tname,id,2,fnName);
-        select * into sourcename from _pgr_getColumnName(sname, tname,source,2,fnName);
-        select * into targetname from _pgr_getColumnName(sname, tname,target,2,fnName);
-        select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2,fnName);
-
-
-        err = sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname;
-        perform _pgr_onError( err, 2, fnName,
-               'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-	       'Column names are OK');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking column types in edge table';
-        select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-        select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-        select * into idtype from _pgr_getColumnType(sname,tname,idname,1, fnName);
-
-        err = idtype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column id:'|| idname, ' Expected type of '|| idname || ' is integer,smallint or bigint but '||idtype||' was found');
-
-        err = sourcetype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column source:'|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-        err = targettype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column target:'|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or bigint but '||targettype||' was found');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         raise debug '%',query;
-         EXECUTE query INTO sridinfo;
-
-         err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-         perform _pgr_onError(err, 2, fnName,
-	     'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-
-         srid := sridinfo.srid;
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking and creating indices in edge table';
-        perform _pgr_createIndex(sname, tname , idname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-
-        gname=quote_ident(gname);
-        idname=quote_ident(idname);
-        sourcename=quote_ident(sourcename);
-        targetname=quote_ident(targetname);
-      raise DEBUG '     --> OK';
-
-
-
-
-
-    BEGIN
-        -- issue #193 & issue #210 & #213
-        -- this sql is for trying out the where clause
-        -- the select * is to avoid any column name conflicts
-        -- limit 1, just try on first record
-        -- if the where clasuse is ill formed it will be caught in the exception
-        sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-        EXECUTE sql into dummyRec;
-        -- end
-
-        -- if above where clasue works this one should work
-        -- any error will be caught by the exception also
-        sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NOT NULL AND '||
-	    idname||' IS NOT NULL)=false '||rows_where;
-        EXECUTE SQL  into notincluded;
-
-        if clean then
-            raise debug 'Cleaning previous Topology ';
-               execute 'UPDATE ' || _pgr_quote_ident(tabname) ||
-               ' SET '||sourcename||' = NULL,'||targetname||' = NULL';
-        else
-            raise debug 'Creating topology for edges with non assigned topology';
-            if rows_where=' AND (true)' then
-                rows_where=  ' and ('||quote_ident(sourcename)||' is null or '||quote_ident(targetname)||' is  null)';
-            end if;
-        end if;
-        -- my thoery is that the select Count(*) will never go through here
-        EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-             RAISE NOTICE '%',sql;
-             RETURN 'FAIL';
-    END;
-
-    BEGIN
-         raise DEBUG 'initializing %',vertname;
-         execute 'select * from _pgr_getTableName('||quote_literal(vertname)
-                                                  || ',0,' || quote_literal(fnName) ||' )' into naming;
-         emptied = false;
-         set client_min_messages  to warning;
-         IF sname=naming.sname AND vname=naming.tname  THEN
-            if clean then
-                execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-                execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-                emptied = true;
-            end if;
-         ELSE -- table doesn't exist
-            execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-            emptied = true;
-         END IF;
-         IF (emptied) THEN
-             execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-	         quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-             perform _pgr_createIndex(vertname , 'the_geom'::text , 'gist'::text);
-         END IF;
-         execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id"}''::text[])' into naming;
-         execute 'set client_min_messages  to '|| debuglevel;
-         raise DEBUG  '  ------>OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: something went wrong when initializing the verties table';
-             RETURN 'FAIL';
-    END;
-
-
-
-    raise notice 'Creating Topology, Please wait...';
-        rowcount := 0;
-        FOR points IN EXECUTE 'SELECT ' || idname || '::bigint AS id,'
-            || ' _pgr_StartPoint(' || gname || ') AS source,'
-            || ' _pgr_EndPoint('   || gname || ') AS target'
-            || ' FROM '  || _pgr_quote_ident(tabname)
-            || ' WHERE ' || gname || ' IS NOT NULL AND ' || idname||' IS NOT NULL '||rows_where
-        LOOP
-
-            rowcount := rowcount + 1;
-            IF rowcount % 1000 = 0 THEN
-                RAISE NOTICE '% edges processed', rowcount;
-            END IF;
-
-
-            source_id := _pgr_pointToId(points.source, tolerance,vertname,srid);
-            target_id := _pgr_pointToId(points.target, tolerance,vertname,srid);
-            BEGIN
-                sql := 'UPDATE ' || _pgr_quote_ident(tabname) ||
-                    ' SET '||sourcename||' = '|| source_id::text || ','||targetname||' = ' || target_id::text ||
-                    ' WHERE ' || idname || ' =  ' || points.id::text;
-
-                IF sql IS NULL THEN
-                    RAISE NOTICE 'WARNING: UPDATE % SET source = %, target = % WHERE % = % ', tabname, source_id::text, target_id::text, idname,  points.id::text;
-                ELSE
-                    EXECUTE sql;
-                END IF;
-                EXCEPTION WHEN OTHERS THEN
-                    RAISE NOTICE '%', SQLERRM;
-                    RAISE NOTICE '%',sql;
-                    RETURN 'FAIL';
-            end;
-        END LOOP;
-        raise notice '-------------> TOPOLOGY CREATED FOR  % edges', rowcount;
-        RAISE NOTICE 'Rows with NULL geometry or NULL id: %',notincluded;
-        Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname), _pgr_quote_ident(vertname);
-        raise notice '----------------------------------------------';
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_createTopology(text, double precision,text,text,text,text,text,boolean)
-IS 'args: edge_table,tolerance, the_geom:=''the_geom'',source:=''source'', target:=''target'',rows_where:=''true'' - fills columns source and target in the geometry table and creates a vertices table for selected rows';
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
-RETURNS character varying AS
-$BODY$
-
-DECLARE
-    points record;
-    seg record;
-    naming record;
-    sridinfo record;
-    srid integer;
-    ecnt integer;
-    vertname text;
-    sname text;
-    tname text;
-    vname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    geotype text;
-    gname text;
-    tabName text;
-    flag boolean ;
-    query text;
-    selectionquery text;
-    i integer;
-    tot integer;
-    NumIsolated integer;
-    numdeadends integer;
-    numgaps integer;
-    NumCrossing integer;
-    numRings integer;
-    debuglevel text;
-
-
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeGraph(''%'',%,''%'',''%'',''%'',''%'',''%'')',edge_table,tolerance,the_geom,id,source,target,rows_where;
-  raise notice 'Performing checks, please wait ...';
-  execute 'show client_min_messages' into debuglevel;
-
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-    raise DEBUG '     --> OK';
-
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","cnt","chk"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET cnt=0 ,chk=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into idname     from _pgr_getColumnName(sname, tname,id,2);
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname, 2,
-                       'pgr_analyzeGraph',  'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-                       'Column names are OK');
-
-        raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-   BEGIN
-       raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         EXECUTE QUERY INTO sridinfo;
-
-         perform _pgr_onError( sridinfo IS NULL OR sridinfo.srid IS NULL,2,
-                 'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname,
-                 'SRID of '||gname||' is '||sridinfo.srid);
-
-         IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-             RAISE NOTICE ' Can not determine the srid of the geometry "%" in table %', the_geom,tabname;
-             RETURN 'FAIL';
-         END IF;
-         srid := sridinfo.srid;
-         raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM;--issue 210,211,213
-             RAISE NOTICE 'ERROR: something went wrong when checking for SRID of % in table %', the_geom,tabname;
-             RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-       raise debug 'Checking  indices in edge table';
-       perform _pgr_createIndex(tabname , idname , 'btree');
-       perform _pgr_createIndex(tabname , sourcename , 'btree');
-       perform _pgr_createIndex(tabname , targetname , 'btree');
-       perform _pgr_createIndex(tabname , gname , 'gist');
-
-       gname=quote_ident(gname);
-       sourcename=quote_ident(sourcename);
-       targetname=quote_ident(targetname);
-       idname=quote_ident(idname);
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking indices';
-          RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-        query='select count(*) from '||_pgr_quote_ident(tabname)||' where true  '||rows_where;
-        EXECUTE query into ecnt;
-        raise DEBUG '-->Rows Where condition: OK';
-        raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-            RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-            RAISE NOTICE 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-            RAISE NOTICE '%',query;
-            RETURN 'FAIL';
-    END;
-
-    selectionquery ='with
-           selectedRows as( (select '||sourcename||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||')
-                           union
-                           (select '||targetname||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||'))';
-
-
-
-
-
-   BEGIN
-       RAISE NOTICE 'Analyzing for dead ends. Please wait...';
-       query= 'with countingsource as (select a.'||sourcename||' as id,count(*) as cnts
-               from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||sourcename||')
-                     ,countingtarget as (select a.'||targetname||' as id,count(*) as cntt
-                    from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||targetname||')
-                   ,totalcount as (select id,case when cnts is null and cntt is null then 0
-                                                   when cnts is null then cntt
-                                                   when cntt is null then cnts
-                                                   else cnts+cntt end as totcnt
-                                   from ('||_pgr_quote_ident(vertname)||' as a left
-                                   join countingsource as t using(id) ) left join countingtarget using(id))
-               update '||_pgr_quote_ident(vertname)||' as a set cnt=totcnt from totalcount as b where a.id=b.id';
-       raise debug '%',query;
-       execute query;
-       query=selectionquery||'
-              SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE cnt=1 and id in (select id from selectedRows)';
-       raise debug '%',query;
-       execute query  INTO numdeadends;
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-          RAISE NOTICE 'ERROR: something went wrong when analizing for dead ends';
-          RETURN 'FAIL';
-   END;
-
-
-
-    BEGIN
-          RAISE NOTICE 'Analyzing for gaps. Please wait...';
-          query = 'with
-                   buffer as (select id,st_buffer(the_geom,'||tolerance||') as buff from '||_pgr_quote_ident(vertname)||' where cnt=1)
-                   ,veryclose as (select b.id,st_crosses(a.'||gname||',b.buff) as flag
-                   from  (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) as a
-                   join buffer as b on (a.'||gname||'&&b.buff)
-                   where '||sourcename||'!=b.id and '||targetname||'!=b.id )
-                   update '||_pgr_quote_ident(vertname)||' set chk=1 where id in (select distinct id from veryclose where flag=true)';
-          raise debug '%' ,query;
-          execute query;
-          GET DIAGNOSTICS  numgaps= ROW_COUNT;
-          raise DEBUG '     --> OK';
-          EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for gaps';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for isolated edges. Please wait...';
-        query=selectionquery|| ' SELECT count(*) FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' )  as a,
-                                                 '||_pgr_quote_ident(vertname)||' as b,
-                                                 '||_pgr_quote_ident(vertname)||' as c
-                            WHERE b.id in (select id from selectedRows) and a.'||sourcename||' =b.id
-                            AND b.cnt=1 AND a.'||targetname||' =c.id
-                            AND c.cnt=1';
-        raise debug '%' ,query;
-        execute query  INTO NumIsolated;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for isolated edges';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for ring geometries. Please wait...';
-        execute 'SELECT geometrytype('||gname||')  FROM '||_pgr_quote_ident(tabname) limit 1 into geotype;
-        IF (geotype='MULTILINESTRING') THEN
-            query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                 WHERE true  '||rows_where||' and st_isRing(st_linemerge('||gname||'))';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        ELSE query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                  WHERE true  '||rows_where||' and st_isRing('||gname||')';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        END IF;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for ring geometries';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for intersections. Please wait...';
-        query = 'select count(*) from (select distinct case when a.'||idname||' < b.'||idname||' then a.'||idname||'
-                                                        else b.'||idname||' end,
-                                                   case when a.'||idname||' < b.'||idname||' then b.'||idname||'
-                                                        else a.'||idname||' end
-                                    FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as a
-                                    JOIN (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as b
-                                    ON (a.'|| gname||' && b.'||gname||')
-                                    WHERE a.'||idname||' != b.'||idname|| '
-                                        and (a.'||sourcename||' in (b.'||sourcename||',b.'||targetname||')
-                                              or a.'||targetname||' in (b.'||sourcename||',b.'||targetname||')) = false
-                                        and st_intersects(a.'||gname||', b.'||gname||')=true) as d ';
-        raise debug '%' ,query;
-        execute query  INTO numCrossing;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for intersections';
-            RETURN 'FAIL';
-    END;
-
-
-
-
-    RAISE NOTICE '            ANALYSIS RESULTS FOR SELECTED EDGES:';
-    RAISE NOTICE '                  Isolated segments: %', NumIsolated;
-    RAISE NOTICE '                          Dead ends: %', numdeadends;
-    RAISE NOTICE 'Potential gaps found near dead ends: %', numgaps;
-    RAISE NOTICE '             Intersections detected: %',numCrossing;
-    RAISE NOTICE '                    Ring geometries: %',numRings;
-
-
-    RETURN 'OK';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_analyzeGraph(text,double precision,text,text,text,text,text) IS 'args: edge_table, tolerance,the_geom:=''the_geom'',id:=''id'',source column:=''source'', target column:=''target'' rows_where:=''true'' - creates a vertices table based on the geometry for selected rows';
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzeOneway(
-   edge_table text,
-   s_in_rules TEXT[],
-   s_out_rules TEXT[],
-   t_in_rules TEXT[],
-   t_out_rules TEXT[],
-   two_way_if_null boolean default true,
-   oneway text default 'oneway',
-   source text default 'source',
-   target text default 'target')
-  RETURNS text AS
-$BODY$
-
-
-DECLARE
-    rule text;
-    ecnt integer;
-    instr text;
-    naming record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    owname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    vertname text;
-    debuglevel text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeOneway(''%'',''%'',''%'',''%'',''%'',''%'',''%'',''%'',%)',
-		edge_table, s_in_rules , s_out_rules, t_in_rules, t_out_rules, oneway, source ,target,two_way_if_null ;
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    raise DEBUG '     --> OK';
-    EXCEPTION WHEN raise_exception THEN
-      RAISE NOTICE 'ERROR: something went wrong checking the table name';
-      RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","ein","eout"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET eout=0 ,ein=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into owname from _pgr_getColumnName(sname, tname,oneway,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,owname) or  targetname=owname, 2,
-                       '_pgr_createToplogy',  'Two columns share the same name', 'Parameter names for oneway,source and target  must be different',
-                       'Column names are OK');
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-
-
-    RAISE NOTICE 'Analyzing graph for one way street errors.';
-
-    rule := CASE WHEN two_way_if_null
-            THEN owname || ' IS NULL OR '
-            ELSE '' END;
-
-    instr := '''' || array_to_string(s_in_rules, ''',''') || '''';
-       EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-      from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-     where a.id=b.'|| sourcename;
-
-    RAISE NOTICE 'Analysis 25%% complete ...';
-
-    instr := '''' || array_to_string(t_in_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 50%% complete ...';
-
-    instr := '''' || array_to_string(s_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-        where a.id=b.'|| sourcename;
-    RAISE NOTICE 'Analysis 75%% complete ...';
-
-    instr := '''' || array_to_string(t_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 100%% complete ...';
-
-    EXECUTE 'SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE ein=0 or eout=0' INTO ecnt;
-
-    RAISE NOTICE 'Found % potential problems in directionality' ,ecnt;
-
-    RETURN 'OK';
-
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_analyzeOneway(text,TEXT[],TEXT[], TEXT[],TEXT[],boolean,text,text,text)
-IS 'args:edge_table , s_in_rules , s_out_rules, t_in_rules , t_out_rules, two_way_if_null:= true, oneway:=''oneway'',source:= ''source'',target:=''target'' - Analizes the directionality of the edges based on the rules';
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createverticestable(
-   edge_table text,
-   the_geom text DEFAULT 'the_geom'::text,
-   source text DEFAULT 'source'::text,
-   target text DEFAULT 'target'::text,
-    rows_where text DEFAULT 'true'::text
-)
-  RETURNS text AS
-$BODY$
-DECLARE
-    naming record;
-    sridinfo record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    sourcename text;
-    targetname text;
-    query text;
-    ecnt bigint;
-    srid integer;
-    sourcetype text;
-    targettype text;
-    sql text;
-    totcount integer;
-    i integer;
-    notincluded integer;
-    included integer;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-
-
-BEGIN
-  fnName = 'pgr_createVerticesTable';
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_createVerticesTable(''%'',''%'',''%'',''%'',''%'')',edge_table,the_geom,source,target,rows_where;
-  execute 'show client_min_messages' into debuglevel;
-
-  raise notice 'Performing checks, please wait .....';
-
-  RAISE DEBUG 'Checking % exists',edge_table;
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-  raise debug '--> Edge table exists: OK';
-
-  raise debug 'Checking column names';
-    select * into sourcename from _pgr_getColumnName(sname, tname,source,2, fnName);
-    select * into targetname from _pgr_getColumnName(sname, tname,target,2, fnName);
-    select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2, fnName);
-
-
-    err = sourcename in (targetname,gname) or  targetname=gname;
-    perform _pgr_onError(err, 2, fnName,
-        'Two columns share the same name', 'Parameter names for the_geom,source and target  must be different');
-  raise debug '--> Column names: OK';
-
-  raise debug 'Checking column types in edge table';
-    select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-    select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-
-
-    err = sourcetype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column source: '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-    err = targettype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column target: '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found');
-
-  raise debug '-->Column types:OK';
-
-  raise debug 'Checking SRID of geometry column';
-     query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-        || ' FROM ' || _pgr_quote_ident(tabname)
-        || ' WHERE ' || quote_ident(gname)
-        || ' IS NOT NULL LIMIT 1';
-     raise debug '%',query;
-     EXECUTE query INTO sridinfo;
-
-     err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-     perform _pgr_onError(err, 2, fnName,
-         'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-     srid := sridinfo.srid;
-  raise DEBUG '     --> OK';
-
-  raise debug 'Checking and creating Indices';
-     perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-  raise DEBUG '-->Check and create indices: OK';
-
-     gname=quote_ident(gname);
-     sourcename=quote_ident(sourcename);
-     targetname=quote_ident(targetname);
-
-
-  BEGIN
-  raise debug 'Checking Condition';
-    -- issue #193 & issue #210 & #213
-    -- this sql is for trying out the where clause
-    -- the select * is to avoid any column name conflicts
-    -- limit 1, just try on first record
-    -- if the where clasuse is ill formed it will be caught in the exception
-    sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-    EXECUTE sql into dummyRec;
-    -- end
-
-    -- if above where clasue works this one should work
-    -- any error will be caught by the exception also
-    sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NULL or '||
-		sourcename||' is null or '||targetname||' is null)=true '||rows_where;
-    raise debug '%',sql;
-    EXECUTE SQL  into notincluded;
-    EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-
-
-
-  BEGIN
-     raise DEBUG 'initializing %',vertname;
-       execute 'select * from _pgr_getTableName('||quote_literal(vertname)||',0)' into naming;
-       IF sname=naming.sname  AND vname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-       ELSE
-           set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-       END IF;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-                quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-       execute 'CREATE INDEX '||quote_ident(vname||'_the_geom_idx')||' ON '||_pgr_quote_ident(vertname)||'  USING GIST (the_geom)';
-       execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-       EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Initializing vertex table';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise notice 'Populating %, please wait...',vertname;
-       sql= 'with
-		lines as ((select distinct '||sourcename||' as id, _pgr_startpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-		                  ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||')
-			union (select distinct '||targetname||' as id,_pgr_endpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-			          ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||'))
-		,numberedLines as (select row_number() OVER (ORDER BY id) AS i,* from lines )
-		,maxid as (select id,max(i) as maxi from numberedLines group by id)
-		insert into '||_pgr_quote_ident(vertname)||'(id,the_geom)  (select id,the_geom  from numberedLines join maxid using(id) where i=maxi order by id)';
-       RAISE debug '%',sql;
-       execute sql;
-       GET DIAGNOSTICS totcount = ROW_COUNT;
-
-       sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' a, '||_pgr_quote_ident(vertname)||' b
-            where '||sourcename||'=b.id and '|| targetname||' in (select id from '||_pgr_quote_ident(vertname)||')';
-       RAISE debug '%',sql;
-       execute sql into included;
-
-
-
-       execute 'select max(id) from '||_pgr_quote_ident(vertname) into ecnt;
-       execute 'SELECT setval('||quote_literal(vertname||'_id_seq')||','||coalesce(ecnt,1)||' , false)';
-       raise notice '  ----->   VERTICES TABLE CREATED WITH  % VERTICES', totcount;
-       raise notice '                                       FOR   %  EDGES', included+notincluded;
-       RAISE NOTICE '  Edges with NULL geometry,source or target: %',notincluded;
-       RAISE NOTICE '                            Edges processed: %',included;
-       Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname),_pgr_quote_ident(vertname);
-       raise notice '----------------------------------------------';
-    END;
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_createVerticesTable(text,text,text,text,text)
-IS 'args: edge_table, the_geom:=''the_geom'',source:=''source'', target:=''target'' rows_where:=''true'' - creates a vertices table based on the source and target identifiers for selected rows';
-
-
-CREATE OR REPLACE FUNCTION pgr_nodeNetwork(edge_table text, tolerance double precision,
-			id text default 'id', the_geom text default 'the_geom', table_ending text default 'noded',
-            rows_where text DEFAULT ''::text, outall boolean DEFAULT false) RETURNS text AS
-$BODY$
-DECLARE
-	
-	p_num int := 0;
-	p_ret text := '';
-    pgis_ver_old boolean := _pgr_versionless(postgis_lib_version(), '2.1.0.0');
-    vst_line_substring text;
-    vst_line_locate_point text;
-    intab text;
-    outtab text;
-    n_pkey text;
-    n_geom text;
-    naming record;
-    sname text;
-    tname text;
-    outname text;
-    srid integer;
-    sridinfo record;
-    splits bigint;
-    touched bigint;
-    untouched bigint;
-    geomtype text;
-    debuglevel text;
-    rows_where text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_nodeNetwork(''%'', %, ''%'', ''%'', ''%'', ''%'',  %)',
-    edge_table, tolerance, id,  the_geom, table_ending, rows_where, outall;
-  raise notice 'Performing checks, please wait .....';
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',0)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-	RAISE NOTICE '-------> % not found',edge_table;
-        RETURN 'FAIL';
-    ELSE
-	RAISE DEBUG '  -----> OK';
-    END IF;
-
-    intab=sname||'.'||tname;
-    outname=tname||'_'||table_ending;
-    outtab= sname||'.'||outname;
-    rows_where = CASE WHEN length(rows_where) > 2 and not outall THEN ' AND (' || rows_where || ')' ELSE '' END;
-    rows_where = CASE WHEN length(rows_where) > 2 THEN ' WHERE (' || rows_where || ')' ELSE '' END;
-  END;
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',id,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(id)||')' INTO n_pkey;
-       IF n_pkey is NULL then
-          raise notice  'ERROR: id column "%"  not found in %',id,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',the_geom,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(the_geom)||')' INTO n_geom;
-       IF n_geom is NULL then
-          raise notice  'ERROR: the_geom  column "%"  not found in %',the_geom,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-  IF n_pkey=n_geom THEN
-	raise notice  'ERROR: id and the_geom columns have the same name "%" in %',n_pkey,intab;
-        RETURN 'FAIL';
-  END IF;
-
-  BEGIN
-       	raise DEBUG 'Checking the SRID of the geometry "%"', n_geom;
-       	EXECUTE 'SELECT ST_SRID(' || quote_ident(n_geom) || ') as srid '
-          		|| ' FROM ' || _pgr_quote_ident(intab)
-          		|| ' WHERE ' || quote_ident(n_geom)
-          		|| ' IS NOT NULL LIMIT 1' INTO sridinfo;
-       	IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-        	RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           	RETURN 'FAIL';
-       	END IF;
-       	srid := sridinfo.srid;
-       	raise DEBUG '  -----> SRID found %',srid;
-       	EXCEPTION WHEN OTHERS THEN
-           		RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           		RETURN 'FAIL';
-  END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_pkey,intab;
-      if (_pgr_isColumnIndexed(intab,n_pkey)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding  index "%_%_idx".',n_pkey,intab;
-
-	set client_min_messages  to warning;
-        execute 'create  index '||tname||'_'||n_pkey||'_idx on '||_pgr_quote_ident(intab)||' using btree('||quote_ident(n_pkey)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_geom,intab;
-      if (_pgr_iscolumnindexed(intab,n_geom)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding unique index "%_%_gidx".',intab,n_geom;
-	set client_min_messages  to warning;
-        execute 'CREATE INDEX '
-            || quote_ident(tname || '_' || n_geom || '_gidx' )
-            || ' ON ' || _pgr_quote_ident(intab)
-            || ' USING gist (' || quote_ident(n_geom) || ')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
----------------
-    BEGIN
-       raise DEBUG 'initializing %',outtab;
-       execute 'select * from _pgr_getTableName('||quote_literal(outtab)||',0)' into naming;
-       IF sname=naming.sname  AND outname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(outtab)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(outname)||','||quote_literal(n_geom)||')';
-       ELSE
-	   set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(outtab)||' (id bigserial PRIMARY KEY,old_id integer,sub_id integer,
-								source bigint,target bigint)';
-       END IF;
-       execute 'select geometrytype('||quote_ident(n_geom)||') from  '||_pgr_quote_ident(intab)||' limit 1' into geomtype;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(outname)||','||
-                quote_literal(n_geom)||','|| srid||', '||quote_literal(geomtype)||', 2)';
-       execute 'CREATE INDEX '||quote_ident(outname||'_'||n_geom||'_idx')||' ON '||_pgr_quote_ident(outtab)||'  USING GIST ('||quote_ident(n_geom)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-    END;
-----------------
-
-
-  raise notice 'Processing, please wait .....';
-
-
-    if pgis_ver_old then
-        vst_line_substring    := 'st_line_substring';
-        vst_line_locate_point := 'st_line_locate_point';
-    else
-        vst_line_substring    := 'st_linesubstring';
-        vst_line_locate_point := 'st_linelocatepoint';
-    end if;
-
---    -- First creates temp table with intersection points
-    p_ret = 'create temp table intergeom on commit drop as (
-        select l1.' || quote_ident(n_pkey) || ' as l1id,
-               l2.' || quote_ident(n_pkey) || ' as l2id,
-	       l1.' || quote_ident(n_geom) || ' as line,
-	       _pgr_startpoint(l2.' || quote_ident(n_geom) || ') as source,
-	       _pgr_endpoint(l2.' || quote_ident(n_geom) || ') as target,
-               st_intersection(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ') as geom
-        from (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l1
-             join (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l2
-             on (st_dwithin(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ', ' || tolerance || '))'||
-        'where l1.' || quote_ident(n_pkey) || ' <> l2.' || quote_ident(n_pkey)||' and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false  )';
-    raise debug '%',p_ret;
-    EXECUTE p_ret;
-
-    -- second temp table with locus (index of intersection point on the line)
-    -- to avoid updating the previous table
-    -- we keep only intersection points occurring onto the line, not at one of its ends
---    drop table if exists inter_loc;
-
---HAD TO CHANGE THIS QUERY
--- p_ret= 'create temp table inter_loc on commit drop as (
---        select l1id, l2id, ' || vst_line_locate_point || '(line,point) as locus from (
---        select DISTINCT l1id, l2id, line, (ST_DumpPoints(geom)).geom as point from intergeom) as foo
---        where ' || vst_line_locate_point || '(line,point)<>0 and ' || vst_line_locate_point || '(line,point)<>1)';
-    p_ret= 'create temp table inter_loc on commit drop as ( select * from (
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,source) as locus from intergeom)
-         union
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,target) as locus from intergeom)) as foo
-        where locus<>0 and locus<>1)';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-
-    -- index on l1id
-    create index inter_loc_id_idx on inter_loc(l1id);
-
-    -- Then computes the intersection on the lines subset, which is much smaller than full set
-    -- as there are very few intersection points
-
---- outab needs to be formally created with id, old_id, subid,the_geom, source,target
----  so it can be inmediatly be used with createTopology
-
---   EXECUTE 'drop table if exists ' || _pgr_quote_ident(outtab);
---   EXECUTE 'create table ' || _pgr_quote_ident(outtab) || ' as
-     P_RET = 'insert into '||_pgr_quote_ident(outtab)||' (old_id,sub_id,'||quote_ident(n_geom)||') (  with cut_locations as (
-           select l1id as lid, locus
-           from inter_loc
-           -- then generates start and end locus for each line that have to be cut buy a location point
-           UNION ALL
-           select i.l1id  as lid, 0 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           UNION ALL
-           select i.l1id  as lid, 1 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           order by lid, locus
-       ),
-       -- we generate a row_number index column for each input line
-       -- to be able to self-join the table to cut a line between two consecutive locations
-       loc_with_idx as (
-           select lid, locus, row_number() over (partition by lid order by locus) as idx
-           from cut_locations
-       )
-       -- finally, each original line is cut with consecutive locations using linear referencing functions
-       select l.' || quote_ident(n_pkey) || ', loc1.idx as sub_id, ' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus) as ' || quote_ident(n_geom) || '
-       from loc_with_idx loc1 join loc_with_idx loc2 using (lid) join ' || _pgr_quote_ident(intab) || ' l on (l.' || quote_ident(n_pkey) || ' = loc1.lid)
-       where loc2.idx = loc1.idx+1
-           -- keeps only linestring geometries
-           and geometryType(' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus)) = ''LINESTRING'') ';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-	GET DIAGNOSTICS splits = ROW_COUNT;
-        execute 'with diff as (select distinct old_id from '||_pgr_quote_ident(outtab)||' )
-                 select count(*) from diff' into touched;
-	-- here, it misses all original line that did not need to be cut by intersection points: these lines
-	-- are already clean
-	-- inserts them in the final result: all lines which gid is not in the res table.
-	EXECUTE 'insert into ' || _pgr_quote_ident(outtab) || ' (old_id , sub_id, ' || quote_ident(n_geom) || ')
-                ( with used as (select distinct old_id from '|| _pgr_quote_ident(outtab)||')
-		select ' ||  quote_ident(n_pkey) || ', 1 as sub_id, ' ||  quote_ident(n_geom) ||
-		' from '|| _pgr_quote_ident(intab) ||' where  '||quote_ident(n_pkey)||' not in (select * from used)' || rows_where || ')';
-	GET DIAGNOSTICS untouched = ROW_COUNT;
-
-	raise NOTICE '  Split Edges: %', touched;
-	raise NOTICE ' Untouched Edges: %', untouched;
-	raise NOTICE '     Total original Edges: %', touched+untouched;
-        RAISE NOTICE ' Edges generated: %', splits;
-	raise NOTICE ' Untouched Edges: %',untouched;
-	raise NOTICE '       Total New segments: %', splits+untouched;
-        RAISE NOTICE ' New Table: %', outtab;
-        RAISE NOTICE '----------------------------------';
-
-    drop table  if exists intergeom;
-    drop table if exists inter_loc;
-    RETURN 'OK';
-END;
-$BODY$
-    LANGUAGE 'plpgsql' VOLATILE STRICT COST 100;
-
-
-COMMENT ON FUNCTION pgr_nodeNetwork(text, double precision, text, text, text, text, boolean )
- IS  'edge_table, tolerance, id:=''id'', the_geom:=''the_geom'', table_ending:=''noded'' ';
-
-
-CREATE OR REPLACE FUNCTION pgr_labelGraph(
-                edge_table text,
-                id text default 'id',
-                source text default 'source',
-                target text default 'target',
-                subgraph text default 'subgraph',
-                rows_where text default 'true'
-        )
-        RETURNS character varying AS
-$BODY$
-
-DECLARE
-        naming record;
-        schema_name text;
-        table_name text;
-        garbage text;
-        incre integer;
-        table_schema_name text;
-        query text;
-        ecnt integer;
-        sql1 text;
-        rec1 record;
-        sql2 text;
-        rec2 record;
-        rec_count record;
-        rec_single record;
-        graph_id integer;
-        gids int [];
-
-BEGIN
-        raise notice 'Processing:';
-        raise notice 'pgr_brokenGraph(''%'',''%'',''%'',''%'',''%'',''%'')', edge_table,id,source,target,subgraph,rows_where;
-        raise notice 'Performing initial checks, please hold on ...';
-
-        Raise Notice 'Starting - Checking table ...';
-        BEGIN
-                raise debug 'Checking % table existance', edge_table;
-                execute 'select * from pgr_getTableName('|| quote_literal(edge_table) ||')' into naming;
-                schema_name = naming.sname;
-                table_name = naming.tname;
-                table_schema_name = schema_name||'.'||table_name;
-                IF schema_name is null then
-                        raise notice 'no schema';
-                        return 'FAIL';
-                else
-                        if table_name is null then
-                                raise notice 'no table';
-                                return 'FAIL';
-                        end if;
-                end if;
-        END;
-        Raise Notice 'Ending - Checking table';
-
-        Raise Notice 'Starting - Checking columns';
-        BEGIN
-                raise debug 'Checking exitance of necessary columns inside % table', edge_table;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(id) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no id column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(source) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no source column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(target) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no target column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(subgraph) ||')' into naming;
-                if naming.pgr_iscolumnintable = 't' then
-                        raise notice 'subgraph column already in the table';
-                        return 'FAIL';
-                end if;
-        END;
-        Raise Notice 'Ending - Checking columns';
-
-        Raise Notice 'Starting - Checking rows_where condition';
-        BEGIN
-                raise debug 'Checking rows_where condition';
-                query='select count(*) from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where;
-                execute query into ecnt;
-                raise debug '-->Rows where condition: OK';
-                raise debug '    --> OK';
-                EXCEPTION WHEN OTHERS THEN
-                        raise notice 'Got %', SQLERRM;
-                        Raise notice 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-                        Raise notice '%', query;
-                        return 'FAIL';
-        END;
-        Raise Notice 'Ending - Checking rows_where condition';
-
-        garbage := 'garbage001';
-        incre := 1;
-        Raise Notice 'Starting - Checking temporary column';
-        Begin
-                raise debug 'Checking Checking temporary columns existance';
-
-                While True
-                        Loop
-                                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(garbage) ||')' into naming;
-                                If naming.pgr_iscolumnintable = 't' THEN
-                                        incre := incre + 1;
-                                        garbage := 'garbage00'||incre||'';
-                                ELSE
-                                        EXIT;
-                                END IF;
-                        End Loop;
-        End;
-        Raise Notice 'Ending - Checking temporary column';
-
-        Raise Notice 'Starting - Calculating subgraphs';
-        BEGIN
-                --------- Add necessary columns ----------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(subgraph) || ' INTEGER DEFAULT -1';
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(garbage) || ' INTEGER DEFAULT 0';
-                graph_id := 1;
-
-                EXECUTE 'select count(*) as count from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where ||'' into rec_count;
-                if rec_count.count = 0 then
-                        RETURN 'rows_where condition generated 0 rows';
-                end if;
-
-                WHILE TRUE
-                        LOOP
-                                ---------- Assign the very first -1 row graph_id ----------
-                                EXECUTE 'SELECT ' || pgr_quote_ident(id) || ' AS gid FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1 LIMIT 1' INTO rec_single;
-                                EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec_single.gid || '';
-
-                                --------- Search other rows with that particular graph_id -----------
-                                WHILE TRUE
-                                        LOOP
-                                                EXECUTE 'SELECT COUNT(*) FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0' into rec_count;
-                                                ----------- The following if else will check those rows which already have entertained ------------
-                                                IF (rec_count.count > 0) THEN
-                                                        sql1 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0';
-                                                        FOR rec1 IN EXECUTE sql1
-                                                                LOOP
-                                                                        sql2 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| pgr_quote_ident(source) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(source) ||' = '|| rec1.target ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.target ||'';
-                                                                        FOR rec2 IN EXECUTE sql2
-                                                                                LOOP
-                                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec2.gid || '';
-                                                                                END LOOP;
-                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(garbage) || ' = 1 WHERE ' || pgr_quote_ident(id) || ' = ' || rec1.gid || '';
-                                                                END LOOP;
-                                                ELSE
-                                                        EXIT;
-                                                END IF;
-                                        END LOOP;
-
-                                ------ Following is to exit the while loop. 0 means no more -1 id.
-                                EXECUTE 'SELECT COUNT(*) AS count FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1' INTO rec_count;
-                                If (rec_count.count = 0) THEN
-                                        EXIT;
-                                ELSE
-                                        graph_id := graph_id + 1;
-                                END IF;
-                        END LOOP;
-
-                ----------- Drop garbage column ------------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' DROP COLUMN ' || pgr_quote_ident(garbage) ||'';
-                Raise Notice 'Successfully complicated calculating subgraphs';
-        END;
-        Raise Notice 'Ending - Calculating subgraphs';
-
-        RETURN 'OK';
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCostMatrix(
-    edges_sql TEXT,
-    points_sql TEXT,
-    pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_pid, a.end_pid, a.agg_cost
-        FROM _pgr_withPoints($1, $2, $3, $3, $4,  $5, TRUE, TRUE) AS a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
---  DIJKSTRA DMatrix
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2, $2, $3, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
---  BIDIRECTIONAL DIJKSTRA Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_astarCostMatrix(
-    edges_sql TEXT, -- XY edges sql
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2, $2, $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
---  BIDIRECTIONAL ASTAR Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdAstarCostMatrix(
-    edges_sql TEXT,
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_bdAstarCostMatrix(TEXT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCostMatrix';
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_getTableName(IN tab text,OUT sname text,OUT tname text)
-RETURNS RECORD AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getTableName: This function will no longer be soported';
-    select * from _pgr_getTableName(tab, 0, 'pgr_getTableName') into sname,tname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_getColumnName(tab text, col text)
-RETURNS text AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getColumnName: This function will no longer be soported';
-    return _pgr_getColumnName(tab,col, 0, 'pgr_getColumnName');
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    select * from _pgr_getColumnName(tab,col,0, 'pgr_isColumnInTable') into cname;
-    return  cname IS not NULL;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnIndexed(tab text, col text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnIndexed: This function will no longer be soported';
-    return  _pgr_isColumnIndexed(tab,col);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-create or replace function pgr_quote_ident(idname text)
-returns text as
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    return  _pgr_quote_ident(idname);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_versionless(v1 text, v2 text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_versionless: This function will no longer be soported';
-    return  _pgr_versionless(v1,v2);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-create or replace function pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_startPoint: This function will no longer be soported';
-    return  _pgr_startPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_endPoint: This function will no longer be soported';
-    return  _pgr_endPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspJohnson(edges_sql text)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_johnson instead';
-      has_reverse =_pgr_parameter_check('johnson', edges_sql, false);
-      sql = edges_sql;
-      IF (has_reverse) THEN
-           RAISE NOTICE 'reverse_cost column found, removing.';
-           sql = 'SELECT source, target, cost FROM (' || edges_sql || ') a';
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () - 1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_johnson(sql, TRUE);
-  END
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspWarshall(edges_sql text, directed boolean, has_rcost boolean)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_floydWarshall instead';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-      sql := edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         ELSE raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () -1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_floydWarshall(sql, directed);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_astar(edges_sql TEXT, source_id INTEGER, target_id INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated signature pgr_astar(text, integer, integer, boolean, boolean)';
-    has_reverse =_pgr_parameter_check('astar', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost, x1,y1, x2, y2 FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-    FROM pgr_astar(sql, ARRAY[$2], ARRAY[$3], directed);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    sql TEXT,
-    source_vid INTEGER,
-    target_vid INTEGER,
-    directed BOOLEAN,
-    has_reverse_cost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdAstar';
-    has_reverse =_pgr_parameter_check('astar', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdAstar(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(edges_sql TEXT, start_vid INTEGER, end_vid INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdDijkstra';
-    has_reverse =_pgr_parameter_check('dijkstra', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdDijkstra(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstraPath(
-    sql text,
-    source INTEGER,
-    targets INTEGER ARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-    RETURNS SETOF pgr_costResult3 AS
-    $BODY$
-    DECLARE
-    has_reverse BOOLEAN;
-    new_sql TEXT;
-    result pgr_costResult3;
-    tmp pgr_costResult3;
-    sseq INTEGER;
-    i INTEGER;
-    BEGIN
-        RAISE NOTICE 'Deprecated function: Use pgr_dijkstra instead.';
-        has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-        new_sql = sql;
-        IF (array_ndims(targets) != 1) THEN
-            raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-
-        IF (has_reverse != has_rcost) THEN
-            IF (has_reverse) THEN
-                new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-            ELSE
-                raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-                USING ERRCODE = 'XX000';
-            END IF;
-        END IF;
-        SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-        sseq = 0; i = 1;
-        FOR result IN
-            SELECT seq, a.end_vid::INTEGER AS id1, a.node::INTEGER AS i2, a.edge::INTEGER AS id3, cost
-            FROM pgr_dijkstra(new_sql, source, targets, directed) a ORDER BY a.end_vid, seq LOOP
-            WHILE (result.id1 != targets[i]) LOOP
-                tmp.seq = sseq;
-                tmp.id1 = targets[i];
-                IF (targets[i] = source) THEN
-                    tmp.id2 = source;
-                    tmp.cost =0;
-                ELSE
-                    tmp.id2 = 0;
-                    tmp.cost = -1;
-                END IF;
-                tmp.id3 = -1;
-                RETURN next tmp;
-                i = i + 1;
-                sseq = sseq + 1;
-            END LOOP;
-        IF (result.id1 = targets[i] AND result.id3 != -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-        IF (result.id1 = targets[i] AND result.id3 = -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.id2 = source;
-            tmp.cost = 0;
-        ELSE
-            tmp.id2 = 0;
-            tmp.cost = -1;
-        END IF;
-        tmp.id3 = -1;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstracost(
-    sql text,
-    source INTEGER,
-    targets INTEGER array,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-result pgr_costResult;
-tmp pgr_costResult;
-sseq INTEGER;
-i INTEGER;
-BEGIN
-    RAISE NOTICE 'Deprecated function. Use pgr_dijkstraCost instead.';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    new_sql = sql;
-    IF (array_ndims(targets) != 1) THEN
-        raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-        USING ERRCODE = 'XX000';
-    END IF;
-
-
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-    sseq = 0; i = 1;
-    FOR result IN
-        SELECT ((row_number() over()) -1)::INTEGER, a.start_vid::INTEGER, a.end_vid::INTEGER, agg_cost
-        FROM pgr_dijkstraCost(new_sql, source, targets, directed) a ORDER BY end_vid LOOP
-        WHILE (result.id2 != targets[i]) LOOP
-            tmp.seq = sseq;
-            tmp.id1 = source;
-            tmp.id2 = targets[i];
-            IF (targets[i] = source) THEN
-                tmp.cost = 0;
-            ELSE
-                tmp.cost = -1;
-            END IF;
-            RETURN next tmp;
-            i = i + 1;
-            sseq = sseq + 1;
-        END LOOP;
-        IF (result.id2 = targets[i]) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = source;
-        tmp.id2 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.cost = 0;
-        ELSE
-            tmp.cost = -1;
-        END IF;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-create or replace function pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    returns integer as
-$body$
-
-declare
-    rr record;
-    pct float;
-    debuglevel text;
-
-begin
-    -- find the closest edge within tol distance
-    execute 'select * from ' || _pgr_quote_ident(edges) ||
-            ' where st_dwithin(''' || pnt::text ||
-            '''::geometry, the_geom, ' || tol || ') order by st_distance(''' || pnt::text ||
-            '''::geometry, the_geom) asc limit 1' into rr;
-
-    if rr.the_geom is not null then
-        -- deal with MULTILINESTRINGS
-        if geometrytype(rr.the_geom)='MULTILINESTRING' THEN
-            rr.the_geom := ST_GeometryN(rr.the_geom, 1);
-        end if;
-
-        -- project the point onto the linestring
-        execute 'show client_min_messages' into debuglevel;
-        SET client_min_messages='ERROR';
-        pct := st_line_locate_point(rr.the_geom, pnt);
-        execute 'set client_min_messages  to '|| debuglevel;
-
-        -- return the node we are closer to
-        if pct < 0.5 then
-            return rr.source;
-        else
-            return rr.target;
-        end if;
-    else
-        -- return a failure to find an edge within tol distance
-        return -1;
-    end if;
-end;
-$body$
-  language plpgsql volatile
-  cost 5;
-
-
-----------------------------------------------------------------------------
-
-create or replace function pgr_flipedges(ga geometry[])
-    returns geometry[] as
-$body$
-
-declare
-    nn integer;
-    i integer;
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_flipEdges';
-    -- get the count of edges, and return if only one edge
-    nn := array_length(ga, 1);
-    if nn=1 then
-        return ga;
-    end if;
-
-    -- determine if first needs to be flipped
-    g := _pgr_startpoint(ga[1]);
-
-    -- if the start of the first is connected to the second then it needs to be flipped
-    if _pgr_startpoint(ga[2])=g or _pgr_endpoint(ga[2])=g then
-        ga[1] := st_reverse(ga[1]);
-    end if;
-    g := _pgr_endpoint(ga[1]);
-
-    -- now if  the end of the last edge matchs the end of the current edge we need to flip it
-    for i in 2 .. nn loop
-        if _pgr_endpoint(ga[i])=g then
-            ga[i] := st_reverse(ga[i]);
-        end if;
-        -- save the end of this edge into the last end for the next cycle
-        g := _pgr_endpoint(ga[i]);
-    end loop;
-
-    return ga;
-end;
-$body$
-    language plpgsql immutable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_texttopoints(pnts text, srid integer DEFAULT(4326))
-    returns geometry[] as
-$body$
-
-declare
-    a text[];
-    t text;
-    p geometry;
-    g geometry[];
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_textToPoints';
-    -- convert commas to space and split on ';'
-    a := string_to_array(replace(pnts, ',', ' '), ';');
-    -- convert each 'x y' into a point geometry and concattenate into a new array
-    for t in select unnest(a) loop
-        p := st_pointfromtext('POINT(' || t || ')', srid);
-        g := g || p;
-    end loop;
-
-    return g;
-end;
-$body$
-    language plpgsql immutable;
-
------------------------------------------------------------------------
-
-create or replace function pgr_pointstovids(pnts geometry[], edges text, tol float8 DEFAULT(0.01))
-    returns integer[] as
-$body$
-
-declare
-    v integer[];
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_pointsToVids';
-    -- cycle through each point and locate the nearest edge and vertex on that edge
-    for g in select unnest(pnts) loop
-        v := v || pgr_pointtoedgenode(edges, g, tol);
-    end loop;
-
-    return v;
-end;
-$body$
-    language plpgsql stable;
-
-
-create or replace function pgr_pointstodmatrix(pnts geometry[], mode integer default (0), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    r record;
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_pointsToDMatrix';
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    -- create an id for each point in the array and unnest it into a table nodes in the with clause
-    for r in with nodes as (select row_number() over()::integer as id, p from (select unnest(pnts) as p) as foo)
-        -- compute a row of distances
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j,
-                case when mode=0
-                    then st_distance(a.p, b.p)
-                    else st_distance_sphere(a.p, b.p)
-                end as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i loop
-
-        -- you must concat an array[array[]] to make dmatrix[][]
-        -- concat the row of distances to the dmatrix
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-end;
-$body$
-    language plpgsql stable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_vidstodmatrix(IN vids integer[], IN pnts geometry[], IN edges text, tol float8 DEFAULT(0.1), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    i integer;
-    j integer;
-    nn integer;
-    rr record;
-    bbox geometry;
-    t float8[];
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    -- check if the input arrays has any -1 values, maybe this whould be a raise exception
-    if vids @> ARRAY[-1] then
-    raise notice 'Some vids are undefined (-1)!';
-    dmatrix := null;
-    ids := null;
-    return;
-    end if;
-
-    ids := vids;
-
-    -- get the count of nodes
-    nn := array_length(vids,1);
-
-    -- zero out a dummy row
-    for i in 1 .. nn loop
-        t := t || 0.0::float8;
-    end loop;
-
-    -- using the dummy row, zero out the whole matrix
-    for i in 1 .. nn loop
-    dmatrix := dmatrix || ARRAY[t];
-    end loop;
-
-    for i in 1 .. nn-1 loop
-        j := i;
-        -- compute the bbox for the point needed for this row
-        select st_expand(st_collect(pnts[id]), tol) into bbox
-          from (select generate_series as id from generate_series(i, nn)) as foo;
-
-        -- compute kdijkstra() for this row
-        for rr in execute 'select * from pgr_dijkstracost($1, $2, $3, false)'
-                  using 'select id, source, target, cost from ' || edges ||
-                        ' where the_geom && ''' || bbox::text || '''::geometry'::text, vids[i], vids[i+1:nn] loop
-
-            -- TODO need to check that all node were reachable from source
-            -- I think unreachable paths between nodes returns cost=-1.0
-
-            -- populate the matrix with the cost values, remember this is symmetric
-            j := j + 1;
-            -- raise notice 'cost(%,%)=%', i, j, rr.agg_cost;
-            dmatrix[i][j] := rr.agg_cost;
-            dmatrix[j][i] := rr.agg_cost;
-        end loop;
-    end loop;
-
-end;
-$body$
-    language plpgsql stable cost 200;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_vidsToDMatrix(sql TEXT, vids  INTEGER[], dir BOOLEAN, has_rcost BOOLEAN, want_symmetric BOOLEAN)
-RETURNS float8[] AS
-$BODY$
-DECLARE
-directed BOOLEAN;
-has_reverse BOOLEAN;
-edges_sql TEXT;
-dmatrix_row float8[];
-dmatrix float8[];
-cell RECORD;
-unique_vids INTEGER[];
-total BIGINT;
-from_v BIGINT;
-to_v BIGINT;
-BEGIN
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql = sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    unique_vids :=  ARRAY(SELECT DISTINCT UNNEST(vids) ORDER BY 1);
-
-    IF want_symmetric THEN
-        directed = false;
-    ELSE
-        directed = dir;
-    END IF;
-
-    total := array_length(unique_vids, 1);
-
-    -- initializing dmatrix
-    FOR i in 1 .. total LOOP
-        dmatrix_row := dmatrix_row || '+Infinity'::float8;
-    END LOOP;
-    FOR i in 1 .. total LOOP
-    dmatrix := dmatrix || ARRAY[dmatrix_row];
-    dmatrix[i][i] = 0;
-    END LOOP;
-
-    CREATE TEMP TABLE __x___y____temp AS
-        WITH result AS
-            (SELECT unnest(unique_vids) AS vid)
-        SELECT row_number() OVER() AS idx, vid FROM result;
-
-    FOR cell IN SELECT * FROM pgr_dijkstraCostMatrix(sql, unique_vids, directed) LOOP
-        SELECT idx INTO from_v FROM __x___y____temp WHERE vid =  cell.start_vid;
-        SELECT idx INTO to_v FROM __x___y____temp WHERE vid =  cell.end_vid;
-
-        dmatrix[from_v][to_v] = cell.agg_cost;
-        dmatrix[to_v][from_v] = cell.agg_cost;
-    END LOOP;
-
-    DROP TABLE IF EXISTS __x___y____temp;
-    RETURN dmatrix;
-
-    EXCEPTION WHEN others THEN
-       DROP TABLE IF EXISTS __x___y____temp;
-       raise exception '% %', SQLERRM, SQLSTATE;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated function';
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_dijkstra(sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_dijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN) IS 'pgr_dijkstra(Deprecated signature)';
-
-
-
-
-
--- OLD SIGNATURE
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(edges_sql text, source BIGINT, distance FLOAT, directed BOOLEAN, has_rcost BOOLEAN)
-  RETURNS SETOF pgr_costresult AS
-  $BODY$
-  DECLARE
-  has_reverse BOOLEAN;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function';
-
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, FALSE);
-
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-             -- the user says it doesn't have reverse cost but its false
-             -- removing from query
-             RAISE NOTICE 'Contradiction found: has_rcost set to false but reverse_cost column found';
-             sql = 'SELECT id, source, target, cost, -1 as reverse_cost FROM (' || edges_sql || ') __q ';
-         ELSE
-             -- the user says it has reverse cost but its false
-             -- can't do anything
-             RAISE EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query SELECT seq - 1 AS seq, node::integer AS id1, edge::integer AS id2, agg_cost AS cost
-                FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maximumcardinalitymatching(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---INTERNAL FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
-------------------------
--- deprecated signatures
------------------------
-
-COMMENT ON FUNCTION pgr_astar(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_astar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdAstar( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdAstar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdDijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdDijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_dijkstra(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_dijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_drivingDistance(text,  BIGINT,  FLOAT8,  BOOLEAN,  BOOLEAN)
-    IS 'pgr_drivingDistance(Deprecated signature)';
-
-------------------------
--- Renamed /deprecated
------------------------
-COMMENT ON FUNCTION pgr_apspJohnson(TEXT)
-    IS 'pgr_apspJohnson(Renamed function) use pgr_Johnson instead';
-
-COMMENT ON FUNCTION pgr_apspWarshall(text, boolean, boolean)
-    IS 'pgr_apspWarshall(Renamed function) use pgr_floydWarshall instead';
-
-COMMENT ON FUNCTION pgr_kdijkstraPath( text, INTEGER, INTEGER ARRAY, BOOLEAN, BOOLEAN)
-    IS 'pgr_kdijkstraPath(Renamed function) use pgr_dijkstra instead';
-
-COMMENT ON FUNCTION pgr_kdijkstracost( text, INTEGER, INTEGER array, BOOLEAN, BOOLEAN)
-    IS 'pgr_kDijkstraCost(Renamed function) use pgr_dijkstraCost instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-
-
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-
-
-COMMENT ON FUNCTION pgr_gsoc_vrppdtw( text, INTEGER, INTEGER)
-    IS 'pgr_gsoc_vrppdtw(Renamed function) use pgr_pickDeliverEuclidean instead';
-
-------------------------
--- Deprecated functions
------------------------
-
-COMMENT ON FUNCTION pgr_flipedges(geometry[])
-    IS 'pgr_flipedges(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_texttopoints(text,  integer)
-    IS 'pgr_texttopoints(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstovids(pnts geometry[], edges text, tol float8)
-    IS 'pgr_pointstovids(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    IS 'pgr_pointtoedgenode(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstodmatrix(geometry[], integer)
-    IS 'pgr_pointstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidstodmatrix( integer[],  geometry[],  text, float8)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidsToDMatrix(TEXT,  INTEGER[], BOOLEAN, BOOLEAN, BOOLEAN)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-
-
-
-COMMENT ON FUNCTION pgr_getTableName(IN tab text)
-    IS 'pgr_getTableName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_getColumnName(tab text, col text)
-    IS 'pgr_getColumnName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnInTable(tab text, col text)
-    IS 'pgr_isColumnInTable(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnIndexed(tab text, col text)
-    IS 'pgr_isColumnIndexed(Deprecated function)';
-
-
-COMMENT ON FUNCTION pgr_quote_ident(idname text)
-    IS 'pgr_quote_ident(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_versionless(v1 text, v2 text)
-    IS 'pgr_versionless(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_startPoint(g geometry)
-    IS 'pgr_startPoint(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_endPoint(g geometry)
-    IS 'pgr_endPoint(Deprecated function)';
-
-
diff --git a/tools/sql-update-scripts/pgrouting--2.1.0--2.5.2.sql b/tools/sql-update-scripts/pgrouting--2.1.0--2.5.2.sql
deleted file mode 100644
index 6663699..0000000
--- a/tools/sql-update-scripts/pgrouting--2.1.0--2.5.2.sql
+++ /dev/null
@@ -1,6673 +0,0 @@
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- pgRouting extension upgrade from 2.1.0 to 2.5.2
--- generated by tools/build-extension-update-files
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-\echo Use "ALTER extension pgrouting update to '2.5.2'" to load this file. \quit
-
-
--------------------------------------
--- remove functions no longer in the 2.5.2 extension
--------------------------------------
-
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,anyarray,bigint,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,anyarray,bigint,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,bigint,anyarray,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,bigint,anyarray,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,bigint,bigint,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,bigint,bigint,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_drivingdistance(text,bigint,double precision,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_drivingdistance(text,bigint,double precision,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_dijkstra(text,bigint,bigint,boolean,boolean);
-DROP FUNCTION IF EXISTS pgr_dijkstra(text,bigint,bigint,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_drivingdistance(text,bigint,double precision);
-DROP FUNCTION IF EXISTS pgr_drivingdistance(text,bigint,double precision);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_makedistancematrix(text);
-DROP FUNCTION IF EXISTS pgr_makedistancematrix(text);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_nodenetwork(text,double precision,text,text,text);
-DROP FUNCTION IF EXISTS pgr_nodenetwork(text,double precision,text,text,text);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_trsp(text,integer[],boolean,boolean,text);
-DROP FUNCTION IF EXISTS pgr_trsp(text,integer[],boolean,boolean,text);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_trsp(text,integer[],double precision[],boolean,boolean,text);
-DROP FUNCTION IF EXISTS pgr_trsp(text,integer[],double precision[],boolean,boolean,text);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_trspviavertices(text,integer[],boolean,boolean,text);
-DROP FUNCTION IF EXISTS pgr_trspviavertices(text,integer[],boolean,boolean,text);
-
-
-------------------------------------------
---    New functions:  2.1
--- Signature change:  2.2
-------------------------------------------
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_ksp(text,bigint,bigint,integer,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_ksp(text,bigint,bigint,integer,boolean,boolean);
-
-
-
-
-------------------------------------------
---    New functions:  2.0
---       Deprecated:  2.1
---       Deprecated:  2.1 & 2.2
-------------------------------------------
--- pgr_ksp
--- 2.1.0: {      sql, start_vid,   end_vid, k,       has_rcost}
--- 2.5.2: {edges_sql, start_vid,   end_vid, k,       has_rcost}
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_ksp(text,integer,integer,integer,boolean);
-DROP FUNCTION IF EXISTS pgr_ksp(text,integer,integer,integer,boolean);
-
-
-
-
-------------------------------------------
---    New functions:  2.0
--- Signature change:  2.2
---       Deprecated:  2.2
-------------------------------------------
--- pgr_apspjohnson
--- 2.1.0: {      sql}
--- 2.5.2: {edges_sql}
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_apspjohnson(text);
-DROP FUNCTION IF EXISTS pgr_apspjohnson(text);
-
-
--- pgr_apspwarshall
--- 2.1.0: {      sql, directed, has_reverse_cost}
--- 2.5.2: {edges_sql, directed, has_rcost}
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_apspwarshall(text,boolean,boolean);
-DROP FUNCTION IF EXISTS pgr_apspwarshall(text,boolean,boolean);
-
-
--- pgr_kdijkstrapath
--- 2.1.0: {sql,source_vid, target_vid, directed, has_reverse_cost}
--- 2.5.2: {sql,    source,    targets, directed, has_rcost} 
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_kdijkstrapath(text,integer,integer[],boolean,boolean);
-DROP FUNCTION IF EXISTS pgr_kdijkstrapath(text,integer,integer[],boolean,boolean);
-
-
--- pgr_kdijkstracost
--- 2.1.0: {sql,source_vid, target_vid, directed, has_reverse_cost}
--- 2.5.2: {sql,    source,    targets, directed, has_rcost} 
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_kdijkstracost(text,integer,integer[],boolean,boolean);
-DROP FUNCTION IF EXISTS pgr_kdijkstracost(text,integer,integer[],boolean,boolean);
-
-
-
-
-------------------------------------------
---    New functions:  2.0
--- Signature change:  2.2
-------------------------------------------
--- pgr_version
--- 2.1.0:  {version,tag,build,hash,branch,boost}
--- 2.5.2:  {version,tag,hash,branch,boost}
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_version();
-DROP FUNCTION IF EXISTS pgr_version();
-
-
-
-
-------------------------------------------
---    New functions:  2.0
--- Signature change:  2.2
-------------------------------------------
--- pgr_trsp
--- 2.1.0:  {      sql, source_vid, target_vid, directed, has_reverse_cost, turn_restrict_sql}
--- 2.5.2:  {edges_sql,  start_vid,    end_vid, directed, has_rcost,        restrictions_sql}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vid","end_vid","directed","has_rcost","restrictions_sql"}'
-WHERE proname = 'pgr_trsp'
-    AND proargnames = '{"sql","source_vid","target_vid","directed","has_reverse_cost","turn_restrict_sql"}';
-
-
-------------------------------------------
---    New functions:  2.0
--- Signature (types) change:  2.2
-------------------------------------------
--- pgr_trspviaedges
--- 2.1.0:  {sql, eids, pcts, directed, has_reverse_cost,turn_restrict_sql} 
--- 2.5.2:  {sql, eids, pcts, directed, has_rcost,       turn_restrict_sql}
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_trspviaedges(text,integer[],double precision[],boolean,boolean,text);
-DROP FUNCTION IF EXISTS pgr_trspviaedges(text,integer[],double precision[],boolean,boolean,text);
-
-
-
-
-------------------------------------------
---    New functions:  2.0
--- Signature change:  2.4
---       Deprecated:  2.4
-------------------------------------------
--- pgr_bddijkstra
--- 2.1.0: {      sql, source_vid, target_vid, directed, has_reverse_cost}   
--- 2.5.2: {edges_sql,  start_vid,    end_vid, directed, has_rcost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vid","end_vid","directed","has_rcost"}'
-WHERE proname = 'pgr_bddijkstra'
-    AND proargnames = '{"sql","source_vid","target_vid","directed","has_reverse_cost"}';
-
-
-------------------------------------------
---   New function: 2.1
--- (types) change: 2.3
-------------------------------------------
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_gsoc_vrppdtw(text,integer,integer);
-DROP FUNCTION IF EXISTS pgr_gsoc_vrppdtw(text,integer,integer);
-
-
-
-
-------------------------------------------
--- New functions on 2.0
--- Signature change on 2.3
--- Deprecated on 2.4
-------------------------------------------
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_astar(text,integer,integer,boolean,boolean);
-DROP FUNCTION IF EXISTS pgr_astar(text,integer,integer,boolean,boolean);
-
-
-
-
-------------------------------------------
---    New functions:  2.1
--- Signature change:  2.2
-------------------------------------------
--- pgr_ksp
--- 2.1.0:  {      sql, start_vid, end_vid, k, directed, heap_paths, seq, path_id, path_seq, node,edge, cost, agg_cost}
--- 2.5.2:  {edges_sql, start_vid, end_vid, k, directed, heap_paths, seq, path_id, path_seq, node,edge, cost, agg_cost}
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_ksp(text,bigint,bigint,integer,boolean,boolean);
-DROP FUNCTION IF EXISTS pgr_ksp(text,bigint,bigint,integer,boolean,boolean);
-
-
-
-
-------------------------------------------
---       New functions:  2.0
---    Signature change:  2.1
-------------------------------------------
--- 2.1.0: {sql,source,distance,directed,has_rcost}
--- 2.5.2: {edges_sql,source,distance,directed,has_rcost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","source","distance","directed","has_rcost"}'
-WHERE proname = 'pgr_drivingdistance'
-    AND proargnames = '{"sql","source","distance","directed","has_rcost"}';
-
-
-------------------------------------------
---       New functions:  2.1
---    Signature change:  2.4
-------------------------------------------
--- 2.1.0: {      sql,start_v,  distance,directed,seq,node,edge,cost,agg_cost}
--- 2.5.2: {edges_sql,start_vid,distance,directed,seq,node,edge,cost,agg_cost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vid","distance","directed","seq","node","edge","cost","agg_cost"}'
-WHERE proname = 'pgr_drivingdistance'
-    AND proargnames = '{"sql","start_v","distance","directed","seq","node","edge","cost","agg_cost"}';
-
-
-------------------------------------------
---       New functions:  2.1
---    Signature change:  2.4
-------------------------------------------
--- 2.1.0: {sql,      start_v,   distance,directed,equicost,seq,from_v,node,edge,cost,agg_cost}
--- 2.5.2: {edges_sql,start_vids,distance,directed,equicost,seq,from_v,node,edge,cost,agg_cost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vids","distance","directed","equicost","seq","from_v","node","edge","cost","agg_cost"}'
-WHERE proname = 'pgr_drivingdistance'
-    AND proargnames = '{"sql","start_v","distance","directed","equicost","seq","from_v","node","edge","cost","agg_cost"}';
-
-
-
-
-
-
-
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
---- pgRouting provides geospatial routing functionality.
---- http://pgrouting.org
---- copyright
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
----
---- This is free software; you can redistribute and/or modify it:
---- the terms of the GNU General Public Licence. See the COPYING file.
---- the terms of the MIT-X Licence. See the COPYING file.
----
---- The following functions have MIT-X licence:
----     pgr_version()
----     pgr_tsp(matrix float8[][], startpt integer, endpt integer DEFAULT -1, OUT seq integer, OUT id integer)
----     _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
----     pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
----
----
---- All other functions are under GNU General Public Licence.
----
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
--- WARNING: Any change in this file must be evaluated for compatibility.
---          Changes cleanly handled by postgis_upgrade.sql are fine,
---          other changes will require a bump in Major version.
---          Currently only function replaceble by CREATE OR REPLACE
---          are cleanly handled.
---
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
---  pgRouting 2.0 types
-
-
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_version()
-RETURNS TABLE(
-        "version" varchar,
-        tag varchar,
-        hash varchar,
-        branch varchar,
-        boost varchar
-    ) AS
-$BODY$
-    SELECT '2.5.2'::varchar AS version,
-        'v2.5.2'::varchar AS tag,
-        '60585f1f7'::varchar AS hash,
-        'master'::varchar AS branch,
-        '1.54.0'::varchar AS boost;
-$BODY$
-LANGUAGE sql IMMUTABLE;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getTableName(IN tab text, IN reportErrs int default 0, IN fnName text default '_pgr_getTableName', OUT sname text,OUT tname text)
-  RETURNS RECORD AS
-$$
-DECLARE
-        naming record;
-        i integer;
-        query text;
-        sn text; -- schema name
-        tn text; -- table name
-        ttype text; --table type for future use
-        err boolean;
-        debuglevel text;
-        var_types text[] = ARRAY['BASE TABLE', 'VIEW'];
-BEGIN
-
-    execute 'show client_min_messages' into debuglevel;
-
-
-    perform _pgr_msg( 0, fnName, 'Checking table ' || tab || ' exists');
-    --RAISE DEBUG 'Checking % exists',tab;
-
-    i := strpos(tab,'.');
-    IF (i <> 0) THEN
-        sn := split_part(tab, '.',1);
-        tn := split_part(tab, '.',2);
-    ELSE
-        sn := current_schema;
-        tn := tab;
-    END IF;
-
-
-   SELECT schema_name INTO sname
-   FROM information_schema.schemata WHERE schema_name = sn;
-
-    IF sname IS NOT NULL THEN -- found schema (as is)
-       SELECT table_name, table_type INTO tname, ttype
-       FROM information_schema.tables
-       WHERE
-                table_type = ANY(var_types) and
-                table_schema = sname and
-                table_name = tn ;
-        IF tname is NULL THEN
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  = ANY(var_types) and
-                table_schema = sname and
-                table_name = lower(tn) ORDER BY table_name;
-        END IF;
-    END IF;
-    IF sname is NULL or tname is NULL THEN --schema not found or table not found
-        SELECT schema_name INTO sname
-        FROM information_schema.schemata
-        WHERE schema_name = lower(sn) ;
-
-        IF sname IS NOT NULL THEN -- found schema (with lower caps)
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  =  ANY(var_types) and
-                table_schema = sname and
-                table_name= tn ;
-
-           IF tname IS NULL THEN
-                SELECT table_name, table_type INTO tname, ttype
-                FROM information_schema.tables
-                WHERE
-                    table_type  =  ANY(var_types) and
-                    table_schema = sname and
-                    table_name= lower(tn) ;
-           END IF;
-        END IF;
-    END IF;
-   err = (sname IS NULL OR tname IS NULL);
-   perform _pgr_onError(err, reportErrs, fnName, 'Table ' || tab ||' not found',' Check your table name', 'Table '|| tab || ' found');
-
-END;
-$$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(sname text, tname text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(col) into cname;
-
-    IF cname is null  THEN
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(lower(col))  into cname;
-    END if;
-
-    err = cname is null;
-
-    perform _pgr_onError(err, reportErrs, fnName,  'Column '|| col ||' not found', ' Check your column name','Column '|| col || ' found');
-    RETURN cname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(tab text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-
-    select * into cname from _pgr_getColumnName(sname,tname,col,reportErrs, fnName);
-    RETURN cname;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    select * from _pgr_getColumnName(tab,col,0, '_pgr_isColumnInTable') into cname;
-    return cname is not null;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(sname text, tname text, cname text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    pkey text;
-BEGIN
-    SELECT
-          pg_attribute.attname into pkey
-         --  format_type(pg_attribute.atttypid, pg_attribute.atttypmod)
-          FROM pg_index, pg_class, pg_attribute
-          WHERE
-                  pg_class.oid = _pgr_quote_ident(sname||'.'||tname)::regclass AND
-                  indrelid = pg_class.oid AND
-                  pg_attribute.attrelid = pg_class.oid AND
-                  pg_attribute.attnum = any(pg_index.indkey)
-                  AND indisprimary;
-
-    IF pkey=cname then
-          RETURN TRUE;
-    END IF;
-
-    SELECT a.index_name,
-           b.attname,
-           b.attnum,
-           a.indisunique,
-           a.indisprimary
-      INTO rec
-      FROM ( SELECT a.indrelid,
-                    a.indisunique,
-                    a.indisprimary,
-                    c.relname index_name,
-                    unnest(a.indkey) index_num
-               FROM pg_index a,
-                    pg_class b,
-                    pg_class c,
-                    pg_namespace d
-              WHERE b.relname=tname
-                AND b.relnamespace=d.oid
-                AND d.nspname=sname
-                AND b.oid=a.indrelid
-                AND a.indexrelid=c.oid
-           ) a,
-           pg_attribute b
-     WHERE a.indrelid = b.attrelid
-       AND a.index_num = b.attnum
-       AND b.attname = cname
-  ORDER BY a.index_name,
-           a.index_num;
-
-  RETURN FOUND;
-  EXCEPTION WHEN OTHERS THEN
-    perform _pgr_onError( true, reportErrs, fnName,
-    'Error when checking for the postgres system attributes', SQLERR);
-    RETURN FALSE;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(tab text, col text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    sname text;
-    tname text;
-    cname text;
-    pkey text;
-    value boolean;
-BEGIN
-    SELECT * into naming FROM _pgr_getTableName(tab, 0, fnName);
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    SELECT * into cname from _pgr_getColumnName(sname, tname, col, 0, fnName) ;
-    IF cname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    select * into value  from _pgr_isColumnIndexed(sname, tname, cname, reportErrs, fnName);
-    return value;
-END
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-create or replace function _pgr_quote_ident(idname text)
-    returns text as
-$body$
-declare
-    t text[];
-    pgver text;
-
-begin
-    pgver := regexp_replace(version(), E'^PostgreSQL ([^ ]+)[ ,].*$', E'\\1');
-
-    if _pgr_versionless(pgver, '9.2') then
-        select into t array_agg(quote_ident(term)) from
-            (select nullif(unnest, '') as term
-               from unnest(string_to_array(idname, '.'))) as foo;
-    else
-        select into t array_agg(quote_ident(term)) from
-            (select unnest(string_to_array(idname, '.', '')) as term) as foo;
-    end if;
-    return array_to_string(t, '.');
-end;
-$body$
-language plpgsql immutable;
-
-
-CREATE OR REPLACE FUNCTION _pgr_versionless(v1 text, v2 text)
-  RETURNS boolean AS
-$BODY$
-
-
-declare
-    v1a text[];
-    v2a text[];
-    nv1 integer;
-    nv2 integer;
-    ne1 integer;
-    ne2 integer;
-
-begin
-    -- separate components into an array, like:
-    -- '2.1.0-beta3dev'  =>  {2,1,0,beta3dev}
-    v1a := regexp_matches(v1, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-    v2a := regexp_matches(v2, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-
-    -- convert modifiers to numbers for comparison
-    -- we do not delineate between alpha1, alpha2, alpha3, etc
-    ne1 := case when v1a[4] is null or v1a[4]='' then 5
-                when v1a[4] ilike 'rc%' then 4
-                when v1a[4] ilike 'beta%' then 3
-                when v1a[4] ilike 'alpha%' then 2
-                when v1a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    ne2 := case when v2a[4] is null or v2a[4]='' then 5
-                when v2a[4] ilike 'rc%' then 4
-                when v2a[4] ilike 'beta%' then 3
-                when v2a[4] ilike 'alpha%' then 2
-                when v2a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    nv1 := v1a[1]::integer * 10000 +
-           coalesce(v1a[2], '0')::integer * 1000 +
-           coalesce(v1a[3], '0')::integer *  100 + ne1;
-    nv2 := v2a[1]::integer * 10000 +
-           coalesce(v2a[2], '0')::integer * 1000 +
-           coalesce(v2a[3], '0')::integer *  100 + ne2;
-
-    --raise notice 'nv1: %, nv2: %, ne1: %, ne2: %', nv1, nv2, ne1, ne2;
-
-    return nv1 < nv2;
-end;
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-create or replace function _pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_startpoint(st_geometryn(g,1));
-    else
-        return st_startpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function _pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_endpoint(st_geometryn(g,1));
-    else
-        return st_endpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_parameter_check(fn text, sql text, big boolean default false)
-  RETURNS bool AS
-  $BODY$
-
-  DECLARE
-  rec record;
-  rec1 record;
-  has_rcost boolean;
-  safesql text;
-  BEGIN
-    IF (big) THEN
-       RAISE EXCEPTION 'This function is for old style functions';
-    END IF;
-
-    -- checking query is executable
-    BEGIN
-      safesql =  'select * from ('||sql||' ) AS __a__ limit 1';
-      execute safesql into rec;
-      EXCEPTION
-        WHEN OTHERS THEN
-            RAISE EXCEPTION 'Could not execute query please verify syntax of: '
-              USING HINT = sql;
-    END;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('dijkstra','astar') THEN
-        BEGIN
-          execute 'select id,source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: id, source, target, cost';
-        END;
-        execute 'select pg_typeof(id)::text as id_type, pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.id_type in ('integer'::text))
-              AND (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Error, columns ''source'', ''target'' must be of type int4, ''cost'' must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    IF fn IN ('astar') THEN
-        BEGIN
-          execute 'select x1,y1,x2,y2  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: x1,y1, x2,y2';
-        END;
-        execute 'select pg_typeof(x1)::text as x1_type, pg_typeof(y1)::text as y1_type, pg_typeof(x2)::text as x2_type, pg_typeof(y2)::text as y2_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.x1_type = 'double precision'::text)
-              AND (rec.y1_type = 'double precision'::text)
-              AND (rec.x2_type = 'double precision'::text)
-              AND (rec.y2_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Columns: x1, y1, x2, y2 must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('johnson') THEN
-        BEGIN
-          execute 'select source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING HINT = 'Please veryfy the column names: id, source, target, cost',
-                         ERRCODE = 'XX000';
-        END;
-
-        execute 'select pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Support for source,target columns only of type: integer. Support for Cost: double precision'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    -- Checking the data types of the optional reverse_cost";
-    has_rcost := false;
-    IF fn IN ('johnson','dijkstra','astar') THEN
-      BEGIN
-        execute 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||safesql||' ) AS __b__ limit 1 ' into rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-            return has_rcost;
-      END;
-      if (has_rcost) then
-        IF (big) then
-           IF  not (rec1.rev_type in ('bigint'::text, 'integer'::text, 'smallint'::text, 'double precision'::text, 'real'::text)) then
-             RAISE EXCEPTION 'Illegar type in optional parameter reverse_cost.'
-             USING ERRCODE = 'XX000';
-           END IF;
-        ELSE -- Version 2.0.0 is more restrictive
-           IF (rec1.rev_type != 'double precision') then
-             RAISE EXCEPTION 'Illegal type in optional parameter reverse_cost, must be of type float8'
-             USING ERRCODE = 'XX000';
-           END IF;
-        END IF;
-      end if;
-      return true;
-    END IF;
-    -- just for keeps
-    return true;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_onError(
-  IN errCond boolean,  -- true there is an error
-  IN reportErrs int,   -- 0, 1 or 2
-  IN fnName text,      -- function name that generates the error
-  IN msgerr text,      -- error message
-  IN hinto text default 'No hint', -- hint help
-  IN msgok text default 'OK')      -- message if everything is ok
-  RETURNS void AS
-$BODY$
-BEGIN
-  if errCond=true then
-     if reportErrs=0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-     else
-       if reportErrs = 2 then
-         raise notice '----> PGR ERROR in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-         raise raise_exception;
-       else
-         raise notice '----> PGR NOTICE in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-       end if;
-     end if;
-  else
-       raise debug 'PGR ----> %: %',fnName,msgok;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_msg(IN msgKind int, IN fnName text, IN msg text default '---->OK')
-  RETURNS void AS
-$BODY$
-BEGIN
-  if msgKind = 0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msg;
-  else
-       raise notice '----> PGR NOTICE in %: %',fnName,msg;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(sname text, tname text, cname text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    EXECUTE 'select data_type  from information_schema.columns '
-            || 'where table_name = '||quote_literal(tname)
-                 || ' and table_schema=' || quote_literal(sname)
-                 || ' and column_name='||quote_literal(cname)
-       into ctype;
-    err = ctype is null;
-    perform _pgr_onError(err, reportErrs, fnName,
-            'Type of Column '|| cname ||' not found',
-            'Check your column name',
-            'OK: Type of Column '|| cname || ' is ' || ctype);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(tab text, col text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-    select * into cname from _pgr_getColumnName(tab,col,reportErrs, fnName) ;
-    select * into ctype from _pgr_getColumnType(sname,tname,cname,reportErrs, fnName);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_get_statement(o_sql text)
-RETURNS text AS
-$BODY$
-DECLARE
-sql TEXT;
-BEGIN
-    EXECUTE 'SELECT statement FROM pg_prepared_statements WHERE name ='  || quote_literal(o_sql) || ' limit 1 ' INTO sql;
-    IF (sql IS NULL) THEN
-      RETURN   o_sql;
-    ELSE
-      RETURN  regexp_replace(sql, '(.)* as ', '', 'i');
-    END IF;
-END
-$BODY$
-LANGUAGE plpgsql STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_checkVertTab(vertname text, columnsArr  text[],
-    IN reportErrs int default 1, IN fnName text default '_pgr_checkVertTab',
-    OUT sname text,OUT vname text)
-RETURNS record AS
-$BODY$
-DECLARE
-    cname text;
-    colname text;
-    naming record;
-    debuglevel text;
-    err  boolean;
-    msgKind int;
-
-BEGIN
-    msgKind = 0; -- debug_
-    execute 'show client_min_messages' into debuglevel;
-
-    perform _pgr_msg(msgKind, fnName, 'Checking table ' || vertname || ' exists');
-       select * from _pgr_getTableName(vertname, 0, fnName) into naming;
-       sname=naming.sname;
-       vname=naming.tname;
-       err = sname is NULL or vname is NULL;
-    perform _pgr_onError( err, 2, fnName,
-          'Vertex Table: ' || vertname || ' not found',
-          'Please create ' || vertname || ' using  _pgr_createTopology() or pgr_createVerticesTable()',
-          'Vertex Table: ' || vertname || ' found');
-
-
-    perform _pgr_msg(msgKind, fnName, 'Checking columns of ' || vertname);
-      FOREACH cname IN ARRAY columnsArr
-      loop
-         select _pgr_getcolumnName(vertname, cname, 0, fnName) into colname;
-         if colname is null then
-           perform _pgr_msg(msgKind, fnName, 'Adding column ' || cname || ' in ' || vertname);
-           set client_min_messages  to warning;
-                execute 'ALTER TABLE '||_pgr_quote_ident(vertname)||' ADD COLUMN '||cname|| ' integer';
-           execute 'set client_min_messages  to '|| debuglevel;
-           perform _pgr_msg(msgKind, fnName);
-         end if;
-      end loop;
-    perform _pgr_msg(msgKind, fnName, 'Finished checking columns of ' || vertname);
-
-    perform _pgr_createIndex(vertname , 'id' , 'btree', reportErrs, fnName);
- END
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(
-    sname text, tname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    debuglevel text;
-    naming record;
-    tabname text;
-    query text;
-    msgKind int;
-BEGIN
-  msgKind = 0; -- debug_
-
-  execute 'show client_min_messages' into debuglevel;
-  tabname=_pgr_quote_ident(sname||'.'||tname);
-  perform _pgr_msg(msgKind, fnName, 'Checking ' || colname || ' column in ' || tabname || ' is indexed');
-    IF (_pgr_isColumnIndexed(sname,tname,colname, 0, fnName)) then
-       perform _pgr_msg(msgKind, fnName);
-    else
-      if indext = 'gist' then
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using gist('||quote_ident(colname)||')';
-      else
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using btree('||quote_ident(colname)||')';
-      end if;
-      perform _pgr_msg(msgKind, fnName, 'Adding index ' || tabname || '_' ||  colname || '_idx');
-      perform _pgr_msg(msgKind, fnName, ' Using ' ||  query);
-      set client_min_messages  to warning;
-      BEGIN
-        execute query;
-        EXCEPTION WHEN others THEN
-          perform _pgr_onError( true, reportErrs, fnName,
-            'Could not create index on:' || colname, SQLERRM);
-      END;
-      execute 'set client_min_messages  to '|| debuglevel;
-      perform _pgr_msg(msgKind, fnName);
-    END IF;
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(tabname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    naming record;
-    sname text;
-    tname text;
-
-BEGIN
-    select * from _pgr_getTableName(tabname, 2, fnName)  into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    execute _pgr_createIndex(sname, tname, colname, indext, reportErrs, fnName);
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pointToId(
-    point geometry,
-    tolerance double precision,
-    vertname text,
-    srid integer)
-
-  RETURNS bigint AS
-$BODY$
-DECLARE
-    rec record;
-    pid bigint;
-
-BEGIN
-    EXECUTE 'SELECT ST_Distance(
-        the_geom,
-        ST_GeomFromText(ST_AsText('
-                || quote_literal(point::text)
-                || '),'
-            || srid ||')) AS d, id, the_geom
-    FROM '||_pgr_quote_ident(vertname)||'
-    WHERE ST_DWithin(
-        the_geom,
-        ST_GeomFromText(
-            ST_AsText(' || quote_literal(point::text) ||'),
-            ' || srid || '),' || tolerance||')
-    ORDER BY d
-    LIMIT 1' INTO rec ;
-    IF rec.id IS NOT NULL THEN
-        pid := rec.id;
-    ELSE
-        execute 'INSERT INTO '||_pgr_quote_ident(vertname)||' (the_geom) VALUES ('||quote_literal(point::text)||')';
-        pid := lastval();
-END IF;
-
-RETURN pid;
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'many_to_many_dijkstra'
-LANGUAGE c VOLATILE;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer, OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstra(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(Many to Many)';
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraVia(
-    edges_sql TEXT,
-    via_vertices ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    strict BOOLEAN DEFAULT FALSE,
-    U_turn_on_edge BOOLEAN DEFAULT TRUE,
-
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'dijkstraVia'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_johnson(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'johnson'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_floydWarshall(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'floydWarshall'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'astarManyToMany'
-LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, normal:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to Many)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true, normal:=false) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to Many)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid ANYARRAY,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-    equicost BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'many_withPointsDD'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_withPointsDD($1, $2, ARRAY[$3]::BIGINT[], $4, $5, $6, $7, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vids anyarray,
-    distance FLOAT,
-    directed BOOLEAN DEFAULT TRUE,
-    equicost BOOLEAN DEFAULT FALSE,
-    OUT seq integer,
-    OUT from_v  bigint,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'driving_many_to_dist'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vid bigint,
-    distance FLOAT8,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq integer,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer, directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'kshortest_path'
-    LANGUAGE c STABLE STRICT;
-
--- V2 the graph is directed and there are no heap paths
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid integer, end_vid integer, k integer, has_rcost boolean)
-  RETURNS SETOF pgr_costresult3 AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated signature of pgr_ksp';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql::text, false);
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_rcost) THEN
-           -- user says that it has reverse_cost but its not true
-           RAISE EXCEPTION 'has_reverse_cost set to true but reverse_cost not found';
-         ELSE
-           -- user says that it does not have reverse_cost but it does have it
-           -- to ignore we remove reverse_cost from the query
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         END IF;
-      END IF;
-
-      RETURN query SELECT ((row_number() over()) -1)::integer  AS seq,  (path_id - 1)::integer AS id1, node::integer AS id2, edge::integer AS id3, cost
-            FROM _pgr_ksp(sql::text, start_vid, end_vid, k, TRUE, FALSE) WHERE path_id <= k;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer,
-  directed boolean default true, heap_paths boolean default false,
-  --directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  BEGIN
-         RETURN query SELECT *
-                FROM _pgr_ksp(edges_sql::text, start_vid, end_vid, k, directed, heap_paths);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsKSP(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    k INTEGER,
-
-    directed BOOLEAN DEFAULT TRUE,
-    heap_paths BOOLEAN DEFAULT FALSE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER, OUT path_id INTEGER, OUT path_seq INTEGER,
-    OUT node BIGINT, OUT edge BIGINT,
-    OUT cost FLOAT, OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'withPoints_ksp'
-    LANGUAGE c STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_unnest_matrix(matrix float8[][], OUT start_vid integer, OUT end_vid integer, out agg_cost float8)
-RETURNS SETOF record AS
-
-$body$
-DECLARE
-
-m float8[];
-
-BEGIN
-    start_vid = 1;
-    foreach m slice 1 in  ARRAY matrix
-    LOOP
-        end_vid = 1;
-        foreach agg_cost in  ARRAY m
-        LOOP
-            RETURN next;
-            end_vid = end_vid + 1;
-        END LOOP;
-        start_vid = start_vid + 1;
-    END LOOP;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_tsp(
-    matrix float8[][],
-    startpt INTEGER,
-    endpt INTEGER DEFAULT -1,
-    OUT seq INTEGER,
-    OUT id INTEGER)
-RETURNS SETOF record AS
-$body$
-DECLARE
-table_sql TEXT;
-debuglevel TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(float8[][], integer, integer)';
-
-    CREATE TEMP TABLE ___tmp2 ON COMMIT DROP AS SELECT * FROM _pgr_unnest_matrix( matrix );
-
-
-    startpt := startpt + 1;
-    IF endpt = -1 THEN endpt := startpt;
-    END IF;
-
-
-    RETURN QUERY
-    WITH
-    result AS (
-        SELECT * FROM pgr_TSP(
-        $$SELECT * FROM ___tmp2 $$,
-        startpt, endpt,
-
-        tries_per_temperature :=  500 :: INTEGER,
-        max_changes_per_temperature := 30 :: INTEGER,
-        max_consecutive_non_changes := 500 :: INTEGER,
-
-        randomize:=false)
-    )
-    SELECT (row_number() over(ORDER BY result.seq) - 1)::INTEGER AS seq, (result.node - 1)::INTEGER AS id
-
-    FROM result WHERE NOT(result.node = startpt AND result.seq != 1);
-
-    DROP TABLE ___tmp2;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-
-
-CREATE OR  REPLACE FUNCTION pgr_tsp(sql text, start_id INTEGER, end_id INTEGER default (-1))
-returns setof pgr_costResult as
-$body$
-DECLARE
-table_sql TEXT;
-rec RECORD;
-debuglevel TEXT;
-n BIGINT;
-
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(sql, integer, integer)';
-
-    table_sql := 'CREATE TEMP TABLE ___tmp ON COMMIT DROP AS ' || sql ;
-    EXECUTE table_sql;
-
-
-    BEGIN
-        EXECUTE 'SELECT id, x, y FROM ___tmp' INTO rec;
-        EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                USING ERRCODE = 'XX000',
-                HINT = 'Please verify the column names: id, x, y';
-    END;
-
-    EXECUTE
-    'SELECT
-        pg_typeof(id)::text as id_type,
-        pg_typeof(x)::text as x_type,
-        pg_typeof(y)::text as y_type FROM ___tmp' INTO rec;
-
-
-    IF NOT((rec.id_type in ('integer'::text))
-        AND (rec.x_type = 'double precision'::text)
-        AND (rec.y_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION '''id'' must be of type INTEGER, ''x'' ad ''y'' must be of type FLOAT'
-            USING ERRCODE = 'XX000';
-    END IF;
-
-    EXECUTE 'SELECT count(*) AS n FROM (' || sql || ') AS __a__' INTO rec;
-    n = rec.n;
-
-    RETURN query
-        SELECT (seq - 1)::INTEGER AS seq, node::INTEGER AS id1, node::INTEGER AS id2, cost
-        FROM pgr_eucledianTSP(sql, start_id, end_id,
-
-            tries_per_temperature :=  500 * n :: INTEGER,
-            max_changes_per_temperature := 60 * n :: INTEGER,
-            max_consecutive_non_changes := 500 * n :: INTEGER,
-
-            randomize := false) WHERE seq <= n;
-    DROP TABLE ___tmp;
-
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-create or replace function _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
-  as
-$body$
-declare
-    sql text;
-    r record;
-
-begin
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    sql := 'with nodes as (' || sqlin || ')
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j, st_distance(st_makepoint(a.x, a.y), st_makepoint(b.x, b.y)) as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i';
-
-    for r in execute sql loop
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-
-end;
-$body$
-language plpgsql stable cost 10;
-
-
-CREATE OR REPLACE FUNCTION pgr_TSP(
-    matrix_row_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'newTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_eucledianTSP(
-    coordinates_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'eucledianTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_alphashape(sql text, alpha float8 DEFAULT 0, OUT x float8, OUT y float8)
-    RETURNS SETOF record
-    AS '$libdir/libpgrouting-2.5', 'alphashape'
-    LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pointsAsPolygon(query varchar, alpha float8 DEFAULT 0)
-	RETURNS geometry AS
-	$$
-	DECLARE
-		r record;
-		geoms geometry[];
-		vertex_result record;
-		i int;
-		n int;
-		spos int;
-		q text;
-		x float8[];
-		y float8[];
-
-	BEGIN
-		geoms := array[]::geometry[];
-		i := 1;
-
-		FOR vertex_result IN EXECUTE 'SELECT x, y FROM pgr_alphashape('''|| query || ''', ' || alpha || ')'
-		LOOP
-			x[i] = vertex_result.x;
-			y[i] = vertex_result.y;
-			i := i+1;
-		END LOOP;
-
-		n := i;
-		IF n = 1 THEN
-			RAISE NOTICE 'n = 1';
-			RETURN NULL;
-		END IF;
-
-		spos := 1;
-		q := 'SELECT ST_GeometryFromText(''POLYGON((';
-		FOR i IN 1..n LOOP
-			IF x[i] IS NULL AND y[i] IS NULL THEN
-				q := q || ', ' || x[spos] || ' ' || y[spos] || '))'',0) AS geom;';
-				EXECUTE q INTO r;
-				geoms := geoms || array[r.geom];
-				q := '';
-			ELSE
-				IF q = '' THEN
-					spos := i;
-					q := 'SELECT ST_GeometryFromText(''POLYGON((';
-				END IF;
-				IF i = spos THEN
-					q := q || x[spos] || ' ' || y[spos];
-				ELSE
-					q := q || ', ' || x[i] || ' ' || y[i];
-				END IF;
-			END IF;
-		END LOOP;
-
-		RETURN ST_BuildArea(ST_Collect(geoms));
-	END;
-	$$
-	LANGUAGE 'plpgsql' VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'bd_astar'
-LANGUAGE C VOLATILE;
-
-
-
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed:=true, only_cost:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    BOOLEAN,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false);
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to Many)';
-
-
-
--- one to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to Many)';
-
-
--- bdDijkstra MANY TO MANY
-CREATE OR REPLACE FUNCTION _pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bdDijkstra'
-LANGUAGE c VOLATILE;
-
-
-
--- ONE TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- TODO directed BOOLEAN DEFAULT TRUE,  on version 3
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, false) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, true) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_vid integer,
-    target_vid integer,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_vertex'
-LANGUAGE 'c' IMMUTABLE;
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_edge'
-LANGUAGE 'c' IMMUTABLE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || edges_sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        -- no restrictions then its a dijkstra
-        RETURN query SELECT a.seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_dijkstra(new_sql, start_vid, end_vid, directed) a;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, start_vid, end_vid, directed, has_rcost, restrictions_sql);
-    RETURN;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trspViaVertices(
-    edges_sql TEXT,
-    via_vids ANYARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult3 AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            new_sql :=
-               'WITH old_sql AS (' || edges_sql || ')' ||
-                '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        RETURN query SELECT (row_number() over())::INTEGER, path_id:: INTEGER, node::INTEGER,
-            (CASE WHEN edge = -2 THEN -1 ELSE edge END)::INTEGER, cost
-            FROM pgr_dijkstraVia(new_sql, via_vids, directed, strict:=true) WHERE edge != -1;
-        RETURN;
-    END IF;
-
-
-    -- make the call without contradiction from part of the user
-    RETURN query SELECT * FROM _pgr_trspViaVertices(new_sql, via_vids::INTEGER[], directed, has_rcost, restrictions_sql);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-
-    new_sql := sql;
-    IF (has_reverse != has_reverse_cost) THEN  -- user contradiction
-        IF (has_reverse) THEN
-            -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) THEN
-        -- no restrictions then its a with points
-        RETURN query SELECT a.seq-1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_withpoints(new_sql,
-            '(SELECT 1 as pid, ' || source_eid || 'as edge_id, ' || source_pos || '::float8 as fraction)'
-            || ' UNION '
-            || '(SELECT 2, ' || target_eid || ', ' || target_pos || ')' ::TEXT,
-            -1, -2, directed) a;
-        -- WHERE node != -2;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, source_eid, source_pos, target_eid, target_pos, directed, has_reverse_cost, turn_restrict_sql);
-    RETURN;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-create or replace function _pgr_trspViaVertices(sql text, vids integer[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    lrra boolean := false;
-    seq integer := 0;
-    seq2 integer := 0;
-
-begin
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(vids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from _pgr_trsp(sql, vids[i], vids[i+1], directed, has_rcost, turn_restrict_sql) as a loop
-            -- filter out the individual path ends except the last one
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --raise notice 'rr: %', rr;
-            if rr.id3 = -1 then
-                lrr := rr;
-                lrra := true;
-            else
-                seq := seq + 1;
-                rr.seq := seq;
-                return next rr;
-            end if;
-        end loop;
-    end loop;
-
-    if lrra then
-        seq := seq + 1;
-        lrr.seq := seq;
-        return next lrr;
-    end if;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-
-----------------------------------------------------------------------------------------------------------
-
-create or replace function pgr_trspViaEdges(sql text, eids integer[], pcts float8[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    first boolean := true;
-    seq integer := 0;
-    seq2 integer :=0;
-    has_reverse BOOLEAN;
-    point_is_vertex BOOLEAN := false;
-    edges_sql TEXT;
-    f float;
-
-begin
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql := sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (NOT has_rcost) THEN
-            -- user does not want to use reverse cost column
-            edges_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    FOREACH f IN ARRAY pcts LOOP
-        IF f in (0,1) THEN
-           point_is_vertex := true;
-        END IF;
-    END LOOP;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) AND NOT point_is_vertex THEN
-        -- no restrictions then its a _pgr_withPointsVia
-        RETURN query SELECT a.seq::INTEGER, path_id::INTEGER AS id1, node::INTEGER AS id2, edge::INTEGER AS id3, cost
-        FROM _pgr_withPointsVia(edges_sql, eids, pcts, directed) a;
-        RETURN;
-    END IF;
-
-    if array_length(eids, 1) != array_length(pcts, 1) then
-        raise exception 'The length of arrays eids and pcts must be the same!';
-    end if;
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(eids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from pgr_trsp(edges_sql,
-                                  eids[i], pcts[i],
-                                  eids[i+1], pcts[i+1],
-                                  directed,
-                                  has_rcost,
-                                  turn_restrict_sql) as a loop
-            -- combine intermediate via costs when cost is split across
-            -- two parts of a segment because it stops it and
-            -- restarts the next leg also on it
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --
-            -- there are multiple condition we have to deal with
-            -- between the end of one leg and start of the next
-            -- 1. same vertex_id. edge_id=-1; drop record with edge_id=-1
-            -- means: path ends on vertex
-            -- NOTICE:  rr: (19,1,44570022,-1,0)
-            -- NOTICE:  rr: (0,2,44570022,1768045,2.89691196717448)
-            -- 2. vertex_id=-1; sum cost components
-            -- means: path end/starts with the segment
-            -- NOTICE:  rr: (11,2,44569628,1775909,9.32885885148532)
-            -- NOTICE:  rr: (0,3,-1,1775909,0.771386350984395)
-
-            --raise notice 'rr: %', rr;
-            if first then
-                lrr := rr;
-                first := false;
-            else
-                if lrr.id3 = -1 then
-                    lrr := rr;
-                elsif lrr.id3 = rr.id3 then
-                    lrr.cost := lrr.cost + rr.cost;
-                    if rr.id2 = -1 then
-                        rr.id2 := lrr.id2;
-                    end if;
-                else
-                    seq := seq + 1;
-                    lrr.seq := seq;
-                    return next lrr;
-                    lrr := rr;
-                end if;
-            end if;
-        end loop;
-    end loop;
-
-    seq := seq + 1;
-    lrr.seq := seq;
-    return next lrr;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-----------------------------
---    MANY TO MANY
-----------------------------
-
-
-CREATE OR REPLACE FUNCTION _pgr_maxflow(
-    edges_sql TEXT,
-    sources ANYARRAY,
-    targets ANYARRAY,
-    algorithm INTEGER DEFAULT 1,
-    only_flow BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'max_flow_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-
-------------------------------------
--- 3 pgr_edmondsKarp
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 2 boykov_kolmogorov
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 1 pgr_pushRelabel
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT flow
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], algorithm := 1, only_flow := true);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], $3::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, $2::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxCardinalityMatch(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'edge_disjoint_paths_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    bigint,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    IN directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_contractGraph(
-    edges_sql TEXT,
-    contraction_order BIGINT[],
-    max_cycles integer DEFAULT 1,
-    forbidden_vertices BIGINT[] DEFAULT ARRAY[]::BIGINT[],
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT type TEXT,
-    OUT id BIGINT,
-    OUT contracted_vertices BIGINT[],
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost float)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'contractGraph'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliver(
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_cell_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliver'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliverEuclidean (
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliverEuclidean'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_vrpOneDepot(
-    TEXT, -- customers_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_sql
-    INTEGER, -- depot_id
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-orders_sql TEXT;
-trucks_sql TEXT;
-matrix_sql TEXT;
-final_sql TEXT;
-BEGIN
-
-    orders_sql = $$WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    pickups AS (
-        SELECT id, x AS p_x, y AS p_y, open_time AS p_open, close_time AS p_close, service_time AS p_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vrp_orders.id AS id, order_unit AS demand, pickups.id AS p_node_id, p_x, p_y, p_open, p_close, p_service,
-    vrp_orders.id AS d_node_id, x AS d_x, y AS d_y, open_time AS d_open, close_time AS d_close, service_time AS d_service
-    FROM vrp_orders, pickups
-    WHERE vrp_orders.id != $$ || $4;
-
-
-    trucks_sql = $$ WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    vrp_vehicles AS ($$ || $2 || $$ ),
-    starts AS (
-        SELECT id AS start_node_id, x AS start_x, y AS start_y, open_time AS start_open, close_time AS start_close, service_time AS start_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vehicle_id AS id, capacity, starts.* FROM vrp_vehicles, starts;
-    $$;
-
-    final_sql = '
-    SELECT * FROM _pgr_pickDeliver(
-            $$' || orders_sql || '$$,
-            $$' || trucks_sql || '$$,
-            $$' || $3 || '$$,
-            max_cycles := 2,
-            initial_sol := 4 ); ';
-
-    RAISE DEBUG '%', orders_sql;
-    RAISE DEBUG '%', trucks_sql;
-    RAISE DEBUG '%', $3;
-    RAISE DEBUG '%', final_sql;
-
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
------------------------------------------------------------------------
--- Core function for vrp with sigle depot computation
--- See README for description
------------------------------------------------------------------------
---
---
-
-create or replace function pgr_vrpOneDepot(
-	order_sql text,
-	vehicle_sql text,
-	cost_sql text,
-	depot_id integer,
-
-	OUT oid integer,
-	OUT opos integer,
-	OUT vid integer,
-	OUT tarrival integer,
-	OUT tdepart integer)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT order_id::INTEGER, stop_seq::INTEGER, vehicle_id::INTEGER, arrival_time::INTEGER, departure_time::INTEGER
-    FROM _pgr_vrpOneDepot($1, $2,
-       '
-            SELECT src_id AS start_vid, dest_id AS end_vid, traveltime AS agg_cost FROM ('||$3||') AS a
-       ',
-        $4
-    ) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_gsoc_vrppdtw(
-    customers_sql TEXT,
-    max_vehicles INTEGER,
-    capacity FLOAT,
-    speed FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-
-    OUT seq INTEGER,
-    OUT vehicle_id INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT stop_id BIGINT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-    orders_sql TEXT;
-    vehicles_sql TEXT;
-    final_sql TEXT;
-BEGIN
-    orders_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        pickups AS (
-            SELECT id, demand, x as p_x, y as p_y, opentime as p_open, closetime as p_close, servicetime as p_service
-            FROM  customer_data WHERE pindex = 0 AND id != 0
-        ),
-        deliveries AS (
-            SELECT pindex AS id, x as d_x, y as d_y, opentime as d_open, closetime as d_close, servicetime as d_service
-            FROM  customer_data WHERE dindex = 0 AND id != 0
-        )
-        SELECT * FROM pickups JOIN deliveries USING(id) ORDER BY pickups.id
-    $$;
-
-    vehicles_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ )
-        SELECT id, x AS start_x, y AS start_y,
-            opentime AS start_open, closetime AS start_close, $$ ||
-            capacity || $$ AS capacity, $$ || max_vehicles || $$ AS number, $$ || speed || $$ AS speed
-            FROM customer_data WHERE id = 0 LIMIT 1
-        $$;
---  seq | vehicle_id | vehicle_seq | stop_id | travel_time | arrival_time | wait_time | service_time | departure_time
-    final_sql = $$ WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        p_deliver AS (SELECT * FROM _pgr_pickDeliverEuclidean('$$ || orders_sql || $$',  '$$ || vehicles_sql || $$',  1, $$ || max_cycles || $$ )),
-        picks AS (SELECT p_deliver.*, pindex, dindex, id AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 2)),
-        delivers AS (SELECT p_deliver.*, pindex, dindex, dindex AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 3)),
-        depots AS (SELECT p_deliver.*, 0 as pindex, 0 as dindex, 0 AS the_id FROM p_deliver WHERE (stop_type IN (-1,1,6))),
-        the_union AS (SELECT * FROM picks UNION SELECT * FROM delivers UNION SELECT * from depots)
-
-        SELECT (row_number() over(ORDER BY a.seq))::INTEGER, vehicle_seq, a.stop_seq, the_id::BIGINT, a.travel_time, a.arrival_time, a.wait_time, a.service_time, a.departure_time
-        FROM (SELECT * FROM the_union) AS a ORDER BY a.seq
-        $$;
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-CREATE OR REPLACE FUNCTION pgr_gsoc_vrppdtw(
-    sql text,
-    vehicle_num INTEGER,
-    capacity INTEGER
-)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-customers_sql TEXT;
-BEGIN
-    RETURN query
-         SELECT a.seq, vehicle_id::INTEGER AS id1, stop_id::INTEGER AS id2, departure_time AS cost
-        FROM _pgr_gsoc_vrppdtw($1, $2, $3, 1, 30) AS a WHERE vehicle_id NOT IN (-2);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION _pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN,
-    driving_side CHAR,
-    details BOOLEAN,
-
-    only_cost BOOLEAN DEFAULT false, -- gets path
-    normal BOOLEAN DEFAULT true, -- false for many to onu
-
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'withPoints'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], ARRAY[$4]::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], ARRAY[$4]::bigint[], $5, $6, $7, FALSE, FALSE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], $4::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], $4::BIGINT[], $5,  $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION  _pgr_withPointsVia(
-    sql text,
-    via_edges bigint[],
-    fraction float[],
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  has_rcost boolean;
-  sql_new_vertices text := ' ';
-  sql_on_vertex text;
-  v_union text := ' ';
-  dummyrec record;
-  rec1 record;
-  via_vertices int[];
-  sql_safe text;
-  new_edges text;
-  BEGIN
-     BEGIN
-        sql_safe = 'SELECT id, source, target, cost, reverse_cost FROM ('|| sql || ') AS __a';
-
-        EXECUTE 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||sql_safe||' ) AS __b__ limit 1 ' INTO rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-     END;
-
-
-      IF array_length(via_edges, 1) != array_length(fraction, 1) then
-        RAISE EXCEPTION 'The length of via_edges is different of length of via_edges';
-      END IF;
-
-      FOR i IN 1 .. array_length(via_edges, 1)
-      LOOP
-          IF fraction[i] = 0 THEN
-              sql_on_vertex := 'SELECT source FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.source;
-          ELSE IF fraction[i] = 1 THEN
-              sql_on_vertex := 'SELECT target FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.target;
-          ELSE
-              via_vertices[i] = -i;
-              IF has_rcost THEN
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost,
-                              reverse_cost * (1 - ' || fraction[i] || ')  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost,
-                              reverse_cost *  ' || fraction[i] || '  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' where id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               ELSE
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               END IF;
-          END IF;
-          END IF;
-     END LOOP;
-
-     IF sql_new_vertices = ' ' THEN
-         new_edges := sql;
-     ELSE
-         IF has_rcost THEN
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost,
-                         lead(cost) OVER w  - cost AS reverse_cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL),
-                   second_part AS ( SELECT * FROM (SELECT id, lead(source) OVER w  AS source, source as target,
-                         reverse_cost - lead(reverse_cost) OVER w  AS cost,
-                         reverse_cost - lead(reverse_cost) OVER w  AS reverse_cost
-                      FROM  the_union  WHERE target > 0 and reverse_cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY reverse_cost ASC) ) as n2
-                      WHERE source IS NOT NULL),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part)
-                             UNION
-                       (SELECT * FROM second_part) ) _union )
-                  SELECT *  FROM more_union';
-         ELSE
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL ),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part) ) _union )
-                  SELECT *  FROM more_union';
-          END IF;
-      END IF;
-
- -- raise notice '%', new_edges;
-     sql_new_vertices := sql_new_vertices || v_union || ' (' || sql || ')';
-     RETURN query SELECT *
-         FROM pgr_dijkstraVia(new_edges, via_vertices, directed, has_rcost);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_lineGraph(
-    TEXT, -- edges_sql
-    directed BOOLEAN DEFAULT true,
-    OUT seq INTEGER,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost FLOAT,
-    OUT reverse_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'lineGraph'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_connectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'connectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_strongComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'strongComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_biconnectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the edge in the component
-    OUT n_seq INTEGER,          -- nth_seq of the edge in the component
-    OUT edge BIGINT)            -- the number of the edge
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'biconnectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_articulationPoints(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'articulationPoints'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bridges(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT edge BIGINT)            -- the number of the edge 
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bridges'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createtopology(edge_table text, tolerance double precision,
-		   the_geom text default 'the_geom', id text default 'id',
-		   source text default 'source', target text default 'target',rows_where text default 'true',
-		   clean boolean default FALSE)
-RETURNS VARCHAR AS
-$BODY$
-
-DECLARE
-    points record;
-    sridinfo record;
-    source_id bigint;
-    target_id bigint;
-    totcount bigint;
-    rowcount bigint;
-    srid integer;
-    sql text;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    notincluded integer;
-    i integer;
-    naming record;
-    info record;
-    flag boolean;
-    query text;
-    idtype text;
-    gtype text;
-    sourcetype text;
-    targettype text;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-    msgKind int;
-    emptied BOOLEAN;
-
-BEGIN
-    msgKind = 1; -- notice
-    fnName = 'pgr_createTopology';
-    raise notice 'PROCESSING:';
-    raise notice 'pgr_createTopology(''%'', %, ''%'', ''%'', ''%'', ''%'', rows_where := ''%'', clean := %)',edge_table,tolerance,the_geom,id,source,target,rows_where, clean;
-    execute 'show client_min_messages' into debuglevel;
-
-
-    raise notice 'Performing checks, please wait .....';
-
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-        sname=naming.sname;
-        tname=naming.tname;
-        tabname=sname||'.'||tname;
-        vname=tname||'_vertices_pgr';
-        vertname= sname||'.'||vname;
-        rows_where = ' AND ('||rows_where||')';
-      raise DEBUG '     --> OK';
-
-
-      raise debug 'Checking column names in edge table';
-        select * into idname     from _pgr_getColumnName(sname, tname,id,2,fnName);
-        select * into sourcename from _pgr_getColumnName(sname, tname,source,2,fnName);
-        select * into targetname from _pgr_getColumnName(sname, tname,target,2,fnName);
-        select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2,fnName);
-
-
-        err = sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname;
-        perform _pgr_onError( err, 2, fnName,
-               'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-	       'Column names are OK');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking column types in edge table';
-        select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-        select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-        select * into idtype from _pgr_getColumnType(sname,tname,idname,1, fnName);
-
-        err = idtype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column id:'|| idname, ' Expected type of '|| idname || ' is integer,smallint or bigint but '||idtype||' was found');
-
-        err = sourcetype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column source:'|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-        err = targettype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column target:'|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or bigint but '||targettype||' was found');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         raise debug '%',query;
-         EXECUTE query INTO sridinfo;
-
-         err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-         perform _pgr_onError(err, 2, fnName,
-	     'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-
-         srid := sridinfo.srid;
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking and creating indices in edge table';
-        perform _pgr_createIndex(sname, tname , idname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-
-        gname=quote_ident(gname);
-        idname=quote_ident(idname);
-        sourcename=quote_ident(sourcename);
-        targetname=quote_ident(targetname);
-      raise DEBUG '     --> OK';
-
-
-
-
-
-    BEGIN
-        -- issue #193 & issue #210 & #213
-        -- this sql is for trying out the where clause
-        -- the select * is to avoid any column name conflicts
-        -- limit 1, just try on first record
-        -- if the where clasuse is ill formed it will be caught in the exception
-        sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-        EXECUTE sql into dummyRec;
-        -- end
-
-        -- if above where clasue works this one should work
-        -- any error will be caught by the exception also
-        sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NOT NULL AND '||
-	    idname||' IS NOT NULL)=false '||rows_where;
-        EXECUTE SQL  into notincluded;
-
-        if clean then
-            raise debug 'Cleaning previous Topology ';
-               execute 'UPDATE ' || _pgr_quote_ident(tabname) ||
-               ' SET '||sourcename||' = NULL,'||targetname||' = NULL';
-        else
-            raise debug 'Creating topology for edges with non assigned topology';
-            if rows_where=' AND (true)' then
-                rows_where=  ' and ('||quote_ident(sourcename)||' is null or '||quote_ident(targetname)||' is  null)';
-            end if;
-        end if;
-        -- my thoery is that the select Count(*) will never go through here
-        EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-             RAISE NOTICE '%',sql;
-             RETURN 'FAIL';
-    END;
-
-    BEGIN
-         raise DEBUG 'initializing %',vertname;
-         execute 'select * from _pgr_getTableName('||quote_literal(vertname)
-                                                  || ',0,' || quote_literal(fnName) ||' )' into naming;
-         emptied = false;
-         set client_min_messages  to warning;
-         IF sname=naming.sname AND vname=naming.tname  THEN
-            if clean then
-                execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-                execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-                emptied = true;
-            end if;
-         ELSE -- table doesn't exist
-            execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-            emptied = true;
-         END IF;
-         IF (emptied) THEN
-             execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-	         quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-             perform _pgr_createIndex(vertname , 'the_geom'::text , 'gist'::text);
-         END IF;
-         execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id"}''::text[])' into naming;
-         execute 'set client_min_messages  to '|| debuglevel;
-         raise DEBUG  '  ------>OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: something went wrong when initializing the verties table';
-             RETURN 'FAIL';
-    END;
-
-
-
-    raise notice 'Creating Topology, Please wait...';
-        rowcount := 0;
-        FOR points IN EXECUTE 'SELECT ' || idname || '::bigint AS id,'
-            || ' _pgr_StartPoint(' || gname || ') AS source,'
-            || ' _pgr_EndPoint('   || gname || ') AS target'
-            || ' FROM '  || _pgr_quote_ident(tabname)
-            || ' WHERE ' || gname || ' IS NOT NULL AND ' || idname||' IS NOT NULL '||rows_where
-        LOOP
-
-            rowcount := rowcount + 1;
-            IF rowcount % 1000 = 0 THEN
-                RAISE NOTICE '% edges processed', rowcount;
-            END IF;
-
-
-            source_id := _pgr_pointToId(points.source, tolerance,vertname,srid);
-            target_id := _pgr_pointToId(points.target, tolerance,vertname,srid);
-            BEGIN
-                sql := 'UPDATE ' || _pgr_quote_ident(tabname) ||
-                    ' SET '||sourcename||' = '|| source_id::text || ','||targetname||' = ' || target_id::text ||
-                    ' WHERE ' || idname || ' =  ' || points.id::text;
-
-                IF sql IS NULL THEN
-                    RAISE NOTICE 'WARNING: UPDATE % SET source = %, target = % WHERE % = % ', tabname, source_id::text, target_id::text, idname,  points.id::text;
-                ELSE
-                    EXECUTE sql;
-                END IF;
-                EXCEPTION WHEN OTHERS THEN
-                    RAISE NOTICE '%', SQLERRM;
-                    RAISE NOTICE '%',sql;
-                    RETURN 'FAIL';
-            end;
-        END LOOP;
-        raise notice '-------------> TOPOLOGY CREATED FOR  % edges', rowcount;
-        RAISE NOTICE 'Rows with NULL geometry or NULL id: %',notincluded;
-        Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname), _pgr_quote_ident(vertname);
-        raise notice '----------------------------------------------';
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_createTopology(text, double precision,text,text,text,text,text,boolean)
-IS 'args: edge_table,tolerance, the_geom:=''the_geom'',source:=''source'', target:=''target'',rows_where:=''true'' - fills columns source and target in the geometry table and creates a vertices table for selected rows';
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
-RETURNS character varying AS
-$BODY$
-
-DECLARE
-    points record;
-    seg record;
-    naming record;
-    sridinfo record;
-    srid integer;
-    ecnt integer;
-    vertname text;
-    sname text;
-    tname text;
-    vname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    geotype text;
-    gname text;
-    tabName text;
-    flag boolean ;
-    query text;
-    selectionquery text;
-    i integer;
-    tot integer;
-    NumIsolated integer;
-    numdeadends integer;
-    numgaps integer;
-    NumCrossing integer;
-    numRings integer;
-    debuglevel text;
-
-
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeGraph(''%'',%,''%'',''%'',''%'',''%'',''%'')',edge_table,tolerance,the_geom,id,source,target,rows_where;
-  raise notice 'Performing checks, please wait ...';
-  execute 'show client_min_messages' into debuglevel;
-
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-    raise DEBUG '     --> OK';
-
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","cnt","chk"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET cnt=0 ,chk=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into idname     from _pgr_getColumnName(sname, tname,id,2);
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname, 2,
-                       'pgr_analyzeGraph',  'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-                       'Column names are OK');
-
-        raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-   BEGIN
-       raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         EXECUTE QUERY INTO sridinfo;
-
-         perform _pgr_onError( sridinfo IS NULL OR sridinfo.srid IS NULL,2,
-                 'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname,
-                 'SRID of '||gname||' is '||sridinfo.srid);
-
-         IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-             RAISE NOTICE ' Can not determine the srid of the geometry "%" in table %', the_geom,tabname;
-             RETURN 'FAIL';
-         END IF;
-         srid := sridinfo.srid;
-         raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM;--issue 210,211,213
-             RAISE NOTICE 'ERROR: something went wrong when checking for SRID of % in table %', the_geom,tabname;
-             RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-       raise debug 'Checking  indices in edge table';
-       perform _pgr_createIndex(tabname , idname , 'btree');
-       perform _pgr_createIndex(tabname , sourcename , 'btree');
-       perform _pgr_createIndex(tabname , targetname , 'btree');
-       perform _pgr_createIndex(tabname , gname , 'gist');
-
-       gname=quote_ident(gname);
-       sourcename=quote_ident(sourcename);
-       targetname=quote_ident(targetname);
-       idname=quote_ident(idname);
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking indices';
-          RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-        query='select count(*) from '||_pgr_quote_ident(tabname)||' where true  '||rows_where;
-        EXECUTE query into ecnt;
-        raise DEBUG '-->Rows Where condition: OK';
-        raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-            RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-            RAISE NOTICE 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-            RAISE NOTICE '%',query;
-            RETURN 'FAIL';
-    END;
-
-    selectionquery ='with
-           selectedRows as( (select '||sourcename||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||')
-                           union
-                           (select '||targetname||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||'))';
-
-
-
-
-
-   BEGIN
-       RAISE NOTICE 'Analyzing for dead ends. Please wait...';
-       query= 'with countingsource as (select a.'||sourcename||' as id,count(*) as cnts
-               from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||sourcename||')
-                     ,countingtarget as (select a.'||targetname||' as id,count(*) as cntt
-                    from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||targetname||')
-                   ,totalcount as (select id,case when cnts is null and cntt is null then 0
-                                                   when cnts is null then cntt
-                                                   when cntt is null then cnts
-                                                   else cnts+cntt end as totcnt
-                                   from ('||_pgr_quote_ident(vertname)||' as a left
-                                   join countingsource as t using(id) ) left join countingtarget using(id))
-               update '||_pgr_quote_ident(vertname)||' as a set cnt=totcnt from totalcount as b where a.id=b.id';
-       raise debug '%',query;
-       execute query;
-       query=selectionquery||'
-              SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE cnt=1 and id in (select id from selectedRows)';
-       raise debug '%',query;
-       execute query  INTO numdeadends;
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-          RAISE NOTICE 'ERROR: something went wrong when analizing for dead ends';
-          RETURN 'FAIL';
-   END;
-
-
-
-    BEGIN
-          RAISE NOTICE 'Analyzing for gaps. Please wait...';
-          query = 'with
-                   buffer as (select id,st_buffer(the_geom,'||tolerance||') as buff from '||_pgr_quote_ident(vertname)||' where cnt=1)
-                   ,veryclose as (select b.id,st_crosses(a.'||gname||',b.buff) as flag
-                   from  (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) as a
-                   join buffer as b on (a.'||gname||'&&b.buff)
-                   where '||sourcename||'!=b.id and '||targetname||'!=b.id )
-                   update '||_pgr_quote_ident(vertname)||' set chk=1 where id in (select distinct id from veryclose where flag=true)';
-          raise debug '%' ,query;
-          execute query;
-          GET DIAGNOSTICS  numgaps= ROW_COUNT;
-          raise DEBUG '     --> OK';
-          EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for gaps';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for isolated edges. Please wait...';
-        query=selectionquery|| ' SELECT count(*) FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' )  as a,
-                                                 '||_pgr_quote_ident(vertname)||' as b,
-                                                 '||_pgr_quote_ident(vertname)||' as c
-                            WHERE b.id in (select id from selectedRows) and a.'||sourcename||' =b.id
-                            AND b.cnt=1 AND a.'||targetname||' =c.id
-                            AND c.cnt=1';
-        raise debug '%' ,query;
-        execute query  INTO NumIsolated;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for isolated edges';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for ring geometries. Please wait...';
-        execute 'SELECT geometrytype('||gname||')  FROM '||_pgr_quote_ident(tabname) limit 1 into geotype;
-        IF (geotype='MULTILINESTRING') THEN
-            query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                 WHERE true  '||rows_where||' and st_isRing(st_linemerge('||gname||'))';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        ELSE query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                  WHERE true  '||rows_where||' and st_isRing('||gname||')';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        END IF;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for ring geometries';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for intersections. Please wait...';
-        query = 'select count(*) from (select distinct case when a.'||idname||' < b.'||idname||' then a.'||idname||'
-                                                        else b.'||idname||' end,
-                                                   case when a.'||idname||' < b.'||idname||' then b.'||idname||'
-                                                        else a.'||idname||' end
-                                    FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as a
-                                    JOIN (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as b
-                                    ON (a.'|| gname||' && b.'||gname||')
-                                    WHERE a.'||idname||' != b.'||idname|| '
-                                        and (a.'||sourcename||' in (b.'||sourcename||',b.'||targetname||')
-                                              or a.'||targetname||' in (b.'||sourcename||',b.'||targetname||')) = false
-                                        and st_intersects(a.'||gname||', b.'||gname||')=true) as d ';
-        raise debug '%' ,query;
-        execute query  INTO numCrossing;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for intersections';
-            RETURN 'FAIL';
-    END;
-
-
-
-
-    RAISE NOTICE '            ANALYSIS RESULTS FOR SELECTED EDGES:';
-    RAISE NOTICE '                  Isolated segments: %', NumIsolated;
-    RAISE NOTICE '                          Dead ends: %', numdeadends;
-    RAISE NOTICE 'Potential gaps found near dead ends: %', numgaps;
-    RAISE NOTICE '             Intersections detected: %',numCrossing;
-    RAISE NOTICE '                    Ring geometries: %',numRings;
-
-
-    RETURN 'OK';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_analyzeGraph(text,double precision,text,text,text,text,text) IS 'args: edge_table, tolerance,the_geom:=''the_geom'',id:=''id'',source column:=''source'', target column:=''target'' rows_where:=''true'' - creates a vertices table based on the geometry for selected rows';
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzeOneway(
-   edge_table text,
-   s_in_rules TEXT[],
-   s_out_rules TEXT[],
-   t_in_rules TEXT[],
-   t_out_rules TEXT[],
-   two_way_if_null boolean default true,
-   oneway text default 'oneway',
-   source text default 'source',
-   target text default 'target')
-  RETURNS text AS
-$BODY$
-
-
-DECLARE
-    rule text;
-    ecnt integer;
-    instr text;
-    naming record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    owname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    vertname text;
-    debuglevel text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeOneway(''%'',''%'',''%'',''%'',''%'',''%'',''%'',''%'',%)',
-		edge_table, s_in_rules , s_out_rules, t_in_rules, t_out_rules, oneway, source ,target,two_way_if_null ;
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    raise DEBUG '     --> OK';
-    EXCEPTION WHEN raise_exception THEN
-      RAISE NOTICE 'ERROR: something went wrong checking the table name';
-      RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","ein","eout"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET eout=0 ,ein=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into owname from _pgr_getColumnName(sname, tname,oneway,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,owname) or  targetname=owname, 2,
-                       '_pgr_createToplogy',  'Two columns share the same name', 'Parameter names for oneway,source and target  must be different',
-                       'Column names are OK');
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-
-
-    RAISE NOTICE 'Analyzing graph for one way street errors.';
-
-    rule := CASE WHEN two_way_if_null
-            THEN owname || ' IS NULL OR '
-            ELSE '' END;
-
-    instr := '''' || array_to_string(s_in_rules, ''',''') || '''';
-       EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-      from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-     where a.id=b.'|| sourcename;
-
-    RAISE NOTICE 'Analysis 25%% complete ...';
-
-    instr := '''' || array_to_string(t_in_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 50%% complete ...';
-
-    instr := '''' || array_to_string(s_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-        where a.id=b.'|| sourcename;
-    RAISE NOTICE 'Analysis 75%% complete ...';
-
-    instr := '''' || array_to_string(t_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 100%% complete ...';
-
-    EXECUTE 'SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE ein=0 or eout=0' INTO ecnt;
-
-    RAISE NOTICE 'Found % potential problems in directionality' ,ecnt;
-
-    RETURN 'OK';
-
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_analyzeOneway(text,TEXT[],TEXT[], TEXT[],TEXT[],boolean,text,text,text)
-IS 'args:edge_table , s_in_rules , s_out_rules, t_in_rules , t_out_rules, two_way_if_null:= true, oneway:=''oneway'',source:= ''source'',target:=''target'' - Analizes the directionality of the edges based on the rules';
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createverticestable(
-   edge_table text,
-   the_geom text DEFAULT 'the_geom'::text,
-   source text DEFAULT 'source'::text,
-   target text DEFAULT 'target'::text,
-    rows_where text DEFAULT 'true'::text
-)
-  RETURNS text AS
-$BODY$
-DECLARE
-    naming record;
-    sridinfo record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    sourcename text;
-    targetname text;
-    query text;
-    ecnt bigint;
-    srid integer;
-    sourcetype text;
-    targettype text;
-    sql text;
-    totcount integer;
-    i integer;
-    notincluded integer;
-    included integer;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-
-
-BEGIN
-  fnName = 'pgr_createVerticesTable';
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_createVerticesTable(''%'',''%'',''%'',''%'',''%'')',edge_table,the_geom,source,target,rows_where;
-  execute 'show client_min_messages' into debuglevel;
-
-  raise notice 'Performing checks, please wait .....';
-
-  RAISE DEBUG 'Checking % exists',edge_table;
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-  raise debug '--> Edge table exists: OK';
-
-  raise debug 'Checking column names';
-    select * into sourcename from _pgr_getColumnName(sname, tname,source,2, fnName);
-    select * into targetname from _pgr_getColumnName(sname, tname,target,2, fnName);
-    select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2, fnName);
-
-
-    err = sourcename in (targetname,gname) or  targetname=gname;
-    perform _pgr_onError(err, 2, fnName,
-        'Two columns share the same name', 'Parameter names for the_geom,source and target  must be different');
-  raise debug '--> Column names: OK';
-
-  raise debug 'Checking column types in edge table';
-    select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-    select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-
-
-    err = sourcetype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column source: '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-    err = targettype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column target: '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found');
-
-  raise debug '-->Column types:OK';
-
-  raise debug 'Checking SRID of geometry column';
-     query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-        || ' FROM ' || _pgr_quote_ident(tabname)
-        || ' WHERE ' || quote_ident(gname)
-        || ' IS NOT NULL LIMIT 1';
-     raise debug '%',query;
-     EXECUTE query INTO sridinfo;
-
-     err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-     perform _pgr_onError(err, 2, fnName,
-         'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-     srid := sridinfo.srid;
-  raise DEBUG '     --> OK';
-
-  raise debug 'Checking and creating Indices';
-     perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-  raise DEBUG '-->Check and create indices: OK';
-
-     gname=quote_ident(gname);
-     sourcename=quote_ident(sourcename);
-     targetname=quote_ident(targetname);
-
-
-  BEGIN
-  raise debug 'Checking Condition';
-    -- issue #193 & issue #210 & #213
-    -- this sql is for trying out the where clause
-    -- the select * is to avoid any column name conflicts
-    -- limit 1, just try on first record
-    -- if the where clasuse is ill formed it will be caught in the exception
-    sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-    EXECUTE sql into dummyRec;
-    -- end
-
-    -- if above where clasue works this one should work
-    -- any error will be caught by the exception also
-    sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NULL or '||
-		sourcename||' is null or '||targetname||' is null)=true '||rows_where;
-    raise debug '%',sql;
-    EXECUTE SQL  into notincluded;
-    EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-
-
-
-  BEGIN
-     raise DEBUG 'initializing %',vertname;
-       execute 'select * from _pgr_getTableName('||quote_literal(vertname)||',0)' into naming;
-       IF sname=naming.sname  AND vname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-       ELSE
-           set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-       END IF;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-                quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-       execute 'CREATE INDEX '||quote_ident(vname||'_the_geom_idx')||' ON '||_pgr_quote_ident(vertname)||'  USING GIST (the_geom)';
-       execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-       EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Initializing vertex table';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise notice 'Populating %, please wait...',vertname;
-       sql= 'with
-		lines as ((select distinct '||sourcename||' as id, _pgr_startpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-		                  ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||')
-			union (select distinct '||targetname||' as id,_pgr_endpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-			          ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||'))
-		,numberedLines as (select row_number() OVER (ORDER BY id) AS i,* from lines )
-		,maxid as (select id,max(i) as maxi from numberedLines group by id)
-		insert into '||_pgr_quote_ident(vertname)||'(id,the_geom)  (select id,the_geom  from numberedLines join maxid using(id) where i=maxi order by id)';
-       RAISE debug '%',sql;
-       execute sql;
-       GET DIAGNOSTICS totcount = ROW_COUNT;
-
-       sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' a, '||_pgr_quote_ident(vertname)||' b
-            where '||sourcename||'=b.id and '|| targetname||' in (select id from '||_pgr_quote_ident(vertname)||')';
-       RAISE debug '%',sql;
-       execute sql into included;
-
-
-
-       execute 'select max(id) from '||_pgr_quote_ident(vertname) into ecnt;
-       execute 'SELECT setval('||quote_literal(vertname||'_id_seq')||','||coalesce(ecnt,1)||' , false)';
-       raise notice '  ----->   VERTICES TABLE CREATED WITH  % VERTICES', totcount;
-       raise notice '                                       FOR   %  EDGES', included+notincluded;
-       RAISE NOTICE '  Edges with NULL geometry,source or target: %',notincluded;
-       RAISE NOTICE '                            Edges processed: %',included;
-       Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname),_pgr_quote_ident(vertname);
-       raise notice '----------------------------------------------';
-    END;
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_createVerticesTable(text,text,text,text,text)
-IS 'args: edge_table, the_geom:=''the_geom'',source:=''source'', target:=''target'' rows_where:=''true'' - creates a vertices table based on the source and target identifiers for selected rows';
-
-
-CREATE OR REPLACE FUNCTION pgr_nodeNetwork(edge_table text, tolerance double precision,
-			id text default 'id', the_geom text default 'the_geom', table_ending text default 'noded',
-            rows_where text DEFAULT ''::text, outall boolean DEFAULT false) RETURNS text AS
-$BODY$
-DECLARE
-	
-	p_num int := 0;
-	p_ret text := '';
-    pgis_ver_old boolean := _pgr_versionless(postgis_lib_version(), '2.1.0.0');
-    vst_line_substring text;
-    vst_line_locate_point text;
-    intab text;
-    outtab text;
-    n_pkey text;
-    n_geom text;
-    naming record;
-    sname text;
-    tname text;
-    outname text;
-    srid integer;
-    sridinfo record;
-    splits bigint;
-    touched bigint;
-    untouched bigint;
-    geomtype text;
-    debuglevel text;
-    rows_where text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_nodeNetwork(''%'', %, ''%'', ''%'', ''%'', ''%'',  %)',
-    edge_table, tolerance, id,  the_geom, table_ending, rows_where, outall;
-  raise notice 'Performing checks, please wait .....';
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',0)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-	RAISE NOTICE '-------> % not found',edge_table;
-        RETURN 'FAIL';
-    ELSE
-	RAISE DEBUG '  -----> OK';
-    END IF;
-
-    intab=sname||'.'||tname;
-    outname=tname||'_'||table_ending;
-    outtab= sname||'.'||outname;
-    rows_where = CASE WHEN length(rows_where) > 2 and not outall THEN ' AND (' || rows_where || ')' ELSE '' END;
-    rows_where = CASE WHEN length(rows_where) > 2 THEN ' WHERE (' || rows_where || ')' ELSE '' END;
-  END;
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',id,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(id)||')' INTO n_pkey;
-       IF n_pkey is NULL then
-          raise notice  'ERROR: id column "%"  not found in %',id,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',the_geom,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(the_geom)||')' INTO n_geom;
-       IF n_geom is NULL then
-          raise notice  'ERROR: the_geom  column "%"  not found in %',the_geom,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-  IF n_pkey=n_geom THEN
-	raise notice  'ERROR: id and the_geom columns have the same name "%" in %',n_pkey,intab;
-        RETURN 'FAIL';
-  END IF;
-
-  BEGIN
-       	raise DEBUG 'Checking the SRID of the geometry "%"', n_geom;
-       	EXECUTE 'SELECT ST_SRID(' || quote_ident(n_geom) || ') as srid '
-          		|| ' FROM ' || _pgr_quote_ident(intab)
-          		|| ' WHERE ' || quote_ident(n_geom)
-          		|| ' IS NOT NULL LIMIT 1' INTO sridinfo;
-       	IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-        	RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           	RETURN 'FAIL';
-       	END IF;
-       	srid := sridinfo.srid;
-       	raise DEBUG '  -----> SRID found %',srid;
-       	EXCEPTION WHEN OTHERS THEN
-           		RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           		RETURN 'FAIL';
-  END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_pkey,intab;
-      if (_pgr_isColumnIndexed(intab,n_pkey)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding  index "%_%_idx".',n_pkey,intab;
-
-	set client_min_messages  to warning;
-        execute 'create  index '||tname||'_'||n_pkey||'_idx on '||_pgr_quote_ident(intab)||' using btree('||quote_ident(n_pkey)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_geom,intab;
-      if (_pgr_iscolumnindexed(intab,n_geom)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding unique index "%_%_gidx".',intab,n_geom;
-	set client_min_messages  to warning;
-        execute 'CREATE INDEX '
-            || quote_ident(tname || '_' || n_geom || '_gidx' )
-            || ' ON ' || _pgr_quote_ident(intab)
-            || ' USING gist (' || quote_ident(n_geom) || ')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
----------------
-    BEGIN
-       raise DEBUG 'initializing %',outtab;
-       execute 'select * from _pgr_getTableName('||quote_literal(outtab)||',0)' into naming;
-       IF sname=naming.sname  AND outname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(outtab)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(outname)||','||quote_literal(n_geom)||')';
-       ELSE
-	   set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(outtab)||' (id bigserial PRIMARY KEY,old_id integer,sub_id integer,
-								source bigint,target bigint)';
-       END IF;
-       execute 'select geometrytype('||quote_ident(n_geom)||') from  '||_pgr_quote_ident(intab)||' limit 1' into geomtype;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(outname)||','||
-                quote_literal(n_geom)||','|| srid||', '||quote_literal(geomtype)||', 2)';
-       execute 'CREATE INDEX '||quote_ident(outname||'_'||n_geom||'_idx')||' ON '||_pgr_quote_ident(outtab)||'  USING GIST ('||quote_ident(n_geom)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-    END;
-----------------
-
-
-  raise notice 'Processing, please wait .....';
-
-
-    if pgis_ver_old then
-        vst_line_substring    := 'st_line_substring';
-        vst_line_locate_point := 'st_line_locate_point';
-    else
-        vst_line_substring    := 'st_linesubstring';
-        vst_line_locate_point := 'st_linelocatepoint';
-    end if;
-
---    -- First creates temp table with intersection points
-    p_ret = 'create temp table intergeom on commit drop as (
-        select l1.' || quote_ident(n_pkey) || ' as l1id,
-               l2.' || quote_ident(n_pkey) || ' as l2id,
-	       l1.' || quote_ident(n_geom) || ' as line,
-	       _pgr_startpoint(l2.' || quote_ident(n_geom) || ') as source,
-	       _pgr_endpoint(l2.' || quote_ident(n_geom) || ') as target,
-               st_intersection(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ') as geom
-        from (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l1
-             join (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l2
-             on (st_dwithin(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ', ' || tolerance || '))'||
-        'where l1.' || quote_ident(n_pkey) || ' <> l2.' || quote_ident(n_pkey)||' and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false  )';
-    raise debug '%',p_ret;
-    EXECUTE p_ret;
-
-    -- second temp table with locus (index of intersection point on the line)
-    -- to avoid updating the previous table
-    -- we keep only intersection points occurring onto the line, not at one of its ends
---    drop table if exists inter_loc;
-
---HAD TO CHANGE THIS QUERY
--- p_ret= 'create temp table inter_loc on commit drop as (
---        select l1id, l2id, ' || vst_line_locate_point || '(line,point) as locus from (
---        select DISTINCT l1id, l2id, line, (ST_DumpPoints(geom)).geom as point from intergeom) as foo
---        where ' || vst_line_locate_point || '(line,point)<>0 and ' || vst_line_locate_point || '(line,point)<>1)';
-    p_ret= 'create temp table inter_loc on commit drop as ( select * from (
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,source) as locus from intergeom)
-         union
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,target) as locus from intergeom)) as foo
-        where locus<>0 and locus<>1)';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-
-    -- index on l1id
-    create index inter_loc_id_idx on inter_loc(l1id);
-
-    -- Then computes the intersection on the lines subset, which is much smaller than full set
-    -- as there are very few intersection points
-
---- outab needs to be formally created with id, old_id, subid,the_geom, source,target
----  so it can be inmediatly be used with createTopology
-
---   EXECUTE 'drop table if exists ' || _pgr_quote_ident(outtab);
---   EXECUTE 'create table ' || _pgr_quote_ident(outtab) || ' as
-     P_RET = 'insert into '||_pgr_quote_ident(outtab)||' (old_id,sub_id,'||quote_ident(n_geom)||') (  with cut_locations as (
-           select l1id as lid, locus
-           from inter_loc
-           -- then generates start and end locus for each line that have to be cut buy a location point
-           UNION ALL
-           select i.l1id  as lid, 0 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           UNION ALL
-           select i.l1id  as lid, 1 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           order by lid, locus
-       ),
-       -- we generate a row_number index column for each input line
-       -- to be able to self-join the table to cut a line between two consecutive locations
-       loc_with_idx as (
-           select lid, locus, row_number() over (partition by lid order by locus) as idx
-           from cut_locations
-       )
-       -- finally, each original line is cut with consecutive locations using linear referencing functions
-       select l.' || quote_ident(n_pkey) || ', loc1.idx as sub_id, ' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus) as ' || quote_ident(n_geom) || '
-       from loc_with_idx loc1 join loc_with_idx loc2 using (lid) join ' || _pgr_quote_ident(intab) || ' l on (l.' || quote_ident(n_pkey) || ' = loc1.lid)
-       where loc2.idx = loc1.idx+1
-           -- keeps only linestring geometries
-           and geometryType(' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus)) = ''LINESTRING'') ';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-	GET DIAGNOSTICS splits = ROW_COUNT;
-        execute 'with diff as (select distinct old_id from '||_pgr_quote_ident(outtab)||' )
-                 select count(*) from diff' into touched;
-	-- here, it misses all original line that did not need to be cut by intersection points: these lines
-	-- are already clean
-	-- inserts them in the final result: all lines which gid is not in the res table.
-	EXECUTE 'insert into ' || _pgr_quote_ident(outtab) || ' (old_id , sub_id, ' || quote_ident(n_geom) || ')
-                ( with used as (select distinct old_id from '|| _pgr_quote_ident(outtab)||')
-		select ' ||  quote_ident(n_pkey) || ', 1 as sub_id, ' ||  quote_ident(n_geom) ||
-		' from '|| _pgr_quote_ident(intab) ||' where  '||quote_ident(n_pkey)||' not in (select * from used)' || rows_where || ')';
-	GET DIAGNOSTICS untouched = ROW_COUNT;
-
-	raise NOTICE '  Split Edges: %', touched;
-	raise NOTICE ' Untouched Edges: %', untouched;
-	raise NOTICE '     Total original Edges: %', touched+untouched;
-        RAISE NOTICE ' Edges generated: %', splits;
-	raise NOTICE ' Untouched Edges: %',untouched;
-	raise NOTICE '       Total New segments: %', splits+untouched;
-        RAISE NOTICE ' New Table: %', outtab;
-        RAISE NOTICE '----------------------------------';
-
-    drop table  if exists intergeom;
-    drop table if exists inter_loc;
-    RETURN 'OK';
-END;
-$BODY$
-    LANGUAGE 'plpgsql' VOLATILE STRICT COST 100;
-
-
-COMMENT ON FUNCTION pgr_nodeNetwork(text, double precision, text, text, text, text, boolean )
- IS  'edge_table, tolerance, id:=''id'', the_geom:=''the_geom'', table_ending:=''noded'' ';
-
-
-CREATE OR REPLACE FUNCTION pgr_labelGraph(
-                edge_table text,
-                id text default 'id',
-                source text default 'source',
-                target text default 'target',
-                subgraph text default 'subgraph',
-                rows_where text default 'true'
-        )
-        RETURNS character varying AS
-$BODY$
-
-DECLARE
-        naming record;
-        schema_name text;
-        table_name text;
-        garbage text;
-        incre integer;
-        table_schema_name text;
-        query text;
-        ecnt integer;
-        sql1 text;
-        rec1 record;
-        sql2 text;
-        rec2 record;
-        rec_count record;
-        rec_single record;
-        graph_id integer;
-        gids int [];
-
-BEGIN
-        raise notice 'Processing:';
-        raise notice 'pgr_brokenGraph(''%'',''%'',''%'',''%'',''%'',''%'')', edge_table,id,source,target,subgraph,rows_where;
-        raise notice 'Performing initial checks, please hold on ...';
-
-        Raise Notice 'Starting - Checking table ...';
-        BEGIN
-                raise debug 'Checking % table existance', edge_table;
-                execute 'select * from pgr_getTableName('|| quote_literal(edge_table) ||')' into naming;
-                schema_name = naming.sname;
-                table_name = naming.tname;
-                table_schema_name = schema_name||'.'||table_name;
-                IF schema_name is null then
-                        raise notice 'no schema';
-                        return 'FAIL';
-                else
-                        if table_name is null then
-                                raise notice 'no table';
-                                return 'FAIL';
-                        end if;
-                end if;
-        END;
-        Raise Notice 'Ending - Checking table';
-
-        Raise Notice 'Starting - Checking columns';
-        BEGIN
-                raise debug 'Checking exitance of necessary columns inside % table', edge_table;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(id) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no id column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(source) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no source column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(target) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no target column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(subgraph) ||')' into naming;
-                if naming.pgr_iscolumnintable = 't' then
-                        raise notice 'subgraph column already in the table';
-                        return 'FAIL';
-                end if;
-        END;
-        Raise Notice 'Ending - Checking columns';
-
-        Raise Notice 'Starting - Checking rows_where condition';
-        BEGIN
-                raise debug 'Checking rows_where condition';
-                query='select count(*) from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where;
-                execute query into ecnt;
-                raise debug '-->Rows where condition: OK';
-                raise debug '    --> OK';
-                EXCEPTION WHEN OTHERS THEN
-                        raise notice 'Got %', SQLERRM;
-                        Raise notice 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-                        Raise notice '%', query;
-                        return 'FAIL';
-        END;
-        Raise Notice 'Ending - Checking rows_where condition';
-
-        garbage := 'garbage001';
-        incre := 1;
-        Raise Notice 'Starting - Checking temporary column';
-        Begin
-                raise debug 'Checking Checking temporary columns existance';
-
-                While True
-                        Loop
-                                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(garbage) ||')' into naming;
-                                If naming.pgr_iscolumnintable = 't' THEN
-                                        incre := incre + 1;
-                                        garbage := 'garbage00'||incre||'';
-                                ELSE
-                                        EXIT;
-                                END IF;
-                        End Loop;
-        End;
-        Raise Notice 'Ending - Checking temporary column';
-
-        Raise Notice 'Starting - Calculating subgraphs';
-        BEGIN
-                --------- Add necessary columns ----------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(subgraph) || ' INTEGER DEFAULT -1';
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(garbage) || ' INTEGER DEFAULT 0';
-                graph_id := 1;
-
-                EXECUTE 'select count(*) as count from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where ||'' into rec_count;
-                if rec_count.count = 0 then
-                        RETURN 'rows_where condition generated 0 rows';
-                end if;
-
-                WHILE TRUE
-                        LOOP
-                                ---------- Assign the very first -1 row graph_id ----------
-                                EXECUTE 'SELECT ' || pgr_quote_ident(id) || ' AS gid FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1 LIMIT 1' INTO rec_single;
-                                EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec_single.gid || '';
-
-                                --------- Search other rows with that particular graph_id -----------
-                                WHILE TRUE
-                                        LOOP
-                                                EXECUTE 'SELECT COUNT(*) FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0' into rec_count;
-                                                ----------- The following if else will check those rows which already have entertained ------------
-                                                IF (rec_count.count > 0) THEN
-                                                        sql1 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0';
-                                                        FOR rec1 IN EXECUTE sql1
-                                                                LOOP
-                                                                        sql2 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| pgr_quote_ident(source) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(source) ||' = '|| rec1.target ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.target ||'';
-                                                                        FOR rec2 IN EXECUTE sql2
-                                                                                LOOP
-                                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec2.gid || '';
-                                                                                END LOOP;
-                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(garbage) || ' = 1 WHERE ' || pgr_quote_ident(id) || ' = ' || rec1.gid || '';
-                                                                END LOOP;
-                                                ELSE
-                                                        EXIT;
-                                                END IF;
-                                        END LOOP;
-
-                                ------ Following is to exit the while loop. 0 means no more -1 id.
-                                EXECUTE 'SELECT COUNT(*) AS count FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1' INTO rec_count;
-                                If (rec_count.count = 0) THEN
-                                        EXIT;
-                                ELSE
-                                        graph_id := graph_id + 1;
-                                END IF;
-                        END LOOP;
-
-                ----------- Drop garbage column ------------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' DROP COLUMN ' || pgr_quote_ident(garbage) ||'';
-                Raise Notice 'Successfully complicated calculating subgraphs';
-        END;
-        Raise Notice 'Ending - Calculating subgraphs';
-
-        RETURN 'OK';
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCostMatrix(
-    edges_sql TEXT,
-    points_sql TEXT,
-    pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_pid, a.end_pid, a.agg_cost
-        FROM _pgr_withPoints($1, $2, $3, $3, $4,  $5, TRUE, TRUE) AS a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
---  DIJKSTRA DMatrix
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2, $2, $3, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
---  BIDIRECTIONAL DIJKSTRA Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_astarCostMatrix(
-    edges_sql TEXT, -- XY edges sql
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2, $2, $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
---  BIDIRECTIONAL ASTAR Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdAstarCostMatrix(
-    edges_sql TEXT,
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_bdAstarCostMatrix(TEXT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCostMatrix';
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_getTableName(IN tab text,OUT sname text,OUT tname text)
-RETURNS RECORD AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getTableName: This function will no longer be soported';
-    select * from _pgr_getTableName(tab, 0, 'pgr_getTableName') into sname,tname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_getColumnName(tab text, col text)
-RETURNS text AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getColumnName: This function will no longer be soported';
-    return _pgr_getColumnName(tab,col, 0, 'pgr_getColumnName');
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    select * from _pgr_getColumnName(tab,col,0, 'pgr_isColumnInTable') into cname;
-    return  cname IS not NULL;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnIndexed(tab text, col text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnIndexed: This function will no longer be soported';
-    return  _pgr_isColumnIndexed(tab,col);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-create or replace function pgr_quote_ident(idname text)
-returns text as
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    return  _pgr_quote_ident(idname);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_versionless(v1 text, v2 text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_versionless: This function will no longer be soported';
-    return  _pgr_versionless(v1,v2);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-create or replace function pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_startPoint: This function will no longer be soported';
-    return  _pgr_startPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_endPoint: This function will no longer be soported';
-    return  _pgr_endPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspJohnson(edges_sql text)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_johnson instead';
-      has_reverse =_pgr_parameter_check('johnson', edges_sql, false);
-      sql = edges_sql;
-      IF (has_reverse) THEN
-           RAISE NOTICE 'reverse_cost column found, removing.';
-           sql = 'SELECT source, target, cost FROM (' || edges_sql || ') a';
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () - 1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_johnson(sql, TRUE);
-  END
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspWarshall(edges_sql text, directed boolean, has_rcost boolean)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_floydWarshall instead';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-      sql := edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         ELSE raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () -1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_floydWarshall(sql, directed);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_astar(edges_sql TEXT, source_id INTEGER, target_id INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated signature pgr_astar(text, integer, integer, boolean, boolean)';
-    has_reverse =_pgr_parameter_check('astar', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost, x1,y1, x2, y2 FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-    FROM pgr_astar(sql, ARRAY[$2], ARRAY[$3], directed);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    sql TEXT,
-    source_vid INTEGER,
-    target_vid INTEGER,
-    directed BOOLEAN,
-    has_reverse_cost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdAstar';
-    has_reverse =_pgr_parameter_check('astar', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdAstar(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(edges_sql TEXT, start_vid INTEGER, end_vid INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdDijkstra';
-    has_reverse =_pgr_parameter_check('dijkstra', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdDijkstra(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstraPath(
-    sql text,
-    source INTEGER,
-    targets INTEGER ARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-    RETURNS SETOF pgr_costResult3 AS
-    $BODY$
-    DECLARE
-    has_reverse BOOLEAN;
-    new_sql TEXT;
-    result pgr_costResult3;
-    tmp pgr_costResult3;
-    sseq INTEGER;
-    i INTEGER;
-    BEGIN
-        RAISE NOTICE 'Deprecated function: Use pgr_dijkstra instead.';
-        has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-        new_sql = sql;
-        IF (array_ndims(targets) != 1) THEN
-            raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-
-        IF (has_reverse != has_rcost) THEN
-            IF (has_reverse) THEN
-                new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-            ELSE
-                raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-                USING ERRCODE = 'XX000';
-            END IF;
-        END IF;
-        SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-        sseq = 0; i = 1;
-        FOR result IN
-            SELECT seq, a.end_vid::INTEGER AS id1, a.node::INTEGER AS i2, a.edge::INTEGER AS id3, cost
-            FROM pgr_dijkstra(new_sql, source, targets, directed) a ORDER BY a.end_vid, seq LOOP
-            WHILE (result.id1 != targets[i]) LOOP
-                tmp.seq = sseq;
-                tmp.id1 = targets[i];
-                IF (targets[i] = source) THEN
-                    tmp.id2 = source;
-                    tmp.cost =0;
-                ELSE
-                    tmp.id2 = 0;
-                    tmp.cost = -1;
-                END IF;
-                tmp.id3 = -1;
-                RETURN next tmp;
-                i = i + 1;
-                sseq = sseq + 1;
-            END LOOP;
-        IF (result.id1 = targets[i] AND result.id3 != -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-        IF (result.id1 = targets[i] AND result.id3 = -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.id2 = source;
-            tmp.cost = 0;
-        ELSE
-            tmp.id2 = 0;
-            tmp.cost = -1;
-        END IF;
-        tmp.id3 = -1;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstracost(
-    sql text,
-    source INTEGER,
-    targets INTEGER array,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-result pgr_costResult;
-tmp pgr_costResult;
-sseq INTEGER;
-i INTEGER;
-BEGIN
-    RAISE NOTICE 'Deprecated function. Use pgr_dijkstraCost instead.';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    new_sql = sql;
-    IF (array_ndims(targets) != 1) THEN
-        raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-        USING ERRCODE = 'XX000';
-    END IF;
-
-
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-    sseq = 0; i = 1;
-    FOR result IN
-        SELECT ((row_number() over()) -1)::INTEGER, a.start_vid::INTEGER, a.end_vid::INTEGER, agg_cost
-        FROM pgr_dijkstraCost(new_sql, source, targets, directed) a ORDER BY end_vid LOOP
-        WHILE (result.id2 != targets[i]) LOOP
-            tmp.seq = sseq;
-            tmp.id1 = source;
-            tmp.id2 = targets[i];
-            IF (targets[i] = source) THEN
-                tmp.cost = 0;
-            ELSE
-                tmp.cost = -1;
-            END IF;
-            RETURN next tmp;
-            i = i + 1;
-            sseq = sseq + 1;
-        END LOOP;
-        IF (result.id2 = targets[i]) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = source;
-        tmp.id2 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.cost = 0;
-        ELSE
-            tmp.cost = -1;
-        END IF;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-create or replace function pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    returns integer as
-$body$
-
-declare
-    rr record;
-    pct float;
-    debuglevel text;
-
-begin
-    -- find the closest edge within tol distance
-    execute 'select * from ' || _pgr_quote_ident(edges) ||
-            ' where st_dwithin(''' || pnt::text ||
-            '''::geometry, the_geom, ' || tol || ') order by st_distance(''' || pnt::text ||
-            '''::geometry, the_geom) asc limit 1' into rr;
-
-    if rr.the_geom is not null then
-        -- deal with MULTILINESTRINGS
-        if geometrytype(rr.the_geom)='MULTILINESTRING' THEN
-            rr.the_geom := ST_GeometryN(rr.the_geom, 1);
-        end if;
-
-        -- project the point onto the linestring
-        execute 'show client_min_messages' into debuglevel;
-        SET client_min_messages='ERROR';
-        pct := st_line_locate_point(rr.the_geom, pnt);
-        execute 'set client_min_messages  to '|| debuglevel;
-
-        -- return the node we are closer to
-        if pct < 0.5 then
-            return rr.source;
-        else
-            return rr.target;
-        end if;
-    else
-        -- return a failure to find an edge within tol distance
-        return -1;
-    end if;
-end;
-$body$
-  language plpgsql volatile
-  cost 5;
-
-
-----------------------------------------------------------------------------
-
-create or replace function pgr_flipedges(ga geometry[])
-    returns geometry[] as
-$body$
-
-declare
-    nn integer;
-    i integer;
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_flipEdges';
-    -- get the count of edges, and return if only one edge
-    nn := array_length(ga, 1);
-    if nn=1 then
-        return ga;
-    end if;
-
-    -- determine if first needs to be flipped
-    g := _pgr_startpoint(ga[1]);
-
-    -- if the start of the first is connected to the second then it needs to be flipped
-    if _pgr_startpoint(ga[2])=g or _pgr_endpoint(ga[2])=g then
-        ga[1] := st_reverse(ga[1]);
-    end if;
-    g := _pgr_endpoint(ga[1]);
-
-    -- now if  the end of the last edge matchs the end of the current edge we need to flip it
-    for i in 2 .. nn loop
-        if _pgr_endpoint(ga[i])=g then
-            ga[i] := st_reverse(ga[i]);
-        end if;
-        -- save the end of this edge into the last end for the next cycle
-        g := _pgr_endpoint(ga[i]);
-    end loop;
-
-    return ga;
-end;
-$body$
-    language plpgsql immutable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_texttopoints(pnts text, srid integer DEFAULT(4326))
-    returns geometry[] as
-$body$
-
-declare
-    a text[];
-    t text;
-    p geometry;
-    g geometry[];
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_textToPoints';
-    -- convert commas to space and split on ';'
-    a := string_to_array(replace(pnts, ',', ' '), ';');
-    -- convert each 'x y' into a point geometry and concattenate into a new array
-    for t in select unnest(a) loop
-        p := st_pointfromtext('POINT(' || t || ')', srid);
-        g := g || p;
-    end loop;
-
-    return g;
-end;
-$body$
-    language plpgsql immutable;
-
------------------------------------------------------------------------
-
-create or replace function pgr_pointstovids(pnts geometry[], edges text, tol float8 DEFAULT(0.01))
-    returns integer[] as
-$body$
-
-declare
-    v integer[];
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_pointsToVids';
-    -- cycle through each point and locate the nearest edge and vertex on that edge
-    for g in select unnest(pnts) loop
-        v := v || pgr_pointtoedgenode(edges, g, tol);
-    end loop;
-
-    return v;
-end;
-$body$
-    language plpgsql stable;
-
-
-create or replace function pgr_pointstodmatrix(pnts geometry[], mode integer default (0), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    r record;
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_pointsToDMatrix';
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    -- create an id for each point in the array and unnest it into a table nodes in the with clause
-    for r in with nodes as (select row_number() over()::integer as id, p from (select unnest(pnts) as p) as foo)
-        -- compute a row of distances
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j,
-                case when mode=0
-                    then st_distance(a.p, b.p)
-                    else st_distance_sphere(a.p, b.p)
-                end as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i loop
-
-        -- you must concat an array[array[]] to make dmatrix[][]
-        -- concat the row of distances to the dmatrix
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-end;
-$body$
-    language plpgsql stable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_vidstodmatrix(IN vids integer[], IN pnts geometry[], IN edges text, tol float8 DEFAULT(0.1), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    i integer;
-    j integer;
-    nn integer;
-    rr record;
-    bbox geometry;
-    t float8[];
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    -- check if the input arrays has any -1 values, maybe this whould be a raise exception
-    if vids @> ARRAY[-1] then
-    raise notice 'Some vids are undefined (-1)!';
-    dmatrix := null;
-    ids := null;
-    return;
-    end if;
-
-    ids := vids;
-
-    -- get the count of nodes
-    nn := array_length(vids,1);
-
-    -- zero out a dummy row
-    for i in 1 .. nn loop
-        t := t || 0.0::float8;
-    end loop;
-
-    -- using the dummy row, zero out the whole matrix
-    for i in 1 .. nn loop
-    dmatrix := dmatrix || ARRAY[t];
-    end loop;
-
-    for i in 1 .. nn-1 loop
-        j := i;
-        -- compute the bbox for the point needed for this row
-        select st_expand(st_collect(pnts[id]), tol) into bbox
-          from (select generate_series as id from generate_series(i, nn)) as foo;
-
-        -- compute kdijkstra() for this row
-        for rr in execute 'select * from pgr_dijkstracost($1, $2, $3, false)'
-                  using 'select id, source, target, cost from ' || edges ||
-                        ' where the_geom && ''' || bbox::text || '''::geometry'::text, vids[i], vids[i+1:nn] loop
-
-            -- TODO need to check that all node were reachable from source
-            -- I think unreachable paths between nodes returns cost=-1.0
-
-            -- populate the matrix with the cost values, remember this is symmetric
-            j := j + 1;
-            -- raise notice 'cost(%,%)=%', i, j, rr.agg_cost;
-            dmatrix[i][j] := rr.agg_cost;
-            dmatrix[j][i] := rr.agg_cost;
-        end loop;
-    end loop;
-
-end;
-$body$
-    language plpgsql stable cost 200;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_vidsToDMatrix(sql TEXT, vids  INTEGER[], dir BOOLEAN, has_rcost BOOLEAN, want_symmetric BOOLEAN)
-RETURNS float8[] AS
-$BODY$
-DECLARE
-directed BOOLEAN;
-has_reverse BOOLEAN;
-edges_sql TEXT;
-dmatrix_row float8[];
-dmatrix float8[];
-cell RECORD;
-unique_vids INTEGER[];
-total BIGINT;
-from_v BIGINT;
-to_v BIGINT;
-BEGIN
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql = sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    unique_vids :=  ARRAY(SELECT DISTINCT UNNEST(vids) ORDER BY 1);
-
-    IF want_symmetric THEN
-        directed = false;
-    ELSE
-        directed = dir;
-    END IF;
-
-    total := array_length(unique_vids, 1);
-
-    -- initializing dmatrix
-    FOR i in 1 .. total LOOP
-        dmatrix_row := dmatrix_row || '+Infinity'::float8;
-    END LOOP;
-    FOR i in 1 .. total LOOP
-    dmatrix := dmatrix || ARRAY[dmatrix_row];
-    dmatrix[i][i] = 0;
-    END LOOP;
-
-    CREATE TEMP TABLE __x___y____temp AS
-        WITH result AS
-            (SELECT unnest(unique_vids) AS vid)
-        SELECT row_number() OVER() AS idx, vid FROM result;
-
-    FOR cell IN SELECT * FROM pgr_dijkstraCostMatrix(sql, unique_vids, directed) LOOP
-        SELECT idx INTO from_v FROM __x___y____temp WHERE vid =  cell.start_vid;
-        SELECT idx INTO to_v FROM __x___y____temp WHERE vid =  cell.end_vid;
-
-        dmatrix[from_v][to_v] = cell.agg_cost;
-        dmatrix[to_v][from_v] = cell.agg_cost;
-    END LOOP;
-
-    DROP TABLE IF EXISTS __x___y____temp;
-    RETURN dmatrix;
-
-    EXCEPTION WHEN others THEN
-       DROP TABLE IF EXISTS __x___y____temp;
-       raise exception '% %', SQLERRM, SQLSTATE;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated function';
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_dijkstra(sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_dijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN) IS 'pgr_dijkstra(Deprecated signature)';
-
-
-
-
-
--- OLD SIGNATURE
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(edges_sql text, source BIGINT, distance FLOAT, directed BOOLEAN, has_rcost BOOLEAN)
-  RETURNS SETOF pgr_costresult AS
-  $BODY$
-  DECLARE
-  has_reverse BOOLEAN;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function';
-
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, FALSE);
-
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-             -- the user says it doesn't have reverse cost but its false
-             -- removing from query
-             RAISE NOTICE 'Contradiction found: has_rcost set to false but reverse_cost column found';
-             sql = 'SELECT id, source, target, cost, -1 as reverse_cost FROM (' || edges_sql || ') __q ';
-         ELSE
-             -- the user says it has reverse cost but its false
-             -- can't do anything
-             RAISE EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query SELECT seq - 1 AS seq, node::integer AS id1, edge::integer AS id2, agg_cost AS cost
-                FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maximumcardinalitymatching(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---INTERNAL FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
-------------------------
--- deprecated signatures
------------------------
-
-COMMENT ON FUNCTION pgr_astar(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_astar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdAstar( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdAstar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdDijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdDijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_dijkstra(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_dijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_drivingDistance(text,  BIGINT,  FLOAT8,  BOOLEAN,  BOOLEAN)
-    IS 'pgr_drivingDistance(Deprecated signature)';
-
-------------------------
--- Renamed /deprecated
------------------------
-COMMENT ON FUNCTION pgr_apspJohnson(TEXT)
-    IS 'pgr_apspJohnson(Renamed function) use pgr_Johnson instead';
-
-COMMENT ON FUNCTION pgr_apspWarshall(text, boolean, boolean)
-    IS 'pgr_apspWarshall(Renamed function) use pgr_floydWarshall instead';
-
-COMMENT ON FUNCTION pgr_kdijkstraPath( text, INTEGER, INTEGER ARRAY, BOOLEAN, BOOLEAN)
-    IS 'pgr_kdijkstraPath(Renamed function) use pgr_dijkstra instead';
-
-COMMENT ON FUNCTION pgr_kdijkstracost( text, INTEGER, INTEGER array, BOOLEAN, BOOLEAN)
-    IS 'pgr_kDijkstraCost(Renamed function) use pgr_dijkstraCost instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-
-
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-
-
-COMMENT ON FUNCTION pgr_gsoc_vrppdtw( text, INTEGER, INTEGER)
-    IS 'pgr_gsoc_vrppdtw(Renamed function) use pgr_pickDeliverEuclidean instead';
-
-------------------------
--- Deprecated functions
------------------------
-
-COMMENT ON FUNCTION pgr_flipedges(geometry[])
-    IS 'pgr_flipedges(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_texttopoints(text,  integer)
-    IS 'pgr_texttopoints(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstovids(pnts geometry[], edges text, tol float8)
-    IS 'pgr_pointstovids(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    IS 'pgr_pointtoedgenode(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstodmatrix(geometry[], integer)
-    IS 'pgr_pointstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidstodmatrix( integer[],  geometry[],  text, float8)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidsToDMatrix(TEXT,  INTEGER[], BOOLEAN, BOOLEAN, BOOLEAN)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-
-
-
-COMMENT ON FUNCTION pgr_getTableName(IN tab text)
-    IS 'pgr_getTableName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_getColumnName(tab text, col text)
-    IS 'pgr_getColumnName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnInTable(tab text, col text)
-    IS 'pgr_isColumnInTable(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnIndexed(tab text, col text)
-    IS 'pgr_isColumnIndexed(Deprecated function)';
-
-
-COMMENT ON FUNCTION pgr_quote_ident(idname text)
-    IS 'pgr_quote_ident(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_versionless(v1 text, v2 text)
-    IS 'pgr_versionless(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_startPoint(g geometry)
-    IS 'pgr_startPoint(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_endPoint(g geometry)
-    IS 'pgr_endPoint(Deprecated function)';
-
-
diff --git a/tools/sql-update-scripts/pgrouting--2.2.0--2.5.2.sql b/tools/sql-update-scripts/pgrouting--2.2.0--2.5.2.sql
deleted file mode 100644
index 0cf05b7..0000000
--- a/tools/sql-update-scripts/pgrouting--2.2.0--2.5.2.sql
+++ /dev/null
@@ -1,6527 +0,0 @@
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- pgRouting extension upgrade from 2.2.0 to 2.5.2
--- generated by tools/build-extension-update-files
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-\echo Use "ALTER extension pgrouting update to '2.5.2'" to load this file. \quit
-
-
--------------------------------------
--- remove functions no longer in the 2.5.2 extension
--------------------------------------
-
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,anyarray,bigint,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,anyarray,bigint,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,bigint,anyarray,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,bigint,anyarray,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,bigint,bigint,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,bigint,bigint,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_drivingdistance(text,bigint,double precision,boolean);
-DROP FUNCTION IF EXISTS _pgr_drivingdistance(text,bigint,double precision,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,anyarray,anyarray,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,anyarray,anyarray,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,anyarray,bigint,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,anyarray,bigint,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,bigint,anyarray,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,bigint,anyarray,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,bigint,bigint,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,bigint,bigint,boolean,character,boolean,boolean);
-
-
-------------------------------------------
---    New functions:  2.0
--- Signature change:  2.4
---       Deprecated:  2.4
-------------------------------------------
--- pgr_bddijkstra
--- 2.2.0: {      sql, source_vid, target_vid, directed, has_reverse_cost}   
--- 2.5.2: {edges_sql,  start_vid,    end_vid, directed, has_rcost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vid","end_vid","directed","has_rcost"}'
-WHERE proname = 'pgr_bddijkstra'
-    AND proargnames = '{"sql","source_vid","target_vid","directed","has_reverse_cost"}';
-
-
-------------------------------------------
---   New function: 2.1
--- (types) change: 2.3
-------------------------------------------
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_gsoc_vrppdtw(text,integer,integer);
-DROP FUNCTION IF EXISTS pgr_gsoc_vrppdtw(text,integer,integer);
-
-
-
-
-------------------------------------------
--- New functions on 2.0
--- Signature change on 2.3
--- Deprecated on 2.4
-------------------------------------------
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_astar(text,integer,integer,boolean,boolean);
-DROP FUNCTION IF EXISTS pgr_astar(text,integer,integer,boolean,boolean);
-
-
-
-
-------------------------------------------
---       New functions:  2.1
---    Signature change:  2.4
-------------------------------------------
--- 2.2.0: {edges_sql,start_v,  distance,directed,seq,node,edge,cost,agg_cost}
--- 2.5.2: {edges_sql,start_vid,distance,directed,seq,node,edge,cost,agg_cost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vid","distance","directed","seq","node","edge","cost","agg_cost"}'
-WHERE proname = 'pgr_drivingdistance'
-    AND proargnames = '{"edges_sql","start_v","distance","directed","seq","node","edge","cost","agg_cost"}';
-
-
-------------------------------------------
---       New functions:  2.1
---    Signature change:  2.4
-------------------------------------------
--- 2.2.0: {sql,      start_v,   distance,directed,equicost,seq,from_v,node,edge,cost,agg_cost}
--- 2.5.2: {edges_sql,start_vids,distance,directed,equicost,seq,from_v,node,edge,cost,agg_cost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vids","distance","directed","equicost","seq","from_v","node","edge","cost","agg_cost"}'
-WHERE proname = 'pgr_drivingdistance'
-    AND proargnames = '{"sql","start_v","distance","directed","equicost","seq","from_v","node","edge","cost","agg_cost"}';
-
-
-
-
-
-
-
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
---- pgRouting provides geospatial routing functionality.
---- http://pgrouting.org
---- copyright
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
----
---- This is free software; you can redistribute and/or modify it:
---- the terms of the GNU General Public Licence. See the COPYING file.
---- the terms of the MIT-X Licence. See the COPYING file.
----
---- The following functions have MIT-X licence:
----     pgr_version()
----     pgr_tsp(matrix float8[][], startpt integer, endpt integer DEFAULT -1, OUT seq integer, OUT id integer)
----     _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
----     pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
----
----
---- All other functions are under GNU General Public Licence.
----
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
--- WARNING: Any change in this file must be evaluated for compatibility.
---          Changes cleanly handled by postgis_upgrade.sql are fine,
---          other changes will require a bump in Major version.
---          Currently only function replaceble by CREATE OR REPLACE
---          are cleanly handled.
---
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
---  pgRouting 2.0 types
-
-
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_version()
-RETURNS TABLE(
-        "version" varchar,
-        tag varchar,
-        hash varchar,
-        branch varchar,
-        boost varchar
-    ) AS
-$BODY$
-    SELECT '2.5.2'::varchar AS version,
-        'v2.5.2'::varchar AS tag,
-        '60585f1f7'::varchar AS hash,
-        'master'::varchar AS branch,
-        '1.54.0'::varchar AS boost;
-$BODY$
-LANGUAGE sql IMMUTABLE;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getTableName(IN tab text, IN reportErrs int default 0, IN fnName text default '_pgr_getTableName', OUT sname text,OUT tname text)
-  RETURNS RECORD AS
-$$
-DECLARE
-        naming record;
-        i integer;
-        query text;
-        sn text; -- schema name
-        tn text; -- table name
-        ttype text; --table type for future use
-        err boolean;
-        debuglevel text;
-        var_types text[] = ARRAY['BASE TABLE', 'VIEW'];
-BEGIN
-
-    execute 'show client_min_messages' into debuglevel;
-
-
-    perform _pgr_msg( 0, fnName, 'Checking table ' || tab || ' exists');
-    --RAISE DEBUG 'Checking % exists',tab;
-
-    i := strpos(tab,'.');
-    IF (i <> 0) THEN
-        sn := split_part(tab, '.',1);
-        tn := split_part(tab, '.',2);
-    ELSE
-        sn := current_schema;
-        tn := tab;
-    END IF;
-
-
-   SELECT schema_name INTO sname
-   FROM information_schema.schemata WHERE schema_name = sn;
-
-    IF sname IS NOT NULL THEN -- found schema (as is)
-       SELECT table_name, table_type INTO tname, ttype
-       FROM information_schema.tables
-       WHERE
-                table_type = ANY(var_types) and
-                table_schema = sname and
-                table_name = tn ;
-        IF tname is NULL THEN
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  = ANY(var_types) and
-                table_schema = sname and
-                table_name = lower(tn) ORDER BY table_name;
-        END IF;
-    END IF;
-    IF sname is NULL or tname is NULL THEN --schema not found or table not found
-        SELECT schema_name INTO sname
-        FROM information_schema.schemata
-        WHERE schema_name = lower(sn) ;
-
-        IF sname IS NOT NULL THEN -- found schema (with lower caps)
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  =  ANY(var_types) and
-                table_schema = sname and
-                table_name= tn ;
-
-           IF tname IS NULL THEN
-                SELECT table_name, table_type INTO tname, ttype
-                FROM information_schema.tables
-                WHERE
-                    table_type  =  ANY(var_types) and
-                    table_schema = sname and
-                    table_name= lower(tn) ;
-           END IF;
-        END IF;
-    END IF;
-   err = (sname IS NULL OR tname IS NULL);
-   perform _pgr_onError(err, reportErrs, fnName, 'Table ' || tab ||' not found',' Check your table name', 'Table '|| tab || ' found');
-
-END;
-$$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(sname text, tname text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(col) into cname;
-
-    IF cname is null  THEN
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(lower(col))  into cname;
-    END if;
-
-    err = cname is null;
-
-    perform _pgr_onError(err, reportErrs, fnName,  'Column '|| col ||' not found', ' Check your column name','Column '|| col || ' found');
-    RETURN cname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(tab text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-
-    select * into cname from _pgr_getColumnName(sname,tname,col,reportErrs, fnName);
-    RETURN cname;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    select * from _pgr_getColumnName(tab,col,0, '_pgr_isColumnInTable') into cname;
-    return cname is not null;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(sname text, tname text, cname text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    pkey text;
-BEGIN
-    SELECT
-          pg_attribute.attname into pkey
-         --  format_type(pg_attribute.atttypid, pg_attribute.atttypmod)
-          FROM pg_index, pg_class, pg_attribute
-          WHERE
-                  pg_class.oid = _pgr_quote_ident(sname||'.'||tname)::regclass AND
-                  indrelid = pg_class.oid AND
-                  pg_attribute.attrelid = pg_class.oid AND
-                  pg_attribute.attnum = any(pg_index.indkey)
-                  AND indisprimary;
-
-    IF pkey=cname then
-          RETURN TRUE;
-    END IF;
-
-    SELECT a.index_name,
-           b.attname,
-           b.attnum,
-           a.indisunique,
-           a.indisprimary
-      INTO rec
-      FROM ( SELECT a.indrelid,
-                    a.indisunique,
-                    a.indisprimary,
-                    c.relname index_name,
-                    unnest(a.indkey) index_num
-               FROM pg_index a,
-                    pg_class b,
-                    pg_class c,
-                    pg_namespace d
-              WHERE b.relname=tname
-                AND b.relnamespace=d.oid
-                AND d.nspname=sname
-                AND b.oid=a.indrelid
-                AND a.indexrelid=c.oid
-           ) a,
-           pg_attribute b
-     WHERE a.indrelid = b.attrelid
-       AND a.index_num = b.attnum
-       AND b.attname = cname
-  ORDER BY a.index_name,
-           a.index_num;
-
-  RETURN FOUND;
-  EXCEPTION WHEN OTHERS THEN
-    perform _pgr_onError( true, reportErrs, fnName,
-    'Error when checking for the postgres system attributes', SQLERR);
-    RETURN FALSE;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(tab text, col text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    sname text;
-    tname text;
-    cname text;
-    pkey text;
-    value boolean;
-BEGIN
-    SELECT * into naming FROM _pgr_getTableName(tab, 0, fnName);
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    SELECT * into cname from _pgr_getColumnName(sname, tname, col, 0, fnName) ;
-    IF cname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    select * into value  from _pgr_isColumnIndexed(sname, tname, cname, reportErrs, fnName);
-    return value;
-END
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-create or replace function _pgr_quote_ident(idname text)
-    returns text as
-$body$
-declare
-    t text[];
-    pgver text;
-
-begin
-    pgver := regexp_replace(version(), E'^PostgreSQL ([^ ]+)[ ,].*$', E'\\1');
-
-    if _pgr_versionless(pgver, '9.2') then
-        select into t array_agg(quote_ident(term)) from
-            (select nullif(unnest, '') as term
-               from unnest(string_to_array(idname, '.'))) as foo;
-    else
-        select into t array_agg(quote_ident(term)) from
-            (select unnest(string_to_array(idname, '.', '')) as term) as foo;
-    end if;
-    return array_to_string(t, '.');
-end;
-$body$
-language plpgsql immutable;
-
-
-CREATE OR REPLACE FUNCTION _pgr_versionless(v1 text, v2 text)
-  RETURNS boolean AS
-$BODY$
-
-
-declare
-    v1a text[];
-    v2a text[];
-    nv1 integer;
-    nv2 integer;
-    ne1 integer;
-    ne2 integer;
-
-begin
-    -- separate components into an array, like:
-    -- '2.1.0-beta3dev'  =>  {2,1,0,beta3dev}
-    v1a := regexp_matches(v1, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-    v2a := regexp_matches(v2, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-
-    -- convert modifiers to numbers for comparison
-    -- we do not delineate between alpha1, alpha2, alpha3, etc
-    ne1 := case when v1a[4] is null or v1a[4]='' then 5
-                when v1a[4] ilike 'rc%' then 4
-                when v1a[4] ilike 'beta%' then 3
-                when v1a[4] ilike 'alpha%' then 2
-                when v1a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    ne2 := case when v2a[4] is null or v2a[4]='' then 5
-                when v2a[4] ilike 'rc%' then 4
-                when v2a[4] ilike 'beta%' then 3
-                when v2a[4] ilike 'alpha%' then 2
-                when v2a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    nv1 := v1a[1]::integer * 10000 +
-           coalesce(v1a[2], '0')::integer * 1000 +
-           coalesce(v1a[3], '0')::integer *  100 + ne1;
-    nv2 := v2a[1]::integer * 10000 +
-           coalesce(v2a[2], '0')::integer * 1000 +
-           coalesce(v2a[3], '0')::integer *  100 + ne2;
-
-    --raise notice 'nv1: %, nv2: %, ne1: %, ne2: %', nv1, nv2, ne1, ne2;
-
-    return nv1 < nv2;
-end;
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-create or replace function _pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_startpoint(st_geometryn(g,1));
-    else
-        return st_startpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function _pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_endpoint(st_geometryn(g,1));
-    else
-        return st_endpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_parameter_check(fn text, sql text, big boolean default false)
-  RETURNS bool AS
-  $BODY$
-
-  DECLARE
-  rec record;
-  rec1 record;
-  has_rcost boolean;
-  safesql text;
-  BEGIN
-    IF (big) THEN
-       RAISE EXCEPTION 'This function is for old style functions';
-    END IF;
-
-    -- checking query is executable
-    BEGIN
-      safesql =  'select * from ('||sql||' ) AS __a__ limit 1';
-      execute safesql into rec;
-      EXCEPTION
-        WHEN OTHERS THEN
-            RAISE EXCEPTION 'Could not execute query please verify syntax of: '
-              USING HINT = sql;
-    END;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('dijkstra','astar') THEN
-        BEGIN
-          execute 'select id,source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: id, source, target, cost';
-        END;
-        execute 'select pg_typeof(id)::text as id_type, pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.id_type in ('integer'::text))
-              AND (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Error, columns ''source'', ''target'' must be of type int4, ''cost'' must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    IF fn IN ('astar') THEN
-        BEGIN
-          execute 'select x1,y1,x2,y2  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: x1,y1, x2,y2';
-        END;
-        execute 'select pg_typeof(x1)::text as x1_type, pg_typeof(y1)::text as y1_type, pg_typeof(x2)::text as x2_type, pg_typeof(y2)::text as y2_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.x1_type = 'double precision'::text)
-              AND (rec.y1_type = 'double precision'::text)
-              AND (rec.x2_type = 'double precision'::text)
-              AND (rec.y2_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Columns: x1, y1, x2, y2 must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('johnson') THEN
-        BEGIN
-          execute 'select source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING HINT = 'Please veryfy the column names: id, source, target, cost',
-                         ERRCODE = 'XX000';
-        END;
-
-        execute 'select pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Support for source,target columns only of type: integer. Support for Cost: double precision'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    -- Checking the data types of the optional reverse_cost";
-    has_rcost := false;
-    IF fn IN ('johnson','dijkstra','astar') THEN
-      BEGIN
-        execute 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||safesql||' ) AS __b__ limit 1 ' into rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-            return has_rcost;
-      END;
-      if (has_rcost) then
-        IF (big) then
-           IF  not (rec1.rev_type in ('bigint'::text, 'integer'::text, 'smallint'::text, 'double precision'::text, 'real'::text)) then
-             RAISE EXCEPTION 'Illegar type in optional parameter reverse_cost.'
-             USING ERRCODE = 'XX000';
-           END IF;
-        ELSE -- Version 2.0.0 is more restrictive
-           IF (rec1.rev_type != 'double precision') then
-             RAISE EXCEPTION 'Illegal type in optional parameter reverse_cost, must be of type float8'
-             USING ERRCODE = 'XX000';
-           END IF;
-        END IF;
-      end if;
-      return true;
-    END IF;
-    -- just for keeps
-    return true;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_onError(
-  IN errCond boolean,  -- true there is an error
-  IN reportErrs int,   -- 0, 1 or 2
-  IN fnName text,      -- function name that generates the error
-  IN msgerr text,      -- error message
-  IN hinto text default 'No hint', -- hint help
-  IN msgok text default 'OK')      -- message if everything is ok
-  RETURNS void AS
-$BODY$
-BEGIN
-  if errCond=true then
-     if reportErrs=0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-     else
-       if reportErrs = 2 then
-         raise notice '----> PGR ERROR in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-         raise raise_exception;
-       else
-         raise notice '----> PGR NOTICE in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-       end if;
-     end if;
-  else
-       raise debug 'PGR ----> %: %',fnName,msgok;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_msg(IN msgKind int, IN fnName text, IN msg text default '---->OK')
-  RETURNS void AS
-$BODY$
-BEGIN
-  if msgKind = 0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msg;
-  else
-       raise notice '----> PGR NOTICE in %: %',fnName,msg;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(sname text, tname text, cname text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    EXECUTE 'select data_type  from information_schema.columns '
-            || 'where table_name = '||quote_literal(tname)
-                 || ' and table_schema=' || quote_literal(sname)
-                 || ' and column_name='||quote_literal(cname)
-       into ctype;
-    err = ctype is null;
-    perform _pgr_onError(err, reportErrs, fnName,
-            'Type of Column '|| cname ||' not found',
-            'Check your column name',
-            'OK: Type of Column '|| cname || ' is ' || ctype);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(tab text, col text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-    select * into cname from _pgr_getColumnName(tab,col,reportErrs, fnName) ;
-    select * into ctype from _pgr_getColumnType(sname,tname,cname,reportErrs, fnName);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_get_statement(o_sql text)
-RETURNS text AS
-$BODY$
-DECLARE
-sql TEXT;
-BEGIN
-    EXECUTE 'SELECT statement FROM pg_prepared_statements WHERE name ='  || quote_literal(o_sql) || ' limit 1 ' INTO sql;
-    IF (sql IS NULL) THEN
-      RETURN   o_sql;
-    ELSE
-      RETURN  regexp_replace(sql, '(.)* as ', '', 'i');
-    END IF;
-END
-$BODY$
-LANGUAGE plpgsql STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_checkVertTab(vertname text, columnsArr  text[],
-    IN reportErrs int default 1, IN fnName text default '_pgr_checkVertTab',
-    OUT sname text,OUT vname text)
-RETURNS record AS
-$BODY$
-DECLARE
-    cname text;
-    colname text;
-    naming record;
-    debuglevel text;
-    err  boolean;
-    msgKind int;
-
-BEGIN
-    msgKind = 0; -- debug_
-    execute 'show client_min_messages' into debuglevel;
-
-    perform _pgr_msg(msgKind, fnName, 'Checking table ' || vertname || ' exists');
-       select * from _pgr_getTableName(vertname, 0, fnName) into naming;
-       sname=naming.sname;
-       vname=naming.tname;
-       err = sname is NULL or vname is NULL;
-    perform _pgr_onError( err, 2, fnName,
-          'Vertex Table: ' || vertname || ' not found',
-          'Please create ' || vertname || ' using  _pgr_createTopology() or pgr_createVerticesTable()',
-          'Vertex Table: ' || vertname || ' found');
-
-
-    perform _pgr_msg(msgKind, fnName, 'Checking columns of ' || vertname);
-      FOREACH cname IN ARRAY columnsArr
-      loop
-         select _pgr_getcolumnName(vertname, cname, 0, fnName) into colname;
-         if colname is null then
-           perform _pgr_msg(msgKind, fnName, 'Adding column ' || cname || ' in ' || vertname);
-           set client_min_messages  to warning;
-                execute 'ALTER TABLE '||_pgr_quote_ident(vertname)||' ADD COLUMN '||cname|| ' integer';
-           execute 'set client_min_messages  to '|| debuglevel;
-           perform _pgr_msg(msgKind, fnName);
-         end if;
-      end loop;
-    perform _pgr_msg(msgKind, fnName, 'Finished checking columns of ' || vertname);
-
-    perform _pgr_createIndex(vertname , 'id' , 'btree', reportErrs, fnName);
- END
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(
-    sname text, tname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    debuglevel text;
-    naming record;
-    tabname text;
-    query text;
-    msgKind int;
-BEGIN
-  msgKind = 0; -- debug_
-
-  execute 'show client_min_messages' into debuglevel;
-  tabname=_pgr_quote_ident(sname||'.'||tname);
-  perform _pgr_msg(msgKind, fnName, 'Checking ' || colname || ' column in ' || tabname || ' is indexed');
-    IF (_pgr_isColumnIndexed(sname,tname,colname, 0, fnName)) then
-       perform _pgr_msg(msgKind, fnName);
-    else
-      if indext = 'gist' then
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using gist('||quote_ident(colname)||')';
-      else
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using btree('||quote_ident(colname)||')';
-      end if;
-      perform _pgr_msg(msgKind, fnName, 'Adding index ' || tabname || '_' ||  colname || '_idx');
-      perform _pgr_msg(msgKind, fnName, ' Using ' ||  query);
-      set client_min_messages  to warning;
-      BEGIN
-        execute query;
-        EXCEPTION WHEN others THEN
-          perform _pgr_onError( true, reportErrs, fnName,
-            'Could not create index on:' || colname, SQLERRM);
-      END;
-      execute 'set client_min_messages  to '|| debuglevel;
-      perform _pgr_msg(msgKind, fnName);
-    END IF;
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(tabname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    naming record;
-    sname text;
-    tname text;
-
-BEGIN
-    select * from _pgr_getTableName(tabname, 2, fnName)  into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    execute _pgr_createIndex(sname, tname, colname, indext, reportErrs, fnName);
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pointToId(
-    point geometry,
-    tolerance double precision,
-    vertname text,
-    srid integer)
-
-  RETURNS bigint AS
-$BODY$
-DECLARE
-    rec record;
-    pid bigint;
-
-BEGIN
-    EXECUTE 'SELECT ST_Distance(
-        the_geom,
-        ST_GeomFromText(ST_AsText('
-                || quote_literal(point::text)
-                || '),'
-            || srid ||')) AS d, id, the_geom
-    FROM '||_pgr_quote_ident(vertname)||'
-    WHERE ST_DWithin(
-        the_geom,
-        ST_GeomFromText(
-            ST_AsText(' || quote_literal(point::text) ||'),
-            ' || srid || '),' || tolerance||')
-    ORDER BY d
-    LIMIT 1' INTO rec ;
-    IF rec.id IS NOT NULL THEN
-        pid := rec.id;
-    ELSE
-        execute 'INSERT INTO '||_pgr_quote_ident(vertname)||' (the_geom) VALUES ('||quote_literal(point::text)||')';
-        pid := lastval();
-END IF;
-
-RETURN pid;
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'many_to_many_dijkstra'
-LANGUAGE c VOLATILE;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer, OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstra(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(Many to Many)';
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraVia(
-    edges_sql TEXT,
-    via_vertices ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    strict BOOLEAN DEFAULT FALSE,
-    U_turn_on_edge BOOLEAN DEFAULT TRUE,
-
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'dijkstraVia'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_johnson(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'johnson'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_floydWarshall(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'floydWarshall'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'astarManyToMany'
-LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, normal:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to Many)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true, normal:=false) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to Many)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid ANYARRAY,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-    equicost BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'many_withPointsDD'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_withPointsDD($1, $2, ARRAY[$3]::BIGINT[], $4, $5, $6, $7, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vids anyarray,
-    distance FLOAT,
-    directed BOOLEAN DEFAULT TRUE,
-    equicost BOOLEAN DEFAULT FALSE,
-    OUT seq integer,
-    OUT from_v  bigint,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'driving_many_to_dist'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vid bigint,
-    distance FLOAT8,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq integer,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer, directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'kshortest_path'
-    LANGUAGE c STABLE STRICT;
-
--- V2 the graph is directed and there are no heap paths
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid integer, end_vid integer, k integer, has_rcost boolean)
-  RETURNS SETOF pgr_costresult3 AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated signature of pgr_ksp';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql::text, false);
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_rcost) THEN
-           -- user says that it has reverse_cost but its not true
-           RAISE EXCEPTION 'has_reverse_cost set to true but reverse_cost not found';
-         ELSE
-           -- user says that it does not have reverse_cost but it does have it
-           -- to ignore we remove reverse_cost from the query
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         END IF;
-      END IF;
-
-      RETURN query SELECT ((row_number() over()) -1)::integer  AS seq,  (path_id - 1)::integer AS id1, node::integer AS id2, edge::integer AS id3, cost
-            FROM _pgr_ksp(sql::text, start_vid, end_vid, k, TRUE, FALSE) WHERE path_id <= k;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer,
-  directed boolean default true, heap_paths boolean default false,
-  --directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  BEGIN
-         RETURN query SELECT *
-                FROM _pgr_ksp(edges_sql::text, start_vid, end_vid, k, directed, heap_paths);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsKSP(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    k INTEGER,
-
-    directed BOOLEAN DEFAULT TRUE,
-    heap_paths BOOLEAN DEFAULT FALSE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER, OUT path_id INTEGER, OUT path_seq INTEGER,
-    OUT node BIGINT, OUT edge BIGINT,
-    OUT cost FLOAT, OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'withPoints_ksp'
-    LANGUAGE c STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_unnest_matrix(matrix float8[][], OUT start_vid integer, OUT end_vid integer, out agg_cost float8)
-RETURNS SETOF record AS
-
-$body$
-DECLARE
-
-m float8[];
-
-BEGIN
-    start_vid = 1;
-    foreach m slice 1 in  ARRAY matrix
-    LOOP
-        end_vid = 1;
-        foreach agg_cost in  ARRAY m
-        LOOP
-            RETURN next;
-            end_vid = end_vid + 1;
-        END LOOP;
-        start_vid = start_vid + 1;
-    END LOOP;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_tsp(
-    matrix float8[][],
-    startpt INTEGER,
-    endpt INTEGER DEFAULT -1,
-    OUT seq INTEGER,
-    OUT id INTEGER)
-RETURNS SETOF record AS
-$body$
-DECLARE
-table_sql TEXT;
-debuglevel TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(float8[][], integer, integer)';
-
-    CREATE TEMP TABLE ___tmp2 ON COMMIT DROP AS SELECT * FROM _pgr_unnest_matrix( matrix );
-
-
-    startpt := startpt + 1;
-    IF endpt = -1 THEN endpt := startpt;
-    END IF;
-
-
-    RETURN QUERY
-    WITH
-    result AS (
-        SELECT * FROM pgr_TSP(
-        $$SELECT * FROM ___tmp2 $$,
-        startpt, endpt,
-
-        tries_per_temperature :=  500 :: INTEGER,
-        max_changes_per_temperature := 30 :: INTEGER,
-        max_consecutive_non_changes := 500 :: INTEGER,
-
-        randomize:=false)
-    )
-    SELECT (row_number() over(ORDER BY result.seq) - 1)::INTEGER AS seq, (result.node - 1)::INTEGER AS id
-
-    FROM result WHERE NOT(result.node = startpt AND result.seq != 1);
-
-    DROP TABLE ___tmp2;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-
-
-CREATE OR  REPLACE FUNCTION pgr_tsp(sql text, start_id INTEGER, end_id INTEGER default (-1))
-returns setof pgr_costResult as
-$body$
-DECLARE
-table_sql TEXT;
-rec RECORD;
-debuglevel TEXT;
-n BIGINT;
-
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(sql, integer, integer)';
-
-    table_sql := 'CREATE TEMP TABLE ___tmp ON COMMIT DROP AS ' || sql ;
-    EXECUTE table_sql;
-
-
-    BEGIN
-        EXECUTE 'SELECT id, x, y FROM ___tmp' INTO rec;
-        EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                USING ERRCODE = 'XX000',
-                HINT = 'Please verify the column names: id, x, y';
-    END;
-
-    EXECUTE
-    'SELECT
-        pg_typeof(id)::text as id_type,
-        pg_typeof(x)::text as x_type,
-        pg_typeof(y)::text as y_type FROM ___tmp' INTO rec;
-
-
-    IF NOT((rec.id_type in ('integer'::text))
-        AND (rec.x_type = 'double precision'::text)
-        AND (rec.y_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION '''id'' must be of type INTEGER, ''x'' ad ''y'' must be of type FLOAT'
-            USING ERRCODE = 'XX000';
-    END IF;
-
-    EXECUTE 'SELECT count(*) AS n FROM (' || sql || ') AS __a__' INTO rec;
-    n = rec.n;
-
-    RETURN query
-        SELECT (seq - 1)::INTEGER AS seq, node::INTEGER AS id1, node::INTEGER AS id2, cost
-        FROM pgr_eucledianTSP(sql, start_id, end_id,
-
-            tries_per_temperature :=  500 * n :: INTEGER,
-            max_changes_per_temperature := 60 * n :: INTEGER,
-            max_consecutive_non_changes := 500 * n :: INTEGER,
-
-            randomize := false) WHERE seq <= n;
-    DROP TABLE ___tmp;
-
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-create or replace function _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
-  as
-$body$
-declare
-    sql text;
-    r record;
-
-begin
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    sql := 'with nodes as (' || sqlin || ')
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j, st_distance(st_makepoint(a.x, a.y), st_makepoint(b.x, b.y)) as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i';
-
-    for r in execute sql loop
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-
-end;
-$body$
-language plpgsql stable cost 10;
-
-
-CREATE OR REPLACE FUNCTION pgr_TSP(
-    matrix_row_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'newTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_eucledianTSP(
-    coordinates_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'eucledianTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_alphashape(sql text, alpha float8 DEFAULT 0, OUT x float8, OUT y float8)
-    RETURNS SETOF record
-    AS '$libdir/libpgrouting-2.5', 'alphashape'
-    LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pointsAsPolygon(query varchar, alpha float8 DEFAULT 0)
-	RETURNS geometry AS
-	$$
-	DECLARE
-		r record;
-		geoms geometry[];
-		vertex_result record;
-		i int;
-		n int;
-		spos int;
-		q text;
-		x float8[];
-		y float8[];
-
-	BEGIN
-		geoms := array[]::geometry[];
-		i := 1;
-
-		FOR vertex_result IN EXECUTE 'SELECT x, y FROM pgr_alphashape('''|| query || ''', ' || alpha || ')'
-		LOOP
-			x[i] = vertex_result.x;
-			y[i] = vertex_result.y;
-			i := i+1;
-		END LOOP;
-
-		n := i;
-		IF n = 1 THEN
-			RAISE NOTICE 'n = 1';
-			RETURN NULL;
-		END IF;
-
-		spos := 1;
-		q := 'SELECT ST_GeometryFromText(''POLYGON((';
-		FOR i IN 1..n LOOP
-			IF x[i] IS NULL AND y[i] IS NULL THEN
-				q := q || ', ' || x[spos] || ' ' || y[spos] || '))'',0) AS geom;';
-				EXECUTE q INTO r;
-				geoms := geoms || array[r.geom];
-				q := '';
-			ELSE
-				IF q = '' THEN
-					spos := i;
-					q := 'SELECT ST_GeometryFromText(''POLYGON((';
-				END IF;
-				IF i = spos THEN
-					q := q || x[spos] || ' ' || y[spos];
-				ELSE
-					q := q || ', ' || x[i] || ' ' || y[i];
-				END IF;
-			END IF;
-		END LOOP;
-
-		RETURN ST_BuildArea(ST_Collect(geoms));
-	END;
-	$$
-	LANGUAGE 'plpgsql' VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'bd_astar'
-LANGUAGE C VOLATILE;
-
-
-
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed:=true, only_cost:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    BOOLEAN,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false);
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to Many)';
-
-
-
--- one to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to Many)';
-
-
--- bdDijkstra MANY TO MANY
-CREATE OR REPLACE FUNCTION _pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bdDijkstra'
-LANGUAGE c VOLATILE;
-
-
-
--- ONE TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- TODO directed BOOLEAN DEFAULT TRUE,  on version 3
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, false) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, true) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_vid integer,
-    target_vid integer,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_vertex'
-LANGUAGE 'c' IMMUTABLE;
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_edge'
-LANGUAGE 'c' IMMUTABLE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || edges_sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        -- no restrictions then its a dijkstra
-        RETURN query SELECT a.seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_dijkstra(new_sql, start_vid, end_vid, directed) a;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, start_vid, end_vid, directed, has_rcost, restrictions_sql);
-    RETURN;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trspViaVertices(
-    edges_sql TEXT,
-    via_vids ANYARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult3 AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            new_sql :=
-               'WITH old_sql AS (' || edges_sql || ')' ||
-                '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        RETURN query SELECT (row_number() over())::INTEGER, path_id:: INTEGER, node::INTEGER,
-            (CASE WHEN edge = -2 THEN -1 ELSE edge END)::INTEGER, cost
-            FROM pgr_dijkstraVia(new_sql, via_vids, directed, strict:=true) WHERE edge != -1;
-        RETURN;
-    END IF;
-
-
-    -- make the call without contradiction from part of the user
-    RETURN query SELECT * FROM _pgr_trspViaVertices(new_sql, via_vids::INTEGER[], directed, has_rcost, restrictions_sql);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-
-    new_sql := sql;
-    IF (has_reverse != has_reverse_cost) THEN  -- user contradiction
-        IF (has_reverse) THEN
-            -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) THEN
-        -- no restrictions then its a with points
-        RETURN query SELECT a.seq-1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_withpoints(new_sql,
-            '(SELECT 1 as pid, ' || source_eid || 'as edge_id, ' || source_pos || '::float8 as fraction)'
-            || ' UNION '
-            || '(SELECT 2, ' || target_eid || ', ' || target_pos || ')' ::TEXT,
-            -1, -2, directed) a;
-        -- WHERE node != -2;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, source_eid, source_pos, target_eid, target_pos, directed, has_reverse_cost, turn_restrict_sql);
-    RETURN;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-create or replace function _pgr_trspViaVertices(sql text, vids integer[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    lrra boolean := false;
-    seq integer := 0;
-    seq2 integer := 0;
-
-begin
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(vids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from _pgr_trsp(sql, vids[i], vids[i+1], directed, has_rcost, turn_restrict_sql) as a loop
-            -- filter out the individual path ends except the last one
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --raise notice 'rr: %', rr;
-            if rr.id3 = -1 then
-                lrr := rr;
-                lrra := true;
-            else
-                seq := seq + 1;
-                rr.seq := seq;
-                return next rr;
-            end if;
-        end loop;
-    end loop;
-
-    if lrra then
-        seq := seq + 1;
-        lrr.seq := seq;
-        return next lrr;
-    end if;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-
-----------------------------------------------------------------------------------------------------------
-
-create or replace function pgr_trspViaEdges(sql text, eids integer[], pcts float8[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    first boolean := true;
-    seq integer := 0;
-    seq2 integer :=0;
-    has_reverse BOOLEAN;
-    point_is_vertex BOOLEAN := false;
-    edges_sql TEXT;
-    f float;
-
-begin
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql := sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (NOT has_rcost) THEN
-            -- user does not want to use reverse cost column
-            edges_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    FOREACH f IN ARRAY pcts LOOP
-        IF f in (0,1) THEN
-           point_is_vertex := true;
-        END IF;
-    END LOOP;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) AND NOT point_is_vertex THEN
-        -- no restrictions then its a _pgr_withPointsVia
-        RETURN query SELECT a.seq::INTEGER, path_id::INTEGER AS id1, node::INTEGER AS id2, edge::INTEGER AS id3, cost
-        FROM _pgr_withPointsVia(edges_sql, eids, pcts, directed) a;
-        RETURN;
-    END IF;
-
-    if array_length(eids, 1) != array_length(pcts, 1) then
-        raise exception 'The length of arrays eids and pcts must be the same!';
-    end if;
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(eids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from pgr_trsp(edges_sql,
-                                  eids[i], pcts[i],
-                                  eids[i+1], pcts[i+1],
-                                  directed,
-                                  has_rcost,
-                                  turn_restrict_sql) as a loop
-            -- combine intermediate via costs when cost is split across
-            -- two parts of a segment because it stops it and
-            -- restarts the next leg also on it
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --
-            -- there are multiple condition we have to deal with
-            -- between the end of one leg and start of the next
-            -- 1. same vertex_id. edge_id=-1; drop record with edge_id=-1
-            -- means: path ends on vertex
-            -- NOTICE:  rr: (19,1,44570022,-1,0)
-            -- NOTICE:  rr: (0,2,44570022,1768045,2.89691196717448)
-            -- 2. vertex_id=-1; sum cost components
-            -- means: path end/starts with the segment
-            -- NOTICE:  rr: (11,2,44569628,1775909,9.32885885148532)
-            -- NOTICE:  rr: (0,3,-1,1775909,0.771386350984395)
-
-            --raise notice 'rr: %', rr;
-            if first then
-                lrr := rr;
-                first := false;
-            else
-                if lrr.id3 = -1 then
-                    lrr := rr;
-                elsif lrr.id3 = rr.id3 then
-                    lrr.cost := lrr.cost + rr.cost;
-                    if rr.id2 = -1 then
-                        rr.id2 := lrr.id2;
-                    end if;
-                else
-                    seq := seq + 1;
-                    lrr.seq := seq;
-                    return next lrr;
-                    lrr := rr;
-                end if;
-            end if;
-        end loop;
-    end loop;
-
-    seq := seq + 1;
-    lrr.seq := seq;
-    return next lrr;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-----------------------------
---    MANY TO MANY
-----------------------------
-
-
-CREATE OR REPLACE FUNCTION _pgr_maxflow(
-    edges_sql TEXT,
-    sources ANYARRAY,
-    targets ANYARRAY,
-    algorithm INTEGER DEFAULT 1,
-    only_flow BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'max_flow_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-
-------------------------------------
--- 3 pgr_edmondsKarp
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 2 boykov_kolmogorov
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 1 pgr_pushRelabel
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT flow
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], algorithm := 1, only_flow := true);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], $3::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, $2::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxCardinalityMatch(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'edge_disjoint_paths_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    bigint,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    IN directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_contractGraph(
-    edges_sql TEXT,
-    contraction_order BIGINT[],
-    max_cycles integer DEFAULT 1,
-    forbidden_vertices BIGINT[] DEFAULT ARRAY[]::BIGINT[],
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT type TEXT,
-    OUT id BIGINT,
-    OUT contracted_vertices BIGINT[],
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost float)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'contractGraph'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliver(
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_cell_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliver'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliverEuclidean (
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliverEuclidean'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_vrpOneDepot(
-    TEXT, -- customers_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_sql
-    INTEGER, -- depot_id
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-orders_sql TEXT;
-trucks_sql TEXT;
-matrix_sql TEXT;
-final_sql TEXT;
-BEGIN
-
-    orders_sql = $$WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    pickups AS (
-        SELECT id, x AS p_x, y AS p_y, open_time AS p_open, close_time AS p_close, service_time AS p_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vrp_orders.id AS id, order_unit AS demand, pickups.id AS p_node_id, p_x, p_y, p_open, p_close, p_service,
-    vrp_orders.id AS d_node_id, x AS d_x, y AS d_y, open_time AS d_open, close_time AS d_close, service_time AS d_service
-    FROM vrp_orders, pickups
-    WHERE vrp_orders.id != $$ || $4;
-
-
-    trucks_sql = $$ WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    vrp_vehicles AS ($$ || $2 || $$ ),
-    starts AS (
-        SELECT id AS start_node_id, x AS start_x, y AS start_y, open_time AS start_open, close_time AS start_close, service_time AS start_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vehicle_id AS id, capacity, starts.* FROM vrp_vehicles, starts;
-    $$;
-
-    final_sql = '
-    SELECT * FROM _pgr_pickDeliver(
-            $$' || orders_sql || '$$,
-            $$' || trucks_sql || '$$,
-            $$' || $3 || '$$,
-            max_cycles := 2,
-            initial_sol := 4 ); ';
-
-    RAISE DEBUG '%', orders_sql;
-    RAISE DEBUG '%', trucks_sql;
-    RAISE DEBUG '%', $3;
-    RAISE DEBUG '%', final_sql;
-
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
------------------------------------------------------------------------
--- Core function for vrp with sigle depot computation
--- See README for description
------------------------------------------------------------------------
---
---
-
-create or replace function pgr_vrpOneDepot(
-	order_sql text,
-	vehicle_sql text,
-	cost_sql text,
-	depot_id integer,
-
-	OUT oid integer,
-	OUT opos integer,
-	OUT vid integer,
-	OUT tarrival integer,
-	OUT tdepart integer)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT order_id::INTEGER, stop_seq::INTEGER, vehicle_id::INTEGER, arrival_time::INTEGER, departure_time::INTEGER
-    FROM _pgr_vrpOneDepot($1, $2,
-       '
-            SELECT src_id AS start_vid, dest_id AS end_vid, traveltime AS agg_cost FROM ('||$3||') AS a
-       ',
-        $4
-    ) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_gsoc_vrppdtw(
-    customers_sql TEXT,
-    max_vehicles INTEGER,
-    capacity FLOAT,
-    speed FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-
-    OUT seq INTEGER,
-    OUT vehicle_id INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT stop_id BIGINT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-    orders_sql TEXT;
-    vehicles_sql TEXT;
-    final_sql TEXT;
-BEGIN
-    orders_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        pickups AS (
-            SELECT id, demand, x as p_x, y as p_y, opentime as p_open, closetime as p_close, servicetime as p_service
-            FROM  customer_data WHERE pindex = 0 AND id != 0
-        ),
-        deliveries AS (
-            SELECT pindex AS id, x as d_x, y as d_y, opentime as d_open, closetime as d_close, servicetime as d_service
-            FROM  customer_data WHERE dindex = 0 AND id != 0
-        )
-        SELECT * FROM pickups JOIN deliveries USING(id) ORDER BY pickups.id
-    $$;
-
-    vehicles_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ )
-        SELECT id, x AS start_x, y AS start_y,
-            opentime AS start_open, closetime AS start_close, $$ ||
-            capacity || $$ AS capacity, $$ || max_vehicles || $$ AS number, $$ || speed || $$ AS speed
-            FROM customer_data WHERE id = 0 LIMIT 1
-        $$;
---  seq | vehicle_id | vehicle_seq | stop_id | travel_time | arrival_time | wait_time | service_time | departure_time
-    final_sql = $$ WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        p_deliver AS (SELECT * FROM _pgr_pickDeliverEuclidean('$$ || orders_sql || $$',  '$$ || vehicles_sql || $$',  1, $$ || max_cycles || $$ )),
-        picks AS (SELECT p_deliver.*, pindex, dindex, id AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 2)),
-        delivers AS (SELECT p_deliver.*, pindex, dindex, dindex AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 3)),
-        depots AS (SELECT p_deliver.*, 0 as pindex, 0 as dindex, 0 AS the_id FROM p_deliver WHERE (stop_type IN (-1,1,6))),
-        the_union AS (SELECT * FROM picks UNION SELECT * FROM delivers UNION SELECT * from depots)
-
-        SELECT (row_number() over(ORDER BY a.seq))::INTEGER, vehicle_seq, a.stop_seq, the_id::BIGINT, a.travel_time, a.arrival_time, a.wait_time, a.service_time, a.departure_time
-        FROM (SELECT * FROM the_union) AS a ORDER BY a.seq
-        $$;
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-CREATE OR REPLACE FUNCTION pgr_gsoc_vrppdtw(
-    sql text,
-    vehicle_num INTEGER,
-    capacity INTEGER
-)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-customers_sql TEXT;
-BEGIN
-    RETURN query
-         SELECT a.seq, vehicle_id::INTEGER AS id1, stop_id::INTEGER AS id2, departure_time AS cost
-        FROM _pgr_gsoc_vrppdtw($1, $2, $3, 1, 30) AS a WHERE vehicle_id NOT IN (-2);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION _pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN,
-    driving_side CHAR,
-    details BOOLEAN,
-
-    only_cost BOOLEAN DEFAULT false, -- gets path
-    normal BOOLEAN DEFAULT true, -- false for many to onu
-
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'withPoints'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], ARRAY[$4]::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], ARRAY[$4]::bigint[], $5, $6, $7, FALSE, FALSE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], $4::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], $4::BIGINT[], $5,  $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION  _pgr_withPointsVia(
-    sql text,
-    via_edges bigint[],
-    fraction float[],
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  has_rcost boolean;
-  sql_new_vertices text := ' ';
-  sql_on_vertex text;
-  v_union text := ' ';
-  dummyrec record;
-  rec1 record;
-  via_vertices int[];
-  sql_safe text;
-  new_edges text;
-  BEGIN
-     BEGIN
-        sql_safe = 'SELECT id, source, target, cost, reverse_cost FROM ('|| sql || ') AS __a';
-
-        EXECUTE 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||sql_safe||' ) AS __b__ limit 1 ' INTO rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-     END;
-
-
-      IF array_length(via_edges, 1) != array_length(fraction, 1) then
-        RAISE EXCEPTION 'The length of via_edges is different of length of via_edges';
-      END IF;
-
-      FOR i IN 1 .. array_length(via_edges, 1)
-      LOOP
-          IF fraction[i] = 0 THEN
-              sql_on_vertex := 'SELECT source FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.source;
-          ELSE IF fraction[i] = 1 THEN
-              sql_on_vertex := 'SELECT target FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.target;
-          ELSE
-              via_vertices[i] = -i;
-              IF has_rcost THEN
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost,
-                              reverse_cost * (1 - ' || fraction[i] || ')  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost,
-                              reverse_cost *  ' || fraction[i] || '  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' where id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               ELSE
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               END IF;
-          END IF;
-          END IF;
-     END LOOP;
-
-     IF sql_new_vertices = ' ' THEN
-         new_edges := sql;
-     ELSE
-         IF has_rcost THEN
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost,
-                         lead(cost) OVER w  - cost AS reverse_cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL),
-                   second_part AS ( SELECT * FROM (SELECT id, lead(source) OVER w  AS source, source as target,
-                         reverse_cost - lead(reverse_cost) OVER w  AS cost,
-                         reverse_cost - lead(reverse_cost) OVER w  AS reverse_cost
-                      FROM  the_union  WHERE target > 0 and reverse_cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY reverse_cost ASC) ) as n2
-                      WHERE source IS NOT NULL),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part)
-                             UNION
-                       (SELECT * FROM second_part) ) _union )
-                  SELECT *  FROM more_union';
-         ELSE
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL ),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part) ) _union )
-                  SELECT *  FROM more_union';
-          END IF;
-      END IF;
-
- -- raise notice '%', new_edges;
-     sql_new_vertices := sql_new_vertices || v_union || ' (' || sql || ')';
-     RETURN query SELECT *
-         FROM pgr_dijkstraVia(new_edges, via_vertices, directed, has_rcost);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_lineGraph(
-    TEXT, -- edges_sql
-    directed BOOLEAN DEFAULT true,
-    OUT seq INTEGER,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost FLOAT,
-    OUT reverse_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'lineGraph'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_connectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'connectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_strongComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'strongComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_biconnectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the edge in the component
-    OUT n_seq INTEGER,          -- nth_seq of the edge in the component
-    OUT edge BIGINT)            -- the number of the edge
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'biconnectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_articulationPoints(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'articulationPoints'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bridges(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT edge BIGINT)            -- the number of the edge 
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bridges'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createtopology(edge_table text, tolerance double precision,
-		   the_geom text default 'the_geom', id text default 'id',
-		   source text default 'source', target text default 'target',rows_where text default 'true',
-		   clean boolean default FALSE)
-RETURNS VARCHAR AS
-$BODY$
-
-DECLARE
-    points record;
-    sridinfo record;
-    source_id bigint;
-    target_id bigint;
-    totcount bigint;
-    rowcount bigint;
-    srid integer;
-    sql text;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    notincluded integer;
-    i integer;
-    naming record;
-    info record;
-    flag boolean;
-    query text;
-    idtype text;
-    gtype text;
-    sourcetype text;
-    targettype text;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-    msgKind int;
-    emptied BOOLEAN;
-
-BEGIN
-    msgKind = 1; -- notice
-    fnName = 'pgr_createTopology';
-    raise notice 'PROCESSING:';
-    raise notice 'pgr_createTopology(''%'', %, ''%'', ''%'', ''%'', ''%'', rows_where := ''%'', clean := %)',edge_table,tolerance,the_geom,id,source,target,rows_where, clean;
-    execute 'show client_min_messages' into debuglevel;
-
-
-    raise notice 'Performing checks, please wait .....';
-
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-        sname=naming.sname;
-        tname=naming.tname;
-        tabname=sname||'.'||tname;
-        vname=tname||'_vertices_pgr';
-        vertname= sname||'.'||vname;
-        rows_where = ' AND ('||rows_where||')';
-      raise DEBUG '     --> OK';
-
-
-      raise debug 'Checking column names in edge table';
-        select * into idname     from _pgr_getColumnName(sname, tname,id,2,fnName);
-        select * into sourcename from _pgr_getColumnName(sname, tname,source,2,fnName);
-        select * into targetname from _pgr_getColumnName(sname, tname,target,2,fnName);
-        select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2,fnName);
-
-
-        err = sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname;
-        perform _pgr_onError( err, 2, fnName,
-               'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-	       'Column names are OK');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking column types in edge table';
-        select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-        select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-        select * into idtype from _pgr_getColumnType(sname,tname,idname,1, fnName);
-
-        err = idtype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column id:'|| idname, ' Expected type of '|| idname || ' is integer,smallint or bigint but '||idtype||' was found');
-
-        err = sourcetype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column source:'|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-        err = targettype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column target:'|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or bigint but '||targettype||' was found');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         raise debug '%',query;
-         EXECUTE query INTO sridinfo;
-
-         err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-         perform _pgr_onError(err, 2, fnName,
-	     'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-
-         srid := sridinfo.srid;
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking and creating indices in edge table';
-        perform _pgr_createIndex(sname, tname , idname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-
-        gname=quote_ident(gname);
-        idname=quote_ident(idname);
-        sourcename=quote_ident(sourcename);
-        targetname=quote_ident(targetname);
-      raise DEBUG '     --> OK';
-
-
-
-
-
-    BEGIN
-        -- issue #193 & issue #210 & #213
-        -- this sql is for trying out the where clause
-        -- the select * is to avoid any column name conflicts
-        -- limit 1, just try on first record
-        -- if the where clasuse is ill formed it will be caught in the exception
-        sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-        EXECUTE sql into dummyRec;
-        -- end
-
-        -- if above where clasue works this one should work
-        -- any error will be caught by the exception also
-        sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NOT NULL AND '||
-	    idname||' IS NOT NULL)=false '||rows_where;
-        EXECUTE SQL  into notincluded;
-
-        if clean then
-            raise debug 'Cleaning previous Topology ';
-               execute 'UPDATE ' || _pgr_quote_ident(tabname) ||
-               ' SET '||sourcename||' = NULL,'||targetname||' = NULL';
-        else
-            raise debug 'Creating topology for edges with non assigned topology';
-            if rows_where=' AND (true)' then
-                rows_where=  ' and ('||quote_ident(sourcename)||' is null or '||quote_ident(targetname)||' is  null)';
-            end if;
-        end if;
-        -- my thoery is that the select Count(*) will never go through here
-        EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-             RAISE NOTICE '%',sql;
-             RETURN 'FAIL';
-    END;
-
-    BEGIN
-         raise DEBUG 'initializing %',vertname;
-         execute 'select * from _pgr_getTableName('||quote_literal(vertname)
-                                                  || ',0,' || quote_literal(fnName) ||' )' into naming;
-         emptied = false;
-         set client_min_messages  to warning;
-         IF sname=naming.sname AND vname=naming.tname  THEN
-            if clean then
-                execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-                execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-                emptied = true;
-            end if;
-         ELSE -- table doesn't exist
-            execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-            emptied = true;
-         END IF;
-         IF (emptied) THEN
-             execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-	         quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-             perform _pgr_createIndex(vertname , 'the_geom'::text , 'gist'::text);
-         END IF;
-         execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id"}''::text[])' into naming;
-         execute 'set client_min_messages  to '|| debuglevel;
-         raise DEBUG  '  ------>OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: something went wrong when initializing the verties table';
-             RETURN 'FAIL';
-    END;
-
-
-
-    raise notice 'Creating Topology, Please wait...';
-        rowcount := 0;
-        FOR points IN EXECUTE 'SELECT ' || idname || '::bigint AS id,'
-            || ' _pgr_StartPoint(' || gname || ') AS source,'
-            || ' _pgr_EndPoint('   || gname || ') AS target'
-            || ' FROM '  || _pgr_quote_ident(tabname)
-            || ' WHERE ' || gname || ' IS NOT NULL AND ' || idname||' IS NOT NULL '||rows_where
-        LOOP
-
-            rowcount := rowcount + 1;
-            IF rowcount % 1000 = 0 THEN
-                RAISE NOTICE '% edges processed', rowcount;
-            END IF;
-
-
-            source_id := _pgr_pointToId(points.source, tolerance,vertname,srid);
-            target_id := _pgr_pointToId(points.target, tolerance,vertname,srid);
-            BEGIN
-                sql := 'UPDATE ' || _pgr_quote_ident(tabname) ||
-                    ' SET '||sourcename||' = '|| source_id::text || ','||targetname||' = ' || target_id::text ||
-                    ' WHERE ' || idname || ' =  ' || points.id::text;
-
-                IF sql IS NULL THEN
-                    RAISE NOTICE 'WARNING: UPDATE % SET source = %, target = % WHERE % = % ', tabname, source_id::text, target_id::text, idname,  points.id::text;
-                ELSE
-                    EXECUTE sql;
-                END IF;
-                EXCEPTION WHEN OTHERS THEN
-                    RAISE NOTICE '%', SQLERRM;
-                    RAISE NOTICE '%',sql;
-                    RETURN 'FAIL';
-            end;
-        END LOOP;
-        raise notice '-------------> TOPOLOGY CREATED FOR  % edges', rowcount;
-        RAISE NOTICE 'Rows with NULL geometry or NULL id: %',notincluded;
-        Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname), _pgr_quote_ident(vertname);
-        raise notice '----------------------------------------------';
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_createTopology(text, double precision,text,text,text,text,text,boolean)
-IS 'args: edge_table,tolerance, the_geom:=''the_geom'',source:=''source'', target:=''target'',rows_where:=''true'' - fills columns source and target in the geometry table and creates a vertices table for selected rows';
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
-RETURNS character varying AS
-$BODY$
-
-DECLARE
-    points record;
-    seg record;
-    naming record;
-    sridinfo record;
-    srid integer;
-    ecnt integer;
-    vertname text;
-    sname text;
-    tname text;
-    vname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    geotype text;
-    gname text;
-    tabName text;
-    flag boolean ;
-    query text;
-    selectionquery text;
-    i integer;
-    tot integer;
-    NumIsolated integer;
-    numdeadends integer;
-    numgaps integer;
-    NumCrossing integer;
-    numRings integer;
-    debuglevel text;
-
-
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeGraph(''%'',%,''%'',''%'',''%'',''%'',''%'')',edge_table,tolerance,the_geom,id,source,target,rows_where;
-  raise notice 'Performing checks, please wait ...';
-  execute 'show client_min_messages' into debuglevel;
-
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-    raise DEBUG '     --> OK';
-
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","cnt","chk"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET cnt=0 ,chk=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into idname     from _pgr_getColumnName(sname, tname,id,2);
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname, 2,
-                       'pgr_analyzeGraph',  'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-                       'Column names are OK');
-
-        raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-   BEGIN
-       raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         EXECUTE QUERY INTO sridinfo;
-
-         perform _pgr_onError( sridinfo IS NULL OR sridinfo.srid IS NULL,2,
-                 'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname,
-                 'SRID of '||gname||' is '||sridinfo.srid);
-
-         IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-             RAISE NOTICE ' Can not determine the srid of the geometry "%" in table %', the_geom,tabname;
-             RETURN 'FAIL';
-         END IF;
-         srid := sridinfo.srid;
-         raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM;--issue 210,211,213
-             RAISE NOTICE 'ERROR: something went wrong when checking for SRID of % in table %', the_geom,tabname;
-             RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-       raise debug 'Checking  indices in edge table';
-       perform _pgr_createIndex(tabname , idname , 'btree');
-       perform _pgr_createIndex(tabname , sourcename , 'btree');
-       perform _pgr_createIndex(tabname , targetname , 'btree');
-       perform _pgr_createIndex(tabname , gname , 'gist');
-
-       gname=quote_ident(gname);
-       sourcename=quote_ident(sourcename);
-       targetname=quote_ident(targetname);
-       idname=quote_ident(idname);
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking indices';
-          RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-        query='select count(*) from '||_pgr_quote_ident(tabname)||' where true  '||rows_where;
-        EXECUTE query into ecnt;
-        raise DEBUG '-->Rows Where condition: OK';
-        raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-            RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-            RAISE NOTICE 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-            RAISE NOTICE '%',query;
-            RETURN 'FAIL';
-    END;
-
-    selectionquery ='with
-           selectedRows as( (select '||sourcename||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||')
-                           union
-                           (select '||targetname||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||'))';
-
-
-
-
-
-   BEGIN
-       RAISE NOTICE 'Analyzing for dead ends. Please wait...';
-       query= 'with countingsource as (select a.'||sourcename||' as id,count(*) as cnts
-               from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||sourcename||')
-                     ,countingtarget as (select a.'||targetname||' as id,count(*) as cntt
-                    from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||targetname||')
-                   ,totalcount as (select id,case when cnts is null and cntt is null then 0
-                                                   when cnts is null then cntt
-                                                   when cntt is null then cnts
-                                                   else cnts+cntt end as totcnt
-                                   from ('||_pgr_quote_ident(vertname)||' as a left
-                                   join countingsource as t using(id) ) left join countingtarget using(id))
-               update '||_pgr_quote_ident(vertname)||' as a set cnt=totcnt from totalcount as b where a.id=b.id';
-       raise debug '%',query;
-       execute query;
-       query=selectionquery||'
-              SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE cnt=1 and id in (select id from selectedRows)';
-       raise debug '%',query;
-       execute query  INTO numdeadends;
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-          RAISE NOTICE 'ERROR: something went wrong when analizing for dead ends';
-          RETURN 'FAIL';
-   END;
-
-
-
-    BEGIN
-          RAISE NOTICE 'Analyzing for gaps. Please wait...';
-          query = 'with
-                   buffer as (select id,st_buffer(the_geom,'||tolerance||') as buff from '||_pgr_quote_ident(vertname)||' where cnt=1)
-                   ,veryclose as (select b.id,st_crosses(a.'||gname||',b.buff) as flag
-                   from  (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) as a
-                   join buffer as b on (a.'||gname||'&&b.buff)
-                   where '||sourcename||'!=b.id and '||targetname||'!=b.id )
-                   update '||_pgr_quote_ident(vertname)||' set chk=1 where id in (select distinct id from veryclose where flag=true)';
-          raise debug '%' ,query;
-          execute query;
-          GET DIAGNOSTICS  numgaps= ROW_COUNT;
-          raise DEBUG '     --> OK';
-          EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for gaps';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for isolated edges. Please wait...';
-        query=selectionquery|| ' SELECT count(*) FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' )  as a,
-                                                 '||_pgr_quote_ident(vertname)||' as b,
-                                                 '||_pgr_quote_ident(vertname)||' as c
-                            WHERE b.id in (select id from selectedRows) and a.'||sourcename||' =b.id
-                            AND b.cnt=1 AND a.'||targetname||' =c.id
-                            AND c.cnt=1';
-        raise debug '%' ,query;
-        execute query  INTO NumIsolated;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for isolated edges';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for ring geometries. Please wait...';
-        execute 'SELECT geometrytype('||gname||')  FROM '||_pgr_quote_ident(tabname) limit 1 into geotype;
-        IF (geotype='MULTILINESTRING') THEN
-            query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                 WHERE true  '||rows_where||' and st_isRing(st_linemerge('||gname||'))';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        ELSE query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                  WHERE true  '||rows_where||' and st_isRing('||gname||')';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        END IF;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for ring geometries';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for intersections. Please wait...';
-        query = 'select count(*) from (select distinct case when a.'||idname||' < b.'||idname||' then a.'||idname||'
-                                                        else b.'||idname||' end,
-                                                   case when a.'||idname||' < b.'||idname||' then b.'||idname||'
-                                                        else a.'||idname||' end
-                                    FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as a
-                                    JOIN (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as b
-                                    ON (a.'|| gname||' && b.'||gname||')
-                                    WHERE a.'||idname||' != b.'||idname|| '
-                                        and (a.'||sourcename||' in (b.'||sourcename||',b.'||targetname||')
-                                              or a.'||targetname||' in (b.'||sourcename||',b.'||targetname||')) = false
-                                        and st_intersects(a.'||gname||', b.'||gname||')=true) as d ';
-        raise debug '%' ,query;
-        execute query  INTO numCrossing;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for intersections';
-            RETURN 'FAIL';
-    END;
-
-
-
-
-    RAISE NOTICE '            ANALYSIS RESULTS FOR SELECTED EDGES:';
-    RAISE NOTICE '                  Isolated segments: %', NumIsolated;
-    RAISE NOTICE '                          Dead ends: %', numdeadends;
-    RAISE NOTICE 'Potential gaps found near dead ends: %', numgaps;
-    RAISE NOTICE '             Intersections detected: %',numCrossing;
-    RAISE NOTICE '                    Ring geometries: %',numRings;
-
-
-    RETURN 'OK';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_analyzeGraph(text,double precision,text,text,text,text,text) IS 'args: edge_table, tolerance,the_geom:=''the_geom'',id:=''id'',source column:=''source'', target column:=''target'' rows_where:=''true'' - creates a vertices table based on the geometry for selected rows';
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzeOneway(
-   edge_table text,
-   s_in_rules TEXT[],
-   s_out_rules TEXT[],
-   t_in_rules TEXT[],
-   t_out_rules TEXT[],
-   two_way_if_null boolean default true,
-   oneway text default 'oneway',
-   source text default 'source',
-   target text default 'target')
-  RETURNS text AS
-$BODY$
-
-
-DECLARE
-    rule text;
-    ecnt integer;
-    instr text;
-    naming record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    owname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    vertname text;
-    debuglevel text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeOneway(''%'',''%'',''%'',''%'',''%'',''%'',''%'',''%'',%)',
-		edge_table, s_in_rules , s_out_rules, t_in_rules, t_out_rules, oneway, source ,target,two_way_if_null ;
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    raise DEBUG '     --> OK';
-    EXCEPTION WHEN raise_exception THEN
-      RAISE NOTICE 'ERROR: something went wrong checking the table name';
-      RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","ein","eout"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET eout=0 ,ein=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into owname from _pgr_getColumnName(sname, tname,oneway,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,owname) or  targetname=owname, 2,
-                       '_pgr_createToplogy',  'Two columns share the same name', 'Parameter names for oneway,source and target  must be different',
-                       'Column names are OK');
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-
-
-    RAISE NOTICE 'Analyzing graph for one way street errors.';
-
-    rule := CASE WHEN two_way_if_null
-            THEN owname || ' IS NULL OR '
-            ELSE '' END;
-
-    instr := '''' || array_to_string(s_in_rules, ''',''') || '''';
-       EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-      from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-     where a.id=b.'|| sourcename;
-
-    RAISE NOTICE 'Analysis 25%% complete ...';
-
-    instr := '''' || array_to_string(t_in_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 50%% complete ...';
-
-    instr := '''' || array_to_string(s_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-        where a.id=b.'|| sourcename;
-    RAISE NOTICE 'Analysis 75%% complete ...';
-
-    instr := '''' || array_to_string(t_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 100%% complete ...';
-
-    EXECUTE 'SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE ein=0 or eout=0' INTO ecnt;
-
-    RAISE NOTICE 'Found % potential problems in directionality' ,ecnt;
-
-    RETURN 'OK';
-
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_analyzeOneway(text,TEXT[],TEXT[], TEXT[],TEXT[],boolean,text,text,text)
-IS 'args:edge_table , s_in_rules , s_out_rules, t_in_rules , t_out_rules, two_way_if_null:= true, oneway:=''oneway'',source:= ''source'',target:=''target'' - Analizes the directionality of the edges based on the rules';
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createverticestable(
-   edge_table text,
-   the_geom text DEFAULT 'the_geom'::text,
-   source text DEFAULT 'source'::text,
-   target text DEFAULT 'target'::text,
-    rows_where text DEFAULT 'true'::text
-)
-  RETURNS text AS
-$BODY$
-DECLARE
-    naming record;
-    sridinfo record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    sourcename text;
-    targetname text;
-    query text;
-    ecnt bigint;
-    srid integer;
-    sourcetype text;
-    targettype text;
-    sql text;
-    totcount integer;
-    i integer;
-    notincluded integer;
-    included integer;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-
-
-BEGIN
-  fnName = 'pgr_createVerticesTable';
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_createVerticesTable(''%'',''%'',''%'',''%'',''%'')',edge_table,the_geom,source,target,rows_where;
-  execute 'show client_min_messages' into debuglevel;
-
-  raise notice 'Performing checks, please wait .....';
-
-  RAISE DEBUG 'Checking % exists',edge_table;
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-  raise debug '--> Edge table exists: OK';
-
-  raise debug 'Checking column names';
-    select * into sourcename from _pgr_getColumnName(sname, tname,source,2, fnName);
-    select * into targetname from _pgr_getColumnName(sname, tname,target,2, fnName);
-    select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2, fnName);
-
-
-    err = sourcename in (targetname,gname) or  targetname=gname;
-    perform _pgr_onError(err, 2, fnName,
-        'Two columns share the same name', 'Parameter names for the_geom,source and target  must be different');
-  raise debug '--> Column names: OK';
-
-  raise debug 'Checking column types in edge table';
-    select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-    select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-
-
-    err = sourcetype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column source: '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-    err = targettype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column target: '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found');
-
-  raise debug '-->Column types:OK';
-
-  raise debug 'Checking SRID of geometry column';
-     query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-        || ' FROM ' || _pgr_quote_ident(tabname)
-        || ' WHERE ' || quote_ident(gname)
-        || ' IS NOT NULL LIMIT 1';
-     raise debug '%',query;
-     EXECUTE query INTO sridinfo;
-
-     err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-     perform _pgr_onError(err, 2, fnName,
-         'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-     srid := sridinfo.srid;
-  raise DEBUG '     --> OK';
-
-  raise debug 'Checking and creating Indices';
-     perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-  raise DEBUG '-->Check and create indices: OK';
-
-     gname=quote_ident(gname);
-     sourcename=quote_ident(sourcename);
-     targetname=quote_ident(targetname);
-
-
-  BEGIN
-  raise debug 'Checking Condition';
-    -- issue #193 & issue #210 & #213
-    -- this sql is for trying out the where clause
-    -- the select * is to avoid any column name conflicts
-    -- limit 1, just try on first record
-    -- if the where clasuse is ill formed it will be caught in the exception
-    sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-    EXECUTE sql into dummyRec;
-    -- end
-
-    -- if above where clasue works this one should work
-    -- any error will be caught by the exception also
-    sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NULL or '||
-		sourcename||' is null or '||targetname||' is null)=true '||rows_where;
-    raise debug '%',sql;
-    EXECUTE SQL  into notincluded;
-    EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-
-
-
-  BEGIN
-     raise DEBUG 'initializing %',vertname;
-       execute 'select * from _pgr_getTableName('||quote_literal(vertname)||',0)' into naming;
-       IF sname=naming.sname  AND vname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-       ELSE
-           set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-       END IF;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-                quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-       execute 'CREATE INDEX '||quote_ident(vname||'_the_geom_idx')||' ON '||_pgr_quote_ident(vertname)||'  USING GIST (the_geom)';
-       execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-       EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Initializing vertex table';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise notice 'Populating %, please wait...',vertname;
-       sql= 'with
-		lines as ((select distinct '||sourcename||' as id, _pgr_startpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-		                  ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||')
-			union (select distinct '||targetname||' as id,_pgr_endpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-			          ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||'))
-		,numberedLines as (select row_number() OVER (ORDER BY id) AS i,* from lines )
-		,maxid as (select id,max(i) as maxi from numberedLines group by id)
-		insert into '||_pgr_quote_ident(vertname)||'(id,the_geom)  (select id,the_geom  from numberedLines join maxid using(id) where i=maxi order by id)';
-       RAISE debug '%',sql;
-       execute sql;
-       GET DIAGNOSTICS totcount = ROW_COUNT;
-
-       sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' a, '||_pgr_quote_ident(vertname)||' b
-            where '||sourcename||'=b.id and '|| targetname||' in (select id from '||_pgr_quote_ident(vertname)||')';
-       RAISE debug '%',sql;
-       execute sql into included;
-
-
-
-       execute 'select max(id) from '||_pgr_quote_ident(vertname) into ecnt;
-       execute 'SELECT setval('||quote_literal(vertname||'_id_seq')||','||coalesce(ecnt,1)||' , false)';
-       raise notice '  ----->   VERTICES TABLE CREATED WITH  % VERTICES', totcount;
-       raise notice '                                       FOR   %  EDGES', included+notincluded;
-       RAISE NOTICE '  Edges with NULL geometry,source or target: %',notincluded;
-       RAISE NOTICE '                            Edges processed: %',included;
-       Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname),_pgr_quote_ident(vertname);
-       raise notice '----------------------------------------------';
-    END;
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_createVerticesTable(text,text,text,text,text)
-IS 'args: edge_table, the_geom:=''the_geom'',source:=''source'', target:=''target'' rows_where:=''true'' - creates a vertices table based on the source and target identifiers for selected rows';
-
-
-CREATE OR REPLACE FUNCTION pgr_nodeNetwork(edge_table text, tolerance double precision,
-			id text default 'id', the_geom text default 'the_geom', table_ending text default 'noded',
-            rows_where text DEFAULT ''::text, outall boolean DEFAULT false) RETURNS text AS
-$BODY$
-DECLARE
-	
-	p_num int := 0;
-	p_ret text := '';
-    pgis_ver_old boolean := _pgr_versionless(postgis_lib_version(), '2.1.0.0');
-    vst_line_substring text;
-    vst_line_locate_point text;
-    intab text;
-    outtab text;
-    n_pkey text;
-    n_geom text;
-    naming record;
-    sname text;
-    tname text;
-    outname text;
-    srid integer;
-    sridinfo record;
-    splits bigint;
-    touched bigint;
-    untouched bigint;
-    geomtype text;
-    debuglevel text;
-    rows_where text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_nodeNetwork(''%'', %, ''%'', ''%'', ''%'', ''%'',  %)',
-    edge_table, tolerance, id,  the_geom, table_ending, rows_where, outall;
-  raise notice 'Performing checks, please wait .....';
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',0)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-	RAISE NOTICE '-------> % not found',edge_table;
-        RETURN 'FAIL';
-    ELSE
-	RAISE DEBUG '  -----> OK';
-    END IF;
-
-    intab=sname||'.'||tname;
-    outname=tname||'_'||table_ending;
-    outtab= sname||'.'||outname;
-    rows_where = CASE WHEN length(rows_where) > 2 and not outall THEN ' AND (' || rows_where || ')' ELSE '' END;
-    rows_where = CASE WHEN length(rows_where) > 2 THEN ' WHERE (' || rows_where || ')' ELSE '' END;
-  END;
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',id,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(id)||')' INTO n_pkey;
-       IF n_pkey is NULL then
-          raise notice  'ERROR: id column "%"  not found in %',id,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',the_geom,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(the_geom)||')' INTO n_geom;
-       IF n_geom is NULL then
-          raise notice  'ERROR: the_geom  column "%"  not found in %',the_geom,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-  IF n_pkey=n_geom THEN
-	raise notice  'ERROR: id and the_geom columns have the same name "%" in %',n_pkey,intab;
-        RETURN 'FAIL';
-  END IF;
-
-  BEGIN
-       	raise DEBUG 'Checking the SRID of the geometry "%"', n_geom;
-       	EXECUTE 'SELECT ST_SRID(' || quote_ident(n_geom) || ') as srid '
-          		|| ' FROM ' || _pgr_quote_ident(intab)
-          		|| ' WHERE ' || quote_ident(n_geom)
-          		|| ' IS NOT NULL LIMIT 1' INTO sridinfo;
-       	IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-        	RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           	RETURN 'FAIL';
-       	END IF;
-       	srid := sridinfo.srid;
-       	raise DEBUG '  -----> SRID found %',srid;
-       	EXCEPTION WHEN OTHERS THEN
-           		RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           		RETURN 'FAIL';
-  END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_pkey,intab;
-      if (_pgr_isColumnIndexed(intab,n_pkey)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding  index "%_%_idx".',n_pkey,intab;
-
-	set client_min_messages  to warning;
-        execute 'create  index '||tname||'_'||n_pkey||'_idx on '||_pgr_quote_ident(intab)||' using btree('||quote_ident(n_pkey)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_geom,intab;
-      if (_pgr_iscolumnindexed(intab,n_geom)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding unique index "%_%_gidx".',intab,n_geom;
-	set client_min_messages  to warning;
-        execute 'CREATE INDEX '
-            || quote_ident(tname || '_' || n_geom || '_gidx' )
-            || ' ON ' || _pgr_quote_ident(intab)
-            || ' USING gist (' || quote_ident(n_geom) || ')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
----------------
-    BEGIN
-       raise DEBUG 'initializing %',outtab;
-       execute 'select * from _pgr_getTableName('||quote_literal(outtab)||',0)' into naming;
-       IF sname=naming.sname  AND outname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(outtab)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(outname)||','||quote_literal(n_geom)||')';
-       ELSE
-	   set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(outtab)||' (id bigserial PRIMARY KEY,old_id integer,sub_id integer,
-								source bigint,target bigint)';
-       END IF;
-       execute 'select geometrytype('||quote_ident(n_geom)||') from  '||_pgr_quote_ident(intab)||' limit 1' into geomtype;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(outname)||','||
-                quote_literal(n_geom)||','|| srid||', '||quote_literal(geomtype)||', 2)';
-       execute 'CREATE INDEX '||quote_ident(outname||'_'||n_geom||'_idx')||' ON '||_pgr_quote_ident(outtab)||'  USING GIST ('||quote_ident(n_geom)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-    END;
-----------------
-
-
-  raise notice 'Processing, please wait .....';
-
-
-    if pgis_ver_old then
-        vst_line_substring    := 'st_line_substring';
-        vst_line_locate_point := 'st_line_locate_point';
-    else
-        vst_line_substring    := 'st_linesubstring';
-        vst_line_locate_point := 'st_linelocatepoint';
-    end if;
-
---    -- First creates temp table with intersection points
-    p_ret = 'create temp table intergeom on commit drop as (
-        select l1.' || quote_ident(n_pkey) || ' as l1id,
-               l2.' || quote_ident(n_pkey) || ' as l2id,
-	       l1.' || quote_ident(n_geom) || ' as line,
-	       _pgr_startpoint(l2.' || quote_ident(n_geom) || ') as source,
-	       _pgr_endpoint(l2.' || quote_ident(n_geom) || ') as target,
-               st_intersection(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ') as geom
-        from (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l1
-             join (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l2
-             on (st_dwithin(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ', ' || tolerance || '))'||
-        'where l1.' || quote_ident(n_pkey) || ' <> l2.' || quote_ident(n_pkey)||' and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false  )';
-    raise debug '%',p_ret;
-    EXECUTE p_ret;
-
-    -- second temp table with locus (index of intersection point on the line)
-    -- to avoid updating the previous table
-    -- we keep only intersection points occurring onto the line, not at one of its ends
---    drop table if exists inter_loc;
-
---HAD TO CHANGE THIS QUERY
--- p_ret= 'create temp table inter_loc on commit drop as (
---        select l1id, l2id, ' || vst_line_locate_point || '(line,point) as locus from (
---        select DISTINCT l1id, l2id, line, (ST_DumpPoints(geom)).geom as point from intergeom) as foo
---        where ' || vst_line_locate_point || '(line,point)<>0 and ' || vst_line_locate_point || '(line,point)<>1)';
-    p_ret= 'create temp table inter_loc on commit drop as ( select * from (
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,source) as locus from intergeom)
-         union
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,target) as locus from intergeom)) as foo
-        where locus<>0 and locus<>1)';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-
-    -- index on l1id
-    create index inter_loc_id_idx on inter_loc(l1id);
-
-    -- Then computes the intersection on the lines subset, which is much smaller than full set
-    -- as there are very few intersection points
-
---- outab needs to be formally created with id, old_id, subid,the_geom, source,target
----  so it can be inmediatly be used with createTopology
-
---   EXECUTE 'drop table if exists ' || _pgr_quote_ident(outtab);
---   EXECUTE 'create table ' || _pgr_quote_ident(outtab) || ' as
-     P_RET = 'insert into '||_pgr_quote_ident(outtab)||' (old_id,sub_id,'||quote_ident(n_geom)||') (  with cut_locations as (
-           select l1id as lid, locus
-           from inter_loc
-           -- then generates start and end locus for each line that have to be cut buy a location point
-           UNION ALL
-           select i.l1id  as lid, 0 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           UNION ALL
-           select i.l1id  as lid, 1 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           order by lid, locus
-       ),
-       -- we generate a row_number index column for each input line
-       -- to be able to self-join the table to cut a line between two consecutive locations
-       loc_with_idx as (
-           select lid, locus, row_number() over (partition by lid order by locus) as idx
-           from cut_locations
-       )
-       -- finally, each original line is cut with consecutive locations using linear referencing functions
-       select l.' || quote_ident(n_pkey) || ', loc1.idx as sub_id, ' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus) as ' || quote_ident(n_geom) || '
-       from loc_with_idx loc1 join loc_with_idx loc2 using (lid) join ' || _pgr_quote_ident(intab) || ' l on (l.' || quote_ident(n_pkey) || ' = loc1.lid)
-       where loc2.idx = loc1.idx+1
-           -- keeps only linestring geometries
-           and geometryType(' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus)) = ''LINESTRING'') ';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-	GET DIAGNOSTICS splits = ROW_COUNT;
-        execute 'with diff as (select distinct old_id from '||_pgr_quote_ident(outtab)||' )
-                 select count(*) from diff' into touched;
-	-- here, it misses all original line that did not need to be cut by intersection points: these lines
-	-- are already clean
-	-- inserts them in the final result: all lines which gid is not in the res table.
-	EXECUTE 'insert into ' || _pgr_quote_ident(outtab) || ' (old_id , sub_id, ' || quote_ident(n_geom) || ')
-                ( with used as (select distinct old_id from '|| _pgr_quote_ident(outtab)||')
-		select ' ||  quote_ident(n_pkey) || ', 1 as sub_id, ' ||  quote_ident(n_geom) ||
-		' from '|| _pgr_quote_ident(intab) ||' where  '||quote_ident(n_pkey)||' not in (select * from used)' || rows_where || ')';
-	GET DIAGNOSTICS untouched = ROW_COUNT;
-
-	raise NOTICE '  Split Edges: %', touched;
-	raise NOTICE ' Untouched Edges: %', untouched;
-	raise NOTICE '     Total original Edges: %', touched+untouched;
-        RAISE NOTICE ' Edges generated: %', splits;
-	raise NOTICE ' Untouched Edges: %',untouched;
-	raise NOTICE '       Total New segments: %', splits+untouched;
-        RAISE NOTICE ' New Table: %', outtab;
-        RAISE NOTICE '----------------------------------';
-
-    drop table  if exists intergeom;
-    drop table if exists inter_loc;
-    RETURN 'OK';
-END;
-$BODY$
-    LANGUAGE 'plpgsql' VOLATILE STRICT COST 100;
-
-
-COMMENT ON FUNCTION pgr_nodeNetwork(text, double precision, text, text, text, text, boolean )
- IS  'edge_table, tolerance, id:=''id'', the_geom:=''the_geom'', table_ending:=''noded'' ';
-
-
-CREATE OR REPLACE FUNCTION pgr_labelGraph(
-                edge_table text,
-                id text default 'id',
-                source text default 'source',
-                target text default 'target',
-                subgraph text default 'subgraph',
-                rows_where text default 'true'
-        )
-        RETURNS character varying AS
-$BODY$
-
-DECLARE
-        naming record;
-        schema_name text;
-        table_name text;
-        garbage text;
-        incre integer;
-        table_schema_name text;
-        query text;
-        ecnt integer;
-        sql1 text;
-        rec1 record;
-        sql2 text;
-        rec2 record;
-        rec_count record;
-        rec_single record;
-        graph_id integer;
-        gids int [];
-
-BEGIN
-        raise notice 'Processing:';
-        raise notice 'pgr_brokenGraph(''%'',''%'',''%'',''%'',''%'',''%'')', edge_table,id,source,target,subgraph,rows_where;
-        raise notice 'Performing initial checks, please hold on ...';
-
-        Raise Notice 'Starting - Checking table ...';
-        BEGIN
-                raise debug 'Checking % table existance', edge_table;
-                execute 'select * from pgr_getTableName('|| quote_literal(edge_table) ||')' into naming;
-                schema_name = naming.sname;
-                table_name = naming.tname;
-                table_schema_name = schema_name||'.'||table_name;
-                IF schema_name is null then
-                        raise notice 'no schema';
-                        return 'FAIL';
-                else
-                        if table_name is null then
-                                raise notice 'no table';
-                                return 'FAIL';
-                        end if;
-                end if;
-        END;
-        Raise Notice 'Ending - Checking table';
-
-        Raise Notice 'Starting - Checking columns';
-        BEGIN
-                raise debug 'Checking exitance of necessary columns inside % table', edge_table;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(id) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no id column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(source) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no source column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(target) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no target column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(subgraph) ||')' into naming;
-                if naming.pgr_iscolumnintable = 't' then
-                        raise notice 'subgraph column already in the table';
-                        return 'FAIL';
-                end if;
-        END;
-        Raise Notice 'Ending - Checking columns';
-
-        Raise Notice 'Starting - Checking rows_where condition';
-        BEGIN
-                raise debug 'Checking rows_where condition';
-                query='select count(*) from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where;
-                execute query into ecnt;
-                raise debug '-->Rows where condition: OK';
-                raise debug '    --> OK';
-                EXCEPTION WHEN OTHERS THEN
-                        raise notice 'Got %', SQLERRM;
-                        Raise notice 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-                        Raise notice '%', query;
-                        return 'FAIL';
-        END;
-        Raise Notice 'Ending - Checking rows_where condition';
-
-        garbage := 'garbage001';
-        incre := 1;
-        Raise Notice 'Starting - Checking temporary column';
-        Begin
-                raise debug 'Checking Checking temporary columns existance';
-
-                While True
-                        Loop
-                                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(garbage) ||')' into naming;
-                                If naming.pgr_iscolumnintable = 't' THEN
-                                        incre := incre + 1;
-                                        garbage := 'garbage00'||incre||'';
-                                ELSE
-                                        EXIT;
-                                END IF;
-                        End Loop;
-        End;
-        Raise Notice 'Ending - Checking temporary column';
-
-        Raise Notice 'Starting - Calculating subgraphs';
-        BEGIN
-                --------- Add necessary columns ----------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(subgraph) || ' INTEGER DEFAULT -1';
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(garbage) || ' INTEGER DEFAULT 0';
-                graph_id := 1;
-
-                EXECUTE 'select count(*) as count from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where ||'' into rec_count;
-                if rec_count.count = 0 then
-                        RETURN 'rows_where condition generated 0 rows';
-                end if;
-
-                WHILE TRUE
-                        LOOP
-                                ---------- Assign the very first -1 row graph_id ----------
-                                EXECUTE 'SELECT ' || pgr_quote_ident(id) || ' AS gid FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1 LIMIT 1' INTO rec_single;
-                                EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec_single.gid || '';
-
-                                --------- Search other rows with that particular graph_id -----------
-                                WHILE TRUE
-                                        LOOP
-                                                EXECUTE 'SELECT COUNT(*) FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0' into rec_count;
-                                                ----------- The following if else will check those rows which already have entertained ------------
-                                                IF (rec_count.count > 0) THEN
-                                                        sql1 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0';
-                                                        FOR rec1 IN EXECUTE sql1
-                                                                LOOP
-                                                                        sql2 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| pgr_quote_ident(source) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(source) ||' = '|| rec1.target ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.target ||'';
-                                                                        FOR rec2 IN EXECUTE sql2
-                                                                                LOOP
-                                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec2.gid || '';
-                                                                                END LOOP;
-                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(garbage) || ' = 1 WHERE ' || pgr_quote_ident(id) || ' = ' || rec1.gid || '';
-                                                                END LOOP;
-                                                ELSE
-                                                        EXIT;
-                                                END IF;
-                                        END LOOP;
-
-                                ------ Following is to exit the while loop. 0 means no more -1 id.
-                                EXECUTE 'SELECT COUNT(*) AS count FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1' INTO rec_count;
-                                If (rec_count.count = 0) THEN
-                                        EXIT;
-                                ELSE
-                                        graph_id := graph_id + 1;
-                                END IF;
-                        END LOOP;
-
-                ----------- Drop garbage column ------------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' DROP COLUMN ' || pgr_quote_ident(garbage) ||'';
-                Raise Notice 'Successfully complicated calculating subgraphs';
-        END;
-        Raise Notice 'Ending - Calculating subgraphs';
-
-        RETURN 'OK';
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCostMatrix(
-    edges_sql TEXT,
-    points_sql TEXT,
-    pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_pid, a.end_pid, a.agg_cost
-        FROM _pgr_withPoints($1, $2, $3, $3, $4,  $5, TRUE, TRUE) AS a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
---  DIJKSTRA DMatrix
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2, $2, $3, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
---  BIDIRECTIONAL DIJKSTRA Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_astarCostMatrix(
-    edges_sql TEXT, -- XY edges sql
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2, $2, $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
---  BIDIRECTIONAL ASTAR Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdAstarCostMatrix(
-    edges_sql TEXT,
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_bdAstarCostMatrix(TEXT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCostMatrix';
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_getTableName(IN tab text,OUT sname text,OUT tname text)
-RETURNS RECORD AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getTableName: This function will no longer be soported';
-    select * from _pgr_getTableName(tab, 0, 'pgr_getTableName') into sname,tname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_getColumnName(tab text, col text)
-RETURNS text AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getColumnName: This function will no longer be soported';
-    return _pgr_getColumnName(tab,col, 0, 'pgr_getColumnName');
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    select * from _pgr_getColumnName(tab,col,0, 'pgr_isColumnInTable') into cname;
-    return  cname IS not NULL;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnIndexed(tab text, col text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnIndexed: This function will no longer be soported';
-    return  _pgr_isColumnIndexed(tab,col);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-create or replace function pgr_quote_ident(idname text)
-returns text as
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    return  _pgr_quote_ident(idname);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_versionless(v1 text, v2 text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_versionless: This function will no longer be soported';
-    return  _pgr_versionless(v1,v2);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-create or replace function pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_startPoint: This function will no longer be soported';
-    return  _pgr_startPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_endPoint: This function will no longer be soported';
-    return  _pgr_endPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspJohnson(edges_sql text)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_johnson instead';
-      has_reverse =_pgr_parameter_check('johnson', edges_sql, false);
-      sql = edges_sql;
-      IF (has_reverse) THEN
-           RAISE NOTICE 'reverse_cost column found, removing.';
-           sql = 'SELECT source, target, cost FROM (' || edges_sql || ') a';
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () - 1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_johnson(sql, TRUE);
-  END
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspWarshall(edges_sql text, directed boolean, has_rcost boolean)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_floydWarshall instead';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-      sql := edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         ELSE raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () -1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_floydWarshall(sql, directed);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_astar(edges_sql TEXT, source_id INTEGER, target_id INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated signature pgr_astar(text, integer, integer, boolean, boolean)';
-    has_reverse =_pgr_parameter_check('astar', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost, x1,y1, x2, y2 FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-    FROM pgr_astar(sql, ARRAY[$2], ARRAY[$3], directed);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    sql TEXT,
-    source_vid INTEGER,
-    target_vid INTEGER,
-    directed BOOLEAN,
-    has_reverse_cost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdAstar';
-    has_reverse =_pgr_parameter_check('astar', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdAstar(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(edges_sql TEXT, start_vid INTEGER, end_vid INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdDijkstra';
-    has_reverse =_pgr_parameter_check('dijkstra', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdDijkstra(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstraPath(
-    sql text,
-    source INTEGER,
-    targets INTEGER ARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-    RETURNS SETOF pgr_costResult3 AS
-    $BODY$
-    DECLARE
-    has_reverse BOOLEAN;
-    new_sql TEXT;
-    result pgr_costResult3;
-    tmp pgr_costResult3;
-    sseq INTEGER;
-    i INTEGER;
-    BEGIN
-        RAISE NOTICE 'Deprecated function: Use pgr_dijkstra instead.';
-        has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-        new_sql = sql;
-        IF (array_ndims(targets) != 1) THEN
-            raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-
-        IF (has_reverse != has_rcost) THEN
-            IF (has_reverse) THEN
-                new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-            ELSE
-                raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-                USING ERRCODE = 'XX000';
-            END IF;
-        END IF;
-        SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-        sseq = 0; i = 1;
-        FOR result IN
-            SELECT seq, a.end_vid::INTEGER AS id1, a.node::INTEGER AS i2, a.edge::INTEGER AS id3, cost
-            FROM pgr_dijkstra(new_sql, source, targets, directed) a ORDER BY a.end_vid, seq LOOP
-            WHILE (result.id1 != targets[i]) LOOP
-                tmp.seq = sseq;
-                tmp.id1 = targets[i];
-                IF (targets[i] = source) THEN
-                    tmp.id2 = source;
-                    tmp.cost =0;
-                ELSE
-                    tmp.id2 = 0;
-                    tmp.cost = -1;
-                END IF;
-                tmp.id3 = -1;
-                RETURN next tmp;
-                i = i + 1;
-                sseq = sseq + 1;
-            END LOOP;
-        IF (result.id1 = targets[i] AND result.id3 != -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-        IF (result.id1 = targets[i] AND result.id3 = -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.id2 = source;
-            tmp.cost = 0;
-        ELSE
-            tmp.id2 = 0;
-            tmp.cost = -1;
-        END IF;
-        tmp.id3 = -1;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstracost(
-    sql text,
-    source INTEGER,
-    targets INTEGER array,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-result pgr_costResult;
-tmp pgr_costResult;
-sseq INTEGER;
-i INTEGER;
-BEGIN
-    RAISE NOTICE 'Deprecated function. Use pgr_dijkstraCost instead.';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    new_sql = sql;
-    IF (array_ndims(targets) != 1) THEN
-        raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-        USING ERRCODE = 'XX000';
-    END IF;
-
-
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-    sseq = 0; i = 1;
-    FOR result IN
-        SELECT ((row_number() over()) -1)::INTEGER, a.start_vid::INTEGER, a.end_vid::INTEGER, agg_cost
-        FROM pgr_dijkstraCost(new_sql, source, targets, directed) a ORDER BY end_vid LOOP
-        WHILE (result.id2 != targets[i]) LOOP
-            tmp.seq = sseq;
-            tmp.id1 = source;
-            tmp.id2 = targets[i];
-            IF (targets[i] = source) THEN
-                tmp.cost = 0;
-            ELSE
-                tmp.cost = -1;
-            END IF;
-            RETURN next tmp;
-            i = i + 1;
-            sseq = sseq + 1;
-        END LOOP;
-        IF (result.id2 = targets[i]) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = source;
-        tmp.id2 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.cost = 0;
-        ELSE
-            tmp.cost = -1;
-        END IF;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-create or replace function pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    returns integer as
-$body$
-
-declare
-    rr record;
-    pct float;
-    debuglevel text;
-
-begin
-    -- find the closest edge within tol distance
-    execute 'select * from ' || _pgr_quote_ident(edges) ||
-            ' where st_dwithin(''' || pnt::text ||
-            '''::geometry, the_geom, ' || tol || ') order by st_distance(''' || pnt::text ||
-            '''::geometry, the_geom) asc limit 1' into rr;
-
-    if rr.the_geom is not null then
-        -- deal with MULTILINESTRINGS
-        if geometrytype(rr.the_geom)='MULTILINESTRING' THEN
-            rr.the_geom := ST_GeometryN(rr.the_geom, 1);
-        end if;
-
-        -- project the point onto the linestring
-        execute 'show client_min_messages' into debuglevel;
-        SET client_min_messages='ERROR';
-        pct := st_line_locate_point(rr.the_geom, pnt);
-        execute 'set client_min_messages  to '|| debuglevel;
-
-        -- return the node we are closer to
-        if pct < 0.5 then
-            return rr.source;
-        else
-            return rr.target;
-        end if;
-    else
-        -- return a failure to find an edge within tol distance
-        return -1;
-    end if;
-end;
-$body$
-  language plpgsql volatile
-  cost 5;
-
-
-----------------------------------------------------------------------------
-
-create or replace function pgr_flipedges(ga geometry[])
-    returns geometry[] as
-$body$
-
-declare
-    nn integer;
-    i integer;
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_flipEdges';
-    -- get the count of edges, and return if only one edge
-    nn := array_length(ga, 1);
-    if nn=1 then
-        return ga;
-    end if;
-
-    -- determine if first needs to be flipped
-    g := _pgr_startpoint(ga[1]);
-
-    -- if the start of the first is connected to the second then it needs to be flipped
-    if _pgr_startpoint(ga[2])=g or _pgr_endpoint(ga[2])=g then
-        ga[1] := st_reverse(ga[1]);
-    end if;
-    g := _pgr_endpoint(ga[1]);
-
-    -- now if  the end of the last edge matchs the end of the current edge we need to flip it
-    for i in 2 .. nn loop
-        if _pgr_endpoint(ga[i])=g then
-            ga[i] := st_reverse(ga[i]);
-        end if;
-        -- save the end of this edge into the last end for the next cycle
-        g := _pgr_endpoint(ga[i]);
-    end loop;
-
-    return ga;
-end;
-$body$
-    language plpgsql immutable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_texttopoints(pnts text, srid integer DEFAULT(4326))
-    returns geometry[] as
-$body$
-
-declare
-    a text[];
-    t text;
-    p geometry;
-    g geometry[];
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_textToPoints';
-    -- convert commas to space and split on ';'
-    a := string_to_array(replace(pnts, ',', ' '), ';');
-    -- convert each 'x y' into a point geometry and concattenate into a new array
-    for t in select unnest(a) loop
-        p := st_pointfromtext('POINT(' || t || ')', srid);
-        g := g || p;
-    end loop;
-
-    return g;
-end;
-$body$
-    language plpgsql immutable;
-
------------------------------------------------------------------------
-
-create or replace function pgr_pointstovids(pnts geometry[], edges text, tol float8 DEFAULT(0.01))
-    returns integer[] as
-$body$
-
-declare
-    v integer[];
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_pointsToVids';
-    -- cycle through each point and locate the nearest edge and vertex on that edge
-    for g in select unnest(pnts) loop
-        v := v || pgr_pointtoedgenode(edges, g, tol);
-    end loop;
-
-    return v;
-end;
-$body$
-    language plpgsql stable;
-
-
-create or replace function pgr_pointstodmatrix(pnts geometry[], mode integer default (0), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    r record;
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_pointsToDMatrix';
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    -- create an id for each point in the array and unnest it into a table nodes in the with clause
-    for r in with nodes as (select row_number() over()::integer as id, p from (select unnest(pnts) as p) as foo)
-        -- compute a row of distances
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j,
-                case when mode=0
-                    then st_distance(a.p, b.p)
-                    else st_distance_sphere(a.p, b.p)
-                end as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i loop
-
-        -- you must concat an array[array[]] to make dmatrix[][]
-        -- concat the row of distances to the dmatrix
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-end;
-$body$
-    language plpgsql stable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_vidstodmatrix(IN vids integer[], IN pnts geometry[], IN edges text, tol float8 DEFAULT(0.1), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    i integer;
-    j integer;
-    nn integer;
-    rr record;
-    bbox geometry;
-    t float8[];
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    -- check if the input arrays has any -1 values, maybe this whould be a raise exception
-    if vids @> ARRAY[-1] then
-    raise notice 'Some vids are undefined (-1)!';
-    dmatrix := null;
-    ids := null;
-    return;
-    end if;
-
-    ids := vids;
-
-    -- get the count of nodes
-    nn := array_length(vids,1);
-
-    -- zero out a dummy row
-    for i in 1 .. nn loop
-        t := t || 0.0::float8;
-    end loop;
-
-    -- using the dummy row, zero out the whole matrix
-    for i in 1 .. nn loop
-    dmatrix := dmatrix || ARRAY[t];
-    end loop;
-
-    for i in 1 .. nn-1 loop
-        j := i;
-        -- compute the bbox for the point needed for this row
-        select st_expand(st_collect(pnts[id]), tol) into bbox
-          from (select generate_series as id from generate_series(i, nn)) as foo;
-
-        -- compute kdijkstra() for this row
-        for rr in execute 'select * from pgr_dijkstracost($1, $2, $3, false)'
-                  using 'select id, source, target, cost from ' || edges ||
-                        ' where the_geom && ''' || bbox::text || '''::geometry'::text, vids[i], vids[i+1:nn] loop
-
-            -- TODO need to check that all node were reachable from source
-            -- I think unreachable paths between nodes returns cost=-1.0
-
-            -- populate the matrix with the cost values, remember this is symmetric
-            j := j + 1;
-            -- raise notice 'cost(%,%)=%', i, j, rr.agg_cost;
-            dmatrix[i][j] := rr.agg_cost;
-            dmatrix[j][i] := rr.agg_cost;
-        end loop;
-    end loop;
-
-end;
-$body$
-    language plpgsql stable cost 200;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_vidsToDMatrix(sql TEXT, vids  INTEGER[], dir BOOLEAN, has_rcost BOOLEAN, want_symmetric BOOLEAN)
-RETURNS float8[] AS
-$BODY$
-DECLARE
-directed BOOLEAN;
-has_reverse BOOLEAN;
-edges_sql TEXT;
-dmatrix_row float8[];
-dmatrix float8[];
-cell RECORD;
-unique_vids INTEGER[];
-total BIGINT;
-from_v BIGINT;
-to_v BIGINT;
-BEGIN
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql = sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    unique_vids :=  ARRAY(SELECT DISTINCT UNNEST(vids) ORDER BY 1);
-
-    IF want_symmetric THEN
-        directed = false;
-    ELSE
-        directed = dir;
-    END IF;
-
-    total := array_length(unique_vids, 1);
-
-    -- initializing dmatrix
-    FOR i in 1 .. total LOOP
-        dmatrix_row := dmatrix_row || '+Infinity'::float8;
-    END LOOP;
-    FOR i in 1 .. total LOOP
-    dmatrix := dmatrix || ARRAY[dmatrix_row];
-    dmatrix[i][i] = 0;
-    END LOOP;
-
-    CREATE TEMP TABLE __x___y____temp AS
-        WITH result AS
-            (SELECT unnest(unique_vids) AS vid)
-        SELECT row_number() OVER() AS idx, vid FROM result;
-
-    FOR cell IN SELECT * FROM pgr_dijkstraCostMatrix(sql, unique_vids, directed) LOOP
-        SELECT idx INTO from_v FROM __x___y____temp WHERE vid =  cell.start_vid;
-        SELECT idx INTO to_v FROM __x___y____temp WHERE vid =  cell.end_vid;
-
-        dmatrix[from_v][to_v] = cell.agg_cost;
-        dmatrix[to_v][from_v] = cell.agg_cost;
-    END LOOP;
-
-    DROP TABLE IF EXISTS __x___y____temp;
-    RETURN dmatrix;
-
-    EXCEPTION WHEN others THEN
-       DROP TABLE IF EXISTS __x___y____temp;
-       raise exception '% %', SQLERRM, SQLSTATE;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated function';
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_dijkstra(sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_dijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN) IS 'pgr_dijkstra(Deprecated signature)';
-
-
-
-
-
--- OLD SIGNATURE
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(edges_sql text, source BIGINT, distance FLOAT, directed BOOLEAN, has_rcost BOOLEAN)
-  RETURNS SETOF pgr_costresult AS
-  $BODY$
-  DECLARE
-  has_reverse BOOLEAN;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function';
-
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, FALSE);
-
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-             -- the user says it doesn't have reverse cost but its false
-             -- removing from query
-             RAISE NOTICE 'Contradiction found: has_rcost set to false but reverse_cost column found';
-             sql = 'SELECT id, source, target, cost, -1 as reverse_cost FROM (' || edges_sql || ') __q ';
-         ELSE
-             -- the user says it has reverse cost but its false
-             -- can't do anything
-             RAISE EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query SELECT seq - 1 AS seq, node::integer AS id1, edge::integer AS id2, agg_cost AS cost
-                FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maximumcardinalitymatching(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---INTERNAL FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
-------------------------
--- deprecated signatures
------------------------
-
-COMMENT ON FUNCTION pgr_astar(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_astar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdAstar( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdAstar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdDijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdDijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_dijkstra(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_dijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_drivingDistance(text,  BIGINT,  FLOAT8,  BOOLEAN,  BOOLEAN)
-    IS 'pgr_drivingDistance(Deprecated signature)';
-
-------------------------
--- Renamed /deprecated
------------------------
-COMMENT ON FUNCTION pgr_apspJohnson(TEXT)
-    IS 'pgr_apspJohnson(Renamed function) use pgr_Johnson instead';
-
-COMMENT ON FUNCTION pgr_apspWarshall(text, boolean, boolean)
-    IS 'pgr_apspWarshall(Renamed function) use pgr_floydWarshall instead';
-
-COMMENT ON FUNCTION pgr_kdijkstraPath( text, INTEGER, INTEGER ARRAY, BOOLEAN, BOOLEAN)
-    IS 'pgr_kdijkstraPath(Renamed function) use pgr_dijkstra instead';
-
-COMMENT ON FUNCTION pgr_kdijkstracost( text, INTEGER, INTEGER array, BOOLEAN, BOOLEAN)
-    IS 'pgr_kDijkstraCost(Renamed function) use pgr_dijkstraCost instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-
-
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-
-
-COMMENT ON FUNCTION pgr_gsoc_vrppdtw( text, INTEGER, INTEGER)
-    IS 'pgr_gsoc_vrppdtw(Renamed function) use pgr_pickDeliverEuclidean instead';
-
-------------------------
--- Deprecated functions
------------------------
-
-COMMENT ON FUNCTION pgr_flipedges(geometry[])
-    IS 'pgr_flipedges(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_texttopoints(text,  integer)
-    IS 'pgr_texttopoints(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstovids(pnts geometry[], edges text, tol float8)
-    IS 'pgr_pointstovids(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    IS 'pgr_pointtoedgenode(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstodmatrix(geometry[], integer)
-    IS 'pgr_pointstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidstodmatrix( integer[],  geometry[],  text, float8)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidsToDMatrix(TEXT,  INTEGER[], BOOLEAN, BOOLEAN, BOOLEAN)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-
-
-
-COMMENT ON FUNCTION pgr_getTableName(IN tab text)
-    IS 'pgr_getTableName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_getColumnName(tab text, col text)
-    IS 'pgr_getColumnName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnInTable(tab text, col text)
-    IS 'pgr_isColumnInTable(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnIndexed(tab text, col text)
-    IS 'pgr_isColumnIndexed(Deprecated function)';
-
-
-COMMENT ON FUNCTION pgr_quote_ident(idname text)
-    IS 'pgr_quote_ident(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_versionless(v1 text, v2 text)
-    IS 'pgr_versionless(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_startPoint(g geometry)
-    IS 'pgr_startPoint(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_endPoint(g geometry)
-    IS 'pgr_endPoint(Deprecated function)';
-
-
diff --git a/tools/sql-update-scripts/pgrouting--2.2.1--2.5.2.sql b/tools/sql-update-scripts/pgrouting--2.2.1--2.5.2.sql
deleted file mode 100644
index d4a50dd..0000000
--- a/tools/sql-update-scripts/pgrouting--2.2.1--2.5.2.sql
+++ /dev/null
@@ -1,6527 +0,0 @@
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- pgRouting extension upgrade from 2.2.1 to 2.5.2
--- generated by tools/build-extension-update-files
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-\echo Use "ALTER extension pgrouting update to '2.5.2'" to load this file. \quit
-
-
--------------------------------------
--- remove functions no longer in the 2.5.2 extension
--------------------------------------
-
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,anyarray,bigint,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,anyarray,bigint,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,bigint,anyarray,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,bigint,anyarray,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,bigint,bigint,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,bigint,bigint,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_drivingdistance(text,bigint,double precision,boolean);
-DROP FUNCTION IF EXISTS _pgr_drivingdistance(text,bigint,double precision,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,anyarray,anyarray,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,anyarray,anyarray,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,anyarray,bigint,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,anyarray,bigint,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,bigint,anyarray,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,bigint,anyarray,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,bigint,bigint,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,bigint,bigint,boolean,character,boolean,boolean);
-
-
-------------------------------------------
---    New functions:  2.0
--- Signature change:  2.4
---       Deprecated:  2.4
-------------------------------------------
--- pgr_bddijkstra
--- 2.2.1: {      sql, source_vid, target_vid, directed, has_reverse_cost}   
--- 2.5.2: {edges_sql,  start_vid,    end_vid, directed, has_rcost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vid","end_vid","directed","has_rcost"}'
-WHERE proname = 'pgr_bddijkstra'
-    AND proargnames = '{"sql","source_vid","target_vid","directed","has_reverse_cost"}';
-
-
-------------------------------------------
---   New function: 2.1
--- (types) change: 2.3
-------------------------------------------
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_gsoc_vrppdtw(text,integer,integer);
-DROP FUNCTION IF EXISTS pgr_gsoc_vrppdtw(text,integer,integer);
-
-
-
-
-------------------------------------------
--- New functions on 2.0
--- Signature change on 2.3
--- Deprecated on 2.4
-------------------------------------------
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_astar(text,integer,integer,boolean,boolean);
-DROP FUNCTION IF EXISTS pgr_astar(text,integer,integer,boolean,boolean);
-
-
-
-
-------------------------------------------
---       New functions:  2.1
---    Signature change:  2.4
-------------------------------------------
--- 2.2.1: {edges_sql,start_v,  distance,directed,seq,node,edge,cost,agg_cost}
--- 2.5.2: {edges_sql,start_vid,distance,directed,seq,node,edge,cost,agg_cost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vid","distance","directed","seq","node","edge","cost","agg_cost"}'
-WHERE proname = 'pgr_drivingdistance'
-    AND proargnames = '{"edges_sql","start_v","distance","directed","seq","node","edge","cost","agg_cost"}';
-
-
-------------------------------------------
---       New functions:  2.1
---    Signature change:  2.4
-------------------------------------------
--- 2.2.1: {sql,      start_v,   distance,directed,equicost,seq,from_v,node,edge,cost,agg_cost}
--- 2.5.2: {edges_sql,start_vids,distance,directed,equicost,seq,from_v,node,edge,cost,agg_cost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vids","distance","directed","equicost","seq","from_v","node","edge","cost","agg_cost"}'
-WHERE proname = 'pgr_drivingdistance'
-    AND proargnames = '{"sql","start_v","distance","directed","equicost","seq","from_v","node","edge","cost","agg_cost"}';
-
-
-
-
-
-
-
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
---- pgRouting provides geospatial routing functionality.
---- http://pgrouting.org
---- copyright
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
----
---- This is free software; you can redistribute and/or modify it:
---- the terms of the GNU General Public Licence. See the COPYING file.
---- the terms of the MIT-X Licence. See the COPYING file.
----
---- The following functions have MIT-X licence:
----     pgr_version()
----     pgr_tsp(matrix float8[][], startpt integer, endpt integer DEFAULT -1, OUT seq integer, OUT id integer)
----     _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
----     pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
----
----
---- All other functions are under GNU General Public Licence.
----
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
--- WARNING: Any change in this file must be evaluated for compatibility.
---          Changes cleanly handled by postgis_upgrade.sql are fine,
---          other changes will require a bump in Major version.
---          Currently only function replaceble by CREATE OR REPLACE
---          are cleanly handled.
---
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
---  pgRouting 2.0 types
-
-
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_version()
-RETURNS TABLE(
-        "version" varchar,
-        tag varchar,
-        hash varchar,
-        branch varchar,
-        boost varchar
-    ) AS
-$BODY$
-    SELECT '2.5.2'::varchar AS version,
-        'v2.5.2'::varchar AS tag,
-        '60585f1f7'::varchar AS hash,
-        'master'::varchar AS branch,
-        '1.54.0'::varchar AS boost;
-$BODY$
-LANGUAGE sql IMMUTABLE;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getTableName(IN tab text, IN reportErrs int default 0, IN fnName text default '_pgr_getTableName', OUT sname text,OUT tname text)
-  RETURNS RECORD AS
-$$
-DECLARE
-        naming record;
-        i integer;
-        query text;
-        sn text; -- schema name
-        tn text; -- table name
-        ttype text; --table type for future use
-        err boolean;
-        debuglevel text;
-        var_types text[] = ARRAY['BASE TABLE', 'VIEW'];
-BEGIN
-
-    execute 'show client_min_messages' into debuglevel;
-
-
-    perform _pgr_msg( 0, fnName, 'Checking table ' || tab || ' exists');
-    --RAISE DEBUG 'Checking % exists',tab;
-
-    i := strpos(tab,'.');
-    IF (i <> 0) THEN
-        sn := split_part(tab, '.',1);
-        tn := split_part(tab, '.',2);
-    ELSE
-        sn := current_schema;
-        tn := tab;
-    END IF;
-
-
-   SELECT schema_name INTO sname
-   FROM information_schema.schemata WHERE schema_name = sn;
-
-    IF sname IS NOT NULL THEN -- found schema (as is)
-       SELECT table_name, table_type INTO tname, ttype
-       FROM information_schema.tables
-       WHERE
-                table_type = ANY(var_types) and
-                table_schema = sname and
-                table_name = tn ;
-        IF tname is NULL THEN
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  = ANY(var_types) and
-                table_schema = sname and
-                table_name = lower(tn) ORDER BY table_name;
-        END IF;
-    END IF;
-    IF sname is NULL or tname is NULL THEN --schema not found or table not found
-        SELECT schema_name INTO sname
-        FROM information_schema.schemata
-        WHERE schema_name = lower(sn) ;
-
-        IF sname IS NOT NULL THEN -- found schema (with lower caps)
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  =  ANY(var_types) and
-                table_schema = sname and
-                table_name= tn ;
-
-           IF tname IS NULL THEN
-                SELECT table_name, table_type INTO tname, ttype
-                FROM information_schema.tables
-                WHERE
-                    table_type  =  ANY(var_types) and
-                    table_schema = sname and
-                    table_name= lower(tn) ;
-           END IF;
-        END IF;
-    END IF;
-   err = (sname IS NULL OR tname IS NULL);
-   perform _pgr_onError(err, reportErrs, fnName, 'Table ' || tab ||' not found',' Check your table name', 'Table '|| tab || ' found');
-
-END;
-$$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(sname text, tname text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(col) into cname;
-
-    IF cname is null  THEN
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(lower(col))  into cname;
-    END if;
-
-    err = cname is null;
-
-    perform _pgr_onError(err, reportErrs, fnName,  'Column '|| col ||' not found', ' Check your column name','Column '|| col || ' found');
-    RETURN cname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(tab text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-
-    select * into cname from _pgr_getColumnName(sname,tname,col,reportErrs, fnName);
-    RETURN cname;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    select * from _pgr_getColumnName(tab,col,0, '_pgr_isColumnInTable') into cname;
-    return cname is not null;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(sname text, tname text, cname text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    pkey text;
-BEGIN
-    SELECT
-          pg_attribute.attname into pkey
-         --  format_type(pg_attribute.atttypid, pg_attribute.atttypmod)
-          FROM pg_index, pg_class, pg_attribute
-          WHERE
-                  pg_class.oid = _pgr_quote_ident(sname||'.'||tname)::regclass AND
-                  indrelid = pg_class.oid AND
-                  pg_attribute.attrelid = pg_class.oid AND
-                  pg_attribute.attnum = any(pg_index.indkey)
-                  AND indisprimary;
-
-    IF pkey=cname then
-          RETURN TRUE;
-    END IF;
-
-    SELECT a.index_name,
-           b.attname,
-           b.attnum,
-           a.indisunique,
-           a.indisprimary
-      INTO rec
-      FROM ( SELECT a.indrelid,
-                    a.indisunique,
-                    a.indisprimary,
-                    c.relname index_name,
-                    unnest(a.indkey) index_num
-               FROM pg_index a,
-                    pg_class b,
-                    pg_class c,
-                    pg_namespace d
-              WHERE b.relname=tname
-                AND b.relnamespace=d.oid
-                AND d.nspname=sname
-                AND b.oid=a.indrelid
-                AND a.indexrelid=c.oid
-           ) a,
-           pg_attribute b
-     WHERE a.indrelid = b.attrelid
-       AND a.index_num = b.attnum
-       AND b.attname = cname
-  ORDER BY a.index_name,
-           a.index_num;
-
-  RETURN FOUND;
-  EXCEPTION WHEN OTHERS THEN
-    perform _pgr_onError( true, reportErrs, fnName,
-    'Error when checking for the postgres system attributes', SQLERR);
-    RETURN FALSE;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(tab text, col text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    sname text;
-    tname text;
-    cname text;
-    pkey text;
-    value boolean;
-BEGIN
-    SELECT * into naming FROM _pgr_getTableName(tab, 0, fnName);
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    SELECT * into cname from _pgr_getColumnName(sname, tname, col, 0, fnName) ;
-    IF cname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    select * into value  from _pgr_isColumnIndexed(sname, tname, cname, reportErrs, fnName);
-    return value;
-END
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-create or replace function _pgr_quote_ident(idname text)
-    returns text as
-$body$
-declare
-    t text[];
-    pgver text;
-
-begin
-    pgver := regexp_replace(version(), E'^PostgreSQL ([^ ]+)[ ,].*$', E'\\1');
-
-    if _pgr_versionless(pgver, '9.2') then
-        select into t array_agg(quote_ident(term)) from
-            (select nullif(unnest, '') as term
-               from unnest(string_to_array(idname, '.'))) as foo;
-    else
-        select into t array_agg(quote_ident(term)) from
-            (select unnest(string_to_array(idname, '.', '')) as term) as foo;
-    end if;
-    return array_to_string(t, '.');
-end;
-$body$
-language plpgsql immutable;
-
-
-CREATE OR REPLACE FUNCTION _pgr_versionless(v1 text, v2 text)
-  RETURNS boolean AS
-$BODY$
-
-
-declare
-    v1a text[];
-    v2a text[];
-    nv1 integer;
-    nv2 integer;
-    ne1 integer;
-    ne2 integer;
-
-begin
-    -- separate components into an array, like:
-    -- '2.1.0-beta3dev'  =>  {2,1,0,beta3dev}
-    v1a := regexp_matches(v1, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-    v2a := regexp_matches(v2, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-
-    -- convert modifiers to numbers for comparison
-    -- we do not delineate between alpha1, alpha2, alpha3, etc
-    ne1 := case when v1a[4] is null or v1a[4]='' then 5
-                when v1a[4] ilike 'rc%' then 4
-                when v1a[4] ilike 'beta%' then 3
-                when v1a[4] ilike 'alpha%' then 2
-                when v1a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    ne2 := case when v2a[4] is null or v2a[4]='' then 5
-                when v2a[4] ilike 'rc%' then 4
-                when v2a[4] ilike 'beta%' then 3
-                when v2a[4] ilike 'alpha%' then 2
-                when v2a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    nv1 := v1a[1]::integer * 10000 +
-           coalesce(v1a[2], '0')::integer * 1000 +
-           coalesce(v1a[3], '0')::integer *  100 + ne1;
-    nv2 := v2a[1]::integer * 10000 +
-           coalesce(v2a[2], '0')::integer * 1000 +
-           coalesce(v2a[3], '0')::integer *  100 + ne2;
-
-    --raise notice 'nv1: %, nv2: %, ne1: %, ne2: %', nv1, nv2, ne1, ne2;
-
-    return nv1 < nv2;
-end;
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-create or replace function _pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_startpoint(st_geometryn(g,1));
-    else
-        return st_startpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function _pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_endpoint(st_geometryn(g,1));
-    else
-        return st_endpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_parameter_check(fn text, sql text, big boolean default false)
-  RETURNS bool AS
-  $BODY$
-
-  DECLARE
-  rec record;
-  rec1 record;
-  has_rcost boolean;
-  safesql text;
-  BEGIN
-    IF (big) THEN
-       RAISE EXCEPTION 'This function is for old style functions';
-    END IF;
-
-    -- checking query is executable
-    BEGIN
-      safesql =  'select * from ('||sql||' ) AS __a__ limit 1';
-      execute safesql into rec;
-      EXCEPTION
-        WHEN OTHERS THEN
-            RAISE EXCEPTION 'Could not execute query please verify syntax of: '
-              USING HINT = sql;
-    END;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('dijkstra','astar') THEN
-        BEGIN
-          execute 'select id,source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: id, source, target, cost';
-        END;
-        execute 'select pg_typeof(id)::text as id_type, pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.id_type in ('integer'::text))
-              AND (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Error, columns ''source'', ''target'' must be of type int4, ''cost'' must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    IF fn IN ('astar') THEN
-        BEGIN
-          execute 'select x1,y1,x2,y2  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: x1,y1, x2,y2';
-        END;
-        execute 'select pg_typeof(x1)::text as x1_type, pg_typeof(y1)::text as y1_type, pg_typeof(x2)::text as x2_type, pg_typeof(y2)::text as y2_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.x1_type = 'double precision'::text)
-              AND (rec.y1_type = 'double precision'::text)
-              AND (rec.x2_type = 'double precision'::text)
-              AND (rec.y2_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Columns: x1, y1, x2, y2 must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('johnson') THEN
-        BEGIN
-          execute 'select source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING HINT = 'Please veryfy the column names: id, source, target, cost',
-                         ERRCODE = 'XX000';
-        END;
-
-        execute 'select pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Support for source,target columns only of type: integer. Support for Cost: double precision'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    -- Checking the data types of the optional reverse_cost";
-    has_rcost := false;
-    IF fn IN ('johnson','dijkstra','astar') THEN
-      BEGIN
-        execute 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||safesql||' ) AS __b__ limit 1 ' into rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-            return has_rcost;
-      END;
-      if (has_rcost) then
-        IF (big) then
-           IF  not (rec1.rev_type in ('bigint'::text, 'integer'::text, 'smallint'::text, 'double precision'::text, 'real'::text)) then
-             RAISE EXCEPTION 'Illegar type in optional parameter reverse_cost.'
-             USING ERRCODE = 'XX000';
-           END IF;
-        ELSE -- Version 2.0.0 is more restrictive
-           IF (rec1.rev_type != 'double precision') then
-             RAISE EXCEPTION 'Illegal type in optional parameter reverse_cost, must be of type float8'
-             USING ERRCODE = 'XX000';
-           END IF;
-        END IF;
-      end if;
-      return true;
-    END IF;
-    -- just for keeps
-    return true;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_onError(
-  IN errCond boolean,  -- true there is an error
-  IN reportErrs int,   -- 0, 1 or 2
-  IN fnName text,      -- function name that generates the error
-  IN msgerr text,      -- error message
-  IN hinto text default 'No hint', -- hint help
-  IN msgok text default 'OK')      -- message if everything is ok
-  RETURNS void AS
-$BODY$
-BEGIN
-  if errCond=true then
-     if reportErrs=0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-     else
-       if reportErrs = 2 then
-         raise notice '----> PGR ERROR in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-         raise raise_exception;
-       else
-         raise notice '----> PGR NOTICE in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-       end if;
-     end if;
-  else
-       raise debug 'PGR ----> %: %',fnName,msgok;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_msg(IN msgKind int, IN fnName text, IN msg text default '---->OK')
-  RETURNS void AS
-$BODY$
-BEGIN
-  if msgKind = 0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msg;
-  else
-       raise notice '----> PGR NOTICE in %: %',fnName,msg;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(sname text, tname text, cname text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    EXECUTE 'select data_type  from information_schema.columns '
-            || 'where table_name = '||quote_literal(tname)
-                 || ' and table_schema=' || quote_literal(sname)
-                 || ' and column_name='||quote_literal(cname)
-       into ctype;
-    err = ctype is null;
-    perform _pgr_onError(err, reportErrs, fnName,
-            'Type of Column '|| cname ||' not found',
-            'Check your column name',
-            'OK: Type of Column '|| cname || ' is ' || ctype);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(tab text, col text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-    select * into cname from _pgr_getColumnName(tab,col,reportErrs, fnName) ;
-    select * into ctype from _pgr_getColumnType(sname,tname,cname,reportErrs, fnName);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_get_statement(o_sql text)
-RETURNS text AS
-$BODY$
-DECLARE
-sql TEXT;
-BEGIN
-    EXECUTE 'SELECT statement FROM pg_prepared_statements WHERE name ='  || quote_literal(o_sql) || ' limit 1 ' INTO sql;
-    IF (sql IS NULL) THEN
-      RETURN   o_sql;
-    ELSE
-      RETURN  regexp_replace(sql, '(.)* as ', '', 'i');
-    END IF;
-END
-$BODY$
-LANGUAGE plpgsql STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_checkVertTab(vertname text, columnsArr  text[],
-    IN reportErrs int default 1, IN fnName text default '_pgr_checkVertTab',
-    OUT sname text,OUT vname text)
-RETURNS record AS
-$BODY$
-DECLARE
-    cname text;
-    colname text;
-    naming record;
-    debuglevel text;
-    err  boolean;
-    msgKind int;
-
-BEGIN
-    msgKind = 0; -- debug_
-    execute 'show client_min_messages' into debuglevel;
-
-    perform _pgr_msg(msgKind, fnName, 'Checking table ' || vertname || ' exists');
-       select * from _pgr_getTableName(vertname, 0, fnName) into naming;
-       sname=naming.sname;
-       vname=naming.tname;
-       err = sname is NULL or vname is NULL;
-    perform _pgr_onError( err, 2, fnName,
-          'Vertex Table: ' || vertname || ' not found',
-          'Please create ' || vertname || ' using  _pgr_createTopology() or pgr_createVerticesTable()',
-          'Vertex Table: ' || vertname || ' found');
-
-
-    perform _pgr_msg(msgKind, fnName, 'Checking columns of ' || vertname);
-      FOREACH cname IN ARRAY columnsArr
-      loop
-         select _pgr_getcolumnName(vertname, cname, 0, fnName) into colname;
-         if colname is null then
-           perform _pgr_msg(msgKind, fnName, 'Adding column ' || cname || ' in ' || vertname);
-           set client_min_messages  to warning;
-                execute 'ALTER TABLE '||_pgr_quote_ident(vertname)||' ADD COLUMN '||cname|| ' integer';
-           execute 'set client_min_messages  to '|| debuglevel;
-           perform _pgr_msg(msgKind, fnName);
-         end if;
-      end loop;
-    perform _pgr_msg(msgKind, fnName, 'Finished checking columns of ' || vertname);
-
-    perform _pgr_createIndex(vertname , 'id' , 'btree', reportErrs, fnName);
- END
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(
-    sname text, tname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    debuglevel text;
-    naming record;
-    tabname text;
-    query text;
-    msgKind int;
-BEGIN
-  msgKind = 0; -- debug_
-
-  execute 'show client_min_messages' into debuglevel;
-  tabname=_pgr_quote_ident(sname||'.'||tname);
-  perform _pgr_msg(msgKind, fnName, 'Checking ' || colname || ' column in ' || tabname || ' is indexed');
-    IF (_pgr_isColumnIndexed(sname,tname,colname, 0, fnName)) then
-       perform _pgr_msg(msgKind, fnName);
-    else
-      if indext = 'gist' then
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using gist('||quote_ident(colname)||')';
-      else
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using btree('||quote_ident(colname)||')';
-      end if;
-      perform _pgr_msg(msgKind, fnName, 'Adding index ' || tabname || '_' ||  colname || '_idx');
-      perform _pgr_msg(msgKind, fnName, ' Using ' ||  query);
-      set client_min_messages  to warning;
-      BEGIN
-        execute query;
-        EXCEPTION WHEN others THEN
-          perform _pgr_onError( true, reportErrs, fnName,
-            'Could not create index on:' || colname, SQLERRM);
-      END;
-      execute 'set client_min_messages  to '|| debuglevel;
-      perform _pgr_msg(msgKind, fnName);
-    END IF;
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(tabname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    naming record;
-    sname text;
-    tname text;
-
-BEGIN
-    select * from _pgr_getTableName(tabname, 2, fnName)  into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    execute _pgr_createIndex(sname, tname, colname, indext, reportErrs, fnName);
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pointToId(
-    point geometry,
-    tolerance double precision,
-    vertname text,
-    srid integer)
-
-  RETURNS bigint AS
-$BODY$
-DECLARE
-    rec record;
-    pid bigint;
-
-BEGIN
-    EXECUTE 'SELECT ST_Distance(
-        the_geom,
-        ST_GeomFromText(ST_AsText('
-                || quote_literal(point::text)
-                || '),'
-            || srid ||')) AS d, id, the_geom
-    FROM '||_pgr_quote_ident(vertname)||'
-    WHERE ST_DWithin(
-        the_geom,
-        ST_GeomFromText(
-            ST_AsText(' || quote_literal(point::text) ||'),
-            ' || srid || '),' || tolerance||')
-    ORDER BY d
-    LIMIT 1' INTO rec ;
-    IF rec.id IS NOT NULL THEN
-        pid := rec.id;
-    ELSE
-        execute 'INSERT INTO '||_pgr_quote_ident(vertname)||' (the_geom) VALUES ('||quote_literal(point::text)||')';
-        pid := lastval();
-END IF;
-
-RETURN pid;
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'many_to_many_dijkstra'
-LANGUAGE c VOLATILE;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer, OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstra(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(Many to Many)';
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraVia(
-    edges_sql TEXT,
-    via_vertices ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    strict BOOLEAN DEFAULT FALSE,
-    U_turn_on_edge BOOLEAN DEFAULT TRUE,
-
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'dijkstraVia'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_johnson(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'johnson'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_floydWarshall(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'floydWarshall'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'astarManyToMany'
-LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, normal:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to Many)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true, normal:=false) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to Many)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid ANYARRAY,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-    equicost BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'many_withPointsDD'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_withPointsDD($1, $2, ARRAY[$3]::BIGINT[], $4, $5, $6, $7, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vids anyarray,
-    distance FLOAT,
-    directed BOOLEAN DEFAULT TRUE,
-    equicost BOOLEAN DEFAULT FALSE,
-    OUT seq integer,
-    OUT from_v  bigint,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'driving_many_to_dist'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vid bigint,
-    distance FLOAT8,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq integer,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer, directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'kshortest_path'
-    LANGUAGE c STABLE STRICT;
-
--- V2 the graph is directed and there are no heap paths
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid integer, end_vid integer, k integer, has_rcost boolean)
-  RETURNS SETOF pgr_costresult3 AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated signature of pgr_ksp';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql::text, false);
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_rcost) THEN
-           -- user says that it has reverse_cost but its not true
-           RAISE EXCEPTION 'has_reverse_cost set to true but reverse_cost not found';
-         ELSE
-           -- user says that it does not have reverse_cost but it does have it
-           -- to ignore we remove reverse_cost from the query
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         END IF;
-      END IF;
-
-      RETURN query SELECT ((row_number() over()) -1)::integer  AS seq,  (path_id - 1)::integer AS id1, node::integer AS id2, edge::integer AS id3, cost
-            FROM _pgr_ksp(sql::text, start_vid, end_vid, k, TRUE, FALSE) WHERE path_id <= k;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer,
-  directed boolean default true, heap_paths boolean default false,
-  --directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  BEGIN
-         RETURN query SELECT *
-                FROM _pgr_ksp(edges_sql::text, start_vid, end_vid, k, directed, heap_paths);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsKSP(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    k INTEGER,
-
-    directed BOOLEAN DEFAULT TRUE,
-    heap_paths BOOLEAN DEFAULT FALSE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER, OUT path_id INTEGER, OUT path_seq INTEGER,
-    OUT node BIGINT, OUT edge BIGINT,
-    OUT cost FLOAT, OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'withPoints_ksp'
-    LANGUAGE c STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_unnest_matrix(matrix float8[][], OUT start_vid integer, OUT end_vid integer, out agg_cost float8)
-RETURNS SETOF record AS
-
-$body$
-DECLARE
-
-m float8[];
-
-BEGIN
-    start_vid = 1;
-    foreach m slice 1 in  ARRAY matrix
-    LOOP
-        end_vid = 1;
-        foreach agg_cost in  ARRAY m
-        LOOP
-            RETURN next;
-            end_vid = end_vid + 1;
-        END LOOP;
-        start_vid = start_vid + 1;
-    END LOOP;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_tsp(
-    matrix float8[][],
-    startpt INTEGER,
-    endpt INTEGER DEFAULT -1,
-    OUT seq INTEGER,
-    OUT id INTEGER)
-RETURNS SETOF record AS
-$body$
-DECLARE
-table_sql TEXT;
-debuglevel TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(float8[][], integer, integer)';
-
-    CREATE TEMP TABLE ___tmp2 ON COMMIT DROP AS SELECT * FROM _pgr_unnest_matrix( matrix );
-
-
-    startpt := startpt + 1;
-    IF endpt = -1 THEN endpt := startpt;
-    END IF;
-
-
-    RETURN QUERY
-    WITH
-    result AS (
-        SELECT * FROM pgr_TSP(
-        $$SELECT * FROM ___tmp2 $$,
-        startpt, endpt,
-
-        tries_per_temperature :=  500 :: INTEGER,
-        max_changes_per_temperature := 30 :: INTEGER,
-        max_consecutive_non_changes := 500 :: INTEGER,
-
-        randomize:=false)
-    )
-    SELECT (row_number() over(ORDER BY result.seq) - 1)::INTEGER AS seq, (result.node - 1)::INTEGER AS id
-
-    FROM result WHERE NOT(result.node = startpt AND result.seq != 1);
-
-    DROP TABLE ___tmp2;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-
-
-CREATE OR  REPLACE FUNCTION pgr_tsp(sql text, start_id INTEGER, end_id INTEGER default (-1))
-returns setof pgr_costResult as
-$body$
-DECLARE
-table_sql TEXT;
-rec RECORD;
-debuglevel TEXT;
-n BIGINT;
-
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(sql, integer, integer)';
-
-    table_sql := 'CREATE TEMP TABLE ___tmp ON COMMIT DROP AS ' || sql ;
-    EXECUTE table_sql;
-
-
-    BEGIN
-        EXECUTE 'SELECT id, x, y FROM ___tmp' INTO rec;
-        EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                USING ERRCODE = 'XX000',
-                HINT = 'Please verify the column names: id, x, y';
-    END;
-
-    EXECUTE
-    'SELECT
-        pg_typeof(id)::text as id_type,
-        pg_typeof(x)::text as x_type,
-        pg_typeof(y)::text as y_type FROM ___tmp' INTO rec;
-
-
-    IF NOT((rec.id_type in ('integer'::text))
-        AND (rec.x_type = 'double precision'::text)
-        AND (rec.y_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION '''id'' must be of type INTEGER, ''x'' ad ''y'' must be of type FLOAT'
-            USING ERRCODE = 'XX000';
-    END IF;
-
-    EXECUTE 'SELECT count(*) AS n FROM (' || sql || ') AS __a__' INTO rec;
-    n = rec.n;
-
-    RETURN query
-        SELECT (seq - 1)::INTEGER AS seq, node::INTEGER AS id1, node::INTEGER AS id2, cost
-        FROM pgr_eucledianTSP(sql, start_id, end_id,
-
-            tries_per_temperature :=  500 * n :: INTEGER,
-            max_changes_per_temperature := 60 * n :: INTEGER,
-            max_consecutive_non_changes := 500 * n :: INTEGER,
-
-            randomize := false) WHERE seq <= n;
-    DROP TABLE ___tmp;
-
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-create or replace function _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
-  as
-$body$
-declare
-    sql text;
-    r record;
-
-begin
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    sql := 'with nodes as (' || sqlin || ')
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j, st_distance(st_makepoint(a.x, a.y), st_makepoint(b.x, b.y)) as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i';
-
-    for r in execute sql loop
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-
-end;
-$body$
-language plpgsql stable cost 10;
-
-
-CREATE OR REPLACE FUNCTION pgr_TSP(
-    matrix_row_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'newTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_eucledianTSP(
-    coordinates_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'eucledianTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_alphashape(sql text, alpha float8 DEFAULT 0, OUT x float8, OUT y float8)
-    RETURNS SETOF record
-    AS '$libdir/libpgrouting-2.5', 'alphashape'
-    LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pointsAsPolygon(query varchar, alpha float8 DEFAULT 0)
-	RETURNS geometry AS
-	$$
-	DECLARE
-		r record;
-		geoms geometry[];
-		vertex_result record;
-		i int;
-		n int;
-		spos int;
-		q text;
-		x float8[];
-		y float8[];
-
-	BEGIN
-		geoms := array[]::geometry[];
-		i := 1;
-
-		FOR vertex_result IN EXECUTE 'SELECT x, y FROM pgr_alphashape('''|| query || ''', ' || alpha || ')'
-		LOOP
-			x[i] = vertex_result.x;
-			y[i] = vertex_result.y;
-			i := i+1;
-		END LOOP;
-
-		n := i;
-		IF n = 1 THEN
-			RAISE NOTICE 'n = 1';
-			RETURN NULL;
-		END IF;
-
-		spos := 1;
-		q := 'SELECT ST_GeometryFromText(''POLYGON((';
-		FOR i IN 1..n LOOP
-			IF x[i] IS NULL AND y[i] IS NULL THEN
-				q := q || ', ' || x[spos] || ' ' || y[spos] || '))'',0) AS geom;';
-				EXECUTE q INTO r;
-				geoms := geoms || array[r.geom];
-				q := '';
-			ELSE
-				IF q = '' THEN
-					spos := i;
-					q := 'SELECT ST_GeometryFromText(''POLYGON((';
-				END IF;
-				IF i = spos THEN
-					q := q || x[spos] || ' ' || y[spos];
-				ELSE
-					q := q || ', ' || x[i] || ' ' || y[i];
-				END IF;
-			END IF;
-		END LOOP;
-
-		RETURN ST_BuildArea(ST_Collect(geoms));
-	END;
-	$$
-	LANGUAGE 'plpgsql' VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'bd_astar'
-LANGUAGE C VOLATILE;
-
-
-
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed:=true, only_cost:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    BOOLEAN,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false);
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to Many)';
-
-
-
--- one to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to Many)';
-
-
--- bdDijkstra MANY TO MANY
-CREATE OR REPLACE FUNCTION _pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bdDijkstra'
-LANGUAGE c VOLATILE;
-
-
-
--- ONE TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- TODO directed BOOLEAN DEFAULT TRUE,  on version 3
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, false) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, true) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_vid integer,
-    target_vid integer,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_vertex'
-LANGUAGE 'c' IMMUTABLE;
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_edge'
-LANGUAGE 'c' IMMUTABLE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || edges_sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        -- no restrictions then its a dijkstra
-        RETURN query SELECT a.seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_dijkstra(new_sql, start_vid, end_vid, directed) a;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, start_vid, end_vid, directed, has_rcost, restrictions_sql);
-    RETURN;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trspViaVertices(
-    edges_sql TEXT,
-    via_vids ANYARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult3 AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            new_sql :=
-               'WITH old_sql AS (' || edges_sql || ')' ||
-                '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        RETURN query SELECT (row_number() over())::INTEGER, path_id:: INTEGER, node::INTEGER,
-            (CASE WHEN edge = -2 THEN -1 ELSE edge END)::INTEGER, cost
-            FROM pgr_dijkstraVia(new_sql, via_vids, directed, strict:=true) WHERE edge != -1;
-        RETURN;
-    END IF;
-
-
-    -- make the call without contradiction from part of the user
-    RETURN query SELECT * FROM _pgr_trspViaVertices(new_sql, via_vids::INTEGER[], directed, has_rcost, restrictions_sql);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-
-    new_sql := sql;
-    IF (has_reverse != has_reverse_cost) THEN  -- user contradiction
-        IF (has_reverse) THEN
-            -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) THEN
-        -- no restrictions then its a with points
-        RETURN query SELECT a.seq-1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_withpoints(new_sql,
-            '(SELECT 1 as pid, ' || source_eid || 'as edge_id, ' || source_pos || '::float8 as fraction)'
-            || ' UNION '
-            || '(SELECT 2, ' || target_eid || ', ' || target_pos || ')' ::TEXT,
-            -1, -2, directed) a;
-        -- WHERE node != -2;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, source_eid, source_pos, target_eid, target_pos, directed, has_reverse_cost, turn_restrict_sql);
-    RETURN;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-create or replace function _pgr_trspViaVertices(sql text, vids integer[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    lrra boolean := false;
-    seq integer := 0;
-    seq2 integer := 0;
-
-begin
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(vids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from _pgr_trsp(sql, vids[i], vids[i+1], directed, has_rcost, turn_restrict_sql) as a loop
-            -- filter out the individual path ends except the last one
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --raise notice 'rr: %', rr;
-            if rr.id3 = -1 then
-                lrr := rr;
-                lrra := true;
-            else
-                seq := seq + 1;
-                rr.seq := seq;
-                return next rr;
-            end if;
-        end loop;
-    end loop;
-
-    if lrra then
-        seq := seq + 1;
-        lrr.seq := seq;
-        return next lrr;
-    end if;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-
-----------------------------------------------------------------------------------------------------------
-
-create or replace function pgr_trspViaEdges(sql text, eids integer[], pcts float8[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    first boolean := true;
-    seq integer := 0;
-    seq2 integer :=0;
-    has_reverse BOOLEAN;
-    point_is_vertex BOOLEAN := false;
-    edges_sql TEXT;
-    f float;
-
-begin
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql := sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (NOT has_rcost) THEN
-            -- user does not want to use reverse cost column
-            edges_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    FOREACH f IN ARRAY pcts LOOP
-        IF f in (0,1) THEN
-           point_is_vertex := true;
-        END IF;
-    END LOOP;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) AND NOT point_is_vertex THEN
-        -- no restrictions then its a _pgr_withPointsVia
-        RETURN query SELECT a.seq::INTEGER, path_id::INTEGER AS id1, node::INTEGER AS id2, edge::INTEGER AS id3, cost
-        FROM _pgr_withPointsVia(edges_sql, eids, pcts, directed) a;
-        RETURN;
-    END IF;
-
-    if array_length(eids, 1) != array_length(pcts, 1) then
-        raise exception 'The length of arrays eids and pcts must be the same!';
-    end if;
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(eids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from pgr_trsp(edges_sql,
-                                  eids[i], pcts[i],
-                                  eids[i+1], pcts[i+1],
-                                  directed,
-                                  has_rcost,
-                                  turn_restrict_sql) as a loop
-            -- combine intermediate via costs when cost is split across
-            -- two parts of a segment because it stops it and
-            -- restarts the next leg also on it
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --
-            -- there are multiple condition we have to deal with
-            -- between the end of one leg and start of the next
-            -- 1. same vertex_id. edge_id=-1; drop record with edge_id=-1
-            -- means: path ends on vertex
-            -- NOTICE:  rr: (19,1,44570022,-1,0)
-            -- NOTICE:  rr: (0,2,44570022,1768045,2.89691196717448)
-            -- 2. vertex_id=-1; sum cost components
-            -- means: path end/starts with the segment
-            -- NOTICE:  rr: (11,2,44569628,1775909,9.32885885148532)
-            -- NOTICE:  rr: (0,3,-1,1775909,0.771386350984395)
-
-            --raise notice 'rr: %', rr;
-            if first then
-                lrr := rr;
-                first := false;
-            else
-                if lrr.id3 = -1 then
-                    lrr := rr;
-                elsif lrr.id3 = rr.id3 then
-                    lrr.cost := lrr.cost + rr.cost;
-                    if rr.id2 = -1 then
-                        rr.id2 := lrr.id2;
-                    end if;
-                else
-                    seq := seq + 1;
-                    lrr.seq := seq;
-                    return next lrr;
-                    lrr := rr;
-                end if;
-            end if;
-        end loop;
-    end loop;
-
-    seq := seq + 1;
-    lrr.seq := seq;
-    return next lrr;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-----------------------------
---    MANY TO MANY
-----------------------------
-
-
-CREATE OR REPLACE FUNCTION _pgr_maxflow(
-    edges_sql TEXT,
-    sources ANYARRAY,
-    targets ANYARRAY,
-    algorithm INTEGER DEFAULT 1,
-    only_flow BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'max_flow_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-
-------------------------------------
--- 3 pgr_edmondsKarp
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 2 boykov_kolmogorov
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 1 pgr_pushRelabel
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT flow
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], algorithm := 1, only_flow := true);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], $3::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, $2::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxCardinalityMatch(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'edge_disjoint_paths_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    bigint,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    IN directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_contractGraph(
-    edges_sql TEXT,
-    contraction_order BIGINT[],
-    max_cycles integer DEFAULT 1,
-    forbidden_vertices BIGINT[] DEFAULT ARRAY[]::BIGINT[],
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT type TEXT,
-    OUT id BIGINT,
-    OUT contracted_vertices BIGINT[],
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost float)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'contractGraph'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliver(
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_cell_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliver'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliverEuclidean (
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliverEuclidean'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_vrpOneDepot(
-    TEXT, -- customers_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_sql
-    INTEGER, -- depot_id
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-orders_sql TEXT;
-trucks_sql TEXT;
-matrix_sql TEXT;
-final_sql TEXT;
-BEGIN
-
-    orders_sql = $$WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    pickups AS (
-        SELECT id, x AS p_x, y AS p_y, open_time AS p_open, close_time AS p_close, service_time AS p_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vrp_orders.id AS id, order_unit AS demand, pickups.id AS p_node_id, p_x, p_y, p_open, p_close, p_service,
-    vrp_orders.id AS d_node_id, x AS d_x, y AS d_y, open_time AS d_open, close_time AS d_close, service_time AS d_service
-    FROM vrp_orders, pickups
-    WHERE vrp_orders.id != $$ || $4;
-
-
-    trucks_sql = $$ WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    vrp_vehicles AS ($$ || $2 || $$ ),
-    starts AS (
-        SELECT id AS start_node_id, x AS start_x, y AS start_y, open_time AS start_open, close_time AS start_close, service_time AS start_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vehicle_id AS id, capacity, starts.* FROM vrp_vehicles, starts;
-    $$;
-
-    final_sql = '
-    SELECT * FROM _pgr_pickDeliver(
-            $$' || orders_sql || '$$,
-            $$' || trucks_sql || '$$,
-            $$' || $3 || '$$,
-            max_cycles := 2,
-            initial_sol := 4 ); ';
-
-    RAISE DEBUG '%', orders_sql;
-    RAISE DEBUG '%', trucks_sql;
-    RAISE DEBUG '%', $3;
-    RAISE DEBUG '%', final_sql;
-
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
------------------------------------------------------------------------
--- Core function for vrp with sigle depot computation
--- See README for description
------------------------------------------------------------------------
---
---
-
-create or replace function pgr_vrpOneDepot(
-	order_sql text,
-	vehicle_sql text,
-	cost_sql text,
-	depot_id integer,
-
-	OUT oid integer,
-	OUT opos integer,
-	OUT vid integer,
-	OUT tarrival integer,
-	OUT tdepart integer)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT order_id::INTEGER, stop_seq::INTEGER, vehicle_id::INTEGER, arrival_time::INTEGER, departure_time::INTEGER
-    FROM _pgr_vrpOneDepot($1, $2,
-       '
-            SELECT src_id AS start_vid, dest_id AS end_vid, traveltime AS agg_cost FROM ('||$3||') AS a
-       ',
-        $4
-    ) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_gsoc_vrppdtw(
-    customers_sql TEXT,
-    max_vehicles INTEGER,
-    capacity FLOAT,
-    speed FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-
-    OUT seq INTEGER,
-    OUT vehicle_id INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT stop_id BIGINT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-    orders_sql TEXT;
-    vehicles_sql TEXT;
-    final_sql TEXT;
-BEGIN
-    orders_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        pickups AS (
-            SELECT id, demand, x as p_x, y as p_y, opentime as p_open, closetime as p_close, servicetime as p_service
-            FROM  customer_data WHERE pindex = 0 AND id != 0
-        ),
-        deliveries AS (
-            SELECT pindex AS id, x as d_x, y as d_y, opentime as d_open, closetime as d_close, servicetime as d_service
-            FROM  customer_data WHERE dindex = 0 AND id != 0
-        )
-        SELECT * FROM pickups JOIN deliveries USING(id) ORDER BY pickups.id
-    $$;
-
-    vehicles_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ )
-        SELECT id, x AS start_x, y AS start_y,
-            opentime AS start_open, closetime AS start_close, $$ ||
-            capacity || $$ AS capacity, $$ || max_vehicles || $$ AS number, $$ || speed || $$ AS speed
-            FROM customer_data WHERE id = 0 LIMIT 1
-        $$;
---  seq | vehicle_id | vehicle_seq | stop_id | travel_time | arrival_time | wait_time | service_time | departure_time
-    final_sql = $$ WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        p_deliver AS (SELECT * FROM _pgr_pickDeliverEuclidean('$$ || orders_sql || $$',  '$$ || vehicles_sql || $$',  1, $$ || max_cycles || $$ )),
-        picks AS (SELECT p_deliver.*, pindex, dindex, id AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 2)),
-        delivers AS (SELECT p_deliver.*, pindex, dindex, dindex AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 3)),
-        depots AS (SELECT p_deliver.*, 0 as pindex, 0 as dindex, 0 AS the_id FROM p_deliver WHERE (stop_type IN (-1,1,6))),
-        the_union AS (SELECT * FROM picks UNION SELECT * FROM delivers UNION SELECT * from depots)
-
-        SELECT (row_number() over(ORDER BY a.seq))::INTEGER, vehicle_seq, a.stop_seq, the_id::BIGINT, a.travel_time, a.arrival_time, a.wait_time, a.service_time, a.departure_time
-        FROM (SELECT * FROM the_union) AS a ORDER BY a.seq
-        $$;
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-CREATE OR REPLACE FUNCTION pgr_gsoc_vrppdtw(
-    sql text,
-    vehicle_num INTEGER,
-    capacity INTEGER
-)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-customers_sql TEXT;
-BEGIN
-    RETURN query
-         SELECT a.seq, vehicle_id::INTEGER AS id1, stop_id::INTEGER AS id2, departure_time AS cost
-        FROM _pgr_gsoc_vrppdtw($1, $2, $3, 1, 30) AS a WHERE vehicle_id NOT IN (-2);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION _pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN,
-    driving_side CHAR,
-    details BOOLEAN,
-
-    only_cost BOOLEAN DEFAULT false, -- gets path
-    normal BOOLEAN DEFAULT true, -- false for many to onu
-
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'withPoints'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], ARRAY[$4]::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], ARRAY[$4]::bigint[], $5, $6, $7, FALSE, FALSE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], $4::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], $4::BIGINT[], $5,  $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION  _pgr_withPointsVia(
-    sql text,
-    via_edges bigint[],
-    fraction float[],
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  has_rcost boolean;
-  sql_new_vertices text := ' ';
-  sql_on_vertex text;
-  v_union text := ' ';
-  dummyrec record;
-  rec1 record;
-  via_vertices int[];
-  sql_safe text;
-  new_edges text;
-  BEGIN
-     BEGIN
-        sql_safe = 'SELECT id, source, target, cost, reverse_cost FROM ('|| sql || ') AS __a';
-
-        EXECUTE 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||sql_safe||' ) AS __b__ limit 1 ' INTO rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-     END;
-
-
-      IF array_length(via_edges, 1) != array_length(fraction, 1) then
-        RAISE EXCEPTION 'The length of via_edges is different of length of via_edges';
-      END IF;
-
-      FOR i IN 1 .. array_length(via_edges, 1)
-      LOOP
-          IF fraction[i] = 0 THEN
-              sql_on_vertex := 'SELECT source FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.source;
-          ELSE IF fraction[i] = 1 THEN
-              sql_on_vertex := 'SELECT target FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.target;
-          ELSE
-              via_vertices[i] = -i;
-              IF has_rcost THEN
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost,
-                              reverse_cost * (1 - ' || fraction[i] || ')  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost,
-                              reverse_cost *  ' || fraction[i] || '  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' where id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               ELSE
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               END IF;
-          END IF;
-          END IF;
-     END LOOP;
-
-     IF sql_new_vertices = ' ' THEN
-         new_edges := sql;
-     ELSE
-         IF has_rcost THEN
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost,
-                         lead(cost) OVER w  - cost AS reverse_cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL),
-                   second_part AS ( SELECT * FROM (SELECT id, lead(source) OVER w  AS source, source as target,
-                         reverse_cost - lead(reverse_cost) OVER w  AS cost,
-                         reverse_cost - lead(reverse_cost) OVER w  AS reverse_cost
-                      FROM  the_union  WHERE target > 0 and reverse_cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY reverse_cost ASC) ) as n2
-                      WHERE source IS NOT NULL),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part)
-                             UNION
-                       (SELECT * FROM second_part) ) _union )
-                  SELECT *  FROM more_union';
-         ELSE
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL ),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part) ) _union )
-                  SELECT *  FROM more_union';
-          END IF;
-      END IF;
-
- -- raise notice '%', new_edges;
-     sql_new_vertices := sql_new_vertices || v_union || ' (' || sql || ')';
-     RETURN query SELECT *
-         FROM pgr_dijkstraVia(new_edges, via_vertices, directed, has_rcost);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_lineGraph(
-    TEXT, -- edges_sql
-    directed BOOLEAN DEFAULT true,
-    OUT seq INTEGER,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost FLOAT,
-    OUT reverse_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'lineGraph'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_connectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'connectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_strongComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'strongComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_biconnectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the edge in the component
-    OUT n_seq INTEGER,          -- nth_seq of the edge in the component
-    OUT edge BIGINT)            -- the number of the edge
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'biconnectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_articulationPoints(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'articulationPoints'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bridges(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT edge BIGINT)            -- the number of the edge 
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bridges'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createtopology(edge_table text, tolerance double precision,
-		   the_geom text default 'the_geom', id text default 'id',
-		   source text default 'source', target text default 'target',rows_where text default 'true',
-		   clean boolean default FALSE)
-RETURNS VARCHAR AS
-$BODY$
-
-DECLARE
-    points record;
-    sridinfo record;
-    source_id bigint;
-    target_id bigint;
-    totcount bigint;
-    rowcount bigint;
-    srid integer;
-    sql text;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    notincluded integer;
-    i integer;
-    naming record;
-    info record;
-    flag boolean;
-    query text;
-    idtype text;
-    gtype text;
-    sourcetype text;
-    targettype text;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-    msgKind int;
-    emptied BOOLEAN;
-
-BEGIN
-    msgKind = 1; -- notice
-    fnName = 'pgr_createTopology';
-    raise notice 'PROCESSING:';
-    raise notice 'pgr_createTopology(''%'', %, ''%'', ''%'', ''%'', ''%'', rows_where := ''%'', clean := %)',edge_table,tolerance,the_geom,id,source,target,rows_where, clean;
-    execute 'show client_min_messages' into debuglevel;
-
-
-    raise notice 'Performing checks, please wait .....';
-
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-        sname=naming.sname;
-        tname=naming.tname;
-        tabname=sname||'.'||tname;
-        vname=tname||'_vertices_pgr';
-        vertname= sname||'.'||vname;
-        rows_where = ' AND ('||rows_where||')';
-      raise DEBUG '     --> OK';
-
-
-      raise debug 'Checking column names in edge table';
-        select * into idname     from _pgr_getColumnName(sname, tname,id,2,fnName);
-        select * into sourcename from _pgr_getColumnName(sname, tname,source,2,fnName);
-        select * into targetname from _pgr_getColumnName(sname, tname,target,2,fnName);
-        select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2,fnName);
-
-
-        err = sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname;
-        perform _pgr_onError( err, 2, fnName,
-               'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-	       'Column names are OK');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking column types in edge table';
-        select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-        select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-        select * into idtype from _pgr_getColumnType(sname,tname,idname,1, fnName);
-
-        err = idtype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column id:'|| idname, ' Expected type of '|| idname || ' is integer,smallint or bigint but '||idtype||' was found');
-
-        err = sourcetype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column source:'|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-        err = targettype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column target:'|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or bigint but '||targettype||' was found');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         raise debug '%',query;
-         EXECUTE query INTO sridinfo;
-
-         err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-         perform _pgr_onError(err, 2, fnName,
-	     'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-
-         srid := sridinfo.srid;
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking and creating indices in edge table';
-        perform _pgr_createIndex(sname, tname , idname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-
-        gname=quote_ident(gname);
-        idname=quote_ident(idname);
-        sourcename=quote_ident(sourcename);
-        targetname=quote_ident(targetname);
-      raise DEBUG '     --> OK';
-
-
-
-
-
-    BEGIN
-        -- issue #193 & issue #210 & #213
-        -- this sql is for trying out the where clause
-        -- the select * is to avoid any column name conflicts
-        -- limit 1, just try on first record
-        -- if the where clasuse is ill formed it will be caught in the exception
-        sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-        EXECUTE sql into dummyRec;
-        -- end
-
-        -- if above where clasue works this one should work
-        -- any error will be caught by the exception also
-        sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NOT NULL AND '||
-	    idname||' IS NOT NULL)=false '||rows_where;
-        EXECUTE SQL  into notincluded;
-
-        if clean then
-            raise debug 'Cleaning previous Topology ';
-               execute 'UPDATE ' || _pgr_quote_ident(tabname) ||
-               ' SET '||sourcename||' = NULL,'||targetname||' = NULL';
-        else
-            raise debug 'Creating topology for edges with non assigned topology';
-            if rows_where=' AND (true)' then
-                rows_where=  ' and ('||quote_ident(sourcename)||' is null or '||quote_ident(targetname)||' is  null)';
-            end if;
-        end if;
-        -- my thoery is that the select Count(*) will never go through here
-        EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-             RAISE NOTICE '%',sql;
-             RETURN 'FAIL';
-    END;
-
-    BEGIN
-         raise DEBUG 'initializing %',vertname;
-         execute 'select * from _pgr_getTableName('||quote_literal(vertname)
-                                                  || ',0,' || quote_literal(fnName) ||' )' into naming;
-         emptied = false;
-         set client_min_messages  to warning;
-         IF sname=naming.sname AND vname=naming.tname  THEN
-            if clean then
-                execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-                execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-                emptied = true;
-            end if;
-         ELSE -- table doesn't exist
-            execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-            emptied = true;
-         END IF;
-         IF (emptied) THEN
-             execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-	         quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-             perform _pgr_createIndex(vertname , 'the_geom'::text , 'gist'::text);
-         END IF;
-         execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id"}''::text[])' into naming;
-         execute 'set client_min_messages  to '|| debuglevel;
-         raise DEBUG  '  ------>OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: something went wrong when initializing the verties table';
-             RETURN 'FAIL';
-    END;
-
-
-
-    raise notice 'Creating Topology, Please wait...';
-        rowcount := 0;
-        FOR points IN EXECUTE 'SELECT ' || idname || '::bigint AS id,'
-            || ' _pgr_StartPoint(' || gname || ') AS source,'
-            || ' _pgr_EndPoint('   || gname || ') AS target'
-            || ' FROM '  || _pgr_quote_ident(tabname)
-            || ' WHERE ' || gname || ' IS NOT NULL AND ' || idname||' IS NOT NULL '||rows_where
-        LOOP
-
-            rowcount := rowcount + 1;
-            IF rowcount % 1000 = 0 THEN
-                RAISE NOTICE '% edges processed', rowcount;
-            END IF;
-
-
-            source_id := _pgr_pointToId(points.source, tolerance,vertname,srid);
-            target_id := _pgr_pointToId(points.target, tolerance,vertname,srid);
-            BEGIN
-                sql := 'UPDATE ' || _pgr_quote_ident(tabname) ||
-                    ' SET '||sourcename||' = '|| source_id::text || ','||targetname||' = ' || target_id::text ||
-                    ' WHERE ' || idname || ' =  ' || points.id::text;
-
-                IF sql IS NULL THEN
-                    RAISE NOTICE 'WARNING: UPDATE % SET source = %, target = % WHERE % = % ', tabname, source_id::text, target_id::text, idname,  points.id::text;
-                ELSE
-                    EXECUTE sql;
-                END IF;
-                EXCEPTION WHEN OTHERS THEN
-                    RAISE NOTICE '%', SQLERRM;
-                    RAISE NOTICE '%',sql;
-                    RETURN 'FAIL';
-            end;
-        END LOOP;
-        raise notice '-------------> TOPOLOGY CREATED FOR  % edges', rowcount;
-        RAISE NOTICE 'Rows with NULL geometry or NULL id: %',notincluded;
-        Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname), _pgr_quote_ident(vertname);
-        raise notice '----------------------------------------------';
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_createTopology(text, double precision,text,text,text,text,text,boolean)
-IS 'args: edge_table,tolerance, the_geom:=''the_geom'',source:=''source'', target:=''target'',rows_where:=''true'' - fills columns source and target in the geometry table and creates a vertices table for selected rows';
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
-RETURNS character varying AS
-$BODY$
-
-DECLARE
-    points record;
-    seg record;
-    naming record;
-    sridinfo record;
-    srid integer;
-    ecnt integer;
-    vertname text;
-    sname text;
-    tname text;
-    vname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    geotype text;
-    gname text;
-    tabName text;
-    flag boolean ;
-    query text;
-    selectionquery text;
-    i integer;
-    tot integer;
-    NumIsolated integer;
-    numdeadends integer;
-    numgaps integer;
-    NumCrossing integer;
-    numRings integer;
-    debuglevel text;
-
-
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeGraph(''%'',%,''%'',''%'',''%'',''%'',''%'')',edge_table,tolerance,the_geom,id,source,target,rows_where;
-  raise notice 'Performing checks, please wait ...';
-  execute 'show client_min_messages' into debuglevel;
-
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-    raise DEBUG '     --> OK';
-
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","cnt","chk"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET cnt=0 ,chk=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into idname     from _pgr_getColumnName(sname, tname,id,2);
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname, 2,
-                       'pgr_analyzeGraph',  'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-                       'Column names are OK');
-
-        raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-   BEGIN
-       raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         EXECUTE QUERY INTO sridinfo;
-
-         perform _pgr_onError( sridinfo IS NULL OR sridinfo.srid IS NULL,2,
-                 'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname,
-                 'SRID of '||gname||' is '||sridinfo.srid);
-
-         IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-             RAISE NOTICE ' Can not determine the srid of the geometry "%" in table %', the_geom,tabname;
-             RETURN 'FAIL';
-         END IF;
-         srid := sridinfo.srid;
-         raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM;--issue 210,211,213
-             RAISE NOTICE 'ERROR: something went wrong when checking for SRID of % in table %', the_geom,tabname;
-             RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-       raise debug 'Checking  indices in edge table';
-       perform _pgr_createIndex(tabname , idname , 'btree');
-       perform _pgr_createIndex(tabname , sourcename , 'btree');
-       perform _pgr_createIndex(tabname , targetname , 'btree');
-       perform _pgr_createIndex(tabname , gname , 'gist');
-
-       gname=quote_ident(gname);
-       sourcename=quote_ident(sourcename);
-       targetname=quote_ident(targetname);
-       idname=quote_ident(idname);
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking indices';
-          RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-        query='select count(*) from '||_pgr_quote_ident(tabname)||' where true  '||rows_where;
-        EXECUTE query into ecnt;
-        raise DEBUG '-->Rows Where condition: OK';
-        raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-            RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-            RAISE NOTICE 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-            RAISE NOTICE '%',query;
-            RETURN 'FAIL';
-    END;
-
-    selectionquery ='with
-           selectedRows as( (select '||sourcename||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||')
-                           union
-                           (select '||targetname||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||'))';
-
-
-
-
-
-   BEGIN
-       RAISE NOTICE 'Analyzing for dead ends. Please wait...';
-       query= 'with countingsource as (select a.'||sourcename||' as id,count(*) as cnts
-               from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||sourcename||')
-                     ,countingtarget as (select a.'||targetname||' as id,count(*) as cntt
-                    from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||targetname||')
-                   ,totalcount as (select id,case when cnts is null and cntt is null then 0
-                                                   when cnts is null then cntt
-                                                   when cntt is null then cnts
-                                                   else cnts+cntt end as totcnt
-                                   from ('||_pgr_quote_ident(vertname)||' as a left
-                                   join countingsource as t using(id) ) left join countingtarget using(id))
-               update '||_pgr_quote_ident(vertname)||' as a set cnt=totcnt from totalcount as b where a.id=b.id';
-       raise debug '%',query;
-       execute query;
-       query=selectionquery||'
-              SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE cnt=1 and id in (select id from selectedRows)';
-       raise debug '%',query;
-       execute query  INTO numdeadends;
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-          RAISE NOTICE 'ERROR: something went wrong when analizing for dead ends';
-          RETURN 'FAIL';
-   END;
-
-
-
-    BEGIN
-          RAISE NOTICE 'Analyzing for gaps. Please wait...';
-          query = 'with
-                   buffer as (select id,st_buffer(the_geom,'||tolerance||') as buff from '||_pgr_quote_ident(vertname)||' where cnt=1)
-                   ,veryclose as (select b.id,st_crosses(a.'||gname||',b.buff) as flag
-                   from  (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) as a
-                   join buffer as b on (a.'||gname||'&&b.buff)
-                   where '||sourcename||'!=b.id and '||targetname||'!=b.id )
-                   update '||_pgr_quote_ident(vertname)||' set chk=1 where id in (select distinct id from veryclose where flag=true)';
-          raise debug '%' ,query;
-          execute query;
-          GET DIAGNOSTICS  numgaps= ROW_COUNT;
-          raise DEBUG '     --> OK';
-          EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for gaps';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for isolated edges. Please wait...';
-        query=selectionquery|| ' SELECT count(*) FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' )  as a,
-                                                 '||_pgr_quote_ident(vertname)||' as b,
-                                                 '||_pgr_quote_ident(vertname)||' as c
-                            WHERE b.id in (select id from selectedRows) and a.'||sourcename||' =b.id
-                            AND b.cnt=1 AND a.'||targetname||' =c.id
-                            AND c.cnt=1';
-        raise debug '%' ,query;
-        execute query  INTO NumIsolated;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for isolated edges';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for ring geometries. Please wait...';
-        execute 'SELECT geometrytype('||gname||')  FROM '||_pgr_quote_ident(tabname) limit 1 into geotype;
-        IF (geotype='MULTILINESTRING') THEN
-            query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                 WHERE true  '||rows_where||' and st_isRing(st_linemerge('||gname||'))';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        ELSE query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                  WHERE true  '||rows_where||' and st_isRing('||gname||')';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        END IF;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for ring geometries';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for intersections. Please wait...';
-        query = 'select count(*) from (select distinct case when a.'||idname||' < b.'||idname||' then a.'||idname||'
-                                                        else b.'||idname||' end,
-                                                   case when a.'||idname||' < b.'||idname||' then b.'||idname||'
-                                                        else a.'||idname||' end
-                                    FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as a
-                                    JOIN (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as b
-                                    ON (a.'|| gname||' && b.'||gname||')
-                                    WHERE a.'||idname||' != b.'||idname|| '
-                                        and (a.'||sourcename||' in (b.'||sourcename||',b.'||targetname||')
-                                              or a.'||targetname||' in (b.'||sourcename||',b.'||targetname||')) = false
-                                        and st_intersects(a.'||gname||', b.'||gname||')=true) as d ';
-        raise debug '%' ,query;
-        execute query  INTO numCrossing;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for intersections';
-            RETURN 'FAIL';
-    END;
-
-
-
-
-    RAISE NOTICE '            ANALYSIS RESULTS FOR SELECTED EDGES:';
-    RAISE NOTICE '                  Isolated segments: %', NumIsolated;
-    RAISE NOTICE '                          Dead ends: %', numdeadends;
-    RAISE NOTICE 'Potential gaps found near dead ends: %', numgaps;
-    RAISE NOTICE '             Intersections detected: %',numCrossing;
-    RAISE NOTICE '                    Ring geometries: %',numRings;
-
-
-    RETURN 'OK';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_analyzeGraph(text,double precision,text,text,text,text,text) IS 'args: edge_table, tolerance,the_geom:=''the_geom'',id:=''id'',source column:=''source'', target column:=''target'' rows_where:=''true'' - creates a vertices table based on the geometry for selected rows';
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzeOneway(
-   edge_table text,
-   s_in_rules TEXT[],
-   s_out_rules TEXT[],
-   t_in_rules TEXT[],
-   t_out_rules TEXT[],
-   two_way_if_null boolean default true,
-   oneway text default 'oneway',
-   source text default 'source',
-   target text default 'target')
-  RETURNS text AS
-$BODY$
-
-
-DECLARE
-    rule text;
-    ecnt integer;
-    instr text;
-    naming record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    owname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    vertname text;
-    debuglevel text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeOneway(''%'',''%'',''%'',''%'',''%'',''%'',''%'',''%'',%)',
-		edge_table, s_in_rules , s_out_rules, t_in_rules, t_out_rules, oneway, source ,target,two_way_if_null ;
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    raise DEBUG '     --> OK';
-    EXCEPTION WHEN raise_exception THEN
-      RAISE NOTICE 'ERROR: something went wrong checking the table name';
-      RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","ein","eout"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET eout=0 ,ein=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into owname from _pgr_getColumnName(sname, tname,oneway,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,owname) or  targetname=owname, 2,
-                       '_pgr_createToplogy',  'Two columns share the same name', 'Parameter names for oneway,source and target  must be different',
-                       'Column names are OK');
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-
-
-    RAISE NOTICE 'Analyzing graph for one way street errors.';
-
-    rule := CASE WHEN two_way_if_null
-            THEN owname || ' IS NULL OR '
-            ELSE '' END;
-
-    instr := '''' || array_to_string(s_in_rules, ''',''') || '''';
-       EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-      from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-     where a.id=b.'|| sourcename;
-
-    RAISE NOTICE 'Analysis 25%% complete ...';
-
-    instr := '''' || array_to_string(t_in_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 50%% complete ...';
-
-    instr := '''' || array_to_string(s_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-        where a.id=b.'|| sourcename;
-    RAISE NOTICE 'Analysis 75%% complete ...';
-
-    instr := '''' || array_to_string(t_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 100%% complete ...';
-
-    EXECUTE 'SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE ein=0 or eout=0' INTO ecnt;
-
-    RAISE NOTICE 'Found % potential problems in directionality' ,ecnt;
-
-    RETURN 'OK';
-
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_analyzeOneway(text,TEXT[],TEXT[], TEXT[],TEXT[],boolean,text,text,text)
-IS 'args:edge_table , s_in_rules , s_out_rules, t_in_rules , t_out_rules, two_way_if_null:= true, oneway:=''oneway'',source:= ''source'',target:=''target'' - Analizes the directionality of the edges based on the rules';
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createverticestable(
-   edge_table text,
-   the_geom text DEFAULT 'the_geom'::text,
-   source text DEFAULT 'source'::text,
-   target text DEFAULT 'target'::text,
-    rows_where text DEFAULT 'true'::text
-)
-  RETURNS text AS
-$BODY$
-DECLARE
-    naming record;
-    sridinfo record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    sourcename text;
-    targetname text;
-    query text;
-    ecnt bigint;
-    srid integer;
-    sourcetype text;
-    targettype text;
-    sql text;
-    totcount integer;
-    i integer;
-    notincluded integer;
-    included integer;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-
-
-BEGIN
-  fnName = 'pgr_createVerticesTable';
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_createVerticesTable(''%'',''%'',''%'',''%'',''%'')',edge_table,the_geom,source,target,rows_where;
-  execute 'show client_min_messages' into debuglevel;
-
-  raise notice 'Performing checks, please wait .....';
-
-  RAISE DEBUG 'Checking % exists',edge_table;
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-  raise debug '--> Edge table exists: OK';
-
-  raise debug 'Checking column names';
-    select * into sourcename from _pgr_getColumnName(sname, tname,source,2, fnName);
-    select * into targetname from _pgr_getColumnName(sname, tname,target,2, fnName);
-    select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2, fnName);
-
-
-    err = sourcename in (targetname,gname) or  targetname=gname;
-    perform _pgr_onError(err, 2, fnName,
-        'Two columns share the same name', 'Parameter names for the_geom,source and target  must be different');
-  raise debug '--> Column names: OK';
-
-  raise debug 'Checking column types in edge table';
-    select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-    select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-
-
-    err = sourcetype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column source: '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-    err = targettype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column target: '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found');
-
-  raise debug '-->Column types:OK';
-
-  raise debug 'Checking SRID of geometry column';
-     query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-        || ' FROM ' || _pgr_quote_ident(tabname)
-        || ' WHERE ' || quote_ident(gname)
-        || ' IS NOT NULL LIMIT 1';
-     raise debug '%',query;
-     EXECUTE query INTO sridinfo;
-
-     err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-     perform _pgr_onError(err, 2, fnName,
-         'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-     srid := sridinfo.srid;
-  raise DEBUG '     --> OK';
-
-  raise debug 'Checking and creating Indices';
-     perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-  raise DEBUG '-->Check and create indices: OK';
-
-     gname=quote_ident(gname);
-     sourcename=quote_ident(sourcename);
-     targetname=quote_ident(targetname);
-
-
-  BEGIN
-  raise debug 'Checking Condition';
-    -- issue #193 & issue #210 & #213
-    -- this sql is for trying out the where clause
-    -- the select * is to avoid any column name conflicts
-    -- limit 1, just try on first record
-    -- if the where clasuse is ill formed it will be caught in the exception
-    sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-    EXECUTE sql into dummyRec;
-    -- end
-
-    -- if above where clasue works this one should work
-    -- any error will be caught by the exception also
-    sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NULL or '||
-		sourcename||' is null or '||targetname||' is null)=true '||rows_where;
-    raise debug '%',sql;
-    EXECUTE SQL  into notincluded;
-    EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-
-
-
-  BEGIN
-     raise DEBUG 'initializing %',vertname;
-       execute 'select * from _pgr_getTableName('||quote_literal(vertname)||',0)' into naming;
-       IF sname=naming.sname  AND vname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-       ELSE
-           set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-       END IF;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-                quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-       execute 'CREATE INDEX '||quote_ident(vname||'_the_geom_idx')||' ON '||_pgr_quote_ident(vertname)||'  USING GIST (the_geom)';
-       execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-       EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Initializing vertex table';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise notice 'Populating %, please wait...',vertname;
-       sql= 'with
-		lines as ((select distinct '||sourcename||' as id, _pgr_startpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-		                  ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||')
-			union (select distinct '||targetname||' as id,_pgr_endpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-			          ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||'))
-		,numberedLines as (select row_number() OVER (ORDER BY id) AS i,* from lines )
-		,maxid as (select id,max(i) as maxi from numberedLines group by id)
-		insert into '||_pgr_quote_ident(vertname)||'(id,the_geom)  (select id,the_geom  from numberedLines join maxid using(id) where i=maxi order by id)';
-       RAISE debug '%',sql;
-       execute sql;
-       GET DIAGNOSTICS totcount = ROW_COUNT;
-
-       sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' a, '||_pgr_quote_ident(vertname)||' b
-            where '||sourcename||'=b.id and '|| targetname||' in (select id from '||_pgr_quote_ident(vertname)||')';
-       RAISE debug '%',sql;
-       execute sql into included;
-
-
-
-       execute 'select max(id) from '||_pgr_quote_ident(vertname) into ecnt;
-       execute 'SELECT setval('||quote_literal(vertname||'_id_seq')||','||coalesce(ecnt,1)||' , false)';
-       raise notice '  ----->   VERTICES TABLE CREATED WITH  % VERTICES', totcount;
-       raise notice '                                       FOR   %  EDGES', included+notincluded;
-       RAISE NOTICE '  Edges with NULL geometry,source or target: %',notincluded;
-       RAISE NOTICE '                            Edges processed: %',included;
-       Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname),_pgr_quote_ident(vertname);
-       raise notice '----------------------------------------------';
-    END;
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_createVerticesTable(text,text,text,text,text)
-IS 'args: edge_table, the_geom:=''the_geom'',source:=''source'', target:=''target'' rows_where:=''true'' - creates a vertices table based on the source and target identifiers for selected rows';
-
-
-CREATE OR REPLACE FUNCTION pgr_nodeNetwork(edge_table text, tolerance double precision,
-			id text default 'id', the_geom text default 'the_geom', table_ending text default 'noded',
-            rows_where text DEFAULT ''::text, outall boolean DEFAULT false) RETURNS text AS
-$BODY$
-DECLARE
-	
-	p_num int := 0;
-	p_ret text := '';
-    pgis_ver_old boolean := _pgr_versionless(postgis_lib_version(), '2.1.0.0');
-    vst_line_substring text;
-    vst_line_locate_point text;
-    intab text;
-    outtab text;
-    n_pkey text;
-    n_geom text;
-    naming record;
-    sname text;
-    tname text;
-    outname text;
-    srid integer;
-    sridinfo record;
-    splits bigint;
-    touched bigint;
-    untouched bigint;
-    geomtype text;
-    debuglevel text;
-    rows_where text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_nodeNetwork(''%'', %, ''%'', ''%'', ''%'', ''%'',  %)',
-    edge_table, tolerance, id,  the_geom, table_ending, rows_where, outall;
-  raise notice 'Performing checks, please wait .....';
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',0)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-	RAISE NOTICE '-------> % not found',edge_table;
-        RETURN 'FAIL';
-    ELSE
-	RAISE DEBUG '  -----> OK';
-    END IF;
-
-    intab=sname||'.'||tname;
-    outname=tname||'_'||table_ending;
-    outtab= sname||'.'||outname;
-    rows_where = CASE WHEN length(rows_where) > 2 and not outall THEN ' AND (' || rows_where || ')' ELSE '' END;
-    rows_where = CASE WHEN length(rows_where) > 2 THEN ' WHERE (' || rows_where || ')' ELSE '' END;
-  END;
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',id,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(id)||')' INTO n_pkey;
-       IF n_pkey is NULL then
-          raise notice  'ERROR: id column "%"  not found in %',id,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',the_geom,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(the_geom)||')' INTO n_geom;
-       IF n_geom is NULL then
-          raise notice  'ERROR: the_geom  column "%"  not found in %',the_geom,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-  IF n_pkey=n_geom THEN
-	raise notice  'ERROR: id and the_geom columns have the same name "%" in %',n_pkey,intab;
-        RETURN 'FAIL';
-  END IF;
-
-  BEGIN
-       	raise DEBUG 'Checking the SRID of the geometry "%"', n_geom;
-       	EXECUTE 'SELECT ST_SRID(' || quote_ident(n_geom) || ') as srid '
-          		|| ' FROM ' || _pgr_quote_ident(intab)
-          		|| ' WHERE ' || quote_ident(n_geom)
-          		|| ' IS NOT NULL LIMIT 1' INTO sridinfo;
-       	IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-        	RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           	RETURN 'FAIL';
-       	END IF;
-       	srid := sridinfo.srid;
-       	raise DEBUG '  -----> SRID found %',srid;
-       	EXCEPTION WHEN OTHERS THEN
-           		RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           		RETURN 'FAIL';
-  END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_pkey,intab;
-      if (_pgr_isColumnIndexed(intab,n_pkey)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding  index "%_%_idx".',n_pkey,intab;
-
-	set client_min_messages  to warning;
-        execute 'create  index '||tname||'_'||n_pkey||'_idx on '||_pgr_quote_ident(intab)||' using btree('||quote_ident(n_pkey)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_geom,intab;
-      if (_pgr_iscolumnindexed(intab,n_geom)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding unique index "%_%_gidx".',intab,n_geom;
-	set client_min_messages  to warning;
-        execute 'CREATE INDEX '
-            || quote_ident(tname || '_' || n_geom || '_gidx' )
-            || ' ON ' || _pgr_quote_ident(intab)
-            || ' USING gist (' || quote_ident(n_geom) || ')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
----------------
-    BEGIN
-       raise DEBUG 'initializing %',outtab;
-       execute 'select * from _pgr_getTableName('||quote_literal(outtab)||',0)' into naming;
-       IF sname=naming.sname  AND outname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(outtab)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(outname)||','||quote_literal(n_geom)||')';
-       ELSE
-	   set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(outtab)||' (id bigserial PRIMARY KEY,old_id integer,sub_id integer,
-								source bigint,target bigint)';
-       END IF;
-       execute 'select geometrytype('||quote_ident(n_geom)||') from  '||_pgr_quote_ident(intab)||' limit 1' into geomtype;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(outname)||','||
-                quote_literal(n_geom)||','|| srid||', '||quote_literal(geomtype)||', 2)';
-       execute 'CREATE INDEX '||quote_ident(outname||'_'||n_geom||'_idx')||' ON '||_pgr_quote_ident(outtab)||'  USING GIST ('||quote_ident(n_geom)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-    END;
-----------------
-
-
-  raise notice 'Processing, please wait .....';
-
-
-    if pgis_ver_old then
-        vst_line_substring    := 'st_line_substring';
-        vst_line_locate_point := 'st_line_locate_point';
-    else
-        vst_line_substring    := 'st_linesubstring';
-        vst_line_locate_point := 'st_linelocatepoint';
-    end if;
-
---    -- First creates temp table with intersection points
-    p_ret = 'create temp table intergeom on commit drop as (
-        select l1.' || quote_ident(n_pkey) || ' as l1id,
-               l2.' || quote_ident(n_pkey) || ' as l2id,
-	       l1.' || quote_ident(n_geom) || ' as line,
-	       _pgr_startpoint(l2.' || quote_ident(n_geom) || ') as source,
-	       _pgr_endpoint(l2.' || quote_ident(n_geom) || ') as target,
-               st_intersection(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ') as geom
-        from (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l1
-             join (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l2
-             on (st_dwithin(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ', ' || tolerance || '))'||
-        'where l1.' || quote_ident(n_pkey) || ' <> l2.' || quote_ident(n_pkey)||' and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false  )';
-    raise debug '%',p_ret;
-    EXECUTE p_ret;
-
-    -- second temp table with locus (index of intersection point on the line)
-    -- to avoid updating the previous table
-    -- we keep only intersection points occurring onto the line, not at one of its ends
---    drop table if exists inter_loc;
-
---HAD TO CHANGE THIS QUERY
--- p_ret= 'create temp table inter_loc on commit drop as (
---        select l1id, l2id, ' || vst_line_locate_point || '(line,point) as locus from (
---        select DISTINCT l1id, l2id, line, (ST_DumpPoints(geom)).geom as point from intergeom) as foo
---        where ' || vst_line_locate_point || '(line,point)<>0 and ' || vst_line_locate_point || '(line,point)<>1)';
-    p_ret= 'create temp table inter_loc on commit drop as ( select * from (
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,source) as locus from intergeom)
-         union
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,target) as locus from intergeom)) as foo
-        where locus<>0 and locus<>1)';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-
-    -- index on l1id
-    create index inter_loc_id_idx on inter_loc(l1id);
-
-    -- Then computes the intersection on the lines subset, which is much smaller than full set
-    -- as there are very few intersection points
-
---- outab needs to be formally created with id, old_id, subid,the_geom, source,target
----  so it can be inmediatly be used with createTopology
-
---   EXECUTE 'drop table if exists ' || _pgr_quote_ident(outtab);
---   EXECUTE 'create table ' || _pgr_quote_ident(outtab) || ' as
-     P_RET = 'insert into '||_pgr_quote_ident(outtab)||' (old_id,sub_id,'||quote_ident(n_geom)||') (  with cut_locations as (
-           select l1id as lid, locus
-           from inter_loc
-           -- then generates start and end locus for each line that have to be cut buy a location point
-           UNION ALL
-           select i.l1id  as lid, 0 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           UNION ALL
-           select i.l1id  as lid, 1 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           order by lid, locus
-       ),
-       -- we generate a row_number index column for each input line
-       -- to be able to self-join the table to cut a line between two consecutive locations
-       loc_with_idx as (
-           select lid, locus, row_number() over (partition by lid order by locus) as idx
-           from cut_locations
-       )
-       -- finally, each original line is cut with consecutive locations using linear referencing functions
-       select l.' || quote_ident(n_pkey) || ', loc1.idx as sub_id, ' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus) as ' || quote_ident(n_geom) || '
-       from loc_with_idx loc1 join loc_with_idx loc2 using (lid) join ' || _pgr_quote_ident(intab) || ' l on (l.' || quote_ident(n_pkey) || ' = loc1.lid)
-       where loc2.idx = loc1.idx+1
-           -- keeps only linestring geometries
-           and geometryType(' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus)) = ''LINESTRING'') ';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-	GET DIAGNOSTICS splits = ROW_COUNT;
-        execute 'with diff as (select distinct old_id from '||_pgr_quote_ident(outtab)||' )
-                 select count(*) from diff' into touched;
-	-- here, it misses all original line that did not need to be cut by intersection points: these lines
-	-- are already clean
-	-- inserts them in the final result: all lines which gid is not in the res table.
-	EXECUTE 'insert into ' || _pgr_quote_ident(outtab) || ' (old_id , sub_id, ' || quote_ident(n_geom) || ')
-                ( with used as (select distinct old_id from '|| _pgr_quote_ident(outtab)||')
-		select ' ||  quote_ident(n_pkey) || ', 1 as sub_id, ' ||  quote_ident(n_geom) ||
-		' from '|| _pgr_quote_ident(intab) ||' where  '||quote_ident(n_pkey)||' not in (select * from used)' || rows_where || ')';
-	GET DIAGNOSTICS untouched = ROW_COUNT;
-
-	raise NOTICE '  Split Edges: %', touched;
-	raise NOTICE ' Untouched Edges: %', untouched;
-	raise NOTICE '     Total original Edges: %', touched+untouched;
-        RAISE NOTICE ' Edges generated: %', splits;
-	raise NOTICE ' Untouched Edges: %',untouched;
-	raise NOTICE '       Total New segments: %', splits+untouched;
-        RAISE NOTICE ' New Table: %', outtab;
-        RAISE NOTICE '----------------------------------';
-
-    drop table  if exists intergeom;
-    drop table if exists inter_loc;
-    RETURN 'OK';
-END;
-$BODY$
-    LANGUAGE 'plpgsql' VOLATILE STRICT COST 100;
-
-
-COMMENT ON FUNCTION pgr_nodeNetwork(text, double precision, text, text, text, text, boolean )
- IS  'edge_table, tolerance, id:=''id'', the_geom:=''the_geom'', table_ending:=''noded'' ';
-
-
-CREATE OR REPLACE FUNCTION pgr_labelGraph(
-                edge_table text,
-                id text default 'id',
-                source text default 'source',
-                target text default 'target',
-                subgraph text default 'subgraph',
-                rows_where text default 'true'
-        )
-        RETURNS character varying AS
-$BODY$
-
-DECLARE
-        naming record;
-        schema_name text;
-        table_name text;
-        garbage text;
-        incre integer;
-        table_schema_name text;
-        query text;
-        ecnt integer;
-        sql1 text;
-        rec1 record;
-        sql2 text;
-        rec2 record;
-        rec_count record;
-        rec_single record;
-        graph_id integer;
-        gids int [];
-
-BEGIN
-        raise notice 'Processing:';
-        raise notice 'pgr_brokenGraph(''%'',''%'',''%'',''%'',''%'',''%'')', edge_table,id,source,target,subgraph,rows_where;
-        raise notice 'Performing initial checks, please hold on ...';
-
-        Raise Notice 'Starting - Checking table ...';
-        BEGIN
-                raise debug 'Checking % table existance', edge_table;
-                execute 'select * from pgr_getTableName('|| quote_literal(edge_table) ||')' into naming;
-                schema_name = naming.sname;
-                table_name = naming.tname;
-                table_schema_name = schema_name||'.'||table_name;
-                IF schema_name is null then
-                        raise notice 'no schema';
-                        return 'FAIL';
-                else
-                        if table_name is null then
-                                raise notice 'no table';
-                                return 'FAIL';
-                        end if;
-                end if;
-        END;
-        Raise Notice 'Ending - Checking table';
-
-        Raise Notice 'Starting - Checking columns';
-        BEGIN
-                raise debug 'Checking exitance of necessary columns inside % table', edge_table;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(id) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no id column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(source) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no source column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(target) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no target column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(subgraph) ||')' into naming;
-                if naming.pgr_iscolumnintable = 't' then
-                        raise notice 'subgraph column already in the table';
-                        return 'FAIL';
-                end if;
-        END;
-        Raise Notice 'Ending - Checking columns';
-
-        Raise Notice 'Starting - Checking rows_where condition';
-        BEGIN
-                raise debug 'Checking rows_where condition';
-                query='select count(*) from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where;
-                execute query into ecnt;
-                raise debug '-->Rows where condition: OK';
-                raise debug '    --> OK';
-                EXCEPTION WHEN OTHERS THEN
-                        raise notice 'Got %', SQLERRM;
-                        Raise notice 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-                        Raise notice '%', query;
-                        return 'FAIL';
-        END;
-        Raise Notice 'Ending - Checking rows_where condition';
-
-        garbage := 'garbage001';
-        incre := 1;
-        Raise Notice 'Starting - Checking temporary column';
-        Begin
-                raise debug 'Checking Checking temporary columns existance';
-
-                While True
-                        Loop
-                                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(garbage) ||')' into naming;
-                                If naming.pgr_iscolumnintable = 't' THEN
-                                        incre := incre + 1;
-                                        garbage := 'garbage00'||incre||'';
-                                ELSE
-                                        EXIT;
-                                END IF;
-                        End Loop;
-        End;
-        Raise Notice 'Ending - Checking temporary column';
-
-        Raise Notice 'Starting - Calculating subgraphs';
-        BEGIN
-                --------- Add necessary columns ----------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(subgraph) || ' INTEGER DEFAULT -1';
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(garbage) || ' INTEGER DEFAULT 0';
-                graph_id := 1;
-
-                EXECUTE 'select count(*) as count from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where ||'' into rec_count;
-                if rec_count.count = 0 then
-                        RETURN 'rows_where condition generated 0 rows';
-                end if;
-
-                WHILE TRUE
-                        LOOP
-                                ---------- Assign the very first -1 row graph_id ----------
-                                EXECUTE 'SELECT ' || pgr_quote_ident(id) || ' AS gid FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1 LIMIT 1' INTO rec_single;
-                                EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec_single.gid || '';
-
-                                --------- Search other rows with that particular graph_id -----------
-                                WHILE TRUE
-                                        LOOP
-                                                EXECUTE 'SELECT COUNT(*) FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0' into rec_count;
-                                                ----------- The following if else will check those rows which already have entertained ------------
-                                                IF (rec_count.count > 0) THEN
-                                                        sql1 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0';
-                                                        FOR rec1 IN EXECUTE sql1
-                                                                LOOP
-                                                                        sql2 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| pgr_quote_ident(source) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(source) ||' = '|| rec1.target ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.target ||'';
-                                                                        FOR rec2 IN EXECUTE sql2
-                                                                                LOOP
-                                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec2.gid || '';
-                                                                                END LOOP;
-                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(garbage) || ' = 1 WHERE ' || pgr_quote_ident(id) || ' = ' || rec1.gid || '';
-                                                                END LOOP;
-                                                ELSE
-                                                        EXIT;
-                                                END IF;
-                                        END LOOP;
-
-                                ------ Following is to exit the while loop. 0 means no more -1 id.
-                                EXECUTE 'SELECT COUNT(*) AS count FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1' INTO rec_count;
-                                If (rec_count.count = 0) THEN
-                                        EXIT;
-                                ELSE
-                                        graph_id := graph_id + 1;
-                                END IF;
-                        END LOOP;
-
-                ----------- Drop garbage column ------------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' DROP COLUMN ' || pgr_quote_ident(garbage) ||'';
-                Raise Notice 'Successfully complicated calculating subgraphs';
-        END;
-        Raise Notice 'Ending - Calculating subgraphs';
-
-        RETURN 'OK';
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCostMatrix(
-    edges_sql TEXT,
-    points_sql TEXT,
-    pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_pid, a.end_pid, a.agg_cost
-        FROM _pgr_withPoints($1, $2, $3, $3, $4,  $5, TRUE, TRUE) AS a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
---  DIJKSTRA DMatrix
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2, $2, $3, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
---  BIDIRECTIONAL DIJKSTRA Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_astarCostMatrix(
-    edges_sql TEXT, -- XY edges sql
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2, $2, $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
---  BIDIRECTIONAL ASTAR Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdAstarCostMatrix(
-    edges_sql TEXT,
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_bdAstarCostMatrix(TEXT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCostMatrix';
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_getTableName(IN tab text,OUT sname text,OUT tname text)
-RETURNS RECORD AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getTableName: This function will no longer be soported';
-    select * from _pgr_getTableName(tab, 0, 'pgr_getTableName') into sname,tname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_getColumnName(tab text, col text)
-RETURNS text AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getColumnName: This function will no longer be soported';
-    return _pgr_getColumnName(tab,col, 0, 'pgr_getColumnName');
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    select * from _pgr_getColumnName(tab,col,0, 'pgr_isColumnInTable') into cname;
-    return  cname IS not NULL;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnIndexed(tab text, col text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnIndexed: This function will no longer be soported';
-    return  _pgr_isColumnIndexed(tab,col);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-create or replace function pgr_quote_ident(idname text)
-returns text as
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    return  _pgr_quote_ident(idname);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_versionless(v1 text, v2 text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_versionless: This function will no longer be soported';
-    return  _pgr_versionless(v1,v2);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-create or replace function pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_startPoint: This function will no longer be soported';
-    return  _pgr_startPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_endPoint: This function will no longer be soported';
-    return  _pgr_endPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspJohnson(edges_sql text)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_johnson instead';
-      has_reverse =_pgr_parameter_check('johnson', edges_sql, false);
-      sql = edges_sql;
-      IF (has_reverse) THEN
-           RAISE NOTICE 'reverse_cost column found, removing.';
-           sql = 'SELECT source, target, cost FROM (' || edges_sql || ') a';
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () - 1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_johnson(sql, TRUE);
-  END
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspWarshall(edges_sql text, directed boolean, has_rcost boolean)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_floydWarshall instead';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-      sql := edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         ELSE raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () -1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_floydWarshall(sql, directed);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_astar(edges_sql TEXT, source_id INTEGER, target_id INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated signature pgr_astar(text, integer, integer, boolean, boolean)';
-    has_reverse =_pgr_parameter_check('astar', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost, x1,y1, x2, y2 FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-    FROM pgr_astar(sql, ARRAY[$2], ARRAY[$3], directed);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    sql TEXT,
-    source_vid INTEGER,
-    target_vid INTEGER,
-    directed BOOLEAN,
-    has_reverse_cost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdAstar';
-    has_reverse =_pgr_parameter_check('astar', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdAstar(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(edges_sql TEXT, start_vid INTEGER, end_vid INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdDijkstra';
-    has_reverse =_pgr_parameter_check('dijkstra', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdDijkstra(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstraPath(
-    sql text,
-    source INTEGER,
-    targets INTEGER ARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-    RETURNS SETOF pgr_costResult3 AS
-    $BODY$
-    DECLARE
-    has_reverse BOOLEAN;
-    new_sql TEXT;
-    result pgr_costResult3;
-    tmp pgr_costResult3;
-    sseq INTEGER;
-    i INTEGER;
-    BEGIN
-        RAISE NOTICE 'Deprecated function: Use pgr_dijkstra instead.';
-        has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-        new_sql = sql;
-        IF (array_ndims(targets) != 1) THEN
-            raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-
-        IF (has_reverse != has_rcost) THEN
-            IF (has_reverse) THEN
-                new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-            ELSE
-                raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-                USING ERRCODE = 'XX000';
-            END IF;
-        END IF;
-        SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-        sseq = 0; i = 1;
-        FOR result IN
-            SELECT seq, a.end_vid::INTEGER AS id1, a.node::INTEGER AS i2, a.edge::INTEGER AS id3, cost
-            FROM pgr_dijkstra(new_sql, source, targets, directed) a ORDER BY a.end_vid, seq LOOP
-            WHILE (result.id1 != targets[i]) LOOP
-                tmp.seq = sseq;
-                tmp.id1 = targets[i];
-                IF (targets[i] = source) THEN
-                    tmp.id2 = source;
-                    tmp.cost =0;
-                ELSE
-                    tmp.id2 = 0;
-                    tmp.cost = -1;
-                END IF;
-                tmp.id3 = -1;
-                RETURN next tmp;
-                i = i + 1;
-                sseq = sseq + 1;
-            END LOOP;
-        IF (result.id1 = targets[i] AND result.id3 != -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-        IF (result.id1 = targets[i] AND result.id3 = -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.id2 = source;
-            tmp.cost = 0;
-        ELSE
-            tmp.id2 = 0;
-            tmp.cost = -1;
-        END IF;
-        tmp.id3 = -1;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstracost(
-    sql text,
-    source INTEGER,
-    targets INTEGER array,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-result pgr_costResult;
-tmp pgr_costResult;
-sseq INTEGER;
-i INTEGER;
-BEGIN
-    RAISE NOTICE 'Deprecated function. Use pgr_dijkstraCost instead.';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    new_sql = sql;
-    IF (array_ndims(targets) != 1) THEN
-        raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-        USING ERRCODE = 'XX000';
-    END IF;
-
-
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-    sseq = 0; i = 1;
-    FOR result IN
-        SELECT ((row_number() over()) -1)::INTEGER, a.start_vid::INTEGER, a.end_vid::INTEGER, agg_cost
-        FROM pgr_dijkstraCost(new_sql, source, targets, directed) a ORDER BY end_vid LOOP
-        WHILE (result.id2 != targets[i]) LOOP
-            tmp.seq = sseq;
-            tmp.id1 = source;
-            tmp.id2 = targets[i];
-            IF (targets[i] = source) THEN
-                tmp.cost = 0;
-            ELSE
-                tmp.cost = -1;
-            END IF;
-            RETURN next tmp;
-            i = i + 1;
-            sseq = sseq + 1;
-        END LOOP;
-        IF (result.id2 = targets[i]) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = source;
-        tmp.id2 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.cost = 0;
-        ELSE
-            tmp.cost = -1;
-        END IF;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-create or replace function pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    returns integer as
-$body$
-
-declare
-    rr record;
-    pct float;
-    debuglevel text;
-
-begin
-    -- find the closest edge within tol distance
-    execute 'select * from ' || _pgr_quote_ident(edges) ||
-            ' where st_dwithin(''' || pnt::text ||
-            '''::geometry, the_geom, ' || tol || ') order by st_distance(''' || pnt::text ||
-            '''::geometry, the_geom) asc limit 1' into rr;
-
-    if rr.the_geom is not null then
-        -- deal with MULTILINESTRINGS
-        if geometrytype(rr.the_geom)='MULTILINESTRING' THEN
-            rr.the_geom := ST_GeometryN(rr.the_geom, 1);
-        end if;
-
-        -- project the point onto the linestring
-        execute 'show client_min_messages' into debuglevel;
-        SET client_min_messages='ERROR';
-        pct := st_line_locate_point(rr.the_geom, pnt);
-        execute 'set client_min_messages  to '|| debuglevel;
-
-        -- return the node we are closer to
-        if pct < 0.5 then
-            return rr.source;
-        else
-            return rr.target;
-        end if;
-    else
-        -- return a failure to find an edge within tol distance
-        return -1;
-    end if;
-end;
-$body$
-  language plpgsql volatile
-  cost 5;
-
-
-----------------------------------------------------------------------------
-
-create or replace function pgr_flipedges(ga geometry[])
-    returns geometry[] as
-$body$
-
-declare
-    nn integer;
-    i integer;
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_flipEdges';
-    -- get the count of edges, and return if only one edge
-    nn := array_length(ga, 1);
-    if nn=1 then
-        return ga;
-    end if;
-
-    -- determine if first needs to be flipped
-    g := _pgr_startpoint(ga[1]);
-
-    -- if the start of the first is connected to the second then it needs to be flipped
-    if _pgr_startpoint(ga[2])=g or _pgr_endpoint(ga[2])=g then
-        ga[1] := st_reverse(ga[1]);
-    end if;
-    g := _pgr_endpoint(ga[1]);
-
-    -- now if  the end of the last edge matchs the end of the current edge we need to flip it
-    for i in 2 .. nn loop
-        if _pgr_endpoint(ga[i])=g then
-            ga[i] := st_reverse(ga[i]);
-        end if;
-        -- save the end of this edge into the last end for the next cycle
-        g := _pgr_endpoint(ga[i]);
-    end loop;
-
-    return ga;
-end;
-$body$
-    language plpgsql immutable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_texttopoints(pnts text, srid integer DEFAULT(4326))
-    returns geometry[] as
-$body$
-
-declare
-    a text[];
-    t text;
-    p geometry;
-    g geometry[];
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_textToPoints';
-    -- convert commas to space and split on ';'
-    a := string_to_array(replace(pnts, ',', ' '), ';');
-    -- convert each 'x y' into a point geometry and concattenate into a new array
-    for t in select unnest(a) loop
-        p := st_pointfromtext('POINT(' || t || ')', srid);
-        g := g || p;
-    end loop;
-
-    return g;
-end;
-$body$
-    language plpgsql immutable;
-
------------------------------------------------------------------------
-
-create or replace function pgr_pointstovids(pnts geometry[], edges text, tol float8 DEFAULT(0.01))
-    returns integer[] as
-$body$
-
-declare
-    v integer[];
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_pointsToVids';
-    -- cycle through each point and locate the nearest edge and vertex on that edge
-    for g in select unnest(pnts) loop
-        v := v || pgr_pointtoedgenode(edges, g, tol);
-    end loop;
-
-    return v;
-end;
-$body$
-    language plpgsql stable;
-
-
-create or replace function pgr_pointstodmatrix(pnts geometry[], mode integer default (0), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    r record;
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_pointsToDMatrix';
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    -- create an id for each point in the array and unnest it into a table nodes in the with clause
-    for r in with nodes as (select row_number() over()::integer as id, p from (select unnest(pnts) as p) as foo)
-        -- compute a row of distances
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j,
-                case when mode=0
-                    then st_distance(a.p, b.p)
-                    else st_distance_sphere(a.p, b.p)
-                end as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i loop
-
-        -- you must concat an array[array[]] to make dmatrix[][]
-        -- concat the row of distances to the dmatrix
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-end;
-$body$
-    language plpgsql stable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_vidstodmatrix(IN vids integer[], IN pnts geometry[], IN edges text, tol float8 DEFAULT(0.1), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    i integer;
-    j integer;
-    nn integer;
-    rr record;
-    bbox geometry;
-    t float8[];
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    -- check if the input arrays has any -1 values, maybe this whould be a raise exception
-    if vids @> ARRAY[-1] then
-    raise notice 'Some vids are undefined (-1)!';
-    dmatrix := null;
-    ids := null;
-    return;
-    end if;
-
-    ids := vids;
-
-    -- get the count of nodes
-    nn := array_length(vids,1);
-
-    -- zero out a dummy row
-    for i in 1 .. nn loop
-        t := t || 0.0::float8;
-    end loop;
-
-    -- using the dummy row, zero out the whole matrix
-    for i in 1 .. nn loop
-    dmatrix := dmatrix || ARRAY[t];
-    end loop;
-
-    for i in 1 .. nn-1 loop
-        j := i;
-        -- compute the bbox for the point needed for this row
-        select st_expand(st_collect(pnts[id]), tol) into bbox
-          from (select generate_series as id from generate_series(i, nn)) as foo;
-
-        -- compute kdijkstra() for this row
-        for rr in execute 'select * from pgr_dijkstracost($1, $2, $3, false)'
-                  using 'select id, source, target, cost from ' || edges ||
-                        ' where the_geom && ''' || bbox::text || '''::geometry'::text, vids[i], vids[i+1:nn] loop
-
-            -- TODO need to check that all node were reachable from source
-            -- I think unreachable paths between nodes returns cost=-1.0
-
-            -- populate the matrix with the cost values, remember this is symmetric
-            j := j + 1;
-            -- raise notice 'cost(%,%)=%', i, j, rr.agg_cost;
-            dmatrix[i][j] := rr.agg_cost;
-            dmatrix[j][i] := rr.agg_cost;
-        end loop;
-    end loop;
-
-end;
-$body$
-    language plpgsql stable cost 200;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_vidsToDMatrix(sql TEXT, vids  INTEGER[], dir BOOLEAN, has_rcost BOOLEAN, want_symmetric BOOLEAN)
-RETURNS float8[] AS
-$BODY$
-DECLARE
-directed BOOLEAN;
-has_reverse BOOLEAN;
-edges_sql TEXT;
-dmatrix_row float8[];
-dmatrix float8[];
-cell RECORD;
-unique_vids INTEGER[];
-total BIGINT;
-from_v BIGINT;
-to_v BIGINT;
-BEGIN
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql = sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    unique_vids :=  ARRAY(SELECT DISTINCT UNNEST(vids) ORDER BY 1);
-
-    IF want_symmetric THEN
-        directed = false;
-    ELSE
-        directed = dir;
-    END IF;
-
-    total := array_length(unique_vids, 1);
-
-    -- initializing dmatrix
-    FOR i in 1 .. total LOOP
-        dmatrix_row := dmatrix_row || '+Infinity'::float8;
-    END LOOP;
-    FOR i in 1 .. total LOOP
-    dmatrix := dmatrix || ARRAY[dmatrix_row];
-    dmatrix[i][i] = 0;
-    END LOOP;
-
-    CREATE TEMP TABLE __x___y____temp AS
-        WITH result AS
-            (SELECT unnest(unique_vids) AS vid)
-        SELECT row_number() OVER() AS idx, vid FROM result;
-
-    FOR cell IN SELECT * FROM pgr_dijkstraCostMatrix(sql, unique_vids, directed) LOOP
-        SELECT idx INTO from_v FROM __x___y____temp WHERE vid =  cell.start_vid;
-        SELECT idx INTO to_v FROM __x___y____temp WHERE vid =  cell.end_vid;
-
-        dmatrix[from_v][to_v] = cell.agg_cost;
-        dmatrix[to_v][from_v] = cell.agg_cost;
-    END LOOP;
-
-    DROP TABLE IF EXISTS __x___y____temp;
-    RETURN dmatrix;
-
-    EXCEPTION WHEN others THEN
-       DROP TABLE IF EXISTS __x___y____temp;
-       raise exception '% %', SQLERRM, SQLSTATE;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated function';
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_dijkstra(sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_dijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN) IS 'pgr_dijkstra(Deprecated signature)';
-
-
-
-
-
--- OLD SIGNATURE
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(edges_sql text, source BIGINT, distance FLOAT, directed BOOLEAN, has_rcost BOOLEAN)
-  RETURNS SETOF pgr_costresult AS
-  $BODY$
-  DECLARE
-  has_reverse BOOLEAN;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function';
-
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, FALSE);
-
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-             -- the user says it doesn't have reverse cost but its false
-             -- removing from query
-             RAISE NOTICE 'Contradiction found: has_rcost set to false but reverse_cost column found';
-             sql = 'SELECT id, source, target, cost, -1 as reverse_cost FROM (' || edges_sql || ') __q ';
-         ELSE
-             -- the user says it has reverse cost but its false
-             -- can't do anything
-             RAISE EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query SELECT seq - 1 AS seq, node::integer AS id1, edge::integer AS id2, agg_cost AS cost
-                FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maximumcardinalitymatching(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---INTERNAL FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
-------------------------
--- deprecated signatures
------------------------
-
-COMMENT ON FUNCTION pgr_astar(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_astar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdAstar( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdAstar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdDijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdDijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_dijkstra(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_dijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_drivingDistance(text,  BIGINT,  FLOAT8,  BOOLEAN,  BOOLEAN)
-    IS 'pgr_drivingDistance(Deprecated signature)';
-
-------------------------
--- Renamed /deprecated
------------------------
-COMMENT ON FUNCTION pgr_apspJohnson(TEXT)
-    IS 'pgr_apspJohnson(Renamed function) use pgr_Johnson instead';
-
-COMMENT ON FUNCTION pgr_apspWarshall(text, boolean, boolean)
-    IS 'pgr_apspWarshall(Renamed function) use pgr_floydWarshall instead';
-
-COMMENT ON FUNCTION pgr_kdijkstraPath( text, INTEGER, INTEGER ARRAY, BOOLEAN, BOOLEAN)
-    IS 'pgr_kdijkstraPath(Renamed function) use pgr_dijkstra instead';
-
-COMMENT ON FUNCTION pgr_kdijkstracost( text, INTEGER, INTEGER array, BOOLEAN, BOOLEAN)
-    IS 'pgr_kDijkstraCost(Renamed function) use pgr_dijkstraCost instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-
-
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-
-
-COMMENT ON FUNCTION pgr_gsoc_vrppdtw( text, INTEGER, INTEGER)
-    IS 'pgr_gsoc_vrppdtw(Renamed function) use pgr_pickDeliverEuclidean instead';
-
-------------------------
--- Deprecated functions
------------------------
-
-COMMENT ON FUNCTION pgr_flipedges(geometry[])
-    IS 'pgr_flipedges(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_texttopoints(text,  integer)
-    IS 'pgr_texttopoints(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstovids(pnts geometry[], edges text, tol float8)
-    IS 'pgr_pointstovids(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    IS 'pgr_pointtoedgenode(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstodmatrix(geometry[], integer)
-    IS 'pgr_pointstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidstodmatrix( integer[],  geometry[],  text, float8)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidsToDMatrix(TEXT,  INTEGER[], BOOLEAN, BOOLEAN, BOOLEAN)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-
-
-
-COMMENT ON FUNCTION pgr_getTableName(IN tab text)
-    IS 'pgr_getTableName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_getColumnName(tab text, col text)
-    IS 'pgr_getColumnName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnInTable(tab text, col text)
-    IS 'pgr_isColumnInTable(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnIndexed(tab text, col text)
-    IS 'pgr_isColumnIndexed(Deprecated function)';
-
-
-COMMENT ON FUNCTION pgr_quote_ident(idname text)
-    IS 'pgr_quote_ident(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_versionless(v1 text, v2 text)
-    IS 'pgr_versionless(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_startPoint(g geometry)
-    IS 'pgr_startPoint(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_endPoint(g geometry)
-    IS 'pgr_endPoint(Deprecated function)';
-
-
diff --git a/tools/sql-update-scripts/pgrouting--2.2.2--2.5.2.sql b/tools/sql-update-scripts/pgrouting--2.2.2--2.5.2.sql
deleted file mode 100644
index 8b9003c..0000000
--- a/tools/sql-update-scripts/pgrouting--2.2.2--2.5.2.sql
+++ /dev/null
@@ -1,6527 +0,0 @@
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- pgRouting extension upgrade from 2.2.2 to 2.5.2
--- generated by tools/build-extension-update-files
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-\echo Use "ALTER extension pgrouting update to '2.5.2'" to load this file. \quit
-
-
--------------------------------------
--- remove functions no longer in the 2.5.2 extension
--------------------------------------
-
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,anyarray,bigint,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,anyarray,bigint,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,bigint,anyarray,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,bigint,anyarray,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,bigint,bigint,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,bigint,bigint,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_drivingdistance(text,bigint,double precision,boolean);
-DROP FUNCTION IF EXISTS _pgr_drivingdistance(text,bigint,double precision,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,anyarray,anyarray,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,anyarray,anyarray,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,anyarray,bigint,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,anyarray,bigint,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,bigint,anyarray,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,bigint,anyarray,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,bigint,bigint,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,bigint,bigint,boolean,character,boolean,boolean);
-
-
-------------------------------------------
---    New functions:  2.0
--- Signature change:  2.4
---       Deprecated:  2.4
-------------------------------------------
--- pgr_bddijkstra
--- 2.2.2: {      sql, source_vid, target_vid, directed, has_reverse_cost}   
--- 2.5.2: {edges_sql,  start_vid,    end_vid, directed, has_rcost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vid","end_vid","directed","has_rcost"}'
-WHERE proname = 'pgr_bddijkstra'
-    AND proargnames = '{"sql","source_vid","target_vid","directed","has_reverse_cost"}';
-
-
-------------------------------------------
---   New function: 2.1
--- (types) change: 2.3
-------------------------------------------
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_gsoc_vrppdtw(text,integer,integer);
-DROP FUNCTION IF EXISTS pgr_gsoc_vrppdtw(text,integer,integer);
-
-
-
-
-------------------------------------------
--- New functions on 2.0
--- Signature change on 2.3
--- Deprecated on 2.4
-------------------------------------------
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_astar(text,integer,integer,boolean,boolean);
-DROP FUNCTION IF EXISTS pgr_astar(text,integer,integer,boolean,boolean);
-
-
-
-
-------------------------------------------
---       New functions:  2.1
---    Signature change:  2.4
-------------------------------------------
--- 2.2.2: {edges_sql,start_v,  distance,directed,seq,node,edge,cost,agg_cost}
--- 2.5.2: {edges_sql,start_vid,distance,directed,seq,node,edge,cost,agg_cost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vid","distance","directed","seq","node","edge","cost","agg_cost"}'
-WHERE proname = 'pgr_drivingdistance'
-    AND proargnames = '{"edges_sql","start_v","distance","directed","seq","node","edge","cost","agg_cost"}';
-
-
-------------------------------------------
---       New functions:  2.1
---    Signature change:  2.4
-------------------------------------------
--- 2.2.2: {sql,      start_v,   distance,directed,equicost,seq,from_v,node,edge,cost,agg_cost}
--- 2.5.2: {edges_sql,start_vids,distance,directed,equicost,seq,from_v,node,edge,cost,agg_cost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vids","distance","directed","equicost","seq","from_v","node","edge","cost","agg_cost"}'
-WHERE proname = 'pgr_drivingdistance'
-    AND proargnames = '{"sql","start_v","distance","directed","equicost","seq","from_v","node","edge","cost","agg_cost"}';
-
-
-
-
-
-
-
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
---- pgRouting provides geospatial routing functionality.
---- http://pgrouting.org
---- copyright
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
----
---- This is free software; you can redistribute and/or modify it:
---- the terms of the GNU General Public Licence. See the COPYING file.
---- the terms of the MIT-X Licence. See the COPYING file.
----
---- The following functions have MIT-X licence:
----     pgr_version()
----     pgr_tsp(matrix float8[][], startpt integer, endpt integer DEFAULT -1, OUT seq integer, OUT id integer)
----     _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
----     pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
----
----
---- All other functions are under GNU General Public Licence.
----
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
--- WARNING: Any change in this file must be evaluated for compatibility.
---          Changes cleanly handled by postgis_upgrade.sql are fine,
---          other changes will require a bump in Major version.
---          Currently only function replaceble by CREATE OR REPLACE
---          are cleanly handled.
---
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
---  pgRouting 2.0 types
-
-
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_version()
-RETURNS TABLE(
-        "version" varchar,
-        tag varchar,
-        hash varchar,
-        branch varchar,
-        boost varchar
-    ) AS
-$BODY$
-    SELECT '2.5.2'::varchar AS version,
-        'v2.5.2'::varchar AS tag,
-        '60585f1f7'::varchar AS hash,
-        'master'::varchar AS branch,
-        '1.54.0'::varchar AS boost;
-$BODY$
-LANGUAGE sql IMMUTABLE;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getTableName(IN tab text, IN reportErrs int default 0, IN fnName text default '_pgr_getTableName', OUT sname text,OUT tname text)
-  RETURNS RECORD AS
-$$
-DECLARE
-        naming record;
-        i integer;
-        query text;
-        sn text; -- schema name
-        tn text; -- table name
-        ttype text; --table type for future use
-        err boolean;
-        debuglevel text;
-        var_types text[] = ARRAY['BASE TABLE', 'VIEW'];
-BEGIN
-
-    execute 'show client_min_messages' into debuglevel;
-
-
-    perform _pgr_msg( 0, fnName, 'Checking table ' || tab || ' exists');
-    --RAISE DEBUG 'Checking % exists',tab;
-
-    i := strpos(tab,'.');
-    IF (i <> 0) THEN
-        sn := split_part(tab, '.',1);
-        tn := split_part(tab, '.',2);
-    ELSE
-        sn := current_schema;
-        tn := tab;
-    END IF;
-
-
-   SELECT schema_name INTO sname
-   FROM information_schema.schemata WHERE schema_name = sn;
-
-    IF sname IS NOT NULL THEN -- found schema (as is)
-       SELECT table_name, table_type INTO tname, ttype
-       FROM information_schema.tables
-       WHERE
-                table_type = ANY(var_types) and
-                table_schema = sname and
-                table_name = tn ;
-        IF tname is NULL THEN
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  = ANY(var_types) and
-                table_schema = sname and
-                table_name = lower(tn) ORDER BY table_name;
-        END IF;
-    END IF;
-    IF sname is NULL or tname is NULL THEN --schema not found or table not found
-        SELECT schema_name INTO sname
-        FROM information_schema.schemata
-        WHERE schema_name = lower(sn) ;
-
-        IF sname IS NOT NULL THEN -- found schema (with lower caps)
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  =  ANY(var_types) and
-                table_schema = sname and
-                table_name= tn ;
-
-           IF tname IS NULL THEN
-                SELECT table_name, table_type INTO tname, ttype
-                FROM information_schema.tables
-                WHERE
-                    table_type  =  ANY(var_types) and
-                    table_schema = sname and
-                    table_name= lower(tn) ;
-           END IF;
-        END IF;
-    END IF;
-   err = (sname IS NULL OR tname IS NULL);
-   perform _pgr_onError(err, reportErrs, fnName, 'Table ' || tab ||' not found',' Check your table name', 'Table '|| tab || ' found');
-
-END;
-$$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(sname text, tname text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(col) into cname;
-
-    IF cname is null  THEN
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(lower(col))  into cname;
-    END if;
-
-    err = cname is null;
-
-    perform _pgr_onError(err, reportErrs, fnName,  'Column '|| col ||' not found', ' Check your column name','Column '|| col || ' found');
-    RETURN cname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(tab text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-
-    select * into cname from _pgr_getColumnName(sname,tname,col,reportErrs, fnName);
-    RETURN cname;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    select * from _pgr_getColumnName(tab,col,0, '_pgr_isColumnInTable') into cname;
-    return cname is not null;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(sname text, tname text, cname text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    pkey text;
-BEGIN
-    SELECT
-          pg_attribute.attname into pkey
-         --  format_type(pg_attribute.atttypid, pg_attribute.atttypmod)
-          FROM pg_index, pg_class, pg_attribute
-          WHERE
-                  pg_class.oid = _pgr_quote_ident(sname||'.'||tname)::regclass AND
-                  indrelid = pg_class.oid AND
-                  pg_attribute.attrelid = pg_class.oid AND
-                  pg_attribute.attnum = any(pg_index.indkey)
-                  AND indisprimary;
-
-    IF pkey=cname then
-          RETURN TRUE;
-    END IF;
-
-    SELECT a.index_name,
-           b.attname,
-           b.attnum,
-           a.indisunique,
-           a.indisprimary
-      INTO rec
-      FROM ( SELECT a.indrelid,
-                    a.indisunique,
-                    a.indisprimary,
-                    c.relname index_name,
-                    unnest(a.indkey) index_num
-               FROM pg_index a,
-                    pg_class b,
-                    pg_class c,
-                    pg_namespace d
-              WHERE b.relname=tname
-                AND b.relnamespace=d.oid
-                AND d.nspname=sname
-                AND b.oid=a.indrelid
-                AND a.indexrelid=c.oid
-           ) a,
-           pg_attribute b
-     WHERE a.indrelid = b.attrelid
-       AND a.index_num = b.attnum
-       AND b.attname = cname
-  ORDER BY a.index_name,
-           a.index_num;
-
-  RETURN FOUND;
-  EXCEPTION WHEN OTHERS THEN
-    perform _pgr_onError( true, reportErrs, fnName,
-    'Error when checking for the postgres system attributes', SQLERR);
-    RETURN FALSE;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(tab text, col text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    sname text;
-    tname text;
-    cname text;
-    pkey text;
-    value boolean;
-BEGIN
-    SELECT * into naming FROM _pgr_getTableName(tab, 0, fnName);
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    SELECT * into cname from _pgr_getColumnName(sname, tname, col, 0, fnName) ;
-    IF cname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    select * into value  from _pgr_isColumnIndexed(sname, tname, cname, reportErrs, fnName);
-    return value;
-END
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-create or replace function _pgr_quote_ident(idname text)
-    returns text as
-$body$
-declare
-    t text[];
-    pgver text;
-
-begin
-    pgver := regexp_replace(version(), E'^PostgreSQL ([^ ]+)[ ,].*$', E'\\1');
-
-    if _pgr_versionless(pgver, '9.2') then
-        select into t array_agg(quote_ident(term)) from
-            (select nullif(unnest, '') as term
-               from unnest(string_to_array(idname, '.'))) as foo;
-    else
-        select into t array_agg(quote_ident(term)) from
-            (select unnest(string_to_array(idname, '.', '')) as term) as foo;
-    end if;
-    return array_to_string(t, '.');
-end;
-$body$
-language plpgsql immutable;
-
-
-CREATE OR REPLACE FUNCTION _pgr_versionless(v1 text, v2 text)
-  RETURNS boolean AS
-$BODY$
-
-
-declare
-    v1a text[];
-    v2a text[];
-    nv1 integer;
-    nv2 integer;
-    ne1 integer;
-    ne2 integer;
-
-begin
-    -- separate components into an array, like:
-    -- '2.1.0-beta3dev'  =>  {2,1,0,beta3dev}
-    v1a := regexp_matches(v1, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-    v2a := regexp_matches(v2, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-
-    -- convert modifiers to numbers for comparison
-    -- we do not delineate between alpha1, alpha2, alpha3, etc
-    ne1 := case when v1a[4] is null or v1a[4]='' then 5
-                when v1a[4] ilike 'rc%' then 4
-                when v1a[4] ilike 'beta%' then 3
-                when v1a[4] ilike 'alpha%' then 2
-                when v1a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    ne2 := case when v2a[4] is null or v2a[4]='' then 5
-                when v2a[4] ilike 'rc%' then 4
-                when v2a[4] ilike 'beta%' then 3
-                when v2a[4] ilike 'alpha%' then 2
-                when v2a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    nv1 := v1a[1]::integer * 10000 +
-           coalesce(v1a[2], '0')::integer * 1000 +
-           coalesce(v1a[3], '0')::integer *  100 + ne1;
-    nv2 := v2a[1]::integer * 10000 +
-           coalesce(v2a[2], '0')::integer * 1000 +
-           coalesce(v2a[3], '0')::integer *  100 + ne2;
-
-    --raise notice 'nv1: %, nv2: %, ne1: %, ne2: %', nv1, nv2, ne1, ne2;
-
-    return nv1 < nv2;
-end;
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-create or replace function _pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_startpoint(st_geometryn(g,1));
-    else
-        return st_startpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function _pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_endpoint(st_geometryn(g,1));
-    else
-        return st_endpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_parameter_check(fn text, sql text, big boolean default false)
-  RETURNS bool AS
-  $BODY$
-
-  DECLARE
-  rec record;
-  rec1 record;
-  has_rcost boolean;
-  safesql text;
-  BEGIN
-    IF (big) THEN
-       RAISE EXCEPTION 'This function is for old style functions';
-    END IF;
-
-    -- checking query is executable
-    BEGIN
-      safesql =  'select * from ('||sql||' ) AS __a__ limit 1';
-      execute safesql into rec;
-      EXCEPTION
-        WHEN OTHERS THEN
-            RAISE EXCEPTION 'Could not execute query please verify syntax of: '
-              USING HINT = sql;
-    END;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('dijkstra','astar') THEN
-        BEGIN
-          execute 'select id,source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: id, source, target, cost';
-        END;
-        execute 'select pg_typeof(id)::text as id_type, pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.id_type in ('integer'::text))
-              AND (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Error, columns ''source'', ''target'' must be of type int4, ''cost'' must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    IF fn IN ('astar') THEN
-        BEGIN
-          execute 'select x1,y1,x2,y2  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: x1,y1, x2,y2';
-        END;
-        execute 'select pg_typeof(x1)::text as x1_type, pg_typeof(y1)::text as y1_type, pg_typeof(x2)::text as x2_type, pg_typeof(y2)::text as y2_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.x1_type = 'double precision'::text)
-              AND (rec.y1_type = 'double precision'::text)
-              AND (rec.x2_type = 'double precision'::text)
-              AND (rec.y2_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Columns: x1, y1, x2, y2 must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('johnson') THEN
-        BEGIN
-          execute 'select source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING HINT = 'Please veryfy the column names: id, source, target, cost',
-                         ERRCODE = 'XX000';
-        END;
-
-        execute 'select pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Support for source,target columns only of type: integer. Support for Cost: double precision'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    -- Checking the data types of the optional reverse_cost";
-    has_rcost := false;
-    IF fn IN ('johnson','dijkstra','astar') THEN
-      BEGIN
-        execute 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||safesql||' ) AS __b__ limit 1 ' into rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-            return has_rcost;
-      END;
-      if (has_rcost) then
-        IF (big) then
-           IF  not (rec1.rev_type in ('bigint'::text, 'integer'::text, 'smallint'::text, 'double precision'::text, 'real'::text)) then
-             RAISE EXCEPTION 'Illegar type in optional parameter reverse_cost.'
-             USING ERRCODE = 'XX000';
-           END IF;
-        ELSE -- Version 2.0.0 is more restrictive
-           IF (rec1.rev_type != 'double precision') then
-             RAISE EXCEPTION 'Illegal type in optional parameter reverse_cost, must be of type float8'
-             USING ERRCODE = 'XX000';
-           END IF;
-        END IF;
-      end if;
-      return true;
-    END IF;
-    -- just for keeps
-    return true;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_onError(
-  IN errCond boolean,  -- true there is an error
-  IN reportErrs int,   -- 0, 1 or 2
-  IN fnName text,      -- function name that generates the error
-  IN msgerr text,      -- error message
-  IN hinto text default 'No hint', -- hint help
-  IN msgok text default 'OK')      -- message if everything is ok
-  RETURNS void AS
-$BODY$
-BEGIN
-  if errCond=true then
-     if reportErrs=0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-     else
-       if reportErrs = 2 then
-         raise notice '----> PGR ERROR in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-         raise raise_exception;
-       else
-         raise notice '----> PGR NOTICE in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-       end if;
-     end if;
-  else
-       raise debug 'PGR ----> %: %',fnName,msgok;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_msg(IN msgKind int, IN fnName text, IN msg text default '---->OK')
-  RETURNS void AS
-$BODY$
-BEGIN
-  if msgKind = 0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msg;
-  else
-       raise notice '----> PGR NOTICE in %: %',fnName,msg;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(sname text, tname text, cname text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    EXECUTE 'select data_type  from information_schema.columns '
-            || 'where table_name = '||quote_literal(tname)
-                 || ' and table_schema=' || quote_literal(sname)
-                 || ' and column_name='||quote_literal(cname)
-       into ctype;
-    err = ctype is null;
-    perform _pgr_onError(err, reportErrs, fnName,
-            'Type of Column '|| cname ||' not found',
-            'Check your column name',
-            'OK: Type of Column '|| cname || ' is ' || ctype);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(tab text, col text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-    select * into cname from _pgr_getColumnName(tab,col,reportErrs, fnName) ;
-    select * into ctype from _pgr_getColumnType(sname,tname,cname,reportErrs, fnName);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_get_statement(o_sql text)
-RETURNS text AS
-$BODY$
-DECLARE
-sql TEXT;
-BEGIN
-    EXECUTE 'SELECT statement FROM pg_prepared_statements WHERE name ='  || quote_literal(o_sql) || ' limit 1 ' INTO sql;
-    IF (sql IS NULL) THEN
-      RETURN   o_sql;
-    ELSE
-      RETURN  regexp_replace(sql, '(.)* as ', '', 'i');
-    END IF;
-END
-$BODY$
-LANGUAGE plpgsql STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_checkVertTab(vertname text, columnsArr  text[],
-    IN reportErrs int default 1, IN fnName text default '_pgr_checkVertTab',
-    OUT sname text,OUT vname text)
-RETURNS record AS
-$BODY$
-DECLARE
-    cname text;
-    colname text;
-    naming record;
-    debuglevel text;
-    err  boolean;
-    msgKind int;
-
-BEGIN
-    msgKind = 0; -- debug_
-    execute 'show client_min_messages' into debuglevel;
-
-    perform _pgr_msg(msgKind, fnName, 'Checking table ' || vertname || ' exists');
-       select * from _pgr_getTableName(vertname, 0, fnName) into naming;
-       sname=naming.sname;
-       vname=naming.tname;
-       err = sname is NULL or vname is NULL;
-    perform _pgr_onError( err, 2, fnName,
-          'Vertex Table: ' || vertname || ' not found',
-          'Please create ' || vertname || ' using  _pgr_createTopology() or pgr_createVerticesTable()',
-          'Vertex Table: ' || vertname || ' found');
-
-
-    perform _pgr_msg(msgKind, fnName, 'Checking columns of ' || vertname);
-      FOREACH cname IN ARRAY columnsArr
-      loop
-         select _pgr_getcolumnName(vertname, cname, 0, fnName) into colname;
-         if colname is null then
-           perform _pgr_msg(msgKind, fnName, 'Adding column ' || cname || ' in ' || vertname);
-           set client_min_messages  to warning;
-                execute 'ALTER TABLE '||_pgr_quote_ident(vertname)||' ADD COLUMN '||cname|| ' integer';
-           execute 'set client_min_messages  to '|| debuglevel;
-           perform _pgr_msg(msgKind, fnName);
-         end if;
-      end loop;
-    perform _pgr_msg(msgKind, fnName, 'Finished checking columns of ' || vertname);
-
-    perform _pgr_createIndex(vertname , 'id' , 'btree', reportErrs, fnName);
- END
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(
-    sname text, tname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    debuglevel text;
-    naming record;
-    tabname text;
-    query text;
-    msgKind int;
-BEGIN
-  msgKind = 0; -- debug_
-
-  execute 'show client_min_messages' into debuglevel;
-  tabname=_pgr_quote_ident(sname||'.'||tname);
-  perform _pgr_msg(msgKind, fnName, 'Checking ' || colname || ' column in ' || tabname || ' is indexed');
-    IF (_pgr_isColumnIndexed(sname,tname,colname, 0, fnName)) then
-       perform _pgr_msg(msgKind, fnName);
-    else
-      if indext = 'gist' then
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using gist('||quote_ident(colname)||')';
-      else
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using btree('||quote_ident(colname)||')';
-      end if;
-      perform _pgr_msg(msgKind, fnName, 'Adding index ' || tabname || '_' ||  colname || '_idx');
-      perform _pgr_msg(msgKind, fnName, ' Using ' ||  query);
-      set client_min_messages  to warning;
-      BEGIN
-        execute query;
-        EXCEPTION WHEN others THEN
-          perform _pgr_onError( true, reportErrs, fnName,
-            'Could not create index on:' || colname, SQLERRM);
-      END;
-      execute 'set client_min_messages  to '|| debuglevel;
-      perform _pgr_msg(msgKind, fnName);
-    END IF;
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(tabname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    naming record;
-    sname text;
-    tname text;
-
-BEGIN
-    select * from _pgr_getTableName(tabname, 2, fnName)  into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    execute _pgr_createIndex(sname, tname, colname, indext, reportErrs, fnName);
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pointToId(
-    point geometry,
-    tolerance double precision,
-    vertname text,
-    srid integer)
-
-  RETURNS bigint AS
-$BODY$
-DECLARE
-    rec record;
-    pid bigint;
-
-BEGIN
-    EXECUTE 'SELECT ST_Distance(
-        the_geom,
-        ST_GeomFromText(ST_AsText('
-                || quote_literal(point::text)
-                || '),'
-            || srid ||')) AS d, id, the_geom
-    FROM '||_pgr_quote_ident(vertname)||'
-    WHERE ST_DWithin(
-        the_geom,
-        ST_GeomFromText(
-            ST_AsText(' || quote_literal(point::text) ||'),
-            ' || srid || '),' || tolerance||')
-    ORDER BY d
-    LIMIT 1' INTO rec ;
-    IF rec.id IS NOT NULL THEN
-        pid := rec.id;
-    ELSE
-        execute 'INSERT INTO '||_pgr_quote_ident(vertname)||' (the_geom) VALUES ('||quote_literal(point::text)||')';
-        pid := lastval();
-END IF;
-
-RETURN pid;
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'many_to_many_dijkstra'
-LANGUAGE c VOLATILE;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer, OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstra(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(Many to Many)';
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraVia(
-    edges_sql TEXT,
-    via_vertices ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    strict BOOLEAN DEFAULT FALSE,
-    U_turn_on_edge BOOLEAN DEFAULT TRUE,
-
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'dijkstraVia'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_johnson(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'johnson'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_floydWarshall(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'floydWarshall'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'astarManyToMany'
-LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, normal:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to Many)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true, normal:=false) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to Many)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid ANYARRAY,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-    equicost BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'many_withPointsDD'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_withPointsDD($1, $2, ARRAY[$3]::BIGINT[], $4, $5, $6, $7, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vids anyarray,
-    distance FLOAT,
-    directed BOOLEAN DEFAULT TRUE,
-    equicost BOOLEAN DEFAULT FALSE,
-    OUT seq integer,
-    OUT from_v  bigint,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'driving_many_to_dist'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vid bigint,
-    distance FLOAT8,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq integer,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer, directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'kshortest_path'
-    LANGUAGE c STABLE STRICT;
-
--- V2 the graph is directed and there are no heap paths
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid integer, end_vid integer, k integer, has_rcost boolean)
-  RETURNS SETOF pgr_costresult3 AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated signature of pgr_ksp';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql::text, false);
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_rcost) THEN
-           -- user says that it has reverse_cost but its not true
-           RAISE EXCEPTION 'has_reverse_cost set to true but reverse_cost not found';
-         ELSE
-           -- user says that it does not have reverse_cost but it does have it
-           -- to ignore we remove reverse_cost from the query
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         END IF;
-      END IF;
-
-      RETURN query SELECT ((row_number() over()) -1)::integer  AS seq,  (path_id - 1)::integer AS id1, node::integer AS id2, edge::integer AS id3, cost
-            FROM _pgr_ksp(sql::text, start_vid, end_vid, k, TRUE, FALSE) WHERE path_id <= k;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer,
-  directed boolean default true, heap_paths boolean default false,
-  --directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  BEGIN
-         RETURN query SELECT *
-                FROM _pgr_ksp(edges_sql::text, start_vid, end_vid, k, directed, heap_paths);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsKSP(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    k INTEGER,
-
-    directed BOOLEAN DEFAULT TRUE,
-    heap_paths BOOLEAN DEFAULT FALSE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER, OUT path_id INTEGER, OUT path_seq INTEGER,
-    OUT node BIGINT, OUT edge BIGINT,
-    OUT cost FLOAT, OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'withPoints_ksp'
-    LANGUAGE c STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_unnest_matrix(matrix float8[][], OUT start_vid integer, OUT end_vid integer, out agg_cost float8)
-RETURNS SETOF record AS
-
-$body$
-DECLARE
-
-m float8[];
-
-BEGIN
-    start_vid = 1;
-    foreach m slice 1 in  ARRAY matrix
-    LOOP
-        end_vid = 1;
-        foreach agg_cost in  ARRAY m
-        LOOP
-            RETURN next;
-            end_vid = end_vid + 1;
-        END LOOP;
-        start_vid = start_vid + 1;
-    END LOOP;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_tsp(
-    matrix float8[][],
-    startpt INTEGER,
-    endpt INTEGER DEFAULT -1,
-    OUT seq INTEGER,
-    OUT id INTEGER)
-RETURNS SETOF record AS
-$body$
-DECLARE
-table_sql TEXT;
-debuglevel TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(float8[][], integer, integer)';
-
-    CREATE TEMP TABLE ___tmp2 ON COMMIT DROP AS SELECT * FROM _pgr_unnest_matrix( matrix );
-
-
-    startpt := startpt + 1;
-    IF endpt = -1 THEN endpt := startpt;
-    END IF;
-
-
-    RETURN QUERY
-    WITH
-    result AS (
-        SELECT * FROM pgr_TSP(
-        $$SELECT * FROM ___tmp2 $$,
-        startpt, endpt,
-
-        tries_per_temperature :=  500 :: INTEGER,
-        max_changes_per_temperature := 30 :: INTEGER,
-        max_consecutive_non_changes := 500 :: INTEGER,
-
-        randomize:=false)
-    )
-    SELECT (row_number() over(ORDER BY result.seq) - 1)::INTEGER AS seq, (result.node - 1)::INTEGER AS id
-
-    FROM result WHERE NOT(result.node = startpt AND result.seq != 1);
-
-    DROP TABLE ___tmp2;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-
-
-CREATE OR  REPLACE FUNCTION pgr_tsp(sql text, start_id INTEGER, end_id INTEGER default (-1))
-returns setof pgr_costResult as
-$body$
-DECLARE
-table_sql TEXT;
-rec RECORD;
-debuglevel TEXT;
-n BIGINT;
-
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(sql, integer, integer)';
-
-    table_sql := 'CREATE TEMP TABLE ___tmp ON COMMIT DROP AS ' || sql ;
-    EXECUTE table_sql;
-
-
-    BEGIN
-        EXECUTE 'SELECT id, x, y FROM ___tmp' INTO rec;
-        EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                USING ERRCODE = 'XX000',
-                HINT = 'Please verify the column names: id, x, y';
-    END;
-
-    EXECUTE
-    'SELECT
-        pg_typeof(id)::text as id_type,
-        pg_typeof(x)::text as x_type,
-        pg_typeof(y)::text as y_type FROM ___tmp' INTO rec;
-
-
-    IF NOT((rec.id_type in ('integer'::text))
-        AND (rec.x_type = 'double precision'::text)
-        AND (rec.y_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION '''id'' must be of type INTEGER, ''x'' ad ''y'' must be of type FLOAT'
-            USING ERRCODE = 'XX000';
-    END IF;
-
-    EXECUTE 'SELECT count(*) AS n FROM (' || sql || ') AS __a__' INTO rec;
-    n = rec.n;
-
-    RETURN query
-        SELECT (seq - 1)::INTEGER AS seq, node::INTEGER AS id1, node::INTEGER AS id2, cost
-        FROM pgr_eucledianTSP(sql, start_id, end_id,
-
-            tries_per_temperature :=  500 * n :: INTEGER,
-            max_changes_per_temperature := 60 * n :: INTEGER,
-            max_consecutive_non_changes := 500 * n :: INTEGER,
-
-            randomize := false) WHERE seq <= n;
-    DROP TABLE ___tmp;
-
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-create or replace function _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
-  as
-$body$
-declare
-    sql text;
-    r record;
-
-begin
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    sql := 'with nodes as (' || sqlin || ')
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j, st_distance(st_makepoint(a.x, a.y), st_makepoint(b.x, b.y)) as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i';
-
-    for r in execute sql loop
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-
-end;
-$body$
-language plpgsql stable cost 10;
-
-
-CREATE OR REPLACE FUNCTION pgr_TSP(
-    matrix_row_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'newTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_eucledianTSP(
-    coordinates_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'eucledianTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_alphashape(sql text, alpha float8 DEFAULT 0, OUT x float8, OUT y float8)
-    RETURNS SETOF record
-    AS '$libdir/libpgrouting-2.5', 'alphashape'
-    LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pointsAsPolygon(query varchar, alpha float8 DEFAULT 0)
-	RETURNS geometry AS
-	$$
-	DECLARE
-		r record;
-		geoms geometry[];
-		vertex_result record;
-		i int;
-		n int;
-		spos int;
-		q text;
-		x float8[];
-		y float8[];
-
-	BEGIN
-		geoms := array[]::geometry[];
-		i := 1;
-
-		FOR vertex_result IN EXECUTE 'SELECT x, y FROM pgr_alphashape('''|| query || ''', ' || alpha || ')'
-		LOOP
-			x[i] = vertex_result.x;
-			y[i] = vertex_result.y;
-			i := i+1;
-		END LOOP;
-
-		n := i;
-		IF n = 1 THEN
-			RAISE NOTICE 'n = 1';
-			RETURN NULL;
-		END IF;
-
-		spos := 1;
-		q := 'SELECT ST_GeometryFromText(''POLYGON((';
-		FOR i IN 1..n LOOP
-			IF x[i] IS NULL AND y[i] IS NULL THEN
-				q := q || ', ' || x[spos] || ' ' || y[spos] || '))'',0) AS geom;';
-				EXECUTE q INTO r;
-				geoms := geoms || array[r.geom];
-				q := '';
-			ELSE
-				IF q = '' THEN
-					spos := i;
-					q := 'SELECT ST_GeometryFromText(''POLYGON((';
-				END IF;
-				IF i = spos THEN
-					q := q || x[spos] || ' ' || y[spos];
-				ELSE
-					q := q || ', ' || x[i] || ' ' || y[i];
-				END IF;
-			END IF;
-		END LOOP;
-
-		RETURN ST_BuildArea(ST_Collect(geoms));
-	END;
-	$$
-	LANGUAGE 'plpgsql' VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'bd_astar'
-LANGUAGE C VOLATILE;
-
-
-
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed:=true, only_cost:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    BOOLEAN,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false);
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to Many)';
-
-
-
--- one to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to Many)';
-
-
--- bdDijkstra MANY TO MANY
-CREATE OR REPLACE FUNCTION _pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bdDijkstra'
-LANGUAGE c VOLATILE;
-
-
-
--- ONE TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- TODO directed BOOLEAN DEFAULT TRUE,  on version 3
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, false) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, true) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_vid integer,
-    target_vid integer,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_vertex'
-LANGUAGE 'c' IMMUTABLE;
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_edge'
-LANGUAGE 'c' IMMUTABLE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || edges_sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        -- no restrictions then its a dijkstra
-        RETURN query SELECT a.seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_dijkstra(new_sql, start_vid, end_vid, directed) a;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, start_vid, end_vid, directed, has_rcost, restrictions_sql);
-    RETURN;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trspViaVertices(
-    edges_sql TEXT,
-    via_vids ANYARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult3 AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            new_sql :=
-               'WITH old_sql AS (' || edges_sql || ')' ||
-                '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        RETURN query SELECT (row_number() over())::INTEGER, path_id:: INTEGER, node::INTEGER,
-            (CASE WHEN edge = -2 THEN -1 ELSE edge END)::INTEGER, cost
-            FROM pgr_dijkstraVia(new_sql, via_vids, directed, strict:=true) WHERE edge != -1;
-        RETURN;
-    END IF;
-
-
-    -- make the call without contradiction from part of the user
-    RETURN query SELECT * FROM _pgr_trspViaVertices(new_sql, via_vids::INTEGER[], directed, has_rcost, restrictions_sql);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-
-    new_sql := sql;
-    IF (has_reverse != has_reverse_cost) THEN  -- user contradiction
-        IF (has_reverse) THEN
-            -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) THEN
-        -- no restrictions then its a with points
-        RETURN query SELECT a.seq-1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_withpoints(new_sql,
-            '(SELECT 1 as pid, ' || source_eid || 'as edge_id, ' || source_pos || '::float8 as fraction)'
-            || ' UNION '
-            || '(SELECT 2, ' || target_eid || ', ' || target_pos || ')' ::TEXT,
-            -1, -2, directed) a;
-        -- WHERE node != -2;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, source_eid, source_pos, target_eid, target_pos, directed, has_reverse_cost, turn_restrict_sql);
-    RETURN;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-create or replace function _pgr_trspViaVertices(sql text, vids integer[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    lrra boolean := false;
-    seq integer := 0;
-    seq2 integer := 0;
-
-begin
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(vids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from _pgr_trsp(sql, vids[i], vids[i+1], directed, has_rcost, turn_restrict_sql) as a loop
-            -- filter out the individual path ends except the last one
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --raise notice 'rr: %', rr;
-            if rr.id3 = -1 then
-                lrr := rr;
-                lrra := true;
-            else
-                seq := seq + 1;
-                rr.seq := seq;
-                return next rr;
-            end if;
-        end loop;
-    end loop;
-
-    if lrra then
-        seq := seq + 1;
-        lrr.seq := seq;
-        return next lrr;
-    end if;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-
-----------------------------------------------------------------------------------------------------------
-
-create or replace function pgr_trspViaEdges(sql text, eids integer[], pcts float8[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    first boolean := true;
-    seq integer := 0;
-    seq2 integer :=0;
-    has_reverse BOOLEAN;
-    point_is_vertex BOOLEAN := false;
-    edges_sql TEXT;
-    f float;
-
-begin
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql := sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (NOT has_rcost) THEN
-            -- user does not want to use reverse cost column
-            edges_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    FOREACH f IN ARRAY pcts LOOP
-        IF f in (0,1) THEN
-           point_is_vertex := true;
-        END IF;
-    END LOOP;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) AND NOT point_is_vertex THEN
-        -- no restrictions then its a _pgr_withPointsVia
-        RETURN query SELECT a.seq::INTEGER, path_id::INTEGER AS id1, node::INTEGER AS id2, edge::INTEGER AS id3, cost
-        FROM _pgr_withPointsVia(edges_sql, eids, pcts, directed) a;
-        RETURN;
-    END IF;
-
-    if array_length(eids, 1) != array_length(pcts, 1) then
-        raise exception 'The length of arrays eids and pcts must be the same!';
-    end if;
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(eids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from pgr_trsp(edges_sql,
-                                  eids[i], pcts[i],
-                                  eids[i+1], pcts[i+1],
-                                  directed,
-                                  has_rcost,
-                                  turn_restrict_sql) as a loop
-            -- combine intermediate via costs when cost is split across
-            -- two parts of a segment because it stops it and
-            -- restarts the next leg also on it
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --
-            -- there are multiple condition we have to deal with
-            -- between the end of one leg and start of the next
-            -- 1. same vertex_id. edge_id=-1; drop record with edge_id=-1
-            -- means: path ends on vertex
-            -- NOTICE:  rr: (19,1,44570022,-1,0)
-            -- NOTICE:  rr: (0,2,44570022,1768045,2.89691196717448)
-            -- 2. vertex_id=-1; sum cost components
-            -- means: path end/starts with the segment
-            -- NOTICE:  rr: (11,2,44569628,1775909,9.32885885148532)
-            -- NOTICE:  rr: (0,3,-1,1775909,0.771386350984395)
-
-            --raise notice 'rr: %', rr;
-            if first then
-                lrr := rr;
-                first := false;
-            else
-                if lrr.id3 = -1 then
-                    lrr := rr;
-                elsif lrr.id3 = rr.id3 then
-                    lrr.cost := lrr.cost + rr.cost;
-                    if rr.id2 = -1 then
-                        rr.id2 := lrr.id2;
-                    end if;
-                else
-                    seq := seq + 1;
-                    lrr.seq := seq;
-                    return next lrr;
-                    lrr := rr;
-                end if;
-            end if;
-        end loop;
-    end loop;
-
-    seq := seq + 1;
-    lrr.seq := seq;
-    return next lrr;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-----------------------------
---    MANY TO MANY
-----------------------------
-
-
-CREATE OR REPLACE FUNCTION _pgr_maxflow(
-    edges_sql TEXT,
-    sources ANYARRAY,
-    targets ANYARRAY,
-    algorithm INTEGER DEFAULT 1,
-    only_flow BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'max_flow_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-
-------------------------------------
--- 3 pgr_edmondsKarp
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 2 boykov_kolmogorov
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 1 pgr_pushRelabel
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT flow
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], algorithm := 1, only_flow := true);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], $3::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, $2::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxCardinalityMatch(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'edge_disjoint_paths_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    bigint,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    IN directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_contractGraph(
-    edges_sql TEXT,
-    contraction_order BIGINT[],
-    max_cycles integer DEFAULT 1,
-    forbidden_vertices BIGINT[] DEFAULT ARRAY[]::BIGINT[],
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT type TEXT,
-    OUT id BIGINT,
-    OUT contracted_vertices BIGINT[],
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost float)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'contractGraph'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliver(
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_cell_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliver'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliverEuclidean (
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliverEuclidean'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_vrpOneDepot(
-    TEXT, -- customers_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_sql
-    INTEGER, -- depot_id
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-orders_sql TEXT;
-trucks_sql TEXT;
-matrix_sql TEXT;
-final_sql TEXT;
-BEGIN
-
-    orders_sql = $$WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    pickups AS (
-        SELECT id, x AS p_x, y AS p_y, open_time AS p_open, close_time AS p_close, service_time AS p_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vrp_orders.id AS id, order_unit AS demand, pickups.id AS p_node_id, p_x, p_y, p_open, p_close, p_service,
-    vrp_orders.id AS d_node_id, x AS d_x, y AS d_y, open_time AS d_open, close_time AS d_close, service_time AS d_service
-    FROM vrp_orders, pickups
-    WHERE vrp_orders.id != $$ || $4;
-
-
-    trucks_sql = $$ WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    vrp_vehicles AS ($$ || $2 || $$ ),
-    starts AS (
-        SELECT id AS start_node_id, x AS start_x, y AS start_y, open_time AS start_open, close_time AS start_close, service_time AS start_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vehicle_id AS id, capacity, starts.* FROM vrp_vehicles, starts;
-    $$;
-
-    final_sql = '
-    SELECT * FROM _pgr_pickDeliver(
-            $$' || orders_sql || '$$,
-            $$' || trucks_sql || '$$,
-            $$' || $3 || '$$,
-            max_cycles := 2,
-            initial_sol := 4 ); ';
-
-    RAISE DEBUG '%', orders_sql;
-    RAISE DEBUG '%', trucks_sql;
-    RAISE DEBUG '%', $3;
-    RAISE DEBUG '%', final_sql;
-
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
------------------------------------------------------------------------
--- Core function for vrp with sigle depot computation
--- See README for description
------------------------------------------------------------------------
---
---
-
-create or replace function pgr_vrpOneDepot(
-	order_sql text,
-	vehicle_sql text,
-	cost_sql text,
-	depot_id integer,
-
-	OUT oid integer,
-	OUT opos integer,
-	OUT vid integer,
-	OUT tarrival integer,
-	OUT tdepart integer)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT order_id::INTEGER, stop_seq::INTEGER, vehicle_id::INTEGER, arrival_time::INTEGER, departure_time::INTEGER
-    FROM _pgr_vrpOneDepot($1, $2,
-       '
-            SELECT src_id AS start_vid, dest_id AS end_vid, traveltime AS agg_cost FROM ('||$3||') AS a
-       ',
-        $4
-    ) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_gsoc_vrppdtw(
-    customers_sql TEXT,
-    max_vehicles INTEGER,
-    capacity FLOAT,
-    speed FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-
-    OUT seq INTEGER,
-    OUT vehicle_id INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT stop_id BIGINT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-    orders_sql TEXT;
-    vehicles_sql TEXT;
-    final_sql TEXT;
-BEGIN
-    orders_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        pickups AS (
-            SELECT id, demand, x as p_x, y as p_y, opentime as p_open, closetime as p_close, servicetime as p_service
-            FROM  customer_data WHERE pindex = 0 AND id != 0
-        ),
-        deliveries AS (
-            SELECT pindex AS id, x as d_x, y as d_y, opentime as d_open, closetime as d_close, servicetime as d_service
-            FROM  customer_data WHERE dindex = 0 AND id != 0
-        )
-        SELECT * FROM pickups JOIN deliveries USING(id) ORDER BY pickups.id
-    $$;
-
-    vehicles_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ )
-        SELECT id, x AS start_x, y AS start_y,
-            opentime AS start_open, closetime AS start_close, $$ ||
-            capacity || $$ AS capacity, $$ || max_vehicles || $$ AS number, $$ || speed || $$ AS speed
-            FROM customer_data WHERE id = 0 LIMIT 1
-        $$;
---  seq | vehicle_id | vehicle_seq | stop_id | travel_time | arrival_time | wait_time | service_time | departure_time
-    final_sql = $$ WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        p_deliver AS (SELECT * FROM _pgr_pickDeliverEuclidean('$$ || orders_sql || $$',  '$$ || vehicles_sql || $$',  1, $$ || max_cycles || $$ )),
-        picks AS (SELECT p_deliver.*, pindex, dindex, id AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 2)),
-        delivers AS (SELECT p_deliver.*, pindex, dindex, dindex AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 3)),
-        depots AS (SELECT p_deliver.*, 0 as pindex, 0 as dindex, 0 AS the_id FROM p_deliver WHERE (stop_type IN (-1,1,6))),
-        the_union AS (SELECT * FROM picks UNION SELECT * FROM delivers UNION SELECT * from depots)
-
-        SELECT (row_number() over(ORDER BY a.seq))::INTEGER, vehicle_seq, a.stop_seq, the_id::BIGINT, a.travel_time, a.arrival_time, a.wait_time, a.service_time, a.departure_time
-        FROM (SELECT * FROM the_union) AS a ORDER BY a.seq
-        $$;
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-CREATE OR REPLACE FUNCTION pgr_gsoc_vrppdtw(
-    sql text,
-    vehicle_num INTEGER,
-    capacity INTEGER
-)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-customers_sql TEXT;
-BEGIN
-    RETURN query
-         SELECT a.seq, vehicle_id::INTEGER AS id1, stop_id::INTEGER AS id2, departure_time AS cost
-        FROM _pgr_gsoc_vrppdtw($1, $2, $3, 1, 30) AS a WHERE vehicle_id NOT IN (-2);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION _pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN,
-    driving_side CHAR,
-    details BOOLEAN,
-
-    only_cost BOOLEAN DEFAULT false, -- gets path
-    normal BOOLEAN DEFAULT true, -- false for many to onu
-
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'withPoints'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], ARRAY[$4]::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], ARRAY[$4]::bigint[], $5, $6, $7, FALSE, FALSE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], $4::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], $4::BIGINT[], $5,  $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION  _pgr_withPointsVia(
-    sql text,
-    via_edges bigint[],
-    fraction float[],
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  has_rcost boolean;
-  sql_new_vertices text := ' ';
-  sql_on_vertex text;
-  v_union text := ' ';
-  dummyrec record;
-  rec1 record;
-  via_vertices int[];
-  sql_safe text;
-  new_edges text;
-  BEGIN
-     BEGIN
-        sql_safe = 'SELECT id, source, target, cost, reverse_cost FROM ('|| sql || ') AS __a';
-
-        EXECUTE 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||sql_safe||' ) AS __b__ limit 1 ' INTO rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-     END;
-
-
-      IF array_length(via_edges, 1) != array_length(fraction, 1) then
-        RAISE EXCEPTION 'The length of via_edges is different of length of via_edges';
-      END IF;
-
-      FOR i IN 1 .. array_length(via_edges, 1)
-      LOOP
-          IF fraction[i] = 0 THEN
-              sql_on_vertex := 'SELECT source FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.source;
-          ELSE IF fraction[i] = 1 THEN
-              sql_on_vertex := 'SELECT target FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.target;
-          ELSE
-              via_vertices[i] = -i;
-              IF has_rcost THEN
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost,
-                              reverse_cost * (1 - ' || fraction[i] || ')  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost,
-                              reverse_cost *  ' || fraction[i] || '  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' where id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               ELSE
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               END IF;
-          END IF;
-          END IF;
-     END LOOP;
-
-     IF sql_new_vertices = ' ' THEN
-         new_edges := sql;
-     ELSE
-         IF has_rcost THEN
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost,
-                         lead(cost) OVER w  - cost AS reverse_cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL),
-                   second_part AS ( SELECT * FROM (SELECT id, lead(source) OVER w  AS source, source as target,
-                         reverse_cost - lead(reverse_cost) OVER w  AS cost,
-                         reverse_cost - lead(reverse_cost) OVER w  AS reverse_cost
-                      FROM  the_union  WHERE target > 0 and reverse_cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY reverse_cost ASC) ) as n2
-                      WHERE source IS NOT NULL),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part)
-                             UNION
-                       (SELECT * FROM second_part) ) _union )
-                  SELECT *  FROM more_union';
-         ELSE
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL ),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part) ) _union )
-                  SELECT *  FROM more_union';
-          END IF;
-      END IF;
-
- -- raise notice '%', new_edges;
-     sql_new_vertices := sql_new_vertices || v_union || ' (' || sql || ')';
-     RETURN query SELECT *
-         FROM pgr_dijkstraVia(new_edges, via_vertices, directed, has_rcost);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_lineGraph(
-    TEXT, -- edges_sql
-    directed BOOLEAN DEFAULT true,
-    OUT seq INTEGER,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost FLOAT,
-    OUT reverse_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'lineGraph'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_connectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'connectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_strongComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'strongComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_biconnectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the edge in the component
-    OUT n_seq INTEGER,          -- nth_seq of the edge in the component
-    OUT edge BIGINT)            -- the number of the edge
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'biconnectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_articulationPoints(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'articulationPoints'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bridges(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT edge BIGINT)            -- the number of the edge 
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bridges'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createtopology(edge_table text, tolerance double precision,
-		   the_geom text default 'the_geom', id text default 'id',
-		   source text default 'source', target text default 'target',rows_where text default 'true',
-		   clean boolean default FALSE)
-RETURNS VARCHAR AS
-$BODY$
-
-DECLARE
-    points record;
-    sridinfo record;
-    source_id bigint;
-    target_id bigint;
-    totcount bigint;
-    rowcount bigint;
-    srid integer;
-    sql text;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    notincluded integer;
-    i integer;
-    naming record;
-    info record;
-    flag boolean;
-    query text;
-    idtype text;
-    gtype text;
-    sourcetype text;
-    targettype text;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-    msgKind int;
-    emptied BOOLEAN;
-
-BEGIN
-    msgKind = 1; -- notice
-    fnName = 'pgr_createTopology';
-    raise notice 'PROCESSING:';
-    raise notice 'pgr_createTopology(''%'', %, ''%'', ''%'', ''%'', ''%'', rows_where := ''%'', clean := %)',edge_table,tolerance,the_geom,id,source,target,rows_where, clean;
-    execute 'show client_min_messages' into debuglevel;
-
-
-    raise notice 'Performing checks, please wait .....';
-
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-        sname=naming.sname;
-        tname=naming.tname;
-        tabname=sname||'.'||tname;
-        vname=tname||'_vertices_pgr';
-        vertname= sname||'.'||vname;
-        rows_where = ' AND ('||rows_where||')';
-      raise DEBUG '     --> OK';
-
-
-      raise debug 'Checking column names in edge table';
-        select * into idname     from _pgr_getColumnName(sname, tname,id,2,fnName);
-        select * into sourcename from _pgr_getColumnName(sname, tname,source,2,fnName);
-        select * into targetname from _pgr_getColumnName(sname, tname,target,2,fnName);
-        select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2,fnName);
-
-
-        err = sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname;
-        perform _pgr_onError( err, 2, fnName,
-               'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-	       'Column names are OK');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking column types in edge table';
-        select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-        select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-        select * into idtype from _pgr_getColumnType(sname,tname,idname,1, fnName);
-
-        err = idtype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column id:'|| idname, ' Expected type of '|| idname || ' is integer,smallint or bigint but '||idtype||' was found');
-
-        err = sourcetype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column source:'|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-        err = targettype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column target:'|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or bigint but '||targettype||' was found');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         raise debug '%',query;
-         EXECUTE query INTO sridinfo;
-
-         err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-         perform _pgr_onError(err, 2, fnName,
-	     'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-
-         srid := sridinfo.srid;
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking and creating indices in edge table';
-        perform _pgr_createIndex(sname, tname , idname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-
-        gname=quote_ident(gname);
-        idname=quote_ident(idname);
-        sourcename=quote_ident(sourcename);
-        targetname=quote_ident(targetname);
-      raise DEBUG '     --> OK';
-
-
-
-
-
-    BEGIN
-        -- issue #193 & issue #210 & #213
-        -- this sql is for trying out the where clause
-        -- the select * is to avoid any column name conflicts
-        -- limit 1, just try on first record
-        -- if the where clasuse is ill formed it will be caught in the exception
-        sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-        EXECUTE sql into dummyRec;
-        -- end
-
-        -- if above where clasue works this one should work
-        -- any error will be caught by the exception also
-        sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NOT NULL AND '||
-	    idname||' IS NOT NULL)=false '||rows_where;
-        EXECUTE SQL  into notincluded;
-
-        if clean then
-            raise debug 'Cleaning previous Topology ';
-               execute 'UPDATE ' || _pgr_quote_ident(tabname) ||
-               ' SET '||sourcename||' = NULL,'||targetname||' = NULL';
-        else
-            raise debug 'Creating topology for edges with non assigned topology';
-            if rows_where=' AND (true)' then
-                rows_where=  ' and ('||quote_ident(sourcename)||' is null or '||quote_ident(targetname)||' is  null)';
-            end if;
-        end if;
-        -- my thoery is that the select Count(*) will never go through here
-        EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-             RAISE NOTICE '%',sql;
-             RETURN 'FAIL';
-    END;
-
-    BEGIN
-         raise DEBUG 'initializing %',vertname;
-         execute 'select * from _pgr_getTableName('||quote_literal(vertname)
-                                                  || ',0,' || quote_literal(fnName) ||' )' into naming;
-         emptied = false;
-         set client_min_messages  to warning;
-         IF sname=naming.sname AND vname=naming.tname  THEN
-            if clean then
-                execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-                execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-                emptied = true;
-            end if;
-         ELSE -- table doesn't exist
-            execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-            emptied = true;
-         END IF;
-         IF (emptied) THEN
-             execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-	         quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-             perform _pgr_createIndex(vertname , 'the_geom'::text , 'gist'::text);
-         END IF;
-         execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id"}''::text[])' into naming;
-         execute 'set client_min_messages  to '|| debuglevel;
-         raise DEBUG  '  ------>OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: something went wrong when initializing the verties table';
-             RETURN 'FAIL';
-    END;
-
-
-
-    raise notice 'Creating Topology, Please wait...';
-        rowcount := 0;
-        FOR points IN EXECUTE 'SELECT ' || idname || '::bigint AS id,'
-            || ' _pgr_StartPoint(' || gname || ') AS source,'
-            || ' _pgr_EndPoint('   || gname || ') AS target'
-            || ' FROM '  || _pgr_quote_ident(tabname)
-            || ' WHERE ' || gname || ' IS NOT NULL AND ' || idname||' IS NOT NULL '||rows_where
-        LOOP
-
-            rowcount := rowcount + 1;
-            IF rowcount % 1000 = 0 THEN
-                RAISE NOTICE '% edges processed', rowcount;
-            END IF;
-
-
-            source_id := _pgr_pointToId(points.source, tolerance,vertname,srid);
-            target_id := _pgr_pointToId(points.target, tolerance,vertname,srid);
-            BEGIN
-                sql := 'UPDATE ' || _pgr_quote_ident(tabname) ||
-                    ' SET '||sourcename||' = '|| source_id::text || ','||targetname||' = ' || target_id::text ||
-                    ' WHERE ' || idname || ' =  ' || points.id::text;
-
-                IF sql IS NULL THEN
-                    RAISE NOTICE 'WARNING: UPDATE % SET source = %, target = % WHERE % = % ', tabname, source_id::text, target_id::text, idname,  points.id::text;
-                ELSE
-                    EXECUTE sql;
-                END IF;
-                EXCEPTION WHEN OTHERS THEN
-                    RAISE NOTICE '%', SQLERRM;
-                    RAISE NOTICE '%',sql;
-                    RETURN 'FAIL';
-            end;
-        END LOOP;
-        raise notice '-------------> TOPOLOGY CREATED FOR  % edges', rowcount;
-        RAISE NOTICE 'Rows with NULL geometry or NULL id: %',notincluded;
-        Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname), _pgr_quote_ident(vertname);
-        raise notice '----------------------------------------------';
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_createTopology(text, double precision,text,text,text,text,text,boolean)
-IS 'args: edge_table,tolerance, the_geom:=''the_geom'',source:=''source'', target:=''target'',rows_where:=''true'' - fills columns source and target in the geometry table and creates a vertices table for selected rows';
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
-RETURNS character varying AS
-$BODY$
-
-DECLARE
-    points record;
-    seg record;
-    naming record;
-    sridinfo record;
-    srid integer;
-    ecnt integer;
-    vertname text;
-    sname text;
-    tname text;
-    vname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    geotype text;
-    gname text;
-    tabName text;
-    flag boolean ;
-    query text;
-    selectionquery text;
-    i integer;
-    tot integer;
-    NumIsolated integer;
-    numdeadends integer;
-    numgaps integer;
-    NumCrossing integer;
-    numRings integer;
-    debuglevel text;
-
-
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeGraph(''%'',%,''%'',''%'',''%'',''%'',''%'')',edge_table,tolerance,the_geom,id,source,target,rows_where;
-  raise notice 'Performing checks, please wait ...';
-  execute 'show client_min_messages' into debuglevel;
-
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-    raise DEBUG '     --> OK';
-
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","cnt","chk"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET cnt=0 ,chk=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into idname     from _pgr_getColumnName(sname, tname,id,2);
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname, 2,
-                       'pgr_analyzeGraph',  'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-                       'Column names are OK');
-
-        raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-   BEGIN
-       raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         EXECUTE QUERY INTO sridinfo;
-
-         perform _pgr_onError( sridinfo IS NULL OR sridinfo.srid IS NULL,2,
-                 'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname,
-                 'SRID of '||gname||' is '||sridinfo.srid);
-
-         IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-             RAISE NOTICE ' Can not determine the srid of the geometry "%" in table %', the_geom,tabname;
-             RETURN 'FAIL';
-         END IF;
-         srid := sridinfo.srid;
-         raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM;--issue 210,211,213
-             RAISE NOTICE 'ERROR: something went wrong when checking for SRID of % in table %', the_geom,tabname;
-             RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-       raise debug 'Checking  indices in edge table';
-       perform _pgr_createIndex(tabname , idname , 'btree');
-       perform _pgr_createIndex(tabname , sourcename , 'btree');
-       perform _pgr_createIndex(tabname , targetname , 'btree');
-       perform _pgr_createIndex(tabname , gname , 'gist');
-
-       gname=quote_ident(gname);
-       sourcename=quote_ident(sourcename);
-       targetname=quote_ident(targetname);
-       idname=quote_ident(idname);
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking indices';
-          RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-        query='select count(*) from '||_pgr_quote_ident(tabname)||' where true  '||rows_where;
-        EXECUTE query into ecnt;
-        raise DEBUG '-->Rows Where condition: OK';
-        raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-            RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-            RAISE NOTICE 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-            RAISE NOTICE '%',query;
-            RETURN 'FAIL';
-    END;
-
-    selectionquery ='with
-           selectedRows as( (select '||sourcename||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||')
-                           union
-                           (select '||targetname||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||'))';
-
-
-
-
-
-   BEGIN
-       RAISE NOTICE 'Analyzing for dead ends. Please wait...';
-       query= 'with countingsource as (select a.'||sourcename||' as id,count(*) as cnts
-               from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||sourcename||')
-                     ,countingtarget as (select a.'||targetname||' as id,count(*) as cntt
-                    from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||targetname||')
-                   ,totalcount as (select id,case when cnts is null and cntt is null then 0
-                                                   when cnts is null then cntt
-                                                   when cntt is null then cnts
-                                                   else cnts+cntt end as totcnt
-                                   from ('||_pgr_quote_ident(vertname)||' as a left
-                                   join countingsource as t using(id) ) left join countingtarget using(id))
-               update '||_pgr_quote_ident(vertname)||' as a set cnt=totcnt from totalcount as b where a.id=b.id';
-       raise debug '%',query;
-       execute query;
-       query=selectionquery||'
-              SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE cnt=1 and id in (select id from selectedRows)';
-       raise debug '%',query;
-       execute query  INTO numdeadends;
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-          RAISE NOTICE 'ERROR: something went wrong when analizing for dead ends';
-          RETURN 'FAIL';
-   END;
-
-
-
-    BEGIN
-          RAISE NOTICE 'Analyzing for gaps. Please wait...';
-          query = 'with
-                   buffer as (select id,st_buffer(the_geom,'||tolerance||') as buff from '||_pgr_quote_ident(vertname)||' where cnt=1)
-                   ,veryclose as (select b.id,st_crosses(a.'||gname||',b.buff) as flag
-                   from  (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) as a
-                   join buffer as b on (a.'||gname||'&&b.buff)
-                   where '||sourcename||'!=b.id and '||targetname||'!=b.id )
-                   update '||_pgr_quote_ident(vertname)||' set chk=1 where id in (select distinct id from veryclose where flag=true)';
-          raise debug '%' ,query;
-          execute query;
-          GET DIAGNOSTICS  numgaps= ROW_COUNT;
-          raise DEBUG '     --> OK';
-          EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for gaps';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for isolated edges. Please wait...';
-        query=selectionquery|| ' SELECT count(*) FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' )  as a,
-                                                 '||_pgr_quote_ident(vertname)||' as b,
-                                                 '||_pgr_quote_ident(vertname)||' as c
-                            WHERE b.id in (select id from selectedRows) and a.'||sourcename||' =b.id
-                            AND b.cnt=1 AND a.'||targetname||' =c.id
-                            AND c.cnt=1';
-        raise debug '%' ,query;
-        execute query  INTO NumIsolated;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for isolated edges';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for ring geometries. Please wait...';
-        execute 'SELECT geometrytype('||gname||')  FROM '||_pgr_quote_ident(tabname) limit 1 into geotype;
-        IF (geotype='MULTILINESTRING') THEN
-            query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                 WHERE true  '||rows_where||' and st_isRing(st_linemerge('||gname||'))';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        ELSE query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                  WHERE true  '||rows_where||' and st_isRing('||gname||')';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        END IF;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for ring geometries';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for intersections. Please wait...';
-        query = 'select count(*) from (select distinct case when a.'||idname||' < b.'||idname||' then a.'||idname||'
-                                                        else b.'||idname||' end,
-                                                   case when a.'||idname||' < b.'||idname||' then b.'||idname||'
-                                                        else a.'||idname||' end
-                                    FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as a
-                                    JOIN (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as b
-                                    ON (a.'|| gname||' && b.'||gname||')
-                                    WHERE a.'||idname||' != b.'||idname|| '
-                                        and (a.'||sourcename||' in (b.'||sourcename||',b.'||targetname||')
-                                              or a.'||targetname||' in (b.'||sourcename||',b.'||targetname||')) = false
-                                        and st_intersects(a.'||gname||', b.'||gname||')=true) as d ';
-        raise debug '%' ,query;
-        execute query  INTO numCrossing;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for intersections';
-            RETURN 'FAIL';
-    END;
-
-
-
-
-    RAISE NOTICE '            ANALYSIS RESULTS FOR SELECTED EDGES:';
-    RAISE NOTICE '                  Isolated segments: %', NumIsolated;
-    RAISE NOTICE '                          Dead ends: %', numdeadends;
-    RAISE NOTICE 'Potential gaps found near dead ends: %', numgaps;
-    RAISE NOTICE '             Intersections detected: %',numCrossing;
-    RAISE NOTICE '                    Ring geometries: %',numRings;
-
-
-    RETURN 'OK';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_analyzeGraph(text,double precision,text,text,text,text,text) IS 'args: edge_table, tolerance,the_geom:=''the_geom'',id:=''id'',source column:=''source'', target column:=''target'' rows_where:=''true'' - creates a vertices table based on the geometry for selected rows';
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzeOneway(
-   edge_table text,
-   s_in_rules TEXT[],
-   s_out_rules TEXT[],
-   t_in_rules TEXT[],
-   t_out_rules TEXT[],
-   two_way_if_null boolean default true,
-   oneway text default 'oneway',
-   source text default 'source',
-   target text default 'target')
-  RETURNS text AS
-$BODY$
-
-
-DECLARE
-    rule text;
-    ecnt integer;
-    instr text;
-    naming record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    owname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    vertname text;
-    debuglevel text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeOneway(''%'',''%'',''%'',''%'',''%'',''%'',''%'',''%'',%)',
-		edge_table, s_in_rules , s_out_rules, t_in_rules, t_out_rules, oneway, source ,target,two_way_if_null ;
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    raise DEBUG '     --> OK';
-    EXCEPTION WHEN raise_exception THEN
-      RAISE NOTICE 'ERROR: something went wrong checking the table name';
-      RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","ein","eout"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET eout=0 ,ein=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into owname from _pgr_getColumnName(sname, tname,oneway,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,owname) or  targetname=owname, 2,
-                       '_pgr_createToplogy',  'Two columns share the same name', 'Parameter names for oneway,source and target  must be different',
-                       'Column names are OK');
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-
-
-    RAISE NOTICE 'Analyzing graph for one way street errors.';
-
-    rule := CASE WHEN two_way_if_null
-            THEN owname || ' IS NULL OR '
-            ELSE '' END;
-
-    instr := '''' || array_to_string(s_in_rules, ''',''') || '''';
-       EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-      from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-     where a.id=b.'|| sourcename;
-
-    RAISE NOTICE 'Analysis 25%% complete ...';
-
-    instr := '''' || array_to_string(t_in_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 50%% complete ...';
-
-    instr := '''' || array_to_string(s_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-        where a.id=b.'|| sourcename;
-    RAISE NOTICE 'Analysis 75%% complete ...';
-
-    instr := '''' || array_to_string(t_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 100%% complete ...';
-
-    EXECUTE 'SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE ein=0 or eout=0' INTO ecnt;
-
-    RAISE NOTICE 'Found % potential problems in directionality' ,ecnt;
-
-    RETURN 'OK';
-
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_analyzeOneway(text,TEXT[],TEXT[], TEXT[],TEXT[],boolean,text,text,text)
-IS 'args:edge_table , s_in_rules , s_out_rules, t_in_rules , t_out_rules, two_way_if_null:= true, oneway:=''oneway'',source:= ''source'',target:=''target'' - Analizes the directionality of the edges based on the rules';
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createverticestable(
-   edge_table text,
-   the_geom text DEFAULT 'the_geom'::text,
-   source text DEFAULT 'source'::text,
-   target text DEFAULT 'target'::text,
-    rows_where text DEFAULT 'true'::text
-)
-  RETURNS text AS
-$BODY$
-DECLARE
-    naming record;
-    sridinfo record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    sourcename text;
-    targetname text;
-    query text;
-    ecnt bigint;
-    srid integer;
-    sourcetype text;
-    targettype text;
-    sql text;
-    totcount integer;
-    i integer;
-    notincluded integer;
-    included integer;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-
-
-BEGIN
-  fnName = 'pgr_createVerticesTable';
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_createVerticesTable(''%'',''%'',''%'',''%'',''%'')',edge_table,the_geom,source,target,rows_where;
-  execute 'show client_min_messages' into debuglevel;
-
-  raise notice 'Performing checks, please wait .....';
-
-  RAISE DEBUG 'Checking % exists',edge_table;
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-  raise debug '--> Edge table exists: OK';
-
-  raise debug 'Checking column names';
-    select * into sourcename from _pgr_getColumnName(sname, tname,source,2, fnName);
-    select * into targetname from _pgr_getColumnName(sname, tname,target,2, fnName);
-    select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2, fnName);
-
-
-    err = sourcename in (targetname,gname) or  targetname=gname;
-    perform _pgr_onError(err, 2, fnName,
-        'Two columns share the same name', 'Parameter names for the_geom,source and target  must be different');
-  raise debug '--> Column names: OK';
-
-  raise debug 'Checking column types in edge table';
-    select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-    select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-
-
-    err = sourcetype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column source: '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-    err = targettype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column target: '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found');
-
-  raise debug '-->Column types:OK';
-
-  raise debug 'Checking SRID of geometry column';
-     query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-        || ' FROM ' || _pgr_quote_ident(tabname)
-        || ' WHERE ' || quote_ident(gname)
-        || ' IS NOT NULL LIMIT 1';
-     raise debug '%',query;
-     EXECUTE query INTO sridinfo;
-
-     err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-     perform _pgr_onError(err, 2, fnName,
-         'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-     srid := sridinfo.srid;
-  raise DEBUG '     --> OK';
-
-  raise debug 'Checking and creating Indices';
-     perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-  raise DEBUG '-->Check and create indices: OK';
-
-     gname=quote_ident(gname);
-     sourcename=quote_ident(sourcename);
-     targetname=quote_ident(targetname);
-
-
-  BEGIN
-  raise debug 'Checking Condition';
-    -- issue #193 & issue #210 & #213
-    -- this sql is for trying out the where clause
-    -- the select * is to avoid any column name conflicts
-    -- limit 1, just try on first record
-    -- if the where clasuse is ill formed it will be caught in the exception
-    sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-    EXECUTE sql into dummyRec;
-    -- end
-
-    -- if above where clasue works this one should work
-    -- any error will be caught by the exception also
-    sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NULL or '||
-		sourcename||' is null or '||targetname||' is null)=true '||rows_where;
-    raise debug '%',sql;
-    EXECUTE SQL  into notincluded;
-    EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-
-
-
-  BEGIN
-     raise DEBUG 'initializing %',vertname;
-       execute 'select * from _pgr_getTableName('||quote_literal(vertname)||',0)' into naming;
-       IF sname=naming.sname  AND vname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-       ELSE
-           set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-       END IF;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-                quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-       execute 'CREATE INDEX '||quote_ident(vname||'_the_geom_idx')||' ON '||_pgr_quote_ident(vertname)||'  USING GIST (the_geom)';
-       execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-       EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Initializing vertex table';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise notice 'Populating %, please wait...',vertname;
-       sql= 'with
-		lines as ((select distinct '||sourcename||' as id, _pgr_startpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-		                  ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||')
-			union (select distinct '||targetname||' as id,_pgr_endpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-			          ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||'))
-		,numberedLines as (select row_number() OVER (ORDER BY id) AS i,* from lines )
-		,maxid as (select id,max(i) as maxi from numberedLines group by id)
-		insert into '||_pgr_quote_ident(vertname)||'(id,the_geom)  (select id,the_geom  from numberedLines join maxid using(id) where i=maxi order by id)';
-       RAISE debug '%',sql;
-       execute sql;
-       GET DIAGNOSTICS totcount = ROW_COUNT;
-
-       sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' a, '||_pgr_quote_ident(vertname)||' b
-            where '||sourcename||'=b.id and '|| targetname||' in (select id from '||_pgr_quote_ident(vertname)||')';
-       RAISE debug '%',sql;
-       execute sql into included;
-
-
-
-       execute 'select max(id) from '||_pgr_quote_ident(vertname) into ecnt;
-       execute 'SELECT setval('||quote_literal(vertname||'_id_seq')||','||coalesce(ecnt,1)||' , false)';
-       raise notice '  ----->   VERTICES TABLE CREATED WITH  % VERTICES', totcount;
-       raise notice '                                       FOR   %  EDGES', included+notincluded;
-       RAISE NOTICE '  Edges with NULL geometry,source or target: %',notincluded;
-       RAISE NOTICE '                            Edges processed: %',included;
-       Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname),_pgr_quote_ident(vertname);
-       raise notice '----------------------------------------------';
-    END;
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_createVerticesTable(text,text,text,text,text)
-IS 'args: edge_table, the_geom:=''the_geom'',source:=''source'', target:=''target'' rows_where:=''true'' - creates a vertices table based on the source and target identifiers for selected rows';
-
-
-CREATE OR REPLACE FUNCTION pgr_nodeNetwork(edge_table text, tolerance double precision,
-			id text default 'id', the_geom text default 'the_geom', table_ending text default 'noded',
-            rows_where text DEFAULT ''::text, outall boolean DEFAULT false) RETURNS text AS
-$BODY$
-DECLARE
-	
-	p_num int := 0;
-	p_ret text := '';
-    pgis_ver_old boolean := _pgr_versionless(postgis_lib_version(), '2.1.0.0');
-    vst_line_substring text;
-    vst_line_locate_point text;
-    intab text;
-    outtab text;
-    n_pkey text;
-    n_geom text;
-    naming record;
-    sname text;
-    tname text;
-    outname text;
-    srid integer;
-    sridinfo record;
-    splits bigint;
-    touched bigint;
-    untouched bigint;
-    geomtype text;
-    debuglevel text;
-    rows_where text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_nodeNetwork(''%'', %, ''%'', ''%'', ''%'', ''%'',  %)',
-    edge_table, tolerance, id,  the_geom, table_ending, rows_where, outall;
-  raise notice 'Performing checks, please wait .....';
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',0)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-	RAISE NOTICE '-------> % not found',edge_table;
-        RETURN 'FAIL';
-    ELSE
-	RAISE DEBUG '  -----> OK';
-    END IF;
-
-    intab=sname||'.'||tname;
-    outname=tname||'_'||table_ending;
-    outtab= sname||'.'||outname;
-    rows_where = CASE WHEN length(rows_where) > 2 and not outall THEN ' AND (' || rows_where || ')' ELSE '' END;
-    rows_where = CASE WHEN length(rows_where) > 2 THEN ' WHERE (' || rows_where || ')' ELSE '' END;
-  END;
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',id,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(id)||')' INTO n_pkey;
-       IF n_pkey is NULL then
-          raise notice  'ERROR: id column "%"  not found in %',id,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',the_geom,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(the_geom)||')' INTO n_geom;
-       IF n_geom is NULL then
-          raise notice  'ERROR: the_geom  column "%"  not found in %',the_geom,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-  IF n_pkey=n_geom THEN
-	raise notice  'ERROR: id and the_geom columns have the same name "%" in %',n_pkey,intab;
-        RETURN 'FAIL';
-  END IF;
-
-  BEGIN
-       	raise DEBUG 'Checking the SRID of the geometry "%"', n_geom;
-       	EXECUTE 'SELECT ST_SRID(' || quote_ident(n_geom) || ') as srid '
-          		|| ' FROM ' || _pgr_quote_ident(intab)
-          		|| ' WHERE ' || quote_ident(n_geom)
-          		|| ' IS NOT NULL LIMIT 1' INTO sridinfo;
-       	IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-        	RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           	RETURN 'FAIL';
-       	END IF;
-       	srid := sridinfo.srid;
-       	raise DEBUG '  -----> SRID found %',srid;
-       	EXCEPTION WHEN OTHERS THEN
-           		RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           		RETURN 'FAIL';
-  END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_pkey,intab;
-      if (_pgr_isColumnIndexed(intab,n_pkey)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding  index "%_%_idx".',n_pkey,intab;
-
-	set client_min_messages  to warning;
-        execute 'create  index '||tname||'_'||n_pkey||'_idx on '||_pgr_quote_ident(intab)||' using btree('||quote_ident(n_pkey)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_geom,intab;
-      if (_pgr_iscolumnindexed(intab,n_geom)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding unique index "%_%_gidx".',intab,n_geom;
-	set client_min_messages  to warning;
-        execute 'CREATE INDEX '
-            || quote_ident(tname || '_' || n_geom || '_gidx' )
-            || ' ON ' || _pgr_quote_ident(intab)
-            || ' USING gist (' || quote_ident(n_geom) || ')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
----------------
-    BEGIN
-       raise DEBUG 'initializing %',outtab;
-       execute 'select * from _pgr_getTableName('||quote_literal(outtab)||',0)' into naming;
-       IF sname=naming.sname  AND outname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(outtab)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(outname)||','||quote_literal(n_geom)||')';
-       ELSE
-	   set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(outtab)||' (id bigserial PRIMARY KEY,old_id integer,sub_id integer,
-								source bigint,target bigint)';
-       END IF;
-       execute 'select geometrytype('||quote_ident(n_geom)||') from  '||_pgr_quote_ident(intab)||' limit 1' into geomtype;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(outname)||','||
-                quote_literal(n_geom)||','|| srid||', '||quote_literal(geomtype)||', 2)';
-       execute 'CREATE INDEX '||quote_ident(outname||'_'||n_geom||'_idx')||' ON '||_pgr_quote_ident(outtab)||'  USING GIST ('||quote_ident(n_geom)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-    END;
-----------------
-
-
-  raise notice 'Processing, please wait .....';
-
-
-    if pgis_ver_old then
-        vst_line_substring    := 'st_line_substring';
-        vst_line_locate_point := 'st_line_locate_point';
-    else
-        vst_line_substring    := 'st_linesubstring';
-        vst_line_locate_point := 'st_linelocatepoint';
-    end if;
-
---    -- First creates temp table with intersection points
-    p_ret = 'create temp table intergeom on commit drop as (
-        select l1.' || quote_ident(n_pkey) || ' as l1id,
-               l2.' || quote_ident(n_pkey) || ' as l2id,
-	       l1.' || quote_ident(n_geom) || ' as line,
-	       _pgr_startpoint(l2.' || quote_ident(n_geom) || ') as source,
-	       _pgr_endpoint(l2.' || quote_ident(n_geom) || ') as target,
-               st_intersection(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ') as geom
-        from (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l1
-             join (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l2
-             on (st_dwithin(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ', ' || tolerance || '))'||
-        'where l1.' || quote_ident(n_pkey) || ' <> l2.' || quote_ident(n_pkey)||' and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false  )';
-    raise debug '%',p_ret;
-    EXECUTE p_ret;
-
-    -- second temp table with locus (index of intersection point on the line)
-    -- to avoid updating the previous table
-    -- we keep only intersection points occurring onto the line, not at one of its ends
---    drop table if exists inter_loc;
-
---HAD TO CHANGE THIS QUERY
--- p_ret= 'create temp table inter_loc on commit drop as (
---        select l1id, l2id, ' || vst_line_locate_point || '(line,point) as locus from (
---        select DISTINCT l1id, l2id, line, (ST_DumpPoints(geom)).geom as point from intergeom) as foo
---        where ' || vst_line_locate_point || '(line,point)<>0 and ' || vst_line_locate_point || '(line,point)<>1)';
-    p_ret= 'create temp table inter_loc on commit drop as ( select * from (
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,source) as locus from intergeom)
-         union
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,target) as locus from intergeom)) as foo
-        where locus<>0 and locus<>1)';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-
-    -- index on l1id
-    create index inter_loc_id_idx on inter_loc(l1id);
-
-    -- Then computes the intersection on the lines subset, which is much smaller than full set
-    -- as there are very few intersection points
-
---- outab needs to be formally created with id, old_id, subid,the_geom, source,target
----  so it can be inmediatly be used with createTopology
-
---   EXECUTE 'drop table if exists ' || _pgr_quote_ident(outtab);
---   EXECUTE 'create table ' || _pgr_quote_ident(outtab) || ' as
-     P_RET = 'insert into '||_pgr_quote_ident(outtab)||' (old_id,sub_id,'||quote_ident(n_geom)||') (  with cut_locations as (
-           select l1id as lid, locus
-           from inter_loc
-           -- then generates start and end locus for each line that have to be cut buy a location point
-           UNION ALL
-           select i.l1id  as lid, 0 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           UNION ALL
-           select i.l1id  as lid, 1 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           order by lid, locus
-       ),
-       -- we generate a row_number index column for each input line
-       -- to be able to self-join the table to cut a line between two consecutive locations
-       loc_with_idx as (
-           select lid, locus, row_number() over (partition by lid order by locus) as idx
-           from cut_locations
-       )
-       -- finally, each original line is cut with consecutive locations using linear referencing functions
-       select l.' || quote_ident(n_pkey) || ', loc1.idx as sub_id, ' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus) as ' || quote_ident(n_geom) || '
-       from loc_with_idx loc1 join loc_with_idx loc2 using (lid) join ' || _pgr_quote_ident(intab) || ' l on (l.' || quote_ident(n_pkey) || ' = loc1.lid)
-       where loc2.idx = loc1.idx+1
-           -- keeps only linestring geometries
-           and geometryType(' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus)) = ''LINESTRING'') ';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-	GET DIAGNOSTICS splits = ROW_COUNT;
-        execute 'with diff as (select distinct old_id from '||_pgr_quote_ident(outtab)||' )
-                 select count(*) from diff' into touched;
-	-- here, it misses all original line that did not need to be cut by intersection points: these lines
-	-- are already clean
-	-- inserts them in the final result: all lines which gid is not in the res table.
-	EXECUTE 'insert into ' || _pgr_quote_ident(outtab) || ' (old_id , sub_id, ' || quote_ident(n_geom) || ')
-                ( with used as (select distinct old_id from '|| _pgr_quote_ident(outtab)||')
-		select ' ||  quote_ident(n_pkey) || ', 1 as sub_id, ' ||  quote_ident(n_geom) ||
-		' from '|| _pgr_quote_ident(intab) ||' where  '||quote_ident(n_pkey)||' not in (select * from used)' || rows_where || ')';
-	GET DIAGNOSTICS untouched = ROW_COUNT;
-
-	raise NOTICE '  Split Edges: %', touched;
-	raise NOTICE ' Untouched Edges: %', untouched;
-	raise NOTICE '     Total original Edges: %', touched+untouched;
-        RAISE NOTICE ' Edges generated: %', splits;
-	raise NOTICE ' Untouched Edges: %',untouched;
-	raise NOTICE '       Total New segments: %', splits+untouched;
-        RAISE NOTICE ' New Table: %', outtab;
-        RAISE NOTICE '----------------------------------';
-
-    drop table  if exists intergeom;
-    drop table if exists inter_loc;
-    RETURN 'OK';
-END;
-$BODY$
-    LANGUAGE 'plpgsql' VOLATILE STRICT COST 100;
-
-
-COMMENT ON FUNCTION pgr_nodeNetwork(text, double precision, text, text, text, text, boolean )
- IS  'edge_table, tolerance, id:=''id'', the_geom:=''the_geom'', table_ending:=''noded'' ';
-
-
-CREATE OR REPLACE FUNCTION pgr_labelGraph(
-                edge_table text,
-                id text default 'id',
-                source text default 'source',
-                target text default 'target',
-                subgraph text default 'subgraph',
-                rows_where text default 'true'
-        )
-        RETURNS character varying AS
-$BODY$
-
-DECLARE
-        naming record;
-        schema_name text;
-        table_name text;
-        garbage text;
-        incre integer;
-        table_schema_name text;
-        query text;
-        ecnt integer;
-        sql1 text;
-        rec1 record;
-        sql2 text;
-        rec2 record;
-        rec_count record;
-        rec_single record;
-        graph_id integer;
-        gids int [];
-
-BEGIN
-        raise notice 'Processing:';
-        raise notice 'pgr_brokenGraph(''%'',''%'',''%'',''%'',''%'',''%'')', edge_table,id,source,target,subgraph,rows_where;
-        raise notice 'Performing initial checks, please hold on ...';
-
-        Raise Notice 'Starting - Checking table ...';
-        BEGIN
-                raise debug 'Checking % table existance', edge_table;
-                execute 'select * from pgr_getTableName('|| quote_literal(edge_table) ||')' into naming;
-                schema_name = naming.sname;
-                table_name = naming.tname;
-                table_schema_name = schema_name||'.'||table_name;
-                IF schema_name is null then
-                        raise notice 'no schema';
-                        return 'FAIL';
-                else
-                        if table_name is null then
-                                raise notice 'no table';
-                                return 'FAIL';
-                        end if;
-                end if;
-        END;
-        Raise Notice 'Ending - Checking table';
-
-        Raise Notice 'Starting - Checking columns';
-        BEGIN
-                raise debug 'Checking exitance of necessary columns inside % table', edge_table;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(id) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no id column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(source) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no source column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(target) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no target column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(subgraph) ||')' into naming;
-                if naming.pgr_iscolumnintable = 't' then
-                        raise notice 'subgraph column already in the table';
-                        return 'FAIL';
-                end if;
-        END;
-        Raise Notice 'Ending - Checking columns';
-
-        Raise Notice 'Starting - Checking rows_where condition';
-        BEGIN
-                raise debug 'Checking rows_where condition';
-                query='select count(*) from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where;
-                execute query into ecnt;
-                raise debug '-->Rows where condition: OK';
-                raise debug '    --> OK';
-                EXCEPTION WHEN OTHERS THEN
-                        raise notice 'Got %', SQLERRM;
-                        Raise notice 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-                        Raise notice '%', query;
-                        return 'FAIL';
-        END;
-        Raise Notice 'Ending - Checking rows_where condition';
-
-        garbage := 'garbage001';
-        incre := 1;
-        Raise Notice 'Starting - Checking temporary column';
-        Begin
-                raise debug 'Checking Checking temporary columns existance';
-
-                While True
-                        Loop
-                                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(garbage) ||')' into naming;
-                                If naming.pgr_iscolumnintable = 't' THEN
-                                        incre := incre + 1;
-                                        garbage := 'garbage00'||incre||'';
-                                ELSE
-                                        EXIT;
-                                END IF;
-                        End Loop;
-        End;
-        Raise Notice 'Ending - Checking temporary column';
-
-        Raise Notice 'Starting - Calculating subgraphs';
-        BEGIN
-                --------- Add necessary columns ----------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(subgraph) || ' INTEGER DEFAULT -1';
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(garbage) || ' INTEGER DEFAULT 0';
-                graph_id := 1;
-
-                EXECUTE 'select count(*) as count from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where ||'' into rec_count;
-                if rec_count.count = 0 then
-                        RETURN 'rows_where condition generated 0 rows';
-                end if;
-
-                WHILE TRUE
-                        LOOP
-                                ---------- Assign the very first -1 row graph_id ----------
-                                EXECUTE 'SELECT ' || pgr_quote_ident(id) || ' AS gid FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1 LIMIT 1' INTO rec_single;
-                                EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec_single.gid || '';
-
-                                --------- Search other rows with that particular graph_id -----------
-                                WHILE TRUE
-                                        LOOP
-                                                EXECUTE 'SELECT COUNT(*) FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0' into rec_count;
-                                                ----------- The following if else will check those rows which already have entertained ------------
-                                                IF (rec_count.count > 0) THEN
-                                                        sql1 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0';
-                                                        FOR rec1 IN EXECUTE sql1
-                                                                LOOP
-                                                                        sql2 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| pgr_quote_ident(source) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(source) ||' = '|| rec1.target ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.target ||'';
-                                                                        FOR rec2 IN EXECUTE sql2
-                                                                                LOOP
-                                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec2.gid || '';
-                                                                                END LOOP;
-                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(garbage) || ' = 1 WHERE ' || pgr_quote_ident(id) || ' = ' || rec1.gid || '';
-                                                                END LOOP;
-                                                ELSE
-                                                        EXIT;
-                                                END IF;
-                                        END LOOP;
-
-                                ------ Following is to exit the while loop. 0 means no more -1 id.
-                                EXECUTE 'SELECT COUNT(*) AS count FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1' INTO rec_count;
-                                If (rec_count.count = 0) THEN
-                                        EXIT;
-                                ELSE
-                                        graph_id := graph_id + 1;
-                                END IF;
-                        END LOOP;
-
-                ----------- Drop garbage column ------------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' DROP COLUMN ' || pgr_quote_ident(garbage) ||'';
-                Raise Notice 'Successfully complicated calculating subgraphs';
-        END;
-        Raise Notice 'Ending - Calculating subgraphs';
-
-        RETURN 'OK';
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCostMatrix(
-    edges_sql TEXT,
-    points_sql TEXT,
-    pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_pid, a.end_pid, a.agg_cost
-        FROM _pgr_withPoints($1, $2, $3, $3, $4,  $5, TRUE, TRUE) AS a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
---  DIJKSTRA DMatrix
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2, $2, $3, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
---  BIDIRECTIONAL DIJKSTRA Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_astarCostMatrix(
-    edges_sql TEXT, -- XY edges sql
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2, $2, $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
---  BIDIRECTIONAL ASTAR Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdAstarCostMatrix(
-    edges_sql TEXT,
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_bdAstarCostMatrix(TEXT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCostMatrix';
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_getTableName(IN tab text,OUT sname text,OUT tname text)
-RETURNS RECORD AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getTableName: This function will no longer be soported';
-    select * from _pgr_getTableName(tab, 0, 'pgr_getTableName') into sname,tname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_getColumnName(tab text, col text)
-RETURNS text AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getColumnName: This function will no longer be soported';
-    return _pgr_getColumnName(tab,col, 0, 'pgr_getColumnName');
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    select * from _pgr_getColumnName(tab,col,0, 'pgr_isColumnInTable') into cname;
-    return  cname IS not NULL;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnIndexed(tab text, col text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnIndexed: This function will no longer be soported';
-    return  _pgr_isColumnIndexed(tab,col);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-create or replace function pgr_quote_ident(idname text)
-returns text as
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    return  _pgr_quote_ident(idname);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_versionless(v1 text, v2 text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_versionless: This function will no longer be soported';
-    return  _pgr_versionless(v1,v2);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-create or replace function pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_startPoint: This function will no longer be soported';
-    return  _pgr_startPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_endPoint: This function will no longer be soported';
-    return  _pgr_endPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspJohnson(edges_sql text)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_johnson instead';
-      has_reverse =_pgr_parameter_check('johnson', edges_sql, false);
-      sql = edges_sql;
-      IF (has_reverse) THEN
-           RAISE NOTICE 'reverse_cost column found, removing.';
-           sql = 'SELECT source, target, cost FROM (' || edges_sql || ') a';
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () - 1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_johnson(sql, TRUE);
-  END
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspWarshall(edges_sql text, directed boolean, has_rcost boolean)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_floydWarshall instead';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-      sql := edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         ELSE raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () -1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_floydWarshall(sql, directed);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_astar(edges_sql TEXT, source_id INTEGER, target_id INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated signature pgr_astar(text, integer, integer, boolean, boolean)';
-    has_reverse =_pgr_parameter_check('astar', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost, x1,y1, x2, y2 FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-    FROM pgr_astar(sql, ARRAY[$2], ARRAY[$3], directed);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    sql TEXT,
-    source_vid INTEGER,
-    target_vid INTEGER,
-    directed BOOLEAN,
-    has_reverse_cost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdAstar';
-    has_reverse =_pgr_parameter_check('astar', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdAstar(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(edges_sql TEXT, start_vid INTEGER, end_vid INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdDijkstra';
-    has_reverse =_pgr_parameter_check('dijkstra', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdDijkstra(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstraPath(
-    sql text,
-    source INTEGER,
-    targets INTEGER ARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-    RETURNS SETOF pgr_costResult3 AS
-    $BODY$
-    DECLARE
-    has_reverse BOOLEAN;
-    new_sql TEXT;
-    result pgr_costResult3;
-    tmp pgr_costResult3;
-    sseq INTEGER;
-    i INTEGER;
-    BEGIN
-        RAISE NOTICE 'Deprecated function: Use pgr_dijkstra instead.';
-        has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-        new_sql = sql;
-        IF (array_ndims(targets) != 1) THEN
-            raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-
-        IF (has_reverse != has_rcost) THEN
-            IF (has_reverse) THEN
-                new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-            ELSE
-                raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-                USING ERRCODE = 'XX000';
-            END IF;
-        END IF;
-        SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-        sseq = 0; i = 1;
-        FOR result IN
-            SELECT seq, a.end_vid::INTEGER AS id1, a.node::INTEGER AS i2, a.edge::INTEGER AS id3, cost
-            FROM pgr_dijkstra(new_sql, source, targets, directed) a ORDER BY a.end_vid, seq LOOP
-            WHILE (result.id1 != targets[i]) LOOP
-                tmp.seq = sseq;
-                tmp.id1 = targets[i];
-                IF (targets[i] = source) THEN
-                    tmp.id2 = source;
-                    tmp.cost =0;
-                ELSE
-                    tmp.id2 = 0;
-                    tmp.cost = -1;
-                END IF;
-                tmp.id3 = -1;
-                RETURN next tmp;
-                i = i + 1;
-                sseq = sseq + 1;
-            END LOOP;
-        IF (result.id1 = targets[i] AND result.id3 != -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-        IF (result.id1 = targets[i] AND result.id3 = -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.id2 = source;
-            tmp.cost = 0;
-        ELSE
-            tmp.id2 = 0;
-            tmp.cost = -1;
-        END IF;
-        tmp.id3 = -1;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstracost(
-    sql text,
-    source INTEGER,
-    targets INTEGER array,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-result pgr_costResult;
-tmp pgr_costResult;
-sseq INTEGER;
-i INTEGER;
-BEGIN
-    RAISE NOTICE 'Deprecated function. Use pgr_dijkstraCost instead.';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    new_sql = sql;
-    IF (array_ndims(targets) != 1) THEN
-        raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-        USING ERRCODE = 'XX000';
-    END IF;
-
-
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-    sseq = 0; i = 1;
-    FOR result IN
-        SELECT ((row_number() over()) -1)::INTEGER, a.start_vid::INTEGER, a.end_vid::INTEGER, agg_cost
-        FROM pgr_dijkstraCost(new_sql, source, targets, directed) a ORDER BY end_vid LOOP
-        WHILE (result.id2 != targets[i]) LOOP
-            tmp.seq = sseq;
-            tmp.id1 = source;
-            tmp.id2 = targets[i];
-            IF (targets[i] = source) THEN
-                tmp.cost = 0;
-            ELSE
-                tmp.cost = -1;
-            END IF;
-            RETURN next tmp;
-            i = i + 1;
-            sseq = sseq + 1;
-        END LOOP;
-        IF (result.id2 = targets[i]) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = source;
-        tmp.id2 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.cost = 0;
-        ELSE
-            tmp.cost = -1;
-        END IF;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-create or replace function pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    returns integer as
-$body$
-
-declare
-    rr record;
-    pct float;
-    debuglevel text;
-
-begin
-    -- find the closest edge within tol distance
-    execute 'select * from ' || _pgr_quote_ident(edges) ||
-            ' where st_dwithin(''' || pnt::text ||
-            '''::geometry, the_geom, ' || tol || ') order by st_distance(''' || pnt::text ||
-            '''::geometry, the_geom) asc limit 1' into rr;
-
-    if rr.the_geom is not null then
-        -- deal with MULTILINESTRINGS
-        if geometrytype(rr.the_geom)='MULTILINESTRING' THEN
-            rr.the_geom := ST_GeometryN(rr.the_geom, 1);
-        end if;
-
-        -- project the point onto the linestring
-        execute 'show client_min_messages' into debuglevel;
-        SET client_min_messages='ERROR';
-        pct := st_line_locate_point(rr.the_geom, pnt);
-        execute 'set client_min_messages  to '|| debuglevel;
-
-        -- return the node we are closer to
-        if pct < 0.5 then
-            return rr.source;
-        else
-            return rr.target;
-        end if;
-    else
-        -- return a failure to find an edge within tol distance
-        return -1;
-    end if;
-end;
-$body$
-  language plpgsql volatile
-  cost 5;
-
-
-----------------------------------------------------------------------------
-
-create or replace function pgr_flipedges(ga geometry[])
-    returns geometry[] as
-$body$
-
-declare
-    nn integer;
-    i integer;
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_flipEdges';
-    -- get the count of edges, and return if only one edge
-    nn := array_length(ga, 1);
-    if nn=1 then
-        return ga;
-    end if;
-
-    -- determine if first needs to be flipped
-    g := _pgr_startpoint(ga[1]);
-
-    -- if the start of the first is connected to the second then it needs to be flipped
-    if _pgr_startpoint(ga[2])=g or _pgr_endpoint(ga[2])=g then
-        ga[1] := st_reverse(ga[1]);
-    end if;
-    g := _pgr_endpoint(ga[1]);
-
-    -- now if  the end of the last edge matchs the end of the current edge we need to flip it
-    for i in 2 .. nn loop
-        if _pgr_endpoint(ga[i])=g then
-            ga[i] := st_reverse(ga[i]);
-        end if;
-        -- save the end of this edge into the last end for the next cycle
-        g := _pgr_endpoint(ga[i]);
-    end loop;
-
-    return ga;
-end;
-$body$
-    language plpgsql immutable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_texttopoints(pnts text, srid integer DEFAULT(4326))
-    returns geometry[] as
-$body$
-
-declare
-    a text[];
-    t text;
-    p geometry;
-    g geometry[];
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_textToPoints';
-    -- convert commas to space and split on ';'
-    a := string_to_array(replace(pnts, ',', ' '), ';');
-    -- convert each 'x y' into a point geometry and concattenate into a new array
-    for t in select unnest(a) loop
-        p := st_pointfromtext('POINT(' || t || ')', srid);
-        g := g || p;
-    end loop;
-
-    return g;
-end;
-$body$
-    language plpgsql immutable;
-
------------------------------------------------------------------------
-
-create or replace function pgr_pointstovids(pnts geometry[], edges text, tol float8 DEFAULT(0.01))
-    returns integer[] as
-$body$
-
-declare
-    v integer[];
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_pointsToVids';
-    -- cycle through each point and locate the nearest edge and vertex on that edge
-    for g in select unnest(pnts) loop
-        v := v || pgr_pointtoedgenode(edges, g, tol);
-    end loop;
-
-    return v;
-end;
-$body$
-    language plpgsql stable;
-
-
-create or replace function pgr_pointstodmatrix(pnts geometry[], mode integer default (0), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    r record;
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_pointsToDMatrix';
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    -- create an id for each point in the array and unnest it into a table nodes in the with clause
-    for r in with nodes as (select row_number() over()::integer as id, p from (select unnest(pnts) as p) as foo)
-        -- compute a row of distances
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j,
-                case when mode=0
-                    then st_distance(a.p, b.p)
-                    else st_distance_sphere(a.p, b.p)
-                end as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i loop
-
-        -- you must concat an array[array[]] to make dmatrix[][]
-        -- concat the row of distances to the dmatrix
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-end;
-$body$
-    language plpgsql stable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_vidstodmatrix(IN vids integer[], IN pnts geometry[], IN edges text, tol float8 DEFAULT(0.1), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    i integer;
-    j integer;
-    nn integer;
-    rr record;
-    bbox geometry;
-    t float8[];
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    -- check if the input arrays has any -1 values, maybe this whould be a raise exception
-    if vids @> ARRAY[-1] then
-    raise notice 'Some vids are undefined (-1)!';
-    dmatrix := null;
-    ids := null;
-    return;
-    end if;
-
-    ids := vids;
-
-    -- get the count of nodes
-    nn := array_length(vids,1);
-
-    -- zero out a dummy row
-    for i in 1 .. nn loop
-        t := t || 0.0::float8;
-    end loop;
-
-    -- using the dummy row, zero out the whole matrix
-    for i in 1 .. nn loop
-    dmatrix := dmatrix || ARRAY[t];
-    end loop;
-
-    for i in 1 .. nn-1 loop
-        j := i;
-        -- compute the bbox for the point needed for this row
-        select st_expand(st_collect(pnts[id]), tol) into bbox
-          from (select generate_series as id from generate_series(i, nn)) as foo;
-
-        -- compute kdijkstra() for this row
-        for rr in execute 'select * from pgr_dijkstracost($1, $2, $3, false)'
-                  using 'select id, source, target, cost from ' || edges ||
-                        ' where the_geom && ''' || bbox::text || '''::geometry'::text, vids[i], vids[i+1:nn] loop
-
-            -- TODO need to check that all node were reachable from source
-            -- I think unreachable paths between nodes returns cost=-1.0
-
-            -- populate the matrix with the cost values, remember this is symmetric
-            j := j + 1;
-            -- raise notice 'cost(%,%)=%', i, j, rr.agg_cost;
-            dmatrix[i][j] := rr.agg_cost;
-            dmatrix[j][i] := rr.agg_cost;
-        end loop;
-    end loop;
-
-end;
-$body$
-    language plpgsql stable cost 200;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_vidsToDMatrix(sql TEXT, vids  INTEGER[], dir BOOLEAN, has_rcost BOOLEAN, want_symmetric BOOLEAN)
-RETURNS float8[] AS
-$BODY$
-DECLARE
-directed BOOLEAN;
-has_reverse BOOLEAN;
-edges_sql TEXT;
-dmatrix_row float8[];
-dmatrix float8[];
-cell RECORD;
-unique_vids INTEGER[];
-total BIGINT;
-from_v BIGINT;
-to_v BIGINT;
-BEGIN
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql = sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    unique_vids :=  ARRAY(SELECT DISTINCT UNNEST(vids) ORDER BY 1);
-
-    IF want_symmetric THEN
-        directed = false;
-    ELSE
-        directed = dir;
-    END IF;
-
-    total := array_length(unique_vids, 1);
-
-    -- initializing dmatrix
-    FOR i in 1 .. total LOOP
-        dmatrix_row := dmatrix_row || '+Infinity'::float8;
-    END LOOP;
-    FOR i in 1 .. total LOOP
-    dmatrix := dmatrix || ARRAY[dmatrix_row];
-    dmatrix[i][i] = 0;
-    END LOOP;
-
-    CREATE TEMP TABLE __x___y____temp AS
-        WITH result AS
-            (SELECT unnest(unique_vids) AS vid)
-        SELECT row_number() OVER() AS idx, vid FROM result;
-
-    FOR cell IN SELECT * FROM pgr_dijkstraCostMatrix(sql, unique_vids, directed) LOOP
-        SELECT idx INTO from_v FROM __x___y____temp WHERE vid =  cell.start_vid;
-        SELECT idx INTO to_v FROM __x___y____temp WHERE vid =  cell.end_vid;
-
-        dmatrix[from_v][to_v] = cell.agg_cost;
-        dmatrix[to_v][from_v] = cell.agg_cost;
-    END LOOP;
-
-    DROP TABLE IF EXISTS __x___y____temp;
-    RETURN dmatrix;
-
-    EXCEPTION WHEN others THEN
-       DROP TABLE IF EXISTS __x___y____temp;
-       raise exception '% %', SQLERRM, SQLSTATE;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated function';
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_dijkstra(sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_dijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN) IS 'pgr_dijkstra(Deprecated signature)';
-
-
-
-
-
--- OLD SIGNATURE
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(edges_sql text, source BIGINT, distance FLOAT, directed BOOLEAN, has_rcost BOOLEAN)
-  RETURNS SETOF pgr_costresult AS
-  $BODY$
-  DECLARE
-  has_reverse BOOLEAN;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function';
-
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, FALSE);
-
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-             -- the user says it doesn't have reverse cost but its false
-             -- removing from query
-             RAISE NOTICE 'Contradiction found: has_rcost set to false but reverse_cost column found';
-             sql = 'SELECT id, source, target, cost, -1 as reverse_cost FROM (' || edges_sql || ') __q ';
-         ELSE
-             -- the user says it has reverse cost but its false
-             -- can't do anything
-             RAISE EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query SELECT seq - 1 AS seq, node::integer AS id1, edge::integer AS id2, agg_cost AS cost
-                FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maximumcardinalitymatching(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---INTERNAL FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
-------------------------
--- deprecated signatures
------------------------
-
-COMMENT ON FUNCTION pgr_astar(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_astar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdAstar( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdAstar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdDijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdDijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_dijkstra(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_dijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_drivingDistance(text,  BIGINT,  FLOAT8,  BOOLEAN,  BOOLEAN)
-    IS 'pgr_drivingDistance(Deprecated signature)';
-
-------------------------
--- Renamed /deprecated
------------------------
-COMMENT ON FUNCTION pgr_apspJohnson(TEXT)
-    IS 'pgr_apspJohnson(Renamed function) use pgr_Johnson instead';
-
-COMMENT ON FUNCTION pgr_apspWarshall(text, boolean, boolean)
-    IS 'pgr_apspWarshall(Renamed function) use pgr_floydWarshall instead';
-
-COMMENT ON FUNCTION pgr_kdijkstraPath( text, INTEGER, INTEGER ARRAY, BOOLEAN, BOOLEAN)
-    IS 'pgr_kdijkstraPath(Renamed function) use pgr_dijkstra instead';
-
-COMMENT ON FUNCTION pgr_kdijkstracost( text, INTEGER, INTEGER array, BOOLEAN, BOOLEAN)
-    IS 'pgr_kDijkstraCost(Renamed function) use pgr_dijkstraCost instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-
-
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-
-
-COMMENT ON FUNCTION pgr_gsoc_vrppdtw( text, INTEGER, INTEGER)
-    IS 'pgr_gsoc_vrppdtw(Renamed function) use pgr_pickDeliverEuclidean instead';
-
-------------------------
--- Deprecated functions
------------------------
-
-COMMENT ON FUNCTION pgr_flipedges(geometry[])
-    IS 'pgr_flipedges(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_texttopoints(text,  integer)
-    IS 'pgr_texttopoints(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstovids(pnts geometry[], edges text, tol float8)
-    IS 'pgr_pointstovids(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    IS 'pgr_pointtoedgenode(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstodmatrix(geometry[], integer)
-    IS 'pgr_pointstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidstodmatrix( integer[],  geometry[],  text, float8)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidsToDMatrix(TEXT,  INTEGER[], BOOLEAN, BOOLEAN, BOOLEAN)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-
-
-
-COMMENT ON FUNCTION pgr_getTableName(IN tab text)
-    IS 'pgr_getTableName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_getColumnName(tab text, col text)
-    IS 'pgr_getColumnName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnInTable(tab text, col text)
-    IS 'pgr_isColumnInTable(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnIndexed(tab text, col text)
-    IS 'pgr_isColumnIndexed(Deprecated function)';
-
-
-COMMENT ON FUNCTION pgr_quote_ident(idname text)
-    IS 'pgr_quote_ident(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_versionless(v1 text, v2 text)
-    IS 'pgr_versionless(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_startPoint(g geometry)
-    IS 'pgr_startPoint(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_endPoint(g geometry)
-    IS 'pgr_endPoint(Deprecated function)';
-
-
diff --git a/tools/sql-update-scripts/pgrouting--2.2.3--2.5.2.sql b/tools/sql-update-scripts/pgrouting--2.2.3--2.5.2.sql
deleted file mode 100644
index f23b5ed..0000000
--- a/tools/sql-update-scripts/pgrouting--2.2.3--2.5.2.sql
+++ /dev/null
@@ -1,6527 +0,0 @@
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- pgRouting extension upgrade from 2.2.3 to 2.5.2
--- generated by tools/build-extension-update-files
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-\echo Use "ALTER extension pgrouting update to '2.5.2'" to load this file. \quit
-
-
--------------------------------------
--- remove functions no longer in the 2.5.2 extension
--------------------------------------
-
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,anyarray,bigint,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,anyarray,bigint,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,bigint,anyarray,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,bigint,anyarray,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,bigint,bigint,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,bigint,bigint,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_drivingdistance(text,bigint,double precision,boolean);
-DROP FUNCTION IF EXISTS _pgr_drivingdistance(text,bigint,double precision,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,anyarray,anyarray,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,anyarray,anyarray,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,anyarray,bigint,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,anyarray,bigint,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,bigint,anyarray,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,bigint,anyarray,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,bigint,bigint,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,bigint,bigint,boolean,character,boolean,boolean);
-
-
-------------------------------------------
---    New functions:  2.0
--- Signature change:  2.4
---       Deprecated:  2.4
-------------------------------------------
--- pgr_bddijkstra
--- 2.2.3: {      sql, source_vid, target_vid, directed, has_reverse_cost}   
--- 2.5.2: {edges_sql,  start_vid,    end_vid, directed, has_rcost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vid","end_vid","directed","has_rcost"}'
-WHERE proname = 'pgr_bddijkstra'
-    AND proargnames = '{"sql","source_vid","target_vid","directed","has_reverse_cost"}';
-
-
-------------------------------------------
---   New function: 2.1
--- (types) change: 2.3
-------------------------------------------
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_gsoc_vrppdtw(text,integer,integer);
-DROP FUNCTION IF EXISTS pgr_gsoc_vrppdtw(text,integer,integer);
-
-
-
-
-------------------------------------------
--- New functions on 2.0
--- Signature change on 2.3
--- Deprecated on 2.4
-------------------------------------------
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_astar(text,integer,integer,boolean,boolean);
-DROP FUNCTION IF EXISTS pgr_astar(text,integer,integer,boolean,boolean);
-
-
-
-
-------------------------------------------
---       New functions:  2.1
---    Signature change:  2.4
-------------------------------------------
--- 2.2.3: {edges_sql,start_v,  distance,directed,seq,node,edge,cost,agg_cost}
--- 2.5.2: {edges_sql,start_vid,distance,directed,seq,node,edge,cost,agg_cost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vid","distance","directed","seq","node","edge","cost","agg_cost"}'
-WHERE proname = 'pgr_drivingdistance'
-    AND proargnames = '{"edges_sql","start_v","distance","directed","seq","node","edge","cost","agg_cost"}';
-
-
-------------------------------------------
---       New functions:  2.1
---    Signature change:  2.4
-------------------------------------------
--- 2.2.3: {sql,      start_v,   distance,directed,equicost,seq,from_v,node,edge,cost,agg_cost}
--- 2.5.2: {edges_sql,start_vids,distance,directed,equicost,seq,from_v,node,edge,cost,agg_cost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vids","distance","directed","equicost","seq","from_v","node","edge","cost","agg_cost"}'
-WHERE proname = 'pgr_drivingdistance'
-    AND proargnames = '{"sql","start_v","distance","directed","equicost","seq","from_v","node","edge","cost","agg_cost"}';
-
-
-
-
-
-
-
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
---- pgRouting provides geospatial routing functionality.
---- http://pgrouting.org
---- copyright
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
----
---- This is free software; you can redistribute and/or modify it:
---- the terms of the GNU General Public Licence. See the COPYING file.
---- the terms of the MIT-X Licence. See the COPYING file.
----
---- The following functions have MIT-X licence:
----     pgr_version()
----     pgr_tsp(matrix float8[][], startpt integer, endpt integer DEFAULT -1, OUT seq integer, OUT id integer)
----     _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
----     pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
----
----
---- All other functions are under GNU General Public Licence.
----
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
--- WARNING: Any change in this file must be evaluated for compatibility.
---          Changes cleanly handled by postgis_upgrade.sql are fine,
---          other changes will require a bump in Major version.
---          Currently only function replaceble by CREATE OR REPLACE
---          are cleanly handled.
---
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
---  pgRouting 2.0 types
-
-
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_version()
-RETURNS TABLE(
-        "version" varchar,
-        tag varchar,
-        hash varchar,
-        branch varchar,
-        boost varchar
-    ) AS
-$BODY$
-    SELECT '2.5.2'::varchar AS version,
-        'v2.5.2'::varchar AS tag,
-        '60585f1f7'::varchar AS hash,
-        'master'::varchar AS branch,
-        '1.54.0'::varchar AS boost;
-$BODY$
-LANGUAGE sql IMMUTABLE;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getTableName(IN tab text, IN reportErrs int default 0, IN fnName text default '_pgr_getTableName', OUT sname text,OUT tname text)
-  RETURNS RECORD AS
-$$
-DECLARE
-        naming record;
-        i integer;
-        query text;
-        sn text; -- schema name
-        tn text; -- table name
-        ttype text; --table type for future use
-        err boolean;
-        debuglevel text;
-        var_types text[] = ARRAY['BASE TABLE', 'VIEW'];
-BEGIN
-
-    execute 'show client_min_messages' into debuglevel;
-
-
-    perform _pgr_msg( 0, fnName, 'Checking table ' || tab || ' exists');
-    --RAISE DEBUG 'Checking % exists',tab;
-
-    i := strpos(tab,'.');
-    IF (i <> 0) THEN
-        sn := split_part(tab, '.',1);
-        tn := split_part(tab, '.',2);
-    ELSE
-        sn := current_schema;
-        tn := tab;
-    END IF;
-
-
-   SELECT schema_name INTO sname
-   FROM information_schema.schemata WHERE schema_name = sn;
-
-    IF sname IS NOT NULL THEN -- found schema (as is)
-       SELECT table_name, table_type INTO tname, ttype
-       FROM information_schema.tables
-       WHERE
-                table_type = ANY(var_types) and
-                table_schema = sname and
-                table_name = tn ;
-        IF tname is NULL THEN
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  = ANY(var_types) and
-                table_schema = sname and
-                table_name = lower(tn) ORDER BY table_name;
-        END IF;
-    END IF;
-    IF sname is NULL or tname is NULL THEN --schema not found or table not found
-        SELECT schema_name INTO sname
-        FROM information_schema.schemata
-        WHERE schema_name = lower(sn) ;
-
-        IF sname IS NOT NULL THEN -- found schema (with lower caps)
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  =  ANY(var_types) and
-                table_schema = sname and
-                table_name= tn ;
-
-           IF tname IS NULL THEN
-                SELECT table_name, table_type INTO tname, ttype
-                FROM information_schema.tables
-                WHERE
-                    table_type  =  ANY(var_types) and
-                    table_schema = sname and
-                    table_name= lower(tn) ;
-           END IF;
-        END IF;
-    END IF;
-   err = (sname IS NULL OR tname IS NULL);
-   perform _pgr_onError(err, reportErrs, fnName, 'Table ' || tab ||' not found',' Check your table name', 'Table '|| tab || ' found');
-
-END;
-$$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(sname text, tname text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(col) into cname;
-
-    IF cname is null  THEN
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(lower(col))  into cname;
-    END if;
-
-    err = cname is null;
-
-    perform _pgr_onError(err, reportErrs, fnName,  'Column '|| col ||' not found', ' Check your column name','Column '|| col || ' found');
-    RETURN cname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(tab text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-
-    select * into cname from _pgr_getColumnName(sname,tname,col,reportErrs, fnName);
-    RETURN cname;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    select * from _pgr_getColumnName(tab,col,0, '_pgr_isColumnInTable') into cname;
-    return cname is not null;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(sname text, tname text, cname text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    pkey text;
-BEGIN
-    SELECT
-          pg_attribute.attname into pkey
-         --  format_type(pg_attribute.atttypid, pg_attribute.atttypmod)
-          FROM pg_index, pg_class, pg_attribute
-          WHERE
-                  pg_class.oid = _pgr_quote_ident(sname||'.'||tname)::regclass AND
-                  indrelid = pg_class.oid AND
-                  pg_attribute.attrelid = pg_class.oid AND
-                  pg_attribute.attnum = any(pg_index.indkey)
-                  AND indisprimary;
-
-    IF pkey=cname then
-          RETURN TRUE;
-    END IF;
-
-    SELECT a.index_name,
-           b.attname,
-           b.attnum,
-           a.indisunique,
-           a.indisprimary
-      INTO rec
-      FROM ( SELECT a.indrelid,
-                    a.indisunique,
-                    a.indisprimary,
-                    c.relname index_name,
-                    unnest(a.indkey) index_num
-               FROM pg_index a,
-                    pg_class b,
-                    pg_class c,
-                    pg_namespace d
-              WHERE b.relname=tname
-                AND b.relnamespace=d.oid
-                AND d.nspname=sname
-                AND b.oid=a.indrelid
-                AND a.indexrelid=c.oid
-           ) a,
-           pg_attribute b
-     WHERE a.indrelid = b.attrelid
-       AND a.index_num = b.attnum
-       AND b.attname = cname
-  ORDER BY a.index_name,
-           a.index_num;
-
-  RETURN FOUND;
-  EXCEPTION WHEN OTHERS THEN
-    perform _pgr_onError( true, reportErrs, fnName,
-    'Error when checking for the postgres system attributes', SQLERR);
-    RETURN FALSE;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(tab text, col text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    sname text;
-    tname text;
-    cname text;
-    pkey text;
-    value boolean;
-BEGIN
-    SELECT * into naming FROM _pgr_getTableName(tab, 0, fnName);
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    SELECT * into cname from _pgr_getColumnName(sname, tname, col, 0, fnName) ;
-    IF cname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    select * into value  from _pgr_isColumnIndexed(sname, tname, cname, reportErrs, fnName);
-    return value;
-END
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-create or replace function _pgr_quote_ident(idname text)
-    returns text as
-$body$
-declare
-    t text[];
-    pgver text;
-
-begin
-    pgver := regexp_replace(version(), E'^PostgreSQL ([^ ]+)[ ,].*$', E'\\1');
-
-    if _pgr_versionless(pgver, '9.2') then
-        select into t array_agg(quote_ident(term)) from
-            (select nullif(unnest, '') as term
-               from unnest(string_to_array(idname, '.'))) as foo;
-    else
-        select into t array_agg(quote_ident(term)) from
-            (select unnest(string_to_array(idname, '.', '')) as term) as foo;
-    end if;
-    return array_to_string(t, '.');
-end;
-$body$
-language plpgsql immutable;
-
-
-CREATE OR REPLACE FUNCTION _pgr_versionless(v1 text, v2 text)
-  RETURNS boolean AS
-$BODY$
-
-
-declare
-    v1a text[];
-    v2a text[];
-    nv1 integer;
-    nv2 integer;
-    ne1 integer;
-    ne2 integer;
-
-begin
-    -- separate components into an array, like:
-    -- '2.1.0-beta3dev'  =>  {2,1,0,beta3dev}
-    v1a := regexp_matches(v1, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-    v2a := regexp_matches(v2, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-
-    -- convert modifiers to numbers for comparison
-    -- we do not delineate between alpha1, alpha2, alpha3, etc
-    ne1 := case when v1a[4] is null or v1a[4]='' then 5
-                when v1a[4] ilike 'rc%' then 4
-                when v1a[4] ilike 'beta%' then 3
-                when v1a[4] ilike 'alpha%' then 2
-                when v1a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    ne2 := case when v2a[4] is null or v2a[4]='' then 5
-                when v2a[4] ilike 'rc%' then 4
-                when v2a[4] ilike 'beta%' then 3
-                when v2a[4] ilike 'alpha%' then 2
-                when v2a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    nv1 := v1a[1]::integer * 10000 +
-           coalesce(v1a[2], '0')::integer * 1000 +
-           coalesce(v1a[3], '0')::integer *  100 + ne1;
-    nv2 := v2a[1]::integer * 10000 +
-           coalesce(v2a[2], '0')::integer * 1000 +
-           coalesce(v2a[3], '0')::integer *  100 + ne2;
-
-    --raise notice 'nv1: %, nv2: %, ne1: %, ne2: %', nv1, nv2, ne1, ne2;
-
-    return nv1 < nv2;
-end;
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-create or replace function _pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_startpoint(st_geometryn(g,1));
-    else
-        return st_startpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function _pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_endpoint(st_geometryn(g,1));
-    else
-        return st_endpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_parameter_check(fn text, sql text, big boolean default false)
-  RETURNS bool AS
-  $BODY$
-
-  DECLARE
-  rec record;
-  rec1 record;
-  has_rcost boolean;
-  safesql text;
-  BEGIN
-    IF (big) THEN
-       RAISE EXCEPTION 'This function is for old style functions';
-    END IF;
-
-    -- checking query is executable
-    BEGIN
-      safesql =  'select * from ('||sql||' ) AS __a__ limit 1';
-      execute safesql into rec;
-      EXCEPTION
-        WHEN OTHERS THEN
-            RAISE EXCEPTION 'Could not execute query please verify syntax of: '
-              USING HINT = sql;
-    END;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('dijkstra','astar') THEN
-        BEGIN
-          execute 'select id,source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: id, source, target, cost';
-        END;
-        execute 'select pg_typeof(id)::text as id_type, pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.id_type in ('integer'::text))
-              AND (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Error, columns ''source'', ''target'' must be of type int4, ''cost'' must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    IF fn IN ('astar') THEN
-        BEGIN
-          execute 'select x1,y1,x2,y2  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: x1,y1, x2,y2';
-        END;
-        execute 'select pg_typeof(x1)::text as x1_type, pg_typeof(y1)::text as y1_type, pg_typeof(x2)::text as x2_type, pg_typeof(y2)::text as y2_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.x1_type = 'double precision'::text)
-              AND (rec.y1_type = 'double precision'::text)
-              AND (rec.x2_type = 'double precision'::text)
-              AND (rec.y2_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Columns: x1, y1, x2, y2 must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('johnson') THEN
-        BEGIN
-          execute 'select source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING HINT = 'Please veryfy the column names: id, source, target, cost',
-                         ERRCODE = 'XX000';
-        END;
-
-        execute 'select pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Support for source,target columns only of type: integer. Support for Cost: double precision'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    -- Checking the data types of the optional reverse_cost";
-    has_rcost := false;
-    IF fn IN ('johnson','dijkstra','astar') THEN
-      BEGIN
-        execute 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||safesql||' ) AS __b__ limit 1 ' into rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-            return has_rcost;
-      END;
-      if (has_rcost) then
-        IF (big) then
-           IF  not (rec1.rev_type in ('bigint'::text, 'integer'::text, 'smallint'::text, 'double precision'::text, 'real'::text)) then
-             RAISE EXCEPTION 'Illegar type in optional parameter reverse_cost.'
-             USING ERRCODE = 'XX000';
-           END IF;
-        ELSE -- Version 2.0.0 is more restrictive
-           IF (rec1.rev_type != 'double precision') then
-             RAISE EXCEPTION 'Illegal type in optional parameter reverse_cost, must be of type float8'
-             USING ERRCODE = 'XX000';
-           END IF;
-        END IF;
-      end if;
-      return true;
-    END IF;
-    -- just for keeps
-    return true;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_onError(
-  IN errCond boolean,  -- true there is an error
-  IN reportErrs int,   -- 0, 1 or 2
-  IN fnName text,      -- function name that generates the error
-  IN msgerr text,      -- error message
-  IN hinto text default 'No hint', -- hint help
-  IN msgok text default 'OK')      -- message if everything is ok
-  RETURNS void AS
-$BODY$
-BEGIN
-  if errCond=true then
-     if reportErrs=0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-     else
-       if reportErrs = 2 then
-         raise notice '----> PGR ERROR in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-         raise raise_exception;
-       else
-         raise notice '----> PGR NOTICE in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-       end if;
-     end if;
-  else
-       raise debug 'PGR ----> %: %',fnName,msgok;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_msg(IN msgKind int, IN fnName text, IN msg text default '---->OK')
-  RETURNS void AS
-$BODY$
-BEGIN
-  if msgKind = 0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msg;
-  else
-       raise notice '----> PGR NOTICE in %: %',fnName,msg;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(sname text, tname text, cname text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    EXECUTE 'select data_type  from information_schema.columns '
-            || 'where table_name = '||quote_literal(tname)
-                 || ' and table_schema=' || quote_literal(sname)
-                 || ' and column_name='||quote_literal(cname)
-       into ctype;
-    err = ctype is null;
-    perform _pgr_onError(err, reportErrs, fnName,
-            'Type of Column '|| cname ||' not found',
-            'Check your column name',
-            'OK: Type of Column '|| cname || ' is ' || ctype);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(tab text, col text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-    select * into cname from _pgr_getColumnName(tab,col,reportErrs, fnName) ;
-    select * into ctype from _pgr_getColumnType(sname,tname,cname,reportErrs, fnName);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_get_statement(o_sql text)
-RETURNS text AS
-$BODY$
-DECLARE
-sql TEXT;
-BEGIN
-    EXECUTE 'SELECT statement FROM pg_prepared_statements WHERE name ='  || quote_literal(o_sql) || ' limit 1 ' INTO sql;
-    IF (sql IS NULL) THEN
-      RETURN   o_sql;
-    ELSE
-      RETURN  regexp_replace(sql, '(.)* as ', '', 'i');
-    END IF;
-END
-$BODY$
-LANGUAGE plpgsql STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_checkVertTab(vertname text, columnsArr  text[],
-    IN reportErrs int default 1, IN fnName text default '_pgr_checkVertTab',
-    OUT sname text,OUT vname text)
-RETURNS record AS
-$BODY$
-DECLARE
-    cname text;
-    colname text;
-    naming record;
-    debuglevel text;
-    err  boolean;
-    msgKind int;
-
-BEGIN
-    msgKind = 0; -- debug_
-    execute 'show client_min_messages' into debuglevel;
-
-    perform _pgr_msg(msgKind, fnName, 'Checking table ' || vertname || ' exists');
-       select * from _pgr_getTableName(vertname, 0, fnName) into naming;
-       sname=naming.sname;
-       vname=naming.tname;
-       err = sname is NULL or vname is NULL;
-    perform _pgr_onError( err, 2, fnName,
-          'Vertex Table: ' || vertname || ' not found',
-          'Please create ' || vertname || ' using  _pgr_createTopology() or pgr_createVerticesTable()',
-          'Vertex Table: ' || vertname || ' found');
-
-
-    perform _pgr_msg(msgKind, fnName, 'Checking columns of ' || vertname);
-      FOREACH cname IN ARRAY columnsArr
-      loop
-         select _pgr_getcolumnName(vertname, cname, 0, fnName) into colname;
-         if colname is null then
-           perform _pgr_msg(msgKind, fnName, 'Adding column ' || cname || ' in ' || vertname);
-           set client_min_messages  to warning;
-                execute 'ALTER TABLE '||_pgr_quote_ident(vertname)||' ADD COLUMN '||cname|| ' integer';
-           execute 'set client_min_messages  to '|| debuglevel;
-           perform _pgr_msg(msgKind, fnName);
-         end if;
-      end loop;
-    perform _pgr_msg(msgKind, fnName, 'Finished checking columns of ' || vertname);
-
-    perform _pgr_createIndex(vertname , 'id' , 'btree', reportErrs, fnName);
- END
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(
-    sname text, tname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    debuglevel text;
-    naming record;
-    tabname text;
-    query text;
-    msgKind int;
-BEGIN
-  msgKind = 0; -- debug_
-
-  execute 'show client_min_messages' into debuglevel;
-  tabname=_pgr_quote_ident(sname||'.'||tname);
-  perform _pgr_msg(msgKind, fnName, 'Checking ' || colname || ' column in ' || tabname || ' is indexed');
-    IF (_pgr_isColumnIndexed(sname,tname,colname, 0, fnName)) then
-       perform _pgr_msg(msgKind, fnName);
-    else
-      if indext = 'gist' then
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using gist('||quote_ident(colname)||')';
-      else
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using btree('||quote_ident(colname)||')';
-      end if;
-      perform _pgr_msg(msgKind, fnName, 'Adding index ' || tabname || '_' ||  colname || '_idx');
-      perform _pgr_msg(msgKind, fnName, ' Using ' ||  query);
-      set client_min_messages  to warning;
-      BEGIN
-        execute query;
-        EXCEPTION WHEN others THEN
-          perform _pgr_onError( true, reportErrs, fnName,
-            'Could not create index on:' || colname, SQLERRM);
-      END;
-      execute 'set client_min_messages  to '|| debuglevel;
-      perform _pgr_msg(msgKind, fnName);
-    END IF;
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(tabname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    naming record;
-    sname text;
-    tname text;
-
-BEGIN
-    select * from _pgr_getTableName(tabname, 2, fnName)  into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    execute _pgr_createIndex(sname, tname, colname, indext, reportErrs, fnName);
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pointToId(
-    point geometry,
-    tolerance double precision,
-    vertname text,
-    srid integer)
-
-  RETURNS bigint AS
-$BODY$
-DECLARE
-    rec record;
-    pid bigint;
-
-BEGIN
-    EXECUTE 'SELECT ST_Distance(
-        the_geom,
-        ST_GeomFromText(ST_AsText('
-                || quote_literal(point::text)
-                || '),'
-            || srid ||')) AS d, id, the_geom
-    FROM '||_pgr_quote_ident(vertname)||'
-    WHERE ST_DWithin(
-        the_geom,
-        ST_GeomFromText(
-            ST_AsText(' || quote_literal(point::text) ||'),
-            ' || srid || '),' || tolerance||')
-    ORDER BY d
-    LIMIT 1' INTO rec ;
-    IF rec.id IS NOT NULL THEN
-        pid := rec.id;
-    ELSE
-        execute 'INSERT INTO '||_pgr_quote_ident(vertname)||' (the_geom) VALUES ('||quote_literal(point::text)||')';
-        pid := lastval();
-END IF;
-
-RETURN pid;
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'many_to_many_dijkstra'
-LANGUAGE c VOLATILE;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer, OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstra(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(Many to Many)';
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraVia(
-    edges_sql TEXT,
-    via_vertices ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    strict BOOLEAN DEFAULT FALSE,
-    U_turn_on_edge BOOLEAN DEFAULT TRUE,
-
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'dijkstraVia'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_johnson(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'johnson'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_floydWarshall(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'floydWarshall'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'astarManyToMany'
-LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, normal:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to Many)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true, normal:=false) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to Many)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid ANYARRAY,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-    equicost BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'many_withPointsDD'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_withPointsDD($1, $2, ARRAY[$3]::BIGINT[], $4, $5, $6, $7, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vids anyarray,
-    distance FLOAT,
-    directed BOOLEAN DEFAULT TRUE,
-    equicost BOOLEAN DEFAULT FALSE,
-    OUT seq integer,
-    OUT from_v  bigint,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'driving_many_to_dist'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vid bigint,
-    distance FLOAT8,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq integer,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer, directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'kshortest_path'
-    LANGUAGE c STABLE STRICT;
-
--- V2 the graph is directed and there are no heap paths
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid integer, end_vid integer, k integer, has_rcost boolean)
-  RETURNS SETOF pgr_costresult3 AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated signature of pgr_ksp';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql::text, false);
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_rcost) THEN
-           -- user says that it has reverse_cost but its not true
-           RAISE EXCEPTION 'has_reverse_cost set to true but reverse_cost not found';
-         ELSE
-           -- user says that it does not have reverse_cost but it does have it
-           -- to ignore we remove reverse_cost from the query
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         END IF;
-      END IF;
-
-      RETURN query SELECT ((row_number() over()) -1)::integer  AS seq,  (path_id - 1)::integer AS id1, node::integer AS id2, edge::integer AS id3, cost
-            FROM _pgr_ksp(sql::text, start_vid, end_vid, k, TRUE, FALSE) WHERE path_id <= k;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer,
-  directed boolean default true, heap_paths boolean default false,
-  --directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  BEGIN
-         RETURN query SELECT *
-                FROM _pgr_ksp(edges_sql::text, start_vid, end_vid, k, directed, heap_paths);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsKSP(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    k INTEGER,
-
-    directed BOOLEAN DEFAULT TRUE,
-    heap_paths BOOLEAN DEFAULT FALSE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER, OUT path_id INTEGER, OUT path_seq INTEGER,
-    OUT node BIGINT, OUT edge BIGINT,
-    OUT cost FLOAT, OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'withPoints_ksp'
-    LANGUAGE c STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_unnest_matrix(matrix float8[][], OUT start_vid integer, OUT end_vid integer, out agg_cost float8)
-RETURNS SETOF record AS
-
-$body$
-DECLARE
-
-m float8[];
-
-BEGIN
-    start_vid = 1;
-    foreach m slice 1 in  ARRAY matrix
-    LOOP
-        end_vid = 1;
-        foreach agg_cost in  ARRAY m
-        LOOP
-            RETURN next;
-            end_vid = end_vid + 1;
-        END LOOP;
-        start_vid = start_vid + 1;
-    END LOOP;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_tsp(
-    matrix float8[][],
-    startpt INTEGER,
-    endpt INTEGER DEFAULT -1,
-    OUT seq INTEGER,
-    OUT id INTEGER)
-RETURNS SETOF record AS
-$body$
-DECLARE
-table_sql TEXT;
-debuglevel TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(float8[][], integer, integer)';
-
-    CREATE TEMP TABLE ___tmp2 ON COMMIT DROP AS SELECT * FROM _pgr_unnest_matrix( matrix );
-
-
-    startpt := startpt + 1;
-    IF endpt = -1 THEN endpt := startpt;
-    END IF;
-
-
-    RETURN QUERY
-    WITH
-    result AS (
-        SELECT * FROM pgr_TSP(
-        $$SELECT * FROM ___tmp2 $$,
-        startpt, endpt,
-
-        tries_per_temperature :=  500 :: INTEGER,
-        max_changes_per_temperature := 30 :: INTEGER,
-        max_consecutive_non_changes := 500 :: INTEGER,
-
-        randomize:=false)
-    )
-    SELECT (row_number() over(ORDER BY result.seq) - 1)::INTEGER AS seq, (result.node - 1)::INTEGER AS id
-
-    FROM result WHERE NOT(result.node = startpt AND result.seq != 1);
-
-    DROP TABLE ___tmp2;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-
-
-CREATE OR  REPLACE FUNCTION pgr_tsp(sql text, start_id INTEGER, end_id INTEGER default (-1))
-returns setof pgr_costResult as
-$body$
-DECLARE
-table_sql TEXT;
-rec RECORD;
-debuglevel TEXT;
-n BIGINT;
-
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(sql, integer, integer)';
-
-    table_sql := 'CREATE TEMP TABLE ___tmp ON COMMIT DROP AS ' || sql ;
-    EXECUTE table_sql;
-
-
-    BEGIN
-        EXECUTE 'SELECT id, x, y FROM ___tmp' INTO rec;
-        EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                USING ERRCODE = 'XX000',
-                HINT = 'Please verify the column names: id, x, y';
-    END;
-
-    EXECUTE
-    'SELECT
-        pg_typeof(id)::text as id_type,
-        pg_typeof(x)::text as x_type,
-        pg_typeof(y)::text as y_type FROM ___tmp' INTO rec;
-
-
-    IF NOT((rec.id_type in ('integer'::text))
-        AND (rec.x_type = 'double precision'::text)
-        AND (rec.y_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION '''id'' must be of type INTEGER, ''x'' ad ''y'' must be of type FLOAT'
-            USING ERRCODE = 'XX000';
-    END IF;
-
-    EXECUTE 'SELECT count(*) AS n FROM (' || sql || ') AS __a__' INTO rec;
-    n = rec.n;
-
-    RETURN query
-        SELECT (seq - 1)::INTEGER AS seq, node::INTEGER AS id1, node::INTEGER AS id2, cost
-        FROM pgr_eucledianTSP(sql, start_id, end_id,
-
-            tries_per_temperature :=  500 * n :: INTEGER,
-            max_changes_per_temperature := 60 * n :: INTEGER,
-            max_consecutive_non_changes := 500 * n :: INTEGER,
-
-            randomize := false) WHERE seq <= n;
-    DROP TABLE ___tmp;
-
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-create or replace function _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
-  as
-$body$
-declare
-    sql text;
-    r record;
-
-begin
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    sql := 'with nodes as (' || sqlin || ')
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j, st_distance(st_makepoint(a.x, a.y), st_makepoint(b.x, b.y)) as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i';
-
-    for r in execute sql loop
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-
-end;
-$body$
-language plpgsql stable cost 10;
-
-
-CREATE OR REPLACE FUNCTION pgr_TSP(
-    matrix_row_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'newTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_eucledianTSP(
-    coordinates_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'eucledianTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_alphashape(sql text, alpha float8 DEFAULT 0, OUT x float8, OUT y float8)
-    RETURNS SETOF record
-    AS '$libdir/libpgrouting-2.5', 'alphashape'
-    LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pointsAsPolygon(query varchar, alpha float8 DEFAULT 0)
-	RETURNS geometry AS
-	$$
-	DECLARE
-		r record;
-		geoms geometry[];
-		vertex_result record;
-		i int;
-		n int;
-		spos int;
-		q text;
-		x float8[];
-		y float8[];
-
-	BEGIN
-		geoms := array[]::geometry[];
-		i := 1;
-
-		FOR vertex_result IN EXECUTE 'SELECT x, y FROM pgr_alphashape('''|| query || ''', ' || alpha || ')'
-		LOOP
-			x[i] = vertex_result.x;
-			y[i] = vertex_result.y;
-			i := i+1;
-		END LOOP;
-
-		n := i;
-		IF n = 1 THEN
-			RAISE NOTICE 'n = 1';
-			RETURN NULL;
-		END IF;
-
-		spos := 1;
-		q := 'SELECT ST_GeometryFromText(''POLYGON((';
-		FOR i IN 1..n LOOP
-			IF x[i] IS NULL AND y[i] IS NULL THEN
-				q := q || ', ' || x[spos] || ' ' || y[spos] || '))'',0) AS geom;';
-				EXECUTE q INTO r;
-				geoms := geoms || array[r.geom];
-				q := '';
-			ELSE
-				IF q = '' THEN
-					spos := i;
-					q := 'SELECT ST_GeometryFromText(''POLYGON((';
-				END IF;
-				IF i = spos THEN
-					q := q || x[spos] || ' ' || y[spos];
-				ELSE
-					q := q || ', ' || x[i] || ' ' || y[i];
-				END IF;
-			END IF;
-		END LOOP;
-
-		RETURN ST_BuildArea(ST_Collect(geoms));
-	END;
-	$$
-	LANGUAGE 'plpgsql' VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'bd_astar'
-LANGUAGE C VOLATILE;
-
-
-
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed:=true, only_cost:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    BOOLEAN,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false);
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to Many)';
-
-
-
--- one to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to Many)';
-
-
--- bdDijkstra MANY TO MANY
-CREATE OR REPLACE FUNCTION _pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bdDijkstra'
-LANGUAGE c VOLATILE;
-
-
-
--- ONE TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- TODO directed BOOLEAN DEFAULT TRUE,  on version 3
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, false) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, true) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_vid integer,
-    target_vid integer,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_vertex'
-LANGUAGE 'c' IMMUTABLE;
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_edge'
-LANGUAGE 'c' IMMUTABLE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || edges_sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        -- no restrictions then its a dijkstra
-        RETURN query SELECT a.seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_dijkstra(new_sql, start_vid, end_vid, directed) a;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, start_vid, end_vid, directed, has_rcost, restrictions_sql);
-    RETURN;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trspViaVertices(
-    edges_sql TEXT,
-    via_vids ANYARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult3 AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            new_sql :=
-               'WITH old_sql AS (' || edges_sql || ')' ||
-                '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        RETURN query SELECT (row_number() over())::INTEGER, path_id:: INTEGER, node::INTEGER,
-            (CASE WHEN edge = -2 THEN -1 ELSE edge END)::INTEGER, cost
-            FROM pgr_dijkstraVia(new_sql, via_vids, directed, strict:=true) WHERE edge != -1;
-        RETURN;
-    END IF;
-
-
-    -- make the call without contradiction from part of the user
-    RETURN query SELECT * FROM _pgr_trspViaVertices(new_sql, via_vids::INTEGER[], directed, has_rcost, restrictions_sql);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-
-    new_sql := sql;
-    IF (has_reverse != has_reverse_cost) THEN  -- user contradiction
-        IF (has_reverse) THEN
-            -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) THEN
-        -- no restrictions then its a with points
-        RETURN query SELECT a.seq-1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_withpoints(new_sql,
-            '(SELECT 1 as pid, ' || source_eid || 'as edge_id, ' || source_pos || '::float8 as fraction)'
-            || ' UNION '
-            || '(SELECT 2, ' || target_eid || ', ' || target_pos || ')' ::TEXT,
-            -1, -2, directed) a;
-        -- WHERE node != -2;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, source_eid, source_pos, target_eid, target_pos, directed, has_reverse_cost, turn_restrict_sql);
-    RETURN;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-create or replace function _pgr_trspViaVertices(sql text, vids integer[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    lrra boolean := false;
-    seq integer := 0;
-    seq2 integer := 0;
-
-begin
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(vids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from _pgr_trsp(sql, vids[i], vids[i+1], directed, has_rcost, turn_restrict_sql) as a loop
-            -- filter out the individual path ends except the last one
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --raise notice 'rr: %', rr;
-            if rr.id3 = -1 then
-                lrr := rr;
-                lrra := true;
-            else
-                seq := seq + 1;
-                rr.seq := seq;
-                return next rr;
-            end if;
-        end loop;
-    end loop;
-
-    if lrra then
-        seq := seq + 1;
-        lrr.seq := seq;
-        return next lrr;
-    end if;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-
-----------------------------------------------------------------------------------------------------------
-
-create or replace function pgr_trspViaEdges(sql text, eids integer[], pcts float8[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    first boolean := true;
-    seq integer := 0;
-    seq2 integer :=0;
-    has_reverse BOOLEAN;
-    point_is_vertex BOOLEAN := false;
-    edges_sql TEXT;
-    f float;
-
-begin
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql := sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (NOT has_rcost) THEN
-            -- user does not want to use reverse cost column
-            edges_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    FOREACH f IN ARRAY pcts LOOP
-        IF f in (0,1) THEN
-           point_is_vertex := true;
-        END IF;
-    END LOOP;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) AND NOT point_is_vertex THEN
-        -- no restrictions then its a _pgr_withPointsVia
-        RETURN query SELECT a.seq::INTEGER, path_id::INTEGER AS id1, node::INTEGER AS id2, edge::INTEGER AS id3, cost
-        FROM _pgr_withPointsVia(edges_sql, eids, pcts, directed) a;
-        RETURN;
-    END IF;
-
-    if array_length(eids, 1) != array_length(pcts, 1) then
-        raise exception 'The length of arrays eids and pcts must be the same!';
-    end if;
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(eids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from pgr_trsp(edges_sql,
-                                  eids[i], pcts[i],
-                                  eids[i+1], pcts[i+1],
-                                  directed,
-                                  has_rcost,
-                                  turn_restrict_sql) as a loop
-            -- combine intermediate via costs when cost is split across
-            -- two parts of a segment because it stops it and
-            -- restarts the next leg also on it
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --
-            -- there are multiple condition we have to deal with
-            -- between the end of one leg and start of the next
-            -- 1. same vertex_id. edge_id=-1; drop record with edge_id=-1
-            -- means: path ends on vertex
-            -- NOTICE:  rr: (19,1,44570022,-1,0)
-            -- NOTICE:  rr: (0,2,44570022,1768045,2.89691196717448)
-            -- 2. vertex_id=-1; sum cost components
-            -- means: path end/starts with the segment
-            -- NOTICE:  rr: (11,2,44569628,1775909,9.32885885148532)
-            -- NOTICE:  rr: (0,3,-1,1775909,0.771386350984395)
-
-            --raise notice 'rr: %', rr;
-            if first then
-                lrr := rr;
-                first := false;
-            else
-                if lrr.id3 = -1 then
-                    lrr := rr;
-                elsif lrr.id3 = rr.id3 then
-                    lrr.cost := lrr.cost + rr.cost;
-                    if rr.id2 = -1 then
-                        rr.id2 := lrr.id2;
-                    end if;
-                else
-                    seq := seq + 1;
-                    lrr.seq := seq;
-                    return next lrr;
-                    lrr := rr;
-                end if;
-            end if;
-        end loop;
-    end loop;
-
-    seq := seq + 1;
-    lrr.seq := seq;
-    return next lrr;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-----------------------------
---    MANY TO MANY
-----------------------------
-
-
-CREATE OR REPLACE FUNCTION _pgr_maxflow(
-    edges_sql TEXT,
-    sources ANYARRAY,
-    targets ANYARRAY,
-    algorithm INTEGER DEFAULT 1,
-    only_flow BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'max_flow_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-
-------------------------------------
--- 3 pgr_edmondsKarp
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 2 boykov_kolmogorov
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 1 pgr_pushRelabel
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT flow
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], algorithm := 1, only_flow := true);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], $3::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, $2::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxCardinalityMatch(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'edge_disjoint_paths_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    bigint,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    IN directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_contractGraph(
-    edges_sql TEXT,
-    contraction_order BIGINT[],
-    max_cycles integer DEFAULT 1,
-    forbidden_vertices BIGINT[] DEFAULT ARRAY[]::BIGINT[],
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT type TEXT,
-    OUT id BIGINT,
-    OUT contracted_vertices BIGINT[],
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost float)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'contractGraph'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliver(
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_cell_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliver'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliverEuclidean (
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliverEuclidean'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_vrpOneDepot(
-    TEXT, -- customers_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_sql
-    INTEGER, -- depot_id
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-orders_sql TEXT;
-trucks_sql TEXT;
-matrix_sql TEXT;
-final_sql TEXT;
-BEGIN
-
-    orders_sql = $$WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    pickups AS (
-        SELECT id, x AS p_x, y AS p_y, open_time AS p_open, close_time AS p_close, service_time AS p_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vrp_orders.id AS id, order_unit AS demand, pickups.id AS p_node_id, p_x, p_y, p_open, p_close, p_service,
-    vrp_orders.id AS d_node_id, x AS d_x, y AS d_y, open_time AS d_open, close_time AS d_close, service_time AS d_service
-    FROM vrp_orders, pickups
-    WHERE vrp_orders.id != $$ || $4;
-
-
-    trucks_sql = $$ WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    vrp_vehicles AS ($$ || $2 || $$ ),
-    starts AS (
-        SELECT id AS start_node_id, x AS start_x, y AS start_y, open_time AS start_open, close_time AS start_close, service_time AS start_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vehicle_id AS id, capacity, starts.* FROM vrp_vehicles, starts;
-    $$;
-
-    final_sql = '
-    SELECT * FROM _pgr_pickDeliver(
-            $$' || orders_sql || '$$,
-            $$' || trucks_sql || '$$,
-            $$' || $3 || '$$,
-            max_cycles := 2,
-            initial_sol := 4 ); ';
-
-    RAISE DEBUG '%', orders_sql;
-    RAISE DEBUG '%', trucks_sql;
-    RAISE DEBUG '%', $3;
-    RAISE DEBUG '%', final_sql;
-
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
------------------------------------------------------------------------
--- Core function for vrp with sigle depot computation
--- See README for description
------------------------------------------------------------------------
---
---
-
-create or replace function pgr_vrpOneDepot(
-	order_sql text,
-	vehicle_sql text,
-	cost_sql text,
-	depot_id integer,
-
-	OUT oid integer,
-	OUT opos integer,
-	OUT vid integer,
-	OUT tarrival integer,
-	OUT tdepart integer)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT order_id::INTEGER, stop_seq::INTEGER, vehicle_id::INTEGER, arrival_time::INTEGER, departure_time::INTEGER
-    FROM _pgr_vrpOneDepot($1, $2,
-       '
-            SELECT src_id AS start_vid, dest_id AS end_vid, traveltime AS agg_cost FROM ('||$3||') AS a
-       ',
-        $4
-    ) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_gsoc_vrppdtw(
-    customers_sql TEXT,
-    max_vehicles INTEGER,
-    capacity FLOAT,
-    speed FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-
-    OUT seq INTEGER,
-    OUT vehicle_id INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT stop_id BIGINT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-    orders_sql TEXT;
-    vehicles_sql TEXT;
-    final_sql TEXT;
-BEGIN
-    orders_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        pickups AS (
-            SELECT id, demand, x as p_x, y as p_y, opentime as p_open, closetime as p_close, servicetime as p_service
-            FROM  customer_data WHERE pindex = 0 AND id != 0
-        ),
-        deliveries AS (
-            SELECT pindex AS id, x as d_x, y as d_y, opentime as d_open, closetime as d_close, servicetime as d_service
-            FROM  customer_data WHERE dindex = 0 AND id != 0
-        )
-        SELECT * FROM pickups JOIN deliveries USING(id) ORDER BY pickups.id
-    $$;
-
-    vehicles_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ )
-        SELECT id, x AS start_x, y AS start_y,
-            opentime AS start_open, closetime AS start_close, $$ ||
-            capacity || $$ AS capacity, $$ || max_vehicles || $$ AS number, $$ || speed || $$ AS speed
-            FROM customer_data WHERE id = 0 LIMIT 1
-        $$;
---  seq | vehicle_id | vehicle_seq | stop_id | travel_time | arrival_time | wait_time | service_time | departure_time
-    final_sql = $$ WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        p_deliver AS (SELECT * FROM _pgr_pickDeliverEuclidean('$$ || orders_sql || $$',  '$$ || vehicles_sql || $$',  1, $$ || max_cycles || $$ )),
-        picks AS (SELECT p_deliver.*, pindex, dindex, id AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 2)),
-        delivers AS (SELECT p_deliver.*, pindex, dindex, dindex AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 3)),
-        depots AS (SELECT p_deliver.*, 0 as pindex, 0 as dindex, 0 AS the_id FROM p_deliver WHERE (stop_type IN (-1,1,6))),
-        the_union AS (SELECT * FROM picks UNION SELECT * FROM delivers UNION SELECT * from depots)
-
-        SELECT (row_number() over(ORDER BY a.seq))::INTEGER, vehicle_seq, a.stop_seq, the_id::BIGINT, a.travel_time, a.arrival_time, a.wait_time, a.service_time, a.departure_time
-        FROM (SELECT * FROM the_union) AS a ORDER BY a.seq
-        $$;
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-CREATE OR REPLACE FUNCTION pgr_gsoc_vrppdtw(
-    sql text,
-    vehicle_num INTEGER,
-    capacity INTEGER
-)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-customers_sql TEXT;
-BEGIN
-    RETURN query
-         SELECT a.seq, vehicle_id::INTEGER AS id1, stop_id::INTEGER AS id2, departure_time AS cost
-        FROM _pgr_gsoc_vrppdtw($1, $2, $3, 1, 30) AS a WHERE vehicle_id NOT IN (-2);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION _pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN,
-    driving_side CHAR,
-    details BOOLEAN,
-
-    only_cost BOOLEAN DEFAULT false, -- gets path
-    normal BOOLEAN DEFAULT true, -- false for many to onu
-
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'withPoints'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], ARRAY[$4]::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], ARRAY[$4]::bigint[], $5, $6, $7, FALSE, FALSE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], $4::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], $4::BIGINT[], $5,  $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION  _pgr_withPointsVia(
-    sql text,
-    via_edges bigint[],
-    fraction float[],
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  has_rcost boolean;
-  sql_new_vertices text := ' ';
-  sql_on_vertex text;
-  v_union text := ' ';
-  dummyrec record;
-  rec1 record;
-  via_vertices int[];
-  sql_safe text;
-  new_edges text;
-  BEGIN
-     BEGIN
-        sql_safe = 'SELECT id, source, target, cost, reverse_cost FROM ('|| sql || ') AS __a';
-
-        EXECUTE 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||sql_safe||' ) AS __b__ limit 1 ' INTO rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-     END;
-
-
-      IF array_length(via_edges, 1) != array_length(fraction, 1) then
-        RAISE EXCEPTION 'The length of via_edges is different of length of via_edges';
-      END IF;
-
-      FOR i IN 1 .. array_length(via_edges, 1)
-      LOOP
-          IF fraction[i] = 0 THEN
-              sql_on_vertex := 'SELECT source FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.source;
-          ELSE IF fraction[i] = 1 THEN
-              sql_on_vertex := 'SELECT target FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.target;
-          ELSE
-              via_vertices[i] = -i;
-              IF has_rcost THEN
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost,
-                              reverse_cost * (1 - ' || fraction[i] || ')  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost,
-                              reverse_cost *  ' || fraction[i] || '  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' where id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               ELSE
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               END IF;
-          END IF;
-          END IF;
-     END LOOP;
-
-     IF sql_new_vertices = ' ' THEN
-         new_edges := sql;
-     ELSE
-         IF has_rcost THEN
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost,
-                         lead(cost) OVER w  - cost AS reverse_cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL),
-                   second_part AS ( SELECT * FROM (SELECT id, lead(source) OVER w  AS source, source as target,
-                         reverse_cost - lead(reverse_cost) OVER w  AS cost,
-                         reverse_cost - lead(reverse_cost) OVER w  AS reverse_cost
-                      FROM  the_union  WHERE target > 0 and reverse_cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY reverse_cost ASC) ) as n2
-                      WHERE source IS NOT NULL),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part)
-                             UNION
-                       (SELECT * FROM second_part) ) _union )
-                  SELECT *  FROM more_union';
-         ELSE
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL ),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part) ) _union )
-                  SELECT *  FROM more_union';
-          END IF;
-      END IF;
-
- -- raise notice '%', new_edges;
-     sql_new_vertices := sql_new_vertices || v_union || ' (' || sql || ')';
-     RETURN query SELECT *
-         FROM pgr_dijkstraVia(new_edges, via_vertices, directed, has_rcost);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_lineGraph(
-    TEXT, -- edges_sql
-    directed BOOLEAN DEFAULT true,
-    OUT seq INTEGER,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost FLOAT,
-    OUT reverse_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'lineGraph'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_connectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'connectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_strongComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'strongComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_biconnectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the edge in the component
-    OUT n_seq INTEGER,          -- nth_seq of the edge in the component
-    OUT edge BIGINT)            -- the number of the edge
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'biconnectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_articulationPoints(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'articulationPoints'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bridges(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT edge BIGINT)            -- the number of the edge 
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bridges'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createtopology(edge_table text, tolerance double precision,
-		   the_geom text default 'the_geom', id text default 'id',
-		   source text default 'source', target text default 'target',rows_where text default 'true',
-		   clean boolean default FALSE)
-RETURNS VARCHAR AS
-$BODY$
-
-DECLARE
-    points record;
-    sridinfo record;
-    source_id bigint;
-    target_id bigint;
-    totcount bigint;
-    rowcount bigint;
-    srid integer;
-    sql text;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    notincluded integer;
-    i integer;
-    naming record;
-    info record;
-    flag boolean;
-    query text;
-    idtype text;
-    gtype text;
-    sourcetype text;
-    targettype text;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-    msgKind int;
-    emptied BOOLEAN;
-
-BEGIN
-    msgKind = 1; -- notice
-    fnName = 'pgr_createTopology';
-    raise notice 'PROCESSING:';
-    raise notice 'pgr_createTopology(''%'', %, ''%'', ''%'', ''%'', ''%'', rows_where := ''%'', clean := %)',edge_table,tolerance,the_geom,id,source,target,rows_where, clean;
-    execute 'show client_min_messages' into debuglevel;
-
-
-    raise notice 'Performing checks, please wait .....';
-
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-        sname=naming.sname;
-        tname=naming.tname;
-        tabname=sname||'.'||tname;
-        vname=tname||'_vertices_pgr';
-        vertname= sname||'.'||vname;
-        rows_where = ' AND ('||rows_where||')';
-      raise DEBUG '     --> OK';
-
-
-      raise debug 'Checking column names in edge table';
-        select * into idname     from _pgr_getColumnName(sname, tname,id,2,fnName);
-        select * into sourcename from _pgr_getColumnName(sname, tname,source,2,fnName);
-        select * into targetname from _pgr_getColumnName(sname, tname,target,2,fnName);
-        select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2,fnName);
-
-
-        err = sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname;
-        perform _pgr_onError( err, 2, fnName,
-               'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-	       'Column names are OK');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking column types in edge table';
-        select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-        select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-        select * into idtype from _pgr_getColumnType(sname,tname,idname,1, fnName);
-
-        err = idtype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column id:'|| idname, ' Expected type of '|| idname || ' is integer,smallint or bigint but '||idtype||' was found');
-
-        err = sourcetype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column source:'|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-        err = targettype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column target:'|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or bigint but '||targettype||' was found');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         raise debug '%',query;
-         EXECUTE query INTO sridinfo;
-
-         err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-         perform _pgr_onError(err, 2, fnName,
-	     'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-
-         srid := sridinfo.srid;
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking and creating indices in edge table';
-        perform _pgr_createIndex(sname, tname , idname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-
-        gname=quote_ident(gname);
-        idname=quote_ident(idname);
-        sourcename=quote_ident(sourcename);
-        targetname=quote_ident(targetname);
-      raise DEBUG '     --> OK';
-
-
-
-
-
-    BEGIN
-        -- issue #193 & issue #210 & #213
-        -- this sql is for trying out the where clause
-        -- the select * is to avoid any column name conflicts
-        -- limit 1, just try on first record
-        -- if the where clasuse is ill formed it will be caught in the exception
-        sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-        EXECUTE sql into dummyRec;
-        -- end
-
-        -- if above where clasue works this one should work
-        -- any error will be caught by the exception also
-        sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NOT NULL AND '||
-	    idname||' IS NOT NULL)=false '||rows_where;
-        EXECUTE SQL  into notincluded;
-
-        if clean then
-            raise debug 'Cleaning previous Topology ';
-               execute 'UPDATE ' || _pgr_quote_ident(tabname) ||
-               ' SET '||sourcename||' = NULL,'||targetname||' = NULL';
-        else
-            raise debug 'Creating topology for edges with non assigned topology';
-            if rows_where=' AND (true)' then
-                rows_where=  ' and ('||quote_ident(sourcename)||' is null or '||quote_ident(targetname)||' is  null)';
-            end if;
-        end if;
-        -- my thoery is that the select Count(*) will never go through here
-        EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-             RAISE NOTICE '%',sql;
-             RETURN 'FAIL';
-    END;
-
-    BEGIN
-         raise DEBUG 'initializing %',vertname;
-         execute 'select * from _pgr_getTableName('||quote_literal(vertname)
-                                                  || ',0,' || quote_literal(fnName) ||' )' into naming;
-         emptied = false;
-         set client_min_messages  to warning;
-         IF sname=naming.sname AND vname=naming.tname  THEN
-            if clean then
-                execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-                execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-                emptied = true;
-            end if;
-         ELSE -- table doesn't exist
-            execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-            emptied = true;
-         END IF;
-         IF (emptied) THEN
-             execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-	         quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-             perform _pgr_createIndex(vertname , 'the_geom'::text , 'gist'::text);
-         END IF;
-         execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id"}''::text[])' into naming;
-         execute 'set client_min_messages  to '|| debuglevel;
-         raise DEBUG  '  ------>OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: something went wrong when initializing the verties table';
-             RETURN 'FAIL';
-    END;
-
-
-
-    raise notice 'Creating Topology, Please wait...';
-        rowcount := 0;
-        FOR points IN EXECUTE 'SELECT ' || idname || '::bigint AS id,'
-            || ' _pgr_StartPoint(' || gname || ') AS source,'
-            || ' _pgr_EndPoint('   || gname || ') AS target'
-            || ' FROM '  || _pgr_quote_ident(tabname)
-            || ' WHERE ' || gname || ' IS NOT NULL AND ' || idname||' IS NOT NULL '||rows_where
-        LOOP
-
-            rowcount := rowcount + 1;
-            IF rowcount % 1000 = 0 THEN
-                RAISE NOTICE '% edges processed', rowcount;
-            END IF;
-
-
-            source_id := _pgr_pointToId(points.source, tolerance,vertname,srid);
-            target_id := _pgr_pointToId(points.target, tolerance,vertname,srid);
-            BEGIN
-                sql := 'UPDATE ' || _pgr_quote_ident(tabname) ||
-                    ' SET '||sourcename||' = '|| source_id::text || ','||targetname||' = ' || target_id::text ||
-                    ' WHERE ' || idname || ' =  ' || points.id::text;
-
-                IF sql IS NULL THEN
-                    RAISE NOTICE 'WARNING: UPDATE % SET source = %, target = % WHERE % = % ', tabname, source_id::text, target_id::text, idname,  points.id::text;
-                ELSE
-                    EXECUTE sql;
-                END IF;
-                EXCEPTION WHEN OTHERS THEN
-                    RAISE NOTICE '%', SQLERRM;
-                    RAISE NOTICE '%',sql;
-                    RETURN 'FAIL';
-            end;
-        END LOOP;
-        raise notice '-------------> TOPOLOGY CREATED FOR  % edges', rowcount;
-        RAISE NOTICE 'Rows with NULL geometry or NULL id: %',notincluded;
-        Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname), _pgr_quote_ident(vertname);
-        raise notice '----------------------------------------------';
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_createTopology(text, double precision,text,text,text,text,text,boolean)
-IS 'args: edge_table,tolerance, the_geom:=''the_geom'',source:=''source'', target:=''target'',rows_where:=''true'' - fills columns source and target in the geometry table and creates a vertices table for selected rows';
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
-RETURNS character varying AS
-$BODY$
-
-DECLARE
-    points record;
-    seg record;
-    naming record;
-    sridinfo record;
-    srid integer;
-    ecnt integer;
-    vertname text;
-    sname text;
-    tname text;
-    vname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    geotype text;
-    gname text;
-    tabName text;
-    flag boolean ;
-    query text;
-    selectionquery text;
-    i integer;
-    tot integer;
-    NumIsolated integer;
-    numdeadends integer;
-    numgaps integer;
-    NumCrossing integer;
-    numRings integer;
-    debuglevel text;
-
-
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeGraph(''%'',%,''%'',''%'',''%'',''%'',''%'')',edge_table,tolerance,the_geom,id,source,target,rows_where;
-  raise notice 'Performing checks, please wait ...';
-  execute 'show client_min_messages' into debuglevel;
-
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-    raise DEBUG '     --> OK';
-
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","cnt","chk"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET cnt=0 ,chk=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into idname     from _pgr_getColumnName(sname, tname,id,2);
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname, 2,
-                       'pgr_analyzeGraph',  'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-                       'Column names are OK');
-
-        raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-   BEGIN
-       raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         EXECUTE QUERY INTO sridinfo;
-
-         perform _pgr_onError( sridinfo IS NULL OR sridinfo.srid IS NULL,2,
-                 'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname,
-                 'SRID of '||gname||' is '||sridinfo.srid);
-
-         IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-             RAISE NOTICE ' Can not determine the srid of the geometry "%" in table %', the_geom,tabname;
-             RETURN 'FAIL';
-         END IF;
-         srid := sridinfo.srid;
-         raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM;--issue 210,211,213
-             RAISE NOTICE 'ERROR: something went wrong when checking for SRID of % in table %', the_geom,tabname;
-             RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-       raise debug 'Checking  indices in edge table';
-       perform _pgr_createIndex(tabname , idname , 'btree');
-       perform _pgr_createIndex(tabname , sourcename , 'btree');
-       perform _pgr_createIndex(tabname , targetname , 'btree');
-       perform _pgr_createIndex(tabname , gname , 'gist');
-
-       gname=quote_ident(gname);
-       sourcename=quote_ident(sourcename);
-       targetname=quote_ident(targetname);
-       idname=quote_ident(idname);
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking indices';
-          RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-        query='select count(*) from '||_pgr_quote_ident(tabname)||' where true  '||rows_where;
-        EXECUTE query into ecnt;
-        raise DEBUG '-->Rows Where condition: OK';
-        raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-            RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-            RAISE NOTICE 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-            RAISE NOTICE '%',query;
-            RETURN 'FAIL';
-    END;
-
-    selectionquery ='with
-           selectedRows as( (select '||sourcename||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||')
-                           union
-                           (select '||targetname||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||'))';
-
-
-
-
-
-   BEGIN
-       RAISE NOTICE 'Analyzing for dead ends. Please wait...';
-       query= 'with countingsource as (select a.'||sourcename||' as id,count(*) as cnts
-               from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||sourcename||')
-                     ,countingtarget as (select a.'||targetname||' as id,count(*) as cntt
-                    from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||targetname||')
-                   ,totalcount as (select id,case when cnts is null and cntt is null then 0
-                                                   when cnts is null then cntt
-                                                   when cntt is null then cnts
-                                                   else cnts+cntt end as totcnt
-                                   from ('||_pgr_quote_ident(vertname)||' as a left
-                                   join countingsource as t using(id) ) left join countingtarget using(id))
-               update '||_pgr_quote_ident(vertname)||' as a set cnt=totcnt from totalcount as b where a.id=b.id';
-       raise debug '%',query;
-       execute query;
-       query=selectionquery||'
-              SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE cnt=1 and id in (select id from selectedRows)';
-       raise debug '%',query;
-       execute query  INTO numdeadends;
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-          RAISE NOTICE 'ERROR: something went wrong when analizing for dead ends';
-          RETURN 'FAIL';
-   END;
-
-
-
-    BEGIN
-          RAISE NOTICE 'Analyzing for gaps. Please wait...';
-          query = 'with
-                   buffer as (select id,st_buffer(the_geom,'||tolerance||') as buff from '||_pgr_quote_ident(vertname)||' where cnt=1)
-                   ,veryclose as (select b.id,st_crosses(a.'||gname||',b.buff) as flag
-                   from  (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) as a
-                   join buffer as b on (a.'||gname||'&&b.buff)
-                   where '||sourcename||'!=b.id and '||targetname||'!=b.id )
-                   update '||_pgr_quote_ident(vertname)||' set chk=1 where id in (select distinct id from veryclose where flag=true)';
-          raise debug '%' ,query;
-          execute query;
-          GET DIAGNOSTICS  numgaps= ROW_COUNT;
-          raise DEBUG '     --> OK';
-          EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for gaps';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for isolated edges. Please wait...';
-        query=selectionquery|| ' SELECT count(*) FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' )  as a,
-                                                 '||_pgr_quote_ident(vertname)||' as b,
-                                                 '||_pgr_quote_ident(vertname)||' as c
-                            WHERE b.id in (select id from selectedRows) and a.'||sourcename||' =b.id
-                            AND b.cnt=1 AND a.'||targetname||' =c.id
-                            AND c.cnt=1';
-        raise debug '%' ,query;
-        execute query  INTO NumIsolated;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for isolated edges';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for ring geometries. Please wait...';
-        execute 'SELECT geometrytype('||gname||')  FROM '||_pgr_quote_ident(tabname) limit 1 into geotype;
-        IF (geotype='MULTILINESTRING') THEN
-            query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                 WHERE true  '||rows_where||' and st_isRing(st_linemerge('||gname||'))';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        ELSE query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                  WHERE true  '||rows_where||' and st_isRing('||gname||')';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        END IF;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for ring geometries';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for intersections. Please wait...';
-        query = 'select count(*) from (select distinct case when a.'||idname||' < b.'||idname||' then a.'||idname||'
-                                                        else b.'||idname||' end,
-                                                   case when a.'||idname||' < b.'||idname||' then b.'||idname||'
-                                                        else a.'||idname||' end
-                                    FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as a
-                                    JOIN (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as b
-                                    ON (a.'|| gname||' && b.'||gname||')
-                                    WHERE a.'||idname||' != b.'||idname|| '
-                                        and (a.'||sourcename||' in (b.'||sourcename||',b.'||targetname||')
-                                              or a.'||targetname||' in (b.'||sourcename||',b.'||targetname||')) = false
-                                        and st_intersects(a.'||gname||', b.'||gname||')=true) as d ';
-        raise debug '%' ,query;
-        execute query  INTO numCrossing;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for intersections';
-            RETURN 'FAIL';
-    END;
-
-
-
-
-    RAISE NOTICE '            ANALYSIS RESULTS FOR SELECTED EDGES:';
-    RAISE NOTICE '                  Isolated segments: %', NumIsolated;
-    RAISE NOTICE '                          Dead ends: %', numdeadends;
-    RAISE NOTICE 'Potential gaps found near dead ends: %', numgaps;
-    RAISE NOTICE '             Intersections detected: %',numCrossing;
-    RAISE NOTICE '                    Ring geometries: %',numRings;
-
-
-    RETURN 'OK';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_analyzeGraph(text,double precision,text,text,text,text,text) IS 'args: edge_table, tolerance,the_geom:=''the_geom'',id:=''id'',source column:=''source'', target column:=''target'' rows_where:=''true'' - creates a vertices table based on the geometry for selected rows';
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzeOneway(
-   edge_table text,
-   s_in_rules TEXT[],
-   s_out_rules TEXT[],
-   t_in_rules TEXT[],
-   t_out_rules TEXT[],
-   two_way_if_null boolean default true,
-   oneway text default 'oneway',
-   source text default 'source',
-   target text default 'target')
-  RETURNS text AS
-$BODY$
-
-
-DECLARE
-    rule text;
-    ecnt integer;
-    instr text;
-    naming record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    owname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    vertname text;
-    debuglevel text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeOneway(''%'',''%'',''%'',''%'',''%'',''%'',''%'',''%'',%)',
-		edge_table, s_in_rules , s_out_rules, t_in_rules, t_out_rules, oneway, source ,target,two_way_if_null ;
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    raise DEBUG '     --> OK';
-    EXCEPTION WHEN raise_exception THEN
-      RAISE NOTICE 'ERROR: something went wrong checking the table name';
-      RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","ein","eout"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET eout=0 ,ein=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into owname from _pgr_getColumnName(sname, tname,oneway,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,owname) or  targetname=owname, 2,
-                       '_pgr_createToplogy',  'Two columns share the same name', 'Parameter names for oneway,source and target  must be different',
-                       'Column names are OK');
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-
-
-    RAISE NOTICE 'Analyzing graph for one way street errors.';
-
-    rule := CASE WHEN two_way_if_null
-            THEN owname || ' IS NULL OR '
-            ELSE '' END;
-
-    instr := '''' || array_to_string(s_in_rules, ''',''') || '''';
-       EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-      from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-     where a.id=b.'|| sourcename;
-
-    RAISE NOTICE 'Analysis 25%% complete ...';
-
-    instr := '''' || array_to_string(t_in_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 50%% complete ...';
-
-    instr := '''' || array_to_string(s_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-        where a.id=b.'|| sourcename;
-    RAISE NOTICE 'Analysis 75%% complete ...';
-
-    instr := '''' || array_to_string(t_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 100%% complete ...';
-
-    EXECUTE 'SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE ein=0 or eout=0' INTO ecnt;
-
-    RAISE NOTICE 'Found % potential problems in directionality' ,ecnt;
-
-    RETURN 'OK';
-
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_analyzeOneway(text,TEXT[],TEXT[], TEXT[],TEXT[],boolean,text,text,text)
-IS 'args:edge_table , s_in_rules , s_out_rules, t_in_rules , t_out_rules, two_way_if_null:= true, oneway:=''oneway'',source:= ''source'',target:=''target'' - Analizes the directionality of the edges based on the rules';
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createverticestable(
-   edge_table text,
-   the_geom text DEFAULT 'the_geom'::text,
-   source text DEFAULT 'source'::text,
-   target text DEFAULT 'target'::text,
-    rows_where text DEFAULT 'true'::text
-)
-  RETURNS text AS
-$BODY$
-DECLARE
-    naming record;
-    sridinfo record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    sourcename text;
-    targetname text;
-    query text;
-    ecnt bigint;
-    srid integer;
-    sourcetype text;
-    targettype text;
-    sql text;
-    totcount integer;
-    i integer;
-    notincluded integer;
-    included integer;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-
-
-BEGIN
-  fnName = 'pgr_createVerticesTable';
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_createVerticesTable(''%'',''%'',''%'',''%'',''%'')',edge_table,the_geom,source,target,rows_where;
-  execute 'show client_min_messages' into debuglevel;
-
-  raise notice 'Performing checks, please wait .....';
-
-  RAISE DEBUG 'Checking % exists',edge_table;
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-  raise debug '--> Edge table exists: OK';
-
-  raise debug 'Checking column names';
-    select * into sourcename from _pgr_getColumnName(sname, tname,source,2, fnName);
-    select * into targetname from _pgr_getColumnName(sname, tname,target,2, fnName);
-    select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2, fnName);
-
-
-    err = sourcename in (targetname,gname) or  targetname=gname;
-    perform _pgr_onError(err, 2, fnName,
-        'Two columns share the same name', 'Parameter names for the_geom,source and target  must be different');
-  raise debug '--> Column names: OK';
-
-  raise debug 'Checking column types in edge table';
-    select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-    select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-
-
-    err = sourcetype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column source: '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-    err = targettype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column target: '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found');
-
-  raise debug '-->Column types:OK';
-
-  raise debug 'Checking SRID of geometry column';
-     query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-        || ' FROM ' || _pgr_quote_ident(tabname)
-        || ' WHERE ' || quote_ident(gname)
-        || ' IS NOT NULL LIMIT 1';
-     raise debug '%',query;
-     EXECUTE query INTO sridinfo;
-
-     err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-     perform _pgr_onError(err, 2, fnName,
-         'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-     srid := sridinfo.srid;
-  raise DEBUG '     --> OK';
-
-  raise debug 'Checking and creating Indices';
-     perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-  raise DEBUG '-->Check and create indices: OK';
-
-     gname=quote_ident(gname);
-     sourcename=quote_ident(sourcename);
-     targetname=quote_ident(targetname);
-
-
-  BEGIN
-  raise debug 'Checking Condition';
-    -- issue #193 & issue #210 & #213
-    -- this sql is for trying out the where clause
-    -- the select * is to avoid any column name conflicts
-    -- limit 1, just try on first record
-    -- if the where clasuse is ill formed it will be caught in the exception
-    sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-    EXECUTE sql into dummyRec;
-    -- end
-
-    -- if above where clasue works this one should work
-    -- any error will be caught by the exception also
-    sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NULL or '||
-		sourcename||' is null or '||targetname||' is null)=true '||rows_where;
-    raise debug '%',sql;
-    EXECUTE SQL  into notincluded;
-    EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-
-
-
-  BEGIN
-     raise DEBUG 'initializing %',vertname;
-       execute 'select * from _pgr_getTableName('||quote_literal(vertname)||',0)' into naming;
-       IF sname=naming.sname  AND vname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-       ELSE
-           set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-       END IF;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-                quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-       execute 'CREATE INDEX '||quote_ident(vname||'_the_geom_idx')||' ON '||_pgr_quote_ident(vertname)||'  USING GIST (the_geom)';
-       execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-       EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Initializing vertex table';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise notice 'Populating %, please wait...',vertname;
-       sql= 'with
-		lines as ((select distinct '||sourcename||' as id, _pgr_startpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-		                  ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||')
-			union (select distinct '||targetname||' as id,_pgr_endpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-			          ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||'))
-		,numberedLines as (select row_number() OVER (ORDER BY id) AS i,* from lines )
-		,maxid as (select id,max(i) as maxi from numberedLines group by id)
-		insert into '||_pgr_quote_ident(vertname)||'(id,the_geom)  (select id,the_geom  from numberedLines join maxid using(id) where i=maxi order by id)';
-       RAISE debug '%',sql;
-       execute sql;
-       GET DIAGNOSTICS totcount = ROW_COUNT;
-
-       sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' a, '||_pgr_quote_ident(vertname)||' b
-            where '||sourcename||'=b.id and '|| targetname||' in (select id from '||_pgr_quote_ident(vertname)||')';
-       RAISE debug '%',sql;
-       execute sql into included;
-
-
-
-       execute 'select max(id) from '||_pgr_quote_ident(vertname) into ecnt;
-       execute 'SELECT setval('||quote_literal(vertname||'_id_seq')||','||coalesce(ecnt,1)||' , false)';
-       raise notice '  ----->   VERTICES TABLE CREATED WITH  % VERTICES', totcount;
-       raise notice '                                       FOR   %  EDGES', included+notincluded;
-       RAISE NOTICE '  Edges with NULL geometry,source or target: %',notincluded;
-       RAISE NOTICE '                            Edges processed: %',included;
-       Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname),_pgr_quote_ident(vertname);
-       raise notice '----------------------------------------------';
-    END;
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_createVerticesTable(text,text,text,text,text)
-IS 'args: edge_table, the_geom:=''the_geom'',source:=''source'', target:=''target'' rows_where:=''true'' - creates a vertices table based on the source and target identifiers for selected rows';
-
-
-CREATE OR REPLACE FUNCTION pgr_nodeNetwork(edge_table text, tolerance double precision,
-			id text default 'id', the_geom text default 'the_geom', table_ending text default 'noded',
-            rows_where text DEFAULT ''::text, outall boolean DEFAULT false) RETURNS text AS
-$BODY$
-DECLARE
-	
-	p_num int := 0;
-	p_ret text := '';
-    pgis_ver_old boolean := _pgr_versionless(postgis_lib_version(), '2.1.0.0');
-    vst_line_substring text;
-    vst_line_locate_point text;
-    intab text;
-    outtab text;
-    n_pkey text;
-    n_geom text;
-    naming record;
-    sname text;
-    tname text;
-    outname text;
-    srid integer;
-    sridinfo record;
-    splits bigint;
-    touched bigint;
-    untouched bigint;
-    geomtype text;
-    debuglevel text;
-    rows_where text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_nodeNetwork(''%'', %, ''%'', ''%'', ''%'', ''%'',  %)',
-    edge_table, tolerance, id,  the_geom, table_ending, rows_where, outall;
-  raise notice 'Performing checks, please wait .....';
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',0)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-	RAISE NOTICE '-------> % not found',edge_table;
-        RETURN 'FAIL';
-    ELSE
-	RAISE DEBUG '  -----> OK';
-    END IF;
-
-    intab=sname||'.'||tname;
-    outname=tname||'_'||table_ending;
-    outtab= sname||'.'||outname;
-    rows_where = CASE WHEN length(rows_where) > 2 and not outall THEN ' AND (' || rows_where || ')' ELSE '' END;
-    rows_where = CASE WHEN length(rows_where) > 2 THEN ' WHERE (' || rows_where || ')' ELSE '' END;
-  END;
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',id,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(id)||')' INTO n_pkey;
-       IF n_pkey is NULL then
-          raise notice  'ERROR: id column "%"  not found in %',id,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',the_geom,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(the_geom)||')' INTO n_geom;
-       IF n_geom is NULL then
-          raise notice  'ERROR: the_geom  column "%"  not found in %',the_geom,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-  IF n_pkey=n_geom THEN
-	raise notice  'ERROR: id and the_geom columns have the same name "%" in %',n_pkey,intab;
-        RETURN 'FAIL';
-  END IF;
-
-  BEGIN
-       	raise DEBUG 'Checking the SRID of the geometry "%"', n_geom;
-       	EXECUTE 'SELECT ST_SRID(' || quote_ident(n_geom) || ') as srid '
-          		|| ' FROM ' || _pgr_quote_ident(intab)
-          		|| ' WHERE ' || quote_ident(n_geom)
-          		|| ' IS NOT NULL LIMIT 1' INTO sridinfo;
-       	IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-        	RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           	RETURN 'FAIL';
-       	END IF;
-       	srid := sridinfo.srid;
-       	raise DEBUG '  -----> SRID found %',srid;
-       	EXCEPTION WHEN OTHERS THEN
-           		RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           		RETURN 'FAIL';
-  END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_pkey,intab;
-      if (_pgr_isColumnIndexed(intab,n_pkey)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding  index "%_%_idx".',n_pkey,intab;
-
-	set client_min_messages  to warning;
-        execute 'create  index '||tname||'_'||n_pkey||'_idx on '||_pgr_quote_ident(intab)||' using btree('||quote_ident(n_pkey)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_geom,intab;
-      if (_pgr_iscolumnindexed(intab,n_geom)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding unique index "%_%_gidx".',intab,n_geom;
-	set client_min_messages  to warning;
-        execute 'CREATE INDEX '
-            || quote_ident(tname || '_' || n_geom || '_gidx' )
-            || ' ON ' || _pgr_quote_ident(intab)
-            || ' USING gist (' || quote_ident(n_geom) || ')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
----------------
-    BEGIN
-       raise DEBUG 'initializing %',outtab;
-       execute 'select * from _pgr_getTableName('||quote_literal(outtab)||',0)' into naming;
-       IF sname=naming.sname  AND outname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(outtab)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(outname)||','||quote_literal(n_geom)||')';
-       ELSE
-	   set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(outtab)||' (id bigserial PRIMARY KEY,old_id integer,sub_id integer,
-								source bigint,target bigint)';
-       END IF;
-       execute 'select geometrytype('||quote_ident(n_geom)||') from  '||_pgr_quote_ident(intab)||' limit 1' into geomtype;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(outname)||','||
-                quote_literal(n_geom)||','|| srid||', '||quote_literal(geomtype)||', 2)';
-       execute 'CREATE INDEX '||quote_ident(outname||'_'||n_geom||'_idx')||' ON '||_pgr_quote_ident(outtab)||'  USING GIST ('||quote_ident(n_geom)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-    END;
-----------------
-
-
-  raise notice 'Processing, please wait .....';
-
-
-    if pgis_ver_old then
-        vst_line_substring    := 'st_line_substring';
-        vst_line_locate_point := 'st_line_locate_point';
-    else
-        vst_line_substring    := 'st_linesubstring';
-        vst_line_locate_point := 'st_linelocatepoint';
-    end if;
-
---    -- First creates temp table with intersection points
-    p_ret = 'create temp table intergeom on commit drop as (
-        select l1.' || quote_ident(n_pkey) || ' as l1id,
-               l2.' || quote_ident(n_pkey) || ' as l2id,
-	       l1.' || quote_ident(n_geom) || ' as line,
-	       _pgr_startpoint(l2.' || quote_ident(n_geom) || ') as source,
-	       _pgr_endpoint(l2.' || quote_ident(n_geom) || ') as target,
-               st_intersection(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ') as geom
-        from (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l1
-             join (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l2
-             on (st_dwithin(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ', ' || tolerance || '))'||
-        'where l1.' || quote_ident(n_pkey) || ' <> l2.' || quote_ident(n_pkey)||' and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false  )';
-    raise debug '%',p_ret;
-    EXECUTE p_ret;
-
-    -- second temp table with locus (index of intersection point on the line)
-    -- to avoid updating the previous table
-    -- we keep only intersection points occurring onto the line, not at one of its ends
---    drop table if exists inter_loc;
-
---HAD TO CHANGE THIS QUERY
--- p_ret= 'create temp table inter_loc on commit drop as (
---        select l1id, l2id, ' || vst_line_locate_point || '(line,point) as locus from (
---        select DISTINCT l1id, l2id, line, (ST_DumpPoints(geom)).geom as point from intergeom) as foo
---        where ' || vst_line_locate_point || '(line,point)<>0 and ' || vst_line_locate_point || '(line,point)<>1)';
-    p_ret= 'create temp table inter_loc on commit drop as ( select * from (
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,source) as locus from intergeom)
-         union
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,target) as locus from intergeom)) as foo
-        where locus<>0 and locus<>1)';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-
-    -- index on l1id
-    create index inter_loc_id_idx on inter_loc(l1id);
-
-    -- Then computes the intersection on the lines subset, which is much smaller than full set
-    -- as there are very few intersection points
-
---- outab needs to be formally created with id, old_id, subid,the_geom, source,target
----  so it can be inmediatly be used with createTopology
-
---   EXECUTE 'drop table if exists ' || _pgr_quote_ident(outtab);
---   EXECUTE 'create table ' || _pgr_quote_ident(outtab) || ' as
-     P_RET = 'insert into '||_pgr_quote_ident(outtab)||' (old_id,sub_id,'||quote_ident(n_geom)||') (  with cut_locations as (
-           select l1id as lid, locus
-           from inter_loc
-           -- then generates start and end locus for each line that have to be cut buy a location point
-           UNION ALL
-           select i.l1id  as lid, 0 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           UNION ALL
-           select i.l1id  as lid, 1 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           order by lid, locus
-       ),
-       -- we generate a row_number index column for each input line
-       -- to be able to self-join the table to cut a line between two consecutive locations
-       loc_with_idx as (
-           select lid, locus, row_number() over (partition by lid order by locus) as idx
-           from cut_locations
-       )
-       -- finally, each original line is cut with consecutive locations using linear referencing functions
-       select l.' || quote_ident(n_pkey) || ', loc1.idx as sub_id, ' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus) as ' || quote_ident(n_geom) || '
-       from loc_with_idx loc1 join loc_with_idx loc2 using (lid) join ' || _pgr_quote_ident(intab) || ' l on (l.' || quote_ident(n_pkey) || ' = loc1.lid)
-       where loc2.idx = loc1.idx+1
-           -- keeps only linestring geometries
-           and geometryType(' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus)) = ''LINESTRING'') ';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-	GET DIAGNOSTICS splits = ROW_COUNT;
-        execute 'with diff as (select distinct old_id from '||_pgr_quote_ident(outtab)||' )
-                 select count(*) from diff' into touched;
-	-- here, it misses all original line that did not need to be cut by intersection points: these lines
-	-- are already clean
-	-- inserts them in the final result: all lines which gid is not in the res table.
-	EXECUTE 'insert into ' || _pgr_quote_ident(outtab) || ' (old_id , sub_id, ' || quote_ident(n_geom) || ')
-                ( with used as (select distinct old_id from '|| _pgr_quote_ident(outtab)||')
-		select ' ||  quote_ident(n_pkey) || ', 1 as sub_id, ' ||  quote_ident(n_geom) ||
-		' from '|| _pgr_quote_ident(intab) ||' where  '||quote_ident(n_pkey)||' not in (select * from used)' || rows_where || ')';
-	GET DIAGNOSTICS untouched = ROW_COUNT;
-
-	raise NOTICE '  Split Edges: %', touched;
-	raise NOTICE ' Untouched Edges: %', untouched;
-	raise NOTICE '     Total original Edges: %', touched+untouched;
-        RAISE NOTICE ' Edges generated: %', splits;
-	raise NOTICE ' Untouched Edges: %',untouched;
-	raise NOTICE '       Total New segments: %', splits+untouched;
-        RAISE NOTICE ' New Table: %', outtab;
-        RAISE NOTICE '----------------------------------';
-
-    drop table  if exists intergeom;
-    drop table if exists inter_loc;
-    RETURN 'OK';
-END;
-$BODY$
-    LANGUAGE 'plpgsql' VOLATILE STRICT COST 100;
-
-
-COMMENT ON FUNCTION pgr_nodeNetwork(text, double precision, text, text, text, text, boolean )
- IS  'edge_table, tolerance, id:=''id'', the_geom:=''the_geom'', table_ending:=''noded'' ';
-
-
-CREATE OR REPLACE FUNCTION pgr_labelGraph(
-                edge_table text,
-                id text default 'id',
-                source text default 'source',
-                target text default 'target',
-                subgraph text default 'subgraph',
-                rows_where text default 'true'
-        )
-        RETURNS character varying AS
-$BODY$
-
-DECLARE
-        naming record;
-        schema_name text;
-        table_name text;
-        garbage text;
-        incre integer;
-        table_schema_name text;
-        query text;
-        ecnt integer;
-        sql1 text;
-        rec1 record;
-        sql2 text;
-        rec2 record;
-        rec_count record;
-        rec_single record;
-        graph_id integer;
-        gids int [];
-
-BEGIN
-        raise notice 'Processing:';
-        raise notice 'pgr_brokenGraph(''%'',''%'',''%'',''%'',''%'',''%'')', edge_table,id,source,target,subgraph,rows_where;
-        raise notice 'Performing initial checks, please hold on ...';
-
-        Raise Notice 'Starting - Checking table ...';
-        BEGIN
-                raise debug 'Checking % table existance', edge_table;
-                execute 'select * from pgr_getTableName('|| quote_literal(edge_table) ||')' into naming;
-                schema_name = naming.sname;
-                table_name = naming.tname;
-                table_schema_name = schema_name||'.'||table_name;
-                IF schema_name is null then
-                        raise notice 'no schema';
-                        return 'FAIL';
-                else
-                        if table_name is null then
-                                raise notice 'no table';
-                                return 'FAIL';
-                        end if;
-                end if;
-        END;
-        Raise Notice 'Ending - Checking table';
-
-        Raise Notice 'Starting - Checking columns';
-        BEGIN
-                raise debug 'Checking exitance of necessary columns inside % table', edge_table;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(id) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no id column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(source) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no source column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(target) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no target column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(subgraph) ||')' into naming;
-                if naming.pgr_iscolumnintable = 't' then
-                        raise notice 'subgraph column already in the table';
-                        return 'FAIL';
-                end if;
-        END;
-        Raise Notice 'Ending - Checking columns';
-
-        Raise Notice 'Starting - Checking rows_where condition';
-        BEGIN
-                raise debug 'Checking rows_where condition';
-                query='select count(*) from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where;
-                execute query into ecnt;
-                raise debug '-->Rows where condition: OK';
-                raise debug '    --> OK';
-                EXCEPTION WHEN OTHERS THEN
-                        raise notice 'Got %', SQLERRM;
-                        Raise notice 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-                        Raise notice '%', query;
-                        return 'FAIL';
-        END;
-        Raise Notice 'Ending - Checking rows_where condition';
-
-        garbage := 'garbage001';
-        incre := 1;
-        Raise Notice 'Starting - Checking temporary column';
-        Begin
-                raise debug 'Checking Checking temporary columns existance';
-
-                While True
-                        Loop
-                                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(garbage) ||')' into naming;
-                                If naming.pgr_iscolumnintable = 't' THEN
-                                        incre := incre + 1;
-                                        garbage := 'garbage00'||incre||'';
-                                ELSE
-                                        EXIT;
-                                END IF;
-                        End Loop;
-        End;
-        Raise Notice 'Ending - Checking temporary column';
-
-        Raise Notice 'Starting - Calculating subgraphs';
-        BEGIN
-                --------- Add necessary columns ----------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(subgraph) || ' INTEGER DEFAULT -1';
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(garbage) || ' INTEGER DEFAULT 0';
-                graph_id := 1;
-
-                EXECUTE 'select count(*) as count from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where ||'' into rec_count;
-                if rec_count.count = 0 then
-                        RETURN 'rows_where condition generated 0 rows';
-                end if;
-
-                WHILE TRUE
-                        LOOP
-                                ---------- Assign the very first -1 row graph_id ----------
-                                EXECUTE 'SELECT ' || pgr_quote_ident(id) || ' AS gid FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1 LIMIT 1' INTO rec_single;
-                                EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec_single.gid || '';
-
-                                --------- Search other rows with that particular graph_id -----------
-                                WHILE TRUE
-                                        LOOP
-                                                EXECUTE 'SELECT COUNT(*) FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0' into rec_count;
-                                                ----------- The following if else will check those rows which already have entertained ------------
-                                                IF (rec_count.count > 0) THEN
-                                                        sql1 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0';
-                                                        FOR rec1 IN EXECUTE sql1
-                                                                LOOP
-                                                                        sql2 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| pgr_quote_ident(source) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(source) ||' = '|| rec1.target ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.target ||'';
-                                                                        FOR rec2 IN EXECUTE sql2
-                                                                                LOOP
-                                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec2.gid || '';
-                                                                                END LOOP;
-                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(garbage) || ' = 1 WHERE ' || pgr_quote_ident(id) || ' = ' || rec1.gid || '';
-                                                                END LOOP;
-                                                ELSE
-                                                        EXIT;
-                                                END IF;
-                                        END LOOP;
-
-                                ------ Following is to exit the while loop. 0 means no more -1 id.
-                                EXECUTE 'SELECT COUNT(*) AS count FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1' INTO rec_count;
-                                If (rec_count.count = 0) THEN
-                                        EXIT;
-                                ELSE
-                                        graph_id := graph_id + 1;
-                                END IF;
-                        END LOOP;
-
-                ----------- Drop garbage column ------------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' DROP COLUMN ' || pgr_quote_ident(garbage) ||'';
-                Raise Notice 'Successfully complicated calculating subgraphs';
-        END;
-        Raise Notice 'Ending - Calculating subgraphs';
-
-        RETURN 'OK';
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCostMatrix(
-    edges_sql TEXT,
-    points_sql TEXT,
-    pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_pid, a.end_pid, a.agg_cost
-        FROM _pgr_withPoints($1, $2, $3, $3, $4,  $5, TRUE, TRUE) AS a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
---  DIJKSTRA DMatrix
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2, $2, $3, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
---  BIDIRECTIONAL DIJKSTRA Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_astarCostMatrix(
-    edges_sql TEXT, -- XY edges sql
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2, $2, $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
---  BIDIRECTIONAL ASTAR Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdAstarCostMatrix(
-    edges_sql TEXT,
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_bdAstarCostMatrix(TEXT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCostMatrix';
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_getTableName(IN tab text,OUT sname text,OUT tname text)
-RETURNS RECORD AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getTableName: This function will no longer be soported';
-    select * from _pgr_getTableName(tab, 0, 'pgr_getTableName') into sname,tname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_getColumnName(tab text, col text)
-RETURNS text AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getColumnName: This function will no longer be soported';
-    return _pgr_getColumnName(tab,col, 0, 'pgr_getColumnName');
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    select * from _pgr_getColumnName(tab,col,0, 'pgr_isColumnInTable') into cname;
-    return  cname IS not NULL;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnIndexed(tab text, col text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnIndexed: This function will no longer be soported';
-    return  _pgr_isColumnIndexed(tab,col);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-create or replace function pgr_quote_ident(idname text)
-returns text as
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    return  _pgr_quote_ident(idname);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_versionless(v1 text, v2 text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_versionless: This function will no longer be soported';
-    return  _pgr_versionless(v1,v2);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-create or replace function pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_startPoint: This function will no longer be soported';
-    return  _pgr_startPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_endPoint: This function will no longer be soported';
-    return  _pgr_endPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspJohnson(edges_sql text)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_johnson instead';
-      has_reverse =_pgr_parameter_check('johnson', edges_sql, false);
-      sql = edges_sql;
-      IF (has_reverse) THEN
-           RAISE NOTICE 'reverse_cost column found, removing.';
-           sql = 'SELECT source, target, cost FROM (' || edges_sql || ') a';
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () - 1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_johnson(sql, TRUE);
-  END
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspWarshall(edges_sql text, directed boolean, has_rcost boolean)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_floydWarshall instead';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-      sql := edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         ELSE raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () -1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_floydWarshall(sql, directed);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_astar(edges_sql TEXT, source_id INTEGER, target_id INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated signature pgr_astar(text, integer, integer, boolean, boolean)';
-    has_reverse =_pgr_parameter_check('astar', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost, x1,y1, x2, y2 FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-    FROM pgr_astar(sql, ARRAY[$2], ARRAY[$3], directed);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    sql TEXT,
-    source_vid INTEGER,
-    target_vid INTEGER,
-    directed BOOLEAN,
-    has_reverse_cost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdAstar';
-    has_reverse =_pgr_parameter_check('astar', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdAstar(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(edges_sql TEXT, start_vid INTEGER, end_vid INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdDijkstra';
-    has_reverse =_pgr_parameter_check('dijkstra', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdDijkstra(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstraPath(
-    sql text,
-    source INTEGER,
-    targets INTEGER ARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-    RETURNS SETOF pgr_costResult3 AS
-    $BODY$
-    DECLARE
-    has_reverse BOOLEAN;
-    new_sql TEXT;
-    result pgr_costResult3;
-    tmp pgr_costResult3;
-    sseq INTEGER;
-    i INTEGER;
-    BEGIN
-        RAISE NOTICE 'Deprecated function: Use pgr_dijkstra instead.';
-        has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-        new_sql = sql;
-        IF (array_ndims(targets) != 1) THEN
-            raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-
-        IF (has_reverse != has_rcost) THEN
-            IF (has_reverse) THEN
-                new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-            ELSE
-                raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-                USING ERRCODE = 'XX000';
-            END IF;
-        END IF;
-        SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-        sseq = 0; i = 1;
-        FOR result IN
-            SELECT seq, a.end_vid::INTEGER AS id1, a.node::INTEGER AS i2, a.edge::INTEGER AS id3, cost
-            FROM pgr_dijkstra(new_sql, source, targets, directed) a ORDER BY a.end_vid, seq LOOP
-            WHILE (result.id1 != targets[i]) LOOP
-                tmp.seq = sseq;
-                tmp.id1 = targets[i];
-                IF (targets[i] = source) THEN
-                    tmp.id2 = source;
-                    tmp.cost =0;
-                ELSE
-                    tmp.id2 = 0;
-                    tmp.cost = -1;
-                END IF;
-                tmp.id3 = -1;
-                RETURN next tmp;
-                i = i + 1;
-                sseq = sseq + 1;
-            END LOOP;
-        IF (result.id1 = targets[i] AND result.id3 != -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-        IF (result.id1 = targets[i] AND result.id3 = -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.id2 = source;
-            tmp.cost = 0;
-        ELSE
-            tmp.id2 = 0;
-            tmp.cost = -1;
-        END IF;
-        tmp.id3 = -1;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstracost(
-    sql text,
-    source INTEGER,
-    targets INTEGER array,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-result pgr_costResult;
-tmp pgr_costResult;
-sseq INTEGER;
-i INTEGER;
-BEGIN
-    RAISE NOTICE 'Deprecated function. Use pgr_dijkstraCost instead.';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    new_sql = sql;
-    IF (array_ndims(targets) != 1) THEN
-        raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-        USING ERRCODE = 'XX000';
-    END IF;
-
-
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-    sseq = 0; i = 1;
-    FOR result IN
-        SELECT ((row_number() over()) -1)::INTEGER, a.start_vid::INTEGER, a.end_vid::INTEGER, agg_cost
-        FROM pgr_dijkstraCost(new_sql, source, targets, directed) a ORDER BY end_vid LOOP
-        WHILE (result.id2 != targets[i]) LOOP
-            tmp.seq = sseq;
-            tmp.id1 = source;
-            tmp.id2 = targets[i];
-            IF (targets[i] = source) THEN
-                tmp.cost = 0;
-            ELSE
-                tmp.cost = -1;
-            END IF;
-            RETURN next tmp;
-            i = i + 1;
-            sseq = sseq + 1;
-        END LOOP;
-        IF (result.id2 = targets[i]) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = source;
-        tmp.id2 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.cost = 0;
-        ELSE
-            tmp.cost = -1;
-        END IF;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-create or replace function pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    returns integer as
-$body$
-
-declare
-    rr record;
-    pct float;
-    debuglevel text;
-
-begin
-    -- find the closest edge within tol distance
-    execute 'select * from ' || _pgr_quote_ident(edges) ||
-            ' where st_dwithin(''' || pnt::text ||
-            '''::geometry, the_geom, ' || tol || ') order by st_distance(''' || pnt::text ||
-            '''::geometry, the_geom) asc limit 1' into rr;
-
-    if rr.the_geom is not null then
-        -- deal with MULTILINESTRINGS
-        if geometrytype(rr.the_geom)='MULTILINESTRING' THEN
-            rr.the_geom := ST_GeometryN(rr.the_geom, 1);
-        end if;
-
-        -- project the point onto the linestring
-        execute 'show client_min_messages' into debuglevel;
-        SET client_min_messages='ERROR';
-        pct := st_line_locate_point(rr.the_geom, pnt);
-        execute 'set client_min_messages  to '|| debuglevel;
-
-        -- return the node we are closer to
-        if pct < 0.5 then
-            return rr.source;
-        else
-            return rr.target;
-        end if;
-    else
-        -- return a failure to find an edge within tol distance
-        return -1;
-    end if;
-end;
-$body$
-  language plpgsql volatile
-  cost 5;
-
-
-----------------------------------------------------------------------------
-
-create or replace function pgr_flipedges(ga geometry[])
-    returns geometry[] as
-$body$
-
-declare
-    nn integer;
-    i integer;
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_flipEdges';
-    -- get the count of edges, and return if only one edge
-    nn := array_length(ga, 1);
-    if nn=1 then
-        return ga;
-    end if;
-
-    -- determine if first needs to be flipped
-    g := _pgr_startpoint(ga[1]);
-
-    -- if the start of the first is connected to the second then it needs to be flipped
-    if _pgr_startpoint(ga[2])=g or _pgr_endpoint(ga[2])=g then
-        ga[1] := st_reverse(ga[1]);
-    end if;
-    g := _pgr_endpoint(ga[1]);
-
-    -- now if  the end of the last edge matchs the end of the current edge we need to flip it
-    for i in 2 .. nn loop
-        if _pgr_endpoint(ga[i])=g then
-            ga[i] := st_reverse(ga[i]);
-        end if;
-        -- save the end of this edge into the last end for the next cycle
-        g := _pgr_endpoint(ga[i]);
-    end loop;
-
-    return ga;
-end;
-$body$
-    language plpgsql immutable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_texttopoints(pnts text, srid integer DEFAULT(4326))
-    returns geometry[] as
-$body$
-
-declare
-    a text[];
-    t text;
-    p geometry;
-    g geometry[];
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_textToPoints';
-    -- convert commas to space and split on ';'
-    a := string_to_array(replace(pnts, ',', ' '), ';');
-    -- convert each 'x y' into a point geometry and concattenate into a new array
-    for t in select unnest(a) loop
-        p := st_pointfromtext('POINT(' || t || ')', srid);
-        g := g || p;
-    end loop;
-
-    return g;
-end;
-$body$
-    language plpgsql immutable;
-
------------------------------------------------------------------------
-
-create or replace function pgr_pointstovids(pnts geometry[], edges text, tol float8 DEFAULT(0.01))
-    returns integer[] as
-$body$
-
-declare
-    v integer[];
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_pointsToVids';
-    -- cycle through each point and locate the nearest edge and vertex on that edge
-    for g in select unnest(pnts) loop
-        v := v || pgr_pointtoedgenode(edges, g, tol);
-    end loop;
-
-    return v;
-end;
-$body$
-    language plpgsql stable;
-
-
-create or replace function pgr_pointstodmatrix(pnts geometry[], mode integer default (0), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    r record;
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_pointsToDMatrix';
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    -- create an id for each point in the array and unnest it into a table nodes in the with clause
-    for r in with nodes as (select row_number() over()::integer as id, p from (select unnest(pnts) as p) as foo)
-        -- compute a row of distances
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j,
-                case when mode=0
-                    then st_distance(a.p, b.p)
-                    else st_distance_sphere(a.p, b.p)
-                end as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i loop
-
-        -- you must concat an array[array[]] to make dmatrix[][]
-        -- concat the row of distances to the dmatrix
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-end;
-$body$
-    language plpgsql stable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_vidstodmatrix(IN vids integer[], IN pnts geometry[], IN edges text, tol float8 DEFAULT(0.1), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    i integer;
-    j integer;
-    nn integer;
-    rr record;
-    bbox geometry;
-    t float8[];
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    -- check if the input arrays has any -1 values, maybe this whould be a raise exception
-    if vids @> ARRAY[-1] then
-    raise notice 'Some vids are undefined (-1)!';
-    dmatrix := null;
-    ids := null;
-    return;
-    end if;
-
-    ids := vids;
-
-    -- get the count of nodes
-    nn := array_length(vids,1);
-
-    -- zero out a dummy row
-    for i in 1 .. nn loop
-        t := t || 0.0::float8;
-    end loop;
-
-    -- using the dummy row, zero out the whole matrix
-    for i in 1 .. nn loop
-    dmatrix := dmatrix || ARRAY[t];
-    end loop;
-
-    for i in 1 .. nn-1 loop
-        j := i;
-        -- compute the bbox for the point needed for this row
-        select st_expand(st_collect(pnts[id]), tol) into bbox
-          from (select generate_series as id from generate_series(i, nn)) as foo;
-
-        -- compute kdijkstra() for this row
-        for rr in execute 'select * from pgr_dijkstracost($1, $2, $3, false)'
-                  using 'select id, source, target, cost from ' || edges ||
-                        ' where the_geom && ''' || bbox::text || '''::geometry'::text, vids[i], vids[i+1:nn] loop
-
-            -- TODO need to check that all node were reachable from source
-            -- I think unreachable paths between nodes returns cost=-1.0
-
-            -- populate the matrix with the cost values, remember this is symmetric
-            j := j + 1;
-            -- raise notice 'cost(%,%)=%', i, j, rr.agg_cost;
-            dmatrix[i][j] := rr.agg_cost;
-            dmatrix[j][i] := rr.agg_cost;
-        end loop;
-    end loop;
-
-end;
-$body$
-    language plpgsql stable cost 200;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_vidsToDMatrix(sql TEXT, vids  INTEGER[], dir BOOLEAN, has_rcost BOOLEAN, want_symmetric BOOLEAN)
-RETURNS float8[] AS
-$BODY$
-DECLARE
-directed BOOLEAN;
-has_reverse BOOLEAN;
-edges_sql TEXT;
-dmatrix_row float8[];
-dmatrix float8[];
-cell RECORD;
-unique_vids INTEGER[];
-total BIGINT;
-from_v BIGINT;
-to_v BIGINT;
-BEGIN
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql = sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    unique_vids :=  ARRAY(SELECT DISTINCT UNNEST(vids) ORDER BY 1);
-
-    IF want_symmetric THEN
-        directed = false;
-    ELSE
-        directed = dir;
-    END IF;
-
-    total := array_length(unique_vids, 1);
-
-    -- initializing dmatrix
-    FOR i in 1 .. total LOOP
-        dmatrix_row := dmatrix_row || '+Infinity'::float8;
-    END LOOP;
-    FOR i in 1 .. total LOOP
-    dmatrix := dmatrix || ARRAY[dmatrix_row];
-    dmatrix[i][i] = 0;
-    END LOOP;
-
-    CREATE TEMP TABLE __x___y____temp AS
-        WITH result AS
-            (SELECT unnest(unique_vids) AS vid)
-        SELECT row_number() OVER() AS idx, vid FROM result;
-
-    FOR cell IN SELECT * FROM pgr_dijkstraCostMatrix(sql, unique_vids, directed) LOOP
-        SELECT idx INTO from_v FROM __x___y____temp WHERE vid =  cell.start_vid;
-        SELECT idx INTO to_v FROM __x___y____temp WHERE vid =  cell.end_vid;
-
-        dmatrix[from_v][to_v] = cell.agg_cost;
-        dmatrix[to_v][from_v] = cell.agg_cost;
-    END LOOP;
-
-    DROP TABLE IF EXISTS __x___y____temp;
-    RETURN dmatrix;
-
-    EXCEPTION WHEN others THEN
-       DROP TABLE IF EXISTS __x___y____temp;
-       raise exception '% %', SQLERRM, SQLSTATE;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated function';
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_dijkstra(sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_dijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN) IS 'pgr_dijkstra(Deprecated signature)';
-
-
-
-
-
--- OLD SIGNATURE
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(edges_sql text, source BIGINT, distance FLOAT, directed BOOLEAN, has_rcost BOOLEAN)
-  RETURNS SETOF pgr_costresult AS
-  $BODY$
-  DECLARE
-  has_reverse BOOLEAN;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function';
-
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, FALSE);
-
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-             -- the user says it doesn't have reverse cost but its false
-             -- removing from query
-             RAISE NOTICE 'Contradiction found: has_rcost set to false but reverse_cost column found';
-             sql = 'SELECT id, source, target, cost, -1 as reverse_cost FROM (' || edges_sql || ') __q ';
-         ELSE
-             -- the user says it has reverse cost but its false
-             -- can't do anything
-             RAISE EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query SELECT seq - 1 AS seq, node::integer AS id1, edge::integer AS id2, agg_cost AS cost
-                FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maximumcardinalitymatching(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---INTERNAL FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
-------------------------
--- deprecated signatures
------------------------
-
-COMMENT ON FUNCTION pgr_astar(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_astar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdAstar( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdAstar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdDijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdDijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_dijkstra(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_dijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_drivingDistance(text,  BIGINT,  FLOAT8,  BOOLEAN,  BOOLEAN)
-    IS 'pgr_drivingDistance(Deprecated signature)';
-
-------------------------
--- Renamed /deprecated
------------------------
-COMMENT ON FUNCTION pgr_apspJohnson(TEXT)
-    IS 'pgr_apspJohnson(Renamed function) use pgr_Johnson instead';
-
-COMMENT ON FUNCTION pgr_apspWarshall(text, boolean, boolean)
-    IS 'pgr_apspWarshall(Renamed function) use pgr_floydWarshall instead';
-
-COMMENT ON FUNCTION pgr_kdijkstraPath( text, INTEGER, INTEGER ARRAY, BOOLEAN, BOOLEAN)
-    IS 'pgr_kdijkstraPath(Renamed function) use pgr_dijkstra instead';
-
-COMMENT ON FUNCTION pgr_kdijkstracost( text, INTEGER, INTEGER array, BOOLEAN, BOOLEAN)
-    IS 'pgr_kDijkstraCost(Renamed function) use pgr_dijkstraCost instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-
-
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-
-
-COMMENT ON FUNCTION pgr_gsoc_vrppdtw( text, INTEGER, INTEGER)
-    IS 'pgr_gsoc_vrppdtw(Renamed function) use pgr_pickDeliverEuclidean instead';
-
-------------------------
--- Deprecated functions
------------------------
-
-COMMENT ON FUNCTION pgr_flipedges(geometry[])
-    IS 'pgr_flipedges(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_texttopoints(text,  integer)
-    IS 'pgr_texttopoints(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstovids(pnts geometry[], edges text, tol float8)
-    IS 'pgr_pointstovids(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    IS 'pgr_pointtoedgenode(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstodmatrix(geometry[], integer)
-    IS 'pgr_pointstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidstodmatrix( integer[],  geometry[],  text, float8)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidsToDMatrix(TEXT,  INTEGER[], BOOLEAN, BOOLEAN, BOOLEAN)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-
-
-
-COMMENT ON FUNCTION pgr_getTableName(IN tab text)
-    IS 'pgr_getTableName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_getColumnName(tab text, col text)
-    IS 'pgr_getColumnName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnInTable(tab text, col text)
-    IS 'pgr_isColumnInTable(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnIndexed(tab text, col text)
-    IS 'pgr_isColumnIndexed(Deprecated function)';
-
-
-COMMENT ON FUNCTION pgr_quote_ident(idname text)
-    IS 'pgr_quote_ident(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_versionless(v1 text, v2 text)
-    IS 'pgr_versionless(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_startPoint(g geometry)
-    IS 'pgr_startPoint(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_endPoint(g geometry)
-    IS 'pgr_endPoint(Deprecated function)';
-
-
diff --git a/tools/sql-update-scripts/pgrouting--2.2.4--2.5.2.sql b/tools/sql-update-scripts/pgrouting--2.2.4--2.5.2.sql
deleted file mode 100644
index b944218..0000000
--- a/tools/sql-update-scripts/pgrouting--2.2.4--2.5.2.sql
+++ /dev/null
@@ -1,6527 +0,0 @@
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- pgRouting extension upgrade from 2.2.4 to 2.5.2
--- generated by tools/build-extension-update-files
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-\echo Use "ALTER extension pgrouting update to '2.5.2'" to load this file. \quit
-
-
--------------------------------------
--- remove functions no longer in the 2.5.2 extension
--------------------------------------
-
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,anyarray,bigint,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,anyarray,bigint,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,bigint,anyarray,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,bigint,anyarray,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,bigint,bigint,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,bigint,bigint,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_drivingdistance(text,bigint,double precision,boolean);
-DROP FUNCTION IF EXISTS _pgr_drivingdistance(text,bigint,double precision,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,anyarray,anyarray,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,anyarray,anyarray,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,anyarray,bigint,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,anyarray,bigint,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,bigint,anyarray,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,bigint,anyarray,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,bigint,bigint,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,bigint,bigint,boolean,character,boolean,boolean);
-
-
-------------------------------------------
---    New functions:  2.0
--- Signature change:  2.4
---       Deprecated:  2.4
-------------------------------------------
--- pgr_bddijkstra
--- 2.2.4: {      sql, source_vid, target_vid, directed, has_reverse_cost}   
--- 2.5.2: {edges_sql,  start_vid,    end_vid, directed, has_rcost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vid","end_vid","directed","has_rcost"}'
-WHERE proname = 'pgr_bddijkstra'
-    AND proargnames = '{"sql","source_vid","target_vid","directed","has_reverse_cost"}';
-
-
-------------------------------------------
---   New function: 2.1
--- (types) change: 2.3
-------------------------------------------
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_gsoc_vrppdtw(text,integer,integer);
-DROP FUNCTION IF EXISTS pgr_gsoc_vrppdtw(text,integer,integer);
-
-
-
-
-------------------------------------------
--- New functions on 2.0
--- Signature change on 2.3
--- Deprecated on 2.4
-------------------------------------------
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_astar(text,integer,integer,boolean,boolean);
-DROP FUNCTION IF EXISTS pgr_astar(text,integer,integer,boolean,boolean);
-
-
-
-
-------------------------------------------
---       New functions:  2.1
---    Signature change:  2.4
-------------------------------------------
--- 2.2.4: {edges_sql,start_v,  distance,directed,seq,node,edge,cost,agg_cost}
--- 2.5.2: {edges_sql,start_vid,distance,directed,seq,node,edge,cost,agg_cost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vid","distance","directed","seq","node","edge","cost","agg_cost"}'
-WHERE proname = 'pgr_drivingdistance'
-    AND proargnames = '{"edges_sql","start_v","distance","directed","seq","node","edge","cost","agg_cost"}';
-
-
-------------------------------------------
---       New functions:  2.1
---    Signature change:  2.4
-------------------------------------------
--- 2.2.4: {sql,      start_v,   distance,directed,equicost,seq,from_v,node,edge,cost,agg_cost}
--- 2.5.2: {edges_sql,start_vids,distance,directed,equicost,seq,from_v,node,edge,cost,agg_cost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vids","distance","directed","equicost","seq","from_v","node","edge","cost","agg_cost"}'
-WHERE proname = 'pgr_drivingdistance'
-    AND proargnames = '{"sql","start_v","distance","directed","equicost","seq","from_v","node","edge","cost","agg_cost"}';
-
-
-
-
-
-
-
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
---- pgRouting provides geospatial routing functionality.
---- http://pgrouting.org
---- copyright
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
----
---- This is free software; you can redistribute and/or modify it:
---- the terms of the GNU General Public Licence. See the COPYING file.
---- the terms of the MIT-X Licence. See the COPYING file.
----
---- The following functions have MIT-X licence:
----     pgr_version()
----     pgr_tsp(matrix float8[][], startpt integer, endpt integer DEFAULT -1, OUT seq integer, OUT id integer)
----     _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
----     pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
----
----
---- All other functions are under GNU General Public Licence.
----
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
--- WARNING: Any change in this file must be evaluated for compatibility.
---          Changes cleanly handled by postgis_upgrade.sql are fine,
---          other changes will require a bump in Major version.
---          Currently only function replaceble by CREATE OR REPLACE
---          are cleanly handled.
---
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
---  pgRouting 2.0 types
-
-
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_version()
-RETURNS TABLE(
-        "version" varchar,
-        tag varchar,
-        hash varchar,
-        branch varchar,
-        boost varchar
-    ) AS
-$BODY$
-    SELECT '2.5.2'::varchar AS version,
-        'v2.5.2'::varchar AS tag,
-        '60585f1f7'::varchar AS hash,
-        'master'::varchar AS branch,
-        '1.54.0'::varchar AS boost;
-$BODY$
-LANGUAGE sql IMMUTABLE;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getTableName(IN tab text, IN reportErrs int default 0, IN fnName text default '_pgr_getTableName', OUT sname text,OUT tname text)
-  RETURNS RECORD AS
-$$
-DECLARE
-        naming record;
-        i integer;
-        query text;
-        sn text; -- schema name
-        tn text; -- table name
-        ttype text; --table type for future use
-        err boolean;
-        debuglevel text;
-        var_types text[] = ARRAY['BASE TABLE', 'VIEW'];
-BEGIN
-
-    execute 'show client_min_messages' into debuglevel;
-
-
-    perform _pgr_msg( 0, fnName, 'Checking table ' || tab || ' exists');
-    --RAISE DEBUG 'Checking % exists',tab;
-
-    i := strpos(tab,'.');
-    IF (i <> 0) THEN
-        sn := split_part(tab, '.',1);
-        tn := split_part(tab, '.',2);
-    ELSE
-        sn := current_schema;
-        tn := tab;
-    END IF;
-
-
-   SELECT schema_name INTO sname
-   FROM information_schema.schemata WHERE schema_name = sn;
-
-    IF sname IS NOT NULL THEN -- found schema (as is)
-       SELECT table_name, table_type INTO tname, ttype
-       FROM information_schema.tables
-       WHERE
-                table_type = ANY(var_types) and
-                table_schema = sname and
-                table_name = tn ;
-        IF tname is NULL THEN
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  = ANY(var_types) and
-                table_schema = sname and
-                table_name = lower(tn) ORDER BY table_name;
-        END IF;
-    END IF;
-    IF sname is NULL or tname is NULL THEN --schema not found or table not found
-        SELECT schema_name INTO sname
-        FROM information_schema.schemata
-        WHERE schema_name = lower(sn) ;
-
-        IF sname IS NOT NULL THEN -- found schema (with lower caps)
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  =  ANY(var_types) and
-                table_schema = sname and
-                table_name= tn ;
-
-           IF tname IS NULL THEN
-                SELECT table_name, table_type INTO tname, ttype
-                FROM information_schema.tables
-                WHERE
-                    table_type  =  ANY(var_types) and
-                    table_schema = sname and
-                    table_name= lower(tn) ;
-           END IF;
-        END IF;
-    END IF;
-   err = (sname IS NULL OR tname IS NULL);
-   perform _pgr_onError(err, reportErrs, fnName, 'Table ' || tab ||' not found',' Check your table name', 'Table '|| tab || ' found');
-
-END;
-$$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(sname text, tname text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(col) into cname;
-
-    IF cname is null  THEN
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(lower(col))  into cname;
-    END if;
-
-    err = cname is null;
-
-    perform _pgr_onError(err, reportErrs, fnName,  'Column '|| col ||' not found', ' Check your column name','Column '|| col || ' found');
-    RETURN cname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(tab text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-
-    select * into cname from _pgr_getColumnName(sname,tname,col,reportErrs, fnName);
-    RETURN cname;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    select * from _pgr_getColumnName(tab,col,0, '_pgr_isColumnInTable') into cname;
-    return cname is not null;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(sname text, tname text, cname text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    pkey text;
-BEGIN
-    SELECT
-          pg_attribute.attname into pkey
-         --  format_type(pg_attribute.atttypid, pg_attribute.atttypmod)
-          FROM pg_index, pg_class, pg_attribute
-          WHERE
-                  pg_class.oid = _pgr_quote_ident(sname||'.'||tname)::regclass AND
-                  indrelid = pg_class.oid AND
-                  pg_attribute.attrelid = pg_class.oid AND
-                  pg_attribute.attnum = any(pg_index.indkey)
-                  AND indisprimary;
-
-    IF pkey=cname then
-          RETURN TRUE;
-    END IF;
-
-    SELECT a.index_name,
-           b.attname,
-           b.attnum,
-           a.indisunique,
-           a.indisprimary
-      INTO rec
-      FROM ( SELECT a.indrelid,
-                    a.indisunique,
-                    a.indisprimary,
-                    c.relname index_name,
-                    unnest(a.indkey) index_num
-               FROM pg_index a,
-                    pg_class b,
-                    pg_class c,
-                    pg_namespace d
-              WHERE b.relname=tname
-                AND b.relnamespace=d.oid
-                AND d.nspname=sname
-                AND b.oid=a.indrelid
-                AND a.indexrelid=c.oid
-           ) a,
-           pg_attribute b
-     WHERE a.indrelid = b.attrelid
-       AND a.index_num = b.attnum
-       AND b.attname = cname
-  ORDER BY a.index_name,
-           a.index_num;
-
-  RETURN FOUND;
-  EXCEPTION WHEN OTHERS THEN
-    perform _pgr_onError( true, reportErrs, fnName,
-    'Error when checking for the postgres system attributes', SQLERR);
-    RETURN FALSE;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(tab text, col text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    sname text;
-    tname text;
-    cname text;
-    pkey text;
-    value boolean;
-BEGIN
-    SELECT * into naming FROM _pgr_getTableName(tab, 0, fnName);
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    SELECT * into cname from _pgr_getColumnName(sname, tname, col, 0, fnName) ;
-    IF cname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    select * into value  from _pgr_isColumnIndexed(sname, tname, cname, reportErrs, fnName);
-    return value;
-END
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-create or replace function _pgr_quote_ident(idname text)
-    returns text as
-$body$
-declare
-    t text[];
-    pgver text;
-
-begin
-    pgver := regexp_replace(version(), E'^PostgreSQL ([^ ]+)[ ,].*$', E'\\1');
-
-    if _pgr_versionless(pgver, '9.2') then
-        select into t array_agg(quote_ident(term)) from
-            (select nullif(unnest, '') as term
-               from unnest(string_to_array(idname, '.'))) as foo;
-    else
-        select into t array_agg(quote_ident(term)) from
-            (select unnest(string_to_array(idname, '.', '')) as term) as foo;
-    end if;
-    return array_to_string(t, '.');
-end;
-$body$
-language plpgsql immutable;
-
-
-CREATE OR REPLACE FUNCTION _pgr_versionless(v1 text, v2 text)
-  RETURNS boolean AS
-$BODY$
-
-
-declare
-    v1a text[];
-    v2a text[];
-    nv1 integer;
-    nv2 integer;
-    ne1 integer;
-    ne2 integer;
-
-begin
-    -- separate components into an array, like:
-    -- '2.1.0-beta3dev'  =>  {2,1,0,beta3dev}
-    v1a := regexp_matches(v1, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-    v2a := regexp_matches(v2, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-
-    -- convert modifiers to numbers for comparison
-    -- we do not delineate between alpha1, alpha2, alpha3, etc
-    ne1 := case when v1a[4] is null or v1a[4]='' then 5
-                when v1a[4] ilike 'rc%' then 4
-                when v1a[4] ilike 'beta%' then 3
-                when v1a[4] ilike 'alpha%' then 2
-                when v1a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    ne2 := case when v2a[4] is null or v2a[4]='' then 5
-                when v2a[4] ilike 'rc%' then 4
-                when v2a[4] ilike 'beta%' then 3
-                when v2a[4] ilike 'alpha%' then 2
-                when v2a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    nv1 := v1a[1]::integer * 10000 +
-           coalesce(v1a[2], '0')::integer * 1000 +
-           coalesce(v1a[3], '0')::integer *  100 + ne1;
-    nv2 := v2a[1]::integer * 10000 +
-           coalesce(v2a[2], '0')::integer * 1000 +
-           coalesce(v2a[3], '0')::integer *  100 + ne2;
-
-    --raise notice 'nv1: %, nv2: %, ne1: %, ne2: %', nv1, nv2, ne1, ne2;
-
-    return nv1 < nv2;
-end;
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-create or replace function _pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_startpoint(st_geometryn(g,1));
-    else
-        return st_startpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function _pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_endpoint(st_geometryn(g,1));
-    else
-        return st_endpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_parameter_check(fn text, sql text, big boolean default false)
-  RETURNS bool AS
-  $BODY$
-
-  DECLARE
-  rec record;
-  rec1 record;
-  has_rcost boolean;
-  safesql text;
-  BEGIN
-    IF (big) THEN
-       RAISE EXCEPTION 'This function is for old style functions';
-    END IF;
-
-    -- checking query is executable
-    BEGIN
-      safesql =  'select * from ('||sql||' ) AS __a__ limit 1';
-      execute safesql into rec;
-      EXCEPTION
-        WHEN OTHERS THEN
-            RAISE EXCEPTION 'Could not execute query please verify syntax of: '
-              USING HINT = sql;
-    END;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('dijkstra','astar') THEN
-        BEGIN
-          execute 'select id,source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: id, source, target, cost';
-        END;
-        execute 'select pg_typeof(id)::text as id_type, pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.id_type in ('integer'::text))
-              AND (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Error, columns ''source'', ''target'' must be of type int4, ''cost'' must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    IF fn IN ('astar') THEN
-        BEGIN
-          execute 'select x1,y1,x2,y2  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: x1,y1, x2,y2';
-        END;
-        execute 'select pg_typeof(x1)::text as x1_type, pg_typeof(y1)::text as y1_type, pg_typeof(x2)::text as x2_type, pg_typeof(y2)::text as y2_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.x1_type = 'double precision'::text)
-              AND (rec.y1_type = 'double precision'::text)
-              AND (rec.x2_type = 'double precision'::text)
-              AND (rec.y2_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Columns: x1, y1, x2, y2 must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('johnson') THEN
-        BEGIN
-          execute 'select source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING HINT = 'Please veryfy the column names: id, source, target, cost',
-                         ERRCODE = 'XX000';
-        END;
-
-        execute 'select pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Support for source,target columns only of type: integer. Support for Cost: double precision'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    -- Checking the data types of the optional reverse_cost";
-    has_rcost := false;
-    IF fn IN ('johnson','dijkstra','astar') THEN
-      BEGIN
-        execute 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||safesql||' ) AS __b__ limit 1 ' into rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-            return has_rcost;
-      END;
-      if (has_rcost) then
-        IF (big) then
-           IF  not (rec1.rev_type in ('bigint'::text, 'integer'::text, 'smallint'::text, 'double precision'::text, 'real'::text)) then
-             RAISE EXCEPTION 'Illegar type in optional parameter reverse_cost.'
-             USING ERRCODE = 'XX000';
-           END IF;
-        ELSE -- Version 2.0.0 is more restrictive
-           IF (rec1.rev_type != 'double precision') then
-             RAISE EXCEPTION 'Illegal type in optional parameter reverse_cost, must be of type float8'
-             USING ERRCODE = 'XX000';
-           END IF;
-        END IF;
-      end if;
-      return true;
-    END IF;
-    -- just for keeps
-    return true;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_onError(
-  IN errCond boolean,  -- true there is an error
-  IN reportErrs int,   -- 0, 1 or 2
-  IN fnName text,      -- function name that generates the error
-  IN msgerr text,      -- error message
-  IN hinto text default 'No hint', -- hint help
-  IN msgok text default 'OK')      -- message if everything is ok
-  RETURNS void AS
-$BODY$
-BEGIN
-  if errCond=true then
-     if reportErrs=0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-     else
-       if reportErrs = 2 then
-         raise notice '----> PGR ERROR in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-         raise raise_exception;
-       else
-         raise notice '----> PGR NOTICE in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-       end if;
-     end if;
-  else
-       raise debug 'PGR ----> %: %',fnName,msgok;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_msg(IN msgKind int, IN fnName text, IN msg text default '---->OK')
-  RETURNS void AS
-$BODY$
-BEGIN
-  if msgKind = 0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msg;
-  else
-       raise notice '----> PGR NOTICE in %: %',fnName,msg;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(sname text, tname text, cname text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    EXECUTE 'select data_type  from information_schema.columns '
-            || 'where table_name = '||quote_literal(tname)
-                 || ' and table_schema=' || quote_literal(sname)
-                 || ' and column_name='||quote_literal(cname)
-       into ctype;
-    err = ctype is null;
-    perform _pgr_onError(err, reportErrs, fnName,
-            'Type of Column '|| cname ||' not found',
-            'Check your column name',
-            'OK: Type of Column '|| cname || ' is ' || ctype);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(tab text, col text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-    select * into cname from _pgr_getColumnName(tab,col,reportErrs, fnName) ;
-    select * into ctype from _pgr_getColumnType(sname,tname,cname,reportErrs, fnName);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_get_statement(o_sql text)
-RETURNS text AS
-$BODY$
-DECLARE
-sql TEXT;
-BEGIN
-    EXECUTE 'SELECT statement FROM pg_prepared_statements WHERE name ='  || quote_literal(o_sql) || ' limit 1 ' INTO sql;
-    IF (sql IS NULL) THEN
-      RETURN   o_sql;
-    ELSE
-      RETURN  regexp_replace(sql, '(.)* as ', '', 'i');
-    END IF;
-END
-$BODY$
-LANGUAGE plpgsql STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_checkVertTab(vertname text, columnsArr  text[],
-    IN reportErrs int default 1, IN fnName text default '_pgr_checkVertTab',
-    OUT sname text,OUT vname text)
-RETURNS record AS
-$BODY$
-DECLARE
-    cname text;
-    colname text;
-    naming record;
-    debuglevel text;
-    err  boolean;
-    msgKind int;
-
-BEGIN
-    msgKind = 0; -- debug_
-    execute 'show client_min_messages' into debuglevel;
-
-    perform _pgr_msg(msgKind, fnName, 'Checking table ' || vertname || ' exists');
-       select * from _pgr_getTableName(vertname, 0, fnName) into naming;
-       sname=naming.sname;
-       vname=naming.tname;
-       err = sname is NULL or vname is NULL;
-    perform _pgr_onError( err, 2, fnName,
-          'Vertex Table: ' || vertname || ' not found',
-          'Please create ' || vertname || ' using  _pgr_createTopology() or pgr_createVerticesTable()',
-          'Vertex Table: ' || vertname || ' found');
-
-
-    perform _pgr_msg(msgKind, fnName, 'Checking columns of ' || vertname);
-      FOREACH cname IN ARRAY columnsArr
-      loop
-         select _pgr_getcolumnName(vertname, cname, 0, fnName) into colname;
-         if colname is null then
-           perform _pgr_msg(msgKind, fnName, 'Adding column ' || cname || ' in ' || vertname);
-           set client_min_messages  to warning;
-                execute 'ALTER TABLE '||_pgr_quote_ident(vertname)||' ADD COLUMN '||cname|| ' integer';
-           execute 'set client_min_messages  to '|| debuglevel;
-           perform _pgr_msg(msgKind, fnName);
-         end if;
-      end loop;
-    perform _pgr_msg(msgKind, fnName, 'Finished checking columns of ' || vertname);
-
-    perform _pgr_createIndex(vertname , 'id' , 'btree', reportErrs, fnName);
- END
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(
-    sname text, tname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    debuglevel text;
-    naming record;
-    tabname text;
-    query text;
-    msgKind int;
-BEGIN
-  msgKind = 0; -- debug_
-
-  execute 'show client_min_messages' into debuglevel;
-  tabname=_pgr_quote_ident(sname||'.'||tname);
-  perform _pgr_msg(msgKind, fnName, 'Checking ' || colname || ' column in ' || tabname || ' is indexed');
-    IF (_pgr_isColumnIndexed(sname,tname,colname, 0, fnName)) then
-       perform _pgr_msg(msgKind, fnName);
-    else
-      if indext = 'gist' then
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using gist('||quote_ident(colname)||')';
-      else
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using btree('||quote_ident(colname)||')';
-      end if;
-      perform _pgr_msg(msgKind, fnName, 'Adding index ' || tabname || '_' ||  colname || '_idx');
-      perform _pgr_msg(msgKind, fnName, ' Using ' ||  query);
-      set client_min_messages  to warning;
-      BEGIN
-        execute query;
-        EXCEPTION WHEN others THEN
-          perform _pgr_onError( true, reportErrs, fnName,
-            'Could not create index on:' || colname, SQLERRM);
-      END;
-      execute 'set client_min_messages  to '|| debuglevel;
-      perform _pgr_msg(msgKind, fnName);
-    END IF;
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(tabname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    naming record;
-    sname text;
-    tname text;
-
-BEGIN
-    select * from _pgr_getTableName(tabname, 2, fnName)  into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    execute _pgr_createIndex(sname, tname, colname, indext, reportErrs, fnName);
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pointToId(
-    point geometry,
-    tolerance double precision,
-    vertname text,
-    srid integer)
-
-  RETURNS bigint AS
-$BODY$
-DECLARE
-    rec record;
-    pid bigint;
-
-BEGIN
-    EXECUTE 'SELECT ST_Distance(
-        the_geom,
-        ST_GeomFromText(ST_AsText('
-                || quote_literal(point::text)
-                || '),'
-            || srid ||')) AS d, id, the_geom
-    FROM '||_pgr_quote_ident(vertname)||'
-    WHERE ST_DWithin(
-        the_geom,
-        ST_GeomFromText(
-            ST_AsText(' || quote_literal(point::text) ||'),
-            ' || srid || '),' || tolerance||')
-    ORDER BY d
-    LIMIT 1' INTO rec ;
-    IF rec.id IS NOT NULL THEN
-        pid := rec.id;
-    ELSE
-        execute 'INSERT INTO '||_pgr_quote_ident(vertname)||' (the_geom) VALUES ('||quote_literal(point::text)||')';
-        pid := lastval();
-END IF;
-
-RETURN pid;
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'many_to_many_dijkstra'
-LANGUAGE c VOLATILE;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer, OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstra(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(Many to Many)';
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraVia(
-    edges_sql TEXT,
-    via_vertices ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    strict BOOLEAN DEFAULT FALSE,
-    U_turn_on_edge BOOLEAN DEFAULT TRUE,
-
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'dijkstraVia'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_johnson(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'johnson'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_floydWarshall(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'floydWarshall'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'astarManyToMany'
-LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, normal:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to Many)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true, normal:=false) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to Many)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid ANYARRAY,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-    equicost BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'many_withPointsDD'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_withPointsDD($1, $2, ARRAY[$3]::BIGINT[], $4, $5, $6, $7, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vids anyarray,
-    distance FLOAT,
-    directed BOOLEAN DEFAULT TRUE,
-    equicost BOOLEAN DEFAULT FALSE,
-    OUT seq integer,
-    OUT from_v  bigint,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'driving_many_to_dist'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vid bigint,
-    distance FLOAT8,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq integer,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer, directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'kshortest_path'
-    LANGUAGE c STABLE STRICT;
-
--- V2 the graph is directed and there are no heap paths
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid integer, end_vid integer, k integer, has_rcost boolean)
-  RETURNS SETOF pgr_costresult3 AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated signature of pgr_ksp';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql::text, false);
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_rcost) THEN
-           -- user says that it has reverse_cost but its not true
-           RAISE EXCEPTION 'has_reverse_cost set to true but reverse_cost not found';
-         ELSE
-           -- user says that it does not have reverse_cost but it does have it
-           -- to ignore we remove reverse_cost from the query
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         END IF;
-      END IF;
-
-      RETURN query SELECT ((row_number() over()) -1)::integer  AS seq,  (path_id - 1)::integer AS id1, node::integer AS id2, edge::integer AS id3, cost
-            FROM _pgr_ksp(sql::text, start_vid, end_vid, k, TRUE, FALSE) WHERE path_id <= k;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer,
-  directed boolean default true, heap_paths boolean default false,
-  --directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  BEGIN
-         RETURN query SELECT *
-                FROM _pgr_ksp(edges_sql::text, start_vid, end_vid, k, directed, heap_paths);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsKSP(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    k INTEGER,
-
-    directed BOOLEAN DEFAULT TRUE,
-    heap_paths BOOLEAN DEFAULT FALSE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER, OUT path_id INTEGER, OUT path_seq INTEGER,
-    OUT node BIGINT, OUT edge BIGINT,
-    OUT cost FLOAT, OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'withPoints_ksp'
-    LANGUAGE c STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_unnest_matrix(matrix float8[][], OUT start_vid integer, OUT end_vid integer, out agg_cost float8)
-RETURNS SETOF record AS
-
-$body$
-DECLARE
-
-m float8[];
-
-BEGIN
-    start_vid = 1;
-    foreach m slice 1 in  ARRAY matrix
-    LOOP
-        end_vid = 1;
-        foreach agg_cost in  ARRAY m
-        LOOP
-            RETURN next;
-            end_vid = end_vid + 1;
-        END LOOP;
-        start_vid = start_vid + 1;
-    END LOOP;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_tsp(
-    matrix float8[][],
-    startpt INTEGER,
-    endpt INTEGER DEFAULT -1,
-    OUT seq INTEGER,
-    OUT id INTEGER)
-RETURNS SETOF record AS
-$body$
-DECLARE
-table_sql TEXT;
-debuglevel TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(float8[][], integer, integer)';
-
-    CREATE TEMP TABLE ___tmp2 ON COMMIT DROP AS SELECT * FROM _pgr_unnest_matrix( matrix );
-
-
-    startpt := startpt + 1;
-    IF endpt = -1 THEN endpt := startpt;
-    END IF;
-
-
-    RETURN QUERY
-    WITH
-    result AS (
-        SELECT * FROM pgr_TSP(
-        $$SELECT * FROM ___tmp2 $$,
-        startpt, endpt,
-
-        tries_per_temperature :=  500 :: INTEGER,
-        max_changes_per_temperature := 30 :: INTEGER,
-        max_consecutive_non_changes := 500 :: INTEGER,
-
-        randomize:=false)
-    )
-    SELECT (row_number() over(ORDER BY result.seq) - 1)::INTEGER AS seq, (result.node - 1)::INTEGER AS id
-
-    FROM result WHERE NOT(result.node = startpt AND result.seq != 1);
-
-    DROP TABLE ___tmp2;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-
-
-CREATE OR  REPLACE FUNCTION pgr_tsp(sql text, start_id INTEGER, end_id INTEGER default (-1))
-returns setof pgr_costResult as
-$body$
-DECLARE
-table_sql TEXT;
-rec RECORD;
-debuglevel TEXT;
-n BIGINT;
-
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(sql, integer, integer)';
-
-    table_sql := 'CREATE TEMP TABLE ___tmp ON COMMIT DROP AS ' || sql ;
-    EXECUTE table_sql;
-
-
-    BEGIN
-        EXECUTE 'SELECT id, x, y FROM ___tmp' INTO rec;
-        EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                USING ERRCODE = 'XX000',
-                HINT = 'Please verify the column names: id, x, y';
-    END;
-
-    EXECUTE
-    'SELECT
-        pg_typeof(id)::text as id_type,
-        pg_typeof(x)::text as x_type,
-        pg_typeof(y)::text as y_type FROM ___tmp' INTO rec;
-
-
-    IF NOT((rec.id_type in ('integer'::text))
-        AND (rec.x_type = 'double precision'::text)
-        AND (rec.y_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION '''id'' must be of type INTEGER, ''x'' ad ''y'' must be of type FLOAT'
-            USING ERRCODE = 'XX000';
-    END IF;
-
-    EXECUTE 'SELECT count(*) AS n FROM (' || sql || ') AS __a__' INTO rec;
-    n = rec.n;
-
-    RETURN query
-        SELECT (seq - 1)::INTEGER AS seq, node::INTEGER AS id1, node::INTEGER AS id2, cost
-        FROM pgr_eucledianTSP(sql, start_id, end_id,
-
-            tries_per_temperature :=  500 * n :: INTEGER,
-            max_changes_per_temperature := 60 * n :: INTEGER,
-            max_consecutive_non_changes := 500 * n :: INTEGER,
-
-            randomize := false) WHERE seq <= n;
-    DROP TABLE ___tmp;
-
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-create or replace function _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
-  as
-$body$
-declare
-    sql text;
-    r record;
-
-begin
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    sql := 'with nodes as (' || sqlin || ')
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j, st_distance(st_makepoint(a.x, a.y), st_makepoint(b.x, b.y)) as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i';
-
-    for r in execute sql loop
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-
-end;
-$body$
-language plpgsql stable cost 10;
-
-
-CREATE OR REPLACE FUNCTION pgr_TSP(
-    matrix_row_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'newTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_eucledianTSP(
-    coordinates_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'eucledianTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_alphashape(sql text, alpha float8 DEFAULT 0, OUT x float8, OUT y float8)
-    RETURNS SETOF record
-    AS '$libdir/libpgrouting-2.5', 'alphashape'
-    LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pointsAsPolygon(query varchar, alpha float8 DEFAULT 0)
-	RETURNS geometry AS
-	$$
-	DECLARE
-		r record;
-		geoms geometry[];
-		vertex_result record;
-		i int;
-		n int;
-		spos int;
-		q text;
-		x float8[];
-		y float8[];
-
-	BEGIN
-		geoms := array[]::geometry[];
-		i := 1;
-
-		FOR vertex_result IN EXECUTE 'SELECT x, y FROM pgr_alphashape('''|| query || ''', ' || alpha || ')'
-		LOOP
-			x[i] = vertex_result.x;
-			y[i] = vertex_result.y;
-			i := i+1;
-		END LOOP;
-
-		n := i;
-		IF n = 1 THEN
-			RAISE NOTICE 'n = 1';
-			RETURN NULL;
-		END IF;
-
-		spos := 1;
-		q := 'SELECT ST_GeometryFromText(''POLYGON((';
-		FOR i IN 1..n LOOP
-			IF x[i] IS NULL AND y[i] IS NULL THEN
-				q := q || ', ' || x[spos] || ' ' || y[spos] || '))'',0) AS geom;';
-				EXECUTE q INTO r;
-				geoms := geoms || array[r.geom];
-				q := '';
-			ELSE
-				IF q = '' THEN
-					spos := i;
-					q := 'SELECT ST_GeometryFromText(''POLYGON((';
-				END IF;
-				IF i = spos THEN
-					q := q || x[spos] || ' ' || y[spos];
-				ELSE
-					q := q || ', ' || x[i] || ' ' || y[i];
-				END IF;
-			END IF;
-		END LOOP;
-
-		RETURN ST_BuildArea(ST_Collect(geoms));
-	END;
-	$$
-	LANGUAGE 'plpgsql' VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'bd_astar'
-LANGUAGE C VOLATILE;
-
-
-
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed:=true, only_cost:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    BOOLEAN,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false);
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to Many)';
-
-
-
--- one to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to Many)';
-
-
--- bdDijkstra MANY TO MANY
-CREATE OR REPLACE FUNCTION _pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bdDijkstra'
-LANGUAGE c VOLATILE;
-
-
-
--- ONE TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- TODO directed BOOLEAN DEFAULT TRUE,  on version 3
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, false) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, true) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_vid integer,
-    target_vid integer,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_vertex'
-LANGUAGE 'c' IMMUTABLE;
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_edge'
-LANGUAGE 'c' IMMUTABLE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || edges_sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        -- no restrictions then its a dijkstra
-        RETURN query SELECT a.seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_dijkstra(new_sql, start_vid, end_vid, directed) a;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, start_vid, end_vid, directed, has_rcost, restrictions_sql);
-    RETURN;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trspViaVertices(
-    edges_sql TEXT,
-    via_vids ANYARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult3 AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            new_sql :=
-               'WITH old_sql AS (' || edges_sql || ')' ||
-                '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        RETURN query SELECT (row_number() over())::INTEGER, path_id:: INTEGER, node::INTEGER,
-            (CASE WHEN edge = -2 THEN -1 ELSE edge END)::INTEGER, cost
-            FROM pgr_dijkstraVia(new_sql, via_vids, directed, strict:=true) WHERE edge != -1;
-        RETURN;
-    END IF;
-
-
-    -- make the call without contradiction from part of the user
-    RETURN query SELECT * FROM _pgr_trspViaVertices(new_sql, via_vids::INTEGER[], directed, has_rcost, restrictions_sql);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-
-    new_sql := sql;
-    IF (has_reverse != has_reverse_cost) THEN  -- user contradiction
-        IF (has_reverse) THEN
-            -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) THEN
-        -- no restrictions then its a with points
-        RETURN query SELECT a.seq-1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_withpoints(new_sql,
-            '(SELECT 1 as pid, ' || source_eid || 'as edge_id, ' || source_pos || '::float8 as fraction)'
-            || ' UNION '
-            || '(SELECT 2, ' || target_eid || ', ' || target_pos || ')' ::TEXT,
-            -1, -2, directed) a;
-        -- WHERE node != -2;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, source_eid, source_pos, target_eid, target_pos, directed, has_reverse_cost, turn_restrict_sql);
-    RETURN;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-create or replace function _pgr_trspViaVertices(sql text, vids integer[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    lrra boolean := false;
-    seq integer := 0;
-    seq2 integer := 0;
-
-begin
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(vids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from _pgr_trsp(sql, vids[i], vids[i+1], directed, has_rcost, turn_restrict_sql) as a loop
-            -- filter out the individual path ends except the last one
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --raise notice 'rr: %', rr;
-            if rr.id3 = -1 then
-                lrr := rr;
-                lrra := true;
-            else
-                seq := seq + 1;
-                rr.seq := seq;
-                return next rr;
-            end if;
-        end loop;
-    end loop;
-
-    if lrra then
-        seq := seq + 1;
-        lrr.seq := seq;
-        return next lrr;
-    end if;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-
-----------------------------------------------------------------------------------------------------------
-
-create or replace function pgr_trspViaEdges(sql text, eids integer[], pcts float8[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    first boolean := true;
-    seq integer := 0;
-    seq2 integer :=0;
-    has_reverse BOOLEAN;
-    point_is_vertex BOOLEAN := false;
-    edges_sql TEXT;
-    f float;
-
-begin
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql := sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (NOT has_rcost) THEN
-            -- user does not want to use reverse cost column
-            edges_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    FOREACH f IN ARRAY pcts LOOP
-        IF f in (0,1) THEN
-           point_is_vertex := true;
-        END IF;
-    END LOOP;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) AND NOT point_is_vertex THEN
-        -- no restrictions then its a _pgr_withPointsVia
-        RETURN query SELECT a.seq::INTEGER, path_id::INTEGER AS id1, node::INTEGER AS id2, edge::INTEGER AS id3, cost
-        FROM _pgr_withPointsVia(edges_sql, eids, pcts, directed) a;
-        RETURN;
-    END IF;
-
-    if array_length(eids, 1) != array_length(pcts, 1) then
-        raise exception 'The length of arrays eids and pcts must be the same!';
-    end if;
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(eids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from pgr_trsp(edges_sql,
-                                  eids[i], pcts[i],
-                                  eids[i+1], pcts[i+1],
-                                  directed,
-                                  has_rcost,
-                                  turn_restrict_sql) as a loop
-            -- combine intermediate via costs when cost is split across
-            -- two parts of a segment because it stops it and
-            -- restarts the next leg also on it
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --
-            -- there are multiple condition we have to deal with
-            -- between the end of one leg and start of the next
-            -- 1. same vertex_id. edge_id=-1; drop record with edge_id=-1
-            -- means: path ends on vertex
-            -- NOTICE:  rr: (19,1,44570022,-1,0)
-            -- NOTICE:  rr: (0,2,44570022,1768045,2.89691196717448)
-            -- 2. vertex_id=-1; sum cost components
-            -- means: path end/starts with the segment
-            -- NOTICE:  rr: (11,2,44569628,1775909,9.32885885148532)
-            -- NOTICE:  rr: (0,3,-1,1775909,0.771386350984395)
-
-            --raise notice 'rr: %', rr;
-            if first then
-                lrr := rr;
-                first := false;
-            else
-                if lrr.id3 = -1 then
-                    lrr := rr;
-                elsif lrr.id3 = rr.id3 then
-                    lrr.cost := lrr.cost + rr.cost;
-                    if rr.id2 = -1 then
-                        rr.id2 := lrr.id2;
-                    end if;
-                else
-                    seq := seq + 1;
-                    lrr.seq := seq;
-                    return next lrr;
-                    lrr := rr;
-                end if;
-            end if;
-        end loop;
-    end loop;
-
-    seq := seq + 1;
-    lrr.seq := seq;
-    return next lrr;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-----------------------------
---    MANY TO MANY
-----------------------------
-
-
-CREATE OR REPLACE FUNCTION _pgr_maxflow(
-    edges_sql TEXT,
-    sources ANYARRAY,
-    targets ANYARRAY,
-    algorithm INTEGER DEFAULT 1,
-    only_flow BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'max_flow_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-
-------------------------------------
--- 3 pgr_edmondsKarp
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 2 boykov_kolmogorov
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 1 pgr_pushRelabel
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT flow
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], algorithm := 1, only_flow := true);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], $3::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, $2::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxCardinalityMatch(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'edge_disjoint_paths_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    bigint,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    IN directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_contractGraph(
-    edges_sql TEXT,
-    contraction_order BIGINT[],
-    max_cycles integer DEFAULT 1,
-    forbidden_vertices BIGINT[] DEFAULT ARRAY[]::BIGINT[],
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT type TEXT,
-    OUT id BIGINT,
-    OUT contracted_vertices BIGINT[],
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost float)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'contractGraph'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliver(
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_cell_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliver'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliverEuclidean (
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliverEuclidean'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_vrpOneDepot(
-    TEXT, -- customers_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_sql
-    INTEGER, -- depot_id
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-orders_sql TEXT;
-trucks_sql TEXT;
-matrix_sql TEXT;
-final_sql TEXT;
-BEGIN
-
-    orders_sql = $$WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    pickups AS (
-        SELECT id, x AS p_x, y AS p_y, open_time AS p_open, close_time AS p_close, service_time AS p_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vrp_orders.id AS id, order_unit AS demand, pickups.id AS p_node_id, p_x, p_y, p_open, p_close, p_service,
-    vrp_orders.id AS d_node_id, x AS d_x, y AS d_y, open_time AS d_open, close_time AS d_close, service_time AS d_service
-    FROM vrp_orders, pickups
-    WHERE vrp_orders.id != $$ || $4;
-
-
-    trucks_sql = $$ WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    vrp_vehicles AS ($$ || $2 || $$ ),
-    starts AS (
-        SELECT id AS start_node_id, x AS start_x, y AS start_y, open_time AS start_open, close_time AS start_close, service_time AS start_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vehicle_id AS id, capacity, starts.* FROM vrp_vehicles, starts;
-    $$;
-
-    final_sql = '
-    SELECT * FROM _pgr_pickDeliver(
-            $$' || orders_sql || '$$,
-            $$' || trucks_sql || '$$,
-            $$' || $3 || '$$,
-            max_cycles := 2,
-            initial_sol := 4 ); ';
-
-    RAISE DEBUG '%', orders_sql;
-    RAISE DEBUG '%', trucks_sql;
-    RAISE DEBUG '%', $3;
-    RAISE DEBUG '%', final_sql;
-
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
------------------------------------------------------------------------
--- Core function for vrp with sigle depot computation
--- See README for description
------------------------------------------------------------------------
---
---
-
-create or replace function pgr_vrpOneDepot(
-	order_sql text,
-	vehicle_sql text,
-	cost_sql text,
-	depot_id integer,
-
-	OUT oid integer,
-	OUT opos integer,
-	OUT vid integer,
-	OUT tarrival integer,
-	OUT tdepart integer)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT order_id::INTEGER, stop_seq::INTEGER, vehicle_id::INTEGER, arrival_time::INTEGER, departure_time::INTEGER
-    FROM _pgr_vrpOneDepot($1, $2,
-       '
-            SELECT src_id AS start_vid, dest_id AS end_vid, traveltime AS agg_cost FROM ('||$3||') AS a
-       ',
-        $4
-    ) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_gsoc_vrppdtw(
-    customers_sql TEXT,
-    max_vehicles INTEGER,
-    capacity FLOAT,
-    speed FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-
-    OUT seq INTEGER,
-    OUT vehicle_id INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT stop_id BIGINT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-    orders_sql TEXT;
-    vehicles_sql TEXT;
-    final_sql TEXT;
-BEGIN
-    orders_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        pickups AS (
-            SELECT id, demand, x as p_x, y as p_y, opentime as p_open, closetime as p_close, servicetime as p_service
-            FROM  customer_data WHERE pindex = 0 AND id != 0
-        ),
-        deliveries AS (
-            SELECT pindex AS id, x as d_x, y as d_y, opentime as d_open, closetime as d_close, servicetime as d_service
-            FROM  customer_data WHERE dindex = 0 AND id != 0
-        )
-        SELECT * FROM pickups JOIN deliveries USING(id) ORDER BY pickups.id
-    $$;
-
-    vehicles_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ )
-        SELECT id, x AS start_x, y AS start_y,
-            opentime AS start_open, closetime AS start_close, $$ ||
-            capacity || $$ AS capacity, $$ || max_vehicles || $$ AS number, $$ || speed || $$ AS speed
-            FROM customer_data WHERE id = 0 LIMIT 1
-        $$;
---  seq | vehicle_id | vehicle_seq | stop_id | travel_time | arrival_time | wait_time | service_time | departure_time
-    final_sql = $$ WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        p_deliver AS (SELECT * FROM _pgr_pickDeliverEuclidean('$$ || orders_sql || $$',  '$$ || vehicles_sql || $$',  1, $$ || max_cycles || $$ )),
-        picks AS (SELECT p_deliver.*, pindex, dindex, id AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 2)),
-        delivers AS (SELECT p_deliver.*, pindex, dindex, dindex AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 3)),
-        depots AS (SELECT p_deliver.*, 0 as pindex, 0 as dindex, 0 AS the_id FROM p_deliver WHERE (stop_type IN (-1,1,6))),
-        the_union AS (SELECT * FROM picks UNION SELECT * FROM delivers UNION SELECT * from depots)
-
-        SELECT (row_number() over(ORDER BY a.seq))::INTEGER, vehicle_seq, a.stop_seq, the_id::BIGINT, a.travel_time, a.arrival_time, a.wait_time, a.service_time, a.departure_time
-        FROM (SELECT * FROM the_union) AS a ORDER BY a.seq
-        $$;
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-CREATE OR REPLACE FUNCTION pgr_gsoc_vrppdtw(
-    sql text,
-    vehicle_num INTEGER,
-    capacity INTEGER
-)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-customers_sql TEXT;
-BEGIN
-    RETURN query
-         SELECT a.seq, vehicle_id::INTEGER AS id1, stop_id::INTEGER AS id2, departure_time AS cost
-        FROM _pgr_gsoc_vrppdtw($1, $2, $3, 1, 30) AS a WHERE vehicle_id NOT IN (-2);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION _pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN,
-    driving_side CHAR,
-    details BOOLEAN,
-
-    only_cost BOOLEAN DEFAULT false, -- gets path
-    normal BOOLEAN DEFAULT true, -- false for many to onu
-
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'withPoints'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], ARRAY[$4]::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], ARRAY[$4]::bigint[], $5, $6, $7, FALSE, FALSE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], $4::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], $4::BIGINT[], $5,  $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION  _pgr_withPointsVia(
-    sql text,
-    via_edges bigint[],
-    fraction float[],
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  has_rcost boolean;
-  sql_new_vertices text := ' ';
-  sql_on_vertex text;
-  v_union text := ' ';
-  dummyrec record;
-  rec1 record;
-  via_vertices int[];
-  sql_safe text;
-  new_edges text;
-  BEGIN
-     BEGIN
-        sql_safe = 'SELECT id, source, target, cost, reverse_cost FROM ('|| sql || ') AS __a';
-
-        EXECUTE 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||sql_safe||' ) AS __b__ limit 1 ' INTO rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-     END;
-
-
-      IF array_length(via_edges, 1) != array_length(fraction, 1) then
-        RAISE EXCEPTION 'The length of via_edges is different of length of via_edges';
-      END IF;
-
-      FOR i IN 1 .. array_length(via_edges, 1)
-      LOOP
-          IF fraction[i] = 0 THEN
-              sql_on_vertex := 'SELECT source FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.source;
-          ELSE IF fraction[i] = 1 THEN
-              sql_on_vertex := 'SELECT target FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.target;
-          ELSE
-              via_vertices[i] = -i;
-              IF has_rcost THEN
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost,
-                              reverse_cost * (1 - ' || fraction[i] || ')  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost,
-                              reverse_cost *  ' || fraction[i] || '  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' where id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               ELSE
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               END IF;
-          END IF;
-          END IF;
-     END LOOP;
-
-     IF sql_new_vertices = ' ' THEN
-         new_edges := sql;
-     ELSE
-         IF has_rcost THEN
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost,
-                         lead(cost) OVER w  - cost AS reverse_cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL),
-                   second_part AS ( SELECT * FROM (SELECT id, lead(source) OVER w  AS source, source as target,
-                         reverse_cost - lead(reverse_cost) OVER w  AS cost,
-                         reverse_cost - lead(reverse_cost) OVER w  AS reverse_cost
-                      FROM  the_union  WHERE target > 0 and reverse_cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY reverse_cost ASC) ) as n2
-                      WHERE source IS NOT NULL),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part)
-                             UNION
-                       (SELECT * FROM second_part) ) _union )
-                  SELECT *  FROM more_union';
-         ELSE
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL ),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part) ) _union )
-                  SELECT *  FROM more_union';
-          END IF;
-      END IF;
-
- -- raise notice '%', new_edges;
-     sql_new_vertices := sql_new_vertices || v_union || ' (' || sql || ')';
-     RETURN query SELECT *
-         FROM pgr_dijkstraVia(new_edges, via_vertices, directed, has_rcost);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_lineGraph(
-    TEXT, -- edges_sql
-    directed BOOLEAN DEFAULT true,
-    OUT seq INTEGER,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost FLOAT,
-    OUT reverse_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'lineGraph'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_connectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'connectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_strongComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'strongComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_biconnectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the edge in the component
-    OUT n_seq INTEGER,          -- nth_seq of the edge in the component
-    OUT edge BIGINT)            -- the number of the edge
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'biconnectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_articulationPoints(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'articulationPoints'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bridges(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT edge BIGINT)            -- the number of the edge 
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bridges'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createtopology(edge_table text, tolerance double precision,
-		   the_geom text default 'the_geom', id text default 'id',
-		   source text default 'source', target text default 'target',rows_where text default 'true',
-		   clean boolean default FALSE)
-RETURNS VARCHAR AS
-$BODY$
-
-DECLARE
-    points record;
-    sridinfo record;
-    source_id bigint;
-    target_id bigint;
-    totcount bigint;
-    rowcount bigint;
-    srid integer;
-    sql text;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    notincluded integer;
-    i integer;
-    naming record;
-    info record;
-    flag boolean;
-    query text;
-    idtype text;
-    gtype text;
-    sourcetype text;
-    targettype text;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-    msgKind int;
-    emptied BOOLEAN;
-
-BEGIN
-    msgKind = 1; -- notice
-    fnName = 'pgr_createTopology';
-    raise notice 'PROCESSING:';
-    raise notice 'pgr_createTopology(''%'', %, ''%'', ''%'', ''%'', ''%'', rows_where := ''%'', clean := %)',edge_table,tolerance,the_geom,id,source,target,rows_where, clean;
-    execute 'show client_min_messages' into debuglevel;
-
-
-    raise notice 'Performing checks, please wait .....';
-
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-        sname=naming.sname;
-        tname=naming.tname;
-        tabname=sname||'.'||tname;
-        vname=tname||'_vertices_pgr';
-        vertname= sname||'.'||vname;
-        rows_where = ' AND ('||rows_where||')';
-      raise DEBUG '     --> OK';
-
-
-      raise debug 'Checking column names in edge table';
-        select * into idname     from _pgr_getColumnName(sname, tname,id,2,fnName);
-        select * into sourcename from _pgr_getColumnName(sname, tname,source,2,fnName);
-        select * into targetname from _pgr_getColumnName(sname, tname,target,2,fnName);
-        select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2,fnName);
-
-
-        err = sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname;
-        perform _pgr_onError( err, 2, fnName,
-               'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-	       'Column names are OK');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking column types in edge table';
-        select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-        select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-        select * into idtype from _pgr_getColumnType(sname,tname,idname,1, fnName);
-
-        err = idtype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column id:'|| idname, ' Expected type of '|| idname || ' is integer,smallint or bigint but '||idtype||' was found');
-
-        err = sourcetype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column source:'|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-        err = targettype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column target:'|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or bigint but '||targettype||' was found');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         raise debug '%',query;
-         EXECUTE query INTO sridinfo;
-
-         err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-         perform _pgr_onError(err, 2, fnName,
-	     'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-
-         srid := sridinfo.srid;
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking and creating indices in edge table';
-        perform _pgr_createIndex(sname, tname , idname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-
-        gname=quote_ident(gname);
-        idname=quote_ident(idname);
-        sourcename=quote_ident(sourcename);
-        targetname=quote_ident(targetname);
-      raise DEBUG '     --> OK';
-
-
-
-
-
-    BEGIN
-        -- issue #193 & issue #210 & #213
-        -- this sql is for trying out the where clause
-        -- the select * is to avoid any column name conflicts
-        -- limit 1, just try on first record
-        -- if the where clasuse is ill formed it will be caught in the exception
-        sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-        EXECUTE sql into dummyRec;
-        -- end
-
-        -- if above where clasue works this one should work
-        -- any error will be caught by the exception also
-        sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NOT NULL AND '||
-	    idname||' IS NOT NULL)=false '||rows_where;
-        EXECUTE SQL  into notincluded;
-
-        if clean then
-            raise debug 'Cleaning previous Topology ';
-               execute 'UPDATE ' || _pgr_quote_ident(tabname) ||
-               ' SET '||sourcename||' = NULL,'||targetname||' = NULL';
-        else
-            raise debug 'Creating topology for edges with non assigned topology';
-            if rows_where=' AND (true)' then
-                rows_where=  ' and ('||quote_ident(sourcename)||' is null or '||quote_ident(targetname)||' is  null)';
-            end if;
-        end if;
-        -- my thoery is that the select Count(*) will never go through here
-        EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-             RAISE NOTICE '%',sql;
-             RETURN 'FAIL';
-    END;
-
-    BEGIN
-         raise DEBUG 'initializing %',vertname;
-         execute 'select * from _pgr_getTableName('||quote_literal(vertname)
-                                                  || ',0,' || quote_literal(fnName) ||' )' into naming;
-         emptied = false;
-         set client_min_messages  to warning;
-         IF sname=naming.sname AND vname=naming.tname  THEN
-            if clean then
-                execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-                execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-                emptied = true;
-            end if;
-         ELSE -- table doesn't exist
-            execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-            emptied = true;
-         END IF;
-         IF (emptied) THEN
-             execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-	         quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-             perform _pgr_createIndex(vertname , 'the_geom'::text , 'gist'::text);
-         END IF;
-         execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id"}''::text[])' into naming;
-         execute 'set client_min_messages  to '|| debuglevel;
-         raise DEBUG  '  ------>OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: something went wrong when initializing the verties table';
-             RETURN 'FAIL';
-    END;
-
-
-
-    raise notice 'Creating Topology, Please wait...';
-        rowcount := 0;
-        FOR points IN EXECUTE 'SELECT ' || idname || '::bigint AS id,'
-            || ' _pgr_StartPoint(' || gname || ') AS source,'
-            || ' _pgr_EndPoint('   || gname || ') AS target'
-            || ' FROM '  || _pgr_quote_ident(tabname)
-            || ' WHERE ' || gname || ' IS NOT NULL AND ' || idname||' IS NOT NULL '||rows_where
-        LOOP
-
-            rowcount := rowcount + 1;
-            IF rowcount % 1000 = 0 THEN
-                RAISE NOTICE '% edges processed', rowcount;
-            END IF;
-
-
-            source_id := _pgr_pointToId(points.source, tolerance,vertname,srid);
-            target_id := _pgr_pointToId(points.target, tolerance,vertname,srid);
-            BEGIN
-                sql := 'UPDATE ' || _pgr_quote_ident(tabname) ||
-                    ' SET '||sourcename||' = '|| source_id::text || ','||targetname||' = ' || target_id::text ||
-                    ' WHERE ' || idname || ' =  ' || points.id::text;
-
-                IF sql IS NULL THEN
-                    RAISE NOTICE 'WARNING: UPDATE % SET source = %, target = % WHERE % = % ', tabname, source_id::text, target_id::text, idname,  points.id::text;
-                ELSE
-                    EXECUTE sql;
-                END IF;
-                EXCEPTION WHEN OTHERS THEN
-                    RAISE NOTICE '%', SQLERRM;
-                    RAISE NOTICE '%',sql;
-                    RETURN 'FAIL';
-            end;
-        END LOOP;
-        raise notice '-------------> TOPOLOGY CREATED FOR  % edges', rowcount;
-        RAISE NOTICE 'Rows with NULL geometry or NULL id: %',notincluded;
-        Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname), _pgr_quote_ident(vertname);
-        raise notice '----------------------------------------------';
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_createTopology(text, double precision,text,text,text,text,text,boolean)
-IS 'args: edge_table,tolerance, the_geom:=''the_geom'',source:=''source'', target:=''target'',rows_where:=''true'' - fills columns source and target in the geometry table and creates a vertices table for selected rows';
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
-RETURNS character varying AS
-$BODY$
-
-DECLARE
-    points record;
-    seg record;
-    naming record;
-    sridinfo record;
-    srid integer;
-    ecnt integer;
-    vertname text;
-    sname text;
-    tname text;
-    vname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    geotype text;
-    gname text;
-    tabName text;
-    flag boolean ;
-    query text;
-    selectionquery text;
-    i integer;
-    tot integer;
-    NumIsolated integer;
-    numdeadends integer;
-    numgaps integer;
-    NumCrossing integer;
-    numRings integer;
-    debuglevel text;
-
-
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeGraph(''%'',%,''%'',''%'',''%'',''%'',''%'')',edge_table,tolerance,the_geom,id,source,target,rows_where;
-  raise notice 'Performing checks, please wait ...';
-  execute 'show client_min_messages' into debuglevel;
-
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-    raise DEBUG '     --> OK';
-
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","cnt","chk"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET cnt=0 ,chk=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into idname     from _pgr_getColumnName(sname, tname,id,2);
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname, 2,
-                       'pgr_analyzeGraph',  'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-                       'Column names are OK');
-
-        raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-   BEGIN
-       raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         EXECUTE QUERY INTO sridinfo;
-
-         perform _pgr_onError( sridinfo IS NULL OR sridinfo.srid IS NULL,2,
-                 'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname,
-                 'SRID of '||gname||' is '||sridinfo.srid);
-
-         IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-             RAISE NOTICE ' Can not determine the srid of the geometry "%" in table %', the_geom,tabname;
-             RETURN 'FAIL';
-         END IF;
-         srid := sridinfo.srid;
-         raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM;--issue 210,211,213
-             RAISE NOTICE 'ERROR: something went wrong when checking for SRID of % in table %', the_geom,tabname;
-             RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-       raise debug 'Checking  indices in edge table';
-       perform _pgr_createIndex(tabname , idname , 'btree');
-       perform _pgr_createIndex(tabname , sourcename , 'btree');
-       perform _pgr_createIndex(tabname , targetname , 'btree');
-       perform _pgr_createIndex(tabname , gname , 'gist');
-
-       gname=quote_ident(gname);
-       sourcename=quote_ident(sourcename);
-       targetname=quote_ident(targetname);
-       idname=quote_ident(idname);
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking indices';
-          RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-        query='select count(*) from '||_pgr_quote_ident(tabname)||' where true  '||rows_where;
-        EXECUTE query into ecnt;
-        raise DEBUG '-->Rows Where condition: OK';
-        raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-            RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-            RAISE NOTICE 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-            RAISE NOTICE '%',query;
-            RETURN 'FAIL';
-    END;
-
-    selectionquery ='with
-           selectedRows as( (select '||sourcename||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||')
-                           union
-                           (select '||targetname||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||'))';
-
-
-
-
-
-   BEGIN
-       RAISE NOTICE 'Analyzing for dead ends. Please wait...';
-       query= 'with countingsource as (select a.'||sourcename||' as id,count(*) as cnts
-               from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||sourcename||')
-                     ,countingtarget as (select a.'||targetname||' as id,count(*) as cntt
-                    from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||targetname||')
-                   ,totalcount as (select id,case when cnts is null and cntt is null then 0
-                                                   when cnts is null then cntt
-                                                   when cntt is null then cnts
-                                                   else cnts+cntt end as totcnt
-                                   from ('||_pgr_quote_ident(vertname)||' as a left
-                                   join countingsource as t using(id) ) left join countingtarget using(id))
-               update '||_pgr_quote_ident(vertname)||' as a set cnt=totcnt from totalcount as b where a.id=b.id';
-       raise debug '%',query;
-       execute query;
-       query=selectionquery||'
-              SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE cnt=1 and id in (select id from selectedRows)';
-       raise debug '%',query;
-       execute query  INTO numdeadends;
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-          RAISE NOTICE 'ERROR: something went wrong when analizing for dead ends';
-          RETURN 'FAIL';
-   END;
-
-
-
-    BEGIN
-          RAISE NOTICE 'Analyzing for gaps. Please wait...';
-          query = 'with
-                   buffer as (select id,st_buffer(the_geom,'||tolerance||') as buff from '||_pgr_quote_ident(vertname)||' where cnt=1)
-                   ,veryclose as (select b.id,st_crosses(a.'||gname||',b.buff) as flag
-                   from  (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) as a
-                   join buffer as b on (a.'||gname||'&&b.buff)
-                   where '||sourcename||'!=b.id and '||targetname||'!=b.id )
-                   update '||_pgr_quote_ident(vertname)||' set chk=1 where id in (select distinct id from veryclose where flag=true)';
-          raise debug '%' ,query;
-          execute query;
-          GET DIAGNOSTICS  numgaps= ROW_COUNT;
-          raise DEBUG '     --> OK';
-          EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for gaps';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for isolated edges. Please wait...';
-        query=selectionquery|| ' SELECT count(*) FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' )  as a,
-                                                 '||_pgr_quote_ident(vertname)||' as b,
-                                                 '||_pgr_quote_ident(vertname)||' as c
-                            WHERE b.id in (select id from selectedRows) and a.'||sourcename||' =b.id
-                            AND b.cnt=1 AND a.'||targetname||' =c.id
-                            AND c.cnt=1';
-        raise debug '%' ,query;
-        execute query  INTO NumIsolated;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for isolated edges';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for ring geometries. Please wait...';
-        execute 'SELECT geometrytype('||gname||')  FROM '||_pgr_quote_ident(tabname) limit 1 into geotype;
-        IF (geotype='MULTILINESTRING') THEN
-            query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                 WHERE true  '||rows_where||' and st_isRing(st_linemerge('||gname||'))';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        ELSE query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                  WHERE true  '||rows_where||' and st_isRing('||gname||')';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        END IF;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for ring geometries';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for intersections. Please wait...';
-        query = 'select count(*) from (select distinct case when a.'||idname||' < b.'||idname||' then a.'||idname||'
-                                                        else b.'||idname||' end,
-                                                   case when a.'||idname||' < b.'||idname||' then b.'||idname||'
-                                                        else a.'||idname||' end
-                                    FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as a
-                                    JOIN (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as b
-                                    ON (a.'|| gname||' && b.'||gname||')
-                                    WHERE a.'||idname||' != b.'||idname|| '
-                                        and (a.'||sourcename||' in (b.'||sourcename||',b.'||targetname||')
-                                              or a.'||targetname||' in (b.'||sourcename||',b.'||targetname||')) = false
-                                        and st_intersects(a.'||gname||', b.'||gname||')=true) as d ';
-        raise debug '%' ,query;
-        execute query  INTO numCrossing;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for intersections';
-            RETURN 'FAIL';
-    END;
-
-
-
-
-    RAISE NOTICE '            ANALYSIS RESULTS FOR SELECTED EDGES:';
-    RAISE NOTICE '                  Isolated segments: %', NumIsolated;
-    RAISE NOTICE '                          Dead ends: %', numdeadends;
-    RAISE NOTICE 'Potential gaps found near dead ends: %', numgaps;
-    RAISE NOTICE '             Intersections detected: %',numCrossing;
-    RAISE NOTICE '                    Ring geometries: %',numRings;
-
-
-    RETURN 'OK';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_analyzeGraph(text,double precision,text,text,text,text,text) IS 'args: edge_table, tolerance,the_geom:=''the_geom'',id:=''id'',source column:=''source'', target column:=''target'' rows_where:=''true'' - creates a vertices table based on the geometry for selected rows';
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzeOneway(
-   edge_table text,
-   s_in_rules TEXT[],
-   s_out_rules TEXT[],
-   t_in_rules TEXT[],
-   t_out_rules TEXT[],
-   two_way_if_null boolean default true,
-   oneway text default 'oneway',
-   source text default 'source',
-   target text default 'target')
-  RETURNS text AS
-$BODY$
-
-
-DECLARE
-    rule text;
-    ecnt integer;
-    instr text;
-    naming record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    owname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    vertname text;
-    debuglevel text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeOneway(''%'',''%'',''%'',''%'',''%'',''%'',''%'',''%'',%)',
-		edge_table, s_in_rules , s_out_rules, t_in_rules, t_out_rules, oneway, source ,target,two_way_if_null ;
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    raise DEBUG '     --> OK';
-    EXCEPTION WHEN raise_exception THEN
-      RAISE NOTICE 'ERROR: something went wrong checking the table name';
-      RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","ein","eout"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET eout=0 ,ein=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into owname from _pgr_getColumnName(sname, tname,oneway,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,owname) or  targetname=owname, 2,
-                       '_pgr_createToplogy',  'Two columns share the same name', 'Parameter names for oneway,source and target  must be different',
-                       'Column names are OK');
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-
-
-    RAISE NOTICE 'Analyzing graph for one way street errors.';
-
-    rule := CASE WHEN two_way_if_null
-            THEN owname || ' IS NULL OR '
-            ELSE '' END;
-
-    instr := '''' || array_to_string(s_in_rules, ''',''') || '''';
-       EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-      from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-     where a.id=b.'|| sourcename;
-
-    RAISE NOTICE 'Analysis 25%% complete ...';
-
-    instr := '''' || array_to_string(t_in_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 50%% complete ...';
-
-    instr := '''' || array_to_string(s_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-        where a.id=b.'|| sourcename;
-    RAISE NOTICE 'Analysis 75%% complete ...';
-
-    instr := '''' || array_to_string(t_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 100%% complete ...';
-
-    EXECUTE 'SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE ein=0 or eout=0' INTO ecnt;
-
-    RAISE NOTICE 'Found % potential problems in directionality' ,ecnt;
-
-    RETURN 'OK';
-
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_analyzeOneway(text,TEXT[],TEXT[], TEXT[],TEXT[],boolean,text,text,text)
-IS 'args:edge_table , s_in_rules , s_out_rules, t_in_rules , t_out_rules, two_way_if_null:= true, oneway:=''oneway'',source:= ''source'',target:=''target'' - Analizes the directionality of the edges based on the rules';
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createverticestable(
-   edge_table text,
-   the_geom text DEFAULT 'the_geom'::text,
-   source text DEFAULT 'source'::text,
-   target text DEFAULT 'target'::text,
-    rows_where text DEFAULT 'true'::text
-)
-  RETURNS text AS
-$BODY$
-DECLARE
-    naming record;
-    sridinfo record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    sourcename text;
-    targetname text;
-    query text;
-    ecnt bigint;
-    srid integer;
-    sourcetype text;
-    targettype text;
-    sql text;
-    totcount integer;
-    i integer;
-    notincluded integer;
-    included integer;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-
-
-BEGIN
-  fnName = 'pgr_createVerticesTable';
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_createVerticesTable(''%'',''%'',''%'',''%'',''%'')',edge_table,the_geom,source,target,rows_where;
-  execute 'show client_min_messages' into debuglevel;
-
-  raise notice 'Performing checks, please wait .....';
-
-  RAISE DEBUG 'Checking % exists',edge_table;
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-  raise debug '--> Edge table exists: OK';
-
-  raise debug 'Checking column names';
-    select * into sourcename from _pgr_getColumnName(sname, tname,source,2, fnName);
-    select * into targetname from _pgr_getColumnName(sname, tname,target,2, fnName);
-    select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2, fnName);
-
-
-    err = sourcename in (targetname,gname) or  targetname=gname;
-    perform _pgr_onError(err, 2, fnName,
-        'Two columns share the same name', 'Parameter names for the_geom,source and target  must be different');
-  raise debug '--> Column names: OK';
-
-  raise debug 'Checking column types in edge table';
-    select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-    select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-
-
-    err = sourcetype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column source: '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-    err = targettype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column target: '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found');
-
-  raise debug '-->Column types:OK';
-
-  raise debug 'Checking SRID of geometry column';
-     query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-        || ' FROM ' || _pgr_quote_ident(tabname)
-        || ' WHERE ' || quote_ident(gname)
-        || ' IS NOT NULL LIMIT 1';
-     raise debug '%',query;
-     EXECUTE query INTO sridinfo;
-
-     err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-     perform _pgr_onError(err, 2, fnName,
-         'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-     srid := sridinfo.srid;
-  raise DEBUG '     --> OK';
-
-  raise debug 'Checking and creating Indices';
-     perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-  raise DEBUG '-->Check and create indices: OK';
-
-     gname=quote_ident(gname);
-     sourcename=quote_ident(sourcename);
-     targetname=quote_ident(targetname);
-
-
-  BEGIN
-  raise debug 'Checking Condition';
-    -- issue #193 & issue #210 & #213
-    -- this sql is for trying out the where clause
-    -- the select * is to avoid any column name conflicts
-    -- limit 1, just try on first record
-    -- if the where clasuse is ill formed it will be caught in the exception
-    sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-    EXECUTE sql into dummyRec;
-    -- end
-
-    -- if above where clasue works this one should work
-    -- any error will be caught by the exception also
-    sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NULL or '||
-		sourcename||' is null or '||targetname||' is null)=true '||rows_where;
-    raise debug '%',sql;
-    EXECUTE SQL  into notincluded;
-    EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-
-
-
-  BEGIN
-     raise DEBUG 'initializing %',vertname;
-       execute 'select * from _pgr_getTableName('||quote_literal(vertname)||',0)' into naming;
-       IF sname=naming.sname  AND vname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-       ELSE
-           set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-       END IF;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-                quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-       execute 'CREATE INDEX '||quote_ident(vname||'_the_geom_idx')||' ON '||_pgr_quote_ident(vertname)||'  USING GIST (the_geom)';
-       execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-       EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Initializing vertex table';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise notice 'Populating %, please wait...',vertname;
-       sql= 'with
-		lines as ((select distinct '||sourcename||' as id, _pgr_startpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-		                  ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||')
-			union (select distinct '||targetname||' as id,_pgr_endpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-			          ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||'))
-		,numberedLines as (select row_number() OVER (ORDER BY id) AS i,* from lines )
-		,maxid as (select id,max(i) as maxi from numberedLines group by id)
-		insert into '||_pgr_quote_ident(vertname)||'(id,the_geom)  (select id,the_geom  from numberedLines join maxid using(id) where i=maxi order by id)';
-       RAISE debug '%',sql;
-       execute sql;
-       GET DIAGNOSTICS totcount = ROW_COUNT;
-
-       sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' a, '||_pgr_quote_ident(vertname)||' b
-            where '||sourcename||'=b.id and '|| targetname||' in (select id from '||_pgr_quote_ident(vertname)||')';
-       RAISE debug '%',sql;
-       execute sql into included;
-
-
-
-       execute 'select max(id) from '||_pgr_quote_ident(vertname) into ecnt;
-       execute 'SELECT setval('||quote_literal(vertname||'_id_seq')||','||coalesce(ecnt,1)||' , false)';
-       raise notice '  ----->   VERTICES TABLE CREATED WITH  % VERTICES', totcount;
-       raise notice '                                       FOR   %  EDGES', included+notincluded;
-       RAISE NOTICE '  Edges with NULL geometry,source or target: %',notincluded;
-       RAISE NOTICE '                            Edges processed: %',included;
-       Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname),_pgr_quote_ident(vertname);
-       raise notice '----------------------------------------------';
-    END;
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_createVerticesTable(text,text,text,text,text)
-IS 'args: edge_table, the_geom:=''the_geom'',source:=''source'', target:=''target'' rows_where:=''true'' - creates a vertices table based on the source and target identifiers for selected rows';
-
-
-CREATE OR REPLACE FUNCTION pgr_nodeNetwork(edge_table text, tolerance double precision,
-			id text default 'id', the_geom text default 'the_geom', table_ending text default 'noded',
-            rows_where text DEFAULT ''::text, outall boolean DEFAULT false) RETURNS text AS
-$BODY$
-DECLARE
-	
-	p_num int := 0;
-	p_ret text := '';
-    pgis_ver_old boolean := _pgr_versionless(postgis_lib_version(), '2.1.0.0');
-    vst_line_substring text;
-    vst_line_locate_point text;
-    intab text;
-    outtab text;
-    n_pkey text;
-    n_geom text;
-    naming record;
-    sname text;
-    tname text;
-    outname text;
-    srid integer;
-    sridinfo record;
-    splits bigint;
-    touched bigint;
-    untouched bigint;
-    geomtype text;
-    debuglevel text;
-    rows_where text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_nodeNetwork(''%'', %, ''%'', ''%'', ''%'', ''%'',  %)',
-    edge_table, tolerance, id,  the_geom, table_ending, rows_where, outall;
-  raise notice 'Performing checks, please wait .....';
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',0)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-	RAISE NOTICE '-------> % not found',edge_table;
-        RETURN 'FAIL';
-    ELSE
-	RAISE DEBUG '  -----> OK';
-    END IF;
-
-    intab=sname||'.'||tname;
-    outname=tname||'_'||table_ending;
-    outtab= sname||'.'||outname;
-    rows_where = CASE WHEN length(rows_where) > 2 and not outall THEN ' AND (' || rows_where || ')' ELSE '' END;
-    rows_where = CASE WHEN length(rows_where) > 2 THEN ' WHERE (' || rows_where || ')' ELSE '' END;
-  END;
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',id,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(id)||')' INTO n_pkey;
-       IF n_pkey is NULL then
-          raise notice  'ERROR: id column "%"  not found in %',id,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',the_geom,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(the_geom)||')' INTO n_geom;
-       IF n_geom is NULL then
-          raise notice  'ERROR: the_geom  column "%"  not found in %',the_geom,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-  IF n_pkey=n_geom THEN
-	raise notice  'ERROR: id and the_geom columns have the same name "%" in %',n_pkey,intab;
-        RETURN 'FAIL';
-  END IF;
-
-  BEGIN
-       	raise DEBUG 'Checking the SRID of the geometry "%"', n_geom;
-       	EXECUTE 'SELECT ST_SRID(' || quote_ident(n_geom) || ') as srid '
-          		|| ' FROM ' || _pgr_quote_ident(intab)
-          		|| ' WHERE ' || quote_ident(n_geom)
-          		|| ' IS NOT NULL LIMIT 1' INTO sridinfo;
-       	IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-        	RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           	RETURN 'FAIL';
-       	END IF;
-       	srid := sridinfo.srid;
-       	raise DEBUG '  -----> SRID found %',srid;
-       	EXCEPTION WHEN OTHERS THEN
-           		RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           		RETURN 'FAIL';
-  END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_pkey,intab;
-      if (_pgr_isColumnIndexed(intab,n_pkey)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding  index "%_%_idx".',n_pkey,intab;
-
-	set client_min_messages  to warning;
-        execute 'create  index '||tname||'_'||n_pkey||'_idx on '||_pgr_quote_ident(intab)||' using btree('||quote_ident(n_pkey)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_geom,intab;
-      if (_pgr_iscolumnindexed(intab,n_geom)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding unique index "%_%_gidx".',intab,n_geom;
-	set client_min_messages  to warning;
-        execute 'CREATE INDEX '
-            || quote_ident(tname || '_' || n_geom || '_gidx' )
-            || ' ON ' || _pgr_quote_ident(intab)
-            || ' USING gist (' || quote_ident(n_geom) || ')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
----------------
-    BEGIN
-       raise DEBUG 'initializing %',outtab;
-       execute 'select * from _pgr_getTableName('||quote_literal(outtab)||',0)' into naming;
-       IF sname=naming.sname  AND outname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(outtab)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(outname)||','||quote_literal(n_geom)||')';
-       ELSE
-	   set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(outtab)||' (id bigserial PRIMARY KEY,old_id integer,sub_id integer,
-								source bigint,target bigint)';
-       END IF;
-       execute 'select geometrytype('||quote_ident(n_geom)||') from  '||_pgr_quote_ident(intab)||' limit 1' into geomtype;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(outname)||','||
-                quote_literal(n_geom)||','|| srid||', '||quote_literal(geomtype)||', 2)';
-       execute 'CREATE INDEX '||quote_ident(outname||'_'||n_geom||'_idx')||' ON '||_pgr_quote_ident(outtab)||'  USING GIST ('||quote_ident(n_geom)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-    END;
-----------------
-
-
-  raise notice 'Processing, please wait .....';
-
-
-    if pgis_ver_old then
-        vst_line_substring    := 'st_line_substring';
-        vst_line_locate_point := 'st_line_locate_point';
-    else
-        vst_line_substring    := 'st_linesubstring';
-        vst_line_locate_point := 'st_linelocatepoint';
-    end if;
-
---    -- First creates temp table with intersection points
-    p_ret = 'create temp table intergeom on commit drop as (
-        select l1.' || quote_ident(n_pkey) || ' as l1id,
-               l2.' || quote_ident(n_pkey) || ' as l2id,
-	       l1.' || quote_ident(n_geom) || ' as line,
-	       _pgr_startpoint(l2.' || quote_ident(n_geom) || ') as source,
-	       _pgr_endpoint(l2.' || quote_ident(n_geom) || ') as target,
-               st_intersection(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ') as geom
-        from (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l1
-             join (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l2
-             on (st_dwithin(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ', ' || tolerance || '))'||
-        'where l1.' || quote_ident(n_pkey) || ' <> l2.' || quote_ident(n_pkey)||' and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false  )';
-    raise debug '%',p_ret;
-    EXECUTE p_ret;
-
-    -- second temp table with locus (index of intersection point on the line)
-    -- to avoid updating the previous table
-    -- we keep only intersection points occurring onto the line, not at one of its ends
---    drop table if exists inter_loc;
-
---HAD TO CHANGE THIS QUERY
--- p_ret= 'create temp table inter_loc on commit drop as (
---        select l1id, l2id, ' || vst_line_locate_point || '(line,point) as locus from (
---        select DISTINCT l1id, l2id, line, (ST_DumpPoints(geom)).geom as point from intergeom) as foo
---        where ' || vst_line_locate_point || '(line,point)<>0 and ' || vst_line_locate_point || '(line,point)<>1)';
-    p_ret= 'create temp table inter_loc on commit drop as ( select * from (
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,source) as locus from intergeom)
-         union
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,target) as locus from intergeom)) as foo
-        where locus<>0 and locus<>1)';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-
-    -- index on l1id
-    create index inter_loc_id_idx on inter_loc(l1id);
-
-    -- Then computes the intersection on the lines subset, which is much smaller than full set
-    -- as there are very few intersection points
-
---- outab needs to be formally created with id, old_id, subid,the_geom, source,target
----  so it can be inmediatly be used with createTopology
-
---   EXECUTE 'drop table if exists ' || _pgr_quote_ident(outtab);
---   EXECUTE 'create table ' || _pgr_quote_ident(outtab) || ' as
-     P_RET = 'insert into '||_pgr_quote_ident(outtab)||' (old_id,sub_id,'||quote_ident(n_geom)||') (  with cut_locations as (
-           select l1id as lid, locus
-           from inter_loc
-           -- then generates start and end locus for each line that have to be cut buy a location point
-           UNION ALL
-           select i.l1id  as lid, 0 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           UNION ALL
-           select i.l1id  as lid, 1 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           order by lid, locus
-       ),
-       -- we generate a row_number index column for each input line
-       -- to be able to self-join the table to cut a line between two consecutive locations
-       loc_with_idx as (
-           select lid, locus, row_number() over (partition by lid order by locus) as idx
-           from cut_locations
-       )
-       -- finally, each original line is cut with consecutive locations using linear referencing functions
-       select l.' || quote_ident(n_pkey) || ', loc1.idx as sub_id, ' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus) as ' || quote_ident(n_geom) || '
-       from loc_with_idx loc1 join loc_with_idx loc2 using (lid) join ' || _pgr_quote_ident(intab) || ' l on (l.' || quote_ident(n_pkey) || ' = loc1.lid)
-       where loc2.idx = loc1.idx+1
-           -- keeps only linestring geometries
-           and geometryType(' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus)) = ''LINESTRING'') ';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-	GET DIAGNOSTICS splits = ROW_COUNT;
-        execute 'with diff as (select distinct old_id from '||_pgr_quote_ident(outtab)||' )
-                 select count(*) from diff' into touched;
-	-- here, it misses all original line that did not need to be cut by intersection points: these lines
-	-- are already clean
-	-- inserts them in the final result: all lines which gid is not in the res table.
-	EXECUTE 'insert into ' || _pgr_quote_ident(outtab) || ' (old_id , sub_id, ' || quote_ident(n_geom) || ')
-                ( with used as (select distinct old_id from '|| _pgr_quote_ident(outtab)||')
-		select ' ||  quote_ident(n_pkey) || ', 1 as sub_id, ' ||  quote_ident(n_geom) ||
-		' from '|| _pgr_quote_ident(intab) ||' where  '||quote_ident(n_pkey)||' not in (select * from used)' || rows_where || ')';
-	GET DIAGNOSTICS untouched = ROW_COUNT;
-
-	raise NOTICE '  Split Edges: %', touched;
-	raise NOTICE ' Untouched Edges: %', untouched;
-	raise NOTICE '     Total original Edges: %', touched+untouched;
-        RAISE NOTICE ' Edges generated: %', splits;
-	raise NOTICE ' Untouched Edges: %',untouched;
-	raise NOTICE '       Total New segments: %', splits+untouched;
-        RAISE NOTICE ' New Table: %', outtab;
-        RAISE NOTICE '----------------------------------';
-
-    drop table  if exists intergeom;
-    drop table if exists inter_loc;
-    RETURN 'OK';
-END;
-$BODY$
-    LANGUAGE 'plpgsql' VOLATILE STRICT COST 100;
-
-
-COMMENT ON FUNCTION pgr_nodeNetwork(text, double precision, text, text, text, text, boolean )
- IS  'edge_table, tolerance, id:=''id'', the_geom:=''the_geom'', table_ending:=''noded'' ';
-
-
-CREATE OR REPLACE FUNCTION pgr_labelGraph(
-                edge_table text,
-                id text default 'id',
-                source text default 'source',
-                target text default 'target',
-                subgraph text default 'subgraph',
-                rows_where text default 'true'
-        )
-        RETURNS character varying AS
-$BODY$
-
-DECLARE
-        naming record;
-        schema_name text;
-        table_name text;
-        garbage text;
-        incre integer;
-        table_schema_name text;
-        query text;
-        ecnt integer;
-        sql1 text;
-        rec1 record;
-        sql2 text;
-        rec2 record;
-        rec_count record;
-        rec_single record;
-        graph_id integer;
-        gids int [];
-
-BEGIN
-        raise notice 'Processing:';
-        raise notice 'pgr_brokenGraph(''%'',''%'',''%'',''%'',''%'',''%'')', edge_table,id,source,target,subgraph,rows_where;
-        raise notice 'Performing initial checks, please hold on ...';
-
-        Raise Notice 'Starting - Checking table ...';
-        BEGIN
-                raise debug 'Checking % table existance', edge_table;
-                execute 'select * from pgr_getTableName('|| quote_literal(edge_table) ||')' into naming;
-                schema_name = naming.sname;
-                table_name = naming.tname;
-                table_schema_name = schema_name||'.'||table_name;
-                IF schema_name is null then
-                        raise notice 'no schema';
-                        return 'FAIL';
-                else
-                        if table_name is null then
-                                raise notice 'no table';
-                                return 'FAIL';
-                        end if;
-                end if;
-        END;
-        Raise Notice 'Ending - Checking table';
-
-        Raise Notice 'Starting - Checking columns';
-        BEGIN
-                raise debug 'Checking exitance of necessary columns inside % table', edge_table;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(id) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no id column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(source) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no source column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(target) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no target column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(subgraph) ||')' into naming;
-                if naming.pgr_iscolumnintable = 't' then
-                        raise notice 'subgraph column already in the table';
-                        return 'FAIL';
-                end if;
-        END;
-        Raise Notice 'Ending - Checking columns';
-
-        Raise Notice 'Starting - Checking rows_where condition';
-        BEGIN
-                raise debug 'Checking rows_where condition';
-                query='select count(*) from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where;
-                execute query into ecnt;
-                raise debug '-->Rows where condition: OK';
-                raise debug '    --> OK';
-                EXCEPTION WHEN OTHERS THEN
-                        raise notice 'Got %', SQLERRM;
-                        Raise notice 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-                        Raise notice '%', query;
-                        return 'FAIL';
-        END;
-        Raise Notice 'Ending - Checking rows_where condition';
-
-        garbage := 'garbage001';
-        incre := 1;
-        Raise Notice 'Starting - Checking temporary column';
-        Begin
-                raise debug 'Checking Checking temporary columns existance';
-
-                While True
-                        Loop
-                                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(garbage) ||')' into naming;
-                                If naming.pgr_iscolumnintable = 't' THEN
-                                        incre := incre + 1;
-                                        garbage := 'garbage00'||incre||'';
-                                ELSE
-                                        EXIT;
-                                END IF;
-                        End Loop;
-        End;
-        Raise Notice 'Ending - Checking temporary column';
-
-        Raise Notice 'Starting - Calculating subgraphs';
-        BEGIN
-                --------- Add necessary columns ----------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(subgraph) || ' INTEGER DEFAULT -1';
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(garbage) || ' INTEGER DEFAULT 0';
-                graph_id := 1;
-
-                EXECUTE 'select count(*) as count from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where ||'' into rec_count;
-                if rec_count.count = 0 then
-                        RETURN 'rows_where condition generated 0 rows';
-                end if;
-
-                WHILE TRUE
-                        LOOP
-                                ---------- Assign the very first -1 row graph_id ----------
-                                EXECUTE 'SELECT ' || pgr_quote_ident(id) || ' AS gid FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1 LIMIT 1' INTO rec_single;
-                                EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec_single.gid || '';
-
-                                --------- Search other rows with that particular graph_id -----------
-                                WHILE TRUE
-                                        LOOP
-                                                EXECUTE 'SELECT COUNT(*) FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0' into rec_count;
-                                                ----------- The following if else will check those rows which already have entertained ------------
-                                                IF (rec_count.count > 0) THEN
-                                                        sql1 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0';
-                                                        FOR rec1 IN EXECUTE sql1
-                                                                LOOP
-                                                                        sql2 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| pgr_quote_ident(source) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(source) ||' = '|| rec1.target ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.target ||'';
-                                                                        FOR rec2 IN EXECUTE sql2
-                                                                                LOOP
-                                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec2.gid || '';
-                                                                                END LOOP;
-                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(garbage) || ' = 1 WHERE ' || pgr_quote_ident(id) || ' = ' || rec1.gid || '';
-                                                                END LOOP;
-                                                ELSE
-                                                        EXIT;
-                                                END IF;
-                                        END LOOP;
-
-                                ------ Following is to exit the while loop. 0 means no more -1 id.
-                                EXECUTE 'SELECT COUNT(*) AS count FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1' INTO rec_count;
-                                If (rec_count.count = 0) THEN
-                                        EXIT;
-                                ELSE
-                                        graph_id := graph_id + 1;
-                                END IF;
-                        END LOOP;
-
-                ----------- Drop garbage column ------------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' DROP COLUMN ' || pgr_quote_ident(garbage) ||'';
-                Raise Notice 'Successfully complicated calculating subgraphs';
-        END;
-        Raise Notice 'Ending - Calculating subgraphs';
-
-        RETURN 'OK';
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCostMatrix(
-    edges_sql TEXT,
-    points_sql TEXT,
-    pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_pid, a.end_pid, a.agg_cost
-        FROM _pgr_withPoints($1, $2, $3, $3, $4,  $5, TRUE, TRUE) AS a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
---  DIJKSTRA DMatrix
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2, $2, $3, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
---  BIDIRECTIONAL DIJKSTRA Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_astarCostMatrix(
-    edges_sql TEXT, -- XY edges sql
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2, $2, $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
---  BIDIRECTIONAL ASTAR Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdAstarCostMatrix(
-    edges_sql TEXT,
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_bdAstarCostMatrix(TEXT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCostMatrix';
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_getTableName(IN tab text,OUT sname text,OUT tname text)
-RETURNS RECORD AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getTableName: This function will no longer be soported';
-    select * from _pgr_getTableName(tab, 0, 'pgr_getTableName') into sname,tname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_getColumnName(tab text, col text)
-RETURNS text AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getColumnName: This function will no longer be soported';
-    return _pgr_getColumnName(tab,col, 0, 'pgr_getColumnName');
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    select * from _pgr_getColumnName(tab,col,0, 'pgr_isColumnInTable') into cname;
-    return  cname IS not NULL;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnIndexed(tab text, col text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnIndexed: This function will no longer be soported';
-    return  _pgr_isColumnIndexed(tab,col);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-create or replace function pgr_quote_ident(idname text)
-returns text as
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    return  _pgr_quote_ident(idname);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_versionless(v1 text, v2 text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_versionless: This function will no longer be soported';
-    return  _pgr_versionless(v1,v2);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-create or replace function pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_startPoint: This function will no longer be soported';
-    return  _pgr_startPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_endPoint: This function will no longer be soported';
-    return  _pgr_endPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspJohnson(edges_sql text)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_johnson instead';
-      has_reverse =_pgr_parameter_check('johnson', edges_sql, false);
-      sql = edges_sql;
-      IF (has_reverse) THEN
-           RAISE NOTICE 'reverse_cost column found, removing.';
-           sql = 'SELECT source, target, cost FROM (' || edges_sql || ') a';
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () - 1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_johnson(sql, TRUE);
-  END
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspWarshall(edges_sql text, directed boolean, has_rcost boolean)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_floydWarshall instead';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-      sql := edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         ELSE raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () -1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_floydWarshall(sql, directed);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_astar(edges_sql TEXT, source_id INTEGER, target_id INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated signature pgr_astar(text, integer, integer, boolean, boolean)';
-    has_reverse =_pgr_parameter_check('astar', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost, x1,y1, x2, y2 FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-    FROM pgr_astar(sql, ARRAY[$2], ARRAY[$3], directed);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    sql TEXT,
-    source_vid INTEGER,
-    target_vid INTEGER,
-    directed BOOLEAN,
-    has_reverse_cost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdAstar';
-    has_reverse =_pgr_parameter_check('astar', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdAstar(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(edges_sql TEXT, start_vid INTEGER, end_vid INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdDijkstra';
-    has_reverse =_pgr_parameter_check('dijkstra', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdDijkstra(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstraPath(
-    sql text,
-    source INTEGER,
-    targets INTEGER ARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-    RETURNS SETOF pgr_costResult3 AS
-    $BODY$
-    DECLARE
-    has_reverse BOOLEAN;
-    new_sql TEXT;
-    result pgr_costResult3;
-    tmp pgr_costResult3;
-    sseq INTEGER;
-    i INTEGER;
-    BEGIN
-        RAISE NOTICE 'Deprecated function: Use pgr_dijkstra instead.';
-        has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-        new_sql = sql;
-        IF (array_ndims(targets) != 1) THEN
-            raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-
-        IF (has_reverse != has_rcost) THEN
-            IF (has_reverse) THEN
-                new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-            ELSE
-                raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-                USING ERRCODE = 'XX000';
-            END IF;
-        END IF;
-        SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-        sseq = 0; i = 1;
-        FOR result IN
-            SELECT seq, a.end_vid::INTEGER AS id1, a.node::INTEGER AS i2, a.edge::INTEGER AS id3, cost
-            FROM pgr_dijkstra(new_sql, source, targets, directed) a ORDER BY a.end_vid, seq LOOP
-            WHILE (result.id1 != targets[i]) LOOP
-                tmp.seq = sseq;
-                tmp.id1 = targets[i];
-                IF (targets[i] = source) THEN
-                    tmp.id2 = source;
-                    tmp.cost =0;
-                ELSE
-                    tmp.id2 = 0;
-                    tmp.cost = -1;
-                END IF;
-                tmp.id3 = -1;
-                RETURN next tmp;
-                i = i + 1;
-                sseq = sseq + 1;
-            END LOOP;
-        IF (result.id1 = targets[i] AND result.id3 != -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-        IF (result.id1 = targets[i] AND result.id3 = -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.id2 = source;
-            tmp.cost = 0;
-        ELSE
-            tmp.id2 = 0;
-            tmp.cost = -1;
-        END IF;
-        tmp.id3 = -1;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstracost(
-    sql text,
-    source INTEGER,
-    targets INTEGER array,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-result pgr_costResult;
-tmp pgr_costResult;
-sseq INTEGER;
-i INTEGER;
-BEGIN
-    RAISE NOTICE 'Deprecated function. Use pgr_dijkstraCost instead.';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    new_sql = sql;
-    IF (array_ndims(targets) != 1) THEN
-        raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-        USING ERRCODE = 'XX000';
-    END IF;
-
-
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-    sseq = 0; i = 1;
-    FOR result IN
-        SELECT ((row_number() over()) -1)::INTEGER, a.start_vid::INTEGER, a.end_vid::INTEGER, agg_cost
-        FROM pgr_dijkstraCost(new_sql, source, targets, directed) a ORDER BY end_vid LOOP
-        WHILE (result.id2 != targets[i]) LOOP
-            tmp.seq = sseq;
-            tmp.id1 = source;
-            tmp.id2 = targets[i];
-            IF (targets[i] = source) THEN
-                tmp.cost = 0;
-            ELSE
-                tmp.cost = -1;
-            END IF;
-            RETURN next tmp;
-            i = i + 1;
-            sseq = sseq + 1;
-        END LOOP;
-        IF (result.id2 = targets[i]) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = source;
-        tmp.id2 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.cost = 0;
-        ELSE
-            tmp.cost = -1;
-        END IF;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-create or replace function pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    returns integer as
-$body$
-
-declare
-    rr record;
-    pct float;
-    debuglevel text;
-
-begin
-    -- find the closest edge within tol distance
-    execute 'select * from ' || _pgr_quote_ident(edges) ||
-            ' where st_dwithin(''' || pnt::text ||
-            '''::geometry, the_geom, ' || tol || ') order by st_distance(''' || pnt::text ||
-            '''::geometry, the_geom) asc limit 1' into rr;
-
-    if rr.the_geom is not null then
-        -- deal with MULTILINESTRINGS
-        if geometrytype(rr.the_geom)='MULTILINESTRING' THEN
-            rr.the_geom := ST_GeometryN(rr.the_geom, 1);
-        end if;
-
-        -- project the point onto the linestring
-        execute 'show client_min_messages' into debuglevel;
-        SET client_min_messages='ERROR';
-        pct := st_line_locate_point(rr.the_geom, pnt);
-        execute 'set client_min_messages  to '|| debuglevel;
-
-        -- return the node we are closer to
-        if pct < 0.5 then
-            return rr.source;
-        else
-            return rr.target;
-        end if;
-    else
-        -- return a failure to find an edge within tol distance
-        return -1;
-    end if;
-end;
-$body$
-  language plpgsql volatile
-  cost 5;
-
-
-----------------------------------------------------------------------------
-
-create or replace function pgr_flipedges(ga geometry[])
-    returns geometry[] as
-$body$
-
-declare
-    nn integer;
-    i integer;
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_flipEdges';
-    -- get the count of edges, and return if only one edge
-    nn := array_length(ga, 1);
-    if nn=1 then
-        return ga;
-    end if;
-
-    -- determine if first needs to be flipped
-    g := _pgr_startpoint(ga[1]);
-
-    -- if the start of the first is connected to the second then it needs to be flipped
-    if _pgr_startpoint(ga[2])=g or _pgr_endpoint(ga[2])=g then
-        ga[1] := st_reverse(ga[1]);
-    end if;
-    g := _pgr_endpoint(ga[1]);
-
-    -- now if  the end of the last edge matchs the end of the current edge we need to flip it
-    for i in 2 .. nn loop
-        if _pgr_endpoint(ga[i])=g then
-            ga[i] := st_reverse(ga[i]);
-        end if;
-        -- save the end of this edge into the last end for the next cycle
-        g := _pgr_endpoint(ga[i]);
-    end loop;
-
-    return ga;
-end;
-$body$
-    language plpgsql immutable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_texttopoints(pnts text, srid integer DEFAULT(4326))
-    returns geometry[] as
-$body$
-
-declare
-    a text[];
-    t text;
-    p geometry;
-    g geometry[];
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_textToPoints';
-    -- convert commas to space and split on ';'
-    a := string_to_array(replace(pnts, ',', ' '), ';');
-    -- convert each 'x y' into a point geometry and concattenate into a new array
-    for t in select unnest(a) loop
-        p := st_pointfromtext('POINT(' || t || ')', srid);
-        g := g || p;
-    end loop;
-
-    return g;
-end;
-$body$
-    language plpgsql immutable;
-
------------------------------------------------------------------------
-
-create or replace function pgr_pointstovids(pnts geometry[], edges text, tol float8 DEFAULT(0.01))
-    returns integer[] as
-$body$
-
-declare
-    v integer[];
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_pointsToVids';
-    -- cycle through each point and locate the nearest edge and vertex on that edge
-    for g in select unnest(pnts) loop
-        v := v || pgr_pointtoedgenode(edges, g, tol);
-    end loop;
-
-    return v;
-end;
-$body$
-    language plpgsql stable;
-
-
-create or replace function pgr_pointstodmatrix(pnts geometry[], mode integer default (0), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    r record;
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_pointsToDMatrix';
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    -- create an id for each point in the array and unnest it into a table nodes in the with clause
-    for r in with nodes as (select row_number() over()::integer as id, p from (select unnest(pnts) as p) as foo)
-        -- compute a row of distances
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j,
-                case when mode=0
-                    then st_distance(a.p, b.p)
-                    else st_distance_sphere(a.p, b.p)
-                end as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i loop
-
-        -- you must concat an array[array[]] to make dmatrix[][]
-        -- concat the row of distances to the dmatrix
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-end;
-$body$
-    language plpgsql stable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_vidstodmatrix(IN vids integer[], IN pnts geometry[], IN edges text, tol float8 DEFAULT(0.1), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    i integer;
-    j integer;
-    nn integer;
-    rr record;
-    bbox geometry;
-    t float8[];
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    -- check if the input arrays has any -1 values, maybe this whould be a raise exception
-    if vids @> ARRAY[-1] then
-    raise notice 'Some vids are undefined (-1)!';
-    dmatrix := null;
-    ids := null;
-    return;
-    end if;
-
-    ids := vids;
-
-    -- get the count of nodes
-    nn := array_length(vids,1);
-
-    -- zero out a dummy row
-    for i in 1 .. nn loop
-        t := t || 0.0::float8;
-    end loop;
-
-    -- using the dummy row, zero out the whole matrix
-    for i in 1 .. nn loop
-    dmatrix := dmatrix || ARRAY[t];
-    end loop;
-
-    for i in 1 .. nn-1 loop
-        j := i;
-        -- compute the bbox for the point needed for this row
-        select st_expand(st_collect(pnts[id]), tol) into bbox
-          from (select generate_series as id from generate_series(i, nn)) as foo;
-
-        -- compute kdijkstra() for this row
-        for rr in execute 'select * from pgr_dijkstracost($1, $2, $3, false)'
-                  using 'select id, source, target, cost from ' || edges ||
-                        ' where the_geom && ''' || bbox::text || '''::geometry'::text, vids[i], vids[i+1:nn] loop
-
-            -- TODO need to check that all node were reachable from source
-            -- I think unreachable paths between nodes returns cost=-1.0
-
-            -- populate the matrix with the cost values, remember this is symmetric
-            j := j + 1;
-            -- raise notice 'cost(%,%)=%', i, j, rr.agg_cost;
-            dmatrix[i][j] := rr.agg_cost;
-            dmatrix[j][i] := rr.agg_cost;
-        end loop;
-    end loop;
-
-end;
-$body$
-    language plpgsql stable cost 200;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_vidsToDMatrix(sql TEXT, vids  INTEGER[], dir BOOLEAN, has_rcost BOOLEAN, want_symmetric BOOLEAN)
-RETURNS float8[] AS
-$BODY$
-DECLARE
-directed BOOLEAN;
-has_reverse BOOLEAN;
-edges_sql TEXT;
-dmatrix_row float8[];
-dmatrix float8[];
-cell RECORD;
-unique_vids INTEGER[];
-total BIGINT;
-from_v BIGINT;
-to_v BIGINT;
-BEGIN
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql = sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    unique_vids :=  ARRAY(SELECT DISTINCT UNNEST(vids) ORDER BY 1);
-
-    IF want_symmetric THEN
-        directed = false;
-    ELSE
-        directed = dir;
-    END IF;
-
-    total := array_length(unique_vids, 1);
-
-    -- initializing dmatrix
-    FOR i in 1 .. total LOOP
-        dmatrix_row := dmatrix_row || '+Infinity'::float8;
-    END LOOP;
-    FOR i in 1 .. total LOOP
-    dmatrix := dmatrix || ARRAY[dmatrix_row];
-    dmatrix[i][i] = 0;
-    END LOOP;
-
-    CREATE TEMP TABLE __x___y____temp AS
-        WITH result AS
-            (SELECT unnest(unique_vids) AS vid)
-        SELECT row_number() OVER() AS idx, vid FROM result;
-
-    FOR cell IN SELECT * FROM pgr_dijkstraCostMatrix(sql, unique_vids, directed) LOOP
-        SELECT idx INTO from_v FROM __x___y____temp WHERE vid =  cell.start_vid;
-        SELECT idx INTO to_v FROM __x___y____temp WHERE vid =  cell.end_vid;
-
-        dmatrix[from_v][to_v] = cell.agg_cost;
-        dmatrix[to_v][from_v] = cell.agg_cost;
-    END LOOP;
-
-    DROP TABLE IF EXISTS __x___y____temp;
-    RETURN dmatrix;
-
-    EXCEPTION WHEN others THEN
-       DROP TABLE IF EXISTS __x___y____temp;
-       raise exception '% %', SQLERRM, SQLSTATE;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated function';
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_dijkstra(sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_dijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN) IS 'pgr_dijkstra(Deprecated signature)';
-
-
-
-
-
--- OLD SIGNATURE
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(edges_sql text, source BIGINT, distance FLOAT, directed BOOLEAN, has_rcost BOOLEAN)
-  RETURNS SETOF pgr_costresult AS
-  $BODY$
-  DECLARE
-  has_reverse BOOLEAN;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function';
-
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, FALSE);
-
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-             -- the user says it doesn't have reverse cost but its false
-             -- removing from query
-             RAISE NOTICE 'Contradiction found: has_rcost set to false but reverse_cost column found';
-             sql = 'SELECT id, source, target, cost, -1 as reverse_cost FROM (' || edges_sql || ') __q ';
-         ELSE
-             -- the user says it has reverse cost but its false
-             -- can't do anything
-             RAISE EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query SELECT seq - 1 AS seq, node::integer AS id1, edge::integer AS id2, agg_cost AS cost
-                FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maximumcardinalitymatching(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---INTERNAL FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
-------------------------
--- deprecated signatures
------------------------
-
-COMMENT ON FUNCTION pgr_astar(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_astar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdAstar( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdAstar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdDijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdDijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_dijkstra(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_dijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_drivingDistance(text,  BIGINT,  FLOAT8,  BOOLEAN,  BOOLEAN)
-    IS 'pgr_drivingDistance(Deprecated signature)';
-
-------------------------
--- Renamed /deprecated
------------------------
-COMMENT ON FUNCTION pgr_apspJohnson(TEXT)
-    IS 'pgr_apspJohnson(Renamed function) use pgr_Johnson instead';
-
-COMMENT ON FUNCTION pgr_apspWarshall(text, boolean, boolean)
-    IS 'pgr_apspWarshall(Renamed function) use pgr_floydWarshall instead';
-
-COMMENT ON FUNCTION pgr_kdijkstraPath( text, INTEGER, INTEGER ARRAY, BOOLEAN, BOOLEAN)
-    IS 'pgr_kdijkstraPath(Renamed function) use pgr_dijkstra instead';
-
-COMMENT ON FUNCTION pgr_kdijkstracost( text, INTEGER, INTEGER array, BOOLEAN, BOOLEAN)
-    IS 'pgr_kDijkstraCost(Renamed function) use pgr_dijkstraCost instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-
-
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-
-
-COMMENT ON FUNCTION pgr_gsoc_vrppdtw( text, INTEGER, INTEGER)
-    IS 'pgr_gsoc_vrppdtw(Renamed function) use pgr_pickDeliverEuclidean instead';
-
-------------------------
--- Deprecated functions
------------------------
-
-COMMENT ON FUNCTION pgr_flipedges(geometry[])
-    IS 'pgr_flipedges(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_texttopoints(text,  integer)
-    IS 'pgr_texttopoints(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstovids(pnts geometry[], edges text, tol float8)
-    IS 'pgr_pointstovids(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    IS 'pgr_pointtoedgenode(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstodmatrix(geometry[], integer)
-    IS 'pgr_pointstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidstodmatrix( integer[],  geometry[],  text, float8)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidsToDMatrix(TEXT,  INTEGER[], BOOLEAN, BOOLEAN, BOOLEAN)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-
-
-
-COMMENT ON FUNCTION pgr_getTableName(IN tab text)
-    IS 'pgr_getTableName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_getColumnName(tab text, col text)
-    IS 'pgr_getColumnName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnInTable(tab text, col text)
-    IS 'pgr_isColumnInTable(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnIndexed(tab text, col text)
-    IS 'pgr_isColumnIndexed(Deprecated function)';
-
-
-COMMENT ON FUNCTION pgr_quote_ident(idname text)
-    IS 'pgr_quote_ident(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_versionless(v1 text, v2 text)
-    IS 'pgr_versionless(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_startPoint(g geometry)
-    IS 'pgr_startPoint(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_endPoint(g geometry)
-    IS 'pgr_endPoint(Deprecated function)';
-
-
diff --git a/tools/sql-update-scripts/pgrouting--2.3.0--2.5.2.sql b/tools/sql-update-scripts/pgrouting--2.3.0--2.5.2.sql
deleted file mode 100644
index 016756e..0000000
--- a/tools/sql-update-scripts/pgrouting--2.3.0--2.5.2.sql
+++ /dev/null
@@ -1,6561 +0,0 @@
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- pgRouting extension upgrade from 2.3.0 to 2.5.2
--- generated by tools/build-extension-update-files
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-\echo Use "ALTER extension pgrouting update to '2.5.2'" to load this file. \quit
-
-
--------------------------------------
--- remove functions no longer in the 2.5.2 extension
--------------------------------------
-
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_astar(text,bigint,bigint,boolean,integer,double precision,double precision,boolean);
-DROP FUNCTION IF EXISTS _pgr_astar(text,bigint,bigint,boolean,integer,double precision,double precision,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,anyarray,bigint,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,anyarray,bigint,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,bigint,anyarray,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,bigint,anyarray,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,bigint,bigint,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,bigint,bigint,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_drivingdistance(text,bigint,double precision,boolean);
-DROP FUNCTION IF EXISTS _pgr_drivingdistance(text,bigint,double precision,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_maxflow(text,anyarray,anyarray,text);
-DROP FUNCTION IF EXISTS _pgr_maxflow(text,anyarray,anyarray,text);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_maxflow(text,anyarray,bigint,text);
-DROP FUNCTION IF EXISTS _pgr_maxflow(text,anyarray,bigint,text);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_maxflow(text,bigint,anyarray,text);
-DROP FUNCTION IF EXISTS _pgr_maxflow(text,bigint,anyarray,text);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_maxflow(text,bigint,bigint,text);
-DROP FUNCTION IF EXISTS _pgr_maxflow(text,bigint,bigint,text);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_pickdeliver(text,integer,double precision,double precision,integer);
-DROP FUNCTION IF EXISTS _pgr_pickdeliver(text,integer,double precision,double precision,integer);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,anyarray,anyarray,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,anyarray,anyarray,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,anyarray,bigint,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,anyarray,bigint,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,bigint,anyarray,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,bigint,anyarray,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,bigint,bigint,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,bigint,bigint,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_fakecontraction(text,integer[]);
-DROP FUNCTION IF EXISTS pgr_fakecontraction(text,integer[]);
-
-
-------------------------------------------
---    New functions:  2.0
--- Signature change:  2.4
---       Deprecated:  2.4
-------------------------------------------
--- pgr_bddijkstra
--- 2.3.0: {      sql, source_vid, target_vid, directed, has_reverse_cost}   
--- 2.5.2: {edges_sql,  start_vid,    end_vid, directed, has_rcost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vid","end_vid","directed","has_rcost"}'
-WHERE proname = 'pgr_bddijkstra'
-    AND proargnames = '{"sql","source_vid","target_vid","directed","has_reverse_cost"}';
-
-
-------------------------------------------
---       New functions:  2.1
---    Signature change:  2.4
-------------------------------------------
--- 2.3.0: {edges_sql,start_v,  distance,directed,seq,node,edge,cost,agg_cost}
--- 2.5.2: {edges_sql,start_vid,distance,directed,seq,node,edge,cost,agg_cost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vid","distance","directed","seq","node","edge","cost","agg_cost"}'
-WHERE proname = 'pgr_drivingdistance'
-    AND proargnames = '{"edges_sql","start_v","distance","directed","seq","node","edge","cost","agg_cost"}';
-
-
-------------------------------------------
---       New functions:  2.1
---    Signature change:  2.4
-------------------------------------------
--- 2.3.0: {sql,      start_v,   distance,directed,equicost,seq,from_v,node,edge,cost,agg_cost}
--- 2.5.2: {edges_sql,start_vids,distance,directed,equicost,seq,from_v,node,edge,cost,agg_cost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vids","distance","directed","equicost","seq","from_v","node","edge","cost","agg_cost"}'
-WHERE proname = 'pgr_drivingdistance'
-    AND proargnames = '{"sql","start_v","distance","directed","equicost","seq","from_v","node","edge","cost","agg_cost"}';
-
-
-------------------------------------------
---       New functions:  2.3
---    Signature change:  2.5
--- Inner query changed:  2.5
-------------------------------------------
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_edgedisjointpaths(text,bigint,bigint,boolean);
-DROP FUNCTION IF EXISTS pgr_edgedisjointpaths(text,bigint,bigint,boolean);
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_edgedisjointpaths(text,bigint,anyarray,boolean);
-DROP FUNCTION IF EXISTS pgr_edgedisjointpaths(text,bigint,anyarray,boolean);
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_edgedisjointpaths(text,anyarray,bigint,boolean);
-DROP FUNCTION IF EXISTS pgr_edgedisjointpaths(text,anyarray,bigint,boolean);
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_edgedisjointpaths(text,anyarray,anyarray,boolean);
-DROP FUNCTION IF EXISTS pgr_edgedisjointpaths(text,anyarray,anyarray,boolean);
-
-
-ALTER EXTENSION pgrouting DROP TYPE contraction_vertex;
-DROP TYPE contraction_vertex;
-
-
-
-
-
-
-
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
---- pgRouting provides geospatial routing functionality.
---- http://pgrouting.org
---- copyright
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
----
---- This is free software; you can redistribute and/or modify it:
---- the terms of the GNU General Public Licence. See the COPYING file.
---- the terms of the MIT-X Licence. See the COPYING file.
----
---- The following functions have MIT-X licence:
----     pgr_version()
----     pgr_tsp(matrix float8[][], startpt integer, endpt integer DEFAULT -1, OUT seq integer, OUT id integer)
----     _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
----     pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
----
----
---- All other functions are under GNU General Public Licence.
----
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
--- WARNING: Any change in this file must be evaluated for compatibility.
---          Changes cleanly handled by postgis_upgrade.sql are fine,
---          other changes will require a bump in Major version.
---          Currently only function replaceble by CREATE OR REPLACE
---          are cleanly handled.
---
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
---  pgRouting 2.0 types
-
-
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_version()
-RETURNS TABLE(
-        "version" varchar,
-        tag varchar,
-        hash varchar,
-        branch varchar,
-        boost varchar
-    ) AS
-$BODY$
-    SELECT '2.5.2'::varchar AS version,
-        'v2.5.2'::varchar AS tag,
-        '60585f1f7'::varchar AS hash,
-        'master'::varchar AS branch,
-        '1.54.0'::varchar AS boost;
-$BODY$
-LANGUAGE sql IMMUTABLE;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getTableName(IN tab text, IN reportErrs int default 0, IN fnName text default '_pgr_getTableName', OUT sname text,OUT tname text)
-  RETURNS RECORD AS
-$$
-DECLARE
-        naming record;
-        i integer;
-        query text;
-        sn text; -- schema name
-        tn text; -- table name
-        ttype text; --table type for future use
-        err boolean;
-        debuglevel text;
-        var_types text[] = ARRAY['BASE TABLE', 'VIEW'];
-BEGIN
-
-    execute 'show client_min_messages' into debuglevel;
-
-
-    perform _pgr_msg( 0, fnName, 'Checking table ' || tab || ' exists');
-    --RAISE DEBUG 'Checking % exists',tab;
-
-    i := strpos(tab,'.');
-    IF (i <> 0) THEN
-        sn := split_part(tab, '.',1);
-        tn := split_part(tab, '.',2);
-    ELSE
-        sn := current_schema;
-        tn := tab;
-    END IF;
-
-
-   SELECT schema_name INTO sname
-   FROM information_schema.schemata WHERE schema_name = sn;
-
-    IF sname IS NOT NULL THEN -- found schema (as is)
-       SELECT table_name, table_type INTO tname, ttype
-       FROM information_schema.tables
-       WHERE
-                table_type = ANY(var_types) and
-                table_schema = sname and
-                table_name = tn ;
-        IF tname is NULL THEN
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  = ANY(var_types) and
-                table_schema = sname and
-                table_name = lower(tn) ORDER BY table_name;
-        END IF;
-    END IF;
-    IF sname is NULL or tname is NULL THEN --schema not found or table not found
-        SELECT schema_name INTO sname
-        FROM information_schema.schemata
-        WHERE schema_name = lower(sn) ;
-
-        IF sname IS NOT NULL THEN -- found schema (with lower caps)
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  =  ANY(var_types) and
-                table_schema = sname and
-                table_name= tn ;
-
-           IF tname IS NULL THEN
-                SELECT table_name, table_type INTO tname, ttype
-                FROM information_schema.tables
-                WHERE
-                    table_type  =  ANY(var_types) and
-                    table_schema = sname and
-                    table_name= lower(tn) ;
-           END IF;
-        END IF;
-    END IF;
-   err = (sname IS NULL OR tname IS NULL);
-   perform _pgr_onError(err, reportErrs, fnName, 'Table ' || tab ||' not found',' Check your table name', 'Table '|| tab || ' found');
-
-END;
-$$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(sname text, tname text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(col) into cname;
-
-    IF cname is null  THEN
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(lower(col))  into cname;
-    END if;
-
-    err = cname is null;
-
-    perform _pgr_onError(err, reportErrs, fnName,  'Column '|| col ||' not found', ' Check your column name','Column '|| col || ' found');
-    RETURN cname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(tab text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-
-    select * into cname from _pgr_getColumnName(sname,tname,col,reportErrs, fnName);
-    RETURN cname;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    select * from _pgr_getColumnName(tab,col,0, '_pgr_isColumnInTable') into cname;
-    return cname is not null;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(sname text, tname text, cname text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    pkey text;
-BEGIN
-    SELECT
-          pg_attribute.attname into pkey
-         --  format_type(pg_attribute.atttypid, pg_attribute.atttypmod)
-          FROM pg_index, pg_class, pg_attribute
-          WHERE
-                  pg_class.oid = _pgr_quote_ident(sname||'.'||tname)::regclass AND
-                  indrelid = pg_class.oid AND
-                  pg_attribute.attrelid = pg_class.oid AND
-                  pg_attribute.attnum = any(pg_index.indkey)
-                  AND indisprimary;
-
-    IF pkey=cname then
-          RETURN TRUE;
-    END IF;
-
-    SELECT a.index_name,
-           b.attname,
-           b.attnum,
-           a.indisunique,
-           a.indisprimary
-      INTO rec
-      FROM ( SELECT a.indrelid,
-                    a.indisunique,
-                    a.indisprimary,
-                    c.relname index_name,
-                    unnest(a.indkey) index_num
-               FROM pg_index a,
-                    pg_class b,
-                    pg_class c,
-                    pg_namespace d
-              WHERE b.relname=tname
-                AND b.relnamespace=d.oid
-                AND d.nspname=sname
-                AND b.oid=a.indrelid
-                AND a.indexrelid=c.oid
-           ) a,
-           pg_attribute b
-     WHERE a.indrelid = b.attrelid
-       AND a.index_num = b.attnum
-       AND b.attname = cname
-  ORDER BY a.index_name,
-           a.index_num;
-
-  RETURN FOUND;
-  EXCEPTION WHEN OTHERS THEN
-    perform _pgr_onError( true, reportErrs, fnName,
-    'Error when checking for the postgres system attributes', SQLERR);
-    RETURN FALSE;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(tab text, col text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    sname text;
-    tname text;
-    cname text;
-    pkey text;
-    value boolean;
-BEGIN
-    SELECT * into naming FROM _pgr_getTableName(tab, 0, fnName);
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    SELECT * into cname from _pgr_getColumnName(sname, tname, col, 0, fnName) ;
-    IF cname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    select * into value  from _pgr_isColumnIndexed(sname, tname, cname, reportErrs, fnName);
-    return value;
-END
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-create or replace function _pgr_quote_ident(idname text)
-    returns text as
-$body$
-declare
-    t text[];
-    pgver text;
-
-begin
-    pgver := regexp_replace(version(), E'^PostgreSQL ([^ ]+)[ ,].*$', E'\\1');
-
-    if _pgr_versionless(pgver, '9.2') then
-        select into t array_agg(quote_ident(term)) from
-            (select nullif(unnest, '') as term
-               from unnest(string_to_array(idname, '.'))) as foo;
-    else
-        select into t array_agg(quote_ident(term)) from
-            (select unnest(string_to_array(idname, '.', '')) as term) as foo;
-    end if;
-    return array_to_string(t, '.');
-end;
-$body$
-language plpgsql immutable;
-
-
-CREATE OR REPLACE FUNCTION _pgr_versionless(v1 text, v2 text)
-  RETURNS boolean AS
-$BODY$
-
-
-declare
-    v1a text[];
-    v2a text[];
-    nv1 integer;
-    nv2 integer;
-    ne1 integer;
-    ne2 integer;
-
-begin
-    -- separate components into an array, like:
-    -- '2.1.0-beta3dev'  =>  {2,1,0,beta3dev}
-    v1a := regexp_matches(v1, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-    v2a := regexp_matches(v2, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-
-    -- convert modifiers to numbers for comparison
-    -- we do not delineate between alpha1, alpha2, alpha3, etc
-    ne1 := case when v1a[4] is null or v1a[4]='' then 5
-                when v1a[4] ilike 'rc%' then 4
-                when v1a[4] ilike 'beta%' then 3
-                when v1a[4] ilike 'alpha%' then 2
-                when v1a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    ne2 := case when v2a[4] is null or v2a[4]='' then 5
-                when v2a[4] ilike 'rc%' then 4
-                when v2a[4] ilike 'beta%' then 3
-                when v2a[4] ilike 'alpha%' then 2
-                when v2a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    nv1 := v1a[1]::integer * 10000 +
-           coalesce(v1a[2], '0')::integer * 1000 +
-           coalesce(v1a[3], '0')::integer *  100 + ne1;
-    nv2 := v2a[1]::integer * 10000 +
-           coalesce(v2a[2], '0')::integer * 1000 +
-           coalesce(v2a[3], '0')::integer *  100 + ne2;
-
-    --raise notice 'nv1: %, nv2: %, ne1: %, ne2: %', nv1, nv2, ne1, ne2;
-
-    return nv1 < nv2;
-end;
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-create or replace function _pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_startpoint(st_geometryn(g,1));
-    else
-        return st_startpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function _pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_endpoint(st_geometryn(g,1));
-    else
-        return st_endpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_parameter_check(fn text, sql text, big boolean default false)
-  RETURNS bool AS
-  $BODY$
-
-  DECLARE
-  rec record;
-  rec1 record;
-  has_rcost boolean;
-  safesql text;
-  BEGIN
-    IF (big) THEN
-       RAISE EXCEPTION 'This function is for old style functions';
-    END IF;
-
-    -- checking query is executable
-    BEGIN
-      safesql =  'select * from ('||sql||' ) AS __a__ limit 1';
-      execute safesql into rec;
-      EXCEPTION
-        WHEN OTHERS THEN
-            RAISE EXCEPTION 'Could not execute query please verify syntax of: '
-              USING HINT = sql;
-    END;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('dijkstra','astar') THEN
-        BEGIN
-          execute 'select id,source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: id, source, target, cost';
-        END;
-        execute 'select pg_typeof(id)::text as id_type, pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.id_type in ('integer'::text))
-              AND (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Error, columns ''source'', ''target'' must be of type int4, ''cost'' must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    IF fn IN ('astar') THEN
-        BEGIN
-          execute 'select x1,y1,x2,y2  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: x1,y1, x2,y2';
-        END;
-        execute 'select pg_typeof(x1)::text as x1_type, pg_typeof(y1)::text as y1_type, pg_typeof(x2)::text as x2_type, pg_typeof(y2)::text as y2_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.x1_type = 'double precision'::text)
-              AND (rec.y1_type = 'double precision'::text)
-              AND (rec.x2_type = 'double precision'::text)
-              AND (rec.y2_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Columns: x1, y1, x2, y2 must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('johnson') THEN
-        BEGIN
-          execute 'select source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING HINT = 'Please veryfy the column names: id, source, target, cost',
-                         ERRCODE = 'XX000';
-        END;
-
-        execute 'select pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Support for source,target columns only of type: integer. Support for Cost: double precision'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    -- Checking the data types of the optional reverse_cost";
-    has_rcost := false;
-    IF fn IN ('johnson','dijkstra','astar') THEN
-      BEGIN
-        execute 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||safesql||' ) AS __b__ limit 1 ' into rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-            return has_rcost;
-      END;
-      if (has_rcost) then
-        IF (big) then
-           IF  not (rec1.rev_type in ('bigint'::text, 'integer'::text, 'smallint'::text, 'double precision'::text, 'real'::text)) then
-             RAISE EXCEPTION 'Illegar type in optional parameter reverse_cost.'
-             USING ERRCODE = 'XX000';
-           END IF;
-        ELSE -- Version 2.0.0 is more restrictive
-           IF (rec1.rev_type != 'double precision') then
-             RAISE EXCEPTION 'Illegal type in optional parameter reverse_cost, must be of type float8'
-             USING ERRCODE = 'XX000';
-           END IF;
-        END IF;
-      end if;
-      return true;
-    END IF;
-    -- just for keeps
-    return true;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_onError(
-  IN errCond boolean,  -- true there is an error
-  IN reportErrs int,   -- 0, 1 or 2
-  IN fnName text,      -- function name that generates the error
-  IN msgerr text,      -- error message
-  IN hinto text default 'No hint', -- hint help
-  IN msgok text default 'OK')      -- message if everything is ok
-  RETURNS void AS
-$BODY$
-BEGIN
-  if errCond=true then
-     if reportErrs=0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-     else
-       if reportErrs = 2 then
-         raise notice '----> PGR ERROR in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-         raise raise_exception;
-       else
-         raise notice '----> PGR NOTICE in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-       end if;
-     end if;
-  else
-       raise debug 'PGR ----> %: %',fnName,msgok;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_msg(IN msgKind int, IN fnName text, IN msg text default '---->OK')
-  RETURNS void AS
-$BODY$
-BEGIN
-  if msgKind = 0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msg;
-  else
-       raise notice '----> PGR NOTICE in %: %',fnName,msg;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(sname text, tname text, cname text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    EXECUTE 'select data_type  from information_schema.columns '
-            || 'where table_name = '||quote_literal(tname)
-                 || ' and table_schema=' || quote_literal(sname)
-                 || ' and column_name='||quote_literal(cname)
-       into ctype;
-    err = ctype is null;
-    perform _pgr_onError(err, reportErrs, fnName,
-            'Type of Column '|| cname ||' not found',
-            'Check your column name',
-            'OK: Type of Column '|| cname || ' is ' || ctype);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(tab text, col text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-    select * into cname from _pgr_getColumnName(tab,col,reportErrs, fnName) ;
-    select * into ctype from _pgr_getColumnType(sname,tname,cname,reportErrs, fnName);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_get_statement(o_sql text)
-RETURNS text AS
-$BODY$
-DECLARE
-sql TEXT;
-BEGIN
-    EXECUTE 'SELECT statement FROM pg_prepared_statements WHERE name ='  || quote_literal(o_sql) || ' limit 1 ' INTO sql;
-    IF (sql IS NULL) THEN
-      RETURN   o_sql;
-    ELSE
-      RETURN  regexp_replace(sql, '(.)* as ', '', 'i');
-    END IF;
-END
-$BODY$
-LANGUAGE plpgsql STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_checkVertTab(vertname text, columnsArr  text[],
-    IN reportErrs int default 1, IN fnName text default '_pgr_checkVertTab',
-    OUT sname text,OUT vname text)
-RETURNS record AS
-$BODY$
-DECLARE
-    cname text;
-    colname text;
-    naming record;
-    debuglevel text;
-    err  boolean;
-    msgKind int;
-
-BEGIN
-    msgKind = 0; -- debug_
-    execute 'show client_min_messages' into debuglevel;
-
-    perform _pgr_msg(msgKind, fnName, 'Checking table ' || vertname || ' exists');
-       select * from _pgr_getTableName(vertname, 0, fnName) into naming;
-       sname=naming.sname;
-       vname=naming.tname;
-       err = sname is NULL or vname is NULL;
-    perform _pgr_onError( err, 2, fnName,
-          'Vertex Table: ' || vertname || ' not found',
-          'Please create ' || vertname || ' using  _pgr_createTopology() or pgr_createVerticesTable()',
-          'Vertex Table: ' || vertname || ' found');
-
-
-    perform _pgr_msg(msgKind, fnName, 'Checking columns of ' || vertname);
-      FOREACH cname IN ARRAY columnsArr
-      loop
-         select _pgr_getcolumnName(vertname, cname, 0, fnName) into colname;
-         if colname is null then
-           perform _pgr_msg(msgKind, fnName, 'Adding column ' || cname || ' in ' || vertname);
-           set client_min_messages  to warning;
-                execute 'ALTER TABLE '||_pgr_quote_ident(vertname)||' ADD COLUMN '||cname|| ' integer';
-           execute 'set client_min_messages  to '|| debuglevel;
-           perform _pgr_msg(msgKind, fnName);
-         end if;
-      end loop;
-    perform _pgr_msg(msgKind, fnName, 'Finished checking columns of ' || vertname);
-
-    perform _pgr_createIndex(vertname , 'id' , 'btree', reportErrs, fnName);
- END
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(
-    sname text, tname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    debuglevel text;
-    naming record;
-    tabname text;
-    query text;
-    msgKind int;
-BEGIN
-  msgKind = 0; -- debug_
-
-  execute 'show client_min_messages' into debuglevel;
-  tabname=_pgr_quote_ident(sname||'.'||tname);
-  perform _pgr_msg(msgKind, fnName, 'Checking ' || colname || ' column in ' || tabname || ' is indexed');
-    IF (_pgr_isColumnIndexed(sname,tname,colname, 0, fnName)) then
-       perform _pgr_msg(msgKind, fnName);
-    else
-      if indext = 'gist' then
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using gist('||quote_ident(colname)||')';
-      else
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using btree('||quote_ident(colname)||')';
-      end if;
-      perform _pgr_msg(msgKind, fnName, 'Adding index ' || tabname || '_' ||  colname || '_idx');
-      perform _pgr_msg(msgKind, fnName, ' Using ' ||  query);
-      set client_min_messages  to warning;
-      BEGIN
-        execute query;
-        EXCEPTION WHEN others THEN
-          perform _pgr_onError( true, reportErrs, fnName,
-            'Could not create index on:' || colname, SQLERRM);
-      END;
-      execute 'set client_min_messages  to '|| debuglevel;
-      perform _pgr_msg(msgKind, fnName);
-    END IF;
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(tabname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    naming record;
-    sname text;
-    tname text;
-
-BEGIN
-    select * from _pgr_getTableName(tabname, 2, fnName)  into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    execute _pgr_createIndex(sname, tname, colname, indext, reportErrs, fnName);
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pointToId(
-    point geometry,
-    tolerance double precision,
-    vertname text,
-    srid integer)
-
-  RETURNS bigint AS
-$BODY$
-DECLARE
-    rec record;
-    pid bigint;
-
-BEGIN
-    EXECUTE 'SELECT ST_Distance(
-        the_geom,
-        ST_GeomFromText(ST_AsText('
-                || quote_literal(point::text)
-                || '),'
-            || srid ||')) AS d, id, the_geom
-    FROM '||_pgr_quote_ident(vertname)||'
-    WHERE ST_DWithin(
-        the_geom,
-        ST_GeomFromText(
-            ST_AsText(' || quote_literal(point::text) ||'),
-            ' || srid || '),' || tolerance||')
-    ORDER BY d
-    LIMIT 1' INTO rec ;
-    IF rec.id IS NOT NULL THEN
-        pid := rec.id;
-    ELSE
-        execute 'INSERT INTO '||_pgr_quote_ident(vertname)||' (the_geom) VALUES ('||quote_literal(point::text)||')';
-        pid := lastval();
-END IF;
-
-RETURN pid;
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'many_to_many_dijkstra'
-LANGUAGE c VOLATILE;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer, OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstra(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(Many to Many)';
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraVia(
-    edges_sql TEXT,
-    via_vertices ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    strict BOOLEAN DEFAULT FALSE,
-    U_turn_on_edge BOOLEAN DEFAULT TRUE,
-
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'dijkstraVia'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_johnson(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'johnson'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_floydWarshall(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'floydWarshall'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'astarManyToMany'
-LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, normal:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to Many)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true, normal:=false) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to Many)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid ANYARRAY,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-    equicost BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'many_withPointsDD'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_withPointsDD($1, $2, ARRAY[$3]::BIGINT[], $4, $5, $6, $7, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vids anyarray,
-    distance FLOAT,
-    directed BOOLEAN DEFAULT TRUE,
-    equicost BOOLEAN DEFAULT FALSE,
-    OUT seq integer,
-    OUT from_v  bigint,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'driving_many_to_dist'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vid bigint,
-    distance FLOAT8,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq integer,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer, directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'kshortest_path'
-    LANGUAGE c STABLE STRICT;
-
--- V2 the graph is directed and there are no heap paths
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid integer, end_vid integer, k integer, has_rcost boolean)
-  RETURNS SETOF pgr_costresult3 AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated signature of pgr_ksp';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql::text, false);
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_rcost) THEN
-           -- user says that it has reverse_cost but its not true
-           RAISE EXCEPTION 'has_reverse_cost set to true but reverse_cost not found';
-         ELSE
-           -- user says that it does not have reverse_cost but it does have it
-           -- to ignore we remove reverse_cost from the query
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         END IF;
-      END IF;
-
-      RETURN query SELECT ((row_number() over()) -1)::integer  AS seq,  (path_id - 1)::integer AS id1, node::integer AS id2, edge::integer AS id3, cost
-            FROM _pgr_ksp(sql::text, start_vid, end_vid, k, TRUE, FALSE) WHERE path_id <= k;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer,
-  directed boolean default true, heap_paths boolean default false,
-  --directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  BEGIN
-         RETURN query SELECT *
-                FROM _pgr_ksp(edges_sql::text, start_vid, end_vid, k, directed, heap_paths);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsKSP(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    k INTEGER,
-
-    directed BOOLEAN DEFAULT TRUE,
-    heap_paths BOOLEAN DEFAULT FALSE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER, OUT path_id INTEGER, OUT path_seq INTEGER,
-    OUT node BIGINT, OUT edge BIGINT,
-    OUT cost FLOAT, OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'withPoints_ksp'
-    LANGUAGE c STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_unnest_matrix(matrix float8[][], OUT start_vid integer, OUT end_vid integer, out agg_cost float8)
-RETURNS SETOF record AS
-
-$body$
-DECLARE
-
-m float8[];
-
-BEGIN
-    start_vid = 1;
-    foreach m slice 1 in  ARRAY matrix
-    LOOP
-        end_vid = 1;
-        foreach agg_cost in  ARRAY m
-        LOOP
-            RETURN next;
-            end_vid = end_vid + 1;
-        END LOOP;
-        start_vid = start_vid + 1;
-    END LOOP;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_tsp(
-    matrix float8[][],
-    startpt INTEGER,
-    endpt INTEGER DEFAULT -1,
-    OUT seq INTEGER,
-    OUT id INTEGER)
-RETURNS SETOF record AS
-$body$
-DECLARE
-table_sql TEXT;
-debuglevel TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(float8[][], integer, integer)';
-
-    CREATE TEMP TABLE ___tmp2 ON COMMIT DROP AS SELECT * FROM _pgr_unnest_matrix( matrix );
-
-
-    startpt := startpt + 1;
-    IF endpt = -1 THEN endpt := startpt;
-    END IF;
-
-
-    RETURN QUERY
-    WITH
-    result AS (
-        SELECT * FROM pgr_TSP(
-        $$SELECT * FROM ___tmp2 $$,
-        startpt, endpt,
-
-        tries_per_temperature :=  500 :: INTEGER,
-        max_changes_per_temperature := 30 :: INTEGER,
-        max_consecutive_non_changes := 500 :: INTEGER,
-
-        randomize:=false)
-    )
-    SELECT (row_number() over(ORDER BY result.seq) - 1)::INTEGER AS seq, (result.node - 1)::INTEGER AS id
-
-    FROM result WHERE NOT(result.node = startpt AND result.seq != 1);
-
-    DROP TABLE ___tmp2;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-
-
-CREATE OR  REPLACE FUNCTION pgr_tsp(sql text, start_id INTEGER, end_id INTEGER default (-1))
-returns setof pgr_costResult as
-$body$
-DECLARE
-table_sql TEXT;
-rec RECORD;
-debuglevel TEXT;
-n BIGINT;
-
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(sql, integer, integer)';
-
-    table_sql := 'CREATE TEMP TABLE ___tmp ON COMMIT DROP AS ' || sql ;
-    EXECUTE table_sql;
-
-
-    BEGIN
-        EXECUTE 'SELECT id, x, y FROM ___tmp' INTO rec;
-        EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                USING ERRCODE = 'XX000',
-                HINT = 'Please verify the column names: id, x, y';
-    END;
-
-    EXECUTE
-    'SELECT
-        pg_typeof(id)::text as id_type,
-        pg_typeof(x)::text as x_type,
-        pg_typeof(y)::text as y_type FROM ___tmp' INTO rec;
-
-
-    IF NOT((rec.id_type in ('integer'::text))
-        AND (rec.x_type = 'double precision'::text)
-        AND (rec.y_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION '''id'' must be of type INTEGER, ''x'' ad ''y'' must be of type FLOAT'
-            USING ERRCODE = 'XX000';
-    END IF;
-
-    EXECUTE 'SELECT count(*) AS n FROM (' || sql || ') AS __a__' INTO rec;
-    n = rec.n;
-
-    RETURN query
-        SELECT (seq - 1)::INTEGER AS seq, node::INTEGER AS id1, node::INTEGER AS id2, cost
-        FROM pgr_eucledianTSP(sql, start_id, end_id,
-
-            tries_per_temperature :=  500 * n :: INTEGER,
-            max_changes_per_temperature := 60 * n :: INTEGER,
-            max_consecutive_non_changes := 500 * n :: INTEGER,
-
-            randomize := false) WHERE seq <= n;
-    DROP TABLE ___tmp;
-
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-create or replace function _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
-  as
-$body$
-declare
-    sql text;
-    r record;
-
-begin
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    sql := 'with nodes as (' || sqlin || ')
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j, st_distance(st_makepoint(a.x, a.y), st_makepoint(b.x, b.y)) as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i';
-
-    for r in execute sql loop
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-
-end;
-$body$
-language plpgsql stable cost 10;
-
-
-CREATE OR REPLACE FUNCTION pgr_TSP(
-    matrix_row_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'newTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_eucledianTSP(
-    coordinates_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'eucledianTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_alphashape(sql text, alpha float8 DEFAULT 0, OUT x float8, OUT y float8)
-    RETURNS SETOF record
-    AS '$libdir/libpgrouting-2.5', 'alphashape'
-    LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pointsAsPolygon(query varchar, alpha float8 DEFAULT 0)
-	RETURNS geometry AS
-	$$
-	DECLARE
-		r record;
-		geoms geometry[];
-		vertex_result record;
-		i int;
-		n int;
-		spos int;
-		q text;
-		x float8[];
-		y float8[];
-
-	BEGIN
-		geoms := array[]::geometry[];
-		i := 1;
-
-		FOR vertex_result IN EXECUTE 'SELECT x, y FROM pgr_alphashape('''|| query || ''', ' || alpha || ')'
-		LOOP
-			x[i] = vertex_result.x;
-			y[i] = vertex_result.y;
-			i := i+1;
-		END LOOP;
-
-		n := i;
-		IF n = 1 THEN
-			RAISE NOTICE 'n = 1';
-			RETURN NULL;
-		END IF;
-
-		spos := 1;
-		q := 'SELECT ST_GeometryFromText(''POLYGON((';
-		FOR i IN 1..n LOOP
-			IF x[i] IS NULL AND y[i] IS NULL THEN
-				q := q || ', ' || x[spos] || ' ' || y[spos] || '))'',0) AS geom;';
-				EXECUTE q INTO r;
-				geoms := geoms || array[r.geom];
-				q := '';
-			ELSE
-				IF q = '' THEN
-					spos := i;
-					q := 'SELECT ST_GeometryFromText(''POLYGON((';
-				END IF;
-				IF i = spos THEN
-					q := q || x[spos] || ' ' || y[spos];
-				ELSE
-					q := q || ', ' || x[i] || ' ' || y[i];
-				END IF;
-			END IF;
-		END LOOP;
-
-		RETURN ST_BuildArea(ST_Collect(geoms));
-	END;
-	$$
-	LANGUAGE 'plpgsql' VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'bd_astar'
-LANGUAGE C VOLATILE;
-
-
-
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed:=true, only_cost:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    BOOLEAN,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false);
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to Many)';
-
-
-
--- one to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to Many)';
-
-
--- bdDijkstra MANY TO MANY
-CREATE OR REPLACE FUNCTION _pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bdDijkstra'
-LANGUAGE c VOLATILE;
-
-
-
--- ONE TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- TODO directed BOOLEAN DEFAULT TRUE,  on version 3
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, false) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, true) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_vid integer,
-    target_vid integer,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_vertex'
-LANGUAGE 'c' IMMUTABLE;
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_edge'
-LANGUAGE 'c' IMMUTABLE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || edges_sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        -- no restrictions then its a dijkstra
-        RETURN query SELECT a.seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_dijkstra(new_sql, start_vid, end_vid, directed) a;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, start_vid, end_vid, directed, has_rcost, restrictions_sql);
-    RETURN;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trspViaVertices(
-    edges_sql TEXT,
-    via_vids ANYARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult3 AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            new_sql :=
-               'WITH old_sql AS (' || edges_sql || ')' ||
-                '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        RETURN query SELECT (row_number() over())::INTEGER, path_id:: INTEGER, node::INTEGER,
-            (CASE WHEN edge = -2 THEN -1 ELSE edge END)::INTEGER, cost
-            FROM pgr_dijkstraVia(new_sql, via_vids, directed, strict:=true) WHERE edge != -1;
-        RETURN;
-    END IF;
-
-
-    -- make the call without contradiction from part of the user
-    RETURN query SELECT * FROM _pgr_trspViaVertices(new_sql, via_vids::INTEGER[], directed, has_rcost, restrictions_sql);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-
-    new_sql := sql;
-    IF (has_reverse != has_reverse_cost) THEN  -- user contradiction
-        IF (has_reverse) THEN
-            -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) THEN
-        -- no restrictions then its a with points
-        RETURN query SELECT a.seq-1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_withpoints(new_sql,
-            '(SELECT 1 as pid, ' || source_eid || 'as edge_id, ' || source_pos || '::float8 as fraction)'
-            || ' UNION '
-            || '(SELECT 2, ' || target_eid || ', ' || target_pos || ')' ::TEXT,
-            -1, -2, directed) a;
-        -- WHERE node != -2;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, source_eid, source_pos, target_eid, target_pos, directed, has_reverse_cost, turn_restrict_sql);
-    RETURN;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-create or replace function _pgr_trspViaVertices(sql text, vids integer[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    lrra boolean := false;
-    seq integer := 0;
-    seq2 integer := 0;
-
-begin
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(vids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from _pgr_trsp(sql, vids[i], vids[i+1], directed, has_rcost, turn_restrict_sql) as a loop
-            -- filter out the individual path ends except the last one
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --raise notice 'rr: %', rr;
-            if rr.id3 = -1 then
-                lrr := rr;
-                lrra := true;
-            else
-                seq := seq + 1;
-                rr.seq := seq;
-                return next rr;
-            end if;
-        end loop;
-    end loop;
-
-    if lrra then
-        seq := seq + 1;
-        lrr.seq := seq;
-        return next lrr;
-    end if;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-
-----------------------------------------------------------------------------------------------------------
-
-create or replace function pgr_trspViaEdges(sql text, eids integer[], pcts float8[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    first boolean := true;
-    seq integer := 0;
-    seq2 integer :=0;
-    has_reverse BOOLEAN;
-    point_is_vertex BOOLEAN := false;
-    edges_sql TEXT;
-    f float;
-
-begin
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql := sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (NOT has_rcost) THEN
-            -- user does not want to use reverse cost column
-            edges_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    FOREACH f IN ARRAY pcts LOOP
-        IF f in (0,1) THEN
-           point_is_vertex := true;
-        END IF;
-    END LOOP;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) AND NOT point_is_vertex THEN
-        -- no restrictions then its a _pgr_withPointsVia
-        RETURN query SELECT a.seq::INTEGER, path_id::INTEGER AS id1, node::INTEGER AS id2, edge::INTEGER AS id3, cost
-        FROM _pgr_withPointsVia(edges_sql, eids, pcts, directed) a;
-        RETURN;
-    END IF;
-
-    if array_length(eids, 1) != array_length(pcts, 1) then
-        raise exception 'The length of arrays eids and pcts must be the same!';
-    end if;
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(eids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from pgr_trsp(edges_sql,
-                                  eids[i], pcts[i],
-                                  eids[i+1], pcts[i+1],
-                                  directed,
-                                  has_rcost,
-                                  turn_restrict_sql) as a loop
-            -- combine intermediate via costs when cost is split across
-            -- two parts of a segment because it stops it and
-            -- restarts the next leg also on it
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --
-            -- there are multiple condition we have to deal with
-            -- between the end of one leg and start of the next
-            -- 1. same vertex_id. edge_id=-1; drop record with edge_id=-1
-            -- means: path ends on vertex
-            -- NOTICE:  rr: (19,1,44570022,-1,0)
-            -- NOTICE:  rr: (0,2,44570022,1768045,2.89691196717448)
-            -- 2. vertex_id=-1; sum cost components
-            -- means: path end/starts with the segment
-            -- NOTICE:  rr: (11,2,44569628,1775909,9.32885885148532)
-            -- NOTICE:  rr: (0,3,-1,1775909,0.771386350984395)
-
-            --raise notice 'rr: %', rr;
-            if first then
-                lrr := rr;
-                first := false;
-            else
-                if lrr.id3 = -1 then
-                    lrr := rr;
-                elsif lrr.id3 = rr.id3 then
-                    lrr.cost := lrr.cost + rr.cost;
-                    if rr.id2 = -1 then
-                        rr.id2 := lrr.id2;
-                    end if;
-                else
-                    seq := seq + 1;
-                    lrr.seq := seq;
-                    return next lrr;
-                    lrr := rr;
-                end if;
-            end if;
-        end loop;
-    end loop;
-
-    seq := seq + 1;
-    lrr.seq := seq;
-    return next lrr;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-----------------------------
---    MANY TO MANY
-----------------------------
-
-
-CREATE OR REPLACE FUNCTION _pgr_maxflow(
-    edges_sql TEXT,
-    sources ANYARRAY,
-    targets ANYARRAY,
-    algorithm INTEGER DEFAULT 1,
-    only_flow BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'max_flow_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-
-------------------------------------
--- 3 pgr_edmondsKarp
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 2 boykov_kolmogorov
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 1 pgr_pushRelabel
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT flow
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], algorithm := 1, only_flow := true);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], $3::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, $2::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxCardinalityMatch(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'edge_disjoint_paths_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    bigint,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    IN directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_contractGraph(
-    edges_sql TEXT,
-    contraction_order BIGINT[],
-    max_cycles integer DEFAULT 1,
-    forbidden_vertices BIGINT[] DEFAULT ARRAY[]::BIGINT[],
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT type TEXT,
-    OUT id BIGINT,
-    OUT contracted_vertices BIGINT[],
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost float)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'contractGraph'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliver(
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_cell_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliver'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliverEuclidean (
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliverEuclidean'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_vrpOneDepot(
-    TEXT, -- customers_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_sql
-    INTEGER, -- depot_id
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-orders_sql TEXT;
-trucks_sql TEXT;
-matrix_sql TEXT;
-final_sql TEXT;
-BEGIN
-
-    orders_sql = $$WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    pickups AS (
-        SELECT id, x AS p_x, y AS p_y, open_time AS p_open, close_time AS p_close, service_time AS p_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vrp_orders.id AS id, order_unit AS demand, pickups.id AS p_node_id, p_x, p_y, p_open, p_close, p_service,
-    vrp_orders.id AS d_node_id, x AS d_x, y AS d_y, open_time AS d_open, close_time AS d_close, service_time AS d_service
-    FROM vrp_orders, pickups
-    WHERE vrp_orders.id != $$ || $4;
-
-
-    trucks_sql = $$ WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    vrp_vehicles AS ($$ || $2 || $$ ),
-    starts AS (
-        SELECT id AS start_node_id, x AS start_x, y AS start_y, open_time AS start_open, close_time AS start_close, service_time AS start_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vehicle_id AS id, capacity, starts.* FROM vrp_vehicles, starts;
-    $$;
-
-    final_sql = '
-    SELECT * FROM _pgr_pickDeliver(
-            $$' || orders_sql || '$$,
-            $$' || trucks_sql || '$$,
-            $$' || $3 || '$$,
-            max_cycles := 2,
-            initial_sol := 4 ); ';
-
-    RAISE DEBUG '%', orders_sql;
-    RAISE DEBUG '%', trucks_sql;
-    RAISE DEBUG '%', $3;
-    RAISE DEBUG '%', final_sql;
-
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
------------------------------------------------------------------------
--- Core function for vrp with sigle depot computation
--- See README for description
------------------------------------------------------------------------
---
---
-
-create or replace function pgr_vrpOneDepot(
-	order_sql text,
-	vehicle_sql text,
-	cost_sql text,
-	depot_id integer,
-
-	OUT oid integer,
-	OUT opos integer,
-	OUT vid integer,
-	OUT tarrival integer,
-	OUT tdepart integer)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT order_id::INTEGER, stop_seq::INTEGER, vehicle_id::INTEGER, arrival_time::INTEGER, departure_time::INTEGER
-    FROM _pgr_vrpOneDepot($1, $2,
-       '
-            SELECT src_id AS start_vid, dest_id AS end_vid, traveltime AS agg_cost FROM ('||$3||') AS a
-       ',
-        $4
-    ) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_gsoc_vrppdtw(
-    customers_sql TEXT,
-    max_vehicles INTEGER,
-    capacity FLOAT,
-    speed FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-
-    OUT seq INTEGER,
-    OUT vehicle_id INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT stop_id BIGINT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-    orders_sql TEXT;
-    vehicles_sql TEXT;
-    final_sql TEXT;
-BEGIN
-    orders_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        pickups AS (
-            SELECT id, demand, x as p_x, y as p_y, opentime as p_open, closetime as p_close, servicetime as p_service
-            FROM  customer_data WHERE pindex = 0 AND id != 0
-        ),
-        deliveries AS (
-            SELECT pindex AS id, x as d_x, y as d_y, opentime as d_open, closetime as d_close, servicetime as d_service
-            FROM  customer_data WHERE dindex = 0 AND id != 0
-        )
-        SELECT * FROM pickups JOIN deliveries USING(id) ORDER BY pickups.id
-    $$;
-
-    vehicles_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ )
-        SELECT id, x AS start_x, y AS start_y,
-            opentime AS start_open, closetime AS start_close, $$ ||
-            capacity || $$ AS capacity, $$ || max_vehicles || $$ AS number, $$ || speed || $$ AS speed
-            FROM customer_data WHERE id = 0 LIMIT 1
-        $$;
---  seq | vehicle_id | vehicle_seq | stop_id | travel_time | arrival_time | wait_time | service_time | departure_time
-    final_sql = $$ WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        p_deliver AS (SELECT * FROM _pgr_pickDeliverEuclidean('$$ || orders_sql || $$',  '$$ || vehicles_sql || $$',  1, $$ || max_cycles || $$ )),
-        picks AS (SELECT p_deliver.*, pindex, dindex, id AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 2)),
-        delivers AS (SELECT p_deliver.*, pindex, dindex, dindex AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 3)),
-        depots AS (SELECT p_deliver.*, 0 as pindex, 0 as dindex, 0 AS the_id FROM p_deliver WHERE (stop_type IN (-1,1,6))),
-        the_union AS (SELECT * FROM picks UNION SELECT * FROM delivers UNION SELECT * from depots)
-
-        SELECT (row_number() over(ORDER BY a.seq))::INTEGER, vehicle_seq, a.stop_seq, the_id::BIGINT, a.travel_time, a.arrival_time, a.wait_time, a.service_time, a.departure_time
-        FROM (SELECT * FROM the_union) AS a ORDER BY a.seq
-        $$;
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-CREATE OR REPLACE FUNCTION pgr_gsoc_vrppdtw(
-    sql text,
-    vehicle_num INTEGER,
-    capacity INTEGER
-)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-customers_sql TEXT;
-BEGIN
-    RETURN query
-         SELECT a.seq, vehicle_id::INTEGER AS id1, stop_id::INTEGER AS id2, departure_time AS cost
-        FROM _pgr_gsoc_vrppdtw($1, $2, $3, 1, 30) AS a WHERE vehicle_id NOT IN (-2);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION _pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN,
-    driving_side CHAR,
-    details BOOLEAN,
-
-    only_cost BOOLEAN DEFAULT false, -- gets path
-    normal BOOLEAN DEFAULT true, -- false for many to onu
-
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'withPoints'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], ARRAY[$4]::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], ARRAY[$4]::bigint[], $5, $6, $7, FALSE, FALSE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], $4::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], $4::BIGINT[], $5,  $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION  _pgr_withPointsVia(
-    sql text,
-    via_edges bigint[],
-    fraction float[],
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  has_rcost boolean;
-  sql_new_vertices text := ' ';
-  sql_on_vertex text;
-  v_union text := ' ';
-  dummyrec record;
-  rec1 record;
-  via_vertices int[];
-  sql_safe text;
-  new_edges text;
-  BEGIN
-     BEGIN
-        sql_safe = 'SELECT id, source, target, cost, reverse_cost FROM ('|| sql || ') AS __a';
-
-        EXECUTE 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||sql_safe||' ) AS __b__ limit 1 ' INTO rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-     END;
-
-
-      IF array_length(via_edges, 1) != array_length(fraction, 1) then
-        RAISE EXCEPTION 'The length of via_edges is different of length of via_edges';
-      END IF;
-
-      FOR i IN 1 .. array_length(via_edges, 1)
-      LOOP
-          IF fraction[i] = 0 THEN
-              sql_on_vertex := 'SELECT source FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.source;
-          ELSE IF fraction[i] = 1 THEN
-              sql_on_vertex := 'SELECT target FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.target;
-          ELSE
-              via_vertices[i] = -i;
-              IF has_rcost THEN
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost,
-                              reverse_cost * (1 - ' || fraction[i] || ')  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost,
-                              reverse_cost *  ' || fraction[i] || '  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' where id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               ELSE
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               END IF;
-          END IF;
-          END IF;
-     END LOOP;
-
-     IF sql_new_vertices = ' ' THEN
-         new_edges := sql;
-     ELSE
-         IF has_rcost THEN
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost,
-                         lead(cost) OVER w  - cost AS reverse_cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL),
-                   second_part AS ( SELECT * FROM (SELECT id, lead(source) OVER w  AS source, source as target,
-                         reverse_cost - lead(reverse_cost) OVER w  AS cost,
-                         reverse_cost - lead(reverse_cost) OVER w  AS reverse_cost
-                      FROM  the_union  WHERE target > 0 and reverse_cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY reverse_cost ASC) ) as n2
-                      WHERE source IS NOT NULL),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part)
-                             UNION
-                       (SELECT * FROM second_part) ) _union )
-                  SELECT *  FROM more_union';
-         ELSE
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL ),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part) ) _union )
-                  SELECT *  FROM more_union';
-          END IF;
-      END IF;
-
- -- raise notice '%', new_edges;
-     sql_new_vertices := sql_new_vertices || v_union || ' (' || sql || ')';
-     RETURN query SELECT *
-         FROM pgr_dijkstraVia(new_edges, via_vertices, directed, has_rcost);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_lineGraph(
-    TEXT, -- edges_sql
-    directed BOOLEAN DEFAULT true,
-    OUT seq INTEGER,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost FLOAT,
-    OUT reverse_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'lineGraph'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_connectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'connectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_strongComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'strongComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_biconnectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the edge in the component
-    OUT n_seq INTEGER,          -- nth_seq of the edge in the component
-    OUT edge BIGINT)            -- the number of the edge
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'biconnectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_articulationPoints(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'articulationPoints'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bridges(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT edge BIGINT)            -- the number of the edge 
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bridges'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createtopology(edge_table text, tolerance double precision,
-		   the_geom text default 'the_geom', id text default 'id',
-		   source text default 'source', target text default 'target',rows_where text default 'true',
-		   clean boolean default FALSE)
-RETURNS VARCHAR AS
-$BODY$
-
-DECLARE
-    points record;
-    sridinfo record;
-    source_id bigint;
-    target_id bigint;
-    totcount bigint;
-    rowcount bigint;
-    srid integer;
-    sql text;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    notincluded integer;
-    i integer;
-    naming record;
-    info record;
-    flag boolean;
-    query text;
-    idtype text;
-    gtype text;
-    sourcetype text;
-    targettype text;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-    msgKind int;
-    emptied BOOLEAN;
-
-BEGIN
-    msgKind = 1; -- notice
-    fnName = 'pgr_createTopology';
-    raise notice 'PROCESSING:';
-    raise notice 'pgr_createTopology(''%'', %, ''%'', ''%'', ''%'', ''%'', rows_where := ''%'', clean := %)',edge_table,tolerance,the_geom,id,source,target,rows_where, clean;
-    execute 'show client_min_messages' into debuglevel;
-
-
-    raise notice 'Performing checks, please wait .....';
-
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-        sname=naming.sname;
-        tname=naming.tname;
-        tabname=sname||'.'||tname;
-        vname=tname||'_vertices_pgr';
-        vertname= sname||'.'||vname;
-        rows_where = ' AND ('||rows_where||')';
-      raise DEBUG '     --> OK';
-
-
-      raise debug 'Checking column names in edge table';
-        select * into idname     from _pgr_getColumnName(sname, tname,id,2,fnName);
-        select * into sourcename from _pgr_getColumnName(sname, tname,source,2,fnName);
-        select * into targetname from _pgr_getColumnName(sname, tname,target,2,fnName);
-        select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2,fnName);
-
-
-        err = sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname;
-        perform _pgr_onError( err, 2, fnName,
-               'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-	       'Column names are OK');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking column types in edge table';
-        select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-        select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-        select * into idtype from _pgr_getColumnType(sname,tname,idname,1, fnName);
-
-        err = idtype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column id:'|| idname, ' Expected type of '|| idname || ' is integer,smallint or bigint but '||idtype||' was found');
-
-        err = sourcetype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column source:'|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-        err = targettype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column target:'|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or bigint but '||targettype||' was found');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         raise debug '%',query;
-         EXECUTE query INTO sridinfo;
-
-         err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-         perform _pgr_onError(err, 2, fnName,
-	     'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-
-         srid := sridinfo.srid;
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking and creating indices in edge table';
-        perform _pgr_createIndex(sname, tname , idname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-
-        gname=quote_ident(gname);
-        idname=quote_ident(idname);
-        sourcename=quote_ident(sourcename);
-        targetname=quote_ident(targetname);
-      raise DEBUG '     --> OK';
-
-
-
-
-
-    BEGIN
-        -- issue #193 & issue #210 & #213
-        -- this sql is for trying out the where clause
-        -- the select * is to avoid any column name conflicts
-        -- limit 1, just try on first record
-        -- if the where clasuse is ill formed it will be caught in the exception
-        sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-        EXECUTE sql into dummyRec;
-        -- end
-
-        -- if above where clasue works this one should work
-        -- any error will be caught by the exception also
-        sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NOT NULL AND '||
-	    idname||' IS NOT NULL)=false '||rows_where;
-        EXECUTE SQL  into notincluded;
-
-        if clean then
-            raise debug 'Cleaning previous Topology ';
-               execute 'UPDATE ' || _pgr_quote_ident(tabname) ||
-               ' SET '||sourcename||' = NULL,'||targetname||' = NULL';
-        else
-            raise debug 'Creating topology for edges with non assigned topology';
-            if rows_where=' AND (true)' then
-                rows_where=  ' and ('||quote_ident(sourcename)||' is null or '||quote_ident(targetname)||' is  null)';
-            end if;
-        end if;
-        -- my thoery is that the select Count(*) will never go through here
-        EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-             RAISE NOTICE '%',sql;
-             RETURN 'FAIL';
-    END;
-
-    BEGIN
-         raise DEBUG 'initializing %',vertname;
-         execute 'select * from _pgr_getTableName('||quote_literal(vertname)
-                                                  || ',0,' || quote_literal(fnName) ||' )' into naming;
-         emptied = false;
-         set client_min_messages  to warning;
-         IF sname=naming.sname AND vname=naming.tname  THEN
-            if clean then
-                execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-                execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-                emptied = true;
-            end if;
-         ELSE -- table doesn't exist
-            execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-            emptied = true;
-         END IF;
-         IF (emptied) THEN
-             execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-	         quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-             perform _pgr_createIndex(vertname , 'the_geom'::text , 'gist'::text);
-         END IF;
-         execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id"}''::text[])' into naming;
-         execute 'set client_min_messages  to '|| debuglevel;
-         raise DEBUG  '  ------>OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: something went wrong when initializing the verties table';
-             RETURN 'FAIL';
-    END;
-
-
-
-    raise notice 'Creating Topology, Please wait...';
-        rowcount := 0;
-        FOR points IN EXECUTE 'SELECT ' || idname || '::bigint AS id,'
-            || ' _pgr_StartPoint(' || gname || ') AS source,'
-            || ' _pgr_EndPoint('   || gname || ') AS target'
-            || ' FROM '  || _pgr_quote_ident(tabname)
-            || ' WHERE ' || gname || ' IS NOT NULL AND ' || idname||' IS NOT NULL '||rows_where
-        LOOP
-
-            rowcount := rowcount + 1;
-            IF rowcount % 1000 = 0 THEN
-                RAISE NOTICE '% edges processed', rowcount;
-            END IF;
-
-
-            source_id := _pgr_pointToId(points.source, tolerance,vertname,srid);
-            target_id := _pgr_pointToId(points.target, tolerance,vertname,srid);
-            BEGIN
-                sql := 'UPDATE ' || _pgr_quote_ident(tabname) ||
-                    ' SET '||sourcename||' = '|| source_id::text || ','||targetname||' = ' || target_id::text ||
-                    ' WHERE ' || idname || ' =  ' || points.id::text;
-
-                IF sql IS NULL THEN
-                    RAISE NOTICE 'WARNING: UPDATE % SET source = %, target = % WHERE % = % ', tabname, source_id::text, target_id::text, idname,  points.id::text;
-                ELSE
-                    EXECUTE sql;
-                END IF;
-                EXCEPTION WHEN OTHERS THEN
-                    RAISE NOTICE '%', SQLERRM;
-                    RAISE NOTICE '%',sql;
-                    RETURN 'FAIL';
-            end;
-        END LOOP;
-        raise notice '-------------> TOPOLOGY CREATED FOR  % edges', rowcount;
-        RAISE NOTICE 'Rows with NULL geometry or NULL id: %',notincluded;
-        Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname), _pgr_quote_ident(vertname);
-        raise notice '----------------------------------------------';
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_createTopology(text, double precision,text,text,text,text,text,boolean)
-IS 'args: edge_table,tolerance, the_geom:=''the_geom'',source:=''source'', target:=''target'',rows_where:=''true'' - fills columns source and target in the geometry table and creates a vertices table for selected rows';
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
-RETURNS character varying AS
-$BODY$
-
-DECLARE
-    points record;
-    seg record;
-    naming record;
-    sridinfo record;
-    srid integer;
-    ecnt integer;
-    vertname text;
-    sname text;
-    tname text;
-    vname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    geotype text;
-    gname text;
-    tabName text;
-    flag boolean ;
-    query text;
-    selectionquery text;
-    i integer;
-    tot integer;
-    NumIsolated integer;
-    numdeadends integer;
-    numgaps integer;
-    NumCrossing integer;
-    numRings integer;
-    debuglevel text;
-
-
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeGraph(''%'',%,''%'',''%'',''%'',''%'',''%'')',edge_table,tolerance,the_geom,id,source,target,rows_where;
-  raise notice 'Performing checks, please wait ...';
-  execute 'show client_min_messages' into debuglevel;
-
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-    raise DEBUG '     --> OK';
-
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","cnt","chk"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET cnt=0 ,chk=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into idname     from _pgr_getColumnName(sname, tname,id,2);
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname, 2,
-                       'pgr_analyzeGraph',  'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-                       'Column names are OK');
-
-        raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-   BEGIN
-       raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         EXECUTE QUERY INTO sridinfo;
-
-         perform _pgr_onError( sridinfo IS NULL OR sridinfo.srid IS NULL,2,
-                 'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname,
-                 'SRID of '||gname||' is '||sridinfo.srid);
-
-         IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-             RAISE NOTICE ' Can not determine the srid of the geometry "%" in table %', the_geom,tabname;
-             RETURN 'FAIL';
-         END IF;
-         srid := sridinfo.srid;
-         raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM;--issue 210,211,213
-             RAISE NOTICE 'ERROR: something went wrong when checking for SRID of % in table %', the_geom,tabname;
-             RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-       raise debug 'Checking  indices in edge table';
-       perform _pgr_createIndex(tabname , idname , 'btree');
-       perform _pgr_createIndex(tabname , sourcename , 'btree');
-       perform _pgr_createIndex(tabname , targetname , 'btree');
-       perform _pgr_createIndex(tabname , gname , 'gist');
-
-       gname=quote_ident(gname);
-       sourcename=quote_ident(sourcename);
-       targetname=quote_ident(targetname);
-       idname=quote_ident(idname);
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking indices';
-          RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-        query='select count(*) from '||_pgr_quote_ident(tabname)||' where true  '||rows_where;
-        EXECUTE query into ecnt;
-        raise DEBUG '-->Rows Where condition: OK';
-        raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-            RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-            RAISE NOTICE 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-            RAISE NOTICE '%',query;
-            RETURN 'FAIL';
-    END;
-
-    selectionquery ='with
-           selectedRows as( (select '||sourcename||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||')
-                           union
-                           (select '||targetname||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||'))';
-
-
-
-
-
-   BEGIN
-       RAISE NOTICE 'Analyzing for dead ends. Please wait...';
-       query= 'with countingsource as (select a.'||sourcename||' as id,count(*) as cnts
-               from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||sourcename||')
-                     ,countingtarget as (select a.'||targetname||' as id,count(*) as cntt
-                    from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||targetname||')
-                   ,totalcount as (select id,case when cnts is null and cntt is null then 0
-                                                   when cnts is null then cntt
-                                                   when cntt is null then cnts
-                                                   else cnts+cntt end as totcnt
-                                   from ('||_pgr_quote_ident(vertname)||' as a left
-                                   join countingsource as t using(id) ) left join countingtarget using(id))
-               update '||_pgr_quote_ident(vertname)||' as a set cnt=totcnt from totalcount as b where a.id=b.id';
-       raise debug '%',query;
-       execute query;
-       query=selectionquery||'
-              SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE cnt=1 and id in (select id from selectedRows)';
-       raise debug '%',query;
-       execute query  INTO numdeadends;
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-          RAISE NOTICE 'ERROR: something went wrong when analizing for dead ends';
-          RETURN 'FAIL';
-   END;
-
-
-
-    BEGIN
-          RAISE NOTICE 'Analyzing for gaps. Please wait...';
-          query = 'with
-                   buffer as (select id,st_buffer(the_geom,'||tolerance||') as buff from '||_pgr_quote_ident(vertname)||' where cnt=1)
-                   ,veryclose as (select b.id,st_crosses(a.'||gname||',b.buff) as flag
-                   from  (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) as a
-                   join buffer as b on (a.'||gname||'&&b.buff)
-                   where '||sourcename||'!=b.id and '||targetname||'!=b.id )
-                   update '||_pgr_quote_ident(vertname)||' set chk=1 where id in (select distinct id from veryclose where flag=true)';
-          raise debug '%' ,query;
-          execute query;
-          GET DIAGNOSTICS  numgaps= ROW_COUNT;
-          raise DEBUG '     --> OK';
-          EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for gaps';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for isolated edges. Please wait...';
-        query=selectionquery|| ' SELECT count(*) FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' )  as a,
-                                                 '||_pgr_quote_ident(vertname)||' as b,
-                                                 '||_pgr_quote_ident(vertname)||' as c
-                            WHERE b.id in (select id from selectedRows) and a.'||sourcename||' =b.id
-                            AND b.cnt=1 AND a.'||targetname||' =c.id
-                            AND c.cnt=1';
-        raise debug '%' ,query;
-        execute query  INTO NumIsolated;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for isolated edges';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for ring geometries. Please wait...';
-        execute 'SELECT geometrytype('||gname||')  FROM '||_pgr_quote_ident(tabname) limit 1 into geotype;
-        IF (geotype='MULTILINESTRING') THEN
-            query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                 WHERE true  '||rows_where||' and st_isRing(st_linemerge('||gname||'))';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        ELSE query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                  WHERE true  '||rows_where||' and st_isRing('||gname||')';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        END IF;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for ring geometries';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for intersections. Please wait...';
-        query = 'select count(*) from (select distinct case when a.'||idname||' < b.'||idname||' then a.'||idname||'
-                                                        else b.'||idname||' end,
-                                                   case when a.'||idname||' < b.'||idname||' then b.'||idname||'
-                                                        else a.'||idname||' end
-                                    FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as a
-                                    JOIN (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as b
-                                    ON (a.'|| gname||' && b.'||gname||')
-                                    WHERE a.'||idname||' != b.'||idname|| '
-                                        and (a.'||sourcename||' in (b.'||sourcename||',b.'||targetname||')
-                                              or a.'||targetname||' in (b.'||sourcename||',b.'||targetname||')) = false
-                                        and st_intersects(a.'||gname||', b.'||gname||')=true) as d ';
-        raise debug '%' ,query;
-        execute query  INTO numCrossing;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for intersections';
-            RETURN 'FAIL';
-    END;
-
-
-
-
-    RAISE NOTICE '            ANALYSIS RESULTS FOR SELECTED EDGES:';
-    RAISE NOTICE '                  Isolated segments: %', NumIsolated;
-    RAISE NOTICE '                          Dead ends: %', numdeadends;
-    RAISE NOTICE 'Potential gaps found near dead ends: %', numgaps;
-    RAISE NOTICE '             Intersections detected: %',numCrossing;
-    RAISE NOTICE '                    Ring geometries: %',numRings;
-
-
-    RETURN 'OK';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_analyzeGraph(text,double precision,text,text,text,text,text) IS 'args: edge_table, tolerance,the_geom:=''the_geom'',id:=''id'',source column:=''source'', target column:=''target'' rows_where:=''true'' - creates a vertices table based on the geometry for selected rows';
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzeOneway(
-   edge_table text,
-   s_in_rules TEXT[],
-   s_out_rules TEXT[],
-   t_in_rules TEXT[],
-   t_out_rules TEXT[],
-   two_way_if_null boolean default true,
-   oneway text default 'oneway',
-   source text default 'source',
-   target text default 'target')
-  RETURNS text AS
-$BODY$
-
-
-DECLARE
-    rule text;
-    ecnt integer;
-    instr text;
-    naming record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    owname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    vertname text;
-    debuglevel text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeOneway(''%'',''%'',''%'',''%'',''%'',''%'',''%'',''%'',%)',
-		edge_table, s_in_rules , s_out_rules, t_in_rules, t_out_rules, oneway, source ,target,two_way_if_null ;
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    raise DEBUG '     --> OK';
-    EXCEPTION WHEN raise_exception THEN
-      RAISE NOTICE 'ERROR: something went wrong checking the table name';
-      RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","ein","eout"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET eout=0 ,ein=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into owname from _pgr_getColumnName(sname, tname,oneway,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,owname) or  targetname=owname, 2,
-                       '_pgr_createToplogy',  'Two columns share the same name', 'Parameter names for oneway,source and target  must be different',
-                       'Column names are OK');
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-
-
-    RAISE NOTICE 'Analyzing graph for one way street errors.';
-
-    rule := CASE WHEN two_way_if_null
-            THEN owname || ' IS NULL OR '
-            ELSE '' END;
-
-    instr := '''' || array_to_string(s_in_rules, ''',''') || '''';
-       EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-      from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-     where a.id=b.'|| sourcename;
-
-    RAISE NOTICE 'Analysis 25%% complete ...';
-
-    instr := '''' || array_to_string(t_in_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 50%% complete ...';
-
-    instr := '''' || array_to_string(s_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-        where a.id=b.'|| sourcename;
-    RAISE NOTICE 'Analysis 75%% complete ...';
-
-    instr := '''' || array_to_string(t_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 100%% complete ...';
-
-    EXECUTE 'SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE ein=0 or eout=0' INTO ecnt;
-
-    RAISE NOTICE 'Found % potential problems in directionality' ,ecnt;
-
-    RETURN 'OK';
-
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_analyzeOneway(text,TEXT[],TEXT[], TEXT[],TEXT[],boolean,text,text,text)
-IS 'args:edge_table , s_in_rules , s_out_rules, t_in_rules , t_out_rules, two_way_if_null:= true, oneway:=''oneway'',source:= ''source'',target:=''target'' - Analizes the directionality of the edges based on the rules';
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createverticestable(
-   edge_table text,
-   the_geom text DEFAULT 'the_geom'::text,
-   source text DEFAULT 'source'::text,
-   target text DEFAULT 'target'::text,
-    rows_where text DEFAULT 'true'::text
-)
-  RETURNS text AS
-$BODY$
-DECLARE
-    naming record;
-    sridinfo record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    sourcename text;
-    targetname text;
-    query text;
-    ecnt bigint;
-    srid integer;
-    sourcetype text;
-    targettype text;
-    sql text;
-    totcount integer;
-    i integer;
-    notincluded integer;
-    included integer;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-
-
-BEGIN
-  fnName = 'pgr_createVerticesTable';
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_createVerticesTable(''%'',''%'',''%'',''%'',''%'')',edge_table,the_geom,source,target,rows_where;
-  execute 'show client_min_messages' into debuglevel;
-
-  raise notice 'Performing checks, please wait .....';
-
-  RAISE DEBUG 'Checking % exists',edge_table;
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-  raise debug '--> Edge table exists: OK';
-
-  raise debug 'Checking column names';
-    select * into sourcename from _pgr_getColumnName(sname, tname,source,2, fnName);
-    select * into targetname from _pgr_getColumnName(sname, tname,target,2, fnName);
-    select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2, fnName);
-
-
-    err = sourcename in (targetname,gname) or  targetname=gname;
-    perform _pgr_onError(err, 2, fnName,
-        'Two columns share the same name', 'Parameter names for the_geom,source and target  must be different');
-  raise debug '--> Column names: OK';
-
-  raise debug 'Checking column types in edge table';
-    select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-    select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-
-
-    err = sourcetype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column source: '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-    err = targettype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column target: '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found');
-
-  raise debug '-->Column types:OK';
-
-  raise debug 'Checking SRID of geometry column';
-     query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-        || ' FROM ' || _pgr_quote_ident(tabname)
-        || ' WHERE ' || quote_ident(gname)
-        || ' IS NOT NULL LIMIT 1';
-     raise debug '%',query;
-     EXECUTE query INTO sridinfo;
-
-     err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-     perform _pgr_onError(err, 2, fnName,
-         'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-     srid := sridinfo.srid;
-  raise DEBUG '     --> OK';
-
-  raise debug 'Checking and creating Indices';
-     perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-  raise DEBUG '-->Check and create indices: OK';
-
-     gname=quote_ident(gname);
-     sourcename=quote_ident(sourcename);
-     targetname=quote_ident(targetname);
-
-
-  BEGIN
-  raise debug 'Checking Condition';
-    -- issue #193 & issue #210 & #213
-    -- this sql is for trying out the where clause
-    -- the select * is to avoid any column name conflicts
-    -- limit 1, just try on first record
-    -- if the where clasuse is ill formed it will be caught in the exception
-    sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-    EXECUTE sql into dummyRec;
-    -- end
-
-    -- if above where clasue works this one should work
-    -- any error will be caught by the exception also
-    sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NULL or '||
-		sourcename||' is null or '||targetname||' is null)=true '||rows_where;
-    raise debug '%',sql;
-    EXECUTE SQL  into notincluded;
-    EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-
-
-
-  BEGIN
-     raise DEBUG 'initializing %',vertname;
-       execute 'select * from _pgr_getTableName('||quote_literal(vertname)||',0)' into naming;
-       IF sname=naming.sname  AND vname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-       ELSE
-           set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-       END IF;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-                quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-       execute 'CREATE INDEX '||quote_ident(vname||'_the_geom_idx')||' ON '||_pgr_quote_ident(vertname)||'  USING GIST (the_geom)';
-       execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-       EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Initializing vertex table';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise notice 'Populating %, please wait...',vertname;
-       sql= 'with
-		lines as ((select distinct '||sourcename||' as id, _pgr_startpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-		                  ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||')
-			union (select distinct '||targetname||' as id,_pgr_endpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-			          ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||'))
-		,numberedLines as (select row_number() OVER (ORDER BY id) AS i,* from lines )
-		,maxid as (select id,max(i) as maxi from numberedLines group by id)
-		insert into '||_pgr_quote_ident(vertname)||'(id,the_geom)  (select id,the_geom  from numberedLines join maxid using(id) where i=maxi order by id)';
-       RAISE debug '%',sql;
-       execute sql;
-       GET DIAGNOSTICS totcount = ROW_COUNT;
-
-       sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' a, '||_pgr_quote_ident(vertname)||' b
-            where '||sourcename||'=b.id and '|| targetname||' in (select id from '||_pgr_quote_ident(vertname)||')';
-       RAISE debug '%',sql;
-       execute sql into included;
-
-
-
-       execute 'select max(id) from '||_pgr_quote_ident(vertname) into ecnt;
-       execute 'SELECT setval('||quote_literal(vertname||'_id_seq')||','||coalesce(ecnt,1)||' , false)';
-       raise notice '  ----->   VERTICES TABLE CREATED WITH  % VERTICES', totcount;
-       raise notice '                                       FOR   %  EDGES', included+notincluded;
-       RAISE NOTICE '  Edges with NULL geometry,source or target: %',notincluded;
-       RAISE NOTICE '                            Edges processed: %',included;
-       Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname),_pgr_quote_ident(vertname);
-       raise notice '----------------------------------------------';
-    END;
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_createVerticesTable(text,text,text,text,text)
-IS 'args: edge_table, the_geom:=''the_geom'',source:=''source'', target:=''target'' rows_where:=''true'' - creates a vertices table based on the source and target identifiers for selected rows';
-
-
-CREATE OR REPLACE FUNCTION pgr_nodeNetwork(edge_table text, tolerance double precision,
-			id text default 'id', the_geom text default 'the_geom', table_ending text default 'noded',
-            rows_where text DEFAULT ''::text, outall boolean DEFAULT false) RETURNS text AS
-$BODY$
-DECLARE
-	
-	p_num int := 0;
-	p_ret text := '';
-    pgis_ver_old boolean := _pgr_versionless(postgis_lib_version(), '2.1.0.0');
-    vst_line_substring text;
-    vst_line_locate_point text;
-    intab text;
-    outtab text;
-    n_pkey text;
-    n_geom text;
-    naming record;
-    sname text;
-    tname text;
-    outname text;
-    srid integer;
-    sridinfo record;
-    splits bigint;
-    touched bigint;
-    untouched bigint;
-    geomtype text;
-    debuglevel text;
-    rows_where text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_nodeNetwork(''%'', %, ''%'', ''%'', ''%'', ''%'',  %)',
-    edge_table, tolerance, id,  the_geom, table_ending, rows_where, outall;
-  raise notice 'Performing checks, please wait .....';
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',0)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-	RAISE NOTICE '-------> % not found',edge_table;
-        RETURN 'FAIL';
-    ELSE
-	RAISE DEBUG '  -----> OK';
-    END IF;
-
-    intab=sname||'.'||tname;
-    outname=tname||'_'||table_ending;
-    outtab= sname||'.'||outname;
-    rows_where = CASE WHEN length(rows_where) > 2 and not outall THEN ' AND (' || rows_where || ')' ELSE '' END;
-    rows_where = CASE WHEN length(rows_where) > 2 THEN ' WHERE (' || rows_where || ')' ELSE '' END;
-  END;
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',id,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(id)||')' INTO n_pkey;
-       IF n_pkey is NULL then
-          raise notice  'ERROR: id column "%"  not found in %',id,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',the_geom,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(the_geom)||')' INTO n_geom;
-       IF n_geom is NULL then
-          raise notice  'ERROR: the_geom  column "%"  not found in %',the_geom,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-  IF n_pkey=n_geom THEN
-	raise notice  'ERROR: id and the_geom columns have the same name "%" in %',n_pkey,intab;
-        RETURN 'FAIL';
-  END IF;
-
-  BEGIN
-       	raise DEBUG 'Checking the SRID of the geometry "%"', n_geom;
-       	EXECUTE 'SELECT ST_SRID(' || quote_ident(n_geom) || ') as srid '
-          		|| ' FROM ' || _pgr_quote_ident(intab)
-          		|| ' WHERE ' || quote_ident(n_geom)
-          		|| ' IS NOT NULL LIMIT 1' INTO sridinfo;
-       	IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-        	RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           	RETURN 'FAIL';
-       	END IF;
-       	srid := sridinfo.srid;
-       	raise DEBUG '  -----> SRID found %',srid;
-       	EXCEPTION WHEN OTHERS THEN
-           		RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           		RETURN 'FAIL';
-  END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_pkey,intab;
-      if (_pgr_isColumnIndexed(intab,n_pkey)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding  index "%_%_idx".',n_pkey,intab;
-
-	set client_min_messages  to warning;
-        execute 'create  index '||tname||'_'||n_pkey||'_idx on '||_pgr_quote_ident(intab)||' using btree('||quote_ident(n_pkey)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_geom,intab;
-      if (_pgr_iscolumnindexed(intab,n_geom)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding unique index "%_%_gidx".',intab,n_geom;
-	set client_min_messages  to warning;
-        execute 'CREATE INDEX '
-            || quote_ident(tname || '_' || n_geom || '_gidx' )
-            || ' ON ' || _pgr_quote_ident(intab)
-            || ' USING gist (' || quote_ident(n_geom) || ')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
----------------
-    BEGIN
-       raise DEBUG 'initializing %',outtab;
-       execute 'select * from _pgr_getTableName('||quote_literal(outtab)||',0)' into naming;
-       IF sname=naming.sname  AND outname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(outtab)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(outname)||','||quote_literal(n_geom)||')';
-       ELSE
-	   set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(outtab)||' (id bigserial PRIMARY KEY,old_id integer,sub_id integer,
-								source bigint,target bigint)';
-       END IF;
-       execute 'select geometrytype('||quote_ident(n_geom)||') from  '||_pgr_quote_ident(intab)||' limit 1' into geomtype;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(outname)||','||
-                quote_literal(n_geom)||','|| srid||', '||quote_literal(geomtype)||', 2)';
-       execute 'CREATE INDEX '||quote_ident(outname||'_'||n_geom||'_idx')||' ON '||_pgr_quote_ident(outtab)||'  USING GIST ('||quote_ident(n_geom)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-    END;
-----------------
-
-
-  raise notice 'Processing, please wait .....';
-
-
-    if pgis_ver_old then
-        vst_line_substring    := 'st_line_substring';
-        vst_line_locate_point := 'st_line_locate_point';
-    else
-        vst_line_substring    := 'st_linesubstring';
-        vst_line_locate_point := 'st_linelocatepoint';
-    end if;
-
---    -- First creates temp table with intersection points
-    p_ret = 'create temp table intergeom on commit drop as (
-        select l1.' || quote_ident(n_pkey) || ' as l1id,
-               l2.' || quote_ident(n_pkey) || ' as l2id,
-	       l1.' || quote_ident(n_geom) || ' as line,
-	       _pgr_startpoint(l2.' || quote_ident(n_geom) || ') as source,
-	       _pgr_endpoint(l2.' || quote_ident(n_geom) || ') as target,
-               st_intersection(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ') as geom
-        from (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l1
-             join (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l2
-             on (st_dwithin(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ', ' || tolerance || '))'||
-        'where l1.' || quote_ident(n_pkey) || ' <> l2.' || quote_ident(n_pkey)||' and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false  )';
-    raise debug '%',p_ret;
-    EXECUTE p_ret;
-
-    -- second temp table with locus (index of intersection point on the line)
-    -- to avoid updating the previous table
-    -- we keep only intersection points occurring onto the line, not at one of its ends
---    drop table if exists inter_loc;
-
---HAD TO CHANGE THIS QUERY
--- p_ret= 'create temp table inter_loc on commit drop as (
---        select l1id, l2id, ' || vst_line_locate_point || '(line,point) as locus from (
---        select DISTINCT l1id, l2id, line, (ST_DumpPoints(geom)).geom as point from intergeom) as foo
---        where ' || vst_line_locate_point || '(line,point)<>0 and ' || vst_line_locate_point || '(line,point)<>1)';
-    p_ret= 'create temp table inter_loc on commit drop as ( select * from (
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,source) as locus from intergeom)
-         union
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,target) as locus from intergeom)) as foo
-        where locus<>0 and locus<>1)';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-
-    -- index on l1id
-    create index inter_loc_id_idx on inter_loc(l1id);
-
-    -- Then computes the intersection on the lines subset, which is much smaller than full set
-    -- as there are very few intersection points
-
---- outab needs to be formally created with id, old_id, subid,the_geom, source,target
----  so it can be inmediatly be used with createTopology
-
---   EXECUTE 'drop table if exists ' || _pgr_quote_ident(outtab);
---   EXECUTE 'create table ' || _pgr_quote_ident(outtab) || ' as
-     P_RET = 'insert into '||_pgr_quote_ident(outtab)||' (old_id,sub_id,'||quote_ident(n_geom)||') (  with cut_locations as (
-           select l1id as lid, locus
-           from inter_loc
-           -- then generates start and end locus for each line that have to be cut buy a location point
-           UNION ALL
-           select i.l1id  as lid, 0 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           UNION ALL
-           select i.l1id  as lid, 1 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           order by lid, locus
-       ),
-       -- we generate a row_number index column for each input line
-       -- to be able to self-join the table to cut a line between two consecutive locations
-       loc_with_idx as (
-           select lid, locus, row_number() over (partition by lid order by locus) as idx
-           from cut_locations
-       )
-       -- finally, each original line is cut with consecutive locations using linear referencing functions
-       select l.' || quote_ident(n_pkey) || ', loc1.idx as sub_id, ' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus) as ' || quote_ident(n_geom) || '
-       from loc_with_idx loc1 join loc_with_idx loc2 using (lid) join ' || _pgr_quote_ident(intab) || ' l on (l.' || quote_ident(n_pkey) || ' = loc1.lid)
-       where loc2.idx = loc1.idx+1
-           -- keeps only linestring geometries
-           and geometryType(' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus)) = ''LINESTRING'') ';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-	GET DIAGNOSTICS splits = ROW_COUNT;
-        execute 'with diff as (select distinct old_id from '||_pgr_quote_ident(outtab)||' )
-                 select count(*) from diff' into touched;
-	-- here, it misses all original line that did not need to be cut by intersection points: these lines
-	-- are already clean
-	-- inserts them in the final result: all lines which gid is not in the res table.
-	EXECUTE 'insert into ' || _pgr_quote_ident(outtab) || ' (old_id , sub_id, ' || quote_ident(n_geom) || ')
-                ( with used as (select distinct old_id from '|| _pgr_quote_ident(outtab)||')
-		select ' ||  quote_ident(n_pkey) || ', 1 as sub_id, ' ||  quote_ident(n_geom) ||
-		' from '|| _pgr_quote_ident(intab) ||' where  '||quote_ident(n_pkey)||' not in (select * from used)' || rows_where || ')';
-	GET DIAGNOSTICS untouched = ROW_COUNT;
-
-	raise NOTICE '  Split Edges: %', touched;
-	raise NOTICE ' Untouched Edges: %', untouched;
-	raise NOTICE '     Total original Edges: %', touched+untouched;
-        RAISE NOTICE ' Edges generated: %', splits;
-	raise NOTICE ' Untouched Edges: %',untouched;
-	raise NOTICE '       Total New segments: %', splits+untouched;
-        RAISE NOTICE ' New Table: %', outtab;
-        RAISE NOTICE '----------------------------------';
-
-    drop table  if exists intergeom;
-    drop table if exists inter_loc;
-    RETURN 'OK';
-END;
-$BODY$
-    LANGUAGE 'plpgsql' VOLATILE STRICT COST 100;
-
-
-COMMENT ON FUNCTION pgr_nodeNetwork(text, double precision, text, text, text, text, boolean )
- IS  'edge_table, tolerance, id:=''id'', the_geom:=''the_geom'', table_ending:=''noded'' ';
-
-
-CREATE OR REPLACE FUNCTION pgr_labelGraph(
-                edge_table text,
-                id text default 'id',
-                source text default 'source',
-                target text default 'target',
-                subgraph text default 'subgraph',
-                rows_where text default 'true'
-        )
-        RETURNS character varying AS
-$BODY$
-
-DECLARE
-        naming record;
-        schema_name text;
-        table_name text;
-        garbage text;
-        incre integer;
-        table_schema_name text;
-        query text;
-        ecnt integer;
-        sql1 text;
-        rec1 record;
-        sql2 text;
-        rec2 record;
-        rec_count record;
-        rec_single record;
-        graph_id integer;
-        gids int [];
-
-BEGIN
-        raise notice 'Processing:';
-        raise notice 'pgr_brokenGraph(''%'',''%'',''%'',''%'',''%'',''%'')', edge_table,id,source,target,subgraph,rows_where;
-        raise notice 'Performing initial checks, please hold on ...';
-
-        Raise Notice 'Starting - Checking table ...';
-        BEGIN
-                raise debug 'Checking % table existance', edge_table;
-                execute 'select * from pgr_getTableName('|| quote_literal(edge_table) ||')' into naming;
-                schema_name = naming.sname;
-                table_name = naming.tname;
-                table_schema_name = schema_name||'.'||table_name;
-                IF schema_name is null then
-                        raise notice 'no schema';
-                        return 'FAIL';
-                else
-                        if table_name is null then
-                                raise notice 'no table';
-                                return 'FAIL';
-                        end if;
-                end if;
-        END;
-        Raise Notice 'Ending - Checking table';
-
-        Raise Notice 'Starting - Checking columns';
-        BEGIN
-                raise debug 'Checking exitance of necessary columns inside % table', edge_table;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(id) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no id column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(source) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no source column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(target) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no target column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(subgraph) ||')' into naming;
-                if naming.pgr_iscolumnintable = 't' then
-                        raise notice 'subgraph column already in the table';
-                        return 'FAIL';
-                end if;
-        END;
-        Raise Notice 'Ending - Checking columns';
-
-        Raise Notice 'Starting - Checking rows_where condition';
-        BEGIN
-                raise debug 'Checking rows_where condition';
-                query='select count(*) from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where;
-                execute query into ecnt;
-                raise debug '-->Rows where condition: OK';
-                raise debug '    --> OK';
-                EXCEPTION WHEN OTHERS THEN
-                        raise notice 'Got %', SQLERRM;
-                        Raise notice 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-                        Raise notice '%', query;
-                        return 'FAIL';
-        END;
-        Raise Notice 'Ending - Checking rows_where condition';
-
-        garbage := 'garbage001';
-        incre := 1;
-        Raise Notice 'Starting - Checking temporary column';
-        Begin
-                raise debug 'Checking Checking temporary columns existance';
-
-                While True
-                        Loop
-                                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(garbage) ||')' into naming;
-                                If naming.pgr_iscolumnintable = 't' THEN
-                                        incre := incre + 1;
-                                        garbage := 'garbage00'||incre||'';
-                                ELSE
-                                        EXIT;
-                                END IF;
-                        End Loop;
-        End;
-        Raise Notice 'Ending - Checking temporary column';
-
-        Raise Notice 'Starting - Calculating subgraphs';
-        BEGIN
-                --------- Add necessary columns ----------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(subgraph) || ' INTEGER DEFAULT -1';
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(garbage) || ' INTEGER DEFAULT 0';
-                graph_id := 1;
-
-                EXECUTE 'select count(*) as count from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where ||'' into rec_count;
-                if rec_count.count = 0 then
-                        RETURN 'rows_where condition generated 0 rows';
-                end if;
-
-                WHILE TRUE
-                        LOOP
-                                ---------- Assign the very first -1 row graph_id ----------
-                                EXECUTE 'SELECT ' || pgr_quote_ident(id) || ' AS gid FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1 LIMIT 1' INTO rec_single;
-                                EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec_single.gid || '';
-
-                                --------- Search other rows with that particular graph_id -----------
-                                WHILE TRUE
-                                        LOOP
-                                                EXECUTE 'SELECT COUNT(*) FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0' into rec_count;
-                                                ----------- The following if else will check those rows which already have entertained ------------
-                                                IF (rec_count.count > 0) THEN
-                                                        sql1 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0';
-                                                        FOR rec1 IN EXECUTE sql1
-                                                                LOOP
-                                                                        sql2 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| pgr_quote_ident(source) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(source) ||' = '|| rec1.target ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.target ||'';
-                                                                        FOR rec2 IN EXECUTE sql2
-                                                                                LOOP
-                                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec2.gid || '';
-                                                                                END LOOP;
-                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(garbage) || ' = 1 WHERE ' || pgr_quote_ident(id) || ' = ' || rec1.gid || '';
-                                                                END LOOP;
-                                                ELSE
-                                                        EXIT;
-                                                END IF;
-                                        END LOOP;
-
-                                ------ Following is to exit the while loop. 0 means no more -1 id.
-                                EXECUTE 'SELECT COUNT(*) AS count FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1' INTO rec_count;
-                                If (rec_count.count = 0) THEN
-                                        EXIT;
-                                ELSE
-                                        graph_id := graph_id + 1;
-                                END IF;
-                        END LOOP;
-
-                ----------- Drop garbage column ------------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' DROP COLUMN ' || pgr_quote_ident(garbage) ||'';
-                Raise Notice 'Successfully complicated calculating subgraphs';
-        END;
-        Raise Notice 'Ending - Calculating subgraphs';
-
-        RETURN 'OK';
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCostMatrix(
-    edges_sql TEXT,
-    points_sql TEXT,
-    pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_pid, a.end_pid, a.agg_cost
-        FROM _pgr_withPoints($1, $2, $3, $3, $4,  $5, TRUE, TRUE) AS a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
---  DIJKSTRA DMatrix
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2, $2, $3, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
---  BIDIRECTIONAL DIJKSTRA Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_astarCostMatrix(
-    edges_sql TEXT, -- XY edges sql
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2, $2, $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
---  BIDIRECTIONAL ASTAR Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdAstarCostMatrix(
-    edges_sql TEXT,
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_bdAstarCostMatrix(TEXT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCostMatrix';
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_getTableName(IN tab text,OUT sname text,OUT tname text)
-RETURNS RECORD AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getTableName: This function will no longer be soported';
-    select * from _pgr_getTableName(tab, 0, 'pgr_getTableName') into sname,tname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_getColumnName(tab text, col text)
-RETURNS text AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getColumnName: This function will no longer be soported';
-    return _pgr_getColumnName(tab,col, 0, 'pgr_getColumnName');
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    select * from _pgr_getColumnName(tab,col,0, 'pgr_isColumnInTable') into cname;
-    return  cname IS not NULL;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnIndexed(tab text, col text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnIndexed: This function will no longer be soported';
-    return  _pgr_isColumnIndexed(tab,col);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-create or replace function pgr_quote_ident(idname text)
-returns text as
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    return  _pgr_quote_ident(idname);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_versionless(v1 text, v2 text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_versionless: This function will no longer be soported';
-    return  _pgr_versionless(v1,v2);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-create or replace function pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_startPoint: This function will no longer be soported';
-    return  _pgr_startPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_endPoint: This function will no longer be soported';
-    return  _pgr_endPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspJohnson(edges_sql text)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_johnson instead';
-      has_reverse =_pgr_parameter_check('johnson', edges_sql, false);
-      sql = edges_sql;
-      IF (has_reverse) THEN
-           RAISE NOTICE 'reverse_cost column found, removing.';
-           sql = 'SELECT source, target, cost FROM (' || edges_sql || ') a';
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () - 1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_johnson(sql, TRUE);
-  END
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspWarshall(edges_sql text, directed boolean, has_rcost boolean)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_floydWarshall instead';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-      sql := edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         ELSE raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () -1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_floydWarshall(sql, directed);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_astar(edges_sql TEXT, source_id INTEGER, target_id INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated signature pgr_astar(text, integer, integer, boolean, boolean)';
-    has_reverse =_pgr_parameter_check('astar', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost, x1,y1, x2, y2 FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-    FROM pgr_astar(sql, ARRAY[$2], ARRAY[$3], directed);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    sql TEXT,
-    source_vid INTEGER,
-    target_vid INTEGER,
-    directed BOOLEAN,
-    has_reverse_cost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdAstar';
-    has_reverse =_pgr_parameter_check('astar', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdAstar(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(edges_sql TEXT, start_vid INTEGER, end_vid INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdDijkstra';
-    has_reverse =_pgr_parameter_check('dijkstra', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdDijkstra(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstraPath(
-    sql text,
-    source INTEGER,
-    targets INTEGER ARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-    RETURNS SETOF pgr_costResult3 AS
-    $BODY$
-    DECLARE
-    has_reverse BOOLEAN;
-    new_sql TEXT;
-    result pgr_costResult3;
-    tmp pgr_costResult3;
-    sseq INTEGER;
-    i INTEGER;
-    BEGIN
-        RAISE NOTICE 'Deprecated function: Use pgr_dijkstra instead.';
-        has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-        new_sql = sql;
-        IF (array_ndims(targets) != 1) THEN
-            raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-
-        IF (has_reverse != has_rcost) THEN
-            IF (has_reverse) THEN
-                new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-            ELSE
-                raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-                USING ERRCODE = 'XX000';
-            END IF;
-        END IF;
-        SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-        sseq = 0; i = 1;
-        FOR result IN
-            SELECT seq, a.end_vid::INTEGER AS id1, a.node::INTEGER AS i2, a.edge::INTEGER AS id3, cost
-            FROM pgr_dijkstra(new_sql, source, targets, directed) a ORDER BY a.end_vid, seq LOOP
-            WHILE (result.id1 != targets[i]) LOOP
-                tmp.seq = sseq;
-                tmp.id1 = targets[i];
-                IF (targets[i] = source) THEN
-                    tmp.id2 = source;
-                    tmp.cost =0;
-                ELSE
-                    tmp.id2 = 0;
-                    tmp.cost = -1;
-                END IF;
-                tmp.id3 = -1;
-                RETURN next tmp;
-                i = i + 1;
-                sseq = sseq + 1;
-            END LOOP;
-        IF (result.id1 = targets[i] AND result.id3 != -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-        IF (result.id1 = targets[i] AND result.id3 = -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.id2 = source;
-            tmp.cost = 0;
-        ELSE
-            tmp.id2 = 0;
-            tmp.cost = -1;
-        END IF;
-        tmp.id3 = -1;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstracost(
-    sql text,
-    source INTEGER,
-    targets INTEGER array,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-result pgr_costResult;
-tmp pgr_costResult;
-sseq INTEGER;
-i INTEGER;
-BEGIN
-    RAISE NOTICE 'Deprecated function. Use pgr_dijkstraCost instead.';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    new_sql = sql;
-    IF (array_ndims(targets) != 1) THEN
-        raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-        USING ERRCODE = 'XX000';
-    END IF;
-
-
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-    sseq = 0; i = 1;
-    FOR result IN
-        SELECT ((row_number() over()) -1)::INTEGER, a.start_vid::INTEGER, a.end_vid::INTEGER, agg_cost
-        FROM pgr_dijkstraCost(new_sql, source, targets, directed) a ORDER BY end_vid LOOP
-        WHILE (result.id2 != targets[i]) LOOP
-            tmp.seq = sseq;
-            tmp.id1 = source;
-            tmp.id2 = targets[i];
-            IF (targets[i] = source) THEN
-                tmp.cost = 0;
-            ELSE
-                tmp.cost = -1;
-            END IF;
-            RETURN next tmp;
-            i = i + 1;
-            sseq = sseq + 1;
-        END LOOP;
-        IF (result.id2 = targets[i]) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = source;
-        tmp.id2 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.cost = 0;
-        ELSE
-            tmp.cost = -1;
-        END IF;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-create or replace function pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    returns integer as
-$body$
-
-declare
-    rr record;
-    pct float;
-    debuglevel text;
-
-begin
-    -- find the closest edge within tol distance
-    execute 'select * from ' || _pgr_quote_ident(edges) ||
-            ' where st_dwithin(''' || pnt::text ||
-            '''::geometry, the_geom, ' || tol || ') order by st_distance(''' || pnt::text ||
-            '''::geometry, the_geom) asc limit 1' into rr;
-
-    if rr.the_geom is not null then
-        -- deal with MULTILINESTRINGS
-        if geometrytype(rr.the_geom)='MULTILINESTRING' THEN
-            rr.the_geom := ST_GeometryN(rr.the_geom, 1);
-        end if;
-
-        -- project the point onto the linestring
-        execute 'show client_min_messages' into debuglevel;
-        SET client_min_messages='ERROR';
-        pct := st_line_locate_point(rr.the_geom, pnt);
-        execute 'set client_min_messages  to '|| debuglevel;
-
-        -- return the node we are closer to
-        if pct < 0.5 then
-            return rr.source;
-        else
-            return rr.target;
-        end if;
-    else
-        -- return a failure to find an edge within tol distance
-        return -1;
-    end if;
-end;
-$body$
-  language plpgsql volatile
-  cost 5;
-
-
-----------------------------------------------------------------------------
-
-create or replace function pgr_flipedges(ga geometry[])
-    returns geometry[] as
-$body$
-
-declare
-    nn integer;
-    i integer;
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_flipEdges';
-    -- get the count of edges, and return if only one edge
-    nn := array_length(ga, 1);
-    if nn=1 then
-        return ga;
-    end if;
-
-    -- determine if first needs to be flipped
-    g := _pgr_startpoint(ga[1]);
-
-    -- if the start of the first is connected to the second then it needs to be flipped
-    if _pgr_startpoint(ga[2])=g or _pgr_endpoint(ga[2])=g then
-        ga[1] := st_reverse(ga[1]);
-    end if;
-    g := _pgr_endpoint(ga[1]);
-
-    -- now if  the end of the last edge matchs the end of the current edge we need to flip it
-    for i in 2 .. nn loop
-        if _pgr_endpoint(ga[i])=g then
-            ga[i] := st_reverse(ga[i]);
-        end if;
-        -- save the end of this edge into the last end for the next cycle
-        g := _pgr_endpoint(ga[i]);
-    end loop;
-
-    return ga;
-end;
-$body$
-    language plpgsql immutable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_texttopoints(pnts text, srid integer DEFAULT(4326))
-    returns geometry[] as
-$body$
-
-declare
-    a text[];
-    t text;
-    p geometry;
-    g geometry[];
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_textToPoints';
-    -- convert commas to space and split on ';'
-    a := string_to_array(replace(pnts, ',', ' '), ';');
-    -- convert each 'x y' into a point geometry and concattenate into a new array
-    for t in select unnest(a) loop
-        p := st_pointfromtext('POINT(' || t || ')', srid);
-        g := g || p;
-    end loop;
-
-    return g;
-end;
-$body$
-    language plpgsql immutable;
-
------------------------------------------------------------------------
-
-create or replace function pgr_pointstovids(pnts geometry[], edges text, tol float8 DEFAULT(0.01))
-    returns integer[] as
-$body$
-
-declare
-    v integer[];
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_pointsToVids';
-    -- cycle through each point and locate the nearest edge and vertex on that edge
-    for g in select unnest(pnts) loop
-        v := v || pgr_pointtoedgenode(edges, g, tol);
-    end loop;
-
-    return v;
-end;
-$body$
-    language plpgsql stable;
-
-
-create or replace function pgr_pointstodmatrix(pnts geometry[], mode integer default (0), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    r record;
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_pointsToDMatrix';
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    -- create an id for each point in the array and unnest it into a table nodes in the with clause
-    for r in with nodes as (select row_number() over()::integer as id, p from (select unnest(pnts) as p) as foo)
-        -- compute a row of distances
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j,
-                case when mode=0
-                    then st_distance(a.p, b.p)
-                    else st_distance_sphere(a.p, b.p)
-                end as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i loop
-
-        -- you must concat an array[array[]] to make dmatrix[][]
-        -- concat the row of distances to the dmatrix
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-end;
-$body$
-    language plpgsql stable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_vidstodmatrix(IN vids integer[], IN pnts geometry[], IN edges text, tol float8 DEFAULT(0.1), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    i integer;
-    j integer;
-    nn integer;
-    rr record;
-    bbox geometry;
-    t float8[];
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    -- check if the input arrays has any -1 values, maybe this whould be a raise exception
-    if vids @> ARRAY[-1] then
-    raise notice 'Some vids are undefined (-1)!';
-    dmatrix := null;
-    ids := null;
-    return;
-    end if;
-
-    ids := vids;
-
-    -- get the count of nodes
-    nn := array_length(vids,1);
-
-    -- zero out a dummy row
-    for i in 1 .. nn loop
-        t := t || 0.0::float8;
-    end loop;
-
-    -- using the dummy row, zero out the whole matrix
-    for i in 1 .. nn loop
-    dmatrix := dmatrix || ARRAY[t];
-    end loop;
-
-    for i in 1 .. nn-1 loop
-        j := i;
-        -- compute the bbox for the point needed for this row
-        select st_expand(st_collect(pnts[id]), tol) into bbox
-          from (select generate_series as id from generate_series(i, nn)) as foo;
-
-        -- compute kdijkstra() for this row
-        for rr in execute 'select * from pgr_dijkstracost($1, $2, $3, false)'
-                  using 'select id, source, target, cost from ' || edges ||
-                        ' where the_geom && ''' || bbox::text || '''::geometry'::text, vids[i], vids[i+1:nn] loop
-
-            -- TODO need to check that all node were reachable from source
-            -- I think unreachable paths between nodes returns cost=-1.0
-
-            -- populate the matrix with the cost values, remember this is symmetric
-            j := j + 1;
-            -- raise notice 'cost(%,%)=%', i, j, rr.agg_cost;
-            dmatrix[i][j] := rr.agg_cost;
-            dmatrix[j][i] := rr.agg_cost;
-        end loop;
-    end loop;
-
-end;
-$body$
-    language plpgsql stable cost 200;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_vidsToDMatrix(sql TEXT, vids  INTEGER[], dir BOOLEAN, has_rcost BOOLEAN, want_symmetric BOOLEAN)
-RETURNS float8[] AS
-$BODY$
-DECLARE
-directed BOOLEAN;
-has_reverse BOOLEAN;
-edges_sql TEXT;
-dmatrix_row float8[];
-dmatrix float8[];
-cell RECORD;
-unique_vids INTEGER[];
-total BIGINT;
-from_v BIGINT;
-to_v BIGINT;
-BEGIN
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql = sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    unique_vids :=  ARRAY(SELECT DISTINCT UNNEST(vids) ORDER BY 1);
-
-    IF want_symmetric THEN
-        directed = false;
-    ELSE
-        directed = dir;
-    END IF;
-
-    total := array_length(unique_vids, 1);
-
-    -- initializing dmatrix
-    FOR i in 1 .. total LOOP
-        dmatrix_row := dmatrix_row || '+Infinity'::float8;
-    END LOOP;
-    FOR i in 1 .. total LOOP
-    dmatrix := dmatrix || ARRAY[dmatrix_row];
-    dmatrix[i][i] = 0;
-    END LOOP;
-
-    CREATE TEMP TABLE __x___y____temp AS
-        WITH result AS
-            (SELECT unnest(unique_vids) AS vid)
-        SELECT row_number() OVER() AS idx, vid FROM result;
-
-    FOR cell IN SELECT * FROM pgr_dijkstraCostMatrix(sql, unique_vids, directed) LOOP
-        SELECT idx INTO from_v FROM __x___y____temp WHERE vid =  cell.start_vid;
-        SELECT idx INTO to_v FROM __x___y____temp WHERE vid =  cell.end_vid;
-
-        dmatrix[from_v][to_v] = cell.agg_cost;
-        dmatrix[to_v][from_v] = cell.agg_cost;
-    END LOOP;
-
-    DROP TABLE IF EXISTS __x___y____temp;
-    RETURN dmatrix;
-
-    EXCEPTION WHEN others THEN
-       DROP TABLE IF EXISTS __x___y____temp;
-       raise exception '% %', SQLERRM, SQLSTATE;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated function';
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_dijkstra(sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_dijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN) IS 'pgr_dijkstra(Deprecated signature)';
-
-
-
-
-
--- OLD SIGNATURE
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(edges_sql text, source BIGINT, distance FLOAT, directed BOOLEAN, has_rcost BOOLEAN)
-  RETURNS SETOF pgr_costresult AS
-  $BODY$
-  DECLARE
-  has_reverse BOOLEAN;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function';
-
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, FALSE);
-
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-             -- the user says it doesn't have reverse cost but its false
-             -- removing from query
-             RAISE NOTICE 'Contradiction found: has_rcost set to false but reverse_cost column found';
-             sql = 'SELECT id, source, target, cost, -1 as reverse_cost FROM (' || edges_sql || ') __q ';
-         ELSE
-             -- the user says it has reverse cost but its false
-             -- can't do anything
-             RAISE EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query SELECT seq - 1 AS seq, node::integer AS id1, edge::integer AS id2, agg_cost AS cost
-                FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maximumcardinalitymatching(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---INTERNAL FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
-------------------------
--- deprecated signatures
------------------------
-
-COMMENT ON FUNCTION pgr_astar(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_astar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdAstar( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdAstar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdDijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdDijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_dijkstra(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_dijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_drivingDistance(text,  BIGINT,  FLOAT8,  BOOLEAN,  BOOLEAN)
-    IS 'pgr_drivingDistance(Deprecated signature)';
-
-------------------------
--- Renamed /deprecated
------------------------
-COMMENT ON FUNCTION pgr_apspJohnson(TEXT)
-    IS 'pgr_apspJohnson(Renamed function) use pgr_Johnson instead';
-
-COMMENT ON FUNCTION pgr_apspWarshall(text, boolean, boolean)
-    IS 'pgr_apspWarshall(Renamed function) use pgr_floydWarshall instead';
-
-COMMENT ON FUNCTION pgr_kdijkstraPath( text, INTEGER, INTEGER ARRAY, BOOLEAN, BOOLEAN)
-    IS 'pgr_kdijkstraPath(Renamed function) use pgr_dijkstra instead';
-
-COMMENT ON FUNCTION pgr_kdijkstracost( text, INTEGER, INTEGER array, BOOLEAN, BOOLEAN)
-    IS 'pgr_kDijkstraCost(Renamed function) use pgr_dijkstraCost instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-
-
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-
-
-COMMENT ON FUNCTION pgr_gsoc_vrppdtw( text, INTEGER, INTEGER)
-    IS 'pgr_gsoc_vrppdtw(Renamed function) use pgr_pickDeliverEuclidean instead';
-
-------------------------
--- Deprecated functions
------------------------
-
-COMMENT ON FUNCTION pgr_flipedges(geometry[])
-    IS 'pgr_flipedges(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_texttopoints(text,  integer)
-    IS 'pgr_texttopoints(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstovids(pnts geometry[], edges text, tol float8)
-    IS 'pgr_pointstovids(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    IS 'pgr_pointtoedgenode(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstodmatrix(geometry[], integer)
-    IS 'pgr_pointstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidstodmatrix( integer[],  geometry[],  text, float8)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidsToDMatrix(TEXT,  INTEGER[], BOOLEAN, BOOLEAN, BOOLEAN)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-
-
-
-COMMENT ON FUNCTION pgr_getTableName(IN tab text)
-    IS 'pgr_getTableName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_getColumnName(tab text, col text)
-    IS 'pgr_getColumnName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnInTable(tab text, col text)
-    IS 'pgr_isColumnInTable(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnIndexed(tab text, col text)
-    IS 'pgr_isColumnIndexed(Deprecated function)';
-
-
-COMMENT ON FUNCTION pgr_quote_ident(idname text)
-    IS 'pgr_quote_ident(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_versionless(v1 text, v2 text)
-    IS 'pgr_versionless(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_startPoint(g geometry)
-    IS 'pgr_startPoint(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_endPoint(g geometry)
-    IS 'pgr_endPoint(Deprecated function)';
-
-
diff --git a/tools/sql-update-scripts/pgrouting--2.3.1--2.5.2.sql b/tools/sql-update-scripts/pgrouting--2.3.1--2.5.2.sql
deleted file mode 100644
index c81c347..0000000
--- a/tools/sql-update-scripts/pgrouting--2.3.1--2.5.2.sql
+++ /dev/null
@@ -1,6561 +0,0 @@
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- pgRouting extension upgrade from 2.3.1 to 2.5.2
--- generated by tools/build-extension-update-files
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-\echo Use "ALTER extension pgrouting update to '2.5.2'" to load this file. \quit
-
-
--------------------------------------
--- remove functions no longer in the 2.5.2 extension
--------------------------------------
-
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_astar(text,bigint,bigint,boolean,integer,double precision,double precision,boolean);
-DROP FUNCTION IF EXISTS _pgr_astar(text,bigint,bigint,boolean,integer,double precision,double precision,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,anyarray,bigint,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,anyarray,bigint,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,bigint,anyarray,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,bigint,anyarray,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,bigint,bigint,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,bigint,bigint,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_drivingdistance(text,bigint,double precision,boolean);
-DROP FUNCTION IF EXISTS _pgr_drivingdistance(text,bigint,double precision,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_maxflow(text,anyarray,anyarray,text);
-DROP FUNCTION IF EXISTS _pgr_maxflow(text,anyarray,anyarray,text);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_maxflow(text,anyarray,bigint,text);
-DROP FUNCTION IF EXISTS _pgr_maxflow(text,anyarray,bigint,text);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_maxflow(text,bigint,anyarray,text);
-DROP FUNCTION IF EXISTS _pgr_maxflow(text,bigint,anyarray,text);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_maxflow(text,bigint,bigint,text);
-DROP FUNCTION IF EXISTS _pgr_maxflow(text,bigint,bigint,text);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_pickdeliver(text,integer,double precision,double precision,integer);
-DROP FUNCTION IF EXISTS _pgr_pickdeliver(text,integer,double precision,double precision,integer);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,anyarray,anyarray,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,anyarray,anyarray,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,anyarray,bigint,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,anyarray,bigint,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,bigint,anyarray,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,bigint,anyarray,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,bigint,bigint,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,bigint,bigint,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_fakecontraction(text,integer[]);
-DROP FUNCTION IF EXISTS pgr_fakecontraction(text,integer[]);
-
-
-------------------------------------------
---    New functions:  2.0
--- Signature change:  2.4
---       Deprecated:  2.4
-------------------------------------------
--- pgr_bddijkstra
--- 2.3.1: {      sql, source_vid, target_vid, directed, has_reverse_cost}   
--- 2.5.2: {edges_sql,  start_vid,    end_vid, directed, has_rcost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vid","end_vid","directed","has_rcost"}'
-WHERE proname = 'pgr_bddijkstra'
-    AND proargnames = '{"sql","source_vid","target_vid","directed","has_reverse_cost"}';
-
-
-------------------------------------------
---       New functions:  2.1
---    Signature change:  2.4
-------------------------------------------
--- 2.3.1: {edges_sql,start_v,  distance,directed,seq,node,edge,cost,agg_cost}
--- 2.5.2: {edges_sql,start_vid,distance,directed,seq,node,edge,cost,agg_cost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vid","distance","directed","seq","node","edge","cost","agg_cost"}'
-WHERE proname = 'pgr_drivingdistance'
-    AND proargnames = '{"edges_sql","start_v","distance","directed","seq","node","edge","cost","agg_cost"}';
-
-
-------------------------------------------
---       New functions:  2.1
---    Signature change:  2.4
-------------------------------------------
--- 2.3.1: {sql,      start_v,   distance,directed,equicost,seq,from_v,node,edge,cost,agg_cost}
--- 2.5.2: {edges_sql,start_vids,distance,directed,equicost,seq,from_v,node,edge,cost,agg_cost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vids","distance","directed","equicost","seq","from_v","node","edge","cost","agg_cost"}'
-WHERE proname = 'pgr_drivingdistance'
-    AND proargnames = '{"sql","start_v","distance","directed","equicost","seq","from_v","node","edge","cost","agg_cost"}';
-
-
-------------------------------------------
---       New functions:  2.3
---    Signature change:  2.5
--- Inner query changed:  2.5
-------------------------------------------
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_edgedisjointpaths(text,bigint,bigint,boolean);
-DROP FUNCTION IF EXISTS pgr_edgedisjointpaths(text,bigint,bigint,boolean);
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_edgedisjointpaths(text,bigint,anyarray,boolean);
-DROP FUNCTION IF EXISTS pgr_edgedisjointpaths(text,bigint,anyarray,boolean);
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_edgedisjointpaths(text,anyarray,bigint,boolean);
-DROP FUNCTION IF EXISTS pgr_edgedisjointpaths(text,anyarray,bigint,boolean);
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_edgedisjointpaths(text,anyarray,anyarray,boolean);
-DROP FUNCTION IF EXISTS pgr_edgedisjointpaths(text,anyarray,anyarray,boolean);
-
-
-ALTER EXTENSION pgrouting DROP TYPE contraction_vertex;
-DROP TYPE contraction_vertex;
-
-
-
-
-
-
-
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
---- pgRouting provides geospatial routing functionality.
---- http://pgrouting.org
---- copyright
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
----
---- This is free software; you can redistribute and/or modify it:
---- the terms of the GNU General Public Licence. See the COPYING file.
---- the terms of the MIT-X Licence. See the COPYING file.
----
---- The following functions have MIT-X licence:
----     pgr_version()
----     pgr_tsp(matrix float8[][], startpt integer, endpt integer DEFAULT -1, OUT seq integer, OUT id integer)
----     _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
----     pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
----
----
---- All other functions are under GNU General Public Licence.
----
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
--- WARNING: Any change in this file must be evaluated for compatibility.
---          Changes cleanly handled by postgis_upgrade.sql are fine,
---          other changes will require a bump in Major version.
---          Currently only function replaceble by CREATE OR REPLACE
---          are cleanly handled.
---
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
---  pgRouting 2.0 types
-
-
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_version()
-RETURNS TABLE(
-        "version" varchar,
-        tag varchar,
-        hash varchar,
-        branch varchar,
-        boost varchar
-    ) AS
-$BODY$
-    SELECT '2.5.2'::varchar AS version,
-        'v2.5.2'::varchar AS tag,
-        '60585f1f7'::varchar AS hash,
-        'master'::varchar AS branch,
-        '1.54.0'::varchar AS boost;
-$BODY$
-LANGUAGE sql IMMUTABLE;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getTableName(IN tab text, IN reportErrs int default 0, IN fnName text default '_pgr_getTableName', OUT sname text,OUT tname text)
-  RETURNS RECORD AS
-$$
-DECLARE
-        naming record;
-        i integer;
-        query text;
-        sn text; -- schema name
-        tn text; -- table name
-        ttype text; --table type for future use
-        err boolean;
-        debuglevel text;
-        var_types text[] = ARRAY['BASE TABLE', 'VIEW'];
-BEGIN
-
-    execute 'show client_min_messages' into debuglevel;
-
-
-    perform _pgr_msg( 0, fnName, 'Checking table ' || tab || ' exists');
-    --RAISE DEBUG 'Checking % exists',tab;
-
-    i := strpos(tab,'.');
-    IF (i <> 0) THEN
-        sn := split_part(tab, '.',1);
-        tn := split_part(tab, '.',2);
-    ELSE
-        sn := current_schema;
-        tn := tab;
-    END IF;
-
-
-   SELECT schema_name INTO sname
-   FROM information_schema.schemata WHERE schema_name = sn;
-
-    IF sname IS NOT NULL THEN -- found schema (as is)
-       SELECT table_name, table_type INTO tname, ttype
-       FROM information_schema.tables
-       WHERE
-                table_type = ANY(var_types) and
-                table_schema = sname and
-                table_name = tn ;
-        IF tname is NULL THEN
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  = ANY(var_types) and
-                table_schema = sname and
-                table_name = lower(tn) ORDER BY table_name;
-        END IF;
-    END IF;
-    IF sname is NULL or tname is NULL THEN --schema not found or table not found
-        SELECT schema_name INTO sname
-        FROM information_schema.schemata
-        WHERE schema_name = lower(sn) ;
-
-        IF sname IS NOT NULL THEN -- found schema (with lower caps)
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  =  ANY(var_types) and
-                table_schema = sname and
-                table_name= tn ;
-
-           IF tname IS NULL THEN
-                SELECT table_name, table_type INTO tname, ttype
-                FROM information_schema.tables
-                WHERE
-                    table_type  =  ANY(var_types) and
-                    table_schema = sname and
-                    table_name= lower(tn) ;
-           END IF;
-        END IF;
-    END IF;
-   err = (sname IS NULL OR tname IS NULL);
-   perform _pgr_onError(err, reportErrs, fnName, 'Table ' || tab ||' not found',' Check your table name', 'Table '|| tab || ' found');
-
-END;
-$$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(sname text, tname text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(col) into cname;
-
-    IF cname is null  THEN
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(lower(col))  into cname;
-    END if;
-
-    err = cname is null;
-
-    perform _pgr_onError(err, reportErrs, fnName,  'Column '|| col ||' not found', ' Check your column name','Column '|| col || ' found');
-    RETURN cname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(tab text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-
-    select * into cname from _pgr_getColumnName(sname,tname,col,reportErrs, fnName);
-    RETURN cname;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    select * from _pgr_getColumnName(tab,col,0, '_pgr_isColumnInTable') into cname;
-    return cname is not null;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(sname text, tname text, cname text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    pkey text;
-BEGIN
-    SELECT
-          pg_attribute.attname into pkey
-         --  format_type(pg_attribute.atttypid, pg_attribute.atttypmod)
-          FROM pg_index, pg_class, pg_attribute
-          WHERE
-                  pg_class.oid = _pgr_quote_ident(sname||'.'||tname)::regclass AND
-                  indrelid = pg_class.oid AND
-                  pg_attribute.attrelid = pg_class.oid AND
-                  pg_attribute.attnum = any(pg_index.indkey)
-                  AND indisprimary;
-
-    IF pkey=cname then
-          RETURN TRUE;
-    END IF;
-
-    SELECT a.index_name,
-           b.attname,
-           b.attnum,
-           a.indisunique,
-           a.indisprimary
-      INTO rec
-      FROM ( SELECT a.indrelid,
-                    a.indisunique,
-                    a.indisprimary,
-                    c.relname index_name,
-                    unnest(a.indkey) index_num
-               FROM pg_index a,
-                    pg_class b,
-                    pg_class c,
-                    pg_namespace d
-              WHERE b.relname=tname
-                AND b.relnamespace=d.oid
-                AND d.nspname=sname
-                AND b.oid=a.indrelid
-                AND a.indexrelid=c.oid
-           ) a,
-           pg_attribute b
-     WHERE a.indrelid = b.attrelid
-       AND a.index_num = b.attnum
-       AND b.attname = cname
-  ORDER BY a.index_name,
-           a.index_num;
-
-  RETURN FOUND;
-  EXCEPTION WHEN OTHERS THEN
-    perform _pgr_onError( true, reportErrs, fnName,
-    'Error when checking for the postgres system attributes', SQLERR);
-    RETURN FALSE;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(tab text, col text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    sname text;
-    tname text;
-    cname text;
-    pkey text;
-    value boolean;
-BEGIN
-    SELECT * into naming FROM _pgr_getTableName(tab, 0, fnName);
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    SELECT * into cname from _pgr_getColumnName(sname, tname, col, 0, fnName) ;
-    IF cname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    select * into value  from _pgr_isColumnIndexed(sname, tname, cname, reportErrs, fnName);
-    return value;
-END
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-create or replace function _pgr_quote_ident(idname text)
-    returns text as
-$body$
-declare
-    t text[];
-    pgver text;
-
-begin
-    pgver := regexp_replace(version(), E'^PostgreSQL ([^ ]+)[ ,].*$', E'\\1');
-
-    if _pgr_versionless(pgver, '9.2') then
-        select into t array_agg(quote_ident(term)) from
-            (select nullif(unnest, '') as term
-               from unnest(string_to_array(idname, '.'))) as foo;
-    else
-        select into t array_agg(quote_ident(term)) from
-            (select unnest(string_to_array(idname, '.', '')) as term) as foo;
-    end if;
-    return array_to_string(t, '.');
-end;
-$body$
-language plpgsql immutable;
-
-
-CREATE OR REPLACE FUNCTION _pgr_versionless(v1 text, v2 text)
-  RETURNS boolean AS
-$BODY$
-
-
-declare
-    v1a text[];
-    v2a text[];
-    nv1 integer;
-    nv2 integer;
-    ne1 integer;
-    ne2 integer;
-
-begin
-    -- separate components into an array, like:
-    -- '2.1.0-beta3dev'  =>  {2,1,0,beta3dev}
-    v1a := regexp_matches(v1, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-    v2a := regexp_matches(v2, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-
-    -- convert modifiers to numbers for comparison
-    -- we do not delineate between alpha1, alpha2, alpha3, etc
-    ne1 := case when v1a[4] is null or v1a[4]='' then 5
-                when v1a[4] ilike 'rc%' then 4
-                when v1a[4] ilike 'beta%' then 3
-                when v1a[4] ilike 'alpha%' then 2
-                when v1a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    ne2 := case when v2a[4] is null or v2a[4]='' then 5
-                when v2a[4] ilike 'rc%' then 4
-                when v2a[4] ilike 'beta%' then 3
-                when v2a[4] ilike 'alpha%' then 2
-                when v2a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    nv1 := v1a[1]::integer * 10000 +
-           coalesce(v1a[2], '0')::integer * 1000 +
-           coalesce(v1a[3], '0')::integer *  100 + ne1;
-    nv2 := v2a[1]::integer * 10000 +
-           coalesce(v2a[2], '0')::integer * 1000 +
-           coalesce(v2a[3], '0')::integer *  100 + ne2;
-
-    --raise notice 'nv1: %, nv2: %, ne1: %, ne2: %', nv1, nv2, ne1, ne2;
-
-    return nv1 < nv2;
-end;
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-create or replace function _pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_startpoint(st_geometryn(g,1));
-    else
-        return st_startpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function _pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_endpoint(st_geometryn(g,1));
-    else
-        return st_endpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_parameter_check(fn text, sql text, big boolean default false)
-  RETURNS bool AS
-  $BODY$
-
-  DECLARE
-  rec record;
-  rec1 record;
-  has_rcost boolean;
-  safesql text;
-  BEGIN
-    IF (big) THEN
-       RAISE EXCEPTION 'This function is for old style functions';
-    END IF;
-
-    -- checking query is executable
-    BEGIN
-      safesql =  'select * from ('||sql||' ) AS __a__ limit 1';
-      execute safesql into rec;
-      EXCEPTION
-        WHEN OTHERS THEN
-            RAISE EXCEPTION 'Could not execute query please verify syntax of: '
-              USING HINT = sql;
-    END;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('dijkstra','astar') THEN
-        BEGIN
-          execute 'select id,source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: id, source, target, cost';
-        END;
-        execute 'select pg_typeof(id)::text as id_type, pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.id_type in ('integer'::text))
-              AND (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Error, columns ''source'', ''target'' must be of type int4, ''cost'' must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    IF fn IN ('astar') THEN
-        BEGIN
-          execute 'select x1,y1,x2,y2  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: x1,y1, x2,y2';
-        END;
-        execute 'select pg_typeof(x1)::text as x1_type, pg_typeof(y1)::text as y1_type, pg_typeof(x2)::text as x2_type, pg_typeof(y2)::text as y2_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.x1_type = 'double precision'::text)
-              AND (rec.y1_type = 'double precision'::text)
-              AND (rec.x2_type = 'double precision'::text)
-              AND (rec.y2_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Columns: x1, y1, x2, y2 must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('johnson') THEN
-        BEGIN
-          execute 'select source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING HINT = 'Please veryfy the column names: id, source, target, cost',
-                         ERRCODE = 'XX000';
-        END;
-
-        execute 'select pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Support for source,target columns only of type: integer. Support for Cost: double precision'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    -- Checking the data types of the optional reverse_cost";
-    has_rcost := false;
-    IF fn IN ('johnson','dijkstra','astar') THEN
-      BEGIN
-        execute 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||safesql||' ) AS __b__ limit 1 ' into rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-            return has_rcost;
-      END;
-      if (has_rcost) then
-        IF (big) then
-           IF  not (rec1.rev_type in ('bigint'::text, 'integer'::text, 'smallint'::text, 'double precision'::text, 'real'::text)) then
-             RAISE EXCEPTION 'Illegar type in optional parameter reverse_cost.'
-             USING ERRCODE = 'XX000';
-           END IF;
-        ELSE -- Version 2.0.0 is more restrictive
-           IF (rec1.rev_type != 'double precision') then
-             RAISE EXCEPTION 'Illegal type in optional parameter reverse_cost, must be of type float8'
-             USING ERRCODE = 'XX000';
-           END IF;
-        END IF;
-      end if;
-      return true;
-    END IF;
-    -- just for keeps
-    return true;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_onError(
-  IN errCond boolean,  -- true there is an error
-  IN reportErrs int,   -- 0, 1 or 2
-  IN fnName text,      -- function name that generates the error
-  IN msgerr text,      -- error message
-  IN hinto text default 'No hint', -- hint help
-  IN msgok text default 'OK')      -- message if everything is ok
-  RETURNS void AS
-$BODY$
-BEGIN
-  if errCond=true then
-     if reportErrs=0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-     else
-       if reportErrs = 2 then
-         raise notice '----> PGR ERROR in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-         raise raise_exception;
-       else
-         raise notice '----> PGR NOTICE in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-       end if;
-     end if;
-  else
-       raise debug 'PGR ----> %: %',fnName,msgok;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_msg(IN msgKind int, IN fnName text, IN msg text default '---->OK')
-  RETURNS void AS
-$BODY$
-BEGIN
-  if msgKind = 0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msg;
-  else
-       raise notice '----> PGR NOTICE in %: %',fnName,msg;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(sname text, tname text, cname text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    EXECUTE 'select data_type  from information_schema.columns '
-            || 'where table_name = '||quote_literal(tname)
-                 || ' and table_schema=' || quote_literal(sname)
-                 || ' and column_name='||quote_literal(cname)
-       into ctype;
-    err = ctype is null;
-    perform _pgr_onError(err, reportErrs, fnName,
-            'Type of Column '|| cname ||' not found',
-            'Check your column name',
-            'OK: Type of Column '|| cname || ' is ' || ctype);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(tab text, col text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-    select * into cname from _pgr_getColumnName(tab,col,reportErrs, fnName) ;
-    select * into ctype from _pgr_getColumnType(sname,tname,cname,reportErrs, fnName);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_get_statement(o_sql text)
-RETURNS text AS
-$BODY$
-DECLARE
-sql TEXT;
-BEGIN
-    EXECUTE 'SELECT statement FROM pg_prepared_statements WHERE name ='  || quote_literal(o_sql) || ' limit 1 ' INTO sql;
-    IF (sql IS NULL) THEN
-      RETURN   o_sql;
-    ELSE
-      RETURN  regexp_replace(sql, '(.)* as ', '', 'i');
-    END IF;
-END
-$BODY$
-LANGUAGE plpgsql STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_checkVertTab(vertname text, columnsArr  text[],
-    IN reportErrs int default 1, IN fnName text default '_pgr_checkVertTab',
-    OUT sname text,OUT vname text)
-RETURNS record AS
-$BODY$
-DECLARE
-    cname text;
-    colname text;
-    naming record;
-    debuglevel text;
-    err  boolean;
-    msgKind int;
-
-BEGIN
-    msgKind = 0; -- debug_
-    execute 'show client_min_messages' into debuglevel;
-
-    perform _pgr_msg(msgKind, fnName, 'Checking table ' || vertname || ' exists');
-       select * from _pgr_getTableName(vertname, 0, fnName) into naming;
-       sname=naming.sname;
-       vname=naming.tname;
-       err = sname is NULL or vname is NULL;
-    perform _pgr_onError( err, 2, fnName,
-          'Vertex Table: ' || vertname || ' not found',
-          'Please create ' || vertname || ' using  _pgr_createTopology() or pgr_createVerticesTable()',
-          'Vertex Table: ' || vertname || ' found');
-
-
-    perform _pgr_msg(msgKind, fnName, 'Checking columns of ' || vertname);
-      FOREACH cname IN ARRAY columnsArr
-      loop
-         select _pgr_getcolumnName(vertname, cname, 0, fnName) into colname;
-         if colname is null then
-           perform _pgr_msg(msgKind, fnName, 'Adding column ' || cname || ' in ' || vertname);
-           set client_min_messages  to warning;
-                execute 'ALTER TABLE '||_pgr_quote_ident(vertname)||' ADD COLUMN '||cname|| ' integer';
-           execute 'set client_min_messages  to '|| debuglevel;
-           perform _pgr_msg(msgKind, fnName);
-         end if;
-      end loop;
-    perform _pgr_msg(msgKind, fnName, 'Finished checking columns of ' || vertname);
-
-    perform _pgr_createIndex(vertname , 'id' , 'btree', reportErrs, fnName);
- END
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(
-    sname text, tname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    debuglevel text;
-    naming record;
-    tabname text;
-    query text;
-    msgKind int;
-BEGIN
-  msgKind = 0; -- debug_
-
-  execute 'show client_min_messages' into debuglevel;
-  tabname=_pgr_quote_ident(sname||'.'||tname);
-  perform _pgr_msg(msgKind, fnName, 'Checking ' || colname || ' column in ' || tabname || ' is indexed');
-    IF (_pgr_isColumnIndexed(sname,tname,colname, 0, fnName)) then
-       perform _pgr_msg(msgKind, fnName);
-    else
-      if indext = 'gist' then
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using gist('||quote_ident(colname)||')';
-      else
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using btree('||quote_ident(colname)||')';
-      end if;
-      perform _pgr_msg(msgKind, fnName, 'Adding index ' || tabname || '_' ||  colname || '_idx');
-      perform _pgr_msg(msgKind, fnName, ' Using ' ||  query);
-      set client_min_messages  to warning;
-      BEGIN
-        execute query;
-        EXCEPTION WHEN others THEN
-          perform _pgr_onError( true, reportErrs, fnName,
-            'Could not create index on:' || colname, SQLERRM);
-      END;
-      execute 'set client_min_messages  to '|| debuglevel;
-      perform _pgr_msg(msgKind, fnName);
-    END IF;
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(tabname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    naming record;
-    sname text;
-    tname text;
-
-BEGIN
-    select * from _pgr_getTableName(tabname, 2, fnName)  into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    execute _pgr_createIndex(sname, tname, colname, indext, reportErrs, fnName);
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pointToId(
-    point geometry,
-    tolerance double precision,
-    vertname text,
-    srid integer)
-
-  RETURNS bigint AS
-$BODY$
-DECLARE
-    rec record;
-    pid bigint;
-
-BEGIN
-    EXECUTE 'SELECT ST_Distance(
-        the_geom,
-        ST_GeomFromText(ST_AsText('
-                || quote_literal(point::text)
-                || '),'
-            || srid ||')) AS d, id, the_geom
-    FROM '||_pgr_quote_ident(vertname)||'
-    WHERE ST_DWithin(
-        the_geom,
-        ST_GeomFromText(
-            ST_AsText(' || quote_literal(point::text) ||'),
-            ' || srid || '),' || tolerance||')
-    ORDER BY d
-    LIMIT 1' INTO rec ;
-    IF rec.id IS NOT NULL THEN
-        pid := rec.id;
-    ELSE
-        execute 'INSERT INTO '||_pgr_quote_ident(vertname)||' (the_geom) VALUES ('||quote_literal(point::text)||')';
-        pid := lastval();
-END IF;
-
-RETURN pid;
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'many_to_many_dijkstra'
-LANGUAGE c VOLATILE;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer, OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstra(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(Many to Many)';
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraVia(
-    edges_sql TEXT,
-    via_vertices ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    strict BOOLEAN DEFAULT FALSE,
-    U_turn_on_edge BOOLEAN DEFAULT TRUE,
-
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'dijkstraVia'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_johnson(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'johnson'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_floydWarshall(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'floydWarshall'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'astarManyToMany'
-LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, normal:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to Many)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true, normal:=false) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to Many)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid ANYARRAY,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-    equicost BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'many_withPointsDD'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_withPointsDD($1, $2, ARRAY[$3]::BIGINT[], $4, $5, $6, $7, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vids anyarray,
-    distance FLOAT,
-    directed BOOLEAN DEFAULT TRUE,
-    equicost BOOLEAN DEFAULT FALSE,
-    OUT seq integer,
-    OUT from_v  bigint,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'driving_many_to_dist'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vid bigint,
-    distance FLOAT8,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq integer,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer, directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'kshortest_path'
-    LANGUAGE c STABLE STRICT;
-
--- V2 the graph is directed and there are no heap paths
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid integer, end_vid integer, k integer, has_rcost boolean)
-  RETURNS SETOF pgr_costresult3 AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated signature of pgr_ksp';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql::text, false);
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_rcost) THEN
-           -- user says that it has reverse_cost but its not true
-           RAISE EXCEPTION 'has_reverse_cost set to true but reverse_cost not found';
-         ELSE
-           -- user says that it does not have reverse_cost but it does have it
-           -- to ignore we remove reverse_cost from the query
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         END IF;
-      END IF;
-
-      RETURN query SELECT ((row_number() over()) -1)::integer  AS seq,  (path_id - 1)::integer AS id1, node::integer AS id2, edge::integer AS id3, cost
-            FROM _pgr_ksp(sql::text, start_vid, end_vid, k, TRUE, FALSE) WHERE path_id <= k;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer,
-  directed boolean default true, heap_paths boolean default false,
-  --directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  BEGIN
-         RETURN query SELECT *
-                FROM _pgr_ksp(edges_sql::text, start_vid, end_vid, k, directed, heap_paths);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsKSP(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    k INTEGER,
-
-    directed BOOLEAN DEFAULT TRUE,
-    heap_paths BOOLEAN DEFAULT FALSE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER, OUT path_id INTEGER, OUT path_seq INTEGER,
-    OUT node BIGINT, OUT edge BIGINT,
-    OUT cost FLOAT, OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'withPoints_ksp'
-    LANGUAGE c STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_unnest_matrix(matrix float8[][], OUT start_vid integer, OUT end_vid integer, out agg_cost float8)
-RETURNS SETOF record AS
-
-$body$
-DECLARE
-
-m float8[];
-
-BEGIN
-    start_vid = 1;
-    foreach m slice 1 in  ARRAY matrix
-    LOOP
-        end_vid = 1;
-        foreach agg_cost in  ARRAY m
-        LOOP
-            RETURN next;
-            end_vid = end_vid + 1;
-        END LOOP;
-        start_vid = start_vid + 1;
-    END LOOP;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_tsp(
-    matrix float8[][],
-    startpt INTEGER,
-    endpt INTEGER DEFAULT -1,
-    OUT seq INTEGER,
-    OUT id INTEGER)
-RETURNS SETOF record AS
-$body$
-DECLARE
-table_sql TEXT;
-debuglevel TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(float8[][], integer, integer)';
-
-    CREATE TEMP TABLE ___tmp2 ON COMMIT DROP AS SELECT * FROM _pgr_unnest_matrix( matrix );
-
-
-    startpt := startpt + 1;
-    IF endpt = -1 THEN endpt := startpt;
-    END IF;
-
-
-    RETURN QUERY
-    WITH
-    result AS (
-        SELECT * FROM pgr_TSP(
-        $$SELECT * FROM ___tmp2 $$,
-        startpt, endpt,
-
-        tries_per_temperature :=  500 :: INTEGER,
-        max_changes_per_temperature := 30 :: INTEGER,
-        max_consecutive_non_changes := 500 :: INTEGER,
-
-        randomize:=false)
-    )
-    SELECT (row_number() over(ORDER BY result.seq) - 1)::INTEGER AS seq, (result.node - 1)::INTEGER AS id
-
-    FROM result WHERE NOT(result.node = startpt AND result.seq != 1);
-
-    DROP TABLE ___tmp2;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-
-
-CREATE OR  REPLACE FUNCTION pgr_tsp(sql text, start_id INTEGER, end_id INTEGER default (-1))
-returns setof pgr_costResult as
-$body$
-DECLARE
-table_sql TEXT;
-rec RECORD;
-debuglevel TEXT;
-n BIGINT;
-
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(sql, integer, integer)';
-
-    table_sql := 'CREATE TEMP TABLE ___tmp ON COMMIT DROP AS ' || sql ;
-    EXECUTE table_sql;
-
-
-    BEGIN
-        EXECUTE 'SELECT id, x, y FROM ___tmp' INTO rec;
-        EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                USING ERRCODE = 'XX000',
-                HINT = 'Please verify the column names: id, x, y';
-    END;
-
-    EXECUTE
-    'SELECT
-        pg_typeof(id)::text as id_type,
-        pg_typeof(x)::text as x_type,
-        pg_typeof(y)::text as y_type FROM ___tmp' INTO rec;
-
-
-    IF NOT((rec.id_type in ('integer'::text))
-        AND (rec.x_type = 'double precision'::text)
-        AND (rec.y_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION '''id'' must be of type INTEGER, ''x'' ad ''y'' must be of type FLOAT'
-            USING ERRCODE = 'XX000';
-    END IF;
-
-    EXECUTE 'SELECT count(*) AS n FROM (' || sql || ') AS __a__' INTO rec;
-    n = rec.n;
-
-    RETURN query
-        SELECT (seq - 1)::INTEGER AS seq, node::INTEGER AS id1, node::INTEGER AS id2, cost
-        FROM pgr_eucledianTSP(sql, start_id, end_id,
-
-            tries_per_temperature :=  500 * n :: INTEGER,
-            max_changes_per_temperature := 60 * n :: INTEGER,
-            max_consecutive_non_changes := 500 * n :: INTEGER,
-
-            randomize := false) WHERE seq <= n;
-    DROP TABLE ___tmp;
-
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-create or replace function _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
-  as
-$body$
-declare
-    sql text;
-    r record;
-
-begin
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    sql := 'with nodes as (' || sqlin || ')
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j, st_distance(st_makepoint(a.x, a.y), st_makepoint(b.x, b.y)) as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i';
-
-    for r in execute sql loop
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-
-end;
-$body$
-language plpgsql stable cost 10;
-
-
-CREATE OR REPLACE FUNCTION pgr_TSP(
-    matrix_row_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'newTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_eucledianTSP(
-    coordinates_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'eucledianTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_alphashape(sql text, alpha float8 DEFAULT 0, OUT x float8, OUT y float8)
-    RETURNS SETOF record
-    AS '$libdir/libpgrouting-2.5', 'alphashape'
-    LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pointsAsPolygon(query varchar, alpha float8 DEFAULT 0)
-	RETURNS geometry AS
-	$$
-	DECLARE
-		r record;
-		geoms geometry[];
-		vertex_result record;
-		i int;
-		n int;
-		spos int;
-		q text;
-		x float8[];
-		y float8[];
-
-	BEGIN
-		geoms := array[]::geometry[];
-		i := 1;
-
-		FOR vertex_result IN EXECUTE 'SELECT x, y FROM pgr_alphashape('''|| query || ''', ' || alpha || ')'
-		LOOP
-			x[i] = vertex_result.x;
-			y[i] = vertex_result.y;
-			i := i+1;
-		END LOOP;
-
-		n := i;
-		IF n = 1 THEN
-			RAISE NOTICE 'n = 1';
-			RETURN NULL;
-		END IF;
-
-		spos := 1;
-		q := 'SELECT ST_GeometryFromText(''POLYGON((';
-		FOR i IN 1..n LOOP
-			IF x[i] IS NULL AND y[i] IS NULL THEN
-				q := q || ', ' || x[spos] || ' ' || y[spos] || '))'',0) AS geom;';
-				EXECUTE q INTO r;
-				geoms := geoms || array[r.geom];
-				q := '';
-			ELSE
-				IF q = '' THEN
-					spos := i;
-					q := 'SELECT ST_GeometryFromText(''POLYGON((';
-				END IF;
-				IF i = spos THEN
-					q := q || x[spos] || ' ' || y[spos];
-				ELSE
-					q := q || ', ' || x[i] || ' ' || y[i];
-				END IF;
-			END IF;
-		END LOOP;
-
-		RETURN ST_BuildArea(ST_Collect(geoms));
-	END;
-	$$
-	LANGUAGE 'plpgsql' VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'bd_astar'
-LANGUAGE C VOLATILE;
-
-
-
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed:=true, only_cost:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    BOOLEAN,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false);
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to Many)';
-
-
-
--- one to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to Many)';
-
-
--- bdDijkstra MANY TO MANY
-CREATE OR REPLACE FUNCTION _pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bdDijkstra'
-LANGUAGE c VOLATILE;
-
-
-
--- ONE TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- TODO directed BOOLEAN DEFAULT TRUE,  on version 3
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, false) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, true) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_vid integer,
-    target_vid integer,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_vertex'
-LANGUAGE 'c' IMMUTABLE;
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_edge'
-LANGUAGE 'c' IMMUTABLE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || edges_sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        -- no restrictions then its a dijkstra
-        RETURN query SELECT a.seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_dijkstra(new_sql, start_vid, end_vid, directed) a;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, start_vid, end_vid, directed, has_rcost, restrictions_sql);
-    RETURN;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trspViaVertices(
-    edges_sql TEXT,
-    via_vids ANYARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult3 AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            new_sql :=
-               'WITH old_sql AS (' || edges_sql || ')' ||
-                '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        RETURN query SELECT (row_number() over())::INTEGER, path_id:: INTEGER, node::INTEGER,
-            (CASE WHEN edge = -2 THEN -1 ELSE edge END)::INTEGER, cost
-            FROM pgr_dijkstraVia(new_sql, via_vids, directed, strict:=true) WHERE edge != -1;
-        RETURN;
-    END IF;
-
-
-    -- make the call without contradiction from part of the user
-    RETURN query SELECT * FROM _pgr_trspViaVertices(new_sql, via_vids::INTEGER[], directed, has_rcost, restrictions_sql);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-
-    new_sql := sql;
-    IF (has_reverse != has_reverse_cost) THEN  -- user contradiction
-        IF (has_reverse) THEN
-            -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) THEN
-        -- no restrictions then its a with points
-        RETURN query SELECT a.seq-1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_withpoints(new_sql,
-            '(SELECT 1 as pid, ' || source_eid || 'as edge_id, ' || source_pos || '::float8 as fraction)'
-            || ' UNION '
-            || '(SELECT 2, ' || target_eid || ', ' || target_pos || ')' ::TEXT,
-            -1, -2, directed) a;
-        -- WHERE node != -2;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, source_eid, source_pos, target_eid, target_pos, directed, has_reverse_cost, turn_restrict_sql);
-    RETURN;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-create or replace function _pgr_trspViaVertices(sql text, vids integer[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    lrra boolean := false;
-    seq integer := 0;
-    seq2 integer := 0;
-
-begin
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(vids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from _pgr_trsp(sql, vids[i], vids[i+1], directed, has_rcost, turn_restrict_sql) as a loop
-            -- filter out the individual path ends except the last one
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --raise notice 'rr: %', rr;
-            if rr.id3 = -1 then
-                lrr := rr;
-                lrra := true;
-            else
-                seq := seq + 1;
-                rr.seq := seq;
-                return next rr;
-            end if;
-        end loop;
-    end loop;
-
-    if lrra then
-        seq := seq + 1;
-        lrr.seq := seq;
-        return next lrr;
-    end if;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-
-----------------------------------------------------------------------------------------------------------
-
-create or replace function pgr_trspViaEdges(sql text, eids integer[], pcts float8[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    first boolean := true;
-    seq integer := 0;
-    seq2 integer :=0;
-    has_reverse BOOLEAN;
-    point_is_vertex BOOLEAN := false;
-    edges_sql TEXT;
-    f float;
-
-begin
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql := sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (NOT has_rcost) THEN
-            -- user does not want to use reverse cost column
-            edges_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    FOREACH f IN ARRAY pcts LOOP
-        IF f in (0,1) THEN
-           point_is_vertex := true;
-        END IF;
-    END LOOP;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) AND NOT point_is_vertex THEN
-        -- no restrictions then its a _pgr_withPointsVia
-        RETURN query SELECT a.seq::INTEGER, path_id::INTEGER AS id1, node::INTEGER AS id2, edge::INTEGER AS id3, cost
-        FROM _pgr_withPointsVia(edges_sql, eids, pcts, directed) a;
-        RETURN;
-    END IF;
-
-    if array_length(eids, 1) != array_length(pcts, 1) then
-        raise exception 'The length of arrays eids and pcts must be the same!';
-    end if;
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(eids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from pgr_trsp(edges_sql,
-                                  eids[i], pcts[i],
-                                  eids[i+1], pcts[i+1],
-                                  directed,
-                                  has_rcost,
-                                  turn_restrict_sql) as a loop
-            -- combine intermediate via costs when cost is split across
-            -- two parts of a segment because it stops it and
-            -- restarts the next leg also on it
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --
-            -- there are multiple condition we have to deal with
-            -- between the end of one leg and start of the next
-            -- 1. same vertex_id. edge_id=-1; drop record with edge_id=-1
-            -- means: path ends on vertex
-            -- NOTICE:  rr: (19,1,44570022,-1,0)
-            -- NOTICE:  rr: (0,2,44570022,1768045,2.89691196717448)
-            -- 2. vertex_id=-1; sum cost components
-            -- means: path end/starts with the segment
-            -- NOTICE:  rr: (11,2,44569628,1775909,9.32885885148532)
-            -- NOTICE:  rr: (0,3,-1,1775909,0.771386350984395)
-
-            --raise notice 'rr: %', rr;
-            if first then
-                lrr := rr;
-                first := false;
-            else
-                if lrr.id3 = -1 then
-                    lrr := rr;
-                elsif lrr.id3 = rr.id3 then
-                    lrr.cost := lrr.cost + rr.cost;
-                    if rr.id2 = -1 then
-                        rr.id2 := lrr.id2;
-                    end if;
-                else
-                    seq := seq + 1;
-                    lrr.seq := seq;
-                    return next lrr;
-                    lrr := rr;
-                end if;
-            end if;
-        end loop;
-    end loop;
-
-    seq := seq + 1;
-    lrr.seq := seq;
-    return next lrr;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-----------------------------
---    MANY TO MANY
-----------------------------
-
-
-CREATE OR REPLACE FUNCTION _pgr_maxflow(
-    edges_sql TEXT,
-    sources ANYARRAY,
-    targets ANYARRAY,
-    algorithm INTEGER DEFAULT 1,
-    only_flow BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'max_flow_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-
-------------------------------------
--- 3 pgr_edmondsKarp
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 2 boykov_kolmogorov
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 1 pgr_pushRelabel
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT flow
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], algorithm := 1, only_flow := true);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], $3::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, $2::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxCardinalityMatch(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'edge_disjoint_paths_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    bigint,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    IN directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_contractGraph(
-    edges_sql TEXT,
-    contraction_order BIGINT[],
-    max_cycles integer DEFAULT 1,
-    forbidden_vertices BIGINT[] DEFAULT ARRAY[]::BIGINT[],
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT type TEXT,
-    OUT id BIGINT,
-    OUT contracted_vertices BIGINT[],
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost float)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'contractGraph'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliver(
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_cell_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliver'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliverEuclidean (
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliverEuclidean'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_vrpOneDepot(
-    TEXT, -- customers_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_sql
-    INTEGER, -- depot_id
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-orders_sql TEXT;
-trucks_sql TEXT;
-matrix_sql TEXT;
-final_sql TEXT;
-BEGIN
-
-    orders_sql = $$WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    pickups AS (
-        SELECT id, x AS p_x, y AS p_y, open_time AS p_open, close_time AS p_close, service_time AS p_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vrp_orders.id AS id, order_unit AS demand, pickups.id AS p_node_id, p_x, p_y, p_open, p_close, p_service,
-    vrp_orders.id AS d_node_id, x AS d_x, y AS d_y, open_time AS d_open, close_time AS d_close, service_time AS d_service
-    FROM vrp_orders, pickups
-    WHERE vrp_orders.id != $$ || $4;
-
-
-    trucks_sql = $$ WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    vrp_vehicles AS ($$ || $2 || $$ ),
-    starts AS (
-        SELECT id AS start_node_id, x AS start_x, y AS start_y, open_time AS start_open, close_time AS start_close, service_time AS start_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vehicle_id AS id, capacity, starts.* FROM vrp_vehicles, starts;
-    $$;
-
-    final_sql = '
-    SELECT * FROM _pgr_pickDeliver(
-            $$' || orders_sql || '$$,
-            $$' || trucks_sql || '$$,
-            $$' || $3 || '$$,
-            max_cycles := 2,
-            initial_sol := 4 ); ';
-
-    RAISE DEBUG '%', orders_sql;
-    RAISE DEBUG '%', trucks_sql;
-    RAISE DEBUG '%', $3;
-    RAISE DEBUG '%', final_sql;
-
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
------------------------------------------------------------------------
--- Core function for vrp with sigle depot computation
--- See README for description
------------------------------------------------------------------------
---
---
-
-create or replace function pgr_vrpOneDepot(
-	order_sql text,
-	vehicle_sql text,
-	cost_sql text,
-	depot_id integer,
-
-	OUT oid integer,
-	OUT opos integer,
-	OUT vid integer,
-	OUT tarrival integer,
-	OUT tdepart integer)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT order_id::INTEGER, stop_seq::INTEGER, vehicle_id::INTEGER, arrival_time::INTEGER, departure_time::INTEGER
-    FROM _pgr_vrpOneDepot($1, $2,
-       '
-            SELECT src_id AS start_vid, dest_id AS end_vid, traveltime AS agg_cost FROM ('||$3||') AS a
-       ',
-        $4
-    ) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_gsoc_vrppdtw(
-    customers_sql TEXT,
-    max_vehicles INTEGER,
-    capacity FLOAT,
-    speed FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-
-    OUT seq INTEGER,
-    OUT vehicle_id INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT stop_id BIGINT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-    orders_sql TEXT;
-    vehicles_sql TEXT;
-    final_sql TEXT;
-BEGIN
-    orders_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        pickups AS (
-            SELECT id, demand, x as p_x, y as p_y, opentime as p_open, closetime as p_close, servicetime as p_service
-            FROM  customer_data WHERE pindex = 0 AND id != 0
-        ),
-        deliveries AS (
-            SELECT pindex AS id, x as d_x, y as d_y, opentime as d_open, closetime as d_close, servicetime as d_service
-            FROM  customer_data WHERE dindex = 0 AND id != 0
-        )
-        SELECT * FROM pickups JOIN deliveries USING(id) ORDER BY pickups.id
-    $$;
-
-    vehicles_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ )
-        SELECT id, x AS start_x, y AS start_y,
-            opentime AS start_open, closetime AS start_close, $$ ||
-            capacity || $$ AS capacity, $$ || max_vehicles || $$ AS number, $$ || speed || $$ AS speed
-            FROM customer_data WHERE id = 0 LIMIT 1
-        $$;
---  seq | vehicle_id | vehicle_seq | stop_id | travel_time | arrival_time | wait_time | service_time | departure_time
-    final_sql = $$ WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        p_deliver AS (SELECT * FROM _pgr_pickDeliverEuclidean('$$ || orders_sql || $$',  '$$ || vehicles_sql || $$',  1, $$ || max_cycles || $$ )),
-        picks AS (SELECT p_deliver.*, pindex, dindex, id AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 2)),
-        delivers AS (SELECT p_deliver.*, pindex, dindex, dindex AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 3)),
-        depots AS (SELECT p_deliver.*, 0 as pindex, 0 as dindex, 0 AS the_id FROM p_deliver WHERE (stop_type IN (-1,1,6))),
-        the_union AS (SELECT * FROM picks UNION SELECT * FROM delivers UNION SELECT * from depots)
-
-        SELECT (row_number() over(ORDER BY a.seq))::INTEGER, vehicle_seq, a.stop_seq, the_id::BIGINT, a.travel_time, a.arrival_time, a.wait_time, a.service_time, a.departure_time
-        FROM (SELECT * FROM the_union) AS a ORDER BY a.seq
-        $$;
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-CREATE OR REPLACE FUNCTION pgr_gsoc_vrppdtw(
-    sql text,
-    vehicle_num INTEGER,
-    capacity INTEGER
-)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-customers_sql TEXT;
-BEGIN
-    RETURN query
-         SELECT a.seq, vehicle_id::INTEGER AS id1, stop_id::INTEGER AS id2, departure_time AS cost
-        FROM _pgr_gsoc_vrppdtw($1, $2, $3, 1, 30) AS a WHERE vehicle_id NOT IN (-2);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION _pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN,
-    driving_side CHAR,
-    details BOOLEAN,
-
-    only_cost BOOLEAN DEFAULT false, -- gets path
-    normal BOOLEAN DEFAULT true, -- false for many to onu
-
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'withPoints'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], ARRAY[$4]::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], ARRAY[$4]::bigint[], $5, $6, $7, FALSE, FALSE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], $4::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], $4::BIGINT[], $5,  $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION  _pgr_withPointsVia(
-    sql text,
-    via_edges bigint[],
-    fraction float[],
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  has_rcost boolean;
-  sql_new_vertices text := ' ';
-  sql_on_vertex text;
-  v_union text := ' ';
-  dummyrec record;
-  rec1 record;
-  via_vertices int[];
-  sql_safe text;
-  new_edges text;
-  BEGIN
-     BEGIN
-        sql_safe = 'SELECT id, source, target, cost, reverse_cost FROM ('|| sql || ') AS __a';
-
-        EXECUTE 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||sql_safe||' ) AS __b__ limit 1 ' INTO rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-     END;
-
-
-      IF array_length(via_edges, 1) != array_length(fraction, 1) then
-        RAISE EXCEPTION 'The length of via_edges is different of length of via_edges';
-      END IF;
-
-      FOR i IN 1 .. array_length(via_edges, 1)
-      LOOP
-          IF fraction[i] = 0 THEN
-              sql_on_vertex := 'SELECT source FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.source;
-          ELSE IF fraction[i] = 1 THEN
-              sql_on_vertex := 'SELECT target FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.target;
-          ELSE
-              via_vertices[i] = -i;
-              IF has_rcost THEN
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost,
-                              reverse_cost * (1 - ' || fraction[i] || ')  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost,
-                              reverse_cost *  ' || fraction[i] || '  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' where id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               ELSE
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               END IF;
-          END IF;
-          END IF;
-     END LOOP;
-
-     IF sql_new_vertices = ' ' THEN
-         new_edges := sql;
-     ELSE
-         IF has_rcost THEN
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost,
-                         lead(cost) OVER w  - cost AS reverse_cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL),
-                   second_part AS ( SELECT * FROM (SELECT id, lead(source) OVER w  AS source, source as target,
-                         reverse_cost - lead(reverse_cost) OVER w  AS cost,
-                         reverse_cost - lead(reverse_cost) OVER w  AS reverse_cost
-                      FROM  the_union  WHERE target > 0 and reverse_cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY reverse_cost ASC) ) as n2
-                      WHERE source IS NOT NULL),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part)
-                             UNION
-                       (SELECT * FROM second_part) ) _union )
-                  SELECT *  FROM more_union';
-         ELSE
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL ),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part) ) _union )
-                  SELECT *  FROM more_union';
-          END IF;
-      END IF;
-
- -- raise notice '%', new_edges;
-     sql_new_vertices := sql_new_vertices || v_union || ' (' || sql || ')';
-     RETURN query SELECT *
-         FROM pgr_dijkstraVia(new_edges, via_vertices, directed, has_rcost);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_lineGraph(
-    TEXT, -- edges_sql
-    directed BOOLEAN DEFAULT true,
-    OUT seq INTEGER,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost FLOAT,
-    OUT reverse_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'lineGraph'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_connectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'connectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_strongComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'strongComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_biconnectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the edge in the component
-    OUT n_seq INTEGER,          -- nth_seq of the edge in the component
-    OUT edge BIGINT)            -- the number of the edge
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'biconnectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_articulationPoints(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'articulationPoints'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bridges(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT edge BIGINT)            -- the number of the edge 
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bridges'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createtopology(edge_table text, tolerance double precision,
-		   the_geom text default 'the_geom', id text default 'id',
-		   source text default 'source', target text default 'target',rows_where text default 'true',
-		   clean boolean default FALSE)
-RETURNS VARCHAR AS
-$BODY$
-
-DECLARE
-    points record;
-    sridinfo record;
-    source_id bigint;
-    target_id bigint;
-    totcount bigint;
-    rowcount bigint;
-    srid integer;
-    sql text;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    notincluded integer;
-    i integer;
-    naming record;
-    info record;
-    flag boolean;
-    query text;
-    idtype text;
-    gtype text;
-    sourcetype text;
-    targettype text;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-    msgKind int;
-    emptied BOOLEAN;
-
-BEGIN
-    msgKind = 1; -- notice
-    fnName = 'pgr_createTopology';
-    raise notice 'PROCESSING:';
-    raise notice 'pgr_createTopology(''%'', %, ''%'', ''%'', ''%'', ''%'', rows_where := ''%'', clean := %)',edge_table,tolerance,the_geom,id,source,target,rows_where, clean;
-    execute 'show client_min_messages' into debuglevel;
-
-
-    raise notice 'Performing checks, please wait .....';
-
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-        sname=naming.sname;
-        tname=naming.tname;
-        tabname=sname||'.'||tname;
-        vname=tname||'_vertices_pgr';
-        vertname= sname||'.'||vname;
-        rows_where = ' AND ('||rows_where||')';
-      raise DEBUG '     --> OK';
-
-
-      raise debug 'Checking column names in edge table';
-        select * into idname     from _pgr_getColumnName(sname, tname,id,2,fnName);
-        select * into sourcename from _pgr_getColumnName(sname, tname,source,2,fnName);
-        select * into targetname from _pgr_getColumnName(sname, tname,target,2,fnName);
-        select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2,fnName);
-
-
-        err = sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname;
-        perform _pgr_onError( err, 2, fnName,
-               'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-	       'Column names are OK');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking column types in edge table';
-        select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-        select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-        select * into idtype from _pgr_getColumnType(sname,tname,idname,1, fnName);
-
-        err = idtype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column id:'|| idname, ' Expected type of '|| idname || ' is integer,smallint or bigint but '||idtype||' was found');
-
-        err = sourcetype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column source:'|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-        err = targettype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column target:'|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or bigint but '||targettype||' was found');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         raise debug '%',query;
-         EXECUTE query INTO sridinfo;
-
-         err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-         perform _pgr_onError(err, 2, fnName,
-	     'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-
-         srid := sridinfo.srid;
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking and creating indices in edge table';
-        perform _pgr_createIndex(sname, tname , idname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-
-        gname=quote_ident(gname);
-        idname=quote_ident(idname);
-        sourcename=quote_ident(sourcename);
-        targetname=quote_ident(targetname);
-      raise DEBUG '     --> OK';
-
-
-
-
-
-    BEGIN
-        -- issue #193 & issue #210 & #213
-        -- this sql is for trying out the where clause
-        -- the select * is to avoid any column name conflicts
-        -- limit 1, just try on first record
-        -- if the where clasuse is ill formed it will be caught in the exception
-        sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-        EXECUTE sql into dummyRec;
-        -- end
-
-        -- if above where clasue works this one should work
-        -- any error will be caught by the exception also
-        sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NOT NULL AND '||
-	    idname||' IS NOT NULL)=false '||rows_where;
-        EXECUTE SQL  into notincluded;
-
-        if clean then
-            raise debug 'Cleaning previous Topology ';
-               execute 'UPDATE ' || _pgr_quote_ident(tabname) ||
-               ' SET '||sourcename||' = NULL,'||targetname||' = NULL';
-        else
-            raise debug 'Creating topology for edges with non assigned topology';
-            if rows_where=' AND (true)' then
-                rows_where=  ' and ('||quote_ident(sourcename)||' is null or '||quote_ident(targetname)||' is  null)';
-            end if;
-        end if;
-        -- my thoery is that the select Count(*) will never go through here
-        EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-             RAISE NOTICE '%',sql;
-             RETURN 'FAIL';
-    END;
-
-    BEGIN
-         raise DEBUG 'initializing %',vertname;
-         execute 'select * from _pgr_getTableName('||quote_literal(vertname)
-                                                  || ',0,' || quote_literal(fnName) ||' )' into naming;
-         emptied = false;
-         set client_min_messages  to warning;
-         IF sname=naming.sname AND vname=naming.tname  THEN
-            if clean then
-                execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-                execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-                emptied = true;
-            end if;
-         ELSE -- table doesn't exist
-            execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-            emptied = true;
-         END IF;
-         IF (emptied) THEN
-             execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-	         quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-             perform _pgr_createIndex(vertname , 'the_geom'::text , 'gist'::text);
-         END IF;
-         execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id"}''::text[])' into naming;
-         execute 'set client_min_messages  to '|| debuglevel;
-         raise DEBUG  '  ------>OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: something went wrong when initializing the verties table';
-             RETURN 'FAIL';
-    END;
-
-
-
-    raise notice 'Creating Topology, Please wait...';
-        rowcount := 0;
-        FOR points IN EXECUTE 'SELECT ' || idname || '::bigint AS id,'
-            || ' _pgr_StartPoint(' || gname || ') AS source,'
-            || ' _pgr_EndPoint('   || gname || ') AS target'
-            || ' FROM '  || _pgr_quote_ident(tabname)
-            || ' WHERE ' || gname || ' IS NOT NULL AND ' || idname||' IS NOT NULL '||rows_where
-        LOOP
-
-            rowcount := rowcount + 1;
-            IF rowcount % 1000 = 0 THEN
-                RAISE NOTICE '% edges processed', rowcount;
-            END IF;
-
-
-            source_id := _pgr_pointToId(points.source, tolerance,vertname,srid);
-            target_id := _pgr_pointToId(points.target, tolerance,vertname,srid);
-            BEGIN
-                sql := 'UPDATE ' || _pgr_quote_ident(tabname) ||
-                    ' SET '||sourcename||' = '|| source_id::text || ','||targetname||' = ' || target_id::text ||
-                    ' WHERE ' || idname || ' =  ' || points.id::text;
-
-                IF sql IS NULL THEN
-                    RAISE NOTICE 'WARNING: UPDATE % SET source = %, target = % WHERE % = % ', tabname, source_id::text, target_id::text, idname,  points.id::text;
-                ELSE
-                    EXECUTE sql;
-                END IF;
-                EXCEPTION WHEN OTHERS THEN
-                    RAISE NOTICE '%', SQLERRM;
-                    RAISE NOTICE '%',sql;
-                    RETURN 'FAIL';
-            end;
-        END LOOP;
-        raise notice '-------------> TOPOLOGY CREATED FOR  % edges', rowcount;
-        RAISE NOTICE 'Rows with NULL geometry or NULL id: %',notincluded;
-        Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname), _pgr_quote_ident(vertname);
-        raise notice '----------------------------------------------';
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_createTopology(text, double precision,text,text,text,text,text,boolean)
-IS 'args: edge_table,tolerance, the_geom:=''the_geom'',source:=''source'', target:=''target'',rows_where:=''true'' - fills columns source and target in the geometry table and creates a vertices table for selected rows';
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
-RETURNS character varying AS
-$BODY$
-
-DECLARE
-    points record;
-    seg record;
-    naming record;
-    sridinfo record;
-    srid integer;
-    ecnt integer;
-    vertname text;
-    sname text;
-    tname text;
-    vname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    geotype text;
-    gname text;
-    tabName text;
-    flag boolean ;
-    query text;
-    selectionquery text;
-    i integer;
-    tot integer;
-    NumIsolated integer;
-    numdeadends integer;
-    numgaps integer;
-    NumCrossing integer;
-    numRings integer;
-    debuglevel text;
-
-
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeGraph(''%'',%,''%'',''%'',''%'',''%'',''%'')',edge_table,tolerance,the_geom,id,source,target,rows_where;
-  raise notice 'Performing checks, please wait ...';
-  execute 'show client_min_messages' into debuglevel;
-
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-    raise DEBUG '     --> OK';
-
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","cnt","chk"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET cnt=0 ,chk=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into idname     from _pgr_getColumnName(sname, tname,id,2);
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname, 2,
-                       'pgr_analyzeGraph',  'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-                       'Column names are OK');
-
-        raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-   BEGIN
-       raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         EXECUTE QUERY INTO sridinfo;
-
-         perform _pgr_onError( sridinfo IS NULL OR sridinfo.srid IS NULL,2,
-                 'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname,
-                 'SRID of '||gname||' is '||sridinfo.srid);
-
-         IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-             RAISE NOTICE ' Can not determine the srid of the geometry "%" in table %', the_geom,tabname;
-             RETURN 'FAIL';
-         END IF;
-         srid := sridinfo.srid;
-         raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM;--issue 210,211,213
-             RAISE NOTICE 'ERROR: something went wrong when checking for SRID of % in table %', the_geom,tabname;
-             RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-       raise debug 'Checking  indices in edge table';
-       perform _pgr_createIndex(tabname , idname , 'btree');
-       perform _pgr_createIndex(tabname , sourcename , 'btree');
-       perform _pgr_createIndex(tabname , targetname , 'btree');
-       perform _pgr_createIndex(tabname , gname , 'gist');
-
-       gname=quote_ident(gname);
-       sourcename=quote_ident(sourcename);
-       targetname=quote_ident(targetname);
-       idname=quote_ident(idname);
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking indices';
-          RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-        query='select count(*) from '||_pgr_quote_ident(tabname)||' where true  '||rows_where;
-        EXECUTE query into ecnt;
-        raise DEBUG '-->Rows Where condition: OK';
-        raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-            RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-            RAISE NOTICE 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-            RAISE NOTICE '%',query;
-            RETURN 'FAIL';
-    END;
-
-    selectionquery ='with
-           selectedRows as( (select '||sourcename||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||')
-                           union
-                           (select '||targetname||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||'))';
-
-
-
-
-
-   BEGIN
-       RAISE NOTICE 'Analyzing for dead ends. Please wait...';
-       query= 'with countingsource as (select a.'||sourcename||' as id,count(*) as cnts
-               from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||sourcename||')
-                     ,countingtarget as (select a.'||targetname||' as id,count(*) as cntt
-                    from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||targetname||')
-                   ,totalcount as (select id,case when cnts is null and cntt is null then 0
-                                                   when cnts is null then cntt
-                                                   when cntt is null then cnts
-                                                   else cnts+cntt end as totcnt
-                                   from ('||_pgr_quote_ident(vertname)||' as a left
-                                   join countingsource as t using(id) ) left join countingtarget using(id))
-               update '||_pgr_quote_ident(vertname)||' as a set cnt=totcnt from totalcount as b where a.id=b.id';
-       raise debug '%',query;
-       execute query;
-       query=selectionquery||'
-              SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE cnt=1 and id in (select id from selectedRows)';
-       raise debug '%',query;
-       execute query  INTO numdeadends;
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-          RAISE NOTICE 'ERROR: something went wrong when analizing for dead ends';
-          RETURN 'FAIL';
-   END;
-
-
-
-    BEGIN
-          RAISE NOTICE 'Analyzing for gaps. Please wait...';
-          query = 'with
-                   buffer as (select id,st_buffer(the_geom,'||tolerance||') as buff from '||_pgr_quote_ident(vertname)||' where cnt=1)
-                   ,veryclose as (select b.id,st_crosses(a.'||gname||',b.buff) as flag
-                   from  (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) as a
-                   join buffer as b on (a.'||gname||'&&b.buff)
-                   where '||sourcename||'!=b.id and '||targetname||'!=b.id )
-                   update '||_pgr_quote_ident(vertname)||' set chk=1 where id in (select distinct id from veryclose where flag=true)';
-          raise debug '%' ,query;
-          execute query;
-          GET DIAGNOSTICS  numgaps= ROW_COUNT;
-          raise DEBUG '     --> OK';
-          EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for gaps';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for isolated edges. Please wait...';
-        query=selectionquery|| ' SELECT count(*) FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' )  as a,
-                                                 '||_pgr_quote_ident(vertname)||' as b,
-                                                 '||_pgr_quote_ident(vertname)||' as c
-                            WHERE b.id in (select id from selectedRows) and a.'||sourcename||' =b.id
-                            AND b.cnt=1 AND a.'||targetname||' =c.id
-                            AND c.cnt=1';
-        raise debug '%' ,query;
-        execute query  INTO NumIsolated;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for isolated edges';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for ring geometries. Please wait...';
-        execute 'SELECT geometrytype('||gname||')  FROM '||_pgr_quote_ident(tabname) limit 1 into geotype;
-        IF (geotype='MULTILINESTRING') THEN
-            query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                 WHERE true  '||rows_where||' and st_isRing(st_linemerge('||gname||'))';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        ELSE query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                  WHERE true  '||rows_where||' and st_isRing('||gname||')';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        END IF;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for ring geometries';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for intersections. Please wait...';
-        query = 'select count(*) from (select distinct case when a.'||idname||' < b.'||idname||' then a.'||idname||'
-                                                        else b.'||idname||' end,
-                                                   case when a.'||idname||' < b.'||idname||' then b.'||idname||'
-                                                        else a.'||idname||' end
-                                    FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as a
-                                    JOIN (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as b
-                                    ON (a.'|| gname||' && b.'||gname||')
-                                    WHERE a.'||idname||' != b.'||idname|| '
-                                        and (a.'||sourcename||' in (b.'||sourcename||',b.'||targetname||')
-                                              or a.'||targetname||' in (b.'||sourcename||',b.'||targetname||')) = false
-                                        and st_intersects(a.'||gname||', b.'||gname||')=true) as d ';
-        raise debug '%' ,query;
-        execute query  INTO numCrossing;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for intersections';
-            RETURN 'FAIL';
-    END;
-
-
-
-
-    RAISE NOTICE '            ANALYSIS RESULTS FOR SELECTED EDGES:';
-    RAISE NOTICE '                  Isolated segments: %', NumIsolated;
-    RAISE NOTICE '                          Dead ends: %', numdeadends;
-    RAISE NOTICE 'Potential gaps found near dead ends: %', numgaps;
-    RAISE NOTICE '             Intersections detected: %',numCrossing;
-    RAISE NOTICE '                    Ring geometries: %',numRings;
-
-
-    RETURN 'OK';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_analyzeGraph(text,double precision,text,text,text,text,text) IS 'args: edge_table, tolerance,the_geom:=''the_geom'',id:=''id'',source column:=''source'', target column:=''target'' rows_where:=''true'' - creates a vertices table based on the geometry for selected rows';
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzeOneway(
-   edge_table text,
-   s_in_rules TEXT[],
-   s_out_rules TEXT[],
-   t_in_rules TEXT[],
-   t_out_rules TEXT[],
-   two_way_if_null boolean default true,
-   oneway text default 'oneway',
-   source text default 'source',
-   target text default 'target')
-  RETURNS text AS
-$BODY$
-
-
-DECLARE
-    rule text;
-    ecnt integer;
-    instr text;
-    naming record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    owname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    vertname text;
-    debuglevel text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeOneway(''%'',''%'',''%'',''%'',''%'',''%'',''%'',''%'',%)',
-		edge_table, s_in_rules , s_out_rules, t_in_rules, t_out_rules, oneway, source ,target,two_way_if_null ;
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    raise DEBUG '     --> OK';
-    EXCEPTION WHEN raise_exception THEN
-      RAISE NOTICE 'ERROR: something went wrong checking the table name';
-      RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","ein","eout"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET eout=0 ,ein=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into owname from _pgr_getColumnName(sname, tname,oneway,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,owname) or  targetname=owname, 2,
-                       '_pgr_createToplogy',  'Two columns share the same name', 'Parameter names for oneway,source and target  must be different',
-                       'Column names are OK');
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-
-
-    RAISE NOTICE 'Analyzing graph for one way street errors.';
-
-    rule := CASE WHEN two_way_if_null
-            THEN owname || ' IS NULL OR '
-            ELSE '' END;
-
-    instr := '''' || array_to_string(s_in_rules, ''',''') || '''';
-       EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-      from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-     where a.id=b.'|| sourcename;
-
-    RAISE NOTICE 'Analysis 25%% complete ...';
-
-    instr := '''' || array_to_string(t_in_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 50%% complete ...';
-
-    instr := '''' || array_to_string(s_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-        where a.id=b.'|| sourcename;
-    RAISE NOTICE 'Analysis 75%% complete ...';
-
-    instr := '''' || array_to_string(t_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 100%% complete ...';
-
-    EXECUTE 'SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE ein=0 or eout=0' INTO ecnt;
-
-    RAISE NOTICE 'Found % potential problems in directionality' ,ecnt;
-
-    RETURN 'OK';
-
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_analyzeOneway(text,TEXT[],TEXT[], TEXT[],TEXT[],boolean,text,text,text)
-IS 'args:edge_table , s_in_rules , s_out_rules, t_in_rules , t_out_rules, two_way_if_null:= true, oneway:=''oneway'',source:= ''source'',target:=''target'' - Analizes the directionality of the edges based on the rules';
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createverticestable(
-   edge_table text,
-   the_geom text DEFAULT 'the_geom'::text,
-   source text DEFAULT 'source'::text,
-   target text DEFAULT 'target'::text,
-    rows_where text DEFAULT 'true'::text
-)
-  RETURNS text AS
-$BODY$
-DECLARE
-    naming record;
-    sridinfo record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    sourcename text;
-    targetname text;
-    query text;
-    ecnt bigint;
-    srid integer;
-    sourcetype text;
-    targettype text;
-    sql text;
-    totcount integer;
-    i integer;
-    notincluded integer;
-    included integer;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-
-
-BEGIN
-  fnName = 'pgr_createVerticesTable';
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_createVerticesTable(''%'',''%'',''%'',''%'',''%'')',edge_table,the_geom,source,target,rows_where;
-  execute 'show client_min_messages' into debuglevel;
-
-  raise notice 'Performing checks, please wait .....';
-
-  RAISE DEBUG 'Checking % exists',edge_table;
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-  raise debug '--> Edge table exists: OK';
-
-  raise debug 'Checking column names';
-    select * into sourcename from _pgr_getColumnName(sname, tname,source,2, fnName);
-    select * into targetname from _pgr_getColumnName(sname, tname,target,2, fnName);
-    select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2, fnName);
-
-
-    err = sourcename in (targetname,gname) or  targetname=gname;
-    perform _pgr_onError(err, 2, fnName,
-        'Two columns share the same name', 'Parameter names for the_geom,source and target  must be different');
-  raise debug '--> Column names: OK';
-
-  raise debug 'Checking column types in edge table';
-    select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-    select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-
-
-    err = sourcetype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column source: '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-    err = targettype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column target: '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found');
-
-  raise debug '-->Column types:OK';
-
-  raise debug 'Checking SRID of geometry column';
-     query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-        || ' FROM ' || _pgr_quote_ident(tabname)
-        || ' WHERE ' || quote_ident(gname)
-        || ' IS NOT NULL LIMIT 1';
-     raise debug '%',query;
-     EXECUTE query INTO sridinfo;
-
-     err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-     perform _pgr_onError(err, 2, fnName,
-         'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-     srid := sridinfo.srid;
-  raise DEBUG '     --> OK';
-
-  raise debug 'Checking and creating Indices';
-     perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-  raise DEBUG '-->Check and create indices: OK';
-
-     gname=quote_ident(gname);
-     sourcename=quote_ident(sourcename);
-     targetname=quote_ident(targetname);
-
-
-  BEGIN
-  raise debug 'Checking Condition';
-    -- issue #193 & issue #210 & #213
-    -- this sql is for trying out the where clause
-    -- the select * is to avoid any column name conflicts
-    -- limit 1, just try on first record
-    -- if the where clasuse is ill formed it will be caught in the exception
-    sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-    EXECUTE sql into dummyRec;
-    -- end
-
-    -- if above where clasue works this one should work
-    -- any error will be caught by the exception also
-    sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NULL or '||
-		sourcename||' is null or '||targetname||' is null)=true '||rows_where;
-    raise debug '%',sql;
-    EXECUTE SQL  into notincluded;
-    EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-
-
-
-  BEGIN
-     raise DEBUG 'initializing %',vertname;
-       execute 'select * from _pgr_getTableName('||quote_literal(vertname)||',0)' into naming;
-       IF sname=naming.sname  AND vname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-       ELSE
-           set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-       END IF;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-                quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-       execute 'CREATE INDEX '||quote_ident(vname||'_the_geom_idx')||' ON '||_pgr_quote_ident(vertname)||'  USING GIST (the_geom)';
-       execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-       EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Initializing vertex table';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise notice 'Populating %, please wait...',vertname;
-       sql= 'with
-		lines as ((select distinct '||sourcename||' as id, _pgr_startpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-		                  ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||')
-			union (select distinct '||targetname||' as id,_pgr_endpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-			          ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||'))
-		,numberedLines as (select row_number() OVER (ORDER BY id) AS i,* from lines )
-		,maxid as (select id,max(i) as maxi from numberedLines group by id)
-		insert into '||_pgr_quote_ident(vertname)||'(id,the_geom)  (select id,the_geom  from numberedLines join maxid using(id) where i=maxi order by id)';
-       RAISE debug '%',sql;
-       execute sql;
-       GET DIAGNOSTICS totcount = ROW_COUNT;
-
-       sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' a, '||_pgr_quote_ident(vertname)||' b
-            where '||sourcename||'=b.id and '|| targetname||' in (select id from '||_pgr_quote_ident(vertname)||')';
-       RAISE debug '%',sql;
-       execute sql into included;
-
-
-
-       execute 'select max(id) from '||_pgr_quote_ident(vertname) into ecnt;
-       execute 'SELECT setval('||quote_literal(vertname||'_id_seq')||','||coalesce(ecnt,1)||' , false)';
-       raise notice '  ----->   VERTICES TABLE CREATED WITH  % VERTICES', totcount;
-       raise notice '                                       FOR   %  EDGES', included+notincluded;
-       RAISE NOTICE '  Edges with NULL geometry,source or target: %',notincluded;
-       RAISE NOTICE '                            Edges processed: %',included;
-       Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname),_pgr_quote_ident(vertname);
-       raise notice '----------------------------------------------';
-    END;
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_createVerticesTable(text,text,text,text,text)
-IS 'args: edge_table, the_geom:=''the_geom'',source:=''source'', target:=''target'' rows_where:=''true'' - creates a vertices table based on the source and target identifiers for selected rows';
-
-
-CREATE OR REPLACE FUNCTION pgr_nodeNetwork(edge_table text, tolerance double precision,
-			id text default 'id', the_geom text default 'the_geom', table_ending text default 'noded',
-            rows_where text DEFAULT ''::text, outall boolean DEFAULT false) RETURNS text AS
-$BODY$
-DECLARE
-	
-	p_num int := 0;
-	p_ret text := '';
-    pgis_ver_old boolean := _pgr_versionless(postgis_lib_version(), '2.1.0.0');
-    vst_line_substring text;
-    vst_line_locate_point text;
-    intab text;
-    outtab text;
-    n_pkey text;
-    n_geom text;
-    naming record;
-    sname text;
-    tname text;
-    outname text;
-    srid integer;
-    sridinfo record;
-    splits bigint;
-    touched bigint;
-    untouched bigint;
-    geomtype text;
-    debuglevel text;
-    rows_where text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_nodeNetwork(''%'', %, ''%'', ''%'', ''%'', ''%'',  %)',
-    edge_table, tolerance, id,  the_geom, table_ending, rows_where, outall;
-  raise notice 'Performing checks, please wait .....';
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',0)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-	RAISE NOTICE '-------> % not found',edge_table;
-        RETURN 'FAIL';
-    ELSE
-	RAISE DEBUG '  -----> OK';
-    END IF;
-
-    intab=sname||'.'||tname;
-    outname=tname||'_'||table_ending;
-    outtab= sname||'.'||outname;
-    rows_where = CASE WHEN length(rows_where) > 2 and not outall THEN ' AND (' || rows_where || ')' ELSE '' END;
-    rows_where = CASE WHEN length(rows_where) > 2 THEN ' WHERE (' || rows_where || ')' ELSE '' END;
-  END;
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',id,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(id)||')' INTO n_pkey;
-       IF n_pkey is NULL then
-          raise notice  'ERROR: id column "%"  not found in %',id,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',the_geom,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(the_geom)||')' INTO n_geom;
-       IF n_geom is NULL then
-          raise notice  'ERROR: the_geom  column "%"  not found in %',the_geom,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-  IF n_pkey=n_geom THEN
-	raise notice  'ERROR: id and the_geom columns have the same name "%" in %',n_pkey,intab;
-        RETURN 'FAIL';
-  END IF;
-
-  BEGIN
-       	raise DEBUG 'Checking the SRID of the geometry "%"', n_geom;
-       	EXECUTE 'SELECT ST_SRID(' || quote_ident(n_geom) || ') as srid '
-          		|| ' FROM ' || _pgr_quote_ident(intab)
-          		|| ' WHERE ' || quote_ident(n_geom)
-          		|| ' IS NOT NULL LIMIT 1' INTO sridinfo;
-       	IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-        	RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           	RETURN 'FAIL';
-       	END IF;
-       	srid := sridinfo.srid;
-       	raise DEBUG '  -----> SRID found %',srid;
-       	EXCEPTION WHEN OTHERS THEN
-           		RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           		RETURN 'FAIL';
-  END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_pkey,intab;
-      if (_pgr_isColumnIndexed(intab,n_pkey)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding  index "%_%_idx".',n_pkey,intab;
-
-	set client_min_messages  to warning;
-        execute 'create  index '||tname||'_'||n_pkey||'_idx on '||_pgr_quote_ident(intab)||' using btree('||quote_ident(n_pkey)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_geom,intab;
-      if (_pgr_iscolumnindexed(intab,n_geom)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding unique index "%_%_gidx".',intab,n_geom;
-	set client_min_messages  to warning;
-        execute 'CREATE INDEX '
-            || quote_ident(tname || '_' || n_geom || '_gidx' )
-            || ' ON ' || _pgr_quote_ident(intab)
-            || ' USING gist (' || quote_ident(n_geom) || ')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
----------------
-    BEGIN
-       raise DEBUG 'initializing %',outtab;
-       execute 'select * from _pgr_getTableName('||quote_literal(outtab)||',0)' into naming;
-       IF sname=naming.sname  AND outname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(outtab)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(outname)||','||quote_literal(n_geom)||')';
-       ELSE
-	   set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(outtab)||' (id bigserial PRIMARY KEY,old_id integer,sub_id integer,
-								source bigint,target bigint)';
-       END IF;
-       execute 'select geometrytype('||quote_ident(n_geom)||') from  '||_pgr_quote_ident(intab)||' limit 1' into geomtype;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(outname)||','||
-                quote_literal(n_geom)||','|| srid||', '||quote_literal(geomtype)||', 2)';
-       execute 'CREATE INDEX '||quote_ident(outname||'_'||n_geom||'_idx')||' ON '||_pgr_quote_ident(outtab)||'  USING GIST ('||quote_ident(n_geom)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-    END;
-----------------
-
-
-  raise notice 'Processing, please wait .....';
-
-
-    if pgis_ver_old then
-        vst_line_substring    := 'st_line_substring';
-        vst_line_locate_point := 'st_line_locate_point';
-    else
-        vst_line_substring    := 'st_linesubstring';
-        vst_line_locate_point := 'st_linelocatepoint';
-    end if;
-
---    -- First creates temp table with intersection points
-    p_ret = 'create temp table intergeom on commit drop as (
-        select l1.' || quote_ident(n_pkey) || ' as l1id,
-               l2.' || quote_ident(n_pkey) || ' as l2id,
-	       l1.' || quote_ident(n_geom) || ' as line,
-	       _pgr_startpoint(l2.' || quote_ident(n_geom) || ') as source,
-	       _pgr_endpoint(l2.' || quote_ident(n_geom) || ') as target,
-               st_intersection(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ') as geom
-        from (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l1
-             join (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l2
-             on (st_dwithin(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ', ' || tolerance || '))'||
-        'where l1.' || quote_ident(n_pkey) || ' <> l2.' || quote_ident(n_pkey)||' and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false  )';
-    raise debug '%',p_ret;
-    EXECUTE p_ret;
-
-    -- second temp table with locus (index of intersection point on the line)
-    -- to avoid updating the previous table
-    -- we keep only intersection points occurring onto the line, not at one of its ends
---    drop table if exists inter_loc;
-
---HAD TO CHANGE THIS QUERY
--- p_ret= 'create temp table inter_loc on commit drop as (
---        select l1id, l2id, ' || vst_line_locate_point || '(line,point) as locus from (
---        select DISTINCT l1id, l2id, line, (ST_DumpPoints(geom)).geom as point from intergeom) as foo
---        where ' || vst_line_locate_point || '(line,point)<>0 and ' || vst_line_locate_point || '(line,point)<>1)';
-    p_ret= 'create temp table inter_loc on commit drop as ( select * from (
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,source) as locus from intergeom)
-         union
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,target) as locus from intergeom)) as foo
-        where locus<>0 and locus<>1)';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-
-    -- index on l1id
-    create index inter_loc_id_idx on inter_loc(l1id);
-
-    -- Then computes the intersection on the lines subset, which is much smaller than full set
-    -- as there are very few intersection points
-
---- outab needs to be formally created with id, old_id, subid,the_geom, source,target
----  so it can be inmediatly be used with createTopology
-
---   EXECUTE 'drop table if exists ' || _pgr_quote_ident(outtab);
---   EXECUTE 'create table ' || _pgr_quote_ident(outtab) || ' as
-     P_RET = 'insert into '||_pgr_quote_ident(outtab)||' (old_id,sub_id,'||quote_ident(n_geom)||') (  with cut_locations as (
-           select l1id as lid, locus
-           from inter_loc
-           -- then generates start and end locus for each line that have to be cut buy a location point
-           UNION ALL
-           select i.l1id  as lid, 0 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           UNION ALL
-           select i.l1id  as lid, 1 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           order by lid, locus
-       ),
-       -- we generate a row_number index column for each input line
-       -- to be able to self-join the table to cut a line between two consecutive locations
-       loc_with_idx as (
-           select lid, locus, row_number() over (partition by lid order by locus) as idx
-           from cut_locations
-       )
-       -- finally, each original line is cut with consecutive locations using linear referencing functions
-       select l.' || quote_ident(n_pkey) || ', loc1.idx as sub_id, ' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus) as ' || quote_ident(n_geom) || '
-       from loc_with_idx loc1 join loc_with_idx loc2 using (lid) join ' || _pgr_quote_ident(intab) || ' l on (l.' || quote_ident(n_pkey) || ' = loc1.lid)
-       where loc2.idx = loc1.idx+1
-           -- keeps only linestring geometries
-           and geometryType(' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus)) = ''LINESTRING'') ';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-	GET DIAGNOSTICS splits = ROW_COUNT;
-        execute 'with diff as (select distinct old_id from '||_pgr_quote_ident(outtab)||' )
-                 select count(*) from diff' into touched;
-	-- here, it misses all original line that did not need to be cut by intersection points: these lines
-	-- are already clean
-	-- inserts them in the final result: all lines which gid is not in the res table.
-	EXECUTE 'insert into ' || _pgr_quote_ident(outtab) || ' (old_id , sub_id, ' || quote_ident(n_geom) || ')
-                ( with used as (select distinct old_id from '|| _pgr_quote_ident(outtab)||')
-		select ' ||  quote_ident(n_pkey) || ', 1 as sub_id, ' ||  quote_ident(n_geom) ||
-		' from '|| _pgr_quote_ident(intab) ||' where  '||quote_ident(n_pkey)||' not in (select * from used)' || rows_where || ')';
-	GET DIAGNOSTICS untouched = ROW_COUNT;
-
-	raise NOTICE '  Split Edges: %', touched;
-	raise NOTICE ' Untouched Edges: %', untouched;
-	raise NOTICE '     Total original Edges: %', touched+untouched;
-        RAISE NOTICE ' Edges generated: %', splits;
-	raise NOTICE ' Untouched Edges: %',untouched;
-	raise NOTICE '       Total New segments: %', splits+untouched;
-        RAISE NOTICE ' New Table: %', outtab;
-        RAISE NOTICE '----------------------------------';
-
-    drop table  if exists intergeom;
-    drop table if exists inter_loc;
-    RETURN 'OK';
-END;
-$BODY$
-    LANGUAGE 'plpgsql' VOLATILE STRICT COST 100;
-
-
-COMMENT ON FUNCTION pgr_nodeNetwork(text, double precision, text, text, text, text, boolean )
- IS  'edge_table, tolerance, id:=''id'', the_geom:=''the_geom'', table_ending:=''noded'' ';
-
-
-CREATE OR REPLACE FUNCTION pgr_labelGraph(
-                edge_table text,
-                id text default 'id',
-                source text default 'source',
-                target text default 'target',
-                subgraph text default 'subgraph',
-                rows_where text default 'true'
-        )
-        RETURNS character varying AS
-$BODY$
-
-DECLARE
-        naming record;
-        schema_name text;
-        table_name text;
-        garbage text;
-        incre integer;
-        table_schema_name text;
-        query text;
-        ecnt integer;
-        sql1 text;
-        rec1 record;
-        sql2 text;
-        rec2 record;
-        rec_count record;
-        rec_single record;
-        graph_id integer;
-        gids int [];
-
-BEGIN
-        raise notice 'Processing:';
-        raise notice 'pgr_brokenGraph(''%'',''%'',''%'',''%'',''%'',''%'')', edge_table,id,source,target,subgraph,rows_where;
-        raise notice 'Performing initial checks, please hold on ...';
-
-        Raise Notice 'Starting - Checking table ...';
-        BEGIN
-                raise debug 'Checking % table existance', edge_table;
-                execute 'select * from pgr_getTableName('|| quote_literal(edge_table) ||')' into naming;
-                schema_name = naming.sname;
-                table_name = naming.tname;
-                table_schema_name = schema_name||'.'||table_name;
-                IF schema_name is null then
-                        raise notice 'no schema';
-                        return 'FAIL';
-                else
-                        if table_name is null then
-                                raise notice 'no table';
-                                return 'FAIL';
-                        end if;
-                end if;
-        END;
-        Raise Notice 'Ending - Checking table';
-
-        Raise Notice 'Starting - Checking columns';
-        BEGIN
-                raise debug 'Checking exitance of necessary columns inside % table', edge_table;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(id) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no id column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(source) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no source column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(target) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no target column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(subgraph) ||')' into naming;
-                if naming.pgr_iscolumnintable = 't' then
-                        raise notice 'subgraph column already in the table';
-                        return 'FAIL';
-                end if;
-        END;
-        Raise Notice 'Ending - Checking columns';
-
-        Raise Notice 'Starting - Checking rows_where condition';
-        BEGIN
-                raise debug 'Checking rows_where condition';
-                query='select count(*) from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where;
-                execute query into ecnt;
-                raise debug '-->Rows where condition: OK';
-                raise debug '    --> OK';
-                EXCEPTION WHEN OTHERS THEN
-                        raise notice 'Got %', SQLERRM;
-                        Raise notice 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-                        Raise notice '%', query;
-                        return 'FAIL';
-        END;
-        Raise Notice 'Ending - Checking rows_where condition';
-
-        garbage := 'garbage001';
-        incre := 1;
-        Raise Notice 'Starting - Checking temporary column';
-        Begin
-                raise debug 'Checking Checking temporary columns existance';
-
-                While True
-                        Loop
-                                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(garbage) ||')' into naming;
-                                If naming.pgr_iscolumnintable = 't' THEN
-                                        incre := incre + 1;
-                                        garbage := 'garbage00'||incre||'';
-                                ELSE
-                                        EXIT;
-                                END IF;
-                        End Loop;
-        End;
-        Raise Notice 'Ending - Checking temporary column';
-
-        Raise Notice 'Starting - Calculating subgraphs';
-        BEGIN
-                --------- Add necessary columns ----------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(subgraph) || ' INTEGER DEFAULT -1';
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(garbage) || ' INTEGER DEFAULT 0';
-                graph_id := 1;
-
-                EXECUTE 'select count(*) as count from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where ||'' into rec_count;
-                if rec_count.count = 0 then
-                        RETURN 'rows_where condition generated 0 rows';
-                end if;
-
-                WHILE TRUE
-                        LOOP
-                                ---------- Assign the very first -1 row graph_id ----------
-                                EXECUTE 'SELECT ' || pgr_quote_ident(id) || ' AS gid FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1 LIMIT 1' INTO rec_single;
-                                EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec_single.gid || '';
-
-                                --------- Search other rows with that particular graph_id -----------
-                                WHILE TRUE
-                                        LOOP
-                                                EXECUTE 'SELECT COUNT(*) FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0' into rec_count;
-                                                ----------- The following if else will check those rows which already have entertained ------------
-                                                IF (rec_count.count > 0) THEN
-                                                        sql1 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0';
-                                                        FOR rec1 IN EXECUTE sql1
-                                                                LOOP
-                                                                        sql2 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| pgr_quote_ident(source) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(source) ||' = '|| rec1.target ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.target ||'';
-                                                                        FOR rec2 IN EXECUTE sql2
-                                                                                LOOP
-                                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec2.gid || '';
-                                                                                END LOOP;
-                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(garbage) || ' = 1 WHERE ' || pgr_quote_ident(id) || ' = ' || rec1.gid || '';
-                                                                END LOOP;
-                                                ELSE
-                                                        EXIT;
-                                                END IF;
-                                        END LOOP;
-
-                                ------ Following is to exit the while loop. 0 means no more -1 id.
-                                EXECUTE 'SELECT COUNT(*) AS count FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1' INTO rec_count;
-                                If (rec_count.count = 0) THEN
-                                        EXIT;
-                                ELSE
-                                        graph_id := graph_id + 1;
-                                END IF;
-                        END LOOP;
-
-                ----------- Drop garbage column ------------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' DROP COLUMN ' || pgr_quote_ident(garbage) ||'';
-                Raise Notice 'Successfully complicated calculating subgraphs';
-        END;
-        Raise Notice 'Ending - Calculating subgraphs';
-
-        RETURN 'OK';
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCostMatrix(
-    edges_sql TEXT,
-    points_sql TEXT,
-    pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_pid, a.end_pid, a.agg_cost
-        FROM _pgr_withPoints($1, $2, $3, $3, $4,  $5, TRUE, TRUE) AS a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
---  DIJKSTRA DMatrix
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2, $2, $3, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
---  BIDIRECTIONAL DIJKSTRA Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_astarCostMatrix(
-    edges_sql TEXT, -- XY edges sql
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2, $2, $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
---  BIDIRECTIONAL ASTAR Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdAstarCostMatrix(
-    edges_sql TEXT,
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_bdAstarCostMatrix(TEXT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCostMatrix';
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_getTableName(IN tab text,OUT sname text,OUT tname text)
-RETURNS RECORD AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getTableName: This function will no longer be soported';
-    select * from _pgr_getTableName(tab, 0, 'pgr_getTableName') into sname,tname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_getColumnName(tab text, col text)
-RETURNS text AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getColumnName: This function will no longer be soported';
-    return _pgr_getColumnName(tab,col, 0, 'pgr_getColumnName');
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    select * from _pgr_getColumnName(tab,col,0, 'pgr_isColumnInTable') into cname;
-    return  cname IS not NULL;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnIndexed(tab text, col text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnIndexed: This function will no longer be soported';
-    return  _pgr_isColumnIndexed(tab,col);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-create or replace function pgr_quote_ident(idname text)
-returns text as
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    return  _pgr_quote_ident(idname);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_versionless(v1 text, v2 text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_versionless: This function will no longer be soported';
-    return  _pgr_versionless(v1,v2);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-create or replace function pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_startPoint: This function will no longer be soported';
-    return  _pgr_startPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_endPoint: This function will no longer be soported';
-    return  _pgr_endPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspJohnson(edges_sql text)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_johnson instead';
-      has_reverse =_pgr_parameter_check('johnson', edges_sql, false);
-      sql = edges_sql;
-      IF (has_reverse) THEN
-           RAISE NOTICE 'reverse_cost column found, removing.';
-           sql = 'SELECT source, target, cost FROM (' || edges_sql || ') a';
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () - 1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_johnson(sql, TRUE);
-  END
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspWarshall(edges_sql text, directed boolean, has_rcost boolean)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_floydWarshall instead';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-      sql := edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         ELSE raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () -1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_floydWarshall(sql, directed);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_astar(edges_sql TEXT, source_id INTEGER, target_id INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated signature pgr_astar(text, integer, integer, boolean, boolean)';
-    has_reverse =_pgr_parameter_check('astar', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost, x1,y1, x2, y2 FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-    FROM pgr_astar(sql, ARRAY[$2], ARRAY[$3], directed);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    sql TEXT,
-    source_vid INTEGER,
-    target_vid INTEGER,
-    directed BOOLEAN,
-    has_reverse_cost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdAstar';
-    has_reverse =_pgr_parameter_check('astar', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdAstar(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(edges_sql TEXT, start_vid INTEGER, end_vid INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdDijkstra';
-    has_reverse =_pgr_parameter_check('dijkstra', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdDijkstra(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstraPath(
-    sql text,
-    source INTEGER,
-    targets INTEGER ARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-    RETURNS SETOF pgr_costResult3 AS
-    $BODY$
-    DECLARE
-    has_reverse BOOLEAN;
-    new_sql TEXT;
-    result pgr_costResult3;
-    tmp pgr_costResult3;
-    sseq INTEGER;
-    i INTEGER;
-    BEGIN
-        RAISE NOTICE 'Deprecated function: Use pgr_dijkstra instead.';
-        has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-        new_sql = sql;
-        IF (array_ndims(targets) != 1) THEN
-            raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-
-        IF (has_reverse != has_rcost) THEN
-            IF (has_reverse) THEN
-                new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-            ELSE
-                raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-                USING ERRCODE = 'XX000';
-            END IF;
-        END IF;
-        SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-        sseq = 0; i = 1;
-        FOR result IN
-            SELECT seq, a.end_vid::INTEGER AS id1, a.node::INTEGER AS i2, a.edge::INTEGER AS id3, cost
-            FROM pgr_dijkstra(new_sql, source, targets, directed) a ORDER BY a.end_vid, seq LOOP
-            WHILE (result.id1 != targets[i]) LOOP
-                tmp.seq = sseq;
-                tmp.id1 = targets[i];
-                IF (targets[i] = source) THEN
-                    tmp.id2 = source;
-                    tmp.cost =0;
-                ELSE
-                    tmp.id2 = 0;
-                    tmp.cost = -1;
-                END IF;
-                tmp.id3 = -1;
-                RETURN next tmp;
-                i = i + 1;
-                sseq = sseq + 1;
-            END LOOP;
-        IF (result.id1 = targets[i] AND result.id3 != -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-        IF (result.id1 = targets[i] AND result.id3 = -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.id2 = source;
-            tmp.cost = 0;
-        ELSE
-            tmp.id2 = 0;
-            tmp.cost = -1;
-        END IF;
-        tmp.id3 = -1;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstracost(
-    sql text,
-    source INTEGER,
-    targets INTEGER array,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-result pgr_costResult;
-tmp pgr_costResult;
-sseq INTEGER;
-i INTEGER;
-BEGIN
-    RAISE NOTICE 'Deprecated function. Use pgr_dijkstraCost instead.';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    new_sql = sql;
-    IF (array_ndims(targets) != 1) THEN
-        raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-        USING ERRCODE = 'XX000';
-    END IF;
-
-
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-    sseq = 0; i = 1;
-    FOR result IN
-        SELECT ((row_number() over()) -1)::INTEGER, a.start_vid::INTEGER, a.end_vid::INTEGER, agg_cost
-        FROM pgr_dijkstraCost(new_sql, source, targets, directed) a ORDER BY end_vid LOOP
-        WHILE (result.id2 != targets[i]) LOOP
-            tmp.seq = sseq;
-            tmp.id1 = source;
-            tmp.id2 = targets[i];
-            IF (targets[i] = source) THEN
-                tmp.cost = 0;
-            ELSE
-                tmp.cost = -1;
-            END IF;
-            RETURN next tmp;
-            i = i + 1;
-            sseq = sseq + 1;
-        END LOOP;
-        IF (result.id2 = targets[i]) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = source;
-        tmp.id2 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.cost = 0;
-        ELSE
-            tmp.cost = -1;
-        END IF;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-create or replace function pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    returns integer as
-$body$
-
-declare
-    rr record;
-    pct float;
-    debuglevel text;
-
-begin
-    -- find the closest edge within tol distance
-    execute 'select * from ' || _pgr_quote_ident(edges) ||
-            ' where st_dwithin(''' || pnt::text ||
-            '''::geometry, the_geom, ' || tol || ') order by st_distance(''' || pnt::text ||
-            '''::geometry, the_geom) asc limit 1' into rr;
-
-    if rr.the_geom is not null then
-        -- deal with MULTILINESTRINGS
-        if geometrytype(rr.the_geom)='MULTILINESTRING' THEN
-            rr.the_geom := ST_GeometryN(rr.the_geom, 1);
-        end if;
-
-        -- project the point onto the linestring
-        execute 'show client_min_messages' into debuglevel;
-        SET client_min_messages='ERROR';
-        pct := st_line_locate_point(rr.the_geom, pnt);
-        execute 'set client_min_messages  to '|| debuglevel;
-
-        -- return the node we are closer to
-        if pct < 0.5 then
-            return rr.source;
-        else
-            return rr.target;
-        end if;
-    else
-        -- return a failure to find an edge within tol distance
-        return -1;
-    end if;
-end;
-$body$
-  language plpgsql volatile
-  cost 5;
-
-
-----------------------------------------------------------------------------
-
-create or replace function pgr_flipedges(ga geometry[])
-    returns geometry[] as
-$body$
-
-declare
-    nn integer;
-    i integer;
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_flipEdges';
-    -- get the count of edges, and return if only one edge
-    nn := array_length(ga, 1);
-    if nn=1 then
-        return ga;
-    end if;
-
-    -- determine if first needs to be flipped
-    g := _pgr_startpoint(ga[1]);
-
-    -- if the start of the first is connected to the second then it needs to be flipped
-    if _pgr_startpoint(ga[2])=g or _pgr_endpoint(ga[2])=g then
-        ga[1] := st_reverse(ga[1]);
-    end if;
-    g := _pgr_endpoint(ga[1]);
-
-    -- now if  the end of the last edge matchs the end of the current edge we need to flip it
-    for i in 2 .. nn loop
-        if _pgr_endpoint(ga[i])=g then
-            ga[i] := st_reverse(ga[i]);
-        end if;
-        -- save the end of this edge into the last end for the next cycle
-        g := _pgr_endpoint(ga[i]);
-    end loop;
-
-    return ga;
-end;
-$body$
-    language plpgsql immutable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_texttopoints(pnts text, srid integer DEFAULT(4326))
-    returns geometry[] as
-$body$
-
-declare
-    a text[];
-    t text;
-    p geometry;
-    g geometry[];
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_textToPoints';
-    -- convert commas to space and split on ';'
-    a := string_to_array(replace(pnts, ',', ' '), ';');
-    -- convert each 'x y' into a point geometry and concattenate into a new array
-    for t in select unnest(a) loop
-        p := st_pointfromtext('POINT(' || t || ')', srid);
-        g := g || p;
-    end loop;
-
-    return g;
-end;
-$body$
-    language plpgsql immutable;
-
------------------------------------------------------------------------
-
-create or replace function pgr_pointstovids(pnts geometry[], edges text, tol float8 DEFAULT(0.01))
-    returns integer[] as
-$body$
-
-declare
-    v integer[];
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_pointsToVids';
-    -- cycle through each point and locate the nearest edge and vertex on that edge
-    for g in select unnest(pnts) loop
-        v := v || pgr_pointtoedgenode(edges, g, tol);
-    end loop;
-
-    return v;
-end;
-$body$
-    language plpgsql stable;
-
-
-create or replace function pgr_pointstodmatrix(pnts geometry[], mode integer default (0), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    r record;
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_pointsToDMatrix';
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    -- create an id for each point in the array and unnest it into a table nodes in the with clause
-    for r in with nodes as (select row_number() over()::integer as id, p from (select unnest(pnts) as p) as foo)
-        -- compute a row of distances
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j,
-                case when mode=0
-                    then st_distance(a.p, b.p)
-                    else st_distance_sphere(a.p, b.p)
-                end as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i loop
-
-        -- you must concat an array[array[]] to make dmatrix[][]
-        -- concat the row of distances to the dmatrix
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-end;
-$body$
-    language plpgsql stable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_vidstodmatrix(IN vids integer[], IN pnts geometry[], IN edges text, tol float8 DEFAULT(0.1), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    i integer;
-    j integer;
-    nn integer;
-    rr record;
-    bbox geometry;
-    t float8[];
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    -- check if the input arrays has any -1 values, maybe this whould be a raise exception
-    if vids @> ARRAY[-1] then
-    raise notice 'Some vids are undefined (-1)!';
-    dmatrix := null;
-    ids := null;
-    return;
-    end if;
-
-    ids := vids;
-
-    -- get the count of nodes
-    nn := array_length(vids,1);
-
-    -- zero out a dummy row
-    for i in 1 .. nn loop
-        t := t || 0.0::float8;
-    end loop;
-
-    -- using the dummy row, zero out the whole matrix
-    for i in 1 .. nn loop
-    dmatrix := dmatrix || ARRAY[t];
-    end loop;
-
-    for i in 1 .. nn-1 loop
-        j := i;
-        -- compute the bbox for the point needed for this row
-        select st_expand(st_collect(pnts[id]), tol) into bbox
-          from (select generate_series as id from generate_series(i, nn)) as foo;
-
-        -- compute kdijkstra() for this row
-        for rr in execute 'select * from pgr_dijkstracost($1, $2, $3, false)'
-                  using 'select id, source, target, cost from ' || edges ||
-                        ' where the_geom && ''' || bbox::text || '''::geometry'::text, vids[i], vids[i+1:nn] loop
-
-            -- TODO need to check that all node were reachable from source
-            -- I think unreachable paths between nodes returns cost=-1.0
-
-            -- populate the matrix with the cost values, remember this is symmetric
-            j := j + 1;
-            -- raise notice 'cost(%,%)=%', i, j, rr.agg_cost;
-            dmatrix[i][j] := rr.agg_cost;
-            dmatrix[j][i] := rr.agg_cost;
-        end loop;
-    end loop;
-
-end;
-$body$
-    language plpgsql stable cost 200;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_vidsToDMatrix(sql TEXT, vids  INTEGER[], dir BOOLEAN, has_rcost BOOLEAN, want_symmetric BOOLEAN)
-RETURNS float8[] AS
-$BODY$
-DECLARE
-directed BOOLEAN;
-has_reverse BOOLEAN;
-edges_sql TEXT;
-dmatrix_row float8[];
-dmatrix float8[];
-cell RECORD;
-unique_vids INTEGER[];
-total BIGINT;
-from_v BIGINT;
-to_v BIGINT;
-BEGIN
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql = sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    unique_vids :=  ARRAY(SELECT DISTINCT UNNEST(vids) ORDER BY 1);
-
-    IF want_symmetric THEN
-        directed = false;
-    ELSE
-        directed = dir;
-    END IF;
-
-    total := array_length(unique_vids, 1);
-
-    -- initializing dmatrix
-    FOR i in 1 .. total LOOP
-        dmatrix_row := dmatrix_row || '+Infinity'::float8;
-    END LOOP;
-    FOR i in 1 .. total LOOP
-    dmatrix := dmatrix || ARRAY[dmatrix_row];
-    dmatrix[i][i] = 0;
-    END LOOP;
-
-    CREATE TEMP TABLE __x___y____temp AS
-        WITH result AS
-            (SELECT unnest(unique_vids) AS vid)
-        SELECT row_number() OVER() AS idx, vid FROM result;
-
-    FOR cell IN SELECT * FROM pgr_dijkstraCostMatrix(sql, unique_vids, directed) LOOP
-        SELECT idx INTO from_v FROM __x___y____temp WHERE vid =  cell.start_vid;
-        SELECT idx INTO to_v FROM __x___y____temp WHERE vid =  cell.end_vid;
-
-        dmatrix[from_v][to_v] = cell.agg_cost;
-        dmatrix[to_v][from_v] = cell.agg_cost;
-    END LOOP;
-
-    DROP TABLE IF EXISTS __x___y____temp;
-    RETURN dmatrix;
-
-    EXCEPTION WHEN others THEN
-       DROP TABLE IF EXISTS __x___y____temp;
-       raise exception '% %', SQLERRM, SQLSTATE;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated function';
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_dijkstra(sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_dijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN) IS 'pgr_dijkstra(Deprecated signature)';
-
-
-
-
-
--- OLD SIGNATURE
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(edges_sql text, source BIGINT, distance FLOAT, directed BOOLEAN, has_rcost BOOLEAN)
-  RETURNS SETOF pgr_costresult AS
-  $BODY$
-  DECLARE
-  has_reverse BOOLEAN;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function';
-
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, FALSE);
-
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-             -- the user says it doesn't have reverse cost but its false
-             -- removing from query
-             RAISE NOTICE 'Contradiction found: has_rcost set to false but reverse_cost column found';
-             sql = 'SELECT id, source, target, cost, -1 as reverse_cost FROM (' || edges_sql || ') __q ';
-         ELSE
-             -- the user says it has reverse cost but its false
-             -- can't do anything
-             RAISE EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query SELECT seq - 1 AS seq, node::integer AS id1, edge::integer AS id2, agg_cost AS cost
-                FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maximumcardinalitymatching(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---INTERNAL FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
-------------------------
--- deprecated signatures
------------------------
-
-COMMENT ON FUNCTION pgr_astar(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_astar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdAstar( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdAstar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdDijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdDijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_dijkstra(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_dijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_drivingDistance(text,  BIGINT,  FLOAT8,  BOOLEAN,  BOOLEAN)
-    IS 'pgr_drivingDistance(Deprecated signature)';
-
-------------------------
--- Renamed /deprecated
------------------------
-COMMENT ON FUNCTION pgr_apspJohnson(TEXT)
-    IS 'pgr_apspJohnson(Renamed function) use pgr_Johnson instead';
-
-COMMENT ON FUNCTION pgr_apspWarshall(text, boolean, boolean)
-    IS 'pgr_apspWarshall(Renamed function) use pgr_floydWarshall instead';
-
-COMMENT ON FUNCTION pgr_kdijkstraPath( text, INTEGER, INTEGER ARRAY, BOOLEAN, BOOLEAN)
-    IS 'pgr_kdijkstraPath(Renamed function) use pgr_dijkstra instead';
-
-COMMENT ON FUNCTION pgr_kdijkstracost( text, INTEGER, INTEGER array, BOOLEAN, BOOLEAN)
-    IS 'pgr_kDijkstraCost(Renamed function) use pgr_dijkstraCost instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-
-
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-
-
-COMMENT ON FUNCTION pgr_gsoc_vrppdtw( text, INTEGER, INTEGER)
-    IS 'pgr_gsoc_vrppdtw(Renamed function) use pgr_pickDeliverEuclidean instead';
-
-------------------------
--- Deprecated functions
------------------------
-
-COMMENT ON FUNCTION pgr_flipedges(geometry[])
-    IS 'pgr_flipedges(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_texttopoints(text,  integer)
-    IS 'pgr_texttopoints(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstovids(pnts geometry[], edges text, tol float8)
-    IS 'pgr_pointstovids(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    IS 'pgr_pointtoedgenode(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstodmatrix(geometry[], integer)
-    IS 'pgr_pointstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidstodmatrix( integer[],  geometry[],  text, float8)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidsToDMatrix(TEXT,  INTEGER[], BOOLEAN, BOOLEAN, BOOLEAN)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-
-
-
-COMMENT ON FUNCTION pgr_getTableName(IN tab text)
-    IS 'pgr_getTableName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_getColumnName(tab text, col text)
-    IS 'pgr_getColumnName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnInTable(tab text, col text)
-    IS 'pgr_isColumnInTable(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnIndexed(tab text, col text)
-    IS 'pgr_isColumnIndexed(Deprecated function)';
-
-
-COMMENT ON FUNCTION pgr_quote_ident(idname text)
-    IS 'pgr_quote_ident(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_versionless(v1 text, v2 text)
-    IS 'pgr_versionless(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_startPoint(g geometry)
-    IS 'pgr_startPoint(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_endPoint(g geometry)
-    IS 'pgr_endPoint(Deprecated function)';
-
-
diff --git a/tools/sql-update-scripts/pgrouting--2.3.2--2.5.2.sql b/tools/sql-update-scripts/pgrouting--2.3.2--2.5.2.sql
deleted file mode 100644
index b51dbbd..0000000
--- a/tools/sql-update-scripts/pgrouting--2.3.2--2.5.2.sql
+++ /dev/null
@@ -1,6561 +0,0 @@
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- pgRouting extension upgrade from 2.3.2 to 2.5.2
--- generated by tools/build-extension-update-files
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-\echo Use "ALTER extension pgrouting update to '2.5.2'" to load this file. \quit
-
-
--------------------------------------
--- remove functions no longer in the 2.5.2 extension
--------------------------------------
-
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_astar(text,bigint,bigint,boolean,integer,double precision,double precision,boolean);
-DROP FUNCTION IF EXISTS _pgr_astar(text,bigint,bigint,boolean,integer,double precision,double precision,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,anyarray,bigint,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,anyarray,bigint,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,bigint,anyarray,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,bigint,anyarray,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,bigint,bigint,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,bigint,bigint,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_drivingdistance(text,bigint,double precision,boolean);
-DROP FUNCTION IF EXISTS _pgr_drivingdistance(text,bigint,double precision,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_maxflow(text,anyarray,anyarray,text);
-DROP FUNCTION IF EXISTS _pgr_maxflow(text,anyarray,anyarray,text);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_maxflow(text,anyarray,bigint,text);
-DROP FUNCTION IF EXISTS _pgr_maxflow(text,anyarray,bigint,text);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_maxflow(text,bigint,anyarray,text);
-DROP FUNCTION IF EXISTS _pgr_maxflow(text,bigint,anyarray,text);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_maxflow(text,bigint,bigint,text);
-DROP FUNCTION IF EXISTS _pgr_maxflow(text,bigint,bigint,text);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_pickdeliver(text,integer,double precision,double precision,integer);
-DROP FUNCTION IF EXISTS _pgr_pickdeliver(text,integer,double precision,double precision,integer);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,anyarray,anyarray,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,anyarray,anyarray,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,anyarray,bigint,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,anyarray,bigint,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,bigint,anyarray,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,bigint,anyarray,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,bigint,bigint,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,bigint,bigint,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_fakecontraction(text,integer[]);
-DROP FUNCTION IF EXISTS pgr_fakecontraction(text,integer[]);
-
-
-------------------------------------------
---    New functions:  2.0
--- Signature change:  2.4
---       Deprecated:  2.4
-------------------------------------------
--- pgr_bddijkstra
--- 2.3.2: {      sql, source_vid, target_vid, directed, has_reverse_cost}   
--- 2.5.2: {edges_sql,  start_vid,    end_vid, directed, has_rcost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vid","end_vid","directed","has_rcost"}'
-WHERE proname = 'pgr_bddijkstra'
-    AND proargnames = '{"sql","source_vid","target_vid","directed","has_reverse_cost"}';
-
-
-------------------------------------------
---       New functions:  2.1
---    Signature change:  2.4
-------------------------------------------
--- 2.3.2: {edges_sql,start_v,  distance,directed,seq,node,edge,cost,agg_cost}
--- 2.5.2: {edges_sql,start_vid,distance,directed,seq,node,edge,cost,agg_cost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vid","distance","directed","seq","node","edge","cost","agg_cost"}'
-WHERE proname = 'pgr_drivingdistance'
-    AND proargnames = '{"edges_sql","start_v","distance","directed","seq","node","edge","cost","agg_cost"}';
-
-
-------------------------------------------
---       New functions:  2.1
---    Signature change:  2.4
-------------------------------------------
--- 2.3.2: {sql,      start_v,   distance,directed,equicost,seq,from_v,node,edge,cost,agg_cost}
--- 2.5.2: {edges_sql,start_vids,distance,directed,equicost,seq,from_v,node,edge,cost,agg_cost}
-
-UPDATE pg_proc SET
-proargnames = '{"edges_sql","start_vids","distance","directed","equicost","seq","from_v","node","edge","cost","agg_cost"}'
-WHERE proname = 'pgr_drivingdistance'
-    AND proargnames = '{"sql","start_v","distance","directed","equicost","seq","from_v","node","edge","cost","agg_cost"}';
-
-
-------------------------------------------
---       New functions:  2.3
---    Signature change:  2.5
--- Inner query changed:  2.5
-------------------------------------------
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_edgedisjointpaths(text,bigint,bigint,boolean);
-DROP FUNCTION IF EXISTS pgr_edgedisjointpaths(text,bigint,bigint,boolean);
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_edgedisjointpaths(text,bigint,anyarray,boolean);
-DROP FUNCTION IF EXISTS pgr_edgedisjointpaths(text,bigint,anyarray,boolean);
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_edgedisjointpaths(text,anyarray,bigint,boolean);
-DROP FUNCTION IF EXISTS pgr_edgedisjointpaths(text,anyarray,bigint,boolean);
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_edgedisjointpaths(text,anyarray,anyarray,boolean);
-DROP FUNCTION IF EXISTS pgr_edgedisjointpaths(text,anyarray,anyarray,boolean);
-
-
-ALTER EXTENSION pgrouting DROP TYPE contraction_vertex;
-DROP TYPE contraction_vertex;
-
-
-
-
-
-
-
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
---- pgRouting provides geospatial routing functionality.
---- http://pgrouting.org
---- copyright
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
----
---- This is free software; you can redistribute and/or modify it:
---- the terms of the GNU General Public Licence. See the COPYING file.
---- the terms of the MIT-X Licence. See the COPYING file.
----
---- The following functions have MIT-X licence:
----     pgr_version()
----     pgr_tsp(matrix float8[][], startpt integer, endpt integer DEFAULT -1, OUT seq integer, OUT id integer)
----     _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
----     pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
----
----
---- All other functions are under GNU General Public Licence.
----
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
--- WARNING: Any change in this file must be evaluated for compatibility.
---          Changes cleanly handled by postgis_upgrade.sql are fine,
---          other changes will require a bump in Major version.
---          Currently only function replaceble by CREATE OR REPLACE
---          are cleanly handled.
---
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
---  pgRouting 2.0 types
-
-
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_version()
-RETURNS TABLE(
-        "version" varchar,
-        tag varchar,
-        hash varchar,
-        branch varchar,
-        boost varchar
-    ) AS
-$BODY$
-    SELECT '2.5.2'::varchar AS version,
-        'v2.5.2'::varchar AS tag,
-        '60585f1f7'::varchar AS hash,
-        'master'::varchar AS branch,
-        '1.54.0'::varchar AS boost;
-$BODY$
-LANGUAGE sql IMMUTABLE;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getTableName(IN tab text, IN reportErrs int default 0, IN fnName text default '_pgr_getTableName', OUT sname text,OUT tname text)
-  RETURNS RECORD AS
-$$
-DECLARE
-        naming record;
-        i integer;
-        query text;
-        sn text; -- schema name
-        tn text; -- table name
-        ttype text; --table type for future use
-        err boolean;
-        debuglevel text;
-        var_types text[] = ARRAY['BASE TABLE', 'VIEW'];
-BEGIN
-
-    execute 'show client_min_messages' into debuglevel;
-
-
-    perform _pgr_msg( 0, fnName, 'Checking table ' || tab || ' exists');
-    --RAISE DEBUG 'Checking % exists',tab;
-
-    i := strpos(tab,'.');
-    IF (i <> 0) THEN
-        sn := split_part(tab, '.',1);
-        tn := split_part(tab, '.',2);
-    ELSE
-        sn := current_schema;
-        tn := tab;
-    END IF;
-
-
-   SELECT schema_name INTO sname
-   FROM information_schema.schemata WHERE schema_name = sn;
-
-    IF sname IS NOT NULL THEN -- found schema (as is)
-       SELECT table_name, table_type INTO tname, ttype
-       FROM information_schema.tables
-       WHERE
-                table_type = ANY(var_types) and
-                table_schema = sname and
-                table_name = tn ;
-        IF tname is NULL THEN
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  = ANY(var_types) and
-                table_schema = sname and
-                table_name = lower(tn) ORDER BY table_name;
-        END IF;
-    END IF;
-    IF sname is NULL or tname is NULL THEN --schema not found or table not found
-        SELECT schema_name INTO sname
-        FROM information_schema.schemata
-        WHERE schema_name = lower(sn) ;
-
-        IF sname IS NOT NULL THEN -- found schema (with lower caps)
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  =  ANY(var_types) and
-                table_schema = sname and
-                table_name= tn ;
-
-           IF tname IS NULL THEN
-                SELECT table_name, table_type INTO tname, ttype
-                FROM information_schema.tables
-                WHERE
-                    table_type  =  ANY(var_types) and
-                    table_schema = sname and
-                    table_name= lower(tn) ;
-           END IF;
-        END IF;
-    END IF;
-   err = (sname IS NULL OR tname IS NULL);
-   perform _pgr_onError(err, reportErrs, fnName, 'Table ' || tab ||' not found',' Check your table name', 'Table '|| tab || ' found');
-
-END;
-$$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(sname text, tname text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(col) into cname;
-
-    IF cname is null  THEN
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(lower(col))  into cname;
-    END if;
-
-    err = cname is null;
-
-    perform _pgr_onError(err, reportErrs, fnName,  'Column '|| col ||' not found', ' Check your column name','Column '|| col || ' found');
-    RETURN cname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(tab text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-
-    select * into cname from _pgr_getColumnName(sname,tname,col,reportErrs, fnName);
-    RETURN cname;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    select * from _pgr_getColumnName(tab,col,0, '_pgr_isColumnInTable') into cname;
-    return cname is not null;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(sname text, tname text, cname text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    pkey text;
-BEGIN
-    SELECT
-          pg_attribute.attname into pkey
-         --  format_type(pg_attribute.atttypid, pg_attribute.atttypmod)
-          FROM pg_index, pg_class, pg_attribute
-          WHERE
-                  pg_class.oid = _pgr_quote_ident(sname||'.'||tname)::regclass AND
-                  indrelid = pg_class.oid AND
-                  pg_attribute.attrelid = pg_class.oid AND
-                  pg_attribute.attnum = any(pg_index.indkey)
-                  AND indisprimary;
-
-    IF pkey=cname then
-          RETURN TRUE;
-    END IF;
-
-    SELECT a.index_name,
-           b.attname,
-           b.attnum,
-           a.indisunique,
-           a.indisprimary
-      INTO rec
-      FROM ( SELECT a.indrelid,
-                    a.indisunique,
-                    a.indisprimary,
-                    c.relname index_name,
-                    unnest(a.indkey) index_num
-               FROM pg_index a,
-                    pg_class b,
-                    pg_class c,
-                    pg_namespace d
-              WHERE b.relname=tname
-                AND b.relnamespace=d.oid
-                AND d.nspname=sname
-                AND b.oid=a.indrelid
-                AND a.indexrelid=c.oid
-           ) a,
-           pg_attribute b
-     WHERE a.indrelid = b.attrelid
-       AND a.index_num = b.attnum
-       AND b.attname = cname
-  ORDER BY a.index_name,
-           a.index_num;
-
-  RETURN FOUND;
-  EXCEPTION WHEN OTHERS THEN
-    perform _pgr_onError( true, reportErrs, fnName,
-    'Error when checking for the postgres system attributes', SQLERR);
-    RETURN FALSE;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(tab text, col text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    sname text;
-    tname text;
-    cname text;
-    pkey text;
-    value boolean;
-BEGIN
-    SELECT * into naming FROM _pgr_getTableName(tab, 0, fnName);
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    SELECT * into cname from _pgr_getColumnName(sname, tname, col, 0, fnName) ;
-    IF cname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    select * into value  from _pgr_isColumnIndexed(sname, tname, cname, reportErrs, fnName);
-    return value;
-END
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-create or replace function _pgr_quote_ident(idname text)
-    returns text as
-$body$
-declare
-    t text[];
-    pgver text;
-
-begin
-    pgver := regexp_replace(version(), E'^PostgreSQL ([^ ]+)[ ,].*$', E'\\1');
-
-    if _pgr_versionless(pgver, '9.2') then
-        select into t array_agg(quote_ident(term)) from
-            (select nullif(unnest, '') as term
-               from unnest(string_to_array(idname, '.'))) as foo;
-    else
-        select into t array_agg(quote_ident(term)) from
-            (select unnest(string_to_array(idname, '.', '')) as term) as foo;
-    end if;
-    return array_to_string(t, '.');
-end;
-$body$
-language plpgsql immutable;
-
-
-CREATE OR REPLACE FUNCTION _pgr_versionless(v1 text, v2 text)
-  RETURNS boolean AS
-$BODY$
-
-
-declare
-    v1a text[];
-    v2a text[];
-    nv1 integer;
-    nv2 integer;
-    ne1 integer;
-    ne2 integer;
-
-begin
-    -- separate components into an array, like:
-    -- '2.1.0-beta3dev'  =>  {2,1,0,beta3dev}
-    v1a := regexp_matches(v1, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-    v2a := regexp_matches(v2, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-
-    -- convert modifiers to numbers for comparison
-    -- we do not delineate between alpha1, alpha2, alpha3, etc
-    ne1 := case when v1a[4] is null or v1a[4]='' then 5
-                when v1a[4] ilike 'rc%' then 4
-                when v1a[4] ilike 'beta%' then 3
-                when v1a[4] ilike 'alpha%' then 2
-                when v1a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    ne2 := case when v2a[4] is null or v2a[4]='' then 5
-                when v2a[4] ilike 'rc%' then 4
-                when v2a[4] ilike 'beta%' then 3
-                when v2a[4] ilike 'alpha%' then 2
-                when v2a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    nv1 := v1a[1]::integer * 10000 +
-           coalesce(v1a[2], '0')::integer * 1000 +
-           coalesce(v1a[3], '0')::integer *  100 + ne1;
-    nv2 := v2a[1]::integer * 10000 +
-           coalesce(v2a[2], '0')::integer * 1000 +
-           coalesce(v2a[3], '0')::integer *  100 + ne2;
-
-    --raise notice 'nv1: %, nv2: %, ne1: %, ne2: %', nv1, nv2, ne1, ne2;
-
-    return nv1 < nv2;
-end;
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-create or replace function _pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_startpoint(st_geometryn(g,1));
-    else
-        return st_startpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function _pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_endpoint(st_geometryn(g,1));
-    else
-        return st_endpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_parameter_check(fn text, sql text, big boolean default false)
-  RETURNS bool AS
-  $BODY$
-
-  DECLARE
-  rec record;
-  rec1 record;
-  has_rcost boolean;
-  safesql text;
-  BEGIN
-    IF (big) THEN
-       RAISE EXCEPTION 'This function is for old style functions';
-    END IF;
-
-    -- checking query is executable
-    BEGIN
-      safesql =  'select * from ('||sql||' ) AS __a__ limit 1';
-      execute safesql into rec;
-      EXCEPTION
-        WHEN OTHERS THEN
-            RAISE EXCEPTION 'Could not execute query please verify syntax of: '
-              USING HINT = sql;
-    END;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('dijkstra','astar') THEN
-        BEGIN
-          execute 'select id,source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: id, source, target, cost';
-        END;
-        execute 'select pg_typeof(id)::text as id_type, pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.id_type in ('integer'::text))
-              AND (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Error, columns ''source'', ''target'' must be of type int4, ''cost'' must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    IF fn IN ('astar') THEN
-        BEGIN
-          execute 'select x1,y1,x2,y2  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: x1,y1, x2,y2';
-        END;
-        execute 'select pg_typeof(x1)::text as x1_type, pg_typeof(y1)::text as y1_type, pg_typeof(x2)::text as x2_type, pg_typeof(y2)::text as y2_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.x1_type = 'double precision'::text)
-              AND (rec.y1_type = 'double precision'::text)
-              AND (rec.x2_type = 'double precision'::text)
-              AND (rec.y2_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Columns: x1, y1, x2, y2 must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('johnson') THEN
-        BEGIN
-          execute 'select source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING HINT = 'Please veryfy the column names: id, source, target, cost',
-                         ERRCODE = 'XX000';
-        END;
-
-        execute 'select pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Support for source,target columns only of type: integer. Support for Cost: double precision'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    -- Checking the data types of the optional reverse_cost";
-    has_rcost := false;
-    IF fn IN ('johnson','dijkstra','astar') THEN
-      BEGIN
-        execute 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||safesql||' ) AS __b__ limit 1 ' into rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-            return has_rcost;
-      END;
-      if (has_rcost) then
-        IF (big) then
-           IF  not (rec1.rev_type in ('bigint'::text, 'integer'::text, 'smallint'::text, 'double precision'::text, 'real'::text)) then
-             RAISE EXCEPTION 'Illegar type in optional parameter reverse_cost.'
-             USING ERRCODE = 'XX000';
-           END IF;
-        ELSE -- Version 2.0.0 is more restrictive
-           IF (rec1.rev_type != 'double precision') then
-             RAISE EXCEPTION 'Illegal type in optional parameter reverse_cost, must be of type float8'
-             USING ERRCODE = 'XX000';
-           END IF;
-        END IF;
-      end if;
-      return true;
-    END IF;
-    -- just for keeps
-    return true;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_onError(
-  IN errCond boolean,  -- true there is an error
-  IN reportErrs int,   -- 0, 1 or 2
-  IN fnName text,      -- function name that generates the error
-  IN msgerr text,      -- error message
-  IN hinto text default 'No hint', -- hint help
-  IN msgok text default 'OK')      -- message if everything is ok
-  RETURNS void AS
-$BODY$
-BEGIN
-  if errCond=true then
-     if reportErrs=0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-     else
-       if reportErrs = 2 then
-         raise notice '----> PGR ERROR in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-         raise raise_exception;
-       else
-         raise notice '----> PGR NOTICE in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-       end if;
-     end if;
-  else
-       raise debug 'PGR ----> %: %',fnName,msgok;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_msg(IN msgKind int, IN fnName text, IN msg text default '---->OK')
-  RETURNS void AS
-$BODY$
-BEGIN
-  if msgKind = 0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msg;
-  else
-       raise notice '----> PGR NOTICE in %: %',fnName,msg;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(sname text, tname text, cname text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    EXECUTE 'select data_type  from information_schema.columns '
-            || 'where table_name = '||quote_literal(tname)
-                 || ' and table_schema=' || quote_literal(sname)
-                 || ' and column_name='||quote_literal(cname)
-       into ctype;
-    err = ctype is null;
-    perform _pgr_onError(err, reportErrs, fnName,
-            'Type of Column '|| cname ||' not found',
-            'Check your column name',
-            'OK: Type of Column '|| cname || ' is ' || ctype);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(tab text, col text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-    select * into cname from _pgr_getColumnName(tab,col,reportErrs, fnName) ;
-    select * into ctype from _pgr_getColumnType(sname,tname,cname,reportErrs, fnName);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_get_statement(o_sql text)
-RETURNS text AS
-$BODY$
-DECLARE
-sql TEXT;
-BEGIN
-    EXECUTE 'SELECT statement FROM pg_prepared_statements WHERE name ='  || quote_literal(o_sql) || ' limit 1 ' INTO sql;
-    IF (sql IS NULL) THEN
-      RETURN   o_sql;
-    ELSE
-      RETURN  regexp_replace(sql, '(.)* as ', '', 'i');
-    END IF;
-END
-$BODY$
-LANGUAGE plpgsql STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_checkVertTab(vertname text, columnsArr  text[],
-    IN reportErrs int default 1, IN fnName text default '_pgr_checkVertTab',
-    OUT sname text,OUT vname text)
-RETURNS record AS
-$BODY$
-DECLARE
-    cname text;
-    colname text;
-    naming record;
-    debuglevel text;
-    err  boolean;
-    msgKind int;
-
-BEGIN
-    msgKind = 0; -- debug_
-    execute 'show client_min_messages' into debuglevel;
-
-    perform _pgr_msg(msgKind, fnName, 'Checking table ' || vertname || ' exists');
-       select * from _pgr_getTableName(vertname, 0, fnName) into naming;
-       sname=naming.sname;
-       vname=naming.tname;
-       err = sname is NULL or vname is NULL;
-    perform _pgr_onError( err, 2, fnName,
-          'Vertex Table: ' || vertname || ' not found',
-          'Please create ' || vertname || ' using  _pgr_createTopology() or pgr_createVerticesTable()',
-          'Vertex Table: ' || vertname || ' found');
-
-
-    perform _pgr_msg(msgKind, fnName, 'Checking columns of ' || vertname);
-      FOREACH cname IN ARRAY columnsArr
-      loop
-         select _pgr_getcolumnName(vertname, cname, 0, fnName) into colname;
-         if colname is null then
-           perform _pgr_msg(msgKind, fnName, 'Adding column ' || cname || ' in ' || vertname);
-           set client_min_messages  to warning;
-                execute 'ALTER TABLE '||_pgr_quote_ident(vertname)||' ADD COLUMN '||cname|| ' integer';
-           execute 'set client_min_messages  to '|| debuglevel;
-           perform _pgr_msg(msgKind, fnName);
-         end if;
-      end loop;
-    perform _pgr_msg(msgKind, fnName, 'Finished checking columns of ' || vertname);
-
-    perform _pgr_createIndex(vertname , 'id' , 'btree', reportErrs, fnName);
- END
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(
-    sname text, tname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    debuglevel text;
-    naming record;
-    tabname text;
-    query text;
-    msgKind int;
-BEGIN
-  msgKind = 0; -- debug_
-
-  execute 'show client_min_messages' into debuglevel;
-  tabname=_pgr_quote_ident(sname||'.'||tname);
-  perform _pgr_msg(msgKind, fnName, 'Checking ' || colname || ' column in ' || tabname || ' is indexed');
-    IF (_pgr_isColumnIndexed(sname,tname,colname, 0, fnName)) then
-       perform _pgr_msg(msgKind, fnName);
-    else
-      if indext = 'gist' then
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using gist('||quote_ident(colname)||')';
-      else
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using btree('||quote_ident(colname)||')';
-      end if;
-      perform _pgr_msg(msgKind, fnName, 'Adding index ' || tabname || '_' ||  colname || '_idx');
-      perform _pgr_msg(msgKind, fnName, ' Using ' ||  query);
-      set client_min_messages  to warning;
-      BEGIN
-        execute query;
-        EXCEPTION WHEN others THEN
-          perform _pgr_onError( true, reportErrs, fnName,
-            'Could not create index on:' || colname, SQLERRM);
-      END;
-      execute 'set client_min_messages  to '|| debuglevel;
-      perform _pgr_msg(msgKind, fnName);
-    END IF;
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(tabname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    naming record;
-    sname text;
-    tname text;
-
-BEGIN
-    select * from _pgr_getTableName(tabname, 2, fnName)  into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    execute _pgr_createIndex(sname, tname, colname, indext, reportErrs, fnName);
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pointToId(
-    point geometry,
-    tolerance double precision,
-    vertname text,
-    srid integer)
-
-  RETURNS bigint AS
-$BODY$
-DECLARE
-    rec record;
-    pid bigint;
-
-BEGIN
-    EXECUTE 'SELECT ST_Distance(
-        the_geom,
-        ST_GeomFromText(ST_AsText('
-                || quote_literal(point::text)
-                || '),'
-            || srid ||')) AS d, id, the_geom
-    FROM '||_pgr_quote_ident(vertname)||'
-    WHERE ST_DWithin(
-        the_geom,
-        ST_GeomFromText(
-            ST_AsText(' || quote_literal(point::text) ||'),
-            ' || srid || '),' || tolerance||')
-    ORDER BY d
-    LIMIT 1' INTO rec ;
-    IF rec.id IS NOT NULL THEN
-        pid := rec.id;
-    ELSE
-        execute 'INSERT INTO '||_pgr_quote_ident(vertname)||' (the_geom) VALUES ('||quote_literal(point::text)||')';
-        pid := lastval();
-END IF;
-
-RETURN pid;
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'many_to_many_dijkstra'
-LANGUAGE c VOLATILE;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer, OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstra(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(Many to Many)';
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraVia(
-    edges_sql TEXT,
-    via_vertices ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    strict BOOLEAN DEFAULT FALSE,
-    U_turn_on_edge BOOLEAN DEFAULT TRUE,
-
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'dijkstraVia'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_johnson(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'johnson'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_floydWarshall(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'floydWarshall'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'astarManyToMany'
-LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, normal:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to Many)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true, normal:=false) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to Many)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid ANYARRAY,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-    equicost BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'many_withPointsDD'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_withPointsDD($1, $2, ARRAY[$3]::BIGINT[], $4, $5, $6, $7, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vids anyarray,
-    distance FLOAT,
-    directed BOOLEAN DEFAULT TRUE,
-    equicost BOOLEAN DEFAULT FALSE,
-    OUT seq integer,
-    OUT from_v  bigint,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'driving_many_to_dist'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vid bigint,
-    distance FLOAT8,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq integer,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer, directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'kshortest_path'
-    LANGUAGE c STABLE STRICT;
-
--- V2 the graph is directed and there are no heap paths
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid integer, end_vid integer, k integer, has_rcost boolean)
-  RETURNS SETOF pgr_costresult3 AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated signature of pgr_ksp';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql::text, false);
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_rcost) THEN
-           -- user says that it has reverse_cost but its not true
-           RAISE EXCEPTION 'has_reverse_cost set to true but reverse_cost not found';
-         ELSE
-           -- user says that it does not have reverse_cost but it does have it
-           -- to ignore we remove reverse_cost from the query
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         END IF;
-      END IF;
-
-      RETURN query SELECT ((row_number() over()) -1)::integer  AS seq,  (path_id - 1)::integer AS id1, node::integer AS id2, edge::integer AS id3, cost
-            FROM _pgr_ksp(sql::text, start_vid, end_vid, k, TRUE, FALSE) WHERE path_id <= k;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer,
-  directed boolean default true, heap_paths boolean default false,
-  --directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  BEGIN
-         RETURN query SELECT *
-                FROM _pgr_ksp(edges_sql::text, start_vid, end_vid, k, directed, heap_paths);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsKSP(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    k INTEGER,
-
-    directed BOOLEAN DEFAULT TRUE,
-    heap_paths BOOLEAN DEFAULT FALSE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER, OUT path_id INTEGER, OUT path_seq INTEGER,
-    OUT node BIGINT, OUT edge BIGINT,
-    OUT cost FLOAT, OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'withPoints_ksp'
-    LANGUAGE c STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_unnest_matrix(matrix float8[][], OUT start_vid integer, OUT end_vid integer, out agg_cost float8)
-RETURNS SETOF record AS
-
-$body$
-DECLARE
-
-m float8[];
-
-BEGIN
-    start_vid = 1;
-    foreach m slice 1 in  ARRAY matrix
-    LOOP
-        end_vid = 1;
-        foreach agg_cost in  ARRAY m
-        LOOP
-            RETURN next;
-            end_vid = end_vid + 1;
-        END LOOP;
-        start_vid = start_vid + 1;
-    END LOOP;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_tsp(
-    matrix float8[][],
-    startpt INTEGER,
-    endpt INTEGER DEFAULT -1,
-    OUT seq INTEGER,
-    OUT id INTEGER)
-RETURNS SETOF record AS
-$body$
-DECLARE
-table_sql TEXT;
-debuglevel TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(float8[][], integer, integer)';
-
-    CREATE TEMP TABLE ___tmp2 ON COMMIT DROP AS SELECT * FROM _pgr_unnest_matrix( matrix );
-
-
-    startpt := startpt + 1;
-    IF endpt = -1 THEN endpt := startpt;
-    END IF;
-
-
-    RETURN QUERY
-    WITH
-    result AS (
-        SELECT * FROM pgr_TSP(
-        $$SELECT * FROM ___tmp2 $$,
-        startpt, endpt,
-
-        tries_per_temperature :=  500 :: INTEGER,
-        max_changes_per_temperature := 30 :: INTEGER,
-        max_consecutive_non_changes := 500 :: INTEGER,
-
-        randomize:=false)
-    )
-    SELECT (row_number() over(ORDER BY result.seq) - 1)::INTEGER AS seq, (result.node - 1)::INTEGER AS id
-
-    FROM result WHERE NOT(result.node = startpt AND result.seq != 1);
-
-    DROP TABLE ___tmp2;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-
-
-CREATE OR  REPLACE FUNCTION pgr_tsp(sql text, start_id INTEGER, end_id INTEGER default (-1))
-returns setof pgr_costResult as
-$body$
-DECLARE
-table_sql TEXT;
-rec RECORD;
-debuglevel TEXT;
-n BIGINT;
-
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(sql, integer, integer)';
-
-    table_sql := 'CREATE TEMP TABLE ___tmp ON COMMIT DROP AS ' || sql ;
-    EXECUTE table_sql;
-
-
-    BEGIN
-        EXECUTE 'SELECT id, x, y FROM ___tmp' INTO rec;
-        EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                USING ERRCODE = 'XX000',
-                HINT = 'Please verify the column names: id, x, y';
-    END;
-
-    EXECUTE
-    'SELECT
-        pg_typeof(id)::text as id_type,
-        pg_typeof(x)::text as x_type,
-        pg_typeof(y)::text as y_type FROM ___tmp' INTO rec;
-
-
-    IF NOT((rec.id_type in ('integer'::text))
-        AND (rec.x_type = 'double precision'::text)
-        AND (rec.y_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION '''id'' must be of type INTEGER, ''x'' ad ''y'' must be of type FLOAT'
-            USING ERRCODE = 'XX000';
-    END IF;
-
-    EXECUTE 'SELECT count(*) AS n FROM (' || sql || ') AS __a__' INTO rec;
-    n = rec.n;
-
-    RETURN query
-        SELECT (seq - 1)::INTEGER AS seq, node::INTEGER AS id1, node::INTEGER AS id2, cost
-        FROM pgr_eucledianTSP(sql, start_id, end_id,
-
-            tries_per_temperature :=  500 * n :: INTEGER,
-            max_changes_per_temperature := 60 * n :: INTEGER,
-            max_consecutive_non_changes := 500 * n :: INTEGER,
-
-            randomize := false) WHERE seq <= n;
-    DROP TABLE ___tmp;
-
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-create or replace function _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
-  as
-$body$
-declare
-    sql text;
-    r record;
-
-begin
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    sql := 'with nodes as (' || sqlin || ')
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j, st_distance(st_makepoint(a.x, a.y), st_makepoint(b.x, b.y)) as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i';
-
-    for r in execute sql loop
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-
-end;
-$body$
-language plpgsql stable cost 10;
-
-
-CREATE OR REPLACE FUNCTION pgr_TSP(
-    matrix_row_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'newTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_eucledianTSP(
-    coordinates_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'eucledianTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_alphashape(sql text, alpha float8 DEFAULT 0, OUT x float8, OUT y float8)
-    RETURNS SETOF record
-    AS '$libdir/libpgrouting-2.5', 'alphashape'
-    LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pointsAsPolygon(query varchar, alpha float8 DEFAULT 0)
-	RETURNS geometry AS
-	$$
-	DECLARE
-		r record;
-		geoms geometry[];
-		vertex_result record;
-		i int;
-		n int;
-		spos int;
-		q text;
-		x float8[];
-		y float8[];
-
-	BEGIN
-		geoms := array[]::geometry[];
-		i := 1;
-
-		FOR vertex_result IN EXECUTE 'SELECT x, y FROM pgr_alphashape('''|| query || ''', ' || alpha || ')'
-		LOOP
-			x[i] = vertex_result.x;
-			y[i] = vertex_result.y;
-			i := i+1;
-		END LOOP;
-
-		n := i;
-		IF n = 1 THEN
-			RAISE NOTICE 'n = 1';
-			RETURN NULL;
-		END IF;
-
-		spos := 1;
-		q := 'SELECT ST_GeometryFromText(''POLYGON((';
-		FOR i IN 1..n LOOP
-			IF x[i] IS NULL AND y[i] IS NULL THEN
-				q := q || ', ' || x[spos] || ' ' || y[spos] || '))'',0) AS geom;';
-				EXECUTE q INTO r;
-				geoms := geoms || array[r.geom];
-				q := '';
-			ELSE
-				IF q = '' THEN
-					spos := i;
-					q := 'SELECT ST_GeometryFromText(''POLYGON((';
-				END IF;
-				IF i = spos THEN
-					q := q || x[spos] || ' ' || y[spos];
-				ELSE
-					q := q || ', ' || x[i] || ' ' || y[i];
-				END IF;
-			END IF;
-		END LOOP;
-
-		RETURN ST_BuildArea(ST_Collect(geoms));
-	END;
-	$$
-	LANGUAGE 'plpgsql' VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'bd_astar'
-LANGUAGE C VOLATILE;
-
-
-
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed:=true, only_cost:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    BOOLEAN,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false);
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to Many)';
-
-
-
--- one to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to Many)';
-
-
--- bdDijkstra MANY TO MANY
-CREATE OR REPLACE FUNCTION _pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bdDijkstra'
-LANGUAGE c VOLATILE;
-
-
-
--- ONE TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- TODO directed BOOLEAN DEFAULT TRUE,  on version 3
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, false) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, true) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_vid integer,
-    target_vid integer,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_vertex'
-LANGUAGE 'c' IMMUTABLE;
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_edge'
-LANGUAGE 'c' IMMUTABLE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || edges_sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        -- no restrictions then its a dijkstra
-        RETURN query SELECT a.seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_dijkstra(new_sql, start_vid, end_vid, directed) a;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, start_vid, end_vid, directed, has_rcost, restrictions_sql);
-    RETURN;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trspViaVertices(
-    edges_sql TEXT,
-    via_vids ANYARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult3 AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            new_sql :=
-               'WITH old_sql AS (' || edges_sql || ')' ||
-                '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        RETURN query SELECT (row_number() over())::INTEGER, path_id:: INTEGER, node::INTEGER,
-            (CASE WHEN edge = -2 THEN -1 ELSE edge END)::INTEGER, cost
-            FROM pgr_dijkstraVia(new_sql, via_vids, directed, strict:=true) WHERE edge != -1;
-        RETURN;
-    END IF;
-
-
-    -- make the call without contradiction from part of the user
-    RETURN query SELECT * FROM _pgr_trspViaVertices(new_sql, via_vids::INTEGER[], directed, has_rcost, restrictions_sql);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-
-    new_sql := sql;
-    IF (has_reverse != has_reverse_cost) THEN  -- user contradiction
-        IF (has_reverse) THEN
-            -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) THEN
-        -- no restrictions then its a with points
-        RETURN query SELECT a.seq-1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_withpoints(new_sql,
-            '(SELECT 1 as pid, ' || source_eid || 'as edge_id, ' || source_pos || '::float8 as fraction)'
-            || ' UNION '
-            || '(SELECT 2, ' || target_eid || ', ' || target_pos || ')' ::TEXT,
-            -1, -2, directed) a;
-        -- WHERE node != -2;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, source_eid, source_pos, target_eid, target_pos, directed, has_reverse_cost, turn_restrict_sql);
-    RETURN;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-create or replace function _pgr_trspViaVertices(sql text, vids integer[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    lrra boolean := false;
-    seq integer := 0;
-    seq2 integer := 0;
-
-begin
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(vids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from _pgr_trsp(sql, vids[i], vids[i+1], directed, has_rcost, turn_restrict_sql) as a loop
-            -- filter out the individual path ends except the last one
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --raise notice 'rr: %', rr;
-            if rr.id3 = -1 then
-                lrr := rr;
-                lrra := true;
-            else
-                seq := seq + 1;
-                rr.seq := seq;
-                return next rr;
-            end if;
-        end loop;
-    end loop;
-
-    if lrra then
-        seq := seq + 1;
-        lrr.seq := seq;
-        return next lrr;
-    end if;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-
-----------------------------------------------------------------------------------------------------------
-
-create or replace function pgr_trspViaEdges(sql text, eids integer[], pcts float8[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    first boolean := true;
-    seq integer := 0;
-    seq2 integer :=0;
-    has_reverse BOOLEAN;
-    point_is_vertex BOOLEAN := false;
-    edges_sql TEXT;
-    f float;
-
-begin
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql := sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (NOT has_rcost) THEN
-            -- user does not want to use reverse cost column
-            edges_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    FOREACH f IN ARRAY pcts LOOP
-        IF f in (0,1) THEN
-           point_is_vertex := true;
-        END IF;
-    END LOOP;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) AND NOT point_is_vertex THEN
-        -- no restrictions then its a _pgr_withPointsVia
-        RETURN query SELECT a.seq::INTEGER, path_id::INTEGER AS id1, node::INTEGER AS id2, edge::INTEGER AS id3, cost
-        FROM _pgr_withPointsVia(edges_sql, eids, pcts, directed) a;
-        RETURN;
-    END IF;
-
-    if array_length(eids, 1) != array_length(pcts, 1) then
-        raise exception 'The length of arrays eids and pcts must be the same!';
-    end if;
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(eids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from pgr_trsp(edges_sql,
-                                  eids[i], pcts[i],
-                                  eids[i+1], pcts[i+1],
-                                  directed,
-                                  has_rcost,
-                                  turn_restrict_sql) as a loop
-            -- combine intermediate via costs when cost is split across
-            -- two parts of a segment because it stops it and
-            -- restarts the next leg also on it
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --
-            -- there are multiple condition we have to deal with
-            -- between the end of one leg and start of the next
-            -- 1. same vertex_id. edge_id=-1; drop record with edge_id=-1
-            -- means: path ends on vertex
-            -- NOTICE:  rr: (19,1,44570022,-1,0)
-            -- NOTICE:  rr: (0,2,44570022,1768045,2.89691196717448)
-            -- 2. vertex_id=-1; sum cost components
-            -- means: path end/starts with the segment
-            -- NOTICE:  rr: (11,2,44569628,1775909,9.32885885148532)
-            -- NOTICE:  rr: (0,3,-1,1775909,0.771386350984395)
-
-            --raise notice 'rr: %', rr;
-            if first then
-                lrr := rr;
-                first := false;
-            else
-                if lrr.id3 = -1 then
-                    lrr := rr;
-                elsif lrr.id3 = rr.id3 then
-                    lrr.cost := lrr.cost + rr.cost;
-                    if rr.id2 = -1 then
-                        rr.id2 := lrr.id2;
-                    end if;
-                else
-                    seq := seq + 1;
-                    lrr.seq := seq;
-                    return next lrr;
-                    lrr := rr;
-                end if;
-            end if;
-        end loop;
-    end loop;
-
-    seq := seq + 1;
-    lrr.seq := seq;
-    return next lrr;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-----------------------------
---    MANY TO MANY
-----------------------------
-
-
-CREATE OR REPLACE FUNCTION _pgr_maxflow(
-    edges_sql TEXT,
-    sources ANYARRAY,
-    targets ANYARRAY,
-    algorithm INTEGER DEFAULT 1,
-    only_flow BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'max_flow_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-
-------------------------------------
--- 3 pgr_edmondsKarp
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 2 boykov_kolmogorov
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 1 pgr_pushRelabel
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT flow
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], algorithm := 1, only_flow := true);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], $3::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, $2::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxCardinalityMatch(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'edge_disjoint_paths_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    bigint,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    IN directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_contractGraph(
-    edges_sql TEXT,
-    contraction_order BIGINT[],
-    max_cycles integer DEFAULT 1,
-    forbidden_vertices BIGINT[] DEFAULT ARRAY[]::BIGINT[],
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT type TEXT,
-    OUT id BIGINT,
-    OUT contracted_vertices BIGINT[],
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost float)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'contractGraph'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliver(
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_cell_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliver'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliverEuclidean (
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliverEuclidean'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_vrpOneDepot(
-    TEXT, -- customers_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_sql
-    INTEGER, -- depot_id
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-orders_sql TEXT;
-trucks_sql TEXT;
-matrix_sql TEXT;
-final_sql TEXT;
-BEGIN
-
-    orders_sql = $$WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    pickups AS (
-        SELECT id, x AS p_x, y AS p_y, open_time AS p_open, close_time AS p_close, service_time AS p_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vrp_orders.id AS id, order_unit AS demand, pickups.id AS p_node_id, p_x, p_y, p_open, p_close, p_service,
-    vrp_orders.id AS d_node_id, x AS d_x, y AS d_y, open_time AS d_open, close_time AS d_close, service_time AS d_service
-    FROM vrp_orders, pickups
-    WHERE vrp_orders.id != $$ || $4;
-
-
-    trucks_sql = $$ WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    vrp_vehicles AS ($$ || $2 || $$ ),
-    starts AS (
-        SELECT id AS start_node_id, x AS start_x, y AS start_y, open_time AS start_open, close_time AS start_close, service_time AS start_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vehicle_id AS id, capacity, starts.* FROM vrp_vehicles, starts;
-    $$;
-
-    final_sql = '
-    SELECT * FROM _pgr_pickDeliver(
-            $$' || orders_sql || '$$,
-            $$' || trucks_sql || '$$,
-            $$' || $3 || '$$,
-            max_cycles := 2,
-            initial_sol := 4 ); ';
-
-    RAISE DEBUG '%', orders_sql;
-    RAISE DEBUG '%', trucks_sql;
-    RAISE DEBUG '%', $3;
-    RAISE DEBUG '%', final_sql;
-
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
------------------------------------------------------------------------
--- Core function for vrp with sigle depot computation
--- See README for description
------------------------------------------------------------------------
---
---
-
-create or replace function pgr_vrpOneDepot(
-	order_sql text,
-	vehicle_sql text,
-	cost_sql text,
-	depot_id integer,
-
-	OUT oid integer,
-	OUT opos integer,
-	OUT vid integer,
-	OUT tarrival integer,
-	OUT tdepart integer)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT order_id::INTEGER, stop_seq::INTEGER, vehicle_id::INTEGER, arrival_time::INTEGER, departure_time::INTEGER
-    FROM _pgr_vrpOneDepot($1, $2,
-       '
-            SELECT src_id AS start_vid, dest_id AS end_vid, traveltime AS agg_cost FROM ('||$3||') AS a
-       ',
-        $4
-    ) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_gsoc_vrppdtw(
-    customers_sql TEXT,
-    max_vehicles INTEGER,
-    capacity FLOAT,
-    speed FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-
-    OUT seq INTEGER,
-    OUT vehicle_id INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT stop_id BIGINT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-    orders_sql TEXT;
-    vehicles_sql TEXT;
-    final_sql TEXT;
-BEGIN
-    orders_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        pickups AS (
-            SELECT id, demand, x as p_x, y as p_y, opentime as p_open, closetime as p_close, servicetime as p_service
-            FROM  customer_data WHERE pindex = 0 AND id != 0
-        ),
-        deliveries AS (
-            SELECT pindex AS id, x as d_x, y as d_y, opentime as d_open, closetime as d_close, servicetime as d_service
-            FROM  customer_data WHERE dindex = 0 AND id != 0
-        )
-        SELECT * FROM pickups JOIN deliveries USING(id) ORDER BY pickups.id
-    $$;
-
-    vehicles_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ )
-        SELECT id, x AS start_x, y AS start_y,
-            opentime AS start_open, closetime AS start_close, $$ ||
-            capacity || $$ AS capacity, $$ || max_vehicles || $$ AS number, $$ || speed || $$ AS speed
-            FROM customer_data WHERE id = 0 LIMIT 1
-        $$;
---  seq | vehicle_id | vehicle_seq | stop_id | travel_time | arrival_time | wait_time | service_time | departure_time
-    final_sql = $$ WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        p_deliver AS (SELECT * FROM _pgr_pickDeliverEuclidean('$$ || orders_sql || $$',  '$$ || vehicles_sql || $$',  1, $$ || max_cycles || $$ )),
-        picks AS (SELECT p_deliver.*, pindex, dindex, id AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 2)),
-        delivers AS (SELECT p_deliver.*, pindex, dindex, dindex AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 3)),
-        depots AS (SELECT p_deliver.*, 0 as pindex, 0 as dindex, 0 AS the_id FROM p_deliver WHERE (stop_type IN (-1,1,6))),
-        the_union AS (SELECT * FROM picks UNION SELECT * FROM delivers UNION SELECT * from depots)
-
-        SELECT (row_number() over(ORDER BY a.seq))::INTEGER, vehicle_seq, a.stop_seq, the_id::BIGINT, a.travel_time, a.arrival_time, a.wait_time, a.service_time, a.departure_time
-        FROM (SELECT * FROM the_union) AS a ORDER BY a.seq
-        $$;
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-CREATE OR REPLACE FUNCTION pgr_gsoc_vrppdtw(
-    sql text,
-    vehicle_num INTEGER,
-    capacity INTEGER
-)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-customers_sql TEXT;
-BEGIN
-    RETURN query
-         SELECT a.seq, vehicle_id::INTEGER AS id1, stop_id::INTEGER AS id2, departure_time AS cost
-        FROM _pgr_gsoc_vrppdtw($1, $2, $3, 1, 30) AS a WHERE vehicle_id NOT IN (-2);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION _pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN,
-    driving_side CHAR,
-    details BOOLEAN,
-
-    only_cost BOOLEAN DEFAULT false, -- gets path
-    normal BOOLEAN DEFAULT true, -- false for many to onu
-
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'withPoints'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], ARRAY[$4]::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], ARRAY[$4]::bigint[], $5, $6, $7, FALSE, FALSE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], $4::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], $4::BIGINT[], $5,  $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION  _pgr_withPointsVia(
-    sql text,
-    via_edges bigint[],
-    fraction float[],
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  has_rcost boolean;
-  sql_new_vertices text := ' ';
-  sql_on_vertex text;
-  v_union text := ' ';
-  dummyrec record;
-  rec1 record;
-  via_vertices int[];
-  sql_safe text;
-  new_edges text;
-  BEGIN
-     BEGIN
-        sql_safe = 'SELECT id, source, target, cost, reverse_cost FROM ('|| sql || ') AS __a';
-
-        EXECUTE 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||sql_safe||' ) AS __b__ limit 1 ' INTO rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-     END;
-
-
-      IF array_length(via_edges, 1) != array_length(fraction, 1) then
-        RAISE EXCEPTION 'The length of via_edges is different of length of via_edges';
-      END IF;
-
-      FOR i IN 1 .. array_length(via_edges, 1)
-      LOOP
-          IF fraction[i] = 0 THEN
-              sql_on_vertex := 'SELECT source FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.source;
-          ELSE IF fraction[i] = 1 THEN
-              sql_on_vertex := 'SELECT target FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.target;
-          ELSE
-              via_vertices[i] = -i;
-              IF has_rcost THEN
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost,
-                              reverse_cost * (1 - ' || fraction[i] || ')  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost,
-                              reverse_cost *  ' || fraction[i] || '  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' where id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               ELSE
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               END IF;
-          END IF;
-          END IF;
-     END LOOP;
-
-     IF sql_new_vertices = ' ' THEN
-         new_edges := sql;
-     ELSE
-         IF has_rcost THEN
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost,
-                         lead(cost) OVER w  - cost AS reverse_cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL),
-                   second_part AS ( SELECT * FROM (SELECT id, lead(source) OVER w  AS source, source as target,
-                         reverse_cost - lead(reverse_cost) OVER w  AS cost,
-                         reverse_cost - lead(reverse_cost) OVER w  AS reverse_cost
-                      FROM  the_union  WHERE target > 0 and reverse_cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY reverse_cost ASC) ) as n2
-                      WHERE source IS NOT NULL),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part)
-                             UNION
-                       (SELECT * FROM second_part) ) _union )
-                  SELECT *  FROM more_union';
-         ELSE
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL ),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part) ) _union )
-                  SELECT *  FROM more_union';
-          END IF;
-      END IF;
-
- -- raise notice '%', new_edges;
-     sql_new_vertices := sql_new_vertices || v_union || ' (' || sql || ')';
-     RETURN query SELECT *
-         FROM pgr_dijkstraVia(new_edges, via_vertices, directed, has_rcost);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_lineGraph(
-    TEXT, -- edges_sql
-    directed BOOLEAN DEFAULT true,
-    OUT seq INTEGER,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost FLOAT,
-    OUT reverse_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'lineGraph'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_connectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'connectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_strongComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'strongComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_biconnectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the edge in the component
-    OUT n_seq INTEGER,          -- nth_seq of the edge in the component
-    OUT edge BIGINT)            -- the number of the edge
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'biconnectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_articulationPoints(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'articulationPoints'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bridges(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT edge BIGINT)            -- the number of the edge 
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bridges'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createtopology(edge_table text, tolerance double precision,
-		   the_geom text default 'the_geom', id text default 'id',
-		   source text default 'source', target text default 'target',rows_where text default 'true',
-		   clean boolean default FALSE)
-RETURNS VARCHAR AS
-$BODY$
-
-DECLARE
-    points record;
-    sridinfo record;
-    source_id bigint;
-    target_id bigint;
-    totcount bigint;
-    rowcount bigint;
-    srid integer;
-    sql text;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    notincluded integer;
-    i integer;
-    naming record;
-    info record;
-    flag boolean;
-    query text;
-    idtype text;
-    gtype text;
-    sourcetype text;
-    targettype text;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-    msgKind int;
-    emptied BOOLEAN;
-
-BEGIN
-    msgKind = 1; -- notice
-    fnName = 'pgr_createTopology';
-    raise notice 'PROCESSING:';
-    raise notice 'pgr_createTopology(''%'', %, ''%'', ''%'', ''%'', ''%'', rows_where := ''%'', clean := %)',edge_table,tolerance,the_geom,id,source,target,rows_where, clean;
-    execute 'show client_min_messages' into debuglevel;
-
-
-    raise notice 'Performing checks, please wait .....';
-
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-        sname=naming.sname;
-        tname=naming.tname;
-        tabname=sname||'.'||tname;
-        vname=tname||'_vertices_pgr';
-        vertname= sname||'.'||vname;
-        rows_where = ' AND ('||rows_where||')';
-      raise DEBUG '     --> OK';
-
-
-      raise debug 'Checking column names in edge table';
-        select * into idname     from _pgr_getColumnName(sname, tname,id,2,fnName);
-        select * into sourcename from _pgr_getColumnName(sname, tname,source,2,fnName);
-        select * into targetname from _pgr_getColumnName(sname, tname,target,2,fnName);
-        select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2,fnName);
-
-
-        err = sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname;
-        perform _pgr_onError( err, 2, fnName,
-               'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-	       'Column names are OK');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking column types in edge table';
-        select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-        select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-        select * into idtype from _pgr_getColumnType(sname,tname,idname,1, fnName);
-
-        err = idtype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column id:'|| idname, ' Expected type of '|| idname || ' is integer,smallint or bigint but '||idtype||' was found');
-
-        err = sourcetype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column source:'|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-        err = targettype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column target:'|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or bigint but '||targettype||' was found');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         raise debug '%',query;
-         EXECUTE query INTO sridinfo;
-
-         err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-         perform _pgr_onError(err, 2, fnName,
-	     'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-
-         srid := sridinfo.srid;
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking and creating indices in edge table';
-        perform _pgr_createIndex(sname, tname , idname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-
-        gname=quote_ident(gname);
-        idname=quote_ident(idname);
-        sourcename=quote_ident(sourcename);
-        targetname=quote_ident(targetname);
-      raise DEBUG '     --> OK';
-
-
-
-
-
-    BEGIN
-        -- issue #193 & issue #210 & #213
-        -- this sql is for trying out the where clause
-        -- the select * is to avoid any column name conflicts
-        -- limit 1, just try on first record
-        -- if the where clasuse is ill formed it will be caught in the exception
-        sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-        EXECUTE sql into dummyRec;
-        -- end
-
-        -- if above where clasue works this one should work
-        -- any error will be caught by the exception also
-        sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NOT NULL AND '||
-	    idname||' IS NOT NULL)=false '||rows_where;
-        EXECUTE SQL  into notincluded;
-
-        if clean then
-            raise debug 'Cleaning previous Topology ';
-               execute 'UPDATE ' || _pgr_quote_ident(tabname) ||
-               ' SET '||sourcename||' = NULL,'||targetname||' = NULL';
-        else
-            raise debug 'Creating topology for edges with non assigned topology';
-            if rows_where=' AND (true)' then
-                rows_where=  ' and ('||quote_ident(sourcename)||' is null or '||quote_ident(targetname)||' is  null)';
-            end if;
-        end if;
-        -- my thoery is that the select Count(*) will never go through here
-        EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-             RAISE NOTICE '%',sql;
-             RETURN 'FAIL';
-    END;
-
-    BEGIN
-         raise DEBUG 'initializing %',vertname;
-         execute 'select * from _pgr_getTableName('||quote_literal(vertname)
-                                                  || ',0,' || quote_literal(fnName) ||' )' into naming;
-         emptied = false;
-         set client_min_messages  to warning;
-         IF sname=naming.sname AND vname=naming.tname  THEN
-            if clean then
-                execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-                execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-                emptied = true;
-            end if;
-         ELSE -- table doesn't exist
-            execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-            emptied = true;
-         END IF;
-         IF (emptied) THEN
-             execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-	         quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-             perform _pgr_createIndex(vertname , 'the_geom'::text , 'gist'::text);
-         END IF;
-         execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id"}''::text[])' into naming;
-         execute 'set client_min_messages  to '|| debuglevel;
-         raise DEBUG  '  ------>OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: something went wrong when initializing the verties table';
-             RETURN 'FAIL';
-    END;
-
-
-
-    raise notice 'Creating Topology, Please wait...';
-        rowcount := 0;
-        FOR points IN EXECUTE 'SELECT ' || idname || '::bigint AS id,'
-            || ' _pgr_StartPoint(' || gname || ') AS source,'
-            || ' _pgr_EndPoint('   || gname || ') AS target'
-            || ' FROM '  || _pgr_quote_ident(tabname)
-            || ' WHERE ' || gname || ' IS NOT NULL AND ' || idname||' IS NOT NULL '||rows_where
-        LOOP
-
-            rowcount := rowcount + 1;
-            IF rowcount % 1000 = 0 THEN
-                RAISE NOTICE '% edges processed', rowcount;
-            END IF;
-
-
-            source_id := _pgr_pointToId(points.source, tolerance,vertname,srid);
-            target_id := _pgr_pointToId(points.target, tolerance,vertname,srid);
-            BEGIN
-                sql := 'UPDATE ' || _pgr_quote_ident(tabname) ||
-                    ' SET '||sourcename||' = '|| source_id::text || ','||targetname||' = ' || target_id::text ||
-                    ' WHERE ' || idname || ' =  ' || points.id::text;
-
-                IF sql IS NULL THEN
-                    RAISE NOTICE 'WARNING: UPDATE % SET source = %, target = % WHERE % = % ', tabname, source_id::text, target_id::text, idname,  points.id::text;
-                ELSE
-                    EXECUTE sql;
-                END IF;
-                EXCEPTION WHEN OTHERS THEN
-                    RAISE NOTICE '%', SQLERRM;
-                    RAISE NOTICE '%',sql;
-                    RETURN 'FAIL';
-            end;
-        END LOOP;
-        raise notice '-------------> TOPOLOGY CREATED FOR  % edges', rowcount;
-        RAISE NOTICE 'Rows with NULL geometry or NULL id: %',notincluded;
-        Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname), _pgr_quote_ident(vertname);
-        raise notice '----------------------------------------------';
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_createTopology(text, double precision,text,text,text,text,text,boolean)
-IS 'args: edge_table,tolerance, the_geom:=''the_geom'',source:=''source'', target:=''target'',rows_where:=''true'' - fills columns source and target in the geometry table and creates a vertices table for selected rows';
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
-RETURNS character varying AS
-$BODY$
-
-DECLARE
-    points record;
-    seg record;
-    naming record;
-    sridinfo record;
-    srid integer;
-    ecnt integer;
-    vertname text;
-    sname text;
-    tname text;
-    vname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    geotype text;
-    gname text;
-    tabName text;
-    flag boolean ;
-    query text;
-    selectionquery text;
-    i integer;
-    tot integer;
-    NumIsolated integer;
-    numdeadends integer;
-    numgaps integer;
-    NumCrossing integer;
-    numRings integer;
-    debuglevel text;
-
-
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeGraph(''%'',%,''%'',''%'',''%'',''%'',''%'')',edge_table,tolerance,the_geom,id,source,target,rows_where;
-  raise notice 'Performing checks, please wait ...';
-  execute 'show client_min_messages' into debuglevel;
-
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-    raise DEBUG '     --> OK';
-
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","cnt","chk"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET cnt=0 ,chk=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into idname     from _pgr_getColumnName(sname, tname,id,2);
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname, 2,
-                       'pgr_analyzeGraph',  'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-                       'Column names are OK');
-
-        raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-   BEGIN
-       raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         EXECUTE QUERY INTO sridinfo;
-
-         perform _pgr_onError( sridinfo IS NULL OR sridinfo.srid IS NULL,2,
-                 'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname,
-                 'SRID of '||gname||' is '||sridinfo.srid);
-
-         IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-             RAISE NOTICE ' Can not determine the srid of the geometry "%" in table %', the_geom,tabname;
-             RETURN 'FAIL';
-         END IF;
-         srid := sridinfo.srid;
-         raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM;--issue 210,211,213
-             RAISE NOTICE 'ERROR: something went wrong when checking for SRID of % in table %', the_geom,tabname;
-             RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-       raise debug 'Checking  indices in edge table';
-       perform _pgr_createIndex(tabname , idname , 'btree');
-       perform _pgr_createIndex(tabname , sourcename , 'btree');
-       perform _pgr_createIndex(tabname , targetname , 'btree');
-       perform _pgr_createIndex(tabname , gname , 'gist');
-
-       gname=quote_ident(gname);
-       sourcename=quote_ident(sourcename);
-       targetname=quote_ident(targetname);
-       idname=quote_ident(idname);
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking indices';
-          RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-        query='select count(*) from '||_pgr_quote_ident(tabname)||' where true  '||rows_where;
-        EXECUTE query into ecnt;
-        raise DEBUG '-->Rows Where condition: OK';
-        raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-            RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-            RAISE NOTICE 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-            RAISE NOTICE '%',query;
-            RETURN 'FAIL';
-    END;
-
-    selectionquery ='with
-           selectedRows as( (select '||sourcename||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||')
-                           union
-                           (select '||targetname||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||'))';
-
-
-
-
-
-   BEGIN
-       RAISE NOTICE 'Analyzing for dead ends. Please wait...';
-       query= 'with countingsource as (select a.'||sourcename||' as id,count(*) as cnts
-               from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||sourcename||')
-                     ,countingtarget as (select a.'||targetname||' as id,count(*) as cntt
-                    from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||targetname||')
-                   ,totalcount as (select id,case when cnts is null and cntt is null then 0
-                                                   when cnts is null then cntt
-                                                   when cntt is null then cnts
-                                                   else cnts+cntt end as totcnt
-                                   from ('||_pgr_quote_ident(vertname)||' as a left
-                                   join countingsource as t using(id) ) left join countingtarget using(id))
-               update '||_pgr_quote_ident(vertname)||' as a set cnt=totcnt from totalcount as b where a.id=b.id';
-       raise debug '%',query;
-       execute query;
-       query=selectionquery||'
-              SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE cnt=1 and id in (select id from selectedRows)';
-       raise debug '%',query;
-       execute query  INTO numdeadends;
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-          RAISE NOTICE 'ERROR: something went wrong when analizing for dead ends';
-          RETURN 'FAIL';
-   END;
-
-
-
-    BEGIN
-          RAISE NOTICE 'Analyzing for gaps. Please wait...';
-          query = 'with
-                   buffer as (select id,st_buffer(the_geom,'||tolerance||') as buff from '||_pgr_quote_ident(vertname)||' where cnt=1)
-                   ,veryclose as (select b.id,st_crosses(a.'||gname||',b.buff) as flag
-                   from  (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) as a
-                   join buffer as b on (a.'||gname||'&&b.buff)
-                   where '||sourcename||'!=b.id and '||targetname||'!=b.id )
-                   update '||_pgr_quote_ident(vertname)||' set chk=1 where id in (select distinct id from veryclose where flag=true)';
-          raise debug '%' ,query;
-          execute query;
-          GET DIAGNOSTICS  numgaps= ROW_COUNT;
-          raise DEBUG '     --> OK';
-          EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for gaps';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for isolated edges. Please wait...';
-        query=selectionquery|| ' SELECT count(*) FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' )  as a,
-                                                 '||_pgr_quote_ident(vertname)||' as b,
-                                                 '||_pgr_quote_ident(vertname)||' as c
-                            WHERE b.id in (select id from selectedRows) and a.'||sourcename||' =b.id
-                            AND b.cnt=1 AND a.'||targetname||' =c.id
-                            AND c.cnt=1';
-        raise debug '%' ,query;
-        execute query  INTO NumIsolated;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for isolated edges';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for ring geometries. Please wait...';
-        execute 'SELECT geometrytype('||gname||')  FROM '||_pgr_quote_ident(tabname) limit 1 into geotype;
-        IF (geotype='MULTILINESTRING') THEN
-            query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                 WHERE true  '||rows_where||' and st_isRing(st_linemerge('||gname||'))';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        ELSE query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                  WHERE true  '||rows_where||' and st_isRing('||gname||')';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        END IF;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for ring geometries';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for intersections. Please wait...';
-        query = 'select count(*) from (select distinct case when a.'||idname||' < b.'||idname||' then a.'||idname||'
-                                                        else b.'||idname||' end,
-                                                   case when a.'||idname||' < b.'||idname||' then b.'||idname||'
-                                                        else a.'||idname||' end
-                                    FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as a
-                                    JOIN (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as b
-                                    ON (a.'|| gname||' && b.'||gname||')
-                                    WHERE a.'||idname||' != b.'||idname|| '
-                                        and (a.'||sourcename||' in (b.'||sourcename||',b.'||targetname||')
-                                              or a.'||targetname||' in (b.'||sourcename||',b.'||targetname||')) = false
-                                        and st_intersects(a.'||gname||', b.'||gname||')=true) as d ';
-        raise debug '%' ,query;
-        execute query  INTO numCrossing;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for intersections';
-            RETURN 'FAIL';
-    END;
-
-
-
-
-    RAISE NOTICE '            ANALYSIS RESULTS FOR SELECTED EDGES:';
-    RAISE NOTICE '                  Isolated segments: %', NumIsolated;
-    RAISE NOTICE '                          Dead ends: %', numdeadends;
-    RAISE NOTICE 'Potential gaps found near dead ends: %', numgaps;
-    RAISE NOTICE '             Intersections detected: %',numCrossing;
-    RAISE NOTICE '                    Ring geometries: %',numRings;
-
-
-    RETURN 'OK';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_analyzeGraph(text,double precision,text,text,text,text,text) IS 'args: edge_table, tolerance,the_geom:=''the_geom'',id:=''id'',source column:=''source'', target column:=''target'' rows_where:=''true'' - creates a vertices table based on the geometry for selected rows';
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzeOneway(
-   edge_table text,
-   s_in_rules TEXT[],
-   s_out_rules TEXT[],
-   t_in_rules TEXT[],
-   t_out_rules TEXT[],
-   two_way_if_null boolean default true,
-   oneway text default 'oneway',
-   source text default 'source',
-   target text default 'target')
-  RETURNS text AS
-$BODY$
-
-
-DECLARE
-    rule text;
-    ecnt integer;
-    instr text;
-    naming record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    owname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    vertname text;
-    debuglevel text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeOneway(''%'',''%'',''%'',''%'',''%'',''%'',''%'',''%'',%)',
-		edge_table, s_in_rules , s_out_rules, t_in_rules, t_out_rules, oneway, source ,target,two_way_if_null ;
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    raise DEBUG '     --> OK';
-    EXCEPTION WHEN raise_exception THEN
-      RAISE NOTICE 'ERROR: something went wrong checking the table name';
-      RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","ein","eout"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET eout=0 ,ein=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into owname from _pgr_getColumnName(sname, tname,oneway,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,owname) or  targetname=owname, 2,
-                       '_pgr_createToplogy',  'Two columns share the same name', 'Parameter names for oneway,source and target  must be different',
-                       'Column names are OK');
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-
-
-    RAISE NOTICE 'Analyzing graph for one way street errors.';
-
-    rule := CASE WHEN two_way_if_null
-            THEN owname || ' IS NULL OR '
-            ELSE '' END;
-
-    instr := '''' || array_to_string(s_in_rules, ''',''') || '''';
-       EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-      from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-     where a.id=b.'|| sourcename;
-
-    RAISE NOTICE 'Analysis 25%% complete ...';
-
-    instr := '''' || array_to_string(t_in_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 50%% complete ...';
-
-    instr := '''' || array_to_string(s_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-        where a.id=b.'|| sourcename;
-    RAISE NOTICE 'Analysis 75%% complete ...';
-
-    instr := '''' || array_to_string(t_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 100%% complete ...';
-
-    EXECUTE 'SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE ein=0 or eout=0' INTO ecnt;
-
-    RAISE NOTICE 'Found % potential problems in directionality' ,ecnt;
-
-    RETURN 'OK';
-
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_analyzeOneway(text,TEXT[],TEXT[], TEXT[],TEXT[],boolean,text,text,text)
-IS 'args:edge_table , s_in_rules , s_out_rules, t_in_rules , t_out_rules, two_way_if_null:= true, oneway:=''oneway'',source:= ''source'',target:=''target'' - Analizes the directionality of the edges based on the rules';
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createverticestable(
-   edge_table text,
-   the_geom text DEFAULT 'the_geom'::text,
-   source text DEFAULT 'source'::text,
-   target text DEFAULT 'target'::text,
-    rows_where text DEFAULT 'true'::text
-)
-  RETURNS text AS
-$BODY$
-DECLARE
-    naming record;
-    sridinfo record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    sourcename text;
-    targetname text;
-    query text;
-    ecnt bigint;
-    srid integer;
-    sourcetype text;
-    targettype text;
-    sql text;
-    totcount integer;
-    i integer;
-    notincluded integer;
-    included integer;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-
-
-BEGIN
-  fnName = 'pgr_createVerticesTable';
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_createVerticesTable(''%'',''%'',''%'',''%'',''%'')',edge_table,the_geom,source,target,rows_where;
-  execute 'show client_min_messages' into debuglevel;
-
-  raise notice 'Performing checks, please wait .....';
-
-  RAISE DEBUG 'Checking % exists',edge_table;
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-  raise debug '--> Edge table exists: OK';
-
-  raise debug 'Checking column names';
-    select * into sourcename from _pgr_getColumnName(sname, tname,source,2, fnName);
-    select * into targetname from _pgr_getColumnName(sname, tname,target,2, fnName);
-    select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2, fnName);
-
-
-    err = sourcename in (targetname,gname) or  targetname=gname;
-    perform _pgr_onError(err, 2, fnName,
-        'Two columns share the same name', 'Parameter names for the_geom,source and target  must be different');
-  raise debug '--> Column names: OK';
-
-  raise debug 'Checking column types in edge table';
-    select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-    select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-
-
-    err = sourcetype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column source: '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-    err = targettype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column target: '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found');
-
-  raise debug '-->Column types:OK';
-
-  raise debug 'Checking SRID of geometry column';
-     query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-        || ' FROM ' || _pgr_quote_ident(tabname)
-        || ' WHERE ' || quote_ident(gname)
-        || ' IS NOT NULL LIMIT 1';
-     raise debug '%',query;
-     EXECUTE query INTO sridinfo;
-
-     err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-     perform _pgr_onError(err, 2, fnName,
-         'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-     srid := sridinfo.srid;
-  raise DEBUG '     --> OK';
-
-  raise debug 'Checking and creating Indices';
-     perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-  raise DEBUG '-->Check and create indices: OK';
-
-     gname=quote_ident(gname);
-     sourcename=quote_ident(sourcename);
-     targetname=quote_ident(targetname);
-
-
-  BEGIN
-  raise debug 'Checking Condition';
-    -- issue #193 & issue #210 & #213
-    -- this sql is for trying out the where clause
-    -- the select * is to avoid any column name conflicts
-    -- limit 1, just try on first record
-    -- if the where clasuse is ill formed it will be caught in the exception
-    sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-    EXECUTE sql into dummyRec;
-    -- end
-
-    -- if above where clasue works this one should work
-    -- any error will be caught by the exception also
-    sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NULL or '||
-		sourcename||' is null or '||targetname||' is null)=true '||rows_where;
-    raise debug '%',sql;
-    EXECUTE SQL  into notincluded;
-    EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-
-
-
-  BEGIN
-     raise DEBUG 'initializing %',vertname;
-       execute 'select * from _pgr_getTableName('||quote_literal(vertname)||',0)' into naming;
-       IF sname=naming.sname  AND vname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-       ELSE
-           set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-       END IF;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-                quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-       execute 'CREATE INDEX '||quote_ident(vname||'_the_geom_idx')||' ON '||_pgr_quote_ident(vertname)||'  USING GIST (the_geom)';
-       execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-       EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Initializing vertex table';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise notice 'Populating %, please wait...',vertname;
-       sql= 'with
-		lines as ((select distinct '||sourcename||' as id, _pgr_startpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-		                  ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||')
-			union (select distinct '||targetname||' as id,_pgr_endpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-			          ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||'))
-		,numberedLines as (select row_number() OVER (ORDER BY id) AS i,* from lines )
-		,maxid as (select id,max(i) as maxi from numberedLines group by id)
-		insert into '||_pgr_quote_ident(vertname)||'(id,the_geom)  (select id,the_geom  from numberedLines join maxid using(id) where i=maxi order by id)';
-       RAISE debug '%',sql;
-       execute sql;
-       GET DIAGNOSTICS totcount = ROW_COUNT;
-
-       sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' a, '||_pgr_quote_ident(vertname)||' b
-            where '||sourcename||'=b.id and '|| targetname||' in (select id from '||_pgr_quote_ident(vertname)||')';
-       RAISE debug '%',sql;
-       execute sql into included;
-
-
-
-       execute 'select max(id) from '||_pgr_quote_ident(vertname) into ecnt;
-       execute 'SELECT setval('||quote_literal(vertname||'_id_seq')||','||coalesce(ecnt,1)||' , false)';
-       raise notice '  ----->   VERTICES TABLE CREATED WITH  % VERTICES', totcount;
-       raise notice '                                       FOR   %  EDGES', included+notincluded;
-       RAISE NOTICE '  Edges with NULL geometry,source or target: %',notincluded;
-       RAISE NOTICE '                            Edges processed: %',included;
-       Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname),_pgr_quote_ident(vertname);
-       raise notice '----------------------------------------------';
-    END;
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_createVerticesTable(text,text,text,text,text)
-IS 'args: edge_table, the_geom:=''the_geom'',source:=''source'', target:=''target'' rows_where:=''true'' - creates a vertices table based on the source and target identifiers for selected rows';
-
-
-CREATE OR REPLACE FUNCTION pgr_nodeNetwork(edge_table text, tolerance double precision,
-			id text default 'id', the_geom text default 'the_geom', table_ending text default 'noded',
-            rows_where text DEFAULT ''::text, outall boolean DEFAULT false) RETURNS text AS
-$BODY$
-DECLARE
-	
-	p_num int := 0;
-	p_ret text := '';
-    pgis_ver_old boolean := _pgr_versionless(postgis_lib_version(), '2.1.0.0');
-    vst_line_substring text;
-    vst_line_locate_point text;
-    intab text;
-    outtab text;
-    n_pkey text;
-    n_geom text;
-    naming record;
-    sname text;
-    tname text;
-    outname text;
-    srid integer;
-    sridinfo record;
-    splits bigint;
-    touched bigint;
-    untouched bigint;
-    geomtype text;
-    debuglevel text;
-    rows_where text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_nodeNetwork(''%'', %, ''%'', ''%'', ''%'', ''%'',  %)',
-    edge_table, tolerance, id,  the_geom, table_ending, rows_where, outall;
-  raise notice 'Performing checks, please wait .....';
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',0)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-	RAISE NOTICE '-------> % not found',edge_table;
-        RETURN 'FAIL';
-    ELSE
-	RAISE DEBUG '  -----> OK';
-    END IF;
-
-    intab=sname||'.'||tname;
-    outname=tname||'_'||table_ending;
-    outtab= sname||'.'||outname;
-    rows_where = CASE WHEN length(rows_where) > 2 and not outall THEN ' AND (' || rows_where || ')' ELSE '' END;
-    rows_where = CASE WHEN length(rows_where) > 2 THEN ' WHERE (' || rows_where || ')' ELSE '' END;
-  END;
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',id,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(id)||')' INTO n_pkey;
-       IF n_pkey is NULL then
-          raise notice  'ERROR: id column "%"  not found in %',id,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',the_geom,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(the_geom)||')' INTO n_geom;
-       IF n_geom is NULL then
-          raise notice  'ERROR: the_geom  column "%"  not found in %',the_geom,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-  IF n_pkey=n_geom THEN
-	raise notice  'ERROR: id and the_geom columns have the same name "%" in %',n_pkey,intab;
-        RETURN 'FAIL';
-  END IF;
-
-  BEGIN
-       	raise DEBUG 'Checking the SRID of the geometry "%"', n_geom;
-       	EXECUTE 'SELECT ST_SRID(' || quote_ident(n_geom) || ') as srid '
-          		|| ' FROM ' || _pgr_quote_ident(intab)
-          		|| ' WHERE ' || quote_ident(n_geom)
-          		|| ' IS NOT NULL LIMIT 1' INTO sridinfo;
-       	IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-        	RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           	RETURN 'FAIL';
-       	END IF;
-       	srid := sridinfo.srid;
-       	raise DEBUG '  -----> SRID found %',srid;
-       	EXCEPTION WHEN OTHERS THEN
-           		RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           		RETURN 'FAIL';
-  END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_pkey,intab;
-      if (_pgr_isColumnIndexed(intab,n_pkey)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding  index "%_%_idx".',n_pkey,intab;
-
-	set client_min_messages  to warning;
-        execute 'create  index '||tname||'_'||n_pkey||'_idx on '||_pgr_quote_ident(intab)||' using btree('||quote_ident(n_pkey)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_geom,intab;
-      if (_pgr_iscolumnindexed(intab,n_geom)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding unique index "%_%_gidx".',intab,n_geom;
-	set client_min_messages  to warning;
-        execute 'CREATE INDEX '
-            || quote_ident(tname || '_' || n_geom || '_gidx' )
-            || ' ON ' || _pgr_quote_ident(intab)
-            || ' USING gist (' || quote_ident(n_geom) || ')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
----------------
-    BEGIN
-       raise DEBUG 'initializing %',outtab;
-       execute 'select * from _pgr_getTableName('||quote_literal(outtab)||',0)' into naming;
-       IF sname=naming.sname  AND outname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(outtab)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(outname)||','||quote_literal(n_geom)||')';
-       ELSE
-	   set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(outtab)||' (id bigserial PRIMARY KEY,old_id integer,sub_id integer,
-								source bigint,target bigint)';
-       END IF;
-       execute 'select geometrytype('||quote_ident(n_geom)||') from  '||_pgr_quote_ident(intab)||' limit 1' into geomtype;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(outname)||','||
-                quote_literal(n_geom)||','|| srid||', '||quote_literal(geomtype)||', 2)';
-       execute 'CREATE INDEX '||quote_ident(outname||'_'||n_geom||'_idx')||' ON '||_pgr_quote_ident(outtab)||'  USING GIST ('||quote_ident(n_geom)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-    END;
-----------------
-
-
-  raise notice 'Processing, please wait .....';
-
-
-    if pgis_ver_old then
-        vst_line_substring    := 'st_line_substring';
-        vst_line_locate_point := 'st_line_locate_point';
-    else
-        vst_line_substring    := 'st_linesubstring';
-        vst_line_locate_point := 'st_linelocatepoint';
-    end if;
-
---    -- First creates temp table with intersection points
-    p_ret = 'create temp table intergeom on commit drop as (
-        select l1.' || quote_ident(n_pkey) || ' as l1id,
-               l2.' || quote_ident(n_pkey) || ' as l2id,
-	       l1.' || quote_ident(n_geom) || ' as line,
-	       _pgr_startpoint(l2.' || quote_ident(n_geom) || ') as source,
-	       _pgr_endpoint(l2.' || quote_ident(n_geom) || ') as target,
-               st_intersection(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ') as geom
-        from (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l1
-             join (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l2
-             on (st_dwithin(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ', ' || tolerance || '))'||
-        'where l1.' || quote_ident(n_pkey) || ' <> l2.' || quote_ident(n_pkey)||' and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false  )';
-    raise debug '%',p_ret;
-    EXECUTE p_ret;
-
-    -- second temp table with locus (index of intersection point on the line)
-    -- to avoid updating the previous table
-    -- we keep only intersection points occurring onto the line, not at one of its ends
---    drop table if exists inter_loc;
-
---HAD TO CHANGE THIS QUERY
--- p_ret= 'create temp table inter_loc on commit drop as (
---        select l1id, l2id, ' || vst_line_locate_point || '(line,point) as locus from (
---        select DISTINCT l1id, l2id, line, (ST_DumpPoints(geom)).geom as point from intergeom) as foo
---        where ' || vst_line_locate_point || '(line,point)<>0 and ' || vst_line_locate_point || '(line,point)<>1)';
-    p_ret= 'create temp table inter_loc on commit drop as ( select * from (
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,source) as locus from intergeom)
-         union
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,target) as locus from intergeom)) as foo
-        where locus<>0 and locus<>1)';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-
-    -- index on l1id
-    create index inter_loc_id_idx on inter_loc(l1id);
-
-    -- Then computes the intersection on the lines subset, which is much smaller than full set
-    -- as there are very few intersection points
-
---- outab needs to be formally created with id, old_id, subid,the_geom, source,target
----  so it can be inmediatly be used with createTopology
-
---   EXECUTE 'drop table if exists ' || _pgr_quote_ident(outtab);
---   EXECUTE 'create table ' || _pgr_quote_ident(outtab) || ' as
-     P_RET = 'insert into '||_pgr_quote_ident(outtab)||' (old_id,sub_id,'||quote_ident(n_geom)||') (  with cut_locations as (
-           select l1id as lid, locus
-           from inter_loc
-           -- then generates start and end locus for each line that have to be cut buy a location point
-           UNION ALL
-           select i.l1id  as lid, 0 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           UNION ALL
-           select i.l1id  as lid, 1 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           order by lid, locus
-       ),
-       -- we generate a row_number index column for each input line
-       -- to be able to self-join the table to cut a line between two consecutive locations
-       loc_with_idx as (
-           select lid, locus, row_number() over (partition by lid order by locus) as idx
-           from cut_locations
-       )
-       -- finally, each original line is cut with consecutive locations using linear referencing functions
-       select l.' || quote_ident(n_pkey) || ', loc1.idx as sub_id, ' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus) as ' || quote_ident(n_geom) || '
-       from loc_with_idx loc1 join loc_with_idx loc2 using (lid) join ' || _pgr_quote_ident(intab) || ' l on (l.' || quote_ident(n_pkey) || ' = loc1.lid)
-       where loc2.idx = loc1.idx+1
-           -- keeps only linestring geometries
-           and geometryType(' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus)) = ''LINESTRING'') ';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-	GET DIAGNOSTICS splits = ROW_COUNT;
-        execute 'with diff as (select distinct old_id from '||_pgr_quote_ident(outtab)||' )
-                 select count(*) from diff' into touched;
-	-- here, it misses all original line that did not need to be cut by intersection points: these lines
-	-- are already clean
-	-- inserts them in the final result: all lines which gid is not in the res table.
-	EXECUTE 'insert into ' || _pgr_quote_ident(outtab) || ' (old_id , sub_id, ' || quote_ident(n_geom) || ')
-                ( with used as (select distinct old_id from '|| _pgr_quote_ident(outtab)||')
-		select ' ||  quote_ident(n_pkey) || ', 1 as sub_id, ' ||  quote_ident(n_geom) ||
-		' from '|| _pgr_quote_ident(intab) ||' where  '||quote_ident(n_pkey)||' not in (select * from used)' || rows_where || ')';
-	GET DIAGNOSTICS untouched = ROW_COUNT;
-
-	raise NOTICE '  Split Edges: %', touched;
-	raise NOTICE ' Untouched Edges: %', untouched;
-	raise NOTICE '     Total original Edges: %', touched+untouched;
-        RAISE NOTICE ' Edges generated: %', splits;
-	raise NOTICE ' Untouched Edges: %',untouched;
-	raise NOTICE '       Total New segments: %', splits+untouched;
-        RAISE NOTICE ' New Table: %', outtab;
-        RAISE NOTICE '----------------------------------';
-
-    drop table  if exists intergeom;
-    drop table if exists inter_loc;
-    RETURN 'OK';
-END;
-$BODY$
-    LANGUAGE 'plpgsql' VOLATILE STRICT COST 100;
-
-
-COMMENT ON FUNCTION pgr_nodeNetwork(text, double precision, text, text, text, text, boolean )
- IS  'edge_table, tolerance, id:=''id'', the_geom:=''the_geom'', table_ending:=''noded'' ';
-
-
-CREATE OR REPLACE FUNCTION pgr_labelGraph(
-                edge_table text,
-                id text default 'id',
-                source text default 'source',
-                target text default 'target',
-                subgraph text default 'subgraph',
-                rows_where text default 'true'
-        )
-        RETURNS character varying AS
-$BODY$
-
-DECLARE
-        naming record;
-        schema_name text;
-        table_name text;
-        garbage text;
-        incre integer;
-        table_schema_name text;
-        query text;
-        ecnt integer;
-        sql1 text;
-        rec1 record;
-        sql2 text;
-        rec2 record;
-        rec_count record;
-        rec_single record;
-        graph_id integer;
-        gids int [];
-
-BEGIN
-        raise notice 'Processing:';
-        raise notice 'pgr_brokenGraph(''%'',''%'',''%'',''%'',''%'',''%'')', edge_table,id,source,target,subgraph,rows_where;
-        raise notice 'Performing initial checks, please hold on ...';
-
-        Raise Notice 'Starting - Checking table ...';
-        BEGIN
-                raise debug 'Checking % table existance', edge_table;
-                execute 'select * from pgr_getTableName('|| quote_literal(edge_table) ||')' into naming;
-                schema_name = naming.sname;
-                table_name = naming.tname;
-                table_schema_name = schema_name||'.'||table_name;
-                IF schema_name is null then
-                        raise notice 'no schema';
-                        return 'FAIL';
-                else
-                        if table_name is null then
-                                raise notice 'no table';
-                                return 'FAIL';
-                        end if;
-                end if;
-        END;
-        Raise Notice 'Ending - Checking table';
-
-        Raise Notice 'Starting - Checking columns';
-        BEGIN
-                raise debug 'Checking exitance of necessary columns inside % table', edge_table;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(id) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no id column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(source) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no source column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(target) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no target column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(subgraph) ||')' into naming;
-                if naming.pgr_iscolumnintable = 't' then
-                        raise notice 'subgraph column already in the table';
-                        return 'FAIL';
-                end if;
-        END;
-        Raise Notice 'Ending - Checking columns';
-
-        Raise Notice 'Starting - Checking rows_where condition';
-        BEGIN
-                raise debug 'Checking rows_where condition';
-                query='select count(*) from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where;
-                execute query into ecnt;
-                raise debug '-->Rows where condition: OK';
-                raise debug '    --> OK';
-                EXCEPTION WHEN OTHERS THEN
-                        raise notice 'Got %', SQLERRM;
-                        Raise notice 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-                        Raise notice '%', query;
-                        return 'FAIL';
-        END;
-        Raise Notice 'Ending - Checking rows_where condition';
-
-        garbage := 'garbage001';
-        incre := 1;
-        Raise Notice 'Starting - Checking temporary column';
-        Begin
-                raise debug 'Checking Checking temporary columns existance';
-
-                While True
-                        Loop
-                                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(garbage) ||')' into naming;
-                                If naming.pgr_iscolumnintable = 't' THEN
-                                        incre := incre + 1;
-                                        garbage := 'garbage00'||incre||'';
-                                ELSE
-                                        EXIT;
-                                END IF;
-                        End Loop;
-        End;
-        Raise Notice 'Ending - Checking temporary column';
-
-        Raise Notice 'Starting - Calculating subgraphs';
-        BEGIN
-                --------- Add necessary columns ----------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(subgraph) || ' INTEGER DEFAULT -1';
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(garbage) || ' INTEGER DEFAULT 0';
-                graph_id := 1;
-
-                EXECUTE 'select count(*) as count from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where ||'' into rec_count;
-                if rec_count.count = 0 then
-                        RETURN 'rows_where condition generated 0 rows';
-                end if;
-
-                WHILE TRUE
-                        LOOP
-                                ---------- Assign the very first -1 row graph_id ----------
-                                EXECUTE 'SELECT ' || pgr_quote_ident(id) || ' AS gid FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1 LIMIT 1' INTO rec_single;
-                                EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec_single.gid || '';
-
-                                --------- Search other rows with that particular graph_id -----------
-                                WHILE TRUE
-                                        LOOP
-                                                EXECUTE 'SELECT COUNT(*) FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0' into rec_count;
-                                                ----------- The following if else will check those rows which already have entertained ------------
-                                                IF (rec_count.count > 0) THEN
-                                                        sql1 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0';
-                                                        FOR rec1 IN EXECUTE sql1
-                                                                LOOP
-                                                                        sql2 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| pgr_quote_ident(source) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(source) ||' = '|| rec1.target ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.target ||'';
-                                                                        FOR rec2 IN EXECUTE sql2
-                                                                                LOOP
-                                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec2.gid || '';
-                                                                                END LOOP;
-                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(garbage) || ' = 1 WHERE ' || pgr_quote_ident(id) || ' = ' || rec1.gid || '';
-                                                                END LOOP;
-                                                ELSE
-                                                        EXIT;
-                                                END IF;
-                                        END LOOP;
-
-                                ------ Following is to exit the while loop. 0 means no more -1 id.
-                                EXECUTE 'SELECT COUNT(*) AS count FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1' INTO rec_count;
-                                If (rec_count.count = 0) THEN
-                                        EXIT;
-                                ELSE
-                                        graph_id := graph_id + 1;
-                                END IF;
-                        END LOOP;
-
-                ----------- Drop garbage column ------------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' DROP COLUMN ' || pgr_quote_ident(garbage) ||'';
-                Raise Notice 'Successfully complicated calculating subgraphs';
-        END;
-        Raise Notice 'Ending - Calculating subgraphs';
-
-        RETURN 'OK';
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCostMatrix(
-    edges_sql TEXT,
-    points_sql TEXT,
-    pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_pid, a.end_pid, a.agg_cost
-        FROM _pgr_withPoints($1, $2, $3, $3, $4,  $5, TRUE, TRUE) AS a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
---  DIJKSTRA DMatrix
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2, $2, $3, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
---  BIDIRECTIONAL DIJKSTRA Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_astarCostMatrix(
-    edges_sql TEXT, -- XY edges sql
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2, $2, $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
---  BIDIRECTIONAL ASTAR Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdAstarCostMatrix(
-    edges_sql TEXT,
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_bdAstarCostMatrix(TEXT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCostMatrix';
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_getTableName(IN tab text,OUT sname text,OUT tname text)
-RETURNS RECORD AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getTableName: This function will no longer be soported';
-    select * from _pgr_getTableName(tab, 0, 'pgr_getTableName') into sname,tname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_getColumnName(tab text, col text)
-RETURNS text AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getColumnName: This function will no longer be soported';
-    return _pgr_getColumnName(tab,col, 0, 'pgr_getColumnName');
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    select * from _pgr_getColumnName(tab,col,0, 'pgr_isColumnInTable') into cname;
-    return  cname IS not NULL;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnIndexed(tab text, col text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnIndexed: This function will no longer be soported';
-    return  _pgr_isColumnIndexed(tab,col);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-create or replace function pgr_quote_ident(idname text)
-returns text as
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    return  _pgr_quote_ident(idname);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_versionless(v1 text, v2 text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_versionless: This function will no longer be soported';
-    return  _pgr_versionless(v1,v2);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-create or replace function pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_startPoint: This function will no longer be soported';
-    return  _pgr_startPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_endPoint: This function will no longer be soported';
-    return  _pgr_endPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspJohnson(edges_sql text)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_johnson instead';
-      has_reverse =_pgr_parameter_check('johnson', edges_sql, false);
-      sql = edges_sql;
-      IF (has_reverse) THEN
-           RAISE NOTICE 'reverse_cost column found, removing.';
-           sql = 'SELECT source, target, cost FROM (' || edges_sql || ') a';
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () - 1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_johnson(sql, TRUE);
-  END
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspWarshall(edges_sql text, directed boolean, has_rcost boolean)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_floydWarshall instead';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-      sql := edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         ELSE raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () -1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_floydWarshall(sql, directed);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_astar(edges_sql TEXT, source_id INTEGER, target_id INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated signature pgr_astar(text, integer, integer, boolean, boolean)';
-    has_reverse =_pgr_parameter_check('astar', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost, x1,y1, x2, y2 FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-    FROM pgr_astar(sql, ARRAY[$2], ARRAY[$3], directed);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    sql TEXT,
-    source_vid INTEGER,
-    target_vid INTEGER,
-    directed BOOLEAN,
-    has_reverse_cost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdAstar';
-    has_reverse =_pgr_parameter_check('astar', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdAstar(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(edges_sql TEXT, start_vid INTEGER, end_vid INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdDijkstra';
-    has_reverse =_pgr_parameter_check('dijkstra', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdDijkstra(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstraPath(
-    sql text,
-    source INTEGER,
-    targets INTEGER ARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-    RETURNS SETOF pgr_costResult3 AS
-    $BODY$
-    DECLARE
-    has_reverse BOOLEAN;
-    new_sql TEXT;
-    result pgr_costResult3;
-    tmp pgr_costResult3;
-    sseq INTEGER;
-    i INTEGER;
-    BEGIN
-        RAISE NOTICE 'Deprecated function: Use pgr_dijkstra instead.';
-        has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-        new_sql = sql;
-        IF (array_ndims(targets) != 1) THEN
-            raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-
-        IF (has_reverse != has_rcost) THEN
-            IF (has_reverse) THEN
-                new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-            ELSE
-                raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-                USING ERRCODE = 'XX000';
-            END IF;
-        END IF;
-        SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-        sseq = 0; i = 1;
-        FOR result IN
-            SELECT seq, a.end_vid::INTEGER AS id1, a.node::INTEGER AS i2, a.edge::INTEGER AS id3, cost
-            FROM pgr_dijkstra(new_sql, source, targets, directed) a ORDER BY a.end_vid, seq LOOP
-            WHILE (result.id1 != targets[i]) LOOP
-                tmp.seq = sseq;
-                tmp.id1 = targets[i];
-                IF (targets[i] = source) THEN
-                    tmp.id2 = source;
-                    tmp.cost =0;
-                ELSE
-                    tmp.id2 = 0;
-                    tmp.cost = -1;
-                END IF;
-                tmp.id3 = -1;
-                RETURN next tmp;
-                i = i + 1;
-                sseq = sseq + 1;
-            END LOOP;
-        IF (result.id1 = targets[i] AND result.id3 != -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-        IF (result.id1 = targets[i] AND result.id3 = -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.id2 = source;
-            tmp.cost = 0;
-        ELSE
-            tmp.id2 = 0;
-            tmp.cost = -1;
-        END IF;
-        tmp.id3 = -1;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstracost(
-    sql text,
-    source INTEGER,
-    targets INTEGER array,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-result pgr_costResult;
-tmp pgr_costResult;
-sseq INTEGER;
-i INTEGER;
-BEGIN
-    RAISE NOTICE 'Deprecated function. Use pgr_dijkstraCost instead.';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    new_sql = sql;
-    IF (array_ndims(targets) != 1) THEN
-        raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-        USING ERRCODE = 'XX000';
-    END IF;
-
-
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-    sseq = 0; i = 1;
-    FOR result IN
-        SELECT ((row_number() over()) -1)::INTEGER, a.start_vid::INTEGER, a.end_vid::INTEGER, agg_cost
-        FROM pgr_dijkstraCost(new_sql, source, targets, directed) a ORDER BY end_vid LOOP
-        WHILE (result.id2 != targets[i]) LOOP
-            tmp.seq = sseq;
-            tmp.id1 = source;
-            tmp.id2 = targets[i];
-            IF (targets[i] = source) THEN
-                tmp.cost = 0;
-            ELSE
-                tmp.cost = -1;
-            END IF;
-            RETURN next tmp;
-            i = i + 1;
-            sseq = sseq + 1;
-        END LOOP;
-        IF (result.id2 = targets[i]) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = source;
-        tmp.id2 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.cost = 0;
-        ELSE
-            tmp.cost = -1;
-        END IF;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-create or replace function pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    returns integer as
-$body$
-
-declare
-    rr record;
-    pct float;
-    debuglevel text;
-
-begin
-    -- find the closest edge within tol distance
-    execute 'select * from ' || _pgr_quote_ident(edges) ||
-            ' where st_dwithin(''' || pnt::text ||
-            '''::geometry, the_geom, ' || tol || ') order by st_distance(''' || pnt::text ||
-            '''::geometry, the_geom) asc limit 1' into rr;
-
-    if rr.the_geom is not null then
-        -- deal with MULTILINESTRINGS
-        if geometrytype(rr.the_geom)='MULTILINESTRING' THEN
-            rr.the_geom := ST_GeometryN(rr.the_geom, 1);
-        end if;
-
-        -- project the point onto the linestring
-        execute 'show client_min_messages' into debuglevel;
-        SET client_min_messages='ERROR';
-        pct := st_line_locate_point(rr.the_geom, pnt);
-        execute 'set client_min_messages  to '|| debuglevel;
-
-        -- return the node we are closer to
-        if pct < 0.5 then
-            return rr.source;
-        else
-            return rr.target;
-        end if;
-    else
-        -- return a failure to find an edge within tol distance
-        return -1;
-    end if;
-end;
-$body$
-  language plpgsql volatile
-  cost 5;
-
-
-----------------------------------------------------------------------------
-
-create or replace function pgr_flipedges(ga geometry[])
-    returns geometry[] as
-$body$
-
-declare
-    nn integer;
-    i integer;
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_flipEdges';
-    -- get the count of edges, and return if only one edge
-    nn := array_length(ga, 1);
-    if nn=1 then
-        return ga;
-    end if;
-
-    -- determine if first needs to be flipped
-    g := _pgr_startpoint(ga[1]);
-
-    -- if the start of the first is connected to the second then it needs to be flipped
-    if _pgr_startpoint(ga[2])=g or _pgr_endpoint(ga[2])=g then
-        ga[1] := st_reverse(ga[1]);
-    end if;
-    g := _pgr_endpoint(ga[1]);
-
-    -- now if  the end of the last edge matchs the end of the current edge we need to flip it
-    for i in 2 .. nn loop
-        if _pgr_endpoint(ga[i])=g then
-            ga[i] := st_reverse(ga[i]);
-        end if;
-        -- save the end of this edge into the last end for the next cycle
-        g := _pgr_endpoint(ga[i]);
-    end loop;
-
-    return ga;
-end;
-$body$
-    language plpgsql immutable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_texttopoints(pnts text, srid integer DEFAULT(4326))
-    returns geometry[] as
-$body$
-
-declare
-    a text[];
-    t text;
-    p geometry;
-    g geometry[];
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_textToPoints';
-    -- convert commas to space and split on ';'
-    a := string_to_array(replace(pnts, ',', ' '), ';');
-    -- convert each 'x y' into a point geometry and concattenate into a new array
-    for t in select unnest(a) loop
-        p := st_pointfromtext('POINT(' || t || ')', srid);
-        g := g || p;
-    end loop;
-
-    return g;
-end;
-$body$
-    language plpgsql immutable;
-
------------------------------------------------------------------------
-
-create or replace function pgr_pointstovids(pnts geometry[], edges text, tol float8 DEFAULT(0.01))
-    returns integer[] as
-$body$
-
-declare
-    v integer[];
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_pointsToVids';
-    -- cycle through each point and locate the nearest edge and vertex on that edge
-    for g in select unnest(pnts) loop
-        v := v || pgr_pointtoedgenode(edges, g, tol);
-    end loop;
-
-    return v;
-end;
-$body$
-    language plpgsql stable;
-
-
-create or replace function pgr_pointstodmatrix(pnts geometry[], mode integer default (0), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    r record;
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_pointsToDMatrix';
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    -- create an id for each point in the array and unnest it into a table nodes in the with clause
-    for r in with nodes as (select row_number() over()::integer as id, p from (select unnest(pnts) as p) as foo)
-        -- compute a row of distances
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j,
-                case when mode=0
-                    then st_distance(a.p, b.p)
-                    else st_distance_sphere(a.p, b.p)
-                end as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i loop
-
-        -- you must concat an array[array[]] to make dmatrix[][]
-        -- concat the row of distances to the dmatrix
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-end;
-$body$
-    language plpgsql stable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_vidstodmatrix(IN vids integer[], IN pnts geometry[], IN edges text, tol float8 DEFAULT(0.1), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    i integer;
-    j integer;
-    nn integer;
-    rr record;
-    bbox geometry;
-    t float8[];
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    -- check if the input arrays has any -1 values, maybe this whould be a raise exception
-    if vids @> ARRAY[-1] then
-    raise notice 'Some vids are undefined (-1)!';
-    dmatrix := null;
-    ids := null;
-    return;
-    end if;
-
-    ids := vids;
-
-    -- get the count of nodes
-    nn := array_length(vids,1);
-
-    -- zero out a dummy row
-    for i in 1 .. nn loop
-        t := t || 0.0::float8;
-    end loop;
-
-    -- using the dummy row, zero out the whole matrix
-    for i in 1 .. nn loop
-    dmatrix := dmatrix || ARRAY[t];
-    end loop;
-
-    for i in 1 .. nn-1 loop
-        j := i;
-        -- compute the bbox for the point needed for this row
-        select st_expand(st_collect(pnts[id]), tol) into bbox
-          from (select generate_series as id from generate_series(i, nn)) as foo;
-
-        -- compute kdijkstra() for this row
-        for rr in execute 'select * from pgr_dijkstracost($1, $2, $3, false)'
-                  using 'select id, source, target, cost from ' || edges ||
-                        ' where the_geom && ''' || bbox::text || '''::geometry'::text, vids[i], vids[i+1:nn] loop
-
-            -- TODO need to check that all node were reachable from source
-            -- I think unreachable paths between nodes returns cost=-1.0
-
-            -- populate the matrix with the cost values, remember this is symmetric
-            j := j + 1;
-            -- raise notice 'cost(%,%)=%', i, j, rr.agg_cost;
-            dmatrix[i][j] := rr.agg_cost;
-            dmatrix[j][i] := rr.agg_cost;
-        end loop;
-    end loop;
-
-end;
-$body$
-    language plpgsql stable cost 200;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_vidsToDMatrix(sql TEXT, vids  INTEGER[], dir BOOLEAN, has_rcost BOOLEAN, want_symmetric BOOLEAN)
-RETURNS float8[] AS
-$BODY$
-DECLARE
-directed BOOLEAN;
-has_reverse BOOLEAN;
-edges_sql TEXT;
-dmatrix_row float8[];
-dmatrix float8[];
-cell RECORD;
-unique_vids INTEGER[];
-total BIGINT;
-from_v BIGINT;
-to_v BIGINT;
-BEGIN
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql = sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    unique_vids :=  ARRAY(SELECT DISTINCT UNNEST(vids) ORDER BY 1);
-
-    IF want_symmetric THEN
-        directed = false;
-    ELSE
-        directed = dir;
-    END IF;
-
-    total := array_length(unique_vids, 1);
-
-    -- initializing dmatrix
-    FOR i in 1 .. total LOOP
-        dmatrix_row := dmatrix_row || '+Infinity'::float8;
-    END LOOP;
-    FOR i in 1 .. total LOOP
-    dmatrix := dmatrix || ARRAY[dmatrix_row];
-    dmatrix[i][i] = 0;
-    END LOOP;
-
-    CREATE TEMP TABLE __x___y____temp AS
-        WITH result AS
-            (SELECT unnest(unique_vids) AS vid)
-        SELECT row_number() OVER() AS idx, vid FROM result;
-
-    FOR cell IN SELECT * FROM pgr_dijkstraCostMatrix(sql, unique_vids, directed) LOOP
-        SELECT idx INTO from_v FROM __x___y____temp WHERE vid =  cell.start_vid;
-        SELECT idx INTO to_v FROM __x___y____temp WHERE vid =  cell.end_vid;
-
-        dmatrix[from_v][to_v] = cell.agg_cost;
-        dmatrix[to_v][from_v] = cell.agg_cost;
-    END LOOP;
-
-    DROP TABLE IF EXISTS __x___y____temp;
-    RETURN dmatrix;
-
-    EXCEPTION WHEN others THEN
-       DROP TABLE IF EXISTS __x___y____temp;
-       raise exception '% %', SQLERRM, SQLSTATE;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated function';
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_dijkstra(sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_dijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN) IS 'pgr_dijkstra(Deprecated signature)';
-
-
-
-
-
--- OLD SIGNATURE
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(edges_sql text, source BIGINT, distance FLOAT, directed BOOLEAN, has_rcost BOOLEAN)
-  RETURNS SETOF pgr_costresult AS
-  $BODY$
-  DECLARE
-  has_reverse BOOLEAN;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function';
-
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, FALSE);
-
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-             -- the user says it doesn't have reverse cost but its false
-             -- removing from query
-             RAISE NOTICE 'Contradiction found: has_rcost set to false but reverse_cost column found';
-             sql = 'SELECT id, source, target, cost, -1 as reverse_cost FROM (' || edges_sql || ') __q ';
-         ELSE
-             -- the user says it has reverse cost but its false
-             -- can't do anything
-             RAISE EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query SELECT seq - 1 AS seq, node::integer AS id1, edge::integer AS id2, agg_cost AS cost
-                FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maximumcardinalitymatching(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---INTERNAL FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
-------------------------
--- deprecated signatures
------------------------
-
-COMMENT ON FUNCTION pgr_astar(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_astar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdAstar( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdAstar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdDijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdDijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_dijkstra(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_dijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_drivingDistance(text,  BIGINT,  FLOAT8,  BOOLEAN,  BOOLEAN)
-    IS 'pgr_drivingDistance(Deprecated signature)';
-
-------------------------
--- Renamed /deprecated
------------------------
-COMMENT ON FUNCTION pgr_apspJohnson(TEXT)
-    IS 'pgr_apspJohnson(Renamed function) use pgr_Johnson instead';
-
-COMMENT ON FUNCTION pgr_apspWarshall(text, boolean, boolean)
-    IS 'pgr_apspWarshall(Renamed function) use pgr_floydWarshall instead';
-
-COMMENT ON FUNCTION pgr_kdijkstraPath( text, INTEGER, INTEGER ARRAY, BOOLEAN, BOOLEAN)
-    IS 'pgr_kdijkstraPath(Renamed function) use pgr_dijkstra instead';
-
-COMMENT ON FUNCTION pgr_kdijkstracost( text, INTEGER, INTEGER array, BOOLEAN, BOOLEAN)
-    IS 'pgr_kDijkstraCost(Renamed function) use pgr_dijkstraCost instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-
-
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-
-
-COMMENT ON FUNCTION pgr_gsoc_vrppdtw( text, INTEGER, INTEGER)
-    IS 'pgr_gsoc_vrppdtw(Renamed function) use pgr_pickDeliverEuclidean instead';
-
-------------------------
--- Deprecated functions
------------------------
-
-COMMENT ON FUNCTION pgr_flipedges(geometry[])
-    IS 'pgr_flipedges(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_texttopoints(text,  integer)
-    IS 'pgr_texttopoints(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstovids(pnts geometry[], edges text, tol float8)
-    IS 'pgr_pointstovids(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    IS 'pgr_pointtoedgenode(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstodmatrix(geometry[], integer)
-    IS 'pgr_pointstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidstodmatrix( integer[],  geometry[],  text, float8)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidsToDMatrix(TEXT,  INTEGER[], BOOLEAN, BOOLEAN, BOOLEAN)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-
-
-
-COMMENT ON FUNCTION pgr_getTableName(IN tab text)
-    IS 'pgr_getTableName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_getColumnName(tab text, col text)
-    IS 'pgr_getColumnName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnInTable(tab text, col text)
-    IS 'pgr_isColumnInTable(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnIndexed(tab text, col text)
-    IS 'pgr_isColumnIndexed(Deprecated function)';
-
-
-COMMENT ON FUNCTION pgr_quote_ident(idname text)
-    IS 'pgr_quote_ident(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_versionless(v1 text, v2 text)
-    IS 'pgr_versionless(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_startPoint(g geometry)
-    IS 'pgr_startPoint(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_endPoint(g geometry)
-    IS 'pgr_endPoint(Deprecated function)';
-
-
diff --git a/tools/sql-update-scripts/pgrouting--2.4.0--2.5.2.sql b/tools/sql-update-scripts/pgrouting--2.4.0--2.5.2.sql
deleted file mode 100644
index 91513d3..0000000
--- a/tools/sql-update-scripts/pgrouting--2.4.0--2.5.2.sql
+++ /dev/null
@@ -1,6522 +0,0 @@
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- pgRouting extension upgrade from 2.4.0 to 2.5.2
--- generated by tools/build-extension-update-files
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-\echo Use "ALTER extension pgrouting update to '2.5.2'" to load this file. \quit
-
-
--------------------------------------
--- remove functions no longer in the 2.5.2 extension
--------------------------------------
-
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_astar(text,anyarray,anyarray,boolean,integer,double precision,double precision,boolean);
-DROP FUNCTION IF EXISTS _pgr_astar(text,anyarray,anyarray,boolean,integer,double precision,double precision,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_astar(text,anyarray,bigint,boolean,integer,double precision,double precision,boolean);
-DROP FUNCTION IF EXISTS _pgr_astar(text,anyarray,bigint,boolean,integer,double precision,double precision,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_astar(text,bigint,anyarray,boolean,integer,double precision,double precision,boolean);
-DROP FUNCTION IF EXISTS _pgr_astar(text,bigint,anyarray,boolean,integer,double precision,double precision,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_astar(text,bigint,bigint,boolean,integer,double precision,double precision,boolean);
-DROP FUNCTION IF EXISTS _pgr_astar(text,bigint,bigint,boolean,integer,double precision,double precision,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_bddijkstra(text,bigint,bigint,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_bddijkstra(text,bigint,bigint,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,anyarray,bigint,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,anyarray,bigint,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,bigint,anyarray,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,bigint,anyarray,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,bigint,bigint,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,bigint,bigint,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_maxflow(text,anyarray,anyarray,text,boolean);
-DROP FUNCTION IF EXISTS _pgr_maxflow(text,anyarray,anyarray,text,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_maxflow(text,anyarray,bigint,text,boolean);
-DROP FUNCTION IF EXISTS _pgr_maxflow(text,anyarray,bigint,text,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_maxflow(text,bigint,anyarray,text,boolean);
-DROP FUNCTION IF EXISTS _pgr_maxflow(text,bigint,anyarray,text,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_maxflow(text,bigint,bigint,text,boolean);
-DROP FUNCTION IF EXISTS _pgr_maxflow(text,bigint,bigint,text,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_pickdeliver(text,integer,double precision,double precision,integer);
-DROP FUNCTION IF EXISTS _pgr_pickdeliver(text,integer,double precision,double precision,integer);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,anyarray,anyarray,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,anyarray,anyarray,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,anyarray,bigint,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,anyarray,bigint,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,bigint,anyarray,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,bigint,anyarray,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,bigint,bigint,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,bigint,bigint,boolean,character,boolean,boolean);
-
-
-------------------------------------------
---       New functions:  2.3
---    Signature change:  2.5
--- Inner query changed:  2.5
-------------------------------------------
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_edgedisjointpaths(text,bigint,bigint,boolean);
-DROP FUNCTION IF EXISTS pgr_edgedisjointpaths(text,bigint,bigint,boolean);
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_edgedisjointpaths(text,bigint,anyarray,boolean);
-DROP FUNCTION IF EXISTS pgr_edgedisjointpaths(text,bigint,anyarray,boolean);
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_edgedisjointpaths(text,anyarray,bigint,boolean);
-DROP FUNCTION IF EXISTS pgr_edgedisjointpaths(text,anyarray,bigint,boolean);
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_edgedisjointpaths(text,anyarray,anyarray,boolean);
-DROP FUNCTION IF EXISTS pgr_edgedisjointpaths(text,anyarray,anyarray,boolean);
-
-
-
-
-
-
-
-
-
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
---- pgRouting provides geospatial routing functionality.
---- http://pgrouting.org
---- copyright
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
----
---- This is free software; you can redistribute and/or modify it:
---- the terms of the GNU General Public Licence. See the COPYING file.
---- the terms of the MIT-X Licence. See the COPYING file.
----
---- The following functions have MIT-X licence:
----     pgr_version()
----     pgr_tsp(matrix float8[][], startpt integer, endpt integer DEFAULT -1, OUT seq integer, OUT id integer)
----     _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
----     pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
----
----
---- All other functions are under GNU General Public Licence.
----
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
--- WARNING: Any change in this file must be evaluated for compatibility.
---          Changes cleanly handled by postgis_upgrade.sql are fine,
---          other changes will require a bump in Major version.
---          Currently only function replaceble by CREATE OR REPLACE
---          are cleanly handled.
---
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
---  pgRouting 2.0 types
-
-
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_version()
-RETURNS TABLE(
-        "version" varchar,
-        tag varchar,
-        hash varchar,
-        branch varchar,
-        boost varchar
-    ) AS
-$BODY$
-    SELECT '2.5.2'::varchar AS version,
-        'v2.5.2'::varchar AS tag,
-        '60585f1f7'::varchar AS hash,
-        'master'::varchar AS branch,
-        '1.54.0'::varchar AS boost;
-$BODY$
-LANGUAGE sql IMMUTABLE;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getTableName(IN tab text, IN reportErrs int default 0, IN fnName text default '_pgr_getTableName', OUT sname text,OUT tname text)
-  RETURNS RECORD AS
-$$
-DECLARE
-        naming record;
-        i integer;
-        query text;
-        sn text; -- schema name
-        tn text; -- table name
-        ttype text; --table type for future use
-        err boolean;
-        debuglevel text;
-        var_types text[] = ARRAY['BASE TABLE', 'VIEW'];
-BEGIN
-
-    execute 'show client_min_messages' into debuglevel;
-
-
-    perform _pgr_msg( 0, fnName, 'Checking table ' || tab || ' exists');
-    --RAISE DEBUG 'Checking % exists',tab;
-
-    i := strpos(tab,'.');
-    IF (i <> 0) THEN
-        sn := split_part(tab, '.',1);
-        tn := split_part(tab, '.',2);
-    ELSE
-        sn := current_schema;
-        tn := tab;
-    END IF;
-
-
-   SELECT schema_name INTO sname
-   FROM information_schema.schemata WHERE schema_name = sn;
-
-    IF sname IS NOT NULL THEN -- found schema (as is)
-       SELECT table_name, table_type INTO tname, ttype
-       FROM information_schema.tables
-       WHERE
-                table_type = ANY(var_types) and
-                table_schema = sname and
-                table_name = tn ;
-        IF tname is NULL THEN
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  = ANY(var_types) and
-                table_schema = sname and
-                table_name = lower(tn) ORDER BY table_name;
-        END IF;
-    END IF;
-    IF sname is NULL or tname is NULL THEN --schema not found or table not found
-        SELECT schema_name INTO sname
-        FROM information_schema.schemata
-        WHERE schema_name = lower(sn) ;
-
-        IF sname IS NOT NULL THEN -- found schema (with lower caps)
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  =  ANY(var_types) and
-                table_schema = sname and
-                table_name= tn ;
-
-           IF tname IS NULL THEN
-                SELECT table_name, table_type INTO tname, ttype
-                FROM information_schema.tables
-                WHERE
-                    table_type  =  ANY(var_types) and
-                    table_schema = sname and
-                    table_name= lower(tn) ;
-           END IF;
-        END IF;
-    END IF;
-   err = (sname IS NULL OR tname IS NULL);
-   perform _pgr_onError(err, reportErrs, fnName, 'Table ' || tab ||' not found',' Check your table name', 'Table '|| tab || ' found');
-
-END;
-$$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(sname text, tname text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(col) into cname;
-
-    IF cname is null  THEN
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(lower(col))  into cname;
-    END if;
-
-    err = cname is null;
-
-    perform _pgr_onError(err, reportErrs, fnName,  'Column '|| col ||' not found', ' Check your column name','Column '|| col || ' found');
-    RETURN cname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(tab text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-
-    select * into cname from _pgr_getColumnName(sname,tname,col,reportErrs, fnName);
-    RETURN cname;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    select * from _pgr_getColumnName(tab,col,0, '_pgr_isColumnInTable') into cname;
-    return cname is not null;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(sname text, tname text, cname text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    pkey text;
-BEGIN
-    SELECT
-          pg_attribute.attname into pkey
-         --  format_type(pg_attribute.atttypid, pg_attribute.atttypmod)
-          FROM pg_index, pg_class, pg_attribute
-          WHERE
-                  pg_class.oid = _pgr_quote_ident(sname||'.'||tname)::regclass AND
-                  indrelid = pg_class.oid AND
-                  pg_attribute.attrelid = pg_class.oid AND
-                  pg_attribute.attnum = any(pg_index.indkey)
-                  AND indisprimary;
-
-    IF pkey=cname then
-          RETURN TRUE;
-    END IF;
-
-    SELECT a.index_name,
-           b.attname,
-           b.attnum,
-           a.indisunique,
-           a.indisprimary
-      INTO rec
-      FROM ( SELECT a.indrelid,
-                    a.indisunique,
-                    a.indisprimary,
-                    c.relname index_name,
-                    unnest(a.indkey) index_num
-               FROM pg_index a,
-                    pg_class b,
-                    pg_class c,
-                    pg_namespace d
-              WHERE b.relname=tname
-                AND b.relnamespace=d.oid
-                AND d.nspname=sname
-                AND b.oid=a.indrelid
-                AND a.indexrelid=c.oid
-           ) a,
-           pg_attribute b
-     WHERE a.indrelid = b.attrelid
-       AND a.index_num = b.attnum
-       AND b.attname = cname
-  ORDER BY a.index_name,
-           a.index_num;
-
-  RETURN FOUND;
-  EXCEPTION WHEN OTHERS THEN
-    perform _pgr_onError( true, reportErrs, fnName,
-    'Error when checking for the postgres system attributes', SQLERR);
-    RETURN FALSE;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(tab text, col text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    sname text;
-    tname text;
-    cname text;
-    pkey text;
-    value boolean;
-BEGIN
-    SELECT * into naming FROM _pgr_getTableName(tab, 0, fnName);
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    SELECT * into cname from _pgr_getColumnName(sname, tname, col, 0, fnName) ;
-    IF cname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    select * into value  from _pgr_isColumnIndexed(sname, tname, cname, reportErrs, fnName);
-    return value;
-END
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-create or replace function _pgr_quote_ident(idname text)
-    returns text as
-$body$
-declare
-    t text[];
-    pgver text;
-
-begin
-    pgver := regexp_replace(version(), E'^PostgreSQL ([^ ]+)[ ,].*$', E'\\1');
-
-    if _pgr_versionless(pgver, '9.2') then
-        select into t array_agg(quote_ident(term)) from
-            (select nullif(unnest, '') as term
-               from unnest(string_to_array(idname, '.'))) as foo;
-    else
-        select into t array_agg(quote_ident(term)) from
-            (select unnest(string_to_array(idname, '.', '')) as term) as foo;
-    end if;
-    return array_to_string(t, '.');
-end;
-$body$
-language plpgsql immutable;
-
-
-CREATE OR REPLACE FUNCTION _pgr_versionless(v1 text, v2 text)
-  RETURNS boolean AS
-$BODY$
-
-
-declare
-    v1a text[];
-    v2a text[];
-    nv1 integer;
-    nv2 integer;
-    ne1 integer;
-    ne2 integer;
-
-begin
-    -- separate components into an array, like:
-    -- '2.1.0-beta3dev'  =>  {2,1,0,beta3dev}
-    v1a := regexp_matches(v1, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-    v2a := regexp_matches(v2, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-
-    -- convert modifiers to numbers for comparison
-    -- we do not delineate between alpha1, alpha2, alpha3, etc
-    ne1 := case when v1a[4] is null or v1a[4]='' then 5
-                when v1a[4] ilike 'rc%' then 4
-                when v1a[4] ilike 'beta%' then 3
-                when v1a[4] ilike 'alpha%' then 2
-                when v1a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    ne2 := case when v2a[4] is null or v2a[4]='' then 5
-                when v2a[4] ilike 'rc%' then 4
-                when v2a[4] ilike 'beta%' then 3
-                when v2a[4] ilike 'alpha%' then 2
-                when v2a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    nv1 := v1a[1]::integer * 10000 +
-           coalesce(v1a[2], '0')::integer * 1000 +
-           coalesce(v1a[3], '0')::integer *  100 + ne1;
-    nv2 := v2a[1]::integer * 10000 +
-           coalesce(v2a[2], '0')::integer * 1000 +
-           coalesce(v2a[3], '0')::integer *  100 + ne2;
-
-    --raise notice 'nv1: %, nv2: %, ne1: %, ne2: %', nv1, nv2, ne1, ne2;
-
-    return nv1 < nv2;
-end;
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-create or replace function _pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_startpoint(st_geometryn(g,1));
-    else
-        return st_startpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function _pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_endpoint(st_geometryn(g,1));
-    else
-        return st_endpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_parameter_check(fn text, sql text, big boolean default false)
-  RETURNS bool AS
-  $BODY$
-
-  DECLARE
-  rec record;
-  rec1 record;
-  has_rcost boolean;
-  safesql text;
-  BEGIN
-    IF (big) THEN
-       RAISE EXCEPTION 'This function is for old style functions';
-    END IF;
-
-    -- checking query is executable
-    BEGIN
-      safesql =  'select * from ('||sql||' ) AS __a__ limit 1';
-      execute safesql into rec;
-      EXCEPTION
-        WHEN OTHERS THEN
-            RAISE EXCEPTION 'Could not execute query please verify syntax of: '
-              USING HINT = sql;
-    END;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('dijkstra','astar') THEN
-        BEGIN
-          execute 'select id,source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: id, source, target, cost';
-        END;
-        execute 'select pg_typeof(id)::text as id_type, pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.id_type in ('integer'::text))
-              AND (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Error, columns ''source'', ''target'' must be of type int4, ''cost'' must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    IF fn IN ('astar') THEN
-        BEGIN
-          execute 'select x1,y1,x2,y2  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: x1,y1, x2,y2';
-        END;
-        execute 'select pg_typeof(x1)::text as x1_type, pg_typeof(y1)::text as y1_type, pg_typeof(x2)::text as x2_type, pg_typeof(y2)::text as y2_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.x1_type = 'double precision'::text)
-              AND (rec.y1_type = 'double precision'::text)
-              AND (rec.x2_type = 'double precision'::text)
-              AND (rec.y2_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Columns: x1, y1, x2, y2 must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('johnson') THEN
-        BEGIN
-          execute 'select source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING HINT = 'Please veryfy the column names: id, source, target, cost',
-                         ERRCODE = 'XX000';
-        END;
-
-        execute 'select pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Support for source,target columns only of type: integer. Support for Cost: double precision'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    -- Checking the data types of the optional reverse_cost";
-    has_rcost := false;
-    IF fn IN ('johnson','dijkstra','astar') THEN
-      BEGIN
-        execute 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||safesql||' ) AS __b__ limit 1 ' into rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-            return has_rcost;
-      END;
-      if (has_rcost) then
-        IF (big) then
-           IF  not (rec1.rev_type in ('bigint'::text, 'integer'::text, 'smallint'::text, 'double precision'::text, 'real'::text)) then
-             RAISE EXCEPTION 'Illegar type in optional parameter reverse_cost.'
-             USING ERRCODE = 'XX000';
-           END IF;
-        ELSE -- Version 2.0.0 is more restrictive
-           IF (rec1.rev_type != 'double precision') then
-             RAISE EXCEPTION 'Illegal type in optional parameter reverse_cost, must be of type float8'
-             USING ERRCODE = 'XX000';
-           END IF;
-        END IF;
-      end if;
-      return true;
-    END IF;
-    -- just for keeps
-    return true;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_onError(
-  IN errCond boolean,  -- true there is an error
-  IN reportErrs int,   -- 0, 1 or 2
-  IN fnName text,      -- function name that generates the error
-  IN msgerr text,      -- error message
-  IN hinto text default 'No hint', -- hint help
-  IN msgok text default 'OK')      -- message if everything is ok
-  RETURNS void AS
-$BODY$
-BEGIN
-  if errCond=true then
-     if reportErrs=0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-     else
-       if reportErrs = 2 then
-         raise notice '----> PGR ERROR in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-         raise raise_exception;
-       else
-         raise notice '----> PGR NOTICE in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-       end if;
-     end if;
-  else
-       raise debug 'PGR ----> %: %',fnName,msgok;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_msg(IN msgKind int, IN fnName text, IN msg text default '---->OK')
-  RETURNS void AS
-$BODY$
-BEGIN
-  if msgKind = 0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msg;
-  else
-       raise notice '----> PGR NOTICE in %: %',fnName,msg;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(sname text, tname text, cname text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    EXECUTE 'select data_type  from information_schema.columns '
-            || 'where table_name = '||quote_literal(tname)
-                 || ' and table_schema=' || quote_literal(sname)
-                 || ' and column_name='||quote_literal(cname)
-       into ctype;
-    err = ctype is null;
-    perform _pgr_onError(err, reportErrs, fnName,
-            'Type of Column '|| cname ||' not found',
-            'Check your column name',
-            'OK: Type of Column '|| cname || ' is ' || ctype);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(tab text, col text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-    select * into cname from _pgr_getColumnName(tab,col,reportErrs, fnName) ;
-    select * into ctype from _pgr_getColumnType(sname,tname,cname,reportErrs, fnName);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_get_statement(o_sql text)
-RETURNS text AS
-$BODY$
-DECLARE
-sql TEXT;
-BEGIN
-    EXECUTE 'SELECT statement FROM pg_prepared_statements WHERE name ='  || quote_literal(o_sql) || ' limit 1 ' INTO sql;
-    IF (sql IS NULL) THEN
-      RETURN   o_sql;
-    ELSE
-      RETURN  regexp_replace(sql, '(.)* as ', '', 'i');
-    END IF;
-END
-$BODY$
-LANGUAGE plpgsql STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_checkVertTab(vertname text, columnsArr  text[],
-    IN reportErrs int default 1, IN fnName text default '_pgr_checkVertTab',
-    OUT sname text,OUT vname text)
-RETURNS record AS
-$BODY$
-DECLARE
-    cname text;
-    colname text;
-    naming record;
-    debuglevel text;
-    err  boolean;
-    msgKind int;
-
-BEGIN
-    msgKind = 0; -- debug_
-    execute 'show client_min_messages' into debuglevel;
-
-    perform _pgr_msg(msgKind, fnName, 'Checking table ' || vertname || ' exists');
-       select * from _pgr_getTableName(vertname, 0, fnName) into naming;
-       sname=naming.sname;
-       vname=naming.tname;
-       err = sname is NULL or vname is NULL;
-    perform _pgr_onError( err, 2, fnName,
-          'Vertex Table: ' || vertname || ' not found',
-          'Please create ' || vertname || ' using  _pgr_createTopology() or pgr_createVerticesTable()',
-          'Vertex Table: ' || vertname || ' found');
-
-
-    perform _pgr_msg(msgKind, fnName, 'Checking columns of ' || vertname);
-      FOREACH cname IN ARRAY columnsArr
-      loop
-         select _pgr_getcolumnName(vertname, cname, 0, fnName) into colname;
-         if colname is null then
-           perform _pgr_msg(msgKind, fnName, 'Adding column ' || cname || ' in ' || vertname);
-           set client_min_messages  to warning;
-                execute 'ALTER TABLE '||_pgr_quote_ident(vertname)||' ADD COLUMN '||cname|| ' integer';
-           execute 'set client_min_messages  to '|| debuglevel;
-           perform _pgr_msg(msgKind, fnName);
-         end if;
-      end loop;
-    perform _pgr_msg(msgKind, fnName, 'Finished checking columns of ' || vertname);
-
-    perform _pgr_createIndex(vertname , 'id' , 'btree', reportErrs, fnName);
- END
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(
-    sname text, tname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    debuglevel text;
-    naming record;
-    tabname text;
-    query text;
-    msgKind int;
-BEGIN
-  msgKind = 0; -- debug_
-
-  execute 'show client_min_messages' into debuglevel;
-  tabname=_pgr_quote_ident(sname||'.'||tname);
-  perform _pgr_msg(msgKind, fnName, 'Checking ' || colname || ' column in ' || tabname || ' is indexed');
-    IF (_pgr_isColumnIndexed(sname,tname,colname, 0, fnName)) then
-       perform _pgr_msg(msgKind, fnName);
-    else
-      if indext = 'gist' then
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using gist('||quote_ident(colname)||')';
-      else
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using btree('||quote_ident(colname)||')';
-      end if;
-      perform _pgr_msg(msgKind, fnName, 'Adding index ' || tabname || '_' ||  colname || '_idx');
-      perform _pgr_msg(msgKind, fnName, ' Using ' ||  query);
-      set client_min_messages  to warning;
-      BEGIN
-        execute query;
-        EXCEPTION WHEN others THEN
-          perform _pgr_onError( true, reportErrs, fnName,
-            'Could not create index on:' || colname, SQLERRM);
-      END;
-      execute 'set client_min_messages  to '|| debuglevel;
-      perform _pgr_msg(msgKind, fnName);
-    END IF;
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(tabname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    naming record;
-    sname text;
-    tname text;
-
-BEGIN
-    select * from _pgr_getTableName(tabname, 2, fnName)  into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    execute _pgr_createIndex(sname, tname, colname, indext, reportErrs, fnName);
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pointToId(
-    point geometry,
-    tolerance double precision,
-    vertname text,
-    srid integer)
-
-  RETURNS bigint AS
-$BODY$
-DECLARE
-    rec record;
-    pid bigint;
-
-BEGIN
-    EXECUTE 'SELECT ST_Distance(
-        the_geom,
-        ST_GeomFromText(ST_AsText('
-                || quote_literal(point::text)
-                || '),'
-            || srid ||')) AS d, id, the_geom
-    FROM '||_pgr_quote_ident(vertname)||'
-    WHERE ST_DWithin(
-        the_geom,
-        ST_GeomFromText(
-            ST_AsText(' || quote_literal(point::text) ||'),
-            ' || srid || '),' || tolerance||')
-    ORDER BY d
-    LIMIT 1' INTO rec ;
-    IF rec.id IS NOT NULL THEN
-        pid := rec.id;
-    ELSE
-        execute 'INSERT INTO '||_pgr_quote_ident(vertname)||' (the_geom) VALUES ('||quote_literal(point::text)||')';
-        pid := lastval();
-END IF;
-
-RETURN pid;
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'many_to_many_dijkstra'
-LANGUAGE c VOLATILE;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer, OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstra(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(Many to Many)';
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraVia(
-    edges_sql TEXT,
-    via_vertices ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    strict BOOLEAN DEFAULT FALSE,
-    U_turn_on_edge BOOLEAN DEFAULT TRUE,
-
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'dijkstraVia'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_johnson(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'johnson'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_floydWarshall(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'floydWarshall'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'astarManyToMany'
-LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, normal:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to Many)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true, normal:=false) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to Many)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid ANYARRAY,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-    equicost BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'many_withPointsDD'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_withPointsDD($1, $2, ARRAY[$3]::BIGINT[], $4, $5, $6, $7, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vids anyarray,
-    distance FLOAT,
-    directed BOOLEAN DEFAULT TRUE,
-    equicost BOOLEAN DEFAULT FALSE,
-    OUT seq integer,
-    OUT from_v  bigint,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'driving_many_to_dist'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vid bigint,
-    distance FLOAT8,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq integer,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer, directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'kshortest_path'
-    LANGUAGE c STABLE STRICT;
-
--- V2 the graph is directed and there are no heap paths
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid integer, end_vid integer, k integer, has_rcost boolean)
-  RETURNS SETOF pgr_costresult3 AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated signature of pgr_ksp';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql::text, false);
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_rcost) THEN
-           -- user says that it has reverse_cost but its not true
-           RAISE EXCEPTION 'has_reverse_cost set to true but reverse_cost not found';
-         ELSE
-           -- user says that it does not have reverse_cost but it does have it
-           -- to ignore we remove reverse_cost from the query
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         END IF;
-      END IF;
-
-      RETURN query SELECT ((row_number() over()) -1)::integer  AS seq,  (path_id - 1)::integer AS id1, node::integer AS id2, edge::integer AS id3, cost
-            FROM _pgr_ksp(sql::text, start_vid, end_vid, k, TRUE, FALSE) WHERE path_id <= k;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer,
-  directed boolean default true, heap_paths boolean default false,
-  --directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  BEGIN
-         RETURN query SELECT *
-                FROM _pgr_ksp(edges_sql::text, start_vid, end_vid, k, directed, heap_paths);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsKSP(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    k INTEGER,
-
-    directed BOOLEAN DEFAULT TRUE,
-    heap_paths BOOLEAN DEFAULT FALSE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER, OUT path_id INTEGER, OUT path_seq INTEGER,
-    OUT node BIGINT, OUT edge BIGINT,
-    OUT cost FLOAT, OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'withPoints_ksp'
-    LANGUAGE c STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_unnest_matrix(matrix float8[][], OUT start_vid integer, OUT end_vid integer, out agg_cost float8)
-RETURNS SETOF record AS
-
-$body$
-DECLARE
-
-m float8[];
-
-BEGIN
-    start_vid = 1;
-    foreach m slice 1 in  ARRAY matrix
-    LOOP
-        end_vid = 1;
-        foreach agg_cost in  ARRAY m
-        LOOP
-            RETURN next;
-            end_vid = end_vid + 1;
-        END LOOP;
-        start_vid = start_vid + 1;
-    END LOOP;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_tsp(
-    matrix float8[][],
-    startpt INTEGER,
-    endpt INTEGER DEFAULT -1,
-    OUT seq INTEGER,
-    OUT id INTEGER)
-RETURNS SETOF record AS
-$body$
-DECLARE
-table_sql TEXT;
-debuglevel TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(float8[][], integer, integer)';
-
-    CREATE TEMP TABLE ___tmp2 ON COMMIT DROP AS SELECT * FROM _pgr_unnest_matrix( matrix );
-
-
-    startpt := startpt + 1;
-    IF endpt = -1 THEN endpt := startpt;
-    END IF;
-
-
-    RETURN QUERY
-    WITH
-    result AS (
-        SELECT * FROM pgr_TSP(
-        $$SELECT * FROM ___tmp2 $$,
-        startpt, endpt,
-
-        tries_per_temperature :=  500 :: INTEGER,
-        max_changes_per_temperature := 30 :: INTEGER,
-        max_consecutive_non_changes := 500 :: INTEGER,
-
-        randomize:=false)
-    )
-    SELECT (row_number() over(ORDER BY result.seq) - 1)::INTEGER AS seq, (result.node - 1)::INTEGER AS id
-
-    FROM result WHERE NOT(result.node = startpt AND result.seq != 1);
-
-    DROP TABLE ___tmp2;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-
-
-CREATE OR  REPLACE FUNCTION pgr_tsp(sql text, start_id INTEGER, end_id INTEGER default (-1))
-returns setof pgr_costResult as
-$body$
-DECLARE
-table_sql TEXT;
-rec RECORD;
-debuglevel TEXT;
-n BIGINT;
-
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(sql, integer, integer)';
-
-    table_sql := 'CREATE TEMP TABLE ___tmp ON COMMIT DROP AS ' || sql ;
-    EXECUTE table_sql;
-
-
-    BEGIN
-        EXECUTE 'SELECT id, x, y FROM ___tmp' INTO rec;
-        EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                USING ERRCODE = 'XX000',
-                HINT = 'Please verify the column names: id, x, y';
-    END;
-
-    EXECUTE
-    'SELECT
-        pg_typeof(id)::text as id_type,
-        pg_typeof(x)::text as x_type,
-        pg_typeof(y)::text as y_type FROM ___tmp' INTO rec;
-
-
-    IF NOT((rec.id_type in ('integer'::text))
-        AND (rec.x_type = 'double precision'::text)
-        AND (rec.y_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION '''id'' must be of type INTEGER, ''x'' ad ''y'' must be of type FLOAT'
-            USING ERRCODE = 'XX000';
-    END IF;
-
-    EXECUTE 'SELECT count(*) AS n FROM (' || sql || ') AS __a__' INTO rec;
-    n = rec.n;
-
-    RETURN query
-        SELECT (seq - 1)::INTEGER AS seq, node::INTEGER AS id1, node::INTEGER AS id2, cost
-        FROM pgr_eucledianTSP(sql, start_id, end_id,
-
-            tries_per_temperature :=  500 * n :: INTEGER,
-            max_changes_per_temperature := 60 * n :: INTEGER,
-            max_consecutive_non_changes := 500 * n :: INTEGER,
-
-            randomize := false) WHERE seq <= n;
-    DROP TABLE ___tmp;
-
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-create or replace function _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
-  as
-$body$
-declare
-    sql text;
-    r record;
-
-begin
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    sql := 'with nodes as (' || sqlin || ')
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j, st_distance(st_makepoint(a.x, a.y), st_makepoint(b.x, b.y)) as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i';
-
-    for r in execute sql loop
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-
-end;
-$body$
-language plpgsql stable cost 10;
-
-
-CREATE OR REPLACE FUNCTION pgr_TSP(
-    matrix_row_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'newTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_eucledianTSP(
-    coordinates_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'eucledianTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_alphashape(sql text, alpha float8 DEFAULT 0, OUT x float8, OUT y float8)
-    RETURNS SETOF record
-    AS '$libdir/libpgrouting-2.5', 'alphashape'
-    LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pointsAsPolygon(query varchar, alpha float8 DEFAULT 0)
-	RETURNS geometry AS
-	$$
-	DECLARE
-		r record;
-		geoms geometry[];
-		vertex_result record;
-		i int;
-		n int;
-		spos int;
-		q text;
-		x float8[];
-		y float8[];
-
-	BEGIN
-		geoms := array[]::geometry[];
-		i := 1;
-
-		FOR vertex_result IN EXECUTE 'SELECT x, y FROM pgr_alphashape('''|| query || ''', ' || alpha || ')'
-		LOOP
-			x[i] = vertex_result.x;
-			y[i] = vertex_result.y;
-			i := i+1;
-		END LOOP;
-
-		n := i;
-		IF n = 1 THEN
-			RAISE NOTICE 'n = 1';
-			RETURN NULL;
-		END IF;
-
-		spos := 1;
-		q := 'SELECT ST_GeometryFromText(''POLYGON((';
-		FOR i IN 1..n LOOP
-			IF x[i] IS NULL AND y[i] IS NULL THEN
-				q := q || ', ' || x[spos] || ' ' || y[spos] || '))'',0) AS geom;';
-				EXECUTE q INTO r;
-				geoms := geoms || array[r.geom];
-				q := '';
-			ELSE
-				IF q = '' THEN
-					spos := i;
-					q := 'SELECT ST_GeometryFromText(''POLYGON((';
-				END IF;
-				IF i = spos THEN
-					q := q || x[spos] || ' ' || y[spos];
-				ELSE
-					q := q || ', ' || x[i] || ' ' || y[i];
-				END IF;
-			END IF;
-		END LOOP;
-
-		RETURN ST_BuildArea(ST_Collect(geoms));
-	END;
-	$$
-	LANGUAGE 'plpgsql' VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'bd_astar'
-LANGUAGE C VOLATILE;
-
-
-
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed:=true, only_cost:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    BOOLEAN,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false);
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to Many)';
-
-
-
--- one to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to Many)';
-
-
--- bdDijkstra MANY TO MANY
-CREATE OR REPLACE FUNCTION _pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bdDijkstra'
-LANGUAGE c VOLATILE;
-
-
-
--- ONE TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- TODO directed BOOLEAN DEFAULT TRUE,  on version 3
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, false) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, true) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_vid integer,
-    target_vid integer,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_vertex'
-LANGUAGE 'c' IMMUTABLE;
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_edge'
-LANGUAGE 'c' IMMUTABLE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || edges_sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        -- no restrictions then its a dijkstra
-        RETURN query SELECT a.seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_dijkstra(new_sql, start_vid, end_vid, directed) a;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, start_vid, end_vid, directed, has_rcost, restrictions_sql);
-    RETURN;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trspViaVertices(
-    edges_sql TEXT,
-    via_vids ANYARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult3 AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            new_sql :=
-               'WITH old_sql AS (' || edges_sql || ')' ||
-                '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        RETURN query SELECT (row_number() over())::INTEGER, path_id:: INTEGER, node::INTEGER,
-            (CASE WHEN edge = -2 THEN -1 ELSE edge END)::INTEGER, cost
-            FROM pgr_dijkstraVia(new_sql, via_vids, directed, strict:=true) WHERE edge != -1;
-        RETURN;
-    END IF;
-
-
-    -- make the call without contradiction from part of the user
-    RETURN query SELECT * FROM _pgr_trspViaVertices(new_sql, via_vids::INTEGER[], directed, has_rcost, restrictions_sql);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-
-    new_sql := sql;
-    IF (has_reverse != has_reverse_cost) THEN  -- user contradiction
-        IF (has_reverse) THEN
-            -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) THEN
-        -- no restrictions then its a with points
-        RETURN query SELECT a.seq-1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_withpoints(new_sql,
-            '(SELECT 1 as pid, ' || source_eid || 'as edge_id, ' || source_pos || '::float8 as fraction)'
-            || ' UNION '
-            || '(SELECT 2, ' || target_eid || ', ' || target_pos || ')' ::TEXT,
-            -1, -2, directed) a;
-        -- WHERE node != -2;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, source_eid, source_pos, target_eid, target_pos, directed, has_reverse_cost, turn_restrict_sql);
-    RETURN;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-create or replace function _pgr_trspViaVertices(sql text, vids integer[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    lrra boolean := false;
-    seq integer := 0;
-    seq2 integer := 0;
-
-begin
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(vids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from _pgr_trsp(sql, vids[i], vids[i+1], directed, has_rcost, turn_restrict_sql) as a loop
-            -- filter out the individual path ends except the last one
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --raise notice 'rr: %', rr;
-            if rr.id3 = -1 then
-                lrr := rr;
-                lrra := true;
-            else
-                seq := seq + 1;
-                rr.seq := seq;
-                return next rr;
-            end if;
-        end loop;
-    end loop;
-
-    if lrra then
-        seq := seq + 1;
-        lrr.seq := seq;
-        return next lrr;
-    end if;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-
-----------------------------------------------------------------------------------------------------------
-
-create or replace function pgr_trspViaEdges(sql text, eids integer[], pcts float8[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    first boolean := true;
-    seq integer := 0;
-    seq2 integer :=0;
-    has_reverse BOOLEAN;
-    point_is_vertex BOOLEAN := false;
-    edges_sql TEXT;
-    f float;
-
-begin
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql := sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (NOT has_rcost) THEN
-            -- user does not want to use reverse cost column
-            edges_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    FOREACH f IN ARRAY pcts LOOP
-        IF f in (0,1) THEN
-           point_is_vertex := true;
-        END IF;
-    END LOOP;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) AND NOT point_is_vertex THEN
-        -- no restrictions then its a _pgr_withPointsVia
-        RETURN query SELECT a.seq::INTEGER, path_id::INTEGER AS id1, node::INTEGER AS id2, edge::INTEGER AS id3, cost
-        FROM _pgr_withPointsVia(edges_sql, eids, pcts, directed) a;
-        RETURN;
-    END IF;
-
-    if array_length(eids, 1) != array_length(pcts, 1) then
-        raise exception 'The length of arrays eids and pcts must be the same!';
-    end if;
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(eids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from pgr_trsp(edges_sql,
-                                  eids[i], pcts[i],
-                                  eids[i+1], pcts[i+1],
-                                  directed,
-                                  has_rcost,
-                                  turn_restrict_sql) as a loop
-            -- combine intermediate via costs when cost is split across
-            -- two parts of a segment because it stops it and
-            -- restarts the next leg also on it
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --
-            -- there are multiple condition we have to deal with
-            -- between the end of one leg and start of the next
-            -- 1. same vertex_id. edge_id=-1; drop record with edge_id=-1
-            -- means: path ends on vertex
-            -- NOTICE:  rr: (19,1,44570022,-1,0)
-            -- NOTICE:  rr: (0,2,44570022,1768045,2.89691196717448)
-            -- 2. vertex_id=-1; sum cost components
-            -- means: path end/starts with the segment
-            -- NOTICE:  rr: (11,2,44569628,1775909,9.32885885148532)
-            -- NOTICE:  rr: (0,3,-1,1775909,0.771386350984395)
-
-            --raise notice 'rr: %', rr;
-            if first then
-                lrr := rr;
-                first := false;
-            else
-                if lrr.id3 = -1 then
-                    lrr := rr;
-                elsif lrr.id3 = rr.id3 then
-                    lrr.cost := lrr.cost + rr.cost;
-                    if rr.id2 = -1 then
-                        rr.id2 := lrr.id2;
-                    end if;
-                else
-                    seq := seq + 1;
-                    lrr.seq := seq;
-                    return next lrr;
-                    lrr := rr;
-                end if;
-            end if;
-        end loop;
-    end loop;
-
-    seq := seq + 1;
-    lrr.seq := seq;
-    return next lrr;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-----------------------------
---    MANY TO MANY
-----------------------------
-
-
-CREATE OR REPLACE FUNCTION _pgr_maxflow(
-    edges_sql TEXT,
-    sources ANYARRAY,
-    targets ANYARRAY,
-    algorithm INTEGER DEFAULT 1,
-    only_flow BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'max_flow_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-
-------------------------------------
--- 3 pgr_edmondsKarp
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 2 boykov_kolmogorov
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 1 pgr_pushRelabel
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT flow
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], algorithm := 1, only_flow := true);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], $3::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, $2::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxCardinalityMatch(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'edge_disjoint_paths_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    bigint,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    IN directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_contractGraph(
-    edges_sql TEXT,
-    contraction_order BIGINT[],
-    max_cycles integer DEFAULT 1,
-    forbidden_vertices BIGINT[] DEFAULT ARRAY[]::BIGINT[],
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT type TEXT,
-    OUT id BIGINT,
-    OUT contracted_vertices BIGINT[],
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost float)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'contractGraph'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliver(
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_cell_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliver'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliverEuclidean (
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliverEuclidean'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_vrpOneDepot(
-    TEXT, -- customers_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_sql
-    INTEGER, -- depot_id
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-orders_sql TEXT;
-trucks_sql TEXT;
-matrix_sql TEXT;
-final_sql TEXT;
-BEGIN
-
-    orders_sql = $$WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    pickups AS (
-        SELECT id, x AS p_x, y AS p_y, open_time AS p_open, close_time AS p_close, service_time AS p_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vrp_orders.id AS id, order_unit AS demand, pickups.id AS p_node_id, p_x, p_y, p_open, p_close, p_service,
-    vrp_orders.id AS d_node_id, x AS d_x, y AS d_y, open_time AS d_open, close_time AS d_close, service_time AS d_service
-    FROM vrp_orders, pickups
-    WHERE vrp_orders.id != $$ || $4;
-
-
-    trucks_sql = $$ WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    vrp_vehicles AS ($$ || $2 || $$ ),
-    starts AS (
-        SELECT id AS start_node_id, x AS start_x, y AS start_y, open_time AS start_open, close_time AS start_close, service_time AS start_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vehicle_id AS id, capacity, starts.* FROM vrp_vehicles, starts;
-    $$;
-
-    final_sql = '
-    SELECT * FROM _pgr_pickDeliver(
-            $$' || orders_sql || '$$,
-            $$' || trucks_sql || '$$,
-            $$' || $3 || '$$,
-            max_cycles := 2,
-            initial_sol := 4 ); ';
-
-    RAISE DEBUG '%', orders_sql;
-    RAISE DEBUG '%', trucks_sql;
-    RAISE DEBUG '%', $3;
-    RAISE DEBUG '%', final_sql;
-
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
------------------------------------------------------------------------
--- Core function for vrp with sigle depot computation
--- See README for description
------------------------------------------------------------------------
---
---
-
-create or replace function pgr_vrpOneDepot(
-	order_sql text,
-	vehicle_sql text,
-	cost_sql text,
-	depot_id integer,
-
-	OUT oid integer,
-	OUT opos integer,
-	OUT vid integer,
-	OUT tarrival integer,
-	OUT tdepart integer)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT order_id::INTEGER, stop_seq::INTEGER, vehicle_id::INTEGER, arrival_time::INTEGER, departure_time::INTEGER
-    FROM _pgr_vrpOneDepot($1, $2,
-       '
-            SELECT src_id AS start_vid, dest_id AS end_vid, traveltime AS agg_cost FROM ('||$3||') AS a
-       ',
-        $4
-    ) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_gsoc_vrppdtw(
-    customers_sql TEXT,
-    max_vehicles INTEGER,
-    capacity FLOAT,
-    speed FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-
-    OUT seq INTEGER,
-    OUT vehicle_id INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT stop_id BIGINT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-    orders_sql TEXT;
-    vehicles_sql TEXT;
-    final_sql TEXT;
-BEGIN
-    orders_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        pickups AS (
-            SELECT id, demand, x as p_x, y as p_y, opentime as p_open, closetime as p_close, servicetime as p_service
-            FROM  customer_data WHERE pindex = 0 AND id != 0
-        ),
-        deliveries AS (
-            SELECT pindex AS id, x as d_x, y as d_y, opentime as d_open, closetime as d_close, servicetime as d_service
-            FROM  customer_data WHERE dindex = 0 AND id != 0
-        )
-        SELECT * FROM pickups JOIN deliveries USING(id) ORDER BY pickups.id
-    $$;
-
-    vehicles_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ )
-        SELECT id, x AS start_x, y AS start_y,
-            opentime AS start_open, closetime AS start_close, $$ ||
-            capacity || $$ AS capacity, $$ || max_vehicles || $$ AS number, $$ || speed || $$ AS speed
-            FROM customer_data WHERE id = 0 LIMIT 1
-        $$;
---  seq | vehicle_id | vehicle_seq | stop_id | travel_time | arrival_time | wait_time | service_time | departure_time
-    final_sql = $$ WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        p_deliver AS (SELECT * FROM _pgr_pickDeliverEuclidean('$$ || orders_sql || $$',  '$$ || vehicles_sql || $$',  1, $$ || max_cycles || $$ )),
-        picks AS (SELECT p_deliver.*, pindex, dindex, id AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 2)),
-        delivers AS (SELECT p_deliver.*, pindex, dindex, dindex AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 3)),
-        depots AS (SELECT p_deliver.*, 0 as pindex, 0 as dindex, 0 AS the_id FROM p_deliver WHERE (stop_type IN (-1,1,6))),
-        the_union AS (SELECT * FROM picks UNION SELECT * FROM delivers UNION SELECT * from depots)
-
-        SELECT (row_number() over(ORDER BY a.seq))::INTEGER, vehicle_seq, a.stop_seq, the_id::BIGINT, a.travel_time, a.arrival_time, a.wait_time, a.service_time, a.departure_time
-        FROM (SELECT * FROM the_union) AS a ORDER BY a.seq
-        $$;
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-CREATE OR REPLACE FUNCTION pgr_gsoc_vrppdtw(
-    sql text,
-    vehicle_num INTEGER,
-    capacity INTEGER
-)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-customers_sql TEXT;
-BEGIN
-    RETURN query
-         SELECT a.seq, vehicle_id::INTEGER AS id1, stop_id::INTEGER AS id2, departure_time AS cost
-        FROM _pgr_gsoc_vrppdtw($1, $2, $3, 1, 30) AS a WHERE vehicle_id NOT IN (-2);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION _pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN,
-    driving_side CHAR,
-    details BOOLEAN,
-
-    only_cost BOOLEAN DEFAULT false, -- gets path
-    normal BOOLEAN DEFAULT true, -- false for many to onu
-
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'withPoints'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], ARRAY[$4]::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], ARRAY[$4]::bigint[], $5, $6, $7, FALSE, FALSE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], $4::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], $4::BIGINT[], $5,  $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION  _pgr_withPointsVia(
-    sql text,
-    via_edges bigint[],
-    fraction float[],
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  has_rcost boolean;
-  sql_new_vertices text := ' ';
-  sql_on_vertex text;
-  v_union text := ' ';
-  dummyrec record;
-  rec1 record;
-  via_vertices int[];
-  sql_safe text;
-  new_edges text;
-  BEGIN
-     BEGIN
-        sql_safe = 'SELECT id, source, target, cost, reverse_cost FROM ('|| sql || ') AS __a';
-
-        EXECUTE 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||sql_safe||' ) AS __b__ limit 1 ' INTO rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-     END;
-
-
-      IF array_length(via_edges, 1) != array_length(fraction, 1) then
-        RAISE EXCEPTION 'The length of via_edges is different of length of via_edges';
-      END IF;
-
-      FOR i IN 1 .. array_length(via_edges, 1)
-      LOOP
-          IF fraction[i] = 0 THEN
-              sql_on_vertex := 'SELECT source FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.source;
-          ELSE IF fraction[i] = 1 THEN
-              sql_on_vertex := 'SELECT target FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.target;
-          ELSE
-              via_vertices[i] = -i;
-              IF has_rcost THEN
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost,
-                              reverse_cost * (1 - ' || fraction[i] || ')  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost,
-                              reverse_cost *  ' || fraction[i] || '  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' where id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               ELSE
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               END IF;
-          END IF;
-          END IF;
-     END LOOP;
-
-     IF sql_new_vertices = ' ' THEN
-         new_edges := sql;
-     ELSE
-         IF has_rcost THEN
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost,
-                         lead(cost) OVER w  - cost AS reverse_cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL),
-                   second_part AS ( SELECT * FROM (SELECT id, lead(source) OVER w  AS source, source as target,
-                         reverse_cost - lead(reverse_cost) OVER w  AS cost,
-                         reverse_cost - lead(reverse_cost) OVER w  AS reverse_cost
-                      FROM  the_union  WHERE target > 0 and reverse_cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY reverse_cost ASC) ) as n2
-                      WHERE source IS NOT NULL),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part)
-                             UNION
-                       (SELECT * FROM second_part) ) _union )
-                  SELECT *  FROM more_union';
-         ELSE
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL ),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part) ) _union )
-                  SELECT *  FROM more_union';
-          END IF;
-      END IF;
-
- -- raise notice '%', new_edges;
-     sql_new_vertices := sql_new_vertices || v_union || ' (' || sql || ')';
-     RETURN query SELECT *
-         FROM pgr_dijkstraVia(new_edges, via_vertices, directed, has_rcost);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_lineGraph(
-    TEXT, -- edges_sql
-    directed BOOLEAN DEFAULT true,
-    OUT seq INTEGER,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost FLOAT,
-    OUT reverse_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'lineGraph'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_connectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'connectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_strongComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'strongComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_biconnectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the edge in the component
-    OUT n_seq INTEGER,          -- nth_seq of the edge in the component
-    OUT edge BIGINT)            -- the number of the edge
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'biconnectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_articulationPoints(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'articulationPoints'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bridges(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT edge BIGINT)            -- the number of the edge 
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bridges'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createtopology(edge_table text, tolerance double precision,
-		   the_geom text default 'the_geom', id text default 'id',
-		   source text default 'source', target text default 'target',rows_where text default 'true',
-		   clean boolean default FALSE)
-RETURNS VARCHAR AS
-$BODY$
-
-DECLARE
-    points record;
-    sridinfo record;
-    source_id bigint;
-    target_id bigint;
-    totcount bigint;
-    rowcount bigint;
-    srid integer;
-    sql text;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    notincluded integer;
-    i integer;
-    naming record;
-    info record;
-    flag boolean;
-    query text;
-    idtype text;
-    gtype text;
-    sourcetype text;
-    targettype text;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-    msgKind int;
-    emptied BOOLEAN;
-
-BEGIN
-    msgKind = 1; -- notice
-    fnName = 'pgr_createTopology';
-    raise notice 'PROCESSING:';
-    raise notice 'pgr_createTopology(''%'', %, ''%'', ''%'', ''%'', ''%'', rows_where := ''%'', clean := %)',edge_table,tolerance,the_geom,id,source,target,rows_where, clean;
-    execute 'show client_min_messages' into debuglevel;
-
-
-    raise notice 'Performing checks, please wait .....';
-
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-        sname=naming.sname;
-        tname=naming.tname;
-        tabname=sname||'.'||tname;
-        vname=tname||'_vertices_pgr';
-        vertname= sname||'.'||vname;
-        rows_where = ' AND ('||rows_where||')';
-      raise DEBUG '     --> OK';
-
-
-      raise debug 'Checking column names in edge table';
-        select * into idname     from _pgr_getColumnName(sname, tname,id,2,fnName);
-        select * into sourcename from _pgr_getColumnName(sname, tname,source,2,fnName);
-        select * into targetname from _pgr_getColumnName(sname, tname,target,2,fnName);
-        select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2,fnName);
-
-
-        err = sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname;
-        perform _pgr_onError( err, 2, fnName,
-               'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-	       'Column names are OK');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking column types in edge table';
-        select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-        select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-        select * into idtype from _pgr_getColumnType(sname,tname,idname,1, fnName);
-
-        err = idtype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column id:'|| idname, ' Expected type of '|| idname || ' is integer,smallint or bigint but '||idtype||' was found');
-
-        err = sourcetype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column source:'|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-        err = targettype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column target:'|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or bigint but '||targettype||' was found');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         raise debug '%',query;
-         EXECUTE query INTO sridinfo;
-
-         err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-         perform _pgr_onError(err, 2, fnName,
-	     'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-
-         srid := sridinfo.srid;
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking and creating indices in edge table';
-        perform _pgr_createIndex(sname, tname , idname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-
-        gname=quote_ident(gname);
-        idname=quote_ident(idname);
-        sourcename=quote_ident(sourcename);
-        targetname=quote_ident(targetname);
-      raise DEBUG '     --> OK';
-
-
-
-
-
-    BEGIN
-        -- issue #193 & issue #210 & #213
-        -- this sql is for trying out the where clause
-        -- the select * is to avoid any column name conflicts
-        -- limit 1, just try on first record
-        -- if the where clasuse is ill formed it will be caught in the exception
-        sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-        EXECUTE sql into dummyRec;
-        -- end
-
-        -- if above where clasue works this one should work
-        -- any error will be caught by the exception also
-        sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NOT NULL AND '||
-	    idname||' IS NOT NULL)=false '||rows_where;
-        EXECUTE SQL  into notincluded;
-
-        if clean then
-            raise debug 'Cleaning previous Topology ';
-               execute 'UPDATE ' || _pgr_quote_ident(tabname) ||
-               ' SET '||sourcename||' = NULL,'||targetname||' = NULL';
-        else
-            raise debug 'Creating topology for edges with non assigned topology';
-            if rows_where=' AND (true)' then
-                rows_where=  ' and ('||quote_ident(sourcename)||' is null or '||quote_ident(targetname)||' is  null)';
-            end if;
-        end if;
-        -- my thoery is that the select Count(*) will never go through here
-        EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-             RAISE NOTICE '%',sql;
-             RETURN 'FAIL';
-    END;
-
-    BEGIN
-         raise DEBUG 'initializing %',vertname;
-         execute 'select * from _pgr_getTableName('||quote_literal(vertname)
-                                                  || ',0,' || quote_literal(fnName) ||' )' into naming;
-         emptied = false;
-         set client_min_messages  to warning;
-         IF sname=naming.sname AND vname=naming.tname  THEN
-            if clean then
-                execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-                execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-                emptied = true;
-            end if;
-         ELSE -- table doesn't exist
-            execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-            emptied = true;
-         END IF;
-         IF (emptied) THEN
-             execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-	         quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-             perform _pgr_createIndex(vertname , 'the_geom'::text , 'gist'::text);
-         END IF;
-         execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id"}''::text[])' into naming;
-         execute 'set client_min_messages  to '|| debuglevel;
-         raise DEBUG  '  ------>OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: something went wrong when initializing the verties table';
-             RETURN 'FAIL';
-    END;
-
-
-
-    raise notice 'Creating Topology, Please wait...';
-        rowcount := 0;
-        FOR points IN EXECUTE 'SELECT ' || idname || '::bigint AS id,'
-            || ' _pgr_StartPoint(' || gname || ') AS source,'
-            || ' _pgr_EndPoint('   || gname || ') AS target'
-            || ' FROM '  || _pgr_quote_ident(tabname)
-            || ' WHERE ' || gname || ' IS NOT NULL AND ' || idname||' IS NOT NULL '||rows_where
-        LOOP
-
-            rowcount := rowcount + 1;
-            IF rowcount % 1000 = 0 THEN
-                RAISE NOTICE '% edges processed', rowcount;
-            END IF;
-
-
-            source_id := _pgr_pointToId(points.source, tolerance,vertname,srid);
-            target_id := _pgr_pointToId(points.target, tolerance,vertname,srid);
-            BEGIN
-                sql := 'UPDATE ' || _pgr_quote_ident(tabname) ||
-                    ' SET '||sourcename||' = '|| source_id::text || ','||targetname||' = ' || target_id::text ||
-                    ' WHERE ' || idname || ' =  ' || points.id::text;
-
-                IF sql IS NULL THEN
-                    RAISE NOTICE 'WARNING: UPDATE % SET source = %, target = % WHERE % = % ', tabname, source_id::text, target_id::text, idname,  points.id::text;
-                ELSE
-                    EXECUTE sql;
-                END IF;
-                EXCEPTION WHEN OTHERS THEN
-                    RAISE NOTICE '%', SQLERRM;
-                    RAISE NOTICE '%',sql;
-                    RETURN 'FAIL';
-            end;
-        END LOOP;
-        raise notice '-------------> TOPOLOGY CREATED FOR  % edges', rowcount;
-        RAISE NOTICE 'Rows with NULL geometry or NULL id: %',notincluded;
-        Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname), _pgr_quote_ident(vertname);
-        raise notice '----------------------------------------------';
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_createTopology(text, double precision,text,text,text,text,text,boolean)
-IS 'args: edge_table,tolerance, the_geom:=''the_geom'',source:=''source'', target:=''target'',rows_where:=''true'' - fills columns source and target in the geometry table and creates a vertices table for selected rows';
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
-RETURNS character varying AS
-$BODY$
-
-DECLARE
-    points record;
-    seg record;
-    naming record;
-    sridinfo record;
-    srid integer;
-    ecnt integer;
-    vertname text;
-    sname text;
-    tname text;
-    vname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    geotype text;
-    gname text;
-    tabName text;
-    flag boolean ;
-    query text;
-    selectionquery text;
-    i integer;
-    tot integer;
-    NumIsolated integer;
-    numdeadends integer;
-    numgaps integer;
-    NumCrossing integer;
-    numRings integer;
-    debuglevel text;
-
-
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeGraph(''%'',%,''%'',''%'',''%'',''%'',''%'')',edge_table,tolerance,the_geom,id,source,target,rows_where;
-  raise notice 'Performing checks, please wait ...';
-  execute 'show client_min_messages' into debuglevel;
-
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-    raise DEBUG '     --> OK';
-
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","cnt","chk"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET cnt=0 ,chk=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into idname     from _pgr_getColumnName(sname, tname,id,2);
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname, 2,
-                       'pgr_analyzeGraph',  'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-                       'Column names are OK');
-
-        raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-   BEGIN
-       raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         EXECUTE QUERY INTO sridinfo;
-
-         perform _pgr_onError( sridinfo IS NULL OR sridinfo.srid IS NULL,2,
-                 'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname,
-                 'SRID of '||gname||' is '||sridinfo.srid);
-
-         IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-             RAISE NOTICE ' Can not determine the srid of the geometry "%" in table %', the_geom,tabname;
-             RETURN 'FAIL';
-         END IF;
-         srid := sridinfo.srid;
-         raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM;--issue 210,211,213
-             RAISE NOTICE 'ERROR: something went wrong when checking for SRID of % in table %', the_geom,tabname;
-             RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-       raise debug 'Checking  indices in edge table';
-       perform _pgr_createIndex(tabname , idname , 'btree');
-       perform _pgr_createIndex(tabname , sourcename , 'btree');
-       perform _pgr_createIndex(tabname , targetname , 'btree');
-       perform _pgr_createIndex(tabname , gname , 'gist');
-
-       gname=quote_ident(gname);
-       sourcename=quote_ident(sourcename);
-       targetname=quote_ident(targetname);
-       idname=quote_ident(idname);
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking indices';
-          RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-        query='select count(*) from '||_pgr_quote_ident(tabname)||' where true  '||rows_where;
-        EXECUTE query into ecnt;
-        raise DEBUG '-->Rows Where condition: OK';
-        raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-            RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-            RAISE NOTICE 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-            RAISE NOTICE '%',query;
-            RETURN 'FAIL';
-    END;
-
-    selectionquery ='with
-           selectedRows as( (select '||sourcename||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||')
-                           union
-                           (select '||targetname||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||'))';
-
-
-
-
-
-   BEGIN
-       RAISE NOTICE 'Analyzing for dead ends. Please wait...';
-       query= 'with countingsource as (select a.'||sourcename||' as id,count(*) as cnts
-               from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||sourcename||')
-                     ,countingtarget as (select a.'||targetname||' as id,count(*) as cntt
-                    from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||targetname||')
-                   ,totalcount as (select id,case when cnts is null and cntt is null then 0
-                                                   when cnts is null then cntt
-                                                   when cntt is null then cnts
-                                                   else cnts+cntt end as totcnt
-                                   from ('||_pgr_quote_ident(vertname)||' as a left
-                                   join countingsource as t using(id) ) left join countingtarget using(id))
-               update '||_pgr_quote_ident(vertname)||' as a set cnt=totcnt from totalcount as b where a.id=b.id';
-       raise debug '%',query;
-       execute query;
-       query=selectionquery||'
-              SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE cnt=1 and id in (select id from selectedRows)';
-       raise debug '%',query;
-       execute query  INTO numdeadends;
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-          RAISE NOTICE 'ERROR: something went wrong when analizing for dead ends';
-          RETURN 'FAIL';
-   END;
-
-
-
-    BEGIN
-          RAISE NOTICE 'Analyzing for gaps. Please wait...';
-          query = 'with
-                   buffer as (select id,st_buffer(the_geom,'||tolerance||') as buff from '||_pgr_quote_ident(vertname)||' where cnt=1)
-                   ,veryclose as (select b.id,st_crosses(a.'||gname||',b.buff) as flag
-                   from  (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) as a
-                   join buffer as b on (a.'||gname||'&&b.buff)
-                   where '||sourcename||'!=b.id and '||targetname||'!=b.id )
-                   update '||_pgr_quote_ident(vertname)||' set chk=1 where id in (select distinct id from veryclose where flag=true)';
-          raise debug '%' ,query;
-          execute query;
-          GET DIAGNOSTICS  numgaps= ROW_COUNT;
-          raise DEBUG '     --> OK';
-          EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for gaps';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for isolated edges. Please wait...';
-        query=selectionquery|| ' SELECT count(*) FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' )  as a,
-                                                 '||_pgr_quote_ident(vertname)||' as b,
-                                                 '||_pgr_quote_ident(vertname)||' as c
-                            WHERE b.id in (select id from selectedRows) and a.'||sourcename||' =b.id
-                            AND b.cnt=1 AND a.'||targetname||' =c.id
-                            AND c.cnt=1';
-        raise debug '%' ,query;
-        execute query  INTO NumIsolated;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for isolated edges';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for ring geometries. Please wait...';
-        execute 'SELECT geometrytype('||gname||')  FROM '||_pgr_quote_ident(tabname) limit 1 into geotype;
-        IF (geotype='MULTILINESTRING') THEN
-            query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                 WHERE true  '||rows_where||' and st_isRing(st_linemerge('||gname||'))';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        ELSE query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                  WHERE true  '||rows_where||' and st_isRing('||gname||')';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        END IF;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for ring geometries';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for intersections. Please wait...';
-        query = 'select count(*) from (select distinct case when a.'||idname||' < b.'||idname||' then a.'||idname||'
-                                                        else b.'||idname||' end,
-                                                   case when a.'||idname||' < b.'||idname||' then b.'||idname||'
-                                                        else a.'||idname||' end
-                                    FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as a
-                                    JOIN (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as b
-                                    ON (a.'|| gname||' && b.'||gname||')
-                                    WHERE a.'||idname||' != b.'||idname|| '
-                                        and (a.'||sourcename||' in (b.'||sourcename||',b.'||targetname||')
-                                              or a.'||targetname||' in (b.'||sourcename||',b.'||targetname||')) = false
-                                        and st_intersects(a.'||gname||', b.'||gname||')=true) as d ';
-        raise debug '%' ,query;
-        execute query  INTO numCrossing;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for intersections';
-            RETURN 'FAIL';
-    END;
-
-
-
-
-    RAISE NOTICE '            ANALYSIS RESULTS FOR SELECTED EDGES:';
-    RAISE NOTICE '                  Isolated segments: %', NumIsolated;
-    RAISE NOTICE '                          Dead ends: %', numdeadends;
-    RAISE NOTICE 'Potential gaps found near dead ends: %', numgaps;
-    RAISE NOTICE '             Intersections detected: %',numCrossing;
-    RAISE NOTICE '                    Ring geometries: %',numRings;
-
-
-    RETURN 'OK';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_analyzeGraph(text,double precision,text,text,text,text,text) IS 'args: edge_table, tolerance,the_geom:=''the_geom'',id:=''id'',source column:=''source'', target column:=''target'' rows_where:=''true'' - creates a vertices table based on the geometry for selected rows';
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzeOneway(
-   edge_table text,
-   s_in_rules TEXT[],
-   s_out_rules TEXT[],
-   t_in_rules TEXT[],
-   t_out_rules TEXT[],
-   two_way_if_null boolean default true,
-   oneway text default 'oneway',
-   source text default 'source',
-   target text default 'target')
-  RETURNS text AS
-$BODY$
-
-
-DECLARE
-    rule text;
-    ecnt integer;
-    instr text;
-    naming record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    owname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    vertname text;
-    debuglevel text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeOneway(''%'',''%'',''%'',''%'',''%'',''%'',''%'',''%'',%)',
-		edge_table, s_in_rules , s_out_rules, t_in_rules, t_out_rules, oneway, source ,target,two_way_if_null ;
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    raise DEBUG '     --> OK';
-    EXCEPTION WHEN raise_exception THEN
-      RAISE NOTICE 'ERROR: something went wrong checking the table name';
-      RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","ein","eout"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET eout=0 ,ein=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into owname from _pgr_getColumnName(sname, tname,oneway,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,owname) or  targetname=owname, 2,
-                       '_pgr_createToplogy',  'Two columns share the same name', 'Parameter names for oneway,source and target  must be different',
-                       'Column names are OK');
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-
-
-    RAISE NOTICE 'Analyzing graph for one way street errors.';
-
-    rule := CASE WHEN two_way_if_null
-            THEN owname || ' IS NULL OR '
-            ELSE '' END;
-
-    instr := '''' || array_to_string(s_in_rules, ''',''') || '''';
-       EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-      from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-     where a.id=b.'|| sourcename;
-
-    RAISE NOTICE 'Analysis 25%% complete ...';
-
-    instr := '''' || array_to_string(t_in_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 50%% complete ...';
-
-    instr := '''' || array_to_string(s_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-        where a.id=b.'|| sourcename;
-    RAISE NOTICE 'Analysis 75%% complete ...';
-
-    instr := '''' || array_to_string(t_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 100%% complete ...';
-
-    EXECUTE 'SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE ein=0 or eout=0' INTO ecnt;
-
-    RAISE NOTICE 'Found % potential problems in directionality' ,ecnt;
-
-    RETURN 'OK';
-
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_analyzeOneway(text,TEXT[],TEXT[], TEXT[],TEXT[],boolean,text,text,text)
-IS 'args:edge_table , s_in_rules , s_out_rules, t_in_rules , t_out_rules, two_way_if_null:= true, oneway:=''oneway'',source:= ''source'',target:=''target'' - Analizes the directionality of the edges based on the rules';
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createverticestable(
-   edge_table text,
-   the_geom text DEFAULT 'the_geom'::text,
-   source text DEFAULT 'source'::text,
-   target text DEFAULT 'target'::text,
-    rows_where text DEFAULT 'true'::text
-)
-  RETURNS text AS
-$BODY$
-DECLARE
-    naming record;
-    sridinfo record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    sourcename text;
-    targetname text;
-    query text;
-    ecnt bigint;
-    srid integer;
-    sourcetype text;
-    targettype text;
-    sql text;
-    totcount integer;
-    i integer;
-    notincluded integer;
-    included integer;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-
-
-BEGIN
-  fnName = 'pgr_createVerticesTable';
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_createVerticesTable(''%'',''%'',''%'',''%'',''%'')',edge_table,the_geom,source,target,rows_where;
-  execute 'show client_min_messages' into debuglevel;
-
-  raise notice 'Performing checks, please wait .....';
-
-  RAISE DEBUG 'Checking % exists',edge_table;
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-  raise debug '--> Edge table exists: OK';
-
-  raise debug 'Checking column names';
-    select * into sourcename from _pgr_getColumnName(sname, tname,source,2, fnName);
-    select * into targetname from _pgr_getColumnName(sname, tname,target,2, fnName);
-    select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2, fnName);
-
-
-    err = sourcename in (targetname,gname) or  targetname=gname;
-    perform _pgr_onError(err, 2, fnName,
-        'Two columns share the same name', 'Parameter names for the_geom,source and target  must be different');
-  raise debug '--> Column names: OK';
-
-  raise debug 'Checking column types in edge table';
-    select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-    select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-
-
-    err = sourcetype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column source: '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-    err = targettype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column target: '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found');
-
-  raise debug '-->Column types:OK';
-
-  raise debug 'Checking SRID of geometry column';
-     query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-        || ' FROM ' || _pgr_quote_ident(tabname)
-        || ' WHERE ' || quote_ident(gname)
-        || ' IS NOT NULL LIMIT 1';
-     raise debug '%',query;
-     EXECUTE query INTO sridinfo;
-
-     err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-     perform _pgr_onError(err, 2, fnName,
-         'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-     srid := sridinfo.srid;
-  raise DEBUG '     --> OK';
-
-  raise debug 'Checking and creating Indices';
-     perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-  raise DEBUG '-->Check and create indices: OK';
-
-     gname=quote_ident(gname);
-     sourcename=quote_ident(sourcename);
-     targetname=quote_ident(targetname);
-
-
-  BEGIN
-  raise debug 'Checking Condition';
-    -- issue #193 & issue #210 & #213
-    -- this sql is for trying out the where clause
-    -- the select * is to avoid any column name conflicts
-    -- limit 1, just try on first record
-    -- if the where clasuse is ill formed it will be caught in the exception
-    sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-    EXECUTE sql into dummyRec;
-    -- end
-
-    -- if above where clasue works this one should work
-    -- any error will be caught by the exception also
-    sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NULL or '||
-		sourcename||' is null or '||targetname||' is null)=true '||rows_where;
-    raise debug '%',sql;
-    EXECUTE SQL  into notincluded;
-    EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-
-
-
-  BEGIN
-     raise DEBUG 'initializing %',vertname;
-       execute 'select * from _pgr_getTableName('||quote_literal(vertname)||',0)' into naming;
-       IF sname=naming.sname  AND vname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-       ELSE
-           set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-       END IF;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-                quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-       execute 'CREATE INDEX '||quote_ident(vname||'_the_geom_idx')||' ON '||_pgr_quote_ident(vertname)||'  USING GIST (the_geom)';
-       execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-       EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Initializing vertex table';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise notice 'Populating %, please wait...',vertname;
-       sql= 'with
-		lines as ((select distinct '||sourcename||' as id, _pgr_startpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-		                  ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||')
-			union (select distinct '||targetname||' as id,_pgr_endpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-			          ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||'))
-		,numberedLines as (select row_number() OVER (ORDER BY id) AS i,* from lines )
-		,maxid as (select id,max(i) as maxi from numberedLines group by id)
-		insert into '||_pgr_quote_ident(vertname)||'(id,the_geom)  (select id,the_geom  from numberedLines join maxid using(id) where i=maxi order by id)';
-       RAISE debug '%',sql;
-       execute sql;
-       GET DIAGNOSTICS totcount = ROW_COUNT;
-
-       sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' a, '||_pgr_quote_ident(vertname)||' b
-            where '||sourcename||'=b.id and '|| targetname||' in (select id from '||_pgr_quote_ident(vertname)||')';
-       RAISE debug '%',sql;
-       execute sql into included;
-
-
-
-       execute 'select max(id) from '||_pgr_quote_ident(vertname) into ecnt;
-       execute 'SELECT setval('||quote_literal(vertname||'_id_seq')||','||coalesce(ecnt,1)||' , false)';
-       raise notice '  ----->   VERTICES TABLE CREATED WITH  % VERTICES', totcount;
-       raise notice '                                       FOR   %  EDGES', included+notincluded;
-       RAISE NOTICE '  Edges with NULL geometry,source or target: %',notincluded;
-       RAISE NOTICE '                            Edges processed: %',included;
-       Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname),_pgr_quote_ident(vertname);
-       raise notice '----------------------------------------------';
-    END;
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_createVerticesTable(text,text,text,text,text)
-IS 'args: edge_table, the_geom:=''the_geom'',source:=''source'', target:=''target'' rows_where:=''true'' - creates a vertices table based on the source and target identifiers for selected rows';
-
-
-CREATE OR REPLACE FUNCTION pgr_nodeNetwork(edge_table text, tolerance double precision,
-			id text default 'id', the_geom text default 'the_geom', table_ending text default 'noded',
-            rows_where text DEFAULT ''::text, outall boolean DEFAULT false) RETURNS text AS
-$BODY$
-DECLARE
-	
-	p_num int := 0;
-	p_ret text := '';
-    pgis_ver_old boolean := _pgr_versionless(postgis_lib_version(), '2.1.0.0');
-    vst_line_substring text;
-    vst_line_locate_point text;
-    intab text;
-    outtab text;
-    n_pkey text;
-    n_geom text;
-    naming record;
-    sname text;
-    tname text;
-    outname text;
-    srid integer;
-    sridinfo record;
-    splits bigint;
-    touched bigint;
-    untouched bigint;
-    geomtype text;
-    debuglevel text;
-    rows_where text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_nodeNetwork(''%'', %, ''%'', ''%'', ''%'', ''%'',  %)',
-    edge_table, tolerance, id,  the_geom, table_ending, rows_where, outall;
-  raise notice 'Performing checks, please wait .....';
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',0)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-	RAISE NOTICE '-------> % not found',edge_table;
-        RETURN 'FAIL';
-    ELSE
-	RAISE DEBUG '  -----> OK';
-    END IF;
-
-    intab=sname||'.'||tname;
-    outname=tname||'_'||table_ending;
-    outtab= sname||'.'||outname;
-    rows_where = CASE WHEN length(rows_where) > 2 and not outall THEN ' AND (' || rows_where || ')' ELSE '' END;
-    rows_where = CASE WHEN length(rows_where) > 2 THEN ' WHERE (' || rows_where || ')' ELSE '' END;
-  END;
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',id,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(id)||')' INTO n_pkey;
-       IF n_pkey is NULL then
-          raise notice  'ERROR: id column "%"  not found in %',id,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',the_geom,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(the_geom)||')' INTO n_geom;
-       IF n_geom is NULL then
-          raise notice  'ERROR: the_geom  column "%"  not found in %',the_geom,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-  IF n_pkey=n_geom THEN
-	raise notice  'ERROR: id and the_geom columns have the same name "%" in %',n_pkey,intab;
-        RETURN 'FAIL';
-  END IF;
-
-  BEGIN
-       	raise DEBUG 'Checking the SRID of the geometry "%"', n_geom;
-       	EXECUTE 'SELECT ST_SRID(' || quote_ident(n_geom) || ') as srid '
-          		|| ' FROM ' || _pgr_quote_ident(intab)
-          		|| ' WHERE ' || quote_ident(n_geom)
-          		|| ' IS NOT NULL LIMIT 1' INTO sridinfo;
-       	IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-        	RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           	RETURN 'FAIL';
-       	END IF;
-       	srid := sridinfo.srid;
-       	raise DEBUG '  -----> SRID found %',srid;
-       	EXCEPTION WHEN OTHERS THEN
-           		RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           		RETURN 'FAIL';
-  END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_pkey,intab;
-      if (_pgr_isColumnIndexed(intab,n_pkey)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding  index "%_%_idx".',n_pkey,intab;
-
-	set client_min_messages  to warning;
-        execute 'create  index '||tname||'_'||n_pkey||'_idx on '||_pgr_quote_ident(intab)||' using btree('||quote_ident(n_pkey)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_geom,intab;
-      if (_pgr_iscolumnindexed(intab,n_geom)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding unique index "%_%_gidx".',intab,n_geom;
-	set client_min_messages  to warning;
-        execute 'CREATE INDEX '
-            || quote_ident(tname || '_' || n_geom || '_gidx' )
-            || ' ON ' || _pgr_quote_ident(intab)
-            || ' USING gist (' || quote_ident(n_geom) || ')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
----------------
-    BEGIN
-       raise DEBUG 'initializing %',outtab;
-       execute 'select * from _pgr_getTableName('||quote_literal(outtab)||',0)' into naming;
-       IF sname=naming.sname  AND outname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(outtab)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(outname)||','||quote_literal(n_geom)||')';
-       ELSE
-	   set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(outtab)||' (id bigserial PRIMARY KEY,old_id integer,sub_id integer,
-								source bigint,target bigint)';
-       END IF;
-       execute 'select geometrytype('||quote_ident(n_geom)||') from  '||_pgr_quote_ident(intab)||' limit 1' into geomtype;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(outname)||','||
-                quote_literal(n_geom)||','|| srid||', '||quote_literal(geomtype)||', 2)';
-       execute 'CREATE INDEX '||quote_ident(outname||'_'||n_geom||'_idx')||' ON '||_pgr_quote_ident(outtab)||'  USING GIST ('||quote_ident(n_geom)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-    END;
-----------------
-
-
-  raise notice 'Processing, please wait .....';
-
-
-    if pgis_ver_old then
-        vst_line_substring    := 'st_line_substring';
-        vst_line_locate_point := 'st_line_locate_point';
-    else
-        vst_line_substring    := 'st_linesubstring';
-        vst_line_locate_point := 'st_linelocatepoint';
-    end if;
-
---    -- First creates temp table with intersection points
-    p_ret = 'create temp table intergeom on commit drop as (
-        select l1.' || quote_ident(n_pkey) || ' as l1id,
-               l2.' || quote_ident(n_pkey) || ' as l2id,
-	       l1.' || quote_ident(n_geom) || ' as line,
-	       _pgr_startpoint(l2.' || quote_ident(n_geom) || ') as source,
-	       _pgr_endpoint(l2.' || quote_ident(n_geom) || ') as target,
-               st_intersection(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ') as geom
-        from (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l1
-             join (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l2
-             on (st_dwithin(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ', ' || tolerance || '))'||
-        'where l1.' || quote_ident(n_pkey) || ' <> l2.' || quote_ident(n_pkey)||' and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false  )';
-    raise debug '%',p_ret;
-    EXECUTE p_ret;
-
-    -- second temp table with locus (index of intersection point on the line)
-    -- to avoid updating the previous table
-    -- we keep only intersection points occurring onto the line, not at one of its ends
---    drop table if exists inter_loc;
-
---HAD TO CHANGE THIS QUERY
--- p_ret= 'create temp table inter_loc on commit drop as (
---        select l1id, l2id, ' || vst_line_locate_point || '(line,point) as locus from (
---        select DISTINCT l1id, l2id, line, (ST_DumpPoints(geom)).geom as point from intergeom) as foo
---        where ' || vst_line_locate_point || '(line,point)<>0 and ' || vst_line_locate_point || '(line,point)<>1)';
-    p_ret= 'create temp table inter_loc on commit drop as ( select * from (
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,source) as locus from intergeom)
-         union
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,target) as locus from intergeom)) as foo
-        where locus<>0 and locus<>1)';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-
-    -- index on l1id
-    create index inter_loc_id_idx on inter_loc(l1id);
-
-    -- Then computes the intersection on the lines subset, which is much smaller than full set
-    -- as there are very few intersection points
-
---- outab needs to be formally created with id, old_id, subid,the_geom, source,target
----  so it can be inmediatly be used with createTopology
-
---   EXECUTE 'drop table if exists ' || _pgr_quote_ident(outtab);
---   EXECUTE 'create table ' || _pgr_quote_ident(outtab) || ' as
-     P_RET = 'insert into '||_pgr_quote_ident(outtab)||' (old_id,sub_id,'||quote_ident(n_geom)||') (  with cut_locations as (
-           select l1id as lid, locus
-           from inter_loc
-           -- then generates start and end locus for each line that have to be cut buy a location point
-           UNION ALL
-           select i.l1id  as lid, 0 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           UNION ALL
-           select i.l1id  as lid, 1 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           order by lid, locus
-       ),
-       -- we generate a row_number index column for each input line
-       -- to be able to self-join the table to cut a line between two consecutive locations
-       loc_with_idx as (
-           select lid, locus, row_number() over (partition by lid order by locus) as idx
-           from cut_locations
-       )
-       -- finally, each original line is cut with consecutive locations using linear referencing functions
-       select l.' || quote_ident(n_pkey) || ', loc1.idx as sub_id, ' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus) as ' || quote_ident(n_geom) || '
-       from loc_with_idx loc1 join loc_with_idx loc2 using (lid) join ' || _pgr_quote_ident(intab) || ' l on (l.' || quote_ident(n_pkey) || ' = loc1.lid)
-       where loc2.idx = loc1.idx+1
-           -- keeps only linestring geometries
-           and geometryType(' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus)) = ''LINESTRING'') ';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-	GET DIAGNOSTICS splits = ROW_COUNT;
-        execute 'with diff as (select distinct old_id from '||_pgr_quote_ident(outtab)||' )
-                 select count(*) from diff' into touched;
-	-- here, it misses all original line that did not need to be cut by intersection points: these lines
-	-- are already clean
-	-- inserts them in the final result: all lines which gid is not in the res table.
-	EXECUTE 'insert into ' || _pgr_quote_ident(outtab) || ' (old_id , sub_id, ' || quote_ident(n_geom) || ')
-                ( with used as (select distinct old_id from '|| _pgr_quote_ident(outtab)||')
-		select ' ||  quote_ident(n_pkey) || ', 1 as sub_id, ' ||  quote_ident(n_geom) ||
-		' from '|| _pgr_quote_ident(intab) ||' where  '||quote_ident(n_pkey)||' not in (select * from used)' || rows_where || ')';
-	GET DIAGNOSTICS untouched = ROW_COUNT;
-
-	raise NOTICE '  Split Edges: %', touched;
-	raise NOTICE ' Untouched Edges: %', untouched;
-	raise NOTICE '     Total original Edges: %', touched+untouched;
-        RAISE NOTICE ' Edges generated: %', splits;
-	raise NOTICE ' Untouched Edges: %',untouched;
-	raise NOTICE '       Total New segments: %', splits+untouched;
-        RAISE NOTICE ' New Table: %', outtab;
-        RAISE NOTICE '----------------------------------';
-
-    drop table  if exists intergeom;
-    drop table if exists inter_loc;
-    RETURN 'OK';
-END;
-$BODY$
-    LANGUAGE 'plpgsql' VOLATILE STRICT COST 100;
-
-
-COMMENT ON FUNCTION pgr_nodeNetwork(text, double precision, text, text, text, text, boolean )
- IS  'edge_table, tolerance, id:=''id'', the_geom:=''the_geom'', table_ending:=''noded'' ';
-
-
-CREATE OR REPLACE FUNCTION pgr_labelGraph(
-                edge_table text,
-                id text default 'id',
-                source text default 'source',
-                target text default 'target',
-                subgraph text default 'subgraph',
-                rows_where text default 'true'
-        )
-        RETURNS character varying AS
-$BODY$
-
-DECLARE
-        naming record;
-        schema_name text;
-        table_name text;
-        garbage text;
-        incre integer;
-        table_schema_name text;
-        query text;
-        ecnt integer;
-        sql1 text;
-        rec1 record;
-        sql2 text;
-        rec2 record;
-        rec_count record;
-        rec_single record;
-        graph_id integer;
-        gids int [];
-
-BEGIN
-        raise notice 'Processing:';
-        raise notice 'pgr_brokenGraph(''%'',''%'',''%'',''%'',''%'',''%'')', edge_table,id,source,target,subgraph,rows_where;
-        raise notice 'Performing initial checks, please hold on ...';
-
-        Raise Notice 'Starting - Checking table ...';
-        BEGIN
-                raise debug 'Checking % table existance', edge_table;
-                execute 'select * from pgr_getTableName('|| quote_literal(edge_table) ||')' into naming;
-                schema_name = naming.sname;
-                table_name = naming.tname;
-                table_schema_name = schema_name||'.'||table_name;
-                IF schema_name is null then
-                        raise notice 'no schema';
-                        return 'FAIL';
-                else
-                        if table_name is null then
-                                raise notice 'no table';
-                                return 'FAIL';
-                        end if;
-                end if;
-        END;
-        Raise Notice 'Ending - Checking table';
-
-        Raise Notice 'Starting - Checking columns';
-        BEGIN
-                raise debug 'Checking exitance of necessary columns inside % table', edge_table;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(id) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no id column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(source) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no source column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(target) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no target column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(subgraph) ||')' into naming;
-                if naming.pgr_iscolumnintable = 't' then
-                        raise notice 'subgraph column already in the table';
-                        return 'FAIL';
-                end if;
-        END;
-        Raise Notice 'Ending - Checking columns';
-
-        Raise Notice 'Starting - Checking rows_where condition';
-        BEGIN
-                raise debug 'Checking rows_where condition';
-                query='select count(*) from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where;
-                execute query into ecnt;
-                raise debug '-->Rows where condition: OK';
-                raise debug '    --> OK';
-                EXCEPTION WHEN OTHERS THEN
-                        raise notice 'Got %', SQLERRM;
-                        Raise notice 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-                        Raise notice '%', query;
-                        return 'FAIL';
-        END;
-        Raise Notice 'Ending - Checking rows_where condition';
-
-        garbage := 'garbage001';
-        incre := 1;
-        Raise Notice 'Starting - Checking temporary column';
-        Begin
-                raise debug 'Checking Checking temporary columns existance';
-
-                While True
-                        Loop
-                                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(garbage) ||')' into naming;
-                                If naming.pgr_iscolumnintable = 't' THEN
-                                        incre := incre + 1;
-                                        garbage := 'garbage00'||incre||'';
-                                ELSE
-                                        EXIT;
-                                END IF;
-                        End Loop;
-        End;
-        Raise Notice 'Ending - Checking temporary column';
-
-        Raise Notice 'Starting - Calculating subgraphs';
-        BEGIN
-                --------- Add necessary columns ----------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(subgraph) || ' INTEGER DEFAULT -1';
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(garbage) || ' INTEGER DEFAULT 0';
-                graph_id := 1;
-
-                EXECUTE 'select count(*) as count from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where ||'' into rec_count;
-                if rec_count.count = 0 then
-                        RETURN 'rows_where condition generated 0 rows';
-                end if;
-
-                WHILE TRUE
-                        LOOP
-                                ---------- Assign the very first -1 row graph_id ----------
-                                EXECUTE 'SELECT ' || pgr_quote_ident(id) || ' AS gid FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1 LIMIT 1' INTO rec_single;
-                                EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec_single.gid || '';
-
-                                --------- Search other rows with that particular graph_id -----------
-                                WHILE TRUE
-                                        LOOP
-                                                EXECUTE 'SELECT COUNT(*) FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0' into rec_count;
-                                                ----------- The following if else will check those rows which already have entertained ------------
-                                                IF (rec_count.count > 0) THEN
-                                                        sql1 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0';
-                                                        FOR rec1 IN EXECUTE sql1
-                                                                LOOP
-                                                                        sql2 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| pgr_quote_ident(source) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(source) ||' = '|| rec1.target ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.target ||'';
-                                                                        FOR rec2 IN EXECUTE sql2
-                                                                                LOOP
-                                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec2.gid || '';
-                                                                                END LOOP;
-                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(garbage) || ' = 1 WHERE ' || pgr_quote_ident(id) || ' = ' || rec1.gid || '';
-                                                                END LOOP;
-                                                ELSE
-                                                        EXIT;
-                                                END IF;
-                                        END LOOP;
-
-                                ------ Following is to exit the while loop. 0 means no more -1 id.
-                                EXECUTE 'SELECT COUNT(*) AS count FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1' INTO rec_count;
-                                If (rec_count.count = 0) THEN
-                                        EXIT;
-                                ELSE
-                                        graph_id := graph_id + 1;
-                                END IF;
-                        END LOOP;
-
-                ----------- Drop garbage column ------------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' DROP COLUMN ' || pgr_quote_ident(garbage) ||'';
-                Raise Notice 'Successfully complicated calculating subgraphs';
-        END;
-        Raise Notice 'Ending - Calculating subgraphs';
-
-        RETURN 'OK';
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCostMatrix(
-    edges_sql TEXT,
-    points_sql TEXT,
-    pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_pid, a.end_pid, a.agg_cost
-        FROM _pgr_withPoints($1, $2, $3, $3, $4,  $5, TRUE, TRUE) AS a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
---  DIJKSTRA DMatrix
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2, $2, $3, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
---  BIDIRECTIONAL DIJKSTRA Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_astarCostMatrix(
-    edges_sql TEXT, -- XY edges sql
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2, $2, $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
---  BIDIRECTIONAL ASTAR Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdAstarCostMatrix(
-    edges_sql TEXT,
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_bdAstarCostMatrix(TEXT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCostMatrix';
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_getTableName(IN tab text,OUT sname text,OUT tname text)
-RETURNS RECORD AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getTableName: This function will no longer be soported';
-    select * from _pgr_getTableName(tab, 0, 'pgr_getTableName') into sname,tname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_getColumnName(tab text, col text)
-RETURNS text AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getColumnName: This function will no longer be soported';
-    return _pgr_getColumnName(tab,col, 0, 'pgr_getColumnName');
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    select * from _pgr_getColumnName(tab,col,0, 'pgr_isColumnInTable') into cname;
-    return  cname IS not NULL;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnIndexed(tab text, col text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnIndexed: This function will no longer be soported';
-    return  _pgr_isColumnIndexed(tab,col);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-create or replace function pgr_quote_ident(idname text)
-returns text as
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    return  _pgr_quote_ident(idname);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_versionless(v1 text, v2 text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_versionless: This function will no longer be soported';
-    return  _pgr_versionless(v1,v2);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-create or replace function pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_startPoint: This function will no longer be soported';
-    return  _pgr_startPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_endPoint: This function will no longer be soported';
-    return  _pgr_endPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspJohnson(edges_sql text)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_johnson instead';
-      has_reverse =_pgr_parameter_check('johnson', edges_sql, false);
-      sql = edges_sql;
-      IF (has_reverse) THEN
-           RAISE NOTICE 'reverse_cost column found, removing.';
-           sql = 'SELECT source, target, cost FROM (' || edges_sql || ') a';
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () - 1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_johnson(sql, TRUE);
-  END
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspWarshall(edges_sql text, directed boolean, has_rcost boolean)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_floydWarshall instead';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-      sql := edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         ELSE raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () -1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_floydWarshall(sql, directed);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_astar(edges_sql TEXT, source_id INTEGER, target_id INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated signature pgr_astar(text, integer, integer, boolean, boolean)';
-    has_reverse =_pgr_parameter_check('astar', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost, x1,y1, x2, y2 FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-    FROM pgr_astar(sql, ARRAY[$2], ARRAY[$3], directed);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    sql TEXT,
-    source_vid INTEGER,
-    target_vid INTEGER,
-    directed BOOLEAN,
-    has_reverse_cost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdAstar';
-    has_reverse =_pgr_parameter_check('astar', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdAstar(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(edges_sql TEXT, start_vid INTEGER, end_vid INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdDijkstra';
-    has_reverse =_pgr_parameter_check('dijkstra', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdDijkstra(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstraPath(
-    sql text,
-    source INTEGER,
-    targets INTEGER ARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-    RETURNS SETOF pgr_costResult3 AS
-    $BODY$
-    DECLARE
-    has_reverse BOOLEAN;
-    new_sql TEXT;
-    result pgr_costResult3;
-    tmp pgr_costResult3;
-    sseq INTEGER;
-    i INTEGER;
-    BEGIN
-        RAISE NOTICE 'Deprecated function: Use pgr_dijkstra instead.';
-        has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-        new_sql = sql;
-        IF (array_ndims(targets) != 1) THEN
-            raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-
-        IF (has_reverse != has_rcost) THEN
-            IF (has_reverse) THEN
-                new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-            ELSE
-                raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-                USING ERRCODE = 'XX000';
-            END IF;
-        END IF;
-        SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-        sseq = 0; i = 1;
-        FOR result IN
-            SELECT seq, a.end_vid::INTEGER AS id1, a.node::INTEGER AS i2, a.edge::INTEGER AS id3, cost
-            FROM pgr_dijkstra(new_sql, source, targets, directed) a ORDER BY a.end_vid, seq LOOP
-            WHILE (result.id1 != targets[i]) LOOP
-                tmp.seq = sseq;
-                tmp.id1 = targets[i];
-                IF (targets[i] = source) THEN
-                    tmp.id2 = source;
-                    tmp.cost =0;
-                ELSE
-                    tmp.id2 = 0;
-                    tmp.cost = -1;
-                END IF;
-                tmp.id3 = -1;
-                RETURN next tmp;
-                i = i + 1;
-                sseq = sseq + 1;
-            END LOOP;
-        IF (result.id1 = targets[i] AND result.id3 != -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-        IF (result.id1 = targets[i] AND result.id3 = -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.id2 = source;
-            tmp.cost = 0;
-        ELSE
-            tmp.id2 = 0;
-            tmp.cost = -1;
-        END IF;
-        tmp.id3 = -1;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstracost(
-    sql text,
-    source INTEGER,
-    targets INTEGER array,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-result pgr_costResult;
-tmp pgr_costResult;
-sseq INTEGER;
-i INTEGER;
-BEGIN
-    RAISE NOTICE 'Deprecated function. Use pgr_dijkstraCost instead.';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    new_sql = sql;
-    IF (array_ndims(targets) != 1) THEN
-        raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-        USING ERRCODE = 'XX000';
-    END IF;
-
-
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-    sseq = 0; i = 1;
-    FOR result IN
-        SELECT ((row_number() over()) -1)::INTEGER, a.start_vid::INTEGER, a.end_vid::INTEGER, agg_cost
-        FROM pgr_dijkstraCost(new_sql, source, targets, directed) a ORDER BY end_vid LOOP
-        WHILE (result.id2 != targets[i]) LOOP
-            tmp.seq = sseq;
-            tmp.id1 = source;
-            tmp.id2 = targets[i];
-            IF (targets[i] = source) THEN
-                tmp.cost = 0;
-            ELSE
-                tmp.cost = -1;
-            END IF;
-            RETURN next tmp;
-            i = i + 1;
-            sseq = sseq + 1;
-        END LOOP;
-        IF (result.id2 = targets[i]) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = source;
-        tmp.id2 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.cost = 0;
-        ELSE
-            tmp.cost = -1;
-        END IF;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-create or replace function pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    returns integer as
-$body$
-
-declare
-    rr record;
-    pct float;
-    debuglevel text;
-
-begin
-    -- find the closest edge within tol distance
-    execute 'select * from ' || _pgr_quote_ident(edges) ||
-            ' where st_dwithin(''' || pnt::text ||
-            '''::geometry, the_geom, ' || tol || ') order by st_distance(''' || pnt::text ||
-            '''::geometry, the_geom) asc limit 1' into rr;
-
-    if rr.the_geom is not null then
-        -- deal with MULTILINESTRINGS
-        if geometrytype(rr.the_geom)='MULTILINESTRING' THEN
-            rr.the_geom := ST_GeometryN(rr.the_geom, 1);
-        end if;
-
-        -- project the point onto the linestring
-        execute 'show client_min_messages' into debuglevel;
-        SET client_min_messages='ERROR';
-        pct := st_line_locate_point(rr.the_geom, pnt);
-        execute 'set client_min_messages  to '|| debuglevel;
-
-        -- return the node we are closer to
-        if pct < 0.5 then
-            return rr.source;
-        else
-            return rr.target;
-        end if;
-    else
-        -- return a failure to find an edge within tol distance
-        return -1;
-    end if;
-end;
-$body$
-  language plpgsql volatile
-  cost 5;
-
-
-----------------------------------------------------------------------------
-
-create or replace function pgr_flipedges(ga geometry[])
-    returns geometry[] as
-$body$
-
-declare
-    nn integer;
-    i integer;
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_flipEdges';
-    -- get the count of edges, and return if only one edge
-    nn := array_length(ga, 1);
-    if nn=1 then
-        return ga;
-    end if;
-
-    -- determine if first needs to be flipped
-    g := _pgr_startpoint(ga[1]);
-
-    -- if the start of the first is connected to the second then it needs to be flipped
-    if _pgr_startpoint(ga[2])=g or _pgr_endpoint(ga[2])=g then
-        ga[1] := st_reverse(ga[1]);
-    end if;
-    g := _pgr_endpoint(ga[1]);
-
-    -- now if  the end of the last edge matchs the end of the current edge we need to flip it
-    for i in 2 .. nn loop
-        if _pgr_endpoint(ga[i])=g then
-            ga[i] := st_reverse(ga[i]);
-        end if;
-        -- save the end of this edge into the last end for the next cycle
-        g := _pgr_endpoint(ga[i]);
-    end loop;
-
-    return ga;
-end;
-$body$
-    language plpgsql immutable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_texttopoints(pnts text, srid integer DEFAULT(4326))
-    returns geometry[] as
-$body$
-
-declare
-    a text[];
-    t text;
-    p geometry;
-    g geometry[];
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_textToPoints';
-    -- convert commas to space and split on ';'
-    a := string_to_array(replace(pnts, ',', ' '), ';');
-    -- convert each 'x y' into a point geometry and concattenate into a new array
-    for t in select unnest(a) loop
-        p := st_pointfromtext('POINT(' || t || ')', srid);
-        g := g || p;
-    end loop;
-
-    return g;
-end;
-$body$
-    language plpgsql immutable;
-
------------------------------------------------------------------------
-
-create or replace function pgr_pointstovids(pnts geometry[], edges text, tol float8 DEFAULT(0.01))
-    returns integer[] as
-$body$
-
-declare
-    v integer[];
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_pointsToVids';
-    -- cycle through each point and locate the nearest edge and vertex on that edge
-    for g in select unnest(pnts) loop
-        v := v || pgr_pointtoedgenode(edges, g, tol);
-    end loop;
-
-    return v;
-end;
-$body$
-    language plpgsql stable;
-
-
-create or replace function pgr_pointstodmatrix(pnts geometry[], mode integer default (0), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    r record;
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_pointsToDMatrix';
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    -- create an id for each point in the array and unnest it into a table nodes in the with clause
-    for r in with nodes as (select row_number() over()::integer as id, p from (select unnest(pnts) as p) as foo)
-        -- compute a row of distances
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j,
-                case when mode=0
-                    then st_distance(a.p, b.p)
-                    else st_distance_sphere(a.p, b.p)
-                end as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i loop
-
-        -- you must concat an array[array[]] to make dmatrix[][]
-        -- concat the row of distances to the dmatrix
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-end;
-$body$
-    language plpgsql stable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_vidstodmatrix(IN vids integer[], IN pnts geometry[], IN edges text, tol float8 DEFAULT(0.1), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    i integer;
-    j integer;
-    nn integer;
-    rr record;
-    bbox geometry;
-    t float8[];
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    -- check if the input arrays has any -1 values, maybe this whould be a raise exception
-    if vids @> ARRAY[-1] then
-    raise notice 'Some vids are undefined (-1)!';
-    dmatrix := null;
-    ids := null;
-    return;
-    end if;
-
-    ids := vids;
-
-    -- get the count of nodes
-    nn := array_length(vids,1);
-
-    -- zero out a dummy row
-    for i in 1 .. nn loop
-        t := t || 0.0::float8;
-    end loop;
-
-    -- using the dummy row, zero out the whole matrix
-    for i in 1 .. nn loop
-    dmatrix := dmatrix || ARRAY[t];
-    end loop;
-
-    for i in 1 .. nn-1 loop
-        j := i;
-        -- compute the bbox for the point needed for this row
-        select st_expand(st_collect(pnts[id]), tol) into bbox
-          from (select generate_series as id from generate_series(i, nn)) as foo;
-
-        -- compute kdijkstra() for this row
-        for rr in execute 'select * from pgr_dijkstracost($1, $2, $3, false)'
-                  using 'select id, source, target, cost from ' || edges ||
-                        ' where the_geom && ''' || bbox::text || '''::geometry'::text, vids[i], vids[i+1:nn] loop
-
-            -- TODO need to check that all node were reachable from source
-            -- I think unreachable paths between nodes returns cost=-1.0
-
-            -- populate the matrix with the cost values, remember this is symmetric
-            j := j + 1;
-            -- raise notice 'cost(%,%)=%', i, j, rr.agg_cost;
-            dmatrix[i][j] := rr.agg_cost;
-            dmatrix[j][i] := rr.agg_cost;
-        end loop;
-    end loop;
-
-end;
-$body$
-    language plpgsql stable cost 200;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_vidsToDMatrix(sql TEXT, vids  INTEGER[], dir BOOLEAN, has_rcost BOOLEAN, want_symmetric BOOLEAN)
-RETURNS float8[] AS
-$BODY$
-DECLARE
-directed BOOLEAN;
-has_reverse BOOLEAN;
-edges_sql TEXT;
-dmatrix_row float8[];
-dmatrix float8[];
-cell RECORD;
-unique_vids INTEGER[];
-total BIGINT;
-from_v BIGINT;
-to_v BIGINT;
-BEGIN
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql = sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    unique_vids :=  ARRAY(SELECT DISTINCT UNNEST(vids) ORDER BY 1);
-
-    IF want_symmetric THEN
-        directed = false;
-    ELSE
-        directed = dir;
-    END IF;
-
-    total := array_length(unique_vids, 1);
-
-    -- initializing dmatrix
-    FOR i in 1 .. total LOOP
-        dmatrix_row := dmatrix_row || '+Infinity'::float8;
-    END LOOP;
-    FOR i in 1 .. total LOOP
-    dmatrix := dmatrix || ARRAY[dmatrix_row];
-    dmatrix[i][i] = 0;
-    END LOOP;
-
-    CREATE TEMP TABLE __x___y____temp AS
-        WITH result AS
-            (SELECT unnest(unique_vids) AS vid)
-        SELECT row_number() OVER() AS idx, vid FROM result;
-
-    FOR cell IN SELECT * FROM pgr_dijkstraCostMatrix(sql, unique_vids, directed) LOOP
-        SELECT idx INTO from_v FROM __x___y____temp WHERE vid =  cell.start_vid;
-        SELECT idx INTO to_v FROM __x___y____temp WHERE vid =  cell.end_vid;
-
-        dmatrix[from_v][to_v] = cell.agg_cost;
-        dmatrix[to_v][from_v] = cell.agg_cost;
-    END LOOP;
-
-    DROP TABLE IF EXISTS __x___y____temp;
-    RETURN dmatrix;
-
-    EXCEPTION WHEN others THEN
-       DROP TABLE IF EXISTS __x___y____temp;
-       raise exception '% %', SQLERRM, SQLSTATE;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated function';
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_dijkstra(sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_dijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN) IS 'pgr_dijkstra(Deprecated signature)';
-
-
-
-
-
--- OLD SIGNATURE
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(edges_sql text, source BIGINT, distance FLOAT, directed BOOLEAN, has_rcost BOOLEAN)
-  RETURNS SETOF pgr_costresult AS
-  $BODY$
-  DECLARE
-  has_reverse BOOLEAN;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function';
-
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, FALSE);
-
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-             -- the user says it doesn't have reverse cost but its false
-             -- removing from query
-             RAISE NOTICE 'Contradiction found: has_rcost set to false but reverse_cost column found';
-             sql = 'SELECT id, source, target, cost, -1 as reverse_cost FROM (' || edges_sql || ') __q ';
-         ELSE
-             -- the user says it has reverse cost but its false
-             -- can't do anything
-             RAISE EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query SELECT seq - 1 AS seq, node::integer AS id1, edge::integer AS id2, agg_cost AS cost
-                FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maximumcardinalitymatching(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---INTERNAL FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
-------------------------
--- deprecated signatures
------------------------
-
-COMMENT ON FUNCTION pgr_astar(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_astar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdAstar( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdAstar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdDijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdDijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_dijkstra(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_dijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_drivingDistance(text,  BIGINT,  FLOAT8,  BOOLEAN,  BOOLEAN)
-    IS 'pgr_drivingDistance(Deprecated signature)';
-
-------------------------
--- Renamed /deprecated
------------------------
-COMMENT ON FUNCTION pgr_apspJohnson(TEXT)
-    IS 'pgr_apspJohnson(Renamed function) use pgr_Johnson instead';
-
-COMMENT ON FUNCTION pgr_apspWarshall(text, boolean, boolean)
-    IS 'pgr_apspWarshall(Renamed function) use pgr_floydWarshall instead';
-
-COMMENT ON FUNCTION pgr_kdijkstraPath( text, INTEGER, INTEGER ARRAY, BOOLEAN, BOOLEAN)
-    IS 'pgr_kdijkstraPath(Renamed function) use pgr_dijkstra instead';
-
-COMMENT ON FUNCTION pgr_kdijkstracost( text, INTEGER, INTEGER array, BOOLEAN, BOOLEAN)
-    IS 'pgr_kDijkstraCost(Renamed function) use pgr_dijkstraCost instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-
-
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-
-
-COMMENT ON FUNCTION pgr_gsoc_vrppdtw( text, INTEGER, INTEGER)
-    IS 'pgr_gsoc_vrppdtw(Renamed function) use pgr_pickDeliverEuclidean instead';
-
-------------------------
--- Deprecated functions
------------------------
-
-COMMENT ON FUNCTION pgr_flipedges(geometry[])
-    IS 'pgr_flipedges(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_texttopoints(text,  integer)
-    IS 'pgr_texttopoints(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstovids(pnts geometry[], edges text, tol float8)
-    IS 'pgr_pointstovids(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    IS 'pgr_pointtoedgenode(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstodmatrix(geometry[], integer)
-    IS 'pgr_pointstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidstodmatrix( integer[],  geometry[],  text, float8)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidsToDMatrix(TEXT,  INTEGER[], BOOLEAN, BOOLEAN, BOOLEAN)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-
-
-
-COMMENT ON FUNCTION pgr_getTableName(IN tab text)
-    IS 'pgr_getTableName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_getColumnName(tab text, col text)
-    IS 'pgr_getColumnName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnInTable(tab text, col text)
-    IS 'pgr_isColumnInTable(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnIndexed(tab text, col text)
-    IS 'pgr_isColumnIndexed(Deprecated function)';
-
-
-COMMENT ON FUNCTION pgr_quote_ident(idname text)
-    IS 'pgr_quote_ident(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_versionless(v1 text, v2 text)
-    IS 'pgr_versionless(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_startPoint(g geometry)
-    IS 'pgr_startPoint(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_endPoint(g geometry)
-    IS 'pgr_endPoint(Deprecated function)';
-
-
diff --git a/tools/sql-update-scripts/pgrouting--2.4.1--2.5.2.sql b/tools/sql-update-scripts/pgrouting--2.4.1--2.5.2.sql
deleted file mode 100644
index e0f7a9f..0000000
--- a/tools/sql-update-scripts/pgrouting--2.4.1--2.5.2.sql
+++ /dev/null
@@ -1,6522 +0,0 @@
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- pgRouting extension upgrade from 2.4.1 to 2.5.2
--- generated by tools/build-extension-update-files
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-\echo Use "ALTER extension pgrouting update to '2.5.2'" to load this file. \quit
-
-
--------------------------------------
--- remove functions no longer in the 2.5.2 extension
--------------------------------------
-
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_astar(text,anyarray,anyarray,boolean,integer,double precision,double precision,boolean);
-DROP FUNCTION IF EXISTS _pgr_astar(text,anyarray,anyarray,boolean,integer,double precision,double precision,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_astar(text,anyarray,bigint,boolean,integer,double precision,double precision,boolean);
-DROP FUNCTION IF EXISTS _pgr_astar(text,anyarray,bigint,boolean,integer,double precision,double precision,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_astar(text,bigint,anyarray,boolean,integer,double precision,double precision,boolean);
-DROP FUNCTION IF EXISTS _pgr_astar(text,bigint,anyarray,boolean,integer,double precision,double precision,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_astar(text,bigint,bigint,boolean,integer,double precision,double precision,boolean);
-DROP FUNCTION IF EXISTS _pgr_astar(text,bigint,bigint,boolean,integer,double precision,double precision,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_bddijkstra(text,bigint,bigint,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_bddijkstra(text,bigint,bigint,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,anyarray,bigint,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,anyarray,bigint,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,bigint,anyarray,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,bigint,anyarray,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,bigint,bigint,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,bigint,bigint,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_maxflow(text,anyarray,anyarray,text,boolean);
-DROP FUNCTION IF EXISTS _pgr_maxflow(text,anyarray,anyarray,text,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_maxflow(text,anyarray,bigint,text,boolean);
-DROP FUNCTION IF EXISTS _pgr_maxflow(text,anyarray,bigint,text,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_maxflow(text,bigint,anyarray,text,boolean);
-DROP FUNCTION IF EXISTS _pgr_maxflow(text,bigint,anyarray,text,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_maxflow(text,bigint,bigint,text,boolean);
-DROP FUNCTION IF EXISTS _pgr_maxflow(text,bigint,bigint,text,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_pickdeliver(text,integer,double precision,double precision,integer);
-DROP FUNCTION IF EXISTS _pgr_pickdeliver(text,integer,double precision,double precision,integer);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,anyarray,anyarray,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,anyarray,anyarray,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,anyarray,bigint,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,anyarray,bigint,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,bigint,anyarray,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,bigint,anyarray,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,bigint,bigint,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,bigint,bigint,boolean,character,boolean,boolean);
-
-
-------------------------------------------
---       New functions:  2.3
---    Signature change:  2.5
--- Inner query changed:  2.5
-------------------------------------------
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_edgedisjointpaths(text,bigint,bigint,boolean);
-DROP FUNCTION IF EXISTS pgr_edgedisjointpaths(text,bigint,bigint,boolean);
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_edgedisjointpaths(text,bigint,anyarray,boolean);
-DROP FUNCTION IF EXISTS pgr_edgedisjointpaths(text,bigint,anyarray,boolean);
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_edgedisjointpaths(text,anyarray,bigint,boolean);
-DROP FUNCTION IF EXISTS pgr_edgedisjointpaths(text,anyarray,bigint,boolean);
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_edgedisjointpaths(text,anyarray,anyarray,boolean);
-DROP FUNCTION IF EXISTS pgr_edgedisjointpaths(text,anyarray,anyarray,boolean);
-
-
-
-
-
-
-
-
-
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
---- pgRouting provides geospatial routing functionality.
---- http://pgrouting.org
---- copyright
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
----
---- This is free software; you can redistribute and/or modify it:
---- the terms of the GNU General Public Licence. See the COPYING file.
---- the terms of the MIT-X Licence. See the COPYING file.
----
---- The following functions have MIT-X licence:
----     pgr_version()
----     pgr_tsp(matrix float8[][], startpt integer, endpt integer DEFAULT -1, OUT seq integer, OUT id integer)
----     _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
----     pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
----
----
---- All other functions are under GNU General Public Licence.
----
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
--- WARNING: Any change in this file must be evaluated for compatibility.
---          Changes cleanly handled by postgis_upgrade.sql are fine,
---          other changes will require a bump in Major version.
---          Currently only function replaceble by CREATE OR REPLACE
---          are cleanly handled.
---
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
---  pgRouting 2.0 types
-
-
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_version()
-RETURNS TABLE(
-        "version" varchar,
-        tag varchar,
-        hash varchar,
-        branch varchar,
-        boost varchar
-    ) AS
-$BODY$
-    SELECT '2.5.2'::varchar AS version,
-        'v2.5.2'::varchar AS tag,
-        '60585f1f7'::varchar AS hash,
-        'master'::varchar AS branch,
-        '1.54.0'::varchar AS boost;
-$BODY$
-LANGUAGE sql IMMUTABLE;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getTableName(IN tab text, IN reportErrs int default 0, IN fnName text default '_pgr_getTableName', OUT sname text,OUT tname text)
-  RETURNS RECORD AS
-$$
-DECLARE
-        naming record;
-        i integer;
-        query text;
-        sn text; -- schema name
-        tn text; -- table name
-        ttype text; --table type for future use
-        err boolean;
-        debuglevel text;
-        var_types text[] = ARRAY['BASE TABLE', 'VIEW'];
-BEGIN
-
-    execute 'show client_min_messages' into debuglevel;
-
-
-    perform _pgr_msg( 0, fnName, 'Checking table ' || tab || ' exists');
-    --RAISE DEBUG 'Checking % exists',tab;
-
-    i := strpos(tab,'.');
-    IF (i <> 0) THEN
-        sn := split_part(tab, '.',1);
-        tn := split_part(tab, '.',2);
-    ELSE
-        sn := current_schema;
-        tn := tab;
-    END IF;
-
-
-   SELECT schema_name INTO sname
-   FROM information_schema.schemata WHERE schema_name = sn;
-
-    IF sname IS NOT NULL THEN -- found schema (as is)
-       SELECT table_name, table_type INTO tname, ttype
-       FROM information_schema.tables
-       WHERE
-                table_type = ANY(var_types) and
-                table_schema = sname and
-                table_name = tn ;
-        IF tname is NULL THEN
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  = ANY(var_types) and
-                table_schema = sname and
-                table_name = lower(tn) ORDER BY table_name;
-        END IF;
-    END IF;
-    IF sname is NULL or tname is NULL THEN --schema not found or table not found
-        SELECT schema_name INTO sname
-        FROM information_schema.schemata
-        WHERE schema_name = lower(sn) ;
-
-        IF sname IS NOT NULL THEN -- found schema (with lower caps)
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  =  ANY(var_types) and
-                table_schema = sname and
-                table_name= tn ;
-
-           IF tname IS NULL THEN
-                SELECT table_name, table_type INTO tname, ttype
-                FROM information_schema.tables
-                WHERE
-                    table_type  =  ANY(var_types) and
-                    table_schema = sname and
-                    table_name= lower(tn) ;
-           END IF;
-        END IF;
-    END IF;
-   err = (sname IS NULL OR tname IS NULL);
-   perform _pgr_onError(err, reportErrs, fnName, 'Table ' || tab ||' not found',' Check your table name', 'Table '|| tab || ' found');
-
-END;
-$$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(sname text, tname text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(col) into cname;
-
-    IF cname is null  THEN
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(lower(col))  into cname;
-    END if;
-
-    err = cname is null;
-
-    perform _pgr_onError(err, reportErrs, fnName,  'Column '|| col ||' not found', ' Check your column name','Column '|| col || ' found');
-    RETURN cname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(tab text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-
-    select * into cname from _pgr_getColumnName(sname,tname,col,reportErrs, fnName);
-    RETURN cname;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    select * from _pgr_getColumnName(tab,col,0, '_pgr_isColumnInTable') into cname;
-    return cname is not null;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(sname text, tname text, cname text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    pkey text;
-BEGIN
-    SELECT
-          pg_attribute.attname into pkey
-         --  format_type(pg_attribute.atttypid, pg_attribute.atttypmod)
-          FROM pg_index, pg_class, pg_attribute
-          WHERE
-                  pg_class.oid = _pgr_quote_ident(sname||'.'||tname)::regclass AND
-                  indrelid = pg_class.oid AND
-                  pg_attribute.attrelid = pg_class.oid AND
-                  pg_attribute.attnum = any(pg_index.indkey)
-                  AND indisprimary;
-
-    IF pkey=cname then
-          RETURN TRUE;
-    END IF;
-
-    SELECT a.index_name,
-           b.attname,
-           b.attnum,
-           a.indisunique,
-           a.indisprimary
-      INTO rec
-      FROM ( SELECT a.indrelid,
-                    a.indisunique,
-                    a.indisprimary,
-                    c.relname index_name,
-                    unnest(a.indkey) index_num
-               FROM pg_index a,
-                    pg_class b,
-                    pg_class c,
-                    pg_namespace d
-              WHERE b.relname=tname
-                AND b.relnamespace=d.oid
-                AND d.nspname=sname
-                AND b.oid=a.indrelid
-                AND a.indexrelid=c.oid
-           ) a,
-           pg_attribute b
-     WHERE a.indrelid = b.attrelid
-       AND a.index_num = b.attnum
-       AND b.attname = cname
-  ORDER BY a.index_name,
-           a.index_num;
-
-  RETURN FOUND;
-  EXCEPTION WHEN OTHERS THEN
-    perform _pgr_onError( true, reportErrs, fnName,
-    'Error when checking for the postgres system attributes', SQLERR);
-    RETURN FALSE;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(tab text, col text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    sname text;
-    tname text;
-    cname text;
-    pkey text;
-    value boolean;
-BEGIN
-    SELECT * into naming FROM _pgr_getTableName(tab, 0, fnName);
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    SELECT * into cname from _pgr_getColumnName(sname, tname, col, 0, fnName) ;
-    IF cname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    select * into value  from _pgr_isColumnIndexed(sname, tname, cname, reportErrs, fnName);
-    return value;
-END
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-create or replace function _pgr_quote_ident(idname text)
-    returns text as
-$body$
-declare
-    t text[];
-    pgver text;
-
-begin
-    pgver := regexp_replace(version(), E'^PostgreSQL ([^ ]+)[ ,].*$', E'\\1');
-
-    if _pgr_versionless(pgver, '9.2') then
-        select into t array_agg(quote_ident(term)) from
-            (select nullif(unnest, '') as term
-               from unnest(string_to_array(idname, '.'))) as foo;
-    else
-        select into t array_agg(quote_ident(term)) from
-            (select unnest(string_to_array(idname, '.', '')) as term) as foo;
-    end if;
-    return array_to_string(t, '.');
-end;
-$body$
-language plpgsql immutable;
-
-
-CREATE OR REPLACE FUNCTION _pgr_versionless(v1 text, v2 text)
-  RETURNS boolean AS
-$BODY$
-
-
-declare
-    v1a text[];
-    v2a text[];
-    nv1 integer;
-    nv2 integer;
-    ne1 integer;
-    ne2 integer;
-
-begin
-    -- separate components into an array, like:
-    -- '2.1.0-beta3dev'  =>  {2,1,0,beta3dev}
-    v1a := regexp_matches(v1, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-    v2a := regexp_matches(v2, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-
-    -- convert modifiers to numbers for comparison
-    -- we do not delineate between alpha1, alpha2, alpha3, etc
-    ne1 := case when v1a[4] is null or v1a[4]='' then 5
-                when v1a[4] ilike 'rc%' then 4
-                when v1a[4] ilike 'beta%' then 3
-                when v1a[4] ilike 'alpha%' then 2
-                when v1a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    ne2 := case when v2a[4] is null or v2a[4]='' then 5
-                when v2a[4] ilike 'rc%' then 4
-                when v2a[4] ilike 'beta%' then 3
-                when v2a[4] ilike 'alpha%' then 2
-                when v2a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    nv1 := v1a[1]::integer * 10000 +
-           coalesce(v1a[2], '0')::integer * 1000 +
-           coalesce(v1a[3], '0')::integer *  100 + ne1;
-    nv2 := v2a[1]::integer * 10000 +
-           coalesce(v2a[2], '0')::integer * 1000 +
-           coalesce(v2a[3], '0')::integer *  100 + ne2;
-
-    --raise notice 'nv1: %, nv2: %, ne1: %, ne2: %', nv1, nv2, ne1, ne2;
-
-    return nv1 < nv2;
-end;
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-create or replace function _pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_startpoint(st_geometryn(g,1));
-    else
-        return st_startpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function _pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_endpoint(st_geometryn(g,1));
-    else
-        return st_endpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_parameter_check(fn text, sql text, big boolean default false)
-  RETURNS bool AS
-  $BODY$
-
-  DECLARE
-  rec record;
-  rec1 record;
-  has_rcost boolean;
-  safesql text;
-  BEGIN
-    IF (big) THEN
-       RAISE EXCEPTION 'This function is for old style functions';
-    END IF;
-
-    -- checking query is executable
-    BEGIN
-      safesql =  'select * from ('||sql||' ) AS __a__ limit 1';
-      execute safesql into rec;
-      EXCEPTION
-        WHEN OTHERS THEN
-            RAISE EXCEPTION 'Could not execute query please verify syntax of: '
-              USING HINT = sql;
-    END;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('dijkstra','astar') THEN
-        BEGIN
-          execute 'select id,source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: id, source, target, cost';
-        END;
-        execute 'select pg_typeof(id)::text as id_type, pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.id_type in ('integer'::text))
-              AND (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Error, columns ''source'', ''target'' must be of type int4, ''cost'' must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    IF fn IN ('astar') THEN
-        BEGIN
-          execute 'select x1,y1,x2,y2  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: x1,y1, x2,y2';
-        END;
-        execute 'select pg_typeof(x1)::text as x1_type, pg_typeof(y1)::text as y1_type, pg_typeof(x2)::text as x2_type, pg_typeof(y2)::text as y2_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.x1_type = 'double precision'::text)
-              AND (rec.y1_type = 'double precision'::text)
-              AND (rec.x2_type = 'double precision'::text)
-              AND (rec.y2_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Columns: x1, y1, x2, y2 must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('johnson') THEN
-        BEGIN
-          execute 'select source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING HINT = 'Please veryfy the column names: id, source, target, cost',
-                         ERRCODE = 'XX000';
-        END;
-
-        execute 'select pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Support for source,target columns only of type: integer. Support for Cost: double precision'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    -- Checking the data types of the optional reverse_cost";
-    has_rcost := false;
-    IF fn IN ('johnson','dijkstra','astar') THEN
-      BEGIN
-        execute 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||safesql||' ) AS __b__ limit 1 ' into rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-            return has_rcost;
-      END;
-      if (has_rcost) then
-        IF (big) then
-           IF  not (rec1.rev_type in ('bigint'::text, 'integer'::text, 'smallint'::text, 'double precision'::text, 'real'::text)) then
-             RAISE EXCEPTION 'Illegar type in optional parameter reverse_cost.'
-             USING ERRCODE = 'XX000';
-           END IF;
-        ELSE -- Version 2.0.0 is more restrictive
-           IF (rec1.rev_type != 'double precision') then
-             RAISE EXCEPTION 'Illegal type in optional parameter reverse_cost, must be of type float8'
-             USING ERRCODE = 'XX000';
-           END IF;
-        END IF;
-      end if;
-      return true;
-    END IF;
-    -- just for keeps
-    return true;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_onError(
-  IN errCond boolean,  -- true there is an error
-  IN reportErrs int,   -- 0, 1 or 2
-  IN fnName text,      -- function name that generates the error
-  IN msgerr text,      -- error message
-  IN hinto text default 'No hint', -- hint help
-  IN msgok text default 'OK')      -- message if everything is ok
-  RETURNS void AS
-$BODY$
-BEGIN
-  if errCond=true then
-     if reportErrs=0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-     else
-       if reportErrs = 2 then
-         raise notice '----> PGR ERROR in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-         raise raise_exception;
-       else
-         raise notice '----> PGR NOTICE in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-       end if;
-     end if;
-  else
-       raise debug 'PGR ----> %: %',fnName,msgok;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_msg(IN msgKind int, IN fnName text, IN msg text default '---->OK')
-  RETURNS void AS
-$BODY$
-BEGIN
-  if msgKind = 0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msg;
-  else
-       raise notice '----> PGR NOTICE in %: %',fnName,msg;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(sname text, tname text, cname text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    EXECUTE 'select data_type  from information_schema.columns '
-            || 'where table_name = '||quote_literal(tname)
-                 || ' and table_schema=' || quote_literal(sname)
-                 || ' and column_name='||quote_literal(cname)
-       into ctype;
-    err = ctype is null;
-    perform _pgr_onError(err, reportErrs, fnName,
-            'Type of Column '|| cname ||' not found',
-            'Check your column name',
-            'OK: Type of Column '|| cname || ' is ' || ctype);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(tab text, col text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-    select * into cname from _pgr_getColumnName(tab,col,reportErrs, fnName) ;
-    select * into ctype from _pgr_getColumnType(sname,tname,cname,reportErrs, fnName);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_get_statement(o_sql text)
-RETURNS text AS
-$BODY$
-DECLARE
-sql TEXT;
-BEGIN
-    EXECUTE 'SELECT statement FROM pg_prepared_statements WHERE name ='  || quote_literal(o_sql) || ' limit 1 ' INTO sql;
-    IF (sql IS NULL) THEN
-      RETURN   o_sql;
-    ELSE
-      RETURN  regexp_replace(sql, '(.)* as ', '', 'i');
-    END IF;
-END
-$BODY$
-LANGUAGE plpgsql STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_checkVertTab(vertname text, columnsArr  text[],
-    IN reportErrs int default 1, IN fnName text default '_pgr_checkVertTab',
-    OUT sname text,OUT vname text)
-RETURNS record AS
-$BODY$
-DECLARE
-    cname text;
-    colname text;
-    naming record;
-    debuglevel text;
-    err  boolean;
-    msgKind int;
-
-BEGIN
-    msgKind = 0; -- debug_
-    execute 'show client_min_messages' into debuglevel;
-
-    perform _pgr_msg(msgKind, fnName, 'Checking table ' || vertname || ' exists');
-       select * from _pgr_getTableName(vertname, 0, fnName) into naming;
-       sname=naming.sname;
-       vname=naming.tname;
-       err = sname is NULL or vname is NULL;
-    perform _pgr_onError( err, 2, fnName,
-          'Vertex Table: ' || vertname || ' not found',
-          'Please create ' || vertname || ' using  _pgr_createTopology() or pgr_createVerticesTable()',
-          'Vertex Table: ' || vertname || ' found');
-
-
-    perform _pgr_msg(msgKind, fnName, 'Checking columns of ' || vertname);
-      FOREACH cname IN ARRAY columnsArr
-      loop
-         select _pgr_getcolumnName(vertname, cname, 0, fnName) into colname;
-         if colname is null then
-           perform _pgr_msg(msgKind, fnName, 'Adding column ' || cname || ' in ' || vertname);
-           set client_min_messages  to warning;
-                execute 'ALTER TABLE '||_pgr_quote_ident(vertname)||' ADD COLUMN '||cname|| ' integer';
-           execute 'set client_min_messages  to '|| debuglevel;
-           perform _pgr_msg(msgKind, fnName);
-         end if;
-      end loop;
-    perform _pgr_msg(msgKind, fnName, 'Finished checking columns of ' || vertname);
-
-    perform _pgr_createIndex(vertname , 'id' , 'btree', reportErrs, fnName);
- END
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(
-    sname text, tname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    debuglevel text;
-    naming record;
-    tabname text;
-    query text;
-    msgKind int;
-BEGIN
-  msgKind = 0; -- debug_
-
-  execute 'show client_min_messages' into debuglevel;
-  tabname=_pgr_quote_ident(sname||'.'||tname);
-  perform _pgr_msg(msgKind, fnName, 'Checking ' || colname || ' column in ' || tabname || ' is indexed');
-    IF (_pgr_isColumnIndexed(sname,tname,colname, 0, fnName)) then
-       perform _pgr_msg(msgKind, fnName);
-    else
-      if indext = 'gist' then
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using gist('||quote_ident(colname)||')';
-      else
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using btree('||quote_ident(colname)||')';
-      end if;
-      perform _pgr_msg(msgKind, fnName, 'Adding index ' || tabname || '_' ||  colname || '_idx');
-      perform _pgr_msg(msgKind, fnName, ' Using ' ||  query);
-      set client_min_messages  to warning;
-      BEGIN
-        execute query;
-        EXCEPTION WHEN others THEN
-          perform _pgr_onError( true, reportErrs, fnName,
-            'Could not create index on:' || colname, SQLERRM);
-      END;
-      execute 'set client_min_messages  to '|| debuglevel;
-      perform _pgr_msg(msgKind, fnName);
-    END IF;
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(tabname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    naming record;
-    sname text;
-    tname text;
-
-BEGIN
-    select * from _pgr_getTableName(tabname, 2, fnName)  into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    execute _pgr_createIndex(sname, tname, colname, indext, reportErrs, fnName);
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pointToId(
-    point geometry,
-    tolerance double precision,
-    vertname text,
-    srid integer)
-
-  RETURNS bigint AS
-$BODY$
-DECLARE
-    rec record;
-    pid bigint;
-
-BEGIN
-    EXECUTE 'SELECT ST_Distance(
-        the_geom,
-        ST_GeomFromText(ST_AsText('
-                || quote_literal(point::text)
-                || '),'
-            || srid ||')) AS d, id, the_geom
-    FROM '||_pgr_quote_ident(vertname)||'
-    WHERE ST_DWithin(
-        the_geom,
-        ST_GeomFromText(
-            ST_AsText(' || quote_literal(point::text) ||'),
-            ' || srid || '),' || tolerance||')
-    ORDER BY d
-    LIMIT 1' INTO rec ;
-    IF rec.id IS NOT NULL THEN
-        pid := rec.id;
-    ELSE
-        execute 'INSERT INTO '||_pgr_quote_ident(vertname)||' (the_geom) VALUES ('||quote_literal(point::text)||')';
-        pid := lastval();
-END IF;
-
-RETURN pid;
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'many_to_many_dijkstra'
-LANGUAGE c VOLATILE;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer, OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstra(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(Many to Many)';
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraVia(
-    edges_sql TEXT,
-    via_vertices ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    strict BOOLEAN DEFAULT FALSE,
-    U_turn_on_edge BOOLEAN DEFAULT TRUE,
-
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'dijkstraVia'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_johnson(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'johnson'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_floydWarshall(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'floydWarshall'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'astarManyToMany'
-LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, normal:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to Many)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true, normal:=false) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to Many)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid ANYARRAY,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-    equicost BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'many_withPointsDD'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_withPointsDD($1, $2, ARRAY[$3]::BIGINT[], $4, $5, $6, $7, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vids anyarray,
-    distance FLOAT,
-    directed BOOLEAN DEFAULT TRUE,
-    equicost BOOLEAN DEFAULT FALSE,
-    OUT seq integer,
-    OUT from_v  bigint,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'driving_many_to_dist'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vid bigint,
-    distance FLOAT8,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq integer,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer, directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'kshortest_path'
-    LANGUAGE c STABLE STRICT;
-
--- V2 the graph is directed and there are no heap paths
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid integer, end_vid integer, k integer, has_rcost boolean)
-  RETURNS SETOF pgr_costresult3 AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated signature of pgr_ksp';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql::text, false);
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_rcost) THEN
-           -- user says that it has reverse_cost but its not true
-           RAISE EXCEPTION 'has_reverse_cost set to true but reverse_cost not found';
-         ELSE
-           -- user says that it does not have reverse_cost but it does have it
-           -- to ignore we remove reverse_cost from the query
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         END IF;
-      END IF;
-
-      RETURN query SELECT ((row_number() over()) -1)::integer  AS seq,  (path_id - 1)::integer AS id1, node::integer AS id2, edge::integer AS id3, cost
-            FROM _pgr_ksp(sql::text, start_vid, end_vid, k, TRUE, FALSE) WHERE path_id <= k;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer,
-  directed boolean default true, heap_paths boolean default false,
-  --directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  BEGIN
-         RETURN query SELECT *
-                FROM _pgr_ksp(edges_sql::text, start_vid, end_vid, k, directed, heap_paths);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsKSP(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    k INTEGER,
-
-    directed BOOLEAN DEFAULT TRUE,
-    heap_paths BOOLEAN DEFAULT FALSE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER, OUT path_id INTEGER, OUT path_seq INTEGER,
-    OUT node BIGINT, OUT edge BIGINT,
-    OUT cost FLOAT, OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'withPoints_ksp'
-    LANGUAGE c STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_unnest_matrix(matrix float8[][], OUT start_vid integer, OUT end_vid integer, out agg_cost float8)
-RETURNS SETOF record AS
-
-$body$
-DECLARE
-
-m float8[];
-
-BEGIN
-    start_vid = 1;
-    foreach m slice 1 in  ARRAY matrix
-    LOOP
-        end_vid = 1;
-        foreach agg_cost in  ARRAY m
-        LOOP
-            RETURN next;
-            end_vid = end_vid + 1;
-        END LOOP;
-        start_vid = start_vid + 1;
-    END LOOP;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_tsp(
-    matrix float8[][],
-    startpt INTEGER,
-    endpt INTEGER DEFAULT -1,
-    OUT seq INTEGER,
-    OUT id INTEGER)
-RETURNS SETOF record AS
-$body$
-DECLARE
-table_sql TEXT;
-debuglevel TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(float8[][], integer, integer)';
-
-    CREATE TEMP TABLE ___tmp2 ON COMMIT DROP AS SELECT * FROM _pgr_unnest_matrix( matrix );
-
-
-    startpt := startpt + 1;
-    IF endpt = -1 THEN endpt := startpt;
-    END IF;
-
-
-    RETURN QUERY
-    WITH
-    result AS (
-        SELECT * FROM pgr_TSP(
-        $$SELECT * FROM ___tmp2 $$,
-        startpt, endpt,
-
-        tries_per_temperature :=  500 :: INTEGER,
-        max_changes_per_temperature := 30 :: INTEGER,
-        max_consecutive_non_changes := 500 :: INTEGER,
-
-        randomize:=false)
-    )
-    SELECT (row_number() over(ORDER BY result.seq) - 1)::INTEGER AS seq, (result.node - 1)::INTEGER AS id
-
-    FROM result WHERE NOT(result.node = startpt AND result.seq != 1);
-
-    DROP TABLE ___tmp2;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-
-
-CREATE OR  REPLACE FUNCTION pgr_tsp(sql text, start_id INTEGER, end_id INTEGER default (-1))
-returns setof pgr_costResult as
-$body$
-DECLARE
-table_sql TEXT;
-rec RECORD;
-debuglevel TEXT;
-n BIGINT;
-
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(sql, integer, integer)';
-
-    table_sql := 'CREATE TEMP TABLE ___tmp ON COMMIT DROP AS ' || sql ;
-    EXECUTE table_sql;
-
-
-    BEGIN
-        EXECUTE 'SELECT id, x, y FROM ___tmp' INTO rec;
-        EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                USING ERRCODE = 'XX000',
-                HINT = 'Please verify the column names: id, x, y';
-    END;
-
-    EXECUTE
-    'SELECT
-        pg_typeof(id)::text as id_type,
-        pg_typeof(x)::text as x_type,
-        pg_typeof(y)::text as y_type FROM ___tmp' INTO rec;
-
-
-    IF NOT((rec.id_type in ('integer'::text))
-        AND (rec.x_type = 'double precision'::text)
-        AND (rec.y_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION '''id'' must be of type INTEGER, ''x'' ad ''y'' must be of type FLOAT'
-            USING ERRCODE = 'XX000';
-    END IF;
-
-    EXECUTE 'SELECT count(*) AS n FROM (' || sql || ') AS __a__' INTO rec;
-    n = rec.n;
-
-    RETURN query
-        SELECT (seq - 1)::INTEGER AS seq, node::INTEGER AS id1, node::INTEGER AS id2, cost
-        FROM pgr_eucledianTSP(sql, start_id, end_id,
-
-            tries_per_temperature :=  500 * n :: INTEGER,
-            max_changes_per_temperature := 60 * n :: INTEGER,
-            max_consecutive_non_changes := 500 * n :: INTEGER,
-
-            randomize := false) WHERE seq <= n;
-    DROP TABLE ___tmp;
-
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-create or replace function _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
-  as
-$body$
-declare
-    sql text;
-    r record;
-
-begin
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    sql := 'with nodes as (' || sqlin || ')
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j, st_distance(st_makepoint(a.x, a.y), st_makepoint(b.x, b.y)) as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i';
-
-    for r in execute sql loop
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-
-end;
-$body$
-language plpgsql stable cost 10;
-
-
-CREATE OR REPLACE FUNCTION pgr_TSP(
-    matrix_row_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'newTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_eucledianTSP(
-    coordinates_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'eucledianTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_alphashape(sql text, alpha float8 DEFAULT 0, OUT x float8, OUT y float8)
-    RETURNS SETOF record
-    AS '$libdir/libpgrouting-2.5', 'alphashape'
-    LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pointsAsPolygon(query varchar, alpha float8 DEFAULT 0)
-	RETURNS geometry AS
-	$$
-	DECLARE
-		r record;
-		geoms geometry[];
-		vertex_result record;
-		i int;
-		n int;
-		spos int;
-		q text;
-		x float8[];
-		y float8[];
-
-	BEGIN
-		geoms := array[]::geometry[];
-		i := 1;
-
-		FOR vertex_result IN EXECUTE 'SELECT x, y FROM pgr_alphashape('''|| query || ''', ' || alpha || ')'
-		LOOP
-			x[i] = vertex_result.x;
-			y[i] = vertex_result.y;
-			i := i+1;
-		END LOOP;
-
-		n := i;
-		IF n = 1 THEN
-			RAISE NOTICE 'n = 1';
-			RETURN NULL;
-		END IF;
-
-		spos := 1;
-		q := 'SELECT ST_GeometryFromText(''POLYGON((';
-		FOR i IN 1..n LOOP
-			IF x[i] IS NULL AND y[i] IS NULL THEN
-				q := q || ', ' || x[spos] || ' ' || y[spos] || '))'',0) AS geom;';
-				EXECUTE q INTO r;
-				geoms := geoms || array[r.geom];
-				q := '';
-			ELSE
-				IF q = '' THEN
-					spos := i;
-					q := 'SELECT ST_GeometryFromText(''POLYGON((';
-				END IF;
-				IF i = spos THEN
-					q := q || x[spos] || ' ' || y[spos];
-				ELSE
-					q := q || ', ' || x[i] || ' ' || y[i];
-				END IF;
-			END IF;
-		END LOOP;
-
-		RETURN ST_BuildArea(ST_Collect(geoms));
-	END;
-	$$
-	LANGUAGE 'plpgsql' VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'bd_astar'
-LANGUAGE C VOLATILE;
-
-
-
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed:=true, only_cost:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    BOOLEAN,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false);
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to Many)';
-
-
-
--- one to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to Many)';
-
-
--- bdDijkstra MANY TO MANY
-CREATE OR REPLACE FUNCTION _pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bdDijkstra'
-LANGUAGE c VOLATILE;
-
-
-
--- ONE TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- TODO directed BOOLEAN DEFAULT TRUE,  on version 3
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, false) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, true) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_vid integer,
-    target_vid integer,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_vertex'
-LANGUAGE 'c' IMMUTABLE;
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_edge'
-LANGUAGE 'c' IMMUTABLE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || edges_sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        -- no restrictions then its a dijkstra
-        RETURN query SELECT a.seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_dijkstra(new_sql, start_vid, end_vid, directed) a;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, start_vid, end_vid, directed, has_rcost, restrictions_sql);
-    RETURN;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trspViaVertices(
-    edges_sql TEXT,
-    via_vids ANYARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult3 AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            new_sql :=
-               'WITH old_sql AS (' || edges_sql || ')' ||
-                '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        RETURN query SELECT (row_number() over())::INTEGER, path_id:: INTEGER, node::INTEGER,
-            (CASE WHEN edge = -2 THEN -1 ELSE edge END)::INTEGER, cost
-            FROM pgr_dijkstraVia(new_sql, via_vids, directed, strict:=true) WHERE edge != -1;
-        RETURN;
-    END IF;
-
-
-    -- make the call without contradiction from part of the user
-    RETURN query SELECT * FROM _pgr_trspViaVertices(new_sql, via_vids::INTEGER[], directed, has_rcost, restrictions_sql);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-
-    new_sql := sql;
-    IF (has_reverse != has_reverse_cost) THEN  -- user contradiction
-        IF (has_reverse) THEN
-            -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) THEN
-        -- no restrictions then its a with points
-        RETURN query SELECT a.seq-1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_withpoints(new_sql,
-            '(SELECT 1 as pid, ' || source_eid || 'as edge_id, ' || source_pos || '::float8 as fraction)'
-            || ' UNION '
-            || '(SELECT 2, ' || target_eid || ', ' || target_pos || ')' ::TEXT,
-            -1, -2, directed) a;
-        -- WHERE node != -2;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, source_eid, source_pos, target_eid, target_pos, directed, has_reverse_cost, turn_restrict_sql);
-    RETURN;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-create or replace function _pgr_trspViaVertices(sql text, vids integer[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    lrra boolean := false;
-    seq integer := 0;
-    seq2 integer := 0;
-
-begin
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(vids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from _pgr_trsp(sql, vids[i], vids[i+1], directed, has_rcost, turn_restrict_sql) as a loop
-            -- filter out the individual path ends except the last one
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --raise notice 'rr: %', rr;
-            if rr.id3 = -1 then
-                lrr := rr;
-                lrra := true;
-            else
-                seq := seq + 1;
-                rr.seq := seq;
-                return next rr;
-            end if;
-        end loop;
-    end loop;
-
-    if lrra then
-        seq := seq + 1;
-        lrr.seq := seq;
-        return next lrr;
-    end if;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-
-----------------------------------------------------------------------------------------------------------
-
-create or replace function pgr_trspViaEdges(sql text, eids integer[], pcts float8[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    first boolean := true;
-    seq integer := 0;
-    seq2 integer :=0;
-    has_reverse BOOLEAN;
-    point_is_vertex BOOLEAN := false;
-    edges_sql TEXT;
-    f float;
-
-begin
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql := sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (NOT has_rcost) THEN
-            -- user does not want to use reverse cost column
-            edges_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    FOREACH f IN ARRAY pcts LOOP
-        IF f in (0,1) THEN
-           point_is_vertex := true;
-        END IF;
-    END LOOP;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) AND NOT point_is_vertex THEN
-        -- no restrictions then its a _pgr_withPointsVia
-        RETURN query SELECT a.seq::INTEGER, path_id::INTEGER AS id1, node::INTEGER AS id2, edge::INTEGER AS id3, cost
-        FROM _pgr_withPointsVia(edges_sql, eids, pcts, directed) a;
-        RETURN;
-    END IF;
-
-    if array_length(eids, 1) != array_length(pcts, 1) then
-        raise exception 'The length of arrays eids and pcts must be the same!';
-    end if;
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(eids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from pgr_trsp(edges_sql,
-                                  eids[i], pcts[i],
-                                  eids[i+1], pcts[i+1],
-                                  directed,
-                                  has_rcost,
-                                  turn_restrict_sql) as a loop
-            -- combine intermediate via costs when cost is split across
-            -- two parts of a segment because it stops it and
-            -- restarts the next leg also on it
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --
-            -- there are multiple condition we have to deal with
-            -- between the end of one leg and start of the next
-            -- 1. same vertex_id. edge_id=-1; drop record with edge_id=-1
-            -- means: path ends on vertex
-            -- NOTICE:  rr: (19,1,44570022,-1,0)
-            -- NOTICE:  rr: (0,2,44570022,1768045,2.89691196717448)
-            -- 2. vertex_id=-1; sum cost components
-            -- means: path end/starts with the segment
-            -- NOTICE:  rr: (11,2,44569628,1775909,9.32885885148532)
-            -- NOTICE:  rr: (0,3,-1,1775909,0.771386350984395)
-
-            --raise notice 'rr: %', rr;
-            if first then
-                lrr := rr;
-                first := false;
-            else
-                if lrr.id3 = -1 then
-                    lrr := rr;
-                elsif lrr.id3 = rr.id3 then
-                    lrr.cost := lrr.cost + rr.cost;
-                    if rr.id2 = -1 then
-                        rr.id2 := lrr.id2;
-                    end if;
-                else
-                    seq := seq + 1;
-                    lrr.seq := seq;
-                    return next lrr;
-                    lrr := rr;
-                end if;
-            end if;
-        end loop;
-    end loop;
-
-    seq := seq + 1;
-    lrr.seq := seq;
-    return next lrr;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-----------------------------
---    MANY TO MANY
-----------------------------
-
-
-CREATE OR REPLACE FUNCTION _pgr_maxflow(
-    edges_sql TEXT,
-    sources ANYARRAY,
-    targets ANYARRAY,
-    algorithm INTEGER DEFAULT 1,
-    only_flow BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'max_flow_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-
-------------------------------------
--- 3 pgr_edmondsKarp
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 2 boykov_kolmogorov
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 1 pgr_pushRelabel
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT flow
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], algorithm := 1, only_flow := true);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], $3::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, $2::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxCardinalityMatch(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'edge_disjoint_paths_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    bigint,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    IN directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_contractGraph(
-    edges_sql TEXT,
-    contraction_order BIGINT[],
-    max_cycles integer DEFAULT 1,
-    forbidden_vertices BIGINT[] DEFAULT ARRAY[]::BIGINT[],
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT type TEXT,
-    OUT id BIGINT,
-    OUT contracted_vertices BIGINT[],
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost float)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'contractGraph'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliver(
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_cell_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliver'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliverEuclidean (
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliverEuclidean'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_vrpOneDepot(
-    TEXT, -- customers_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_sql
-    INTEGER, -- depot_id
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-orders_sql TEXT;
-trucks_sql TEXT;
-matrix_sql TEXT;
-final_sql TEXT;
-BEGIN
-
-    orders_sql = $$WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    pickups AS (
-        SELECT id, x AS p_x, y AS p_y, open_time AS p_open, close_time AS p_close, service_time AS p_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vrp_orders.id AS id, order_unit AS demand, pickups.id AS p_node_id, p_x, p_y, p_open, p_close, p_service,
-    vrp_orders.id AS d_node_id, x AS d_x, y AS d_y, open_time AS d_open, close_time AS d_close, service_time AS d_service
-    FROM vrp_orders, pickups
-    WHERE vrp_orders.id != $$ || $4;
-
-
-    trucks_sql = $$ WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    vrp_vehicles AS ($$ || $2 || $$ ),
-    starts AS (
-        SELECT id AS start_node_id, x AS start_x, y AS start_y, open_time AS start_open, close_time AS start_close, service_time AS start_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vehicle_id AS id, capacity, starts.* FROM vrp_vehicles, starts;
-    $$;
-
-    final_sql = '
-    SELECT * FROM _pgr_pickDeliver(
-            $$' || orders_sql || '$$,
-            $$' || trucks_sql || '$$,
-            $$' || $3 || '$$,
-            max_cycles := 2,
-            initial_sol := 4 ); ';
-
-    RAISE DEBUG '%', orders_sql;
-    RAISE DEBUG '%', trucks_sql;
-    RAISE DEBUG '%', $3;
-    RAISE DEBUG '%', final_sql;
-
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
------------------------------------------------------------------------
--- Core function for vrp with sigle depot computation
--- See README for description
------------------------------------------------------------------------
---
---
-
-create or replace function pgr_vrpOneDepot(
-	order_sql text,
-	vehicle_sql text,
-	cost_sql text,
-	depot_id integer,
-
-	OUT oid integer,
-	OUT opos integer,
-	OUT vid integer,
-	OUT tarrival integer,
-	OUT tdepart integer)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT order_id::INTEGER, stop_seq::INTEGER, vehicle_id::INTEGER, arrival_time::INTEGER, departure_time::INTEGER
-    FROM _pgr_vrpOneDepot($1, $2,
-       '
-            SELECT src_id AS start_vid, dest_id AS end_vid, traveltime AS agg_cost FROM ('||$3||') AS a
-       ',
-        $4
-    ) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_gsoc_vrppdtw(
-    customers_sql TEXT,
-    max_vehicles INTEGER,
-    capacity FLOAT,
-    speed FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-
-    OUT seq INTEGER,
-    OUT vehicle_id INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT stop_id BIGINT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-    orders_sql TEXT;
-    vehicles_sql TEXT;
-    final_sql TEXT;
-BEGIN
-    orders_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        pickups AS (
-            SELECT id, demand, x as p_x, y as p_y, opentime as p_open, closetime as p_close, servicetime as p_service
-            FROM  customer_data WHERE pindex = 0 AND id != 0
-        ),
-        deliveries AS (
-            SELECT pindex AS id, x as d_x, y as d_y, opentime as d_open, closetime as d_close, servicetime as d_service
-            FROM  customer_data WHERE dindex = 0 AND id != 0
-        )
-        SELECT * FROM pickups JOIN deliveries USING(id) ORDER BY pickups.id
-    $$;
-
-    vehicles_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ )
-        SELECT id, x AS start_x, y AS start_y,
-            opentime AS start_open, closetime AS start_close, $$ ||
-            capacity || $$ AS capacity, $$ || max_vehicles || $$ AS number, $$ || speed || $$ AS speed
-            FROM customer_data WHERE id = 0 LIMIT 1
-        $$;
---  seq | vehicle_id | vehicle_seq | stop_id | travel_time | arrival_time | wait_time | service_time | departure_time
-    final_sql = $$ WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        p_deliver AS (SELECT * FROM _pgr_pickDeliverEuclidean('$$ || orders_sql || $$',  '$$ || vehicles_sql || $$',  1, $$ || max_cycles || $$ )),
-        picks AS (SELECT p_deliver.*, pindex, dindex, id AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 2)),
-        delivers AS (SELECT p_deliver.*, pindex, dindex, dindex AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 3)),
-        depots AS (SELECT p_deliver.*, 0 as pindex, 0 as dindex, 0 AS the_id FROM p_deliver WHERE (stop_type IN (-1,1,6))),
-        the_union AS (SELECT * FROM picks UNION SELECT * FROM delivers UNION SELECT * from depots)
-
-        SELECT (row_number() over(ORDER BY a.seq))::INTEGER, vehicle_seq, a.stop_seq, the_id::BIGINT, a.travel_time, a.arrival_time, a.wait_time, a.service_time, a.departure_time
-        FROM (SELECT * FROM the_union) AS a ORDER BY a.seq
-        $$;
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-CREATE OR REPLACE FUNCTION pgr_gsoc_vrppdtw(
-    sql text,
-    vehicle_num INTEGER,
-    capacity INTEGER
-)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-customers_sql TEXT;
-BEGIN
-    RETURN query
-         SELECT a.seq, vehicle_id::INTEGER AS id1, stop_id::INTEGER AS id2, departure_time AS cost
-        FROM _pgr_gsoc_vrppdtw($1, $2, $3, 1, 30) AS a WHERE vehicle_id NOT IN (-2);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION _pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN,
-    driving_side CHAR,
-    details BOOLEAN,
-
-    only_cost BOOLEAN DEFAULT false, -- gets path
-    normal BOOLEAN DEFAULT true, -- false for many to onu
-
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'withPoints'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], ARRAY[$4]::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], ARRAY[$4]::bigint[], $5, $6, $7, FALSE, FALSE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], $4::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], $4::BIGINT[], $5,  $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION  _pgr_withPointsVia(
-    sql text,
-    via_edges bigint[],
-    fraction float[],
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  has_rcost boolean;
-  sql_new_vertices text := ' ';
-  sql_on_vertex text;
-  v_union text := ' ';
-  dummyrec record;
-  rec1 record;
-  via_vertices int[];
-  sql_safe text;
-  new_edges text;
-  BEGIN
-     BEGIN
-        sql_safe = 'SELECT id, source, target, cost, reverse_cost FROM ('|| sql || ') AS __a';
-
-        EXECUTE 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||sql_safe||' ) AS __b__ limit 1 ' INTO rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-     END;
-
-
-      IF array_length(via_edges, 1) != array_length(fraction, 1) then
-        RAISE EXCEPTION 'The length of via_edges is different of length of via_edges';
-      END IF;
-
-      FOR i IN 1 .. array_length(via_edges, 1)
-      LOOP
-          IF fraction[i] = 0 THEN
-              sql_on_vertex := 'SELECT source FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.source;
-          ELSE IF fraction[i] = 1 THEN
-              sql_on_vertex := 'SELECT target FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.target;
-          ELSE
-              via_vertices[i] = -i;
-              IF has_rcost THEN
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost,
-                              reverse_cost * (1 - ' || fraction[i] || ')  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost,
-                              reverse_cost *  ' || fraction[i] || '  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' where id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               ELSE
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               END IF;
-          END IF;
-          END IF;
-     END LOOP;
-
-     IF sql_new_vertices = ' ' THEN
-         new_edges := sql;
-     ELSE
-         IF has_rcost THEN
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost,
-                         lead(cost) OVER w  - cost AS reverse_cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL),
-                   second_part AS ( SELECT * FROM (SELECT id, lead(source) OVER w  AS source, source as target,
-                         reverse_cost - lead(reverse_cost) OVER w  AS cost,
-                         reverse_cost - lead(reverse_cost) OVER w  AS reverse_cost
-                      FROM  the_union  WHERE target > 0 and reverse_cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY reverse_cost ASC) ) as n2
-                      WHERE source IS NOT NULL),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part)
-                             UNION
-                       (SELECT * FROM second_part) ) _union )
-                  SELECT *  FROM more_union';
-         ELSE
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL ),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part) ) _union )
-                  SELECT *  FROM more_union';
-          END IF;
-      END IF;
-
- -- raise notice '%', new_edges;
-     sql_new_vertices := sql_new_vertices || v_union || ' (' || sql || ')';
-     RETURN query SELECT *
-         FROM pgr_dijkstraVia(new_edges, via_vertices, directed, has_rcost);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_lineGraph(
-    TEXT, -- edges_sql
-    directed BOOLEAN DEFAULT true,
-    OUT seq INTEGER,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost FLOAT,
-    OUT reverse_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'lineGraph'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_connectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'connectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_strongComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'strongComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_biconnectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the edge in the component
-    OUT n_seq INTEGER,          -- nth_seq of the edge in the component
-    OUT edge BIGINT)            -- the number of the edge
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'biconnectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_articulationPoints(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'articulationPoints'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bridges(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT edge BIGINT)            -- the number of the edge 
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bridges'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createtopology(edge_table text, tolerance double precision,
-		   the_geom text default 'the_geom', id text default 'id',
-		   source text default 'source', target text default 'target',rows_where text default 'true',
-		   clean boolean default FALSE)
-RETURNS VARCHAR AS
-$BODY$
-
-DECLARE
-    points record;
-    sridinfo record;
-    source_id bigint;
-    target_id bigint;
-    totcount bigint;
-    rowcount bigint;
-    srid integer;
-    sql text;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    notincluded integer;
-    i integer;
-    naming record;
-    info record;
-    flag boolean;
-    query text;
-    idtype text;
-    gtype text;
-    sourcetype text;
-    targettype text;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-    msgKind int;
-    emptied BOOLEAN;
-
-BEGIN
-    msgKind = 1; -- notice
-    fnName = 'pgr_createTopology';
-    raise notice 'PROCESSING:';
-    raise notice 'pgr_createTopology(''%'', %, ''%'', ''%'', ''%'', ''%'', rows_where := ''%'', clean := %)',edge_table,tolerance,the_geom,id,source,target,rows_where, clean;
-    execute 'show client_min_messages' into debuglevel;
-
-
-    raise notice 'Performing checks, please wait .....';
-
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-        sname=naming.sname;
-        tname=naming.tname;
-        tabname=sname||'.'||tname;
-        vname=tname||'_vertices_pgr';
-        vertname= sname||'.'||vname;
-        rows_where = ' AND ('||rows_where||')';
-      raise DEBUG '     --> OK';
-
-
-      raise debug 'Checking column names in edge table';
-        select * into idname     from _pgr_getColumnName(sname, tname,id,2,fnName);
-        select * into sourcename from _pgr_getColumnName(sname, tname,source,2,fnName);
-        select * into targetname from _pgr_getColumnName(sname, tname,target,2,fnName);
-        select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2,fnName);
-
-
-        err = sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname;
-        perform _pgr_onError( err, 2, fnName,
-               'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-	       'Column names are OK');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking column types in edge table';
-        select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-        select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-        select * into idtype from _pgr_getColumnType(sname,tname,idname,1, fnName);
-
-        err = idtype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column id:'|| idname, ' Expected type of '|| idname || ' is integer,smallint or bigint but '||idtype||' was found');
-
-        err = sourcetype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column source:'|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-        err = targettype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column target:'|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or bigint but '||targettype||' was found');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         raise debug '%',query;
-         EXECUTE query INTO sridinfo;
-
-         err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-         perform _pgr_onError(err, 2, fnName,
-	     'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-
-         srid := sridinfo.srid;
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking and creating indices in edge table';
-        perform _pgr_createIndex(sname, tname , idname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-
-        gname=quote_ident(gname);
-        idname=quote_ident(idname);
-        sourcename=quote_ident(sourcename);
-        targetname=quote_ident(targetname);
-      raise DEBUG '     --> OK';
-
-
-
-
-
-    BEGIN
-        -- issue #193 & issue #210 & #213
-        -- this sql is for trying out the where clause
-        -- the select * is to avoid any column name conflicts
-        -- limit 1, just try on first record
-        -- if the where clasuse is ill formed it will be caught in the exception
-        sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-        EXECUTE sql into dummyRec;
-        -- end
-
-        -- if above where clasue works this one should work
-        -- any error will be caught by the exception also
-        sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NOT NULL AND '||
-	    idname||' IS NOT NULL)=false '||rows_where;
-        EXECUTE SQL  into notincluded;
-
-        if clean then
-            raise debug 'Cleaning previous Topology ';
-               execute 'UPDATE ' || _pgr_quote_ident(tabname) ||
-               ' SET '||sourcename||' = NULL,'||targetname||' = NULL';
-        else
-            raise debug 'Creating topology for edges with non assigned topology';
-            if rows_where=' AND (true)' then
-                rows_where=  ' and ('||quote_ident(sourcename)||' is null or '||quote_ident(targetname)||' is  null)';
-            end if;
-        end if;
-        -- my thoery is that the select Count(*) will never go through here
-        EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-             RAISE NOTICE '%',sql;
-             RETURN 'FAIL';
-    END;
-
-    BEGIN
-         raise DEBUG 'initializing %',vertname;
-         execute 'select * from _pgr_getTableName('||quote_literal(vertname)
-                                                  || ',0,' || quote_literal(fnName) ||' )' into naming;
-         emptied = false;
-         set client_min_messages  to warning;
-         IF sname=naming.sname AND vname=naming.tname  THEN
-            if clean then
-                execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-                execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-                emptied = true;
-            end if;
-         ELSE -- table doesn't exist
-            execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-            emptied = true;
-         END IF;
-         IF (emptied) THEN
-             execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-	         quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-             perform _pgr_createIndex(vertname , 'the_geom'::text , 'gist'::text);
-         END IF;
-         execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id"}''::text[])' into naming;
-         execute 'set client_min_messages  to '|| debuglevel;
-         raise DEBUG  '  ------>OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: something went wrong when initializing the verties table';
-             RETURN 'FAIL';
-    END;
-
-
-
-    raise notice 'Creating Topology, Please wait...';
-        rowcount := 0;
-        FOR points IN EXECUTE 'SELECT ' || idname || '::bigint AS id,'
-            || ' _pgr_StartPoint(' || gname || ') AS source,'
-            || ' _pgr_EndPoint('   || gname || ') AS target'
-            || ' FROM '  || _pgr_quote_ident(tabname)
-            || ' WHERE ' || gname || ' IS NOT NULL AND ' || idname||' IS NOT NULL '||rows_where
-        LOOP
-
-            rowcount := rowcount + 1;
-            IF rowcount % 1000 = 0 THEN
-                RAISE NOTICE '% edges processed', rowcount;
-            END IF;
-
-
-            source_id := _pgr_pointToId(points.source, tolerance,vertname,srid);
-            target_id := _pgr_pointToId(points.target, tolerance,vertname,srid);
-            BEGIN
-                sql := 'UPDATE ' || _pgr_quote_ident(tabname) ||
-                    ' SET '||sourcename||' = '|| source_id::text || ','||targetname||' = ' || target_id::text ||
-                    ' WHERE ' || idname || ' =  ' || points.id::text;
-
-                IF sql IS NULL THEN
-                    RAISE NOTICE 'WARNING: UPDATE % SET source = %, target = % WHERE % = % ', tabname, source_id::text, target_id::text, idname,  points.id::text;
-                ELSE
-                    EXECUTE sql;
-                END IF;
-                EXCEPTION WHEN OTHERS THEN
-                    RAISE NOTICE '%', SQLERRM;
-                    RAISE NOTICE '%',sql;
-                    RETURN 'FAIL';
-            end;
-        END LOOP;
-        raise notice '-------------> TOPOLOGY CREATED FOR  % edges', rowcount;
-        RAISE NOTICE 'Rows with NULL geometry or NULL id: %',notincluded;
-        Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname), _pgr_quote_ident(vertname);
-        raise notice '----------------------------------------------';
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_createTopology(text, double precision,text,text,text,text,text,boolean)
-IS 'args: edge_table,tolerance, the_geom:=''the_geom'',source:=''source'', target:=''target'',rows_where:=''true'' - fills columns source and target in the geometry table and creates a vertices table for selected rows';
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
-RETURNS character varying AS
-$BODY$
-
-DECLARE
-    points record;
-    seg record;
-    naming record;
-    sridinfo record;
-    srid integer;
-    ecnt integer;
-    vertname text;
-    sname text;
-    tname text;
-    vname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    geotype text;
-    gname text;
-    tabName text;
-    flag boolean ;
-    query text;
-    selectionquery text;
-    i integer;
-    tot integer;
-    NumIsolated integer;
-    numdeadends integer;
-    numgaps integer;
-    NumCrossing integer;
-    numRings integer;
-    debuglevel text;
-
-
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeGraph(''%'',%,''%'',''%'',''%'',''%'',''%'')',edge_table,tolerance,the_geom,id,source,target,rows_where;
-  raise notice 'Performing checks, please wait ...';
-  execute 'show client_min_messages' into debuglevel;
-
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-    raise DEBUG '     --> OK';
-
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","cnt","chk"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET cnt=0 ,chk=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into idname     from _pgr_getColumnName(sname, tname,id,2);
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname, 2,
-                       'pgr_analyzeGraph',  'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-                       'Column names are OK');
-
-        raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-   BEGIN
-       raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         EXECUTE QUERY INTO sridinfo;
-
-         perform _pgr_onError( sridinfo IS NULL OR sridinfo.srid IS NULL,2,
-                 'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname,
-                 'SRID of '||gname||' is '||sridinfo.srid);
-
-         IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-             RAISE NOTICE ' Can not determine the srid of the geometry "%" in table %', the_geom,tabname;
-             RETURN 'FAIL';
-         END IF;
-         srid := sridinfo.srid;
-         raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM;--issue 210,211,213
-             RAISE NOTICE 'ERROR: something went wrong when checking for SRID of % in table %', the_geom,tabname;
-             RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-       raise debug 'Checking  indices in edge table';
-       perform _pgr_createIndex(tabname , idname , 'btree');
-       perform _pgr_createIndex(tabname , sourcename , 'btree');
-       perform _pgr_createIndex(tabname , targetname , 'btree');
-       perform _pgr_createIndex(tabname , gname , 'gist');
-
-       gname=quote_ident(gname);
-       sourcename=quote_ident(sourcename);
-       targetname=quote_ident(targetname);
-       idname=quote_ident(idname);
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking indices';
-          RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-        query='select count(*) from '||_pgr_quote_ident(tabname)||' where true  '||rows_where;
-        EXECUTE query into ecnt;
-        raise DEBUG '-->Rows Where condition: OK';
-        raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-            RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-            RAISE NOTICE 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-            RAISE NOTICE '%',query;
-            RETURN 'FAIL';
-    END;
-
-    selectionquery ='with
-           selectedRows as( (select '||sourcename||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||')
-                           union
-                           (select '||targetname||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||'))';
-
-
-
-
-
-   BEGIN
-       RAISE NOTICE 'Analyzing for dead ends. Please wait...';
-       query= 'with countingsource as (select a.'||sourcename||' as id,count(*) as cnts
-               from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||sourcename||')
-                     ,countingtarget as (select a.'||targetname||' as id,count(*) as cntt
-                    from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||targetname||')
-                   ,totalcount as (select id,case when cnts is null and cntt is null then 0
-                                                   when cnts is null then cntt
-                                                   when cntt is null then cnts
-                                                   else cnts+cntt end as totcnt
-                                   from ('||_pgr_quote_ident(vertname)||' as a left
-                                   join countingsource as t using(id) ) left join countingtarget using(id))
-               update '||_pgr_quote_ident(vertname)||' as a set cnt=totcnt from totalcount as b where a.id=b.id';
-       raise debug '%',query;
-       execute query;
-       query=selectionquery||'
-              SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE cnt=1 and id in (select id from selectedRows)';
-       raise debug '%',query;
-       execute query  INTO numdeadends;
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-          RAISE NOTICE 'ERROR: something went wrong when analizing for dead ends';
-          RETURN 'FAIL';
-   END;
-
-
-
-    BEGIN
-          RAISE NOTICE 'Analyzing for gaps. Please wait...';
-          query = 'with
-                   buffer as (select id,st_buffer(the_geom,'||tolerance||') as buff from '||_pgr_quote_ident(vertname)||' where cnt=1)
-                   ,veryclose as (select b.id,st_crosses(a.'||gname||',b.buff) as flag
-                   from  (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) as a
-                   join buffer as b on (a.'||gname||'&&b.buff)
-                   where '||sourcename||'!=b.id and '||targetname||'!=b.id )
-                   update '||_pgr_quote_ident(vertname)||' set chk=1 where id in (select distinct id from veryclose where flag=true)';
-          raise debug '%' ,query;
-          execute query;
-          GET DIAGNOSTICS  numgaps= ROW_COUNT;
-          raise DEBUG '     --> OK';
-          EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for gaps';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for isolated edges. Please wait...';
-        query=selectionquery|| ' SELECT count(*) FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' )  as a,
-                                                 '||_pgr_quote_ident(vertname)||' as b,
-                                                 '||_pgr_quote_ident(vertname)||' as c
-                            WHERE b.id in (select id from selectedRows) and a.'||sourcename||' =b.id
-                            AND b.cnt=1 AND a.'||targetname||' =c.id
-                            AND c.cnt=1';
-        raise debug '%' ,query;
-        execute query  INTO NumIsolated;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for isolated edges';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for ring geometries. Please wait...';
-        execute 'SELECT geometrytype('||gname||')  FROM '||_pgr_quote_ident(tabname) limit 1 into geotype;
-        IF (geotype='MULTILINESTRING') THEN
-            query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                 WHERE true  '||rows_where||' and st_isRing(st_linemerge('||gname||'))';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        ELSE query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                  WHERE true  '||rows_where||' and st_isRing('||gname||')';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        END IF;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for ring geometries';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for intersections. Please wait...';
-        query = 'select count(*) from (select distinct case when a.'||idname||' < b.'||idname||' then a.'||idname||'
-                                                        else b.'||idname||' end,
-                                                   case when a.'||idname||' < b.'||idname||' then b.'||idname||'
-                                                        else a.'||idname||' end
-                                    FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as a
-                                    JOIN (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as b
-                                    ON (a.'|| gname||' && b.'||gname||')
-                                    WHERE a.'||idname||' != b.'||idname|| '
-                                        and (a.'||sourcename||' in (b.'||sourcename||',b.'||targetname||')
-                                              or a.'||targetname||' in (b.'||sourcename||',b.'||targetname||')) = false
-                                        and st_intersects(a.'||gname||', b.'||gname||')=true) as d ';
-        raise debug '%' ,query;
-        execute query  INTO numCrossing;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for intersections';
-            RETURN 'FAIL';
-    END;
-
-
-
-
-    RAISE NOTICE '            ANALYSIS RESULTS FOR SELECTED EDGES:';
-    RAISE NOTICE '                  Isolated segments: %', NumIsolated;
-    RAISE NOTICE '                          Dead ends: %', numdeadends;
-    RAISE NOTICE 'Potential gaps found near dead ends: %', numgaps;
-    RAISE NOTICE '             Intersections detected: %',numCrossing;
-    RAISE NOTICE '                    Ring geometries: %',numRings;
-
-
-    RETURN 'OK';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_analyzeGraph(text,double precision,text,text,text,text,text) IS 'args: edge_table, tolerance,the_geom:=''the_geom'',id:=''id'',source column:=''source'', target column:=''target'' rows_where:=''true'' - creates a vertices table based on the geometry for selected rows';
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzeOneway(
-   edge_table text,
-   s_in_rules TEXT[],
-   s_out_rules TEXT[],
-   t_in_rules TEXT[],
-   t_out_rules TEXT[],
-   two_way_if_null boolean default true,
-   oneway text default 'oneway',
-   source text default 'source',
-   target text default 'target')
-  RETURNS text AS
-$BODY$
-
-
-DECLARE
-    rule text;
-    ecnt integer;
-    instr text;
-    naming record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    owname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    vertname text;
-    debuglevel text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeOneway(''%'',''%'',''%'',''%'',''%'',''%'',''%'',''%'',%)',
-		edge_table, s_in_rules , s_out_rules, t_in_rules, t_out_rules, oneway, source ,target,two_way_if_null ;
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    raise DEBUG '     --> OK';
-    EXCEPTION WHEN raise_exception THEN
-      RAISE NOTICE 'ERROR: something went wrong checking the table name';
-      RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","ein","eout"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET eout=0 ,ein=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into owname from _pgr_getColumnName(sname, tname,oneway,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,owname) or  targetname=owname, 2,
-                       '_pgr_createToplogy',  'Two columns share the same name', 'Parameter names for oneway,source and target  must be different',
-                       'Column names are OK');
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-
-
-    RAISE NOTICE 'Analyzing graph for one way street errors.';
-
-    rule := CASE WHEN two_way_if_null
-            THEN owname || ' IS NULL OR '
-            ELSE '' END;
-
-    instr := '''' || array_to_string(s_in_rules, ''',''') || '''';
-       EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-      from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-     where a.id=b.'|| sourcename;
-
-    RAISE NOTICE 'Analysis 25%% complete ...';
-
-    instr := '''' || array_to_string(t_in_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 50%% complete ...';
-
-    instr := '''' || array_to_string(s_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-        where a.id=b.'|| sourcename;
-    RAISE NOTICE 'Analysis 75%% complete ...';
-
-    instr := '''' || array_to_string(t_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 100%% complete ...';
-
-    EXECUTE 'SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE ein=0 or eout=0' INTO ecnt;
-
-    RAISE NOTICE 'Found % potential problems in directionality' ,ecnt;
-
-    RETURN 'OK';
-
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_analyzeOneway(text,TEXT[],TEXT[], TEXT[],TEXT[],boolean,text,text,text)
-IS 'args:edge_table , s_in_rules , s_out_rules, t_in_rules , t_out_rules, two_way_if_null:= true, oneway:=''oneway'',source:= ''source'',target:=''target'' - Analizes the directionality of the edges based on the rules';
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createverticestable(
-   edge_table text,
-   the_geom text DEFAULT 'the_geom'::text,
-   source text DEFAULT 'source'::text,
-   target text DEFAULT 'target'::text,
-    rows_where text DEFAULT 'true'::text
-)
-  RETURNS text AS
-$BODY$
-DECLARE
-    naming record;
-    sridinfo record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    sourcename text;
-    targetname text;
-    query text;
-    ecnt bigint;
-    srid integer;
-    sourcetype text;
-    targettype text;
-    sql text;
-    totcount integer;
-    i integer;
-    notincluded integer;
-    included integer;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-
-
-BEGIN
-  fnName = 'pgr_createVerticesTable';
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_createVerticesTable(''%'',''%'',''%'',''%'',''%'')',edge_table,the_geom,source,target,rows_where;
-  execute 'show client_min_messages' into debuglevel;
-
-  raise notice 'Performing checks, please wait .....';
-
-  RAISE DEBUG 'Checking % exists',edge_table;
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-  raise debug '--> Edge table exists: OK';
-
-  raise debug 'Checking column names';
-    select * into sourcename from _pgr_getColumnName(sname, tname,source,2, fnName);
-    select * into targetname from _pgr_getColumnName(sname, tname,target,2, fnName);
-    select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2, fnName);
-
-
-    err = sourcename in (targetname,gname) or  targetname=gname;
-    perform _pgr_onError(err, 2, fnName,
-        'Two columns share the same name', 'Parameter names for the_geom,source and target  must be different');
-  raise debug '--> Column names: OK';
-
-  raise debug 'Checking column types in edge table';
-    select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-    select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-
-
-    err = sourcetype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column source: '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-    err = targettype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column target: '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found');
-
-  raise debug '-->Column types:OK';
-
-  raise debug 'Checking SRID of geometry column';
-     query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-        || ' FROM ' || _pgr_quote_ident(tabname)
-        || ' WHERE ' || quote_ident(gname)
-        || ' IS NOT NULL LIMIT 1';
-     raise debug '%',query;
-     EXECUTE query INTO sridinfo;
-
-     err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-     perform _pgr_onError(err, 2, fnName,
-         'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-     srid := sridinfo.srid;
-  raise DEBUG '     --> OK';
-
-  raise debug 'Checking and creating Indices';
-     perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-  raise DEBUG '-->Check and create indices: OK';
-
-     gname=quote_ident(gname);
-     sourcename=quote_ident(sourcename);
-     targetname=quote_ident(targetname);
-
-
-  BEGIN
-  raise debug 'Checking Condition';
-    -- issue #193 & issue #210 & #213
-    -- this sql is for trying out the where clause
-    -- the select * is to avoid any column name conflicts
-    -- limit 1, just try on first record
-    -- if the where clasuse is ill formed it will be caught in the exception
-    sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-    EXECUTE sql into dummyRec;
-    -- end
-
-    -- if above where clasue works this one should work
-    -- any error will be caught by the exception also
-    sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NULL or '||
-		sourcename||' is null or '||targetname||' is null)=true '||rows_where;
-    raise debug '%',sql;
-    EXECUTE SQL  into notincluded;
-    EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-
-
-
-  BEGIN
-     raise DEBUG 'initializing %',vertname;
-       execute 'select * from _pgr_getTableName('||quote_literal(vertname)||',0)' into naming;
-       IF sname=naming.sname  AND vname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-       ELSE
-           set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-       END IF;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-                quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-       execute 'CREATE INDEX '||quote_ident(vname||'_the_geom_idx')||' ON '||_pgr_quote_ident(vertname)||'  USING GIST (the_geom)';
-       execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-       EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Initializing vertex table';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise notice 'Populating %, please wait...',vertname;
-       sql= 'with
-		lines as ((select distinct '||sourcename||' as id, _pgr_startpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-		                  ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||')
-			union (select distinct '||targetname||' as id,_pgr_endpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-			          ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||'))
-		,numberedLines as (select row_number() OVER (ORDER BY id) AS i,* from lines )
-		,maxid as (select id,max(i) as maxi from numberedLines group by id)
-		insert into '||_pgr_quote_ident(vertname)||'(id,the_geom)  (select id,the_geom  from numberedLines join maxid using(id) where i=maxi order by id)';
-       RAISE debug '%',sql;
-       execute sql;
-       GET DIAGNOSTICS totcount = ROW_COUNT;
-
-       sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' a, '||_pgr_quote_ident(vertname)||' b
-            where '||sourcename||'=b.id and '|| targetname||' in (select id from '||_pgr_quote_ident(vertname)||')';
-       RAISE debug '%',sql;
-       execute sql into included;
-
-
-
-       execute 'select max(id) from '||_pgr_quote_ident(vertname) into ecnt;
-       execute 'SELECT setval('||quote_literal(vertname||'_id_seq')||','||coalesce(ecnt,1)||' , false)';
-       raise notice '  ----->   VERTICES TABLE CREATED WITH  % VERTICES', totcount;
-       raise notice '                                       FOR   %  EDGES', included+notincluded;
-       RAISE NOTICE '  Edges with NULL geometry,source or target: %',notincluded;
-       RAISE NOTICE '                            Edges processed: %',included;
-       Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname),_pgr_quote_ident(vertname);
-       raise notice '----------------------------------------------';
-    END;
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_createVerticesTable(text,text,text,text,text)
-IS 'args: edge_table, the_geom:=''the_geom'',source:=''source'', target:=''target'' rows_where:=''true'' - creates a vertices table based on the source and target identifiers for selected rows';
-
-
-CREATE OR REPLACE FUNCTION pgr_nodeNetwork(edge_table text, tolerance double precision,
-			id text default 'id', the_geom text default 'the_geom', table_ending text default 'noded',
-            rows_where text DEFAULT ''::text, outall boolean DEFAULT false) RETURNS text AS
-$BODY$
-DECLARE
-	
-	p_num int := 0;
-	p_ret text := '';
-    pgis_ver_old boolean := _pgr_versionless(postgis_lib_version(), '2.1.0.0');
-    vst_line_substring text;
-    vst_line_locate_point text;
-    intab text;
-    outtab text;
-    n_pkey text;
-    n_geom text;
-    naming record;
-    sname text;
-    tname text;
-    outname text;
-    srid integer;
-    sridinfo record;
-    splits bigint;
-    touched bigint;
-    untouched bigint;
-    geomtype text;
-    debuglevel text;
-    rows_where text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_nodeNetwork(''%'', %, ''%'', ''%'', ''%'', ''%'',  %)',
-    edge_table, tolerance, id,  the_geom, table_ending, rows_where, outall;
-  raise notice 'Performing checks, please wait .....';
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',0)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-	RAISE NOTICE '-------> % not found',edge_table;
-        RETURN 'FAIL';
-    ELSE
-	RAISE DEBUG '  -----> OK';
-    END IF;
-
-    intab=sname||'.'||tname;
-    outname=tname||'_'||table_ending;
-    outtab= sname||'.'||outname;
-    rows_where = CASE WHEN length(rows_where) > 2 and not outall THEN ' AND (' || rows_where || ')' ELSE '' END;
-    rows_where = CASE WHEN length(rows_where) > 2 THEN ' WHERE (' || rows_where || ')' ELSE '' END;
-  END;
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',id,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(id)||')' INTO n_pkey;
-       IF n_pkey is NULL then
-          raise notice  'ERROR: id column "%"  not found in %',id,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',the_geom,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(the_geom)||')' INTO n_geom;
-       IF n_geom is NULL then
-          raise notice  'ERROR: the_geom  column "%"  not found in %',the_geom,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-  IF n_pkey=n_geom THEN
-	raise notice  'ERROR: id and the_geom columns have the same name "%" in %',n_pkey,intab;
-        RETURN 'FAIL';
-  END IF;
-
-  BEGIN
-       	raise DEBUG 'Checking the SRID of the geometry "%"', n_geom;
-       	EXECUTE 'SELECT ST_SRID(' || quote_ident(n_geom) || ') as srid '
-          		|| ' FROM ' || _pgr_quote_ident(intab)
-          		|| ' WHERE ' || quote_ident(n_geom)
-          		|| ' IS NOT NULL LIMIT 1' INTO sridinfo;
-       	IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-        	RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           	RETURN 'FAIL';
-       	END IF;
-       	srid := sridinfo.srid;
-       	raise DEBUG '  -----> SRID found %',srid;
-       	EXCEPTION WHEN OTHERS THEN
-           		RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           		RETURN 'FAIL';
-  END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_pkey,intab;
-      if (_pgr_isColumnIndexed(intab,n_pkey)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding  index "%_%_idx".',n_pkey,intab;
-
-	set client_min_messages  to warning;
-        execute 'create  index '||tname||'_'||n_pkey||'_idx on '||_pgr_quote_ident(intab)||' using btree('||quote_ident(n_pkey)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_geom,intab;
-      if (_pgr_iscolumnindexed(intab,n_geom)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding unique index "%_%_gidx".',intab,n_geom;
-	set client_min_messages  to warning;
-        execute 'CREATE INDEX '
-            || quote_ident(tname || '_' || n_geom || '_gidx' )
-            || ' ON ' || _pgr_quote_ident(intab)
-            || ' USING gist (' || quote_ident(n_geom) || ')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
----------------
-    BEGIN
-       raise DEBUG 'initializing %',outtab;
-       execute 'select * from _pgr_getTableName('||quote_literal(outtab)||',0)' into naming;
-       IF sname=naming.sname  AND outname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(outtab)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(outname)||','||quote_literal(n_geom)||')';
-       ELSE
-	   set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(outtab)||' (id bigserial PRIMARY KEY,old_id integer,sub_id integer,
-								source bigint,target bigint)';
-       END IF;
-       execute 'select geometrytype('||quote_ident(n_geom)||') from  '||_pgr_quote_ident(intab)||' limit 1' into geomtype;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(outname)||','||
-                quote_literal(n_geom)||','|| srid||', '||quote_literal(geomtype)||', 2)';
-       execute 'CREATE INDEX '||quote_ident(outname||'_'||n_geom||'_idx')||' ON '||_pgr_quote_ident(outtab)||'  USING GIST ('||quote_ident(n_geom)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-    END;
-----------------
-
-
-  raise notice 'Processing, please wait .....';
-
-
-    if pgis_ver_old then
-        vst_line_substring    := 'st_line_substring';
-        vst_line_locate_point := 'st_line_locate_point';
-    else
-        vst_line_substring    := 'st_linesubstring';
-        vst_line_locate_point := 'st_linelocatepoint';
-    end if;
-
---    -- First creates temp table with intersection points
-    p_ret = 'create temp table intergeom on commit drop as (
-        select l1.' || quote_ident(n_pkey) || ' as l1id,
-               l2.' || quote_ident(n_pkey) || ' as l2id,
-	       l1.' || quote_ident(n_geom) || ' as line,
-	       _pgr_startpoint(l2.' || quote_ident(n_geom) || ') as source,
-	       _pgr_endpoint(l2.' || quote_ident(n_geom) || ') as target,
-               st_intersection(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ') as geom
-        from (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l1
-             join (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l2
-             on (st_dwithin(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ', ' || tolerance || '))'||
-        'where l1.' || quote_ident(n_pkey) || ' <> l2.' || quote_ident(n_pkey)||' and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false  )';
-    raise debug '%',p_ret;
-    EXECUTE p_ret;
-
-    -- second temp table with locus (index of intersection point on the line)
-    -- to avoid updating the previous table
-    -- we keep only intersection points occurring onto the line, not at one of its ends
---    drop table if exists inter_loc;
-
---HAD TO CHANGE THIS QUERY
--- p_ret= 'create temp table inter_loc on commit drop as (
---        select l1id, l2id, ' || vst_line_locate_point || '(line,point) as locus from (
---        select DISTINCT l1id, l2id, line, (ST_DumpPoints(geom)).geom as point from intergeom) as foo
---        where ' || vst_line_locate_point || '(line,point)<>0 and ' || vst_line_locate_point || '(line,point)<>1)';
-    p_ret= 'create temp table inter_loc on commit drop as ( select * from (
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,source) as locus from intergeom)
-         union
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,target) as locus from intergeom)) as foo
-        where locus<>0 and locus<>1)';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-
-    -- index on l1id
-    create index inter_loc_id_idx on inter_loc(l1id);
-
-    -- Then computes the intersection on the lines subset, which is much smaller than full set
-    -- as there are very few intersection points
-
---- outab needs to be formally created with id, old_id, subid,the_geom, source,target
----  so it can be inmediatly be used with createTopology
-
---   EXECUTE 'drop table if exists ' || _pgr_quote_ident(outtab);
---   EXECUTE 'create table ' || _pgr_quote_ident(outtab) || ' as
-     P_RET = 'insert into '||_pgr_quote_ident(outtab)||' (old_id,sub_id,'||quote_ident(n_geom)||') (  with cut_locations as (
-           select l1id as lid, locus
-           from inter_loc
-           -- then generates start and end locus for each line that have to be cut buy a location point
-           UNION ALL
-           select i.l1id  as lid, 0 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           UNION ALL
-           select i.l1id  as lid, 1 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           order by lid, locus
-       ),
-       -- we generate a row_number index column for each input line
-       -- to be able to self-join the table to cut a line between two consecutive locations
-       loc_with_idx as (
-           select lid, locus, row_number() over (partition by lid order by locus) as idx
-           from cut_locations
-       )
-       -- finally, each original line is cut with consecutive locations using linear referencing functions
-       select l.' || quote_ident(n_pkey) || ', loc1.idx as sub_id, ' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus) as ' || quote_ident(n_geom) || '
-       from loc_with_idx loc1 join loc_with_idx loc2 using (lid) join ' || _pgr_quote_ident(intab) || ' l on (l.' || quote_ident(n_pkey) || ' = loc1.lid)
-       where loc2.idx = loc1.idx+1
-           -- keeps only linestring geometries
-           and geometryType(' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus)) = ''LINESTRING'') ';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-	GET DIAGNOSTICS splits = ROW_COUNT;
-        execute 'with diff as (select distinct old_id from '||_pgr_quote_ident(outtab)||' )
-                 select count(*) from diff' into touched;
-	-- here, it misses all original line that did not need to be cut by intersection points: these lines
-	-- are already clean
-	-- inserts them in the final result: all lines which gid is not in the res table.
-	EXECUTE 'insert into ' || _pgr_quote_ident(outtab) || ' (old_id , sub_id, ' || quote_ident(n_geom) || ')
-                ( with used as (select distinct old_id from '|| _pgr_quote_ident(outtab)||')
-		select ' ||  quote_ident(n_pkey) || ', 1 as sub_id, ' ||  quote_ident(n_geom) ||
-		' from '|| _pgr_quote_ident(intab) ||' where  '||quote_ident(n_pkey)||' not in (select * from used)' || rows_where || ')';
-	GET DIAGNOSTICS untouched = ROW_COUNT;
-
-	raise NOTICE '  Split Edges: %', touched;
-	raise NOTICE ' Untouched Edges: %', untouched;
-	raise NOTICE '     Total original Edges: %', touched+untouched;
-        RAISE NOTICE ' Edges generated: %', splits;
-	raise NOTICE ' Untouched Edges: %',untouched;
-	raise NOTICE '       Total New segments: %', splits+untouched;
-        RAISE NOTICE ' New Table: %', outtab;
-        RAISE NOTICE '----------------------------------';
-
-    drop table  if exists intergeom;
-    drop table if exists inter_loc;
-    RETURN 'OK';
-END;
-$BODY$
-    LANGUAGE 'plpgsql' VOLATILE STRICT COST 100;
-
-
-COMMENT ON FUNCTION pgr_nodeNetwork(text, double precision, text, text, text, text, boolean )
- IS  'edge_table, tolerance, id:=''id'', the_geom:=''the_geom'', table_ending:=''noded'' ';
-
-
-CREATE OR REPLACE FUNCTION pgr_labelGraph(
-                edge_table text,
-                id text default 'id',
-                source text default 'source',
-                target text default 'target',
-                subgraph text default 'subgraph',
-                rows_where text default 'true'
-        )
-        RETURNS character varying AS
-$BODY$
-
-DECLARE
-        naming record;
-        schema_name text;
-        table_name text;
-        garbage text;
-        incre integer;
-        table_schema_name text;
-        query text;
-        ecnt integer;
-        sql1 text;
-        rec1 record;
-        sql2 text;
-        rec2 record;
-        rec_count record;
-        rec_single record;
-        graph_id integer;
-        gids int [];
-
-BEGIN
-        raise notice 'Processing:';
-        raise notice 'pgr_brokenGraph(''%'',''%'',''%'',''%'',''%'',''%'')', edge_table,id,source,target,subgraph,rows_where;
-        raise notice 'Performing initial checks, please hold on ...';
-
-        Raise Notice 'Starting - Checking table ...';
-        BEGIN
-                raise debug 'Checking % table existance', edge_table;
-                execute 'select * from pgr_getTableName('|| quote_literal(edge_table) ||')' into naming;
-                schema_name = naming.sname;
-                table_name = naming.tname;
-                table_schema_name = schema_name||'.'||table_name;
-                IF schema_name is null then
-                        raise notice 'no schema';
-                        return 'FAIL';
-                else
-                        if table_name is null then
-                                raise notice 'no table';
-                                return 'FAIL';
-                        end if;
-                end if;
-        END;
-        Raise Notice 'Ending - Checking table';
-
-        Raise Notice 'Starting - Checking columns';
-        BEGIN
-                raise debug 'Checking exitance of necessary columns inside % table', edge_table;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(id) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no id column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(source) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no source column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(target) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no target column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(subgraph) ||')' into naming;
-                if naming.pgr_iscolumnintable = 't' then
-                        raise notice 'subgraph column already in the table';
-                        return 'FAIL';
-                end if;
-        END;
-        Raise Notice 'Ending - Checking columns';
-
-        Raise Notice 'Starting - Checking rows_where condition';
-        BEGIN
-                raise debug 'Checking rows_where condition';
-                query='select count(*) from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where;
-                execute query into ecnt;
-                raise debug '-->Rows where condition: OK';
-                raise debug '    --> OK';
-                EXCEPTION WHEN OTHERS THEN
-                        raise notice 'Got %', SQLERRM;
-                        Raise notice 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-                        Raise notice '%', query;
-                        return 'FAIL';
-        END;
-        Raise Notice 'Ending - Checking rows_where condition';
-
-        garbage := 'garbage001';
-        incre := 1;
-        Raise Notice 'Starting - Checking temporary column';
-        Begin
-                raise debug 'Checking Checking temporary columns existance';
-
-                While True
-                        Loop
-                                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(garbage) ||')' into naming;
-                                If naming.pgr_iscolumnintable = 't' THEN
-                                        incre := incre + 1;
-                                        garbage := 'garbage00'||incre||'';
-                                ELSE
-                                        EXIT;
-                                END IF;
-                        End Loop;
-        End;
-        Raise Notice 'Ending - Checking temporary column';
-
-        Raise Notice 'Starting - Calculating subgraphs';
-        BEGIN
-                --------- Add necessary columns ----------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(subgraph) || ' INTEGER DEFAULT -1';
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(garbage) || ' INTEGER DEFAULT 0';
-                graph_id := 1;
-
-                EXECUTE 'select count(*) as count from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where ||'' into rec_count;
-                if rec_count.count = 0 then
-                        RETURN 'rows_where condition generated 0 rows';
-                end if;
-
-                WHILE TRUE
-                        LOOP
-                                ---------- Assign the very first -1 row graph_id ----------
-                                EXECUTE 'SELECT ' || pgr_quote_ident(id) || ' AS gid FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1 LIMIT 1' INTO rec_single;
-                                EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec_single.gid || '';
-
-                                --------- Search other rows with that particular graph_id -----------
-                                WHILE TRUE
-                                        LOOP
-                                                EXECUTE 'SELECT COUNT(*) FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0' into rec_count;
-                                                ----------- The following if else will check those rows which already have entertained ------------
-                                                IF (rec_count.count > 0) THEN
-                                                        sql1 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0';
-                                                        FOR rec1 IN EXECUTE sql1
-                                                                LOOP
-                                                                        sql2 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| pgr_quote_ident(source) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(source) ||' = '|| rec1.target ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.target ||'';
-                                                                        FOR rec2 IN EXECUTE sql2
-                                                                                LOOP
-                                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec2.gid || '';
-                                                                                END LOOP;
-                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(garbage) || ' = 1 WHERE ' || pgr_quote_ident(id) || ' = ' || rec1.gid || '';
-                                                                END LOOP;
-                                                ELSE
-                                                        EXIT;
-                                                END IF;
-                                        END LOOP;
-
-                                ------ Following is to exit the while loop. 0 means no more -1 id.
-                                EXECUTE 'SELECT COUNT(*) AS count FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1' INTO rec_count;
-                                If (rec_count.count = 0) THEN
-                                        EXIT;
-                                ELSE
-                                        graph_id := graph_id + 1;
-                                END IF;
-                        END LOOP;
-
-                ----------- Drop garbage column ------------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' DROP COLUMN ' || pgr_quote_ident(garbage) ||'';
-                Raise Notice 'Successfully complicated calculating subgraphs';
-        END;
-        Raise Notice 'Ending - Calculating subgraphs';
-
-        RETURN 'OK';
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCostMatrix(
-    edges_sql TEXT,
-    points_sql TEXT,
-    pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_pid, a.end_pid, a.agg_cost
-        FROM _pgr_withPoints($1, $2, $3, $3, $4,  $5, TRUE, TRUE) AS a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
---  DIJKSTRA DMatrix
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2, $2, $3, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
---  BIDIRECTIONAL DIJKSTRA Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_astarCostMatrix(
-    edges_sql TEXT, -- XY edges sql
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2, $2, $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
---  BIDIRECTIONAL ASTAR Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdAstarCostMatrix(
-    edges_sql TEXT,
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_bdAstarCostMatrix(TEXT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCostMatrix';
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_getTableName(IN tab text,OUT sname text,OUT tname text)
-RETURNS RECORD AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getTableName: This function will no longer be soported';
-    select * from _pgr_getTableName(tab, 0, 'pgr_getTableName') into sname,tname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_getColumnName(tab text, col text)
-RETURNS text AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getColumnName: This function will no longer be soported';
-    return _pgr_getColumnName(tab,col, 0, 'pgr_getColumnName');
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    select * from _pgr_getColumnName(tab,col,0, 'pgr_isColumnInTable') into cname;
-    return  cname IS not NULL;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnIndexed(tab text, col text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnIndexed: This function will no longer be soported';
-    return  _pgr_isColumnIndexed(tab,col);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-create or replace function pgr_quote_ident(idname text)
-returns text as
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    return  _pgr_quote_ident(idname);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_versionless(v1 text, v2 text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_versionless: This function will no longer be soported';
-    return  _pgr_versionless(v1,v2);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-create or replace function pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_startPoint: This function will no longer be soported';
-    return  _pgr_startPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_endPoint: This function will no longer be soported';
-    return  _pgr_endPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspJohnson(edges_sql text)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_johnson instead';
-      has_reverse =_pgr_parameter_check('johnson', edges_sql, false);
-      sql = edges_sql;
-      IF (has_reverse) THEN
-           RAISE NOTICE 'reverse_cost column found, removing.';
-           sql = 'SELECT source, target, cost FROM (' || edges_sql || ') a';
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () - 1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_johnson(sql, TRUE);
-  END
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspWarshall(edges_sql text, directed boolean, has_rcost boolean)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_floydWarshall instead';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-      sql := edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         ELSE raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () -1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_floydWarshall(sql, directed);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_astar(edges_sql TEXT, source_id INTEGER, target_id INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated signature pgr_astar(text, integer, integer, boolean, boolean)';
-    has_reverse =_pgr_parameter_check('astar', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost, x1,y1, x2, y2 FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-    FROM pgr_astar(sql, ARRAY[$2], ARRAY[$3], directed);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    sql TEXT,
-    source_vid INTEGER,
-    target_vid INTEGER,
-    directed BOOLEAN,
-    has_reverse_cost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdAstar';
-    has_reverse =_pgr_parameter_check('astar', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdAstar(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(edges_sql TEXT, start_vid INTEGER, end_vid INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdDijkstra';
-    has_reverse =_pgr_parameter_check('dijkstra', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdDijkstra(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstraPath(
-    sql text,
-    source INTEGER,
-    targets INTEGER ARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-    RETURNS SETOF pgr_costResult3 AS
-    $BODY$
-    DECLARE
-    has_reverse BOOLEAN;
-    new_sql TEXT;
-    result pgr_costResult3;
-    tmp pgr_costResult3;
-    sseq INTEGER;
-    i INTEGER;
-    BEGIN
-        RAISE NOTICE 'Deprecated function: Use pgr_dijkstra instead.';
-        has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-        new_sql = sql;
-        IF (array_ndims(targets) != 1) THEN
-            raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-
-        IF (has_reverse != has_rcost) THEN
-            IF (has_reverse) THEN
-                new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-            ELSE
-                raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-                USING ERRCODE = 'XX000';
-            END IF;
-        END IF;
-        SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-        sseq = 0; i = 1;
-        FOR result IN
-            SELECT seq, a.end_vid::INTEGER AS id1, a.node::INTEGER AS i2, a.edge::INTEGER AS id3, cost
-            FROM pgr_dijkstra(new_sql, source, targets, directed) a ORDER BY a.end_vid, seq LOOP
-            WHILE (result.id1 != targets[i]) LOOP
-                tmp.seq = sseq;
-                tmp.id1 = targets[i];
-                IF (targets[i] = source) THEN
-                    tmp.id2 = source;
-                    tmp.cost =0;
-                ELSE
-                    tmp.id2 = 0;
-                    tmp.cost = -1;
-                END IF;
-                tmp.id3 = -1;
-                RETURN next tmp;
-                i = i + 1;
-                sseq = sseq + 1;
-            END LOOP;
-        IF (result.id1 = targets[i] AND result.id3 != -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-        IF (result.id1 = targets[i] AND result.id3 = -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.id2 = source;
-            tmp.cost = 0;
-        ELSE
-            tmp.id2 = 0;
-            tmp.cost = -1;
-        END IF;
-        tmp.id3 = -1;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstracost(
-    sql text,
-    source INTEGER,
-    targets INTEGER array,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-result pgr_costResult;
-tmp pgr_costResult;
-sseq INTEGER;
-i INTEGER;
-BEGIN
-    RAISE NOTICE 'Deprecated function. Use pgr_dijkstraCost instead.';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    new_sql = sql;
-    IF (array_ndims(targets) != 1) THEN
-        raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-        USING ERRCODE = 'XX000';
-    END IF;
-
-
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-    sseq = 0; i = 1;
-    FOR result IN
-        SELECT ((row_number() over()) -1)::INTEGER, a.start_vid::INTEGER, a.end_vid::INTEGER, agg_cost
-        FROM pgr_dijkstraCost(new_sql, source, targets, directed) a ORDER BY end_vid LOOP
-        WHILE (result.id2 != targets[i]) LOOP
-            tmp.seq = sseq;
-            tmp.id1 = source;
-            tmp.id2 = targets[i];
-            IF (targets[i] = source) THEN
-                tmp.cost = 0;
-            ELSE
-                tmp.cost = -1;
-            END IF;
-            RETURN next tmp;
-            i = i + 1;
-            sseq = sseq + 1;
-        END LOOP;
-        IF (result.id2 = targets[i]) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = source;
-        tmp.id2 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.cost = 0;
-        ELSE
-            tmp.cost = -1;
-        END IF;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-create or replace function pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    returns integer as
-$body$
-
-declare
-    rr record;
-    pct float;
-    debuglevel text;
-
-begin
-    -- find the closest edge within tol distance
-    execute 'select * from ' || _pgr_quote_ident(edges) ||
-            ' where st_dwithin(''' || pnt::text ||
-            '''::geometry, the_geom, ' || tol || ') order by st_distance(''' || pnt::text ||
-            '''::geometry, the_geom) asc limit 1' into rr;
-
-    if rr.the_geom is not null then
-        -- deal with MULTILINESTRINGS
-        if geometrytype(rr.the_geom)='MULTILINESTRING' THEN
-            rr.the_geom := ST_GeometryN(rr.the_geom, 1);
-        end if;
-
-        -- project the point onto the linestring
-        execute 'show client_min_messages' into debuglevel;
-        SET client_min_messages='ERROR';
-        pct := st_line_locate_point(rr.the_geom, pnt);
-        execute 'set client_min_messages  to '|| debuglevel;
-
-        -- return the node we are closer to
-        if pct < 0.5 then
-            return rr.source;
-        else
-            return rr.target;
-        end if;
-    else
-        -- return a failure to find an edge within tol distance
-        return -1;
-    end if;
-end;
-$body$
-  language plpgsql volatile
-  cost 5;
-
-
-----------------------------------------------------------------------------
-
-create or replace function pgr_flipedges(ga geometry[])
-    returns geometry[] as
-$body$
-
-declare
-    nn integer;
-    i integer;
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_flipEdges';
-    -- get the count of edges, and return if only one edge
-    nn := array_length(ga, 1);
-    if nn=1 then
-        return ga;
-    end if;
-
-    -- determine if first needs to be flipped
-    g := _pgr_startpoint(ga[1]);
-
-    -- if the start of the first is connected to the second then it needs to be flipped
-    if _pgr_startpoint(ga[2])=g or _pgr_endpoint(ga[2])=g then
-        ga[1] := st_reverse(ga[1]);
-    end if;
-    g := _pgr_endpoint(ga[1]);
-
-    -- now if  the end of the last edge matchs the end of the current edge we need to flip it
-    for i in 2 .. nn loop
-        if _pgr_endpoint(ga[i])=g then
-            ga[i] := st_reverse(ga[i]);
-        end if;
-        -- save the end of this edge into the last end for the next cycle
-        g := _pgr_endpoint(ga[i]);
-    end loop;
-
-    return ga;
-end;
-$body$
-    language plpgsql immutable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_texttopoints(pnts text, srid integer DEFAULT(4326))
-    returns geometry[] as
-$body$
-
-declare
-    a text[];
-    t text;
-    p geometry;
-    g geometry[];
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_textToPoints';
-    -- convert commas to space and split on ';'
-    a := string_to_array(replace(pnts, ',', ' '), ';');
-    -- convert each 'x y' into a point geometry and concattenate into a new array
-    for t in select unnest(a) loop
-        p := st_pointfromtext('POINT(' || t || ')', srid);
-        g := g || p;
-    end loop;
-
-    return g;
-end;
-$body$
-    language plpgsql immutable;
-
------------------------------------------------------------------------
-
-create or replace function pgr_pointstovids(pnts geometry[], edges text, tol float8 DEFAULT(0.01))
-    returns integer[] as
-$body$
-
-declare
-    v integer[];
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_pointsToVids';
-    -- cycle through each point and locate the nearest edge and vertex on that edge
-    for g in select unnest(pnts) loop
-        v := v || pgr_pointtoedgenode(edges, g, tol);
-    end loop;
-
-    return v;
-end;
-$body$
-    language plpgsql stable;
-
-
-create or replace function pgr_pointstodmatrix(pnts geometry[], mode integer default (0), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    r record;
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_pointsToDMatrix';
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    -- create an id for each point in the array and unnest it into a table nodes in the with clause
-    for r in with nodes as (select row_number() over()::integer as id, p from (select unnest(pnts) as p) as foo)
-        -- compute a row of distances
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j,
-                case when mode=0
-                    then st_distance(a.p, b.p)
-                    else st_distance_sphere(a.p, b.p)
-                end as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i loop
-
-        -- you must concat an array[array[]] to make dmatrix[][]
-        -- concat the row of distances to the dmatrix
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-end;
-$body$
-    language plpgsql stable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_vidstodmatrix(IN vids integer[], IN pnts geometry[], IN edges text, tol float8 DEFAULT(0.1), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    i integer;
-    j integer;
-    nn integer;
-    rr record;
-    bbox geometry;
-    t float8[];
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    -- check if the input arrays has any -1 values, maybe this whould be a raise exception
-    if vids @> ARRAY[-1] then
-    raise notice 'Some vids are undefined (-1)!';
-    dmatrix := null;
-    ids := null;
-    return;
-    end if;
-
-    ids := vids;
-
-    -- get the count of nodes
-    nn := array_length(vids,1);
-
-    -- zero out a dummy row
-    for i in 1 .. nn loop
-        t := t || 0.0::float8;
-    end loop;
-
-    -- using the dummy row, zero out the whole matrix
-    for i in 1 .. nn loop
-    dmatrix := dmatrix || ARRAY[t];
-    end loop;
-
-    for i in 1 .. nn-1 loop
-        j := i;
-        -- compute the bbox for the point needed for this row
-        select st_expand(st_collect(pnts[id]), tol) into bbox
-          from (select generate_series as id from generate_series(i, nn)) as foo;
-
-        -- compute kdijkstra() for this row
-        for rr in execute 'select * from pgr_dijkstracost($1, $2, $3, false)'
-                  using 'select id, source, target, cost from ' || edges ||
-                        ' where the_geom && ''' || bbox::text || '''::geometry'::text, vids[i], vids[i+1:nn] loop
-
-            -- TODO need to check that all node were reachable from source
-            -- I think unreachable paths between nodes returns cost=-1.0
-
-            -- populate the matrix with the cost values, remember this is symmetric
-            j := j + 1;
-            -- raise notice 'cost(%,%)=%', i, j, rr.agg_cost;
-            dmatrix[i][j] := rr.agg_cost;
-            dmatrix[j][i] := rr.agg_cost;
-        end loop;
-    end loop;
-
-end;
-$body$
-    language plpgsql stable cost 200;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_vidsToDMatrix(sql TEXT, vids  INTEGER[], dir BOOLEAN, has_rcost BOOLEAN, want_symmetric BOOLEAN)
-RETURNS float8[] AS
-$BODY$
-DECLARE
-directed BOOLEAN;
-has_reverse BOOLEAN;
-edges_sql TEXT;
-dmatrix_row float8[];
-dmatrix float8[];
-cell RECORD;
-unique_vids INTEGER[];
-total BIGINT;
-from_v BIGINT;
-to_v BIGINT;
-BEGIN
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql = sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    unique_vids :=  ARRAY(SELECT DISTINCT UNNEST(vids) ORDER BY 1);
-
-    IF want_symmetric THEN
-        directed = false;
-    ELSE
-        directed = dir;
-    END IF;
-
-    total := array_length(unique_vids, 1);
-
-    -- initializing dmatrix
-    FOR i in 1 .. total LOOP
-        dmatrix_row := dmatrix_row || '+Infinity'::float8;
-    END LOOP;
-    FOR i in 1 .. total LOOP
-    dmatrix := dmatrix || ARRAY[dmatrix_row];
-    dmatrix[i][i] = 0;
-    END LOOP;
-
-    CREATE TEMP TABLE __x___y____temp AS
-        WITH result AS
-            (SELECT unnest(unique_vids) AS vid)
-        SELECT row_number() OVER() AS idx, vid FROM result;
-
-    FOR cell IN SELECT * FROM pgr_dijkstraCostMatrix(sql, unique_vids, directed) LOOP
-        SELECT idx INTO from_v FROM __x___y____temp WHERE vid =  cell.start_vid;
-        SELECT idx INTO to_v FROM __x___y____temp WHERE vid =  cell.end_vid;
-
-        dmatrix[from_v][to_v] = cell.agg_cost;
-        dmatrix[to_v][from_v] = cell.agg_cost;
-    END LOOP;
-
-    DROP TABLE IF EXISTS __x___y____temp;
-    RETURN dmatrix;
-
-    EXCEPTION WHEN others THEN
-       DROP TABLE IF EXISTS __x___y____temp;
-       raise exception '% %', SQLERRM, SQLSTATE;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated function';
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_dijkstra(sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_dijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN) IS 'pgr_dijkstra(Deprecated signature)';
-
-
-
-
-
--- OLD SIGNATURE
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(edges_sql text, source BIGINT, distance FLOAT, directed BOOLEAN, has_rcost BOOLEAN)
-  RETURNS SETOF pgr_costresult AS
-  $BODY$
-  DECLARE
-  has_reverse BOOLEAN;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function';
-
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, FALSE);
-
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-             -- the user says it doesn't have reverse cost but its false
-             -- removing from query
-             RAISE NOTICE 'Contradiction found: has_rcost set to false but reverse_cost column found';
-             sql = 'SELECT id, source, target, cost, -1 as reverse_cost FROM (' || edges_sql || ') __q ';
-         ELSE
-             -- the user says it has reverse cost but its false
-             -- can't do anything
-             RAISE EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query SELECT seq - 1 AS seq, node::integer AS id1, edge::integer AS id2, agg_cost AS cost
-                FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maximumcardinalitymatching(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---INTERNAL FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
-------------------------
--- deprecated signatures
------------------------
-
-COMMENT ON FUNCTION pgr_astar(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_astar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdAstar( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdAstar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdDijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdDijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_dijkstra(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_dijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_drivingDistance(text,  BIGINT,  FLOAT8,  BOOLEAN,  BOOLEAN)
-    IS 'pgr_drivingDistance(Deprecated signature)';
-
-------------------------
--- Renamed /deprecated
------------------------
-COMMENT ON FUNCTION pgr_apspJohnson(TEXT)
-    IS 'pgr_apspJohnson(Renamed function) use pgr_Johnson instead';
-
-COMMENT ON FUNCTION pgr_apspWarshall(text, boolean, boolean)
-    IS 'pgr_apspWarshall(Renamed function) use pgr_floydWarshall instead';
-
-COMMENT ON FUNCTION pgr_kdijkstraPath( text, INTEGER, INTEGER ARRAY, BOOLEAN, BOOLEAN)
-    IS 'pgr_kdijkstraPath(Renamed function) use pgr_dijkstra instead';
-
-COMMENT ON FUNCTION pgr_kdijkstracost( text, INTEGER, INTEGER array, BOOLEAN, BOOLEAN)
-    IS 'pgr_kDijkstraCost(Renamed function) use pgr_dijkstraCost instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-
-
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-
-
-COMMENT ON FUNCTION pgr_gsoc_vrppdtw( text, INTEGER, INTEGER)
-    IS 'pgr_gsoc_vrppdtw(Renamed function) use pgr_pickDeliverEuclidean instead';
-
-------------------------
--- Deprecated functions
------------------------
-
-COMMENT ON FUNCTION pgr_flipedges(geometry[])
-    IS 'pgr_flipedges(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_texttopoints(text,  integer)
-    IS 'pgr_texttopoints(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstovids(pnts geometry[], edges text, tol float8)
-    IS 'pgr_pointstovids(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    IS 'pgr_pointtoedgenode(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstodmatrix(geometry[], integer)
-    IS 'pgr_pointstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidstodmatrix( integer[],  geometry[],  text, float8)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidsToDMatrix(TEXT,  INTEGER[], BOOLEAN, BOOLEAN, BOOLEAN)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-
-
-
-COMMENT ON FUNCTION pgr_getTableName(IN tab text)
-    IS 'pgr_getTableName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_getColumnName(tab text, col text)
-    IS 'pgr_getColumnName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnInTable(tab text, col text)
-    IS 'pgr_isColumnInTable(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnIndexed(tab text, col text)
-    IS 'pgr_isColumnIndexed(Deprecated function)';
-
-
-COMMENT ON FUNCTION pgr_quote_ident(idname text)
-    IS 'pgr_quote_ident(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_versionless(v1 text, v2 text)
-    IS 'pgr_versionless(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_startPoint(g geometry)
-    IS 'pgr_startPoint(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_endPoint(g geometry)
-    IS 'pgr_endPoint(Deprecated function)';
-
-
diff --git a/tools/sql-update-scripts/pgrouting--2.4.2--2.5.2.sql b/tools/sql-update-scripts/pgrouting--2.4.2--2.5.2.sql
deleted file mode 100644
index da99096..0000000
--- a/tools/sql-update-scripts/pgrouting--2.4.2--2.5.2.sql
+++ /dev/null
@@ -1,6522 +0,0 @@
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- pgRouting extension upgrade from 2.4.2 to 2.5.2
--- generated by tools/build-extension-update-files
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-\echo Use "ALTER extension pgrouting update to '2.5.2'" to load this file. \quit
-
-
--------------------------------------
--- remove functions no longer in the 2.5.2 extension
--------------------------------------
-
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_astar(text,anyarray,anyarray,boolean,integer,double precision,double precision,boolean);
-DROP FUNCTION IF EXISTS _pgr_astar(text,anyarray,anyarray,boolean,integer,double precision,double precision,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_astar(text,anyarray,bigint,boolean,integer,double precision,double precision,boolean);
-DROP FUNCTION IF EXISTS _pgr_astar(text,anyarray,bigint,boolean,integer,double precision,double precision,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_astar(text,bigint,anyarray,boolean,integer,double precision,double precision,boolean);
-DROP FUNCTION IF EXISTS _pgr_astar(text,bigint,anyarray,boolean,integer,double precision,double precision,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_astar(text,bigint,bigint,boolean,integer,double precision,double precision,boolean);
-DROP FUNCTION IF EXISTS _pgr_astar(text,bigint,bigint,boolean,integer,double precision,double precision,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_bddijkstra(text,bigint,bigint,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_bddijkstra(text,bigint,bigint,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,anyarray,bigint,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,anyarray,bigint,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,bigint,anyarray,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,bigint,anyarray,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_dijkstra(text,bigint,bigint,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_dijkstra(text,bigint,bigint,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_maxflow(text,anyarray,anyarray,text,boolean);
-DROP FUNCTION IF EXISTS _pgr_maxflow(text,anyarray,anyarray,text,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_maxflow(text,anyarray,bigint,text,boolean);
-DROP FUNCTION IF EXISTS _pgr_maxflow(text,anyarray,bigint,text,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_maxflow(text,bigint,anyarray,text,boolean);
-DROP FUNCTION IF EXISTS _pgr_maxflow(text,bigint,anyarray,text,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_maxflow(text,bigint,bigint,text,boolean);
-DROP FUNCTION IF EXISTS _pgr_maxflow(text,bigint,bigint,text,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_pickdeliver(text,integer,double precision,double precision,integer);
-DROP FUNCTION IF EXISTS _pgr_pickdeliver(text,integer,double precision,double precision,integer);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,anyarray,anyarray,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,anyarray,anyarray,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,anyarray,bigint,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,anyarray,bigint,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,bigint,anyarray,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,bigint,anyarray,boolean,character,boolean,boolean);
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION _pgr_withpoints(text,text,bigint,bigint,boolean,character,boolean,boolean);
-DROP FUNCTION IF EXISTS _pgr_withpoints(text,text,bigint,bigint,boolean,character,boolean,boolean);
-
-
-------------------------------------------
---       New functions:  2.3
---    Signature change:  2.5
--- Inner query changed:  2.5
-------------------------------------------
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_edgedisjointpaths(text,bigint,bigint,boolean);
-DROP FUNCTION IF EXISTS pgr_edgedisjointpaths(text,bigint,bigint,boolean);
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_edgedisjointpaths(text,bigint,anyarray,boolean);
-DROP FUNCTION IF EXISTS pgr_edgedisjointpaths(text,bigint,anyarray,boolean);
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_edgedisjointpaths(text,anyarray,bigint,boolean);
-DROP FUNCTION IF EXISTS pgr_edgedisjointpaths(text,anyarray,bigint,boolean);
-
-
-
-ALTER EXTENSION pgrouting DROP FUNCTION pgr_edgedisjointpaths(text,anyarray,anyarray,boolean);
-DROP FUNCTION IF EXISTS pgr_edgedisjointpaths(text,anyarray,anyarray,boolean);
-
-
-
-
-
-
-
-
-
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
---- pgRouting provides geospatial routing functionality.
---- http://pgrouting.org
---- copyright
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
----
---- This is free software; you can redistribute and/or modify it:
---- the terms of the GNU General Public Licence. See the COPYING file.
---- the terms of the MIT-X Licence. See the COPYING file.
----
---- The following functions have MIT-X licence:
----     pgr_version()
----     pgr_tsp(matrix float8[][], startpt integer, endpt integer DEFAULT -1, OUT seq integer, OUT id integer)
----     _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
----     pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
----
----
---- All other functions are under GNU General Public Licence.
----
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
--- WARNING: Any change in this file must be evaluated for compatibility.
---          Changes cleanly handled by postgis_upgrade.sql are fine,
---          other changes will require a bump in Major version.
---          Currently only function replaceble by CREATE OR REPLACE
---          are cleanly handled.
---
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
---  pgRouting 2.0 types
-
-
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_version()
-RETURNS TABLE(
-        "version" varchar,
-        tag varchar,
-        hash varchar,
-        branch varchar,
-        boost varchar
-    ) AS
-$BODY$
-    SELECT '2.5.2'::varchar AS version,
-        'v2.5.2'::varchar AS tag,
-        '60585f1f7'::varchar AS hash,
-        'master'::varchar AS branch,
-        '1.54.0'::varchar AS boost;
-$BODY$
-LANGUAGE sql IMMUTABLE;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getTableName(IN tab text, IN reportErrs int default 0, IN fnName text default '_pgr_getTableName', OUT sname text,OUT tname text)
-  RETURNS RECORD AS
-$$
-DECLARE
-        naming record;
-        i integer;
-        query text;
-        sn text; -- schema name
-        tn text; -- table name
-        ttype text; --table type for future use
-        err boolean;
-        debuglevel text;
-        var_types text[] = ARRAY['BASE TABLE', 'VIEW'];
-BEGIN
-
-    execute 'show client_min_messages' into debuglevel;
-
-
-    perform _pgr_msg( 0, fnName, 'Checking table ' || tab || ' exists');
-    --RAISE DEBUG 'Checking % exists',tab;
-
-    i := strpos(tab,'.');
-    IF (i <> 0) THEN
-        sn := split_part(tab, '.',1);
-        tn := split_part(tab, '.',2);
-    ELSE
-        sn := current_schema;
-        tn := tab;
-    END IF;
-
-
-   SELECT schema_name INTO sname
-   FROM information_schema.schemata WHERE schema_name = sn;
-
-    IF sname IS NOT NULL THEN -- found schema (as is)
-       SELECT table_name, table_type INTO tname, ttype
-       FROM information_schema.tables
-       WHERE
-                table_type = ANY(var_types) and
-                table_schema = sname and
-                table_name = tn ;
-        IF tname is NULL THEN
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  = ANY(var_types) and
-                table_schema = sname and
-                table_name = lower(tn) ORDER BY table_name;
-        END IF;
-    END IF;
-    IF sname is NULL or tname is NULL THEN --schema not found or table not found
-        SELECT schema_name INTO sname
-        FROM information_schema.schemata
-        WHERE schema_name = lower(sn) ;
-
-        IF sname IS NOT NULL THEN -- found schema (with lower caps)
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  =  ANY(var_types) and
-                table_schema = sname and
-                table_name= tn ;
-
-           IF tname IS NULL THEN
-                SELECT table_name, table_type INTO tname, ttype
-                FROM information_schema.tables
-                WHERE
-                    table_type  =  ANY(var_types) and
-                    table_schema = sname and
-                    table_name= lower(tn) ;
-           END IF;
-        END IF;
-    END IF;
-   err = (sname IS NULL OR tname IS NULL);
-   perform _pgr_onError(err, reportErrs, fnName, 'Table ' || tab ||' not found',' Check your table name', 'Table '|| tab || ' found');
-
-END;
-$$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(sname text, tname text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(col) into cname;
-
-    IF cname is null  THEN
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(lower(col))  into cname;
-    END if;
-
-    err = cname is null;
-
-    perform _pgr_onError(err, reportErrs, fnName,  'Column '|| col ||' not found', ' Check your column name','Column '|| col || ' found');
-    RETURN cname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(tab text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-
-    select * into cname from _pgr_getColumnName(sname,tname,col,reportErrs, fnName);
-    RETURN cname;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    select * from _pgr_getColumnName(tab,col,0, '_pgr_isColumnInTable') into cname;
-    return cname is not null;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(sname text, tname text, cname text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    pkey text;
-BEGIN
-    SELECT
-          pg_attribute.attname into pkey
-         --  format_type(pg_attribute.atttypid, pg_attribute.atttypmod)
-          FROM pg_index, pg_class, pg_attribute
-          WHERE
-                  pg_class.oid = _pgr_quote_ident(sname||'.'||tname)::regclass AND
-                  indrelid = pg_class.oid AND
-                  pg_attribute.attrelid = pg_class.oid AND
-                  pg_attribute.attnum = any(pg_index.indkey)
-                  AND indisprimary;
-
-    IF pkey=cname then
-          RETURN TRUE;
-    END IF;
-
-    SELECT a.index_name,
-           b.attname,
-           b.attnum,
-           a.indisunique,
-           a.indisprimary
-      INTO rec
-      FROM ( SELECT a.indrelid,
-                    a.indisunique,
-                    a.indisprimary,
-                    c.relname index_name,
-                    unnest(a.indkey) index_num
-               FROM pg_index a,
-                    pg_class b,
-                    pg_class c,
-                    pg_namespace d
-              WHERE b.relname=tname
-                AND b.relnamespace=d.oid
-                AND d.nspname=sname
-                AND b.oid=a.indrelid
-                AND a.indexrelid=c.oid
-           ) a,
-           pg_attribute b
-     WHERE a.indrelid = b.attrelid
-       AND a.index_num = b.attnum
-       AND b.attname = cname
-  ORDER BY a.index_name,
-           a.index_num;
-
-  RETURN FOUND;
-  EXCEPTION WHEN OTHERS THEN
-    perform _pgr_onError( true, reportErrs, fnName,
-    'Error when checking for the postgres system attributes', SQLERR);
-    RETURN FALSE;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(tab text, col text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    sname text;
-    tname text;
-    cname text;
-    pkey text;
-    value boolean;
-BEGIN
-    SELECT * into naming FROM _pgr_getTableName(tab, 0, fnName);
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    SELECT * into cname from _pgr_getColumnName(sname, tname, col, 0, fnName) ;
-    IF cname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    select * into value  from _pgr_isColumnIndexed(sname, tname, cname, reportErrs, fnName);
-    return value;
-END
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-create or replace function _pgr_quote_ident(idname text)
-    returns text as
-$body$
-declare
-    t text[];
-    pgver text;
-
-begin
-    pgver := regexp_replace(version(), E'^PostgreSQL ([^ ]+)[ ,].*$', E'\\1');
-
-    if _pgr_versionless(pgver, '9.2') then
-        select into t array_agg(quote_ident(term)) from
-            (select nullif(unnest, '') as term
-               from unnest(string_to_array(idname, '.'))) as foo;
-    else
-        select into t array_agg(quote_ident(term)) from
-            (select unnest(string_to_array(idname, '.', '')) as term) as foo;
-    end if;
-    return array_to_string(t, '.');
-end;
-$body$
-language plpgsql immutable;
-
-
-CREATE OR REPLACE FUNCTION _pgr_versionless(v1 text, v2 text)
-  RETURNS boolean AS
-$BODY$
-
-
-declare
-    v1a text[];
-    v2a text[];
-    nv1 integer;
-    nv2 integer;
-    ne1 integer;
-    ne2 integer;
-
-begin
-    -- separate components into an array, like:
-    -- '2.1.0-beta3dev'  =>  {2,1,0,beta3dev}
-    v1a := regexp_matches(v1, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-    v2a := regexp_matches(v2, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-
-    -- convert modifiers to numbers for comparison
-    -- we do not delineate between alpha1, alpha2, alpha3, etc
-    ne1 := case when v1a[4] is null or v1a[4]='' then 5
-                when v1a[4] ilike 'rc%' then 4
-                when v1a[4] ilike 'beta%' then 3
-                when v1a[4] ilike 'alpha%' then 2
-                when v1a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    ne2 := case when v2a[4] is null or v2a[4]='' then 5
-                when v2a[4] ilike 'rc%' then 4
-                when v2a[4] ilike 'beta%' then 3
-                when v2a[4] ilike 'alpha%' then 2
-                when v2a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    nv1 := v1a[1]::integer * 10000 +
-           coalesce(v1a[2], '0')::integer * 1000 +
-           coalesce(v1a[3], '0')::integer *  100 + ne1;
-    nv2 := v2a[1]::integer * 10000 +
-           coalesce(v2a[2], '0')::integer * 1000 +
-           coalesce(v2a[3], '0')::integer *  100 + ne2;
-
-    --raise notice 'nv1: %, nv2: %, ne1: %, ne2: %', nv1, nv2, ne1, ne2;
-
-    return nv1 < nv2;
-end;
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-create or replace function _pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_startpoint(st_geometryn(g,1));
-    else
-        return st_startpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function _pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_endpoint(st_geometryn(g,1));
-    else
-        return st_endpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_parameter_check(fn text, sql text, big boolean default false)
-  RETURNS bool AS
-  $BODY$
-
-  DECLARE
-  rec record;
-  rec1 record;
-  has_rcost boolean;
-  safesql text;
-  BEGIN
-    IF (big) THEN
-       RAISE EXCEPTION 'This function is for old style functions';
-    END IF;
-
-    -- checking query is executable
-    BEGIN
-      safesql =  'select * from ('||sql||' ) AS __a__ limit 1';
-      execute safesql into rec;
-      EXCEPTION
-        WHEN OTHERS THEN
-            RAISE EXCEPTION 'Could not execute query please verify syntax of: '
-              USING HINT = sql;
-    END;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('dijkstra','astar') THEN
-        BEGIN
-          execute 'select id,source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: id, source, target, cost';
-        END;
-        execute 'select pg_typeof(id)::text as id_type, pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.id_type in ('integer'::text))
-              AND (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Error, columns ''source'', ''target'' must be of type int4, ''cost'' must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    IF fn IN ('astar') THEN
-        BEGIN
-          execute 'select x1,y1,x2,y2  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: x1,y1, x2,y2';
-        END;
-        execute 'select pg_typeof(x1)::text as x1_type, pg_typeof(y1)::text as y1_type, pg_typeof(x2)::text as x2_type, pg_typeof(y2)::text as y2_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.x1_type = 'double precision'::text)
-              AND (rec.y1_type = 'double precision'::text)
-              AND (rec.x2_type = 'double precision'::text)
-              AND (rec.y2_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Columns: x1, y1, x2, y2 must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('johnson') THEN
-        BEGIN
-          execute 'select source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING HINT = 'Please veryfy the column names: id, source, target, cost',
-                         ERRCODE = 'XX000';
-        END;
-
-        execute 'select pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Support for source,target columns only of type: integer. Support for Cost: double precision'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    -- Checking the data types of the optional reverse_cost";
-    has_rcost := false;
-    IF fn IN ('johnson','dijkstra','astar') THEN
-      BEGIN
-        execute 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||safesql||' ) AS __b__ limit 1 ' into rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-            return has_rcost;
-      END;
-      if (has_rcost) then
-        IF (big) then
-           IF  not (rec1.rev_type in ('bigint'::text, 'integer'::text, 'smallint'::text, 'double precision'::text, 'real'::text)) then
-             RAISE EXCEPTION 'Illegar type in optional parameter reverse_cost.'
-             USING ERRCODE = 'XX000';
-           END IF;
-        ELSE -- Version 2.0.0 is more restrictive
-           IF (rec1.rev_type != 'double precision') then
-             RAISE EXCEPTION 'Illegal type in optional parameter reverse_cost, must be of type float8'
-             USING ERRCODE = 'XX000';
-           END IF;
-        END IF;
-      end if;
-      return true;
-    END IF;
-    -- just for keeps
-    return true;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_onError(
-  IN errCond boolean,  -- true there is an error
-  IN reportErrs int,   -- 0, 1 or 2
-  IN fnName text,      -- function name that generates the error
-  IN msgerr text,      -- error message
-  IN hinto text default 'No hint', -- hint help
-  IN msgok text default 'OK')      -- message if everything is ok
-  RETURNS void AS
-$BODY$
-BEGIN
-  if errCond=true then
-     if reportErrs=0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-     else
-       if reportErrs = 2 then
-         raise notice '----> PGR ERROR in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-         raise raise_exception;
-       else
-         raise notice '----> PGR NOTICE in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-       end if;
-     end if;
-  else
-       raise debug 'PGR ----> %: %',fnName,msgok;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_msg(IN msgKind int, IN fnName text, IN msg text default '---->OK')
-  RETURNS void AS
-$BODY$
-BEGIN
-  if msgKind = 0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msg;
-  else
-       raise notice '----> PGR NOTICE in %: %',fnName,msg;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(sname text, tname text, cname text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    EXECUTE 'select data_type  from information_schema.columns '
-            || 'where table_name = '||quote_literal(tname)
-                 || ' and table_schema=' || quote_literal(sname)
-                 || ' and column_name='||quote_literal(cname)
-       into ctype;
-    err = ctype is null;
-    perform _pgr_onError(err, reportErrs, fnName,
-            'Type of Column '|| cname ||' not found',
-            'Check your column name',
-            'OK: Type of Column '|| cname || ' is ' || ctype);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(tab text, col text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-    select * into cname from _pgr_getColumnName(tab,col,reportErrs, fnName) ;
-    select * into ctype from _pgr_getColumnType(sname,tname,cname,reportErrs, fnName);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_get_statement(o_sql text)
-RETURNS text AS
-$BODY$
-DECLARE
-sql TEXT;
-BEGIN
-    EXECUTE 'SELECT statement FROM pg_prepared_statements WHERE name ='  || quote_literal(o_sql) || ' limit 1 ' INTO sql;
-    IF (sql IS NULL) THEN
-      RETURN   o_sql;
-    ELSE
-      RETURN  regexp_replace(sql, '(.)* as ', '', 'i');
-    END IF;
-END
-$BODY$
-LANGUAGE plpgsql STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_checkVertTab(vertname text, columnsArr  text[],
-    IN reportErrs int default 1, IN fnName text default '_pgr_checkVertTab',
-    OUT sname text,OUT vname text)
-RETURNS record AS
-$BODY$
-DECLARE
-    cname text;
-    colname text;
-    naming record;
-    debuglevel text;
-    err  boolean;
-    msgKind int;
-
-BEGIN
-    msgKind = 0; -- debug_
-    execute 'show client_min_messages' into debuglevel;
-
-    perform _pgr_msg(msgKind, fnName, 'Checking table ' || vertname || ' exists');
-       select * from _pgr_getTableName(vertname, 0, fnName) into naming;
-       sname=naming.sname;
-       vname=naming.tname;
-       err = sname is NULL or vname is NULL;
-    perform _pgr_onError( err, 2, fnName,
-          'Vertex Table: ' || vertname || ' not found',
-          'Please create ' || vertname || ' using  _pgr_createTopology() or pgr_createVerticesTable()',
-          'Vertex Table: ' || vertname || ' found');
-
-
-    perform _pgr_msg(msgKind, fnName, 'Checking columns of ' || vertname);
-      FOREACH cname IN ARRAY columnsArr
-      loop
-         select _pgr_getcolumnName(vertname, cname, 0, fnName) into colname;
-         if colname is null then
-           perform _pgr_msg(msgKind, fnName, 'Adding column ' || cname || ' in ' || vertname);
-           set client_min_messages  to warning;
-                execute 'ALTER TABLE '||_pgr_quote_ident(vertname)||' ADD COLUMN '||cname|| ' integer';
-           execute 'set client_min_messages  to '|| debuglevel;
-           perform _pgr_msg(msgKind, fnName);
-         end if;
-      end loop;
-    perform _pgr_msg(msgKind, fnName, 'Finished checking columns of ' || vertname);
-
-    perform _pgr_createIndex(vertname , 'id' , 'btree', reportErrs, fnName);
- END
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(
-    sname text, tname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    debuglevel text;
-    naming record;
-    tabname text;
-    query text;
-    msgKind int;
-BEGIN
-  msgKind = 0; -- debug_
-
-  execute 'show client_min_messages' into debuglevel;
-  tabname=_pgr_quote_ident(sname||'.'||tname);
-  perform _pgr_msg(msgKind, fnName, 'Checking ' || colname || ' column in ' || tabname || ' is indexed');
-    IF (_pgr_isColumnIndexed(sname,tname,colname, 0, fnName)) then
-       perform _pgr_msg(msgKind, fnName);
-    else
-      if indext = 'gist' then
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using gist('||quote_ident(colname)||')';
-      else
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using btree('||quote_ident(colname)||')';
-      end if;
-      perform _pgr_msg(msgKind, fnName, 'Adding index ' || tabname || '_' ||  colname || '_idx');
-      perform _pgr_msg(msgKind, fnName, ' Using ' ||  query);
-      set client_min_messages  to warning;
-      BEGIN
-        execute query;
-        EXCEPTION WHEN others THEN
-          perform _pgr_onError( true, reportErrs, fnName,
-            'Could not create index on:' || colname, SQLERRM);
-      END;
-      execute 'set client_min_messages  to '|| debuglevel;
-      perform _pgr_msg(msgKind, fnName);
-    END IF;
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(tabname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    naming record;
-    sname text;
-    tname text;
-
-BEGIN
-    select * from _pgr_getTableName(tabname, 2, fnName)  into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    execute _pgr_createIndex(sname, tname, colname, indext, reportErrs, fnName);
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pointToId(
-    point geometry,
-    tolerance double precision,
-    vertname text,
-    srid integer)
-
-  RETURNS bigint AS
-$BODY$
-DECLARE
-    rec record;
-    pid bigint;
-
-BEGIN
-    EXECUTE 'SELECT ST_Distance(
-        the_geom,
-        ST_GeomFromText(ST_AsText('
-                || quote_literal(point::text)
-                || '),'
-            || srid ||')) AS d, id, the_geom
-    FROM '||_pgr_quote_ident(vertname)||'
-    WHERE ST_DWithin(
-        the_geom,
-        ST_GeomFromText(
-            ST_AsText(' || quote_literal(point::text) ||'),
-            ' || srid || '),' || tolerance||')
-    ORDER BY d
-    LIMIT 1' INTO rec ;
-    IF rec.id IS NOT NULL THEN
-        pid := rec.id;
-    ELSE
-        execute 'INSERT INTO '||_pgr_quote_ident(vertname)||' (the_geom) VALUES ('||quote_literal(point::text)||')';
-        pid := lastval();
-END IF;
-
-RETURN pid;
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'many_to_many_dijkstra'
-LANGUAGE c VOLATILE;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer, OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstra(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(Many to Many)';
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraVia(
-    edges_sql TEXT,
-    via_vertices ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    strict BOOLEAN DEFAULT FALSE,
-    U_turn_on_edge BOOLEAN DEFAULT TRUE,
-
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'dijkstraVia'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_johnson(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'johnson'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_floydWarshall(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'floydWarshall'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'astarManyToMany'
-LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, normal:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to Many)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true, normal:=false) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to Many)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid ANYARRAY,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-    equicost BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'many_withPointsDD'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_withPointsDD($1, $2, ARRAY[$3]::BIGINT[], $4, $5, $6, $7, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vids anyarray,
-    distance FLOAT,
-    directed BOOLEAN DEFAULT TRUE,
-    equicost BOOLEAN DEFAULT FALSE,
-    OUT seq integer,
-    OUT from_v  bigint,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'driving_many_to_dist'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vid bigint,
-    distance FLOAT8,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq integer,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer, directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'kshortest_path'
-    LANGUAGE c STABLE STRICT;
-
--- V2 the graph is directed and there are no heap paths
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid integer, end_vid integer, k integer, has_rcost boolean)
-  RETURNS SETOF pgr_costresult3 AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated signature of pgr_ksp';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql::text, false);
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_rcost) THEN
-           -- user says that it has reverse_cost but its not true
-           RAISE EXCEPTION 'has_reverse_cost set to true but reverse_cost not found';
-         ELSE
-           -- user says that it does not have reverse_cost but it does have it
-           -- to ignore we remove reverse_cost from the query
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         END IF;
-      END IF;
-
-      RETURN query SELECT ((row_number() over()) -1)::integer  AS seq,  (path_id - 1)::integer AS id1, node::integer AS id2, edge::integer AS id3, cost
-            FROM _pgr_ksp(sql::text, start_vid, end_vid, k, TRUE, FALSE) WHERE path_id <= k;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer,
-  directed boolean default true, heap_paths boolean default false,
-  --directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  BEGIN
-         RETURN query SELECT *
-                FROM _pgr_ksp(edges_sql::text, start_vid, end_vid, k, directed, heap_paths);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsKSP(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    k INTEGER,
-
-    directed BOOLEAN DEFAULT TRUE,
-    heap_paths BOOLEAN DEFAULT FALSE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER, OUT path_id INTEGER, OUT path_seq INTEGER,
-    OUT node BIGINT, OUT edge BIGINT,
-    OUT cost FLOAT, OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'withPoints_ksp'
-    LANGUAGE c STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_unnest_matrix(matrix float8[][], OUT start_vid integer, OUT end_vid integer, out agg_cost float8)
-RETURNS SETOF record AS
-
-$body$
-DECLARE
-
-m float8[];
-
-BEGIN
-    start_vid = 1;
-    foreach m slice 1 in  ARRAY matrix
-    LOOP
-        end_vid = 1;
-        foreach agg_cost in  ARRAY m
-        LOOP
-            RETURN next;
-            end_vid = end_vid + 1;
-        END LOOP;
-        start_vid = start_vid + 1;
-    END LOOP;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_tsp(
-    matrix float8[][],
-    startpt INTEGER,
-    endpt INTEGER DEFAULT -1,
-    OUT seq INTEGER,
-    OUT id INTEGER)
-RETURNS SETOF record AS
-$body$
-DECLARE
-table_sql TEXT;
-debuglevel TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(float8[][], integer, integer)';
-
-    CREATE TEMP TABLE ___tmp2 ON COMMIT DROP AS SELECT * FROM _pgr_unnest_matrix( matrix );
-
-
-    startpt := startpt + 1;
-    IF endpt = -1 THEN endpt := startpt;
-    END IF;
-
-
-    RETURN QUERY
-    WITH
-    result AS (
-        SELECT * FROM pgr_TSP(
-        $$SELECT * FROM ___tmp2 $$,
-        startpt, endpt,
-
-        tries_per_temperature :=  500 :: INTEGER,
-        max_changes_per_temperature := 30 :: INTEGER,
-        max_consecutive_non_changes := 500 :: INTEGER,
-
-        randomize:=false)
-    )
-    SELECT (row_number() over(ORDER BY result.seq) - 1)::INTEGER AS seq, (result.node - 1)::INTEGER AS id
-
-    FROM result WHERE NOT(result.node = startpt AND result.seq != 1);
-
-    DROP TABLE ___tmp2;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-
-
-CREATE OR  REPLACE FUNCTION pgr_tsp(sql text, start_id INTEGER, end_id INTEGER default (-1))
-returns setof pgr_costResult as
-$body$
-DECLARE
-table_sql TEXT;
-rec RECORD;
-debuglevel TEXT;
-n BIGINT;
-
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(sql, integer, integer)';
-
-    table_sql := 'CREATE TEMP TABLE ___tmp ON COMMIT DROP AS ' || sql ;
-    EXECUTE table_sql;
-
-
-    BEGIN
-        EXECUTE 'SELECT id, x, y FROM ___tmp' INTO rec;
-        EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                USING ERRCODE = 'XX000',
-                HINT = 'Please verify the column names: id, x, y';
-    END;
-
-    EXECUTE
-    'SELECT
-        pg_typeof(id)::text as id_type,
-        pg_typeof(x)::text as x_type,
-        pg_typeof(y)::text as y_type FROM ___tmp' INTO rec;
-
-
-    IF NOT((rec.id_type in ('integer'::text))
-        AND (rec.x_type = 'double precision'::text)
-        AND (rec.y_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION '''id'' must be of type INTEGER, ''x'' ad ''y'' must be of type FLOAT'
-            USING ERRCODE = 'XX000';
-    END IF;
-
-    EXECUTE 'SELECT count(*) AS n FROM (' || sql || ') AS __a__' INTO rec;
-    n = rec.n;
-
-    RETURN query
-        SELECT (seq - 1)::INTEGER AS seq, node::INTEGER AS id1, node::INTEGER AS id2, cost
-        FROM pgr_eucledianTSP(sql, start_id, end_id,
-
-            tries_per_temperature :=  500 * n :: INTEGER,
-            max_changes_per_temperature := 60 * n :: INTEGER,
-            max_consecutive_non_changes := 500 * n :: INTEGER,
-
-            randomize := false) WHERE seq <= n;
-    DROP TABLE ___tmp;
-
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-create or replace function _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
-  as
-$body$
-declare
-    sql text;
-    r record;
-
-begin
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    sql := 'with nodes as (' || sqlin || ')
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j, st_distance(st_makepoint(a.x, a.y), st_makepoint(b.x, b.y)) as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i';
-
-    for r in execute sql loop
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-
-end;
-$body$
-language plpgsql stable cost 10;
-
-
-CREATE OR REPLACE FUNCTION pgr_TSP(
-    matrix_row_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'newTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_eucledianTSP(
-    coordinates_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'eucledianTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_alphashape(sql text, alpha float8 DEFAULT 0, OUT x float8, OUT y float8)
-    RETURNS SETOF record
-    AS '$libdir/libpgrouting-2.5', 'alphashape'
-    LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pointsAsPolygon(query varchar, alpha float8 DEFAULT 0)
-	RETURNS geometry AS
-	$$
-	DECLARE
-		r record;
-		geoms geometry[];
-		vertex_result record;
-		i int;
-		n int;
-		spos int;
-		q text;
-		x float8[];
-		y float8[];
-
-	BEGIN
-		geoms := array[]::geometry[];
-		i := 1;
-
-		FOR vertex_result IN EXECUTE 'SELECT x, y FROM pgr_alphashape('''|| query || ''', ' || alpha || ')'
-		LOOP
-			x[i] = vertex_result.x;
-			y[i] = vertex_result.y;
-			i := i+1;
-		END LOOP;
-
-		n := i;
-		IF n = 1 THEN
-			RAISE NOTICE 'n = 1';
-			RETURN NULL;
-		END IF;
-
-		spos := 1;
-		q := 'SELECT ST_GeometryFromText(''POLYGON((';
-		FOR i IN 1..n LOOP
-			IF x[i] IS NULL AND y[i] IS NULL THEN
-				q := q || ', ' || x[spos] || ' ' || y[spos] || '))'',0) AS geom;';
-				EXECUTE q INTO r;
-				geoms := geoms || array[r.geom];
-				q := '';
-			ELSE
-				IF q = '' THEN
-					spos := i;
-					q := 'SELECT ST_GeometryFromText(''POLYGON((';
-				END IF;
-				IF i = spos THEN
-					q := q || x[spos] || ' ' || y[spos];
-				ELSE
-					q := q || ', ' || x[i] || ' ' || y[i];
-				END IF;
-			END IF;
-		END LOOP;
-
-		RETURN ST_BuildArea(ST_Collect(geoms));
-	END;
-	$$
-	LANGUAGE 'plpgsql' VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'bd_astar'
-LANGUAGE C VOLATILE;
-
-
-
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed:=true, only_cost:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    BOOLEAN,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false);
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to Many)';
-
-
-
--- one to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to Many)';
-
-
--- bdDijkstra MANY TO MANY
-CREATE OR REPLACE FUNCTION _pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bdDijkstra'
-LANGUAGE c VOLATILE;
-
-
-
--- ONE TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- TODO directed BOOLEAN DEFAULT TRUE,  on version 3
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, false) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, true) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_vid integer,
-    target_vid integer,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_vertex'
-LANGUAGE 'c' IMMUTABLE;
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_edge'
-LANGUAGE 'c' IMMUTABLE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || edges_sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        -- no restrictions then its a dijkstra
-        RETURN query SELECT a.seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_dijkstra(new_sql, start_vid, end_vid, directed) a;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, start_vid, end_vid, directed, has_rcost, restrictions_sql);
-    RETURN;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trspViaVertices(
-    edges_sql TEXT,
-    via_vids ANYARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult3 AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            new_sql :=
-               'WITH old_sql AS (' || edges_sql || ')' ||
-                '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        RETURN query SELECT (row_number() over())::INTEGER, path_id:: INTEGER, node::INTEGER,
-            (CASE WHEN edge = -2 THEN -1 ELSE edge END)::INTEGER, cost
-            FROM pgr_dijkstraVia(new_sql, via_vids, directed, strict:=true) WHERE edge != -1;
-        RETURN;
-    END IF;
-
-
-    -- make the call without contradiction from part of the user
-    RETURN query SELECT * FROM _pgr_trspViaVertices(new_sql, via_vids::INTEGER[], directed, has_rcost, restrictions_sql);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-
-    new_sql := sql;
-    IF (has_reverse != has_reverse_cost) THEN  -- user contradiction
-        IF (has_reverse) THEN
-            -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) THEN
-        -- no restrictions then its a with points
-        RETURN query SELECT a.seq-1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_withpoints(new_sql,
-            '(SELECT 1 as pid, ' || source_eid || 'as edge_id, ' || source_pos || '::float8 as fraction)'
-            || ' UNION '
-            || '(SELECT 2, ' || target_eid || ', ' || target_pos || ')' ::TEXT,
-            -1, -2, directed) a;
-        -- WHERE node != -2;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, source_eid, source_pos, target_eid, target_pos, directed, has_reverse_cost, turn_restrict_sql);
-    RETURN;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-create or replace function _pgr_trspViaVertices(sql text, vids integer[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    lrra boolean := false;
-    seq integer := 0;
-    seq2 integer := 0;
-
-begin
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(vids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from _pgr_trsp(sql, vids[i], vids[i+1], directed, has_rcost, turn_restrict_sql) as a loop
-            -- filter out the individual path ends except the last one
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --raise notice 'rr: %', rr;
-            if rr.id3 = -1 then
-                lrr := rr;
-                lrra := true;
-            else
-                seq := seq + 1;
-                rr.seq := seq;
-                return next rr;
-            end if;
-        end loop;
-    end loop;
-
-    if lrra then
-        seq := seq + 1;
-        lrr.seq := seq;
-        return next lrr;
-    end if;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-
-----------------------------------------------------------------------------------------------------------
-
-create or replace function pgr_trspViaEdges(sql text, eids integer[], pcts float8[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    first boolean := true;
-    seq integer := 0;
-    seq2 integer :=0;
-    has_reverse BOOLEAN;
-    point_is_vertex BOOLEAN := false;
-    edges_sql TEXT;
-    f float;
-
-begin
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql := sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (NOT has_rcost) THEN
-            -- user does not want to use reverse cost column
-            edges_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    FOREACH f IN ARRAY pcts LOOP
-        IF f in (0,1) THEN
-           point_is_vertex := true;
-        END IF;
-    END LOOP;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) AND NOT point_is_vertex THEN
-        -- no restrictions then its a _pgr_withPointsVia
-        RETURN query SELECT a.seq::INTEGER, path_id::INTEGER AS id1, node::INTEGER AS id2, edge::INTEGER AS id3, cost
-        FROM _pgr_withPointsVia(edges_sql, eids, pcts, directed) a;
-        RETURN;
-    END IF;
-
-    if array_length(eids, 1) != array_length(pcts, 1) then
-        raise exception 'The length of arrays eids and pcts must be the same!';
-    end if;
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(eids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from pgr_trsp(edges_sql,
-                                  eids[i], pcts[i],
-                                  eids[i+1], pcts[i+1],
-                                  directed,
-                                  has_rcost,
-                                  turn_restrict_sql) as a loop
-            -- combine intermediate via costs when cost is split across
-            -- two parts of a segment because it stops it and
-            -- restarts the next leg also on it
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --
-            -- there are multiple condition we have to deal with
-            -- between the end of one leg and start of the next
-            -- 1. same vertex_id. edge_id=-1; drop record with edge_id=-1
-            -- means: path ends on vertex
-            -- NOTICE:  rr: (19,1,44570022,-1,0)
-            -- NOTICE:  rr: (0,2,44570022,1768045,2.89691196717448)
-            -- 2. vertex_id=-1; sum cost components
-            -- means: path end/starts with the segment
-            -- NOTICE:  rr: (11,2,44569628,1775909,9.32885885148532)
-            -- NOTICE:  rr: (0,3,-1,1775909,0.771386350984395)
-
-            --raise notice 'rr: %', rr;
-            if first then
-                lrr := rr;
-                first := false;
-            else
-                if lrr.id3 = -1 then
-                    lrr := rr;
-                elsif lrr.id3 = rr.id3 then
-                    lrr.cost := lrr.cost + rr.cost;
-                    if rr.id2 = -1 then
-                        rr.id2 := lrr.id2;
-                    end if;
-                else
-                    seq := seq + 1;
-                    lrr.seq := seq;
-                    return next lrr;
-                    lrr := rr;
-                end if;
-            end if;
-        end loop;
-    end loop;
-
-    seq := seq + 1;
-    lrr.seq := seq;
-    return next lrr;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-----------------------------
---    MANY TO MANY
-----------------------------
-
-
-CREATE OR REPLACE FUNCTION _pgr_maxflow(
-    edges_sql TEXT,
-    sources ANYARRAY,
-    targets ANYARRAY,
-    algorithm INTEGER DEFAULT 1,
-    only_flow BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'max_flow_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-
-------------------------------------
--- 3 pgr_edmondsKarp
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 2 boykov_kolmogorov
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 1 pgr_pushRelabel
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT flow
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], algorithm := 1, only_flow := true);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], $3::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, $2::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxCardinalityMatch(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'edge_disjoint_paths_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    bigint,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    IN directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_contractGraph(
-    edges_sql TEXT,
-    contraction_order BIGINT[],
-    max_cycles integer DEFAULT 1,
-    forbidden_vertices BIGINT[] DEFAULT ARRAY[]::BIGINT[],
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT type TEXT,
-    OUT id BIGINT,
-    OUT contracted_vertices BIGINT[],
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost float)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'contractGraph'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliver(
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_cell_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliver'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliverEuclidean (
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliverEuclidean'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_vrpOneDepot(
-    TEXT, -- customers_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_sql
-    INTEGER, -- depot_id
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-orders_sql TEXT;
-trucks_sql TEXT;
-matrix_sql TEXT;
-final_sql TEXT;
-BEGIN
-
-    orders_sql = $$WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    pickups AS (
-        SELECT id, x AS p_x, y AS p_y, open_time AS p_open, close_time AS p_close, service_time AS p_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vrp_orders.id AS id, order_unit AS demand, pickups.id AS p_node_id, p_x, p_y, p_open, p_close, p_service,
-    vrp_orders.id AS d_node_id, x AS d_x, y AS d_y, open_time AS d_open, close_time AS d_close, service_time AS d_service
-    FROM vrp_orders, pickups
-    WHERE vrp_orders.id != $$ || $4;
-
-
-    trucks_sql = $$ WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    vrp_vehicles AS ($$ || $2 || $$ ),
-    starts AS (
-        SELECT id AS start_node_id, x AS start_x, y AS start_y, open_time AS start_open, close_time AS start_close, service_time AS start_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vehicle_id AS id, capacity, starts.* FROM vrp_vehicles, starts;
-    $$;
-
-    final_sql = '
-    SELECT * FROM _pgr_pickDeliver(
-            $$' || orders_sql || '$$,
-            $$' || trucks_sql || '$$,
-            $$' || $3 || '$$,
-            max_cycles := 2,
-            initial_sol := 4 ); ';
-
-    RAISE DEBUG '%', orders_sql;
-    RAISE DEBUG '%', trucks_sql;
-    RAISE DEBUG '%', $3;
-    RAISE DEBUG '%', final_sql;
-
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
------------------------------------------------------------------------
--- Core function for vrp with sigle depot computation
--- See README for description
------------------------------------------------------------------------
---
---
-
-create or replace function pgr_vrpOneDepot(
-	order_sql text,
-	vehicle_sql text,
-	cost_sql text,
-	depot_id integer,
-
-	OUT oid integer,
-	OUT opos integer,
-	OUT vid integer,
-	OUT tarrival integer,
-	OUT tdepart integer)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT order_id::INTEGER, stop_seq::INTEGER, vehicle_id::INTEGER, arrival_time::INTEGER, departure_time::INTEGER
-    FROM _pgr_vrpOneDepot($1, $2,
-       '
-            SELECT src_id AS start_vid, dest_id AS end_vid, traveltime AS agg_cost FROM ('||$3||') AS a
-       ',
-        $4
-    ) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_gsoc_vrppdtw(
-    customers_sql TEXT,
-    max_vehicles INTEGER,
-    capacity FLOAT,
-    speed FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-
-    OUT seq INTEGER,
-    OUT vehicle_id INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT stop_id BIGINT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-    orders_sql TEXT;
-    vehicles_sql TEXT;
-    final_sql TEXT;
-BEGIN
-    orders_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        pickups AS (
-            SELECT id, demand, x as p_x, y as p_y, opentime as p_open, closetime as p_close, servicetime as p_service
-            FROM  customer_data WHERE pindex = 0 AND id != 0
-        ),
-        deliveries AS (
-            SELECT pindex AS id, x as d_x, y as d_y, opentime as d_open, closetime as d_close, servicetime as d_service
-            FROM  customer_data WHERE dindex = 0 AND id != 0
-        )
-        SELECT * FROM pickups JOIN deliveries USING(id) ORDER BY pickups.id
-    $$;
-
-    vehicles_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ )
-        SELECT id, x AS start_x, y AS start_y,
-            opentime AS start_open, closetime AS start_close, $$ ||
-            capacity || $$ AS capacity, $$ || max_vehicles || $$ AS number, $$ || speed || $$ AS speed
-            FROM customer_data WHERE id = 0 LIMIT 1
-        $$;
---  seq | vehicle_id | vehicle_seq | stop_id | travel_time | arrival_time | wait_time | service_time | departure_time
-    final_sql = $$ WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        p_deliver AS (SELECT * FROM _pgr_pickDeliverEuclidean('$$ || orders_sql || $$',  '$$ || vehicles_sql || $$',  1, $$ || max_cycles || $$ )),
-        picks AS (SELECT p_deliver.*, pindex, dindex, id AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 2)),
-        delivers AS (SELECT p_deliver.*, pindex, dindex, dindex AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 3)),
-        depots AS (SELECT p_deliver.*, 0 as pindex, 0 as dindex, 0 AS the_id FROM p_deliver WHERE (stop_type IN (-1,1,6))),
-        the_union AS (SELECT * FROM picks UNION SELECT * FROM delivers UNION SELECT * from depots)
-
-        SELECT (row_number() over(ORDER BY a.seq))::INTEGER, vehicle_seq, a.stop_seq, the_id::BIGINT, a.travel_time, a.arrival_time, a.wait_time, a.service_time, a.departure_time
-        FROM (SELECT * FROM the_union) AS a ORDER BY a.seq
-        $$;
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-CREATE OR REPLACE FUNCTION pgr_gsoc_vrppdtw(
-    sql text,
-    vehicle_num INTEGER,
-    capacity INTEGER
-)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-customers_sql TEXT;
-BEGIN
-    RETURN query
-         SELECT a.seq, vehicle_id::INTEGER AS id1, stop_id::INTEGER AS id2, departure_time AS cost
-        FROM _pgr_gsoc_vrppdtw($1, $2, $3, 1, 30) AS a WHERE vehicle_id NOT IN (-2);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION _pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN,
-    driving_side CHAR,
-    details BOOLEAN,
-
-    only_cost BOOLEAN DEFAULT false, -- gets path
-    normal BOOLEAN DEFAULT true, -- false for many to onu
-
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'withPoints'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], ARRAY[$4]::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], ARRAY[$4]::bigint[], $5, $6, $7, FALSE, FALSE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], $4::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], $4::BIGINT[], $5,  $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION  _pgr_withPointsVia(
-    sql text,
-    via_edges bigint[],
-    fraction float[],
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  has_rcost boolean;
-  sql_new_vertices text := ' ';
-  sql_on_vertex text;
-  v_union text := ' ';
-  dummyrec record;
-  rec1 record;
-  via_vertices int[];
-  sql_safe text;
-  new_edges text;
-  BEGIN
-     BEGIN
-        sql_safe = 'SELECT id, source, target, cost, reverse_cost FROM ('|| sql || ') AS __a';
-
-        EXECUTE 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||sql_safe||' ) AS __b__ limit 1 ' INTO rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-     END;
-
-
-      IF array_length(via_edges, 1) != array_length(fraction, 1) then
-        RAISE EXCEPTION 'The length of via_edges is different of length of via_edges';
-      END IF;
-
-      FOR i IN 1 .. array_length(via_edges, 1)
-      LOOP
-          IF fraction[i] = 0 THEN
-              sql_on_vertex := 'SELECT source FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.source;
-          ELSE IF fraction[i] = 1 THEN
-              sql_on_vertex := 'SELECT target FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.target;
-          ELSE
-              via_vertices[i] = -i;
-              IF has_rcost THEN
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost,
-                              reverse_cost * (1 - ' || fraction[i] || ')  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost,
-                              reverse_cost *  ' || fraction[i] || '  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' where id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               ELSE
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               END IF;
-          END IF;
-          END IF;
-     END LOOP;
-
-     IF sql_new_vertices = ' ' THEN
-         new_edges := sql;
-     ELSE
-         IF has_rcost THEN
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost,
-                         lead(cost) OVER w  - cost AS reverse_cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL),
-                   second_part AS ( SELECT * FROM (SELECT id, lead(source) OVER w  AS source, source as target,
-                         reverse_cost - lead(reverse_cost) OVER w  AS cost,
-                         reverse_cost - lead(reverse_cost) OVER w  AS reverse_cost
-                      FROM  the_union  WHERE target > 0 and reverse_cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY reverse_cost ASC) ) as n2
-                      WHERE source IS NOT NULL),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part)
-                             UNION
-                       (SELECT * FROM second_part) ) _union )
-                  SELECT *  FROM more_union';
-         ELSE
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL ),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part) ) _union )
-                  SELECT *  FROM more_union';
-          END IF;
-      END IF;
-
- -- raise notice '%', new_edges;
-     sql_new_vertices := sql_new_vertices || v_union || ' (' || sql || ')';
-     RETURN query SELECT *
-         FROM pgr_dijkstraVia(new_edges, via_vertices, directed, has_rcost);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_lineGraph(
-    TEXT, -- edges_sql
-    directed BOOLEAN DEFAULT true,
-    OUT seq INTEGER,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost FLOAT,
-    OUT reverse_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'lineGraph'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_connectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'connectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_strongComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'strongComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_biconnectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the edge in the component
-    OUT n_seq INTEGER,          -- nth_seq of the edge in the component
-    OUT edge BIGINT)            -- the number of the edge
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'biconnectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_articulationPoints(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'articulationPoints'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bridges(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT edge BIGINT)            -- the number of the edge 
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bridges'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createtopology(edge_table text, tolerance double precision,
-		   the_geom text default 'the_geom', id text default 'id',
-		   source text default 'source', target text default 'target',rows_where text default 'true',
-		   clean boolean default FALSE)
-RETURNS VARCHAR AS
-$BODY$
-
-DECLARE
-    points record;
-    sridinfo record;
-    source_id bigint;
-    target_id bigint;
-    totcount bigint;
-    rowcount bigint;
-    srid integer;
-    sql text;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    notincluded integer;
-    i integer;
-    naming record;
-    info record;
-    flag boolean;
-    query text;
-    idtype text;
-    gtype text;
-    sourcetype text;
-    targettype text;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-    msgKind int;
-    emptied BOOLEAN;
-
-BEGIN
-    msgKind = 1; -- notice
-    fnName = 'pgr_createTopology';
-    raise notice 'PROCESSING:';
-    raise notice 'pgr_createTopology(''%'', %, ''%'', ''%'', ''%'', ''%'', rows_where := ''%'', clean := %)',edge_table,tolerance,the_geom,id,source,target,rows_where, clean;
-    execute 'show client_min_messages' into debuglevel;
-
-
-    raise notice 'Performing checks, please wait .....';
-
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-        sname=naming.sname;
-        tname=naming.tname;
-        tabname=sname||'.'||tname;
-        vname=tname||'_vertices_pgr';
-        vertname= sname||'.'||vname;
-        rows_where = ' AND ('||rows_where||')';
-      raise DEBUG '     --> OK';
-
-
-      raise debug 'Checking column names in edge table';
-        select * into idname     from _pgr_getColumnName(sname, tname,id,2,fnName);
-        select * into sourcename from _pgr_getColumnName(sname, tname,source,2,fnName);
-        select * into targetname from _pgr_getColumnName(sname, tname,target,2,fnName);
-        select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2,fnName);
-
-
-        err = sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname;
-        perform _pgr_onError( err, 2, fnName,
-               'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-	       'Column names are OK');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking column types in edge table';
-        select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-        select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-        select * into idtype from _pgr_getColumnType(sname,tname,idname,1, fnName);
-
-        err = idtype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column id:'|| idname, ' Expected type of '|| idname || ' is integer,smallint or bigint but '||idtype||' was found');
-
-        err = sourcetype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column source:'|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-        err = targettype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column target:'|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or bigint but '||targettype||' was found');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         raise debug '%',query;
-         EXECUTE query INTO sridinfo;
-
-         err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-         perform _pgr_onError(err, 2, fnName,
-	     'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-
-         srid := sridinfo.srid;
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking and creating indices in edge table';
-        perform _pgr_createIndex(sname, tname , idname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-
-        gname=quote_ident(gname);
-        idname=quote_ident(idname);
-        sourcename=quote_ident(sourcename);
-        targetname=quote_ident(targetname);
-      raise DEBUG '     --> OK';
-
-
-
-
-
-    BEGIN
-        -- issue #193 & issue #210 & #213
-        -- this sql is for trying out the where clause
-        -- the select * is to avoid any column name conflicts
-        -- limit 1, just try on first record
-        -- if the where clasuse is ill formed it will be caught in the exception
-        sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-        EXECUTE sql into dummyRec;
-        -- end
-
-        -- if above where clasue works this one should work
-        -- any error will be caught by the exception also
-        sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NOT NULL AND '||
-	    idname||' IS NOT NULL)=false '||rows_where;
-        EXECUTE SQL  into notincluded;
-
-        if clean then
-            raise debug 'Cleaning previous Topology ';
-               execute 'UPDATE ' || _pgr_quote_ident(tabname) ||
-               ' SET '||sourcename||' = NULL,'||targetname||' = NULL';
-        else
-            raise debug 'Creating topology for edges with non assigned topology';
-            if rows_where=' AND (true)' then
-                rows_where=  ' and ('||quote_ident(sourcename)||' is null or '||quote_ident(targetname)||' is  null)';
-            end if;
-        end if;
-        -- my thoery is that the select Count(*) will never go through here
-        EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-             RAISE NOTICE '%',sql;
-             RETURN 'FAIL';
-    END;
-
-    BEGIN
-         raise DEBUG 'initializing %',vertname;
-         execute 'select * from _pgr_getTableName('||quote_literal(vertname)
-                                                  || ',0,' || quote_literal(fnName) ||' )' into naming;
-         emptied = false;
-         set client_min_messages  to warning;
-         IF sname=naming.sname AND vname=naming.tname  THEN
-            if clean then
-                execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-                execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-                emptied = true;
-            end if;
-         ELSE -- table doesn't exist
-            execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-            emptied = true;
-         END IF;
-         IF (emptied) THEN
-             execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-	         quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-             perform _pgr_createIndex(vertname , 'the_geom'::text , 'gist'::text);
-         END IF;
-         execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id"}''::text[])' into naming;
-         execute 'set client_min_messages  to '|| debuglevel;
-         raise DEBUG  '  ------>OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: something went wrong when initializing the verties table';
-             RETURN 'FAIL';
-    END;
-
-
-
-    raise notice 'Creating Topology, Please wait...';
-        rowcount := 0;
-        FOR points IN EXECUTE 'SELECT ' || idname || '::bigint AS id,'
-            || ' _pgr_StartPoint(' || gname || ') AS source,'
-            || ' _pgr_EndPoint('   || gname || ') AS target'
-            || ' FROM '  || _pgr_quote_ident(tabname)
-            || ' WHERE ' || gname || ' IS NOT NULL AND ' || idname||' IS NOT NULL '||rows_where
-        LOOP
-
-            rowcount := rowcount + 1;
-            IF rowcount % 1000 = 0 THEN
-                RAISE NOTICE '% edges processed', rowcount;
-            END IF;
-
-
-            source_id := _pgr_pointToId(points.source, tolerance,vertname,srid);
-            target_id := _pgr_pointToId(points.target, tolerance,vertname,srid);
-            BEGIN
-                sql := 'UPDATE ' || _pgr_quote_ident(tabname) ||
-                    ' SET '||sourcename||' = '|| source_id::text || ','||targetname||' = ' || target_id::text ||
-                    ' WHERE ' || idname || ' =  ' || points.id::text;
-
-                IF sql IS NULL THEN
-                    RAISE NOTICE 'WARNING: UPDATE % SET source = %, target = % WHERE % = % ', tabname, source_id::text, target_id::text, idname,  points.id::text;
-                ELSE
-                    EXECUTE sql;
-                END IF;
-                EXCEPTION WHEN OTHERS THEN
-                    RAISE NOTICE '%', SQLERRM;
-                    RAISE NOTICE '%',sql;
-                    RETURN 'FAIL';
-            end;
-        END LOOP;
-        raise notice '-------------> TOPOLOGY CREATED FOR  % edges', rowcount;
-        RAISE NOTICE 'Rows with NULL geometry or NULL id: %',notincluded;
-        Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname), _pgr_quote_ident(vertname);
-        raise notice '----------------------------------------------';
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_createTopology(text, double precision,text,text,text,text,text,boolean)
-IS 'args: edge_table,tolerance, the_geom:=''the_geom'',source:=''source'', target:=''target'',rows_where:=''true'' - fills columns source and target in the geometry table and creates a vertices table for selected rows';
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
-RETURNS character varying AS
-$BODY$
-
-DECLARE
-    points record;
-    seg record;
-    naming record;
-    sridinfo record;
-    srid integer;
-    ecnt integer;
-    vertname text;
-    sname text;
-    tname text;
-    vname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    geotype text;
-    gname text;
-    tabName text;
-    flag boolean ;
-    query text;
-    selectionquery text;
-    i integer;
-    tot integer;
-    NumIsolated integer;
-    numdeadends integer;
-    numgaps integer;
-    NumCrossing integer;
-    numRings integer;
-    debuglevel text;
-
-
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeGraph(''%'',%,''%'',''%'',''%'',''%'',''%'')',edge_table,tolerance,the_geom,id,source,target,rows_where;
-  raise notice 'Performing checks, please wait ...';
-  execute 'show client_min_messages' into debuglevel;
-
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-    raise DEBUG '     --> OK';
-
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","cnt","chk"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET cnt=0 ,chk=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into idname     from _pgr_getColumnName(sname, tname,id,2);
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname, 2,
-                       'pgr_analyzeGraph',  'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-                       'Column names are OK');
-
-        raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-   BEGIN
-       raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         EXECUTE QUERY INTO sridinfo;
-
-         perform _pgr_onError( sridinfo IS NULL OR sridinfo.srid IS NULL,2,
-                 'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname,
-                 'SRID of '||gname||' is '||sridinfo.srid);
-
-         IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-             RAISE NOTICE ' Can not determine the srid of the geometry "%" in table %', the_geom,tabname;
-             RETURN 'FAIL';
-         END IF;
-         srid := sridinfo.srid;
-         raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM;--issue 210,211,213
-             RAISE NOTICE 'ERROR: something went wrong when checking for SRID of % in table %', the_geom,tabname;
-             RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-       raise debug 'Checking  indices in edge table';
-       perform _pgr_createIndex(tabname , idname , 'btree');
-       perform _pgr_createIndex(tabname , sourcename , 'btree');
-       perform _pgr_createIndex(tabname , targetname , 'btree');
-       perform _pgr_createIndex(tabname , gname , 'gist');
-
-       gname=quote_ident(gname);
-       sourcename=quote_ident(sourcename);
-       targetname=quote_ident(targetname);
-       idname=quote_ident(idname);
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking indices';
-          RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-        query='select count(*) from '||_pgr_quote_ident(tabname)||' where true  '||rows_where;
-        EXECUTE query into ecnt;
-        raise DEBUG '-->Rows Where condition: OK';
-        raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-            RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-            RAISE NOTICE 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-            RAISE NOTICE '%',query;
-            RETURN 'FAIL';
-    END;
-
-    selectionquery ='with
-           selectedRows as( (select '||sourcename||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||')
-                           union
-                           (select '||targetname||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||'))';
-
-
-
-
-
-   BEGIN
-       RAISE NOTICE 'Analyzing for dead ends. Please wait...';
-       query= 'with countingsource as (select a.'||sourcename||' as id,count(*) as cnts
-               from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||sourcename||')
-                     ,countingtarget as (select a.'||targetname||' as id,count(*) as cntt
-                    from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||targetname||')
-                   ,totalcount as (select id,case when cnts is null and cntt is null then 0
-                                                   when cnts is null then cntt
-                                                   when cntt is null then cnts
-                                                   else cnts+cntt end as totcnt
-                                   from ('||_pgr_quote_ident(vertname)||' as a left
-                                   join countingsource as t using(id) ) left join countingtarget using(id))
-               update '||_pgr_quote_ident(vertname)||' as a set cnt=totcnt from totalcount as b where a.id=b.id';
-       raise debug '%',query;
-       execute query;
-       query=selectionquery||'
-              SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE cnt=1 and id in (select id from selectedRows)';
-       raise debug '%',query;
-       execute query  INTO numdeadends;
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-          RAISE NOTICE 'ERROR: something went wrong when analizing for dead ends';
-          RETURN 'FAIL';
-   END;
-
-
-
-    BEGIN
-          RAISE NOTICE 'Analyzing for gaps. Please wait...';
-          query = 'with
-                   buffer as (select id,st_buffer(the_geom,'||tolerance||') as buff from '||_pgr_quote_ident(vertname)||' where cnt=1)
-                   ,veryclose as (select b.id,st_crosses(a.'||gname||',b.buff) as flag
-                   from  (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) as a
-                   join buffer as b on (a.'||gname||'&&b.buff)
-                   where '||sourcename||'!=b.id and '||targetname||'!=b.id )
-                   update '||_pgr_quote_ident(vertname)||' set chk=1 where id in (select distinct id from veryclose where flag=true)';
-          raise debug '%' ,query;
-          execute query;
-          GET DIAGNOSTICS  numgaps= ROW_COUNT;
-          raise DEBUG '     --> OK';
-          EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for gaps';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for isolated edges. Please wait...';
-        query=selectionquery|| ' SELECT count(*) FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' )  as a,
-                                                 '||_pgr_quote_ident(vertname)||' as b,
-                                                 '||_pgr_quote_ident(vertname)||' as c
-                            WHERE b.id in (select id from selectedRows) and a.'||sourcename||' =b.id
-                            AND b.cnt=1 AND a.'||targetname||' =c.id
-                            AND c.cnt=1';
-        raise debug '%' ,query;
-        execute query  INTO NumIsolated;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for isolated edges';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for ring geometries. Please wait...';
-        execute 'SELECT geometrytype('||gname||')  FROM '||_pgr_quote_ident(tabname) limit 1 into geotype;
-        IF (geotype='MULTILINESTRING') THEN
-            query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                 WHERE true  '||rows_where||' and st_isRing(st_linemerge('||gname||'))';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        ELSE query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                  WHERE true  '||rows_where||' and st_isRing('||gname||')';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        END IF;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for ring geometries';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for intersections. Please wait...';
-        query = 'select count(*) from (select distinct case when a.'||idname||' < b.'||idname||' then a.'||idname||'
-                                                        else b.'||idname||' end,
-                                                   case when a.'||idname||' < b.'||idname||' then b.'||idname||'
-                                                        else a.'||idname||' end
-                                    FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as a
-                                    JOIN (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as b
-                                    ON (a.'|| gname||' && b.'||gname||')
-                                    WHERE a.'||idname||' != b.'||idname|| '
-                                        and (a.'||sourcename||' in (b.'||sourcename||',b.'||targetname||')
-                                              or a.'||targetname||' in (b.'||sourcename||',b.'||targetname||')) = false
-                                        and st_intersects(a.'||gname||', b.'||gname||')=true) as d ';
-        raise debug '%' ,query;
-        execute query  INTO numCrossing;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for intersections';
-            RETURN 'FAIL';
-    END;
-
-
-
-
-    RAISE NOTICE '            ANALYSIS RESULTS FOR SELECTED EDGES:';
-    RAISE NOTICE '                  Isolated segments: %', NumIsolated;
-    RAISE NOTICE '                          Dead ends: %', numdeadends;
-    RAISE NOTICE 'Potential gaps found near dead ends: %', numgaps;
-    RAISE NOTICE '             Intersections detected: %',numCrossing;
-    RAISE NOTICE '                    Ring geometries: %',numRings;
-
-
-    RETURN 'OK';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_analyzeGraph(text,double precision,text,text,text,text,text) IS 'args: edge_table, tolerance,the_geom:=''the_geom'',id:=''id'',source column:=''source'', target column:=''target'' rows_where:=''true'' - creates a vertices table based on the geometry for selected rows';
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzeOneway(
-   edge_table text,
-   s_in_rules TEXT[],
-   s_out_rules TEXT[],
-   t_in_rules TEXT[],
-   t_out_rules TEXT[],
-   two_way_if_null boolean default true,
-   oneway text default 'oneway',
-   source text default 'source',
-   target text default 'target')
-  RETURNS text AS
-$BODY$
-
-
-DECLARE
-    rule text;
-    ecnt integer;
-    instr text;
-    naming record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    owname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    vertname text;
-    debuglevel text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeOneway(''%'',''%'',''%'',''%'',''%'',''%'',''%'',''%'',%)',
-		edge_table, s_in_rules , s_out_rules, t_in_rules, t_out_rules, oneway, source ,target,two_way_if_null ;
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    raise DEBUG '     --> OK';
-    EXCEPTION WHEN raise_exception THEN
-      RAISE NOTICE 'ERROR: something went wrong checking the table name';
-      RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","ein","eout"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET eout=0 ,ein=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into owname from _pgr_getColumnName(sname, tname,oneway,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,owname) or  targetname=owname, 2,
-                       '_pgr_createToplogy',  'Two columns share the same name', 'Parameter names for oneway,source and target  must be different',
-                       'Column names are OK');
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-
-
-    RAISE NOTICE 'Analyzing graph for one way street errors.';
-
-    rule := CASE WHEN two_way_if_null
-            THEN owname || ' IS NULL OR '
-            ELSE '' END;
-
-    instr := '''' || array_to_string(s_in_rules, ''',''') || '''';
-       EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-      from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-     where a.id=b.'|| sourcename;
-
-    RAISE NOTICE 'Analysis 25%% complete ...';
-
-    instr := '''' || array_to_string(t_in_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 50%% complete ...';
-
-    instr := '''' || array_to_string(s_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-        where a.id=b.'|| sourcename;
-    RAISE NOTICE 'Analysis 75%% complete ...';
-
-    instr := '''' || array_to_string(t_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 100%% complete ...';
-
-    EXECUTE 'SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE ein=0 or eout=0' INTO ecnt;
-
-    RAISE NOTICE 'Found % potential problems in directionality' ,ecnt;
-
-    RETURN 'OK';
-
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_analyzeOneway(text,TEXT[],TEXT[], TEXT[],TEXT[],boolean,text,text,text)
-IS 'args:edge_table , s_in_rules , s_out_rules, t_in_rules , t_out_rules, two_way_if_null:= true, oneway:=''oneway'',source:= ''source'',target:=''target'' - Analizes the directionality of the edges based on the rules';
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createverticestable(
-   edge_table text,
-   the_geom text DEFAULT 'the_geom'::text,
-   source text DEFAULT 'source'::text,
-   target text DEFAULT 'target'::text,
-    rows_where text DEFAULT 'true'::text
-)
-  RETURNS text AS
-$BODY$
-DECLARE
-    naming record;
-    sridinfo record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    sourcename text;
-    targetname text;
-    query text;
-    ecnt bigint;
-    srid integer;
-    sourcetype text;
-    targettype text;
-    sql text;
-    totcount integer;
-    i integer;
-    notincluded integer;
-    included integer;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-
-
-BEGIN
-  fnName = 'pgr_createVerticesTable';
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_createVerticesTable(''%'',''%'',''%'',''%'',''%'')',edge_table,the_geom,source,target,rows_where;
-  execute 'show client_min_messages' into debuglevel;
-
-  raise notice 'Performing checks, please wait .....';
-
-  RAISE DEBUG 'Checking % exists',edge_table;
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-  raise debug '--> Edge table exists: OK';
-
-  raise debug 'Checking column names';
-    select * into sourcename from _pgr_getColumnName(sname, tname,source,2, fnName);
-    select * into targetname from _pgr_getColumnName(sname, tname,target,2, fnName);
-    select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2, fnName);
-
-
-    err = sourcename in (targetname,gname) or  targetname=gname;
-    perform _pgr_onError(err, 2, fnName,
-        'Two columns share the same name', 'Parameter names for the_geom,source and target  must be different');
-  raise debug '--> Column names: OK';
-
-  raise debug 'Checking column types in edge table';
-    select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-    select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-
-
-    err = sourcetype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column source: '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-    err = targettype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column target: '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found');
-
-  raise debug '-->Column types:OK';
-
-  raise debug 'Checking SRID of geometry column';
-     query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-        || ' FROM ' || _pgr_quote_ident(tabname)
-        || ' WHERE ' || quote_ident(gname)
-        || ' IS NOT NULL LIMIT 1';
-     raise debug '%',query;
-     EXECUTE query INTO sridinfo;
-
-     err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-     perform _pgr_onError(err, 2, fnName,
-         'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-     srid := sridinfo.srid;
-  raise DEBUG '     --> OK';
-
-  raise debug 'Checking and creating Indices';
-     perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-  raise DEBUG '-->Check and create indices: OK';
-
-     gname=quote_ident(gname);
-     sourcename=quote_ident(sourcename);
-     targetname=quote_ident(targetname);
-
-
-  BEGIN
-  raise debug 'Checking Condition';
-    -- issue #193 & issue #210 & #213
-    -- this sql is for trying out the where clause
-    -- the select * is to avoid any column name conflicts
-    -- limit 1, just try on first record
-    -- if the where clasuse is ill formed it will be caught in the exception
-    sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-    EXECUTE sql into dummyRec;
-    -- end
-
-    -- if above where clasue works this one should work
-    -- any error will be caught by the exception also
-    sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NULL or '||
-		sourcename||' is null or '||targetname||' is null)=true '||rows_where;
-    raise debug '%',sql;
-    EXECUTE SQL  into notincluded;
-    EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-
-
-
-  BEGIN
-     raise DEBUG 'initializing %',vertname;
-       execute 'select * from _pgr_getTableName('||quote_literal(vertname)||',0)' into naming;
-       IF sname=naming.sname  AND vname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-       ELSE
-           set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-       END IF;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-                quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-       execute 'CREATE INDEX '||quote_ident(vname||'_the_geom_idx')||' ON '||_pgr_quote_ident(vertname)||'  USING GIST (the_geom)';
-       execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-       EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Initializing vertex table';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise notice 'Populating %, please wait...',vertname;
-       sql= 'with
-		lines as ((select distinct '||sourcename||' as id, _pgr_startpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-		                  ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||')
-			union (select distinct '||targetname||' as id,_pgr_endpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-			          ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||'))
-		,numberedLines as (select row_number() OVER (ORDER BY id) AS i,* from lines )
-		,maxid as (select id,max(i) as maxi from numberedLines group by id)
-		insert into '||_pgr_quote_ident(vertname)||'(id,the_geom)  (select id,the_geom  from numberedLines join maxid using(id) where i=maxi order by id)';
-       RAISE debug '%',sql;
-       execute sql;
-       GET DIAGNOSTICS totcount = ROW_COUNT;
-
-       sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' a, '||_pgr_quote_ident(vertname)||' b
-            where '||sourcename||'=b.id and '|| targetname||' in (select id from '||_pgr_quote_ident(vertname)||')';
-       RAISE debug '%',sql;
-       execute sql into included;
-
-
-
-       execute 'select max(id) from '||_pgr_quote_ident(vertname) into ecnt;
-       execute 'SELECT setval('||quote_literal(vertname||'_id_seq')||','||coalesce(ecnt,1)||' , false)';
-       raise notice '  ----->   VERTICES TABLE CREATED WITH  % VERTICES', totcount;
-       raise notice '                                       FOR   %  EDGES', included+notincluded;
-       RAISE NOTICE '  Edges with NULL geometry,source or target: %',notincluded;
-       RAISE NOTICE '                            Edges processed: %',included;
-       Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname),_pgr_quote_ident(vertname);
-       raise notice '----------------------------------------------';
-    END;
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_createVerticesTable(text,text,text,text,text)
-IS 'args: edge_table, the_geom:=''the_geom'',source:=''source'', target:=''target'' rows_where:=''true'' - creates a vertices table based on the source and target identifiers for selected rows';
-
-
-CREATE OR REPLACE FUNCTION pgr_nodeNetwork(edge_table text, tolerance double precision,
-			id text default 'id', the_geom text default 'the_geom', table_ending text default 'noded',
-            rows_where text DEFAULT ''::text, outall boolean DEFAULT false) RETURNS text AS
-$BODY$
-DECLARE
-	
-	p_num int := 0;
-	p_ret text := '';
-    pgis_ver_old boolean := _pgr_versionless(postgis_lib_version(), '2.1.0.0');
-    vst_line_substring text;
-    vst_line_locate_point text;
-    intab text;
-    outtab text;
-    n_pkey text;
-    n_geom text;
-    naming record;
-    sname text;
-    tname text;
-    outname text;
-    srid integer;
-    sridinfo record;
-    splits bigint;
-    touched bigint;
-    untouched bigint;
-    geomtype text;
-    debuglevel text;
-    rows_where text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_nodeNetwork(''%'', %, ''%'', ''%'', ''%'', ''%'',  %)',
-    edge_table, tolerance, id,  the_geom, table_ending, rows_where, outall;
-  raise notice 'Performing checks, please wait .....';
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',0)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-	RAISE NOTICE '-------> % not found',edge_table;
-        RETURN 'FAIL';
-    ELSE
-	RAISE DEBUG '  -----> OK';
-    END IF;
-
-    intab=sname||'.'||tname;
-    outname=tname||'_'||table_ending;
-    outtab= sname||'.'||outname;
-    rows_where = CASE WHEN length(rows_where) > 2 and not outall THEN ' AND (' || rows_where || ')' ELSE '' END;
-    rows_where = CASE WHEN length(rows_where) > 2 THEN ' WHERE (' || rows_where || ')' ELSE '' END;
-  END;
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',id,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(id)||')' INTO n_pkey;
-       IF n_pkey is NULL then
-          raise notice  'ERROR: id column "%"  not found in %',id,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',the_geom,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(the_geom)||')' INTO n_geom;
-       IF n_geom is NULL then
-          raise notice  'ERROR: the_geom  column "%"  not found in %',the_geom,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-  IF n_pkey=n_geom THEN
-	raise notice  'ERROR: id and the_geom columns have the same name "%" in %',n_pkey,intab;
-        RETURN 'FAIL';
-  END IF;
-
-  BEGIN
-       	raise DEBUG 'Checking the SRID of the geometry "%"', n_geom;
-       	EXECUTE 'SELECT ST_SRID(' || quote_ident(n_geom) || ') as srid '
-          		|| ' FROM ' || _pgr_quote_ident(intab)
-          		|| ' WHERE ' || quote_ident(n_geom)
-          		|| ' IS NOT NULL LIMIT 1' INTO sridinfo;
-       	IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-        	RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           	RETURN 'FAIL';
-       	END IF;
-       	srid := sridinfo.srid;
-       	raise DEBUG '  -----> SRID found %',srid;
-       	EXCEPTION WHEN OTHERS THEN
-           		RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           		RETURN 'FAIL';
-  END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_pkey,intab;
-      if (_pgr_isColumnIndexed(intab,n_pkey)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding  index "%_%_idx".',n_pkey,intab;
-
-	set client_min_messages  to warning;
-        execute 'create  index '||tname||'_'||n_pkey||'_idx on '||_pgr_quote_ident(intab)||' using btree('||quote_ident(n_pkey)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_geom,intab;
-      if (_pgr_iscolumnindexed(intab,n_geom)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding unique index "%_%_gidx".',intab,n_geom;
-	set client_min_messages  to warning;
-        execute 'CREATE INDEX '
-            || quote_ident(tname || '_' || n_geom || '_gidx' )
-            || ' ON ' || _pgr_quote_ident(intab)
-            || ' USING gist (' || quote_ident(n_geom) || ')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
----------------
-    BEGIN
-       raise DEBUG 'initializing %',outtab;
-       execute 'select * from _pgr_getTableName('||quote_literal(outtab)||',0)' into naming;
-       IF sname=naming.sname  AND outname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(outtab)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(outname)||','||quote_literal(n_geom)||')';
-       ELSE
-	   set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(outtab)||' (id bigserial PRIMARY KEY,old_id integer,sub_id integer,
-								source bigint,target bigint)';
-       END IF;
-       execute 'select geometrytype('||quote_ident(n_geom)||') from  '||_pgr_quote_ident(intab)||' limit 1' into geomtype;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(outname)||','||
-                quote_literal(n_geom)||','|| srid||', '||quote_literal(geomtype)||', 2)';
-       execute 'CREATE INDEX '||quote_ident(outname||'_'||n_geom||'_idx')||' ON '||_pgr_quote_ident(outtab)||'  USING GIST ('||quote_ident(n_geom)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-    END;
-----------------
-
-
-  raise notice 'Processing, please wait .....';
-
-
-    if pgis_ver_old then
-        vst_line_substring    := 'st_line_substring';
-        vst_line_locate_point := 'st_line_locate_point';
-    else
-        vst_line_substring    := 'st_linesubstring';
-        vst_line_locate_point := 'st_linelocatepoint';
-    end if;
-
---    -- First creates temp table with intersection points
-    p_ret = 'create temp table intergeom on commit drop as (
-        select l1.' || quote_ident(n_pkey) || ' as l1id,
-               l2.' || quote_ident(n_pkey) || ' as l2id,
-	       l1.' || quote_ident(n_geom) || ' as line,
-	       _pgr_startpoint(l2.' || quote_ident(n_geom) || ') as source,
-	       _pgr_endpoint(l2.' || quote_ident(n_geom) || ') as target,
-               st_intersection(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ') as geom
-        from (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l1
-             join (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l2
-             on (st_dwithin(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ', ' || tolerance || '))'||
-        'where l1.' || quote_ident(n_pkey) || ' <> l2.' || quote_ident(n_pkey)||' and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false  )';
-    raise debug '%',p_ret;
-    EXECUTE p_ret;
-
-    -- second temp table with locus (index of intersection point on the line)
-    -- to avoid updating the previous table
-    -- we keep only intersection points occurring onto the line, not at one of its ends
---    drop table if exists inter_loc;
-
---HAD TO CHANGE THIS QUERY
--- p_ret= 'create temp table inter_loc on commit drop as (
---        select l1id, l2id, ' || vst_line_locate_point || '(line,point) as locus from (
---        select DISTINCT l1id, l2id, line, (ST_DumpPoints(geom)).geom as point from intergeom) as foo
---        where ' || vst_line_locate_point || '(line,point)<>0 and ' || vst_line_locate_point || '(line,point)<>1)';
-    p_ret= 'create temp table inter_loc on commit drop as ( select * from (
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,source) as locus from intergeom)
-         union
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,target) as locus from intergeom)) as foo
-        where locus<>0 and locus<>1)';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-
-    -- index on l1id
-    create index inter_loc_id_idx on inter_loc(l1id);
-
-    -- Then computes the intersection on the lines subset, which is much smaller than full set
-    -- as there are very few intersection points
-
---- outab needs to be formally created with id, old_id, subid,the_geom, source,target
----  so it can be inmediatly be used with createTopology
-
---   EXECUTE 'drop table if exists ' || _pgr_quote_ident(outtab);
---   EXECUTE 'create table ' || _pgr_quote_ident(outtab) || ' as
-     P_RET = 'insert into '||_pgr_quote_ident(outtab)||' (old_id,sub_id,'||quote_ident(n_geom)||') (  with cut_locations as (
-           select l1id as lid, locus
-           from inter_loc
-           -- then generates start and end locus for each line that have to be cut buy a location point
-           UNION ALL
-           select i.l1id  as lid, 0 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           UNION ALL
-           select i.l1id  as lid, 1 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           order by lid, locus
-       ),
-       -- we generate a row_number index column for each input line
-       -- to be able to self-join the table to cut a line between two consecutive locations
-       loc_with_idx as (
-           select lid, locus, row_number() over (partition by lid order by locus) as idx
-           from cut_locations
-       )
-       -- finally, each original line is cut with consecutive locations using linear referencing functions
-       select l.' || quote_ident(n_pkey) || ', loc1.idx as sub_id, ' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus) as ' || quote_ident(n_geom) || '
-       from loc_with_idx loc1 join loc_with_idx loc2 using (lid) join ' || _pgr_quote_ident(intab) || ' l on (l.' || quote_ident(n_pkey) || ' = loc1.lid)
-       where loc2.idx = loc1.idx+1
-           -- keeps only linestring geometries
-           and geometryType(' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus)) = ''LINESTRING'') ';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-	GET DIAGNOSTICS splits = ROW_COUNT;
-        execute 'with diff as (select distinct old_id from '||_pgr_quote_ident(outtab)||' )
-                 select count(*) from diff' into touched;
-	-- here, it misses all original line that did not need to be cut by intersection points: these lines
-	-- are already clean
-	-- inserts them in the final result: all lines which gid is not in the res table.
-	EXECUTE 'insert into ' || _pgr_quote_ident(outtab) || ' (old_id , sub_id, ' || quote_ident(n_geom) || ')
-                ( with used as (select distinct old_id from '|| _pgr_quote_ident(outtab)||')
-		select ' ||  quote_ident(n_pkey) || ', 1 as sub_id, ' ||  quote_ident(n_geom) ||
-		' from '|| _pgr_quote_ident(intab) ||' where  '||quote_ident(n_pkey)||' not in (select * from used)' || rows_where || ')';
-	GET DIAGNOSTICS untouched = ROW_COUNT;
-
-	raise NOTICE '  Split Edges: %', touched;
-	raise NOTICE ' Untouched Edges: %', untouched;
-	raise NOTICE '     Total original Edges: %', touched+untouched;
-        RAISE NOTICE ' Edges generated: %', splits;
-	raise NOTICE ' Untouched Edges: %',untouched;
-	raise NOTICE '       Total New segments: %', splits+untouched;
-        RAISE NOTICE ' New Table: %', outtab;
-        RAISE NOTICE '----------------------------------';
-
-    drop table  if exists intergeom;
-    drop table if exists inter_loc;
-    RETURN 'OK';
-END;
-$BODY$
-    LANGUAGE 'plpgsql' VOLATILE STRICT COST 100;
-
-
-COMMENT ON FUNCTION pgr_nodeNetwork(text, double precision, text, text, text, text, boolean )
- IS  'edge_table, tolerance, id:=''id'', the_geom:=''the_geom'', table_ending:=''noded'' ';
-
-
-CREATE OR REPLACE FUNCTION pgr_labelGraph(
-                edge_table text,
-                id text default 'id',
-                source text default 'source',
-                target text default 'target',
-                subgraph text default 'subgraph',
-                rows_where text default 'true'
-        )
-        RETURNS character varying AS
-$BODY$
-
-DECLARE
-        naming record;
-        schema_name text;
-        table_name text;
-        garbage text;
-        incre integer;
-        table_schema_name text;
-        query text;
-        ecnt integer;
-        sql1 text;
-        rec1 record;
-        sql2 text;
-        rec2 record;
-        rec_count record;
-        rec_single record;
-        graph_id integer;
-        gids int [];
-
-BEGIN
-        raise notice 'Processing:';
-        raise notice 'pgr_brokenGraph(''%'',''%'',''%'',''%'',''%'',''%'')', edge_table,id,source,target,subgraph,rows_where;
-        raise notice 'Performing initial checks, please hold on ...';
-
-        Raise Notice 'Starting - Checking table ...';
-        BEGIN
-                raise debug 'Checking % table existance', edge_table;
-                execute 'select * from pgr_getTableName('|| quote_literal(edge_table) ||')' into naming;
-                schema_name = naming.sname;
-                table_name = naming.tname;
-                table_schema_name = schema_name||'.'||table_name;
-                IF schema_name is null then
-                        raise notice 'no schema';
-                        return 'FAIL';
-                else
-                        if table_name is null then
-                                raise notice 'no table';
-                                return 'FAIL';
-                        end if;
-                end if;
-        END;
-        Raise Notice 'Ending - Checking table';
-
-        Raise Notice 'Starting - Checking columns';
-        BEGIN
-                raise debug 'Checking exitance of necessary columns inside % table', edge_table;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(id) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no id column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(source) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no source column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(target) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no target column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(subgraph) ||')' into naming;
-                if naming.pgr_iscolumnintable = 't' then
-                        raise notice 'subgraph column already in the table';
-                        return 'FAIL';
-                end if;
-        END;
-        Raise Notice 'Ending - Checking columns';
-
-        Raise Notice 'Starting - Checking rows_where condition';
-        BEGIN
-                raise debug 'Checking rows_where condition';
-                query='select count(*) from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where;
-                execute query into ecnt;
-                raise debug '-->Rows where condition: OK';
-                raise debug '    --> OK';
-                EXCEPTION WHEN OTHERS THEN
-                        raise notice 'Got %', SQLERRM;
-                        Raise notice 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-                        Raise notice '%', query;
-                        return 'FAIL';
-        END;
-        Raise Notice 'Ending - Checking rows_where condition';
-
-        garbage := 'garbage001';
-        incre := 1;
-        Raise Notice 'Starting - Checking temporary column';
-        Begin
-                raise debug 'Checking Checking temporary columns existance';
-
-                While True
-                        Loop
-                                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(garbage) ||')' into naming;
-                                If naming.pgr_iscolumnintable = 't' THEN
-                                        incre := incre + 1;
-                                        garbage := 'garbage00'||incre||'';
-                                ELSE
-                                        EXIT;
-                                END IF;
-                        End Loop;
-        End;
-        Raise Notice 'Ending - Checking temporary column';
-
-        Raise Notice 'Starting - Calculating subgraphs';
-        BEGIN
-                --------- Add necessary columns ----------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(subgraph) || ' INTEGER DEFAULT -1';
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(garbage) || ' INTEGER DEFAULT 0';
-                graph_id := 1;
-
-                EXECUTE 'select count(*) as count from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where ||'' into rec_count;
-                if rec_count.count = 0 then
-                        RETURN 'rows_where condition generated 0 rows';
-                end if;
-
-                WHILE TRUE
-                        LOOP
-                                ---------- Assign the very first -1 row graph_id ----------
-                                EXECUTE 'SELECT ' || pgr_quote_ident(id) || ' AS gid FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1 LIMIT 1' INTO rec_single;
-                                EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec_single.gid || '';
-
-                                --------- Search other rows with that particular graph_id -----------
-                                WHILE TRUE
-                                        LOOP
-                                                EXECUTE 'SELECT COUNT(*) FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0' into rec_count;
-                                                ----------- The following if else will check those rows which already have entertained ------------
-                                                IF (rec_count.count > 0) THEN
-                                                        sql1 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0';
-                                                        FOR rec1 IN EXECUTE sql1
-                                                                LOOP
-                                                                        sql2 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| pgr_quote_ident(source) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(source) ||' = '|| rec1.target ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.target ||'';
-                                                                        FOR rec2 IN EXECUTE sql2
-                                                                                LOOP
-                                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec2.gid || '';
-                                                                                END LOOP;
-                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(garbage) || ' = 1 WHERE ' || pgr_quote_ident(id) || ' = ' || rec1.gid || '';
-                                                                END LOOP;
-                                                ELSE
-                                                        EXIT;
-                                                END IF;
-                                        END LOOP;
-
-                                ------ Following is to exit the while loop. 0 means no more -1 id.
-                                EXECUTE 'SELECT COUNT(*) AS count FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1' INTO rec_count;
-                                If (rec_count.count = 0) THEN
-                                        EXIT;
-                                ELSE
-                                        graph_id := graph_id + 1;
-                                END IF;
-                        END LOOP;
-
-                ----------- Drop garbage column ------------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' DROP COLUMN ' || pgr_quote_ident(garbage) ||'';
-                Raise Notice 'Successfully complicated calculating subgraphs';
-        END;
-        Raise Notice 'Ending - Calculating subgraphs';
-
-        RETURN 'OK';
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCostMatrix(
-    edges_sql TEXT,
-    points_sql TEXT,
-    pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_pid, a.end_pid, a.agg_cost
-        FROM _pgr_withPoints($1, $2, $3, $3, $4,  $5, TRUE, TRUE) AS a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
---  DIJKSTRA DMatrix
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2, $2, $3, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
---  BIDIRECTIONAL DIJKSTRA Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_astarCostMatrix(
-    edges_sql TEXT, -- XY edges sql
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2, $2, $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
---  BIDIRECTIONAL ASTAR Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdAstarCostMatrix(
-    edges_sql TEXT,
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_bdAstarCostMatrix(TEXT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCostMatrix';
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_getTableName(IN tab text,OUT sname text,OUT tname text)
-RETURNS RECORD AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getTableName: This function will no longer be soported';
-    select * from _pgr_getTableName(tab, 0, 'pgr_getTableName') into sname,tname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_getColumnName(tab text, col text)
-RETURNS text AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getColumnName: This function will no longer be soported';
-    return _pgr_getColumnName(tab,col, 0, 'pgr_getColumnName');
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    select * from _pgr_getColumnName(tab,col,0, 'pgr_isColumnInTable') into cname;
-    return  cname IS not NULL;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnIndexed(tab text, col text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnIndexed: This function will no longer be soported';
-    return  _pgr_isColumnIndexed(tab,col);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-create or replace function pgr_quote_ident(idname text)
-returns text as
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    return  _pgr_quote_ident(idname);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_versionless(v1 text, v2 text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_versionless: This function will no longer be soported';
-    return  _pgr_versionless(v1,v2);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-create or replace function pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_startPoint: This function will no longer be soported';
-    return  _pgr_startPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_endPoint: This function will no longer be soported';
-    return  _pgr_endPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspJohnson(edges_sql text)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_johnson instead';
-      has_reverse =_pgr_parameter_check('johnson', edges_sql, false);
-      sql = edges_sql;
-      IF (has_reverse) THEN
-           RAISE NOTICE 'reverse_cost column found, removing.';
-           sql = 'SELECT source, target, cost FROM (' || edges_sql || ') a';
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () - 1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_johnson(sql, TRUE);
-  END
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspWarshall(edges_sql text, directed boolean, has_rcost boolean)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_floydWarshall instead';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-      sql := edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         ELSE raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () -1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_floydWarshall(sql, directed);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_astar(edges_sql TEXT, source_id INTEGER, target_id INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated signature pgr_astar(text, integer, integer, boolean, boolean)';
-    has_reverse =_pgr_parameter_check('astar', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost, x1,y1, x2, y2 FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-    FROM pgr_astar(sql, ARRAY[$2], ARRAY[$3], directed);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    sql TEXT,
-    source_vid INTEGER,
-    target_vid INTEGER,
-    directed BOOLEAN,
-    has_reverse_cost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdAstar';
-    has_reverse =_pgr_parameter_check('astar', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdAstar(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(edges_sql TEXT, start_vid INTEGER, end_vid INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdDijkstra';
-    has_reverse =_pgr_parameter_check('dijkstra', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdDijkstra(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstraPath(
-    sql text,
-    source INTEGER,
-    targets INTEGER ARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-    RETURNS SETOF pgr_costResult3 AS
-    $BODY$
-    DECLARE
-    has_reverse BOOLEAN;
-    new_sql TEXT;
-    result pgr_costResult3;
-    tmp pgr_costResult3;
-    sseq INTEGER;
-    i INTEGER;
-    BEGIN
-        RAISE NOTICE 'Deprecated function: Use pgr_dijkstra instead.';
-        has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-        new_sql = sql;
-        IF (array_ndims(targets) != 1) THEN
-            raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-
-        IF (has_reverse != has_rcost) THEN
-            IF (has_reverse) THEN
-                new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-            ELSE
-                raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-                USING ERRCODE = 'XX000';
-            END IF;
-        END IF;
-        SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-        sseq = 0; i = 1;
-        FOR result IN
-            SELECT seq, a.end_vid::INTEGER AS id1, a.node::INTEGER AS i2, a.edge::INTEGER AS id3, cost
-            FROM pgr_dijkstra(new_sql, source, targets, directed) a ORDER BY a.end_vid, seq LOOP
-            WHILE (result.id1 != targets[i]) LOOP
-                tmp.seq = sseq;
-                tmp.id1 = targets[i];
-                IF (targets[i] = source) THEN
-                    tmp.id2 = source;
-                    tmp.cost =0;
-                ELSE
-                    tmp.id2 = 0;
-                    tmp.cost = -1;
-                END IF;
-                tmp.id3 = -1;
-                RETURN next tmp;
-                i = i + 1;
-                sseq = sseq + 1;
-            END LOOP;
-        IF (result.id1 = targets[i] AND result.id3 != -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-        IF (result.id1 = targets[i] AND result.id3 = -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.id2 = source;
-            tmp.cost = 0;
-        ELSE
-            tmp.id2 = 0;
-            tmp.cost = -1;
-        END IF;
-        tmp.id3 = -1;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstracost(
-    sql text,
-    source INTEGER,
-    targets INTEGER array,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-result pgr_costResult;
-tmp pgr_costResult;
-sseq INTEGER;
-i INTEGER;
-BEGIN
-    RAISE NOTICE 'Deprecated function. Use pgr_dijkstraCost instead.';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    new_sql = sql;
-    IF (array_ndims(targets) != 1) THEN
-        raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-        USING ERRCODE = 'XX000';
-    END IF;
-
-
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-    sseq = 0; i = 1;
-    FOR result IN
-        SELECT ((row_number() over()) -1)::INTEGER, a.start_vid::INTEGER, a.end_vid::INTEGER, agg_cost
-        FROM pgr_dijkstraCost(new_sql, source, targets, directed) a ORDER BY end_vid LOOP
-        WHILE (result.id2 != targets[i]) LOOP
-            tmp.seq = sseq;
-            tmp.id1 = source;
-            tmp.id2 = targets[i];
-            IF (targets[i] = source) THEN
-                tmp.cost = 0;
-            ELSE
-                tmp.cost = -1;
-            END IF;
-            RETURN next tmp;
-            i = i + 1;
-            sseq = sseq + 1;
-        END LOOP;
-        IF (result.id2 = targets[i]) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = source;
-        tmp.id2 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.cost = 0;
-        ELSE
-            tmp.cost = -1;
-        END IF;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-create or replace function pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    returns integer as
-$body$
-
-declare
-    rr record;
-    pct float;
-    debuglevel text;
-
-begin
-    -- find the closest edge within tol distance
-    execute 'select * from ' || _pgr_quote_ident(edges) ||
-            ' where st_dwithin(''' || pnt::text ||
-            '''::geometry, the_geom, ' || tol || ') order by st_distance(''' || pnt::text ||
-            '''::geometry, the_geom) asc limit 1' into rr;
-
-    if rr.the_geom is not null then
-        -- deal with MULTILINESTRINGS
-        if geometrytype(rr.the_geom)='MULTILINESTRING' THEN
-            rr.the_geom := ST_GeometryN(rr.the_geom, 1);
-        end if;
-
-        -- project the point onto the linestring
-        execute 'show client_min_messages' into debuglevel;
-        SET client_min_messages='ERROR';
-        pct := st_line_locate_point(rr.the_geom, pnt);
-        execute 'set client_min_messages  to '|| debuglevel;
-
-        -- return the node we are closer to
-        if pct < 0.5 then
-            return rr.source;
-        else
-            return rr.target;
-        end if;
-    else
-        -- return a failure to find an edge within tol distance
-        return -1;
-    end if;
-end;
-$body$
-  language plpgsql volatile
-  cost 5;
-
-
-----------------------------------------------------------------------------
-
-create or replace function pgr_flipedges(ga geometry[])
-    returns geometry[] as
-$body$
-
-declare
-    nn integer;
-    i integer;
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_flipEdges';
-    -- get the count of edges, and return if only one edge
-    nn := array_length(ga, 1);
-    if nn=1 then
-        return ga;
-    end if;
-
-    -- determine if first needs to be flipped
-    g := _pgr_startpoint(ga[1]);
-
-    -- if the start of the first is connected to the second then it needs to be flipped
-    if _pgr_startpoint(ga[2])=g or _pgr_endpoint(ga[2])=g then
-        ga[1] := st_reverse(ga[1]);
-    end if;
-    g := _pgr_endpoint(ga[1]);
-
-    -- now if  the end of the last edge matchs the end of the current edge we need to flip it
-    for i in 2 .. nn loop
-        if _pgr_endpoint(ga[i])=g then
-            ga[i] := st_reverse(ga[i]);
-        end if;
-        -- save the end of this edge into the last end for the next cycle
-        g := _pgr_endpoint(ga[i]);
-    end loop;
-
-    return ga;
-end;
-$body$
-    language plpgsql immutable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_texttopoints(pnts text, srid integer DEFAULT(4326))
-    returns geometry[] as
-$body$
-
-declare
-    a text[];
-    t text;
-    p geometry;
-    g geometry[];
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_textToPoints';
-    -- convert commas to space and split on ';'
-    a := string_to_array(replace(pnts, ',', ' '), ';');
-    -- convert each 'x y' into a point geometry and concattenate into a new array
-    for t in select unnest(a) loop
-        p := st_pointfromtext('POINT(' || t || ')', srid);
-        g := g || p;
-    end loop;
-
-    return g;
-end;
-$body$
-    language plpgsql immutable;
-
------------------------------------------------------------------------
-
-create or replace function pgr_pointstovids(pnts geometry[], edges text, tol float8 DEFAULT(0.01))
-    returns integer[] as
-$body$
-
-declare
-    v integer[];
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_pointsToVids';
-    -- cycle through each point and locate the nearest edge and vertex on that edge
-    for g in select unnest(pnts) loop
-        v := v || pgr_pointtoedgenode(edges, g, tol);
-    end loop;
-
-    return v;
-end;
-$body$
-    language plpgsql stable;
-
-
-create or replace function pgr_pointstodmatrix(pnts geometry[], mode integer default (0), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    r record;
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_pointsToDMatrix';
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    -- create an id for each point in the array and unnest it into a table nodes in the with clause
-    for r in with nodes as (select row_number() over()::integer as id, p from (select unnest(pnts) as p) as foo)
-        -- compute a row of distances
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j,
-                case when mode=0
-                    then st_distance(a.p, b.p)
-                    else st_distance_sphere(a.p, b.p)
-                end as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i loop
-
-        -- you must concat an array[array[]] to make dmatrix[][]
-        -- concat the row of distances to the dmatrix
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-end;
-$body$
-    language plpgsql stable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_vidstodmatrix(IN vids integer[], IN pnts geometry[], IN edges text, tol float8 DEFAULT(0.1), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    i integer;
-    j integer;
-    nn integer;
-    rr record;
-    bbox geometry;
-    t float8[];
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    -- check if the input arrays has any -1 values, maybe this whould be a raise exception
-    if vids @> ARRAY[-1] then
-    raise notice 'Some vids are undefined (-1)!';
-    dmatrix := null;
-    ids := null;
-    return;
-    end if;
-
-    ids := vids;
-
-    -- get the count of nodes
-    nn := array_length(vids,1);
-
-    -- zero out a dummy row
-    for i in 1 .. nn loop
-        t := t || 0.0::float8;
-    end loop;
-
-    -- using the dummy row, zero out the whole matrix
-    for i in 1 .. nn loop
-    dmatrix := dmatrix || ARRAY[t];
-    end loop;
-
-    for i in 1 .. nn-1 loop
-        j := i;
-        -- compute the bbox for the point needed for this row
-        select st_expand(st_collect(pnts[id]), tol) into bbox
-          from (select generate_series as id from generate_series(i, nn)) as foo;
-
-        -- compute kdijkstra() for this row
-        for rr in execute 'select * from pgr_dijkstracost($1, $2, $3, false)'
-                  using 'select id, source, target, cost from ' || edges ||
-                        ' where the_geom && ''' || bbox::text || '''::geometry'::text, vids[i], vids[i+1:nn] loop
-
-            -- TODO need to check that all node were reachable from source
-            -- I think unreachable paths between nodes returns cost=-1.0
-
-            -- populate the matrix with the cost values, remember this is symmetric
-            j := j + 1;
-            -- raise notice 'cost(%,%)=%', i, j, rr.agg_cost;
-            dmatrix[i][j] := rr.agg_cost;
-            dmatrix[j][i] := rr.agg_cost;
-        end loop;
-    end loop;
-
-end;
-$body$
-    language plpgsql stable cost 200;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_vidsToDMatrix(sql TEXT, vids  INTEGER[], dir BOOLEAN, has_rcost BOOLEAN, want_symmetric BOOLEAN)
-RETURNS float8[] AS
-$BODY$
-DECLARE
-directed BOOLEAN;
-has_reverse BOOLEAN;
-edges_sql TEXT;
-dmatrix_row float8[];
-dmatrix float8[];
-cell RECORD;
-unique_vids INTEGER[];
-total BIGINT;
-from_v BIGINT;
-to_v BIGINT;
-BEGIN
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql = sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    unique_vids :=  ARRAY(SELECT DISTINCT UNNEST(vids) ORDER BY 1);
-
-    IF want_symmetric THEN
-        directed = false;
-    ELSE
-        directed = dir;
-    END IF;
-
-    total := array_length(unique_vids, 1);
-
-    -- initializing dmatrix
-    FOR i in 1 .. total LOOP
-        dmatrix_row := dmatrix_row || '+Infinity'::float8;
-    END LOOP;
-    FOR i in 1 .. total LOOP
-    dmatrix := dmatrix || ARRAY[dmatrix_row];
-    dmatrix[i][i] = 0;
-    END LOOP;
-
-    CREATE TEMP TABLE __x___y____temp AS
-        WITH result AS
-            (SELECT unnest(unique_vids) AS vid)
-        SELECT row_number() OVER() AS idx, vid FROM result;
-
-    FOR cell IN SELECT * FROM pgr_dijkstraCostMatrix(sql, unique_vids, directed) LOOP
-        SELECT idx INTO from_v FROM __x___y____temp WHERE vid =  cell.start_vid;
-        SELECT idx INTO to_v FROM __x___y____temp WHERE vid =  cell.end_vid;
-
-        dmatrix[from_v][to_v] = cell.agg_cost;
-        dmatrix[to_v][from_v] = cell.agg_cost;
-    END LOOP;
-
-    DROP TABLE IF EXISTS __x___y____temp;
-    RETURN dmatrix;
-
-    EXCEPTION WHEN others THEN
-       DROP TABLE IF EXISTS __x___y____temp;
-       raise exception '% %', SQLERRM, SQLSTATE;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated function';
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_dijkstra(sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_dijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN) IS 'pgr_dijkstra(Deprecated signature)';
-
-
-
-
-
--- OLD SIGNATURE
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(edges_sql text, source BIGINT, distance FLOAT, directed BOOLEAN, has_rcost BOOLEAN)
-  RETURNS SETOF pgr_costresult AS
-  $BODY$
-  DECLARE
-  has_reverse BOOLEAN;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function';
-
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, FALSE);
-
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-             -- the user says it doesn't have reverse cost but its false
-             -- removing from query
-             RAISE NOTICE 'Contradiction found: has_rcost set to false but reverse_cost column found';
-             sql = 'SELECT id, source, target, cost, -1 as reverse_cost FROM (' || edges_sql || ') __q ';
-         ELSE
-             -- the user says it has reverse cost but its false
-             -- can't do anything
-             RAISE EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query SELECT seq - 1 AS seq, node::integer AS id1, edge::integer AS id2, agg_cost AS cost
-                FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maximumcardinalitymatching(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---INTERNAL FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
-------------------------
--- deprecated signatures
------------------------
-
-COMMENT ON FUNCTION pgr_astar(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_astar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdAstar( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdAstar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdDijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdDijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_dijkstra(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_dijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_drivingDistance(text,  BIGINT,  FLOAT8,  BOOLEAN,  BOOLEAN)
-    IS 'pgr_drivingDistance(Deprecated signature)';
-
-------------------------
--- Renamed /deprecated
------------------------
-COMMENT ON FUNCTION pgr_apspJohnson(TEXT)
-    IS 'pgr_apspJohnson(Renamed function) use pgr_Johnson instead';
-
-COMMENT ON FUNCTION pgr_apspWarshall(text, boolean, boolean)
-    IS 'pgr_apspWarshall(Renamed function) use pgr_floydWarshall instead';
-
-COMMENT ON FUNCTION pgr_kdijkstraPath( text, INTEGER, INTEGER ARRAY, BOOLEAN, BOOLEAN)
-    IS 'pgr_kdijkstraPath(Renamed function) use pgr_dijkstra instead';
-
-COMMENT ON FUNCTION pgr_kdijkstracost( text, INTEGER, INTEGER array, BOOLEAN, BOOLEAN)
-    IS 'pgr_kDijkstraCost(Renamed function) use pgr_dijkstraCost instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-
-
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-
-
-COMMENT ON FUNCTION pgr_gsoc_vrppdtw( text, INTEGER, INTEGER)
-    IS 'pgr_gsoc_vrppdtw(Renamed function) use pgr_pickDeliverEuclidean instead';
-
-------------------------
--- Deprecated functions
------------------------
-
-COMMENT ON FUNCTION pgr_flipedges(geometry[])
-    IS 'pgr_flipedges(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_texttopoints(text,  integer)
-    IS 'pgr_texttopoints(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstovids(pnts geometry[], edges text, tol float8)
-    IS 'pgr_pointstovids(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    IS 'pgr_pointtoedgenode(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstodmatrix(geometry[], integer)
-    IS 'pgr_pointstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidstodmatrix( integer[],  geometry[],  text, float8)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidsToDMatrix(TEXT,  INTEGER[], BOOLEAN, BOOLEAN, BOOLEAN)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-
-
-
-COMMENT ON FUNCTION pgr_getTableName(IN tab text)
-    IS 'pgr_getTableName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_getColumnName(tab text, col text)
-    IS 'pgr_getColumnName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnInTable(tab text, col text)
-    IS 'pgr_isColumnInTable(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnIndexed(tab text, col text)
-    IS 'pgr_isColumnIndexed(Deprecated function)';
-
-
-COMMENT ON FUNCTION pgr_quote_ident(idname text)
-    IS 'pgr_quote_ident(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_versionless(v1 text, v2 text)
-    IS 'pgr_versionless(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_startPoint(g geometry)
-    IS 'pgr_startPoint(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_endPoint(g geometry)
-    IS 'pgr_endPoint(Deprecated function)';
-
-
diff --git a/tools/sql-update-scripts/pgrouting--2.5.0--2.5.2.sql b/tools/sql-update-scripts/pgrouting--2.5.0--2.5.2.sql
deleted file mode 100644
index c0c9c03..0000000
--- a/tools/sql-update-scripts/pgrouting--2.5.0--2.5.2.sql
+++ /dev/null
@@ -1,6423 +0,0 @@
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- pgRouting extension upgrade from 2.5.0 to 2.5.2
--- generated by tools/build-extension-update-files
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-\echo Use "ALTER extension pgrouting update to '2.5.2'" to load this file. \quit
-
-
--------------------------------------
--- remove functions no longer in the 2.5.2 extension
--------------------------------------
-
-
-
-
-
-
-
-
-
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
---- pgRouting provides geospatial routing functionality.
---- http://pgrouting.org
---- copyright
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
----
---- This is free software; you can redistribute and/or modify it:
---- the terms of the GNU General Public Licence. See the COPYING file.
---- the terms of the MIT-X Licence. See the COPYING file.
----
---- The following functions have MIT-X licence:
----     pgr_version()
----     pgr_tsp(matrix float8[][], startpt integer, endpt integer DEFAULT -1, OUT seq integer, OUT id integer)
----     _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
----     pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
----
----
---- All other functions are under GNU General Public Licence.
----
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
--- WARNING: Any change in this file must be evaluated for compatibility.
---          Changes cleanly handled by postgis_upgrade.sql are fine,
---          other changes will require a bump in Major version.
---          Currently only function replaceble by CREATE OR REPLACE
---          are cleanly handled.
---
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
---  pgRouting 2.0 types
-
-
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_version()
-RETURNS TABLE(
-        "version" varchar,
-        tag varchar,
-        hash varchar,
-        branch varchar,
-        boost varchar
-    ) AS
-$BODY$
-    SELECT '2.5.2'::varchar AS version,
-        'v2.5.2'::varchar AS tag,
-        '60585f1f7'::varchar AS hash,
-        'master'::varchar AS branch,
-        '1.54.0'::varchar AS boost;
-$BODY$
-LANGUAGE sql IMMUTABLE;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getTableName(IN tab text, IN reportErrs int default 0, IN fnName text default '_pgr_getTableName', OUT sname text,OUT tname text)
-  RETURNS RECORD AS
-$$
-DECLARE
-        naming record;
-        i integer;
-        query text;
-        sn text; -- schema name
-        tn text; -- table name
-        ttype text; --table type for future use
-        err boolean;
-        debuglevel text;
-        var_types text[] = ARRAY['BASE TABLE', 'VIEW'];
-BEGIN
-
-    execute 'show client_min_messages' into debuglevel;
-
-
-    perform _pgr_msg( 0, fnName, 'Checking table ' || tab || ' exists');
-    --RAISE DEBUG 'Checking % exists',tab;
-
-    i := strpos(tab,'.');
-    IF (i <> 0) THEN
-        sn := split_part(tab, '.',1);
-        tn := split_part(tab, '.',2);
-    ELSE
-        sn := current_schema;
-        tn := tab;
-    END IF;
-
-
-   SELECT schema_name INTO sname
-   FROM information_schema.schemata WHERE schema_name = sn;
-
-    IF sname IS NOT NULL THEN -- found schema (as is)
-       SELECT table_name, table_type INTO tname, ttype
-       FROM information_schema.tables
-       WHERE
-                table_type = ANY(var_types) and
-                table_schema = sname and
-                table_name = tn ;
-        IF tname is NULL THEN
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  = ANY(var_types) and
-                table_schema = sname and
-                table_name = lower(tn) ORDER BY table_name;
-        END IF;
-    END IF;
-    IF sname is NULL or tname is NULL THEN --schema not found or table not found
-        SELECT schema_name INTO sname
-        FROM information_schema.schemata
-        WHERE schema_name = lower(sn) ;
-
-        IF sname IS NOT NULL THEN -- found schema (with lower caps)
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  =  ANY(var_types) and
-                table_schema = sname and
-                table_name= tn ;
-
-           IF tname IS NULL THEN
-                SELECT table_name, table_type INTO tname, ttype
-                FROM information_schema.tables
-                WHERE
-                    table_type  =  ANY(var_types) and
-                    table_schema = sname and
-                    table_name= lower(tn) ;
-           END IF;
-        END IF;
-    END IF;
-   err = (sname IS NULL OR tname IS NULL);
-   perform _pgr_onError(err, reportErrs, fnName, 'Table ' || tab ||' not found',' Check your table name', 'Table '|| tab || ' found');
-
-END;
-$$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(sname text, tname text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(col) into cname;
-
-    IF cname is null  THEN
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(lower(col))  into cname;
-    END if;
-
-    err = cname is null;
-
-    perform _pgr_onError(err, reportErrs, fnName,  'Column '|| col ||' not found', ' Check your column name','Column '|| col || ' found');
-    RETURN cname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(tab text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-
-    select * into cname from _pgr_getColumnName(sname,tname,col,reportErrs, fnName);
-    RETURN cname;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    select * from _pgr_getColumnName(tab,col,0, '_pgr_isColumnInTable') into cname;
-    return cname is not null;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(sname text, tname text, cname text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    pkey text;
-BEGIN
-    SELECT
-          pg_attribute.attname into pkey
-         --  format_type(pg_attribute.atttypid, pg_attribute.atttypmod)
-          FROM pg_index, pg_class, pg_attribute
-          WHERE
-                  pg_class.oid = _pgr_quote_ident(sname||'.'||tname)::regclass AND
-                  indrelid = pg_class.oid AND
-                  pg_attribute.attrelid = pg_class.oid AND
-                  pg_attribute.attnum = any(pg_index.indkey)
-                  AND indisprimary;
-
-    IF pkey=cname then
-          RETURN TRUE;
-    END IF;
-
-    SELECT a.index_name,
-           b.attname,
-           b.attnum,
-           a.indisunique,
-           a.indisprimary
-      INTO rec
-      FROM ( SELECT a.indrelid,
-                    a.indisunique,
-                    a.indisprimary,
-                    c.relname index_name,
-                    unnest(a.indkey) index_num
-               FROM pg_index a,
-                    pg_class b,
-                    pg_class c,
-                    pg_namespace d
-              WHERE b.relname=tname
-                AND b.relnamespace=d.oid
-                AND d.nspname=sname
-                AND b.oid=a.indrelid
-                AND a.indexrelid=c.oid
-           ) a,
-           pg_attribute b
-     WHERE a.indrelid = b.attrelid
-       AND a.index_num = b.attnum
-       AND b.attname = cname
-  ORDER BY a.index_name,
-           a.index_num;
-
-  RETURN FOUND;
-  EXCEPTION WHEN OTHERS THEN
-    perform _pgr_onError( true, reportErrs, fnName,
-    'Error when checking for the postgres system attributes', SQLERR);
-    RETURN FALSE;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(tab text, col text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    sname text;
-    tname text;
-    cname text;
-    pkey text;
-    value boolean;
-BEGIN
-    SELECT * into naming FROM _pgr_getTableName(tab, 0, fnName);
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    SELECT * into cname from _pgr_getColumnName(sname, tname, col, 0, fnName) ;
-    IF cname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    select * into value  from _pgr_isColumnIndexed(sname, tname, cname, reportErrs, fnName);
-    return value;
-END
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-create or replace function _pgr_quote_ident(idname text)
-    returns text as
-$body$
-declare
-    t text[];
-    pgver text;
-
-begin
-    pgver := regexp_replace(version(), E'^PostgreSQL ([^ ]+)[ ,].*$', E'\\1');
-
-    if _pgr_versionless(pgver, '9.2') then
-        select into t array_agg(quote_ident(term)) from
-            (select nullif(unnest, '') as term
-               from unnest(string_to_array(idname, '.'))) as foo;
-    else
-        select into t array_agg(quote_ident(term)) from
-            (select unnest(string_to_array(idname, '.', '')) as term) as foo;
-    end if;
-    return array_to_string(t, '.');
-end;
-$body$
-language plpgsql immutable;
-
-
-CREATE OR REPLACE FUNCTION _pgr_versionless(v1 text, v2 text)
-  RETURNS boolean AS
-$BODY$
-
-
-declare
-    v1a text[];
-    v2a text[];
-    nv1 integer;
-    nv2 integer;
-    ne1 integer;
-    ne2 integer;
-
-begin
-    -- separate components into an array, like:
-    -- '2.1.0-beta3dev'  =>  {2,1,0,beta3dev}
-    v1a := regexp_matches(v1, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-    v2a := regexp_matches(v2, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-
-    -- convert modifiers to numbers for comparison
-    -- we do not delineate between alpha1, alpha2, alpha3, etc
-    ne1 := case when v1a[4] is null or v1a[4]='' then 5
-                when v1a[4] ilike 'rc%' then 4
-                when v1a[4] ilike 'beta%' then 3
-                when v1a[4] ilike 'alpha%' then 2
-                when v1a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    ne2 := case when v2a[4] is null or v2a[4]='' then 5
-                when v2a[4] ilike 'rc%' then 4
-                when v2a[4] ilike 'beta%' then 3
-                when v2a[4] ilike 'alpha%' then 2
-                when v2a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    nv1 := v1a[1]::integer * 10000 +
-           coalesce(v1a[2], '0')::integer * 1000 +
-           coalesce(v1a[3], '0')::integer *  100 + ne1;
-    nv2 := v2a[1]::integer * 10000 +
-           coalesce(v2a[2], '0')::integer * 1000 +
-           coalesce(v2a[3], '0')::integer *  100 + ne2;
-
-    --raise notice 'nv1: %, nv2: %, ne1: %, ne2: %', nv1, nv2, ne1, ne2;
-
-    return nv1 < nv2;
-end;
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-create or replace function _pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_startpoint(st_geometryn(g,1));
-    else
-        return st_startpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function _pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_endpoint(st_geometryn(g,1));
-    else
-        return st_endpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_parameter_check(fn text, sql text, big boolean default false)
-  RETURNS bool AS
-  $BODY$
-
-  DECLARE
-  rec record;
-  rec1 record;
-  has_rcost boolean;
-  safesql text;
-  BEGIN
-    IF (big) THEN
-       RAISE EXCEPTION 'This function is for old style functions';
-    END IF;
-
-    -- checking query is executable
-    BEGIN
-      safesql =  'select * from ('||sql||' ) AS __a__ limit 1';
-      execute safesql into rec;
-      EXCEPTION
-        WHEN OTHERS THEN
-            RAISE EXCEPTION 'Could not execute query please verify syntax of: '
-              USING HINT = sql;
-    END;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('dijkstra','astar') THEN
-        BEGIN
-          execute 'select id,source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: id, source, target, cost';
-        END;
-        execute 'select pg_typeof(id)::text as id_type, pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.id_type in ('integer'::text))
-              AND (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Error, columns ''source'', ''target'' must be of type int4, ''cost'' must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    IF fn IN ('astar') THEN
-        BEGIN
-          execute 'select x1,y1,x2,y2  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: x1,y1, x2,y2';
-        END;
-        execute 'select pg_typeof(x1)::text as x1_type, pg_typeof(y1)::text as y1_type, pg_typeof(x2)::text as x2_type, pg_typeof(y2)::text as y2_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.x1_type = 'double precision'::text)
-              AND (rec.y1_type = 'double precision'::text)
-              AND (rec.x2_type = 'double precision'::text)
-              AND (rec.y2_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Columns: x1, y1, x2, y2 must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('johnson') THEN
-        BEGIN
-          execute 'select source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING HINT = 'Please veryfy the column names: id, source, target, cost',
-                         ERRCODE = 'XX000';
-        END;
-
-        execute 'select pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Support for source,target columns only of type: integer. Support for Cost: double precision'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    -- Checking the data types of the optional reverse_cost";
-    has_rcost := false;
-    IF fn IN ('johnson','dijkstra','astar') THEN
-      BEGIN
-        execute 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||safesql||' ) AS __b__ limit 1 ' into rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-            return has_rcost;
-      END;
-      if (has_rcost) then
-        IF (big) then
-           IF  not (rec1.rev_type in ('bigint'::text, 'integer'::text, 'smallint'::text, 'double precision'::text, 'real'::text)) then
-             RAISE EXCEPTION 'Illegar type in optional parameter reverse_cost.'
-             USING ERRCODE = 'XX000';
-           END IF;
-        ELSE -- Version 2.0.0 is more restrictive
-           IF (rec1.rev_type != 'double precision') then
-             RAISE EXCEPTION 'Illegal type in optional parameter reverse_cost, must be of type float8'
-             USING ERRCODE = 'XX000';
-           END IF;
-        END IF;
-      end if;
-      return true;
-    END IF;
-    -- just for keeps
-    return true;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_onError(
-  IN errCond boolean,  -- true there is an error
-  IN reportErrs int,   -- 0, 1 or 2
-  IN fnName text,      -- function name that generates the error
-  IN msgerr text,      -- error message
-  IN hinto text default 'No hint', -- hint help
-  IN msgok text default 'OK')      -- message if everything is ok
-  RETURNS void AS
-$BODY$
-BEGIN
-  if errCond=true then
-     if reportErrs=0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-     else
-       if reportErrs = 2 then
-         raise notice '----> PGR ERROR in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-         raise raise_exception;
-       else
-         raise notice '----> PGR NOTICE in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-       end if;
-     end if;
-  else
-       raise debug 'PGR ----> %: %',fnName,msgok;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_msg(IN msgKind int, IN fnName text, IN msg text default '---->OK')
-  RETURNS void AS
-$BODY$
-BEGIN
-  if msgKind = 0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msg;
-  else
-       raise notice '----> PGR NOTICE in %: %',fnName,msg;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(sname text, tname text, cname text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    EXECUTE 'select data_type  from information_schema.columns '
-            || 'where table_name = '||quote_literal(tname)
-                 || ' and table_schema=' || quote_literal(sname)
-                 || ' and column_name='||quote_literal(cname)
-       into ctype;
-    err = ctype is null;
-    perform _pgr_onError(err, reportErrs, fnName,
-            'Type of Column '|| cname ||' not found',
-            'Check your column name',
-            'OK: Type of Column '|| cname || ' is ' || ctype);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(tab text, col text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-    select * into cname from _pgr_getColumnName(tab,col,reportErrs, fnName) ;
-    select * into ctype from _pgr_getColumnType(sname,tname,cname,reportErrs, fnName);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_get_statement(o_sql text)
-RETURNS text AS
-$BODY$
-DECLARE
-sql TEXT;
-BEGIN
-    EXECUTE 'SELECT statement FROM pg_prepared_statements WHERE name ='  || quote_literal(o_sql) || ' limit 1 ' INTO sql;
-    IF (sql IS NULL) THEN
-      RETURN   o_sql;
-    ELSE
-      RETURN  regexp_replace(sql, '(.)* as ', '', 'i');
-    END IF;
-END
-$BODY$
-LANGUAGE plpgsql STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_checkVertTab(vertname text, columnsArr  text[],
-    IN reportErrs int default 1, IN fnName text default '_pgr_checkVertTab',
-    OUT sname text,OUT vname text)
-RETURNS record AS
-$BODY$
-DECLARE
-    cname text;
-    colname text;
-    naming record;
-    debuglevel text;
-    err  boolean;
-    msgKind int;
-
-BEGIN
-    msgKind = 0; -- debug_
-    execute 'show client_min_messages' into debuglevel;
-
-    perform _pgr_msg(msgKind, fnName, 'Checking table ' || vertname || ' exists');
-       select * from _pgr_getTableName(vertname, 0, fnName) into naming;
-       sname=naming.sname;
-       vname=naming.tname;
-       err = sname is NULL or vname is NULL;
-    perform _pgr_onError( err, 2, fnName,
-          'Vertex Table: ' || vertname || ' not found',
-          'Please create ' || vertname || ' using  _pgr_createTopology() or pgr_createVerticesTable()',
-          'Vertex Table: ' || vertname || ' found');
-
-
-    perform _pgr_msg(msgKind, fnName, 'Checking columns of ' || vertname);
-      FOREACH cname IN ARRAY columnsArr
-      loop
-         select _pgr_getcolumnName(vertname, cname, 0, fnName) into colname;
-         if colname is null then
-           perform _pgr_msg(msgKind, fnName, 'Adding column ' || cname || ' in ' || vertname);
-           set client_min_messages  to warning;
-                execute 'ALTER TABLE '||_pgr_quote_ident(vertname)||' ADD COLUMN '||cname|| ' integer';
-           execute 'set client_min_messages  to '|| debuglevel;
-           perform _pgr_msg(msgKind, fnName);
-         end if;
-      end loop;
-    perform _pgr_msg(msgKind, fnName, 'Finished checking columns of ' || vertname);
-
-    perform _pgr_createIndex(vertname , 'id' , 'btree', reportErrs, fnName);
- END
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(
-    sname text, tname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    debuglevel text;
-    naming record;
-    tabname text;
-    query text;
-    msgKind int;
-BEGIN
-  msgKind = 0; -- debug_
-
-  execute 'show client_min_messages' into debuglevel;
-  tabname=_pgr_quote_ident(sname||'.'||tname);
-  perform _pgr_msg(msgKind, fnName, 'Checking ' || colname || ' column in ' || tabname || ' is indexed');
-    IF (_pgr_isColumnIndexed(sname,tname,colname, 0, fnName)) then
-       perform _pgr_msg(msgKind, fnName);
-    else
-      if indext = 'gist' then
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using gist('||quote_ident(colname)||')';
-      else
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using btree('||quote_ident(colname)||')';
-      end if;
-      perform _pgr_msg(msgKind, fnName, 'Adding index ' || tabname || '_' ||  colname || '_idx');
-      perform _pgr_msg(msgKind, fnName, ' Using ' ||  query);
-      set client_min_messages  to warning;
-      BEGIN
-        execute query;
-        EXCEPTION WHEN others THEN
-          perform _pgr_onError( true, reportErrs, fnName,
-            'Could not create index on:' || colname, SQLERRM);
-      END;
-      execute 'set client_min_messages  to '|| debuglevel;
-      perform _pgr_msg(msgKind, fnName);
-    END IF;
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(tabname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    naming record;
-    sname text;
-    tname text;
-
-BEGIN
-    select * from _pgr_getTableName(tabname, 2, fnName)  into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    execute _pgr_createIndex(sname, tname, colname, indext, reportErrs, fnName);
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pointToId(
-    point geometry,
-    tolerance double precision,
-    vertname text,
-    srid integer)
-
-  RETURNS bigint AS
-$BODY$
-DECLARE
-    rec record;
-    pid bigint;
-
-BEGIN
-    EXECUTE 'SELECT ST_Distance(
-        the_geom,
-        ST_GeomFromText(ST_AsText('
-                || quote_literal(point::text)
-                || '),'
-            || srid ||')) AS d, id, the_geom
-    FROM '||_pgr_quote_ident(vertname)||'
-    WHERE ST_DWithin(
-        the_geom,
-        ST_GeomFromText(
-            ST_AsText(' || quote_literal(point::text) ||'),
-            ' || srid || '),' || tolerance||')
-    ORDER BY d
-    LIMIT 1' INTO rec ;
-    IF rec.id IS NOT NULL THEN
-        pid := rec.id;
-    ELSE
-        execute 'INSERT INTO '||_pgr_quote_ident(vertname)||' (the_geom) VALUES ('||quote_literal(point::text)||')';
-        pid := lastval();
-END IF;
-
-RETURN pid;
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'many_to_many_dijkstra'
-LANGUAGE c VOLATILE;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer, OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstra(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(Many to Many)';
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraVia(
-    edges_sql TEXT,
-    via_vertices ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    strict BOOLEAN DEFAULT FALSE,
-    U_turn_on_edge BOOLEAN DEFAULT TRUE,
-
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'dijkstraVia'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_johnson(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'johnson'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_floydWarshall(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'floydWarshall'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'astarManyToMany'
-LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, normal:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to Many)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true, normal:=false) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to Many)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid ANYARRAY,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-    equicost BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'many_withPointsDD'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_withPointsDD($1, $2, ARRAY[$3]::BIGINT[], $4, $5, $6, $7, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vids anyarray,
-    distance FLOAT,
-    directed BOOLEAN DEFAULT TRUE,
-    equicost BOOLEAN DEFAULT FALSE,
-    OUT seq integer,
-    OUT from_v  bigint,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'driving_many_to_dist'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vid bigint,
-    distance FLOAT8,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq integer,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer, directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'kshortest_path'
-    LANGUAGE c STABLE STRICT;
-
--- V2 the graph is directed and there are no heap paths
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid integer, end_vid integer, k integer, has_rcost boolean)
-  RETURNS SETOF pgr_costresult3 AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated signature of pgr_ksp';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql::text, false);
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_rcost) THEN
-           -- user says that it has reverse_cost but its not true
-           RAISE EXCEPTION 'has_reverse_cost set to true but reverse_cost not found';
-         ELSE
-           -- user says that it does not have reverse_cost but it does have it
-           -- to ignore we remove reverse_cost from the query
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         END IF;
-      END IF;
-
-      RETURN query SELECT ((row_number() over()) -1)::integer  AS seq,  (path_id - 1)::integer AS id1, node::integer AS id2, edge::integer AS id3, cost
-            FROM _pgr_ksp(sql::text, start_vid, end_vid, k, TRUE, FALSE) WHERE path_id <= k;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer,
-  directed boolean default true, heap_paths boolean default false,
-  --directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  BEGIN
-         RETURN query SELECT *
-                FROM _pgr_ksp(edges_sql::text, start_vid, end_vid, k, directed, heap_paths);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsKSP(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    k INTEGER,
-
-    directed BOOLEAN DEFAULT TRUE,
-    heap_paths BOOLEAN DEFAULT FALSE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER, OUT path_id INTEGER, OUT path_seq INTEGER,
-    OUT node BIGINT, OUT edge BIGINT,
-    OUT cost FLOAT, OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'withPoints_ksp'
-    LANGUAGE c STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_unnest_matrix(matrix float8[][], OUT start_vid integer, OUT end_vid integer, out agg_cost float8)
-RETURNS SETOF record AS
-
-$body$
-DECLARE
-
-m float8[];
-
-BEGIN
-    start_vid = 1;
-    foreach m slice 1 in  ARRAY matrix
-    LOOP
-        end_vid = 1;
-        foreach agg_cost in  ARRAY m
-        LOOP
-            RETURN next;
-            end_vid = end_vid + 1;
-        END LOOP;
-        start_vid = start_vid + 1;
-    END LOOP;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_tsp(
-    matrix float8[][],
-    startpt INTEGER,
-    endpt INTEGER DEFAULT -1,
-    OUT seq INTEGER,
-    OUT id INTEGER)
-RETURNS SETOF record AS
-$body$
-DECLARE
-table_sql TEXT;
-debuglevel TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(float8[][], integer, integer)';
-
-    CREATE TEMP TABLE ___tmp2 ON COMMIT DROP AS SELECT * FROM _pgr_unnest_matrix( matrix );
-
-
-    startpt := startpt + 1;
-    IF endpt = -1 THEN endpt := startpt;
-    END IF;
-
-
-    RETURN QUERY
-    WITH
-    result AS (
-        SELECT * FROM pgr_TSP(
-        $$SELECT * FROM ___tmp2 $$,
-        startpt, endpt,
-
-        tries_per_temperature :=  500 :: INTEGER,
-        max_changes_per_temperature := 30 :: INTEGER,
-        max_consecutive_non_changes := 500 :: INTEGER,
-
-        randomize:=false)
-    )
-    SELECT (row_number() over(ORDER BY result.seq) - 1)::INTEGER AS seq, (result.node - 1)::INTEGER AS id
-
-    FROM result WHERE NOT(result.node = startpt AND result.seq != 1);
-
-    DROP TABLE ___tmp2;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-
-
-CREATE OR  REPLACE FUNCTION pgr_tsp(sql text, start_id INTEGER, end_id INTEGER default (-1))
-returns setof pgr_costResult as
-$body$
-DECLARE
-table_sql TEXT;
-rec RECORD;
-debuglevel TEXT;
-n BIGINT;
-
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(sql, integer, integer)';
-
-    table_sql := 'CREATE TEMP TABLE ___tmp ON COMMIT DROP AS ' || sql ;
-    EXECUTE table_sql;
-
-
-    BEGIN
-        EXECUTE 'SELECT id, x, y FROM ___tmp' INTO rec;
-        EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                USING ERRCODE = 'XX000',
-                HINT = 'Please verify the column names: id, x, y';
-    END;
-
-    EXECUTE
-    'SELECT
-        pg_typeof(id)::text as id_type,
-        pg_typeof(x)::text as x_type,
-        pg_typeof(y)::text as y_type FROM ___tmp' INTO rec;
-
-
-    IF NOT((rec.id_type in ('integer'::text))
-        AND (rec.x_type = 'double precision'::text)
-        AND (rec.y_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION '''id'' must be of type INTEGER, ''x'' ad ''y'' must be of type FLOAT'
-            USING ERRCODE = 'XX000';
-    END IF;
-
-    EXECUTE 'SELECT count(*) AS n FROM (' || sql || ') AS __a__' INTO rec;
-    n = rec.n;
-
-    RETURN query
-        SELECT (seq - 1)::INTEGER AS seq, node::INTEGER AS id1, node::INTEGER AS id2, cost
-        FROM pgr_eucledianTSP(sql, start_id, end_id,
-
-            tries_per_temperature :=  500 * n :: INTEGER,
-            max_changes_per_temperature := 60 * n :: INTEGER,
-            max_consecutive_non_changes := 500 * n :: INTEGER,
-
-            randomize := false) WHERE seq <= n;
-    DROP TABLE ___tmp;
-
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-create or replace function _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
-  as
-$body$
-declare
-    sql text;
-    r record;
-
-begin
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    sql := 'with nodes as (' || sqlin || ')
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j, st_distance(st_makepoint(a.x, a.y), st_makepoint(b.x, b.y)) as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i';
-
-    for r in execute sql loop
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-
-end;
-$body$
-language plpgsql stable cost 10;
-
-
-CREATE OR REPLACE FUNCTION pgr_TSP(
-    matrix_row_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'newTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_eucledianTSP(
-    coordinates_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'eucledianTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_alphashape(sql text, alpha float8 DEFAULT 0, OUT x float8, OUT y float8)
-    RETURNS SETOF record
-    AS '$libdir/libpgrouting-2.5', 'alphashape'
-    LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pointsAsPolygon(query varchar, alpha float8 DEFAULT 0)
-	RETURNS geometry AS
-	$$
-	DECLARE
-		r record;
-		geoms geometry[];
-		vertex_result record;
-		i int;
-		n int;
-		spos int;
-		q text;
-		x float8[];
-		y float8[];
-
-	BEGIN
-		geoms := array[]::geometry[];
-		i := 1;
-
-		FOR vertex_result IN EXECUTE 'SELECT x, y FROM pgr_alphashape('''|| query || ''', ' || alpha || ')'
-		LOOP
-			x[i] = vertex_result.x;
-			y[i] = vertex_result.y;
-			i := i+1;
-		END LOOP;
-
-		n := i;
-		IF n = 1 THEN
-			RAISE NOTICE 'n = 1';
-			RETURN NULL;
-		END IF;
-
-		spos := 1;
-		q := 'SELECT ST_GeometryFromText(''POLYGON((';
-		FOR i IN 1..n LOOP
-			IF x[i] IS NULL AND y[i] IS NULL THEN
-				q := q || ', ' || x[spos] || ' ' || y[spos] || '))'',0) AS geom;';
-				EXECUTE q INTO r;
-				geoms := geoms || array[r.geom];
-				q := '';
-			ELSE
-				IF q = '' THEN
-					spos := i;
-					q := 'SELECT ST_GeometryFromText(''POLYGON((';
-				END IF;
-				IF i = spos THEN
-					q := q || x[spos] || ' ' || y[spos];
-				ELSE
-					q := q || ', ' || x[i] || ' ' || y[i];
-				END IF;
-			END IF;
-		END LOOP;
-
-		RETURN ST_BuildArea(ST_Collect(geoms));
-	END;
-	$$
-	LANGUAGE 'plpgsql' VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'bd_astar'
-LANGUAGE C VOLATILE;
-
-
-
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed:=true, only_cost:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    BOOLEAN,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false);
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to Many)';
-
-
-
--- one to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to Many)';
-
-
--- bdDijkstra MANY TO MANY
-CREATE OR REPLACE FUNCTION _pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bdDijkstra'
-LANGUAGE c VOLATILE;
-
-
-
--- ONE TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- TODO directed BOOLEAN DEFAULT TRUE,  on version 3
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, false) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, true) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_vid integer,
-    target_vid integer,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_vertex'
-LANGUAGE 'c' IMMUTABLE;
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_edge'
-LANGUAGE 'c' IMMUTABLE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || edges_sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        -- no restrictions then its a dijkstra
-        RETURN query SELECT a.seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_dijkstra(new_sql, start_vid, end_vid, directed) a;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, start_vid, end_vid, directed, has_rcost, restrictions_sql);
-    RETURN;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trspViaVertices(
-    edges_sql TEXT,
-    via_vids ANYARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult3 AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            new_sql :=
-               'WITH old_sql AS (' || edges_sql || ')' ||
-                '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        RETURN query SELECT (row_number() over())::INTEGER, path_id:: INTEGER, node::INTEGER,
-            (CASE WHEN edge = -2 THEN -1 ELSE edge END)::INTEGER, cost
-            FROM pgr_dijkstraVia(new_sql, via_vids, directed, strict:=true) WHERE edge != -1;
-        RETURN;
-    END IF;
-
-
-    -- make the call without contradiction from part of the user
-    RETURN query SELECT * FROM _pgr_trspViaVertices(new_sql, via_vids::INTEGER[], directed, has_rcost, restrictions_sql);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-
-    new_sql := sql;
-    IF (has_reverse != has_reverse_cost) THEN  -- user contradiction
-        IF (has_reverse) THEN
-            -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) THEN
-        -- no restrictions then its a with points
-        RETURN query SELECT a.seq-1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_withpoints(new_sql,
-            '(SELECT 1 as pid, ' || source_eid || 'as edge_id, ' || source_pos || '::float8 as fraction)'
-            || ' UNION '
-            || '(SELECT 2, ' || target_eid || ', ' || target_pos || ')' ::TEXT,
-            -1, -2, directed) a;
-        -- WHERE node != -2;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, source_eid, source_pos, target_eid, target_pos, directed, has_reverse_cost, turn_restrict_sql);
-    RETURN;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-create or replace function _pgr_trspViaVertices(sql text, vids integer[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    lrra boolean := false;
-    seq integer := 0;
-    seq2 integer := 0;
-
-begin
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(vids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from _pgr_trsp(sql, vids[i], vids[i+1], directed, has_rcost, turn_restrict_sql) as a loop
-            -- filter out the individual path ends except the last one
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --raise notice 'rr: %', rr;
-            if rr.id3 = -1 then
-                lrr := rr;
-                lrra := true;
-            else
-                seq := seq + 1;
-                rr.seq := seq;
-                return next rr;
-            end if;
-        end loop;
-    end loop;
-
-    if lrra then
-        seq := seq + 1;
-        lrr.seq := seq;
-        return next lrr;
-    end if;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-
-----------------------------------------------------------------------------------------------------------
-
-create or replace function pgr_trspViaEdges(sql text, eids integer[], pcts float8[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    first boolean := true;
-    seq integer := 0;
-    seq2 integer :=0;
-    has_reverse BOOLEAN;
-    point_is_vertex BOOLEAN := false;
-    edges_sql TEXT;
-    f float;
-
-begin
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql := sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (NOT has_rcost) THEN
-            -- user does not want to use reverse cost column
-            edges_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    FOREACH f IN ARRAY pcts LOOP
-        IF f in (0,1) THEN
-           point_is_vertex := true;
-        END IF;
-    END LOOP;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) AND NOT point_is_vertex THEN
-        -- no restrictions then its a _pgr_withPointsVia
-        RETURN query SELECT a.seq::INTEGER, path_id::INTEGER AS id1, node::INTEGER AS id2, edge::INTEGER AS id3, cost
-        FROM _pgr_withPointsVia(edges_sql, eids, pcts, directed) a;
-        RETURN;
-    END IF;
-
-    if array_length(eids, 1) != array_length(pcts, 1) then
-        raise exception 'The length of arrays eids and pcts must be the same!';
-    end if;
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(eids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from pgr_trsp(edges_sql,
-                                  eids[i], pcts[i],
-                                  eids[i+1], pcts[i+1],
-                                  directed,
-                                  has_rcost,
-                                  turn_restrict_sql) as a loop
-            -- combine intermediate via costs when cost is split across
-            -- two parts of a segment because it stops it and
-            -- restarts the next leg also on it
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --
-            -- there are multiple condition we have to deal with
-            -- between the end of one leg and start of the next
-            -- 1. same vertex_id. edge_id=-1; drop record with edge_id=-1
-            -- means: path ends on vertex
-            -- NOTICE:  rr: (19,1,44570022,-1,0)
-            -- NOTICE:  rr: (0,2,44570022,1768045,2.89691196717448)
-            -- 2. vertex_id=-1; sum cost components
-            -- means: path end/starts with the segment
-            -- NOTICE:  rr: (11,2,44569628,1775909,9.32885885148532)
-            -- NOTICE:  rr: (0,3,-1,1775909,0.771386350984395)
-
-            --raise notice 'rr: %', rr;
-            if first then
-                lrr := rr;
-                first := false;
-            else
-                if lrr.id3 = -1 then
-                    lrr := rr;
-                elsif lrr.id3 = rr.id3 then
-                    lrr.cost := lrr.cost + rr.cost;
-                    if rr.id2 = -1 then
-                        rr.id2 := lrr.id2;
-                    end if;
-                else
-                    seq := seq + 1;
-                    lrr.seq := seq;
-                    return next lrr;
-                    lrr := rr;
-                end if;
-            end if;
-        end loop;
-    end loop;
-
-    seq := seq + 1;
-    lrr.seq := seq;
-    return next lrr;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-----------------------------
---    MANY TO MANY
-----------------------------
-
-
-CREATE OR REPLACE FUNCTION _pgr_maxflow(
-    edges_sql TEXT,
-    sources ANYARRAY,
-    targets ANYARRAY,
-    algorithm INTEGER DEFAULT 1,
-    only_flow BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'max_flow_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-
-------------------------------------
--- 3 pgr_edmondsKarp
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 2 boykov_kolmogorov
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 1 pgr_pushRelabel
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT flow
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], algorithm := 1, only_flow := true);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], $3::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, $2::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxCardinalityMatch(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'edge_disjoint_paths_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    bigint,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    IN directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_contractGraph(
-    edges_sql TEXT,
-    contraction_order BIGINT[],
-    max_cycles integer DEFAULT 1,
-    forbidden_vertices BIGINT[] DEFAULT ARRAY[]::BIGINT[],
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT type TEXT,
-    OUT id BIGINT,
-    OUT contracted_vertices BIGINT[],
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost float)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'contractGraph'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliver(
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_cell_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliver'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliverEuclidean (
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliverEuclidean'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_vrpOneDepot(
-    TEXT, -- customers_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_sql
-    INTEGER, -- depot_id
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-orders_sql TEXT;
-trucks_sql TEXT;
-matrix_sql TEXT;
-final_sql TEXT;
-BEGIN
-
-    orders_sql = $$WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    pickups AS (
-        SELECT id, x AS p_x, y AS p_y, open_time AS p_open, close_time AS p_close, service_time AS p_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vrp_orders.id AS id, order_unit AS demand, pickups.id AS p_node_id, p_x, p_y, p_open, p_close, p_service,
-    vrp_orders.id AS d_node_id, x AS d_x, y AS d_y, open_time AS d_open, close_time AS d_close, service_time AS d_service
-    FROM vrp_orders, pickups
-    WHERE vrp_orders.id != $$ || $4;
-
-
-    trucks_sql = $$ WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    vrp_vehicles AS ($$ || $2 || $$ ),
-    starts AS (
-        SELECT id AS start_node_id, x AS start_x, y AS start_y, open_time AS start_open, close_time AS start_close, service_time AS start_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vehicle_id AS id, capacity, starts.* FROM vrp_vehicles, starts;
-    $$;
-
-    final_sql = '
-    SELECT * FROM _pgr_pickDeliver(
-            $$' || orders_sql || '$$,
-            $$' || trucks_sql || '$$,
-            $$' || $3 || '$$,
-            max_cycles := 2,
-            initial_sol := 4 ); ';
-
-    RAISE DEBUG '%', orders_sql;
-    RAISE DEBUG '%', trucks_sql;
-    RAISE DEBUG '%', $3;
-    RAISE DEBUG '%', final_sql;
-
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
------------------------------------------------------------------------
--- Core function for vrp with sigle depot computation
--- See README for description
------------------------------------------------------------------------
---
---
-
-create or replace function pgr_vrpOneDepot(
-	order_sql text,
-	vehicle_sql text,
-	cost_sql text,
-	depot_id integer,
-
-	OUT oid integer,
-	OUT opos integer,
-	OUT vid integer,
-	OUT tarrival integer,
-	OUT tdepart integer)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT order_id::INTEGER, stop_seq::INTEGER, vehicle_id::INTEGER, arrival_time::INTEGER, departure_time::INTEGER
-    FROM _pgr_vrpOneDepot($1, $2,
-       '
-            SELECT src_id AS start_vid, dest_id AS end_vid, traveltime AS agg_cost FROM ('||$3||') AS a
-       ',
-        $4
-    ) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_gsoc_vrppdtw(
-    customers_sql TEXT,
-    max_vehicles INTEGER,
-    capacity FLOAT,
-    speed FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-
-    OUT seq INTEGER,
-    OUT vehicle_id INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT stop_id BIGINT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-    orders_sql TEXT;
-    vehicles_sql TEXT;
-    final_sql TEXT;
-BEGIN
-    orders_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        pickups AS (
-            SELECT id, demand, x as p_x, y as p_y, opentime as p_open, closetime as p_close, servicetime as p_service
-            FROM  customer_data WHERE pindex = 0 AND id != 0
-        ),
-        deliveries AS (
-            SELECT pindex AS id, x as d_x, y as d_y, opentime as d_open, closetime as d_close, servicetime as d_service
-            FROM  customer_data WHERE dindex = 0 AND id != 0
-        )
-        SELECT * FROM pickups JOIN deliveries USING(id) ORDER BY pickups.id
-    $$;
-
-    vehicles_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ )
-        SELECT id, x AS start_x, y AS start_y,
-            opentime AS start_open, closetime AS start_close, $$ ||
-            capacity || $$ AS capacity, $$ || max_vehicles || $$ AS number, $$ || speed || $$ AS speed
-            FROM customer_data WHERE id = 0 LIMIT 1
-        $$;
---  seq | vehicle_id | vehicle_seq | stop_id | travel_time | arrival_time | wait_time | service_time | departure_time
-    final_sql = $$ WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        p_deliver AS (SELECT * FROM _pgr_pickDeliverEuclidean('$$ || orders_sql || $$',  '$$ || vehicles_sql || $$',  1, $$ || max_cycles || $$ )),
-        picks AS (SELECT p_deliver.*, pindex, dindex, id AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 2)),
-        delivers AS (SELECT p_deliver.*, pindex, dindex, dindex AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 3)),
-        depots AS (SELECT p_deliver.*, 0 as pindex, 0 as dindex, 0 AS the_id FROM p_deliver WHERE (stop_type IN (-1,1,6))),
-        the_union AS (SELECT * FROM picks UNION SELECT * FROM delivers UNION SELECT * from depots)
-
-        SELECT (row_number() over(ORDER BY a.seq))::INTEGER, vehicle_seq, a.stop_seq, the_id::BIGINT, a.travel_time, a.arrival_time, a.wait_time, a.service_time, a.departure_time
-        FROM (SELECT * FROM the_union) AS a ORDER BY a.seq
-        $$;
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-CREATE OR REPLACE FUNCTION pgr_gsoc_vrppdtw(
-    sql text,
-    vehicle_num INTEGER,
-    capacity INTEGER
-)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-customers_sql TEXT;
-BEGIN
-    RETURN query
-         SELECT a.seq, vehicle_id::INTEGER AS id1, stop_id::INTEGER AS id2, departure_time AS cost
-        FROM _pgr_gsoc_vrppdtw($1, $2, $3, 1, 30) AS a WHERE vehicle_id NOT IN (-2);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION _pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN,
-    driving_side CHAR,
-    details BOOLEAN,
-
-    only_cost BOOLEAN DEFAULT false, -- gets path
-    normal BOOLEAN DEFAULT true, -- false for many to onu
-
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'withPoints'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], ARRAY[$4]::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], ARRAY[$4]::bigint[], $5, $6, $7, FALSE, FALSE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], $4::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], $4::BIGINT[], $5,  $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION  _pgr_withPointsVia(
-    sql text,
-    via_edges bigint[],
-    fraction float[],
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  has_rcost boolean;
-  sql_new_vertices text := ' ';
-  sql_on_vertex text;
-  v_union text := ' ';
-  dummyrec record;
-  rec1 record;
-  via_vertices int[];
-  sql_safe text;
-  new_edges text;
-  BEGIN
-     BEGIN
-        sql_safe = 'SELECT id, source, target, cost, reverse_cost FROM ('|| sql || ') AS __a';
-
-        EXECUTE 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||sql_safe||' ) AS __b__ limit 1 ' INTO rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-     END;
-
-
-      IF array_length(via_edges, 1) != array_length(fraction, 1) then
-        RAISE EXCEPTION 'The length of via_edges is different of length of via_edges';
-      END IF;
-
-      FOR i IN 1 .. array_length(via_edges, 1)
-      LOOP
-          IF fraction[i] = 0 THEN
-              sql_on_vertex := 'SELECT source FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.source;
-          ELSE IF fraction[i] = 1 THEN
-              sql_on_vertex := 'SELECT target FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.target;
-          ELSE
-              via_vertices[i] = -i;
-              IF has_rcost THEN
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost,
-                              reverse_cost * (1 - ' || fraction[i] || ')  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost,
-                              reverse_cost *  ' || fraction[i] || '  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' where id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               ELSE
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               END IF;
-          END IF;
-          END IF;
-     END LOOP;
-
-     IF sql_new_vertices = ' ' THEN
-         new_edges := sql;
-     ELSE
-         IF has_rcost THEN
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost,
-                         lead(cost) OVER w  - cost AS reverse_cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL),
-                   second_part AS ( SELECT * FROM (SELECT id, lead(source) OVER w  AS source, source as target,
-                         reverse_cost - lead(reverse_cost) OVER w  AS cost,
-                         reverse_cost - lead(reverse_cost) OVER w  AS reverse_cost
-                      FROM  the_union  WHERE target > 0 and reverse_cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY reverse_cost ASC) ) as n2
-                      WHERE source IS NOT NULL),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part)
-                             UNION
-                       (SELECT * FROM second_part) ) _union )
-                  SELECT *  FROM more_union';
-         ELSE
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL ),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part) ) _union )
-                  SELECT *  FROM more_union';
-          END IF;
-      END IF;
-
- -- raise notice '%', new_edges;
-     sql_new_vertices := sql_new_vertices || v_union || ' (' || sql || ')';
-     RETURN query SELECT *
-         FROM pgr_dijkstraVia(new_edges, via_vertices, directed, has_rcost);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_lineGraph(
-    TEXT, -- edges_sql
-    directed BOOLEAN DEFAULT true,
-    OUT seq INTEGER,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost FLOAT,
-    OUT reverse_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'lineGraph'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_connectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'connectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_strongComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'strongComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_biconnectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the edge in the component
-    OUT n_seq INTEGER,          -- nth_seq of the edge in the component
-    OUT edge BIGINT)            -- the number of the edge
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'biconnectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_articulationPoints(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'articulationPoints'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bridges(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT edge BIGINT)            -- the number of the edge 
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bridges'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createtopology(edge_table text, tolerance double precision,
-		   the_geom text default 'the_geom', id text default 'id',
-		   source text default 'source', target text default 'target',rows_where text default 'true',
-		   clean boolean default FALSE)
-RETURNS VARCHAR AS
-$BODY$
-
-DECLARE
-    points record;
-    sridinfo record;
-    source_id bigint;
-    target_id bigint;
-    totcount bigint;
-    rowcount bigint;
-    srid integer;
-    sql text;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    notincluded integer;
-    i integer;
-    naming record;
-    info record;
-    flag boolean;
-    query text;
-    idtype text;
-    gtype text;
-    sourcetype text;
-    targettype text;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-    msgKind int;
-    emptied BOOLEAN;
-
-BEGIN
-    msgKind = 1; -- notice
-    fnName = 'pgr_createTopology';
-    raise notice 'PROCESSING:';
-    raise notice 'pgr_createTopology(''%'', %, ''%'', ''%'', ''%'', ''%'', rows_where := ''%'', clean := %)',edge_table,tolerance,the_geom,id,source,target,rows_where, clean;
-    execute 'show client_min_messages' into debuglevel;
-
-
-    raise notice 'Performing checks, please wait .....';
-
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-        sname=naming.sname;
-        tname=naming.tname;
-        tabname=sname||'.'||tname;
-        vname=tname||'_vertices_pgr';
-        vertname= sname||'.'||vname;
-        rows_where = ' AND ('||rows_where||')';
-      raise DEBUG '     --> OK';
-
-
-      raise debug 'Checking column names in edge table';
-        select * into idname     from _pgr_getColumnName(sname, tname,id,2,fnName);
-        select * into sourcename from _pgr_getColumnName(sname, tname,source,2,fnName);
-        select * into targetname from _pgr_getColumnName(sname, tname,target,2,fnName);
-        select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2,fnName);
-
-
-        err = sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname;
-        perform _pgr_onError( err, 2, fnName,
-               'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-	       'Column names are OK');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking column types in edge table';
-        select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-        select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-        select * into idtype from _pgr_getColumnType(sname,tname,idname,1, fnName);
-
-        err = idtype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column id:'|| idname, ' Expected type of '|| idname || ' is integer,smallint or bigint but '||idtype||' was found');
-
-        err = sourcetype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column source:'|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-        err = targettype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column target:'|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or bigint but '||targettype||' was found');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         raise debug '%',query;
-         EXECUTE query INTO sridinfo;
-
-         err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-         perform _pgr_onError(err, 2, fnName,
-	     'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-
-         srid := sridinfo.srid;
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking and creating indices in edge table';
-        perform _pgr_createIndex(sname, tname , idname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-
-        gname=quote_ident(gname);
-        idname=quote_ident(idname);
-        sourcename=quote_ident(sourcename);
-        targetname=quote_ident(targetname);
-      raise DEBUG '     --> OK';
-
-
-
-
-
-    BEGIN
-        -- issue #193 & issue #210 & #213
-        -- this sql is for trying out the where clause
-        -- the select * is to avoid any column name conflicts
-        -- limit 1, just try on first record
-        -- if the where clasuse is ill formed it will be caught in the exception
-        sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-        EXECUTE sql into dummyRec;
-        -- end
-
-        -- if above where clasue works this one should work
-        -- any error will be caught by the exception also
-        sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NOT NULL AND '||
-	    idname||' IS NOT NULL)=false '||rows_where;
-        EXECUTE SQL  into notincluded;
-
-        if clean then
-            raise debug 'Cleaning previous Topology ';
-               execute 'UPDATE ' || _pgr_quote_ident(tabname) ||
-               ' SET '||sourcename||' = NULL,'||targetname||' = NULL';
-        else
-            raise debug 'Creating topology for edges with non assigned topology';
-            if rows_where=' AND (true)' then
-                rows_where=  ' and ('||quote_ident(sourcename)||' is null or '||quote_ident(targetname)||' is  null)';
-            end if;
-        end if;
-        -- my thoery is that the select Count(*) will never go through here
-        EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-             RAISE NOTICE '%',sql;
-             RETURN 'FAIL';
-    END;
-
-    BEGIN
-         raise DEBUG 'initializing %',vertname;
-         execute 'select * from _pgr_getTableName('||quote_literal(vertname)
-                                                  || ',0,' || quote_literal(fnName) ||' )' into naming;
-         emptied = false;
-         set client_min_messages  to warning;
-         IF sname=naming.sname AND vname=naming.tname  THEN
-            if clean then
-                execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-                execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-                emptied = true;
-            end if;
-         ELSE -- table doesn't exist
-            execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-            emptied = true;
-         END IF;
-         IF (emptied) THEN
-             execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-	         quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-             perform _pgr_createIndex(vertname , 'the_geom'::text , 'gist'::text);
-         END IF;
-         execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id"}''::text[])' into naming;
-         execute 'set client_min_messages  to '|| debuglevel;
-         raise DEBUG  '  ------>OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: something went wrong when initializing the verties table';
-             RETURN 'FAIL';
-    END;
-
-
-
-    raise notice 'Creating Topology, Please wait...';
-        rowcount := 0;
-        FOR points IN EXECUTE 'SELECT ' || idname || '::bigint AS id,'
-            || ' _pgr_StartPoint(' || gname || ') AS source,'
-            || ' _pgr_EndPoint('   || gname || ') AS target'
-            || ' FROM '  || _pgr_quote_ident(tabname)
-            || ' WHERE ' || gname || ' IS NOT NULL AND ' || idname||' IS NOT NULL '||rows_where
-        LOOP
-
-            rowcount := rowcount + 1;
-            IF rowcount % 1000 = 0 THEN
-                RAISE NOTICE '% edges processed', rowcount;
-            END IF;
-
-
-            source_id := _pgr_pointToId(points.source, tolerance,vertname,srid);
-            target_id := _pgr_pointToId(points.target, tolerance,vertname,srid);
-            BEGIN
-                sql := 'UPDATE ' || _pgr_quote_ident(tabname) ||
-                    ' SET '||sourcename||' = '|| source_id::text || ','||targetname||' = ' || target_id::text ||
-                    ' WHERE ' || idname || ' =  ' || points.id::text;
-
-                IF sql IS NULL THEN
-                    RAISE NOTICE 'WARNING: UPDATE % SET source = %, target = % WHERE % = % ', tabname, source_id::text, target_id::text, idname,  points.id::text;
-                ELSE
-                    EXECUTE sql;
-                END IF;
-                EXCEPTION WHEN OTHERS THEN
-                    RAISE NOTICE '%', SQLERRM;
-                    RAISE NOTICE '%',sql;
-                    RETURN 'FAIL';
-            end;
-        END LOOP;
-        raise notice '-------------> TOPOLOGY CREATED FOR  % edges', rowcount;
-        RAISE NOTICE 'Rows with NULL geometry or NULL id: %',notincluded;
-        Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname), _pgr_quote_ident(vertname);
-        raise notice '----------------------------------------------';
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_createTopology(text, double precision,text,text,text,text,text,boolean)
-IS 'args: edge_table,tolerance, the_geom:=''the_geom'',source:=''source'', target:=''target'',rows_where:=''true'' - fills columns source and target in the geometry table and creates a vertices table for selected rows';
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
-RETURNS character varying AS
-$BODY$
-
-DECLARE
-    points record;
-    seg record;
-    naming record;
-    sridinfo record;
-    srid integer;
-    ecnt integer;
-    vertname text;
-    sname text;
-    tname text;
-    vname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    geotype text;
-    gname text;
-    tabName text;
-    flag boolean ;
-    query text;
-    selectionquery text;
-    i integer;
-    tot integer;
-    NumIsolated integer;
-    numdeadends integer;
-    numgaps integer;
-    NumCrossing integer;
-    numRings integer;
-    debuglevel text;
-
-
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeGraph(''%'',%,''%'',''%'',''%'',''%'',''%'')',edge_table,tolerance,the_geom,id,source,target,rows_where;
-  raise notice 'Performing checks, please wait ...';
-  execute 'show client_min_messages' into debuglevel;
-
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-    raise DEBUG '     --> OK';
-
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","cnt","chk"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET cnt=0 ,chk=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into idname     from _pgr_getColumnName(sname, tname,id,2);
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname, 2,
-                       'pgr_analyzeGraph',  'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-                       'Column names are OK');
-
-        raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-   BEGIN
-       raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         EXECUTE QUERY INTO sridinfo;
-
-         perform _pgr_onError( sridinfo IS NULL OR sridinfo.srid IS NULL,2,
-                 'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname,
-                 'SRID of '||gname||' is '||sridinfo.srid);
-
-         IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-             RAISE NOTICE ' Can not determine the srid of the geometry "%" in table %', the_geom,tabname;
-             RETURN 'FAIL';
-         END IF;
-         srid := sridinfo.srid;
-         raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM;--issue 210,211,213
-             RAISE NOTICE 'ERROR: something went wrong when checking for SRID of % in table %', the_geom,tabname;
-             RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-       raise debug 'Checking  indices in edge table';
-       perform _pgr_createIndex(tabname , idname , 'btree');
-       perform _pgr_createIndex(tabname , sourcename , 'btree');
-       perform _pgr_createIndex(tabname , targetname , 'btree');
-       perform _pgr_createIndex(tabname , gname , 'gist');
-
-       gname=quote_ident(gname);
-       sourcename=quote_ident(sourcename);
-       targetname=quote_ident(targetname);
-       idname=quote_ident(idname);
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking indices';
-          RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-        query='select count(*) from '||_pgr_quote_ident(tabname)||' where true  '||rows_where;
-        EXECUTE query into ecnt;
-        raise DEBUG '-->Rows Where condition: OK';
-        raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-            RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-            RAISE NOTICE 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-            RAISE NOTICE '%',query;
-            RETURN 'FAIL';
-    END;
-
-    selectionquery ='with
-           selectedRows as( (select '||sourcename||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||')
-                           union
-                           (select '||targetname||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||'))';
-
-
-
-
-
-   BEGIN
-       RAISE NOTICE 'Analyzing for dead ends. Please wait...';
-       query= 'with countingsource as (select a.'||sourcename||' as id,count(*) as cnts
-               from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||sourcename||')
-                     ,countingtarget as (select a.'||targetname||' as id,count(*) as cntt
-                    from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||targetname||')
-                   ,totalcount as (select id,case when cnts is null and cntt is null then 0
-                                                   when cnts is null then cntt
-                                                   when cntt is null then cnts
-                                                   else cnts+cntt end as totcnt
-                                   from ('||_pgr_quote_ident(vertname)||' as a left
-                                   join countingsource as t using(id) ) left join countingtarget using(id))
-               update '||_pgr_quote_ident(vertname)||' as a set cnt=totcnt from totalcount as b where a.id=b.id';
-       raise debug '%',query;
-       execute query;
-       query=selectionquery||'
-              SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE cnt=1 and id in (select id from selectedRows)';
-       raise debug '%',query;
-       execute query  INTO numdeadends;
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-          RAISE NOTICE 'ERROR: something went wrong when analizing for dead ends';
-          RETURN 'FAIL';
-   END;
-
-
-
-    BEGIN
-          RAISE NOTICE 'Analyzing for gaps. Please wait...';
-          query = 'with
-                   buffer as (select id,st_buffer(the_geom,'||tolerance||') as buff from '||_pgr_quote_ident(vertname)||' where cnt=1)
-                   ,veryclose as (select b.id,st_crosses(a.'||gname||',b.buff) as flag
-                   from  (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) as a
-                   join buffer as b on (a.'||gname||'&&b.buff)
-                   where '||sourcename||'!=b.id and '||targetname||'!=b.id )
-                   update '||_pgr_quote_ident(vertname)||' set chk=1 where id in (select distinct id from veryclose where flag=true)';
-          raise debug '%' ,query;
-          execute query;
-          GET DIAGNOSTICS  numgaps= ROW_COUNT;
-          raise DEBUG '     --> OK';
-          EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for gaps';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for isolated edges. Please wait...';
-        query=selectionquery|| ' SELECT count(*) FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' )  as a,
-                                                 '||_pgr_quote_ident(vertname)||' as b,
-                                                 '||_pgr_quote_ident(vertname)||' as c
-                            WHERE b.id in (select id from selectedRows) and a.'||sourcename||' =b.id
-                            AND b.cnt=1 AND a.'||targetname||' =c.id
-                            AND c.cnt=1';
-        raise debug '%' ,query;
-        execute query  INTO NumIsolated;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for isolated edges';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for ring geometries. Please wait...';
-        execute 'SELECT geometrytype('||gname||')  FROM '||_pgr_quote_ident(tabname) limit 1 into geotype;
-        IF (geotype='MULTILINESTRING') THEN
-            query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                 WHERE true  '||rows_where||' and st_isRing(st_linemerge('||gname||'))';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        ELSE query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                  WHERE true  '||rows_where||' and st_isRing('||gname||')';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        END IF;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for ring geometries';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for intersections. Please wait...';
-        query = 'select count(*) from (select distinct case when a.'||idname||' < b.'||idname||' then a.'||idname||'
-                                                        else b.'||idname||' end,
-                                                   case when a.'||idname||' < b.'||idname||' then b.'||idname||'
-                                                        else a.'||idname||' end
-                                    FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as a
-                                    JOIN (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as b
-                                    ON (a.'|| gname||' && b.'||gname||')
-                                    WHERE a.'||idname||' != b.'||idname|| '
-                                        and (a.'||sourcename||' in (b.'||sourcename||',b.'||targetname||')
-                                              or a.'||targetname||' in (b.'||sourcename||',b.'||targetname||')) = false
-                                        and st_intersects(a.'||gname||', b.'||gname||')=true) as d ';
-        raise debug '%' ,query;
-        execute query  INTO numCrossing;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for intersections';
-            RETURN 'FAIL';
-    END;
-
-
-
-
-    RAISE NOTICE '            ANALYSIS RESULTS FOR SELECTED EDGES:';
-    RAISE NOTICE '                  Isolated segments: %', NumIsolated;
-    RAISE NOTICE '                          Dead ends: %', numdeadends;
-    RAISE NOTICE 'Potential gaps found near dead ends: %', numgaps;
-    RAISE NOTICE '             Intersections detected: %',numCrossing;
-    RAISE NOTICE '                    Ring geometries: %',numRings;
-
-
-    RETURN 'OK';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_analyzeGraph(text,double precision,text,text,text,text,text) IS 'args: edge_table, tolerance,the_geom:=''the_geom'',id:=''id'',source column:=''source'', target column:=''target'' rows_where:=''true'' - creates a vertices table based on the geometry for selected rows';
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzeOneway(
-   edge_table text,
-   s_in_rules TEXT[],
-   s_out_rules TEXT[],
-   t_in_rules TEXT[],
-   t_out_rules TEXT[],
-   two_way_if_null boolean default true,
-   oneway text default 'oneway',
-   source text default 'source',
-   target text default 'target')
-  RETURNS text AS
-$BODY$
-
-
-DECLARE
-    rule text;
-    ecnt integer;
-    instr text;
-    naming record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    owname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    vertname text;
-    debuglevel text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeOneway(''%'',''%'',''%'',''%'',''%'',''%'',''%'',''%'',%)',
-		edge_table, s_in_rules , s_out_rules, t_in_rules, t_out_rules, oneway, source ,target,two_way_if_null ;
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    raise DEBUG '     --> OK';
-    EXCEPTION WHEN raise_exception THEN
-      RAISE NOTICE 'ERROR: something went wrong checking the table name';
-      RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","ein","eout"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET eout=0 ,ein=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into owname from _pgr_getColumnName(sname, tname,oneway,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,owname) or  targetname=owname, 2,
-                       '_pgr_createToplogy',  'Two columns share the same name', 'Parameter names for oneway,source and target  must be different',
-                       'Column names are OK');
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-
-
-    RAISE NOTICE 'Analyzing graph for one way street errors.';
-
-    rule := CASE WHEN two_way_if_null
-            THEN owname || ' IS NULL OR '
-            ELSE '' END;
-
-    instr := '''' || array_to_string(s_in_rules, ''',''') || '''';
-       EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-      from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-     where a.id=b.'|| sourcename;
-
-    RAISE NOTICE 'Analysis 25%% complete ...';
-
-    instr := '''' || array_to_string(t_in_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 50%% complete ...';
-
-    instr := '''' || array_to_string(s_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-        where a.id=b.'|| sourcename;
-    RAISE NOTICE 'Analysis 75%% complete ...';
-
-    instr := '''' || array_to_string(t_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 100%% complete ...';
-
-    EXECUTE 'SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE ein=0 or eout=0' INTO ecnt;
-
-    RAISE NOTICE 'Found % potential problems in directionality' ,ecnt;
-
-    RETURN 'OK';
-
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_analyzeOneway(text,TEXT[],TEXT[], TEXT[],TEXT[],boolean,text,text,text)
-IS 'args:edge_table , s_in_rules , s_out_rules, t_in_rules , t_out_rules, two_way_if_null:= true, oneway:=''oneway'',source:= ''source'',target:=''target'' - Analizes the directionality of the edges based on the rules';
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createverticestable(
-   edge_table text,
-   the_geom text DEFAULT 'the_geom'::text,
-   source text DEFAULT 'source'::text,
-   target text DEFAULT 'target'::text,
-    rows_where text DEFAULT 'true'::text
-)
-  RETURNS text AS
-$BODY$
-DECLARE
-    naming record;
-    sridinfo record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    sourcename text;
-    targetname text;
-    query text;
-    ecnt bigint;
-    srid integer;
-    sourcetype text;
-    targettype text;
-    sql text;
-    totcount integer;
-    i integer;
-    notincluded integer;
-    included integer;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-
-
-BEGIN
-  fnName = 'pgr_createVerticesTable';
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_createVerticesTable(''%'',''%'',''%'',''%'',''%'')',edge_table,the_geom,source,target,rows_where;
-  execute 'show client_min_messages' into debuglevel;
-
-  raise notice 'Performing checks, please wait .....';
-
-  RAISE DEBUG 'Checking % exists',edge_table;
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-  raise debug '--> Edge table exists: OK';
-
-  raise debug 'Checking column names';
-    select * into sourcename from _pgr_getColumnName(sname, tname,source,2, fnName);
-    select * into targetname from _pgr_getColumnName(sname, tname,target,2, fnName);
-    select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2, fnName);
-
-
-    err = sourcename in (targetname,gname) or  targetname=gname;
-    perform _pgr_onError(err, 2, fnName,
-        'Two columns share the same name', 'Parameter names for the_geom,source and target  must be different');
-  raise debug '--> Column names: OK';
-
-  raise debug 'Checking column types in edge table';
-    select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-    select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-
-
-    err = sourcetype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column source: '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-    err = targettype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column target: '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found');
-
-  raise debug '-->Column types:OK';
-
-  raise debug 'Checking SRID of geometry column';
-     query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-        || ' FROM ' || _pgr_quote_ident(tabname)
-        || ' WHERE ' || quote_ident(gname)
-        || ' IS NOT NULL LIMIT 1';
-     raise debug '%',query;
-     EXECUTE query INTO sridinfo;
-
-     err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-     perform _pgr_onError(err, 2, fnName,
-         'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-     srid := sridinfo.srid;
-  raise DEBUG '     --> OK';
-
-  raise debug 'Checking and creating Indices';
-     perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-  raise DEBUG '-->Check and create indices: OK';
-
-     gname=quote_ident(gname);
-     sourcename=quote_ident(sourcename);
-     targetname=quote_ident(targetname);
-
-
-  BEGIN
-  raise debug 'Checking Condition';
-    -- issue #193 & issue #210 & #213
-    -- this sql is for trying out the where clause
-    -- the select * is to avoid any column name conflicts
-    -- limit 1, just try on first record
-    -- if the where clasuse is ill formed it will be caught in the exception
-    sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-    EXECUTE sql into dummyRec;
-    -- end
-
-    -- if above where clasue works this one should work
-    -- any error will be caught by the exception also
-    sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NULL or '||
-		sourcename||' is null or '||targetname||' is null)=true '||rows_where;
-    raise debug '%',sql;
-    EXECUTE SQL  into notincluded;
-    EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-
-
-
-  BEGIN
-     raise DEBUG 'initializing %',vertname;
-       execute 'select * from _pgr_getTableName('||quote_literal(vertname)||',0)' into naming;
-       IF sname=naming.sname  AND vname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-       ELSE
-           set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-       END IF;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-                quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-       execute 'CREATE INDEX '||quote_ident(vname||'_the_geom_idx')||' ON '||_pgr_quote_ident(vertname)||'  USING GIST (the_geom)';
-       execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-       EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Initializing vertex table';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise notice 'Populating %, please wait...',vertname;
-       sql= 'with
-		lines as ((select distinct '||sourcename||' as id, _pgr_startpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-		                  ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||')
-			union (select distinct '||targetname||' as id,_pgr_endpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-			          ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||'))
-		,numberedLines as (select row_number() OVER (ORDER BY id) AS i,* from lines )
-		,maxid as (select id,max(i) as maxi from numberedLines group by id)
-		insert into '||_pgr_quote_ident(vertname)||'(id,the_geom)  (select id,the_geom  from numberedLines join maxid using(id) where i=maxi order by id)';
-       RAISE debug '%',sql;
-       execute sql;
-       GET DIAGNOSTICS totcount = ROW_COUNT;
-
-       sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' a, '||_pgr_quote_ident(vertname)||' b
-            where '||sourcename||'=b.id and '|| targetname||' in (select id from '||_pgr_quote_ident(vertname)||')';
-       RAISE debug '%',sql;
-       execute sql into included;
-
-
-
-       execute 'select max(id) from '||_pgr_quote_ident(vertname) into ecnt;
-       execute 'SELECT setval('||quote_literal(vertname||'_id_seq')||','||coalesce(ecnt,1)||' , false)';
-       raise notice '  ----->   VERTICES TABLE CREATED WITH  % VERTICES', totcount;
-       raise notice '                                       FOR   %  EDGES', included+notincluded;
-       RAISE NOTICE '  Edges with NULL geometry,source or target: %',notincluded;
-       RAISE NOTICE '                            Edges processed: %',included;
-       Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname),_pgr_quote_ident(vertname);
-       raise notice '----------------------------------------------';
-    END;
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_createVerticesTable(text,text,text,text,text)
-IS 'args: edge_table, the_geom:=''the_geom'',source:=''source'', target:=''target'' rows_where:=''true'' - creates a vertices table based on the source and target identifiers for selected rows';
-
-
-CREATE OR REPLACE FUNCTION pgr_nodeNetwork(edge_table text, tolerance double precision,
-			id text default 'id', the_geom text default 'the_geom', table_ending text default 'noded',
-            rows_where text DEFAULT ''::text, outall boolean DEFAULT false) RETURNS text AS
-$BODY$
-DECLARE
-	
-	p_num int := 0;
-	p_ret text := '';
-    pgis_ver_old boolean := _pgr_versionless(postgis_lib_version(), '2.1.0.0');
-    vst_line_substring text;
-    vst_line_locate_point text;
-    intab text;
-    outtab text;
-    n_pkey text;
-    n_geom text;
-    naming record;
-    sname text;
-    tname text;
-    outname text;
-    srid integer;
-    sridinfo record;
-    splits bigint;
-    touched bigint;
-    untouched bigint;
-    geomtype text;
-    debuglevel text;
-    rows_where text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_nodeNetwork(''%'', %, ''%'', ''%'', ''%'', ''%'',  %)',
-    edge_table, tolerance, id,  the_geom, table_ending, rows_where, outall;
-  raise notice 'Performing checks, please wait .....';
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',0)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-	RAISE NOTICE '-------> % not found',edge_table;
-        RETURN 'FAIL';
-    ELSE
-	RAISE DEBUG '  -----> OK';
-    END IF;
-
-    intab=sname||'.'||tname;
-    outname=tname||'_'||table_ending;
-    outtab= sname||'.'||outname;
-    rows_where = CASE WHEN length(rows_where) > 2 and not outall THEN ' AND (' || rows_where || ')' ELSE '' END;
-    rows_where = CASE WHEN length(rows_where) > 2 THEN ' WHERE (' || rows_where || ')' ELSE '' END;
-  END;
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',id,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(id)||')' INTO n_pkey;
-       IF n_pkey is NULL then
-          raise notice  'ERROR: id column "%"  not found in %',id,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',the_geom,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(the_geom)||')' INTO n_geom;
-       IF n_geom is NULL then
-          raise notice  'ERROR: the_geom  column "%"  not found in %',the_geom,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-  IF n_pkey=n_geom THEN
-	raise notice  'ERROR: id and the_geom columns have the same name "%" in %',n_pkey,intab;
-        RETURN 'FAIL';
-  END IF;
-
-  BEGIN
-       	raise DEBUG 'Checking the SRID of the geometry "%"', n_geom;
-       	EXECUTE 'SELECT ST_SRID(' || quote_ident(n_geom) || ') as srid '
-          		|| ' FROM ' || _pgr_quote_ident(intab)
-          		|| ' WHERE ' || quote_ident(n_geom)
-          		|| ' IS NOT NULL LIMIT 1' INTO sridinfo;
-       	IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-        	RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           	RETURN 'FAIL';
-       	END IF;
-       	srid := sridinfo.srid;
-       	raise DEBUG '  -----> SRID found %',srid;
-       	EXCEPTION WHEN OTHERS THEN
-           		RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           		RETURN 'FAIL';
-  END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_pkey,intab;
-      if (_pgr_isColumnIndexed(intab,n_pkey)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding  index "%_%_idx".',n_pkey,intab;
-
-	set client_min_messages  to warning;
-        execute 'create  index '||tname||'_'||n_pkey||'_idx on '||_pgr_quote_ident(intab)||' using btree('||quote_ident(n_pkey)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_geom,intab;
-      if (_pgr_iscolumnindexed(intab,n_geom)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding unique index "%_%_gidx".',intab,n_geom;
-	set client_min_messages  to warning;
-        execute 'CREATE INDEX '
-            || quote_ident(tname || '_' || n_geom || '_gidx' )
-            || ' ON ' || _pgr_quote_ident(intab)
-            || ' USING gist (' || quote_ident(n_geom) || ')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
----------------
-    BEGIN
-       raise DEBUG 'initializing %',outtab;
-       execute 'select * from _pgr_getTableName('||quote_literal(outtab)||',0)' into naming;
-       IF sname=naming.sname  AND outname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(outtab)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(outname)||','||quote_literal(n_geom)||')';
-       ELSE
-	   set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(outtab)||' (id bigserial PRIMARY KEY,old_id integer,sub_id integer,
-								source bigint,target bigint)';
-       END IF;
-       execute 'select geometrytype('||quote_ident(n_geom)||') from  '||_pgr_quote_ident(intab)||' limit 1' into geomtype;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(outname)||','||
-                quote_literal(n_geom)||','|| srid||', '||quote_literal(geomtype)||', 2)';
-       execute 'CREATE INDEX '||quote_ident(outname||'_'||n_geom||'_idx')||' ON '||_pgr_quote_ident(outtab)||'  USING GIST ('||quote_ident(n_geom)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-    END;
-----------------
-
-
-  raise notice 'Processing, please wait .....';
-
-
-    if pgis_ver_old then
-        vst_line_substring    := 'st_line_substring';
-        vst_line_locate_point := 'st_line_locate_point';
-    else
-        vst_line_substring    := 'st_linesubstring';
-        vst_line_locate_point := 'st_linelocatepoint';
-    end if;
-
---    -- First creates temp table with intersection points
-    p_ret = 'create temp table intergeom on commit drop as (
-        select l1.' || quote_ident(n_pkey) || ' as l1id,
-               l2.' || quote_ident(n_pkey) || ' as l2id,
-	       l1.' || quote_ident(n_geom) || ' as line,
-	       _pgr_startpoint(l2.' || quote_ident(n_geom) || ') as source,
-	       _pgr_endpoint(l2.' || quote_ident(n_geom) || ') as target,
-               st_intersection(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ') as geom
-        from (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l1
-             join (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l2
-             on (st_dwithin(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ', ' || tolerance || '))'||
-        'where l1.' || quote_ident(n_pkey) || ' <> l2.' || quote_ident(n_pkey)||' and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false  )';
-    raise debug '%',p_ret;
-    EXECUTE p_ret;
-
-    -- second temp table with locus (index of intersection point on the line)
-    -- to avoid updating the previous table
-    -- we keep only intersection points occurring onto the line, not at one of its ends
---    drop table if exists inter_loc;
-
---HAD TO CHANGE THIS QUERY
--- p_ret= 'create temp table inter_loc on commit drop as (
---        select l1id, l2id, ' || vst_line_locate_point || '(line,point) as locus from (
---        select DISTINCT l1id, l2id, line, (ST_DumpPoints(geom)).geom as point from intergeom) as foo
---        where ' || vst_line_locate_point || '(line,point)<>0 and ' || vst_line_locate_point || '(line,point)<>1)';
-    p_ret= 'create temp table inter_loc on commit drop as ( select * from (
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,source) as locus from intergeom)
-         union
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,target) as locus from intergeom)) as foo
-        where locus<>0 and locus<>1)';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-
-    -- index on l1id
-    create index inter_loc_id_idx on inter_loc(l1id);
-
-    -- Then computes the intersection on the lines subset, which is much smaller than full set
-    -- as there are very few intersection points
-
---- outab needs to be formally created with id, old_id, subid,the_geom, source,target
----  so it can be inmediatly be used with createTopology
-
---   EXECUTE 'drop table if exists ' || _pgr_quote_ident(outtab);
---   EXECUTE 'create table ' || _pgr_quote_ident(outtab) || ' as
-     P_RET = 'insert into '||_pgr_quote_ident(outtab)||' (old_id,sub_id,'||quote_ident(n_geom)||') (  with cut_locations as (
-           select l1id as lid, locus
-           from inter_loc
-           -- then generates start and end locus for each line that have to be cut buy a location point
-           UNION ALL
-           select i.l1id  as lid, 0 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           UNION ALL
-           select i.l1id  as lid, 1 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           order by lid, locus
-       ),
-       -- we generate a row_number index column for each input line
-       -- to be able to self-join the table to cut a line between two consecutive locations
-       loc_with_idx as (
-           select lid, locus, row_number() over (partition by lid order by locus) as idx
-           from cut_locations
-       )
-       -- finally, each original line is cut with consecutive locations using linear referencing functions
-       select l.' || quote_ident(n_pkey) || ', loc1.idx as sub_id, ' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus) as ' || quote_ident(n_geom) || '
-       from loc_with_idx loc1 join loc_with_idx loc2 using (lid) join ' || _pgr_quote_ident(intab) || ' l on (l.' || quote_ident(n_pkey) || ' = loc1.lid)
-       where loc2.idx = loc1.idx+1
-           -- keeps only linestring geometries
-           and geometryType(' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus)) = ''LINESTRING'') ';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-	GET DIAGNOSTICS splits = ROW_COUNT;
-        execute 'with diff as (select distinct old_id from '||_pgr_quote_ident(outtab)||' )
-                 select count(*) from diff' into touched;
-	-- here, it misses all original line that did not need to be cut by intersection points: these lines
-	-- are already clean
-	-- inserts them in the final result: all lines which gid is not in the res table.
-	EXECUTE 'insert into ' || _pgr_quote_ident(outtab) || ' (old_id , sub_id, ' || quote_ident(n_geom) || ')
-                ( with used as (select distinct old_id from '|| _pgr_quote_ident(outtab)||')
-		select ' ||  quote_ident(n_pkey) || ', 1 as sub_id, ' ||  quote_ident(n_geom) ||
-		' from '|| _pgr_quote_ident(intab) ||' where  '||quote_ident(n_pkey)||' not in (select * from used)' || rows_where || ')';
-	GET DIAGNOSTICS untouched = ROW_COUNT;
-
-	raise NOTICE '  Split Edges: %', touched;
-	raise NOTICE ' Untouched Edges: %', untouched;
-	raise NOTICE '     Total original Edges: %', touched+untouched;
-        RAISE NOTICE ' Edges generated: %', splits;
-	raise NOTICE ' Untouched Edges: %',untouched;
-	raise NOTICE '       Total New segments: %', splits+untouched;
-        RAISE NOTICE ' New Table: %', outtab;
-        RAISE NOTICE '----------------------------------';
-
-    drop table  if exists intergeom;
-    drop table if exists inter_loc;
-    RETURN 'OK';
-END;
-$BODY$
-    LANGUAGE 'plpgsql' VOLATILE STRICT COST 100;
-
-
-COMMENT ON FUNCTION pgr_nodeNetwork(text, double precision, text, text, text, text, boolean )
- IS  'edge_table, tolerance, id:=''id'', the_geom:=''the_geom'', table_ending:=''noded'' ';
-
-
-CREATE OR REPLACE FUNCTION pgr_labelGraph(
-                edge_table text,
-                id text default 'id',
-                source text default 'source',
-                target text default 'target',
-                subgraph text default 'subgraph',
-                rows_where text default 'true'
-        )
-        RETURNS character varying AS
-$BODY$
-
-DECLARE
-        naming record;
-        schema_name text;
-        table_name text;
-        garbage text;
-        incre integer;
-        table_schema_name text;
-        query text;
-        ecnt integer;
-        sql1 text;
-        rec1 record;
-        sql2 text;
-        rec2 record;
-        rec_count record;
-        rec_single record;
-        graph_id integer;
-        gids int [];
-
-BEGIN
-        raise notice 'Processing:';
-        raise notice 'pgr_brokenGraph(''%'',''%'',''%'',''%'',''%'',''%'')', edge_table,id,source,target,subgraph,rows_where;
-        raise notice 'Performing initial checks, please hold on ...';
-
-        Raise Notice 'Starting - Checking table ...';
-        BEGIN
-                raise debug 'Checking % table existance', edge_table;
-                execute 'select * from pgr_getTableName('|| quote_literal(edge_table) ||')' into naming;
-                schema_name = naming.sname;
-                table_name = naming.tname;
-                table_schema_name = schema_name||'.'||table_name;
-                IF schema_name is null then
-                        raise notice 'no schema';
-                        return 'FAIL';
-                else
-                        if table_name is null then
-                                raise notice 'no table';
-                                return 'FAIL';
-                        end if;
-                end if;
-        END;
-        Raise Notice 'Ending - Checking table';
-
-        Raise Notice 'Starting - Checking columns';
-        BEGIN
-                raise debug 'Checking exitance of necessary columns inside % table', edge_table;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(id) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no id column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(source) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no source column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(target) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no target column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(subgraph) ||')' into naming;
-                if naming.pgr_iscolumnintable = 't' then
-                        raise notice 'subgraph column already in the table';
-                        return 'FAIL';
-                end if;
-        END;
-        Raise Notice 'Ending - Checking columns';
-
-        Raise Notice 'Starting - Checking rows_where condition';
-        BEGIN
-                raise debug 'Checking rows_where condition';
-                query='select count(*) from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where;
-                execute query into ecnt;
-                raise debug '-->Rows where condition: OK';
-                raise debug '    --> OK';
-                EXCEPTION WHEN OTHERS THEN
-                        raise notice 'Got %', SQLERRM;
-                        Raise notice 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-                        Raise notice '%', query;
-                        return 'FAIL';
-        END;
-        Raise Notice 'Ending - Checking rows_where condition';
-
-        garbage := 'garbage001';
-        incre := 1;
-        Raise Notice 'Starting - Checking temporary column';
-        Begin
-                raise debug 'Checking Checking temporary columns existance';
-
-                While True
-                        Loop
-                                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(garbage) ||')' into naming;
-                                If naming.pgr_iscolumnintable = 't' THEN
-                                        incre := incre + 1;
-                                        garbage := 'garbage00'||incre||'';
-                                ELSE
-                                        EXIT;
-                                END IF;
-                        End Loop;
-        End;
-        Raise Notice 'Ending - Checking temporary column';
-
-        Raise Notice 'Starting - Calculating subgraphs';
-        BEGIN
-                --------- Add necessary columns ----------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(subgraph) || ' INTEGER DEFAULT -1';
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(garbage) || ' INTEGER DEFAULT 0';
-                graph_id := 1;
-
-                EXECUTE 'select count(*) as count from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where ||'' into rec_count;
-                if rec_count.count = 0 then
-                        RETURN 'rows_where condition generated 0 rows';
-                end if;
-
-                WHILE TRUE
-                        LOOP
-                                ---------- Assign the very first -1 row graph_id ----------
-                                EXECUTE 'SELECT ' || pgr_quote_ident(id) || ' AS gid FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1 LIMIT 1' INTO rec_single;
-                                EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec_single.gid || '';
-
-                                --------- Search other rows with that particular graph_id -----------
-                                WHILE TRUE
-                                        LOOP
-                                                EXECUTE 'SELECT COUNT(*) FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0' into rec_count;
-                                                ----------- The following if else will check those rows which already have entertained ------------
-                                                IF (rec_count.count > 0) THEN
-                                                        sql1 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0';
-                                                        FOR rec1 IN EXECUTE sql1
-                                                                LOOP
-                                                                        sql2 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| pgr_quote_ident(source) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(source) ||' = '|| rec1.target ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.target ||'';
-                                                                        FOR rec2 IN EXECUTE sql2
-                                                                                LOOP
-                                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec2.gid || '';
-                                                                                END LOOP;
-                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(garbage) || ' = 1 WHERE ' || pgr_quote_ident(id) || ' = ' || rec1.gid || '';
-                                                                END LOOP;
-                                                ELSE
-                                                        EXIT;
-                                                END IF;
-                                        END LOOP;
-
-                                ------ Following is to exit the while loop. 0 means no more -1 id.
-                                EXECUTE 'SELECT COUNT(*) AS count FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1' INTO rec_count;
-                                If (rec_count.count = 0) THEN
-                                        EXIT;
-                                ELSE
-                                        graph_id := graph_id + 1;
-                                END IF;
-                        END LOOP;
-
-                ----------- Drop garbage column ------------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' DROP COLUMN ' || pgr_quote_ident(garbage) ||'';
-                Raise Notice 'Successfully complicated calculating subgraphs';
-        END;
-        Raise Notice 'Ending - Calculating subgraphs';
-
-        RETURN 'OK';
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCostMatrix(
-    edges_sql TEXT,
-    points_sql TEXT,
-    pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_pid, a.end_pid, a.agg_cost
-        FROM _pgr_withPoints($1, $2, $3, $3, $4,  $5, TRUE, TRUE) AS a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
---  DIJKSTRA DMatrix
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2, $2, $3, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
---  BIDIRECTIONAL DIJKSTRA Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_astarCostMatrix(
-    edges_sql TEXT, -- XY edges sql
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2, $2, $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
---  BIDIRECTIONAL ASTAR Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdAstarCostMatrix(
-    edges_sql TEXT,
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_bdAstarCostMatrix(TEXT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCostMatrix';
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_getTableName(IN tab text,OUT sname text,OUT tname text)
-RETURNS RECORD AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getTableName: This function will no longer be soported';
-    select * from _pgr_getTableName(tab, 0, 'pgr_getTableName') into sname,tname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_getColumnName(tab text, col text)
-RETURNS text AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getColumnName: This function will no longer be soported';
-    return _pgr_getColumnName(tab,col, 0, 'pgr_getColumnName');
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    select * from _pgr_getColumnName(tab,col,0, 'pgr_isColumnInTable') into cname;
-    return  cname IS not NULL;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnIndexed(tab text, col text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnIndexed: This function will no longer be soported';
-    return  _pgr_isColumnIndexed(tab,col);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-create or replace function pgr_quote_ident(idname text)
-returns text as
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    return  _pgr_quote_ident(idname);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_versionless(v1 text, v2 text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_versionless: This function will no longer be soported';
-    return  _pgr_versionless(v1,v2);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-create or replace function pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_startPoint: This function will no longer be soported';
-    return  _pgr_startPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_endPoint: This function will no longer be soported';
-    return  _pgr_endPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspJohnson(edges_sql text)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_johnson instead';
-      has_reverse =_pgr_parameter_check('johnson', edges_sql, false);
-      sql = edges_sql;
-      IF (has_reverse) THEN
-           RAISE NOTICE 'reverse_cost column found, removing.';
-           sql = 'SELECT source, target, cost FROM (' || edges_sql || ') a';
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () - 1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_johnson(sql, TRUE);
-  END
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspWarshall(edges_sql text, directed boolean, has_rcost boolean)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_floydWarshall instead';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-      sql := edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         ELSE raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () -1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_floydWarshall(sql, directed);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_astar(edges_sql TEXT, source_id INTEGER, target_id INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated signature pgr_astar(text, integer, integer, boolean, boolean)';
-    has_reverse =_pgr_parameter_check('astar', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost, x1,y1, x2, y2 FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-    FROM pgr_astar(sql, ARRAY[$2], ARRAY[$3], directed);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    sql TEXT,
-    source_vid INTEGER,
-    target_vid INTEGER,
-    directed BOOLEAN,
-    has_reverse_cost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdAstar';
-    has_reverse =_pgr_parameter_check('astar', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdAstar(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(edges_sql TEXT, start_vid INTEGER, end_vid INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdDijkstra';
-    has_reverse =_pgr_parameter_check('dijkstra', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdDijkstra(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstraPath(
-    sql text,
-    source INTEGER,
-    targets INTEGER ARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-    RETURNS SETOF pgr_costResult3 AS
-    $BODY$
-    DECLARE
-    has_reverse BOOLEAN;
-    new_sql TEXT;
-    result pgr_costResult3;
-    tmp pgr_costResult3;
-    sseq INTEGER;
-    i INTEGER;
-    BEGIN
-        RAISE NOTICE 'Deprecated function: Use pgr_dijkstra instead.';
-        has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-        new_sql = sql;
-        IF (array_ndims(targets) != 1) THEN
-            raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-
-        IF (has_reverse != has_rcost) THEN
-            IF (has_reverse) THEN
-                new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-            ELSE
-                raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-                USING ERRCODE = 'XX000';
-            END IF;
-        END IF;
-        SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-        sseq = 0; i = 1;
-        FOR result IN
-            SELECT seq, a.end_vid::INTEGER AS id1, a.node::INTEGER AS i2, a.edge::INTEGER AS id3, cost
-            FROM pgr_dijkstra(new_sql, source, targets, directed) a ORDER BY a.end_vid, seq LOOP
-            WHILE (result.id1 != targets[i]) LOOP
-                tmp.seq = sseq;
-                tmp.id1 = targets[i];
-                IF (targets[i] = source) THEN
-                    tmp.id2 = source;
-                    tmp.cost =0;
-                ELSE
-                    tmp.id2 = 0;
-                    tmp.cost = -1;
-                END IF;
-                tmp.id3 = -1;
-                RETURN next tmp;
-                i = i + 1;
-                sseq = sseq + 1;
-            END LOOP;
-        IF (result.id1 = targets[i] AND result.id3 != -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-        IF (result.id1 = targets[i] AND result.id3 = -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.id2 = source;
-            tmp.cost = 0;
-        ELSE
-            tmp.id2 = 0;
-            tmp.cost = -1;
-        END IF;
-        tmp.id3 = -1;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstracost(
-    sql text,
-    source INTEGER,
-    targets INTEGER array,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-result pgr_costResult;
-tmp pgr_costResult;
-sseq INTEGER;
-i INTEGER;
-BEGIN
-    RAISE NOTICE 'Deprecated function. Use pgr_dijkstraCost instead.';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    new_sql = sql;
-    IF (array_ndims(targets) != 1) THEN
-        raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-        USING ERRCODE = 'XX000';
-    END IF;
-
-
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-    sseq = 0; i = 1;
-    FOR result IN
-        SELECT ((row_number() over()) -1)::INTEGER, a.start_vid::INTEGER, a.end_vid::INTEGER, agg_cost
-        FROM pgr_dijkstraCost(new_sql, source, targets, directed) a ORDER BY end_vid LOOP
-        WHILE (result.id2 != targets[i]) LOOP
-            tmp.seq = sseq;
-            tmp.id1 = source;
-            tmp.id2 = targets[i];
-            IF (targets[i] = source) THEN
-                tmp.cost = 0;
-            ELSE
-                tmp.cost = -1;
-            END IF;
-            RETURN next tmp;
-            i = i + 1;
-            sseq = sseq + 1;
-        END LOOP;
-        IF (result.id2 = targets[i]) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = source;
-        tmp.id2 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.cost = 0;
-        ELSE
-            tmp.cost = -1;
-        END IF;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-create or replace function pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    returns integer as
-$body$
-
-declare
-    rr record;
-    pct float;
-    debuglevel text;
-
-begin
-    -- find the closest edge within tol distance
-    execute 'select * from ' || _pgr_quote_ident(edges) ||
-            ' where st_dwithin(''' || pnt::text ||
-            '''::geometry, the_geom, ' || tol || ') order by st_distance(''' || pnt::text ||
-            '''::geometry, the_geom) asc limit 1' into rr;
-
-    if rr.the_geom is not null then
-        -- deal with MULTILINESTRINGS
-        if geometrytype(rr.the_geom)='MULTILINESTRING' THEN
-            rr.the_geom := ST_GeometryN(rr.the_geom, 1);
-        end if;
-
-        -- project the point onto the linestring
-        execute 'show client_min_messages' into debuglevel;
-        SET client_min_messages='ERROR';
-        pct := st_line_locate_point(rr.the_geom, pnt);
-        execute 'set client_min_messages  to '|| debuglevel;
-
-        -- return the node we are closer to
-        if pct < 0.5 then
-            return rr.source;
-        else
-            return rr.target;
-        end if;
-    else
-        -- return a failure to find an edge within tol distance
-        return -1;
-    end if;
-end;
-$body$
-  language plpgsql volatile
-  cost 5;
-
-
-----------------------------------------------------------------------------
-
-create or replace function pgr_flipedges(ga geometry[])
-    returns geometry[] as
-$body$
-
-declare
-    nn integer;
-    i integer;
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_flipEdges';
-    -- get the count of edges, and return if only one edge
-    nn := array_length(ga, 1);
-    if nn=1 then
-        return ga;
-    end if;
-
-    -- determine if first needs to be flipped
-    g := _pgr_startpoint(ga[1]);
-
-    -- if the start of the first is connected to the second then it needs to be flipped
-    if _pgr_startpoint(ga[2])=g or _pgr_endpoint(ga[2])=g then
-        ga[1] := st_reverse(ga[1]);
-    end if;
-    g := _pgr_endpoint(ga[1]);
-
-    -- now if  the end of the last edge matchs the end of the current edge we need to flip it
-    for i in 2 .. nn loop
-        if _pgr_endpoint(ga[i])=g then
-            ga[i] := st_reverse(ga[i]);
-        end if;
-        -- save the end of this edge into the last end for the next cycle
-        g := _pgr_endpoint(ga[i]);
-    end loop;
-
-    return ga;
-end;
-$body$
-    language plpgsql immutable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_texttopoints(pnts text, srid integer DEFAULT(4326))
-    returns geometry[] as
-$body$
-
-declare
-    a text[];
-    t text;
-    p geometry;
-    g geometry[];
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_textToPoints';
-    -- convert commas to space and split on ';'
-    a := string_to_array(replace(pnts, ',', ' '), ';');
-    -- convert each 'x y' into a point geometry and concattenate into a new array
-    for t in select unnest(a) loop
-        p := st_pointfromtext('POINT(' || t || ')', srid);
-        g := g || p;
-    end loop;
-
-    return g;
-end;
-$body$
-    language plpgsql immutable;
-
------------------------------------------------------------------------
-
-create or replace function pgr_pointstovids(pnts geometry[], edges text, tol float8 DEFAULT(0.01))
-    returns integer[] as
-$body$
-
-declare
-    v integer[];
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_pointsToVids';
-    -- cycle through each point and locate the nearest edge and vertex on that edge
-    for g in select unnest(pnts) loop
-        v := v || pgr_pointtoedgenode(edges, g, tol);
-    end loop;
-
-    return v;
-end;
-$body$
-    language plpgsql stable;
-
-
-create or replace function pgr_pointstodmatrix(pnts geometry[], mode integer default (0), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    r record;
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_pointsToDMatrix';
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    -- create an id for each point in the array and unnest it into a table nodes in the with clause
-    for r in with nodes as (select row_number() over()::integer as id, p from (select unnest(pnts) as p) as foo)
-        -- compute a row of distances
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j,
-                case when mode=0
-                    then st_distance(a.p, b.p)
-                    else st_distance_sphere(a.p, b.p)
-                end as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i loop
-
-        -- you must concat an array[array[]] to make dmatrix[][]
-        -- concat the row of distances to the dmatrix
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-end;
-$body$
-    language plpgsql stable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_vidstodmatrix(IN vids integer[], IN pnts geometry[], IN edges text, tol float8 DEFAULT(0.1), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    i integer;
-    j integer;
-    nn integer;
-    rr record;
-    bbox geometry;
-    t float8[];
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    -- check if the input arrays has any -1 values, maybe this whould be a raise exception
-    if vids @> ARRAY[-1] then
-    raise notice 'Some vids are undefined (-1)!';
-    dmatrix := null;
-    ids := null;
-    return;
-    end if;
-
-    ids := vids;
-
-    -- get the count of nodes
-    nn := array_length(vids,1);
-
-    -- zero out a dummy row
-    for i in 1 .. nn loop
-        t := t || 0.0::float8;
-    end loop;
-
-    -- using the dummy row, zero out the whole matrix
-    for i in 1 .. nn loop
-    dmatrix := dmatrix || ARRAY[t];
-    end loop;
-
-    for i in 1 .. nn-1 loop
-        j := i;
-        -- compute the bbox for the point needed for this row
-        select st_expand(st_collect(pnts[id]), tol) into bbox
-          from (select generate_series as id from generate_series(i, nn)) as foo;
-
-        -- compute kdijkstra() for this row
-        for rr in execute 'select * from pgr_dijkstracost($1, $2, $3, false)'
-                  using 'select id, source, target, cost from ' || edges ||
-                        ' where the_geom && ''' || bbox::text || '''::geometry'::text, vids[i], vids[i+1:nn] loop
-
-            -- TODO need to check that all node were reachable from source
-            -- I think unreachable paths between nodes returns cost=-1.0
-
-            -- populate the matrix with the cost values, remember this is symmetric
-            j := j + 1;
-            -- raise notice 'cost(%,%)=%', i, j, rr.agg_cost;
-            dmatrix[i][j] := rr.agg_cost;
-            dmatrix[j][i] := rr.agg_cost;
-        end loop;
-    end loop;
-
-end;
-$body$
-    language plpgsql stable cost 200;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_vidsToDMatrix(sql TEXT, vids  INTEGER[], dir BOOLEAN, has_rcost BOOLEAN, want_symmetric BOOLEAN)
-RETURNS float8[] AS
-$BODY$
-DECLARE
-directed BOOLEAN;
-has_reverse BOOLEAN;
-edges_sql TEXT;
-dmatrix_row float8[];
-dmatrix float8[];
-cell RECORD;
-unique_vids INTEGER[];
-total BIGINT;
-from_v BIGINT;
-to_v BIGINT;
-BEGIN
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql = sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    unique_vids :=  ARRAY(SELECT DISTINCT UNNEST(vids) ORDER BY 1);
-
-    IF want_symmetric THEN
-        directed = false;
-    ELSE
-        directed = dir;
-    END IF;
-
-    total := array_length(unique_vids, 1);
-
-    -- initializing dmatrix
-    FOR i in 1 .. total LOOP
-        dmatrix_row := dmatrix_row || '+Infinity'::float8;
-    END LOOP;
-    FOR i in 1 .. total LOOP
-    dmatrix := dmatrix || ARRAY[dmatrix_row];
-    dmatrix[i][i] = 0;
-    END LOOP;
-
-    CREATE TEMP TABLE __x___y____temp AS
-        WITH result AS
-            (SELECT unnest(unique_vids) AS vid)
-        SELECT row_number() OVER() AS idx, vid FROM result;
-
-    FOR cell IN SELECT * FROM pgr_dijkstraCostMatrix(sql, unique_vids, directed) LOOP
-        SELECT idx INTO from_v FROM __x___y____temp WHERE vid =  cell.start_vid;
-        SELECT idx INTO to_v FROM __x___y____temp WHERE vid =  cell.end_vid;
-
-        dmatrix[from_v][to_v] = cell.agg_cost;
-        dmatrix[to_v][from_v] = cell.agg_cost;
-    END LOOP;
-
-    DROP TABLE IF EXISTS __x___y____temp;
-    RETURN dmatrix;
-
-    EXCEPTION WHEN others THEN
-       DROP TABLE IF EXISTS __x___y____temp;
-       raise exception '% %', SQLERRM, SQLSTATE;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated function';
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_dijkstra(sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_dijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN) IS 'pgr_dijkstra(Deprecated signature)';
-
-
-
-
-
--- OLD SIGNATURE
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(edges_sql text, source BIGINT, distance FLOAT, directed BOOLEAN, has_rcost BOOLEAN)
-  RETURNS SETOF pgr_costresult AS
-  $BODY$
-  DECLARE
-  has_reverse BOOLEAN;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function';
-
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, FALSE);
-
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-             -- the user says it doesn't have reverse cost but its false
-             -- removing from query
-             RAISE NOTICE 'Contradiction found: has_rcost set to false but reverse_cost column found';
-             sql = 'SELECT id, source, target, cost, -1 as reverse_cost FROM (' || edges_sql || ') __q ';
-         ELSE
-             -- the user says it has reverse cost but its false
-             -- can't do anything
-             RAISE EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query SELECT seq - 1 AS seq, node::integer AS id1, edge::integer AS id2, agg_cost AS cost
-                FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maximumcardinalitymatching(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---INTERNAL FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
-------------------------
--- deprecated signatures
------------------------
-
-COMMENT ON FUNCTION pgr_astar(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_astar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdAstar( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdAstar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdDijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdDijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_dijkstra(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_dijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_drivingDistance(text,  BIGINT,  FLOAT8,  BOOLEAN,  BOOLEAN)
-    IS 'pgr_drivingDistance(Deprecated signature)';
-
-------------------------
--- Renamed /deprecated
------------------------
-COMMENT ON FUNCTION pgr_apspJohnson(TEXT)
-    IS 'pgr_apspJohnson(Renamed function) use pgr_Johnson instead';
-
-COMMENT ON FUNCTION pgr_apspWarshall(text, boolean, boolean)
-    IS 'pgr_apspWarshall(Renamed function) use pgr_floydWarshall instead';
-
-COMMENT ON FUNCTION pgr_kdijkstraPath( text, INTEGER, INTEGER ARRAY, BOOLEAN, BOOLEAN)
-    IS 'pgr_kdijkstraPath(Renamed function) use pgr_dijkstra instead';
-
-COMMENT ON FUNCTION pgr_kdijkstracost( text, INTEGER, INTEGER array, BOOLEAN, BOOLEAN)
-    IS 'pgr_kDijkstraCost(Renamed function) use pgr_dijkstraCost instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-
-
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-
-
-COMMENT ON FUNCTION pgr_gsoc_vrppdtw( text, INTEGER, INTEGER)
-    IS 'pgr_gsoc_vrppdtw(Renamed function) use pgr_pickDeliverEuclidean instead';
-
-------------------------
--- Deprecated functions
------------------------
-
-COMMENT ON FUNCTION pgr_flipedges(geometry[])
-    IS 'pgr_flipedges(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_texttopoints(text,  integer)
-    IS 'pgr_texttopoints(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstovids(pnts geometry[], edges text, tol float8)
-    IS 'pgr_pointstovids(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    IS 'pgr_pointtoedgenode(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstodmatrix(geometry[], integer)
-    IS 'pgr_pointstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidstodmatrix( integer[],  geometry[],  text, float8)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidsToDMatrix(TEXT,  INTEGER[], BOOLEAN, BOOLEAN, BOOLEAN)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-
-
-
-COMMENT ON FUNCTION pgr_getTableName(IN tab text)
-    IS 'pgr_getTableName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_getColumnName(tab text, col text)
-    IS 'pgr_getColumnName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnInTable(tab text, col text)
-    IS 'pgr_isColumnInTable(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnIndexed(tab text, col text)
-    IS 'pgr_isColumnIndexed(Deprecated function)';
-
-
-COMMENT ON FUNCTION pgr_quote_ident(idname text)
-    IS 'pgr_quote_ident(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_versionless(v1 text, v2 text)
-    IS 'pgr_versionless(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_startPoint(g geometry)
-    IS 'pgr_startPoint(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_endPoint(g geometry)
-    IS 'pgr_endPoint(Deprecated function)';
-
-
diff --git a/tools/sql-update-scripts/pgrouting--2.5.2.sql b/tools/sql-update-scripts/pgrouting--2.5.2.sql
deleted file mode 100644
index 3d74f05..0000000
--- a/tools/sql-update-scripts/pgrouting--2.5.2.sql
+++ /dev/null
@@ -1,6423 +0,0 @@
-\echo Use "CREATE EXTENSION pgrouting" to load this file. \quit
-
-
-
-
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
---- pgRouting provides geospatial routing functionality.
---- http://pgrouting.org
---- copyright
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
----
----
---- This is free software; you can redistribute and/or modify it:
---- the terms of the GNU General Public Licence. See the COPYING file.
---- the terms of the MIT-X Licence. See the COPYING file.
----
---- The following functions have MIT-X licence:
----     pgr_version()
----     pgr_tsp(matrix float8[][], startpt integer, endpt integer DEFAULT -1, OUT seq integer, OUT id integer)
----     _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
----     pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
----
----
---- All other functions are under GNU General Public Licence.
----
---- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---
--- WARNING: Any change in this file must be evaluated for compatibility.
---          Changes cleanly handled by postgis_upgrade.sql are fine,
---          other changes will require a bump in Major version.
---          Currently only function replaceble by CREATE OR REPLACE
---          are cleanly handled.
---
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
---  pgRouting 2.0 types
-
-CREATE TYPE pgr_costResult AS
-(
-    seq integer,
-    id1 integer,
-    id2 integer,
-    cost float8
-);
-
-CREATE TYPE pgr_costResult3 AS
-(
-    seq integer,
-    id1 integer,
-    id2 integer,
-    id3 integer,
-    cost float8
-);
-
-CREATE TYPE pgr_geomResult AS
-(
-    seq integer,
-    id1 integer,
-    id2 integer,
-    geom geometry
-);
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_version()
-RETURNS TABLE(
-        "version" varchar,
-        tag varchar,
-        hash varchar,
-        branch varchar,
-        boost varchar
-    ) AS
-$BODY$
-    SELECT '2.5.2'::varchar AS version,
-        'v2.5.2'::varchar AS tag,
-        '60585f1f7'::varchar AS hash,
-        'master'::varchar AS branch,
-        '1.54.0'::varchar AS boost;
-$BODY$
-LANGUAGE sql IMMUTABLE;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getTableName(IN tab text, IN reportErrs int default 0, IN fnName text default '_pgr_getTableName', OUT sname text,OUT tname text)
-  RETURNS RECORD AS
-$$
-DECLARE
-        naming record;
-        i integer;
-        query text;
-        sn text; -- schema name
-        tn text; -- table name
-        ttype text; --table type for future use
-        err boolean;
-        debuglevel text;
-        var_types text[] = ARRAY['BASE TABLE', 'VIEW'];
-BEGIN
-
-    execute 'show client_min_messages' into debuglevel;
-
-
-    perform _pgr_msg( 0, fnName, 'Checking table ' || tab || ' exists');
-    --RAISE DEBUG 'Checking % exists',tab;
-
-    i := strpos(tab,'.');
-    IF (i <> 0) THEN
-        sn := split_part(tab, '.',1);
-        tn := split_part(tab, '.',2);
-    ELSE
-        sn := current_schema;
-        tn := tab;
-    END IF;
-
-
-   SELECT schema_name INTO sname
-   FROM information_schema.schemata WHERE schema_name = sn;
-
-    IF sname IS NOT NULL THEN -- found schema (as is)
-       SELECT table_name, table_type INTO tname, ttype
-       FROM information_schema.tables
-       WHERE
-                table_type = ANY(var_types) and
-                table_schema = sname and
-                table_name = tn ;
-        IF tname is NULL THEN
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  = ANY(var_types) and
-                table_schema = sname and
-                table_name = lower(tn) ORDER BY table_name;
-        END IF;
-    END IF;
-    IF sname is NULL or tname is NULL THEN --schema not found or table not found
-        SELECT schema_name INTO sname
-        FROM information_schema.schemata
-        WHERE schema_name = lower(sn) ;
-
-        IF sname IS NOT NULL THEN -- found schema (with lower caps)
-            SELECT table_name, table_type INTO tname, ttype
-            FROM information_schema.tables
-            WHERE
-                table_type  =  ANY(var_types) and
-                table_schema = sname and
-                table_name= tn ;
-
-           IF tname IS NULL THEN
-                SELECT table_name, table_type INTO tname, ttype
-                FROM information_schema.tables
-                WHERE
-                    table_type  =  ANY(var_types) and
-                    table_schema = sname and
-                    table_name= lower(tn) ;
-           END IF;
-        END IF;
-    END IF;
-   err = (sname IS NULL OR tname IS NULL);
-   perform _pgr_onError(err, reportErrs, fnName, 'Table ' || tab ||' not found',' Check your table name', 'Table '|| tab || ' found');
-
-END;
-$$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(sname text, tname text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(col) into cname;
-
-    IF cname is null  THEN
-    execute 'SELECT column_name FROM information_schema.columns
-          WHERE table_name='||quote_literal(tname)||' and table_schema='||quote_literal(sname)||' and column_name='||quote_literal(lower(col))  into cname;
-    END if;
-
-    err = cname is null;
-
-    perform _pgr_onError(err, reportErrs, fnName,  'Column '|| col ||' not found', ' Check your column name','Column '|| col || ' found');
-    RETURN cname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnName(tab text, col text, IN reportErrs int default 1, IN fnName text default '_pgr_getColumnName')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    naming record;
-    err boolean;
-BEGIN
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-
-    select * into cname from _pgr_getColumnName(sname,tname,col,reportErrs, fnName);
-    RETURN cname;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    select * from _pgr_getColumnName(tab,col,0, '_pgr_isColumnInTable') into cname;
-    return cname is not null;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(sname text, tname text, cname text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    pkey text;
-BEGIN
-    SELECT
-          pg_attribute.attname into pkey
-         --  format_type(pg_attribute.atttypid, pg_attribute.atttypmod)
-          FROM pg_index, pg_class, pg_attribute
-          WHERE
-                  pg_class.oid = _pgr_quote_ident(sname||'.'||tname)::regclass AND
-                  indrelid = pg_class.oid AND
-                  pg_attribute.attrelid = pg_class.oid AND
-                  pg_attribute.attnum = any(pg_index.indkey)
-                  AND indisprimary;
-
-    IF pkey=cname then
-          RETURN TRUE;
-    END IF;
-
-    SELECT a.index_name,
-           b.attname,
-           b.attnum,
-           a.indisunique,
-           a.indisprimary
-      INTO rec
-      FROM ( SELECT a.indrelid,
-                    a.indisunique,
-                    a.indisprimary,
-                    c.relname index_name,
-                    unnest(a.indkey) index_num
-               FROM pg_index a,
-                    pg_class b,
-                    pg_class c,
-                    pg_namespace d
-              WHERE b.relname=tname
-                AND b.relnamespace=d.oid
-                AND d.nspname=sname
-                AND b.oid=a.indrelid
-                AND a.indexrelid=c.oid
-           ) a,
-           pg_attribute b
-     WHERE a.indrelid = b.attrelid
-       AND a.index_num = b.attnum
-       AND b.attname = cname
-  ORDER BY a.index_name,
-           a.index_num;
-
-  RETURN FOUND;
-  EXCEPTION WHEN OTHERS THEN
-    perform _pgr_onError( true, reportErrs, fnName,
-    'Error when checking for the postgres system attributes', SQLERR);
-    RETURN FALSE;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION _pgr_isColumnIndexed(tab text, col text,
-      IN reportErrs int default 1, IN fnName text default '_pgr_isColumnIndexed')
-RETURNS boolean AS
-$BODY$
-DECLARE
-    naming record;
-    rec record;
-    sname text;
-    tname text;
-    cname text;
-    pkey text;
-    value boolean;
-BEGIN
-    SELECT * into naming FROM _pgr_getTableName(tab, 0, fnName);
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    SELECT * into cname from _pgr_getColumnName(sname, tname, col, 0, fnName) ;
-    IF cname IS NULL THEN
-        RETURN FALSE;
-    END IF;
-    select * into value  from _pgr_isColumnIndexed(sname, tname, cname, reportErrs, fnName);
-    return value;
-END
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-create or replace function _pgr_quote_ident(idname text)
-    returns text as
-$body$
-declare
-    t text[];
-    pgver text;
-
-begin
-    pgver := regexp_replace(version(), E'^PostgreSQL ([^ ]+)[ ,].*$', E'\\1');
-
-    if _pgr_versionless(pgver, '9.2') then
-        select into t array_agg(quote_ident(term)) from
-            (select nullif(unnest, '') as term
-               from unnest(string_to_array(idname, '.'))) as foo;
-    else
-        select into t array_agg(quote_ident(term)) from
-            (select unnest(string_to_array(idname, '.', '')) as term) as foo;
-    end if;
-    return array_to_string(t, '.');
-end;
-$body$
-language plpgsql immutable;
-
-
-CREATE OR REPLACE FUNCTION _pgr_versionless(v1 text, v2 text)
-  RETURNS boolean AS
-$BODY$
-
-
-declare
-    v1a text[];
-    v2a text[];
-    nv1 integer;
-    nv2 integer;
-    ne1 integer;
-    ne2 integer;
-
-begin
-    -- separate components into an array, like:
-    -- '2.1.0-beta3dev'  =>  {2,1,0,beta3dev}
-    v1a := regexp_matches(v1, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-    v2a := regexp_matches(v2, E'^(\\d+)(?:[\\.](\\d+))?(?:[\\.](\\d+))?[-+\\.]?(.*)$');
-
-    -- convert modifiers to numbers for comparison
-    -- we do not delineate between alpha1, alpha2, alpha3, etc
-    ne1 := case when v1a[4] is null or v1a[4]='' then 5
-                when v1a[4] ilike 'rc%' then 4
-                when v1a[4] ilike 'beta%' then 3
-                when v1a[4] ilike 'alpha%' then 2
-                when v1a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    ne2 := case when v2a[4] is null or v2a[4]='' then 5
-                when v2a[4] ilike 'rc%' then 4
-                when v2a[4] ilike 'beta%' then 3
-                when v2a[4] ilike 'alpha%' then 2
-                when v2a[4] ilike 'dev%' then 1
-                else 0 end;
-
-    nv1 := v1a[1]::integer * 10000 +
-           coalesce(v1a[2], '0')::integer * 1000 +
-           coalesce(v1a[3], '0')::integer *  100 + ne1;
-    nv2 := v2a[1]::integer * 10000 +
-           coalesce(v2a[2], '0')::integer * 1000 +
-           coalesce(v2a[3], '0')::integer *  100 + ne2;
-
-    --raise notice 'nv1: %, nv2: %, ne1: %, ne2: %', nv1, nv2, ne1, ne2;
-
-    return nv1 < nv2;
-end;
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-create or replace function _pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_startpoint(st_geometryn(g,1));
-    else
-        return st_startpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function _pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-declare
-
-begin
-    if geometrytype(g) ~ '^MULTI' then
-        return st_endpoint(st_geometryn(g,1));
-    else
-        return st_endpoint(g);
-    end if;
-end;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_parameter_check(fn text, sql text, big boolean default false)
-  RETURNS bool AS
-  $BODY$
-
-  DECLARE
-  rec record;
-  rec1 record;
-  has_rcost boolean;
-  safesql text;
-  BEGIN
-    IF (big) THEN
-       RAISE EXCEPTION 'This function is for old style functions';
-    END IF;
-
-    -- checking query is executable
-    BEGIN
-      safesql =  'select * from ('||sql||' ) AS __a__ limit 1';
-      execute safesql into rec;
-      EXCEPTION
-        WHEN OTHERS THEN
-            RAISE EXCEPTION 'Could not execute query please verify syntax of: '
-              USING HINT = sql;
-    END;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('dijkstra','astar') THEN
-        BEGIN
-          execute 'select id,source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: id, source, target, cost';
-        END;
-        execute 'select pg_typeof(id)::text as id_type, pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.id_type in ('integer'::text))
-              AND (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Error, columns ''source'', ''target'' must be of type int4, ''cost'' must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    IF fn IN ('astar') THEN
-        BEGIN
-          execute 'select x1,y1,x2,y2  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING ERRCODE = 'XX000',
-                   HINT = 'Please veryfy the column names: x1,y1, x2,y2';
-        END;
-        execute 'select pg_typeof(x1)::text as x1_type, pg_typeof(y1)::text as y1_type, pg_typeof(x2)::text as x2_type, pg_typeof(y2)::text as y2_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.x1_type = 'double precision'::text)
-              AND (rec.y1_type = 'double precision'::text)
-              AND (rec.x2_type = 'double precision'::text)
-              AND (rec.y2_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Columns: x1, y1, x2, y2 must be of type float8'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    -- checking the fixed columns and data types of the integers
-    IF fn IN ('johnson') THEN
-        BEGIN
-          execute 'select source,target,cost  from ('||safesql||') as __b__' into rec;
-          EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                  USING HINT = 'Please veryfy the column names: id, source, target, cost',
-                         ERRCODE = 'XX000';
-        END;
-
-        execute 'select pg_typeof(source)::text as source_type, pg_typeof(target)::text as target_type, pg_typeof(cost)::text as cost_type'
-            || ' from ('||safesql||') AS __b__ ' into rec;
-        -- Version 2.0.0 is more restrictive
-        IF NOT(   (rec.source_type in ('integer'::text))
-              AND (rec.target_type in ('integer'::text))
-              AND (rec.cost_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION 'Support for source,target columns only of type: integer. Support for Cost: double precision'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-
-    -- Checking the data types of the optional reverse_cost";
-    has_rcost := false;
-    IF fn IN ('johnson','dijkstra','astar') THEN
-      BEGIN
-        execute 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||safesql||' ) AS __b__ limit 1 ' into rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-            return has_rcost;
-      END;
-      if (has_rcost) then
-        IF (big) then
-           IF  not (rec1.rev_type in ('bigint'::text, 'integer'::text, 'smallint'::text, 'double precision'::text, 'real'::text)) then
-             RAISE EXCEPTION 'Illegar type in optional parameter reverse_cost.'
-             USING ERRCODE = 'XX000';
-           END IF;
-        ELSE -- Version 2.0.0 is more restrictive
-           IF (rec1.rev_type != 'double precision') then
-             RAISE EXCEPTION 'Illegal type in optional parameter reverse_cost, must be of type float8'
-             USING ERRCODE = 'XX000';
-           END IF;
-        END IF;
-      end if;
-      return true;
-    END IF;
-    -- just for keeps
-    return true;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 1;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_onError(
-  IN errCond boolean,  -- true there is an error
-  IN reportErrs int,   -- 0, 1 or 2
-  IN fnName text,      -- function name that generates the error
-  IN msgerr text,      -- error message
-  IN hinto text default 'No hint', -- hint help
-  IN msgok text default 'OK')      -- message if everything is ok
-  RETURNS void AS
-$BODY$
-BEGIN
-  if errCond=true then
-     if reportErrs=0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-     else
-       if reportErrs = 2 then
-         raise notice '----> PGR ERROR in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-         raise raise_exception;
-       else
-         raise notice '----> PGR NOTICE in %: %',fnName,msgerr USING HINT = '  ---->'|| hinto;
-       end if;
-     end if;
-  else
-       raise debug 'PGR ----> %: %',fnName,msgok;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_msg(IN msgKind int, IN fnName text, IN msg text default '---->OK')
-  RETURNS void AS
-$BODY$
-BEGIN
-  if msgKind = 0 then
-       raise debug '----> PGR DEBUG in %: %',fnName,msg;
-  else
-       raise notice '----> PGR NOTICE in %: %',fnName,msg;
-  end if;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(sname text, tname text, cname text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    EXECUTE 'select data_type  from information_schema.columns '
-            || 'where table_name = '||quote_literal(tname)
-                 || ' and table_schema=' || quote_literal(sname)
-                 || ' and column_name='||quote_literal(cname)
-       into ctype;
-    err = ctype is null;
-    perform _pgr_onError(err, reportErrs, fnName,
-            'Type of Column '|| cname ||' not found',
-            'Check your column name',
-            'OK: Type of Column '|| cname || ' is ' || ctype);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_getColumnType(tab text, col text,
-     IN reportErrs int default 0, IN fnName text default '_pgr_getColumnType')
-RETURNS text AS
-$BODY$
-DECLARE
-    sname text;
-    tname text;
-    cname text;
-    ctype text;
-    naming record;
-    err boolean;
-BEGIN
-
-    select * into naming from _pgr_getTableName(tab,reportErrs, fnName) ;
-    sname=naming.sname;
-    tname=naming.tname;
-    select * into cname from _pgr_getColumnName(tab,col,reportErrs, fnName) ;
-    select * into ctype from _pgr_getColumnType(sname,tname,cname,reportErrs, fnName);
-    RETURN ctype;
-END;
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_get_statement(o_sql text)
-RETURNS text AS
-$BODY$
-DECLARE
-sql TEXT;
-BEGIN
-    EXECUTE 'SELECT statement FROM pg_prepared_statements WHERE name ='  || quote_literal(o_sql) || ' limit 1 ' INTO sql;
-    IF (sql IS NULL) THEN
-      RETURN   o_sql;
-    ELSE
-      RETURN  regexp_replace(sql, '(.)* as ', '', 'i');
-    END IF;
-END
-$BODY$
-LANGUAGE plpgsql STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_checkVertTab(vertname text, columnsArr  text[],
-    IN reportErrs int default 1, IN fnName text default '_pgr_checkVertTab',
-    OUT sname text,OUT vname text)
-RETURNS record AS
-$BODY$
-DECLARE
-    cname text;
-    colname text;
-    naming record;
-    debuglevel text;
-    err  boolean;
-    msgKind int;
-
-BEGIN
-    msgKind = 0; -- debug_
-    execute 'show client_min_messages' into debuglevel;
-
-    perform _pgr_msg(msgKind, fnName, 'Checking table ' || vertname || ' exists');
-       select * from _pgr_getTableName(vertname, 0, fnName) into naming;
-       sname=naming.sname;
-       vname=naming.tname;
-       err = sname is NULL or vname is NULL;
-    perform _pgr_onError( err, 2, fnName,
-          'Vertex Table: ' || vertname || ' not found',
-          'Please create ' || vertname || ' using  _pgr_createTopology() or pgr_createVerticesTable()',
-          'Vertex Table: ' || vertname || ' found');
-
-
-    perform _pgr_msg(msgKind, fnName, 'Checking columns of ' || vertname);
-      FOREACH cname IN ARRAY columnsArr
-      loop
-         select _pgr_getcolumnName(vertname, cname, 0, fnName) into colname;
-         if colname is null then
-           perform _pgr_msg(msgKind, fnName, 'Adding column ' || cname || ' in ' || vertname);
-           set client_min_messages  to warning;
-                execute 'ALTER TABLE '||_pgr_quote_ident(vertname)||' ADD COLUMN '||cname|| ' integer';
-           execute 'set client_min_messages  to '|| debuglevel;
-           perform _pgr_msg(msgKind, fnName);
-         end if;
-      end loop;
-    perform _pgr_msg(msgKind, fnName, 'Finished checking columns of ' || vertname);
-
-    perform _pgr_createIndex(vertname , 'id' , 'btree', reportErrs, fnName);
- END
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(
-    sname text, tname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    debuglevel text;
-    naming record;
-    tabname text;
-    query text;
-    msgKind int;
-BEGIN
-  msgKind = 0; -- debug_
-
-  execute 'show client_min_messages' into debuglevel;
-  tabname=_pgr_quote_ident(sname||'.'||tname);
-  perform _pgr_msg(msgKind, fnName, 'Checking ' || colname || ' column in ' || tabname || ' is indexed');
-    IF (_pgr_isColumnIndexed(sname,tname,colname, 0, fnName)) then
-       perform _pgr_msg(msgKind, fnName);
-    else
-      if indext = 'gist' then
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using gist('||quote_ident(colname)||')';
-      else
-        query = 'create  index '||_pgr_quote_ident(tname||'_'||colname||'_idx')||'
-                         on '||tabname||' using btree('||quote_ident(colname)||')';
-      end if;
-      perform _pgr_msg(msgKind, fnName, 'Adding index ' || tabname || '_' ||  colname || '_idx');
-      perform _pgr_msg(msgKind, fnName, ' Using ' ||  query);
-      set client_min_messages  to warning;
-      BEGIN
-        execute query;
-        EXCEPTION WHEN others THEN
-          perform _pgr_onError( true, reportErrs, fnName,
-            'Could not create index on:' || colname, SQLERRM);
-      END;
-      execute 'set client_min_messages  to '|| debuglevel;
-      perform _pgr_msg(msgKind, fnName);
-    END IF;
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION _pgr_createIndex(tabname text, colname text, indext text,
-    IN reportErrs int default 1, IN fnName text default '_pgr_createIndex')
-RETURNS void AS
-$BODY$
-DECLARE
-    naming record;
-    sname text;
-    tname text;
-
-BEGIN
-    select * from _pgr_getTableName(tabname, 2, fnName)  into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    execute _pgr_createIndex(sname, tname, colname, indext, reportErrs, fnName);
-END;
-
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pointToId(
-    point geometry,
-    tolerance double precision,
-    vertname text,
-    srid integer)
-
-  RETURNS bigint AS
-$BODY$
-DECLARE
-    rec record;
-    pid bigint;
-
-BEGIN
-    EXECUTE 'SELECT ST_Distance(
-        the_geom,
-        ST_GeomFromText(ST_AsText('
-                || quote_literal(point::text)
-                || '),'
-            || srid ||')) AS d, id, the_geom
-    FROM '||_pgr_quote_ident(vertname)||'
-    WHERE ST_DWithin(
-        the_geom,
-        ST_GeomFromText(
-            ST_AsText(' || quote_literal(point::text) ||'),
-            ' || srid || '),' || tolerance||')
-    ORDER BY d
-    LIMIT 1' INTO rec ;
-    IF rec.id IS NOT NULL THEN
-        pid := rec.id;
-    ELSE
-        execute 'INSERT INTO '||_pgr_quote_ident(vertname)||' (the_geom) VALUES ('||quote_literal(point::text)||')';
-        pid := lastval();
-END IF;
-
-RETURN pid;
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'many_to_many_dijkstra'
-LANGUAGE c VOLATILE;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3 signature 1 to 1
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer, OUT path_seq integer,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost float,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, false, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstra(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstra(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstra(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstra(Many to Many)';
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- COMMENTS
-
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(One to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, BIGINT, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(One to Many)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, BIGINT, BOOLEAN) IS 'pgr_dijkstraCost(Many to One)';
-COMMENT ON FUNCTION  pgr_dijkstraCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN) IS 'pgr_dijkstraCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraVia(
-    edges_sql TEXT,
-    via_vertices ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    strict BOOLEAN DEFAULT FALSE,
-    U_turn_on_edge BOOLEAN DEFAULT TRUE,
-
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'dijkstraVia'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_johnson(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'johnson'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_floydWarshall(edges_sql TEXT, directed BOOLEAN DEFAULT TRUE,
-  OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'floydWarshall'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-    normal BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'astarManyToMany'
-LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, normal:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_astar(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_astar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(One to Many)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to One)';
-COMMENT ON FUNCTION pgr_astar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_astar(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true, normal:=false) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-CREATE OR REPLACE FUNCTION pgr_aStarCost(
-    edges_sql TEXT, -- XY edges sql
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_aStar(_pgr_get_statement($1), $2::BIGINT[],  $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a
-    ORDER BY  a.start_vid, a.end_vid;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(One to Many)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to One)';
-COMMENT ON FUNCTION pgr_aStarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, FLOAT, FLOAT) IS 'pgr_aStarCost(Many to Many)';
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid ANYARRAY,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-    equicost BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'many_withPointsDD'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsDD(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    distance FLOAT,
-
-    directed BOOLEAN DEFAULT TRUE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_withPointsDD($1, $2, ARRAY[$3]::BIGINT[], $4, $5, $6, $7, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vids anyarray,
-    distance FLOAT,
-    directed BOOLEAN DEFAULT TRUE,
-    equicost BOOLEAN DEFAULT FALSE,
-    OUT seq integer,
-    OUT from_v  bigint,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-     '$libdir/libpgrouting-2.5', 'driving_many_to_dist'
- LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(
-    edges_sql text,
-    start_vid bigint,
-    distance FLOAT8,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq integer,
-    OUT node bigint,
-    OUT edge bigint,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false) a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer, directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'kshortest_path'
-    LANGUAGE c STABLE STRICT;
-
--- V2 the graph is directed and there are no heap paths
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid integer, end_vid integer, k integer, has_rcost boolean)
-  RETURNS SETOF pgr_costresult3 AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated signature of pgr_ksp';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql::text, false);
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_rcost) THEN
-           -- user says that it has reverse_cost but its not true
-           RAISE EXCEPTION 'has_reverse_cost set to true but reverse_cost not found';
-         ELSE
-           -- user says that it does not have reverse_cost but it does have it
-           -- to ignore we remove reverse_cost from the query
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         END IF;
-      END IF;
-
-      RETURN query SELECT ((row_number() over()) -1)::integer  AS seq,  (path_id - 1)::integer AS id1, node::integer AS id2, edge::integer AS id3, cost
-            FROM _pgr_ksp(sql::text, start_vid, end_vid, k, TRUE, FALSE) WHERE path_id <= k;
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_ksp(edges_sql text, start_vid bigint, end_vid bigint, k integer,
-  directed boolean default true, heap_paths boolean default false,
-  --directed boolean, heap_paths boolean,
-  OUT seq integer, OUT path_id integer, OUT path_seq integer, OUT node bigint, OUT edge bigint, OUT cost float, OUT agg_cost float)
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  BEGIN
-         RETURN query SELECT *
-                FROM _pgr_ksp(edges_sql::text, start_vid, end_vid, k, directed, heap_paths);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsKSP(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    k INTEGER,
-
-    directed BOOLEAN DEFAULT TRUE,
-    heap_paths BOOLEAN DEFAULT FALSE,
-    driving_side CHAR DEFAULT 'b',
-    details BOOLEAN DEFAULT FALSE,
-
-    OUT seq INTEGER, OUT path_id INTEGER, OUT path_seq INTEGER,
-    OUT node BIGINT, OUT edge BIGINT,
-    OUT cost FLOAT, OUT agg_cost FLOAT)
-  RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'withPoints_ksp'
-    LANGUAGE c STABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_unnest_matrix(matrix float8[][], OUT start_vid integer, OUT end_vid integer, out agg_cost float8)
-RETURNS SETOF record AS
-
-$body$
-DECLARE
-
-m float8[];
-
-BEGIN
-    start_vid = 1;
-    foreach m slice 1 in  ARRAY matrix
-    LOOP
-        end_vid = 1;
-        foreach agg_cost in  ARRAY m
-        LOOP
-            RETURN next;
-            end_vid = end_vid + 1;
-        END LOOP;
-        start_vid = start_vid + 1;
-    END LOOP;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_tsp(
-    matrix float8[][],
-    startpt INTEGER,
-    endpt INTEGER DEFAULT -1,
-    OUT seq INTEGER,
-    OUT id INTEGER)
-RETURNS SETOF record AS
-$body$
-DECLARE
-table_sql TEXT;
-debuglevel TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(float8[][], integer, integer)';
-
-    CREATE TEMP TABLE ___tmp2 ON COMMIT DROP AS SELECT * FROM _pgr_unnest_matrix( matrix );
-
-
-    startpt := startpt + 1;
-    IF endpt = -1 THEN endpt := startpt;
-    END IF;
-
-
-    RETURN QUERY
-    WITH
-    result AS (
-        SELECT * FROM pgr_TSP(
-        $$SELECT * FROM ___tmp2 $$,
-        startpt, endpt,
-
-        tries_per_temperature :=  500 :: INTEGER,
-        max_changes_per_temperature := 30 :: INTEGER,
-        max_consecutive_non_changes := 500 :: INTEGER,
-
-        randomize:=false)
-    )
-    SELECT (row_number() over(ORDER BY result.seq) - 1)::INTEGER AS seq, (result.node - 1)::INTEGER AS id
-
-    FROM result WHERE NOT(result.node = startpt AND result.seq != 1);
-
-    DROP TABLE ___tmp2;
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-
-
-CREATE OR  REPLACE FUNCTION pgr_tsp(sql text, start_id INTEGER, end_id INTEGER default (-1))
-returns setof pgr_costResult as
-$body$
-DECLARE
-table_sql TEXT;
-rec RECORD;
-debuglevel TEXT;
-n BIGINT;
-
-BEGIN
-    RAISE NOTICE 'Deprecated Signature pgr_tsp(sql, integer, integer)';
-
-    table_sql := 'CREATE TEMP TABLE ___tmp ON COMMIT DROP AS ' || sql ;
-    EXECUTE table_sql;
-
-
-    BEGIN
-        EXECUTE 'SELECT id, x, y FROM ___tmp' INTO rec;
-        EXCEPTION
-            WHEN OTHERS THEN
-                RAISE EXCEPTION 'An expected column was not found in the query'
-                USING ERRCODE = 'XX000',
-                HINT = 'Please verify the column names: id, x, y';
-    END;
-
-    EXECUTE
-    'SELECT
-        pg_typeof(id)::text as id_type,
-        pg_typeof(x)::text as x_type,
-        pg_typeof(y)::text as y_type FROM ___tmp' INTO rec;
-
-
-    IF NOT((rec.id_type in ('integer'::text))
-        AND (rec.x_type = 'double precision'::text)
-        AND (rec.y_type = 'double precision'::text)) THEN
-            RAISE EXCEPTION '''id'' must be of type INTEGER, ''x'' ad ''y'' must be of type FLOAT'
-            USING ERRCODE = 'XX000';
-    END IF;
-
-    EXECUTE 'SELECT count(*) AS n FROM (' || sql || ') AS __a__' INTO rec;
-    n = rec.n;
-
-    RETURN query
-        SELECT (seq - 1)::INTEGER AS seq, node::INTEGER AS id1, node::INTEGER AS id2, cost
-        FROM pgr_eucledianTSP(sql, start_id, end_id,
-
-            tries_per_temperature :=  500 * n :: INTEGER,
-            max_changes_per_temperature := 60 * n :: INTEGER,
-            max_consecutive_non_changes := 500 * n :: INTEGER,
-
-            randomize := false) WHERE seq <= n;
-    DROP TABLE ___tmp;
-
-END;
-$body$
-language plpgsql volatile cost 500 ROWS 50;
-
-
-
-
-create or replace function _pgr_makeDistanceMatrix(sqlin text, OUT dmatrix double precision[], OUT ids integer[])
-  as
-$body$
-declare
-    sql text;
-    r record;
-
-begin
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    sql := 'with nodes as (' || sqlin || ')
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j, st_distance(st_makepoint(a.x, a.y), st_makepoint(b.x, b.y)) as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i';
-
-    for r in execute sql loop
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-
-end;
-$body$
-language plpgsql stable cost 10;
-
-
-CREATE OR REPLACE FUNCTION pgr_TSP(
-    matrix_row_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq INTEGER,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'newTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_eucledianTSP(
-    coordinates_sql TEXT,
-    start_id BIGINT DEFAULT 0,
-    end_id BIGINT DEFAULT 0,
-
-    max_processing_time FLOAT DEFAULT '+infinity'::FLOAT,
-
-    tries_per_temperature INTEGER DEFAULT 500,
-    max_changes_per_temperature INTEGER DEFAULT 60,
-    max_consecutive_non_changes INTEGER DEFAULT 100,
-
-    initial_temperature FLOAT DEFAULT 100,
-    final_temperature FLOAT DEFAULT 0.1,
-    cooling_factor FLOAT DEFAULT 0.9,
-
-    randomize BOOLEAN DEFAULT true,
-
-    OUT seq integer,
-    OUT node BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF record
-AS '$libdir/libpgrouting-2.5', 'eucledianTSP'
-LANGUAGE c VOLATILE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_alphashape(sql text, alpha float8 DEFAULT 0, OUT x float8, OUT y float8)
-    RETURNS SETOF record
-    AS '$libdir/libpgrouting-2.5', 'alphashape'
-    LANGUAGE c VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pointsAsPolygon(query varchar, alpha float8 DEFAULT 0)
-	RETURNS geometry AS
-	$$
-	DECLARE
-		r record;
-		geoms geometry[];
-		vertex_result record;
-		i int;
-		n int;
-		spos int;
-		q text;
-		x float8[];
-		y float8[];
-
-	BEGIN
-		geoms := array[]::geometry[];
-		i := 1;
-
-		FOR vertex_result IN EXECUTE 'SELECT x, y FROM pgr_alphashape('''|| query || ''', ' || alpha || ')'
-		LOOP
-			x[i] = vertex_result.x;
-			y[i] = vertex_result.y;
-			i := i+1;
-		END LOOP;
-
-		n := i;
-		IF n = 1 THEN
-			RAISE NOTICE 'n = 1';
-			RETURN NULL;
-		END IF;
-
-		spos := 1;
-		q := 'SELECT ST_GeometryFromText(''POLYGON((';
-		FOR i IN 1..n LOOP
-			IF x[i] IS NULL AND y[i] IS NULL THEN
-				q := q || ', ' || x[spos] || ' ' || y[spos] || '))'',0) AS geom;';
-				EXECUTE q INTO r;
-				geoms := geoms || array[r.geom];
-				q := '';
-			ELSE
-				IF q = '' THEN
-					spos := i;
-					q := 'SELECT ST_GeometryFromText(''POLYGON((';
-				END IF;
-				IF i = spos THEN
-					q := q || x[spos] || ' ' || y[spos];
-				ELSE
-					q := q || ', ' || x[i] || ' ' || y[i];
-				END IF;
-			END IF;
-		END LOOP;
-
-		RETURN ST_BuildArea(ST_Collect(geoms));
-	END;
-	$$
-	LANGUAGE 'plpgsql' VOLATILE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    only_cost BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-    '$libdir/libpgrouting-2.5', 'bd_astar'
-LANGUAGE C VOLATILE;
-
-
-
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed:=true, only_cost:=false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- V3
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    BOOLEAN,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, false);
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstar(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstar(Many to Many)';
-
-
-
--- one to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- one to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to one
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- many to many
-CREATE OR REPLACE FUNCTION pgr_bdAstarCost(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], $4, $5, $6::FLOAT, $7::FLOAT, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- COMMENTS
-
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, BIGINT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(One to Many)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, BIGINT, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to One)';
-COMMENT ON FUNCTION pgr_bdAstarCost(TEXT, ANYARRAY, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCost(Many to Many)';
-
-
--- bdDijkstra MANY TO MANY
-CREATE OR REPLACE FUNCTION _pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    only_cost BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bdDijkstra'
-LANGUAGE c VOLATILE;
-
-
-
--- ONE TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], true, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- TODO directed BOOLEAN DEFAULT TRUE,  on version 3
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vid BIGINT,
-    directed BOOLEAN,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vid BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vid BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, false) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT *
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, false) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
--- ONE TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    BIGINT,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
--- MANY TO ONE
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4, true) as a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- MANY TO MANY
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCost(
-    edges_sql TEXT,
-    start_vids ANYARRAY,
-    end_vids ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], directed, true) as a;
-$BODY$
-LANGUAGE SQL VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_vid integer,
-    target_vid integer,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_vertex'
-LANGUAGE 'c' IMMUTABLE;
-
-CREATE OR REPLACE FUNCTION _pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult
-AS '$libdir/libpgrouting-2.5', 'turn_restrict_shortest_path_edge'
-LANGUAGE 'c' IMMUTABLE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || edges_sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        -- no restrictions then its a dijkstra
-        RETURN query SELECT a.seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_dijkstra(new_sql, start_vid, end_vid, directed) a;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, start_vid, end_vid, directed, has_rcost, restrictions_sql);
-    RETURN;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_trspViaVertices(
-    edges_sql TEXT,
-    via_vids ANYARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN,
-    restrictions_sql TEXT DEFAULT NULL)
-RETURNS SETOF pgr_costResult3 AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-
-    new_sql := edges_sql;
-    IF (has_reverse != has_rcost) THEN  -- user contradiction
-        IF (has_reverse) THEN  -- it has reverse_cost but user don't want it.
-            new_sql :=
-               'WITH old_sql AS (' || edges_sql || ')' ||
-                '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (restrictions_sql IS NULL OR length(restrictions_sql) = 0) THEN
-        RETURN query SELECT (row_number() over())::INTEGER, path_id:: INTEGER, node::INTEGER,
-            (CASE WHEN edge = -2 THEN -1 ELSE edge END)::INTEGER, cost
-            FROM pgr_dijkstraVia(new_sql, via_vids, directed, strict:=true) WHERE edge != -1;
-        RETURN;
-    END IF;
-
-
-    -- make the call without contradiction from part of the user
-    RETURN query SELECT * FROM _pgr_trspViaVertices(new_sql, via_vids::INTEGER[], directed, has_rcost, restrictions_sql);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_trsp(
-    sql text,
-    source_eid integer,
-    source_pos float8,
-    target_eid integer,
-    target_pos float8,
-    directed boolean,
-    has_reverse_cost boolean,
-    turn_restrict_sql text DEFAULT null)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-trsp_sql TEXT;
-BEGIN
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-
-    new_sql := sql;
-    IF (has_reverse != has_reverse_cost) THEN  -- user contradiction
-        IF (has_reverse) THEN
-            -- it has reverse_cost but user don't want it.
-            -- to be on the safe side because it reads the data wrong, sending only postitive values
-            new_sql :=
-            'WITH old_sql AS (' || sql || ')' ||
-            '   SELECT id, source, target, cost FROM old_sql';
-        ELSE -- it does not have reverse_cost but user wants it
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE := 'XX000';
-        END IF;
-    END IF;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) THEN
-        -- no restrictions then its a with points
-        RETURN query SELECT a.seq-1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-        FROM pgr_withpoints(new_sql,
-            '(SELECT 1 as pid, ' || source_eid || 'as edge_id, ' || source_pos || '::float8 as fraction)'
-            || ' UNION '
-            || '(SELECT 2, ' || target_eid || ', ' || target_pos || ')' ::TEXT,
-            -1, -2, directed) a;
-        -- WHERE node != -2;
-        RETURN;
-    END IF;
-
-    RETURN query SELECT * FROM _pgr_trsp(new_sql, source_eid, source_pos, target_eid, target_pos, directed, has_reverse_cost, turn_restrict_sql);
-    RETURN;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-create or replace function _pgr_trspViaVertices(sql text, vids integer[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    lrra boolean := false;
-    seq integer := 0;
-    seq2 integer := 0;
-
-begin
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(vids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from _pgr_trsp(sql, vids[i], vids[i+1], directed, has_rcost, turn_restrict_sql) as a loop
-            -- filter out the individual path ends except the last one
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --raise notice 'rr: %', rr;
-            if rr.id3 = -1 then
-                lrr := rr;
-                lrra := true;
-            else
-                seq := seq + 1;
-                rr.seq := seq;
-                return next rr;
-            end if;
-        end loop;
-    end loop;
-
-    if lrra then
-        seq := seq + 1;
-        lrr.seq := seq;
-        return next lrr;
-    end if;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-
-----------------------------------------------------------------------------------------------------------
-
-create or replace function pgr_trspViaEdges(sql text, eids integer[], pcts float8[], directed boolean, has_rcost boolean, turn_restrict_sql text DEFAULT NULL::text)
-    RETURNS SETOF pgr_costresult3 AS
-$body$
-
-declare
-    i integer;
-    rr pgr_costresult3;
-    lrr pgr_costresult3;
-    first boolean := true;
-    seq integer := 0;
-    seq2 integer :=0;
-    has_reverse BOOLEAN;
-    point_is_vertex BOOLEAN := false;
-    edges_sql TEXT;
-    f float;
-
-begin
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql := sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (NOT has_rcost) THEN
-            -- user does not want to use reverse cost column
-            edges_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    FOREACH f IN ARRAY pcts LOOP
-        IF f in (0,1) THEN
-           point_is_vertex := true;
-        END IF;
-    END LOOP;
-
-    IF (turn_restrict_sql IS NULL OR length(turn_restrict_sql) = 0) AND NOT point_is_vertex THEN
-        -- no restrictions then its a _pgr_withPointsVia
-        RETURN query SELECT a.seq::INTEGER, path_id::INTEGER AS id1, node::INTEGER AS id2, edge::INTEGER AS id3, cost
-        FROM _pgr_withPointsVia(edges_sql, eids, pcts, directed) a;
-        RETURN;
-    END IF;
-
-    if array_length(eids, 1) != array_length(pcts, 1) then
-        raise exception 'The length of arrays eids and pcts must be the same!';
-    end if;
-
-    -- loop through each pair of vids and compute the path
-    for i in 1 .. array_length(eids, 1)-1 loop
-        seq2 := seq2 + 1;
-        for rr in select a.seq, seq2 as id1, a.id1 as id2, a.id2 as id3, a.cost
-                    from pgr_trsp(edges_sql,
-                                  eids[i], pcts[i],
-                                  eids[i+1], pcts[i+1],
-                                  directed,
-                                  has_rcost,
-                                  turn_restrict_sql) as a loop
-            -- combine intermediate via costs when cost is split across
-            -- two parts of a segment because it stops it and
-            -- restarts the next leg also on it
-            -- we might not want to do this so we can know where the via points are in the path result
-            -- but this needs more thought
-            --
-            -- there are multiple condition we have to deal with
-            -- between the end of one leg and start of the next
-            -- 1. same vertex_id. edge_id=-1; drop record with edge_id=-1
-            -- means: path ends on vertex
-            -- NOTICE:  rr: (19,1,44570022,-1,0)
-            -- NOTICE:  rr: (0,2,44570022,1768045,2.89691196717448)
-            -- 2. vertex_id=-1; sum cost components
-            -- means: path end/starts with the segment
-            -- NOTICE:  rr: (11,2,44569628,1775909,9.32885885148532)
-            -- NOTICE:  rr: (0,3,-1,1775909,0.771386350984395)
-
-            --raise notice 'rr: %', rr;
-            if first then
-                lrr := rr;
-                first := false;
-            else
-                if lrr.id3 = -1 then
-                    lrr := rr;
-                elsif lrr.id3 = rr.id3 then
-                    lrr.cost := lrr.cost + rr.cost;
-                    if rr.id2 = -1 then
-                        rr.id2 := lrr.id2;
-                    end if;
-                else
-                    seq := seq + 1;
-                    lrr.seq := seq;
-                    return next lrr;
-                    lrr := rr;
-                end if;
-            end if;
-        end loop;
-    end loop;
-
-    seq := seq + 1;
-    lrr.seq := seq;
-    return next lrr;
-    return;
-end;
-$body$
-    language plpgsql stable
-    cost 100
-    rows 1000;
-
-
-
-----------------------------
---    MANY TO MANY
-----------------------------
-
-
-CREATE OR REPLACE FUNCTION _pgr_maxflow(
-    edges_sql TEXT,
-    sources ANYARRAY,
-    targets ANYARRAY,
-    algorithm INTEGER DEFAULT 1,
-    only_flow BOOLEAN DEFAULT false,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'max_flow_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-
-------------------------------------
--- 3 pgr_edmondsKarp
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_edmondsKarp(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 3);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 2 boykov_kolmogorov
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_boykovKolmogorov(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 2);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-------------------------------------
--- 1 pgr_pushRelabel
-------------------------------------
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    BIGINT,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_pushRelabel(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-        SELECT *
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], 1);
-  $BODY$
-  LANGUAGE sql VOLATILE;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT flow
-        FROM _pgr_maxflow(_pgr_get_statement($1), $2::BIGINT[], $3::BIGINT[], algorithm := 1, only_flow := true);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices BIGINT,
-    sink_vertices ANYARRAY
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, ARRAY[$2]::BIGINT[], $3::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_maxFlow(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices BIGINT
-    )
-  RETURNS BIGINT AS
-  $BODY$
-        SELECT *
-        FROM pgr_maxflow($1, $2::BIGINT[], ARRAY[$3]::BIGINT[]);
-  $BODY$
-  LANGUAGE SQL VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxCardinalityMatch(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'edge_disjoint_paths_many_to_many'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    bigint,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    bigint,
-    ANYARRAY,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.end_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), ARRAY[$2]::BIGINT[], $3::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_edgeDisjointPaths(
-    TEXT,
-    ANYARRAY,
-    BIGINT,
-    IN directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-    SELECT a.seq, a.path_id, a.path_seq, a.start_vid, a.node, a.edge, a.cost, a.agg_cost
-    FROM pgr_edgeDisjointPaths(_pgr_get_statement($1), $2::BIGINT[], ARRAY[$3]::BIGINT[], $4) AS a;
-  $BODY$
-LANGUAGE sql VOLATILE;
-
-
-CREATE OR REPLACE FUNCTION pgr_contractGraph(
-    edges_sql TEXT,
-    contraction_order BIGINT[],
-    max_cycles integer DEFAULT 1,
-    forbidden_vertices BIGINT[] DEFAULT ARRAY[]::BIGINT[],
-    directed BOOLEAN DEFAULT true,
-    OUT seq integer,
-    OUT type TEXT,
-    OUT id BIGINT,
-    OUT contracted_vertices BIGINT[],
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost float)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'contractGraph'
-    LANGUAGE c VOLATILE;
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliver(
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_cell_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliver'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_pickDeliverEuclidean (
-    TEXT, -- orders_sql
-    TEXT, -- vehicles_sql
-    factor FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-    initial_sol INTEGER DEFAULT 4,
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'pickDeliverEuclidean'
-    LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_vrpOneDepot(
-    TEXT, -- customers_sql
-    TEXT, -- vehicles_sql
-    TEXT, -- matrix_sql
-    INTEGER, -- depot_id
-
-    OUT seq INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT vehicle_id BIGINT,
-    OUT stop_seq INTEGER,
-    OUT stop_type INTEGER,
-    OUT stop_id BIGINT,
-    OUT order_id BIGINT,
-    OUT cargo FLOAT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-orders_sql TEXT;
-trucks_sql TEXT;
-matrix_sql TEXT;
-final_sql TEXT;
-BEGIN
-
-    orders_sql = $$WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    pickups AS (
-        SELECT id, x AS p_x, y AS p_y, open_time AS p_open, close_time AS p_close, service_time AS p_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vrp_orders.id AS id, order_unit AS demand, pickups.id AS p_node_id, p_x, p_y, p_open, p_close, p_service,
-    vrp_orders.id AS d_node_id, x AS d_x, y AS d_y, open_time AS d_open, close_time AS d_close, service_time AS d_service
-    FROM vrp_orders, pickups
-    WHERE vrp_orders.id != $$ || $4;
-
-
-    trucks_sql = $$ WITH
-    vrp_orders AS ($$ || $1 || $$ ),
-    vrp_vehicles AS ($$ || $2 || $$ ),
-    starts AS (
-        SELECT id AS start_node_id, x AS start_x, y AS start_y, open_time AS start_open, close_time AS start_close, service_time AS start_service
-        FROM vrp_orders
-        WHERE id = $$ || $4 || $$
-    )
-    SELECT vehicle_id AS id, capacity, starts.* FROM vrp_vehicles, starts;
-    $$;
-
-    final_sql = '
-    SELECT * FROM _pgr_pickDeliver(
-            $$' || orders_sql || '$$,
-            $$' || trucks_sql || '$$,
-            $$' || $3 || '$$,
-            max_cycles := 2,
-            initial_sol := 4 ); ';
-
-    RAISE DEBUG '%', orders_sql;
-    RAISE DEBUG '%', trucks_sql;
-    RAISE DEBUG '%', $3;
-    RAISE DEBUG '%', final_sql;
-
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
------------------------------------------------------------------------
--- Core function for vrp with sigle depot computation
--- See README for description
------------------------------------------------------------------------
---
---
-
-create or replace function pgr_vrpOneDepot(
-	order_sql text,
-	vehicle_sql text,
-	cost_sql text,
-	depot_id integer,
-
-	OUT oid integer,
-	OUT opos integer,
-	OUT vid integer,
-	OUT tarrival integer,
-	OUT tdepart integer)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT order_id::INTEGER, stop_seq::INTEGER, vehicle_id::INTEGER, arrival_time::INTEGER, departure_time::INTEGER
-    FROM _pgr_vrpOneDepot($1, $2,
-       '
-            SELECT src_id AS start_vid, dest_id AS end_vid, traveltime AS agg_cost FROM ('||$3||') AS a
-       ',
-        $4
-    ) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION _pgr_gsoc_vrppdtw(
-    customers_sql TEXT,
-    max_vehicles INTEGER,
-    capacity FLOAT,
-    speed FLOAT DEFAULT 1,
-    max_cycles INTEGER DEFAULT 10,
-
-    OUT seq INTEGER,
-    OUT vehicle_id INTEGER,
-    OUT vehicle_seq INTEGER,
-    OUT stop_id BIGINT,
-    OUT travel_time FLOAT,
-    OUT arrival_time FLOAT,
-    OUT wait_time FLOAT,
-    OUT service_time FLOAT,
-    OUT departure_time FLOAT
-)
-RETURNS SETOF RECORD AS
-$BODY$
-DECLARE
-    orders_sql TEXT;
-    vehicles_sql TEXT;
-    final_sql TEXT;
-BEGIN
-    orders_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        pickups AS (
-            SELECT id, demand, x as p_x, y as p_y, opentime as p_open, closetime as p_close, servicetime as p_service
-            FROM  customer_data WHERE pindex = 0 AND id != 0
-        ),
-        deliveries AS (
-            SELECT pindex AS id, x as d_x, y as d_y, opentime as d_open, closetime as d_close, servicetime as d_service
-            FROM  customer_data WHERE dindex = 0 AND id != 0
-        )
-        SELECT * FROM pickups JOIN deliveries USING(id) ORDER BY pickups.id
-    $$;
-
-    vehicles_sql = $$WITH
-        customer_data AS ($$ || customers_sql || $$ )
-        SELECT id, x AS start_x, y AS start_y,
-            opentime AS start_open, closetime AS start_close, $$ ||
-            capacity || $$ AS capacity, $$ || max_vehicles || $$ AS number, $$ || speed || $$ AS speed
-            FROM customer_data WHERE id = 0 LIMIT 1
-        $$;
---  seq | vehicle_id | vehicle_seq | stop_id | travel_time | arrival_time | wait_time | service_time | departure_time
-    final_sql = $$ WITH
-        customer_data AS ($$ || customers_sql || $$ ),
-        p_deliver AS (SELECT * FROM _pgr_pickDeliverEuclidean('$$ || orders_sql || $$',  '$$ || vehicles_sql || $$',  1, $$ || max_cycles || $$ )),
-        picks AS (SELECT p_deliver.*, pindex, dindex, id AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 2)),
-        delivers AS (SELECT p_deliver.*, pindex, dindex, dindex AS the_id FROM p_deliver JOIN customer_data ON (id = order_id AND stop_type = 3)),
-        depots AS (SELECT p_deliver.*, 0 as pindex, 0 as dindex, 0 AS the_id FROM p_deliver WHERE (stop_type IN (-1,1,6))),
-        the_union AS (SELECT * FROM picks UNION SELECT * FROM delivers UNION SELECT * from depots)
-
-        SELECT (row_number() over(ORDER BY a.seq))::INTEGER, vehicle_seq, a.stop_seq, the_id::BIGINT, a.travel_time, a.arrival_time, a.wait_time, a.service_time, a.departure_time
-        FROM (SELECT * FROM the_union) AS a ORDER BY a.seq
-        $$;
-    RETURN QUERY EXECUTE final_sql;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-CREATE OR REPLACE FUNCTION pgr_gsoc_vrppdtw(
-    sql text,
-    vehicle_num INTEGER,
-    capacity INTEGER
-)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-customers_sql TEXT;
-BEGIN
-    RETURN query
-         SELECT a.seq, vehicle_id::INTEGER AS id1, stop_id::INTEGER AS id2, departure_time AS cost
-        FROM _pgr_gsoc_vrppdtw($1, $2, $3, 1, 30) AS a WHERE vehicle_id NOT IN (-2);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION _pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN,
-    driving_side CHAR,
-    details BOOLEAN,
-
-    only_cost BOOLEAN DEFAULT false, -- gets path
-    normal BOOLEAN DEFAULT true, -- false for many to onu
-
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'withPoints'
-LANGUAGE c VOLATILE;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.seq, a.path_seq, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], ARRAY[$4]::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pid BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pid BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], ARRAY[$4]::bigint[], $5, $6, $7, FALSE, FALSE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_withPoints(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-    details BOOLEAN DEFAULT false,
-
-    OUT seq INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT)
-RETURNS SETOF RECORD AS
-$BODY$
-SELECT a.seq, a.path_seq, a.start_pid, a.end_pid, a.node, a.edge, a.cost, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::bigint[], $4::bigint[], $5, $6, $7) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    BIGINT,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT $3, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, ARRAY[$3]::BIGINT[], $4::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    BIGINT,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, $4, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], ARRAY[$4]::BIGINT[], $5, $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCost(
-    edges_sql TEXT,
-    points_sql TEXT,
-    start_pids ANYARRAY,
-    end_pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_pid BIGINT,
-    OUT end_pid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_pid, a.end_pid, a.agg_cost
-    FROM _pgr_withPoints(_pgr_get_statement($1), $2, $3::BIGINT[], $4::BIGINT[], $5,  $6, TRUE, TRUE) AS a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION  _pgr_withPointsVia(
-    sql text,
-    via_edges bigint[],
-    fraction float[],
-    directed BOOLEAN DEFAULT TRUE,
-
-    OUT seq INTEGER,
-    OUT path_id INTEGER,
-    OUT path_seq INTEGER,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT node BIGINT,
-    OUT edge BIGINT,
-    OUT cost FLOAT,
-    OUT agg_cost FLOAT,
-    OUT route_agg_cost FLOAT)
-
-  RETURNS SETOF RECORD AS
-  $BODY$
-  DECLARE
-  has_rcost boolean;
-  sql_new_vertices text := ' ';
-  sql_on_vertex text;
-  v_union text := ' ';
-  dummyrec record;
-  rec1 record;
-  via_vertices int[];
-  sql_safe text;
-  new_edges text;
-  BEGIN
-     BEGIN
-        sql_safe = 'SELECT id, source, target, cost, reverse_cost FROM ('|| sql || ') AS __a';
-
-        EXECUTE 'select reverse_cost, pg_typeof(reverse_cost)::text as rev_type  from ('||sql_safe||' ) AS __b__ limit 1 ' INTO rec1;
-        has_rcost := true;
-        EXCEPTION
-          WHEN OTHERS THEN
-            has_rcost = false;
-     END;
-
-
-      IF array_length(via_edges, 1) != array_length(fraction, 1) then
-        RAISE EXCEPTION 'The length of via_edges is different of length of via_edges';
-      END IF;
-
-      FOR i IN 1 .. array_length(via_edges, 1)
-      LOOP
-          IF fraction[i] = 0 THEN
-              sql_on_vertex := 'SELECT source FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.source;
-          ELSE IF fraction[i] = 1 THEN
-              sql_on_vertex := 'SELECT target FROM ('|| sql || ') __a where id = ' || via_edges[i];
-              EXECUTE sql_on_vertex into dummyrec;
-              via_vertices[i] = dummyrec.target;
-          ELSE
-              via_vertices[i] = -i;
-              IF has_rcost THEN
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost,
-                              reverse_cost * (1 - ' || fraction[i] || ')  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost,
-                              reverse_cost *  ' || fraction[i] || '  AS reverse_cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' where id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               ELSE
-                   sql_new_vertices = sql_new_vertices || v_union ||
-                          '(SELECT id, source, ' ||  -i || ' AS target, cost * ' || fraction[i] || ' AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')
-                             UNION
-                          (SELECT id, ' ||  -i || ' AS source, target, cost * (1 -' || fraction[i] || ') AS cost
-                          FROM (SELECT * FROM (' || sql || ') __b' || i || ' WHERE id = ' || via_edges[i] || ') __a' || i ||')';
-                      v_union = ' UNION ';
-               END IF;
-          END IF;
-          END IF;
-     END LOOP;
-
-     IF sql_new_vertices = ' ' THEN
-         new_edges := sql;
-     ELSE
-         IF has_rcost THEN
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost,
-                         lead(cost) OVER w  - cost AS reverse_cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL),
-                   second_part AS ( SELECT * FROM (SELECT id, lead(source) OVER w  AS source, source as target,
-                         reverse_cost - lead(reverse_cost) OVER w  AS cost,
-                         reverse_cost - lead(reverse_cost) OVER w  AS reverse_cost
-                      FROM  the_union  WHERE target > 0 and reverse_cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY reverse_cost ASC) ) as n2
-                      WHERE source IS NOT NULL),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part)
-                             UNION
-                       (SELECT * FROM second_part) ) _union )
-                  SELECT *  FROM more_union';
-         ELSE
-            new_edges:= 'WITH
-                   original AS ( ' || sql || '),
-                   the_union AS ( ' || sql_new_vertices || '),
-                   first_part AS ( SELECT * FROM (SELECT id, target AS source,  lead(target) OVER w  AS target,
-                         lead(cost) OVER w  - cost AS cost
-                      FROM  the_union  WHERE source > 0 AND cost > 0
-                      WINDOW w AS (PARTITION BY id  ORDER BY cost ASC) ) as n2
-                      WHERE target IS NOT NULL ),
-                   more_union AS ( SELECT * from (
-                       (SELECT * FROM original)
-                             UNION
-                       (SELECT * FROM the_union)
-                             UNION
-                       (SELECT * FROM first_part) ) _union )
-                  SELECT *  FROM more_union';
-          END IF;
-      END IF;
-
- -- raise notice '%', new_edges;
-     sql_new_vertices := sql_new_vertices || v_union || ' (' || sql || ')';
-     RETURN query SELECT *
-         FROM pgr_dijkstraVia(new_edges, via_vertices, directed, has_rcost);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_lineGraph(
-    TEXT, -- edges_sql
-    directed BOOLEAN DEFAULT true,
-    OUT seq INTEGER,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT cost FLOAT,
-    OUT reverse_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'lineGraph'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-CREATE OR REPLACE FUNCTION pgr_connectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'connectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_strongComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the node in the component
-    OUT n_seq INTEGER,          -- nth_seq of the node in the component
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'strongComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_biconnectedComponents(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT component BIGINT,       -- the lowest number of the edge in the component
-    OUT n_seq INTEGER,          -- nth_seq of the edge in the component
-    OUT edge BIGINT)            -- the number of the edge
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'biconnectedComponents'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_articulationPoints(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT node BIGINT)            -- the number of the node
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'articulationPoints'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_bridges(
-    TEXT,                       -- edges_sql
-        OUT seq INTEGER,        -- seq
-    OUT edge BIGINT)            -- the number of the edge 
-
-RETURNS SETOF RECORD AS
-'$libdir/libpgrouting-2.5', 'bridges'
-LANGUAGE c IMMUTABLE STRICT;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createtopology(edge_table text, tolerance double precision,
-		   the_geom text default 'the_geom', id text default 'id',
-		   source text default 'source', target text default 'target',rows_where text default 'true',
-		   clean boolean default FALSE)
-RETURNS VARCHAR AS
-$BODY$
-
-DECLARE
-    points record;
-    sridinfo record;
-    source_id bigint;
-    target_id bigint;
-    totcount bigint;
-    rowcount bigint;
-    srid integer;
-    sql text;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    notincluded integer;
-    i integer;
-    naming record;
-    info record;
-    flag boolean;
-    query text;
-    idtype text;
-    gtype text;
-    sourcetype text;
-    targettype text;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-    msgKind int;
-    emptied BOOLEAN;
-
-BEGIN
-    msgKind = 1; -- notice
-    fnName = 'pgr_createTopology';
-    raise notice 'PROCESSING:';
-    raise notice 'pgr_createTopology(''%'', %, ''%'', ''%'', ''%'', ''%'', rows_where := ''%'', clean := %)',edge_table,tolerance,the_geom,id,source,target,rows_where, clean;
-    execute 'show client_min_messages' into debuglevel;
-
-
-    raise notice 'Performing checks, please wait .....';
-
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-        sname=naming.sname;
-        tname=naming.tname;
-        tabname=sname||'.'||tname;
-        vname=tname||'_vertices_pgr';
-        vertname= sname||'.'||vname;
-        rows_where = ' AND ('||rows_where||')';
-      raise DEBUG '     --> OK';
-
-
-      raise debug 'Checking column names in edge table';
-        select * into idname     from _pgr_getColumnName(sname, tname,id,2,fnName);
-        select * into sourcename from _pgr_getColumnName(sname, tname,source,2,fnName);
-        select * into targetname from _pgr_getColumnName(sname, tname,target,2,fnName);
-        select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2,fnName);
-
-
-        err = sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname;
-        perform _pgr_onError( err, 2, fnName,
-               'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-	       'Column names are OK');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking column types in edge table';
-        select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-        select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-        select * into idtype from _pgr_getColumnType(sname,tname,idname,1, fnName);
-
-        err = idtype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column id:'|| idname, ' Expected type of '|| idname || ' is integer,smallint or bigint but '||idtype||' was found');
-
-        err = sourcetype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column source:'|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-        err = targettype not in('integer','smallint','bigint');
-        perform _pgr_onError(err, 2, fnName,
-	       'Wrong type of Column target:'|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or bigint but '||targettype||' was found');
-
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         raise debug '%',query;
-         EXECUTE query INTO sridinfo;
-
-         err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-         perform _pgr_onError(err, 2, fnName,
-	     'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-
-         srid := sridinfo.srid;
-      raise DEBUG '     --> OK';
-
-      raise debug 'Checking and creating indices in edge table';
-        perform _pgr_createIndex(sname, tname , idname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-        perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-
-        gname=quote_ident(gname);
-        idname=quote_ident(idname);
-        sourcename=quote_ident(sourcename);
-        targetname=quote_ident(targetname);
-      raise DEBUG '     --> OK';
-
-
-
-
-
-    BEGIN
-        -- issue #193 & issue #210 & #213
-        -- this sql is for trying out the where clause
-        -- the select * is to avoid any column name conflicts
-        -- limit 1, just try on first record
-        -- if the where clasuse is ill formed it will be caught in the exception
-        sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-        EXECUTE sql into dummyRec;
-        -- end
-
-        -- if above where clasue works this one should work
-        -- any error will be caught by the exception also
-        sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NOT NULL AND '||
-	    idname||' IS NOT NULL)=false '||rows_where;
-        EXECUTE SQL  into notincluded;
-
-        if clean then
-            raise debug 'Cleaning previous Topology ';
-               execute 'UPDATE ' || _pgr_quote_ident(tabname) ||
-               ' SET '||sourcename||' = NULL,'||targetname||' = NULL';
-        else
-            raise debug 'Creating topology for edges with non assigned topology';
-            if rows_where=' AND (true)' then
-                rows_where=  ' and ('||quote_ident(sourcename)||' is null or '||quote_ident(targetname)||' is  null)';
-            end if;
-        end if;
-        -- my thoery is that the select Count(*) will never go through here
-        EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-             RAISE NOTICE '%',sql;
-             RETURN 'FAIL';
-    END;
-
-    BEGIN
-         raise DEBUG 'initializing %',vertname;
-         execute 'select * from _pgr_getTableName('||quote_literal(vertname)
-                                                  || ',0,' || quote_literal(fnName) ||' )' into naming;
-         emptied = false;
-         set client_min_messages  to warning;
-         IF sname=naming.sname AND vname=naming.tname  THEN
-            if clean then
-                execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-                execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-                emptied = true;
-            end if;
-         ELSE -- table doesn't exist
-            execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-            emptied = true;
-         END IF;
-         IF (emptied) THEN
-             execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-	         quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-             perform _pgr_createIndex(vertname , 'the_geom'::text , 'gist'::text);
-         END IF;
-         execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id"}''::text[])' into naming;
-         execute 'set client_min_messages  to '|| debuglevel;
-         raise DEBUG  '  ------>OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-             RAISE NOTICE 'ERROR: something went wrong when initializing the verties table';
-             RETURN 'FAIL';
-    END;
-
-
-
-    raise notice 'Creating Topology, Please wait...';
-        rowcount := 0;
-        FOR points IN EXECUTE 'SELECT ' || idname || '::bigint AS id,'
-            || ' _pgr_StartPoint(' || gname || ') AS source,'
-            || ' _pgr_EndPoint('   || gname || ') AS target'
-            || ' FROM '  || _pgr_quote_ident(tabname)
-            || ' WHERE ' || gname || ' IS NOT NULL AND ' || idname||' IS NOT NULL '||rows_where
-        LOOP
-
-            rowcount := rowcount + 1;
-            IF rowcount % 1000 = 0 THEN
-                RAISE NOTICE '% edges processed', rowcount;
-            END IF;
-
-
-            source_id := _pgr_pointToId(points.source, tolerance,vertname,srid);
-            target_id := _pgr_pointToId(points.target, tolerance,vertname,srid);
-            BEGIN
-                sql := 'UPDATE ' || _pgr_quote_ident(tabname) ||
-                    ' SET '||sourcename||' = '|| source_id::text || ','||targetname||' = ' || target_id::text ||
-                    ' WHERE ' || idname || ' =  ' || points.id::text;
-
-                IF sql IS NULL THEN
-                    RAISE NOTICE 'WARNING: UPDATE % SET source = %, target = % WHERE % = % ', tabname, source_id::text, target_id::text, idname,  points.id::text;
-                ELSE
-                    EXECUTE sql;
-                END IF;
-                EXCEPTION WHEN OTHERS THEN
-                    RAISE NOTICE '%', SQLERRM;
-                    RAISE NOTICE '%',sql;
-                    RETURN 'FAIL';
-            end;
-        END LOOP;
-        raise notice '-------------> TOPOLOGY CREATED FOR  % edges', rowcount;
-        RAISE NOTICE 'Rows with NULL geometry or NULL id: %',notincluded;
-        Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname), _pgr_quote_ident(vertname);
-        raise notice '----------------------------------------------';
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-
-
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_createTopology(text, double precision,text,text,text,text,text,boolean)
-IS 'args: edge_table,tolerance, the_geom:=''the_geom'',source:=''source'', target:=''target'',rows_where:=''true'' - fills columns source and target in the geometry table and creates a vertices table for selected rows';
-
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzegraph(edge_table text,tolerance double precision,the_geom text default 'the_geom',id text default 'id',source text default 'source',target text default 'target',rows_where text default 'true')
-RETURNS character varying AS
-$BODY$
-
-DECLARE
-    points record;
-    seg record;
-    naming record;
-    sridinfo record;
-    srid integer;
-    ecnt integer;
-    vertname text;
-    sname text;
-    tname text;
-    vname text;
-    idname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    geotype text;
-    gname text;
-    tabName text;
-    flag boolean ;
-    query text;
-    selectionquery text;
-    i integer;
-    tot integer;
-    NumIsolated integer;
-    numdeadends integer;
-    numgaps integer;
-    NumCrossing integer;
-    numRings integer;
-    debuglevel text;
-
-
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeGraph(''%'',%,''%'',''%'',''%'',''%'',''%'')',edge_table,tolerance,the_geom,id,source,target,rows_where;
-  raise notice 'Performing checks, please wait ...';
-  execute 'show client_min_messages' into debuglevel;
-
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-    raise DEBUG '     --> OK';
-
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","cnt","chk"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET cnt=0 ,chk=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into idname     from _pgr_getColumnName(sname, tname,id,2);
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,idname,gname) or  targetname in (idname,gname) or idname=gname, 2,
-                       'pgr_analyzeGraph',  'Two columns share the same name', 'Parameter names for id,the_geom,source and target  must be different',
-                       'Column names are OK');
-
-        raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       'pgr_analyzeGraph',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-   BEGIN
-       raise debug 'Checking SRID of geometry column';
-         query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-            || ' FROM ' || _pgr_quote_ident(tabname)
-            || ' WHERE ' || quote_ident(gname)
-            || ' IS NOT NULL LIMIT 1';
-         EXECUTE QUERY INTO sridinfo;
-
-         perform _pgr_onError( sridinfo IS NULL OR sridinfo.srid IS NULL,2,
-                 'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname,
-                 'SRID of '||gname||' is '||sridinfo.srid);
-
-         IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-             RAISE NOTICE ' Can not determine the srid of the geometry "%" in table %', the_geom,tabname;
-             RETURN 'FAIL';
-         END IF;
-         srid := sridinfo.srid;
-         raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-             RAISE NOTICE 'Got %', SQLERRM;--issue 210,211,213
-             RAISE NOTICE 'ERROR: something went wrong when checking for SRID of % in table %', the_geom,tabname;
-             RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-       raise debug 'Checking  indices in edge table';
-       perform _pgr_createIndex(tabname , idname , 'btree');
-       perform _pgr_createIndex(tabname , sourcename , 'btree');
-       perform _pgr_createIndex(tabname , targetname , 'btree');
-       perform _pgr_createIndex(tabname , gname , 'gist');
-
-       gname=quote_ident(gname);
-       sourcename=quote_ident(sourcename);
-       targetname=quote_ident(targetname);
-       idname=quote_ident(idname);
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking indices';
-          RETURN 'FAIL';
-    END;
-
-
-    BEGIN
-        query='select count(*) from '||_pgr_quote_ident(tabname)||' where true  '||rows_where;
-        EXECUTE query into ecnt;
-        raise DEBUG '-->Rows Where condition: OK';
-        raise DEBUG '     --> OK';
-         EXCEPTION WHEN OTHERS THEN
-            RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-            RAISE NOTICE 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-            RAISE NOTICE '%',query;
-            RETURN 'FAIL';
-    END;
-
-    selectionquery ='with
-           selectedRows as( (select '||sourcename||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||')
-                           union
-                           (select '||targetname||' as id from '||_pgr_quote_ident(tabname)||' where true '||rows_where||'))';
-
-
-
-
-
-   BEGIN
-       RAISE NOTICE 'Analyzing for dead ends. Please wait...';
-       query= 'with countingsource as (select a.'||sourcename||' as id,count(*) as cnts
-               from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||sourcename||')
-                     ,countingtarget as (select a.'||targetname||' as id,count(*) as cntt
-                    from (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) a  group by a.'||targetname||')
-                   ,totalcount as (select id,case when cnts is null and cntt is null then 0
-                                                   when cnts is null then cntt
-                                                   when cntt is null then cnts
-                                                   else cnts+cntt end as totcnt
-                                   from ('||_pgr_quote_ident(vertname)||' as a left
-                                   join countingsource as t using(id) ) left join countingtarget using(id))
-               update '||_pgr_quote_ident(vertname)||' as a set cnt=totcnt from totalcount as b where a.id=b.id';
-       raise debug '%',query;
-       execute query;
-       query=selectionquery||'
-              SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE cnt=1 and id in (select id from selectedRows)';
-       raise debug '%',query;
-       execute query  INTO numdeadends;
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'Got %', SQLERRM;  --issue 210,211,213
-          RAISE NOTICE 'ERROR: something went wrong when analizing for dead ends';
-          RETURN 'FAIL';
-   END;
-
-
-
-    BEGIN
-          RAISE NOTICE 'Analyzing for gaps. Please wait...';
-          query = 'with
-                   buffer as (select id,st_buffer(the_geom,'||tolerance||') as buff from '||_pgr_quote_ident(vertname)||' where cnt=1)
-                   ,veryclose as (select b.id,st_crosses(a.'||gname||',b.buff) as flag
-                   from  (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' ) as a
-                   join buffer as b on (a.'||gname||'&&b.buff)
-                   where '||sourcename||'!=b.id and '||targetname||'!=b.id )
-                   update '||_pgr_quote_ident(vertname)||' set chk=1 where id in (select distinct id from veryclose where flag=true)';
-          raise debug '%' ,query;
-          execute query;
-          GET DIAGNOSTICS  numgaps= ROW_COUNT;
-          raise DEBUG '     --> OK';
-          EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for gaps';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for isolated edges. Please wait...';
-        query=selectionquery|| ' SELECT count(*) FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||' )  as a,
-                                                 '||_pgr_quote_ident(vertname)||' as b,
-                                                 '||_pgr_quote_ident(vertname)||' as c
-                            WHERE b.id in (select id from selectedRows) and a.'||sourcename||' =b.id
-                            AND b.cnt=1 AND a.'||targetname||' =c.id
-                            AND c.cnt=1';
-        raise debug '%' ,query;
-        execute query  INTO NumIsolated;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for isolated edges';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for ring geometries. Please wait...';
-        execute 'SELECT geometrytype('||gname||')  FROM '||_pgr_quote_ident(tabname) limit 1 into geotype;
-        IF (geotype='MULTILINESTRING') THEN
-            query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                 WHERE true  '||rows_where||' and st_isRing(st_linemerge('||gname||'))';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        ELSE query ='SELECT count(*)  FROM '||_pgr_quote_ident(tabname)||'
-                                  WHERE true  '||rows_where||' and st_isRing('||gname||')';
-            raise debug '%' ,query;
-            execute query  INTO numRings;
-        END IF;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for ring geometries';
-            RETURN 'FAIL';
-    END;
-
-    BEGIN
-        RAISE NOTICE 'Analyzing for intersections. Please wait...';
-        query = 'select count(*) from (select distinct case when a.'||idname||' < b.'||idname||' then a.'||idname||'
-                                                        else b.'||idname||' end,
-                                                   case when a.'||idname||' < b.'||idname||' then b.'||idname||'
-                                                        else a.'||idname||' end
-                                    FROM (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as a
-                                    JOIN (select * from '||_pgr_quote_ident(tabname)||' where true '||rows_where||') as b
-                                    ON (a.'|| gname||' && b.'||gname||')
-                                    WHERE a.'||idname||' != b.'||idname|| '
-                                        and (a.'||sourcename||' in (b.'||sourcename||',b.'||targetname||')
-                                              or a.'||targetname||' in (b.'||sourcename||',b.'||targetname||')) = false
-                                        and st_intersects(a.'||gname||', b.'||gname||')=true) as d ';
-        raise debug '%' ,query;
-        execute query  INTO numCrossing;
-        raise DEBUG '     --> OK';
-        EXCEPTION WHEN raise_exception THEN
-            RAISE NOTICE 'ERROR: something went wrong when Analyzing for intersections';
-            RETURN 'FAIL';
-    END;
-
-
-
-
-    RAISE NOTICE '            ANALYSIS RESULTS FOR SELECTED EDGES:';
-    RAISE NOTICE '                  Isolated segments: %', NumIsolated;
-    RAISE NOTICE '                          Dead ends: %', numdeadends;
-    RAISE NOTICE 'Potential gaps found near dead ends: %', numgaps;
-    RAISE NOTICE '             Intersections detected: %',numCrossing;
-    RAISE NOTICE '                    Ring geometries: %',numRings;
-
-
-    RETURN 'OK';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-COMMENT ON FUNCTION pgr_analyzeGraph(text,double precision,text,text,text,text,text) IS 'args: edge_table, tolerance,the_geom:=''the_geom'',id:=''id'',source column:=''source'', target column:=''target'' rows_where:=''true'' - creates a vertices table based on the geometry for selected rows';
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_analyzeOneway(
-   edge_table text,
-   s_in_rules TEXT[],
-   s_out_rules TEXT[],
-   t_in_rules TEXT[],
-   t_out_rules TEXT[],
-   two_way_if_null boolean default true,
-   oneway text default 'oneway',
-   source text default 'source',
-   target text default 'target')
-  RETURNS text AS
-$BODY$
-
-
-DECLARE
-    rule text;
-    ecnt integer;
-    instr text;
-    naming record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    owname text;
-    sourcename text;
-    targetname text;
-    sourcetype text;
-    targettype text;
-    vertname text;
-    debuglevel text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_analyzeOneway(''%'',''%'',''%'',''%'',''%'',''%'',''%'',''%'',%)',
-		edge_table, s_in_rules , s_out_rules, t_in_rules, t_out_rules, oneway, source ,target,two_way_if_null ;
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',2)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    raise DEBUG '     --> OK';
-    EXCEPTION WHEN raise_exception THEN
-      RAISE NOTICE 'ERROR: something went wrong checking the table name';
-      RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking Vertices table';
-       execute 'select * from  _pgr_checkVertTab('||quote_literal(vertname) ||', ''{"id","ein","eout"}''::text[])' into naming;
-       execute 'UPDATE '||_pgr_quote_ident(vertname)||' SET eout=0 ,ein=0';
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the vertices table';
-          RETURN 'FAIL';
-  END;
-
-
-  BEGIN
-       raise debug 'Checking column names in edge table';
-       select * into sourcename from _pgr_getColumnName(sname, tname,source,2);
-       select * into targetname from _pgr_getColumnName(sname, tname,target,2);
-       select * into owname from _pgr_getColumnName(sname, tname,oneway,2);
-
-
-       perform _pgr_onError( sourcename in (targetname,owname) or  targetname=owname, 2,
-                       '_pgr_createToplogy',  'Two columns share the same name', 'Parameter names for oneway,source and target  must be different',
-                       'Column names are OK');
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column names';
-          RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise debug 'Checking column types in edge table';
-       select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1);
-       select * into targettype from _pgr_getColumnType(sname,tname,targetname,1);
-
-
-       perform _pgr_onError(sourcetype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found',
-                       'Type of Column '|| sourcename || ' is ' || sourcetype);
-
-       perform _pgr_onError(targettype not in('integer','smallint','bigint') , 2,
-                       '_pgr_createTopology',  'Wrong type of Column '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found',
-                       'Type of Column '|| targetname || ' is ' || targettype);
-
-       raise DEBUG '     --> OK';
-       EXCEPTION WHEN raise_exception THEN
-          RAISE NOTICE 'ERROR: something went wrong checking the column types';
-          RETURN 'FAIL';
-   END;
-
-
-
-    RAISE NOTICE 'Analyzing graph for one way street errors.';
-
-    rule := CASE WHEN two_way_if_null
-            THEN owname || ' IS NULL OR '
-            ELSE '' END;
-
-    instr := '''' || array_to_string(s_in_rules, ''',''') || '''';
-       EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-      from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-     where a.id=b.'|| sourcename;
-
-    RAISE NOTICE 'Analysis 25%% complete ...';
-
-    instr := '''' || array_to_string(t_in_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set ein=coalesce(ein,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 50%% complete ...';
-
-    instr := '''' || array_to_string(s_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| sourcename ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| sourcename ||' ) b
-        where a.id=b.'|| sourcename;
-    RAISE NOTICE 'Analysis 75%% complete ...';
-
-    instr := '''' || array_to_string(t_out_rules, ''',''') || '''';
-    EXECUTE 'update '||_pgr_quote_ident(vertname)||' a set eout=coalesce(eout,0)+b.cnt
-        from (
-         select '|| targetname ||', count(*) as cnt
-           from '|| tabname ||'
-          where '|| rule || owname ||' in ('|| instr ||')
-          group by '|| targetname ||' ) b
-        where a.id=b.'|| targetname;
-
-    RAISE NOTICE 'Analysis 100%% complete ...';
-
-    EXECUTE 'SELECT count(*)  FROM '||_pgr_quote_ident(vertname)||' WHERE ein=0 or eout=0' INTO ecnt;
-
-    RAISE NOTICE 'Found % potential problems in directionality' ,ecnt;
-
-    RETURN 'OK';
-
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_analyzeOneway(text,TEXT[],TEXT[], TEXT[],TEXT[],boolean,text,text,text)
-IS 'args:edge_table , s_in_rules , s_out_rules, t_in_rules , t_out_rules, two_way_if_null:= true, oneway:=''oneway'',source:= ''source'',target:=''target'' - Analizes the directionality of the edges based on the rules';
-
-
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_createverticestable(
-   edge_table text,
-   the_geom text DEFAULT 'the_geom'::text,
-   source text DEFAULT 'source'::text,
-   target text DEFAULT 'target'::text,
-    rows_where text DEFAULT 'true'::text
-)
-  RETURNS text AS
-$BODY$
-DECLARE
-    naming record;
-    sridinfo record;
-    sname text;
-    tname text;
-    tabname text;
-    vname text;
-    vertname text;
-    gname text;
-    sourcename text;
-    targetname text;
-    query text;
-    ecnt bigint;
-    srid integer;
-    sourcetype text;
-    targettype text;
-    sql text;
-    totcount integer;
-    i integer;
-    notincluded integer;
-    included integer;
-    debuglevel text;
-    dummyRec text;
-    fnName text;
-    err bool;
-
-
-BEGIN
-  fnName = 'pgr_createVerticesTable';
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_createVerticesTable(''%'',''%'',''%'',''%'',''%'')',edge_table,the_geom,source,target,rows_where;
-  execute 'show client_min_messages' into debuglevel;
-
-  raise notice 'Performing checks, please wait .....';
-
-  RAISE DEBUG 'Checking % exists',edge_table;
-        execute 'select * from _pgr_getTableName('|| quote_literal(edge_table)
-                                                  || ',2,' || quote_literal(fnName) ||' )' into naming;
-
-    sname=naming.sname;
-    tname=naming.tname;
-    tabname=sname||'.'||tname;
-    vname=tname||'_vertices_pgr';
-    vertname= sname||'.'||vname;
-    rows_where = ' AND ('||rows_where||')';
-  raise debug '--> Edge table exists: OK';
-
-  raise debug 'Checking column names';
-    select * into sourcename from _pgr_getColumnName(sname, tname,source,2, fnName);
-    select * into targetname from _pgr_getColumnName(sname, tname,target,2, fnName);
-    select * into gname      from _pgr_getColumnName(sname, tname,the_geom,2, fnName);
-
-
-    err = sourcename in (targetname,gname) or  targetname=gname;
-    perform _pgr_onError(err, 2, fnName,
-        'Two columns share the same name', 'Parameter names for the_geom,source and target  must be different');
-  raise debug '--> Column names: OK';
-
-  raise debug 'Checking column types in edge table';
-    select * into sourcetype from _pgr_getColumnType(sname,tname,sourcename,1, fnName);
-    select * into targettype from _pgr_getColumnType(sname,tname,targetname,1, fnName);
-
-
-    err = sourcetype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column source: '|| sourcename, ' Expected type of '|| sourcename || ' is integer,smallint or bigint but '||sourcetype||' was found');
-
-    err = targettype not in('integer','smallint','bigint');
-    perform _pgr_onError(err, 2, fnName,
-        'Wrong type of Column target: '|| targetname, ' Expected type of '|| targetname || ' is integer,smallint or biginti but '||targettype||' was found');
-
-  raise debug '-->Column types:OK';
-
-  raise debug 'Checking SRID of geometry column';
-     query= 'SELECT ST_SRID(' || quote_ident(gname) || ') as srid '
-        || ' FROM ' || _pgr_quote_ident(tabname)
-        || ' WHERE ' || quote_ident(gname)
-        || ' IS NOT NULL LIMIT 1';
-     raise debug '%',query;
-     EXECUTE query INTO sridinfo;
-
-     err =  sridinfo IS NULL OR sridinfo.srid IS NULL;
-     perform _pgr_onError(err, 2, fnName,
-         'Can not determine the srid of the geometry '|| gname ||' in table '||tabname, 'Check the geometry of column '||gname);
-     srid := sridinfo.srid;
-  raise DEBUG '     --> OK';
-
-  raise debug 'Checking and creating Indices';
-     perform _pgr_createIndex(sname, tname , sourcename , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , targetname , 'btree'::text);
-     perform _pgr_createIndex(sname, tname , gname , 'gist'::text);
-  raise DEBUG '-->Check and create indices: OK';
-
-     gname=quote_ident(gname);
-     sourcename=quote_ident(sourcename);
-     targetname=quote_ident(targetname);
-
-
-  BEGIN
-  raise debug 'Checking Condition';
-    -- issue #193 & issue #210 & #213
-    -- this sql is for trying out the where clause
-    -- the select * is to avoid any column name conflicts
-    -- limit 1, just try on first record
-    -- if the where clasuse is ill formed it will be caught in the exception
-    sql = 'select * from '||_pgr_quote_ident(tabname)||' WHERE true'||rows_where ||' limit 1';
-    EXECUTE sql into dummyRec;
-    -- end
-
-    -- if above where clasue works this one should work
-    -- any error will be caught by the exception also
-    sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' WHERE (' || gname || ' IS NULL or '||
-		sourcename||' is null or '||targetname||' is null)=true '||rows_where;
-    raise debug '%',sql;
-    EXECUTE SQL  into notincluded;
-    EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Condition is not correct, please execute the following query to test your condition';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-
-
-
-  BEGIN
-     raise DEBUG 'initializing %',vertname;
-       execute 'select * from _pgr_getTableName('||quote_literal(vertname)||',0)' into naming;
-       IF sname=naming.sname  AND vname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(vertname)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(vname)||','||quote_literal('the_geom')||')';
-       ELSE
-           set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(vertname)||' (id bigserial PRIMARY KEY,cnt integer,chk integer,ein integer,eout integer)';
-       END IF;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(vname)||','||
-                quote_literal('the_geom')||','|| srid||', '||quote_literal('POINT')||', 2)';
-       execute 'CREATE INDEX '||quote_ident(vname||'_the_geom_idx')||' ON '||_pgr_quote_ident(vertname)||'  USING GIST (the_geom)';
-       execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-       EXCEPTION WHEN OTHERS THEN
-         RAISE NOTICE 'Got %', SQLERRM; -- issue 210,211
-         RAISE NOTICE 'ERROR: Initializing vertex table';
-         RAISE NOTICE '%',sql;
-         RETURN 'FAIL';
-  END;
-
-  BEGIN
-       raise notice 'Populating %, please wait...',vertname;
-       sql= 'with
-		lines as ((select distinct '||sourcename||' as id, _pgr_startpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-		                  ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||')
-			union (select distinct '||targetname||' as id,_pgr_endpoint(st_linemerge('||gname||')) as the_geom from '||_pgr_quote_ident(tabname)||
-			          ' where ('|| gname || ' IS NULL
-                                    or '||sourcename||' is null
-                                    or '||targetname||' is null)=false
-                                     '||rows_where||'))
-		,numberedLines as (select row_number() OVER (ORDER BY id) AS i,* from lines )
-		,maxid as (select id,max(i) as maxi from numberedLines group by id)
-		insert into '||_pgr_quote_ident(vertname)||'(id,the_geom)  (select id,the_geom  from numberedLines join maxid using(id) where i=maxi order by id)';
-       RAISE debug '%',sql;
-       execute sql;
-       GET DIAGNOSTICS totcount = ROW_COUNT;
-
-       sql = 'select count(*) from '||_pgr_quote_ident(tabname)||' a, '||_pgr_quote_ident(vertname)||' b
-            where '||sourcename||'=b.id and '|| targetname||' in (select id from '||_pgr_quote_ident(vertname)||')';
-       RAISE debug '%',sql;
-       execute sql into included;
-
-
-
-       execute 'select max(id) from '||_pgr_quote_ident(vertname) into ecnt;
-       execute 'SELECT setval('||quote_literal(vertname||'_id_seq')||','||coalesce(ecnt,1)||' , false)';
-       raise notice '  ----->   VERTICES TABLE CREATED WITH  % VERTICES', totcount;
-       raise notice '                                       FOR   %  EDGES', included+notincluded;
-       RAISE NOTICE '  Edges with NULL geometry,source or target: %',notincluded;
-       RAISE NOTICE '                            Edges processed: %',included;
-       Raise notice 'Vertices table for table % is: %',_pgr_quote_ident(tabname),_pgr_quote_ident(vertname);
-       raise notice '----------------------------------------------';
-    END;
-
-    RETURN 'OK';
- EXCEPTION WHEN OTHERS THEN
-   RAISE NOTICE 'Unexpected error %', SQLERRM; -- issue 210,211
-   RETURN 'FAIL';
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-COMMENT ON FUNCTION pgr_createVerticesTable(text,text,text,text,text)
-IS 'args: edge_table, the_geom:=''the_geom'',source:=''source'', target:=''target'' rows_where:=''true'' - creates a vertices table based on the source and target identifiers for selected rows';
-
-
-CREATE OR REPLACE FUNCTION pgr_nodeNetwork(edge_table text, tolerance double precision,
-			id text default 'id', the_geom text default 'the_geom', table_ending text default 'noded',
-            rows_where text DEFAULT ''::text, outall boolean DEFAULT false) RETURNS text AS
-$BODY$
-DECLARE
-	
-	p_num int := 0;
-	p_ret text := '';
-    pgis_ver_old boolean := _pgr_versionless(postgis_lib_version(), '2.1.0.0');
-    vst_line_substring text;
-    vst_line_locate_point text;
-    intab text;
-    outtab text;
-    n_pkey text;
-    n_geom text;
-    naming record;
-    sname text;
-    tname text;
-    outname text;
-    srid integer;
-    sridinfo record;
-    splits bigint;
-    touched bigint;
-    untouched bigint;
-    geomtype text;
-    debuglevel text;
-    rows_where text;
-
-
-BEGIN
-  raise notice 'PROCESSING:';
-  raise notice 'pgr_nodeNetwork(''%'', %, ''%'', ''%'', ''%'', ''%'',  %)',
-    edge_table, tolerance, id,  the_geom, table_ending, rows_where, outall;
-  raise notice 'Performing checks, please wait .....';
-  execute 'show client_min_messages' into debuglevel;
-
-  BEGIN
-    RAISE DEBUG 'Checking % exists',edge_table;
-    execute 'select * from _pgr_getTableName('||quote_literal(edge_table)||',0)' into naming;
-    sname=naming.sname;
-    tname=naming.tname;
-    IF sname IS NULL OR tname IS NULL THEN
-	RAISE NOTICE '-------> % not found',edge_table;
-        RETURN 'FAIL';
-    ELSE
-	RAISE DEBUG '  -----> OK';
-    END IF;
-
-    intab=sname||'.'||tname;
-    outname=tname||'_'||table_ending;
-    outtab= sname||'.'||outname;
-    rows_where = CASE WHEN length(rows_where) > 2 and not outall THEN ' AND (' || rows_where || ')' ELSE '' END;
-    rows_where = CASE WHEN length(rows_where) > 2 THEN ' WHERE (' || rows_where || ')' ELSE '' END;
-  END;
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',id,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(id)||')' INTO n_pkey;
-       IF n_pkey is NULL then
-          raise notice  'ERROR: id column "%"  not found in %',id,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-
-  BEGIN
-       raise DEBUG 'Checking id column "%" columns in  % ',the_geom,intab;
-       EXECUTE 'select _pgr_getColumnName('||quote_literal(intab)||','||quote_literal(the_geom)||')' INTO n_geom;
-       IF n_geom is NULL then
-          raise notice  'ERROR: the_geom  column "%"  not found in %',the_geom,intab;
-          RETURN 'FAIL';
-       END IF;
-  END;
-
-  IF n_pkey=n_geom THEN
-	raise notice  'ERROR: id and the_geom columns have the same name "%" in %',n_pkey,intab;
-        RETURN 'FAIL';
-  END IF;
-
-  BEGIN
-       	raise DEBUG 'Checking the SRID of the geometry "%"', n_geom;
-       	EXECUTE 'SELECT ST_SRID(' || quote_ident(n_geom) || ') as srid '
-          		|| ' FROM ' || _pgr_quote_ident(intab)
-          		|| ' WHERE ' || quote_ident(n_geom)
-          		|| ' IS NOT NULL LIMIT 1' INTO sridinfo;
-       	IF sridinfo IS NULL OR sridinfo.srid IS NULL THEN
-        	RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           	RETURN 'FAIL';
-       	END IF;
-       	srid := sridinfo.srid;
-       	raise DEBUG '  -----> SRID found %',srid;
-       	EXCEPTION WHEN OTHERS THEN
-           		RAISE NOTICE 'ERROR: Can not determine the srid of the geometry "%" in table %', n_geom,intab;
-           		RETURN 'FAIL';
-  END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_pkey,intab;
-      if (_pgr_isColumnIndexed(intab,n_pkey)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding  index "%_%_idx".',n_pkey,intab;
-
-	set client_min_messages  to warning;
-        execute 'create  index '||tname||'_'||n_pkey||'_idx on '||_pgr_quote_ident(intab)||' using btree('||quote_ident(n_pkey)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
-
-    BEGIN
-      RAISE DEBUG 'Checking "%" column in % is indexed',n_geom,intab;
-      if (_pgr_iscolumnindexed(intab,n_geom)) then
-	RAISE DEBUG '  ------>OK';
-      else
-        RAISE DEBUG ' ------> Adding unique index "%_%_gidx".',intab,n_geom;
-	set client_min_messages  to warning;
-        execute 'CREATE INDEX '
-            || quote_ident(tname || '_' || n_geom || '_gidx' )
-            || ' ON ' || _pgr_quote_ident(intab)
-            || ' USING gist (' || quote_ident(n_geom) || ')';
-	execute 'set client_min_messages  to '|| debuglevel;
-      END IF;
-    END;
----------------
-    BEGIN
-       raise DEBUG 'initializing %',outtab;
-       execute 'select * from _pgr_getTableName('||quote_literal(outtab)||',0)' into naming;
-       IF sname=naming.sname  AND outname=naming.tname  THEN
-           execute 'TRUNCATE TABLE '||_pgr_quote_ident(outtab)||' RESTART IDENTITY';
-           execute 'SELECT DROPGEOMETRYCOLUMN('||quote_literal(sname)||','||quote_literal(outname)||','||quote_literal(n_geom)||')';
-       ELSE
-	   set client_min_messages  to warning;
-       	   execute 'CREATE TABLE '||_pgr_quote_ident(outtab)||' (id bigserial PRIMARY KEY,old_id integer,sub_id integer,
-								source bigint,target bigint)';
-       END IF;
-       execute 'select geometrytype('||quote_ident(n_geom)||') from  '||_pgr_quote_ident(intab)||' limit 1' into geomtype;
-       execute 'select addGeometryColumn('||quote_literal(sname)||','||quote_literal(outname)||','||
-                quote_literal(n_geom)||','|| srid||', '||quote_literal(geomtype)||', 2)';
-       execute 'CREATE INDEX '||quote_ident(outname||'_'||n_geom||'_idx')||' ON '||_pgr_quote_ident(outtab)||'  USING GIST ('||quote_ident(n_geom)||')';
-	execute 'set client_min_messages  to '|| debuglevel;
-       raise DEBUG  '  ------>OK';
-    END;
-----------------
-
-
-  raise notice 'Processing, please wait .....';
-
-
-    if pgis_ver_old then
-        vst_line_substring    := 'st_line_substring';
-        vst_line_locate_point := 'st_line_locate_point';
-    else
-        vst_line_substring    := 'st_linesubstring';
-        vst_line_locate_point := 'st_linelocatepoint';
-    end if;
-
---    -- First creates temp table with intersection points
-    p_ret = 'create temp table intergeom on commit drop as (
-        select l1.' || quote_ident(n_pkey) || ' as l1id,
-               l2.' || quote_ident(n_pkey) || ' as l2id,
-	       l1.' || quote_ident(n_geom) || ' as line,
-	       _pgr_startpoint(l2.' || quote_ident(n_geom) || ') as source,
-	       _pgr_endpoint(l2.' || quote_ident(n_geom) || ') as target,
-               st_intersection(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ') as geom
-        from (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l1
-             join (SELECT * FROM ' || _pgr_quote_ident(intab) || rows_where || ') as l2
-             on (st_dwithin(l1.' || quote_ident(n_geom) || ', l2.' || quote_ident(n_geom) || ', ' || tolerance || '))'||
-        'where l1.' || quote_ident(n_pkey) || ' <> l2.' || quote_ident(n_pkey)||' and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_startpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_startpoint(l2.' || quote_ident(n_geom) || '))=false and
-	st_equals(_pgr_endpoint(l1.' || quote_ident(n_geom) || '),_pgr_endpoint(l2.' || quote_ident(n_geom) || '))=false  )';
-    raise debug '%',p_ret;
-    EXECUTE p_ret;
-
-    -- second temp table with locus (index of intersection point on the line)
-    -- to avoid updating the previous table
-    -- we keep only intersection points occurring onto the line, not at one of its ends
---    drop table if exists inter_loc;
-
---HAD TO CHANGE THIS QUERY
--- p_ret= 'create temp table inter_loc on commit drop as (
---        select l1id, l2id, ' || vst_line_locate_point || '(line,point) as locus from (
---        select DISTINCT l1id, l2id, line, (ST_DumpPoints(geom)).geom as point from intergeom) as foo
---        where ' || vst_line_locate_point || '(line,point)<>0 and ' || vst_line_locate_point || '(line,point)<>1)';
-    p_ret= 'create temp table inter_loc on commit drop as ( select * from (
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,source) as locus from intergeom)
-         union
-        (select l1id, l2id, ' || vst_line_locate_point || '(line,target) as locus from intergeom)) as foo
-        where locus<>0 and locus<>1)';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-
-    -- index on l1id
-    create index inter_loc_id_idx on inter_loc(l1id);
-
-    -- Then computes the intersection on the lines subset, which is much smaller than full set
-    -- as there are very few intersection points
-
---- outab needs to be formally created with id, old_id, subid,the_geom, source,target
----  so it can be inmediatly be used with createTopology
-
---   EXECUTE 'drop table if exists ' || _pgr_quote_ident(outtab);
---   EXECUTE 'create table ' || _pgr_quote_ident(outtab) || ' as
-     P_RET = 'insert into '||_pgr_quote_ident(outtab)||' (old_id,sub_id,'||quote_ident(n_geom)||') (  with cut_locations as (
-           select l1id as lid, locus
-           from inter_loc
-           -- then generates start and end locus for each line that have to be cut buy a location point
-           UNION ALL
-           select i.l1id  as lid, 0 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           UNION ALL
-           select i.l1id  as lid, 1 as locus
-           from inter_loc i left join ' || _pgr_quote_ident(intab) || ' b on (i.l1id = b.' || quote_ident(n_pkey) || ')
-           order by lid, locus
-       ),
-       -- we generate a row_number index column for each input line
-       -- to be able to self-join the table to cut a line between two consecutive locations
-       loc_with_idx as (
-           select lid, locus, row_number() over (partition by lid order by locus) as idx
-           from cut_locations
-       )
-       -- finally, each original line is cut with consecutive locations using linear referencing functions
-       select l.' || quote_ident(n_pkey) || ', loc1.idx as sub_id, ' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus) as ' || quote_ident(n_geom) || '
-       from loc_with_idx loc1 join loc_with_idx loc2 using (lid) join ' || _pgr_quote_ident(intab) || ' l on (l.' || quote_ident(n_pkey) || ' = loc1.lid)
-       where loc2.idx = loc1.idx+1
-           -- keeps only linestring geometries
-           and geometryType(' || vst_line_substring || '(l.' || quote_ident(n_geom) || ', loc1.locus, loc2.locus)) = ''LINESTRING'') ';
-    raise debug  '%',p_ret;
-    EXECUTE p_ret;
-	GET DIAGNOSTICS splits = ROW_COUNT;
-        execute 'with diff as (select distinct old_id from '||_pgr_quote_ident(outtab)||' )
-                 select count(*) from diff' into touched;
-	-- here, it misses all original line that did not need to be cut by intersection points: these lines
-	-- are already clean
-	-- inserts them in the final result: all lines which gid is not in the res table.
-	EXECUTE 'insert into ' || _pgr_quote_ident(outtab) || ' (old_id , sub_id, ' || quote_ident(n_geom) || ')
-                ( with used as (select distinct old_id from '|| _pgr_quote_ident(outtab)||')
-		select ' ||  quote_ident(n_pkey) || ', 1 as sub_id, ' ||  quote_ident(n_geom) ||
-		' from '|| _pgr_quote_ident(intab) ||' where  '||quote_ident(n_pkey)||' not in (select * from used)' || rows_where || ')';
-	GET DIAGNOSTICS untouched = ROW_COUNT;
-
-	raise NOTICE '  Split Edges: %', touched;
-	raise NOTICE ' Untouched Edges: %', untouched;
-	raise NOTICE '     Total original Edges: %', touched+untouched;
-        RAISE NOTICE ' Edges generated: %', splits;
-	raise NOTICE ' Untouched Edges: %',untouched;
-	raise NOTICE '       Total New segments: %', splits+untouched;
-        RAISE NOTICE ' New Table: %', outtab;
-        RAISE NOTICE '----------------------------------';
-
-    drop table  if exists intergeom;
-    drop table if exists inter_loc;
-    RETURN 'OK';
-END;
-$BODY$
-    LANGUAGE 'plpgsql' VOLATILE STRICT COST 100;
-
-
-COMMENT ON FUNCTION pgr_nodeNetwork(text, double precision, text, text, text, text, boolean )
- IS  'edge_table, tolerance, id:=''id'', the_geom:=''the_geom'', table_ending:=''noded'' ';
-
-
-CREATE OR REPLACE FUNCTION pgr_labelGraph(
-                edge_table text,
-                id text default 'id',
-                source text default 'source',
-                target text default 'target',
-                subgraph text default 'subgraph',
-                rows_where text default 'true'
-        )
-        RETURNS character varying AS
-$BODY$
-
-DECLARE
-        naming record;
-        schema_name text;
-        table_name text;
-        garbage text;
-        incre integer;
-        table_schema_name text;
-        query text;
-        ecnt integer;
-        sql1 text;
-        rec1 record;
-        sql2 text;
-        rec2 record;
-        rec_count record;
-        rec_single record;
-        graph_id integer;
-        gids int [];
-
-BEGIN
-        raise notice 'Processing:';
-        raise notice 'pgr_brokenGraph(''%'',''%'',''%'',''%'',''%'',''%'')', edge_table,id,source,target,subgraph,rows_where;
-        raise notice 'Performing initial checks, please hold on ...';
-
-        Raise Notice 'Starting - Checking table ...';
-        BEGIN
-                raise debug 'Checking % table existance', edge_table;
-                execute 'select * from pgr_getTableName('|| quote_literal(edge_table) ||')' into naming;
-                schema_name = naming.sname;
-                table_name = naming.tname;
-                table_schema_name = schema_name||'.'||table_name;
-                IF schema_name is null then
-                        raise notice 'no schema';
-                        return 'FAIL';
-                else
-                        if table_name is null then
-                                raise notice 'no table';
-                                return 'FAIL';
-                        end if;
-                end if;
-        END;
-        Raise Notice 'Ending - Checking table';
-
-        Raise Notice 'Starting - Checking columns';
-        BEGIN
-                raise debug 'Checking exitance of necessary columns inside % table', edge_table;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(id) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no id column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(source) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no source column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(target) ||')' into naming;
-                if naming.pgr_iscolumnintable = 'f' then
-                        raise notice 'no target column';
-                        return 'FAIL';
-                end if;
-                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(subgraph) ||')' into naming;
-                if naming.pgr_iscolumnintable = 't' then
-                        raise notice 'subgraph column already in the table';
-                        return 'FAIL';
-                end if;
-        END;
-        Raise Notice 'Ending - Checking columns';
-
-        Raise Notice 'Starting - Checking rows_where condition';
-        BEGIN
-                raise debug 'Checking rows_where condition';
-                query='select count(*) from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where;
-                execute query into ecnt;
-                raise debug '-->Rows where condition: OK';
-                raise debug '    --> OK';
-                EXCEPTION WHEN OTHERS THEN
-                        raise notice 'Got %', SQLERRM;
-                        Raise notice 'ERROR: Condition is not correct. Please execute the following query to test your condition';
-                        Raise notice '%', query;
-                        return 'FAIL';
-        END;
-        Raise Notice 'Ending - Checking rows_where condition';
-
-        garbage := 'garbage001';
-        incre := 1;
-        Raise Notice 'Starting - Checking temporary column';
-        Begin
-                raise debug 'Checking Checking temporary columns existance';
-
-                While True
-                        Loop
-                                execute 'select * from pgr_isColumnInTable('|| quote_literal(table_schema_name) ||', '|| quote_literal(garbage) ||')' into naming;
-                                If naming.pgr_iscolumnintable = 't' THEN
-                                        incre := incre + 1;
-                                        garbage := 'garbage00'||incre||'';
-                                ELSE
-                                        EXIT;
-                                END IF;
-                        End Loop;
-        End;
-        Raise Notice 'Ending - Checking temporary column';
-
-        Raise Notice 'Starting - Calculating subgraphs';
-        BEGIN
-                --------- Add necessary columns ----------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(subgraph) || ' INTEGER DEFAULT -1';
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' ADD COLUMN ' || pgr_quote_ident(garbage) || ' INTEGER DEFAULT 0';
-                graph_id := 1;
-
-                EXECUTE 'select count(*) as count from '|| pgr_quote_ident(table_schema_name) ||' where '|| rows_where ||'' into rec_count;
-                if rec_count.count = 0 then
-                        RETURN 'rows_where condition generated 0 rows';
-                end if;
-
-                WHILE TRUE
-                        LOOP
-                                ---------- Assign the very first -1 row graph_id ----------
-                                EXECUTE 'SELECT ' || pgr_quote_ident(id) || ' AS gid FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1 LIMIT 1' INTO rec_single;
-                                EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec_single.gid || '';
-
-                                --------- Search other rows with that particular graph_id -----------
-                                WHILE TRUE
-                                        LOOP
-                                                EXECUTE 'SELECT COUNT(*) FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0' into rec_count;
-                                                ----------- The following if else will check those rows which already have entertained ------------
-                                                IF (rec_count.count > 0) THEN
-                                                        sql1 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' AND ' || pgr_quote_ident(garbage) || ' = 0';
-                                                        FOR rec1 IN EXECUTE sql1
-                                                                LOOP
-                                                                        sql2 := 'SELECT ' || pgr_quote_ident(id) || ' AS gid, ' || pgr_quote_ident(source) || ' AS source, ' || pgr_quote_ident(target) || ' AS target FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| pgr_quote_ident(source) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.source ||' OR '|| pgr_quote_ident(source) ||' = '|| rec1.target ||' OR '|| pgr_quote_ident(target) ||' = '|| rec1.target ||'';
-                                                                        FOR rec2 IN EXECUTE sql2
-                                                                                LOOP
-                                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(subgraph) || ' = ' || graph_id || ' WHERE ' || pgr_quote_ident(id) || ' = ' || rec2.gid || '';
-                                                                                END LOOP;
-                                                                        EXECUTE 'UPDATE '|| pgr_quote_ident(table_schema_name) ||' SET ' || pgr_quote_ident(garbage) || ' = 1 WHERE ' || pgr_quote_ident(id) || ' = ' || rec1.gid || '';
-                                                                END LOOP;
-                                                ELSE
-                                                        EXIT;
-                                                END IF;
-                                        END LOOP;
-
-                                ------ Following is to exit the while loop. 0 means no more -1 id.
-                                EXECUTE 'SELECT COUNT(*) AS count FROM '|| pgr_quote_ident(table_schema_name) ||' WHERE '|| rows_where ||' AND ' || pgr_quote_ident(subgraph) || ' = -1' INTO rec_count;
-                                If (rec_count.count = 0) THEN
-                                        EXIT;
-                                ELSE
-                                        graph_id := graph_id + 1;
-                                END IF;
-                        END LOOP;
-
-                ----------- Drop garbage column ------------
-                EXECUTE 'ALTER TABLE '|| pgr_quote_ident(table_schema_name) ||' DROP COLUMN ' || pgr_quote_ident(garbage) ||'';
-                Raise Notice 'Successfully complicated calculating subgraphs';
-        END;
-        Raise Notice 'Ending - Calculating subgraphs';
-
-        RETURN 'OK';
-
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_withPointsCostMatrix(
-    edges_sql TEXT,
-    points_sql TEXT,
-    pids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    driving_side CHAR DEFAULT 'b', -- 'r'/'l'/'b'/NULL
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_pid, a.end_pid, a.agg_cost
-        FROM _pgr_withPoints($1, $2, $3, $3, $4,  $5, TRUE, TRUE) AS a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
---  DIJKSTRA DMatrix
-
-
-
-CREATE OR REPLACE FUNCTION pgr_dijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_dijkstra(_pgr_get_statement($1), $2, $2, $3, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-
---  BIDIRECTIONAL DIJKSTRA Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdDijkstraCostMatrix(edges_sql TEXT, vids ANYARRAY, directed BOOLEAN DEFAULT true,
-    OUT start_vid BIGINT, OUT end_vid BIGINT, OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdDijkstra(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_astarCostMatrix(
-    edges_sql TEXT, -- XY edges sql
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor FLOAT DEFAULT 1.0,
-    epsilon FLOAT DEFAULT 1.0,
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost FLOAT)
-
-RETURNS SETOF RECORD AS
-$BODY$
-BEGIN
-    RETURN query SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_astar(_pgr_get_statement($1), $2, $2, $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
---  BIDIRECTIONAL ASTAR Matrix
-
-
-CREATE OR REPLACE FUNCTION pgr_bdAstarCostMatrix(
-    edges_sql TEXT,
-    vids ANYARRAY,
-    directed BOOLEAN DEFAULT true,
-    heuristic INTEGER DEFAULT 5,
-    factor NUMERIC DEFAULT 1.0,
-    epsilon NUMERIC DEFAULT 1.0,
-
-    OUT start_vid BIGINT,
-    OUT end_vid BIGINT,
-    OUT agg_cost float)
-RETURNS SETOF RECORD AS
-$BODY$
-    SELECT a.start_vid, a.end_vid, a.agg_cost
-    FROM _pgr_bdAstar(_pgr_get_statement($1), $2::BIGINT[], $2::BIGINT[], $3, $4, $5::FLOAT, $6::FLOAT, true) a;
-$BODY$
-LANGUAGE sql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_bdAstarCostMatrix(TEXT, ANYARRAY, BOOLEAN, INTEGER, NUMERIC, NUMERIC) IS 'pgr_bdAstarCostMatrix';
-
-
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_getTableName(IN tab text,OUT sname text,OUT tname text)
-RETURNS RECORD AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getTableName: This function will no longer be soported';
-    select * from _pgr_getTableName(tab, 0, 'pgr_getTableName') into sname,tname;
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_getColumnName(tab text, col text)
-RETURNS text AS
-$BODY$
-BEGIN
-    raise notice 'pgr_getColumnName: This function will no longer be soported';
-    return _pgr_getColumnName(tab,col, 0, 'pgr_getColumnName');
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnInTable(tab text, col text)
-RETURNS boolean AS
-$BODY$
-DECLARE
-    cname text;
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    select * from _pgr_getColumnName(tab,col,0, 'pgr_isColumnInTable') into cname;
-    return  cname IS not NULL;
-END;
-$BODY$
-  LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_isColumnIndexed(tab text, col text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnIndexed: This function will no longer be soported';
-    return  _pgr_isColumnIndexed(tab,col);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-
-create or replace function pgr_quote_ident(idname text)
-returns text as
-$BODY$
-BEGIN
-    raise notice 'pgr_isColumnInTable: This function will no longer be soported';
-    return  _pgr_quote_ident(idname);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-CREATE OR REPLACE FUNCTION pgr_versionless(v1 text, v2 text)
-RETURNS boolean AS
-$BODY$
-BEGIN
-    raise notice 'pgr_versionless: This function will no longer be soported';
-    return  _pgr_versionless(v1,v2);
-END;
-$BODY$
-LANGUAGE plpgsql VOLATILE STRICT;
-
-create or replace function pgr_startPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_startPoint: This function will no longer be soported';
-    return  _pgr_startPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-create or replace function pgr_endPoint(g geometry)
-    returns geometry as
-$body$
-BEGIN
-    raise notice 'pgr_endPoint: This function will no longer be soported';
-    return  _pgr_endPoint(g);
-END;
-$body$
-language plpgsql IMMUTABLE;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspJohnson(edges_sql text)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_johnson instead';
-      has_reverse =_pgr_parameter_check('johnson', edges_sql, false);
-      sql = edges_sql;
-      IF (has_reverse) THEN
-           RAISE NOTICE 'reverse_cost column found, removing.';
-           sql = 'SELECT source, target, cost FROM (' || edges_sql || ') a';
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () - 1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_johnson(sql, TRUE);
-  END
-$BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
-CREATE OR REPLACE FUNCTION pgr_apspWarshall(edges_sql text, directed boolean, has_rcost boolean)
-    RETURNS SETOF pgr_costResult AS
-  $BODY$
-  DECLARE
-  has_reverse boolean;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function: Use pgr_floydWarshall instead';
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-      sql := edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-           sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-         ELSE raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query
-         SELECT (row_number() over () -1)::integer as seq, start_vid::integer AS id1, end_vid::integer AS id2, agg_cost AS cost
-         FROM  pgr_floydWarshall(sql, directed);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_astar(edges_sql TEXT, source_id INTEGER, target_id INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated signature pgr_astar(text, integer, integer, boolean, boolean)';
-    has_reverse =_pgr_parameter_check('astar', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost, x1,y1, x2, y2 FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq - 1 AS seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost
-    FROM pgr_astar(sql, ARRAY[$2], ARRAY[$3], directed);
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdAstar(
-    sql TEXT,
-    source_vid INTEGER,
-    target_vid INTEGER,
-    directed BOOLEAN,
-    has_reverse_cost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdAstar';
-    has_reverse =_pgr_parameter_check('astar', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdAstar(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_bdDijkstra(edges_sql TEXT, start_vid INTEGER, end_vid INTEGER, directed BOOLEAN, has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated Signature of pgr_bdDijkstra';
-    has_reverse =_pgr_parameter_check('dijkstra', $1, false);
-    new_sql = $1;
-    IF (has_reverse != $5) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || $1 || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_bdDijkstra(new_sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstraPath(
-    sql text,
-    source INTEGER,
-    targets INTEGER ARRAY,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-    RETURNS SETOF pgr_costResult3 AS
-    $BODY$
-    DECLARE
-    has_reverse BOOLEAN;
-    new_sql TEXT;
-    result pgr_costResult3;
-    tmp pgr_costResult3;
-    sseq INTEGER;
-    i INTEGER;
-    BEGIN
-        RAISE NOTICE 'Deprecated function: Use pgr_dijkstra instead.';
-        has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-        new_sql = sql;
-        IF (array_ndims(targets) != 1) THEN
-            raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-
-        IF (has_reverse != has_rcost) THEN
-            IF (has_reverse) THEN
-                new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-            ELSE
-                raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-                USING ERRCODE = 'XX000';
-            END IF;
-        END IF;
-        SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-        sseq = 0; i = 1;
-        FOR result IN
-            SELECT seq, a.end_vid::INTEGER AS id1, a.node::INTEGER AS i2, a.edge::INTEGER AS id3, cost
-            FROM pgr_dijkstra(new_sql, source, targets, directed) a ORDER BY a.end_vid, seq LOOP
-            WHILE (result.id1 != targets[i]) LOOP
-                tmp.seq = sseq;
-                tmp.id1 = targets[i];
-                IF (targets[i] = source) THEN
-                    tmp.id2 = source;
-                    tmp.cost =0;
-                ELSE
-                    tmp.id2 = 0;
-                    tmp.cost = -1;
-                END IF;
-                tmp.id3 = -1;
-                RETURN next tmp;
-                i = i + 1;
-                sseq = sseq + 1;
-            END LOOP;
-        IF (result.id1 = targets[i] AND result.id3 != -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-        IF (result.id1 = targets[i] AND result.id3 = -1) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-            CONTINUE;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.id2 = source;
-            tmp.cost = 0;
-        ELSE
-            tmp.id2 = 0;
-            tmp.cost = -1;
-        END IF;
-        tmp.id3 = -1;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-CREATE OR REPLACE FUNCTION pgr_kdijkstracost(
-    sql text,
-    source INTEGER,
-    targets INTEGER array,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costResult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-new_sql TEXT;
-result pgr_costResult;
-tmp pgr_costResult;
-sseq INTEGER;
-i INTEGER;
-BEGIN
-    RAISE NOTICE 'Deprecated function. Use pgr_dijkstraCost instead.';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    new_sql = sql;
-    IF (array_ndims(targets) != 1) THEN
-        raise EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-        USING ERRCODE = 'XX000';
-    END IF;
-
-
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            new_sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            RAISE EXCEPTION 'Error, reverse_cost is used, but query did''t return ''reverse_cost'' column'
-            USING ERRCODE = 'XX000';
-        END IF;
-    END IF;
-
-    SELECT ARRAY(SELECT DISTINCT UNNEST(targets) ORDER BY 1) INTO targets;
-
-    sseq = 0; i = 1;
-    FOR result IN
-        SELECT ((row_number() over()) -1)::INTEGER, a.start_vid::INTEGER, a.end_vid::INTEGER, agg_cost
-        FROM pgr_dijkstraCost(new_sql, source, targets, directed) a ORDER BY end_vid LOOP
-        WHILE (result.id2 != targets[i]) LOOP
-            tmp.seq = sseq;
-            tmp.id1 = source;
-            tmp.id2 = targets[i];
-            IF (targets[i] = source) THEN
-                tmp.cost = 0;
-            ELSE
-                tmp.cost = -1;
-            END IF;
-            RETURN next tmp;
-            i = i + 1;
-            sseq = sseq + 1;
-        END LOOP;
-        IF (result.id2 = targets[i]) THEN
-            result.seq = sseq;
-            RETURN next result;
-            i = i + 1;
-            sseq = sseq + 1;
-        END IF;
-    END LOOP;
-    WHILE (i <= array_length(targets,1)) LOOP
-        tmp.seq = sseq;
-        tmp.id1 = source;
-        tmp.id2 = targets[i];
-        IF (targets[i] = source) THEN
-            tmp.cost = 0;
-        ELSE
-            tmp.cost = -1;
-        END IF;
-        RETURN next tmp;
-        i = i + 1;
-        sseq = sseq + 1;
-    END LOOP;
-
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-
-
-
-create or replace function pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    returns integer as
-$body$
-
-declare
-    rr record;
-    pct float;
-    debuglevel text;
-
-begin
-    -- find the closest edge within tol distance
-    execute 'select * from ' || _pgr_quote_ident(edges) ||
-            ' where st_dwithin(''' || pnt::text ||
-            '''::geometry, the_geom, ' || tol || ') order by st_distance(''' || pnt::text ||
-            '''::geometry, the_geom) asc limit 1' into rr;
-
-    if rr.the_geom is not null then
-        -- deal with MULTILINESTRINGS
-        if geometrytype(rr.the_geom)='MULTILINESTRING' THEN
-            rr.the_geom := ST_GeometryN(rr.the_geom, 1);
-        end if;
-
-        -- project the point onto the linestring
-        execute 'show client_min_messages' into debuglevel;
-        SET client_min_messages='ERROR';
-        pct := st_line_locate_point(rr.the_geom, pnt);
-        execute 'set client_min_messages  to '|| debuglevel;
-
-        -- return the node we are closer to
-        if pct < 0.5 then
-            return rr.source;
-        else
-            return rr.target;
-        end if;
-    else
-        -- return a failure to find an edge within tol distance
-        return -1;
-    end if;
-end;
-$body$
-  language plpgsql volatile
-  cost 5;
-
-
-----------------------------------------------------------------------------
-
-create or replace function pgr_flipedges(ga geometry[])
-    returns geometry[] as
-$body$
-
-declare
-    nn integer;
-    i integer;
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_flipEdges';
-    -- get the count of edges, and return if only one edge
-    nn := array_length(ga, 1);
-    if nn=1 then
-        return ga;
-    end if;
-
-    -- determine if first needs to be flipped
-    g := _pgr_startpoint(ga[1]);
-
-    -- if the start of the first is connected to the second then it needs to be flipped
-    if _pgr_startpoint(ga[2])=g or _pgr_endpoint(ga[2])=g then
-        ga[1] := st_reverse(ga[1]);
-    end if;
-    g := _pgr_endpoint(ga[1]);
-
-    -- now if  the end of the last edge matchs the end of the current edge we need to flip it
-    for i in 2 .. nn loop
-        if _pgr_endpoint(ga[i])=g then
-            ga[i] := st_reverse(ga[i]);
-        end if;
-        -- save the end of this edge into the last end for the next cycle
-        g := _pgr_endpoint(ga[i]);
-    end loop;
-
-    return ga;
-end;
-$body$
-    language plpgsql immutable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_texttopoints(pnts text, srid integer DEFAULT(4326))
-    returns geometry[] as
-$body$
-
-declare
-    a text[];
-    t text;
-    p geometry;
-    g geometry[];
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_textToPoints';
-    -- convert commas to space and split on ';'
-    a := string_to_array(replace(pnts, ',', ' '), ';');
-    -- convert each 'x y' into a point geometry and concattenate into a new array
-    for t in select unnest(a) loop
-        p := st_pointfromtext('POINT(' || t || ')', srid);
-        g := g || p;
-    end loop;
-
-    return g;
-end;
-$body$
-    language plpgsql immutable;
-
------------------------------------------------------------------------
-
-create or replace function pgr_pointstovids(pnts geometry[], edges text, tol float8 DEFAULT(0.01))
-    returns integer[] as
-$body$
-
-declare
-    v integer[];
-    g geometry;
-
-begin
-    RAISE NOTICE 'Deperecated function: pgr_pointsToVids';
-    -- cycle through each point and locate the nearest edge and vertex on that edge
-    for g in select unnest(pnts) loop
-        v := v || pgr_pointtoedgenode(edges, g, tol);
-    end loop;
-
-    return v;
-end;
-$body$
-    language plpgsql stable;
-
-
-create or replace function pgr_pointstodmatrix(pnts geometry[], mode integer default (0), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    r record;
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_pointsToDMatrix';
-    dmatrix := array[]::double precision[];
-    ids := array[]::integer[];
-
-    -- create an id for each point in the array and unnest it into a table nodes in the with clause
-    for r in with nodes as (select row_number() over()::integer as id, p from (select unnest(pnts) as p) as foo)
-        -- compute a row of distances
-        select i, array_agg(dist) as arow from (
-            select a.id as i, b.id as j,
-                case when mode=0
-                    then st_distance(a.p, b.p)
-                    else st_distance_sphere(a.p, b.p)
-                end as dist
-              from nodes a, nodes b
-             order by a.id, b.id
-           ) as foo group by i order by i loop
-
-        -- you must concat an array[array[]] to make dmatrix[][]
-        -- concat the row of distances to the dmatrix
-        dmatrix := array_cat(dmatrix, array[r.arow]);
-        ids := ids || array[r.i];
-    end loop;
-end;
-$body$
-    language plpgsql stable;
-
-
-------------------------------------------------------------------------------
-
-create or replace function pgr_vidstodmatrix(IN vids integer[], IN pnts geometry[], IN edges text, tol float8 DEFAULT(0.1), OUT dmatrix double precision[], OUT ids integer[])
-    returns record as
-$body$
-
-declare
-    i integer;
-    j integer;
-    nn integer;
-    rr record;
-    bbox geometry;
-    t float8[];
-
-begin
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    -- check if the input arrays has any -1 values, maybe this whould be a raise exception
-    if vids @> ARRAY[-1] then
-    raise notice 'Some vids are undefined (-1)!';
-    dmatrix := null;
-    ids := null;
-    return;
-    end if;
-
-    ids := vids;
-
-    -- get the count of nodes
-    nn := array_length(vids,1);
-
-    -- zero out a dummy row
-    for i in 1 .. nn loop
-        t := t || 0.0::float8;
-    end loop;
-
-    -- using the dummy row, zero out the whole matrix
-    for i in 1 .. nn loop
-    dmatrix := dmatrix || ARRAY[t];
-    end loop;
-
-    for i in 1 .. nn-1 loop
-        j := i;
-        -- compute the bbox for the point needed for this row
-        select st_expand(st_collect(pnts[id]), tol) into bbox
-          from (select generate_series as id from generate_series(i, nn)) as foo;
-
-        -- compute kdijkstra() for this row
-        for rr in execute 'select * from pgr_dijkstracost($1, $2, $3, false)'
-                  using 'select id, source, target, cost from ' || edges ||
-                        ' where the_geom && ''' || bbox::text || '''::geometry'::text, vids[i], vids[i+1:nn] loop
-
-            -- TODO need to check that all node were reachable from source
-            -- I think unreachable paths between nodes returns cost=-1.0
-
-            -- populate the matrix with the cost values, remember this is symmetric
-            j := j + 1;
-            -- raise notice 'cost(%,%)=%', i, j, rr.agg_cost;
-            dmatrix[i][j] := rr.agg_cost;
-            dmatrix[j][i] := rr.agg_cost;
-        end loop;
-    end loop;
-
-end;
-$body$
-    language plpgsql stable cost 200;
-
-
-
-CREATE OR REPLACE FUNCTION pgr_vidsToDMatrix(sql TEXT, vids  INTEGER[], dir BOOLEAN, has_rcost BOOLEAN, want_symmetric BOOLEAN)
-RETURNS float8[] AS
-$BODY$
-DECLARE
-directed BOOLEAN;
-has_reverse BOOLEAN;
-edges_sql TEXT;
-dmatrix_row float8[];
-dmatrix float8[];
-cell RECORD;
-unique_vids INTEGER[];
-total BIGINT;
-from_v BIGINT;
-to_v BIGINT;
-BEGIN
-    RAISE NOTICE 'Deprecated function pgr_vidsToDMatrix';
-    has_reverse =_pgr_parameter_check('dijkstra', sql, false);
-    edges_sql = sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    unique_vids :=  ARRAY(SELECT DISTINCT UNNEST(vids) ORDER BY 1);
-
-    IF want_symmetric THEN
-        directed = false;
-    ELSE
-        directed = dir;
-    END IF;
-
-    total := array_length(unique_vids, 1);
-
-    -- initializing dmatrix
-    FOR i in 1 .. total LOOP
-        dmatrix_row := dmatrix_row || '+Infinity'::float8;
-    END LOOP;
-    FOR i in 1 .. total LOOP
-    dmatrix := dmatrix || ARRAY[dmatrix_row];
-    dmatrix[i][i] = 0;
-    END LOOP;
-
-    CREATE TEMP TABLE __x___y____temp AS
-        WITH result AS
-            (SELECT unnest(unique_vids) AS vid)
-        SELECT row_number() OVER() AS idx, vid FROM result;
-
-    FOR cell IN SELECT * FROM pgr_dijkstraCostMatrix(sql, unique_vids, directed) LOOP
-        SELECT idx INTO from_v FROM __x___y____temp WHERE vid =  cell.start_vid;
-        SELECT idx INTO to_v FROM __x___y____temp WHERE vid =  cell.end_vid;
-
-        dmatrix[from_v][to_v] = cell.agg_cost;
-        dmatrix[to_v][from_v] = cell.agg_cost;
-    END LOOP;
-
-    DROP TABLE IF EXISTS __x___y____temp;
-    RETURN dmatrix;
-
-    EXCEPTION WHEN others THEN
-       DROP TABLE IF EXISTS __x___y____temp;
-       raise exception '% %', SQLERRM, SQLSTATE;
-END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100;
-
-
-
--- V2 signature
-CREATE OR REPLACE FUNCTION pgr_dijkstra(
-    edges_sql TEXT,
-    start_vid INTEGER,
-    end_vid INTEGER,
-    directed BOOLEAN,
-    has_rcost BOOLEAN)
-RETURNS SETOF pgr_costresult AS
-$BODY$
-DECLARE
-has_reverse BOOLEAN;
-sql TEXT;
-BEGIN
-    RAISE NOTICE 'Deprecated function';
-    has_reverse =_pgr_parameter_check('dijkstra', edges_sql, false);
-    sql = edges_sql;
-    IF (has_reverse != has_rcost) THEN
-        IF (has_reverse) THEN
-            sql = 'SELECT id, source, target, cost FROM (' || edges_sql || ') a';
-        ELSE
-            raise EXCEPTION 'has_rcost set to true but reverse_cost not found';
-        END IF;
-    END IF;
-
-    RETURN query SELECT seq-1 AS seq, node::integer AS id1, edge::integer AS id2, cost
-    FROM _pgr_dijkstra(sql, ARRAY[$2]::BIGINT[], ARRAY[$3]::BIGINT[], directed, false);
-  END
-$BODY$
-LANGUAGE plpgsql VOLATILE
-COST 100
-ROWS 1000;
-COMMENT ON FUNCTION pgr_dijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN) IS 'pgr_dijkstra(Deprecated signature)';
-
-
-
-
-
--- OLD SIGNATURE
-CREATE OR REPLACE FUNCTION pgr_drivingDistance(edges_sql text, source BIGINT, distance FLOAT, directed BOOLEAN, has_rcost BOOLEAN)
-  RETURNS SETOF pgr_costresult AS
-  $BODY$
-  DECLARE
-  has_reverse BOOLEAN;
-  sql TEXT;
-  BEGIN
-      RAISE NOTICE 'Deprecated function';
-
-      has_reverse =_pgr_parameter_check('dijkstra', edges_sql, FALSE);
-
-      sql = edges_sql;
-      IF (has_reverse != has_rcost) THEN
-         IF (has_reverse) THEN
-             -- the user says it doesn't have reverse cost but its false
-             -- removing from query
-             RAISE NOTICE 'Contradiction found: has_rcost set to false but reverse_cost column found';
-             sql = 'SELECT id, source, target, cost, -1 as reverse_cost FROM (' || edges_sql || ') __q ';
-         ELSE
-             -- the user says it has reverse cost but its false
-             -- can't do anything
-             RAISE EXCEPTION 'has_rcost set to true but reverse_cost not found';
-         END IF;
-      END IF;
-
-      RETURN query SELECT seq - 1 AS seq, node::integer AS id1, edge::integer AS id2, agg_cost AS cost
-                FROM pgr_drivingDistance($1, ARRAY[$2]::BIGINT[], $3, $4, false);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE
-  COST 100
-  ROWS 1000;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maximumcardinalitymatching(
-    edges_sql TEXT,
-    directed BOOLEAN DEFAULT TRUE,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT
-    )
-  RETURNS SETOF RECORD AS
- '$libdir/libpgrouting-2.5', 'maximum_cardinality_matching'
-    LANGUAGE c VOLATILE;
-
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---INTERNAL FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertex BIGINT,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertex BIGINT,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
---FUNCTIONS
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowPushRelabel(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_PushRelabel($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowBoykovKolmogorov(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_boykovKolmogorov($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-CREATE OR REPLACE FUNCTION pgr_maxFlowEdmondsKarp(
-    edges_sql TEXT,
-    source_vertices ANYARRAY,
-    sink_vertices ANYARRAY,
-    OUT seq INTEGER,
-    OUT edge_id BIGINT,
-    OUT source BIGINT,
-    OUT target BIGINT,
-    OUT flow BIGINT,
-    OUT residual_capacity BIGINT
-    )
-  RETURNS SETOF RECORD AS
-  $BODY$
-  BEGIN
-        RETURN QUERY SELECT *
-        FROM pgr_edmondsKarp($1, $2, $3);
-  END
-  $BODY$
-  LANGUAGE plpgsql VOLATILE;
-
-
-
-
-------------------------
--- deprecated signatures
------------------------
-
-COMMENT ON FUNCTION pgr_astar(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_astar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdAstar( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdAstar(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_bdDijkstra( TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_bdDijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_dijkstra(TEXT, INTEGER, INTEGER, BOOLEAN, BOOLEAN)
-    IS 'pgr_dijkstra(Deprecated signature)';
-
-COMMENT ON FUNCTION pgr_drivingDistance(text,  BIGINT,  FLOAT8,  BOOLEAN,  BOOLEAN)
-    IS 'pgr_drivingDistance(Deprecated signature)';
-
-------------------------
--- Renamed /deprecated
------------------------
-COMMENT ON FUNCTION pgr_apspJohnson(TEXT)
-    IS 'pgr_apspJohnson(Renamed function) use pgr_Johnson instead';
-
-COMMENT ON FUNCTION pgr_apspWarshall(text, boolean, boolean)
-    IS 'pgr_apspWarshall(Renamed function) use pgr_floydWarshall instead';
-
-COMMENT ON FUNCTION pgr_kdijkstraPath( text, INTEGER, INTEGER ARRAY, BOOLEAN, BOOLEAN)
-    IS 'pgr_kdijkstraPath(Renamed function) use pgr_dijkstra instead';
-
-COMMENT ON FUNCTION pgr_kdijkstracost( text, INTEGER, INTEGER array, BOOLEAN, BOOLEAN)
-    IS 'pgr_kDijkstraCost(Renamed function) use pgr_dijkstraCost instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-COMMENT ON FUNCTION  pgr_maxFlowPushRelabel(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowPushRelabel(Renamed function) use pgr_pushRelabel instead';
-
-
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-COMMENT ON FUNCTION  pgr_maxFlowEdmondsKarp(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowEdmondsKarp(Renamed function) use pgr_edmondsKarp instead';
-
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, BIGINT, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, BIGINT)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-COMMENT ON FUNCTION  pgr_maxFlowBoykovKolmogorov(TEXT, ANYARRAY, ANYARRAY)
-    IS 'pgr_maxFlowBoykovKolmogorov(Renamed function) use pgr_boykovKolmogorov instead';
-
-
-COMMENT ON FUNCTION pgr_gsoc_vrppdtw( text, INTEGER, INTEGER)
-    IS 'pgr_gsoc_vrppdtw(Renamed function) use pgr_pickDeliverEuclidean instead';
-
-------------------------
--- Deprecated functions
------------------------
-
-COMMENT ON FUNCTION pgr_flipedges(geometry[])
-    IS 'pgr_flipedges(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_texttopoints(text,  integer)
-    IS 'pgr_texttopoints(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstovids(pnts geometry[], edges text, tol float8)
-    IS 'pgr_pointstovids(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointtoedgenode(edges text, pnt geometry, tol float8)
-    IS 'pgr_pointtoedgenode(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_pointstodmatrix(geometry[], integer)
-    IS 'pgr_pointstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidstodmatrix( integer[],  geometry[],  text, float8)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_vidsToDMatrix(TEXT,  INTEGER[], BOOLEAN, BOOLEAN, BOOLEAN)
-    IS 'pgr_vidstodmatrix(Deprecated function)';
-
-
-
-
-COMMENT ON FUNCTION pgr_getTableName(IN tab text)
-    IS 'pgr_getTableName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_getColumnName(tab text, col text)
-    IS 'pgr_getColumnName(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnInTable(tab text, col text)
-    IS 'pgr_isColumnInTable(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_isColumnIndexed(tab text, col text)
-    IS 'pgr_isColumnIndexed(Deprecated function)';
-
-
-COMMENT ON FUNCTION pgr_quote_ident(idname text)
-    IS 'pgr_quote_ident(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_versionless(v1 text, v2 text)
-    IS 'pgr_versionless(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_startPoint(g geometry)
-    IS 'pgr_startPoint(Deprecated function)';
-
-COMMENT ON FUNCTION pgr_endPoint(g geometry)
-    IS 'pgr_endPoint(Deprecated function)';
diff --git a/tools/template/create.sh b/tools/template/create.sh
old mode 100644
new mode 100755
index cc0968c..ec912f1
--- a/tools/template/create.sh
+++ b/tools/template/create.sh
@@ -31,7 +31,7 @@ fi
 #dont put pgr_ on MY_FUNCTION_NAME that is done automatically
 MY_FUNCTION_NAME="funnyDijkstra"
 DEVELOPER_NAME="Celia Virginia Vergara Castillo"
-DEVELOPER_EMAIL="vicky_vergara\@hotmail.com" 
+DEVELOPER_EMAIL="vicky_vergara\@hotmail.com"
 YEAR="2017"
 
 # Note: the "\n     " (change line and four spaces) after each comma
@@ -51,7 +51,7 @@ MY_FUNCTION_NAME_LOWER=$(echo $MY_FUNCTION_NAME | tr 'A-Z' 'a-z')
 # Available types to store the edge information:
 #  http://docs.pgrouting.org/doxy/dev/structpgr__edge__t.html
 #  http://docs.pgrouting.org/doxy/dev/structPgr__edge__xy__t.html
-MY_RETURN_VALUE_TYPE="General_path_element_t" 
+MY_RETURN_VALUE_TYPE="General_path_element_t"
 MY_RETURN_VALUE_FILE=$(echo $MY_RETURN_VALUE_TYPE | tr 'A-Z' 'a-z')
 
 MY_EDGE_TYPE="pgr_edge_t"
@@ -67,7 +67,7 @@ MY_EDGE_FUNCTION="pgr_get_edges"
 
 #the above variables must be defined
 
-if test -z "$MY_FUNCTION_NAME"; then 
+if test -z "$MY_FUNCTION_NAME"; then
     exit
 fi
 
@@ -77,7 +77,7 @@ fi
 
 mkdir "$MY_FUNCTION_NAME"
 
-#copy to a working subdirectory 
+#copy to a working subdirectory
 cp -r sql  "$MY_FUNCTION_NAME"
 cp -r doc  "$MY_FUNCTION_NAME"
 cp -r test  "$MY_FUNCTION_NAME"
@@ -130,7 +130,7 @@ mv $MY_FUNCTION_NAME/pgtap/function1-innerQuery.sql        $MY_FUNCTION_NAME/pgt
 
 
 if [[ ! ( -d ../../doc/$MY_FUNCTION_NAME ) ]] ; then
-    mkdir ../../sql/$MY_FUNCTION_NAME
+    mkdir ../../doc/$MY_FUNCTION_NAME
 fi
 
 if [[ ! ( -d ../../sql/$MY_FUNCTION_NAME ) ]] ; then
@@ -143,18 +143,30 @@ if [[  "$1" == "clean"  ]] ; then
     rm -rf ../../sql/$MY_FUNCTION_NAME
     rm -rf ../../src/$MY_FUNCTION_NAME
     rm -rf ../../doc/$MY_FUNCTION_NAME
+    rm -rf ../../include/drivers/$MY_FUNCTION_NAME
+    rm -rf ../../test/$MY_FUNCTION_NAME
+    rm -rf ../../pgtap/$MY_FUNCTION_NAME
+
     mkdir -p ../../sql/$MY_FUNCTION_NAME
     mkdir -p ../../doc/$MY_FUNCTION_NAME
     mkdir -p ../../include/drivers/$MY_FUNCTION_NAME
+    mkdir -p ../../test/$MY_FUNCTION_NAME
+    mkdir -p ../../pgtap/$MY_FUNCTION_NAME
+
 
     #moving the whole structure to its final location
-    mv $MY_FUNCTION_NAME/pgtap              $MY_FUNCTION_NAME/test
+    mv $MY_FUNCTION_NAME/pgtap/*              ../../pgtap/$MY_FUNCTION_NAME
     mv $MY_FUNCTION_NAME/src/*driver.h      ../../include/drivers/$MY_FUNCTION_NAME
 
     mv $MY_FUNCTION_NAME/doc/*              ../../doc/$MY_FUNCTION_NAME
     mv $MY_FUNCTION_NAME/sql/*              ../../sql/$MY_FUNCTION_NAME
+    mv $MY_FUNCTION_NAME/test/*             ../../test/$MY_FUNCTION_NAME
+
     rm -rf  $MY_FUNCTION_NAME/doc
     rm -rf  $MY_FUNCTION_NAME/sql
+    rm -rf  $MY_FUNCTION_NAME/test
+    rm -rf  $MY_FUNCTION_NAME/pgtap
+
     mv $MY_FUNCTION_NAME                    ../../src
 fi
 
diff --git a/tools/template/doc/doc-pgr_function1.queries b/tools/template/doc/doc-pgr_function1.queries
index f7141d3..1f911a0 100644
--- a/tools/template/doc/doc-pgr_function1.queries
+++ b/tools/template/doc/doc-pgr_function1.queries
@@ -5,7 +5,7 @@ SELECT * FROM pgr_MY_FUNCTION_NAME(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     2, 3
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    2 |    4 |    1 |        0
    2 |        2 |    5 |    8 |    1 |        1
@@ -21,7 +21,7 @@ SELECT * FROM pgr_MY_FUNCTION_NAME(
     2, 3,
     FALSE
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    2 |    2 |    1 |        0
    2 |        2 |    3 |   -1 |    0 |        1
diff --git a/tools/template/sql/function1.sql b/tools/template/sql/function1.sql
index d5991a3..df03588 100644
--- a/tools/template/sql/function1.sql
+++ b/tools/template/sql/function1.sql
@@ -5,7 +5,7 @@ Generated with Template by:
 Copyright (c) 2016 pgRouting developers
 Mail: project at pgrouting.org
 
-Function's developer: 
+Function's developer:
 Copyright (c) YEAR DEVELOPER_NAME
 Mail: DEVELOPER_EMAIL
 
diff --git a/tools/template/src/function1.c b/tools/template/src/function1.c
index 48b072f..ed9cb01 100644
--- a/tools/template/src/function1.c
+++ b/tools/template/src/function1.c
@@ -39,7 +39,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
 /**
- *  postgres_connection.h 
+ *  postgres_connection.h
  *
  *  - should allways be first in the C code
  */
diff --git a/tools/template/src/function1_driver.cpp b/tools/template/src/function1_driver.cpp
index f082024..18c86f6 100644
--- a/tools/template/src/function1_driver.cpp
+++ b/tools/template/src/function1_driver.cpp
@@ -5,7 +5,7 @@ Generated with Template by:
 Copyright (c) 2015 pgRouting developers
 Mail: project at pgrouting.org
 
-Function's developer: 
+Function's developer:
 Copyright (c) YEAR DEVELOPER_NAME
 Mail: DEVELOPER_EMAIL
 
diff --git a/tools/template/src/function1_driver.h b/tools/template/src/function1_driver.h
index 68a4c0b..ac0d9cd 100644
--- a/tools/template/src/function1_driver.h
+++ b/tools/template/src/function1_driver.h
@@ -5,7 +5,7 @@ Generated with Template by:
 Copyright (c) 2015 pgRouting developers
 Mail: project at pgrouting.org
 
-Function's developer: 
+Function's developer:
 Copyright (c) 2015 Celia Virginia Vergara Castillo
 Mail: vicky_vergara at hotmail.com
 
diff --git a/tools/template/test/doc-function1.result b/tools/template/test/doc-function1.result
index e279a5c..ae05e35 100644
--- a/tools/template/test/doc-function1.result
+++ b/tools/template/test/doc-function1.result
@@ -7,7 +7,7 @@ SELECT * FROM pgr_MY_FUNCTION_NAME(
     'SELECT id, source, target, cost, reverse_cost FROM edge_table',
     2, 3
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    2 |    4 |    1 |        0
    2 |        2 |    5 |    8 |    1 |        1
@@ -23,7 +23,7 @@ SELECT * FROM pgr_MY_FUNCTION_NAME(
     2, 3,
     FALSE
 );
- seq | path_seq | node | edge | cost | agg_cost 
+ seq | path_seq | node | edge | cost | agg_cost
 -----+----------+------+------+------+----------
    1 |        1 |    2 |    2 |    1 |        0
    2 |        2 |    3 |   -1 |    0 |        1
diff --git a/tools/testers/algorithm-tester.pl b/tools/testers/algorithm-tester.pl
index e3770fc..9b386af 100755
--- a/tools/testers/algorithm-tester.pl
+++ b/tools/testers/algorithm-tester.pl
@@ -1,8 +1,41 @@
 #! /usr/bin/perl -w
+
+=pod
+File: aplgorithm testes
+
+Copyright (c) 2013 pgRouting developers
+
+Function contributors:
+  	Celia Virginia Vergara Castillo
+  	Stephen Woodbridge
+  	Vadim Zhukov
+	Nagase Ko
+
+Mail:
+
+------
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+=cut
+
+
 eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
 if 0; #$running_under_some_shell
 
 use strict;
+use warnings;
 use File::Find ();
 use File::Basename;
 use Data::Dumper;
@@ -54,7 +87,7 @@ print "RUNNING: algorithm-tester.pl " . join(" ", @ARGV) . "\n";
 
 my ($vpg, $postgis_ver, $vpgr, $psql);
 my $alg = '';
-my @testpath = ("src/");
+my @testpath = ("test/");
 my @test_direcotry = ();
 my $clean;
 my $ignore;
@@ -83,7 +116,7 @@ while (my $a = shift @ARGV) {
     }
     elsif ($a eq '-alg') {
         $alg = shift @ARGV || Usage();
-        @testpath = ("src/$alg");
+        @testpath = ("test/$alg");
     }
     elsif ($a eq '-psql') {
         $psql = shift @ARGV || Usage();
@@ -239,7 +272,10 @@ sub run_test {
     }
     if ($DOCUMENTATION) {
         for my $x (@{$t->{documentation}}) {
-            process_single_test($x, $dir,, $DBNAME, \%res)
+            process_single_test($x, $dir,, $DBNAME, \%res);
+            my $cmd = q(perl -pi -e 's/[ \t]+$//');
+            $cmd .= " doc/queries/$x.queries";
+            mysystem( $cmd );
         }
     }
     else {
@@ -286,10 +322,9 @@ sub process_single_test{
 
 
     if ($DOCUMENTATION) {
-        mysystem("mkdir -p '$dir/../../../doc/queries' "); # make sure the directory exists
-        open(PSQL, "|$psql $connopts --set='VERBOSITY terse' -e $database > $dir/../../../doc/queries/$x.queries 2>\&1 ") || do {
+        mysystem("mkdir -p 'doc/queries' "); # make sure the directory exists
+        open(PSQL, "|$psql $connopts --set='VERBOSITY terse' -e $database > doc/queries/$x.queries 2>\&1 ") || do {
             $res->{"$dir/$x.test.sql"} = "FAILED: could not open connection to db : $!";
-            $stats{z_fail}++;
             next;
         };
     }
@@ -324,26 +359,30 @@ sub process_single_test{
     #closes the input file  /TIN = test input
     close(TIN);
 
-    print "\n" if $DOCUMENTATION;
-    return if $DOCUMENTATION;
+    if ($DOCUMENTATION) {
+        print "\n";
+        return;
+    }
 
     my $dfile;
     my $dfile2;
     if ($ignore) { #decide how to compare results, if ignoring or not ignoring
         $dfile2 = $TMP2;
-        mysystem("grep -v NOTICE '$TMP' | grep -v '^CONTEXT:' | grep -v '^PL/pgSQL function' > $dfile2");
+        mysystem("grep -v NOTICE '$TMP' | grep -v '^CONTEXT:' | grep -v '^PL/pgSQL function' | grep -v '^COPY' > $dfile2");
         $dfile = $TMP3;
-        mysystem("grep -v NOTICE '$dir/$x.result' | grep -v '^CONTEXT:' | grep -v '^PL/pgSQL function' > $dfile");
+        mysystem("grep -v NOTICE '$dir/$x.result' | grep -v '^CONTEXT:' | grep -v '^PL/pgSQL function' | grep -v '^COPY' > $dfile");
     }
     elsif ($DEBUG1) { #to delete CONTEXT lines
         $dfile2 = $TMP2;
-        mysystem("grep -v '^CONTEXT:' '$TMP' | grep -v '^PL/pgSQL function' > $dfile2");
+        mysystem("grep -v '^CONTEXT:' '$TMP' | grep -v '^PL/pgSQL function' | grep -v '^COPY' > $dfile2");
         $dfile = $TMP3;
-        mysystem("grep -v '^CONTEXT:' '$dir/$x.result' | grep -v '^PL/pgSQL function' > $dfile");
+        mysystem("grep -v '^CONTEXT:' '$dir/$x.result' | grep -v '^PL/pgSQL function' | grep -v '^COPY' > $dfile");
     }
     else {
-        $dfile = "$dir/$x.result";
-        $dfile2 = $TMP;
+        $dfile2 = $TMP2;
+        mysystem("grep -v '^COPY' '$TMP' | grep -v 'psql:tools' > $dfile2");
+        $dfile = $TMP3;
+        mysystem("grep -v '^COPY' '$dir/$x.result' | grep -v 'psql:tools' > $dfile");
     }
     if (! -f "$dir/$x.result") {
         $res->{"$dir/$x.test.sql"} = "\nFAILED: result file missing : $!";
diff --git a/tools/testers/contraction_data.sql b/tools/testers/contraction_data.sql
index 3b25e63..37040ac 100644
--- a/tools/testers/contraction_data.sql
+++ b/tools/testers/contraction_data.sql
@@ -15,47 +15,47 @@ CREATE TABLE edge_table (
 );
 
 --EDGE TABLE ADD DATA
-INSERT INTO edge_table (id, source, target, cost,reverse_cost) 
+INSERT INTO edge_table (id, source, target, cost,reverse_cost)
 VALUES ( 1, 1, 2, 1 , -1);
 
-INSERT INTO edge_table (id, source, target, cost,reverse_cost) 
+INSERT INTO edge_table (id, source, target, cost,reverse_cost)
 VALUES ( 2, 2, 3, 1 , -1);
 
-INSERT INTO edge_table (id, source, target, cost,reverse_cost) 
+INSERT INTO edge_table (id, source, target, cost,reverse_cost)
 VALUES ( 3, 3, 4, 1 , -1);
 
-INSERT INTO edge_table (id, source, target, cost,reverse_cost) 
+INSERT INTO edge_table (id, source, target, cost,reverse_cost)
 VALUES ( 4, 6, 5, 1 , -1);
 
-INSERT INTO edge_table (id, source, target, cost,reverse_cost) 
+INSERT INTO edge_table (id, source, target, cost,reverse_cost)
 VALUES ( 5, 7, 5, 1 , -1);
 
-INSERT INTO edge_table (id, source, target, cost,reverse_cost) 
+INSERT INTO edge_table (id, source, target, cost,reverse_cost)
 VALUES ( 6, 8, 5, 1 , -1);
 
-INSERT INTO edge_table (id, source, target, cost,reverse_cost) 
+INSERT INTO edge_table (id, source, target, cost,reverse_cost)
 VALUES ( 7, 8, 7, 1 , -1);
 
-INSERT INTO edge_table (id, source, target, cost,reverse_cost) 
+INSERT INTO edge_table (id, source, target, cost,reverse_cost)
 VALUES ( 8, 7, 6, 1 , -1);
 
-INSERT INTO edge_table (id, source, target, cost,reverse_cost) 
+INSERT INTO edge_table (id, source, target, cost,reverse_cost)
 VALUES ( 9, 2, 10, 1 , -1);
 
-INSERT INTO edge_table (id, source, target, cost,reverse_cost) 
+INSERT INTO edge_table (id, source, target, cost,reverse_cost)
 VALUES ( 10, 10, 9, 1 , -1);
 
-INSERT INTO edge_table (id, source, target, cost,reverse_cost) 
+INSERT INTO edge_table (id, source, target, cost,reverse_cost)
 VALUES ( 11, 9, 1, 1 , -1);
 
-INSERT INTO edge_table (id, source, target, cost,reverse_cost) 
+INSERT INTO edge_table (id, source, target, cost,reverse_cost)
 VALUES ( 12, 3, 11, 1 , -1);
 
-INSERT INTO edge_table (id, source, target, cost,reverse_cost) 
+INSERT INTO edge_table (id, source, target, cost,reverse_cost)
 VALUES ( 13, 11, 10, 1 , -1);
 
-INSERT INTO edge_table (id, source, target, cost,reverse_cost) 
+INSERT INTO edge_table (id, source, target, cost,reverse_cost)
 VALUES ( 14, 4, 12, 1 , -1);
 
-INSERT INTO edge_table (id, source, target, cost,reverse_cost) 
+INSERT INTO edge_table (id, source, target, cost,reverse_cost)
 VALUES ( 15, 11, 12, 1 , -1);
\ No newline at end of file
diff --git a/tools/testers/innerQuery.sql b/tools/testers/innerQuery.sql
index 546d548..5d86069 100644
--- a/tools/testers/innerQuery.sql
+++ b/tools/testers/innerQuery.sql
@@ -15,13 +15,13 @@ BEGIN
         start_sql = start_sql || p || ', ';
     END LOOP;
     end_sql = ' FROM edge_table $$' || rest_sql;
-    
+
     query := start_sql || parameter || '::SMALLINT ' || end_sql;
     RETURN query SELECT lives_ok(query);
-    
+
     query := start_sql || parameter || '::INTEGER ' || end_sql;
     RETURN query SELECT lives_ok(query);
-    
+
     query := start_sql || parameter || '::BIGINT ' || end_sql;
     RETURN query SELECT lives_ok(query);
 
@@ -49,13 +49,13 @@ BEGIN
         start_sql = start_sql || p || ', ';
     END LOOP;
     end_sql = ' FROM edge_table $$' || rest_sql;
-    
+
     query := start_sql || parameter || '::SMALLINT ' || end_sql;
     RETURN query SELECT lives_ok(query);
-    
+
     query := start_sql || parameter || '::INTEGER ' || end_sql;
     RETURN query SELECT lives_ok(query);
-    
+
     query := start_sql || parameter || '::BIGINT ' || end_sql;
     RETURN query SELECT lives_ok(query);
 
@@ -84,13 +84,13 @@ BEGIN
         start_sql = start_sql || p || ', ';
     END LOOP;
     end_sql = ' FROM orders LIMIT 1 $$, $$ SELECT * from Vehicles $$' || rest_sql;
-    
+
     query := start_sql || parameter || '::SMALLINT ' || end_sql;
     RETURN query SELECT lives_ok(query);
-    
+
     query := start_sql || parameter || '::INTEGER ' || end_sql;
     RETURN query SELECT lives_ok(query);
-    
+
     query := start_sql || parameter || '::BIGINT ' || end_sql;
     RETURN query SELECT lives_ok(query);
 
@@ -118,13 +118,13 @@ BEGIN
         start_sql = start_sql || p || ', ';
     END LOOP;
     end_sql = ' FROM orders LIMIT 1 $$, $$ SELECT * from Vehicles $$' || rest_sql;
-    
+
     query := start_sql || parameter || '::SMALLINT ' || end_sql;
     RETURN query SELECT lives_ok(query);
-    
+
     query := start_sql || parameter || '::INTEGER ' || end_sql;
     RETURN query SELECT lives_ok(query);
-    
+
     query := start_sql || parameter || '::BIGINT ' || end_sql;
     RETURN query SELECT lives_ok(query);
 
diff --git a/tools/testers/innerQuery_old.sql b/tools/testers/innerQuery_old.sql
index badf5d2..eca3c9d 100644
--- a/tools/testers/innerQuery_old.sql
+++ b/tools/testers/innerQuery_old.sql
@@ -20,13 +20,13 @@ BEGIN
         start_sql = start_sql || p || ', ';
     END LOOP;
     end_sql = ' FROM edge_table_old $$' || rest_sql;
-    
+
     query := start_sql || parameter || '::SMALLINT ' || end_sql;
     RETURN query SELECT throws_ok(query);
-    
+
     query := start_sql || parameter || '::INTEGER ' || end_sql;
     RETURN query SELECT lives_ok(query);
-    
+
     query := start_sql || parameter || '::BIGINT ' || end_sql;
     RETURN query SELECT throws_ok(query);
 
@@ -54,13 +54,13 @@ BEGIN
         start_sql = start_sql || p || ', ';
     END LOOP;
     end_sql = ' FROM edge_table_old $$' || rest_sql;
-    
+
     query := start_sql || parameter || '::SMALLINT ' || end_sql;
     RETURN query SELECT throws_ok(query);
-    
+
     query := start_sql || parameter || '::INTEGER ' || end_sql;
     RETURN query SELECT throws_ok(query);
-    
+
     query := start_sql || parameter || '::BIGINT ' || end_sql;
     RETURN query SELECT throws_ok(query);
 
diff --git a/tools/testers/pg_prove_tests.sh b/tools/testers/pg_prove_tests.sh
index 3fbc631..ca072ae 100755
--- a/tools/testers/pg_prove_tests.sh
+++ b/tools/testers/pg_prove_tests.sh
@@ -49,10 +49,9 @@ then
 fi
 
 
-pg_prove ../../src/lineGraph/test/pgtap/* $PGPORT -d $PGDATABASE -U $PGUSER
-
 pg_prove $PGPORT -d $PGDATABASE  -U $PGUSER ../../pgtap/*/*
 
+
 if [ "$?" -ne 0 ]
 then
     ERROR=1
diff --git a/tools/testers/pickDeliver_pgtap_data.sql b/tools/testers/pickDeliver_pgtap_data.sql
index 213799c..544d7a3 100644
--- a/tools/testers/pickDeliver_pgtap_data.sql
+++ b/tools/testers/pickDeliver_pgtap_data.sql
@@ -4,89 +4,89 @@ DROP TABLE IF EXISTS vehicles CASCADE;
 DROP TABLE IF EXISTS dist_matrix CASCADE;
 
 CREATE TABLE orders (
-      id BIGINT PRIMARY KEY, 
-      demand FLOAT, 
+      id BIGINT PRIMARY KEY,
+      demand FLOAT,
       p_node_id BIGINT,
-      p_x FLOAT, 
-      p_y FLOAT, 
-      p_open FLOAT, 
-      p_close FLOAT, 
-      p_service FLOAT, 
+      p_x FLOAT,
+      p_y FLOAT,
+      p_open FLOAT,
+      p_close FLOAT,
+      p_service FLOAT,
       d_node_id BIGINT,
-      d_x FLOAT, 
-      d_y FLOAT, 
-      d_open FLOAT, 
-      d_close FLOAT, 
+      d_x FLOAT,
+      d_y FLOAT,
+      d_open FLOAT,
+      d_close FLOAT,
       d_service FLOAT
 );
 
 CREATE TABLE vehicles (
-  id BIGSERIAL PRIMARY KEY, 
+  id BIGSERIAL PRIMARY KEY,
   start_node_id BIGINT,
-  start_x FLOAT, 
-  start_y FLOAT, 
-  start_open FLOAT, 
-  start_close FLOAT, 
-  "number" integer, 
+  start_x FLOAT,
+  start_y FLOAT,
+  start_open FLOAT,
+  start_close FLOAT,
+  "number" integer,
   capacity FLOAT
 );
 
-INSERT INTO orders (id,  demand, 
-p_x,  p_y ,  p_open,  p_close,  p_service, 
+INSERT INTO orders (id,  demand,
+p_x,  p_y ,  p_open,  p_close,  p_service,
 d_x,  d_y ,  d_open,  d_close,  d_service)
 VALUES
-(3,  10, 42, 66,   65,  146, 90, 45, 65, 997, 1068, 90), 
-(5,  10, 42, 65,   15,   67, 90, 40, 66, 170,  225, 90), 
-(6,  20, 40, 69,  621,  702, 90, 45, 70, 825,  870, 90), 
-(8,  20, 38, 68,  255,  324, 90, 35, 66, 357,  410, 90), 
-(9,  10, 38, 70,  534,  605, 90, 42, 68, 727,  782, 90), 
-(11, 10, 35, 69,  448,  505, 90, 45, 68, 912,  967, 90), 
-(13, 30, 22, 75,   30,   92, 90, 18, 75,  99,  148, 90), 
-(16, 40, 20, 85,  475,  528, 90, 22, 85, 567,  620, 90), 
-(18, 20, 15, 75,  179,  254, 90, 25, 85, 652,  721, 90), 
-(19, 10, 15, 80,  278,  345, 90, 20, 80, 384,  429, 90), 
-(20, 10, 30, 50,   10,   73, 90, 25, 50,  65,  144, 90), 
-(23, 10, 28, 55,  732,  777,  0, 28, 55, 732,  777, 90), 
-(25, 40, 25, 52,  169,  224, 90, 23, 52, 261,  316, 90), 
-(28, 20, 23, 55,  546,  593, 90, 28, 52, 812,  883, 90), 
-(29, 10, 20, 50,  358,  405, 90, 25, 55, 622,  701, 90), 
-(30, 10, 20, 55,  449,  504, 90, 30, 52, 914,  965, 90), 
-(32, 30, 10, 40,   31,  100, 90, 10, 35, 200,  237, 90), 
-(33, 40,  8, 40,   87,  158, 90,  2, 40, 383,  434, 90), 
-(35, 10,  5, 35,  283,  344, 90,  0, 45, 567,  624, 90), 
-(36, 10,  5, 45,  665,  716,  0,  5, 45, 665,  716, 90), 
-(38, 30,  0, 40,  479,  522, 90,  8, 45, 751,  816, 90), 
-(42, 20, 33, 32,   68,  149, 90, 35, 30, 264,  321, 90), 
-(43, 10, 33, 35,   16,   80, 90, 35, 32, 166,  235, 90), 
-(44, 10, 32, 30,  359,  412, 90, 30, 32, 448,  509, 90), 
-(45, 10, 30, 30,  541,  600, 90, 28, 30, 632,  693, 90), 
-(49, 10, 28, 35, 1001, 1066, 90, 30, 35,1054, 1127, 90), 
-(50, 10, 26, 32,  815,  880, 90, 25, 35, 912,  969, 90), 
-(51, 10, 25, 30,  725,  786,  0, 25, 30, 725,  786, 90), 
-(53, 20, 44,  5,  286,  347, 90, 38,  5, 471,  534, 90), 
-(54, 40, 42, 10,  186,  257, 90, 35,  5, 562,  629, 90), 
-(56, 30, 40,  5,  385,  436, 90, 38, 15, 651,  740, 90), 
-(57, 40, 40, 15,   35,   87, 90, 42, 15,  95,  158, 90), 
-(62, 20, 50, 35,  262,  317, 90, 45, 30, 734,  777, 90), 
-(63, 50, 50, 40,  171,  218, 90, 53, 35, 353,  412, 90), 
-(64, 10, 48, 30,  632,  693,  0, 48, 30, 632,  693, 90), 
-(65, 10, 48, 40,   76,  129, 90, 53, 30, 450,  505, 90), 
-(66, 10, 47, 35,  826,  875, 90, 45, 35, 916,  969, 90), 
-(67, 10, 47, 40,   12,   77, 90, 50, 30, 531,  610, 90), 
-(71, 20, 95, 35,  293,  360, 90, 88, 30, 574,  643, 90), 
-(76, 10, 90, 35,  203,  260, 90, 92, 30, 478,  551, 90), 
-(78, 20, 88, 35,  109,  170,  0, 88, 35, 109,  170, 90), 
-(79, 10, 87, 30,  668,  731, 90, 85, 25, 769,  820, 90), 
-(81, 30, 85, 35,   47,  124, 90, 95, 30, 387,  456, 90), 
-(82, 20, 75, 55,  369,  420, 90, 68, 60, 555,  612, 90), 
-(84, 20, 70, 58,  458,  523, 90, 63, 58, 737,  802, 90), 
-(86, 10, 66, 55,  173,  238, 90, 60, 60, 836,  889, 90), 
-(87, 20, 65, 55,   85,  144, 90, 72, 55, 265,  338, 90), 
-(90, 10, 60, 55,   20,   84, 90, 65, 60, 645,  708, 90), 
-(92, 20, 67, 85,  368,  441, 90, 65, 85, 475,  518, 90), 
-(96, 10, 60, 80,   95,  156, 90, 65, 82, 285,  336, 90), 
-(97, 30, 60, 85,  561,  622,  0, 60, 85, 561,  622, 90), 
-(98, 20, 58, 75,   30,   84, 90, 62, 80, 196,  239, 90), 
+(3,  10, 42, 66,   65,  146, 90, 45, 65, 997, 1068, 90),
+(5,  10, 42, 65,   15,   67, 90, 40, 66, 170,  225, 90),
+(6,  20, 40, 69,  621,  702, 90, 45, 70, 825,  870, 90),
+(8,  20, 38, 68,  255,  324, 90, 35, 66, 357,  410, 90),
+(9,  10, 38, 70,  534,  605, 90, 42, 68, 727,  782, 90),
+(11, 10, 35, 69,  448,  505, 90, 45, 68, 912,  967, 90),
+(13, 30, 22, 75,   30,   92, 90, 18, 75,  99,  148, 90),
+(16, 40, 20, 85,  475,  528, 90, 22, 85, 567,  620, 90),
+(18, 20, 15, 75,  179,  254, 90, 25, 85, 652,  721, 90),
+(19, 10, 15, 80,  278,  345, 90, 20, 80, 384,  429, 90),
+(20, 10, 30, 50,   10,   73, 90, 25, 50,  65,  144, 90),
+(23, 10, 28, 55,  732,  777,  0, 28, 55, 732,  777, 90),
+(25, 40, 25, 52,  169,  224, 90, 23, 52, 261,  316, 90),
+(28, 20, 23, 55,  546,  593, 90, 28, 52, 812,  883, 90),
+(29, 10, 20, 50,  358,  405, 90, 25, 55, 622,  701, 90),
+(30, 10, 20, 55,  449,  504, 90, 30, 52, 914,  965, 90),
+(32, 30, 10, 40,   31,  100, 90, 10, 35, 200,  237, 90),
+(33, 40,  8, 40,   87,  158, 90,  2, 40, 383,  434, 90),
+(35, 10,  5, 35,  283,  344, 90,  0, 45, 567,  624, 90),
+(36, 10,  5, 45,  665,  716,  0,  5, 45, 665,  716, 90),
+(38, 30,  0, 40,  479,  522, 90,  8, 45, 751,  816, 90),
+(42, 20, 33, 32,   68,  149, 90, 35, 30, 264,  321, 90),
+(43, 10, 33, 35,   16,   80, 90, 35, 32, 166,  235, 90),
+(44, 10, 32, 30,  359,  412, 90, 30, 32, 448,  509, 90),
+(45, 10, 30, 30,  541,  600, 90, 28, 30, 632,  693, 90),
+(49, 10, 28, 35, 1001, 1066, 90, 30, 35,1054, 1127, 90),
+(50, 10, 26, 32,  815,  880, 90, 25, 35, 912,  969, 90),
+(51, 10, 25, 30,  725,  786,  0, 25, 30, 725,  786, 90),
+(53, 20, 44,  5,  286,  347, 90, 38,  5, 471,  534, 90),
+(54, 40, 42, 10,  186,  257, 90, 35,  5, 562,  629, 90),
+(56, 30, 40,  5,  385,  436, 90, 38, 15, 651,  740, 90),
+(57, 40, 40, 15,   35,   87, 90, 42, 15,  95,  158, 90),
+(62, 20, 50, 35,  262,  317, 90, 45, 30, 734,  777, 90),
+(63, 50, 50, 40,  171,  218, 90, 53, 35, 353,  412, 90),
+(64, 10, 48, 30,  632,  693,  0, 48, 30, 632,  693, 90),
+(65, 10, 48, 40,   76,  129, 90, 53, 30, 450,  505, 90),
+(66, 10, 47, 35,  826,  875, 90, 45, 35, 916,  969, 90),
+(67, 10, 47, 40,   12,   77, 90, 50, 30, 531,  610, 90),
+(71, 20, 95, 35,  293,  360, 90, 88, 30, 574,  643, 90),
+(76, 10, 90, 35,  203,  260, 90, 92, 30, 478,  551, 90),
+(78, 20, 88, 35,  109,  170,  0, 88, 35, 109,  170, 90),
+(79, 10, 87, 30,  668,  731, 90, 85, 25, 769,  820, 90),
+(81, 30, 85, 35,   47,  124, 90, 95, 30, 387,  456, 90),
+(82, 20, 75, 55,  369,  420, 90, 68, 60, 555,  612, 90),
+(84, 20, 70, 58,  458,  523, 90, 63, 58, 737,  802, 90),
+(86, 10, 66, 55,  173,  238, 90, 60, 60, 836,  889, 90),
+(87, 20, 65, 55,   85,  144, 90, 72, 55, 265,  338, 90),
+(90, 10, 60, 55,   20,   84, 90, 65, 60, 645,  708, 90),
+(92, 20, 67, 85,  368,  441, 90, 65, 85, 475,  518, 90),
+(96, 10, 60, 80,   95,  156, 90, 65, 82, 285,  336, 90),
+(97, 30, 60, 85,  561,  622,  0, 60, 85, 561,  622, 90),
+(98, 20, 58, 75,   30,   84, 90, 62, 80, 196,  239, 90),
 (100,20, 55, 85,  647,  726, 90, 55, 80, 743,  820, 90);
 
 INSERT INTO vehicles (start_x,  start_y,  start_open,  start_close,  "number",  capacity)
@@ -100,10 +100,10 @@ t_points AS (SELECT row_number() over() AS id, x, y FROM points),
 first  AS (SELECT orders.id AS id , t_points.id AS p_node_id from orders JOIN t_points ON (x = p_x AND y = p_y)),
 second AS (SELECT orders.id AS id , t_points.id AS d_node_id from orders JOIN t_points ON (x = d_x AND y = d_y)),
 third  AS (SELECT id, p_node_id, d_node_id from first JOIN second USING (id))
-UPDATE orders SET p_node_id = third.p_node_id, d_node_id = third.d_node_id 
+UPDATE orders SET p_node_id = third.p_node_id, d_node_id = third.d_node_id
 FROM third WHERE third.id = orders.id;
 
-WITH 
+WITH
 the_ids AS (SELECT p_node_id AS id FROM orders UNION SELECT d_node_id FROM orders),
 the_max AS (SELECT max(id) FROM the_ids)
 UPDATE vehicles SET start_node_id = max+1 FROM the_max;
diff --git a/tools/testers/update-tester.sh b/tools/testers/update-tester.sh
index 3f43b77..94a1f2d 100755
--- a/tools/testers/update-tester.sh
+++ b/tools/testers/update-tester.sh
@@ -28,30 +28,24 @@ set -e
 
 # ----------------------
 #
-echo ------------------------------------
-echo All pgRouting versions to be updated must be installed before calling
-echo ------------------------------------
-echo -
-echo -
+echo **All pgRouting versions to be updated must be installed before calling**
+echo
+echo
 #
 # USAGE
 #
 #  bash tools/testers/update-tester.sh
 #
 
-CURRENT=2.5.2
+CURRENT=2.6.0
 
 if [ ! -f build/sql/pgrouting--$CURRENT.sql ]; then
-   echo "File not found:  build/lib/pgrouting--$CURRENT.sql "
+   echo "Not testing the current version, file not found:  build/lib/pgrouting--$CURRENT.sql "
    exit 1
 fi
 
 dropdb --if-exists ___test_update
 
-#make sure the scripts are the latest
-cp build/sql/pgrouting-* tools/sql-update-scripts
-#TODO automatically check  the diff is empty
-#git diff
 
 cd build
 sudo make install
@@ -61,8 +55,8 @@ cd ..
 
 function update_test {
 
-echo ------------------------------------
-echo ------------------------------------
+echo
+echo
 echo Updating from $1 to $2
 echo ------------------------------------
 
@@ -117,6 +111,8 @@ dropdb ___test_update
 ### updates from 2.5
 #------------------------------------
 
+update_test 2.5.3 $CURRENT
+update_test 2.5.2 $CURRENT
 update_test 2.5.1 $CURRENT
 update_test 2.5.0 $CURRENT
 
@@ -132,7 +128,7 @@ update_test 2.4.0 $CURRENT
 ### updates from 2.3.0
 #------------------------------------
 
-#update_test 2.3.2 $CURRENT
+update_test 2.3.2 $CURRENT
 update_test 2.3.1 $CURRENT
 update_test 2.3.0 $CURRENT
 
diff --git a/tools/testers/vrpOneDepot.data b/tools/testers/vrpOneDepot.data
index 15e1b0b..e6655ea 100644
--- a/tools/testers/vrpOneDepot.data
+++ b/tools/testers/vrpOneDepot.data
@@ -8,7 +8,7 @@ create table vrp_orders (
     service_time integer,
     x float8,
     y float8
-     
+
 );
 
 copy vrp_orders (id, x, y, order_unit, open_time, close_time, service_time) from stdin;
@@ -119,7 +119,7 @@ drop table if exists vrp_vehicles cascade;
 create table vrp_vehicles (
     vehicle_id integer not null primary key,
     capacity integer,
-    case_no integer   
+    case_no integer
 );
 
 copy vrp_vehicles (vehicle_id, capacity, case_no) from stdin;
diff --git a/tools/testers/vrppdtw_data.sql b/tools/testers/vrppdtw_data.sql
index ff1bd81..e1aa71c 100644
--- a/tools/testers/vrppdtw_data.sql
+++ b/tools/testers/vrppdtw_data.sql
@@ -9,7 +9,7 @@ CREATE table customer (
     closetime INTEGER,
     servicetime INTEGER,
     pindex BIGINT,
-    dindex BIGINT 
+    dindex BIGINT
 );
 
 
diff --git a/tools/transifex/build_translations.sh b/tools/transifex/build_translations.sh
index df4411a..b9e87df 100755
--- a/tools/transifex/build_translations.sh
+++ b/tools/transifex/build_translations.sh
@@ -27,7 +27,7 @@ echo "*************************************************************************"
 echo "Build PO/MO files"
 echo "*************************************************************************"
 for i in ${LANGUAGES}; do
-	sphinx-intl build -l "${i}" -c "${CONFIG}/conf.py" -p "${DOCDIR}/pot" -d "${DOCDIR}" 
+	sphinx-intl build -l "${i}" -c "${CONFIG}/conf.py" -p "${DOCDIR}/pot" -d "${DOCDIR}"
 done
 
 echo "*************************************************************************"
@@ -43,7 +43,7 @@ echo "*************************************************************************"
 for i in ${LANGUAGES}; do
 	DESTINATION="build/doc/latex/${i}"
 	sphinx-build -b html -a -E -D language="${i}" -c "${CONFIG}" ${ROOT} ${DESTINATION}
-	cd "${DESTINATION}" 
+	cd "${DESTINATION}"
 	pdflatex -interaction=nonstopmode pgRoutingDocumentation.tex > /dev/null 2>&1
 	cd "${ROOT}"
 done
diff --git a/tools/transifex/create_translations.sh b/tools/transifex/create_translations.sh
index 059dbb9..a0a2c04 100755
--- a/tools/transifex/create_translations.sh
+++ b/tools/transifex/create_translations.sh
@@ -20,7 +20,7 @@ echo "*************************************************************************"
 echo "Build PO/MO files"
 echo "*************************************************************************"
 for i in ${LANGUAGES}; do
-	sphinx-intl build -l "${i}" -c "${CONFIG}/conf.py" -p "${DOCDIR}/pot" -d "${DOCDIR}" 
+	sphinx-intl build -l "${i}" -c "${CONFIG}/conf.py" -p "${DOCDIR}/pot" -d "${DOCDIR}"
 done
 
 echo "*************************************************************************"
@@ -36,7 +36,7 @@ echo "*************************************************************************"
 for i in ${LANGUAGES}; do
 	DESTINATION="build/doc/latex/${i}"
 	sphinx-build -b html -a -E -D language="${i}" -c "${CONFIG}" ${ROOT} ${DESTINATION}
-	cd "${DESTINATION}" 
+	cd "${DESTINATION}"
 	pdflatex -interaction=nonstopmode pgRoutingDocumentation.tex > /dev/null 2>&1
 	cd "${ROOT}"
 done
diff --git a/tools/transifex/download_translation.sh b/tools/transifex/download_translation.sh
index efeeac0..c060c95 100755
--- a/tools/transifex/download_translation.sh
+++ b/tools/transifex/download_translation.sh
@@ -17,7 +17,7 @@ if [ $1 ]; then
 fi
 
 if [ $2 ]; then
-	RESOURCE='-r' 
+	RESOURCE='-r'
 fi
 
 echo "*************************************************************************"
diff --git a/tools/transifex/update_transifex.sh b/tools/transifex/update_transifex.sh
index 471b236..10f33fb 100755
--- a/tools/transifex/update_transifex.sh
+++ b/tools/transifex/update_transifex.sh
@@ -18,19 +18,19 @@ for i in "${LANGUAGES[@]}"; do
 	tx pull -l "${i}" -f --minimum-perc=1
 done
 git commit -m "pulled translations from Transifex"
- 
+
 echo "*************************************************************************"
 echo "Create languages and update POT files"
 echo "*************************************************************************"
 for i in "${LANGUAGES[@]}"; do
 	sphinx-intl update -l "${i}" -c "${CONFIG}/conf.py" -p "${DOCDIR}/pot" -d "${DOCDIR}"
 done
- 
+
 echo "*************************************************************************"
 echo "Register POT files for upload"
 echo "*************************************************************************"
 sphinx-intl update-txconfig-resources -c "${CONFIG}/conf.py" -p "${DOCDIR}/pot" -d "${DOCDIR}" --transifex-project-name=pgrouting
- 
+
 echo "*************************************************************************"
 echo "Upload to Transifex"
 echo "*************************************************************************"
diff --git a/tools/travis/check-extensions.sh b/tools/travis/check-extensions.sh
index 7915cf8..c8095f0 100755
--- a/tools/travis/check-extensions.sh
+++ b/tools/travis/check-extensions.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 # ------------------------------------------------------------------------------
-# Travis CI scripts 
+# Travis CI scripts
 # Copyright(c) pgRouting Contributors
 #
 # check pgtap & postgis on travis
@@ -17,7 +17,7 @@ echo "locate pgtap"
 locate pgtap.control
 echo "locate postgis"
 locate postgis.control
-  
+
 
 
 cd ..
@@ -31,11 +31,11 @@ run_psql () {
     fi
 }
 
-run_psql -c "SELECT version()" 
-run_psql -c "CREATE EXTENSION pgtap" 
+run_psql -c "SELECT version()"
+run_psql -c "CREATE EXTENSION pgtap"
 run_psql -c "SELECT pgtap_version()"
-run_psql -c "CREATE EXTENSION postgis" 
+run_psql -c "CREATE EXTENSION postgis"
 run_psql -c "SELECT postgis_full_version()"
-run_psql -c "DROP EXTENSION pgtap" 
-run_psql -c "DROP EXTENSION postgis" 
+run_psql -c "DROP EXTENSION pgtap"
+run_psql -c "DROP EXTENSION postgis"
 
diff --git a/tools/travis/install-doxygen.sh b/tools/travis/install-doxygen.sh
index 46f7ce9..62d3e24 100755
--- a/tools/travis/install-doxygen.sh
+++ b/tools/travis/install-doxygen.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 # ------------------------------------------------------------------------------
-# Travis CI scripts 
+# Travis CI scripts
 # Copyright(c) pgRouting Contributors
 #
 # Install Doxygen
@@ -8,21 +8,11 @@
 
 set -e
 
-#OS="$(lsb_release -c -s)"
-
-#if [[ "$OS" != "trusty" ]] ; then
-#    exit 0
-#fi
-
-
-#install doxygen only on trusty
+if [[ "${DOCUMENTATION}"="OFF" ]]
+then
+    exit 0
+fi  
 
 sudo \
     sudo apt-get --no-install-suggests --no-install-recommends -qq install doxygen  && \
     doxygen --version ;
-
-#sudo add-apt-repository ppa:libreoffice/libreoffice-4-4 -y && \
-#    sudo apt-get -qq update && \
-#    sudo apt-get --no-install-suggests --no-install-recommends -qq install doxygen  && \
-#    doxygen --version ;
-
diff --git a/tools/travis/install-postgres.sh b/tools/travis/install-postgres.sh
index ec9d32a..2d39f07 100755
--- a/tools/travis/install-postgres.sh
+++ b/tools/travis/install-postgres.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 # ------------------------------------------------------------------------------
-# Travis CI scripts 
+# Travis CI scripts
 # Copyright(c) pgRouting Contributors
 #
 # Install pgRouting prerequesits
@@ -10,51 +10,41 @@ set -e
 
 POSTGRESQL_VERSION="$1"
 PGUSER="$2"
+POSTGIS_VERSION="2.3"
 
 if [[ -z "$POSTGRESQL_VERSION" ]] ; then
     exit 1
 fi
 
 
-if [[ "$POSTGRESQL_VERSION" = "9.5" ||  "$POSTGRESQL_VERSION" = "9.6"  ]] ; then
-    POSTGIS_VERSION="2.3"
+if [[ "$POSTGRESQL_VERSION" = "10" ]] ; then
+    POSTGIS_VERSION="2.4"
 fi
 
 echo "Postgres $POSTGRESQL_VERSION"
 echo "User $PGUSER"
 
 sudo /etc/init.d/postgresql stop
-sudo apt-get install -y \
-    postgresql-server-dev-$POSTGRESQL_VERSION
 
-if [[ "$POSTGRESQL_VERSION" = "9.5" ||  "$POSTGRESQL_VERSION" = "9.6"  ]] ; then
+echo "Installing postgresql-server-dev-$POSTGRESQL_VERSION postgresql-$POSTGRESQL_VERSION-postgis-$POSTGIS_VERSION"
+sudo apt-get install -y \
+    postgresql-server-dev-$POSTGRESQL_VERSION \
+    postgresql-$POSTGRESQL_VERSION-postgis-$POSTGIS_VERSION
 
-    ## removing unused postgresql
-    #sudo apt-get -y remove --purge postgresql-9.1
-    #sudo apt-get -y remove --purge postgresql-9.2
-    #sudo apt-get -y remove --purge postgresql-9.3
-    #sudo apt-get -y remove --purge postgresql-9.4
-    #sudo apt-get -y remove --purge postgresql-9.5
-    #sudo apt-get -y remove --purge postgresql-9.6
 
-    echo "Installing postgresql $POSTGRESQL_VERSION  & postgis "
 
-    sudo apt-get install -y \
-        postgresql-$POSTGRESQL_VERSION \
-        postgresql-$POSTGRESQL_VERSION-postgis-$POSTGIS_VERSION
 
-    sudo cp /usr/lib/postgresql/$POSTGRESQL_VERSION/bin/pg_config /usr/bin/pg_config
+sudo cp /usr/lib/postgresql/$POSTGRESQL_VERSION/bin/pg_config /usr/bin/pg_config
 
-    sudo /etc/init.d/postgresql stop
+sudo /etc/init.d/postgresql stop
 
 
-    sudo cat /etc/postgresql/$POSTGRESQL_VERSION/main/pg_hba.conf
+sudo cat /etc/postgresql/$POSTGRESQL_VERSION/main/pg_hba.conf
 
-    sudo sed -i -e 's/port = 5433/port = 5432/g' /etc/postgresql/$POSTGRESQL_VERSION/main/postgresql.conf
-    sudo cp $TRAVIS_BUILD_DIR/tools/travis/pg_hba.conf /etc/postgresql/$POSTGRESQL_VERSION/main/pg_hba.conf
+sudo sed -i -e 's/port = 5433/port = 5432/g' /etc/postgresql/$POSTGRESQL_VERSION/main/postgresql.conf
+sudo cp $TRAVIS_BUILD_DIR/tools/travis/pg_hba.conf /etc/postgresql/$POSTGRESQL_VERSION/main/pg_hba.conf
 
-    ps -fea | grep postgres
-fi
+ps -fea | grep postgres
 
 sudo /etc/init.d/postgresql start $POSTGRESQL_VERSION
 
diff --git a/tools/travis/pgrouting_build.sh b/tools/travis/pgrouting_build.sh
index 03a1d7c..1f76c09 100755
--- a/tools/travis/pgrouting_build.sh
+++ b/tools/travis/pgrouting_build.sh
@@ -1,18 +1,23 @@
 #!/bin/bash
 # ------------------------------------------------------------------------------
-# Travis CI scripts 
+# Travis CI scripts
 # Copyright(c) pgRouting Contributors
 #
 # Build pgRouting
 # ------------------------------------------------------------------------------
 
 # exit script on error
-set -e 
+set -e
 
 # build pgRouting
 mkdir build
 cd build
 cmake  -DPOSTGRESQL_VERSION=$POSTGRESQL_VERSION -DWITH_DOC=ON -DCMAKE_BUILD_TYPE=Debug ..
-make
-sudo make install
-make doc
+
+if [[ "$DOCUMENTATION" == "ON" ]]
+then
+    make doc
+else
+    make
+    sudo make install
+fi
diff --git a/tools/travis/pgrouting_test.sh b/tools/travis/pgrouting_test.sh
index 7758bb9..9a3e182 100755
--- a/tools/travis/pgrouting_test.sh
+++ b/tools/travis/pgrouting_test.sh
@@ -1,11 +1,17 @@
-#!/bin/sh
+#!/bin/bash
 # ------------------------------------------------------------------------------
-# Travis CI scripts 
+# Travis CI scripts
 # Copyright(c) pgRouting Contributors
 #
 # Test pgRouting
 # ------------------------------------------------------------------------------
 
+if [[ "$DOCUMENTATION" == "ON" ]]
+then
+    exit 0
+fi
+
+
 PGDATABASE="pgr_test__db__test"
 
 POSTGRESQL_VERSION="$1"
@@ -17,17 +23,17 @@ POSTGRESQL_DIRECTORY="/usr/share/postgresql/$POSTGRESQL_VERSION"
 echo "POSTGRESQL_VERSION $POSTGRESQL_VERSION"
 
 # exit script on error
-set -e 
+set -e
 ERROR=0
 
 # Define alias function for psql command
 run_psql () {
     PGOPTIONS='--client-min-messages=warning' psql -U $PGUSER  -d $PGDATABASE -X -q -v ON_ERROR_STOP=1 --pset pager=off "$@"
     if [ "$?" -ne 0 ]
-    then 
+    then
         echo "Test query failed: $@"
         ERROR=1
-    fi 
+    fi
 }
 
 # ------------------------------------------------------------------------------
@@ -47,8 +53,8 @@ run_psql  -c "CREATE EXTENSION pgrouting;"
 # ------------------------------------------------------------------------------
 # Get version information
 # ------------------------------------------------------------------------------
-run_psql -c "SELECT version();"    
-run_psql -c "SELECT postgis_full_version();"    
+run_psql -c "SELECT version();"
+run_psql -c "SELECT postgis_full_version();"
 run_psql -c "SELECT pgr_version();"
 
 #PGROUTING_VERSION=`run_psql -A -t -c "SELECT version FROM pgr_version();"`
@@ -58,7 +64,7 @@ run_psql -c "SELECT pgr_version();"
 # ------------------------------------------------------------------------------
 # use -v -v for more verbose debuging output
 # ./tools/test-runner.pl -v -v -pgver $POSTGRESQL_VERSION
-#./tools/test-runner.pl -pgver $POSTGRESQL_VERSION $IGNORE 
+#./tools/test-runner.pl -pgver $POSTGRESQL_VERSION $IGNORE
 #./tools/test-runner.pl -pgver $POSTGRESQL_VERSION $IGNORE -v -alg ksp
 
 #cd ./tools/testers/
@@ -67,7 +73,7 @@ run_psql -c "SELECT pgr_version();"
 #dropdb ___pgr___test___
 #cd ../../
 
-./tools/testers/algorithm-tester.pl -pgver $POSTGRESQL_VERSION -pguser $PGUSER 
+./tools/testers/algorithm-tester.pl -pgver $POSTGRESQL_VERSION -pguser $PGUSER
 
 if [ "$?" -ne 0 ]
 then
diff --git a/tools/travis/test-documentation.sh b/tools/travis/test-documentation.sh
index c4d48b8..21f236c 100755
--- a/tools/travis/test-documentation.sh
+++ b/tools/travis/test-documentation.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 # ------------------------------------------------------------------------------
-# Travis CI scripts 
+# Travis CI scripts
 # Copyright(c) pgRouting Contributors
 #
 # testing documentation
diff --git a/tools/windows/boost-w32.patch b/tools/windows/boost-w32.patch
index 140b39b..ee23e23 100644
--- a/tools/windows/boost-w32.patch
+++ b/tools/windows/boost-w32.patch
@@ -13,6 +13,6 @@
  };
  #endif
 +#endif
- 
- 
+
+
  #elif  defined(_MSC_VER) && !defined(UNDER_CE)
diff --git a/tools/windows/gaul.patch b/tools/windows/gaul.patch
index 9c4eadd..450df76 100644
--- a/tools/windows/gaul.patch
+++ b/tools/windows/gaul.patch
@@ -17,13 +17,13 @@
 +++ gaul-devel-0.1849-0a/util/gaul/gaul_config_win.h	2013-03-11 13:48:12 -0400
 @@ -39,9 +39,9 @@
   **********************************************************************/
- 
+
  #ifdef BUILDING_DLL
 -#  define FUNCPROTO __declspec (dllexport)
-+#  define FUNCPROTO 
++#  define FUNCPROTO
  #else
 -#  define FUNCPROTO __declspec (dllimport)
-+#  define FUNCPROTO 
++#  define FUNCPROTO
  #endif
- 
+
  #  if defined __CYGWIN32__ && !defined __CYGWIN__
diff --git a/tools/winnie/build_pgrouting.sh b/tools/winnie/build_pgrouting.sh
index ebcc845..b4408e4 100644
--- a/tools/winnie/build_pgrouting.sh
+++ b/tools/winnie/build_pgrouting.sh
@@ -177,7 +177,7 @@ echo "***************************"
 echo make
 echo "***************************"
 #---------------
-make 
+make
 
 #---------------
 echo
@@ -231,7 +231,7 @@ cd ${PROJECTS}/pgrouting/branches/${PGROUTING_VER}
 
 #perl tools/testers/algorithm-tester.pl  -pgver ${PG_VER} -pgisver "${POSTGIS_VER}" -pgport "${PGPORT}"
 
-if [ $OS_BUILD -eq 32 ] 
+if [ $OS_BUILD -eq 32 ]
 then
 
     perl tools/testers/algorithm-tester.pl  -pgver ${PG_VER} -pgisver "${POSTGIS_VER}" -pgport "${PGPORT}"
diff --git a/tools/winnie/package_pgrouting.sh b/tools/winnie/package_pgrouting.sh
index 55dfacb..31c8187 100644
--- a/tools/winnie/package_pgrouting.sh
+++ b/tools/winnie/package_pgrouting.sh
@@ -1,6 +1,6 @@
 # CHANGE THESE TO SUIT YOUR PROJECT
 #all these get passed in by jenkins
-#export OS_BUILD=64 
+#export OS_BUILD=64
 #export PG_VER=9.2
 #export PGHOST=localhost
 #export PGPORT=8442
@@ -14,7 +14,7 @@
 export PGUSER=postgres
 
 #this should be setup as a mapping in msys/etc/fstab to where you keep your projects
-export PROJECTS=/projects 
+export PROJECTS=/projects
 export PATHOLD=$PATH
 
 #export PATHOLD=".:/bin:/include:/mingw/bin:/mingw/include:/c/Windows/system32:/c/Windows:/usr/local/bin:/c/ming64/Silksvn/bin:/c/Program Files (x86)/Git/bin"
@@ -30,11 +30,11 @@ if [[ "${GCC_TYPE}" == *gcc48* ]] ; then
 	BOOST_VER=1.59.0
 	BOOST_VER_WU=1_59_0
 	BOOST_VER_WUM=1_59
-else 
+else
   GMP_VER=5.1.2
 	MPFR_VER=3.1.2
 	CGAL_VER=3.9
-	BOOST_VER=1.46.1 
+	BOOST_VER=1.46.1
 fi;
 
 #cd ${PROJECTS}/pgrouting/branches/${PGROUTING_VER}/build/lib

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/pgrouting.git



More information about the Pkg-grass-devel mailing list